PageSourceSearch

https://play.tvaztecaguate.com/2179.37e18e1c0ad515c6.js

js tvaztecaguate.com collected 2026-10-02 20:00:44 UTC 1,305,551 bytes, 34 lines download raw bytes

1(self.webpackChunkapp=self.webpackChunkapp||[]).push([[2179],{3951:(Ot,ft,Le)=>{"use strict";Le.d(ft,{A:()=>A});const A=(0,Le(7423).fo)("Browser",{web:()=>Le.e(6874).then(Le.bind(Le,6874)).then(ce=>new ce.BrowserWeb)})},2140:(Ot,ft,Le)=>{"use strict";Le.d(ft,{l:()=>fs});var Re=Le(7582),A=Le(1571),ce=Le(3689),me=Le(9226),be=Le.n(me),$e=Le(1421),xe=Le.n($e),ae=function(ee,I){I.isImmediatePropagationStopped=function(){return!0},I.cancelBubble=!0,I.isPropagationStopped=function(){return!0}},Oe=function(ee,I,G){ae(0,G),ee.trigger({type:I+G.type,originalEvent:G})},de=function(ee,I){ee.ads.isInAdMode()&&(ee.ads.isContentResuming()?ee.ads._contentEnding&&Oe(ee,"content",I):Oe(ee,"ad",I))},at=function(ee,I){ee.ads.isInAdMode()?ee.ads.isContentResuming()?(ae(0,I),ee.trigger("resumeended")):Oe(ee,"ad",I):!ee.ads._contentHasEnded&&!ee.ads.stitchedAds()&&(Oe(ee,"content",I),ee.trigger("readyforpostroll"))},ct=function(ee,I){if(!("loadstart"===I.type&&!ee.ads._hasThereBeenALoadStartDuringPlayerLife||"loadeddata"===I.type&&!ee.ads._hasThereBeenALoadedData||"loadedmetadata"===I.type&&!ee.ads._hasThereBeenALoadedMetaData))if(ee.ads.inAdBreak())Oe(ee,"ad",I);else{if(ee.currentSrc()!==ee.ads.contentSrc)return;Oe(ee,"content",I)}},pt=function(ee,I){ee.ads.inAdBreak()?Oe(ee,"ad",I):ee.ads.isContentResuming()&&Oe(ee,"content",I)};
2/*! @name videojs-contrib-ads @version 6.9.0 @license Apache-2.0 */function sr(K){"playing"===K.type?de(this,K):"ended"===K.type?at(this,K):"loadstart"===K.type||"loadeddata"===K.type||"loadedmetadata"===K.type?ct(this,K):"play"===K.type?pt(this,K):this.ads.isInAdMode()&&(this.ads.isContentResuming()?Oe(this,"content",K):Oe(this,"ad",K))}var Je={},Dt=function(){(function(ee){if(ce.default.dom.isInFrame()&&"function"!=typeof be().__tcfapi){for(var G,I=be(),N={};I;){try{if(I.frames.__tcfapiLocator){G=I;break}}catch(J){}if(I===be().top)break;I=I.parent}if(!G)return;be().__tcfapi=function(J,Ee,Ue,lt){var ot=Math.random()+"",xt={__tcfapiCall:{command:J,parameter:lt,version:Ee,callId:ot}};N[ot]=Ue,G.postMessage(xt,"*")},be().addEventListener("message",function(J){var Ee={};try{Ee="string"==typeof J.data?JSON.parse(J.data):J.data}catch(lt){}var Ue=Ee.__tcfapiReturn;Ue&&"function"==typeof N[Ue.callId]&&(N[Ue.callId](Ue.returnValue,Ue.success),N[Ue.callId]=null)},!1)}})(),"function"==typeof be().__tcfapi&&be().__tcfapi("addEventListener",2,function(ee,I){I&&(Je=ee)})},Mt=function(ee,I){return I?encodeURIComponent(ee):ee},ht=function(ee,I,G){if(ee&&ee[G])for(var N=ee[G],J=Object.keys(N),Ee=0;Ee<J.length;Ee++)I["{mediainfo."+G+"."+J[Ee]+"}"]=N[J[Ee]]};function er(K,ee,I){var G=this,N={};K=K.replace(/{([^}=]+)=([^}]+)}/g,function(lt,ot,xt){return N["{"+ot+"}"]=xt,"{"+ot+"}"}),void 0===ee&&(ee=!1);var J={};for(var Ee in void 0!==I&&(J=I),J["{player.id}"]=this.options_["data-player"]||this.id_,J["{player.height}"]=this.currentHeight(),J["{player.width}"]=this.currentWidth(),J["{mediainfo.id}"]=this.mediainfo?this.mediainfo.id:"",J["{mediainfo.name}"]=this.mediainfo?this.mediainfo.name:"",J["{mediainfo.duration}"]=this.mediainfo?this.mediainfo.duration:"",J["{player.duration}"]=this.duration(),J["{player.pageUrl}"]=ce.default.dom.isInFrame()?xe().referrer:be().location.href,J["{playlistinfo.id}"]=this.playlistinfo?this.playlistinfo.id:"",J["{playlistinfo.name}"]=this.playlistinfo?this.playlistinfo.name:"",J["{timestamp}"]=(new Date).getTime(),J["{document.referrer}"]=xe().referrer,J["{window.location.href}"]=be().location.href,J["{random}"]=Math.floor(1e12*Math.random()),["description","tags","reference_id","ad_keys"].forEach(function(lt){J["{mediainfo."+lt+"}"]=G.mediainfo&&G.mediainfo[lt]?G.mediainfo[lt]:N["{mediainfo."+lt+"}"]?N["{mediainfo."+lt+"}"]:""}),ht(this.mediainfo,J,"custom_fields"),ht(this.mediainfo,J,"customFields"),Object.keys(Je).forEach(function(lt){J["{tcf."+lt+"}"]=Je[lt]}),J["{tcf.gdprAppliesInt}"]=Je.gdprApplies?1:0,J)K=K.split(Ee).join(Mt(J[Ee],ee));for(var Ue in K=K.replace(/{pageVariable\.([^}]+)}/g,function(lt,ot){for(var xt,zt=be(),It=ot.split("."),_r=0;_r<It.length;_r++)_r===It.length-1?xt=zt[It[_r]]:zt=zt[It[_r]];var Qr=typeof xt;
vendor: 8,246 bytes, line 2
2return null===xt?"null":void 0===xt?N["{pageVariable."+ot+"}"]?N["{pageVariable."+ot+"}"]:(ce.default.log.warn('Page variable "'+ot+'" not found'),""):"string"!==Qr&&"number"!==Qr&&"boolean"!==Qr?(ce.default.log.warn('Page variable "'+ot+'" is not a supported type'),""):Mt(String(xt),ee)}),N)K=K.replace(Ue,N[Ue]);return K}var qt={processMetadataTracks:function(K,ee){for(var I=K.textTracks(),G=function(Ee){"metadata"===Ee.kind&&(K.ads.cueTextTracks.setMetadataTrackMode(Ee),ee(K,Ee))},N=0;N<I.length;N++)G(I[N]);I.addEventListener("addtrack",function(J){G(J.track)})},setMetadataTrackMode:function(K){},getSupportedAdCue:function(K,ee){return ee},isSupportedAdCue:function(K,ee){return!0},getCueId:function(K,ee){return ee.id}},Ft=function(ee,I){return void 0!==I&&ee.ads.includedCues[I]},ie=function(ee,I){void 0!==I&&""!==I&&(ee.ads.includedCues[I]=!0)};function ke(){!1!==this.ads._shouldBlockPlay&&(this.paused()||(this.ads.debug("Playback was canceled by cancelContentPlay"),this.pause()),this.ads._cancelledPlay=!0)}qt.processAdTrack=function(K,ee,I,G){K.ads.includedCues={};for(var N=0;N<ee.length;N++){var J=ee[N],Ee=this.getSupportedAdCue(K,J);if(!this.isSupportedAdCue(K,J))return void ce.default.log.warn("Skipping as this is not a supported ad cue.",J);var Ue=this.getCueId(K,J),lt=J.startTime;if(Ft(K,Ue))return void ce.default.log("Skipping ad already seen with ID "+Ue);G&&G(K,Ee,Ue,lt),I(K,Ee,Ue,lt),ie(K,Ue)}};var it={},Ae=ce.default;it.isMiddlewareMediatorSupported=function(){return!Ae.browser.IS_IOS&&!Ae.browser.IS_ANDROID&&!!(Ae.use&&Ae.middleware&&Ae.middleware.TERMINATOR)},it.playMiddleware=function(K){return{setSource:function(I,G){G(null,I)},callPlay:function(){if(K.ads&&!0===K.ads._shouldBlockPlay)return K.ads.debug("Using playMiddleware to block content playback"),K.ads._playBlocked=!0,Ae.middleware.TERMINATOR},play:function(I,G){K.ads&&K.ads._playBlocked&&I?(K.ads.debug("Play call to Tech was terminated."),K.trigger("play"),K.addClass("vjs-has-started"),K.ads._playBlocked=!1):G&&G.catch&&G.catch(function(N){"NotAllowedError"===N.name&&!ce.default.browser.IS_SAFARI&&K.trigger("pause")})}}},it.testHook=function(K){Ae=K};var ue=it.playMiddleware,O=it.isMiddlewareMediatorSupported,Fe=function(){function K(){}return K.getState=function(I){if(I&&K.states_&&K.states_[I])return K.states_[I]},K.registerState=function(I,G){if("string"!=typeof I||!I)throw new Error('Illegal state name, "'+I+'"; must be a non-empty string.');return K.states_||(K.states_={}),K.states_[I]=G,G},K}(),nt=function(){function K(I){this.player=I}K._getName=function(){return"Anonymous State"};var ee=K.prototype;return ee.transitionTo=function(G){var N=this.player;this.cleanup(N);var J=new G(N);N.ads._state=J,N.ads.debug(this.constructor._getName()+" -> "+J.constructor._getName());for(var Ee=arguments.length,Ue=new Array(Ee>1?Ee-1:0),lt=1;lt<Ee;lt++)Ue[lt-1]=arguments[lt];J.init.apply(J,[N].concat(Ue))},ee.init=function(){},ee.cleanup=function(){},ee.onPlay=function(){},ee.onPlaying=function(){},ee.onEnded=function(){},ee.onAdEnded=function(){},ee.onAdsReady=function(){ce.default.log.warn("Unexpected adsready event")},ee.onAdsError=function(){},ee.onAdsCanceled=function(){},ee.onAdTimeout=function(){},ee.onAdStarted=function(){},ee.onContentChanged=function(){},ee.onContentResumed=function(){},ee.onReadyForPostroll=function(){ce.default.log.warn("Unexpected readyforpostroll event")},ee.onNoPreroll=function(){},ee.onNoPostroll=function(){},ee.startLinearAdMode=function(){ce.default.log.warn("Unexpected startLinearAdMode invocation (State via "+this.constructor._getName()+")")},ee.endLinearAdMode=function(){ce.default.log.warn("Unexpected endLinearAdMode invocation (State via "+this.constructor._getName()+")")},ee.skipLinearAdMode=function(){ce.default.log.warn("Unexpected skipLinearAdMode invocation (State via "+this.constructor._getName()+")")},ee.isAdState=function(){throw new Error("isAdState unimplemented for "+this.constructor._getName())},ee.isWaitingForAdBreak=function(){return!1},ee.isContentResuming=function(){return!1},ee.inAdBreak=function(){return!1},ee.handleEvent=function(G){var N=this.player;"play"===G?this.onPlay(N):"adsready"===G?this.onAdsReady(N):"adserror"===G?this.onAdsError(N):"adscanceled"===G?this.onAdsCanceled(N):"adtimeout"===G?this.onAdTimeout(N):"ads-ad-started"===G?this.onAdStarted(N):"contentchanged"===G?this.onContentChanged(N):"contentresumed"===G?this.onContentResumed(N):"readyforpostroll"===G?this.onReadyForPostroll(N):"playing"===G?this.onPlaying(N):"ended"===G?this.onEnded(N):"nopreroll"===G?this.onNoPreroll(N):"nopostroll"===G?this.onNoPostroll(N):"adended"===G&&this.onAdEnded(N)},K}();function Ze(K,ee){K.prototype=Object.create(ee.prototype),K.prototype.constructor=K,K.__proto__=ee}Fe.registerState("State",nt);var Tt=function(K){function ee(G){var N;return(N=K.call(this,G)||this).contentResuming=!1,N.waitingForAdBreak=!1,N}Ze(ee,K);var I=ee.prototype;return I.isAdState=function(){return!0},I.onPlaying=function(){var N=Fe.getState("ContentPlayback");this.contentResuming&&this.transitionTo(N)},I.onContentResumed=function(){var N=Fe.getState("ContentPlayback");this.contentResuming&&this.transitionTo(N)},I.isWaitingForAdBreak=function(){return this.waitingForAdBreak},I.isContentResuming=function(){return this.contentResuming},I.inAdBreak=function(){return!0===this.player.ads._inLinearAdMode},ee}(nt);Fe.registerState("AdState",Tt);var $t=function(K){function ee(){return K.apply(this,arguments)||this}Ze(ee,K);var I=ee.prototype;return I.isAdState=function(){return!1},I.onContentChanged=function(N){var J=Fe.getState("BeforePreroll"),Ee=Fe.getState("Preroll");N.ads.debug("Received contentchanged event (ContentState)"),N.paused()?this.transitionTo(J):(this.transitionTo(Ee,!1),N.pause(),N.ads._pausedOnContentupdate=!0)},ee}(nt);Fe.registerState("ContentState",$t);var wt,ir=Fe.getState("ContentState");Fe.registerState("AdsDone",function(K){function ee(){return K.apply(this,arguments)||this}Ze(ee,K),ee._getName=function(){return"AdsDone"};var I=ee.prototype;return I.init=function(N){N.ads._contentHasEnded=!0,N.trigger("ended")},I.startLinearAdMode=function(){ce.default.log.warn("Unexpected startLinearAdMode invocation (AdsDone)")},ee}(ir));var Mr_start=function Vt(K){K.ads.debug("Starting ad break"),K.ads._inLinearAdMode=!0,K.trigger("adstart"),K.ads.shouldTakeSnapshots()&&(K.ads.snapshot=function Or(K){var ee;ee=ce.default.browser.IS_IOS&&K.ads.isLive(K)&&K.seekable().length>0?K.currentTime()-K.seekable().end(0):K.currentTime();var I=K.$(".vjs-tech"),G=K.textTracks?K.textTracks():[],N=[],J={ended:K.ended(),currentSrc:K.currentSrc(),sources:K.currentSources(),src:K.tech_.src(),currentTime:ee,type:K.currentType()};I&&(J.style=I.getAttribute("style"));for(var Ee=0;Ee<G.length;Ee++){var Ue=G[Ee];N.push({track:Ue,mode:Ue.mode}),Ue.mode="disabled"}return J.suppressedTracks=N,J}(K)),K.ads.shouldPlayContentBehindAd(K)&&(K.ads.preAdVolume_=K.volume(),K.volume(0)),K.addClass("vjs-ad-playing"),K.hasClass("vjs-live")&&K.removeClass("vjs-live"),K.ads.removeNativePoster()},Mr_end=function Ir(K,ee){K.ads.debug("Ending ad break"),void 0===ee&&(ee=function(){}),K.ads.adType=null,K.ads._inLinearAdMode=!1,K.trigger("adend"),K.removeClass("vjs-ad-playing"),K.ads.isLive(K)&&K.addClass("vjs-live"),K.ads.shouldTakeSnapshots()?function pr(K,ee){var I=K.ads.snapshot;if(void 0===ee&&(ee=function(){}),!0===K.ads.disableNextSnapshotRestore)return K.ads.disableNextSnapshotRestore=!1,delete K.ads.snapshot,void ee();var Ee,G=K.$(".vjs-tech"),N=20,J=I.suppressedTracks,Ue=function(){for(var It=0;It<J.length;It++)(Ee=J[It]).track.mode=Ee.mode},lt=function(){var It;if(ce.default.browser.IS_IOS&&K.ads.isLive(K)){if(I.currentTime<0&&(It=K.seekable().length>0?K.seekable().end(0)+I.currentTime:K.currentTime(),K.currentTime(It)),K.paused()){var _r=K.play();_r&&_r.catch&&_r.catch(function(xi){ce.default.log.warn("Play promise rejected in IOS snapshot resume",xi)})}}else if(I.ended)K.currentTime(K.duration());else{K.currentTime(I.currentTime);var Qr=K.play();Qr&&Qr.catch&&Qr.catch(function(xi){ce.default.log.warn("Play promise rejected in snapshot resume",xi)})}K.ads.shouldRemoveAutoplay_&&(K.autoplay(!1),K.ads.shouldRemoveAutoplay_=!1)}
vendor: 8,711 bytes, line 2
2,ot=function zt(){if(K.off("contentcanplay",zt),wt&&K.clearTimeout(wt),(G=K.el().querySelector(".vjs-tech")).readyState>1||void 0===G.seekable||G.seekable.length>0)return lt();if(N--)K.setTimeout(zt,50);else try{lt()}catch(It){ce.default.log.warn("Failed to resume the content after an advertisement",It)}};if("style"in I&&G.setAttribute("style",I.style||""),K.ads.videoElementRecycled())K.one("resumeended",function(){delete K.ads.snapshot,ee()}),K.one("contentloadedmetadata",Ue),ce.default.browser.IS_IOS&&!K.autoplay()&&(K.autoplay(!0),K.ads.shouldRemoveAutoplay_=!0),K.src(I.sources),K.one("contentcanplay",ot),wt=K.setTimeout(ot,2e3);else{if(Ue(),!K.ended()){var xt=K.play();xt&&xt.catch&&xt.catch(function(zt){ce.default.log.warn("Play promise rejected in snapshot restore",zt)})}delete K.ads.snapshot,ee()}}(K,ee):(K.volume(K.ads.preAdVolume_),ee())},rn=Fe.getState("AdState");Fe.registerState("Preroll",function(K){function ee(){return K.apply(this,arguments)||this}Ze(ee,K),ee._getName=function(){return"Preroll"};var I=ee.prototype;return I.init=function(N,J,Ee){if(this.waitingForAdBreak=!0,N.addClass("vjs-ad-loading"),Ee||N.ads.nopreroll_)return this.resumeAfterNoPreroll(N);var Ue=N.ads.settings.timeout;"number"==typeof N.ads.settings.prerollTimeout&&(Ue=N.ads.settings.prerollTimeout),this._timeout=N.setTimeout(function(){N.trigger("adtimeout")},Ue),J?this.handleAdsReady():this.adsReady=!1},I.onAdsReady=function(N){N.ads.inAdBreak()?ce.default.log.warn("Unexpected adsready event (Preroll)"):(N.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady())},I.handleAdsReady=function(){this.adsReady=!0,this.readyForPreroll()},I.afterLoadStart=function(N){var J=this.player;J.ads._hasThereBeenALoadStartDuringPlayerLife?N():(J.ads.debug("Waiting for loadstart..."),J.one("loadstart",function(){J.ads.debug("Received loadstart event"),N()}))},I.noPreroll=function(){var N=this;this.afterLoadStart(function(){N.player.ads.debug("Skipping prerolls due to nopreroll event (Preroll)"),N.resumeAfterNoPreroll(N.player)})},I.readyForPreroll=function(){var N=this.player;this.afterLoadStart(function(){N.ads.debug("Triggered readyforpreroll event (Preroll)"),N.trigger("readyforpreroll")})},I.onAdsCanceled=function(N){var J=this;N.ads.debug("adscanceled (Preroll)"),this.afterLoadStart(function(){J.resumeAfterNoPreroll(N)})},I.onAdsError=function(N){var J=this;ce.default.log("adserror (Preroll)"),this.inAdBreak()?N.ads.endLinearAdMode():this.afterLoadStart(function(){J.resumeAfterNoPreroll(N)})},I.startLinearAdMode=function(){var N=this.player;!this.adsReady||N.ads.inAdBreak()||this.isContentResuming()?ce.default.log.warn("Unexpected startLinearAdMode invocation (Preroll)"):(this.clearTimeout(N),N.ads.adType="preroll",this.waitingForAdBreak=!1,Mr_start(N),N.ads._shouldBlockPlay=!1)},I.onAdStarted=function(N){N.removeClass("vjs-ad-loading")},I.endLinearAdMode=function(){var N=this.player;this.inAdBreak()&&(N.removeClass("vjs-ad-loading"),N.addClass("vjs-ad-content-resuming"),this.contentResuming=!0,Mr_end(N))},I.skipLinearAdMode=function(){var N=this,J=this.player;J.ads.inAdBreak()||this.isContentResuming()?ce.default.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart(function(){J.trigger("adskip"),J.ads.debug("skipLinearAdMode (Preroll)"),N.resumeAfterNoPreroll(J)})},I.onAdTimeout=function(N){var J=this;this.afterLoadStart(function(){N.ads.debug("adtimeout (Preroll)"),J.resumeAfterNoPreroll(N)})},I.onNoPreroll=function(N){N.ads.inAdBreak()||this.isContentResuming()?ce.default.log.warn("Unexpected nopreroll event (Preroll)"):this.noPreroll()},I.resumeAfterNoPreroll=function(N){if(this.contentResuming=!0,N.ads._shouldBlockPlay=!1,this.cleanupPartial(N),N.ads._playRequested||N.ads._pausedOnContentupdate)if(N.paused()){N.ads.debug("resumeAfterNoPreroll: attempting to resume playback (Preroll)");var J=N.play();J&&J.then&&J.then(null,function(Ee){})}else N.ads.debug("resumeAfterNoPreroll: already playing (Preroll)"),N.trigger("play"),N.trigger("playing")},I.cleanup=function(N){N.ads._hasThereBeenALoadStartDuringPlayerLife||ce.default.log.warn("Leaving Preroll state before loadstart event can cause issues."),this.cleanupPartial(N)},I.cleanupPartial=function(N){N.removeClass("vjs-ad-loading"),N.removeClass("vjs-ad-content-resuming"),this.clearTimeout(N)},I.clearTimeout=function(N){N.clearTimeout(this._timeout),this._timeout=null},ee}(rn));var Fr=function(K){function ee(){return K.apply(this,arguments)||this}Ze(ee,K),ee._getName=function(){return"BeforePreroll"};var I=ee.prototype;return I.init=function(N){this.adsReady=!1,this.shouldResumeToContent=!1,N.ads._shouldBlockPlay=!N.ads.settings.allowVjsAutoplay||!N.autoplay()},I.onAdsReady=function(N){N.ads.debug("Received adsready event (BeforePreroll)"),this.adsReady=!0},I.onPlay=function(N){var J=Fe.getState("Preroll");N.ads.debug("Received play event (BeforePreroll)"),this.transitionTo(J,this.adsReady,this.shouldResumeToContent)},I.onAdsCanceled=function(N){N.ads.debug("adscanceled (BeforePreroll)"),this.shouldResumeToContent=!0},I.onAdsError=function(){this.player.ads.debug("adserror (BeforePreroll)"),this.shouldResumeToContent=!0},I.onNoPreroll=function(){this.player.ads.debug("Skipping prerolls due to nopreroll event (BeforePreroll)"),this.shouldResumeToContent=!0},I.skipLinearAdMode=function(){var N=this.player;N.trigger("adskip"),N.ads.debug("skipLinearAdMode (BeforePreroll)"),this.shouldResumeToContent=!0},I.onContentChanged=function(){this.init(this.player)},ee}(Fe.getState("ContentState"));Fe.registerState("BeforePreroll",Fr);var ki=Fe.getState("AdState");Fe.registerState("Midroll",function(K){function ee(){return K.apply(this,arguments)||this}Ze(ee,K),ee._getName=function(){return"Midroll"};var I=ee.prototype;return I.init=function(N){N.ads.adType="midroll",Mr_start(N),N.addClass("vjs-ad-loading")},I.onAdStarted=function(N){N.removeClass("vjs-ad-loading")},I.endLinearAdMode=function(){var N=this.player;this.inAdBreak()&&(this.contentResuming=!0,N.addClass("vjs-ad-content-resuming"),N.removeClass("vjs-ad-loading"),Mr_end(N))},I.onAdsError=function(N){this.inAdBreak()&&N.ads.endLinearAdMode()},I.cleanup=function(N){N.removeClass("vjs-ad-loading"),N.removeClass("vjs-ad-content-resuming")},ee}(ki));var gr=function(K){function ee(){return K.apply(this,arguments)||this}Ze(ee,K),ee._getName=function(){return"Postroll"};var I=ee.prototype;return I.init=function(N){if(this.waitingForAdBreak=!0,N.ads._contentEnding=!0,N.ads.nopostroll_){this.resumeContent(N);var Ee=Fe.getState("AdsDone");this.transitionTo(Ee)}else{N.addClass("vjs-ad-loading");var J=N.ads.settings.timeout;"number"==typeof N.ads.settings.postrollTimeout&&(J=N.ads.settings.postrollTimeout),this._postrollTimeout=N.setTimeout(function(){N.trigger("adtimeout")},J)}},I.startLinearAdMode=function(){var N=this.player;N.ads.inAdBreak()||this.isContentResuming()?ce.default.log.warn("Unexpected startLinearAdMode invocation (Postroll)"):(N.ads.adType="postroll",N.clearTimeout(this._postrollTimeout),this.waitingForAdBreak=!1,Mr_start(N))},I.onAdStarted=function(N){N.removeClass("vjs-ad-loading")},I.endLinearAdMode=function(){var N=this,J=this.player,Ee=Fe.getState("AdsDone");this.inAdBreak()&&(J.removeClass("vjs-ad-loading"),this.resumeContent(J),Mr_end(J,function(){N.transitionTo(Ee)}))},I.skipLinearAdMode=function(){var N=this.player;N.ads.inAdBreak()||this.isContentResuming()?ce.default.log.warn("Unexpected skipLinearAdMode invocation"):(N.ads.debug("Postroll abort (skipLinearAdMode)"),N.trigger("adskip"),this.abort(N))},I.onAdTimeout=function(N){N.ads.debug("Postroll abort (adtimeout)"),this.abort(N)},I.onAdsError=function(N){N.ads.debug("Postroll abort (adserror)"),N.ads.inAdBreak()?N.ads.endLinearAdMode():this.abort(N)},I.onContentChanged=function(N){if(this.isContentResuming()){var J=Fe.getState("BeforePreroll");this.transitionTo(J)}else if(!this.inAdBreak()){var Ee=Fe.getState("Preroll");this.transitionTo(Ee)}},I.onNoPostroll=function(N){this.isContentResuming()||this.inAdBreak()?ce.default.log.warn("Unexpected nopostroll event (Postroll)"):this.abort(N)},I.resumeContent=function(N){this.contentResuming=!0,N.addClass("vjs-ad-content-resuming")},I.abort=function(N){var J=Fe.getState("AdsDone");this.resumeContent(N),N.removeClass("vjs-ad-loading"),this.transitionTo(J)},I.cleanup=function(N){N.removeClass("vjs-ad-content-resuming"),N.clearTimeout(this._postrollTimeout),N.ads._contentEnding=!1},ee}(Fe.getState("AdState"));Fe.registerState("Postroll",gr);var zn=function(K){function ee(){return K.apply(this,arguments)||this}Ze(ee,K),ee._getName=function(){return"ContentPlayback"};var I=ee.prototype;return I.init=function(N){N.ads._shouldBlockPlay=!1}
2,I.onAdsReady=function(N){N.ads.debug("Received adsready event (ContentPlayback)"),N.ads.nopreroll_||(N.ads.debug("Triggered readyforpreroll event (ContentPlayback)"),N.trigger("readyforpreroll"))},I.onReadyForPostroll=function(N){var J=Fe.getState("Postroll");N.ads.debug("Received readyforpostroll event"),this.transitionTo(J)},I.startLinearAdMode=function(){var N=Fe.getState("Midroll");this.transitionTo(N)},ee}(Fe.getState("ContentState"));Fe.registerState("ContentPlayback",zn);var pi=function(K){function ee(){return K.apply(this,arguments)||this}Ze(ee,K),ee._getName=function(){return"StitchedContentPlayback"};var I=ee.prototype;return I.init=function(){this.player.ads._shouldBlockPlay=!1},I.onContentChanged=function(){this.player.ads.debug("Received contentchanged event ("+this.constructor._getName()+")")},I.startLinearAdMode=function(){var N=Fe.getState("StitchedAdRoll");this.transitionTo(N)},ee}(Fe.getState("ContentState"));Fe.registerState("StitchedContentPlayback",pi);var Ui=function(K){function ee(){return K.apply(this,arguments)||this}Ze(ee,K),ee._getName=function(){return"StitchedAdRoll"};var I=ee.prototype;return I.init=function(){this.waitingForAdBreak=!1,this.contentResuming=!1,this.player.ads.adType="stitched",Mr_start(this.player)},I.onPlaying=function(){},I.onContentResumed=function(){},I.onAdEnded=function(){this.endLinearAdMode(),this.player.trigger("ended")},I.endLinearAdMode=function(){var N=Fe.getState("StitchedContentPlayback");Mr_end(this.player),this.transitionTo(N)},ee}(Fe.getState("AdState"));Fe.registerState("StitchedAdRoll",Ui);var fa=it.isMiddlewareMediatorSupported,yt=ce.default.getTech("Html5").Events,ns={timeout:5e3,prerollTimeout:void 0,postrollTimeout:void 0,debug:!1,stitchedAds:!1,contentIsLive:void 0,liveCuePoints:!0,allowVjsAutoplay:ce.default.options.normalizeAutoplay||!1},jt=function(ee){var I=this,G=ce.default.mergeOptions(ns,ee),N=[];yt.concat(["firstplay","loadedalldata"]).forEach(function(Ue){-1===N.indexOf(Ue)&&N.push(Ue)}),I.on(N,sr),fa()||function X(K,ee){ee&&ce.default.log("Using cancelContentPlay to block content playback"),K.on("play",ke)}(I,G.debug),I.setTimeout(function(){!I.ads._hasThereBeenALoadStartDuringPlayerLife&&""!==I.src()&&ce.default.log.error("videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see http://videojs.github.io/videojs-contrib-ads/integrator/getting-started.html")},5e3),I.on("ended",function(){I.hasClass("vjs-has-started")||I.addClass("vjs-has-started")}),I.on("contenttimeupdate",function(){I.removeClass("vjs-waiting")}),I.on(["addurationchange","adcanplay"],function(){if(!I.ads.settings.stitchedAds&&!I.hasStarted()&&(!I.ads.snapshot||I.currentSrc()!==I.ads.snapshot.currentSrc)&&I.ads.inAdBreak()){var Ue=I.play();Ue&&Ue.catch&&Ue.catch(function(lt){ce.default.log.warn("Play promise rejected when playing ad",lt)})}}),I.on("nopreroll",function(){I.ads.debug("Received nopreroll event"),I.ads.nopreroll_=!0}),I.on("nopostroll",function(){I.ads.debug("Received nopostroll event"),I.ads.nopostroll_=!0}),I.on("playing",function(){I.ads._cancelledPlay=!1,I.ads._pausedOnContentupdate=!1}),I.on("play",function(){I.ads._playRequested=!0}),I.one("loadstart",function(){I.ads._hasThereBeenALoadStartDuringPlayerLife=!0}),I.on("loadeddata",function(){I.ads._hasThereBeenALoadedData=!0}),I.on("loadedmetadata",function(){I.ads._hasThereBeenALoadedMetaData=!0}),I.ads=function Xe(K){return{disableNextSnapshotRestore:!1,_contentEnding:!1,_contentHasEnded:!1,_hasThereBeenALoadStartDuringPlayerLife:!1,_hasThereBeenALoadedData:!1,_hasThereBeenALoadedMetaData:!1,_inLinearAdMode:!1,_shouldBlockPlay:!1,_playBlocked:!1,_playRequested:!1,adType:null,VERSION:"6.9.0",reset:function(){K.ads.disableNextSnapshotRestore=!1,K.ads._contentEnding=!1,K.ads._contentHasEnded=!1,K.ads.snapshot=null,K.ads.adType=null,K.ads._hasThereBeenALoadedData=!1,K.ads._hasThereBeenALoadedMetaData=!1,K.ads._cancelledPlay=!1,K.ads._shouldBlockPlay=!1,K.ads._playBlocked=!1,K.ads.nopreroll_=!1,K.ads.nopostroll_=!1,K.ads._playRequested=!1},startLinearAdMode:function(){K.ads._state.startLinearAdMode()},endLinearAdMode:function(){K.ads._state.endLinearAdMode()},skipLinearAdMode:function(){K.ads._state.skipLinearAdMode()},stitchedAds:function(I){return void 0!==I&&(ce.default.log.warn("Using player.ads.stitchedAds() as a setter is deprecated, it should be set as an option upon initialization of contrib-ads."),this.settings.stitchedAds=!!I),this.settings.stitchedAds},videoElementRecycled:function(){if(K.ads.shouldPlayContentBehindAd(K))return!1;if(!this.snapshot)throw new Error("You cannot use videoElementRecycled while there is no snapshot.");var I=K.tech_.src()!==this.snapshot.src,G=K.currentSrc()!==this.snapshot.currentSrc;return I||G},isLive:function(I){return void 0===I&&(I=K),"boolean"==typeof I.ads.settings.contentIsLive?I.ads.settings.contentIsLive:I.duration()===1/0||"8"===ce.default.browser.IOS_VERSION&&0===I.duration()},shouldPlayContentBehindAd:function(I){if(void 0===I&&(I=K),I)return!!I.ads.settings.liveCuePoints&&!ce.default.browser.IS_IOS&&!ce.default.browser.IS_ANDROID&&I.duration()===1/0;throw new Error("shouldPlayContentBehindAd requires a player as a param")},shouldTakeSnapshots:function(I){return void 0===I&&(I=K),!this.shouldPlayContentBehindAd(I)&&!this.stitchedAds()},isInAdMode:function(){return this._state.isAdState()},isWaitingForAdBreak:function(){return this._state.isWaitingForAdBreak()},isContentResuming:function(){return this._state.isContentResuming()},isAdPlaying:function(){return this._state.inAdBreak()},inAdBreak:function(){return this._state.inAdBreak()},removeNativePoster:function(){var I=K.$(".vjs-tech");I&&I.removeAttribute("poster")},debug:function(){if(this.settings.debug){for(var I=arguments.length,G=new Array(I),N=0;N<I;N++)G[N]=arguments[N];1===G.length&&"string"==typeof G[0]?ce.default.log("ADS: "+G[0]):ce.default.log.apply(ce.default,["ADS:"].concat(G))}}}}(I),I.ads.settings=G,G.stitchedAds=!!G.stitchedAds,I.ads._state=G.stitchedAds?new(Fe.getState("StitchedContentPlayback"))(I):new(Fe.getState("BeforePreroll"))(I),I.ads._state.init(I),I.ads.cueTextTracks=qt,I.ads.adMacroReplacement=er.bind(I),function rr(K){K.ads.contentSrc=K.currentSrc(),K.ads._seenInitialLoadstart=!1,K.on("loadstart",function(){if(!K.ads.inAdBreak()){var G=K.currentSrc();G!==K.ads.contentSrc&&(K.ads._seenInitialLoadstart&&K.trigger({type:"contentchanged"}),K.trigger({type:"contentupdate",oldValue:K.ads.contentSrc,newValue:G}),K.ads.contentSrc=G),K.ads._seenInitialLoadstart=!0}})}(I),I.on("contentchanged",I.ads.reset);var Ee=function(){var lt=I.textTracks();if(!I.ads.shouldPlayContentBehindAd(I)&&I.ads.inAdBreak()&&I.tech_.featuresNativeTextTracks&&ce.default.browser.IS_IOS&&!Array.isArray(I.textTracks()))for(var ot=0;ot<lt.length;ot++){var xt=lt[ot];"showing"===xt.mode&&(xt.mode="disabled")}};I.ready(function(){I.textTracks().addEventListener("change",Ee)}),I.on(["play","playing","ended","adsready","adscanceled","adskip","adserror","adtimeout","adended","ads-ad-started","contentchanged","dispose","contentresumed","readyforpostroll","nopreroll","nopostroll"],function(Ue){I.ads._state.handleEvent(Ue.type)}),I.on("dispose",function(){I.ads.reset(),I.textTracks().removeEventListener("change",Ee)}),Dt(),I.ads.listenToTcf=Dt};jt.VERSION="6.9.0",function Ie(K){!function(){if(ce.default.getPlugin)return Boolean(ce.default.getPlugin("ads"));var ee=ce.default.getComponent("Player");return Boolean(ee&&ee.prototype.ads)}()&&((ce.default.registerPlugin||ce.default.plugin)("ads",K),O()&&!ce.default.usingContribAdsMiddleware_&&(ce.default.use("*",ue),ce.default.usingContribAdsMiddleware_=!0,ce.default.log.debug("Play middleware has been registered with videojs")))}(jt);var $n=Le(6483),Xn=Le.n($n);
3/*! @name videojs-contrib-quality-levels @version 2.2.1 @license Apache-2.0 */function hn(K){if(void 0===K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K}var Qn=function(ee){var I=this;return I.id=ee.id,I.label=I.id,I.width=ee.width,I.height=ee.height,I.bitrate=ee.bandwidth,I.frameRate=ee.frameRate,I.enabled_=ee.enabled,Object.defineProperty(I,"enabled",{get:function(){return I.enabled_()},set:function(N){I.enabled_(N)}}),I},vn=function(K){function ee(){var G,N=hn(hn(G=K.call(this)||this));return N.levels_=[],N.selectedIndex_=-1,Object.defineProperty(N,"selectedIndex",{get:function(){return N.selectedIndex_}}),Object.defineProperty(N,"length",{get:function(){return N.levels_.length}}),N||hn(G)}!function Xt(K,ee){K.prototype=Object.create(ee.prototype),K.prototype.constructor=K,K.__proto__=ee}(ee,K);var I=ee.prototype;return I.addQualityLevel=function(N){var J=this.getQualityLevelById(N.id);if(J)return J;var Ee=this.levels_.length;return J=new Qn(N),""+Ee in this||Object.defineProperty(this,Ee,{get:function(){return this.levels_[Ee]}}),this.levels_.push(J),this.trigger({qualityLevel:J,type:"addqualitylevel"}),J},I.removeQualityLevel=function(N){for(var J=null,Ee=0,Ue=this.length;Ee<Ue;Ee++)if(this[Ee]===N){J=this.levels_.splice(Ee,1)[0],this.selectedIndex_===Ee?this.selectedIndex_=-1:this.selectedIndex_>Ee&&this.selectedIndex_--;break}
3return J&&this.trigger({qualityLevel:N,type:"removequalitylevel"}),J},I.getQualityLevelById=function(N){for(var J=0,Ee=this.length;J<Ee;J++){var Ue=this[J];if(Ue.id===N)return Ue}return null},I.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},ee}(ce.default.EventTarget);for(var Mn in vn.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},vn.prototype.allowedEvents_)vn.prototype["on"+Mn]=null;var Vi=function(ee){return function(ee,I){var G=ee.qualityLevels,N=new vn;return ee.on("dispose",function Ee(){N.dispose(),ee.qualityLevels=G,ee.off("dispose",Ee)}),ee.qualityLevels=function(){return N},ee.qualityLevels.VERSION="2.2.1",N}(this,ce.default.mergeOptions({},ee))};(ce.default.registerPlugin||ce.default.plugin)("qualityLevels",Vi),Vi.VERSION="2.2.1";var Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(K){return typeof K}:function(K){return K&&"function"==typeof Symbol&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},ea=(function(){function K(I){this.value=I}function ee(I){var G,N;function Ee(lt,ot){try{var xt=I[lt](ot),zt=xt.value;zt instanceof K?Promise.resolve(zt.value).then(function(It){Ee("next",It)},function(It){Ee("throw",It)}):Ue(xt.done?"return":"normal",xt.value)}catch(It){Ue("throw",It)}}function Ue(lt,ot){switch(lt){case"return":G.resolve({value:ot,done:!0});break;case"throw":G.reject(ot);break;default:G.resolve({value:ot,done:!1})}(G=G.next)?Ee(G.key,G.arg):N=null}this._invoke=function J(lt,ot){return new Promise(function(xt,zt){var It={key:lt,arg:ot,resolve:xt,reject:zt,next:null};N?N=N.next=It:(G=N=It,Ee(lt,ot))})},"function"!=typeof I.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(ee.prototype[Symbol.asyncIterator]=function(){return this}),ee.prototype.next=function(I){return this._invoke("next",I)},ee.prototype.throw=function(I){return this._invoke("throw",I)},ee.prototype.return=function(I){return this._invoke("return",I)}}(),function(K,ee){if(!(K instanceof ee))throw new TypeError("Cannot call a class as a function")}),zr=function(K,ee){if("function"!=typeof ee&&null!==ee)throw new TypeError("Super expression must either be null or a function, not "+typeof ee);K.prototype=Object.create(ee&&ee.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),ee&&(Object.setPrototypeOf?Object.setPrototypeOf(K,ee):K.__proto__=ee)},ai=function(K,ee){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!ee||"object"!=typeof ee&&"function"!=typeof ee?K:ee},ca=ce.default.getComponent("MenuButton"),Ri=ce.default.getComponent("Menu"),Ra=ce.default.getComponent("Component"),ta=ce.default.dom;function ra(K){return"string"!=typeof K?K:K.charAt(0).toUpperCase()+K.slice(1)}var Il=function(K){function ee(I){return ea(this,ee),ai(this,K.call(this,I,{title:I.localize("Quality"),name:"QualityButton"}))}return zr(ee,K),ee.prototype.createItems=function(){return[]},ee.prototype.createMenu=function(){var G=new Ri(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var N=ta.createEl("li",{className:"vjs-menu-title",innerHTML:ra(this.options_.title),tabIndex:-1}),J=new Ra(this.player_,{el:N});this.hideThreshold_+=1,G.addItem(J)}if(this.items=this.createItems(),this.items)for(var Ee=0;Ee<this.items.length;Ee++)G.addItem(this.items[Ee]);return G},ee}(ca),Q=function(K){function ee(I,G,N,J){ea(this,ee);var Ee=ai(this,K.call(this,I,{label:G.label,selectable:!0,selected:G.selected||!1}));return Ee.item=G,Ee.qualityButton=N,Ee.plugin=J,Ee}return zr(ee,K),ee.prototype.handleClick=function(){for(var G=0;G<this.qualityButton.items.length;++G)this.qualityButton.items[G].selected(!1);this.plugin.setQuality(this.item.value),this.selected(!0)},ee}(ce.default.getComponent("MenuItem")),ve={},Me=ce.default.registerPlugin||ce.default.plugin,ut=function(){function K(ee,I){ea(this,K),this.player=ee,this.config=I,this.player.qualityLevels&&this.getHls()&&(this.createQualityButton(),this.bindPlayerEvents())}return K.prototype.getHls=function(){return this.player.tech({IWillNotUseThisInPlugins:!0}).hls},K.prototype.bindPlayerEvents=function(){this.player.qualityLevels().on("addqualitylevel",this.onAddQualityLevel.bind(this))},K.prototype.createQualityButton=function(){var I=this.player;this._qualityButton=new Il(I);var G=I.controlBar.children().length-2,N=I.controlBar.addChild(this._qualityButton,{componentClass:"qualitySelector"},this.config.placementIndex||G);if(N.addClass("vjs-quality-selector"),this.config.displayCurrentQuality)this.setButtonInnerText("auto");else{var J=" "+(this.config.vjsIconClass||"vjs-icon-hd");N.menuButton_.$(".vjs-icon-placeholder").className+=J}N.removeClass("vjs-hidden")},K.prototype.setButtonInnerText=function(I){this._qualityButton.menuButton_.$(".vjs-icon-placeholder").innerHTML=I},K.prototype.getQualityMenuItem=function(I){return new Q(this.player,I,this._qualityButton,this)},K.prototype.onAddQualityLevel=function(){for(var I=this,G=this.player,J=G.qualityLevels().levels_||[],Ee=[],Ue=function(xt){if(!Ee.filter(function(It){return It.item&&It.item.value===J[xt].height}).length){var zt=I.getQualityMenuItem.call(I,{label:J[xt].height+"p",value:J[xt].height});Ee.push(zt)}},lt=0;lt<J.length;++lt)Ue(lt);Ee.sort(function(ot,xt){return"object"!==(typeof ot>"u"?"undefined":Fn(ot))||"object"!==(typeof xt>"u"?"undefined":Fn(xt))||ot.item.value<xt.item.value?-1:ot.item.value>xt.item.value?1:0}),Ee.push(this.getQualityMenuItem.call(this,{label:G.localize("Auto"),value:"auto",selected:!0})),this._qualityButton&&(this._qualityButton.createItems=function(){return Ee},this._qualityButton.update())},K.prototype.setQuality=function(I){var G=this.player.qualityLevels();this._currentQuality=I,this.config.displayCurrentQuality&&this.setButtonInnerText("auto"===I?I:I+"p");for(var N=0;N<G.length;++N){var J=G[N];J.enabled=J.height===I||"auto"===I}this._qualityButton.unpressButton()},K.prototype.getCurrentQuality=function(){return this._currentQuality||"auto"},K}(),dr=function(ee){var I=this;this.ready(function(){!function(ee,I){ee.addClass("vjs-hls-quality-selector"),ee.hlsQualitySelector=new ut(ee,I)}(I,ce.default.mergeOptions(ve,ee))})};Me("hlsQualitySelector",dr),dr.VERSION="1.1.4",Le(6109);var Jt=Le(4113),Xr=Le(7423);const bi=(0,Xr.fo)("ExoPlayer");var nn=Le(5548),pn=Le(3556),Hi=Le(9808),Oi=Le(9989),Nn=Le(125),Tr=Le(7087),Bn=Le(7918),an=Le(723),ss=Le(1218),Js=Le(3925),eo=Le(9114),uu=Le(6895),Ll=Le(3951),lu=Le(3905),du=Le(8960),Dl=Le(155);const fu=["targetVideo"],Pl=function(){return[0,.65]},kl=function(K){return{threshold:K,partial:!0}};let cu=(()=>{class K{constructor(I,G,N,J,Ee,Ue,lt){this._ngZone=I,this._adsService=G,this._tvHttp=N,this._analyticsService=J,this._videosHttp=Ee,this._cwHttp=Ue,this._recommendationsHttp=lt,this.channel=void 0,this.token=void 0,this.startTime=0,this.nextEpisode=null,this.nextEpisodeClicked=new A.vpe,this.nextEpisodeShown=!1,this.nextEpisodeBtnEl=null,this._navigatingToNext=!1,this.activeWatchTime=0,this.lastUpdateTime=0,this.isAlreadyViewed=!1,this._reloadTimer=null,this._videoContainer=null,this.freezeCounter=0,this.manifestRetryCount=0,this.lastSaved=0,this.isSaving=!1,this.hasRestored=!1,this.isLiveContent=!1,this.isRestarting=!1,this.isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),this.vhsTokenRetries=0,this.VHS_TOKEN_MAX_RETRIES=10}ngAfterViewInit(){return(0,Re.mG)(this,void 0,void 0,function*(){this._videoContainer=this.target.nativeElement.parentElement})}ngOnChanges(I){(I.url||I.nid||I.channel||I.token||I.options)&&(clearTimeout(this._reloadTimer),this._reloadTimer=setTimeout(()=>{this.stopTracking(),!this.player||!document.fullscreenElement||!I.url&&!I.nid||I.channel||I.options||I.token?(this.closePlayer(),this.loadPlayer(this.url)):this._updateSourceInPlace()},0))}set title(I){this.name=I}ngOnDestroy(){this.saveProgress(),document.removeEventListener("visibilitychange",this.handleVisibilityChange),this.stopTracking(),this.closePlayer()}ionViewWillLeave(){this.stopTracking(),this.closePlayer(),this.saveProgress()}loadPlayer(I){return(0,Re.mG)(this,void 0,void 0,function*(){if(this.player){const Ee=this.player;this.player=null;try{Ee.pause(),Ee.src("")}catch(Ue){}setTimeout(()=>{try{Ee.dispose()}catch(Ue){}},0)}yield this.fetchInitialProgress();const G="android"===Xr.dV.getPlatform(),N=Object.assign(Object.assign({},this.options),{autoplay:!0,muted:!G,html5:{vhs:{enableLowInitialPlaylist:!0,overrideNative:!this.isSafari,maxPlaylistRetries:5,bandwidth:5e5,experimentalBufferBasedABR:!0},nativeAudioTracks:this.isSafari,nativeVideoTracks:this.isSafari}}),J=this.target.nativeElement;this._videoContainer&&!this._videoContainer.contains(J)&&this._videoContainer.appendChild(J),this.player=(0,ce.default)(J,N),yield this.setAds(),this.addVideo(I),this.isLiveContent=this.detectIfLive(this.url),this.player.ready(()=>{this.player.hlsQualitySelector({displayCurrentQuality:!1});const Ee=()=>{if(!this.player.isFullscreen()&&!this.channel){const Ue=this.player.requestFullscreen();Ue&&Ue.catch&&Ue.catch(()=>{})}};try{Ee()}catch(Ue){this.channel||this.player.one("touchstart",()=>Ee())}this.isLiveContent||this.restorePlaybackPosition(),this.isLiveContent&&(this.startLiveHealthCheck(),this.setupVHSLiveHooks(),this.player.one("canplay",()=>{var Ue;try{null===(Ue=this.player.liveTracker)||void 0===Ue||Ue.seekToLiveEdge()}catch(lt){}})),this.player.play().catch(()=>{console.warn("Autoplay blocked")}),setTimeout(()=>{this.forceAutoUI()},500),this.setupPip(),this.setupVolumeAutoHide()}),this.lastSaved=0,this.setAvailableQualities(),this.setEvents()})}detectIfLive(I){if(this.channel)return!0;
3if(!I)return!1;const G=I.toLowerCase();return["live","stream","broadcast",".m3u8?live","/live/"].some(J=>G.includes(J))}fetchInitialProgress(){return(0,Re.mG)(this,void 0,void 0,function*(){if(this.nid)try{const I=this._cwHttp.getContinueWatching(),N=(I?yield(0,lu.z)(I):[]).find(J=>String(J.videoId)===String(this.nid));N&&N.currentTime>5&&(this.startTime=N.currentTime)}catch(I){console.warn("Error fetching continue watching",I)}})}restorePlaybackPosition(){!this.startTime||this.isLiveContent||(this.hasRestored=!1,this.player.on("playing",()=>{if(this.player.hasClass("vjs-ad-playing")||this.hasRestored)return;const I=this.player.duration();!I||isNaN(I)||I===1/0||(this.player.pause(),this.player.currentTime(this.startTime),this.hasRestored=!0,this.player.play().catch(()=>{}))}))}startLiveHealthCheck(){if(!this.isLiveContent)return;const I=this.player.el().querySelector("video");if(!I)return void console.warn("LIVE CHECK: video element not found");let G=-1;this.liveHealthInterval=setInterval(()=>{try{if(this.player.paused()||this.player.hasClass("vjs-ad-playing"))return;const N=I.currentTime;I.paused||this.player.paused()||N!==G||-1===G?this.freezeCounter=0:this.freezeCounter++,G=N,this.freezeCounter>=4&&(console.warn("LIVE FRAME FREEZE DETECTED"),this.freezeCounter=0,this.restartLiveStream())}catch(N){console.error("LIVE CHECK ERROR",N)}},4e3)}restartLiveStream(){var I;if(!this.isLiveContent||this.isRestarting)return;if(this.isRestarting=!0,console.warn("FORCING LIVE RECOVERY"),this.isSafari){const J=this.player.el().querySelector("video");if((null===(I=null==J?void 0:J.seekable)||void 0===I?void 0:I.length)>0){const Ee=J.seekable.end(0),Ue=Math.max(J.seekable.start(0),Ee-12);J.currentTime=Ue}else this.player.src({src:this.liveSource,type:"application/x-mpegURL"}),this.player.load();return this.player.play().catch(Ee=>{"AbortError"!==(null==Ee?void 0:Ee.name)&&console.warn("play() after safari recovery failed",Ee)}),void setTimeout(()=>{this.isRestarting=!1},2e4)}const G=this.liveSource.includes("?")?"&":"?",N=this.liveSource+G+"t="+Date.now();this.player.pause(),setTimeout(()=>{this.player.error()&&this.player.error(null),this.player.src({src:N,type:"application/x-mpegURL"}),this.player.load(),this.player.play().catch(J=>{"AbortError"!==(null==J?void 0:J.name)&&console.warn("play() after recovery failed",J)}),setTimeout(()=>{this.isRestarting=!1},2e4)},500)}setVHSToken(I=!1){const N=this.player.tech({IWillNotUseThisInPlugins:!0}).vhs;return N&&N.xhr?(I&&(N.xhr.beforeRequest&&delete N.xhr.beforeRequest,N.xhr._adInterceptor&&delete N.xhr._adInterceptor,N.xhr._prerollConfigured&&delete N.xhr._prerollConfigured),N.xhr.beforeRequest=J=>{if(this.token&&!J.uri.includes("token=")){const Ee=J.uri.includes("?")?"&":"?";J.uri=`${J.uri}${Ee}token=${encodeURIComponent(this.token)}`}return J.uri.includes(".m3u8")&&(J.timeout=5e3),J},!0):(console.warn("VHS no est\xe1 disponible a\xfan en el tech"),!1)}interceptorSetVHSToken(I){if(!this.isSafari)if(this.setVHSToken(I))this.vhsTokenRetries=0;else{if(this.vhsTokenRetries>=this.VHS_TOKEN_MAX_RETRIES)return console.warn("VHS token interceptor: max retries reached, giving up"),void(this.vhsTokenRetries=0);this.vhsTokenRetries++,setTimeout(()=>{this.interceptorSetVHSToken(!0)},1e3)}}setupVHSLiveHooks(){if(this.isSafari||!this.isLiveContent)return;const I=this.player.tech({IWillNotUseThisInPlugins:!0}),G=null==I?void 0:I.vhs;if(null==G||!G.xhr)return;const N=G.xhr.beforeRequest;G.xhr.beforeRequest=J=>{var Ee;const Ue=N?N(J):J;return!(null===(Ee=Ue.uri)||void 0===Ee)&&Ee.includes(".m3u8")&&!Ue.timeout&&(Ue.timeout=5e3),Ue}}setAvailableQualities(){this.player.on("loadedmetadata",()=>{const I=this.player.tech({IWillNotUseThisInPlugins:!0});null!=I&&I.vhs&&"function"==typeof I.vhs.representations?(I.vhs.autoLevelEnabled=!0,I.vhs.representations().forEach(N=>N.enabled(!0)),this.quality="auto"):this.isSafari||console.warn("VHS a\xfan no est\xe1 listo para representaciones")})}setRequestParam(){this.player.on("loadstart",()=>{this.interceptorSetVHSToken(!1)})}setAds(){return(0,Re.mG)(this,void 0,void 0,function*(){this.ads=yield this._adsService.findAds(),this.ads.src&&(this.player.preroll({src:this.ads.src,lang:{skip:"Saltar Anuncio","skip in":"Saltar Anuncio en "}}),Oi.S.configurations.isCanal27&&this.player.one("readyforpreroll",()=>{const I=this.player.preroll;null!=I&&I.skipButton&&(this.player.off("adtimeupdate",I.timeupdate),I.timeupdate=()=>{const G=this.player.duration();if(!G||!isFinite(G)||G<=0)return;this.player.loadingSpinner.hide();
3const N=Math.max(G-2,1),J=Math.ceil(N-this.player.currentTime());J>0?I.skipButton.innerHTML="Iniciar contenido en "+J+"s":I.skipButton.classList.contains("enabled")||(I.skipButton.className+=" enabled",I.skipButton.innerHTML="Iniciar contenido")},this.player.on("adtimeupdate",I.timeupdate))})),this.player.one("adend",()=>{setTimeout(()=>{this.interceptorSetVHSToken(!0)},200)})})}addVideo(I){this.url=this.token?`${I}?token=${encodeURIComponent(this.token)}`:I,this.token&&this.setRequestParam(),this.liveSource=this.url,null!=I&&I.includes("https://youtu.be")||null!=I&&I.includes("https://www.youtube.com/")?this.player.src({src:this.url,type:"video/youtube"}):this.player.src({src:this.url,type:"application/x-mpegURL"})}closePlayer(){if(clearInterval(this.liveHealthInterval),this.liveHealthInterval=null,clearTimeout(this.stalledTimer),this.isRestarting=!1,this.freezeCounter=0,this.vhsTokenRetries=0,this.nextEpisodeShown=!1,this._navigatingToNext=!1,this.nextEpisodeBtnEl&&(this.nextEpisodeBtnEl.remove(),this.nextEpisodeBtnEl=null),this.player){const I=this.player;this.player=null;try{I.pause(),I.src("")}catch(G){}try{I.dispose()}catch(G){}}}saveProgress(){var I,G,N;if(this.isSaving)return;const J=null===(I=this.player)||void 0===I?void 0:I.currentTime(),Ee=null===(G=this.player)||void 0===G?void 0:G.duration();if(J&&Ee&&this.nid&&!(J<5)){if(this.isSaving=!0,J/Ee>=.95)return this._cwHttp.removeProgress(String(this.nid)).subscribe({complete:()=>this.isSaving=!1,error:()=>this.isSaving=!1}),void(null===(N=this._recommendationsHttp.markAsWatched(String(this.nid)))||void 0===N||N.subscribe());this._cwHttp.updateProgress(String(this.nid),J,Ee).subscribe({complete:()=>this.isSaving=!1,error:()=>this.isSaving=!1})}}setEvents(){return(0,Re.mG)(this,void 0,void 0,function*(){let I,G;if(document.removeEventListener("visibilitychange",this.handleVisibilityChange),this.nid){let ot=yield this._videosHttp.getVideoByTid(this.nid);I=ot?Object.assign(Object.assign({},ot),{title:this.name}):void 0}else if(this.channel)try{G=yield this._tvHttp.getChannel(this.channel)}catch(ot){}this.lastUpdateTime=this.player.currentTime(),this.startTracking(I,G),this._analyticsService.sendAnalyticsData(Jt.U.START_VIDEO.action,I,0,this.quality,G).finally(()=>{});const N=this.player.qualityLevels();N.on("change",()=>{var ot;const xt=this.player.tech({IWillNotUseThisInPlugins:!0});if(null!==(ot=null==xt?void 0:xt.vhs)&&void 0!==ot&&ot.autoLevelEnabled)this.quality="auto";else for(let zt=0;zt<N.length;zt++)N[zt].enabled&&(this.quality=`${N[zt].height}p`)}),this.player.on("playing",()=>{clearTimeout(this.stalledTimer),this.isRestarting=!1}),this.player.on("play",()=>{this.lastUpdateTime=this.player.currentTime(),this.startTracking(I,G);const ot=Object.assign({},Jt.U.RESUMED_VIDEO);ot.name=`${ot.name} ${this.name}`,this._analyticsService.sendAnalyticsData(Jt.U.RESUMED_VIDEO.action,I,this.player.currentTime(),this.quality,G).finally(()=>{})});const J=Object.assign({},Jt.U.PAUSED_VIDEO);J.name=`${J.name} ${this.name}`;const Ee=Object.assign({},Jt.U.FINISHED_VIDEO);Ee.name=`${Ee.name} ${this.name}`;const Ue=Object.assign({},Jt.U.FAILED_VIDEO);Ue.name=`${Ue.name} ${this.name}`,this.player.on("pause",()=>{this.stopTracking(),this.isLiveContent||this.saveProgress(),this._analyticsService.sendAnalyticsData(Jt.U.PAUSED_VIDEO.action,I,this.player.currentTime(),this.quality,G).finally(()=>{})}),this.player.on("ended",()=>(0,Re.mG)(this,void 0,void 0,function*(){this.isLiveContent?(console.warn("Live ended unexpectedly."),setTimeout(()=>{this.isRestarting=!1,this.restartLiveStream()},this.isRestarting?9e3:3e3)):(this.saveProgress(),this._analyticsService.sendAnalyticsData(Jt.U.VIEW_VIDEO.action,I,this.player.currentTime(),this.quality,G).finally(()=>{}),this._analyticsService.sendAnalyticsData(Jt.U.FINISHED_VIDEO.action,I,this.player.currentTime(),this.quality,G).finally(()=>{}),this.nextEpisode&&this._ngZone.run(()=>this.goToNextEpisode()))})),this.player.on("error",()=>(0,Re.mG)(this,void 0,void 0,function*(){var ot;const xt=this.player.error();xt&&(console.error("Video error:",xt),this.isLiveContent?(console.warn("Live error detected (code="+xt.code+"). Scheduling recovery\u2026"),setTimeout(()=>{this.isRestarting=!1,this.restartLiveStream()},this.isRestarting?9e3:3e3)):(4===xt.code||2===xt.code||/HLS manifests|504/.test(null!==(ot=xt.message)&&void 0!==ot?ot:""))&&this.manifestRetryCount<3&&(this.manifestRetryCount++,console.warn("HLS load failed, retrying in 3s\u2026 (attempt "+this.manifestRetryCount+")"),setTimeout(()=>
3{const zt=this.player.currentSource();this.player.src(zt),this.player.load(),this.player.play()},3e3)),this._analyticsService.sendAnalyticsData(Jt.U.FAILED_VIDEO.action,I,this.player.currentTime(),this.quality,G).finally(()=>{}))})),this.player.on("adstart",()=>{const ot=Object.assign({},Jt.U.PREROLL_START);ot.name=`${ot.name} ${this.ads.title}`,this._analyticsService.sendAnalyticsData(Jt.U.PREROLL_START.action,I,this.player.currentTime(),this.quality,G).finally(()=>{})}),this.player.one("adend",()=>{const ot=Object.assign({},Jt.U.PREROLL_END);ot.name=`${ot.name} ${this.ads.title}`;const xt=Object.assign({},Jt.U.START_VIDEO);xt.name=`${xt.name} ${this.name}`,this._analyticsService.sendAnalyticsData(Jt.U.PREROLL_END.action,I,this.player.currentTime(),this.quality,G).finally(()=>{}),this._analyticsService.sendAnalyticsData(Jt.U.START_VIDEO.action,I,this.player.currentTime(),this.quality,G).finally(()=>{})}),this.player.on("seeked",()=>{this.lastUpdateTime=this.player.currentTime(),this.saveProgress()}),this.player.on("stalled",()=>{if(!this.isLiveContent||this.isRestarting)return;const ot=this.player.currentTime();clearTimeout(this.stalledTimer),this.stalledTimer=setTimeout(()=>{this.isRestarting||this.player.paused()||this.player.currentTime()>ot||(console.warn("Player stalled."),this.restartLiveStream())},5e3)}),this.handleVisibilityChange=()=>{!document.hidden&&this.isLiveContent&&this.player.paused()&&this.player.play().catch(()=>{}),document.hidden&&this.saveProgress()},document.addEventListener("visibilitychange",this.handleVisibilityChange),this.player.on("timeupdate",()=>{const ot=this.player.currentTime();if(!(ot<5)&&(ot-this.lastSaved>=60&&(this.lastSaved=ot,this.saveProgress()),this.nextEpisode&&!this.nextEpisodeShown&&!this.isLiveContent)){const xt=this.player.duration();xt&&isFinite(xt)&&xt-ot<=30&&(this.nextEpisodeShown=!0,this.showNextEpisodeButton())}});const lt=()=>{this.isLiveContent&&(console.warn("Network restored, restarting live stream."),this.isRestarting=!1,this.restartLiveStream())};window.addEventListener("online",lt),this.player.one("dispose",()=>window.removeEventListener("online",lt))})}linkToAd(){this.player.hasClass("vjs-ad-playing")&&this.ads.link&&(Ll.A.open({url:this.ads.link}),this.player.pause())}stopTracking(){clearInterval(this.watchInterval)}startTracking(I,G){this.watchInterval=window.setInterval(()=>{try{if(this.player&&this.player.currentTime()){const N=this.player.currentTime();N>this.lastUpdateTime&&(this.activeWatchTime+=N-this.lastUpdateTime,this.lastUpdateTime=N),!this.isAlreadyViewed&&this.activeWatchTime>=300&&(this.isAlreadyViewed=!0,clearInterval(this.watchInterval),this._analyticsService.sendAnalyticsData(Jt.U.VIEW_VIDEO.action,I,this.player.currentTime(),this.quality,G).finally(()=>{}))}}catch(N){}},1e3)}setupPip(){var I,G;const N=this.player.controlBar,J=null===(I=null==N?void 0:N.getChild)||void 0===I?void 0:I.call(N,"PictureInPictureToggle");if(!J)return;if(J.disable=()=>{},J.enable(),"android"===Xr.dV.getPlatform())return void(J.handleClick=()=>{bi.enterPip().catch(Ue=>console.warn("PiP failed:",Ue))});const Ee=null===(G=this.player.el())||void 0===G?void 0:G.querySelector("video");!Ee||"function"!=typeof Ee.requestPictureInPicture||(J.handleClick=()=>(0,Re.mG)(this,void 0,void 0,function*(){try{document.pictureInPictureElement?yield document.exitPictureInPicture():yield Ee.requestPictureInPicture()}catch(Ue){console.warn("PiP request failed:",Ue)}}))}forceAutoUI(){document.querySelectorAll(".vjs-menu-item").forEach(N=>{N.classList.remove("vjs-selected")});const G=document.querySelector('.vjs-menu-item[aria-label="Auto"]');G&&G.classList.add("vjs-selected")}showNextEpisodeButton(){var I;if(null!==(I=this.player)&&void 0!==I&&I.el()){if(!this.nextEpisodeBtnEl){const G=document.createElement("div");G.className="next-episode-skip-btn",G.textContent="Siguiente episodio \u203a",G.addEventListener("click",()=>this._ngZone.run(()=>this.goToNextEpisode())),this.player.el().appendChild(G),this.nextEpisodeBtnEl=G}this.nextEpisodeBtnEl.style.display="block"}}goToNextEpisode(){if(this._navigatingToNext||!this.nextEpisode)return;this.nextEpisodeBtnEl&&(this.nextEpisodeBtnEl.style.display="none");const I=this.nextEpisode;this._navigatingToNext=!0,this._ngZone.run(()=>
3this.nextEpisodeClicked.emit(I))}_updateSourceInPlace(){var I,G;this.nextEpisodeShown=!1,this._navigatingToNext=!1,this.hasRestored=!1,this.manifestRetryCount=0,this.nextEpisodeBtnEl&&(this.nextEpisodeBtnEl.remove(),this.nextEpisodeBtnEl=null),this.startTime=0,this.lastSaved=0,this.isLiveContent=this.detectIfLive(this.url);const N=this.url,J=(null==N?void 0:N.includes("youtu.be"))||(null==N?void 0:N.includes("youtube.com"));if(null!==(I=this.ads)&&void 0!==I&&I.src){const Ee=this.player.preroll;Ee&&(Ee.adDone=!1),Oi.S.configurations.isCanal27&&this.player.one("readyforpreroll",()=>{const Ue=this.player.preroll;null!=Ue&&Ue.skipButton&&(this.player.off("adtimeupdate",Ue.timeupdate),Ue.timeupdate=()=>{const lt=this.player.duration();if(!lt||!isFinite(lt)||lt<=0)return;this.player.loadingSpinner.hide();const ot=Math.max(lt-2,1),xt=Math.ceil(ot-this.player.currentTime());xt>0?Ue.skipButton.innerHTML="Iniciar contenido en "+xt+"s":Ue.skipButton.classList.contains("enabled")||(Ue.skipButton.className+=" enabled",Ue.skipButton.innerHTML="Iniciar contenido")},this.player.on("adtimeupdate",Ue.timeupdate))})}this.player.src({src:N,type:J?"video/youtube":"application/x-mpegURL"}),!(null===(G=this.ads)||void 0===G)&&G.src&&this.player.trigger("contentupdate"),this.player.play().catch(()=>{})}setupVolumeAutoHide(){const I=this.player.controlBar,G=null==I?void 0:I.volumePanel;if(!G)return;let N;const J=()=>{clearTimeout(N),N=setTimeout(()=>{try{G.unlockShowing()}catch(lt){}const Ue=G.el();Ue&&Ue.classList.remove("vjs-hover","vjs-slider-active")},2e3)},Ee=G.el();Ee&&(Ee.addEventListener("click",J),Ee.addEventListener("touchstart",J,{passive:!0}),Ee.addEventListener("touchend",J,{passive:!0}),Ee.addEventListener("mouseenter",()=>clearTimeout(N)),this.player.one("dispose",()=>clearTimeout(N)))}}return K.\u0275fac=function(I){return new(I||K)(A.Y36(A.R0b),A.Y36(Tr.F),A.Y36(Nn.L),A.Y36(an.y),A.Y36(Bn.W),A.Y36(Js.B),A.Y36(du.e))},K.\u0275cmp=A.Xpm({type:K,selectors:[["dt-videojs-player"]],viewQuery:function(I,G){if(1&I&&A.Gf(fu,7),2&I){let N;A.iGM(N=A.CRH())&&(G.target=N.first)}},inputs:{options:"options",url:"url",nid:"nid",channel:"channel",token:"token",startTime:"startTime",nextEpisode:"nextEpisode",title:"title"},outputs:{nextEpisodeClicked:"nextEpisodeClicked"},features:[A.TTD],decls:4,vars:4,consts:[["inViewport","",1,"o-player",3,"inViewportOptions"],[1,"o-player__video"],["controls","","playsinline","","webkit-playsinline","",1,"video-js","vjs-big-play-centered","mini-play",3,"touchend","click"],["targetVideo",""]],template:function(I,G){1&I&&(A.TgZ(0,"div",0)(1,"div",1)(2,"video",2,3),A.NdJ("touchend",function(){return G.linkToAd()})("click",function(){return G.linkToAd()}),A.qZA()()()),2&I&&A.Q6J("inViewportOptions",A.VKq(2,kl,A.DdM(1,Pl)))},dependencies:[Dl.wt],styles:[".vjs-menu-title{display:none!important}.next-episode-skip-btn{position:absolute;bottom:86px;right:0;background-color:rgba(0,0,0,.6);color:#fff;padding:14px 18px;font-size:14px;font-weight:400;cursor:pointer;z-index:10;border:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}\n"],encapsulation:2}),K})();const hu=["adVideoEl"],Rl=["adContainerEl"],os=["playerContainer"],wl=["androidInlineEl"];function us(K,ee){if(1&K){const I=A.EpF();A.TgZ(0,"dt-videojs-player",3),A.NdJ("nextEpisodeClicked",function(N){A.CHM(I);const J=A.oxw();return A.KtG(J.nextEpisodeClicked.emit(N))}),A.qZA()}if(2&K){const I=A.oxw();A.Q6J("title",I.name)("options",I.options)("url",I.url)("nid",I.nid)("channel",I.channel)("token",I.token)("nextEpisode",I.nextEpisode)}}function vu(K,ee){if(1&K){const I=A.EpF();A.TgZ(0,"button",8),A.NdJ("click",function(){A.CHM(I);const N=A.oxw(3);return A.KtG(N.onNextEpisodeOverlayConfirm())}),A._uU(1," Siguiente episodio \u203a "),A.qZA()}}function ls(K,ee){if(1&K&&(A.ynx(0),A.TgZ(1,"div",5,6),A.YNc(3,vu,2,0,"button",7),A.qZA(),A.BQk()),2&K){const I=A.oxw(2);A.xp6(3),A.Q6J("ngIf",I.nextEpisodeOverlayVisible&&I.nextEpisode)}}function pu(K,ee){if(1&K&&A.YNc(0,ls,4,1,"ng-container",4),2&K){const I=A.oxw(),G=A.MAs(4);A.Q6J("ngIf","ios"===I.platform)("ngIfElse",G)}}function gu(K,ee){1&K&&A._UZ(0,"div",18)}function wa(K,ee){if(1&K){const I=A.EpF();A.TgZ(0,"button",19),A.NdJ("click",function(){A.CHM(I);const N=A.oxw(2);return A.KtG(N.adSkipEnabled&&N.onAdEnded())}),A._uU(1),A.qZA()}if(2&K){const I=A.oxw(2);A.ekj("enabled",I.adSkipEnabled),A.xp6(1),A.hij(" ",I.adSkipLabel," ")}}function mu(K,ee){1&K&&(A.TgZ(0,"div",37),A._UZ(1,"div",38),A.qZA())}function Ol(K,ee){if(1&K&&(A.ynx(0),A._uU(1),A.BQk()),2&K){const I=A.oxw(4);A.xp6(1),A.hij(" Iniciar contenido en ",I.remainingLivePrerollSecs,"s ")}}function Nr(K,ee){1&K&&A._uU(0,"Saltar anuncio")}function to(K,ee){if(1&K){const I=A.EpF();A.TgZ(0,"button",39),A.NdJ("click",function(){A.CHM(I);const N=A.oxw(3);return A.KtG(N.skipLivePreroll())}),A.YNc(1,Ol,2,1,"ng-container",4),A.YNc(2,Nr,1,0,"ng-template",null,40,A.W1O),A.qZA()}if(2&K){const I=A.MAs(3),G=A.oxw(3);A.xp6(1),A.Q6J("ngIf",G.isCanal27)("ngIfElse",I)}}function cr(K,ee){if(1&K){const I=A.EpF();A.TgZ(0,"div",41),A.NdJ("click",function(N){A.CHM(I);const J=A.oxw(3);return A.KtG(J.onInlineProgressClick(N))}),A._UZ(1,"div",42),A.qZA()}if(2&K){const I=A.oxw(3);A.xp6(1),A.Udp("width",I.inlineDuration?I.inlineCurrentTime/I.inlineDuration*100:0,"%")}}function ha(K,ee){1&K&&(A.TgZ(0,"div",43),A._UZ(1,"div",44),A.qZA())}function gn(K,ee){1&K&&(A.O4$(),A.TgZ(0,"svg",34),A._UZ(1,"path",45),A.qZA())}function ro(K,ee){1&K&&(A.O4$(),A.TgZ(0,"svg",34),A._UZ(1,"path",46),A.qZA())}function gi(K,ee){if(1&K&&(A.TgZ(0,"span",47),A._uU(1),A.qZA()),2&K){const I=A.oxw(3);A.xp6(1),A.AsE("",I.formatInlineTime(I.inlineCurrentTime)," / ",I.formatInlineTime(I.inlineDuration),"")}}function yu(K,ee){1&K&&(A.TgZ(0,"span",48),A._uU(1,"EN VIVO"),A.qZA())}function Gi(K,ee){if(1&K){const I=A.EpF();A.TgZ(0,"button",49),A.NdJ("click",function(){A.CHM(I);const N=A.oxw(3);return A.KtG(N.toggleInlineSettings())}),A.O4$(),A.TgZ(1,"svg",34),A._UZ(2,"path",50),A.qZA()()}}function Sn(K,ee){if(1&K){const I=A.EpF();A.TgZ(0,"div",54),A.NdJ("click",function(){A.CHM(I);const N=A.oxw(5);return A.KtG(N.openInlineSettingsView("speed"))}),A.O4$(),A.TgZ(1,"svg",55),A._UZ(2,"path",56),A.qZA(),A.kcU(),A.TgZ(3,"span",57),A._uU(4,"Velocidad de reproducci\xf3n"),A.qZA(),A.TgZ(5,"span",58),A._uU(6),A.qZA()()}if(2&K){const I=A.oxw(5);A.xp6(6),A.Oqu(I.getInlineSpeedLabel())}}function Ml(K,ee){if(1&K){const I=A.EpF();A.TgZ(0,"div",54),A.NdJ("click",function(){A.CHM(I);const N=A.oxw(5);return A.KtG(N.openInlineSettingsView("audio"))}),A.O4$(),A.TgZ(1,"svg",55),A._UZ(2,"path",59),A.qZA(),A.kcU(),A.TgZ(3,"span",57),A._uU(4,"Audio y subt\xedtulos"),A.qZA()()}}function Fl(K,ee){if(1&K){const I=A.EpF();A.TgZ(0,"div",54),A.NdJ("click",function(){A.CHM(I);const N=A.oxw(5);return A.KtG(N.openInlineSettingsView("quality"))}),A.O4$(),A.TgZ(1,"svg",55),A._UZ(2,"path",50),A.qZA(),A.kcU(),A.TgZ(3,"span",57),A._uU(4,"Calidad de video"),A.qZA(),A.TgZ(5,"span",58),A._uU(6),A.qZA()()}if(2&K){const I=A.oxw(5);A.xp6(6),A.Oqu(I.getInlineQualityLabel())}}function ia(K,ee){if(1&K&&(A.ynx(0),A.YNc(1,Sn,7,1,"div",53),A.YNc(2,Ml,5,
30,"div",53),A.YNc(3,Fl,7,1,"div",53),A.BQk()),2&K){const I=A.oxw(4);A.xp6(1),A.Q6J("ngIf",!I.channel),A.xp6(1),A.Q6J("ngIf",I.inlineAudioTracks.length>0),A.xp6(1),A.Q6J("ngIf",I.inlineQualityLevels.length>0)}}function Nl(K,ee){if(1&K){const I=A.EpF();A.O4$(),A.kcU(),A.TgZ(0,"div",54),A.NdJ("click",function(){const J=A.CHM(I).$implicit,Ee=A.oxw(5);return A.KtG(Ee.setInlineSpeed(J.value))}),A.TgZ(1,"span",57),A._uU(2),A.qZA()()}if(2&K){const I=ee.$implicit,G=A.oxw(5);A.ekj("active",I.value===G.inlinePlaybackRate),A.xp6(2),A.Oqu(I.label)}}function Tu(K,ee){if(1&K){const I=A.EpF();A.ynx(0),A.TgZ(1,"div",60),A.NdJ("click",function(){A.CHM(I);const N=A.oxw(4);return A.KtG(N.openInlineSettingsView("main"))}),A.O4$(),A.TgZ(2,"svg",61),A._UZ(3,"path",62),A.qZA(),A._uU(4," Velocidad de reproducci\xf3n "),A.qZA(),A.YNc(5,Nl,3,3,"div",63),A.BQk()}if(2&K){const I=A.oxw(4);A.xp6(5),A.Q6J("ngForOf",I.inlineSpeedOptions)}}function ds(K,ee){if(1&K){const I=A.EpF();A.O4$(),A.kcU(),A.TgZ(0,"div",54),A.NdJ("click",function(){const J=A.CHM(I).$implicit,Ee=A.oxw(5);return A.KtG(Ee.setInlineAudioTrack(J.index))}),A.TgZ(1,"span",57),A._uU(2),A.qZA()()}if(2&K){const I=ee.$implicit,G=A.oxw(5);A.ekj("active",I.index===G.inlineCurrentAudioTrack),A.xp6(2),A.Oqu(I.label)}}function Bl(K,ee){if(1&K){const I=A.EpF();A.ynx(0),A.TgZ(1,"div",60),A.NdJ("click",function(){A.CHM(I);const N=A.oxw(4);return A.KtG(N.openInlineSettingsView("main"))}),A.O4$(),A.TgZ(2,"svg",61),A._UZ(3,"path",62),A.qZA(),A._uU(4," Audio y subt\xedtulos "),A.qZA(),A.YNc(5,ds,3,3,"div",63),A.BQk()}if(2&K){const I=A.oxw(4);A.xp6(5),A.Q6J("ngForOf",I.inlineAudioTracks)}}function io(K,ee){if(1&K){const I=A.EpF();A.TgZ(0,"div",54),A.NdJ("click",function(){const J=A.CHM(I).$implicit,Ee=A.oxw(5);return A.KtG(Ee.setInlineQuality(J.index))}),A.TgZ(1,"span",57),A._uU(2),A.qZA()()}if(2&K){const I=ee.$implicit,G=A.oxw(5);A.ekj("active",I.index===G.inlineCurrentQuality),A.xp6(2),A.Oqu(I.label)}}function Ul(K,ee){if(1&K){const I=A.EpF();A.ynx(0),A.TgZ(1,"div",60),A.NdJ("click",function(){A.CHM(I);const N=A.oxw(4);return A.KtG(N.openInlineSettingsView("main"))}),A.O4$(),A.TgZ(2,"svg",61),A._UZ(3,"path",62),A.qZA(),A._uU(4," Calidad de video "),A.qZA(),A.kcU(),A.TgZ(5,"div",54),A.NdJ("click",function(){A.CHM(I);const N=A.oxw(4);return A.KtG(N.setInlineQuality(-1))}),A.TgZ(6,"span",57),A._uU(7,"Auto"),A.qZA()(),A.YNc(8,io,3,3,"div",63),A.BQk()}if(2&K){const I=A.oxw(4);A.xp6(5),A.ekj("active",-1===I.inlineCurrentQuality),A.xp6(3),A.Q6J("ngForOf",I.inlineQualityLevels)}}function va(K,ee){if(1&K&&(A.O4$(),A.kcU(),A.TgZ(0,"div",51),A.NdJ("click",function(G){return G.stopPropagation()}),A.YNc(1,ia,4,3,"ng-container",52),A.YNc(2,Tu,6,1,"ng-container",52),A.YNc(3,Bl,6,1,"ng-container",52),A.YNc(4,Ul,9,3,"ng-container",52),A.qZA()),2&K){const I=A.oxw(3);A.xp6(1),A.Q6J("ngIf","main"===I.inlineSettingsView),A.xp6(1),A.Q6J("ngIf","speed"===I.inlineSettingsView),A.xp6(1),A.Q6J("ngIf","audio"===I.inlineSettingsView),A.xp6(1),A.Q6J("ngIf","quality"===I.inlineSettingsView)}}function Vl(K,ee){if(1&K){const I=A.EpF();A.TgZ(0,"div",20),A.NdJ("click",function(){A.CHM(I);const N=A.oxw(2);return A.KtG(N.onInlineWrapperClick())}),A.YNc(1,mu,2,0,"div",21),A.TgZ(2,"video",22,23),A.NdJ("timeupdate",function(){A.CHM(I);const N=A.oxw(2);return A.KtG(N.onInlineTimeUpdate())})("loadedmetadata",function(){A.CHM(I);const N=A.oxw(2);return A.KtG(N.onInlineMetadata())})("play",function(){A.CHM(I);const N=A.oxw(2);return A.KtG(N.inlinePlaying=!0)})("playing",function(){A.CHM(I);const N=A.oxw(2);return A.KtG(N.inlineLoading=!1)})("pause",function(){A.CHM(I);const N=A.oxw(2);return A.KtG(N.inlinePlaying=!1)})("error",function(){A.CHM(I);const N=A.oxw(2);return A.KtG(N.onInlineVideoError())}),A.qZA(),A.YNc(4,to,4,2,"button",24),A.TgZ(5,"div",25),A.NdJ("click",function(N){return N.stopPropagation()}),A.YNc(6,cr,2,2,"div",26),A.YNc(7,ha,2,0,"div",27),A.TgZ(8,"div",28)(9,"button",29),A.NdJ("click",function(){A.CHM(I);const N=A.oxw(2);return A.KtG(N.toggleInlinePlay())}),A.YNc(10,gn,2,0,"svg",30),A.YNc(11,ro,2,0,"svg",30),A.qZA(),A.YNc(12,gi,2,2,"span",31),A.YNc(13,yu,2,0,"span",32),A.YNc(14,Gi,3,0,"button",33),A.TgZ(15,"button",29),A.NdJ("click",function(){A.CHM(I);const N=A.oxw(2);return A.KtG(N.onInlineFullscreen())}),A.O4$(),A.TgZ(16,"svg",34),A._UZ(17,"path",35),A.qZA()()(),A.YNc(18,va,5,4,"div",36),A.qZA()()}if(2&K){const I=A.oxw(2);
3A.xp6(1),A.Q6J("ngIf",I.inlineLoading),A.xp6(3),A.Q6J("ngIf",I.livePrerollActive),A.xp6(1),A.ekj("visible",I.inlineControlsVisible),A.xp6(1),A.Q6J("ngIf",!I.channel),A.xp6(1),A.Q6J("ngIf",!!I.channel),A.xp6(3),A.Q6J("ngIf",!I.inlinePlaying),A.xp6(1),A.Q6J("ngIf",I.inlinePlaying),A.xp6(1),A.Q6J("ngIf",!I.channel),A.xp6(1),A.Q6J("ngIf",!!I.channel),A.xp6(1),A.Q6J("ngIf",I.inlineQualityLevels.length>0||I.inlineAudioTracks.length>0||!I.channel),A.xp6(1),A.ekj("inline-btn--end",!I.inlineQualityLevels.length&&!I.inlineAudioTracks.length&&!!I.channel),A.xp6(3),A.Q6J("ngIf",I.inlineSettingsOpen)}}function _u(K,ee){1&K&&A._UZ(0,"div",64)}function Hl(K,ee){if(1&K){const I=A.EpF();A.YNc(0,gu,1,0,"div",9),A.TgZ(1,"div",10,11)(3,"video",12,13),A.NdJ("loadedmetadata",function(N){A.CHM(I);const J=A.oxw();return A.KtG(J.onAdMetadata(N))})("timeupdate",function(N){A.CHM(I);const J=A.oxw();return A.KtG(J.onAdTimeUpdate(N))})("ended",function(){A.CHM(I);const N=A.oxw();return A.KtG(N.onAdEnded())})("error",function(){A.CHM(I);const N=A.oxw();return A.KtG(N.onAdEnded())}),A.qZA(),A.YNc(5,wa,2,3,"button",14),A.qZA(),A.TgZ(6,"div",15),A.YNc(7,Vl,19,14,"div",16),A.YNc(8,_u,1,0,"div",17),A.qZA()}if(2&K){const I=A.oxw();A.Q6J("ngIf",I.isInitializing),A.xp6(1),A.Udp("display",I.adPlaying?"flex":"none"),A.xp6(4),A.Q6J("ngIf",I.adSkipLabel),A.xp6(1),A.Udp("display",I.adPlaying?"none":"block"),A.xp6(1),A.Q6J("ngIf",I.playerExited||!!I.channel),A.xp6(1),A.Q6J("ngIf",!I.playerExited&&!I.channel)}}const mn=Le(2070);let fs=(()=>{class K{constructor(I,G,N,J,Ee,Ue,lt,ot){this._ngZone=I,this._tvHttp=G,this._adsService=N,this._videosHttp=J,this._analyticsService=Ee,this._navigationService=Ue,this._continueWatchingHttp=lt,this._nativePlayerService=ot,this.channel=void 0,this.token=void 0,this.nextEpisode=null,this.nextEpisodeClicked=new A.vpe,this.videoEnded=new A.vpe,this.quality=void 0,this.platform=Xr.dV.getPlatform(),this.activeWatchTime=0,this.lastUpdateTime=0,this.isAlreadyViewed=!1,this.isInitializing="android"===Xr.dV.getPlatform(),this.adPlaying=!1,this.adSkipLabel="",this.adSkipEnabled=!1,this.adDuration=0,this.pendingStartAtSec=0,this.pendingSeekTime=0,this.playerExited=!1,this.livePrerollActive=!1,this._liveUrl="",this.nextEpisodeOverlayVisible=!1,this.nextEpisodeCountdown=5,this._nextEpisodeCountdownTimer=null,this.inlinePlaying=!1,this.inlineLoading=!1,this.inlineHlsFailed=!1,this.inlineCurrentTime=0,this.inlineDuration=0,this.inlineControlsVisible=!1,this.inlineSettingsOpen=!1,this.inlineSettingsView="main",this.inlinePlaybackRate=1,this.inlineCurrentAudioTrack=-1,this.inlineCurrentQuality=-1,this.inlineAudioTracks=[],this.inlineQualityLevels=[],this.inlineSpeedOptions=[{label:"0.25x",value:.25},{label:"0.5x",value:.5},{label:"0.75x",value:.75},{label:"Normal",value:1},{label:"1.25x",value:1.25},{label:"1.5x",value:1.5},{label:"1.75x",value:1.75},{label:"2x",value:2}],this.inlineControlsTimer=null,this.isSavingProgress=!1,this.lastKnownCurrentTime=0,this.lastKnownDuration=0,this.lastSaved=0,this.hlsInstance=null,this.inlineHlsInstance=null,ce.default.getPlugin("preroll")||ce.default.registerPlugin("preroll",Xn())}ngAfterViewInit(){var I;return(0,Re.mG)(this,void 0,void 0,function*(){const G=Xr.dV.getPlatform();if("android"!==G||this.channel)if("android"===G&&this.channel){this.nativePlayer=bi,this.registerNativeEvents();const N=yield this.getAd();if(this._ngZone.run(()=>{this.isInitializing=!1}),null!=N&&N.src){this._liveUrl=this.url,this.url=N.src,this.livePrerollActive=!0,this.startInlinePlayback(0);const J=null===(I=this.androidInlineEl)||void 0===I?void 0:I.nativeElement;J&&J.addEventListener("ended",()=>{this._ngZone.run(()=>{this.skipLivePreroll()})},{once:!0})}else this.startInlinePlayback(0)}else if(this._nativePlayerService.isIos()){this.nativePlayer=pn.R,this.registerNativeEvents();const[N,J]=yield Promise.all([this.channel?Promise.resolve(0):this.getSavedPosition(),this.getAd()]),Ee=this._nativePlayerService.buildPreroll(null==J?void 0:J.src);this.channel?yield this.initIosAttach(Ee):yield this._nativePlayerService.play({url:this.url,startAt:N>0?N:void 0,metadata:{title:this.name},preroll:Ee})}else this.isInitializing=!1;else this.nativePlayer=bi,yield this.initNativePlayer()})}initNativePlayer(){return(0,Re.mG)(this,void 0,void 0,function*(){const I=yield this.get
3SavedPosition(),G=yield this.getAd();this._ngZone.run(()=>{this.isInitializing=!1}),yield this.playMainVideo(I,null==G?void 0:G.src)})}ngOnChanges(I){var G,N,J;const Ee=I.nextEpisode;if(Ee&&!Ee.isFirstChange()){const xt=Xr.dV.getPlatform();"android"===xt&&!this.playerExited&&!this.channel&&!(null===(G=this.nextEpisode)||void 0===G)&&G.title&&(null===(N=this.nativePlayer)||void 0===N||N.setNextEpisodeTitle({title:this.nextEpisode.title})),"ios"===xt&&(null===(J=this.nativePlayer)||void 0===J||J.setNextEpisodeAvailable({available:!!this.nextEpisode}))}const Ue=I.url,lt=I.nid;if(!Ue&&!lt||null!=Ue&&Ue.isFirstChange()||null!=lt&&lt.isFirstChange()||I.channel||I.token)return;const ot=Xr.dV.getPlatform();"android"!==ot||this.playerExited||this.channel?"ios"===ot&&!this.channel&&this._playNextOnIos():this._playNextOnAndroid()}_playNextOnAndroid(){var I;return(0,Re.mG)(this,void 0,void 0,function*(){this.nextEpisodeOverlayVisible=!1,this.isAlreadyViewed=!1,this.lastKnownCurrentTime=0,this.lastKnownDuration=0,this.lastSaved=0,this.pendingSeekTime=0;const G=yield this.getAd(),N={mode:"fullscreen",url:this.url,playerId:"android-player",chromecast:!1,isLive:!1};null!=this.name&&(N.title=this.name),null!=G&&G.src&&(N.adUrl=G.src),!(null===(I=this.nextEpisode)||void 0===I)&&I.title&&(N.nextEpisodeTitle=this.nextEpisode.title),yield this.nativePlayer.initPlayer(N)})}_playNextOnIos(){var I;return(0,Re.mG)(this,void 0,void 0,function*(){this.nextEpisodeOverlayVisible=!1,this.isAlreadyViewed=!1,this.lastKnownCurrentTime=0,this.lastKnownDuration=0,this.lastSaved=0,null===(I=this.nativePlayer)||void 0===I||I.setNextEpisodeAvailable({available:!1});const G=yield this.getAd(),N=this._nativePlayerService.buildPreroll(null==G?void 0:G.src);yield this._nativePlayerService.play({url:this.url,metadata:{title:this.name},preroll:N})})}_startNextEpisodeCountdown(){this.nextEpisodeCountdown=5,this._nextEpisodeCountdownTimer=setInterval(()=>{this._ngZone.run(()=>{this.nextEpisodeCountdown--,this.nextEpisodeCountdown<=0&&(clearInterval(this._nextEpisodeCountdownTimer),this._nextEpisodeCountdownTimer=null,this.onNextEpisodeOverlayConfirm())})},1e3)}get isCanal27(){return Oi.S.configurations.isCanal27}get remainingLivePrerollSecs(){return Math.max(0,Math.ceil(this.inlineDuration-this.inlineCurrentTime))}skipLivePreroll(){var I;const G=null===(I=this.androidInlineEl)||void 0===I?void 0:I.nativeElement;G&&(G.pause(),this.hlsInstance&&(this.hlsInstance.destroy(),this.hlsInstance=null)),this.livePrerollActive=!1,this.url=this._liveUrl,this.startInlinePlayback(0)}onNextEpisodeOverlayConfirm(){clearInterval(this._nextEpisodeCountdownTimer),this._nextEpisodeCountdownTimer=null;const I=this.nextEpisode;this.nextEpisodeOverlayVisible=!1,I&&this._ngZone.run(()=>this.nextEpisodeClicked.emit(I))}setupAdPlayer(I){var G;const N=null===(G=this.adVideoEl)||void 0===G?void 0:G.nativeElement;if(!N)return;const J=()=>{this._ngZone.run(()=>{this.isInitializing=!1})};N.addEventListener("playing",J,{once:!0}),N.addEventListener("error",J,{once:!0});const Ee=()=>{N.play().catch(()=>J())};mn.isSupported()&&I.includes(".m3u8")?(this.hlsInstance=new mn,this.hlsInstance.loadSource(I),this.hlsInstance.attachMedia(N),this.hlsInstance.on(mn.Events.MANIFEST_PARSED,()=>Ee())):(N.src=I,Ee())}getSavedPosition(){var I;return(0,Re.mG)(this,void 0,void 0,function*(){try{const G=this._continueWatchingHttp.getContinueWatching();if(!G)return 0;const N=yield(0,Hi.n)(G),J=null==N?void 0:N.find(Ee=>String(Ee.videoId)===String(this.nid));return(null==J?void 0:J.duration)>0&&(this.lastKnownDuration=J.duration),null!==(I=null==J?void 0:J.currentTime)&&void 0!==I?I:0}catch(G){return 0}})}getAd(){return(0,Re.mG)(this,void 0,void 0,function*(){try{return yield this._adsService.findAds()}catch(I){return null}})}onAdMetadata(I){const G=I.target;this.adDuration=isFinite(G.duration)?G.duration:0}onAdTimeUpdate(I){const G=I.target;if(!this.adDuration)return;const N=Math.max(this.adDuration-2,1),J=Math.ceil(N-G.currentTime);J>0?(this.adSkipLabel="Iniciar contenido en "+J+"s",this.adSkipEnabled=!1):(this.adSkipLabel="Iniciar contenido",this.adSkipEnabled=!0)}onAdEnded(){this.hlsInstance&&(this.hlsInstance.destroy(),this.hlsInstance=null),document.fullscreenElement&&document.exitFullscreen().catch(()=>{}),this._ngZone.run(()=>{this.adPlaying=!1,this.adSkipEnabled=!1,setTimeout(()=>{this.channel?this.startInlinePlayback(0):this.playMainVideo(this.pendingStartAtSec)},100)})}playMainVideo(I,G){var N;return(0,Re.mG)(this,void 0,void 0,function*(){const J={mode:"fullscreen",url:this.url,playerId:"android-player",chromecast:!1,isLive:!1};null!=this.name&&(J.title=this.name),G&&(J.adUrl=G),!(null===(N=this.nextEpisode)||void 0===N)&&N.title&&(J.nextEpisodeTitle=this.nextEpisode.title),yield this.nativePlayer.initPlayer(J),this.pendingSeekTime=I,this.registerNativeEvents()})}set title(I){this.name=I}
3toggleInlineSettings(){this.inlineSettingsOpen=!this.inlineSettingsOpen,this.inlineSettingsOpen&&(this.inlineSettingsView="main"),this.showInlineControls()}openInlineSettingsView(I){this.inlineSettingsView=I,this.showInlineControls()}setInlineSpeed(I){var G;const N=null===(G=this.androidInlineEl)||void 0===G?void 0:G.nativeElement;N&&(N.playbackRate=I),this.inlinePlaybackRate=I,this.inlineSettingsOpen=!1,this.showInlineControls()}setInlineAudioTrack(I){this.inlineHlsInstance&&(this.inlineHlsInstance.audioTrack=I),this.inlineCurrentAudioTrack=I,this.inlineSettingsOpen=!1,this.showInlineControls()}setInlineQuality(I){this.inlineHlsInstance&&(this.inlineHlsInstance.currentLevel=I),this.inlineCurrentQuality=I,this.inlineSettingsOpen=!1,this.showInlineControls()}getInlineQualityLabel(){var I,G;return this.inlineCurrentQuality<0?"Auto":null!==(G=null===(I=this.inlineQualityLevels[this.inlineCurrentQuality])||void 0===I?void 0:I.label)&&void 0!==G?G:"Auto"}getInlineSpeedLabel(){return 1===this.inlinePlaybackRate?"Normal":this.inlinePlaybackRate+"x"}onInlineWrapperClick(){this.inlineSettingsOpen=!1,this.showInlineControls()}showInlineControls(){this.inlineControlsVisible=!0,clearTimeout(this.inlineControlsTimer),this.inlineControlsTimer=setTimeout(()=>{this._ngZone.run(()=>{this.inlineControlsVisible=!1,this.inlineSettingsOpen=!1})},3e3)}toggleInlinePlay(){var I;const G=null===(I=this.androidInlineEl)||void 0===I?void 0:I.nativeElement;if(G){if(this.inlineHlsFailed)return void this.onInlineFullscreen();G.paused?G.play().catch(()=>{}):G.pause(),this.showInlineControls()}}onInlineTimeUpdate(){var I;const G=null===(I=this.androidInlineEl)||void 0===I?void 0:I.nativeElement;G&&(this.inlineCurrentTime=G.currentTime)}onInlineMetadata(){var I;const G=null===(I=this.androidInlineEl)||void 0===I?void 0:I.nativeElement;G&&(this.inlineDuration=isFinite(G.duration)?G.duration:0)}onInlineProgressClick(I){var G;const N=null===(G=this.androidInlineEl)||void 0===G?void 0:G.nativeElement;N&&this.inlineDuration&&(N.currentTime=I.offsetX/I.currentTarget.offsetWidth*this.inlineDuration,this.showInlineControls())}formatInlineTime(I){if(!I||!isFinite(I))return"0:00";const G=Math.floor(I/3600),N=Math.floor(I%3600/60),J=Math.floor(I%60),Ee=String(N).padStart(2,"0"),Ue=String(J).padStart(2,"0");return G>0?`${G}:${Ee}:${Ue}`:`${N}:${Ue}`}onInlineCast(){return(0,Re.mG)(this,void 0,void 0,function*(){try{yield this.nativePlayer.showCastDialog({url:this.url,currentTime:this.inlineCurrentTime})}catch(I){yield this.onInlineFullscreen()}})}onInlineFullscreen(){var I,G;return(0,Re.mG)(this,void 0,void 0,function*(){const N=null===(I=this.androidInlineEl)||void 0===I?void 0:I.nativeElement,J=null!==(G=null==N?void 0:N.currentTime)&&void 0!==G?G:this.lastKnownCurrentTime;clearTimeout(this.inlineControlsTimer),this.inlineHlsInstance&&(this.inlineHlsInstance.destroy(),this.inlineHlsInstance=null);const Ee={mode:"fullscreen",url:this.url,playerId:"android-player",chromecast:!1,isLive:!!this.channel};null!=this.name&&(Ee.title=this.name),this.token&&(Ee.token=this.token),this._ngZone.run(()=>{this.playerExited=!1,this.inlineControlsVisible=!1}),yield this.nativePlayer.initPlayer(Ee),this.channel||(this.pendingSeekTime=J)})}startInlinePlayback(I){var G,N;const J=null===(G=this.androidInlineEl)||void 0===G?void 0:G.nativeElement;if(J)if(this.inlineHlsInstance&&(this.inlineHlsInstance.destroy(),this.inlineHlsInstance=null),this.inlineLoading=!0,this.inlineHlsFailed=!1,this.inlineAudioTracks=[],this.inlineQualityLevels=[],this.inlineCurrentAudioTrack=-1,this.inlineCurrentQuality=-1,this.inlinePlaybackRate=1,mn.isSupported()&&null!==(N=this.url)&&void 0!==N&&N.includes(".m3u8")){const Ee={};if(this.token){const ot=this.createTokenLoader(this.token);ot&&(Ee.loader=ot)}this.channel&&(Ee.maxFragRetryCount=5,Ee.maxLevelRetryCount=4),this.inlineHlsInstance=new mn(Ee),this.inlineHlsInstance.loadSource(this.url),this.inlineHlsInstance.attachMedia(J);let Ue=!1,lt=0;this.inlineHlsInstance.on(mn.Events.ERROR,(ot,xt)=>{var zt,It;if(!xt.fatal)return;const _r=mn.ErrorTypes;return xt.type!==(null==_r?void 0:_r.MEDIA_ERROR)||Ue?xt.type===(null==_r?void 0:_r.NETWORK_E
3RROR)&&lt<3?(lt++,void(null===(It=this.inlineHlsInstance)||void 0===It||It.startLoad())):void this._ngZone.run(()=>{this.inlineLoading=!1,this.inlineHlsFailed=!0,this.showInlineControls()}):(Ue=!0,void(null===(zt=this.inlineHlsInstance)||void 0===zt||zt.recoverMediaError()))}),this.inlineHlsInstance.on(mn.Events.MANIFEST_PARSED,(ot,xt)=>{this._ngZone.run(()=>{var zt,It,_r;this.inlineLoading=!1,(null===(zt=xt.levels)||void 0===zt?void 0:zt.length)>1&&(this.inlineQualityLevels=xt.levels.map((xi,Oa)=>({label:xi.height>0?`${xi.height}p`:`${Math.round((xi.bitrate||0)/1e3)} kbps`,index:Oa})));const Qr=null===(It=this.inlineHlsInstance)||void 0===It?void 0:It.audioTracks;(null==Qr?void 0:Qr.length)>1&&(this.inlineAudioTracks=Qr.map((xi,Oa)=>{var bn,Eu;return{label:(null!==(Eu=null!==(bn=xi.lang)&&void 0!==bn?bn:xi.name)&&void 0!==Eu?Eu:`Audio ${Oa+1}`).toUpperCase(),index:Oa}}),this.inlineCurrentAudioTrack=null!==(_r=this.inlineHlsInstance.audioTrack)&&void 0!==_r?_r:0)}),I>0&&(J.currentTime=I),J.muted=!0,J.play().then(()=>{J.muted=!1,setTimeout(()=>{this.inlineHlsInstance&&J.paused&&this._ngZone.run(()=>{this.inlineHlsFailed=!0,this.showInlineControls()})},8e3)}).catch(()=>{J.muted=!1,this._ngZone.run(()=>{this.inlineHlsFailed=!0,this.showInlineControls()})})})}else J.src=this.url,I>0&&(J.currentTime=I),J.muted=!0,J.play().then(()=>{J.muted=!1}).catch(()=>{J.muted=!1,this._ngZone.run(()=>{this.inlineLoading=!1,this.inlineHlsFailed=!0,this.showInlineControls()})})}createTokenLoader(I){var G;const N=null===(G=mn.DefaultConfig)||void 0===G?void 0:G.loader;if(N)return class extends N{load(J,Ee,Ue){if(J.url&&!J.url.includes("token=")){const lt=J.url.includes("?")?"&":"?";J.url=`${J.url}${lt}token=${encodeURIComponent(I)}`}super.load(J,Ee,Ue)}}}onInlineVideoError(){this._ngZone.run(()=>{this.inlineLoading=!1,this.inlineHlsFailed=!0,this.showInlineControls()})}ngOnDestroy(){clearInterval(this._nextEpisodeCountdownTimer),clearTimeout(this.inlineControlsTimer),this.hlsInstance&&(this.hlsInstance.destroy(),this.hlsInstance=null),this.inlineHlsInstance&&(this.inlineHlsInstance.destroy(),this.inlineHlsInstance=null),clearInterval(this.saveProgressInterval),this.stopTracking(),this.saveProgressNative(this.lastKnownCurrentTime,this.lastKnownDuration),this.handlerPlay&&this.handlerPlay.remove(),this.handlerPause&&this.handlerPause.remove(),this.handlerEnded&&this.handlerEnded.remove(),this.handlerExit&&this.handlerExit.remove(),this.handlerCast&&this.handlerCast.remove(),this.handlerTimeUpdate&&this.handlerTimeUpdate.remove(),this.appStateHandler&&this.appStateHandler.remove(),"android"===this.platform&&this.nativePlayer&&this.nativePlayer.stopAllPlayers(),"ios"===this.platform&&(this._nativePlayerService.setInlineNativePlayerActive(!1),this._nativePlayerService.stop().catch(()=>{}))}ionViewWillLeave(){this.stopTracking()}waitForPlayerContainer(I=10){return new Promise((G,N)=>{let J=0;const Ee=()=>{var Ue;null!==(Ue=this.playerContainer)&&void 0!==Ue&&Ue.nativeElement?G(this.playerContainer):++J>=I?N(new Error("iOS playerContainer not found")):setTimeout(Ee,100)};Ee()})}initIosAttach(I){return(0,Re.mG)(this,void 0,void 0,function*(){const G=yield this.waitForPlayerContainer();yield new Promise(J=>requestAnimationFrame(J));const N=G.nativeElement.getBoundingClientRect();this._nativePlayerService.setInlineNativePlayerActive(!0),yield this._nativePlayerService.attach({inlineBounds:{x:N.left,y:N.top,width:N.width,height:N.height},url:this.url,autoplay:!0,metadata:{title:this.name,isLive:!!this.channel},preroll:I})})}getPlayerSnapshot(){var I,G;return(0,Re.mG)(this,void 0,void 0,function*(){if("ios"===this.platform)return{currentTime:this.lastKnownCurrentTime,duration:this.lastKnownDuration};const[N,J]=yield Promise.all([this.nativePlayer.getCurrentTime({playerId:"android-player"}),this.nativePlayer.getDuration({playerId:"android-player"})]),Ee=null!==(I=null==N?void 0:N.value)&&void 0!==I?I:0,Ue=null!==(G=null==J?void 0:J.value)&&void 0!==G?G:0;return Ee>0&&(this.lastKnownCurrentTime=Ee),Ue>0&&(this.lastKnownDuration=Ue),{currentTime:Ee,duration:Ue}})}registerNativeEvents(){return(0,Re.mG)(this,void 0,void 0,function*(){let I,G;this.appStateHandler=yield nn.g.addListener("appStateChange",N=>(0,Re.mG)(this,void 0,void 0,function*(){!N.isActive&&"android"!==this.platform&&this.nativePlayer.pause({playerId:"android-player"})}));try{if(this.nid){const N=yield this._videosHttp.getVideoByTid(this.nid);I=N?Object.assign(Object.assign({},N),{title:this.name}):void 0}else this.channel&&(G=yield this._tvHttp.getChannel(this.channel))}catch(N){}this.channel||(this.saveProgressInterval=window.setInterval(()=>(0,Re.mG)(this,void 0,void 0,function*(){try{const{currentTime:N,duration:J}=yield this.getPlayerSnapshot();if(N<5||!J)return;if(this.nextEpisode&&J-N<=30&&!this.nextEpisodeOverlayVisible)return void("ios"===this.platform&&this._ngZone.run(()=>{this.nextEpisodeOverlayVisible=!0}));if(N/J>=.95)return void this.saveProgressNative(N,J);N-this.lastSaved>=60&&(this.lastSaved=N,this.saveProgressNative(N,J))}catch(N){}}),5e3)),this.handlerPlay=yield this.nativePlayer.addListener("jeepCapVideoPlayerPlay",N=>(0,Re.mG)(this,void 0,void 0,function*(){var J;if(this.lastKnownCurrentTime=null!==(J=N.currentTime)&&void 0!==J?J:this.lastKnownCurrentTime,N.duration>0&&(this.lastKnownDuration=N.duration),this.pendingSeekTime>0){const Ee=this.pendingSeekTime;this.pendingSeekTime=0;try{yield this.nativePlayer.setCurrentTime({playerId:"android-player",seektime:Ee})}catch(Ue){}}this._analyticsService.sendAnalyticsData(Jt.U.RESUMED_VIDEO.action,I,N.currentTime,this.qual
3ity,G).finally(()=>{})}),!1),this.handlerPause=yield this.nativePlayer.addListener("jeepCapVideoPlayerPause",N=>(0,Re.mG)(this,void 0,void 0,function*(){var J,Ee;this.stopTracking(),N.currentTime>0&&(this.lastKnownCurrentTime=N.currentTime),N.duration>0&&(this.lastKnownDuration=N.duration);try{const{currentTime:Ue,duration:lt}=yield this.getPlayerSnapshot();this.saveProgressNative(Ue||N.currentTime||this.lastKnownCurrentTime,lt||N.duration||this.lastKnownDuration)}catch(Ue){this.saveProgressNative(null!==(J=N.currentTime)&&void 0!==J?J:this.lastKnownCurrentTime,null!==(Ee=N.duration)&&void 0!==Ee?Ee:this.lastKnownDuration)}this._analyticsService.sendAnalyticsData(Jt.U.PAUSED_VIDEO.action,I,N.currentTime,this.quality,G).finally(()=>{})}),!1),this.handlerEnded=yield this.nativePlayer.addListener("jeepCapVideoPlayerEnded",N=>{var J;this.lastKnownCurrentTime=null!==(J=N.currentTime)&&void 0!==J?J:this.lastKnownCurrentTime,this.nid&&this._continueWatchingHttp.removeProgress(String(this.nid)).subscribe({error:()=>{}}),this.isAlreadyViewed||this._analyticsService.sendAnalyticsData(Jt.U.VIEW_VIDEO.action,I,N.currentTime,this.quality,G).finally(()=>{}),this._analyticsService.sendAnalyticsData(Jt.U.FINISHED_VIDEO.action,I,N.currentTime,this.quality,G).finally(()=>{}),this.nextEpisode?(this.nextEpisodeOverlayVisible=!0,this._ngZone.run(()=>this.nextEpisodeClicked.emit(this.nextEpisode))):this._ngZone.run(()=>this.videoEnded.emit())},!1),yield this.nativePlayer.addListener("jeepCapVideoPlayerNextEpisode",()=>{const N=this.nextEpisode;N&&(this.nextEpisodeOverlayVisible=!0,this._ngZone.run(()=>this.nextEpisodeClicked.emit(N)))},!1),this.handlerExit=yield this.nativePlayer.addListener("jeepCapVideoPlayerExit",N=>(0,Re.mG)(this,void 0,void 0,function*(){if(this.saveProgressNative(N.currentTime||this.lastKnownCurrentTime,N.duration||this.lastKnownDuration),this._analyticsService.sendAnalyticsData(Jt.U.CLOSED_VIDEO.action,I,N.currentTime,this.quality,G).finally(()=>{}),!this.nextEpisodeOverlayVisible)if(this.channel||"android"!==this.platform)this.channel&&"android"===this.platform?this._ngZone.run(()=>{this.inlineLoading=!0,setTimeout(()=>this.startInlinePlayback(0),100)}):!this.channel&&"android"!==this.platform&&this._navigationService.back();else{const Ue=this.lastKnownCurrentTime;this._ngZone.run(()=>{this.inlineLoading=!0,this.playerExited=!0,setTimeout(()=>this.startInlinePlayback(Ue),100)})}}),!1),this.handlerCast=yield this.nativePlayer.addListener("jeepCapVideoPlayerCast",N=>{var J;N.currentTime>0&&(this.lastKnownCurrentTime=N.currentTime),clearInterval(this.saveProgressInterval);const Ee=null===(J=this.androidInlineEl)||void 0===J?void 0:J.nativeElement;Ee&&Ee.pause(),this.inlineHlsInstance&&(this.inlineHlsInstance.destroy(),this.inlineHlsInstance=null),this._ngZone.run(()=>{this.playerExited=!1})},!1),this.handlerTimeUpdate=yield this.nativePlayer.addListener("jeepCapVideoPlayerTimeUpdate",N=>{var J,Ee;(null!==(J=N.currentTime)&&void 0!==J?J:0)>0&&(this.lastKnownCurrentTime=N.currentTime),(null!==(Ee=N.duration)&&void 0!==Ee?Ee:0)>0&&(this.lastKnownDuration=N.duration)},!1)})}saveProgressNative(I,G){if(!(this.isSavingProgress||!this.nid||I<5)&&G){if(this.isSavingProgress=!0,I/G>=.95)return void this._continueWatchingHttp.removeProgress(String(this.nid)).subscribe({complete:()=>{this.isSavingProgress=!1},error:()=>{this.isSavingProgress=!1}});this._continueWatchingHttp.updateProgress(String(this.nid),I,G).subscribe({complete:()=>{this.isSavingProgress=!1},error:()=>{this.isSavingProgress=!1}})}}stopTracking(){"android"===this.platform&&clearInterval(this.watchInterval)}startTracking(I,G){this.watchInterval=window.setInterval(()=>(0,Re.mG)(this,void 0,void 0,function*(){var N;if(this.nativePlayer)try{const J=yield this.nativePlayer.getCurrentTime({playerId:"android-player"}),Ee=null!==(N=null==J?void 0:J.value)&&void 0!==N?N:0;Ee>this.lastUpdateTime&&(this.activeWatchTime+=Ee-this.lastUpdateTime,this.lastUpdateTime=Ee),!this.isAlreadyViewed&&this.activeWatchTime>=300&&(this.isAlreadyViewed=!0,clearInterval(this.watchInterval),this._analyticsService.sendAnalyticsData(Jt.U.VIEW_VIDEO.action,I,Ee,this.qual
3ity,G).finally(()=>{}))}catch(J){}}),1e3)}}return K.\u0275fac=function(I){return new(I||K)(A.Y36(A.R0b),A.Y36(Nn.L),A.Y36(Tr.F),A.Y36(Bn.W),A.Y36(an.y),A.Y36(ss.f),A.Y36(Js.B),A.Y36(eo.b))},K.\u0275cmp=A.Xpm({type:K,selectors:[["dt-player"]],viewQuery:function(I,G){if(1&I&&(A.Gf(hu,5),A.Gf(Rl,5),A.Gf(os,5),A.Gf(wl,5)),2&I){let N;A.iGM(N=A.CRH())&&(G.adVideoEl=N.first),A.iGM(N=A.CRH())&&(G.adContainerEl=N.first),A.iGM(N=A.CRH())&&(G.playerContainer=N.first),A.iGM(N=A.CRH())&&(G.androidInlineEl=N.first)}},inputs:{options:"options",url:"url",nid:"nid",channel:"channel",token:"token",nextEpisode:"nextEpisode",title:"title"},outputs:{nextEpisodeClicked:"nextEpisodeClicked",videoEnded:"videoEnded"},features:[A.TTD],decls:5,vars:2,consts:[[3,"title","options","url","nid","channel","token","nextEpisode","nextEpisodeClicked",4,"ngIf","ngIfElse"],["nativePlayer",""],["androidPlayer",""],[3,"title","options","url","nid","channel","token","nextEpisode","nextEpisodeClicked"],[4,"ngIf","ngIfElse"],[1,"o-player__video","native-ios-player"],["playerContainer",""],["class","native-next-episode-skip-btn",3,"click",4,"ngIf"],[1,"native-next-episode-skip-btn",3,"click"],["class","android-loading-overlay",4,"ngIf"],[1,"ad-container"],["adContainerEl",""],["autoplay","","playsinline","",1,"ad-video",3,"loadedmetadata","timeupdate","ended","error"],["adVideoEl",""],["class","preroll-skip-button",3,"enabled","click",4,"ngIf"],[1,"o-player__video"],["class","android-inline-wrapper",3,"click",4,"ngIf"],["id","android-player","style","width:100%; height:100%;",4,"ngIf"],[1,"android-loading-overlay"],[1,"preroll-skip-button",3,"click"],[1,"android-inline-wrapper",3,"click"],["class","inline-loading-overlay",4,"ngIf"],["playsinline","",1,"android-inline-video",3,"timeupdate","loadedmetadata","play","playing","pause","error"],["androidInlineEl",""],["class","live-preroll-skip-btn",3,"click",4,"ngIf"],[1,"inline-controls",3,"click"],["class","inline-progress-track",3,"click",4,"ngIf"],["class","inline-progress-track",4,"ngIf"],[1,"inline-bar"],[1,"inline-btn",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","currentColor","width","22","height","22",4,"ngIf"],["class","inline-time",4,"ngIf"],["class","inline-live-badge",4,"ngIf"],["class","inline-btn inline-btn--end",3,"click",4,"ngIf"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","currentColor","width","22","height","22"],["d","M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"],["class","inline-settings-popup",3,"click",4,"ngIf"],[1,"inline-loading-overlay"],[1,"inline-spinner"],[1,"live-preroll-skip-btn",3,"click"],["skipLabel",""],[1,"inline-progress-track",3,"click"],[1,"inline-progress-fill"],[1,"inline-progress-track"],[1,"inline-progress-fill",2,"width","100%","background","#f44336"],["d","M8 5v14l11-7z"],["d","M6 19h4V5H6v14zm8-14v14h4V5h-4z"],[1,"inline-time"],[1,"inline-live-badge"],[1,"inline-btn","inline-btn--end",3,"click"],["d","M19.14 12.94c.04-.3.06-.61.06-.94s-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.49.49 0 0 0-.59-.22l-2.39.96a6.97 6.97 0 0 0-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96a.49.49 0 0 0-.59.22L2.74 8.87a.48.48 0 0 0 .12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32a.49.49 0 0 0-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"],[1,"inline-settings-popup",3,"click"],[4,"ngIf"],["class","inline-settings-item",3,"click",4,"ngIf"],[1,"inline-settings-item",3,"click"],["viewBox","0 0 24 24","fill","currentColor",1,"inline-settings-icon"],["d","M10 8v8l6-4-6-4zm6.5-5.61l1.5 1.5L16.5 5.4 15 3.89l1.5-1.5zm-9 0L9 3.89 7.5 5.4 6 3.89l1.5-1.5zM12 1a11 11 0 1 0 0 22A11 11 0 0 0 12 1zm0 20a9 9 0 1 1 0-18 9 9 0 0 1 0 18z"],[1,"inline-settings-label"],[1,"inline-settings-sub"],["d","M12 3v9.28A4 4 0 0 0 8 16a4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4V3h-4v2h2v2H8V5H6v4h2V7h2v2H8v2h2v2.28A4 4 0 0 0 8 17a4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-3.72V3h-4zm0 16a2 2 0 0 1-2-2 2 2 0 0 1 2-2 2 2 0 0 1 2 2 2 2 0 0 1-2 2z"],[1,"inline-settings-header",3,"click"],["viewBox","0 0 24 24","fill","currentColor","width","18","height","18"],["d","M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"],["class","inline-settings-item",3,"active","click",4,"ngFor","ngForOf"],["id","android-player",2,"width","100%","height","100%"]],template:function(I,G){if(1&I&&(A.YNc(0,us,1,7,"dt-videojs-player",0),A.YNc(1,pu,1,2,"ng-template",null,1,A.W1O),A.YNc(3,Hl,9,8,"ng-template",null,2,A.W1O)),2&I){const N=A.MAs(2);A.Q6J("ngIf","android"!==G.platform&&"ios"!==G.platform)("ngIfElse",N)}},dependencies:[uu.sg,uu.O5,cu],styles:['@charset "UTF-8";.o-player{height:100%;width:100%;position:relative}.o-player__video{display:flex;height:auto;width:100%;align-items:center}.o-player__video .video-js:not(.vjs-fullscreen){overflow:hidden}.o-player__video video{margin:auto}.preroll-skip-button,.vjs-preroll .preroll-skip-button{position:absolute;bottom:86px;right:0;background-color:rgba(0,0,0,.4);padding:14px 18px;font-size:14px;font-weight:400;line-height:normal;z-index:100000;transition:background-color .3s ease,color .3s ease;min-height:41px;cursor:default;width:auto;color:rgba(255,255,255,.7);border:none;outline:none;opacity:1;pointer-events:none}.preroll-skip-button.enabled,.vjs-preroll .preroll-skip-button.enabled{cursor:pointer;color:#fff;background-color:rgba(0,0,0,.6);pointer-events:all}.o-player__video .vjs-play-progress{background-color:var(--color-background-progress-player)}.o-player__video .vjs-control-bar{background-color:var(--color-background-bar-player)}
3.o-player__video .vjs-button{color:var(--color-text-controls-player)}.vjs-control{margin:0!important;width:2.5em!important;height:38px!important;min-height:0!important;align-self:center!important}.vjs-control-bar{font-size:1.1rem!important;padding:0!important}.vjs-time-control{font-size:.8rem!important;width:3.5em!important;align-content:center!important;padding:0!important}.vjs-volume-control{position:absolute;bottom:210%!important;left:-100%!important;opacity:0;visibility:hidden;transition:opacity .2s;background:none!important}.android-loading-overlay{position:fixed;inset:0;background:#000;z-index:100000}.native-next-episode-skip-btn{position:absolute;bottom:60px;right:0;z-index:100000;padding:10px 18px;background-color:rgba(0,0,0,.6);color:#fff;border:1px solid rgba(255,255,255,.5);font-size:14px;font-family:sans-serif;cursor:pointer}.ad-container{position:fixed;inset:0;background:#000;display:flex;align-items:center;justify-content:center;z-index:99999}.ad-video{width:100%;height:100%;object-fit:contain}.ad-countdown{position:absolute;bottom:80px;right:16px;background:rgba(0,0,0,.55);color:#fff;font-size:14px;padding:6px 12px;border-radius:4px;pointer-events:none}.o-player__video .video-js.vjs-live .vjs-live-control,.o-player__video .video-js.vjs-live .vjs-current-time,.o-player__video .video-js.vjs-live .vjs-time-divider,.o-player__video .video-js.vjs-live .vjs-duration,.o-player__video .video-js.vjs-live .vjs-remaining-time{display:none!important}.o-player__video div.vjs-control-bar{display:flex!important;align-items:center!important;height:50px!important;padding:12px 0 0!important}.o-player__video div.vjs-spacer{display:none!important}.o-player__video div.vjs-progress-control{flex:1 1 auto!important;display:flex!important;align-items:center!important;height:38px!important;min-height:0!important;align-self:center!important}.o-player__video .video-js.vjs-live div.vjs-progress-control,.o-player__video .video-js.vjs-live .vjs-seek-to-live-control{transform:translateY(-5px)!important}.o-player__video div.vjs-control-bar .vjs-seek-to-live-control{width:auto!important;min-height:0!important;padding:0 6px!important;display:flex!important;align-items:center!important;flex-shrink:0!important}.o-player__video .vjs-seek-to-live-control .vjs-icon-placeholder{width:auto!important;height:auto!important}.o-player__video .vjs-seek-to-live-control .vjs-icon-placeholder:before{width:10px!important;height:10px!important;min-width:10px!important;min-height:10px!important;font-size:0!important;line-height:0!important;border-radius:50%!important;background-color:#888!important;display:inline-block!important;content:""!important;margin-right:5px!important}.o-player__video .vjs-seek-to-live-control.vjs-at-live-edge .vjs-icon-placeholder:before{background-color:#e53935!important}.o-player__video div.vjs-control-bar button.vjs-play-control,.o-player__video div.vjs-control-bar button.vjs-mute-control,.o-player__video div.vjs-control-bar button.vjs-fullscreen-control,.o-player__video div.vjs-control-bar button.vjs-picture-in-picture-control{display:flex!important;align-items:center!important;justify-content:center!important}.o-player__video div.vjs-control-bar .vjs-icon-placeholder{display:flex!important;align-items:center!important;justify-content:center!important;height:100%!important}.o-player__video div.vjs-control-bar button .vjs-icon-placeholder:before{line-height:1!important}.o-player__video .vjs-progress-holder{height:5px!important;border-radius:2px!important}.o-player__video .vjs-cast-control{order:9}.o-player__video .vjs-cast-control .vjs-icon-placeholder:before{content:""!important;display:inline-block!important;vertical-align:middle!important;width:1.8em!important;height:1.8em!important;font-size:1em!important;line-height:1!important;background-color:currentColor!important;-webkit-mask:url(/assets/chromecast/ico_castOFF.svg) center/contain no-repeat!important;mask:url(/assets/chromecast/ico_castOFF.svg) center/contain no-repeat!important}.o-player__video .vjs-hls-quality-selector,.o-player__video .vjs-settings-button{order:10;display:flex!important;align-items:center!important;justify-content:center!important}.o-player__video .vjs-hls-quality-selector .vjs-icon-placeholder:before{font-size:1.8em!important;line-height:1!important}.o-player__video .vjs-picture-in-picture-control{order:11;right:auto!important;top:auto!important;display:flex!important;align-items:center!important;justify-content:center!important}.o-player__video .vjs-fullscreen-control{order:12;display:flex!important;align-items:center!important;justify-content:center!important}.vjs-picture-in-picture-control{position:relative!important}.native-ios-player{width:100%;aspect-ratio:16/9;background:#000;position:relative;overflow:hidden}.android-inline-wrapper{position:relative;width:100%;aspect-ratio:16/9;background:#000;cursor:pointer;overflow:hidden}.android-inline-video{width:100%;height:100%;object-fit:contain;display:block;background:#000}.inline-loading-overlay{position:absolute;inset:0;background:#000;display:flex;align-items:center;justify-content:center;z-index:15;pointer-events:none}.inline-spinner{width:40px;height:40px;border:3px solid rgba(255,255,255,.25);border-top-color:#fff;border-radius:50%;animation:inline-spin .8s linear infinite}@keyframes inline-spin{to{transform:rotate(360deg)}}.live-preroll-skip-btn{position:absolute;bottom:12px;right:0;z-index:10;padding:8px 16px;background:rgba(0,0,0,.6);color:rgba(255,255,255,.8);font-size:13px;border:none;border-radius:2px;cursor:pointer}.live-preroll-skip-btn:active{background:rgba(0,0,0,.85);color:#fff}
3.inline-controls{position:absolute;bottom:0;left:0;right:0;opacity:0;pointer-events:none;transition:opacity .2s ease}.inline-controls.visible{opacity:1;pointer-events:all}.inline-progress-track{width:100%;height:2px;background:rgba(255,255,255,.25);cursor:pointer;position:relative}.inline-progress-fill{height:100%;background:#fff;pointer-events:none}.inline-bar{display:flex;align-items:center;background:linear-gradient(to top,rgba(0,0,0,.82) 0%,rgba(0,0,0,.55) 100%);padding:0 4px;height:44px;gap:0}.inline-btn{background:none;border:none;cursor:pointer;padding:0;width:40px;height:40px;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:#fff}.inline-btn:active{opacity:.5}.inline-btn--end{margin-left:auto}.inline-time{color:rgba(255,255,255,.9);font-size:12px;margin-left:4px;white-space:nowrap;font-family:sans-serif}.inline-live-badge{display:inline-block;background:#e53935;color:#fff!important;font-size:10px!important;font-weight:700;padding:2px 7px;border-radius:3px;margin-left:8px;font-family:sans-serif;letter-spacing:.8px;white-space:nowrap;opacity:1!important;text-transform:uppercase;line-height:16px}.inline-settings-popup{position:absolute;bottom:calc(100% + 2px);right:4px;background:rgba(20,20,20,.97);border-radius:6px;min-width:220px;max-height:260px;overflow-y:auto;z-index:20;box-shadow:0 4px 16px rgba(0,0,0,.5)}.inline-settings-header{display:flex;align-items:center;gap:8px;color:#fff;font-size:13px;font-family:sans-serif;padding:10px 14px;cursor:pointer;border-bottom:1px solid rgba(255,255,255,.08);opacity:.9}.inline-settings-item{display:flex;align-items:center;color:#fff;font-size:13px;padding:10px 14px;cursor:pointer;font-family:sans-serif;opacity:.85}.inline-settings-item.active{font-weight:600;opacity:1;background:rgba(255,255,255,.08)}.inline-settings-item:active{background:rgba(255,255,255,.12)}.inline-settings-icon{width:20px;height:20px;flex-shrink:0;margin-right:12px;opacity:.85}.inline-settings-label{flex:1}.inline-settings-sub{font-size:11px;opacity:.55;margin-left:8px;white-space:nowrap}\n'],encapsulation:2}),K})()},4044:(Ot,ft,Le)=>{"use strict";Le.d(ft,{GG:()=>Re,tJ:()=>ce});const Re={language:"es",autoplay:!0,muted:!1,controls:!0,fluid:!0,preload:"auto",techOrder:["html5","youtube"],liveui:!0,userActions:{hotkeys:!0},sources:[],html5:{hls:{overrideNative:!0}},controlBar:{volumePanel:{inline:!1,vertical:!0},seekToLive:!1,currentTimeDisplay:!0,timeDivider:!0,durationDisplay:!0,remainingTimeDisplay:!1}},A=Object.assign(Object.assign({},Re),{muted:!0,controlBar:{volumePanel:{inline:!1,vertical:!0},seekToLive:!0,currentTimeDisplay:!1,timeDivider:!1,durationDisplay:!1,remainingTimeDisplay:!1}}),ce=Object.assign(Object.assign({},A),{html5:{vhs:{overrideNative:!0,autoLevelEnabled:!1,liveSyncDurationCount:10,liveRangeSafeTimeDelta:20,maxBufferLength:120}}})},9714:(Ot,ft,Le)=>{"use strict";Le.d(ft,{$:()=>A});var Re=Le(5421);class A{static convertResponse(me){var be;if(me)return Object.assign(Object.assign({},Re.j.convertResponse(me)),{mobile:me.movil,url:me.url,web:me.web,target:null!==(be=me.target)&&void 0!==be?be:"_blank"})}static convertHomePlayerAdsResponse(me){return me?me.map(be=>({image:be.field_image,url:be.field_image_1})):[]}}},5421:(Ot,ft,Le)=>{"use strict";Le.d(ft,{j:()=>A});var Re=Le(5166);class A{static convertResponse(me){return{order:+(null==me?void 0:me.order),status:(0,Re.oA)(null==me?void 0:me.status)}}}},8960:(Ot,ft,Le)=>{"use strict";Le.d(ft,{e:()=>$e});var Re=Le(2340),A=Le(4071),ce=Le(5433),me=Le(1571),be=Le(529);let $e=(()=>{class xe{constructor(Xe){this.http=Xe,this.api=Re.N.domain}getUserId(){var Xe;const ae=null===(Xe=A.k.get())||void 0===Xe?void 0:Xe.accessToken;if(!ae)return null;const Oe=ce.p.getDataFromToken(ae);return(null==Oe?void 0:Oe.sub)||(null==Oe?void 0:Oe.userId)||(null==Oe?void 0:Oe.id)||null}getRecommendations(){const Xe=this.getUserId();return Xe?this.http.get(`${this.api}/api/open/general/recommendations/${Xe}`):null}markAsWatched(Xe){const ae=this.getUserId();return ae?this.http.patch(`${this.api}/api/open/general/recommendations/${ae}/watched/${Xe}`,{}):null}}return xe.\u0275fac=function(Xe){return new(Xe||xe)(me.LFG(be.eN))},xe.\u0275prov=me.Yz7({token:xe,factory:xe.\u0275fac,providedIn:"root"}),xe})()},125:(Ot,ft,Le)=>{"use strict";Le.d(ft,{L:()=>ae});var Re=Le(7582),A=Le(1281),ce=Le(4004),me=Le(6925),be=Le(5166);class $e{static convertResponse(de){var at,ct;let pt=de?de[0]:null;if(pt)return{startDate:me.O.getStartDate(pt.field_fecha),endDate:me.O.getEndDate(pt.field_fecha),url:pt.field_play,typeAccess:null===(at=pt.field_tipo_acceso)||void 0===at?void 0:at.toLowerCase(),country:null===(ct=pt.field_pais)||void 0===ct?void 0:ct.toLowerCase(),isRequestRouter:(0,be.oA)(pt.field_request_router_status),urlRequestRouter:pt.field_request_router,type:pt.field_tipo,title:pt.title,nid:pt.nid}}}class xe{static convertScheduleResponse(de){const at=de||[];return{channelOne:xe.getChannelItemsSchedule(at,"tv canal 1"),channelTwo:xe.getChannelItemsSchedule(at,"tv canal 2")}}static getChannelItemsSchedule(de,at){let ct=de.filter(pt=>(0,be.Bw)(pt.field_tipo,at));return ct=ct.map(xe.createItemSchedule),ct=xe.sortItemsSchedule(ct),ct}static createItemSchedule(de){let at=(0,be.sl)(de.field_hora_inicio);at=me.O.createDateByHoursAndMinutes(at);let ct=(0,be.sl)(de.field_hora_fin);return ct=me.O.createDateByHoursAndMinutes(ct),{startDate:at,endDate:ct,title:de.title,de
3scription:(0,be.I4)(de.body),duration:ct.diff(at,"minutes")}}static sortItemsSchedule(de){return de.sort((at,ct)=>at.startDate.isBefore(ct.startDate)?-1:at.startDate.isAfter(ct.startDate)?1:0)}}var Pe=Le(1571),Xe=Le(529);let ae=(()=>{class Oe{constructor(at){this._httpClient=at}getChannel(at){return(0,Re.mG)(this,void 0,void 0,function*(){return this._httpClient.get(`${A.b.tv}/canal${at}`).pipe((0,ce.U)($e.convertResponse)).toPromise()})}getChannelsProgramming(){return(0,Re.mG)(this,void 0,void 0,function*(){return this._httpClient.get(`${A.b.channelProgramming}`).pipe((0,ce.U)(xe.convertScheduleResponse)).toPromise()})}}return Oe.\u0275fac=function(at){return new(at||Oe)(Pe.LFG(Xe.eN))},Oe.\u0275prov=Pe.Yz7({token:Oe,factory:Oe.\u0275fac,providedIn:"root"}),Oe})()},7087:(Ot,ft,Le)=>{"use strict";Le.d(ft,{F:()=>de});var Re=Le(7582),A=Le(9808),ce=Le(4004),me=Le(1928),be=Le(7307),$e=Le(9714),xe=Le(1571),Pe=Le(1281),Xe=Le(4841),ae=Le(529);let Oe=(()=>{class at{constructor(pt){this._httpClient=pt,this.apiUrl=Pe.b.ads}getAll(){return this._httpClient.get(this.apiUrl).pipe((0,ce.U)(Xe.I.convertResponse))}get(pt){return this._httpClient.get(`${this.apiUrl}/${null!=pt?pt:""}`)}save(pt){return this._httpClient.post(this.apiUrl,pt)}getHomePlayerAds(){return this._httpClient.get(`${Pe.b.homePlayerAds}`)}}return at.\u0275fac=function(pt){return new(pt||at)(xe.LFG(ae.eN))},at.\u0275prov=xe.Yz7({token:at,factory:at.\u0275fac,providedIn:"root"}),at})(),de=(()=>{class at{constructor(pt){this._adsHttp=pt}findAds(){return(0,Re.mG)(this,void 0,void 0,function*(){let pt="",sr="",rr="",Je="";const rt=yield(0,A.n)(this._adsHttp.get());if(rt.length>0&&rt.length<=1)pt=rt[0].nid,sr=rt[0].field_playlist,rr=rt[0].title,Je=rt[0].field_link_de_anuncio;else if(rt.length>0&&rt.length>1){const Dt=me.n.get(be.P.ads);for(const Mt of rt){if(pt=Mt.nid,sr=Mt.field_playlist,rr=Mt.title,Je=rt[0].field_link_de_anuncio,!Dt)break;if(Mt.nid==Dt){const ht=rt[rt.indexOf(Mt)+1];if(ht){pt=ht.nid,sr=ht.field_playlist,rr=ht.title,Je=rt[0].field_link_de_anuncio;break}pt=rt[0].nid,sr=rt[0].field_playlist,rr=rt[0].title,Je=rt[0].field_link_de_anuncio;break}}}return pt&&me.n.set(be.P.ads,pt),{src:sr,title:rr,link:Je}})}findHomePlayerAds(){return(0,Re.mG)(this,void 0,void 0,function*(){return yield(0,A.n)(this._adsHttp.getHomePlayerAds().pipe((0,ce.U)($e.$.convertHomePlayerAdsResponse)))})}}return at.\u0275fac=function(pt){return new(pt||at)(xe.LFG(Oe))},at.\u0275prov=xe.Yz7({token:at,factory:at.\u0275fac,providedIn:"root"}),at})()},3992:(Ot,ft,Le)=>{"use strict";var Re=Le(9226);Ot.exports=function(be,$e){return void 0===$e&&($e=!1),function(xe,Pe,Xe){if(xe)be(xe);else if(Pe.statusCode>=400&&Pe.statusCode<=599){var ae=Xe;if($e)if(Re.TextDecoder){var Oe=function ce(me){return void 0===me&&(me=""),me.toLowerCase().split(";").reduce(function(be,$e){var xe=$e.split("="),Xe=xe[1];return"charset"===xe[0].trim()?Xe.trim():be},"utf-8")}(Pe.headers&&Pe.headers["content-type"]);try{ae=new TextDecoder(Oe).decode(Xe)}catch(de){}}else ae=String.fromCharCode.apply(null,new Uint8Array(Xe));be({cause:ae})}else be(null,Xe)}}},745:(Ot,ft,Le)=>{"use strict";var Re=Le(9226),A=Le(434),ce=Le(2703);Pe.httpHandler=Le(3992);
4/**
5       * @license
6       * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
7       * Copyright (c) 2014 David Björklund
8       * Available under the MIT license
9       * <https://github.com/kesla/parse-headers/blob/master/LICENCE>
10       */
11var me=function(at){var ct={};return at&&at.trim().split("\n").forEach(function(pt){var sr=pt.indexOf(":"),rr=pt.slice(0,sr).trim().toLowerCase(),Je=pt.slice(sr+1).trim();typeof ct[rr]>"u"?ct[rr]=Je:Array.isArray(ct[rr])?ct[rr].push(Je):ct[rr]=[ct[rr],Je]}),ct};function xe(de,at,ct){var pt=de;return ce(at)?(ct=at,"string"==typeof de&&(pt={uri:de})):pt=A({},at,{uri:de}),pt.callback=ct,pt}function Pe(de,at,ct){return Xe(at=xe(de,at,ct))}function Xe(de){if(typeof de.callback>"u")throw new Error("callback argument missing");var at=!1,ct=function(ue,O,Qe){at||(at=!0,de.callback(ue,O,Qe))};function sr(){var Ae=void 0;if(Ae=rt.response?rt.response:rt.responseText||function ae(de){try{if("document"===de.responseType)return de.responseXML;if(""===de.responseType&&(!de.responseXML||"parsererror"!==de.responseXML.documentElement.nodeName))return de.responseXML}catch(ct){}return null}(rt),X)try{Ae=JSON.parse(Ae)}catch(ue){}return Ae}function rr(Ae){return clearTimeout(ke),Ae instanceof Error||(Ae=new Error(""+(Ae||"Unknown XMLHttpRequest Error"))),Ae.statusCode=0,ct(Ae,it)}function Je(){if(!Mt){var Ae;clearTimeout(ke);var ue=it,O=null;return 0!==(Ae=de.useXDR&&void 0===rt.status?200:1223===rt.status?204:rt.status)?(ue={body:sr(),statusCode:Ae,method:er,headers:{},url:ht,rawRequest:rt},rt.getAllResponseHeaders&&(ue.headers=me(rt.getAllResponseHeaders()))):O=new Error("Internal XMLHttpRequest Error"),ct(O,ue,ue.body)}}var rt=de.xhr||null;rt||(rt=de.cors||de.useXDR?new Pe.XDomainRequest:new Pe.XMLHttpRequest);var Dt,Mt,ke,ht=rt.url=de.uri||de.url,er=rt.method=de.method||"GET",qt=de.body||de.data,Ft=rt.headers=de.headers||{},ie=!!de.sync,X=!1,it={body:void 0,headers:{},statusCode:0,method:er,url:ht,rawRequest:rt};if("json"in de&&!1!==de.json&&(X=!0,Ft.accept||Ft.Accept||(Ft.Accept="application/json"),"GET"!==er&&"HEAD"!==er&&(Ft["content-type"]||Ft["Content-Type"]||(Ft["Content-Type"]="application/json"),qt=JSON.stringify(!0===de.json?qt:de.json))),rt.onreadystatechange=function pt(){4===rt.readyState&&setTimeout(Je,0)},rt.onload=Je,rt.onerror=rr,rt.onprogress=function(){},rt.onabort=function(){Mt=!0},rt.ontimeout=rr,rt.open(er,ht,!ie,de.username,de.password),ie||(rt.withCredentials=!!de.withCredentials),!ie&&de.timeout>0&&(ke=setTimeout(function(){if(!Mt){Mt=!0,rt.abort("timeout");var Ae=new Error("XMLHttpRequest timeout");Ae.code="ETIMEDOUT",rr(Ae)}},de.timeout)),rt.setRequestHeader)for(Dt in Ft)Ft.hasOwnProperty(Dt)&&rt.setRequestHeader(Dt,Ft[Dt]);else if(de.headers&&!function $e(de){for(var at in de)if(de.hasOwnProperty(at))return!1;return!0}(de.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in de&&(rt.responseType=de.responseType),"beforeSend"in de&&"function"==typeof de.beforeSend&&de.beforeSend(rt),rt.send(qt||null),rt}
vendor: 6,307 bytes, line 11
11Ot.exports=Pe,Ot.exports.default=Pe,Pe.XMLHttpRequest=Re.XMLHttpRequest||function Oe(){},Pe.XDomainRequest="withCredentials"in new Pe.XMLHttpRequest?Pe.XMLHttpRequest:Re.XDomainRequest,function be(de,at){for(var ct=0;ct<de.length;ct++)at(de[ct])}(["get","put","post","patch","head","delete"],function(de){Pe["delete"===de?"del":de]=function(at,ct,pt){return(ct=xe(at,ct,pt)).method=de.toUpperCase(),Xe(ct)}})},9401:(Ot,ft)=>{"use strict";function Re(be,$e){return void 0===$e&&($e=Object),$e&&"function"==typeof $e.freeze?$e.freeze(be):be}var ce=Re({HTML:"text/html",isHTML:function(be){return be===ce.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),me=Re({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(be){return be===me.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});ft.assign=function A(be,$e){if(null===be||"object"!=typeof be)throw new TypeError("target is not an object");for(var xe in $e)Object.prototype.hasOwnProperty.call($e,xe)&&(be[xe]=$e[xe]);return be},ft.find=function Le(be,$e,xe){if(void 0===xe&&(xe=Array.prototype),be&&"function"==typeof xe.find)return xe.find.call(be,$e);for(var Pe=0;Pe<be.length;Pe++)if(Object.prototype.hasOwnProperty.call(be,Pe)){var Xe=be[Pe];if($e.call(void 0,Xe,Pe,be))return Xe}},ft.freeze=Re,ft.MIME_TYPE=ce,ft.NAMESPACE=me},1991:(Ot,ft,Le)=>{var A=Le(9401),ce=Le(6853),me=Le(4436),be=Le(8702),$e=ce.DOMImplementation,xe=A.NAMESPACE,Pe=be.ParseError,Xe=be.XMLReader;function ae(Je){return Je.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function Oe(Je){this.options=Je||{locator:{}}}function at(){this.cdata=!1}function ct(Je,rt){rt.lineNumber=Je.lineNumber,rt.columnNumber=Je.columnNumber}function pt(Je){if(Je)return"\n@"+(Je.systemId||"")+"#[line:"+Je.lineNumber+",col:"+Je.columnNumber+"]"}function sr(Je,rt,Dt){return"string"==typeof Je?Je.substr(rt,Dt):Je.length>=rt+Dt||rt?new java.lang.String(Je,rt,Dt)+"":Je}function rr(Je,rt){Je.currentElement?Je.currentElement.appendChild(rt):Je.doc.appendChild(rt)}Oe.prototype.parseFromString=function(Je,rt){var Dt=this.options,Mt=new Xe,ht=Dt.domBuilder||new at,er=Dt.errorHandler,qt=Dt.locator,Ft=Dt.xmlns||{},ie=/\/x?html?$/.test(rt),X=ie?me.HTML_ENTITIES:me.XML_ENTITIES;return qt&&ht.setDocumentLocator(qt),Mt.errorHandler=function de(Je,rt,Dt){if(!Je){if(rt instanceof at)return rt;Je=rt}var Mt={},ht=Je instanceof Function;function er(qt){var Ft=Je[qt];!Ft&&ht&&(Ft=2==Je.length?function(ie){Je(qt,ie)}:Je),Mt[qt]=Ft&&function(ie){Ft("[xmldom "+qt+"]\t"+ie+pt(Dt))}||function(){}}return Dt=Dt||{},er("warning"),er("error"),er("fatalError"),Mt}(er,ht,qt),Mt.domBuilder=Dt.domBuilder||ht,ie&&(Ft[""]=xe.HTML),Ft.xml=Ft.xml||xe.XML,Je&&"string"==typeof Je?Mt.parse((Dt.normalizeLineEndings||ae)(Je),Ft,X):Mt.errorHandler.error("invalid doc source"),ht.doc},at.prototype={startDocument:function(){this.doc=(new $e).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(Je,rt,Dt,Mt){var ht=this.doc,er=ht.createElementNS(Je,Dt||rt),qt=Mt.length;rr(this,er),this.currentElement=er,this.locator&&ct(this.locator,er);for(var Ft=0;Ft<qt;Ft++){Je=Mt.getURI(Ft);var ie=Mt.getValue(Ft),X=(Dt=Mt.getQName(Ft),ht.createAttributeNS(Je,Dt));this.locator&&ct(Mt.getLocator(Ft),X),X.value=X.nodeValue=ie,er.setAttributeNode(X)}},endElement:function(Je,rt,Dt){this.currentElement=this.currentElement.parentNode},startPrefixMapping:function(Je,rt){},endPrefixMapping:function(Je){},processingInstruction:function(Je,rt){var Dt=this.doc.createProcessingInstruction(Je,rt);this.locator&&ct(this.locator,Dt),rr(this,Dt)},ignorableWhitespace:function(Je,rt,Dt){},characters:function(Je,rt,Dt){if(Je=sr.apply(this,arguments)){if(this.cdata)var Mt=this.doc.createCDATASection(Je);else Mt=this.doc.createTextNode(Je);this.currentElement?this.currentElement.appendChild(Mt):/^\s*$/.test(Je)&&this.doc.appendChild(Mt),this.locator&&ct(this.locator,Mt)}},skippedEntity:function(Je){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(Je){(this.locator=Je)&&(Je.lineNumber=0)},comment:function(Je,rt,Dt){Je=sr.apply(this,arguments);var Mt=this.doc.createComment(Je);this.locator&&ct(this.locator,Mt),rr(this,Mt)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(Je,rt,Dt){var Mt=this.doc.implementation;if(Mt&&Mt.createDocumentType){var ht=Mt.createDocumentType(Je,rt,Dt);this.locator&&ct(this.locator,ht),rr(this,ht),this.doc.doctype=ht}},warning:function(Je){console.warn("[xmldom warning]\t"+Je,pt(this.locator))},error:function(Je){console.error("[xmldom error]\t"+Je,pt(this.locator))},fatalError:function(Je){throw new Pe(Je,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(Je){at.prototype[Je]=function(){return null}}),ft.DOMParser=Oe},6853:(Ot,ft,Le)=>{var Re=Le(9401),A=Re.find,ce=Re.NAMESPACE;function me(z){return""!==z}function $e(z,Q){return z.hasOwnProperty(Q)||(z[Q]=!0),z}function xe(z){if(!z)return[];var Q=function be(z){return z?z.split(/[\t\n\f\r ]+/).filter(me):[]}(z);return Object.keys(Q.reduce($e,{}))}function Xe(z,Q){for(var ve in z)Object.prototype.hasOwnProperty.call(z,ve)&&(Q[ve]=z[ve])}function ae(z,Q){var ve=z.prototype;if(!(ve instanceof Q)){let ut=function(){};ut.prototype=Q.prototype,ut=new ut,Xe(ve,ut),z.prototype=ve=ut}ve.constructor!=z&&("function"!=typeof z&&console.error("unknown Class:"+z),ve.constructor=z)}var Oe={},de=Oe.ELEMENT_NODE=1,at=Oe.ATTRIBUTE_NODE=2,ct=Oe.TEXT_NODE=3,pt=Oe.CDATA_SECTION_NODE=4,sr=Oe.ENTITY_REFERENCE_NODE=5,rr=Oe.ENTITY_NODE=6,Je=Oe.PROCESSING_INSTRUCTION_NODE=7,rt=Oe.COMMENT_NODE=8,Dt=Oe.DOCUMENT_NODE=9,Mt=Oe.DOCUMENT_TYPE_NODE=10,ht=Oe.DOCUMENT_FRAGMENT_NODE=11,er=Oe.NOTATION_NODE=12,qt={},Ft={},ke=(qt.INDEX_SIZE_ERR=(Ft[1]="Index size error",1),qt.DOMSTRING_SIZE_ERR=(Ft[2]="DOMString size error",2),qt.HIERARCHY_REQUEST_ERR=(Ft[3]="Hierarchy request error",3)),Qe=(qt.WRONG_DOCUMENT_ERR=(Ft[4]="Wrong document",4),qt.INVALID_CHARACTER_ERR=(Ft[5]="Invalid character",5),qt.NO_DATA_ALLOWED_ER
vendor: 4,221 bytes, line 11
11R=(Ft[6]="No data allowed",6),qt.NO_MODIFICATION_ALLOWED_ERR=(Ft[7]="No modification allowed",7),qt.NOT_FOUND_ERR=(Ft[8]="Not found",8)),Fe=(qt.NOT_SUPPORTED_ERR=(Ft[9]="Not supported",9),qt.INUSE_ATTRIBUTE_ERR=(Ft[10]="Attribute in use",10));function Rt(z,Q){if(Q instanceof Error)var ve=Q;else ve=this,Error.call(this,Ft[z]),this.message=Ft[z],Error.captureStackTrace&&Error.captureStackTrace(this,Rt);return ve.code=z,Q&&(this.message=this.message+": "+Q),ve}function wt(){}function Or(z,Q){this._node=z,this._refresh=Q,pr(this)}function pr(z){var Q=z._node._inc||z._node.ownerDocument._inc;if(z._inc!==Q){var ve=z._refresh(z._node);if(ra(z,"length",ve.length),!z.$$length||ve.length<z.$$length)for(var Me=ve.length;Me in z;Me++)Object.prototype.hasOwnProperty.call(z,Me)&&delete z[Me];Xe(ve,z),z._inc=Q}}function Vt(){}function Ir(z,Q){for(var ve=z.length;ve--;)if(z[ve]===Q)return ve}function Mr(z,Q,ve,Me){if(Me?Q[Ir(Q,Me)]=ve:Q[Q.length++]=ve,z){ve.ownerElement=z;var ut=z.ownerDocument;ut&&(Me&&gr(ut,z,Me),function Yn(z,Q,ve){z&&z._inc++,ve.namespaceURI===ce.XMLNS&&(Q._nsMap[ve.prefix?ve.localName:""]=ve.value)}(ut,z,ve))}}function rn(z,Q,ve){var Me=Ir(Q,ve);if(!(Me>=0))throw new Rt(Qe,new Error(z.tagName+"@"+ve));for(var ut=Q.length-1;Me<ut;)Q[Me]=Q[++Me];if(Q.length=ut,z){var Bt=z.ownerDocument;Bt&&(gr(Bt,z,ve),ve.ownerElement=null)}}function Pr(){}function Nt(){}function Fr(z){return("<"==z?"&lt;":">"==z&&"&gt;")||"&"==z&&"&amp;"||'"'==z&&"&quot;"||"&#"+z.charCodeAt()+";"}function ki(z,Q){if(Q(z))return!0;if(z=z.firstChild)do{if(ki(z,Q))return!0}while(z=z.nextSibling)}function Kt(){this.ownerDocument=this}function gr(z,Q,ve,Me){z&&z._inc++,ve.namespaceURI===ce.XMLNS&&delete Q._nsMap[ve.prefix?ve.localName:""]}function Qi(z,Q,ve){if(z&&z._inc){z._inc++;var Me=Q.childNodes;if(ve)Me[Me.length++]=ve;else{for(var ut=Q.firstChild,Bt=0;ut;)Me[Bt++]=ut,ut=ut.nextSibling;Me.length=Bt,delete Me[Me.length]}}}function zn(z,Q){var ve=Q.previousSibling,Me=Q.nextSibling;return ve?ve.nextSibling=Me:z.firstChild=Me,Me?Me.previousSibling=ve:z.lastChild=ve,Q.parentNode=null,Q.previousSibling=null,Q.nextSibling=null,Qi(z.ownerDocument,z),Q}function Si(z){return z&&z.nodeType===Nt.DOCUMENT_TYPE_NODE}function Ui(z){return z&&z.nodeType===Nt.ELEMENT_NODE}function fa(z){return z&&z.nodeType===Nt.TEXT_NODE}function yt(z,Q){var ve=z.childNodes||[];if(A(ve,Ui)||Si(Q))return!1;var Me=A(ve,Si);return!(Q&&Me&&ve.indexOf(Me)>ve.indexOf(Q))}function ns(z,Q){var ve=z.childNodes||[];if(A(ve,function Me(Bt){return Ui(Bt)&&Bt!==Q}))return!1;var ut=A(ve,Si);return!(Q&&ut&&ve.indexOf(ut)>ve.indexOf(Q))}function Yr(z,Q,ve){var Me=z.childNodes||[],ut=Q.childNodes||[];if(Q.nodeType===Nt.DOCUMENT_FRAGMENT_NODE){var Bt=ut.filter(Ui);if(Bt.length>1||A(ut,fa))throw new Rt(ke,"More than one element or text in fragment");if(1===Bt.length&&!yt(z,ve))throw new Rt(ke,"Element in fragment can not be inserted before doctype")}if(Ui(Q)&&!yt(z,ve))throw new Rt(ke,"Only one element can be added and only after doctype");if(Si(Q)){if(A(Me,Si))throw new Rt(ke,"Only one doctype is allowed");var dr=A(Me,Ui);if(ve&&Me.indexOf(dr)<Me.indexOf(ve))throw new Rt(ke,"Doctype can only be inserted before an element");if(!ve&&dr)throw new Rt(ke,"Doctype can not be appended since element is present")}}function $n(z,Q,ve){var Me=z.childNodes||[],ut=Q.childNodes||[];if(Q.nodeType===Nt.DOCUMENT_FRAGMENT_NODE){var Bt=ut.filter(Ui);if(Bt.length>1||A(ut,fa))throw new Rt(ke,"More than one element or text in fragment");if(1===Bt.length&&!ns(z,ve))throw new Rt(ke,"Element in fragment can not be inserted before doctype")}if(Ui(Q)&&!ns(z,ve))throw new Rt(ke,"Only one element can be added and only after doctype");if(Si(Q)){if(A(Me,function(Jt){return Si(Jt)&&Jt!==ve}))throw new Rt(ke,"Only one doctype is allowed");var dr=A(Me,Ui);if(ve&&Me.indexOf(dr)<Me.indexOf(ve))throw new Rt(ke,"Doctype can only be inserted before an element")}}function Xn(z,Q,ve,Me){(function jt(z,Q,ve){if(!function mr(z){return z&&(z.nodeType===Nt.DOCUMENT_NODE||z.nodeType===Nt.DOCUMENT_FRAGMENT_NODE||z.nodeType===Nt.ELEMENT_NODE)}(z))throw new Rt(ke,"Unexpected parent node type "+z.nodeType);if(ve&&ve.parentNode!==z)throw new Rt(Qe,"child not in parent");
vendor: 4,358 bytes, line 11
11if(!function pi(z){return z&&(Ui(z)||fa(z)||Si(z)||z.nodeType===Nt.DOCUMENT_FRAGMENT_NODE||z.nodeType===Nt.COMMENT_NODE||z.nodeType===Nt.PROCESSING_INSTRUCTION_NODE)}(Q)||Si(Q)&&z.nodeType!==Nt.DOCUMENT_NODE)throw new Rt(ke,"Unexpected node type "+Q.nodeType+" for parent node type "+z.nodeType)})(z,Q,ve),z.nodeType===Nt.DOCUMENT_NODE&&(Me||Yr)(z,Q,ve);var ut=Q.parentNode;if(ut&&ut.removeChild(Q),Q.nodeType===ht){var Bt=Q.firstChild;if(null==Bt)return Q;var dr=Q.lastChild}else Bt=dr=Q;var $r=ve?ve.previousSibling:z.lastChild;Bt.previousSibling=$r,dr.nextSibling=ve,$r?$r.nextSibling=Bt:z.firstChild=Bt,null==ve?z.lastChild=dr:ve.previousSibling=dr;do{Bt.parentNode=z}while(Bt!==dr&&(Bt=Bt.nextSibling));return Qi(z.ownerDocument||z,z),Q.nodeType==ht&&(Q.firstChild=Q.lastChild=null),Q}function hn(){this._nsMap={}}function Qn(){}function vn(){}function Mn(){}function Zn(){}function Jn(){}function lr(){}function Vi(){}function ou(){}function ka(){}function Fn(){}function as(){}function ea(){}function zr(z,Q){var ve=[],Me=9==this.nodeType&&this.documentElement||this,ut=Me.prefix,Bt=Me.namespaceURI;if(Bt&&null==ut&&null==(ut=Me.lookupPrefix(Bt)))var dr=[{namespace:Bt,prefix:null}];return Ri(this,ve,z,Q,dr),ve.join("")}function ai(z,Q,ve){var Me=z.prefix||"",ut=z.namespaceURI;if(!ut||"xml"===Me&&ut===ce.XML||ut===ce.XMLNS)return!1;for(var Bt=ve.length;Bt--;){var dr=ve[Bt];if(dr.prefix===Me)return dr.namespace!==ut}return!0}function ca(z,Q,ve){z.push(" ",Q,'="',ve.replace(/[<>&"\t\n\r]/g,Fr),'"')}function Ri(z,Q,ve,Me,ut){if(ut||(ut=[]),Me){if(!(z=Me(z)))return;if("string"==typeof z)return void Q.push(z)}switch(z.nodeType){case de:var Bt=z.attributes,dr=Bt.length,Tr=z.firstChild,$r=z.tagName,wi=$r;if(!(ve=ce.isHTML(z.namespaceURI)||ve)&&!z.prefix&&z.namespaceURI){for(var Jt,Xr=0;Xr<Bt.length;Xr++)if("xmlns"===Bt.item(Xr).name){Jt=Bt.item(Xr).value;break}if(!Jt)for(var bi=ut.length-1;bi>=0;bi--)if(""===(nn=ut[bi]).prefix&&nn.namespace===z.namespaceURI){Jt=nn.namespace;break}if(Jt!==z.namespaceURI)for(bi=ut.length-1;bi>=0;bi--){var nn;if((nn=ut[bi]).namespace===z.namespaceURI){nn.prefix&&(wi=nn.prefix+":"+$r);break}}}Q.push("<",wi);for(var pn=0;pn<dr;pn++)"xmlns"==(Hi=Bt.item(pn)).prefix?ut.push({prefix:Hi.localName,namespace:Hi.value}):"xmlns"==Hi.nodeName&&ut.push({prefix:"",namespace:Hi.value});for(pn=0;pn<dr;pn++){var Hi,Oi,Nn;ai(Hi=Bt.item(pn),0,ut)&&(ca(Q,(Oi=Hi.prefix||"")?"xmlns:"+Oi:"xmlns",Nn=Hi.namespaceURI),ut.push({prefix:Oi,namespace:Nn})),Ri(Hi,Q,ve,Me,ut)}if($r===wi&&ai(z,0,ut)&&(ca(Q,(Oi=z.prefix||"")?"xmlns:"+Oi:"xmlns",Nn=z.namespaceURI),ut.push({prefix:Oi,namespace:Nn})),Tr||ve&&!/^(?:meta|link|img|br|hr|input)$/i.test($r)){if(Q.push(">"),ve&&/^script$/i.test($r))for(;Tr;)Tr.data?Q.push(Tr.data):Ri(Tr,Q,ve,Me,ut.slice()),Tr=Tr.nextSibling;else for(;Tr;)Ri(Tr,Q,ve,Me,ut.slice()),Tr=Tr.nextSibling;Q.push("</",wi,">")}else Q.push("/>");return;case Dt:case ht:for(Tr=z.firstChild;Tr;)Ri(Tr,Q,ve,Me,ut.slice()),Tr=Tr.nextSibling;return;case at:return ca(Q,z.name,z.value);case ct:return Q.push(z.data.replace(/[<&>]/g,Fr));case pt:return Q.push("<![CDATA[",z.data,"]]>");case rt:return Q.push("\x3c!--",z.data,"--\x3e");case Mt:var Bn=z.publicId,an=z.systemId;if(Q.push("<!DOCTYPE ",z.name),Bn)Q.push(" PUBLIC ",Bn),an&&"."!=an&&Q.push(" ",an),Q.push(">");else if(an&&"."!=an)Q.push(" SYSTEM ",an,">");else{var ss=z.internalSubset;ss&&Q.push(" [",ss,"]"),Q.push(">")}return;case Je:return Q.push("<?",z.target," ",z.data,"?>");case sr:return Q.push("&",z.nodeName,";");default:Q.push("??",z.nodeName)}}function Ra(z,Q,ve){var Me;switch(Q.nodeType){case de:(Me=Q.cloneNode(!1)).ownerDocument=z;case ht:break;case at:ve=!0}if(Me||(Me=Q.cloneNode(!1)),Me.ownerDocument=z,Me.parentNode=null,ve)for(var ut=Q.firstChild;ut;)Me.appendChild(Ra(z,ut,ve)),ut=ut.nextSibling;return Me}function ta(z,Q,ve){var Me=new Q.constructor;for(var ut in Q)if(Object.prototype.hasOwnProperty.call(Q,ut)){var Bt=Q[ut];"object"!=typeof Bt&&Bt!=Me[ut]&&(Me[ut]=Bt)}switch(Q.childNodes&&(Me.childNodes=new wt),Me.ownerDocument=z,Me.nodeType){case de:var dr=Q.attributes,$r=Me.attributes=new Vt,wi=dr.length;$r._ownerElement=Me;for(var Jt=0;Jt<wi;Jt++)Me.setAttributeNode(ta(z,dr.item(Jt),!0));break;case at:ve=!0}if(ve)for(var Xr=Q.firstChild;Xr;)Me.appendChild(ta(z,Xr,ve)),Xr=Xr.nextSibling;return Me}function ra(z,Q,ve){z[Q]=ve}
vendor: 8,238 bytes, line 11
11qt.INVALID_STATE_ERR=(Ft[11]="Invalid state",11),qt.SYNTAX_ERR=(Ft[12]="Syntax error",12),qt.INVALID_MODIFICATION_ERR=(Ft[13]="Invalid modification",13),qt.NAMESPACE_ERR=(Ft[14]="Invalid namespace",14),qt.INVALID_ACCESS_ERR=(Ft[15]="Invalid access",15),Rt.prototype=Error.prototype,Xe(qt,Rt),wt.prototype={length:0,item:function(z){return z>=0&&z<this.length?this[z]:null},toString:function(z,Q){for(var ve=[],Me=0;Me<this.length;Me++)Ri(this[Me],ve,z,Q);return ve.join("")},filter:function(z){return Array.prototype.filter.call(this,z)},indexOf:function(z){return Array.prototype.indexOf.call(this,z)}},Or.prototype.item=function(z){return pr(this),this[z]||null},ae(Or,wt),Vt.prototype={length:0,item:wt.prototype.item,getNamedItem:function(z){for(var Q=this.length;Q--;){var ve=this[Q];if(ve.nodeName==z)return ve}},setNamedItem:function(z){var Q=z.ownerElement;if(Q&&Q!=this._ownerElement)throw new Rt(Fe);var ve=this.getNamedItem(z.nodeName);return Mr(this._ownerElement,this,z,ve),ve},setNamedItemNS:function(z){var ve,Q=z.ownerElement;if(Q&&Q!=this._ownerElement)throw new Rt(Fe);return ve=this.getNamedItemNS(z.namespaceURI,z.localName),Mr(this._ownerElement,this,z,ve),ve},removeNamedItem:function(z){var Q=this.getNamedItem(z);return rn(this._ownerElement,this,Q),Q},removeNamedItemNS:function(z,Q){var ve=this.getNamedItemNS(z,Q);return rn(this._ownerElement,this,ve),ve},getNamedItemNS:function(z,Q){for(var ve=this.length;ve--;){var Me=this[ve];if(Me.localName==Q&&Me.namespaceURI==z)return Me}return null}},Pr.prototype={hasFeature:function(z,Q){return!0},createDocument:function(z,Q,ve){var Me=new Kt;if(Me.implementation=this,Me.childNodes=new wt,Me.doctype=ve||null,ve&&Me.appendChild(ve),Q){var ut=Me.createElementNS(z,Q);Me.appendChild(ut)}return Me},createDocumentType:function(z,Q,ve){var Me=new lr;return Me.name=z,Me.nodeName=z,Me.publicId=Q||"",Me.systemId=ve||"",Me}},Nt.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(z,Q){return Xn(this,z,Q)},replaceChild:function(z,Q){Xn(this,z,Q,$n),Q&&this.removeChild(Q)},removeChild:function(z){return zn(this,z)},appendChild:function(z){return this.insertBefore(z,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(z){return ta(this.ownerDocument||this,this,z)},normalize:function(){for(var z=this.firstChild;z;){var Q=z.nextSibling;Q&&Q.nodeType==ct&&z.nodeType==ct?(this.removeChild(Q),z.appendData(Q.data)):(z.normalize(),z=Q)}},isSupported:function(z,Q){return this.ownerDocument.implementation.hasFeature(z,Q)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(z){for(var Q=this;Q;){var ve=Q._nsMap;if(ve)for(var Me in ve)if(Object.prototype.hasOwnProperty.call(ve,Me)&&ve[Me]===z)return Me;Q=Q.nodeType==at?Q.ownerDocument:Q.parentNode}return null},lookupNamespaceURI:function(z){for(var Q=this;Q;){var ve=Q._nsMap;if(ve&&Object.prototype.hasOwnProperty.call(ve,z))return ve[z];Q=Q.nodeType==at?Q.ownerDocument:Q.parentNode}return null},isDefaultNamespace:function(z){return null==this.lookupPrefix(z)}},Xe(Oe,Nt),Xe(Oe,Nt.prototype),Kt.prototype={nodeName:"#document",nodeType:Dt,doctype:null,documentElement:null,_inc:1,insertBefore:function(z,Q){if(z.nodeType==ht){for(var ve=z.firstChild;ve;){var Me=ve.nextSibling;this.insertBefore(ve,Q),ve=Me}return z}return Xn(this,z,Q),z.ownerDocument=this,null===this.documentElement&&z.nodeType===de&&(this.documentElement=z),z},removeChild:function(z){return this.documentElement==z&&(this.documentElement=null),zn(this,z)},replaceChild:function(z,Q){Xn(this,z,Q,$n),z.ownerDocument=this,Q&&this.removeChild(Q),Ui(z)&&(this.documentElement=z)},importNode:function(z,Q){return Ra(this,z,Q)},getElementById:function(z){var Q=null;return ki(this.documentElement,function(ve){if(ve.nodeType==de&&ve.getAttribute("id")==z)return Q=ve,!0}),Q},getElementsByClassName:function(z){var Q=xe(z);return new Or(this,function(ve){var Me=[];return Q.length>0&&ki(ve.documentElement,function(ut){if(ut!==ve&&ut.nodeType===de){var Bt=ut.getAttribute("class");if(Bt){var dr=z===Bt;if(!dr){var $r=xe(Bt);dr=Q.every(function Pe(z){return function(Q){return z&&-1!==z.indexOf(Q)}}($r))}dr&&Me.push(ut)}}}),Me})},createElement:function(z){var Q=new hn;return Q.ownerDocument=this,Q.nodeName=z,Q.tagName=z,Q.localName=z,Q.childNodes=new wt,(Q.attributes=new Vt)._ownerElement=Q,Q},createDocumentFragment:function(){var z=new Fn;return z.ownerDocument=this,z.childNodes=new wt,z},createTextNode:function(z){var Q=new Mn;return Q.ownerDocument=this,Q.appendData(z),Q},createComment:function(z){var Q=new Zn;return Q.ownerDocument=this,Q.appendData(z),Q},createCDATASection:function(z){var Q=new Jn;return Q.ownerDocument=this,Q.appendData(z),Q},createProcessingInstruction:function(z,Q){var ve=new as;return ve.ownerDocument=this,ve.tagName=ve.nodeName=ve.target=z,ve.nodeValue=ve.data=Q,ve},createAttribute:function(z){var Q=new Qn;return Q.ownerDocument=this,Q.name=z,Q.nodeName=z,Q.localName=z,Q.specified=!0,Q},createEntityReference:function(z){var Q=new ka;return Q.ownerDocument=this,Q.nodeName=z,Q},createElementNS:function(z,Q){var ve=new hn,Me=Q.split(":"),ut=ve.attributes=new Vt;return ve.childNodes=new wt,ve.ownerDocument=this,ve.nodeName=Q,ve.tagName=Q,ve.namespaceURI=z,2==Me.length?(ve.prefix=Me[0],ve.localName=Me[1]):ve.localName=Q,ut._ownerElement=ve,ve},createAttributeNS:function(z,Q){var ve=new Qn,Me=Q.split(":");return ve.ownerDocument=this,ve.nodeName=Q,ve.name=Q,ve.namespaceURI=z,ve.specified=!0,2==Me.length?(ve.prefix=Me[0],ve.localName=Me[1]):ve.localName=Q,ve}},ae(Kt,Nt),Kt.prototype.getElementsByTagName=(hn.prototype={nodeType:de,hasAttribute:function(z){return null!=this.getAttributeNode(z)},getAttribute:function(z){var Q=this.getAttributeNode(z);return Q&&Q.value||""},getAttributeNode:function(z){return this.attributes.getNamedItem(z)},setAttribute:function(z,Q){var ve=this.ownerDocument.createAttribute(z);ve.value=ve.nodeValue=""+Q,this.setAttributeNode(ve)},removeAttribute:function(z){var Q=this.getAttributeNode(z);Q&&this.removeAttributeNode(Q)},appendChild:function(z){return z.nodeType===ht?this.insertBefore(z,null):function Xt(z,Q){return Q.parentNode&&Q.parentNode.removeChild(Q),Q.parentNode=z,Q.previousSibling=z.lastChild,Q.nextSibling=null,Q.previousSibling?Q.previousSibling.nextSibling=Q:z.firstChild=Q,z.lastChild=Q,Qi(z.ownerDocument,z,Q),Q}(this,z)},setAttributeNode:function(z){return this.attributes.setNamedItem(z)},setAttributeNodeNS:function(z){return this.attributes.setNamedItemNS(z)},removeAttributeNode:function(z){return this.attributes.removeNamedItem(z.nodeName)},removeAttributeNS:function(z,Q){var ve=this.getAttributeNodeNS(z,Q);ve&&this.removeAttributeNode(ve)},hasAttributeNS:function(z,Q){return null!=this.getAttributeNodeNS(z,Q)},getAttributeNS:function(z,Q){var ve=this.getAttributeNodeNS(z,Q);return ve&&ve.value||""},setAttributeNS:function(z,Q,ve){var Me=this.ownerDocument.createAttributeNS(z,Q);Me.value=Me.nodeValue=""+ve,this.setAttributeNode(Me)},getAttributeNodeNS:function(z,Q){return this.attributes.getNamedItemNS(z,Q)},getElementsByTagName:function(z){return new Or(this,function(Q){var ve=[];return ki(Q,function(Me){Me!==Q&&Me.nodeType==de&&("*"===z||Me.tagName==z)&&ve.push(Me)}),ve})},getElementsByTagNameNS:function(z,Q){return new Or(this,function(ve){var Me=[];return ki(ve,function(ut){ut!==ve&&ut.nodeType===de&&("*"===z||ut.namespaceURI===z)&&("*"===Q||ut.localName==Q)&&Me.push(ut)}),Me})}}).getElementsByTagName,Kt.prototype.getElementsByTagNameNS=hn.prototype.getElementsByTagNameNS,ae(hn,Nt),Qn.prototype.nodeType=at,ae(Qn,Nt),vn.prototype={data:"",substringData:function(z,Q){return this.data.substring(z,z+Q)},appendData:function(z){this.nodeValue=this.data=z=this.data+z,this.length=z.length},insertData:function(z,Q){this.replaceData(z,0,Q)},appendChild:function(z){throw new Error(Ft[ke])},deleteData:function(z,Q){this.replaceData(z,Q,"")},replaceData:function(z,Q,ve){var Me=this.data.substring(0,z),ut=this.data.substring(z+Q);this.nodeValue=this.data=ve=Me+ve+ut,this.length=ve.length}}
vendor: 1,726 bytes, line 11
11,ae(vn,Nt),Mn.prototype={nodeName:"#text",nodeType:ct,splitText:function(z){var Q=this.data,ve=Q.substring(z);Q=Q.substring(0,z),this.data=this.nodeValue=Q,this.length=Q.length;var Me=this.ownerDocument.createTextNode(ve);return this.parentNode&&this.parentNode.insertBefore(Me,this.nextSibling),Me}},ae(Mn,vn),Zn.prototype={nodeName:"#comment",nodeType:rt},ae(Zn,vn),Jn.prototype={nodeName:"#cdata-section",nodeType:pt},ae(Jn,vn),lr.prototype.nodeType=Mt,ae(lr,Nt),Vi.prototype.nodeType=er,ae(Vi,Nt),ou.prototype.nodeType=rr,ae(ou,Nt),ka.prototype.nodeType=sr,ae(ka,Nt),Fn.prototype.nodeName="#document-fragment",Fn.prototype.nodeType=ht,ae(Fn,Nt),as.prototype.nodeType=Je,ae(as,Nt),ea.prototype.serializeToString=function(z,Q,ve){return zr.call(z,Q,ve)},Nt.prototype.toString=zr;try{if(Object.defineProperty){let z=function(Q){switch(Q.nodeType){case de:case ht:var ve=[];for(Q=Q.firstChild;Q;)7!==Q.nodeType&&8!==Q.nodeType&&ve.push(z(Q)),Q=Q.nextSibling;return ve.join("");default:return Q.nodeValue}};Object.defineProperty(Or.prototype,"length",{get:function(){return pr(this),this.$$length}}),Object.defineProperty(Nt.prototype,"textContent",{get:function(){return z(this)},set:function(Q){switch(this.nodeType){case de:case ht:for(;this.firstChild;)this.removeChild(this.firstChild);(Q||String(Q))&&this.appendChild(this.ownerDocument.createTextNode(Q));break;default:this.data=Q,this.value=Q,this.nodeValue=Q}}}),ra=function(Q,ve,Me){Q["$$"+ve]=Me}}}catch(z){}ft.DocumentType=lr,ft.DOMException=Rt,ft.DOMImplementation=Pr,ft.Element=hn,ft.Node=Nt,ft.NodeList=wt,ft.XMLSerializer=ea},4436:(Ot,ft,Le)=>{"use strict";var Re=Le(9401).freeze;ft.XML_ENTITIES=Re({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),ft.HTML_ENTITIES=Re
vendor: 35,742 bytes, line 11
11({Aacute:"\xc1",aacute:"\xe1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223e",acd:"\u223f",acE:"\u223e\u0333",Acirc:"\xc2",acirc:"\xe2",acute:"\xb4",Acy:"\u0410",acy:"\u0430",AElig:"\xc6",aelig:"\xe6",af:"\u2061",Afr:"\u{1d504}",afr:"\u{1d51e}",Agrave:"\xc0",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03b1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2a3f",AMP:"&",amp:"&",And:"\u2a53",and:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1d538}",aopf:"\u{1d552}",ap:"\u2248",apacir:"\u2a6f",apE:"\u2a70",ape:"\u224a",apid:"\u224b",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224a",Aring:"\xc5",aring:"\xe5",Ascr:"\u{1d49c}",ascr:"\u{1d4b6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224d",Atilde:"\xc3",atilde:"\xe3",Auml:"\xc4",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",Backslash:"\u2216",Barv:"\u2ae7",barvee:"\u22bd",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",Bernoullis:"\u212c",Beta:"\u0392",beta:"\u03b2",beth:"\u2136",between:"\u226c",Bfr:"\u{1d505}",bfr:"\u{1d51f}",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bNot:"\u2aed",bnot:"\u2310",Bopf:"\u{1d539}",bopf:"\u{1d553}",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxbox:"\u29c9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250c",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252c",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxUL:"\u255d",boxUl:"\u255c",boxuL:"\u255b",boxul:"\u2518",boxUR:"\u255a",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256c",boxVh:"\u256b",boxvH:"\u256a",boxvh:"\u253c",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255f",boxvR:"\u255e",boxvr:"\u251c",bprime:"\u2035",Breve:"\u02d8",breve:"\u02d8",brvbar:"\xa6",Bscr:"\u212c",bscr:"\u{1d4b7}",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",Bumpeq:"\u224e",bumpeq:"\u224f",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22d2",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",CapitalDifferentialD:"\u2145",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",Cayleys:"\u212d",ccaps:"\u2a4d",Ccaron:"\u010c",ccaron:"\u010d",Ccedil:"\xc7",ccedil:"\xe7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2a4c",ccupssm:"\u2a50",Cdot:"\u010a",cdot:"\u010b",cedil:"\xb8",Cedilla:"\xb8",cemptyv:"\u29b2",cent:"\xa2",CenterDot:"\xb7",centerdot:"\xb7",Cfr:"\u212d",cfr:"\u{1d520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03a7",chi:"\u03c7",cir:"\u25cb",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",CircleDot:"\u2299",circledR:"\xae",circledS:"\u24c8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29c3",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2a74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",Congruent:"\u2261",Conint:"\u222f",conint:"\u222e",ContourIntegral:"\u222e",Copf:"\u2102",copf:"\u{1d554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xa9",copy:"\xa9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21b5",Cross:"\u2a2f",cross:"\u2717",Cscr:"\u{1d49e}",cscr:"\u{1d4b8}",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",Cup:"\u22d3",cup:"\u222a",cupbrcap:"\u2a48",CupCap:"\u224d",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21a1",dArr:"\u21d3",darr:"\u2193",dash:"\u2010",Dashv:"\u2ae4",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",Dcaron:"\u010e",dcaron:"\u010f",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21ca",DDotrahd:"\u2911",ddotseq:"\u2a77",deg:"\xb0",Del:"\u2207",Delta:"\u0394",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",Dfr:"\u{1d507}",dfr:"\u{1d521}",dHar:"\u2965",dharl:"\u21c3",dharr:"\u21c2",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",diam:"\u22c4",Diamond:"\u22c4",diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",DifferentialD:"\u2146",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",Dopf:"\u{1d53b}",dopf:"\u{1d555}",Dot:"\xa8",dot:"\u02d9",DotDot:"\u20dc",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21d3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",DownTeeArrow:"\u21a7",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",Dscr:"\u{1d49f}",dscr:"\u{1d4b9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29f6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",DZcy:"\u040f",dzcy:"\u045f",dzigrarr:"\u27ff",Eacute:"\xc9",eacute:"\xe9",easter:"\u2a6e",Ecaron:"\u011a",ecaron:"\u011b",ecir:"\u2256",Ecirc:"\xca",ecirc:"\xea",ecolon:"\u2255",Ecy:"\u042d",ecy:"\u044d",eDDot:"\u2a77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1d508}",efr:"\u{1d522}",eg:"\u2a9a",Egrave:"\xc8",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",Element:"\u2208",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25fb",emptyv:"\u2205",EmptyVerySmallSquare:"\u25ab",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014a",eng:"\u014b",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1d53c}",eopf:"\u{1d556}",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",Epsilon:"\u0395",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",Equal:"\u2a75",equals:"=",EqualTilde:"\u2242",equest:"\u225f",Equilibrium:"\u21cc",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212f",esdot:"\u2250",Esim:"\u2a73",esim:"\u2242",Eta:"\u0397",eta:"\u03b7",ETH:"\xd0",eth:"\xf0",Euml:"\xcb",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",Ffr:"\u{1d509}",ffr:"\u{1d523}",filig:"\ufb01",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",Fopf:"\u{1d53d}",fopf:"\u{1d557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22d4",forkv:"\u2ad9",Fouriertrf:"\u2131",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1d4bb}",gacute:"\u01f5",Gamma:"\u0393",gamma:"\u03b3",Gammad:"\u03dc",gammad:"\u03dd",gap:"\u2a86",Gbreve:"\u011e",gbreve:"\u011f",Gcedil:"\u0122",Gcirc:"\u011c",gcirc:"\u011d",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2a8c",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",ges:"\u2a7e",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",Gfr:"\u{1d50a}",gfr:"\u{1d524}",Gg:"\u22d9",gg:"\u226b",ggg:"\u22d9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2aa5",glE:"\u2a92",glj:"\u2aa4",gnap:"\u2a8a",gnapprox:"\u2a8a",gnE:"\u2269",gne:"\u2a88",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",Gopf:"\u{1d53e}",gopf:"\u{1d558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\u{1d4a2}",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",Gt:"\u226b",GT:">",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",hArr:"\u21d4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",Hfr:"\u210c",hfr:"\u{1d525}",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",Hopf:"\u210d",hopf:"\u{1d559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210b",hscr:"\u{1d4bd}",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xcd",iacute:"\xed",ic:"\u2063",Icirc:"\xce",icirc:"\xee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",Ifr:"\u2111",ifr:"\u{1d526}",Igrave:"\xcc",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",Int:"\u222c",int:"\u222b",intcal:"\u22ba",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\u{1d540}",iopf:"\u{1d55a}",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",Iscr:"\u2110",iscr:"\u{1d4be}",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xcf",iuml:"\xef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1d50d}",jfr:"\u{1d527}",jmath:"\u0237",Jopf:"\u{1d541}",jopf:"\u{1d55b}",Jscr:"\u{1d4a5}",jscr:"\u{1d4bf}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\u{1d50e}",kfr:"\u{1d528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\u{1d542}",kopf:"\u{1d55c}",Kscr:"\u{1d4a6}",kscr:"\u{1d4c0}",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",Lang:"\u27ea",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\xab",Larr:"\u219e",lArr:"\u21d0",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",lAtail:"\u291b",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lBarr:"\u290e",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",Leftarrow:"\u21d0",leftarrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\u{1d50f}",lfr:"\u{1d529}",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22d8",ll:"\u226a",llarr:"\u21c7",llcorner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lnE:"\u2268",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftarrow:"\u27f5",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",Lopf:"\u{1d543}",lopf:"\u{1d55d}",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1d4c1}",Lsh:"\u21b0",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226a",LT:"<",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014",mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\u{1d510}",mfr:"\u{1d52a}",mho:"\u2127",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\u{1d544}",mopf:"\u{1d55e}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1d4c2}",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21d7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1d511}",nfr:"\u{1d52b}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",nGg:"\u22d9\u0338",ngsim:"\u2275",nGt:"\u226b\u20d2",ngt:"\u226f",ngtr:"\u226f",nGtv:"\u226b\u0338",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlArr:"\u21cd",nlarr:"\u219a",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21cd",nleftarrow:"\u219a",nLeftrightarrow:"\u21ce",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nLl:"\u22d8\u0338",nlsim:"\u2274",nLt:"\u226a\u20d2",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nLtv:"\u226a\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xa0",Nopf:"\u2115",nopf:"\u{1d55f}",Not:"\u2aec",not:"\xac",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",notin:"\u2209",notindot:"\u22f5\u0338",notinE:"\u22f9\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nRightarrow:"\u21cf",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\u{1d4a9}",nscr:"\u{1d4c3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",Ntilde:"\xd1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",Nu:"\u039d",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224d\u20d2",nVDash:"\u22af",nVdash:"\u22ae",nvDash:"\u22ad",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvHarr:"\u2904",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwarhk:"\u2923",nwArr:"\u21d6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xd3",oacute:"\xf3",oast:"\u229b",ocir:"\u229a",Ocirc:"\xd4",ocirc:"\xf4",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\u{1d512}",ofr:"\u{1d52c}",ogon:"\u02db",Ograve:"\xd2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",Omacr:"\u014c",omacr:"\u014d",Omega:"\u03a9",omega:"\u03c9",Omicron:"\u039f",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",Oopf:"\u{1d546}",oopf:"\u{1d560}",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",Or:"\u2a54",or:"\u2228",orarr:"\u21bb",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\u{1d4aa}",oscr:"\u2134",Oslash:"\xd8",oslash:"\xf8",osol:"\u2298",Otilde:"\xd5",otilde:"\xf5",Otimes:"\u2a37",otimes:"\u2297",otimesas:"\u2a36",Ouml:"\xd6",ouml:"\xf6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",par:"\u2225",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\u{1d513}",pfr:"\u{1d52d}",Phi:"\u03a6",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",Poincareplane:"\u210c",pointint:"\u2a15",Popf:"\u2119",popf:"\u{1d561}",pound:"\xa3",Pr:"\u2abb",pr:"\u227a",prap:"\u2ab7",prcue:"\u227c",prE:"\u2ab3",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportion:"\u2237",Proportional:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",Pscr:"\u{1d4ab}",pscr:"\u{1d4c5}",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\u{1d514}",qfr:"\u{1d52e}",qint:"\u2a0c",Qopf:"\u211a",qopf:"\u{1d562}",qprime:"\u2057",Qscr:"\u{1d4ac}",qscr:"\u{1d4c6}",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",QUOT:'"',quot:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",Rang:"\u27eb",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",Rarr:"\u21a0",rArr:"\u21d2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",rAtail:"\u291c",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",RBarr:"\u2910",rBarr:"\u290f",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",Re:"\u211c",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",REG:"\xae",reg:"\xae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",Rfr:"\u211c",rfr:"\u{1d52f}",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u03f1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",Rightarrow:"\u21d2",rightarrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",rightthreetimes:"\u22cc",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",Ropf:"\u211d",ropf:"\u{1d563}",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",Rscr:"\u211b",rscr:"\u{1d4c7}",Rsh:"\u21b1",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",Sc:"\u2abc",sc:"\u227b",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227d",scE:"\u2ab4",sce:"\u2ab0",Scedil:"\u015e",scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",searhk:"\u2925",seArr:"\u21d8",searr:"\u2198",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1d516}",sfr:"\u{1d530}",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",Sopf:"\u{1d54a}",sopf:"\u{1d564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",Square:"\u25a1",square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",Sscr:"\u{1d4ae}",sscr:"\u{1d4c8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",Sub:"\u22d0",sub:"\u2282",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",Subset:"\u22d0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",Sum:"\u2211",sum:"\u2211",sung:"\u266a",Sup:"\u22d1",sup:"\u2283",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supdot:"\u2abe",supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",Supset:"\u22d1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swArr:"\u21d9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",Tab:"\t",target:"\u2316",Tau:"\u03a4",tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\u{1d517}",tfr:"\u{1d531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\xde",thorn:"\xfe",Tilde:"\u223c",tilde:"\u02dc",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",Topf:"\u{1d54b}",topf:"\u{1d565}",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\u{1d4af}",tscr:"\u{1d4c9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\xda",uacute:"\xfa",Uarr:"\u219f",uArr:"\u21d1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\u{1d518}",ufr:"\u{1d532}",Ugrave:"\xd9",ugrave:"\xf9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\xa8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1d54c}",uopf:"\u{1d566}",UpArrow:"\u2191",Uparrow:"\u21d1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",Updownarrow:"\u21d5",updownarrow:"\u2195",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",upsi:"\u03c5",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTee:"\u22a5",UpTeeArrow:"\u21a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\u{1d4b0}",uscr:"\u{1d4ca}",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\xdc",uuml:"\xfc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",vArr:"\u21d5",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",Vbar:"\u2aeb",vBar:"\u2ae8",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22ab",Vdash:"\u22a9",vDash:"\u22a8",vdash:"\u22a2",Vdashl:"\u2ae6",Vee:"\u22c1",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\u{1d519}",vfr:"\u{1d533}",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\u{1d54d}",vopf:"\u{1d567}",vprop:"\u221d",vrtri:"\u22b3",Vscr:"\u{1d4b1}",vscr:"\u{1d4cb}",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",Wedge:"\u22c0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1d51a}",wfr:"\u{1d534}",Wopf:"\u{1d54e}",wopf:"\u{1d568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1d4b2}",wscr:"\u{1d4cc}",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",Xfr:"\u{1d51b}",xfr:"\u{1d535}",xhArr:"\u27fa",xharr:"\u27f7",Xi:"\u039e",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",Xopf:"\u{1d54f}",xopf:"\u{1d569}",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",Xscr:"\u{1d4b3}",xscr:"\u{1d4cd}",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\xdd",yacute:"\xfd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\xa5",Yfr:"\u{1d51c}",yfr:"\u{1d536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1d550}",yopf:"\u{1d56a}",Yscr:"\u{1d4b4}",yscr:"\u{1d4ce}",YUcy:"\u042e",yucy:"\u044e",Yuml:"\u0178",yuml:"\xff",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",Zfr:"\u2128",zfr:"\u{1d537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",Zopf:"\u2124",zopf:"\u{1d56b}",Zscr:"\u{1d4b5}",zscr:"\u{1d4cf}",zwj:"\u200d",zwnj:"\u200c"}),
vendor: 3,409 bytes, line 11
11ft.entityMap=ft.HTML_ENTITIES},978:(Ot,ft,Le)=>{Le(6853);ft.DOMParser=Le(1991).DOMParser},8702:(Ot,ft,Le)=>{var Re=Le(9401).NAMESPACE,A=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,ce=new RegExp("[\\-\\.0-9"+A.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),me=new RegExp("^"+A.source+ce.source+"*(?::"+A.source+ce.source+"*)?$"),be=0,$e=1,xe=2,Pe=3,Xe=4,ae=5,Oe=6,de=7;function at(ie,X){this.message=ie,this.locator=X,Error.captureStackTrace&&Error.captureStackTrace(this,at)}function ct(){}function sr(ie,X){return X.lineNumber=ie.lineNumber,X.columnNumber=ie.columnNumber,X}function rr(ie,X,ke,it,Ae,ue){function O($t,ir,Rt){ke.attributeNames.hasOwnProperty($t)&&ue.fatalError("Attribute "+$t+" redefined"),ke.addValue($t,ir.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,Ae),Rt)}for(var Qe,Fe=++X,nt=be;;){var Ze=ie.charAt(Fe);switch(Ze){case"=":if(nt===$e)Qe=ie.slice(X,Fe),nt=Pe;else{if(nt!==xe)throw new Error("attribute equal must after attrName");nt=Pe}break;case"'":case'"':if(nt===Pe||nt===$e){if(nt===$e&&(ue.warning('attribute value must after "="'),Qe=ie.slice(X,Fe)),!((Fe=ie.indexOf(Ze,X=Fe+1))>0))throw new Error("attribute value no end '"+Ze+"' match");O(Qe,Ie=ie.slice(X,Fe),X-1),nt=ae}else{if(nt!=Xe)throw new Error('attribute value must after "="');O(Qe,Ie=ie.slice(X,Fe),X),ue.warning('attribute "'+Qe+'" missed start quot('+Ze+")!!"),X=Fe+1,nt=ae}break;case"/":switch(nt){case be:ke.setTagName(ie.slice(X,Fe));case ae:case Oe:case de:nt=de,ke.closed=!0;case Xe:case $e:break;case xe:ke.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return ue.error("unexpected end of input"),nt==be&&ke.setTagName(ie.slice(X,Fe)),Fe;case">":switch(nt){case be:ke.setTagName(ie.slice(X,Fe));case ae:case Oe:case de:break;case Xe:case $e:"/"===(Ie=ie.slice(X,Fe)).slice(-1)&&(ke.closed=!0,Ie=Ie.slice(0,-1));case xe:nt===xe&&(Ie=Qe),nt==Xe?(ue.warning('attribute "'+Ie+'" missed quot(")!'),O(Qe,Ie,X)):((!Re.isHTML(it[""])||!Ie.match(/^(?:disabled|checked|selected)$/i))&&ue.warning('attribute "'+Ie+'" missed value!! "'+Ie+'" instead!!'),O(Ie,Ie,X));break;case Pe:throw new Error("attribute value missed!!")}return Fe;case"\x80":Ze=" ";default:if(Ze<=" ")switch(nt){case be:ke.setTagName(ie.slice(X,Fe)),nt=Oe;break;case $e:Qe=ie.slice(X,Fe),nt=xe;break;case Xe:var Ie=ie.slice(X,Fe);ue.warning('attribute "'+Ie+'" missed quot(")!!'),O(Qe,Ie,X);case ae:nt=Oe}else switch(nt){case xe:(!Re.isHTML(it[""])||!Qe.match(/^(?:disabled|checked|selected)$/i))&&ue.warning('attribute "'+Qe+'" missed value!! "'+Qe+'" instead2!!'),O(Qe,Qe,X),X=Fe,nt=$e;break;case ae:ue.warning('attribute space is required"'+Qe+'"!!');case Oe:nt=$e,X=Fe;break;case Pe:nt=Xe,X=Fe;break;case de:throw new Error("elements closed character '/' and '>' must be connected to")}}Fe++}}function Je(ie,X,ke){for(var it=ie.tagName,Ae=null,Ze=ie.length;Ze--;){var ue=ie[Ze],O=ue.qName,Qe=ue.value;if((Tt=O.indexOf(":"))>0)var Ie=ue.prefix=O.slice(0,Tt),Fe=O.slice(Tt+1),nt="xmlns"===Ie&&Fe;else Fe=O,Ie=null,nt="xmlns"===O&&"";ue.localName=Fe,!1!==nt&&(null==Ae&&(Ae={},Mt(ke,ke={})),ke[nt]=Ae[nt]=Qe,ue.uri=Re.XMLNS,X.startPrefixMapping(nt,Qe))}for(Ze=ie.length;Ze--;)(Ie=(ue=ie[Ze]).prefix)&&("xml"===Ie&&(ue.uri=Re.XML),"xmlns"!==Ie&&(ue.uri=ke[Ie||""]));var Tt;(Tt=it.indexOf(":"))>
vendor: 2,810 bytes, line 11
110?(Ie=ie.prefix=it.slice(0,Tt),Fe=ie.localName=it.slice(Tt+1)):(Ie=null,Fe=ie.localName=it);var $t=ie.uri=ke[Ie||""];if(X.startElement($t,Fe,it,ie),!ie.closed)return ie.currentNSMap=ke,ie.localNSMap=Ae,!0;if(X.endElement($t,Fe,it),Ae)for(Ie in Ae)Object.prototype.hasOwnProperty.call(Ae,Ie)&&X.endPrefixMapping(Ie)}function rt(ie,X,ke,it,Ae){if(/^(?:script|textarea)$/i.test(ke)){var ue=ie.indexOf("</"+ke+">",X),O=ie.substring(X+1,ue);if(/[&<]/.test(O))return/^script$/i.test(ke)?(Ae.characters(O,0,O.length),ue):(O=O.replace(/&#?\w+;/g,it),Ae.characters(O,0,O.length),ue)}return X+1}function Dt(ie,X,ke,it){var Ae=it[ke];return null==Ae&&((Ae=ie.lastIndexOf("</"+ke+">"))<X&&(Ae=ie.lastIndexOf("</"+ke)),it[ke]=Ae),Ae<X}function Mt(ie,X){for(var ke in ie)Object.prototype.hasOwnProperty.call(ie,ke)&&(X[ke]=ie[ke])}function ht(ie,X,ke,it){if("-"===ie.charAt(X+2))return"-"===ie.charAt(X+3)?(ue=ie.indexOf("--\x3e",X+4))>X?(ke.comment(ie,X+4,ue-X-4),ue+3):(it.error("Unclosed comment"),-1):-1;if("CDATA["==ie.substr(X+3,6)){var ue=ie.indexOf("]]>",X+9);return ke.startCDATA(),ke.characters(ie,X+9,ue-X-9),ke.endCDATA(),ue+3}var O=function Ft(ie,X){var ke,it=[],Ae=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(Ae.lastIndex=X,Ae.exec(ie);ke=Ae.exec(ie);)if(it.push(ke),ke[1])return it}(ie,X),Qe=O.length;if(Qe>1&&/!doctype/i.test(O[0][0])){var Ie=O[1][0],Fe=!1,nt=!1;Qe>3&&(/^public$/i.test(O[2][0])?(Fe=O[3][0],nt=Qe>4&&O[4][0]):/^system$/i.test(O[2][0])&&(nt=O[3][0]));var Ze=O[Qe-1];return ke.startDTD(Ie,Fe,nt),ke.endDTD(),Ze.index+Ze[0].length}return-1}function er(ie,X,ke){var it=ie.indexOf("?>",X);if(it){var Ae=ie.substring(X,it).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return Ae?(ke.processingInstruction(Ae[1],Ae[2]),it+2):-1}return-1}function qt(){this.attributeNames={}}(at.prototype=new Error).name=at.name,ct.prototype={parse:function(ie,X,ke){var it=this.domBuilder;it.startDocument(),Mt(X,X={}),function pt(ie,X,ke,it,Ae){function O(mr){var pi=mr.slice(1,-1);return Object.hasOwnProperty.call(ke,pi)?ke[pi]:"#"===pi.charAt(0)?function ue(mr){return mr>65535?(mr-=65536,String.fromCharCode(55296+(mr>>10),56320+(1023&mr))):String.fromCharCode(mr)}(parseInt(pi.substr(1).replace("x","0x"))):(Ae.error("entity not found:"+mr),mr)}function Qe(mr){if(mr>Rt){var pi=ie.substring(Rt,mr).replace(/&#?\w+;/g,O);Tt&&Ie(Rt),it.characters(pi,0,mr-Rt),Rt=mr}}function Ie(mr,pi){for(;mr>=nt&&(pi=Ze.exec(ie));)nt=(Fe=pi.index)+pi[0].length,Tt.lineNumber++;Tt.columnNumber=mr-Fe+1}for(var Fe=0,nt=0,Ze=/.*(?:\r\n?|\n)|.*$/g,Tt=it.locator,$t=[{currentNSMap:X}],ir={},Rt=0;;){try{var wt=ie.indexOf("<",Rt);if(wt<0){if(!ie.substr(Rt).match(/^\s*$/)){var Or=it.doc,pr=Or.createTextNode(ie.substr(Rt));Or.appendChild(pr),it.currentElement=pr}return}switch(wt>Rt&&Qe(wt),ie.charAt(wt+1)){case"/":var Kt=ie.indexOf(">
11",wt+3),Vt=ie.substring(wt+2,Kt).replace(/[ \t\n\r]+$/g,""),Ir=$t.pop();Kt<0?(Vt=ie.substring(wt+2).replace(/[\s<].*/,""),Ae.error("end tag name: "+Vt+" is not complete:"+Ir.tagName),Kt=wt+1+Vt.length):Vt.match(/\s</)&&(Vt=Vt.replace(/[\s<].*/,""),Ae.error("end tag name: "+Vt+" maybe not complete"),Kt=wt+1+Vt.length);var Mr=Ir.localNSMap,rn=Ir.tagName==Vt;if(rn||Ir.tagName&&Ir.tagName.toLowerCase()==Vt.toLowerCase()){if(it.endElement(Ir.uri,Ir.localName,Vt),Mr)for(var Nt in Mr)Object.prototype.hasOwnProperty.call(Mr,Nt)&&it.endPrefixMapping(Nt);rn||Ae.fatalError("end tag name: "+Vt+" is not match the current start tagName:"+Ir.tagName)}else $t.push(Ir);Kt++;break;case"?":Tt&&Ie(wt),Kt=er(ie,wt,it);break;case"!":Tt&&Ie(wt),Kt=ht(ie,wt,it,Ae);break;default:Tt&&Ie(wt);var Fr=new qt,ki=$t[$t.length-1].currentNSMap,Yn=(Kt=rr(ie,wt,Fr,ki,O,Ae),Fr.length);if(!Fr.closed&&Dt(ie,Kt,Fr.tagName,ir)&&(Fr.closed=!0,ke.nbsp||Ae.warning("unclosed xml attribute")),Tt&&Yn){for(var gr=sr(Tt,{}),Qi=0;Qi<Yn;Qi++){var zn=Fr[Qi];Ie(zn.offset),zn.locator=sr(Tt,{})}it.locator=gr,Je(Fr,it,ki)&&$t.push(Fr),it.locator=Tt}else Je(Fr,it,ki)&&$t.push(Fr);Re.isHTML(Fr.uri)&&!Fr.closed?Kt=rt(ie,Kt,Fr.tagName,O,it):Kt++}}catch(mr){if(mr instanceof at)throw mr;Ae.error("element parse error: "+mr),Kt=-1}Kt>Rt?Rt=Kt:Qe(Math.max(wt,Rt)+1)}}(ie,X,ke,it,this.errorHandler),it.endDocument()}},qt.prototype={setTagName:function(ie){if(!me.test(ie))throw new Error("invalid tagName:"+ie);this.tagName=ie},addValue:function(ie,X,ke){if(!me.test(ie))throw new Error("invalid attribute:"+ie);this.attributeNames[ie]=this.length,this[this.length++]={qName:ie,value:X,offset:ke}},length:0,getLocalName:function(ie){return this[ie].localName},getLocator:function(ie){return this[ie].locator},getQName:function(ie){return this[ie].qName},getURI:function(ie){return this[ie].uri},getValue:function(ie){return this[ie].value}},ft.XMLReader=ct,ft.ParseError=at},1421:(Ot,ft,Le)=>{var ce,Re=typeof global<"u"?global:typeof window<"u"?window:{},A=Le(5893);typeof document<"u"?ce=document:(ce=Re["__GLOBAL_DOCUMENT_CACHE@4"])||(ce=Re["__GLOBAL_DOCUMENT_CACHE@4"]=A),Ot.exports=ce},9226:Ot=>{var ft;ft=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ot.exports=ft},2070:Ot=>{!function ft(Le){Ot.exports=function(){"use strict";function Re(f,h,l){if(Xe())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,h);var e=new(f.bind.apply(f,i));return l&&de(e,l.prototype),e}function A(f,h){for(var l=0;l<h.length;l++){var i=h[l];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(f,ct(i.key),i)}}function ce(f,h,l){return h&&A(f.prototype,h),l&&A(f,l),Object.defineProperty(f,"prototype",{writable:!1}),f}function me(f,h,l){return(h=ct(h))in f?Object.defineProperty(f,h,{value:l,enumerable:!0,configurable:!0,writable:!0}):f[h]=l,f}function be(){return be=Object.assign?Object.assign.bind():function(f){for(var h=1;h<arguments.length;h++){var l=arguments[h];for(var i in l)({}).hasOwnProperty.call(l,i)&&(f[i]=l[i])}return f},be.apply(null,arguments)}function $e(f){return($e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(h){return h.__proto__||Object.getPrototypeOf(h)})(f)}function xe(f,h){f.prototype=Object.create(h.prototype),f.prototype.constructor=f,de(f,h)}function Xe(){try{var f=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(h){}return(Xe=function(){return!!f})()}function ae(f,h){var l=Object.keys(f);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(f);h&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(f,e).enumerable})),l.push.apply(l,i)}return l}function Oe(f){for(var h=1;h<arguments.length;h++){var l=null!=arguments[h]?arguments[h]:{};h%2?ae(Object(l),!0).forEach(function(i){me(f,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(l)):ae(Object(l)).forEac
11h(function(i){Object.defineProperty(f,i,Object.getOwnPropertyDescriptor(l,i))})}return f}function de(f,h){return(de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,i){return l.__proto__=i,l})(f,h)}function ct(f){var h=function at(f,h){if("object"!=typeof f||!f)return f;var l=f[Symbol.toPrimitive];if(void 0!==l){var i=l.call(f,h);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===h?String:Number)(f)}(f,"string");return"symbol"==typeof h?h:h+""}function pt(f){var h="function"==typeof Map?new Map:void 0;return pt=function(l){if(null===l||!function Pe(f){try{return-1!==Function.toString.call(f).indexOf("[native code]")}catch(h){return"function"==typeof f}}(l))return l;if("function"!=typeof l)throw new TypeError("Super expression must either be null or a function");if(void 0!==h){if(h.has(l))return h.get(l);h.set(l,i)}function i(){return Re(l,arguments,$e(this).constructor)}return i.prototype=Object.create(l.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),de(i,l)},pt(f)}function rr(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var rt,Je={exports:{}};var qt,ht=rr(function Dt(){return rt||(rt=1,function(f){var h=Object.prototype.hasOwnProperty,l="~";function i(){}function e(v,p,y){this.fn=v,this.context=p,this.once=y||!1}function r(v,p,y,T,E){if("function"!=typeof y)throw new TypeError("The listener must be a function");var x=new e(y,T||v,E),C=l?l+p:p;return v._events[C]?v._events[C].fn?v._events[C]=[v._events[C],x]:v._events[C].push(x):(v._events[C]=x,v._eventsCount++),v}function u(v,p){0==--v._eventsCount?v._events=new i:delete v._events[p]}function c(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(l=!1)),c.prototype.eventNames=function(){var y,T,p=[];if(0===this._eventsCount)return p;for(T in y=this._events)h.call(y,T)&&p.push(l?T.slice(1):T);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(y)):p},c.prototype.listeners=function(p){var T=this._events[l?l+p:p];if(!T)return[];if(T.fn)return[T.fn];for(var E=0,x=T.length,C=new Array(x);E<x;E++)C[E]=T[E].fn;return C},c.prototype.listenerCount=function(p){var T=this._events[l?l+p:p];return T?T.fn?1:T.length:0},c.prototype.emit=function(p,y,T,E,x,C){var k=l?l+p:p;if(!this._events[k])return!1;var H,Y,w=this._events[k],M=arguments.length;if(w.fn){switch(w.once&&this.removeListener(p,w.fn,void 0,!0),M){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,y),!0;case 3:return w.fn.call(w.context,y,T),!0;case 4:return w.fn.call(w.context,y,T,E),!0;case 5:return w.fn.call(w.context,y,T,E,x),!0;case 6:return w.fn.call(w.context,y,T,E,x,C),!0}for(Y=1,H=new Array(M-1);Y<M;Y++)H[Y-1]=arguments[Y];w.fn.apply(w.context,H)}else{var $,j=w.length;for(Y=0;Y<j;Y++)switch(w[Y].once&&this.removeListener(p,w[Y].fn,void 0,!0),M){case 1:w[Y].fn.call(w[Y].context);break;case 2:w[Y].fn.call(w[Y].context,y);break;case 3:w[Y].fn.call(w[Y].context,y,T);break;case 4:w[Y].fn.call(w[Y].context,y,T,E);break;default:if(!H)for($=1,H=new Array(M-1);$<M;$++)H[$-1]=arguments[$];w[Y].fn.apply(w[Y].context,H)}}return!0},c.prototype.on=function(p,y,T){return r(this,p,y,T,!1)},c.prototype.once=function(p,y,T){return r(this,p,y,T,!0)},c.prototype.removeListener=function(p,y,T,E){var x=l?l+p:p;if(!this._events[x])return this;if(!y)return u(this,x),this;var C=this._events[x];if(C.fn)C.fn===y&&(!E||C.once)&&(!T||C.context===T)&&u(this,x);else{for(var k=0,w=[],M=C.length;k<M;k++)(C[k].fn!==y||E&&!C[k].once||T&&C[k].context!==T)&&w.push(C[k]);w.length?this._events[x]=1===w.length?w[0]:w:u(this,x)}return this},c.prototype.removeAllListeners=function(p){var y;return p?this._events[y=l?l+p:p]&&u(this,y):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=l,c.EventEmitter=c,f.exports=c}(Je)),Je.exports}()),er={exports:{}};var ie=function Ft(){return qt||(qt=1,i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,e=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,u=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,er.exports=c={buildAbsoluteURL:function(v,p,y){if(y=y||{},v=v.trim(),!(p=p.trim())){if(!y.alwaysNormalize)return v;var T=c.parseURL(v);if(!T)throw new Error("Error trying to parse base URL.");return T.path=c.normalizePath(T.path),c.buildURLFromParts(T)}var E=c.parseURL(p);if(!E)throw new Error("Error trying to parse relative URL.");
vendor: 8,194 bytes, line 11
11if(E.scheme)return y.alwaysNormalize?(E.path=c.normalizePath(E.path),c.buildURLFromParts(E)):p;var x=c.parseURL(v);if(!x)throw new Error("Error trying to parse base URL.");if(!x.netLoc&&x.path&&"/"!==x.path[0]){var C=e.exec(x.path);x.netLoc=C[1],x.path=C[2]}x.netLoc&&!x.path&&(x.path="/");var k={scheme:x.scheme,netLoc:E.netLoc,path:null,params:E.params,query:E.query,fragment:E.fragment};if(!E.netLoc&&(k.netLoc=x.netLoc,"/"!==E.path[0]))if(E.path){var w=x.path,M=w.substring(0,w.lastIndexOf("/")+1)+E.path;k.path=c.normalizePath(M)}else k.path=x.path,E.params||(k.params=x.params,E.query||(k.query=x.query));return null===k.path&&(k.path=y.alwaysNormalize?c.normalizePath(E.path):E.path),c.buildURLFromParts(k)},parseURL:function(v){var p=i.exec(v);return p?{scheme:p[1]||"",netLoc:p[2]||"",path:p[3]||"",params:p[4]||"",query:p[5]||"",fragment:p[6]||""}:null},normalizePath:function(v){for(v=v.split("").reverse().join("").replace(r,"");v.length!==(v=v.replace(u,"")).length;);return v.split("").reverse().join("")},buildURLFromParts:function(v){return v.scheme+v.netLoc+v.path+v.params+v.query+v.fragment}}),er.exports;var i,e,r,u,c}(),X=Number.isFinite||function(f){return"number"==typeof f&&isFinite(f)},ke=Number.isSafeInteger||function(f){return"number"==typeof f&&Math.abs(f)<=it},it=Number.MAX_SAFE_INTEGER||9007199254740991,Ae=function(f){return f.NETWORK_ERROR="networkError",f.MEDIA_ERROR="mediaError",f.KEY_SYSTEM_ERROR="keySystemError",f.MUX_ERROR="muxError",f.OTHER_ERROR="otherError",f}({}),ue=function(f){return f.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",f.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",f.KEY_SYSTEM_NO_SESSION="keySystemNoSession",f.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",f.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",f.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",f.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",f.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",f.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",f.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",f.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",f.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",f.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",f.MANIFEST_LOAD_ERROR="manifestLoadError",f.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",f.MANIFEST_PARSING_ERROR="manifestParsingError",f.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",f.LEVEL_EMPTY_ERROR="levelEmptyError",f.LEVEL_LOAD_ERROR="levelLoadError",f.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",f.LEVEL_PARSING_ERROR="levelParsingError",f.LEVEL_SWITCH_ERROR="levelSwitchError",f.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",f.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",f.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",f.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",f.FRAG_LOAD_ERROR="fragLoadError",f.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",f.FRAG_DECRYPT_ERROR="fragDecryptError",f.FRAG_PARSING_ERROR="fragParsingError",f.FRAG_GAP="fragGap",f.REMUX_ALLOC_ERROR="remuxAllocError",f.KEY_LOAD_ERROR="keyLoadError",f.KEY_LOAD_TIMEOUT="keyLoadTimeOut",f.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",f.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",f.BUFFER_APPEND_ERROR="bufferAppendError",f.BUFFER_APPENDING_ERROR="bufferAppendingError",f.BUFFER_STALLED_ERROR="bufferStalledError",f.BUFFER_FULL_ERROR="bufferFullError",f.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",f.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",f.ASSET_LIST_LOAD_ERROR="assetListLoadError",f.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",f.ASSET_LIST_PARSING_ERROR="assetListParsingError",f.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",f.INTERNAL_EXCEPTION="internalException",f.INTERNAL_ABORTED="aborted",f.ATTACH_MEDIA_ERROR="attachMediaError",f.UNKNOWN="unknown",f}({}),O=function(f){return f.MEDIA_ATTACHING="hlsMediaAttaching",f.MEDIA_ATTACHED="hlsMediaAttached",f.MEDIA_DETACHING="hlsMediaDetaching",f.MEDIA_DETACHED="hlsMediaDetached",f.MEDIA_ENDED="hlsMediaEnded",f.STALL_RESOLVED="hlsStallResolved",f.BUFFER_RESET="hlsBufferReset",f.BUFFER_CODECS="hlsBufferCodecs",f.BUFFER_CREATED="hlsBufferCreated",f.BUFFER_APPENDING="hlsBufferAppending",f.BUFFER_APPENDED="hlsBufferAppended",f.BUFFER_EOS="hlsBufferEos",f.BUFFERED_TO_END="hlsBufferedToEnd",f.BUFFER_FLUSHING="hlsBufferFlushing",f.BUFFER_FLUSHED="hlsBufferFlushed",f.MANIFEST_LOADING="hlsManifestLoading",f.MANIFEST_LOADED="hlsManifestLoaded",f.MANIFEST_PARSED="hlsManifestParsed",f.LEVEL_SWITCHING="hlsLevelSwitching",f.LEVEL_SWITCHED="hlsLevelSwitched",f.LEVEL_LOADING="hlsLevelLoading",f.LEVEL_LOADED="hlsLevelLoaded",f.LEVEL_UPDATED="hlsLevelUpdated",f.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",f.LEVELS_UPDATED="hlsLevelsUpdated",f.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",f.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",f.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",f.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",f.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",f.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",f.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",f.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",f.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",f.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",f.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",f.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",f.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",f.CUES_PARSED="hlsCuesParsed",f.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",f.INIT_PTS_FOUND="hlsInitPtsFound",f.FRAG_LOADING="hlsFragLoading",f.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",f.FRAG_LOADED="hlsFragLoaded",f.FRAG_DECRYPTED="hlsFragDecrypted",f.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",f.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",f.FRAG_PARSING_METADATA="hlsFragParsingMetadata",f.FRAG_PARSED="hlsFragParsed",f.FRAG_BUFFERED="hlsFragBuffered",f.FRAG_CHANGED="hlsFragChanged",f.FPS_DROP="hlsFpsDrop",f.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",f.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",f.ERROR="hlsError",f.DESTROYING="hlsDestroying",f.KEY_LOADING="hlsKeyLoading",f.KEY_LOADED="hlsKeyLoaded",f.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",f.BACK_BUFFER_REACHED="hlsBackBufferReached",f.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",f.ASSET_LIST_LOADING="hlsAssetListLoading",f.ASSET_LIST_LOADED="hlsAssetListLoaded",f.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",f.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",f.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",f.INTERSTITIAL_STARTED="hlsInterstitialStarted",f.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",f.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",f.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",f.INTERSTITIAL_ENDED="hlsInterstitialEnded",f.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",f.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",f.EVENT_CUE_ENTER="hlsEventCueEnter",f}({}),Qe={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},Ie={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"},Fe=function(){function f(l,i,e){void 0===i&&(i=0),void 0===e&&(e=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=l,this.alpha_=l?Math.exp(Math.log(.5)/l):0,this.estimate_=i,this.totalWeight_=e}var h=f.prototype;return h.sample=function(i,e){var r=Math.pow(this.alpha_,i);this.estimate_=e*(1-r)+r*this.estimate_,this.totalWeight_+=i},h.getTotalWeight=function(){return this.totalWeight_},h.getEstimate=function(){if(this.alpha_){var i=1-Math.pow(this.alpha_,this.totalWeight_);if(i)return this.estimate_/i}return this.estimate_},f}(),nt=function(){function f(l,i,e,r){void 0===r&&(r=100),this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=e,this.minWeight_=.001,this.minDelayMs_=50,this.slow_
vendor: 37,046 bytes, line 11
11=new Fe(l),this.fast_=new Fe(i),this.defaultTTFB_=r,this.ttfb_=new Fe(l)}var h=f.prototype;return h.update=function(i,e){var r=this.slow_,u=this.fast_,c=this.ttfb_;r.halfLife!==i&&(this.slow_=new Fe(i,r.getEstimate(),r.getTotalWeight())),u.halfLife!==e&&(this.fast_=new Fe(e,u.getEstimate(),u.getTotalWeight())),c.halfLife!==i&&(this.ttfb_=new Fe(i,c.getEstimate(),c.getTotalWeight()))},h.sample=function(i,e){var u=(i=Math.max(i,this.minDelayMs_))/1e3,c=8*e/u;this.fast_.sample(u,c),this.slow_.sample(u,c)},h.sampleTTFB=function(i){var e=i/1e3,r=Math.sqrt(2)*Math.exp(-Math.pow(e,2)/2);this.ttfb_.sample(r,Math.max(i,5))},h.canEstimate=function(){return this.fast_.getTotalWeight()>=this.minWeight_},h.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},h.getEstimateTTFB=function(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_},h.destroy=function(){},ce(f,[{key:"defaultEstimate",get:function(){return this.defaultEstimate_}}])}(),Ze=function(h,l){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;var i="["+h+"]:";this.trace=Tt,this.debug=l.debug.bind(null,i),this.log=l.log.bind(null,i),this.warn=l.warn.bind(null,i),this.info=l.info.bind(null,i),this.error=l.error.bind(null,i)},Tt=function(){},$t={trace:Tt,debug:Tt,log:Tt,warn:Tt,info:Tt,error:Tt};function ir(){return be({},$t)}function wt(f,h,l){return h[f]?h[f].bind(h):function Rt(f,h){var l=self.console[f];return l?l.bind(self.console,(h?"["+h+"] ":"")+"["+f+"] >"):Tt}(f,l)}var Or=ir();function pr(f,h,l){var i=ir();if("object"==typeof console&&!0===f||"object"==typeof f){var e=["debug","log","info","warn","error"];e.forEach(function(r){i[r]=wt(r,f,l)});try{i.log('Debug logs enabled for "'+h+'" in hls.js version 1.6.15')}catch(r){return ir()}e.forEach(function(r){Or[r]=wt(r,f)})}else be(Or,i);return i}var Vt=Or;function Ir(f){if(void 0===f&&(f=!0),!(typeof self>"u"))return(f||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function rn(f,h){var l=Object.keys(f),i=Object.keys(h),e=l.length,r=i.length;return!e||!r||e===r&&!l.some(function(u){return-1===i.indexOf(u)})}function Pr(f,h){if(void 0===h&&(h=!1),typeof TextDecoder<"u"){var i=new TextDecoder("utf-8").decode(f);if(h){var e=i.indexOf("\0");return-1!==e?i.substring(0,e):i}return i.replace(/\0/g,"")}for(var u,c,v,r=f.length,p="",y=0;y<r;){if(0===(u=f[y++])&&h)return p;if(0!==u&&3!==u)switch(u>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:p+=String.fromCharCode(u);break;case 12:case 13:c=f[y++],p+=String.fromCharCode((31&u)<<6|63&c);break;case 14:c=f[y++],v=f[y++],p+=String.fromCharCode((15&u)<<12|(63&c)<<6|(63&v)<<0)}}return p}function Nt(f){for(var h="",l=0;l<f.length;l++){var i=f[l].toString(16);i.length<2&&(i="0"+i),h+=i}return h}function Fr(f){return Uint8Array.from(f.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}var ki=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}},Kt={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"},Yn=function(){function f(l){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,"string"==typeof l&&(l={url:l}),this.base=l,function pi(f,h){var l=mr(f,h);l&&(l.enumerable=!0,Object.defineProperty(f,h,l))}(this,"stats")}var h=f.prototype;return h.setByteRange=function(i,e){var u,r=i.split("@",2);u=1===r.length?(null==e?void 0:e.byteRangeEndOffset)||0:parseInt(r[1]),this._byteRange=[u,parseInt(r[0])+u]},h.clearElementaryStreamInfo=function(){var i=this.elementaryStreams;i[Kt.AUDIO]=null,i[Kt.VIDEO]=null,i[Kt.AUDIOVIDEO]=null},ce(f,[{key:"baseurl",get:function(){return this.base.url}},{key:"byteRange",get:function(){return null===this._byteRange?[]:this._byteRange}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"elementaryStreams",get:function(){var i;return null===this._streams&&(this._streams=((i={})[Kt.AUDIO]=null,i[Kt.VIDEO]=null,i[Kt.AUDIOVIDEO]=null,i)),this._streams},set:function(i){this._streams=i}},{key:"hasStats",get:function(){return null!==this._stats}},{key:"hasStreams",get:function(){return null!==this._streams}},{key:"stats",get:function(){return null===this._stats&&(this._stats=new ki),this._stats},set:function(i){this._stats=i}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=ie.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(i){this._url=i}}])}();function gr(f){return"initSegment"!==f.sn}var Qi=function(f){function h(i,e){var r;return(r=f.call(this,e)||this)._decryptdata=null,r._programDateTime=null,r._ref=null,r._bitrate=void 0,r.rawProgramDateTime=null,r.tagList=[],r.duration=0,r.sn=0,r.levelkeys=void 0,r.type=void 0,r.loader=null,r.keyLoader=null,r.level=-1,r.cc=0,r.startPTS=void 0,r.endPTS=void 0,r.startDTS=void 0,r.endDTS=void 0,r.start=0,r.playlistOffset=0,r.deltaPTS=void 0,r.maxStartPTS=void 0,r.minEndPTS=void 0,r.data=void 0,r.bitrateTest=!1,r.title=null,r.initSegment=null,r.endList=void 0,r.gap=void 0,r.urlId=0,r.type=i,r}xe(h,f);var l=h.prototype;return l.addStart=function(e){this.setStart(this.start+e)},l.setStart=function(e){this.start=e,this._ref&&(this._ref.start=e)},l.setDuration=function(e){this.duration=e,this._ref&&(this._ref.duration=e)},l.setKeyFormat=function(e){var r=this.levelkeys;if(r){var u,c=r[e];c&&(null==(u=this._decryptdata)||!u.keyId)&&(this._decryptdata=c.getDecryptData(this.sn,r))}},l.abortRequests=function(){var e,r;null==(e=this.loader)||e.abort(),null==(r=this.keyLoader)||r.abort()},l.setElementaryStreamInfo=function(e,r,u,c,v,p){void 0===p&&(p=!1);var y=this.elementaryStreams,T=y[e];T?(T.startPTS=Math.min(T.startPTS,r),T.endPTS=Math.max(T.endPTS,u),T.startDTS=Math.min(T.startDTS,c),T.endDTS=Math.max(T.endDTS,v)):y[e]={startPTS:r,endPTS:u,startDTS:c,endDTS:v,partial:p}},ce(h,[{key:"byteLength",get:function(){if(this.hasStats){var e=this.stats.total;if(e)return e}if(this.byteRange.length){var r=this.byteRange[0],u=this.byteRange[1];if(X(r)&&X(u))return u-r}return null}},{key:"bitrate",get:function(){return this.byteLength?8*this.byteLength/this.duration:this._bitrate?this._bitrate:null},set:function(e){this._bitrate=e}},{key:"decryptdata",get:function(){var e,r=this.levelkeys;if(!r||r.NONE)return null;if(r.identity)this._decryptdata||(this._decryptdata=r.identity.getDecryptData(this.sn));else if(null==(e=this._decryptdata)||!e.keyId){var u=Object.keys(r);if(1===u.length){var c=this._decryptdata=r[u[0]]||null;c&&(this._decryptdata=c.getDecryptData(this.sn,r))}}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;var e=X(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;if(null!=(e=this._decryptdata)&&e.encrypted)return!0;if(this.levelkeys){var r,u=Object.keys(this.levelkeys),c=u.length;if(c>1||1===c&&null!=(r=this.levelkeys[u[0]])&&r.encrypted)return!0}return!1}},{key:"programDateTime",get:function(){return null===this._programDateTime&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime},set:function(e){this._programDateTime=X(e)?e:this.rawProgramDateTime=null}},{key:"ref",get:function(){return gr(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}}])}(Yn),zn=function(f){function h(l,i,e,r,u){var c;(c=f.call(this,e)||this).fragOffset=0,c.duration=0,c.gap=!1,c.independent=!1,c.relurl=void 0,c.fragment=void 0,c.index=void 0,c.duration=l.decimalFloatingPoint("DURATION"),c.gap=l.bool("GAP"),c.independent=l.bool("INDEPENDENT"),c.relurl=l.enumeratedString("URI"),c.fragment=i,c.index=r;var v=l.enumeratedString("BYTERANGE");return v&&c.setByteRange(v,u),u&&(c.fragOffset=u.fragOffset+u.duration),c}return xe(h,f),ce(h,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var i=this.elementaryStreams;return!!(i.audio||i.video||i.audiovideo)}}])}(Yn);function mr(f,h){var l=Object.getPrototypeOf(f);if(l)return Object.getOwnPropertyDescriptor(l,h)||mr(l,h)}var Si=Math.pow(2,32)-1,Ui=[].push,fa={video:1,audio:2,id3:3,text:4};function yt(f){return String.fromCharCode.apply(null,f)}function ns(f,h){var l=f[h]<<8|f[h+1];return l<0?65536+l:l}function jt(f,h){var l=$n(f,h);return l<0?4294967296+l:l}function Yr(f,h){var l=jt(f,h);return(l*=Math.pow(2,32))+jt(f,h+4)}function $n(f,h){return f[h]<<24|f[h+1]<<16|f[h+2]<<8|f[h+3]}function Xt(f,h){var l=[];if(!h.length)return l;for(var i=f.byteLength,e=0;e<i;){var r=jt(f,e),c=r>1?e+r:i;if(yt(f.subarray(e+4,e+8))===h[0])if(1===h.length)l.push(f.subarray(e+8,c));else{var v=Xt(f.subarray(e+8,c),h.slice(1));v.length&&Ui.apply(l,v)}e=c}return l}function hn(f){var h=[],l=f[0],i=8,e=jt(f,i);i+=4;var r=0,u=0;0===l?(r=jt(f,i),u=jt(f,i+4),i+=8):(r=Yr(f,i),u=Yr(f,i+8),i+=16);var c=f.length+u,v=ns(f,i+=2);i+=2;for(var p=0;p<v;p++){var y=i,T=jt(f,y);y+=4;var E=2147483647&T;if(1==(2147483648&T)>>>31)return Vt.warn("SIDX has hierarchical references (not supported)"),null;var C=jt(f,y);y+=4,h.push({referenceSize:E,subsegmentDuration:C,info:{duration:C/e,start:c,end:c+E-1}}),c+=E,i=y+=4}return{earliestPresentationTime:r,timescale:e,version:l,referencesCount:v,references:h}}function Qn(f){for(var h=[],l=Xt(f,["moov","trak"]),i=0;i<l.length;i++){var e=l[i],r=Xt(e,["tkhd"])[0];if(r){var u=r[0],c=jt(r,0===u?12:20),v=Xt(e,["mdia","mdhd"])[0];if(v){var p=jt(v,0===(u=v[0])?12:20),y=Xt(e,["mdia","hdlr"])[0];if(y){var T=yt(y.subarray(8,12)),E={soun:Kt.AUDIO,vide:Kt.VIDEO}[T],C=vn(Xt(e,["mdia","minf","stbl","stsd"])[0]);E?(h[c]={timescale:p,type:E,stsd:C},h[E]=Oe({timescale:p,id:c},C)):h[c]={timescale:p,type:T,stsd:C}}}}}return Xt(f,["moov","mvex","trex"]).forEach(function(w){var M=jt(w,4),H=h[M];H&&(H.default={duration:jt(w,12),flags:jt(w,20)})}),h}function vn(f){var r,h=f.subarray(8),l=h.subarray(86),i=yt(h.subarray(4,8)),e=i,u="enca"===i||"encv"===i;if(u){var c=Xt(h,[i])[0];Xt(c.subarray("enca"===i?28:78),["sinf"]).forEach(function(ti){var Li=Xt(ti,["schm"])[0];if(Li){var fi=yt(Li.subarray(4,8));if("cbcs"===fi||"cenc"===fi){var Bi=Xt(ti,["frma"])[0];Bi&&(e=yt(Bi))}}})}var y=e;switch(e){case"avc1":case"avc2":case"avc3":case"avc4":var T=Xt(l,["avcC"])[0];T&&T.length>3&&(e+="."+lr(T[1])+lr(T[2])+lr(T[3]),r=Mn("avc1"===y?"dva1":"dvav",l));break;case"mp4a":var E=Xt(h,[i])[0],x=Xt(E.subarray(28),["esds"])[0];if(x&&x.length>7){var C=4;if(3!==x[C++])break;C=Jn(x,C),C+=2;var k=x[C++];if(128&k&&(C+=2),64&k&&(C+=x[C++]),4!==x[C++])break;C=Jn(x,C);var w=x[C++];if(64!==w)break;if(e+="."+lr(w),C+=12,5!==x[C++])break;C=Jn(x,C);var M=x[C++],H=(248&M)>>3;31===H&&(H+=1+((7&M)<<3)+((224&x[C])>>5)),e+="."+H}break;case"hvc1":case"hev1":var Y=Xt(l,["hvcC"])[0];if(Y&&Y.length>12){var j=Y[1],$=["","A","B","C"][j>>6],le=31&j,pe=jt(Y,2),Se=(32&j)>>5?"H":"L",we=Y[12],Te=Y.subarray(6,12);e+="."+$+le,e+="."+function Zn(f){for(var h=0,l=0;l<32;l++)h|=(f>>l&1)<<31-l;return h>>>0}(pe).toString(16).toUpperCase(),e+="."+Se+we;for(var oe="",fe=Te.length;fe--;){var Ce=Te[fe];(Ce||oe)&&(oe="."+Ce.toString(16).toUpperCase()+oe)}e+=oe}r=Mn("hev1"==y?"dvhe":"dvh1",l);break;case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":e=Mn(e,l)||e;break;case"vp09":var He=Xt(l,["vpcC"])[0];if(He&&He.length>6){var vt=He[5],At=He[6]>>4&15;e+="."+Vi(He[4])+"."+Vi(vt)+"."+Vi(At)}break;case"av01":var St=Xt(l,["av1C"])[0];if(St&&St.length>2){var Pt=St[1]>>>5,Lt=St[2]>>>7?"H":"M",bt=(64&St[2])>>6,Gt=2===Pt&&bt?(32&St[2])>>5?12:10:bt?10:8,ar=(16&St[2])>>4,Zt=(8&St[2])>>3,Ar=(4&St[2])>>2,Cr=3&St[2];e+="."+Pt+"."+Vi(31&St[1])+Lt+"."+Vi(Gt)+"."+ar+"."+Zt+Ar+Cr+"."+Vi(1)+"."+Vi(1)+"."+Vi(1)+".0",r=Mn("dav1",l)}}return{codec:e,encrypted:u,supplemental:r}}function Mn(f,h){var l=Xt(h,["dvvC"]),i=l.length?l[0]:Xt(h,["dvcC"])[0];if(i){var r=i[2]<<5&32|i[3]>>3&31;return f+"."+Vi(i[2]>>1&127)+"."+Vi(r)}}function Jn(f,h){for(var l=h+5;128&f[h++]&&h<l;);return h}function lr(f){return("0"+f.toString(16).toUpperCase()).slice(-2)}function Vi(f){return(f<10?"0":"")+f}function Fn(f,h){Xt(f,["moov","trak"]).forEach(function(i){var e=Xt(i,["mdia","minf","stbl","stsd"])[0];if(e){var r=e.subarray(8),u=Xt(r,["enca"]),c=u.length>0;c||(u=Xt(r,["encv"])),u.forEach(function(v){Xt(v.subarray(c?28:78),["sinf"]).forEach(function(T){var E=as(T);E&&h(E,c)})})}})}function as(f){var h=Xt(f,["schm"])[0];if(h){var l=yt(h.subarray(4,8));if("cbcs"===l||"cenc"===l){var i=Xt(f,["schi","tenc"])[0];if(i)return i}}}function ai(f,h){var l=new Uint8Array(f.length+h.length);return l.set(f),l.set(h,f.length),l}function ca(f,h){var l=[],i=h.samples,e=h.timescale,r=h.id,u=!1;return Xt(i,["moof"]).map(function(v){var p=v.byteOffset-8;Xt(v,["traf"]).map(function(T){var E=Xt(T,["tfdt"]).map(function(x){var C=x[0],k=jt(x,4);return 1===C&&(k*=Math.pow(2,32),k+=jt(x,8)),k/e})[0];return void 0!==E&&(f=E),Xt(T,["tfhd"]).map(function(x){var C=jt(x,4),k=16777215&jt(x,0),Y=0,j=0!=(16&k),$=0,le=0!=(32&k),pe=8;C===r&&(0!=(1&k)&&(pe+=8),0!=(2&k)&&(pe+=4),0!=(8&k)&&(Y=jt(x,pe),pe+=4),j&&($=jt(x,pe),pe+=4),le&&(pe+=4),"video"===h.type&&(u=Ri(h.codec)),Xt(T,["trun"]).map(function(Se){var we=Se[0],Te=16777215&jt(Se,0),oe=0!=(1&Te),fe=0,Ce=0!=(4&Te),ze=0!=(256&Te),He=0,We=0!=(512&Te),vt=0,At=0!=(1024&Te),St=0!=(2048&Te),Pt=0,Ht=jt(Se,4),Lt=8;oe&&(fe=jt(Se,Lt),Lt+=4),Ce&&(Lt+=4);for(var bt=fe+p,kt=0;kt<Ht;kt++){if(ze?(He=jt(Se,Lt),Lt+=4):He=Y,We?(vt=jt(Se,Lt),Lt+=4):vt=$,At&&(Lt+=4),St&&(Pt=0===we?jt(Se,Lt):$n(Se,Lt),Lt+=4),h.type===Kt.VIDEO)for(var Gt=0;Gt<vt;){var ar=jt(i,bt);Ra(u,i[bt+=4])&&ta(i.subarray(bt,bt+ar),u?2:1,f+Pt/e,l),bt+=ar,Gt+=ar+4}f+=He/e}}))})})}),l}function Ri(f){if(!f)return!1;var h=f.substring(0,4);return"hvc1"===h||"hev1"===h||"dvh1"===h||"dvhe"===h}function Ra(f,h){if(f){var l=h>>1&63;return 39===l||40===l}return 6==(31&h)}function ta(f,h,l,i){var e=ra(f),r=0;r+=h;for(var u=0,c=0,v=0;r<e.length;){u=0;do{if(r>=e.length)break;u+=v=e[r++]}while(255===v);c=0;do{if(r>=e.length)break;c+=v=e[r++]}while(255===v);var p=e.length-r,y=r;if(c<p)r+=c;else if(c>p){Vt.error("Malformed SEI payload. "+c+" is too small, only "+p+" bytes left to parse.");break}if(4===u){if(181===e[y++]){var E=ns(e,y);if(y+=2,49===E){var x=jt(e,y);if(y+=4,1195456820===x){var C=e[y++];if(3===C){var k=e[y++],M=64&k,H=M?2+3*(31&k):0,Y=new Uint8Array(H);if(M){Y[0]=k;for(var j=1;j<H;j++)Y[j]=e[y++]}i.push({type:C,payloadType:u,pts:l,bytes:Y})}}}}}else if(5===u&&c>16){for(var $=[],le=0;le<16;le++){var pe=e[y++].toString(16);$.push(1==pe.length?"0"+pe:pe),(3===le||5===le||7===le||9===le)&&$.push("-")}for(var Se=c-16,we=new Uint8Array(Se),Te=0;Te<Se;Te++)we[Te]=e[y++];i.push({payloadType:u,pts:l,uuid:$.join(""),userData:Pr(we),userDataBytes:we})}}}function ra(f){for(var h=f.byteLength,l=[],i=1;i<h-2;)0===f[i]&&0===f[i+1]&&3===f[i+2]?(l.push(i+2),i+=2):i++;if(0===l.length)return f;var e=h-l.length,r=new Uint8Array(e),u=0;for(i=0;i<e;u++,i++)u===l[0]&&(u++,l.shift()),r[i]=f[u];return r}function Q(f,h,l){if(16!==f.byteLength)throw new RangeError("Invalid system id");var e,r;e=new Uint8Array,r=new Uint8Array;var u=new Uint8Array(4);return l.byteLength>0&&new DataView(u.buffer).setUint32(0,l.byteLength,!1),function z(f){for(var h=arguments.length,l=new Array(h>1?h-1:0),i=1;i<h;i++)l[i-1]=arguments[i];for(var e=l.length,r=8,u=e;u--;)r+=l[u].byteLength;var c=new Uint8Array(r);for(c[0]=r>>24&255,c[1]=r>>16&255,c[2]=r>>8&255,c[3]=255&r,c.set(f,4),u=0,r=8;u<e;u++)c.set(l[u],r),r+=l[u].byteLength;return c}([112,115,115,104],new Uint8Array([0,0,0,0]),f,r,e,u,l)}function Me(f){var h=f.getUint32(0),l=f.byteOffset,i=f.byteLength;if(i<h)return{offset:l,size:i};if(1886614376!==f.getUint32(4))return{offset:l,size:h};var r=f.getUint32(8)>>>24;if(0!==r&&1!==r)return{offset:l,size:h};var u=f.buffer,c=Nt(new Uint8Array(u,l+12,16)),v=null,y=0;if(0===r)y=28;else{var T=f.getUint32(28);if(!T||i<32+16*T)return{offset:l,size:h};v=[];for(var E=0;E<T;E++)v.push(new Uint8Array(u,l+32+16*E,16));y=32+16*T}if(!y)return{offset:l,size:h};var x=f.getUint32(y);return h-32<x?{offset:l,size:h}:{version:r,systemId:c,kids:v,data:new Uint8Array(u,l+y+4,x),offset:l,size:h}}var ut=function(){return/\(Windows.+Firefox\//i.test(navigator.userAgent)},Bt={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function dr(f,h){var l=Bt[h];return!!l&&!!l[f.slice(0,4)]}function $r(f,h,l){return void 0===l&&(l=!0),!f.split(",").some(function(i){return!wi(i,h,l)})}function wi(f,h,l){var i;void 0===l&&(l=!0);var e=Ir(l);return null!=(i=null==e?void 0:e.isTypeSupported(Jt(f,h)))&&i}function Jt(f,h){return h+"/mp4;codecs="+f}function Xr(f){if(f){var h=f.substring(0,4);return Bt.video[h]}return 2}function bi(f){var h=ut();return f.split(",").reduce(function(l,i){var r=h&&Ri(i)?9:Bt.video[i];return r?(2*r+l)/(l?3:2):(Bt.audio[i]+l)/(l?2:1)},0)}var nn={};var Hi=/flac|opus|mp4a\.40\.34/i;function Oi(f,h){return void 0===h&&(h=!0),f.replace(Hi,function(l){return function pn(f,h){if(void 0===h&&(h=!0),nn[f])return nn[f];for(var l={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[f],i=0;i<l.length;i++){var e;if(wi(l[i],"audio",h))return nn[f]=l[i],l[i];if("mp3"===l[i]&&null!=(e=Ir(h))&&e.isTypeSupported("audio/mpeg"))return""}return f}(l.toLowerCase(),h)})}function Tr(f,h){if(f&&(f.length>4||-1!==["ac-3","ec-3","alac","fLaC","Opus"].indexOf(f))&&(Bn(f,"audio")||Bn(f,"video")))return f;if(h){var l=h.split(",");if(l.length>1){if(f)for(var i=l.length;i--;)if(l[i].substring(0,4)===f.substring(0,4))return l[i];return l[0]}}return h||f}function Bn(f,h){return dr(f,h)&&wi(f,h)}function ss(f){if(f.startsWith("av01.")){for(var h=f.split("."),l=["0","111","01","01","01","0"],i=h.length;i>4&&i<10;i++)h[i]=l[i-4];return h.join(".")}return f}function Js(f){var h=Ir(f)||{isTypeSupported:function(){return!1}};return{mpeg:h.isTypeSupported("audio/mpeg"),mp3:h.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:h.isTypeSupported('audio/mp4; codecs="ac-3"')}}function eo(f){return f.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}var Ll={supported:!1,smooth:!1,powerEfficient:!1},lu={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function du(f,h){return{supported:!1,configurations:h,decodingInfoResults:[Ll],error:f}}function fu(f,h,l,i){void 0===i&&(i={});var e=f.videoCodec;if(!e&&!f.audioCodec||!l)return Promise.resolve(lu);for(var r=[],u=function Pl(f){var h,l=null==(h=f.videoCodec)?void 0:h.split(","),i=hu(f),e=f.width||640,r=f.height||480,u=f.frameRate||30,c=f.videoRange.toLowerCase();return l?l.map(function(v){var p={contentType:Jt(ss(v),"video"),width:e,height:r,bitrate:i,framerate:u};return"sdr"!==c&&(p.transferFunction=c),p}):[]}(f),c=u.length,v=function kl(f,h,l){var i,e=null==(i=f.audioCodec)?void 0:i.split(","),r=hu(f);return e&&f.audioGroups?f.audioGroups.reduce(function(u,c){var v,p=c?null==(v=h.groups[c])?void 0:v.tracks:null;return p?p.reduce(function(y,T){if(T.groupId===c){var E=parseFloat(T.channels||"");e.forEach(function(x){var C={contentType:Jt(x,"audio"),bitrate:l?cu(x,r):r};E&&(C.channels=""+E),y.push(C)})}return y},u):u},[]):[]}(f,h,c>0),p=v.length,y=c||1*p||1;y--;){var T={type:"media-source"};if(c&&(T.video=u[y%c]),p){T.audio=v[y%p];var E=T.audio.bitrate;T.video&&E&&(T.video.bitrate-=E)}r.push(T)}if(e){var x=navigator.userAgent;if(e.split(",").some(function(C){return Ri(C)})&&ut())return Promise.resolve(du(new Error("Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: ("+x+")"),r))}return Promise.all(r.map(function(C){var k=function Rl(f){var h="",l=f.audio,i=f.video;return i&&(h+=eo(i.contentType)+"_r"+i.height+"x"+i.width+"f"+Math.ceil(i.framerate)+(i.transferFunction||"sd")+"_"+Math.ceil(i.bitrate/1e5)),l&&(h+=(i?"_":"")+eo(l.contentType)+"_c"+l.channels),h}(C);return i[k]||(i[k]=l.decodingInfo(C))})).then(function(C){return{supported:!C.some(function(k){return!k.supported}),configurations:r,decodingInfoResults:C}}).catch(function(C){return{supported:!1,configurations:r,decodingInfoResults:[],error:C}})}function cu(f,h){if(h<=1)return 1;var l=128e3;return"ec-3"===f?l=768e3:"ac-3"===f&&(l=64e4),Math.min(h/2,l)}function hu(f){return 1e3*Math.ceil(Math.max(.9*f.bitrate,f.averageBitrate)/1e3)||1}var os=["NONE","TYPE-0","TYPE-1",null];var us=["SDR","PQ","HLG"];var ls={No:"",Yes:"YES",v2:"v2"};function pu(f){var h=f.canSkipUntil;return h&&f.age<h/2?f.canSkipDateRanges?ls.v2:ls.Yes:ls.No}var gu=function(){function f(l,i,e){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=l,this.part=i,this.skip=e}return f.prototype.addDirectives=function(i){var e=new self.URL(i);return void 0!==this.msn&&e.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&e.searchParams.set("_HLS_part",this.part.toString()),this.skip&&e.searchParams.set("_HLS_skip",this.skip),e.href},f}(),wa=function(){function f(l){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[l.url],this._attrs=[l.attrs],this.bitrate=l.bitrate,l.details&&(this.details=l.details),this.id=l.id||0,this.name=l.name,this.width=l.width||0,this.height=l.height||0,this.frameRate=l.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=l.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=l.audioCodec,this.videoCodec=l.videoCodec,this.codecSet=[l.videoCodec,l.audioCodec].filter(function(r){return!!r}).map(function(r){return r.substring(0,4)}).join(","),"supplemental"in l){var i;this.supplemental=l.supplemental;var e=null==(i=l.supplemental)?void 0:i.videoCodec;e&&e!==l.videoCodec&&(this.codecSet+=","+e.substring(0,4))}this.addGroupId("audio",l.attrs.AUDIO),this.addGroupId("text",l.attrs.SUBTITLES)}var h=f.prototype;return h.hasAudioGroup=function(i){return mu(this._audioGroups,i)},h.hasSubtitleGroup=function(i){return mu(this._subtitleGroups,i)},h.addGroupId=function(i,e){if(e)if("audio"===i){var r=this._audioGroups;r||(r=this._audioGroups=[]),-1===r.indexOf(e)&&r.push(e)}else if("text"===i){var u=this._subtitleGroups;u||(u=this._subtitleGroups=[]),-1===u.indexOf(e)&&u.push(e)}},h.addFallback=function(){},ce(f,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"averageBitrate",get:function(){return this._avgBitrate||this.realBitrate||this.bitrate}},{key:"attrs",get:function(){return this._attrs[0]}},{key:"codecs",get:function(){return this.attrs.CODECS||""}},{key:"pathwayId",get:function(){return this.attrs["PATHWAY-ID"]||"."}},{key:"videoRange",get:function(){return this.attrs["VIDEO-RANGE"]||"SDR"}},{key:"score",get:function(){return this.attrs.optionalFloat("SCORE",0)}},{key:"uri",get:function(){return this.url[0]||""}},{key:"audioGroups",get:function(){return this._audioGroups}},{key:"subtitleGroups",get:function(){return this._subtitleGroups}},{key:"urlId",get:function(){return 0},set:function(i){}},{key:"audioGroupIds",get:function(){return this.audioGroups?[this.audioGroupId]:void 0}},{key:"textGroupIds",get:function(){return this.subtitleGroups?[this.textGroupId]:void 0}},{key:"audioGroupId",get:function(){var i;return null==(i=this.audioGroups)?void 0:i[0]}},{key:"textGroupId",get:function(){var i;return null==(i=this.subtitleGroups)?void 0:i[0]}}])}();function mu(f,h){return!(!h||!f)&&-1!==f.indexOf(h)}function Nr(f,h){var l=!1,i=[];if(f&&(l="SDR"!==f,i=[f]),h){var e="SDR"!==(i=h.allowedVideoRanges||us.slice(0)).join("")&&!h.videoCodec;(l=void 0!==h.preferHDR?h.preferHDR:e&&function Ol(){if("function"==typeof matchMedia){var f=matchMedia("(dynamic-range: high)"),h=matchMedia("bad query");if(f.media!==h.media)return!0===f.matches}return!1}())||(i=["SDR"])}return{preferHDR:l,allowedVideoRanges:i}}var cr=function(h,l){return JSON.stringify(h,function(h){var l=new WeakSet;return function(i,e){if(h&&(e=h(i,e)),"object"==typeof e&&null!==e){if(l.has(e))return;l.add(e)}return e}}(l))};function gn(f,h){Vt.log('[abr] start candidates with "'+f+'" ignored because '+h)}function ro(f){return f.reduce(function(h,l){var i=h.groups[l.groupId];i||(i=h.groups[l.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),i.tracks.push(l);var e=l.channels||"2";return i.channels[e]=(i.channels[e]||0)+1,i.hasDefault=i.hasDefault||l.default,i.hasAutoSelect=i.hasAutoSelect||l.autoselect,i.hasDefault&&(h.hasDefaultAudio=!0),i.hasAutoSelect&&(h.hasAutoSelectAudio=!0),h},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function yu(f){return f?{lang:f.lang,assocLang:f.assocLang,characteristics:f.characteristics,channels:f.channels,audioCodec:f.audioCodec}:f}function Gi(f,h,l){if("attrs"in f){var i=h.indexOf(f);if(-1!==i)return i}for(var e=0;e<h.length;e++)if(Sn(f,h[e],l))return e;return-1}function Sn(f,h,l){var i=f.groupId,e=f.name,r=f.lang,u=f.assocLang,c=f.default,v=f.forced;return(void 0===i||h.groupId===i)&&(void 0===e||h.name===e)&&(void 0===r||function Ml(f,h){return void 0===h&&(h="--"),f.length===h.length?f===h:f.startsWith(h)||h.startsWith(f)}(r,h.lang))&&(void 0===r||h.assocLang===u)&&(void 0===c||h.default===c)&&(void 0===v||h.forced===v)&&(!("characteristics"in f)||function Fl(f,h){void 0===h&&(h="");var l=f.split(","),i=h.split(",");return l.length===i.length&&!l.some(function(e){return-1===i.indexOf(e)})}(f.characteristics||"",h.characteristics))&&(void 0===l||l(f,h))}function ia(f,h){var l=f.audioCodec,i=f.channels;return!(void 0!==l&&(h.audioCodec||"").substring(0,4)!==l.substring(0,4)||void 0!==i&&i!==(h.channels||"2"))}function Tu(f,h,l){for(var i=h;i>-1;i--)if(l(f[i]))return i;for(var e=h+1;e<f.length;e++)if(l(f[e]))return e;return-1}function ds(f,h){var l;return!!f&&f!==(null==(l=h.loadLevelObj)?void 0:l.uri)}var Bl=function(f){function h(i){var e;return(e=f.call(this,"abr",i.logger)||this).hls=void 0,e.lastLevelLoadSec=0,e.lastLoadedFragLevel=-1,e.firstSelection=-1,e._nextAutoLevel=-1,e.nextAutoLevelKey="",e.audioTracksByGroup=null,e.codecTiers=null,e.timer=-1,e.fragCurrent=null,e.partCurrent=null,e.bitrateTestDelay=0,e.rebufferNotice=-1,e.supportedCache={},e.bwEstimator=void 0,e._abandonRulesCheck=function(r){var u,v=e.fragCurrent,p=e.partCurrent,y=e.hls,T=y.autoLevelEnabled,E=y.media;if(v&&E){var x=performance.now(),C=p?p.stats:v.stats,k=p?p.duration:v.duration,w=x-C.loading.start,M=y.minAutoLevel,H=v.level,Y=e._nextAutoLevel;if(C.aborted||C.loaded&&C.loaded===C.total||H<=M)return e.clearTimer(),void(e._nextAutoLevel=-1);if(T){var j=Y>-1&&Y!==H,$=!!r||j;if($||!E.paused&&E.playbackRate&&E.readyState){var le=y.mainForwardBufferInfo;if($||null!==le){var pe=e.bwEstimator.getEstimateTTFB(),Se=Math.abs(E.playbackRate);if(!(w<=Math.max(pe,k/(2*Se)*1e3))){var we=le?le.len/Se:0,Te=C.loading.first?C.loading.first-C.loading.start:-1,oe=C.loaded&&Te>-1,fe=e.getBwEstimate(),Ce=y.levels,He=Math.max(C.loaded,Math.round(k*(v.bitrate||Ce[H].averageBitrate)/8)),We=oe?w-Te:w;We<1&&oe&&(We=Math.min(w,8*C.loaded/fe));var vt=oe?1e3*C.loaded/We:0,At=pe/1e3,St=vt?(He-C.loaded)/vt:8*He/fe+At;if(!(St<=we)){var kt,Pt=vt?8*vt:fe,Ht=!0===(null==(u=(null==r?void 0:r.details)||e.hls.latestLevelDetails)?void 0:u.live),Lt=e.hls.config.abrBandWidthUpFactor,bt=Number.POSITIVE_INFINITY;for(kt=H-1;kt>M&&!((bt=e.getTimeToLoadFrag(At,Pt,k*Ce[kt].maxBitrate,!Ce[kt].details||Ht))<Math.min(we,k+At));kt--);if(!(bt>=St||bt>10*k)){oe?e.bwEstimator.sample(w-Math.min(pe,Te),C.loaded):e.bwEstimator.sampleTTFB(w);var Zt=Ce[kt].maxBitrate;e.getBwEstimate()*Lt>Zt&&e.resetEstimator(Zt);var Ar=e.findBestLevel(Zt,M,kt,0,we,1,1);Ar>-1&&(kt=Ar),e.warn("Fragment "+v.sn+(p?" part "+p.index:"")+" of level "+H+" is loading too slowly;\n      Fragment duration: "+v.duration.toFixed(3)+"\n      Time to underbuffer: "+we.toFixed(3)+" s\n      Estimated load time for current fragment: "+St.toFixed(3)+" s\n      Estimated load time for down switch fragment: "+bt.toFixed(3)+" s\n      TTFB estimate: "+(0|Te)+" ms\n      Current BW estimate: "+(X(fe)?0|fe:"Unknown")+" bps\n      New BW estimate: "+(0|e.getBwEstimate())+" bps\n      Switching to level "+kt+" @ "+(0|Zt)+" bps"),y.nextLoadLevel=y.nextAutoLevel=kt,e.clearTimer();var Cr=function(){if(e.clearTimer(),e.fragCurrent===v&&e.hls.loadLevel===kt&&kt>0){var di=e.getStarvationDelay();if(e.warn("Aborting inflight request "+(kt>0?"and switching down":"")+"\n      Fragment duration: "+v.duration.toFixed(3)+" s\n      Time to underbuffer: "+di.toFixed(3)+" s"),v.abortRequests(),e.fragCurrent=e.partCurrent=null,kt>M){var Er=e.findBestLevel(e.hls.levels[M].bitrate,M,kt,0,di,1,1);-1===Er&&(Er=M),e.hls.nextLoadLevel=e.hls.nextAutoLevel=Er,e.resetEstimator(e.hls.levels[Er].bitrate)}}};j||St>2*bt?Cr():e.timer=self.setInterval(Cr,1e3*bt),y.trigger(O.FRAG_LOAD_EMERGENCY_ABORTED,{frag:v,part:p,stats:C})}}}}}}}},e.hls=i,e.bwEstimator=e.initEstimator(),e.registerListeners(),e}xe(h,f);var l=h.prototype;return l.resetEstimator=function(e){e&&(this.log("setting initial bwe to "+e),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()},l.initEstimator=function(){var e=this.hls.config;return new nt(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)},l.registerListeners=function(){var e=this.hls;e.on(O.MANIFEST_LOADING,this.onManifestLoading,this),e.on(O.FRAG_LOADING,this.onFragLoading,this),e.on(O.FRAG_LOADED,this.onFragLoaded,this),e.on(O.FRAG_BUFFERED,this.onFragBuffered,this),e.on(O.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(O.LEVEL_LOADED,this.onLevelLoaded,this),e.on(O.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(O.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(O.ERROR,this.onError,this)},l.unregisterListeners=function(){var e=this.hls;e&&(e.off(O.MANIFEST_LOADING,this.onManifestLoading,this),e.off(O.FRAG_LOADING,this.onFragLoading,this),e.off(O.FRAG_LOADED,this.onFragLoaded,this),e.off(O.FRAG_BUFFERED,this.onFragBuffered,this),e.off(O.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(O.LEVEL_LOADED,this.onLevelLoaded,this),e.off(O.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(O.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(O.ERROR,this.onError,this))},l.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=this.supportedCache=null,this.fragCurrent=this.partCurrent=null},l.onManifestLoading=function(e,r){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.supportedCache={},this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()},l.onLevelsUpdated=function(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null},l.onMaxAutoLevelUpdated=function(){this.firstSelection=-1,this.nextAutoLevelKey=""},l.onFragLoading=function(e,r){var c,u=r.frag;this.ignoreFragment(u)||(u.bitrateTest||(this.fragCurrent=u,this.partCurrent=null!=(c=r.part)?c:null),this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100))},l.onLevelSwitching=function(e,r){this.clearTimer()},l.onError=function(e,r){if(!r.fatal)switch(r.details){case ue.BUFFER_ADD_CODEC_ERROR:case ue.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case ue.FRAG_LOAD_TIMEOUT:var u=r.frag,c=this.fragCurrent,v=this.partCurrent;if(u&&c&&u.sn===c.sn&&u.level===c.level){var p=performance.now(),y=v?v.stats:u.stats,T=p-y.loading.start,E=y.loading.first?y.loading.first-y.loading.start:-1;if(y.loaded&&E>-1){var C=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(T-Math.min(C,E),y.loaded)}else this.bwEstimator.sampleTTFB(T)}}},l.getTimeToLoadFrag=function(e,r,u,c){return e+u/r+(c?e+this.lastLevelLoadSec:0)},l.onLevelLoaded=function(e,r){var u=this.hls.config,c=r.stats.loading,v=c.end-c.first;X(v)&&(this.lastLevelLoadSec=v/1e3),r.details.live?this.bwEstimator.update(u.abrEwmaSlowLive,u.abrEwmaFastLive):this.bwEstimator.update(u.abrEwmaSlowVoD,u.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(r.levelInfo)},l.onFragLoaded=function(e,r){var u=r.frag,c=r.part,v=c?c.stats:u.stats;if(u.type===Ie.MAIN&&this.bwEstimator.sampleTTFB(v.loading.first-v.loading.start),!this.ignoreFragment(u)){if(this.clearTimer(),u.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){var y=this.hls.levels[u.level],T=(y.loaded?y.loaded.bytes:0)+v.loaded,E=(y.loaded?y.loaded.duration:0)+(c?c.duration:u.duration);y.loaded={bytes:T,duration:E},y.realBitrate=Math.round(8*T/E)}u.bitrateTest?(this.onFragBuffered(O.FRAG_BUFFERED,{stats:v,frag:u,part:c,id:u.type}),u.bitrateTest=!1):this.lastLoadedFragLevel=u.level}},l.onFragBuffered=function(e,r){var u=r.frag,c=r.part,v=null!=c&&c.stats.loaded?c.stats:u.stats;if(!v.aborted&&!this.ignoreFragment(u)){var p=v.parsing.end-v.loading.start-Math.min(v.loading.first-v.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(p,v.loaded),v.bwEstimate=this.getBwEstimate(),this.bitrateTestDelay=u.bitrateTest?p/1e3:0}},l.ignoreFragment=function(e){return e.type!==Ie.MAIN||"initSegment"===e.sn},l.clearTimer=function(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)},l.getAutoLevelKey=function(){return this.getBwEstimate()+"_"+this.getStarvationDelay().toFixed(2)},l.getNextABRAutoLevel=function(){var e=this.fragCurrent,r=this.partCurrent,u=this.hls;if(u.levels.length<=1)return u.loadLevel;var c=u.maxAutoLevel,v=u.config,p=u.minAutoLevel,y=r?r.duration:e?e.duration:0,T=this.getBwEstimate(),E=this.getStarvationDelay(),x=v.abrBandWidthFactor,C=v.abrBandWidthUpFactor;if(E){var k=this.findBestLevel(T,p,c,E,0,x,C);if(k>=0)return this.rebufferNotice=-1,k}var w=y?Math.min(y,v.maxStarvationDelay):v.maxStarvationDelay;if(!E){var M=this.bitrateTestDelay;M&&(w=(y?Math.min(y,v.maxLoadingDelay):v.maxLoadingDelay)-M,this.info("bitrate test took "+Math.round(1e3*M)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*w)+" ms"),x=C=1)}var Y=this.findBestLevel(T,p,c,E,w,x,C);if(this.rebufferNotice!==Y&&(this.rebufferNotice=Y,this.info((E?"rebuffering expected":"buffer is empty")+", optimal quality level "+Y)),Y>-1)return Y;var j=u.levels[p],$=u.loadLevelObj;return $&&(null==j?void 0:j.bitrate)<$.bitrate?p:u.loadLevel},l.getStarvationDelay=function(){var e=this.hls,r=e.media;if(!r)return 1/0;var u=r&&0!==r.playbackRate?Math.abs(r.playbackRate):1,c=e.mainForwardBufferInfo;return(c?c.len:0)/u},l.getBwEstimate=function(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate},l.findBestLevel=function(e,r,u,c,v,p,y){var T,E=this,x=c+v,C=this.lastLoadedFragLevel,k=-1===C?this.hls.firstLevel:C,w=this.fragCurrent,M=this.partCurrent,H=this.hls,Y=H.levels,$=H.loadLevel,le=H.config;if(1===Y.length)return 0;var Te,pe=Y[k],Se=!(null==(T=this.hls.latestLevelDetails)||!T.live),we=-1===$||-1===C,oe="SDR",fe=(null==pe?void 0:pe.frameRate)||0,Ce=le.audioPreference,ze=le.videoPreference,He=this.audioTracksByGroup||(this.audioTracksByGroup=ro(H.allAudioTracks)),We=-1;if(we){if(-1!==this.firstSelection)return this.firstSelection;var At=function ha(f,h,l,i,e){for(var r=Object.keys(f),u=null==i?void 0:i.channels,c=null==i?void 0:i.audioCodec,v=null==e?void 0:e.videoCodec,p=u&&2===parseInt(u),y=!1,T=!1,E=1/0,x=1/0,C=1/0,k=1/0,w=0,M=[],H=Nr(h,e),Y=H.preferHDR,j=H.allowedVideoRanges,$=function(){var fe=f[r[le]];y||(y=fe.channels[2]>0),E=Math.min(E,fe.minHeight),x=Math.min(x,fe.minFramerate),C=Math.min(C,fe.minBitrate),j.filter(function(ze){return fe.videoRanges[ze]>0}).length>0&&(T=!0)},le=r.length;le--;)$();E=X(E)?E:0,x=X(x)?x:0;var pe=Math.max(1080,E),Se=Math.max(30,x);C=X(C)?C:l,l=Math.max(C,l),T||(h=void 0);var we=r.length>1;return{codecSet:r.reduce(function(oe,fe){var Ce=f[fe];
11if(fe===oe)return oe;if(M=T?j.filter(function(ze){return Ce.videoRanges[ze]>0}):[],we){if(Ce.minBitrate>l)return gn(fe,"min bitrate of "+Ce.minBitrate+" > current estimate of "+l),oe;if(!Ce.hasDefaultAudio)return gn(fe,"no renditions with default or auto-select sound found"),oe;if(c&&fe.indexOf(c.substring(0,4))%5!=0)return gn(fe,'audio codec preference "'+c+'" not found'),oe;if(u&&!p){if(!Ce.channels[u])return gn(fe,"no renditions with "+u+" channel sound found (channels options: "+Object.keys(Ce.channels)+")"),oe}else if((!c||p)&&y&&0===Ce.channels[2])return gn(fe,"no renditions with stereo sound found"),oe;if(Ce.minHeight>pe)return gn(fe,"min resolution of "+Ce.minHeight+" > maximum of "+pe),oe;if(Ce.minFramerate>Se)return gn(fe,"min framerate of "+Ce.minFramerate+" > maximum of "+Se),oe;if(!M.some(function(ze){return Ce.videoRanges[ze]>0}))return gn(fe,"no variants with VIDEO-RANGE of "+cr(M)+" found"),oe;if(v&&fe.indexOf(v.substring(0,4))%5!=0)return gn(fe,'video codec preference "'+v+'" not found'),oe;if(Ce.maxScore<w)return gn(fe,"max score of "+Ce.maxScore+" < selected max of "+w),oe}return oe&&(bi(fe)>=bi(oe)||Ce.fragmentError>f[oe].fragmentError)?oe:(k=Ce.minIndex,w=Ce.maxScore,fe)},void 0),videoRanges:M,preferHDR:Y,minFramerate:x,minBitrate:C,minIndex:k}}(this.codecTiers||(this.codecTiers=function gi(f,h,l,i){return f.slice(l,i+1).reduce(function(e,r,u){if(!r.codecSet)return e;var c=r.audioGroups,v=e[r.codecSet];v||(e[r.codecSet]=v={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:u,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!c,fragmentError:0}),v.minBitrate=Math.min(v.minBitrate,r.bitrate);var p=Math.min(r.height,r.width);return v.minHeight=Math.min(v.minHeight,p),v.minFramerate=Math.min(v.minFramerate,r.frameRate),v.minIndex=Math.min(v.minIndex,u),v.maxScore=Math.max(v.maxScore,r.score),v.fragmentError+=r.fragmentError,v.videoRanges[r.videoRange]=(v.videoRanges[r.videoRange]||0)+1,c&&c.forEach(function(y){if(y){var T=h.groups[y];T&&(v.hasDefaultAudio=v.hasDefaultAudio||h.hasDefaultAudio?T.hasDefault:T.hasAutoSelect||!h.hasDefaultAudio&&!h.hasAutoSelectAudio,Object.keys(T.channels).forEach(function(E){v.channels[E]=(v.channels[E]||0)+T.channels[E]}))}}),e},{})}(Y,He,r,u)),oe,e,Ce,ze),Pt=At.videoRanges;We=At.minIndex,Te=At.codecSet,oe=At.preferHDR?Pt[Pt.length-1]:Pt[0],fe=At.minFramerate,e=Math.max(e,At.minBitrate),this.log("picked start tier "+cr(At))}else Te=null==pe?void 0:pe.codecSet,oe=null==pe?void 0:pe.videoRange;for(var Cr,Gt=M?M.duration:w?w.duration:0,ar=this.bwEstimator.getEstimateTTFB()/1e3,Zt=[],Ar=function(){var Er,nr=Y[fr],ti=fr>k;if(!nr)return 0;if(le.useMediaCapabilities&&!nr.supportedResult&&!nr.supportedPromise){var Li=navigator.mediaCapabilities;"function"==typeof(null==Li?void 0:Li.decodingInfo)&&function Dl(f,h,l,i,e,r){var u=f.videoCodec,c=f.audioCodec?f.audioGroups:null,v=null==r?void 0:r.audioCodec,p=null==r?void 0:r.channels,y=p?parseInt(p):v?1/0:2,T=null;if(null!=c&&c.length)try{T=1===c.length&&c[0]?h.groups[c[0]].channels:c.reduce(function(E,x){if(x){var C=h.groups[x];if(!C)throw new Error("Audio track group "+x+" not found");Object.keys(C.channels).forEach(function(k){E[k]=(E[k]||0)+C.channels[k]})}return E},{2:0})}catch(E){return!0}return void 0!==u&&(u.split(",").some(function(E){return Ri(E)})||f.width>1920&&f.height>1088||f.height>1920&&f.width>1088||f.frameRate>Math.max(i,30)||"SDR"!==f.videoRange&&f.videoRange!==l||f.bitrate>Math.max(e,8e6))||!!T&&X(y)&&Object.keys(T).some(function(E){return parseInt(E)>y})}(nr,He,oe,fe,e,Ce)?(nr.supportedPromise=fu(nr,He,Li,E.supportedCache),nr.supportedPromise.then(function(Di){if(E.hls){nr.supportedResult=Di;var kn=E.hls.levels,ln=kn.indexOf(nr);Di.error?E.warn('MediaCapabilities decodingInfo error: "'+Di.error+'" for level '+ln+" "+cr(Di)):Di.supported?Di.decodingInfoResults.some(function(Za){return!1===Za.smooth||!1===Za.powerEfficient})&&E.log("MediaCapabilities decodingInfo for level "+ln+" not smooth or powerEfficient: "+cr(Di)):(E.warn("Unsupported MediaCapabilities decodingInfo result for level "+ln+" "+cr(Di)),ln>-1&&kn.length>
vendor: 7,979 bytes, line 11
111&&(E.log("Removing unsupported level "+ln),E.hls.removeLevel(ln),-1===E.hls.loadLevel&&(E.hls.nextLoadLevel=0)))}}).catch(function(Di){E.warn("Error handling MediaCapabilities decodingInfo: "+Di)})):nr.supportedResult=lu}if((Te&&nr.codecSet!==Te||oe&&nr.videoRange!==oe||ti&&fe>nr.frameRate||!ti&&fe>0&&fe<nr.frameRate||null!=(Er=nr.supportedResult)&&null!=(Er=Er.decodingInfoResults)&&Er.some(function(Di){return!1===Di.smooth}))&&(!we||fr!==We))return Zt.push(fr),0;var qr,fi=nr.details,Bi=(M?null==fi?void 0:fi.partTarget:null==fi?void 0:fi.averagetargetduration)||Gt,Yi=Gt&&c>=2*Gt&&0===v?nr.averageBitrate:nr.maxBitrate,zi=E.getTimeToLoadFrag(ar,qr=ti?y*e:p*e,Yi*Bi,void 0===fi);if(qr>=Yi&&(fr===C||0===nr.loadError&&0===nr.fragmentError)&&(zi<=ar||!X(zi)||Se&&!E.bitrateTestDelay||zi<x)){var Ti=E.forcedAutoLevel;return fr!==$&&(-1===Ti||Ti!==$)&&(Zt.length&&E.trace("Skipped level(s) "+Zt.join(",")+" of "+u+' max with CODECS and VIDEO-RANGE:"'+Y[Zt[0]].codecs+'" '+Y[Zt[0]].videoRange+'; not compatible with "'+Te+'" '+oe),E.info("switch candidate:"+k+"->"+fr+" adjustedbw("+Math.round(qr)+")-bitrate="+Math.round(qr-Yi)+" ttfb:"+ar.toFixed(1)+" avgDuration:"+Bi.toFixed(1)+" maxFetchDuration:"+x.toFixed(1)+" fetchDuration:"+zi.toFixed(1)+" firstSelection:"+we+" codecSet:"+nr.codecSet+" videoRange:"+nr.videoRange+" hls.loadLevel:"+$)),we&&(E.firstSelection=fr),{v:fr}}},fr=u;fr>=r;fr--)if(0!==(Cr=Ar())&&Cr)return Cr.v;return-1},l.deriveNextAutoLevel=function(e){var r=this.hls,u=r.maxAutoLevel;return Math.min(Math.max(e,r.minAutoLevel),u)},ce(h,[{key:"firstAutoLevel",get:function(){var e=this.hls,r=e.maxAutoLevel,u=e.minAutoLevel,c=this.getBwEstimate(),p=this.findBestLevel(c,u,r,0,this.hls.config.maxStarvationDelay,1,1);if(p>-1)return p;var y=this.hls.firstLevel,T=Math.min(Math.max(y,u),r);return this.warn("Could not find best starting auto level. Defaulting to first in playlist "+y+" clamped to "+T),T}},{key:"forcedAutoLevel",get:function(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}},{key:"nextAutoLevel",get:function(){var e=this.forcedAutoLevel,u=this.bwEstimator.canEstimate(),c=this.lastLoadedFragLevel>-1;if(!(-1===e||u&&c&&this.nextAutoLevelKey!==this.getAutoLevelKey()))return e;var v=u&&c?this.getNextABRAutoLevel():this.firstAutoLevel;if(-1!==e){var p=this.hls.levels;if(p.length>Math.max(e,v)&&p[e].loadError<=p[v].loadError)return e}return this._nextAutoLevel=v,this.nextAutoLevelKey=this.getAutoLevelKey(),v},set:function(e){var r=this.deriveNextAutoLevel(e);this._nextAutoLevel!==r&&(this.nextAutoLevelKey="",this._nextAutoLevel=r)}}])}(Ze),io={search:function(h,l){for(var i=0,e=h.length-1,r=null,u=null;i<=e;){var c=l(u=h[r=(i+e)/2|0]);if(c>0)i=r+1;else{if(!(c<0))return u;e=r-1}}return null}};function va(f,h,l,i,e){void 0===l&&(l=0),void 0===i&&(i=0),void 0===e&&(e=.005);var r=null;if(f){var u=f.endDTS-l;u>0&&u<15e-7&&(l+=15e-7),(r=h[1+f.sn-h[0].sn]||null)&&f.level!==r.level&&r.end<=f.end&&(r=h[2+f.sn-h[0].sn]||null)}else 0===l&&0===h[0].start&&(r=h[0]);if(r&&((!f||f.level===r.level)&&0===_u(l,i,r)||function Vl(f,h,l){if(h&&0===h.start&&h.level<f.level&&(h.endPTS||0)>0){var i=h.tagList.reduce(function(e,r){return"INF"===r[0]&&(e+=parseFloat(r[1])),e},l);return f.start<=i}return!1}(r,f,Math.min(e,i))))return r;var c=io.search(h,_u.bind(null,l,i));return!c||c===f&&r?r:c}function _u(f,h,l){if(void 0===f&&(f=0),void 0===h&&(h=0),l.start<=f&&l.start+l.duration>f)return 0;var i=Math.min(h,l.duration+(l.deltaPTS?l.deltaPTS:0));return l.start+l.duration-i<=f?1:l.start-i>f&&l.start?-1:0}function Hl(f,h,l){var i=1e3*Math.min(h,l.duration+(l.deltaPTS?l.deltaPTS:0));return(l.endProgramDateTime||0)-i>f}function mn(f,h,l){if(f&&f.startCC<=h&&f.endCC>=h){var r,i=f.fragments,e=f.fragmentHint;return e&&(i=i.concat(e)),io.search(i,function(u){return u.cc<h?1:u.cc>h?-1:(r=u,u.end<=l?1:u.start>l?-1:0)}),r||null}return null}function fs(f){switch(f.details){case ue.FRAG_LOAD_TIMEOUT:case ue.KEY_LOAD_TIMEOUT:case ue.LEVEL_LOAD_TIMEOUT:case ue.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function K(f){return f.details.startsWith("key")}function ee(f){return K(f)&&!!f.frag&&!f.frag.decryptdata}function I(f,h){var l=fs(h);return f.default[(l?"timeout":"error")+"Retry"]}function G(f,h){var l="linear"===f.backoff?1:Math.pow(2,h);return Math.min(l*f.retryDelayMs,f.maxRetryDelayMs)}function N(f){return Oe(Oe({},f),{errorRetry:null,timeoutRetry:null})}function J(f,h,l,i){if(!f)return!1;var r=h<f.maxNumRetry&&(function Ee(f){return Ue(f)||!!f&&(f<400||f>499)}(null==i?void 0:i.code)||!!l);return f.shouldRetry?f.shouldRetry(f,h,l,i,r):r}function Ue(f){return 0===f&&!1===navigator.onLine}var lt={DoNothing:0,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,RetryRequest:5},ot={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4},xt=function(f){function h(i){var e;return(e=f.call(this,"error-controller",i.logger)||this).hls=void 0,e.playlistError=0,e.hls=i,e.registerListeners(),e}xe(h,f);var l=h.prototype;return l.registerListeners=function(){var e=this.hls;e.on(O.ERROR,this.onError,this),e.on(O.MANIFEST_LOADING,this.onManifestLoading,this),e.on(O.LEVEL_UPDATED,this.onLevelUpdated,this)},l.unregisterListeners=function(){var e=this.hls;e&&(e.off(O.ERROR,this.onError,this),e.off(O.ERROR,this.onErrorOut,this),e.off(O.MANIFEST_LOADING,this.onManifestLoading,this),e.off(O.LEVEL_UPDATED,this.onLevelUpdated,this))},l.destroy=function(){this.unregisterListeners(),this.hls=null},l.startLoad=function(e){},l.stopLoad=function(){this.playlistError=0},l.getVariantLevelIndex=function(e){return(null==e?void 0:e.type)===Ie.MAIN?e.level:this.getVariantIndex()},l.getVariantIndex=function(){var e,r=this.hls,u=r.currentLevel;return null!=(e=r.loadLevelObj)&&e.details||-1===u?r.loadLevel:u},l.variantHasKey=function(e,r){if(e){var u;if(null!=(u=e.details)&&u.hasKey(r))return!0;var c=e.audioGroups;if(c)return this.hls.allAudioTracks.filter(function(p){return c.indexOf(p.groupId)>=0}).some(function(p){var y;return null==(y=p.details)?void 0:y.hasKey(r)})}return!1},l.onManifestLoading=function(){this.playlistError=0},l.onLevelUpdated=function(){this.playlistError=0},l.onError=function(e,r){var u;if(!r.fatal){var c=this.hls,v=r.context;switch(r.details){case ue.FRAG_LOAD_ERROR:case ue.FRAG_LOAD_TIMEOUT:case ue.KEY_LOAD_ERROR:case ue.KEY_LOAD_TIMEOUT:return void(r.errorAction=this.getFragRetryOrSwitchAction(r));case ue.FRAG_PARSING_ERROR:if(null!=(u=r.frag)&&u.gap)return void(r.errorAction=zt());case ue.FRAG_GAP:case ue.FRAG_DECRYPT_ERROR:return r.errorAction=this.getFragRetryOrSwitchAction(r),void(r.errorAction.action=lt.SendAlternateToPenaltyBox);case ue.LEVEL_EMPTY_ERROR:case ue.LEVEL_PARSING_ERROR:var p,y=r.parent===Ie.MAIN?r.level:c.loadLevel;return void(r.details===ue.LEVEL_EMPTY_ERROR&&null!=(p=r.context)&&null!=(p=p.levelDetails)&&p.live?r.errorAction=this.getPlaylistRetryOrSwitchAction(r,y):(r.levelRetry=!1,r.errorAction=this.getLevelSwitchAction(r,y)));case ue.LEVEL_LOAD_ERROR:case ue.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==v?void 0:v.level)&&(r.errorAction=this.getPlaylistRetryOrSwitchAction(r,v.level)));case ue.AUDIO_TRACK_LOAD_ERROR:case ue.AUDIO_TRACK_LOAD_TIMEOUT:case ue.SUBTITLE_LOAD_ERROR:case ue.SUBTITLE_TRACK_LOAD_TIMEOUT:if(v){var T=c.loadLevelObj;if(T&&(v.type===Qe.AUDIO_TRACK&&T.hasAudioGroup(v.groupId)||v.type===Qe.SUBTITLE_TRACK&&T.hasSubtitleGroup(v.groupId)))return r.errorAction=this.getPlaylistRetryOrSwitchAction(r,c.loadLevel),r.errorAction.action=lt.SendAlternateToPenaltyBox,void(r.errorAction.flags=ot.MoveAllAlternatesMatchingHost)}return;case ue.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:return void(r.errorAction={action:lt.SendAlternateToPenaltyBox,flags:ot.MoveAllAlternatesMatchingHDCP});case ue.KEY_SYSTEM_SESSION_UPDATE_FAILED:case ue.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case ue.KEY_SYSTEM_NO_SESSION:return void(r.errorAction={action:lt.SendAlternateToPenaltyBox,flags:ot.MoveAllAlternatesMatchingKey});
11case ue.BUFFER_ADD_CODEC_ERROR:case ue.REMUX_ALLOC_ERROR:case ue.BUFFER_APPEND_ERROR:var E;return void(r.errorAction||(r.errorAction=this.getLevelSwitchAction(r,null!=(E=r.level)?E:c.loadLevel)));case ue.INTERNAL_EXCEPTION:case ue.BUFFER_APPENDING_ERROR:case ue.BUFFER_FULL_ERROR:case ue.LEVEL_SWITCH_ERROR:case ue.BUFFER_STALLED_ERROR:case ue.BUFFER_SEEK_OVER_HOLE:case ue.BUFFER_NUDGE_ON_STALL:return void(r.errorAction=zt())}r.type===Ae.KEY_SYSTEM_ERROR&&(r.levelRetry=!1,r.errorAction=zt())}},l.getPlaylistRetryOrSwitchAction=function(e,r){var c=I(this.hls.config.playlistLoadPolicy,e),v=this.playlistError++;if(J(c,v,fs(e),e.response))return{action:lt.RetryRequest,flags:ot.None,retryConfig:c,retryCount:v};var y=this.getLevelSwitchAction(e,r);return c&&(y.retryConfig=c,y.retryCount=v),y},l.getFragRetryOrSwitchAction=function(e){var r=this.hls,u=this.getVariantLevelIndex(e.frag),c=r.levels[u],v=r.config,p=v.fragLoadPolicy,y=v.keyLoadPolicy,T=I(K(e)?y:p,e),E=r.levels.reduce(function(k,w){return k+w.fragmentError},0);if(c&&(e.details!==ue.FRAG_GAP&&c.fragmentError++,!ee(e))&&J(T,E,fs(e),e.response))return{action:lt.RetryRequest,flags:ot.None,retryConfig:T,retryCount:E};var C=this.getLevelSwitchAction(e,u);return T&&(C.retryConfig=T,C.retryCount=E),C},l.getLevelSwitchAction=function(e,r){var u=this.hls;null==r&&(r=u.loadLevel);var c=this.hls.levels[r];if(c){var v,p,y=e.details;c.loadError++,y===ue.BUFFER_APPEND_ERROR&&c.fragmentError++;var T=-1,E=u.levels,x=u.loadLevel,C=u.minAutoLevel,k=u.maxAutoLevel;!u.autoLevelEnabled&&!u.config.preserveManualLevelOnError&&(u.loadLevel=-1);for(var we,w=null==(v=e.frag)?void 0:v.type,H=(w===Ie.AUDIO&&y===ue.FRAG_PARSING_ERROR||"audio"===e.sourceBufferName&&(y===ue.BUFFER_ADD_CODEC_ERROR||y===ue.BUFFER_APPEND_ERROR))&&E.some(function(oe){return c.audioCodec!==oe.audioCodec}),j="video"===e.sourceBufferName&&(y===ue.BUFFER_ADD_CODEC_ERROR||y===ue.BUFFER_APPEND_ERROR)&&E.some(function(oe){return c.codecSet!==oe.codecSet&&c.audioCodec===oe.audioCodec}),$=null!=(p=e.context)?p:{},le=$.type,pe=$.groupId,Se=function(){var fe=(Te+x)%E.length;if(fe!==x&&fe>=C&&fe<=k&&0===E[fe].loadError){var Ce,ze,He=E[fe];if(y===ue.FRAG_GAP&&w===Ie.MAIN&&e.frag){var We=E[fe].details;if(We){var vt=va(e.frag,We.fragments,e.frag.start);if(null!=vt&&vt.gap)return 0}}else{if(le===Qe.AUDIO_TRACK&&He.hasAudioGroup(pe)||le===Qe.SUBTITLE_TRACK&&He.hasSubtitleGroup(pe))return 0;if(w===Ie.AUDIO&&null!=(Ce=c.audioGroups)&&Ce.some(function(At){return He.hasAudioGroup(At)})||w===Ie.SUBTITLE&&null!=(ze=c.subtitleGroups)&&ze.some(function(At){return He.hasSubtitleGroup(At)})||H&&c.audioCodec===He.audioCodec||j&&c.codecSet===He.codecSet||!H&&c.codecSet!==He.codecSet)return 0}return T=fe,1}},Te=E.length;Te--&&(0===(we=Se())||1!==we););if(T>-1&&u.loadLevel!==T)return e.levelRetry=!0,this.playlistError=0,{action:lt.SendAlternateToPenaltyBox,flags:ot.None,nextAutoLevel:T}}return{action:lt.SendAlternateToPenaltyBox,flags:ot.MoveAllAlternatesMatchingHost}},l.onErrorOut=function(e,r){var u;switch(null==(u=r.errorAction)?void 0:u.action){case lt.DoNothing:break;case lt.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(r),r.errorAction.resolved||r.details===ue.FRAG_GAP?/MediaSource readyState: ended/.test(r.error.message)&&(this.warn('MediaSource ended after "'+r.sourceBufferName+'" sourceBuffer append error. Attempting to recover from media error.'),this.hls.recoverMediaError()):r.fatal=!0}r.fatal&&this.hls.stopLoad()},l.sendAlternateToPenaltyBox=function(e){var r=this.hls,u=e.errorAction;if(u){var v=u.nextAutoLevel;switch(u.flags){case ot.None:this.switchLevel(e,v);break;case ot.MoveAllAlternatesMatchingHDCP:var p=this.getVariantLevelIndex(e.frag),y=r.levels[p],T=null==y?void 0:y.attrs["HDCP-LEVEL"];if(u.hdcpLevel=T,"NONE"===T)this.warn("HDCP policy resticted output with HDCP-LEVEL=NONE");else if(T){r.maxHdcpLevel=os[os.indexOf(T)-1],u.resolved=!0,this.warn('Restricting playback to HDCP-LEVEL of "'+r.maxHdcpLevel+'" or lower');break}case ot.MoveAllAlternatesMatchingKey:var E=e.decryptdata;if(E){for(var x=this.hls.levels,C=x.length,k=C;k--;)if(this.variantHasKey(x[k],E)){var w,M;this.log("Banned key found in level "+k+" ("+x[k].bitrate+'bps) or audio group "'+(null==(w=x[k].audioGroups)?void 0:w.join(","))+'" ('+(null==(M=e.frag)?void 0:M.type)+" fragment) "+Nt(E.keyId||[])),x[k].fragmentError++,x[k].loadError++,this.log("Removing level "+k+" with key error ("+e.error+")"),this.hls.removeLevel(k)}var H=e.frag;if(this.hls.levels.length<C)u.resolved=!0;else if(H&&H.type!==Ie.MAIN){var Y=H.decryptdata;Y&&!E.matches(Y)&&(u.resolved=!0)}}}u.resolved||this.switchLevel(e,v)}},l.switchLevel=function(e,r){if(void 0!==r&&e.errorAction&&(this.warn("switching to level "+r+" after "+e.details),this.hls.nextAutoLevel=r,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===ue.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&"audiovideo"!==e.sourceBufferName))for(var u=eo(e.mimeType),c=this.hls.levels,v=c.length;v--;)c[v][e.sourceBufferName+"Codec"]===u&&(this.log("Removing level "+v+" for "+e.details+' ("'+u+'" not supported)'),this.hls.removeLevel(v))},h}(Ze);function zt(f){var h={action:lt.DoNothing,flags:ot.None};return f&&(h.resolved=!0),h}var It_NOT_LOADED="NOT_LOADED",It_APPENDING="APPENDING",It_PARTIAL="PARTIAL",It_OK="OK",_r=function(){function f(l){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=l,this._registerListeners()}var h=f.prototype;return h._registerListeners=function(){var i=this.hls;i&&(i.on(O.MANIFEST_LOADING,this.onManifestLoading,this),i.on(O.BUFFER_APPENDED,this.onBufferAppended,this),i.on(O.FRAG_BUFFERED,this.onFragBuffered,this),i.on(O.FRAG_LOADED,this.onFragLoaded,this))},h._unregisterListeners=function(){var i=this.hls;i&&(i.off(O.MANIFEST_LOADING,this.onManifestLoading,this),i.off(O.BUFFER_APPENDED,this.onBufferAppended,this),i.off(O.FRAG_BUFFERED,this.onFragBuffered,this),i.off(O.FRAG_LOADED,this.onFragLoaded,this))},h.destroy=function(){this._unregisterListeners(),this.hls=this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null},h.getAppendedFrag=function(i,e){var r=this.activePartLists[e];if(r)for(var u=r.length;u--;){var c=r[u];if(!c)break;if(c.start<=i&&i<=c.end&&c.loaded)return c}return this.getBufferedFrag(i,e)},h.getBufferedFrag=function(i,e){return this.getFragAtPos(i,e,!0)},h.getFragAtPos=function(i,e,r){for(var u=this.fragments,c=Object.keys(u),v=c.length;v--;){var p=u[c[v]];if((null==p?void 0:p.body.type)===e&&(!r||p.buffered)){var y=p.body;if(y.start<=i&&i<=y.end)return y}}return null},h.detectEvictedFragments=function(i,e,r,u,c){var v=this;this.timeRanges&&(this.timeRanges[i]=e);var p=(null==u?void 0:u.fragment.sn)||-1;
vendor: 4,755 bytes, line 11
11Object.keys(this.fragments).forEach(function(y){var T=v.fragments[y];if(T&&!(p>=T.body.sn)){if(!T.buffered&&(!T.loaded||c))return void(T.body.type===r&&v.removeFragment(T.body));var E=T.range[i];if(E){if(0===E.time.length)return void v.removeFragment(T.body);E.time.some(function(x){var C=!v.isTimeBuffered(x.startPTS,x.endPTS,e);return C&&v.removeFragment(T.body),C})}}})},h.detectPartialFragments=function(i){var e=this,r=this.timeRanges;if(r&&"initSegment"!==i.frag.sn){var u=i.frag,c=xi(u),v=this.fragments[c];if(!(!v||v.buffered&&u.gap)){var p=!u.relurl;Object.keys(r).forEach(function(y){var T=u.elementaryStreams[y];T&&(v.range[y]=e.getBufferedTimes(u,i.part,p||!0===T.partial,r[y]))}),v.loaded=null,Object.keys(v.range).length?(this.bufferedEnd(v,u),Qr(v)||this.removeParts(u.sn-1,u.type)):this.removeFragment(v.body)}}},h.bufferedEnd=function(i,e){i.buffered=!0,(i.body.endList=e.endList||i.body.endList)&&(this.endListFragments[i.body.type]=i)},h.removeParts=function(i,e){var r=this.activePartLists[e];r&&(this.activePartLists[e]=Oa(r,function(u){return u.fragment.sn>=i}))},h.fragBuffered=function(i,e){var r=xi(i),u=this.fragments[r];!u&&e&&(u=this.fragments[r]={body:i,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},i.gap&&(this.hasGaps=!0)),u&&(u.loaded=null,this.bufferedEnd(u,i))},h.getBufferedTimes=function(i,e,r,u){for(var c={time:[],partial:r},v=i.start,p=i.end,y=i.minEndPTS||p,T=i.maxStartPTS||v,E=0;E<u.length;E++){var x=u.start(E)-this.bufferPadding,C=u.end(E)+this.bufferPadding;if(T>=x&&y<=C){c.time.push({startPTS:Math.max(v,u.start(E)),endPTS:Math.min(p,u.end(E))});break}if(v<C&&p>x){var k=Math.max(v,u.start(E)),w=Math.min(p,u.end(E));w>k&&(c.partial=!0,c.time.push({startPTS:k,endPTS:w}))}else if(p<=x)break}return c},h.getPartialFragment=function(i){var r,u,c,e=null,v=0,p=this.bufferPadding,y=this.fragments;return Object.keys(y).forEach(function(T){var E=y[T];E&&Qr(E)&&(c=E.body.end+p,i>=(u=E.body.start-p)&&i<=c&&(r=Math.min(i-u,c-i),v<=r&&(e=E.body,v=r)))}),e},h.isEndListAppended=function(i){var e=this.endListFragments[i];return void 0!==e&&(e.buffered||Qr(e))},h.getState=function(i){var e=xi(i),r=this.fragments[e];return r?r.buffered?Qr(r)?It_PARTIAL:It_OK:It_APPENDING:It_NOT_LOADED},h.isTimeBuffered=function(i,e,r){for(var u,c,v=0;v<r.length;v++){if(u=r.start(v)-this.bufferPadding,c=r.end(v)+this.bufferPadding,i>=u&&e<=c)return!0;if(e<=u)return!1}return!1},h.onManifestLoading=function(){this.removeAllFragments()},h.onFragLoaded=function(i,e){if("initSegment"!==e.frag.sn&&!e.frag.bitrateTest){var r=e.frag,u=e.part?null:e,c=xi(r);this.fragments[c]={body:r,appendedPTS:null,loaded:u,buffered:!1,range:Object.create(null)}}},h.onBufferAppended=function(i,e){var r=e.frag,u=e.part,c=e.timeRanges,v=e.type;if("initSegment"!==r.sn){var p=r.type;if(u){var y=this.activePartLists[p];y||(this.activePartLists[p]=y=[]),y.push(u)}this.timeRanges=c,this.detectEvictedFragments(v,c[v],p,u)}},h.onFragBuffered=function(i,e){this.detectPartialFragments(e)},h.hasFragment=function(i){var e=xi(i);return!!this.fragments[e]},h.hasFragments=function(i){var e=this.fragments,r=Object.keys(e);if(!i)return r.length>0;for(var u=r.length;u--;){var c=e[r[u]];if((null==c?void 0:c.body.type)===i)return!0}return!1},h.hasParts=function(i){var e;return!(null==(e=this.activePartLists[i])||!e.length)},h.removeFragmentsInRange=function(i,e,r,u,c){var v=this;u&&!this.hasGaps||Object.keys(this.fragments).forEach(function(p){var y=v.fragments[p];if(y){var T=y.body;T.type!==r||u&&!T.gap||T.start<e&&T.end>i&&(y.buffered||c)&&v.removeFragment(T)}})},h.removeFragment=function(i){var e=xi(i);i.clearElementaryStreamInfo();var r=this.activePartLists[i.type];if(r){var u=i.sn;this.activePartLists[i.type]=Oa(r,function(c){return c.fragment.sn!==u})}delete this.fragments[e],i.endList&&delete this.endListFragments[i.type]},h.removeAllFragments=function(){var i;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;var e=null==(i=this.hls)||null==(i=i.latestLevelDetails)?void 0:i.partList;e&&e.forEach(function(r){return r.clearElementaryStreamInfo()})},f}();function Qr(f){var h,l,i;return f.buffered&&!!(f.body.gap||null!=(h=f.range.video)&&h.partial||null!=(l=f.range.audio)&&l.partial||null!=(i=f.range.audiovideo)&&i.partial)}function xi(f){return f.type+"_"+f.level+"_"+f.sn}function Oa(f,h){return f.filter(function(l){var i=h(l);return i||l.clearElementaryStreamInfo(),i})}var bn={cbc:0,ctr:1},Eu=function(){function f(l,i,e){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=l,this.aesIV=i,this.aesMode=e}return f.prototype.decrypt=function(i,e){switch(this.aesMode){case bn.cbc:return this.subtle.decrypt({
vendor: 4,102 bytes, line 11
11name:"AES-CBC",iv:this.aesIV},e,i);case bn.ctr:return this.subtle.decrypt({name:"AES-CTR",counter:this.aesIV,length:64},e,i);default:throw new Error("[AESCrypto] invalid aes mode "+this.aesMode)}},f}();var Gl=function(){function f(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var h=f.prototype;return h.uint8ArrayToUint32Array_=function(i){for(var e=new DataView(i),r=new Uint32Array(4),u=0;u<4;u++)r[u]=e.getUint32(4*u);return r},h.initTable=function(){var i=this.sBox,e=this.invSBox,r=this.subMix,u=r[0],c=r[1],v=r[2],p=r[3],y=this.invSubMix,T=y[0],E=y[1],x=y[2],C=y[3],k=new Uint32Array(256),w=0,M=0,H=0;for(H=0;H<256;H++)k[H]=H<128?H<<1:H<<1^283;for(H=0;H<256;H++){var Y=M^M<<1^M<<2^M<<3^M<<4;i[w]=Y=Y>>>8^255&Y^99,e[Y]=w;var j=k[w],$=k[j],le=k[$],pe=257*k[Y]^16843008*Y;u[w]=pe<<24|pe>>>8,c[w]=pe<<16|pe>>>16,v[w]=pe<<8|pe>>>24,p[w]=pe,T[Y]=(pe=16843009*le^65537*$^257*j^16843008*w)<<24|pe>>>8,E[Y]=pe<<16|pe>>>16,x[Y]=pe<<8|pe>>>24,C[Y]=pe,w?(w=j^k[k[k[le^j]]],M^=k[k[M]]):w=M=1}},h.expandKey=function(i){for(var e=this.uint8ArrayToUint32Array_(i),r=!0,u=0;u<e.length&&r;)r=e[u]===this.key[u],u++;if(!r){this.key=e;var c=this.keySize=e.length;if(4!==c&&6!==c&&8!==c)throw new Error("Invalid aes key size="+c);var p,y,j,$,v=this.ksRows=4*(c+6+1),T=this.keySchedule=new Uint32Array(v),E=this.invKeySchedule=new Uint32Array(v),x=this.sBox,C=this.rcon,k=this.invSubMix,w=k[0],M=k[1],H=k[2],Y=k[3];for(p=0;p<v;p++)p<c?j=T[p]=e[p]:($=j,p%c==0?($=x[($=$<<8|$>>>24)>>>24]<<24|x[$>>>16&255]<<16|x[$>>>8&255]<<8|x[255&$],$^=C[p/c|0]<<24):c>6&&p%c==4&&($=x[$>>>24]<<24|x[$>>>16&255]<<16|x[$>>>8&255]<<8|x[255&$]),T[p]=j=(T[p-c]^$)>>>0);for(y=0;y<v;y++)p=v-y,$=3&y?T[p]:T[p-4],E[y]=y<4||p<=4?$:w[x[$>>>24]]^M[x[$>>>16&255]]^H[x[$>>>8&255]]^Y[x[255&$]],E[y]=E[y]>>>0}},h.networkToHostOrderSwap=function(i){return i<<24|(65280&i)<<8|(16711680&i)>>8|i>>>24},h.decrypt=function(i,e,r){for(var le,pe,Se,we,Te,oe,fe,Ce,ze,He,We,vt,At,u=this.keySize+6,c=this.invKeySchedule,v=this.invSBox,p=this.invSubMix,y=p[0],T=p[1],E=p[2],x=p[3],C=this.uint8ArrayToUint32Array_(r),k=C[0],w=C[1],M=C[2],H=C[3],Y=new Int32Array(i),j=new Int32Array(Y.length),St=this.networkToHostOrderSwap;e<Y.length;){for(Ce=St(Y[e]),ze=St(Y[e+1]),He=St(Y[e+2]),We=St(Y[e+3]),we=Ce^c[0],Te=We^c[1],oe=He^c[2],fe=ze^c[3],vt=4,At=1;At<u;At++)le=y[Te>>>24]^T[oe>>16&255]^E[fe>>8&255]^x[255&we]^c[vt+1],pe=y[oe>>>24]^T[fe>>16&255]^E[we>>8&255]^x[255&Te]^c[vt+2],Se=y[fe>>>24]^T[we>>16&255]^E[Te>>8&255]^x[255&oe]^c[vt+3],we=y[we>>>24]^T[Te>>16&255]^E[oe>>8&255]^x[255&fe]^c[vt],Te=le,oe=pe,fe=Se,vt+=4;le=v[Te>>>24]<<24^v[oe>>16&255]<<16^v[fe>>8&255]<<8^v[255&we]^c[vt+1],pe=v[oe>>>24]<<24^v[fe>>16&255]<<16^v[we>>8&255]<<8^v[255&Te]^c[vt+2],Se=v[fe>>>24]<<24^v[we>>16&255]<<16^v[Te>>8&255]<<8^v[255&oe]^c[vt+3],j[e]=St(v[we>>>24]<<24^v[Te>>16&255]<<16^v[oe>>8&255]<<8^v[255&fe]^c[vt]^k),j[e+1]=St(Se^w),j[e+2]=St(pe^M),j[e+3]=St(le^H),k=Ce,w=ze,M=He,H=We,e+=4}return j.buffer},f}(),Hh=function(){function f(l,i,e){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=l,this.key=i,this.aesMode=e}return f.prototype.expandKey=function(){var i=function Ma(f){switch(f){case bn.cbc:return"AES-CBC";case bn.ctr:return"AES-CTR";default:throw new Error("[FastAESKey] invalid aes mode "+f)}}(this.aesMode);return this.subtle.importKey("raw",this.key,{name:i},!1,["encrypt","decrypt"])},f}();var Kl=function(){function f(l,i){var r=(void 0===i?{}:i).removePKCS7Padding,u=void 0===r||r;if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftw
vendor: 4,140 bytes, line 11
11areAES=l.enableSoftwareAES,this.removePKCS7Padding=u,u)try{var c=self.crypto;c&&(this.subtle=c.subtle||c.webkitSubtle)}catch(v){}this.useSoftware=!this.subtle}var h=f.prototype;return h.destroy=function(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null},h.isSync=function(){return this.useSoftware},h.flush=function(){var i=this.currentResult;if(!i||this.remainderData)return this.reset(),null;var r=new Uint8Array(i);return this.reset(),this.removePKCS7Padding?function Lr(f){var h=f.byteLength,l=h&&new DataView(f.buffer).getUint8(h-1);return l?f.slice(0,h-l):f}(r):r},h.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},h.decrypt=function(i,e,r,u){var c=this;return this.useSoftware?new Promise(function(v,p){var y=ArrayBuffer.isView(i)?i:new Uint8Array(i);c.softwareDecrypt(y,e,r,u);var T=c.flush();T?v(T.buffer):p(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(i),e,r,u)},h.softwareDecrypt=function(i,e,r,u){var c=this.currentIV,v=this.currentResult,p=this.remainderData;if(u!==bn.cbc||16!==e.byteLength)return Vt.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),p&&(i=ai(p,i),this.remainderData=null);var y=this.getValidChunk(i);if(!y.length)return null;c&&(r=c);var T=this.softwareDecrypter;T||(T=this.softwareDecrypter=new Gl),T.expandKey(e);var E=v;return this.currentResult=T.decrypt(y.buffer,0,r),this.currentIV=y.slice(-16).buffer,E||null},h.webCryptoDecrypt=function(i,e,r,u){var c=this;if(this.key!==e||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(i,e,r,u));this.key=e,this.fastAesKey=new Hh(this.subtle,e,u)}return this.fastAesKey.expandKey().then(function(v){return c.subtle?(c.logOnce("WebCrypto AES decrypt"),new Eu(c.subtle,new Uint8Array(r),u).decrypt(i.buffer,v)):Promise.reject(new Error("web crypto not initialized"))}).catch(function(v){return Vt.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, "+v.name+": "+v.message),c.onWebCryptoError(i,e,r,u)})},h.onWebCryptoError=function(i,e,r,u){var c=this.enableSoftwareAES;if(c){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(i,e,r,u);var v=this.flush();if(v)return v.buffer}throw new Error("WebCrypto"+(c?" and softwareDecrypt":"")+": failed to decrypt data")},h.getValidChunk=function(i){var e=i,r=i.length-i.length%16;return r!==i.length&&(e=i.slice(0,r),this.remainderData=i.slice(r)),e},h.logOnce=function(i){this.logEnabled&&(Vt.log("[decrypter]: "+i),this.logEnabled=!1)},f}(),Pf=Math.pow(2,17),Br=function(){function f(l){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=l}var h=f.prototype;return h.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},h.abort=function(){this.loader&&this.loader.abort()},h.load=function(i,e){var r=this,u=i.url;if(!u)return Promise.reject(new pa({type:Ae.NETWORK_ERROR,details:ue.FRAG_LOAD_ERROR,fatal:!1,frag:i,error:new Error("Fragment does not have a "+(u?"part list":"url")),networkDetails:null}));this.abort();var c=this.config,v=c.fLoader,p=c.loader;return new Promise(function(y,T){if(r.loader&&r.loader.destroy(),i.gap){if(i.tagList.some(function(M){return"GAP"===M[0]}))return void T(Rf(i));i.gap=!1}var E=r.loader=v?new v(c):new p(c),x=kf(i);i.loader=E;var C=N(c.fragLoadPolicy.default),k={loadPolicy:C,timeout:C.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===i.sn?1/0:Pf};i.stats=E.stats;var w={onSuccess:function(H,Y,j,$){r.resetLoader(i,E);var le=H.data;j.resetIV&&i.decryptdata&&(i.decryptdata.iv=new Uint8Array(le.slice(0,16)),le=le.slice(16)),y({frag:i,part:null,payload:le,networkDetails:$})},onError:function(H,Y,j,$){r.resetLoader(i,E),T(new pa({type:Ae.NETWORK_ERROR,details:ue.FRAG_LOAD_ERROR,fatal:!1,frag:i,response:Oe({url:u,data:void 0},H),error:new Error("HTTP Error "+H.code+" "+H.text),networkDetails:j,stats:$}))},onAbort:function(H,Y,j){r.resetLoader(i,E),T(new pa({type:Ae.NETWORK_E
vendor: 5,279 bytes, line 11
11RROR,details:ue.INTERNAL_ABORTED,fatal:!1,frag:i,error:new Error("Aborted"),networkDetails:j,stats:H}))},onTimeout:function(H,Y,j){r.resetLoader(i,E),T(new pa({type:Ae.NETWORK_ERROR,details:ue.FRAG_LOAD_TIMEOUT,fatal:!1,frag:i,error:new Error("Timeout after "+k.timeout+"ms"),networkDetails:j,stats:H}))}};e&&(w.onProgress=function(M,H,Y,j){return e({frag:i,part:null,payload:Y,networkDetails:j})}),E.load(x,k,w)})},h.loadPart=function(i,e,r){var u=this;this.abort();var c=this.config,v=c.fLoader,p=c.loader;return new Promise(function(y,T){if(u.loader&&u.loader.destroy(),i.gap||e.gap)T(Rf(i,e));else{var E=u.loader=v?new v(c):new p(c),x=kf(i,e);i.loader=E;var C=N(c.fragLoadPolicy.default),k={loadPolicy:C,timeout:C.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Pf};e.stats=E.stats,E.load(x,k,{onSuccess:function(M,H,Y,j){u.resetLoader(i,E),u.updateStatsFromPart(i,e);var $={frag:i,part:e,payload:M.data,networkDetails:j};r($),y($)},onError:function(M,H,Y,j){u.resetLoader(i,E),T(new pa({type:Ae.NETWORK_ERROR,details:ue.FRAG_LOAD_ERROR,fatal:!1,frag:i,part:e,response:Oe({url:x.url,data:void 0},M),error:new Error("HTTP Error "+M.code+" "+M.text),networkDetails:Y,stats:j}))},onAbort:function(M,H,Y){i.stats.aborted=e.stats.aborted,u.resetLoader(i,E),T(new pa({type:Ae.NETWORK_ERROR,details:ue.INTERNAL_ABORTED,fatal:!1,frag:i,part:e,error:new Error("Aborted"),networkDetails:Y,stats:M}))},onTimeout:function(M,H,Y){u.resetLoader(i,E),T(new pa({type:Ae.NETWORK_ERROR,details:ue.FRAG_LOAD_TIMEOUT,fatal:!1,frag:i,part:e,error:new Error("Timeout after "+k.timeout+"ms"),networkDetails:Y,stats:M}))}})}})},h.updateStatsFromPart=function(i,e){var r=i.stats,u=e.stats,c=u.total;if(r.loaded+=u.loaded,c){var v=Math.round(i.duration/e.duration),p=Math.min(Math.round(r.loaded/c),v),T=(v-p)*Math.round(r.loaded/p);r.total=r.loaded+T}else r.total=Math.max(r.loaded,r.total);var E=r.loading,x=u.loading;E.start?E.first+=x.first-x.start:(E.start=x.start,E.first=x.first),E.end=x.end},h.resetLoader=function(i,e){i.loader=null,this.loader===e&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),e.destroy()},f}();function kf(f,h){void 0===h&&(h=null);var l=h||f,i={frag:f,part:h,responseType:"arraybuffer",url:l.url,headers:{},rangeStart:0,rangeEnd:0},e=l.byteRangeStartOffset,r=l.byteRangeEndOffset;if(X(e)&&X(r)){var u,c=e,v=r;if("initSegment"===f.sn&&function Gh(f){return"AES-128"===f||"AES-256"===f}(null==(u=f.decryptdata)?void 0:u.method)){var p=r-e;p%16&&(v=r+(16-p%16)),0!==e&&(i.resetIV=!0,c=e-16)}i.rangeStart=c,i.rangeEnd=v}return i}function Rf(f,h){var l=new Error("GAP "+(f.gap?"tag":"attribute")+" found"),i={type:Ae.MEDIA_ERROR,details:ue.FRAG_GAP,fatal:!1,frag:f,error:l,networkDetails:null};return h&&(i.part=h),(h||f).stats.aborted=!0,new pa(i)}var pa=function(f){function h(l){var i;return(i=f.call(this,l.error.message)||this).data=void 0,i.data=l,i}return xe(h,f),h}(pt(Error)),wf=function(f){function h(i,e){var r;return(r=f.call(this,i,e)||this)._boundTick=void 0,r._tickTimer=null,r._tickInterval=null,r._tickCallCount=0,r._boundTick=r.tick.bind(r),r}xe(h,f);var l=h.prototype;return l.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},l.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},l.onHandlerDestroyed=function(){},l.hasInterval=function(){return!!this._tickInterval},l.hasNextTick=function(){return!!this._tickTimer},l.setInterval=function(e){return!this._tickInterval&&(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)},l.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},l.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},l.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},l.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},l.doTick=function(){},h}(Ze),jl=function(h,l,i,e,r,u){void 0===e&&(e=0),void 0===r&&(r=-1),void 0===u&&(u=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=h,this.sn=l,this.id=i,this.size=e,this.part=r,this.partial=u};var Of={length:0,start:function(){return 0},end:function(){return 0}},tr=function(){function f(){}return f.isBuffered=function(l,i){if(l)for(var e=f.getBuffered(l),r=e.length;r--;)if(i>=e.start(r)&&i<=e.end(r))return!0;return!1},f.bufferedRanges=function(l){if(l){var i=f.getBuffered(l);return f.timeRangesToArray(i)}return[]},f.timeRangesToArray=function(l){for(var i=[],e=0;e<l.length;e++)i.push({start:l.start(e),end:l.end(e)});return i},f.bufferInfo=function(l,i,e){if(l){var r=f.bufferedRanges(l);if(r.length)return f.bufferedInfo(r,i,e)}return{len:0,start:i,end:i,bufferedIndex:-1}},f.bufferedInfo=function(l,i,e){i=Math.max(0,i),l.length>1&&l.sort(function(M,H){return M.start-H.start||H.end-M.end});var r=-1,u=[];
vendor: 7,349 bytes, line 11
11if(e)for(var c=0;c<l.length;c++){i>=l[c].start&&i<=l[c].end&&(r=c);var v=u.length;if(v){var p=u[v-1].end;l[c].start-p<e?l[c].end>p&&(u[v-1].end=l[c].end):u.push(l[c])}else u.push(l[c])}else u=l;for(var T,y=0,E=i,x=i,C=0;C<u.length;C++){var k=u[C].start,w=u[C].end;if(-1===r&&i>=k&&i<=w&&(r=C),i+e>=k&&i<w)E=k,y=(x=w)-i;else if(i+e<k){T=k;break}}return{len:y,start:E||0,end:x||0,nextStart:T,buffered:l,bufferedIndex:r}},f.getBuffered=function(l){try{return l.buffered||Of}catch(i){return Vt.log("failed to get media.buffered",i),Of}},f}(),Mf=/\{\$([a-zA-Z0-9-_]+)\}/g;function Ff(f){return Mf.test(f)}function Ai(f,h){if(null!==f.variableList||f.hasVariableRefs){var l=f.variableList;return h.replace(Mf,function(i){var e=i.substring(2,i.length-1),r=null==l?void 0:l[e];return void 0===r?(f.playlistParsingError||(f.playlistParsingError=new Error('Missing preceding EXT-X-DEFINE tag for Variable Reference: "'+e+'"')),i):r})}return h}function Fa(f,h,l){var e,r,i=f.variableList;if(i||(f.variableList=i={}),"QUERYPARAM"in h){e=h.QUERYPARAM;try{var u=new self.URL(l).searchParams;if(!u.has(e))throw new Error('"'+e+'" does not match any query parameter in URI: "'+l+'"');r=u.get(e)}catch(c){f.playlistParsingError||(f.playlistParsingError=new Error("EXT-X-DEFINE QUERYPARAM: "+c.message))}}else e=h.NAME,r=h.VALUE;e in i?f.playlistParsingError||(f.playlistParsingError=new Error('EXT-X-DEFINE duplicate Variable Name declarations: "'+e+'"')):i[e]=r||""}function ql(f,h,l){var i=h.IMPORT;if(l&&i in l){var e=f.variableList;e||(f.variableList=e={}),e[i]=l[i]}else f.playlistParsingError||(f.playlistParsingError=new Error('EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "'+i+'"'))}var Kh=/^(\d+)x(\d+)$/,bu=/(.+?)=(".*?"|.*?)(?:,|$)/g,Zr=function(){function f(l,i){"string"==typeof l&&(l=f.parseAttrList(l,i)),be(this,l)}var h=f.prototype;return h.decimalInteger=function(i){var e=parseInt(this[i],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},h.hexadecimalInteger=function(i){if(this[i]){var e=(this[i]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var r=new Uint8Array(e.length/2),u=0;u<e.length/2;u++)r[u]=parseInt(e.slice(2*u,2*u+2),16);return r}return null},h.hexadecimalIntegerAsNumber=function(i){var e=parseInt(this[i],16);return e>Number.MAX_SAFE_INTEGER?1/0:e},h.decimalFloatingPoint=function(i){return parseFloat(this[i])},h.optionalFloat=function(i,e){var r=this[i];return r?parseFloat(r):e},h.enumeratedString=function(i){return this[i]},h.enumeratedStringList=function(i,e){var r=this[i];return(r?r.split(/[ ,]+/):[]).reduce(function(u,c){return u[c.toLowerCase()]=!0,u},e)},h.bool=function(i){return"YES"===this[i]},h.decimalResolution=function(i){var e=Kh.exec(this[i]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},f.parseAttrList=function(i,e){var r,u={};for(bu.lastIndex=0;null!==(r=bu.exec(i));){var v=r[1].trim(),p=r[2],y=0===p.indexOf('"')&&p.lastIndexOf('"')===p.length-1,T=!1;if(y)p=p.slice(1,-1);else switch(v){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":T=!0}if(e&&(y||T))p=Ai(e,p);else if(!T&&!y)switch(v){case"CLOSED-CAPTIONS":if("NONE"===p)break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":Vt.warn(i+": attribute "+v+" is missing quotes")}u[v]=p}return u},ce(f,[{key:"clientAttrs",get:function(){return Object.keys(this).filter(function(i){return"X-"===i.substring(0,2)})}}])}();function Wl(f){return"ID"!==f&&"CLASS"!==f&&"CUE"!==f&&"START-DATE"!==f&&"DURATION"!==f&&"END-DATE"!==f&&"END-ON-NEXT"!==f}function jh(f){return"SCTE35-OUT"===f||"SCTE35-IN"===f||"SCTE35-CMD"===f}var Au=function(){return ce(function f(h,l,i){var e;if(void 0===i&&(i=0),this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(null==l?void 0:l.tagAnchor)||null,this.tagOrder=null!=(e=null==l?void 0:l.tagOrder)?e:i,l){var r=l.attr;for(var u in r)if(Object.prototype.hasOwnProperty.call(h,u)&&h[u]!==r[u]){Vt.warn('DATERANGE tag attribute: "'+u+'" does not match for tags with ID: "'+h.ID+'"'),this._badValueForSameId=u;break}h=be(new Zr({}),r,h)}if(this.attr=h,l?(this._startDate=l._startDate,this._cue=l._cue,this._endDate=l._endDate,this._dateAtEnd=l._dateAtEnd):this._startDate=new Date(h["START-DATE"]),"END-DATE"in this.attr){var c=(null==l?void 0:l.endDate)||new Date(this.attr["END-DATE"]);X(c.getTime())&&(this._endDate=c)}},[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"cue",get:function(){var l=this._cue;return void 0===l?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):l}},{key:"startTime",get:function(){var l=this.tagAnchor;return null===l||null===l.programDateTime?(Vt.warn('Expected tagAnchor Fragment with PDT set for DateRange "'+this.id+'": '+l),NaN):l.start+(this.startDate.getTime()-l.programDateTime)/1e3}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){var l=this._endDate||this._dateAtEnd;if(l)return l;var i=this.duration;return null!==i?this._dateAtEnd=new Date(this._startDate.getTime()+1e3*i):null}},{key:"duration",get:function(){if("DURATION"in this.attr){var l=this.attr.decimalFloatingPoint("DURATION");if(X(l))return l}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}},{key:"endOnNext",get:function(){return this.attr.bool("END-ON-NEXT")}},{key:"isInterstitial",get:function(){return"com.apple.hls.interstitial"===this.class}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&X(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}])}(),na=function(){function f(l){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.drift
11StartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=l}var h=f.prototype;return h.reloaded=function(i){if(!i)return this.advanced=!0,void(this.updated=!0);var e=this.lastPartSn-i.lastPartSn,r=this.lastPartIndex-i.lastPartIndex;this.updated=this.endSN!==i.endSN||!!r||!!e||!this.live,this.advanced=this.endSN>i.endSN||e>0||0===e&&r>0,this.misses=this.updated||this.advanced?Math.floor(.6*i.misses):i.misses+1},h.hasKey=function(i){return this.encryptedFragments.some(function(e){var r=e.decryptdata;return r||(e.setKeyFormat(i.keyFormat),r=e.decryptdata),!!r&&i.matches(r)})},ce(f,[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&X(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}}
11,{key:"drift",get:function(){var i=this.driftEndTime-this.driftStartTime;return i>0?1e3*(this.driftEnd-this.driftStart)/i:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var i;return null!=(i=this.partList)&&i.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){return this.fragments.length?this.fragments[this.fragments.length-1].end:0}},{key:"fragmentStart",get:function(){return this.fragments.length?this.fragments[0].start:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var i;return null!=(i=this.partList)&&i.length?this.partList[this.partList.length-1].index:-1}},{key:"maxPartIndex",get:function(){var i=this.partList;if(i){var e=this.lastPartIndex;if(-1!==e){for(var r=i.length;r--;)if(i[r].index>e)return i[r].index;return e}}return 0}},{key:"lastPartSn",get:function(){var i;return null!=(i=this.partList)&&i.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}},{key:"expired",get:function(){return!!(this.live&&this.age&&this.misses<3)&&this.age>Math.max(this.partEnd-this.fragmentStart,this.totalduration)+this.levelTargetDuration}}])}();function xn(f,h){return f.length===h.length&&!f.some(function(l,i){return l!==h[i]})}function Bf(f,h){return!f&&!h||!(!f||!h)&&xn(f,h)}function Na(f){return"AES-128"===f||"AES-256"===f||"AES-256-CTR"===f}function Yl(f){switch(f){case"AES-128":case"AES-256":return bn.cbc;case"AES-256-CTR":return bn.ctr;default:throw new Error("invalid full segment method "+f)}}function cs(f){return Uint8Array.from(atob(f),function(h){return h.charCodeAt(0)})}function hs(f){return Uint8Array.from(unescape(encodeURIComponent(f)),function(h){return h.charCodeAt(0)})}function vs(f){var h=function(i,e,r){var u=i[e];i[e]=i[r],i[r]=u};h(f,0,3),h(f,1,2),h(f,4,5),h(f,6,7)}function no(f){var h=f.split(":"),l=null;if("data"===h[0]&&2===h.length){var i=h[1].split(";"),e=i[i.length-1].split(",");if(2===e.length){var u=e[1];"base64"===e[0]?(i.splice(-1,1),l=cs(u)):l=function Uf(f){var h=hs(f).subarray(0,16),l=new Uint8Array(16);return l.set(h,16-h.length),l}(u)}}return l}var Ba=typeof self<"u"?self:void 0,or={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Ci={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function ao(f){switch(f){case Ci.FAIRPLAY:return or.FAIRPLAY;case Ci.PLAYREADY:return or.PLAYREADY;case Ci.WIDEVINE:return or.WIDEVINE;case Ci.CLEARKEY:return or.CLEARKEY}}function Qt(f){switch(f){case or.FAIRPLAY:return Ci.FAIRPLAY;case or.PLAYREADY:return Ci.PLAYREADY;case or.WIDEVINE:return Ci.WIDEVINE;case or.CLEARKEY:return Ci.CLEARKEY}}function ps(f){var h=f.drmSystems,l=f.widevineLicenseUrl,i=h?[or.FAIRPLAY,or.WIDEVINE,or.PLAYREADY,or.CLEARKEY].filter(function(e){return!!h[e]}):[];return!i[or.WIDEVINE]&&l&&i.push(or.WIDEVINE),i}var f,Vf=null!=Ba&&null!=(f=Ba.navigator)&&f.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;function Ur(f){var h=new Uint16Array(f.buffer,f.byteOffset,f.byteLength/2),l=String.fromCharCode.apply(null,Array.from(h)),i=l.substring(l.indexOf("<"),l.length),u=(new DOMParser).parseFromString(i,"text/xml").getElementsByTagName("KID")[0];if(u){var c=u.childNodes[0]?u.childNodes[0].nodeValue:u.getAttribute("VALUE");if(c){var v=cs(c).subarray(0,16);return vs(v),v}}return null}var Zi={},ga=function(){function f(l,i,e,r,u,c){void 0===r&&(r=[1]),void 0===u&&(u=null),this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=l,this.uri=i,this.keyFormat=e,this.keyFormatVersions=r,this.iv=u,this.encrypted=!!l&&"NONE"!==l,this.isCommonEncryption=this.encrypted&&!Na(l),null!=c&&c.startsWith("0x")&&(this.keyId=new Uint8Array(Fr(c)))}f.clearKeyUriToKeyIdMap=function(){Zi={}},f.setKeyIdForUri=function(i,e){Zi[i]=e},f.addKeyIdForUri=function(i){var e=Object.keys(Zi).length%Number.MAX_SAFE_INTEGER,r=new 
vendor: 10,893 bytes, line 11
11Uint8Array(16);return new DataView(r.buffer,12,4).setUint32(0,e),Zi[i]=r,r};var h=f.prototype;return h.matches=function(i){return i.uri===this.uri&&i.method===this.method&&i.encrypted===this.encrypted&&i.keyFormat===this.keyFormat&&xn(i.keyFormatVersions,this.keyFormatVersions)&&Bf(i.iv,this.iv)&&Bf(i.keyId,this.keyId)},h.isSupported=function(){if(this.method){if(Na(this.method)||"NONE"===this.method)return!0;if("identity"===this.keyFormat)return"SAMPLE-AES"===this.method;switch(this.keyFormat){case Ci.FAIRPLAY:case Ci.WIDEVINE:case Ci.PLAYREADY:case Ci.CLEARKEY:return-1!==["SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)}}return!1},h.getDecryptData=function(i,e){if(!this.encrypted||!this.uri)return null;if(Na(this.method)){var r=this.iv;return r||("number"!=typeof i&&(Vt.warn('missing IV for initialization segment with method="'+this.method+'" - compliance issue'),i=0),r=function Gf(f){for(var h=new Uint8Array(16),l=12;l<16;l++)h[l]=f>>8*(15-l)&255;return h}(i)),new f(this.method,this.uri,"identity",this.keyFormatVersions,r)}if(this.keyId){var c=Zi[this.uri];if(c&&!xn(this.keyId,c)&&f.setKeyIdForUri(this.uri,this.keyId),this.pssh)return this}var k,v=no(this.uri);if(v)switch(this.keyFormat){case Ci.WIDEVINE:if(this.pssh=v,!this.keyId){var p=function ve(f){var h=[];if(f instanceof ArrayBuffer)for(var l=f.byteLength,i=0;i+32<l;){var r=Me(new DataView(f,i));h.push(r),i+=r.size}return h}(v.buffer);if(p.length){var y,T=p[0];this.keyId=null!=(y=T.kids)&&y.length?T.kids[0]:null}}this.keyId||(this.keyId=si(e));break;case Ci.PLAYREADY:var E=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Q(E,0,v),this.keyId=Ur(v);break;default:var x=v.subarray(0,16);if(16!==x.length){var C=new Uint8Array(16);C.set(x,16-x.length),x=C}this.keyId=x}return this.keyId&&16===this.keyId.byteLength||((k=function so(f){var h=null==f?void 0:f[Ci.WIDEVINE];return h?h.keyId:null}(e))||(k=si(e))||(k=Zi[this.uri]),k&&(this.keyId=k,f.setKeyIdForUri(this.uri,k))),this},f}();function si(f){var h=null==f?void 0:f[Ci.PLAYREADY];if(h){var l=no(h.uri);if(l)return Ur(l)}return null}var Kf=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,zl=/#EXT-X-MEDIA:(.*)/g,Wh=/^#EXT(?:INF|-X-TARGETDURATION):/m,An=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),$l=new RegExp([/#EXT-X-(PROGRAM-DATE-TIME|BYTERANGE|DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),ms=function(){function f(){}return f.findGroup=function(l,i){for(var e=0;e<l.length;e++){var r=l[e];if(r.id===i)return r}},f.resolve=function(l,i){return ie.buildAbsoluteURL(i,l,{alwaysNormalize:!0})},f.isMediaPlaylist=function(l){return Wh.test(l)},f.parseMasterPlaylist=function(l,i){var c,r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:Ff(l)},u=[];if(Kf.lastIndex=0,!l.startsWith("#EXTM3U"))return r.playlistParsingError=new Error("no EXTM3U delimiter"),r;for(;null!=(c=Kf.exec(l));)if(c[1]){var v,p=new Zr(c[1],r),y=Ai(r,c[2]),T={attrs:p,bitrate:p.decimalInteger("BANDWIDTH")||p.decimalInteger("AVERAGE-BANDWIDTH"),name:p.NAME,url:f.resolve(y,i)},E=p.decimalResolution("RESOLUTION");E&&(T.width=E.width,T.height=E.height),ys(p.CODECS,T);var x=p["SUPPLEMENTAL-CODECS"];x&&(T.supplemental={},ys(x,T.supplemental)),null!=(v=T.unknownCodecs)&&v.length||u.push(T),r.levels.push(T)}else if(c[3]){var k=c[4];switch(c[3]){case"SESSION-DATA":var w=new Zr(k,r),M=w["DATA-ID"];M&&(null===r.sessionData&&(r.sessionData={}),r.sessionData[M]=w);break;case"SESSION-KEY":var H=Un(k,i,r);H.encrypted&&H.isSupported()?(null===r.sessionKeys&&(r.sessionKeys=[]),r.sessionKeys.push(H)):Vt.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+k+'"');break;case"DEFINE":Fa(r,new Zr(k,r),i);break;case"CONTENT-STEERING":var j=new Zr(k,r);r.contentSteering={uri:f.resolve(j["SERVER-URI"],i),pathwayId:j["PATHWAY-ID"]||"."};break;case"START":r.startTimeOffset=Ql(k)}}return r.levels=u.length>0&&u.length<r.levels.length?u:r.levels,0===r.levels.length&&(r.playlistParsingError=new Error("no levels found in manifest")),r},f.parseMasterPlaylistMedia=function(l,i,e){var r,u={},c=e.levels,v={AUDIO:c.map(function($){return{id:$.attrs.AUDIO,audioCodec:$.audioCodec}}),SUBTITLES:c.map(function($){return{id:$.attrs.SUBTITLES,textCodec:$.textCodec}}),"CLOSED-CAPTIONS":[]},p=0;for(zl.lastIndex=0;null!==(r=zl.exec(l));){var y=new Zr(r[1],e),T=y.TYPE;if(T){var E=v[T],x=u[T]||[];u[T]=x;var C=y.LANGUAGE,k=y["ASSOC-LANGUAGE"],w=y.CHANNELS,M=y.CHARACTERISTICS,H=y["INSTREAM-ID"],Y={attrs:y,bitrate:0,id:p++,groupId:y["GROUP-ID"]||"",name:y.NAME||C||"",type:T,default:y.bool("DEFAULT"),autoselect:y.bool("AUTOSELECT"),forced:y.bool("FORCED"),lang:C,url:y.URI?f.resolve(y.URI,i):""};if(k&&(Y.assocLang=k),w&&(Y.channels=w),M&&(Y.characteristics=M),H&&(Y.instreamId=H),null!=E&&E.length){var j=f.findGroup(E,Y.groupId)||E[0];Cu(Y,j,"audioCodec"),Cu(Y,j,"textCodec")}x.push(Y)}}return u},f.parseLevelPlaylist=function(l,i,e,r,u,c){var v,$,le,pe,oe,p={url:i},y=new na(i),T=y.fragments,E=[],x=null,C=0,k=0,w=0,M=0,H=0,Y=null,j=new Qi(r,p),Se=-1,we=!1,Te=null;if(An.lastIndex=0,y.m3u8=l,y.hasVariableRefs=Ff(l),"#EXTM3U"!==(null==(v=An.exec(l))?void 0:v[0]))return y.playlistParsingError=new Error("Missing format identifier #EXTM3U"),y;for(;null!==($=An.exec(l));){we&&(we=!1,(j=new Qi(r,p)).playlistOffset=w,j.setStart(w),j.sn=C,j.cc=M,H&&(j.bitrate=H),j.level=e,x&&(j.initSegment=x,x.rawProgramDateTime&&(j.rawProgramDateTime=x.rawProgramDateTime,x.rawProgramDateTime=null),Te&&(j.setByteRange(Te),Te=null)));var fe=$[1];if(fe){j.duration=parseFloat(fe);var Ce=(" "+$[2]).slice(1);j.title=Ce||null,j.tagList.push(Ce?["INF",fe,Ce]:["INF",fe])}else if($[3]){if(X(j.duration)){j.playlistOffset=w,j.setStart(w),pe&&Lu(j,pe,y),j.sn=C,j.level=e,j.cc=M,T.push(j);var ze=(" "+$[3]).slice(1);j.relurl=Ai(y,ze),ma(j,Y,E),Y=j,w+=j.duration,C++,k=0,we=!0}}else{if(!($=$[0].match($l))){Vt.warn("No matches on slow regex match for level playlist!");continue}for(le=1;le<$.length&&void 0===$[le];le++);var He=(" "+$[le]).slice(1),We=(" "+$[le+1]).slice(1),vt=$[le+2]?(" "+$[le+2]).slice(1):null;switch(He){case"BYTERANGE":Y?j.setByteRange(We,Y):j.setByteRange(We);break;case"PROGRAM-DATE-TIME":j.rawProgramDateTime=We,j.tagList.push(["PROGRAM-DATE-TIME",We]),-1===Se&&(Se=T.length);break;case"PLAYLIST-TYPE":y.type&&Vr(y,He,$),y.type=We.toUpperCase();break;case"MEDIA-SEQUENCE":0!==y.startSN?Vr(y,He,$):T.length>0&&uo(y,He,$),C=y.startSN=parseInt(We);break;case"SKIP":y.skippedSegments&&Vr(y,He,$);var At=new Zr(We,y),St=At.decimalInteger("SKIPPED-SEGMENTS");if(X(St)){y.skippedSegments+=St;for(var Pt=St;Pt--;)T.push(null);C+=St}var Ht=At.enumeratedString("RECENTLY-REMOVED-DATERANGES");Ht&&(y.recentlyRemovedDateranges=(y.recentlyRemovedDateranges||[]).concat(Ht.split("\t")));break;case"TARGETDURATION":0!==y.targetduration&&Vr(y,He,$),y.targetduration=Math.max(parseInt(We),1);break;case"VERSION":null!==y.version&&Vr(y,He,$),y.version=parseInt(We);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":y.live||Vr(y,He,$),y.live=!1;break;case"#":(We||vt)&&j.tagList.push(vt?[We,vt]:[We]);break;case"DISCONTINUITY":M++,j.tagList.push(["DIS"]);break;case"GAP":j.gap=!0,j.tagList.push([He]);break;case"BITRATE":j.tagList.push([He,We]),H=1e3*parseInt(We),X(H)?j.bitrate=H:H=0;break;case"DATERANGE":var Lt=new Zr(We,y),bt=new Au(Lt,y.dateRanges[Lt.ID],y.dateRangeTagCount);y.dateRangeTagCount++,bt.isValid||y.skippedSegments?y.dateRanges[bt.id]=bt:Vt.warn('Ignoring invalid DATERANGE tag: "'+We+'"'),j.tagList.push(["EXT-X-DATERANGE",We]);break;case"DEFINE":var kt=new Zr(We,y);"IMPORT"in kt?ql(y,kt,c):Fa(y,kt,i);break;case"DISCONTINUITY-SEQUENCE":0!==y.startCC?Vr(y,He,$):T.length>0&&uo(y,He,$),y.startCC=M=parseInt(We);break;case"KEY":var Gt=Un(We,i,y);if(Gt.isSupported()){if("NONE"===Gt.method){pe=void 0;break}pe||(pe={});var ar=pe[Gt.keyFormat];null!=ar&&ar.matches(Gt)||(ar&&(pe=be({},pe)),pe[Gt.keyFormat]=Gt)}else Vt.warn('[Keys] Ignoring unsupported EXT-X-KEY tag: "'+We+'"');break;case"START":y.startTimeOffset=Ql(We);break;case"MAP":var Zt=new Zr(We,y);if(j.duration){var Ar=new Qi(r,p);Iu(Ar,Zt,e,pe),j.initSegment=x=Ar,x.rawProgramDateTime&&!j.rawProgramDateTime&&(j.rawProgramDateTime=x.rawProgramDateTime)}else{var Cr=j.byteRangeEndOffset;if(Cr){var fr=j.byteRangeStartOffset;Te=Cr-fr+"@"+fr}else Te=null;Iu(j,Zt,e,pe),x=j,we=!0}x.cc=M;break;case"SERVER-CONTROL":oe&&Vr(y,He,$),oe=new Zr(We),y.canBlockReload=oe.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=oe.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&oe.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=oe.optionalFloat("PART-HOLD-BACK",0),y.holdBack=oe.optionalFloat("HOLD-BACK",0);break;case"PART-INF":y.partTarget&&Vr(y,He,$);var di=new Zr(We);y.partTarget=di.decimalFloatingPoint("PART-TARGET");break;case"PART":var Er=y.partList;Er||(Er=y.partList=[]);var nr=k>0?Er[Er.length-1]:void 0,ti=k++,Li=new Zr(We,y),fi=new zn(Li,j,p,ti,nr);Er.push(fi),j.duration+=fi.duration;break;case"PRELOAD-HINT":var Bi=new Zr(We,y);y.preloadHint=Bi;break;case"RENDITION-REPORT":var qr=new Zr(We,y);y.renditionReports=y.renditionReports||[],y.renditionReports.push(qr);break;default:Vt.warn("line parsed but not handled: "+$)}}}Y&&!Y.relurl?(T.pop(),w-=Y.duration,y.partList&&(y.fragmentHint=Y)):y.partList&&(ma(j,Y,E),j.cc=M,y.fragmentHint=j,pe&&Lu(j,pe,y)),y.targetduration||(y.playlistParsingError=new Error("Missing Target Duration"));var Yi=T.length,zi=T[0],ci=T[Yi-1];if((w+=y.skippedSegments*y.targetduration)>0&&Yi&&ci){y.averagetargetduration=w/Yi;var Ti=ci.sn;y.endSN="initSegment"!==Ti?Ti:0,y.live||(ci.endList=!0),Se>0&&(function jf(f,h){for(var l=f[h],i=h;i--;){var e=f[i];if(!e)return;e.programDateTime=l.programDateTime-1e3*e.duration,l=e}}(T,Se),zi&&E.unshift(zi))}return y.fragmentHint&&(w+=y.fragmentHint.duration),y.totalduration=w,E.length&&y.dateRangeTagCount&&zi&&Xl(E,y),y.endCC=M,y},f}();function Xl(f,h){var l=f.length;if(!l){if(!h.hasProgramDateTime)return;f.push(h.fragments[h.fragments.length-1]),l++}for(var e=f[l-1],r=h.live?1/0:h.totalduration,u=Object.keys(h.dateRanges),c=u.length;c--;){var v=h.dateRanges[u[c]],p=v.startDate.getTime();v.tagAnchor=e.ref;for(var y=l;y--;){var T;if((null==(T=f[y])?void 0:T.sn)<h.startSN)break;var E=oo(h,p,f,y,r);if(-1!==E){v.tagAnchor=h.fragments[E].ref;break}}}}function oo(f,h,l,i,e){var r=l[i];if(r){var c,u=r.programDateTime;
11if((h>=u||0===i)&&h<=u+1e3*(((null==(c=l[i+1])?void 0:c.start)||e)-r.start)){var p=l[i].sn-f.startSN;if(p<0)return-1;var y=f.fragments;if(y.length>l.length)for(var x=(l[i+1]||y[y.length-1]).sn-f.startSN;x>p;x--){var C=y[x].programDateTime;if(h>=C&&h<C+1e3*y[x].duration)return x}return p}}return-1}function Un(f,h,l){var i,e,r=new Zr(f,l),u=null!=(i=r.METHOD)?i:"",c=r.URI,v=r.hexadecimalInteger("IV"),p=r.KEYFORMATVERSIONS,y=null!=(e=r.KEYFORMAT)?e:"identity";c&&r.IV&&!v&&Vt.error("Invalid IV: "+r.IV);var T=c?ms.resolve(c,h):"",E=(p||"1").split("/").map(Number).filter(Number.isFinite);return new ga(u,T,y,E,v,r.KEYID)}function Ql(f){var l=new Zr(f).decimalFloatingPoint("TIME-OFFSET");return X(l)?l:null}function ys(f,h){var l=(f||"").split(/[ ,]+/).filter(function(i){return i});["video","audio","text"].forEach(function(i){var e=l.filter(function(r){return dr(r,i)});e.length&&(h[i+"Codec"]=e.map(function(r){return r.split("/")[0]}).join(","),l=l.filter(function(r){return-1===e.indexOf(r)}))}),h.unknownCodecs=l}function Cu(f,h,l){var i=h[l];i&&(f[l]=i)}function ma(f,h,l){f.rawProgramDateTime?l.push(f):null!=h&&h.programDateTime&&(f.programDateTime=h.endProgramDateTime)}function Iu(f,h,l,i){f.relurl=h.URI,h.BYTERANGE&&f.setByteRange(h.BYTERANGE),f.level=l,f.sn="initSegment",i&&(f.levelkeys=i),f.initSegment=null}function Lu(f,h,l){f.levelkeys=h;var i=l.encryptedFragments;(!i.length||i[i.length-1].levelkeys!==h)&&Object.keys(h).some(function(e){return h[e].isCommonEncryption})&&i.push(f)}function Vr(f,h,l){f.playlistParsingError=new Error("#EXT-X-"+h+" must not appear more than once ("+l[0]+")")}function uo(f,h,l){f.playlistParsingError=new Error("#EXT-X-"+h+" must appear before the first Media Segment ("+l[0]+")")}function Zl(f,h){var l=h.startPTS;if(X(l)){var e,i=0;h.sn>f.sn?(i=l-f.start,e=f):(i=f.start-l,e=h),e.duration!==i&&e.setDuration(i)}else h.setStart(h.sn>f.sn?f.cc===h.cc&&f.minEndPTS?f.start+(f.minEndPTS-f.start):f.start+f.duration:Math.max(f.start-h.duration,0))}function Jl(f,h,l,i,e,r,u){i-l<=0&&(u.warn("Fragment should have a positive duration",h),i=l+h.duration,r=e+h.duration);var v=l,p=i,y=h.startPTS,T=h.endPTS;if(X(y)){var E=Math.abs(y-l);f&&E>f.totalduration?u.warn("media timestamps and playlist times differ by "+E+"s for level "+h.level+" "+f.url):h.deltaPTS=X(h.deltaPTS)?Math.max(E,h.deltaPTS):E,v=Math.max(l,y),l=Math.min(l,y),e=void 0!==h.startDTS?Math.min(e,h.startDTS):e,p=Math.min(i,T),i=Math.max(i,T),r=void 0!==h.endDTS?Math.max(r,h.endDTS):r}var x=l-h.start;0!==h.start&&h.setStart(l),h.setDuration(i-h.start),h.startPTS=l,h.maxStartPTS=v,h.startDTS=e,h.endPTS=i,h.minEndPTS=p,h.endDTS=r;var C=h.sn;if(!f||C<f.startSN||C>f.endSN)return 0;var k,w=C-f.startSN,M=f.fragments;for(M[w]=h,k=w;k>0;k--)Zl(M[k],M[k-1]);for(k=w;k<M.length-1;k++)Zl(M[k],M[k+1]);return f.fragmentHint&&Zl(M[M.length-1],f.fragmentHint),f.PTSKnown=f.alignedSliding=!0,x}function qf(f,h,l){if(f!==h){for(var i=null,e=f.fragments,r=e.length-1;r>=0;r--){var u=e[r].initSegment;if(u){i=u;break}}var c;f.fragmentHint&&delete f.fragmentHint.endPTS,function _s(f,h,l){for(var i=h.skippedSegments,e=Math.max(f.startSN,h.startSN)-h.startSN,r=(f.fragmentHint?1:0)+(i?h.endSN:Math.min(f.endSN,h.endSN))-h.startSN,u=h.startSN-f.startSN,c=h.fragmentHint?h.fragments.concat(h.fragmentHint):h.fragments,v=f.fragmentHint?f.fragments.concat(f.fragmentHint):f.fragments,p=e;p<=r;p++){var y=v[u+p],T=c[p];if(i&&!T&&y&&(T=h.fragments[p]=y),y&&T){l(y,T,p,c);var E=y.relurl;if(E&&Wf(E,T.relurl))return void(h.playlistParsingError=ed("media sequence mismatch "+T.sn+":",f,h,0,T));if(y.cc!==T.cc)return void(h.playlistParsingError=ed("discontinuity sequence mismatch ("+y.cc+"!="+T.cc+")",f,h,0,T))}}}(f,h,function(M,H,Y,j){if((!h.startCC||h.skippedSegments)&&H.cc!==M.cc){for(var $=M.cc-H.cc,le=Y;le<j.length;le++)j[le].cc+=$;h.endCC=j[j.length-1].cc}X(M.startPTS)&&X(M.endPTS)&&(H.setStart(H.startPTS=M.startPTS),H.startDTS=M.startDTS,H.maxStartPTS=M.maxStartPTS,H.endPTS=M.endPTS,H.endDTS=M.endDTS,H.minEndPTS=M.minEndPTS,H.setDuration(M.endPTS-M.startPTS),H.duration&&(c=H),h.PTSKnown=h.alignedSliding=!0),M.hasStream
11s&&(H.elementaryStreams=M.elementaryStreams),H.loader=M.loader,M.hasStats&&(H.stats=M.stats),M.initSegment&&(H.initSegment=M.initSegment,i=M.initSegment)});var v=h.fragments,p=h.fragmentHint?v.concat(h.fragmentHint):v;if(i&&p.forEach(function(M){var H;M&&(!M.initSegment||M.initSegment.relurl===(null==(H=i)?void 0:H.relurl))&&(M.initSegment=i)}),h.skippedSegments){if(h.deltaUpdateFailed=v.some(function(M){return!M}),h.deltaUpdateFailed){l.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var y=h.skippedSegments;y--;)v.shift();h.startSN=v[0].sn}else{h.canSkipDateRanges&&(h.dateRanges=function Yh(f,h,l){var i=h.dateRanges,e=h.recentlyRemovedDateranges,r=be({},f);e&&e.forEach(function(v){delete r[v]});var c=Object.keys(r).length;return c?(Object.keys(i).forEach(function(v){var p=r[v],y=new Au(i[v].attr,p);y.isValid?(r[v]=y,p||(y.tagOrder+=c)):l.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'+cr(i[v].attr)+'"')}),r):i}(f.dateRanges,h,l));var T=f.fragments.filter(function(M){return M.rawProgramDateTime});if(f.hasProgramDateTime&&!h.hasProgramDateTime)for(var E=1;E<p.length;E++)null===p[E].programDateTime&&ma(p[E],p[E-1],T);Xl(T,h)}h.endCC=v[v.length-1].cc}if(!h.startCC){var x,C=Du(f,h.startSN-1);h.startCC=null!=(x=null==C?void 0:C.cc)?x:v[0].cc}(function Ts(f,h,l){if(f&&h)for(var i=0,e=0,r=f.length;e<=r;e++){var u=f[e],c=h[e+i];u&&c&&u.index===c.index&&u.fragment.sn===c.fragment.sn?l(u,c):i--}})(f.partList,h.partList,function(M,H){H.elementaryStreams=M.elementaryStreams,H.stats=M.stats}),c?Jl(h,c,c.startPTS,c.endPTS,c.startDTS,c.endDTS,l):td(f,h),v.length&&(h.totalduration=h.edge-v[0].start),h.driftStartTime=f.driftStartTime,h.driftStart=f.driftStart;var k=h.advancedDateTime;if(h.advanced&&k){var w=h.edge;
vendor: 4,666 bytes, line 11
11h.driftStart||(h.driftStartTime=k,h.driftStart=w),h.driftEndTime=k,h.driftEnd=w}else h.driftEndTime=f.driftEndTime,h.driftEnd=f.driftEnd,h.advancedDateTime=f.advancedDateTime;-1===h.requestScheduled&&(h.requestScheduled=f.requestScheduled)}}function ed(f,h,l,i,e){return new Error(f+" "+e.url+"\nPlaylist starting @"+h.startSN+"\n"+h.m3u8+"\n\nPlaylist starting @"+l.startSN+"\n"+l.m3u8)}function td(f,h,l){void 0===l&&(l=!0);var i=h.startSN+h.skippedSegments-f.startSN,e=f.fragments,r=i>=0,u=0;if(r&&i<e.length)u=e[i].start;else if(r&&h.startSN===f.endSN+1)u=f.fragmentEnd;else if(r&&l)u=f.fragmentStart+i*h.levelTargetDuration;else{if(h.skippedSegments||0!==h.fragmentStart)return;u=f.fragmentStart}ur(h,u)}function ur(f,h){if(h){for(var l=f.fragments,i=f.skippedSegments;i<l.length;i++)l[i].addStart(h);f.fragmentHint&&f.fragmentHint.addStart(h)}}function ya(f,h){void 0===h&&(h=1/0);var l=1e3*f.targetduration;if(f.updated){var i=f.fragments;if(i.length&&4*l>h){var r=1e3*i[i.length-1].duration;r<l&&(l=r)}}else l/=2;return Math.round(l)}function Du(f,h,l){if(!f)return null;var i=f.fragments[h-f.startSN];return i||(i=f.fragmentHint)&&i.sn===h?i:h<f.startSN&&l&&l.sn===h?l:null}function Ta(f,h,l){return f?Vn(f.partList,h,l):null}function Vn(f,h,l){if(f)for(var i=f.length;i--;){var e=f[i];if(e.index===l&&e.fragment.sn===h)return e}return null}function Es(f){f.forEach(function(h,l){var i;null==(i=h.details)||i.fragments.forEach(function(e){e.level=l,e.initSegment&&(e.initSegment.level=l)})})}function Wf(f,h){return!(f===h||!h)&&rd(f)!==rd(h)}function rd(f){return f.replace(/\?[^?]*$/,"")}function sn(f,h){for(var l=0,i=f.length;l<i;l++){var e;if((null==(e=f[l])?void 0:e.cc)===h)return f[l]}return null}function Ua(f,h){var l=f.start+h;f.startPTS=l,f.setStart(l),f.endPTS=l+f.duration}function lo(f,h){for(var l=h.fragments,i=0,e=l.length;i<e;i++)Ua(l[i],f);h.fragmentHint&&Ua(h.fragmentHint,f),h.alignedSliding=!0}function id(f,h){if(function Yf(f,h){return!!(f&&h.startCC<f.endCC&&h.endCC>f.startCC)}(h,f)){var l=Math.min(h.endCC,f.endCC),i=sn(h.fragments,l),e=sn(f.fragments,l);i&&e&&(Vt.log("Aligning playlist at start of dicontinuity sequence "+l),lo(i.start-e.start,f))}}function aa(f,h){if(f.hasProgramDateTime&&h.hasProgramDateTime){var l=f.fragments,i=h.fragments;if(l.length&&i.length){var e,r,u=Math.min(h.endCC,f.endCC);h.startCC<u&&f.startCC<u&&(e=sn(i,u),r=sn(l,u)),(!e||!r)&&(r=sn(l,(e=i[Math.floor(i.length/2)]).cc)||l[Math.floor(l.length/2)]);var c=e.programDateTime,v=r.programDateTime;c&&v&&lo((v-c)/1e3-(r.start-e.start),f)}}}function oi(f,h,l){Ii(f,h,l),f.addEventListener(h,l)}function Ii(f,h,l){f.removeEventListener(h,l)}var $f_toString=function(h){for(var l="",i=h.length,e=0;e<i;e++)l+="["+h.start(e).toFixed(3)+"-"+h.end(e).toFixed(3)+"]";return l},Ke={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},Pu=function(f){function h(i,e,r,u,c){var v;return(v=f.call(this,u,i.logger)||this).hls=void 0,v.fragPrevious=null,v.fragCurrent=null,v.fragmentTracker=void 0,v.transmuxer=null,v._state=Ke.STOPPED,v.playlistType=void 0,v.media=null,v.mediaBuffer=null,v.config=void 0,v.bitrateTest=!1,v.lastCurrentTime=0,v.nextLoadPosition=0,v.startPosition=0,v.startTimeOffset=null,v.retryDate=0,v.levels=null,v.fragmentLoader=void 0,v.keyLoader=void 0,v.levelLastLoaded=null,v.startFragRequested=!1,v.decrypter=void 0,v.initPTS=[],v.buffering=!0,v.loadingParts=!1,v.loopSn=void 0,v.onMediaSeeking=function(){var y=v.config,T=v.fragCurrent,E=v.media,C=v.state,k=E?E.currentTime:0,w=tr.bufferInfo(v.mediaBuffer||E,k,y.maxBufferHole),M=!w.len;if(v.log("Media seeking to "+(X(k)?k.toFixed(3):k)+", state: "+C+", "+(M?"out of":"in")+" buffer"),v.state===Ke.ENDED)v.resetLoadingState();else if(T){var H=y.maxFragLookUpTolerance,Y=T.start-H,j=T.start+T.duration+H;if(M||j<w.start||Y>w.end){var $=k>j;(k<Y||$)&&($&&T.loader&&(v.log("Cancelling fragment load for seek (sn: "+T.sn+")"),T.abortRequests(),v.resetLoadingState()),v.fragPrevious=null)}}if(E&&(v.fragmentTracker.removeFragmentsInRange(k,1/0,v.playlistType,!0),k>v.lastCurrentTime&&(v.lastCurrentTime=k),!v.loadingParts)){var pe=Math.max(w.end,k),Se=v.shouldLoadParts(v.getLevelDetails(),pe);Se&&(v.log("LL-Part loading ON after seeking to "+k.toFixed(2)+" with buffer @"+pe.toFixed(2)),v.loadingParts=Se)}v.hls.hasEnoughToStart||(v.log("Setting "+(M?"startPosition":"nextLoadPosition")+" to "+k+" for seek without enough to start"),v.nextLo
vendor: 27,470 bytes, line 11
11adPosition=k,M&&(v.startPosition=k)),M&&v.state===Ke.IDLE&&v.tickImmediate()},v.onMediaEnded=function(){v.log("setting startPosition to 0 because media ended"),v.startPosition=v.lastCurrentTime=0},v.playlistType=c,v.hls=i,v.fragmentLoader=new Br(i.config),v.keyLoader=r,v.fragmentTracker=e,v.config=i.config,v.decrypter=new Kl(i.config),v}xe(h,f);var l=h.prototype;return l.registerListeners=function(){var e=this.hls;e.on(O.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(O.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(O.MANIFEST_LOADING,this.onManifestLoading,this),e.on(O.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(O.ERROR,this.onError,this)},l.unregisterListeners=function(){var e=this.hls;e.off(O.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(O.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(O.MANIFEST_LOADING,this.onManifestLoading,this),e.off(O.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(O.ERROR,this.onError,this)},l.doTick=function(){this.onTickEnd()},l.onTickEnd=function(){},l.startLoad=function(e){},l.stopLoad=function(){if(this.state!==Ke.STOPPED){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);var e=this.fragCurrent;null!=e&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Ke.STOPPED}},l.pauseBuffering=function(){this.buffering=!1},l.resumeBuffering=function(){this.buffering=!0},l._streamEnded=function(e,r){if(r.live||!this.media)return!1;var c=this.config.timelineOffset||0;if((e.end||0)<=c)return!1;var v=e.buffered;this.config.maxBufferHole&&v&&v.length>1&&(e=tr.bufferedInfo(v,e.start,0));var p=e.nextStart;if(p&&p>c&&p<r.edge||this.media.currentTime<e.start)return!1;var T=r.partList;if(null!=T&&T.length){var E=T[T.length-1];return tr.isBuffered(this.media,E.start+E.duration/2)}return this.fragmentTracker.isEndListAppended(r.fragments[r.fragments.length-1].type)},l.getLevelDetails=function(){if(this.levels&&null!==this.levelLastLoaded)return this.levelLastLoaded.details},l.onMediaAttached=function(e,r){var u=this.media=this.mediaBuffer=r.media;oi(u,"seeking",this.onMediaSeeking),oi(u,"ended",this.onMediaEnded);var c=this.config;this.levels&&c.autoStartLoad&&this.state===Ke.STOPPED&&this.startLoad(c.startPosition)},l.onMediaDetaching=function(e,r){var u=!!r.transferMedia,c=this.media;if(null!==c){if(c.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),Ii(c,"seeking",this.onMediaSeeking),Ii(c,"ended",this.onMediaEnded),this.keyLoader&&!u&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,u)return this.resetLoadingState(),void this.resetTransmuxer();this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}},l.onManifestLoading=function(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1},l.onError=function(e,r){},l.onManifestLoaded=function(e,r){this.startTimeOffset=r.startTimeOffset},l.onHandlerDestroying=function(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),f.prototype.onHandlerDestroying.call(this),this.hls=this.onMediaSeeking=this.onMediaEnded=null},l.onHandlerDestroyed=function(){this.state=Ke.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,f.prototype.onHandlerDestroyed.call(this)},l.loadFragment=function(e,r,u){this.startFragRequested=!0,this._loadFragForPlayback(e,r,u)},l._loadFragForPlayback=function(e,r,u){var c=this;this._doFragLoad(e,r,u,function(y){var T=y.frag;if(c.fragContextChanged(T))return c.warn(T.type+" sn: "+T.sn+(y.part?" part: "+y.part.index:"")+" of "+c.fragInfo(T,!1,y.part)+") was dropped during download."),void c.fragmentTracker.removeFragment(T);T.stats.chunkCount++,c._handleFragmentLoadProgress(y)}).then(function(p){if(p){var y=c.state,T=p.frag;if(c.fragContextChanged(T))return void((y===Ke.FRAG_LOADING||!c.fragCurrent&&y===Ke.PARSING)&&(c.fragmentTracker.removeFragment(T),c.state=Ke.IDLE));"payload"in p&&(c.log("Loaded "+T.type+" sn: "+T.sn+" of "+c.playlistLabel()+" "+T.level),c.hls.trigger(O.FRAG_LOADED,p)),c._handleFragmentLoadComplete(p)}}).catch(function(p){c.state===Ke.STOPPED||c.state===Ke.ERROR||(c.warn("Frag error: "+((null==p?void 0:p.message)||p)),c.resetFragmentLoading(e))})},l.clearTrackerIfNeeded=function(e){var r,u=this.fragmentTracker;if(u.getState(e)===It_APPENDING){var p=this.getFwdBufferInfo(this.mediaBuffer,e.type),y=Math.max(e.duration,p?p.len:this.config.maxBufferLength),T=this.backtrackFragment;(1==(T?e.sn-T.sn:0)||this.reduceMaxBufferLength(y,e.duration))&&u.removeFragment(e)}else 0===(null==(r=this.mediaBuffer)?void 0:r.buffered.length)?u.removeAllFragments():u.hasParts(e.type)&&(u.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),u.getState(e)===It_PARTIAL&&u.removeFragment(e))},l.checkLiveUpdate=function(e){if(e.updated&&!e.live){var r=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:r,part:null,stats:r.stats,id:r.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)},l.waitForLive=function(e){var r=e.details;return(null==r?void 0:r.live)&&"EVENT"!==r.type&&(this.levelLastLoaded!==e||r.expired)},l.flushMainBuffer=function(e,r,u){void 0===u&&(u=null),e-r&&this.hls.trigger(O.BUFFER_FLUSHING,{startOffset:e,endOffset:r,type:u})},l._loadInitSegment=function(e,r){var u=this;this._doFragLoad(e,r).then(function(c){var v=null==c?void 0:c.frag;if(!v||u.fragContextChanged(v)||!u.levels)throw new Error("init load aborted");return c}).then(function(c){var v=u.hls,p=c.frag,y=c.payload,T=p.decryptdata;if(y&&y.byteLength>0&&null!=T&&T.key&&T.iv&&Na(T.method)){var E=self.performance.now();return u.decrypter.decrypt(new Uint8Array(y),T.key.buffer,T.iv.buffer,Yl(T.method)).catch(function(x){throw v.trigger(O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.FRAG_DECRYPT_ERROR,fatal:!1,error:x,reason:x.message,frag:p}),x}).then(function(x){var C=self.performance.now();return v.trigger(O.FRAG_DECRYPTED,{frag:p,payload:x,stats:{tstart:E,tdecrypt:C}}),c.payload=x,u.completeInitSegmentLoad(c)})}return u.completeInitSegmentLoad(c)}).catch(function(c){u.state===Ke.STOPPED||u.state===Ke.ERROR||(u.warn(c),u.resetFragmentLoading(e))})},l.completeInitSegmentLoad=function(e){if(!this.levels)throw new Error("init load aborted, missing levels");var u=e.frag.stats;this.state!==Ke.STOPPED&&(this.state=Ke.IDLE),e.frag.data=new Uint8Array(e.payload),u.parsing.start=u.buffering.start=self.performance.now(),u.parsing.end=u.buffering.end=self.performance.now(),this.tick()},l.unhandledEncryptionError=function(e,r){var u,c,v=e.tracks;if(v&&!r.encrypted&&(null!=(u=v.audio)&&u.encrypted||null!=(c=v.video)&&c.encrypted)&&(!this.config.emeEnabled||!this.keyLoader.emeController)){var p=this.media,y=new Error("Encrypted track with no key in "+this.fragInfo(r)+" (media "+(p?"attached mediaKeys: "+p.mediaKeys:"detached")+")");return this.warn(y.message),!(!p||p.mediaKeys||(this.hls.trigger(O.ERROR,{type:Ae.KEY_SYSTEM_ERROR,details:ue.KEY_SYSTEM_NO_KEYS,fatal:!1,error:y,frag:r}),this.resetTransmuxer(),0))}return!1},l.fragContextChanged=function(e){var r=this.fragCurrent;return!e||!r||e.sn!==r.sn||e.level!==r.level},l.fragBufferedComplete=function(e,r){var u=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log("Buffered "+e.type+" sn: "+e.sn+(r?" part: "+r.index:"")+" of "+this.fragInfo(e,!1,r)+" > buffer:"+(u?$f_toString(tr.getBuffered(u)):"(detached)")+")"),gr(e)){var c;if(e.type!==Ie.SUBTITLE){var v=e.elementaryStreams;if(!Object.keys(v).some(function(y){return!!v[y]}))return void(this.state=Ke.IDLE)}var p=null==(c=this.levels)?void 0:c[e.level];null!=p&&p.fragmentError&&(this.log("Resetting level fragment error count of "+p.fragmentError+" on frag buffered"),p.fragmentError=0)}this.state=Ke.IDLE},l._handleFragmentLoadComplete=function(e){var r=this.transmuxer;if(r){var u=e.frag,c=e.part,v=e.partsLoaded,p=!v||0===v.length||v.some(function(T){return!T}),y=new jl(u.level,u.sn,u.stats.chunkCount+1,0,c?c.index:-1,!p);r.flush(y)}},l._handleFragmentLoadProgress=function(e){},l._doFragLoad=function(e,r,u,c){var v,p=this;void 0===u&&(u=null),this.fragCurrent=e;var y=r.details;if(!this.levels||!y)throw new Error("frag load aborted, missing level"+(y?"":" detail")+"s");var T=null;if(!e.encrypted||null!=(v=e.decryptdata)&&v.key)e.encrypted||(T=this.keyLoader.loadClear(e,y.encryptedFragments,this.startFragRequested))&&this.log("[eme] blocking frag load until media-keys acquired");else if(this.log("Loading key for "+e.sn+" of ["+y.startSN+"-"+y.endSN+"], "+this.playlistLabel()+" "+e.level),this.state=Ke.KEY_LOADING,this.fragCurrent=e,T=this.keyLoader.load(e).then(function($){if(!p.fragContextChanged($.frag))return p.hls.trigger(O.KEY_LOADED,$),p.state===Ke.KEY_LOADING&&(p.state=Ke.IDLE),$}),this.hls.trigger(O.KEY_LOADING,{frag:e}),null===this.fragCurrent)return this.log("context changed in KEY_LOADING"),Promise.resolve(null);var H,E=this.fragPrevious;if(gr(e)&&(!E||e.sn!==E.sn)){var x=this.shouldLoadParts(r.details,e.end);x!==this.loadingParts&&(this.log("LL-Part loading "+(x?"ON":"OFF")+" loading sn "+(null==E?void 0:E.sn)+"->"+e.sn),this.loadingParts=x)}if(u=Math.max(e.start,u||0),this.loadingParts&&gr(e)){var C=y.partList;if(C&&c){u>y.fragmentEnd&&y.fragmentHint&&(e=y.fragmentHint);var k=this.getNextPart(C,e,u);if(k>-1){var M,w=C[k];return e=this.fragCurrent=w.fragment,this.log("Loading "+e.type+" sn: "+e.sn+" part: "+w.index+" ("+k+"/"+(C.length-1)+") of "+this.fragInfo(e,!1,w)+") cc: "+e.cc+" ["+y.startSN+"-"+y.endSN+"], target: "+parseFloat(u.toFixed(3))),this.nextLoadPosition=w.start+w.duration,this.state=Ke.FRAG_LOADING,M=T?T.then(function($){return!$||p.fragContextChanged($.frag)?null:p.doFragPartsLoad(e,w,r,c)}).catch(function($){return p.handleFragLoadError($)}):this.doFragPartsLoad(e,w,r,c).catch(function($){return p.handleFragLoadError($)}),this.hls.trigger(O.FRAG_LOADING,{frag:e,part:w,targetBufferTime:u}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):M}if(!e.url||this.loadedEndOfParts(C,u))return Promise.resolve(null)}}if(gr(e)&&this.loadingParts)this.log("LL-Part loading OFF after next part miss @"+u.toFixed(2)+" Check buffer at sn: "+e.sn+" loaded parts: "+(null==(H=y.partList)?void 0:H.filter(function($){return $.loaded}).map(function($){return"["+$.start+"-"+$.end+"]"}))),this.loadingParts=!1;else if(!e.url)return Promise.resolve(null);this.log("Loading "+e.type+" sn: "+e.sn+" of "+this.fragInfo(e,!1)+") cc: "+e.cc+" ["+y.startSN+"-"+y.endSN+"], target: "+parseFloat(u.toFixed(3))),X(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Ke.FRAG_LOADING;var j,Y=this.config.progressive&&e.type!==Ie.SUBTITLE;return j=Y&&T?T.then(function($){return!$||p.fragContextChanged($.frag)?null:p.fragmentLoader.load(e,c)}).catch(function($){return p.handleFragLoadError($)}):Promise.all([this.fragmentLoader.load(e,Y?c:void 0),T]).then(function($){var le=$[0];return!Y&&c&&c(le),le}).catch(function($){return p.handleFragLoadError($)}),this.hls.trigger(O.FRAG_LOADING,{frag:e,targetBufferTime:u}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):j},l.doFragPartsLoad=function(e,r,u,c){var v=this;return new Promise(function(p,y){var T,E=[],x=null==(T=u.details)?void 0:T.partList,C=function(w){v.fragmentLoader.loadPart(e,w,c).then(function(M){E[w.index]=M;var H=M.part;v.hls.trigger(O.FRAG_LOADED,M);var Y=Ta(u.details,e.sn,w.index+1)||Vn(x,e.sn,w.index+1);if(!Y)return p({frag:e,part:H,partsLoaded:E});C(Y)}).catch(y)};C(r)})},l.handleFragLoadError=function(e){if("data"in e){var r=e.data;r.frag&&r.details===ue.INTERNAL_ABORTED?this.handleFragLoadAborted(r.frag,r.part):r.frag&&r.type===Ae.KEY_SYSTEM_ERROR?(r.frag.abortRequests(),this.resetStartWhenNotLoaded(),this.resetFragmentLoading(r.frag)):this.hls.trigger(O.ERROR,r)}else this.hls.trigger(O.ERROR,{type:Ae.OTHER_ERROR,details:ue.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null},l._handleTransmuxerFlush=function(e){var r=this.getCurrentContext(e);if(r&&this.state===Ke.PARSING){var u=r.frag,c=r.part,v=r.level,p=self.performance.now();u.stats.parsing.end=p,c&&(c.stats.parsing.end=p);var y=this.getLevelDetails(),E=y&&u.sn>y.endSN||this.shouldLoadParts(y,u.end);E!==this.loadingParts&&(this.log("LL-Part loading "+(E?"ON":"OFF")+" after parsing segment ending @"+u.end.toFixed(2)),this.loadingParts=E),this.updateLevelTiming(u,c,v,e.partial)}else!this.fragCurrent&&this.state!==Ke.STOPPED&&this.state!==Ke.ERROR&&(this.state=Ke.IDLE)},l.shouldLoadParts=function(e,r){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e.partList){var u,p,c=e.partList[0];if(c.fragment.type===Ie.SUBTITLE)return!1;if(r>=c.end+((null==(u=e.fragmentHint)?void 0:u.duration)||0)&&(this.hls.hasEnoughToStart?(null==(p=this.media)?void 0:p.currentTime)||this.lastCurrentTime:this.getLoadPosition())>c.start-c.fragment.duration)return!0}}return!1},l.getCurrentContext=function(e){var r=this.levels,u=this.fragCurrent,c=e.level,v=e.sn,p=e.part;if(null==r||!r[c])return this.warn("Levels object was unset while buffering fragment "+v+" of "+this.playlistLabel()+" "+c+". The current chunk will not be buffered."),null;var y=r[c],T=y.details,E=p>-1?Ta(T,v,p):null,x=E?E.fragment:Du(T,v,u);return x?(u&&u!==x&&(x.stats=u.stats),{frag:x,part:E,level:y}):null},l.bufferFragmentData=function(e,r,u,c,v){if(this.state===Ke.PARSING){var p=e.data1,y=e.data2,T=p;if(y&&(T=ai(p,y)),T.length){var E=this.initPTS[r.cc];if(this.hls.trigger(O.BUFFER_APPENDING,{type:e.type,frag:r,part:u,chunkMeta:c,offset:E?-E.baseTime/E.timescale:void 0,parent:r.type,data:T}),e.dropped&&e.independent&&!u){if(v)return;this.flushBufferGap(r)}}}},l.flushBufferGap=function(e){var r=this.media;if(r){if(!tr.isBuffered(r,r.currentTime))return void this.flushMainBuffer(0,e.start);var u=r.currentTime,c=tr.bufferInfo(r,u,0),p=Math.min(2*this.config.maxFragLookUpTolerance,.25*e.duration),y=Math.max(Math.min(e.start-p,c.end-p),u+p);e.start-y>p&&this.flushMainBuffer(y,e.start)}},l.getFwdBufferInfo=function(e,r){var u,c=this.getLoadPosition();if(!X(c))return null;var p=this.lastCurrentTime>c||null!=(u=this.media)&&u.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,c,r,p)},l.getFwdBufferInfoAtPos=function(e,r,u,c){var v=tr.bufferInfo(e,r,c);if(0===v.len&&void 0!==v.nextStart){var p=this.fragmentTracker.getBufferedFrag(r,u);if(p&&(v.nextStart<=p.end||p.gap)){var y=Math.max(Math.min(v.nextStart,p.end)-r,c);return tr.bufferInfo(e,r,y)}}return v},l.getMaxBufferLength=function(e){var u,r=this.config;return u=e?Math.max(8*r.maxBufferSize/e,r.maxBufferLength):r.maxBufferLength,Math.min(u,r.maxMaxBufferLength)},l.reduceMaxBufferLength=function(e,r){var u=this.config,c=Math.max(Math.min(e-r,u.maxBufferLength),r),v=Math.max(e-3*r,u.maxMaxBufferLength/2,c);return v>=c&&(u.maxMaxBufferLength=v,this.warn("Reduce max buffer length to "+v+"s"),!0)},l.getAppendedFrag=function(e,r){void 0===r&&(r=Ie.MAIN);var u=this.fragmentTracker?this.fragmentTracker.getAppendedFrag(e,r):null;return u&&"fragment"in u?u.fragment:u},l.getNextFragment=function(e,r){var u=r.fragments,c=u.length;if(!c)return null;var v=this.config,p=u[0].start,y=v.lowLatencyMode&&!!r.partList,T=null;if(r.live){var E=v.initialLiveManifestSize;if(c<E)return this.warn("Not enough fragments to start playback (have: "+c+", need: "+E+")"),null;if(!r.PTSKnown&&!this.startFragRequested&&-1===this.startPosition||e<p){var x;y&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),T=this.getInitialLiveFragment(r);var C=this.hls.startPosition,k=this.hls.liveSyncPosition,w=T?(-1!==C&&C>=p?C:k)||T.start:e;this.log("Setting startPosition to "+w+" to match start frag at live edge. mainStart: "+C+" liveSyncPosition: "+k+" frag.start: "+(null==(x=T)?void 0:x.start)),this.startPosition=this.nextLoadPosition=w}}else e<=p&&(T=u[0]);T||(T=this.getFragmentAtPosition(e,this.loadingParts?r.partEnd:r.fragmentEnd,r));var H=this.filterReplacedPrimary(T,r);return!H&&T&&(H=this.filterReplacedPrimary(u[T.sn-r.startSN+1]||null,r)),this.mapToInitFragWhenRequired(H)},l.isLoopLoading=function(e,r){var u=this.fragmentTracker.getState(e);return(u===It_OK||u===It_PARTIAL&&!!e.gap)&&this.nextLoadPosition>r},l.getNextFragmentLoopLoading=function(e,r,u,c,v){var p=null;if(e.gap&&(p=this.getNextFragment(this.nextLoadPosition,r))&&!p.gap&&u.nextStart){var y=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,u.nextStart,c,0);if(null!==y&&u.len+y.len>=v){var T=p.sn;return this.loopSn!==T&&(this.log('buffer full after gaps in "'+c+'" playlist starting at sn: '+T),this.loopSn=T),null}}return this.loopSn=void 0,p},l.filterReplacedPrimary=function(e,r){if(!e)return e;if(ku(this.config)&&e.type!==Ie.SUBTITLE){var u=this.hls.interstitialsManager,c=null==u?void 0:u.bufferingItem;if(c){var v=c.event;if(v){if(v.appendInPlace||Math.abs(e.start-c.start)>1||0===c.start)return null}else if(e.end<=c.start&&!1===(null==r?void 0:r.live)||e.start>c.end&&c.nextEvent&&(c.nextEvent.appendInPlace||e.start-c.end>1))return null}var p=null==u?void 0:u.playerQueue;if(p)for(var y=p.length;y--;){var T=p[y].interstitial;if(T.appendInPlace&&e.start>=T.startTime&&e.end<=T.resumeTime)return null}}return e},l.mapToInitFragWhenRequired=function(e){return null==e||!e.initSegment||e.initSegment.data||this.bitrateTest?e:e.initSegment},l.getNextPart=function(e,r,u){for(var c=-1,v=!1,p=!0,y=0,T=e.length;y<T;y++){var E=e[y];if(p=p&&!E.independent,c>-1&&u<E.start)break;var x=E.loaded;x?c=-1:(v||(E.independent||p)&&E.fragment===r)&&(E.fragment!==r&&this.warn("Need buffer at "+u+" but next unloaded part starts at "+E.start),c=y),v=x}return c},l.loadedEndOfParts=function(e,r){for(var u,c=e.length;c--;){if(!(u=e[c]).loaded)return!1;if(r>u.start)return!0}return!1},l.getInitialLiveFragment=function(e){var r=e.fragments,u=this.fragPrevious,c=null;if(u){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+u.programDateTime),c=function Ul(f,h,l){if(null===h||!Array.isArray(f)||!f.length||!X(h))return null;if(h<(f[0].programDateTime||0))return null;if(h>=(f[f.length-1].endProgramDateTime||0))return null;for(var r=0;r<f.length;++r){var u=f[r];if(Hl(h,l,u))return u}return null}(r,u.endProgramDateTime,this.config.maxFragLookUpTolerance)),!c){var v=u.sn+1;if(v>=e.startSN&&v<=e.endSN){var p=r[v-e.startSN];u.cc===p.cc&&this.log("Live playlist, switching playlist, load frag with next SN: "+(c=p).sn)}c||(c=mn(e,u.cc,u.end))&&this.log("Live playlist, switching playlist, load frag with same CC: "+c.sn)}}else{var y=this.hls.liveSyncPosition;null!==y&&(c=this.getFragmentAtPosition(y,this.bitrateTest?e.fragmentEnd:e.edge,e))}return c},l.getFragmentAtPosition=function(e,r,u){var k,w,v=this.fragPrevious,p=u.fragments,y=u.endSN,T=u.fragmentHint,E=this.config.maxFragLookUpTolerance,x=u.partList,C=!!(this.loadingParts&&null!=x&&x.length&&T);if(C&&!this.bitrateTest&&x[x.length-1].fragment.sn===T.sn&&(p=p.concat(T),y=T.sn),k=e<r?va(v,p,e,e<this.lastCurrentTime||e>r-E||null!=(w=this.media)&&w.paused||!this.startFragRequested?0:E):p[p.length-1]){var Y=k.sn-u.startSN,j=this.fragmentTracker.getState(k);if((j===It_OK||j===It_PARTIAL&&k.gap)&&(v=k),v&&k.sn===v.sn&&(!C||x[0].fragment.sn>k.sn||!u.live)&&k.level===v.level){var le=p[Y+1];k=k.sn<y&&this.fragmentTracker.getState(le)!==It_OK?le:null}}return k},l.alignPlaylists=function(e,r,u){var c=e.fragments.length;if(!c)return this.warn("No fragments in live playlist"),0;var v=e.fragmentStart,p=!r,y=e.alignedSliding&&X(v);if(p||!y&&!v){!function zf(f,h){f&&(id(h,f),h.alignedSliding||aa(h,f),!h.alignedSliding&&!h.skippedSegments&&td(f,h,!1))}(u,e);var T=e.fragmentStart;return this.log("Live playlist sliding: "+T.toFixed(2)+" start-sn: "+(r?r.startSN:"na")+"->"+e.startSN+" fragments: "+c),T}return v},l.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},l.setStartPosition=function(e,r){var u=this.startPosition;u<r&&(u=-1);var c=this.timelineOffset;if(-1===u){var v=null!==this.startTimeOffset,p=v?this.startTimeOffset:e.startTimeOffset;null!==p&&X(p)?(u=r+p,p<0&&(u+=e.edge),u=Math.min(Math.max(r,u),r+e.totalduration),this.log("Setting startPosition to "+u+" for start time offset "+p+" found in "+(v?"multivariant":"media")+" playlist"),this.startPosition=u):e.live?(this.log("Setting startPosition to -1 to start at live edge "+(u=this.hls.liveSyncPosition||r)),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=u=0),this.lastCurrentTime=u+c}this.nextLoadPosition=u+c},l.getLoadPosition=function(){var e,r=this.media,u=0;return null!=(e=this.hls)&&e.hasEnoughToStart&&r?u=r.currentTime:this.nextLoadPosition>=0&&(u=this.nextLoadPosition),u},l.handleFragLoadAborted=function(e,r){this.transmuxer&&e.type===this.playlistType&&gr(e)&&e.stats.aborted&&(this.log("Fragment "+e.sn+(r?" part "+r.index:"")+" of "+this.playlistLabel()+" "+e.level+" was aborted"),this.resetFragmentLoading(e))},l.resetFragmentLoading=function(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==Ke.FRAG_LOADING_WAITING_RETRY)&&(this.state=Ke.IDLE)},l.onFragmentOrKeyLoadError=function(e,r){var u;if(r.chunkMeta&&!r.frag){var c=this.getCurrentContext(r.chunkMeta);c&&(r.frag=c.frag)}var v=r.frag;if(v&&v.type===e&&this.levels){var p;if(this.fragContextChanged(v))return void this.warn("Frag load error must match current frag to retry "+v.url+" > "+(null==(p=this.fragCurrent)?void 0:p.url));var y=r.details===ue.FRAG_GAP;y&&this.fragmentTracker.fragBuffered(v,!0);var T=r.errorAction;if(!T)return void(this.state=Ke.ERROR);var E=T.action,C=T.retryCount,k=void 0===C?0:C,w=T.retryConfig,M=!!w,H=M&&E===lt.RetryRequest,Y=M&&!T.resolved&&T.flags===ot.MoveAllAlternatesMatchingHost,j=null==(u=this.hls.latestLevelDetails)?void 0:u.live;if(!H&&Y&&gr(v)&&!v.endList&&j&&!ee(r))this.resetFragmentErrors(e),this.treatAsGap(v),T.resolved=!0;else if((H||Y)&&k<w.maxNumRetry){var $,le=Ue(null==($=r.response)?void 0:$.code),pe=G(w,k);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+pe,this.state=Ke.FRAG_LOADING_WAITING_RETRY,T.resolved=!0,le)return this.log("Waiting for connection (offline)"),this.retryDate=1/0,void(r.reason="offline");this.warn("Fragment "+v.sn+" of "+e+" "+v.level+" errored with "+r.details+", retrying loading "+(k+1)+"/"+w.maxNumRetry+" in "+pe+"ms")}else if(w){if(this.resetFragmentErrors(e),!(k<w.maxNumRetry))return void this.warn(r.details+" reached or exceeded max retry ("+k+")");!y&&E!==lt.RemoveAlternatePermanently&&(T.resolved=!0)}else this.state=E===lt.SendAlternateToPenaltyBox?Ke.WAITING_LEVEL:Ke.ERROR;this.tickImmediate()}},l.checkRetryDate=function(){var e=self.performance.now(),r=this.retryDate,u=r===1/0;(!r||e>=r||u&&!Ue(0))&&(u&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=Ke.IDLE)},l.reduceLengthAndFlushBuffer=function(e){if(this.state===Ke.PARSING||this.state===Ke.PARSED){var r=e.frag,u=e.parent,c=this.getFwdBufferInfo(this.mediaBuffer,u),v=c&&c.len>.5;v&&this.reduceMaxBufferLength(c.len,(null==r?void 0:r.duration)||10);var p=!v;return p&&this.warn("Buffer full error while media.currentTime ("+this.getLoadPosition()+") is not buffered, flush "+u+" buffer"),r&&(this.fragmentTracker.removeFragment(r),this.nextLoadPosition=r.start),this.resetLoadingState(),p}return!1},l.resetFragmentErrors=function(e){e===Ie.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Ke.STOPPED&&(this.state=Ke.IDLE)},l.afterBufferFlushed=function(e,r,u){if(e){var c=tr.getBuffered(e);this.fragmentTracker.detectEvictedFragments(r,c,u),this.state===Ke.ENDED&&this.resetLoadingState()}},l.resetLoadingState=function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Ke.STOPPED&&(this.state=Ke.IDLE)},l.resetStartWhenNotLoaded=function(){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;var e=this.levelLastLoaded,r=e?e.details:null;null!=r&&r.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(r,r.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}},l.resetWhenMissingContext=function(e){this.log("Loading context changed while buffering sn "+e.sn+" of "+this.playlistLabel()+" "+(-1===e.level?"<removed>":e.level)+". This chunk will not be buffered."),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(),this.resetLoadingState()},l.removeUnbufferedFrags=function(e){void 0===e&&(e=0),this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)},l.updateLevelTiming=function(e,r,u,c){var v=this,p=u.details;if(p){if(!Object.keys(e.elementaryStreams).reduce(function(C,k){var w=e.elementaryStreams[k];if(w){var M=w.endPTS-w.startPTS;if(M<=0)return v.warn("Could not parse fragment "+e.sn+" "+k+" duration reliably ("+M+")"),C||!1;var H=c?0:Jl(p,e,w.startPTS,w.endPTS,w.startDTS,w.endDTS,v);return v.hls.trigger(O.LEVEL_PTS_UPDATED,{details:p,level:u,drift:H,type:k,frag:e,start:w.startPTS,end:w.endPTS}),!0}return C},!1)){var T,E=null===(null==(T=this.transmuxer)?void 0:T.error);if((0===u.fragmentError||E&&(u.fragmentError<2||e.endList))&&this.treatAsGap(e,u),E){var x=new Error("Found no media in fragment "+e.sn+" of "+this.playlistLabel()+" "+e.level+" resetting transmuxer to fallback to playlist timing");if(this.warn(x.message),this.hls.trigger(O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.FRAG_PARSING_ERROR,fatal:!1,error:x,frag:e,reason:"Found no media in msn "+e.sn+" of "+this.playlistLabel()+' "'+u.url+'"'}),!this.hls)return;this.resetTransmuxer()}}this.state=Ke.PARSED,this.log("Parsed "+e.type+" sn: "+e.sn+(r?" part: "+r.index:"")+" of "+this.fragInfo(e,!1,r)+")"),this.hls.trigger(O.FRAG_PARSED,{frag:e,part:r})}else this.warn("level.details undefined")},l.playlistLabel=function(){return this.playlistType===Ie.MAIN?"level":"track"},l.fragInfo=function(e,r,u){var c,v;return void 0===r&&(r=!0),this.playlistLabel()+" "+e.level+" ("+(u?"part":"frag")+":["+(null!=(c=r&&!u?e.startPTS:(u||e).start)?c:NaN).toFixed(3)+"-"+(null!=(v=r&&!u?e.endPTS:(u||e).end)?v:NaN).toFixed(3)+"]"+(u&&"main"===e.type?"INDEPENDENT="+(u.independent?"YES":"NO"):"")},l.treatAsGap=function(e,r){r&&r.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)},l.resetTransmuxer=function(){var e;null==(e=this.transmuxer)||e.reset()},l.recoverWorkerError=function(e){"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(),this.resetLoadingState())},ce(h,[{key:"startPositionValue",get:function(){var e=this.nextLoadPosition,r=this.startPosition;return-1===r&&e?e:r}},{key:"bufferingEnabled",get:function(){return this.buffering}},{key:"inFlightFrag",get:function(){return{frag:this.fragCurrent,state:this.state}}},{key:"timelineOffset",get:function(){var r,e=this.config.timelineOffset;
11return e?(null==(r=this.getLevelDetails())?void 0:r.appliedTimelineOffset)||e:0}},{key:"primaryPrefetch",get:function(){var e;return!(!ku(this.config)||!(null==(e=this.hls.interstitialsManager)||null==(e=e.playingItem)?void 0:e.event))}},{key:"state",get:function(){return this._state},set:function(e){var r=this._state;r!==e&&(this._state=e,this.log(r+"->"+e))}}])}(wf);function ku(f){return!!f.interstitialsController&&!1!==f.enableInterstitialPlayback}var nd=function(){function f(){this.chunks=[],this.dataLength=0}var h=f.prototype;return h.push=function(i){this.chunks.push(i),this.dataLength+=i.length},h.flush=function(){var r,i=this.chunks;return i.length?(r=1===i.length?i[0]:function fo(f,h){for(var l=new Uint8Array(h),i=0,e=0;e<f.length;e++){var r=f[e];l.set(r,i),i+=r.length}return l}(i,this.dataLength),this.reset(),r):new Uint8Array(0)},h.reset=function(){this.chunks.length=0,this.dataLength=0},f}();function sa(f,h){return h+10<=f.length&&51===f[h]&&68===f[h+1]&&73===f[h+2]&&f[h+3]<255&&f[h+4]<255&&f[h+6]<128&&f[h+7]<128&&f[h+8]<128&&f[h+9]<128}function Ru(f,h){return h+10<=f.length&&73===f[h]&&68===f[h+1]&&51===f[h+2]&&f[h+3]<255&&f[h+4]<255&&f[h+6]<128&&f[h+7]<128&&f[h+8]<128&&f[h+9]<128}function co(f,h){var l=0;return l=(127&f[h])<<21,l|=(127&f[h+1])<<14,(l|=(127&f[h+2])<<7)|127&f[h+3]}function Ss(f,h){for(var l=h,i=0;Ru(f,h);)i+=10,i+=co(f,h+6),sa(f,h+10)&&(i+=10),h+=i;if(i>0)return f.subarray(l,l+i)}function Xf(f,h){return 255===f[h]&&240==(246&f[h+1])}function wu(f,h){return 1&f[h+1]?7:9}function ho(f,h){return(3&f[h+3])<<11|f[h+4]<<3|(224&f[h+5])>>>5}function vo(f,h){return h+1<f.length&&Xf(f,h)}function $h(f,h){if(vo(f,h)){var l=wu(f,h);if(h+l>=f.length)return!1;var i=ho(f,h);if(i<=l)return!1;var e=h+i;return e===f.length||vo(f,e)}return!1}function Hn(f,h,l,i,e){if(!f.samplerate){var r=function ad(f,h,l,i){var r=h[l+2],u=r>>2&15;if(!(u>12)){var v=1+(r>>6&3),p=h[l+3]>>6&3|(1&r)<<2,y="mp4a.40."+v,T=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350][u],E=u;(5===v||29===v)&&(E-=3);var x=[v<<3|(14&E)>>1,(1&E)<<7|p<<3];return Vt.log("manifest codec:"+i+", parsed codec:"+y+", channels:"+p+", rate:"+T+" (ADTS object type:"+v+" sampling index:"+u+")"),{config:x,samplerate:T,channelCount:p,codec:y,parsedCodec:y,manifestCodec:i}}var c=new Error("invalid ADTS sampling index:"+u);f.emit(O.ERROR,O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.FRAG_PARSING_ERROR,fatal:!0,error:c,reason:c.message})}(h,l,i,e);if(!r)return;be(f,r)}}function sd(f){return 9216e4/f}function od(f,h,l,i,e){var v,u=i+e*sd(f.samplerate),c=function Ki(f,h){var l=wu(f,h);if(h+l<=f.length){var i=ho(f,h)-l;if(i>0)return{headerLength:l,frameLength:i}}}(h,l);if(c){var y=c.headerLength,T=y+c.frameLength,E=Math.max(0,l+T-h.length);E?(v=new Uint8Array(T-y)).set(h.subarray(l+y,h.length),0):v=h.subarray(l+y,l+T);var x={unit:v,pts:u};return E||f.samples.push(x),{sample:x,length:T,missing:E}}var C=h.length-l;return(v=new Uint8Array(C)).set(h.subarray(l,h.length),0),{sample:{unit:v,pts:u},length:C,missing:-1}}function ud(f,h){return Ru(f,h)&&co(f,h+6)+10<=f.length-h}function bs(f,h,l){return void 0===h&&(h=0),void 0===l&&(l=1/0),function Xh(f,h,l,i){var e=function Qh(f){return f instanceof ArrayBuffer?f:f.buffer}(f),r=1;"BYTES_PER_ELEMENT"in i&&(r=i.BYTES_PER_ELEMENT);var u=function on(f){return f&&f.buffer instanceof ArrayBuffer&&void 0!==f.byteLength&&void 0!==f.byteOffset}(f)?f.byteOffset:0,c=(u+f.byteLength)/r,p=Math.floor(Math.max(0,Math.min((u+h)/r,c)));return new i(e,p,Math.floor(Math.min(p+Math.max(l,0),c))-p)}(f,h,l,Uint8Array)}
vendor: 5,115 bytes, line 11
11function Mi(f){var h={key:f.type,description:"",data:"",mimeType:null,pictureType:null};if(!(f.size<2)){if(3!==f.data[0])return void console.log("Ignore frame with unrecognized character encoding");var i=f.data.subarray(1).indexOf(0);if(-1!==i){var e=Pr(bs(f.data,1,i)),r=f.data[2+i],u=f.data.subarray(3+i).indexOf(0);if(-1!==u){var v,c=Pr(bs(f.data,3+i,u));return v="--\x3e"===e?Pr(bs(f.data,4+i+u)):function Ou(f){return f instanceof ArrayBuffer?f:0==f.byteOffset&&f.byteLength==f.buffer.byteLength?f.buffer:new Uint8Array(f).buffer}(f.data.subarray(4+i+u)),h.mimeType=e,h.pictureType=r,h.description=c,h.data=v,h}}}}function Zh(f){return"PRIV"===f.type?function xs(f){if(!(f.size<2)){var h=Pr(f.data,!0),l=new Uint8Array(f.data.subarray(h.length+1));return{key:f.type,info:h,data:l.buffer}}}(f):"W"===f.type[0]?function Zf(f){if("WXXX"===f.type){if(f.size<2)return;var h=1,l=Pr(f.data.subarray(h),!0),i=Pr(f.data.subarray(h+=l.length+1));return{key:f.type,info:l,data:i}}var e=Pr(f.data);return{key:f.type,info:"",data:e}}(f):"APIC"===f.type?Mi(f):function Mu(f){if(!(f.size<2)){if("TXXX"===f.type){var h=1,l=Pr(f.data.subarray(h),!0),i=Pr(f.data.subarray(h+=l.length+1));return{key:f.type,info:l,data:i}}var e=Pr(f.data.subarray(1));return{key:f.type,info:"",data:e}}}(f)}function Cn(f){var h=String.fromCharCode(f[0],f[1],f[2],f[3]),l=co(f,4);return{type:h,size:l,data:f.subarray(10,10+l)}}var yr=10,oa=10;function Jf(f){for(var h=0,l=[];Ru(f,h);){var i=co(f,h+6);f[h+5]>>6&1&&(h+=yr);for(var e=(h+=yr)+i;h+oa<e;){var r=Cn(f.subarray(h)),u=Zh(r);u&&l.push(u),h+=r.size+yr}sa(f,h)&&(h+=yr)}return l}function ui(f){return f&&"PRIV"===f.key&&"com.apple.streaming.transportStreamTimestamp"===f.info}function po(f){if(8===f.data.byteLength){var h=new Uint8Array(f.data),i=(h[4]<<23)+(h[5]<<15)+(h[6]<<7)+h[7];return i/=45,1&h[3]&&(i+=47721858.84),Math.round(i)}}function As(f){for(var h=Jf(f),l=0;l<h.length;l++){var i=h[l];if(ui(i))return po(i)}}var Jr=function(f){return f.audioId3="org.id3",f.dateRange="com.apple.quicktime.HLS",f.emsg="https://aomedia.org/emsg/ID3",f.misbklv="urn:misb:KLV:bin:1910.1",f}({});function Gn(f,h){return void 0===f&&(f=""),void 0===h&&(h=9e4),{type:f,id:-1,pid:-1,inputTimeScale:h,sequenceNumber:-1,samples:[],dropped:0}}var go=function(){function f(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}var h=f.prototype;return h.resetInitSegment=function(i,e,r,u){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},h.resetTimeStamp=function(i){this.initPTS=i,this.resetContiguity()},h.resetContiguity=function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0},h.canParse=function(i,e){return!1},h.appendFrame=function(i,e,r){},h.demux=function(i,e){this.cachedData&&(i=ai(this.cachedData,i),this.cachedData=null);var c,r=Ss(i,0),u=r?r.length:0,v=this._audioTrack,p=this._id3Track,y=r?As(r):void 0,T=i.length;for((null===this.basePTS||0===this.frameIndex&&X(y))&&(this.basePTS=Fu(y,e,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),r&&r.length>0&&p.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:Jr.audioId3,duration:Number.POSITIVE_INFINITY});u<T;){if(this.canParse(i,u)){var E=this.appendFrame(v,i,u);E?(this.frameIndex++,this.lastPTS=E.sample.pts,c=u+=E.length):u=T}else ud(i,u)?(r=Ss(i,u),p.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:Jr.audioId3,duration:Number.POSITIVE_INFINITY}),c=u+=r.length):u++;if(u===T&&c!==T){var x=i.slice(c);this.cachedData=this.cachedData?ai(this.cachedData,x):x}}return{audioTrack:v,videoTrack:Gn(),id3Track:p,textTrack:Gn()}},h.demuxSampleAes=function(i,e,r){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},h.flush=function(i){var e=this.cachedData;return e&&(this.cachedData=null,this.demux(e,0)),{audioTrack:this._audioTrack,videoTrack:Gn(),id3Track:this._id3Track,textTrack:Gn()}},h.destroy=function(){this.cachedData=null,this._audioTrack=this._id3Track=void 0},f}(),Fu=function(h,l,i){return X(h)?90*h:9e4*l+(i?9e4*i.baseTime/i.timescale:0)},mo=null,ec=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],ld=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Va=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Jh=[0,1,1,4];function Nu(f,h,l,i,e){if(!(l+24>h.length)){var r=tc(h,l);if(r&&l+r.frameLength<=h.length){var c=i+e*(9e4*r.samplesPerFrame/r.sampleRate),v={unit:h.subarray(l,l+r.frameLength),pts:c,dts:c};return f.config=[],f.channelCount=r.channelCount,f.samplerate=r.sampleRate,f.samples.push(v),{sample:v,length:r.frameLength,missing:0}}}}function tc(f,h){var l=f[h+1]>>3&3,i=f[h+1]>>1&3,e=f[h+2]>>4&15,r=f[h+2]>>2&3;if(1!==l&&0!==e&&15!==e&&3!==r){var c=f[h+3]>>6,p=1e3*ec[14*(3===l?3-i:3===i?3:4)+e-1],T=ld[3*(3===l?0:2===l?1:2)+r],E=3===c?1:2,x=Va[l][i],C=Jh[i],
vendor: 4,858 bytes, line 11
11k=8*x*C,w=Math.floor(x*p/T+(f[h+2]>>1&1))*C;if(null===mo){var H=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);mo=H?parseInt(H[1]):0}return!!mo&&mo<=87&&2===i&&p>=224e3&&0===c&&(f[h+3]=128|f[h+3]),{sampleRate:T,channelCount:E,frameLength:w,samplesPerFrame:k}}}function Bu(f,h){return 255===f[h]&&224==(224&f[h+1])&&0!=(6&f[h+1])}function yo(f,h){return h+1<f.length&&Bu(f,h)}function rc(f,h){if(h+1<f.length&&Bu(f,h)){var i=tc(f,h),e=4;null!=i&&i.frameLength&&(e=i.frameLength);var r=h+e;return r===f.length||yo(f,r)}return!1}var Dr=function(f){function h(i,e){var r;return(r=f.call(this)||this).observer=void 0,r.config=void 0,r.observer=i,r.config=e,r}xe(h,f);var l=h.prototype;return l.resetInitSegment=function(e,r,u,c){f.prototype.resetInitSegment.call(this,e,r,u,c),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:r,duration:c,inputTimeScale:9e4,dropped:0}},h.probe=function(e,r){if(!e)return!1;var u=Ss(e,0),c=(null==u?void 0:u.length)||0;if(rc(e,c))return!1;for(var v=e.length;c<v;c++)if($h(e,c))return r.log("ADTS sync word found !"),!0;return!1},l.canParse=function(e,r){return function zh(f,h){return function Qf(f,h){return h+5<f.length}(f,h)&&Xf(f,h)&&ho(f,h)<=f.length-h}(e,r)},l.appendFrame=function(e,r,u){Hn(e,this.observer,r,u,e.manifestCodec);var c=od(e,r,u,this.basePTS,this.frameIndex);if(c&&0===c.missing)return c},h}(go),ic=function(h,l){var i=0,e=5;l+=e;for(var r=new Uint32Array(1),u=new Uint32Array(1),c=new Uint8Array(1);e>0;){c[0]=h[l];var v=Math.min(e,8),p=8-v;u[0]=4278190080>>>24+p<<p,r[0]=(c[0]&u[0])>>p,i=i?i<<v|r[0]:r[0],l+=1,e-=v}return i},ev=function(f){function h(i){var e;return(e=f.call(this)||this).observer=void 0,e.observer=i,e}xe(h,f);var l=h.prototype;return l.resetInitSegment=function(e,r,u,c){f.prototype.resetInitSegment.call(this,e,r,u,c),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:r,duration:c,inputTimeScale:9e4,dropped:0}},l.canParse=function(e,r){return r+64<e.length},l.appendFrame=function(e,r,u){var c=nc(e,r,u,this.basePTS,this.frameIndex);if(-1!==c)return{sample:e.samples[e.samples.length-1],length:c,missing:0}},h.probe=function(e){if(!e)return!1;var r=Ss(e,0);if(!r)return!1;var u=r.length;return 11===e[u]&&119===e[u+1]&&void 0!==As(r)&&ic(e,u)<16},h}(go);function nc(f,h,l,i,e){if(l+8>h.length||11!==h[l]||119!==h[l+1])return-1;var r=h[l+4]>>6;if(r>=3)return-1;var c=[48e3,44100,32e3][r],v=63&h[l+4],y=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*v+r];if(l+y>h.length)return-1;var T=h[l+6]>>5,E=0;2===T?E+=2:(1&T&&1!==T&&(E+=2),4&T&&(E+=2));var x=(h[l+6]<<8|h[l+7])>>12-E&1,k=[2,1,2,3,3,4,4,5][T]+x,M=7&h[l+5],H=new Uint8Array([r<<6|h[l+5]>>3<<1|M>>2,(3&M)<<6|T<<3|x<<2|v>>4,v<<4&224]),j=i+e*(1536/c*9e4),$=h.subarray(l,l+y);return f.config=H,f.channelCount=k,f.samplerate=c,f.samples.push({unit:$,pts:j}),y}var dd=function(f){function h(){return f.apply(this,arguments)||this}xe(h,f);var l=h.prototype;return l.resetInitSegment=function(e,r,u,c){f.prototype.resetInitSegment.call(this,e,r,u,c),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:r,duration:c,inputTimeScale:9e4,dropped:0}},h.probe=function(e){if(!e)return!1;var r=Ss(e,0),u=(null==r?void 0:r.length)||0;if(r&&11===e[u]&&119===e[u+1]&&void 0!==As(r)&&ic(e,u)<=16)return!1;for(var c=e.length;u<c;u++)if(rc(e,u))return Vt.log("MPEG Audio sync word found !"),!0;return!1},l.canParse=function(e,r){return function ei(f,h){return Bu(f,h)&&4<=f.length-h}(e,r)},l.appendFrame=function(e,r,u){if(null!==this.basePTS)return Nu(e,r,u,this.basePTS,this.frameIndex)},h}(go),et=/\/emsg[-/]ID3/i,tv=function(){function f(l,i){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=i}var h=f.prototype;return h.resetTimeStamp=function(){},h.resetInitSegment=function(i,e,r,u){var c=this.videoTrack=Gn("video",1),v=this.audioTrack=Gn("audio",1),p=this.txtTrack=Gn("text",1);if(this.id3Track=Gn("id3",1),this.timeOffset=0,null!=i&&i.byteLength){var y=Qn(i);if(y.video){var T=y.video,x=T.timescale,C=T.codec,k=T.supplemental;c.id=T.id,c.timescale=p.timescale=x,c.codec=C,c.supplemental=k}if(y.audio){var w=y.audio,H=w.timescale,Y=w.codec;v.id=w.id,v.timescale=H,v.codec=Y}
vendor: 1,077 bytes, line 11
11p.id=fa.text,c.sampleDuration=0,c.duration=v.duration=u}},h.resetContiguity=function(){this.remainderData=null},f.probe=function(i){return function Xn(f){for(var h=f.byteLength,l=0;l<h;){var i=jt(f,l);if(i>8&&109===f[l+4]&&111===f[l+5]&&111===f[l+6]&&102===f[l+7])return!0;l=i>1?l+i:h}return!1}(i)},h.demux=function(i,e){this.timeOffset=e;var r=i,u=this.videoTrack,c=this.txtTrack;if(this.config.progressive){this.remainderData&&(r=ai(this.remainderData,i));var v=function zr(f){var h={valid:null,remainder:null},l=Xt(f,["moof"]);if(l.length<2)return h.remainder=f,h;var i=l[l.length-1];return h.valid=f.slice(0,i.byteOffset-8),h.remainder=f.slice(i.byteOffset-8),h}(r);this.remainderData=v.remainder,u.samples=v.valid||new Uint8Array}else u.samples=r;var p=this.extractID3Track(u,e);return c.samples=ca(e,u),{videoTrack:u,audioTrack:this.audioTrack,id3Track:p,textTrack:this.txtTrack}},h.flush=function(){var i=this.timeOffset,e=this.videoTrack,r=this.txtTrack;e.samples=this.remainderData||new Uint8Array,this.remainderData=null;var u=this.extractID3Track(e,this.timeOffset);
vendor: 7,047 bytes, line 11
11return r.samples=ca(i,e),{videoTrack:e,audioTrack:Gn(),id3Track:u,textTrack:Gn()}},h.extractID3Track=function(i,e){var r=this,u=this.id3Track;if(i.samples.length){var c=Xt(i.samples,["emsg"]);c&&c.forEach(function(v){var p=function Il(f){var h=f[0],l="",i="",e=0,r=0,u=0,c=0,v=0,p=0;if(0===h){for(;"\0"!==yt(f.subarray(p,p+1));)l+=yt(f.subarray(p,p+1)),p+=1;for(l+=yt(f.subarray(p,p+1)),p+=1;"\0"!==yt(f.subarray(p,p+1));)i+=yt(f.subarray(p,p+1)),p+=1;i+=yt(f.subarray(p,p+1)),p+=1,e=jt(f,12),r=jt(f,16),c=jt(f,20),v=jt(f,24),p=28}else if(1===h){e=jt(f,p+=4);var y=jt(f,p+=4),T=jt(f,p+=4);for(p+=4,u=Math.pow(2,32)*y+T,ke(u)||(u=Number.MAX_SAFE_INTEGER,Vt.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),c=jt(f,p),v=jt(f,p+=4),p+=4;"\0"!==yt(f.subarray(p,p+1));)l+=yt(f.subarray(p,p+1)),p+=1;for(l+=yt(f.subarray(p,p+1)),p+=1;"\0"!==yt(f.subarray(p,p+1));)i+=yt(f.subarray(p,p+1)),p+=1;i+=yt(f.subarray(p,p+1)),p+=1}return{schemeIdUri:l,value:i,timeScale:e,presentationTime:u,presentationTimeDelta:r,eventDuration:c,id:v,payload:f.subarray(p,f.byteLength)}}(v);if(et.test(p.schemeIdUri)){var y=fd(p,e),T=4294967295===p.eventDuration?Number.POSITIVE_INFINITY:p.eventDuration/p.timeScale;T<=.001&&(T=Number.POSITIVE_INFINITY);var E=p.payload;u.samples.push({data:E,len:E.byteLength,dts:y,pts:y,type:Jr.emsg,duration:T})}else if(r.config.enableEmsgKLVMetadata&&p.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){var x=fd(p,e);u.samples.push({data:p.payload,len:p.payload.byteLength,dts:x,pts:x,type:Jr.misbklv,duration:Number.POSITIVE_INFINITY})}})}return u},h.demuxSampleAes=function(i,e,r){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},h.destroy=function(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0},f}();function fd(f,h){return X(f.presentationTime)?f.presentationTime/f.timeScale:h+f.presentationTimeDelta/f.timeScale}var cd=function(){function f(l,i,e){this.keyData=void 0,this.decrypter=void 0,this.keyData=e,this.decrypter=new Kl(i,{removePKCS7Padding:!1})}var h=f.prototype;return h.decryptBuffer=function(i){return this.decrypter.decrypt(i,this.keyData.key.buffer,this.keyData.iv.buffer,bn.cbc)},h.decryptAacSample=function(i,e,r){var u=this,c=i[e].unit;if(!(c.length<=16)){var v=c.subarray(16,c.length-c.length%16),p=v.buffer.slice(v.byteOffset,v.byteOffset+v.length);this.decryptBuffer(p).then(function(y){var T=new Uint8Array(y);c.set(T,16),u.decrypter.isSync()||u.decryptAacSamples(i,e+1,r)}).catch(r)}},h.decryptAacSamples=function(i,e,r){for(;;e++){if(e>=i.length)return void r();if(!(i[e].unit.length<32||(this.decryptAacSample(i,e,r),this.decrypter.isSync())))return}},h.getAvcEncryptedData=function(i){for(var e=16*Math.floor((i.length-48)/160)+16,r=new Int8Array(e),u=0,c=32;c<i.length-16;c+=160,u+=16)r.set(i.subarray(c,c+16),u);return r},h.getAvcDecryptedUnit=function(i,e){for(var r=new Uint8Array(e),u=0,c=32;c<i.length-16;c+=160,u+=16)i.set(r.subarray(u,u+16),c);return i},h.decryptAvcSample=function(i,e,r,u,c){var v=this,p=ra(c.data),y=this.getAvcEncryptedData(p);this.decryptBuffer(y.buffer).then(function(T){c.data=v.getAvcDecryptedUnit(p,T),v.decrypter.isSync()||v.decryptAvcSamples(i,e,r+1,u)}).catch(u)},h.decryptAvcSamples=function(i,e,r,u){if(i instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;e++,r=0){if(e>=i.length)return void u();for(var c=i[e].units;!(r>=c.length);r++){var v=c[r];if(!(v.data.length<=48||1!==v.type&&5!==v.type||(this.decryptAvcSample(i,e,r,u,v),this.decrypter.isSync())))return}}},f}(),_a=function(){function f(){this.VideoSample=null}var h=f.prototype;return h.createVideoSample=function(i,e,r){return{key:i,frame:!1,pts:e,dts:r,units:[],length:0}},h.getLastNalUnit=function(i){var e,u,r=this.VideoSample;if((!r||0===r.units.length)&&(r=i[i.length-1]),null!=(e=r)&&e.units){var c=r.units;u=c[c.length-1]}return u},h.pushAccessUnit=function(i,e){if(i.units.length&&i.frame){if(void 0===i.pts){var r=e.samples,u=r.length;if(!u)return void e.dropped++;var c=r[u-1];i.pts=c.pts,i.dts=c.dts}e.samples.push(i)}},h.parseNALu=function(i,e,r){var T,E,u=e.byteLength,c=i.naluState||0,v=c,p=[],y=0,C=-1,k=0;for(-1===c&&(C=0,k=this.getNALuType(e,0),c=0,y=1);y<u;)if(T=e[y++],c)if(1!==c)if(T)if(1===T){if(E=y-c-1,C>=0){var w={data:e.subarray(C,E),type:k};p.push(w)}else{var M=this.getLastNalUnit(i.samples);M&&(v&&y<=4-v&&M.state&&(M.data=M.data.subarray(0,M.data.byteLength-v)),E>0&&(M.data=ai(M.data,e.subarray(0,E)),M.state=0))}y<u?(C=y,k=this.getNALuType(e,y),c=0):c=-1}else c=0;else c=3;else c=T?0:2;else c=T?0:1;if(C>=0&&c>=0){var H={data:e.subarray(C,u),type:k,state:c};p.push(H)}if(0===p.length){var Y=this.getLastNalUnit(i.samples);Y&&(Y.data=ai(Y.data,e))}return i.naluState=c,p},f}(),Cs=function(){function f(l){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=l,this.bytesAvailable=l.byteLength,this.word=0,this.bitsAvailable=0}var h=f.prototype;return h.loadWord=function(){var i=this.data,e=this.bytesAvailable,r=i.byteLength-e,u=new Uint8Array(4),c=Math.min(4,e);if(0===c)throw new Error("no bytes available");u.set(i.subarray(r,r+c)),this.word=new DataView(u.buffer).getUint32(0),this.bitsAvailable=8*c,this.bytesAvailable-=c},h.skipBits=function(i){var e;i=Math.min(i,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>i?(this.word<<=i,this.bitsAvailable-=i):(i-=this.bitsAvailable,i-=(e=i>>3)<<3,this.bytesAvailable-=e,this.loadWord(),this.word<<=i,this.bitsAvailable-=i)},h.readBits=function(i){var e=Math.min(this.bitsAvailable,i),r=this.word>>>32-e;if(i>32&&Vt.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0)this.word<<=e;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return(e=i-e)>0&&this.bitsAvailable?r<<e|this.readBits(e):r},h.skipLZ=function(){var i;for(i=0;i<this.bitsAvailable;++i)if(this.word&2147483648>>>i)return this.word<<=i,this.bitsAvailable-=i,i;return this.loadWord(),i+this.skipLZ()},h.skipUEG=function(){this.skipBits(1+this.skipLZ())},h.skipEG=function(){this.skipBits(1+this.skipLZ())},h.readUEG=function(){var i=this.skipLZ();return this.readBits(i+1)-1},h.readEG=function(){var i=this.readUEG();return 1&i?1+i>>>1:-1*(i>>>1)},h.readBoolean=function(){return 1===this.readBits(1)},h.readUByte=function(){return this.readBits(8)},h.readUShort=function(){return this.readBits(16)},h.readUInt=function(){return this.readBits(32)},f}(),ji=function(f){function h(){return f.apply(this,arguments)||this}xe(h,f);var l=h.prototype;return l.parsePES=function(e,r,u,c){var T,v=this,p=this.parseNALu(e,u.data,c),y=this.VideoSample,E=!1;u.data=null,y&&p.length&&!e.audFound&&(this.pushAccessUnit(y,e),y=this.VideoSample=this.createVideoSample(!1,u.pts,u.dts)),p.forEach(function(x){var C,k;switch(x.type){case 1:var w=!1;T=!0;var Y,M=x.data;if(E&&M.length>4){var H=v.readSliceType(M);(2===H||4===H||7===H||9===H)&&(w=!0)}
vendor: 15,677 bytes, line 11
11w&&null!=(Y=y)&&Y.frame&&!y.key&&(v.pushAccessUnit(y,e),y=v.VideoSample=null),y||(y=v.VideoSample=v.createVideoSample(!0,u.pts,u.dts)),y.frame=!0,y.key=w;break;case 5:T=!0,null!=(C=y)&&C.frame&&!y.key&&(v.pushAccessUnit(y,e),y=v.VideoSample=null),y||(y=v.VideoSample=v.createVideoSample(!0,u.pts,u.dts)),y.key=!0,y.frame=!0;break;case 6:T=!0,ta(x.data,1,u.pts,r.samples);break;case 7:var j,$;T=!0,E=!0;var le=x.data,pe=v.readSPS(le);if(!e.sps||e.width!==pe.width||e.height!==pe.height||(null==(j=e.pixelRatio)?void 0:j[0])!==pe.pixelRatio[0]||(null==($=e.pixelRatio)?void 0:$[1])!==pe.pixelRatio[1]){e.width=pe.width,e.height=pe.height,e.pixelRatio=pe.pixelRatio,e.sps=[le];for(var Se=le.subarray(1,4),we="avc1.",Te=0;Te<3;Te++){var oe=Se[Te].toString(16);oe.length<2&&(oe="0"+oe),we+=oe}e.codec=we}break;case 8:T=!0,e.pps=[x.data];break;case 9:T=!0,e.audFound=!0,null!=(k=y)&&k.frame&&(v.pushAccessUnit(y,e),y=null),y||(y=v.VideoSample=v.createVideoSample(!1,u.pts,u.dts));break;case 12:T=!0;break;default:T=!1}y&&T&&y.units.push(x)}),c&&y&&(this.pushAccessUnit(y,e),this.VideoSample=null)},l.getNALuType=function(e,r){return 31&e[r]},l.readSliceType=function(e){var r=new Cs(e);return r.readUByte(),r.readUEG(),r.readUEG()},l.skipScalingList=function(e,r){for(var u=8,c=8,p=0;p<e;p++)0!==c&&(c=(u+r.readEG()+256)%256),u=0===c?u:c},l.readSPS=function(e){var y,T,E,r=new Cs(e),u=0,c=0,v=0,p=0,x=r.readUByte.bind(r),C=r.readBits.bind(r),k=r.readUEG.bind(r),w=r.readBoolean.bind(r),M=r.skipBits.bind(r),H=r.skipEG.bind(r),Y=r.skipUEG.bind(r),j=this.skipScalingList.bind(this);x();var $=x();if(C(5),M(3),x(),Y(),100===$||110===$||122===$||244===$||44===$||83===$||86===$||118===$||128===$){var le=k();if(3===le&&M(1),Y(),Y(),M(1),w())for(T=3!==le?8:12,E=0;E<T;E++)w()&&j(E<6?16:64,r)}Y();var pe=k();if(0===pe)k();else if(1===pe)for(M(1),H(),H(),y=k(),E=0;E<y;E++)H();Y(),M(1);var Se=k(),we=k(),Te=C(1);0===Te&&M(1),M(1),w()&&(u=k(),c=k(),v=k(),p=k());var oe=[1,1];if(w()&&w())switch(x()){case 1:oe=[1,1];break;case 2:oe=[12,11];break;case 3:oe=[10,11];break;case 4:oe=[16,11];break;case 5:oe=[40,33];break;case 6:oe=[24,11];break;case 7:oe=[20,11];break;case 8:oe=[32,11];break;case 9:oe=[80,33];break;case 10:oe=[18,11];break;case 11:oe=[15,11];break;case 12:oe=[64,33];break;case 13:oe=[160,99];break;case 14:oe=[4,3];break;case 15:oe=[3,2];break;case 16:oe=[2,1];break;case 255:oe=[x()<<8|x(),x()<<8|x()]}return{width:Math.ceil(16*(Se+1)-2*u-2*c),height:(2-Te)*(we+1)*16-(Te?2:4)*(v+p),pixelRatio:oe}},h}(_a),Is=function(f){function h(){for(var i,e=arguments.length,r=new Array(e),u=0;u<e;u++)r[u]=arguments[u];return(i=f.call.apply(f,[this].concat(r))||this).initVPS=null,i}xe(h,f);var l=h.prototype;return l.parsePES=function(e,r,u,c){var T,v=this,p=this.parseNALu(e,u.data,c),y=this.VideoSample,E=!1;u.data=null,y&&p.length&&!e.audFound&&(this.pushAccessUnit(y,e),y=this.VideoSample=this.createVideoSample(!1,u.pts,u.dts)),p.forEach(function(x){var C,k;switch(x.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:y||(y=v.VideoSample=v.createVideoSample(!1,u.pts,u.dts)),y.frame=!0,T=!0;break;case 16:case 17:case 18:case 21:var w;T=!0,E&&null!=(w=y)&&w.frame&&!y.key&&(v.pushAccessUnit(y,e),y=v.VideoSample=null),y||(y=v.VideoSample=v.createVideoSample(!0,u.pts,u.dts)),y.key=!0,y.frame=!0;break;case 19:case 20:T=!0,null!=(C=y)&&C.frame&&!y.key&&(v.pushAccessUnit(y,e),y=v.VideoSample=null),y||(y=v.VideoSample=v.createVideoSample(!0,u.pts,u.dts)),y.key=!0,y.frame=!0;break;case 39:T=!0,ta(x.data,2,u.pts,r.samples);break;case 32:T=!0,e.vps||("object"!=typeof e.params&&(e.params={}),e.params=be(e.params,v.readVPS(x.data)),v.initVPS=x.data),e.vps=[x.data];break;case 33:if(T=!0,E=!0,void 0!==e.vps&&e.vps[0]!==v.initVPS&&void 0!==e.sps&&!v.matchSPS(e.sps[0],x.data)&&(v.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){var M=v.readSPS(x.data);for(var H in e.width=M.width,e.height=M.height,e.pixelRatio=M.pixelRatio,e.codec=M.codecString,e.sps=[],"object"!=typeof e.params&&(e.params={}),M.params)e.params[H]=M.params[H]}v.pushParameterSet(e.sps,x.data,e.vps),y||(y=v.VideoSample=v.createVideoSample(!0,u.pts,u.dts)),y.key=!0;break;case 34:if(T=!0,"object"==typeof e.params){if(!e.pps){e.pps=[];var Y=v.readPPS(x.data);for(var j in Y)e.params[j]=Y[j]}v.pushParameterSet(e.pps,x.data,e.vps)}break;case 35:T=!0,e.audFound=!0,null!=(k=y)&&k.frame&&(v.pushAccessUnit(y,e),y=null),y||(y=v.VideoSample=v.createVideoSample(!1,u.pts,u.dts));break;default:T=!1}y&&T&&y.units.push(x)}),c&&y&&(this.pushAccessUnit(y,e),this.VideoSample=null)},l.pushParameterSet=function(e,r,u){(u&&u[0]===this.initVPS||!u&&!e.length)&&e.push(r)},l.getNALuType=function(e,r){return(126&e[r])>>>1},l.ebsp2rbsp=function(e){for(var r=new Uint8Array(e.byteLength),u=0,c=0;c<e.byteLength;c++)c>=2&&3===e[c]&&0===e[c-1]&&0===e[c-2]||(r[u]=e[c],u++);return new Uint8Array(r.buffer,0,u)},l.pushAccessUnit=function(e,r){f.prototype.pushAccessUnit.call(this,e,r),this.initVPS&&(this.initVPS=null)},l.readVPS=function(e){var r=new Cs(e);return r.readUByte(),r.readUByte(),r.readBits(4),r.skipBits(2),r.readBits(6),{numTemporalLayers:r.readBits(3)+1,temporalIdNested:r.readBoolean()}},l.readSPS=function(e){var r=new Cs(this.ebsp2rbsp(e));r.readUByte(),r.readUByte(),r.readBits(4);var u=r.readBits(3);r.readBoolean();for(var c=r.readBits(2),v=r.readBoolean(),p=r.readBits(5),y=r.readUByte(),T=r.readUByte(),E=r.readUByte(),x=r.readUByte(),C=r.readUByte(),k=r.readUByte(),w=r.readUByte(),M=r.readUByte(),H=r.readUByte(),Y=r.readUByte(),j=r.readUByte(),$=[],le=[],pe=0;pe<u;pe++)$.push(r.readBoolean()),le.push(r.readBoolean());if(u>0)for(var Se=u;Se<8;Se++)r.readBits(2);for(var we=0;we<u;we++)$[we]&&(r.readUByte(),r.readUByte(),r.readUByte(),r.readUByte(),r.readUByte(),r.readUByte(),r.readUByte(),r.readUByte(),r.readUByte(),r.readUByte(),r.readUByte()),le[we]&&r.readUByte();r.readUEG();var Te=r.readUEG();3==Te&&r.skipBits(1);var oe=r.readUEG(),fe=r.readUEG(),Ce=r.readBoolean(),ze=0,He=0,We=0,vt=0;Ce&&(ze+=r.readUEG(),He+=r.readUEG(),We+=r.readUEG(),vt+=r.readUEG());for(var At=r.readUEG(),St=r.readUEG(),Pt=r.readUEG(),Lt=r.readBoolean()?0:u;Lt<=u;Lt++)r.skipUEG(),r.skipUEG(),r.skipUEG();if(r.skipUEG(),r.skipUEG(),r.skipUEG(),r.skipUEG(),r.skipUEG(),r.skipUEG(),r.readBoolean()&&r.readBoolean())for(var Gt=0;Gt<4;Gt++)for(var ar=0;ar<(3===Gt?2:6);ar++)if(r.readBoolean()){var Ar=Math.min(64,1<<4+(Gt<<1));Gt>1&&r.readEG();for(var Cr=0;Cr<Ar;Cr++)r.readEG()}else r.readUEG();r.readBoolean(),r.readBoolean(),r.readBoolean()&&(r.readUByte(),r.skipUEG(),r.skipUEG(),r.readBoolean());for(var di=r.readUEG(),Er=0,nr=0;nr<di;nr++){var ti=!1;if(0!==nr&&(ti=r.readBoolean()),ti){nr===di&&r.readUEG(),r.readBoolean(),r.readUEG();for(var Li=0,fi=0;fi<=Er;fi++){var Bi=r.readBoolean(),qr=!1;Bi||(qr=r.readBoolean()),(Bi||qr)&&Li++}Er=Li}else{var Yi=r.readUEG(),zi=r.readUEG();Er=Yi+zi;for(var ci=0;ci<Yi;ci++)r.readUEG(),r.readBoolean();for(var Ti=0;Ti<zi;Ti++)r.readUEG(),r.readBoolean()}}if(r.readBoolean())for(var kn=r.readUEG(),ln=0;ln<kn;ln++){for(var Za=0;Za<Pt+4;Za++)r.readBits(1);r.readBits(1)}var Yo=0,zo=1,Ja=1,la=!0,$o=1,Rn=0;if(r.readBoolean(),r.readBoolean(),r.readBoolean()){if(r.readBoolean()){var Ca=r.readUByte();Ca>0&&Ca<16?(zo=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][Ca-1],Ja=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][Ca-1]):255===Ca&&(zo=r.readBits(16),Ja=r.readBits(16))}if(r.readBoolean()&&r.readBoolean(),r.readBoolean()&&(r.readBits(3),r.readBoolean(),r.readBoolean()&&(r.readUByte(),r.readUByte(),r.readUByte())),r.readBoolean()&&(r.readUEG(),r.readUEG()),r.readBoolean(),r.readBoolean(),r.readBoolean(),r.readBoolean()&&(r.skipUEG(),r.skipUEG(),r.skipUEG(),r.skipUEG()),r.readBoolean()&&($o=r.readBits(32),Rn=r.readBits(32),r.readBoolean()&&r.readUEG(),r.readBoolean())){var En=r.readBoolean(),Ia=r.readBoolean(),La=!1;(En||Ia)&&((La=r.readBoolean())&&(r.readUByte(),r.readBits(5),r.readBoolean(),r.readBits(5)),r.readBits(4),r.readBits(4),La&&r.readBits(4),r.readBits(5),r.readBits(5),r.readBits(5));for(var Xs=0;Xs<=u;Xs++){var yl=!1;(la=r.readBoolean())||r.readBoolean()?r.readEG():yl=r.readBoolean();var pf=yl?1:r.readUEG()+1;if(En)for(var wn=0;wn<pf;wn++)r.readUEG(),r.readUEG(),La&&(r.readUEG(),r.readUEG()),r.skipBits(1);if(Ia)for(var en=0;en<pf;en++)r.readUEG(),r.readUEG(),La&&(r.readUEG(),r.readUEG()),r.skipBits(1)}}r.readBoolean()&&(r.readBoolean(),r.readBoolean(),r.readBoolean(),Yo=r.readUEG())}var gf=oe,mf=fe;if(Ce){var Jo=1,Tl=1;1===Te?Jo=Tl=2:2==Te&&(Jo=2),gf=oe-Jo*He-Jo*ze,mf=fe-Tl*vt-Tl*We}for(var np=c?["A","B","C"][c]:"",ap=y<<24|T<<16|E<<8|x,yf=0,_l=0;_l<32;_l++)yf=(yf|(ap>>_l&1)<<31-_l)>>>0;var Tf=yf.toString(16);return 1===p&&"2"===Tf&&(Tf="6"),{codecString:"hvc1."+np+p+"."+Tf+"."+(v?"H":"L")+j+".B0",params:{general_tier_flag:v,general_profile_idc:p,general_profile_space:c,general_profile_compatibility_flags:[y,T,E,x],general_constraint_indicator_flags:[C,k,w,M,H,Y],general_level_idc:j,bit_depth:At+8,bit_depth_luma_minus8:At,bit_depth_chroma_minus8:St,min_spatial_segmentation_idc:Yo,chroma_format_idc:Te,frame_rate:{fixed:la,fps:Rn/$o}},width:gf,height:mf,pixelRatio:[zo,Ja]}},l.readPPS=function(e){var r=new Cs(this.ebsp2rbsp(e));r.readUByte(),r.readUByte(),r.skipUEG(),r.skipUEG(),r.skipBits(2),r.skipBits(3),r.skipBits(2),r.skipUEG(),r.skipUEG(),r.skipEG(),r.skipBits(2),r.readBoolean()&&r.skipUEG(),r.skipEG(),r.skipEG(),r.skipBits(4);var c=r.readBoolean(),v=r.readBoolean(),p=1;return v&&c?p=0:v?p=3:c&&(p=2),{parallelismType:p}},l.matchSPS=function(e,r){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,r).substr(3)},h}(_a),jr=188,Kn=function(){function f(l,i,e,r){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=l,this.config=i,this.typeSupported=e,this.logger=r,this.videoParser=null}f.probe=function(i,e){var r=f.syncOffset(i);return r>0&&e.warn("MPEG2-TS detected but first sync word found @ offset "+r),-1!==r},f.syncOffset=function(i){for(var e=i.length,r=Math.min(940,e-jr)+1,u=0;u<r;){for(var c=!1,v=-1,p=0,y=u;y<e;y+=jr){if(71!==i[y]||e-y!==jr&&71!==i[y+jr]){if(p)return-1;break}if(p++,-1===v&&0!==(v=y)&&(r=Math.min(v+18612,i.length-jr)+1),c||(c=0===To(i,y)),c&&p>1&&(0===v&&p>2||y+jr>r))return v}u++}return-1},f.createTrack=function(i,e){return{container:"video"===i||"audio"===i?"video/mp2t":void 0,type:i,id:fa[i],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===i?e:void 0}};var h=f.prototype;return h.resetInitSegment=function(i,e,r,u){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=f.createTrack("video"),this._videoTrack.duration=u,this._audioTrack=f.createTrack("audio",u),this._id3Track=f.createTrack("id3"),this._txtTrack=f.createTrack("text"),this._audioTrack.segmentCodec="aac",this.videoParser=null,this.aacOverFlow=null,this.remainderData=null,this.audioCodec=e,this.videoCodec=r},h.resetTimeStamp=function(){},h.resetContiguity=function(){var i=this._audioTrack,e=this._videoTrack,r=this._id3Track;i&&(i.pesData=null),e&&(e.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.remainderData=null},h.demux=function(i,e,r,u){void 0===r&&(r=!1),void 0===u&&(u=!1),r||(this.sampleAes=null);var c,v=this._videoTrack,p=this._audioTrack,y=this._id3Track,T=this._txtTrack,E=v.pid,x=v.pesData,C=p.pid,k=y.pid,w=p.pesData,M=y.pesData,H=null,Y=this.pmtParsed,j=this._pmtId,$=i.length;if(this.remainderData&&($=(i=ai(this.remainderData,i)).length,this.remainderData=null),$<jr&&!u)return this.remainderData=i,{audioTrack:p,videoTrack:v,id3Track:y,textTrack:T};var le=Math.max(0,f.syncOffset(i));($-=($-le)%jr)<i.byteLength&&!u&&(this.remainderData=new Uint8Array(i.buffer,$,i.buffer.byteLength-$));for(var pe=0,Se=le;Se<$;Se+=jr)if(71===i[Se]){var we=!!(64&i[Se+1]),Te=To(i,Se),fe=void 0;if((48&i[Se+3])>>4>1){if((fe=Se+5+i[Se+4])===Se+jr)continue}else fe=Se+4;switch(Te){case E:we&&(x&&(c=In(x,this.logger))&&(this.readyVideoParser(v.segmentCodec),null!==this.videoParser&&this.videoParser.parsePES(v,T,c,!1)),x={data:[],size:0}),x&&(x.data.push(i.subarray(fe,Se+jr)),x.size+=Se+jr-fe);break;case C:if(we){if(w&&(c=In(w,this.logger)))switch(p.segmentCodec){case"aac":this.parseAACPES(p,c);break;case"mp3":this.parseMPEGPES(p,c);break;case"ac3":this.parseAC3PES(p,c)}w={data:[],size:0}}w&&(w.data.push(i.subarray(fe,Se+jr)),w.size+=Se+jr-fe);break;case k:we&&(M&&(c=In(M,this.logger))&&this.parseID3PES(y,c),M={data:[],size:0}),M&&(M.data.push(i.subarray(fe,Se+jr)),M.size+=Se+jr-fe);break;case 0:we&&(fe+=i[fe]+1),j=this._pmtId=rv(i,fe);break;case j:we&&(fe+=i[fe]+1);var Ce=iv(i,fe,this.typeSupported,r,this.observer,this.logger);(E=Ce.videoPid)>0&&(v.pid=E,v.segmentCodec=Ce.segmentVideoCodec),(C=Ce.audioPid)>0&&(p.pid=C,p.segmentCodec=Ce.segmentAudioCodec),(k=Ce.id3Pid)>0&&(y.pid=k),null!==H&&!Y&&(this.logger.warn("MPEG-TS PMT found at "+Se+" after unknown PID '"+H+"'. Backtracking to sync byte @"+le+" to parse all TS packets."),H=null,Se=le-188),Y=this.pmtParsed=!0;break;case 17:case 8191:break;default:H=Te}}else pe++;pe>0&&Uu(this.observer,new Error("Found "+pe+" TS packet/s that do not start with 0x47"),void 0,this.logger),v.pesData=x,p.pesData=w,y.pesData=M;var ze={audioTrack:p,videoTrack:v,id3Track:y,textTrack:T};return u&&this.extractRemainingSamples(ze),ze},h.flush=function(){var e,i=this.remainderData;return this.remainderData=null,e=i?this.demux(i,-1,!1,!0):{videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},h.extractRemainingSamples=function(i){var T,e=i.audioTrack,r=i.videoTrack,u=i.id3Track,c=i.textTrack,v=r.pesData,p=e.pesData,y=u.pesData;if(v&&(T=In(v,this.logger))?(this.readyVideoParser(r.segmentCodec),null!==this.videoParser&&(this.videoParser.parsePES(r,c,T,!0),r.pesData=null)):r.pesData=v,p&&(T=In(p,this.logger))){switch(e.segmentCodec){case"aac":this.parseAACPES(e,T);break;case"mp3":this.parseMPEGPES(e,T);break;case"ac3":this.parseAC3PES(e,T)}e.pesData=null}else null!=p&&p.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),e.pesData=p;y&&(T=In(y,this.logger))?(this.parseID3PES(u,T),u.pesData=null):u.pesData=y},h.demuxSampleAes=function(i,e,r){var u=this.demux(i,r,!0,!this.config.progressive),c=this.sampleAes=new cd(this.observer,this.config,e);return this.decrypt(u,c)},h.readyVideoParser=function(i){null===this.videoParser&&("avc"===i?this.videoParser=new ji:"hevc"===i&&(this.videoParser=new Is))},h.decrypt=function(i,e){return new Promise(function(r){var u=i.audioTrack,c=i.videoTrack;u.samples&&"aac"===u.segmentCodec?e.decryptAacSamples(u.samples,0,function(){c.samples?e.decryptAvcSamples(c.samples,0,0,function(){r(i)}):r(i)}):c.samples&&e.decryptAvcSamples(c.samples,0,0,function(){r(i)})})},h.destroy=function(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0},h.parseAACPES=function(i,e){var T,E,k,r=0,u=this.aacOverFlow,c=e.data;if(u){this.aacOverFlow=null;var v=u.missing,p=u.sample.unit.byteLength;if(-1===v)c=ai(u.sample.unit,c);else{var y=p-v;u.sample.unit.set(c.subarray(0,v),y),i.samples.push(u.sample),r=u.missing}}for(T=r,E=c.length;T<E-1&&!vo(c,T);T++);if(T!==r){var C=T<E-1;
vendor: 4,695 bytes, line 11
11if(Uu(this.observer,new Error(C?"AAC PES did not start with ADTS header,offset:"+T:"No ADTS header found in AAC PES"),C,this.logger),!C)return}if(Hn(i,this.observer,c,T,this.audioCodec),void 0!==e.pts)k=e.pts;else{if(!u)return void this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");var w=sd(i.samplerate);k=u.sample.pts+w}for(var H,M=0;T<E;){if(T+=(H=od(i,c,T,k,M)).length,H.missing){this.aacOverFlow=H;break}for(M++;T<E-1&&!vo(c,T);T++);}},h.parseMPEGPES=function(i,e){var r=e.data,u=r.length,c=0,v=0,p=e.pts;if(void 0!==p)for(;v<u;)if(yo(r,v)){var y=Nu(i,r,v,p,c);if(!y)break;v+=y.length,c++}else v++;else this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS")},h.parseAC3PES=function(i,e){var r=e.data,u=e.pts;if(void 0!==u)for(var y,c=r.length,v=0,p=0;p<c&&(y=nc(i,r,p,u,v++))>0;)p+=y;else this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS")},h.parseID3PES=function(i,e){if(void 0!==e.pts){var r=be({},e,{type:this._videoTrack?Jr.emsg:Jr.audioId3,duration:Number.POSITIVE_INFINITY});i.samples.push(r)}else this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS")},f}();function To(f,h){return((31&f[h+1])<<8)+f[h+2]}function rv(f,h){return(31&f[h+10])<<8|f[h+11]}function iv(f,h,l,i,e,r){var u={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},v=h+3+((15&f[h+1])<<8|f[h+2])-4;for(h+=12+((15&f[h+10])<<8|f[h+11]);h<v;){var y=To(f,h),T=(15&f[h+3])<<8|f[h+4];switch(f[h]){case 207:if(!i){_o("ADTS AAC",r);break}case 15:-1===u.audioPid&&(u.audioPid=y);break;case 21:-1===u.id3Pid&&(u.id3Pid=y);break;case 219:if(!i){_o("H.264",r);break}case 27:-1===u.videoPid&&(u.videoPid=y);break;case 3:case 4:l.mpeg||l.mp3?-1===u.audioPid&&(u.audioPid=y,u.segmentAudioCodec="mp3"):r.log("MPEG audio found, not supported in this browser");break;case 193:if(!i){_o("AC-3",r);break}case 129:l.ac3?-1===u.audioPid&&(u.audioPid=y,u.segmentAudioCodec="ac3"):r.log("AC-3 audio found, not supported in this browser");break;case 6:if(-1===u.audioPid&&T>0)for(var E=h+5,x=T;x>2;){106===f[E]&&(!0!==l.ac3?r.log("AC-3 audio found, not supported in this browser for now"):(u.audioPid=y,u.segmentAudioCodec="ac3"));var k=f[E+1]+2;E+=k,x-=k}break;case 194:case 135:return Uu(e,new Error("Unsupported EC-3 in M2TS found"),void 0,r),u;case 36:-1===u.videoPid&&(u.videoPid=y,u.segmentVideoCodec="hevc",r.log("HEVC in M2TS found"))}h+=T+5}return u}function Uu(f,h,l,i){i.warn("parsing error: "+h.message),f.emit(O.ERROR,O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.FRAG_PARSING_ERROR,fatal:!1,levelRetry:l,error:h,reason:h.message})}function _o(f,h){h.log(f+" with AES-128-CBC encryption found in unencrypted stream")}function In(f,h){var i,e,r,u,c,l=0,v=f.data;if(!f||0===f.size)return null;for(;v[0].length<19&&v.length>1;)v[0]=ai(v[0],v[1]),v.splice(1,1);if(1===((i=v[0])[0]<<16)+(i[1]<<8)+i[2]){if((e=(i[4]<<8)+i[5])&&e>f.size-6)return null;var y=i[7];192&y&&(u=536870912*(14&i[9])+4194304*(255&i[10])+16384*(254&i[11])+128*(255&i[12])+(254&i[13])/2,64&y?u-(c=536870912*(14&i[14])+4194304*(255&i[15])+16384*(254&i[16])+128*(255&i[17])+(254&i[18])/2)>54e5&&(h.warn(Math.round((u-c)/9e4)+"s delta between PTS and DTS, align them"),u=c):c=u);var T=(r=i[8])+9;if(f.size<=T)return null;f.size-=T;for(var E=new Uint8Array(f.size),x=0,C=v.length;x<C;x++){var k=(i=v[x]).byteLength;if(T){if(T>k){T-=k;continue}i=i.subarray(T),k-=T,T=0}E.set(i,l),l+=k}return e&&(e-=r+3),{data:E,pts:u,dts:c,len:e}}return null}var Ls=function(){function f(){}return f.getSilentFrame=function(l,i){if("mp4a.40.2"===l){if(1===i)return new Uint8Array([0,200,0,128,35,128]);if(2===i)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===i)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===i)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===i)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===i)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===i)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===i)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===i)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}},f}(),Ea=Math.pow(2,32)-1,li=function(){function f(){}return f.init=function(){var l;
vendor: 23,602 bytes, line 11
11for(l in f.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]})f.types.hasOwnProperty(l)&&(f.types[l]=[l.charCodeAt(0),l.charCodeAt(1),l.charCodeAt(2),l.charCodeAt(3)]);var i=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),e=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);f.HDLR_TYPES={video:i,audio:e};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),u=new Uint8Array([0,0,0,0,0,0,0,0]);f.STTS=f.STSC=f.STCO=u,f.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),f.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),f.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),f.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var c=new Uint8Array([105,115,111,109]),v=new Uint8Array([97,118,99,49]),p=new Uint8Array([0,0,0,1]);f.FTYP=f.box(f.types.ftyp,c,p,c,v),f.DINF=f.box(f.types.dinf,f.box(f.types.dref,r))},f.box=function(l){for(var i=8,e=arguments.length,r=new Array(e>1?e-1:0),u=1;u<e;u++)r[u-1]=arguments[u];for(var c=r.length,v=c;c--;)i+=r[c].byteLength;var p=new Uint8Array(i);for(p[0]=i>>24&255,p[1]=i>>16&255,p[2]=i>>8&255,p[3]=255&i,p.set(l,4),c=0,i=8;c<v;c++)p.set(r[c],i),i+=r[c].byteLength;return p},f.hdlr=function(l){return f.box(f.types.hdlr,f.HDLR_TYPES[l])},f.mdat=function(l){return f.box(f.types.mdat,l)},f.mdhd=function(l,i){i*=l;var e=Math.floor(i/(Ea+1)),r=Math.floor(i%(Ea+1));return f.box(f.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,l>>24&255,l>>16&255,l>>8&255,255&l,e>>24,e>>16&255,e>>8&255,255&e,r>>24,r>>16&255,r>>8&255,255&r,85,196,0,0]))},f.mdia=function(l){return f.box(f.types.mdia,f.mdhd(l.timescale||0,l.duration||0),f.hdlr(l.type),f.minf(l))},f.mfhd=function(l){return f.box(f.types.mfhd,new Uint8Array([0,0,0,0,l>>24,l>>16&255,l>>8&255,255&l]))},f.minf=function(l){return f.box(f.types.minf,"audio"===l.type?f.box(f.types.smhd,f.SMHD):f.box(f.types.vmhd,f.VMHD),f.DINF,f.stbl(l))},f.moof=function(l,i,e){return f.box(f.types.moof,f.mfhd(l),f.traf(e,i))},f.moov=function(l){for(var i=l.length,e=[];i--;)e[i]=f.trak(l[i]);return f.box.apply(null,[f.types.moov,f.mvhd(l[0].timescale||0,l[0].duration||0)].concat(e).concat(f.mvex(l)))},f.mvex=function(l){for(var i=l.length,e=[];i--;)e[i]=f.trex(l[i]);return f.box.apply(null,[f.types.mvex].concat(e))},f.mvhd=function(l,i){i*=l;var e=Math.floor(i/(Ea+1)),r=Math.floor(i%(Ea+1)),u=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,l>>24&255,l>>16&255,l>>8&255,255&l,e>>24,e>>16&255,e>>8&255,255&e,r>>24,r>>16&255,r>>8&255,255&r,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return f.box(f.types.mvhd,u)},f.sdtp=function(l){var r,u,i=l.samples||[],e=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)e[r+4]=(u=i[r].flags).dependsOn<<4|u.isDependedOn<<2|u.hasRedundancy;return f.box(f.types.sdtp,e)},f.stbl=function(l){return f.box(f.types.stbl,f.stsd(l),f.box(f.types.stts,f.STTS),f.box(f.types.stsc,f.STSC),f.box(f.types.stsz,f.STSZ),f.box(f.types.stco,f.STCO))},f.avc1=function(l){var r,u,c,i=[],e=[];for(r=0;r<l.sps.length;r++)i.push((c=(u=l.sps[r]).byteLength)>>>8&255),i.push(255&c),i=i.concat(Array.prototype.slice.call(u));for(r=0;r<l.pps.length;r++)e.push((c=(u=l.pps[r]).byteLength)>>>8&255),e.push(255&c),e=e.concat(Array.prototype.slice.call(u));var v=f.box(f.types.avcC,new Uint8Array([1,i[3],i[4],i[5],255,224|l.sps.length].concat(i).concat([l.pps.length]).concat(e))),p=l.width,y=l.height,T=l.pixelRatio[0],E=l.pixelRatio[1];return f.box(f.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,p>>8&255,255&p,y>>8&255,255&y,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),v,f.box(f.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),f.box(f.types.pasp,new Uint8Array([T>>24,T>>16&255,T>>8&255,255&T,E>>24,E>>16&255,E>>8&255,255&E])))},f.esds=function(l){return new Uint8Array([0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2].concat(l.config,[6,1,2]))},f.audioStsd=function(l){var i=l.samplerate||0;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,l.channelCount||0,0,16,0,0,0,0,i>>8&255,255&i,0,0])},f.mp4a=function(l){return f.box(f.types.mp4a,f.audioStsd(l),f.box(f.types.esds,f.esds(l)))},f.mp3=function(l){return f.box(f.types[".mp3"],f.audioStsd(l))},f.ac3=function(l){return f.box(f.types["ac-3"],f.audioStsd(l),f.box(f.types.dac3,l.config))},f.stsd=function(l){var i=l.segmentCodec;if("audio"===l.type){if("aac"===i)return f.box(f.types.stsd,f.STSD,f.mp4a(l));if("ac3"===i&&l.config)return f.box(f.types.stsd,f.STSD,f.ac3(l));if("mp3"===i&&"mp3"===l.codec)return f.box(f.types.stsd,f.STSD,f.mp3(l))}else{if(!l.pps||!l.sps)throw new Error("video track missing pps or sps");if("avc"===i)return f.box(f.types.stsd,f.STSD,f.avc1(l));if("hevc"===i&&l.vps)return f.box(f.types.stsd,f.STSD,f.hvc1(l))}throw new Error("unsupported "+l.type+" segment codec ("+i+"/"+l.codec+")")},f.tkhd=function(l){var i=l.id,e=(l.duration||0)*(l.timescale||0),r=l.width||0,u=l.height||0,c=Math.floor(e/(Ea+1)),v=Math.floor(e%(Ea+1));return f.box(f.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,i>>24&255,i>>16&255,i>>8&255,255&i,0,0,0,0,c>>24,c>>16&255,c>>8&255,255&c,v>>24,v>>16&255,v>>8&255,255&v,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,255&r,0,0,u>>8&255,255&u,0,0]))},f.traf=function(l,i){var e=f.sdtp(l),r=l.id,u=Math.floor(i/(Ea+1)),c=Math.floor(i%(Ea+1));return f.box(f.types.traf,f.box(f.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r])),f.box(f.types.tfdt,new Uint8Array([1,0,0,0,u>>24,u>>16&255,u>>8&255,255&u,c>>24,c>>16&255,c>>8&255,255&c])),f.trun(l,e.length+16+20+8+16+8+8),e)},f.trak=function(l){return l.duration=l.duration||4294967295,f.box(f.types.trak,f.tkhd(l),f.mdia(l))},f.trex=function(l){var i=l.id;return f.box(f.types.trex,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},f.trun=function(l,i){var v,p,y,T,E,x,e=l.samples||[],r=e.length,u=12+16*r,c=new Uint8Array(u);for(c.set(["video"===l.type?1:0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,(i+=8+u)>>>24&255,i>>>16&255,i>>>8&255,255&i],0),v=0;v<r;v++)c.set([(y=(p=e[v]).duration)>>>24&255,y>>>16&255,y>>>8&255,255&y,(T=p.size)>>>24&255,T>>>16&255,T>>>8&255,255&T,(E=p.flags).isLeading<<2|E.dependsOn,E.isDependedOn<<6|E.hasRedundancy<<4|E.paddingValue<<1|E.isNonSync,61440&E.degradPrio,15&E.degradPrio,(x=p.cts)>>>24&255,x>>>16&255,x>>>8&255,255&x],12+16*v);return f.box(f.types.trun,c)},f.initSegment=function(l){f.types||f.init();var i=f.moov(l);return ai(f.FTYP,i)},f.hvc1=function(l){for(var i=l.params,e=[l.vps,l.sps,l.pps],u=new Uint8Array([1,i.general_profile_space<<6|(i.general_tier_flag?32:0)|i.general_profile_idc,i.general_profile_compatibility_flags[0],i.general_profile_compatibility_flags[1],i.general_profile_compatibility_flags[2],i.general_profile_compatibility_flags[3],i.general_constraint_indicator_flags[0],i.general_constraint_indicator_flags[1],i.general_constraint_indicator_flags[2],i.general_constraint_indicator_flags[3],i.general_constraint_indicator_flags[4],i.general_constraint_indicator_flags[5],i.general_level_idc,240|i.min_spatial_segmentation_idc>>8,255&i.min_spatial_segmentation_idc,252|i.parallelismType,252|i.chroma_format_idc,248|i.bit_depth_luma_minus8,248|i.bit_depth_chroma_minus8,0,parseInt(i.frame_rate.fps),3|i.temporal_id_nested<<2|i.num_temporal_layers<<3|(i.frame_rate.fixed?64:0),e.length]),c=u.length,v=0;v<e.length;v+=1){c+=3;for(var p=0;p<e[v].length;p+=1)c+=2+e[v][p].length}var y=new Uint8Array(c);y.set(u,0),c=u.length;for(var T=e.length-1,E=0;E<e.length;E+=1){y.set(new Uint8Array([32+E|(E===T?128:0),0,e[E].length]),c),c+=3;for(var x=0;x<e[E].length;x+=1)y.set(new Uint8Array([e[E][x].length>>8,255&e[E][x].length]),c),y.set(e[E][x],c+=2),c+=e[E][x].length}var C=f.box(f.types.hvcC,y),k=l.width,w=l.height,M=l.pixelRatio[0],H=l.pixelRatio[1];return f.box(f.types.hvc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,k>>8&255,255&k,w>>8&255,255&w,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),C,f.box(f.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),f.box(f.types.pasp,new Uint8Array([M>>24,M>>16&255,M>>8&255,255&M,H>>24,H>>16&255,H>>8&255,255&H])))},f}();li.types=void 0,li.HDLR_TYPES=void 0,li.STTS=void 0,li.STSC=void 0,li.STCO=void 0,li.STSZ=void 0,li.VMHD=void 0,li.SMHD=void 0,li.STSD=void 0,li.FTYP=void 0,li.DINF=void 0;var ac=9e4;function Eo(f,h,l,i){void 0===l&&(l=1),void 0===i&&(i=!1);var e=f*h*l;return i?Math.round(e):e}function Ds(f,h){return Eo(f,1e3,1/ac,h)}function hd(f){var h=f.baseTime,l=f.timescale;return h/l+" ("+h+"/"+l+") trackId: "+f.trackId}var Sa=null,So=null;function vd(f,h,l,i){return{duration:h,size:l,cts:i,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:f?2:1,isNonSync:f?0:1}}}var Ps=function(f){function h(i,e,r,u){var c;if((c=f.call(this,"mp4-remuxer",u)||this).observer=void 0,c.config=void 0,c.typeSupported=void 0,c.ISGenerated=!1,c._initPTS=null,c._initDTS=null,c.nextVideoTs=null,c.nextAudioTs=null,c.videoSampleDuration=null,c.isAudioContiguous=!1,c.isVideoContiguous=!1,c.videoTrackConfig=void 0,c.observer=i,c.config=e,c.typeSupported=r,c.ISGenerated=!1,null===Sa){var p=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Sa=p?parseInt(p[1]):0}if(null===So){var y=navigator.userAgent.match(/Safari\/(\d+)/i);So=y?parseInt(y[1]):0}return c}xe(h,f);var l=h.prototype;return l.destroy=function(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null},l.resetTimeStamp=function(e){var r=this._initPTS;(!r||!e||e.trackId!==r.trackId||e.baseTime!==r.baseTime||e.timescale!==r.timescale)&&this.log("Reset initPTS: "+(r&&hd(r))+" > "+(e&&hd(e))),this._initPTS=this._initDTS=e},l.resetNextTimestamp=function(){this.log("reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},l.resetInitSegment=function(){this.log("ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0},l.getVideoStartPts=function(e){var r=!1,u=e[0].pts,c=e.reduce(function(v,p){var y=p.pts,T=y-v;return T<-4294967296&&(r=!0,T=(y=Fi(y,u))-v),T>0?v:y},u);return r&&this.debug("PTS rollover detected"),c},l.remux=function(e,r,u,c,v,p,y,T){var E,x,C,k,w,M,H=v,Y=v,$=r.pid>-1,le=r.samples.length,pe=e.samples.length>0,Se=y&&le>0||le>1;if((!(e.pid>-1)||pe)&&(!$||Se)||this.ISGenerated||y){if(this.ISGenerated){var Te,oe,fe,Ce,ze=this.videoTrackConfig;(ze&&(r.width!==ze.width||r.height!==ze.height||(null==(Te=r.pixelRatio)?void 0:Te[0])!==(null==(oe=ze.pixelRatio)?void 0:oe[0])||(null==(fe=r.pixelRatio)?void 0:fe[1])!==(null==(Ce=ze.pixelRatio)?void 0:Ce[1]))||!ze&&Se||null===this.nextAudioTs&&pe)&&this.resetInitSegment()}this.ISGenerated||(C=this.generateIS(e,r,v,p));var vt,He=this.isVideoContiguous,We=-1;if(Se&&(We=function lv(f){for(var h=0;h<f.length;h++)if(f[h].key)return h;return-1}(r.samples),!He&&this.config.forceKeyFrameOnDiscontinuity))if(M=!0,We>0){this.warn("Dropped "+We+" out of "+le+" video samples due to a missing keyframe");var At=this.getVideoStartPts(r.samples);r.samples=r.samples.slice(We),r.dropped+=We,vt=Y+=(r.samples[0].pts-At)/r.inputTimeScale}else-1===We&&(this.warn("No keyframe found out of "+le+" video samples"),M=!1);if(this.ISGenerated){if(pe&&Se){var St=this.getVideoStartPts(r.samples),Ht=(Fi(e.samples[0].pts,St)-St)/r.inputTimeScale;H+=Math.max(0,Ht),Y+=Math.max(0,-Ht)}if(pe){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),C=this.generateIS(e,r,v,p)),x=this.remuxAudio(e,H,this.isAudioContiguous,p,$||Se||T===Ie.AUDIO?Y:void 0),Se){var Lt=x?x.endPTS-x.startPTS:0;r.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),C=this.generateIS(e,r,v,p)),E=this.remuxVideo(r,Y,He,Lt)}}else Se&&(E=this.remuxVideo(r,Y,He,0));E&&(E.firstKeyFrame=We,E.independent=-1!==We,E.firstKeyFramePTS=vt)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(u.samples.length&&(w=pd(u,v,this._initPTS,this._initDTS)),c.samples.length&&(k=gd(c,v,this._initPTS))),{audio:x,video:E,initSegment:C,independent:M,text:k,id3:w}},l.computeInitPts=function(e,r,u,c){var v=Math.round(u*r),p=Fi(e,v);if(p<v+r)for(this.log("Adjusting PTS for rollover in timeline near "+(v-p)/r+" "+c);p<v+r;)p+=8589934592;return p-v},l.generateIS=function(e,r,u,c){var k,w,M,v=e.samples,p=r.samples,y=this.typeSupported,T={},E=this._initPTS,x=!E||c,C="audio/mp4",H=-1;if(x&&(k=w=1/0),e.config&&v.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":y.mpeg?(C="audio/mpeg",e.codec=""):y.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3"}T.audio={id:"audio",container:C,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&y.mpeg?new Uint8Array(0):li.initSegment([e]),metadata:{channelCount:e.channelCount}},x&&(H=e.id,M=e.inputTimeScale,E&&M===E.timescale?x=!1:k=w=this.computeInitPts(v[0].pts,M,u,"audio"))}if(r.sps&&r.pps&&p.length){if(r.timescale=r.inputTimeScale,T.video={id:"main",container:"video/mp4",codec:r.codec,initSegment:li.initSegment([r]),metadata:{width:r.width,height:r.height}},x)if(H=r.id,M=r.inputTimeScale,E&&M===E.timescale)x=!1;else{var Y=this.getVideoStartPts(p),j=Fi(p[0].dts,Y),$=this.computeInitPts(j,M,u,"video"),le=this.computeInitPts(Y,M,u,"video");w=Math.min(w,$),k=Math.min(k,le)}this.videoTrackConfig={width:r.width,height:r.height,pixelRatio:r.pixelRatio}}if(Object.keys(T).length)return this.ISGenerated=!0,x?(E&&this.warn("Timestamps at playlist time: "+(c?"":"~")+u+" "+k/M+" != initPTS: "+E.baseTime/E.timescale+" ("+E.baseTime+"/"+E.timescale+") trackId: "+E.trackId),this.log("Found initPTS at playlist time: "+u+" offset: "+k/M+" ("+k+"/"+M+") trackId: "+H),this._initPTS={baseTime:k,timescale:M,trackId:H},this._initDTS={baseTime:w,timescale:M,trackId:H}):k=M=void 0,{tracks:T,initPTS:k,timescale:M,trackId:H}},l.remuxVideo=function(e,r,u,c){var M,H,v=e.inputTimeScale,p=e.samples,y=[],T=p.length,E=this._initPTS,x=E.baseTime*v/E.timescale,C=this.nextVideoTs,k=8,w=this.videoSampleDuration,Y=Number.POSITIVE_INFINITY,j=Number.NEGATIVE_INFINITY,$=!1;if(!u||null===C){var le=x+r*v,pe=p[0].pts-Fi(p[0].dts,p[0].pts);Sa&&null!==C&&Math.abs(le-pe-(C+x))<15e3?u=!0:C=le-pe-x}for(var Se=C+x,we=0;we<T;we++){var Te=p[we];Te.pts=Fi(Te.pts,Se),Te.dts=Fi(Te.dts,Se),Te.dts<p[we>0?we-1:we].dts&&($=!0)}$&&p.sort(function(Ia,La){return Ia.dts-La.dts||Ia.pts-La.pts});var oe=p[p.length-1].dts-(M=p[0].dts),fe=oe?Math.round(oe/(T-1)):w||e.inputTimeScale/30;if(u){var Ce=M-Se,ze=Ce>fe,He=Ce<-1;if((ze||He)&&(this.warn(ze?(e.segmentCodec||"").toUpperCase()+": "+Ds(Ce,!0)+" ms ("+Ce+"dts) hole between fragments detected at "+r.toFixed(3):(e.segmentCodec||"").toUpperCase()+": "+Ds(-Ce,!0)+" ms ("+Ce+"dts) overlapping between fragments detected at "+r.toFixed(3)),!He||Se>=p[0].pts||Sa)){M=Se;var We=p[0].pts-Ce;if(ze)p[0].dts=M,p[0].pts=We;else for(var vt=!0,At=0;At<p.length&&!(p[At].dts>We&&vt);At++){var St=p[At].pts;if(p[At].dts-=Ce,p[At].pts-=Ce,At<p.length-1){var Pt=p[At+1].pts;vt=Pt<=p[At].pts==Pt<=St}}this.log("Video: Initial PTS/DTS adjusted: "+Ds(We,!0)+"/"+Ds(M,!0)+", delta: "+Ds(Ce,!0)+" ms")}}for(var kt=0,Gt=0,ar=M=Math.max(0,M),Zt=0;Zt<T;Zt++){for(var Ar=p[Zt],Cr=Ar.units,fr=Cr.length,di=0,Er=0;Er<fr;Er++)di+=Cr[Er].data.length;Gt+=di,kt+=fr,Ar.length=di,Ar.dts<ar?(Ar.dts=ar,ar+=fe/4|0||1):ar=Ar.dts,Y=Math.min(Ar.pts,Y),j=Math.max(Ar.pts,j)}H=p[T-1].dts;var ti,nr=Gt+4*kt+8;try{ti=new Uint8Array(nr)}catch(Ia){return void this.observer.emit(O.ERROR,O.ERROR,{type:Ae.MUX_ERROR,details:ue.REMUX_ALLOC_ERROR,fatal:!1,error:Ia,bytes:nr,reason:"fail allocating video mdat "+nr})}var Li=new DataView(ti.buffer);Li.setUint32(0,nr),ti.set(li.types.mdat,4);for(var fi=!1,Bi=Number.POSITIVE_INFINITY,qr=Number.POSITIVE_INFINITY,Yi=Number.NEGATIVE_INFINITY,zi=Number.NEGATIVE_INFINITY,ci=0;ci<T;ci++){for(var Ti=p[ci],Di=Ti.units,kn=0,ln=0,Za=Di.length;ln<Za;ln++){var Yo=Di[ln],zo=Yo.data,Ja=Yo.data.byteLength;Li.setUint32(k,Ja),ti.set(zo,k+=4),k+=Ja,kn+=4+Ja}var la=void 0;if(ci<T-1)w=p[ci+1].dts-Ti.dts,la=p[ci+1].pts-Ti.pts;else{var $o=this.config,Rn=ci>0?Ti.dts-p[ci-1].dts:fe;if(la=ci>0?Ti.pts-p[ci-1].pts:fe,$o.stretchShortVideoTrack&&null!==this.nextAudioTs){var vl=Math.floor($o.maxBufferHole*v),zs=(c?Y+c*v:this.nextAudioTs+x)-Ti.pts;zs>vl?((w=zs-Rn)<0?w=Rn:fi=!0,this.log("It is approximately "+zs/90+" ms to the next segment; using duration "+w/90+" ms for the last video frame.")):w=Rn}else w=Rn}var $s=Math.round(Ti.pts-Ti.dts);Bi=Math.min(Bi,w),Yi=Math.max(Yi,w),qr=Math.min(qr,la),zi=Math.max(zi,la),y.push(vd(Ti.key,w,kn,$s))}if(y.length)if(Sa){if(Sa<70){var Ca=y[0].flags;Ca.dependsOn=2,Ca.isNonSync=0}}else if(So&&zi-qr<Yi-Bi&&fe/Yi<.025&&0===y[0].cts){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var Xo=M,_i=0,Qo=y.length;_i<Qo;_i++){var pl=Xo+y[_i].duration;y[_i].duration=_i<Qo-1?pl+y[_i+1].cts-(Xo+y[_i].cts):_i?y[_i-1].duration:fe,y[_i].cts=0,Xo=pl}}this.nextVideoTs=C=H+(w=fi||!w?fe:w)-x,this.videoSampleDuration=w,this.isVideoContiguous=!0;var En={data1:li.moof(e.sequenceNumber++,M,be(e,{samples:y})),data2:ti,startPTS:(Y-x)/v,endPTS:(j+w-x)/v,startDTS:(M-x)/v,endDTS:C/v,type:"video",hasAudio:!1,hasVideo:!0,nb:y.length,dropped:e.dropped};return e.samples=[],e.dropped=0,En},l.getSamplesPerFrame=function(e){switch(e.segmentCodec){case"mp3":return 1152;case"ac3":return 1536;default:return 1024}},l.remuxAudio=function(e,r,u,c,v){var p=e.inputTimeScale,T=p/(e.samplerate?e.samplerate:p),E=this.getSamplesPerFrame(e),x=E*T,C=this._initPTS,k="mp3"===e.segmentCodec&&this.typeSupported.mpeg,w=[],M=void 0!==v,H=e.samples,Y=k?0:8,j=this.nextAudioTs||-1,$=C.baseTime*p/C.timescale,le=$+r*p;if(this.isAudioContiguous=u=u||H.length&&j>0&&(c&&Math.abs(le-(j+$))<9e3||Math.abs(Fi(H[0].pts,le)-(j+$))<20*x),H.forEach(function(qr){qr.pts=Fi(qr.pts,le)}),!u||j<0){var pe=H.length;if(pe!==(H=H.filter(function(qr){return qr.pts>=0})).length&&this.warn("Removed "+(H.length-pe)+" of "+pe+" samples (initPTS "+$+" / "+p+")"),!H.length)return;j=0===v?0:c&&!M?Math.max(0,le-$):H[0].pts-$}if("aac"===e.segmentCodec)for(var Se=this.config.maxAudioFramesDrift,we=0,Te=j+$;we<H.length;we++){var oe=H[we],fe=oe.pts,Ce=fe-Te,ze=Math.abs(1e3*Ce/p);if(Ce<=-Se*x&&M)0===we&&(this.warn("Audio frame @ "+(fe/p).toFixed(3)+"s overlaps marker by "+Math.round(1e3*Ce/p)+" ms."),this.nextAudioTs=j=fe-$,Te=fe);else if(Ce>=Se*x&&ze<1e4&&M){var He=Math.round(Ce/x);for(Te=fe-He*x;Te<0&&He&&x;)He--,Te+=x;0===we&&(this.nextAudioTs=j=Te-$),this.warn("Injecting "+He+" audio frames @ "+((Te-$)/p).toFixed(3)+"s due to "+Math.round(1e3*Ce/p)+" ms gap.");for(var We=0;We<He;We++){var vt=Ls.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);vt||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),vt=oe.unit.subarray()),H.splice(we,0,{unit:vt,pts:Te}),Te+=x,we++}}oe.pts=Te,Te+=x}for(var Pt,At=null,St=null,Ht=0,Lt=H.length;Lt--;)Ht+=H[Lt].unit.byteLength;for(var bt=0,kt=H.length;bt<kt;bt++){var Gt=H[bt],ar=Gt.unit,Zt=Gt.pts;if(null!==St)w[bt-1].duration=Math.round((Zt-St)/T);else{if(u&&"aac"===e.segmentCodec&&(Zt=j+$),At=Zt,!(Ht>0))return;Ht+=Y;try{Pt=new Uint8Array(Ht)}catch(qr){return void this.observer.emit(O.ERROR,O.ERROR,{type:Ae.MUX_ERROR,details:ue.REMUX_ALLOC_ERROR,fatal:!1,error:qr,bytes:Ht,reason:"fail allocating audio mdat "+Ht})}k||(new DataView(Pt.buffer).setUint32(0,Ht),Pt.set(li.types.mdat,4))}Pt.set(ar,Y);var fr=ar.byteLength;Y+=fr,w.push(vd(!0,E,fr,0)),St=Zt}var di=w.length;if(di){this.nextAudioTs=(j=St-$)+T*w[w.length-1].duration;var nr=k?new Uint8Array(0):li.moof(e.sequenceNumber++,At/T,be({},e,{samples:w}));e.samples=[];var ti=(At-$)/p,Li=this.nextAudioTs/p,Bi={data1:nr,data2:Pt,startPTS:ti,endPTS:Li,startDTS:ti,endDTS:Li,type:"audio",hasAudio:!0,hasVideo:!1,nb:di};return this.isAudioContiguous=!0,Bi}},h}(Ze);function Fi(f,h){var l;if(null===h)return f;for(l=h<f?-8589934592:8589934592;Math.abs(f-h)>4294967296;)f+=l;return f}function pd(f,h,l,i){var e=f.samples.length;if(e){for(var r=f.inputTimeScale,u=0;u<e;u++){var c=f.samples[u];c.pts=Fi(c.pts-l.baseTime*r/l.timescale,h*r)/r,c.dts=Fi(c.dts-i.baseTime*r/i.timescale,h*r)/r}var v=f.samples;return f.samples=[],{samples:v}}}function gd(f,h,l){var i=f.samples.length;if(i){for(var e=f.inputTimeScale,r=0;r<i;r++){var u=f.samples[r];u.pts=Fi(u.pts-l.baseTime*e/l.timescale,h*e)/e}f.samples.sort(function(v,p){return v.pts-p.pts});var c=f.samples;return f.samples=[],{samples:c}}}var ua,bo=function(f){function h(i,e,r,u){var c;return(c=f.call(this,"passthrough-remuxer",u)||this).emitInitSegment=!1,c.audioCodec=void 0,c.videoCodec=void 0,c.initData=void 0,c.initPTS=null,c.initTracks=void 0,c.lastEndTime=null,c.isVideoContiguous=!1,c}xe(h,f);var l=h.prototype;return l.destroy=function(){},l.resetTimeStamp=function(e){this.lastEndTime=null;var r=this.initPTS;r&&e&&r.baseTime===e.baseTime&&r.timescale===e.timescale||(this.initPTS=e)},l.resetNextTimestamp=function(){this.isVideoContiguous=!1,this.lastEndTime=null},l.resetInitSegment=function(e,r,u,c){this.audioCodec=r,this.videoCodec=u,this.generateInitSegment(e,c),this.emitInitSegment=!0},l.generateInitSegment=function(e,r){var u=this.audioCodec,c=this.videoCodec;if(null==e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var v=this.initData=Qn(e),p=v.audio,y=v.video;if(r)!function ou(f,h){if(f&&h){var l=h.keyId;l&&h.isCommonEncryption&&Fn(f,function(i,e){var r=i.subarray(8,24);r.some(function(u){return 0!==u})||(Vt.log("[eme] Patching keyId in 'enc"+(e?"a":"v")+">sinf>>tenc' box: "+Nt(r)+" -> "+Nt(l)),i.set(l,8))})}}(e,r);else{var T=p||y;null!=T&&T.encrypted&&this.warn('Init segment with encrypted track with has no key ("'+T.codec+'")!')}p&&(u=md(p,Kt.AUDIO,this)),y&&(c=md(y,Kt.VIDEO,this));var E={};p&&y?E.audiovideo={container:"video/mp4",codec:u+","+c,supplemental:y.supplemental,encrypted:y.encrypted,initSegment:e,id:"main"}:p?E.audio={container:"audio/mp4",codec:u,encrypted:p.encrypted,initSegment:e,id:"audio"}:y?E.video={container:"video/mp4",codec:c,supplemental:y.supplemental,encrypted:y.encrypted,initSegment:e,id:"main"}:this.warn("initSegment does not contain moov or trak boxes."),this.initTracks=E},l.remux=function(e,r,u,c,v,p){var y,T,E=this.initPTS,x=this.lastEndTime,C={audio:void 0,video:void 0,text:c,id3:u,initSegment:void 0};X(x)||(x=this.lastEndTime=v||0);var k=r.samples;if(!k.length)return C;var w={initPTS:void 0,timescale:void 0,trackId:void 0},M=this.initData;if(null!=(y=M)&&y.length||(this.generateInitSegment(k),M=this.initData),null==(T=M)||!T.length)return this.warn("Failed to generate initSegment."),C;this.emitInitSegment&&(w.tracks=this.initTracks,this.emitInitSegment=!1);var H=function ea(f,h,l){for(var i={},e=Xt(f,["moof","traf"]),r=0;r<e.length;r++){var u=e[r],c=Xt(u,["tfhd"])[0],v=jt(c,4),p=h[v];if(p){i[v]||(i[v]={start:NaN,duration:0,sampleCount:0,timescale:p.timescale,type:p.type});var y=i[v],T=Xt(u,["tfdt"])[0];if(T){var E=T[0],x=jt(T,4);
111===E&&(x===Si?l.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(x*=Si+1,x+=jt(T,8))),X(x)&&(!X(y.start)||x<y.start)&&(y.start=x)}var C=p.default,k=jt(c,0)|(null==C?void 0:C.flags),w=(null==C?void 0:C.duration)||0;8&k&&(w=jt(c,2&k?12:8));for(var M=Xt(u,["trun"]),H=y.start||0,Y=0,j=w,$=0;$<M.length;$++){var le=M[$],pe=jt(le,4),Se=y.sampleCount;y.sampleCount+=pe;var oe=1&le[2],fe=2&le[2],Ce=4&le[2],ze=8&le[2],He=8,We=pe;for(1&le[3]&&(He+=4),4&le[3]&&pe&&(!(1&le[He+1])&&void 0===y.keyFrameIndex&&(y.keyFrameIndex=Se),He+=4,oe?(j=jt(le,He),He+=4):j=w,fe&&(He+=4),ze&&(He+=4),H+=j,Y+=j,We--);We--;)oe?(j=jt(le,He),He+=4):j=w,fe&&(He+=4),Ce&&(1&le[He+1]||void 0===y.keyFrameIndex&&(y.keyFrameIndex=y.sampleCount-(We+1),y.keyFrameStart=H),He+=4),ze&&(He+=4),H+=j,Y+=j;!Y&&w&&(Y+=w*pe)}y.duration+=Y}}if(!Object.keys(i).some(function(Gt){return i[Gt].duration})){for(var St=1/0,Pt=0,Ht=Xt(f,["sidx"]),Lt=0;Lt<Ht.length;Lt++){var bt=hn(Ht[Lt]);if(null!=bt&&bt.references){St=Math.min(St,bt.earliestPresentationTime/bt.timescale);var kt=bt.references.reduce(function(Gt,ar){return Gt+ar.info.duration||0},0);Pt=Math.max(Pt,kt+bt.earliestPresentationTime/bt.timescale)}}
vendor: 4,341 bytes, line 11
11Pt&&X(Pt)&&Object.keys(i).forEach(function(Gt){i[Gt].duration||(i[Gt].duration=Pt*i[Gt].timescale-i[Gt].start)})}return i}(k,M,this),Y=M.audio?H[M.audio.id]:null,j=M.video?H[M.video.id]:null,$=xo(j,1/0),le=xo(Y,1/0),pe=xo(j,0,!0),Se=xo(Y,0,!0),we=v,Te=0,oe=Y&&(!j||!E&&le<$||E&&E.trackId===M.audio.id),fe=oe?Y:j;if(fe){var Ce=fe.timescale,ze=fe.start-v*Ce,He=oe?M.audio.id:M.video.id;we=fe.start/Ce,Te=oe?Se-le:pe-$,(p||!E)&&(function oc(f,h,l,i){if(null===f)return!0;var e=Math.max(i,1);return Math.abs(h-f.baseTime/f.timescale-l)>e}(E,we,v,Te)||Ce!==E.timescale)&&(E&&this.warn("Timestamps at playlist time: "+(p?"":"~")+v+" "+ze/Ce+" != initPTS: "+E.baseTime/E.timescale+" ("+E.baseTime+"/"+E.timescale+") trackId: "+E.trackId),this.log("Found initPTS at playlist time: "+v+" offset: "+(we-v)+" ("+ze+"/"+Ce+") trackId: "+He),E=null,w.initPTS=ze,w.timescale=Ce,w.trackId=He)}else this.warn("No audio or video samples found for initPTS at playlist time: "+v);E?(w.initPTS=E.baseTime,w.timescale=E.timescale,w.trackId=E.trackId):((!w.timescale||void 0===w.trackId||void 0===w.initPTS)&&(this.warn("Could not set initPTS"),w.initPTS=we,w.timescale=1,w.trackId=-1),this.initPTS=E={baseTime:w.initPTS,timescale:w.timescale,trackId:w.trackId});var We=we-E.baseTime/E.timescale,vt=We+Te;Te>0?this.lastEndTime=vt:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var At=!!M.audio,St=!!M.video,Pt="";At&&(Pt+="audio"),St&&(Pt+="video");var Lt={data1:k,startPTS:We,startDTS:We,endPTS:vt,endDTS:vt,type:Pt,hasAudio:At,hasVideo:St,nb:1,dropped:0,encrypted:!!M.audio&&M.audio.encrypted||!!M.video&&M.video.encrypted};C.audio=At&&!St?Lt:void 0,C.video=St?Lt:void 0;var bt=null==j?void 0:j.sampleCount;if(bt){var kt=j.keyFrameIndex,Gt=-1!==kt;Lt.nb=bt,Lt.dropped=0===kt||this.isVideoContiguous?0:Gt?kt:bt,Lt.independent=Gt,Lt.firstKeyFrame=kt,Gt&&j.keyFrameStart&&(Lt.firstKeyFramePTS=(j.keyFrameStart-E.baseTime)/E.timescale),this.isVideoContiguous||(C.independent=Gt),this.isVideoContiguous||(this.isVideoContiguous=Gt),Lt.dropped&&this.warn("fmp4 does not start with IDR: firstIDR "+kt+"/"+bt+" dropped: "+Lt.dropped+" start: "+(Lt.firstKeyFramePTS||"NA"))}return C.initSegment=w,C.id3=pd(u,v,E,E),c.samples.length&&(C.text=gd(c,v,E)),C},h}(Ze);function xo(f,h,l){return void 0===l&&(l=!1),void 0!==(null==f?void 0:f.start)?(f.start+(l?f.duration:0))/f.timescale:h}function md(f,h,l){var i=f.codec;return i&&i.length>4?i:h===Kt.AUDIO?"ec-3"===i||"ac-3"===i||"alac"===i?i:"fLaC"===i||"Opus"===i?Oi(i,!1):(l.warn('Unhandled audio codec "'+i+'" in mp4 MAP'),i||"mp4a"):(l.warn('Unhandled video codec "'+i+'" in mp4 MAP'),i||"avc1")}try{ua=self.performance.now.bind(self.performance)}catch(f){ua=Date.now}var Ao=[{demux:tv,remux:bo},{demux:Kn,remux:Ps},{demux:Dr,remux:Ps},{demux:dd,remux:Ps}];Ao.splice(2,0,{demux:ev,remux:Ps});var yd=function(){function f(l,i,e,r,u,c){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=l,this.typeSupported=i,this.config=e,this.id=u,this.logger=c}var h=f.prototype;return h.configure=function(i){this.transmuxConfig=i,this.decrypter&&this.decrypter.reset()},h.push=function(i,e,r,u){var c=this,v=r.transmuxing;v.executeStart=ua();var p=new Uint8Array(i),y=this.currentTransmuxState,T=this.transmuxConfig;u&&(this.currentTransmuxState=u);var E=u||y,x=E.contiguous,C=E.discontinuity,k=E.trackSwitch,w=E.accurateTimeOffset,M=E.timeOffset,H=E.initSegmentChange,Y=T.audioCodec,j=T.videoCodec,$=T.defaultInitPts,le=T.duration,pe=T.initSegmentData,Se=function ks(f,h){var l=null;return f.byteLength>0&&null!=(null==h?void 0:h.key)&&null!==h.iv&&null!=h.method&&(l=h),l}(p,e);if(Se&&Na(Se.method)){var we=this.getDecrypter(),Te=Yl(Se.method);if(!we.isSync())return this.asyncResult=!0,this.decryptionPromise=we.webCryptoDecrypt(p,Se.key.buffer,Se.iv.buffer,Te).then(function(At){var St=c.push(At,null,r);return c.decryptionPromise=null,St}),this.decryptionPromise;var oe=we.softwareDecrypt(p,Se.key.buffer,Se.iv.buffer,Te);if(r.part>-1){var Ce=we.flush();oe=Ce&&Ce.buffer}if(!oe)return v.executeEnd=ua(),Ji(r);p=new Uint8Array(oe)}
11var ze=this.needsProbing(C,k);if(ze){var He=this.configureTransmuxer(p);if(He)return this.logger.warn("[transmuxer] "+He.message),this.observer.emit(O.ERROR,O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.FRAG_PARSING_ERROR,fatal:!1,error:He,reason:He.message}),v.executeEnd=ua(),Ji(r)}(C||k||H||ze)&&this.resetInitSegment(pe,Y,j,le,e),(C||H||ze)&&this.resetInitialTimestamp($),x||this.resetContiguity();var We=this.transmux(p,Se,M,w,r);this.asyncResult=yn(We);var vt=this.currentTransmuxState;return vt.contiguous=!0,vt.discontinuity=!1,vt.trackSwitch=!1,v.executeEnd=ua(),We},h.flush=function(i){var e=this,r=i.transmuxing;r.executeStart=ua();var u=this.decrypter,c=this.currentTransmuxState,v=this.decryptionPromise;if(v)return this.asyncResult=!0,v.then(function(){return e.flush(i)});var p=[],y=c.timeOffset;if(u){var T=u.flush();T&&p.push(this.push(T.buffer,null,i))}var E=this.demuxer;if(!E||!this.remuxer){r.executeEnd=ua();var C=[Ji(i)];return this.asyncResult?Promise.resolve(C):C}var k=E.flush(y);return yn(k)?(this.asyncResult=!0,k.then(function(w){return e.flushRemux(p,w,i),p})):(this.flushRemux(p,k,i),this.asyncResult?Promise.resolve(p):p)},h.flushRemux=function(i,e,r){var u=e.audioTrack,c=e.videoTrack,v=e.id3Track,p=e.textTrack,y=this.currentTransmuxState,T=y.accurateTimeOffset,E=y.timeOffset;this.logger.log("[transmuxer.ts]: Flushed "+this.id+" sn: "+r.sn+(r.part>-1?" part: "+r.part:"")+" of "+(this.id===Ie.MAIN?"level":"track")+" "+r.level);var x=this.remuxer.remux(u,c,v,p,E,T,!0,this.id);i.push({remuxResult:x,chunkMeta:r}),r.transmuxing.executeEnd=ua()},h.resetInitialTimestamp=function(i){var e=this.demuxer,r=this.remuxer;!e||!r||(e.resetTimeStamp(i),r.resetTimeStamp(i))},h.resetContiguity=function(){var i=this.demuxer,e=this.remuxer;!i||!e||(i.resetContiguity(),e.resetNextTimestamp())},h.resetInitSegment=function(i,e,r,u,c){var v=this.demuxer,p=this.remuxer;!v||!p||(v.resetInitSegment(i,e,r,u),p.resetInitSegment(i,e,r,c))},h.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},h.transmux=function(i,e,r,u,c){return e&&"SAMPLE-AES"===e.method?this.transmuxSampleAes(i,e,r,u,c):this.transmuxUnencrypted(i,r,u,c)},h.transmuxUnencrypted=function(i,e,r,u){var c=this.demuxer.demux(i,e,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(c.audioTrack,c.videoTrack,c.id3Track,c.textTrack,e,r,!1,this.id),chunkMeta:u}},h.transmuxSampleAes=function(i,e,r,u,c){var v=this;return this.demuxer.demuxSampleAes(i,e,r).then(function(p){return{remuxResult:v.remuxer.remux(p.audioTrack,p.videoTrack,p.id3Track,p.textTrack,r,u,!1,v.id),chunkMeta:c}})},h.configureTransmuxer=function(i){for(var c,e=this.config,r=this.observer,u=this.typeSupported,v=0,p=Ao.length;v<p;v++){var y;if(null!=(y=Ao[v].demux)&&y.probe(i,this.logger)){c=Ao[v];break}}if(!c)return new Error("Failed to find demuxer by probing fragment data");var T=this.demuxer,E=this.remuxer,x=c.remux,C=c.demux;(!E||!(E instanceof x))&&(this.remuxer=new x(r,e,u,this.logger)),(!T||!(T instanceof C))&&(this.demuxer=new C(r,e,u,this.logger),this.probe=C.probe)},h.needsProbing=function(i,e){return!this.demuxer||!this.remuxer||i||e},h.getDecrypter=function(){var i=this.decrypter;return i||(i=this.decrypter=new Kl(this.config)),i},f}();var Ji=function(h){return{remuxResult:{},chunkMeta:h}};function yn(f){return"then"in f&&f.then instanceof Function}var qi=function(h,l,i,e,r){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=h,this.videoCodec=l,this.initSegmentData=i,this.duration=e,this.defaultInitPts=r||null},dv=function(h,l,i,e,r,u){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=h,this.contiguous=l,this.accurateTimeOffset=i,this.trackSwitch=e,this.timeOffset=r,this.initSegmentChange=u},hr=[];function Co(f,h,l){if(function cv(f){return!(f.audio||f.video||f.text||f.id3||f.initSegment)}(h.remuxResult))return!1;var i=[],e=h.remuxResult,r=e.audio,u=e.video;return r&&Io(i,r),u&&Io(i,u),f.postMessage({event:"transmuxComplete",data:h,instanceNo:l},i),!0}
11function Io(f,h){h.data1&&f.push(h.data1.buffer),h.data2&&f.push(h.data2.buffer)}function uc(f,h,l,i){h.reduce(function(r,u){return Co(f,u,i)||r},!1)||f.postMessage({event:"transmuxComplete",data:h[0],instanceNo:i}),f.postMessage({event:"flush",data:l,instanceNo:i})}function Rs(f,h,l){self.postMessage({event:f,data:h,instanceNo:l})}typeof Le<"u"&&Le&&function Ha(){self.addEventListener("message",function(f){var h=f.data,l=h.instanceNo;if(void 0!==l){var i=hr[l];if("reset"===h.cmd&&(delete hr[h.resetNo],i&&i.destroy(),h.cmd="init"),"init"===h.cmd){var e=JSON.parse(h.config),r=new ht;r.on(O.FRAG_DECRYPTED,Rs),r.on(O.ERROR,Rs);var u=pr(e.debug,h.id);return function fv(f,h){var l=function(r){f[r]=function(){var u=Array.prototype.join.call(arguments," ");Rs("workerLog",{logType:r,message:u},h)}};for(var i in f)l(i)}(u,l),hr[l]=new yd(r,h.typeSupported,e,"",h.id,u),void Rs("init",null,l)}if(i)switch(h.cmd){case"configure":i.configure(h.config);break;case"demux":var c=i.push(h.data,h.decryptdata,h.chunkMeta,h.state);yn(c)?c.then(function(y){Co(self,y,l)}).catch(function(y){Rs(O.ERROR,{instanceNo:l,type:Ae.MEDIA_ERROR,details:ue.FRAG_PARSING_ERROR,chunkMeta:h.chunkMeta,fatal:!1,error:y,err:y,reason:"transmuxer-worker push error"},l)}):Co(self,c,l);break;case"flush":var v=h.chunkMeta,p=i.flush(v);yn(p)?p.then(function(y){uc(self,y,v,l)}).catch(function(y){Rs(O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.FRAG_PARSING_ERROR,chunkMeta:h.chunkMeta,fatal:!1,error:y,err:y,reason:"transmuxer-worker flush error"},l)}):uc(self,p,v,l)}}})}();var Lo="1.6.15",Ga={};var dc=0,fc=function(){function f(l,i,e,r){var u=this;this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=dc++,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.onWorkerMessage=function(x){var C=x.data,k=u.hls;if(k&&null!=C&&C.event&&C.instanceNo===u.instanceNo)switch(C.event){case"init":var w,M=null==(w=u.workerContext)?void 0:w.objectURL;M&&self.URL.revokeObjectURL(M);break;case"transmuxComplete":u.handleTransmuxComplete(C.data);break;case"flush":u.onFlush(C.data);break;case"workerLog":k.logger[C.data.logType]&&k.logger[C.data.logType](C.data.message);break;default:C.data=C.data||{},C.data.frag=u.frag,C.data.part=u.part,C.data.id=u.id,k.trigger(C.event,C.data)}},this.onWorkerError=function(x){if(u.hls){var C=new Error(x.message+"  ("+x.filename+":"+x.lineno+")");u.hls.config.enableWorker=!1,u.hls.logger.warn('Error in "'+u.id+'" Web Worker, fallback to inline'),u.hls.trigger(O.ERROR,{type:Ae.OTHER_ERROR,details:ue.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:C})}};var c=l.config;this.hls=l,this.id=i,this.useWorker=!!c.enableWorker,this.onTransmuxComplete=e,this.onFlush=r;var v=function(C,k){(k=k||{}).frag=u.frag||void 0,C===O.ERROR&&(k.parent=u.id,k.part=u.part,u.error=k.error),u.hls.trigger(C,k)};this.observer=new ht,this.observer.on(O.FRAG_DECRYPTED,v),this.observer.on(O.ERROR,v);var p=Js(c.preferManagedMediaSource);if(this.useWorker&&typeof Worker<"u"){var y=this.hls.logger;if(c.workerPath||function hv(){return"function"==typeof ft}()){try{c.workerPath?(y.log("loading Web Worker "+c.workerPath+' for "'+i+'"'),this.workerContext=function lc(f){var h=Ga[f];if(h)return h.clientCount++,h;var l=new self.URL(f,self.location.href).href,e={worker:new self.Worker(l),scriptURL:l,clientCount:1};return Ga[f]=e,e}(c.workerPath)):(y.log('injecting Web Worker for "'+i+'"'),this.workerContext=function vv(){var f=Ga[Lo];if(f)return f.clientCount++,f;var h=new self.Blob(["var exports={};var module={exports:exports};function define(f){f()};define.amd=true;("+ft.toString()+")(true);"],{type:"text/javascript"}),l=self.URL.createObjectURL(h),e={worker:new self.Worker(l),objectURL:l,clientCount:1};return Ga[Lo]=e,e}());var E=this.workerContext.worker;E.addEventListener("message",this.onWorkerMessage),E.addEventListener("error",this.onWorkerError),E.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:p,id:i,config:cr(c)})}catch(x){y.warn('Error setting up "'+i+'" Web Worker, fallback to inline',x),this.terminateWorker(),this.error=null,this.transmuxer=new yd(this.observer,p,c,"",i,l.logger)}return}}this.transmuxer=new yd(this.observer,p,c,"",i,l.logger)}var h=f.prototype;return h.reset=function(){if(this.frag=null,this.part=null,this.workerContext){var i=this.instanceNo;this.instanceNo=dc++;var e=this.hls.config,r=Js(e.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:i,typeSupp
11orted:r,id:this.id,config:cr(e)})}},h.terminateWorker=function(){if(this.workerContext){var i=this.workerContext.worker;this.workerContext=null,i.removeEventListener("message",this.onWorkerMessage),i.removeEventListener("error",this.onWorkerError),function Td(f){var h=Ga[f||Lo];if(h&&1==h.clientCount--){var i=h.worker,e=h.objectURL;delete Ga[f||Lo],e&&self.URL.revokeObjectURL(e),i.terminate()}}(this.hls.config.workerPath)}},h.destroy=function(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{var i=this.transmuxer;i&&(i.destroy(),this.transmuxer=null)}var e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null},h.push=function(i,e,r,u,c,v,p,y,T,E){var x,C,k=this;T.transmuxing.start=self.performance.now();var w=this.instanceNo,M=this.transmuxer,H=v?v.start:c.start,Y=c.decryptdata,j=this.frag,$=!(j&&c.cc===j.cc),le=!(j&&T.level===j.level),pe=j?T.sn-j.sn:-1,Se=this.part?T.part-this.part.index:-1,Te=!le&&(1===pe||0===pe&&(1===Se||0===pe&&T.id>1&&T.id===(null==j?void 0:j.stats.chunkCount)&&Se<=0)),oe=self.performance.now();(le||pe||0===c.stats.parsing.start)&&(c.stats.parsing.start=oe),v&&(Se||!Te)&&(v.stats.parsing.start=oe);var fe=!(j&&(null==(x=c.initSegment)?void 0:x.url)===(null==(C=j.initSegment)?void 0:C.url)),Ce=new dv($,Te,y,le,H,fe);if(!Te||$||fe){this.hls.logger.log("[transmuxer-interface]: Starting new transmux session for "+c.type+" sn: "+T.sn+(T.part>-1?" part: "+T.part:"")+" "+(this.id===Ie.MAIN?"level":"track")+": "+T.level+" id: "+T.id+"\n        discontinuity: "+$+"\n        trackSwitch: "+le+"\n        contiguous: "+Te+"\n        accurateTimeOffset: "+y+"\n        timeOffset: "+H+"\n        initSegmentChange: "+fe);var ze=new qi(r,u,e,p,E);this.configureTransmuxer(ze)}if(this.frag=c,this.part=v,this.workerContext)this.workerContext.worker.postMessage({instanceNo:w,cmd:"demux",data:i,decryptdata:Y,chunkMeta:T,state:Ce},i instanceof ArrayBuffer?[i]:[]);else if(M){var He=M.push(i,Y,T,Ce);yn(He)?He.then(function(We){k.handleTransmuxComplete(We)}).catch(function(We){k.transmuxerError(We,T,"transmuxer-interface push error")}):this.handleTransmuxComplete(He)}},h.flush=function(i){var e=this;i.transmuxing.start=self.performance.now();var u=this.transmuxer;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"flush",chunkMeta:i});else if(u){var c=u.flush(i);yn(c)?c.then(function(v){e.handleFlushResult(v,i)}).catch(function(v){e.transmuxerError(v,i,"transmuxer-interface flush error")}):this.handleFlushResult(c,i)}},h.transmuxerError=function(i,e,r){this.hls&&(this.error=i,this.hls.trigger(O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.FRAG_PARSING_ERROR,chunkMeta:e,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:i,err:i,reason:r}))},h.handleFlushResult=function(i,e){var r=this;i.forEach(function(u){r.handleTransmuxComplete(u)}),this.onFlush(e)},h.configureTransmuxer=function(i){var r=this.transmuxer;this.workerContext?this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"configure",config:i}):r&&r.configure(i)},h.handleTransmuxComplete=function(i){i.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(i)},f}(),Ka=function(f){function h(i,e,r){var u;return(u=f.call(this,i,e,r,"audio-stream-controller",Ie.AUDIO)||this).mainAnchor=null,u.mainFragLoading=null,u.audioOnly=!1,u.bufferedTrack=null,u.switchingTrack=null,u.trackId=-1,u.
vendor: 4,835 bytes, line 11
11waitingData=null,u.mainDetails=null,u.flushing=!1,u.bufferFlushed=!1,u.cachedTrackLoadedData=null,u.registerListeners(),u}xe(h,f);var l=h.prototype;return l.onHandlerDestroying=function(){this.unregisterListeners(),f.prototype.onHandlerDestroying.call(this),this.resetItem()},l.resetItem=function(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null},l.registerListeners=function(){f.prototype.registerListeners.call(this);var e=this.hls;e.on(O.LEVEL_LOADED,this.onLevelLoaded,this),e.on(O.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(O.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(O.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(O.BUFFER_RESET,this.onBufferReset,this),e.on(O.BUFFER_CREATED,this.onBufferCreated,this),e.on(O.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(O.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(O.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(O.FRAG_LOADING,this.onFragLoading,this),e.on(O.FRAG_BUFFERED,this.onFragBuffered,this)},l.unregisterListeners=function(){var e=this.hls;e&&(f.prototype.unregisterListeners.call(this),e.off(O.LEVEL_LOADED,this.onLevelLoaded,this),e.off(O.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(O.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(O.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(O.BUFFER_RESET,this.onBufferReset,this),e.off(O.BUFFER_CREATED,this.onBufferCreated,this),e.off(O.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(O.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(O.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(O.FRAG_LOADING,this.onFragLoading,this),e.off(O.FRAG_BUFFERED,this.onFragBuffered,this))},l.onInitPtsFound=function(e,r){var u=r.frag,v=r.initPTS,p=r.timescale,y=r.trackId;if(r.id===Ie.MAIN){var T=u.cc,E=this.fragCurrent;if(this.initPTS[T]={baseTime:v,timescale:p,trackId:y},this.log("InitPTS for cc: "+T+" found from main: "+v/p+" ("+v+"/"+p+") trackId: "+y),this.mainAnchor=u,this.state===Ke.WAITING_INIT_PTS){var x=this.waitingData;(!x&&!this.loadingParts||x&&x.frag.cc!==T)&&this.syncWithAnchor(u,null==x?void 0:x.frag)}else!this.hls.hasEnoughToStart&&E&&E.cc!==T?(E.abortRequests(),this.syncWithAnchor(u,E)):this.state===Ke.IDLE&&this.tick()}},l.getLoadPosition=function(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:f.prototype.getLoadPosition.call(this)},l.syncWithAnchor=function(e,r){var u,c=(null==(u=this.mainFragLoading)?void 0:u.frag)||null;if(!r||(null==c?void 0:c.cc)!==r.cc){var v=(c||e).cc,T=mn(this.getLevelDetails(),v,this.getLoadPosition());T&&(this.log("Syncing with main frag at "+T.start+" cc "+T.cc),this.startFragRequested=!1,this.nextLoadPosition=T.start,this.resetLoadingState(),this.state===Ke.IDLE&&this.doTickIdle())}},l.startLoad=function(e,r){if(!this.levels)return this.startPosition=e,void(this.state=Ke.STOPPED);var u=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),u>0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+u.toFixed(3)),e=u,this.state=Ke.IDLE):this.state=Ke.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=r?-1:e,this.tick()},l.doTick=function(){switch(this.state){case Ke.IDLE:this.doTickIdle();break;case Ke.WAITING_TRACK:var e=this.levels,u=null==e?void 0:e[this.trackId],c=null==u?void 0:u.details;if(c&&!this.waitForLive(u)){if(this.waitForCdnTuneIn(c))break;this.state=Ke.WAITING_INIT_PTS}break;case Ke.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break;case Ke.WAITING_INIT_PTS:var v=this.waitingData;if(v){var p=v.frag,y=v.part,T=v.cache,E=v.complete,x=this.mainAnchor;if(void 0!==this.initPTS[p.cc]){this.waitingData=null,this.state=Ke.FRAG_LOADING;var k={frag:p,part:y,payload:T.flush().buffer,networkDetails:null};this._handleFragmentLoadProgress(k),E&&f.prototype._handleFragmentLoadComplete.call(this,k)}else x&&x.cc!==v.frag.cc&&this.syncWithAnchor(x,v.frag)}else this.state=Ke.IDLE}this.onTickEnd()},l.resetLoadingState=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null),f.prototype.resetLoadingState.call(this)},l.onTickEnd=function(){var e=this.media;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)},l.doTickIdle=function(){var e,r=this.hls,u=this.levels,c=this.media,v=this.trackId;if(this.buffering&&(c||this.primaryPrefetch||!this.startFragRequested&&r.config.startFragPrefetch)&&null!=u&&u[v]){var y=u[v],T=y.details;if(!T||this.waitForLive(y)||this.waitForCdnTuneIn(T))return this.state=Ke.WAITING_TRACK,void(this.startFragRequested=!1);var E=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&E&&(this.bufferFlushed=!1,this.afterBufferFlushed(E,Kt.AUDIO,Ie.AUDIO));var x=this.getFwdBufferInfo(E,Ie.AUDIO);
vendor: 18,262 bytes, line 11
11if(null!==x){if(!this.switchingTrack&&this._streamEnded(x,T))return r.trigger(O.BUFFER_EOS,{type:"audio"}),void(this.state=Ke.ENDED);var C=x.len,k=r.maxBufferLength,w=T.fragments,M=w[0].start,H=this.getLoadPosition(),Y=this.flushing?H:x.end;if(this.switchingTrack&&c&&T.PTSKnown&&H<M&&(x.end>M||x.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),c.currentTime=M+.05),!(C>=k&&!this.switchingTrack&&Y<w[w.length-1].start)){var $=this.getNextFragment(Y,T);if($&&this.isLoopLoading($,Y)&&($=this.getNextFragmentLoopLoading($,T,x,Ie.MAIN,k)),!$)return void(this.bufferFlushed=!0);var le=(null==(e=this.mainFragLoading)?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&le&&gr($)&&!$.endList&&(!T.live||!this.loadingParts&&Y<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(le)===It_OK&&(this.mainFragLoading=le=null),le&&gr(le))){if($.start>le.end){var pe=this.fragmentTracker.getFragAtPos(Y,Ie.MAIN);pe&&pe.end>le.end&&(le=pe,this.mainFragLoading={frag:pe,targetBufferTime:null})}if($.start>le.end)return}this.loadFragment($,y,Y)}}}},l.onMediaDetaching=function(e,r){this.bufferFlushed=this.flushing=!1,f.prototype.onMediaDetaching.call(this,e,r)},l.onAudioTracksUpdated=function(e,r){var u=r.audioTracks;this.resetTransmuxer(),this.levels=u.map(function(c){return new wa(c)})},l.onAudioTrackSwitching=function(e,r){var u=!!r.url;this.trackId=r.id;var c=this.fragCurrent;c&&(c.abortRequests(),this.removeUnbufferedFrags(c.start)),this.resetLoadingState(),u?(this.switchingTrack=r,this.flushAudioIfNeeded(r),this.state!==Ke.STOPPED&&(this.setInterval(100),this.state=Ke.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=r,this.clearInterval())},l.onManifestLoading=function(){f.prototype.onManifestLoading.call(this),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1},l.onLevelLoaded=function(e,r){this.mainDetails=r.details;var u=this.cachedTrackLoadedData;u&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(O.AUDIO_TRACK_LOADED,u))},l.onAudioTrackLoaded=function(e,r){var u,c=this.levels,v=r.details,p=r.id,y=r.groupId,T=r.track;if(c){var E=this.mainDetails;if(!E||v.endCC>E.endCC||E.expired)return this.cachedTrackLoadedData=r,void(this.state!==Ke.STOPPED&&(this.state=Ke.WAITING_TRACK));this.cachedTrackLoadedData=null,this.log("Audio track "+p+' "'+T.name+'" of "'+y+'" loaded ['+v.startSN+","+v.endSN+"]"+(v.lastPartSn?"[part-"+v.lastPartSn+"-"+v.lastPartIndex+"]":"")+",duration:"+v.totalduration);var x=c[p],C=0;if(v.live||null!=(u=x.details)&&u.live){if(this.checkLiveUpdate(v),v.deltaUpdateFailed)return;var k;x.details&&(C=this.alignPlaylists(v,x.details,null==(k=this.levelLastLoaded)?void 0:k.details)),v.alignedSliding||(id(v,E),v.alignedSliding||aa(v,E),C=v.fragmentStart)}x.details=v,this.levelLastLoaded=x,this.startFragRequested||this.setStartPosition(E,C),this.hls.trigger(O.AUDIO_TRACK_UPDATED,{details:v,id:p,groupId:r.groupId}),this.state===Ke.WAITING_TRACK&&!this.waitForCdnTuneIn(v)&&(this.state=Ke.IDLE),this.tick()}else this.warn("Audio tracks reset while loading track "+p+' "'+T.name+'" of "'+y+'"')},l._handleFragmentLoadProgress=function(e){var r,u=e.frag,c=e.part,v=e.payload,p=this.config,y=this.trackId,T=this.levels;if(T){var E=T[y];if(E){var x=E.details;if(!x)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(u.start);var C=p.defaultAudioCodec||E.audioCodec||"mp4a.40.2",k=this.transmuxer;k||(k=this.transmuxer=new fc(this.hls,Ie.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var w=this.initPTS[u.cc],M=null==(r=u.initSegment)?void 0:r.data;if(void 0!==w){var Y=c?c.index:-1,$=new jl(u.level,u.sn,u.stats.chunkCount,v.byteLength,Y,-1!==Y);k.push(v,M,C,"",u,c,x.totalduration,!1,$,w)}else this.log("Unknown video PTS for cc "+u.cc+", waiting for video PTS before demuxing audio frag "+u.sn+" of ["+x.startSN+" ,"+x.endSN+"],track "+y),(this.waitingData=this.waitingData||{frag:u,part:c,cache:new nd,complete:!1}).cache.push(new Uint8Array(v)),this.state!==Ke.STOPPED&&(this.state=Ke.WAITING_INIT_PTS)}else this.warn("Audio track is undefined on fragment load progress")}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+u.sn+" of level "+u.level+" will not be buffered")},l._handleFragmentLoadComplete=function(e){this.waitingData?this.waitingData.complete=!0:f.prototype._handleFragmentLoadComplete.call(this,e)},l.onBufferReset=function(){this.mediaBuffer=null},l.onBufferCreated=function(e,r){this.bufferFlushed=this.flushing=!1;var u=r.tracks.audio;u&&(this.mediaBuffer=u.buffer||null)},l.onFragLoading=function(e,r){!this.audioOnly&&r.frag.type===Ie.MAIN&&gr(r.frag)&&(this.mainFragLoading=r,this.state===Ke.IDLE&&this.tick())},l.onFragBuffered=function(e,r){var u=r.frag,c=r.part;if(u.type===Ie.AUDIO)if(this.fragContextChanged(u))this.warn("Fragment "+u.sn+(c?" p: "+c.index:"")+" of level "+u.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+(this.switchingTrack?this.switchingTrack.name:"false"));else{if(gr(u)){this.fragPrevious=u;var v=this.switchingTrack;v&&(this.bufferedTrack=v,this.switchingTrack=null,this.hls.trigger(O.AUDIO_TRACK_SWITCHED,Oe({},v)))}this.fragBufferedComplete(u,c),this.media&&this.tick()}else!this.audioOnly&&u.type===Ie.MAIN&&!u.elementaryStreams.video&&!u.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null)},l.onError=function(e,r){var u;if(r.fatal)this.state=Ke.ERROR;else switch(r.details){case ue.FRAG_GAP:case ue.FRAG_PARSING_ERROR:case ue.FRAG_DECRYPT_ERROR:case ue.FRAG_LOAD_ERROR:case ue.FRAG_LOAD_TIMEOUT:case ue.KEY_LOAD_ERROR:case ue.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Ie.AUDIO,r);break;case ue.AUDIO_TRACK_LOAD_ERROR:case ue.AUDIO_TRACK_LOAD_TIMEOUT:case ue.LEVEL_PARSING_ERROR:!r.levelRetry&&this.state===Ke.WAITING_TRACK&&(null==(u=r.context)?void 0:u.type)===Qe.AUDIO_TRACK&&(this.state=Ke.IDLE);break;case ue.BUFFER_ADD_CODEC_ERROR:case ue.BUFFER_APPEND_ERROR:if("audio"!==r.parent)return;this.reduceLengthAndFlushBuffer(r)||this.resetLoadingState();break;case ue.BUFFER_FULL_ERROR:if("audio"!==r.parent)return;this.reduceLengthAndFlushBuffer(r)&&(this.bufferedTrack=null,f.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio"));break;case ue.INTERNAL_EXCEPTION:this.recoverWorkerError(r)}},l.onBufferFlushing=function(e,r){r.type!==Kt.VIDEO&&(this.flushing=!0)},l.onBufferFlushed=function(e,r){var u=r.type;if(u!==Kt.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===Ke.ENDED&&(this.state=Ke.IDLE);var c=this.mediaBuffer||this.media;c&&(this.afterBufferFlushed(c,u,Ie.AUDIO),this.tick())}},l._handleTransmuxComplete=function(e){var r,u="audio",c=this.hls,v=e.remuxResult,p=e.chunkMeta,y=this.getCurrentContext(p);if(y){var T=y.frag,E=y.part,x=y.level,C=x.details,k=v.audio,w=v.text,M=v.id3,H=v.initSegment;if(!this.fragContextChanged(T)&&C){if(this.state=Ke.PARSING,this.switchingTrack&&k&&this.completeAudioSwitch(this.switchingTrack),null!=H&&H.tracks){var Y=T.initSegment||T;if(this.unhandledEncryptionError(H,T))return;this._bufferInitSegment(x,H.tracks,Y,p),c.trigger(O.FRAG_PARSING_INIT_SEGMENT,{frag:Y,id:u,tracks:H.tracks})}if(k){var j=k.startPTS,$=k.endPTS,le=k.startDTS,pe=k.endDTS;E&&(E.elementaryStreams[Kt.AUDIO]={startPTS:j,endPTS:$,startDTS:le,endDTS:pe}),T.setElementaryStreamInfo(Kt.AUDIO,j,$,le,pe),this.bufferFragmentData(k,T,E,p)}if(null!=M&&null!=(r=M.samples)&&r.length){var Se=be({id:u,frag:T,details:C},M);c.trigger(O.FRAG_PARSING_METADATA,Se)}if(w){var we=be({id:u,frag:T,details:C},w);c.trigger(O.FRAG_PARSING_USERDATA,we)}}else this.fragmentTracker.removeFragment(T)}else this.resetWhenMissingContext(p)},l._bufferInitSegment=function(e,r,u,c){if(this.state===Ke.PARSING&&(r.video&&delete r.video,r.audiovideo&&delete r.audiovideo,r.audio)){var v=r.audio;v.id=Ie.AUDIO;var p=e.audioCodec;this.log("Init audio buffer, container:"+v.container+", codecs[level/parsed]=["+p+"/"+v.codec+"]"),p&&1===p.split(",").length&&(v.levelCodec=p),this.hls.trigger(O.BUFFER_CODECS,r);var y=v.initSegment;null!=y&&y.byteLength&&this.hls.trigger(O.BUFFER_APPENDING,{type:"audio",frag:u,part:null,chunkMeta:c,parent:u.type,data:y}),this.tickImmediate()}},l.loadFragment=function(e,r,u){var v,c=this.fragmentTracker.getState(e);if(this.switchingTrack||c===It_NOT_LOADED||c===It_PARTIAL)if(gr(e))if(null!=(v=r.details)&&v.live&&!this.initPTS[e.cc]){this.log("Waiting for video PTS in continuity counter "+e.cc+" of live stream before loading audio fragment "+e.sn+" of level "+this.trackId),this.state=Ke.WAITING_INIT_PTS;var p=this.mainDetails;p&&p.fragmentStart!==r.details.fragmentStart&&aa(r.details,p)}else f.prototype.loadFragment.call(this,e,r,u);else this._loadInitSegment(e,r);else this.clearTrackerIfNeeded(e)},l.flushAudioIfNeeded=function(e){if(this.media&&this.bufferedTrack){var r=this.bufferedTrack;Sn({name:r.name,lang:r.lang,assocLang:r.assocLang,characteristics:r.characteristics,audioCodec:r.audioCodec,channels:r.channels},e,ia)||(ds(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),f.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}},l.completeAudioSwitch=function(e){var r=this.hls;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,r.trigger(O.AUDIO_TRACK_SWITCHED,Oe({},e))},h}(Pu),_d=function(f){function h(i,e){var r;return(r=f.call(this,e,i.logger)||this).hls=void 0,r.canLoad=!1,r.timer=-1,r.hls=i,r}xe(h,f);var l=h.prototype;return l.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},l.clearTimer=function(){-1!==this.timer&&(self.clearTimeout(this.timer),this.timer=-1)},l.startLoad=function(){this.canLoad=!0,this.loadPlaylist()},l.stopLoad=function(){this.canLoad=!1,this.clearTimer()},l.switchParams=function(e,r,u){var c=null==r?void 0:r.renditionReports;if(c){for(var v=-1,p=0;p<c.length;p++){var y=c[p],T=void 0;try{T=new self.URL(y.URI,r.url).href}catch(M){this.warn("Could not construct new URL for Rendition Report: "+M),T=y.URI||""}if(T===e){v=p;break}T===e.substring(0,T.length)&&(v=p)}if(-1!==v){var E=c[v],x=parseInt(E["LAST-MSN"])||r.lastPartSn,C=parseInt(E["LAST-PART"])||r.lastPartIndex;if(this.hls.config.lowLatencyMode){var k=Math.min(r.age-r.partTarget,r.targetduration);C>=0&&k>r.partTarget&&(C+=1)}var w=u&&pu(u);return new gu(x,C>=0?C:void 0,w)}}},l.loadPlaylist=function(e){this.clearTimer()},l.loadingPlaylist=function(e,r){this.clearTimer()},l.shouldLoadPlaylist=function(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)},l.getUrlWithDirectives=function(e,r){if(r)try{return r.addDirectives(e)}catch(u){this.warn("Could not construct new URL with HLS Delivery Directives: "+u)}return e},l.playlistLoaded=function(e,r,u){var c=r.details,v=r.stats,p=self.performance.now(),y=v.loading.first?Math.max(0,p-v.loading.first):0;c.advancedDateTime=Date.now()-y;var T=this.hls.config.timelineOffset;if(T!==c.appliedTimelineOffset){var E=Math.max(T||0,0);c.appliedTimelineOffset=E,c.fragments.forEach(function(Pt){Pt.setStart(Pt.playlistOffset+E)})}if(c.live||null!=u&&u.live){var x="levelInfo"in r?r.levelInfo:r.track;if(c.reloaded(u),u&&c.fragments.length>0){qf(u,c,this);var C=c.playlistParsingError;if(C){this.warn(C);var w,k=this.hls;if(!k.config.ignorePlaylistParsingErrors)return void k.trigger(O.ERROR,{type:Ae.NETWORK_ERROR,details:ue.LEVEL_PARSING_ERROR,fatal:!1,url:c.url,error:C,reason:C.message,level:r.level||void 0,parent:null==(w=c.fragments[0])?void 0:w.type,networkDetails:r.networkDetails,stats:v});c.playlistParsingError=null}}-1===c.requestScheduled&&(c.requestScheduled=v.loading.start);var H=this.hls.mainForwardBufferInfo,$=ya(c,1e3*(c.edge-(H?H.end-H.len:0)));if(c.requestScheduled+$<p?c.requestScheduled=p:c.requestScheduled+=$,this.log("live playlist "+e+" "+(c.advanced?"REFRESHED "+c.lastPartSn+"-"+c.lastPartIndex:c.updated?"UPDATED":"MISSED")),!this.canLoad||!c.live)return;var le,pe=void 0,Se=void 0;if(c.canBlockReload&&c.endSN&&c.advanced){var we=this.hls.config.lowLatencyMode,Te=c.lastPartSn,oe=c.endSN,fe=c.lastPartIndex,ze=Te===oe;-1!==fe?ze?(pe=oe+1,Se=we?0:fe):(pe=Te,Se=we?fe+1:c.maxPartIndex):pe=oe+1;var He=c.age,We=He+c.ageHeader,vt=Math.min(We-c.partTarget,1.5*c.targetduration);if(vt>0){if(We>3*c.targetduration)this.log("Playlist last advanced "+He.toFixed(2)+"s ago. Omitting segment and part directives."),pe=void 0,Se=void 0;else if(null!=u&&u.tuneInGoal&&We-c.partTarget>u.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+u.tuneInGoal+" to: "+vt+" with playlist age: "+c.age),vt=0;else{var At=Math.floor(vt/c.targetduration);pe+=At,void 0!==Se&&(Se+=Math.round(vt%c.targetduration/c.partTarget)),this.log("CDN Tune-in age: "+c.ageHeader+"s last advanced "+He.toFixed(2)+"s goal: "+vt+" skip sn "+At+" to part "+Se)}c.tuneInGoal=vt}if(le=this.getDeliveryDirectives(c,r.deliveryDirectives,pe,Se),we||!ze)return c.requestScheduled=p,void this.loadingPlaylist(x,le)}else(c.canBlockReload||c.canSkipUntil)&&(le=this.getDeliveryDirectives(c,r.deliveryDirectives,pe,Se));le&&void 0!==pe&&c.canBlockReload&&(c.requestScheduled=v.loading.first+Math.max($-2*y,$/2)),this.scheduleLoading(x,le,c)}else this.clearTimer()},l.scheduleLoading=function(e,r,u){var c=this,v=u||e.details;if(v){var p=self.performance.now(),y=v.requestScheduled;if(p>=y)this.loadingPlaylist(e,r);else{var T=y-p;this.log("reload live playlist "+(e.name||e.bitrate+"bps")+" in "+Math.round(T)+" ms"),this.clearTimer(),this.timer=self.setTimeout(function(){return c.loadingPlaylist(e,r)},T)}}else this.loadingPlaylist(e,r)},l.getDeliveryDirectives=function(e,r,u,c){var v=pu(e);return null!=r&&r.skip&&e.deltaUpdateFailed&&(u=r.msn,c=r.part,v=ls.No),new gu(u,c,v)},l.checkRetry=function(e){var r=this,u=e.details,c=fs(e),v=e.errorAction,p=v||{},y=p.action,T=p.retryCount,E=void 0===T?0:T,x=p.retryConfig,C=!!v&&!!x&&(y===lt.RetryRequest||!v.resolved&&y===lt.SendAlternateToPenaltyBox);if(C){var k;if(E>=x.maxNumRetry)return!1;if(c&&null!=(k=e.context)&&k.deliveryDirectives)this.warn("Retrying playlist loading "+(E+1)+"/"+x.maxNumRetry+' after "'+u+'" without delivery-directives'),this.loadPlaylist();else{var w=G(x,E);this.clearTimer(),this.timer=self.setTimeout(function(){return r.loadPlaylist()},w),this.warn("Retrying playlist loading "+(E+1)+"/"+x.maxNumRetry+' after "'+u+'" in '+w+"ms")}e.levelRetry=!0,v.resolved=!0}return C},h}(Ze);function Do(f,h){if(f.length!==h.length)return!1;for(var l=0;l<f.length;l++)if(!Po(f[l].attrs,h[l].attrs))return!1;return!0}function Po(f,h,l){var i=f["STABLE-RENDITION-ID"];return i&&!l?i===h["STABLE-RENDITION-ID"]:!(l||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(function(e){return f[e]!==h[e]})}function Ed(f,h){return h.label.toLowerCase()===f.name.toLowerCase()&&(!h.language||h.language.toLowerCase()===(f.lang||"").toLowerCase())}var hc=function(f){function h(i){var e;return(e=f.call(this,i,"audio-track-controller")||this).tracks=[],e.groupIds=null,e.tracksInGroup=[],e.trackId=-1,e.currentTrack=null,e.selectDefaultTrack=!0,e.registerListeners(),e}xe(h,f);var l=h.prototype;return l.registerListeners=function(){var e=this.hls;e.on(O.MANIFEST_LOADING,this.onManifestLoading,this),e.on(O.MANIFEST_PARSED,this.onManifestParsed,this),e.on(O.LEVEL_LOADING,this.onLevelLoading,this),e.on(O.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(O.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(O.ERROR,this.onError,this)},l.unregisterListeners=function(){var e=this.hls;e.off(O.MANIFEST_LOADING,this.onManifestLoading,this),e.off(O.MANIFEST_PARSED,this.onManifestParsed,this),e.off(O.LEVEL_LOADING,this.onLevelLoading,this),e.off(O.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(O.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(O.ERROR,this.onError,this)},l.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,f.prototype.destroy.call(this)},l.onManifestLoading=function(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0},l.onManifestParsed=function(e,r){this.tracks=r.audioTracks||[]},l.onAudioTrackLoaded=function(e,r){var u=r.id,c=r.groupId,v=r.details,p=this.tracksInGroup[u];if(p&&p.groupId===c){var y=p.details;p.details=r.details,this.log("Audio track "+u+' "'+p.name+'" lang:'+p.lang+" group:"+c+" loaded ["+v.startSN+"-"+v.endSN+"]"),u===this.trackId&&this.playlistLoaded(u,r,y)}else this.warn("Audio track with id:"+u+" and group:"+c+" not found in active group "+(null==p?void 0:p.groupId))},l.onLevelLoading=function(e,r){this.switchLevel(r.level)},l.onLevelSwitching=function(e,r){this.switchLevel(r.level)},l.switchLevel=function(e){var r=this.hls.levels[e];if(r){var u=r.audioGroups||null,c=this.groupIds,v=this.currentTrack;if(!u||(null==c?void 0:c.length)!==(null==u?void 0:u.length)||null!=u&&u.some(function(H){return-1===(null==c?void 0:c.indexOf(H))})){this.groupIds=u,this.trackId=-1,this.currentTrack=null;var p=this.tracks.filter(function(H){return!u||-1!==u.indexOf(H.groupId)});if(p.length)this.selectDefaultTrack&&!p.some(function(H){return H.default})&&(this.selectDefaultTrack=!1),p.forEach(function(H,Y){H.id=Y});else if(!v&&!this.tracksInGroup.length)return;this.tracksInGroup=p;var y=this.hls.config.audioPreference;if(!v&&y){var T=Gi(y,p,ia);if(T>-1)v=p[T];else{var E=Gi(y,this.tracks);v=this.tracks[E]}}var x=this.findTrackId(v);-1===x&&v&&(x=this.findTrackId(null));var C={audioTracks:p};this.log("Updating audio tracks, "+p.length+" track(s) found in group(s): "+(null==u?void 0:u.join(","))),this.hls.trigger(O.AUDIO_TRACKS_UPDATED,C);var k=this.trackId;if(-1!==x&&-1===k)this.setAudioTrack(x);else if(p.length&&-1===k){var w,M=new Error("No audio track selected for current audio group-ID(s): "+(null==(w=this.groupIds)?void 0:w.join(","))+" track count: "+p.length);this.warn(M.message),this.hls.trigger(O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:M})}}}},l.onError=function(e,r){r.fatal||!r.context||r.context.type===Qe.AUDIO_TRACK&&r.context.
11id===this.trackId&&(!this.groupIds||-1!==this.groupIds.indexOf(r.context.groupId))&&this.checkRetry(r)},l.setAudioOption=function(e){var r=this.hls;if(r.config.audioPreference=e,e){var u=this.allAudioTracks;if(this.selectDefaultTrack=!1,u.length){var c=this.currentTrack;if(c&&Sn(e,c,ia))return c;var v=Gi(e,this.tracksInGroup,ia);if(v>-1){var p=this.tracksInGroup[v];return this.setAudioTrack(v),p}if(c){var y=r.loadLevel;-1===y&&(y=r.firstAutoLevel);var T=function Nl(f,h,l,i,e){var r=h[i],c=h.reduce(function(E,x,C){var k=x.uri;return(E[k]||(E[k]=[])).push(C),E},{})[r.uri];c.length>1&&(i=Math.max.apply(Math,c));var v=r.videoRange,p=r.frameRate,y=r.codecSet.substring(0,4),T=Tu(h,i,function(E){if(E.videoRange!==v||E.frameRate!==p||E.codecSet.substring(0,4)!==y)return!1;var x=E.audioGroups,C=l.filter(function(k){return!x||-1!==x.indexOf(k.groupId)});return Gi(f,C,e)>-1});return T>-1?T:Tu(h,i,function(E){var x=E.audioGroups,C=l.filter(function(k){return!x||-1!==x.indexOf(k.groupId)});return Gi(f,C,e)>-1})}(e,r.levels,u,y,ia);if(-1===T)return null;r.nextLoadLevel=T}if(e.channels||e.audioCodec){var E=Gi(e,u);if(E>-1)return u[E]}}}return null},l.setAudioTrack=function(e){var r=this.tracksInGroup;if(e<0||e>=r.length)this.warn("Invalid audio track id: "+e);else{this.selectDefaultTrack=!1;var u=this.currentTrack,c=r[e],v=c.details&&!c.details.live;if(!(e===this.trackId&&c===u&&v||(this.log("Switching to audio-track "+e+' "'+c.name+'" lang:'+c.lang+" group:"+c.groupId+" channels:"+c.channels),this.trackId=e,this.currentTrack=c,this.hls.trigger(O.AUDIO_TRACK_SWITCHING,Oe({},c)),v))){var p=this.switchParams(c.url,null==u?void 0:u.details,c.details);this.loadPlaylist(p)}}},l.findTrackId=function(e){for(var r=this.tracksInGroup,u=0;u<r.length;u++){var c=r[u];if((!this.selectDefaultTrack||c.default)&&(!e||Sn(e,c,ia)))return u}if(e){for(var v=e.name,p=e.lang,y=e.assocLang,T=e.characteristics,E=e.audioCodec,x=e.channels,C=0;C<r.length;C++)if(Sn({name:v,lang:p,assocLang:y,characteristics:T,audioCodec:E,channels:x},r[C],ia))return C;for(var w=0;w<r.length;w++)if(Po(e.attrs,r[w].attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return w;for(var H=0;H<r.length;H++)if(Po(e.attrs,r[H].attrs,["LANGUAGE"]))return H}return-1},l.loadPlaylist=function(e){f.prototype.loadPlaylist.call(this);var r=this.currentTrack;this.shouldLoadPlaylist(r)&&ds(r.url,this.hls)&&this.scheduleLoading(r,e)},l.loadingPlaylist=function(e,r){f.prototype.loadingPlaylist.call(this,e,r);var u=e.id,c=e.groupId,v=this.getUrlWithDirectives(e.url,r),p=e.details,y=null==p?void 0:p.age;this.log("Loading audio-track "+u+' "'+e.name+'" lang:'+e.lang+" group:"+c+(void 0!==(null==r?void 0:r.msn)?" at sn "+r.msn+" part "+r.part:"")+(y&&p.live?" age "+y.toFixed(1)+(p.type?" "+p.type||0:""):"")+" "+v),this.hls.trigger(O.AUDIO_TRACK_LOADING,{url:v,id:u,groupId:c,deliveryDirectives:r||null,track:e})},ce(h,[{key:"allAudioTracks",get:function(){return this.tracks}},{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}}])}(_d),pv=function(){function f(l){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=l}var h=f.prototype;return h.destroy=function(){this.tracks=this.queues=null},h.append=function(i,e,r){if(null!==this.queues&&null!==this.tracks){var u=this.queues[e];u.push(i),1===u.length&&!r&&this.executeNext(e)}},h.appendBlocker=function(i){var e=this;return new Promise(function(r){e.append({label:"async-blocker",execute:r,onStart:function(){},onComplete:function(){},onError:function(){}},i)})},h.prependBlocker=function(i){var e=this;return new Promise(function(r){e.queues&&e.queues[i].unshift({label:"async-blocker-prepend",execute:r,onStart:function(){},onComplete:function(){},onError:function(){}})})},h.removeBlockers=function(){null!==this.queues&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(function(i){var e,r=null==(e=i[0])?void 0:e.label;("async-blocker"===r||"async-blocker-prepend"===r)&&(i[0].execute(),i.splice(0,1))})},h.unblockAudio=function(i){null!==this.queues&&this.queues.audio[0]===i&&this.shiftAndExecuteNext("audio")},h.executeNext=function(i){if(null!==this.queues&&null!==this.tracks){var e=this.queues[i];if(e.length){var r=e[0];try{r.execute()}catch(v){var u;if(r.onError(v),null===this.queues||null===this.tracks)return;var c=null==(u=this.tracks[i])?void 0:u.buffer;null!=c&&c.updating||this.shiftAndExecuteNext(i)}}}},h.shiftAndExecuteNext=function(i){null!==this.queues&&(this.queues[i].shift(),this.executeNext(i))},h.current=function(i){var e;return(null==(e=this.queues)?void 0:e[i][0])||null},h.toString=function(){return null===this.queues||null===this.tracks?"<destroyed>":"\n"+this.list("video")+"\n"+this.list("audio")+"\n"+this.list("audiovideo")+"}"},h.list=function(i){var e,r;return null!=(e=this.queues)&&e[i]||null!=(r=this.tracks)&&r[i]?i+": ("+this.listSbInfo(i)+") "+this.listOps(i):""},h.listSbInfo=function(i){var e,r=null==(e=this.tracks)?void 0:e[i],u=null==r?void 0:r.buffer;return u?"SourceBuffer"+(u.updating?" updating":"")+(r.ended?" ended":"")+(r.ending?" ending":""):"none"},h.listOps=function(i){var e;return(null==(e=this.queues)?void 0:e[i].map(function(r){return r.label}).join(", "))||""},f}(),ko=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,vc="HlsJsTrackRemovedError",Tn=function(f){function h(l){var i;return(i=f.call(this,l)||this).name=vc,i}return xe(h,f),h}(pt(Error)),pc=function(f){function h(i,e){var r;return(r=f.call(this,"buffer-controller",i.logger)||this).hls=void 0,r.fragmentTracker=void 0,r.details=null,r._objectUrl=null,r.operationQueue=null,r.bufferCodecEventsTotal=0,r.media=null,r.mediaSource=null,r.lastMpegAudioChunk=null,r.blockedAudioAppend=null,r.lastVideoAppendEnd=0,r.appendSource=void 0,r.transferData=void 0,r.overrides=void 0,r.appendErrors={audio:0,video:0,audiovideo:0},r.tracks={},r.sourceBuffers=[[null,null],[null,null]],r._onEndStreaming=function(u){var c;r.hls&&"open"===(null==(c=r.mediaSource)?void 0:c.readyState)&&r.hls.pauseBuffer
vendor: 6,212 bytes, line 11
11ing()},r._onStartStreaming=function(u){r.hls&&r.hls.resumeBuffering()},r._onMediaSourceOpen=function(u){var v=r.media,p=r.mediaSource;u&&r.log("Media source opened"),v&&p&&(p.removeEventListener("sourceopen",r._onMediaSourceOpen),v.removeEventListener("emptied",r._onMediaEmptied),r.updateDuration(),r.hls.trigger(O.MEDIA_ATTACHED,{media:v,mediaSource:p}),null!==r.mediaSource&&r.checkPendingTracks())},r._onMediaSourceClose=function(){r.log("Media source closed")},r._onMediaSourceEnded=function(){r.log("Media source ended")},r._onMediaEmptied=function(){var c=r.mediaSrc,v=r._objectUrl;c!==v&&r.error("Media element src was set while attaching MediaSource ("+v+" > "+c+")")},r.hls=i,r.fragmentTracker=e,r.appendSource=function Mr(f){return typeof self<"u"&&f===self.ManagedMediaSource}(Ir(i.config.preferManagedMediaSource)),r.initTracks(),r.registerListeners(),r}xe(h,f);var l=h.prototype;return l.hasSourceTypes=function(){return Object.keys(this.tracks).length>0},l.destroy=function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null},l.registerListeners=function(){var e=this.hls;e.on(O.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(O.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(O.MANIFEST_LOADING,this.onManifestLoading,this),e.on(O.MANIFEST_PARSED,this.onManifestParsed,this),e.on(O.BUFFER_RESET,this.onBufferReset,this),e.on(O.BUFFER_APPENDING,this.onBufferAppending,this),e.on(O.BUFFER_CODECS,this.onBufferCodecs,this),e.on(O.BUFFER_EOS,this.onBufferEos,this),e.on(O.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(O.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(O.FRAG_PARSED,this.onFragParsed,this),e.on(O.FRAG_CHANGED,this.onFragChanged,this),e.on(O.ERROR,this.onError,this)},l.unregisterListeners=function(){var e=this.hls;e.off(O.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(O.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(O.MANIFEST_LOADING,this.onManifestLoading,this),e.off(O.MANIFEST_PARSED,this.onManifestParsed,this),e.off(O.BUFFER_RESET,this.onBufferReset,this),e.off(O.BUFFER_APPENDING,this.onBufferAppending,this),e.off(O.BUFFER_CODECS,this.onBufferCodecs,this),e.off(O.BUFFER_EOS,this.onBufferEos,this),e.off(O.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(O.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(O.FRAG_PARSED,this.onFragParsed,this),e.off(O.FRAG_CHANGED,this.onFragChanged,this),e.off(O.ERROR,this.onError,this)},l.transferMedia=function(){var e=this,r=this.media,u=this.mediaSource;if(!r)return null;var c={};if(this.operationQueue){var v=this.isUpdating();v||this.operationQueue.removeBlockers();var p=this.isQueued();(v||p)&&this.warn("Transfering MediaSource with"+(p?" operations in queue":"")+(v?" updating SourceBuffer(s)":"")+" "+this.operationQueue),this.operationQueue.destroy()}var y=this.transferData;return!this.sourceBufferCount&&y&&y.mediaSource===u?be(c,y.tracks):this.sourceBuffers.forEach(function(T){var E=T[0];E&&(c[E]=be({},e.tracks[E]),e.removeBuffer(E)),T[0]=T[1]=null}),{media:r,mediaSource:u,tracks:c}},l.initTracks=function(){this.sourceBuffers=[[null,null],[null,null]],this.tracks={},this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0},l.onManifestLoading=function(){this.bufferCodecEventsTotal=0,this.details=null},l.onManifestParsed=function(e,r){var u,c=2;(r.audio&&!r.video||!r.altAudio)&&(c=1),this.bufferCodecEventsTotal=c,this.log(c+" bufferCodec event(s) expected."),null!=(u=this.transferData)&&u.mediaSource&&this.sourceBufferCount&&c&&this.bufferCreated()},l.onMediaAttaching=function(e,r){var u=this.media=r.media;this.transferData=this.overrides=void 0;var c=Ir(this.appendSource);if(c){var v=!!r.mediaSource;(v||r.overrides)&&(this.transferData=r,this.overrides=r.overrides);var p=this.mediaSource=r.mediaSource||new c;if(this.assignMediaSource(p),v)this._objectUrl=u.src,this.attachTransferred();else{var y=this._objectUrl=self.URL.createObjectURL(p);if(this.appendSource)try{u.removeAttribute("src");var T=self.ManagedMediaSource;u.disableRemotePlayback=u.disableRemotePlayback||T&&p instanceof T,gc(u),function Sd(f,h){var l=self.document.createElement("source");l.type="video/mp4",l.src=h,f.appendChild(l)}(u,y),u.load()}catch(E){u.src=y}else u.src=y}u.addEventListener("emptied",this._onMediaEmptied)}},l.assignMediaSource=function(e){var r,u;this.log(((null==(r=this.transferData)?void 0:r.mediaSource)===e?"transferred":"created")+" media source: "+(null==(u=e.constructor)?void 0:u.name)),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))},l.attachTransferred=function(){var e=this,r=this.media,u=this.transferData;if(u&&r){var c=this.tracks,v=u.tracks,p=v?Object.keys(v):null,T=function(){Promise.resolve().then(function(){e.media&&e.mediaSourceOpenOrEnded&&e._onMediaSourceOpen()})};if(v&&p&&p&&p.length){if(!this.tracksReady)return this.hls.config.startFragPrefetch=!0,void this.log("attachTransferred: waiting for SourceBuffer track info");if(this.log("attachTransferred: (bufferCodecEventsTotal "+this.bufferCodecEventsTotal+")\nrequired tracks: "+cr(c,function(k,w){return"initSegment"===k?void 0:w})+";\ntransfer tracks: "+cr(v,function(k,w){return"initSegment"===k?void 0:w})+"}"),!rn(v,c)){u.mediaSource=null,u.tracks=void 0;var E=r.currentTime,x=this.details,C=Math.max(E,(null==x?void 0:x.fragments[0].start)||0);return C-E>1?void this.log("attachTransferred: waiting for playback to reach new tracks start time "+E+" -> "+C):(this.warn('attachTransferred: resetting MediaSource for incompatible tracks ("'+Object.keys(v)+'"->"'+Object.keys(c)+'") start time: '+C+" currentTime: "+E),this.onMediaDetaching(O.MEDIA_DETACHING,{}
vendor: 6,394 bytes, line 11
11),this.onMediaAttaching(O.MEDIA_ATTACHING,u),void(r.currentTime=C))}this.transferData=void 0,p.forEach(function(k){var w=k,M=v[w];if(M){var H=M.buffer;if(H){var Y=e.fragmentTracker,j=M.id;if(Y.hasFragments(j)||Y.hasParts(j)){var $=tr.getBuffered(H);Y.detectEvictedFragments(w,$,j,null,!0)}var le=Ro(w);e.sourceBuffers[le]=[w,H],H.updating&&e.operationQueue&&e.operationQueue.prependBlocker(w),e.trackSourceBuffer(w,M)}}}),T(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),T()}},l.onMediaDetaching=function(e,r){var u=this,c=!!r.transferMedia;this.transferData=this.overrides=void 0;var v=this.media,p=this.mediaSource,y=this._objectUrl;if(p){if(this.log("media source "+(c?"transferring":"detaching")),c)this.sourceBuffers.forEach(function(C){var k=C[0];k&&u.removeBuffer(k)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){var T="open"===p.readyState;try{for(var E=p.sourceBuffers,x=E.length;x--;)T&&E[x].abort(),p.removeSourceBuffer(E[x]);T&&p.endOfStream()}catch(C){this.warn("onMediaDetaching: "+C.message+" while calling endOfStream")}}this.sourceBufferCount&&this.onBufferReset()}p.removeEventListener("sourceopen",this._onMediaSourceOpen),p.removeEventListener("sourceended",this._onMediaSourceEnded),p.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(p.removeEventListener("startstreaming",this._onStartStreaming),p.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}v&&(v.removeEventListener("emptied",this._onMediaEmptied),c||(y&&self.URL.revokeObjectURL(y),this.mediaSrc===y?(v.removeAttribute("src"),this.appendSource&&gc(v),v.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(O.MEDIA_DETACHED,r)},l.onBufferReset=function(){var e=this;this.sourceBuffers.forEach(function(r){var u=r[0];u&&e.resetBuffer(u)}),this.initTracks()},l.resetBuffer=function(e){var r,u=null==(r=this.tracks[e])?void 0:r.buffer;if(this.removeBuffer(e),u)try{var c;null!=(c=this.mediaSource)&&c.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(u)}catch(v){this.warn("onBufferReset "+e,v)}delete this.tracks[e]},l.removeBuffer=function(e){this.removeBufferListeners(e),this.sourceBuffers[Ro(e)]=[null,null];var r=this.tracks[e];r&&(r.buffer=void 0)},l.resetQueue=function(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new pv(this.tracks)},l.onBufferCodecs=function(e,r){var c,u=this,v=this.tracks,p=Object.keys(r);this.log('BUFFER_CODECS: "'+p+'" (current SB count '+this.sourceBufferCount+")");var y="audiovideo"in r&&(v.audio||v.video)||v.audiovideo&&("audio"in r||"video"in r),T=!y&&this.sourceBufferCount&&this.media&&p.some(function(E){return!v[E]});y||T?this.warn('Unsupported transition between "'+Object.keys(v)+'" and "'+p+'" SourceBuffers'):(p.forEach(function(E){var x,C,k=r[E],M=k.codec,H=k.levelCodec,Y=k.container,le=v[E],pe=null==(x=u.transferData)||null==(x=x.tracks)?void 0:x[E],Se=null!=pe&&pe.buffer?pe:le,we=(null==Se?void 0:Se.pendingCodec)||(null==Se?void 0:Se.codec),Te=null==Se?void 0:Se.levelCodec;le||(le=v[E]={buffer:void 0,listeners:[],codec:M,supplemental:k.supplemental,container:Y,levelCodec:H,metadata:k.metadata,id:k.id});var oe=Tr(we,Te),fe=null==oe?void 0:oe.replace(ko,"$1"),Ce=Tr(M,H),ze=null==(C=Ce)?void 0:C.replace(ko,"$1");Ce&&oe&&fe!==ze&&("audio"===E.slice(0,5)&&(Ce=Oi(Ce,u.appendSource)),u.log("switching codec "+we+" to "+Ce),Ce!==(le.pendingCodec||le.codec)&&(le.pendingCodec=Ce),le.container=Y,u.appendChangeType(E,Y,Ce))}),(this.tracksReady||this.sourceBufferCount)&&(r.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&(this.bufferCodecEventsTotal>1&&!this.tracks.video&&!r.video&&"main"===(null==(c=r.audio)?void 0:c.id)&&(this.log("Main audio-only"),this.bufferCodecEventsTotal=1),this.mediaSourceOpenOrEnded&&this.checkPendingTracks()))},l.appendChangeType=function(e,r,u){var c=this,v=r+";codecs="+u;this.append({label:"change-type="+v,execute:function(){var T=c.tracks[e];if(T){var E=T.buffer;null!=E&&E.changeType&&(c.log("changing "+e+" sourceBuffer type to "+v),E.changeType(v),T.codec=u,T.container=r)}c.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(T){c.warn("Failed to change "+e+" SourceBuffer type",T)}},e,this.isPending(this.tracks[e]))},l.blockAudio=function(e){var r,u=this,c=e.start,v=c+.05*e.duration;if(!0!==(null==(r=this.fragmentTracker.getAppendedFrag(c,Ie.MAIN))?void 0:r.gap)){var y={label:"block-audio",execute:function(){var E,x=u.tracks.video;(u.lastVideoAppendEnd>v||null!=x&&x.buffer&&tr.isBuffered(x.buffer,v)||!0===(null==(E=u.fragmentTracker.getAppendedFrag(v,Ie.MAIN))?void 0:E.gap))&&(u.blockedAudioAppend=null,u.shiftAndExecuteNext("audio"))},onStart:function(){},onComplete:function(){},onError:function(E){u.warn("Error executing block-audio operation",E)}};this.blockedAudioAppend={op:y,frag:e},this.append(y,"audio",!0)}},l.unblockAudio=function(){var e=this.blockedAudioAppend,r=this.operationQueue;e&&r&&(this.blockedAudioAppend=null,r.unblockAudio(e.op))},l.onBufferAppending=function(e,r){var u=this,c=this.tracks,v=r.data,p=r.type,y=r.parent,T=r.frag,E=r.part,x=r.chunkMeta,C=r.offset,k=x.buffering[p],w=T.sn,M=T.cc,H=self.performance.now();k.start=H;var Y=T.stats.buffering,j=E?E.stats.buffering:null;0===Y.start&&(Y.start=H),j&&0===j.start&&(j.start=H);var $=c.audio,le=!1;"audio"===p&&"audio/mpeg"===(null==$?void 0:$.container)&&(le=!this.lastMpegAudioChunk||1===x.id||this.lastMpegAudioChunk.sn!==x.sn,this.lastMpegAudioChunk=x);var pe=c.video,Se=null==pe?void 0:pe.buffer;if(Se&&"initSegment"!==w){var we=E||T,Te=this.blockedAudioAppend;if("audio"!==p||"main"===y||this.blockedAudioAppend||pe.ending||pe.ended){if("video"===p){var He=we.end;if(Te){var We=Te.frag.start;(He>We||He<this.lastVideoAppendEnd||tr.isBuffered(Se,We))&&this.unblockAudio()}this.lastVideoAppendEnd=He}}else{var fe=we.start+.05*we.duration,Ce=Se.buffered,ze=this.currentOp("video");Ce.length||ze?!ze&&!tr.isBuffered(Se,fe)&&this.lastVideoAppendEnd<fe&&this.blockAudio(we):this.blockAudio(we)}}var vt=(E||T).start,At={label:"append-"+p,execute:function(){var Pt;k.executeStart=self.performance.now();var Ht=null==(Pt=u.tracks[p])?void 0:Pt.buffer;Ht&&(le?u.updateTimestampOffset(Ht,vt,.1,p,w,M):void 0!==C&&X(C)&&u.updateTimestampOffset(Ht,C,1e-6,p,w,M)),u.a
11ppendExecutor(v,p)},onStart:function(){},onComplete:function(){var Pt=self.performance.now();k.executeEnd=k.end=Pt,0===Y.first&&(Y.first=Pt),j&&0===j.first&&(j.first=Pt);var Ht={};u.sourceBuffers.forEach(function(Lt){var bt=Lt[0];bt&&(Ht[bt]=tr.getBuffered(Lt[1]))}),u.appendErrors[p]=0,"audio"===p||"video"===p?u.appendErrors.audiovideo=0:(u.appendErrors.audio=0,u.appendErrors.video=0),u.hls.trigger(O.BUFFER_APPENDED,{type:p,frag:T,part:E,chunkMeta:x,parent:T.type,timeRanges:Ht})},onError:function(Pt){var Ht,Lt={type:Ae.MEDIA_ERROR,parent:T.type,details:ue.BUFFER_APPEND_ERROR,sourceBufferName:p,frag:T,part:E,chunkMeta:x,error:Pt,err:Pt,fatal:!1},bt=null==(Ht=u.media)?void 0:Ht.error;if(Pt.code===DOMException.QUOTA_EXCEEDED_ERR||"QuotaExceededError"==Pt.name||"quota"in Pt)Lt.details=ue.BUFFER_FULL_ERROR;else if(Pt.code===DOMException.INVALID_STATE_ERR&&u.mediaSourceOpenOrEnded&&!bt)Lt.errorAction=zt(!0);else if(Pt.name===vc&&0===u.sourceBufferCount)Lt.errorAction=zt(!0);else{var kt=++u.appendErrors[p];u.warn("Failed "+kt+"/"+u.hls.config.appendErrorMaxRetry+' times to append segment in "'+p+'" sourceBuffer ('+(bt||"no media error")+")"),(kt>=u.hls.config.appendErrorMaxRetry||bt)&&(Lt.fatal=!0)}u.hls.trigger(O.ERROR,Lt)}};this.log('queuing "'+p+'" append sn: '+w+(E?" p: "+E.index:"")+" of "+(T.type===Ie.MAIN?"level":"track")+" "+T.level+" cc: "+M),this.append(At,p,this.isPending(this.tracks[p]))},l.getFlushOp=function(e,r,u){var c=this;return this.log('queuing "'+e+'" remove '+r+"-"+u),{label:"remove",execute:function(){c.removeExecutor(e,r,u)},onStart:function(){},onComplete:function(){c.hls.trigger(O.BUFFER_FLUSHED,{type:e})},onError:function(p){c.warn("Failed to remove "+r+"-"+u+' from "'+e+'" SourceBuffer',p)}}},l.onBufferFlushing=function(e,r){var u=this,c=r.type,v=r.startOffset,p=r.endOffset;c?this.append(this.getFlushOp(c,v,p),c):this.sourceBuffers.forEach(function(y){var T=y[0];T&&u.append(u.getFlushOp(T,v,p),T)})},l.onFragParsed=function(e,r){var u=this,c=r.frag,v=r.part,p=[],y=v?v.elementaryStreams:c.elementaryStreams;y[Kt.AUDIOVIDEO]?p.push("audiovideo"):(y[Kt.AUDIO]&&p.push("audio"),y[Kt.VIDEO]&&p.push("video"));0===p.length&&this.warn("Fragments must have at least one ElementaryStreamType set. type: "+c.type+" level: "+c.level+" sn: "+c.sn),this.blockBuffers(function(){var x=self.performance.now();c.stats.buffering.end=x,v&&(v.stats.buffering.end=x),u.hls.trigger(O.FRAG_BUFFERED,{frag:c,part:v,stats:v?v.stats:c.stats,id:c.type})},p).catch(function(E){u.warn("Fragment buffered callback "+E),u.stepOperationQueue(u.sourceBufferTypes)})},l.onFragChanged=function(e,r){this.trimBuffers()},l.onBufferEos=function(e,r){var c,u=this;this.sourceBuffers.forEach(function(y){var T=y[0];if(T){var E=u.tracks[T];(!r.type||r.type===T)&&(E.ending=!0,E.ended||(E.ended=!0,u.log(T+" buffer reached EOS")))}});var v=!1!==(null==(c=this.overrides)?void 0:c.endOfStream);this.sourceBufferCount>0&&!this.sourceBuffers.some(function(y){var T,E=y[0];return E&&!(null!=(T=u.tracks[E])&&T.ended)})?v?(this.log("Queueing EOS"),this.blockUntilOpen(function(){u.tracksEnded();var y=u.mediaSource;y&&"open"===y.readyState?(u.log("Calling mediaSource.endOfStream()"),y.endOfStream(),u.hls.trigger(O.BUFFERED_TO_END,void 0)):y&&u.log("Could not call mediaSource.endOfStream(). mediaSource.readyState: "+y.readyState)})):(this.tracksEnded(),this.hls.trigger(O.BUFFERED_TO_END,void 0)):"video"===r.type&&this.unblockAudio()},l.tracksEnded=function(){var e=this;this.sourceBuffers.forEach(function(r){var u=r[0];if(null!==u){var c=e.tracks[u];c&&(c.ending=!1)}})},l.onLevelUpdated=function(e,r){var u=r.details;u.fragments.length&&(this.details=u,this.updateDuration())},l.updateDuration=function(){var e=this;this.blockUntilOpen(function(){var r=e.getDurationAndRange();r&&e.updateMediaSource(r)})},l.onError=function(e,r){if(r.details===ue.BUFFER_APPEND_ERROR&&r.frag){var u,c=null==(u=r.errorAction)?void 0:u.nextAutoLevel;X(c)&&c!==r.frag.level&&this.resetAppendErrors()}},l.resetAppendErrors=function(){this.appendErrors={audio:0,video:0,audiovideo:0}},l.trimBuffers=function(){var r=this.details,u=this.media;if(u&&null!==r&&this.sourceBufferCount){var c=this.hls.config,v=u.currentTime,p=r.levelTargetDuration,y=r.live&&null!==c.liveBackBufferLength?c.liveBackBufferLength:c.backBufferLength;if(X(y)&&y>=0){var T=Math.max(y,p),E=Math.floor(v/p)*p-T;this.flushBackBuffer(v,p,E)}var x=c.frontBufferFlushThreshold;if(X(x)&&x>0){var C=Math.max(c.maxBufferLength,x),k=Math.max(C,p),w=Math.floor(v/p)*p+k;this.flushFrontBuffer(v,p,w)}}},l.flushBackBuffer=function(e,r,u){var c=this;
vendor: 6,088 bytes, line 11
11this.sourceBuffers.forEach(function(v){var p=v[0],y=v[1];if(y){var T=tr.getBuffered(y);if(T.length>0&&u>T.start(0)){var E;c.hls.trigger(O.BACK_BUFFER_REACHED,{bufferEnd:u});var x=c.tracks[p];if(null!=(E=c.details)&&E.live)c.hls.trigger(O.LIVE_BACK_BUFFER_REACHED,{bufferEnd:u});else if(null!=x&&x.ended)return void c.log("Cannot flush "+p+" back buffer while SourceBuffer is in ended state");c.hls.trigger(O.BUFFER_FLUSHING,{startOffset:0,endOffset:u,type:p})}}})},l.flushFrontBuffer=function(e,r,u){var c=this;this.sourceBuffers.forEach(function(v){var p=v[0],y=v[1];if(y){var T=tr.getBuffered(y),E=T.length;if(E<2)return;var x=T.start(E-1),C=T.end(E-1);if(u>x||e>=x&&e<=C)return;c.hls.trigger(O.BUFFER_FLUSHING,{startOffset:x,endOffset:1/0,type:p})}})},l.getDurationAndRange=function(){var e,r=this.details,u=this.mediaSource;if(!r||!this.media||"open"!==(null==u?void 0:u.readyState))return null;var c=r.edge;if(r.live&&this.hls.config.liveDurationInfinity){if(r.fragments.length&&u.setLiveSeekableRange){var p=Math.max(0,r.fragmentStart);return{duration:1/0,start:p,end:Math.max(p,c)}}return{duration:1/0}}var T=null==(e=this.overrides)?void 0:e.duration;if(T)return X(T)?{duration:T}:null;var E=this.media.duration;return c>(X(u.duration)?u.duration:0)&&c>E||!X(E)?{duration:c}:null},l.updateMediaSource=function(e){var r=e.duration,u=e.start,c=e.end,v=this.mediaSource;!this.media||!v||"open"!==v.readyState||(v.duration!==r&&(X(r)&&this.log("Updating MediaSource duration to "+r.toFixed(3)),v.duration=r),void 0!==u&&void 0!==c&&(this.log("MediaSource duration is set to "+v.duration+". Setting seekable range to "+u+"-"+c+"."),v.setLiveSeekableRange(u,c)))},l.checkPendingTracks=function(){if(this.log("checkPendingTracks (pending: "+this.pendingTrackCount+" codec events expected: "+this.bufferCodecEventsTotal+") "+cr(this.tracks)),this.tracksReady){var c,v=null==(c=this.transferData)?void 0:c.tracks;v&&Object.keys(v).length?this.attachTransferred():this.createSourceBuffers()}},l.bufferCreated=function(){var e=this;if(this.sourceBufferCount){var r={};this.sourceBuffers.forEach(function(c){var v=c[0];if(v){var y=e.tracks[v];r[v]={buffer:c[1],container:y.container,codec:y.codec,supplemental:y.supplemental,levelCodec:y.levelCodec,id:y.id,metadata:y.metadata}}}),this.hls.trigger(O.BUFFER_CREATED,{tracks:r}),this.log("SourceBuffers created. Running queue: "+this.operationQueue),this.sourceBuffers.forEach(function(c){e.executeNext(c[0])})}else{var u=new Error("could not create source buffer for media codec(s)");this.hls.trigger(O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:u,reason:u.message})}},l.createSourceBuffers=function(){var e=this.tracks,r=this.sourceBuffers,u=this.mediaSource;if(!u)throw new Error("createSourceBuffers called when mediaSource was null");for(var c in e){var v=c,p=e[v];if(this.isPending(p)){var y=this.getTrackCodec(p,v),T=p.container+";codecs="+y;p.codec=y,this.log("creating sourceBuffer("+T+")"+(this.currentOp(v)?" Queued":"")+" "+cr(p));try{var E=u.addSourceBuffer(T);r[Ro(v)]=[v,E],p.buffer=E}catch(w){var k;return this.error("error while trying to add sourceBuffer: "+w.message),this.shiftAndExecuteNext(v),null==(k=this.operationQueue)||k.removeBlockers(),delete this.tracks[v],void this.hls.trigger(O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:w,sourceBufferName:v,mimeType:T,parent:p.id})}this.trackSourceBuffer(v,p)}}this.bufferCreated()},l.getTrackCodec=function(e,r){var u=e.supplemental,c=e.codec;u&&("video"===r||"audiovideo"===r)&&$r(u,"video")&&(c=function Nn(f,h){var l=[];if(f)for(var i=f.split(","),e=0;e<i.length;e++)dr(i[e],"video")||l.push(i[e]);return h&&l.push(h),l.join(",")}(c,u));var v=Tr(c,e.levelCodec);return v?"audio"===r.slice(0,5)?Oi(v,this.appendSource):v:""},l.trackSourceBuffer=function(e,r){var u=this,c=r.buffer;if(c){var v=this.getTrackCodec(r,e);this.tracks[e]={buffer:c,codec:v,container:r.container,levelCodec:r.levelCodec,supplemental:r.supplemental,metadata:r.metadata,id:r.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",function(p,y){var T=y.removedRanges;null!=T&&T.length&&u.hls.trigger(O.BUFFER_FLUSHED,{type:p})})}},l.onSBUpdateStart=function(e){var r=this.currentOp(e);r&&r.onStart()},l.onSBUpdateEnd=function(e){var r;if("closed"!==(null==(r=this.mediaSource)?void 0:r.readyState)){var u=this.currentOp(e);u&&(u.onComplete(),this.shiftAndExecuteNext(e))}else this.resetBuffer(e)},l.onSBUpdateError=function(e,r){var u,c=new Error(e+" SourceBuffer error. MediaSource readyState: "+(null==(u=this.mediaSource)?void 0:u.readyState));this.error(""+c,r),this.hls.trigger(O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:c,fatal:!1});var v=this.currentOp(e);v&&v.onError(c)},l.updateTimestampOffset=function(e,r,u,c,v,p){Math.abs(r-e.timestampOffset)>=u&&(this.log("Updating "+c+" SourceBuffer timestampOffset to "+r+" (sn: "+v+" cc: "+p+")"),e.timestampOffset=r)},l.removeExecutor=function(e,r,u){var c=this.media,v=this.mediaSource,p=this.tracks[e],y=null==p?void 0:p.buffer;if(!c||!v||!y)return this.warn("Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void this.shiftAndExecuteNext(e);var T=X(c.duration)?c.duration:1/0,E=X(v.duration)?v.duration:1/0,x=Math.max(0,r),C=Math.min(u,T,E);C>x&&(!p.ending||p.ended)?(p.ended=!1,this.log("Removing ["+x+","+C+"] from the "+e+" SourceBuffer"),y.remove(x,C)):this.shiftAndExecuteNext(e)},l.appendExecutor=function(e,r){var u=this.tracks[r],c=null==u?void 0:u.buffer;if(!c)throw new Tn("Attempting to append to the "+r+" SourceBuffer, but it does not exist");u.ending=!1,u.ended=!1,c.appendBuffer(e)},l.blockUntilOpen=function(e){var r=this;if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch(function(u){r.warn("SourceBuffer blocked callback "+u),r.stepOperation
11Queue(r.sourceBufferTypes)});else try{e()}catch(u){this.warn("Callback run without blocking "+this.operationQueue+" "+u)}},l.isUpdating=function(){return this.sourceBuffers.some(function(e){return e[0]&&e[1].updating})},l.isQueued=function(){var e=this;return this.sourceBuffers.some(function(r){var u=r[0];return u&&!!e.currentOp(u)})},l.isPending=function(e){return!!e&&!e.buffer},l.blockBuffers=function(e,r){var u=this;if(void 0===r&&(r=this.sourceBufferTypes),!r.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);var c=this.operationQueue,v=r.map(function(y){return u.appendBlocker(y)});return r.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(v).then(function(y){c===u.operationQueue&&(e(),u.stepOperationQueue(u.sourceBufferTypes))})},l.stepOperationQueue=function(e){var r=this;e.forEach(function(u){var c,v=null==(c=r.tracks[u])?void 0:c.buffer;!v||v.updating||r.shiftAndExecuteNext(u)})},l.append=function(e,r,u){this.operationQueue&&this.operationQueue.append(e,r,u)},l.appendBlocker=function(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)},l.currentOp=function(e){return this.operationQueue?this.operationQueue.current(e):null},l.executeNext=function(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)},l.shiftAndExecuteNext=function(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)},l.addBufferListener=function(e,r,u){var c=this.tracks[e];if(c){var v=c.buffer;if(v){var p=u.bind(this,e);c.listeners.push({event:r,listener:p}),v.addEventListener(r,p)}}},l.removeBufferListeners=function(e){var r=this.tracks[e];if(r){var u=r.buffer;u&&(r.listeners.forEach(function(c){u.removeEventListener(c.event,c.listener)}),r.listeners.length=0)}},ce(h,[{key:"mediaSourceOpenOrEnded",get:function(){var e,r=null==(e=this.mediaSource)?void 0:e.readyState;return"open"===r||"ended"===r}},{key:"sourceBufferTracks",get:function(){var e=this;return Object.keys(this.tracks).reduce(function(r,u){var c=e.tracks[u];return r[u]={id:c.id,container:c.container,codec:c.codec,levelCodec:c.levelCodec},r},{})}},{key:"bufferedToEnd",get:function(){var e=this;return this.sourceBufferCount>0&&!this.sourceBuffers.some(function(r){var u=r[0];if(u){var c=e.tracks[u];if(c)return!c.ended||c.ending}return!1})}},{key:"tracksReady",get:function(){var e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}},{key:"mediaSrc",get:function(){var e,r,u=(null==(e=this.media)||null==(r=e.querySelector)?void 0:r.call(e,"source"))||this.media;return null==u?void 0:u.src}},{key:"pendingTrackCount",get:function(){var e=this;return Object.keys(this.tracks).reduce(function(r,u){return r+(e.isPending(e.tracks[u])?1:0)},0)}},{key:"sourceBufferCount",get:function(){return this.sourceBuffers.reduce(function(e,r){return e+(r[0]?1:0)},0)}},{key:"sourceBufferTypes",get:function(){return this.sourceBuffers.map(function(e){return e[0]}).filter(function(e){return!!e})}}])}(Ze);function gc(f){var h=f.querySelectorAll("source");[].slice.call(h).forEach(function(l){f.removeChild(l)})}function Ro(f){return"audio"===f?1:0}var gv=function(){function f(l){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=l,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var h=f.prototype;return h.setStreamController=function(i){this.streamController=i},h.destroy=function(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},h.registerListeners=function(){var i=this.hls;i.on(O.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.on(O.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(O.MANIFEST_PARSED,this.onManifestParsed,this),i.on(O.LEVELS_UPDATED,this.onLevelsUpdated,this),i.on(O.BUFFER_CODECS,this.onBufferCodecs,this),i.on(O.MEDIA_DETACHING,this.onMediaDetaching,this)},h.unregisterListener=function(){var i=this.hls;i.off(O.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.off(O.MEDIA_ATTA
vendor: 3,366 bytes, line 11
11CHING,this.onMediaAttaching,this),i.off(O.MANIFEST_PARSED,this.onManifestParsed,this),i.off(O.LEVELS_UPDATED,this.onLevelsUpdated,this),i.off(O.BUFFER_CODECS,this.onBufferCodecs,this),i.off(O.MEDIA_DETACHING,this.onMediaDetaching,this)},h.onFpsDropLevelCapping=function(i,e){var r=this.hls.levels[e.droppedLevel];this.isLevelAllowed(r)&&this.restrictedLevels.push({bitrate:r.bitrate,height:r.height,width:r.width})},h.onMediaAttaching=function(i,e){this.media=e.media instanceof HTMLVideoElement?e.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()},h.onManifestParsed=function(i,e){var r=this.hls;this.restrictedLevels=[],this.firstLevel=e.firstLevel,r.config.capLevelToPlayerSize&&e.video&&this.startCapping()},h.onLevelsUpdated=function(i,e){this.timer&&X(this.autoLevelCapping)&&this.detectPlayerSize()},h.onBufferCodecs=function(i,e){this.hls.config.capLevelToPlayerSize&&e.video&&this.startCapping()},h.onMediaDetaching=function(){this.stopCapping(),this.media=null},h.detectPlayerSize=function(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0)return void(this.clientRect=null);var i=this.hls.levels;if(i.length){var e=this.hls,r=this.getMaxLevel(i.length-1);r!==this.autoLevelCapping&&e.logger.log("Setting autoLevelCapping to "+r+": "+i[r].height+"p@"+i[r].bitrate+" for media "+this.mediaWidth+"x"+this.mediaHeight),e.autoLevelCapping=r,e.autoLevelEnabled&&e.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},h.getMaxLevel=function(i){var e=this,r=this.hls.levels;if(!r.length)return-1;var u=r.filter(function(c,v){return e.isLevelAllowed(c)&&v<=i});return this.clientRect=null,f.getMaxLevelByMediaSize(u,this.mediaWidth,this.mediaHeight)},h.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},h.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},h.getDimensions=function(){if(this.clientRect)return this.clientRect;var i=this.media,e={width:0,height:0};if(i){var r=i.getBoundingClientRect();e.width=r.width,e.height=r.height,!e.width&&!e.height&&(e.width=r.right-r.left||i.width||0,e.height=r.bottom-r.top||i.height||0)}return this.clientRect=e,e},h.isLevelAllowed=function(i){return!this.restrictedLevels.some(function(r){return i.bitrate===r.bitrate&&i.width===r.width&&i.height===r.height})},f.getMaxLevelByMediaSize=function(i,e,r){if(null==i||!i.length)return-1;for(var c=i.length-1,v=Math.max(e,r),p=0;p<i.length;p+=1){var y=i[p];if((y.width>=v||y.height>=v)&&(E=y,!(x=i[p+1])||E.width!==x.width||E.height!==x.height)){c=p;break}}var E,x;return c},ce(f,[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var i=1;if(!this.hls.config.ignoreDevicePixelRatio)try{i=self.devicePixelRatio}catch(e){}return Math.min(i,this.hls.config.maxDevicePixelRatio)}}])}(),kr={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",
11KEY:"k",OTHER:"o"},yv_HLS="h",ba=function f(h,l){Array.isArray(h)&&(h=h.map(function(i){return i instanceof f?i:new f(i)})),this.value=h,this.params=l},yc="Dict";function Tv(f,h,l,i){return new Error("failed to "+f+' "'+function bd(f){return Array.isArray(f)?JSON.stringify(f):f instanceof Map?"Map{}":f instanceof Set?"Set{}":"object"==typeof f?JSON.stringify(f):String(f)}(h)+'" as '+l,{cause:i})}function jn(f,h,l){return Tv("serialize",f,h,l)}var ja=function(h){this.description=h},qa="Bare Item",xd="Boolean";var Cd="Byte Sequence";function Ev(f){if(!1===ArrayBuffer.isView(f))throw jn(f,Cd);return":"+function _v(f){return btoa(String.fromCharCode.apply(String,f))}(f)+":"}var Tc="Integer";function Hu(f){if(function Vu(f){return f<-999999999999999||999999999999999<f}(f))throw jn(f,Tc);return f.toString()}function _c(f,h){if(f<0)return-_c(-f,h);var l=Math.pow(10,h);if(Math.abs(f*l%1-.5)<Number.EPSILON){var e=Math.floor(f*l);return(e%2==0?e:e+1)/l}return Math.round(f*l)/l}var Sv="Decimal";function Ld(f){var h=_c(f,3);if(Math.floor(Math.abs(h)).toString().length>12)throw jn(f,Sv);var l=h.toString();return l.includes(".")?l:l+".0"}var Ec="String",Gu=/[\x00-\x1f\x7f]+/;var bc="Token";function Pd(f){var h=function Dd(f){return f.description||f.toString().slice(7,-1)}(f);if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(h))throw jn(h,bc);return h}function Ku(f){switch(typeof f){case"number":if(!X(f))throw jn(f,qa);return Number.isInteger(f)?Hu(f):Ld(f);case"string":return function Sc(f){if(Gu.test(f))throw jn(f,Ec);return'"'+f.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}(f);case"symbol":return Pd(f);case"boolean":return function Ad(f){if("boolean"!=typeof f)throw jn(f,xd);return f?"?1":"?0"}(f);case"object":if(f instanceof Date)return function Id(f){return"@"+Hu(f.getTime()/1e3)}(f);if(f instanceof Uint8Array)return Ev(f);if(f instanceof ja)return Pd(f);default:throw jn(f,qa)}}var bv="Key";function kd(f){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(f))throw jn(f,bv);return f}function Rd(f){return null==f?"":Object.entries(f).map(function(h){var l=h[0],i=h[1];return!0===i?";"+kd(l):";"+kd(l)+"="+Ku(i)}).join("")}function wd(f){return f instanceof ba?""+Ku(f.value)+Rd(f.params):Ku(f)}function xc(f,h){if(void 0===h&&(h={whitespace:!0}),"object"!=typeof f||null==f)throw jn(f,yc);var l=f instanceof Map?f.entries():Object.entries(f),i=null!=h&&h.whitespace?" ":"";return Array.from(l).map(function(e){var r=e[0],u=e[1];u instanceof ba||(u=new ba(u));var c=kd(r);return!0===u.value?c+=Rd(u.params):(c+="=",Array.isArray(u.value)?c+=function ju(f){return"("+f.value.map(wd).join(" ")+")"+Rd(f.params)}(u):c+=wd(u)),c}).join(","+i)}function Ac(f,h){return xc(f,h)}var Ln="CMCD-Object",Hr="CMCD-Request",xa="CMCD-Session",qn="CMCD-Status",Od={br:Ln,ab:Ln,d:Ln,ot:Ln,tb:Ln,tpb:Ln,lb:Ln,tab:Ln,lab:Ln,url:Ln,pb:Hr,bl:Hr,tbl:Hr,dl:Hr,ltc:Hr,mtp:Hr,nor:Hr,nrr:Hr,rc:Hr,sn:Hr,sta:Hr,su:Hr,ttfb:Hr,ttfbb:Hr,ttlb:Hr,cmsdd:Hr,cmsds:Hr,smrt:Hr,df:Hr,cs:Hr,ts:Hr,cid:xa,pr:xa,sf:xa,sid:xa,st:xa,v:xa,msd:xa,bs:qn,bsd:qn,cdn:qn,rtp:qn,bg:qn,pt:qn,ec:qn,e:qn},xv={REQUEST:Hr};function Oo(f,h){var l={};if(!f)return l;var i=Object.keys(f),e=h?function wo(f){return Object.keys(f).reduce(function(h,l){var i;return null===(i=f[l])||void 0===i||i.forEach(function(e){return h[e]=l}),h},{})}(h):{};return i.reduce(function(r,u){var c,v=Od[u]||e[u]||xv.REQUEST;return(null!==(c=r[v])&&void 0!==c?c:r[v]={})[u]=f[u],r},l)}var Md="event";var Os=function(h){return Math.round(h)},Mo=function(h,l){return Array.isArray(h)?h.map(function(i){return Mo(i,l)}):h instanceof ba&&"string"==typeof h.value?new ba(Mo(h.value,l),h.params):(l.baseUrl&&(h=function Fd(f,h){var l=new URL(f),i=new URL(h);if(l.origin!==i.origin)return f;for(var e=l.pathname.split("/").slice(1),r=i.pathname.split("/").slice(1,-1);e[0]===r[0];)e.shift(),r.shift();for(;r.length;)r.shift(),e.unshift("..");return e.join("/")+l.search+l.hash}(h,l.baseUrl)),1===l.version?encodeURIComponent(h):h)},Ms=function(h){return 100*Os(h/100)},Ic={br:Os,d:Os,bl:Ms,dl:Ms,mtp:Ms,nor:function(h,l){var i=h;return l.version>=2&&(h instanceof ba&&"string"==typeof h.value?i=new ba([h]):"string"==typeof h&&(i=[h])),Mo(i,l)},rtp:Ms,tb:Os}
vendor: 15,092 bytes, line 11
11,qu="request",Bd="response",Wu=["ab","bg","bl","br","bs","bsd","cdn","cid","cs","df","ec","lab","lb","ltc","msd","mtp","pb","pr","pt","sf","sid","sn","st","sta","tab","tb","tbl","tpb","ts","v"],Ud=["e"],Lc=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function Fo(f){return Lc.test(f)}var No=["d","dl","nor","ot","rtp","su"];var Vd=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];var kc=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function Rc(f){return kc.includes(f)||Fo(f)}var Fs,wc=((Fs={})[Bd]=function Pc(f){return Wu.includes(f)||No.includes(f)||Vd.includes(f)||Fo(f)},Fs[Md]=function Av(f){return Wu.includes(f)||Ud.includes(f)||Fo(f)},Fs[qu]=function Dc(f){return Wu.includes(f)||No.includes(f)||Fo(f)},Fs);function Hd(f,h){void 0===h&&(h={});var l={};if(null==f||"object"!=typeof f)return l;var i=h.version||f.v||1,e=h.reportingMode||qu,r=1===i?Rc:wc[e],u=Object.keys(f).filter(r),c=h.filter;"function"==typeof c&&(u=u.filter(c));var v=e===Bd||e===Md;v&&!u.includes("ts")&&u.push("ts"),i>1&&!u.includes("v")&&u.push("v");var p=be({},Ic,h.formatters),y={version:i,reportingMode:e,baseUrl:h.baseUrl};return u.sort().forEach(function(T){var E=f[T],x=p[T];if("function"==typeof x&&(E=x(E,y)),"v"===T){if(1===i)return;E=i}"pr"==T&&1===E||(v&&"ts"===T&&!X(E)&&(E=Date.now()),function ws(f){return"number"==typeof f?X(f):null!=f&&""!==f&&!1!==f}(E)&&(function Cc(f){return["ot","sf","st","e","sta"].includes(f)}(T)&&"string"==typeof E&&(E=new ja(E)),l[T]=E))}),l}function Mc(f,h,l){return be(f,function Oc(f,h){void 0===h&&(h={});var l={};if(!f)return l;var e=Oo(Hd(f,h),null==h?void 0:h.customHeaderMap);return Object.entries(e).reduce(function(r,u){var c=u[0],p=Ac(u[1],{whitespace:!1});return p&&(r[c]=p),r},l)}(h,l))}var Gd="CMCD";function Fc(f,h){if(void 0===h&&(h={}),!f)return"";var l=function Kd(f,h){return void 0===h&&(h={}),f?Ac(Hd(f,h),{whitespace:!1}):""}(f,h);return encodeURIComponent(l)}var jd=/CMCD=[^&#]+/;function Cv(f,h,l){var i=function Wa(f,h){if(void 0===h&&(h={}),!f)return"";var l=Fc(f,h);return Gd+"="+l}(h,l);if(!i)return f;if(jd.test(f))return f.replace(jd,i);var e=f.includes("?")?"&":"?";return""+f+e+i}var Iv=function(){function f(l){var i=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){i.initialized&&(i.starved=!0),i.buffering=!0},this.onPlaying=function(){i.initialized||(i.initialized=!0),i.buffering=!1},this.applyPlaylistData=function(u){try{i.apply(u,{ot:kr.MANIFEST,su:!i.initialized})}catch(c){i.hls.logger.warn("Could not generate manifest CMCD data.",c)}},this.applyFragmentData=function(u){try{var c=u.frag,v=u.part,p=i.hls.levels[c.level],y=i.getObjectType(c),T={d:1e3*(v||c).duration,ot:y};(y===kr.VIDEO||y===kr.AUDIO||y==kr.MUXED)&&(T.br=p.bitrate/1e3,T.tb=i.getTopBandwidth(y)/1e3,T.bl=i.getBufferLength(y));var E=v?i.getNextPart(v):i.getNextFrag(c);null!=E&&E.url&&E.url!==c.url&&(T.nor=E.url),i.apply(u,T)}catch(x){i.hls.logger.warn("Could not generate segment CMCD data.",x)}},this.hls=l;var e=this.config=l.config,r=e.cmcd;null!=r&&(e.pLoader=this.createPlaylistLoader(),e.fLoader=this.createFragmentLoader(),this.sid=r.sessionId||l.sessionId,this.cid=r.contentId,this.useHeaders=!0===r.useHeaders,this.includeKeys=r.includeKeys,this.registerListeners())}var h=f.prototype;return h.registerListeners=function(){var i=this.hls;i.on(O.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(O.MEDIA_DETACHED,this.onMediaDetached,this),i.on(O.BUFFER_CREATED,this.onBufferCreated,this)},h.unregisterListeners=function(){var i=this.hls;i.off(O.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(O.MEDIA_DETACHED,this.onMediaDetached,this),i.off(O.BUFFER_CREATED,this.onBufferCreated,this)},h.destroy=function(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null},h.onMediaAttached=function(i,e){this.media=e.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},h.onMediaDetached=function(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)},h.onBufferCreated=function(i,e){var r,u;this.audioBuffer=null==(r=e.tracks.audio)?void 0:r.buffer,this.videoBuffer=null==(u=e.tracks.video)?void 0:u.buffer},h.createData=function(){var i;return{v:1,sf:yv_HLS,sid:this.sid,cid:this.cid,pr:null==(i=this.media)?void 0:i.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},h.apply=function(i,e){void 0===e&&(e={}),be(e,this.createData()),this.starved&&(e.ot===kr.INIT||e.ot===kr.VIDEO||e.ot===kr.MUXED)&&(e.bs=!0,e.su=!0,this.starved=!1),null==e.su&&(e.su=this.buffering);var u=this.includeKeys;u&&(e=Object.keys(e).reduce(function(v,p){return u.includes(p)&&(v[p]=e[p]),v},{}));var c={baseUrl:i.url};this.useHeaders?(i.headers||(i.headers={}),Mc(i.headers,e,c)):i.url=Cv(i.url,e,c)},h.getNextFrag=function(i){var e,r=null==(e=this.hls.levels[i.level])?void 0:e.details;if(r)return r.fragments[i.sn-r.startSN+1]},h.getNextPart=function(i){var e,r=i.index,u=i.fragment,c=null==(e=this.hls.levels[u.level])||null==(e=e.details)?void 0:e.partList;if(c)for(var v=u.sn,p=c.length-1;p>=0;p--){var y=c[p];if(y.index===r&&y.fragment.sn===v)return c[p+1]}},h.getObjectType=function(i){var e=i.type;return"subtitle"===e?kr.TIMED_TEXT:"initSegment"===i.sn?kr.INIT:"audio"===e?kr.AUDIO:"main"===e?this.hls.audioTracks.length?kr.VIDEO:kr.MUXED:void 0},h.getTopBandwidth=function(i){var r,e=0,u=this.hls;if(i===kr.AUDIO)r=u.audioTracks;else{var c=u.maxAutoLevel;r=u.levels.slice(0,c>-1?c+1:u.levels.length)}return r.forEach(function(p){p.bitrate>e&&(e=p.bitrate)}),e>0?e:NaN},h.getBufferLength=function(i){var e=this.media,r=i===kr.AUDIO?this.audioBuffer:this.videoBuffer;return r&&e?1e3*tr.bufferInfo(r,e.currentTime,this.config.maxBufferHole).len:NaN},h.createPlaylistLoader=function(){var e=this.applyPlaylistData,r=this.config.pLoader||this.config.loader;return function(){function u(v){this.loader=void 0,this.loader=new r(v)}var c=u.prototype;return c.destroy=function(){this.loader.destroy()},c.abort=function(){this.loader.abort()},c.load=function(p,y,T){e(p),this.loader.load(p,y,T)},ce(u,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}])}()},h.createFragmentLoader=function(){var e=this.applyFragmentData,r=this.config.fLoader||this.config.loader;return function(){function u(v){this.loader=void 0,this.loader=new r(v)}var c=u.prototype;return c.destroy=function(){this.loader.destroy()},c.abort=function(){this.loader.abort()},c.load=function(p,y,T){e(p),this.loader.load(p,y,T)},ce(u,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}])}()},f}(),Dv=function(f){function h(i){var e;return(e=f.call(this,"content-steering",i.logger)||this).hls=void 0,e.loader=null,e.uri=null,e.pathwayId=".",e._pathwayPriority=null,e.timeToLoad=300,e.reloadTimer=-1,e.updated=0,e.started=!1,e.enabled=!0,e.levels=null,e.audioTracks=null,e.subtitleTracks=null,e.penalizedPathways={},e.hls=i,e.registerListeners(),e}xe(h,f);var l=h.prototype;return l.registerListeners=function(){var e=this.hls;e.on(O.MANIFEST_LOADING,this.onManifestLoading,this),e.on(O.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(O.MANIFEST_PARSED,this.onManifestParsed,this),e.on(O.ERROR,this.onError,this)},l.unregisterListeners=function(){var e=this.hls;e&&(e.off(O.MANIFEST_LOADING,this.onManifestLoading,this),e.off(O.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(O.MANIFEST_PARSED,this.onManifestParsed,this),e.off(O.ERROR,this.onError,this))},l.pathways=function(){return(this.levels||[]).reduce(function(e,r){return-1===e.indexOf(r.pathwayId)&&e.push(r.pathwayId),e},[])},l.startLoad=function(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){var e=1e3*this.timeToLoad-(performance.now()-this.updated);if(e>0)return void this.scheduleRefresh(this.uri,e)}this.loadSteeringManifest(this.uri)}},l.stopLoad=function(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()},l.clearTimeout=function(){-1!==this.reloadTimer&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)},l.destroy=function(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null},l.removeLevel=function(e){var r=this.levels;r&&(this.levels=r.filter(function(u){return u!==e}))},l.onManifestLoading=function(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null},l.onManifestLoaded=function(e,r){var u=r.contentSteering;null!==u&&(this.pathwayId=u.pathwayId,this.uri=u.uri,this.started&&this.startLoad())},l.onManifestParsed=function(e,r){this.audioTracks=r.audioTracks,this.subtitleTracks=r.subtitleTracks},l.onError=function(e,r){var u=r.errorAction;if((null==u?void 0:u.action)===lt.SendAlternateToPenaltyBox&&u.flags===ot.MoveAllAlternatesMatchingHost){var c=this.levels,v=this._pathwayPriority,p=this.pathwayId;if(r.context){var y=r.context,T=y.groupId,E=y.pathwayId;T&&c?p=this.getPathwayForGroupId(T,y.type,p):E&&(p=E)}p in this.penalizedPathways||(this.penalizedPathways[p]=performance.now()),!v&&c&&(v=this.pathways()),v&&v.length>1&&(this.updatePathwayPriority(v),u.resolved=this.pathwayId!==p),r.details!==ue.BUFFER_APPEND_ERROR||r.fatal?u.resolved||this.warn("Could not resolve "+r.details+' ("'+r.error.message+'") with content-steering for Pathway: '+p+" levels: "+(c&&c.length)+" priorities: "+cr(v)+" penalized: "+cr(this.penalizedPathways)):u.resolved=!0}},l.filterParsedLevels=function(e){this.levels=e;var r=this.getLevelsForPathway(this.pathwayId);if(0===r.length){var u=e[0].pathwayId;this.log("No levels found in Pathway "+this.pathwayId+'. Setting initial Pathway to "'+u+'"'),r=this.getLevelsForPathway(u),this.pathwayId=u}return r.length!==e.length&&this.log("Found "+r.length+"/"+e.length+' levels in Pathway "'+this.pathwayId+'"'),r},l.getLevelsForPathway=function(e){return null===this.levels?[]:this.levels.filter(function(r){return e===r.pathwayId})},l.updatePathwayPriority=function(e){this._pathwayPriority=e;var r,u=this.penalizedPathways,c=performance.now();Object.keys(u).forEach(function(x){c-u[x]>3e5&&delete u[x]});for(var v=0;v<e.length;v++){var p=e[v];if(!(p in u)){if(p===this.pathwayId)return;var y=this.hls.nextLoadLevel,T=this.hls.levels[y];if((r=this.getLevelsForPathway(p)).length>0){this.log('Setting Pathway to "'+p+'"'),this.pathwayId=p,Es(r),this.hls.trigger(O.LEVELS_UPDATED,{levels:r});var E=this.hls.levels[y];T&&E&&this.levels&&(E.attrs["STABLE-VARIANT-ID"]!==T.attrs["STABLE-VARIANT-ID"]&&E.bitrate!==T.bitrate&&this.log("Unstable Pathways change from bitrate "+T.bitrate+" to "+E.bitrate),this.hls.nextLoadLevel=y);break}}}},l.getPathwayForGroupId=function(e,r,u){for(var c=this.getLevelsForPathway(u).concat(this.levels||[]),v=0;v<c.length;v++)if(r===Qe.AUDIO_TRACK&&c[v].hasAudioGroup(e)||r===Qe.SUBTITLE_TRACK&&c[v].hasSubtitleGroup(e))return c[v].pathwayId;return u},l.clonePathways=function(e){var r=this,u=this.levels;if(u){var c={},v={};e.forEach(function(p){var y=p.ID,T=p["BASE-ID"],E=p["URI-REPLACEMENT"];if(!u.some(function(C){return C.pathwayId===y})){var x=r.getLevelsForPathway(T).map(function(C){var k=new Zr(C.attrs);k["PATHWAY-ID"]=y;var w=k.AUDIO&&k.AUDIO+"_clone_"+y,M=k.SUBTITLES&&k.SUBTITLES+"_clone_"+y;w&&(c[k.AUDIO]=w,k.AUDIO=w),M&&(v[k.SUBTITLES]=M,k.SUBTITLES=M);var H=Bc(C.uri,k["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",E),Y=new wa({attrs:k,audioCodec:C.audioCodec,bitrate:C.bitrate,height:C.height,name:C.name,url:H,videoCodec:C.videoCodec,width:C.width});if(C.audioGroups)for(var j=1;j<C.audioGroups.length;j++)Y.addGroupId("audio",C.audioGroups[j]+"_clone_"+y);if(C.subtitleGroups)for(var $=1;$<C.subtitleGroups.length;$++)Y.addGroupId("text",C.subtitleGroups[$]+"_clone_"+y);return Y});u.push.apply(u,x),Nc(r.audioTracks,c,E,y),Nc(r.subtitleTracks,v,E,y)}})}},l.loadSteeringManifest=function(e){var v,r=this,u=this.hls.config,c=u.loader;this.loader&&this.loader.destroy(),this.loader=new c(u);try{v=new self.URL(e)}catch(k){return this.enabled=!1,void this.log("Failed to parse Steering Manifest URI: "+e)}if("data:"!==v.protocol){var p=0|(this.hls.bandwidthEstimate||u.abrEwmaDefaultEstimate);v.searchParams.set("_HLS_pathway",this.pathwayId),v.searchParams.set("_HLS_throughput",""+p)}var y={responseType:"json",url:v.href},T=u.steeringManifestLoadPolicy.default,E=T.errorRetry||T.timeoutRetry||{},x={loadPolicy:T,timeout:T.maxLoadTimeMs,maxRetry:E.maxNumRetry||0,retryDelay:E.retryDelayMs||0,maxRetryDelay:E.maxRetryDelayMs||0},C={onSuccess:function(w,M,H,Y){r.log('Loaded steering manifest: "'+v+'"');var j=w.data;if(1===(null==j?void 0:j.VERSION)){r.updated=performance.now(),r.timeToLoad=j.TTL;var $=j["RELOAD-URI"],le=j["PATHWAY-CLONES"],pe=j["PATHWAY-PRIORITY"];if($)try{r.uri=new self.URL($,v).href}catch(we){return r.enabled=!1,void r.log("Failed to parse Steering Manifest RELOAD-URI: "+$)}r.scheduleRefresh(r.uri||H.url),le&&r.clonePathways(le);var Se={steeringManifest:j,url:v.toString()};r.hls.trigger(O.STEERING_MANIFEST_LOADED,Se),pe&&r.updatePathwayPriority(pe)}else r.log("Steering VERSION "+j.VERSION+" not supported!")},onError:function(w,M,H,Y){if(r.log("Error loading steering manifest: "+w.code+" "+w.text+" ("+M.url+")"),r.stopLoad(),410===w.code)return r.enabled=!1,void r.log("Steering manifest "+M.url+" no longer available");var j=1e3*r.timeToLoad;if(429!==w.code)r.scheduleRefresh(r.uri||M.url,j);else{var $=r.loader;if("function"==typeof(null==$?void 0:$.getResponseHeader)){var le=$.getResponseHeader("Retry-After");le&&(j=1e3*parseFloat(le))}r.log("Steering manifest "+M.url+" rate limited")}},onTimeout:function(w,M,H){r.log("Timeout loading steering manifest ("+M.url+")"),r.scheduleRefresh(r.uri||M.url)}};this.log("Requesting steering manifest: "+v),this.loader.load(y,x,C)},l.scheduleRefresh=function(e,r){var u=this;void 0===r&&(r=1e3*this.timeToLoad),this.clearTimeout(),this.reloadTimer=self.setTimeout(function(){var c,v=null==(c=u.hls)?void 0:c.media;!v||v.ended?u.scheduleRefresh(e,1e3*u.timeToLoad):u.loadSteeringManifest(e)},r)},ce(h,[{key:"pathwayPriority",get:function(){return this._pathwayPriority},set:function(e){this.updatePathwayPriority(e)}}])}(Ze);function Nc(f,h,l,i){f&&Object.keys(h).forEach(function(e){var r=f.filter(function(u){return u.groupId===e}).map(function(u){var c=be({},u);return c.details=void 0,c.attrs=new Zr(c.attrs),c.url=c.attrs.URI=Bc(u.url,u.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",l),c.groupId=c.attrs["GROUP-ID"]=h[e],c.attrs["PATHWAY-ID"]=i,c});f.push.apply(f,r)})}function Bc(f,h,l,i){var c,e=i.HOST,r=i.PARAMS,u=i[l];h&&(c=null==u?void 0:u[h])&&(f=c);var v=new self.URL(f);
11return e&&!c&&(v.host=e),r&&Object.keys(r).sort().forEach(function(p){p&&v.searchParams.set(p,r[p])}),v.href}var Yu=function(f){function h(i){var e;return(e=f.call(this,"eme",i.logger)||this).hls=void 0,e.config=void 0,e.media=null,e.mediaResolved=void 0,e.keyFormatPromise=null,e.keySystemAccessPromises={},e._requestLicenseFailureCount=0,e.mediaKeySessions=[],e.keyIdToKeySessionPromise={},e.mediaKeys=null,e.setMediaKeysQueue=h.CDMCleanupPromise?[h.CDMCleanupPromise]:[],e.bannedKeyIds={},e.onMediaEncrypted=function(r){var u=r.initDataType,c=r.initData,v='"'+r.type+'" event: init data type: "'+u+'"';if(e.debug(v),null!==c){if(!e.keyFormatPromise){var p=Object.keys(e.keySystemAccessPromises);p.length||(p=ps(e.config));var y=p.map(Qt).filter(function(T){return!!T});e.keyFormatPromise=e.getKeyFormatPromise(y)}e.keyFormatPromise.then(function(T){var E=ao(T);if("sinf"===u&&E===or.FAIRPLAY){var x;try{var C=yt(new Uint8Array(c)),w=as(cs(JSON.parse(C).sinf));if(!w)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");x=new Uint8Array(w.subarray(8,24))}catch(we){return void e.warn(v+" Failed to parse sinf: "+we)}for(var pe,M=Nt(x),Y=e.keyIdToKeySessionPromise,j=e.mediaKeySessions,$=Y[M],le=function(){var Te=j[Se],oe=Te.decryptdata;if(!oe.keyId)return 0;var fe=Nt(oe.keyId);return xn(x,oe.keyId)||-1!==oe.uri.replace(/-/g,"").indexOf(M)?($=Y[fe])?(oe.pssh||(delete Y[fe],oe.pssh=new Uint8Array(c),oe.keyId=x,($=Y[M]=$.then(function(){return e.generateRequestWithPreferredKeySession(Te,u,c,"encrypted-event-key-match")})).catch(function(Ce){return e.handleError(Ce)})),1):0:void 0},Se=0;Se<j.length&&(0===(pe=le())||1!==pe);Se++);$||e.handleError(new Error("Key ID "+M+" not encountered in playlist. Key-system sessions "+j.length+"."))}else e.log('Ignoring "'+r.type+'" event with init data type: "'+u+'" for selected key-system '+E)}).catch(function(T){return e.handleError(T)})}},e.onWaitingForKey=function(r){e.log('"'+r.type+'" event')},e.hls=i,e.config=i.config,e.registerListeners(),e}xe(h,f);var l=h.prototype;return l.destroy=function(){this.onDestroying(),this.onMediaDetached();var e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null},l.registerListeners=function(){this.hls.on(O.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(O.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(O.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(O.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(O.DESTROYING,this.onDestroying,this)},l.unregisterListeners=function(){this.hls.off(O.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(O.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(O.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(O.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(O.DESTROYING,this.onDestroying,this)},l.getLicenseServerUrl=function(e){var r=this.config,u=r.drmSystems,c=r.widevineLicenseUrl,v=null==u?void 0:u[e];return v?v.licenseUrl:e===or.WIDEVINE&&c?c:void 0},l.getLicenseServerUrlOrThrow=function(e){var r=this.getLicenseServerUrl(e);if(void 0===r)throw new Error('no license server URL configured for key-system "'+e+'"');return r},l.getServerCertificateUrl=function(e){var r=this.config.drmSystems,u=null==r?void 0:r[e];if(u)return u.serverCertificateUrl;this.log('No Server Certificate in config.drmSystems["'+e+'"]')},l.attemptKeySystemAccess=function(e){var r=this,u=this.hls.levels,c=function(T,E,x){return!!T&&x.indexOf(T)===E},v=u.map(function(y){return y.audioCodec}).filter(c),p=u.map(function(y){return y.videoCodec}).filter(c);return v.length+p.length===0&&p.push("avc1.42e01e"),new Promise(function(y,T){var E=function(C){var k=C.shift();r.getMediaKeysPromise(k,v,p).then(function(w){return y({keySystem:k,mediaKeys:w})}).catch(function(w){C.length?E(C):T(w instanceof un?w:new un({type:Ae.KEY_SYSTEM_ERROR,details:ue.KEY_SYSTEM_NO_ACCESS,error:w,fatal:!0},w.message))})};E(e)})},l.requestMediaKeySystemAccess=function(e,r){var u=this.config.requestMediaKeySystemAccessFunc;if("function"!=typeof u){var c="Configured requestMediaKeySystemAccess is not a function "+u;return null===Vf&&"http:"===self.location.protocol&&(c="navigator.requestMediaKeySystemAccess is not available over insecure protocol "+location.protocol),Promise.reject(new Error(c))}return u(e,r)},l.getMediaKeysPromise=function(e,r,u){var c,v=this,p=function Hf(f,h,l,i){var e;switch(f){case or.FAIRPLAY:e=["cenc","sinf"];break;case or.WIDEVINE:case or.PLAYREADY:e=["cenc"];break;case or.CLEARKEY:e=["cenc","keyids"];break;default:throw new Error("Unknown key-system: "+f)}return function gs(f,h,l,i){return[{initDataTypes:f,persistentState:i.persistentState||"optional",distinctiveIdentifier:i.distinctiveIdentifier||"optional",sessionTypes:i.sessionTypes||[i.sessionType||"temporary"],audioCapabilities:h.map(function(r){return{contentType:"audio/mp4;
11 codecs="+r,robustness:i.audioRobustness||"",encryptionScheme:i.audioEncryptionScheme||null}}),videoCapabilities:l.map(function(r){return{contentType:"video/mp4; codecs="+r,robustness:i.videoRobustness||"",encryptionScheme:i.videoEncryptionScheme||null}})}]}(e,h,l,i)}(e,r,u,this.config.drmSystemOptions||{}),y=this.keySystemAccessPromises[e],T=null==(c=y)?void 0:c.keySystemAccess;if(!T){this.log('Requesting encrypted media "'+e+'" key-system access with config: '+cr(p)),T=this.requestMediaKeySystemAccess(e,p);var E=y=this.keySystemAccessPromises[e]={keySystemAccess:T};return T.catch(function(x){v.log('Failed to obtain access to key-system "'+e+'": '+x)}),T.then(function(x){v.log('Access for key-system "'+x.keySystem+'" obtained');var C=v.fetchServerCertificate(e);v.log('Create media-keys for "'+e+'"');var k=E.mediaKeys=x.createMediaKeys().then(function(w){return v.log('Media-keys created for "'+e+'"'),E.hasMediaKeys=!0,C.then(function(M){return M?v.setMediaKeysServerCertificate(w,e,M):w})});return k.catch(function(w){v.error('Failed to create media-keys for "'+e+'"}: '+w)}),k})}return T.then(function(){return y.mediaKeys})},l.createMediaKeySessionContext=function(e){var r=e.decryptdata,u=e.keySystem,c=e.mediaKeys;this.log('Creating key-system session "'+u+'" keyId: '+Nt(r.keyId||[])+" keyUri: "+r.uri);var v=c.createSession(),p={decryptdata:r,keySystem:u,mediaKeys:c,mediaKeysSession:v,keyStatus:"status-pending"};return this.mediaKeySessions.push(p),p},l.renewKeySession=function(e){var r=e.decryptdata;if(r.pssh){var u=this.createMediaKeySessionContext(e),c=zu(r);this.keyIdToKeySessionPromise[c]=this.generateRequestWithPreferredKeySession(u,"cenc",r.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)},l.updateKeySession=function(e,r){var u=e.mediaKeysSession;return this.log('Updating key-session "'+u.sessionId+'" for keyId '+Nt(e.decryptdata.keyId||[])+"\n      } (data length: "+r.byteLength+")"),u.update(r)},l.getSelectedKeySystemFormats=function(){var e=this;return Object.keys(this.keySystemAccessPromises).map(function(r){return{keySystem:r,hasMediaKeys:e.keySystemAccessPromises[r].hasMediaKeys}}).filter(function(r){return!!r.hasMediaKeys}).map(function(r){return Qt(r.keySystem)}).filter(function(r){return!!r})},l.getKeySystemAccess=function(e){var r=this;return this.getKeySystemSelectionPromise(e).then(function(u){return r.attemptSetMediaKeys(u.keySystem,u.mediaKeys)})},l.selectKeySystem=function(e){var r=this;return new Promise(function(u,c){r.getKeySystemSelectionPromise(e).then(function(v){var p=v.keySystem,y=Qt(p);y?u(y):c(new Error('Unable to find format for key-system "'+p+'"'))}).catch(c)})},l.selectKeySystemFormat=function(e){var r=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log("Selecting key-system from fragment (sn: "+e.sn+" "+e.type+": "+e.level+") key formats "+r.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(r)),this.keyFormatPromise},l.getKeyFormatPromise=function(e){var r=ps(this.config),u=e.map(ao).filter(function(c){return!!c&&-1!==r.indexOf(c)});return this.selectKeySystem(u)},l.getKeyStatus=function(e){for(var r=this.mediaKeySessions,u=0;u<r.length;u++){var c=Uc(e,r[u]);if(c)return c}},l.loadKey=function(e){var r=this,u=e.keyInfo.decryptdata,c=zu(u),v=this.bannedKeyIds[c];if(v||"internal-error"===this.getKeyStatus(u)){var p=qd(v||"internal-error",u);return this.handleError(p,e.frag),Promise.reject(p)}var y="(keyId: "+c+' format: "'+u.keyFormat+'" method: '+u.method+" uri: "+u.uri+")";this.log("Starting session for key "+y);var T=this.keyIdToKeySessionPromise[c];if(!T){var E=this.getKeySystemForKeyPromise(u).then(function(x){var C=x.keySystem,k=x.mediaKeys;return r.throwIfDestroyed(),r.log("Handle encrypted media sn: "+e.frag.sn+" "+e.frag.type+": "+e.frag.level+" using key "+y),r.attemptSetMediaKeys(C,k).then(function(){return r.throwIfDestroyed(),r.createMediaKeySessionContext({keySystem:C,mediaKeys:k,decryptdata:u})})}).then(function(x){return r.generateRequestWithPreferredKeySession(x,"cenc",u.pssh?u.pssh.buffer:null,"playlist-key")});return E.catch(function(x){return r.handleError(x,e.frag)}),this.keyIdToKeySessionPromise[c]=E,E}return T.catch(function(x){if(x instanceof un){var C=Oe({},x.data);"internal-error"===r.getKeyStatus(u)&&(C.decryptdata=u);var k=new un(C,x.message);r.handleError(k,e.frag)}}),T},l.throwIfDestroyed=function(e){if(!this.hls)throw new Error("invalid state")},l.handleError=function(e,r){if(this.hls)if(e instanceof un){r&&(e.data.frag=r);var u=e.data.decryptdata;this.error(e.message+(u?" ("+Nt(u.keyId||[])+")":"")),this.hls.trigger(O.ERROR,e.data)}else this.error(e.message),this.hls.trigger(O.ERROR,{type:Ae.KEY_SYSTEM_ERROR,details:ue.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})},l.getKeySystemForKeyPromise=function(e){var r=zu(e),u=this.keyIdToKeySessionPromise[r];if(!u){var c=ao(e.keyFormat),v=c?[c]:ps(this.config);return this.attemptKeySystemAccess(v)}return u},l.getKeySystemSelectionPromise=function(e){if(e.length||(e=ps(this.config)),0===e.length)throw new un({type:Ae.KEY_SYSTEM_ERROR,details:ue.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},"Missing key-system license configuration options "+cr({drmSystems:this.config.drmSystems}));return this.attemptKeySystemAccess(e)},l.attemptSetMediaKeys=function(e,r){var u=this;if(this.mediaResolved=void 0,this.mediaKeys===r)return Promise.resolve();var c=this.setMediaKeysQueue.slice();this.log('Setting media-keys for "'+e+'"');var v=Promise.all(c).then(function(){return u.media?u.media.setMediaKeys(r):new Promise(function(p,y){u.mediaResolved=function(){if(u.mediaResolved=void 0,!u.media)return y(new Error("Attempted to set mediaKeys without media element attached"));u.mediaKeys=r,u.media.setMediaKeys(r).then(p).catch(y)}})});return this.mediaKeys=r,this.setMediaKeysQueue.push(v),v.then(function(){u.log('Media-keys set for "'+e+'"'),c.push(v),u.setMediaKeysQueue=u.setMediaKeysQueue.filter(function(p){return-1===c.indexOf(p)})})},l.generateRequestWithPreferredKeySession=function(e,r,u,c){var v,p=this,y=null==(v=this.config.drmSystems)||null==(v=v[e.keySystem])?void 0:v.generateRequest;if(y)try{var T=y.call(this.hls,r,u,e);if(!T)throw new Error("Invalid response from configured generateRequest filter");r=T.initDataType,e.decryptdata.pssh=(u=T.initData?T.initData:null)?new Uint8Array(u):null}catch(Y){if(this.warn(Y.message),this.hls&&this.hls.config.debug)throw Y}if(null===u)return this.log('Skipping key-session request for "'+c+'" (no initData)'),Promise.resolve(e);var E=zu(e.decryptdata),x=e.decryptdata.uri;this.log('Generating key-session request for "'+c+'" keyId: '+E+" URI: "+x+" (init data type: "+r
11+" length: "+u.byteLength+")");var C=new ht,k=e._onmessage=function(Y){var j=e.mediaKeysSession;if(j){var $=Y.messageType,le=Y.message;p.log('"'+$+'" message event for session "'+j.sessionId+'" message size: '+le.byteLength),"license-request"===$||"license-renewal"===$?p.renewLicense(e,le).catch(function(pe){C.eventNames().length?C.emit("error",pe):p.handleError(pe)}):"license-release"===$?e.keySystem===or.FAIRPLAY&&p.updateKeySession(e,hs("acknowledged")).then(function(){return p.removeSession(e)}).catch(function(pe){return p.handleError(pe)}):p.warn('unhandled media key message type "'+$+'"')}else C.emit("error",new Error("invalid state"))},w=function(j,$){var le;$.keyStatus=j,j.startsWith("usable")?C.emit("resolved"):"internal-error"===j||"output-restricted"===j||"output-downscaled"===j?le=qd(j,$.decryptdata):"expired"===j?le=new Error("key expired (keyId: "+E+")"):"released"===j?le=new Error("key released"):"status-pending"===j||p.warn('unhandled key status change "'+j+'" (keyId: '+E+")"),le&&(C.eventNames().length?C.emit("error",le):p.handleError(le))},M=e._onkeystatuseschange=function(Y){if(e.mediaKeysSession){var $=p.getKeyStatuses(e);if(Object.keys($).some(function(Te){return"status-pending"!==$[Te]})){if("expired"===$[E])return p.log("Expired key "+cr($)+' in key-session "'+e.mediaKeysSession.sessionId+'"'),void p.renewKeySession(e);var pe=$[E];if(pe)w(pe,e);else{var Se;e.keyStatusTimeouts||(e.keyStatusTimeouts={}),(Se=e.keyStatusTimeouts)[E]||(Se[E]=self.setTimeout(function(){if(e.mediaKeysSession&&p.mediaKeys){var Te=p.getKeyStatus(e.decryptdata);if(Te&&"status-pending"!==Te)return p.log("No status for keyId "+E+' in key-session "'+e.mediaKeysSession.sessionId+'". Using session key-status '+Te+" from other session."),w(Te,e);p.log("key status for "+E+' in key-session "'+e.mediaKeysSession.sessionId+'" timed out after 1000ms'),w(pe="internal-error",e)}},1e3)),p.log("No status for keyId "+E+" ("+cr($)+").")}}}else C.emit("error",new Error("invalid state"))};oi(e.mediaKeysSession,"message",k),oi(e.mediaKeysSession,"keystatuseschange",M);var H=new Promise(function(Y,j){C.on("error",j),C.on("resolved",Y)});return e.mediaKeysSession.generateRequest(r,u).then(function(){p.log('Request generated for key-session "'+e.mediaKeysSession.sessionId+'" keyId: '+E+" URI: "+x)}).catch(function(Y){throw new un({type:Ae.KEY_SYSTEM_ERROR,details:ue.KEY_SYSTEM_NO_SESSION,error:Y,decryptdata:e.decryptdata,fatal:!1},"Error generating key-session request: "+Y)}).then(function(){return H}).catch(function(Y){return C.removeAllListeners(),p.removeSession(e).then(function(){throw Y})}).then(function(){return C.removeAllListeners(),e})},l.getKeyStatuses=function(e){var r=this,u={};return e.mediaKeysSession.keyStatuses.forEach(function(c,v){if("string"==typeof v&&"object"==typeof c){var p=v;v=c,c=p}var y="buffer"in v?new Uint8Array(v.buffer,v.byteOffset,v.byteLength):new Uint8Array(v);if(e.keySystem===or.PLAYREADY&&16===y.length){var T=Nt(y);u[T]=c,vs(y)}var E=Nt(y);"internal-error"===c&&(r.bannedKeyIds[E]=c),r.log('key status change "'+c+'" for keyStatuses keyId: '+E+' key-session "'+e.mediaKeysSession.sessionId+'"'),u[E]=c}),u},l.fetchServerCertificate=function(e){var r=this.config,c=new(0,r.loader)(r),v=this.getServerCertificateUrl(e);return v?(this.log('Fetching server certificate for "'+e+'"'),new Promise(function(p,y){var T={responseType:"arraybuffer",url:v},E=r.certLoadPolicy.default;c.load(T,{loadPolicy:E,timeout:E.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},{onSuccess:function(w,M,H,Y){p(w.data)},onError:function(w,M,H,Y){y(new un({type:Ae.KEY_SYSTEM_ERROR,details:ue.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:H,response:Oe({url:T.url,data:void 0},w)},'"'+e+'" certificate request failed ('+v+"). Status: "+w.code+" ("+w.text+")"))},onTimeout:function(w,M,H){y(new un({type:Ae.KEY_SYSTEM_ERROR,details:ue.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:H,response:{url:T.url,data:void 0}},'"'+e+'" certificate request timed out ('+v+")"))},onAbort:function(w,M,H){y(new Error("aborted"))}})})):Promise.resolve()},l.setMediaKeysServerCertificate=function(e,r,u){var c=this;return new Promise(function(v,p){e.setServerCertificate(u).then(function(y){c.log("setServerCertificate "+(y?"success":"not supported by CDM")+" ("+u.byteLength+') on "'+r+'"'),v(e)}).catch(function(y){p(new un({type:Ae.KEY_SYSTEM_ERROR,details:ue.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:y,fatal:!0},y.message))})})},l.renewLicense=function(e,r){var u=this;return this.requestLicense(e,new Uint8Array(r)).then(function(c){return u.updateKeySession(e,new Uint8Array(c)).catch(function(v){throw new un({type:Ae.KEY_SYSTEM_ERROR,details:ue.KEY_SYSTEM_SESSION_UPDATE_FAILED,decryptdata:e.decryptdata,error:v,fatal:!1},v.message)})})},l.unpackPlayReadyKeyMessage=function(e,r){var u=String.fromCharCode.apply(null,new Uint16Array(r.buffer));if(!u.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),r;var c=(new DOMParser).parseFromString(u,"application/xml"),v=c.querySelectorAll("HttpHeader");if(v.length>0)for(var p,y=0,T=v.length;y<T;y++){var E,x,C=null==(E=(p=v[y]).querySelector("name"))?void 0:E.textContent,k=null==(x=p.querySelector("value"))?void 0:x.textContent;C&&k&&e.setRequestHeader(C,k)}var w=c.querySelector("Challenge"),M=null==w?void 0:w.textContent;
11if(!M)throw new Error("Cannot find <Challenge> in key message");return hs(atob(M))},l.setupLicenseXHR=function(e,r,u,c){var v=this,p=this.config.licenseXhrSetup;return p?Promise.resolve().then(function(){if(!u.decryptdata)throw new Error("Key removed");return p.call(v.hls,e,r,u,c)}).catch(function(y){if(!u.decryptdata)throw y;return e.open("POST",r,!0),p.call(v.hls,e,r,u,c)}).then(function(y){return e.readyState||e.open("POST",r,!0),{xhr:e,licenseChallenge:y||c}}):(e.open("POST",r,!0),Promise.resolve({xhr:e,licenseChallenge:c}))},l.requestLicense=function(e,r){var u=this,c=this.config.keyLoadPolicy.default;return new Promise(function(v,p){var y=u.getLicenseServerUrlOrThrow(e.keySystem);u.log("Sending license request to URL: "+y);var T=new XMLHttpRequest;T.responseType="arraybuffer",T.onreadystatechange=function(){if(!u.hls||!e.mediaKeysSession)return p(new Error("invalid state"));if(4===T.readyState)if(200===T.status){u._requestLicenseFailureCount=0;var E=T.response;u.log("License received "+(E instanceof ArrayBuffer?E.byteLength:E));var x=u.config.licenseResponseCallback;if(x)try{E=x.call(u.hls,T,y,e)}catch(M){u.error(M)}v(E)}else{var C=c.errorRetry,k=C?C.maxNumRetry:0;u._requestLicenseFailureCount++,u._requestLicenseFailureCount>k||T.status>=400&&T.status<500?p(new un({type:Ae.KEY_SYSTEM_ERROR,details:ue.KEY_SYSTEM_LICENSE_REQUEST_FAILED,decryptdata:e.decryptdata,fatal:!0,networkDetails:T,response:{url:y,data:void 0,code:T.status,text:T.statusText}},"License Request XHR failed ("+y+"). Status: "+T.status+" ("+T.statusText+")")):(u.warn("Retrying license request, "+(k-u._requestLicenseFailureCount+1)+" attempts left"),u.requestLicense(e,r).then(v,p))}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=T,u.setupLicenseXHR(T,y,e,r).then(function(E){var x=E.xhr,C=E.licenseChallenge;e.keySystem==or.PLAYREADY&&(C=u.unpackPlayReadyKeyMessage(x,C)),x.send(C)}).catch(p)})},l.onDestroying=function(){this.unregisterListeners(),this._clear()},l.onMediaAttached=function(e,r){if(this.config.emeEnabled){var u=r.media;this.media=u,oi(u,"encrypted",this.onMediaEncrypted),oi(u,"waitingforkey",this.onWaitingForKey);var c=this.mediaResolved;c?c():this.mediaKeys=u.mediaKeys}},l.onMediaDetached=function(){var e=this.media;e&&(Ii(e,"encrypted",this.onMediaEncrypted),Ii(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)},l._clear=function(){var r,e=this;this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},this.bannedKeyIds={};var u=this.mediaResolved;if(u&&u(),this.mediaKeys||this.mediaKeySessions.length){var c=this.media,v=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,ga.clearKeyUriToKeyIdMap();var p=v.length;h.CDMCleanupPromise=Promise.all(v.map(function(y){return e.removeSession(y)}).concat((null==c||null==(r=c.setMediaKeys(null))?void 0:r.catch(function(y){e.log("Could not clear media keys: "+y),e.hls&&e.hls.trigger(O.ERROR,{type:Ae.OTHER_ERROR,details:ue.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error("Could not clear media keys: "+y)})}))||Promise.resolve())).catch(function(y){e.log("Could not close sessions and clear media keys: "+y),e.hls&&e.hls.trigger(O.ERROR,{type:Ae.OTHER_ERROR,details:ue.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error("Could not close sessions and clear media keys: "+y)})}).then(function(){p&&e.log("finished closing key sessions and clearing media keys")})}},l.onManifestLoading=function(){this._clear()},l.onManifestLoaded=function(e,r){var u=r.sessionKeys;if(u&&this.config.emeEnabled&&!this.keyFormatPromise){var c=u.reduce(function(v,p){return-1===v.indexOf(p.keyFormat)&&v.push(p.keyFormat),v},[]);this.log("Selecting key-system from session-keys "+c.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(c)}},l.removeSession=function(e){var r=this,u=e.mediaKeysSession,c=e.licenseXhr,v=e.decryptdata;if(u){this.log('Remove licenses and keys and close session "'+u.sessionId+'" keyId: '+Nt((null==v?void 0:v.keyId)||[])),e._onmessage&&(u.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(u.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),c&&c.readyState!==XMLHttpRequest.DONE&&c.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;var p=this.mediaKeySessions.indexOf(e);p>-1&&this.mediaKeySessions.splice(p,1);var y=e.keyStatusTimeouts;
vendor: 8,235 bytes, line 11
11return y&&Object.keys(y).forEach(function(x){return self.clearTimeout(y[x])}),(function qh(f){var h;return!(!f||"persistent-license"!==f.sessionType&&(null==(h=f.sessionTypes)||!h.some(function(l){return"persistent-license"===l})))}(this.config.drmSystemOptions)?new Promise(function(x,C){self.setTimeout(function(){return C(new Error("MediaKeySession.remove() timeout"))},8e3),u.remove().then(x).catch(C)}):Promise.resolve()).catch(function(x){r.log("Could not remove session: "+x),r.hls&&r.hls.trigger(O.ERROR,{type:Ae.OTHER_ERROR,details:ue.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error("Could not remove session: "+x)})}).then(function(){return u.close()}).catch(function(x){r.log("Could not close session: "+x),r.hls&&r.hls.trigger(O.ERROR,{type:Ae.OTHER_ERROR,details:ue.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error("Could not close session: "+x)})})}return Promise.resolve()},h}(Ze);function zu(f){if(!f)throw new Error("Could not read keyId of undefined decryptdata");if(null===f.keyId)throw new Error("keyId is null");return Nt(f.keyId)}function Uc(f,h){return f.keyId&&h.mediaKeysSession.keyStatuses.has(f.keyId)?h.mediaKeysSession.keyStatuses.get(f.keyId):f.matches(h.decryptdata)?h.keyStatus:void 0}Yu.CDMCleanupPromise=void 0;var un=function(f){function h(l,i){var e;return(e=f.call(this,i)||this).data=void 0,l.error||(l.error=new Error(i)),e.data=l,l.err=l.error,e}return xe(h,f),h}(pt(Error));function qd(f,h){var l="output-restricted"===f;return new un({type:Ae.KEY_SYSTEM_ERROR,details:l?ue.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:ue.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!1,decryptdata:h},l?"HDCP level output restricted":'key status changed to "'+f+'"')}var Pv=function(){function f(l){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=l,this.registerListeners()}var h=f.prototype;return h.setStreamController=function(i){this.streamController=i},h.registerListeners=function(){this.hls.on(O.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(O.MEDIA_DETACHING,this.onMediaDetaching,this)},h.unregisterListeners=function(){this.hls.off(O.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(O.MEDIA_DETACHING,this.onMediaDetaching,this)},h.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},h.onMediaAttaching=function(i,e){var r=this.hls.config;if(r.capLevelOnFPSDrop){var u=e.media instanceof self.HTMLVideoElement?e.media:null;this.media=u,u&&"function"==typeof u.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}},h.onMediaDetaching=function(){this.media=null},h.checkFPS=function(i,e,r){var u=performance.now();if(e){if(this.lastTime){var v=r-this.lastDroppedFrames,p=e-this.lastDecodedFrames,y=1e3*v/(u-this.lastTime),T=this.hls;if(T.trigger(O.FPS_DROP,{currentDropped:v,currentDecoded:p,totalDroppedFrames:r}),y>0&&v>T.config.fpsDroppedMonitoringThreshold*p){var E=T.currentLevel;T.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+E),E>0&&(-1===T.autoLevelCapping||T.autoLevelCapping>=E)&&(T.trigger(O.FPS_DROP_LEVEL_CAPPING,{level:E-=1,droppedLevel:T.currentLevel}),T.autoLevelCapping=E,this.streamController.nextLevelSwitch())}}this.lastTime=u,this.lastDroppedFrames=r,this.lastDecodedFrames=e}},h.checkFPSInterval=function(){var i=this.media;if(i)if(this.isVideoPlaybackQualityAvailable){var e=i.getVideoPlaybackQuality();this.checkFPS(i,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(i,i.webkitDecodedFrameCount,i.webkitDroppedFrameCount)},f}();function Bo(f){for(var h=5381,l=f.length;l;)h=33*h^f.charCodeAt(--l);return(h>>>0).toString()}var Ns=.025,Bs=function(f){return f[f.Point=0]="Point",f[f.Range=1]="Range",f}({});function _t(f,h,l){return f.identifier+"-"+(l+1)+"-"+Bo(h)}var $u=function(){function f(l,i){this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=i,this.dateRange=l,this.setDateRange(l)}var h=f.prototype;return h.setDateRange=function(i){this.dateRange=i,this.resumeOffset=i.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=i.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=i.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=i.attr.enumeratedStringList("X-SNAP",this.snapOptions)},h.reset=function(){var i;this.appendInPlaceStarted=!1,null==(i=this.assetListLoader)||i.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)},h.isAssetPastPlayoutLimit=function(i){var e;if(i>0&&i>=this.assetList.length)return!0;var r=this.playoutLimit;return!(i<=0||isNaN(r))&&(0===r||((null==(e=this.assetList[i])?void 0:e.startOffset)||0)>r)},h.findAssetIndex=function(i){return this.assetList.indexOf(i)},h.toString=function(){return function Zu(f){return'["'+f.identifier+'" '+(f.cue.pre?"<pre>":f.cue.post?"<post>":"")+f.timelineStart.toFixed(2)+"-"+f.resumeTime.toFixed(2)+"]"}(this)},ce(f,[{key:"identifier",get:function(){return this.dateRange.id}},{key:"startDate",get:function(){return this.dateRange.startDate}},{key:"startTime",get:function(){var i=this.dateRange.startTime;if(this.snapOptions.out){var e=this.dateRange.tagAnchor;if(e)return Xu(i,e)}return i}},{key:"startOffset",get:function(){return this.cue.pre?0:this.startTime}},{key:"startIsAligned",get:function(){if(0===this.startTime||this.snapOptions.out)return!0;var i=this.dateRange.tagAnchor;if(i){var e=this.dateRange.startTime;return e-Xu(e,i)<.1}return!1}},{key:"resumptionOffset",get:function(){var i=this.resumeOffset,e=X(i)?i:this.duration;return this.cumulativeDuration+e}},{key:"resumeTime",get:function(){var i=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){var e=this.resumeAnchor;if(e)return Xu(i,e)}return i}},{key:"appendInPlace",get:function(){return!!this.appendInPlaceStarted||!this.appendInPlaceDisabled&&!(this.cue.once||this.cue.pre||!this.startIsAligned||!(isNaN(this.playoutLimit)&&isNaN(this.resumeOffset)||this.resumeOffset&&this.duration&&Math.abs(this.resumeOffset-this.duration)<Ns))},set:function(i){this.appendInPlaceStarted?this.resetOnResume=!i:this.appendInPlaceDisabled=!i}},{key:"timelineStart",get:function(){return null!==this._timelineStart?this._timelineStart:this.startTime},set:function(i){this._timelineStart=i}},{key:"duration",get:function(){var e,i=this.playoutLimit;return e=null!==this._duration?this._duration:this.dateRange.duration?this.dateRange.duration:this.dateRange.plannedDuration||0,!isNaN(i)&&i<e&&(e=i),e},set:function(i){this._duration=i}},{key:"cue",get:function(){return this.dateRange.cue}},{key:"timelineOccupancy",get:function(){return"RANGE"===this.dateRange.attr["X-TIMELINE-OCCUPIES"]?Bs.Range:Bs.Point}},{key:"supplementsPrimary",get:function(){return"PRIMARY"===this.dateRange.attr["X-TIMELINE-STYLE"]}},{key:"contentMayVary",get:function(){return"NO"!==this.dateRange.attr["X-CONTENT-MAY-VARY"]}},{key:"assetUrl",get:function(){return this.dateRange.attr["X-ASSET-URI"]}},{key:"assetListUrl",get:function(){return this.dateRange.attr["X-ASSET-LIST"]}},{key:"baseUrl",get:function(){return this.base.url}},{key:"assetListLoaded",get:function(){return this.assetList.length>0||null!==this.assetListResponse}}])}();function Xu(f,h){return f-h.start<h.duration/2&&!(Math.abs(f-(h.start+h.duration))<Ns)?h.start:h.start+h.duration}function Qu(f,h,l){var i=new self.URL(f,l);return"data:"!==i.protocol&&i.searchParams.set("_HLS_primary_id",h),i}function Uo(f,h){for(;null!=(l=f.assetList[++h])&&l.error;)var l;return h}
vendor: 4,416 bytes, line 11
11function Us(f){var h=f.timelineStart,l=f.duration||0;return'["'+f.identifier+'" '+h.toFixed(2)+"-"+(h+l).toFixed(2)+"]"}var ii=function(){function f(l,i,e,r){var u=this;this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=function(){u.reachedPlayout(u.currentTime)&&u.hls&&u.hls.trigger(O.PLAYOUT_LIMIT_REACHED,{})};var c=this.hls=new l(i);this.interstitial=e,this.assetItem=r;var v=function(){u.hasDetails=!0};c.once(O.LEVEL_LOADED,v),c.once(O.AUDIO_TRACK_LOADED,v),c.once(O.SUBTITLE_TRACK_LOADED,v),c.on(O.MEDIA_ATTACHING,function(p,y){var T=y.media;u.removeMediaListeners(),u.mediaAttached=T,u.interstitial.playoutLimit&&(T.addEventListener("timeupdate",u.checkPlayout),u.appendInPlace&&c.on(O.BUFFER_APPENDED,function(){var x=u.bufferedEnd;u.reachedPlayout(x)&&(u._bufferedEosTime=x,c.trigger(O.BUFFERED_TO_END,void 0))}))})}var h=f.prototype;return h.loadSource=function(){var i=this.hls;if(i)if(i.url)i.levels.length&&!i.started&&i.startLoad(-1,!0);else{var e=this.assetItem.uri;try{e=Qu(e,i.config.primarySessionId||"").href}catch(r){}i.loadSource(e)}},h.bufferedInPlaceToEnd=function(i){var e;if(!this.appendInPlace)return!1;if(null!=(e=this.hls)&&e.bufferedToEnd)return!0;if(!i)return!1;var r=Math.min(this._bufferedEosTime||1/0,this.duration),c=tr.bufferInfo(i,this.timelineOffset,0);return this.getAssetTime(c.end)>=r-.02},h.reachedPlayout=function(i){return this.startOffset+i>=this.interstitial.playoutLimit},h.getAssetTime=function(i){var r=this.duration;return Math.min(Math.max(0,i-this.timelineOffset),r)},h.removeMediaListeners=function(){var i=this.mediaAttached;i&&(this._currentTime=i.currentTime,this.bufferSnapShot(),i.removeEventListener("timeupdate",this.checkPlayout))},h.bufferSnapShot=function(){var i;this.mediaAttached&&null!=(i=this.hls)&&i.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)},h.destroy=function(){this.removeMediaListeners(),this.hls&&this.hls.destroy(),this.hls=null,this.tracks=this.mediaAttached=this.checkPlayout=null},h.attachMedia=function(i){var e;this.loadSource(),null==(e=this.hls)||e.attachMedia(i)},h.detachMedia=function(){var i;this.removeMediaListeners(),this.mediaAttached=null,null==(i=this.hls)||i.detachMedia()},h.resumeBuffering=function(){var i;null==(i=this.hls)||i.resumeBuffering()},h.pauseBuffering=function(){var i;null==(i=this.hls)||i.pauseBuffering()},h.transferMedia=function(){var i;return this.bufferSnapShot(),(null==(i=this.hls)?void 0:i.transferMedia())||null},h.resetDetails=function(){var i=this.hls;if(i&&this.hasDetails){i.stopLoad();var e=function(u){return delete u.details};i.levels.forEach(e),i.allAudioTracks.forEach(e),i.allSubtitleTracks.forEach(e),this.hasDetails=!1}},h.on=function(i,e,r){var u;null==(u=this.hls)||u.on(i,e)},h.once=function(i,e,r){var u;null==(u=this.hls)||u.once(i,e)},h.off=function(i,e,r){var u;null==(u=this.hls)||u.off(i,e)},h.toString=function(){var i;return"HlsAssetPlayer: "+Us(this.assetItem)+" "+(null==(i=this.hls)?void 0:i.sessionId)+" "+(this.appendInPlace?"append-in-place":"")},ce(f,[{key:"appendInPlace",get:function(){return this.interstitial.appendInPlace}},{key:"destroyed",get:function(){var i;return!(null!=(i=this.hls)&&i.userConfig)}},{key:"assetId",get:function(){return this.assetItem.identifier}},{key:"interstitialId",get:function(){return this.assetItem.parentIdentifier}},{key:"media",get:function(){var i;return(null==(i=this.hls)?void 0:i.media)||null}},{key:"bufferedEnd",get:function(){var i=this.media||this.mediaAttached;if(!i)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;var e=tr.bufferInfo(i,i.currentTime,.001);return this.getAssetTime(e.end)}},{key:"currentTime",get:function(){var i=this.media||this.mediaAttached;return i?this.getAssetTime(i.currentTime):this._currentTime||0}},{key:"duration",get:function(){var i=this.assetItem.duration;if(!i)return 0;var e=this.interstitial.playoutLimit;if(e){var r=e-this.startOffset;if(r>0&&r<i)return r}return i}},{key:"remaining",get:function(){var i=this.duration;return i?Math.max(0,i-this.currentTime):0}},{key:"startOffset",get:function(){return this.assetItem.startOffset}},{key:"timelineOffset",get:function(){var i;return(null==(i=this.hls)?void 0:i.config.timelineOffset)||0},set:function(i){var e=this.timelineOffset;if(i!==e&&Math.abs(i-e)>
vendor: 2,622 bytes, line 11
111/9e4&&this.hls){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=i}}}])}(),Ju=function(f){function h(i,e){var r;return(r=f.call(this,"interstitials-sched",e)||this).onScheduleUpdate=void 0,r.eventMap={},r.events=null,r.items=null,r.durations={primary:0,playout:0,integrated:0},r.onScheduleUpdate=i,r}xe(h,f);var l=h.prototype;return l.destroy=function(){this.reset(),this.onScheduleUpdate=null},l.reset=function(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(function(e){return e.reset()}),this.events=this.items=null},l.resetErrorsInRange=function(e,r){return this.events?this.events.reduce(function(u,c){return e<=c.startOffset&&r>c.startOffset?(delete c.error,u+1):u},0):0},l.getEvent=function(e){return e&&this.eventMap[e]||null},l.hasEvent=function(e){return e in this.eventMap},l.findItemIndex=function(e,r){if(e.event)return this.findEventIndex(e.event.identifier);var u=-1;e.nextEvent?u=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(u=this.findEventIndex(e.previousEvent.identifier)+1);var c=this.items;if(c)for(c[u]||(void 0===r&&(r=e.start),u=this.findItemIndexAtTime(r));u>=0&&null!=(v=c[u])&&v.event;){var v;u--}return u},l.findItemIndexAtTime=function(e,r){var u=this.items;if(u)for(var c=0;c<u.length;c++){var v=u[c];if(r&&"primary"!==r&&(v=v[r]),e===v.start||e>v.start&&e<v.end)return c}return-1},l.findJumpRestrictedIndex=function(e,r){var u=this.items;if(u)for(var c=e;c<=r&&u[c];c++){var v=u[c].event;if(null!=v&&v.restrictions.jump&&!v.appendInPlace)return c}return-1},l.findEventIndex=function(e){var r=this.items;if(r)for(var u=r.length;u--;){var c;if((null==(c=r[u].event)?void 0:c.identifier)===e)return u}return-1},l.findAssetIndex=function(e,r){var u=e.assetList,c=u.length;if(c>1)for(var v=0;v<c;v++){var p=u[v];if(!p.error){var y=p.timelineStart;if(r===y||r>y&&(r<y+(p.duration||0)||v===c-1))return v}}return 0},l.parseInterstitialDateRanges=function(e,r){var u=this,c=e.main.details,v=c.dateRanges,p=this.events,y=this.parseDateRanges(v,{url:c.url},r),T=Object.keys(v),E=p?p.filter(function(x){return!T.includes(x.identifier)}):[];y.length&&y.sort(function(x,C){var k=x.cue.pre,w=x.cue.post,M=C.cue.pre,H=C.cue.post;if(k&&!M)return-1;if(M&&!k||w&&!H)return 1;if(H&&!w)return-1;if(!(k||M||w||H)){var Y=x.startTime,j=C.startTime;if(Y!==j)return Y-j}return x.dateRange.tagOrder-C.dateRange.tagOrder}),this.events=y,E.forEach(function(x){u.removeEvent(x)}),this.updateSchedule(e,E)},l.updateSchedule=function(e,r,u){void 0===r&&(r=[]),void 0===u&&(u=!1);var c=this.events||[];
11if(c.length||r.length||this.length<2){var v=this.items,p=this.parseSchedule(c,e);(u||r.length||(null==v?void 0:v.length)!==p.length||p.some(function(T,E){return Math.abs(T.playout.start-v[E].playout.start)>.005||Math.abs(T.playout.end-v[E].playout.end)>.005}))&&(this.items=p,this.onScheduleUpdate(r,v))}},l.parseDateRanges=function(e,r,u){for(var c=[],v=Object.keys(e),p=0;p<v.length;p++){var y=v[p],T=e[y];if(T.isInterstitial){var E=this.eventMap[y];E?E.setDateRange(T):(E=new $u(T,r),this.eventMap[y]=E,!1===u&&(E.appendInPlace=u)),c.push(E)}}return c},l.parseSchedule=function(e,r){var u=[],c=r.main.details,v=c.live?1/0:c.edge,p=0;if((e=e.filter(function(H){return!(H.error||H.cue.once&&H.hasPlayed)})).length){this.resolveOffsets(e,r);var y=0,T=0;if(e.forEach(function(H,Y){var $=H.cue.post,le=e[Y-1]||null,Se=$?v:H.startOffset,we=H.duration,Te=H.timelineOccupancy===Bs.Range?we:0,fe=(null==le?void 0:le.startTime)===Se,Ce=Se+H.cumulativeDuration,ze=H.appendInPlace?Ce+we:Se+H.resumptionOffset;if(H.cue.pre||!$&&Se<=0){var He=T;T+=Te,H.timelineStart=Ce,u.push({event:H,start:Ce,end:ze,playout:{start:p,end:p+=we},integrated:{start:He,end:T}})}else{if(!(Se<=v))return;if(!fe){var vt=Se-y;vt>.033?u.push({previousEvent:e[Y-1]||null,nextEvent:H,start:y,end:y+vt,playout:{start:p,end:p+=vt},integrated:{start:T,end:T+=vt}}):vt>0&&le&&(le.cumulativeDuration+=vt,u[u.length-1].end=Se)}$&&(ze=Ce),H.timelineStart=Ce,u.push({event:H,start:Ce,end:ze,playout:{start:p,end:p+=we},integrated:{start:T,end:T+=Te}})}var kt=H.resumeTime;y=$||kt>v?v:kt}),y<v){var E,k=v-y;u.push({previousEvent:(null==(E=u[u.length-1])?void 0:E.event)||null,nextEvent:null,start:y,end:y+k,playout:{start:p,end:p+=k},integrated:{start:T,end:T+=k}})}this.setDurations(v,p,T)}else{u.push({previousEvent:null,nextEvent:null,start:0,end:v,playout:{start:0,end:v},integrated:{start:0,end:v}}),this.setDurations(v,v,v)}return u},l.setDurations=function(e,r,u){this.durations={primary:e,playout:r,integrated:u}},l.resolveOffsets=function(e,r){var u=this,c=r.main.details,v=c.live?1/0:c.edge,p=0,y=-1;e.forEach(function(T,E){var C=T.cue.post,k=T.cue.pre?0:C?v:T.startTime;u.updateAssetDurations(T),y===k?T.cumulativeDuration=p:(p=0,y=k),!C&&T.snapOptions.in&&(T.resumeAnchor=va(null,c.fragments,T.startOffset+T.resumptionOffset,0,0)||void 0),T.appendInPlace&&!T.appendInPlaceStarted&&(u.primaryCanResumeInPlaceAt(T,r)||(T.appendInPlace=!1)),!T.appendInPlace&&E+1<e.length&&e[E+1].startTime-e[E].resumeTime<.033&&(e[E+1].appendInPlace=!1,e[E+1].appendInPlace&&u.warn("Could not change append strategy for abutting event "+T));var Y=X(T.resumeOffset)?T.resumeOffset:T.duration;p+=Y})},l.primaryCanResumeInPlaceAt=function(e,r){var u=this,c=e.resumeTime,v=e.startTime+e.resumptionOffset;return Math.abs(c-v)>Ns?(this.log('"'+e.identifier+'" resumption '+c+" not aligned with estimated timeline end "+v),!1):!Object.keys(r).some(function(y){var T=r[y].details,E=T.edge;if(c>=E)return u.log('"'+e.identifier+'" resumption '+c+" past "+y+" playlist end "+E),!1;var x=va(null,T.fragments,c);if(!x)return u.log('"'+e.identifier+'" resumption '+c+" does not align with any fragments in "+y+" playlist ("+T.fragStart+"-"+T.fragmentEnd+")"),!0;var C="audio"===y?.175:0;return!(Math.abs(x.start-c)<Ns+C||Math.abs(x.end-c)<Ns+C||(u.log('"'+e.identifier+'" resumption '+c+" not aligned with "+y+" fragment bounds ("+x.start+"-"+x.end+" sn: "+x.sn+" cc: "+x.cc+")"),0))})},l.updateAssetDurations=function(e){if(e.assetListLoaded){for(var r=e.timelineStart,u=0,c=!1,v=!1,p=0;p<e.assetList.length;p++){var y=e.assetList[p],T=r+u;y.startOffset=u,y.timelineStart=T,c||(c=null===y.duration),v||(v=!!y.error),u+=y.error?0:y.duration||0}e.duration=c&&!v?Math.max(u,e.duration):u}},l.removeEvent=function(e){e.reset(),delete this.eventMap[e.identifier]},ce(h,[{key:"duration",get:function(){var e=this.items;return e?e[e.length-1].end:0}},{key:"length",get:function(){return this.items?this.items.length:0}},{key:"assetIdAtEnd",get:function(){var e,r=null==(e=this.items)||null==(e=e[this.length-1])?void 0:e.event;if(r){var u=r.assetList,c=u[u.length-1];if(c)return c.identifier}return null}}])}(Ze);
11function Ni(f){return"["+(f.event?'"'+f.event.identifier+'"':"primary")+": "+f.start.toFixed(2)+"-"+f.end.toFixed(2)+"]"}var Hs=function(){function f(l){this.hls=void 0,this.hls=l}var h=f.prototype;return h.destroy=function(){this.hls=null},h.loadAssetList=function(i,e){var c,r=this,u=i.assetListUrl;try{c=Qu(u,this.hls.sessionId,i.baseUrl)}catch(w){var v=this.assignAssetListError(i,ue.ASSET_LIST_LOAD_ERROR,w,u);return void this.hls.trigger(O.ERROR,v)}e&&"data:"!==c.protocol&&c.searchParams.set("_HLS_start_offset",""+e);var p=this.hls.config,T=new(0,p.loader)(p),x=p.interstitialAssetListLoadPolicy.default;return T.load({responseType:"json",url:c.href},{loadPolicy:x,timeout:x.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},{onSuccess:function(M,H,Y,j){var $=M.data;if(Array.isArray(null==$?void 0:$.ASSETS))i.assetListResponse=$,r.hls.trigger(O.ASSET_LIST_LOADED,{event:i,assetListResponse:$,networkDetails:j});else{var pe=r.assignAssetListError(i,ue.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),Y.url,H,j);r.hls.trigger(O.ERROR,pe)}},onError:function(M,H,Y,j){var $=r.assignAssetListError(i,ue.ASSET_LIST_LOAD_ERROR,new Error("Error loading X-ASSET-LIST: HTTP status "+M.code+" "+M.text+" ("+H.url+")"),H.url,j,Y);r.hls.trigger(O.ERROR,$)},onTimeout:function(M,H,Y){var j=r.assignAssetListError(i,ue.ASSET_LIST_LOAD_TIMEOUT,new Error("Timeout loading X-ASSET-LIST ("+H.url+")"),H.url,M,Y);r.hls.trigger(O.ERROR,j)}}),this.hls.trigger(O.ASSET_LIST_LOADING,{event:i}),T},h.assignAssetListError=function(i,e,r,u,c,v){return i.error=r,{type:Ae.NETWORK_ERROR,details:e,fatal:!1,interstitial:i,url:u,error:r,networkDetails:v,stats:c}},f}();function Vo(f){var h;null==f||null==(h=f.play())||h.catch(function(){})}function Ya(f,h){return"["+f+"] Advancing timeline position to "+h}var Vc=function(f){function h(i,e){var r;return(r=f.call(this,"interstitials",i.logger)||this).HlsPlayerClass=void 0,r.hls=void 0,r.assetListLoader=void 0,r.mediaSelection=null,r.altSelection=null,r.media=null,r.detachedData=null,r.requiredTracks=null,r.manager=null,r.playerQueue=[],r.bufferedPos=-1,r.timelinePos=-1,r.schedule=void 0,r.playingItem=null,r.bufferingItem=null,r.waitingItem=null,r.endedItem=null,r.playingAsset=null,r.endedAsset=null,r.bufferingAsset=null,r.shouldPlay=!1,r.onPlay=function(){r.shouldPlay=!0},r.onPause=function(){r.shouldPlay=!1},r.onSeeking=function(){var u=r.currentTime;if(void 0!==u&&!r.playbackDisabled&&r.schedule){var c=u-r.timelinePos;if(!(Math.abs(c)<1/7056e5)){var p=c<=-.01;r.timelinePos=u,r.bufferedPos=u;var y=r.playingItem;if(!y)return void r.checkBuffer();if(p&&r.schedule.resetErrorsInRange(u,u-c)&&r.updateSchedule(!0),r.checkBuffer(),p&&u<y.start||u>=y.end){var E,x=r.findItemIndex(y),C=r.schedule.findItemIndexAtTime(u);if(-1===C&&r.log("seeked "+(p?"back ":"")+"to position not covered by schedule "+u+" (resolving from "+x+" to "+(C=x+(p?-1:1))+")"),!r.isInterstitial(y)&&null!=(E=r.media)&&E.paused&&(r.shouldPlay=!1),!p&&C>x){var k=r.schedule.findJumpRestrictedIndex(x+1,C);if(k>x)return void r.setSchedulePosition(k)}return void r.setSchedulePosition(C)}var w=r.playingAsset;if(!w){if(r.playingLastItem&&r.isInterstitial(y)){var M=y.event.assetList[0];M&&(r.endedItem=r.playingItem,r.playingItem=null,r.setScheduleToAssetAtTime(u,M))}return}var j,H=w.timelineStart;(p&&u<H||u>=H+(w.duration||0))&&(null!=(j=y.event)&&j.appendInPlace&&(r.clearAssetPlayers(y.event,y),r.flushFrontBuffer(u)),r.setScheduleToAssetAtTime(u,w))}}},r.onTimeupdate=function(){var u=r.currentTime;if(void 0!==u&&!r.playbackDisabled){if(!(u>r.timelinePos))return;r.timelinePos=u,u>r.bufferedPos&&r.checkBuffer();var c=r.playingItem;if(c&&!r.playingLastItem){if(u>=c.end){r.timelinePos=c.end;var v=r.findItemIndex(c);r.setSchedulePosition(v+1)}var p=r.playingAsset;p&&u>=p.timelineStart+(p.duration||0)&&r.setScheduleToAssetAtTime(u,p)}}},r.onScheduleUpdate=function(u,c){var v=r.schedule;if(v){var p=r.playingItem,y=v.events||[],T=v.items||[],E=v.durations,x=u.map(function(H){return H.identifier}),C=!(!y.length&&!x.length);(C||c)&&r.log("INTERSTITIALS_UPDATED ("+y.length+"): "+y+"\nSchedule: "+T.map(function(H){return Ni(H)})+" pos: "+r.timelinePos),x.length&&r.log("Removed events "+x);var k=null,w=null;p&&(k=r.updateItem(p,r.timelinePos),r.itemsMatch(p,k)?r.playingItem=k:r.waitingItem=r.endedItem=null),r.waitingItem=r.updateItem(r.waitingItem),r.endedItem=r.updateItem(r.endedItem);var M=r.bufferingItem;if(M&&(w=r.updateItem(M,r.bufferedPos),r.itemsMatch(M,w)?r.bufferingItem=w:M.event&&(r.bufferingItem=r.playingItem,r.clearInterstitial(M.event,null))),u.forEach(function(H){H.assetList.forEach(function(Y){r.clearAssetPlayer(Y.identifier,null)})}),r.playerQueue.forEach(function(H){if(H.interstitial.appendInPlace){var Y=H.assetItem.timelineStart,j=H.timelineOffset-Y;if(j)try{H.timelineOffset=Y}catch($){Math.abs(j)>Ns&&r.warn($+' ("'+H.assetId+'" '+H.timelineOffset+"->"+Y+")")}}}),C||c){if(r.hls.trigger(O.INTERSTITIALS_UPDATED,{events:y.slice(0),schedule:T.slice(0),durations:E,removedIds:x}),r.isInterstitial(p)&&x.includes(p.event.identifier))return r.warn('Interstitial "'+p.event.identifier+'" removed while playing'),void r.primaryFallback(p.event);p&&r.trimInPlace(k,p),M&&w!==k&&r.trimInPlace(w,M),r.checkBuffer()}}},r.hls=i,r.HlsPlayerClass=e,r.assetListLoader=new Hs(i),r.schedule=new Ju(r.onScheduleUpdate,i.logger),r.registerListeners(),r}xe(h,f);var l=h.prototype;return l.registerListeners=function(){var e=this.hls;
vendor: 4,685 bytes, line 11
11e&&(e.on(O.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(O.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(O.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(O.MANIFEST_LOADING,this.onManifestLoading,this),e.on(O.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(O.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(O.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(O.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(O.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(O.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(O.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(O.BUFFER_APPENDED,this.onBufferAppended,this),e.on(O.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(O.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(O.MEDIA_ENDED,this.onMediaEnded,this),e.on(O.ERROR,this.onError,this),e.on(O.DESTROYING,this.onDestroying,this))},l.unregisterListeners=function(){var e=this.hls;e&&(e.off(O.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(O.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(O.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(O.MANIFEST_LOADING,this.onManifestLoading,this),e.off(O.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(O.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(O.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(O.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(O.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(O.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(O.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(O.BUFFER_CODECS,this.onBufferCodecs,this),e.off(O.BUFFER_APPENDED,this.onBufferAppended,this),e.off(O.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(O.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(O.MEDIA_ENDED,this.onMediaEnded,this),e.off(O.ERROR,this.onError,this),e.off(O.DESTROYING,this.onDestroying,this))},l.startLoad=function(){this.resumeBuffering()},l.stopLoad=function(){this.pauseBuffering()},l.resumeBuffering=function(){var e;null==(e=this.getBufferingPlayer())||e.resumeBuffering()},l.pauseBuffering=function(){var e;null==(e=this.getBufferingPlayer())||e.pauseBuffering()},l.destroy=function(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.schedule=this.manager=null,this.hls=this.HlsPlayerClass=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null},l.onDestroying=function(){var e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)},l.removeMediaListeners=function(e){Ii(e,"play",this.onPlay),Ii(e,"pause",this.onPause),Ii(e,"seeking",this.onSeeking),Ii(e,"timeupdate",this.onTimeupdate)},l.onMediaAttaching=function(e,r){var u=this.media=r.media;oi(u,"seeking",this.onSeeking),oi(u,"timeupdate",this.onTimeupdate),oi(u,"play",this.onPlay),oi(u,"pause",this.onPause)},l.onMediaAttached=function(e,r){var u=this.effectivePlayingItem,c=this.detachedData;if(this.detachedData=null,null===u)this.checkStart();else if(!c){this.clearScheduleState();var v=this.findItemIndex(u);this.setSchedulePosition(v)}},l.clearScheduleState=function(){this.log("clear schedule state"),this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null},l.onMediaDetaching=function(e,r){var u=!!r.transferMedia,c=this.media;if(this.media=null,!u&&(c&&this.removeMediaListeners(c),this.detachedData)){var v=this.getBufferingPlayer();v&&(this.log("Removing schedule state for detachedData and "+v),this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,v.detachMedia()),this.shouldPlay=!1}},l.isInterstitial=function(e){return!(null==e||!e.event)},l.retreiveMediaSource=function(e,r){var u=this.getAssetPlayer(e);u&&this.transferMediaFromPlayer(u,r)},l.transferMediaFromPlayer=function(e,r){var c=e.media;if(e.interstitial.appendInPlace&&c===this.primaryMedia){if(this.bufferingAsset=null,(!r||this.isInterstitial(r)&&!r.event.appendInPlace)&&r&&c)return void(this.detachedData={media:c});var v=e.transferMedia();this.log("transfer MediaSource from "+e+" "+cr(v)),this.detachedData=v}else r&&c&&(this.shouldPlay||(this.shouldPlay=!c.paused))},l.transferMediaTo=function(e,r){var u,v,c=this;if(e.media!==r){var C,p=null,y=this.hls,T=e!==y,E=T&&e.interstitial.appendInPlace,x=null==(u=this.detachedData)?void 0:u.mediaSource;if(y.media)E&&(p=y.transferMedia(),this.detachedData=p),C="Primary";
vendor: 9,823 bytes, line 11
11else if(x){var k=this.getBufferingPlayer();k?(p=k.transferMedia(),C=""+k):C="detached MediaSource"}else C="detached media";if(!p)if(x)this.log("using detachedData: MediaSource "+cr(p=this.detachedData));else if(!this.detachedData||y.media===r){var w=this.playerQueue;w.length>1&&w.forEach(function($){if(T&&$.interstitial.appendInPlace!==E){var le=$.interstitial;c.clearInterstitial($.interstitial,null),le.appendInPlace=!1,le.appendInPlace&&c.warn("Could not change append strategy for queued assets "+le)}}),this.hls.detachMedia(),this.detachedData={media:r}}var M=p&&"mediaSource"in p&&"closed"!==(null==(v=p.mediaSource)?void 0:v.readyState),H=M&&p?p:r;this.log((M?"transfering MediaSource":"attaching media")+" to "+(T?e:"Primary")+" from "+C+" (media.currentTime: "+r.currentTime+")");var Y=this.schedule;H===p&&Y&&(H.overrides={duration:Y.duration,endOfStream:!T||T&&e.assetId===Y.assetIdAtEnd,cueRemoval:!T}),e.attachMedia(H)}},l.onInterstitialCueEnter=function(){this.onTimeupdate()},l.checkStart=function(){var e=this.schedule,r=null==e?void 0:e.events;if(r&&!this.playbackDisabled&&this.media){-1===this.bufferedPos&&(this.bufferedPos=0);var c=this.effectivePlayingItem;if(-1===this.timelinePos){var v=this.hls.startPosition;if(this.log(Ya("checkStart",v)),this.timelinePos=v,r.length&&r[0].cue.pre){var p=e.findEventIndex(r[0].identifier);this.setSchedulePosition(p)}else if(v>=0||!this.primaryLive){var y=this.timelinePos=v>0?v:0,T=e.findItemIndexAtTime(y);this.setSchedulePosition(T)}}else if(c&&!this.playingItem){var E=e.findItemIndex(c);this.setSchedulePosition(E)}}},l.advanceAssetBuffering=function(e,r){var u=e.event,c=u.findAssetIndex(r),v=Uo(u,c);if(u.isAssetPastPlayoutLimit(v)){if(this.schedule){var p,y=null==(p=this.schedule.items)?void 0:p[this.findItemIndex(e)+1];y&&this.bufferedToItem(y)}}else this.bufferedToEvent(e,v)},l.advanceAfterAssetEnded=function(e,r,u){var c=Uo(e,u);if(e.isAssetPastPlayoutLimit(c)){if(this.schedule){var p=this.schedule.items;if(p){var y=r+1;if(y>=p.length)return void this.setSchedulePosition(-1);var E=e.resumeTime;this.timelinePos<E&&(this.log(Ya("advanceAfterAssetEnded",E)),this.timelinePos=E,e.appendInPlace&&this.advanceInPlace(E),this.checkBuffer(this.bufferedPos<E)),this.setSchedulePosition(y)}}}else{if(e.appendInPlace){var v=e.assetList[c];v&&this.advanceInPlace(v.timelineStart)}this.setSchedulePosition(r,c)}},l.setScheduleToAssetAtTime=function(e,r){var u=this.schedule;if(u){var c=r.parentIdentifier,v=u.getEvent(c);if(v){var p=u.findEventIndex(c),y=u.findAssetIndex(v,e);this.advanceAfterAssetEnded(v,p,y-1)}}},l.setSchedulePosition=function(e,r){var u,c=null==(u=this.schedule)?void 0:u.items;if(c&&!this.playbackDisabled){var v=e>=0?c[e]:null;this.log("setSchedulePosition "+e+", "+r+" ("+(v&&Ni(v))+") pos: "+this.timelinePos);var p=this.waitingItem||this.playingItem,y=this.playingLastItem;if(this.isInterstitial(p)){var T=p.event,E=this.playingAsset,x=null==E?void 0:E.identifier,C=x?this.getAssetPlayer(x):null;if(C&&x&&(!this.eventItemsMatch(p,v)||void 0!==r&&x!==T.assetList[r].identifier)){var k,w=T.findAssetIndex(E);if(this.log("INTERSTITIAL_ASSET_ENDED "+(w+1)+"/"+T.assetList.length+" "+Us(E)),this.endedAsset=E,this.playingAsset=null,this.hls.trigger(O.INTERSTITIAL_ASSET_ENDED,{asset:E,assetListIndex:w,event:T,schedule:c.slice(0),scheduleIndex:e,player:C}),p!==this.playingItem)return void(this.itemsMatch(p,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(T,this.findItemIndex(this.playingItem),w));this.retreiveMediaSource(x,v),C.media&&(null==(k=this.detachedData)||!k.mediaSource)&&C.detachMedia()}if(!this.eventItemsMatch(p,v)&&(this.endedItem=p,this.playingItem=null,this.log("INTERSTITIAL_ENDED "+T+" "+Ni(p)),T.hasPlayed=!0,this.hls.trigger(O.INTERSTITIAL_ENDED,{event:T,schedule:c.slice(0),scheduleIndex:e}),T.cue.once)){var M;this.updateSchedule();var H=null==(M=this.schedule)?void 0:M.items;if(v&&H){var Y=this.findItemIndex(v);this.advanceSchedule(Y,H,r,p,y)}return}}this.advanceSchedule(e,c,r,p,y)}},l.advanceSchedule=function(e,r,u,c,v){var p=this,y=this.schedule;if(y){var T=r[e]||null,E=this.primaryMedia,x=this.playerQueue;if(x.length&&x.forEach(function(j){var $=j.interstitial,le=y.findEventIndex($.identifier);(le<e||le>e+1)&&p.clearInterstitial($,T)}),this.isInterstitial(T)){this.timelinePos=Math.min(Math.max(this.timelinePos,T.start),T.end);var C=T.event;if(void 0===u){var k=Uo(C,(u=y.findAssetIndex(C,this.timelinePos))-1);if(C.isAssetPastPlayoutLimit(k)||C.appendInPlace&&this.timelinePos===T.end)return void this.advanceAfterAssetEnded(C,e,u);u=k}var w=this.waitingItem;this.assetsBuffered(T,E)||this.setBufferingItem(T);var M=this.preloadAssets(C,u);if(this.eventItemsMatch(T,w||c)||(this.waitingItem=T,this.log("INTERSTITIAL_STARTED "+Ni(T)+" "+(C.appendInPlace?"append in place":"")),this.hls.trigger(O.INTERSTITIAL_STARTED,{event:C,schedule:r.slice(0),scheduleIndex:e})),!C.assetListLoaded)return void this.log("Waiting for ASSET-LIST to complete loading "+C);if(C.assetListLoader&&(C.assetListLoader.destroy(),C.assetListLoader=void 0),!E)return void this.log("Waiting for attachMedia to start Interstitial "+C);this.waitingItem=this.endedItem=null,this.playingItem=T;var H=C.assetList[u];if(!H)return void this.advanceAfterAssetEnded(C,e,u||0);if(M||(M=this.getAssetPlayer(H.identifier)),(null===M||M.destroyed)&&(this.warn("asset "+(u+1)+"/"+C.assetList.length+" player destroyed "+C),(M=this.createAssetPlayer(C,H,u)).loadSource()),!this.eventItemsMatch(T,this.bufferingItem)&&C.appendInPlace&&this.isAssetBuffered(H))return;this.startAssetPlayer(M,u,r,e,E),this.shouldPlay&&Vo(M.media)}else T?(this.resumePrimary(T,e,c),this.shouldPlay&&Vo(this.hls.media)):v&&this.isInterstitial(c)&&(this.endedItem=null,this.playingItem=c,c.event.appendInPlace||this.attachPrimary(y.durations.primary,null))}},l.resumePrimary=function(e,r,u){var c,v;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log("resuming "+Ni(e)),null==(c=this.detachedData)||!c.mediaSource){var p=this.timelinePos;(p<e.start||p>=e.end)&&(p=this.getPrimaryResumption(e,r),this.log(Ya("resumePrimary",p)),this.timelinePos=p),this.attachPrimary(p,e)}if(u){var y=null==(v=this.schedule)?void 0:v.items;y&&(this.log("INTERSTITIALS_PRIMARY_RESUMED "+Ni(e)),this.hls.trigger(O.INTERSTITIALS_PRIMARY_RESUMED,{schedule:y.slice(0),scheduleIndex:r}),this.checkBuffer())}},l.getPrimaryResumption=function(e,r){var u=e.start;if(this.primaryLive){var c=this.primaryDetails;if(0===r)return this.hls.startPosition;if(c&&(u<c.fragmentStart||u>c.edge))return this.hls.liveSyncPosition||-1}return u},l.isAssetBuffered=function(e){var r=this.getAssetPlayer(e.identifier);return null!=r&&r.hls?r.hls.bufferedToEnd:tr.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)},l.attachPrimary=function(e,r,u){r?this.setBufferingItem(r):this.bufferingItem=this.playingItem,this.bufferingAsset=null;var c=this.primaryMedia;if(c){var v=this.hls;v.media?this.checkBuffer():(this.transferMediaTo(v,c),u&&this.startLoadingPrimaryAt(e,u)),u||(this.log(Ya("attachPrimary",e)),this.timelinePos=e,this.startLoadingPrimaryAt(e,u))}},l.startLoadingPrimaryAt=function(e,r){var u,c=this.hls;!c.loadingEnabled||!c.media||Math.abs(((null==(u=c.mainForwardBufferInfo)?void 0:u.start)||c.media.currentTime)-e)>.5?c.startLoad(e,r):c.bufferingEnabled||c.resumeBuffering()},l.onManifestLoading=function(){var e;this.stopLoad(),null==(e=this.schedule)||e.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(O.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(O.BUFFER_CODECS,this.onBufferCodecs,this)},l.onLevelUpdated=function(e,r){if(-1!==r.level&&this.schedule){var u=this.hls.levels[r.level];if(u.details){var c=Oe(Oe({},this.mediaSelection||this.altSelection),{},{main:u});this.mediaSelection=c,this.schedule.parseInterstitialDateRanges(c,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}}},l.onAudioTrackUpdated=function(e,r){var u=this.hls.audioTracks[r.id],c=this.mediaSelection;if(c){var v=Oe(Oe({},c),{},{audio:u});this.mediaSelection=v}else this.altSelection=Oe(Oe({},this.altSelection),{},{audio:u})},l.onSubtitleTrackUpdated=function(e,r){var u=this.hls.subtitleTracks[r.id],c=this.mediaSelection;if(c){var v=Oe(Oe({},c),{},{subtitles:u});this.mediaSelection=v}else this.altSelection=Oe(Oe({},this.altSelection),{},{subtitles:u})},l.onAudioTrackSwitching=function(e,r){var u=yu(r);this.playerQueue.forEach(function(c){var v=c.hls;return v&&(v.setAudioOption(r)||v.setAudioOption(u))})},l.onSubtitleTrackSwitch=function(e,r){var u=yu(r);this.playerQueue.forEach(function(c){var v=c.hls;return v&&(v.setSubtitleOption(r)||-1!==r.id&&v.setSubtitleOption(u))})},l.onBufferCodecs=function(e,r){var u=r.tracks;u&&(this.requiredTracks=u)},l.onBufferAppended=function(e,r){this.checkBuffer()},l.onBufferFlushed=function(e,r){var u=this.playingItem;!u||this.itemsMatch(u,this.bufferingItem)||this.isInterstitial(u)||(this.bufferedPos=this.timelinePos,this.checkBuffer())},l.onBufferedToEnd=function(e){if(this.schedule){var r=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&r){for(var u=0;u<r.length;u++){var c=r[u];if(c.cue.post){var v,p=this.schedule.findEventIndex(c.identifier),y=null==(v=this.schedule.items)?void 0:v[p];this.isInterstitial(y)&&this.eventItemsMatch(y,this.bufferingItem)&&this.bufferedToItem(y,0);break}}this.bufferedPos=Number.MAX_VALUE}}},l.onMediaEnded=function(e){var r=this.playingItem;if(!this.playingLastItem&&r){var u=this.findItemIndex(r);this.setSchedulePosition(u+1)}else this.shouldPlay=!1}
vendor: 5,473 bytes, line 11
11,l.updateItem=function(e,r){var u,c=null==(u=this.schedule)?void 0:u.items;return e&&c&&c[this.findItemIndex(e,r)]||null},l.trimInPlace=function(e,r){var u=this;if(this.isInterstitial(e)&&e.event.appendInPlace&&r.end-e.end>.25){e.event.assetList.forEach(function(y,T){e.event.isAssetPastPlayoutLimit(T)&&u.clearAssetPlayer(y.identifier,null)});var c=e.end+.25,v=tr.bufferInfo(this.primaryMedia,c,0);(v.end>c||(v.nextStart||0)>c)&&(this.log("trim buffered interstitial "+Ni(e)+" (was "+Ni(r)+")"),this.attachPrimary(c,null,!0),this.flushFrontBuffer(c))}},l.itemsMatch=function(e,r){return!!r&&(e===r||e.event&&r.event&&this.eventItemsMatch(e,r)||!e.event&&!r.event&&this.findItemIndex(e)===this.findItemIndex(r))},l.eventItemsMatch=function(e,r){var u;return!!r&&(e===r||e.event.identifier===(null==(u=r.event)?void 0:u.identifier))},l.findItemIndex=function(e,r){return e&&this.schedule?this.schedule.findItemIndex(e,r):-1},l.updateSchedule=function(e){var r;void 0===e&&(e=!1);var u=this.mediaSelection;u&&(null==(r=this.schedule)||r.updateSchedule(u,[],e))},l.checkBuffer=function(e){var r,u=null==(r=this.schedule)?void 0:r.items;if(u){var c=tr.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=c.len<1),this.updateBufferedPos(c.end,u,e)}},l.updateBufferedPos=function(e,r,u){var c=this.schedule,v=this.bufferingItem;if(!(this.bufferedPos>e)&&c){if(1===r.length&&this.itemsMatch(r[0],v))return void(this.bufferedPos=e);var p=this.playingItem,y=this.findItemIndex(p),T=c.findItemIndexAtTime(e);if(this.bufferedPos<e){var E,x=this.findItemIndex(v),C=Math.min(x+1,r.length-1),k=r[C];if((-1===T&&v&&e>=v.end||null!=(E=k.event)&&E.appendInPlace&&e+.01>=k.start)&&(T=C),this.isInterstitial(v)){var w=v.event;if(C-y>1&&!1===w.appendInPlace||0===w.assetList.length&&w.assetListLoader)return}if(this.bufferedPos=e,T>x&&T>y)this.bufferedToItem(k);else{var M=this.primaryDetails;this.primaryLive&&M&&e>M.edge-M.targetduration&&k.start<M.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(k)&&this.preloadAssets(k.event,0)}}else u&&p&&!this.itemsMatch(p,v)&&(T===y?this.bufferedToItem(p):T===y+1&&this.bufferedToItem(r[T]))}},l.assetsBuffered=function(e,r){var u=this;return 0!==e.event.assetList.length&&!e.event.assetList.some(function(v){var p=u.getAssetPlayer(v.identifier);return!(null!=p&&p.bufferedInPlaceToEnd(r))})},l.setBufferingItem=function(e){var r=this,u=this.bufferingItem,c=this.schedule;if(!this.itemsMatch(e,u)&&c){var v=c.items,p=c.events;if(!v||!p)return u;var y=this.isInterstitial(e),T=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));var E=T?T.remaining:u?u.end-this.timelinePos:0;if(this.log("INTERSTITIALS_BUFFERED_TO_BOUNDARY "+Ni(e)+(u?" ("+E.toFixed(2)+" remaining)":"")),!this.playbackDisabled)if(y){var x=c.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach(function(C,k){var w=r.getAssetPlayer(C.identifier);w&&(k===x&&w.loadSource(),w.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(function(C){return C.pauseBuffering()});this.hls.trigger(O.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:p.slice(0),schedule:v.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}else this.bufferingItem!==e&&(this.bufferingItem=e);return u},l.bufferedToItem=function(e,r){void 0===r&&(r=0);var u=this.setBufferingItem(e);if(!this.playbackDisabled)if(this.isInterstitial(e))this.bufferedToEvent(e,r);else if(null!==u){this.bufferingAsset=null;var c=this.detachedData;c&&c.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e)}},l.preloadPrimary=function(e){var r=this.findItemIndex(e),u=this.getPrimaryResumption(e,r);this.startLoadingPrimaryAt(u)},l.bufferedToEvent=function(e,r){var u=e.event;if(0===u.assetList.length&&!u.assetListLoader||!u.cue.once){var p=this.preloadAssets(u,r);if(null!=p&&p.interstitial.appendInPlace){var y=this.primaryMedia;y&&this.bufferAssetPlayer(p,y)}}},l.preloadAssets=function(e,r){var u=e.assetUrl,c=e.assetList.length;if(0!==c||e.assetListLoader){if(!e.cue.once&&c){for(var M=r;M<c;M++){var H=e.assetList[M],Y=this.getAssetPlayerQueueIndex(H.identifier);(-1===Y||this.playerQueue[Y].destroyed)&&!H.error&&this.createAssetPlayer(e,H,M)}var j=e.assetList[r];if(j){var $=this.getAssetPlayer(j.identifier);return $&&$.loadSource(),$}}}else{var y=e.timelineStart;if(e.appendInPlace){var T,E=this.playingItem;!this.isInterstitial(E)&&(null==E||null==(T=E.nextEvent)?void 0:T.identifier)===e.identifier&&this.flushFrontBuffer(y+.25)}var x,C=0;if(!this.playingItem&&this.primaryLive&&-1===(C=this.hls.startPosition)&&(C=this.hls.liveSyncPosition||0),C&&!e.cue.pre&&!e.cue.post){var k=C-y;k>0&&(x=Math.round(1e3*k)/1e3)}if(this.log("Load interstitial asset "+(r+1)+"/"+(u?1:c)+" "+e+(x?" live-start: "+C+" start-offset: "+x:"")),u)return this.createAsset(e,0,0,y,e.duration,u);var w=this.assetListLoader.loadAssetList(e,x);w&&(e.assetListLoader=w)}return null},l.flushFrontBuffer=function(e){var r=this,u=this.requiredTracks;u&&(this.log("Removing front buffer starting at "+e),Object.keys(u).forEach(function(v){r.hls.trigger(O.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:v})}))},l.getAssetPlayerQueueIndex=function(e){for(var r=this.playerQueue,u=0;u<r.length;u++)if(e===r[u].assetId)return u;return-1},l.getAssetPlayer=function(e){var r=this.getAssetPlayerQueueIndex(e);return this.playerQueue[r]||null}
vendor: 20,390 bytes, line 11
11,l.getBufferingPlayer=function(){var e=this.playerQueue,r=this.primaryMedia;if(r)for(var u=0;u<e.length;u++)if(e[u].media===r)return e[u];return null},l.createAsset=function(e,r,u,c,v,p){var y={parentIdentifier:e.identifier,identifier:_t(e,p,r),duration:v,startOffset:u,timelineStart:c,uri:p};return this.createAssetPlayer(e,y,r)},l.createAssetPlayer=function(e,r,u){var c=this,v=this.hls,p=v.userConfig,y=p.videoPreference,T=v.loadLevelObj||v.levels[v.currentLevel];(y||T)&&(y=be({},y),T.videoCodec&&(y.videoCodec=T.videoCodec),T.videoRange&&(y.allowedVideoRanges=[T.videoRange]));var E=v.audioTracks[v.audioTrack],x=v.subtitleTracks[v.subtitleTrack],C=0;if(this.primaryLive||e.appendInPlace){var k=this.timelinePos-r.timelineStart;if(k>1){var w=r.duration;w&&k<w&&(C=k)}}var M=r.identifier,H=Oe(Oe({},p),{},{maxMaxBufferLength:Math.min(180,v.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:v.sessionId,assetPlayerId:M,abrEwmaDefaultEstimate:v.bandwidthEstimate,interstitialsController:void 0,startPosition:C,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:y,audioPreference:E||p.audioPreference,subtitlePreference:x||p.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,r.timelineStart&&(H.timelineOffset=r.timelineStart));var Y=H.cmcd;null!=Y&&Y.sessionId&&Y.contentId&&(H.cmcd=be({},Y,{contentId:Bo(r.uri)})),this.getAssetPlayer(M)&&this.warn("Duplicate date range identifier "+e+" and asset "+M);var j=new ii(this.HlsPlayerClass,H,e,r);this.playerQueue.push(j),e.assetList[u]=r;var $=!0,le=function(oe){if(oe.live){var fe,Ce=new Error("Interstitials MUST be VOD assets "+e),ze={fatal:!0,type:Ae.OTHER_ERROR,details:ue.INTERSTITIAL_ASSET_ITEM_ERROR,error:Ce},He=(null==(fe=c.schedule)?void 0:fe.findEventIndex(e.identifier))||-1;c.handleAssetItemError(ze,e,He,u,Ce.message)}else{var We=oe.edge-oe.fragmentStart,vt=r.duration;($||null===vt||We>vt)&&($=!1,c.log('Interstitial asset "'+M+'" duration change '+vt+" > "+We),r.duration=We,c.updateSchedule())}};j.on(O.LEVEL_UPDATED,function(Te,oe){return le(oe.details)}),j.on(O.LEVEL_PTS_UPDATED,function(Te,oe){return le(oe.details)}),j.on(O.EVENT_CUE_ENTER,function(){return c.onInterstitialCueEnter()});var pe=function(oe,fe){var Ce=c.getAssetPlayer(M);if(Ce&&fe.tracks){Ce.off(O.BUFFER_CODECS,pe),Ce.tracks=fe.tracks;var ze=c.primaryMedia;c.bufferingAsset===Ce.assetItem&&ze&&!Ce.media&&c.bufferAssetPlayer(Ce,ze)}};j.on(O.BUFFER_CODECS,pe),j.on(O.BUFFERED_TO_END,function(){var oe,fe=c.getAssetPlayer(M);if(c.log("buffered to end of asset "+fe),fe&&c.schedule){var Ce=c.schedule.findEventIndex(e.identifier),ze=null==(oe=c.schedule.items)?void 0:oe[Ce];c.isInterstitial(ze)&&c.advanceAssetBuffering(ze,r)}});var we=function(oe){return function(){if(c.getAssetPlayer(M)&&c.schedule){c.shouldPlay=!0;var Ce=c.schedule.findEventIndex(e.identifier);c.advanceAfterAssetEnded(e,Ce,oe)}}};return j.once(O.MEDIA_ENDED,we(u)),j.once(O.PLAYOUT_LIMIT_REACHED,we(1/0)),j.on(O.ERROR,function(Te,oe){if(c.schedule){var fe=c.getAssetPlayer(M);if(oe.details===ue.BUFFER_STALLED_ERROR)return null!=fe&&fe.appendInPlace?void c.handleInPlaceStall(e):(c.onTimeupdate(),void c.checkBuffer(!0));c.handleAssetItemError(oe,e,c.schedule.findEventIndex(e.identifier),u,"Asset player error "+oe.error+" "+e)}}),j.on(O.DESTROYING,function(){if(c.getAssetPlayer(M)&&c.schedule){var oe=new Error("Asset player destroyed unexpectedly "+M);c.handleAssetItemError({fatal:!0,type:Ae.OTHER_ERROR,details:ue.INTERSTITIAL_ASSET_ITEM_ERROR,error:oe},e,c.schedule.findEventIndex(e.identifier),u,oe.message)}}),this.log("INTERSTITIAL_ASSET_PLAYER_CREATED "+Us(r)),this.hls.trigger(O.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:r,assetListIndex:u,event:e,player:j}),j},l.clearInterstitial=function(e,r){this.clearAssetPlayers(e,r),e.reset()},l.clearAssetPlayers=function(e,r){var u=this;e.assetList.forEach(function(c){u.clearAssetPlayer(c.identifier,r)})},l.resetAssetPlayer=function(e){var r=this.getAssetPlayerQueueIndex(e);if(-1!==r){this.log('reset asset player "'+e+'" after error');var u=this.playerQueue[r];this.transferMediaFromPlayer(u,null),u.resetDetails()}},l.clearAssetPlayer=function(e,r){var u=this.getAssetPlayerQueueIndex(e);if(-1!==u){var c=this.playerQueue[u];this.log("clear "+c+" toSegment: "+(r&&Ni(r))),this.transferMediaFromPlayer(c,r),this.playerQueue.splice(u,1),c.destroy()}},l.emptyPlayerQueue=function(){for(var e;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]},l.startAssetPlayer=function(e,r,u,c,v){var p=e.interstitial,y=e.assetItem,T=e.assetId,E=p.assetList.length,x=this.playingAsset;this.endedAsset=null,this.playingAsset=y,(!x||x.identifier!==T)&&(x&&(this.clearAssetPlayer(x.identifier,u[c]),delete x.error),this.log("INTERSTITIAL_ASSET_STARTED "+(r+1)+"/"+E+" "+Us(y)),this.hls.trigger(O.INTERSTITIAL_ASSET_STARTED,{asset:y,assetListIndex:r,event:p,schedule:u.slice(0),scheduleIndex:c,player:e})),this.bufferAssetPlayer(e,v)},l.bufferAssetPlayer=function(e,r){var u,c;if(this.schedule){var v=e.interstitial,p=e.assetItem,y=this.schedule.findEventIndex(v.identifier),T=null==(u=this.schedule.items)?void 0:u[y];if(T){e.loadSource(),this.setBufferingItem(T),this.bufferingAsset=p;var E=this.getBufferingPlayer();if(E!==e){var x=v.appendInPlace;if(!x||!1!==(null==E?void 0:E.interstitial.appendInPlace)){var C=(null==E?void 0:E.tracks)||(null==(c=this.detachedData)?void 0:c.tracks)||this.requiredTracks;if(x&&p!==this.playingAsset){if(!e.tracks)return void this.log("Waiting for track info before buffering "+e);if(C&&!rn(C,e.tracks)){var k=new Error("Asset "+Us(p)+" SourceBuffer tracks ('"+Object.keys(e.tracks)+"') are not compatible with primary content tracks ('"+Object.keys(C)+"')"),w={fatal:!0,type:Ae.OTHER_ERROR,details:ue.INTERSTITIAL_ASSET_ITEM_ERROR,error:k},M=v.findAssetIndex(p);return void this.handleAssetItemError(w,v,y,M,k.message)}}this.transferMediaTo(e,r)}}}}},l.handleInPlaceStall=function(e){var r=this.schedule,u=this.primaryMedia;if(r&&u){var c=u.currentTime,v=r.findAssetIndex(e,c),p=e.assetList[v];if(p){var y=this.getAssetPlayer(p.identifier);if(y){var T=y.currentTime||c-p.timelineStart,E=y.duration-T;if(this.warn("Stalled at "+T+" of "+(T+E)+" in "+y+" "+e+" (media.currentTime: "+c+")"),T&&(E/u.playbackRate<.5||y.bufferedInPlaceToEnd(u))&&y.hls){var x=r.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,x,v)}}}}},l.advanceInPlace=function(e){var r=this.primaryMedia;r&&r.currentTime<e&&(r.currentTime=e)},l.handleAssetItemError=function(e,r,u,c,v){if(e.details!==ue.BUFFER_STALLED_ERROR){var p=r.assetList[c]||null;if(this.warn("INTERSTITIAL_ASSET_ERROR "+(p&&Us(p))+" "+e.error),this.schedule){var y=(null==p?void 0:p.identifier)||"",T=this.getAssetPlayerQueueIndex(y),E=this.playerQueue[T]||null,x=this.schedule.items,C=be({},e,{fatal:!1,errorAction:zt(!0),asset:p,assetListIndex:c,event:r,schedule:x,scheduleIndex:u,player:E});if(this.hls.trigger(O.INTERSTITIAL_ASSET_ERROR,C),e.fatal){var k=this.playingAsset,w=this.bufferingAsset,M=new Error(v);if(p&&(this.clearAssetPlayer(y,null),p.error=M),r.assetList.some(function(Y){return!Y.error}))for(var H=c;H<r.assetList.length;H++)this.resetAssetPlayer(r.assetList[H].identifier);else r.error=M;this.updateSchedule(!0),r.error?this.primaryFallback(r):k&&k.identifier===y?this.advanceAfterAssetEnded(r,u,c):w&&w.identifier===y&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,w)}}}},l.primaryFallback=function(e){var r=e.timelineStart,u=this.effectivePlayingItem,c=this.timelinePos;if(u){this.log('Fallback to primary from event "'+e.identifier+'" start: '+r+" pos: "+c+" playing: "+Ni(u)+" error: "+e.error),-1===c&&(c=this.hls.startPosition);var v=this.updateItem(u,c);this.itemsMatch(u,v)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(r,null),this.flushFrontBuffer(r))}else if(-1===c)return void this.checkStart();if(this.schedule){var p=this.schedule.findItemIndexAtTime(c);this.setSchedulePosition(p)}},l.onAssetListLoaded=function(e,r){var u,v,c=this,p=r.event,y=p.identifier,T=r.assetListResponse.ASSETS;if(null!=(u=this.schedule)&&u.hasEvent(y)){var E=p.timelineStart,x=p.duration,C=0;T.forEach(function(we,Te){var oe=parseFloat(we.DURATION);c.createAsset(p,Te,C,E+C,oe,we.URI),C+=oe}),p.duration=C,this.log("Loaded asset-list with duration: "+C+" (was: "+x+") "+p);var k=this.waitingItem,w=(null==k?void 0:k.event.identifier)===y;this.updateSchedule();var M=null==(v=this.bufferingItem)?void 0:v.event;if(w){var H,Y=this.schedule.findEventIndex(y),j=null==(H=this.schedule.items)?void 0:H[Y];if(j){if(!this.playingItem&&this.timelinePos>j.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==Y)return p.error=new Error("Interstitial "+(T.length?"no longer within playback range":"asset-list is empty")+" "+this.timelinePos+" "+p),this.log(p.error.message),this.updateSchedule(!0),void this.primaryFallback(p);this.setBufferingItem(j)}this.setSchedulePosition(Y)}else if((null==M?void 0:M.identifier)===y){var le=p.assetList[0];if(le){var pe=this.getAssetPlayer(le.identifier);if(M.appendInPlace){var Se=this.primaryMedia;pe&&Se&&this.bufferAssetPlayer(pe,Se)}else pe&&pe.loadSource()}}}},l.onError=function(e,r){if(this.schedule)switch(r.details){case ue.ASSET_LIST_PARSING_ERROR:case ue.ASSET_LIST_LOAD_ERROR:case ue.ASSET_LIST_LOAD_TIMEOUT:var u=r.interstitial;u&&(this.updateSchedule(!0),this.primaryFallback(u));break;case ue.BUFFER_STALLED_ERROR:var c=this.endedItem||this.waitingItem||this.playingItem;if(this.isInterstitial(c)&&c.event.appendInPlace)return void this.handleInPlaceStall(c.event);this.log("Primary player stall @"+this.timelinePos+" bufferedPos: "+this.bufferedPos),this.onTimeupdate(),this.checkBuffer(!0)}},ce(h,[{key:"interstitialsManager",get:function(){if(!this.hls)return null;if(this.manager)return this.manager;var e=this,r=function(){return e.bufferingItem||e.waitingItem},u=function(k){return k&&e.getAssetPlayer(k.identifier)},c=function(k,w,M,H,Y){if(k){var j=k[w].start,$=k.event;if($){if("playout"===w||$.timelineOccupancy!==Bs.Point){var le=u(M);(null==le?void 0:le.interstitial)===$&&(j+=le.assetItem.startOffset+le[Y])}}else j+=("bufferedPos"===H?p():e[H])-k.start;return j}return 0},p=function(){var k=e.bufferedPos;return k===Number.MAX_VALUE?y("primary"):Math.max(k,0)},y=function(k){var w,M;return null!=(w=e.primaryDetails)&&w.live?e.primaryDetails.edge:(null==(M=e.schedule)?void 0:M.durations[k])||0},T=function(k,w){var M,H,Y=e.effectivePlayingItem;if((null==Y||null==(M=Y.event)||!M.restrictions.skip)&&e.schedule){e.log("seek to "+k+' "'+w+'"');var j=e.effectivePlayingItem,$=e.schedule.findItemIndexAtTime(k,w),le=null==(H=e.schedule.items)?void 0:H[$],pe=e.getBufferingPlayer(),Se=null==pe?void 0:pe.interstitial,we=null==Se?void 0:Se.appendInPlace,Te=j&&e.itemsMatch(j,le);if(j&&(we||Te)){var oe=u(e.playingAsset),fe=(null==oe?void 0:oe.media)||e.primaryMedia;if(fe){var Ce="primary"===w?fe.currentTime:c(j,w,e.playingAsset,"timelinePos","currentTime"),He=(we?Ce:fe.currentTime)+(k-Ce);if(He>=0&&(!oe||we||He<=oe.duration))return void(fe.currentTime=He)}}if(le){var We=k;"primary"!==w&&(We=le.start+(k-le[w].start));var St=!e.isInterstitial(le);if(e.isInterstitial(j)&&!j.event.appendInPlace||!St&&!le.event.appendInPlace){if(j){var Ht=e.findItemIndex(j);if($>Ht){var Lt=e.schedule.findJumpRestrictedIndex(Ht+1,$);if(Lt>Ht)return void e.setSchedulePosition(Lt)}var bt=0;if(St)e.timelinePos=We,e.checkBuffer();else for(var kt=le.event.assetList,Gt=k-(le[w]||le).start,ar=kt.length;ar--;){var Zt=kt[ar];if(Zt.duration&&Gt>=Zt.startOffset&&Gt<Zt.startOffset+Zt.duration){bt=ar;break}}e.setSchedulePosition($,bt)}}else{var Pt=e.media||(we?null==pe?void 0:pe.media:null);Pt&&(Pt.currentTime=We)}}}},E=function(){var k=e.effectivePlayingItem;if(e.isInterstitial(k))return k;var w=r();return e.isInterstitial(w)?w:null},x={get bufferedEnd(){var w,C=r(),k=e.bufferingItem;return k&&k===C&&(c(k,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-k.playout.start||(null==(w=e.bufferingAsset)?void 0:w.startOffset))||0},get currentTime(){var C=E(),k=e.effectivePlayingItem;return k&&k===C?c(k,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-k.playout.start:0},set currentTime(C){var k=E(),w=e.effectivePlayingItem;w&&w===k&&T(C+w.playout.start,"playout")},get duration(){var C=E();return C?C.playout.end-C.playout.start:0},get assetPlayers(){var C,k=null==(C=E())?void 0:C.event.assetList;return k?k.map(function(w){return e.getAssetPlayer(w.identifier)}):[]},get playingIndex(){var C,k=null==(C=E())?void 0:C.event;return k&&e.effectivePlayingAsset?k.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return E()}};return this.manager={get events(){var C;return(null==(C=e.schedule)||null==(C=C.events)?void 0:C.slice(0))||[]},get schedule(){var C;return(null==(C=e.schedule)||null==(C=C.items)?void 0:C.slice(0))||[]},get interstitialPlayer(){return E()?x:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return r()},get bufferingIndex(){var C=r();return e.findItemIndex(C)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){return e.findItemIndex(e.effectivePlayingItem)},primary:{get bufferedEnd(){return p()},get currentTime(){var C=e.timelinePos;return C>0?C:0},set currentTime(C){T(C,"primary")},get duration(){return y("primary")},get seekableStart(){var C;return(null==(C=e.primaryDetails)?void 0:C.fragmentStart)||0}},integrated:{get bufferedEnd(){return c(r(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return c(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(C){T(C,"integrated")},get duration(){return y("integrated")},get seekableStart(){var C;return function(k,w){var M;if(0!==k&&"primary"!==w&&null!=(M=e.schedule)&&M.length){var H,Y=e.schedule.findItemIndexAtTime(k),j=null==(H=e.schedule.items)?void 0:H[Y];if(j)return k+(j[w].start-j.start)}return k}((null==(C=e.primaryDetails)?void 0:C.fragmentStart)||0,"integrated")}},skip:function(){var k=e.effectivePlayingItem,w=null==k?void 0:k.event;if(w&&!w.restrictions.skip){var M=e.findItemIndex(k);w.appendInPlace?T(k.playout.start+k.event.duration+.001,"playout"):e.advanceAfterAssetEnded(w,M,1/0)}}}}},{key:"effectivePlayingItem",get:function(){return this.waitingItem||this.playingItem||this.endedItem}},{key:"effectivePlayingAsset",get:function(){return this.playingAsset||this.endedAsset}},{key:"playingLastItem",get:function(){var e,r=this.playingItem,u=null==(e=this.schedule)?void 0:e.items;return!!(this.playbackStarted&&r&&u)&&this.findItemIndex(r)===u.length-1}},{key:"playbackStarted",get:function(){return null!==this.effectivePlayingItem}},{key:"currentTime",get:function(){var e,r;if(null!==this.mediaSelection){var u=this.waitingItem||this.playingItem;if(!this.isInterstitial(u)||u.event.appendInPlace){var c=this.media;!c&&null!=(e=this.bufferingItem)&&null!=(e=e.event)&&e.appendInPlace&&(c=this.primaryMedia);var v=null==(r=c)?void 0:r.currentTime;if(void 0!==v&&X(v))return v}}}},{key:"primaryMedia",get:function(){var e;return this.media||(null==(e=this.detachedData)?void 0:e.media)||null}},{key:"playbackDisabled",get:function(){return!1===this.hls.config.enableInterstitialPlayback}},{key:"primaryDetails",get:function(){var e;return null==(e=this.mediaSelection)?void 0:e.main.details}},{key:"primaryLive",get:function(){var e;return!(null==(e=this.primaryDetails)||!e.live)}}])}(Ze),kv=function(f){function h(i,e,r){var u;return(u=f.call(this,i,e,r,"subtitle-stream-controller",Ie.SUBTITLE)||this).currentTrackId=-1,u.tracksBuffered=[],u.mainDetails=null,u.registerListeners(),u}xe(h,f);var l=h.prototype;return l.onHandlerDestroying=function(){this.unregisterListeners(),f.prototype.onHandlerDestroying.call(this),this.mainDetails=null},l.registerListeners=function(){f.prototype.registerListeners.call(this);var e=this.hls;e.on(O.LEVEL_LOADED,this.onLevelLoaded,this),e.on(O.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(O.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(O.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(O.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(O.BUFFER_FLUSHING,this.onBufferFlushing,this)},l.unregisterListeners=function(){f.prototype.unregisterListeners.call(this);var e=this.hls;e.off(O.LEVEL_LOADED,this.onLevelLoaded,this),e.off(O.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(O.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(O.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(O.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(O.BUFFER_FLUSHING,this.onBufferFlushing,this)},l.startLoad=function(e,r){this.stopLoad(),this.state=Ke.IDLE,this.setInterval(500),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=r?-1:e,this.tick()},l.onManifestLoading=function(){f.prototype.onManifestLoading.call(this),this.mainDetails=null},l.onMediaDetaching=function(e,r){this.tracksBuffered=[],f.prototype.onMediaDetaching.call(this,e,r)},l.onLevelLoaded=function(e,r){this.mainDetails=r.details},l.onSubtitleFragProcessed=function(e,r){var u=r.frag,c=r.success;if(this.fragContextChanged(u)||(gr(u)&&(this.fragPrevious=u),this.state=Ke.IDLE),c){var v=this.tracksBuffered[this.currentTrackId];if(v){for(var p,y=u.start,T=0;T<v.length;T++)if(y>=v[T].start&&y<=v[T].end){p=v[T];break}var E=u.start+u.duration;p?p.end=E:v.push(p={start:y,end:E}),this.fragmentTracker.fragBuffered(u),this.fragBufferedComplete(u,null),this.media&&this.tick()}}},l.onBufferFlushing=function(e,r){var u=r.startOffset,c=r.endOffset;if(0===u&&c!==Number.POSITIVE_INFINITY){var v=c-1;if(v<=0)return;r.endOffsetSubtitles=Math.max(0,v),this.tracksBuffered.forEach(function(p){for(var y=0;y<p.length;)if(p[y].end<=v)p.shift();else{if(!(p[y].start<v))break;p[y].start=v,y++}}),this.fragmentTracker.removeFragmentsInRange(u,v,Ie.SUBTITLE)}},l.onError=function(e,r){var u=r.frag;(null==u?void 0:u.type)===Ie.SUBTITLE&&(r.details===ue.FRAG_GAP&&this.fragmentTracker.fragBuffered(u,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Ke.STOPPED&&(this.state=Ke.IDLE))},l.onSubtitleTracksUpdated=function(e,r){var u=this,c=r.subtitleTracks;this.levels&&Do(this.levels,c)?this.levels=c.map(function(v){return new wa(v)}):(this.tracksBuffered=[],this.levels=c.map(function(v){var p=new wa(v);return u.tracksBuffered[p.id]=[],p}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,Ie.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null)},l.onSubtitleTrackSwitch=function(e,r){var u;if(this.currentTrackId=r.id,null!=(u=this.levels)&&u.length&&-1!==this.currentTrackId){var c=this.levels[this.currentTrackId];this.mediaBuffer=null!=c&&c.details?this.mediaBufferTimeRanges:null,c&&this.state!==Ke.STOPPED&&this.setInterval(500)}else this.clearInterval()},l.onSubtitleTrackLoaded=function(e,r){var u,c=this.currentTrackId,v=this.levels,p=r.details,y=r.id;if(v){var T=v[y];if(!(y>=v.length)&&T){this.log("Subtitle track "+y+" loaded ["+p.startSN+","+p.endSN+"]"+(p.lastPartSn?"[part-"+p.lastPartSn+"-"+p.lastPartIndex+"]":"")+",duration:"+p.totalduration),this.mediaBuffer=this.mediaBufferTimeRanges;var E=0;if(p.live||null!=(u=T.details)&&u.live){if(p.deltaUpdateFailed)return;var x=this.mainDetails;if(!x)return void(this.startFragRequested=!1);var k,C=x.fragments[0];T.details?0===(E=this.alignPlaylists(p,T.details,null==(k=this.levelLastLoaded)?void 0:k.details))&&C&&ur(p,E=C.start):p.hasProgramDateTime&&x.hasProgramDateTime?(aa(p,x),E=p.fragmentStart):C&&ur(p,E=C.start),x&&!this.startFragRequested&&this.setStartPosition(x,E)}T.details=p,this.levelLastLoaded=T,y===c&&(this.hls.trigger(O.SUBTITLE_TRACK_UPDATED,{details:p,id:y,groupId:r.groupId}),this.tick(),p.live&&!this.fragCurrent&&this.media&&this.state===Ke.IDLE)&&(va(null,p.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),T.details=void 0))}}else this.warn("Subtitle tracks were reset while loading level "+y)},l._handleFragmentLoadComplete=function(e){var r=this,u=e.frag,c=e.payload,v=u.decryptdata,p=this.hls;if(!this.fragContextChanged(u)&&c&&c.byteLength>0&&null!=v&&v.key&&v.iv&&Na(v.method)){var y=performance.now();
vendor: 6,196 bytes, line 11
11this.decrypter.decrypt(new Uint8Array(c),v.key.buffer,v.iv.buffer,Yl(v.method)).catch(function(T){throw p.trigger(O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.FRAG_DECRYPT_ERROR,fatal:!1,error:T,reason:T.message,frag:u}),T}).then(function(T){var E=performance.now();p.trigger(O.FRAG_DECRYPTED,{frag:u,payload:T,stats:{tstart:y,tdecrypt:E}})}).catch(function(T){r.warn(T.name+": "+T.message),r.state=Ke.IDLE})}},l.doTick=function(){if(this.media){if(this.state===Ke.IDLE){var r=this.levels,u=null==r?void 0:r[this.currentTrackId];if(!u||!r.length||!u.details||this.waitForLive(u))return;var c=this.config,v=this.getLoadPosition(),p=tr.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],v,c.maxBufferHole),y=p.end,E=u.details;if(p.len>this.hls.maxBufferLength+E.levelTargetDuration)return;var C=E.fragments,k=C.length,w=E.edge,M=null,H=this.fragPrevious;if(y<w){var Y=c.maxFragLookUpTolerance,j=y>w-Y?0:Y;!(M=va(H,C,Math.max(C[0].start,y),j))&&H&&H.start<C[0].start&&(M=C[0])}else M=C[k-1];if(!(M=this.filterReplacedPrimary(M,u.details)))return;var le=C[M.sn-E.startSN-1];if(le&&le.cc===M.cc&&this.fragmentTracker.getState(le)===It_NOT_LOADED&&(M=le),this.fragmentTracker.getState(M)===It_NOT_LOADED){var pe=this.mapToInitFragWhenRequired(M);pe&&this.loadFragment(pe,u,y)}}}else this.state=Ke.IDLE},l.loadFragment=function(e,r,u){gr(e)?f.prototype.loadFragment.call(this,e,r,u):this._loadInitSegment(e,r)},ce(h,[{key:"mediaBufferTimeRanges",get:function(){return new Hc(this.tracksBuffered[this.currentTrackId]||[])}}])}(Pu),Hc=function(h){this.buffered=void 0;var l=function(e,r,u){if((r>>>=0)>u-1)throw new DOMException("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+r+") is greater than the maximum bound ("+u+")");return h[r][e]};this.buffered={get length(){return h.length},end:function(e){return l("end",e,h.length)},start:function(e){return l("start",e,h.length)}}};function Dn(f,h){var l;try{l=new Event("addtrack")}catch(i){(l=document.createEvent("Event")).initEvent("addtrack",!1,!1)}l.track=f,h.dispatchEvent(l)}function Wd(f,h){var l=f.mode;if("disabled"===l&&(f.mode="hidden"),f.cues&&!f.cues.getCueById(h.id))try{if(f.addCue(h),!f.cues.getCueById(h.id))throw new Error("addCue is failed for: "+h)}catch(e){Vt.debug("[texttrack-utils]: "+e);try{var i=new self.TextTrackCue(h.startTime,h.endTime,h.text);i.id=h.id,f.addCue(i)}catch(r){Vt.debug("[texttrack-utils]: Legacy TextTrackCue fallback failed: "+r)}}"disabled"===l&&(f.mode=l)}function Gs(f,h){var l=f.mode;if("disabled"===l&&(f.mode="hidden"),f.cues)for(var i=f.cues.length;i--;)h&&f.cues[i].removeEventListener("enter",h),f.removeCue(f.cues[i]);"disabled"===l&&(f.mode=l)}function el(f,h,l,i){var e=f.mode;if("disabled"===e&&(f.mode="hidden"),f.cues&&f.cues.length>0)for(var r=function tl(f,h,l){var i=[],e=function ye(f,h){if(h<=f[0].startTime)return 0;var l=f.length-1;if(h>f[l].endTime)return-1;for(var r,i=0,e=l;i<=e;)if(h<f[r=Math.floor((e+i)/2)].startTime)e=r-1;else{if(!(h>f[r].startTime&&i<l))return r;i=r+1}return f[i].startTime-h<h-f[e].startTime?i:e}(f,h);if(e>-1)for(var r=e,u=f.length;r<u;r++){var c=f[r];if(c.startTime>=h&&c.endTime<=l)i.push(c);else if(c.startTime>l)return i}return i}(f.cues,h,l),u=0;u<r.length;u++)(!i||i(r[u]))&&f.removeCue(r[u]);"disabled"===e&&(f.mode=e)}function Ks(f){for(var h=[],l=0;l<f.length;l++){var i=f[l];("subtitles"===i.kind||"captions"===i.kind)&&i.label&&h.push(f[l])}return h}var Pn=function(f){function h(i){var e;return(e=f.call(this,i,"subtitle-track-controller")||this).media=null,e.tracks=[],e.groupIds=null,e.tracksInGroup=[],e.trackId=-1,e.currentTrack=null,e.selectDefaultTrack=!0,e.queuedDefaultTrack=-1,e.useTextTrackPolling=!1,e.subtitlePollingInterval=-1,e._subtitleDisplay=!0,e.asyncPollTrackChange=function(){return e.pollTrackChange(0)},e.onTextTracksChanged=function(){if(e.useTextTrackPolling||self.clearInterval(e.subtitlePollingInterval),e.media&&e.hls.config.renderTextTracksNatively){for(var r=null,u=Ks(e.media.textTracks),c=0;c<u.length;c++)if("hidden"===u[c].mode)r=u[c];else if("showing"===u[c].mode){r=u[c];break}var v=e.findTrackForTextTrack(r);e.subtitleTrack!==v&&e.setSubtitleTrack(v)}},e.registerListeners(),e}xe(h,f);var l=h.prototype;return l.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,f.prototype.destroy.call(this)},l.registerListeners=function(){var e=this.hls;e.on(O.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(O.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(O.MANIFEST_LOADING,this.onManifestLoading,this),e.on(O.MANIFEST_PARSED,this.onManifestParsed,this),e.on(O.LEVEL_LOADING,this.onLevelLoading,this),e.on(O.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(O.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(O.ERROR,this.onError,this)},l.unregisterListeners=function(){var e=this.hls;e.off(O.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(O.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(O.MANIFEST_LOADING,this.onManifestLoading,this),e.off(O.MANIFEST_PARSED,this.onManifestParsed,this),e.off(O.LEVEL_LOADING,this.onLevelLoading,this),e.off(O.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(O.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(O.ERROR,this.onError,this)},l.onMediaAttached=function(e,r){this.media=r.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},l.pollTrackChange=function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)},l.onMediaDetaching=function(e,r){var u=this.media;if(u){var c=!!r.transferMedia;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||u.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,c||Ks(u.textTracks).forEac
11h(function(p){Gs(p)})}},l.onManifestLoading=function(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0},l.onManifestParsed=function(e,r){this.tracks=r.subtitleTracks},l.onSubtitleTrackLoaded=function(e,r){var u=r.id,c=r.groupId,v=r.details,p=this.tracksInGroup[u];if(p&&p.groupId===c){var y=p.details;p.details=r.details,this.log("Subtitle track "+u+' "'+p.name+'" lang:'+p.lang+" group:"+c+" loaded ["+v.startSN+"-"+v.endSN+"]"),u===this.trackId&&this.playlistLoaded(u,r,y)}else this.warn("Subtitle track with id:"+u+" and group:"+c+" not found in active group "+(null==p?void 0:p.groupId))},l.onLevelLoading=function(e,r){this.switchLevel(r.level)},l.onLevelSwitching=function(e,r){this.switchLevel(r.level)},l.switchLevel=function(e){var r=this.hls.levels[e];if(r){var u=r.subtitleGroups||null,c=this.groupIds,v=this.currentTrack;if(!u||(null==c?void 0:c.length)!==(null==u?void 0:u.length)||null!=u&&u.some(function(k){return-1===(null==c?void 0:c.indexOf(k))})){this.groupIds=u,this.trackId=-1,this.currentTrack=null;var p=this.tracks.filter(function(k){return!u||-1!==u.indexOf(k.groupId)});if(p.length)this.selectDefaultTrack&&!p.some(function(k){return k.default})&&(this.selectDefaultTrack=!1),p.forEach(function(k,w){k.id=w});else if(!v&&!this.tracksInGroup.length)return;this.tracksInGroup=p;var y=this.hls.config.subtitlePreference;if(!v&&y){this.selectDefaultTrack=!1;var T=Gi(y,p);if(T>-1)v=p[T];else{var E=Gi(y,this.tracks);v=this.tracks[E]}}var x=this.findTrackId(v);-1===x&&v&&(x=this.findTrackId(null));var C={subtitleTracks:p};this.log("Updating subtitle tracks, "+p.length+' track(s) found in "'+(null==u?void 0:u.join(","))+'" group-id'),this.hls.trigger(O.SUBTITLE_TRACKS_UPDATED,C),-1!==x&&-1===this.trackId&&this.setSubtitleTrack(x)}}},l.findTrackId=function(e){for(var r=this.tracksInGroup,u=this.selectDefaultTrack,c=0;c<r.length;c++){var v=r[c];if((!u||v.default)&&(u||e)&&(!e||Sn(v,e)))return c}if(e){for(var p=0;p<r.length;p++)if(Po(e.attrs,r[p].attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return p;for(var T=0;T<r.length;T++)if(Po(e.attrs,r[T].attrs,["LANGUAGE"]))return T}return-1},l.findTrackForTextTrack=function(e){if(e)for(var r=this.tracksInGroup,u=0;u<r.length;u++)if(Ed(r[u],e))return u;return-1},l.onError=function(e,r){r.fatal||!r.context||r.context.type===Qe.SUBTITLE_TRACK&&r.context.id===this.trackId&&(!this.groupIds||-1!==this.groupIds.indexOf(r.context.groupId))&&this.checkRetry(r)},l.setSubtitleOption=function(e){if(this.hls.config.subtitlePreference=e,e){if(-1===e.id)return this.setSubtitleTrack(-1),null;var r=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,r.length){var u=this.currentTrack;if(u&&Sn(e,u))return u;var c=Gi(e,this.tracksInGroup);if(c>-1){var v=this.tracksInGroup[c];return this.setSubtitleTrack(c),v}if(u)return null;var p=Gi(e,r);if(p>-1)return r[p]}}return null},l.loadPlaylist=function(e){f.prototype.loadPlaylist.call(this),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)},l.loadingPlaylist=function(e,r){f.prototype.loadingPlaylist.call(this,e,r);var u=e.id,c=e.groupId,v=this.getUrlWithDirectives(e.url,r),p=e.details,y=null==p?void 0:p.age;this.log("Loading subtitle "+u+' "'+e.name+'" lang:'+e.lang+" group:"+c+(void 0!==(null==r?void 0:r.msn)?" at sn "+r.msn+" part "+r.part:"")+(y&&p.live?" age "+y.toFixed(1)+(p.type?" "+p.type||0:""):"")+" "+v),this.hls.trigger(O.SUBTITLE_TRACK_LOADING,{url:v,id:u,groupId:c,deliveryDirectives:r||null,track:e})},l.toggleTrackModes=function(){var e=this.media;if(e){var c,r=Ks(e.textTracks),u=this.currentTrack;if(u&&((c=r.filter(function(p){return Ed(u,p)})[0])||this.warn('Unable to find subtitle TextTrack with name "'+u.name+'" and language "'+u.lang+'"')),[].slice.call(r).forEach(function(p){"disabled"!==p.mode&&p!==c&&(p.mode="disabled")}),c){var v=this.subtitleDisplay?"showing":"hidden";c.mode!==v&&(c.mode=v)}}},l.setSubtitleTrack=function(e){var r=this.tracksInGroup;if(this.media)if(e<-1||e>=r.length||!X(e))this.warn("Invalid subtitle track id: "+e);else{this.selectDefaultTrack=!1;var u=this.currentTrack,c=r[e]||null;if(this.trackId=e,this.currentTrack=c,this.toggleTrackModes(),c){if(e!==this.trackId||c!==u||!c.details||c.details.live){this.log("Switching to subtitle-track "+e+(c?' "'+c.name+'" lang:'+c.lang+" group:"+c.groupId:""));var y=c.groupId;this.hls.trigger(O.SUBTITLE_TRACK_SWITCH,{id:c.id,groupId:void 0===y?""
vendor: 4,728 bytes, line 11
11:y,name:c.name,type:c.type,url:c.url});var k=this.switchParams(c.url,null==u?void 0:u.details,c.details);this.loadPlaylist(k)}}else this.hls.trigger(O.SUBTITLE_TRACK_SWITCH,{id:e})}else this.queuedDefaultTrack=e},ce(h,[{key:"subtitleDisplay",get:function(){return this._subtitleDisplay},set:function(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}},{key:"allSubtitleTracks",get:function(){return this.tracks}},{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}}])}(_d),rl={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},_n=function(h){return String.fromCharCode(rl[h]||h)},mi=15,yi=100,Gc={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},js={17:2,18:4,21:6,22:8,23:10,19:13,20:15},il={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Rv={25:2,26:4,29:6,30:8,31:10,27:13,28:15},wv=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Kc=function(){function f(){this.time=null,this.verboseLevel=0}return f.prototype.log=function(i,e){if(this.verboseLevel>=i){var r="function"==typeof e?e():e;Vt.log(this.time+" ["+i+"] "+r)}},f}(),za=function(h){for(var l=[],i=0;i<h.length;i++)l.push(h[i].toString(16));return l},Aa=function(){function f(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}var h=f.prototype;return h.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},h.setStyles=function(i){for(var e=["foreground","underline","italics","background","flash"],r=0;r<e.length;r++){var u=e[r];i.hasOwnProperty(u)&&(this[u]=i[u])}},h.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},h.equals=function(i){return this.foreground===i.foreground&&this.underline===i.underline&&this.italics===i.italics&&this.background===i.background&&this.flash===i.flash},h.copy=function(i){this.foreground=i.foreground,this.underline=i.underline,this.italics=i.italics,this.background=i.background,this.flash=i.flash},h.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},f}(),Ov=function(){function f(){this.uchar=" ",this.penState=new Aa}var h=f.prototype;return h.reset=function(){this.uchar=" ",this.penState.reset()},h.setChar=function(i,e){this.uchar=i,this.penState.copy(e)},h.setPenState=function(i){this.penState.copy(i)},h.equals=function(i){return this.uchar===i.uchar&&this.penState.equals(i.penState)},h.copy=function(i){this.uchar=i.uchar,this.penState.copy(i.penState)},h.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},f}(),jc=function(){function f(l){this.chars=[],this.pos=0,this.currPenState=new Aa,this.cueStartTime=null,this.logger=void 0;for(var i=0;i<yi;i++)this.chars.push(new Ov);this.logger=l}var h=f.prototype;return h.equals=function(i){for(var e=0;e<yi;e++)if(!this.chars[e].equals(i.chars[e]))return!1;return!0},h.copy=function(i){for(var e=0;e<yi;e++)this.chars[e].copy(i.chars[e])},h.isEmpty=function(){for(var i=!0,e=0;e<yi;e++)if(!this.chars[e].isEmpty()){i=!1;break}return i},h.setCursor=function(i){this.pos!==i&&(this.pos=i),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>yi&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=yi)},h.moveCursor=function(i){var e=this.pos+i;if(i>1)for(var r=this.pos+1;r<e+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(e)},h.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},h.insertChar=function(i){var e=this;i>=144&&this.backSpace();var r=_n(i);this.pos>=yi?this.logger.log(0,function(){return"Cannot insert "+i.toString(16)+" ("+r+") at position "+e.pos+". Skipping it!"}):(this.chars[this.pos].setChar(r,this.currPenState),this.moveCursor(1))},h.clearFromPos=function(i){var e;
11for(e=i;e<yi;e++)this.chars[e].reset()},h.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},h.clearToEndOfRow=function(){this.clearFromPos(this.pos)},h.getTextString=function(){for(var i=[],e=!0,r=0;r<yi;r++){var u=this.chars[r].uchar;" "!==u&&(e=!1),i.push(u)}return e?"":i.join("")},h.setPenStyles=function(i){this.currPenState.setStyles(i),this.chars[this.pos].setPenState(this.currPenState)},f}(),Go=function(){function f(l){this.rows=[],this.currRow=mi-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(var i=0;i<mi;i++)this.rows.push(new jc(l));this.logger=l}var h=f.prototype;return h.reset=function(){for(var i=0;i<mi;i++)this.rows[i].clear();this.currRow=mi-1},h.equals=function(i){for(var e=!0,r=0;r<mi;r++)if(!this.rows[r].equals(i.rows[r])){e=!1;break}return e},h.copy=function(i){for(var e=0;e<mi;e++)this.rows[e].copy(i.rows[e])},h.isEmpty=function(){for(var i=!0,e=0;e<mi;e++)if(!this.rows[e].isEmpty()){i=!1;break}return i},h.backSpace=function(){this.rows[this.currRow].backSpace()},h.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},h.insertChar=function(i){this.rows[this.currRow].insertChar(i)},h.setPen=function(i){this.rows[this.currRow].setPenStyles(i)},h.moveCursor=function(i){this.rows[this.currRow].moveCursor(i)},h.setCursor=function(i){this.logger.log(2,"setCursor: "+i),this.rows[this.currRow].setCursor(i)},h.setPAC=function(i){this.logger.log(2,function(){return"pacData = "+cr(i)});var e=i.row-1;if(this.nrRollUpRows&&e<this.nrRollUpRows-1&&(e=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==e){for(var r=0;r<mi;r++)this.rows[r].clear();var u=this.currRow+1-this.nrRollUpRows,c=this.lastOutputScreen;if(c){var v=c.rows[u].cueStartTime,p=this.logger.time;if(null!==v&&null!==p&&v<p)for(var y=0;y<this.nrRollUpRows;y++)this.rows[e-this.nrRollUpRows+y+1].copy(c.rows[u+y])}}this.currRow=e;var T=this.rows[this.currRow];if(null!==i.indent){var x=Math.max(i.indent-1,0);T.setCursor(i.indent),i.color=T.chars[x].penState.foreground}this.setPen({foreground:i.color,underline:i.underline,italics:i.italics,background:"black",flash:!1})},h.setBkgData=function(i){this.logger.log(2,function(){return"bkgData = "+cr(i)}),this.backSpace(),this.setPen(i),this.insertChar(32)},h.setRollUpRows=function(i){this.nrRollUpRows=i},h.rollUp=function(){var i=this;if(null!==this.nrRollUpRows){this.logger.log(1,function(){return i.getDisplayText()});var r=this.rows.splice(this.currRow+1-this.nrRollUpRows,1)[0];r.clear(),this.rows.splice(this.currRow,0,r),this.logger.log(2,"Rolling up")}else this.logger.log(3,"roll_up but nrRollUpRows not set yet")},h.getDisplayText=function(i){i=i||!1;for(var e=[],r="",c=0;c<mi;c++){var v=this.rows[c].getTextString();v&&e.push(i?"Row "+(c+1)+": '"+v+"'":v.trim())}return e.length>0&&(r=i?"["+e.join(" | ")+"]":e.join("\n")),r},h.getTextAndFormat=function(){return this.rows},f}(),Yd=function(){function f(l,i,e){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=l,this.outputFilter=i,this.mode=null,this.verbose=0,this.displayedMemory=new Go(e),this.nonDisplayedMemory=new Go(e),this.lastOutputScreen=new Go(e),this.currRollUpRow=this.displayedMemory.rows[mi-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=e}var h=f.prototype;return h.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[mi-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},h.getHandler=function(){return this.outputFilter},h.setHandler=function(i){this.outputFilter=i},h.setPAC=function(i){this.writeScreen.setPAC(i)},h.setBkgData=function(i){this.writeScreen.setBkgData(i)},h.setMode=function(i){i!==this.mode&&(this.mode=i,this.logger.log(2,function(){return"MODE="+i}),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=i)},h.insertChars=function(i){for(var e=this,r=0;r<i.length;r++)this.writeScreen.insertChar(i[r]);var u=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,function(){return u+": "+e.writeScreen.getDisplayText(!0)}),("MODE_PAINT-ON"===this.mode||"MODE_ROLL-UP"===this.mode)&&(this.logger.log(1,function(){return"DISPLAYED: "+e.displayedMemory.getDisplayText(!0)}),this.outputDataUpdate())},h.ccRCL=function(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},h.ccBS=function(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},h.ccAOF=function(){},h.ccAON=function(){},h.ccDER=function(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},h.ccRU=function(i){this.logger.log(2,"RU("+i+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(i)},h.ccFON=function(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}
vendor: 4,897 bytes, line 11
11,h.ccRDC=function(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},h.ccTR=function(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")},h.ccRTD=function(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")},h.ccEDM=function(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},h.ccCR=function(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},h.ccENM=function(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},h.ccEOC=function(){var i=this;if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,function(){return"DISP: "+i.displayedMemory.getDisplayText()})}this.outputDataUpdate(!0)},h.ccTO=function(i){this.logger.log(2,"TO("+i+") - Tab Offset"),this.writeScreen.moveCursor(i)},h.ccMIDROW=function(i){var e={flash:!1};if(e.underline=i%2==1,e.italics=i>=46,e.italics)e.foreground="white";else{var r=Math.floor(i/2)-16;e.foreground=["white","green","blue","cyan","red","yellow","magenta"][r]}this.logger.log(2,"MIDROW: "+cr(e)),this.writeScreen.setPen(e)},h.outputDataUpdate=function(i){void 0===i&&(i=!1);var e=this.logger.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),i&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},h.cueSplitAtTime=function(i){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,i,this.displayedMemory),this.cueStartTime=i))},f}(),nl=function(){function f(l,i,e){this.channels=void 0,this.currentChannel=0,this.cmdHistory={a:null,b:null},this.logger=void 0;var r=this.logger=new Kc;this.channels=[null,new Yd(l,i,r),new Yd(l+1,e,r)]}var h=f.prototype;return h.getHandler=function(i){return this.channels[i].getHandler()},h.setHandler=function(i,e){this.channels[i].setHandler(e)},h.addData=function(i,e){var r=this;this.logger.time=i;for(var u=function(y){var T=127&e[y],E=127&e[y+1],x=!1,C=null;if(0===T&&0===E)return 0;r.logger.log(3,function(){return"["+za([e[y],e[y+1]])+"] -> ("+za([T,E])+")"});var k=r.cmdHistory;if(T>=16&&T<=31){if(function qc(f,h,l){return l.a===f&&l.b===h}(T,E,k))return qs(null,null,k),r.logger.log(3,function(){return"Repeated command ("+za([T,E])+") is dropped"}),0;qs(T,E,r.cmdHistory),(x=r.parseCmd(T,E))||(x=r.parseMidrow(T,E)),x||(x=r.parsePAC(T,E)),x||(x=r.parseBackgroundAttributes(T,E))}else qs(null,null,k);if(!x&&(C=r.parseChars(T,E))){var M=r.currentChannel;M&&M>0?r.channels[M].insertChars(C):r.logger.log(2,"No channel found yet. TEXT-MODE?")}!x&&!C&&r.logger.log(2,function(){return"Couldn't parse cleaned data "+za([T,E])+" orig: "+za([e[y],e[y+1]])})},v=0;v<e.length;v+=2)u(v)},h.parseCmd=function(i,e){if(!((20===i||28===i||21===i||29===i)&&e>=32&&e<=47||(23===i||31===i)&&e>=33&&e<=35))return!1;var c=20===i||21===i||23===i?1:2,v=this.channels[c];return 20===i||21===i||28===i||29===i?32===e?v.ccRCL():33===e?v.ccBS():34===e?v.ccAOF():35===e?v.ccAON():36===e?v.ccDER():37===e?v.ccRU(2):38===e?v.ccRU(3):39===e?v.ccRU(4):40===e?v.ccFON():41===e?v.ccRDC():42===e?v.ccTR():43===e?v.ccRTD():44===e?v.ccEDM():45===e?v.ccCR():46===e?v.ccENM():47===e&&v.ccEOC():v.ccTO(e-32),this.currentChannel=c,!0},h.parseMidrow=function(i,e){var r=0;if((17===i||25===i)&&e>=32&&e<=47){if((r=17===i?1:2)!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;var u=this.channels[r];return!!u&&(u.ccMIDROW(e),this.logger.log(3,function(){return"MIDROW ("+za([i,e])+")"}),!0)}return!1},h.parsePAC=function(i,e){if(!((i>=17&&i<=23||i>=25&&i<=31)&&e>=64&&e<=127||(16===i||24===i)&&e>=64&&e<=95))return!1;var v=i<=23?1:2,p=this.channels[v];return!!p&&(p.setPAC(this.interpretPAC(e>=64&&e<=95?1===v?Gc[i]:il[i]:1===v?js[i]:Rv[i],e)),this.currentChannel=v,!0)},h.interpretPAC=function(i,e){var r,u={color:null,italics:!1,indent:null,underline:!1,row:i};return u.underline=1==(1&(r=e>95?e-96:e-64)),r<=13?u.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(u.italics=!0,u.color="white"):u.indent=4*Math.floor((r-16)/2),u},h.parseChars=function(i,e){var r,v,u=null,c=null;return i>=25?(r=2,c=i-8):(r=1,c=i),c>=17&&c<=19?(v=17===c?e+80:18===c?e+112:e+144,this.logger.log(2,function(){return"Special char '"+_n(v)+"' in channel "+r}),u=[v]):i>=32&&i<=127&&(u=0===e?[i]:[i,e]),u&&this.logger.log(3,function(){return"Char codes =  "+za(u).join(",")}),u}
vendor: 4,719 bytes, line 11
11,h.parseBackgroundAttributes=function(i,e){if(!((16===i||24===i)&&e>=32&&e<=47||(23===i||31===i)&&e>=45&&e<=47))return!1;var c,v={};return 16===i||24===i?(c=Math.floor((e-32)/2),v.background=wv[c],e%2==1&&(v.background=v.background+"_semi")):45===e?v.background="transparent":(v.foreground="black",47===e&&(v.underline=!0)),this.channels[i<=23?1:2].setBkgData(v),!0},h.reset=function(){for(var i=0;i<Object.keys(this.channels).length;i++){var e=this.channels[i];e&&e.reset()}qs(null,null,this.cmdHistory)},h.cueSplitAtTime=function(i){for(var e=0;e<this.channels.length;e++){var r=this.channels[e];r&&r.cueSplitAtTime(i)}},f}();function qs(f,h,l){l.a=f,l.b=h}var al=function(){if(null!=Ba&&Ba.VTTCue)return self.VTTCue;var f=["","lr","rl"],h=["start","middle","end","left","right"];function l(c,v){if("string"!=typeof v||!Array.isArray(c))return!1;var p=v.toLowerCase();return!!~c.indexOf(p)&&p}function e(c){return l(h,c)}function r(c){for(var v=arguments.length,p=new Array(v>1?v-1:0),y=1;y<v;y++)p[y-1]=arguments[y];for(var T=1;T<arguments.length;T++){var E=arguments[T];for(var x in E)c[x]=E[x]}return c}function u(c,v,p){var y=this,T={enumerable:!0};y.hasBeenReset=!1;var E="",x=!1,C=c,k=v,w=p,M=null,H="",Y=!0,j="auto",$="start",le=50,pe="middle",Se=50,we="middle";Object.defineProperty(y,"id",r({},T,{get:function(){return E},set:function(oe){E=""+oe}})),Object.defineProperty(y,"pauseOnExit",r({},T,{get:function(){return x},set:function(oe){x=!!oe}})),Object.defineProperty(y,"startTime",r({},T,{get:function(){return C},set:function(oe){if("number"!=typeof oe)throw new TypeError("Start time must be set to a number.");C=oe,this.hasBeenReset=!0}})),Object.defineProperty(y,"endTime",r({},T,{get:function(){return k},set:function(oe){if("number"!=typeof oe)throw new TypeError("End time must be set to a number.");k=oe,this.hasBeenReset=!0}})),Object.defineProperty(y,"text",r({},T,{get:function(){return w},set:function(oe){w=""+oe,this.hasBeenReset=!0}})),Object.defineProperty(y,"region",r({},T,{get:function(){return M},set:function(oe){M=oe,this.hasBeenReset=!0}})),Object.defineProperty(y,"vertical",r({},T,{get:function(){return H},set:function(oe){var fe=function i(c){return l(f,c)}(oe);if(!1===fe)throw new SyntaxError("An invalid or illegal string was specified.");H=fe,this.hasBeenReset=!0}})),Object.defineProperty(y,"snapToLines",r({},T,{get:function(){return Y},set:function(oe){Y=!!oe,this.hasBeenReset=!0}})),Object.defineProperty(y,"line",r({},T,{get:function(){return j},set:function(oe){if("number"!=typeof oe&&"auto"!==oe)throw new SyntaxError("An invalid number or illegal string was specified.");j=oe,this.hasBeenReset=!0}})),Object.defineProperty(y,"lineAlign",r({},T,{get:function(){return $},set:function(oe){var fe=e(oe);if(!fe)throw new SyntaxError("An invalid or illegal string was specified.");$=fe,this.hasBeenReset=!0}})),Object.defineProperty(y,"position",r({},T,{get:function(){return le},set:function(oe){if(oe<0||oe>100)throw new Error("Position must be between 0 and 100.");le=oe,this.hasBeenReset=!0}})),Object.defineProperty(y,"positionAlign",r({},T,{get:function(){return pe},set:function(oe){var fe=e(oe);if(!fe)throw new SyntaxError("An invalid or illegal string was specified.");pe=fe,this.hasBeenReset=!0}})),Object.defineProperty(y,"size",r({},T,{get:function(){return Se},set:function(oe){if(oe<0||oe>100)throw new Error("Size must be between 0 and 100.");Se=oe,this.hasBeenReset=!0}})),Object.defineProperty(y,"align",r({},T,{get:function(){return we},set:function(oe){var fe=e(oe);if(!fe)throw new SyntaxError("An invalid or illegal string was specified.");we=fe,this.hasBeenReset=!0}})),y.displayState=void 0}return u.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},u}(),Mv=function(){function f(){}return f.prototype.decode=function(i,e){if(!i)return"";if("string"!=typeof i)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(i))},f}();function Yc(f){function h(i,e,r,u){return 3600*(0|i)+60*(0|e)+(0|r)+parseFloat(u||0)}var l=f.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return l?parseFloat(l[2])>59?h(l[2],l[3],0,l[4]):h(l[1],l[2],l[3],l[4]):null}var zc=function(){function f(){this.values=Object.create(null)}var h=f.prototype;return h.set=function(i,e){!this.get(i)&&""!==e&&(this.values[i]=e)},h.get=function(i,e,r){return r?this.has(i)?this.values[i]:e[r]:this.has(i)?this.values[i]:e},h.has=function(i){return i in this.values},h.alt=function(i,e,r){for(var u=0;u<r.length;++u)if(e===r[u]){this.set(i,e);break}},h.integer=function(i,e){/^-?\d+$/.test(e)&&this.set(i,parseInt(e,10))},h.percent=function(i,e){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(e)){var r=parseFloat(e);
vendor: 5,195 bytes, line 11
11if(r>=0&&r<=100)return this.set(i,r),!0}return!1},f}();function zd(f,h,l,i){var e=i?f.split(i):[f];for(var r in e)if("string"==typeof e[r]){var u=e[r].split(l);2===u.length&&h(u[0],u[1])}}var $a=new al(0,0,""),Ko="middle"===$a.align?"middle":"center";function Fv(f,h,l){var i=f;function e(){var c=Yc(f);if(null===c)throw new Error("Malformed timestamp: "+i);return f=f.replace(/^[^\sa-zA-Z-]+/,""),c}function u(){f=f.replace(/^\s+/,"")}if(u(),h.startTime=e(),u(),"--\x3e"!==f.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);f=f.slice(3),u(),h.endTime=e(),u(),function r(c,v){var p=new zc;zd(c,function(E,x){var C;switch(E){case"region":for(var k=l.length-1;k>=0;k--)if(l[k].id===x){p.set(E,l[k].region);break}break;case"vertical":p.alt(E,x,["rl","lr"]);break;case"line":C=x.split(","),p.integer(E,C[0]),p.percent(E,C[0])&&p.set("snapToLines",!1),p.alt(E,C[0],["auto"]),2===C.length&&p.alt("lineAlign",C[1],["start",Ko,"end"]);break;case"position":C=x.split(","),p.percent(E,C[0]),2===C.length&&p.alt("positionAlign",C[1],["start",Ko,"end","line-left","line-right","auto"]);break;case"size":p.percent(E,x);break;case"align":p.alt(E,x,["start",Ko,"end","left","right"])}},/:/,/\s/),v.region=p.get("region",null),v.vertical=p.get("vertical","");var y=p.get("line","auto");"auto"===y&&-1===$a.line&&(y=-1),v.line=y,v.lineAlign=p.get("lineAlign","start"),v.snapToLines=p.get("snapToLines",!0),v.size=p.get("size",100),v.align=p.get("align",Ko);var T=p.get("position","auto");"auto"===T&&50===$a.position&&(T="start"===v.align||"left"===v.align?0:"end"===v.align||"right"===v.align?100:50),v.position=T}(f,h)}function $c(f){return f.replace(/<br(?: \/)?>/gi,"\n")}var Xc=function(){function f(){this.state="INITIAL",this.buffer="",this.decoder=new Mv,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var h=f.prototype;return h.parse=function(i){var e=this;function r(){var T=e.buffer,E=0;for(T=$c(T);E<T.length&&"\r"!==T[E]&&"\n"!==T[E];)++E;var x=T.slice(0,E);return"\r"===T[E]&&++E,"\n"===T[E]&&++E,e.buffer=T.slice(E),x}i&&(e.buffer+=e.decoder.decode(i,{stream:!0}));try{var c="";if("INITIAL"===e.state){if(!/\r\n|\n/.test(e.buffer))return this;var v=(c=r()).match(/^(\xef\xbb\xbf)?WEBVTT([ \t].*)?$/);if(null==v||!v[0])throw new Error("Malformed WebVTT signature.");e.state="HEADER"}for(var p=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(p?p=!1:c=r(),e.state){case"HEADER":/:/.test(c)?zd(c,function(E,x){},/:/):c||(e.state="ID");continue;case"NOTE":c||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(c)){e.state="NOTE";break}if(!c)continue;if(e.cue=new al(0,0,""),e.state="CUE",-1===c.indexOf("--\x3e")){e.cue.id=c;continue}case"CUE":if(!e.cue){e.state="BADCUE";continue}try{Fv(c,e.cue,e.regionList)}catch(T){e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var y=-1!==c.indexOf("--\x3e");if(!c||y&&(p=!0)){e.oncue&&e.cue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}if(null===e.cue)continue;e.cue.text&&(e.cue.text+="\n"),e.cue.text+=c;continue;case"BADCUE":c||(e.state="ID")}}}catch(T){"CUETEXT"===e.state&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state="INITIAL"===e.state?"BADWEBVTT":"BADCUE"}return this},h.flush=function(){var i=this;try{if((i.cue||"HEADER"===i.state)&&(i.buffer+="\n\n",i.parse()),"INITIAL"===i.state||"BADWEBVTT"===i.state)throw new Error("Malformed WebVTT signature.")}catch(e){i.onparsingerror&&i.onparsingerror(e)}return i.onflush&&i.onflush(),this},f}(),$d=/\r\n|\n\r|\n|\r/g,Ws=function(h,l,i){return void 0===i&&(i=0),h.slice(i,i+l.length)===l},Nv=function(h){var l=parseInt(h.slice(-3)),i=parseInt(h.slice(-6,-4)),e=parseInt(h.slice(-9,-7)),r=h.length>9?parseInt(h.substring(0,h.indexOf(":"))):0;if(!(X(l)&&X(i)&&X(e)&&X(r)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+h);return l+=1e3*i,(l+=6e4*e)+36e5*r};function Xd(f,h,l){return Bo(f.toString())+Bo(h.toString())+Bo(l)}var Qc=function(h,l,i){var e=h[l],r=h[e.prevCC];if(!r||!r.new&&e.new)return h.ccOffset=h.presentationOffset=e.start,void(e.new=!1);for(;null!=(u=r)&&u.new;){var u;h.ccOffset+=e.start-r.start,e.new=!1,r=h[(e=r).prevCC]}h.presentationOffset=i};function Bv(f,h,l,i,e,r,u){var C,c=new Xc,v=Pr(new Uint8Array(f)).trim().replace($d,"\n").split("\n"),p=[],y=h?function av(f,h){return void 0===h&&(h=1),Eo(f,ac,1/h)}(h.baseTime,h.timescale):0,T="00:00.000",E=0,x=0,k=!0;c.oncue=function(w){var M=l[i],H=l.ccOffset,Y=(E-y)/9e4;if(null!=M&&M.new&&(void 0!==x?H=l.ccOffset=M.start:Qc(l,i,Y)),Y){if(!h)return void(C=new Error("Missing initPTS for VTT MPEGTS"));H=Y-l.presentationOffset}var j=w.endTime-w.startTime,$=Fi(9e4*(w.startTime+H-x),9e4*e)/9e4;w.startTime=Math.max($,0),w.endTime=Math.max($+j,0);var le=w.text.trim();w.text=decodeURIComponent(encodeURIComponent(le)),w.id||(w.id=Xd(w.startTime,w.endTime,le)),w.endTime>0&&p.push(w)},c.onparsingerror=function(w){C=w},c.onflush=function(){C?u(C):r(p)},v.forEach(function(w){if(k){if(Ws(w,"X-TIMESTAMP-MAP=")){k=!1,w.slice(16).split(",").forEach(function(M){Ws(M,"LOCAL:")?T=M.slice(6):Ws(M,"MPEGTS:")&&(E=parseInt(M.slice(7)))});try{x=Nv(T)/1e3}catch(M){C=M}return}""===w&&(k=!1)}
11c.parse(w+"\n")}),c.flush()}var jo="stpp.ttml.im1t",sl=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Qd=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,qo={left:"start",center:"center",right:"end",start:"start",end:"end"};function Wi(f,h,l,i){var e=Xt(new Uint8Array(f),["mdat"]);if(0!==e.length){var r=e.map(function(c){return Pr(c)}),u=function nv(f,h,l,i){return void 0===l&&(l=1),void 0===i&&(i=!1),Eo(f,h,1/l,i)}(h.baseTime,1,h.timescale);try{r.forEach(function(c){return l(function Zc(f,h){var e=(new DOMParser).parseFromString(f,"text/xml").getElementsByTagName("tt")[0];if(!e)throw new Error("Invalid ttml");var r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},u=Object.keys(r).reduce(function(T,E){return T[E]=e.getAttribute("ttp:"+E)||r[E],T},{}),c="preserve"!==e.getAttribute("xml:space"),v=Jc(Wo(e,"styling","style")),p=Jc(Wo(e,"layout","region")),y=Wo(e,"body","[begin]");return[].map.call(y,function(T){var E=eh(T,c);if(!E||!T.hasAttribute("begin"))return null;var x=Zd(T.getAttribute("begin"),u),C=Zd(T.getAttribute("dur"),u),k=Zd(T.getAttribute("end"),u);if(null===x)throw th(T);if(null===k){if(null===C)throw th(T);k=x+C}var w=new al(x-h,k-h,E);w.id=Xd(w.startTime,w.endTime,w.text);var Y=function Ys(f,h,l){var i="http://www.w3.org/ns/ttml#styling",e=null,r=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],u=null!=f&&f.hasAttribute("style")?f.getAttribute("style"):null;return u&&l.hasOwnProperty(u)&&(e=l[u]),r.reduce(function(c,v){var p=ol(h,i,v)||ol(f,i,v)||ol(e,i,v);return p&&(c[v]=p),c},{})}(p[T.getAttribute("region")],v[T.getAttribute("style")],v),j=Y.textAlign;if(j){var $=qo[j];$&&(w.lineAlign=$),w.align=j}return be(w,Y),w}).filter(function(T){return null!==T})}(c,u))})}catch(c){i(c)}}else i(new Error("Could not parse IMSC1 mdat"))}function Wo(f,h,l){var i=f.getElementsByTagName(h)[0];return i?[].slice.call(i.querySelectorAll(l)):[]}function Jc(f){return f.reduce(function(h,l){var i=l.getAttribute("xml:id");return i&&(h[i]=l),h},{})}function eh(f,h){return[].slice.call(f.childNodes).reduce(function(l,i,e){var r;return"br"===i.nodeName&&e?l+"\n":null!=(r=i.childNodes)&&r.length?eh(i,h):h?l+i.textContent.trim().replace(/\s+/g," "):l+i.textContent},"")}function ol(f,h,l){return f&&f.hasAttributeNS(h,l)?f.getAttributeNS(h,l):null}function th(f){return new Error("Could not parse ttml timestamp "+f)}function Zd(f,h){if(!f)return null;var l=Yc(f);return null===l&&(sl.test(f)?l=function Uv(f,h){var l=sl.exec(f);return 3600*(0|l[1])+60*(0|l[2])+(0|l[3])+((0|l[4])+(0|l[5])/h.subFrameRate)/h.frameRate}(f,h):Qd.test(f)&&(l=function rh(f,h){var l=Qd.exec(f),i=Number(l[1]);switch(l[2]){case"h":return 3600*i;case"m":return 60*i;case"ms":return 1e3*i;case"f":return i/h.frameRate;case"t":return i/h.tickRate}return i}(f,h))),l}var Xa=function(){function f(l,i){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=l,this.trackName=i}var h=f.prototype;return h.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},h.newCue=function(i,e,r){(null===this.startTime||this.startTime>i)&&(this.startTime=i),this.endTime=e,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)},h.reset=function(){this.cueRanges=[],this.startTime=null},f}(),Vv=function(){function f(l){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=l,this.config=l.config,this.Cues=l.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}}
vendor: 4,263 bytes, line 11
11,l.on(O.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(O.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(O.MANIFEST_LOADING,this.onManifestLoading,this),l.on(O.MANIFEST_LOADED,this.onManifestLoaded,this),l.on(O.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),l.on(O.FRAG_LOADING,this.onFragLoading,this),l.on(O.FRAG_LOADED,this.onFragLoaded,this),l.on(O.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),l.on(O.FRAG_DECRYPTED,this.onFragDecrypted,this),l.on(O.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(O.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),l.on(O.BUFFER_FLUSHING,this.onBufferFlushing,this)}var h=f.prototype;return h.destroy=function(){var i=this.hls;i.off(O.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(O.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(O.MANIFEST_LOADING,this.onManifestLoading,this),i.off(O.MANIFEST_LOADED,this.onManifestLoaded,this),i.off(O.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),i.off(O.FRAG_LOADING,this.onFragLoading,this),i.off(O.FRAG_LOADED,this.onFragLoaded,this),i.off(O.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),i.off(O.FRAG_DECRYPTED,this.onFragDecrypted,this),i.off(O.INIT_PTS_FOUND,this.onInitPtsFound,this),i.off(O.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),i.off(O.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0},h.initCea608Parsers=function(){var i=new Xa(this,"textTrack1"),e=new Xa(this,"textTrack2"),r=new Xa(this,"textTrack3"),u=new Xa(this,"textTrack4");this.cea608Parser1=new nl(1,i,e),this.cea608Parser2=new nl(3,r,u)},h.addCues=function(i,e,r,u,c){for(var v=!1,p=c.length;p--;){var y=c[p],T=Hv(y[0],y[1],e,r);if(T>=0&&(y[0]=Math.min(y[0],e),y[1]=Math.max(y[1],r),v=!0,T/(r-e)>.5))return}if(v||c.push([e,r]),this.config.renderTextTracksNatively)this.Cues.newCue(this.captionsTracks[i],e,r,u);else{var x=this.Cues.newCue(null,e,r,u);this.hls.trigger(O.CUES_PARSED,{type:"captions",cues:x,track:i})}},h.onInitPtsFound=function(i,e){var r=this,T=this.unparsedVttFrags;e.id===Ie.MAIN&&(this.initPTS[e.frag.cc]={baseTime:e.initPTS,timescale:e.timescale,trackId:e.trackId}),T.length&&(this.unparsedVttFrags=[],T.forEach(function(E){r.initPTS[E.frag.cc]?r.onFragLoaded(O.FRAG_LOADED,E):r.hls.trigger(O.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:E.frag,error:new Error("Subtitle discontinuity domain does not match main")})}))},h.getExistingTrack=function(i,e){var r=this.media;if(r)for(var u=0;u<r.textTracks.length;u++){var c=r.textTracks[u];if(nh(c,{name:i,lang:e,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return c}return null},h.createCaptionsTrack=function(i){this.config.renderTextTracksNatively?this.createNativeTrack(i):this.createNonNativeTrack(i)},h.createNativeTrack=function(i){if(!this.captionsTracks[i]){var r=this.captionsTracks,u=this.media,c=this.captionsProperties[i],v=c.label,p=c.languageCode,y=this.getExistingTrack(v,p);if(y)r[i]=y,Gs(r[i]),Dn(r[i],u);else{var T=this.createTextTrack("captions",v,p);T&&(T[i]=!0,r[i]=T)}}},h.createNonNativeTrack=function(i){if(!this.nonNativeCaptionsTracks[i]){var e=this.captionsProperties[i];if(e){var u={_id:i,label:e.label,kind:"captions",default:!!e.media&&!!e.media.default,closedCaptions:e.media};this.nonNativeCaptionsTracks[i]=u,this.hls.trigger(O.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[u]})}}},h.createTextTrack=function(i,e,r){var u=this.media;if(u)return u.addTextTrack(i,e,r)},h.onMediaAttaching=function(i,e){this.media=e.media,e.mediaSource||this._cleanTracks()},h.onMediaDetaching=function(i,e){var r=!!e.transferMedia;if(this.media=null,!r){var u=this.captionsTracks;Object.keys(u).forEach(function(c){Gs(u[c]),delete u[c]}),this.nonNativeCaptionsTracks={}}},h.onManifestLoading=function(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},h._cleanTracks=function(){var i=this.media;if(i){var e=i.textTracks;
11if(e)for(var r=0;r<e.length;r++)Gs(e[r])}},h.onSubtitleTracksUpdated=function(i,e){var r=this,u=e.subtitleTracks||[],c=u.some(function(x){return x.textCodec===jo});if(this.config.enableWebVTT||c&&this.config.enableIMSC1){if(Do(this.tracks,u))return void(this.tracks=u);if(this.textTracks=[],this.tracks=u,this.config.renderTextTracksNatively){var p=this.media,y=p?Ks(p.textTracks):null;if(this.tracks.forEach(function(x,C){var k;if(y){for(var w=null,M=0;M<y.length;M++)if(y[M]&&nh(y[M],x)){w=y[M],y[M]=null;break}w&&(k=w)}if(k)Gs(k);else{var H=ih(x);(k=r.createTextTrack(H,x.name,x.lang))&&(k.mode="disabled")}k&&r.textTracks.push(k)}),null!=y&&y.length){var T=y.filter(function(x){return null!==x}).map(function(x){return x.label});T.length&&this.hls.logger.warn("Media element contains unused subtitle tracks: "+T.join(", ")+". Replace media element for each source to clear TextTracks and captions menu.")}}else if(this.tracks.length){var E=this.tracks.map(function(x){return{label:x.name,kind:x.type.toLowerCase(),default:x.default,subtitleTrack:x}});this.hls.trigger(O.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:E})}}},h.onManifestLoaded=function(i,e){var r=this;this.config.enableCEA708Captions&&e.captions&&e.captions.forEach(function(u){var c=/(?:CC|SERVICE)([1-4])/.exec(u.instreamId);if(c){var p=r.captionsProperties["textTrack"+c[1]];p&&(p.label=u.name,u.lang&&(p.languageCode=u.lang),p.media=u)}})},h.closedCaptionsForLevel=function(i){var e=this.hls.levels[i.level];return null==e?void 0:e.attrs["CLOSED-CAPTIONS"]},h.onFragLoading=function(i,e){if(this.enabled&&e.frag.type===Ie.MAIN){var r,u,c=this.cea608Parser1,v=this.cea608Parser2,p=this.lastSn,y=e.frag,T=y.cc,E=y.sn,x=null!=(r=null==(u=e.part)?void 0:u.index)?r:-1;c&&v&&(E!==p+1||E===p&&x!==this.lastPartIndex+1||T!==this.lastCc)&&(c.reset(),v.reset()),this.lastCc=T,this.lastSn=E,this.lastPartIndex=x}},h.onFragLoaded=function(i,e){var r=e.frag,u=e.payload;if(r.type===Ie.SUBTITLE)if(u.byteLength){var c=r.decryptdata;if(null==c||!c.encrypted||"stats"in e){var p=this.tracks[r.level],y=this.vttCCs;y[r.cc]||(y[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),p&&p.textCodec===jo?this._parseIMSC1(r,u):this._parseVTTs(e)}}else this.hls.trigger(O.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})},h._parseIMSC1=function(i,e){var r=this,u=this.hls;Wi(e,this.initPTS[i.cc],function(c){r._appendCues(c,i.level),u.trigger(O.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})},function(c){u.logger.log("Failed to parse IMSC1: "+c),u.trigger(O.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:c})})},h._parseVTTs=function(i){var e,r=this,u=i.frag,c=i.payload,v=this.initPTS,p=this.unparsedVttFrags,y=v.length-1;if(v[u.cc]||-1!==y){var T=this.hls;Bv(null!=(e=u.initSegment)&&e.data?ai(u.initSegment.data,new Uint8Array(c)).buffer:c,this.initPTS[u.cc],this.vttCCs,u.cc,u.start,function(x){r._appendCues(x,u.level),T.trigger(O.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(x){var C="Missing initPTS for VTT MPEGTS"===x.message;C?p.push(i):r._fallbackToIMSC1(u,c),T.logger.log("Failed to parse VTT cue: "+x),!(C&&y>u.cc)&&T.trigger(O.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:x})})}else p.push(i)},h._fallbackToIMSC1=function(i,e){var r=this,u=this.tracks[i.level];u.textCodec||Wi(e,this.initPTS[i.cc],function(){u.textCodec=jo,r._parseIMSC1(i,e)},function(){u.textCodec="wvtt"})},h._appendCues=function(i,e){var r=this.hls;if(this.config.renderTextTracksNatively){var u=this.textTracks[e];if(!u||"disabled"===u.mode)return;i.forEach(function(p){return Wd(u,p)})}else{var c=this.tracks[e];if(!c)return;r.trigger(O.CUES_PARSED,{type:"subtitles",cues:i,track:c.default?"default":"subtitles"+e})}},h.onFragDecrypted=function(i,e){e.frag.type===Ie.SUBTITLE&&this.onFragLoaded(O.FRAG_LOADED,e)},h.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},h.onFragParsingUserdata=function(i,e){if(this.enabled&&this.config.enableCEA708Captions){var r=e.frag,u=e.samples;if(r.type!==Ie.MAIN||"NONE"!==this.closedCaptionsForLevel(r))for(var c=0;c<u.length;c++){var v=u[c].bytes;if(v){this.cea608Parser1||this.initCea608Parsers();var p=this.extractCea608Data(v);this.cea608Parser1.addData(u[c].pts,p[0]),this.cea608Parser2.addData(u[c].pts,p[1])}}}},h.onBufferFlushing=function(i,e){var r=e.startOffset,u=e.endOffset,c=e.endOffsetSubtitles,v=e.type,p=this.media;if(p&&!(p.currentTime<u)){if(!v||"video"===v){var y=this.captionsTracks;
11Object.keys(y).forEach(function(E){return el(y[E],r,u)})}if(this.config.renderTextTracksNatively&&0===r&&void 0!==c){var T=this.textTracks;Object.keys(T).forEach(function(E){return el(T[E],r,c)})}}},h.extractCea608Data=function(i){for(var e=[[],[]],r=31&i[0],u=2,c=0;c<r;c++){var v=i[u++],p=127&i[u++],y=127&i[u++];if((0!==p||0!==y)&&0!=(4&v)){var E=3&v;(0===E||1===E)&&(e[E].push(p),e[E].push(y))}}return e},f}();function ih(f){return f.characteristics&&/transcribes-spoken-dialog/gi.test(f.characteristics)&&/describes-music-and-sound/gi.test(f.characteristics)?"captions":"subtitles"}function nh(f,h){return!!f&&f.kind===ih(h)&&Ed(h,f)}function Hv(f,h,l,i){return Math.min(h,i)-Math.max(f,l)}var ah=/\s/,sh={newCue:function(h,l,i,e){for(var u,c,v,p,y,r=[],T=self.VTTCue||self.TextTrackCue,E=0;E<e.rows.length;E++)if(v=!0,p=0,y="",!(u=e.rows[E]).isEmpty()){for(var x,C=0;C<u.chars.length;C++)ah.test(u.chars[C].uchar)&&v?p++:(y+=u.chars[C].uchar,v=!1);u.cueStartTime=l,l===i&&(i+=1e-4),p>=16?p--:p++;var k=$c(y.trim()),w=Xd(l,i,k);null!=h&&null!=(x=h.cues)&&x.getCueById(w)||((c=new T(l,i,k)).id=w,c.line=E+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*p/32)),r.push(c))}return h&&r.length&&(r.sort(function(M,H){return"auto"===M.line||"auto"===H.line?0:M.line>8&&H.line>8?H.line-M.line:M.line-H.line}),r.forEach(function(M){return Wd(h,M)})),r}};var tf=/(\d+)-(\d+)\/(\d+)/,Qa=function(){function f(l){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=l.fetchSetup||oh,this.controller=new self.AbortController,this.stats=new ki}var h=f.prototype;return h.destroy=function(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null},h.abortInternal=function(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())},h.abort=function(){var i;this.abortInternal(),null!=(i=this.callbacks)&&i.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},h.load=function(i,e,r){var u=this,c=this.stats;if(c.loading.start)throw new Error("Loader can only be used once.");c.loading.start=self.performance.now();var v=function Gv(f,h){var l={method:"GET",mode:"cors",credentials:"same-origin",signal:h,headers:new self.Headers(be({},f.headers))};return f.rangeEnd&&l.headers.set("Range","bytes="+f.rangeStart+"-"+String(f.rangeEnd-1)),l}(i,this.controller.signal),p="arraybuffer"===i.responseType,y=p?"byteLength":"length",T=e.loadPolicy,E=T.maxTimeToFirstByteMs,x=T.maxLoadTimeMs;this.context=i,this.config=e,this.callbacks=r,this.request=this.fetchSetup(i,v),self.clearTimeout(this.requestTimeout),e.timeout=E&&X(E)?E:x,this.requestTimeout=self.setTimeout(function(){u.callbacks&&(u.abortInternal(),u.callbacks.onTimeout(c,i,u.response))},e.timeout),(yn(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(function(k){var w;u.response=u.loader=k;var M=Math.max(self.performance.now(),c.loading.start);if(self.clearTimeout(u.requestTimeout),e.timeout=x,u.requestTimeout=self.setTimeout(function(){u.callbacks&&(u.abortInternal(),u.callbacks.onTimeout(c,i,u.response))},x-(M-c.loading.start)),!k.ok)throw new jv(k.statusText||"fetch, bad network response",k.status,k);c.loading.first=M,c.total=function rf(f){var h=f.get("Content-Range");if(h){var l=function Kv(f){var h=tf.exec(f);if(h)return parseInt(h[2])-parseInt(h[1])+1}(h);if(X(l))return l}var i=f.get("Content-Length");if(i)return parseInt(i)}(k.headers)||c.total;var j=null==(w=u.callbacks)?void 0:w.onProgress;return j&&X(e.highWaterMark)?u.loadProgressively(k,c,i,e.highWaterMark,j):p?k.arrayBuffer():"json"===i.responseType?k.json():k.text()}).then(function(k){var w,M,H=u.response;if(!H)throw new Error("loader destroyed");self.clearTimeout(u.requestTimeout),c.loading.end=Math.max(self.performance.now(),c.loading.first);var Y=k[y];Y&&(c.loaded=c.total=Y);var j={url:H.url,data:k,code:H.status},$=null==(w=u.callbacks)?void 0:w.onProgress;$&&!X(e.highWaterMark)&&$(c,i,k,H),null==(M=u.callbacks)||M.onSuccess(j,c,i,H)}).catch(function(k){var w;self.clearTimeout(u.requestTimeout),c.aborted||null==(w=u.callbacks)||w.onError({code:k&&k.code||0,text:k?k.message:null},i,k?k.details:null,c)})},h.getCacheAge=function(){var i=null;if(this.response){var e=this.response.headers.get("age");i=e?parseFloat(e):null}return i},h.getResponseHeader=function(i){return this.response?this.response.headers.get(i):null},h.loadProgressively=function(i,e,r,u,c){void 0===u&&(u=0);var v=new nd,p=i.body.getReader(),y=function(){return p.read().then(function(E){if(E.done)return v.dataLength&&c(e,r,v.flush().buffer,i),Promise.resolve(new ArrayBuffer(0));var x=E.value,C=x.length;return e.loaded+=C,C<u||v.dataLength?(v.push(x),v.dataLength>=u&&c(e,r,v.flush().buffer,i)):c(e,r,x.buffer,i),y()}).catch(function(){return Promise.reject()})};return y()},f}();
vendor: 5,602 bytes, line 11
11function oh(f,h){return new self.Request(f.url,h)}var jv=function(f){function h(l,i,e){var r;return(r=f.call(this,l)||this).code=void 0,r.details=void 0,r.code=i,r.details=e,r}return xe(h,f),h}(pt(Error)),nf=/^age:\s*[\d.]+\s*$/im,uh=function(){function f(l){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=l&&l.xhrSetup||null,this.stats=new ki,this.retryDelay=0}var h=f.prototype;return h.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null},h.abortInternal=function(){var i=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),i&&(i.onreadystatechange=null,i.onprogress=null,4!==i.readyState&&(this.stats.aborted=!0,i.abort()))},h.abort=function(){var i;this.abortInternal(),null!=(i=this.callbacks)&&i.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},h.load=function(i,e,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=i,this.config=e,this.callbacks=r,this.loadInternal()},h.loadInternal=function(){var i=this,e=this.config,r=this.context;if(e&&r){var u=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0,c.aborted=!1;var v=this.xhrSetup;v?Promise.resolve().then(function(){if(i.loader===u&&!i.stats.aborted)return v(u,r.url)}).catch(function(p){if(i.loader===u&&!i.stats.aborted)return u.open("GET",r.url,!0),v(u,r.url)}).then(function(){i.loader!==u||i.stats.aborted||i.openAndSendXhr(u,r,e)}).catch(function(p){var y;null==(y=i.callbacks)||y.onError({code:u.status,text:p.message},r,u,c)}):this.openAndSendXhr(u,r,e)}},h.openAndSendXhr=function(i,e,r){i.readyState||i.open("GET",e.url,!0);var u=e.headers,c=r.loadPolicy,v=c.maxTimeToFirstByteMs,p=c.maxLoadTimeMs;if(u)for(var y in u)i.setRequestHeader(y,u[y]);e.rangeEnd&&i.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),i.onreadystatechange=this.readystatechange.bind(this),i.onprogress=this.loadprogress.bind(this),i.responseType=e.responseType,self.clearTimeout(this.requestTimeout),r.timeout=v&&X(v)?v:p,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),i.send()},h.readystatechange=function(){var i=this.context,e=this.loader,r=this.stats;if(i&&e){var u=e.readyState,c=this.config;if(!r.aborted&&u>=2&&(0===r.loading.first&&(r.loading.first=Math.max(self.performance.now(),r.loading.start),c.timeout!==c.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),c.timeout=c.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),c.loadPolicy.maxLoadTimeMs-(r.loading.first-r.loading.start)))),4===u)){self.clearTimeout(this.requestTimeout),e.onreadystatechange=null,e.onprogress=null;var v=e.status,p="text"===e.responseType?e.responseText:null;if(v>=200&&v<300){var y=null!=p?p:e.response;if(null!=y){var T,E;r.loading.end=Math.max(self.performance.now(),r.loading.first),r.loaded=r.total="arraybuffer"===e.responseType?y.byteLength:y.length,r.bwEstimate=8e3*r.total/(r.loading.end-r.loading.first);var C=null==(T=this.callbacks)?void 0:T.onProgress;return C&&C(r,i,y,e),void(null==(E=this.callbacks)||E.onSuccess({url:e.responseURL,data:y,code:v},r,i,e))}}var Y,w=c.loadPolicy.errorRetry;J(w,r.retry,!1,{url:i.url,data:void 0,code:v})?this.retry(w):(Vt.error(v+" while loading "+i.url),null==(Y=this.callbacks)||Y.onError({code:v,text:e.statusText},i,e,r))}}},h.loadtimeout=function(){if(this.config){var i=this.config.loadPolicy.timeoutRetry;if(J(i,this.stats.retry,!0))this.retry(i);else{var r;Vt.warn("timeout while loading "+(null==(r=this.context)?void 0:r.url));var u=this.callbacks;u&&(this.abortInternal(),u.onTimeout(this.stats,this.context,this.loader))}}},h.retry=function(i){var e=this.context,r=this.stats;this.retryDelay=G(i,r.retry),r.retry++,Vt.warn((status?"HTTP Status "+status:"Timeout")+" while loading "+(null==e?void 0:e.url)+", retrying "+r.retry+"/"+i.maxNumRetry+" in "+this.retryDelay+"ms"),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)},h.loadprogress=function(i){var e=this.stats;e.loaded=i.loaded,i.lengthComputable&&(e.total=i.total)},h.getCacheAge=function(){var i=null;if(this.loader&&nf.test(this.loader.getAllResponseHeaders())){var e=this.loader.getResponseHeader("age");i=e?parseFloat(e):null}return i},h.getResponseHeader=function(i){return this.loader&&new RegExp("^"+i+":\\s*[\\d.]+\\s*$","im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(i):null},f}(),Wv=Oe(Oe({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,startOnSegmentBoundary:!1,maxBufferSize:6e7,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncMode:"edge",liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftw
vendor: 17,117 bytes, line 11
11areAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:uh,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Bl,bufferController:pc,capLevelController:gv,errorController:xt,fpsController:Pv,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:Vf,requireKeySystemAccessOnStart:!1,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,preserveManualLevelOnError:!1,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},interstitialAssetListLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:3e4,timeoutRetry:{maxNumRetry:0,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:0,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},function lh(){return{cueHandler:sh,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}()),{},{subtitleStreamController:kv,subtitleTrackController:Pn,timelineController:Vv,audioStreamController:Ka,audioTrackController:hc,emeController:Yu,cmcdController:Iv,contentSteeringController:Dv,interstitialsController:Vc});function ll(f){return f&&"object"==typeof f?Array.isArray(f)?f.map(ll):Object.keys(f).reduce(function(h,l){return h[l]=ll(f[l]),h},{}):f}function dh(f,h){var l=f.loader;l!==Qa&&l!==uh?(h.log("[config]: Custom loader detected, cannot enable progressive streaming"),f.progressive=!1):function ef(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(f){}return!1}()&&(f.loader=Qa,f.progressive=!0,f.enableSoftwareAES=!0,h.log("[config]: Progressive streaming enabled, using FetchLoader"))}var $v=function(f){function h(i,e){var r;return(r=f.call(this,"gap-controller",i.logger)||this).hls=void 0,r.fragmentTracker=void 0,r.media=null,r.mediaSource=void 0,r.nudgeRetry=0,r.stallReported=!1,r.stalled=null,r.moved=!1,r.seeking=!1,r.buffered={},r.lastCurrentTime=0,r.ended=0,r.waiting=0,r.onMediaPlaying=function(){r.ended=0,r.waiting=0},r.onMediaWaiting=function(){var u;null!=(u=r.media)&&u.seeking||(r.waiting=self.performance.now(),r.tick())},r.onMediaEnded=function(){var u;r.hls&&(r.ended=(null==(u=r.media)?void 0:u.currentTime)||1,r.hls.trigger(O.MEDIA_ENDED,{stalled:!1}))},r.hls=i,r.fragmentTracker=e,r.registerListeners(),r}xe(h,f);var l=h.prototype;return l.registerListeners=function(){var e=this.hls;e&&(e.on(O.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(O.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(O.BUFFER_APPENDED,this.onBufferAppended,this))},l.unregisterListeners=function(){var e=this.hls;e&&(e.off(O.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(O.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(O.BUFFER_APPENDED,this.onBufferAppended,this))},l.destroy=function(){f.prototype.destroy.call(this),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0},l.onMediaAttached=function(e,r){this.setInterval(100),this.mediaSource=r.mediaSource;var u=this.media=r.media;oi(u,"playing",this.onMediaPlaying),oi(u,"waiting",this.onMediaWaiting),oi(u,"ended",this.onMediaEnded)},l.onMediaDetaching=function(e,r){this.clearInterval();var u=this.media;u&&(Ii(u,"playing",this.onMediaPlaying),Ii(u,"waiting",this.onMediaWaiting),Ii(u,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0},l.onBufferAppended=function(e,r){this.buffered=r.timeRanges},l.tick=function(){var e;if(null!=(e=this.media)&&e.readyState&&this.hasBuffered){var r=this.media.currentTime;this.poll(r,this.lastCurrentTime),this.lastCurrentTime=r}},l.poll=function(e,r){var u,c,v=null==(u=this.hls)?void 0:u.config;if(v){var p=this.media;if(p){var y=p.seeking,T=this.seeking&&!y,E=!this.seeking&&y,x=p.paused&&!y||p.ended||0===p.playbackRate;if(this.seeking=y,e!==r)return r&&(this.ended=0),this.moved=!0,y||(this.nudgeRetry=0,v.nudgeOnVideoHole&&!x&&e>r&&this.nudgeOnVideoHole(e,r)),void(0===this.waiting&&this.stallResolved(e));if(E||T)return void(T&&this.stallResolved(e));if(x)return this.nudgeRetry=0,this.stallResolved(e),void(!this.ended&&p.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(O.MEDIA_ENDED,{stalled:!1})));if(!tr.getBuffered(p).length)return void(this.nudgeRetry=0);var C=tr.bufferInfo(p,e,0),k=C.nextStart||0,w=this.fragmentTracker;if(y&&w&&this.hls){var M=ch(this.hls.inFlightFragments,e),H=C.len>2,Y=!k||M||k-e>2&&!w.getPartialFragment(e);if(H||Y)return;this.moved=!1}var j=null==(c=this.hls)?void 0:c.latestLevelDetails;if(!this.moved&&null!==this.stalled&&w){if(!(C.len>0||k))return;var le=Math.max(k,C.start||0)-e,Se=null!=j&&j.live?2*j.targetduration:2,we=fl(e,w);if(le>0&&(le<=Se||we))return void(p.paused||this._trySkipBufferHole(we))}var Te=v.detectStallWithCurrentTimeMs,oe=self.performance.now(),fe=this.waiting,Ce=this.stalled;if(null===Ce){if(!(fe>0&&oe-fe<Te))return void(this.stalled=oe);Ce=this.stalled=fe}var ze=oe-Ce;if(!y&&(ze>=Te||fe)&&this.hls){var He;if("ended"===(null==(He=this.mediaSource)?void 0:He.readyState)&&(null==j||!j.live)&&Math.abs(e-((null==j?void 0:j.edge)||0))<1){if(this.ended)return;return this.ended=e||1,void this.hls.trigger(O.MEDIA_ENDED,{stalled:!0})}if(this._reportStall(C),!this.media||!this.hls)return}var We=tr.bufferInfo(p,e,v.maxBufferHole);this._tryFixBufferStall(We,ze,e)}}},l.stallResolved=function(e){var r=this.stalled;if(r&&this.hls&&(this.stalled=null,this.stallReported)){var u=self.performance.now()-r;this.log("playback not stuck anymore @"+e+", after "+Math.round(u)+"ms"),this.stallReported=!1,this.waiting=0,this.hls.trigger(O.STALL_RESOLVED,{})}},l.nudgeOnVideoHole=function(e,r){var u,c=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&null!=(u=this.buffered.audio)&&u.length&&c&&c.length>1&&e>c.end(0)){var v=tr.bufferedInfo(tr.timeRangesToArray(this.buffered.audio),e,0);if(v.len>1&&r>=v.start){var p=tr.timeRangesToArray(c),y=tr.bufferedInfo(p,r,0).bufferedIndex;if(y>-1&&y<p.length-1){var T=tr.bufferedInfo(p,e,0).bufferedIndex,E=p[y].end,x=p[y+1].start;if((-1===T||T>y)&&x-E<1&&e-E<2){var C=new Error("nudging playhead to flush pipeline after video hole. currentTime: "+e+" hole: "+E+" -> "+x+" buffered index: "+T);this.warn(C.message),this.media.currentTime+=1e-6;var k=fl(e,this.fragmentTracker);k&&"fragment"in k?k=k.fragment:k||(k=void 0);var w=tr.bufferInfo(this.media,e,0);this.hls.trigger(O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:C,reason:C.message,frag:k,buffer:w.len,bufferInfo:w})}}}}},l._tryFixBufferStall=function(e,r,u){var c,v,p=this.fragmentTracker,T=null==(c=this.hls)?void 0:c.config;if(this.media&&p&&T){var E=null==(v=this.hls)?void 0:v.latestLevelDetails,x=fl(u,p);if((x||null!=E&&E.live&&u<E.fragmentStart)&&(this._trySkipBufferHole(x)||!this.media))return;var k=e.buffered,w=this.adjacentTraversal(e,u);(k&&k.length>1&&e.len>T.maxBufferHole||e.nextStart&&(e.nextStart-u<T.maxBufferHole||w))&&(r>1e3*T.highBufferWatchdogPeriod||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}},l.adjacentTraversal=function(e,r){var u=this.fragmentTracker,c=e.nextStart;if(u&&c){var v=u.getFragAtPos(r,Ie.MAIN),p=u.getFragAtPos(c,Ie.MAIN);if(v&&p)return p.sn-v.sn<2}return!1},l._reportStall=function(e){var r=this.hls,u=this.media,v=this.stalled;if(!this.stallReported&&null!==v&&u&&r){this.stallReported=!0;var p=new Error("Playback stalling at @"+u.currentTime+" due to low buffer ("+cr(e)+")");this.warn(p.message),r.trigger(O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.BUFFER_STALLED_ERROR,fatal:!1,error:p,buffer:e.len,bufferInfo:e,stalled:{start:v}})}},l._trySkipBufferHole=function(e){var r,u=this.fragmentTracker,c=this.media,v=null==(r=this.hls)?void 0:r.config;if(!c||!u||!v)return 0;var p=c.currentTime,y=tr.bufferInfo(c,p,0),T=p<y.start?y.start:y.nextStart;if(T&&this.hls){var C=T-p;if(C>0&&(y.len<=v.maxBufferHole||y.len>0&&y.len<1&&c.readyState<3)){if(C>v.maxBufferHole){var k=!1;if(0===p){var w=u.getAppendedFrag(0,Ie.MAIN);w&&T<w.end&&(k=!0)}if(!k&&e){var M;if(null==(M=this.hls.loadLevelObj)||!M.details)return 0;if(ch(this.hls.inFlightFragments,T))return 0;for(var Y=!1,j=e.end;j<T;){var $=fl(j,u);if(!$){Y=!0;break}j+=$.duration}if(Y)return 0}}var le=Math.max(T+.05,p+.1);if(this.warn("skipping hole, adjusting currentTime from "+p+" to "+le),this.moved=!0,c.currentTime=le,null==e||!e.gap){var pe=new Error("fragment loaded with buffer holes, seeking from "+p+" to "+le),Se={type:Ae.MEDIA_ERROR,details:ue.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:pe,reason:pe.message,buffer:y.len,bufferInfo:y};e&&("fragment"in e?Se.part=e:Se.frag=e),this.hls.trigger(O.ERROR,Se)}return le}}return 0},l._tryNudgeBuffer=function(e){var r=this.hls,u=this.media,c=this.nudgeRetry,v=null==r?void 0:r.config;if(!u||!v)return 0;var p=u.currentTime;if(this.nudgeRetry++,c<v.nudgeMaxRetry){var y=p+(c+1)*v.nudgeOffset,T=new Error("Nudging 'currentTime' from "+p+" to "+y);this.warn(T.message),u.currentTime=y,r.trigger(O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.BUFFER_NUDGE_ON_STALL,error:T,fatal:!1,buffer:e.len,bufferInfo:e})}else{var E=new Error("Playhead still not moving while enough data buffered @"+p+" after "+v.nudgeMaxRetry+" nudges");this.error(E.message),r.trigger(O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.BUFFER_STALLED_ERROR,error:E,fatal:!0,buffer:e.len,bufferInfo:e})}},ce(h,[{key:"hasBuffered",get:function(){return Object.keys(this.buffered).length>0}}])}(wf);function ch(f,h){var l=hh(f.main);if(l&&l.start<=h)return l;var i=hh(f.audio);return i&&i.start<=h?i:null}function hh(f){if(!f)return null;switch(f.state){case Ke.IDLE:case Ke.STOPPED:case Ke.ENDED:case Ke.ERROR:return null}return f.frag}function fl(f,h){return h.getAppendedFrag(f,Ie.MAIN)||h.getPartialFragment(f)}function af(){if(!(typeof self>"u"))return self.VTTCue||self.TextTrackCue}function sf(f,h,l,i,e){var r=new f(h,l,"");try{r.value=i,e&&(r.type=e)}catch(u){r=new f(h,l,cr(e?Oe({type:e},i):i))}return r}var cl=function(){var f=af();try{f&&new f(0,Number.POSITIVE_INFINITY,"")}catch(h){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}(),of=function(){function f(l){var i=this;this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.assetCue=void 0,this.onEventCueEnter=function(){i.hls&&i.hls.trigger(O.EVENT_CUE_ENTER,{})},this.hls=l,this._registerListeners()}var h=f.prototype;return h.destroy=function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null},h._registerListeners=function(){var i=this.hls;i&&(i.on(O.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(O.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(O.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(O.MANIFEST_LOADING,this.onManifestLoading,this),i.on(O.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),i.on(O.BUFFER_FLUSHING,this.onBufferFlushing,this),i.on(O.LEVEL_UPDATED,this.onLevelUpdated,this),i.on(O.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))},h._unregisterListeners=function(){var i=this.hls;i&&(i.off(O.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(O.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(O.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(O.MANIFEST_LOADING,this.onManifestLoading,this),i.off(O.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),i.off(O.BUFFER_FLUSHING,this.onBufferFlushing,this),i.off(O.LEVEL_UPDATED,this.onLevelUpdated,this),i.off(O.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))},h.onMediaAttaching=function(i,e){var r;this.media=e.media,!1===(null==(r=e.overrides)?void 0:r.cueRemoval)&&(this.removeCues=!1)},h.onMediaAttached=function(){var i,e=null==(i=this.hls)?void 0:i.latestLevelDetails;e&&this.updateDateRangeCues(e)},h.onMediaDetaching=function(i,e){this.media=null,e.transferMedia||(this.id3Track&&(this.removeCues&&Gs(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})},h.onManifestLoading=function(){this.dateRangeCuesAppended={}},h.createTrack=function(i){var e=this.getID3Track(i.textTracks);return e.mode="hidden",e},h.getID3Track=function(i){if(this.media){for(var e=0;e<i.length;e++){var r=i[e];if("metadata"===r.kind&&"id3"===r.label)return Dn(r,this.media),r}return this.media.addTextTrack("metadata","id3")}},h.onFragParsingMetadata=function(i,e){if(this.media&&this.hls){var r=this.hls.config,u=r.enableEmsgMetadataCues,c=r.enableID3MetadataCues;if(u||c){var v=e.samples;this.id3Track||(this.id3Track=this.createTrack(this.media));var p=af();if(p)for(var y=0;y<v.length;y++){var T=v[y].type;if((T!==Jr.emsg||u)&&c){var E=Jf(v[y].data),x=v[y].pts,C=x+v[y].duration;C>cl&&(C=cl),C-x<=0&&(C=x+.25);for(var w=0;w<E.length;w++){var M=E[w];if(!ui(M)){this.updateId3CueEnds(x,T);var H=sf(p,x,C,M,T);H&&this.id3Track.addCue(H)}}}}}}},h.updateId3CueEnds=function(i,e){var r,u=null==(r=this.id3Track)?void 0:r.cues;if(u)for(var c=u.length;c--;){var v=u[c];v.type===e&&v.startTime<i&&v.endTime===cl&&(v.endTime=i)}},h.onBufferFlushing=function(i,e){var c=e.type,v=this.id3Track,p=this.hls;if(p){var y=p.config,T=y.enableEmsgMetadataCues,E=y.enableID3MetadataCues;v&&(T||E)&&el(v,e.startOffset,e.endOffset,"audio"===c?function(k){return k.type===Jr.audioId3&&E}:"video"===c?function(k){return k.type===Jr.emsg&&T}:function(k){return k.type===Jr.audioId3&&E||k.type===Jr.emsg&&T})}},h.onLevelUpdated=function(i,e){this.updateDateRangeCues(e.details,!0)},h.onLevelPtsUpdated=function(i,e){Math.abs(e.drift)>.01&&this.updateDateRangeCues(e.details)},h.updateDateRangeCues=function(i,e){var r=this;if(this.hls&&this.media){var u=this.hls.config,c=u.assetPlayerId,v=u.timelineOffset,y=u.interstitialsController;if(u.enableDateRangeMetadataCues){var T=af();if(c&&v&&!y){var E=i.fragmentStart,x=i.fragmentEnd,C=this.assetCue;C?(C.startTime=E,C.endTime=x):T&&(C=this.assetCue=sf(T,E,x,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"))&&(C.id=c,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(C),C.addEventListener("enter",this.onEventCueEnter))}if(i.hasProgramDateTime){var Y,k=this.id3Track,w=i.dateRanges,M=Object.keys(w),H=this.dateRangeCuesAppended;if(k&&e)if(null!=(Y=k.cues)&&Y.length)for(var j=Object.keys(H).filter(function(Te){return!M.includes(Te)}),$=function(){var oe,fe=j[le],Ce=null==(oe=H[fe])?void 0:oe.cues;delete H[fe],Ce&&Object.keys(Ce).forEach(function(ze){var He=Ce[ze];if(He){He.removeEventListener("enter",r.onEventCueEnter);try{k.removeCue(He)}catch(We){}}})},le=j.length;le--;)$();else H=this.dateRangeCuesAppended={};var pe=i.fragments[i.fragments.length-1];if(0!==M.length&&X(null==pe?void 0:pe.programDateTime)){this.id3Track||(this.id3Track=this.createTrack(this.media));for(var Se=function(){var oe=M[we],fe=w[oe],Ce=fe.startTime,ze=H[oe],He=(null==ze?void 0:ze.cues)||{}
vendor: 6,361 bytes, line 11
11,We=(null==ze?void 0:ze.durationKnown)||!1,vt=cl,At=fe.duration;if(fe.endDate&&null!==At)vt=Ce+At,We=!0;else if(fe.endOnNext&&!We){var Pt=M.reduce(function(Ar,Cr){if(Cr!==fe.id){var fr=w[Cr];if(fr.class===fe.class&&fr.startDate>fe.startDate&&(!Ar||fe.startDate<Ar.startDate))return fr}return Ar},null);Pt&&(vt=Pt.startTime,We=!0)}for(var Ht=Object.keys(fe.attr),Lt=0;Lt<Ht.length;Lt++){var bt=Ht[Lt];if(Wl(bt)){var kt=He[bt];if(kt)!We||null!=ze&&ze.durationKnown?Math.abs(kt.startTime-Ce)>.01&&(kt.startTime=Ce,kt.endTime=vt):kt.endTime=vt;else if(T){var Gt=fe.attr[bt];jh(bt)&&(Gt=Fr(Gt));var Zt=sf(T,Ce,vt,{key:bt,data:Gt},Jr.dateRange);Zt&&(Zt.id=oe,r.id3Track.addCue(Zt),He[bt]=Zt,y&&("X-ASSET-LIST"===bt||"X-ASSET-URL"===bt)&&Zt.addEventListener("enter",r.onEventCueEnter))}}}H[oe]={cues:He,dateRange:fe,durationKnown:We}},we=0;we<M.length;we++)Se()}}}}},f}(),Qv=function(){function f(l){var i=this;this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=function(){var e=i.media,r=i.levelDetails;if(e&&r){i.currentTime=e.currentTime;var u=i.computeLatency();if(null!==u){i._latency=u;var c=i.config,p=c.maxLiveSyncPlaybackRate;if(c.lowLatencyMode&&1!==p&&r.live){var y=i.targetLatency;if(null!==y){var T=u-y;if(T<Math.min(i.maxLatency,y+r.targetduration)&&T>.05&&i.forwardBufferLength>1){var C=Math.min(2,Math.max(1,p)),k=Math.round(2/(1+Math.exp(-.75*T-i.edgeStalled))*20)/20,w=Math.min(C,Math.max(1,k));i.changeMediaPlaybackRate(e,w)}else 1!==e.playbackRate&&0!==e.playbackRate&&i.changeMediaPlaybackRate(e,1)}}}}},this.hls=l,this.config=l.config,this.registerListeners()}var h=f.prototype;return h.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null},h.registerListeners=function(){var i=this.hls;i&&(i.on(O.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(O.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(O.MANIFEST_LOADING,this.onManifestLoading,this),i.on(O.LEVEL_UPDATED,this.onLevelUpdated,this),i.on(O.ERROR,this.onError,this))},h.unregisterListeners=function(){var i=this.hls;i&&(i.off(O.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(O.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(O.MANIFEST_LOADING,this.onManifestLoading,this),i.off(O.LEVEL_UPDATED,this.onLevelUpdated,this),i.off(O.ERROR,this.onError,this))},h.onMediaAttached=function(i,e){this.media=e.media,this.media.addEventListener("timeupdate",this.onTimeupdate)},h.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)},h.onManifestLoading=function(){this._latency=null,this.stallCount=0},h.onLevelUpdated=function(i,e){var r=e.details;r.advanced&&this.onTimeupdate(),!r.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)},h.onError=function(i,e){var r;e.details===ue.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&null!=(r=this.levelDetails)&&r.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))},h.changeMediaPlaybackRate=function(i,e){var r,u;i.playbackRate!==e&&(null==(r=this.hls)||r.logger.debug("[latency-controller]: latency="+this.latency.toFixed(3)+", targetLatency="+(null==(u=this.targetLatency)?void 0:u.toFixed(3))+", forwardBufferLength="+this.forwardBufferLength.toFixed(3)+": adjusting playback rate from "+i.playbackRate+" to "+e),i.playbackRate=e)},h.estimateLiveEdge=function(){var i=this.levelDetails;return null===i?null:i.edge+i.age},h.computeLatency=function(){var i=this.estimateLiveEdge();return null===i?null:i-this.currentTime},ce(f,[{key:"levelDetails",get:function(){var i;return(null==(i=this.hls)?void 0:i.latestLevelDetails)||null}},{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var i=this.config;if(void 0!==i.liveMaxLatencyDuration)return i.liveMaxLatencyDuration;var e=this.levelDetails;return e?i.liveMaxLatencyDurationCount*e.targetduration:0}},{key:"targetLatency",get:function(){var i=this.levelDetails;if(null===i||null===this.hls)return null;var u=i.targetduration,c=this.config,v=c.liveSyncDuration,T=this.hls.userConfig,E=c.lowLatencyMode&&i.partHoldBack||i.holdBack;return(this._targetLatencyUpdated||T.liveSyncDuration||T.liveSyncDurationCount||0===E)&&(E=void 0!==v?v:c.liveSyncDurationCount*u),E+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,u)},set:function(i){this.stallCount=0,this.config.liveSyncDuration=i,this._targetLatencyUpdated=!0}},{key:"liveSyncPosition",get:function(){var i=this.estimateLiveEdge(),e=this.targetLatency;if(null===i||null===e)return null;var r=this.levelDetails;if(null===r)return null;var u=r.edge,p=u-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(u-r.totalduration,i-e-this.edgeStalled),p)}},{key:"drift",get:function(){var i=this.levelDetails;return null===i?1:i.drift}},{key:"edgeStalled",get:function(){var i=this.levelDetails;return null===i?0:Math.max(i.age-3*(this.config.lowLatencyMode&&i.partTarget||i.targetduration),0)}},{key:"forwardBufferLength",get:function(){var i=this.media,e=this.levelDetails;if(!i||!e)return 0;var r=i.buffered.length;return(r?i.buffered.end(r-1):e.edge)-this.currentTime}}])}(),Zv=function(f){function h(i,e){var r;return(r=f.call(this,i,"level-controller")||this)._levels=[],r._firstLevel=-1,r._maxAutoLevel=-1,r._startLevel=void 0,r.currentLevel=null,r.currentLevelIndex=-1,r.manualLevelIndex=-1,r.steering=void 0,r.onParsedComplete=void 0,r.steering=e,r._registerListeners(),r}xe(h,f);var l=h.prototype;return l._registerListeners=function(){var e=this.hls;e.on(O.MANIFEST_LOADING,this.onManifestLoading,this),e.on(O.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(O.LEVEL_LOADED,this.onLevelLoaded,this),e.on(O.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(O.FRAG_BUFFERED,this.onFragBuffered,this),e.on(O.ERROR,this.onError,this)},l._unregisterListeners=function(){var e=this.hls;e.off(O.MANIFEST_LOADING,this.onManifestLoading,this),e.off(O.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(O.LEVEL_LOADED,this.onLevelLoaded,this),e.off(O.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(O.FRAG_BUFFERED,this.onFragBuffered,this),e.off(O.ERROR,this.onError,this)},l.destroy=function(){this._unregisterListeners(),this.steering=null,this.resetLevels(),f.prototype.destroy.call(this)}
11,l.stopLoad=function(){this._levels.forEach(function(r){r.loadError=0,r.fragmentError=0}),f.prototype.stopLoad.call(this)},l.resetLevels=function(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1},l.onManifestLoading=function(e,r){this.resetLevels()},l.onManifestLoaded=function(e,r){var u=this,c=this.hls.config.preferManagedMediaSource,v=[],p={},y={},T=!1,E=!1,x=!1;r.levels.forEach(function(C){var k=C.attrs,w=C.audioCodec,M=C.videoCodec;w&&(C.audioCodec=w=Oi(w,c)||void 0),M&&(M=C.videoCodec=function an(f){for(var h=f.split(","),l=0;l<h.length;l++){var i=h[l].split(".");i.length>2&&"avc1"===i[0]&&(h[l]="avc1."+parseInt(i[1]).toString(16)+("000"+parseInt(i[2]).toString(16)).slice(-4))}return h.join(",")}(M));var j=C.unknownCodecs;if(T||(T=!(!C.width||!C.height)),E||(E=!!M),x||(x=!!w),(null==j?void 0:j.length)||w&&!u.isAudioSupported(w)||M&&!u.isVideoSupported(M))u.log('Some or all CODECS not supported "'+k.CODECS+'"');else{var Ce=(k["PATHWAY-ID"]||".")+"-"+C.bitrate+"-"+k.RESOLUTION+"-"+k["FRAME-RATE"]+"-"+k.CODECS+"-"+k["VIDEO-RANGE"]+"-"+k["HDCP-LEVEL"];if(p[Ce])if(p[Ce].uri===C.url||C.attrs["PATHWAY-ID"])p[Ce].addGroupId("audio",k.AUDIO),p[Ce].addGroupId("text",k.SUBTITLES);else{var He=y[Ce]+=1;C.attrs["PATHWAY-ID"]=new Array(He+1).join(".");var We=u.createLevel(C);p[Ce]=We,v.push(We)}else{var ze=u.createLevel(C);p[Ce]=ze,y[Ce]=1,v.push(ze)}}}),this.filterAndSortMediaOptions(v,r,T,E,x)},l.createLevel=function(e){var r=new wa(e),u=e.supplemental;if(null!=u&&u.videoCodec&&!this.isVideoSupported(u.videoCodec)){var c=new Error('SUPPLEMENTAL-CODECS not supported "'+u.videoCodec+'"');this.log(c.message),r.supportedResult=du(c,[])}return r},l.isAudioSupported=function(e){return $r(e,"audio",this.hls.config.preferManagedMediaSource)},l.isVideoSupported=function(e){return $r(e,"video",this.hls.config.preferManagedMediaSource)},l.filterAndSortMediaOptions=function(e,r,u,c,v){var p,y=this,T=[],E=[],x=e,C=(null==(p=r.stats)?void 0:p.parsing)||{};if((u||c)&&v&&(x=x.filter(function(oe){return(!!oe.videoCodec||!(!oe.width||!oe.height))&&function vu(f){return!!f&&us.indexOf(f)>-1}(oe.videoRange)})),0===x.length)return Promise.resolve().then(function(){if(y.hls){var oe="no level with compatible codecs found in manifest",fe=oe;r.levels.length&&(fe="one or more CODECS in variant not supported: "+cr(r.levels.map(function(ze){return ze.attrs.CODECS}).filter(function(ze,He,We){return We.indexOf(ze)===He})),y.warn(fe),oe+=" ("+fe+")");var Ce=new Error(oe);y.hls.trigger(O.ERROR,{type:Ae.MEDIA_ERROR,details:ue.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:r.url,error:Ce,reason:fe})}}),void(C.end=performance.now());r.audioTracks&&uf(T=r.audioTracks.filter(function(oe){return!oe.audioCodec||y.isAudioSupported(oe.audioCodec)})),r.subtitles&&uf(E=r.subtitles);var k=x.slice(0);x.sort(function(oe,fe){if(oe.attrs["HDCP-LEVEL"]!==fe.attrs["HDCP-LEVEL"])return(oe.attrs["HDCP-LEVEL"]||"")>(fe.attrs["HDCP-LEVEL"]||"")?1:-1;if(u&&oe.height!==fe.height)return oe.height-fe.height;if(oe.frameRate!==fe.frameRate)return oe.frameRate-fe.frameRate;if(oe.videoRange!==fe.videoRange)return us.indexOf(oe.videoRange)-us.indexOf(fe.videoRange);if(oe.videoCodec!==fe.videoCodec){var Ce=Xr(oe.videoCodec),ze=Xr(fe.videoCodec);if(Ce!==ze)return ze-Ce}if(oe.uri===fe.uri&&oe.codecSet!==fe.codecSet){var He=bi(oe.codecSet),We=bi(fe.codecSet);if(He!==We)return We-He}return oe.averageBitrate!==fe.averageBitrate?oe.averageBitrate-fe.averageBitrate:0});var w=k[0];if(this.steering&&(x=this.steering.filterParsedLevels(x)).length!==k.length)for(var M=0;M<k.length;M++)if(k[M].pathwayId===x[0].pathwayId){w=k[M];break}this._levels=x;for(var H=0;H<x.length;H++)if(x[H]===w){var Y;this._firstLevel=H;var j=w.bitrate,$=this.hls.bandwidthEstimate;if(this.log("manifest loaded, "+x.length+" level(s) found, first bitrate: "+j),void 0===(null==(Y=this.hls.userConfig)?void 0:Y.abrEwmaDefaultEstimate)){var le=Math.min(j,this.hls.config.abrEwmaDefaultEstimateMax);le>$&&$===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=le)}break}var Se=this.hls.config,Te={levels:x,audioTracks:T,subtitleTracks:E,sessionData:r.sessionData,sessionKeys:r.sessionKeys,firstLevel:this._firstLevel,stats:r.stats,audio:v,video:c,altAudio:!(!Se.audioStreamController||!Se.audioTrackController)&&!(v&&!c)&&T.some(function(oe){return!!oe.url})};C.end=performance.now(),this.hls.trigger(O.MANIFEST_PARSED,Te)},l.onError=function(e,r){r.fatal||!r.context||r.context.type===Qe.LEVEL&&r.context.level===this.level&&this.checkRetry(r)},l.onFragBuffered=function(e,r){var u=r.frag;if(void 0!==u&&u.type===Ie.MAIN){var c=u.elementaryStreams;if(!Object.keys(c).some(function(p){return!!c[p]}
vendor: 8,031 bytes, line 11
11))return;var v=this._levels[u.level];null!=v&&v.loadError&&(this.log("Resetting level error count of "+v.loadError+" on frag buffered"),v.loadError=0)}},l.onLevelLoaded=function(e,r){var u,y,c=r.level,v=r.details,p=r.levelInfo;if(!p)return this.warn("Invalid level index "+c),void(null!=(y=r.deliveryDirectives)&&y.skip&&(v.deltaUpdateFailed=!0));if(p===this.currentLevel||r.withoutMultiVariant){0===p.fragmentError&&(p.loadError=0);var T=p.details;T===r.details&&T.advanced&&(T=void 0),this.playlistLoaded(c,r,T)}else null!=(u=r.deliveryDirectives)&&u.skip&&(v.deltaUpdateFailed=!0)},l.loadPlaylist=function(e){f.prototype.loadPlaylist.call(this),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)},l.loadingPlaylist=function(e,r){f.prototype.loadingPlaylist.call(this,e,r);var u=this.getUrlWithDirectives(e.uri,r),c=this.currentLevelIndex,v=e.attrs["PATHWAY-ID"],p=e.details,y=null==p?void 0:p.age;this.log("Loading level index "+c+(void 0!==(null==r?void 0:r.msn)?" at sn "+r.msn+" part "+r.part:"")+(v?" Pathway "+v:"")+(y&&p.live?" age "+y.toFixed(1)+(p.type?" "+p.type||0:""):"")+" "+u),this.hls.trigger(O.LEVEL_LOADING,{url:u,level:c,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:r||null})},l.removeLevel=function(e){var u,r=this;if(1!==this._levels.length){var c=this._levels.filter(function(p,y){return y!==e||(r.steering&&r.steering.removeLevel(p),p===r.currentLevel&&(r.currentLevel=null,r.currentLevelIndex=-1,p.details&&p.details.fragments.forEach(function(T){return T.level=-1})),!1)});Es(c),this._levels=c,this.currentLevelIndex>-1&&null!=(u=this.currentLevel)&&u.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);var v=c.length-1;this._firstLevel=Math.min(this._firstLevel,v),this._startLevel&&(this._startLevel=Math.min(this._startLevel,v)),this.hls.trigger(O.LEVELS_UPDATED,{levels:c})}},l.onLevelsUpdated=function(e,r){this._levels=r.levels},l.checkMaxAutoUpdated=function(){var e=this.hls,r=e.autoLevelCapping,u=e.maxAutoLevel,c=e.maxHdcpLevel;this._maxAutoLevel!==u&&(this._maxAutoLevel=u,this.hls.trigger(O.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:r,levels:this.levels,maxAutoLevel:u,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:c}))},ce(h,[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"loadLevelObj",get:function(){return this.currentLevel}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var r=this._levels;if(0!==r.length){if(e<0||e>=r.length){var u=new Error("invalid level idx"),c=e<0;if(this.hls.trigger(O.ERROR,{type:Ae.OTHER_ERROR,details:ue.LEVEL_SWITCH_ERROR,level:e,fatal:c,error:u,reason:u.message}),c)return;e=Math.min(e,r.length-1)}var v=this.currentLevelIndex,p=this.currentLevel,y=p?p.attrs["PATHWAY-ID"]:void 0,T=r[e],E=T.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=T,v!==e||!p||y!==E){this.log("Switching to level "+e+" ("+(T.height?T.height+"p ":"")+(T.videoRange?T.videoRange+" ":"")+(T.codecSet?T.codecSet+" ":"")+"@"+T.bitrate+")"+(E?" with Pathway "+E:"")+" from level "+v+(y?" with Pathway "+y:"")),this.hls.trigger(O.LEVEL_SWITCHING,{level:e,attrs:T.attrs,details:T.details,bitrate:T.bitrate,averageBitrate:T.averageBitrate,maxBitrate:T.maxBitrate,realBitrate:T.realBitrate,width:T.width,height:T.height,codecSet:T.codecSet,audioCodec:T.audioCodec,videoCodec:T.videoCodec,audioGroups:T.audioGroups,subtitleGroups:T.subtitleGroups,loaded:T.loaded,loadError:T.loadError,fragmentError:T.fragmentError,name:T.name,id:T.id,uri:T.uri,url:T.url,urlId:0,audioGroupIds:T.audioGroupIds,textGroupIds:T.textGroupIds});var C=T.details;if(!C||C.live){var k=this.switchParams(T.uri,null==p?void 0:p.details,C);this.loadPlaylist(k)}}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this.hls.firstAutoLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"pathways",get:function(){return this.steering?this.steering.pathways():[]}},{key:"pathwayPriority",get:function(){return this.steering?this.steering.pathwayPriority:null},set:function(e){if(this.steering){var r=this.steering.pathways(),u=e.filter(function(c){return-1!==r.indexOf(c)});if(e.length<1)return void this.warn("pathwayPriority "+e+" should contain at least one pathway from list: "+r);this.steering.pathwayPriority=u}}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])}(_d);function uf(f){var h={};f.forEach(function(l){var i=l.groupId||"";l.id=h[i]=h[i]||0,h[i]++})}function lf(){return self.SourceBuffer||self.WebKitSourceBuffer}function vh(){if(!Ir())return!1;var h=lf();return!h||h.prototype&&"function"==typeof h.prototype.appendBuffer&&"function"==typeof h.prototype.remove}var rp=function(f){function h(i,e,r){var u;return(u=f.call(this,i,e,r,"stream-controller",Ie.MAIN)||this).audioCodecSwap=!1,u.level=-1,u._forceStartLoad=!1,u._hasEnoughToStart=!1,u.altAudio=0,u.audioOnly=!1,u.fragPlaying=null,u.fragLastKbps=0,u.couldBacktrack=!1,u.backtrackFragment=null,u.audioCodecSwitch=!1,u.videoBuffer=null,u.onMediaPlaying=function(){u.tick()},u.onMediaSeeked=function(){var c=u.media,v=c?c.currentTime:null;if(null!==v&&X(v)&&(u.log("Media seeked to "+v.toFixed(3)),u.getBufferedFrag(v))){var p=u.getFwdBufferInfoAtPos(c,v,Ie.MAIN,0);if(null===p||0===p.len)return void u.warn("Main forward buffer length at "+v+' on "seeked" event '+(p?p.len:"empty")+")");u.tick()}},u.registerListeners(),u}xe(h,f);var l=h.prototype;return l.registerListeners=function(){f.prototype.registerListeners.call(this);var e=this.hls;e.on(O.MANIFEST_PARSED,this.onManifestParsed,this),e.on(O.LEVEL_LOADING,this.onLevelLoading,this),e.on(O.LEVEL_LOADED,this.onLevelLoaded,this),e.on(O.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(O.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(O.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(O.BUFFER_CREATED,this.onBufferCreated,this),e.on(O.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(O.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(O.FRAG_BUFFERED,this.onFragBuffered,this)},l.unregisterListeners=function(){f.prototype.unregisterListeners.call(this);var e=this.hls;e.off(O.MANIFEST_PARSED,this.onManifestParsed,this),e.off(O.LEVEL_LOADED,this.onLevelLoaded,this),e.off(O.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(O.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(O.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(O.BUFFER_CREATED,this.onBufferCreated,this),e.off(O.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(O.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(O.FRAG_BUFFERED,this.onFragBuffered,this)},l.onHandlerDestroying=function(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),f.prototype.onHandlerDestroying.call(this)},l.startLoad=function(e,r){if(this.levels){var u=this.lastCurrentTime,c=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,!this.startFragRequested){var v=c.startLevel;-1===v&&(c.config.testBandwidth&&this.levels.length>1?(v=0,this.bitrateTest=!0):v=c.firstAutoLevel),c.nextLoadLevel=v,this.level=c.loadLevel,this._hasEnoughToStart=!!r}u>0&&-1===e&&!r&&(this.log("Override startPosition with lastCurrentTime @"+u.toFixed(3)),e=u),this.state=Ke.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=r?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Ke.STOPPED},l.stopLoad=function(){this._forceStartLoad=!1,f.prototype.stopLoad.c
vendor: 13,681 bytes, line 11
11all(this)},l.doTick=function(){switch(this.state){case Ke.WAITING_LEVEL:var e=this.levels,u=null==e?void 0:e[this.level],c=null==u?void 0:u.details;if(c&&(!c.live||this.levelLastLoaded===u&&!this.waitForLive(u))){if(this.waitForCdnTuneIn(c))break;this.state=Ke.IDLE;break}if(this.hls.nextLoadLevel!==this.level){this.state=Ke.IDLE;break}break;case Ke.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate()}this.state===Ke.IDLE&&this.doTickIdle(),this.onTickEnd()},l.onTickEnd=function(){var e;f.prototype.onTickEnd.call(this),null!=(e=this.media)&&e.readyState&&!1===this.media.seeking&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()},l.doTickIdle=function(){var e=this.hls,u=this.levels;if(null!==this.levelLastLoaded&&(this.media||this.primaryPrefetch||!this.startFragRequested&&e.config.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)){var v=this.buffering?e.nextLoadLevel:e.loadLevel;if(null!=u&&u[v]){var p=u[v],y=this.getMainFwdBufferInfo();if(null!==y){var T=this.getLevelDetails();if(T&&this._streamEnded(y,T)){var E={};return 2===this.altAudio&&(E.type="video"),this.hls.trigger(O.BUFFER_EOS,E),void(this.state=Ke.ENDED)}if(this.buffering){e.loadLevel!==v&&-1===e.manualLevel&&this.log("Adapting to level "+v+" from level "+this.level),this.level=e.nextLoadLevel=v;var x=p.details;if(!x||this.state===Ke.WAITING_LEVEL||this.waitForLive(p))return this.level=v,this.state=Ke.WAITING_LEVEL,void(this.startFragRequested=!1);var C=y.len,k=this.getMaxBufferLength(p.maxBitrate);if(!(C>=k)){this.backtrackFragment&&this.backtrackFragment.start>y.end&&(this.backtrackFragment=null);var w=this.backtrackFragment?this.backtrackFragment.start:y.end,M=this.getNextFragment(w,x);if(this.couldBacktrack&&!this.fragPrevious&&M&&gr(M)&&this.fragmentTracker.getState(M)!==It_OK){var H,Y=(null!=(H=this.backtrackFragment)?H:M).sn,$=x.fragments[Y-x.startSN-1];$&&M.cc===$.cc&&(M=$,this.fragmentTracker.removeFragment($))}else this.backtrackFragment&&y.len&&(this.backtrackFragment=null);if(M&&this.isLoopLoading(M,w)){if(!M.gap){var pe=this.audioOnly&&!this.altAudio?Kt.AUDIO:Kt.VIDEO,Se=(pe===Kt.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;Se&&this.afterBufferFlushed(Se,pe,Ie.MAIN)}M=this.getNextFragmentLoopLoading(M,x,y,Ie.MAIN,k)}M&&(M.initSegment&&!M.initSegment.data&&!this.bitrateTest&&(M=M.initSegment),this.loadFragment(M,p,w))}}}}}},l.loadFragment=function(e,r,u){var c=this.fragmentTracker.getState(e);c===It_NOT_LOADED||c===It_PARTIAL?gr(e)?this.bitrateTest?(this.log("Fragment "+e.sn+" of level "+e.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(e,r)):f.prototype.loadFragment.call(this,e,r,u):this._loadInitSegment(e,r):this.clearTrackerIfNeeded(e)},l.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,Ie.MAIN)},l.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},l.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},l.nextLevelSwitch=function(){var e=this.levels,r=this.media;if(null!=r&&r.readyState){var u,c=this.getAppendedFrag(r.currentTime);c&&c.start>1&&this.flushMainBuffer(0,c.start-1);var v=this.getLevelDetails();if(null!=v&&v.live){var p=this.getMainFwdBufferInfo();if(!p||p.len<2*v.targetduration)return}if(!r.paused&&e){var E=this.fragLastKbps;u=E&&this.fragCurrent?this.fragCurrent.duration*e[this.hls.nextLoadLevel].maxBitrate/(1e3*E)+1:0}else u=0;var x=this.getBufferedFrag(r.currentTime+u);if(x){var C=this.followingBufferedFrag(x);if(C){this.abortCurrentFrag();var w=C.duration,M=Math.max(x.end,(C.maxStartPTS?C.maxStartPTS:C.start)+Math.min(Math.max(w-this.config.maxFragLookUpTolerance,w*(this.couldBacktrack?.5:.125)),w*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(M,Number.POSITIVE_INFINITY)}}}},l.abortCurrentFrag=function(){var e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case Ke.KEY_LOADING:case Ke.FRAG_LOADING:case Ke.FRAG_LOADING_WAITING_RETRY:case Ke.PARSING:case Ke.PARSED:this.state=Ke.IDLE}this.nextLoadPosition=this.getLoadPosition()},l.flushMainBuffer=function(e,r){f.prototype.flushMainBuffer.call(this,e,r,2===this.altAudio?"video":null)},l.onMediaAttached=function(e,r){f.prototype.onMediaAttached.call(this,e,r);var u=r.media;oi(u,"playing",this.onMediaPlaying),oi(u,"seeked",this.onMediaSeeked)},l.onMediaDetaching=function(e,r){var u=this.media;u&&(Ii(u,"playing",this.onMediaPlaying),Ii(u,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,f.prototype.onMediaDetaching.call(this,e,r),r.transferMedia||(this._hasEnoughToStart=!1)},l.onManifestLoading=function(){f.prototype.onManifestLoading.call(this),this.log("Trigger BUFFER_RESET"),this.hls.trigger(O.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1},l.onManifestParsed=function(e,r){for(var u=!1,c=!1,v=0;v<r.levels.length;v++){var p=r.levels[v].audioCodec;p&&(u=u||-1!==p.indexOf("mp4a.40.2"),c=c||-1!==p.indexOf("mp4a.40.5"))}this.audioCodecSwitch=u&&c&&!function ep(){var f,h=lf();return"function"==typeof(null==h||null==(f=h.prototype)?void 0:f.changeType)}(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=r.levels,this.startFragRequested=!1},l.onLevelLoading=function(e,r){if(this.levels&&this.state===Ke.IDLE){var c=r.levelInfo;(!c.details||c.details.live&&(this.levelLastLoaded!==c||c.details.expired)||this.waitForCdnTuneIn(c.details))&&(this.state=Ke.WAITING_LEVEL)}},l.onLevelLoaded=function(e,r){var u,v=this.startFragRequested,p=r.level,y=r.details;if(this.levels){this.log("Level "+p+" loaded ["+y.startSN+","+y.endSN+"]"+(y.lastPartSn?"[part-"+y.lastPartSn+"-"+y.lastPartIndex+"]":"")+", cc ["+y.startCC+", "+y.endCC+"] duration:"+y.totalduration);var E=r.levelInfo,x=this.fragCurrent;x&&(this.state===Ke.FRAG_LOADING||this.state===Ke.FRAG_LOADING_WAITING_RETRY)&&x.level!==r.level&&x.loader&&this.abortCurrentFrag();var C=0;if(y.live||null!=(u=E.details)&&u.live){var k;if(this.checkLiveUpdate(y),y.deltaUpdateFailed)return;C=this.alignPlaylists(y,E.details,null==(k=this.levelLastLoaded)?void 0:k.details)}if(E.details=y,this.levelLastLoaded=E,v||this.setStartPosition(y,C),this.hls.trigger(O.LEVEL_UPDATED,{details:y,level:p}),this.state===Ke.WAITING_LEVEL){if(this.waitForCdnTuneIn(y))return;this.state=Ke.IDLE}v&&y.live&&this.synchronizeToLiveEdge(y),this.tick()}else this.warn("Levels were reset while loading level "+p)},l.synchronizeToLiveEdge=function(e){var r=this.config,u=this.media;if(u){var c=this.hls.liveSyncPosition,v=this.getLoadPosition(),y=e.edge,T=v>=e.fragmentStart-r.maxFragLookUpTolerance&&v<=y;if(null!==c&&u.duration>c&&(v<c||!T)&&(!T&&u.readyState<4||v<y-(void 0!==r.liveMaxLatencyDuration?r.liveMaxLatencyDuration:r.liveMaxLatencyDurationCount*e.targetduration))&&(this._hasEnoughToStart||(this.nextLoadPosition=c),u.readyState))if(this.warn("Playback: "+v.toFixed(3)+" is located too far from the end of live sliding playlist: "+y+", reset currentTime to : "+c.toFixed(3)),"buffered"===this.config.liveSyncMode){var x,C=tr.bufferInfo(u,c,0);if(null==(x=C.buffered)||!x.length)return void(u.currentTime=c);if(C.start<=v)return void(u.currentTime=c);var M=tr.bufferedInfo(C.buffered,v,0).nextStart;M&&(u.currentTime=M)}else u.currentTime=c}},l._handleFragmentLoadProgress=function(e){var r,u=e.frag,c=e.part,v=e.payload,p=this.levels;if(p){var y=p[u.level];if(y){var T=y.details;if(!T)return this.warn("Dropping fragment "+u.sn+" of level "+u.level+" after level details were reset"),void this.fragmentTracker.removeFragment(u);var E=y.videoCodec,x=T.PTSKnown||!T.live,C=null==(r=u.initSegment)?void 0:r.data,k=this._getAudioCodec(y),w=this.transmuxer=this.transmuxer||new fc(this.hls,Ie.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),M=c?c.index:-1,Y=new jl(u.level,u.sn,u.stats.chunkCount,v.byteLength,M,-1!==M);w.push(v,C,k,E,u,c,T.totalduration,x,Y,this.initPTS[u.cc])}else this.warn("Level "+u.level+" not found on progress")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+u.sn+" of level "+u.level+" will not be buffered")},l.onAudioTrackSwitching=function(e,r){var u=this,c=this.hls,v=0!==this.altAudio;if(ds(r.url,c))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var y=this.fragCurrent;y&&(this.log("Switching to main audio track, cancel main fragment load"),y.abortRequests(),this.fragmentTracker.removeFragment(y)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(v)return this.altAudio=0,this.fragmentTracker.removeAllFragments(),c.once(O.BUFFER_FLUSHED,function(){u.hls&&u.hls.trigger(O.AUDIO_TRACK_SWITCHED,r)}),void c.trigger(O.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});c.trigger(O.AUDIO_TRACK_SWITCHED,r)}},l.onAudioTrackSwitched=function(e,r){var u=ds(r.url,this.hls);if(u){var c=this.videoBuffer;c&&this.mediaBuffer!==c&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=c)}this.altAudio=u?2:0,this.tick()},l.onBufferCreated=function(e,r){var c,v,u=r.tracks,p=!1;for(var y in u){var T=u[y];if("main"===T.id){if(v=y,c=T,"video"===y){var E=u[y];E&&(this.videoBuffer=E.buffer)}}else p=!0}p&&c?(this.log("Alternate track found, use "+v+".buffered to schedule main fragment loading"),this.mediaBuffer=c.buffer):this.mediaBuffer=this.media},l.onFragBuffered=function(e,r){var u=r.frag,c=r.part,v=u.type===Ie.MAIN;if(v){if(this.fragContextChanged(u))return this.warn("Fragment "+u.sn+(c?" p: "+c.index:"")+" of level "+u.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===Ke.PARSED&&(this.state=Ke.IDLE));var p=c?c.stats:u.stats;this.fragLastKbps=Math.round(8*p.total/(p.buffering.end-p.loading.first)),gr(u)&&(this.fragPrevious=u),this.fragBufferedComplete(u,c)}var y=this.media;y&&(!this._hasEnoughToStart&&tr.getBuffered(y).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),v&&this.tick())},l.onError=function(e,r){var u;if(r.fatal)this.state=Ke.ERROR;else switch(r.details){case ue.FRAG_GAP:case ue.FRAG_PARSING_ERROR:case ue.FRAG_DECRYPT_ERROR:case ue.FRAG_LOAD_ERROR:case ue.FRAG_LOAD_TIMEOUT:case ue.KEY_LOAD_ERROR:case ue.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Ie.MAIN,r);break;case ue.LEVEL_LOAD_ERROR:case ue.LEVEL_LOAD_TIMEOUT:case ue.LEVEL_PARSING_ERROR:!r.levelRetry&&this.state===Ke.WAITING_LEVEL&&(null==(u=r.context)?void 0:u.type)===Qe.LEVEL&&(this.state=Ke.IDLE);break;case ue.BUFFER_ADD_CODEC_ERROR:case ue.BUFFER_APPEND_ERROR:if("main"!==r.parent)return;this.reduceLengthAndFlushBuffer(r)&&this.resetLoadingState();break;case ue.BUFFER_FULL_ERROR:if("main"!==r.parent)return;this.reduceLengthAndFlushBuffer(r)&&(!this.config.interstitialsController&&this.config.assetPlayerId?this._hasEnoughToStart=!0:this.flushMainBuffer(0,Number.POSITIVE_INFINITY));break;case ue.INTERNAL_EXCEPTION:this.recoverWorkerError(r)}},l.onFragLoadEmergencyAborted=function(){this.state=Ke.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()},l.onBufferFlushed=function(e,r){var u=r.type;if(u!==Kt.AUDIO||!this.altAudio){var c=(u===Kt.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;c&&(this.afterBufferFlushed(c,u,Ie.MAIN),this.tick())}},l.onLevelsUpdated=function(e,r){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,-1===this.level&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=r.levels},l.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},l.seekToStartPos=function(){var e=this.media;if(e){var r=e.currentTime,u=this.startPosition;if(u>=0&&r<u){if(e.seeking)return void this.log("could not seek to "+u+", already seeking at "+r);var c=this.timelineOffset;c&&u&&(u+=c);var v=this.getLevelDetails(),p=tr.getBuffered(e),y=p.length?p.start(0):0,T=y-u,E=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||T>0&&(T<E||this.loadingParts&&T<2*((null==v?void 0:v.partTarget)||0)))&&(this.log("adjusting start position by "+T+" to match buffer start"),this.startPosition=u+=T),r<u&&(this.log("seek to target start position "+u+" from current time "+r+" buffer start "+y),e.currentTime=u)}}},l._getAudioCodec=function(e){var r=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&r&&(this.log("Swapping audio codec"),r=-1!==r.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),r},l._loadBitrateTestFrag=function(e,r){var u=this;e.bitrateTest=!0,this._doFragLoad(e,r).then(function(c){var v=u.hls,p=null==c?void 0:c.frag;if(p&&!u.fragContextChanged(p)){r.fragmentError=0,u.state=Ke.IDLE,u.startFragRequested=!1,u.bitrateTest=!1;var y=p.stats;y.parsing.start=y.parsing.end=y.buffering.start=y.buffering.end=self.performance.now(),v.trigger(O.FRAG_LOADED,c),p.bitrateTest=!1}}).catch(function(c){u.state===Ke.STOPPED||u.state===Ke.ERROR||(u.warn(c),u.resetFragmentLoading(e))})},l._handleTransmuxComplete=function(e){var r=this.playlistType,u=this.hls,c=e.remuxResult,v=e.chunkMeta,p=this.getCurrentContext(v);if(p){var y=p.frag,T=p.part,E=p.level,x=c.video,C=c.text,k=c.id3,w=c.initSegment,M=E.details,H=this.altAudio?void 0:c.audio;if(this.fragContextChanged(y))this.fragmentTracker.removeFragment(y);else{if(this.state=Ke.PARSING,w){var Y=w.tracks;
vendor: 6,426 bytes, line 11
11if(Y){var j=y.initSegment||y;if(this.unhandledEncryptionError(w,y))return;this._bufferInitSegment(E,Y,j,v),u.trigger(O.FRAG_PARSING_INIT_SEGMENT,{frag:j,id:r,tracks:Y})}var $=w.initPTS,le=w.timescale,pe=this.initPTS[y.cc];if(X($)&&(!pe||pe.baseTime!==$||pe.timescale!==le)){var Se=w.trackId;this.initPTS[y.cc]={baseTime:$,timescale:le,trackId:Se},u.trigger(O.INIT_PTS_FOUND,{frag:y,id:r,initPTS:$,timescale:le,trackId:Se})}}if(x&&M){H&&"audiovideo"===x.type&&this.logMuxedErr(y);var we=M.fragments[y.sn-1-M.startSN],Te=y.sn===M.startSN,oe=!we||y.cc>we.cc;if(!1!==c.independent){var fe=x.startPTS,Ce=x.endPTS,ze=x.startDTS,He=x.endDTS;if(T)T.elementaryStreams[x.type]={startPTS:fe,endPTS:Ce,startDTS:ze,endDTS:He};else if(x.firstKeyFrame&&x.independent&&1===v.id&&!oe&&(this.couldBacktrack=!0),x.dropped&&x.independent){var We=this.getMainFwdBufferInfo(),vt=(We?We.end:this.getLoadPosition())+this.config.maxBufferHole;if(!Te&&vt<(x.firstKeyFramePTS?x.firstKeyFramePTS:fe)-this.config.maxBufferHole&&!oe)return void this.backtrack(y);oe&&(y.gap=!0),y.setElementaryStreamInfo(x.type,y.start,Ce,y.start,He,!0)}else Te&&fe-(M.appliedTimelineOffset||0)>2&&(y.gap=!0);y.setElementaryStreamInfo(x.type,fe,Ce,ze,He),this.backtrackFragment&&(this.backtrackFragment=y),this.bufferFragmentData(x,y,T,v,Te||oe)}else{if(!Te&&!oe)return void this.backtrack(y);y.gap=!0}}if(H){var St=H.startPTS,Pt=H.endPTS,Ht=H.startDTS,Lt=H.endDTS;T&&(T.elementaryStreams[Kt.AUDIO]={startPTS:St,endPTS:Pt,startDTS:Ht,endDTS:Lt}),y.setElementaryStreamInfo(Kt.AUDIO,St,Pt,Ht,Lt),this.bufferFragmentData(H,y,T,v)}M&&null!=k&&k.samples.length&&u.trigger(O.FRAG_PARSING_METADATA,{id:r,frag:y,details:M,samples:k.samples}),M&&C&&u.trigger(O.FRAG_PARSING_USERDATA,{id:r,frag:y,details:M,samples:C.samples})}}else this.resetWhenMissingContext(v)},l.logMuxedErr=function(e){this.warn((gr(e)?"Media":"Init")+" segment with muxed audiovideo where only video expected: "+e.url)},l._bufferInitSegment=function(e,r,u,c){var v=this;if(this.state===Ke.PARSING){this.audioOnly=!!r.audio&&!r.video,this.altAudio&&!this.audioOnly&&(delete r.audio,r.audiovideo&&this.logMuxedErr(u));var p=r.audio,y=r.video,T=r.audiovideo;if(p){var E=e.audioCodec,x=Tr(p.codec,E);"mp4a"===x&&(x="mp4a.40.5");var C=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){x&&(x=-1!==x.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5");var k=p.metadata;k&&"channelCount"in k&&1!==(k.channelCount||1)&&-1===C.indexOf("firefox")&&(x="mp4a.40.5")}x&&-1!==x.indexOf("mp4a.40.5")&&-1!==C.indexOf("android")&&"audio/mpeg"!==p.container&&this.log("Android: force audio codec to "+(x="mp4a.40.2")),E&&E!==x&&this.log('Swapping manifest audio codec "'+E+'" for "'+x+'"'),p.levelCodec=x,p.id=Ie.MAIN,this.log("Init audio buffer, container:"+p.container+", codecs[selected/level/parsed]=["+(x||"")+"/"+(E||"")+"/"+p.codec+"]"),delete r.audiovideo}if(y){y.levelCodec=e.videoCodec,y.id=Ie.MAIN;var w=y.codec;if(4===(null==w?void 0:w.length))switch(w){case"hvc1":case"hev1":y.codec="hvc1.1.6.L120.90";break;case"av01":y.codec="av01.0.04M.08";break;case"avc1":y.codec="avc1.42e01e"}this.log("Init video buffer, container:"+y.container+", codecs[level/parsed]=["+(e.videoCodec||"")+"/"+w+"]"+(y.codec!==w?" parsed-corrected="+y.codec:"")+(y.supplemental?" supplemental="+y.supplemental:"")),delete r.audiovideo}T&&(this.log("Init audiovideo buffer, container:"+T.container+", codecs[level/parsed]=["+e.codecs+"/"+T.codec+"]"),delete r.video,delete r.audio);var M=Object.keys(r);if(M.length){if(this.hls.trigger(O.BUFFER_CODECS,r),!this.hls)return;M.forEach(function(H){var j=r[H].initSegment;null!=j&&j.byteLength&&v.hls.trigger(O.BUFFER_APPENDING,{type:H,data:j,frag:u,part:null,chunkMeta:c,parent:u.type})})}this.tickImmediate()}},l.getMainFwdBufferInfo=function(){return this.getFwdBufferInfo(this.mediaBuffer&&2===this.altAudio?this.mediaBuffer:this.media,Ie.MAIN)},l.backtrack=function(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Ke.IDLE},l.checkFragmentChanged=function(){var e=this.media,r=null;if(e&&e.readyState>1&&!1===e.seeking){var u=e.currentTime;if(tr.isBuffered(e,u)?r=this.getAppendedFrag(u):tr.isBuffered(e,u+.1)&&(r=this.getAppendedFrag(u+.1)),r){this.backtrackFragment=null;var c=this.fragPlaying,v=r.level;(!c||r.sn!==c.sn||c.level!==v)&&(this.fragPlaying=r,this.hls.trigger(O.FRAG_CHANGED,{frag:r}),(!c||c.level!==v)&&this.hls.trigger(O.LEVEL_SWITCHED,{level:v}))}}},ce(h,[{key:"hasEnoughToStart",get:function(){return this._hasEnoughToStart}},{key:"maxBufferLength",get:function(){var e=this.levels,u=null==e?void 0:e[this.level];return u?this.getMaxBufferLength(u.maxBitrate):this.config.maxBufferLength}},{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentFrag",get:function(){var e;if(this.fragPlaying)return this.fragPlaying;var r=(null==(e=this.media)?void 0:e.currentTime)||this.lastCurrentTime;return X(r)?this.getAppendedFrag(r):null}},{key:"currentProgramDateTime",get:function(){var e,r=(null==(e=this.media)?void 0:e.currentTime)||this.lastCurrentTime;if(X(r)){var u=this.getLevelDetails(),c=this.currentFrag||(u?va(null,u.fragments,r):null);if(c){var v=c.programDateTime;if(null!==v)return new Date(v+1e3*(r-c.start))}}return null}},{key:"currentLevel",get:function(){var e=this.currentFrag;return e?e.level:-1}},{key:"nextBufferedFrag",get:function(){var e=this.currentFrag;return e?this.followingBufferedFrag(e):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])}(Pu),ph=function(f){function h(i,e){var r;return(r=f.call(this,"key-loader",e)||this).config=void 0,r.keyIdToKeyInfo={},r.emeController=null,r.config=i,r}xe(h,f);var l=h.prototype;return l.abort=function(e){for(var r in this.keyIdToKeyInfo){var u=this.keyIdToKeyInfo[r].loader;if(u){var c;if(e&&e!==(null==(c=u.context)?void 0:c.frag.type))return;u.abort()}}},l.detach=function(){for(var e in this.keyIdToKeyInfo){var r=this.keyIdToKeyInfo[e];(r.mediaKeySessionContext||r.decryptdata.isCommonEncryption)&&delete this.keyIdToKeyInfo[e]}},l.destroy=function(){for(var e in this.detach(),this.keyIdToKeyInfo){var r=this.keyIdToKeyInfo[e].loader;r&&r.destroy()}this.keyIdToKeyInfo={}},l.createKeyLoadError=function(e,r,u,c,v){return void 0===r&&(r=ue.KEY_LOAD_ERROR),new pa({type:Ae.NETWORK_E
11RROR,details:r,fatal:!1,frag:e,response:v,error:u,networkDetails:c})},l.loadClear=function(e,r,u){var c=this;if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(r.length)for(var p,v=function(){var C=r[y];if(e.cc<=C.cc&&(!gr(e)||!gr(C)||e.sn<C.sn)||!u&&y==T-1)return{v:c.emeController.selectKeySystemFormat(C).then(function(k){if(c.emeController){C.setKeyFormat(k);var w=ao(k);if(w)return c.emeController.getKeySystemAccess([w])}})}},y=0,T=r.length;y<T;y++)if(p=v())return p.v;if(this.config.requireKeySystemAccessOnStart){var E=ps(this.config);if(E.length)return this.emeController.getKeySystemAccess(E)}}return null},l.load=function(e){var r=this;return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(function(u){return r.loadInternal(e,u)}):this.loadInternal(e)},l.loadInternal=function(e,r){var u,c;r&&e.setKeyFormat(r);var v=e.decryptdata;if(!v){var p=new Error(r?"Expected frag.decryptdata to be defined after setting format "+r:"Missing decryption data on fragment in onKeyLoading (emeEnabled with controller: "+(this.emeController&&this.config.emeEnabled)+")");return Promise.reject(this.createKeyLoadError(e,ue.KEY_LOAD_ERROR,p))}var y=v.uri;if(!y)return Promise.reject(this.createKeyLoadError(e,ue.KEY_LOAD_ERROR,new Error('Invalid key URI: "'+y+'"')));var T=df(v),E=this.keyIdToKeyInfo[T];if(null!=(u=E)&&u.decryptdata.key)return v.key=E.decryptdata.key,Promise.resolve({frag:e,keyInfo:E});if(this.emeController&&null!=(c=E)&&c.keyLoadPromise)switch(this.emeController.getKeyStatus(E.decryptdata)){case"usable":case"usable-in-future":return E.keyLoadPromise.then(function(C){var k=C.keyInfo;return v.key=k.decryptdata.key,{frag:e,keyInfo:k}})}switch(this.log((this.keyIdToKeyInfo[T]?"Rel":"L")+"oading"+(v.keyId?" keyId: "+Nt(v.keyId):"")+" URI: "+v.uri+" from "+e.type+" "+e.level),E=this.keyIdToKeyInfo[T]={decryptdata:v,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},v.method){case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===v.keyFormat?this.loadKeyHTTP(E,e):this.loadKeyEME(E,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(E,e);default:return Promise.reject(this.createKeyLoadError(e,ue.KEY_LOAD_ERROR,new Error('Key supplied with unsupported METHOD: "'+v.method+'"')))}},l.loadKeyEME=function(e,r){var u={frag:r,keyInfo:e};if(this.emeController&&this.config.emeEnabled){var c;if(!e.decryptdata.keyId&&null!=(c=r.initSegment)&&c.data){var v=function ka(f){var h=[];return Fn(f,function(l){return h.push(l.subarray(8,24))}),h}(r.initSegment.data);if(v.length){var p=v[0];p.some(function(T){return 0!==T})?(this.log("Using keyId found in init segment "+Nt(p)),ga.setKeyIdForUri(e.decryptdata.uri,p)):(p=ga.addKeyIdForUri(e.decryptdata.uri),this.log("Generating keyId to patch media "+Nt(p))),e.decryptdata.keyId=p}}if(!e.decryptdata.keyId&&!gr(r))return Promise.resolve(u);var y=this.emeController.loadKey(u);return(e.keyLoadPromise=y.then(function(T){return e.mediaKeySessionContext=T,u})).catch(function(T){throw e.keyLoadPromise=null,"data"in T&&(T.data.frag=r),T})}return Promise.resolve(u)},l.loadKeyHTTP=function(e,r){var u=this,c=this.config,p=new(0,c.loader)(c);return r.keyLoader=e.loader=p,e.keyLoadPromise=new Promise(function(y,T){var E={keyInfo:e,frag:r,responseType:"arraybuffer",url:e.decryptdata.uri},x=c.keyLoadPolicy.default;p.load(E,{loadPolicy:x,timeout:x.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},{onSuccess:function(M,H,Y,j){var $=Y.frag,le=Y.keyInfo,pe=df(le.decryptdata);if(!$.decryptdata||le!==u.keyIdToKeyInfo[pe])return T(u.createKeyLoadError($,ue.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),j));le.decryptdata.key=$.decryptdata.key=new Uint8Array(M.data),$.keyLoader=null,le.loader=null,y({frag:$,keyInfo:le})},onError:function(M,H,Y,j){u.resetLoader(H),T(u.createKeyLoadError(r,ue.KEY_LOAD_ERROR,new Error("HTTP Error "+M.code+" loading key "+M.text),Y,Oe({url:E.url,data:void 0},M)))},onTimeout:function(M,H,Y){u.resetLoader(H),T(u.createKeyLoadError(r,ue.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),Y))},onAbort:function(M,H,Y){u.resetLoader(H),T(u.createKeyLoadError(r,ue.INTERNAL_ABORTED,new Error("key loading aborted"),Y))}})})}
11,l.resetLoader=function(e){var r=e.frag,u=e.keyInfo,c=e.url,v=u.loader;r.keyLoader===v&&(r.keyLoader=null,u.loader=null);var p=df(u.decryptdata)||c;delete this.keyIdToKeyInfo[p],v&&v.destroy()},h}(Ze);function df(f){if(f.keyFormat!==Ci.FAIRPLAY){var h=f.keyId;if(h)return Nt(h)}return f.uri}function hl(f){switch(f.type){case Qe.AUDIO_TRACK:return Ie.AUDIO;case Qe.SUBTITLE_TRACK:return Ie.SUBTITLE;default:return Ie.MAIN}}function ni(f,h){var l=f.url;return(void 0===l||0===l.indexOf("data:"))&&(l=h.url),l}var ip=function(){function f(l){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=l,this.registerListeners()}var h=f.prototype;return h.startLoad=function(i){},h.stopLoad=function(){this.destroyInternalLoaders()},h.registerListeners=function(){var i=this.hls;i.on(O.MANIFEST_LOADING,this.onManifestLoading,this),i.on(O.LEVEL_LOADING,this.onLevelLoading,this),i.on(O.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.on(O.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),i.on(O.LEVELS_UPDATED,this.onLevelsUpdated,this)},h.unregisterListeners=function(){var i=this.hls;i.off(O.MANIFEST_LOADING,this.onManifestLoading,this),i.off(O.LEVEL_LOADING,this.onLevelLoading,this),i.off(O.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.off(O.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),i.off(O.LEVELS_UPDATED,this.onLevelsUpdated,this)},h.createInternalLoader=function(i){var e=this.hls.config,v=new(e.pLoader||e.loader)(e);return this.loaders[i.type]=v,v},h.getInternalLoader=function(i){return this.loaders[i.type]},h.resetInternalLoader=function(i){this.loaders[i]&&delete this.loaders[i]},h.destroyInternalLoaders=function(){for(var i in this.loaders){var e=this.loaders[i];e&&e.destroy(),this.resetInternalLoader(i)}},h.destroy=function(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()},h.onManifestLoading=function(i,e){var r=e.url;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:Qe.MANIFEST,url:r,deliveryDirectives:null,levelOrTrack:null})},h.onLevelLoading=function(i,e){this.load({id:e.id,level:e.level,pathwayId:e.pathwayId,responseType:"text",type:Qe.LEVEL,url:e.url,deliveryDirectives:e.deliveryDirectives,levelOrTrack:e.levelInfo})},h.onAudioTrackLoading=function(i,e){this.load({id:e.id,groupId:e.groupId,level:null,responseType:"text",type:Qe.AUDIO_TRACK,url:e.url,deliveryDirectives:e.deliveryDirectives,levelOrTrack:e.track})},h.onSubtitleTrackLoading=function(i,e){this.load({id:e.id,groupId:e.groupId,level:null,responseType:"text",type:Qe.SUBTITLE_TRACK,url:e.url,deliveryDirectives:e.deliveryDirectives,levelOrTrack:e.track})},h.onLevelsUpdated=function(i,e){var r=this.loaders[Qe.LEVEL];if(r){var u=r.context;u&&!e.levels.some(function(c){return c===u.levelOrTrack})&&(r.abort(),delete this.loaders[Qe.LEVEL])}},h.load=function(i){var e,y,T,r=this,u=this.hls.config,c=this.getInternalLoader(i);if(c){var v=this.hls.logger,p=c.context;if(p&&p.levelOrTrack===i.levelOrTrack&&(p.url===i.url||p.deliveryDirectives&&!i.deliveryDirectives))return void v.log(p.url===i.url?"[playlist-loader]: ignore "+i.url+" ongoing request":"[playlist-loader]: ignore "+i.url+" in favor of "+p.url);v.log("[playlist-loader]: aborting previous loader for type: "+i.type),c.abort()}if(y=i.type===Qe.MANIFEST?u.manifestLoadPolicy.default:be({},u.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),c=this.createInternalLoader(i),X(null==(e=i.deliveryDirectives)?void 0:e.part)&&(i.type===Qe.LEVEL&&null!==i.level?T=this.hls.levels[i.level].details:i.type===Qe.AUDIO_TRACK&&null!==i.id?T=this.hls.audioTracks[i.id].details:i.type===Qe.SUBTITLE_TRACK&&null!==i.id&&(T=this.hls.subtitleTracks[i.id].details),T)){var E=T.partTarget,x=T.targetduration;if(E&&x){var C=1e3*Math.max(3*E,.8*x);y=be({},y,{maxTimeToFirstByteMs:Math.min(C,y.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(C,y.maxTimeToFirstByteMs)})}}var k=y.errorRetry||y.timeoutRetry||{};c.load(i,{loadPolicy:y,timeout:y.maxLoadTimeMs,maxRetry:k.maxNumRetry||0,retryDelay:k.retryDelayMs||0,maxRetryDelay:k.maxRetryDelayMs||0},{onSuccess:function(Y,j,$,le){var pe=r.getInternalLoader($);r.resetInternalLoader($.type);var Se=Y.data;j.parsing.start=performance.now(),ms.isMediaPlaylist(Se)||$.type!==Qe.MANIFEST?r.handleTrackOrLevelPlaylist(Y,j,$,le||null,pe):r.handleMasterPlaylist(Y,j,$,le)},onError:function(Y,j,$,le){r.handleNetworkError(j,$,!1,Y,le)},onTimeout:function(Y,j,$){r.handleNetworkError(j,$,!0,void 0,Y)}})},h.checkAutostartLoad=function(){if(this.hls){var i=this.hls,e=i.config,r=e.autoStartLoad,u=e.startPosition;
vendor: 4,680 bytes, line 11
11(r||i.forceStartLoad)&&(this.hls.logger.log((r?"auto":"force")+" startLoad with configured startPosition "+u),this.hls.startLoad(u))}},h.handleMasterPlaylist=function(i,e,r,u){var c=this,v=this.hls,p=i.data,y=ni(i,r),T=ms.parseMasterPlaylist(p,y);if(T.playlistParsingError)return e.parsing.end=performance.now(),void this.handleManifestParsingError(i,r,T.playlistParsingError,u,e);var E=T.contentSteering,x=T.levels,C=T.sessionData,k=T.sessionKeys,w=T.startTimeOffset,M=T.variableList;this.variableList=M,x.forEach(function(Se){var we=Se.unknownCodecs;if(we)for(var Te=c.hls.config.preferManagedMediaSource,oe=Se.audioCodec,fe=Se.videoCodec,Ce=we.length;Ce--;){var ze=we[Ce];$r(ze,"audio",Te)?(Se.audioCodec=oe=oe?oe+","+ze:ze,Bt.audio[oe.substring(0,4)]=2,we.splice(Ce,1)):$r(ze,"video",Te)&&(Se.videoCodec=fe=fe?fe+","+ze:ze,Bt.video[fe.substring(0,4)]=2,we.splice(Ce,1))}});var H=ms.parseMasterPlaylistMedia(p,y,T),Y=H.AUDIO,j=void 0===Y?[]:Y,$=H.SUBTITLES,le=H["CLOSED-CAPTIONS"];j.length&&!j.some(function(Se){return!Se.url})&&x[0].audioCodec&&!x[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),j.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Zr({}),bitrate:0,url:""})),v.trigger(O.MANIFEST_LOADED,{levels:x,audioTracks:j,subtitles:$,captions:le,contentSteering:E,url:y,stats:e,networkDetails:u,sessionData:C,sessionKeys:k,startTimeOffset:w,variableList:M})},h.handleTrackOrLevelPlaylist=function(i,e,r,u,c){var v=this.hls,p=r.id,y=r.level,T=r.type,E=ni(i,r),x=X(y)?y:X(p)?p:0,C=hl(r),k=ms.parseLevelPlaylist(i.data,E,x,C,0,this.variableList);if(T===Qe.MANIFEST){var w={attrs:new Zr({}),bitrate:0,details:k,name:"",url:E};k.requestScheduled=e.loading.start+ya(k,0),v.trigger(O.MANIFEST_LOADED,{levels:[w],audioTracks:[],url:E,stats:e,networkDetails:u,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}e.parsing.end=performance.now(),r.levelDetails=k,this.handlePlaylistLoaded(k,i,e,r,u,c)},h.handleManifestParsingError=function(i,e,r,u,c){this.hls.trigger(O.ERROR,{type:Ae.NETWORK_ERROR,details:ue.MANIFEST_PARSING_ERROR,fatal:e.type===Qe.MANIFEST,url:i.url,err:r,error:r,reason:r.message,response:i,context:e,networkDetails:u,stats:c})},h.handleNetworkError=function(i,e,r,u,c){void 0===r&&(r=!1);var v="A network "+(r?"timeout":"error"+(u?" (status "+u.code+")":""))+" occurred while loading "+i.type;i.type===Qe.LEVEL?v+=": "+i.level+" id: "+i.id:(i.type===Qe.AUDIO_TRACK||i.type===Qe.SUBTITLE_TRACK)&&(v+=" id: "+i.id+' group-id: "'+i.groupId+'"');var p=new Error(v);this.hls.logger.warn("[playlist-loader]: "+v);var y=ue.UNKNOWN,T=!1,E=this.getInternalLoader(i);switch(i.type){case Qe.MANIFEST:y=r?ue.MANIFEST_LOAD_TIMEOUT:ue.MANIFEST_LOAD_ERROR,T=!0;break;case Qe.LEVEL:y=r?ue.LEVEL_LOAD_TIMEOUT:ue.LEVEL_LOAD_ERROR,T=!1;break;case Qe.AUDIO_TRACK:y=r?ue.AUDIO_TRACK_LOAD_TIMEOUT:ue.AUDIO_TRACK_LOAD_ERROR,T=!1;break;case Qe.SUBTITLE_TRACK:y=r?ue.SUBTITLE_TRACK_LOAD_TIMEOUT:ue.SUBTITLE_LOAD_ERROR,T=!1}E&&this.resetInternalLoader(i.type);var x={type:Ae.NETWORK_ERROR,details:y,fatal:T,url:i.url,loader:E,context:i,error:p,networkDetails:e,stats:c};u&&(x.response=Oe({url:(null==e?void 0:e.url)||i.url,data:void 0},u)),this.hls.trigger(O.ERROR,x)},h.handlePlaylistLoaded=function(i,e,r,u,c,v){var p=this.hls,y=u.type,T=u.level,E=u.levelOrTrack,x=u.id,C=u.groupId,k=u.deliveryDirectives,w=ni(e,u),M=hl(u),H="number"==typeof u.level&&M===Ie.MAIN?T:void 0,Y=i.playlistParsingError;if(Y){if(this.hls.logger.warn(Y+" "+i.url),!p.config.ignorePlaylistParsingErrors)return void p.trigger(O.ERROR,{type:Ae.NETWORK_ERROR,details:ue.LEVEL_PARSING_ERROR,fatal:!1,url:w,error:Y,reason:Y.message,response:e,context:u,level:H,parent:M,networkDetails:c,stats:r});i.playlistParsingError=null}if(i.fragments.length)switch(i.live&&v&&(v.getCacheAge&&(i.ageHeader=v.getCacheAge()||0),(!v.getCacheAge||isNaN(i.ageHeader))&&(i.ageHeader=0)),y){case Qe.MANIFEST:case Qe.LEVEL:if(H)if(E){if(E!==p.levels[H]){var $=p.levels.indexOf(E);$>-1&&(H=$)}}else H=0;p.trigger(O.LEVEL_LOADED,{details:i,levelInfo:E||p.levels[0],level:H||0,id:x||0,stats:r,networkDetails:c,deliveryDirectives:k,withoutMultiVariant:y===Qe.MANIFEST});break;case Qe.AUDIO_TRACK:p.trigger(O.AUDIO_TRACK_LOADED,{details:i,track:E,id:x||0,groupId:C||"",stats:r,networkDetails:c,deliveryDirectives:k});break;case Qe.SUBTITLE_TRACK:p.trigger(O.SUBTITLE_TRACK_LOADED,{details:i,track:E,id:x||0,groupId:C||"",stats:r,networkDetails:c,deliveryDirectives:k})}else{var j=i.playlistParsingError=new Error("No Segments found in Playlist");
vendor: 4,163 bytes, line 11
11p.trigger(O.ERROR,{type:Ae.NETWORK_ERROR,details:ue.LEVEL_EMPTY_ERROR,fatal:!1,url:w,error:j,reason:j.message,response:e,context:u,level:H,parent:M,networkDetails:c,stats:r})}},f}(),ff=function(){function f(l){void 0===l&&(l={}),this.config=void 0,this.userConfig=void 0,this.logger=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new ht,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioStreamController=void 0,this.subtititleStreamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.interstitialsController=void 0,this.gapController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this._url=null,this._sessionId=void 0,this.triggeringException=void 0,this.started=!1;var i=this.logger=pr(l.debug||!1,"Hls instance",l.assetPlayerId),e=this.config=function ul(f,h,l){if((h.liveSyncDurationCount||h.liveMaxLatencyDurationCount)&&(h.liveSyncDuration||h.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==h.liveMaxLatencyDurationCount&&(void 0===h.liveSyncDurationCount||h.liveMaxLatencyDurationCount<=h.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==h.liveMaxLatencyDuration&&(void 0===h.liveSyncDuration||h.liveMaxLatencyDuration<=h.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');var i=ll(f),r=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach(function(u){var c=("level"===u?"playlist":u)+"LoadPolicy",v=void 0===h[c],p=[];r.forEach(function(y){var T=u+"Loading"+y,E=h[T];if(void 0!==E&&v){p.push(T);var x=i[c].default;switch(h[c]={default:x},y){case"TimeOut":x.maxLoadTimeMs=E,x.maxTimeToFirstByteMs=E;break;case"MaxRetry":x.errorRetry.maxNumRetry=E,x.timeoutRetry.maxNumRetry=E;break;case"RetryDelay":x.errorRetry.retryDelayMs=E,x.timeoutRetry.retryDelayMs=E;break;case"MaxRetryTimeout":x.errorRetry.maxRetryDelayMs=E,x.timeoutRetry.maxRetryDelayMs=E}}}),p.length&&l.warn('hls.js config: "'+p.join('", "')+'" setting(s) are deprecated, use "'+c+'": '+cr(h[c]))}),Oe(Oe({},i),h)}(f.DefaultConfig,l,i);this.userConfig=l,e.progressive&&dh(e,i);var r=e.abrController,u=e.bufferController,c=e.capLevelController,p=e.fpsController,y=new(0,e.errorController)(this),T=this.abrController=new r(this),E=new _r(this),x=e.interstitialsController,C=x?this.interstitialsController=new x(this,f):null,k=this.bufferController=new u(this,E),w=this.capLevelController=new c(this),M=new p(this),H=new ip(this),Y=e.contentSteeringController,j=Y?new Y(this):null,$=this.levelController=new Zv(this,j),le=new of(this),pe=new ph(this.config,this.logger),Se=this.streamController=new rp(this,E,pe),we=this.gapController=new $v(this,E);w.setStreamController(Se),M.setStreamController(Se);var Te=[H,$,Se];C&&Te.splice(1,0,C),j&&Te.splice(1,0,j),this.networkControllers=Te;var oe=[T,k,we,w,M,le,E];this.audioTrackController=this.createController(e.audioTrackController,Te);var fe=e.audioStreamController;fe&&Te.push(this.audioStreamController=new fe(this,E,pe)),this.subtitleTrackController=this.createController(e.subtitleTrackController,Te);var Ce=e.subtitleStreamController;Ce&&Te.push(this.subtititleStreamController=new Ce(this,E,pe)),this.createController(e.timelineController,oe),pe.emeController=this.emeController=this.createController(e.emeController,oe),this.cmcdController=this.createController(e.cmcdController,oe),this.latencyController=this.createController(Qv,oe),this.coreComponents=oe,Te.push(y);var ze=y.onErrorOut;"function"==typeof ze&&this.on(O.ERROR,ze,y),this.on(O.MANIFEST_LOADED,H.onManifestLoaded,H)}f.isMSESupported=function(){return vh()},f.isSupported=function(){return function Jv(){if(!vh())return!1;var f=Ir();
vendor: 5,067 bytes, line 11
11return"function"==typeof(null==f?void 0:f.isTypeSupported)&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(function(h){return f.isTypeSupported(Jt(h,"video"))})||["mp4a.40.2","fLaC"].some(function(h){return f.isTypeSupported(Jt(h,"audio"))}))}()},f.getMediaSource=function(){return Ir()};var h=f.prototype;return h.createController=function(i,e){if(i){var r=new i(this);return e&&e.push(r),r}return null},h.on=function(i,e,r){void 0===r&&(r=this),this._emitter.on(i,e,r)},h.once=function(i,e,r){void 0===r&&(r=this),this._emitter.once(i,e,r)},h.removeAllListeners=function(i){this._emitter.removeAllListeners(i)},h.off=function(i,e,r,u){void 0===r&&(r=this),this._emitter.off(i,e,r,u)},h.listeners=function(i){return this._emitter.listeners(i)},h.emit=function(i,e,r){return this._emitter.emit(i,e,r)},h.trigger=function(i,e){if(this.config.debug)return this.emit(i,i,e);try{return this.emit(i,i,e)}catch(u){this.logger.error("An internal error happened while handling event "+i+'. Error message: "'+u.message+'". Here is a stacktrace:',u),this.triggeringException||(this.triggeringException=!0,this.trigger(O.ERROR,{type:Ae.OTHER_ERROR,details:ue.INTERNAL_EXCEPTION,fatal:i===O.ERROR,event:i,error:u}),this.triggeringException=!1)}return!1},h.listenerCount=function(i){return this._emitter.listenerCount(i)},h.destroy=function(){this.logger.log("destroy"),this.trigger(O.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(function(e){return e.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(e){return e.destroy()}),this.coreComponents.length=0;var i=this.config;i.xhrSetup=i.fetchSetup=void 0,this.userConfig=null},h.attachMedia=function(i){if(!i||"media"in i&&!i.media){var e=new Error("attachMedia failed: invalid argument ("+i+")");this.trigger(O.ERROR,{type:Ae.OTHER_ERROR,details:ue.ATTACH_MEDIA_ERROR,fatal:!0,error:e})}else{this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());var r="media"in i,u=r?i.media:i,c=r?i:{media:u};this._media=u,this.trigger(O.MEDIA_ATTACHING,c)}},h.detachMedia=function(){this.logger.log("detachMedia"),this.trigger(O.MEDIA_DETACHING,{}),this._media=null},h.transferMedia=function(){this._media=null;var i=this.bufferController.transferMedia();return this.trigger(O.MEDIA_DETACHING,{transferMedia:i}),i},h.loadSource=function(i){this.stopLoad();var e=this.media,r=this._url,u=this._url=ie.buildAbsoluteURL(self.location.href,i,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log("loadSource:"+u),e&&r&&(r!==u||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(e)),this.trigger(O.MANIFEST_LOADING,{url:i})},h.startLoad=function(i,e){void 0===i&&(i=-1),this.logger.log("startLoad("+i+(e?", <skip seek to start>":"")+")"),this.started=!0,this.resumeBuffering();for(var r=0;r<this.networkControllers.length&&(this.networkControllers[r].startLoad(i,e),this.started&&this.networkControllers);r++);},h.stopLoad=function(){this.logger.log("stopLoad"),this.started=!1;for(var i=0;i<this.networkControllers.length&&(this.networkControllers[i].stopLoad(),!this.started&&this.networkControllers);i++);},h.resumeBuffering=function(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(function(i){i.resumeBuffering&&i.resumeBuffering()}))},h.pauseBuffering=function(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(function(i){i.pauseBuffering&&i.pauseBuffering()}))},h.swapAudioCodec=function(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},h.recoverMediaError=function(){this.logger.log("recoverMediaError");var i=this._media,e=null==i?void 0:i.currentTime;this.detachMedia(),i&&(this.attachMedia(i),e&&this.startLoad(e))},h.removeLevel=function(i){this.levelController.removeLevel(i)},h.setAudioOption=function(i){var e;return(null==(e=this.audioTrackController)?void 0:e.setAudioOption(i))||null},h.setSubtitleOption=function(i){var e;return(null==(e=this.subtitleTrackController)?void 0:e.setSubtitleOption(i))||null},h.getMediaDecodingInfo=function(i,e){return void 0===e&&(e=this.allAudioTracks),fu(i,ro(e),navigator.mediaCapabilities)},ce(f,[{key:"url",get:function(){return this._url}},{key:"hasEnoughToStart",get:function(){return this.streamController.hasEnoughToStart}},{key:"startPosition",get:function(){return this.streamController.startPositionValue}},{key:"loadingEnabled",get:function(){return this.started}},{key:"bufferingEnabled",get:function(){return this.streamController.bufferingEnabled}},{key:"inFlightFragments",get:function(){var i,e=((i={})[Ie.MAIN]=this.streamController.inFlightFrag,i);return this.audioStreamController&&(e[Ie.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[Ie.SUBTITLE]=this.subtititleStreamController.inFlightFrag),e}},{key:"sessionId",get:function(){var i=this._sessionId;
vendor: 4,932 bytes, line 11
11return i||(i=this._sessionId=function sr(){try{return crypto.randomUUID()}catch(e){try{var f=URL.createObjectURL(new Blob),h=f.toString();return URL.revokeObjectURL(f),h.slice(h.lastIndexOf("/")+1)}catch(r){var l=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(u){var c=(l+16*Math.random())%16|0;return l=Math.floor(l/16),("x"==u?c:3&c|8).toString(16)})}}}()),i}},{key:"levels",get:function(){return this.levelController.levels||[]}},{key:"latestLevelDetails",get:function(){return this.streamController.getLevelDetails()||null}},{key:"loadLevelObj",get:function(){return this.levelController.loadLevelObj}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(i){this.logger.log("set currentLevel:"+i),this.levelController.manualLevel=i,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(i){this.logger.log("set nextLevel:"+i),this.levelController.manualLevel=i,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(i){this.logger.log("set loadLevel:"+i),this.levelController.manualLevel=i}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(i){this.levelController.nextLoadLevel=i}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(i){this.logger.log("set firstLevel:"+i),this.levelController.firstLevel=i}},{key:"startLevel",get:function(){var i=this.levelController.startLevel;return-1===i&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:i},set:function(i){this.logger.log("set startLevel:"+i),-1!==i&&(i=Math.max(i,this.minAutoLevel)),this.levelController.startLevel=i}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(i){var e=!!i;e!==this.config.capLevelToPlayerSize&&(e?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=e)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(i){this._autoLevelCapping!==i&&(this.logger.log("set autoLevelCapping:"+i),this._autoLevelCapping=i,this.levelController.checkMaxAutoUpdated())}},{key:"bandwidthEstimate",get:function(){var i=this.abrController.bwEstimator;return i?i.getEstimate():NaN},set:function(i){this.abrController.resetEstimator(i)}},{key:"abrEwmaDefaultEstimate",get:function(){var i=this.abrController.bwEstimator;return i?i.defaultEstimate:NaN}},{key:"ttfbEstimate",get:function(){var i=this.abrController.bwEstimator;return i?i.getEstimateTTFB():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(i){(function wl(f){return os.indexOf(f)>-1})(i)&&this._maxHdcpLevel!==i&&(this._maxHdcpLevel=i,this.levelController.checkMaxAutoUpdated())}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var i=this.levels,e=this.config.minAutoBitrate;if(!i)return 0;for(var r=i.length,u=0;u<r;u++)if(i[u].maxBitrate>=e)return u;return 0}},{key:"maxAutoLevel",get:function(){var u,i=this.levels,e=this.autoLevelCapping,r=this.maxHdcpLevel;if(u=-1===e&&null!=i&&i.length?i.length-1:e,r)for(var c=u;c--;){var v=i[c].attrs["HDCP-LEVEL"];if(v&&v<=r)return c}return u}},{key:"firstAutoLevel",get:function(){return this.abrController.firstAutoLevel}},{key:"nextAutoLevel",get:function(){return this.abrController.nextAutoLevel},set:function(i){this.abrController.nextAutoLevel=i}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"maxBufferLength",get:function(){return this.streamController.maxBufferLength}},{key:"allAudioTracks",get:function(){var i=this.audioTrackController;return i?i.allAudioTracks:[]}},{key:"audioTracks",get:function(){var i=this.audioTrackController;return i?i.audioTracks:[]}},{key:"audioTrack",get:function(){var i=this.audioTrackController;return i?i.audioTrack:-1},set:function(i){var e=this.audioTrackController;e&&(e.audioTrack=i)}},{key:"allSubtitleTracks",get:function(){var i=this.subtitleTrackController;return i?i.allSubtitleTracks:[]}},{key:"subtitleTracks",get:function(){var i=this.subtitleTrackController;return i?i.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var i=this.subtitleTrackController;return i?i.subtitleTrack:-1},set:function(i){var e=this.subtitleTrackController;e&&(e.subtitleTrack=i)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var i=this.subtitleTrackController;return!!i&&i.subtitleDisplay}
11,set:function(i){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=i)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(i){this.config.lowLatencyMode=i}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency},set:function(i){this.latencyController.targetLatency=i}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}},{key:"pathways",get:function(){return this.levelController.pathways}},{key:"pathwayPriority",get:function(){return this.levelController.pathwayPriority},set:function(i){this.levelController.pathwayPriority=i}},{key:"bufferedToEnd",get:function(){var i;return!(null==(i=this.bufferController)||!i.bufferedToEnd)}},{key:"interstitialsManager",get:function(){var i;return(null==(i=this.interstitialsController)?void 0:i.interstitialsManager)||null}}],[{key:"version",get:function(){return Lo}},{key:"Events",get:function(){return O}},{key:"MetadataSchema",get:function(){return Jr}},{key:"ErrorTypes",get:function(){return Ae}},{key:"ErrorDetails",get:function(){return ue}},{key:"DefaultConfig",get:function(){return f.defaultConfig?f.defaultConfig:Wv},set:function(i){f.defaultConfig=i}}])}();return ff.defaultConfig=void 0,ff}()}(!1)},2703:Ot=>{Ot.exports=function Le(Re){if(!Re)return!1;var A=ft.call(Re);return"[object Function]"===A||"function"==typeof Re&&"[object RegExp]"!==A||typeof window<"u"&&(Re===window.setTimeout||Re===window.alert||Re===window.confirm||Re===window.prompt)};var ft=Object.prototype.toString},1234:(Ot,ft)=>{function Le($e){if($e&&"object"==typeof $e){var xe=$e.which||$e.keyCode||$e.charCode;xe&&($e=xe)}if("number"==typeof $e)return me[$e];var Xe,Pe=String($e);return(Xe=Re[Pe.toLowerCase()])?Xe:(Xe=A[Pe.toLowerCase()])||(1===Pe.length?Pe.charCodeAt(0):void 0)}Le.isEventKey=function(xe,Pe){if(xe&&"object"==typeof xe){var Xe=xe.which||xe.keyCode||xe.charCode;if(null==Xe)return!1;if("string"==typeof Pe){var ae;if(ae=Re[Pe.toLowerCase()])return ae===Xe;if(ae=A[Pe.toLowerCase()])return ae===Xe}else if("number"==typeof Pe)return Pe===Xe;return!1}};var Re=(ft=Ot.exports=Le).code=ft.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},A=ft.aliases={windows:91,"\u21e7":16,"\u2325":18,"\u2303":17,"\u2318":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};
12/*!
13       * Programatically add the following
14       */for(ce=97;ce<123;ce++)Re[String.fromCharCode(ce)]=ce-32;for(var ce=48;ce<58;ce++)Re[ce-48]=ce;for(ce=1;ce<13;ce++)Re["f"+ce]=ce+111;for(ce=0;ce<10;ce++)Re["numpad "+ce]=ce+96;var me=ft.names=ft.title={};for(ce in Re)me[Re[ce]]=ce;for(var be in A)Re[be]=A[be]},3905:(Ot,ft,Le)=>{"use strict";Le.d(ft,{z:()=>ce});var Re=Le(6805),A=Le(930);function ce(me,be){const $e="object"==typeof be;return new Promise((xe,Pe)=>{const Xe=new A.Hp({next:ae=>{xe(ae),Xe.unsubscribe()},error:Pe,complete:()=>{$e?xe(be.defaultValue):Pe(new Re.K)}});me.subscribe(Xe)})}},8099:Ot=>{Ot.exports=function ft(Le,Re){var A,ce=null;try{A=JSON.parse(Le,Re)}catch(me){ce=me}return[ce,A]}},3871:function(Ot){var Le,Re,A,ce,me;Le=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,Re=/^(?=([^\/?#]*))\1([^]*)$/,A=/(?:\/|^)\.(?=\/)/g,ce=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,Ot.exports=me={buildAbsoluteURL:function(be,$e,xe){if(xe=xe||{},be=be.trim(),!($e=$e.trim())){if(!xe.alwaysNormalize)return be;var Pe=me.parseURL(be);
14if(!Pe)throw new Error("Error trying to parse base URL.");return Pe.path=me.normalizePath(Pe.path),me.buildURLFromParts(Pe)}var Xe=me.parseURL($e);if(!Xe)throw new Error("Error trying to parse relative URL.");if(Xe.scheme)return xe.alwaysNormalize?(Xe.path=me.normalizePath(Xe.path),me.buildURLFromParts(Xe)):$e;var ae=me.parseURL(be);if(!ae)throw new Error("Error trying to parse base URL.");if(!ae.netLoc&&ae.path&&"/"!==ae.path[0]){var Oe=Re.exec(ae.path);ae.netLoc=Oe[1],ae.path=Oe[2]}ae.netLoc&&!ae.path&&(ae.path="/");var de={scheme:ae.scheme,netLoc:Xe.netLoc,path:null,params:Xe.params,query:Xe.query,fragment:Xe.fragment};if(!Xe.netLoc&&(de.netLoc=ae.netLoc,"/"!==Xe.path[0]))if(Xe.path){var at=ae.path,ct=at.substring(0,at.lastIndexOf("/")+1)+Xe.path;de.path=me.normalizePath(ct)}else de.path=ae.path,Xe.params||(de.params=ae.params,Xe.query||(de.query=ae.query));return null===de.path&&(de.path=xe.alwaysNormalize?me.normalizePath(Xe.path):Xe.path),me.buildURLFromParts(de)},parseURL:function(be){var $e=Le.exec(be);return $e?{scheme:$e[1]||"",netLoc:$e[2]||"",path:$e[3]||"",params:$e[4]||"",query:$e[5]||"",fragment:$e[6]||""}:null},normalizePath:function(be){for(be=be.split("").reverse().join("").replace(A,"");be.length!==(be=be.replace(ce,"")).length;);return be.split("").reverse().join("")},buildURLFromParts:function(be){return be.scheme+be.netLoc+be.path+be.params+be.query+be.fragment}}},3689:(Ot,ft,Le)=>{"use strict";Le.r(ft),Le.d(ft,{default:()=>tm});var Re=Le(9226),A=Le.n(Re),ce=Le(1421),me=Le.n(ce);function be(){return be=Object.assign?Object.assign.bind():function(g){for(var a=1;a<arguments.length;a++){var o=arguments[a];for(var s in o)({}).hasOwnProperty.call(o,s)&&(g[s]=o[s])}return g},be.apply(null,arguments)}var $e=Le(1234),xe=Le.n($e);function Pe(g){if(void 0===g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}function Xe(g,a){return(Xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,s){return o.__proto__=s,o})(g,a)}function ae(g,a){g.prototype=Object.create(a.prototype),g.prototype.constructor=g,Xe(g,a)}var Oe=Le(8099),de=Le.n(Oe),at=Le(745),ct=Le.n(at),pt=Le(3629),sr=Le.n(pt);function rr(){try{var g=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(a){}return(rr=function(){return!!g})()}function Je(g,a,o){if(rr())return Reflect.construct.apply(null,arguments);var s=[null];s.push.apply(s,a);var t=new(g.bind.apply(g,s));return o&&Xe(t,o.prototype),t}var Dt=Le(3871),Mt=Le.n(Dt),ht="http://example.com";const qt=function(a,o){if(/^[a-z]+:/i.test(o))return o;/^data:/.test(a)&&(a=A().location&&A().location.href||"");var s="function"==typeof A().URL,t=/^\/\//.test(a),n=!A().location&&!/\/\//i.test(a);if(s?a=new(A().URL)(a,A().location||ht):/\/\//i.test(a)||(a=Mt().buildAbsoluteURL(A().location&&A().location.href||"",a)),s){var d=new URL(o,a);return n?d.href.slice(ht.length):t?d.href.slice(d.protocol.length):d.href}return Mt().buildAbsoluteURL(a,o)};var Ft=function(){function g(){this.listeners={}}var a=g.prototype;return a.on=function(s,t){this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push(t)},a.off=function(s,t){if(!this.listeners[s])return!1;var n=this.listeners[s].indexOf(t);return this.listeners[s]=this.listeners[s].slice(0),this.listeners[s].splice(n,1),n>-1},a.trigger=function(s){var t=this.listeners[s];if(t)if(2===arguments.length)for(var n=t.length,d=0;d<n;++d)t[d].call(this,arguments[1]);else for(var m=Array.prototype.slice.call(arguments,1),_=t.length,S=0;S<_;++S)t[S].apply(this,m)},a.dispose=function(){this.listeners={}},a.pipe=function(s){this.on("data",function(t){s.push(t)})},g}(),ie=function(a){return A().atob?A().atob(a):Buffer.from(a,"base64").toString("binary")};function X(g){for(var a=ie(g),o=new Uint8Array(a.length),s=0;s<a.length;s++)o[s]=a.charCodeAt(s);return o}
15/*! @name m3u8-parser @version 4.8.0 @license Apache-2.0 */var g,xt,ke=function(g){function a(){var s;return(s=g.call(this)||this).buffer="",s}return ae(a,g),a.prototype.push=function(t){var n;for(this.buffer+=t,n=this.buffer.indexOf("\n");n>-1;n=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,n)),this.buffer=this.buffer.substring(n+1)},a}(Ft),it=String.fromCharCode(9),Ae=function(a){var o=/([0-9.]*)?@?([0-9.]*)?/.exec(a||""),s={};return o[1]&&(s.length=parseInt(o[1],10)),o[2]&&(s.offset=parseInt(o[2],10)),s},O=function(a){for(var n,o=a.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),s={},t=o.length;t--;)""!==o[t]&&((n=/([^=]*)=(.*)/.exec(o[t]).slice(1))[0]=n[0].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^['"](.*)['"]$/g,"$1"),s[n[0]]=n[1]);return s},Qe=function(g){function a(){var s;return(s=g.call(this)||this).customParsers=[],s.tagMappers=[],s}ae(a,g);var o=a.prototype;return o.push=function(t){var d,m,n=this;if(0!==(t=t.trim()).length){if("#"!==t[0])return void this.trigger("data",{type:"uri",uri:t});this.tagMappers.reduce(function(S,L){var B=L(t);return B===t?S:S.concat([B])}
15,[t]).forEach(function(S){for(var L=0;L<n.customParsers.length;L++)if(n.customParsers[L].call(n,S))return;if(0===S.indexOf("#EXT"))if(S=S.replace("\r",""),d=/^#EXTM3U/.exec(S))n.trigger("data",{type:"tag",tagType:"m3u"});else{if(d=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(S))return m={type:"tag",tagType:"inf"},d[1]&&(m.duration=parseFloat(d[1])),d[2]&&(m.title=d[2]),void n.trigger("data",m);if(d=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(S))return m={type:"tag",tagType:"targetduration"},d[1]&&(m.duration=parseInt(d[1],10)),void n.trigger("data",m);if(d=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(S))return m={type:"tag",tagType:"version"},d[1]&&(m.version=parseInt(d[1],10)),void n.trigger("data",m);if(d=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(S))return m={type:"tag",tagType:"media-sequence"},d[1]&&(m.number=parseInt(d[1],10)),void n.trigger("data",m);if(d=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(S))return m={type:"tag",tagType:"discontinuity-sequence"},d[1]&&(m.number=parseInt(d[1],10)),void n.trigger("data",m);if(d=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(S))return m={type:"tag",tagType:"playlist-type"},d[1]&&(m.playlistType=d[1]),void n.trigger("data",m);if(d=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(S))return m=be(Ae(d[1]),{type:"tag",tagType:"byterange"}),void n.trigger("data",m);if(d=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(S))return m={type:"tag",tagType:"allow-cache"},d[1]&&(m.allowed=!/NO/.test(d[1])),void n.trigger("data",m);if(d=/^#EXT-X-MAP:?(.*)$/.exec(S)){if(m={type:"tag",tagType:"map"},d[1]){var B=O(d[1]);B.URI&&(m.uri=B.URI),B.BYTERANGE&&(m.byterange=Ae(B.BYTERANGE))}n.trigger("data",m)}else if(d=/^#EXT-X-STREAM-INF:?(.*)$/.exec(S)){if(m={type:"tag",tagType:"stream-inf"},d[1]){if(m.attributes=O(d[1]),m.attributes.RESOLUTION){var F=m.attributes.RESOLUTION.split("x"),q={};F[0]&&(q.width=parseInt(F[0],10)),F[1]&&(q.height=parseInt(F[1],10)),m.attributes.RESOLUTION=q}m.attributes.BANDWIDTH&&(m.attributes.BANDWIDTH=parseInt(m.attributes.BANDWIDTH,10)),m.attributes["FRAME-RATE"]&&(m.attributes["FRAME-RATE"]=parseFloat(m.attributes["FRAME-RATE"])),m.attributes["PROGRAM-ID"]&&(m.attributes["PROGRAM-ID"]=parseInt(m.attributes["PROGRAM-ID"],10))}n.trigger("data",m)}else{if(d=/^#EXT-X-MEDIA:?(.*)$/.exec(S))return m={type:"tag",tagType:"media"},d[1]&&(m.attributes=O(d[1])),void n.trigger("data",m);if(d=/^#EXT-X-ENDLIST/.exec(S))n.trigger("data",{type:"tag",tagType:"endlist"});else{if(!(d=/^#EXT-X-DISCONTINUITY/.exec(S)))return(d=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(S))?(m={type:"tag",tagType:"program-date-time"},d[1]&&(m.dateTimeString=d[1],m.dateTimeObject=new Date(d[1])),void n.trigger("data",m)):(d=/^#EXT-X-KEY:?(.*)$/.exec(S))?(m={type:"tag",tagType:"key"},d[1]&&(m.attributes=O(d[1]),m.attributes.IV&&("0x"===m.attributes.IV.substring(0,2).toLowerCase()&&(m.attributes.IV=m.attributes.IV.substring(2)),m.attributes.IV=m.attributes.IV.match(/.{8}/g),m.attributes.IV[0]=parseInt(m.attributes.IV[0],16),m.attributes.IV[1]=parseInt(m.attributes.IV[1],16),m.attributes.IV[2]=parseInt(m.attributes.IV[2],16),m.attributes.IV[3]=parseInt(m.attributes.IV[3],16),m.attributes.IV=new Uint32Array(m.attributes.IV))),void n.trigger("data",m)):(d=/^#EXT-X-START:?(.*)$/.exec(S))?(m={type:"tag",tagType:"start"},d[1]&&(m.attributes=O(d[1]),m.attributes["TIME-OFFSET"]=parseFloat(m.attributes["TIME-OFFSET"]),m.attributes.PRECISE=/YES/.test(m.attributes.PRECISE)),void n.trigger("data",m)):(d=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(S))?((m={type:"tag",tagType:"cue-out-cont"}).data=d[1]?d[1]:"",void n.trigger("data",m)):(d=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(S))?((m={type:"tag",tagType:"cue-out"}).data=d[1]?d[1]:"",void n.trigger("data",m)):(d=/^#EXT-X-CUE-IN:?(.*)?$/.exec(S))?((m={type:"tag",tagType:"cue-in"}).data=d[1]?d[1]:"",void n.trigger("data",m)):(d=/^#EXT-X-SKIP:(.*)$/.exec(S))&&d[1]?((m={type:"tag",tagType:"skip"}).attributes=O(d[1]),m.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(m.attributes["SKIPPED-SEGMENTS"]=parseInt(m.attributes["SKIPPED-SEGMENTS"],10)),m.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(m.attributes["RECENTLY-REMOVED-DATERANGES"]=m.attributes["RECENTLY-REMOVED-DATERANGES"].split(it)),void n.trigger("data",m)):(d=/^#EXT-X-PART
vendor: 9,822 bytes, line 15
15:(.*)$/.exec(S))&&d[1]?((m={type:"tag",tagType:"part"}).attributes=O(d[1]),["DURATION"].forEach(function(Z){m.attributes.hasOwnProperty(Z)&&(m.attributes[Z]=parseFloat(m.attributes[Z]))}),["INDEPENDENT","GAP"].forEach(function(Z){m.attributes.hasOwnProperty(Z)&&(m.attributes[Z]=/YES/.test(m.attributes[Z]))}),m.attributes.hasOwnProperty("BYTERANGE")&&(m.attributes.byterange=Ae(m.attributes.BYTERANGE)),void n.trigger("data",m)):(d=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(S))&&d[1]?((m={type:"tag",tagType:"server-control"}).attributes=O(d[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(Z){m.attributes.hasOwnProperty(Z)&&(m.attributes[Z]=parseFloat(m.attributes[Z]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(Z){m.attributes.hasOwnProperty(Z)&&(m.attributes[Z]=/YES/.test(m.attributes[Z]))}),void n.trigger("data",m)):(d=/^#EXT-X-PART-INF:(.*)$/.exec(S))&&d[1]?((m={type:"tag",tagType:"part-inf"}).attributes=O(d[1]),["PART-TARGET"].forEach(function(Z){m.attributes.hasOwnProperty(Z)&&(m.attributes[Z]=parseFloat(m.attributes[Z]))}),void n.trigger("data",m)):(d=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(S))&&d[1]?((m={type:"tag",tagType:"preload-hint"}).attributes=O(d[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(Z){if(m.attributes.hasOwnProperty(Z)){m.attributes[Z]=parseInt(m.attributes[Z],10);var ne="BYTERANGE-LENGTH"===Z?"length":"offset";m.attributes.byterange=m.attributes.byterange||{},m.attributes.byterange[ne]=m.attributes[Z],delete m.attributes[Z]}}),void n.trigger("data",m)):(d=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(S))&&d[1]?((m={type:"tag",tagType:"rendition-report"}).attributes=O(d[1]),["LAST-MSN","LAST-PART"].forEach(function(Z){m.attributes.hasOwnProperty(Z)&&(m.attributes[Z]=parseInt(m.attributes[Z],10))}),void n.trigger("data",m)):void n.trigger("data",{type:"tag",data:S.slice(4)});n.trigger("data",{type:"tag",tagType:"discontinuity"})}}}else n.trigger("data",{type:"comment",text:S.slice(1)})})}},o.addParser=function(t){var n=this,d=t.expression,m=t.customType,_=t.dataParser,S=t.segment;"function"!=typeof _&&(_=function(B){return B}),this.customParsers.push(function(L){if(d.exec(L))return n.trigger("data",{type:"custom",data:_(L),customType:m,segment:S}),!0})},o.addTagMapper=function(t){var n=t.expression,d=t.map;this.tagMappers.push(function(S){return n.test(S)?d(S):S})},a}(Ft),Fe=function(a){var o={};return Object.keys(a).forEach(function(s){o[function(a){return a.toLowerCase().replace(/-(\w)/g,function(o){return o[1].toUpperCase()})}(s)]=a[s]}),o},nt=function(a){var o=a.serverControl,s=a.targetDuration,t=a.partTargetDuration;if(o){var n="#EXT-X-SERVER-CONTROL",d="holdBack",m="partHoldBack",_=s&&3*s,S=t&&2*t;s&&!o.hasOwnProperty(d)&&(o[d]=_,this.trigger("info",{message:n+" defaulting HOLD-BACK to targetDuration * 3 ("+_+")."})),_&&o[d]<_&&(this.trigger("warn",{message:n+" clamping HOLD-BACK ("+o[d]+") to targetDuration * 3 ("+_+")"}),o[d]=_),t&&!o.hasOwnProperty(m)&&(o[m]=3*t,this.trigger("info",{message:n+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+o[m]+")."})),t&&o[m]<S&&(this.trigger("warn",{message:n+" clamping PART-HOLD-BACK ("+o[m]+") to partTargetDuration * 2 ("+S+")."}),o[m]=S)}},Ze=function(g){function a(){var s;(s=g.call(this)||this).lineStream=new ke,s.parseStream=new Qe,s.lineStream.pipe(s.parseStream);var m,_,t=Pe(s),n=[],d={},S=!1,L=function(){},B={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},q=0;s.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var Z=0,ne=0;return s.on("end",function(){d.uri||!d.parts&&!d.preloadHints||(!d.map&&m&&(d.map=m),!d.key&&_&&(d.key=_),!d.timeline&&"number"==typeof q&&(d.timeline=q),s.manifest.preloadSegment=d)}),s.parseStream.on("data",function(re){var De,Ye;({tag:function(){({version:function(){re.version&&(this.manifest.version=re.version)},"allow-cache":function(){this.manifest.allowCache=re.allowed,"allowed"in re||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var Be={};"length"in re&&(d.byterange=Be,Be.length=re.length,"offset"in re||(re.offset=Z)),"offset"in re&&(d.byterange=Be,Be.offset=re.offset),Z=Be.offset+Be.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),re.duration>0&&(d.duration=re.duration),0===re.duration&&(d.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n},key:function(){if(re.attributes)if("NONE"!==re.attributes.METHOD)if(re.attributes.URI){if("com.apple.streamingkeydelivery"===re.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:re.attributes});if("com.microsoft.playready"===re.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:re.attributes.URI});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===re.attributes.KEYFORMAT)return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(re.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===re.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==re.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):re.attributes.KEYID&&"0x"===re.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:re.attributes.KEYFORMAT,keyId:re.attributes.KEYID.substring(2)},pssh:X(re.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));re.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),_={method:re.attributes.METHOD||"AES-128",uri:re.attributes.URI},typeof re.attributes.IV<"u"&&(_.iv=re.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else _=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(re.number)?this.manifest.mediaSequence=re.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+re.number})},"discontinuity-sequence":function(){isFinite(re.number)?(this.manifest.discontinuitySequence=re.number,q=re.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+re.number})},"playlist-type":function(){/VOD|EVENT/.test(re.playlistType)?this.manifest.playlistType=re.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+re.playlist})},map:function(){m={},re.uri&&(m.uri=re.uri),re.byterange&&(m.byterange=re.byterange),_&&(m.key=_)},"stream-inf":function(){this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||B,re.attributes?(d.attributes||(d.attributes={}),be(d.attributes,re.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||B,re.attributes&&re.attributes.TYPE&&re.attributes["GROUP-ID"]&&re.attributes.NAME){var Be=this.manifest.mediaGroups[re.attributes.TYPE];Be[re.attributes["GROUP-ID"]]=Be[re.attributes["GROUP-ID"]]||{},De=Be[re.attributes["GROUP-ID"]],(Ye={default:/yes/i.test(re.attributes.DEFAULT)}).autoselect=!!Ye.default||/yes/i.test(re.attributes.AUTOSELECT),re.attributes.LANGUAGE&&(Ye.language=re.attributes.LANGUAGE),re.attributes.URI&&(Ye.uri=re.attributes.URI),re.attributes["INSTREAM-ID"]&&(Ye.instreamId=re.attributes["INSTREAM-ID"]),re.attributes.CHARACTERISTICS&&(Ye.characteristics=re.attributes.CHARACTERISTICS),re.attributes.FORCED&&(Ye.forced=/yes/i.test(re.attributes.FORCED)),De[re.attributes.NAME]=Ye}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){q+=1,d.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length)},"program-date-time":function(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=re.dateTimeString,this.manifest.dateTimeObject=re.dateTimeObject),d.dateTimeString=re.dateTimeString,d.dateTimeObject=re.dateTimeObject},targetduration:function(){!isFinite(re.duration)||re.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+re.duration}):(this.manifest.targetDuration=re.duration,nt.call(this,this.manifest))},start:function(){re.attributes&&!isNaN(re.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:re.attributes["TIME-OFFSET"],precise:re.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){d.cueOut=re.data},"cue-out-cont":function(){d.cueOutCont=re.data},"cue-in":function(){d.cueIn=re.data},skip:function(){this.manifest.skip=Fe(re.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",re.attributes,["SKIPPED-SEGMENTS"])},part:function(){var Be=this;S=!0;var st=this.manifest.segments.length,je=Fe(re.attributes);d.parts=d.parts||[],d.parts.push(je),je.byterange&&(je.byterange.hasOwnProperty("offset")||(je.byterange.offset=ne),ne=je.byterange.offset+je.byterange.length),this.warnOnMissingAttributes_("#EXT-X-PART #"+(d.parts.length-1)+" for segment #"+st,re.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEac
15h(function(tt,qe){tt.hasOwnProperty("lastPart")||Be.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+qe+" lacks required attribute(s): LAST-PART"})})},"server-control":function(){var Be=this.manifest.serverControl=Fe(re.attributes);Be.hasOwnProperty("canBlockReload")||(Be.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),nt.call(this,this.manifest),Be.canSkipDateranges&&!Be.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var Be=this.manifest.segments.length,st=Fe(re.attributes),je=st.type&&"PART"===st.type;d.preloadHints=d.preloadHints||[],d.preloadHints.push(st),st.byterange&&(st.byterange.hasOwnProperty("offset")||(st.byterange.offset=je?ne:0,je&&(ne=st.byterange.offset+st.byterange.length)));var Ge=d.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+Ge+" for segment #"+Be,re.attributes,["TYPE","URI"]),st.type)for(var tt=0;tt<d.preloadHints.length-1;tt++){var qe=d.preloadHints[tt];qe.type&&qe.type===st.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+Ge+" for segment #"+Be+" has the same TYPE "+st.type+" as preload hint #"+tt})}},"rendition-report":function(){var Be=Fe(re.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(Be);var st=this.manifest.renditionReports.length-1,je=["LAST-MSN","URI"];S&&je.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+st,re.attributes,je)},"part-inf":function(){this.manifest.partInf=Fe(re.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",re.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),nt.call(this,this.manifest)}}[re.tagType]||L).call(t)},uri:function(){d.uri=re.uri,n.push(d),this.manifest.targetDuration&&!("duration"in d)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),d.duration=this.manifest.targetDuration),_&&(d.key=_),d.timeline=q,m&&(d.map=m),ne=0,d={}},comment:function(){},custom:function(){re.segment?(d.custom=d.custom||{},d.custom[re.customType]=re.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[re.customType]=re.data)}})[re.type].call(t)}),s}ae(a,g);var o=a.prototype;return o.warnOnMissingAttributes_=function(t,n,d){var m=[];d.forEach(function(_){n.hasOwnProperty(_)||m.push(_)}),m.length&&this.trigger("warn",{message:t+" lacks required attribute(s): "+m.join(", ")})},o.push=function(t){this.lineStream.push(t)},o.end=function(){this.lineStream.push("\n"),this.trigger("end")},o.addParser=function(t){this.parseStream.addParser(t)},o.addTagMapper=function(t){this.parseStream.addTagMapper(t)},a}(Ft),Tt={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},$t=["video","audio","text"],ir=["Video","Audio","Text"],Rt=function(a){return a&&a.replace(/avc1\.(\d+)\.(\d+)/i,function(o,s,t){return"avc1."+("00"+Number(s).toString(16)).slice(-2)+"00"+("00"+Number(t).toString(16)).slice(-2)})},pr=function(a){void 0===a&&(a="");var o=a.split(","),s=[];return o.forEach(function(t){var n;t=t.trim(),$t.forEach(function(d){var m=Tt[d].exec(t.toLowerCase());if(m&&!(m.length<=1)){n=d;var _=t.substring(0,m[1].length),S=t.replace(_,"");s.push({type:_,details:S,mediaType:d})}}),n||s.push({type:t,details:"",mediaType:"unknown"})}),s},Mr=function(a){return void 0===a&&(a=""),Tt.audio.test(a.trim().toLowerCase())},Pr=function(a){if(a&&"string"==typeof a){var o=a.toLowerCase().split(",").map(function(n){return Rt(n.trim())}),s="video";1===o.length&&Mr(o[0])?s="audio":1===o.length&&function(a){return void 0===a&&(a=""),Tt.text.test(a.trim().toLowerCase())}(o[0])&&(s="application");var t="mp4";return o.every(function(n){return Tt.mp4.test(n)})?t="mp4":o.every(function(n){return Tt.webm.test(n)})?t="webm":o.every(function(n){return Tt.ogg.test(n)})&&(t="ogg"),s+"/"+t+';codecs="'+a+'"'}},Nt=function(a){return void 0===a&&(a=""),A().MediaSource&&A().MediaSource.isTypeSupp
15orted&&A().MediaSource.isTypeSupported(Pr(a))||!1},Fr=function(a){return void 0===a&&(a=""),a.toLowerCase().split(",").every(function(o){o=o.trim();for(var s=0;s<ir.length;s++)if(Tt["muxer"+ir[s]].test(o))return!0;return!1})},ki="mp4a.40.2",Yn=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,gr=/^application\/dash\+xml/i,Qi=function(a){return Yn.test(a)?"hls":gr.test(a)?"dash":"application/vnd.videojs.vhs+json"===a?"vhs-json":null},Ui=function(a){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(a):a&&a.buffer instanceof ArrayBuffer},yt=function(a){return a instanceof Uint8Array?a:(!Array.isArray(a)&&!function(a){return Ui(a)}(a)&&!(a instanceof ArrayBuffer)&&(a="number"!=typeof a||"number"==typeof a&&a!=a?0:[a]),new Uint8Array(a&&a.buffer||a,a&&a.byteOffset||0,a&&a.byteLength||0))},Yr=A().BigInt||Number,$n=[Yr("0x1"),Yr("0x100"),Yr("0x10000"),Yr("0x1000000"),Yr("0x100000000"),Yr("0x10000000000"),Yr("0x1000000000000"),Yr("0x100000000000000"),Yr("0x10000000000000000")],Qn=(g=new Uint16Array([65484]),new Uint8Array(g.buffer,g.byteOffset,g.byteLength),function(a,o){var s=void 0===o?{}:o,t=s.signed,n=void 0!==t&&t,d=s.le,m=void 0!==d&&d;a=yt(a);var _=m?"reduce":"reduceRight",L=(a[_]?a[_]:Array.prototype[_]).call(a,function(F,q,Z){var ne=m?Z:Math.abs(Z+1-a.length);return F+Yr(q)*$n[ne]},Yr(0));if(n){var B=$n[a.length]/Yr(2)-Yr(1);(L=Yr(L))>B&&(L-=B,L-=B,L-=Yr(2))}return Number(L)}),Zn=function(a,o){if("string"!=typeof a&&a&&"function"==typeof a.toString&&(a=a.toString()),"string"!=typeof a)return new Uint8Array;o||(a=unescape(encodeURIComponent(a)));for(var s=new Uint8Array(a.length),t=0;t<a.length;t++)s[t]=a.charCodeAt(t);return s},lr=function(a,o,s){var t=void 0===s?{}:s,n=t.offset,d=void 0===n?0:n,m=t.mask,_=void 0===m?[]:m;return a=yt(a),(o=yt(o)).length&&a.length-d>=o.length&&(o.every?o.every:Array.prototype.every).call(o,function(L,B){return L===(_[B]?_[B]&a[d+B]:a[d+B])})},Fn=Le(978),ea=function(a){return!!a&&"object"==typeof a},zr=function g(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return o.reduce(function(t,n){return"object"!=typeof n||Object.keys(n).forEach(function(d){t[d]=Array.isArray(t[d])&&Array.isArray(n[d])?t[d].concat(n[d]):ea(t[d])&&ea(n[d])?g(t[d],n[d]):n[d]}),t},{})},ai=function(a){return Object.keys(a).map(function(o){return a[o]})},Ri=function(a){return a.reduce(function(o,s){return o.concat(s)},[])},Ra=function(a){if(!a.length)return[];for(var o=[],s=0;s<a.length;s++)o.push(a[s]);return o},ra=function(a,o){for(var s=0;s<a.length;s++)if(o(a[s]))return s;return-1},Q=function(a){var o=a.baseUrl,t=a.source,n=void 0===t?"":t,d=a.range,m=void 0===d?"":d,_=a.indexRange,S=void 0===_?"":_,L={uri:n,resolvedUri:qt((void 0===o?"":o)||"",n)};if(m||S){var ne,F=(m||S).split("-"),q=A().BigInt?A().BigInt(F[0]):parseInt(F[0],10),Z=A().BigInt?A().BigInt(F[1]):parseInt(F[1],10);q<Number.MAX_SAFE_INTEGER&&"bigint"==typeof q&&(q=Number(q)),Z<Number.MAX_SAFE_INTEGER&&"bigint"==typeof Z&&(Z=Number(Z)),"bigint"==typeof(ne="bigint"==typeof Z||"bigint"==typeof q?A().BigInt(Z)-A().BigInt(q)+A().BigInt(1):Z-q+1)&&ne<Number.MAX_SAFE_INTEGER&&(ne=Number(ne)),L.byterange={length:ne,offset:q}}return L},Me=function(a){return a&&"number"!=typeof a&&(a=parseInt(a,10)),isNaN(a)?null:a},ut={static:function(a){var o=a.duration,s=a.timescale,t=void 0===s?1:s,n=a.sourceDuration,d=a.periodDuration,m=Me(a.endNumber),_=o/t;return"number"==typeof m?{start:0,end:m}:"number"==typeof d?{start:0,end:d/_}:{start:0,end:n/_}},dynamic:function(a){var o=a.NOW,s=a.clientOffset,t=a.availabilityStartTime,n=a.timescale,d=void 0===n?1:n,m=a.duration,_=a.periodStart,S=void 0===_?0:_,L=a.minimumUpdatePeriod,B=void 0===L?0:L,F=a.timeShiftBufferDepth,q=void 0===F?1/0:F,Z=Me(a.endNumber),ne=(o+s)/1e3,re=t+S,gt=Math.ceil((ne+B-re)*d/m),Ne=Math.floor((ne-re-q)*d/m),Be=Math.floor((ne-re)*d/m);return{start:Math.max(0,Ne),end:"number"==typeof Z?Z:Math.min(gt,Be)}}},dr=function(a){var o=a.type,s=a.duration,t=a.timescale,n=void 0===t?1:t,d=a.periodDuration,m=a.sourceDuration,_=ut[o](a),B=function(a,o){for(var s=[],t=a;t<o;t++)s.push(t);return s}(_.start,_.end).map(function(a){return function(o){var s=a.duration,t=a.timescale,m=a.startNumber;return{number:(void 0===m?1:m)+o,duration:s/(void 0===t?1:t),timeline:a.periodStart,time:o*s}}}(a));if("static"===o){var F=B.length-1;B[F].duration=("number"==typeof d?d:m)-s/n*F}return B},$r=function(a){var o=a.baseUrl,s=a.initialization,t=void 0===s?{}:s,n=a.sourceDuration,d=a.indexRange,m=void 0===d?"":d,_=a.periodStart,S=a.presentationTime,L=a.number,B=void 0===L?0:L,F=a.duration;if(!o)throw new Error("NO_BASE_URL");var q=Q({baseUrl:o,source:t.sourceURL,range:t.range}),Z=Q({baseUrl:o,source:o,indexRange:m});
15if(Z.map=q,F){var ne=dr(a);ne.length&&(Z.duration=ne[0].duration,Z.timeline=ne[0].timeline)}else n&&(Z.duration=n,Z.timeline=_);return Z.presentationTime=S||_,Z.number=B,[Z]},wi=function(a,o,s){var re,t=a.sidx.map?a.sidx.map:null,n=a.sidx.duration,d=a.timeline||0,m=a.sidx.byterange,_=m.offset+m.length,S=o.timescale,L=o.references.filter(function(tt){return 1!==tt.referenceType}),B=[],F=a.endList?"static":"dynamic",q=a.sidx.timeline,Z=q,ne=a.mediaSequence||0;re="bigint"==typeof o.firstOffset?A().BigInt(_)+o.firstOffset:_+o.firstOffset;for(var De=0;De<L.length;De++){var Be,Ye=o.references[De],gt=Ye.referencedSize,Ne=Ye.subsegmentDuration;Be="bigint"==typeof re?re+A().BigInt(gt)-A().BigInt(1):re+gt-1;var Ge=$r({baseUrl:s,timescale:S,timeline:d,periodStart:q,presentationTime:Z,number:ne,duration:Ne,sourceDuration:n,indexRange:re+"-"+Be,type:F})[0];t&&(Ge.map=t),B.push(Ge),re+="bigint"==typeof re?A().BigInt(gt):gt,Z+=Ne/S,ne++}return a.segments=B,a},Jt=["AUDIO","SUBTITLES"],bi=function(a){return function(a,o){return ai(a.reduce(function(s,t){return t.forEach(function(n){s[function(o){return o.timeline}(n)]=n}),s},{}))}(a).sort(function(o,s){return o.timeline>s.timeline?1:-1})},pn=function(a){var o=[];return function(a,o,s){o.forEach(function(t){for(var n in a.mediaGroups[t])for(var d in a.mediaGroups[t][n])s(a.mediaGroups[t][n][d])})}(a,Jt,function(s,t,n,d){o=o.concat(s.playlists||[])}),o},Hi=function(a){var o=a.playlist;o.mediaSequence=a.mediaSequence,o.segments.forEach(function(t,n){t.number=o.mediaSequence+n})},Tr=function(a){return a&&a.uri+"-"+function(a){var o;return o="bigint"==typeof a.offset||"bigint"==typeof a.length?A().BigInt(a.offset)+A().BigInt(a.length)-A().BigInt(1):a.offset+a.length-1,a.offset+"-"+o}(a.byterange)},Bn=function(a){return ai(a.reduce(function(s,t){var d,n=t.attributes.id+(t.attributes.lang||"");s[n]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),(d=s[n].segments).push.apply(d,t.segments)),t.attributes.contentProtection&&(s[n].attributes.contentProtection=t.attributes.contentProtection)):(s[n]=t,s[n].attributes.timelineStarts=[]);return s[n].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),s},{})).map(function(s){return s.discontinuityStarts=function(a,o){return a.reduce(function(s,t,n){return t.discontinuity&&s.push(n),s},[])}(s.segments||[]),s})},an=function(a,o){var s=Tr(a.sidx),t=s&&o[s]&&o[s].sidx;return t&&wi(a,t,a.sidx.resolvedUri),a},ss=function(a,o){if(void 0===o&&(o={}),!Object.keys(o).length)return a;for(var s in a)a[s]=an(a[s],o);return a},du=function(a){var o,s=a.attributes,t=a.segments,n=a.sidx,d=a.discontinuityStarts,m={attributes:(o={NAME:s.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:s.width,height:s.height},CODECS:s.codecs,BANDWIDTH:s.bandwidth},o["PROGRAM-ID"]=1,o),uri:"",endList:"static"===s.type,timeline:s.periodStart,resolvedUri:"",targetDuration:s.duration,discontinuityStarts:d,timelineStarts:s.timelineStarts,segments:t};return s.frameRate&&(m.attributes["FRAME-RATE"]=s.frameRate),s.contentProtection&&(m.contentProtection=s.contentProtection),n&&(m.sidx=n),m},Dl=function(a){var o=a.attributes;return"video/mp4"===o.mimeType||"video/webm"===o.mimeType||"video"===o.contentType},fu=function(a){var o=a.attributes;return"audio/mp4"===o.mimeType||"audio/webm"===o.mimeType||"audio"===o.contentType},Pl=function(a){var o=a.attributes;return"text/vtt"===o.mimeType||"text"===o.contentType},cu=function(a){return a?Object.keys(a).reduce(function(o,s){return o.concat(a[s].playlists)},[]):[]},hu=function(a){var o,s=a.dashPlaylists,t=a.locations,n=a.sidxMapping,d=void 0===n?{}:n,m=a.previousManifest;if(!s.length)return{};var _=s[0].attributes,S=_.sourceDuration,L=_.type,B=_.suggestedPresentationDelay,F=_.minimumUpdatePeriod,q=Bn(s.filter(Dl)).map(du),Z=Bn(s.filter(fu)),ne=Bn(s.filter(Pl)),re=s.map(function(je){return je.attributes.captionServices}).filter(Boolean),De={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(o={AUDIO:{},VIDEO:{}},o["CLOSED-CAPTIONS"]={},o.SUBTITLES={},o),uri:"",duration:S,playlists:ss(q,d)};F>=0&&(De.minimumUpdatePeriod=1e3*F),t&&(De.locations=t),"dynamic"===L&&(De.suggestedPresentationDelay=B);var gt=Z.length?function(a,o,s){void 0===o&&(o={}),void 0===s&&(s=!1);var t,n=a.reduce(function(m,_){var S=_.attributes.role&&_.attributes.role.value||"",L=_.attributes.lang||"",B=_.attributes.label||"main";L&&!_.attributes.label&&(B=_.attributes.lang+(S?" ("+S+")":"")),m[B]||(m[B]={language:L,autoselect:!0,default:"main"===S,playlists:[],uri:""});var q=an(function(a,o){var s,t=a.attributes,n=a.segments,d=a.sidx,m=a.mediaSequence,_=a.discontinuitySequence,S=a.discontinuityStarts,L={attributes:(s={NAME:t.id,BANDWIDTH:t.bandwidth,CODECS:t.codecs},s["PROGRAM-ID"]=1,s),uri:"",endList:"static"===t.type,timeline:t.periodStart,resolvedUri:"",targetDuration:t.duration,discontinuitySequence:_,discontinuityStarts:S,timelineStarts:t.timelineStarts,mediaSequence:m,segments:n};return t.contentProtection&&(L.contentProtection=t.contentProtection),d&&(L.sidx=d),o&&(L.attributes.AUDIO="audio",L.attributes.SUBTITLES="subs"),L}(_,s),o);return m[B].playlists.push(q),typeof t>"u"&&"main"===S&&((t=_).default=!0),m},{});return t||(n[Object.keys(n)[0]].default=!0),n}(Z,d,0===De.playlists.length):null,Ne=ne.length?function(a,o){return void 0===o&&(o={}),a.reduce(function(s,t){var n=t.attributes.lang||"text";return s[n]||(s[n]={language:n,default:!1,autoselect:!1,playlists:[],uri:""}),s[n].playlists.push(an(function(a){var o,s=a.attributes,t=a.segments,n=a.mediaSequence,d=a.discontinuityStarts,m=a.discontinuitySequence;typeof t>"u"&&(t=[{uri:s.baseUrl,timeline:s.periodStart,resolvedUri:s.baseUrl||"",duration:s.sourceDuration,number:0}],s.duration=s.sourceDuration);var _=((o={NAME:s.id,BANDWIDTH:s.bandwidth})["PROGRAM-ID"]=1,o);return s.codecs&&(_.CODECS=s.codecs),{attributes:_,uri:"",endList:"static"===s.type,timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,timelineStarts:s.timelineStarts,discontinuityStarts:d,discontinuitySequence:m,mediaSequence:n,segments:t}}(t),o)),s},{})}(ne,d):null,Be=q.concat(cu(gt),cu(Ne)),st=Be.map(function(je){return je.timelineStarts});return De.timelineStarts=bi(st),function(a,o){a.forEach(function(s){s.mediaSequence=0,s.discontinuitySequence=ra(o,function(t){return t.timeline===s.timeline}
15),s.segments&&s.segments.forEach(function(t,n){t.number=n})})}(Be,De.timelineStarts),gt&&(De.mediaGroups.AUDIO.audio=gt),Ne&&(De.mediaGroups.SUBTITLES.subs=Ne),re.length&&(De.mediaGroups["CLOSED-CAPTIONS"].cc=function(a){return a.reduce(function(o,s){return s&&s.forEach(function(t){var d=t.language;o[d]={autoselect:!1,default:!1,instreamId:t.channel,language:d},t.hasOwnProperty("aspectRatio")&&(o[d].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(o[d].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(o[d]["3D"]=t["3D"])}),o},{})}(re)),m?function(a){var o=a.oldManifest,s=a.newManifest,t=o.playlists.concat(pn(o)),n=s.playlists.concat(pn(s));return s.timelineStarts=bi([o.timelineStarts,s.timelineStarts]),function(a){var o=a.oldPlaylists,t=a.timelineStarts;a.newPlaylists.forEach(function(n){n.discontinuitySequence=ra(t,function(L){return L.timeline===n.timeline});var d=function(a,o){for(var s=0;s<a.length;s++)if(a[s].attributes.NAME===o)return a[s];return null}(o,n.attributes.NAME);if(d&&!n.sidx){var m=n.segments[0],_=ra(d.segments,function(L){return Math.abs(L.presentationTime-m.presentationTime)<.016666666666666666});if(-1===_)return Hi({playlist:n,mediaSequence:d.mediaSequence+d.segments.length}),n.segments[0].discontinuity=!0,n.discontinuityStarts.unshift(0),void((!d.segments.length&&n.timeline>d.timeline||d.segments.length&&n.timeline>d.segments[d.segments.length-1].timeline)&&n.discontinuitySequence--);d.segments[_].discontinuity&&!m.discontinuity&&(m.discontinuity=!0,n.discontinuityStarts.unshift(0),n.discontinuitySequence--),Hi({playlist:n,mediaSequence:d.segments[_].number})}})}({oldPlaylists:t,newPlaylists:n,timelineStarts:s.timelineStarts}),s}({oldManifest:m,newManifest:De}):De},Rl=function(a,o,s){var m=a.timescale,S=a.periodStart,B=a.minimumUpdatePeriod;return Math.ceil((((a.NOW+a.clientOffset)/1e3+(void 0===B?0:B)-(a.availabilityStartTime+(void 0===S?0:S)))*(void 0===m?1:m)-o)/s)},os=function(a,o){for(var s=a.type,t=a.minimumUpdatePeriod,n=void 0===t?0:t,d=a.media,m=void 0===d?"":d,_=a.sourceDuration,S=a.timescale,L=void 0===S?1:S,B=a.startNumber,F=void 0===B?1:B,q=a.periodStart,Z=[],ne=-1,re=0;re<o.length;re++){var De=o[re],Ye=De.d,gt=De.r||0,Ne=De.t||0;ne<0&&(ne=Ne),Ne&&Ne>ne&&(ne=Ne);var Be=void 0;if(gt<0){var st=re+1;Be=st===o.length?"dynamic"===s&&n>0&&m.indexOf("$Number$")>0?Rl(a,ne,Ye):(_*L-ne)/Ye:(o[st].t-ne)/Ye}else Be=gt+1;for(var je=F+Z.length+Be,Ge=F+Z.length;Ge<je;)Z.push({number:Ge,duration:Ye/L,time:ne,timeline:q}),ne+=Ye,Ge++}return Z},wl=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,vu=function(a,o){return a.replace(wl,function(a){return function(o,s,t,n){if("$$"===o)return"$";if(typeof a[s]>"u")return o;var d=""+a[s];return"RepresentationID"===s||(n=t?parseInt(n,10):1,d.length>=n)?d:""+new Array(n-d.length+1).join("0")+d}}(o))},pu=function(a,o){var s={RepresentationID:a.id,Bandwidth:a.bandwidth||0},t=a.initialization,n=void 0===t?{sourceURL:"",range:""}:t,d=Q({baseUrl:a.baseUrl,source:vu(n.sourceURL,s),range:n.range}),m=function(a,o){return a.duration||o?a.duration?dr(a):os(a,o):[{number:a.startNumber||1,duration:a.sourceDuration,time:0,timeline:a.periodStart}]}(a,o);return m.map(function(_){s.Number=_.number,s.Time=_.time;var S=vu(a.media||"",s),F=a.periodStart+(_.time-(a.presentationTimeOffset||0))/(a.timescale||1);return{uri:S,timeline:_.timeline,duration:_.duration,resolvedUri:qt(a.baseUrl||"",S),map:d,number:_.number,presentationTime:F}})},wa=function(a,o){var s=a.duration,t=a.segmentUrls,n=void 0===t?[]:t,d=a.periodStart;if(!s&&!o||s&&o)throw new Error("SEGMENT_TIME_UNSPECIFIED");var _,m=n.map(function(L){return function(a,o){var s=a.baseUrl,t=a.initialization,n=void 0===t?{}:t,d=Q({baseUrl:s,source:n.sourceURL,range:n.range}),m=Q({baseUrl:s,source:o.media,range:o.mediaRange});return m.map=d,m}(a,L)});return s&&(_=dr(a)),o&&(_=os(a,o)),_.map(function(L,B){if(m[B]){var F=m[B],q=a.timescale||1,Z=a.presentationTimeOffset||0;return F.timeline=L.timeline,F.duration=L.duration,F.number=L.number,F.presentationTime=d+(L.time-Z)/q,F}}).filter(function(L){return L})},mu=function(a){var t,n,o=a.attributes,s=a.segmentInfo;s.template?(n=pu,t=zr(o,s.template)):s.base?(n=$r,t=zr(o,s.base)):s.list&&(n=wa,t=zr(o,s.list));var d={attributes:o};if(!n)return d;var m=n(t,s.segmentTimeline);if(t.duration){var L=t.timescale;t.duration=t.duration/(void 0===L?1:L)}else t.duration=m.length?m.reduce(function(F,q){return Math.max(F,Math.ceil(q.duration))},0):0;return d.attributes=t,d.segments=m,s.base&&t.indexRange&&(d.sidx=m[0],d.segments=[]),d},Nr=function(a,o){return Ra(a.childNodes).filter(function(s){return s.tagName===o})},to=function(a){return a.textContent.trim()},ha=function(a){var _=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(a);if(!_)return 0;var S=_.slice(1),B=S[1],F=S[2],q=S[3],Z=S[4],ne=S[5];
15return 31536e3*parseFloat(S[0]||0)+2592e3*parseFloat(B||0)+86400*parseFloat(F||0)+3600*parseFloat(q||0)+60*parseFloat(Z||0)+parseFloat(ne||0)},ro={mediaPresentationDuration:function(a){return ha(a)},availabilityStartTime:function(a){return function(a){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z"),Date.parse(a)}(a)/1e3},minimumUpdatePeriod:function(a){return ha(a)},suggestedPresentationDelay:function(a){return ha(a)},type:function(a){return a},timeShiftBufferDepth:function(a){return ha(a)},start:function(a){return ha(a)},width:function(a){return parseInt(a,10)},height:function(a){return parseInt(a,10)},bandwidth:function(a){return parseInt(a,10)},frameRate:function(a){return function(a){return parseFloat(a.split("/").reduce(function(o,s){return o/s}))}(a)},startNumber:function(a){return parseInt(a,10)},timescale:function(a){return parseInt(a,10)},presentationTimeOffset:function(a){return parseInt(a,10)},duration:function(a){var o=parseInt(a,10);return isNaN(o)?ha(a):o},d:function(a){return parseInt(a,10)},t:function(a){return parseInt(a,10)},r:function(a){return parseInt(a,10)},DEFAULT:function(a){return a}},gi=function(a){return a&&a.attributes?Ra(a.attributes).reduce(function(o,s){return o[s.name]=(ro[s.name]||ro.DEFAULT)(s.value),o},{}):{}},yu={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},Gi=function(a,o){return o.length?Ri(a.map(function(s){return o.map(function(t){return qt(s,to(t))})})):a},Sn=function(a){var o=Nr(a,"SegmentTemplate")[0],s=Nr(a,"SegmentList")[0],t=s&&Nr(s,"SegmentURL").map(function(F){return zr({tag:"SegmentURL"},gi(F))}),n=Nr(a,"SegmentBase")[0],d=s||o,m=d&&Nr(d,"SegmentTimeline")[0],_=s||n||o,S=_&&Nr(_,"Initialization")[0],L=o&&gi(o);L&&S?L.initialization=S&&gi(S):L&&L.initialization&&(L.initialization={sourceURL:L.initialization});var B={template:L,segmentTimeline:m&&Nr(m,"S").map(function(F){return gi(F)}),list:s&&zr(gi(s),{segmentUrls:t,initialization:gi(S)}),base:n&&zr(gi(n),{initialization:gi(S)})};return Object.keys(B).forEach(function(F){B[F]||delete B[F]}),B},Tu=function(a,o){return function(s,t){var n=Gi(o,Nr(s.node,"BaseURL")),d=zr(a,{periodStart:s.attributes.start});"number"==typeof s.attributes.duration&&(d.periodDuration=s.attributes.duration);var m=Nr(s.node,"AdaptationSet"),_=Sn(s.node);return Ri(m.map(function(a,o,s){return function(t){var n=gi(t),d=Gi(o,Nr(t,"BaseURL")),m=Nr(t,"Role")[0],_={role:gi(m)},S=zr(a,n,_),L=Nr(t,"Accessibility")[0],B=function(a){return"urn:scte:dash:cc:cea-608:2015"===a.schemeIdUri?("string"!=typeof a.value?[]:a.value.split(";")).map(function(t){var n,d;if(d=t,/^CC\d=/.test(t)){var m=t.split("=");n=m[0],d=m[1]}else/^CC\d$/.test(t)&&(n=t);return{channel:n,language:d}}):"urn:scte:dash:cc:cea-708:2015"===a.schemeIdUri?("string"!=typeof a.value?[]:a.value.split(";")).map(function(t){var n={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(t)){var d=t.split("="),_=d[1],S=void 0===_?"":_;n.channel=d[0],n.language=t,S.split(",").forEach(function(L){var B=L.split(":"),F=B[0],q=B[1];"lang"===F?n.language=q:"er"===F?n.easyReader=Number(q):"war"===F?n.aspectRatio=Number(q):"3D"===F&&(n["3D"]=Number(q))})}else n.language=t;return n.channel&&(n.channel="SERVICE"+n.channel),n}):void 0}(gi(L));B&&(S=zr(S,{captionServices:B}));var F=Nr(t,"Label")[0];if(F&&F.childNodes.length){var q=F.childNodes[0].nodeValue.trim();S=zr(S,{label:q})}var Z=function(a){return a.reduce(function(o,s){var t=gi(s);t.schemeIdUri&&(t.schemeIdUri=t.schemeIdUri.toLowerCase());var n=yu[t.schemeIdUri];if(n){o[n]={attributes:t};var d=Nr(s,"cenc:pssh")[0];if(d){var m=to(d);o[n].pssh=m&&X(m)}}return o},{})}(Nr(t,"ContentProtection"));Object.keys(Z).length&&(S=zr(S,{contentProtection:Z}));var ne=Sn(t),re=Nr(t,"Representation"),De=zr(s,ne);return Ri(re.map(function(a,o,s){return function(t){var n=Nr(t,"BaseURL"),d=Gi(o,n),m=zr(a,gi(t)),_=Sn(t);return d.map(function(S){return{segmentInfo:zr(s,_),attributes:zr(m,{baseUrl:S})}})}}(S,d,De)))}}(d,n,_)))}}
vendor: 4,955 bytes, lines 15-16
15,io=function(a){if(""===a)throw new Error("DASH_EMPTY_MANIFEST");var s,t,o=new Fn.DOMParser;try{t=(s=o.parseFromString(a,"application/xml"))&&"MPD"===s.documentElement.tagName?s.documentElement:null}catch(n){}if(!t||t&&t.getElementsByTagName("parsererror").length>0)throw new Error("DASH_INVALID_XML");return t},Hl=Le(1684),mn=Le.n(Hl),fs=yt([73,68,51]),ee=function g(a,o){return void 0===o&&(o=0),(a=yt(a)).length-o<10||!lr(a,fs,{offset:o})?o:(o+=function(a,o){void 0===o&&(o=0);var t=(a=yt(a))[o+6]<<21|a[o+7]<<14|a[o+8]<<7|a[o+9];return(16&a[o+5])>>4?t+20:t+10}(a,o),g(a,o))},lt=(new Uint8Array([79,112,117,115,72,101,97,100]),function(a){return"string"==typeof a?Zn(a):a}),zt=function(a){a=yt(a);for(var o=[],s=0;a.length>s;){var t=a[s],n=0,d=0,m=a[++d];for(d++;128&m;)n=(127&m)<<7,m=a[d],d++;n+=127&m;for(var _=0;_<xt.length;_++){var S=xt[_];if(t===S.id){o.push((0,S.parser)(a.subarray(d,d+n)));break}}s+=n+d}return o};
16/*! @name mpd-parser @version 0.22.1 @license Apache-2.0 */xt=[{id:3,parser:function(a){var o={tag:3,id:a[0]<<8|a[1],flags:a[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&o.flags&&(o.dependsOnEsId=a[o.size]<<8|a[o.size+1],o.size+=2),64&o.flags){var s=a[o.size];o.url=function(a){if(!a)return"";a=Array.prototype.slice.call(a);var o=String.fromCharCode.apply(null,yt(a));try{return decodeURIComponent(escape(o))}catch(s){}return o}(a.subarray(o.size+1,o.size+1+s)),o.size+=s}return 32&o.flags&&(o.ocrEsId=a[o.size]<<8|a[o.size+1],o.size+=2),o.descriptors=zt(a.subarray(o.size))||[],o}},{id:4,parser:function(a){return{tag:4,oti:a[0],streamType:a[1],bufferSize:a[2]<<16|a[3]<<8|a[4],maxBitrate:a[5]<<24|a[6]<<16|a[7]<<8|a[8],avgBitrate:a[9]<<24|a[10]<<16|a[11]<<8|a[12],descriptors:zt(a.subarray(13))}}},{id:5,parser:function(a){return{tag:5,bytes:a}}},{id:6,parser:function(a){return{tag:6,bytes:a}}}];var It=function g(a,o,s){void 0===s&&(s=!1),o=function(a){return Array.isArray(a)?a.map(function(o){return lt(o)}):[lt(a)]}(o),a=yt(a);var t=[];if(!o.length)return t;for(var n=0;n<a.length;){var d=(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3])>>>0,m=a.subarray(n+4,n+8);if(0===d)break;var _=n+d;if(_>a.length){if(s)break;_=a.length}var S=a.subarray(n+8,_);lr(m,o[0])&&(1===o.length?t.push(S):t.push.apply(t,g(S,o.slice(1),s))),n=_}return t},Lr={EBML:yt([26,69,223,163]),DocType:yt([66,130]),Segment:yt([24,83,128,103]),SegmentInfo:yt([21,73,169,102]),Tracks:yt([22,84,174,107]),Track:yt([174]),TrackNumber:yt([215]),DefaultDuration:yt([35,227,131]),TrackEntry:yt([174]),TrackType:yt([131]),FlagDefault:yt([136]),CodecID:yt([134]),CodecPrivate:yt([99,162]),VideoTrack:yt([224]),AudioTrack:yt([225]),Cluster:yt([31,67,182,117]),Timestamp:yt([231]),TimestampScale:yt([42,215,177]),BlockGroup:yt([160]),BlockDuration:yt([155]),Block:yt([161]),SimpleBlock:yt([163])},Gl=[128,64,32,16,8,4,2,1],Ma=function(a,o,s,t){void 0===s&&(s=!0),void 0===t&&(t=!1);var n=function(a){for(var o=1,s=0;s<Gl.length&&!(a&Gl[s]);s++)o++;return o}(a[o]),d=a.subarray(o,o+n);return s&&((d=Array.prototype.slice.call(a,o,o+n))[0]^=Gl[n-1]),{length:n,value:Qn(d,{signed:t}),bytes:d}},Df=function g(a){return"string"==typeof a?a.match(/.{1,2}/g).map(function(o){return g(o)}):"number"==typeof a?function(a,o){var t=(void 0===o?{}:o).le,n=void 0!==t&&t;("bigint"!=typeof a&&"number"!=typeof a||"number"==typeof a&&a!=a)&&(a=0);for(var d=function(a){return Math.ceil(function(a){return a.toString(2).length}(a)/8)}(a=Yr(a)),m=new Uint8Array(new ArrayBuffer(d)),_=0;_<d;_++){var S=n?_:Math.abs(_+1-m.length);m[S]=Number(a/$n[_]&Yr(255)),a<0&&(m[S]=Math.abs(~m[S]),m[S]-=0===_?1:2)}return m}(a):a},Pf=function g(a,o,s){if(s>=o.length)return o.length;var t=Ma(o,s,!1);if(lr(a.bytes,t.bytes))return s;var n=Ma(o,s+t.length);return g(a,o,s+n.length+n.value+t.length)},Br=function g(a,o){o=function(a){return Array.isArray(a)?a.map(function(o){return Df(o)}):[Df(a)]}(o),a=yt(a);var s=[];if(!o.length)return s;for(var t=0;t<a.length;){var n=Ma(a,t,!1),d=Ma(a,t+n.length),m=t+n.length+d.length;127===d.value&&(d.value=Pf(n,a,m),d.value!==a.length&&(d.value-=m));var S=a.subarray(m,m+d.value>a.length?a.length:m+d.value);lr(o[0],n.bytes)&&(1===o.length?s.push(S):s=s.concat(g(S,o.slice(1)))),t+=n.length+d.length+S.length}return s},wf=yt([0,0,0,1]),jl=yt([0,0,1]),Su=yt([0,0,3]),Of=function(a){for(var o=[],s=1;s<a.length-2;)lr(a.subarray(s,s+3),Su)&&(o.push(s+2),s++),s++;if(0===o.length)return a;var t=a.length-o.length,n=new Uint8Array(t),d=0;for(s=0;s<t;d++,s++)d===o[0]&&(d++,o.shift()),n[s]=a[d];return n},tr=function(a,o,s,t){void 0===t&&(t=1/0),a=yt(a),s=[].concat(s);for(var d,n=0,m=0;n<a.length&&(m<t||d);){var _=void 0;if(lr(a.subarray(n),wf)?_=4:lr(a.subarray(n),jl)&&(_=3),_){if(m++,d)return Of(a.subarray(d,n));var S=void 0;"h264"===o?S=31&a[n+_]:"h265"===o&&(S=a[n+_]>>1&63),-1!==s.indexOf(S)&&(d=n+_),n+=_+("h264"===o?1:2)}else n++}return a.subarray(0,0)},Ai={webm:yt([119,101,98,109]),matroska:yt([109,97,116,114,111,115,107,97]),flac:yt([
16102,76,97,67]),ogg:yt([79,103,103,83]),ac3:yt([11,119]),riff:yt([82,73,70,70]),avi:yt([65,86,73]),wav:yt([87,65,86,69]),"3gp":yt([102,116,121,112,51,103]),mp4:yt([102,116,121,112]),fmp4:yt([115,116,121,112]),mov:yt([102,116,121,112,113,116]),moov:yt([109,111,111,118]),moof:yt([109,111,111,102])},Fa={aac:function(a){var o=ee(a);return lr(a,[255,16],{offset:o,mask:[255,22]})},mp3:function(a){var o=ee(a);return lr(a,[255,2],{offset:o,mask:[255,6]})},webm:function(a){var o=Br(a,[Lr.EBML,Lr.DocType])[0];return lr(o,Ai.webm)},mkv:function(a){var o=Br(a,[Lr.EBML,Lr.DocType])[0];return lr(o,Ai.matroska)},mp4:function(a){return!Fa["3gp"](a)&&!Fa.mov(a)&&(!!(lr(a,Ai.mp4,{offset:4})||lr(a,Ai.fmp4,{offset:4})||lr(a,Ai.moof,{offset:4})||lr(a,Ai.moov,{offset:4}))||void 0)},mov:function(a){return lr(a,Ai.mov,{offset:4})},"3gp":function(a){return lr(a,Ai["3gp"],{offset:4})},ac3:function(a){var o=ee(a);return lr(a,Ai.ac3,{offset:o})},ts:function(a){if(a.length<189&&a.length>=1)return 71===a[0];for(var o=0;o+188<a.length&&o<188;){if(71===a[o]&&71===a[o+188])return!0;o+=1}return!1},flac:function(a){var o=ee(a);return lr(a,Ai.flac,{offset:o})},ogg:function(a){return lr(a,Ai.ogg)},avi:function(a){return lr(a,Ai.riff)&&lr(a,Ai.avi,{offset:8})},wav:function(a){return lr(a,Ai.riff)&&lr(a,Ai.wav,{offset:8})},h264:function(a){return function(a,o,s){return tr(a,"h264",7,3)}(a).length},h265:function(a){return function(a,o,s){return tr(a,"h265",[32,33],3)}(a).length}},ql=Object.keys(Fa).filter(function(g){return"ts"!==g&&"h264"!==g&&"h265"!==g}).concat(["ts","h264","h265"]);ql.forEach(function(g){var a=Fa[g];Fa[g]=function(o){return a(yt(o))}});var Kh=Fa,bu=function(a){a=yt(a);for(var o=0;o<ql.length;o++){var s=ql[o];if(Kh[s](a))return s}return""},xu=Le(6353);function Wl(g){return Wl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},Wl(g)}function Au(g){var a="function"==typeof Map?new Map:void 0;return Au=function(s){if(null===s||!function jh(g){try{return-1!==Function.toString.call(g).indexOf("[native code]")}catch(a){return"function"==typeof g}}(s))return s;if("function"!=typeof s)throw new TypeError("Super expression must either be null or a function");if(void 0!==a){if(a.has(s))return a.get(s);a.set(s,t)}function t(){return Je(s,arguments,Wl(this).constructor)}return t.prototype=Object.create(s.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Xe(t,s)},Au(g)
17/**
18       * @license
19       * Video.js 7.21.7 <http://videojs.com/>
20       * Copyright Brightcove, Inc. <https://www.brightcove.com/>
21       * Available under Apache License Version 2.0
22       * <https://github.com/videojs/video.js/blob/main/LICENSE>
23       *
24       * Includes vtt.js <https://github.com/mozilla/vtt.js>
25       * Available under Apache License Version 2.0
26       * <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
27       */}for(var vs,Nf="7.21.7",na={},xn=function(a,o){return na[a]=na[a]||[],o&&(na[a]=na[a].concat(o)),na[a]},Na=function(a,o){var s=xn(a).indexOf(o);return!(s<=-1||(na[a]=na[a].slice(),na[a].splice(s,1),0))},cs={prefixed:!0},hs=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],Uf=hs[0],no=0;no<hs.length;no++)if(hs[no][1]in me()){vs=hs[no];break}if(vs){for(var Ba=0;Ba<vs.length;Ba++)cs[Uf[Ba]]=vs[Ba];cs.prefixed=vs[0]!==Uf[0]}var or=[],Qt=function ao(g){var o,a="info",s=function(){for(var n=arguments.length,d=new Array(n),m=0;m<n;m++)d[m]=arguments[m];o("log",a,d)};return o=function(a,o){return function(s,t,n){var d=o.levels[t],m=new RegExp("^("+d+")$");if("log"!==s&&n.unshift(s.toUpperCase()+":"),n.unshift(a+":"),or){or.push([].concat(n));var _=or.length-1e3;or.splice(0,_>0?_:0)}if(A().console){var S=A().console[s];!S&&"debug"===s&&(S=A().console.info||A().console.log),S&&d&&m.test(s)&&S[Array.isArray(n)?"apply":"call"](A().console,n)}}}(g,s),s.createLogger=function(t){return ao(g+": "+t)},s.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:a},s.level=function(t){if("string"==typeof t){if(!s.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');a=t}return a},(s.history=function(){return or?[].concat(or):[]}).filter=function(t){return(or||[]).filter(function(n){return new RegExp(".*"+t+".*").test(n[0])})},s.history.clear=function(){or&&(or.length=0)},s.history.disable=function(){null!==or&&(or.length=0,or=null)},s.history.enable=function(){null===or&&(or=[])},s.error=function(){for(var t=arguments.length,n=new Array(t),d=0;d<t;d++)n[d]=arguments[d];return o("error",a,n)},s.warn=function(){for(var t=arguments.length,n=new Array(t),d=0;d<t;d++)n[d]=arguments[d];return o("warn",a,n)},s.debug=function(){for(var t=arguments.length,n=new Array(t),d=0;d<t;d++)n[d]=arguments[d];return o("debug",a,n)},s}("VIDEOJS"),ps=Qt.createLogger,Vf=Object.prototype.toString,Hf=function(a){return Zi(a)?Object.keys(a):[]};function gs(g,a){Hf(g).forEach(function(o){return a(g[o],o)})}function Ur(g){for(var a=arguments.length,o=new Array(a>1?a-1:0),s=1;s<a;s++)o[s-1]=arguments[s];
27return Object.assign?be.apply(void 0,[g].concat(o)):(o.forEach(function(t){t&&gs(t,function(n,d){g[d]=n})}),g)}function Zi(g){return!!g&&"object"==typeof g}function ga(g){return Zi(g)&&"[object Object]"===Vf.call(g)&&g.constructor===Object}function so(g,a){if(!g||!a)return"";if("function"==typeof A().getComputedStyle){var o;try{o=A().getComputedStyle(g)}catch(s){return""}return o?o.getPropertyValue(a)||o[a]:""}return""}var si=A().navigator&&A().navigator.userAgent||"",Gf=/AppleWebKit\/([\d.]+)/i.exec(si),Kf=Gf?parseFloat(Gf.pop()):null,zl=/iPod/i.test(si),Wh=function(){var g=si.match(/OS (\d+)_/i);return g&&g[1]?g[1]:null}(),An=/Android/i.test(si),$l=function(){var g=si.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!g)return null;var a=g[1]&&parseFloat(g[1]),o=g[2]&&parseFloat(g[2]);return a&&o?parseFloat(g[1]+"."+g[2]):a||null}(),ms=An&&$l<5&&Kf<537,Xl=/Firefox/i.test(si),oo=/Edg/i.test(si),Un=!oo&&(/Chrome/i.test(si)||/CriOS/i.test(si)),Ql=function(){var g=si.match(/(Chrome|CriOS)\/(\d+)/);return g&&g[2]?parseFloat(g[2]):null}(),ys=function(){var g=/MSIE\s(\d+)\.\d/.exec(si),a=g&&parseFloat(g[1]);return!a&&/Trident\/7.0/i.test(si)&&/rv:11.0/.test(si)&&(a=11),a}(),Cu=/Safari/i.test(si)&&!Un&&!An&&!oo,jf=/Windows/i.test(si),ma=Boolean(Ts()&&("ontouchstart"in A()||A().navigator.maxTouchPoints||A().DocumentTouch&&A().document instanceof A().DocumentTouch)),Iu=/iPad/i.test(si)||Cu&&ma&&!/iPhone/i.test(si),Lu=/iPhone/i.test(si)&&!Iu,Vr=Lu||Iu||zl,uo=(Cu||Vr)&&!Un,Zl=Object.freeze({__proto__:null,IS_IPOD:zl,IOS_VERSION:Wh,IS_ANDROID:An,ANDROID_VERSION:$l,IS_NATIVE_ANDROID:ms,IS_FIREFOX:Xl,IS_EDGE:oo,IS_CHROME:Un,CHROME_VERSION:Ql,IE_VERSION:ys,IS_SAFARI:Cu,IS_WINDOWS:jf,TOUCH_ENABLED:ma,IS_IPAD:Iu,IS_IPHONE:Lu,IS_IOS:Vr,IS_ANY_SAFARI:uo});function Jl(g){return"string"==typeof g&&Boolean(g.trim())}function qf(g){if(g.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Ts(){return me()===A().document}function _s(g){return Zi(g)&&1===g.nodeType}function ed(){try{return A().parent!==A().self}catch(g){return!0}}function td(g){return function(a,o){if(!Jl(a))return me()[g](null);Jl(o)&&(o=me().querySelector(o));var s=_s(o)?o:me();return s[g]&&s[g](a)}}function ur(g,a,o,s){void 0===g&&(g="div"),void 0===a&&(a={}),void 0===o&&(o={});var t=me().createElement(g);return Object.getOwnPropertyNames(a).forEach(function(n){var d=a[n];-1!==n.indexOf("aria-")||"role"===n||"type"===n?(Qt.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+n+" to "+d+"."),t.setAttribute(n,d)):"textContent"===n?ya(t,d):(t[n]!==d||"tabIndex"===n)&&(t[n]=d)}),Object.getOwnPropertyNames(o).forEach(function(n){t.setAttribute(n,o[n])}),s&&ku(t,s),t}function ya(g,a){return typeof g.textContent>"u"?g.innerText=a:g.textContent=a,g}function Du(g,a){a.firstChild?a.insertBefore(g,a.firstChild):a.appendChild(g)}function Ta(g,a){return qf(a),g.classList?g.classList.contains(a):function Yh(g){return new RegExp("(^|\\s)"+g+"($|\\s)")}(a).test(g.className)}function Vn(g,a){return g.classList?g.classList.add(a):Ta(g,a)||(g.className=(g.className+" "+a).trim()),g}function Es(g,a){return g?(g.classList?g.classList.remove(a):(qf(a),g.className=g.className.split(/\s+/).filter(function(o){return o!==a}).join(" ")),g):(Qt.warn("removeClass was called with an element that doesn't exist"),null)}function Wf(g,a,o){var s=Ta(g,a);if("function"==typeof o&&(o=o(g,a)),"boolean"!=typeof o&&(o=!s),o!==s)return o?Vn(g,a):Es(g,a),g}function rd(g,a){Object.getOwnPropertyNames(a).forEach(function(o){var s=a[o];
27null===s||typeof s>"u"||!1===s?g.removeAttribute(o):g.setAttribute(o,!0===s?"":s)})}function sn(g){var a={};if(g&&g.attributes&&g.attributes.length>0)for(var s=g.attributes,t=s.length-1;t>=0;t--){var n=s[t].name,d=s[t].value;("boolean"==typeof g[n]||-1!==",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+n+","))&&(d=null!==d),a[n]=d}return a}function Yf(g,a){return g.getAttribute(a)}function Ua(g,a,o){g.setAttribute(a,o)}function lo(g,a){g.removeAttribute(a)}function zf(){me().body.focus(),me().onselectstart=function(){return!1}}function id(){me().onselectstart=function(){return!0}}function aa(g){if(g&&g.getBoundingClientRect&&g.parentNode){var a=g.getBoundingClientRect(),o={};return["bottom","height","left","right","top","width"].forEach(function(s){void 0!==a[s]&&(o[s]=a[s])}),o.height||(o.height=parseFloat(so(g,"height"))),o.width||(o.width=parseFloat(so(g,"width"))),o}}function oi(g){if(!g||g&&!g.offsetParent)return{left:0,top:0,width:0,height:0};for(var a=g.offsetWidth,o=g.offsetHeight,s=0,t=0;g.offsetParent&&g!==me()[cs.fullscreenElement];)s+=g.offsetLeft,t+=g.offsetTop,g=g.offsetParent;return{left:s,top:t,width:a,height:o}}function Ii(g,a){var o={x:0,y:0};if(Vr)for(var s=g;s&&"html"!==s.nodeName.toLowerCase();){var t=so(s,"transform");
vendor: 8,598 bytes, line 27
27if(/^matrix/.test(t)){var n=t.slice(7,-1).split(/,\s/).map(Number);o.x+=n[4],o.y+=n[5]}else if(/^matrix3d/.test(t)){var d=t.slice(9,-1).split(/,\s/).map(Number);o.x+=d[12],o.y+=d[13]}s=s.parentNode}var m={},_=oi(a.target),S=oi(g),L=S.width,F=a.offsetY-(S.top-_.top),q=a.offsetX-(S.left-_.left);return a.changedTouches&&(q=a.changedTouches[0].pageX-S.left,F=a.changedTouches[0].pageY+S.top,Vr&&(q-=o.x,F-=o.y)),m.y=1-Math.max(0,Math.min(1,F/S.height)),m.x=Math.max(0,Math.min(1,q/L)),m}function $f(g){return Zi(g)&&3===g.nodeType}function Ke(g){for(;g.firstChild;)g.removeChild(g.firstChild);return g}function Pu(g){return"function"==typeof g&&(g=g()),(Array.isArray(g)?g:[g]).map(function(a){return"function"==typeof a&&(a=a()),_s(a)||$f(a)?a:"string"==typeof a&&/\S/.test(a)?me().createTextNode(a):void 0}).filter(function(a){return a})}function ku(g,a){return Pu(a).forEach(function(o){return g.appendChild(o)}),g}function nd(g,a){return ku(Ke(g),a)}function fo(g){return void 0===g.button&&void 0===g.buttons||0===g.button&&void 0===g.buttons||"mouseup"===g.type&&0===g.button&&0===g.buttons||!(0!==g.button||1!==g.buttons)}var ad,sa=td("querySelector"),Ru=td("querySelectorAll"),co=Object.freeze({__proto__:null,isReal:Ts,isEl:_s,isInFrame:ed,createEl:ur,textContent:ya,prependTo:Du,hasClass:Ta,addClass:Vn,removeClass:Es,toggleClass:Wf,setAttributes:rd,getAttributes:sn,getAttribute:Yf,setAttribute:Ua,removeAttribute:lo,blockTextSelection:zf,unblockTextSelection:id,getBoundingClientRect:aa,findPosition:oi,getPointerPosition:Ii,isTextNode:$f,emptyEl:Ke,normalizeContent:Pu,appendContent:ku,insertContent:nd,isSingleLeftClick:fo,$:sa,$$:Ru}),Ss=!1,Xf=function(){if(!1!==ad.options.autoSetup){var a=Array.prototype.slice.call(me().getElementsByTagName("video")),o=Array.prototype.slice.call(me().getElementsByTagName("audio")),s=Array.prototype.slice.call(me().getElementsByTagName("video-js")),t=a.concat(o,s);if(t&&t.length>0)for(var n=0,d=t.length;n<d;n++){var m=t[n];if(!m||!m.getAttribute){wu(1);break}void 0===m.player&&null!==m.getAttribute("data-setup")&&ad(m)}else Ss||wu(1)}};function wu(g,a){Ts()&&(a&&(ad=a),A().setTimeout(Xf,g))}function ho(){Ss=!0,A().removeEventListener("load",ho)}Ts()&&("complete"===me().readyState?ho():A().addEventListener("load",ho));var sd,Qf=function(a){var o=me().createElement("style");return o.className=a,o},vo=function(a,o){a.styleSheet?a.styleSheet.cssText=o:a.textContent=o},$h=3;function Hn(){return $h++}A().WeakMap||(sd=function(){function g(){this.vdata="vdata"+Math.floor(A().performance&&A().performance.now()||Date.now()),this.data={}}var a=g.prototype;return a.set=function(s,t){var n=s[this.vdata]||Hn();return s[this.vdata]||(s[this.vdata]=n),this.data[n]=t,this},a.get=function(s){var t=s[this.vdata];if(t)return this.data[t];Qt("We have no data for this element",s)},a.has=function(s){return s[this.vdata]in this.data},a.delete=function(s){var t=s[this.vdata];t&&(delete this.data[t],delete s[this.vdata])},g}());var Ki=A().WeakMap?new WeakMap:new sd;function od(g,a){if(Ki.has(g)){var o=Ki.get(g);0===o.handlers[a].length&&(delete o.handlers[a],g.removeEventListener?g.removeEventListener(a,o.dispatcher,!1):g.detachEvent&&g.detachEvent("on"+a,o.dispatcher)),Object.getOwnPropertyNames(o.handlers).length<=0&&(delete o.handlers,delete o.dispatcher,delete o.disabled),0===Object.getOwnPropertyNames(o).length&&Ki.delete(g)}}function ud(g,a,o,s){o.forEach(function(t){g(a,t,s)})}function Ou(g){if(g.fixed_)return g;function a(){return!0}function o(){return!1}if(!g||!g.isPropagationStopped||!g.isImmediatePropagationStopped){var s=g||A().event;for(var t in g={},s)"layerX"!==t&&"layerY"!==t&&"keyLocation"!==t&&"webkitMovementX"!==t&&"webkitMovementY"!==t&&"path"!==t&&("returnValue"===t&&s.preventDefault||(g[t]=s[t]));if(g.target||(g.target=g.srcElement||me()),g.relatedTarget||(g.relatedTarget=g.fromElement===g.target?g.toElement:g.fromElement),g.preventDefault=function(){s.preventDefault&&s.preventDefault(),g.returnValue=!1,s.returnValue=!1,g.defaultPrevented=!0},g.defaultPrevented=!1,g.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),g.cancelBubble=!0,s.cancelBubble=!0,g.isPropagationStopped=a},g.isPropagationStopped=o,g.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),g.isImmediatePropagationStopped=a,g.stopPropagation()},g.isImmediatePropagationStopped=o,null!=g.clientX){var n=me().documentElement,d=me().body;g.pageX=g.clientX+(n&&n.scrollLeft||d&&d.scrollLeft||0)-(n&&n.clientLeft||d&&d.clientLeft||0),g.pageY=g.clientY+(n&&n.scrollTop||d&&d.scrollTop||0)-(n&&n.clientTop||d&&d.clientTop||0)}g.which=g.charCode||g.keyCode,null!=g.button&&(g.button=1&g.button?0:4&g.button?1:2&g.button?2:0)}return g.fixed_=!0,g}var bs,Xh=function(){if("boolean"!=typeof bs){bs=!1;try{var a=Object.defineProperty({},"passive",{get:function(){bs=!0}});A().addEventListener("test",null,a),A().removeEventListener("test",null,a)}catch(o){}}return bs},Qh=["touchstart","touchmove"];function on(g,a,o){if(Array.isArray(a))return ud(on,g,a,o);Ki.has(g)||Ki.set(g,{});var s=Ki.get(g);if(s.handlers||(s.handlers={}),s.handlers[a]||(s.handlers[a]=[]),o.guid||(o.guid=Hn()),s.handlers[a].push(o),s.dispatcher||(s.disabled=!1,s.dispatcher=function(n,d){if(!s.disabled){n=Ou(n);var m=s.handlers[n.type];if(m)for(var _=m.slice(0),S=0,L=_.length;S<L&&!n.isImmediatePropagationStopped();S++)try{_[S].call(g,n,d)}catch(B){Qt.error(B)}}}),1===s.handlers[a].length)if(g.addEventListener){var t=!1;Xh()&&Qh.indexOf(a)>-1&&(t={passive:!0}),g.addEventListener(a,s.dispatcher,t)}else g.attachEvent&&g.attachEvent("on"+a,s.dispatcher)}function Mi(g,a,o){if(Ki.has(g)){var s=Ki.get(g);if(s.handlers){if(Array.isArray(a))return ud(Mi,g,a,o);var t=function(S,L){s.handlers[L]=[],od(S,L)};if(void 0===a){for(var n in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},n)&&t(g,n);return}var d=s.handlers[a];if(d){if(!o)return void t(g,a);if(o.guid)for(var m=0;m<d.length;m++)d[m].guid===o.guid&&d.splice(m--,1);od(g,a)}}}}function xs(g,a,o){var s=Ki.has(g)?Ki.get(g):{},t=g.parentNode||g.ownerDocument;if("string"==typeof a?a={type:a,target:g}:a.target||(a.target=g),a=Ou(a),s.dispatcher&&s.dispatcher.call(g,a,o),t&&!a.isPropagationStopped()&&!0===a.bubbles)xs.call(null,t,a,o);else if(!t&&!a.defaultPrevented&&a.target&&a.target[a.type]){Ki.has(a.target)||Ki.set(a.target,{});var n=Ki.get(a.target);a.target[a.type]&&(n.disabled=!0,"function"==typeof a.target[a.type]&&a.target[a.type](),n.disabled=!1)}return!a.defaultPrevented}function Mu(g,a,o){if(Array.isArray(a))return ud(Mu,g,a,o);var s=function t(){Mi(g,a,t),o.apply(this,arguments)};s.guid=o.guid=o.guid||Hn(),on(g,a,s)}function Zf(g,a,o){var s=function t(){Mi(g,a,t),o.apply(this,arguments)};s.guid=o.guid=o.guid||Hn(),on(g,a,s)}var po,Zh=Object.freeze({__proto__:null,fixEvent:Ou,on,off:Mi,trigger:xs,one:Mu,any:Zf}),Cn=30,yr=function(a,o,s){o.guid||(o.guid=Hn());var t=o.bind(a);return t.guid=s?s+"_"+o.guid:o.guid,t},oa=function(a,o){var s=A().performance.now();return function(){var d=A().performance.now();d-s>=o&&(a.apply(void 0,arguments),s=d)}},Jf=function(a,o,s,t){void 0===t&&(t=A());var n,m=function(){var S=this,L=arguments,B=function(){n=null,B=null,s||a.apply(S,L)};!n&&s&&a.apply(S,L),t.clearTimeout(n),n=t.setTimeout(B,o)};return m.cancel=function(){t.clearTimeout(n),n=null},m},ui=function(){};ui.prototype.allowedEvents_={},ui.prototype.on=function(g,a){var o=this.addEventListener;this.addEventListener=function(){},on(this,g,a),this.addEventListener=o},ui.prototype.addEventListener=ui.prototype.on,ui.prototype.off=function(g,a){Mi(this,g,a)},ui.prototype.removeEventListener=ui.prototype.off,ui.prototype.one=function(g,a){var o=this.addEventListener;this.addEventListener=function(){},Mu(this,g,a),this.addEventListener=o},ui.prototype.any=function(g,a){var o=this.addEventListener;this.addEventListener=function(){},Zf(this,g,a),this.addEventListener=o},ui.prototype.trigger=function(g){var a=g.type||g;"string"==typeof g&&(g={type:a}),g=Ou(g),this.allowedEvents_[a]&&this["on"+a]&&this["on"+a](g),xs(this,g)},ui.prototype.dispatchEvent=ui.prototype.trigger,ui.prototype.queueTrigger=function(g){var a=this;po||(po=new Map);var o=g.type||g,s=po.get(this);s||po.set(this,s=new Map);var t=s.get(o);s.delete(o),A().clearTimeout(t);var n=A().setTimeout(function(){s.delete(o),0===s.size&&(s=null,po.delete(a)),a.trigger(g)},0);s.set(o,n)};var As=function(a){return"function"==typeof a.name?a.name():"string"==typeof a.name?a.name:a.name_?a.name_:a.constructor&&a.constructor.name?a.constructor.name:typeof a}
vendor: 7,366 bytes, line 27
27,Jr=function(a){return a instanceof ui||!!a.eventBusEl_&&["on","one","off","trigger"].every(function(o){return"function"==typeof a[o]})},go=function(a){return"string"==typeof a&&/\S/.test(a)||Array.isArray(a)&&!!a.length},Fu=function(a,o,s){if(!a||!a.nodeName&&!Jr(a))throw new Error("Invalid target for "+As(o)+"#"+s+"; must be a DOM node or evented object.")},mo=function(a,o,s){if(!go(a))throw new Error("Invalid event type for "+As(o)+"#"+s+"; must be a non-empty string or array.")},ec=function(a,o,s){if("function"!=typeof a)throw new Error("Invalid listener for "+As(o)+"#"+s+"; must be a function.")},ld=function(a,o,s){var n,d,m,t=o.length<3||o[0]===a||o[0]===a.eventBusEl_;return t?(n=a.eventBusEl_,o.length>=3&&o.shift(),d=o[0],m=o[1]):(n=o[0],d=o[1],m=o[2]),Fu(n,a,s),mo(d,a,s),ec(m,a,s),{isTargetingSelf:t,target:n,type:d,listener:m=yr(a,m)}},Va=function(a,o,s,t){Fu(a,a,o),a.nodeName?Zh[o](a,s,t):a[o](s,t)},Jh={on:function(){for(var a=this,o=arguments.length,s=new Array(o),t=0;t<o;t++)s[t]=arguments[t];var n=ld(this,s,"on"),d=n.isTargetingSelf,m=n.target,_=n.type,S=n.listener;if(Va(m,"on",_,S),!d){var L=function(){return a.off(m,_,S)};L.guid=S.guid;var B=function(){return a.off("dispose",L)};B.guid=S.guid,Va(this,"on","dispose",L),Va(m,"on","dispose",B)}},one:function(){for(var a=this,o=arguments.length,s=new Array(o),t=0;t<o;t++)s[t]=arguments[t];var n=ld(this,s,"one"),m=n.target,_=n.type,S=n.listener;if(n.isTargetingSelf)Va(m,"one",_,S);else{var L=function B(){a.off(m,_,B);for(var F=arguments.length,q=new Array(F),Z=0;Z<F;Z++)q[Z]=arguments[Z];S.apply(null,q)};L.guid=S.guid,Va(m,"one",_,L)}},any:function(){for(var a=this,o=arguments.length,s=new Array(o),t=0;t<o;t++)s[t]=arguments[t];var n=ld(this,s,"any"),m=n.target,_=n.type,S=n.listener;if(n.isTargetingSelf)Va(m,"any",_,S);else{var L=function B(){a.off(m,_,B);for(var F=arguments.length,q=new Array(F),Z=0;Z<F;Z++)q[Z]=arguments[Z];S.apply(null,q)};L.guid=S.guid,Va(m,"any",_,L)}},off:function(a,o,s){if(!a||go(a))Mi(this.eventBusEl_,a,o);else{var t=a,n=o;Fu(t,this,"off"),mo(n,this,"off"),ec(s,this,"off"),s=yr(this,s),this.off("dispose",s),t.nodeName?(Mi(t,n,s),Mi(t,"dispose",s)):Jr(t)&&(t.off(n,s),t.off("dispose",s))}},trigger:function(a,o){if(Fu(this.eventBusEl_,this,"trigger"),!go(a&&"string"!=typeof a?a.type:a)){var t="Invalid event type for "+As(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(!a)throw new Error(t);(this.log||Qt).error(t)}return xs(this.eventBusEl_,a,o)}};function Nu(g,a){void 0===a&&(a={});var s=a.eventBusKey;if(s){if(!g[s].nodeName)throw new Error('The eventBusKey "'+s+'" does not refer to an element.');g.eventBusEl_=g[s]}else g.eventBusEl_=ur("span",{className:"vjs-event-bus"});return Ur(g,Jh),g.eventedCallbacks&&g.eventedCallbacks.forEach(function(t){t()}),g.on("dispose",function(){g.off(),[g,g.el_,g.eventBusEl_].forEach(function(t){t&&Ki.has(t)&&Ki.delete(t)}),A().setTimeout(function(){g.eventBusEl_=null},0)}),g}var tc={state:{},setState:function(a){var s,o=this;return"function"==typeof a&&(a=a()),gs(a,function(t,n){o.state[n]!==t&&((s=s||{})[n]={from:o.state[n],to:t}),o.state[n]=t}),s&&Jr(this)&&this.trigger({changes:s,type:"statechanged"}),s}};function Bu(g,a){return Ur(g,tc),g.state=Ur({},g.state,a),"function"==typeof g.handleStateChanged&&Jr(g)&&g.on("statechanged",g.handleStateChanged),g}var yo=function(a){return"string"!=typeof a?a:a.replace(/./,function(o){return o.toLowerCase()})},ei=function(a){return"string"!=typeof a?a:a.replace(/./,function(o){return o.toUpperCase()})};function Dr(){for(var g={},a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return o.forEach(function(t){t&&gs(t,function(n,d){ga(n)?(ga(g[d])||(g[d]={}),g[d]=Dr(g[d],n)):g[d]=n})}),g}var ic=function(){function g(){this.map_={}}var a=g.prototype;return a.has=function(s){return s in this.map_},a.delete=function(s){var t=this.has(s);return delete this.map_[s],t},a.set=function(s,t){return this.map_[s]=t,this},a.forEach=function(s,t){for(var n in this.map_)s.call(t,this.map_[n],n,this)},g}(),ev=A().Map?A().Map:ic,nc=function(){function g(){this.set_={}}var a=g.prototype;return a.has=function(s){return s in this.set_},a.delete=function(s){var t=this.has(s);return delete this.set_[s],t},a.add=function(s){return this.set_[s]=1,this},a.forEach=function(s,t){for(var n in this.set_)s.call(t,n,n,this)},g}(),dd=A().Set?A().Set:nc,et=function(){function g(o,s,t){var n=this;if(this.player_=!o&&this.play?o=this:o,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Dr({},this.options_),s=this.options_=Dr(this.options_,s),this.id_=s.id||s.el&&s.el.id,!this.id_){var d=o&&o.id&&o.id()||"no_player";this.id_=d+"_component_"+Hn()}this.name_=s.name||null,s.el?this.el_=s.el:!1!==s.createEl&&(this.el_=this.createEl()),s.className&&this.el_&&s.className.split(" ").forEach(function(m){return n.addClass(m)}),!1!==s.evented&&(Nu(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Bu(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new dd,this.setIntervalIds_=new dd,this.rafIds_=new dd,this.namedRafs_=new ev,this.clearingTimersOnDispose_=!1,!1!==s.initChildren&&this.initChildren(),this.ready(t),!1!==s.reportTouchActivity&&this.enableTouchActivity()}var a=g.prototype;return a.dispose=function(s){if(void 0===s&&(s={}),!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(s.restoreEl?this.el_.parentNode.replaceChild(s.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}},a.isDisposed=function(){return Boolean(this.isDisposed_)},a.player=function(){return this.player_},a.options=function(s){return s?(this.options_=Dr(this.options_,s),this.options_):this.options_},a.el=function(){return this.el_},a.createEl=function(s,t,n){return ur(s,t,n)},a.localize=function(s,t,n){void 0===n&&(n=s);var d=this.player_.language&&this.player_.language(),m=this.player_.languages&&this.player_.languages(),_=m&&m[d],S=d&&d.split("-")[0],L=m&&m[S],B=n;return _&&_[s]?B=_[s]:L&&L[s]&&(B=L[s]),t&&(B=B.replace(/\{(\d+)\}/g,function(F,q){var Z=t[q-1],ne=Z;return typeof Z>"u"&&(ne=F),ne})),B},a.handleLanguagechange=function(){},a.contentEl=function(){return this.contentEl_||this.el_},a.id=function(){return this.id_},a.name=function(){return this.name_},a.children=function(){return this.children_},a.getChildById=function(s){return this.childIndex_[s]},a.getChild=function(s){if(s)return this.childNameIndex_[s]},a.getDescendant=function(){for(var s=arguments.length,t=new Array(s),n=0;n<s;n++)t[n]=arguments[n];t=t.reduce(function(_,S){return _.concat(S)},[]);for(var d=this,m=0;m<t.length;m++)if(!(d=d.getChild(t[m]))||!d.getChild)return;return d},a.addChild=function(s,t,n){var d,m;if(void 0===t&&(t={}),void 0===n&&(n=this.children_.length),"string"==typeof s){m=ei(s);var _=t.componentClass||m;t.name=m;var S=g.getComponent(_);
27if(!S)throw new Error("Component "+_+" does not exist");if("function"!=typeof S)return null;d=new S(this.player_||this,t)}else d=s;if(d.parentComponent_&&d.parentComponent_.removeChild(d),this.children_.splice(n,0,d),d.parentComponent_=this,"function"==typeof d.id&&(this.childIndex_[d.id()]=d),(m=m||d.name&&ei(d.name()))&&(this.childNameIndex_[m]=d,this.childNameIndex_[yo(m)]=d),"function"==typeof d.el&&d.el()){var L=null;this.children_[n+1]&&(this.children_[n+1].el_?L=this.children_[n+1].el_:_s(this.children_[n+1])&&(L=this.children_[n+1])),this.contentEl().insertBefore(d.el(),L)}return d},a.removeChild=function(s){if("string"==typeof s&&(s=this.getChild(s)),s&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===s){t=!0,this.children_.splice(n,1);break}if(t){s.parentComponent_=null,this.childIndex_[s.id()]=null,this.childNameIndex_[ei(s.name())]=null,this.childNameIndex_[yo(s.name())]=null;var d=s.el();d&&d.parentNode===this.contentEl()&&this.contentEl().removeChild(s.el())}}},a.initChildren=function(){var s=this,t=this.options_.children;if(t){var m,n=this.options_,_=g.getComponent("Tech");(m=Array.isArray(t)?t:Object.keys(t)).concat(Object.keys(this.options_).filter(function(S){return!m.some(function(L){return"string"==typeof L?S===L:S===L.name})})).map(function(S){var L,B;return"string"==typeof S?B=t[L=S]||s.options_[L]||{}:(L=S.name,B=S),{name:L,opts:B}}).filter(function(S){var L=g.getComponent(S.opts.componentClass||ei(S.name));return L&&!_.isTech(L)}).forEach(function(L){var B=L.name,F=L.opts;if(void 0!==n[B]&&(F=n[B]),!1!==F){!0===F&&(F={}),F.playerOptions=s.options_.playerOptions;var q=s.addChild(B,F);q&&(s[B]=q)}})}},a.buildCSSClass=function(){return""},a.ready=function(s,t){if(void 0===t&&(t=!1),s){if(!this.isReady_)return this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(s);t?s.call(this):this.setTimeout(s,1)}},a.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var s=this.readyQueue_;this.readyQueue_=[],s&&s.length>0&&s.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},a.$=function(s,t){return sa(s,t||this.contentEl())},a.$$=function(s,t){return Ru(s,t||this.contentEl())},a.hasClass=function(s){return Ta(this.el_,s)},a.addClass=function(s){Vn(this.el_,s)},a.removeClass=function(s){Es(this.el_,s)},a.toggleClass=function(s,t){Wf(this.el_,s,t)},a.show=function(){this.removeClass("vjs-hidden")},a.hide=function(){this.addClass("vjs-hidden")},a.lockShowing=function(){this.addClass("vjs-lock-showing")},a.unlockShowing=function(){this.removeClass("vjs-lock-showing")},a.getAttribute=function(s){return Yf(this.el_,s)},a.setAttribute=function(s,t){Ua(this.el_,s,t)},a.removeAttribute=function(s){lo(this.el_,s)},a.width=function(s,t){return this.dimension("width",s,t)},a.height=function(s,t){return this.dimension("height",s,t)},a.dimensions=function(s,t){this.width(s,!0),this.height(t)},a.dimension=function(s,t,n){if(void 0!==t)return(null===t||t!=t)&&(t=0),this.el_.style[s]=-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?t:"auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var d=this.el_.style[s],m=d.indexOf("px");return parseInt(-1!==m?d.slice(0,m):this.el_["offset"+ei(s)],10)},a.currentDimension=function(s){var t=0;if("width"!==s&&"height"!==s)throw new Error("currentDimension only accepts width or height value");if(t=so(this.el_,s),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+ei(s);t=this.el_[n]}return t},a.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},a.currentWidth=function(){return this.currentDimension("width")},a.currentHeight=function(){return this.currentDimension("height")},a.focus=function(){this.el_.focus()},a.blur=function(){this.el_.blur()},a.handleKeyDown=function(s){this.player_&&(xe().isEventKey(s,"Tab")||s.stopPropagation(),this.player_.handleKeyDown(s))},a.handleKeyPress=function(s){this.handleKeyDown(s)},a.emitTapEvents=function(){var m,s=0,t=null;this.on("touchstart",function(S){1===S.touches.length&&(t={pageX:S.touches[0].pageX,pageY:S.touches[0].pageY},s=A().performance.now(),m=!0)}),this.on("touchmove",function(S){if(S.touches.length>1)m=!1;else if(t){var L=S.touches[0].pageX-t.pageX,B=S.touches[0].pageY-t.pageY;Math.sqrt(L*L+B*B)>10&&(m=!1)}});var _=function(){m=!1};this.on("touchleave",_),this.on("touchcancel",_),this.on("touchend",function(S){t=null,!0===m&&A().performance.now()-s<200&&(S.preventDefault(),this.trigger("tap"))})},a.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,s=yr(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){s(),this.clearInterval(t),t=this.setInterval(s,250)});var n=function(m){s(),this.clearInterval(t)};this.on("touchmove",s),this.on("touchend",n),this.on("touchcancel",n)}},a.setTimeout=function(s,t){var d,n=this;return s=yr(this,s),this.clearTimersOnDispose_(),d=A().setTimeout(function(){n.setTimeoutIds_.has(d)&&n.setTimeoutIds_.delete(d),s()},t),this.setTimeoutIds_.add(d),d},a.clearTimeout=function(s){return this.setTimeoutIds_.has(s)&&(this.setTimeoutIds_.delete(s),A().clearTimeout(s)),s},a.setInterval=function(s,t){s=yr(this,s),this.clearTimersOnDispose_();var n=A().setInterval(s,t);return this.setIntervalIds_.add(n),n},a.clearInterval=function(s){return this.setIntervalIds_.has(s)&&(this.setIntervalIds_.delete(s),A().clearInterval(s)),s},a.requestAnimationFrame=function(s){var n,t=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),s=yr(this,s),n=A().requestAnimationFrame(function(){t.rafIds_.has(n)&&t.rafIds_.delete(n),s()}),this.rafIds_.add(n),n):this.setTimeout(s,1e3/60)},a.requestNamedAnimationFrame=function(s,t){var n=this;if(!this.namedRafs_.has(s)){this.clearTimersOnDispose_(),t=yr(this,t);var d=this.requestAnimationFrame(function(){t(),n.namedRafs_.has(s)&&n.namedRafs_.delete(s)});return this.namedRafs_.set(s,d),s}},a.cancelNamedAnimationFrame=function(s){this.namedRafs_.has(s)&&(this.cancelAnimationFrame(this.namedRafs_.get(s)),this.namedRafs_.delete(s))},a.cancelAnimationFrame=function(s){return this.supportsRaf_?(this.rafIds_.has(s)&&(this.rafIds_.delete(s),A().cancelAnimationFrame(s)),s):this.clearTimeout(s)},a.clearTimersOnDispose_=function(){var s=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEac
27h(function(t){var d=t[1];s[t[0]].forEach(function(m,_){return s[d](_)})}),s.clearingTimersOnDispose_=!1}))},g.registerComponent=function(s,t){if("string"!=typeof s||!s)throw new Error('Illegal component name, "'+s+'"; must be a non-empty string.');var n=g.getComponent("Tech"),d=n&&n.isTech(t),m=g===t||g.prototype.isPrototypeOf(t.prototype);if(d||!m)throw new Error('Illegal component, "'+s+'"; '+(d?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");s=ei(s),g.components_||(g.components_={});var S=g.getComponent("Player");if("Player"===s&&S&&S.players){var L=S.players,B=Object.keys(L);if(L&&B.length>0&&B.map(function(F){return L[F]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return g.components_[s]=t,g.components_[yo(s)]=t,t},g.getComponent=function(s){if(s&&g.components_)return g.components_[s]},g}();function fd(g,a,o,s){return function tv(g,a,o){if("number"!=typeof a||a<0||a>o)throw new Error("Failed to execute '"+g+"' on 'TimeRanges': The index provided ("+a+") is non-numeric or out of bounds (0-"+o+").")}(g,s,o.length-1),o[s][a]}function cd(g){var a;return a=void 0===g||0===g.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:g.length,start:fd.bind(null,"start",0,g),end:fd.bind(null,"end",1,g)},A().Symbol&&A().Symbol.iterator&&(a[A().Symbol.iterator]=function(){return(g||[]).values()}),a}function _a(g,a){return Array.isArray(g)?cd(g):void 0===g||void 0===a?cd():cd([[g,a]])}function Cs(g,a){var s,t,o=0;if(!a)return 0;(!g||!g.length)&&(g=_a(0,0));for(var n=0;n<g.length;n++)s=g.start(n),(t=g.end(n))>a&&(t=a),o+=t-s;return o/a}function ji(g){if(g instanceof ji)return g;"number"==typeof g?this.code=g:"string"==typeof g?this.message=g:Zi(g)&&("number"==typeof g.code&&(this.code=g.code),Ur(this,g)),this.message||(this.message=ji.defaultMessages[this.code]||"")}et.prototype.supportsRaf_="function"==typeof A().requestAnimationFrame&&"function"==typeof A().cancelAnimationFrame,et.registerComponent("Component",et),ji.prototype.code=0,ji.prototype.message="",ji.prototype.status=null,ji.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],ji.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Is=0;Is<ji.errorTypes.length;Is++)ji[ji.errorTypes[Is]]=Is,ji.prototype[ji.errorTypes[Is]]=Is;function jr(g){return null!=g&&"function"==typeof g.then}function Kn(g){jr(g)&&g.then(null,function(a){})}var To=function(a){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(s,t,n){return a[t]&&(s[t]=a[t]),s},{cues:a.cues&&Array.prototype.map.call(a.cues,function(s){return{startTime:s.startTime,endTime:s.endTime,text:s.text,id:s.id}})})},_o="vjs-modal-dialog",In=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).handleKeyDown_=function(d){return n.handleKeyDown(d)},n.close_=function(d){return n.close(d)},n.opened_=n.hasBeenOpened_=n.hasBeenFilled_=!1,n.closeable(!n.options_.uncloseable),n.content(n.options_.content),n.contentEl_=ur("div",{className:_o+"-content"},{role:"document"}),n.descEl_=ur("p",{className:_o+"-description vjs-control-text",id:n.el().getAttribute("aria-describedby")}),ya(n.descEl_,n.description()),n.el_.appendChild(n.descEl_),n.el_.appendChild(n.contentEl_),n}ae(a,g);var o=a.prototype;return o.createEl=function(){return g.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},o.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,g.prototype.dispose.call(this)},o.buildCSSClass=function(){return _o+" vjs-hidden "+g.prototype.buildCSSClass.call(this)},o.label=function(){return this.localize(this.options_.label||"Modal Window")},o.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},o.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpe
vendor: 7,091 bytes, line 27
27n&&this.wasPlaying_&&t.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},o.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},o.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},o.closeable=function(t){if("boolean"==typeof t){var n=this.closeable_=!!t,d=this.getChild("closeButton");if(n&&!d){var m=this.contentEl_;this.contentEl_=this.el_,d=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=m,this.on(d,"close",this.close_)}!n&&d&&(this.off(d,"close",this.close_),this.removeChild(d),d.dispose())}return this.closeable_},o.fill=function(){this.fillWith(this.content())},o.fillWith=function(t){var n=this.contentEl(),d=n.parentNode,m=n.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,d.removeChild(n),this.empty(),nd(n,t),this.trigger("modalfill"),m?d.insertBefore(n,m):d.appendChild(n);var _=this.getChild("closeButton");_&&d.appendChild(_.el_)},o.empty=function(){this.trigger("beforemodalempty"),Ke(this.contentEl()),this.trigger("modalempty")},o.content=function(t){return typeof t<"u"&&(this.content_=t),this.content_},o.conditionalFocus_=function(){var t=me().activeElement,n=this.player_.el_;this.previouslyActiveEl_=null,(n.contains(t)||n===t)&&(this.previouslyActiveEl_=t,this.focus())},o.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},o.handleKeyDown=function(t){if(t.stopPropagation(),xe().isEventKey(t,"Escape")&&this.closeable())return t.preventDefault(),void this.close();if(xe().isEventKey(t,"Tab")){for(var m,n=this.focusableEls_(),d=this.el_.querySelector(":focus"),_=0;_<n.length;_++)if(d===n[_]){m=_;break}me().activeElement===this.el_&&(m=0),t.shiftKey&&0===m?(n[n.length-1].focus(),t.preventDefault()):!t.shiftKey&&m===n.length-1&&(n[0].focus(),t.preventDefault())}},o.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,function(n){return(n instanceof A().HTMLAnchorElement||n instanceof A().HTMLAreaElement)&&n.hasAttribute("href")||(n instanceof A().HTMLInputElement||n instanceof A().HTMLSelectElement||n instanceof A().HTMLTextAreaElement||n instanceof A().HTMLButtonElement)&&!n.hasAttribute("disabled")||n instanceof A().HTMLIFrameElement||n instanceof A().HTMLObjectElement||n instanceof A().HTMLEmbedElement||n.hasAttribute("tabindex")&&-1!==n.getAttribute("tabindex")||n.hasAttribute("contenteditable")})},a}(et);In.prototype.options_={pauseOnOpen:!0,temporary:!0},et.registerComponent("ModalDialog",In);var Ls=function(g){function a(s){var t;void 0===s&&(s=[]),(t=g.call(this)||this).tracks_=[],Object.defineProperty(Pe(t),"length",{get:function(){return this.tracks_.length}});for(var n=0;n<s.length;n++)t.addTrack(s[n]);return t}ae(a,g);var o=a.prototype;return o.addTrack=function(t){var n=this,d=this.tracks_.length;""+d in this||Object.defineProperty(this,d,{get:function(){return this.tracks_[d]}}),-1===this.tracks_.indexOf(t)&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack",target:this})),t.labelchange_=function(){n.trigger({track:t,type:"labelchange",target:n})},Jr(t)&&t.addEventListener("labelchange",t.labelchange_)},o.removeTrack=function(t){for(var n,d=0,m=this.length;d<m;d++)if(this[d]===t){(n=this[d]).off&&n.off(),this.tracks_.splice(d,1);break}n&&this.trigger({track:n,type:"removetrack",target:this})},o.getTrackById=function(t){for(var n=null,d=0,m=this.length;d<m;d++){var _=this[d];if(_.id===t){n=_;break}}return n},a}(ui);for(var Ea in Ls.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},Ls.prototype.allowedEvents_)Ls.prototype["on"+Ea]=null;var li=function(a,o){for(var s=0;s<a.length;s++)!Object.keys(a[s]).length||o.id===a[s].id||(a[s].enabled=!1)},ac=function(g){function a(s){var t;void 0===s&&(s=[]);for(var n=s.length-1;n>=0;n--)if(s[n].enabled){li(s,s[n]);break}return(t=g.call(this,s)||this).changing_=!1,t}ae(a,g);var o=a.prototype;return o.addTrack=function(t){var n=this;t.enabled&&li(this,t),g.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,li(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},o.removeTrack=function(t){g.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},a}(Ls),Eo=function(a,o){for(var s=0;s<a.length;s++)!Object.keys(a[s]).length||o.id===a[s].id||(a[s].selected=!1)},nv=function(g){function a(s){var t;void 0===s&&(s=[]);for(var n=s.length-1;n>=0;n--)if(s[n].selected){Eo(s,s[n]);break}return(t=g.call(this,s)||this).changing_=!1,Object.defineProperty(Pe(t),"selectedIndex",{get:function(){for(var m=0;m<this.length;m++)if(this[m].selected)return m;return-1},set:function(){}}),t}ae(a,g);var o=a.prototype;return o.addTrack=function(t){var n=this;t.selected&&Eo(this,t),g.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,Eo(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},o.removeTrack=function(t){g.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},a}(Ls),Ds=function(g){function a(){return g.apply(this,arguments)||this}ae(a,g);var o=a.prototype;return o.addTrack=function(t){var n=this;g.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return n.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return n.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_),-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},o.removeTrack=function(t){g.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},a}(Ls),av=function(){function g(o){void 0===o&&(o=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var s=0,t=o.length;s<t;s++)this.addTrackElement_(o[s])}var a=g.prototype;return a.addTrackElement_=function(s){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}
27),-1===this.trackElements_.indexOf(s)&&this.trackElements_.push(s)},a.getTrackElementByTrack_=function(s){for(var t,n=0,d=this.trackElements_.length;n<d;n++)if(s===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},a.removeTrackElement_=function(s){for(var t=0,n=this.trackElements_.length;t<n;t++)if(s===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},g}(),hd=function(){function g(o){g.prototype.setCues_.call(this,o),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var a=g.prototype;return a.setCues_=function(s){var t=this.length||0,n=0,d=s.length;this.cues_=s,this.length_=s.length;var m=function(S){""+S in this||Object.defineProperty(this,""+S,{get:function(){return this.cues_[S]}})};if(t<d)for(n=t;n<d;n++)m.call(this,n)},a.getCueById=function(s){for(var t=null,n=0,d=this.length;n<d;n++){var m=this[n];if(m.id===s){t=m;break}}return t},g}(),sv={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},ov={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},uv={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},sc={disabled:"disabled",hidden:"hidden",showing:"showing"},Sa=function(g){function a(o){var s;void 0===o&&(o={}),s=g.call(this)||this;var t={id:o.id||"vjs_track_"+Hn(),kind:o.kind||"",language:o.language||""},n=o.label||"",d=function(S){Object.defineProperty(Pe(s),S,{get:function(){return t[S]},set:function(){}})};for(var m in t)d(m);return Object.defineProperty(Pe(s),"label",{get:function(){return n},set:function(S){S!==n&&(n=S,this.trigger("labelchange"))}}),s}return ae(a,g),a}(ui),So=function(a){var o=["protocol","hostname","port","pathname","search","hash","host"],s=me().createElement("a");s.href=a;for(var t={},n=0;n<o.length;n++)t[o[n]]=s[o[n]];return"http:"===t.protocol&&(t.host=t.host.replace(/:80$/,"")),"https:"===t.protocol&&(t.host=t.host.replace(/:443$/,"")),t.protocol||(t.protocol=A().location.protocol),t.host||(t.host=A().location.host),t},vd=function(a){if(!a.match(/^https?:\/\//)){var o=me().createElement("a");o.href=a,a=o.href}return a},Ps=function(a){if("string"==typeof a){var s=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(a);if(s)return s.pop().toLowerCase()}return""},Fi=function(a,o){void 0===o&&(o=A().location);var s=So(a);return(":"===s.protocol?o.protocol:s.protocol)+s.host!==o.protocol+o.host},lv=Object.freeze({__proto__:null,parseUrl:So,getAbsoluteURL:vd,getFileExtension:Ps,isCrossOrigin:Fi}),pd=function(a,o){var s=new(A().WebVTT.Parser)(A(),A().vttjs,A().WebVTT.StringDecoder()),t=[];s.oncue=function(n){o.addCue(n)},s.onparsingerror=function(n){t.push(n)},s.onflush=function(){o.trigger({type:"loadeddata",target:o})},s.parse(a),t.length>0&&(A().console&&A().console.groupCollapsed&&A().console.groupCollapsed("Text Track parsing errors for "+o.src),t.forEach(function(n){return Qt.error(n)}),A().console&&A().console.groupEnd&&A().console.groupEnd()),s.flush()},gd=function(a,o){var s={uri:a},t=Fi(a);t&&(s.cors=t);var n="use-credentials"===o.tech_.crossOrigin();n&&(s.withCredentials=n),ct()(s,yr(this,function(d,m,_){if(d)return Qt.error(d,m);o.loaded_=!0,"function"!=typeof A().WebVTT?o.tech_&&o.tech_.any(["vttjsloaded","vttjserror"],function(S){if("vttjserror"!==S.type)return pd(_,o);Qt.error("vttjs failed to load, stopping trying to process "+o.src)}):pd(_,o)}))},bo=function(g){function a(s){var t;if(void 0===s&&(s={}),!s.tech)throw new Error("A tech was not provided.");var n=Dr(s,{kind:uv[s.kind]||"subtitles",language:s.language||s.srclang||""}),d=sc[n.mode]||"disabled",m=n.default;("metadata"===n.kind||"chapters"===n.kind)&&(d="hidden"),(t=g.call(this,n)||this).tech_=n.tech,t.cues_=[],t.activeCues_=[],t.preload_=!1!==t.tech_.preloadTextTracks;var _=new hd(t.cues_),S=new hd(t.activeCues_),L=!1;return t.timeupdateHandler=yr(Pe(t),function(F){if(void 0===F&&(F={}),!this.tech_.isDisposed()){if(!this.tech_.isReady_)return void("timeupdate"!==F.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)));this.activeCues=this.activeCues,L&&(this.trigger("cuechange"),L=!1),"timeupdate"!==F.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}}),t.tech_.one("dispose",function(){t.stopTracking()}),"disabled"!==d&&t.startTracking(),Object.defineProperties(Pe(t),{default:{get:function(){return m},set:function(){}},mode:{get:function(){return d}
27,set:function(q){sc[q]&&d!==q&&(d=q,!this.preload_&&"disabled"!==d&&0===this.cues.length&&gd(this.src,this),this.stopTracking(),"disabled"!==d&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?_:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return S;for(var q=this.tech_.currentTime(),Z=[],ne=0,re=this.cues.length;ne<re;ne++){var De=this.cues[ne];(De.startTime<=q&&De.endTime>=q||De.startTime===De.endTime&&De.startTime<=q&&De.startTime+.5>=q)&&Z.push(De)}if(L=!1,Z.length!==this.activeCues_.length)L=!0;else for(var Ye=0;Ye<Z.length;Ye++)-1===this.activeCues_.indexOf(Z[Ye])&&(L=!0);return this.activeCues_=Z,S.setCues_(this.activeCues_),S},set:function(){}}}),n.src?(t.src=n.src,t.preload_||(t.loaded_=!0),(t.preload_||"subtitles"!==n.kind&&"captions"!==n.kind)&&gd(t.src,Pe(t))):t.loaded_=!0,t}ae(a,g);var o=a.prototype;return o.startTracking=function(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)},o.stopTracking=function(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)},o.addCue=function(t){var n=t;if(!("getCueAsHTML"in n)){for(var d in n=new(A().vttjs.VTTCue)(t.startTime,t.endTime,t.text),t)d in n||(n[d]=t[d]);n.id=t.id,n.originalCue_=t}for(var m=this.tech_.textTracks(),_=0;_<m.length;_++)m[_]!==this&&m[_].removeCue(n);this.cues_.push(n),this.cues.setCues_(this.cues_)},o.removeCue=function(t){for(var n=this.cues_.length;n--;){var d=this.cues_[n];if(d===t||d.originalCue_&&d.originalCue_===t){this.cues_.splice(n,1),this.cues.setCues_(this.cues_);break}}},a}(Sa);bo.prototype.allowedEvents_={cuechange:"cuechange"};var xo=function(g){function a(o){var s;void 0===o&&(o={});var t=Dr(o,{kind:ov[o.kind]||""});s=g.call(this,t)||this;var n=!1;return Object.defineProperty(Pe(s),"enabled",{get:function(){return n},set:function(m){"boolean"!=typeof m||m===n||(n=m,this.trigger("enabledchange"))}}),t.enabled&&(s.enabled=t.enabled),s.loaded_=!0,s}return ae(a,g),a}(Sa),oc=function(g){function a(o){var s;void 0===o&&(o={});var t=Dr(o,{kind:sv[o.kind]||""});s=g.call(this,t)||this;var n=!1;return Object.defineProperty(Pe(s),"selected",{get:function(){return n},set:function(m){"boolean"!=typeof m||m===n||(n=m,this.trigger("selectedchange"))}}),t.selected&&(s.selected=t.selected),s}return ae(a,g),a}(Sa),md=0,Ao=2,ks=function(g){function a(o){var s;void 0===o&&(o={}),s=g.call(this)||this;var t,n=new bo(o);return s.kind=n.kind,s.src=n.src,s.srclang=n.language,s.label=n.label,s.default=n.default,Object.defineProperties(Pe(s),{readyState:{get:function(){return t}},track:{get:function(){return n}}}),t=md,n.addEventListener("loadeddata",function(){t=Ao,s.trigger({type:"load",target:Pe(s)})}),s}return ae(a,g),a}(ui);ks.prototype.allowedEvents_={load:"load"},ks.NONE=md,ks.LOADING=1,ks.LOADED=Ao,ks.ERROR=3;var Ji={audio:{ListClass:ac,TrackClass:xo,capitalName:"Audio"},video:{ListClass:nv,TrackClass:oc,capitalName:"Video"},text:{ListClass:Ds,TrackClass:bo,capitalName:"Text"}};Object.keys(Ji).forEach(function(g){Ji[g].getterName=g+"Tracks",Ji[g].privateName=g+"Tracks_"});var yn={remoteText:{ListClass:Ds,TrackClass:bo,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:av,TrackClass:ks,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},qi=be({},Ji,yn);yn.names=Object.keys(yn),Ji.names=Object.keys(Ji),qi.names=[].concat(yn.names).concat(Ji.names);var hr=function(g){function a(s,t){var n;return void 0===s&&(s={}),void 0===t&&(t=function(){}),s.reportTouchActivity=!1,(n=g.call(this,null,s,t)||this).onDurationChange_=function(d){return n.onDurationChange(d)},n.trackProgress_=function(d){return n.trackProgress(d)},n.trackCurrentTime_=function(d){return n.trackCurrentTime(d)},n.stopTrackingCurrentTime_=function(d){return n.stopTrackingCurrentTime(d)},n.disposeSourceHandler_=function(d){return n.disposeSourceHandler(d)},n.queuedHanders_=new Set,n.hasStarted_=!1,n.on("playing",function(){this.hasStarted_=!0}),n.on("loadstart",function(){this.hasStarted_=!1}
27),qi.names.forEach(function(d){var m=qi[d];s&&s[m.getterName]&&(n[m.privateName]=s[m.getterName])}),n.featuresProgressEvents||n.manualProgressOn(),n.featuresTimeupdateEvents||n.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(d){!1===s["native"+d+"Tracks"]&&(n["featuresNative"+d+"Tracks"]=!1)}),!1===s.nativeCaptions||!1===s.nativeTextTracks?n.featuresNativeTextTracks=!1:(!0===s.nativeCaptions||!0===s.nativeTextTracks)&&(n.featuresNativeTextTracks=!0),n.featuresNativeTextTracks||n.emulateTextTracks(),n.preloadTextTracks=!1!==s.preloadTextTracks,n.autoRemoteTextTracks_=new qi.text.ListClass,n.initTrackListeners(),s.nativeControlsForTouch||n.emitTapEvents(),n.constructor&&(n.name_=n.constructor.name||"Unknown Tech"),n}ae(a,g);var o=a.prototype;return o.triggerSourceset=function(t){var n=this;this.isReady_||this.one("ready",function(){return n.setTimeout(function(){return n.triggerSourceset(t)},1)}),this.trigger({src:t,type:"sourceset"})},o.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},o.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},o.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(yr(this,function(){var n=this.bufferedPercent();this.bufferedPercent_!==n&&this.trigger("progress"),this.bufferedPercent_=n,1===n&&this.stopTrackingProgress()}),500)},o.onDurationChange=function(t){this.duration_=this.duration()},o.buffered=function(){return _a(0,0)},o.bufferedPercent=function(){return Cs(this.buffered(),this.duration_)},o.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},o.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},o.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},o.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},o.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},o.dispose=function(){this.clearTracks(Ji.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),g.prototype.dispose.call(this)},o.clearTracks=function(t){var n=this;(t=[].concat(t)).forEach(function(d){for(var m=n[d+"Tracks"]()||[],_=m.length;_--;){var S=m[_];"text"===d&&n.removeRemoteTextTrack(S),m.removeTrack(S)}})},o.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],n=t.length;n--;)this.removeRemoteTextTrack(t[n])},o.reset=function(){},o.crossOrigin=function(){},o.setCrossOrigin=function(){},o.error=function(t){return void 0!==t&&(this.error_=new ji(t),this.trigger("error")),this.error_},o.played=function(){return this.hasStarted_?_a(0,0):_a()},o.play=function(){},o.setScrubbing=function(){},o.scrubbing=function(){},o.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},o.initTrackListeners=function(){var t=this;Ji.names.forEach(function(n){var m=function(){t.trigger(n+"trackchange")},_=t[Ji[n].getterName]();_.addEventListener("removetrack",m),_.addEventListener("addtrack",m),t.on("dispose",function(){_.removeEventListener("removetrack",m),_.removeEventListener("addtrack",m)})})},o.addWebVttScript_=function(){var t=this;if(!A().WebVTT)if(me().body.contains(this.el())){if(!this.options_["vtt.js"]&&ga(sr())&&Object.keys(sr()).length>0)return void this.trigger("vttjsloaded");var n=me().createElement("script");n.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",n.onload=function(){t.trigger("vttjsloaded")},n.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){n.onload=null,n.onerror=null}),A().WebVTT=!0,this.el().parentNode.appendChild(n)}else this.ready(this.addWebVttScript_)},o.emulateTextTracks=function(){var t=this,n=this.textTracks(),d=this.remoteTextTracks(),m=function(F){return n.addTrack(F.track)},_=function(F){return n.removeTrack(F.track)};d.on("addtrack",m),d.on("removetrack",_),this.addWebVttScript_();var S=function(){return t.trigger("texttrackchange")},L=function(){S();for(var F=0;F<n.length;F++){var q=n[F];q.removeEventListener("cuechange",S),"showing"===q.mode&&q.addEventListener("cuechange",S)}};L(),n.addEventListener("change",L),n.addEventListener("addtrack",L),n.addEventListener("removetrack",L),this.on("dispose",function(){d.off("addtrack",m),d.off("removetrack",_),n.removeEventListener("change",L),n.removeEventListener("addtrack",L),n.removeEventListener("removetrack",L);for(var B=0;B<n.length;B++)n[B].removeEventListener("cuechange",S)})},o.addTextTrack=function(t,n,d){if(!t)throw new Error("TextTrack kind is required but was not provided");return function dv(g,a,o,s,t){void 0===t&&(t={});var n=g.textTracks();t.kind=a,o&&(t.label=o),s&&(t.language=s),t.tech=g;var d=new qi.text.TrackClass(t);return n.addTrack(d),d}(this,t,n,d)},o.createRemoteTextTrack=function(t){var n=Dr(t,{tech:this});return new yn.remoteTextEl.TrackClass(n)},o.addRemoteTextTrack=function(t,n){var d=this;void 0===t&&(t={});var m=this.createRemoteTextTrack(t);return!0!==n&&!1!==n&&(Qt.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(m),this.remoteTextTracks().addTrack(m.track),!0!==n&&this.ready(function(){return d.autoRemoteTextTracks_.addTrack(m.track)}),m},o.removeRemoteTextTrack=function(t){var n=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(n),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},o.getVideoPlaybackQuality=function(){return{}},o.requestPictureInPicture=function(){var t=this.options_.Promise||A().Promise;if(t)return t.reject()},o.disablePictureInPicture=function(){return!0},o.setDisablePictureInPicture=function(){},o.requestVideoFrameCallback=function(t){var n=this,d=Hn();return!this.isReady_||this.paused()?(this.queuedHanders_.add(d),this.one("playing",function(){n.queuedHanders_.has(d)&&(n.queuedHanders_.delete(d),t())})):this.requestNamedAnimationFrame(d,t),d},o.cancelVideoFrameCallback=function(t){this.queuedHanders_.has(t)?this.queuedHanders_.delete(t):this.cancelNamedAnimationFrame(t)},o.setPoster=function(){},o.playsinline=function(){},o.setPlaysinline=function(){},o.overrideNativeAudioTracks=function(){},o.overrideNativeVideoTracks=function(){},o.canPlayType=function(){return""},a.canPlayType=function(){return""},a.canPlaySource=function(t,n){return a.canPlayType(t.type)},a.isTech=function(t){return t.prototype instanceof a||t instanceof a||t===a},a.registerTech=function(t,n){if(a.techs_||(a.techs_={}),!a.isTech(n))throw new Error("Tech "+t+" must be a Tech");if(!a.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!a.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=ei(t),a.techs_[t]=n,a.techs_[yo(t)]=n,"Tech"!==t&&a.defaultTechOrder_.push(t),n},a.getTech=function(t){if(t){if(a.techs_&&a.techs_[t])return a.techs_[t];if(t=ei(t),A()&&A().videojs&&A().videojs[t])return Qt.warn("The "+t+" tech w
27as added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),A().videojs[t]}},a}(et);qi.names.forEach(function(g){var a=qi[g];hr.prototype[a.getterName]=function(){return this[a.privateName]=this[a.privateName]||new a.ListClass,this[a.privateName]}}),hr.prototype.featuresVolumeControl=!0,hr.prototype.featuresMuteControl=!0,hr.prototype.featuresFullscreenResize=!1,hr.prototype.featuresPlaybackRate=!1,hr.prototype.featuresProgressEvents=!1,hr.prototype.featuresSourceset=!1,hr.prototype.featuresTimeupdateEvents=!1,hr.prototype.featuresNativeTextTracks=!1,hr.prototype.featuresVideoFrameCallback=!1,hr.withSourceHandlers=function(g){g.registerSourceHandler=function(o,s){var t=g.sourceHandlers;t||(t=g.sourceHandlers=[]),void 0===s&&(s=t.length),t.splice(s,0,o)},g.canPlayType=function(o){for(var t,s=g.sourceHandlers||[],n=0;n<s.length;n++)if(t=s[n].canPlayType(o))return t;return""},g.selectSourceHandler=function(o,s){for(var t=g.sourceHandlers||[],d=0;d<t.length;d++)if(t[d].canHandleSource(o,s))return t[d];return null},g.canPlaySource=function(o,s){var t=g.selectSourceHandler(o,s);return t?t.canHandleSource(o,s):""},["seekable","seeking","duration"].forEach(function(o){var s=this[o];"function"==typeof s&&(this[o]=function(){return this.sourceHandler_&&this.sourceHandler_[o]?this.sourceHandler_[o].apply(this.sourceHandler_,arguments):s.apply(this,arguments)})},g.prototype),g.prototype.setSource=function(o){var s=g.selectSourceHandler(o,this.options_);s||(g.nativeSourceHandler?s=g.nativeSourceHandler:Qt.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),s!==g.nativeSourceHandler&&(this.currentSource_=o),this.sourceHandler_=s.handleSource(o,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},g.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},et.registerComponent("Tech",hr),hr.registerTech("Tech",hr),hr.defaultTechOrder_=[];var Ha={},Co={},Io={};function Rs(g,a,o){g.setTimeout(function(){return Ka(a,Ha[a.type],o,g)},1)}function Ga(g,a,o,s){void 0===s&&(s=null);var t="call"+ei(o),n=g.reduce(Td(t),s),d=n===Io,m=d?null:a[o](n);return function dc(g,a,o,s){for(var t=g.length-1;t>=0;t--){var n=g[t];n[a]&&n[a](s,o)}}(g,o,m,d),m}var hv={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},vv={setCurrentTime:1,setMuted:1,setVolume:1},lc={play:1,pause:1};function Td(g){return function(a,o){return a===Io?Io:o[g]?o[g](a):a}}function Ka(g,a,o,s,t,n){void 0===g&&(g={}),void 0===a&&(a=[]),void 0===t&&(t=[]),void 0===n&&(n=!1);var m=a[0],_=a.slice(1);if("string"==typeof m)Ka(g,Ha[m],o,s,t,n);else if(m){var S=function cc(g,a){var o=Co[g.id()],s=null;if(null==o)return s=a(g),Co[g.id()]=[[a,s]],s;for(var t=0;t<o.length;t++){var n=o[t];n[0]===a&&(s=n[1])}return null===s&&(s=a(g),o.push([a,s])),s}(s,m);if(!S.setSource)return t.push(S),Ka(g,_,o,s,t,n);S.setSource(Ur({},g),function(L,B){if(L)return Ka(g,_,o,s,t,n);t.push(S),Ka(B,g.type===B.type?_:Ha[B.type],o,s,t,n)})}else _.length?Ka(g,_,o,s,t,n):n?o(g,t):Ka(g,Ha["*"],o,s,t,!0)}var _d={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Do=function(a){void 0===a&&(a="");var o=Ps(a);return _d[o.toLowerCase()]||""},Ed=function g(a){if(Array.isArray(a)){var o=[];a.forEach(function(s){s=g(s),Array.isArray(s)?o=o.concat(s):Zi(s)&&o.push(s)}),a=o}else a="string"==typeof a&&a.trim()?[hc({src:a})]:Zi(a)&&"string"==typeof a.src&&a.src&&a.src.trim()?[hc(a)]:[];return a};function hc(g){if(!g.type){var a=Do(g.src);a&&(g.type=a)}return g}var pv=function(g){function a(o,s,t){var n,d=Dr({createEl:!1},s);if(n=g.call(this,o,d,t)||this,s.playerOptions.sources&&0!==s.playerOptions.sources.length)o.src(s.playerOptions.sources);else for(var m=0,_=s.playerOptions.techOrder;m<_.length;m++){var S=ei(_[m]),L=hr.getTech(S);if(S||(L=et.getComponent(S)),L&&L.isSupported()){o.loadTech_(S);break}}return n}return ae(a,g),a}(et);et.registerComponent("MediaLoader",pv);var ko=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).options_.controlText&&n.controlText(n.options_.controlText),n.handleMouseOver_=function(d){return n.handleMouseOver(d)},n.handleMouseOut_=function(d){return n.handleMouseOut(d)},n.handleClick_=function(d){return n.handleClick(d)},n.handleKeyDown_=function(d){return n.handleKeyDown(d)},n.emitTapEvents(),n.enable(),n}ae(a,g);var o=a.prototype;return o.createEl=function(t,n,d){void 0===t&&(t="div"),void 0===n&&(n={}),void 0===d&&(d={}),n=Ur({className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&Qt.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),d=Ur({role:"button"},d),this.tabIndex_=n.tabIndex;var m=ur(t,n,d);return m.appendChild(ur("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(m),m},o.dispose=function(){this.controlTextEl_=null,g.prototype.dispose.call(this)},o.createControlTextEl=function(t){return this.controlTextEl_=ur("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},o.controlText=function(t,n){if(void 0===n&&(n=this.el()),void 0===t)return this.controlText_||"Need Text";var d=this.localize(t);this.controlText_=t,ya(this.controlTextEl_,d),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&n.setAttribute("title",d)},o.buildCSSClass=function(){return"vjs-control vjs-button "+g.prototype.buildCSSClass.call(this)},o.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))},o.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)},o.handleLanguagechange=function(){this.controlText(this.controlText_)},o.handleClick=function(t){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},o.handleKeyDown=function(t){xe().isEventKey(t,"Space")||xe().isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):g.prototype.handleKeyDown.call(this,t)},a}(et);et.registerComponent("ClickableComponent",ko);var vc=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).update(),n.update_=function(d){return n.update(d)},s.on("posterchange",n.update_),n}ae(a,g);var o=a.prototype;return o.dispose=function(){this.player().off("posterchange",this.update_),g.prototype.dispose.call(this)},o.createEl=function(){return ur("div",{className:"vjs-poster",tabIndex:-1})},o.update=function(t){var n=this.player().poster();this.setSrc(n),n?this.show():this.hide()},o.setSrc=function(t){var n="";t&&(n='url("'+t+'")'),this.el_.style.backgroundImage=n},o.handleClick=function(t){if(this.player_.controls()){var n=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;
vendor: 32,999 bytes, line 27
27this.player_.tech(!0)&&!((ys||oo)&&n)&&this.player_.tech(!0).focus(),this.player_.paused()?Kn(this.player_.play()):this.player_.pause()}},a}(ko);et.registerComponent("PosterImage",vc);var Tn="#222",gc={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Sd(g,a){var o;if(4===g.length)o=g[1]+g[1]+g[2]+g[2]+g[3]+g[3];else{if(7!==g.length)throw new Error("Invalid color code provided, "+g+"; must be formatted as e.g. #f0e or #f604e2.");o=g.slice(1)}return"rgba("+parseInt(o.slice(0,2),16)+","+parseInt(o.slice(2,4),16)+","+parseInt(o.slice(4,6),16)+","+a+")"}function Ro(g,a,o){try{g.style[a]=o}catch(s){return}}var gv=function(g){function a(s,t,n){var d;d=g.call(this,s,t,n)||this;var m=function(S){return d.updateDisplay(S)};return s.on("loadstart",function(_){return d.toggleDisplay(_)}),s.on("texttrackchange",m),s.on("loadedmetadata",function(_){return d.preselectTrack(_)}),s.ready(yr(Pe(d),function(){if(s.tech_&&s.tech_.featuresNativeTextTracks)this.hide();else{s.on("fullscreenchange",m),s.on("playerresize",m),A().addEventListener("orientationchange",m),s.on("dispose",function(){return A().removeEventListener("orientationchange",m)});for(var _=this.options_.playerOptions.tracks||[],S=0;S<_.length;S++)this.player_.addRemoteTextTrack(_[S],!0);this.preselectTrack()}})),d}ae(a,g);var o=a.prototype;return o.preselectTrack=function(){for(var m,_,S,t={captions:1,subtitles:1},n=this.player_.textTracks(),d=this.player_.cache_.selectedLanguage,L=0;L<n.length;L++){var B=n[L];d&&d.enabled&&d.language&&d.language===B.language&&B.kind in t?B.kind===d.kind?S=B:S||(S=B):d&&!d.enabled?(S=null,m=null,_=null):B.default&&("descriptions"!==B.kind||m?B.kind in t&&!_&&(_=B):m=B)}S?S.mode="showing":_?_.mode="showing":m&&(m.mode="showing")},o.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},o.createEl=function(){return g.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})},o.clearDisplay=function(){"function"==typeof A().WebVTT&&A().WebVTT.processCues(A(),[],this.el_)},o.updateDisplay=function(){var t=this.player_.textTracks(),n=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),n){for(var d=[],m=0;m<t.length;++m){var _=t[m];"showing"===_.mode&&d.push(_)}this.updateForTrack(d)}else{for(var S=null,L=null,B=t.length;B--;){var F=t[B];"showing"===F.mode&&("descriptions"===F.kind?S=F:L=F)}L?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(L)):S&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(S))}},o.updateDisplayState=function(t){for(var n=this.player_.textTrackSettings.getValues(),d=t.activeCues,m=d.length;m--;){var _=d[m];if(_){var S=_.displayState;if(n.color&&(S.firstChild.style.color=n.color),n.textOpacity&&Ro(S.firstChild,"color",Sd(n.color||"#fff",n.textOpacity)),n.backgroundColor&&(S.firstChild.style.backgroundColor=n.backgroundColor),n.backgroundOpacity&&Ro(S.firstChild,"backgroundColor",Sd(n.backgroundColor||"#000",n.backgroundOpacity)),n.windowColor&&(n.windowOpacity?Ro(S,"backgroundColor",Sd(n.windowColor,n.windowOpacity)):S.style.backgroundColor=n.windowColor),n.edgeStyle&&("dropshadow"===n.edgeStyle?S.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+Tn:"raised"===n.edgeStyle?S.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+Tn:"depressed"===n.edgeStyle?S.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+Tn:"uniform"===n.edgeStyle&&(S.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+Tn)),n.fontPercent&&1!==n.fontPercent){var L=A().parseFloat(S.style.fontSize);S.style.fontSize=L*n.fontPercent+"px",S.style.height="auto",S.style.top="auto"}n.fontFamily&&"default"!==n.fontFamily&&("small-caps"===n.fontFamily?S.firstChild.style.fontVariant="small-caps":S.firstChild.style.fontFamily=gc[n.fontFamily])}}},o.updateForTrack=function(t){if(Array.isArray(t)||(t=[t]),"function"==typeof A().WebVTT&&!t.every(function(q){return!q.activeCues})){for(var n=[],d=0;d<t.length;++d)for(var m=t[d],_=0;_<m.activeCues.length;++_)n.push(m.activeCues[_]);A().WebVTT.processCues(A(),n,this.el_);for(var S=0;S<t.length;++S){for(var L=t[S],B=0;B<L.activeCues.length;++B){var F=L.activeCues[B].displayState;Vn(F,"vjs-text-track-cue"),Vn(F,"vjs-text-track-cue-"+(L.language?L.language:S)),L.language&&Ua(F,"lang",L.language)}this.player_.textTrackSettings&&this.updateDisplayState(L)}}},a}(et);et.registerComponent("TextTrackDisplay",gv);var mv=function(g){function a(){return g.apply(this,arguments)||this}return ae(a,g),a.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),d=ur("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[n])}),m=g.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return m.appendChild(d),m},a}(et);et.registerComponent("LoadingSpinner",mv);var kr=function(g){function a(){return g.apply(this,arguments)||this}ae(a,g);var o=a.prototype;return o.createEl=function(t,n,d){void 0===n&&(n={}),void 0===d&&(d={});var m=ur("button",n=Ur({className:this.buildCSSClass()},n),d=Ur({type:"button"},d));return m.appendChild(ur("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(m),m},o.addChild=function(t,n){return void 0===n&&(n={}),Qt.warn("Adding an actionable (user controllable) child to a Button ("+this.constructor.name+") is not supported; use a ClickableComponent instead."),et.prototype.addChild.call(this,t,n)},o.enable=function(){g.prototype.enable.call(this),this.el_.removeAttribute("disabled")},o.disable=function(){g.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},o.handleKeyDown=function(t){xe().isEventKey(t,"Space")||xe().isEventKey(t,"Enter")?t.stopPropagation():g.prototype.handleKeyDown.call(this,t)},a}(ko);et.registerComponent("Button",kr);var mc=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).mouseused_=!1,n.on("mousedown",function(d){return n.handleMouseDown(d)}),n}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-big-play-button"},o.handleClick=function(t){var n=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY){var d=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return Kn(n),void(this.player_.tech(!0)&&(!ys&&!oo||!d)&&this.player_.tech(!0).focus())}var m=this.player_.getChild("controlBar"),_=m&&m.getChild("playToggle");if(_){var S=function(){return _.focus()};jr(n)?n.then(S,function(){}):this.setTimeout(S,1)}else this.player_.tech(!0).focus()},o.handleKeyDown=function(t){this.mouseused_=!1,g.prototype.handleKeyDown.call(this,t)},o.handleMouseDown=function(t){this.mouseused_=!0},a}(kr);mc.prototype.controlText_="Play Video",et.registerComponent("BigPlayButton",mc);var yv=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).controlText(t&&t.controlText||n.localize("Close")),n}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-close-button "+g.prototype.buildCSSClass.call(this)},o.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},o.handleKeyDown=function(t){xe().isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):g.prototype.handleKeyDown.call(this,t)},a}(kr);et.registerComponent("CloseButton",yv);var ba=function(g){function a(s,t){var n;return void 0===t&&(t={}),n=g.call(this,s,t)||this,t.replay=void 0===t.replay||t.replay,n.on(s,"play",function(d){return n.handlePlay(d)}),n.on(s,"pause",function(d){return n.handlePause(d)}),t.replay&&n.on(s,"ended",function(d){return n.handleEnded(d)}),n}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-play-control "+g.prototype.buildCSSClass.call(this)},o.handleClick=function(t){this.player_.paused()?Kn(this.player_.play()):this.player_.pause()},o.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},o.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},o.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},o.handleEnded=function(t){var n=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",function(d){return n.handleSeeked(d)})},a}(kr);ba.prototype.controlText_="Play",et.registerComponent("PlayToggle",ba);var yc=function(a,o){a=a<0?0:a;var s=Math.floor(a%60),t=Math.floor(a/60%60),n=Math.floor(a/3600),d=Math.floor(o/60%60),m=Math.floor(o/3600);return(isNaN(a)||a===1/0)&&(n=t=s="-"),(n=n>0||m>0?n+":":"")+(t=((n||d>=10)&&t<10?"0"+t:t)+":")+(s<10?"0"+s:s)},bd=yc;function ja(g,a){return void 0===a&&(a=g),bd(g,a)}var qa=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).on(s,["timeupdate","ended"],function(d){return n.updateContent(d)}),n.updateTextNode_(),n}ae(a,g);var o=a.prototype;return o.createEl=function(){var t=this.buildCSSClass(),n=g.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control"}),d=ur("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+"\xa0"},{role:"presentation"});return n.appendChild(d),this.contentEl_=ur("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},o.dispose=function(){this.contentEl_=null,this.textNode_=null,g.prototype.dispose.call(this)},o.updateTextNode_=function(t){var n=this;void 0===t&&(t=0),t=ja(t),this.formattedTime_!==t&&(this.formattedTime_=t,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){if(n.contentEl_){var d=n.textNode_;d&&n.contentEl_.firstChild!==d&&(d=null,Qt.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),n.textNode_=me().createTextNode(n.formattedTime_),n.textNode_&&(d?n.contentEl_.replaceChild(n.textNode_,d):n.contentEl_.appendChild(n.textNode_))}}))},o.updateContent=function(t){},a}(et);qa.prototype.labelText_="Time",qa.prototype.controlText_="Time",et.registerComponent("TimeDisplay",qa);var xd=function(g){function a(){return g.apply(this,arguments)||this}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-current-time"},o.updateContent=function(t){var n;n=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(n)},a}(qa);xd.prototype.labelText_="Current Time",xd.prototype.controlText_="Current Time",et.registerComponent("CurrentTimeDisplay",xd);var Ad=function(g){function a(s,t){var n,d=function(_){return n.updateContent(_)};return(n=g.call(this,s,t)||this).on(s,"durationchange",d),n.on(s,"loadstart",d),n.on(s,"loadedmetadata",d),n}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-duration"},o.updateContent=function(t){var n=this.player_.duration();this.updateTextNode_(n)},a}(qa);Ad.prototype.labelText_="Duration",Ad.prototype.controlText_="Duration",et.registerComponent("DurationDisplay",Ad);var _v=function(g){function a(){return g.apply(this,arguments)||this}return ae(a,g),a.prototype.createEl=function(){var t=g.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),n=g.prototype.createEl.call(this,"div"),d=g.prototype.createEl.call(this,"span",{textContent:"/"});return n.appendChild(d),t.appendChild(n),t},a}(et);et.registerComponent("TimeDivider",_v);var Cd=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).on(s,"durationchange",function(d){return n.updateContent(d)}),n}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-remaining-time"},o.createEl=function(){var t=g.prototype.createEl.call(this);return!1!==this.options_.displayNegative&&t.insertBefore(ur("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},o.updateContent=function(t){var n;"number"==typeof this.player_.duration()&&(n=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(n))},a}(qa);Cd.prototype.labelText_="Remaining Time",Cd.prototype.controlText_="Remaining Time",et.registerComponent("RemainingTimeDisplay",Cd);var Ev=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).updateShowing(),n.on(n.player(),"durationchange",function(d){return n.updateShowing(d)}),n}ae(a,g);var o=a.prototype;return o.createEl=function(){var t=g.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=ur("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(ur("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+"\xa0"})),this.contentEl_.appendChild(me().createTextNode(this.localize("LIVE"))),t.appendChild(this.contentEl_),t},o.dispose=function(){this.contentEl_=null,g.prototype.dispose.call(this)},o.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},a}(et);et.registerComponent("LiveDisplay",Ev);var Tc=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).updateLiveEdgeStatus(),n.player_.liveTracker&&(n.updateLiveEdgeStatusHandler_=function(d){return n.updateLiveEdgeStatus(d)},n.on(n.player_.liveTracker,"liveedgechange",n.updateLiveEdgeStatusHandler_)),n}ae(a,g);var o=a.prototype;return o.createEl=function(){var t=g.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=ur("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},o.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},o.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},o.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,g.prototype.dispose.call(this)},a}(kr);Tc.prototype.controlText_="Seek to live, currently playing live",et.registerComponent("SeekToLive",Tc);var Vu=function(a,o,s){return a=Number(a),Math.min(s,Math.max(o,isNaN(a)?o:a))},Hu=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).handleMouseDown_=function(d){return n.handleMouseDown(d)},n.handleMouseUp_=function(d){return n.handleMouseUp(d)},n.handleKeyDown_=function(d){return n.handleKeyDown(d)},n.handleClick_=function(d){return n.handleClick(d)},n.handleMouseMove_=function(d){return n.handleMouseMove(d)},n.update_=function(d){return n.update(d)},n.bar=n.getChild(n.options_.barName),n.vertical(!!n.options_.vertical),n.enable(),n}ae(a,g);var o=a.prototype;return o.enabled=function(){return this.enabled_},o.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},o.disable=function(){if(this.enabled()){var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},o.createEl=function(t,n,d){return void 0===n&&(n={}),void 0===d&&(d={}),n.className=n.className+" vjs-slider",n=Ur({tabIndex:0},n),d=Ur({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},d),g.prototype.createEl.call(this,t,n,d)},o.handleMouseDown=function(t){var n=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"===t.type&&!Un&&t.preventDefault(),zf(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(n,"mousemove",this.handleMouseMove_),this.on(n,"mouseup",this.handleMouseUp_),this.on(n,"touchmove",this.handleMouseMove_),this.on(n,"touchend",this.handleMouseUp_),this.handleMouseMove(t,!0)},o.handleMouseMove=function(t){},o.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;id(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.update()},o.update=function(){var t=this;if(this.el_&&this.bar){var n=this.getProgress();return n===this.progress_||(this.progress_=n,this.requestNamedAnimationFrame("Slider#update",function(){var d=t.vertical()?"height":"width";t.bar.el().style[d]=(100*n).toFixed(2)+"%"})),n}},o.getProgress=function(){return Number(Vu(this.getPercent(),0,1).toFixed(4))},o.calculateDistance=function(t){var n=Ii(this.el_,t);return this.vertical()?n.y:n.x},o.handleKeyDown=function(t){xe().isEventKey(t,"Left")||xe().isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):xe().isEventKey(t,"Right")||xe().isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):g.prototype.handleKeyDown.call(this,t)},o.handleClick=function(t){t.stopPropagation(),t.preventDefault()},o.vertical=function(t){if(void 0===t)return this.vertical_||!1;this.vertical_=!!t,this.addClass(this.vertical_?"vjs-slider-vertical":"vjs-slider-horizontal")},a}(et);et.registerComponent("Slider",Hu);var Id=function(a,o){return Vu(a/o*100,0,100).toFixed(2)+"%"},_c=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).partEls_=[],n.on(s,"progress",function(d){return n.update(d)}),n}ae(a,g);var o=a.prototype;return o.createEl=function(){var t=g.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=ur("span",{className:"vjs-control-text"}),d=ur("span",{textContent:this.localize("Loaded")}),m=me().createTextNode(": ");return this.percentageEl_=ur("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(d),n.appendChild(m),n.appendChild(this.percentageEl_),t},o.dispose=function(){this.partEls_=null,this.percentageEl_=null,g.prototype.dispose.call(this)},o.update=function(t){var n=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var d=n.player_.liveTracker,m=n.player_.buffered(),_=d&&d.isLive()?d.seekableEnd():n.player_.duration(),S=n.player_.bufferedEnd(),L=n.partEls_,B=Id(S,_);n.percent_!==B&&(n.el_.style.width=B,ya(n.percentageEl_,B),n.percent_=B);for(var F=0;F<m.length;F++){var q=m.start(F),Z=m.end(F),ne=L[F];ne||(ne=n.el_.appendChild(ur()),L[F]=ne),(ne.dataset.start!==q||ne.dataset.end!==Z)&&(ne.dataset.start=q,ne.dataset.end=Z,ne.style.left=Id(q,S),ne.style.width=Id(Z-q,S))}for(var re=L.length;re>m.length;re--)n.el_.removeChild(L[re-1]);L.length=m.length})},a}(et);et.registerComponent("LoadProgressBar",_c);var Sv=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).update=oa(yr(Pe(n),n.update),Cn),n}ae(a,g);var o=a.prototype;return o.createEl=function(){return g.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},o.update=function(t,n,d){var m=oi(this.el_),_=aa(this.player_.el()),S=t.width*n;if(_&&m){var L=t.left-_.left+S,B=t.width-S+(_.right-t.right),F=m.width/2;L<F?F+=F-L:B<F&&(F=B),F<0?F=0:F>m.width&&(F=m.width),F=Math.round(F),this.el_.style.right="-"+F+"px",this.write(d)}},o.write=function(t){ya(this.el_,t)},o.updateTime=function(t,n,d,m){var _=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var S,L=_.player_.duration();if(_.player_.liveTracker&&_.player_.liveTracker.isLive()){var B=_.player_.liveTracker.liveWindow(),F=B-n*B;S=(F<1?"":"-")+ja(F,B)}else S=ja(d,L);_.update(t,n,S),m&&m()})},a}(et);et.registerComponent("TimeTooltip",Sv);var Ld=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).update=oa(yr(Pe(n),n.update),Cn),n}ae(a,g);var o=a.prototype;return o.createEl=function(){return g.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},o.update=function(t,n){var d=this.getChild("timeTooltip");if(d){var m=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();d.updateTime(t,n,m)}},a}(et);Ld.prototype.options_={children:[]},!Vr&&!An&&Ld.prototype.options_.children.push("timeTooltip"),et.registerComponent("PlayProgressBar",Ld);var Ec=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).update=oa(yr(Pe(n),n.update),Cn),n}ae(a,g);var o=a.prototype;return o.createEl=function(){return g.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},o.update=function(t,n){var d=this,m=n*this.player_.duration();this.getChild("timeTooltip").updateTime(t,n,m,function(){d.el_.style.left=t.width*n+"px"})},a}(et);Ec.prototype.options_={children:["timeTooltip"]},et.registerComponent("MouseTimeDisplay",Ec);var Dd=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).setEventHandlers_(),n}ae(a,g);var o=a.prototype;return o.setEventHandlers_=function(){var t=this;this.update_=yr(this,this.update),this.update=oa(this.update_,Cn),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(n){return t.enableInterval_(n)},this.disableIntervalHandler_=function(n){return t.disableInterval_(n)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in me()&&"visibilityState"in me()&&this.on(me(),"visibilitychange",this.toggleVisibility_)},o.toggleVisibility_=function(t){"hidden"===me().visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(t)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())},o.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Cn))},o.disableInterval_=function(t){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&t&&"ended"!==t.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},o.createEl=function(){return g.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},o.update=function(t){var n=this;if("hidden"!==me().visibilityState){var d=g.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",function(){var m=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),_=n.player_.liveTracker,S=n.player_.duration();_&&_.isLive()&&(S=n.player_.liveTracker.liveCurrentTime()),n.percent_!==d&&(n.el_.setAttribute("aria-valuenow",(100*d).toFixed(2)),n.percent_=d),(n.currentTime_!==m||n.duration_!==S)&&(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[ja(m,S),ja(S,S)],"{1} of {2}")),n.currentTime_=m,n.duration_=S),n.bar&&n.bar.update(aa(n.el()),n.getProgress())}),d}},o.userSeek_=function(t){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(t)},o.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},o.getPercent=function(){var n,t=this.getCurrentTime_(),d=this.player_.liveTracker;return d&&d.isLive()?(n=(t-d.seekableStart())/d.liveWindow(),d.atLiveEdge()&&(n=1)):n=t/this.player_.duration(),n},o.handleMouseDown=function(t){fo(t)&&(t.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),g.prototype.handleMouseDown.call(this,t))},o.handleMouseMove=function(t,n){if(void 0===n&&(n=!1),fo(t)){!n&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);var d,m=this.calculateDistance(t),_=this.player_.liveTracker;if(_&&_.isLive()){if(m>=.99)return void _.seekToLiveEdge();var S=_.seekableStart(),L=_.liveCurrentTime();if((d=S+m*_.liveWindow())>=L&&(d=L),d<=S&&(d=S+.1),d===1/0)return}else(d=m*this.player_.duration())===this.player_.duration()&&(d-=.1);this.userSeek_(d)}},o.enable=function(){g.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},o.disable=function(){g.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},o.handleMouseUp=function(t){g.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Kn(this.player_.play()):this.update_()},o.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},o.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},o.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},o.handleKeyDown=function(t){var n=this.player_.liveTracker;if(xe().isEventKey(t,"Space")||xe().isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(xe().isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(xe().isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(xe()(t))){t.preventDefault(),t.stopPropagation();var d=10*(xe().codes[xe()(t)]-xe().codes[0])/100;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*d):this.userSeek_(this.player_.duration()*d)}else xe().isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):xe().isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):g.prototype.handleKeyDown.call(this,t)},o.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in me()&&"visibilityState"in me()&&this.off(me(),"visibilitychange",this.toggleVisibility_),g.prototype.dispose.call(this)},a}(Hu);Dd.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},!Vr&&!An&&Dd.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),et.registerComponent("SeekBar",Dd);var bc=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).handleMouseMove=oa(yr(Pe(n),n.handleMouseMove),Cn),n.throttledHandleMouseSeek=oa(yr(Pe(n),n.handleMouseSeek),Cn),n.handleMouseUpHandler_=function(d){return n.handleMouseUp(d)},n.handleMouseDownHandler_=function(d){return n.handleMouseDown(d)},n.enable(),n}ae(a,g);var o=a.prototype;return o.createEl=function(){return g.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},o.handleMouseMove=function(t){var n=this.getChild("seekBar");if(n){var d=n.getChild("playProgressBar"),m=n.getChild("mouseTimeDisplay");if(d||m){var _=n.el(),S=oi(_),L=Ii(_,t).x;L=Vu(L,0,1),m&&m.update(S,L),d&&d.update(S,n.getProgress())}}},o.handleMouseSeek=function(t){var n=this.getChild("seekBar");n&&n.handleMouseMove(t)},o.enabled=function(){return this.enabled_},o.disable=function(){if(this.children().forEach(function(n){return n.disable&&n.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var t=this.getChild("seekBar");this.player_.scrubbing(!1),t.videoWasPlaying&&Kn(this.player_.play())}},o.enable=function(){this.children().forEach(function(t){return t.enable&&t.enable()}),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},o.removeListenersAddedOnMousedownAndTouchstart=function(){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)},o.handleMouseDown=function(t){var n=this.el_.ownerDocument,d=this.getChild("seekBar");d&&d.handleMouseDown(t),this.on(n,"mousemove",this.throttledHandleMouseSeek),this.on(n,"touchmove",this.throttledHandleMouseSeek),this.on(n,"mouseup",this.handleMouseUpHandler_),this.on(n,"touchend",this.handleMouseUpHandler_)},o.handleMouseUp=function(t){var n=this.getChild("seekBar");n&&n.handleMouseUp(t),this.removeListenersAddedOnMousedownAndTouchstart()},a}(et);bc.prototype.options_={children:["seekBar"]},et.registerComponent("ProgressControl",bc);var Pd=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).on(s,["enterpictureinpicture","leavepictureinpicture"],function(d){return n.handlePictureInPictureChange(d)}),n.on(s,["disablepictureinpicturechanged","loadedmetadata"],function(d){return n.handlePictureInPictureEnabledChange(d)}),n.on(s,["loadedmetadata","audioonlymodechange","audiopostermodechange"],function(){"audio"===s.currentType().substring(0,5)||s.audioPosterMode()||s.audioOnlyMode()?(s.isInPictureInPicture()&&s.exitPictureInPicture(),n.hide()):n.show()}),n.disable(),n}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-picture-in-picture-control "+g.prototype.buildCSSClass.call(this)},o.handlePictureInPictureEnabledChange=function(){me().pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},o.handlePictureInPictureChange=function(t){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},o.handleClick=function(t){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},a}(kr);Pd.prototype.controlText_="Picture-in-Picture",et.registerComponent("PictureInPictureToggle",Pd);var Ku=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).on(s,"fullscreenchange",function(d){return n.handleFullscreenChange(d)}),!1===me()[s.fsApi_.fullscreenEnabled]&&n.disable(),n}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-fullscreen-control "+g.prototype.buildCSSClass.call(this)},o.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},o.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},a}(kr);Ku.prototype.controlText_="Fullscreen",et.registerComponent("FullscreenToggle",Ku);var bv=function(a,o){o.tech_&&!o.tech_.featuresVolumeControl&&a.addClass("vjs-hidden"),a.on(o,"loadstart",function(){o.tech_.featuresVolumeControl?a.removeClass("vjs-hidden"):a.addClass("vjs-hidden")})},kd=function(g){function a(){return g.apply(this,arguments)||this}return ae(a,g),a.prototype.createEl=function(){var t=g.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return t.appendChild(g.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),t},a}(et);et.registerComponent("VolumeLevel",kd);var Rd=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).update=oa(yr(Pe(n),n.update),Cn),n}ae(a,g);var o=a.prototype;return o.createEl=function(){return g.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},o.update=function(t,n,d,m){if(!d){var _=aa(this.el_),S=aa(this.player_.el()),L=t.
27width*n;if(!S||!_)return;var B=t.left-S.left+L,F=t.width-L+(S.right-t.right),q=_.width/2;B<q?q+=q-B:F<q&&(q=F),q<0?q=0:q>_.width&&(q=_.width),this.el_.style.right="-"+q+"px"}this.write(m+"%")},o.write=function(t){ya(this.el_,t)},o.updateVolume=function(t,n,d,m,_){var S=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){S.update(t,n,d,m.toFixed(0)),_&&_()})},a}(et);et.registerComponent("VolumeLevelTooltip",Rd);var wd=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).update=oa(yr(Pe(n),n.update),Cn),n}ae(a,g);var o=a.prototype;return o.createEl=function(){return g.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},o.update=function(t,n,d){var m=this,_=100*n;this.getChild("volumeLevelTooltip").updateVolume(t,n,d,_,function(){d?m.el_.style.bottom=t.height*n+"px":m.el_.style.left=t.width*n+"px"})},a}(et);wd.prototype.options_={children:["volumeLevelTooltip"]},et.registerComponent("MouseVolumeLevelDisplay",wd);var ju=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).on("slideractive",function(d){return n.updateLastVolume_(d)}),n.on(s,"volumechange",function(d){return n.updateARIAAttributes(d)}),s.ready(function(){return n.updateARIAAttributes()}),n}ae(a,g);var o=a.prototype;return o.createEl=function(){return g.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},o.handleMouseDown=function(t){fo(t)&&g.prototype.handleMouseDown.call(this,t)},o.handleMouseMove=function(t){var n=this.getChild("mouseVolumeLevelDisplay");if(n){var d=this.el(),m=aa(d),_=this.vertical(),S=Ii(d,t);S=Vu(S=_?S.y:S.x,0,1),n.update(m,S,_)}fo(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},o.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},o.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},o.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},o.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},o.updateARIAAttributes=function(t){var n=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",n),this.el_.setAttribute("aria-valuetext",n+"%")},o.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},o.updateLastVolume_=function(){var t=this,n=this.player_.volume();this.one("sliderinactive",function(){0===t.player_.volume()&&t.player_.lastVolume_(n)})},a}(Hu);ju.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},!Vr&&!An&&ju.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),ju.prototype.playerEvent="volumechange",et.registerComponent("VolumeBar",ju);var xc=function(g){function a(s,t){var n;return void 0===t&&(t={}),t.vertical=t.vertical||!1,(typeof t.volumeBar>"u"||ga(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),n=g.call(this,s,t)||this,bv(Pe(n),s),n.throttledHandleMouseMove=oa(yr(Pe(n),n.handleMouseMove),Cn),n.handleMouseUpHandler_=function(d){return n.handleMouseUp(d)},n.on("mousedown",function(d){return n.handleMouseDown(d)}),n.on("touchstart",function(d){return n.handleMouseDown(d)}),n.on("mousemove",function(d){return n.handleMouseMove(d)}),n.on(n.volumeBar,["focus","slideractive"],function(){n.volumeBar.addClass("vjs-slider-active"),n.addClass("vjs-slider-active"),n.trigger("slideractive")}),n.on(n.volumeBar,["blur","sliderinactive"],function(){n.volumeBar.removeClass("vjs-slider-active"),n.removeClass("vjs-slider-active"),n.trigger("sliderinactive")}),n}ae(a,g);var o=a.prototype;return o.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),g.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},o.handleMouseDown=function(t){var n=this.el_.ownerDocument;this.on(n,"mousemove",this.throttledHandleMouseMove),this.on(n,"touchmove",this.throttledHandleMouseMove),this.on(n,"mouseup",this.handleMouseUpHandler_),this.on(n,"touchend",this.handleMouseUpHandler_)},o.handleMouseUp=function(t){var n=this.el_.ownerDocument;this.off(n,"mousemove",this.throttledHandleMouseMove),this.off(n,"touchmove",this.throttledHandleMouseMove),this.off(n,"mouseup",this.handleMouseUpHandler_),this.off(n,"touchend",this.handleMouseUpHandler_)},o.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},a}(et);xc.prototype.options_={children:["volumeBar"]}
27,et.registerComponent("VolumeControl",xc);var Ac=function(a,o){o.tech_&&!o.tech_.featuresMuteControl&&a.addClass("vjs-hidden"),a.on(o,"loadstart",function(){o.tech_.featuresMuteControl?a.removeClass("vjs-hidden"):a.addClass("vjs-hidden")})},Ln=function(g){function a(s,t){var n;return n=g.call(this,s,t)||this,Ac(Pe(n),s),n.on(s,["loadstart","volumechange"],function(d){return n.update(d)}),n}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-mute-control "+g.prototype.buildCSSClass.call(this)},o.handleClick=function(t){var n=this.player_.volume(),d=this.player_.lastVolume_();0===n?(this.player_.volume(d<.1?.1:d),this.player_.muted(!1)):this.player_.muted(!this.player_.muted())},o.update=function(t){this.updateIcon_(),this.updateControlText_()},o.updateIcon_=function(){var t=this.player_.volume(),n=3;Vr&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===t||this.player_.muted()?n=0:t<.33?n=1:t<.67&&(n=2);for(var d=0;d<4;d++)Es(this.el_,"vjs-vol-"+d);Vn(this.el_,"vjs-vol-"+n)},o.updateControlText_=function(){var n=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==n&&this.controlText(n)},a}(kr);Ln.prototype.controlText_="Mute",et.registerComponent("MuteToggle",Ln);var Hr=function(g){function a(s,t){var n;return void 0===t&&(t={}),t.inline=!(typeof t.inline<"u")||t.inline,(typeof t.volumeControl>"u"||ga(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),(n=g.call(this,s,t)||this).handleKeyPressHandler_=function(d){return n.handleKeyPress(d)},n.on(s,["loadstart"],function(d){return n.volumePanelState_(d)}),n.on(n.muteToggle,"keyup",function(d){return n.handleKeyPress(d)}),n.on(n.volumeControl,"keyup",function(d){return n.handleVolumeControlKeyUp(d)}),n.on("keydown",function(d){return n.handleKeyPress(d)}),n.on("mouseover",function(d){return n.handleMouseOver(d)}),n.on("mouseout",function(d){return n.handleMouseOut(d)}),n.on(n.volumeControl,["slideractive"],n.sliderActive_),n.on(n.volumeControl,["sliderinactive"],n.sliderInactive_),n}ae(a,g);var o=a.prototype;return o.sliderActive_=function(){this.addClass("vjs-slider-active")},o.sliderInactive_=function(){this.removeClass("vjs-slider-active")},o.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},o.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),g.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},o.dispose=function(){this.handleMouseOut(),g.prototype.dispose.call(this)},o.handleVolumeControlKeyUp=function(t){xe().isEventKey(t,"Esc")&&this.muteToggle.focus()},o.handleMouseOver=function(t){this.addClass("vjs-hover"),on(me(),"keyup",this.handleKeyPressHandler_)},o.handleMouseOut=function(t){this.removeClass("vjs-hover"),Mi(me(),"keyup",this.handleKeyPressHandler_)},o.handleKeyPress=function(t){xe().isEventKey(t,"Esc")&&this.handleMouseOut()},a}(et);Hr.prototype.options_={children:["muteToggle","volumeControl"]},et.registerComponent("VolumePanel",Hr);var xa=function(g){function a(s,t){var n;return n=g.call(this,s,t)||this,t&&(n.menuButton_=t.menuButton),n.focusedChild_=-1,n.on("keydown",function(d){return n.handleKeyDown(d)}),n.boundHandleBlur_=function(d){return n.handleBlur(d)},n.boundHandleTapClick_=function(d){return n.handleTapClick(d)},n}ae(a,g);var o=a.prototype;return o.addEventListenerForItem=function(t){t instanceof et&&(this.on(t,"blur",this.boundHandleBlur_),this.on(t,["tap","click"],this.boundHandleTapClick_))},o.removeEventListenerForItem=function(t){t instanceof et&&(this.off(t,"blur",this.boundHandleBlur_),this.off(t,["tap","click"],this.boundHandleTapClick_))},o.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),g.prototype.removeChild.call(this,t)},o.addItem=function(t){var n=this.addChild(t);n&&this.addEventListenerForItem(n)},o.createEl=function(){this.contentEl_=ur(this.options_.contentElType||"ul",{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=g.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),on(n,"click",function(d){d.preventDefault(),d.stopImmediatePropagation()}),n},o.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,g.prototype.dispose.call(this)},o.handleBlur=function(t){var n=t.relatedTarget||me().activeElement;if(!this.children().some(function(m){return m.el()===n})){var d=this.menuButton_;d&&d.buttonPressed_&&n!==d.el().firstChild&&d.unpressButton()}},o.handleTapClick=function(t){if(this.menuButton_){this.menuButton_.unpressButton();var n=this.children();if(!Array.isArray(n))return;var d=n.filter(function(m){return m.el()===t.target})[0];if(!d)return;"CaptionSettingsMenuItem"!==d.name()&&this.menuButton_.focus()}},o.handleKeyDown=function(t){xe().isEventKey(t,"Left")||xe().isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):(xe().isEventKey(t,"Right")||xe().isEventKey(t,"Up"))&&(t.preventDefault(),t.stopPropagation(),this.stepBack())},o.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},o.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},o.focus=function(t){void 0===t&&(t=0);var n=this.children().slice();n.length&&n[0].hasClass("vjs-menu-title")&&n.shift(),n.length>0&&(t<0?t=0:t>=n.length&&(t=n.length-1),this.focusedChild_=t,n[t].el_.focus())},a}(et);et.registerComponent("Menu",xa);var qn=function(g){function a(s,t){var n;void 0===t&&(t={}),(n=g.call(this,s,t)||this).menuButton_=new kr(s,t),n.menuButton_.controlText(n.controlText_),n.menuButton_.el_.setAttribute("aria-haspopup","true");var d=kr.prototype.buildCSSClass();n.menuButton_.el_.className=n.buildCSSClass()+" "+d,n.menuButton_.removeClass("vjs-control"),n.addChild(n.menuButton_),n.update(),n.enabled_=!0;var m=function(S){return n.handleClick(S)};return n.handleMenuKeyUp_=function(_){return n.handleMenuKeyUp(_)},n.on(n.menuButton_,"tap",m),n.on(n.menuButton_,"click",m),n.on(n.menuButton_,"keydown",function(_){return n.handleKeyDown(_)}),n.on(n.menuButton_,"mouseenter",function(){n.addClass("vjs-hover"),n.menu.show(),on(me(),"keyup",
vendor: 20,599 bytes, line 27
27n.handleMenuKeyUp_)}),n.on("mouseleave",function(_){return n.handleMouseLeave(_)}),n.on("keydown",function(_){return n.handleSubmenuKeyDown(_)}),n}ae(a,g);var o=a.prototype;return o.update=function(){var t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))},o.createMenu=function(){var t=new xa(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=ur("li",{className:"vjs-menu-title",textContent:ei(this.options_.title),tabIndex:-1}),d=new et(this.player_,{el:n});t.addItem(d)}if(this.items=this.createItems(),this.items)for(var m=0;m<this.items.length;m++)t.addItem(this.items[m]);return t},o.createItems=function(){},o.createEl=function(){return g.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},o.buildWrapperCSSClass=function(){var t="vjs-menu-button";return"vjs-menu-button "+(t+=!0===this.options_.inline?"-inline":"-popup")+" "+kr.prototype.buildCSSClass()+" "+g.prototype.buildCSSClass.call(this)},o.buildCSSClass=function(){var t="vjs-menu-button";return"vjs-menu-button "+(t+=!0===this.options_.inline?"-inline":"-popup")+" "+g.prototype.buildCSSClass.call(this)},o.controlText=function(t,n){return void 0===n&&(n=this.menuButton_.el()),this.menuButton_.controlText(t,n)},o.dispose=function(){this.handleMouseLeave(),g.prototype.dispose.call(this)},o.handleClick=function(t){this.buttonPressed_?this.unpressButton():this.pressButton()},o.handleMouseLeave=function(t){this.removeClass("vjs-hover"),Mi(me(),"keyup",this.handleMenuKeyUp_)},o.focus=function(){this.menuButton_.focus()},o.blur=function(){this.menuButton_.blur()},o.handleKeyDown=function(t){xe().isEventKey(t,"Esc")||xe().isEventKey(t,"Tab")?(this.buttonPressed_&&this.unpressButton(),xe().isEventKey(t,"Tab")||(t.preventDefault(),this.menuButton_.focus())):(xe().isEventKey(t,"Up")||xe().isEventKey(t,"Down"))&&(this.buttonPressed_||(t.preventDefault(),this.pressButton()))},o.handleMenuKeyUp=function(t){(xe().isEventKey(t,"Esc")||xe().isEventKey(t,"Tab"))&&this.removeClass("vjs-hover")},o.handleSubmenuKeyPress=function(t){this.handleSubmenuKeyDown(t)},o.handleSubmenuKeyDown=function(t){(xe().isEventKey(t,"Esc")||xe().isEventKey(t,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),xe().isEventKey(t,"Tab")||(t.preventDefault(),this.menuButton_.focus()))},o.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Vr&&ed())return;this.menu.focus()}},o.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},o.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},o.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},a}(et);et.registerComponent("MenuButton",qn);var Od=function(g){function a(o,s){var t,n=s.tracks;if((t=g.call(this,o,s)||this).items.length<=1&&t.hide(),!n)return Pe(t);var d=yr(Pe(t),t.update);return n.addEventListener("removetrack",d),n.addEventListener("addtrack",d),n.addEventListener("labelchange",d),t.player_.on("ready",d),t.player_.on("dispose",function(){n.removeEventListener("removetrack",d),n.removeEventListener("addtrack",d),n.removeEventListener("labelchange",d)}),t}return ae(a,g),a}(qn);et.registerComponent("TrackButton",Od);var xv=["Tab","Esc","Up","Down","Right","Left"],wo=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).selectable=t.selectable,n.isSelected_=t.selected||!1,n.multiSelectable=t.multiSelectable,n.selected(n.isSelected_),n.el_.setAttribute("role",n.selectable?n.multiSelectable?"menuitemcheckbox":"menuitemradio":"menuitem"),n}ae(a,g);var o=a.prototype;return o.createEl=function(t,n,d){this.nonIconControl=!0;var m=g.prototype.createEl.call(this,"li",Ur({className:"vjs-menu-item",tabIndex:-1},n),d);return m.replaceChild(ur("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),m.querySelector(".vjs-icon-placeholder")),m},o.handleKeyDown=function(t){xv.some(function(n){return xe().isEventKey(t,n)})||g.prototype.handleKeyDown.call(this,t)},o.handleClick=function(t){this.selected(!0)},o.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},a}(ko);et.registerComponent("MenuItem",wo);var Oo=function(g){function a(s,t){var n,d=t.track,m=s.textTracks();t.label=d.label||d.language||"Unknown",t.selected="showing"===d.mode,(n=g.call(this,s,t)||this).track=d,n.kinds=(t.kinds||[t.kind||n.track.kind]).filter(Boolean);var L,_=function(){for(var F=arguments.length,q=new Array(F),Z=0;Z<F;Z++)q[Z]=arguments[Z];n.handleTracksChange.apply(Pe(n),q)},S=function(){for(var F=arguments.length,q=new Array(F),Z=0;Z<F;Z++)q[Z]=arguments[Z];n.handleSelectedLanguageChange.apply(Pe(n),q)};return s.on(["loadstart","texttrackchange"],_),m.addEventListener("change",_),m.addEventListener("selectedlanguagechange",S),n.on("dispose",function(){s.off(["loadstart","texttrackchange"],_),m.removeEventListener("change",_),m.removeEventListener("selectedlanguagechange",S)}),void 0===m.onchange&&n.on(["tap","click"],function(){if("object"!=typeof A().Event)try{L=new(A().Event)("change")}catch(B){}L||(L=me().createEvent("Event")).initEvent("change",!0,!0),m.dispatchEvent(L)}),n.handleTracksChange(),n}ae(a,g);var o=a.prototype;return o.handleClick=function(t){var n=this.track,d=this.player_.textTracks();if(g.prototype.handleClick.call(this,t),d)for(var m=0;m<d.length;m++){var _=d[m];-1!==this.kinds.indexOf(_.kind)&&(_===n?"showing"!==_.mode&&(_.mode="showing"):"disabled"!==_.mode&&(_.mode="disabled"))}},o.handleTracksChange=function(t){var n="showing"===this.track.mode;n!==this.isSelected_&&this.selected(n)},o.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var n=this.player_.cache_.selectedLanguage;if(n&&n.enabled&&n.language===this.track.language&&n.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},o.dispose=function(){this.track=null,g.prototype.dispose.call(this)},a}(wo);et.registerComponent("TextTrackMenuItem",Oo);var Cc=function(g){function a(s,t){return t.track={player:s,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.track.label=t.label?t.label:t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,g.call(this,s,t)||this}ae(a,g);var o=a.prototype;return o.handleTracksChange=function(t){for(var n=this.player().textTracks(),d=!0,m=0,_=n.length;m<_;m++){var S=n[m];if(this.options_.kinds.indexOf(S.kind)>-1&&"showing"===S.mode){d=!1;break}}d!==this.isSelected_&&this.selected(d)},o.handleSelectedLanguageChange=function(t){for(var n=this.player().textTracks(),d=!0,m=0,_=n.length;m<_;m++){var S=n[m];if(["captions","descriptions","subtitles"].indexOf(S.kind)>-1&&"showing"===S.mode){d=!1;break}}d&&(this.player_.cache_.selectedLanguage={enabled:!1})},a}(Oo);et.registerComponent("OffTextTrackMenuItem",Cc);var ws=function(g){function a(s,t){return void 0===t&&(t={}),t.tracks=s.textTracks(),g.call(this,s,t)||this}return ae(a,g),a.prototype.createItems=function(t,n){var d;void 0===t&&(t=[]),void 0===n&&(n=Oo),this.label_&&(d=this.label_+" off"),t.push(new Cc(this.player_,{kinds:this.kinds_,kind:this.kind_,label:d})),this.hideThreshold_+=1;var m=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var _=0;_<m.length;_++){var S=m[_];if(this.kinds_.indexOf(S.kind)>-1){var L=new n(this.player_,{track:S,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});L.addClass("vjs-"+S.kind+"-menu-item"),t.push(L)}}return t},a}(Od);et.registerComponent("TextTrackButton",ws);var Md=function(g){function a(s,t){var n,d=t.track,m=t.cue,_=s.currentTime();return t.selectable=!0,t.multiSelectable=!1,t.label=m.text,t.selected=m.startTime<=_&&_<m.endTime,(n=g.call(this,s,t)||this).track=d,n.cue=m,n}return ae(a,g),a.prototype.handleClick=function(t){g.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime)},a}(wo);et.registerComponent("ChaptersTrackMenuItem",Md);var Fd=function(g){function a(s,t,n){var d;return(d=g.call(this,s,t,n)||this).selectCurrentItem_=function(){d.items.forEach(function(m){m.selected(d.track_.activeCues[0]===m.cue)})},d}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-chapters-button "+g.prototype.buildCSSClass.call(this)},o.buildWrapperCSSClass=function(){return"vjs-chapters-button "+g.prototype.buildWrapperCSSClass.call(this)},o.update=function(t){if(!t||!t.track||"chapters"===t.track.kind){var n=this.findChaptersTrack();n!==this.track_?(this.setTrack(n),g.prototype.update.call(this)):(!this.items||n&&n.cues&&n.cues.length!==this.items.length)&&g.prototype.update.call(this)}},o.setTrack=function(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";var d=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);d&&d.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}},o.findChaptersTrack=function(){for(var t=this.player_.textTracks()||[],n=t.length-1;n>=0;n--){var d=t[n];if(d.kind===this.kind_)return d}},o.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(ei(this.kind_))},o.createMenu=function(){return this.options_.title=this.getMenuCaption(),g.prototype.createMenu.call(this)},o.createItems=function(){var t=[];if(!this.track_)return t;var n=this.track_.cues;if(!n)return t;for(var d=0,m=n.length;d<m;d++){var S=new Md(this.player_,{track:this.track_,cue:n[d]});t.push(S)}return t},a}(ws);Fd.prototype.kind_="chapters",Fd.prototype.controlText_="Chapters",et.registerComponent("ChaptersButton",Fd);var Os=function(g){function a(s,t,n){var d;d=g.call(this,s,t,n)||this;var m=s.textTracks(),_=yr(Pe(d),d.handleTracksChange);return m.addEventListener("change",_),d.on("dispose",function(){m.removeEventListener("change",_)}),d}ae(a,g);var o=a.prototype;return o.handleTracksChange=function(t){for(var n=this.player().textTracks(),d=!1,m=0,_=n.length;m<_;m++){var S=n[m];if(S.kind!==this.kind_&&"showing"===S.mode){d=!0;break}}d?this.disable():this.enable()},o.buildCSSClass=function(){return"vjs-descriptions-button "+g.prototype.buildCSSClass.call(this)},o.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+g.prototype.buildWrapperCSSClass.call(this)},a}(ws);Os.prototype.kind_="descriptions",Os.prototype.controlText_="Descriptions",et.registerComponent("DescriptionsButton",Os);var Mo=function(g){function a(s,t,n){return g.call(this,s,t,n)||this}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-subtitles-button "+g.prototype.buildCSSClass.call(this)},o.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+g.prototype.buildWrapperCSSClass.call(this)},a}(ws);Mo.prototype.kind_="subtitles",Mo.prototype.controlText_="Subtitles",et.registerComponent("SubtitlesButton",Mo);var Ms=function(g){function a(s,t){var n;return t.track={player:s,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",(n=g.call(this,s,t)||this).addClass("vjs-texttrack-settings"),n.controlText(", opens "+t.kind+" settings dialog"),n}return ae(a,g),a.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").open()},a}(Oo);et.registerComponent("CaptionSettingsMenuItem",Ms);var Nd=function(g){function a(s,t,n){return g.call(this,s,t,n)||this}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-captions-button "+g.prototype.buildCSSClass.call(this)},o.buildWrapperCSSClass=function(){return"vjs-captions-button "+g.prototype.buildWrapperCSSClass.call(this)},o.createItems=function(){var t=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(t.push(new Ms(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),g.prototype.createItems.call(this,t)},a}(ws);Nd.prototype.kind_="captions",Nd.prototype.controlText_="Captions",et.registerComponent("CaptionsButton",Nd);var Ic=function(g){function a(){return g.apply(this,arguments)||this}return ae(a,g),a.prototype.createEl=function(t,n,d){var m=g.prototype.createEl.call(this,t,n,d),_=m.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(_.appendChild(ur("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),_.appendChild(ur("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),m},a}(Oo);et.registerComponent("SubsCapsMenuItem",Ic);var qu=function(g){function a(s,t){var n;return void 0===t&&(t={}),(n=g.call(this,s,t)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(n.player_.language_)>-1&&(n.label_="captions"),n.menuButton_.controlText(ei(n.label_)),n}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-subs-caps-button "+g.prototype.buildCSSClass.call(this)},o.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+g.prototype.buildWrapperCSSClass.call(this)},o.createItems=function(){var t=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(t.push(new Ms(this.player_,{kind:this.label_})),this.hideThreshold_+=1),g.prototype.createItems.call(this,t,Ic)},a}(ws);qu.prototype.kinds_=["captions","subtitles"],qu.prototype.controlText_="Subtitles",et.registerComponent("SubsCapsButton",qu);var Bd=function(g){function a(s,t){var n,d=t.track,m=s.audioTracks();t.label=d.label||d.language||"Unknown",t.selected=d.enabled,(n=g.call(this,s,t)||this).track=d,n.addClass("vjs-"+d.kind+"-menu-item");var _=function(){for(var L=arguments.length,B=new Array(L),F=0;F<L;F++)B[F]=arguments[F];n.handleTracksChange.apply(Pe(n),B)};return m.addEventListener("change",_),n.on("dispose",function(){m.removeEventListener("change",_)}),n}ae(a,g);var o=a.prototype;return o.createEl=function(t,n,d){var m=g.prototype.createEl.call(this,t,n,d),_=m.querySelector(".vjs-menu-item-text");return"main-desc"===this.options_.track.kind&&(_.appendChild(ur("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),_.appendChild(ur("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),m},o.handleClick=function(t){if(g.prototype.handleClick.call(this,t),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks)for(var n=this.player_.audioTracks(),d=0;d<n.length;d++){var m=n[d];m!==this.track&&(m.enabled=m===this.track)}},o.handleTracksChange=function(t){this.selected(this.track.enabled)},a}(wo);et.registerComponent("AudioTrackMenuItem",Bd);var Wu=function(g){function a(s,t){return void 0===t&&(t={}),t.tracks=s.audioTracks(),g.call(this,s,t)||this}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-audio-button "+g.prototype.buildCSSClass.call(this)},o.buildWrapperCSSClass=function(){return"vjs-audio-button "+g.prototype.buildWrapperCSSClass.call(this)},o.createItems=function(t){void 0===t&&(t=[]),this.hideThreshold_=1;for(var n=this.player_.audioTracks(),d=0;d<n.length;d++)t.push(new Bd(this.player_,{track:n[d],selectable:!0,multiSelectable:!1}));return t},a}(Od);Wu.prototype.controlText_="Audio Track",et.registerComponent("AudioTrackButton",Wu);var Ud=function(g){function a(s,t){var n,d=t.rate,m=parseFloat(d,10);return t.label=d,t.selected=m===s.playbackRate(),t.selectable=!0,t.multiSelectable=!1,(n=g.call(this,s,t)||this).label=d,n.rate=m,n.on(s,"ratechange",function(_){return n.update(_)}),n}ae(a,g);var o=a.prototype;return o.handleClick=function(t){g.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},o.update=function(t){this.selected(this.player().playbackRate()===this.rate)},a}(wo);Ud.prototype.contentElType="button",et.registerComponent("PlaybackRateMenuItem",Ud);var Lc=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).menuButton_.el_.setAttribute("aria-describedby",n.labelElId_),n.updateVisibility(),n.updateLabel(),n.on(s,"loadstart",function(d){return n.updateVisibility(d)}),n.on(s,"ratechange",function(d){return n.updateLabel(d)}),n.on(s,"playbackrateschange",function(d){return n.handlePlaybackRateschange(d)}),n}ae(a,g);var o=a.prototype;return o.createEl=function(){var t=g.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=ur("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),t.appendChild(this.labelEl_),t},o.dispose=function(){this.labelEl_=null,g.prototype.dispose.call(this)},o.buildCSSClass=function(){return"vjs-playback-rate "+g.prototype.buildCSSClass.call(this)},o.buildWrapperCSSClass=function(){return"vjs-playback-rate "+g.prototype.buildWrapperCSSClass.call(this)},o.createItems=function(){for(var t=this.playbackRates(),n=[],d=t.length-1;d>=0;d--)n.push(new Ud(this.player(),{rate:t[d]+"x"}));return n},o.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},o.handleClick=function(t){var n=this.player().playbackRate(),d=this.playbackRates(),_=(d.indexOf(n)+1)%d.length;this.player().playbackRate(d[_])},o.handlePlaybackRateschange=function(t){this.update()},o.playbackRates=function(){var t=this.player();return t.playbackRates&&t.playbackRates()||[]},o.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},o.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},o.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},a}(qn);Lc.prototype.controlText_="Playback Rate",et.registerComponent("PlaybackRateMenuButton",Lc);var Fo=function(g){function a(){return g.apply(this,arguments)||this}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-spacer "+g.prototype.buildCSSClass.call(this)},o.createEl=function(t,n,d){return void 0===t&&(t="div"),void 0===n&&(n={}),void 0===d&&(d={}),n.className||(n.className=this.buildCSSClass()),g.prototype.createEl.call(this,t,n,d)},a}(et);et.registerComponent("Spacer",Fo);var Av=function(g){function a(){return g.apply(this,arguments)||this}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-custom-control-spacer "+g.prototype.buildCSSClass.call(this)},o.createEl=function(){return g.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:"\xa0"})},a}(Fo);et.registerComponent("CustomControlSpacer",Av);var No=function(g){function a(){return g.apply(this,arguments)||this}return ae(a,g),a.prototype.createEl=function(){return g.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},a}(et);No.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in me()&&No.prototype.options_.children.splice(No.prototype.options_.children.length-1,0,"pictureInPictureToggle"),et.registerComponent("ControlBar",No);var Dc=function(g){function a(s,t){var n;return(n=g.call(this,s,t)||this).on(s,"error",function(d){return n.open(d)}),n}ae(a,g);var o=a.prototype;return o.buildCSSClass=function(){return"vjs-error-display "+g.prototype.buildCSSClass.call(this)},o.content=function(){var t=this.player().error();return t?this.localize(t.message):""},a}(In);Dc.prototype.options_=be({}
vendor: 6,061 bytes, line 27
27,In.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),et.registerComponent("ErrorDisplay",Dc);var Vd="vjs-text-track-settings",Pc=["#000","Black"],kc=["#00F","Blue"],Rc=["#0FF","Cyan"],Fs=["#0F0","Green"],wc=["#F0F","Magenta"],Hd=["#F00","Red"],Oc=["#FFF","White"],Mc=["#FF0","Yellow"],Gd=["1","Opaque"],Kd=["0.5","Semi-Transparent"],Fc=["0","Transparent"],Wa={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Pc,Oc,Hd,Fs,kc,Mc,wc,Rc]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Gd,Kd,Fc]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Oc,Pc,Hd,Fs,kc,Mc,wc,Rc]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(a){return"1.00"===a?null:Number(a)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Gd,Kd]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Fc,Kd,Gd]}};function jd(g,a){if(a&&(g=a(g)),g&&"none"!==g)return g}Wa.windowColor.options=Wa.backgroundColor.options;var Lv=function(g){function a(s,t){var n;return t.temporary=!1,(n=g.call(this,s,t)||this).updateDisplay=n.updateDisplay.bind(Pe(n)),n.fill(),n.hasBeenOpened_=n.hasBeenFilled_=!0,n.endDialog=ur("p",{className:"vjs-control-text",textContent:n.localize("End of dialog window.")}),n.el().appendChild(n.endDialog),n.setDefaults(),void 0===t.persistTextTrackSettings&&(n.options_.persistTextTrackSettings=n.options_.playerOptions.persistTextTrackSettings),n.on(n.$(".vjs-done-button"),"click",function(){n.saveSettings(),n.close()}),n.on(n.$(".vjs-default-button"),"click",function(){n.setDefaults(),n.updateDisplay()}),gs(Wa,function(d){n.on(n.$(d.selector),"change",n.updateDisplay)}),n.options_.persistTextTrackSettings&&n.restoreSettings(),n}ae(a,g);var o=a.prototype;return o.dispose=function(){this.endDialog=null,g.prototype.dispose.call(this)},o.createElSelect_=function(t,n,d){var m=this;void 0===n&&(n=""),void 0===d&&(d="label");var _=Wa[t],S=_.id.replace("%s",this.id_),L=[n,S].join(" ").trim();return["<"+d+' id="'+S+'" class="'+("label"===d?"vjs-label":"")+'">',this.localize(_.label),"</"+d+">",'<select aria-labelledby="'+L+'">'].concat(_.options.map(function(B){var F=S+"-"+B[1].replace(/\W+/g,"");return['<option id="'+F+'" value="'+B[0]+'" ','aria-labelledby="'+L+" "+F+'">',m.localize(B[1]),"</option>"].join("")})).concat("</select>").join("")},o.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")},o.createElBgColor_=function(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")},o.createElWinColor_=function(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")},o.createElColors_=function(){return ur("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},o.createElFont_=function(){return ur("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},o.createElControls_=function(){var t=this.localize("restore all settings to the default values");return ur("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},o.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},o.label=function(){return this.localize("Caption Settings Dialog")},o.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},o.buildCSSClass=function(){return g.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},o.getValues=function(){var t=this;return function qh(g,a,o){return void 0===o&&(o=0),Hf(g).reduce(function(s,t){return a(s,g[t],t)},o)}
vendor: 18,154 bytes, line 27
27(Wa,function(n,d,m){var _=function Cv(g,a){return jd(g.options[g.options.selectedIndex].value,a)}(t.$(d.selector),d.parser);return void 0!==_&&(n[m]=_),n},{})},o.setValues=function(t){var n=this;gs(Wa,function(d,m){!function Iv(g,a,o){if(a)for(var s=0;s<g.options.length;s++)if(jd(g.options[s].value,o)===a){g.selectedIndex=s;break}}(n.$(d.selector),t[m],d.parser)})},o.setDefaults=function(){var t=this;gs(Wa,function(n){var d=n.hasOwnProperty("default")?n.default:0;t.$(n.selector).selectedIndex=d})},o.restoreSettings=function(){var t;try{t=JSON.parse(A().localStorage.getItem(Vd))}catch(n){Qt.warn(n)}t&&this.setValues(t)},o.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?A().localStorage.setItem(Vd,JSON.stringify(t)):A().localStorage.removeItem(Vd)}catch(n){Qt.warn(n)}}},o.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},o.conditionalBlur_=function(){this.previouslyActiveEl_=null;var t=this.player_.controlBar,n=t&&t.subsCapsButton,d=t&&t.captionsButton;n?n.focus():d&&d.focus()},a}(In);et.registerComponent("TextTrackSettings",Lv);var Dv=function(g){function a(s,t){var n,d=t.ResizeObserver||A().ResizeObserver;null===t.ResizeObserver&&(d=!1);var m=Dr({createEl:!d,reportTouchActivity:!1},t);return(n=g.call(this,s,m)||this).ResizeObserver=t.ResizeObserver||A().ResizeObserver,n.loadListener_=null,n.resizeObserver_=null,n.debouncedHandler_=Jf(function(){n.resizeHandler()},100,!1,Pe(n)),d?(n.resizeObserver_=new n.ResizeObserver(n.debouncedHandler_),n.resizeObserver_.observe(s.el())):(n.loadListener_=function(){if(n.el_&&n.el_.contentWindow){var _=n.debouncedHandler_,S=n.unloadListener_=function(){Mi(this,"resize",_),Mi(this,"unload",S),S=null};on(n.el_.contentWindow,"unload",S),on(n.el_.contentWindow,"resize",_)}},n.one("load",n.loadListener_)),n}ae(a,g);var o=a.prototype;return o.createEl=function(){return g.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})},o.resizeHandler=function(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")},o.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,g.prototype.dispose.call(this)},a}(et);et.registerComponent("ResizeManager",Dv);var Nc={trackingThreshold:20,liveTolerance:15},Bc=function(g){function a(s,t){var n,d=Dr(Nc,t,{createEl:!1});return(n=g.call(this,s,d)||this).handleVisibilityChange_=function(m){return n.handleVisibilityChange(m)},n.trackLiveHandler_=function(){return n.trackLive_()},n.handlePlay_=function(m){return n.handlePlay(m)},n.handleFirstTimeupdate_=function(m){return n.handleFirstTimeupdate(m)},n.handleSeeked_=function(m){return n.handleSeeked(m)},n.seekToLiveEdge_=function(m){return n.seekToLiveEdge(m)},n.reset_(),n.on(n.player_,"durationchange",function(m){return n.handleDurationchange(m)}),n.on(n.player_,"canplay",function(){return n.toggleTracking()}),ys&&"hidden"in me()&&"visibilityState"in me()&&n.on(me(),"visibilitychange",n.handleVisibilityChange_),n}ae(a,g);var o=a.prototype;return o.handleVisibilityChange=function(){this.player_.duration()===1/0&&(me().hidden?this.stopTracking():this.startTracking())},o.trackLive_=function(){var t=this.player_.seekable();if(t&&t.length){var n=Number(A().performance.now().toFixed(4)),d=-1===this.lastTime_?0:(n-this.lastTime_)/1e3;this.lastTime_=n,this.pastSeekEnd_=this.pastSeekEnd()+d;var m=this.liveCurrentTime(),_=this.player_.currentTime(),S=this.player_.paused()||this.seekedBehindLive_||Math.abs(m-_)>this.options_.liveTolerance;(!this.timeupdateSeen_||m===1/0)&&(S=!1),S!==this.behindLiveEdge_&&(this.behindLiveEdge_=S,this.trigger("liveedgechange"))}},o.handleDurationchange=function(){this.toggleTracking()},o.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},o.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Cn),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},o.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},o.handleSeeked=function(){var t=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&t>2,this.nextSeekedFromUser_=!1,this.trackLive_()},o.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},o.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},o.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},o.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},o.seekableEnd=function(){for(var t=this.player_.seekable(),n=[],d=t?t.length:0;d--;)n.push(t.end(d));return n.length?n.sort()[n.length-1]:1/0},o.seekableStart=function(){for(var t=this.player_.seekable(),n=[],d=t?t.length:0;d--;)n.push(t.start(d));return n.length?n.sort()[0]:0},o.liveWindow=function(){var t=this.liveCurrentTime();return t===1/0?0:t-this.seekableStart()},o.isLive=function(){return this.isTracking()},o.atLiveEdge=function(){return!this.behindLiveEdge()},o.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},o.pastSeekEnd=function(){var t=this.seekableEnd();return-1!==this.lastSeekEnd_&&t!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=t,this.pastSeekEnd_},o.behindLiveEdge=function(){return this.behindLiveEdge_},o.isTracking=function(){return"number"==typeof this.trackingInterval_},o.seekToLiveEdge=function(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},o.dispose=function(){this.off(me(),"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),g.prototype.dispose.call(this)},a}(et);et.registerComponent("LiveTracker",Bc);var $u,Yu=function(a){var o=a.el();if(o.hasAttribute("src"))return a.triggerSourceset(o.src),!0;var s=a.$$("source"),t=[],n="";if(!s.length)return!1;for(var d=0;d<s.length;d++){var m=s[d].src;m&&-1===t.indexOf(m)&&t.push(m)}return!!t.length&&(1===t.length&&(n=t[0]),a.triggerSourceset(n),!0)},zu=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(a){var o=me().createElement(this.nodeName.toLowerCase());o.innerHTML=a;for(var s=me().createDocumentFragment();o.childNodes.length;)s.appendChild(o.childNodes[0]);return this.innerText="",A().Element.prototype.appendChild.call(this,s),this.innerHTML}}),Uc=function(a,o){for(var s={},t=0;t<a.length&&!((s=Object.getOwnPropertyDescriptor(a[t],o))&&s.set&&s.get);t++);return s.enumerable=!0,s.configurable=!0,s},qd=function(a){var o=a.el();if(!o.resetSourceWatch_){var s={},t=function(a){return Uc([a.el(),A().HTMLMediaElement.prototype,A().Element.prototype,zu],"innerHTML")}(a),n=function(m){return function(){for(var _=arguments.length,S=new Array(_),L=0;L<_;L++)S[L]=arguments[L];var B=m.apply(o,S);return Yu(a),B}};["append","appendChild","insertAdjacentHTML"].forEach(function(d){o[d]&&(s[d]=o[d],o[d]=n(s[d]))}),Object.defineProperty(o,"innerHTML",Dr(t,{set:n(t.set)})),o.resetSourceWatch_=function(){o.resetSourceWatch_=null,Object.keys(s).forEach(function(d){o[d]=s[d]}),Object.defineProperty(o,"innerHTML",t)},a.one("sourceset",o.resetSourceWatch_)}},Pv=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?vd(A().Element.prototype.getAttribute.call(this,"src")):""},set:function(a){return A().Element.prototype.setAttribute.call(this,"src",a),a}}),Bs=function(a,o,s,t){void 0===t&&(t=!0);var n=function(_){return Object.defineProperty(a,o,{value:_,enumerable:!0,writable:!0})},d={configurable:!0,enumerable:!0,get:function(){var _=s();return n(_),_}};return t&&(d.set=n),Object.defineProperty(a,o,d)},_t=function(g){function a(s,t){var n;n=g.call(this,s,t)||this;var d=s.source,m=!1;if(n.featuresVideoFrameCallback=n.featuresVideoFrameCallback&&"VIDEO"===n.el_.tagName,d&&(n.el_.currentSrc!==d.src||s.tag&&3===s.tag.initNetworkState_)?n.setSource(d):n.handleLateInit_(n.el_),s.enableSourceset&&n.setupSourcesetHandling_(),n.isScrubbing_=!1,n.el_.hasChildNodes()){for(var _=n.el_.childNodes,S=_.length,L=[];S--;){var B=_[S];"track"===B.nodeName.toLowerCase()&&(n.featuresNativeTextTracks?(n.remoteTextTrackEls().addTrackElement_(B),n.remoteTextTracks().addTrack(B.track),n.textTracks().addTrack(B.track),!m&&!n.el_.hasAttribute("crossorigin")&&Fi(B.src)&&(m=!0)):L.push(B))}for(var q=0;q<L.length;q++)n.el_.removeChild(L[q])}return n.proxyNativeTracks_(),n.featuresNativeTextTracks&&m&&Qt.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),n.restoreMetadataTracksInIOSNativePlayer_(),(ma||Lu||ms)&&!0===s.nativeControlsForTouch&&n.setControls(!0),n.proxyWebkitFullscreen_(),n.triggerReady(),n}ae(a,g);var o=a.prototype;return o.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),a.disposeMediaElement(this.el_),this.options_=null,g.prototype.dispose.call(this)},o.setupSourcesetHandling_=function(){!function(a){if(a.featuresSourceset){var o=a.el();if(!o.resetSourceset_){var s=function(a){return Uc([a.el(),A().HTMLMediaElement.prototype,Pv],"src")}(a),t=o.setAttribute,n=o.load;Object.defineProperty(o,"src",Dr(s,{set:function(m){var _=s.set.call(o,m);return a.triggerSourceset(o.src),_}})),o.setAttribute=function(d,m){var _=t.call(o,d,m);return/src/i.test(d)&&a.triggerSourceset(o.src),_},o.load=function(){var d=n.call(o);return Yu(a)||(a.triggerSourceset(""),qd(a)),d},o.currentSrc?a.triggerSourceset(o.currentSrc):Yu(a)||qd(a),o.resetSourceset_=function(){o.resetSourceset_=null,o.load=n,o.setAttribute=t,Object.defineProperty(o,"src",s),o.resetSourceWatch_&&o.resetSourceWatch_()}}}}(this)},o.restoreMetadataTracksInIOSNativePlayer_=function(){var n,t=this.textTracks(),d=function(){n=[];for(var S=0;S<t.length;S++){var L=t[S];"metadata"===L.kind&&n.push({track:L,storedMode:L.mode})}};d(),t.addEventListener("change",d),this.on("dispose",function(){return t.removeEventListener("change",d)});var m=function _(){for(var S=0;S<n.length;S++){var L=n[S];"disabled"===L.track.mode&&L.track.mode!==L.storedMode&&(L.track.mode=L.storedMode)}t.removeEventListener("change",_)};this.on("webkitbeginfullscreen",function(){t.removeEventListener("change",d),t.removeEventListener("change",m),t.addEventListener("change",m)}),this.on("webkitendfullscreen",function(){t.removeEventListener("change",d),t.addEventListener("change",d),t.removeEventListener("change",m)})},o.overrideNative_=function(t,n){var d=this;if(n===this["featuresNative"+t+"Tracks"]){var m=t.toLowerCase();this[m+"TracksListeners_"]&&Object.keys(this[m+"TracksListeners_"]).forEach(function(_){d.el()[m+"Tracks"].removeEventListener(_,d[m+"TracksListeners_"][_])}),this["featuresNative"+t+"Tracks"]=!n,this[m+"TracksListeners_"]=null,this.proxyNativeTracksForType_(m)}},o.overrideNativeAudioTracks=function(t){this.overrideNative_("Audio",t)},o.overrideNativeVideoTracks=function(t){this.overrideNative_("Video",t)},o.proxyNativeTracksForType_=function(t){var n=this,d=Ji[t],m=this.el()[d.getterName],_=this[d.getterName]();if(this["featuresNative"+d.capitalName+"Tracks"]&&m&&m.addEventListener){var S={change:function(F){var q={type:"change",target:_,currentTarget:_,srcElement:_};_.trigger(q),"text"===t&&n[yn.remoteText.getterName]().trigger(q)},addtrack:function(F){_.addTrack(F.track)},removetrack:function(F){_.removeTrack(F.track)}},L=function(){for(var F=[],q=0;q<_.length;q++){for(var Z=!1,ne=0;ne<m.length;ne++)if(m[ne]===_[q]){Z=!0;break}Z||F.push(_[q])}for(;F.length;)_.removeTrack(F.shift())};this[d.getterName+"Listeners_"]=S,Object.keys(S).forEach(function(B){var F=S[B];m.addEventListener(B,F),n.on("dispose",function(q){return m.removeEventListener(B,F)})}),this.on("loadstart",L),this.on("dispose",function(B){return n.off("loadstart",L)})}},o.proxyNativeTracks_=function(){var t=this;Ji.names.forEach(function(n){t.proxyNativeTracksForType_(n)})},o.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var n=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(n,t),a.disposeMediaElement(t),t=n}else{t=me().createElement("video");var m=Dr({},this.options_.tag&&sn(this.options_.tag));(!ma||!0!==this.options_.nativeControlsForTouch)&&delete m.controls,rd(t,Ur(m,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&Ua(t,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(t.disablePictureInPicture=this.options_.disablePictureInPicture);for(var _=["loop","muted","playsinline","autoplay"],S=0;S<_.length;S++){var L=_[S],B=this.options_[L];typeof B<"u"&&(B?Ua(t,L,L):lo(t,L),t[L]=B)}return t},o.handleLateInit_=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var n=!1,d=function(){n=!0};this.on("loadstart",d);var m=function(){n||this.trigger("loadstart")};return this.on("loadedmetadata",m),void this.ready(function(){this.off("loadstart",d),this.off("loadedmetadata",m),n||this.trigger("loadstart")})}var _=["loadstart"];_.push("loadedmetadata"),t.readyState>=2&&_.push("loadeddata"),t.readyState>=3&&_.push("canplay"),t.readyState>=4&&_.push("canplaythrough"),this.ready(function(){_.forEach(function(S){this.trigger(S)},this)})}},o.setScrubbing=function(t){this.isScrubbing_=t},o.scrubbing=function(){return this.isScrubbing_},o.setCurrentTime=function(t){try{this.isScrubbing_&&this.el_.fastSeek&&uo?this.el_.fastSeek(t):this.el_.currentTime=t}catch(n){Qt(n,"Video is not ready. (Video.js)")}},o.duration=function(){var t=this;return this.el_.duration===1/0&&An&&Un&&0===this.el_.currentTime?(this.on("timeupdate",function d(){t.el_.currentTime>0&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",d))}),NaN):this.el_.duration||NaN},o.width=function(){return this.el_.offsetWidth},o.height=function(){return this.el_.offsetHeight},o.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var n=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},d=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",n),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",d),this.on("dispose",function(){t.off("webkitbeginfullscreen",d),t.off("webkitendfullscreen",n)})}},o.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=A().navigator&&A().navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},o.enterFullScreen=function(){var t=this.el_;if(t.paused&&t.networkState<=t.HAVE_METADATA)Kn(this.el_.play()),this.setTimeout(function(){t.pause();try{t.webkitEnterFullScreen()}catch(n){this.trigger("fullscreenerror",n)}},0);else try{t.webkitEnterFullScreen()}catch(n){this.trigger("fullscreenerror",n)}},o.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},o.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},o.requestVideoFrameCallback=function(t){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(t):g.prototype.requestVideoFrameCallback.call(this,t)},o.cancelVideoFrameCallback=function(t){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(t):g.prototype.cancelVideoFrameCallback.call(this,t)},o.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},o.reset=function(){a.resetMediaElement(this.el_)},o.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},o.setControls=function(t){this.el_.controls=!!t},o.addTextTrack=function(t,n,d){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,d):g.prototype.addTextTrack.call(this,t,n,d)},o.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return g.prototype.createRemoteTextTrack.call(this,t);var n=me().createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},o.addRemoteTextTrack=function(t,n){var d=g.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(d),d},o.removeRemoteTextTrack=function(t){if(g.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),d=n.length;d--;
27)(t===n[d]||t===n[d].track)&&this.el().removeChild(n[d])},o.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),A().performance&&"function"==typeof A().performance.now?t.creationTime=A().performance.now():A().performance&&A().performance.timing&&"number"==typeof A().performance.timing.navigationStart&&(t.creationTime=A().Date.now()-A().performance.timing.navigationStart),t},a}(hr);Bs(_t,"TEST_VID",function(){if(Ts()){var g=me().createElement("video"),a=me().createElement("track");return a.kind="captions",a.srclang="en",a.label="English",g.appendChild(a),g}}),_t.isSupported=function(){try{_t.TEST_VID.volume=.5}catch(g){return!1}return!(!_t.TEST_VID||!_t.TEST_VID.canPlayType)},_t.canPlayType=function(g){return _t.TEST_VID.canPlayType(g)},_t.canPlaySource=function(g,a){return _t.canPlayType(g.type)},_t.canControlVolume=function(){try{var g=_t.TEST_VID.volume;_t.TEST_VID.volume=g/2+.1;var a=g!==_t.TEST_VID.volume;return a&&Vr?(A().setTimeout(function(){_t&&_t.prototype&&(_t.prototype.featuresVolumeControl=g!==_t.TEST_VID.volume)}),!1):a}catch(o){return!1}},_t.canMuteVolume=function(){try{var g=_t.TEST_VID.muted;return _t.TEST_VID.muted=!g,_t.TEST_VID.muted?Ua(_t.TEST_VID,"muted","muted"):lo(_t.TEST_VID,"muted"),g!==_t.TEST_VID.muted}catch(a){return!1}},_t.canControlPlaybackRate=function(){if(An&&Un&&Ql<58)return!1;try{var g=_t.TEST_VID.playbackRate;return _t.TEST_VID.playbackRate=g/2+.1,g!==_t.TEST_VID.playbackRate}catch(a){return!1}},_t.canOverrideAttributes=function(){try{var g=function(){};Object.defineProperty(me().createElement("video"),"src",{get:g,set:g}),Object.defineProperty(me().createElement("audio"),"src",{get:g,set:g}),Object.defineProperty(me().createElement("video"),"innerHTML",{get:g,set:g}),Object.defineProperty(me().createElement("audio"),"innerHTML",{get:g,set:g})}catch(a){return!1}return!0},_t.supportsNativeTextTracks=function(){return uo||Vr&&Un},_t.supportsNativeVideoTracks=function(){return!(!_t.TEST_VID||!_t.TEST_VID.videoTracks)},_t.supportsNativeAudioTracks=function(){return!(!_t.TEST_VID||!_t.TEST_VID.audioTracks)},_t.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function(g){var o=g[1];Bs(_t.prototype,g[0],function(){return _t[o]()},!0)}),_t.prototype.featuresVolumeControl=_t.canControlVolume(),_t.prototype.movingMediaElementInDOM=!Vr,_t.prototype.featuresFullscreenResize=!0,_t.prototype.featuresProgressEvents=!0,_t.prototype.featuresTimeupdateEvents=!0,_t.prototype.featuresVideoFrameCallback=!(!_t.TEST_VID||!_t.TEST_VID.requestVideoFrameCallback),_t.patchCanPlayType=function(){$l>=4&&!Xl&&!Un&&($u=_t.TEST_VID&&_t.TEST_VID.constructor.prototype.canPlayType,_t.TEST_VID.constructor.prototype.canPlayType=function(g){return g&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(g)?"maybe":$u.call(this,g)})},_t.unpatchCanPlayType=function(){var g=_t.TEST_VID.constructor.prototype.canPlayType;return $u&&(_t.TEST_VID.constructor.prototype.canPlayType=$u),g},_t.patchCanPlayType(),_t.disposeMediaElement=function(g){if(g){for(g.parentNode&&g.parentNode.removeChild(g);g.hasChildNodes();)g.removeChild(g.firstChild);g.removeAttribute("src"),"function"==typeof g.load&&function(){try{g.load()}catch(a){}}()}},_t.resetMediaElement=function(g){if(g){for(var a=g.querySelectorAll("source"),o=a.length;o--;)g.removeChild(a[o]);g.removeAttribute("src"),"function"==typeof g.load&&function(){try{g.load()}catch(s){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(g){_t.prototype[g]=function(){return this.el_[g]||this.el_.hasAttribute(g)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(g){_t.prototype["set"+ei(g)]=function(a){this.el_[g]=a,a?this.el_.setAttribute(g,g):this.el_.removeAttribute(g)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","
27networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(g){_t.prototype[g]=function(){return this.el_[g]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(g){_t.prototype["set"+ei(g)]=function(a){this.el_[g]=a}}),["pause","load","play"].forEach(function(g){_t.prototype[g]=function(){return this.el_[g]()}}),hr.withSourceHandlers(_t),_t.nativeSourceHandler={},_t.nativeSourceHandler.canPlayType=function(g){try{return _t.TEST_VID.canPlayType(g)}catch(a){return""}},_t.nativeSourceHandler.canHandleSource=function(g,a){if(g.type)return _t.nativeSourceHandler.canPlayType(g.type);if(g.src){var o=Ps(g.src);return _t.nativeSourceHandler.canPlayType("video/"+o)}return""},_t.nativeSourceHandler.handleSource=function(g,a,o){a.setSrc(g.src)},_t.nativeSourceHandler.dispose=function(){},_t.registerSourceHandler(_t.nativeSourceHandler),hr.registerTech("Html5",_t);var Xu=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Qu={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Uo=["tiny","xsmall","small","medium","large","xlarge","huge"],Zu={};Uo.forEach(function(g){var a="x"===g.charAt(0)?"x-"+g.substring(1):g;Zu[g]="vjs-layout-"+a});var Us={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},ii=function(g){function a(s,t,n){var d;if(s.id=s.id||t.id||"vjs_video_"+Hn(),(t=Ur(a.getTagSettings(s),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language)if("function"==typeof s.closest){var m=s.closest("[lang]");m&&m.getAttribute&&(t.language=m.getAttribute("lang"))}else for(var _=s;_&&1===_.nodeType;){if(sn(_).hasOwnProperty("lang")){t.language=_.getAttribute("lang");break}_=_.parentNode}if((d=g.call(this,null,t,n)||this).boundDocumentFullscreenChange_=function(F){return d.documentFullscreenChange_(F)},d.boundFullWindowOnEscKey_=function(F){return d.fullWindowOnEscKey(F)},d.boundUpdateStyleEl_=function(F){return d.updateStyleEl_(F)},d.boundApplyInitTime_=function(F){return d.applyInitTime_(F)},d.boundUpdateCurrentBreakpoint_=function(F){return d.updateCurrentBreakpoint_(F)},d.boundHandleTechClick_=function(F){return d.handleTechClick_(F)},d.boundHandleTechDoubleClick_=function(F){return d.handleTechDoubleClick_(F)},d.boundHandleTechTouchStart_=function(F){return d.handleTechTouchStart_(F)},d.boundHandleTechTouchMove_=function(F){return d.handleTechTouchMove_(F)},d.boundHandleTechTouchEnd_=function(F){return d.handleTechTouchEnd_(F)},d.boundHandleTechTap_=function(F){return d.handleTechTap_(F)},d.isFullscreen_=!1,d.log=ps(d.id_),d.fsApi_=cs,d.isPosterFromTech_=!1,d.queuedCallbacks_=[],d.isReady_=!1,d.hasStarted_=!1,d.userActive_=!1,d.debugEnabled_=!1,d.audioOnlyMode_=!1,d.audioPosterMode_=!1,d.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!d.options_||!d.options_.techOrder||!d.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(d.tag=s,d.tagAttributes=s&&sn(s),d.language(d.options_.language),t.languages){var S={};Object.getOwnPropertyNames(t.languages).forEach(function(F){S[F.toLowerCase()]=t.languages[F]}),d.languages_=S}else d.languages_=a.prototype.options_.languages;d.resetCache_(),d.poster_=t.poster||"",d.controls_=!!t.controls,s.controls=!1,s.removeAttribute("controls"),d.changingSrc_=!1,d.playCallbacks_=[],d.playTerminatedQueue_=[],s.hasAttribute("autoplay")?d.autoplay(!0):d.autoplay(d.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(function(F){if("function"!=typeof d[F])throw new Error('plugin "'+F+'" does not exist')}),d.scrubbing_=!1,d.el_=d.createEl(),Nu(Pe(d),{eventBusKey:"el_"}),d.fsApi_.requestFullscreen&&(on(me(),d.fsApi_.fullscreenchange,d.boundDocumentFullscreenChange_),d.on(d.fsApi_.fullscreenchange,d.boundDocumentFullscreenChange_)),d.fluid_&&d.on(["playerreset","resize"],d.boundUpdateStyleEl_);var L=Dr(d.options_);
vendor: 7,062 bytes, line 27
27t.plugins&&Object.keys(t.plugins).forEach(function(F){d[F](t.plugins[F])}),t.debug&&d.debug(!0),d.options_.playerOptions=L,d.middleware_=[],d.playbackRates(t.playbackRates),d.initChildren(),d.isAudio("audio"===s.nodeName.toLowerCase()),d.controls()?d.addClass("vjs-controls-enabled"):d.addClass("vjs-controls-disabled"),d.el_.setAttribute("role","region"),d.isAudio()?d.el_.setAttribute("aria-label",d.localize("Audio Player")):d.el_.setAttribute("aria-label",d.localize("Video Player")),d.isAudio()&&d.addClass("vjs-audio"),d.flexNotSupported_()&&d.addClass("vjs-no-flex"),ma&&d.addClass("vjs-touch-enabled"),Vr||d.addClass("vjs-workinghover"),a.players[d.id_]=Pe(d);var B=Nf.split(".")[0];return d.addClass("vjs-v"+B),d.userActive(!0),d.reportUserActivity(),d.one("play",function(F){return d.listenForUserActivity_(F)}),d.on("stageclick",function(F){return d.handleStageClick_(F)}),d.on("keydown",function(F){return d.handleKeyDown(F)}),d.on("languagechange",function(F){return d.handleLanguagechange(F)}),d.breakpoints(d.options_.breakpoints),d.responsive(d.options_.responsive),d.on("ready",function(){d.audioPosterMode(d.options_.audioPosterMode),d.audioOnlyMode(d.options_.audioOnlyMode)}),d}ae(a,g);var o=a.prototype;return o.dispose=function(){var t=this;this.trigger("dispose"),this.off("dispose"),Mi(me(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Mi(me(),"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),a.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),function fc(g){Co[g.id()]=null}(this),qi.names.forEach(function(n){var m=t[qi[n].getterName]();m&&m.off&&m.off()}),g.prototype.dispose.call(this,{restoreEl:this.options_.restoreEl})},o.createEl=function(){var n,t=this.tag,d=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player"),m="video-js"===this.tag.tagName.toLowerCase();d?n=this.el_=t.parentNode:m||(n=this.el_=g.prototype.createEl.call(this,"div"));var _=sn(t);if(m){for(n=this.el_=t,t=this.tag=me().createElement("video");n.children.length;)t.appendChild(n.firstChild);Ta(n,"video-js")||Vn(n,"video-js"),n.appendChild(t),d=this.playerElIngest_=n,Object.keys(n).forEach(function(Z){try{t[Z]=n[Z]}catch(ne){}})}if(t.setAttribute("tabindex","-1"),_.tabindex="-1",(ys||Un&&jf)&&(t.setAttribute("role","application"),_.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in _&&delete _.width,"height"in _&&delete _.height,Object.getOwnPropertyNames(_).forEach(function(Z){m&&"class"===Z||n.setAttribute(Z,_[Z]),m&&t.setAttribute(Z,_[Z])}),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=n.player=this,this.addClass("vjs-paused"),!0!==A().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Qf("vjs-styles-dimensions");var S=sa(".vjs-styles-defaults"),L=sa("head");L.insertBefore(this.styleEl_,S?S.nextSibling:L.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var B=t.getElementsByTagName("a"),F=0;F<B.length;F++){var q=B.item(F);Vn(q,"vjs-hidden"),q.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!d&&t.parentNode.insertBefore(n,t),Du(t,n),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=n,n},o.crossOrigin=function(t){if(!t)return this.techGet_("crossOrigin");"anonymous"===t||"use-credentials"===t?this.techCall_("setCrossOrigin",t):Qt.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+t+'"')},o.width=function(t){return this.dimension("width",t)},o.height=function(t){return this.dimension("height",t)},o.dimension=function(t,n){var d=t+"_";if(void 0===n)return this[d]||0;if(""===n||"auto"===n)return this[d]=void 0,void this.updateStyleEl_();var m=parseFloat(n);isNaN(m)?Qt.error('Improper value "'+n+'" supplied for for '+t):(this[d]=m,this.updateStyleEl_())},o.fluid=function(t){var n=this;if(void 0===t)return!!this.fluid_;this.fluid_=!!t,Jr(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),t?(this.addClass("vjs-fluid"),this.fill(!1),function(a,o){Jr(a)?o():(a.eventedCallbacks||(a.eventedCallbacks=[]),a.eventedCallbacks.push(o))}(this,function(){n.on(["playerreset","resize"],n.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()},o.fill=function(t){if(void 0===t)return!!this.fill_;this.fill_=!!t,t?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},o.aspectRatio=function(t){if(void 0===t)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()},o.updateStyleEl_=function(){if(!0!==A().VIDEOJS_NO_DYNAMIC_STYLE){var m,_,L,B=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),F=B[1]/B[0];m=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/F:this.videoWidth()||300,_=void 0!==this.height_?this.height_:m*F,L=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(L),vo(this.styleEl_,"\n      ."+L+" {\n        width: "+m+"px;\n        height: "+_+"px;\n      }\n\n      ."+L+".vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: "+100*F+"%;\n      }\n    ")}else{var t="number"==typeof this.width_?this.width_:this.options_.width,n="number"==typeof this.height_?this.height_:this.options_.height,d=this.tech_&&this.tech_.el();d&&(t>=0&&(d.width=t),n>=0&&(d.height=n))}},o.loadTech_=function(t,n){var d=this;this.tech_&&this.unloadTech_();var m=ei(t),_=t.charAt(0).toLowerCase()+t.slice(1);"Html5"!==m&&this.tag&&(hr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=m,this.isReady_=!1;var S=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(S=!1);var L={source:n,autoplay:S,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+_+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};
27qi.names.forEach(function(F){var q=qi[F];L[q.getterName]=d[q.privateName]}),Ur(L,this.options_[m]),Ur(L,this.options_[_]),Ur(L,this.options_[t.toLowerCase()]),this.tag&&(L.tag=this.tag),n&&n.src===this.cache_.src&&this.cache_.currentTime>0&&(L.startTime=this.cache_.currentTime);var B=hr.getTech(t);if(!B)throw new Error("No Tech named '"+m+"' exists! '"+m+"' should be registered using videojs.registerTech()'");this.tech_=new B(L),this.tech_.ready(yr(this,this.handleTechReady_),!0),function(a,o){a.forEach(function(s){var t=o.addRemoteTextTrack(s).track;!s.src&&s.cues&&s.cues.forEach(function(n){return t.addCue(n)})}),o.textTracks()}(this.textTracksJson_||[],this.tech_),Xu.forEach(function(F){d.on(d.tech_,F,function(q){return d["handleTech"+ei(F)+"_"](q)})}),Object.keys(Qu).forEach(function(F){d.on(d.tech_,F,function(q){0===d.tech_.playbackRate()&&d.tech_.seeking()?d.queuedCallbacks_.push({callback:d["handleTech"+Qu[F]+"_"].bind(d),event:q}):d["handleTech"+Qu[F]+"_"](q)})}),this.on(this.tech_,"loadstart",function(F){return d.handleTechLoadStart_(F)}),this.on(this.tech_,"sourceset",function(F){return d.handleTechSourceset_(F)}),this.on(this.tech_,"waiting",function(F){return d.handleTechWaiting_(F)}),this.on(this.tech_,"ended",function(F){return d.handleTechEnded_(F)}),this.on(this.tech_,"seeking",function(F){return d.handleTechSeeking_(F)}),this.on(this.tech_,"play",function(F){return d.handleTechPlay_(F)}),this.on(this.tech_,"firstplay",function(F){return d.handleTechFirstPlay_(F)}),this.on(this.tech_,"pause",function(F){return d.handleTechPause_(F)}),this.on(this.tech_,"durationchange",function(F){return d.handleTechDurationChange_(F)}),this.on(this.tech_,"fullscreenchange",function(F,q){return d.handleTechFullscreenChange_(F,q)}),this.on(this.tech_,"fullscreenerror",function(F,q){return d.handleTechFullscreenError_(F,q)}),this.on(this.tech_,"enterpictureinpicture",function(F){return d.handleTechEnterPictureInPicture_(F)}),this.on(this.tech_,"leavepictureinpicture",function(F){return d.handleTechLeavePictureInPicture_(F)}),this.on(this.tech_,"error",function(F){return d.handleTechError_(F)}),this.on(this.tech_,"posterchange",function(F){return d.handleTechPosterChange_(F)}),this.on(this.tech_,"textdata",function(F){return d.handleTechTextData_(F)}),this.on(this.tech_,"ratechange",function(F){return d.handleTechRateChange_(F)}),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&("Html5"!==m||!this.tag)&&Du(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},o.unloadTech_=function(){var t=this;qi.names.forEach(function(n){var d=qi[n];t[d.privateName]=t[d.getterName]()}),this.textTracksJson_=function(a){var o=a.$$("track"),s=Array.prototype.map.call(o,function(n){return n.track});return Array.prototype.map.call(o,function(n){var d=To(n.track);return n.src&&(d.src=n.src),d}).concat(Array.prototype.filter.call(a.textTracks(),function(n){return-1===s.indexOf(n)}).map(To))}(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},o.tech=function(t){return void 0===t&&Qt.warn("Using the tech directly can be dangerous. I hope you know 
27what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},o.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},o.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},o.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},o.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())},o.manualAutoplay_=function(t){var n=this;if(this.tech_&&"string"==typeof t){var m,d=function(){var S=n.muted();n.muted(!0);var L=function(){n.muted(S)};n.playTerminatedQueue_.push(L);var B=n.play();if(jr(B))return B.catch(function(F){throw L(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(F||""))})};if("any"!==t||this.muted()?m="muted"!==t||this.muted()?this.play():d():jr(m=this.play())&&(m=m.catch(d)),jr(m))return m.then(function(){n.trigger({type:"autoplay-success",autoplay:t})}).catch(function(){n.trigger({type:"autoplay-failure",autoplay:t})})}},o.updateSourceCaches_=function(t){void 0===t&&(t="");var n=t,d="";"string"!=typeof n&&(n=t.src,d=t.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],n&&!d&&(d=function(a,o){if(!o)return"";if(a.cache_.source.src===o&&a.cache_.source.type)return a.cache_.source.type;var s=a.cache_.sources.filter(function(m){return m.src===o});if(s.length)return s[0].type;for(var t=a.$$("source"),n=0;n<t.length;n++){var d=t[n];if(d.type&&d.src&&d.src===o)return d.type}return Do(o)}(this,n)),this.cache_.source=Dr({},t,{src:n,type:d});for(var m=this.cache_.sources.filter(function(q){return q.src&&q.src===n}),_=[],S=this.$$("source"),L=[],B=0;B<S.length;B++){var F=sn(S[B]);_.push(F),F.src&&F.src===n&&L.push(F.src)}L.length&&!m.length?this.cache_.sources=_:m.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=n},o.handleTechSourceset_=function(t){var n=this;if(!this.changingSrc_){var d=function(L){return n.updateSourceCaches_(L)},m=this.currentSource().src,_=t.src;m&&!/^blob:/.test(m)&&/^blob:/.test(_)&&(!this.lastSource_||this.lastSource_.tech!==_&&this.lastSource_.player!==m)&&(d=function(){}),d(_),t.src||this.tech_.any(["sourceset","loadstart"],function(S){if("sourceset"!==S.type){var L=n.techGet("currentSrc");n.lastSource_.tech=L,n.updateSourceCaches_(L)}})}this.lastSource_={player:this.currentSource().src,tech:t.src},this.trigger({src:t.src,type:"sourceset"})},o.hasStarted=function(t){if(void 0===t)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},o.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},o.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(t){return t.callback(t.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},o.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting");var n=this.currentTime();this.on("timeupdate",function m(){n!==t.currentTime()&&(t.removeClass("vjs-waiting"),t.off("timeupdate",m))})},o.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},o.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},o.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},o.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},o.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},o.handleTechFirstPlay_=function(){this.options_.starttime&&(Qt.warn("Passing the `starttime` option to the player will be deprecated 
27in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},o.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},o.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},o.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},o.handleTechClick_=function(t){this.controls_&&(void 0===this.options_||void 0===this.options_.userActions||void 0===this.options_.userActions.click||!1!==this.options_.userActions.click)&&(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,t):this.paused()?Kn(this.play()):this.pause())},o.handleTechDoubleClick_=function(t){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(d){return d.contains(t.target)})||(void 0===this.options_||void 0===this.options_.userActions||void 0===this.options_.userActions.doubleClick||!1!==this.options_.userActions.doubleClick)&&(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,t):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},o.handleTechTap_=function(){this.userActive(!this.userActive())},o.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},o.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},o.handleTechTouchEnd_=function(t){t.cancelable&&t.preventDefault()},o.handleStageClick_=function(){this.reportUserActivity()},o.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},o.documentFullscreenChange_=function(t){var n=t.target.player;if(!n||n===this){var d=this.el(),m=me()[this.fsApi_.fullscreenElement]===d;!m&&d.matches?m=d.matches(":"+this.fsApi_.fullscreen):!m&&d.msMatchesSelector&&(m=d.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(m)}},o.handleTechFullscreenChange_=function(t,n){var d=this;n&&(n.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",function(){d.removeClass("vjs-ios-native-fs")})),this.isFullscreen(n.isFullscreen))},o.handleTechFullscreenError_=function(t,n){this.trigger("fullscreenerror",n)},o.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},o.handleTechEnterPictureInPicture_=function(t){this.isInPictureInPicture(!0)},o.handleTechLeavePictureInPicture_=function(t){this.isInPictureInPicture(!1)},o.handleTechError_=function(){var t=this.tech_.error();this.error(t)},o.handleTechTextData_=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},o.getCache=function(){return this.cache_},o.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}},o.techCall_=function(t,n){this.ready(function(){if(t in vv)return function Lo(g,a,o,s){return a[o](g.reduce(Td(o),s))}(this.middleware_,this.tech_,t,n);if(t in lc)return Ga(this.middleware_,this.tech_,t,n);try{this.tech_&&this.tech_[t](n)}catch(d){throw Qt(d),d}},!0)},o.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in hv)return function cv(g,a,o){return g.reduceRight(Td(o),a[o]())}(this.middleware_,this.tech_,t);if(t in lc)return Ga(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(n){throw void 0===this.tech_[t]?(Qt("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",n),n):"TypeError"===n.name?(Qt("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",n),this.tech_.isReady_=!1,n):(Qt(n),n)}}},o.play=function(){var t=this,n=this.options_.Promise||A().Promise;return n?new n(function(d){t.play_(d)}):this.play_()},o.play_=function(t){var n=this;void 0===t&&(t=Kn),this.playCallbacks_.push(t);var d=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),m=Boolean(uo||Vr);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!d)return this.waitToPlay_=function(L){n.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!d&&m&&this.load());var _=this.techGet_("play");m&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===_?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(_)},o.runPlayTerminatedQueue_=function(){var t=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],t.forEach(function(n){n()})},o.runPlayCallbacks_=function(t){var n=this.playCallbacks_.slice(0);
vendor: 11,549 bytes, line 27
27this.playCallbacks_=[],this.playTerminatedQueue_=[],n.forEach(function(d){d(t)})},o.pause=function(){this.techCall_("pause")},o.paused=function(){return!1!==this.techGet_("paused")},o.played=function(){return this.techGet_("played")||_a(0,0)},o.scrubbing=function(t){if(typeof t>"u")return this.scrubbing_;this.scrubbing_=!!t,this.techCall_("setScrubbing",this.scrubbing_),t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},o.currentTime=function(t){return typeof t<"u"?(t<0&&(t=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",t),void(this.cache_.initTime=0)):(this.cache_.initTime=t,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},o.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},o.duration=function(t){if(void 0===t)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(t=parseFloat(t))<0&&(t=1/0),t!==this.cache_.duration&&(this.cache_.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(t)||this.trigger("durationchange"))},o.remainingTime=function(){return this.duration()-this.currentTime()},o.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},o.buffered=function(){var t=this.techGet_("buffered");return(!t||!t.length)&&(t=_a(0,0)),t},o.bufferedPercent=function(){return Cs(this.buffered(),this.duration())},o.bufferedEnd=function(){var t=this.buffered(),n=this.duration(),d=t.end(t.length-1);return d>n&&(d=n),d},o.volume=function(t){var n;return void 0!==t?(n=Math.max(0,Math.min(1,parseFloat(t))),this.cache_.volume=n,this.techCall_("setVolume",n),void(n>0&&this.lastVolume_(n))):(n=parseFloat(this.techGet_("volume")),isNaN(n)?1:n)},o.muted=function(t){if(void 0===t)return this.techGet_("muted")||!1;this.techCall_("setMuted",t)},o.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},o.lastVolume_=function(t){if(void 0===t||0===t)return this.cache_.lastVolume;this.cache_.lastVolume=t},o.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},o.isFullscreen=function(t){if(void 0!==t){var n=this.isFullscreen_;return this.isFullscreen_=Boolean(t),this.isFullscreen_!==n&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},o.requestFullscreen=function(t){var n=this.options_.Promise||A().Promise;if(n){var d=this;return new n(function(m,_){function S(){d.off("fullscreenerror",B),d.off("fullscreenchange",L)}function L(){S(),m()}function B(q,Z){S(),_(Z)}d.one("fullscreenchange",L),d.one("fullscreenerror",B);var F=d.requestFullscreenHelper_(t);F&&(F.then(S,S),F.then(m,_))})}return this.requestFullscreenHelper_()},o.requestFullscreenHelper_=function(t){var d,n=this;if(this.fsApi_.prefixed||(d=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==t&&(d=t)),this.fsApi_.requestFullscreen){var m=this.el_[this.fsApi_.requestFullscreen](d);return m&&m.then(function(){return n.isFullscreen(!0)},function(){return n.isFullscreen(!1)}),m}this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},o.exitFullscreen=function(){var t=this.options_.Promise||A().Promise;if(t){var n=this;return new t(function(d,m){function _(){n.off("fullscreenerror",L),n.off("fullscreenchange",S)}function S(){_(),d()}function L(F,q){_(),m(q)}n.one("fullscreenchange",S),n.one("fullscreenerror",L);var B=n.exitFullscreenHelper_();B&&(B.then(_,_),B.then(d,m))})}return this.exitFullscreenHelper_()},o.exitFullscreenHelper_=function(){var t=this;if(this.fsApi_.requestFullscreen){var n=me()[this.fsApi_.exitFullscreen]();return n&&Kn(n.then(function(){return t.isFullscreen(!1)})),n}this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},o.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=me().documentElement.style.overflow,on(me(),"keydown",this.boundFullWindowOnEscKey_),me().documentElement.style.overflow="hidden",Vn(me().body,"vjs-full-window"),this.trigger("enterFullWindow")},o.fullWindowOnEscKey=function(t){xe().isEventKey(t,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},o.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,Mi(me(),"keydown",this.boundFullWindowOnEscKey_),me().documentElement.style.overflow=this.docOrigOverflow,Es(me().body,"vjs-full-window"),this.trigger("exitFullWindow")},o.disablePictureInPicture=function(t){if(void 0===t)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",t),this.options_.disablePictureInPicture=t,this.trigger("disablepictureinpicturechanged")},o.isInPictureInPicture=function(t){return void 0!==t?(this.isInPictureInPicture_=!!t,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},o.requestPictureInPicture=function(){if("pictureInPictureEnabled"in me()&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},o.exitPictureInPicture=function(){if("pictureInPictureEnabled"in me())return me().exitPictureInPicture()},o.handleKeyDown=function(t){var _,S,n=this.options_.userActions;n&&n.hotkeys&&(S=(_=this.el_.ownerDocument.activeElement).tagName.toLowerCase(),_.isContentEditable||("input"===S?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(_.type):-1!==["textarea"].indexOf(S))||("function"==typeof n.hotkeys?n.hotkeys.call(this,t):this.handleHotkeys(t)))},o.handleHotkeys=function(t){var n=this.options_.userActions?this.options_.userActions.hotkeys:{},d=n.fullscreenKey,_=n.muteKey,S=void 0===_?function(ne){return xe().isEventKey(ne,"m")}:_,L=n.playPauseKey,B=void 0===L?function(ne){return xe().isEventKey(ne,"k")||xe().isEventKey(ne,"Space")}:L;if((void 0===d?function(ne){return xe().isEventKey(ne,"f")}:d).call(this,t)){t.preventDefault(),t.stopPropagation();var F=et.getComponent("FullscreenToggle");!1!==me()[this.fsApi_.fullscreenEnabled]&&F.prototype.handleClick.call(this,t)}else S.call(this,t)?(t.preventDefault(),t.stopPropagation(),et.getComponent("MuteToggle").prototype.handleClick.call(this,t)):B.call(this,t)&&(t.preventDefault(),t.stopPropagation(),et.getComponent("PlayToggle").prototype.handleClick.call(this,t))},o.canPlayType=function(t){for(var n,d=0,m=this.options_.techOrder;d<m.length;d++){var _=m[d],S=hr.getTech(_);if(S||(S=et.getComponent(_)),S){if(S.isSupported()&&(n=S.canPlayType(t)))return n}else Qt.error('The "'+_+'" tech is undefined. Skipped browser support check for that tech.')}return""},o.selectSource=function(t){var F,n=this,d=this.options_.techOrder.map(function(B){return[B,hr.getTech(B)]}).filter(function(B){var F=B[0],q=B[1];return q?q.isSupported():(Qt.error('The "'+F+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),m=function(F,q,Z){var ne;return F.some(function(re){return q.some(function(De){if(ne=Z(re,De))return!0})}),ne},L=function(F,q){var Z=F[0];if(F[1].canPlaySource(q,n.options_[Z.toLowerCase()]))return{source:q,tech:Z}};return(this.options_.sourceOrder?m(t,d,(F=L,function(q,Z){return F(Z,q)})):m(d,t,L))||!1},o.handleSrc_=function(t,n){var d=this;if(typeof t>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var m=Ed(t);if(m.length){if(this.changingSrc_=!0,n||(this.cache_.sources=m),this.updateSourceCaches_(m[0]),Rs(this,m[0],function(L,B){if(d.middleware_=B,n||(d.cache_.sources=m),d.updateSourceCaches_(L),d.src_(L))return m.length>1?d.handleSrc_(m.slice(1)):(d.changingSrc_=!1,d.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),void d.triggerReady());!function fv(g,a){g.forEach(function(o){return o.setTech&&o.setTech(a)})}(B,d.tech_)}),this.options_.retryOnError&&m.length>1){var _=function(){d.error(null),d.handleSrc_(m.slice(1),!0)},S=function(){d.off("error",_)};this.one("error",_),this.one("playing",S),this.resetRetryOnError_=function(){d.off("error",_),d.off("playing",S)}}}else this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0)},o.src=function(t){return this.handleSrc_(t,!1)},o.src_=function(t){var n=this,d=this.selectSource([t]);return!d||(function(a,o){return ei(a)===ei(o)}(d.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(d.tech,d.source),this.tech_.ready(function(){n.changingSrc_=!1}),!1))},o.load=function(){this.techCall_("load")},o.reset=function(){var t=this,n=this.options_.Promise||A().Promise;this.paused()||!n?this.doReset_():Kn(this.play().then(function(){return t.doReset_()}))},o.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Jr(this)&&this.trigger("playerreset")},o.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},o.resetProgressBar_=function(){this.currentTime(0);var t=this.controlBar||{},n=t.durationDisplay,d=t.remainingTimeDisplay;n&&n.updateContent(),d&&d.updateContent()},o.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},o.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},o.currentSources=function(){var t=this.currentSource(),n=[];return 0!==Object.keys(t).length&&n.push(t),this.cache_.sources||n},o.currentSource=function(){return this.cache_.source||{}},o.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},o.currentType=function(){return this.currentSource()&&this.currentSource().type||""},o.preload=function(t){return void 0!==t?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")},o.autoplay=function(t){if(void 0===t)return this.options_.autoplay||!1;var n;"string"==typeof t&&/(any|play|muted)/.test(t)||!0===t&&this.options_.normalizeAutoplay?(this.options_.autoplay=t,this.manualAutoplay_("string"==typeof t?t:"play"),n=!1):this.options_.autoplay=!!t,n=typeof n>"u"?this.options_.autoplay:n,this.tech_&&this.techCall_("setAutoplay",n)},o.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},o.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},o.poster=function(t){if(void 0===t)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))},o.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},o.controls=function(t){if(void 0===t)return!!this.controls_;this.controls_!==(t=!!t)&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControl
27sListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},o.usingNativeControls=function(t){if(void 0===t)return!!this.usingNativeControls_;this.usingNativeControls_!==(t=!!t)&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},o.error=function(t){var n=this;if(void 0===t)return this.error_||null;if(xn("beforeerror").forEach(function(m){var _=m(n,t);Zi(_)&&!Array.isArray(_)||"string"==typeof _||"number"==typeof _||null===_?t=_:n.log.error("please return a value that MediaError expects in beforeerror hooks")}),this.options_.suppressNotSupportedError&&t&&4===t.code){var d=function(){this.error(t)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],d),void this.one("loadstart",function(){this.off(["click","touchstart"],d)})}if(null===t)return this.error_=t,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new ji(t),this.addClass("vjs-error"),Qt.error("(CODE:"+this.error_.code+" "+ji.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),xn("error").forEach(function(m){return m(n,n.error_)})},o.reportUserActivity=function(t){this.userActivity_=!0},o.userActive=function(t){if(void 0===t)return this.userActive_;if((t=!!t)!==this.userActive_){if(this.userActive_=t,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(n){n.stopPropagation(),n.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},o.listenForUserActivity_=function(){var t,n,d,m=yr(this,this.reportUserActivity),L=function(Z){m(),this.clearInterval(t)};this.on("mousedown",function(){m(),this.clearInterval(t),t=this.setInterval(m,250)}),this.on("mousemove",function(Z){(Z.screenX!==n||Z.screenY!==d)&&(n=Z.screenX,d=Z.screenY,m())}),this.on("mouseup",L),this.on("mouseleave",L);var F,B=this.getChild("controlBar");B&&!Vr&&!An&&(B.on("mouseenter",function(q){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),B.on("mouseleave",function(q){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",m),this.on("keyup",m),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(F);var q=this.options_.inactivityTimeout;q<=0||(F=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},q))}},250)},o.playbackRate=function(t){if(void 0===t)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",t)},o.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},o.isAudio=function(t){if(void 0===t)return!!this.isAudio_;this.isAudio_=!!t},o.enableAudioOnlyUI_=function(){var t=this;this.addClass("vjs-audio-only-mode");var n=this.children(),d=this.getChild("ControlBar"),m=d&&d.currentHeight();n.forEach(function(_){_!==d&&_.el_&&!_.hasClass("vjs-hidden")&&(_.hide(),t.audioOnlyCache_.hiddenChildren.push(_))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(m),this.trigger("audioonlymodechange")},o.disableAudioOnlyUI_=function(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach(function(t){return t.show()}),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")},o.audioOnlyMode=function(t){var n=this;if("boolean"!=typeof t||t===this.audioOnlyMode_)return this.audioOnlyMode_;this.audioOnlyMode_=t;var d=this.options_.Promise||A().Promise;if(d){if(t){var m=[];return this.isInPictureInPicture()&&m.push(this.exitPictureInPicture()),this.isFullscreen()&&m.push(this.exitFullscreen()),this.audioPosterMode()&&m.push(this.audioPosterMode(!1)),d.all(m).then(function(){return n.enableAudioOnlyUI_()})}return d.resolve().then(function(){return n.disableAudioOnlyUI_()})}t?(this.isInPictureInPicture()&&this.exitPictureInPicture(),this.isFullscreen()&&this.exitFullscreen(),this.enableAudioOnlyUI_()):this.disableAudioOnlyUI_()},o.enablePosterModeUI_=function(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},o.disablePosterModeUI_=function(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},o.audioPosterMode=function(t){var n=this;if("boolean"!=typeof t||t===this.audioPosterMode_)return this.audioPosterMode_;this.audioPosterMode_=t;var d=this.options_.Promise||A().Promise;return d?t?this.audioOnlyMode()?this.audioOnlyMode(!1).then(function(){n.enablePosterModeUI_()}):d.resolve().then(function(){n.enablePosterModeUI_()}):d.resolve().then(function(){n.disablePosterModeUI_()}):t?(this.audioOnlyMode()&&this.audioOnlyMode(!1),void this.enablePosterModeUI_()):void this.disablePosterModeUI_()},o.addTextTrack=function(t,n,d){if(this.tech_)return this.tech_.addTextTrack(t,n,d)},o.addRemoteTextTrack=function(t,n){if(this.tech_)return this.tech_.addRemoteTextTrack(t,n)},o.removeRemoteTextTrack=function(t){void 0===t&&(t={});var d=t.track;if(d||(d=t),this.tech_)return this.tech_.removeRemoteTextTrack(d)},o.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},o.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},o.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},o.language=function(t){if(void 0===t)return this.language_;this.language_!==String(t).toLowerCase()&&(this.language_=String(t).toLowerCase(),Jr(this)&&this.trigger("languagechange"))},o.languages=function(){return Dr(a.prototype.options_.languages,this.languages_)},o.toJSON=function(){var t=Dr(this.options_),n=t.tracks;t.tracks=[];for(var d=0;d<n.length;d++){var m=n[d];(m=Dr(m)).player=void 0,t.tracks[d]=m}return t},o.createModal=function(t,n){var d=this;(n=n||{}).content=t||"";var m=new In(this,n);return this.addChild(m),m.on("dispose",function(){d.removeChild(m)}),m.open(),m},o.updateCurrentBreakpoint_=function(){if(this.responsive())for(var t=this.currentBreakpoint(),n=this.currentWidth(),d=0;d<Uo.length;d++){var m=Uo[d];if(n<=this.breakpoints_[m]){if(t===m)return;t&&this.removeClass(Zu[t]),this.addClass(Zu[m]),this.breakpoint_=m;break}}},o.removeCurrentBreakpoint_=function(){var t=this.currentBreakpointClass();this.breakpoint_="",t&&this.removeClass(t)},o.breakpoints=function(t){return void 0===t||(this.breakpoint_="",this.breakpoints_=Ur({},Us,t),this.updateCurrentBreakpoint_()),Ur(this.breakpoints_)},o.responsive=function(t){return void 0===t?this.responsive_:(t=
vendor: 5,519 bytes, line 27
27Boolean(t))!==this.responsive_?(this.responsive_=t,t?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),t):void 0},o.currentBreakpoint=function(){return this.breakpoint_},o.currentBreakpointClass=function(){return Zu[this.breakpoint_]||""},o.loadMedia=function(t,n){var d=this;if(t&&"object"==typeof t){this.reset(),this.cache_.media=Dr(t);var m=this.cache_.media,S=m.poster,L=m.src,B=m.textTracks;!m.artwork&&S&&(this.cache_.media.artwork=[{src:S,type:Do(S)}]),L&&this.src(L),S&&this.poster(S),Array.isArray(B)&&B.forEach(function(F){return d.addRemoteTextTrack(F,!1)}),this.ready(n)}},o.getMedia=function(){if(!this.cache_.media){var t=this.poster(),m={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),function(_){return{kind:_.kind,label:_.label,language:_.language,src:_.src}})};return t&&(m.poster=t,m.artwork=[{src:m.poster,type:Do(m.poster)}]),m}return Dr(this.cache_.media)},a.getTagSettings=function(t){var n={sources:[],tracks:[]},d=sn(t),m=d["data-setup"];if(Ta(t,"vjs-fill")&&(d.fill=!0),Ta(t,"vjs-fluid")&&(d.fluid=!0),null!==m){var _=de()(m||"{}"),S=_[0],L=_[1];S&&Qt.error(S),Ur(d,L)}if(Ur(n,d),t.hasChildNodes())for(var B=t.childNodes,F=0,q=B.length;F<q;F++){var Z=B[F],ne=Z.nodeName.toLowerCase();"source"===ne?n.sources.push(sn(Z)):"track"===ne&&n.tracks.push(sn(Z))}return n},o.flexNotSupported_=function(){var t=me().createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},o.debug=function(t){if(void 0===t)return this.debugEnabled_;t?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},o.playbackRates=function(t){if(void 0===t)return this.cache_.playbackRates;Array.isArray(t)&&t.every(function(n){return"number"==typeof n})&&(this.cache_.playbackRates=t,this.trigger("playbackrateschange"))},a}(et);qi.names.forEach(function(g){var a=qi[g];ii.prototype[a.getterName]=function(){return this.tech_?this.tech_[a.getterName]():(this[a.privateName]=this[a.privateName]||new a.ListClass,this[a.privateName])}}),ii.prototype.crossorigin=ii.prototype.crossOrigin,ii.players={};var Vs=A().navigator;ii.prototype.options_={techOrder:hr.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Vs&&(Vs.languages&&Vs.languages[0]||Vs.userLanguage||Vs.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1},["ended","seeking","seekable","networkState","readyState"].forEach(function(g){ii.prototype[g]=function(){return this.techGet_(g)}}),Xu.forEach(function(g){ii.prototype["handleTech"+ei(g)+"_"]=function(){return this.trigger(g)}}),et.registerComponent("Player",ii);var Ju="plugin",Ni="activePlugins_",Hs={},Vo=function(a){return Hs.hasOwnProperty(a)},Ya=function(a){return Vo(a)?Hs[a]:void 0},Vc=function(a,o){a[Ni]=a[Ni]||{},a[Ni][o]=!0},Ho=function(a,o,s){var t=(s?"before":"")+"pluginsetup";a.trigger(t,o),a.trigger(t+":"+o.name,o)},Hc=function(a,o){return o.prototype.name=a,function(){Ho(this,{name:a,plugin:o,instance:null},!0);for(var s=arguments.length,t=new Array(s),n=0;n<s;n++)t[n]=arguments[n];var d=Je(o,[this].concat(t));return this[a]=function(){return d},Ho(this,d.getEventHash()),d}},Dn=function(){function g(o){if(this.constructor===g)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=o,this.log||(this.log=this.player.log.createLogger(this.name)),Nu(this),delete this.trigger,Bu(this,this.constructor.defaultState),Vc(o,this.name),this.dispose=this.dispose.bind(this),o.on("dispose",this.dispose)}var a=g.prototype;return a.version=function(){return this.constructor.VERSION},a.getEventHash=function(s){return void 0===s&&(s={}),s.name=this.name,s.plugin=this.constructor,s.instance=this,s},a.trigger=function(s,t){return void 0===t&&(t={}),xs(this.eventBusEl_,s,this.getEventHash(t))},a.handleStateChanged=function(s){},a.dispose=function(){var s=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[Ni][s]=!1,this.player=this.state=null,t[s]=Hc(s,Hs[s])},g.isBasic=function(s){var t="string"==typeof s?Ya(s):s;return"function"==typeof t&&!g.prototype.isPrototypeOf(t.prototype)},g.registerPlugin=function(s,t){if("string"!=typeof s)throw new Error('Illegal plugin name, "'+s+'", must be a string, was '+typeof s+".");if(Vo(s))Qt.warn('A plugin named "'+s+'" already exists. You may want to avoid re-registering plugins!');else if(ii.prototype.hasOwnProperty(s))throw new Error('Illegal plugin name, "'+s+'", cannot share a name with an existing player method!');if("function"!=typeof t)throw new Error('Illegal plugin for "'+s+'", must be a function, was '+typeof t+".");return Hs[s]=t,s!==Ju&&(ii.prototype[s]=g.isBasic(t)?function(a,o){var s=function(){Ho(this,{name:a,plugin:o,instance:null},!0);var n=o.apply(this,arguments);return Vc(this,a),Ho(this,{name:a,plugin:o,instance:n}),n};
27return Object.keys(o).forEach(function(t){s[t]=o[t]}),s}(s,t):Hc(s,t)),t},g.deregisterPlugin=function(s){if(s===Ju)throw new Error("Cannot de-register base plugin.");Vo(s)&&(delete Hs[s],delete ii.prototype[s])},g.getPlugins=function(s){var t;return void 0===s&&(s=Object.keys(Hs)),s.forEach(function(n){var d=Ya(n);d&&((t=t||{})[n]=d)}),t},g.getPluginVersion=function(s){var t=Ya(s);return t&&t.VERSION||""},g}();Dn.getPlugin=Ya,Dn.BASE_PLUGIN_NAME=Ju,Dn.registerPlugin(Ju,Dn),ii.prototype.usingPlugin=function(g){return!!this[Ni]&&!0===this[Ni][g]},ii.prototype.hasPlugin=function(g){return!!Vo(g)};var Wd=!1,el=function(a){return 0===a.indexOf("#")?a.slice(1):a};function ye(g,a,o){var s=ye.getPlayer(g);if(s)return a&&Qt.warn('Player "'+g+'" is already initialised. Options will not be applied.'),o&&s.ready(o),s;var t="string"==typeof g?sa("#"+el(g)):g;if(!_s(t))throw new TypeError("The element or ID supplied is not valid. (videojs)");(!t.ownerDocument.defaultView||!t.ownerDocument.body.contains(t))&&Qt.warn("The element supplied is not included in the DOM"),!0===(a=a||{}).restoreEl&&(a.restoreEl=(t.parentNode&&t.parentNode.hasAttribute("data-vjs-player")?t.parentNode:t).cloneNode(!0)),xn("beforesetup").forEach(function(d){var m=d(t,Dr(a));Zi(m)&&!Array.isArray(m)?a=Dr(a,m):Qt.error("please return an object in beforesetup hooks")});var n=et.getComponent("Player");return s=new n(t,a,o),xn("setup").forEach(function(d){return d(s)}),s}if(ye.hooks_=na,ye.hooks=xn,ye.hook=function(a,o){xn(a,o)},ye.hookOnce=function(a,o){xn(a,[].concat(o).map(function(s){return function n(){return Na(a,n),s.apply(void 0,arguments)}}))},ye.removeHook=Na,!0!==A().VIDEOJS_NO_DYNAMIC_STYLE&&Ts()){var tl=sa(".vjs-styles-defaults");if(!tl){tl=Qf("vjs-styles-defaults");var Ks=sa("head");Ks&&Ks.insertBefore(tl,Ks.firstChild),vo(tl,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: 56.25%\n      }\n    ")}}wu(1,ye),ye.VERSION=Nf,ye.options=ii.prototype.options_,ye.getPlayers=function(){return ii.players},ye.getPlayer=function(g){var o,a=ii.players;if("string"==typeof g){var s=el(g),t=a[s];if(t)return t;o=sa("#"+s)}else o=g;if(_s(o)){var d=o.player,m=o.playerId;if(d||a[m])return d||a[m]}},ye.getAllPlayers=function(){return Object.keys(ii.players).map(function(g){return ii.players[g]}).filter(Boolean)},ye.players=ii.players,ye.getComponent=et.getComponent,ye.registerComponent=function(g,a){hr.isTech(a)&&Qt.warn("The "+g+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),et.registerComponent.call(et,g,a)},ye.getTech=hr.getTech,ye.registerTech=hr.registerTech,ye.use=function uc(g,a){Ha[g]=Ha[g]||[],Ha[g].push(a)},Object.defineProperty(ye,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(ye.middleware,"TERMINATOR",{value:Io,writeable:!1,enumerable:!0}),ye.browser=Zl,ye.TOUCH_ENABLED=ma,ye.extend=function(a,o){void 0===o&&(o={}),Wd||(Qt.warn("videojs.extend is deprecated as of Video.js 7.22.0 and will be removed in Video.js 8.0.0"),Wd=!0);var s=function(){a.apply(this,arguments)},t={};for(var n in"object"==typeof o?(o.constructor!==Object.prototype.constructor&&(s=o.constructor),t=o):"function"==typeof o&&(s=o),function rt(g,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(a&&a.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),Object.defineProperty(g,"prototype",{writable:!1}),a&&Xe(g,a)}(s,a),a&&(s.super_=a),t)t.hasOwnProperty(n)&&(s.prototype[n]=t[n]);return s},ye.mergeOptions=Dr,ye.bind=yr,ye.registerPlugin=Dn.registerPlugin,ye.deregisterPlugin=Dn.deregisterPlugin,ye.plugin=function(g,a){return Qt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Dn.registerPlugin(g,a)},ye.getPlugins=Dn.getPlugins,ye.getPlugin=Dn.getPlugin,ye.getPluginVersion=Dn.getPluginVersion,ye.addLanguage=function(g,a){var o;return g=(""+g).toLowerCase(),(ye.options.languages=Dr(ye.options.languages,((o={})[g]=a,o)))[g]},ye.log=Qt,ye.createLogger=ps,ye.createTimeRange=ye.createTimeRanges=_a,ye.formatTime=ja,ye.setFormatTime=function Tv(g){bd=g},ye.resetFormatTime=function jn(){bd=yc},ye.parseUrl=So,ye.isCrossOrigin=Fi,ye.EventTarget=ui,ye.on=on,ye.one=Mu,ye.off=Mi,ye.trigger=xs,ye.xhr=ct(),ye.TextTrack=bo,ye.AudioTrack=xo,ye.VideoTrack=oc,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(g){ye[g]=function(){return Qt.warn("videojs."+g+"() is deprecated; use videojs.dom."+g+"() instead"),co[g].apply(null,arguments)}}),ye.computedStyle=so,ye.dom=co,ye.url=lv,ye.defineLazyProperty=Bs,ye.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});
28/*! @name @videojs/http-streaming @version 2.16.3 @license Apache-2.0 */
29var Pn=qt,rl=function(a,o,s){return a&&s&&s.responseURL&&o!==s.responseURL?s.responseURL:o},_n=function(a){return ye.log.debug?ye.log.debug.bind(ye,"VHS:",a+" >"):function(){}},mi=1/30,yi=.1,Gc=function(a,o){var t,s=[];if(a&&a.length)for(t=0;t<a.length;t++)o(a.start(t),a.end(t))&&s.push([a.start(t),a.end(t)]);return ye.createTimeRanges(s)},js=function(a,o){return Gc(a,function(s,t){return s-yi<=o&&t+yi>=o})},il=function(a,o){return Gc(a,function(s){return s-mi>=o})},Kc=function(a){var o=[];if(!a||!a.length)return"";for(var s=0;s<a.length;s++)o.push(a.start(s)+" => "+a.end(s));return o.join(", ")},Aa=function(a){for(var o=[],s=0;s<a.length;s++)o.push({start:a.start(s),end:a.end(s)});return o}
29,jc=function(a){if(a&&a.length&&a.end)return a.end(a.length-1)},Go=function(a,o){var s=0;if(!a||!a.length)return s;for(var t=0;t<a.length;t++){var n=a.start(t),d=a.end(t);if(!(o>d)){if(o>n&&o<=d){s+=d-o;continue}s+=d-n}}return s},Yd=ye.createTimeRange,nl=function(a,o){if(!o.preload)return o.duration;var s=0;return(o.parts||[]).forEach(function(t){s+=t.duration}),(o.preloadHints||[]).forEach(function(t){"PART"===t.type&&(s+=a.partTargetDuration)}),s},qs=function(a){return(a.segments||[]).reduce(function(o,s,t){return s.parts?s.parts.forEach(function(n,d){o.push({duration:n.duration,segmentIndex:t,partIndex:d,part:n,segment:s})}):o.push({duration:s.duration,segmentIndex:t,partIndex:null,segment:s,part:null}),o},[])},qc=function(a){var o=a.segments&&a.segments.length&&a.segments[a.segments.length-1];return o&&o.parts||[]},Wc=function(a){var o=a.preloadSegment;if(o){var s=o.parts;return(o.preloadHints||[]).reduce(function(d,m){return d+("PART"===m.type?1:0)},0)+(s&&s.length?s.length:0)}},al=function(a,o){if(o.endList)return 0;if(a&&a.suggestedPresentationDelay)return a.suggestedPresentationDelay;var s=qc(o).length>0;return s&&o.serverControl&&o.serverControl.partHoldBack?o.serverControl.partHoldBack:s&&o.partTargetDuration?3*o.partTargetDuration:o.serverControl&&o.serverControl.holdBack?o.serverControl.holdBack:o.targetDuration?3*o.targetDuration:0},zc=function(a,o,s){if(typeof o>"u"&&(o=a.mediaSequence+a.segments.length),o<a.mediaSequence)return 0;var t=function(a,o){var s=0,t=o-a.mediaSequence,n=a.segments[t];if(n){if(typeof n.start<"u")return{result:n.start,precise:!0};if(typeof n.end<"u")return{result:n.end-n.duration,precise:!0}}for(;t--;){if(typeof(n=a.segments[t]).end<"u")return{result:s+n.end,precise:!0};if(s+=nl(a,n),typeof n.start<"u")return{result:s+n.start,precise:!0}}return{result:s,precise:!1}}(a,o);if(t.precise)return t.result;var n=function(a,o){for(var t,s=0,n=o-a.mediaSequence;n<a.segments.length;n++){if(typeof(t=a.segments[n]).start<"u")return{result:t.start-s,precise:!0};if(s+=nl(a,t),typeof t.end<"u")return{result:t.end-s,precise:!0}}return{result:-1,precise:!1}}(a,o);return n.precise?n.result:t.result+s},zd=function(a,o,s){if(!a)return 0;if("number"!=typeof s&&(s=0),typeof o>"u"){if(a.totalDuration)return a.totalDuration;if(!a.endList)return A()[1/0]}return zc(a,o,s)},$a=function(a){var o=a.defaultDuration,s=a.durationList,t=a.startIndex,n=a.endIndex,d=0;if(t>n){var m=[n,t];t=m[0],n=m[1]}if(t<0){for(var _=t;_<Math.min(0,n);_++)d+=o;t=0}for(var S=t;S<n;S++)d+=s[S].duration;return d},Ko=function(a,o,s,t){if(!a||!a.segments)return null;if(a.endList)return zd(a);if(null===o)return null;var n=zc(a,a.mediaSequence+a.segments.length,o=o||0);return s&&(n-=t="number"==typeof t?t:al(null,a)),Math.max(0,n)},Xc=function(a){return a.excludeUntil&&a.excludeUntil>Date.now()},$d=function(a){return a.excludeUntil&&a.excludeUntil===1/0},Ws=function(a){var o=Xc(a);return!a.disabled&&!o},Qc=function(a,o){return o.attributes&&o.attributes[a]},jo=function(a,o){if(1===a.playlists.length)return!0;var s=o.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===a.playlists.filter(function(t){return!!Ws(t)&&(t.attributes.BANDWIDTH||0)<s}).length},sl=function(a,o){return!(!a&&!o||!a&&o||a&&!o||!(a===o||a.id&&o.id&&a.id===o.id||a.resolvedUri&&o.resolvedUri&&a.resolvedUri===o.resolvedUri||a.uri&&o.uri&&a.uri===o.uri))},Qd=function(a,o){var s=a&&a.mediaGroups&&a.mediaGroups.AUDIO||{},t=!1;for(var n in s){for(var d in s[n])if(t=o(s[n][d]))break;if(t)break}return!!t},qo=function(a){if(!a||!a.playlists||!a.playlists.length)return Qd(a,function(d){return d.playlists&&d.playlists.length||d.uri});for(var s=function(m){var _=a.playlists[m],S=_.attributes&&_.attributes.CODECS;return S&&S.split(",").every(function(B){return Mr(B)})||Qd(a,function(B){return sl(_,B)})?"continue":{v:!1}},t=0;t<a.playlists.length;t++){var n=s(t);if("continue"!==n&&"object"==typeof n)return n.v}return!0},Wi={liveEdgeDelay:al,duration:zd,seekable:function(a,o,s){var n=o||0,d=Ko(a,o,!0,s);return null===d?Yd():Yd(n,d)},getMediaInfoForTime:function(a){for(var o=a.playlist,s=a.currentTime,t=a.startingSegmentIndex,n=a.startingPartIndex,d=a.startTime,m=a.experimentalExactManifestTimings,_=s-d,S=qs(o),L=0,B=0;B<S.length;B++){var F=S[B];if(t===F.segmentIndex&&("number"!=typeof n||"number"!=typeof F.partIndex||n===F.partIndex)){L=B;break}}if(_<0){if(L>0)for(var q=L-1;q>=0;q--){var Z=S[q];if(_+=Z.duration,m){if(_<0)continue}else if(_+mi<=0)continue;return{partIndex:Z.partIndex,segmentIndex:Z.segmentIndex,startTime:d-$a({defaultDuration:o.targetDuration,durationList:S,startIndex:L,endIndex:q})}}return{partIndex:S[0]&&S[0].partIndex||null,segmentIndex:S[0]&&S[0].segmentIndex||0,startTime:s}}if(L<0){for(var ne=L;ne<0;ne++)if((_-=o.targetDuration)<0)return{partIndex:S[0]&&S[0].partIndex||null,segmentIndex:S[0]&&S[0].segmentIndex||0,startTime:s};L=0}for(var re=L;re<S.length;re++){var De=S[re];if(_-=De.duration,m){if(_>0)continue}else if(_-mi>=0)continue;return{partIndex:De.partIndex,segmentIndex:De.segmentIndex,startTime:d+$a({defaultDuration:o.targetDuration,durationList:S,startIndex:L,endIndex:re})}}return{segmentIndex:S[S.length-1].segmentIndex,partIndex:S[S.length-1].partIndex,startTime:s}},isEnabled:Ws,isDisabled:function(a){return a.disabled},isBlacklisted:Xc,isIncompatible:$d,playlistEnd:Ko,isAes:function(a){for(var o=0;o<a.segments.length;o++)if(a.segments[o].key)return!0;return!1},hasAttribute:Qc,estimateSegmentRequestTime:function(a,o,s,t){return void 0===t&&(t=0),Qc("BANDWIDTH",s)?(a*s.attributes.BANDWIDTH-8*t)/o:NaN},isLowestEnabledRendition:jo,isAudioOnly:qo,playlistMatch:sl,segmentDurationWithParts:nl},Zc=ye.log,Wo=function(a,o){return a+"-"+o},Jc=function(a,o,s){return"placeholder-uri-"+a+"-"+o+"-"+s},Ys=function(a,o){a.mediaGroups&&["AUDIO","SUBTITLES"].forEach(function(s){if(a.mediaGroups[s])for(var t in a.mediaGroups[s])for(var n in a.mediaGroups[s][t])o(a.mediaGroups[s][t][n],s,t,n)})},ol=function(a){var o=a.playlist,s=a.uri;o.id=a.id,o.playlistErrors_=0,s&&(o.uri=s),o.attributes=o.attributes||{}},rh=function(a,o,s){void 0===s&&(s=Jc),a.uri=o;for(var t=0;t<a.playlists.length;t++)a.playlists[t].uri||(a.playlists[t].uri="placeholder-uri-"+t);var d=qo(a);Ys(a,function(m,_,S,L){if(!m.playlists||!m.playlists.length){if(d&&"AUDIO"===_&&!m.uri)for(var B=0;B<a.playlists.length;B++){var F=a.playlists[B];if(F.attributes&&F.attributes.AUDIO&&F.attributes.AUDIO===S)return}m.playlists=[be({},m)]}
vendor: 5,520 bytes, line 29
29m.playlists.forEach(function(q,Z){var ne=s(_,S,L,q),re=Wo(Z,ne);q.uri?q.resolvedUri=q.resolvedUri||Pn(a.uri,q.uri):(q.uri=0===Z?ne:re,q.resolvedUri=q.uri),q.id=q.id||re,q.attributes=q.attributes||{},a.playlists[q.id]=q,a.playlists[q.uri]=q})}),function(a){for(var o=a.playlists.length;o--;){var s=a.playlists[o];ol({playlist:s,id:Wo(o,s.uri)}),s.resolvedUri=Pn(a.uri,s.uri),a.playlists[s.id]=s,a.playlists[s.uri]=s,s.attributes.BANDWIDTH||Zc.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(a),function(a){Ys(a,function(o){o.uri&&(o.resolvedUri=Pn(a.uri,o.uri))})}(a)},Xa=ye.mergeOptions,nh=function(a,o){if(!a)return o;var s=Xa(a,o);if(a.preloadHints&&!o.preloadHints&&delete s.preloadHints,a.parts&&!o.parts)delete s.parts;else if(a.parts&&o.parts)for(var t=0;t<o.parts.length;t++)a.parts&&a.parts[t]&&(s.parts[t]=Xa(a.parts[t],o.parts[t]));return!a.skipped&&o.skipped&&(s.skipped=!1),a.preload&&!o.preload&&(s.preload=!1),s},Jd=function(a,o){!a.resolvedUri&&a.uri&&(a.resolvedUri=Pn(o,a.uri)),a.key&&!a.key.resolvedUri&&(a.key.resolvedUri=Pn(o,a.key.uri)),a.map&&!a.map.resolvedUri&&(a.map.resolvedUri=Pn(o,a.map.uri)),a.map&&a.map.key&&!a.map.key.resolvedUri&&(a.map.key.resolvedUri=Pn(o,a.map.key.uri)),a.parts&&a.parts.length&&a.parts.forEach(function(s){s.resolvedUri||(s.resolvedUri=Pn(o,s.uri))}),a.preloadHints&&a.preloadHints.length&&a.preloadHints.forEach(function(s){s.resolvedUri||(s.resolvedUri=Pn(o,s.uri))})},ah=function(a){var o=a.segments||[],s=a.preloadSegment;if(s&&s.parts&&s.parts.length){if(s.preloadHints)for(var t=0;t<s.preloadHints.length;t++)if("MAP"===s.preloadHints[t].type)return o;s.duration=a.targetDuration,s.preload=!0,o.push(s)}return o},sh=function(a,o){return a===o||a.segments&&o.segments&&a.segments.length===o.segments.length&&a.endList===o.endList&&a.mediaSequence===o.mediaSequence&&a.preloadSegment===o.preloadSegment},ef=function(a,o,s){void 0===s&&(s=sh);var t=Xa(a,{}),n=t.playlists[o.id];if(!n||s(n,o))return null;o.segments=ah(o);var d=Xa(n,o);if(d.preloadSegment&&!o.preloadSegment&&delete d.preloadSegment,n.segments){if(o.skip){o.segments=o.segments||[];for(var m=0;m<o.skip.skippedSegments;m++)o.segments.unshift({skipped:!0})}d.segments=function(a,o,s){var t=a.slice(),n=o.slice();s=s||0;for(var m,d=[],_=0;_<n.length;_++){var S=t[_+s],L=n[_];S?(m=S.map||m,d.push(nh(S,L))):(m&&!L.map&&(L.map=m),d.push(L))}return d}(n.segments,o.segments,o.mediaSequence-n.mediaSequence)}d.segments.forEach(function(S){Jd(S,d.resolvedUri)});for(var _=0;_<t.playlists.length;_++)t.playlists[_].id===o.id&&(t.playlists[_]=d);return t.playlists[o.id]=d,t.playlists[o.uri]=d,Ys(a,function(S,L,B,F){if(S.playlists)for(var q=0;q<S.playlists.length;q++)o.id===S.playlists[q].id&&(S.playlists[q]=d)}),t},tf=function(a,o){var s=a.segments||[],t=s[s.length-1],n=t&&t.parts&&t.parts[t.parts.length-1],d=n&&n.duration||t&&t.duration;return o&&d?1e3*d:500*(a.partTargetDuration||a.targetDuration||10)},Qa=function(g){function a(s,t,n){var d;if(void 0===n&&(n={}),d=g.call(this)||this,!s)throw new Error("A non-empty playlist URL or object is required");d.logger_=_n("PlaylistLoader");var _=n.withCredentials,S=void 0!==_&&_,L=n.handleManifestRedirects,B=void 0!==L&&L;d.src=s,d.vhs_=t,d.withCredentials=S,d.handleManifestRedirects=B;var F=t.options_;return d.customTagParsers=F&&F.customTagParsers||[],d.customTagMappers=F&&F.customTagMappers||[],d.experimentalLLHLS=F&&F.experimentalLLHLS||!1,ye.browser.IE_VERSION&&(d.experimentalLLHLS=!1),d.state="HAVE_NOTHING",d.handleMediaupdatetimeout_=d.handleMediaupdatetimeout_.bind(Pe(d)),d.on("mediaupdatetimeout",d.handleMediaupdatetimeout_),d}ae(a,g);var o=a.prototype;return o.handleMediaupdatetimeout_=function(){var t=this;if("HAVE_METADATA"===this.state){var n=this.media(),d=Pn(this.master.uri,n.uri);this.experimentalLLHLS&&(d=function(a,o){if(o.endList||!o.serverControl)return a;var s={};if(o.serverControl.canBlockReload){var t=o.preloadSegment,n=o.mediaSequence+o.segments.length;if(t){var d=t.parts||[],m=Wc(o)-1;m>-1&&m!==d.length-1&&(s._HLS_part=m),(m>-1||d.length)&&n--}s._HLS_msn=n}if(o.serverControl&&o.serverControl.canSkipUntil&&(s._HLS_skip=o.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(s).length){var _=new(A().URL)(a);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(S){s.hasOwnProperty(S)&&_.searchParams.set(S,s[S])}),a=_.toString()}return a}(d,n)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:d,withCredentials:this.withCredentials},function(m,_){if(t.request){if(m)return t.playlistRequestError(t.request,t.media(),"HAVE_METADATA");t.haveMetadata({playlistString:t.request.responseText,url:t.media().uri,id:t.media().id})}})}},o.playlistRequestError=function(t,n,d){var m=n.uri,_=n.id;this.request=null,d&&(this.state=d),this.error={playlist:this.master.playlists[_],status:t.status,message:"HLS playlist request error at URL: "+m+".",responseText:t.responseText,code:t.status>=500?4:2},this.trigger("error")},o.parseManifest_=function(t){var n=this,d=t.url;return function(a){var o=a.onwarn,s=a.oninfo,t=a.manifestString,n=a.customTagParsers,d=void 0===n?[]:n,m=a.customTagMappers,_=void 0===m?[]:m,S=a.experimentalLLHLS,L=new Ze;o&&L.on("warn",o),s&&L.on("info",s),d.forEach(function(ne){return L.addParser(ne)}),_.forEach(function(ne){return L.addTagMapper(ne)}),L.push(t),L.end();var B=L.manifest;if(S||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(ne){B.hasOwnProperty(ne)&&delete B[ne]}
29),B.segments&&B.segments.forEach(function(ne){["parts","preloadHints"].forEach(function(re){ne.hasOwnProperty(re)&&delete ne[re]})})),!B.targetDuration){var F=10;B.segments&&B.segments.length&&(F=B.segments.reduce(function(ne,re){return Math.max(ne,re.duration)},0)),o&&o("manifest has no targetDuration defaulting to "+F),B.targetDuration=F}var q=qc(B);if(q.length&&!B.partTargetDuration){var Z=q.reduce(function(ne,re){return Math.max(ne,re.duration)},0);o&&(o("manifest has no partTargetDuration defaulting to "+Z),Zc.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),B.partTargetDuration=Z}return B}({onwarn:function(S){return n.logger_("m3u8-parser warn for "+d+": "+S.message)},oninfo:function(S){return n.logger_("m3u8-parser info for "+d+": "+S.message)},manifestString:t.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},o.haveMetadata=function(t){var n=t.playlistString,d=t.playlistObject,m=t.url,_=t.id;this.request=null,this.state="HAVE_METADATA";var S=d||this.parseManifest_({url:m,manifestString:n});S.lastRequest=Date.now(),ol({playlist:S,uri:m,id:_});var L=ef(this.master,S);this.targetDuration=S.partTargetDuration||S.targetDuration,this.pendingMedia_=null,L?(this.master=L,this.media_=this.master.playlists[_]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(tf(this.media(),!!L)),this.trigger("loadedplaylist")},o.dispose=function(){this.trigger("dispose"),this.stopRequest(),A().clearTimeout(this.mediaUpdateTimeout),A().clearTimeout(this.finalRenditionTimeout),this.off()},o.stopRequest=function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}},o.media=function(t,n){var d=this;if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof t){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}if(A().clearTimeout(this.finalRenditionTimeout),n){var m=(t.partTargetDuration||t.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=A().setTimeout(this.media.bind(this,t,!1),m)}else{var _=this.state,S=!this.media_||t.id!==this.media_.id,L=this.master.playlists[t.id];if(L&&L.endList||t.endList&&t.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=t,void(S&&(this.trigger("mediachanging"),this.trigger("HAVE_MASTER"===_?"loadedmetadata":"mediachange")));if(this.updateMediaUpdateTimeout_(tf(t,!0)),S){if(this.state="SWITCHING_MEDIA",this.request){if(t.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=t,this.request=this.vhs_.xhr({uri:t.resolvedUri,withCredentials:this.withCredentials},function(B,F){if(d.request){if(t.lastRequest=Date.now(),t.resolvedUri=rl(d.handleManifestRedirects,t.resolvedUri,F),B)return d.playlistRequestError(d.request,t,_);d.haveMetadata({playlistString:F.responseText,url:t.uri,id:t.id}),d.trigger("HAVE_MASTER"===_?"loadedmetadata":"mediachange")}})}}},o.pause=function(){this.mediaUpdateTimeout&&(A().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.state=this.media_?"HAVE_METADATA":"HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},o.load=function(t){var n=this;this.mediaUpdateTimeout&&(A().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var d=this.media();if(t){var m=d?(d.partTargetDuration||d.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=A().setTimeout(function(){n.mediaUpdateTimeout=null,n.load()},m)}else this.started?this.trigger(d&&!d.endList?"mediaupdatetimeout":"loadedplaylist"):this.start()},o.updateMediaUpdateTimeout_=function(t){var n=this;this.mediaUpdateTimeout&&(A().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=A().setTimeout(function(){n.mediaUpdateTimeout=null,n.trigger("mediaupdatetimeout"),n.updateMediaUpdateTimeout_(t)},t))},o.start=function(){var t=this;
29if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=A().location.href),this.src.resolvedUri=this.src.uri,void setTimeout(function(){t.setupInitialPlaylist(t.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(n,d){if(t.request){if(t.request=null,n)return t.error={status:d.status,message:"HLS playlist request error at URL: "+t.src+".",responseText:d.responseText,code:2},"HAVE_NOTHING"===t.state&&(t.started=!1),t.trigger("error");t.src=rl(t.handleManifestRedirects,t.src,d);var m=t.parseManifest_({manifestString:d.responseText,url:t.src});t.setupInitialPlaylist(m)}})},o.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},o.setupInitialPlaylist=function(t){if(this.state="HAVE_MASTER",t.playlists)return this.master=t,rh(this.master,this.srcUri()),t.playlists.forEach(function(d){d.segments=ah(d),d.segments.forEach(function(m){Jd(m,d.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var n=this.srcUri()||A().location.href;this.master=function(a,o){var s=Wo(0,o),t={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:A().location.href,resolvedUri:A().location.href,playlists:[{uri:o,id:s,resolvedUri:o,attributes:{}}]};return t.playlists[s]=t.playlists[0],t.playlists[o]=t.playlists[0],t}(0,n),this.haveMetadata({playlistObject:t,url:n,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},a}(ye.EventTarget),Gv=ye.xhr,Kv=ye.mergeOptions,rf=function(a,o,s,t){var n="arraybuffer"===a.responseType?a.response:a.responseText;!o&&n&&(a.responseTime=Date.now(),a.roundTripTime=a.responseTime-a.requestTime,a.bytesReceived=n.byteLength||n.length,a.bandwidth||(a.bandwidth=Math.floor(a.bytesReceived/a.roundTripTime*8*1e3))),s.headers&&(a.responseHeaders=s.headers),o&&"ETIMEDOUT"===o.code&&(a.timedout=!0),!o&&!a.aborted&&200!==s.statusCode&&206!==s.statusCode&&0!==s.statusCode&&(o=new Error("XHR Failed with a response of: "+(a&&(n||a.responseText)))),t(o,a)},oh=function(){var a=function o(s,t){s=Kv({timeout:45e3},s);var n=o.beforeRequest||ye.Vhs.xhr.beforeRequest;if(n&&"function"==typeof n){var d=n(s);d&&(s=d)}var _=(!0===ye.Vhs.xhr.original?Gv:ye.Vhs.xhr)(s,function(L,B){return rf(_,L,B,t)}),S=_.abort;return _.abort=function(){return _.aborted=!0,S.apply(_,arguments)},_.uri=s.uri,_.requestTime=Date.now(),_};return a.original=!0,a},nf=function(a){var o={};return a.byterange&&(o.Range=function(a){return"bytes="+a.offset+"-"+("bigint"==typeof a.offset||"bigint"==typeof a.length?A().BigInt(a.offset)+A().BigInt(a.length)-A().BigInt(1):a.offset+a.length-1)}(a.byterange)),o},uh=function(a,o){return a.start(o)+"-"+a.end(o)},qv=function(a,o){var s=a.toString(16);return"00".substring(0,2-s.length)+s+(o%2?" ":"")},Wv=function(a){return a>=32&&a<126?String.fromCharCode(a):"."},lh=function(a){var o={};return Object.keys(a).forEach(function(s){var t=a[s];o[s]=Ui(t)?{bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:t}),o},ul=function(a){var o=a.byterange||{length:1/0,offset:0};return[o.length,o.offset,a.resolvedUri].join(",")},ll=function(a){return a.resolvedUri},dh=function(a){for(var o=Array.prototype.slice.call(a),s=16,t="",m=0;m<o.length/s;m++)t+=o.slice(m*s,m*s+s).map(qv).join("")+" "+o.slice(m*s,m*s+s).map(Wv).join("")+"\n";return t},zv=Object.freeze({__proto__:null,createTransferableMessage:lh,initSegmentId:ul,segmentKeyId:ll,hexDump:dh,tagDump:function(a){return dh(a.bytes)},textRanges:function(a){var s,o="";for(s=0;s<a.length;s++)o+=uh(a,s)+" ";return o}}),cl=function g(a){var o=a.programTime,s=a.playlist,t=a.retryCount,n=void 0===t?2:t,d=a.seekTo,m=a.pauseAfterSeek,_=void 0===m||m,S=a.tech,L=a.callback;if(!L)throw new Error("seekToProgramTime: callback must be provided");if(typeof o>"u"||!s||!d)return L({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!s.endList&&!S.hasStarted_)return L({message:"player must be playing a live stream to start buffering"});if(!function(a){if(!a.segments||0===a.segments.length)return!1;for(var o=0;o<a.segments.length;o++)if(!a.segments[o].dateTimeObject)return!1;return!0}(s))return L({message:"programDateTime tags must be provided in the manifest "+s.resolvedUri});var B=function(a,o){var s;try{s=new Date(a)}catch(B){return null}if(!o||!o.segments||0===o.segments.length)return null;var t=o.segments[0];if(s<t.dateTimeObject)return null;for(var n=0;n<o.segments.length-1&&(t=o.segments[n],!(s<o.segments[n+1].dateTimeObject));n++);var m=o.segments[o.segments.length-1],_=m.dateTimeObject,S=m.videoTimingInfo?function(a){return a.transmuxedPresentationEnd-a.transmuxedPresentationStart-a.transmuxerPrependedSeconds}(m.videoTimingInfo):m.duration+.25*m.duration;return s>new Date(_.getTime()+1e3*S)?null:(s>_&&(t=m),{segment:t,estimatedStart:t.videoTimingInfo?t.videoTimingInfo.transmuxedPresentationStart:Wi.duration(o,o.mediaSequence+o.segments.indexOf(t)),type:t.videoTimingInfo?"accurate":"estimate"})}(o,s);if(!B)return L({message:o+" was not found in the stream"});var F=B.segment,q=function(a,o){var s,t;try{s=new Date(a),t=new Date(o)}catch(m){}var n=s.getTime();return(t.getTime()-n)/1e3}(F.dateTimeObject,o);if("estimate"===B.type)return 0===n?L({message:o+" is not buffered yet. Try again"}):(d(B.estimatedStart+q),void S.one("seeked",function(){g({programTime:o,playlist:s,retryCount:n-1,seekTo:d,pauseAfterSeek:_,tech:S,callback:L})}));var Z=F.start+q;S.one("seeked",function(){return L(null,S.currentTime())}),_&&S.pause(),d(Z)},of=function(a,o){if(4===a.readyState)return o()},uf=ye.mergeOptions,lf=function(a,o){if(!sh(a,o)||a.sidx&&o.sidx&&
29(a.sidx.offset!==o.sidx.offset||a.sidx.length!==o.sidx.length))return!1;if(!a.sidx&&o.sidx||a.sidx&&!o.sidx||a.segments&&!o.segments||!a.segments&&o.segments)return!1;if(!a.segments&&!o.segments)return!0;for(var s=0;s<a.segments.length;s++){var t=a.segments[s],n=o.segments[s];if(t.uri!==n.uri)return!1;if(t.byterange||n.byterange){var d=t.byterange,m=n.byterange;if(d&&!m||!d&&m||d.offset!==m.offset||d.length!==m.length)return!1}}return!0},vh=function(a,o,s,t){return"placeholder-uri-"+a+"-"+o+"-"+(t.attributes.NAME||s)},rp=function(a,o){return(Boolean(!a.map&&!o.map)||Boolean(a.map&&o.map&&a.map.byterange.offset===o.map.byterange.offset&&a.map.byterange.length===o.map.byterange.length))&&a.uri===o.uri&&a.byterange.offset===o.byterange.offset&&a.byterange.length===o.byterange.length},ph=function(a,o){var s={};for(var t in a){var d=a[t].sidx;if(d){var m=Tr(d);if(!o[m])break;rp(o[m].sidxInfo,d)&&(s[m]=o[m])}}return s},hl=function(g){function a(s,t,n,d){var m;void 0===n&&(n={}),(m=g.call(this)||this).masterPlaylistLoader_=d||Pe(m),d||(m.isMaster_=!0);var S=n.withCredentials,L=void 0!==S&&S,B=n.handleManifestRedirects,F=void 0!==B&&B;if(m.vhs_=t,m.withCredentials=L,m.handleManifestRedirects=F,!s)throw new Error("A non-empty playlist URL or object is required");return m.on("minimumUpdatePeriod",function(){m.refreshXml_()}),m.on("mediaupdatetimeout",function(){m.refreshMedia_(m.media().id)}),m.state="HAVE_NOTHING",m.loadedPlaylists_={},m.logger_=_n("DashPlaylistLoader"),m.isMaster_?(m.masterPlaylistLoader_.srcUrl=s,m.masterPlaylistLoader_.sidxMapping_={}):m.childPlaylist_=s,m}ae(a,g);var o=a.prototype;return o.requestErrored_=function(t,n,d){return!this.request||(this.request=null,t?(this.error="object"!=typeof t||t instanceof Error?{status:n.status,message:"DASH request error at URL: "+n.uri,response:n.response,code:2}:t,d&&(this.state=d),this.trigger("error"),!0):void 0)},o.addSidxSegments_=function(t,n,d){var m=this,_=t.sidx&&Tr(t.sidx);if(t.sidx&&_&&!this.masterPlaylistLoader_.sidxMapping_[_]){var S=rl(this.handleManifestRedirects,t.sidx.resolvedUri),L=function(F,q){if(!m.requestErrored_(F,q,n)){var ne,Z=m.masterPlaylistLoader_.sidxMapping_;try{ne=mn()(yt(q.response).subarray(8))}catch(re){return void m.requestErrored_(re,q,n)}return Z[_]={sidxInfo:t.sidx,sidx:ne},wi(t,ne,t.sidx.resolvedUri),d(!0)}};this.request=function(a,o,s){var n,t=[],d=!1,m=function(F,q,Z,ne){return q.abort(),d=!0,s(F,q,Z,ne)},_=function(F,q){if(!d){if(F)return m(F,q,"",t);var Z=q.responseText.substring(t&&t.byteLength||0,q.responseText.length);if(t=function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];if((o=o.filter(function(m){return m&&(m.byteLength||m.length)&&"string"!=typeof m})).length<=1)return yt(o[0]);var t=o.reduce(function(m,_,S){return m+(_.byteLength||_.length)},0),n=new Uint8Array(t),d=0;return o.forEach(function(m){m=yt(m),n.set(m,d),d+=m.byteLength}),n}(t,Zn(Z,!0)),n=n||ee(t),t.length<10||n&&t.length<n+2)return of(q,function(){return m(F,q,"",t)});var ne=bu(t);return"ts"===ne&&t.length<188||!ne&&t.length<376?of(q,function(){return m(F,q,"",t)}):m(null,q,ne,t)}},L=o({uri:a,beforeSend:function(F){F.overrideMimeType("text/plain; charset=x-user-defined"),F.addEventListener("progress",function(q){return rf(F,null,{statusCode:F.status},_)})}},function(B,F){return rf(L,B,F,_)});return L}(S,this.vhs_.xhr,function(B,F,q,Z){if(B)return L(B,F);if(!q||"mp4"!==q)return L({status:F.status,message:"Unsupported "+(q||"unknown")+" container type for sidx segment at URL: "+S,response:"",playlist:t,internal:!0,blacklistDuration:1/0,code:2},F);var ne=t.sidx.byterange,re=ne.offset,De=ne.length;if(Z.length>=De+re)return L(B,{response:Z.subarray(re,re+De),status:F.status,uri:F.uri});m.request=m.vhs_.xhr({uri:S,responseType:"arraybuffer",headers:nf({byterange:t.sidx.byterange})},L)})}else this.mediaRequest_=A().setTimeout(function(){return d(!1)},0)},o.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},A().clearTimeout(this.minimumUpdatePeriodTimeout_),A().clearTimeout(this.mediaRequest_),A().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},o.hasPendingRequest=function(){return this.request||this.mediaRequest_},o.stopRequest=function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}},o.media=function(t){var n=this;if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var d=this.state;if("string"==typeof t){if(!this.masterPlaylistLoader_.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.masterPlaylistLoader_.master.playlists[t]}var m=!this.media_||t.id!==this.media_.id;if(m&&this.loadedPlaylists_[t.id]&&this.loadedPlaylists_[t.id].endList)return this.state="HAVE_METADATA",this.media_=t,void(m&&(this.trigger("mediachanging"),this.trigger("mediachange")));m&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(t,d,function(_){n.haveMetadata({startingState:d,playlist:t})}))},o.haveMetadata=function(t){var n=t.startingState,d=t.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[d.id]=d,this.mediaRequest_=null,this.refreshMedia_(d.id),this.trigger("HAVE_MASTER"===n?"loadedmetadata":"mediachange")},o.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),A().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(A().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},o.load=function(t){var n=this;A().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var d=this.media();if(t){var m=d?d.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=A().setTimeout(function(){return n.load()},m)}else this.started?d&&!d.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},o.start=function(){var t=this;this.started=!0,this.isMaster_?this.requestMaster_(function(n,d){t.haveMaster_(),!t.hasPendingRequest()&&!t.media_&&t.media(t.masterPlaylistLoader_.master.playlists[0])}):this.mediaRequest_=A().setTimeout(function(){return t.haveMaster_()},0)},o.requestMaster_=function(t){var n=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(d,m){if(!n.requestErrored_(d,m)){var _=m.responseText!==n.masterPlaylistLoader_.masterXml_;return n.masterPlaylistLoader_.masterXml_=m.responseText,n.masterLoaded_=m.responseHeaders&&m.responseHeaders.date?Date.parse(m.responseHeaders.date):Date.now(),n.masterPlaylistLoader_.srcUrl=rl(n.handleManifestRedirects,n.masterPlaylistLoader_.srcUrl,m),_?(n.handleMaster_(),void n.syncClientServerClock_(function(){return t(m,_)})):t(m,_)}"HAVE_NOTHING"===n.state&&(n.started=!1)})}
29,o.syncClientServerClock_=function(t){var n=this,d=function(a){return function(a){var o=Nr(a,"UTCTiming")[0];if(!o)return null;var s=gi(o);switch(s.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":s.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":s.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":s.method="DIRECT",s.value=Date.parse(s.value);break;default:throw new Error("UNSUPPORTED_UTC_TIMING_SCHEME")}return s}(io(a))}(this.masterPlaylistLoader_.masterXml_);return null===d?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),t()):"DIRECT"===d.method?(this.masterPlaylistLoader_.clientOffset_=d.value-Date.now(),t()):void(this.request=this.vhs_.xhr({uri:Pn(this.masterPlaylistLoader_.srcUrl,d.value),method:d.method,withCredentials:this.withCredentials},function(m,_){if(n.request){if(m)return n.masterPlaylistLoader_.clientOffset_=n.masterLoaded_-Date.now(),t();var S;S="HEAD"===d.method?_.responseHeaders&&_.responseHeaders.date?Date.parse(_.responseHeaders.date):n.masterLoaded_:Date.parse(_.responseText),n.masterPlaylistLoader_.clientOffset_=S-Date.now(),t()}}))},o.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},o.handleMaster_=function(){this.mediaRequest_=null;var t=this.masterPlaylistLoader_.master,n=function(a){var s=a.srcUrl,m=function(a,o){void 0===o&&(o={});var s=function(a,o){void 0===o&&(o={});var s=o,t=s.manifestUri,n=void 0===t?"":t,d=s.NOW,m=void 0===d?Date.now():d,_=s.clientOffset,S=void 0===_?0:_,L=Nr(a,"Period");if(!L.length)throw new Error("INVALID_NUMBER_OF_PERIOD");var B=Nr(a,"Location"),F=gi(a),q=Gi([n],Nr(a,"BaseURL"));F.type=F.type||"static",F.sourceDuration=F.mediaPresentationDuration||0,F.NOW=m,F.clientOffset=S,B.length&&(F.locations=B.map(to));var Z=[];return L.forEach(function(ne,re){var De=gi(ne),Ye=Z[re-1];De.start=function(a){var o=a.attributes,s=a.priorPeriodAttributes;return"number"==typeof o.start?o.start:s&&"number"==typeof s.start&&"number"==typeof s.duration?s.start+s.duration:s||"static"!==a.mpdType?null:0}({attributes:De,priorPeriodAttributes:Ye?Ye.attributes:null,mpdType:F.type}),Z.push({node:ne,attributes:De})}),{locations:F.locations,representationInfo:Ri(Z.map(Tu(F,q)))}}(io(a),o),t=function(a){return a.map(mu)}(s.representationInfo);return hu({dashPlaylists:t,locations:s.locations,sidxMapping:o.sidxMapping,previousManifest:o.previousManifest})}(a.masterXml,{manifestUri:s,clientOffset:a.clientOffset,sidxMapping:a.sidxMapping,previousManifest:a.previousManifest});return rh(m,s,vh),m}({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:t});t&&(n=function(a,o,s){for(var t=!0,n=uf(a,{duration:o.duration,minimumUpdatePeriod:o.minimumUpdatePeriod,timelineStarts:o.timelineStarts}),d=0;d<o.playlists.length;d++){var m=o.playlists[d];if(m.sidx){var _=Tr(m.sidx);s&&s[_]&&s[_].sidx&&wi(m,s[_].sidx,m.sidx.resolvedUri)}var S=ef(n,m,lf);S&&(n=S,t=!1)}return Ys(o,function(L,B,F,q){if(L.playlists&&L.playlists.length){var Z=L.playlists[0].id,ne=ef(n,L.playlists[0],lf);ne&&(q in(n=ne).mediaGroups[B][F]||(n.mediaGroups[B][F][q]=L),n.mediaGroups[B][F][q].playlists[0]=n.playlists[Z],t=!1)}}),function(a,o){Ys(a,function(s,t,n,d){d in o.mediaGroups[t][n]||delete a.mediaGroups[t][n][d]})}(n,o),o.minimumUpdatePeriod!==a.minimumUpdatePeriod&&(t=!1),t?null:n}(t,n,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=n||t;var d=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return d&&d!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=d),(!t||n&&n.minimumUpdatePeriod!==t.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(n)},o.updateMinimumUpdatePeriodTimeout_=function(){var t=this.masterPlaylistLoader_;t.createMupOnMedia_&&(t.off("loadedmetadata",t.createMupOnMedia_),t.createMupOnMedia_=null),t.minimumUpdatePeriodTimeout_&&(A().clearTimeout(t.minimumUpdatePeriodTimeout_),t.minimumUpdatePeriodTimeout_=null);var n=t.master&&t.master.minimumUpdatePeriod;0===n&&(t.media()?n=1e3*t.media().targetDuration:(t.createMupOnMedia_=t.updateMinimumUpdatePeriodTimeout_,t.one("loadedmetadata",t.createMupOnMedia_))),"number"!=typeof n||n<=0?n<0&&this.logger_("found invalid minimumUpdatePeriod of "+n+", not setting a timeout"):this.createMUPTimeout_(n)},o.createMUPTimeout_=function(t){var n=this.masterPlaylistLoader_;n.minimumUpdatePeriodTimeout_=A().setTimeout(function(){n.minimumUpdatePeriodTimeout_=null,n.trigger("minimumUpdatePeriod"),n.createMUPTimeout_(t)},t)},o.refreshXml_=function(){var t=this;this.requestMaster_(function(n,d){d&&(t.media_&&(t.media_=t.masterPlaylistLoader_.master.playlists[t.media_.id]),t.masterPlaylistLoader_.sidxMapping_=function(a,o){var t=ph(a.playlists,o);return Ys(a,function(n,d,m,_){n.playlists&&n.playlists.length&&(t=uf(t,ph(n.playlists,o)))}),t}(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.sidxMapping_),t.addSidxSegments_(t.media(),t.state,function(m){t.refreshMedia_(t.media().id)}))})},o.refreshMedia_=function(t){var n=this;if(!t)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var d=this.masterPlaylistLoader_.master.playlists,m=!this.media_||this.media_!==d[t];m?this.media_=d[t]:this.trigger("playlistunchanged"),this.mediaUpdateTimeout||function S(){n.media().endList||(n.mediaUpdateTimeout=A().setTimeout(function(){n.trigger("mediaupdatetimeout"),S()},tf(n.media(),Boolean(m))))}(),this.trigger("loadedplaylist")},a}(ye.EventTarget),ni={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},ff=function(a){return a.on=a.addEventListener,a.off=a.removeEventListener,a},h=function(a){return function(){var o=function(a){try{return URL.createObjectURL(new Blob([a],{type:"application/javascript"}))}catch(s){var o=new BlobBuilder;return o.append(a),URL.createObjectURL(o.getBlob())}}(a),s=ff(new Worker(o));s.objURL=o;var t=s.terminate;return s.on=s.addEventListener,s.off=s.removeEventListener,s.terminate=function(){return URL.revokeObjectURL(o),t.call(this)},s}},l=function(a){return"var browserWorkerPolyFill = "+ff.toString()+";\nbrowserWorkerPolyFill(self);\n"+a},i=function(a){return a.toString().replace(/^function.+?{/,"").slice(0,-1)},e=l(i(function(){var g=function(){this.init=function(){var b={};this.on=function(P,D){b[P]||(b[P]=[]),b[P]=b[P].concat(D)},this.off=function(P,D){var R;
vendor: 5,676 bytes, line 29
29return!!b[P]&&(R=b[P].indexOf(D),b[P]=b[P].slice(),b[P].splice(R,1),R>-1)},this.trigger=function(P){var D,R,U,V;if(D=b[P])if(2===arguments.length)for(U=D.length,R=0;R<U;++R)D[R].call(this,arguments[1]);else{for(V=[],R=arguments.length,R=1;R<arguments.length;++R)V.push(arguments[R]);for(U=D.length,R=0;R<U;++R)D[R].apply(this,V)}},this.dispose=function(){b={}}}};g.prototype.pipe=function(W){return this.on("data",function(b){W.push(b)}),this.on("done",function(b){W.flush(b)}),this.on("partialdone",function(b){W.partialFlush(b)}),this.on("endedtimeline",function(b){W.endTimeline(b)}),this.on("reset",function(b){W.reset(b)}),W},g.prototype.push=function(W){this.trigger("data",W)},g.prototype.flush=function(W){this.trigger("done",W)},g.prototype.partialFlush=function(W){this.trigger("partialdone",W)},g.prototype.endTimeline=function(W){this.trigger("endedtimeline",W)},g.prototype.reset=function(W){this.trigger("reset",W)};var d,m,_,S,L,B,F,q,Z,ne,re,De,Ye,gt,Ne,Be,st,je,Ge,tt,qe,Ut,Et,Yt,Rr,Gr,hi,Ei,Wr,tn,Sr,Th,Wn,ts,Qs,eu,W,b,a=g,o=Math.pow(2,32),t={getUint64:function(b){var D,P=new DataView(b.buffer,b.byteOffset,b.byteLength);return P.getBigUint64?(D=P.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(D):D:P.getUint32(0)*o+P.getUint32(4)},MAX_UINT32:o},n=t.MAX_UINT32;(function(){var W;if(Et={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(W in Et)Et.hasOwnProperty(W)&&(Et[W]=[W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2),W.charCodeAt(3)]);Yt=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),Gr=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),Rr=new Uint8Array([0,0,0,1]),hi=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Ei=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Wr={video:hi,audio:Ei},Th=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Sr=new Uint8Array([0,0,0,0,0,0,0,0]),Wn=new Uint8Array([0,0,0,0,0,0,0,0]),ts=Wn,Qs=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),eu=Wn,tn=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),d=function(b){var R,U,P=[],D=0;for(R=1;R<arguments.length;R++)P.push(arguments[R]);for(R=P.length;R--;)D+=P[R].byteLength;for(U=new Uint8Array(D+8),new DataView(U.buffer,U.byteOffset,U.byteLength).setUint32(0,U.byteLength),U.set(b,4),R=0,D=8;R<P.length;R++)U.set(P[R],D),D+=P[R].byteLength;return U},m=function(){return d(Et.dinf,d(Et.dref,Th))},_=function(b){return d(Et.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,b.audioobjecttype<<3|b.samplingfrequencyindex>>>1,b.samplingfrequencyindex<<7|b.channelcount<<3,6,1,2]))},S=function(){return d(Et.ftyp,Yt,Rr,Yt,Gr)},Be=function(b){return d(Et.hdlr,Wr[b])},L=function(b){return d(Et.mdat,b)},Ne=function(b){var P=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,b.duration>>>24&255,b.duration>>>16&255,b.duration>>>8&255,255&b.duration,85,196,0,0]);return b.samplerate&&(P[12]=b.samplerate>>>24&255,P[13]=b.samplerate>>>16&255,P[14]=b.samplerate>>>8&255,P[15]=255&b.samplerate),d(Et.mdhd,P)},gt=function(b){return d(Et.mdia,Ne(b),Be(b.type),F(b))},B=function(b){return d(Et.mfhd,new Uint8Array([0,0,0,0,(4278190080&b)>>24,(16711680&b)>>16,(65280&b)>>8,255&b]))},F=function(b){return d(Et.minf,"video"===b.type?d(Et.vmhd,tn):d(Et.smhd,Sr),m(),je(b))},q=function(b,P){for(var D=[],R=P.length;R--;)D[R]=tt(P[R]);return d.apply(null,[Et.moof,B(b)].concat(D))},Z=function(b){for(var P=b.length,D=[];P--;)D[P]=De(b[P]);return d.apply(null,[Et.moov,re(4294967295)].concat(D).concat(ne(b)))},ne=function(b){for(var P=b.length,D=[];P--;)D[P]=qe(b[P]);return d.apply(null,[Et.mvex].concat(D))},re=function(b){var P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&b)>>24,(16711680&b)>>16,(65280&b)>>8,255&b,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return d(Et.mvhd,P)},st=function(b){var R,U,P=b.samples||[],D=new Uint8Array(4+P.length);for(U=0;U<P.length;U++)D[U+4]=(R=P[U].flags).dependsOn<<4|R.isDependedOn<<2|R.hasRedundancy;return d(Et.sdtp,D)},je=function(b){return d(Et.stbl,Ge(b),d(Et.stts,eu),d(Et.stsc,ts),d(Et.stsz,Qs),d(Et.stco,Wn))},Ge=function(D){return d(Et.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===D.type?W(D):b(D))},W=function(D){var se,ge,R=D.sps||[],U=D.pps||[],V=[],te=[];for(se=0;se<R.length;se++)V.push((65280&R[se].byteLength)>>>8),V.push(255&R[se].byteLength),V=V.concat(Array.prototype.slice.call(R[se]));for(se=0;se<U.length;se++)te.push((65280&U[se].byteLength)>>>8),te.push(255&U[se].byteLength),te=te.concat(Array.prototype.slice.call(U[se]));if(ge=[Et.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&D.width)>>8,255&D.width,(65280&D.height)>>8,255&D.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),d(Et.avcC,new Uint8Array([1,D.profileIdc,D.profileCompatibility,D.levelIdc,255].concat([R.length],V,[U.length],te))),d(Et.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],D.sarRatio){var he=D.sarRatio[0],_e=D.sarRatio[1];ge.push(d(Et.pasp,new Uint8Array([(4278190080&he)>>24,(16711680&he)>>16,(65280&he)>
vendor: 4,163 bytes, line 29
29>8,255&he,(4278190080&_e)>>24,(16711680&_e)>>16,(65280&_e)>>8,255&_e])))}return d.apply(null,ge)},b=function(D){return d(Et.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&D.channelcount)>>8,255&D.channelcount,(65280&D.samplesize)>>8,255&D.samplesize,0,0,0,0,(65280&D.samplerate)>>8,255&D.samplerate,0,0]),_(D))},Ye=function(b){var P=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&b.id)>>24,(16711680&b.id)>>16,(65280&b.id)>>8,255&b.id,0,0,0,0,(4278190080&b.duration)>>24,(16711680&b.duration)>>16,(65280&b.duration)>>8,255&b.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&b.width)>>8,255&b.width,0,0,(65280&b.height)>>8,255&b.height,0,0]);return d(Et.tkhd,P)},tt=function(b){var P,D,R,U,te,se;return P=d(Et.tfhd,new Uint8Array([0,0,0,58,(4278190080&b.id)>>24,(16711680&b.id)>>16,(65280&b.id)>>8,255&b.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),te=Math.floor(b.baseMediaDecodeTime/n),se=Math.floor(b.baseMediaDecodeTime%n),D=d(Et.tfdt,new Uint8Array([1,0,0,0,te>>>24&255,te>>>16&255,te>>>8&255,255&te,se>>>24&255,se>>>16&255,se>>>8&255,255&se])),"audio"===b.type?(R=Ut(b,92),d(Et.traf,P,D,R)):(U=st(b),R=Ut(b,U.length+92),d(Et.traf,P,D,R,U))},De=function(b){return b.duration=b.duration||4294967295,d(Et.trak,Ye(b),gt(b))},qe=function(b){var P=new Uint8Array([0,0,0,0,(4278190080&b.id)>>24,(16711680&b.id)>>16,(65280&b.id)>>8,255&b.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==b.type&&(P[P.length-1]=0),d(Et.trex,P)},function(){var W,b,P;P=function(R,U){var V=0,te=0,se=0,ge=0;return R.length&&(void 0!==R[0].duration&&(V=1),void 0!==R[0].size&&(te=2),void 0!==R[0].flags&&(se=4),void 0!==R[0].compositionTimeOffset&&(ge=8)),[0,0,V|te|se|ge,1,(4278190080&R.length)>>>24,(16711680&R.length)>>>16,(65280&R.length)>>>8,255&R.length,(4278190080&U)>>>24,(16711680&U)>>>16,(65280&U)>>>8,255&U]},b=function(R,U){var V,te,se,ge,he,_e;for(se=P(ge=R.samples||[],U+=20+16*ge.length),(te=new Uint8Array(se.length+16*ge.length)).set(se),V=se.length,_e=0;_e<ge.length;_e++)te[V++]=(4278190080&(he=ge[_e]).duration)>>>24,te[V++]=(16711680&he.duration)>>>16,te[V++]=(65280&he.duration)>>>8,te[V++]=255&he.duration,te[V++]=(4278190080&he.size)>>>24,te[V++]=(16711680&he.size)>>>16,te[V++]=(65280&he.size)>>>8,te[V++]=255&he.size,te[V++]=he.flags.isLeading<<2|he.flags.dependsOn,te[V++]=he.flags.isDependedOn<<6|he.flags.hasRedundancy<<4|he.flags.paddingValue<<1|he.flags.isNonSyncSample,te[V++]=61440&he.flags.degradationPriority,te[V++]=15&he.flags.degradationPriority,te[V++]=(4278190080&he.compositionTimeOffset)>>>24,te[V++]=(16711680&he.compositionTimeOffset)>>>16,te[V++]=(65280&he.compositionTimeOffset)>>>8,te[V++]=255&he.compositionTimeOffset;return d(Et.trun,te)},W=function(R,U){var V,te,se,ge,he,_e;for(se=P(ge=R.samples||[],U+=20+8*ge.length),(V=new Uint8Array(se.length+8*ge.length)).set(se),te=se.length,_e=0;_e<ge.length;_e++)V[te++]=(4278190080&(he=ge[_e]).duration)>>>24,V[te++]=(16711680&he.duration)>>>16,V[te++]=(65280&he.duration)>>>8,V[te++]=255&he.duration,V[te++]=(4278190080&he.size)>>>24,V[te++]=(16711680&he.size)>>>16,V[te++]=(65280&he.size)>>>8,V[te++]=255&he.size;return d(Et.trun,V)},Ut=function(R,U){return"audio"===R.type?W(R,U):b(R,U)}}();var lp,fp,cp,_h,hp,kp,Rp,wp,Da_mdat=L,Da_moof=q,Pp=function(b,P){var D={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return D.dataOffset=P,D.compositionTimeOffset=b.pts-b.dts,D.duration=b.duration,D.size=4*b.length,D.size+=b.byteLength,b.keyFrame&&(D.flags.dependsOn=2,D.flags.isNonSyncSample=0),D},Zs=[33,16,5,32,164,27],up=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],br=function(b){for(var P=[];b--;)P.push(0);return P};fp=function(b){return 9e4*b},cp=function(b,P){return b*P},_h=function(b){return b/9e4},hp=function(b,P){return b/P},kp=function(b,P){return fp(hp(b,P))},Rp=function(b,P){return cp(_h(b),P)},wp=function(b,P,D){return _h(D?b:b-P)};var vr_secondsToVideoTs=fp,vr_videoTsToSeconds=_h,vr_audioTsToVideoTs=kp,vr_videoTsToAudioTs=Rp,vr_metadataTsToSeconds=wp,Eh_prefixWithSilence=function(b,P,D,R){var U,he,_e,Ve,V=0,te=0,se=0,ge=0;
29if(P.length&&(U=vr_audioTsToVideoTs(b.baseMediaDecodeTime,b.samplerate),V=Math.ceil(9e4/(b.samplerate/1024)),D&&R&&(te=U-Math.max(D,R),ge=(se=Math.floor(te/V))*V),!(se<1||ge>45e3))){for((he=function(){if(!lp){var b={96e3:[Zs,[227,64],br(154),[56]],88200:[Zs,[231],br(170),[56]],64e3:[Zs,[248,192],br(240),[56]],48e3:[Zs,[255,192],br(268),[55,148,128],br(54),[112]],44100:[Zs,[255,192],br(268),[55,163,128],br(84),[112]],32e3:[Zs,[255,192],br(268),[55,234],br(226),[112]],24e3:[Zs,[255,192],br(268),[55,255,128],br(268),[111,112],br(126),[224]],16e3:[Zs,[255,192],br(268),[55,255,128],br(268),[111,255],br(269),[223,108],br(195),[1,192]],12e3:[up,br(268),[3,127,248],br(268),[6,255,240],br(268),[13,255,224],br(268),[27,253,128],br(259),[56]],11025:[up,br(268),[3,127,248],br(268),[6,255,240],br(268),[13,255,224],br(268),[27,255,192],br(268),[55,175,128],br(108),[112]],8e3:[up,br(268),[3,121,16],br(47),[7]]};lp=function(b){return Object.keys(b).reduce(function(P,D){return P[D]=new Uint8Array(b[D].reduce(function(R,U){return R.concat(U)},[])),P},{})}(b)}return lp}()[b.samplerate])||(he=P[0].data),_e=0;_e<se;_e++)P.splice(0,0,{data:he,dts:(Ve=P[0]).dts-V,pts:Ve.pts-V});return b.baseMediaDecodeTime-=Math.floor(vr_videoTsToAudioTs(ge,b.samplerate)),ge}},da_clearDtsInfo=function(b){delete b.minSegmentDts,delete b.maxSegmentDts,delete b.minSegmentPts,delete b.maxSegmentPts},da_calculateTrackBaseMediaDecodeTime=function(b,P){var D,U=b.minSegmentDts;return P||(U-=b.timelineStartInfo.dts),D=b.timelineStartInfo.baseMediaDecodeTime,D+=U,D=Math.max(0,D),"audio"===b.type&&(D*=b.samplerate/9e4,D=Math.floor(D)),D},da_collectDtsInfo=function(b,P){"number"==typeof P.pts&&(void 0===b.timelineStartInfo.pts&&(b.timelineStartInfo.pts=P.pts),b.minSegmentPts=void 0===b.minSegmentPts?P.pts:Math.min(b.minSegmentPts,P.pts),b.maxSegmentPts=void 0===b.maxSegmentPts?P.pts:Math.max(b.maxSegmentPts,P.pts)),"number"==typeof P.dts&&(void 0===b.timelineStartInfo.dts&&(b.timelineStartInfo.dts=P.dts),b.minSegmentDts=void 0===b.minSegmentDts?P.dts:Math.min(b.minSegmentDts,P.dts),b.maxSegmentDts=void 0===b.maxSegmentDts?P.dts:Math.max(b.maxSegmentDts,P.dts))},On=function W(b){b=b||{},W.prototype.init.call(this),this.parse708captions_="boolean"!=typeof b.parse708captions||b.parse708captions,this.captionPackets_=[],this.ccStreams_=[new ri(0,0),new ri(0,1),new ri(1,0),new ri(1,1)],this.parse708captions_&&(this.cc708Stream_=new wr({captionServices:b.captionServices})),this.reset(),this.ccStreams_.forEach(function(P){P.on("data",this.trigger.bind(this,"data")),P.on("partialdone",this.trigger.bind(this,"partialdone")),P.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};(On.prototype=new a).push=function(W){var b,P,D;if("sei_rbsp"===W.nalUnitType&&(b=function(b){for(var P=0,D={payloadType:-1,payloadSize:0},R=0,U=0;P<b.byteLength&&128!==b[P];){for(;255===b[P];)R+=255,P++;for(R+=b[P++];255===b[P];)U+=255,P++;if(U+=b[P++],!D.payload&&4===R){if("GA94"===String.fromCharCode(b[P+3],b[P+4],b[P+5],b[P+6])){D.payloadType=R,D.payloadSize=U,D.payload=b.subarray(P,P+U);break}D.payload=void 0}P+=U,R=0,U=0}return D}(W.escapedRBSP)).payload&&4===b.payloadType&&(P=function(b){return 181!==b.payload[0]||49!=(b.payload[1]<<8|b.payload[2])||"GA94"!==String.fromCharCode(b.payload[3],b.payload[4],b.payload[5],b.payload[6])||3!==b.payload[7]?null:b.payload.subarray(8,b.payload.length-1)}(b))){if(W.dts<this.latestDts_)return void(this.ignoreNextEqualDts_=!0);if(W.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));D=function(b,P){var R,U,V,te,D=[];if(!(64&P[0]))return D;for(U=31&P[0],R=0;R<U;R++)te={type:3&P[2+(V=3*R)],pts:b},4&P[V+2]&&(te.ccData=P[V+3]<<8|P[V+4],D.push(te));return D}(W.pts,P),this.captionPackets_=this.captionPackets_.concat(D),this.latestDts_!==W.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=W.dts}}
vendor: 4,934 bytes, line 29
29,On.prototype.flushCCStreams=function(W){this.ccStreams_.forEach(function(b){return"flush"===W?b.flush():b.partialFlush()},this)},On.prototype.flushStream=function(W){this.captionPackets_.length?(this.captionPackets_.forEach(function(b,P){b.presortIndex=P}),this.captionPackets_.sort(function(b,P){return b.pts===P.pts?b.presortIndex-P.presortIndex:b.pts-P.pts}),this.captionPackets_.forEach(function(b){b.type<2?this.dispatchCea608Packet(b):this.dispatchCea708Packet(b)},this),this.captionPackets_.length=0,this.flushCCStreams(W)):this.flushCCStreams(W)},On.prototype.flush=function(){return this.flushStream("flush")},On.prototype.partialFlush=function(){return this.flushStream("partialFlush")},On.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(W){W.reset()})},On.prototype.dispatchCea608Packet=function(W){this.setsTextOrXDSActive(W)?this.activeCea608Channel_[W.type]=null:this.setsChannel1Active(W)?this.activeCea608Channel_[W.type]=0:this.setsChannel2Active(W)&&(this.activeCea608Channel_[W.type]=1),null!==this.activeCea608Channel_[W.type]&&this.ccStreams_[(W.type<<1)+this.activeCea608Channel_[W.type]].push(W)},On.prototype.setsChannel1Active=function(W){return 4096==(30720&W.ccData)},On.prototype.setsChannel2Active=function(W){return 6144==(30720&W.ccData)},On.prototype.setsTextOrXDSActive=function(W){return 256==(28928&W.ccData)||4138==(30974&W.ccData)||6186==(30974&W.ccData)},On.prototype.dispatchCea708Packet=function(W){this.parse708captions_&&this.cc708Stream_.push(W)};var bm={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Sh=function(b){return 32<=b&&b<=127||160<=b&&b<=255},rs=function(b){this.windowNum=b,this.reset()};rs.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},rs.prototype.getText=function(){return this.rows.join("\n")},rs.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},rs.prototype.newLine=function(W){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(W),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},rs.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},rs.prototype.addText=function(W){this.rows[this.rowIdx]+=W},rs.prototype.backspace=function(){if(!this.isEmpty()){var W=this.rows[this.rowIdx];this.rows[this.rowIdx]=W.substr(0,W.length-1)}};var bh=function(b,P,D){this.serviceNum=b,this.text="",this.currentWindow=new rs(-1),this.windows=[],this.stream=D,"string"==typeof P&&this.createTextDecoder(P)};bh.prototype.init=function(W,b){this.startPts=W;for(var P=0;P<8;P++)this.windows[P]=new rs(P),"function"==typeof b&&(this.windows[P].beforeRowOverflow=b)},bh.prototype.setCurrentWindow=function(W){this.currentWindow=this.windows[W]},bh.prototype.createTextDecoder=function(W){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(W)}catch(b){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+W+" encoding. "+b})}};var wr=function W(b){b=b||{},W.prototype.init.call(this);var U,P=this,D=b.captionServices||{},R={};Object.keys(D).forEach(function(V){U=D[V],/^SERVICE/.test(V)&&(R[V]=U.encoding)}),this.serviceEncodings=R,this.current708Packet=null,this.services={},this.push=function(V){3===V.type?(P.new708Packet(),P.add708Bytes(V)):(null===P.current708Packet&&P.new708Packet(),P.add708Bytes(V))}};wr.prototype=new a,wr.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},wr.prototype.add708Bytes=function(W){var b=W.ccData,P=b>>>8,D=255&b;this.current708Packet.ptsVals.push(W.pts),this.current708Packet.data.push(P),this.current708Packet.data.push(D)},wr.prototype.push708Packet=function(){var W=this.current708Packet,b=W.data,P=null,D=null,R=0,U=b[R++];for(W.seq=U>>6,W.sizeCode=63&U;R<b.length;R++)D=31&(U=b[R++]),7==(P=U>>5)&&D>0&&(P=U=b[R++]),this.pushServiceBlock(P,R,D),D>0&&(R+=D-1)},wr.prototype.pushServiceBlock=function(W,b,P){var D,R=b,U=this.current708Packet.data,V=this.services[W];for(V||(V=this.initService(W,R));R<b+P&&R<U.length;
vendor: 9,070 bytes, line 29
29R++)Sh(D=U[R])?R=this.handleText(R,V):24===D?R=this.multiByteCharacter(R,V):16===D?R=this.extendedCommands(R,V):128<=D&&D<=135?R=this.setCurrentWindow(R,V):152<=D&&D<=159?R=this.defineWindow(R,V):136===D?R=this.clearWindows(R,V):140===D?R=this.deleteWindows(R,V):137===D?R=this.displayWindows(R,V):138===D?R=this.hideWindows(R,V):139===D?R=this.toggleWindows(R,V):151===D?R=this.setWindowAttributes(R,V):144===D?R=this.setPenAttributes(R,V):145===D?R=this.setPenColor(R,V):146===D?R=this.setPenLocation(R,V):143===D?V=this.reset(R,V):8===D?V.currentWindow.backspace():12===D?V.currentWindow.clearText():13===D?V.currentWindow.pendingNewLine=!0:14===D?V.currentWindow.clearText():141===D&&R++},wr.prototype.extendedCommands=function(W,b){var D=this.current708Packet.data[++W];return Sh(D)&&(W=this.handleText(W,b,{isExtended:!0})),W},wr.prototype.getPts=function(W){return this.current708Packet.ptsVals[Math.floor(W/2)]},wr.prototype.initService=function(W,b){var D,R,P=this;return(D="SERVICE"+W)in this.serviceEncodings&&(R=this.serviceEncodings[D]),this.services[W]=new bh(W,R,P),this.services[W].init(this.getPts(b),function(U){P.flushDisplayed(U,P.services[W])}),this.services[W]},wr.prototype.handleText=function(W,b,P){var he,_e,D=P&&P.isExtended,U=this.current708Packet.data,V=D?4096:0,te=U[W],ge=b.currentWindow;return b.textDecoder_&&!D?(P&&P.isMultiByte?(_e=[te,U[W+1]],W++):_e=[te],he=b.textDecoder_.decode(new Uint8Array(_e))):he=function(b){var P=bm[b]||b;return 4096&b&&b===P?"":String.fromCharCode(P)}(V|te),ge.pendingNewLine&&!ge.isEmpty()&&ge.newLine(this.getPts(W)),ge.pendingNewLine=!1,ge.addText(he),W},wr.prototype.multiByteCharacter=function(W,b){var P=this.current708Packet.data,R=P[W+2];return Sh(P[W+1])&&Sh(R)&&(W=this.handleText(++W,b,{isMultiByte:!0})),W},wr.prototype.setCurrentWindow=function(W,b){return b.setCurrentWindow(7&this.current708Packet.data[W]),W},wr.prototype.defineWindow=function(W,b){var P=this.current708Packet.data,D=P[W];b.setCurrentWindow(7&D);var U=b.currentWindow;return D=P[++W],U.visible=(32&D)>>5,U.rowLock=(16&D)>>4,U.columnLock=(8&D)>>3,U.priority=7&D,D=P[++W],U.relativePositioning=(128&D)>>7,U.anchorVertical=127&D,D=P[++W],U.anchorHorizontal=D,D=P[++W],U.anchorPoint=(240&D)>>4,U.rowCount=15&D,D=P[++W],U.columnCount=63&D,D=P[++W],U.windowStyle=(56&D)>>3,U.penStyle=7&D,U.virtualRowCount=U.rowCount+1,W},wr.prototype.setWindowAttributes=function(W,b){var P=this.current708Packet.data,D=P[W],R=b.currentWindow.winAttr;return D=P[++W],R.fillOpacity=(192&D)>>6,R.fillRed=(48&D)>>4,R.fillGreen=(12&D)>>2,R.fillBlue=3&D,D=P[++W],R.borderType=(192&D)>>6,R.borderRed=(48&D)>>4,R.borderGreen=(12&D)>>2,R.borderBlue=3&D,D=P[++W],R.borderType+=(128&D)>>5,R.wordWrap=(64&D)>>6,R.printDirection=(48&D)>>4,R.scrollDirection=(12&D)>>2,R.justify=3&D,D=P[++W],R.effectSpeed=(240&D)>>4,R.effectDirection=(12&D)>>2,R.displayEffect=3&D,W},wr.prototype.flushDisplayed=function(W,b){for(var P=[],D=0;D<8;D++)b.windows[D].visible&&!b.windows[D].isEmpty()&&P.push(b.windows[D].getText());b.endPts=W,b.text=P.join("\n\n"),this.pushCaption(b),b.startPts=W},wr.prototype.pushCaption=function(W){""!==W.text&&(this.trigger("data",{startPts:W.startPts,endPts:W.endPts,text:W.text,stream:"cc708_"+W.serviceNum}),W.text="",W.startPts=W.endPts)},wr.prototype.displayWindows=function(W,b){var D=this.current708Packet.data[++W],R=this.getPts(W);this.flushDisplayed(R,b);for(var U=0;U<8;U++)D&1<<U&&(b.windows[U].visible=1);return W},wr.prototype.hideWindows=function(W,b){var D=this.current708Packet.data[++W],R=this.getPts(W);this.flushDisplayed(R,b);for(var U=0;U<8;U++)D&1<<U&&(b.windows[U].visible=0);return W},wr.prototype.toggleWindows=function(W,b){var D=this.current708Packet.data[++W],R=this.getPts(W);this.flushDisplayed(R,b);for(var U=0;U<8;U++)D&1<<U&&(b.windows[U].visible^=1);return W},wr.prototype.clearWindows=function(W,b){var D=this.current708Packet.data[++W],R=this.getPts(W);this.flushDisplayed(R,b);for(var U=0;U<8;U++)D&1<<U&&b.windows[U].clearText();return W},wr.prototype.deleteWindows=function(W,b){var D=this.current708Packet.data[++W],R=this.getPts(W);this.flushDisplayed(R,b);for(var U=0;U<8;U++)D&1<<U&&b.windows[U].reset();return W},wr.prototype.setPenAttributes=function(W,b){var P=this.current708Packet.data,D=P[W],R=b.currentWindow.penAttr;return D=P[++W],R.textTag=(240&D)>>4,R.offset=(12&D)>>2,R.penSize=3&D,D=P[++W],R.italics=(128&D)>>7,R.underline=(64&D)>>6,R.edgeType=(56&D)>>3,R.fontStyle=7&D,W},wr.prototype.setPenColor=function(W,b){var P=this.current708Packet.data,D=P[W],R=b.currentWindow.penColor;return D=P[++W],R.fgOpacity=(192&D)>>6,R.fgRed=(48&D)>>4,R.fgGreen=(12&D)>>2,R.fgBlue=3&D,D=P[++W],R.bgOpacity=(192&D)>>6,R.bgRed=(48&D)>>4,R.bgGreen=(12&D)>>2,R.bgBlue=3&D,D=P[++W],R.edgeRed=(48&D)>>4,R.edgeGreen=(12&D)>>2,R.edgeBlue=3&D,W},wr.prototype.setPenLocation=function(W,b){var P=this.current708Packet.data,D=P[W],R=b.currentWindow.penLoc;return b.currentWindow.pendingNewLine=!0,D=P[++W],R.row=15&D,D=P[++W],R.column=63&D,W},wr.prototype.reset=function(W,b){var P=this.getPts(W);return this.flushDisplayed(P,b),this.initService(b.serviceNum,W)};var Am={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},xh=function(b){return null===b?"":(b=Am[b]||b,String.fromCharCode(b))},Cm=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],tu=function(){for(var b=[],P=15;P--;)b.push("");return b},ri=function W(b,P){W.prototype.init.call(this),this.field_=b||0,this.dataChannel_=P||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(D){var R,U,V,te,se;if((R=32639&D.ccData)!==this.lastControlCode_){if(4096==(61440&R)?this.lastControlCode_=R:R!==this.PADDING_&&(this.lastControlCode_=null),V=R>>>8,te=255&R,R!==this.PADDING_)if(R===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(R===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(D.pts),this.flushDisplayed(D.pts),U=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=U,this.startPts_=D.pts;else if(R===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(D.pts);else if(R===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(D.pts);else if(R===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(D.pts);else if(R===this.CARRIAGE_RETURN_)this.clearFormatting(D.pts),this.flushDisplayed(D.pts),this.shiftRowsUp_(),this.startPts_=D.pts;else if(R===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(R===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(D.pts),this.displayed_=tu();else if(R===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=tu();else if(R===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(D.pts),this.displayed_=tu()),this.mode_="paintOn",this.startPts_=D.pts;else if(this.isSpecialCharacter(V,te))se=xh((V=(3&V)<<8)|te),this[this.mode_](D.pts,se),this.column_++;else if(this.isExtCharacter(V,te))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),se=xh((V=(3&V)<<8)|te),this[this.mode_](D.pts,se),this.column_++;else if(this.isMidRowCode(V,te))this.clearFormatting(D.pts),this[this.mode_](D.pts," "),this.column_++,14==(14&te)&&this.addFormatting(D.pts,["i"]),1==(1&te)&&this.addFormatting(D.pts,["u"]);else if(this.isOffsetControlCode(V,te))this.column_+=3&te;else if(this.isPAC(V,te)){var ge=Cm.indexOf(7968&R);"rollUp"===this.mode_&&(ge-this.rollUpRows_+1<0&&(ge=this.rollUpRows_-1),this.setRollUp(D.pts,ge)),ge!==this.row_&&(this.clearFormatting(D.pts),this.row_=ge),1&te&&-1===this.formatting_.indexOf("u")&&this.addFormatting(D.pts,["u"]),16==(16&R)&&(this.column_=4*((14&R)>>1)),this.isColorPAC(te)&&14==(14&te)&&this.addFormatting(D.pts,["i"])}else this.isNormalChar(V)&&(0===te&&(te=null),se=xh(V),se+=xh(te),this[this.mode_](D.pts,se),this.column_+=se.length)}else this.lastControlCode_=null}};ri.prototype=new a,ri.prototype.flushDisplayed=function(W){var b=this.displayed_.map(function(P,D){try{return P.trim()}catch(R){return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+D+"."}),""}},this).join("\n").replace(/^\n+|\n+$/g,"");b.length&&this.trigger("data",{startPts:this.startPts_,endPts:W,text:b,stream
vendor: 8,848 bytes, line 29
29:this.name_})},ri.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=tu(),this.nonDisplayed_=tu(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},ri.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},ri.prototype.isSpecialCharacter=function(W,b){return W===this.EXT_&&b>=48&&b<=63},ri.prototype.isExtCharacter=function(W,b){return(W===this.EXT_+1||W===this.EXT_+2)&&b>=32&&b<=63},ri.prototype.isMidRowCode=function(W,b){return W===this.EXT_&&b>=32&&b<=47},ri.prototype.isOffsetControlCode=function(W,b){return W===this.OFFSET_&&b>=33&&b<=35},ri.prototype.isPAC=function(W,b){return W>=this.BASE_&&W<this.BASE_+8&&b>=64&&b<=127},ri.prototype.isColorPAC=function(W){return W>=64&&W<=79||W>=96&&W<=127},ri.prototype.isNormalChar=function(W){return W>=32&&W<=127},ri.prototype.setRollUp=function(W,b){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(W),this.nonDisplayed_=tu(),this.displayed_=tu()),void 0!==b&&b!==this.row_)for(var P=0;P<this.rollUpRows_;P++)this.displayed_[b-P]=this.displayed_[this.row_-P],this.displayed_[this.row_-P]="";void 0===b&&(b=this.row_),this.topRow_=b-this.rollUpRows_+1},ri.prototype.addFormatting=function(W,b){this.formatting_=this.formatting_.concat(b);var P=b.reduce(function(D,R){return D+"<"+R+">"},"");this[this.mode_](W,P)},ri.prototype.clearFormatting=function(W){if(this.formatting_.length){var b=this.formatting_.reverse().reduce(function(P,D){return P+"</"+D+">"},"");this.formatting_=[],this[this.mode_](W,b)}},ri.prototype.popOn=function(W,b){var P=this.nonDisplayed_[this.row_];this.nonDisplayed_[this.row_]=P+=b},ri.prototype.rollUp=function(W,b){var P=this.displayed_[this.row_];this.displayed_[this.row_]=P+=b},ri.prototype.shiftRowsUp_=function(){var W;for(W=0;W<this.topRow_;W++)this.displayed_[W]="";for(W=this.row_+1;W<15;W++)this.displayed_[W]="";for(W=this.topRow_;W<this.row_;W++)this.displayed_[W]=this.displayed_[W+1];this.displayed_[this.row_]=""},ri.prototype.paintOn=function(W,b){var P=this.displayed_[this.row_];this.displayed_[this.row_]=P+=b};var Ch={CaptionStream:On,Cea608Stream:ri,Cea708Stream:wr},Xi={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},vp=function(b,P){var D=1;for(b>P&&(D=-1);Math.abs(P-b)>4294967296;)b+=8589934592*D;return b},Fp=function W(b){var P,D;W.prototype.init.call(this),this.type_=b||"shared",this.push=function(R){"shared"!==this.type_&&R.type!==this.type_||(void 0===D&&(D=R.dts),R.dts=vp(R.dts,D),R.pts=vp(R.pts,D),P=R.dts,this.trigger("data",R))},this.flush=function(){D=P,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){D=void 0,P=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Fp.prototype=new a;var Dh,Np_TimestampRolloverStream=Fp,Np_handleRollover=vp,Bp=function(b,P,D){var R,U="";for(R=P;R<D;R++)U+="%"+("00"+b[R].toString(16)).slice(-2);return U},Ih=function(b,P,D){return decodeURIComponent(Bp(b,P,D))},Dm=function(b,P,D){return unescape(Bp(b,P,D))},Lh=function(b){return b[0]<<21|b[1]<<14|b[2]<<7|b[3]},Up={TXXX:function(b){var P;if(3===b.data[0]){for(P=1;P<b.data.length;P++)if(0===b.data[P]){b.description=Ih(b.data,1,P),b.value=Ih(b.data,P+1,b.data.length).replace(/\0*$/,"");break}b.data=b.value}},WXXX:function(b){var P;if(3===b.data[0])for(P=1;P<b.data.length;P++)if(0===b.data[P]){b.description=Ih(b.data,1,P),b.url=Ih(b.data,P+1,b.data.length);break}},PRIV:function(b){var P;for(P=0;P<b.data.length;P++)if(0===b.data[P]){b.owner=Dm(b.data,0,P);break}b.privateData=b.data.subarray(P+1),b.data=b.privateData}};Dh=function(b){var V,P={descriptor:b&&b.descriptor},D=0,R=[],U=0;if(Dh.prototype.init.call(this),this.dispatchType=Xi.METADATA_STREAM_TYPE.toString(16),P.descriptor)for(V=0;V<P.descriptor.length;V++)this.dispatchType+=("00"+P.descriptor[V].toString(16)).slice(-2);this.push=function(te){var se,ge,he,_e,Ve;if("timed-metadata"===te.type){if(te.dataAlignmentIndicator&&(U=0,R.length=0),0===R.length&&(te.data.length<10||te.data[0]!=="I".charCodeAt(0)||te.data[1]!=="D".charCodeAt(0)||te.data[2]!=="3".charCodeAt(0)))return void this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});if(R.push(te),U+=te.data.byteLength,1===R.length&&(D=Lh(te.data.subarray(6,10)),D+=10),!(U<D)){for(se={data:new Uint8Array(D),frames:[],pts:R[0].pts,dts:R[0].dts},Ve=0;Ve<D;)se.data.set(R[0].data.subarray(0,D-Ve),Ve),Ve+=R[0].data.byteLength,U-=R[0].data.byteLength,R.shift();ge=10,64&se.data[5]&&(ge+=4,ge+=Lh(se.data.subarray(10,14)),D-=Lh(se.data.subarray(16,20)));do{if((he=Lh(se.data.subarray(ge+4,ge+8)))<1)return void this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});if((_e={id:String.fromCharCode(se.data[ge],se.data[ge+1],se.data[ge+2],se.data[ge+3]),data:se.data.subarray(ge+10,ge+he+10)}).key=_e.id,Up[_e.id]&&(Up[_e.id](_e),"com.apple.streaming.transportStreamTimestamp"===_e.owner)){var Ct=_e.data,dt=(1&Ct[3])<<30|Ct[4]<<22|Ct[5]<<14|Ct[6]<<6|Ct[7]>>>2;dt*=4,_e.timeStamp=dt+=3&Ct[7],void 0===se.pts&&void 0===se.dts&&(se.pts=_e.timeStamp,se.dts=_e.timeStamp),this.trigger("timestamp",_e)}se.frames.push(_e),ge+=10,ge+=he}while(ge<D);this.trigger("data",se)}}}},Dh.prototype=new a;var Ph,bf,kh,Pm=Dh,km=Np_TimestampRolloverStream;Ph=function(){var b=new Uint8Array(188),P=0;Ph.prototype.init.call(this),this.push=function(D){var V,R=0,U=188;for(P?((V=new Uint8Array(D.byteLength+P)).set(b.subarray(0,P)),V.set(D,P),P=0):V=D;U<V.byteLength;)71!==V[R]||71!==V[U]?(R++,U++):(this.trigger("data",V.subarray(R,U)),R+=188,U+=188);R<V.byteLength&&(b.set(V.subarray(R),0),P=V.byteLength-R)},this.flush=function(){188===P&&71===b[0]&&(this.trigger("data",b),P=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){P=0,this.trigger("reset")}},Ph.prototype=new a,bf=function(){var b,P,D,R;bf.prototype.init.call(this),R=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,b=function(V,te){var se=0;te.payloadUnitStartIndicator&&(se+=V[se]+1),"pat"===te.type?P(V.subarray(se),te):D(V.subarray(se),te)},P=function(V,te){te.section_number=V[7],te.last_section_number=V[8],R.pmtPid=(31&V[10])<<8|V[11],te.pmtPid=R.pmtPid},D=function(V,te){var ge,_e;if(1&V[5]){for(R.programMapTable={video:null,audio:null,"timed-metadata":{}},ge=3+((15&V[1])<<8|V[2])-4,_e=12+((15&V[10])<<8|V[11]);_e<ge;){var Ve=V[_e],mt=(31&V[_e+1])<<8|V[_e+2];Ve===Xi.H264_STREAM_TYPE&&null===R.programMapTable.video?R.programMapTable.video=mt:Ve===Xi.ADTS_STREAM_TYPE&&null===R.programMapTable.audio?R.programMapTable.audio=mt:Ve===Xi.METADATA_STREAM_TYPE&&(R.programMapTable["timed-metadata"][mt]=Ve),_e+=5+((15&V[_e+3])<<8|V[_e+4])}te.programMapTable=R.programMapTable}},this.push=function(U){var V={},te=4;if(V.payloadUnitStartIndicator=!!(64&U[1]),V.pid=31&U[1],V.pid<<=8,V.pid|=U[2],(48&U[3])>>>4>1&&(te+=U[te]+1),0===V.pid)V.type="pat",b(U.subarray(te),V),this.trigger("data",V);else if(V.pid===this.pmtPid)for(V.type="pmt",b(U.subarray(te),V),this.trigger("data",V);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([U,te,V]):this.processPes_(U,te,V)},this.processPes_=function(U,V,te){te.streamType=te.pid===this.programMapTable.video?Xi.H264_STREAM_TYPE:te.pid===this.programMapTable.audio?Xi.ADTS_STREAM_TYPE:this.programMapTable["timed-metadata"][te.pid],te.type="pes",te.data=U.subarray(V),this.trigger("data",te)}},bf.prototype=new a,bf.STREAM_TYPES={h264:27,adts:15},kh=function(){var V,b=this,P=!1,D={data:[],size:0},R={data:[],size:0},U={data:[],size:0},se=function(he,_e,Ve){var cn,mt=new Uint8Array(he.size),Ct={type:_e},dt=0,Wt=0,Pi=!1;if(he.data.length&&!(he.size<9)){for(Ct.trackId=he.data[0].pid,dt=0;dt<he.data.length;dt++)mt.set((cn=he.data[dt]).data,Wt),Wt+=cn.data.byteLength;(function(he,_e){var Ve,mt=he[0]<<16|he[1]<<8|he[2];_e.data=new Uint8Array,1===mt&&(_e.packetLength=6+(he[4]<<8|he[5]),_e.dataAlignmentIndicator=0!=(4&he[6]),192&(Ve=he[7])&&(_e.pts=(14&he[9])<<27|(255&he[10])<<20|(254&he[11])<<12|(255&he[12])<<
vendor: 9,764 bytes, line 29
295|(254&he[13])>>>3,_e.pts*=4,_e.pts+=(6&he[13])>>>1,_e.dts=_e.pts,64&Ve&&(_e.dts=(14&he[14])<<27|(255&he[15])<<20|(254&he[16])<<12|(255&he[17])<<5|(254&he[18])>>>3,_e.dts*=4,_e.dts+=(6&he[18])>>>1)),_e.data=he.subarray(9+he[8]))})(mt,Ct),Pi="video"===_e||Ct.packetLength<=he.size,(Ve||Pi)&&(he.size=0,he.data.length=0),Pi&&b.trigger("data",Ct)}};kh.prototype.init.call(this),this.push=function(ge){({pat:function(){},pes:function(){var _e,Ve;switch(ge.streamType){case Xi.H264_STREAM_TYPE:_e=D,Ve="video";break;case Xi.ADTS_STREAM_TYPE:_e=R,Ve="audio";break;case Xi.METADATA_STREAM_TYPE:_e=U,Ve="timed-metadata";break;default:return}ge.payloadUnitStartIndicator&&se(_e,Ve,!0),_e.data.push(ge),_e.size+=ge.data.byteLength},pmt:function(){var _e={type:"metadata",tracks:[]};null!==(V=ge.programMapTable).video&&_e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+V.video,codec:"avc",type:"video"}),null!==V.audio&&_e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+V.audio,codec:"adts",type:"audio"}),P=!0,b.trigger("data",_e)}})[ge.type]()},this.reset=function(){D.size=0,D.data.length=0,R.size=0,R.data.length=0,this.trigger("reset")},this.flushStreams_=function(){se(D,"video"),se(R,"audio"),se(U,"timed-metadata")},this.flush=function(){if(!P&&V){var ge={type:"metadata",tracks:[]};null!==V.video&&ge.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+V.video,codec:"avc",type:"video"}),null!==V.audio&&ge.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+V.audio,codec:"adts",type:"audio"}),b.trigger("data",ge)}P=!1,this.flushStreams_(),this.trigger("done")}},kh.prototype=new a;var Vp={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Ph,TransportParseStream:bf,ElementaryStream:kh,TimestampRolloverStream:km,CaptionStream:Ch.CaptionStream,Cea608Stream:Ch.Cea608Stream,Cea708Stream:Ch.Cea708Stream,MetadataStream:Pm};for(var gp in Xi)Xi.hasOwnProperty(gp)&&(Vp[gp]=Xi[gp]);var Rh,is=Vp,Hp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Rh=function(b){var P,D=0;Rh.prototype.init.call(this),this.skipWarn_=function(R,U){this.trigger("log",{level:"warn",message:"adts skiping bytes "+R+" to "+U+" in frame "+D+" outside syncword"})},this.push=function(R){var V,te,se,ge,he,U=0;if(b||(D=0),"audio"===R.type){P&&P.length?(se=P,(P=new Uint8Array(se.byteLength+R.data.byteLength)).set(se),P.set(R.data,se.byteLength)):P=R.data;for(var _e;U+7<P.length;)if(255===P[U]&&240==(246&P[U+1])){if("number"==typeof _e&&(this.skipWarn_(_e,U),_e=null),te=2*(1&~P[U+1]),he=9e4*(ge=1024*(1+(3&P[U+6])))/Hp[(60&P[U+2])>>>2],P.byteLength-U<(V=(3&P[U+3])<<11|P[U+4]<<3|(224&P[U+5])>>5))break;this.trigger("data",{pts:R.pts+D*he,dts:R.dts+D*he,sampleCount:ge,audioobjecttype:1+(P[U+2]>>>6&3),channelcount:(1&P[U+2])<<2|(192&P[U+3])>>>6,samplerate:Hp[(60&P[U+2])>>>2],samplingfrequencyindex:(60&P[U+2])>>>2,samplesize:16,data:P.subarray(U+7+te,U+V)}),D++,U+=V}else"number"!=typeof _e&&(_e=U),U++;"number"==typeof _e&&(this.skipWarn_(_e,U),_e=null),P=P.subarray(U)}},this.flush=function(){D=0,this.trigger("done")},this.reset=function(){P=void 0,this.trigger("reset")},this.endTimeline=function(){P=void 0,this.trigger("endedtimeline")}},Rh.prototype=new a;var Kp,Gp=Rh;Kp=function(b){var P=b.byteLength,D=0,R=0;this.length=function(){return 8*P},this.bitsAvailable=function(){return 8*P+R},this.loadWord=function(){var U=b.byteLength-P,V=new Uint8Array(4),te=Math.min(4,P);if(0===te)throw new Error("no bytes available");V.set(b.subarray(U,U+te)),D=new DataView(V.buffer).getUint32(0),R=8*te,P-=te},this.skipBits=function(U){var V;R>U?(D<<=U,R-=U):(U-=R,U-=8*(V=Math.floor(U/8)),P-=V,this.loadWord(),D<<=U,R-=U)},this.readBits=function(U){var V=Math.min(R,U),te=D>>>32-V;return(R-=V)>0?D<<=V:P>0&&this.loadWord(),(V=U-V)>0?te<<V|this.readBits(V):te},this.skipLeadingZeros=function(){var U;for(U=0;U<R;++U)if(D&2147483648>>>U)return D<<=U,R-=U,U;return this.loadWord(),U+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var U=this.skipLeadingZeros();return this.readBits(U+1)-1},this.readExpGolomb=function(){var U=this.readUnsignedExpGolomb();return 1&U?1+U>>>1:-1*(U>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var wh,xf,jp,wm=Kp;xf=function(){var P,D,b=0;xf.prototype.init.call(this),this.push=function(R){var U;D?((U=new Uint8Array(D.byteLength+R.data.byteLength)).set(D),U.set(R.data,D.byteLength),D=U):D=R.data;for(var V=D.byteLength;b<V-3;b++)if(1===D[b+2]){P=b+5;break}for(;P<V;)switch(D[P]){case 0:if(0!==D[P-1]){P+=2;break}if(0!==D[P-2]){P++;break}b+3!==P-2&&this.trigger("data",D.subarray(b+3,P-2));do{P++}while(1!==D[P]&&P<V);b=P-2,P+=3;break;case 1:if(0!==D[P-1]||0!==D[P-2]){P+=3;break}this.trigger("data",D.subarray(b+3,P-2)),b=P-2,P+=3;break;default:P+=3}D=D.subarray(b),P-=b,b=0},this.reset=function(){D=null,b=0,this.trigger("reset")},this.flush=function(){D&&D.byteLength>3&&this.trigger("data",D.subarray(b+3)),D=null,b=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},xf.prototype=new a,jp={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},wh=function(){var P,D,R,U,V,te,se,b=new xf;wh.prototype.init.call(this),P=this,this.push=function(ge){"video"===ge.type&&(D=ge.trackId,R=ge.pts,U=ge.dts,b.push(ge))},b.on("data",function(ge){var he={trackId:D,pts:R,dts:U,data:ge,nalUnitTypeCode:31&ge[0]};switch(he.nalUnitTypeCode){case 5:he.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:he.nalUnitType="sei_rbsp",he.escapedRBSP=V(ge.subarray(1));break;case 7:he.nalUnitType="seq_parameter_set_rbsp",he.escapedRBSP=V(ge.subarray(1)),he.config=te(he.escapedRBSP);break;case 8:he.nalUnitType="pic_parameter_set_rbsp";break;case 9:he.nalUnitType="access_unit_delimiter_rbsp"}P.trigger("data",he)}),b.on("done",function(){P.trigger("done")}),b.on("partialdone",function(){P.trigger("partialdone")}),b.on("reset",function(){P.trigger("reset")}),b.on("endedtimeline",function(){P.trigger("endedtimeline")}),this.flush=function(){b.flush()},this.partialFlush=function(){b.partialFlush()},this.reset=function(){b.reset()},this.endTimeline=function(){b.endTimeline()},se=function(he,_e){var Ct,Ve=8,mt=8;for(Ct=0;Ct<he;Ct++)0!==mt&&(mt=(Ve+_e.readExpGolomb()+256)%256),Ve=0===mt?Ve:mt},V=function(he){for(var Ct,dt,_e=he.byteLength,Ve=[],mt=1;mt<_e-2;)0===he[mt]&&0===he[mt+1]&&3===he[mt+2]?(Ve.push(mt+2),mt+=2):mt++;if(0===Ve.length)return he;Ct=_e-Ve.length,dt=new Uint8Array(Ct);var Wt=0;for(mt=0;mt<Ct;Wt++,mt++)Wt===Ve[0]&&(Wt++,Ve.shift()),dt[mt]=he[Wt];return dt},te=function(he){var dt,Wt,Pi,cn,au,Sp,lg,dg,fg,bp,cg,su,_e=0,Ve=0,mt=0,Ct=0,vi=[1,1];if(Wt=(dt=new wm(he)).readUnsignedByte(),cn=dt.readUnsignedByte(),Pi=dt.readUnsignedByte(),dt.skipUnsignedExpGolomb(),jp[Wt]&&(3===(au=dt.readUnsignedExpGolomb())&&dt.skipBits(1),dt.skipUnsignedExpGolomb(),dt.skipUnsignedExpGolomb(),dt.skipBits(1),dt.readBoolean()))for(cg=3!==au?8:12,su=0;su<cg;su++)dt.readBoolean()&&se(su<6?16:64,dt);if(dt.skipUnsignedExpGolomb(),0===(Sp=dt.readUnsignedExpGolomb()))dt.readUnsignedExpGolomb();else if(1===Sp)for(dt.skipBits(1),dt.skipExpGolomb(),dt.skipExpGolomb(),lg=dt.readUnsignedExpGolomb(),su=0;su<lg;su++)dt.skipExpGolomb();if(dt.skipUnsignedExpGolomb(),dt.skipBits(1),dg=dt.readUnsignedExpGolomb(),fg=dt.readUnsignedExpGolomb(),0===(bp=dt.readBits(1))&&dt.skipBits(1),dt.skipBits(1),dt.readBoolean()&&(_e=dt.readUnsignedExpGolomb(),Ve=dt.readUnsignedExpGolomb(),mt=dt.readUnsignedExpGolomb(),Ct=dt.readUnsignedExpGolomb()),dt.readBoolean()&&dt.readBoolean())switch(dt.readUnsignedByte()){case 1:vi=[1,1];break;case 2:vi=[12,11];break;case 3:vi=[10,11];break;case 4:vi=[16,11];break;case 5:vi=[40,33];break;case 6:vi=[24,11];break;case 7:vi=[20,11];break;case 8:vi=[32,11];break;case 9:vi=[80,33];break;case 10:vi=[18,11];break;case 11:vi=[15,11];break;case 12:vi=[64,33];break;case 13:vi=[160,99];break;case 14:vi=[4,3];break;case 15:vi=[3,2];break;case 16:vi=[2,1];break;case 255:vi=[dt.readUnsignedByte()<<8|dt.readUnsignedByte(),dt.readUnsignedByte()<<8|dt.readUnsignedByte()]}return{profileIdc:Wt,levelIdc:Pi,profileCompatibility:cn,width:16*(dg+1)-2*_e-2*Ve,height:(2-bp)*(fg+1)*16-2*mt-2*Ct,sarRatio:vi}}},wh.prototype=new a;var Mh,Om={H264Stream:wh,NalByteStream:xf},Mm=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],qp=function(b,P){var D=b[P+6]<<21|b[P+7]<<14|b[P+8]<<7|b[P+9];return D=D>=0?D:0,(16&b[P+5])>>4?D+20:D+10},Fm=function W(b,P){return b.length-P<10||b[P]!=="I".charCodeAt(0)||b[P+1]!=="D".charCodeAt(0)||b[P+2]!=="3".charCodeAt(0)?P:W(b,P+=qp(b,P))},Wp=function(b){return b[0]<<21|b[1]<<14|b[2]<<7|b[3]},Um=function(b,P,D){return unescape(function(b,P,D){var R,U="";for(R=P;R<D;R++)U+="%"+("00"+b[R].toString(16)).slice(-2);return U}(b,P,D))},Oh={isLikelyAacData:function(b){var P=Fm(b,0);return b.length>=P+2&&255==(255&b[P])&&240==(240&b[P+1])&&16==(22&b[P+1])},parseId3TagSize:qp,parseAdtsSize:function(b,P){return 6144&b[P+3]|b[P+4]<<3|(224&b[P+5])>>5},parseType:function(b,P){return b[P]==="I".charCodeAt(0)&&b[P+1]==="D".charCodeAt(0)&&b[P+2]==="3".charCodeAt(0)?"timed-metadata":!0&b[P]&&240==(240&b[P+1])?"audio":null},parseSampleRate:function(b){for(var P=0;P+5<b.length;){if(255===b[P]&&240==(246&b[P+1]))return Mm[(60&b[P+2])>>>2];P++}return null},parseAacTimestamp:function(b){var P,D,R;P=10,64&b[5]&&(P+=4,P+=Wp(b.subarray(10,14)));do{if((D=Wp(b.subarray(P+4,P+8)))<1)return null;if("PRIV"===String.fromCharCode(b[P],b[P+1],b[P+2],b[P+3])){R=b.subarray(P+10,P+D+10);for(var V=0;V<R.byteLength;
29V++)if(0===R[V]){if("com.apple.streaming.transportStreamTimestamp"===Um(R,0,V)){var se=R.subarray(V+1),ge=(1&se[3])<<30|se[4]<<22|se[5]<<14|se[6]<<6|se[7]>>>2;return(ge*=4)+(3&se[7])}break}}P+=10,P+=D}while(P<b.byteLength);return null}};Mh=function(){var b=new Uint8Array,P=0;Mh.prototype.init.call(this),this.setTimestamp=function(D){P=D},this.push=function(D){var te,se,ge,R=0,U=0;for(b.length?(ge=b.length,(b=new Uint8Array(D.byteLength+ge)).set(b.subarray(0,ge)),b.set(D,ge)):b=D;b.length-U>=3;)if(b[U]!=="I".charCodeAt(0)||b[U+1]!=="D".charCodeAt(0)||b[U+2]!=="3".charCodeAt(0))if(255!=(255&b[U])||240!=(240&b[U+1]))U++;else{if(b.length-U<7||U+(R=Oh.parseAdtsSize(b,U))>b.length)break;se={type:"audio",data:b.subarray(U,U+R),pts:P,dts:P},this.trigger("data",se),U+=R}else{if(b.length-U<10||U+(R=Oh.parseId3TagSize(b,U))>b.length)break;te={type:"timed-metadata",data:b.subarray(U,U+R)},this.trigger("data",te),U+=R}b=b.length-U>0?b.subarray(U):new Uint8Array},this.reset=function(){b=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){b=new Uint8Array,this.trigger("endedtimeline")}},Mh.prototype=new a;var Af,Al,Fh,ru,jm=Mh,mp=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],yp=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Ym=Om.H264Stream,zm=Oh.isLikelyAacData,Xm=function(b,P){P.stream=b,this.trigger("log",P)},Yp=function(b,P){for(var D=Object.keys(P),R=0;R<D.length;R++){var U=D[R];"headOfPipeline"===U||!P[U].on||P[U].on("log",Xm.bind(b,U))}},zp=function(b,P){var D;if(b.length!==P.length)return!1;for(D=0;D<b.length;D++)if(b[D]!==P[D])return!1;return!0},Tp=function(b,P,D,R,U,V){return{start:{dts:b,pts:b+(D-P)},end:{dts:b+(R-P),pts:b+(U-D)},prependedContentDuration:V,baseMediaDecodeTime:b}};Al=function(b,P){var R,D=[],U=0,V=0,te=1/0;R=(P=P||{}).firstSequenceNumber||0,Al.prototype.init.call(this),this.push=function(se){da_collectDtsInfo(b,se),b&&mp.forEach(function(ge){b[ge]=se[ge]}),D.push(se)},this.setEarliestDts=function(se){U=se},this.setVideoBaseMediaDecodeTime=function(se){te=se},this.setAudioAppendStart=function(se){V=se},this.flush=function(){var se,ge,he,_e,Ve,mt,Ct;0!==D.length?(se=function(b,P,D){return P.minSegmentDts>=D?b:(P.minSegmentDts=1/0,b.filter(function(R){return R.dts>=D&&(P.minSegmentDts=Math.min(P.minSegmentDts,R.dts),P.minSegmentPts=P.minSegmentDts,!0)}))}(D,b,U),b.baseMediaDecodeTime=da_calculateTrackBaseMediaDecodeTime(b,P.keepOriginalTimestamps),Ct=Eh_prefixWithSilence(b,se,V,te),b.samples=function(b){var P,R=[];for(P=0;P<b.length;P++)R.push({size:b[P].data.byteLength,duration:1024});return R}(se),he=Da_mdat(function(b){var P,D,R=0,U=new Uint8Array(function(b){var P,R=0;for(P=0;P<b.length;P++)R+=b[P].data.byteLength;return R}(b));for(P=0;P<b.length;P++)U.set((D=b[P]).data,R),R+=D.data.byteLength;return U}(se)),D=[],ge=Da_moof(R,[b]),_e=new Uint8Array(ge.byteLength+he.byteLength),R++,_e.set(ge),_e.set(he,ge.byteLength),da_clearDtsInfo(b),Ve=Math.ceil(9216e4/b.samplerate),se.length&&(mt=se.length*Ve,this.trigger("segmentTimingInfo",Tp(vr_audioTsToVideoTs(b.baseMediaDecodeTime,b.samplerate),se[0].dts,se[0].pts,se[0].dts+mt,se[0].pts+mt,Ct||0)),this.trigger("timingInfo",{start:se[0].pts,end:se[0].pts+mt})),this.trigger("data",{track:b,boxes:_e}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){da_clearDtsInfo(b),D=[],this.trigger("reset")}},Al.prototype=new a,Af=function(b,P){var D,V,te,R=[],U=[];D=(P=P||{}).firstSequenceNumber||0,Af.prototype.init.call(this),delete b.minPTS,this.gopCache_=[],this.push=function(se){da_collectDtsInfo(b,se),"seq_parameter_set_rbsp"===se.nalUnitType&&!V&&(V=se.config,b.sps=[se.data],yp.forEach(function(ge){b[ge]=V[ge]},this)),"pic_parameter_set_rbsp"===se.nalUnitType&&!te&&(te=se.data,b.pps=[se.data]),R.push(se)},this.flush=function(){for(var se,ge,he,_e,Ve,mt,dt,Wt,Ct=0;R.length&&"access_unit_delimiter_rbsp"!==R[0].nalUnitType;)R.shift();if(0===R.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(se=function(b){var P,D,R=[],U=[];for(U.byteLength=0,U.nalCount=0,U.duration=0,R.byteLength=0,P=0;P<b.length;P++)"access_unit_delimiter_rbsp"===(D=b[P]).nalUnitType?(R.length&&(R.duration=D.dts-R.dts,U.byteLength+=R.byteLength,U.nalCount+=R.length,U.duration+=R.duration,U.push(R)),(R=[D]).byteLength=D.data.byteLength,R.pts=D.pts,R.dts=D.dts):("slice_layer_without_partitioning_rbsp_idr"===D.nalUnitType&&(R.keyFrame=!0),R.duration=D.dts-R.dts,R.byteLength+=D.data.byteLength,R.push(D));return U.length&&(!R.duration||R.duration<=0)&&(R.duration=U[U.length-1].duration),U.byteLength+=R.byteLength,U.nalCount+=R.length,U.duration+=R.duration,U.push(R),U}(R),(he=function(b){var P,D,R=[],U=[];for(R.byteLength=0,R.nalCount=0,R.duration=0,R.pts=b[0].pts,R.dts=b[0].dts,U.byteLength=0,U.nalCount=0,U.duration=0,U.pts=b[0].pts,U.dts=b[0].dts,P=0;P<b.length;P++)(D=b[P]).keyFrame?(R.length&&(U.push(R),U.byteLength+=R.byteLength,U.nalCount+=R.nalCount,U.duration+=R.duration),(R=[D]).nalCount=D.length,R.byteLength=D.byteLength,R.pts=D.pts,R.dts=D.dts,R.duration=D.duration):(R.duration+=D.duration,R.nalCount+=D.length,R.byteLength+=D.byteLength,R.push(D));return U.length&&R.duration<=0&&(R.duration=U[U.length-1].duration),U.byteLength+=R.byteLength,U.nalCount+=R.nalCount,U.duration+=R.duration,U.push(R),U}(se))[0][0].keyFrame||((ge=this.getGopForFusion_(R[0],b))?(Ct=ge.duration,he.unshift(ge),he.byteLength+=ge.byteLength,he.nalCount+=ge.nalCount,he.pts=ge.pts,he.dts=ge.dts,he.duration+=ge.duration):he=function(b){var P;return!b[0][0].keyFrame&&b.length>1&&(P=b.shift(),b.byteLength-=P.byteLength,b.nalCount-=P.nalCount,b[0][0].dts=P.dts,b[0][0].pts=P.pts,b[0][0].duration+=P.duration),b}(he)),U.length){var Pi;if(!(Pi=P.alignGopsAtEnd?this.alignGopsAtEnd_(he):this.alignGopsAtStart_(he)))return this.gopCache_.unshift({gop:he.pop(),pps:b.pps,sps:b.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),R=[],this.resetStream_
vendor: 4,197 bytes, line 29
29(),void this.trigger("done","VideoSegmentStream");da_clearDtsInfo(b),he=Pi}da_collectDtsInfo(b,he),b.samples=function(b,P){var D,R,U,V,se=P||0,ge=[];for(D=0;D<b.length;D++)for(V=b[D],R=0;R<V.length;R++)se+=(U=Pp(V[R],se)).size,ge.push(U);return ge}(he),Ve=Da_mdat(function(b){var P,D,R,U,V,te,se=0,Ve=new Uint8Array(b.byteLength+4*b.nalCount),mt=new DataView(Ve.buffer);for(P=0;P<b.length;P++)for(U=b[P],D=0;D<U.length;D++)for(V=U[D],R=0;R<V.length;R++)mt.setUint32(se,(te=V[R]).data.byteLength),Ve.set(te.data,se+=4),se+=te.data.byteLength;return Ve}(he)),b.baseMediaDecodeTime=da_calculateTrackBaseMediaDecodeTime(b,P.keepOriginalTimestamps),this.trigger("processedGopsInfo",he.map(function(cn){return{pts:cn.pts,dts:cn.dts,byteLength:cn.byteLength}})),this.trigger("segmentTimingInfo",Tp(b.baseMediaDecodeTime,(dt=he[0]).dts,dt.pts,(Wt=he[he.length-1]).dts+Wt.duration,Wt.pts+Wt.duration,Ct)),this.trigger("timingInfo",{start:he[0].pts,end:he[he.length-1].pts+he[he.length-1].duration}),this.gopCache_.unshift({gop:he.pop(),pps:b.pps,sps:b.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),R=[],this.trigger("baseMediaDecodeTime",b.baseMediaDecodeTime),this.trigger("timelineStartInfo",b.timelineStartInfo),_e=Da_moof(D,[b]),mt=new Uint8Array(_e.byteLength+Ve.byteLength),D++,mt.set(_e),mt.set(Ve,_e.byteLength),this.trigger("data",{track:b,boxes:mt}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),R=[],this.gopCache_.length=0,U.length=0,this.trigger("reset")},this.resetStream_=function(){da_clearDtsInfo(b),V=void 0,te=void 0},this.getGopForFusion_=function(se){var Ve,mt,Ct,dt,Wt,_e=1/0;for(Wt=0;Wt<this.gopCache_.length;Wt++)Ct=(dt=this.gopCache_[Wt]).gop,b.pps&&zp(b.pps[0],dt.pps[0])&&b.sps&&zp(b.sps[0],dt.sps[0])&&(Ct.dts<b.timelineStartInfo.dts||(Ve=se.dts-Ct.dts-Ct.duration)>=-1e4&&Ve<=45e3&&(!mt||_e>Ve)&&(mt=dt,_e=Ve));return mt?mt.gop:null},this.alignGopsAtStart_=function(se){var ge,he,_e,Ve,mt,Ct,dt,Wt;for(mt=se.byteLength,Ct=se.nalCount,dt=se.duration,ge=he=0;ge<U.length&&he<se.length&&(_e=U[ge]).pts!==(Ve=se[he]).pts;)Ve.pts>_e.pts?ge++:(he++,mt-=Ve.byteLength,Ct-=Ve.nalCount,dt-=Ve.duration);return 0===he?se:he===se.length?null:((Wt=se.slice(he)).byteLength=mt,Wt.duration=dt,Wt.nalCount=Ct,Wt.pts=Wt[0].pts,Wt.dts=Wt[0].dts,Wt)},this.alignGopsAtEnd_=function(se){var ge,he,_e,Ve,mt,Ct,dt;for(ge=U.length-1,he=se.length-1,mt=null,Ct=!1;ge>=0&&he>=0;){if((_e=U[ge]).pts===(Ve=se[he]).pts){Ct=!0;break}_e.pts>Ve.pts?ge--:(ge===U.length-1&&(mt=he),he--)}if(!Ct&&null===mt)return null;if(0===(dt=Ct?he:mt))return se;var Wt=se.slice(dt),Pi=Wt.reduce(function(cn,au){return cn.byteLength+=au.byteLength,cn.duration+=au.duration,cn.nalCount+=au.nalCount,cn},{byteLength:0,duration:0,nalCount:0});return Wt.byteLength=Pi.byteLength,Wt.duration=Pi.duration,Wt.nalCount=Pi.nalCount,Wt.pts=Wt[0].pts,Wt.dts=Wt[0].dts,Wt},this.alignGopsWith=function(se){U=se}},Af.prototype=new a,ru=function(b,P){this.numberOfTracks=0,this.metadataStream=P,this.remuxTracks=!(typeof(b=b||{}).remux<"u"&&!b.remux),this.keepOriginalTimestamps="boolean"==typeof b.keepOriginalTimestamps&&b.keepOriginalTimestamps,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,ru.prototype.init.call(this),this.push=function(D){return D.text?this.pendingCaptions.push(D):D.frames?this.pendingMetadata.push(D):(this.pendingTracks.push(D.track),this.pendingBytes+=D.boxes.byteLength,"video"===D.track.type&&(this.videoTrack=D.track,this.pendingBoxes.push(D.boxes)),void("audio"===D.track.type&&(this.audioTrack=D.track,this.pendingBoxes.unshift(D.boxes))))}},ru.prototype=new a,ru.prototype.flush=function(W){var D,R,U,te,b=0,P={captions:[],captionStreams:{},metadata:[],info:{}},V=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==W&&"AudioSegmentStream"!==W)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(V=this.videoTrack.timelineStartInfo.pts,yp.forEac
vendor: 5,053 bytes, line 29
29h(function(se){P.info[se]=this.videoTrack[se]},this)):this.audioTrack&&(V=this.audioTrack.timelineStartInfo.pts,mp.forEach(function(se){P.info[se]=this.audioTrack[se]},this)),this.videoTrack||this.audioTrack){for(P.type=1===this.pendingTracks.length?this.pendingTracks[0].type:"combined",this.emittedTracks+=this.pendingTracks.length,U=function(b){var R,P=S(),D=Z(b);return(R=new Uint8Array(P.byteLength+D.byteLength)).set(P),R.set(D,P.byteLength),R}(this.pendingTracks),P.initSegment=new Uint8Array(U.byteLength),P.initSegment.set(U),P.data=new Uint8Array(this.pendingBytes),te=0;te<this.pendingBoxes.length;te++)P.data.set(this.pendingBoxes[te],b),b+=this.pendingBoxes[te].byteLength;for(te=0;te<this.pendingCaptions.length;te++)(D=this.pendingCaptions[te]).startTime=vr_metadataTsToSeconds(D.startPts,V,this.keepOriginalTimestamps),D.endTime=vr_metadataTsToSeconds(D.endPts,V,this.keepOriginalTimestamps),P.captionStreams[D.stream]=!0,P.captions.push(D);for(te=0;te<this.pendingMetadata.length;te++)(R=this.pendingMetadata[te]).cueTime=vr_metadataTsToSeconds(R.pts,V,this.keepOriginalTimestamps),P.metadata.push(R);for(P.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",P),te=0;te<P.captions.length;te++)this.trigger("caption",D=P.captions[te]);for(te=0;te<P.metadata.length;te++)this.trigger("id3Frame",R=P.metadata[te])}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},ru.prototype.setRemux=function(W){this.remuxTracks=W},Fh=function(b){var R,U,P=this,D=!0;Fh.prototype.init.call(this),this.baseMediaDecodeTime=(b=b||{}).baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var V={};this.transmuxPipeline_=V,V.type="aac",V.metadataStream=new is.MetadataStream,V.aacStream=new jm,V.audioTimestampRolloverStream=new is.TimestampRolloverStream("audio"),V.timedMetadataTimestampRolloverStream=new is.TimestampRolloverStream("timed-metadata"),V.adtsStream=new Gp,V.coalesceStream=new ru(b,V.metadataStream),V.headOfPipeline=V.aacStream,V.aacStream.pipe(V.audioTimestampRolloverStream).pipe(V.adtsStream),V.aacStream.pipe(V.timedMetadataTimestampRolloverStream).pipe(V.metadataStream).pipe(V.coalesceStream),V.metadataStream.on("timestamp",function(te){V.aacStream.setTimestamp(te.timeStamp)}),V.aacStream.on("data",function(te){"timed-metadata"!==te.type&&"audio"!==te.type||V.audioSegmentStream||(U=U||{timelineStartInfo:{baseMediaDecodeTime:P.baseMediaDecodeTime},codec:"adts",type:"audio"},V.coalesceStream.numberOfTracks++,V.audioSegmentStream=new Al(U,b),V.audioSegmentStream.on("log",P.getLogTrigger_("audioSegmentStream")),V.audioSegmentStream.on("timingInfo",P.trigger.bind(P,"audioTimingInfo")),V.adtsStream.pipe(V.audioSegmentStream).pipe(V.coalesceStream),P.trigger("trackinfo",{hasAudio:!!U,hasVideo:!!R}))}),V.coalesceStream.on("data",this.trigger.bind(this,"data")),V.coalesceStream.on("done",this.trigger.bind(this,"done")),Yp(this,V)},this.setupTsPipeline=function(){var V={};this.transmuxPipeline_=V,V.type="ts",V.metadataStream=new is.MetadataStream,V.packetStream=new is.TransportPacketStream,V.parseStream=new is.TransportParseStream,V.elementaryStream=new is.ElementaryStream,V.timestampRolloverStream=new is.TimestampRolloverStream,V.adtsStream=new Gp,V.h264Stream=new Ym,V.captionStream=new is.CaptionStream(b),V.coalesceStream=new ru(b,V.metadataStream),V.headOfPipeline=V.packetStream,V.packetStream.pipe(V.parseStream).pipe(V.elementaryStream).pipe(V.timestampRolloverStream),V.timestampRolloverStream.pipe(V.h264Stream),V.timestampRolloverStream.pipe(V.adtsStream),V.timestampRolloverStream.pipe(V.metadataStream).pipe(V.coalesceStream),V.h264Stream.pipe(V.captionStream).pipe(V.coalesceStream),V.elementaryStream.on("data",function(te){var se;if("metadata"===te.type){for(se=te.tracks.length;se--;)R||"video"!==te.tracks[se].type?!U&&"audio"===te.tracks[se].type&&((U=te.tracks[se]).timelineStartInfo.baseMediaDecodeTime=P.baseMediaDecodeTime):(R=te.tracks[se]).timelineStartInfo.baseMediaDecodeTime=P.baseMediaDecodeTime;R&&!V.videoSegmentStream&&(V.coalesceStream.numberOfTracks++,V.videoSegmentStream=new Af(R,b),V.videoSegmentStream.on("log",P.getLogTrigger_("videoSegmentStream")),V.videoSegmentStream.on("timelineStartInfo",function(ge){U&&!b.keepOriginalTimestamps&&(U.timelineStartInfo=ge,V.audioSegmentStream.setEarliestDts(ge.dts-P.baseMediaDecodeTime))}),V.videoSegmentStream.on("processedGopsInfo",P.trigger.bind(P,"gopInfo")),V.videoSegmentStream.on("segmentTimingInfo",P.trigger.bind(P,"videoSegmentTimingInfo")),V.videoSegmentStream.on("baseMediaDecodeTime",function(ge){U&&V.audioSegmentStream.setVideoBaseMediaDecodeTime(ge)}),V.videoSegmentStream.on("timingInfo",P.trigger.bind(P,"videoTimingInfo")),V.h264Stream.pipe(V.videoSegmentStream).pipe(V.coalesceStream)),U&&!V.audioSegmentStream&&(V.coalesceStream.numberOfTracks++,V.audioSegmentStream=new Al(U,b),
vendor: 6,996 bytes, line 29
29V.audioSegmentStream.on("log",P.getLogTrigger_("audioSegmentStream")),V.audioSegmentStream.on("timingInfo",P.trigger.bind(P,"audioTimingInfo")),V.audioSegmentStream.on("segmentTimingInfo",P.trigger.bind(P,"audioSegmentTimingInfo")),V.adtsStream.pipe(V.audioSegmentStream).pipe(V.coalesceStream)),P.trigger("trackinfo",{hasAudio:!!U,hasVideo:!!R})}}),V.coalesceStream.on("data",this.trigger.bind(this,"data")),V.coalesceStream.on("id3Frame",function(te){te.dispatchType=V.metadataStream.dispatchType,P.trigger("id3Frame",te)}),V.coalesceStream.on("caption",this.trigger.bind(this,"caption")),V.coalesceStream.on("done",this.trigger.bind(this,"done")),Yp(this,V)},this.setBaseMediaDecodeTime=function(V){var te=this.transmuxPipeline_;b.keepOriginalTimestamps||(this.baseMediaDecodeTime=V),U&&(U.timelineStartInfo.dts=void 0,U.timelineStartInfo.pts=void 0,da_clearDtsInfo(U),te.audioTimestampRolloverStream&&te.audioTimestampRolloverStream.discontinuity()),R&&(te.videoSegmentStream&&(te.videoSegmentStream.gopCache_=[]),R.timelineStartInfo.dts=void 0,R.timelineStartInfo.pts=void 0,da_clearDtsInfo(R),te.captionStream.reset()),te.timestampRolloverStream&&te.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(V){U&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(V)},this.setRemux=function(V){var te=this.transmuxPipeline_;b.remux=V,te&&te.coalesceStream&&te.coalesceStream.setRemux(V)},this.alignGopsWith=function(V){R&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(V)},this.getLogTrigger_=function(V){var te=this;return function(se){se.stream=V,te.trigger("log",se)}},this.push=function(V){if(D){var te=zm(V);te&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():!te&&"ts"!==this.transmuxPipeline_.type&&this.setupTsPipeline(),D=!1}this.transmuxPipeline_.headOfPipeline.push(V)},this.flush=function(){D=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},Fh.prototype=new a;var tg,ng,_p,Qm={Transmuxer:Fh,VideoSegmentStream:Af,AudioSegmentStream:Al,AUDIO_PROPERTIES:mp,VIDEO_PROPERTIES:yp,generateSegmentTimingInfo:Tp},Nh_toUnsigned=function(b){return b>>>0},iu=function(b){var P="";return P+=String.fromCharCode(b[0]),P+=String.fromCharCode(b[1]),(P+=String.fromCharCode(b[2]))+String.fromCharCode(b[3])},t0=Nh_toUnsigned,Kr=function W(b,P){var R,U,V,te,se,D=[];if(!P.length)return null;for(R=0;R<b.byteLength;)U=t0(b[R]<<24|b[R+1]<<16|b[R+2]<<8|b[R+3]),V=iu(b.subarray(R+4,R+8)),te=U>1?R+U:b.byteLength,V===P[0]&&(1===P.length?D.push(b.subarray(R+8,te)):(se=W(b.subarray(R+8,te),P.slice(1))).length&&(D=D.concat(se))),R=te;return D},i0=Nh_toUnsigned,n0=t.getUint64,Xp=function(b){return{isLeading:(12&b[0])>>>2,dependsOn:3&b[0],isDependedOn:(192&b[1])>>>6,hasRedundancy:(48&b[1])>>>4,paddingValue:(14&b[1])>>>1,isNonSyncSample:1&b[1],degradationPriority:b[2]<<8|b[3]}},Jp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},If=typeof window<"u"?window:typeof Jp<"u"?Jp:typeof self<"u"?self:{},l0=function(b){for(var U,V,P=b.byteLength,D=[],R=1;R<P-2;)0===b[R]&&0===b[R+1]&&3===b[R+2]?(D.push(R+2),R+=2):R++;if(0===D.length)return b;U=P-D.length,V=new Uint8Array(U);var te=0;for(R=0;R<U;te++,R++)te===D[0]&&(te++,D.shift()),V[R]=b[te];return V},d0=Ch.CaptionStream,f0=function(b,P){for(var D=b,R=0;R<P.length;R++){var U=P[R];if(D<U.size)return U;D-=U.size}return null},v0=function(b,P){var D=Kr(b,["moof","traf"]),R=Kr(b,["mdat"]),U={},V=[];return R.forEach(function(te,se){V.push({mdat:te,traf:D[se]})}),V.forEach(function(te){var Wt,Pi,se=te.mdat,ge=te.traf,_e=function(b){var _e,P=new DataView(b.buffer,b.byteOffset,b.byteLength),D={version:b[0],flags:new Uint8Array(b.subarray(1,4)),trackId:P.getUint32(4)},R=1&D.flags[2],U=2&D.flags[2],V=8&D.flags[2],te=16&D.flags[2],se=32&D.flags[2],ge=65536&D.flags[0],he=131072&D.flags[0];return _e=8,R&&(_e+=4,D.baseDataOffset=P.getUint32(12),_e+=4),U&&(D.sampleDescriptionIndex=P.getUint32(_e),_e+=4),V&&(D.defaultSampleDuration=P.getUint32(_e),_e+=4),te&&(D.defaultSampleSize=P.getUint32(_e),_e+=4),se&&(D.defaultSampleFlags=P.getUint32(_e)),ge&&(D.durationIsEmpty=!0),!R&&he&&(D.baseDataOffsetIsMoof=!0),D}(Kr(ge,["tfhd"])[0]),Ve=_e.trackId,mt=Kr(ge,["tfdt"]),Ct=mt.length>0?function(b){var P={version:b[0],flags:new Uint8Array(b.subarray(1,4))};return P.baseMediaDecodeTime=1===P.version?n0(b.subarray(4)):i0(b[4]<<24|b[5]<<16|b[6]<<8|b[7]),P}(mt[0]).baseMediaDecodeTime:0,dt=Kr(ge,["trun"]);P===Ve&&dt.length>0&&(Wt=function(b,P,D){var R=P,U=D.defaultSampleDuration||0,V=D.defaultSampleSize||0,te=D.trackId,se=[];return b.forEach(function(ge){var _e=function(b){var Ve,P={version:b[0],flags:new Uint8Array(b.subarray(1,4)),samples:[]},D=new DataView(b.buffer,b.byteOffset,b.byteLength),R=1&P.flags[2],U=4&P.flags[2],V=1&P.flags[1],te=2&P.flags[1],se=4&P.flags[1],ge=8&P.flags[1],he=D.getUint32(4),_e=8;for(R&&(P.dataOffset=D.getInt32(_e),_e+=4),U&&he&&(Ve={flags:Xp(b.subarray(_e,_e+4))},_e+=4,V&&(Ve.duration=D.getUint32(_e),_e+=4),te&&(Ve.size=D.getUint32(_e),_e+=4),ge&&(Ve.compositionTimeOffset=1===P.version?D.getInt32(_e):D.getUint32(_e),_e+=4),P.samples.push(Ve),he--);he--;)Ve={},V&&(Ve.duration=D.getUint32(_e),_e+=4),te&&(Ve.size=D.getUint32(_e),_e+=4),se&&(Ve.flags=Xp(b.subarray(_e,_e+4)),_e+=4),ge&&(Ve.compositionTimeOffset=1===P.version?D.getInt32(_e):D.getUint32(_e),_e+=4),P.samples.push(Ve);return P}(ge).samples;_e.forEach(function(Ve){void 0===Ve.duration&&(Ve.duration=U),void 0===Ve.size&&(Ve.size=V),Ve.trackId=te,Ve.dts=R,void 0===Ve.compositionTimeOffset&&(Ve.compositionTimeOffset=0),"bigint"==typeof R?(Ve.pts=R+If.BigInt(Ve.compositionTimeOffset),R+=If.BigInt(Ve.duration)):(Ve.pts=R+Ve.compositionTimeOffset,R+=Ve.duration)}),se=se.concat(_e)}),se}(dt,Ct,_e),Pi=function(b,P,D){var V,te,se,ge,R=new DataView(b.buffer,b.byteOffset,b.byteLength),U={logs:[],seiNals:[]};for(te=0;te+4<b.length;te+=se)if(se=R.getUint32(te),te+=4,!(se<=0))switch(31&b[te]){case 6:var he=b.subarray(te+1,te+1+se),_e=f0(te,P);if(V={nalUnitType:"sei_rbsp",size:se,data:he,escapedRBSP:l0(he),trackId:D},_e)V.pts=_e.pts,V.dts=_e.dts,ge=_e;else{if(!ge){U.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+te+" for trackId "+D+". See mux.js#223."});break}V.pts=ge.pts,V.dts=ge.dts}U.seiNals.push(V)}return U}(se,Wt,Ve),U[Ve]||(U[Ve]={seiNals:[],logs:[]}),U[Ve].seiNals=U[Ve].seiNals.concat(Pi.seiNals),U[Ve].logs=U[Ve].logs.concat(Pi.logs))}),U},m0=function(){var P,D,R,U,V,te,b=!1;this.isInitialized=function(){return b},this.init=function(se){P=new d0,b=!0,te=!!se&&se.isPartial,P.on("data",function(ge){ge.startTime=ge.startPts/U,ge.endTime=ge.endPts/U,V.c
vendor: 9,972 bytes, line 29
29aptions.push(ge),V.captionStreams[ge.stream]=!0}),P.on("log",function(ge){V.logs.push(ge)})},this.isNewInit=function(se,ge){return!(se&&0===se.length||ge&&"object"==typeof ge&&0===Object.keys(ge).length||R===se[0]&&U===ge[R])},this.parse=function(se,ge,he){var _e;if(!this.isInitialized())return null;if(!ge||!he)return null;if(this.isNewInit(ge,he))U=he[R=ge[0]];else if(null===R||!U)return D.push(se),null;for(;D.length>0;){var Ve=D.shift();this.parse(Ve,ge,he)}return _e=function(b,P,D){if(null===P)return null;var U=v0(b,P)[P]||{};return{seiNals:U.seiNals,logs:U.logs,timescale:D}}(se,R,U),_e&&_e.logs&&(V.logs=V.logs.concat(_e.logs)),null!==_e&&_e.seiNals?(this.pushNals(_e.seiNals),this.flushStream(),V):V.logs.length?{logs:V.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(se){if(!this.isInitialized()||!se||0===se.length)return null;se.forEach(function(ge){P.push(ge)})},this.flushStream=function(){if(!this.isInitialized())return null;te?P.partialFlush():P.flush()},this.clearParsedCaptions=function(){V.captions=[],V.captionStreams={},V.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;P.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){D=[],R=null,U=null,V?this.clearParsedCaptions():V={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},Bh=Nh_toUnsigned,Lf=function(b){return("00"+b.toString(16)).slice(-2)},y0=t.getUint64;tg=function(b,P){var R=Kr(P,["moof","traf"]).reduce(function(U,V){var Ve,mt,te=Kr(V,["tfhd"])[0],se=Bh(te[4]<<24|te[5]<<16|te[6]<<8|te[7]),ge=b[se]||9e4,he=Kr(V,["tfdt"])[0],_e=new DataView(he.buffer,he.byteOffset,he.byteLength);return"bigint"==typeof(Ve=1===he[0]?y0(he.subarray(4,12)):_e.getUint32(4))?mt=Ve/If.BigInt(ge):"number"==typeof Ve&&!isNaN(Ve)&&(mt=Ve/ge),mt<Number.MAX_SAFE_INTEGER&&(mt=Number(mt)),mt<U&&(U=mt),U},1/0);return"bigint"==typeof R||isFinite(R)?R:0},_p=function(b){var D=0===b[0]?12:20;return Bh(b[D]<<24|b[D+1]<<16|b[D+2]<<8|b[D+3])},ng=function(b){var P=Kr(b,["moov","trak"]),D=[];return P.forEach(function(R){var te,se,U={},V=Kr(R,["tkhd"])[0];V&&(se=(te=new DataView(V.buffer,V.byteOffset,V.byteLength)).getUint8(0),U.id=te.getUint32(0===se?12:20));var ge=Kr(R,["mdia","hdlr"])[0];if(ge){var he=iu(ge.subarray(8,12));U.type="vide"===he?"video":"soun"===he?"audio":he}var _e=Kr(R,["mdia","minf","stbl","stsd"])[0];if(_e){var Ve=_e.subarray(8);U.codec=iu(Ve.subarray(4,8));var Ct,mt=Kr(Ve,[U.codec])[0];mt&&(/^[asm]vc[1-9]$/i.test(U.codec)?(Ct=mt.subarray(78),"avcC"===iu(Ct.subarray(4,8))&&Ct.length>11?(U.codec+=".",U.codec+=Lf(Ct[9]),U.codec+=Lf(Ct[10]),U.codec+=Lf(Ct[11])):U.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(U.codec)?(Ct=mt.subarray(28),"esds"===iu(Ct.subarray(4,8))&&Ct.length>20&&0!==Ct[19]?(U.codec+="."+Lf(Ct[19]),U.codec+="."+Lf(Ct[20]>>>2&63).replace(/^0/,"")):U.codec="mp4a.40.2"):U.codec=U.codec.toLowerCase())}var Wt=Kr(R,["mdia","mdhd"])[0];Wt&&(U.timescale=_p(Wt)),D.push(U)}),D};var ag_startTime=tg,ag_tracks=ng,sg=function(b){var P=31&b[1];return(P<<=8)|b[2]},Uh=function(b){return!!(64&b[1])},Vh=function(b){var P=0;return(48&b[3])>>>4>1&&(P+=b[4]+1),P},Ep=function(b){switch(b){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},A0={parseType:function(b,P){var D=sg(b);return 0===D?"pat":D===P?"pmt":P?"pes":null},parsePat:function(b){var P=Uh(b),D=4+Vh(b);return P&&(D+=b[D]+1),(31&b[D+10])<<8|b[D+11]},parsePmt:function(b){var P={},D=Uh(b),R=4+Vh(b);if(D&&(R+=b[R]+1),1&b[R+5]){var V;V=3+((15&b[R+1])<<8|b[R+2])-4;for(var se=12+((15&b[R+10])<<8|b[R+11]);se<V;){var ge=R+se;P[(31&b[ge+1])<<8|b[ge+2]]=b[ge],se+=5+((15&b[ge+3])<<8|b[ge+4])}return P}},parsePayloadUnitStartIndicator:Uh,parsePesType:function(b,P){switch(P[sg(b)]){case Xi.H264_STREAM_TYPE:return"video";case Xi.ADTS_STREAM_TYPE:return"audio";case Xi.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(b){if(!Uh(b))return null;var D=4+Vh(b);if(D>=b.byteLength)return null;var U,R=null;return 192&(U=b[D+7])&&((R={}).pts=(14&b[D+9])<<27|(255&b[D+10])<<20|(254&b[D+11])<<12|(255&b[D+12])<<5|(254&b[D+13])>>>3,R.pts*=4,R.pts+=(6&b[D+13])>>>1,R.dts=R.pts,64&U&&(R.dts=(14&b[D+14])<<27|(255&b[D+15])<<20|(254&b[D+16])<<12|(255&b[D+17])<<5|(254&b[D+18])>>>3,R.dts*=4,R.dts+=(6&b[D+18])>>>1)),R},videoPacketContainsKeyFrame:function(b){for(var P=4+Vh(b),D=b.subarray(P),R=0,U=0,V=!1;U<D.byteLength-3;U++)if(1===D[U+2]){R=U+5;break}for(;R<D.byteLength;)switch(D[R]){case 0:if(0!==D[R-1]){R+=2;break}if(0!==D[R-2]){R++;break}U+3!==R-2&&"slice_layer_without_partitioning_rbsp_idr"===Ep(31&D[U+3])&&(V=!0);do{R++}while(1!==D[R]&&R<D.length);U=R-2,R+=3;break;case 1:if(0!==D[R-1]||0!==D[R-2]){R+=3;break}"slice_layer_without_partitioning_rbsp_idr"===Ep(31&D[U+3])&&(V=!0),U=R-2,R+=3;break;default:R+=3}return D=D.subarray(U),R-=U,U=0,D&&D.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===Ep(31&D[U+3])&&(V=!0),V}},Cl=Np_handleRollover,xr={};xr.ts=A0,xr.aac=Oh;var nu=9e4,fn=188,og=function(b,P,D){for(var V,se,ge,he,R=0,U=fn,_e=!1;U<=b.byteLength;)if(71!==b[R]||71!==b[U]&&U!==b.byteLength)R++,U++;else{if("pes"===(V=b.subarray(R,U),xr.ts.parseType(V,P.pid))&&(se=xr.ts.parsePesType(V,P.table),ge=xr.ts.parsePayloadUnitStartIndicator(V),"audio"===se&&ge&&(he=xr.ts.parsePesTime(V))&&(he.type="audio",D.audio.push(he),_e=!0)),_e)break;R+=fn,U+=fn}for(R=(U=b.byteLength)-fn,_e=!1;R>=0;)if(71!==b[R]||71!==b[U]&&U!==b.byteLength)R--,U--;else{if("pes"===(V=b.subarray(R,U),xr.ts.parseType(V,P.pid))&&(se=xr.ts.parsePesType(V,P.table),ge=xr.ts.parsePayloadUnitStartIndicator(V),"audio"===se&&ge&&(he=xr.ts.parsePesTime(V))&&(he.type="audio",D.audio.push(he),_e=!0)),_e)break;R-=fn,U-=fn}},I0=function(b,P,D){for(var V,se,ge,he,_e,Ve,mt,R=0,U=fn,Ct=!1,dt={data:[],size:0};U<b.byteLength;)if(71!==b[R]||71!==b[U])R++,U++;else{if("pes"===(V=b.subarray(R,U),xr.ts.parseType(V,P.pid))&&(se=xr.ts.parsePesType(V,P.table),ge=xr.ts.parsePayloadUnitStartIndicator(V),"video"===se&&(ge&&!Ct&&(he=xr.ts.parsePesTime(V))&&(he.type="video",D.video.push(he),Ct=!0),!D.firstKeyFrame))){if(ge&&0!==dt.size){for(_e=new Uint8Array(dt.size),Ve=0;dt.data.length;)mt=dt.data.shift(),_e.set(mt,Ve),Ve+=mt.byteLength;if(xr.ts.videoPacketContainsKeyFrame(_e)){var Wt=xr.ts.parsePesTime(_e);Wt?(D.firstKeyFrame=Wt,D.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}dt.size=0}dt.data.push(V),dt.size+=V.byteLength}if(Ct&&D.firstKeyFrame)break;R+=fn,U+=fn}for(R=(U=b.byteLength)-fn,Ct=!1;R>=0;)if(71!==b[R]||71!==b[U])R--,U--;else{if("pes"===(V=b.subarray(R,U),xr.ts.parseType(V,P.pid))&&(se=xr.ts.parsePesType(V,P.table),ge=xr.ts.parsePayloadUnitStartIndicator(V),"video"===se&&ge&&(he=xr.ts.parsePesTime(V))&&(he.type="video",D.video.push(he),Ct=!0)),Ct)break;R-=fn,U-=fn}},R0_inspect=function(b,P){var R;return R=xr.aac.isLikelyAacData(b)?function(b){for(var se,P=!1,D=0,R=null,U=null,V=0,te=0;b.length-te>=3;){switch(xr.aac.parseType(b,te)){case"timed-metadata":if(b.length-te<10){P=!0;break}if((V=xr.aac.parseId3TagSize(b,te))>b.length){P=!0;break}null===U&&(se=b.subarray(te,te+V),U=xr.aac.parseAacTimestamp(se)),te+=V;break;case"audio":if(b.length-te<7){P=!0;break}if((V=xr.aac.parseAdtsSize(b,te))>b.length){P=!0;break}null===R&&(se=b.subarray(te,te+V),R=xr.aac.parseSampleRate(se)),D++,te+=V;break;default:te++}if(P)return null}if(null===R||null===U)return null;var he=nu/R;return{audio:[{type:"audio",dts:U,pts:U},{type:"audio",dts:U+1024*D*he,pts:U+1024*D*he}]}}(b):function(b){var P={pid:null,table:null},D={};for(var R in function(b,P){for(var U,D=0,R=fn;R<b.byteLength;)if(71!==b[D]||71!==b[R])D++,R++;else{switch(U=b.subarray(D,R),xr.ts.parseType(U,P.pid)){case"pat":P.pid=xr.ts.parsePat(U);break;case"pmt":var te=xr.ts.parsePmt(U);P.table=P.table||{},Object.keys(te).forEach(function(se){P.table[se]=te[se]})}D+=fn,R+=fn}}(b,P),P.table)if(P.table.hasOwnProperty(R))switch(P.table[R]){case Xi.H264_STREAM_TYPE:D.video=[],I0(b,P,D),0===D.video.length&&delete D.video;break;case Xi.ADTS_STREAM_TYPE:D.audio=[],og(b,P,D),0===D.audio.length&&delete D.audio}return D}(b),R&&(R.audio||R.video)?(function(b,P){if(b.audio&&b.audio.length){var D=P;(typeof D>"u"||isNaN(D))&&(D=b.audio[0].dts),b.audio.forEach(function(V){V.dts=Cl(V.dts,D),V.pts=Cl(V.pts,D),V.dtsTime=V.dts/nu,V.ptsTime=V.pts/nu})}if(b.video&&b.video.length){var R=P;if((typeof R>"u"||isNaN(R))&&(R=b.video[0].dts),b.video.forEach(function(V){V.dts=Cl(V.dts,R),V.pts=Cl(V.pts,R),V.dtsTime=V.dts/nu,V.ptsTime=V.pts/nu}),b.firstKeyFrame){var U=b.firstKeyFrame;U.dts=Cl(U.dts,R),U.pts=Cl(U.pts,R),U.dtsTime=U.dts/nu,U.ptsTime=U.pts/nu}}}(R,P),R):null},ug=function(){function W(P,D){this.options=D||{},this.self=P,this.init()}var b=W.prototype;return b.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Qm.Transmuxer(this.options),function(b,P){P.on("data",function(D){var R=D.initSegment;D.initSegment={data:R.buffer,byteOffset:R.byteOffset,byteLength:R.byteLength};var U=D.data;D.data=U.buffer,b.postMessage({action:"data",segment:D,byteOffset:U.byteOffset,byteLength:U.byteLength},[D.data])}),P.on("done",function(D){b.postMessage({action:"done"})}),P.on("gopInfo",function(D){b.postMessage({action:"gopInfo",gopInfo:D})}),P.on("videoSegmentTimingInfo",function(D){var R={start:{decode:vr_videoTsToSeconds(D.start.dts),presentation:vr_videoTsToSeconds(D.start.pts)},end:{decode:vr_videoTsToSeconds(D.end.dts),presentation:vr_videoTsToSeconds(D.end.pts)},baseMediaDecodeTime:vr_videoTsToSeconds(D.baseMediaDecodeTime)};
vendor: 4,097 bytes, line 29
29D.prependedContentDuration&&(R.prependedContentDuration=vr_videoTsToSeconds(D.prependedContentDuration)),b.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:R})}),P.on("audioSegmentTimingInfo",function(D){var R={start:{decode:vr_videoTsToSeconds(D.start.dts),presentation:vr_videoTsToSeconds(D.start.pts)},end:{decode:vr_videoTsToSeconds(D.end.dts),presentation:vr_videoTsToSeconds(D.end.pts)},baseMediaDecodeTime:vr_videoTsToSeconds(D.baseMediaDecodeTime)};D.prependedContentDuration&&(R.prependedContentDuration=vr_videoTsToSeconds(D.prependedContentDuration)),b.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:R})}),P.on("id3Frame",function(D){b.postMessage({action:"id3Frame",id3Frame:D})}),P.on("caption",function(D){b.postMessage({action:"caption",caption:D})}),P.on("trackinfo",function(D){b.postMessage({action:"trackinfo",trackInfo:D})}),P.on("audioTimingInfo",function(D){b.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:vr_videoTsToSeconds(D.start),end:vr_videoTsToSeconds(D.end)}})}),P.on("videoTimingInfo",function(D){b.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:vr_videoTsToSeconds(D.start),end:vr_videoTsToSeconds(D.end)}})}),P.on("log",function(D){b.postMessage({action:"log",log:D})})}(this.self,this.transmuxer)},b.pushMp4Captions=function(D){this.captionParser||(this.captionParser=new m0,this.captionParser.init());var R=new Uint8Array(D.data,D.byteOffset,D.byteLength),U=this.captionParser.parse(R,D.trackIds,D.timescales);this.self.postMessage({action:"mp4Captions",captions:U&&U.captions||[],logs:U&&U.logs||[],data:R.buffer},[R.buffer])},b.probeMp4StartTime=function(D){var U=D.data,V=ag_startTime(D.timescales,U);this.self.postMessage({action:"probeMp4StartTime",startTime:V,data:U},[U.buffer])},b.probeMp4Tracks=function(D){var R=D.data,U=ag_tracks(R);this.self.postMessage({action:"probeMp4Tracks",tracks:U,data:R},[R.buffer])},b.probeTs=function(D){var R=D.data,U=D.baseStartTime,V="number"!=typeof U||isNaN(U)?void 0:9e4*U,te=R0_inspect(R,V),se=null;te&&((se={hasVideo:te.video&&2===te.video.length||!1,hasAudio:te.audio&&2===te.audio.length||!1}).hasVideo&&(se.videoStart=te.video[0].ptsTime),se.hasAudio&&(se.audioStart=te.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:se,data:R},[R.buffer])},b.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},b.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},b.push=function(D){var R=new Uint8Array(D.data,D.byteOffset,D.byteLength);this.transmuxer.push(R)},b.reset=function(){this.transmuxer.reset()},b.setTimestampOffset=function(D){this.transmuxer.setBaseMediaDecodeTime(Math.round(vr_secondsToVideoTs(D.timestampOffset||0)))},b.setAudioAppendStart=function(D){this.transmuxer.setAudioAppendStart(Math.ceil(vr_secondsToVideoTs(D.appendStart)))},b.setRemux=function(D){this.transmuxer.setRemux(D.remux)},b.flush=function(D){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},b.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},b.alignGopsWith=function(D){this.transmuxer.alignGopsWith(D.gopsToAlignWith.slice())},W}();self.onmessage=function(W){"init"===W.data.action&&W.data.options?this.messageHandlers=new ug(self,W.data.options):(this.messageHandlers||(this.messageHandlers=new ug(self)),W.data&&W.data.action&&"init"!==W.data.action&&this.messageHandlers[W.data.action]&&this.messageHandlers[W.data.action](W.data))}})),r=h(e),p=function(a){var o=a.transmuxer,s=a.bytes,t=a.audioAppendStart,n=a.gopsToAlignWith,d=a.remux,m=a.onData,_=a.onTrackInfo,S=a.onAudioTimingInfo,L=a.onVideoTimingInfo,B=a.onVideoSegmentTimingInfo,F=a.onAudioSegmentTimingInfo,q=a.onId3,Z=a.onCaptions,ne=a.onDone,re=a.onEndedTimeline,De=a.onTransmuxerLog,Ye=a.isEndOfTimeline,gt={buffer:[]},Ne=Ye;if(o.onmessage=function(tt){o.currentTransmux===a&&("data"===tt.data.action&&function(a,o,s){var t=a.data.segment,n=t.type,d=t.initSegment,L=t.videoFrameDtsTime,B=t.videoFramePtsTime;
29o.buffer.push({captions:t.captions,captionStreams:t.captionStreams,metadata:t.metadata});var F=a.data.segment.boxes||{data:a.data.segment.data},q={type:n,data:new Uint8Array(F.data,F.data.byteOffset,F.data.byteLength),initSegment:new Uint8Array(d.data,d.byteOffset,d.byteLength)};typeof L<"u"&&(q.videoFrameDtsTime=L),typeof B<"u"&&(q.videoFramePtsTime=B),s(q)}(tt,gt,m),"trackinfo"===tt.data.action&&_(tt.data.trackInfo),"gopInfo"===tt.data.action&&function(a,o){o.gopInfo=a.data.gopInfo}(tt,gt),"audioTimingInfo"===tt.data.action&&S(tt.data.audioTimingInfo),"videoTimingInfo"===tt.data.action&&L(tt.data.videoTimingInfo),"videoSegmentTimingInfo"===tt.data.action&&B(tt.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===tt.data.action&&F(tt.data.audioSegmentTimingInfo),"id3Frame"===tt.data.action&&q([tt.data.id3Frame],tt.data.id3Frame.dispatchType),"caption"===tt.data.action&&Z(tt.data.caption),"endedtimeline"===tt.data.action&&(Ne=!1,re()),"log"===tt.data.action&&De(tt.data.log),"transmuxed"===tt.data.type&&(Ne||(o.onmessage=null,function(a){var o=a.transmuxedData,s=a.callback;o.buffer=[],s(o)}({transmuxedData:gt,callback:ne}),y(o))))},t&&o.postMessage({action:"setAudioAppendStart",appendStart:t}),Array.isArray(n)&&o.postMessage({action:"alignGopsWith",gopsToAlignWith:n}),typeof d<"u"&&o.postMessage({action:"setRemux",remux:d}),s.byteLength){var st=s instanceof ArrayBuffer?s:s.buffer,je=s instanceof ArrayBuffer?0:s.byteOffset;o.postMessage({action:"push",data:st,byteOffset:je,byteLength:s.byteLength},[st])}Ye&&o.postMessage({action:"endTimeline"}),o.postMessage({action:"flush"})},y=function(a){a.currentTransmux=null,a.transmuxQueue.length&&(a.currentTransmux=a.transmuxQueue.shift(),"function"==typeof a.currentTransmux?a.currentTransmux():p(a.currentTransmux))},T=function(a,o){a.postMessage({action:o}),y(a)},M_reset=function(a){!function(a,o){if(!o.currentTransmux)return o.currentTransmux=a,void T(o,a);o.transmuxQueue.push(T.bind(null,o,a))}("reset",a)},H=function(a){var o=a.transmuxer,s=a.endAction||a.action,t=a.callback,n=be({},a,{endAction:null,transmuxer:null,callback:null});if(o.addEventListener("message",function S(L){L.data.action===s&&(o.removeEventListener("message",S),L.data.data&&(L.data.data=new Uint8Array(L.data.data,a.byteOffset||0,a.byteLength||L.data.data.byteLength),a.data&&(a.data=L.data.data)),t(L.data))}),a.data){var m=a.data instanceof ArrayBuffer;n.byteOffset=m?0:a.data.byteOffset,n.byteLength=a.data.byteLength,o.postMessage(n,[m?a.data:a.data.buffer])}else o.postMessage(n)},j=function(a){a.forEach(function(o){o.abort()})},pe=function(a,o){return o.timedout?{status:o.status,message:"HLS request timed-out at URL: "+o.uri,code:-101,xhr:o}:o.aborted?{status:o.status,message:"HLS request aborted at URL: "+o.uri,code:-102,xhr:o}:a?{status:o.status,message:"HLS request errored at URL: "+o.uri,code:2,xhr:o}:"arraybuffer"===o.responseType&&0===o.response.byteLength?{status:o.status,message:"Empty HLS response at URL: "+o.uri,code:2,xhr:o}:null},Se=function(a,o,s){return function(t,n){var d=n.response,m=pe(t,n);if(m)return s(m,a);if(16!==d.byteLength)return s({status:n.status,message:"Invalid HLS key at URL: "+n.uri,code:2,xhr:n},a);for(var _=new DataView(d),S=new Uint32Array([_.getUint32(0),_.getUint32(4),_.getUint32(8),_.getUint32(12)]),L=0;L<o.length;L++)o[L].bytes=S;return s(null,a)}},we=function(a,o){var s=bu(a.map.bytes);if("mp4"!==s)return o({internal:!0,message:"Found unsupported "+(s||"unknown")+" container for initialization segment at URL: "+(a.map.resolvedUri||a.map.uri),code:2});H({action:"probeMp4Tracks",data:a.map.bytes,transmuxer:a.transmuxer,callback:function(d){var m=d.tracks;return a.map.bytes=d.data,m.forEach(function(S){a.map.tracks=a.map.tracks||{},!a.map.tracks[S.type]&&(a.map.tracks[S.type]=S,"number"==typeof S.id&&S.timescale&&(a.map.timescales=a.map.timescales||{},a.map.timescales[S.id]=S.timescale))}),o(null)}})},fe=function(a){var o=a.segment,s=a.bytes,t=a.trackInfoFn,n=a.timingInfoFn,d=a.videoSegmentTimingInfoFn,m=a.audioSegmentTimingInfoFn,_=a.id3Fn,S=a.captionsFn,L=a.isEndOfTimeline,B=a.endedTimelineFn,F=a.dataFn,q=a.doneFn,Z=a.onTransmuxerLog,ne=o.map&&o.map.tracks||{},re=Boolean(ne.audio&&ne.video),De=n.bind(null,o,"audio","start"),Ye=n.bind(null,o,"audio","end"),gt=n.bind(null,o,"video","start"),Ne=n.bind(null,o,"video","end");H({action:"probeTs",transmuxer:o.transmuxer,data:s,baseStartTime:o.baseStartTime,callback:function(je){o.bytes=s=je.data;var Ge=je.result;Ge&&(t(o,{hasAudio:Ge.hasAudio,hasVideo:Ge.hasVideo,isMuxed:re}),t=null,Ge.hasAudio&&!re&&De(Ge.audioStart),Ge.hasVideo&&gt(Ge.videoStart),De=null,gt=null),function(a){if
29(!a.transmuxer.currentTransmux)return a.transmuxer.currentTransmux=a,void p(a);a.transmuxer.transmuxQueue.push(a)}({bytes:s,transmuxer:o.transmuxer,audioAppendStart:o.audioAppendStart,gopsToAlignWith:o.gopsToAlignWith,remux:re,onData:function(Ge){Ge.type="combined"===Ge.type?"video":Ge.type,F(o,Ge)},onTrackInfo:function(Ge){t&&(re&&(Ge.isMuxed=!0),t(o,Ge))},onAudioTimingInfo:function(Ge){De&&typeof Ge.start<"u"&&(De(Ge.start),De=null),Ye&&typeof Ge.end<"u"&&Ye(Ge.end)},onVideoTimingInfo:function(Ge){gt&&typeof Ge.start<"u"&&(gt(Ge.start),gt=null),Ne&&typeof Ge.end<"u"&&Ne(Ge.end)},onVideoSegmentTimingInfo:function(Ge){d(Ge)},onAudioSegmentTimingInfo:function(Ge){m(Ge)},onId3:function(Ge,tt){_(o,Ge,tt)},onCaptions:function(Ge){S(o,[Ge])},isEndOfTimeline:L,onEndedTimeline:function(){B()},onTransmuxerLog:Z,onDone:function(Ge){q&&(Ge.type="combined"===Ge.type?"video":Ge.type,q(null,o,Ge))}})}})},Ce=function(a){var o=a.segment,s=a.bytes,t=a.trackInfoFn,n=a.timingInfoFn,d=a.videoSegmentTimingInfoFn,m=a.audioSegmentTimingInfoFn,_=a.id3Fn,S=a.captionsFn,L=a.isEndOfTimeline,B=a.endedTimelineFn,F=a.dataFn,q=a.doneFn,Z=a.onTransmuxerLog,ne=new Uint8Array(s);if(function(a){return It(a,["moof"]).length>0}(ne)){o.isFmp4=!0;var re=o.map.tracks,De={isFmp4:!0,hasVideo:!!re.video,hasAudio:!!re.audio};re.audio&&re.audio.codec&&"enca"!==re.audio.codec&&(De.audioCodec=re.audio.codec),re.video&&re.video.codec&&"encv"!==re.video.codec&&(De.videoCodec=re.video.codec),re.video&&re.audio&&(De.isMuxed=!0),t(o,De);var Ye=function(Ne){F(o,{data:ne,type:De.hasAudio&&!De.isMuxed?"audio":"video"}),Ne&&Ne.length&&S(o,Ne),q(null,o,{})};H({action:"probeMp4StartTime",timescales:o.map.timescales,data:ne,transmuxer:o.transmuxer,callback:function(Ne){var Be=Ne.data,st=Ne.startTime;s=Be.buffer,o.bytes=ne=Be,De.hasAudio&&!De.isMuxed&&n(o,"audio","start",st),De.hasVideo&&n(o,"video","start",st),re.video&&Be.byteLength&&o.transmuxer?H({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:o.transmuxer,data:ne,timescales:o.map.timescales,trackIds:[re.video.id],callback:function(Ge){s=Ge.data.buffer,o.bytes=ne=Ge.data,Ge.logs.forEach(function(tt){Z(ye.mergeOptions(tt,{stream:"mp4CaptionParser"}))}),Ye(Ge.captions)}}):Ye()}})}else{if(o.transmuxer)return typeof o.container>"u"&&(o.container=bu(ne)),"ts"!==o.container&&"aac"!==o.container?(t(o,{hasAudio:!1,hasVideo:!1}),void q(null,o,{})):void fe({segment:o,bytes:s,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:m,id3Fn:_,captionsFn:S,isEndOfTimeline:L,endedTimelineFn:B,dataFn:F,doneFn:q,onTransmuxerLog:Z});q(null,o,{})}},ze=function(a,o){var _,s=a.id,t=a.key,n=a.encryptedBytes,d=a.decryptionWorker;d.addEventListener("message",function S(L){if(L.data.source===s){d.removeEventListener("message",S);var B=L.data.decrypted;o(new Uint8Array(B.bytes,B.byteOffset,B.byteLength))}}),_=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),d.postMessage(lh({source:s,encrypted:n,key:_,iv:t.iv}),[n.buffer,_.buffer])},St=function(a){var o=a.xhr,s=a.xhrOptions,n=a.segment,d=a.abortFn,m=a.progressFn,_=a.trackInfoFn,S=a.timingInfoFn,L=a.videoSegmentTimingInfoFn,B=a.audioSegmentTimingInfoFn,F=a.id3Fn,q=a.captionsFn,Z=a.isEndOfTimeline,ne=a.endedTimelineFn,re=a.dataFn,gt=[],Ne=function(a){var o=a.activeXhrs,s=a.decryptionWorker,t=a.trackInfoFn,n=a.timingInfoFn,d=a.videoSegmentTimingInfoFn,m=a.audioSegmentTimingInfoFn,_=a.id3Fn,S=a.captionsFn,L=a.isEndOfTimeline,B=a.endedTimelineFn,F=a.dataFn,q=a.doneFn,Z=a.onTransmuxerLog,ne=0,re=!1;return function(De,Ye){if(!re){if(De)return re=!0,j(o),q(De,Ye);if((ne+=1)===o.length){var gt=function(){if(Ye.encryptedBytes)return function(a){var s=a.segment,t=a.trackInfoFn,n=a.timingInfoFn,d=a.videoSegmentTimingInfoFn,m=a.audioSegmentTimingInfoFn,_=a.id3Fn,S=a.captionsFn,L=a.isEndOfTimeline,B=a.endedTimelineFn,F=a.dataFn,q=a.doneFn,Z=a.onTransmuxerLog;ze({id:s.requestId,key:s.key,encryptedBytes:s.encryptedBytes,decryptionWorker:a.decryptionWorker},function(ne){s.bytes=ne,Ce({segment:s,bytes:s.bytes,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:m,id3Fn:_,captionsFn:S,isEndOfTimeline:L,endedTimelineFn:B,dataFn:F,doneFn:q,onTransmuxerLog:Z})})}({decryptionWorker:s,segment:Ye,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:m,id3Fn:_,captionsFn:S,isEndOfTimeline:L,endedTimelineFn:B,dataFn:F,doneFn:q,onTransmuxerLog:Z});Ce({segment:Ye,bytes:Ye.bytes,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:m,id3Fn:_,captionsFn:S,isEndOfTimeline:L,endedTimelineFn:B,dataFn:F,doneFn:q,onTransmuxerLog:Z})};if(Ye.endOfAllRequests=Date.now(),Ye.map&&Ye.map.encryptedBytes&&!Ye.map.bytes)return ze({decryptionWorker:s,id:Ye.requestId+"-init",encryptedBytes:Ye.map.encryptedBytes,key:Ye.map.key},function(Ne){Ye.map.bytes=Ne,we(Ye,function(Be){if(Be)return j(o),q(Be,Ye);gt()})});gt()}}}}({activeXhrs:gt,decryptionWorker:a.decryptionWorker,trackInfoFn:_,timingInfoFn:S,videoSegmentTimingInfoFn:L,audioSegmentTimingInfoFn:B,id3Fn:F,captionsFn:q,isEndOfTimeline:Z,endedTimelineFn:ne,dataFn:re,doneFn:a.doneFn,onTransmuxerLog:a.onTransmuxerLog});if(n.key&&!n.key.bytes){var Be=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&Be.push(n.map.
29key);var Ge=o(ye.mergeOptions(s,{uri:n.key.resolvedUri,responseType:"arraybuffer"}),Se(n,Be,Ne));gt.push(Ge)}if(n.map&&!n.map.bytes){if(n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri)){var Et=o(ye.mergeOptions(s,{uri:n.map.key.resolvedUri,responseType:"arraybuffer"}),Se(n,[n.map.key],Ne));gt.push(Et)}var Yt=ye.mergeOptions(s,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:nf(n.map)}),Rr=function(a){var o=a.segment,s=a.finishProcessingFn;return function(t,n){var d=pe(t,n);if(d)return s(d,o);var m=new Uint8Array(n.response);if(o.map.key)return o.map.encryptedBytes=m,s(null,o);o.map.bytes=m,we(o,function(_){if(_)return _.xhr=n,_.status=n.status,s(_,o);s(null,o)})}}({segment:n,finishProcessingFn:Ne}),Gr=o(Yt,Rr);gt.push(Gr)}var hi=ye.mergeOptions(s,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:nf(n)}),Wr=o(hi,function(a){var o=a.segment,s=a.finishProcessingFn,t=a.responseType;return function(n,d){var m=pe(n,d);if(m)return s(m,o);var _="arraybuffer"!==t&&d.responseText?function(a){for(var o=new Uint8Array(new ArrayBuffer(a.length)),s=0;s<a.length;s++)o[s]=a.charCodeAt(s);return o.buffer}(d.responseText.substring(o.lastReachedChar||0)):d.response;return o.stats=function(a){return{bandwidth:a.bandwidth,bytesReceived:a.bytesReceived||0,roundTripTime:a.roundTripTime||0}}(d),o.key?o.encryptedBytes=new Uint8Array(_):o.bytes=new Uint8Array(_),s(null,o)}}({segment:n,finishProcessingFn:Ne,responseType:hi.responseType}));Wr.addEventListener("progress",function(a){var o=a.segment,s=a.progressFn;return function(t){if(!t.target.aborted)return o.stats=ye.mergeOptions(o.stats,function(a){var o=a.target,t={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-o.requestTime||0};return t.bytesReceived=a.loaded,t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8*1e3),t}(t)),!o.stats.firstBytesReceivedAt&&o.stats.bytesReceived&&(o.stats.firstBytesReceivedAt=Date.now()),s(t,o)}}({segment:n,progressFn:m,trackInfoFn:_,timingInfoFn:S,videoSegmentTimingInfoFn:L,audioSegmentTimingInfoFn:B,id3Fn:F,captionsFn:q,isEndOfTimeline:Z,endedTimelineFn:ne,dataFn:re})),gt.push(Wr);var tn={};return gt.forEach(function(Sr){Sr.addEventListener("loadend",function(a){var o=a.loadendState,s=a.abortFn;return function(t){t.target.aborted&&s&&!o.calledAbortFn&&(s(),o.calledAbortFn=!0)}}({loadendState:tn,abortFn:d}))}),function(){return j(gt)}},Pt=_n("CodecUtils"),Lt=function(a,o){var s=o.attributes||{};return a&&a.mediaGroups&&a.mediaGroups.AUDIO&&s.AUDIO&&a.mediaGroups.AUDIO[s.AUDIO]},kt=function(a){var o={};return a.forEach(function(s){var t=s.mediaType,n=s.type,d=s.details;o[t]=o[t]||[],o[t].push(Rt(""+n+d))}),Object.keys(o).forEach(function(s){if(o[s].length>1)return Pt("multiple "+s+" codecs found as attributes: "+o[s].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(o[s]=null);o[s]=o[s][0]}),o},Gt=function(a){var o=0;return a.audio&&o++,a.video&&o++,o},ar=function(a,o){var s=o.attributes||{},t=kt(function(a){var o=a.attributes||{};if(o.CODECS)return pr(o.CODECS)}(o)||[]);if(Lt(a,o)&&!t.audio&&!function(a,o){if(!Lt(a,o))return!0;var t=a.mediaGroups.AUDIO[(o.attributes||{}).AUDIO];for(var n in t)if(!t[n].uri&&!t[n].playlists)return!0;return!1}(a,o)){var n=kt(function(a,o){if(!a.mediaGroups.AUDIO||!o)return null;var s=a.mediaGroups.AUDIO[o];if(!s)return null;for(var t in s){var n=s[t];if(n.default&&n.playlists)return pr(n.playlists[0].attributes.CODECS)}return null}(a,s.AUDIO)||[]);n.audio&&(t.audio=n.audio)}return t},Zt=_n("PlaylistSelector"),Ar=function(a){if(a&&a.playlist){var o=a.playlist;return JSON.stringify({id:o.id,bandwidth:a.bandwidth,width:a.width,height:a.height,codecs:o.attributes&&o.attributes.CODECS||""})}},Cr=function(a,o){if(!a)return"";var s=A().getComputedStyle(a);return s?s[o]:""},fr=function(a,o){var s=a.slice();a.sort(function(t,n){var d=o(t,n);return 0===d?s.indexOf(t)-s.indexOf(n):d})},di=function(a,o){var s,t;return a.attributes.BANDWIDTH&&(s=a.attributes.BANDWIDTH),s=s||A().Number.MAX_VALUE,o.attributes.BANDWIDTH&&(t=o.attributes.BANDWIDTH),s-(t||A().Number.MAX_VALUE)},nr=function(a,o,s,t,n,d){if(a){var m={bandwidth:o,width:s,height:t,limitRenditionByPlayerDimensions:n},_=a.playlists;Wi.isAudioOnly(a)&&(_=d.getAudioTrackPlaylists_(),m.audioOnly=!0);var S=_.map(function(qe){var Et=qe.attributes&&qe.attributes.RESOLUTION&&qe.attributes.RESOLUTION.width,Yt=qe.attributes&&qe.attributes.RESOLUTION&&qe.attributes.RESOLUTION.height;return{bandwidth:qe.attributes&&qe.attributes.BANDWIDTH||A().Number.MAX_VALUE,width:Et,height:Yt,playlist:qe}});fr(S,function(qe,Ut){return qe.bandwidth-Ut.bandwidth});var L=(S=S.filter(function(qe){return!Wi.isIncompatible(qe.playlist)})).filter(function(qe){return Wi.isEnabled(qe.playlist)});L.length||(L=S.filter(function(qe){return!Wi.isDisabled(qe.playlist)}));var B=L.filter(function(qe){return qe.bandwidth*ni.BANDWIDTH_VARIANCE<o}),F=B[B.length-1],q=B.filter(function(qe){return qe.bandwidth===F.bandwidth})[0];if(!1===n){var Z=q||L[0]||S[0];if(Z&&Z.playlist){var ne="sortedPlaylistReps";return q&&(ne="bandwidthBestRep"),L[0]&&(ne="enabledPlaylistReps"),Zt("choosing "+Ar(Z)+" using "+ne+" with options",m),Z.playlist}return Zt("could not choose a playlist with options",m),null}var re=B.filter(function(qe){return qe.width&&qe.height});fr(re,function(qe,Ut){return qe.width-Ut.width});var De=re.filter(function(qe){return qe.width===s&&qe.height===t});F=De[De.length-1];var gt,Ne,Be,st,Ye=De.filter(function(qe){return qe.bandwidth===F.bandwidth})[0];if(Ye||(Ne=(gt=re.filter(function(qe){return qe.width>s||qe.height>t})).filter(function(qe){return qe.width===gt[0].width&&qe.height===gt[0].height}),F=Ne[Ne.length-1],Be=Ne.filter(function(qe){return qe.bandwidth===F.bandwidth})[0]),d.experimentalLeastPixelDiffSelector){var je=re.map(function(qe){return qe.pixelDiff=Math.abs(qe.width-s)+Math.abs(qe.height-t),qe});fr(je,function(qe,Ut){return qe.pixelDiff===Ut.pixelDiff?Ut.bandwidth-qe.bandwidth:qe.pixelDiff-Ut.pixelDiff}),st=je[0]}var Ge=st||Be||Ye||q||L[0]||S[0];if(Ge&&Ge.playlist){var tt="sortedPlaylistReps";return st?tt="leastPixelDiffRep":Be?tt="resolutionPlusOneRep":Ye?tt="resolutionBestRep":q?tt="bandwidthBestRep":L[0]&&(tt="enabledPlaylistReps"),Zt("choosing "+Ar(Ge)+" using "+tt+" with options",m),Ge.playlist}return Zt("could not choose a playlist with options",m),null}},ti=function(){var a=this.useDevicePixelRatio&&A().devicePixelRatio||1;return nr(this.playlists.master,this.systemBandwidth,parseInt(Cr(this.tech_.el(),"width"),10)*a,parseInt(Cr(this.tech_.el(),"height"),10)*a,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},kn=function(a,o,s){var t,n;if(s&&s.cues)for(t=s.cues.length;t--;)(n=s.cues[t]).startTime>=a&&n.endTime<=o&&s.removeCue(n)},zs=function(a){return"number"==typeof a&&isFinite(a)},$s=1/60,_i=function(a){var o=a.startOfSegment,s=a.duration,t=a.segment,n=a.part,d=a.playlist,m=d.mediaSequence,_=d.id,S=d.segments,B=a.mediaIndex,F=a.partIndex,q=a.timeline,Z=(void 0===S?[]:S).length-1,ne="mediaIndex/partIndex increment";a.getMediaInfoForTime?ne="getMediaInfoForTime ("+a.getMediaInfoForTime+")":a.isSyncRequest&&(ne="getSyncSegmentCandidate (isSyncRequest)"),a.independent&&(ne+=" with independent "+a.independent);var re="number"==typeof F,De=a.segment.uri?"segment":"pre-segment",Ye=re?Wc({preloadSegment:t})-1:0;
vendor: 10,120 bytes, line 29
29return De+" ["+(m+B)+"/"+(m+Z)+"]"+(re?" part ["+F+"/"+Ye+"]":"")+" segment start/end ["+t.start+" => "+t.end+"]"+(re?" part start/end ["+n.start+" => "+n.end+"]":"")+" startOfSegment ["+o+"] duration ["+s+"] timeline ["+q+"] selected by ["+ne+"] playlist ["+_+"]"},Qo=function(a){return a+"TimingInfo"},gl=function(a){var o=a.timelineChangeController,t=a.segmentTimeline,n=a.loaderType,d=a.audioDisabled;if(a.currentTimeline===t)return!1;if("audio"===n){var m=o.lastTimelineChange({type:"main"});return!m||m.to!==t}if("main"===n&&d){var _=o.pendingTimelineChange({type:"audio"});return!(_&&_.to===t)}return!1},ml=function(a){var o=a.segmentDuration,s=a.maxDuration;return!!o&&Math.round(o)>s+mi},Zo=function(g){function a(s,t){var n;if(n=g.call(this)||this,!s)throw new TypeError("Initialization settings are required");if("function"!=typeof s.currentTime)throw new TypeError("No currentTime getter specified");if(!s.mediaSource)throw new TypeError("No MediaSource specified");return n.bandwidth=s.bandwidth,n.throughput={rate:0,count:0},n.roundTrip=NaN,n.resetStats_(),n.mediaIndex=null,n.partIndex=null,n.hasPlayed_=s.hasPlayed,n.currentTime_=s.currentTime,n.seekable_=s.seekable,n.seeking_=s.seeking,n.duration_=s.duration,n.mediaSource_=s.mediaSource,n.vhs_=s.vhs,n.loaderType_=s.loaderType,n.currentMediaInfo_=void 0,n.startingMediaInfo_=void 0,n.segmentMetadataTrack_=s.segmentMetadataTrack,n.goalBufferLength_=s.goalBufferLength,n.sourceType_=s.sourceType,n.sourceUpdater_=s.sourceUpdater,n.inbandTextTracks_=s.inbandTextTracks,n.state_="INIT",n.timelineChangeController_=s.timelineChangeController,n.shouldSaveSegmentTimingInfo_=!0,n.parse708captions_=s.parse708captions,n.useDtsForTimestampOffset_=s.useDtsForTimestampOffset,n.captionServices_=s.captionServices,n.experimentalExactManifestTimings=s.experimentalExactManifestTimings,n.checkBufferTimeout_=null,n.error_=void 0,n.currentTimeline_=-1,n.pendingSegment_=null,n.xhrOptions_=null,n.pendingSegments_=[],n.audioDisabled_=!1,n.isPendingTimestampOffset_=!1,n.gopBuffer_=[],n.timeMapping_=0,n.safeAppend_=ye.browser.IE_VERSION>=11,n.appendInitSegment_={audio:!0,video:!0},n.playlistOfLastInitSegment_={audio:null,video:null},n.callQueue_=[],n.loadQueue_=[],n.metadataQueue_={id3:[],caption:[]},n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=null,n.activeInitSegmentId_=null,n.initSegments_={},n.cacheEncryptionKeys_=s.cacheEncryptionKeys,n.keyCache_={},n.decrypter_=s.decrypter,n.syncController_=s.syncController,n.syncPoint_={segmentIndex:0,time:0},n.transmuxer_=n.createTransmuxer_(),n.triggerSyncInfoUpdate_=function(){return n.trigger("syncinfoupdate")},n.syncController_.on("syncinfoupdate",n.triggerSyncInfoUpdate_),n.mediaSource_.addEventListener("sourceopen",function(){n.isEndOfStream_()||(n.ended_=!1)}),n.fetchAtBuffer_=!1,n.logger_=_n("SegmentLoader["+n.loaderType_+"]"),Object.defineProperty(Pe(n),"state",{get:function(){return this.state_},set:function(m){m!==this.state_&&(this.logger_(this.state_+" -> "+m),this.state_=m,this.trigger("statechange"))}}),n.sourceUpdater_.on("ready",function(){n.hasEnoughInfoToAppend_()&&n.processCallQueue_()}),"main"===n.loaderType_&&n.timelineChangeController_.on("pendingtimelinechange",function(){n.hasEnoughInfoToAppend_()&&n.processCallQueue_()}),"audio"===n.loaderType_&&n.timelineChangeController_.on("timelinechange",function(){n.hasEnoughInfoToLoad_()&&n.processLoadQueue_(),n.hasEnoughInfoToAppend_()&&n.processCallQueue_()}),n}ae(a,g);var o=a.prototype;return o.createTransmuxer_=function(){return function(a){var o=new r;o.currentTransmux=null,o.transmuxQueue=[];var s=o.terminate;return o.terminate=function(){return o.currentTransmux=null,o.transmuxQueue.length=0,s.call(o)},o.postMessage({action:"init",options:a}),o}({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},o.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},o.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&A().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},o.setAudio=function(t){this.audioDisabled_=!t,t?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},o.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},o.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,A().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},o.checkForAbort_=function(t){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==t:(this.state="READY",!0)},o.error=function(t){return typeof t<"u"&&(this.logger_("error occurred:",t),this.error_=t),this.pendingSegment_=null,this.error_},o.endOfStream=function(){this.ended_=!0,this.transmuxer_&&M_reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},o.buffered_=function(){var t=this.getMediaInfo_();if(!this.sourceUpdater_||!t)return ye.createTimeRanges();if("main"===this.loaderType_){var d=t.hasVideo;if(d&&t.hasAudio&&!this.audioDisabled_&&!t.isMuxed)return this.sourceUpdater_.buffered();if(d)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},o.initSegmentForMap=function(t,n){if(void 0===n&&(n=!1),!t)return null;var d=ul(t),m=this.initSegments_[d];return n&&!m&&t.bytes&&(this.initSegments_[d]=m={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:t.bytes,tracks:t.tracks,timescales:t.timescales}),m||t},o.segmentKey=function(t,n){if(void 0===n&&(n=!1),!t)return null;var d=ll(t),m=this.keyCache_[d];this.cacheEncryptionKeys_&&n&&!m&&t.bytes&&(this.keyCache_[d]=m={resolvedUri:t.resolvedUri,bytes:t.bytes});var _={resolvedUri:(m||t).resolvedUri};return m&&(_.bytes=m.bytes),_},o.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},o.load=function(){if(this.monitorBuffer_(),this.playlist_){if("INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}},o.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},o.playlist=function(t,n){if(void 0===n&&(n={}),t){var d=this.playlist_,m=this.pendingSegment_;this.playlist_=t,this.xhrOptions_=n,"INIT"===this.state&&(t.syncInfo={mediaSequence:t.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(t));var _=null;if(d&&(d.id?_=d.id:d.uri&&(_=d.uri)),this.logger_("playlist update ["+_+" => "+(t.id||t.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!d||d.uri!==t.uri)return null!==this.mediaIndex&&(t.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var S=t.mediaSequence-d.mediaSequence;if(this.logger_("live window shift ["+S+"]"),null!==this.mediaIndex)if(this.mediaIndex-=S,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var L=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!L.parts||!L.parts.length||!L.parts[this.partIndex])){var B=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=B}}m&&(m.mediaIndex-=S,m.mediaIndex<0?(m.mediaIndex=null,m.partIndex=null):(m.mediaIndex>=0&&(m.segment=t.segments[m.mediaIndex]),m.partIndex>=0&&m.segment.parts&&(m.part=m.segment.parts[m.partIndex]))),this.syncController_.saveExpiredSegmentInfo(d,t)}},o.pause=function(){this.checkBufferTimeout_&&(A().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},o.paused=function(){return null===this.checkBufferTimeout_},o.resetEverything=function(t){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,t),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},o.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},o.resyncLoader=function(){this.transmuxer_&&M_reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},o.remove=function(t,n,d,m){if(void 0===d&&(d=function(){}),void 0===m&&(m=!1),n===1/0&&(n=this.duration_()),n<=t)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var _=1,S=function(){0==--_&&d()};for(var L in(m||!this.audioDisabled_)&&(_++,this.sourceUpdater_.removeAudio(t,n,S)),(m||"main"===this.loaderType_)&&(this.gopBuffer_=function(a,o,s,t){for(var n=Math.ceil((o-t)*xu.ONE_SECOND_IN_TS),d=Math.ceil((s-t)*xu.ONE_SECOND_IN_TS),m=a.slice(),_=a.length;_--&&!(a[_].pts<=d););if(-1===_)return m;for(var S=_+1;S--&&!(a[S].pts<=n););return S=Math.max(S,0),m.splice(S,_-S+1),m}(this.gopBuffer_,t,n,this.timeMapping_),_++,this.sourceUpdater_.removeVideo(t,n,S)),this.inbandTextTracks_)kn(t,n,this.inbandTextTracks_[L]);kn(t,n,this.segmentMetadataTrack_),S()}else this.logger_("skipping remove because no source updater or starting media info")}
vendor: 4,200 bytes, line 29
29,o.monitorBuffer_=function(){this.checkBufferTimeout_&&A().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=A().setTimeout(this.monitorBufferTick_.bind(this),1)},o.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&A().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=A().setTimeout(this.monitorBufferTick_.bind(this),500)},o.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var t=this.chooseNextRequest_();t&&("number"==typeof t.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline})),this.loadSegment_(t))}},o.isEndOfStream_=function(t,n,d){if(void 0===t&&(t=this.mediaIndex),void 0===n&&(n=this.playlist_),void 0===d&&(d=this.partIndex),!n||!this.mediaSource_)return!1;var m="number"==typeof t&&n.segments[t];return n.endList&&"open"===this.mediaSource_.readyState&&t+1===n.segments.length&&(!m||!m.parts||d+1===m.parts.length)},o.chooseNextRequest_=function(){var t=this.buffered_(),n=jc(t)||0,d=Go(t,this.currentTime_()),m=!this.hasPlayed_()&&d>=1,_=d>=this.goalBufferLength_(),S=this.playlist_.segments;if(!S.length||m||_)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var L={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(L.isSyncRequest)L.mediaIndex=function(a,o,s){o=o||[];for(var t=[],n=0,d=0;d<o.length;d++){var m=o[d];if(a===m.timeline&&(t.push(d),(n+=m.duration)>s))return d}return 0===t.length?0:t[t.length-1]}(this.currentTimeline_,S,n);else if(null!==this.mediaIndex){var B=S[this.mediaIndex],F="number"==typeof this.partIndex?this.partIndex:-1;L.startOfSegment=B.end?B.end:n,B.parts&&B.parts[F+1]?(L.mediaIndex=this.mediaIndex,L.partIndex=F+1):L.mediaIndex=this.mediaIndex+1}else{var q=Wi.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?n:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),Z=q.segmentIndex,ne=q.startTime,re=q.partIndex;L.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+n:"currentTime "+this.currentTime_(),L.mediaIndex=Z,L.startOfSegment=ne,L.partIndex=re}var De=S[L.mediaIndex],Ye=De&&"number"==typeof L.partIndex&&De.parts&&De.parts[L.partIndex];if(!De||"number"==typeof L.partIndex&&!Ye)return null;if("number"!=typeof L.partIndex&&De.parts&&(L.partIndex=0,Ye=De.parts[0]),!d&&Ye&&!Ye.independent)if(0===L.partIndex){var gt=S[L.mediaIndex-1],Ne=gt.parts&&gt.parts.length&&gt.parts[gt.parts.length-1];Ne&&Ne.independent&&(L.mediaIndex-=1,L.partIndex=gt.parts.length-1,L.independent="previous segment")}else De.parts[L.partIndex-1].independent&&(L.partIndex-=1,L.independent="previous part");return L.mediaIndex>=S.length-1&&this.mediaSource_&&"ended"===this.mediaSource_.readyState&&!this.seeking_()?null:this.generateSegmentInfo_(L)},o.generateSegmentInfo_=function(t){var n=t.independent,d=t.playlist,m=t.mediaIndex,_=t.startOfSegment,S=t.isSyncRequest,L=t.partIndex,B=t.forceTimestampOffset,F=t.getMediaInfoForTime,q=d.segments[m],Z="number"==typeof L&&q.parts[L],ne={requestId:"segment-loader-"+Math.random(),uri:Z&&Z.resolvedUri||q.resolvedUri,mediaIndex:m,partIndex:Z?L:null,isSyncRequest:S,startOfSegment:_,playlist:d,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:q.timeline,duration:Z&&Z.duration||q.duration,segment:q,part:Z,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:F,independent:n},re=typeof B<"u"?B:this.isPendingTimestampOffset_;ne.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:q.timeline,currentTimeline:this.currentTimeline_,startOfSegment:_,buffered:this.buffered_(),overrideCheck:re});var De=jc(this.sourceUpdater_.audioBuffered());return"number"==typeof De&&(ne.audioAppendStart=De-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(ne.gopsToAlignWith=function(a,o,s){if
29(typeof o>"u"||null===o||!a.length)return[];var n,t=Math.ceil((o-s+3)*xu.ONE_SECOND_IN_TS);for(n=0;n<a.length&&!(a[n].pts>t);n++);return a.slice(n)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),ne},o.timestampOffsetForSegment_=function(t){return function(a){var o=a.segmentTimeline,s=a.currentTimeline,t=a.startOfSegment,n=a.buffered;return a.overrideCheck||o!==s?o<s?t:n.length?n.end(n.length-1):t:null}(t)},o.earlyAbortWhenNeeded_=function(t){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3)){var n=this.currentTime_(),d=t.bandwidth,m=this.pendingSegment_.duration,_=Wi.estimateSegmentRequestTime(m,d,this.playlist_,t.bytesReceived),S=function(a,o,s){return void 0===s&&(s=1),((a.length?a.end(a.length-1):0)-o)/s}(this.buffered_(),n,this.vhs_.tech_.playbackRate())-1;if(!(_<=S)){var L=function(a){var s=a.currentTime,t=a.bandwidth,n=a.duration,d=a.segmentDuration,m=a.timeUntilRebuffer,_=a.currentTimeline,S=a.syncController,L=a.master.playlists.filter(function(ne){return!Wi.isIncompatible(ne)}),B=L.filter(Wi.isEnabled);B.length||(B=L.filter(function(ne){return!Wi.isDisabled(ne)}));var q=B.filter(Wi.hasAttribute.bind(null,"BANDWIDTH")).map(function(ne){var De=S.getSyncPoint(ne,n,_,s)?1:2;return{playlist:ne,rebufferingImpact:Wi.estimateSegmentRequestTime(d,t,ne)*De-m}}),Z=q.filter(function(ne){return ne.rebufferingImpact<=0});return fr(Z,function(ne,re){return di(re.playlist,ne.playlist)}),Z.length?Z[0]:(fr(q,function(ne,re){return ne.rebufferingImpact-re.rebufferingImpact}),q[0]||null)}({master:this.vhs_.playlists.master,currentTime:n,bandwidth:d,duration:this.duration_(),segmentDuration:m,timeUntilRebuffer:S,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(L){var q=.5;S<=mi&&(q=1),L.playlist&&L.playlist.uri!==this.playlist_.uri&&!(_-S-L.rebufferingImpact<q)&&(this.bandwidth=L.playlist.attributes.BANDWIDTH*ni.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},o.handleAbort_=function(t){this.logger_("Aborting "+_i(t)),this.mediaRequestsAborted+=1},o.handleProgress_=function(t,n){this.earlyAbortWhenNeeded_(n.stats),!this.checkForAbort_(n.requestId)&&this.trigger("progress")},o.handleTrackInfo_=function(t,n){this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)&&(this.checkForIllegalMediaSwitch(n)||(function(a,o){if(!a&&!o||!a&&o||a&&!o)return!1;if(a===o)return!0;var s=Object.keys(a).sort(),t=Object.keys(o).sort();if(s.length!==t.length)return!1;for(var n=0;n<s.length;n++){var d=s[n];if(d!==t[n]||a[d]!==o[d])return!1}return!0}(this.currentMediaInfo_,n=n||{})||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=n,this.currentMediaInfo_=n,this.logger_("trackinfo update",n),this.trigger("trackinfo")),!this.checkForAbort_(t.requestId)&&(this.pendingSegment_.trackInfo=n,this.hasEnoughInfoToAppend_()&&this.processCallQueue_())))},o.handleTimingInfo_=function(t,n,d,m){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)){var _=this.pendingSegment_,S=Qo(n);_[S]=_[S]||{},_[S][d]=m,this.logger_("timinginfo: "+n+" - "+d+" - "+m),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},o.handleCaptions_=function(t,n){var d=this;if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)){if(0===n.length)return void this.logger_("SegmentLoader received no captions from a caption event");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,t,n));var _=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),S={};n.forEach(function(L){S[L.stream]=S[L.stream]||{startTime:1/0,captions:[],endTime:0};var B=S[L.stream];B.startTime=Math.min(B.startTime,L.startTime+_),B.endTime=Math.max(B.endTime,L.endTime+_),B.captions.push(L)}),Object.keys(S).forEach(function(L){var B=S[L],F=B.startTime,q=B.endTime,Z=B.captions,ne=d.inbandTextTracks_;d.logger_("adding cues from "+F+" ->
29 "+q+" for "+L),function(a,o,s){if(!a[s]){o.trigger({type:"usage",name:"vhs-608"}),o.trigger({type:"usage",name:"hls-608"});var t=s;/^cc708_/.test(s)&&(t="SERVICE"+s.split("_")[1]);var n=o.textTracks().getTrackById(t);if(n)a[s]=n;else{var m=s,_=s,S=!1,L=(o.options_.vhs&&o.options_.vhs.captionServices||{})[t];L&&(m=L.label,_=L.language,S=L.default),a[s]=o.addRemoteTextTrack({kind:"captions",id:t,default:S,label:m,language:_},!1).track}}}(ne,d.vhs_.tech_,L),kn(F,q,ne[L]),function(a){var o=a.inbandTextTracks,s=a.captionArray,t=a.timestampOffset;if(s){var n=A().WebKitDataCue||A().VTTCue;s.forEach(function(d){o[d.stream].addCue(new n(d.startTime+t,d.endTime+t,d.text))})}}({captionArray:Z,inbandTextTracks:ne,timestampOffset:_})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}},o.handleId3_=function(t,n,d){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)){if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.id3.push(this.handleId3_.bind(this,t,n,d));var _=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();(function(a,o,s){a.metadataTrack_||(a.metadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,a.metadataTrack_.inBandMetadataTrackDispatchType=o)})(this.inbandTextTracks_,d,this.vhs_.tech_),function(a){var o=a.inbandTextTracks,s=a.metadataArray,t=a.timestampOffset,n=a.videoDuration;if(s){var d=A().WebKitDataCue||A().VTTCue,m=o.metadataTrack_;if(m&&(s.forEach(function(q){var Z=q.cueTime+t;"number"!=typeof Z||A().isNaN(Z)||Z<0||!(Z<1/0)||q.frames.forEach(function(ne){var re=new d(Z,Z,ne.value||ne.url||ne.data||"");re.frame=ne,re.value=ne,function(a){Object.defineProperties(a.frame,{id:{get:function(){return ye.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),a.value.key}},value:{get:function(){return ye.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),a.value.data}},privateData:{get:function(){return ye.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),a.value.data}}})}(re),m.addCue(re)})}),m.cues&&m.cues.length)){for(var _=m.cues,S=[],L=0;L<_.length;L++)_[L]&&S.push(_[L]);var B=S.reduce(function(q,Z){var ne=q[Z.startTime]||[];return ne.push(Z),q[Z.startTime]=ne,q},{}),F=Object.keys(B).sort(function(q,Z){return Number(q)-Number(Z)});F.forEach(function(q,Z){var ne=B[q],re=Number(F[Z+1])||n;ne.forEach(function(De){De.endTime=re})})}}}({inbandTextTracks:this.inbandTextTracks_,metadataArray:n,timestampOffset:_,videoDuration:this.duration_()})}},o.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach(function(t){return t()}),this.metadataQueue_.caption.forEach(function(t){return t()}),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},o.processCallQueue_=function(){var t=this.callQueue_;this.callQueue_=[],t.forEach(function(n){return n()})},o.processLoadQueue_=function(){var t=this.loadQueue_;this.loadQueue_=[],t.forEach(function(n){return n()})},o.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var t=this.pendingSegment_;return!(!t||this.getCurrentMediaInfo_()&&gl({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:t.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},o.getCurrentMediaInfo_=function(t){return void 0===t&&(t=this.pendingSegment_),t&&t.trackInfo||this.currentMediaInfo_},o.getMediaInfo_=function(t){return void 0===t&&(t=this.pendingSegment_),this.getCurrentMediaInfo_(t)||this.startingMediaInfo_},o.getPendingSegmentPlaylist=function(){return this.pendingSegment_?this.pendingSegment_.playlist:null},o.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var t=this.pendingSegment_,n=this.getCurrentMediaInfo_();return!(!t||!n||n.hasVideo&&!t.videoTimingInfo||n.hasAudio&&!this.audioDisabled_&&!n.isMuxed&&!t.audioTimingInfo||gl({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:t.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},o.handleData_=function(t,n){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)){if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return void this.callQueue_.push(this.handleData_.bind(this,t,n));var d=this.pendingSegment_;if(this.setTimeMapping_(d.timeline),this.updateMediaSecondsLoaded_(d.part||d.segment),"closed"!==this.mediaSource_.readyState){if(t.map&&(t.map=this.initSegmentForMap(t.map,!0),d.segment.map=t.map),t.key&&this.segmentKey(t.key,!0),d.isFmp4=t.isFmp4,d.timingInfo=d.timingInfo||{},d.isFmp4)this.trigger("fmp4"),d.timingInfo.start=d[Qo(n.type)].start;else{var S,m=this.getCurrentMediaInfo_(),_="main"===this.loaderType_&&m&&m.hasVideo;_&&(S=d.videoTimingInfo.start),d.timingInfo.start=this.trueSegmentStart_({currentStart:d.timingInfo.start,playlist:d.playlist,mediaIndex:d.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:_,firstVideoFrameTimeForData:S,videoTimingInfo:d.videoTimingInfo,audioTimingInfo:d.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(d,n.type),this.updateSourceBufferTimestampOffset_(d),d.isSyncRequest){this.updateTimingInfoEnd_(d),this.syncController_.saveSegmentTimingInfo({segmentInfo:d,shouldSaveTimelineMapping:"main"===this.loaderType_});var L=this.chooseNextRequest_();if(L.mediaIndex!==d.mediaIndex||L.partIndex!==d.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}d.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(d,n)}}},o.updateAppendInitSegmentStatus=function(t,n){"main"===this.loaderType_&&"number"==typeof t.timestampOffset&&!t.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[n]!==t.playlist&&(this.appendInitSegment_[n]=!0)},o.getInitSegmentAndUpdateState_=function(t){var n=t.type,d=t.initSegment,m=t.map,_=t.playlist;if(m){var S=ul(m);if(this.activeInitSegmentId_===S)return null;d=this.initSegmentForMap(m,!0).bytes,this.activeInitSegmentId_=S}return d&&this.appendInitSegment_[n]?(this.playlistOfLastInitSegment_[n]=_,this.appendInitSegment_[n]=!1,this.activeInitSegmentId_=null,d):null},o.handleQuotaExceededError_=function(t,n){var d=this,m=t.segmentInfo,_=t.type,S=t.bytes,L=this.sourceUpdater_.audio
29Buffered(),B=this.sourceUpdater_.videoBuffered();L.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Aa(L).join(", ")),B.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Aa(B).join(", "));var F=L.length?L.start(0):0,q=L.length?L.end(L.length-1):0,Z=B.length?B.start(0):0,ne=B.length?B.end(B.length-1):0;if(q-F<=1&&ne-Z<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+S.byteLength+", audio buffer: "+Aa(L).join(", ")+", video buffer: "+Aa(B).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:m,type:_,bytes:S}));var De=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+De),this.remove(0,De,function(){d.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),d.waitingOnRemove_=!1,d.quotaExceededErrorRetryTimeout_=A().setTimeout(function(){d.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),d.quotaExceededErrorRetryTimeout_=null,d.processCallQueue_()},1e3)},!0)},o.handleAppendError_=function(t,n){var d=t.segmentInfo,m=t.type,_=t.bytes;if(n){if(22===n.code)return void this.handleQuotaExceededError_({segmentInfo:d,type:m,bytes:_});this.logger_("Received non QUOTA_EXCEEDED_ERR on append",n),this.error(m+" append of "+_.length+"b failed for segment #"+d.mediaIndex+" in playlist "+d.playlist.id),this.trigger("appenderror")}},o.appendToSourceBuffer_=function(t){var n=t.segmentInfo,d=t.type,m=t.initSegment,_=t.data,S=t.bytes;if(!S){var L=[_],B=_.byteLength;m&&(L.unshift(m),B+=m.byteLength),S=function(a){var s,o=0;return a.bytes&&(s=new Uint8Array(a.bytes),a.segments.forEach(function(t){s.set(t,o),o+=t.byteLength})),s}({bytes:B,segments:L})}this.sourceUpdater_.appendBuffer({segmentInfo:n,type:d,bytes:S},this.handleAppendError_.bind(this,{segmentInfo:n,type:d,bytes:S}))},o.handleSegmentTimingInfo_=function(t,n,d){if(this.pendingSegment_&&n===this.pendingSegment_.requestId){var m=this.pendingSegment_.segment,_=t+"TimingInfo";m[_]||(m[_]={}),m[_].transmuxerPrependedSeconds=d.prependedContentDuration||0,m[_].transmuxedPresentationStart=d.start.presentation,m[_].transmuxedDecodeStart=d.start.decode,m[_].transmuxedPresentationEnd=d.end.presentation,m[_].transmuxedDecodeEnd=d.end.decode,m[_].baseMediaDecodeTime=d.baseMediaDecodeTime}},o.appendData_=function(t,n){var d=n.type,m=n.data;if(m&&m.byteLength&&("audio"!==d||!this.audioDisabled_)){var _=this.getInitSegmentAndUpdateState_({type:d,initSegment:n.initSegment,playlist:t.playlist,map:t.isFmp4?t.segment.map:null});this.appendToSourceBuffer_({segmentInfo:t,type:d,initSegment:_,data:m})}},o.loadSegment_=function(t){var n=this;this.state="WAITING",this.pendingSegment_=t,this.trimBackBuffer_(t),"number"==typeof t.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(t):this.loadQueue_.push(function(){var d=be({},t,{forceTimestampOffset:!0});be(t,n.generateSegmentInfo_(d)),n.isPendingTimestampOffset_=!1,n.updateTransmuxerAndRequestSegment_(t)})},o.updateTransmuxerAndRequestSegment_=function(t){var n=this;this.shouldUpdateTransmuxerTimestampOffset_(t.timestampOffset)&&(this.gopBuffer_.length=0,t.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:t.timestampOffset}));var d=this.createSimplifiedSegmentObj_(t),L=this.isEndOfStream_(t.mediaIndex,t.playlist,t.partIndex)||null!==this.mediaIndex&&t.timeline!==this.currentTimeline_&&t.timeline>0;this.logger_("Requesting "+_i(t)),d.map&&!d.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),t.abortRequests=St({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:d,abortFn:this.handleAbort_.bind(this,t),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.b
29ind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",t.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",t.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:L,endedTimelineFn:function(){n.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(F){var q=F.message,Z=F.level,ne=F.stream;n.logger_(_i(t)+" logged from transmuxer stream "+ne+" as a "+Z+": "+q)}})},o.trimBackBuffer_=function(t){var n=function(a,o,s){var t=o-ni.BACK_BUFFER_LENGTH;return a.length&&(t=Math.max(t,a.start(0))),Math.min(o-s,t)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);n>0&&this.remove(0,n)},o.createSimplifiedSegmentObj_=function(t){var n=t.segment,d=t.part,m={resolvedUri:d?d.resolvedUri:n.resolvedUri,byterange:d?d.byterange:n.byterange,requestId:t.requestId,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,part:t.part},_=t.playlist.segments[t.mediaIndex-1];if(_&&_.timeline===n.timeline&&(_.videoTimingInfo?m.baseStartTime=_.videoTimingInfo.transmuxedDecodeEnd:_.audioTimingInfo&&(m.baseStartTime=_.audioTimingInfo.transmuxedDecodeEnd)),n.key){var S=n.key.iv||new Uint32Array([0,0,0,t.mediaIndex+t.playlist.mediaSequence]);m.key=this.segmentKey(n.key),m.key.iv=S}return n.map&&(m.map=this.initSegmentForMap(n.map)),m},o.saveTransferStats_=function(t){this.mediaRequests+=1,t&&(this.mediaBytesTransferred+=t.bytesReceived,this.mediaTransferDuration+=t.roundTripTime)},o.saveBandwidthRelatedStats_=function(t,n){this.pendingSegment_.byteLength=n.bytesReceived,t<$s?this.logger_("Ignoring segment's bandwidth because its duration of "+t+" is less than the min to record "+$s):(this.bandwidth=n.bandwidth,this.roundTrip=n.roundTripTime)},o.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")},o.segmentRequestFinished_=function(t,n,d){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,t,n,d));else if(this.saveTransferStats_(n.stats),this.pendingSegment_&&n.requestId===this.pendingSegment_.requestId){if(t){if(this.pendingSegment_=null,this.state="READY",-102===t.code)return;return this.pause(),-101===t.code?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(t),void this.trigger("error"))}var m=this.pendingSegment_;this.saveBandwidthRelatedStats_(m.duration,n.stats),m.endOfAllRequests=n.endOfAllRequests,d.gopInfo&&(this.gopBuffer_=function(a,o,s){if(!o.length)return a;if(s)return o.slice();for(var t=o[0].pts,n=0;n<a.length&&!(a[n].pts>=t);n++);return a.slice(0,n).concat(o)}(this.gopBuffer_,d.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(m)}},o.setTimeMapping_=function(t){var n=this.syncController_.mappingForTimeline(t);null!==n&&(this.timeMapping_=n)},o.updateMediaSecondsLoaded_=function(t){this.mediaSecondsLoaded+="number"==typeof t.start&&"number"==typeof t.end?t.end-t.start:t.duration},o.shouldUpdateTransmuxerTimestampOffset_=function(t){return null!==t&&("main"===this.loaderType_&&t!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&t!==this.sourceUpdater_.audioTimestampOffset())},o.trueSegmentStart_=function(t){var n=t.currentStart,m=t.mediaIndex,_=t.firstVideoFrameTimeForData;if(typeof n<"u")return n;if(!t.useVideoTimingInfo)return t.audioTimingInfo.start;var q=t.playlist.segments[m-1];return 0===m||!q||typeof q.start>"u"||q.end!==_+t.currentVideoTimestampOffset?_:t.videoTimingInfo.start},o.waitForAppendsToComplete_=function(t){var n=this.getCurrentMediaInfo_(t);if(!n)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var S="main"===this.loaderType_&&n.hasVideo,L=!this.audioDisabled_&&n.hasAudio&&!n.isMuxed;if(t.waitingOnAppends=0,!t.hasAppendedData_)return!t.timingInfo&&"number"==typeof t.timestampOffset&&(this.isPendingTimestampOffset_=!0),t.timingInfo={start:0},t.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(t),this.processMetadataQueue_()),void this.checkAppendsDone_(t);S&&t.waitingOnAppends++,L&&t.waitingOnAppends++,S&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,t)),L&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,t))},o.checkAppendsDone_=function(t){this.checkForAbort_(t.requestId)||
29(t.waitingOnAppends--,0===t.waitingOnAppends&&this.handleAppendsDone_())},o.checkForIllegalMediaSwitch=function(t){var n=function(a,o,s){return"main"===a&&o&&s?s.hasAudio||s.hasVideo?o.hasVideo&&!s.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!o.hasVideo&&s.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.getCurrentMediaInfo_(),t);return!!n&&(this.error({message:n,blacklistDuration:1/0}),this.trigger("error"),!0)},o.updateSourceBufferTimestampOffset_=function(t){if(null!==t.timestampOffset&&"number"==typeof t.timingInfo.start&&!t.changedTimestampOffset&&"main"===this.loaderType_){var n=!1;t.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:t.segment.videoTimingInfo,audioTimingInfo:t.segment.audioTimingInfo,timingInfo:t.timingInfo}),t.changedTimestampOffset=!0,t.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(t.timestampOffset),n=!0),t.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(t.timestampOffset),n=!0),n&&this.trigger("timestampoffset")}},o.getSegmentStartTimeForTimestampOffsetCalculation_=function(t){var n=t.videoTimingInfo,d=t.audioTimingInfo,m=t.timingInfo;return this.useDtsForTimestampOffset_?n&&"number"==typeof n.transmuxedDecodeStart?n.transmuxedDecodeStart:d&&"number"==typeof d.transmuxedDecodeStart?d.transmuxedDecodeStart:m.start:m.start},o.updateTimingInfoEnd_=function(t){t.timingInfo=t.timingInfo||{};var n=this.getMediaInfo_(),m="main"===this.loaderType_&&n&&n.hasVideo&&t.videoTimingInfo?t.videoTimingInfo:t.audioTimingInfo;m&&(t.timingInfo.end="number"==typeof m.end?m.end:m.start+t.duration)},o.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var t=this.pendingSegment_;this.updateTimingInfoEnd_(t),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:t,shouldSaveTimelineMapping:"main"===this.loaderType_});var n=function(a,o){if("hls"!==o)return null;var s=function(a){var o=0;return["video","audio"].forEach(function(s){var t=a[s+"TimingInfo"];if(t){var m,n=t.start,d=t.end;"bigint"==typeof n||"bigint"==typeof d?m=A().BigInt(d)-A().BigInt(n):"number"==typeof n&&"number"==typeof d&&(m=d-n),typeof m<"u"&&m>o&&(o=m)}}),"bigint"==typeof o&&o<Number.MAX_SAFE_INTEGER&&(o=Number(o)),o}({audioTimingInfo:a.audioTimingInfo,videoTimingInfo:a.videoTimingInfo});if(!s)return null;var t=a.playlist.targetDuration,n=ml({segmentDuration:s,maxDuration:2*t}),d=ml({segmentDuration:s,maxDuration:t});return n||d?{severity:n?"warn":"info",message:"Segment with index "+a.mediaIndex+" from playlist "+a.playlist.id+" has a duration of "+s+" when the reported duration is "+a.duration+" and the target duration is "+t+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1"}:null}(t,this.sourceType_);if(n&&("warn"===n.severity?ye.log.warn(n.message):this.logger_(n.message)),this.recordThroughput_(t),this.pendingSegment_=null,this.state="READY",!t.isSyncRequest||(this.trigger("syncinfoupdate"),t.hasAppendedData_)){this.logger_("Appended "+_i(t)),this.addSegmentMetadataCue_(t),this.fetchAtBuffer_=!0,this.currentTimeline_!==t.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline}),"main"===this.loaderType_&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:t.timeline})),this.currentTimeline_=t.timeline,this.trigger("syncinfoupdate");var d=t.segment,m=t.part,_=d.end&&this.currentTime_()-d.end>3*t.playlist.targetDuration,S=m&&m.end&&this.currentTime_()-m.end>3*t.playlist.partTargetDuration;if(_||S)return this.logger_("bad "+(_?"segment":"part")+" "+_i(t)),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=t.mediaIndex,this.partIndex=t.partIndex,this.isEndOfStream_
vendor: 5,816 bytes, line 29
29(t.mediaIndex,t.playlist,t.partIndex)&&this.endOfStream(),this.trigger("appended"),t.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}else this.logger_("Throwing away un-appended sync request "+_i(t))},o.recordThroughput_=function(t){if(t.duration<$s)this.logger_("Ignoring segment's throughput because its duration of "+t.duration+" is less than the min to record "+$s);else{var n=this.throughput.rate,d=Date.now()-t.endOfAllRequests+1,m=Math.floor(t.byteLength/d*8*1e3);this.throughput.rate+=(m-n)/++this.throughput.count}},o.addSegmentMetadataCue_=function(t){if(this.segmentMetadataTrack_){var n=t.segment,d=n.start,m=n.end;if(zs(d)&&zs(m)){kn(d,m,this.segmentMetadataTrack_);var _=A().WebKitDataCue||A().VTTCue,S={custom:n.custom,dateTimeObject:n.dateTimeObject,dateTimeString:n.dateTimeString,bandwidth:t.playlist.attributes.BANDWIDTH,resolution:t.playlist.attributes.RESOLUTION,codecs:t.playlist.attributes.CODECS,byteLength:t.byteLength,uri:t.uri,timeline:t.timeline,playlist:t.playlist.id,start:d,end:m},B=new _(d,m,JSON.stringify(S));B.value=S,this.segmentMetadataTrack_.addCue(B)}}},a}(ye.EventTarget);function En(){}var es,Ia=function(a){return"string"!=typeof a?a:a.replace(/./,function(o){return o.toUpperCase()})},La=["video","audio"],Xs=function(a,o){var s=o[a+"Buffer"];return s&&s.updating||o.queuePending[a]},yl=function g(a,o){if(0!==o.queue.length){var s=0,t=o.queue[s];if("mediaSource"===t.type)return void(!o.updating()&&"closed"!==o.mediaSource.readyState&&(o.queue.shift(),t.action(o),t.doneFn&&t.doneFn(),g("audio",o),g("video",o)));if("mediaSource"!==a&&o.ready()&&"closed"!==o.mediaSource.readyState&&!Xs(a,o)){if(t.type!==a){if(s=function(a,o){for(var s=0;s<o.length;s++){var t=o[s];if("mediaSource"===t.type)return null;if(t.type===a)return s}return null}(a,o.queue),null===s)return;t=o.queue[s]}if(o.queue.splice(s,1),o.queuePending[a]=t,t.action(a,o),!t.doneFn)return o.queuePending[a]=null,void g(a,o)}}},pf=function(a,o){var s=o[a+"Buffer"],t=Ia(a);s&&(s.removeEventListener("updateend",o["on"+t+"UpdateEnd_"]),s.removeEventListener("error",o["on"+t+"Error_"]),o.codecs[a]=null,o[a+"Buffer"]=null)},wn=function(a,o){return a&&o&&-1!==Array.prototype.indexOf.call(a.sourceBuffers,o)},en_appendBuffer=function(a,o,s){return function(t,n){var d=n[t+"Buffer"];if(wn(n.mediaSource,d)){n.logger_("Appending segment "+o.mediaIndex+"'s "+a.length+" bytes to "+t+"Buffer");try{d.appendBuffer(a)}catch(m){n.logger_("Error with code "+m.code+" "+(22===m.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+o.mediaIndex+" to "+t+"Buffer"),n.queuePending[t]=null,s(m)}}}},en_remove=function(a,o){return function(s,t){var n=t[s+"Buffer"];if(wn(t.mediaSource,n)){t.logger_("Removing "+a+" to "+o+" from "+s+"Buffer");try{n.remove(a,o)}catch(d){t.logger_("Remove "+a+" to "+o+" from "+s+"Buffer failed")}}}},en_timestampOffset=function(a){return function(o,s){var t=s[o+"Buffer"];wn(s.mediaSource,t)&&(s.logger_("Setting "+o+"timestampOffset to "+a),t.timestampOffset=a)}},en_callback=function(a){return function(o,s){a()}},en_endOfStream=function(a){return function(o){if("open"===o.mediaSource.readyState){o.logger_("Calling mediaSource endOfStream("+(a||"")+")");try{o.mediaSource.endOfStream(a)}catch(s){ye.log.warn("Failed to call media source endOfStream",s)}}}},en_duration=function(a){return function(o){o.logger_("Setting mediaSource duration to "+a);try{o.mediaSource.duration=a}catch(s){ye.log.warn("Failed to set media source duration",s)}}},en_addSourceBuffer=function(a,o){return function(s){var t=Ia(a),n=Pr(o);s.logger_("Adding "+a+"Buffer with codec "+o+" to mediaSource");var d=s.mediaSource.addSourceBuffer(n);d.addEventListener("updateend",s["on"+t+"UpdateEnd_"]),d.addEventListener("error",s["on"+t+"Error_"]),s.codecs[a]=o,s[a+"Buffer"]=d}},en_removeSourceBuffer=function(a){return function(o){var s=o[a+"Buffer"];if(pf(a,o),wn(o.mediaSource,s)){o.logger_("Removing "+a+"Buffer with codec "+o.codecs[a]+" from mediaSource");try{o.mediaSource.removeSourceBuffer(s)}catch(t){ye.log.warn("Failed to removeSourceBuffer "+a+"Buffer",t)}}}},en_changeType=function(a){return function(o,s){var t=s[o+"Buffer"],n=Pr(a);if(wn(s.mediaSource,t)&&s.codecs[o]!==a){s.logger_("changing "+o+"Buffer codec from "+s.codecs[o]+" to "+a);try{t.changeType(n),s.codecs[o]=a}catch(d){ye.log.warn("Failed to changeType on "+o+"Buffer",d)}}}},dn=function(a){var o=a.type,s=a.sourceUpdater;s.queue.push({type:o,action:a.action,doneFn:a.doneFn,name:a.name}),yl(o,s)},gf=function(a,o){return function(s){if(o.queuePending[a]){var t=o.queuePending[a].doneFn;o.queuePending[a]=null,t&&t(o[a+"Error_"])}yl(a,o)}},mf=function(g){function a(s){var t;return(t=g.call(this)||this).mediaSource=s,t.sourceopenListener_=function(){return yl("mediaSource",Pe(t))},t.mediaSource.addEventListener("sourceopen",t.sourceopenListener_),t.logger_=_n("SourceUpdater"),t.audioTimestampOffset_=0,t.videoTimestampOffset_=0,t.queue=[],t.queuePending={audio:null,video:null},t.delayedAudioAppendQueue_=[],t.videoAppendQueued_=!1,t.codecs={},t.onVideoUpdateEnd_=gf("video",Pe(t)),t.onAudioUpdateEnd_=gf("audio",Pe(t)),t.onVideoError_=function(n){t.videoError_=n},t.onAudioError_=function(n){t.audioError_=n},t.createdSourceBuffers_=!1,t.initializedEme_=!1,t.triggeredReady_=!1,t}ae(a,g);var o=a.prototype;return o.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},o.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},o.hasInitializedAnyEme=function(){return this.initializedEme_},o.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},o.createSourceBuffers=function(t){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(t),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}
vendor: 5,001 bytes, line 29
29,o.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},o.addSourceBuffer=function(t,n){dn({type:"mediaSource",sourceUpdater:this,action:en_addSourceBuffer(t,n),name:"addSourceBuffer"})},o.abort=function(t){dn({type:t,sourceUpdater:this,action:function(a,o){if("open"===o.mediaSource.readyState){var s=o[a+"Buffer"];if(wn(o.mediaSource,s)){o.logger_("calling abort on "+a+"Buffer");try{s.abort()}catch(t){ye.log.warn("Failed to abort on "+a+"Buffer",t)}}}},name:"abort"})},o.removeSourceBuffer=function(t){this.canRemoveSourceBuffer()?dn({type:"mediaSource",sourceUpdater:this,action:en_removeSourceBuffer(t),name:"removeSourceBuffer"}):ye.log.error("removeSourceBuffer is not supported!")},o.canRemoveSourceBuffer=function(){return!ye.browser.IE_VERSION&&!ye.browser.IS_FIREFOX&&A().MediaSource&&A().MediaSource.prototype&&"function"==typeof A().MediaSource.prototype.removeSourceBuffer},a.canChangeType=function(){return A().SourceBuffer&&A().SourceBuffer.prototype&&"function"==typeof A().SourceBuffer.prototype.changeType},o.canChangeType=function(){return this.constructor.canChangeType()},o.changeType=function(t,n){this.canChangeType()?dn({type:t,sourceUpdater:this,action:en_changeType(n),name:"changeType"}):ye.log.error("changeType is not supported!")},o.addOrChangeSourceBuffers=function(t){var n=this;if(!t||"object"!=typeof t||0===Object.keys(t).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(t).forEach(function(d){var m=t[d];if(!n.hasCreatedSourceBuffers())return n.addSourceBuffer(d,m);n.canChangeType()&&n.changeType(d,m)})},o.appendBuffer=function(t,n){var d=this,m=t.segmentInfo,_=t.type,S=t.bytes;if(this.processedAppend_=!0,"audio"===_&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([t,n]),void this.logger_("delayed audio append of "+S.length+" until video append");if(dn({type:_,sourceUpdater:this,action:en_appendBuffer(S,m||{mediaIndex:-1},n),doneFn:n,name:"appendBuffer"}),"video"===_){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var B=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+B.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,B.forEach(function(F){d.appendBuffer.apply(d,F)})}},o.audioBuffered=function(){return wn(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:ye.createTimeRange()},o.videoBuffered=function(){return wn(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:ye.createTimeRange()},o.buffered=function(){var t=wn(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,n=wn(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return n&&!t?this.audioBuffered():t&&!n?this.videoBuffered():function(a,o){var s=null,t=null,n=0,d=[],m=[];if(!(a&&a.length&&o&&o.length))return ye.createTimeRange();for(var _=a.length;_--;)d.push({time:a.start(_),type:"start"}),d.push({time:a.end(_),type:"end"});for(_=o.length;_--;)d.push({time:o.start(_),type:"start"}),d.push({time:o.end(_),type:"end"});for(d.sort(function(S,L){return S.time-L.time}),_=0;_<d.length;_++)"start"===d[_].type?2==++n&&(s=d[_].time):"end"===d[_].type&&1==--n&&(t=d[_].time),null!==s&&null!==t&&(m.push([s,t]),s=null,t=null);return ye.createTimeRanges(m)}(this.audioBuffered(),this.videoBuffered())},o.setDuration=function(t,n){void 0===n&&(n=En),dn({type:"mediaSource",sourceUpdater:this,action:en_duration(t),name:"duration",doneFn:n})},o.endOfStream=function(t,n){void 0===t&&(t=null),void 0===n&&(n=En),"string"!=typeof t&&(t=void 0),dn({type:"mediaSource",sourceUpdater:this,action:en_endOfStream(t),name:"endOfStream",doneFn:n})},o.removeAudio=function(t,n,d){void 0===d&&(d=En),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?dn({type:"audio",sourceUpdater:this,action:en_remove(t,n),doneFn:d,name:"remove"}):d()},o.removeVideo=function(t,n,d){void 0===d&&(d=En),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?dn({type:"video",sourceUpdater:this,action:en_remove(t,n),doneFn:d,name:"remove"}):d()},o.updating=function(){return!(!Xs("audio",this)&&!Xs("video",this))},o.audioTimestampOffset=function(t){return typeof t<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==t&&(dn({type:"audio",sourceUpdater:this,action:en_timestampOffset(t),name:"timestampOffset"}),this.audioTimestampOffset_=t),this.audioTimestampOffset_},o.videoTimestampOffset=function(t){return typeof t<"u"&&this.videoBuffer&&this.videoTimestampOffset!==t&&(dn({type:"video",sourceUpdater:this,action:en_timestampOffset(t),name:"timestampOffset"}),this.videoTimestampOffset_=t),this.videoTimestampOffset_},o.audioQueueCallback=function(t){this.audioBuffer&&dn({type:"audio",sourceUpdater:this,action:en_callback(t),name:"callback"})},o.videoQueueCallback=function(t){this.videoBuffer&&dn({type:"video",sourceUpdater:this,action:en_callback(t),name:"callback"})},o.dispose=function(){var t=this;
29this.trigger("dispose"),La.forEach(function(n){t.abort(n),t.canRemoveSourceBuffer()?t.removeSourceBuffer(n):t[n+"QueueCallback"](function(){return pf(n,t)})}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},a}(ye.EventTarget),Jo=function(a){return decodeURIComponent(escape(String.fromCharCode.apply(null,a)))},Tl=new Uint8Array("\n\n".split("").map(function(g){return g.charCodeAt(0)})),np=function(g){function a(){return g.call(this,"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")||this}return ae(a,g),a}(Au(Error)),ap=function(g){function a(s,t){var n;return void 0===t&&(t={}),(n=g.call(this,s,t)||this).mediaSource_=null,n.subtitlesTrack_=null,n.loaderType_="subtitle",n.featuresNativeTextTracks_=s.featuresNativeTextTracks,n.loadVttJs=s.loadVttJs,n.shouldSaveSegmentTimingInfo_=!1,n}ae(a,g);var o=a.prototype;return o.createTransmuxer_=function(){return null},o.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return ye.createTimeRanges();var t=this.subtitlesTrack_.cues;return ye.createTimeRanges([[t[0].startTime,t[t.length-1].startTime]])},o.initSegmentForMap=function(t,n){if(void 0===n&&(n=!1),!t)return null;var d=ul(t),m=this.initSegments_[d];if(n&&!m&&t.bytes){var S=new Uint8Array(Tl.byteLength+t.bytes.byteLength);S.set(t.bytes),S.set(Tl,t.bytes.byteLength),this.initSegments_[d]=m={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:S}}return m||t},o.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},o.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},o.track=function(t){return typeof t>"u"||(this.subtitlesTrack_=t,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},o.remove=function(t,n){kn(t,n,this.subtitlesTrack_)},o.fillBuffer_=function(){var t=this,n=this.chooseNextRequest_();if(n){if(null===this.syncController_.timestampOffsetForTimeline(n.timeline))return this.syncController_.one("timestampoffset",function(){t.state="READY",t.paused()||t.monitorBuffer_()}),void(this.state="WAITING_ON_TIMELINE");this.loadSegment_(n)}},o.timestampOffsetForSegment_=function(){return null},o.chooseNextRequest_=function(){return this.skipEmptySegments_(g.prototype.chooseNextRequest_.call(this))},o.skipEmptySegments_=function(t){for(;t&&t.segment.empty;){if(t.mediaIndex+1>=t.playlist.segments.length){t=null;break}t=this.generateSegmentInfo_({playlist:t.playlist,mediaIndex:t.mediaIndex+1,startOfSegment:t.startOfSegment+t.duration,isSyncRequest:t.isSyncRequest})}return t},o.stopForError=function(t){this.error(t),this.state="READY",this.pause(),this.trigger("error")},o.segmentRequestFinished_=function(t,n,d){var m=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(n.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(t)return-101===t.code&&this.handleTimeout_(),-102===t.code?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(t);var _=this.pendingSegment_;this.saveBandwidthRelatedStats_(_.duration,n.stats),n.key&&this.segmentKey(n.key,!0),this.state="APPENDING",this.trigger("appending");var S=_.segment;if(S.map&&(S.map.bytes=n.map.bytes),_.bytes=n.bytes,"function"!=typeof A().WebVTT&&"function"==typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then(function(){return m.segmentRequestFinished_(t,n,d)},function(){return m.stopForError({message:"Error loading vtt.js"})});S.requested=!0;try{this.parseVTTCues_(_)}catch(L){return void this.stopForError({message:L.message})}if(this.updateTimeMapping_(_,this.syncController_.timelines[_.timeline],this.playlist_),_.timingInfo=_.cues.length?{start:_.cues[0].startTime,end:_.cues[_.cues.length-1].endTime}:{start:_.startOfSegment,end:_.startOfSegment+_.duration},_.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");_.byteLength=_.bytes.byteLength,this.mediaSecondsLoaded+=S.duration,_.cues.forEac
29h(function(L){m.subtitlesTrack_.addCue(m.featuresNativeTextTracks_?new(A().VTTCue)(L.startTime,L.endTime,L.text):L)}),function(a){var o=a.cues;if(o)for(var s=0;s<o.length;s++){for(var t=[],n=0,d=0;d<o.length;d++)o[s].startTime===o[d].startTime&&o[s].endTime===o[d].endTime&&o[s].text===o[d].text&&++n>1&&t.push(o[d]);t.length&&t.forEach(function(m){return a.removeCue(m)})}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},o.handleData_=function(){},o.updateTimingInfoEnd_=function(){},o.parseVTTCues_=function(t){var n,d=!1;if("function"!=typeof A().WebVTT)throw new np;"function"==typeof A().TextDecoder?n=new(A().TextDecoder)("utf8"):(n=A().WebVTT.StringDecoder(),d=!0);var m=new(A().WebVTT.Parser)(A(),A().vttjs,n);if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},m.oncue=t.cues.push.bind(t.cues),m.ontimestampmap=function(L){t.timestampmap=L},m.onparsingerror=function(L){ye.log.warn("Error encountered when parsing cues: "+L.message)},t.segment.map){var _=t.segment.map.bytes;d&&(_=Jo(_)),m.parse(_)}var S=t.bytes;d&&(S=Jo(S)),m.parse(S),m.flush()},o.updateTimeMapping_=function(t,n,d){var m=t.segment;if(n){if(!t.cues.length)return void(m.empty=!0);var _=t.timestampmap,S=_.MPEGTS/xu.ONE_SECOND_IN_TS-_.LOCAL+n.mapping;t.cues.forEach(function(F){F.startTime+=S,F.endTime+=S}),d.syncInfo||(d.syncInfo={mediaSequence:d.mediaSequence+t.mediaIndex,time:Math.min(t.cues[0].startTime,t.cues[t.cues.length-1].startTime-m.duration)})}},a}(Zo),yf=function(a,o){for(var s=a.cues,t=0;t<s.length;t++){var n=s[t];if(o>=n.adStartTime&&o<=n.adEndTime)return n}return null},gh=[{name:"VOD",run:function(a,o,s,t,n){return s!==1/0?{time:0,segmentIndex:0,partIndex:null}:null}},{name:"ProgramDateTime",run:function(a,o,s,t,n){if(!Object.keys(a.timelineToDatetimeMappings).length)return null;var d=null,m=null,_=qs(o);n=n||0;for(var S=0;S<_.length;S++){var B=_[o.endList||0===n?S:_.length-(S+1)],F=B.segment,q=a.timelineToDatetimeMappings[F.timeline];if(q&&F.dateTimeObject){var ne=F.dateTimeObject.getTime()/1e3+q;if(F.parts&&"number"==typeof B.partIndex)for(var re=0;re<B.partIndex;re++)ne+=F.parts[re].duration;var De=Math.abs(n-ne);if(null!==m&&(0===De||m<De))break;m=De,d={time:ne,segmentIndex:B.segmentIndex,partIndex:B.partIndex}}}return d}},{name:"Segment",run:function(a,o,s,t,n){var d=null,m=null;n=n||0;for(var _=qs(o),S=0;S<_.length;S++){var B=_[o.endList||0===n?S:_.length-(S+1)],F=B.segment,q=B.part&&B.part.start||F&&F.start;if(F.timeline===t&&typeof q<"u"){var Z=Math.abs(n-q);if(null!==m&&m<Z)break;(!d||null===m||m>=Z)&&(m=Z,d={time:q,segmentIndex:B.segmentIndex,partIndex:B.partIndex})}}return d}},{name:"Discontinuity",run:function(a,o,s,t,n){var d=null;if(n=n||0,o.discontinuityStarts&&o.discontinuityStarts.length)for(var m=null,_=0;_<o.discontinuityStarts.length;_++){var S=o.discontinuityStarts[_],B=a.discontinuities[o.discontinuitySequence+_+1];if(B){var F=Math.abs(n-B.time);if(null!==m&&m<F)break;(!d||null===m||m>=F)&&(m=F,d={time:B.time,segmentIndex:S,partIndex:null})}}return d}},{name:"Playlist",run:function(a,o,s,t,n){return o.syncInfo?{time:o.syncInfo.time,segmentIndex:o.syncInfo.mediaSequence-o.mediaSequence,partIndex:null}:null}}],vg=function(g){function a(s){var t;return(t=g.call(this)||this).timelines=[],t.discontinuities=[],t.timelineToDatetimeMappings={},t.logger_=_n("SyncController"),t}ae(a,g);var o=a.prototype;return o.getSyncPoint=function(t,n,d,m){var _=this.runStrategies_(t,n,d,m);return _.length?this.selectSyncPoint_(_,{key:"time",value:m}):null},o.getExpiredTime=function(t,n){if(!t||!t.segments)return null;var d=this.runStrategies_(t,n,t.discontinuitySequence,0);if(!d.length)return null;var m=this.selectSyncPoint_(d,{key:"segmentIndex",value:0});return m.segmentIndex>0&&(m.time*=-1),Math.abs(m.time+$a({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:m.segmentIndex,endIndex:0}))},o.runStrategies_=function(t,n,d,m){for(var _=[],S=0;S<gh.length;S++){var L=gh[S],B=L.run(this,t,n,d,m);B&&(B.strategy=L.name,_.push({strategy:L.name,syncPoint:B}))}return _},o.selectSyncPoint_=function(t,n){for(var d=t[0].syncPoint,m=Math.abs(t[0].syncPoint[n.key]-n.value),_=t[0].strategy,S=1;S<t.length;S++){var L=Math.abs(t[S].syncPoint[n.key]-n.value);L<m&&(m=L,d=t[S].syncPoint,_=t[S].strategy)}return this.logger_("syncPoint for ["+n.key+": "+n.value+"] chosen with strategy ["+_+"]: [time:"+d.time+", segmentIndex:"+d.segmentIndex+("number"==typeof d.partIndex?",partIndex:"+d.partIndex:"")+"]"),d},o.saveExpiredSegmentInfo=function(t,n){var d=n.mediaSequence-t.mediaSequence;if(d>86400)ye.log.warn("Not saving expired segment info. Media sequence gap "+d+" is too large.");else for(var m=d-1;m>=0;m--){var _=t.segments[m];if(_&&typeof _.start<"u"){n.syncInfo={mediaSequence:t.mediaSequence+m,time:_.start}
vendor: 9,055 bytes, lines 29-32
29,this.logger_("playlist refresh sync: [time:"+n.syncInfo.time+", mediaSequence: "+n.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},o.setDateTimeMappingForStart=function(t){if(this.timelineToDatetimeMappings={},t.segments&&t.segments.length&&t.segments[0].dateTimeObject){var n=t.segments[0],d=n.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[n.timeline]=-d}},o.saveSegmentTimingInfo=function(t){var n=t.segmentInfo,d=t.shouldSaveTimelineMapping,m=this.calculateSegmentTimeMapping_(n,n.timingInfo,d),_=n.segment;m&&(this.saveDiscontinuitySyncInfo_(n),n.playlist.syncInfo||(n.playlist.syncInfo={mediaSequence:n.playlist.mediaSequence+n.mediaIndex,time:_.start}));var S=_.dateTimeObject;_.discontinuity&&d&&S&&(this.timelineToDatetimeMappings[_.timeline]=-S.getTime()/1e3)},o.timestampOffsetForTimeline=function(t){return typeof this.timelines[t]>"u"?null:this.timelines[t].time},o.mappingForTimeline=function(t){return typeof this.timelines[t]>"u"?null:this.timelines[t].mapping},o.calculateSegmentTimeMapping_=function(t,n,d){var L,B,m=t.segment,_=t.part,S=this.timelines[t.timeline];if("number"==typeof t.timestampOffset)S={time:t.startOfSegment,mapping:t.startOfSegment-n.start},d&&(this.timelines[t.timeline]=S,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+t.timeline+": [time: "+S.time+"] [mapping: "+S.mapping+"]")),L=t.startOfSegment,B=n.end+S.mapping;else{if(!S)return!1;L=n.start+S.mapping,B=n.end+S.mapping}return _&&(_.start=L,_.end=B),(!m.start||L<m.start)&&(m.start=L),m.end=B,!0},o.saveDiscontinuitySyncInfo_=function(t){var n=t.playlist,d=t.segment;if(d.discontinuity)this.discontinuities[d.timeline]={time:d.start,accuracy:0};else if(n.discontinuityStarts&&n.discontinuityStarts.length)for(var m=0;m<n.discontinuityStarts.length;m++){var _=n.discontinuityStarts[m],S=n.discontinuitySequence+m+1,L=_-t.mediaIndex,B=Math.abs(L);if(!this.discontinuities[S]||this.discontinuities[S].accuracy>B){var F;F=L<0?d.start-$a({defaultDuration:n.targetDuration,durationList:n.segments,startIndex:t.mediaIndex,endIndex:_}):d.end+$a({defaultDuration:n.targetDuration,durationList:n.segments,startIndex:t.mediaIndex+1,endIndex:_}),this.discontinuities[S]={time:F,accuracy:B}}}},o.dispose=function(){this.trigger("dispose"),this.off()},a}(ye.EventTarget),pg=function(g){function a(){var s;return(s=g.call(this)||this).pendingTimelineChanges_={},s.lastTimelineChanges_={},s}ae(a,g);var o=a.prototype;return o.clearPendingTimelineChange=function(t){this.pendingTimelineChanges_[t]=null,this.trigger("pendingtimelinechange")},o.pendingTimelineChange=function(t){var n=t.type,d=t.from,m=t.to;return"number"==typeof d&&"number"==typeof m&&(this.pendingTimelineChanges_[n]={type:n,from:d,to:m},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[n]},o.lastTimelineChange=function(t){var n=t.type,d=t.from,m=t.to;return"number"==typeof d&&"number"==typeof m&&(this.lastTimelineChanges_[n]={type:n,from:d,to:m},delete this.pendingTimelineChanges_[n],this.trigger("timelinechange")),this.lastTimelineChanges_[n]},o.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},a}(ye.EventTarget),gg=l(i(function(){var g=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function a(Ne,Be,st){return Ne(st={path:Be,exports:{},require:function(Ge,tt){return function o(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},st.exports),st.exports}var s=a(function(Ne){function Be(je,Ge){for(var tt=0;tt<Ge.length;tt++){var qe=Ge[tt];qe.enumerable=qe.enumerable||!1,qe.configurable=!0,"value"in qe&&(qe.writable=!0),Object.defineProperty(je,qe.key,qe)}}Ne.exports=function st(je,Ge,tt){return Ge&&Be(je.prototype,Ge),tt&&Be(je,tt),je},Ne.exports.default=Ne.exports,Ne.exports.__esModule=!0}),t=a(function(Ne){function Be(st,je){return Ne.exports=Be=Object.setPrototypeOf||function(tt,qe){return tt.__proto__=qe,tt},Ne.exports.default=Ne.exports,Ne.exports.__esModule=!0,Be(st,je)}Ne.exports=Be,Ne.exports.default=Ne.exports,Ne.exports.__esModule=!0}),n=a(function(Ne){Ne.exports=function Be(st,je){st.prototype=Object.create(je.prototype),st.prototype.constructor=st,t(st,je)},Ne.exports.default=Ne.exports,Ne.exports.__esModule=!0}),d=function(){function Ne(){this.listeners={}}var Be=Ne.prototype;return Be.on=function(je,Ge){this.listeners[je]||(this.listeners[je]=[]),this.listeners[je].push(Ge)},Be.off=function(je,Ge){if(!this.listeners[je])return!1;var tt=this.listeners[je].indexOf(Ge);return this.listeners[je]=this.listeners[je].slice(0),this.listeners[je].splice(tt,1),tt>-1},Be.trigger=function(je){var Ge=this.listeners[je];if(Ge)if(2===arguments.length)for(var tt=Ge.length,qe=0;qe<tt;++qe)Ge[qe].call(this,arguments[1]);else for(var Ut=Array.prototype.slice.call(arguments,1),Et=Ge.length,Yt=0;Yt<Et;++Yt)Ge[Yt].apply(this,Ut)},Be.dispose=function(){this.listeners={}},Be.pipe=function(je){this.on("data",function(Ge){je.push(Ge)})},Ne}(),_=function(){var qe,Ut,Et,Gr,hi,Wr,tn,Sr,Be=[[[],[],[],[],[]],[[],[],[],[],[]]],st=Be[0],je=Be[1],Ge=st[4],tt=je[4],Yt=[],Rr=[];for(qe=0;qe<256;qe++)Rr[(Yt[qe]=qe<<1^283*(qe>>7))^qe]=qe;for(Ut=Et=0;!Ge[Ut];Ut^=Gr||1,Et=Rr[Et]||1)for(Ge[Ut]=Wr=(Wr=Et^Et<<1^Et<<2^Et<<3^Et<<4)>>8^255&Wr^99,tt[Wr]=Ut,Sr=16843009*Yt[hi=Yt[Gr=Yt[Ut]]]^65537*hi^257*Gr^16843008*Ut,tn=257*Yt[Wr]^16843008*Wr,qe=0;qe<4;qe++)st[qe][Ut]=tn=tn<<24^tn>>>8,je[qe][Wr]=Sr=Sr<<24^Sr>>>8;for(qe=0;qe<5;qe++)st[qe]=st[qe].slice(0),je[qe]=je[qe].slice(0);return Be},S=null,L=function(){function Ne(st){S||(S=_()),this._tables=[[S[0][0].slice(),S[0][1].slice(),S[0][2].slice(),S[0][3].slice(),S[0][4].slice()],[S[1][0].slice(),S[1][1].slice(),S[1][2].slice(),S[1][3].slice(),S[1][4].slice()]];var je,Ge,tt,qe=this._tables[0][4],Ut=this._tables[1],Et=st.length,Yt=1;if(4!==Et&&6!==Et&&8!==Et)throw new Error("Invalid aes key size");var Rr=st.slice(0),Gr=[];for(this._key=[Rr,Gr],je=Et;je<4*Et+28;je++)tt=Rr[je-1],(je%Et==0||8===Et&&je%Et==4)&&(tt=qe[tt>>>24]<<24^qe[tt>>16&255]<<16^qe[tt>>8&255]<<8^qe[255&tt],je%Et==0&&(tt=tt<<8^tt>>>24^Yt<<24,Yt=Yt<<1^283*(Yt>>7))),Rr[je]=Rr[je-Et]^tt;for(Ge=0;je;Ge++,je--)tt=Rr[3&Ge?je:je-4],Gr[Ge]=je<=4||Ge<4?tt:Ut[0][qe[tt>>>24]]^Ut[1][qe[tt>>16&255]]^Ut[2][qe[tt>>8&255]]^Ut[3][qe[255&tt]]}return Ne.prototype.decrypt=function(je,Ge,tt,qe,Ut,Et){var Wr,tn,Sr,Wn,Yt=this._key[1],Rr=je^Yt[0],Gr=qe^Yt[1],hi=tt^Yt[2],Ei=Ge^Yt[3],Th=Yt.length/4-2,ts=4,Qs=this._tables[1],eu=Qs[0],Da=Qs[1],El=Qs[2],Sl=Qs[3],bl=Qs[4];for(Wn=0;Wn<Th;Wn++)Wr=eu[Rr>>>24]^Da[Gr>>16&255]^El[hi>>8&255]^Sl[255&Ei]^Yt[ts],tn=eu[Gr>>>24]^Da[hi>>16&255]^El[Ei>>8&255]^Sl[255&Rr]^Yt[ts+1],Sr=eu[hi>>>24]^Da[Ei>>16&255]^El[Rr>>8&255]^Sl[255&Gr]^Yt[ts+2],Ei=eu[Ei>>>24]^Da[Rr>>16&255]^El[Gr>>8&255]^Sl[255&hi]^Yt[ts+3],ts+=4,Rr=Wr,Gr=tn,hi=Sr;for(Wn=0;Wn<4;Wn++)Ut[(3&-Wn)+Et]=bl[Rr>>>24]<<24^bl[Gr>>16&255]<<16^bl[hi>>8&255]<<8^bl[255&Ei]^Yt[ts++],Wr=Rr,Rr=Gr,Gr=hi,hi=Ei,Ei=Wr},Ne}(),B=function(Ne){function Be(){var je;return(je=Ne.call(this,d)||this).jobs=[],je.delay=1,je.timeout_=null,je}n(Be,Ne);var st=Be.prototype;return st.processJob_=function(){this.jobs.shift()(),this.timeout_=this.jobs.length?setTimeout(this.processJob_.bind(this),this.delay):null},st.push=function(Ge){this.jobs.push(Ge),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},Be}(d),F=function(Be){return Be<<24|(65280&Be)<<8|(16711680&Be)>>8|Be>>>24},Z=function(){function Ne(st,je,Ge,tt){var qe=Ne.STEP,Ut=new Int32Array(st.buffer),Et=new Uint8Array(st.byteLength),Yt=0;for(this.asyncStream_=new B,this.asyncStream_.push(this.decryptChunk_(Ut.subarray(Yt,Yt+qe),je,Ge,Et)),Yt=qe;Yt<Ut.length;Yt+=qe)Ge=new Uint32Array([F(Ut[Yt-4]),F(Ut[Yt-3]),F(Ut[Yt-2]),F(Ut[Yt-1])]),this.asyncStream_.push(this.decryptChunk_(Ut.subarray(Yt,Yt+qe),je,Ge,Et));this.asyncStream_.push(function(){tt(null,
30/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */
31function m(Ne){return Ne.subarray(0,Ne.byteLength-Ne[Ne.byteLength-1])}
32/*! @name aes-decrypter @version 3.1.3 @license Apache-2.0 */(Et))})}return Ne.prototype.decryptChunk_=function(je,Ge,tt,qe){return function(){var Ut=function(Be,st,je){var Et,Yt,Rr,Gr,hi,Ei,Wr,tn,Sr,Ge=new Int32Array(Be.buffer,Be.byteOffset,Be.byteLength>>2),tt=new L(Array.prototype.slice.call(st)),qe=new Uint8Array(Be.byteLength),Ut=new Int32Array(qe.buffer);for(Et=je[0],Yt=je[1],Rr=je[2],Gr=je[3],Sr=0;Sr<Ge.length;Sr+=4)hi=F(Ge[Sr]),Ei=F(Ge[Sr+1]),Wr=F(Ge[Sr+2]),tn=F(Ge[Sr+3]),tt.decrypt(hi,Ei,Wr,tn,Ut,Sr),Ut[Sr]=F(Ut[Sr]^Et),Ut[Sr+1]=F(Ut[Sr+1]^Yt),Ut[Sr+2]=F(Ut[Sr+2]^Rr),Ut[Sr+3]=F(Ut[Sr+3]^Gr),Et=hi,Yt=Ei,Rr=Wr,Gr=tn;return qe}(je,Ge,tt);qe.set(Ut,je.byteOffset)}},s(Ne,null,[{key:"STEP",get:function(){return 32e3}}]),Ne}(),Ye=(typeof window<"u"?window:typeof g<"u"?g:typeof self<"u"?self:{}).BigInt||Number;Ye("0x1"),Ye("0x100"),Ye("0x10000"),Ye("0x1000000"),Ye("0x100000000"),Ye("0x10000000000"),Ye("0x1000000000000"),Ye("0x100000000000000"),Ye("0x10000000000000000");
vendor: 7,329 bytes, line 32
32self.onmessage=function(Ne){var Be=Ne.data,st=new Uint8Array(Be.encrypted.bytes,Be.encrypted.byteOffset,Be.encrypted.byteLength),je=new Uint32Array(Be.key.bytes,Be.key.byteOffset,Be.key.byteLength/4),Ge=new Uint32Array(Be.iv.bytes,Be.iv.byteOffset,Be.iv.byteLength/4);new Z(st,je,Ge,function(tt,qe){self.postMessage(function(Be){var st={};return Object.keys(Be).forEach(function(je){var Ge=Be[je];st[je]=function(Be){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(Be):Be&&Be.buffer instanceof ArrayBuffer}(Ge)?{bytes:Ge.buffer,byteOffset:Ge.byteOffset,byteLength:Ge.byteLength}:Ge}),st}({source:Be.source,decrypted:qe}),[qe.buffer])})}})),mg=h(gg),yg=function(a){var o=a.default?"main":"alternative";return a.characteristics&&a.characteristics.indexOf("public.accessibility.describes-video")>=0&&(o="main-desc"),o},mh=function(a,o){a.abort(),a.pause(),o&&o.activePlaylistLoader&&(o.activePlaylistLoader.pause(),o.activePlaylistLoader=null)},sp=function(a,o){o.activePlaylistLoader=a,a.load()},yh={AUDIO:function(a,o){return function(){var t=o.mediaTypes[a],n=o.blacklistCurrentPlaylist;mh(o.segmentLoaders[a],t);var d=t.activeTrack(),m=t.activeGroup(),_=(m.filter(function(B){return B.default})[0]||m[0]).id,S=t.tracks[_];if(d!==S){for(var L in ye.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),t.tracks)t.tracks[L].enabled=t.tracks[L]===S;t.onTrackChanged()}else n({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(a,o){return function(){var s=o.segmentLoaders[a],t=o.mediaTypes[a];ye.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),mh(s,t);var n=t.activeTrack();n&&(n.mode="disabled"),t.onTrackChanged()}}},xp={AUDIO:function(a,o,s){if(o){var t=s.tech,n=s.requestOptions,d=s.segmentLoaders[a];o.on("loadedmetadata",function(){var m=o.media();d.playlist(m,n),(!t.paused()||m.endList&&"none"!==t.preload())&&d.load()}),o.on("loadedplaylist",function(){d.playlist(o.media(),n),t.paused()||d.load()}),o.on("error",yh[a](a,s))}},SUBTITLES:function(a,o,s){var t=s.tech,n=s.requestOptions,d=s.segmentLoaders[a],m=s.mediaTypes[a];o.on("loadedmetadata",function(){var _=o.media();d.playlist(_,n),d.track(m.activeTrack()),(!t.paused()||_.endList&&"none"!==t.preload())&&d.load()}),o.on("loadedplaylist",function(){d.playlist(o.media(),n),t.paused()||d.load()}),o.on("error",yh[a](a,s))}},Sg={AUDIO:function(a,o){var s=o.vhs,t=o.sourceType,n=o.segmentLoaders[a],d=o.requestOptions,m=o.master.mediaGroups,_=o.mediaTypes[a],S=_.groups,L=_.tracks,B=_.logger_,F=o.masterPlaylistLoader,q=qo(F.master);for(var Z in(!m[a]||0===Object.keys(m[a]).length)&&(m[a]={main:{default:{default:!0}}},q&&(m[a].main.default.playlists=F.master.playlists)),m[a])for(var ne in S[Z]||(S[Z]=[]),m[a][Z]){var re=m[a][Z][ne],De=void 0;if(q?(B("AUDIO group '"+Z+"' label '"+ne+"' is a master playlist"),re.isMasterPlaylist=!0,De=null):De="vhs-json"===t&&re.playlists?new Qa(re.playlists[0],s,d):re.resolvedUri?new Qa(re.resolvedUri,s,d):re.playlists&&"dash"===t?new hl(re.playlists[0],s,d,F):null,re=ye.mergeOptions({id:ne,playlistLoader:De},re),xp[a](a,re.playlistLoader,o),S[Z].push(re),typeof L[ne]>"u"){var Ye=new ye.AudioTrack({id:ne,kind:yg(re),enabled:!1,language:re.language,default:re.default,label:ne});L[ne]=Ye}}n.on("error",yh[a](a,o))},SUBTITLES:function(a,o){var s=o.tech,t=o.vhs,n=o.sourceType,d=o.segmentLoaders[a],m=o.requestOptions,_=o.master.mediaGroups,S=o.mediaTypes[a],L=S.groups,B=S.tracks,F=o.masterPlaylistLoader;for(var q in _[a])for(var Z in L[q]||(L[q]=[]),_[a][q])if(!_[a][q][Z].forced){var ne=_[a][q][Z],re=void 0;if("hls"===n)re=new Qa(ne.resolvedUri,t,m);else if("dash"===n){if(!ne.playlists.filter(function(gt){return gt.excludeUntil!==1/0}).length)return;re=new hl(ne.playlists[0],t,m,F)}else"vhs-json"===n&&(re=new Qa(ne.playlists?ne.playlists[0]:ne.resolvedUri,t,m));if(ne=ye.mergeOptions({id:Z,playlistLoader:re},ne),xp[a](a,ne.playlistLoader,o),L[q].push(ne),typeof B[Z]>"u"){var Ye=s.addRemoteTextTrack({id:Z,kind:"subtitles",default:ne.default&&ne.autoselect,language:ne.language,label:Z},!1).track;B[Z]=Ye}}d.on("error",yh[a](a,o))},"CLOSED-CAPTIONS":function(a,o){var s=o.tech,t=o.master.mediaGroups,n=o.mediaTypes[a],d=n.groups,m=n.tracks;for(var _ in t[a])for(var S in d[_]||(d[_]=[]),t[a][_]){var L=t[a][_][S];if(/^(?:CC|SERVICE)/.test(L.instreamId)){var B=s.options_.vhs&&s.options_.vhs.captionServices||{},F={label:S,language:L.language,instreamId:L.instreamId,default:L.default&&L.autoselect};if(B[F.instreamId]&&(F=ye.mergeOptions(F,B[F.instreamId])),void 0===F.default&&delete F.default,d[_].push(ye.mergeOptions({id:S},L)),typeof m[S]>"u"){var q=s.addRemoteTextTrack({id:F.instreamId,kind:"captions",default:F.default,language:F.language,label:F.label},!1).track;m[S]=q}}}}},bg=function g(a,o){for(var s=0;s<a.length;s++)if(sl(o,a[s])||a[s].playlists&&g(a[s].playlists,o))return!0;return!1},Ag={AUDIO:function(a,o){return function(){var s=o.mediaTypes[a].tracks;for(var t in s)if(s[t].enabled)return s[t];return null}},SUBTITLES:function(a,o){return function(){var s=o.mediaTypes[a].tracks;for(var t in s)if("showing"===s[t].mode||"hidden"===s[t].mode)return s[t];return null}}},Lg=function(){var a={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(o){a[o]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:En,activeTrack:En,getActiveGroup:En,onGroupChanged:En,onTrackChanged:En,lastTrack_:null,logger_:_n("MediaGroups["+o+"]")}}),a},Pg=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],kg=function(a){return this.audioSegmentLoader_[a]+this.mainSegmentLoader_[a]},wg=function(g){function a(s){var t;t=g.call(this)||this;var n=s.src,d=s.handleManifestRedirects,m=s.withCredentials,_=s.tech,S=s.bandwidth,L=s.externVhs,B=s.useCueTags,F=s.blacklistDuration,q=s.enableLowInitialPlaylist,Z=s.sourceType,ne=s.cacheEncryptionKeys,re=s.experimentalBufferBasedABR,De=s.experimentalLeastPixelDiffSelector,Ye=s.captionServices;if(!n)throw new Error("A non-empty playlist URL or JSON manifest string is required");var gt=s.maxPlaylistRetries;(null===gt||typeof gt>"u")&&(gt=1/0),es=L,t.experimentalBufferBasedABR=Boolean(re),t.experimentalLeastPixelDiffSelector=Boolean(De),t.withCredentials=m,t.tech_=_,t.vhs_=_.vhs,t.sourceType_=Z,t.useCueTags_=B,t.blacklistDuration=F,t.maxPlaylistRetries=gt,t.enableLowInitialPlaylist=q,t.useCueTags_&&(t.cueTagsTrack_=t.tech_.addTextTrack("metadata","ad-cues"),t.cueTagsTrack_.inBandMetadataTrackDispatchType=""),t.requestOptions_={withCredentials:m,handleManifestRedirects:d,maxPlaylistRetries:gt,timeout:null},t.on("error",t.pauseLoading),t.mediaTypes_=Lg(),t.mediaSource=new(A().MediaSource),t.handleDurationChange_=t.handleDurationChange_.bind(Pe(t)),t.handleSourceOpen_=t.handleSourceOpen_.bind(Pe(t)),t.handleSourceEnded_=t.handleSourceEnded_.bind(Pe(t)),t.mediaSource.addEventListener("durationchange",t.handleDurationChange_),t.mediaSource.addEventListener("sourceopen",t.handleSourceOpen_),t.mediaSource.addEventListener("sourceended",t.handleSourceEnded_),t.seekable_=ye.createTimeRanges(),t.hasPlayed_=!1,t.syncController_=new vg(s),t.segmentMetadataTrack_=_.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"}
32,!1).track,t.decrypter_=new mg,t.sourceUpdater_=new mf(t.mediaSource),t.inbandTextTracks_={},t.timelineChangeController_=new pg;var Ne={vhs:t.vhs_,parse708captions:s.parse708captions,useDtsForTimestampOffset:s.useDtsForTimestampOffset,captionServices:Ye,mediaSource:t.mediaSource,currentTime:t.tech_.currentTime.bind(t.tech_),seekable:function(){return t.seekable()},seeking:function(){return t.tech_.seeking()},duration:function(){return t.duration()},hasPlayed:function(){return t.hasPlayed_},goalBufferLength:function(){return t.goalBufferLength()},bandwidth:S,syncController:t.syncController_,decrypter:t.decrypter_,sourceType:t.sourceType_,inbandTextTracks:t.inbandTextTracks_,cacheEncryptionKeys:ne,sourceUpdater:t.sourceUpdater_,timelineChangeController:t.timelineChangeController_,experimentalExactManifestTimings:s.experimentalExactManifestTimings};t.masterPlaylistLoader_="dash"===t.sourceType_?new hl(n,t.vhs_,t.requestOptions_):new Qa(n,t.vhs_,t.requestOptions_),t.setupMasterPlaylistLoaderListeners_(),t.mainSegmentLoader_=new Zo(ye.mergeOptions(Ne,{segmentMetadataTrack:t.segmentMetadataTrack_,loaderType:"main"}),s),t.audioSegmentLoader_=new Zo(ye.mergeOptions(Ne,{loaderType:"audio"}),s),t.subtitleSegmentLoader_=new ap(ye.mergeOptions(Ne,{loaderType:"vtt",featuresNativeTextTracks:t.tech_.featuresNativeTextTracks,loadVttJs:function(){return new Promise(function(je,Ge){function tt(){_.off("vttjserror",qe),je()}function qe(){_.off("vttjsloaded",tt),Ge()}_.one("vttjsloaded",tt),_.one("vttjserror",qe),_.addWebVttScript_()})}}),s),t.setupSegmentLoaderListeners_(),t.experimentalBufferBasedABR&&(t.masterPlaylistLoader_.one("loadedplaylist",function(){return t.startABRTimer_()}),t.tech_.on("pause",function(){return t.stopABRTimer_()}),t.tech_.on("play",function(){return t.startABRTimer_()})),Pg.forEach(function(st){t[st+"_"]=kg.bind(Pe(t),st)}),t.logger_=_n("MPC"),t.triggeredFmp4Usage=!1,"none"===t.tech_.preload()?(t.loadOnPlay_=function(){t.loadOnPlay_=null,t.masterPlaylistLoader_.load()},t.tech_.one("play",t.loadOnPlay_)):t.masterPlaylistLoader_.load(),t.timeToLoadedData__=-1,t.mainAppendsToLoadedData__=-1,t.audioAppendsToLoadedData__=-1;var Be="none"===t.tech_.preload()?"play":"loadstart";return t.tech_.one(Be,function(){var st=Date.now();t.tech_.one("loadeddata",function(){t.timeToLoadedData__=Date.now()-st,t.mainAppendsToLoadedData__=t.mainSegmentLoader_.mediaAppends,t.audioAppendsToLoadedData__=t.audioSegmentLoader_.mediaAppends})}),t}ae(a,g);var o=a.prototype;return o.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},o.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},o.appendsToLoadedData_=function(){var t=this.mainAppendsToLoadedData_(),n=this.audioAppendsToLoadedData_();return-1===t||-1===n?-1:t+n},o.timeToLoadedData_=function(){return this.timeToLoadedData__},o.checkABR_=function(t){void 0===t&&(t="abr");var n=this.selectPlaylist();n&&this.shouldSwitchToMedia_(n)&&this.switchMedia_(n,t)},o.switchMedia_=function(t,n,d){var m=this.media(),_=m&&(m.id||m.uri),S=t.id||t.uri;_&&_!==S&&(this.logger_("switch media "+_+" -> "+S+" from "+n),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+n})),this.masterPlaylistLoader_.media(t,d)},o.startABRTimer_=function(){var t=this;this.stopABRTimer_(),this.abrTimer_=A().setInterval(function(){return t.checkABR_()},250)},o.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(A().clearInterval(this.abrTimer_),this.abrTimer_=null)},o.getAudioTrackPlaylists_=function(){var t=this.master(),n=t&&t.playlists||[];if(!t||!t.mediaGroups||!t.mediaGroups.AUDIO)return n;var _,d=t.mediaGroups.AUDIO,m=Object.keys(d);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)_=this.mediaTypes_.AUDIO.activeTrack();else{var S=d.main||m.length&&d[m[0]];for(var L in S)if(S[L].default){_={label:L};break}}if(!_)return n;var B=[];for(var F in d)if(d[F][_.label]){var q=d[F][_.label];if(q.playlists&&q.playlists.length)B.push.apply(B,q.playlists);else if(q.uri)B.push(q);else if(t.playlists.length)for(var Z=0;Z<t.playlists.length;Z++){var ne=t.playlists[Z];ne.attributes&&ne.attributes.AUDIO&&ne.attributes.AUDIO===F&&B.push(ne)}}return B.length?B:n},o.setupMasterPlaylistLoaderListeners_=function(){var t=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var n=t.masterPlaylistLoader_.media(),d=1.5*n.targetDuration*1e3;t.requestOptions_.timeout=jo(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())?0:d,n.endList&&"none"!==t.tech_.preload()&&(t.mainSegmentLoader_.playlist(n,t.requestOptions_),t.mainSegmentLoader_.load()),function(a){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(Z){Sg[Z](Z,a)});var o=a.mediaTypes,s=a.masterPlaylistLoader,t=a.tech,n=a.vhs,d=a.segmentLoaders,m=d.AUDIO,_=d.main;["AUDIO","SUBTITLES"].forEach(function(Z){o[Z].activeGroup=function(a,o){return function(s){var n=o.mediaTypes[a].groups,d=o.masterPlaylistLoader.media();if(!d)return null;var m=null;d.attributes[a]&&(m=n[d.attributes[a]]);var _=Object.keys(n);if(!m)if("AUDIO"===a&&_.length>1&&qo(o.master))for(var S=0;S<_.length;S++){var L=n[_[S]];if(bg(L,d)){m=L;break}}else n.main?m=n.main:1===_.length&&(m=n[_[0]]);return typeof s>"u"?m:null!==s&&m&&m.filter(function(B){return B.id===s.id})[0]||null}}(Z,a),o[Z].activeTrack=Ag[Z](Z,a),o[Z].onGroupChanged=function(a,o){return function(){var s=o.segmentLoaders,t=s[a],n=s.main,d=o.mediaTypes[a],m=d.activeTrack(),_=d.getActiveGroup(),S=d.activePlaylistLoader,L=d.lastGroup_;
32if((!_||!L||_.id!==L.id)&&(d.lastGroup_=_,d.lastTrack_=m,mh(t,d),_&&!_.isMasterPlaylist)){if(!_.playlistLoader)return void(S&&n.resetEverything());t.resyncLoader(),sp(_.playlistLoader,d)}}}(Z,a),o[Z].onGroupChanging=function(a,o){return function(){var s=o.segmentLoaders[a];o.mediaTypes[a].lastGroup_=null,s.abort(),s.pause()}}(Z,a),o[Z].onTrackChanged=function(a,o){return function(){var s=o.masterPlaylistLoader,t=o.segmentLoaders,n=t[a],d=t.main,m=o.mediaTypes[a],_=m.activeTrack(),S=m.getActiveGroup(),L=m.activePlaylistLoader,B=m.lastTrack_;if((!B||!_||B.id!==_.id)&&(m.lastGroup_=S,m.lastTrack_=_,mh(n,m),S)){if(S.isMasterPlaylist){if(!_||!B||_.id===B.id)return;var F=o.vhs.masterPlaylistController_,q=F.selectPlaylist();if(F.media()===q)return;return m.logger_("track change. Switching master audio from "+B.id+" to "+_.id),s.pause(),d.resetEverything(),void F.fastQualityChange_(q)}if("AUDIO"===a){if(!S.playlistLoader)return d.setAudio(!0),void d.resetEverything();n.setAudio(!0),d.setAudio(!1)}if(L===S.playlistLoader)return void sp(S.playlistLoader,m);n.track&&n.track(_),n.resetEverything(),sp(S.playlistLoader,m)}}}(Z,a),o[Z].getActiveGroup=function(a,o){var s=o.mediaTypes;return function(){var t=s[a].activeTrack();return t?s[a].activeGroup(t):null}}(Z,a)});var S=o.AUDIO.activeGroup();if(S){var L=(S.filter(function(Z){return Z.default})[0]||S[0]).id;o.AUDIO.tracks[L].enabled=!0,o.AUDIO.onGroupChanged(),o.AUDIO.onTrackChanged(),o.AUDIO.getActiveGroup().playlistLoader?(_.setAudio(!1),m.setAudio(!0)):_.setAudio(!0)}s.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(Z){return o[Z].onGroupChanged()})}),s.on("mediachanging",function(){["AUDIO","SUBTITLES"].forEach(function(Z){return o[Z].onGroupChanging()})});var F=function(){o.AUDIO.onTrackChanged(),t.trigger({type:"usage",name:"vhs-audio-change"}),t.trigger({type:"usage",name:"hls-audio-change"})};for(var q in t.audioTracks().addEventListener("change",F),t.remoteTextTracks().addEventListener("change",o.SUBTITLES.onTrackChanged),n.on("dispose",function(){t.audioTracks().removeEventListener("change",F),t.remoteTextTracks().removeEventListener("change",o.SUBTITLES.onTrackChanged)}),t.clearTracks("audio"),o.AUDIO.tracks)t.audioTracks().addTrack(o.AUDIO.tracks[q])}({sourceType:t.sourceType_,segmentLoaders:{AUDIO:t.audioSegmentLoader_,SUBTITLES:t.subtitleSegmentLoader_,main:t.mainSegmentLoader_},tech:t.tech_,requestOptions:t.requestOptions_,masterPlaylistLoader:t.masterPlaylistLoader_,vhs:t.vhs_,master:t.master(),mediaTypes:t.mediaTypes_,blacklistCurrentPlaylist:t.blacklistCurrentPlaylist.bind(t)}),t.triggerPresenceUsage_(t.master(),n),t.setupFirstPlay(),!t.mediaTypes_.AUDIO.activePlaylistLoader||t.mediaTypes_.AUDIO.activePlaylistLoader.media()?t.trigger("selectedinitialmedia"):t.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){t.trigger("selectedinitialmedia")})}),this.masterPlaylistLoader_.on("loadedplaylist",function(){t.loadOnPlay_&&t.tech_.off("play",t.loadOnPlay_);var n=t.masterPlaylistLoader_.media();if(!n){var d;if(t.excludeUnsupportedVariants_(),t.enableLowInitialPlaylist&&(d=t.selectInitialPlaylist()),d||(d=t.selectPlaylist()),!d||!t.shouldSwitchToMedia_(d))return;if(t.initialMedia_=d,t.switchMedia_(t.initialMedia_,"initial"),"vhs-json"!==t.sourceType_||!t.initialMedia_.segments)return;n=t.initialMedia_}t.handleUpdatedMediaPlaylist(n)}),this.masterPlaylistLoader_.on("error",function(){t.blacklistCurrentPlaylist(t.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){t.mainSegmentLoader_.abort(),t.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var n=t.masterPlaylistLoader_.media(),d=1.5*n.targetDuration*1e3;t.requestOptions_.timeout=jo(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())?0:d,t.masterPlaylistLoader_.load(),t.mainSegmentLoader_.playlist(n,t.requestOptions_),t.mainSegmentLoader_.load(),t.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var n=t.masterPlaylistLoader_.media();"playlist-unchanged"!==n.lastExcludeReason_&&t.stuckAtPlaylistEnd_(n)&&(t.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),t.tech_.trigger("playliststuck"))}),this.masterPlaylistLoader_.on("renditiondisabled",function(){t.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),t.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){t.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),t.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})},o.handleUpdatedMediaPlaylist=function(t){this.useCueTags_&&this.updateAdCues_(t),this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.updateDuration(!t.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},o.triggerPresenceUsage_=function(t,n){var d=t.mediaGroups||{},m=!0,_=Object.keys(d.AUDIO);for(var S in d.AUDIO)for(var L in d.AUDIO[S])d.AUDIO[S][L].uri||(m=!1);m&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(d.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),es.Playlist.isAes(n)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),_.length&&Object.keys(d.AUDIO[_[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},o.shouldSwitchToMedia_=function(t){var n=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pen
32dingMedia_,d=this.tech_.currentTime(),m=this.bufferLowWaterLine(),_=this.bufferHighWaterLine();return function(a){var o=a.currentPlaylist,s=a.buffered,t=a.currentTime,n=a.nextPlaylist,d=a.bufferLowWaterLine,m=a.bufferHighWaterLine,_=a.duration,S=a.experimentalBufferBasedABR,L=a.log;if(!n)return ye.log.warn("We received no playlist to switch to. Please check your stream."),!1;var B="allowing switch "+(o&&o.id||"null")+" -> "+n.id;if(!o)return L(B+" as current playlist is not set"),!0;if(n.id===o.id)return!1;var F=Boolean(js(s,t).length);if(!o.endList)return F||"number"!=typeof o.partTargetDuration?(L(B+" as current playlist is live"),!0):(L("not "+B+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var q=Go(s,t),Z=S?ni.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:ni.MAX_BUFFER_LOW_WATER_LINE;if(_<Z)return L(B+" as duration < max low water line ("+_+" < "+Z+")"),!0;var ne=n.attributes.BANDWIDTH,re=o.attributes.BANDWIDTH;if(ne<re&&(!S||q<m)){var De=B+" as next bandwidth < current bandwidth ("+ne+" < "+re+")";return S&&(De+=" and forwardBuffer < bufferHighWaterLine ("+q+" < "+m+")"),L(De),!0}if((!S||ne>re)&&q>=d){var Ye=B+" as forwardBuffer >= bufferLowWaterLine ("+q+" >= "+d+")";return S&&(Ye+=" and next bandwidth > current bandwidth ("+ne+" > "+re+")"),L(Ye),!0}return L("not "+B+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:d,currentPlaylist:n,nextPlaylist:t,bufferLowWaterLine:m,bufferHighWaterLine:_,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},o.setupSegmentLoaderListeners_=function(){var t=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){t.checkABR_("bandwidthupdate"),t.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",function(){t.experimentalBufferBasedABR&&t.mainSegmentLoader_.load()}),this.experimentalBufferBasedABR||this.mainSegmentLoader_.on("progress",function(){t.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){t.blacklistCurrentPlaylist(t.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){t.error=t.mainSegmentLoader_.error_,t.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){t.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),t.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){t.error=t.audioSegmentLoader_.error_,t.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){t.logger_("main segment loader ended"),t.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(d){t.experimentalBufferBasedABR||(t.delegateLoaders_("all",["abort"]),t.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))});var n=function(){if(!t.sourceUpdater_.hasCreatedSourceBuffers())return t.tryToCreateSourceBuffers_();var m=t.getCodecsOrExclude_();m&&t.sourceUpdater_.addOrChangeSourceBuffers(m)};this.mainSegmentLoader_.on("trackinfo",n),this.audioSegmentLoader_.on("trackinfo",n),this.mainSegmentLoader_.on("fmp4",function(){t.triggeredFmp4Usage||(t.tech_.trigger({type:"usage",name:"vhs-fmp4"}),t.tech_.trigger({type:"usage",name:"hls-fmp4"}),t.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){t.triggeredFmp4Usage||(t.tech_.trigger({type:"usage",name:"vhs-fmp4"}),t.tech_.trigger({type:"usage",name:"hls-fmp4"}),t.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){t.logger_("audioSegmentLoader ended"),t.onEndOfStream()})},o.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},o.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},o.smoothQualityChange_=function(t){void 0===t&&(t=this.selectPlaylist()),this.fastQualityChange_(t)},o.fastQualityChange_=function(t){var n=this;void 0===t&&(t=this.selectPlaylist()),t!==this.masterPlaylistLoader_.media()?(this.switchMedia_(t,"fast-quality"),this.mainSegmentLoader_.resetEverything(function(){n.tech_.setCurrentTime(ye.browser.IE_VERSION||ye.browser.IS_EDGE?n.tech_.currentTime()+.04:n.tech_.currentTime())})):this.logger_("skipping fastQualityChange because new media is same as old")},o.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var t=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<t.start(0))return this.tech_.setCurrentTime(t.end(t.length-1))}},o.setupFirstPlay=function(){var t=this,n=this.masterPlaylistLoader_.media();if(!n||this.tech_.paused()||this.hasPlayed_)return!1;if(!n.endList){var d=this.seekable();if(!d.length)return!1;if(ye.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",function(){t.trigger("firstplay"),t.tech_.setCurrentTime(d.end(0)),t.hasPlayed_=!0}),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(d.end(0))}return this.hasPlayed_=!0,this.load(),!0},o.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var t=this.tech_.play();typeof t<"u"&&"function"==typeof t.then&&t.then(null,function(n){})}this.trigger("sourceopen")},o.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var t=this.inbandTextTracks_.metadataTrack_.cues;if(t&&t.length){var n=this.duration();t[t.length-1].endTime=isNaN(n)||Math.abs(n)===1/0?Number.MAX_VALUE:n}}},o.handleDurationChange_=function(){this.tech_.trigger("durationchange")}
32,o.onEndOfStream=function(){var t=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){var n=this.mainSegmentLoader_.getCurrentMediaInfo_();t=!n||n.hasVideo?t&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}t&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},o.stuckAtPlaylistEnd_=function(t){if(!this.seekable().length)return!1;var d=this.syncController_.getExpiredTime(t,this.duration());if(null===d)return!1;var m=es.Playlist.playlistEnd(t,d),_=this.tech_.currentTime(),S=this.tech_.buffered();if(!S.length)return m-_<=yi;var L=S.end(S.length-1);return L-_<=yi&&m-L<=yi},o.blacklistCurrentPlaylist=function(t,n){void 0===t&&(t={});var d=t.playlist||this.masterPlaylistLoader_.media();if(n=n||t.blacklistDuration||this.blacklistDuration,!d)return this.error=t,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));d.playlistErrors_++;var B,m=this.masterPlaylistLoader_.master.playlists,_=m.filter(Ws),S=1===_.length&&_[0]===d;if(1===m.length&&n!==1/0)return ye.log.warn("Problem encountered with playlist "+d.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(S);if(S){var L=!1;m.forEach(function(De){if(De!==d){var Ye=De.excludeUntil;typeof Ye<"u"&&Ye!==1/0&&(L=!0,delete De.excludeUntil)}}),L&&(ye.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}B=d.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*n,d.excludeUntil=B,t.reason&&(d.lastExcludeReason_=t.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var F=this.selectPlaylist();if(!F)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");(t.internal?this.logger_:ye.log.warn)((t.internal?"Internal problem":"Problem")+" encountered with playlist "+d.id+"."+(t.message?" "+t.message:"")+" Switching to playlist "+F.id+"."),F.attributes.AUDIO!==d.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),F.attributes.SUBTITLES!==d.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var ne=F.targetDuration/2*1e3||5e3,re="number"==typeof F.lastRequest&&Date.now()-F.lastRequest<=ne;return this.switchMedia_(F,"exclude",S||re)},o.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},o.delegateLoaders_=function(t,n){var d=this,m=[],_="all"===t;(_||"main"===t)&&m.push(this.masterPlaylistLoader_);var S=[];(_||"audio"===t)&&S.push("AUDIO"),(_||"subtitle"===t)&&(S.push("CLOSED-CAPTIONS"),S.push("SUBTITLES")),S.forEach(function(L){var B=d.mediaTypes_[L]&&d.mediaTypes_[L].activePlaylistLoader;B&&m.push(B)}),["main","audio","subtitle"].forEach(function(L){var B=d[L+"SegmentLoader_"];B&&(t===L||"all"===t)&&m.push(B)}),m.forEach(function(L){return n.forEach(function(B){"function"==typeof L[B]&&L[B]()})})},o.setCurrentTime=function(t){var n=js(this.tech_.buffered(),t);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?n&&n.length?t:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},o.duration=function(){if(!this.masterPlaylistLoader_)return 0;var t=this.masterPlaylistLoader_.media();return t?t.endList?this.mediaSource?this.mediaSource.duration:es.Playlist.duration(t):1/0:0},o.seekable=function(){return this.seekable_},o.onSyncInfoUpdate_=function(){var t;if(this.masterPlaylistLoader_){var n=this.masterPlaylistLoader_.media();if(n){var d=this.syncController_.getExpiredTime(n,this.duration());if(null!==d){var S,L,m=this.masterPlaylistLoader_.master,_=es.Playlist.seekable(n,d,es.Playlist.liveEdgeDelay(m,n));0===_.length||this.mediaTypes_.AUDIO.activePlaylistLoader&&(n=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(d=this.syncController_.getExpiredTime(n,this.duration()))||0===(t=es.Playlist.seekable(n,d,es.Playlist.liveEdgeDelay(m,n))).length)||(this.seekable_&&this.seekable_.length&&(S=this.seekable_.end(0),L=this.seekable_.start(0)),this.seekable_=t?t.start(0)>_.end(0)||_.start(0)>t.end(0)?_:ye.createTimeRanges([[t.start(0)>_.start(0)?t.start(0):_.start(0),t.end(0)<_.end(0)?t.end(0):_.end(0)]]):_,(!this.seekable_||!this.seekable_.length||this.seekable_.end(0)!==S||this.seekable_.start(0)!==L)&&(this.logger_("seekable updated ["+Kc(this.seekable_)+"]"),this.tech_.trigger("seekablechanged")))}}}},o.updateDuration=function(t){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,t),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(t){var n=this.seekable();if(!n.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<n.end(n.length-1))&&this.sourceUpdater_.setDuration(n.end(n.length-1))}else{var d=this.tech_.buffered(),m=es.Playlist.duration(this.masterPlaylistLoader_.media());d.length>0&&(m=Math.max(m,d.end(d.length-1))),this.mediaSource.duration!==m&&this.sourceUpdater_.setDuration(m)}},o.dispose=function(){var t=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(function(n){var d=t.mediaTypes_[n].groups;for(var m in d)d[m].forEach(function(_){_.playlistLoader&&_.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},o.master=function(){return this.masterPlaylistLoader_.master},o.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},o.areMediaTypesKnown_=function(){var t=!!this.mediaTypes_.AUDIO.activePlaylistLoader,n=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),d=!t||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!n||!d)},o.getCodecsOrExclude_=function(){var t=this,n={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},d=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();n.video=n.main;var m=ar(this.master(),d),_={},S=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(n.main.hasVideo&&(_.video=m.video||n.main.videoCodec||"avc1.4d400d"),n.main.isMuxed&&(_.video+=","+(m.audio||n.main.audioCodec||ki)),(n.main.hasAudio&&!n.main.isMuxed||n.audio.hasAudio||S)&&(_.audio=m.audio||n.main.audioCodec||n.audio.audioCodec||ki,n.audio.isFmp4=n.main.hasAudio&&!n.main.isMuxed?n.main.isFmp4:n.audio.isFmp4),_.audio||_.video){var F,B={};if(["video","audio"].forEach(function(re){if(_.hasOwnProperty(re)&&!function(De,Ye){return De?Nt(Ye):Fr(Ye)}(n[re].isFmp4,_[re])){var De=n[re].isFmp4?"browser":"muxer";B[De]=B[De]||[],B[De].push(_[re]),"audio"===re&&(F=De)}}),S&&F&&d.attributes.AUDIO){var q=d.attributes.AUDIO;
vendor: 4,156 bytes, line 32
32this.master().playlists.forEach(function(re){(re.attributes&&re.attributes.AUDIO)===q&&re!==d&&(re.excludeUntil=1/0)}),this.logger_("excluding audio group "+q+" as "+F+' does not support codec(s): "'+_.audio+'"')}if(!Object.keys(B).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var ne=[];if(["video","audio"].forEach(function(re){var De=(pr(t.sourceUpdater_.codecs[re]||"")[0]||{}).type,Ye=(pr(_[re]||"")[0]||{}).type;De&&Ye&&De.toLowerCase()!==Ye.toLowerCase()&&ne.push('"'+t.sourceUpdater_.codecs[re]+'" -> "'+_[re]+'"')}),ne.length)return void this.blacklistCurrentPlaylist({playlist:d,message:"Codec switching not supported: "+ne.join(", ")+".",blacklistDuration:1/0,internal:!0})}return _}var Z=Object.keys(B).reduce(function(re,De){return re&&(re+=", "),re+(De+' does not support codec(s): "')+B[De].join(",")+'"'},"")+".";this.blacklistCurrentPlaylist({playlist:d,internal:!0,message:Z,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:d,message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},o.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var t=this.getCodecsOrExclude_();if(t){this.sourceUpdater_.createSourceBuffers(t);var n=[t.video,t.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(n)}}},o.excludeUnsupportedVariants_=function(){var t=this,n=this.master().playlists,d=[];Object.keys(n).forEach(function(m){var _=n[m];if(-1===d.indexOf(_.id)){d.push(_.id);var S=ar(t.master,_),L=[];S.audio&&!Fr(S.audio)&&!Nt(S.audio)&&L.push("audio codec "+S.audio),S.video&&!Fr(S.video)&&!Nt(S.video)&&L.push("video codec "+S.video),S.text&&"stpp.ttml.im1t"===S.text&&L.push("text codec "+S.text),L.length&&(_.excludeUntil=1/0,t.logger_("excluding "+_.id+" for unsupported: "+L.join(", ")))}})},o.excludeIncompatibleVariants_=function(t){var n=this,d=[],m=this.master().playlists,_=kt(pr(t)),S=Gt(_),L=_.video&&pr(_.video)[0]||null,B=_.audio&&pr(_.audio)[0]||null;Object.keys(m).forEach(function(F){var q=m[F];if(-1===d.indexOf(q.id)&&q.excludeUntil!==1/0){d.push(q.id);var Z=[],ne=ar(n.masterPlaylistLoader_.master,q),re=Gt(ne);if(ne.audio||ne.video){if(re!==S&&Z.push('codec count "'+re+'" !== "'+S+'"'),!n.sourceUpdater_.canChangeType()){var De=ne.video&&pr(ne.video)[0]||null,Ye=ne.audio&&pr(ne.audio)[0]||null;De&&L&&De.type.toLowerCase()!==L.type.toLowerCase()&&Z.push('video codec "'+De.type+'" !== "'+L.type+'"'),Ye&&B&&Ye.type.toLowerCase()!==B.type.toLowerCase()&&Z.push('audio codec "'+Ye.type+'" !== "'+B.type+'"')}Z.length&&(q.excludeUntil=1/0,n.logger_("blacklisting "+q.id+": "+Z.join(" && ")))}}})},o.updateAdCues_=function(t){var n=0,d=this.seekable();d.length&&(n=d.start(0)),function(a,o,s){if(void 0===s&&(s=0),a.segments)for(var n,t=s,d=0;d<a.segments.length;d++){var m=a.segments[d];if(n||(n=yf(o,t+m.duration/2)),n){if("cueIn"in m){n.endTime=t,n.adEndTime=t,t+=m.duration,n=null;continue}if(t<n.endTime){t+=m.duration;continue}n.endTime+=m.duration}else if("cueOut"in m&&((n=new(A().VTTCue)(t,t+m.duration,m.cueOut)).adStartTime=t,n.adEndTime=t+parseFloat(m.cueOut),o.addCue(n)),"cueOutCont"in m){var _=m.cueOutCont.split("/").map(parseFloat),S=_[0],L=_[1];(n=new(A().VTTCue)(t,t+m.duration,"")).adStartTime=t-S,n.adEndTime=n.adStartTime+L,o.addCue(n)}t+=m.duration}}(t,this.cueTagsTrack_,n)},o.goalBufferLength=function(){var t=this.tech_.currentTime(),n=ni.GOAL_BUFFER_LENGTH,d=ni.GOAL_BUFFER_LENGTH_RATE,m=Math.max(n,ni.MAX_GOAL_BUFFER_LENGTH);return Math.min(n+t*d,m)},o.bufferLowWaterLine=function(){var t=this.tech_.currentTime(),n=ni.BUFFER_LOW_WATER_LINE,d=ni.BUFFER_LOW_WATER_LINE_RATE,m=Math.max(n,ni.MAX_BUFFER_LOW_WATER_LINE),_=Math.max(n,ni.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(n+t*d,this.experimentalBufferBasedABR?_:m)},o.bufferHighWaterLine=function(){return ni.BUFFER_HIGH_WATER_LINE},a}(ye.EventTarget),Mg=function(a,o,s){var t=a.masterPlaylistController_,m=t[(a.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(t);if(o.attributes){var _=o.attributes.RESOLUTION;
32this.width=_&&_.width,this.height=_&&_.height,this.bandwidth=o.attributes.BANDWIDTH,this.frameRate=o.attributes["FRAME-RATE"]}this.codecs=ar(t.master(),o),this.playlist=o,this.id=s,this.enabled=function(a,o,s){return function(t){var n=a.master.playlists[o],d=$d(n),m=Ws(n);return typeof t>"u"?m:(t?delete n.disabled:n.disabled=!0,t!==m&&!d&&(s(),a.trigger(t?"renditionenabled":"renditiondisabled")),t)}}(a.playlists,o.id,m)},Ap=["seeking","seeked","pause","playing","error"],Ng=function(){function g(o){var s=this;this.masterPlaylistController_=o.masterPlaylistController,this.tech_=o.tech,this.seekable=o.seekable,this.allowSeeksWithinUnsafeLiveWindow=o.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=o.liveRangeSafeTimeDelta,this.media=o.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=_n("PlaybackWatcher"),this.logger_("initialize");var t=function(){return s.monitorCurrentTime_()},n=function(){return s.monitorCurrentTime_()},d=function(){return s.techWaiting_()},m=function(){return s.cancelTimer_()},_=this.masterPlaylistController_,S=["main","subtitle","audio"],L={};S.forEach(function(F){L[F]={reset:function(){return s.resetSegmentDownloads_(F)},updateend:function(){return s.checkSegmentDownloads_(F)}},_[F+"SegmentLoader_"].on("appendsdone",L[F].updateend),_[F+"SegmentLoader_"].on("playlistupdate",L[F].reset),s.tech_.on(["seeked","seeking"],L[F].reset)});var B=function(q){["main","audio"].forEach(function(Z){_[Z+"SegmentLoader_"][q]("appended",s.seekingAppendCheck_)})};this.seekingAppendCheck_=function(){s.fixesBadSeeks_()&&(s.consecutiveUpdates=0,s.lastRecordedTime=s.tech_.currentTime(),B("off"))},this.clearSeekingAppendCheck_=function(){return B("off")},this.watchForBadSeeking_=function(){s.clearSeekingAppendCheck_(),B("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",d),this.tech_.on(Ap,m),this.tech_.on("canplay",n),this.tech_.one("play",t),this.dispose=function(){s.clearSeekingAppendCheck_(),s.logger_("dispose"),s.tech_.off("waiting",d),s.tech_.off(Ap,m),s.tech_.off("canplay",n),s.tech_.off("play",t),s.tech_.off("seeking",s.watchForBadSeeking_),s.tech_.off("seeked",s.clearSeekingAppendCheck_),S.forEach(function(F){_[F+"SegmentLoader_"].off("appendsdone",L[F].updateend),_[F+"SegmentLoader_"].off("playlistupdate",L[F].reset),s.tech_.off(["seeked","seeking"],L[F].reset)}),s.checkCurrentTimeTimeout_&&A().clearTimeout(s.checkCurrentTimeTimeout_),s.cancelTimer_()}}var a=g.prototype;return a.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&A().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=A().setTimeout(this.monitorCurrentTime_.bind(this),250)},a.resetSegmentDownloads_=function(s){var t=this.masterPlaylistController_[s+"SegmentLoader_"];this[s+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+s+" loader"),this[s+"StalledDownloads_"]=0,this[s+"Buffered_"]=t.buffered_()},a.checkSegmentDownloads_=function(s){var t=this.masterPlaylistController_,n=t[s+"SegmentLoader_"],d=n.buffered_(),m=function(a,o){if(a===o)return!1;if(!a&&o||!o&&a||a.length!==o.length)return!0;for(var s=0;s<a.length;s++)if(a.start(s)!==o.start(s)||a.end(s)!==o.end(s))return!0;return!1}(this[s+"Buffered_"],d);this[s+"Buffered_"]=d,m?this.resetSegmentDownloads_(s):(this[s+"StalledDownloads_"]++,this.logger_("found #"+this[s+"StalledDownloads_"]+" "+s+" appends that did not increase buffer (possible stalled download)",{playlistId:n.playlist_&&n.playlist_.id,buffered:Aa(d)}),!(this[s+"StalledDownloads_"]<10)&&(this.logger_(s+" loader stalled download exclusion"),this.resetSegmentDownloads_(s),this.tech_.trigger({type:"usage",name:"vhs-"+s+"-download-exclusion"}),"subtitle"!==s&&t.blacklistCurrentPlaylist({message:"Excessive "+s+" segment downloading detected."},1/0)))},a.checkCurrentTime_=function(){if(!this.tech_.paused()&&!this.tech_.seeking()){var s=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===s&&(!t.length||s+yi>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&s===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):s===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=s)}},a.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},a.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var m,t=this.seekable(),n=this.tech_.currentTime();if(this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(m=t.end(t.length-1)),this.beforeSeekableWindow_(t,n)){var S=t.start(0);m=S+(S===t.end(0)?0:yi)}if(typeof m<"u")return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+Kc(t)+". Seeking to "+m+"."),this.tech_.setCurrentTime(m),!0;for(var L=this.masterPlaylistController_.sourceUpdater_,B=this.tech_.buffered(),F=L.audioBuffer?L.audioBuffered():null,q=L.videoBuffer?L.videoBuffered():null,Z=this.media(),ne=Z.partTargetDuration?Z.partTargetDuration:2*(Z.targetDuration-mi),re=[F,q],De=0;De<re.length;De++)if(re[De]&&Go(re[De],n)<ne)return!1;var gt=il(B,n);return 0!==gt.length&&(m=gt.start(0)+yi,this.logger_("Buffered region starts ("+gt.start(0)+")  just beyond seek point ("+n+"). Seeking to "+m+"."),this.tech_.setCurrentTime(m),!0)},a.waiting_=function(){if(!this.techWaiting_()){var s=this.tech_.currentTime(),t=this.tech_.buffered(),n=js(t,s);if(n.length&&s+3<=n.end(0))return this.cancelTimer_(),this.tech_.setCurrentTime(s),this.logger_("Stopped at "+s+" while inside a buffered region ["+n.start(0)+" -> "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})}},a.techWaiting_=function(){var s=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()||null!==this.timer_)return!0;
vendor: 4,741 bytes, line 32
32if(this.beforeSeekableWindow_(s,t)){var n=s.end(s.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var d=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,m=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:d.audioBuffered(),videoBuffered:d.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var S=il(m,t);if(S.length>0){var L=S.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+L+", seeking to "+S.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*L,t),!0}return!1},a.afterSeekableWindow_=function(s,t,n,d){if(void 0===d&&(d=!1),!s.length)return!1;var m=s.end(s.length-1)+yi;return!n.endList&&d&&(m=s.end(s.length-1)+3*n.targetDuration),t>m},a.beforeSeekableWindow_=function(s,t){return!!(s.length&&s.start(0)>0&&t<s.start(0)-this.liveRangeSafeTimeDelta)},a.videoUnderflow_=function(s){var t=s.videoBuffered,n=s.audioBuffered,d=s.currentTime;if(t){var m;if(t.length&&n.length){var _=js(t,d-3),S=js(t,d),L=js(n,d);L.length&&!S.length&&_.length&&(m={start:_.end(0),end:L.end(0)})}else il(t,d).length||(m=this.gapFromVideoUnderflow_(t,d));return!!m&&(this.logger_("Encountered a gap in video from "+m.start+" to "+m.end+". Seeking to current time "+d),!0)}},a.skipTheGap_=function(s){var t=this.tech_.buffered(),n=this.tech_.currentTime(),d=il(t,n);this.cancelTimer_(),0!==d.length&&n===s&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",s,"nextRange start:",d.start(0)),this.tech_.setCurrentTime(d.start(0)+mi),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},a.gapFromVideoUnderflow_=function(s,t){for(var n=function(a){if(a.length<2)return ye.createTimeRanges();for(var o=[],s=1;s<a.length;s++){var t=a.end(s-1),n=a.start(s);o.push([t,n])}return ye.createTimeRanges(o)}(s),d=0;d<n.length;d++){var m=n.start(d),_=n.end(d);if(t-m<4&&t-m>2)return{start:m,end:_}}return null},g}(),Bg={errorInterval:30,getSource:function(a){return a(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Ug=function g(a,o){var s=0,t=0,n=ye.mergeOptions(Bg,o);a.ready(function(){a.trigger({type:"usage",name:"vhs-error-reload-initialized"}),a.trigger({type:"usage",name:"hls-error-reload-initialized"})});var d=function(){t&&a.currentTime(t)},m=function(F){null!=F&&(t=a.duration()!==1/0&&a.currentTime()||0,a.one("loadedmetadata",d),a.src(F),a.trigger({type:"usage",name:"vhs-error-reload"}),a.trigger({type:"usage",name:"hls-error-reload"}),a.play())},_=function(){return Date.now()-s<1e3*n.errorInterval?(a.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void a.trigger({type:"usage",name:"hls-error-reload-canceled"})):n.getSource&&"function"==typeof n.getSource?(s=Date.now(),n.getSource.call(a,m)):void ye.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},S=function B(){a.off("loadedmetadata",d),a.off("error",_),a.off("dispose",B)};a.on("error",_),a.on("dispose",S),a.reloadSourceOnError=function(F){S(),g(a,F)}},$i={PlaylistLoader:Qa,Playlist:Wi,utils:zv,STANDARD_PLAYLIST_SELECTOR:ti,INITIAL_PLAYLIST_SELECTOR:function(){var a=this,o=this.playlists.master.playlists.filter(Wi.isEnabled);return fr(o,function(t,n){return di(t,n)}),o.filter(function(t){return!!ar(a.playlists.master,t).video})[0]||null},lastBandwidthSelector:ti,movingAverageBandwidthSelector:function(a){var o=-1,s=-1;if(a<0||a>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var t=this.useDevicePixelRatio&&A().devicePixelRatio||1;return o<0&&(o=this.systemBandwidth,s=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==s&&(o=a*this.systemBandwidth+(1-a)*o,s=this.systemBandwidth),nr(this.playlists.master,o,parseInt(Cr(this.tech_.el(),"width"),10)*t,parseInt(Cr(this.tech_.el(),"height"),10)*t,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:di,comparePlaylistResolution:function(a,o){var s,t;return a.attributes.RESOLUTION&&a.attributes.RESOLUTION.width&&(s=a.attributes.RESOLUTION.width),s=s||A().Number.MAX_VALUE,o.attributes.RESOLUTION&&o.attributes.RESOLUTION.width&&(t=o.attributes.RESOLUTION.width),s===(t=t||A().Number.MAX_VALUE)&&a.attributes.BANDWIDTH&&o.attributes.BANDWIDTH?a.attributes.BANDWIDTH-o.attributes.BANDWIDTH:s-t},xhr:oh()};
32Object.keys(ni).forEach(function(g){Object.defineProperty($i,g,{get:function(){return ye.log.warn("using Vhs."+g+" is UNSAFE be sure you know what you are doing"),ni[g]},set:function(o){ye.log.warn("using Vhs."+g+" is UNSAFE be sure you know what you are doing"),"number"!=typeof o||o<0?ye.log.warn("value of Vhs."+g+" must be greater than or equal to 0"):ni[g]=o}})});var Ip="videojs-vhs",Lp=function(a,o){for(var s=o.media(),t=-1,n=0;n<a.length;n++)if(a[n].id===s.id){t=n;break}a.selectedIndex_=t,a.trigger({selectedIndex:t,type:"change"})};$i.canPlaySource=function(){return ye.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Dp=function(){if(!A().localStorage)return null;var a=A().localStorage.getItem(Ip);if(!a)return null;try{return JSON.parse(a)}catch(o){return null}};$i.supportsNativeHls=function(){if(!me()||!me().createElement)return!1;var g=me().createElement("video");return!!ye.getTech("Html5").isSupported()&&["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(o){return/maybe|probably/i.test(g.canPlayType(o))})}(),$i.supportsNativeDash=!!(me()&&me().createElement&&ye.getTech("Html5").isSupported())&&/maybe|probably/i.test(me().createElement("video").canPlayType("application/dash+xml")),$i.supportsTypeNatively=function(g){return"hls"===g?$i.supportsNativeHls:"dash"===g&&$i.supportsNativeDash},$i.isSupported=function(){return ye.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var op=function(g){function a(s,t,n){var d;if(d=g.call(this,t,ye.mergeOptions(n.hls,n.vhs))||this,n.hls&&Object.keys(n.hls).length&&ye.log.warn("Using hls options is deprecated. Please rename `hls` to `vhs` in your options object."),"number"==typeof n.initialBandwidth&&(d.options_.bandwidth=n.initialBandwidth),d.logger_=_n("VhsHandler"),t.options_&&t.options_.playerId){var m=ye(t.options_.playerId);m.hasOwnProperty("hls")||Object.defineProperty(m,"hls",{get:function(){return ye.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),t.trigger({type:"usage",name:"hls-player-access"}),Pe(d)},configurable:!0}),m.hasOwnProperty("vhs")||Object.defineProperty(m,"vhs",{get:function(){return ye.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),t.trigger({type:"usage",name:"vhs-player-access"}),Pe(d)},configurable:!0}),m.hasOwnProperty("dash")||Object.defineProperty(m,"dash",{get:function(){return ye.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),Pe(d)},configurable:!0}),d.player_=m}if(d.tech_=t,d.source_=s,d.stats={},d.ignoreNextSeekingEvent_=!1,d.setOptions_(),d.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(d.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return d.on(me(),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(_){var S=me().fullscreenElement||me().webkitFullscreenElement||me().mozFullScreenElement||me().msFullscreenElement;S&&S.contains(d.tech_.el())?d.masterPlaylistController_.fastQualityChange_():d.masterPlaylistController_.checkABR_()}),d.on(d.tech_,"seeking",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),d.on(d.tech_,"error",function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),d.on(d.tech_,"play",d.play),d}ae(a,g);var o=a.prototype;return o.setOptions_=function(){var t=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var n=Dp();n&&n.bandwidth&&(this.options_.bandwidth=n.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),n&&n.throughput&&(this.options_.throughput=n.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=ni.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===ni.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","useDtsForTimestampOffset","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach(function(d){typeof t.source_[d]<"u"&&(t.options_[d]=t.source_[d])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},o.src=function(t,n){var d=this;if(t){this.setOptions_(),this.options_.src=function(a){return 0===a.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(a.substring(a.indexOf(",")+1)):a}(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=$i,this.options_.sourceType=Qi(n),this.options_.seekTo=function(S){d.tech_.setCurrentTime(S)},this.options_.smoothQualityChange&&ye.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new wg(this.options_);var m=ye.mergeOptions({liveRangeSafeTimeDelta:yi},this.options_,{seekable:function(){return d.seekable()},media:function(){return d.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new Ng(m),this.masterPlaylistController_.on("error",function(){var S=ye.players[d.tech_.options_.playerId],L=d.masterPlaylistController_.error;"object"!=typeof L||L.code?"string"==typeof L&&(L={message:L,code:3}):L.code=3,S.error(L)});var _=this.options_.experimentalBufferBasedABR?$i.movingAverageBandwidthSelector(.55):$i.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):_.bind(this),this.masterPlaylistController_.selectInitialPlaylist=$i.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(L){this.masterPlaylistController_.selectPlaylist=L.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(L){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=L,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){var L=this.masterPlaylistController_.mainSegmentLoader_.bandwidth,B=A().navigator.connection||A().navigator.mozConnection||A().navigator.webkitConnection,F=1e7;if(this.options_.useNetworkInformationApi&&B){var q=1e3*B.downlink*1e3;L=q>=F&&L>=F?Math.max(L,q):q}return L},set:function(L){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=L,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){return Math.floor(1/(1/(this.bandwidth||1)+(this.throughput>0?1/this.throughput:0)))},set:function(){ye.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return d.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return d.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return d.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return d.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return d.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return d.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return d.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return d.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return d.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return d.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return d.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return d.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return d.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return Aa(d.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return d.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return d.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return d.tech_.name_},enumerable:!0},duration:{get:function(){return d.tech_.duration()},enumerable:!0},master:{get:function(){return d.playlists.master},enumerable:!0},playerDimensions:{get:function(){return d.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return Aa(d.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return d.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){d.options_.useBandwidthFromLocalStorage&&function(a){if
32(!A().localStorage)return!1;var o=Dp();o=o?ye.mergeOptions(o,a):a;try{A().localStorage.setItem(Ip,JSON.stringify(o))}catch(s){return!1}}({bandwidth:d.bandwidth,throughput:Math.round(d.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(a){a.representations=function(){var o=a.masterPlaylistController_.master(),s=qo(o)?a.masterPlaylistController_.getAudioTrackPlaylists_():o.playlists;return s?s.filter(function(t){return!$d(t)}).map(function(t,n){return new Mg(a,t,t.id)}):[]}}(d)}),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){d.setupEme_()}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=A().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},o.createKeySessions_=function(){var t=this,n=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),function(a){var o=a.player,s=a.sourceKeySystems,t=a.audioMedia,n=a.mainPlaylists;if(!o.eme.initializeMediaKeys)return Promise.resolve();var m=function(a,o){return a.reduce(function(s,t){if(!t.contentProtection)return s;var n=o.reduce(function(d,m){var _=t.contentProtection[m];return _&&_.pssh&&(d[m]={pssh:_.pssh}),d},{});return Object.keys(n).length&&s.push(n),s},[])}(t?n.concat([t]):n,Object.keys(s)),_=[],S=[];return m.forEach(function(L){S.push(new Promise(function(B,F){o.tech_.one("keysessioncreated",B)})),_.push(new Promise(function(B,F){o.eme.initializeMediaKeys({keySystems:L},function(q){q?F(q):B()})}))}),Promise.race([Promise.all(_),Promise.race(S)])}({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:n&&n.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){t.logger_("created EME key session"),t.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(d){t.logger_("error while creating EME key session",d),t.player_.error({message:"Failed to initialize media keys for EME",code:3})})},o.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},o.setupEme_=function(){var t=this,n=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,d=function(a){var o=a.player,d=function(a,o,s){if(!a)return a;var t={};o&&o.attributes&&o.attributes.CODECS&&(t=kt(pr(o.attributes.CODECS))),s&&s.attributes&&s.attributes.CODECS&&(t.audio=s.attributes.CODECS);var n=Pr(t.video),d=Pr(t.audio),m={};for(var _ in a)m[_]={},d&&(m[_].audioContentType=d),n&&(m[_].videoContentType=n),o.contentProtection&&o.contentProtection[_]&&o.contentProtection[_].pssh&&(m[_].pssh=o.contentProtection[_].pssh),"string"==typeof a[_]&&(m[_].url=a[_]);return ye.mergeOptions(a,m)}(a.sourceKeySystems,a.media,a.audioMedia);return!(!d||(o.currentSource().keySystems=d,d&&!o.eme&&(ye.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1)))}({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:n&&n.media()});this.player_.tech_.on("keystatuschange",function(m){if("output-restricted"===m.status){var _=t.masterPlaylistController_.master();if(_&&_.playlists){var L,S=[];
32_.playlists.forEach(function(B){B&&B.attributes&&B.attributes.RESOLUTION&&B.attributes.RESOLUTION.height>=720&&(!B.excludeUntil||B.excludeUntil<1/0)&&(B.excludeUntil=1/0,S.push(B))}),S.length&&((L=ye.log).warn.apply(L,['DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(S)),t.masterPlaylistController_.fastQualityChange_())}}}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==ye.browser.IE_VERSION&&d?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},o.setupQualityLevels_=function(){var t=this,n=ye.players[this.tech_.options_.playerId];!n||!n.qualityLevels||this.qualityLevels_||(this.qualityLevels_=n.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(a,o){o.representations().forEach(function(s){a.addQualityLevel(s)}),Lp(a,o.playlists)}(t.qualityLevels_,t)}),this.playlists.on("mediachange",function(){Lp(t.qualityLevels_,t.playlists)}))},a.version=function(){return{"@videojs/http-streaming":"2.16.3","mux.js":"6.0.1","mpd-parser":"0.22.1","m3u8-parser":"4.8.0","aes-decrypter":"3.1.3"}},o.version=function(){return this.constructor.version()},o.canChangeType=function(){return mf.canChangeType()},o.play=function(){this.masterPlaylistController_.play()},o.setCurrentTime=function(t){this.masterPlaylistController_.setCurrentTime(t)},o.duration=function(){return this.masterPlaylistController_.duration()},o.seekable=function(){return this.masterPlaylistController_.seekable()},o.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&A().URL.revokeObjectURL&&(A().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),g.prototype.dispose.call(this)},o.convertToProgramTime=function(t,n){return function(a){var o=a.playlist,s=a.time,t=void 0===s?void 0:s,n=a.callback;if(!n)throw new Error("getProgramTime: callback must be provided");if(!o||void 0===t)return n({message:"getProgramTime: playlist and time must be provided"});var d=function(a,o){if(!o||!o.segments||0===o.segments.length)return null;for(var t,s=0,n=0;n<o.segments.length&&!(a<=(s=(t=o.segments[n]).videoTimingInfo?t.videoTimingInfo.transmuxedPresentationEnd:s+t.duration));n++);var d=o.segments[o.segments.length-1];if(d.videoTimingInfo&&d.videoTimingInfo.transmuxedPresentationEnd<a)return null;if(a>s){if(a>s+.25*d.duration)return null;t=d}return{segment:t,estimatedStart:t.videoTimingInfo?t.videoTimingInfo.transmuxedPresentationStart:s-t.duration,type:t.videoTimingInfo?"accurate":"estimate"}}(t,o);if(!d)return n({message:"valid programTime was not found"});if("estimate"===d.type)return n({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:d.estimatedStart});var m={mediaSeconds:t},_=function(a,o){if(!o.dateTimeObject)return null;var d=a-(o.videoTimingInfo.transmuxedPresentationStart+o.videoTimingInfo.transmuxerPrependedSeconds);return new Date(o.dateTimeObject.getTime()+1e3*d)}(t,d.segment);return _&&(m.programDateTime=_.toISOString()),n(null,m)}({playlist:this.masterPlaylistController_.media(),time:t,callback:n})},o.seekToProgramTime=function(t,n,d,m){return void 0===d&&(d=!0),void 0===m&&(m=2),cl({programTime:t,playlist:this.masterPlaylistController_.media(),retryCount:m,pauseAfterSeek:d,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:n})},a}(ye.getComponent("Component")),_f={name:"videojs-http-streaming",VERSION:"2.16.3",canHandleSource:function(a,o){void 0===o&&(o={});var s=ye.mergeOptions(ye.options,o);return _f.canPlayType(a.type,s)},handleSource:function(a,o,s){void 0===s&&(s={});var t=ye.mergeOptions(ye.options,s);return o.vhs=new op(a,o,t),ye.hasOwnProperty("hls")||Object.defineProperty(o,"hls",{get:function(){return ye.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),o.vhs},configurable:!0}),o.vhs.xhr=oh(),o.vhs.src(a.src,a.type),o.vhs},canPlayType:function(a,o){var s=Qi(a);if(!s)return"";var t=_f.getOverrideNative(o);return!$i.supportsTypeNatively(s)||t?"maybe":""},getOverrideNative:function(a){void 0===a&&(a={});var s=a.vhs,n=a.hls,_=(void 0===s?{}:s).overrideNative,L=(void 0===n?{}:n).overrideNative;return void 0!==L&&L||(void 0===_?!(ye.browser.IS_ANY_SAFARI||ye.browser.IS_IOS):_)}};Nt("avc1.4d400d,mp4a.40.2")&&ye.getTech("Html5").registerSourceHandler(_f,0),ye.VhsHandler=op,Object.defineProperty(ye,"HlsHandler",{get:function(){return ye.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),op},configurable:!0}),ye.VhsSourceHandler=_f,Object.defineProperty(ye,"HlsSourceHandler",{get:function(){return ye.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),_f},configurable:!0}),ye.Vhs=$i,Object.defineProperty(ye,"Hls",{get:function(){return ye.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),$i},configurable:!0}),ye.use||(ye.registerComponent("Hls",$i),ye.registerComponent("
32Vhs",$i)),ye.options.vhs=ye.options.vhs||{},ye.options.hls=ye.options.hls||{},ye.getPlugin&&ye.getPlugin("reloadSourceOnError")||(ye.registerPlugin||ye.plugin)("reloadSourceOnError",function(a){Ug(this,a)});const tm=ye},1684:(Ot,ft,Le)=>{var Re=Le(2171).getUint64;Ot.exports=function(ce){var me=new DataView(ce.buffer,ce.byteOffset,ce.byteLength),be={version:ce[0],flags:new Uint8Array(ce.subarray(1,4)),references:[],referenceId:me.getUint32(4),timescale:me.getUint32(8)},$e=12;0===be.version?(be.earliestPresentationTime=me.getUint32($e),be.firstOffset=me.getUint32($e+4),$e+=8):(be.earliestPresentationTime=Re(ce.subarray($e)),be.firstOffset=Re(ce.subarray($e+8)),$e+=16);var xe=me.getUint16($e+=2);for($e+=2;xe>0;$e+=12,xe--)be.references.push({referenceType:(128&ce[$e])>>>7,referencedSize:2147483647&me.getUint32($e),subsegmentDuration:me.getUint32($e+4),startsWithSap:!!(128&ce[$e+8]),sapType:(112&ce[$e+8])>>>4,sapDeltaTime:268435455&me.getUint32($e+8)});return be}},6353:Ot=>{var Le,Re,A,ce,me,be,$e;me=function(xe,Pe){return Le(ce(xe,Pe))},be=function(xe,Pe){return Re(A(xe),Pe)},$e=function(xe,Pe,Xe){return A(Xe?xe:xe-Pe)},Ot.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:Le=function(xe){return 9e4*xe},secondsToAudioTs:Re=function(xe,Pe){return xe*Pe},videoTsToSeconds:A=function(xe){return xe/9e4},audioTsToSeconds:ce=function(xe,Pe){return xe/Pe},audioTsToVideoTs:me,videoTsToAudioTs:be,metadataTsToSeconds:$e}},2171:Ot=>{var ft=Math.pow(2,32);Ot.exports={getUint64:function(Re){var ce,A=new DataView(Re.buffer,Re.byteOffset,Re.byteLength);return A.getBigUint64?(ce=A.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(ce):ce:A.getUint32(0)*ft+A.getUint32(4)},MAX_UINT32:ft}},6483:function(Ot,ft,Le){
33/*! @name videojs-preroll-v2 @version 2.0.0 @license MIT */
34Ot.exports=function(Re,A){"use strict";function ce(Oe){return Oe&&"object"==typeof Oe&&"default"in Oe?Oe:{default:Oe}}var me=ce(Re),be=ce(A),xe={src:"",href:"",target:"_blank",allowSkip:!0,skipTime:5,repeatAd:!1,adSign:!1,showRemaining:!1,adsOptions:{},lang:{skip:"Skip Ad &#8811;","skip in":"Skip in ",advertisement:"Advertisement","video start in":"Video will start in: "}},ae=function(de){!function(de,at){de.addClass("vjs-preroll"),de.preroll={adDone:!1,options:at},de.ads(de.preroll.options.adsOptions),de.on("contentupdate",function(){de.preroll.shouldPlayPreroll()?de.trigger("adsready"):de.trigger("adscanceled")}),de.on("readyforpreroll",function(){if(de.preroll.shouldPlayPreroll()){de.ads.startLinearAdMode(),de.bigPlayButton.hide(),de.controlBar.playbackRateMenuButton.hide();var ct=me.default.VERSION.split("."),pt=parseInt(ct[0],10);if(pt<=5?be.default.document.querySelector(".vjs-progress-control").style.pointerEvents="none":pt>=6&&de.controlBar.progressControl.disable(),de.contentSrc=de.preroll.options.src,de.src(de.preroll.options.src),de.one("durationchange",function(){de.play()}),de.one("progress",function(){de.play()}),de.one("adloadstart",function(){de.play()}),""!==de.preroll.options.href){var sr=be.default.document.createElement("a");sr.className="preroll-blocker",sr.href=de.preroll.options.href,sr.target=de.preroll.options.target||"_blank",sr.onclick=function(){de.trigger("adclick")},de.preroll.blocker=sr,de.el().insertBefore(sr,de.controlBar.el())}if(!1!==de.preroll.options.adSign){var rr=be.default.document.createElement("div");rr.className="advertisement-box",de.preroll.adBox=rr,de.el().appendChild(rr),de.preroll.adBox.innerHTML=de.preroll.options.lang.advertisement}if(!1!==de.preroll.options.showRemaining&&!1===de.preroll.options.allowSkip){var Je=be.default.document.createElement("div");Je.className="remaining-time",de.preroll.remainingTime=Je,de.el().appendChild(Je),de.preroll.remainingTime.innerHTML=de.preroll.options.lang["video start in"],de.on("adtimeupdate",de.preroll.timeremaining)}if(!1!==de.preroll.options.allowSkip){var rt=be.default.document.createElement("div");rt.className="preroll-skip-button",de.preroll.skipButton=rt,de.el().appendChild(rt),rt.onclick=function(Dt){var Mt=be.default.Event;if((" "+de.preroll.skipButton.className+" ").indexOf(" enabled ")>=0&&de.preroll.exitPreroll(),void 0===Mt.prototype.stopPropagation)return!1;Dt.stopPropagation()},de.on("adtimeupdate",de.preroll.timeupdate)}de.one("adended",de.preroll.exitPreroll),de.one("error",de.preroll.prerollError)}else de.trigger("adscanceled")}),de.preroll.shouldPlayPreroll=function(){return!(""===de.preroll.options.src||!0===de.preroll.adDone)},de.preroll.exitPreroll=function(){typeof de.preroll.skipButton<"u"&&de.preroll.skipButton.parentNode.removeChild(de.preroll.skipButton),typeof de.preroll.adBox<"u"&&de.preroll.adBox.parentNode.removeChild(de.preroll.adBox),typeof de.preroll.remainingTime<"u"&&de.preroll.remainingTime.parentNode.removeChild(de.preroll.remainingTime),typeof de.preroll.blocker<"u"&&de.preroll.blocker.parentNode.removeChild(de.preroll.blocker),de.off("adended",de.preroll.exitPreroll),de.off("error",de.preroll.prerollError),!0!==de.preroll.options.repeatAd&&(
34de.preroll.adDone=!0),de.loadingSpinner.show(),de.posterImage.hide(),de.bigPlayButton.show(),de.controlBar.playbackRateMenuButton.show(),de.controlBar.progressControl.enable(),de.ads.endLinearAdMode()},de.preroll.timeupdate=function(ct){de.loadingSpinner.hide();var pt=Math.ceil(de.preroll.options.skipTime-de.currentTime());pt>0?de.preroll.skipButton.innerHTML=de.preroll.options.lang["skip in"]+pt+"s":-1===(" "+de.preroll.skipButton.className+" ").indexOf(" enabled ")&&(de.preroll.skipButton.className+=" enabled",de.preroll.skipButton.innerHTML=de.preroll.options.lang.skip)},de.preroll.timeremaining=function(ct){de.loadingSpinner.hide();var pt=Math.ceil(de.remainingTime());pt>0&&(de.preroll.remainingTime.innerHTML=de.preroll.options.lang["video start in"]+pt+"s")},de.preroll.prerollError=function(ct){de.preroll.exitPreroll()},de.currentSrc()&&(de.preroll.shouldPlayPreroll()?de.trigger("adsready"):de.trigger("adscanceled"))}(this,me.default.mergeOptions(xe,de))};return(me.default.registerPlugin||me.default.plugin)("preroll",ae),ae.VERSION="2.0.0",ae}(Le(3689),Le(9226))},3629:(Ot,ft,Le)=>{var Re=Le(9226),A=Ot.exports={WebVTT:Le(8318),VTTCue:Le(5713),VTTRegion:Le(3872)};Re.vttjs=A,Re.WebVTT=A.WebVTT;var ce=A.VTTCue,me=A.VTTRegion,be=Re.VTTCue,$e=Re.VTTRegion;A.shim=function(){Re.VTTCue=ce,Re.VTTRegion=me},A.restore=function(){Re.VTTCue=be,Re.VTTRegion=$e},Re.VTTCue||A.shim()},8318:(Ot,ft,Le)=>{var Re=Le(1421),A=Object.create||function(){function ie(){}return function(X){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return ie.prototype=X,new ie}}();function ce(ie,X){this.name="ParsingError",this.code=ie.code,this.message=X||ie.message}function me(ie){function X(it,Ae,ue,O){return 3600*(0|it)+60*(0|Ae)+(0|ue)+(0|O)/1e3}var ke=ie.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return ke?ke[3]?X(ke[1],ke[2],ke[3].replace(":",""),ke[4]):ke[1]>59?X(ke[1],ke[2],0,ke[4]):X(0,ke[1],ke[2],ke[4]):null}function be(){this.values=A(null)}function $e(ie,X,ke,it){var Ae=it?ie.split(it):[ie];for(var ue in Ae)if("string"==typeof Ae[ue]){var O=Ae[ue].split(ke);2===O.length&&X(O[0].trim(),O[1].trim())}}function xe(ie,X,ke){var it=ie;function Ae(){var Qe=me(ie);if(null===Qe)throw new ce(ce.Errors.BadTimeStamp,"Malformed timestamp: "+it);return ie=ie.replace(/^[^\sa-zA-Z-]+/,""),Qe}function O(){ie=ie.replace(/^\s+/,"")}if(O(),X.startTime=Ae(),O(),"--\x3e"!==ie.substr(0,3))throw new ce(ce.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+it);ie=ie.substr(3),O(),X.endTime=Ae(),O(),function ue(Qe,Ie){var Fe=new be;$e(Qe,function(nt,Ze){switch(nt){case"region":for(var Tt=ke.length-1;Tt>=0;Tt--)if(ke[Tt].id===Ze){Fe.set(nt,ke[Tt].region);break}break;case"vertical":Fe.alt(nt,Ze,["rl","lr"]);break;case"line":var $t=Ze.split(","),ir=$t[0];Fe.integer(nt,ir),Fe.percent(nt,ir)&&Fe.set("snapToLines",!1),Fe.alt(nt,ir,["auto"]),2===$t.length&&Fe.alt("lineAlign",$t[1],["start","center","end"]);break;case"position":$t=Ze.split(","),Fe.percent(nt,$t[0]),2===$t.length&&Fe.alt("positionAlign",$t[1],["start","center","end"]);break;case"size":Fe.percent(nt,Ze);break;case"align":Fe.alt(nt,Ze,["start","center","end","left","right"])}},/:/,/\s/),Ie.region=Fe.get("region",null),Ie.vertical=Fe.get("vertical","");try{Ie.line=Fe.get("line","auto")}catch(nt){}Ie.lineAlign=Fe.get("lineAlign","start"),Ie.snapToLines=Fe.get("snapToLines",!0),Ie.size=Fe.get("size",100);try{Ie.align=Fe.get("align","center")}catch(nt){Ie.align=Fe.get("align","middle")}try{Ie.position=Fe.get("position","auto")}catch(nt){Ie.position=Fe.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},Ie.align)}Ie.positionAlign=Fe.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},Ie.align)}(ie,X)}(ce.prototype=A(Error.prototype)).constructor=ce,ce.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},be.prototype={set:function(ie,X){!this.get(ie)&&""!==X&&(this.values[ie]=X)},get:function(ie,X,ke){return ke?this.has(ie)?this.values[ie]:X[ke]:this.has(ie)?this.values[ie]:X},has:function(ie){return ie in this.values},alt:function(ie,X,ke){for(var it=0;
vendor: 5,577 bytes, line 34
34it<ke.length;++it)if(X===ke[it]){this.set(ie,X);break}},integer:function(ie,X){/^-?\d+$/.test(X)&&this.set(ie,parseInt(X,10))},percent:function(ie,X){return!!(X.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(X=parseFloat(X),X>=0&&X<=100))&&(this.set(ie,X),!0)}};var Pe=Re.createElement&&Re.createElement("textarea"),Xe={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},ae={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},Oe={v:"title",lang:"lang"},de={rt:"ruby"};function at(ie,X){function ke(){if(!X)return null;var Rt=X.match(/^([^<]*)(<[^>]*>?)?/);return function ir(wt){return X=X.substr(wt.length),wt}(Rt[1]?Rt[1]:Rt[2])}function it(ir){return Pe.innerHTML=ir,ir=Pe.textContent,Pe.textContent="",ir}function ue(ir,Rt){var wt=Xe[ir];if(!wt)return null;var Or=ie.document.createElement(wt),pr=Oe[ir];return pr&&Rt&&(Or[pr]=Rt.trim()),Or}for(var Ie,O=ie.document.createElement("div"),Qe=O,Fe=[];null!==(Ie=ke());)if("<"!==Ie[0])Qe.appendChild(ie.document.createTextNode(it(Ie)));else{if("/"===Ie[1]){Fe.length&&Fe[Fe.length-1]===Ie.substr(2).replace(">","")&&(Fe.pop(),Qe=Qe.parentNode);continue}var Ze,nt=me(Ie.substr(1,Ie.length-2));if(nt){Ze=ie.document.createProcessingInstruction("timestamp",nt),Qe.appendChild(Ze);continue}var Tt=Ie.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!Tt||!(Ze=ue(Tt[1],Tt[3]))||de[(Rt=Ze).localName]&&de[Rt.localName]!==Qe.localName)continue;if(Tt[2]){var $t=Tt[2].split(".");$t.forEach(function(ir){var Rt=/^bg_/.test(ir),wt=Rt?ir.slice(3):ir;ae.hasOwnProperty(wt)&&(Ze.style[Rt?"background-color":"color"]=ae[wt])}),Ze.className=$t.join(" ")}Fe.push(Tt[1]),Qe.appendChild(Ze),Qe=Ze}var Rt;return O}var ct=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function pt(ie){for(var X=0;X<ct.length;X++){var ke=ct[X];if(ie>=ke[0]&&ie<=ke[1])return!0}return!1}function sr(ie){var X=[],ke="";if(!ie||!ie.childNodes)return"ltr";function Ae(Qe,Ie){for(var Fe=Ie.childNodes.length-1;Fe>=0;Fe--)Qe.push(Ie.childNodes[Fe])}function ue(Qe){if(!Qe||!Qe.length)return null;var Ie=Qe.pop(),Fe=Ie.textContent||Ie.innerText;if(Fe){var nt=Fe.match(/^.*(\n|\r)/);return nt?(Qe.length=0,nt[0]):Fe}return"ruby"===Ie.tagName?ue(Qe):Ie.childNodes?(Ae(Qe,Ie),ue(Qe)):void 0}for(Ae(X,ie);ke=ue(X);)for(var O=0;O<ke.length;O++)if(pt(ke.charCodeAt(O)))return"rtl";return"ltr"}function Je(){}function rt(ie,X,ke){Je.call(this),this.cue=X,this.cueDiv=at(ie,X.text);var it={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===X.vertical?"horizontal-tb":"lr"===X.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(it,this.cueDiv),this.div=ie.document.createElement("div"),it={direction:sr(this.cueDiv),writingMode:""===X.vertical?"horizontal-tb":"lr"===X.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===X.align?"center":X.align,font:ke.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(it),this.div.appendChild(this.cueDiv);var Ae=0;switch(X.positionAlign){case"start":case"line-left":Ae=X.position;break;case"center":Ae=X.position-X.size/2;break;case"end":case"line-right":Ae=X.position-X.size}this.applyStyles(""===X.vertical?{left:this.formatStyle(Ae,"%"),width:this.formatStyle(X.size,"%")}:{top:this.formatStyle(Ae,"%"),height:this.formatStyle(X.size,"%")}),this.move=function(ue){this.applyStyles({top:this.formatStyle(ue.top,"px"),bottom:this.formatStyle(ue.bottom,"px"),left:this.formatStyle(ue.left,"px"),right:this.formatStyle(ue.right,"px"),height:this.formatStyle(ue.height,"px"),width:this.formatStyle(ue.width,"px")})}}function Dt(ie){var X,ke,it,Ae;if(ie.div){ke=ie.div.offsetHeight,it=ie.div.offsetWidth,Ae=ie.div.offsetTop;var ue=(ue=ie.div.childNodes)&&(ue=ue[0])&&ue.getClientRects&&ue.getClientRects();ie=ie.div.getBoundingClientRect(),X=ue?Math.max(ue[0]&&ue[0].height||0,ie.height/ue.length):0}this.left=ie.left,this.right=ie.right,this.top=ie.top||Ae,this.height=ie.he
vendor: 11,302 bytes, line 34
34ight||ke,this.bottom=ie.bottom||Ae+(ie.height||ke),this.width=ie.width||it,this.lineHeight=void 0!==X?X:ie.lineHeight}function Mt(ie,X,ke,it){var ue=new Dt(X),O=X.cue,Qe=function rr(ie){if("number"==typeof ie.line&&(ie.snapToLines||ie.line>=0&&ie.line<=100))return ie.line;if(!ie.track||!ie.track.textTrackList||!ie.track.textTrackList.mediaElement)return-1;for(var X=ie.track,ke=X.textTrackList,it=0,Ae=0;Ae<ke.length&&ke[Ae]!==X;Ae++)"showing"===ke[Ae].mode&&it++;return-1*++it}(O),Ie=[];if(O.snapToLines){var Fe;switch(O.vertical){case"":Ie=["+y","-y"],Fe="height";break;case"rl":Ie=["+x","-x"],Fe="width";break;case"lr":Ie=["-x","+x"],Fe="width"}var nt=ue.lineHeight,Ze=nt*Math.round(Qe),Tt=ke[Fe]+nt,$t=Ie[0];Math.abs(Ze)>Tt&&(Ze=Ze<0?-1:1,Ze*=Math.ceil(Tt/nt)*nt),Qe<0&&(Ze+=""===O.vertical?ke.height:ke.width,Ie=Ie.reverse()),ue.move($t,Ze)}else{var ir=ue.lineHeight/ke.height*100;switch(O.lineAlign){case"center":Qe-=ir/2;break;case"end":Qe-=ir}switch(O.vertical){case"":X.applyStyles({top:X.formatStyle(Qe,"%")});break;case"rl":X.applyStyles({left:X.formatStyle(Qe,"%")});break;case"lr":X.applyStyles({right:X.formatStyle(Qe,"%")})}Ie=["+y","-x","+x","-y"],ue=new Dt(X)}var Rt=function Ae(wt,Or){for(var pr,Vt=new Dt(wt),Ir=1,Mr=0;Mr<Or.length;Mr++){for(;wt.overlapsOppositeAxis(ke,Or[Mr])||wt.within(ke)&&wt.overlapsAny(it);)wt.move(Or[Mr]);if(wt.within(ke))return wt;var rn=wt.intersectPercentage(ke);Ir>rn&&(pr=new Dt(wt),Ir=rn),wt=new Dt(Vt)}return pr||Vt}(ue,Ie);X.move(Rt.toCSSCompatValues(ke))}function ht(){}Je.prototype.applyStyles=function(ie,X){for(var ke in X=X||this.div,ie)ie.hasOwnProperty(ke)&&(X.style[ke]=ie[ke])},Je.prototype.formatStyle=function(ie,X){return 0===ie?0:ie+X},(rt.prototype=A(Je.prototype)).constructor=rt,Dt.prototype.move=function(ie,X){switch(X=void 0!==X?X:this.lineHeight,ie){case"+x":this.left+=X,this.right+=X;break;case"-x":this.left-=X,this.right-=X;break;case"+y":this.top+=X,this.bottom+=X;break;case"-y":this.top-=X,this.bottom-=X}},Dt.prototype.overlaps=function(ie){return this.left<ie.right&&this.right>ie.left&&this.top<ie.bottom&&this.bottom>ie.top},Dt.prototype.overlapsAny=function(ie){for(var X=0;X<ie.length;X++)if(this.overlaps(ie[X]))return!0;return!1},Dt.prototype.within=function(ie){return this.top>=ie.top&&this.bottom<=ie.bottom&&this.left>=ie.left&&this.right<=ie.right},Dt.prototype.overlapsOppositeAxis=function(ie,X){switch(X){case"+x":return this.left<ie.left;case"-x":return this.right>ie.right;case"+y":return this.top<ie.top;case"-y":return this.bottom>ie.bottom}},Dt.prototype.intersectPercentage=function(ie){return Math.max(0,Math.min(this.right,ie.right)-Math.max(this.left,ie.left))*Math.max(0,Math.min(this.bottom,ie.bottom)-Math.max(this.top,ie.top))/(this.height*this.width)},Dt.prototype.toCSSCompatValues=function(ie){return{top:this.top-ie.top,bottom:ie.bottom-this.bottom,left:this.left-ie.left,right:ie.right-this.right,height:this.height,width:this.width}},Dt.getSimpleBoxPosition=function(ie){var X=ie.div?ie.div.offsetHeight:ie.tagName?ie.offsetHeight:0,ke=ie.div?ie.div.offsetWidth:ie.tagName?ie.offsetWidth:0,it=ie.div?ie.div.offsetTop:ie.tagName?ie.offsetTop:0;return{left:(ie=ie.div?ie.div.getBoundingClientRect():ie.tagName?ie.getBoundingClientRect():ie).left,right:ie.right,top:ie.top||it,height:ie.height||X,bottom:ie.bottom||it+(ie.height||X),width:ie.width||ke}},ht.StringDecoder=function(){return{decode:function(ie){if(!ie)return"";if("string"!=typeof ie)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(ie))}}},ht.convertCueToDOMTree=function(ie,X){return ie&&X?at(ie,X):null},ht.processCues=function(ie,X,ke){if(!ie||!X||!ke)return null;for(;ke.firstChild;)ke.removeChild(ke.firstChild);var it=ie.document.createElement("div");if(it.style.position="absolute",it.style.left="0",it.style.right="0",it.style.top="0",it.style.bottom="0",it.style.margin="1.5%",ke.appendChild(it),function Ae(nt){for(var Ze=0;Ze<nt.length;Ze++)if(nt[Ze].hasBeenReset||!nt[Ze].displayState)return!0;return!1}(X)){var O=[],Qe=Dt.getSimpleBoxPosition(it),Fe={font:Math.round(.05*Qe.height*100)/100+"px sans-serif"};!function(){for(var nt,Ze,Tt=0;Tt<X.length;Tt++)nt=new rt(ie,Ze=X[Tt],Fe),it.appendChild(nt.div),Mt(0,nt,Qe,O),Ze.displayState=nt.div,O.push(Dt.getSimpleBoxPosition(nt))}()}else for(var ue=0;ue<X.length;ue++)it.appendChild(X[ue].displayState)},(ht.Parser=function(ie,X,ke){ke||(ke=X,X={}),X||(X={}),this.window=ie,this.vttjs=X,this.state="INITIAL",this.buffer="",this.decoder=ke||new TextDecoder("utf8"),this.regionList=[]}).prototype={reportOrThrowError:function(ie){if(!(ie instanceof ce))throw ie;this.onparsingerror&&this.onparsingerror(ie)},parse:function(ie){var nt,X=this;function ke(){for(var nt=X.buffer,Ze=0;Ze<nt.length&&"\r"!==nt[Ze]&&"\n"!==nt[Ze];)++Ze;var Tt=nt.substr(0,Ze);return"\r"===nt[Ze]&&++Ze,"\n"===nt[Ze]&&++Ze,X.buffer=nt.substr(Ze),Tt}ie&&(X.buffer+=X.decoder.decode(ie,{stream:!0}));try{var O;if("INITIAL"===X.state){if(!/\r\n|\n/.test(X.buffer))return this;var Qe=(O=ke()).match(/^WEBVTT([ \t].*)?$/);if(!Qe||!Qe[0])throw new ce(ce.Errors.BadSignature);X.state="HEADER"}for(var Ie=!1;X.buffer;){if(!/\r\n|\n/.test(X.buffer))return this;switch(Ie?Ie=!1:O=ke(),X.state){case"HEADER":/:/.test(O)?(nt=O).match(/X-TIMESTAMP-MAP/)?$e(nt,function(Ze,Tt){"X-TIMESTAMP-MAP"===Ze&&function Ae(nt){var Ze=new be;$e(nt,function(Tt,$t){switch(Tt){case"MPEGT":Ze.integer(Tt+"S",$t);break;case"LOCA":Ze.set(Tt+"L",me($t))}},/[^\d]:/,/,/),X.ontimestampmap&&X.ontimestampmap({MPEGTS:Ze.get("MPEGTS"),LOCAL:Ze.get("LOCAL")})}(Tt)},/=/):$e(nt,function(Ze,Tt){"Region"===Ze&&function it(nt){var Ze=new be;if($e(nt,function($t,ir){switch($t){case"id":Ze.set($t,ir);break;case"width":Ze.percent($t,ir);break;case"lines":Ze.integer($t,ir);break;case"regionanchor":case"viewportanchor":var Rt=ir.split(",");if(2!==Rt.length)break;var wt=new be;if(wt.percent("x",Rt[0]),wt.percent("y",Rt[1]),!wt.has("x")||!wt.has("y"))break;Ze.set($t+"X",wt.get("x")),Ze.set($t+"Y",wt.get("y"));break;case"scroll":Ze.alt($t,ir,["up"])}},/=/,/\s/),Ze.has("id")){var Tt=new(X.vttjs.VTTRegion||X.window.VTTRegion);Tt.width=Ze.get("width",100),Tt.lines=Ze.get("lines",3),Tt.regionAnchorX=Ze.get("regionanchorX",0),Tt.regionAnchorY=Ze.get("regionanchorY",100),Tt.viewportAnchorX=Ze.get("viewportanchorX",0),Tt.viewportAnchorY=Ze.get("viewportanchorY",100),Tt.scroll=Ze.get("scroll",""),X.onregion&&X.onregion(Tt),X.regionList.push({id:Ze.get("id"),region:Tt})}}(Tt)},/:/):O||(X.state="ID");continue;case"NOTE":O||(X.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(O)){X.state="NOTE";break}if(!O)continue;X.cue=new(X.vttjs.VTTCue||X.window.VTTCue)(0,0,"");try{X.cue.align="center"}catch(nt){X.cue.align="middle"}if(X.state="CUE",-1===O.indexOf("--\x3e")){X.cue.id=O;continue}case"CUE":try{xe(O,X.cue,X.regionList)}catch(nt){X.reportOrThrowError(nt),X.cue=null,X.state="BADCUE";continue}X.state="CUETEXT";continue;case"CUETEXT":var Fe=-1!==O.indexOf("--\x3e");if(!O||Fe&&(Ie=!0)){X.oncue&&X.oncue(X.cue),X.cue=null,X.state="ID";continue}X.cue.text&&(X.cue.text+="\n"),X.cue.text+=O.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":O||(X.state="ID");continue}}}catch(nt){X.reportOrThrowError(nt),"CUETEXT"===X.state&&X.cue&&X.oncue&&X.oncue(X.cue),X.cue=null,X.state="INITIAL"===X.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var ie=this;try{if(ie.buffer+=ie.decoder.decode(),(ie.cue||"HEADER"===ie.state)&&(ie.buffer+="\n\n",ie.parse()),"INITIAL"===ie.state)throw new ce(ce.Errors.BadSignature)}catch(X){ie.reportOrThrowError(X)}return ie.onflush&&ie.onflush(),this}},Ot.exports=ht},5713:Ot=>{var ft="auto",Le={"":1,lr:1,rl:1},Re={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function ce(be){return"string"==typeof be&&!!Re[be.toLowerCase()]&&be.toLowerCase()}function me(be,$e,xe){this.hasBeenReset=!1;var Pe="",Xe=!1,ae=be,Oe=$e,de=xe,at=null,ct="",pt=!0,sr="auto",rr="start",Je="auto",rt="auto",Dt=100,Mt="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return Pe},set:function(ht){Pe=""+ht}},pauseOnExit:{enumerable:!0,get:function(){return Xe},set:function(ht){Xe=!!ht}},startTime:{enumerable:!0,get:function(){return ae},set:function(ht){if("number"!=typeof ht)throw new TypeError("Start time must be set to a number.");ae=ht,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return Oe},set:function(ht){if("number"!=typeof ht)throw new TypeError("End time must be set to a number.");Oe=ht,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return de},set:function(ht){de=""+ht,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return at},set:function(ht){at=ht,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return ct},set:function(ht){var er=function A(be){return"string"==typeof be&&!!Le[be.toLowerCase()]&&be.toLowerCase()}(ht);if(!1===er)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");ct=er,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return pt},set:function(ht){pt=!!ht,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return sr},set:function(ht){if("number"!=typeof ht&&ht!==ft)throw new SyntaxError("Line: an invalid number or illegal string was specified.");sr=ht,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return rr},set:function(ht){var er=ce(ht);er?(rr=er,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return Je},set:function(ht){if(ht<0||ht>100)throw new Error("Position must be between 0 and 100.");Je=ht,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return rt},set:function(ht){var er=ce(ht);er?(rt=er,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return Dt},set:function(ht){if(ht<0||ht>100)throw new Error("Size must be between 0 and 100.");Dt=ht,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return Mt},set:function(ht){var er=ce(ht);if(!er)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");Mt=er,this.hasBeenReset=!0}}}),this.displayState=void 0}me.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},Ot.exports=me},3872:Ot=>{var ft={"":!0,up:!0};function Re(ce){return"number"==typeof ce&&ce>=0&&ce<=100}Ot.exports=function A(){var ce=100,me=3,be=0,$e=100,xe=0,Pe=100,Xe="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return ce},set:function(ae){if(!Re(ae))throw new Error("Width must be between 0 and 100.");ce=ae}},lines:{enumerable:!0,get:function(){return me},set:function(ae){if("number"!=typeof ae)throw new TypeError("Lines must be set to a number.");me=ae}},regionAnchorY:{enumerable:!0,get:function(){return $e},set:function(ae){if(!Re(ae))throw new Error("RegionAnchorX must be between 0 and 100.");$e=ae}},regionAnchorX:{enumerable:!0,get:function(){return be},set:function(ae){if(!Re(ae))throw new Error("RegionAnchorY must be between 0 and 100.");be=ae}},viewportAnchorY:{enumerable:!0,get:function(){return Pe},set:function(ae){if(!Re(ae))throw new Error("ViewportAnchorY must be between 0 and 100.");Pe=ae}}
34,viewportAnchorX:{enumerable:!0,get:function(){return xe},set:function(ae){if(!Re(ae))throw new Error("ViewportAnchorX must be between 0 and 100.");xe=ae}},scroll:{enumerable:!0,get:function(){return Xe},set:function(ae){var Oe=function Le(ce){return"string"==typeof ce&&!!ft[ce.toLowerCase()]&&ce.toLowerCase()}(ae);!1===Oe?console.warn("Scroll: an invalid or illegal string was specified."):Xe=Oe}}})}},6109:function(Ot,ft,Le){var ce;ce=Le(3689),Ot.exports=function(Re){"use strict";var A=Re.browser.IS_IOS||Re.browser.IS_NATIVE_ANDROID,ce=Re.getTech("Tech");let me=(()=>{class Pe extends ce{constructor(ae,Oe){super(ae,Oe),this.setPoster(ae.poster),this.setSrc(this.options_.source,!0),this.setTimeout(function(){this.el_&&(this.el_.parentNode.className+=" vjs-youtube",A&&(this.el_.parentNode.className+=" vjs-youtube-mobile"),Pe.isApiReady?this.initYTPlayer():Pe.apiReadyQueue.push(this))}.bind(this))}dispose(){if(this.ytPlayer)this.ytPlayer.stopVideo&&this.ytPlayer.stopVideo(),this.ytPlayer.destroy&&this.ytPlayer.destroy();else{var ae=Pe.apiReadyQueue.indexOf(this);-1!==ae&&Pe.apiReadyQueue.splice(ae,1)}this.ytPlayer=null,this.el_.parentNode.className=this.el_.parentNode.className.replace(" vjs-youtube","").replace(" vjs-youtube-mobile",""),this.el_.parentNode.removeChild(this.el_),ce.prototype.dispose.call(this)}createEl(){var ae=document.createElement("div");ae.setAttribute("id",this.options_.techId),ae.setAttribute("style","width:100%;height:100%;top:0;left:0;position:absolute"),ae.setAttribute("class","vjs-tech");var Oe=document.createElement("div");if(Oe.appendChild(ae),!A&&!this.options_.ytControls){var de=document.createElement("div");de.setAttribute("class","vjs-iframe-blocker"),de.setAttribute("style","position:absolute;top:0;left:0;width:100%;
34height:100%"),de.onclick=function(){this.pause()}.bind(this),Oe.appendChild(de)}return Oe}initYTPlayer(){var ae={controls:0,modestbranding:1,rel:0,showinfo:0,loop:this.options_.loop?1:0};if(typeof this.options_.autohide<"u"&&(ae.autohide=this.options_.autohide),typeof this.options_.cc_load_policy<"u"&&(ae.cc_load_policy=this.options_.cc_load_policy),typeof this.options_.ytControls<"u"&&(ae.controls=this.options_.ytControls),typeof this.options_.disablekb<"u"&&(ae.disablekb=this.options_.disablekb),typeof this.options_.color<"u"&&(ae.color=this.options_.color),ae.controls?typeof this.options_.fs<"u"&&(ae.fs=this.options_.fs):ae.fs=0,-1!==this.options_.source.src.indexOf("end=")){var Oe=this.options_.source.src.match(/end=([0-9]*)/);this.options_.end=parseInt(Oe[1])}if(typeof this.options_.end<"u"&&(ae.end=this.options_.end),typeof this.options_.hl<"u"?ae.hl=this.options_.hl:typeof this.options_.language<"u"&&(ae.hl=this.options_.language.substr(0,2)),typeof this.options_.iv_load_policy<"u"&&(ae.iv_load_policy=this.options_.iv_load_policy),typeof this.options_.list<"u"?ae.list=this.options_.list:this.url&&typeof this.url.listId<"u"&&(ae.list=this.url.listId),typeof this.options_.listType<"u"&&(ae.listType=this.options_.listType),typeof this.options_.modestbranding<"u"&&(ae.modestbranding=this.options_.modestbranding),typeof this.options_.playlist<"u"&&(ae.playlist=this.options_.playlist),typeof this.options_.playsinline<"u"&&(ae.playsinline=this.options_.playsinline),typeof this.options_.rel<"u"&&(ae.rel=this.options_.rel),typeof this.options_.showinfo<"u"&&(ae.showinfo=this.options_.showinfo),-1!==this.options_.source.src.indexOf("start=")){var de=this.options_.source.src.match(/start=([0-9]*)/);this.options_.start=parseInt(de[1])}if(typeof this.options_.start<"u"&&(ae.start=this.options_.start),typeof this.options_.theme<"u"&&(ae.theme=this.options_.theme),typeof this.options_.customVars<"u"){var at=this.options_.customVars;Object.keys(at).forEach(function(pt){ae[pt]=at[pt]})}this.activeVideoId=this.url?this.url.videoId:null,this.activeList=ae.list;var ct={videoId:this.activeVideoId,playerVars:ae,events:{onReady:this.onPlayerReady.bind(this),onPlaybackQualityChange:this.onPlayerPlaybackQualityChange.bind(this),onPlaybackRateChange:this.onPlayerPlaybackRateChange.bind(this),onStateChange:this.onPlayerStateChange.bind(this),onVolumeChange:this.onPlayerVolumeChange.bind(this),onError:this.onPlayerError.bind(this)}};typeof this.options_.enablePrivacyEnhancedMode<"u"&&this.options_.enablePrivacyEnhancedMode&&(ct.host="https://www.youtube-nocookie.com"),this.ytPlayer=new YT.Player(this.options_.techId,ct)}onPlayerReady(){this.options_.muted&&this.ytPlayer.mute(),this.ytPlayer.getAvailablePlaybackRates().length>1&&(this.featuresPlaybackRate=!0),this.playerReady_=!0,this.triggerReady(),this.playOnReady?this.play():this.cueOnReady&&(this.cueVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId)}onPlayerPlaybackQualityChange(){}onPlayerPlaybackRateChange(){this.trigger("ratechange")}onPlayerStateChange(ae){var Oe=ae.data;if(Oe!==this.lastState&&!this.errorNumber)switch(this.lastState=Oe,Oe){case-1:this.trigger("loadstart"),this.trigger("loadedmetadata"),this.trigger("durationchange"),this.trigger("ratechange");break;case YT.PlayerState.ENDED:this.trigger("ended");break;case YT.PlayerState.PLAYING:this.trigger("timeupdate"),this.trigger("durationchange"),this.trigger("playing"),this.trigger("play"),this.isSeeking&&this.onSeeked();break;case YT.PlayerState.PAUSED:this.trigger("canplay"),this.isSeeking?this.onSeeked():this.trigger("pause");break;case YT.PlayerState.BUFFERING:this.player_.trigger("timeupdate"),this.player_.trigger("waiting")}}onPlayerVolumeChange(){this.trigger("volumechange")}onPlayerError(ae){this.errorNumber=ae.data,this.trigger("pause"),this.trigger("error")}error(){var ae=1e3+this.errorNumber;switch(this.errorNumber){case 5:return{code:ae,message:"Error while trying to play the video"};case 2:case 100:return{code:ae,message:"Unable to find the video"};case 101:case 150:return{code:ae,message:"Playback on other Websites has been disabled by the video owner."}}return{code:ae,message:"YouTube unknown error ("+this.errorNumber+")"}}loadVideoById_(ae){var Oe={videoId:ae};this.options_.start&&(Oe.startSeconds=this.options_.start),this.options_.end&&(Oe.endSeconds=this.options_.end),this.ytPlayer.loadVideoById(Oe)}cueVideoById_(ae){var Oe={videoId:ae};this.options_.start&&(Oe.startSeconds=this.options_.start),this.options_.end&&(Oe.endSeconds=this.options_.end),this.ytPlayer.cueVideoById(Oe)}src(ae){return ae&&this.setSrc({src:ae}),this.source}poster(){return A?null:this.poster_}setPoster(ae){this.poster_=ae}setSrc(ae){!ae||!ae.src||(delete this.errorNumber,this.source=ae,this.url=Pe.parseUrl(ae.src),this.options_.poster||this.url.videoId&&(this.poster_="https://img.youtube.com/vi/"+this.url.videoId+"/0.jpg",this.trigger("posterchange"),this.checkHighResPoster()),this.options_.autoplay&&!A?this.isReady_?this.play():this.playOnReady=!0:this.activeVideoId!==this.url.videoId&&(this.isReady_?(this.cueVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId):this.cueOnReady=!0))}autoplay(){return this.options_.autoplay}setAutoplay(ae){this.options_.autoplay=ae}loop(){return this.options_.loop}setLoop(ae){this.options_.loop=ae}play(){!this.url||!this.url.videoId||(this.wasPausedBeforeSeek=!1,this.isReady_?(this.url.listId&&(this.activeList===this.url.listId?this.ytPlayer.playVideo():(this.ytPlayer.loadPlaylist(this.url.listId),this.activeList=this.url.listId)),this.activeVideoId===this.url.videoId?this.ytPlayer.playVideo():(this.loadVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId)):(this.trigger("waiting"),this.playOnReady=!0))}pause(){this.ytPlayer&&this.ytPlayer.pauseVideo()}paused(){return!this.ytPlayer||this.lastState!==YT.PlayerState.PLAYING&&this.lastState!==YT.PlayerState.BUFFERING}currentTime(){return this.ytPlayer?this.ytPlayer.getCurrentTime():0}setCurrentTime(ae){this.lastState===YT.PlayerState.PAUSED&&(this.timeBeforeSeek=this.currentTime()),this.isSeeking||(this.wasPausedBeforeSeek=this.paused()),this.ytPlayer.seekTo(ae,!0),this.trigger("timeupdate"),this.trigger("seeking"),this.isSeeking=!0,this.lastState===YT.PlayerState.PAUSED&&this.timeBeforeSeek!==ae&&(clearInterval(this.checkSeekedInPauseInterval),this.checkSeekedInPauseInterval=setInterval(function(){this.lastState===YT.PlayerState.PAUSED&&this.isSeeking?this.currentTime()!==this.timeBeforeSeek&&(this.trigger("timeupdate"),this.onSeeked()):clearInterval(this.checkSeekedInPauseInterval)}.bind(this),250))}seeking(){return this.isSeeking}seekable(){return this.ytPlayer?Re.createTimeRange(0,this.ytPlayer.getDuration()):Re.createTimeRange()}onSeeked(){clearInterval(this.checkSeekedInPauseInterval),this.isSeeking=!1,this.wasPausedBeforeSeek&&this.pause(),this.trigger("seeked")}playbackRate(){return this.ytPlayer?this.ytPlayer.getPlaybackRate():1}setPlaybackRate(ae){this.ytPlayer&&this.ytPlayer.setPlaybackRate(ae)}duration(){return this.ytPlayer?this.ytPlayer.getDuration():0}currentSrc(){return this.source&&this.source.src}ended(){return!!this.ytPlayer&&this.lastState===YT.PlayerState.ENDED}volume(){return this.ytPlayer?this.ytPlayer.getVolume()/100:1}setVolume(ae){this.ytPlayer&&this.ytPlayer.setVolume(100*ae)}muted(){return!!this.ytPlayer&&this.ytPlayer.isMuted()}setMuted(ae){this.ytPlayer&&(this.muted(!0),ae?this.ytPlayer.mute():this.ytPlayer.unMute(),this.setTimeout(function(){this.trigger("volumechange")},50))}buffered(){if(!this.ytPlayer||!this.ytPlayer.getVideoLoadedFraction)return Re.createTimeRange();var ae=this.ytPlayer.getVideoLoadedFraction()*this.ytPlayer.getDuration();return Re.createTimeRange(0,ae)}preload(){}load(){}reset(){}networkState(){if(!this.ytPlayer)return 0;switch(this.ytPlayer.getPlayerState()){case-1:return 0;case 3:return 2;default:return 1}}readyState(){if(!this.ytPlayer)return 0;switch(this.ytPlayer.getPlayerState()){case-1:return 0;case 5:return 1;case 3:return 2;default:return 4}}supportsFullScreen(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled}checkHighResPoster(){var ae="https://img.youtube.com/vi/"+this.url.videoId+"/maxresdefault.jpg";try{var Oe=new Image;Oe.onload=function(){if("naturalHeight"in Oe){if(Oe.naturalHeight<=90||Oe.naturalWi
34dth<=120)return}else if(Oe.height<=90||Oe.width<=120)return;this.poster_=ae,this.trigger("posterchange")}.bind(this),Oe.onerror=function(){},Oe.src=ae}catch(de){}}}return Pe.isSupported=function(){return!0},Pe.canPlaySource=function(Xe){return Pe.canPlayType(Xe.type)},Pe.canPlayType=function(Xe){return"video/youtube"===Xe},Pe.parseUrl=function(Xe){var ae={videoId:null},de=Xe.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return de&&11===de[2].length&&(ae.videoId=de[2]),(de=Xe.match(/[?&]list=([^#\&\?]+)/))&&de[1]&&(ae.listId=de[1]),ae},Pe})();me.apiReadyQueue=[],typeof document<"u"&&(function $e(Pe,Xe){var ae=!1,Oe=document.createElement("script"),de=document.getElementsByTagName("script")[0];de&&(de.parentNode.insertBefore(Oe,de),Oe.onload=function(){ae||(ae=!0,Xe())},Oe.onreadystatechange=function(){!ae&&("complete"===this.readyState||"loaded"===this.readyState)&&(ae=!0,Xe())},Oe.src=Pe)}("https://www.youtube.com/iframe_api",function be(){YT.ready(function(){me.isApiReady=!0;for(var Pe=0;Pe<me.apiReadyQueue.length;++Pe)me.apiReadyQueue[Pe].initYTPlayer()})}),function xe(){var Pe=".vjs-youtube .vjs-iframe-blocker { display: none; }.vjs-youtube.vjs-user-inactive .vjs-iframe-blocker { display: block; }.vjs-youtube .vjs-poster { background-size: cover; }.vjs-youtube-mobile .vjs-big-play-button { display: none; }",Xe=document.head||document.getElementsByTagName("head")[0],ae=document.createElement("style");ae.type="text/css",ae.styleSheet?ae.styleSheet.cssText=Pe:ae.appendChild(document.createTextNode(Pe)),Xe.appendChild(ae)}()),typeof Re.registerTech<"u"?Re.registerTech("Youtube",me):Re.registerComponent("Youtube",me)}(ce.default||ce)},5893:()=>{},434:Ot=>{function ft(){return Ot.exports=ft=Object.assign?Object.assign.bind():function(Le){for(var Re=1;Re<arguments.length;Re++){var A=arguments[Re];for(var ce in A)({}).hasOwnProperty.call(A,ce)&&(Le[ce]=A[ce])}return Le},Ot.exports.__esModule=!0,Ot.exports.default=Ot.exports,ft.apply(null,arguments)}Ot.exports=ft,Ot.exports.__esModule=!0,Ot.exports.default=Ot.exports}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.