PageSourceSearch

https://tv.borussia.de/bundles/exozetfrontend/bmg/js/fantvPlayer.js

js borussia.de collected 2026-10-01 12:08:02 UTC 1,016,250 bytes, 2 lines download raw bytes

1/*! For license information please see fantvPlayer.js.LICENSE.txt */
2(()=>{var e={1629:e=>{e.exports=function(e){const t=e.getComponent("Button");e.registerComponent("chromecastButton",class extends t{constructor(e,t){super(e,t),e.on("chromecastConnected",this._onChromecastConnected.bind(this)),e.on("chromecastDisconnected",this._onChromecastDisconnected.bind(this)),e.on("chromecastDevicesAvailable",this._onChromecastDevicesAvailable.bind(this)),e.on("chromecastDevicesUnavailable",this._onChromecastDevicesUnavailable.bind(this)),e.chromecastSessionManager&&e.chromecastSessionManager.hasAvailableDevices()?this._onChromecastDevicesAvailable():this._onChromecastDevicesUnavailable(),t.addCastLabelToButton?(this.el().classList.add("vjs-chromecast-button-lg"),this._labelEl=document.createElement("span"),this._labelEl.classList.add("vjs-chromecast-button-label"),this._updateCastLabelText(),this.el().appendChild(this._labelEl)):this.controlText("Open Chromecast menu")}buildCSSClass(){return"vjs-chromecast-button "+(this._isChromecastConnected?"vjs-chromecast-casting-state ":"")+(this.options_.addCastLabelToButton?"vjs-chromecast-button-lg ":"")+t.prototype.buildCSSClass()}handleClick(){this.player().trigger("chromecastRequested")}_onChromecastConnected(){this._isChromecastConnected=!0,this._reloadCSSClasses(),this._updateCastLabelText()}_onChromecastDisconnected(){this._isChromecastConnected=!1,this._reloadCSSClasses(),this._updateCastLabelText()}_onChromecastDevicesAvailable(){this.show()}_onChromecastDevicesUnavailable(){this.hide()}_reloadCSSClasses(){this.el_&&(this.el_.className=this.buildCSSClass())}_updateCastLabelText(){this._labelEl&&(this._labelEl.textContent=this._isChromecastConnected?this.localize("Disconnect Cast"):this.localize("Cast"))}})}},7115:(e,t,i)=>{var n=i(9422);function r(e){e.chromecastSessionManager.openCastMenu()}function s(e,t){!function(e){cast.framework.CastContext.getInstance().setOptions({receiverApplicationId:e.receiverAppID||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED})}(t),function(e){e.chromecastSessionManager||(e.chromecastSessionManager=new n(e))}(e),function(e,t){var i;t.addButtonToControlBar&&!e.controlBar.getChild("chromecastButton")&&(i=e.controlBar.children().length,void 0!==t.buttonPositionIndex&&(i=t.buttonPositionIndex>=0?t.buttonPositionIndex:e.controlBar.children().length+t.buttonPositionIndex),e.controlBar.addChild("chromecastButton",t,i)),e.on("chromecastRequested",r.bind(null,e))}(e,t)}e.exports=function(e){e.registerPlugin("chromecast",(function(e){var t=Object.assign({addButtonToControlBar:!0},e||{});this.ready(function(){this.controlBar&&(n.isChromecastAPIAvailable()?s(this,t):function(e,t){var i,r=1;i=setInterval((function(){r>30?clearInterval(i):(n.isChromecastAPIAvailable()&&(clearInterval(i),s(e,t)),r+=1)}),1e3)}(this,t))}.bind(this))}))}},4373:(e,t,i)=>{var n=i(4648),r=i(1629),s=i(6633),a=i(7115);e.exports=function(e,t){Object.assign({preloadWebComponents:!1},t).preloadWebComponents&&n(),e=e||window.videojs,r(e),s(e),a(e)}},4648:(e,t,i)=>{function n(e){return"string"==typeof window.navigator.userAgent&&window.navigator.userAgent.indexOf(e)>=0}e.exports=function(){var e=!document.registerElement,t=n("CriOS");(n("Android")&&n("Chrome/")&&window.navigator.presentation||t)&&e&&i(8037)}},6633:(e,t,i)=>{var n=i(9422),r=i(8991);e.exports=function(e){var t=e.getComponent("Tech");class i extends t{constructor(t){super(t),this.featuresVolumeControl=!0,this.featuresPlaybackRate=!1,this.movingMediaElementInDOM=!1,this.featuresFullscreenResize=!0,this.featuresTimeupdateEvents=!0,this.featuresProgressEvents=!1,this.featuresNativeTextTracks=!1,this.featuresNativeAudioTracks=!1,this.featuresNativeVideoTracks=!1,this.videojs=e,this._eventListeners=[],this.videojsPlayer=this.videojs(t.playerId),this._chromecastSessionManager=this.videojsPlayer.chromecastSessionManager,this._ui.updatePoster(this.videojsPlayer.poster()),this._remotePlayer=this._chromecastSessionManager.getRemotePlayer(),this._remotePlayerController=this._chromecastSessionManager.getRemotePlayerController(),this._listenToPlayerControllerEvents(),this.on("dispose",this._removeAllEventListeners.bind(this)),this._hasPlayedAnyItem=!1,this._requestTitle=t.requestTitleFn||function(){},this._requestSubtitle=t.requestSubtitleFn||function(){},this._requestCustomData=t.requestCustomDataFn||function(){},this._modifyLoadRequestFn=t.modifyLoadRequestFn||function(e){return e},this._initialStartTime=t.startTime||0,this._playSource(t.source,this._initialStartTime),this.ready(function(){this.setMuted(t.muted)}.bind(this))}createEl(){return this._ui=this._ui||new r,this._ui.getDOMElement()}play(){this.paused()&&(this.ended()&&!this._isMediaLoading?this._playSource({src:this.videojsPlayer.src()},0):this._remotePlayerController.playOrPause())}pause(){!this.paused()&&this._remotePlayer.canPause&&this._remotePlayerController.playOrPause()}paused(){return this._remotePlayer.isPaused||this.ended()||null===this._remotePlayer.playerState}setSource(e){this._currentSource&&this._currentSource.src===e.src&&this._currentSource.type===e.type||(this._currentSource=e,this._playSource(e,0))}_playSource(e,t){var i,n=this._getCastSession(),r=new chrome.cast.media.MediaInfo(e.src,e.type),s=this._requestTitle(e),a=this._requestSubtitle(e),o=this.poster(),l=this._requestCustomData(e);this.trigger("waiting"),this._clearSessionTimeout(),r.metadata=new chrome.cast.media.GenericMediaMetadata,r.metadata.metadataType=chrome.cast.media.MetadataType.GENERIC,r.metadata.title=s,r.metadata.subtitle=a,r.streamType=this.videojsPlayer.liveTracker&&this.videojsPlayer.liveTracker.isLive()?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED,o&&(r.metadata.images=[{url:o}]),l&&(r.customData=l),this._ui.updateTitle(s),this._ui.updateSubtitle(a),(i=new chrome.cast.media.LoadRequest(r)).autoplay=!0,i.currentTime=t,i=this._modifyLoadRequestFn(i),this._isMediaLoading=!0,this._hasPlayedCurrentItem=!1,n.loadMedia(i).then(function(){this._clearSessionTimeout(),this._hasPlayedAnyItem||this.triggerReady(),this.trigger("loadstart"),this.trigger("loadeddata"),this.trigger("play"),this.trigger("playing"),this._hasPlayedAnyItem=!0,this._isMediaLoading=!1,this._getMediaSession().addUpdateListener(this._onMediaSessionStatusChanged.bind(this))}.bind(this),this._triggerErrorEvent.bind(this))}setCurrentTime(e){var t=this.duration();e>t||!this._remotePlayer.canSeek||(this._remotePlayer.currentTime=Math.min(t-1,e),this._remotePlayerController.seek(),this._triggerTimeUpdateEvent())}currentTime(){return this._hasPlayedAnyItem?this._remotePlayer.currentTime:this._initialStartTime}duration(){return this._hasPlayedAnyItem?this._remotePlayer.duration:this.videojsPlayer.duration()}ended(){var e=this._getMediaSession();
2return!(e||!this._hasMediaSessionEnded)||!!e&&e.idleReason===chrome.cast.media.IdleReason.FINISHED}volume(){return this._remotePlayer.volumeLevel}setVolume(e){this._remotePlayer.volumeLevel=e,this._remotePlayerController.setVolumeLevel(),this._triggerVolumeChangeEvent()}muted(){return this._remotePlayer.isMuted}setMuted(e){(this._remotePlayer.isMuted&&!e||!this._remotePlayer.isMuted&&e)&&this._remotePlayerController.muteOrUnmute()}poster(){return this._ui.getPoster()}setPoster(e){this._ui.updatePoster(e)}buffered(){}seekable(){return this.videojs.createTimeRange(0,this.duration())}controls(){return!1}playsinline(){return!0}supportsFullScreen(){return!0}setAutoplay(){}playbackRate(){var e=this._getMediaSession();return e?e.playbackRate:1}setPlaybackRate(){}preload(){}load(){}readyState(){return"IDLE"===this._remotePlayer.playerState||"BUFFERING"===this._remotePlayer.playerState?0:4}_listenToPlayerControllerEvents(){var e=cast.framework.RemotePlayerEventType;this._addEventListener(this._remotePlayerController,e.PLAYER_STATE_CHANGED,this._onPlayerStateChanged,this),this._addEventListener(this._remotePlayerController,e.VOLUME_LEVEL_CHANGED,this._triggerVolumeChangeEvent,this),this._addEventListener(this._remotePlayerController,e.IS_MUTED_CHANGED,this._triggerVolumeChangeEvent,this),this._addEventListener(this._remotePlayerController,e.CURRENT_TIME_CHANGED,this._triggerTimeUpdateEvent,this),this._addEventListener(this._remotePlayerController,e.DURATION_CHANGED,this._triggerDurationChangeEvent,this)}_addEventListener(e,t,i,n){var r;r={target:e,type:t,callback:i,context:n,listener:i.bind(n)},e.addEventListener(t,r.listener),this._eventListeners.push(r)}_removeAllEventListeners(){for(;this._eventListeners.length>0;)this._removeEventListener(this._eventListeners[0]);this._eventListeners=[]}_removeEventListener(e){var t,i=-1;for(e.target.removeEventListener(e.type,e.listener),t=0;t<this._eventListeners.length;t++)if(this._eventListeners[t].target===e.target&&this._eventListeners[t].type===e.type&&this._eventListeners[t].callback===e.callback&&this._eventListeners[t].context===e.context){i=t;break}-1!==i&&this._eventListeners.splice(i,1)}_onPlayerStateChanged(){var e=chrome.cast.media.PlayerState,t=this._remotePlayer.playerState;t===e.PLAYING?(this._hasPlayedCurrentItem=!0,this.trigger("play"),this.trigger("playing")):t===e.PAUSED?this.trigger("pause"):t===e.IDLE&&this.ended()||null===t&&this._hasPlayedCurrentItem?(this._hasPlayedCurrentItem=!1,this._closeSessionOnTimeout(),this.trigger("ended"),this._triggerTimeUpdateEvent()):t===e.BUFFERING&&this.trigger("waiting")}_onMediaSessionStatusChanged(e){this._hasMediaSessionEnded=!!e}_closeSessionOnTimeout(){this._clearSessionTimeout(),this._sessionTimeoutID=setTimeout(function(){var e=this._getCastSession();e&&e.endSession(!0),this._clearSessionTimeout()}.bind(this),1e4)}_clearSessionTimeout(){this._sessionTimeoutID&&(clearTimeout(this._sessionTimeoutID),this._sessionTimeoutID=!1)}_getCastContext(){return this._chromecastSessionManager.getCastContext()}_getCastSession(){return this._getCastContext().getCurrentSession()}_getMediaSession(){var e=this._getCastSession();return e?e.getMediaSession():null}_triggerVolumeChangeEvent(){this.trigger("volumechange")}_triggerTimeUpdateEvent(){this.trigger("timeupdate")}_triggerDurationChangeEvent(){this.trigger("durationchange")}_triggerErrorEvent(){this.trigger("error")}}i.canPlaySource=()=>n.isChromecastConnected(),i.isSupported=()=>n.isChromecastConnected(),e.registerTech("chromecast",i)}},8991:e=>{e.exports=class{constructor(){this._el=this._createDOMElement()}_createDOMElement(){var e=this._createElement("div","vjs-tech vjs-tech-chromecast"),t=this._createElement("div","vjs-tech-chromecast-poster"),i=this._createElement("img","vjs-tech-chromecast-poster-img"),n=this._createElement("div","vjs-tech-chromecast-title"),r=this._createElement("div","vjs-tech-chromecast-subtitle"),s=this._createElement("div","vjs-tech-chromecast-title-container");return t.appendChild(i),s.appendChild(n),s.appendChild(r),e.appendChild(s),e.appendChild(t),e}_createElement(e,t){var i=document.createElement(e);return i.className=t,i}getDOMElement(){return this._el}_findPosterEl(){return this._el.querySelector(".vjs-tech-chromecast-poster")}_findPosterImageEl(){return this._el.querySelector(".vjs-tech-chromecast-poster-img")}_findTitleEl(){return this._el.querySelector(".vjs-tech-chromecast-title")}_findSubtitleEl(){return this._el.querySelector(".vjs-tech-chromecast-subtitle")}updatePoster(e){var t=this._findPosterImageEl();this._poster=e||null,e?(t.setAttribute("src",e),t.classList.remove("vjs-tech-chromecast-poster-img-empty")):(t.removeAttribute("src"),t.classList.add("vjs-tech-chromecast-poster-img-empty"))}getPoster(){return this._poster}updateTitle(e){var t=this._findTitleEl();this._title=e,e?(t.innerHTML=e,t.classList.remove("vjs-tech-chromecast-title-empty")):t.classList.add("vjs-tech-chromecast-title-empty")}updateSubtitle(e){var t=this._findSubtitleEl();this._subtitle=e,e?(t.innerHTML=e,t.classList.remove("vjs-tech-chromecast-subtitle-empty")):t.classList.add("vjs-tech-chromecast-subtitle-empty")}}},4644:(e,t,i)=>{"use strict";var n=i(4994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.reverseBytes=t.sliceBytes=t.bytesMatch=t.concatTypedArrays=t.stringToBytes=t.bytesToString=t.numberToBytes=t.bytesToNumber=t.IS_LITTLE_ENDIAN=t.IS_BIG_ENDIAN=t.ENDIANNESS=t.toBinaryString=t.toHexString=t.toUint8=t.isTypedArray=t.isArrayBufferView=t.padStart=t.countBytes=t.countBits=void 0;var r=n(i(9840)),s=function(e){return e.toString(2).length};t.countBits=s;var a=function(e){return Math.ceil(s(e)/8)};t.countBytes=a;var o=function(e,t,i){return void 0===i&&(i=" "),(function(e,t){for(var i="";t--;)i+=e;return i}(i,t)+e.toString()).slice(-t)};t.padStart=o;var l=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer};t.isArrayBufferView=l;var u=function(e){return l(e)};t.isTypedArray=u;var d=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||u(e)||e instanceof ArrayBuffer||(e="number"!=typeof e||"number"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))};t.toUint8=d,t.toHexString=function(e){e=d(e);for(var t="",i=0;i<e.length;i++)t+=o(e[i].toString(16),2,"0");return t},t.toBinaryString=function(e){e=d(e);for(var t="",i=0;i<e.length;i++)t+=o(e[i].toString(2),8,"0");return t};var c,h,p=r.default.BigInt||Number,f=[p("0x1"),p("0x100"),p("0x10000"),p("0x1000000"),p("0x100000000"),p("0x10000000000"),p("0x1000000000000"),p("0x100000000000000"),p("0x10000000000000000")],g=(c=new Uint16Array([65484]),255===(h=new Uint8Array(c.buffer,c.byteOffset,c.byteLength))[0]?"big":204===h[0]?"little":"unknown");t.ENDIANNESS=g;var m="big"===g;t.IS_BIG_ENDIAN=m;var y="little"===g;t.IS_LITTLE_ENDIAN=y,t.bytesToNumber=function(e,t){var i=void 0===t?{}:t,n=i.signed,r=void 0!==n&&n,s=i.le,a=void 0!==s&&s;e=d(e);var o=a?"reduce":"reduceRight",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,n){var r=a?n:Math.abs(n+1-e.length);return t+p(i)*f[r]}),p(0));if(r){var u=f[e.length]/p(2)-p(1);(l=p(l))>u&&(l-=u,l-=u,l-=p(2))}return Number(l)},t.numberToBytes=function(e,t){var i=(void 0===t?{}:t).le,n=void 0!==i&&i;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0),e=p(e);for(var r=a(e),s=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=n?o:Math.abs(o+1-s.length);s[l]=Number(e/f[o]&p(255)),e<0&&(s[l]=Math.abs(~s[l]),s[l]-=0===o?1:2)}return s},t.bytesToString=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,d(e));try{return decodeURIComponent(escape(t))}catch(e){}return t},t.stringToBytes=function(e,t){if("string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i},t.concatTypedArrays=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!=typeof e})),t.length<=1)return d(t[0]);var n=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),r=new Uint8Array(n),s=0;return t.forEach((function(e){e=d(e),r.set(e,s),s+=e.byteLength})),r},t.bytesMatch=function(e,t,i){var n=void 0===i?{}:i,r=n.offset,s=void 0===r?0:r,a=n.mask,o=void 0===a?[]:a;e=d(e);var l=(t=d(t)).every?t.every:Array.prototype.every;return t.length&&e.length-s>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[s+i]:e[s+i])}))},t.sliceBytes=function(e,t,i){return Uint8Array.prototype.slice?Uint8Array.prototype.slice.call(e,t,i):new Uint8Array(Array.prototype.slice.call(e,t,i))},t.reverseBytes=function(e){return e.reverse?e.reverse():Array.prototype.reverse.call(e)}},8790:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHvcCodec=t.getAvcCodec=t.getAv1Codec=void 0;var n=i(4644);t.getAv1Codec=function(e){var t,i="",r=e[1]>>>3,s=31&e[1],a=e[2]>>>7,o=(64&e[2])>>6,l=(32&e[2])>>5,u=(16&e[2])>>4,d=(8&e[2])>>3,c=(4&e[2])>>2,h=3&e[2];return i+=r+"."+(0,n.padStart)(s,2,"0"),0===a?i+="M":1===a&&(i+="H"),t=2===r&&o?l?12:10:o?10:8,i+="."+(0,n.padStart)(t,2,"0"),(i+="."+u)+"."+d+c+h},t.getAvcCodec=function(e){return""+(0,n.toHexString)(e[1])+(0,n.toHexString)(252&e[2])+(0,n.toHexString)(e[3])},t.getHvcCodec=function(e){var t="",i=e[1]>>6,r=31&e[1],s=(32&e[1])>>5,a=e.subarray(2,6),o=e.subarray(6,12),l=e[12];1===i?t+="A":2===i?t+="B":3===i&&(t+="C"),t+=r+".";var u=parseInt((0,n.toBinaryString)(a).split("").reverse().join(""),2);u>255&&(u=parseInt((0,n.toBinaryString)(a),2)),t+=u.toString(16)+".",t+=0===s?"L":"H",t+=l;for(var d="",c=0;c<o.length;c++){var h=o[c];h&&(d&&(d+="."),d+=h.toString(16))}return d&&(t+="."+d),t}}
2,6897:(e,t,i)=>{"use strict";var n=i(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_VIDEO_CODEC=t.DEFAULT_AUDIO_CODEC=t.muxerSupportsCodec=t.browserSupportsCodec=t.getMimeForCodec=t.isTextCodec=t.isAudioCodec=t.isVideoCodec=t.codecsFromDefault=t.parseCodecs=t.mapLegacyAvcCodecs=t.translateLegacyCodecs=t.translateLegacyCodec=void 0;var r=n(i(9840)),s={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^/},a=["video","audio","text"],o=["Video","Audio","Text"],l=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,i){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})):e};t.translateLegacyCodec=l;var u=function(e){return e.map(l)};t.translateLegacyCodecs=u,t.mapLegacyAvcCodecs=function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e){return u([e])[0]}))};var d=function(e){void 0===e&&(e="");var t=e.split(","),i=[];return t.forEach((function(e){var t;e=e.trim(),a.forEach((function(n){var r=s[n].exec(e.toLowerCase());if(r&&!(r.length<=1)){t=n;var a=e.substring(0,r[1].length),o=e.replace(a,"");i.push({type:a,details:o,mediaType:n})}})),t||i.push({type:e,details:"",mediaType:"unknown"})})),i};t.parseCodecs=d,t.codecsFromDefault=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var n in i){var r=i[n];if(r.default&&r.playlists)return d(r.playlists[0].attributes.CODECS)}return null},t.isVideoCodec=function(e){return void 0===e&&(e=""),s.video.test(e.trim().toLowerCase())};var c=function(e){return void 0===e&&(e=""),s.audio.test(e.trim().toLowerCase())};t.isAudioCodec=c;var h=function(e){return void 0===e&&(e=""),s.text.test(e.trim().toLowerCase())};t.isTextCodec=h;var p=function(e){if(e&&"string"==typeof e){var t=e.toLowerCase().split(",").map((function(e){return l(e.trim())})),i="video";1===t.length&&c(t[0])?i="audio":1===t.length&&h(t[0])&&(i="application");var n="mp4";return t.every((function(e){return s.mp4.test(e)}))?n="mp4":t.every((function(e){return s.webm.test(e)}))?n="webm":t.every((function(e){return s.ogg.test(e)}))&&(n="ogg"),i+"/"+n+';codecs="'+e+'"'}};t.getMimeForCodec=p,t.browserSupportsCodec=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=!1),r.default.MediaSource&&r.default.MediaSource.isTypeSupported&&r.default.MediaSource.isTypeSupported(p(e))||t&&r.default.ManagedMediaSource&&r.default.ManagedMediaSource.isTypeSupported&&r.default.ManagedMediaSource.isTypeSupported(p(e))||!1},t.muxerSupportsCodec=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<o.length;t++)if(s["muxer"+o[t]].test(e))return!0;return!1}))},t.DEFAULT_AUDIO_CODEC="mp4a.40.2",t.DEFAULT_VIDEO_CODEC="avc1.4d400d"},8134:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isLikelyFmp4MediaSegment=t.detectContainerForBytes=t.isLikely=void 0;var n=i(4644),r=i(2743),s=i(9964),a=i(3634),o=i(5127),l={webm:(0,n.toUint8)([119,101,98,109]),matroska:(0,n.toUint8)([109,97,116,114,111,115,107,97]),flac:(0,n.toUint8)([102,76,97,67]),ogg:(0,n.toUint8)([79,103,103,83]),ac3:(0,n.toUint8)([11,119]),riff:(0,n.toUint8)([82,73,70,70]),avi:(0,n.toUint8)([65,86,73]),wav:(0,n.toUint8)([87,65,86,69]),"3gp":(0,n.toUint8)([102,116,121,112,51,103]),mp4:(0,n.toUint8)([102,116,121,112]),fmp4:(0,n.toUint8)([115,116,121,112]),mov:(0,n.toUint8)([102,116,121,112,113,116]),moov:(0,n.toUint8)([109,111,111,118]),moof:(0,n.toUint8)([109,111,111,102])},u={aac:function(e){var t=(0,a.getId3Offset)(e);return(0,n.bytesMatch)(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=(0,a.getId3Offset)(e);return(0,n.bytesMatch)(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=(0,s.findEbml)(e,[s.EBML_TAGS.EBML,s.EBML_TAGS.DocType])[0];return(0,n.bytesMatch)(t,l.webm)}
2,mkv:function(e){var t=(0,s.findEbml)(e,[s.EBML_TAGS.EBML,s.EBML_TAGS.DocType])[0];return(0,n.bytesMatch)(t,l.matroska)},mp4:function(e){return!u["3gp"](e)&&!u.mov(e)&&(!(!(0,n.bytesMatch)(e,l.mp4,{offset:4})&&!(0,n.bytesMatch)(e,l.fmp4,{offset:4}))||!(!(0,n.bytesMatch)(e,l.moof,{offset:4})&&!(0,n.bytesMatch)(e,l.moov,{offset:4}))||void 0)},mov:function(e){return(0,n.bytesMatch)(e,l.mov,{offset:4})},"3gp":function(e){return(0,n.bytesMatch)(e,l["3gp"],{offset:4})},ac3:function(e){var t=(0,a.getId3Offset)(e);return(0,n.bytesMatch)(e,l.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=(0,a.getId3Offset)(e);return(0,n.bytesMatch)(e,l.flac,{offset:t})},ogg:function(e){return(0,n.bytesMatch)(e,l.ogg)},avi:function(e){return(0,n.bytesMatch)(e,l.riff)&&(0,n.bytesMatch)(e,l.avi,{offset:8})},wav:function(e){return(0,n.bytesMatch)(e,l.riff)&&(0,n.bytesMatch)(e,l.wav,{offset:8})},h264:function(e){return(0,o.findH264Nal)(e,7,3).length},h265:function(e){return(0,o.findH265Nal)(e,[32,33],3).length}},d=Object.keys(u).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);d.forEach((function(e){var t=u[e];u[e]=function(e){return t((0,n.toUint8)(e))}}));var c=u;t.isLikely=c,t.detectContainerForBytes=function(e){e=(0,n.toUint8)(e);for(var t=0;t<d.length;t++){var i=d[t];if(c[i](e))return i}return""},t.isLikelyFmp4MediaSegment=function(e){return(0,r.findBox)(e,["moof"]).length>0}},6130:(e,t,i)=>{"use strict";var n=i(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=s(e),i=new Uint8Array(t.length),n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return i};var r=n(i(9840)),s=function(e){return r.default.atob?r.default.atob(e):Buffer.from(e,"base64").toString("binary")};e.exports=t.default},9964:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseData=t.parseTracks=t.decodeBlock=t.findEbml=t.EBML_TAGS=void 0;var n=i(4644),r=i(8790),s={EBML:(0,n.toUint8)([26,69,223,163]),DocType:(0,n.toUint8)([66,130]),Segment:(0,n.toUint8)([24,83,128,103]),SegmentInfo:(0,n.toUint8)([21,73,169,102]),Tracks:(0,n.toUint8)([22,84,174,107]),Track:(0,n.toUint8)([174]),TrackNumber:(0,n.toUint8)([215]),DefaultDuration:(0,n.toUint8)([35,227,131]),TrackEntry:(0,n.toUint8)([174]),TrackType:(0,n.toUint8)([131]),FlagDefault:(0,n.toUint8)([136]),CodecID:(0,n.toUint8)([134]),CodecPrivate:(0,n.toUint8)([99,162]),VideoTrack:(0,n.toUint8)([224]),AudioTrack:(0,n.toUint8)([225]),Cluster:(0,n.toUint8)([31,67,182,117]),Timestamp:(0,n.toUint8)([231]),TimestampScale:(0,n.toUint8)([42,215,177]),BlockGroup:(0,n.toUint8)([160]),BlockDuration:(0,n.toUint8)([155]),Block:(0,n.toUint8)([161]),SimpleBlock:(0,n.toUint8)([163])};t.EBML_TAGS=s;var a=[128,64,32,16,8,4,2,1],o=function(e,t,i,r){void 0===i&&(i=!0),void 0===r&&(r=!1);var s=function(e){for(var t=1,i=0;i<a.length&&!(e&a[i]);i++)t++;return t}(e[t]),o=e.subarray(t,t+s);return i&&((o=Array.prototype.slice.call(e,t,t+s))[0]^=a[s-1]),{length:s,value:(0,n.bytesToNumber)(o,{signed:r}),bytes:o}},l=function e(t){return"string"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"==typeof t?(0,n.numberToBytes)(t):t},u=function e(t,i,r){if(r>=i.length)return i.length;var s=o(i,r,!1);if((0,n.bytesMatch)(t.bytes,s.bytes))return r;var a=o(i,r+s.length);return e(t,i,r+a.length+a.value+s.length)},d=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return l(e)})):[l(e)]}(i),t=(0,n.toUint8)(t);var r=[];if(!i.length)return r;for(var s=0;s<t.length;){var a=o(t,s,!1),d=o(t,s+a.length),c=s+a.length+d.length;127===d.value&&(d.value=u(a,t,c),d.value!==t.length&&(d.value-=c));var h=c+d.value>t.length?t.length:c+d.value,p=t.subarray(c,h);(0,n.bytesMatch)(i[0],a.bytes)&&(1===i.length?r.push(p):r=r.concat(e(p,i.slice(1)))),s+=a.length+d.length+p.length}return r};t.findEbml=d;var c=function(e,t,i,r){var a;"group"===t&&((a=d(e,[s.BlockDuration])[0])&&(a=1/i*(a=(0,n.bytesToNumber)(a))*i/1e3),e=d(e,[s.Block])[0],t="block");var l=new DataView(e.buffer,e.byteOffset,e.byteLength),u=o(e,0),c=l.getInt16(u.length,!1),h=e[u.length+2],p=e.subarray(u.length+3),f=1/i*(r+c)*i/1e3,g={duration:a,trackNumber:u.value,keyframe:"simple"===t&&h>>7==1,invisible:(8&h)>>3==1,lacing:(6&h)>>1,discardable:"simple"===t&&!(1&~h),frames:[],pts:f,dts:f,timestamp:c};if(!g.lacing)return g.frames.push(p),g;var m=p[0]+1,y=[],v=1;if(2===g.lacing)for(var _=(p.length-v)/m,b=0;b<m;b++)y.push(_);if(1===g.lacing)for(var T=0;T<m-1;T++){var S=0;do{S+=p[v],v++}while(255===p[v-1]);y.push(S)}if(3===g.lacing)for(var A=0,w=0;w<m-1;w++){var E=0===w?o(p,v):o(p,v,!0,!0);A+=E.value,y.push(A),v+=E.length}
2return y.forEach((function(e){g.frames.push(p.subarray(v,v+e)),v+=e})),g};t.decodeBlock=c;var h=function(e){e=(0,n.toUint8)(e);var t=[],i=d(e,[s.Segment,s.Tracks,s.Track]);return i.length||(i=d(e,[s.Tracks,s.Track])),i.length||(i=d(e,[s.Track])),i.length?(i.forEach((function(e){var i=d(e,s.TrackType)[0];if(i&&i.length){if(1===i[0])i="video";else if(2===i[0])i="audio";else{if(17!==i[0])return;i="subtitle"}var a={rawCodec:(0,n.bytesToString)(d(e,[s.CodecID])[0]),type:i,codecPrivate:d(e,[s.CodecPrivate])[0],number:(0,n.bytesToNumber)(d(e,[s.TrackNumber])[0]),defaultDuration:(0,n.bytesToNumber)(d(e,[s.DefaultDuration])[0]),default:d(e,[s.FlagDefault])[0],rawData:e},o="";if(/V_MPEG4\/ISO\/AVC/.test(a.rawCodec))o="avc1."+(0,r.getAvcCodec)(a.codecPrivate);else if(/V_MPEGH\/ISO\/HEVC/.test(a.rawCodec))o="hev1."+(0,r.getHvcCodec)(a.codecPrivate);else if(/V_MPEG4\/ISO\/ASP/.test(a.rawCodec))o=a.codecPrivate?"mp4v.20."+a.codecPrivate[4].toString():"mp4v.20.9";else if(/^V_THEORA/.test(a.rawCodec))o="theora";else if(/^V_VP8/.test(a.rawCodec))o="vp8";else if(/^V_VP9/.test(a.rawCodec))if(a.codecPrivate){var l=function(e){for(var t=0,i={};t<e.length;){var n,r=127&e[t],s=e[t+1];n=1===s?e[t+2]:e.subarray(t+2,t+2+s),1===r?i.profile=n:2===r?i.level=n:3===r?i.bitDepth=n:4===r?i.chromaSubsampling=n:i[r]=n,t+=2+s}return i}(a.codecPrivate),u=l.profile,c=l.level,h=l.bitDepth,p=l.chromaSubsampling;o="vp09.",o+=(0,n.padStart)(u,2,"0")+".",o+=(0,n.padStart)(c,2,"0")+".",o+=(0,n.padStart)(h,2,"0")+".",o+=""+(0,n.padStart)(p,2,"0");var f=d(e,[224,[85,176],[85,177]])[0]||[],g=d(e,[224,[85,176],[85,185]])[0]||[],m=d(e,[224,[85,176],[85,186]])[0]||[],y=d(e,[224,[85,176],[85,187]])[0]||[];(f.length||g.length||m.length||y.length)&&(o+="."+(0,n.padStart)(y[0],2,"0"),o+="."+(0,n.padStart)(m[0],2,"0"),o+="."+(0,n.padStart)(f[0],2,"0"),o+="."+(0,n.padStart)(g[0],2,"0"))}else o="vp9";else/^V_AV1/.test(a.rawCodec)?o="av01."+(0,r.getAv1Codec)(a.codecPrivate):/A_ALAC/.test(a.rawCodec)?o="alac":/A_MPEG\/L2/.test(a.rawCodec)?o="mp2":/A_MPEG\/L3/.test(a.rawCodec)?o="mp3":/^A_AAC/.test(a.rawCodec)?o=a.codecPrivate?"mp4a.40."+(a.codecPrivate[0]>>>3).toString():"mp4a.40.2":/^A_AC3/.test(a.rawCodec)?o="ac-3":/^A_PCM/.test(a.rawCodec)?o="pcm":/^A_MS\/ACM/.test(a.rawCodec)?o="speex":/^A_EAC3/.test(a.rawCodec)?o="ec-3":/^A_VORBIS/.test(a.rawCodec)?o="vorbis":/^A_FLAC/.test(a.rawCodec)?o="flac":/^A_OPUS/.test(a.rawCodec)&&(o="opus");a.codec=o,t.push(a)}})),t.sort((function(e,t){return e.number-t.number}))):t};t.parseTracks=h,t.parseData=function(e,t){var i=[],r=d(e,[s.Segment])[0],a=d(r,[s.SegmentInfo,s.TimestampScale])[0];a=a&&a.length?(0,n.bytesToNumber)(a):1e6;var o=d(r,[s.Cluster]);return t||(t=h(r)),o.forEach((function(e,t){var r=d(e,[s.SimpleBlock]).map((function(e){return{type:"simple",data:e}})),o=d(e,[s.BlockGroup]).map((function(e){return{type:"group",data:e}})),l=d(e,[s.Timestamp])[0]||0;l&&l.length&&(l=(0,n.bytesToNumber)(l)),r.concat(o).sort((function(e,t){return e.data.byteOffset-t.data.byteOffset})).forEach((function(e,t){var n=c(e.data,e.type,a,l);i.push(n)}))})),{tracks:t,blocks:i}}},3634:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getId3Offset=t.getId3Size=void 0;var n=i(4644),r=(0,n.toUint8)([73,68,51]),s=function(e,t){void 0===t&&(t=0);var i=(e=(0,n.toUint8)(e))[t+5],r=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?r+20:r+10};t.getId3Size=s,t.getId3Offset=function e(t,i){return void 0===i&&(i=0),(t=(0,n.toUint8)(t)).length-i<10||!(0,n.bytesMatch)(t,r,{offset:i})?i:e(t,i+=s(t,i))}},1273:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forEachMediaGroup=void 0,t.forEachMediaGroup=function(e,t,i){t.forEach((function(t){for(var n in e.mediaGroups[t])for(var r in e.mediaGroups[t][n]){var s=e.mediaGroups[t][n][r];i(s,t,n,r)}}))}},3996:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.simpleTypeFromSourceType=void 0;var i=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,n=/^application\/dash\+xml/i;t.simpleTypeFromSourceType=function(e){return i.test(e)?"hls":n.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},2743:(e,t,i)=>{"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.parseMediaInfo=t.parseTracks=t.addSampleDescription=t.buildFrameTable=t.findNamedBox=t.findBox=t.parseDescriptors=void 0;var n,r=i(4644),s=i(8790),a=i(5017),o=function(e){return"string"==typeof e?(0,r.stringToBytes)(e):e},l=function(e){e=(0,r.toUint8)(e);for(var t=[],i=0;e.length>i;){var s=e[i],a=0,o=0,l=e[++o];for(o++;128&l;)a=(127&l)<<7,l=e[o],o++;a+=127&l;for(var u=0;u<n.length;u++){var d=n[u],c=d.id,h=d.parser;if(s===c){t.push(h(e.subarray(o,o+a)));break}}i+=a+o}return t};t.parseDescriptors=l,n=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var i=e[t.size];t.url=(0,r.bytesToString)(e.subarray(t.size+1,t.size+1+i)),t.size+=i}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=l(e.subarray(t.size))||[],t}},{id:4,parser:function(e){return{tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:l(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var u=function e(t,i,n){void 0===n&&(n=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return o(e)})):[o(e)]}(i),t=(0,r.toUint8)(t);var s=[];if(!i.length)return s;for(var a=0;a<t.length;){var l=(t[a]<<24|t[a+1]<<16|t[a+2]<<8|t[a+3])>>>0,u=t.subarray(a+4,a+8);if(0===l)break;var d=a+l;if(d>t.length){if(n)break;d=t.length}var c=t.subarray(a+8,d);(0,r.bytesMatch)(u,i[0])&&(1===i.length?s.push(c):s.push.apply(s,e(c,i.slice(1),n))),a=d}return s};t.findBox=u;var d=function(e,t){if(!(t=o(t)).length)return e.subarray(e.length);for(var i=0;i<e.length;){if((0,r.bytesMatch)(e.subarray(i,i+t.length),t)){var n=(e[i-4]<<24|e[i-3]<<16|e[i-2]<<8|e[i-1])>>>0,s=n>1?i+n:e.byteLength;return e.subarray(i+4,s)}i++}return e.subarray(e.length)};t.findNamedBox=d;var c=function(e,t,i){void 0===t&&(t=4),void 0===i&&(i=function(e){return(0,r.bytesToNumber)(e)});var n=[];if(!e||!e.length)return n;for(var s=(0,r.bytesToNumber)(e.subarray(4,8)),a=8;s;a+=t,s--)n.push(i(e.subarray(a,a+t)));return n},h=function(e,t){for(var i=c(u(e,["stss"])[0]),n=c(u(e,["stco"])[0]),s=c(u(e,["stts"])[0],8,(function(e){return{sampleCount:(0,r.bytesToNumber)(e.subarray(0,4)),sampleDelta:(0,r.bytesToNumber)(e.subarray(4,8))}})),a=c(u(e,["stsc"])[0],12,(function(e){return{firstChunk:(0,r.bytesToNumber)(e.subarray(0,4)),samplesPerChunk:(0,r.bytesToNumber)(e.subarray(4,8)),sampleDescriptionIndex:(0,r.bytesToNumber)(e.subarray(8,12))}})),o=u(e,["stsz"])[0],l=c(o&&o.length&&o.subarray(4)||null),d=[],h=0;h<n.length;h++){for(var p=void 0,f=0;f<a.length;f++){var g=a[f];if(h+1>=g.firstChunk&&(f+1>=a.length||h+1<a[f+1].firstChunk)){p=g.samplesPerChunk;break}}for(var m=n[h],y=0;y<p;y++){var v=l[d.length],_=!i.length;i.length&&-1!==i.indexOf(d.length+1)&&(_=!0);for(var b={keyframe:_,start:m,end:m+v},T=0;T<s.length;T++){var S=s[T],A=S.sampleCount,w=S.sampleDelta;if(d.length<=A){var E=d.length?d[d.length-1].timestamp:0;b.timestamp=E+w/t*1e3,b.duration=w;break}}d.push(b),m+=v}}return d};t.buildFrameTable=h;var p=function(e,t){var i=(0,r.bytesToString)(t.subarray(0,4));if("video"===e.type?(e.info=e.info||{},e.info.width=t[28]<<8|t[29],e.info.height=t[30]<<8|t[31]):"audio"===e.type&&(e.info=e.info||{},e.info.channels=t[20]<<8|t[21],e.info.bitDepth=t[22]<<8|t[23],e.info.sampleRate=t[28]<<8|t[29]),"avc1"===i){var n=d(t,"avcC");i+="."+(0,s.getAvcCodec)(n),e.info.avcC=n}else if("hvc1"===i||"hev1"===i)i+="."+(0,s.getHvcCodec)(d(t,"hvcC"));else if("mp4a"===i||"mp4v"===i){var o=d(t,"esds"),u=l(o.subarray(4))[0],c=u&&u.descriptors.filter((function(e){return 4===e.tag}))[0];c?(i+="."+(0,r.toHexString)(c.oti),64===c.oti?i+="."+(c.descriptors[0].bytes[0]>>3).toString():32===c.oti?i+="."+c.descriptors[0].bytes[4].toString():221===c.oti&&(i="vorbis")):"audio"===e.type?i+=".40.2":i+=".20.9"}else if("av01"===i)i+="."+(0,s.getAv1Codec)(d(t,"av1C"));else if("vp09"===i){var h=d(t,"vpcC"),p=h[0],f=h[1],g=h[2]>>4,m=(15&h[2])>>1,y=(15&h[2])>>3,v=h[3],_=h[4],b=h[5];i+="."+(0,r.padStart)(p,2,"0"),i+="."+(0,r.padStart)(f,2,"0"),i+="."+(0,r.padStart)(g,2,"0"),i+="."+(0,r.padStart)(m,2,"0"),i+="."+(0,r.padStart)(v,2,"0"),i+="."+(0,r.padStart)(_,2,"0"),i+="."+(0,r.padStart)(b,2,"0"),i+="."+(0,r.padStart)(y,2,"0")}else if("theo"===i)i="theora";else if("spex"===i)i="speex";else if(".mp3"===i)i="mp4a.40.34";else if("msVo"===i)i="vorbis";else if("Opus"===i){i="opus";var T=d(t,"dOps");e.info.opus=(0,a.parseOpusHead)(T),e.info.codecDelay=65e5}else i=i.toLowerCase();e.codec=i};t.addSampleDescription=p,t.parseTracks=function(e,t){void 0===t&&(t=!0),e=(0,r.toUint8)(e);var i=u(e,["moov","trak"],!0),n=[];
2return i.forEach((function(e){var i={bytes:e},s=u(e,["mdia"])[0],a=u(s,["hdlr"])[0],o=(0,r.bytesToString)(a.subarray(8,12));i.type="soun"===o?"audio":"vide"===o?"video":o;var l=u(e,["tkhd"])[0];if(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),c=d.getUint8(0);i.number=0===c?d.getUint32(12):d.getUint32(20)}var f=u(s,["mdhd"])[0];if(f){var g=0===f[0]?12:20;i.timescale=(f[g]<<24|f[g+1]<<16|f[g+2]<<8|f[g+3])>>>0}for(var m=u(s,["minf","stbl"])[0],y=u(m,["stsd"])[0],v=(0,r.bytesToNumber)(y.subarray(4,8)),_=8;v--;){var b=(0,r.bytesToNumber)(y.subarray(_,_+4)),T=y.subarray(_+4,_+4+b);p(i,T),_+=4+b}t&&(i.frameTable=h(m,i.timescale)),n.push(i)})),n},t.parseMediaInfo=function(e){var t=u(e,["moov","mvhd"],!0)[0];if(t&&t.length){var i={};return 1===t[0]?(i.timestampScale=(0,r.bytesToNumber)(t.subarray(20,24)),i.duration=(0,r.bytesToNumber)(t.subarray(24,32))):(i.timestampScale=(0,r.bytesToNumber)(t.subarray(12,16)),i.duration=(0,r.bytesToNumber)(t.subarray(16,20))),i.bytes=t,i}}},5127:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findH265Nal=t.findH264Nal=t.findNal=t.discardEmulationPreventionBytes=t.EMULATION_PREVENTION=t.NAL_TYPE_TWO=t.NAL_TYPE_ONE=void 0;var n=i(4644),r=(0,n.toUint8)([0,0,0,1]);t.NAL_TYPE_ONE=r;var s=(0,n.toUint8)([0,0,1]);t.NAL_TYPE_TWO=s;var a=(0,n.toUint8)([0,0,3]);t.EMULATION_PREVENTION=a;var o=function(e){for(var t=[],i=1;i<e.length-2;)(0,n.bytesMatch)(e.subarray(i,i+3),a)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var r=e.length-t.length,s=new Uint8Array(r),o=0;for(i=0;i<r;o++,i++)o===t[0]&&(o++,t.shift()),s[i]=e[o];return s};t.discardEmulationPreventionBytes=o;var l=function(e,t,i,a){void 0===a&&(a=1/0),e=(0,n.toUint8)(e),i=[].concat(i);for(var l,u=0,d=0;u<e.length&&(d<a||l);){var c=void 0;if((0,n.bytesMatch)(e.subarray(u),r)?c=4:(0,n.bytesMatch)(e.subarray(u),s)&&(c=3),c){if(d++,l)return o(e.subarray(l,u));var h=void 0;"h264"===t?h=31&e[u+c]:"h265"===t&&(h=e[u+c]>>1&63),-1!==i.indexOf(h)&&(l=u+c),u+=c+("h264"===t?1:2)}else u++}return e.subarray(0,0)};t.findNal=l,t.findH264Nal=function(e,t,i){return l(e,"h264",t,i)},t.findH265Nal=function(e,t,i){return l(e,"h265",t,i)}},5017:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setOpusHead=t.parseOpusHead=t.OPUS_HEAD=void 0;var i=new Uint8Array([79,112,117,115,72,101,97,100]);t.OPUS_HEAD=i,t.parseOpusHead=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=t.getUint8(0),n=0!==i,r={version:i,channels:t.getUint8(1),preSkip:t.getUint16(2,n),sampleRate:t.getUint32(4,n),outputGain:t.getUint16(8,n),channelMappingFamily:t.getUint8(10)};if(r.channelMappingFamily>0&&e.length>10){r.streamCount=t.getUint8(11),r.twoChannelStreamCount=t.getUint8(12),r.channelMapping=[];for(var s=0;s<r.channels;s++)r.channelMapping.push(t.getUint8(13+s))}return r},t.setOpusHead=function(e){var t=e.channelMappingFamily<=0?11:12+e.channels,i=new DataView(new ArrayBuffer(t)),n=0!==e.version;return i.setUint8(0,e.version),i.setUint8(1,e.channels),i.setUint16(2,e.preSkip,n),i.setUint32(4,e.sampleRate,n),i.setUint16(8,e.outputGain,n),i.setUint8(10,e.channelMappingFamily),e.channelMappingFamily>0&&(i.setUint8(11,e.streamCount),e.channelMapping.foreach((function(e,t){i.setUint8(12+t,e)}))),new Uint8Array(i.buffer)}},244:(e,t,i)=>{"use strict";var n=i(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(i(9840));t.default=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=r.default.location&&r.default.location.href||"");var i=/^\/\//.test(e),n=!r.default.location&&!/\/\//i.test(e);e=new r.default.URL(e,r.default.location||"https://example.com");var s=new URL(t,e);return n?s.href.slice(19):i?s.href.slice(s.protocol.length):s.href},e.exports=t.default},3602:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);
2else for(var r=Array.prototype.slice.call(arguments,1),s=t.length,a=0;a<s;++a)t[a].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();t.default=i,e.exports=t.default},7495:(e,t,i)=>{"use strict";var n=i(9840);e.exports=function(e,t){return void 0===t&&(t=!1),function(i,r,s){if(i)e(i);else if(r.statusCode>=400&&r.statusCode<=599){var a=s;if(t)if(n.TextDecoder){var o=(void 0===(l=r.headers&&r.headers["content-type"])&&(l=""),l.toLowerCase().split(";").reduce((function(e,t){var i=t.split("="),n=i[0],r=i[1];return"charset"===n.trim()?r.trim():e}),"utf-8"));try{a=new TextDecoder(o).decode(s)}catch(e){}}else a=String.fromCharCode.apply(null,new Uint8Array(s));e({cause:a})}else e(null,s);var l}}},1036:(e,t,i)=>{"use strict";var n=i(9840),r=i(4634),s=i(7056),a=i(6162),o=i(8670);d.httpHandler=i(7495),d.requestInterceptorsStorage=new a,d.responseInterceptorsStorage=new a,d.retryManager=new o;var l=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var i=e.indexOf(":"),n=e.slice(0,i).trim().toLowerCase(),r=e.slice(i+1).trim();void 0===t[n]?t[n]=r:Array.isArray(t[n])?t[n].push(r):t[n]=[t[n],r]})),t):t};function u(e,t,i){var n=e;return s(t)?(i=t,"string"==typeof e&&(n={uri:e})):n=r({},t,{uri:e}),n.callback=i,n}function d(e,t,i){return c(t=u(e,t,i))}function c(e){if(void 0===e.callback)throw new Error("callback argument missing");if(e.requestType&&d.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=d.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var n=!1,r=function(t,i,r){n||(n=!0,e.callback(t,i,r))};function s(){var e=void 0;if(e=p.response?p.response:p.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(p),b)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(f),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,h||!d.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var i={headers:T.headers||{},body:T.body,responseUrl:p.responseURL,responseType:p.responseType},n=d.responseInterceptorsStorage.execute(e.requestType,i);T.body=n.body,T.headers=n.headers}return r(t,T)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=p,c(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!h){var t;clearTimeout(f),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===p.status?200:1223===p.status?204:p.status;var i=T,n=null;if(0!==t?(i={body:s(),statusCode:t,method:m,headers:{},url:g,rawRequest:p},p.getAllResponseHeaders&&(i.headers=l(p.getAllResponseHeaders()))):n=new Error("Internal XMLHttpRequest Error"),e.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:p.responseURL,responseType:p.responseType},o=d.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return r(n,i,i.body)}}var u,h,p=e.xhr||null;p||(p=e.cors||e.useXDR?new d.XDomainRequest:new d.XMLHttpRequest);var f,g=p.url=e.uri||e.url,m=p.method=e.method||"GET",y=e.body||e.data,v=p.headers=e.headers||{},_=!!e.sync,b=!1,T={body:void 0,headers:{},statusCode:0,method:m,url:g,rawRequest:p};if("json"in e&&!1!==e.json&&(b=!0,v.accept||v.Accept||(v.Accept="application/json"),"GET"!==m&&"HEAD"!==m&&(v["content-type"]||v["Content-Type"]||(v["Content-Type"]="application/json"),y=JSON.stringify(!0===e.json?y:e.json))),p.onreadystatechange=function(){4!==p.readyState||d.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},p.onload=o,p.onerror=a,p.onprogress=function(){},p.onabort=function(){h=!0,clearTimeout(e.retryTimeout)},p.ontimeout=a,p.open(m,g,!_,e.username,e.password),_||(p.withCredentials=!!e.withCredentials),!_&&e.t
vendor: 6,162 bytes, line 2
2imeout>0&&(f=setTimeout((function(){if(!h){h=!0,p.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",a(e)}}),e.timeout)),p.setRequestHeader)for(u in v)v.hasOwnProperty(u)&&p.setRequestHeader(u,v[u]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(p.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(p),p.send(y||null),p}e.exports=d,e.exports.default=d,d.XMLHttpRequest=n.XMLHttpRequest||function(){},d.XDomainRequest="withCredentials"in new d.XMLHttpRequest?d.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}(["get","put","post","patch","head","delete"],(function(e){d["delete"===e?"del":e]=function(t,i,n){return(i=u(t,i,n)).method=e.toUpperCase(),c(i)}}))},6162:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var i=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var i=e.prototype;return i.getIsEnabled=function(){return this.enabled_},i.enable=function(){this.enabled_=!0},i.disable=function(){this.enabled_=!1},i.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},i.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},i.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t)||(i.delete(t),0))},i.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},i.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},i.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},i.execute=function(e,i){for(var n,r=function(e,i){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,i){if(e){if("string"==typeof e)return t(e,i);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,i):void 0}}(e))||i&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.getForType(e));!(n=r()).done;){var s=n.value;try{i=s(i)}catch(e){}}return i},e}();e.exports=i},8670:e=>{"use strict";var t=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,n=t.maxAttempts,r=t.delayFactor,s=t.fuzzFactor,a=t.initialDelay;return new i({maxAttempts:n||this.maxAttempts_,delayFactor:r||this.delayFactor_,fuzzFactor:s||this.fuzzFactor_,initialDelay:a||this.initialDelay_})},e}(),i=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}();e.exports=t},4582:(e,t)=>{"use strict";function i(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var n=i({HTML:"text/html",isHTML:function(e){return e===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),r=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===r.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&"function"==typeof i.find)return i.find.call(e,t);for(var n=0;n<e.length;n++)if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];if(t.call(void 0,r,n,e))return r}},t.freeze=i,t.MIME_TYPE=n,t.NAMESPACE=r},5752:(e,t,i)=>{var n=i(4582),r=i(4722),s=i(6559),a=i(4466),o=r.DOMImplementation,l=n.NAMESPACE,u=a.ParseError,d=a.XMLReader;function c(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(e){this.options=e||{locator:{}}}function p(){this.cdata=!1}function f(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function g(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}
vendor: 10,914 bytes, line 2
2function m(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function y(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var i=this.options,n=new d,r=i.domBuilder||new p,a=i.errorHandler,o=i.locator,u=i.xmlns||{},h=/\/x?html?$/.test(t),f=h?s.HTML_ENTITIES:s.XML_ENTITIES;o&&r.setDocumentLocator(o),n.errorHandler=function(e,t,i){if(!e){if(t instanceof p)return t;e=t}var n={},r=e instanceof Function;function s(t){var s=e[t];!s&&r&&(s=2==e.length?function(i){e(t,i)}:e),n[t]=s&&function(e){s("[xmldom "+t+"]\t"+e+g(i))}||function(){}}return i=i||{},s("warning"),s("error"),s("fatalError"),n}(a,r,o),n.domBuilder=i.domBuilder||r,h&&(u[""]=l.HTML),u.xml=u.xml||l.XML;var m=i.normalizeLineEndings||c;return e&&"string"==typeof e?n.parse(m(e),u,f):n.errorHandler.error("invalid doc source"),r.doc},p.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,n){var r=this.doc,s=r.createElementNS(e,i||t),a=n.length;y(this,s),this.currentElement=s,this.locator&&f(this.locator,s);for(var o=0;o<a;o++){e=n.getURI(o);var l=n.getValue(o),u=(i=n.getQName(o),r.createAttributeNS(e,i));this.locator&&f(n.getLocator(o),u),u.value=u.nodeValue=l,s.setAttributeNode(u)}},endElement:function(e,t,i){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&f(this.locator,i),y(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=m.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&f(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=m.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&f(this.locator,n),y(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var n=this.doc.implementation;if(n&&n.createDocumentType){var r=n.createDocumentType(e,t,i);this.locator&&f(this.locator,r),y(this,r),this.doc.doctype=r}},warning:function(e){console.warn("[xmldom warning]\t"+e,g(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,g(this.locator))},fatalError:function(e){throw new u(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){p.prototype[e]=function(){return null}})),t.DOMParser=h},4722:(e,t,i)=>{var n=i(4582),r=n.find,s=n.NAMESPACE;function a(e){return""!==e}function o(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function l(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(a):[]}(e);return Object.keys(t.reduce(o,{}))}function u(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function d(e,t){var i=e.prototype;if(!(i instanceof t)){function n(){}n.prototype=t.prototype,u(i,n=new n),e.prototype=i=n}i.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),i.constructor=e)}var c={},h=c.ELEMENT_NODE=1,p=c.ATTRIBUTE_NODE=2,f=c.TEXT_NODE=3,g=c.CDATA_SECTION_NODE=4,m=c.ENTITY_REFERENCE_NODE=5,y=c.ENTITY_NODE=6,v=c.PROCESSING_INSTRUCTION_NODE=7,_=c.COMMENT_NODE=8,b=c.DOCUMENT_NODE=9,T=c.DOCUMENT_TYPE_NODE=10,S=c.DOCUMENT_FRAGMENT_NODE=11,A=c.NOTATION_NODE=12,w={},E={},C=(w.INDEX_SIZE_ERR=(E[1]="Index size error",1),w.DOMSTRING_SIZE_ERR=(E[2]="DOMString size error",2),w.HIERARCHY_REQUEST_ERR=(E[3]="Hierarchy request error",3)),k=(w.WRONG_DOCUMENT_ERR=(E[4]="Wrong document",4),w.INVALID_CHARACTER_ERR=(E[5]="Invalid character",5),w.NO_DATA_ALLOWED_ERR=(E[6]="No data allowed",6),w.NO_MODIFICATION_ALLOWED_ERR=(E[7]="No modification allowed",7),w.NOT_FOUND_ERR=(E[8]="Not found",8)),I=(w.NOT_SUPPORTED_ERR=(E[9]="Not supported",9),w.INUSE_ATTRIBUTE_ERR=(E[10]="Attribute in use",10));function x(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,E[e]),this.message=E[e],Error.captureStackTrace&&Error.captureStackTrace(this,x);return i.code=e,t&&(this.message=this.message+": "+t),i}function P(){}function L(e,t){this._node=e,this._refresh=t,D(this)}function D(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(ve(e,"length",i.length),!e.$$length||i.length<e.$$length)for(var n=i.length;n in e;n++)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n];u(i,e),e._inc=t}}function O(){}function M(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function R(e,t,i,n){if(n?t[M(t,n)]=i:t[t.length++]=i,e){i.ownerElement=e;var r=e.ownerDocument;r&&(n&&H(r,e,n),function(e,t,i){e&&e._inc++,i.namespaceURI===s.XMLNS&&(t._nsMap[i.prefix?i.localName:""]=i.value)}(r,e,i))}}function N(e,t,i){var n=M(t,i);if(!(n>=0))throw new x(k,new Error(e.tagName+"@"+i));for(var r=t.length-1;n<r;)t[n]=t[++n];if(t.length=r,e){var s=e.ownerDocument;s&&(H(s,e,i),i.ownerElement=null)}}function U(){}function B(){}function j(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function F(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(F(e,t))return!0}while(e=e.nextSibling)}function q(){this.ownerDocument=this}function H(e,t,i,n){e&&e._inc++,i.namespaceURI===s.XMLNS&&delete t._nsMap[i.prefix?i.localName:""]}function V(e,t,i){if(e&&e._inc){e._inc++;var n=t.childNodes;if(i)n[n.length++]=i;else{for(var r=t.firstChild,s=0;r;)n[s++]=r,r=r.nextSibling;n.length=s,delete n[n.length]}}}function $(e,t){var i=t.previousSibling,n=t.nextSibling;return i?i.nextSibling=n:e.firstChild=n,n?n.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,V(e.ownerDocument,e),t}function z(e){return e&&e.nodeType===B.DOCUMENT_TYPE_NODE}function W(e){return e&&e.nodeType===B.ELEMENT_NODE}function G(e){return e&&e.nodeType===B.TEXT_NODE}function X(e,t){var i=e.childNodes||[];if(r(i,W)||z(t))return!1;var n=r(i,z);return!(t&&n&&i.indexOf(n)>i.indexOf(t))}function Y(e,t){var i=e.childNodes||[];if(r(i,(function(e){return W(e)&&e!==t})))return!1;var n=r(i,z);return!(t&&n&&i.indexOf(n)>i.indexOf(t))}function K(e,t,i){var n=e.childNodes||[],s=t.childNodes||[];if(t.nodeType===B.DOCUMENT_FRAGMENT_NODE){var a=s.filter(W);if(a.length>1||r(s,G))throw new x(C,"More than one element or text in fragment");if(1===a.length&&!X(e,i))throw new x(C,"Element in fragment can not be inserted before doctype")}if(W(t)&&!X(e,i))throw new x(C,"Only one element can be added and only after doctype");if(z(t)){if(r(n,z))throw new x(C,"Only one doctype is allowed");var o=r(n,W);if(i&&n.indexOf(o)<n.indexOf(i))throw new x(C,"Doctype can only be inserted before an element");if(!i&&o)throw new x(C,"Doctype can not be appended since element is present")}}function Q(e,t,i){var n=e.childNodes||[],s=t.childNodes||[];if(t.nodeType===B.DOCUMENT_FRAGMENT_NODE){var a=s.filter(W);if(a.length>1||r(s,G))throw new x(C,"More than one element or text in fragment");if(1===a.length&&!Y(e,i))throw new x(C,"Element in fragment can not be inserted before doctype")}if(W(t)&&!Y(e,i))throw new x(C,"Only one element can be added and only after doctype");if(z(t)){if(r(n,(function(e){return z(e)&&e!==i})))throw new x(C,"Only one doctype is allowed");var o=r(n,W);if(i&&n.indexOf(o)<n.indexOf(i))throw new x(C,"Doctype can only be inserted before an element")}}function Z(e,t,i,n){(function(e,t,i){if(!function(e){return e&&(e.nodeType===B.DOCUMENT_NODE||e.nodeType===B.DOCUMENT_FRAGMENT_NODE||e.nodeType===B.ELEMENT_NODE)}(e))throw new x(C,"Unexpected parent node type "+e.nodeType);if(i&&i.parentNode!==e)throw new x(k,"child not in parent");if(!function(e){return e&&(W(e)||G(e)||z(e)||e.nodeType===B.DOCUMENT_FRAGMENT_NODE||e.nodeType===B.COMMENT_NODE||e.nodeType===B.PROCESSING_INSTRUCTION_NODE)}(t)||z(t)&&e.nodeType!==B.DOCUMENT_NODE)throw new x(C,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)})(e,t,i),e.nodeType===B.DOCUMENT_NODE&&(n||K)(e,t,i);var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===S){var s=t.firstChild;if(null==s)return t;var a=t.lastChild}else s=a=t;var o=i?i.previousSibling:e.lastChild;s.previousSibling=o,a.nextSibling=i,o?o.nextSibling=s:e.firstChild=s,null==i?e.lastChild=a:i.previousSibling=a;do{s.parentNode=e}while(s!==a&&(s=s.nextSibling));return V(e.ownerDocument||e,e),t.nodeType==S&&(t.firstChild=t.lastChild=null),t}function J(){this._nsMap={}}function ee(){}function te(){}function ie(){}function ne(){}function re(){}function se(){}function ae(){}function oe(){}function le(){}function ue(){}function de(){}function ce(){}function he(e,t){var i=[],n=9==this.nodeType&&this.documentElement||this,r=n.prefix,s=n.namespaceURI;if(s&&null==r&&null==(r=n.lookupPrefix(s)))var a=[{namespace:s,prefix:null}];return ge(this,i,e,t,a),i.join("")}function pe(e,t,i){var n=e.prefix||"",r=e.namespaceURI;if(!r)return!1;if("xml"===n&&r===s.XML||r===s.XMLNS)return!1;for(var a=i.length;a--;){var o=i[a];if(o.prefix===n)return o.namespace!==r}return!0}function fe(e,t,i){e.push(" ",t,'="',i.replace(/[<>&"\t\n\r]/g,j),'"')}function ge(e,t,i,n,r){if(r||(r=[]),n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case h:var a=e.attributes,o=a.length,l=e.firstChild,u=e.tagName,d=u;if(!(i=s.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var c,y=0;y<a.length;y++)if("xmlns"===a.item(y).name){c=a.item(y).value;break}if(!c)for(var A=r.length-1;A>=0;A--)if(""===(w=r[A]).prefix&&w.namespace===e.namespaceURI){c=w.namespace;break}if(c!==e.namespaceURI)for(A=r.length-1;A>=0;A--){var w;if((w=r[A]).namespace===e.namespaceURI){w.prefix&&(d=w.prefix+":"+u);break}}}t.push("<",d);for(var E=0;E<o;E++)"xmlns"==(C=a.item(E)).prefix?r.push({prefix:C.localName,namespace:C.value}):"xmlns"==C.nodeName&&r.push({prefix:"",namespace:C.value});for(E=0;E<o;E++){var C,k,I;pe(C=a.item(E),0,r)&&(fe(t,(k=C.prefix||"")?"xmlns:"+k:"xmlns",I=C.namespaceURI),r.push({prefix:k,namespace:I})),ge(C,t,i,n,r)}if(u===d&&pe(e,0,r)&&(fe(t,(k=e.prefix||"")?"xmlns:"+k:"xmlns",I=e.namespaceURI),r.push({prefix:k,namespace:I})),l||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(">"),i&&/^script$/i.test(u))for(;l;)l.data?t.push(l.data):ge(l,t,i,n,r.slice()),l=l.nextSibling;else for(;l;)ge(l,t,i,n,r.slice()),l=l.nextSibling;t.push("</",d,">")}else t.push("/>");return;case b:case S:for(l=e.firstChild;l;)ge(l,t,i,n,r.slice()),l=l.nextSibling;return;case p:return fe(t,e.name,e.value);case f:return t.push(e.data.replace(/[<&>]/g,j));
vendor: 7,166 bytes, line 2
2case g:return t.push("<![CDATA[",e.data,"]]>");case _:return t.push("\x3c!--",e.data,"--\x3e");case T:var x=e.publicId,P=e.systemId;if(t.push("<!DOCTYPE ",e.name),x)t.push(" PUBLIC ",x),P&&"."!=P&&t.push(" ",P),t.push(">");else if(P&&"."!=P)t.push(" SYSTEM ",P,">");else{var L=e.internalSubset;L&&t.push(" [",L,"]"),t.push(">")}return;case v:return t.push("<?",e.target," ",e.data,"?>");case m:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function me(e,t,i){var n;switch(t.nodeType){case h:(n=t.cloneNode(!1)).ownerDocument=e;case S:break;case p:i=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,i)for(var r=t.firstChild;r;)n.appendChild(me(e,r,i)),r=r.nextSibling;return n}function ye(e,t,i){var n=new t.constructor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var s=t[r];"object"!=typeof s&&s!=n[r]&&(n[r]=s)}switch(t.childNodes&&(n.childNodes=new P),n.ownerDocument=e,n.nodeType){case h:var a=t.attributes,o=n.attributes=new O,l=a.length;o._ownerElement=n;for(var u=0;u<l;u++)n.setAttributeNode(ye(e,a.item(u),!0));break;case p:i=!0}if(i)for(var d=t.firstChild;d;)n.appendChild(ye(e,d,i)),d=d.nextSibling;return n}function ve(e,t,i){e[t]=i}w.INVALID_STATE_ERR=(E[11]="Invalid state",11),w.SYNTAX_ERR=(E[12]="Syntax error",12),w.INVALID_MODIFICATION_ERR=(E[13]="Invalid modification",13),w.NAMESPACE_ERR=(E[14]="Invalid namespace",14),w.INVALID_ACCESS_ERR=(E[15]="Invalid access",15),x.prototype=Error.prototype,u(w,x),P.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],n=0;n<this.length;n++)ge(this[n],i,e,t);return i.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},L.prototype.item=function(e){return D(this),this[e]||null},d(L,P),O.prototype={length:0,item:P.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new x(I);var i=this.getNamedItem(e.nodeName);return R(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new x(I);return t=this.getNamedItemNS(e.namespaceURI,e.localName),R(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return N(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return N(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var n=this[i];if(n.localName==t&&n.namespaceURI==e)return n}return null}},U.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var n=new q;if(n.implementation=this,n.childNodes=new P,n.doctype=i||null,i&&n.appendChild(i),t){var r=n.createElementNS(e,t);n.appendChild(r)}return n},createDocumentType:function(e,t,i){var n=new se;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=i||"",n}},B.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(e,t){return Z(this,e,t)},replaceChild:function(e,t){Z(this,e,t,Q),t&&this.removeChild(t)},removeChild:function(e){return $(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return ye(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==f&&e.nodeType==f?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&i[n]===e)return n;t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},u(c,B),u(c,B.prototype),q.prototype={nodeName:"#document",nodeType:b,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==S){for(var i=e.firstChild;i;){var n=i.nextSibling;this.insertBefore(i,t),i=n}return e}return Z(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===h&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),$(this,e)},replaceChild:function(e,t){Z(this,e,t,Q),e.ownerDocument=this,t&&this.removeChild(t),W(e)&&(this.documentElement=e)},importNode:function(e,t){return me(this,e,t)},getElementById:function(e){var t=null;return F(this.documentElement,(function(i){if(i.nodeType==h&&i.getAttribute("id")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=l(e);return new L(this,(function(i){var n=[];return t.length>0&&F(i.documentElement,(function(r){if(r!==i&&r.nodeType===h){var s=r.getAttribute("class");if(s){var a=e===s;if(!a){var o=l(s);a=t.every((u=o,function(e){return u&&-1!==u.indexOf(e)}))}a&&n.push(r)}}var u})),n}))},createElement:function(e){var t=new J;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new P,(t.attributes=new O)._ownerElement=t,t},createDocumentFragment:function(){var e=new ue;return e.ownerDocument=this,e.childNodes=new P,e},createTextNode:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ne;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new de;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new ee;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new J,n=t.split(":"),r=i.attributes=new O;return i.childNodes=new P,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,r._ownerElement=i,i},createAttributeNS:function(e,t){var i=new ee,n=t.split(":");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,i}},d(q,B),J.prototype={nodeType:h,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)}
vendor: 3,645 bytes, line 2
2,appendChild:function(e){return e.nodeType===S?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,V(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||""},setAttributeNS:function(e,t,i){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+i,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new L(this,(function(t){var i=[];return F(t,(function(n){n===t||n.nodeType!=h||"*"!==e&&n.tagName!=e||i.push(n)})),i}))},getElementsByTagNameNS:function(e,t){return new L(this,(function(i){var n=[];return F(i,(function(r){r===i||r.nodeType!==h||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||n.push(r)})),n}))}},q.prototype.getElementsByTagName=J.prototype.getElementsByTagName,q.prototype.getElementsByTagNameNS=J.prototype.getElementsByTagNameNS,d(J,B),ee.prototype.nodeType=p,d(ee,B),te.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(E[C])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},d(te,B),ie.prototype={nodeName:"#text",nodeType:f,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},d(ie,te),ne.prototype={nodeName:"#comment",nodeType:_},d(ne,te),re.prototype={nodeName:"#cdata-section",nodeType:g},d(re,te),se.prototype.nodeType=T,d(se,B),ae.prototype.nodeType=A,d(ae,B),oe.prototype.nodeType=y,d(oe,B),le.prototype.nodeType=m,d(le,B),ue.prototype.nodeName="#document-fragment",ue.prototype.nodeType=S,d(ue,B),de.prototype.nodeType=v,d(de,B),ce.prototype.serializeToString=function(e,t,i){return he.call(e,t,i)},B.prototype.toString=he;try{if(Object.defineProperty){function _e(e){switch(e.nodeType){case h:case S:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(_e(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(L.prototype,"length",{get:function(){return D(this),this.$$length}}),Object.defineProperty(B.prototype,"textContent",{get:function(){return _e(this)},set:function(e){switch(this.nodeType){case h:case S:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ve=function(e,t,i){e["$$"+t]=i}}}catch(be){}t.DocumentType=se,t.DOMException=x,t.DOMImplementation=U,t.Element=J,t.Node=B,t.NodeList=P,t.XMLSerializer=ce},6559:(e,t,i)=>{"use strict";var n=i(4582).freeze;t.XML_ENTITIES=n({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=n
vendor: 28,727 bytes, line 2
2({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),
2t.entityMap=t.HTML_ENTITIES},8978:(e,t,i)=>{var n=i(4722);
vendor: 5,144 bytes, line 2
2t.DOMImplementation=n.DOMImplementation,t.XMLSerializer=n.XMLSerializer,t.DOMParser=i(5752).DOMParser},4466:(e,t,i)=>{var n=i(4582).NAMESPACE,r=/[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]/,s=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+r.source+s.source+"*(?::"+r.source+s.source+"*)?$");function o(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,o)}function l(){}function u(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function d(e,t,i,r,s,a){function o(e,t,n){i.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),i.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,s),n)}for(var l,u=++t,d=0;;){var c=e.charAt(u);switch(c){case"=":if(1===d)l=e.slice(t,u),d=3;else{if(2!==d)throw new Error("attribute equal must after attrName");d=3}break;case"'":case'"':if(3===d||1===d){if(1===d&&(a.warning('attribute value must after "="'),l=e.slice(t,u)),t=u+1,!((u=e.indexOf(c,t))>0))throw new Error("attribute value no end '"+c+"' match");o(l,h=e.slice(t,u),t-1),d=5}else{if(4!=d)throw new Error('attribute value must after "="');o(l,h=e.slice(t,u),t),a.warning('attribute "'+l+'" missed start quot('+c+")!!"),t=u+1,d=5}break;case"/":switch(d){case 0:i.setTagName(e.slice(t,u));case 5:case 6:case 7:d=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==d&&i.setTagName(e.slice(t,u)),u;case">":switch(d){case 0:i.setTagName(e.slice(t,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(h=e.slice(t,u)).slice(-1)&&(i.closed=!0,h=h.slice(0,-1));case 2:2===d&&(h=l),4==d?(a.warning('attribute "'+h+'" missed quot(")!'),o(l,h,t)):(n.isHTML(r[""])&&h.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),o(h,h,t));break;case 3:throw new Error("attribute value missed!!")}return u;case"€":c=" ";default:if(c<=" ")switch(d){case 0:i.setTagName(e.slice(t,u)),d=6;break;case 1:l=e.slice(t,u),d=2;break;case 4:var h=e.slice(t,u);a.warning('attribute "'+h+'" missed quot(")!!'),o(l,h,t);case 5:d=6}else switch(d){case 2:i.tagName,n.isHTML(r[""])&&l.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,t),t=u,d=1;break;case 5:a.warning('attribute space is required"'+l+'"!!');case 6:d=1,t=u;break;case 3:d=4,t=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function c(e,t,i){for(var r=e.tagName,s=null,a=e.length;a--;){var o=e[a],l=o.qName,u=o.value;if((p=l.indexOf(":"))>0)var d=o.prefix=l.slice(0,p),c=l.slice(p+1),h="xmlns"===d&&c;else c=l,d=null,h="xmlns"===l&&"";o.localName=c,!1!==h&&(null==s&&(s={},f(i,i={})),i[h]=s[h]=u,o.uri=n.XMLNS,t.startPrefixMapping(h,u))}for(a=e.length;a--;)(d=(o=e[a]).prefix)&&("xml"===d&&(o.uri=n.XML),"xmlns"!==d&&(o.uri=i[d||""]));var p;(p=r.indexOf(":"))>0?(d=e.prefix=r.slice(0,p),c=e.localName=r.slice(p+1)):(d=null,c=e.localName=r);var g=e.uri=i[d||""];if(t.startElement(g,c,r,e),!e.closed)return e.currentNSMap=i,e.localNSMap=s,!0;if(t.endElement(g,c,r),s)for(d in s)Object.prototype.hasOwnProperty.call(s,d)&&t.endPrefixMapping(d)}function h(e,t,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var s=e.indexOf("</"+i+">",t),a=e.substring(t+1,s);if(/[&<]/.test(a))return/^script$/i.test(i)?(r.characters(a,0,a.length),s):(a=a.replace(/&#?\w+;/g,n),r.characters(a,0,a.length),s)}return t+1}function p(e,t,i,n){var r=n[i];return null==r&&((r=e.lastIndexOf("</"+i+">"))<t&&(r=e.lastIndexOf("</"+i)),n[i]=r),r<t}function f(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function g(e,t,i,n){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(r=e.indexOf("--\x3e",t+4))>t?(i.comment(e,t+4,r-t-4),r+3):(n.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var r=e.indexOf("]]>",t+9);return i.startCDATA(),i.characters(e,t+9,r-t-9),i.endCDATA(),r+3}var s=function(e,t){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(r.lastIndex=t,r.exec(e);i=r.exec(e);)if(n.push(i),i[1])return n}(e,t),a=s.length;if(a>1&&/!doctype/i.test(s[0][0])){var o=s[1][0],l=!1,u=!1;a>3&&(/^public$/i.test(s[2][0])?(l=s[3][0],u=a>4&&s[4][0]):/^system$/i.test(s[2][0])&&(u=s[3][0]));var d=s[a-1];return i.startDTD(o,l,u),i.endDTD(),d.index+d[0].length}return-1}function m(e,t,i){var n=e.indexOf("?>",t);if(n){var r=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return r?(r[0].length,i.processingInstruction(r[1],r[2]),n+2):-1}return-1}function y(){this.attributeNames={}}o.prototype=new Error,o.prototype.name=o.name,l.prototype={parse:function(e,t,i){var r=this.domBuilder;r.startDocument(),f(t,t={}),function(e,t,i,r,s){function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}
2(parseInt(t.substr(1).replace("x","0x"))):(s.error("entity not found:"+e),e)}function l(t){if(t>w){var i=e.substring(w,t).replace(/&#?\w+;/g,a);T&&f(w),r.characters(i,0,t-w),w=t}}function f(t,i){for(;t>=_&&(i=b.exec(e));)v=i.index,_=v+i[0].length,T.lineNumber++;T.columnNumber=t-v+1}for(var v=0,_=0,b=/.*(?:\r\n?|\n)|.*$/g,T=r.locator,S=[{currentNSMap:t}],A={},w=0;;){try{var E=e.indexOf("<",w);if(E<0){if(!e.substr(w).match(/^\s*$/)){var C=r.doc,k=C.createTextNode(e.substr(w));C.appendChild(k),r.currentElement=k}return}switch(E>w&&l(E),e.charAt(E+1)){case"/":var I=e.indexOf(">",E+3),x=e.substring(E+2,I).replace(/[ \t\n\r]+$/g,""),P=S.pop();I<0?(x=e.substring(E+2).replace(/[\s<].*/,""),s.error("end tag name: "+x+" is not complete:"+P.tagName),I=E+1+x.length):x.match(/\s</)&&(x=x.replace(/[\s<].*/,""),s.error("end tag name: "+x+" maybe not complete"),I=E+1+x.length);var L=P.localNSMap,D=P.tagName==x;if(D||P.tagName&&P.tagName.toLowerCase()==x.toLowerCase()){if(r.endElement(P.uri,P.localName,x),L)for(var O in L)Object.prototype.hasOwnProperty.call(L,O)&&r.endPrefixMapping(O);D||s.fatalError("end tag name: "+x+" is not match the current start tagName:"+P.tagName)}else S.push(P);I++;break;case"?":T&&f(E),I=m(e,E,r);break;case"!":T&&f(E),I=g(e,E,r,s);break;default:T&&f(E);var M=new y,R=S[S.length-1].currentNSMap,N=(I=d(e,E,M,R,a,s),M.length);if(!M.closed&&p(e,I,M.tagName,A)&&(M.closed=!0,i.nbsp||s.warning("unclosed xml attribute")),T&&N){for(var U=u(T,{}),B=0;B<N;B++){var j=M[B];f(j.offset),j.locator=u(T,{})}r.locator=U,c(M,r,R)&&S.push(M),r.locator=T}else c(M,r,R)&&S.push(M);n.isHTML(M.uri)&&!M.closed?I=h(e,I,M.tagName,a,r):I++}}catch(e){if(e instanceof o)throw e;s.error("element parse error: "+e),I=-1}I>w?w=I:l(Math.max(E,w)+1)}}(e,t,i,r,this.errorHandler),r.endDocument()}},y.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,i){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=l,t.ParseError=o},9422:e=>{class t{constructor(e){this.player=e,this._sessionListener=this._onSessionStateChange.bind(this),this._castListener=this._onCastStateChange.bind(this),this._addCastContextEventListeners(),this.player.on("dispose",this._removeCastContextEventListeners.bind(this)),this._notifyPlayerOfDevicesAvailabilityChange(this.getCastContext().getCastState()),this.remotePlayer=new cast.framework.RemotePlayer,this.remotePlayerController=new cast.framework.RemotePlayerController(this.remotePlayer)}_addCastContextEventListeners(){var e=cast.framework.CastContextEventType.SESSION_STATE_CHANGED,t=cast.framework.CastContextEventType.CAST_STATE_CHANGED;this.getCastContext().addEventListener(e,this._sessionListener),this.getCastContext().addEventListener(t,this._castListener)}_removeCastContextEventListeners(){var e=cast.framework.CastContextEventType.SESSION_STATE_CHANGED,t=cast.framework.CastContextEventType.CAST_STATE_CHANGED;this.getCastContext().removeEventListener(e,this._sessionListener),this.getCastContext().removeEventListener(t,this._castListener)}_onSessionStateChange(e){e.sessionState===cast.framework.SessionState.SESSION_ENDED&&(this.player.trigger("chromecastDisconnected"),this._reloadTech())}_onCastStateChange(e){this._notifyPlayerOfDevicesAvailabilityChange(e.castState)}_notifyPlayerOfDevicesAvailabilityChange(e){this.hasAvailableDevices(e)?this.player.trigger("chromecastDevicesAvailable"):this.player.trigger("chromecastDevicesUnavailable")}hasAvailableDevices(e){return(e=e||this.getCastContext().getCastState())===cast.framework.CastState.NOT_CONNECTED||e===cast.framework.CastState.CONNECTING||e===cast.framework.CastState.CONNECTED}openCastMenu(){var e;this.player.currentSource()&&(e=function(){t.hasConnected=!0,this.player.trigger("chromecastConnected"),this._reloadTech()}.bind(this),this.getCastContext().requestSession().then(e,(function(){})))}_reloadTech(){var e=this.player,t=e.currentTime(),i=e.paused(),n=e.currentSources();e.src(n),e.ready((function(){i?e.pause():e.play(),e.currentTime(t||0)}))}getCastContext(){return cast.framework.CastContext.getInstance()}getRemotePlayer(){return this.remotePlayer}getRemotePlayerController(){return this.remotePlayerController}static isChromecastAPIAvailable(){return window.chrome&&window.chrome.cast&&window.cast}static isChromecastConnected(){return t.isChromecastAPIAvailable()&&cast.framework.CastContext.getInstance().getCastState()===cast.framework.CastState.CONNECTED&&t.hasConnected}}t.hasConnected=!1,e.exports=t},9496:(e,t,i)=>{"use strict";
2var n=i(4686),r=i.n(n),s=i(8228),a=i.n(s),o=i(2543);a().registerHandler("Tracking",class{constructor(e,t){r().applyLogging(this,"Tracking"),this.logDebug("options:",t),this.options={appname:"FanTV",heartbeatInterval:3e4,videoStatsUrl:"/video-stats",token:null,...t},this.element=e,this.initialize()}initialize(){window.dataLayer=window.dataLayer||[],a().whenFired("Tracking::TRACK_GOOGLE_EVENT",(e=>{this.trackAsGaEvent(e)})),a().whenFired("Tracking::SET_CONFIG",(e=>{this.options={...this.options,...e},this.initializePlayerEventListeners()}))}initializePlayerEventListeners(){a().whenFired("Player::DATA_LOADED",(e=>{this.currVideo=e,e.trackingEnabled&&this.trackEvent({category:"Videos",videoId:e.videoId,action:"LOADED",label:this.getVideoLabel()})})),a().whenFired("Player::STARTED",(e=>{this.currVideo=e,e.trackingEnabled&&(this.startHeartbeat(),this.firstQuartileEventTracked=!1,this.firstQuartileTime=e.duration*(1/4),this.midpointEventTracked=!1,this.midpointTime=.5*e.duration,this.thirdQuartileEventTracked=!1,this.thirdQuartileTime=e.duration*(3/4),this.trackEvent({category:"Videos",videoId:e.videoId,action:"START",label:this.getVideoLabel()}))})),a().whenFired("Player::PLAY",(e=>{e.trackingEnabled&&(this.startHeartbeat(),this.trackEvent({category:"Videos",videoId:this.currVideo.videoId,action:"PLAY",label:this.getVideoLabel()}))})),a().whenFired("Player::PAUSED",(e=>{e.trackingEnabled&&(this.stopHeartbeat(),this.trackEvent({category:"Videos",videoId:this.currVideo.videoId,action:"PAUSE",label:this.getVideoLabel()}))})),a().whenFired("Player::TIMEUPDATE",(e=>{const{currVideo:t}=this;if(!e.trackingEnabled||!t||0===t.duration||t.duration===1/0)return;let i;if(this.currentTime=e.currentTime,!this.firstQuartileEventTracked&&e.currentTime>=this.firstQuartileTime)this.firstQuartileEventTracked=!0,i="FIRST_QUARTER_WATCHED";else if(!this.midpointEventTracked&&e.currentTime>=this.midpointTime)this.midpointEventTracked=!0,i="HALF_WATCHED";else{if(this.thirdQuartileEventTracked||!(e.currentTime>=this.thirdQuartileTime))return;this.thirdQuartileEventTracked=!0,i="THIRD_QUARTER_WATCHED"}this.trackEvent({category:"Videos",action:i,label:this.getVideoLabel(),videoId:this.currVideo.videoId,value:parseInt(e.currentTime,10)})}));const e=(0,o.debounce)((e=>{this.currVideo.trackingEnabled&&this.trackEvent({category:"Videos",action:"SEEK",videoId:this.currVideo.videoId,label:this.getVideoLabel(),value:e.seekTo})}),2e3);a().whenFired("Player::SEEK",e),a().whenFired("Player::ENDED",(e=>{e.trackingEnabled&&(this.stopHeartbeat(),this.trackEvent({category:"Videos",action:"END",label:this.getVideoLabel(),videoId:this.currVideo.videoId}))}))}getVideoLabel(){return`${this.currVideo.title} || ${this.currVideo.videoId} || ${this.currVideo.segmentId} || ${this.currVideo.categoryTitle} || ${this.currVideo.publishDate} || ${this.currVideo.accessLevel}`}startHeartbeat(){const e=this.getVideoLabel();this.heartbeat=window.setInterval((()=>{this.trackEvent({category:"Videos",action:"PLAYING",label:e,value:this.currentTime})}),this.options.heartbeatInterval)}stopHeartbeat(){clearInterval(this.heartbeat)}trackEvent(e){this.trackAsGaEvent(e),this.trackAsVideoStat(e)}trackAsVideoStat(e){const t={START:"START",PAUSE:"PAUSE",PLAY:"PLAY",SEEK:"SEEK",FIRST_QUARTER_WATCHED:"FIRST_QUARTER_WATCHED",HALF_WATCHED:"HALF_WATCHED",THIRD_QUARTER_WATCHED:"THIRD_QUARTER_WATCHED",END:"END"},{action:i,videoId:n}=e;if(!(0,o.includes)(Object.keys(t),i))return;const r={eventType:t[i],videoId:n};this.postVideoStats(r)}postVideoStats(e){return this.currVideo.trackingEnabled&&this.currVideo.statsToken?fetch(this.options.videoStatsUrl,{credentials:"include",method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest","x-token":this.currVideo.statsToken}}).then((e=>e.json())).catch((e=>console.error(e))):Promise.resolve()}trackAsGaEvent(e){const t=e.label||"None",i={LOADED:"fohlentv_view",START:"fohlentv_click",PAUSE:"PAUSE",PLAY:"PLAY",SEEK:"SEEK",FIRST_QUARTER_WATCHED:"FIRST_QUARTER_WATCHED",HALF_WATCHED:"HALF_WATCHED",THIRD_QUARTER_WATCHED:"THIRD_QUART
2ER_WATCHED",END:"END"};if(!(0,o.includes)(Object.keys(i),e.action))return;const n=i[e.action];if(window.gtag){const i={fohlentv_title:this.currVideo.title,fohlentv_accessLevel:this.currVideo.accessLevel,fohlentv_category:this.currVideo.categoryTitle,fohlentv_startDate:this.currVideo.startDate,fohlentv_description:this.currVideo.description,fohlentv_videoId:this.currVideo.videoId,fohlentv_page:document.title,fohlentv_page_url:document.URL,fohlentv_platform:"FohlenTV",event_category:e.category,event_label:t};Number.isNaN(Number(this.currVideo.duration))||(i.fohlentv_duration=this.currVideo.duration),void 0!==e.value?window.gtag("event",n,{...i,value:e.value}):window.gtag("event",n,{...i})}else{const i={event:"gaEvent",event_category:e.category,event_action:n,event_label:t};void 0!==e.value&&(i.value=e.value),window.dataLayer.push(i)}}})},3003:e=>{e.exports=function(e,t,i,n){t=t||function(e){return null==e?"":String(e).replace(s,a)};var r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},s=/[&<>'"]/g;function a(e){return r[e]||e}var o="";function l(e){null!=e&&(o+=e)}if(l('<div class="error-container">\n    <div class="error-wrapper">\n    '),e.error.title&&(l('\n        <h3 class="title">'),l(t(e.error.title)),l("</h3>\n    ")),l('\n        <p class="message">'),l(t(e.error.message||"Error")),l("</p>\n\n    "),e.error.buttons&&e.error.buttons.length){l('\n        <div class="button-wrapper">\n        ');for(var u=0;u<e.error.buttons.length;u++)l('\n            <a class="b-btn is-primary btn js-btn '),l(t(e.error.buttons[u].class||"")),l('" href="'),e.error.buttons[u].url?l(t(e.error.buttons[u].url)):l("#"),l('"><span class="btn-inner">'),l(t(e.error.buttons[u].label)),l("</span></a>\n        ");l("\n        </div>\n    ")}return l("\n    </div>\n</div>\n"),o}},6978:e=>{e.exports=function(e,t,i,n){t=t||function(e){return null==e?"":String(e).replace(s,a)};var r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},s=/[&<>'"]/g;function a(e){return r[e]||e}var o="";function l(e){null!=e&&(o+=e)}return l('<div class="b-player-error-screen jsb_ jsb_ErrorScreen" data-jsb=\'{"playerId":"'),l(t(e.playerId)),l('", "errorMessages" :'),l(JSON.stringify(e.errorMessages)),l("}'></div>\n"),o}},9697:(e,t,i)=>{var n,r=void 0!==i.g?i.g:"undefined"!=typeof window?window:{},s=i(542);"undefined"!=typeof document?n=document:(n=r["__GLOBAL_DOCUMENT_CACHE@4"])||(n=r["__GLOBAL_DOCUMENT_CACHE@4"]=s),e.exports=n},9840:(e,t,i)=>{var n;n="undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},e.exports=n},7056:e=>{e.exports=function(e){if(!e)return!1;var i=t.call(e);return"[object Function]"===i||"function"==typeof e&&"[object RegExp]"!==i||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},2543:function(e,t,i){var n;e=i.nmd(e),function(){var r,s="Expected a function",a="__lodash_hash_undefined__",o="__lodash_placeholder__",l=32,u=128,d=1/0,c=9007199254740991,h=NaN,p=4294967295,f=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",y="[object Boolean]",v="[object Date]",_="[object Error]",b="[object Function]",T="[object GeneratorFunction]",S="[object Map]",A="[object Number]",w="[object Object]",E="[object Promise]",C="[object RegExp]",k="[object Set]",I="[object String]",x="[object Symbol]",P="[object WeakMap]",L="[object ArrayBuffer]",D="[object DataView]",O="[object Float32Array]",M="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",U="[object Int32Array]",B="[object Uint8Array]",j="[object Uint8ClampedArray]",F="[object Uint16Array]",q="[object Uint32Array]",H=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,G=RegExp(z.source),X=RegExp(W.source),Y=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(te.source),ne=/^\s+/,re=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,oe=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 8,785 bytes, line 2
27f]/g,_e=/($^)/,be=/['\n\r\u2028\u2029\\]/g,Te="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ae="\\u2700-\\u27bf",we="a-z\\xdf-\\xf6\\xf8-\\xff",Ee="A-Z\\xc0-\\xd6\\xd8-\\xde",Ce="\\ufe0e\\ufe0f",ke="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="["+Te+"]",xe="["+ke+"]",Pe="["+Se+"]",Le="\\d+",De="["+Ae+"]",Oe="["+we+"]",Me="[^"+Te+ke+Le+Ae+we+Ee+"]",Re="\\ud83c[\\udffb-\\udfff]",Ne="[^"+Te+"]",Ue="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+Ee+"]",Fe="\\u200d",qe="(?:"+Oe+"|"+Me+")",He="(?:"+je+"|"+Me+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",$e="(?:['’](?:D|LL|M|RE|S|T|VE))?",ze="(?:"+Pe+"|"+Re+")?",We="["+Ce+"]?",Ge=We+ze+"(?:"+Fe+"(?:"+[Ne,Ue,Be].join("|")+")"+We+ze+")*",Xe="(?:"+[De,Ue,Be].join("|")+")"+Ge,Ye="(?:"+[Ne+Pe+"?",Pe,Ue,Be,Ie].join("|")+")",Ke=RegExp("['’]","g"),Qe=RegExp(Pe,"g"),Ze=RegExp(Re+"(?="+Re+")|"+Ye+Ge,"g"),Je=RegExp([je+"?"+Oe+"+"+Ve+"(?="+[xe,je,"$"].join("|")+")",He+"+"+$e+"(?="+[xe,je+qe,"$"].join("|")+")",je+"?"+qe+"+"+Ve,je+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Le,Xe].join("|"),"g"),et=RegExp("["+Fe+Te+Se+Ce+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,rt={};rt[O]=rt[M]=rt[R]=rt[N]=rt[U]=rt[B]=rt[j]=rt[F]=rt[q]=!0,rt[g]=rt[m]=rt[L]=rt[y]=rt[D]=rt[v]=rt[_]=rt[b]=rt[S]=rt[A]=rt[w]=rt[C]=rt[k]=rt[I]=rt[P]=!1;var st={};st[g]=st[m]=st[L]=st[D]=st[y]=st[v]=st[O]=st[M]=st[R]=st[N]=st[U]=st[S]=st[A]=st[w]=st[C]=st[k]=st[I]=st[x]=st[B]=st[j]=st[F]=st[q]=!0,st[_]=st[b]=st[P]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ot=parseFloat,lt=parseInt,ut="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,dt="object"==typeof self&&self&&self.Object===Object&&self,ct=ut||dt||Function("return this")(),ht=t&&!t.nodeType&&t,pt=ht&&e&&!e.nodeType&&e,ft=pt&&pt.exports===ht,gt=ft&&ut.process,mt=function(){try{return pt&&pt.require&&pt.require("util").types||gt&&gt.binding&&gt.binding("util")}catch(e){}}(),yt=mt&&mt.isArrayBuffer,vt=mt&&mt.isDate,_t=mt&&mt.isMap,bt=mt&&mt.isRegExp,Tt=mt&&mt.isSet,St=mt&&mt.isTypedArray;function At(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function wt(e,t,i,n){for(var r=-1,s=null==e?0:e.length;++r<s;){var a=e[r];t(n,a,i(a),e)}return n}function Et(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e}function Ct(e,t){for(var i=null==e?0:e.length;i--&&!1!==t(e[i],i,e););return e}function kt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(!t(e[i],i,e))return!1;return!0}function It(e,t){for(var i=-1,n=null==e?0:e.length,r=0,s=[];++i<n;){var a=e[i];t(a,i,e)&&(s[r++]=a)}return s}function xt(e,t){return!(null==e||!e.length)&&jt(e,t,0)>-1}function Pt(e,t,i){for(var n=-1,r=null==e?0:e.length;++n<r;)if(i(t,e[n]))return!0;return!1}function Lt(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r}function Dt(e,t){for(var i=-1,n=t.length,r=e.length;++i<n;)e[r+i]=t[i];return e}function Ot(e,t,i,n){var r=-1,s=null==e?0:e.length;for(n&&s&&(i=e[++r]);++r<s;)i=t(i,e[r],r,e);return i}function Mt(e,t,i,n){var r=null==e?0:e.length;for(n&&r&&(i=e[--r]);r--;)i=t(i,e[r],r,e);return i}function Rt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}var Nt=Vt("length");function Ut(e,t,i){var n;return i(e,(function(e,i,r){if(t(e,i,r))return n=i,!1})),n}function Bt(e,t,i,n){for(var r=e.length,s=i+(n?1:-1);n?s--:++s<r;)if(t(e[s],s,e))return s;return-1}function jt(e,t,i){return t==t?function(e,t,i){for(var n=i-1,r=e.length;++n<r;)if(e[n]===t)return n;return-1}(e,t,i):Bt(e,qt,i)}function Ft(e,t,i,n){for(var r=i-1,s=e.length;++r<s;)if(n(e[r],t))return r;return-1}function qt(e){return e!=e}function Ht(e,t){var i=null==e?0:e.length;return i?Wt(e,t)/i:h}function Vt(e){return function(t){return null==t?r:t[e]}}function $t(e){return function(t){return null==e?r:e[t]}}function zt(e,t,i,n,r){return r(e,(function(e,r,s){i=n?(n=!1,e):t(i,e,r,s)})),i}function Wt(e,t){for(var i,n=-1,s=e.length;++n<s;){var a=t(e[n]);a!==r&&(i=i===r?a:i+a)}return i}function Gt(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}function Xt(e){return e?e.slice(0,ci(e)+1).replace(ne,""):e}function Yt(e){return function(t){return e(t)}}function Kt(e,t){return Lt(t,(function(t){return e[t]}))}function Qt(e,t){return e.has(t)}function Zt(e,t){for(var i=-1,n=e.length;++i<n&&jt(t,e[i],0)>-1;);return i}function Jt(e,t){for(var i=e.length;i--&&jt(t,e[i],0)>-1;);return i}var ei=$t({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),ti=$t({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function ii(e){return"\\"+at[e]}function ni(e){return et.test(e)}function ri(e){var t=-1,i=Array(e.size);return e.forEach((function(e,n){i[++t]=[n,e]})),i}function si(e,t){return function(i){return e(t(i))}}function ai(e,t){for(var i=-1,n=e.length,r=0,s=[];++i<n;){var a=e[i];a!==t&&a!==o||(e[i]=o,s[r++]=i)}return s}function oi(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i}function li(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=[e,e]})),i}function ui(e){return ni(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Nt(e)}function di(e){return ni(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function ci(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var hi=$t({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),pi=function e(t){var i,n=(t=null==t?ct:pi.defaults(ct.Object(),t,pi.pick(ct,it))).Array,re=t.Date,Te=t.Error,Se=t.Function,Ae=t.Math,we=t.Object,Ee=t.RegExp,Ce=t.String,ke=t.TypeError,Ie=n.prototype,xe=Se.prototype,Pe=we.prototype,Le=t["__core-js_shared__"],De=xe.toString,Oe=Pe.hasOwnProperty,Me=0,Re=(i=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",Ne=Pe.toString,Ue=De.call(we),Be=ct._,je=Ee("^"+De.call(Oe).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=ft?t.Buffer:r,qe=t.Symbol,He=t.Uint8Array,Ve=Fe?Fe.allocUnsafe:r,$e=si(we.getPrototypeOf,we),ze=we.create,We=Pe.propertyIsEnumerable,Ge=Ie.splice,Xe=qe?qe.isConcatSpreadable:r,Ye=qe?qe.iterator:r,Ze=qe?qe.toStringTag:r,et=function(){try{var e=ls(we,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ct.clearTimeout&&t.clearTimeout,ut=re&&re.now!==ct.Date.now&&re.now,dt=t.setTimeout!==ct.setTimeout&&t.setTimeout,ht=Ae.ceil,pt=Ae.floor,gt=we.getOwnPropertySymbols,mt=Fe?Fe.isBuffer:r,Nt=t.isFinite,$t=Ie.join,fi=si(we.keys,we),gi=Ae.max,mi=Ae.min,yi=re.now,vi=t.parseInt,_i=Ae.random,bi=Ie.reverse,Ti=ls(t,"DataView"),Si=ls(t,"Map"),Ai=ls(t,"Promise"),wi=ls(t,"Set"),Ei=ls(t,"WeakMap"),Ci=ls(we,"create"),ki=Ei&&new Ei,Ii={},xi=Ns(Ti),Pi=Ns(Si),Li=Ns(Ai),Di=Ns(wi),Oi=Ns(Ei),Mi=qe?qe.prototype:r,Ri=Mi?Mi.valueOf
vendor: 8,802 bytes, line 2
2:r,Ni=Mi?Mi.toString:r;function Ui(e){if(Ja(e)&&!Ha(e)&&!(e instanceof qi)){if(e instanceof Fi)return e;if(Oe.call(e,"__wrapped__"))return Us(e)}return new Fi(e)}var Bi=function(){function e(){}return function(t){if(!Za(t))return{};if(ze)return ze(t);e.prototype=t;var i=new e;return e.prototype=r,i}}();function ji(){}function Fi(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function qi(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Hi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Vi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function $i(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function zi(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new $i;++t<i;)this.add(e[t])}function Wi(e){var t=this.__data__=new Vi(e);this.size=t.size}function Gi(e,t){var i=Ha(e),n=!i&&qa(e),r=!i&&!n&&Wa(e),s=!i&&!n&&!r&&oo(e),a=i||n||r||s,o=a?Gt(e.length,Ce):[],l=o.length;for(var u in e)!t&&!Oe.call(e,u)||a&&("length"==u||r&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||gs(u,l))||o.push(u);return o}function Xi(e){var t=e.length;return t?e[zn(0,t-1)]:r}function Yi(e,t){return Ls(Cr(e),sn(t,0,e.length))}function Ki(e){return Ls(Cr(e))}function Qi(e,t,i){(i!==r&&!Ba(e[t],i)||i===r&&!(t in e))&&nn(e,t,i)}function Zi(e,t,i){var n=e[t];Oe.call(e,t)&&Ba(n,i)&&(i!==r||t in e)||nn(e,t,i)}function Ji(e,t){for(var i=e.length;i--;)if(Ba(e[i][0],t))return i;return-1}function en(e,t,i,n){return dn(e,(function(e,r,s){t(n,e,i(e),s)})),n}function tn(e,t){return e&&kr(t,Po(t),e)}function nn(e,t,i){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function rn(e,t){for(var i=-1,s=t.length,a=n(s),o=null==e;++i<s;)a[i]=o?r:Eo(e,t[i]);return a}function sn(e,t,i){return e==e&&(i!==r&&(e=e<=i?e:i),t!==r&&(e=e>=t?e:t)),e}function an(e,t,i,n,s,a){var o,l=1&t,u=2&t,d=4&t;if(i&&(o=s?i(e,n,s,a):i(e)),o!==r)return o;if(!Za(e))return e;var c=Ha(e);if(c){if(o=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&Oe.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e),!l)return Cr(e,o)}else{var h=cs(e),p=h==b||h==T;if(Wa(e))return br(e,l);if(h==w||h==g||p&&!s){if(o=u||p?{}:ps(e),!l)return u?function(e,t){return kr(e,ds(e),t)}(e,function(e,t){return e&&kr(t,Lo(t),e)}(o,e)):function(e,t){return kr(e,us(e),t)}(e,tn(o,e))}else{if(!st[h])return s?e:{};o=function(e,t,i){var n,r=e.constructor;switch(t){case L:return Tr(e);case y:case v:return new r(+e);case D:return function(e,t){var i=t?Tr(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case O:case M:case R:case N:case U:case B:case j:case F:case q:return Sr(e,i);case S:return new r;case A:case I:return new r(e);case C:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case k:return new r;case x:return n=e,Ri?we(Ri.call(n)):{}}}(e,h,l)}}a||(a=new Wi);var f=a.get(e);if(f)return f;a.set(e,o),ro(e)?e.forEach((function(n){o.add(an(n,t,i,n,e,a))})):eo(e)&&e.forEach((function(n,r){o.set(r,an(n,t,i,r,e,a))}));var m=c?r:(d?u?ts:es:u?Lo:Po)(e);return Et(m||e,(function(n,r){m&&(n=e[r=n]),Zi(o,r,an(n,t,i,r,e,a))})),o}function on(e,t,i){var n=i.length;if(null==e)return!n;for(e=we(e);n--;){var s=i[n],a=t[s],o=e[s];if(o===r&&!(s in e)||!a(o))return!1}return!0}function ln(e,t,i){if("function"!=typeof e)throw new ke(s);return ks((function(){e.apply(r,i)}),t)}function un(e,t,i,n){var r=-1,s=xt,a=!0,o=e.length,l=[],u=t.length;if(!o)return l;i&&(t=Lt(t,Yt(i))),n?(s=Pt,a=!1):t.length>=200&&(s=Qt,a=!1,t=new zi(t));e:for(;++r<o;){var d=e[r],c=null==i?d:i(d);if(d=n||0!==d?d:0,a&&c==c){for(var h=u;h--;)if(t[h]===c)continue e;l.push(d)}else s(t,c,n)||l.push(d)}return l}Ui.templateSettings={escape:Y,evaluate:K,interpolate:Q,variable:"",imports:{_:Ui}},Ui.prototype=ji.prototype,Ui.prototype.constructor=Ui,Fi.prototype=Bi(ji.prototype),Fi.prototype.constructor=Fi,qi.prototype=Bi(ji.prototype),qi.prototype.constructor=qi,Hi.prototype.clear=function(){this.__data__=Ci?Ci(null):{},this.size=0},Hi.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hi.prototype.get=function(e){var t=this.__data__;if(Ci){var i=t[e];return i===a?r:i}return Oe.call(t,e)?t[e]:r},Hi.prototype.has=function(e){var t=this.__data__;return Ci?t[e]!==r:Oe.call(t,e)},Hi.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Ci&&t===r?a:t,this},Vi.prototype.clear=function(){this.__data__=[],this.size=0},Vi.prototype.delete=function(e){var t=this.__data__,i=Ji(t,e);return!(i<0||(i==t.length-1?t.pop():Ge.call(t,i,1),--this.size,0))},Vi.prototype.get=function(e){var t=this.__data__,i=Ji(t,e);return i<0?r:t[i][1]},Vi.prototype.has=function(e){return Ji(this.__data__,e)>-1},Vi.prototype.set=function(e,t){var i=this.__data__,n=Ji(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this},$i.prototype.clear=function(){this.size=0,this.__data__={hash:new Hi,map:new(Si||Vi),string:new Hi}},$i.prototype.delete=function(e){var t=as(this,e).delete(e);return this.size-=t?1:0,t},$i.prototype.get=function(e){return as(this,e).get(e)},$i.prototype.has=function(e){return as(this,e).has(e)},$i.prototype.set=function(e,t){var i=as(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this},zi.prototype.add=zi.prototype.push=function(e){return this.__data__.set(e,a),this},zi.prototype.has=function(e){return this.__data__.has(e)},Wi.prototype.clear=function(){this.__data__=new Vi,this.size=0},Wi.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},Wi.prototype.get=function(e){return this.__data__.get(e)},Wi.prototype.has=function(e){return this.__data__.has(e)},Wi.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Vi){var n=i.__data__;if(!Si||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new $i(n)}return i.set(e,t),this.size=i.size,this};var dn=Pr(vn),cn=Pr(_n,!0);function hn(e,t){var i=!0;return dn(e,(function(e,n,r){return i=!!t(e,n,r)})),i}function pn(e,t,i){for(var n=-1,s=e.length;++n<s;){var a=e[n],o=t(a);if(null!=o&&(l===r?o==o&&!ao(o):i(o,l)))var l=o,u=a}return u}function fn(e,t){var i=[];return dn(e,(function(e,n,r){t(e,n,r)&&i.push(e)})),i}function gn(e,t,i,n,r){var s=-1,a=e.length;for(i||(i=fs),r||(r=[]);++s<a;){var o=e[s];t>0&&i(o)?t>1?gn(o,t-1,i,n,r):Dt(r,o):n||(r[r.length]=o)}return r}var mn=Lr(),yn=Lr(!0);function vn(e,t){return e&&mn(e,t,Po)}function _n(e,t){return e&&yn(e,t,Po)}function bn(e,t){return It(t,(function(t){return Ya(e[t])}))}function Tn(e,t){for(var i=0,n=(t=mr(t,e)).length;null!=e&&i<n;)e=e[Rs(t[i++])];return i&&i==n?e:r}function Sn(e,t,i){var n=t(e);return Ha(e)?n:Dt(n,i(e))}function An(e){return null==e?e===r?"[object Undefined]":"[object Null]":Ze&&Ze in we(e)?function(e){var t=Oe.call(e,Ze),i=e[Ze];try{e[Ze]=r;var n=!0}catch(e){}var s=Ne.call(e);return n&&(t?e[Ze]=i:delete e[Ze]),s}(e):function(e){return Ne.call(e)}(e)}function wn(e,t){return e>t}function En(e,t){return null!=e&&Oe.call(e,t)}function Cn(e,t){return null!=e&&t in we(e)}function kn(e,t,i){for(var s=i?Pt:xt,a=e[0].length,o=e.length,l=o,u=n(o),d=1/0,c=[];l--;){var h=e[l];l&&t&&(h=Lt(h,Yt(t))),d=mi(h.length,d),u[l]=!i&&(t||a>=120&&h.length>=120)?new zi(l&&h):r}h=e[0];var p=-1,f=u[0];e:for(;++p<a&&c.length<d;){var g=h[p],m=t?t(g):g;if(g=i||0!==g?g:0,!(f?Qt(f,m):s(c,m,i))){for(l=o;--l;){var y=u[l];if(!(y?Qt(y,m):s(e[l],m,i)))continue e}f&&f.push(m),c.push(g)}}return c}function In(e,t,i){var n=null==(e=ws(e,t=mr(t,e)))?e:e[Rs(Xs(t))];return null==n?r:At(n,e,i)}function xn(e){return Ja(e)&&An(e)==g}function Pn(e,t,i,n,s){return e===t||(null==e||null==t||!Ja(e)&&!Ja(t)?e!=e&&t!=t:function(e,t,i,n,s,a){var o=Ha(e),l=Ha(t),u=o?m:cs(e),d=l?m:cs(t),c=(u=u==g?w:u)==w,h=(d=d==g?w:d)==w,p=u==d;if(p&&Wa(e)){if(!Wa(t))return!1;o=!0,c=!1}if(p&&!c)return a||(a=new Wi),o||oo(e)?Zr(e,t,i,n,s,a):function(e,t,i,n,r,s,a){switch(i){case D:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case L:return!(e.byteLength!=t.byteLength||!s(new He(e),new He(t)));case y:case v:case A:return Ba(+e,+t);case _:return e.name==t.name&&e.message==t.message;case C:case I:return e==t+"";case S:var o=ri;case k:var l=1&n;if(o||(o=oi),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var d=Zr(o(e),o(t),n,r,s,a);return a.delete(e),d;case x:if(Ri)return Ri.call(e)==Ri.call(t)}return!1}(e,t,u,i,n,s,a);if(!(1&i)){var f=c&&Oe.call(e,"__wrapped__"),b=h&&Oe.call(t,"__wrapped__");
vendor: 29,231 bytes, line 2
2if(f||b){var T=f?e.value():e,E=b?t.value():t;return a||(a=new Wi),s(T,E,i,n,a)}}return!!p&&(a||(a=new Wi),function(e,t,i,n,s,a){var o=1&i,l=es(e),u=l.length;if(u!=es(t).length&&!o)return!1;for(var d=u;d--;){var c=l[d];if(!(o?c in t:Oe.call(t,c)))return!1}var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var f=!0;a.set(e,t),a.set(t,e);for(var g=o;++d<u;){var m=e[c=l[d]],y=t[c];if(n)var v=o?n(y,m,c,t,e,a):n(m,y,c,e,t,a);if(!(v===r?m===y||s(m,y,i,n,a):v)){f=!1;break}g||(g="constructor"==c)}if(f&&!g){var _=e.constructor,b=t.constructor;_==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b||(f=!1)}return a.delete(e),a.delete(t),f}(e,t,i,n,s,a))}(e,t,i,n,Pn,s))}function Ln(e,t,i,n){var s=i.length,a=s,o=!n;if(null==e)return!a;for(e=we(e);s--;){var l=i[s];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++s<a;){var u=(l=i[s])[0],d=e[u],c=l[1];if(o&&l[2]){if(d===r&&!(u in e))return!1}else{var h=new Wi;if(n)var p=n(d,c,u,e,t,h);if(!(p===r?Pn(c,d,3,n,h):p))return!1}}return!0}function Dn(e){return!(!Za(e)||(t=e,Re&&Re in t))&&(Ya(e)?je:ge).test(Ns(e));var t}function On(e){return"function"==typeof e?e:null==e?il:"object"==typeof e?Ha(e)?Bn(e[0],e[1]):Un(e):cl(e)}function Mn(e){if(!bs(e))return fi(e);var t=[];for(var i in we(e))Oe.call(e,i)&&"constructor"!=i&&t.push(i);return t}function Rn(e,t){return e<t}function Nn(e,t){var i=-1,r=$a(e)?n(e.length):[];return dn(e,(function(e,n,s){r[++i]=t(e,n,s)})),r}function Un(e){var t=os(e);return 1==t.length&&t[0][2]?Ss(t[0][0],t[0][1]):function(i){return i===e||Ln(i,e,t)}}function Bn(e,t){return ys(e)&&Ts(t)?Ss(Rs(e),t):function(i){var n=Eo(i,e);return n===r&&n===t?Co(i,e):Pn(t,n,3)}}function jn(e,t,i,n,s){e!==t&&mn(t,(function(a,o){if(s||(s=new Wi),Za(a))!function(e,t,i,n,s,a,o){var l=Es(e,i),u=Es(t,i),d=o.get(u);if(d)Qi(e,i,d);else{var c=a?a(l,u,i+"",e,t,o):r,h=c===r;if(h){var p=Ha(u),f=!p&&Wa(u),g=!p&&!f&&oo(u);c=u,p||f||g?Ha(l)?c=l:za(l)?c=Cr(l):f?(h=!1,c=br(u,!0)):g?(h=!1,c=Sr(u,!0)):c=[]:io(u)||qa(u)?(c=l,qa(l)?c=mo(l):Za(l)&&!Ya(l)||(c=ps(u))):h=!1}h&&(o.set(u,c),s(c,u,n,a,o),o.delete(u)),Qi(e,i,c)}}(e,t,o,i,jn,n,s);else{var l=n?n(Es(e,o),a,o+"",e,t,s):r;l===r&&(l=a),Qi(e,o,l)}}),Lo)}function Fn(e,t){var i=e.length;if(i)return gs(t+=t<0?i:0,i)?e[t]:r}function qn(e,t,i){t=t.length?Lt(t,(function(e){return Ha(e)?function(t){return Tn(t,1===e.length?e[0]:e)}:e})):[il];var n=-1;t=Lt(t,Yt(ss()));var r=Nn(e,(function(e,i,r){var s=Lt(t,(function(t){return t(e)}));return{criteria:s,index:++n,value:e}}));return function(e){var t=e.length;for(e.sort((function(e,t){return function(e,t,i){for(var n=-1,r=e.criteria,s=t.criteria,a=r.length,o=i.length;++n<a;){var l=Ar(r[n],s[n]);if(l)return n>=o?l:l*("desc"==i[n]?-1:1)}return e.index-t.index}(e,t,i)}));t--;)e[t]=e[t].value;return e}(r)}function Hn(e,t,i){for(var n=-1,r=t.length,s={};++n<r;){var a=t[n],o=Tn(e,a);i(o,a)&&Kn(s,mr(a,e),o)}return s}function Vn(e,t,i,n){var r=n?Ft:jt,s=-1,a=t.length,o=e;for(e===t&&(t=Cr(t)),i&&(o=Lt(e,Yt(i)));++s<a;)for(var l=0,u=t[s],d=i?i(u):u;(l=r(o,d,l,n))>-1;)o!==e&&Ge.call(o,l,1),Ge.call(e,l,1);return e}function $n(e,t){for(var i=e?t.length:0,n=i-1;i--;){var r=t[i];if(i==n||r!==s){var s=r;gs(r)?Ge.call(e,r,1):lr(e,r)}}return e}function zn(e,t){return e+pt(_i()*(t-e+1))}function Wn(e,t){var i="";if(!e||t<1||t>c)return i;do{t%2&&(i+=e),(t=pt(t/2))&&(e+=e)}while(t);return i}function Gn(e,t){return Is(As(e,t,il),e+"")}function Xn(e){return Xi(jo(e))}function Yn(e,t){var i=jo(e);return Ls(i,sn(t,0,i.length))}function Kn(e,t,i,n){if(!Za(e))return e;for(var s=-1,a=(t=mr(t,e)).length,o=a-1,l=e;null!=l&&++s<a;){var u=Rs(t[s]),d=i;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(s!=o){var c=l[u];(d=n?n(c,u,l):r)===r&&(d=Za(c)?c:gs(t[s+1])?[]:{})}Zi(l,u,d),l=l[u]}return e}var Qn=ki?function(e,t){return ki.set(e,t),e}:il,Zn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Jo(t),writable:!0})}:il;function Jn(e){return Ls(jo(e))}function er(e,t,i){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(i=i>s?s:i)<0&&(i+=s),s=t>i?0:i-t>>>0,t>>>=0;for(var a=n(s);++r<s;)a[r]=e[r+t];return a}function tr(e,t){var i;return dn(e,(function(e,n,r){return!(i=t(e,n,r))})),!!i}function ir(e,t,i){var n=0,r=null==e?n:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;n<r;){var s=n+r>>>1,a=e[s];null!==a&&!ao(a)&&(i?a<=t:a<t)?n=s+1:r=s}return r}return nr(e,t,il,i)}function nr(e,t,i,n){var s=0,a=null==e?0:e.length;if(0===a)return 0;for(var o=(t=i(t))!=t,l=null===t,u=ao(t),d=t===r;s<a;){var c=pt((s+a)/2),h=i(e[c]),p=h!==r,f=null===h,g=h==h,m=ao(h);if(o)var y=n||g;else y=d?g&&(n||p):l?g&&p&&(n||!f):u?g&&p&&!f&&(n||!m):!f&&!m&&(n?h<=t:h<t);y?s=c+1:a=c}return mi(a,4294967294)}function rr(e,t){for(var i=-1,n=e.length,r=0,s=[];++i<n;){var a=e[i],o=t?t(a):a;if(!i||!Ba(o,l)){var l=o;s[r++]=0===a?0:a}}return s}function sr(e){return"number"==typeof e?e:ao(e)?h:+e}function ar(e){if("string"==typeof e)return e;if(Ha(e))return Lt(e,ar)+"";if(ao(e))return Ni?Ni.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function or(e,t,i){var n=-1,r=xt,s=e.length,a=!0,o=[],l=o;if(i)a=!1,r=Pt;else if(s>=200){var u=t?null:Wr(e);if(u)return oi(u);a=!1,r=Qt,l=new zi}else l=t?[]:o;e:for(;++n<s;){var d=e[n],c=t?t(d):d;if(d=i||0!==d?d:0,a&&c==c){for(var h=l.length;h--;)if(l[h]===c)continue e;t&&l.push(c),o.push(d)}else r(l,c,i)||(l!==o&&l.push(c),o.push(d))}return o}function lr(e,t){return null==(e=ws(e,t=mr(t,e)))||delete e[Rs(Xs(t))]}function ur(e,t,i,n){return Kn(e,t,i(Tn(e,t)),n)}function dr(e,t,i,n){for(var r=e.length,s=n?r:-1;(n?s--:++s<r)&&t(e[s],s,e););return i?er(e,n?0:s,n?s+1:r):er(e,n?s+1:0,n?r:s)}function cr(e,t){var i=e;return i instanceof qi&&(i=i.value()),Ot(t,(function(e,t){return t.func.apply(t.thisArg,Dt([e],t.args))}),i)}function hr(e,t,i){var r=e.length;if(r<2)return r?or(e[0]):[];for(var s=-1,a=n(r);++s<r;)for(var o=e[s],l=-1;++l<r;)l!=s&&(a[s]=un(a[s]||o,e[l],t,i));return or(gn(a,1),t,i)}function pr(e,t,i){for(var n=-1,s=e.length,a=t.length,o={};++n<s;){var l=n<a?t[n]:r;i(o,e[n],l)}return o}function fr(e){return za(e)?e:[]}function gr(e){return"function"==typeof e?e:il}function mr(e,t){return Ha(e)?e:ys(e,t)?[e]:Ms(yo(e))}var yr=Gn;function vr(e,t,i){var n=e.length;return i=i===r?n:i,!t&&i>=n?e:er(e,t,i)}var _r=at||function(e){return ct.clearTimeout(e)};function br(e,t){if(t)return e.slice();var i=e.length,n=Ve?Ve(i):new e.constructor(i);return e.copy(n),n}function Tr(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function Sr(e,t){var i=t?Tr(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Ar(e,t){if(e!==t){var i=e!==r,n=null===e,s=e==e,a=ao(e),o=t!==r,l=null===t,u=t==t,d=ao(t);if(!l&&!d&&!a&&e>t||a&&o&&u&&!l&&!d||n&&o&&u||!i&&u||!s)return 1;if(!n&&!a&&!d&&e<t||d&&i&&s&&!n&&!a||l&&i&&s||!o&&s||!u)return-1}return 0}function wr(e,t,i,r){for(var s=-1,a=e.length,o=i.length,l=-1,u=t.length,d=gi(a-o,0),c=n(u+d),h=!r;++l<u;)c[l]=t[l];for(;++s<o;)(h||s<a)&&(c[i[s]]=e[s]);for(;d--;)c[l++]=e[s++];return c}function Er(e,t,i,r){for(var s=-1,a=e.length,o=-1,l=i.length,u=-1,d=t.length,c=gi(a-l,0),h=n(c+d),p=!r;++s<c;)h[s]=e[s];for(var f=s;++u<d;)h[f+u]=t[u];for(;++o<l;)(p||s<a)&&(h[f+i[o]]=e[s++]);return h}function Cr(e,t){var i=-1,r=e.length;for(t||(t=n(r));++i<r;)t[i]=e[i];return t}function kr(e,t,i,n){var s=!i;i||(i={});for(var a=-1,o=t.length;++a<o;){var l=t[a],u=n?n(i[l],e[l],l,i,e):r;u===r&&(u=e[l]),s?nn(i,l,u):Zi(i,l,u)}return i}function Ir(e,t){return function(i,n){var r=Ha(i)?wt:en,s=t?t():{};return r(i,e,ss(n,2),s)}}function xr(e){return Gn((function(t,i){var n=-1,s=i.length,a=s>1?i[s-1]:r,o=s>2?i[2]:r;for(a=e.length>3&&"function"==typeof a?(s--,a):r,o&&ms(i[0],i[1],o)&&(a=s<3?r:a,s=1),t=we(t);++n<s;){var l=i[n];l&&e(t,l,n,a)}return t}))}function Pr(e,t){return function(i,n){if(null==i)return i;if(!$a(i))return e(i,n);for(var r=i.length,s=t?r:-1,a=we(i);(t?s--:++s<r)&&!1!==n(a[s],s,a););return i}}function Lr(e){return function(t,i,n){for(var r=-1,s=we(t),a=n(t),o=a.length;o--;){var l=a[e?o:++r];if(!1===i(s[l],l,s))break}return t}}function Dr(e){return function(t){var i=ni(t=yo(t))?di(t):r,n=i?i[0]:t.charAt(0),s=i?vr(i,1).join(""):t.slice(1);return n[e]()+s}}function Or(e){return function(t){return Ot(Ko(Ho(t).replace(Ke,"")),e,"")}}function Mr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var i=Bi(e.prototype),n=e.apply(i,t);return Za(n)?n:i}}function Rr(e){return function(t,i,n){var s=we(t);if(!$a(t)){var a=ss(i,3);t=Po(t),i=function(e){return a(s[e],e,s)}}var o=e(t,i,n);return o>-1?s[a?t[o]:o]:r}}function Nr(e){return Jr((function(t){var i=t.length,n=i,a=Fi.prototype.thru;for(e&&t.reverse();n--;){var o=t[n];if("function"!=typeof o)throw new ke(s);if(a&&!l&&"wrapper"==ns(o))var l=new Fi([],!0)}for(n=l?n:i;++n<i;){var u=ns(o=t[n]),d="wrapper"==u?is(o):r;l=d&&vs(d[0])&&424==d[1]&&!d[4].length&&1==d[9]?l[ns(d[0])].apply(l,d[3]):1==o.length&&vs(o)?l[u]():l.thru(o)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Ha(n))return l.plant(n).value();for(var r=0,s=i?t[r].apply(this,e):n;++r<i;)s=t[r].call(this,s);return s}}))}function Ur(e,t,i,s,a,o,l,d,c,h){var p=t&u,f=1&t,g=2&t,m=24&t,y=512&t,v=g?r:Mr(e);return function u(){for(var _=arguments.length,b=n(_),T=_;T--;)b[T]=arguments[T];if(m)var S=rs(u),A=function(e,t){for(var i=e.length,n=0;i--;)e[i]===t&&++n;return n}(b,S);if(s&&(b=wr(b,s,a,m)),o&&(b=Er(b,o,l,m)),_-=A,m&&_<h){var w=ai(b,S);return $r(e,t,Ur,u.placeholder,i,b,w,d,c,h-_)}var E=f?i:this,C=g?E[e]:e;return _=b.length,d?b=function(e,t){for(var i=e.length,n=mi(t.length,i),s=Cr(e);n--;){var a=t[n];e[n]=gs(a,i)?s[a]:r}return e}(b,d):y&&_>1&&b.reverse(),p&&c<_&&(b.length=c),this&&this!==ct&&this instanceof u&&(C=v||Mr(C)),C.apply(E,b)}}function Br(e,t){return function(i,n){return function(e,t,i,n){return vn(e,(function(e,r,s){t(n,i(e),r,s)})),n}(i,e,t(n),{})}}function jr(e,t){return function(i,n){var s;if(i===r&&n===r)return t;if(i!==r&&(s=i),n!==r){if(s===r)return n;"string"==typeof i||"string"==typeof n?(i=ar(i),n=ar(n)):(i=sr(i),n=sr(n)),s=e(i,n)}return s}}function Fr(e){return Jr((function(t){return t=Lt(t,Yt(ss())),Gn((function(i){var n=this;return e(t,(function(e){return At(e,n,i)}))}))}))}function qr(e,t){var i=(t=t===r?" ":ar(t)).length;if(i<2)return i?Wn(t,e):t;var n=Wn(t,ht(e/ui(t)));return ni(t)?vr(di(n),0,e).join(""):n.slice(0,e)}function Hr(e){return function(t,i,s){return s&&"number"!=typeof s&&ms(t,i,s)&&(i=s=r),t=ho(t),i===r?(i=t,t=0):i=ho(i),function(e,t,i,r){for(var s=-1,a=gi(ht((t-e)/(i||1)),0),o=n(a);a--;)o[r?a:++s]=e,e+=i;return o}(t,i,s=s===r?t<i?1:-1:ho(s),e)}}function Vr(e){return function(t,i){return"string"==typeof t&&"string"==typeof i||(t=go(t),i=go(i)),e(t,i)}}function $r(e,t,i,n,s,a,o,u,d,c){var h=8&t;t|=h?l:64,4&(t&=~(h?64:l))||(t&=-4);var p=[e,t,s,h?a:r,h?o:r,h?r:a,h?r:o,u,d,c],f=i.apply(r,p);return vs(e)&&Cs(f,p),f.placeholder=n,xs(f,e,t)}function zr(e){var t=Ae[e];return function(e,i){if(e=go(e),(i=null==i?0:mi(po(i),292))&&Nt(e)){var n=(yo(e)+"e").split("e");return+((n=(yo(t(n[0]+"e"+(+n[1]+i)))+"e").split("e"))[0]+"e"+(+n[1]-i))}return t(e)}}var Wr=wi&&1/oi(new wi([,-0]))[1]==d?function(e){return new wi(e)}:ol;function Gr(e){return function(t){var i=cs(t);return i==S?ri(t):i==k?li(t):function(e,t){return Lt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xr(e,t,i,a,d,c,h,p){var f=2&t;if(!f&&"function"!=typeof e)throw new ke(s);var g=a?a.length:0;if(g||(t&=-97,a=d=r),h=h===r?h:gi(po(h),0),p=p===r?p:po(p),g-=d?d.length:0,64&t){var m=a,y=d;a=d=r}var v=f?r:is(e),_=[e,t,i,a,d,m,y,c,h,p];if(v&&function(e,t){var i=e[1],n=t[1],r=i|n,s=r<131,a=n==u&&8==i||n==u&&256==i&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==i;if(!s&&!a)return e;1&n&&(e[2]=t[2],r|=1&i?0:4);var l=t[3];if(l){var d=e[3];e[3]=d?wr(d,l,t[4]):l,e[4]=d?ai(e[3],o):t[4]}(l=t[5])&&(d=e[5],e[5]=d?Er(d,l,t[6]):l,e[6]=d?ai(e[5],o):t[6]),(l=t[7])&&(e[7]=l),n&u&&(e[8]=null==e[8]?t[8]:mi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r}(_,v),e=_[0],t=_[1],i=_[2],a=_[3],d=_[4],!(p=_[9]=_[9]===r?f?0:e.length:gi(_[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,i){var s=Mr(e);return function a(){for(var o=arguments.length,l=n(o),u=o,d=rs(a);u--;)l[u]=arguments[u];var c=o<3&&l[0]!==d&&l[o-1]!==d?[]:ai(l,d);return(o-=c.length)<i?$r(e,t,Ur,a.placeholder,r,l,c,r,r,i-o):At(this&&this!==ct&&this instanceof a?s:e,this,l)}}(e,t,p):t!=l&&33!=t||d.length?Ur.apply(r,_):function(e,t,i,r){var s=1&t,a=Mr(e);return function t(){for(var o=-1,l=arguments.length,u=-1,d=r.length,c=n(d+l),h=this&&this!==ct&&this instanceof t?a:e;++u<d;)c[u]=r[u];for(;l--;)c[u++]=arguments[++o];return At(h,s?i:this,c)}}(e,t,i,a);else var b=function(e,t,i){var n=1&t,r=Mr(e);return function t(){return(this&&this!==ct&&this instanceof t?r:e).apply(n?i:this,arguments)}}(e,t,i);return xs((v?Qn:Cs)(b,_),e,t)}function Yr(e,t,i,n){return e===r||Ba(e,Pe[i])&&!Oe.call(n,i)?t:e}function Kr(e,t,i,n,s,a){return Za(e)&&Za(t)&&(a.set(t,e),jn(e,t,r,Kr,a),a.delete(t)),e}function Qr(e){return io(e)?r:e}function Zr(e,t,i,n,s,a){var o=1&i,l=e.length,u=t.length;if(l!=u&&!(o&&u>l))return!1;var d=a.get(e),c=a.get(t);if(d&&c)return d==t&&c==e;var h=-1,p=!0,f=2&i?new zi:r;for(a.set(e,t),a.set(t,e);++h<l;){var g=e[h],m=t[h];if(n)var y=o?n(m,g,h,t,e,a):n(g,m,h,e,t,a);if(y!==r){if(y)continue;p=!1;break}if(f){if(!Rt(t,(function(e,t){if(!Qt(f,t)&&(g===e||s(g,e,i,n,a)))return f.push(t)}))){p=!1;break}}else if(g!==m&&!s(g,m,i,n,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function Jr(e){return Is(As(e,r,Vs),e+"")}function es(e){return Sn(e,Po,us)}function ts(e){return Sn(e,Lo,ds)}var is=ki?function(e){return ki.get(e)}:ol;function ns(e){for(var t=e.name+"",i=Ii[t],n=Oe.call(Ii,t)?i.length:0;n--;){var r=i[n],s=r.func;if(null==s||s==e)return r.name}return t}function rs(e){return(Oe.call(Ui,"placeholder")?Ui:e).placeholder}function ss(){var e=Ui.iteratee||nl;return e=e===nl?On:e,arguments.length?e(arguments[0],arguments[1]):e}function as(e,t){var i,n,r=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?r["string"==typeof t?"string":"hash"]:r.map}function os(e){for(var t=Po(e),i=t.length;i--;){var n=t[i],r=e[n];t[i]=[n,r,Ts(r)]}return t}function ls(e,t){var i=function(e,t){return null==e?r:e[t]}(e,t);return Dn(i)?i:r}var us=gt?function(e){return null==e?[]:(e=we(e),It(gt(e),(function(t){return We.call(e,t)})))}:fl,ds=gt?function(e){for(var t=[];e;)Dt(t,us(e)),e=$e(e);return t}:fl,cs=An;function hs(e,t,i){for(var n=-1,r=(t=mr(t,e)).length,s=!1;++n<r;){var a=Rs(t[n]);if(!(s=null!=e&&i(e,a)))break;e=e[a]}return s||++n!=r?s:!!(r=null==e?0:e.length)&&Qa(r)&&gs(a,r)&&(Ha(e)||qa(e))}function ps(e){return"function"!=typeof e.constructor||bs(e)?{}:Bi($e(e))}function fs(e){return Ha(e)||qa(e)||!!(Xe&&e&&e[Xe])}function gs(e,t){var i=typeof e;return!!(t=null==t?c:t)&&("number"==i||"symbol"!=i&&ye.test(e))&&e>-1&&e%1==0&&e<t}function ms(e,t,i){if(!Za(i))return!1;var n=typeof t;return!!("number"==n?$a(i)&&gs(t,i.length):"string"==n&&t in i)&&Ba(i[t],e)}function ys(e,t){if(Ha(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!ao(e))||J.test(e)||!Z.test(e)||null!=t&&e in we(t)}function vs(e){var t=ns(e),i=Ui[t];if("function"!=typeof i||!(t in qi.prototype))return!1;if(e===i)return!0;var n=is(i);return!!n&&e===n[0]}(Ti&&cs(new Ti(new ArrayBuffer(1)))!=D||Si&&cs(new Si)!=S||Ai&&cs(Ai.resolve())!=E||wi&&cs(new wi)!=k||Ei&&cs(new Ei)!=P)&&(cs=function(e){var t=An(e),i=t==w?e.constructor:r,n=i?Ns(i):"";if(n)switch(n){case xi:return D;case Pi:return S;case Li:return E;case Di:return k;case Oi:return P}return t});var _s=Le?Ya:gl;function bs(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function Ts(e){return e==e&&!Za(e)}function Ss(e,t){return function(i){return null!=i&&i[e]===t&&(t!==r||e in we(i))}}function As(e,t,i){return t=gi(t===r?e.length-1:t,0),function(){for(var r=arguments,s=-1,a=gi(r.length-t,0),o=n(a);++s<a;)o[s]=r[t+s];s=-1;for(var l=n(t+1);++s<t;)l[s]=r[s];return l[t]=i(o),At(e,this,l)}}function ws(e,t){return t.length<2?e:Tn(e,er(t,0,-1))}function Es(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Cs=Ps(Qn),ks=dt||function(e,t){return ct.setTimeout(e,t)},Is=Ps(Zn);function xs(e,t,i){var n=t+"";return Is(e,function(e,t){var i=t.length;if(!i)return e;var n=i-1;return t[n]=(i>1?"& ":"")+t[n],t=t.join(i>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Et(f,(function(i){var n="_."+i[0];t&i[1]&&!xt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(oe):[]}(n),i)))}function Ps(e){var t=0,i=0;return function(){var n=yi(),s=16-(n-i);if(i=n,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Ls(e,t){var i=-1,n=e.length,s=n-1;for(t=t===r?n:t;++i<t;){var a=zn(i,s),o=e[a];e[a]=e[i],e[i]=o}return e.length=t,e}var Ds,Os,Ms=(Ds=Da((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,i,n,r){t.push(n?r.replace(de,"$1"):i||e)})),t}),(function(e){return 500===Os.size&&Os.clear(),e})),Os=Ds.cache,Ds);function Rs(e){if("string"==typeof e||ao(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ns(e){if(null!=e){try{return De.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Us(e){if(e instanceof qi)return e.clone();var t=new Fi(e.__wrapped__,e.__chain__);return t.__actions__=Cr(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bs=Gn((function(e,t){return za(e)?un(e,gn(t,1,za,!0)):[]})),js=Gn((function(e,t){var i=Xs(t);return za(i)&&(i=r),za(e)?un(e,gn(t,1,za,!0),ss(i,2)):[]})),Fs=Gn((function(e,t){var i=Xs(t);return za(i)&&(i=r),za(e)?un(e,gn(t,1,za,!0),r,i):[]}));function qs(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:po(i);return r<0&&(r=gi(n+r,0)),Bt(e,ss(t,3),r)}function Hs(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var s=n-1;return i!==r&&(s=po(i),s=i<0?gi(n+s,0):mi(s,n-1)),Bt(e,ss(t,3),s,!0)}function Vs(e){return null!=e&&e.length?gn(e,1):[]}function $s(e){return e&&e.length?e[0]:r}var zs=Gn((function(e){var t=Lt(e,fr);return t.length&&t[0]===e[0]?kn(t):[]})),Ws=Gn((function(e){var t=Xs(e),i=Lt(e,fr);return t===Xs(i)?t=r:i.pop(),i.length&&i[0]===e[0]?kn(i,ss(t,2)):[]})),Gs=Gn((function(e){var t=Xs(e),i=Lt(e,fr);return(t="function"==typeof t?t:r)&&i.pop(),i.length&&i[0]===e[0]?kn(i,r,t):[]}));function Xs(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Ys=Gn(Ks);function Ks(e,t){return e&&e.length&&t&&t.length?Vn(e,t):e}var Qs=Jr((function(e,t){var i=null==e?0:e.length,n=rn(e,t);return $n(e,Lt(t,(function(e){return gs(e,i)?+e:e})).sort(Ar)),n}));function Zs(e){return null==e?e:bi.call(e)}var Js=Gn((function(e){return or(gn(e,1,za,!0))})),ea=Gn((function(e){var t=Xs(e);return za(t)&&(t=r),or(gn(e,1,za,!0),ss(t,2))})),ta=Gn((function(e){var t=Xs(e);return t="function"==typeof t?t:r,or(gn(e,1,za,!0),r,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=It(e,(function(e){if(za(e))return t=gi(e.length,t),!0})),Gt(t,(function(t){return Lt(e,Vt(t))}))}function na(e,t){if(!e||!e.length)return[];var i=ia(e);return null==t?i:Lt(i,(function(e){return At(t,r,e)}))}var ra=Gn((function(e,t){return za(e)?un(e,t):[]})),sa=Gn((function(e){return hr(It(e,za))})),aa=Gn((function(e){var t=Xs(e);return za(t)&&(t=r),hr(It(e,za),ss(t,2))})),oa=Gn((function(e){var t=Xs(e);return t="function"==typeof t?t:r,hr(It(e,za),r,t)})),la=Gn(ia),ua=Gn((function(e){var t=e.length,i=t>1?e[t-1]:r;return i="function"==typeof i?(e.pop(),i):r,na(e,i)}));function da(e){var t=Ui(e);return t.__chain__=!0,t}function ca(e,t){return t(e)}var ha=Jr((function(e){var t=e.length,i=t?e[0]:0,n=this.__wrapped__,s=function(t){return rn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof qi&&gs(i)?((n=n.slice(i,+i+(t?1:0))).__actions__.push({func:ca,args:[s],thisArg:r}),new Fi(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(s)})),pa=Ir((function(e,t,i){Oe.call(e,i)?++e[i]:nn(e,i,1)})),fa=Rr(qs),ga=Rr(Hs);function ma(e,t){return(Ha(e)?Et:dn)(e,ss(t,3))}function ya(e,t){return(Ha(e)?Ct:cn)(e,ss(t,3))}var va=Ir((function(e,t,i){Oe.call(e,i)?e[i].push(t):nn(e,i,[t])})),_a=Gn((function(e,t,i){var r=-1,s="function"==typeof t,a=$a(e)?n(e.length):[];return dn(e,(function(e){a[++r]=s?At(t,e,i):In(e,t,i)})),a})),ba=Ir((function(e,t,i){nn(e,i,t)}));function Ta(e,t){return(Ha(e)?Lt:Nn)(e,ss(t,3))}var Sa=Ir((function(e,t,i){e[i?0:1].push(t)}),(function(){return[[],[]]})),Aa=Gn((function(e,t){if(null==e)return[];var i=t.length;return i>1&&ms(e,t[0],t[1])?t=[]:i>2&&ms(t[0],t[1],t[2])&&(t=[t[0]]),qn(e,gn(t,1),[])})),wa=ut||function(){return ct.Date.now()};function Ea(e,t,i){return t=i?r:t,t=e&&null==t?e.length:t,Xr(e,u,r,r,r,r,t)}function Ca(e,t){var i;if("function"!=typeof t)throw new ke(s);return e=po(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=r),i}}var ka=Gn((function(e,t,i){var n=1;if(i.length){var r=ai(i,rs(ka));n|=l}return Xr(e,n,t,i,r)})),Ia=Gn((function(e,t,i){var n=3;if(i.length){var r=ai(i,rs(Ia));n|=l}return Xr(t,n,e,i,r)}));function xa(e,t,i){var n,a,o,l,u,d,c=0,h=!1,p=!1,f=!0;if("function"!=typeof e)throw new ke(s);function g(t){var i=n,s=a;return n=a=r,c=t,l=e.apply(s,i)}function m(e){var i=e-d;return d===r||i>=t||i<0||p&&e-c>=o}function y(){var e=wa();if(m(e))return v(e);u=ks(y,function(e){var i=t-(e-d);return p?mi(i,o-(e-c)):i}(e))}function v(e){return u=r,f&&n?g(e):(n=a=r,l)}function _(){var e=wa(),i=m(e);if(n=arguments,a=this,d=e,i){if(u===r)return function(e){return c=e,u=ks(y,t),h?g(e):l}(d);if(p)return _r(u),u=ks(y,t),g(d)}return u===r&&(u=ks(y,t)),l}return t=go(t)||0,Za(i)&&(h=!!i.leading,o=(p="maxWait"in i)?gi(go(i.maxWait)||0,t):o,f="trailing"in i?!!i.trailing:f),_.cancel=function(){u!==r&&_r(u),c=0,n=d=a=u=r},_.flush=function(){return u===r?l:v(wa())},_}var Pa=Gn((function(e,t){return ln(e,1,t)})),La=Gn((function(e,t,i){return ln(e,go(t)||0,i)}));function Da(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ke(s);var i=function(){var n=arguments,r=t?t.apply(this,n):n[0],s=i.cache;if(s.has(r))return s.get(r);var a=e.apply(this,n);return i.cache=s.set(r,a)||s,a};return i.cache=new(Da.Cache||$i),i}function Oa(e){if("function"!=typeof e)throw new ke(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Da.Cache=$i;var Ma=yr((function(e,t){var i=(t=1==t.length&&Ha(t[0])?Lt(t[0],Yt(ss())):Lt(gn(t,1),Yt(ss()))).length;return Gn((function(n){for(var r=-1,s=mi(n.length,i);++r<s;)n[r]=t[r].call(this,n[r]);return At(e,this,n)}))})),Ra=Gn((function(e,t){var i=ai(t,rs(Ra));return Xr(e,l,r,t,i)})),Na=Gn((function(e,t){var i=ai(t,rs(Na));return Xr(e,64,r,t,i)})),Ua=Jr((function(e,t){return Xr(e,256,r,r,r,t)}));function Ba(e,t){return e===t||e!=e&&t!=t}var ja=Vr(wn),Fa=Vr((function(e,t){return e>=t})),qa=xn(function(){return arguments}())?xn:function(e){return Ja(e)&&Oe.call(e,"callee")&&!We.call(e,"callee")},Ha=n.isArray,Va=yt?Yt(yt):function(e){return Ja(e)&&An(e)==L};function $a(e){return null!=e&&Qa(e.length)&&!Ya(e)}function za(e){return Ja(e)&&$a(e)}var Wa=mt||gl,Ga=vt?Yt(vt):function(e){return Ja(e)&&An(e)==v};function Xa(e){if(!Ja(e))return!1;var t=An(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!io(e)}function Ya(e){if(!Za(e))return!1;var t=An(e);return t==b||t==T||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ka(e){return"number"==typeof e&&e==po(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function Za(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ja(e){return null!=e&&"object"==typeof e}var eo=_t?Yt(_t):function(e){return Ja(e)&&cs(e)==S};function to(e){return"number"==typeof e||Ja(e)&&An(e)==A}function io(e){if(!Ja(e)||An(e)!=w)return!1;var t=$e(e);if(null===t)return!0;var i=Oe.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&De.call(i)==Ue}var no=bt?Yt(bt):function(e){return Ja(e)&&An(e)==C},ro=Tt?Yt(Tt):function(e){return Ja(e)&&cs(e)==k};function so(e){return"string"==typeof e||!Ha(e)&&Ja(e)&&An(e)==I}function ao(e){return"symbol"==typeof e||Ja(e)&&An(e)==x}var oo=St?Yt(St):function(e){return Ja(e)&&Qa(e.length)&&!!rt[An(e)]},lo=Vr(Rn),uo=Vr((function(e,t){return e<=t}));function co(e){if(!e)return[];if($a(e))return so(e)?di(e):Cr(e);if(Ye&&e[Ye])return function(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}(e[Ye]());var t=cs(e);return(t==S?ri:t==k?oi:jo)(e)}function ho(e){return e?(e=go(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function po(e){var t=ho(e),i=t%1;return t==t?i?t-i:t:0}function fo(e){return e?sn(po(e),0,p):0}function go(e){if("number"==typeof e)return e;if(ao(e))return h;if(Za(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Za(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var i=fe.test(e);return i||me.test(e)?lt(e.slice(2),i?2:8):pe.test(e)?h:+e}function mo(e){return kr(e,Lo(e))}function yo(e){return null==e?"":ar(e)}var vo=xr((function(e,t){if(bs(t)||$a(t))kr(t,Po(t),e);else for(var i in t)Oe.call(t,i)&&Zi(e,i,t[i])})),_o=xr((function(e,t){kr(t,Lo(t),e)})),bo=xr((function(e,t,i,n){kr(t,Lo(t),e,n)})),To=xr((function(e,t,i,n){kr(t,Po(t),e,n)})),So=Jr(rn),Ao=Gn((function(e,t){e=we(e);var i=-1,n=t.length,s=n>2?t[2]:r;for(s&&ms(t[0],t[1],s)&&(n=1);++i<n;)for(var a=t[i],o=Lo(a),l=-1,u=o.length;++l<u;){var d=o[l],c=e[d];(c===r||Ba(c,Pe[d])&&!Oe.call(e,d))&&(e[d]=a[d])}return e})),wo=Gn((function(e){return e.push(r,Kr),At(Oo,r,e)}));function Eo(e,t,i){var n=null==e?r:Tn(e,t);return n===r?i:n}function Co(e,t){return null!=e&&hs(e,t,Cn)}var ko=Br((function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),e[t]=i}),Jo(il)),Io=Br((function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),Oe.call(e,t)?e[t].push(i):e[t]=[i]}),ss),xo=Gn(In);function Po(e){return $a(e)?Gi(e):Mn(e)}function Lo(e){return $a(e)?Gi(e,!0):function(e){if(!Za(e))return function(e){var t=[];if(null!=e)for(var i in we(e))t.push(i);return t}(e);var t=bs(e),i=[];for(var n in e)("constructor"!=n||!t&&Oe.call(e,n))&&i.push(n);return i}(e)}var Do=xr((function(e,t,i){jn(e,t,i)})),Oo=xr((function(e,t,i,n){jn(e,t,i,n)})),Mo=Jr((function(e,t){var i={};if(null==e)return i;var n=!1;t=Lt(t,(function(t){return t=mr(t,e),n||(n=t.length>1),t})),kr(e,ts(e),i),n&&(i=an(i,7,Qr));for(var r=t.length;r--;)lr(i,t[r]);return i})),Ro=Jr((function(e,t){return null==e?{}:function(e,t){return Hn(e,t,(function(t,i){return Co(e,i)}))}(e,t)}));function No(e,t){if(null==e)return{};var i=Lt(ts(e),(function(e){return[e]}));return t=ss(t),Hn(e,i,(function(e,i){return t(e,i[0])}))}var Uo=Gr(Po),Bo=Gr(Lo);function jo(e){return null==e?[]:Kt(e,Po(e))}var Fo=Or((function(e,t,i){return t=t.toLowerCase(),e+(i?qo(t):t)}));function qo(e){return Yo(yo(e).toLowerCase())}function Ho(e){return(e=yo(e))&&e.replace(ve,ei).replace(Qe,"")}var Vo=Or((function(e,t,i){return e+(i?"-":"")+t.toLowerCase()})),$o=Or((function(e,t,i){return e+(i?" ":"")+t.toLowerCase()})),zo=Dr("toLowerCase"),Wo=Or((function(e,t,i){return e+(i?"_":"")+t.toLowerCase()})),Go=Or((function(e,t,i){return e+(i?" ":"")+Yo(t)})),Xo=Or((function(e,t,i){return e+(i?" ":"")+t.toUpperCase()})),Yo=Dr("toUpperCase");function Ko(e,t,i){return e=yo(e),(t=i?r:t)===r?function(e){return tt.test(e)}(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Qo=Gn((function(e,t){try{return At(e,r,t)}catch(e){return Xa(e)?e:new Te(e)}})),Zo=Jr((function(e,t){return Et(t,(function(t){t=Rs(t),nn(e,t,ka(e[t],e))})),e}));function Jo(e){return function(){return e}}var el=Nr(),tl=Nr(!0);function il(e){return e}function nl(e){return On("function"==typeof e?e:an(e,1))}var rl=Gn((function(e,t){return function(i){return In(i,e,t)}})),sl=Gn((function(e,t){return function(i){return In(e,i,t)}}));function al(e,t,i){var n=Po(t),r=bn(t,n);null!=i||Za(t)&&(r.length||!n.length)||(i=t,t=e,e=this,r=bn(t,Po(t)));var s=!(Za(i)&&"chain"in i&&!i.chain),a=Ya(e);return Et(r,(function(i){var n=t[i];e[i]=n,a&&(e.prototype[i]=function(){var t=this.__chain__;if(s||t){var i=e(this.__wrapped__);return(i.__actions__=Cr(this.__actions__)).push({func:n,args:arguments,thisArg:e}),i.__chain__=t,i}return n.apply(e,Dt([this.value()],arguments))})})),e}function ol(){}var ll=Fr(Lt),ul=Fr(kt),dl=Fr(Rt);function cl(e){return ys(e)?Vt(Rs(e)):function(e){return function(t){return Tn(t,e)}}(e)}var hl=Hr(),pl=Hr(!0);function fl(){return[]}function gl(){return!1}var ml,yl=jr((function(e,t){return e+t}),0),vl=zr("ceil"),_l=jr((function(e,t){return e/t}),1),bl=zr("floor"),Tl=jr((function(e,t){return e*t}),1),Sl=zr("round"),Al=jr((function(e,t){return e-t}
vendor: 17,587 bytes, line 2
2),0);return Ui.after=function(e,t){if("function"!=typeof t)throw new ke(s);return e=po(e),function(){if(--e<1)return t.apply(this,arguments)}},Ui.ary=Ea,Ui.assign=vo,Ui.assignIn=_o,Ui.assignInWith=bo,Ui.assignWith=To,Ui.at=So,Ui.before=Ca,Ui.bind=ka,Ui.bindAll=Zo,Ui.bindKey=Ia,Ui.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ha(e)?e:[e]},Ui.chain=da,Ui.chunk=function(e,t,i){t=(i?ms(e,t,i):t===r)?1:gi(po(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var a=0,o=0,l=n(ht(s/t));a<s;)l[o++]=er(e,a,a+=t);return l},Ui.compact=function(e){for(var t=-1,i=null==e?0:e.length,n=0,r=[];++t<i;){var s=e[t];s&&(r[n++]=s)}return r},Ui.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),i=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Dt(Ha(i)?Cr(i):[i],gn(t,1))},Ui.cond=function(e){var t=null==e?0:e.length,i=ss();return e=t?Lt(e,(function(e){if("function"!=typeof e[1])throw new ke(s);return[i(e[0]),e[1]]})):[],Gn((function(i){for(var n=-1;++n<t;){var r=e[n];if(At(r[0],this,i))return At(r[1],this,i)}}))},Ui.conforms=function(e){return function(e){var t=Po(e);return function(i){return on(i,e,t)}}(an(e,1))},Ui.constant=Jo,Ui.countBy=pa,Ui.create=function(e,t){var i=Bi(e);return null==t?i:tn(i,t)},Ui.curry=function e(t,i,n){var s=Xr(t,8,r,r,r,r,r,i=n?r:i);return s.placeholder=e.placeholder,s},Ui.curryRight=function e(t,i,n){var s=Xr(t,16,r,r,r,r,r,i=n?r:i);return s.placeholder=e.placeholder,s},Ui.debounce=xa,Ui.defaults=Ao,Ui.defaultsDeep=wo,Ui.defer=Pa,Ui.delay=La,Ui.difference=Bs,Ui.differenceBy=js,Ui.differenceWith=Fs,Ui.drop=function(e,t,i){var n=null==e?0:e.length;return n?er(e,(t=i||t===r?1:po(t))<0?0:t,n):[]},Ui.dropRight=function(e,t,i){var n=null==e?0:e.length;return n?er(e,0,(t=n-(t=i||t===r?1:po(t)))<0?0:t):[]},Ui.dropRightWhile=function(e,t){return e&&e.length?dr(e,ss(t,3),!0,!0):[]},Ui.dropWhile=function(e,t){return e&&e.length?dr(e,ss(t,3),!0):[]},Ui.fill=function(e,t,i,n){var s=null==e?0:e.length;return s?(i&&"number"!=typeof i&&ms(e,t,i)&&(i=0,n=s),function(e,t,i,n){var s=e.length;for((i=po(i))<0&&(i=-i>s?0:s+i),(n=n===r||n>s?s:po(n))<0&&(n+=s),n=i>n?0:fo(n);i<n;)e[i++]=t;return e}(e,t,i,n)):[]},Ui.filter=function(e,t){return(Ha(e)?It:fn)(e,ss(t,3))},Ui.flatMap=function(e,t){return gn(Ta(e,t),1)},Ui.flatMapDeep=function(e,t){return gn(Ta(e,t),d)},Ui.flatMapDepth=function(e,t,i){return i=i===r?1:po(i),gn(Ta(e,t),i)},Ui.flatten=Vs,Ui.flattenDeep=function(e){return null!=e&&e.length?gn(e,d):[]},Ui.flattenDepth=function(e,t){return null!=e&&e.length?gn(e,t=t===r?1:po(t)):[]},Ui.flip=function(e){return Xr(e,512)},Ui.flow=el,Ui.flowRight=tl,Ui.fromPairs=function(e){for(var t=-1,i=null==e?0:e.length,n={};++t<i;){var r=e[t];n[r[0]]=r[1]}return n},Ui.functions=function(e){return null==e?[]:bn(e,Po(e))},Ui.functionsIn=function(e){return null==e?[]:bn(e,Lo(e))},Ui.groupBy=va,Ui.initial=function(e){return null!=e&&e.length?er(e,0,-1):[]},Ui.intersection=zs,Ui.intersectionBy=Ws,Ui.intersectionWith=Gs,Ui.invert=ko,Ui.invertBy=Io,Ui.invokeMap=_a,Ui.iteratee=nl,Ui.keyBy=ba,Ui.keys=Po,Ui.keysIn=Lo,Ui.map=Ta,Ui.mapKeys=function(e,t){var i={};return t=ss(t,3),vn(e,(function(e,n,r){nn(i,t(e,n,r),e)})),i},Ui.mapValues=function(e,t){var i={};return t=ss(t,3),vn(e,(function(e,n,r){nn(i,n,t(e,n,r))})),i},Ui.matches=function(e){return Un(an(e,1))},Ui.matchesProperty=function(e,t){return Bn(e,an(t,1))},Ui.memoize=Da,Ui.merge=Do,Ui.mergeWith=Oo,Ui.method=rl,Ui.methodOf=sl,Ui.mixin=al,Ui.negate=Oa,Ui.nthArg=function(e){return e=po(e),Gn((function(t){return Fn(t,e)}))},Ui.omit=Mo,Ui.omitBy=function(e,t){return No(e,Oa(ss(t)))},Ui.once=function(e){return Ca(2,e)},Ui.orderBy=function(e,t,i,n){return null==e?[]:(Ha(t)||(t=null==t?[]:[t]),Ha(i=n?r:i)||(i=null==i?[]:[i]),qn(e,t,i))},Ui.over=ll,Ui.overArgs=Ma,Ui.overEvery=ul,Ui.overSome=dl,Ui.partial=Ra,Ui.partialRight=Na,Ui.partition=Sa,Ui.pick=Ro,Ui.pickBy=No,Ui.property=cl,Ui.propertyOf=function(e){return function(t){return null==e?r:Tn(e,t)}},Ui.pull=Ys,Ui.pullAll=Ks,Ui.pullAllBy=function(e,t,i){return e&&e.length&&t&&t.length?Vn(e,t,ss(i,2)):e},Ui.pullAllWith=function(e,t,i){return e&&e.length&&t&&t.length?Vn(e,t,r,i):e},Ui.pullAt=Qs,Ui.range=hl,Ui.rangeRight=pl,Ui.rearg=Ua,Ui.reject=function(e,t){return(Ha(e)?It:fn)(e,Oa(ss(t,3)))},Ui.remove=function(e,t){var i=[];if(!e||!e.length)return i;var n=-1,r=[],s=e.length;for(t=ss(t,3);++n<s;){var a=e[n];t(a,n,e)&&(i.push(a),r.push(n))}return $n(e,r),i},Ui.rest=function(e,t){if("function"!=typeof e)throw new ke(s);return Gn(e,t=t===r?t:po(t))},Ui.reverse=Zs,Ui.sampleSize=function(e,t,i){return t=(i?ms(e,t,i):t===r)?1:po(t),(Ha(e)?Yi:Yn)(e,t)},Ui.set=function(e,t,i){return null==e?e:Kn(e,t,i)},Ui.setWith=function(e,t,i,n){return n="function"==typeof n?n:r,null==e?e:Kn(e,t,i,n)},Ui.shuffle=function(e){return(Ha(e)?Ki:Jn)(e)},Ui.slice=function(e,t,i){var n=null==e?0:e.length;return n?(i&&"number"!=typeof i&&ms(e,t,i)?(t=0,i=n):(t=null==t?0:po(t),i=i===r?n:po(i)),er(e,t,i)):[]},Ui.sortBy=Aa,Ui.sortedUniq=function(e){return e&&e.length?rr(e):[]},Ui.sortedUniqBy=function(e,t){return e&&e.length?rr(e,ss(t,2)):[]},Ui.split=function(e,t,i){return i&&"number"!=typeof i&&ms(e,t,i)&&(t=i=r),(i=i===r?p:i>>>0)?(e=yo(e))&&("string"==typeof t||null!=t&&!no(t))&&!(t=ar(t))&&ni(e)?vr(di(e),0,i):e.split(t,i):[]},Ui.spread=function(e,t){if("function"!=typeof e)throw new ke(s);return t=null==t?0:gi(po(t),0),Gn((function(i){var n=i[t],r=vr(i,0,t);return n&&Dt(r,n),At(e,this,r)}))},Ui.tail=function(e){var t=null==e?0:e.length;return t?er(e,1,t):[]},Ui.take=function(e,t,i){return e&&e.length?er(e,0,(t=i||t===r?1:po(t))<0?0:t):[]},Ui.takeRight=function(e,t,i){var n=null==e?0:e.length;return n?er(e,(t=n-(t=i||t===r?1:po(t)))<0?0:t,n):[]},Ui.takeRightWhile=function(e,t){return e&&e.length?dr(e,ss(t,3),!1,!0):[]},Ui.takeWhile=function(e,t){return e&&e.length?dr(e,ss(t,3)):[]},Ui.tap=function(e,t){return t(e),e},Ui.throttle=function(e,t,i){var n=!0,r=!0;if("function"!=typeof e)throw new ke(s);return Za(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),xa(e,t,{leading:n,maxWait:t,trailing:r})},Ui.thru=ca,Ui.toArray=co,Ui.toPairs=Uo,Ui.toPairsIn=Bo,Ui.toPath=function(e){return Ha(e)?Lt(e,Rs):ao(e)?[e]:Cr(Ms(yo(e)))},Ui.toPlainObject=mo,Ui.transform=function(e,t,i){var n=Ha(e),r=n||Wa(e)||oo(e);if(t=ss(t,4),null==i){var s=e&&e.constructor;i=r?n?new s:[]:Za(e)&&Ya(s)?Bi($e(e)):{}}return(r?Et:vn)(e,(function(e,n,r){return t(i,e,n,r)})),i},Ui.unary=function(e){return Ea(e,1)},Ui.union=Js,Ui.unionBy=ea,Ui.unionWith=ta,Ui.uniq=function(e){return e&&e.length?or(e):[]},Ui.uniqBy=function(e,t){return e&&e.length?or(e,ss(t,2)):[]},Ui.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?or(e,r,t):[]},Ui.unset=function(e,t){return null==e||lr(e,t)},Ui.unzip=ia,Ui.unzipWith=na,Ui.update=function(e,t,i){return null==e?e:ur(e,t,gr(i))},Ui.updateWith=function(e,t,i,n){return n="function"==typeof n?n:r,null==e?e:ur(e,t,gr(i),n)},Ui.values=jo,Ui.valuesIn=function(e){return null==e?[]:Kt(e,Lo(e))},Ui.without=ra,Ui.words=Ko,Ui.wrap=function(e,t){return Ra(gr(t),e)},Ui.xor=sa,Ui.xorBy=aa,Ui.xorWith=oa,Ui.zip=la,Ui.zipObject=function(e,t){return pr(e||[],t||[],Zi)},Ui.zipObjectDeep=function(e,t){return pr(e||[],t||[],Kn)},Ui.zipWith=ua,Ui.entries=Uo,Ui.entriesIn=Bo,Ui.extend=_o,Ui.extendWith=bo,al(Ui,Ui),Ui.add=yl,Ui.attempt=Qo,Ui.camelCase=Fo,Ui.capitalize=qo,Ui.ceil=vl,Ui.clamp=function(e,t,i){return i===r&&(i=t,t=r),i!==r&&(i=(i=go(i))==i?i:0),t!==r&&(t=(t=go(t))==t?t:0),sn(go(e),t,i)},Ui.clone=function(e){return an(e,4)},Ui.cloneDeep=function(e){return an(e,5)},Ui.cloneDeepWith=function(e,t){return an(e,5,t="function"==typeof t?t:r)},Ui.cloneWith=function(e,t){return an(e,4,t="function"==typeof t?t:r)},Ui.conformsTo=function(e,t){return null==t||on(e,t,Po(t))},Ui.deburr=Ho,Ui.defaultTo=function(e,t){return null==e||e!=e?t:e},Ui.divide=_l,Ui.endsWith=function(e,t,i){e=yo(e),t=ar(t);var n=e.length,s=i=i===r?n:sn(po(i),0,n);return(i-=t.length)>=0&&e.slice(i,s)==t},Ui.eq=Ba,Ui.escape=function(e){return(e=yo(e))&&X.test(e)?e.replace(W,ti):e},Ui.escapeRegExp=function(e){return(e=yo(e))&&ie.test(e)?e.replace(te,"\\$&"):e},Ui.every=function(e,t,i){var n=Ha(e)?kt:hn;return i&&ms(e,t,i)&&(t=r),n(e,ss(t,3))},Ui.find=fa,Ui.findIndex=qs,Ui.findKey=function(e,t){return Ut(e,ss(t,3),vn)},Ui.findLast=ga,Ui.findLastIndex=Hs,Ui.findLastKey=function(e,t){return Ut(e,ss(t,3),_n)},Ui.floor=bl,Ui.forEach=ma,Ui.forEachRight=ya,Ui.forIn=function(e,t){return null==e?e:mn(e,ss(t,3),Lo)},Ui.forInRight=function(e,t){return null==e?e:yn(e,ss(t,3),Lo)},Ui.forOwn=function(e,t){return e&&vn(e,ss(t,3))},Ui.forOwnRight=function(e,t){return e&&_n(e,ss(t,3))},Ui.get=Eo,Ui.gt=ja,Ui.gte=Fa,Ui.has=function(e,t){return null!=e&&hs(e,t,En)},Ui.hasIn=Co,Ui.head=$s,Ui.identity=il,Ui.includes=function(e,t,i,n){e=$a(e)?e:jo(e),i=i&&!n?po(i):0;var r=e.length;return i<0&&(i=gi(r+i,0)),so(e)?i<=r&&e.indexOf(t,i)>-1:!!r&&jt(e,t,i)>-1},Ui.indexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:po(i);return r<0&&(r=gi(n+r,0)),jt(e,t,r)},Ui.inRange=function(e,t,i){return t=ho(t),i===r?(i=t,t=0):i=ho(i),function(e,t,i){return e>=mi(t,i)&&e<gi(t,i)}(e=go(e),t,i)},Ui.invoke=xo,Ui.isArguments=qa,Ui.isArray=Ha,Ui.isArrayBuffer=Va,Ui.isArrayLike=$a,Ui.isArrayLikeObject=za,Ui.isBoolean=function(e){return!0===e||!1===e||Ja(e)&&An(e)==y},Ui.isBuffer=Wa,Ui.isDate=Ga,Ui.isElement=function(e){return Ja(e)&&1===e.nodeType&&!io(e)},Ui.isEmpty=function(e){if(null==e)return!0;if($a(e)&&(Ha(e)||"string"==typeof e||"function"==typeof e.splice||Wa(e)||oo(e)||qa(e)))return!e.length;var t=cs(e);if(t==S||t==k)return!e.size;if(bs(e))return!Mn(e).length;for(var i in e)if(Oe.call(e,i))return!1;return!0},Ui.isEqual=function(e,t){return Pn(e,t)},Ui.isEqualWith=function(e,t,i){var n=(i="function"==typeof i?i:r)?i(e,t):r;return n===r?Pn(e,t,r,i):!!n},Ui.isError=Xa,Ui.isFinite=function(e){return"number"==typeof e&&Nt(e)},Ui.isFunction=Ya,Ui.isInteger=Ka,Ui.isLength=Qa,Ui.isMap=eo,Ui.isMatch=function(e,t){return e===t||Ln(e,t,os(t))},Ui.isMatchWith=function(e,t,i){return i="function"==typeof i?i:r,Ln(e,t,os(t),i)},Ui.isNaN=function(e){return to(e)&&e!=+e},Ui.isNative=function(e){if(_s(e))throw new Te("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dn(e)},Ui.isNil=function(e){return null==e},Ui.isNull=function(e){return null===e},Ui.isNumber=to,Ui.isObject=Za,Ui.isObjectLike=Ja,Ui.isPlainObject=io,Ui.isRegExp=no,Ui.isSafeInteger=function(e){return Ka(e)&&e>=-9007199254740991&&e<=c},Ui.isSet=ro,Ui.isString=so,Ui.isSymbol=ao,Ui.isTypedArray=oo,Ui.isUndefined=function(e){return e===r},Ui.isWeakMap=function(e){return Ja(e)&&cs(e)==P},Ui.isWeakSet=function(e){return Ja(e)&&"[object WeakSet]"==An(e)},Ui.join=function(e,t){return null==e?"":$t.call(e,t)},Ui.kebabCase=Vo,Ui.last=Xs,Ui.lastIndexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var s=n;return i!==r&&(s=(s=po(i))<0?gi(n+s,0):mi(s,n-1)),t==t?function(e,t,i){for(var n=i+1;n--;)if(e[n]===t)return n;return n}(e,t,s):Bt(e,qt,s,!0)},Ui.lowerCase=$o,Ui.lowerFirst=zo,Ui.lt=lo,Ui.lte=uo,Ui.max=function(e){return e&&e.length?pn(e,il,wn):r},Ui.maxBy=function(e,t){return e&&e.length?pn(e,ss(t,2),wn):r},Ui.mean=function(e){return Ht(e,il)},Ui.meanBy=function(e,t){return Ht(e,ss(t,2))},Ui.min=function(e){return e&&e.length?pn(e,il,Rn):r},Ui.minBy=function(e,t){return e&&e.length?pn(e,ss(t,2),Rn):r},Ui.stubArray=fl,Ui.stubFalse=gl,Ui.stubObject=function(){return{}},Ui.stubString=function(){return""},Ui.stubTrue=function(){return!0},Ui.multiply=Tl,Ui.nth=function(e,t){return e&&e.length?Fn(e,po(t)):r},Ui.noConflict=function(){return ct._===this&&(ct._=Be),this},Ui.noop=ol,Ui.now=wa,Ui.pad=function(e,t,i){e=yo(e);var n=(t=po(t))?ui(e):0;if(!t||n>=t)return e;var r=(t-n)/2;return qr(pt(r),i)+e+qr(ht(r),i)},Ui.padEnd=function(e,t,i){e=yo(e);var n=(t=po(t))?ui(e):0;return t&&n<t?e+qr(t-n,i):e},Ui.padStart=function(e,t,i){e=yo(e);var n=(t=po(t))?ui(e):0;return t&&n<t?qr(t-n,i)+e:e},Ui.parseInt=function(e,t,i){return i||null==t?t=0:t&&(t=+t),vi(yo(e).replace(ne,""),t||0)},Ui.random=function(e,t,i){if(i&&"boolean"!=typeof i&&ms(e,t,i)&&(t=i=r),i===r&&("boolean"==typeof t?(i=t,t=r):"boolean"==typeof e&&(i=e,e=r)),e===r&&t===r?(e=0,t=1):(e=ho(e),t===r?(t=e,e=0):t=ho(t)),e>t){var n=e;e=t,t=n}if(i||e%1||t%1){var s=_i();return mi(e+s*(t-e+ot("1e-"+((s+"").length-1))),t)}return zn(e,t)},Ui.reduce=function(e,t,i){var n=Ha(e)?Ot:zt,r=arguments.length<3;return n(e,ss(t,4),i,r,dn)},Ui.reduceRight=function(e,t,i){var n=Ha(e)?Mt:zt,r=arguments.length<3;return n(e,ss(t,4),i,r,cn)},Ui.repeat=function(e,t,i){return t=(i?ms(e,t,i):t===r)?1:po(t),Wn(yo(e),t)},Ui.replace=function(){var e=arguments,t=yo(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Ui.result=function(e,t,i){var n=-1,s=(t=mr(t,e)).length;for(s||(s=1,e=r);++n<s;){var a=null==e?r:e[Rs(t[n])];a===r&&(n=s,a=i),e=Ya(a)?a.call(e):a}return e},Ui.round=Sl,Ui.runInContext=e,Ui.sample=function(e){return(Ha(e)?Xi:Xn)(e)},Ui.size=function(e){if(null==e)return 0;if($a(e))return so(e)?ui(e):e.length;var t=cs(e);return t==S||t==k?e.size:Mn(e).length},Ui.snakeCase=Wo,Ui.some=function(e,t,i){var n=Ha(e)?Rt:tr;return i&&ms(e,t,i)&&(t=r),n(e,ss(t,3))},Ui.sortedIndex=function(e,t){return ir(e,t)},Ui.sortedIndexBy=function(e,t,i){return nr(e,t,ss(i,2))},Ui.sortedIndexOf=function(e,t){var i=null==e?0:e.length;if(i){var n=ir(e,t);if(n<i&&Ba(e[n],t))return n}return-1},Ui.sortedLastIndex=function(e,t){return ir(e,t,!0)},Ui.sortedLastIndexBy=function(e,t,i){return nr(e,t,ss(i,2),!0)},Ui.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var i=ir(e,t,!0)-1;if(Ba(e[i],t))return i}return-1},Ui.startCase=Go,Ui.startsWith=function(e,t,i){return e=yo(e),i=null==i?0:sn(po(i),0,e.length),t=ar(t),e.slice(i,i+t.length)==t},Ui.subtract=Al,Ui.sum=function(e){return e&&e.length?Wt(e,il):0},Ui.sumBy=function(e,t){return e&&e.length?Wt(e,ss(t,2)):0},Ui.template=function(e,t,i){var n=Ui.templateSettings;i&&ms(e,t,i)&&(t=r),e=yo(e),t=bo({},t,n,Yr);var s,a,o=bo({},t.imports,n.imports,Yr),l=Po(o),u=Kt(o,l),d=0,c=t.interpolate||_e,h="__p += '",p=Ee((t.escape||_e).source+"|"+c.source+"|"+(c===Q?ce:_e).source+"|"+(t.evaluate||_e).source+"|$","g"),f="//# sourceURL="+(Oe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(p,(function(t,i,n,r,o,l){return n||(n=r),h+=e.slice(d,l).replace(be,ii),i&&(s=!0,h+="' +\n__e("+i+") +\n'"),o&&(a=!0,h+="';\n"+o+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),d=l+t.length,t})),h+="';\n";var g=Oe.call(t,"variable")&&t.variable;if(g){if(ue.test(g))throw new Te("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(H,""):h).replace(V,"$1").replace($,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=Qo((function(){return Se(l,f+"return "+h).apply(r,u)}));if(m.source=h,Xa(m))throw m;return m},Ui.times=function(e,t){if((e=po(e))<1||e>c)return[];var i=p,n=mi(e,p);t=ss(t),e-=p;for(var r=Gt(n,t);++i<e;)t(i);return r},Ui.toFinite=ho,Ui.toInteger=po,Ui.toLength=fo,Ui.toLower=function(e){return yo(e).toLowerCase()},Ui.toNumber=go,Ui.toSafeInteger=function(e){return e?sn(po(e),-9007199254740991,c):0===e?e:0},Ui.toString=yo,Ui.toUpper=function(e){return yo(e).toUpperCase()},Ui.trim=function(e,t,i){if((e=yo(e))&&(i||t===r))return Xt(e);if(!e||!(t=ar(t)))return e;var n=di(e),s=di(t);return vr(n,Zt(n,s),Jt(n,s)+1).join("")},Ui.trimEnd=function(e,t,i){if((e=yo(e))&&(i||t===r))return e.slice(0,ci(e)+1);if(!e||!(t=ar(t)))return e;var n=di(e);return vr(n,0,Jt(n,di(t))+1).join("")},Ui.trimStart=function(e,t,i){if((e=yo(e))&&(i||t===r))return e.replace(ne,"");if(!e||!(t=ar(t)))return e;var n=di(e);return vr(n,Zt(n,di(t))).join("")},Ui.truncate=function(e,t){var i=30,n="...";if(Za(t)){var s="separator"in t?t.separator:s;i="length"in t?po(t.length):i,n="omission"in t?ar(t.omission):n}var a=(e=yo(e)).length;if(ni(e)){var o=di(e);a=o.length}if(i>=a)return e;var l=i-ui(n);if(l<1)return n;var u=o?vr(o,0,l).join(""):e.slice(0,l);if(s===r)return u+n;if(o&&(l+=u.length-l),no(s)){if(e.slice(l).search(s)){var d,c=u;for(s.global||(s=Ee(s.source,yo(he.exec(s))+"g")),s.lastIndex=0;d=s.exec(c);)var h=d.index;u=u.slice(0,h===r?l:h)}}else if(e.indexOf(ar(s),l)!=l){var p=u.lastIndexOf(s);p>-1&&(u=u.slice(0,p))}return u+n},Ui.unescape=function(e){return(e=yo(e))&&G.test(e)?e.replace(z,hi):e},Ui.uniqueId=function(e){var t=++Me;return yo(e)+t},Ui.upperCase=Xo,Ui.upperFirst=Yo,Ui.each=ma,Ui.eachRight=ya,Ui.first=$s,al(Ui,(ml={},vn(Ui,(function(e,t){Oe.call(Ui.prototype,t)||(ml[t]=e)})),ml),{chain:!1}),Ui.VERSION="4.17.21",Et(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Ui[e].placeholder=Ui})),Et(["drop","take"],(function(e,t){qi.prototype[e]=function(i){i=i===r?1:gi(po(i),0);var n=this.__filtered__&&!t?new qi(this):this.clone();return n.__filtered__?n.__takeCount__=mi(i,n.__takeCount__):n.__views__.push({size:mi(i,p),type:e+(n.__dir__<0?"Right":"")}),n},qi.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Et(["filter","map","takeWhile"],(function(e,t){var i=t+1,n=1==i||3==i;qi.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ss(e,3),type:i}),t.__filtered__=t.__filtered__||n,t}})),Et(["head","last"],(function(e,t){var i="take"+(t?"Right":"");
vendor: 4,194 bytes, line 2
2qi.prototype[e]=function(){return this[i](1).value()[0]}})),Et(["initial","tail"],(function(e,t){var i="drop"+(t?"":"Right");qi.prototype[e]=function(){return this.__filtered__?new qi(this):this[i](1)}})),qi.prototype.compact=function(){return this.filter(il)},qi.prototype.find=function(e){return this.filter(e).head()},qi.prototype.findLast=function(e){return this.reverse().find(e)},qi.prototype.invokeMap=Gn((function(e,t){return"function"==typeof e?new qi(this):this.map((function(i){return In(i,e,t)}))})),qi.prototype.reject=function(e){return this.filter(Oa(ss(e)))},qi.prototype.slice=function(e,t){e=po(e);var i=this;return i.__filtered__&&(e>0||t<0)?new qi(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==r&&(i=(t=po(t))<0?i.dropRight(-t):i.take(t-e)),i)},qi.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qi.prototype.toArray=function(){return this.take(p)},vn(qi.prototype,(function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),s=Ui[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);s&&(Ui.prototype[t]=function(){var t=this.__wrapped__,o=n?[1]:arguments,l=t instanceof qi,u=o[0],d=l||Ha(t),c=function(e){var t=s.apply(Ui,Dt([e],o));return n&&h?t[0]:t};d&&i&&"function"==typeof u&&1!=u.length&&(l=d=!1);var h=this.__chain__,p=!!this.__actions__.length,f=a&&!h,g=l&&!p;if(!a&&d){t=g?t:new qi(this);var m=e.apply(t,o);return m.__actions__.push({func:ca,args:[c],thisArg:r}),new Fi(m,h)}return f&&g?e.apply(this,o):(m=this.thru(c),f?n?m.value()[0]:m.value():m)})})),Et(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Ui.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var r=this.value();return t.apply(Ha(r)?r:[],e)}return this[i]((function(i){return t.apply(Ha(i)?i:[],e)}))}})),vn(qi.prototype,(function(e,t){var i=Ui[t];if(i){var n=i.name+"";Oe.call(Ii,n)||(Ii[n]=[]),Ii[n].push({name:t,func:i})}})),Ii[Ur(r,2).name]=[{name:"wrapper",func:r}],qi.prototype.clone=function(){var e=new qi(this.__wrapped__);return e.__actions__=Cr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Cr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Cr(this.__views__),e},qi.prototype.reverse=function(){if(this.__filtered__){var e=new qi(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qi.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=Ha(e),n=t<0,r=i?e.length:0,s=function(e,t,i){for(var n=-1,r=i.length;++n<r;){var s=i[n],a=s.size;switch(s.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=mi(t,e+a);break;case"takeRight":e=gi(e,t-a)}}return{start:e,end:t}}(0,r,this.__views__),a=s.start,o=s.end,l=o-a,u=n?o:a-1,d=this.__iteratees__,c=d.length,h=0,p=mi(l,this.__takeCount__);if(!i||!n&&r==l&&p==l)return cr(e,this.__actions__);var f=[];e:for(;l--&&h<p;){for(var g=-1,m=e[u+=t];++g<c;){var y=d[g],v=y.iteratee,_=y.type,b=v(m);if(2==_)m=b;else if(!b){if(1==_)continue e;break e}}f[h++]=m}return f},Ui.prototype.at=ha,Ui.prototype.chain=function(){return da(this)},Ui.prototype.commit=function(){return new Fi(this.value(),this.__chain__)},Ui.prototype.next=function(){this.__values__===r&&(this.__values__=co(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},Ui.prototype.plant=function(e){for(var t,i=this;i instanceof ji;){var n=Us(i);n.__index__=0,n.__values__=r,t?s.__wrapped__=n:t=n;var s=n;i=i.__wrapped__}return s.__wrapped__=e,t},Ui.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof qi){var t=e;return this.__actions__.length&&(t=new qi(this)),(t=t.reverse()).__actions__.push({func:ca,args:[Zs],thisArg:r}),new Fi(t,this.__chain__)}return this.thru(Zs)},Ui.prototype.toJSON=Ui.prototype.valueOf=Ui.prototype.value=function(){return cr(this.__wrapped__,this.__actions__)},Ui.prototype.first=Ui.prototype.head,Ye&&(Ui.prototype[Ye]=function(){return this}),Ui}();ct._=pi,(n=function(){return pi}.call(t,i,t,e))===r||(e.exports=n)}.call(this)},3966:(e,t,i)=>{"use strict";
vendor: 10,980 bytes, line 2
2Object.defineProperty(t,"__esModule",{value:!0});var n=i(3602),r=i(4634),s=i(6130);function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(n),l=a(r),u=a(s);class d extends o.default{constructor(){super(),this.buffer=""}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const c=String.fromCharCode(9),h=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},p=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))'));let n,r=i.length;for(;r--;)""!==i[r]&&(n=/([^=]*)=(.*)/.exec(i[r]).slice(1),n[0]=n[0].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^['"](.*)['"]$/g,"$1"),t[n[0]]=n[1]);return t},f=e=>{const t=e.split("x"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class g extends o.default{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce(((t,i)=>{const n=i(e);return n===e?t:t.concat([n])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e),t)this.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(e),t)return i={type:"tag",tagType:"inf"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger("data",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"targetduration"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"version"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"media-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:"tag",tagType:"playlist-type"},t[1]&&(i.playlistType=t[1]),void this.trigger("data",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=l.default(h(t[1]),{type:"tag",tagType:"byterange"}),void this.trigger("data",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:"tag",tagType:"allow-cache"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:"tag",tagType:"map"},t[1]){const e=p(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=h(e.BYTERANGE))}this.trigger("data",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:"tag",tagType:"stream-inf"},t[1]&&(i.attributes=p(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=f(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["FRAME-RATE"]&&(i.attributes["FRAME-RATE"]=parseFloat(i.attributes["FRAME-RATE"])),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))),void this.trigger("data",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:"tag",tagType:"media"},t[1]&&(i.attributes=p(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:"tag",tagType:"program-date-time"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:"tag",tagType:"key"},t[1]&&(i.attributes=p(t[1]),i.attributes.IV&&("0x"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger("data",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:"tag",tagType:"start"},t[1]&&(i.attributes=p(t[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger("data",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-out-cont"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-out"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-in"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"skip"},i.attributes=p(t[1]),i.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(i.attributes["SKIPPED-SEGMENTS"]=parseInt(i.attributes["SKIPPED-SEGMENTS"],10)),i.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(i.attributes["RECENTLY-REMOVED-DATERANGES"]=i.attributes["RECENTLY-REMOVED-DATERANGES"].split(c)),void this.trigger("data",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"part"},i.attributes=p(t[1]),["DURATION"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty("BYTERANGE")&&(i.attributes.byterange=h(i.attributes.BYTERANGE)),void this.trigger("data",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"server-control"},i.attributes=p(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger("data",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"part-inf"},i.attributes=p(t[1]),["PART-TARGET"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger("data",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"preload-hint"},i.attributes=p(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t="BYTERANGE-LENGTH"===e?"length":"offset";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger("data",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"rendition-report"},i.attributes=p(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger("data",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:"tag",tagType:"daterange"},i.attributes=p(t[1]),["ID","CLASS"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),["START-DATE","END-DATE"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),["DURATION","PLANNED-DURATION"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["END-ON-NEXT"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const n=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),r=/^\d+(\.\d+)?$/.test(i.attributes[t]);i.attributes[t]=n?i.attributes[t].toString(16):r?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger("data",i)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger("data",{type:"tag",tagType:"independent-segments"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger("data",{type:"tag",tagType:"i-frames-only"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:"tag",tagType:"content-steering"},i.attributes=p(t[1]),void this.trigger("data",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:"tag",tagType:"i-frame-playlist"},i.attributes=p(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=f(i.attributes.RESOLUTION)),i.attributes["AVERAGE-BANDWIDTH"]&&(i.attributes["AVERAGE-BANDWIDTH"]=parseInt(i.attributes["AVERAGE-BANDWIDTH"],10)),i.attributes["FRAME-RATE"]&&(i.attributes["FRAME-RATE"]=parseFloat(i.attributes["FRAME-RATE"])),void this.trigger("data",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:"tag",tagType:"define"},i.attributes=p(t[1]),void this.trigger("data",i);this.trigger("data",{type:"tag",data:e.slice(4)})}}}}else this.trigger("data",{type:"comment",text:e.slice(1)})})):this.trigger("data",{type:"uri",uri:e}))}addParser({expression:e,customType:t,dataParser:i,segment:n}){"function"!=typeof i&&(i=e=>e),this.customParsers.push((r=>{if(e.exec(r))return this.trigger("data",{type:"custom",data:i(r),customType:t,segment:n}),!0}))}addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const m=function(e){const t={};return Object.keys(e).forEach((function(i){var n;t[(n=i,n.toLowerCase().replace(/-(\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},y=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:n}=e;if(!t)return;const r="#EXT-X-SERVER-CONTROL",s="holdBack",a="partHoldBack",o=i&&3*i,l=n&&2*n;i&&!t.hasOwnProperty(s)&&(t[s]=o,this.trigger("info",{message:`${r} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[s]<o&&(this.trigger("warn",{message:`${r} clamping HOLD-BACK (${t[s]}) to targetDuration * 3 (${o})`}),t[s]=o),n&&!t.hasOwnProperty(a)&&(t[a]=3*n,this.trigger("info",{message:`${r} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),n&&t[a]<l&&(this.trigger("warn",{message:`${r} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class v extends o.default{constructor(e={}){super(),this.lineStream=new d,this.parseStream=new g,this.lineStream.pipe(this.parseStream),this.mainDef
vendor: 4,132 bytes, line 2
2initions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let n,r,s={},a=!1;const o=function(){},c={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}};let h=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let p=0,f=0;const v={};this.on("end",(()=>{s.uri||!s.parts&&!s.preloadHints||(!s.map&&n&&(s.map=n),!s.key&&r&&(s.key=r),s.timeline||"number"!=typeof h||(s.timeline=h),this.manifest.preloadSegment=s)})),this.parseStream.on("data",(function(e){let d,g;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const n in e.attributes)"string"==typeof e.attributes[n]&&(e.attributes[n]=e.attributes[n].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},"allow-cache"(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const t={};"length"in e&&(s.byterange=t,t.length=e.length,"offset"in e||(e.offset=p)),"offset"in e&&(s.byterange=t,t.offset=e.offset),p=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){"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"})),e.title&&(s.title=e.title),e.duration>0&&(s.duration=e.duration),0===e.duration&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=i},key(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("com.microsoft.playready"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:e.attributes.URI});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT)return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:u.default(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(r.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,h=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map(){n={}
vendor: 5,361 bytes, line 2
2,e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange),r&&(n.key=r)},"stream-inf"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||c,e.attributes?(s.attributes||(s.attributes={}),l.default(s.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||c,!(e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME))return void this.trigger("warn",{message:"ignoring incomplete or missing media group"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes["GROUP-ID"]]=t[e.attributes["GROUP-ID"]]||{},d=t[e.attributes["GROUP-ID"]],g={default:/yes/i.test(e.attributes.DEFAULT)},g.default?g.autoselect=!0:g.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(g.language=e.attributes.LANGUAGE),e.attributes.URI&&(g.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(g.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(g.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(g.forced=/yes/i.test(e.attributes.FORCED)),d[e.attributes.NAME]=g},discontinuity(){h+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},"program-date-time"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),s.dateTimeString=e.dateTimeString,s.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):(this.manifest.targetDuration=e.duration,y.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out"(){s.cueOut=e.data},"cue-out-cont"(){s.cueOutCont=e.data},"cue-in"(){s.cueIn=e.data},skip(){this.manifest.skip=m(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part(){a=!0;const t=this.manifest.segments.length,i=m(e.attributes);s.parts=s.parts||[],s.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty("offset")||(i.byterange.offset=f),f=i.byterange.offset+i.byterange.length);const n=s.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${n} for segment #${t}`,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},"server-control"(){const t=this.manifest.serverControl=m(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),y.call(this,this.manifest),t.canSkipDateranges&&!t.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"(){const t=this.manifest.segments.length,i=m(e.attributes),n=i.type&&"PART"===i.type;s.preloadHints=s.preloadHints||[],s.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty("offset")||(i.byterange.offset=n?f:0,n&&(f=i.byterange.offset+i.byterange.length)));const r=s.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${r} for segment #${t}`,e.attributes,["TYPE","URI"]),i.type)for(let e=0;e<s.preloadHints.length-1;e++){const n=s.preloadHints[e];n.type&&n.type===i.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${r} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`})}},"rendition-report"(){const t=m(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,n=["LAST-MSN","URI"];a&&n.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,n)},"part-inf"(){this.manifest.partInf=m(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),y.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(m(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,["ID","START-DATE"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),i.duration&&i.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const n=!!i.endOnNext;if(n&&!i.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT
2=YES attribute must have a CLASS attribute"}),n&&(i.duration||i.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(v[i.id]){for(const e in v[i.id])if(i[e]&&JSON.stringify(v[i.id][e])!==JSON.stringify(i[e])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===i.id));this.manifest.dateRanges[e]=l.default(this.manifest.dateRanges[e],i),v[i.id]=l.default(v[i.id],i),this.manifest.dateRanges.pop()}else v[i.id]=i},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=m(e.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",e.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if("QUERYPARAM"in e.attributes){if("NAME"in e.attributes||"IMPORT"in e.attributes)return void this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger("error",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return"NAME"in e.attributes?"IMPORT"in e.attributes?void this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"}):"VALUE"in e.attributes&&"string"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger("error",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):"IMPORT"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger("error",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:h}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",e.attributes,["BANDWIDTH","URI"])}}[e.tagType]||o).call(t)},uri(){s.uri=e.uri,i.push(s),this.manifest.targetDuration&&!("duration"in s)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),r&&(s.key=r),s.timeline=h,n&&(s.map=n),f=0,null!==this.lastProgramDateTime&&(s.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*s.duration),s={}},comment(){},custom(){e.segment?(s.custom=s.custom||{},s.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger("warn",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const n=[];i.forEach((function(e){t.hasOwnProperty(e)||n.push(e)})),n.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${n.join(", ")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push("\n"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}t.LineStream=d,t.ParseStream=g,t.Parser=v},6444:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(244),r=i(9840),s=i(1273),a=i(6130),o=i(8978);function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(n),d=l(r),c=l(a);const h=e=>!!e&&"object"==typeof e,p=(...e)=>e.reduce(((e,t)=>("object"!=typeof t||Object.keys(t).forEach((i=>
2{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):h(e[i])&&h(t[i])?e[i]=p(e[i],t[i]):e[i]=t[i]})),e)),{}),f=e=>Object.keys(e).map((t=>e[t])),g=e=>e.reduce(((e,t)=>e.concat(t)),[]),m=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};const y=({baseUrl:e="",source:t="",range:i="",indexRange:n=""})=>{const r={uri:t,resolvedUri:u.default(e||"",t)};if(i||n){const e=(i||n).split("-");let t,s=d.default.BigInt?d.default.BigInt(e[0]):parseInt(e[0],10),a=d.default.BigInt?d.default.BigInt(e[1]):parseInt(e[1],10);s<Number.MAX_SAFE_INTEGER&&"bigint"==typeof s&&(s=Number(s)),a<Number.MAX_SAFE_INTEGER&&"bigint"==typeof a&&(a=Number(a)),t="bigint"==typeof a||"bigint"==typeof s?d.default.BigInt(a)-d.default.BigInt(s)+d.default.BigInt(1):a-s+1,"bigint"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),r.byterange={length:t,offset:s}}return r},v=e=>(e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),_={static(e){const{duration:t,timescale:i=1,sourceDuration:n,periodDuration:r}=e,s=v(e.endNumber),a=t/i;return"number"==typeof s?{start:0,end:s}:"number"==typeof r?{start:0,end:r/a}:{start:0,end:n/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:n,timescale:r=1,duration:s,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,u=v(e.endNumber),d=(t+i)/1e3,c=n+a,h=d+o-c,p=Math.ceil(h*r/s),f=Math.floor((d-c-l)*r/s),g=Math.floor((d-c)*r/s);return{start:Math.max(0,f),end:"number"==typeof u?u:Math.min(p,g)}}},b=e=>{const{type:t,duration:i,timescale:n=1,periodDuration:r,sourceDuration:s}=e,{start:a,end:o}=_[t](e),l=((e,t)=>{const i=[];for(let n=e;n<t;n++)i.push(n);return i})(a,o).map((e=>t=>{const{duration:i,timescale:n=1,periodStart:r,startNumber:s=1}=e;return{number:s+t,duration:i/n,timeline:r,time:t*i}})(e));if("static"===t){const e=l.length-1,t="number"==typeof r?r:s;l[e].duration=t-i/n*e}return l},T=e=>{const{baseUrl:t,initialization:i={},sourceDuration:n,indexRange:r="",periodStart:s,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error("NO_BASE_URL");const u=y({baseUrl:t,source:i.sourceURL,range:i.range}),d=y({baseUrl:t,source:t,indexRange:r});if(d.map=u,l){const t=b(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else n&&(d.duration=n,d.timeline=s);return d.presentationTime=a||s,d.number=o,[d]},S=(e,t,i)=>{const n=e.sidx.map?e.sidx.map:null,r=e.sidx.duration,s=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,u=t.references.filter((e=>1!==e.referenceType)),c=[],h=e.endList?"static":"dynamic",p=e.sidx.timeline;let f,g=p,m=e.mediaSequence||0;f="bigint"==typeof t.firstOffset?d.default.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<u.length;e++){const a=t.references[e],o=a.referencedSize,u=a.subsegmentDuration;let y;y="bigint"==typeof f?f+d.default.BigInt(o)-d.default.BigInt(1):f+o-1;const v=T({baseUrl:i,timescale:l,timeline:s,periodStart:p,presentationTime:g,number:m,duration:u,sourceDuration:r,indexRange:`${f}-${y}`,type:h})[0];n&&(v.map=n),c.push(v),f+="bigint"==typeof f?d.default.BigInt(o):o,g+=u/l,m++}return e.segments=c,e},A=["AUDIO","SUBTITLES"],w=1/60,E=e=>{return(t=e,i=({timeline:e})=>e,f(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},C=e=>{let t=[];return s.forEachMediaGroup(e,A,((e,i,n,r)=>{t=t.concat(e.playlists||[])})),t},k=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},I=e=>e&&e.uri+"-"+(e=>{let t;return t="bigint"==typeof e.offset||"bigint"==typeof e.length?d.default.BigInt(e.offset)+d.default.BigInt(e.length)-d.default.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),x=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=f(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||"");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>{var t;return e.discontinuityStarts=(t=e.segments||[],t.reduce(((e,t,i)=>(t.discontinuity&&e.push(i),e)),[])),e}))},P=(e,t)=>{const i=I(e.sidx),n=i&&t[i]&&t[i].sidx;return n&&S(e,n,e.sidx.resolvedUri),e},L=(e,t={})=>
vendor: 4,540 bytes, line 2
2{if(!Object.keys(t).length)return e;for(const i in e)e[i]=P(e[i],t);return e},D=({attributes:e,segments:t,sidx:i,discontinuityStarts:n})=>{const r={attributes:{NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuityStarts:n,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(r.attributes["FRAME-RATE"]=e.frameRate),e.contentProtection&&(r.contentProtection=e.contentProtection),e.serviceLocation&&(r.attributes.serviceLocation=e.serviceLocation),i&&(r.sidx=i),r},O=({attributes:e})=>"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType,M=({attributes:e})=>"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType,R=({attributes:e})=>"text/vtt"===e.mimeType||"text"===e.contentType,N=e=>e?Object.keys(e).reduce(((t,i)=>{const n=e[i];return t.concat(n.playlists)}),[]):[],U=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:n={},previousManifest:r,eventStream:s})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:u}=e[0].attributes,d=x(e.filter(O)).map(D),c=x(e.filter(M)),h=x(e.filter(R)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),f={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:a,playlists:L(d,n)};u>=0&&(f.minimumUpdatePeriod=1e3*u),t&&(f.locations=t),i&&(f.contentSteering=i),"dynamic"===o&&(f.suggestedPresentationDelay=l),s&&s.length>0&&(f.eventStream=s);const g=0===f.playlists.length,m=c.length?((e,t={},i=!1)=>{let n;const r=e.reduce(((e,r)=>{const s=r.attributes.role&&r.attributes.role.value||"",a=r.attributes.lang||"";let o=r.attributes.label||"main";if(a&&!r.attributes.label){const e=s?` (${s})`:"";o=`${r.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:"main"===s,playlists:[],uri:""});const l=P((({attributes:e,segments:t,sidx:i,mediaSequence:n,discontinuitySequence:r,discontinuityStarts:s},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,"PROGRAM-ID":1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuitySequence:r,discontinuityStarts:s,timelineStarts:e.timelineStarts,mediaSequence:n,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO="audio",o.attributes.SUBTITLES="subs"),o})(r,i),t);return e[o].playlists.push(l),void 0===n&&"main"===s&&(n=r,n.default=!0),e}),{});return n||(r[Object.keys(r)[0]].default=!0),r})(c,n,g):null,y=h.length?((e,t={})=>e.reduce(((e,i)=>{const n=i.attributes.label||i.attributes.lang||"text",r=i.attributes.lang||"und";return e[n]||(e[n]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),e[n].playlists.push(P((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:n,discontinuitySequence:r})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||"",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const s={NAME:e.id,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1};e.codecs&&(s.CODECS=e.codecs);const a={attributes:s,uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:n,discontinuitySequence:r,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,n):null,v=d.concat(N(m),N(y)),_=v.map((({timelineStarts:e})=>e));var b,T;return f.timelineStarts=E(_),b=v,T=f.timelineStarts,b.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),m&&(f.mediaGroups.AUDIO.audio=m),y&&(f.mediaGroups.SUBTITLES.subs=y),p.length&&(f.mediaGroups["CLOSED-CAPTIONS"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:n}=t;e[n]={autoselect:!1,default:!1,instreamId:i,language:n},t.hasOwnProperty("aspectRatio")&&(e[n].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[n].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[n]["3D"]=t["3D"])})),e):e),{})),r?(({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(C(e)),n=t.playlists.concat(C(t));
vendor: 1,542 bytes, line 2
2return t.timelineStarts=E([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const n=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!n)return;if(t.sidx)return;const r=t.segments[0],s=n.segments.findIndex((function(e){return Math.abs(e.presentationTime-r.presentationTime)<w}));if(-1===s)return k({playlist:t,mediaSequence:n.mediaSequence+n.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!n.segments.length&&t.timeline>n.timeline||n.segments.length&&t.timeline>n.segments[n.segments.length-1].timeline)&&t.discontinuitySequence--);n.segments[s].discontinuity&&!r.discontinuity&&(r.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),k({playlist:t,mediaSequence:n.segments[s].number})}))})({oldPlaylists:i,newPlaylists:n,timelineStarts:t.timelineStarts}),t})({oldManifest:r,newManifest:f}):f},B=(e,t,i)=>{const{NOW:n,clientOffset:r,availabilityStartTime:s,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,u=(n+r)/1e3+l-(s+o);return Math.ceil((u*a-t)/i)},j=(e,t)=>{const{type:i,minimumUpdatePeriod:n=0,media:r="",sourceDuration:s,timescale:a=1,startNumber:o=1,periodStart:l}=e,u=[];let d=-1;for(let c=0;c<t.length;c++){const h=t[c],p=h.d,f=h.r||0,g=h.t||0;let m;if(d<0&&(d=g),g&&g>d&&(d=g),f<0){const o=c+1;m=o===t.length?"dynamic"===i&&n>0&&r.indexOf("$Number$")>
vendor: 6,094 bytes, line 2
20?B(e,d,p):(s*a-d)/p:(t[o].t-d)/p}else m=f+1;const y=o+u.length+m;let v=o+u.length;for(;v<y;)u.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return u},F=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,q=(e,t)=>e.replace(F,(e=>(t,i,n,r)=>{if("$$"===t)return"$";if(void 0===e[i])return t;const s=""+e[i];return"RepresentationID"===i?s:(r=n?parseInt(r,10):1,s.length>=r?s:`${new Array(r-s.length+1).join("0")}${s}`)})(t)),H=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=e,r=y({baseUrl:e.baseUrl,source:q(n.sourceURL,i),range:n.range}),s=((e,t)=>e.duration||t?e.duration?b(e):j(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return s.map((t=>{i.Number=t.number,i.Time=t.time;const n=q(e.media||"",i),s=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/s;return{uri:n,timeline:t.timeline,duration:t.duration,resolvedUri:u.default(e.baseUrl||"",n),map:r,number:t.number,presentationTime:o}}))},V=(e,t)=>{const{duration:i,segmentUrls:n=[],periodStart:r}=e;if(!i&&!t||i&&t)throw new Error("SEGMENT_TIME_UNSPECIFIED");const s=n.map((t=>((e,t)=>{const{baseUrl:i,initialization:n={}}=e,r=y({baseUrl:i,source:n.sourceURL,range:n.range}),s=y({baseUrl:i,source:t.media,range:t.mediaRange});return s.map=r,s})(e,t)));let a;return i&&(a=b(e)),t&&(a=j(e,t)),a.map(((t,i)=>{if(s[i]){const n=s[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return n.timeline=t.timeline,n.duration=t.duration,n.number=t.number,n.presentationTime=r+(t.time-o)/a,n}})).filter((e=>e))},$=({attributes:e,segmentInfo:t})=>{let i,n;t.template?(n=H,i=p(e,t.template)):t.base?(n=T,i=p(e,t.base)):t.list&&(n=V,i=p(e,t.list));const r={attributes:e};if(!n)return r;const s=n(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else s.length?i.duration=s.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return r.attributes=i,r.segments=s,t.base&&i.indexRange&&(r.sidx=s[0],r.segments=[]),r},z=e=>e.map($),W=(e,t)=>m(e.childNodes).filter((({tagName:e})=>e===t)),G=e=>e.textContent.trim(),X=e=>{const t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,n,r,s,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(n||0)+86400*parseFloat(r||0)+3600*parseFloat(s||0)+60*parseFloat(a||0)+parseFloat(o||0)},Y={mediaPresentationDuration:e=>X(e),availabilityStartTime(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>X(e),suggestedPresentationDelay:e=>X(e),type:e=>e,timeShiftBufferDepth:e=>X(e),start:e=>X(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split("/").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?X(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},K=e=>e&&e.attributes?m(e.attributes).reduce(((e,t)=>{const i=Y[t.name]||Y.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},Q={"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","urn:mpeg:dash:mp4protection:2011":"mp4protection"},Z=(e,t)=>t.length?g(e.map((function(e){return t.map((function(t){const i=G(t),n=u.default(e.baseUrl,i),r=p(K(t),{baseUrl:n});return n!==i&&!r.serviceLocation&&e.serviceLocation&&(r.serviceLocation=e.serviceLocation),r}))}))):e,J=e=>{const t=W(e,"SegmentTemplate")[0],i=W(e,"SegmentList")[0],n=i&&W(i,"SegmentURL").map((e=>p({tag:"SegmentURL"},K(e)))),r=W(e,"SegmentBase")[0],s=i||t,a=s&&W(s,"SegmentTimeline")[0],o=i||r||t,l=o&&W(o,"Initialization")[0],u=t&&K(t);u&&l?u.initialization=l&&K(l):u&&u.initialization&&(u.initialization={sourceURL:u.initialization});const d={template:u,segmentTimeline:a&&W(a,"S").map((e=>K(e))),list:i&&p(K(i),{segmentUrls:n,initialization:K(l)}),base:r&&p(K(r),{initialization:K(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},ee=e=>g(W(e.node,"EventStream").map((t=>{const i=K(t),n=i.schemeIdUri;return W(t,"Event").map((t=>{const r=K(t),s=r.presentationTime||0,a=i.timescale||1,o=r.duration||0,l=s/a+e.attributes.start;return{schemeIdUri:n,value:i.value,id:r.id,start:l,end:l+o/a,messageData:G(t)||r.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),te=(e,t)=>(i,n)=>{const r=Z(t,W(i.node,"BaseURL")),s=p(e,{periodStart:i.attributes.start});"number"==typeof i.attributes.duration&&(s.periodDuration=i.attributes.duration);const a=W(i.node,"AdaptationSet"),o=J(i.node);return g(a.map(((e,t,i)=>n=>{const r=K(n),s=Z(t,W(n,"BaseURL")),a=W(n,"Role")[0],o={role:K(a)};let l=p(e,r,o);const u=W(n,"Accessibility")[0],d="urn:scte:dash:cc:cea-608:2015"===(h=K(u)).schemeIdUri?("string"!=typeof h.value?[]:h.value.split(";")).map((e=>{let t,i;return i=e,/^CC\d=/.test(e)?[t,i]=e.split("="):/^CC\d$/.test(e)&&(t=e),{channel:t,language:i}})):"urn:scte:dash:cc:cea-708:2015"===h.schemeIdUri?("string"!=typeof h.value?[]:h.value.split(";")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){const[i,n=""]=e.split("=");t.channel=i,t.language=e,n.split(",").forEach((e=>{const[i,n]=e.split(":");"lang"===i?t.language=n:"er"===i?t.easyReader=Number(n):"war"===i?t.aspectRatio=Number(n):"3D"===i&&(t["3D"]=Number(n))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})):void 0;var h;d&&(l=p(l,{captionServices:d}));const f=W(n,"Label")[0];if(f&&f.childNodes.length){const e=f.childNodes[0].nodeValue.trim();l=p(l,{label:e})}const m=W(n,"ContentProtection").reduce(((e,t)=>{const i=K(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const n=Q[i.schemeIdUri];if(n){e[n]={attributes:i};
2const r=W(t,"cenc:pssh")[0];if(r){const t=G(r);e[n].pssh=t&&c.default(t)}}return e}),{});Object.keys(m).length&&(l=p(l,{contentProtection:m}));const y=J(n),v=W(n,"Representation"),_=p(i,y);return g(v.map(((e,t,i)=>n=>{const r=W(n,"BaseURL"),s=Z(t,r),a=p(e,K(n)),o=J(n);return s.map((e=>({segmentInfo:p(i,o),attributes:p(a,e)})))})(l,s,_)))})(s,r,o)))},ie=(e,t)=>{if(e.length>1&&t({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!e.length)return null;const i=p({serverURL:G(e[0])},K(e[0]));return i.queryBeforeStart="true"===i.queryBeforeStart,i},ne=(e,t={})=>{const{manifestUri:i="",NOW:n=Date.now(),clientOffset:r=0,eventHandler:s=function(){}}=t,a=W(e,"Period");if(!a.length)throw new Error("INVALID_NUMBER_OF_PERIOD");const o=W(e,"Location"),l=K(e),u=Z([{baseUrl:i}],W(e,"BaseURL")),d=W(e,"ContentSteering");l.type=l.type||"static",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=n,l.clientOffset=r,o.length&&(l.locations=o.map(G));const c=[];return a.forEach(((e,t)=>{const i=K(e),n=c[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>"number"==typeof e.start?e.start:t&&"number"==typeof t.start&&"number"==typeof t.duration?t.start+t.duration:t||"static"!==i?null:0)({attributes:i,priorPeriodAttributes:n?n.attributes:null,mpdType:l.type}),c.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:ie(d,s),representationInfo:g(c.map(te(l,u))),eventStream:g(c.map(ee))}},re=e=>{if(""===e)throw new Error("DASH_EMPTY_MANIFEST");const t=new o.DOMParser;let i,n;try{i=t.parseFromString(e,"application/xml"),n=i&&"MPD"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error("DASH_INVALID_XML");return n};t.VERSION="1.3.1",t.addSidxSegmentsToPlaylist=S,t.generateSidxKey=I,t.inheritAttributes=ne,t.parse=(e,t={})=>{const i=ne(re(e),t),n=z(i.representationInfo);return U({dashPlaylists:n,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},t.parseUTCTiming=e=>(e=>{const t=W(e,"UTCTiming")[0];if(!t)return null;const i=K(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.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":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;default:throw new Error("UNSUPPORTED_UTC_TIMING_SCHEME")}return i})(re(e)),t.stringToMpdXml=re,t.toM3u8=U,t.toPlaylists=z},8962:(e,t,i)=>{var n=i(3626).getUint64;e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},r=12;0===i.version?(i.earliestPresentationTime=t.getUint32(r),i.firstOffset=t.getUint32(r+4),r+=8):(i.earliestPresentationTime=n(e.subarray(r)),i.firstOffset=n(e.subarray(r+8)),r+=16),r+=2;var s=t.getUint16(r);for(r+=2;s>0;r+=12,s--)i.references.push({referenceType:(128&e[r])>>>7,referencedSize:2147483647&t.getUint32(r),subsegmentDuration:t.getUint32(r+4),startsWithSap:!!(128&e[r+8]),sapType:(112&e[r+8])>>>4,sapDeltaTime:268435455&t.getUint32(r+8)});return i}},9622:e=>{var t,i,n,r,s,a,o,l=9e4;t=function(e){return e*l},i=function(e,t){return e*t},n=function(e){return e/l},r=function(e,t){return e/t},s=function(e,i){return t(r(e,i))},a=function(e,t){return i(n(e),t)},o=function(e,t,i){return n(i?e:e-t)},e.exports={ONE_SECOND_IN_TS:l,secondsToVideoTs:t,secondsToAudioTs:i,videoTsToSeconds:n,audioTsToSeconds:r,audioTsToVideoTs:s,videoTsToAudioTs:a,metadataTsToSeconds:o}},3626:e=>{var t=Math.pow(2,32);e.exports={getUint64:function(e){var i,n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.getBigUint64?(i=n.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(i):i:n.getUint32(0)*t+n.getUint32(4)},MAX_UINT32:t}},8228:function(e,t,i){var n,r;void 0===(r="function"==typeof(n=function(){var e={prefix:"jsb_",prefix_regexp:/jsb_([^\s]+)/,handlers:{},listeners:[],last_event_values:{},sticky_event_values:{},setPrefix:function(e){this.prefix=e+"_",this.prefix_regexp=new RegExp(this.prefix+"([^s]+)")},registerHandler:function(e,t){this.handlers[e]=t},applyBehaviour:function(e){for(var t=this.getJsbElementsInDomElement(e),i=t.length,n=null,r=null,s=null,a=0;a<i;a++){n=t[a],this.removeClassFromElement(n,this.prefix);do{(s=n.className.match(this.prefix_regexp))&&(r=s[1],this.callHandler(r,n),this.removeClassFromElement(n,this.prefix+r))}while(s)}this.fireEvent("Jsb::BEHAVIOURS_APPLIED")},fireEvent:function(e,t,i){t=t||{},(i=i||!1)?(this.sticky_event_values[e]=this.sticky_event_values[e]||[],this.sticky_event_values[e].push(t)):this.last_event_values[e]=t;
2for(var n=this.listeners,r=n.length,s=0;s<r;s++)this.rawFireEventToListener(n[s],e,t);"Jsb::REMOVED_INSTANCE"===e&&this.removeBoundListenersForInstance(t)},fireStickyEvent:function(e,t){this.fireEvent(e,t,!0)},on:function(e,t,i){var n=t||null;i||(n=null,i=t),this.listeners.push([i,e,n]);var r=this,s=function(){r.off(e,i)};return s.dontLeak=function(t){for(var s=0;s<r.listeners.length;s++){var a=r.listeners[s];if(a[0]===i&&a[1]===e&&a[2]===n)return void(a[3]=t)}},s},removeBoundListenersForInstance:function(e){for(var t=[],i=this.listeners,n=i.length,r=0;r<n;r++)i[r][3]!==e&&t.push(i[r]);this.listeners=t},off:function(e,t){var i=this.listeners;this.listeners=[];for(var n=i.length,r=0;r<n;r++)i[r][0]===t&&i[r][1].toString()===e.toString()||this.listeners.push(i[r])},whenFired:function(e,t,i){var n=this,r=t;i||(r=null,i=t);var s=this.on(e,r,i);if(e instanceof RegExp){for(var a in this.last_event_values)this.last_event_values.hasOwnProperty(a)&&a.match(e)&&function(t){var s=n.last_event_values[t];setTimeout((function(){n.rawFireEventToListener([i,e,r],t,s)}),0)}(a);for(var a in this.sticky_event_values)this.sticky_event_values.hasOwnProperty(a)&&a.match(e)&&function(t){for(var s=n.sticky_event_values[t],a=s.length,o=0;o<a;o++)!function(s){setTimeout((function(){n.rawFireEventToListener([i,e,r],t,s)}),0)}(s[o])}(a)}else{if(void 0!==this.last_event_values[e]){var o=n.last_event_values[e];setTimeout((function(){n.rawFireEventToListener([i,e,r],e,o)}),0)}if(void 0!==this.sticky_event_values[e])for(var l=n.sticky_event_values[e],u=l.length,d=0;d<u;d++)!function(t){setTimeout((function(){n.rawFireEventToListener([i,e,r],e,t)}),0)}(l[d])}return s},rawFireEventToListener:function(e,t,i){if(e[1]instanceof RegExp&&t.match(e[1])||e[1]===t){var n=e[2],r=!0;if(n)for(var s in n)n.hasOwnProperty(s)&&(r=r&&void 0!==i[s]&&n[s]===i[s]);r&&e[0](i,t)}},callHandler:function(t,i){if(void 0!==this.handlers[t]){var n=null,r=t.toString().replace(/\//g,"-");i.getAttribute("data-jsb-"+r)?n=i.getAttribute("data-jsb-"+r):i.getAttribute("data-jsb")&&(n=i.getAttribute("data-jsb")),null!==n?new this.handlers[t](i,this.parseValueString(n)):new this.handlers[t](i)}else{var s=window.require;if(void 0===s)throw new Error("The handler "+t+" is not defined!");s([t],(function(n){if(void 0===e.handlers[t]){if(void 0===n)throw new Error("The handler "+t+" is not defined (even with requirejs)!");e.registerHandler(t,n)}e.callHandler(t,i)}))}},parseValueString:function(e){if("{"==e.substr(0,1))return JSON.parse(e);for(var t={},i=e.split("&"),n=i.length,r=0;r<n;r++){var s=i[r].split("="),a=decodeURIComponent(s[0]),o=decodeURIComponent(s.slice(1).join("="));t[a]=o}return t},removeClassFromElement:function(e,t){var i=e.className;i=i.replace(new RegExp("(^|[\\s]+)"+t+"($|[\\s]+)"),"$1$2"),e.className=i},getJsbElementsInDomElement:function(e){for(var t,i=[],n=(t=e.getElementsByClassName?e.getElementsByClassName(this.prefix):e.querySelectorAll("."+this.prefix)).length,r=0;r<n;r++)i.push(t[r]);return i}};return"undefined"!=typeof window&&(window.addEventListener?window.addEventListener("DOMContentLoaded",(function(){e.applyBehaviour(window.document)}),!0):window.attachEvent&&window.attachEvent("onLoad",(function(){e.applyBehaviour(window.document)}))),e})?n.call(t,i,t,e):n)||(e.exports=r)},4686:(e,t,i)=>{var n,r=function(){"use strict";if([].indexOf||(Array.prototype.indexOf=function(e,t,i){for(t=((i=this.length)+~~t)%i;t<i&&(!(t in this)||this[t]!==e);t++);return t^i?t:-1}),"undefined"==typeof console){var e=function(){};console={},console.log=e,console.error=e,console.warn=e,console.info=e,console.debug=e,console.trace=e}else"object"==typeof console.log?console.trace=function(){console.log(arguments)}:console.trace=function(){console.log.apply(this,arguments)};var t=function(e,t,i){i=i||[],(i=Array.prototype.slice.apply(i)).unshift("["+e+"]"),"function"==typeof console[t]?console[t].apply(console,i):console[t](i)},i={logTrace:function(){i.level>=i.LEVEL_TRACE&&t(this.loggingPrefix,"trace",arguments)},logDebug:function(){i.level>=i.LEVEL_DEBUG&&t(this.loggingPrefix,"log",arguments)},logInfo:function(){i.level>=i.LEVEL_INFO&&t(this.loggingPrefix,"info",arguments)},logWarn:function(){i.level>=i.LEVEL_WARN&&t(this.loggingPrefix,"warn",arguments)},logError:function(){i.level>=i.LEVEL_ERROR&&t(this.loggingPrefix,"error",arguments)},applyLogging:function(e,n,r){var s=["logDebug","logTrace","logError","logInfo","logWarn"],a=s.length,o=!1;if(void 0!==r&&!1===r&&(o=!0),r=r||["logDebug","logTrace","logError","logInfo","logWarn"],e.loggingPrefix=n,!o)for(var l in e)"function"==typeof e[l]&&r.indexOf(l)<0&&function(n){var r=e[n];e[n]=function(){return i.level>=i.LEVEL_TRACE&&t(e.loggingPrefix+"."+n,"trace",arguments),r.apply(e,arguments)}}(l);for(var u=0;u<a;u++)e[s[u]]=e[s[u]]||i[s[u]]},setLevel:function(e){i.level=e},LEVEL_ALL:127,LEVEL_TRACE:6,LEVEL_LOG:5,LEVEL_DEBUG:5,LEVEL_INFO:4,LEVEL_WARN:3,LEVEL_ERROR:2,
2LEVEL_FATAL:1,LEVEL_OFF:0};return i.level=i.LEVEL_ALL,i}();void 0===(n=function(){return r}.call(t,i,t,e))||(e.exports=n)},2613:(e,t,i)=>{"use strict";var n=i(9840),r=i(9697),s=i(1036),a=i(4784),o=i(4634),l=i(244),u=i(3966),d=i(6897),c=i(3996),h=i(4644),p=i(6444),f=i(8962),g=i(3634),m=i(8134),y=i(9622);function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=v(n),b=v(r),T=v(s),S=v(a),A=v(o),w=v(l),E=v(f),C="8.22.0";const k={},I=function(e,t){return k[e]=k[e]||[],t&&(k[e]=k[e].concat(t)),k[e]},x=function(e,t){const i=I(e).indexOf(t);return!(i<=-1||(k[e]=k[e].slice(),k[e].splice(i,1),0))},P={prefixed:!0},L=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],D=L[0];let O;for(let e=0;e<L.length;e++)if(L[e][1]in b.default){O=L[e];break}if(O){for(let e=0;e<O.length;e++)P[D[e]]=O[e];P.prefixed=O[0]!==D[0]}let M=[];const R=function e(t,i=":",n=""){let r,s="info";function a(...e){r("log",s,e)}return r=((e,t,i)=>(n,r,s)=>{const a=t.levels[r],o=new RegExp(`^(${a})$`);let l=e;if("log"!==n&&s.unshift(n.toUpperCase()+":"),i&&(l=`%c${e}`,s.unshift(i)),s.unshift(l+":"),M){M.push([].concat(s));const e=M.length-1e3;M.splice(0,e>0?e:0)}if(!_.default.console)return;let u=_.default.console[n];u||"debug"!==n||(u=_.default.console.info||_.default.console.log),u&&a&&o.test(n)&&u[Array.isArray(s)?"apply":"call"](_.default.console,s)})(t,a,n),a.createLogger=(r,s,a)=>{const o=void 0!==s?s:i;return e(`${t} ${o} ${r}`,o,void 0!==a?a:n)},a.createNewLogger=(t,i,n)=>e(t,i,n),a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:s},a.level=e=>{if("string"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`"${e}" in not a valid log level`);s=e}return s},a.history=()=>M?[].concat(M):[],a.history.filter=e=>(M||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{M&&(M.length=0)},a.history.disable=()=>{null!==M&&(M.length=0,M=null)},a.history.enable=()=>{null===M&&(M=[])},a.error=(...e)=>r("error",s,e),a.warn=(...e)=>r("warn",s,e),a.debug=(...e)=>r("debug",s,e),a}("VIDEOJS"),N=R.createLogger,U=Object.prototype.toString,B=function(e){return q(e)?Object.keys(e):[]};function j(e,t){B(e).forEach((i=>t(e[i],i)))}function F(e,t,i=0){return B(e).reduce(((i,n)=>t(i,e[n],n)),i)}function q(e){return!!e&&"object"==typeof e}function H(e){return q(e)&&"[object Object]"===U.call(e)&&e.constructor===Object}function V(...e){const t={};return e.forEach((e=>{e&&j(e,((e,i)=>{H(e)?(H(t[i])||(t[i]={}),t[i]=V(t[i],e)):t[i]=e}))})),t}function $(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const n=e[i];t.push(n)}return t}function z(e,t,i,n=!0){const r=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),s={configurable:!0,enumerable:!0,get(){const e=i();return r(e),e}};return n&&(s.set=r),Object.defineProperty(e,t,s)}var W=Object.freeze({__proto__:null,each:j,reduce:F,isObject:q,isPlain:H,merge:V,values:$,defineLazyProperty:z});let G,X=!1,Y=null,K=!1,Q=!1,Z=!1,J=!1,ee=!1,te=null,ie=null;const ne=Boolean(_.default.cast&&_.default.cast.framework&&_.default.cast.framework.CastReceiverContext);let re=null,se=!1,ae=!1,oe=!1,le=!1,ue=!1,de=!1,ce=!1;const he=Boolean(ve()&&("ontouchstart"in _.default||_.default.navigator.maxTouchPoints||_.default.DocumentTouch&&_.default.document instanceof _.default.DocumentTouch)),pe=_.default.navigator&&_.default.navigator.userAgentData;if(pe&&pe.platform&&pe.brands&&(K="Android"===pe.platform,Z=Boolean(pe.brands.find((e=>"Microsoft Edge"===e.brand))),J=Boolean(pe.brands.find((e=>"Chromium"===e.brand))),ee=!Z&&J,te=ie=(pe.brands.find((e=>"Chromium"===e.brand))||{}).version||null,ae="Windows"===pe.platform),!J){const e=_.default.navigator&&_.default.navigator.userAgent||"";X=/iPod/i.test(e),Y=function(){const t=e.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),K=/Android/i.test(e),G=function(){const t=e.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;const i=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return i&&n?parseFloat(t[1]+"."+t[2]):i||null}(),Q=/Firefox/i.test(e),Z=/Edg/i.test(e),J=/Chrome/i.test(e)||/CriOS/i.test(e),ee=!Z&&J,te=ie=function(){const t=e.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),re=function(){const t=/MSIE\s(\d+)\.\d/.exec(e);let i=t&&parseFloat(t[1]);return!i&&/Trident\/7.0/i.test(e)&&/rv:11.0/.test(e)&&(i=11),i}(),ue=/Tizen/i.test(e),de=/Web0S/i.test(e),ce=ue||de,se=/Safari/i.test(e)&&!ee&&!K&&!Z&&!ce,ae=/Windows/i.test(e),oe=/iPad/i.test(e)||se&&he&&!/iPhone/i.test(e),le=/iPhone/i.test(e)&&!oe}const fe=le||oe||X,ge=(se||fe)&&!ee;var me=Object.freeze({__proto__:null,get IS_IPOD(){return X},get IOS_VERSION(){return Y},get IS_ANDROID(){return K},get ANDROID_VERSION(){return G},get IS_FIREFOX(){return Q},get IS_EDGE(){return Z},get IS_CHROMIUM(){return J},get IS_CHROME(){return ee},get CHROMIUM_VERSION(){return te},get CHROME_VERSION(){return ie},IS_CHROMECAST_RECEIVER:ne,get IE_VERSION(){return re},get IS_SAFARI(){return se},get IS_WINDOWS(){return ae},get IS_IPAD(){return oe},get IS_IPHONE(){return le},get IS_TIZEN(){return ue},get IS_WEBOS(){return de},get IS_SMART_TV(){return ce},TOUCH_ENABLED:he,IS_IOS:fe,IS_ANY_SAFARI:ge});function ye(e){return"string"==typeof e&&Boolean(e.trim())}function ve(){return b.default===_.default.document}function _e(e){return q(e)&&1===e.nodeType}function be(){try{return _.default.parent!==_.default.self}catch(e){return!0}}function Te(e){return function(t,i){if(!ye(t))return b.default[e](null);ye(i)&&(i=b.default.querySelector(i));const n=_e(i)?i:b.default;return n[e]&&n[e](t)}}function Se(e="div",t={},i={},n){const r=b.default.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];"textContent"===e?Ae(r,i):r[e]===i&&"tabIndex"!==e||(r[e]=i)}
vendor: 2,191 bytes, line 2
2)),Object.getOwnPropertyNames(i).forEach((function(e){r.setAttribute(e,i[e])})),n&&He(r,n),r}function Ae(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function we(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Ee(e,t){return function(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}(t),e.classList.contains(t)}function Ce(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\s+/))),[])),e}function ke(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\s+/))),[])),e):(R.warn("removeClass was called with an element that doesn't exist"),null)}function Ie(e,t,i){return"function"==typeof i&&(i=i(e,t)),"boolean"!=typeof i&&(i=void 0),t.split(/\s+/).forEach((t=>e.classList.toggle(t,i))),e}function xe(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const n=t[i];null==n||!1===n?e.removeAttribute(i):e.setAttribute(i,!0===n?"":n)}))}function Pe(e){const t={},i=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(e&&e.attributes&&e.attributes.length>0){const n=e.attributes;for(let e=n.length-1;e>=0;e--){const r=n[e].name;let s=n[e].value;i.includes(r)&&(s=null!==s),t[r]=s}}return t}function Le(e,t){return e.getAttribute(t)}function De(e,t,i){e.setAttribute(t,i)}function Oe(e,t){e.removeAttribute(t)}function Me(){b.default.body.focus(),b.default.onselectstart=function(){return!1}}function Re(){b.default.onselectstart=function(){return!0}}function Ne(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(Ge(e,"height"))),i.width||(i.width=parseFloat(Ge(e,"width"))),i}}function Ue(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let n=0,r=0;for(;e.offsetParent&&e!==b.default[P.fullscreenElement];)n+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{left:n,top:r,width:t,height:i}}function Be(e,t){const i={x:0,y:0};if(fe){let t=e;for(;t&&"html"!==t.nodeName.toLowerCase();){const e=Ge(t,"transform");
2if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&_.default.WebKitCSSMatrix){const e=_.default.getComputedStyle(t.assignedSlot.parentElement).transform,n=new _.default.WebKitCSSMatrix(e);i.x+=n.m41,i.y+=n.m42}t=t.parentNode||t.host}}const n={},r=Ue(t.target),s=Ue(e),a=s.width,o=s.height;let l=t.offsetY-(s.top-r.top),u=t.offsetX-(s.left-r.left);return t.changedTouches&&(u=t.changedTouches[0].pageX-s.left,l=t.changedTouches[0].pageY+s.top,fe&&(u-=i.x,l-=i.y)),n.y=1-Math.max(0,Math.min(1,l/o)),n.x=Math.max(0,Math.min(1,u/a)),n}function je(e){return q(e)&&3===e.nodeType}function Fe(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function qe(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>("function"==typeof e&&(e=e()),_e(e)||je(e)?e:"string"==typeof e&&/\S/.test(e)?b.default.createTextNode(e):void 0))).filter((e=>e))}function He(e,t){return qe(t).forEach((t=>e.appendChild(t))),e}function Ve(e,t){return He(Fe(e),t)}function $e(e){return void 0===e.button&&void 0===e.buttons||0===e.button&&void 0===e.buttons||"mouseup"===e.type&&0===e.button&&0===e.buttons||"mousedown"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons}const ze=Te("querySelector"),We=Te("querySelectorAll");function Ge(e,t){if(!e||!t)return"";if("function"==typeof _.default.getComputedStyle){let i;try{i=_.default.getComputedStyle(e)}catch(e){return""}return i?i.getPropertyValue(t)||i[t]:""}return""}function Xe(e){[...b.default.styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(""),n=b.default.createElement("style");n.textContent=i,e.document.head.appendChild(n)}catch(i){const n=b.default.createElement("link");n.rel="stylesheet",n.type=t.type,n.media=t.media.mediaText,n.href=t.href,e.document.head.appendChild(n)}}))}var Ye=Object.freeze({__proto__:null,isReal:ve,isEl:_e,isInFrame:be,createEl:Se,textContent:Ae,prependTo:we,hasClass:Ee,addClass:Ce,removeClass:ke,toggleClass:Ie,setAttributes:xe,getAttributes:Pe,getAttribute:Le,setAttribute:De,removeAttribute:Oe,blockTextSelection:Me,unblockTextSelection:Re,getBoundingClientRect:Ne,findPosition:Ue,getPointerPosition:Be,isTextNode:je,emptyEl:Fe,normalizeContent:qe,appendContent:He,insertContent:Ve,isSingleLeftClick:$e,$:ze,$$:We,computedStyle:Ge,copyStyleSheetsToWindow:Xe});let Ke,Qe=!1;const Ze=function(){if(!1===Ke.options.autoSetup)return;const e=Array.prototype.slice.call(b.default.getElementsByTagName("video")),t=Array.prototype.slice.call(b.default.getElementsByTagName("audio")),i=Array.prototype.slice.call(b.default.getElementsByTagName("video-js")),n=e.concat(t,i);if(n&&n.length>0)for(let e=0,t=n.length;e<t;e++){const t=n[e];if(!t||!t.getAttribute){Je(1);break}void 0===t.player&&null!==t.getAttribute("data-setup")&&Ke(t)}else Qe||Je(1)};function Je(e,t){ve()&&(t&&(Ke=t),_.default.setTimeout(Ze,e))}function et(){Qe=!0,_.default.removeEventListener("load",et)}ve()&&("complete"===b.default.readyState?et():_.default.addEventListener("load",et));const tt=function(e){const t=b.default.createElement("style");return t.className=e,t},it=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var nt=new WeakMap;let rt,st=3;function at(){return st++}function ot(e,t){if(!nt.has(e))return;const i=nt.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&nt.delete(e)}function lt(e,t,i,n){i.forEach((function(i){e(t,i,n)}))}function ut(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const n=e||_.default.event;e={};const r=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const t in n)r.includes(t)||"returnValue"===t&&n.preventDefault||(e[t]=n[t]);if(e.target||(e.target=e.srcElement||b.default),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){n.preventDefault&&n.preventDefault(),e.returnValue=!1,n.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),e.cancelBubble=!0,n.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=b.default.documentElement,i=b.default.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const dt=["touchstart","touchmove"];function ct(e,t,i){if(Array.isArray(t))return lt(ct,e,t,i);nt.has(e)||nt.set(e,{});const n=nt.get(e);if(n.handlers||(n.handlers={}),n.handlers[t]||(n.handlers[t]=[]),i.guid||(i.guid=at()),n.handlers[t].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(t,i){if(n.disabled)return;t=ut(t);const r=n.handlers[t.type];if(r){const n=r.slice(0);for(let r=0,s=n.length;r<s&&!t.isImmediatePropagationStopped();r++)try{n[r].call(e,t,i)}catch(e){R.error(e)}}}),1===n.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if("boolean"!=typeof rt){rt=!1;try{const e=Object.defineProperty({},"passive",{get(){rt=!0}});_.default.addEventListener("test",null,e),_.default.removeEventListener("test",null,e)}catch(e){}}return rt}
vendor: 26,738 bytes, line 2
2)()&&dt.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,n.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,n.dispatcher)}function ht(e,t,i){if(!nt.has(e))return;const n=nt.get(e);if(!n.handlers)return;if(Array.isArray(t))return lt(ht,e,t,i);const r=function(e,t){n.handlers[t]=[],ot(e,t)};if(void 0===t){for(const t in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},t)&&r(e,t);return}const s=n.handlers[t];if(s)if(i){if(i.guid)for(let e=0;e<s.length;e++)s[e].guid===i.guid&&s.splice(e--,1);ot(e,t)}else r(e,t)}function pt(e,t,i){const n=nt.has(e)?nt.get(e):{},r=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=ut(t),n.dispatcher&&n.dispatcher.call(e,t,i),r&&!t.isPropagationStopped()&&!0===t.bubbles)pt.call(null,r,t,i);else if(!r&&!t.defaultPrevented&&t.target&&t.target[t.type]){nt.has(t.target)||nt.set(t.target,{});const e=nt.get(t.target);t.target[t.type]&&(e.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function ft(e,t,i){if(Array.isArray(t))return lt(ft,e,t,i);const n=function(){ht(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||at(),ct(e,t,n)}function gt(e,t,i){const n=function(){ht(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||at(),ct(e,t,n)}var mt=Object.freeze({__proto__:null,fixEvent:ut,on:ct,off:ht,trigger:pt,one:ft,any:gt});const yt=30,vt=function(e,t,i){t.guid||(t.guid=at());const n=t.bind(e);return n.guid=i?i+"_"+t.guid:t.guid,n},_t=function(e,t){let i=_.default.performance.now();return function(...n){const r=_.default.performance.now();r-i>=t&&(e(...n),i=r)}},bt=function(e,t,i,n=_.default){let r;const s=function(){const s=this,a=arguments;let o=function(){r=null,o=null,i||e.apply(s,a)};!r&&i&&e.apply(s,a),n.clearTimeout(r),r=n.setTimeout(o,t)};return s.cancel=()=>{n.clearTimeout(r),r=null},s};var Tt=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:yt,bind_:vt,throttle:_t,debounce:bt});let St;class At{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},ct(this,e,t),this.addEventListener=i}off(e,t){ht(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},ft(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},gt(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;"string"==typeof e&&(e={type:t}),e=ut(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),pt(this,e)}queueTrigger(e){St||(St=new Map);const t=e.type||e;let i=St.get(this);i||(i=new Map,St.set(this,i));const n=i.get(t);i.delete(t),_.default.clearTimeout(n);const r=_.default.setTimeout((()=>{i.delete(t),0===i.size&&(i=null,St.delete(this)),this.trigger(e)}),0);i.set(t,r)}}At.prototype.allowedEvents_={},At.prototype.addEventListener=At.prototype.on,At.prototype.removeEventListener=At.prototype.off,At.prototype.dispatchEvent=At.prototype.trigger;const wt=e=>"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,Et=e=>e instanceof At||!!e.eventBusEl_&&["on","one","off","trigger"].every((t=>"function"==typeof e[t])),Ct=e=>"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length,kt=(e,t,i)=>{if(!e||!e.nodeName&&!Et(e))throw new Error(`Invalid target for ${wt(t)}#${i}; must be a DOM node or evented object.`)},It=(e,t,i)=>{if(!Ct(e))throw new Error(`Invalid event type for ${wt(t)}#${i}; must be a non-empty string or array.`)},xt=(e,t,i)=>{if("function"!=typeof e)throw new Error(`Invalid listener for ${wt(t)}#${i}; must be a function.`)},Pt=(e,t,i)=>{const n=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let r,s,a;return n?(r=e.eventBusEl_,t.length>=3&&t.shift(),[s,a]=t):(r=t[0],s=t[1],a=t[2]),kt(r,e,i),It(s,e,i),xt(a,e,i),a=vt(e,a),{isTargetingSelf:n,target:r,type:s,listener:a}},Lt=(e,t,i,n)=>{kt(e,e,t),e.nodeName?mt[t](e,i,n):e[t](i,n)},Dt={on(...e){const{isTargetingSelf:t,target:i,type:n,listener:r}=Pt(this,e,"on");if(Lt(i,"on",n,r),!t){const e=()=>this.off(i,n,r);e.guid=r.guid;const t=()=>this.off("dispose",e);t.guid=r.guid,Lt(this,"on","dispose",e),Lt(i,"on","dispose",t)}},one(...e){const{isTargetingSelf:t,target:i,type:n,listener:r}=Pt(this,e,"one");if(t)Lt(i,"one",n,r);else{const e=(...t)=>{this.off(i,n,e),r.apply(null,t)};e.guid=r.guid,Lt(i,"one",n,e)}},any(...e){const{isTargetingSelf:t,target:i,type:n,listener:r}=Pt(this,e,"any");if(t)Lt(i,"any",n,r);else{const e=(...t)=>{this.off(i,n,e),r.apply(null,t)};e.guid=r.guid,Lt(i,"any",n,e)}},off(e,t,i){if(!e||Ct(e))ht(this.eventBusEl_,e,t);else{const n=e,r=t;kt(n,this,"off"),It(r,this,"off"),xt(i,this,"off"),i=vt(this,i),this.off("dispose",i),n.nodeName?(ht(n,r,i),ht(n,"dispose",i)):Et(n)&&(n.off(r,i),n.off("dispose",i))}},trigger(e,t){kt(this.eventBusEl_,this,"trigger");const i=e&&"string"!=typeof e?e.type:e;if(!Ct(i))throw new Error(`Invalid event type for ${wt(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return pt(this.eventBusEl_,e,t)}};function Ot(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Se("span",{className:"vjs-event-bus"});return Object.assign(e,Dt),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on("dispose",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&nt.has(e)&&nt.delete(e)})),_.default.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const Mt={state:{},setState(e){let t;return"function"==typeof e&&(e=e()),j(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&Et(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Rt(e,t){return Object.assign(e,Mt),e.state=Object.assign({},e.state,t),"function"==typeof e.handleStateChanged&&Et(e)&&e.on("statechanged",e.handleStateChanged),e}const Nt=function(e){return"string"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},Ut=function(e){return"string"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Bt=function(e,t){return Ut(e)===Ut(t)};var jt=Object.freeze({__proto__:null,toLowerCase:Nt,toTitleCase:Ut,titleCaseEquals:Bt});class Ft{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=V({},this.options_),t=this.options_=V(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||"no_player";this.id_=`${t}_component_${at()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach((e=>this.addClass(e))),["on","off","one","any","trigger"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(Ot(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Rt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=V(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Se(e,t,i)}localize(e,t,i=e){const n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),s=r&&r[n],a=n&&n.split("-")[0],o=r&&r[a];let l=i;return s&&s[e]?l=s[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,i){const n=t[i-1];let r=n;return void 0===n&&(r=e),r}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i="http://www.w3.org/2000/svg",n=Se("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),r=b.default.createElementNS(i,"svg");r.setAttributeNS(null,"viewBox","0 0 512 512");const s=b.default.createElementNS(i,"use");return r.appendChild(s),s.setAttributeNS(null,"href",`#vjs-icon-${e}`),n.appendChild(r),this.iconIsSet_?t.replaceChild(n,t.querySelector(".vjs-icon-placeholder")):t.appendChild(n),this.iconIsSet_=!0,n}addChild(e,t={},i=this.children_.length){let n,r;if("string"==typeof e){r=Ut(e);const i=t.componentClass||r;t.name=r;const s=Ft.getComponent(i);if(!s)throw new Error(`Component ${i} does not exist`);if("function"!=typeof s)return null;n=new s(this.player_||this,t)}else n=e;if(n.parentComponent_&&n.parentComponent_.removeChild(n),this.children_.splice(i,0,n),n.parentComponent_=this,"function"==typeof n.id&&(this.childIndex_[n.id()]=n),r=r||n.name&&Ut(n.name()),r&&(this.childNameIndex_[r]=n,this.childNameIndex_[Nt(r)]=n),"function"==typeof n.el&&n.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:_e(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(n.el(),e)}return n}removeChild(e){if("string"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Ut(e.name())]=null,this.childNameIndex_[Nt(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let n=e.opts;if(void 0!==t[i]&&(n=t[i]),!1===n)return;!0===n&&(n={}),n.playerOptions=this.options_.playerOptions;const r=this.addChild(i,n);r&&(this[i]=r)};let n;const r=Ft.getComponent("Tech");n=Array.isArray(e)?e:Object.keys(e),n.concat(Object.keys(this.options_).filter((function(e){return!n.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,n;return"string"==typeof t?(i=t,n=e[i]||this.options_[i]||{}):(i=t.name,n=t),{name:i,opts:n}})).filter((e=>{const t=Ft.getComponent(e.opts.componentClass||Ut(e.name));return t&&!r.isTech(t)})).forEach(i)}}buildCSSClass(){return""}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)}$(e,t){return ze(e,t||this.contentEl())}$$(e,t){return We(e,t||this.contentEl())}hasClass(e){return Ee(this.el_,e)}addClass(...e){Ce(this.el_,...e)}removeClass(...e){ke(this.el_,...e)}toggleClass(e,t){Ie(this.el_,e,t)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return Le(this.el_,e)}setAttribute(e,t){De(this.el_,e,t)}removeAttribute(e){Oe(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;const n=this.el_.style[e],r=n.indexOf("px");return-1!==r?parseInt(n.slice(0,r),10):parseInt(this.el_["offset"+Ut(e)],10)}currentDimension(e){let t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=Ge(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${Ut(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&("Tab"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e,t=0,i=null;this.on("touchstart",(function(n){1===n.touches.length&&(i={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=_.default.performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(i){const n=t.touches[0].pageX-i.pageX,r=t.touches[0].pageY-i.pageY;Math.sqrt(n*n+r*r)>10&&(e=!1)}}));const n=function(){e=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",(function(n){i=null,!0===e&&_.default.performance.now()-t<200&&(n.preventDefault(),this.trigger("tap"))}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=vt(this.player(),this.player().reportUserActivity);let t;this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}setTimeout(e,t){var i;return e=vt(this,e),this.clearTimersOnDispose_(),i=_.default.setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),_.default.clearTimeout(e)),e}setInterval(e,t){e=vt(this,e),this.clearTimersOnDispose_();const i=_.default.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),_.default.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=vt(this,e),t=_.default.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=vt(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),_.default.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=_.default.getComputedStyle(e,null),i=t.getPropertyValue("visibility");return"none"!==t.getPropertyValue("display")&&!["hidden","collapse"].includes(i)}return e||(e=this.el()),!!(function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(b.default.documentElement.clientWidth||_.default.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(b.default.documentElement.clientHeight||_.default.innerHeight))return!1;let i=b.default.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)&&(i=e,t(i.parentElement)&&t(i)&&"0"!==i.style.opacity&&"0px"!==_.default.getComputedStyle(i).height&&"0px"!==_.default.getComputedStyle(i).width)&&(!e.parentElement||e.tabIndex>=0));var i}static registerComponent(e,t){if("string"!=typeof e||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const i=Ft.getComponent("Tech"),n=i&&i.isTech(t),r=Ft===t||Ft.prototype.isPrototypeOf(t.prototype);if(n||!r){let t;throw t=n?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error(`Illegal component, "${e}"; ${t}.`)}e=Ut(e),Ft.components_||(Ft.components_={});const s=Ft.getComponent("Player");if("Player"===e&&s&&s.players){const e=s.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error("Can not register Player component after player has been created.")}return Ft.components_[e]=t,Ft.components_[Nt(e)]=t,t}static getComponent(e){if(e&&Ft.components_)return Ft.components_[e]}}function qt(e,t,i,n){return function(e,t,i){if("number"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,n,i.length-1),i[n][t]}function Ht(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:qt.bind(null,"start",0,e),end:qt.bind(null,"end",1,e)},_.default.Symbol&&_.default.Symbol.iterator&&(t[_.default.Symbol.iterator]=()=>(e||[]).values()),t}function Vt(e,t){return Array.isArray(e)?Ht(e):void 0===e||void 0===t?Ht():Ht([[e,t]])}Ft.registerComponent("Component",Ft);const $t=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),n=Math.floor(e/60%60),r=Math.floor(e/3600);const s=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=n=i="-"),r=r>0||a>0?r+":":"",n=((r||s>=10)&&n<10?"0"+n:n)+":",i=i<10?"0"+i:i,r+n+i};let zt=$t;function Wt(e){zt=e}function Gt(){zt=$t}function Xt(e,t=e){return zt(e,t)}var Yt=Object.freeze({__proto__:null,createTimeRanges:Vt,createTimeRange:Vt,setFormatTime:Wt,resetFormatTime:Gt,formatTime:Xt});function Kt(e,t){let i,n,r=0;if(!t)return 0;e&&e.length||(e=Vt(0,0));for(let s=0;s<e.length;s++)i=e.start(s),n=e.end(s),n>t&&(n=t),r+=n-i;return r/t}function Qt(e){if(e instanceof Qt)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:q(e)&&("number"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Qt.defaultMessages[this.code]||"")}function Zt(e){return null!=e&&"function"==typeof e.then}function Jt(e){Zt(e)&&e.then(null,(e=>{}))}Qt.prototype.code=0,Qt.prototype.message="",Qt.prototype.status=null,Qt.prototype.metadata=null,Qt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Qt.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."},Qt.MEDIA_ERR_CUSTOM=0,Qt.prototype.MEDIA_ERR_CUSTOM=0,Qt.MEDIA_ERR_ABORTED=1,Qt.prototype.MEDIA_ERR_ABORTED=1,Qt.MEDIA_ERR_NETWORK=2,Qt.prototype.MEDIA_ERR_NETWORK=2,Qt.MEDIA_ERR_DECODE=3,Qt.prototype.MEDIA_ERR_DECODE=3,Qt.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Qt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Qt.MEDIA_ERR_ENCRYPTED=5,Qt.prototype.MEDIA_ERR_ENCRYPTED=5;const ei=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(((t,i,n)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};const ti="vjs-modal-dialog";class ii extends Ft{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Se("div",{className:`${ti}-content`},{role:"document"}),this.descEl_=Se("p",{className:`${ti}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),Ae(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${ti} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if("boolean"==typeof e){const t=this.closeable_=!!e;let i=this.getChild("closeButton");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=e,this.on(i,"close",this.close_)}!t&&i&&(this.off(i,"close",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),Ve(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t);const r=this.getChild("closeButton");r&&i.appendChild(r.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),Fe(this.contentEl()),this.trigger("modalempty")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=b.default.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),"Escape"===e.key&&this.closeable())return e.preventDefault(),void this.close();if("Tab"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(":focus");let n;for(let e=0;e<t.length;e++)if(i===t[e]){n=e;break}b.default.activeElement===this.el_&&(n=0),e.shiftKey&&0===n?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||n!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(e=>(e instanceof _.default.HTMLAnchorElement||e instanceof _.default.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof _.default.HTMLInputElement||e instanceof _.default.HTMLSelectElement||e instanceof _.default.HTMLTextAreaElement||e instanceof _.default.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof _.default.HTMLIFrameElement||e instanceof _.default.HTMLObjectElement||e instanceof _.default.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")))}}ii.prototype.options_={pauseOnOpen:!0,temporary:!0},Ft.registerComponent("ModalDialog",ii);class ni extends At{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},Et(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let i=0,n=this.length;i<n;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})}getTrackById(e){let t=null;for(let i=0,n=this.length;i<n;i++){const n=this[i];if(n.id===e){t=n;break}}return t}}ni.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const e in ni.prototype.allowedEvents_)ni.prototype["on"+e]=null;const ri=function(e,t){for(let i=0;i<e.length;
2i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)},si=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class ai extends ni{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}}class oi{constructor(e){oi.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const n=e.length;this.cues_=e,this.length_=e.length;const r=function(e){""+e in this||Object.defineProperty(this,""+e,{get(){return this.cues_[e]}})};if(t<n)for(i=t;i<n;i++)r.call(this,i)}getCueById(e){let t=null;for(let i=0,n=this.length;i<n;i++){const n=this[i];if(n.id===e){t=n;break}}return t}}const li={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},ui={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},di={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},ci={disabled:"disabled",hidden:"hidden",showing:"showing"};class hi extends At{constructor(e={}){super();const t={id:e.id||"vjs_track_"+at(),kind:e.kind||"",language:e.language||""};let i=e.label||"";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,"label",{get:()=>i,set(e){e!==i&&(i=e,this.trigger("labelchange"))}})}}const pi=function(e){return new URL(e,b.default.baseURI)},fi=function(e){return new URL(e,b.default.baseURI).href},gi=function(e){if("string"==typeof e){const t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},mi=function(e,t=_.default.location){return pi(e).origin!==t.origin};var yi=Object.freeze({__proto__:null,parseUrl:pi,getAbsoluteURL:fi,getFileExtension:gi,isCrossOrigin:mi});const vi=function(e,t){const i=new _.default.WebVTT.Parser(_.default,_.default.vttjs,_.default.WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),n.length>0&&(_.default.console&&_.default.console.groupCollapsed&&_.default.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),n.forEach((e=>R.error(e))),_.default.console&&_.default.console.groupEnd&&_.default.console.groupEnd()),i.flush()},_i=function(e,t){const i={uri:e},n=mi(e);n&&(i.cors=n);const r="use-credentials"===t.tech_.crossOrigin();r&&(i.withCredentials=r),T.default(i,vt(this,(function(e,i,n){if(e)return R.error(e,i);t.loaded_=!0,"function"!=typeof _.default.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(e=>{if("vttjserror"!==e.type)return vi(n,t);R.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):vi(n,t)})))};class bi extends hi{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const t=V(e,{kind:di[e.kind]||"subtitles",language:e.language||e.srclang||""});let i=ci[t.mode]||"disabled";const n=t.default;"metadata"!==t.kind&&"chapters"!==t.kind||(i="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const r=new oi(this.cues_),s=new oi(this.activeCues_);let a=!1;this.timeupdateHandler=vt(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger("cuechange"),a=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))})),this.tech_.one("dispose",(()=>{this.stopTracking()})),"disabled"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>n,set(){}},mode:{get:()=>
vendor: 8,253 bytes, line 2
2i,set(e){ci[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||_i(this.src,this),this.stopTracking(),"disabled"!==i&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?r:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return s;const e=this.tech_.currentTime(),t=[];for(let i=0,n=this.cues.length;i<n;i++){const n=this.cues[i];n.startTime<=e&&n.endTime>=e&&t.push(n)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||"subtitles"!==t.kind&&"captions"!==t.kind)&&_i(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let t=e;if(!("getCueAsHTML"in t)){t=new _.default.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}bi.prototype.allowedEvents_={cuechange:"cuechange"};class Ti extends hi{constructor(e={}){const t=V(e,{kind:ui[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"enabled",{get:()=>i,set(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class Si extends hi{constructor(e={}){const t=V(e,{kind:li[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"selected",{get:()=>i,set(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),t.selected&&(this.selected=t.selected)}}class Ai extends At{constructor(e={}){let t;super();const i=new bi(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=Ai.NONE,i.addEventListener("loadeddata",(()=>{t=Ai.LOADED,this.trigger({type:"load",target:this})}))}}Ai.prototype.allowedEvents_={load:"load"},Ai.NONE=0,Ai.LOADING=1,Ai.LOADED=2,Ai.ERROR=3;const wi={audio:{ListClass:class extends ni{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){ri(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&ri(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,ri(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}},TrackClass:Ti,capitalName:"Audio"},video:{ListClass:class extends ni{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){si(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&si(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,si(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}},TrackClass:Si,capitalName:"Video"},text:{ListClass:ai,TrackClass:bi,capitalName:"Text"}};Object.keys(wi).forEach((function(e){wi[e].getterName=`${e}Tracks`,wi[e].privateName=`${e}Tracks_`}));const Ei={remoteText:{ListClass:ai,TrackClass:bi,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===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}}},TrackClass:Ai,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Ci=Object.assign({},wi,Ei);Ei.names=Object.keys(Ei),wi.names=Object.keys(wi),Ci.names=[].concat(Ei.names).concat(wi.names);class ki extends Ft{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",(function(){this.hasStarted_=!0})),this.on("loadstart",(function(){this.hasStarted_=!1})),Ci.names.forEach((t=>{const i=Ci[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new Ci.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(vt(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return Vt(0,0)}bufferedPercent(){return Kt(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(wi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}
2clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const n=t[i];"text"===e&&this.removeRemoteTextTrack(n),t.removeTrack(n)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Qt(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?Vt(0,0):Vt()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){wi.names.forEach((e=>{const t=wi[e],i=()=>{this.trigger(`${e}trackchange`)},n=this[t.getterName]();n.addEventListener("removetrack",i),n.addEventListener("addtrack",i),this.on("dispose",(()=>{n.removeEventListener("removetrack",i),n.removeEventListener("addtrack",i)}))}))}addWebVttScript_(){if(!_.default.WebVTT)if(b.default.body.contains(this.el())){if(!this.options_["vtt.js"]&&H(S.default)&&Object.keys(S.default).length>0)return void this.trigger("vttjsloaded");const e=b.default.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",(()=>{e.onload=null,e.onerror=null})),_.default.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),n=t=>e.removeTrack(t.track);t.on("addtrack",i),t.on("removetrack",n),this.addWebVttScript_();const r=()=>this.trigger("texttrackchange"),s=()=>{r();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener("cuechange",r),"showing"===i.mode&&i.addEventListener("cuechange",r)}};s(),e.addEventListener("change",s),e.addEventListener("addtrack",s),e.addEventListener("removetrack",s),this.on("dispose",(function(){t.off("addtrack",i),t.off("removetrack",n),e.removeEventListener("change",s),e.removeEventListener("addtrack",s),e.removeEventListener("removetrack",s);for(let t=0;t<e.length;t++)e[t].removeEventListener("cuechange",r)}))}addTextTrack(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,i,n,r={}){const s=e.textTracks();r.kind=t,i&&(r.label=i),n&&(r.language=n),r.tech=e;const a=new Ci.text.TrackClass(r);return s.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=V(e,{tech:this});return new Ei.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return"boolean"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=at();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,t){return ki.canPlayType(e.type)}static isTech(e){return e.prototype instanceof ki||e instanceof ki||e===ki}static registerTech(e,t){if(ki.techs_||(ki.techs_={}),!ki.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!ki.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!ki.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Ut(e),ki.techs_[e]=t,ki.techs_[Nt(e)]=t,"Tech"!==e&&ki.defaultTechOrder_.push(e),t}static getTech(e){if(e)return ki.techs_&&ki.techs_[e]?ki.techs_[e]:(e=Ut(e),_.default&&_.default.videojs&&_.default.videojs[e]?(R.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),_.default.videojs[e]):void 0)}}
vendor: 48,809 bytes, line 2
2Ci.names.forEach((function(e){const t=Ci[e];ki.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),ki.prototype.featuresVolumeControl=!0,ki.prototype.featuresMuteControl=!0,ki.prototype.featuresFullscreenResize=!1,ki.prototype.featuresPlaybackRate=!1,ki.prototype.featuresProgressEvents=!1,ki.prototype.featuresSourceset=!1,ki.prototype.featuresTimeupdateEvents=!1,ki.prototype.featuresNativeTextTracks=!1,ki.prototype.featuresVideoFrameCallback=!1,ki.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let n=e.sourceHandlers;n||(n=e.sourceHandlers=[]),void 0===i&&(i=n.length),n.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let n;for(let e=0;e<i.length;e++)if(n=i[e].canPlayType(t),n)return n;return""},e.selectSourceHandler=function(t,i){const n=e.sourceHandlers||[];let r;for(let e=0;e<n.length;e++)if(r=n[e].canHandleSource(t,i),r)return n[e];return null},e.canPlaySource=function(t,i){const n=e.selectSourceHandler(t,i);return n?n.canHandleSource(t,i):""},["seekable","seeking","duration"].forEach((function(e){const t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:R.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.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)}},Ft.registerComponent("Tech",ki),ki.registerTech("Tech",ki),ki.defaultTechOrder_=[];const Ii={},xi={},Pi={};function Li(e,t,i){e.setTimeout((()=>Ui(t,Ii[t.type],i,e)),1)}function Di(e,t,i,n=null){const r="call"+Ut(i),s=e.reduce(Ni(r),n),a=s===Pi,o=a?null:t[i](s);return function(e,t,i,n){for(let r=e.length-1;r>=0;r--){const s=e[r];s[t]&&s[t](n,i)}}(e,i,o,a),o}const Oi={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Mi={setCurrentTime:1,setMuted:1,setVolume:1},Ri={play:1,pause:1};function Ni(e){return(t,i)=>t===Pi?Pi:i[e]?i[e](t):t}function Ui(e={},t=[],i,n,r=[],s=!1){const[a,...o]=t;if("string"==typeof a)Ui(e,Ii[a],i,n,r,s);else if(a){const t=function(e,t){const i=xi[e.id()];let n=null;if(null==i)return n=t(e),xi[e.id()]=[[t,n]],n;for(let e=0;e<i.length;e++){const[r,s]=i[e];r===t&&(n=s)}return null===n&&(n=t(e),i.push([t,n])),n}(n,a);if(!t.setSource)return r.push(t),Ui(e,o,i,n,r,s);t.setSource(Object.assign({},e),(function(a,l){if(a)return Ui(e,o,i,n,r,s);r.push(t),Ui(l,e.type===l.type?o:Ii[l.type],i,n,r,s)}))}else o.length?Ui(e,o,i,n,r,s):s?i(e,r):Ui(e,Ii["*"],i,n,r,!0)}const Bi={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"},ji=function(e=""){const t=gi(e);return Bi[t.toLowerCase()]||""},Fi=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Fi(e),Array.isArray(e)?t=t.concat(e):q(e)&&t.push(e)})),e=t}else e="string"==typeof e&&e.trim()?[qi({src:e})]:q(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[qi(e)]:[];return e};function qi(e){if(!e.type){const t=ji(e.src);t&&(e.type=t)}return e}const Hi=ue?10009:de?461:8,Vi={codes:{play:415,pause:19,ff:417,rw:412,back:Hi},names:{415:"play",19:"pause",417:"ff",412:"rw",[Hi]:"back"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class $i extends At{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on("modalclose",(()=>{this.refocusComponent()})),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(Vi.isEventKey(t,"play")||Vi.isEventKey(t,"pause")||Vi.isEventKey(t,"ff")||Vi.isEventKey(t,"rw")){t.preventDefault();const e=Vi.getEventName(t);this.performMediaAction_(e)}else Vi.isEventKey(t,"Back")&&e.target&&"function"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+5);break;case"rw":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const n=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(".video-js")),t.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(n&&"CloseButton"===n.name()?this.refocusComponent():(this.pause(),n&&n.el()&&(this.lastFocusedComponent_=n)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const n of e)n.hasOwnProperty("el_")&&n.getIsFocusable()&&n.getIsAvailableToBeFocused(n.el())&&t.push(n),n.hasOwnProperty("children_")&&n.children_.length>0&&i(n.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty("el_")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty("children_")&&e.children_.length>0?i(e.children_):e.hasOwnProperty("items")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if("ErrorDisplay"===e.name_&&e.opened_){const i=e.el_.querySelector(".vjs-errors-ok-button-container");i&&i.querySelectorAll("button").forEach(((e,i)=>{t.push({name:()=>"ModalButton"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const n=t(i.children[e]);if(n)return n}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),n=this.focusableComponents.filter((n=>n!==t&&this.isInDirection_(i.boundingClientRect,n.getPositions().boundingClientRect,e))),r=this.findBestCandidate_(i.center,n,e);r?this.focus(r):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let n=1/0,r=null;for(const s of t){const t=s.getPositions().center,a=this.calculateDistance_(e,t,i);a<n&&(n=a,r=s)}return r}isInDirection_(e,t,i){switch(i){case"right":return t.left>=e.right;case"left":return t.right<=e.left;case"down":return t.top>=e.bottom;case"up":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){"object"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);let s;switch(i){case"right":case"left":s=n+100*r;break;case"up":s=2*r+.5*n;break;case"down":s=5*r+n;break;default:s=n+r}return s}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if("TextTrackSelect"===t.constructor.name){e.focus(t);break}}}Ft.registerComponent("MediaLoader",class extends Ft{constructor(e,t,i){if(super(e,V({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,n=t.playerOptions.techOrder;i<n.length;i++){const t=Ut(n[i]);let r=ki.getTech(t);if(t||(r=Ft.getComponent(t)),r&&r.isSupported()){e.loadTech_(t);break}}}});class zi extends Ft{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e="div",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&R.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:"button"},i),this.tabIndex_=t.tabIndex;const n=Se(e,t,i);return this.player_.options_.experimentalSvgIcons||n.appendChild(Se("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Se("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||"Need Text";const i=this.localize(e);this.controlText_=e,Ae(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&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_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){" "===e.key||"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}Ft.registerComponent("ClickableComponent",zi);class Wi extends zi{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return Se("div",{className:"vjs-poster"})}crossOrigin(e){if(void 0===e)return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||"anonymous"===e||"use-credentials"===e?this.$("img")&&(this.$("img").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  "anonymous" or "use-credentials", given "${e}"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$("img")||this.el_.appendChild(Se("picture",{className:"vjs-poster",tabIndex:-1},{},Se("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e):this.el_.textContent=""}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Jt(this.player_.play()):this.player_.pause())}}Wi.prototype.crossorigin=Wi.prototype.crossOrigin,Ft.registerComponent("PosterImage",Wi);const Gi="#222",Xi="#ccc",Yi={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 Ki(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function Qi(e,t,i){try{e.style[t]=i}catch(e){return}}function Zi(e){return e?`${e}px`:""}Ft.registerComponent("TextTrackDisplay",class extends Ft{constructor(e,t,i){super(e,t,i);const n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on("loadstart",(e=>this.toggleDisplay(e))),e.on("texttrackchange",(e=>this.updateDisplay(e))),e.on("loadedmetadata",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(vt(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on("fullscreenchange",n),e.on("playerresize",n);const t=_.default.screen.orientation||_.default,i=_.default.screen.orientation?"change":"orientationchange";t.addEventListener(i,n),e.on("dispose",(()=>t.removeEventListener(i,n)));const r=this.options_.playerOptions.tracks||[];for(let e=0;e<r.length;e++)this.player_.addRemoteTextTrack(r[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let n,r,s;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?s=o:s||(s=o):i&&!i.enabled?(s=null,n=null,r=null):o.default&&("descriptions"!==o.kind||n?o.kind in e&&!r&&(r=o):n=o)}s?s.mode="showing":r?r.mode="showing":n&&(n.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){"function"==typeof _.default.WebVTT&&_.default.WebVTT.processCues(_.default,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const n=e[i];"showing"===n.mode&&t.push(n)}return void this.updateForTrack(t)}let i=null,n=null,r=e.length;for(;r--;){const t=e[r];"showing"===t.mode&&("descriptions"===t.kind?i=t:n=t)}if(n?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):i&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i)),!_.default.CSS.supports("inset","10px")){const e=this.el_,t=e.querySelectorAll(".vjs-text-track-cue"),i=this.player_.controlBar.el_.getBoundingClientRect().height,n=this.player_.el_.getBoundingClientRect().height;e.style="",Qi(e,"position","relative"),Qi(e,"height",n-i+"px"),Qi(e,"top","unset"),Qi(e,"bottom",ce?n+"px":"0px"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(" ");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:"unset"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!_.default.CSS.supports("inset-inline: 10px"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,n=this.player_.videoWidth()/this.player_.videoHeight();let r=0,s=0;Math.abs(i-n)>.1&&(i>n?r=Math.round((e-t*n)/2):s=Math.round((t-e/n)/2)),Qi(this.el_,"insetInline",Zi(r)),Qi(this.el_,"insetBlock",Zi(s))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let n=i.length;for(;n--;){const e=i[n];if(!e)continue;const r=e.displayState;if(t.color&&(r.firstChild.style.color=t.color),t.textOpacity&&Qi(r.firstChild,"color",Ki(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(r.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Qi(r.firstChild,"backgroundColor",Ki(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Qi(r,"backgroundColor",Ki(t.windowColor,t.windowOpacity)):r.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?r.firstChild.style.textShadow=`2px 2px 3px ${Gi}, 2px 2px 4px ${Gi}, 2px 2px 5px ${Gi}`:"raised"===t.edgeStyle?r.firstChild.style.textShadow=`1px 1px ${Gi}, 2px 2px ${Gi}, 3px 3px ${Gi}`:"depressed"===t.edgeStyle?r.firstChild.style.textShadow=`1px 1px ${Xi}, 0 1px ${Xi}, -1px -1px ${Gi}, 0 -1px ${Gi}`:"uniform"===t.edgeStyle&&(r.firstChild.style.textShadow=`0 0 4px ${Gi}, 0 0 4px ${Gi}, 0 0 4px ${Gi}, 0 0 4px ${Gi}`)),t.fontPercent&&1!==t.fontPercent){const e=_.default.parseFloat(r.style.fontSize);r.style.fontSize=e*t.fontPercent+"px",r.style.height="auto",r.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?r.firstChild.style.fontVariant="small-caps":r.firstChild.style.fontFamily=Yi[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),"function"!=typeof _.default.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const n=e[i];for(let e=0;e<n.activeCues.length;++e)t.push(n.activeCues[e])}_.default.WebVTT.processCues(_.default,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const n=i.activeCues[e].displayState;Ce(n,"vjs-text-track-cue","vjs-text-track-cue-"+(i.language?i.language:t)),i.language&&De(n,"lang",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}}),Ft.registerComponent("LoadingSpinner",class extends Ft{createEl(){const e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),i=Se("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[t])}),n=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return n.appendChild(i),n}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}});class Ji extends zi{createEl(e,t={},i={}){const n=Se("button",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:"button"},i));return this.player_.options_.experimentalSvgIcons||n.appendChild(Se("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n}addChild(e,t={}){const i=this.constructor.name;return R.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),Ft.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){" "!==e.key&&"Enter"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}Ft.registerComponent("Button",Ji);class en extends Ji{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",(e=>this.handleMouseDown(e)))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const t=this.player_.play();if(this.mouseused_&&"clientX"in e&&"clientY"in e)return Jt(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(!n)return void this.player_.tech(!0).focus();const r=()=>n.focus();Zt(t)?t.then(r,(()=>{})):this.setTimeout(r,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}en.prototype.controlText_="Play Video",Ft.registerComponent("BigPlayButton",en),Ft.registerComponent("CloseButton",class extends Ji{constructor(e,t){super(e,t),this.setIcon("cancel"),this.controlText(t&&t.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){"Escape"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}});class tn extends Ji{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon("play"),this.on(e,"play",(e=>this.handlePlay(e))),this.on(e,"pause",(e=>this.handlePause(e))),t.replay&&this.on(e,"ended",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Jt(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",(e=>this.handleSeeked(e)))}}tn.prototype.controlText_="Play",Ft.registerComponent("PlayToggle",tn);class nn extends Ft{constructor(e,t){super(e,t),this.on(e,["timeupdate","ended","seeking"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),i=Se("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return t.appendChild(i),this.contentEl_=Se("span",{className:`${e}-display`},{role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||"seeking"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=Xt(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,R.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=b.default.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}nn.prototype.labelText_="Time",nn.prototype.controlText_="Time",Ft.registerComponent("TimeDisplay",nn);class rn extends nn{buildCSSClass(){return"vjs-current-time"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}rn.prototype.labelText_="Current Time",rn.prototype.controlText_="Current Time",Ft.registerComponent("CurrentTimeDisplay",rn);class sn extends nn{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,"durationchange",i),this.on(e,"loadstart",i),this.on(e,"loadedmetadata",i)}buildCSSClass(){return"vjs-duration"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}sn.prototype.labelText_="Duration",sn.prototype.controlText_="Duration",Ft.registerComponent("DurationDisplay",sn),Ft.registerComponent("TimeDivider",class extends Ft{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=super.createEl("div"),i=super.createEl("span",{textContent:"/"});return t.appendChild(i),e.appendChild(t),e}});class an extends nn{constructor(e,t){super(e,t),this.on(e,"durationchange",(e=>this.updateContent(e)))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Se("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if("number"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}an.prototype.labelText_="Remaining Time",an.prototype.controlText_="Remaining Time",Ft.registerComponent("RemainingTimeDisplay",an),Ft.registerComponent("LiveDisplay",class extends Ft{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Se("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Se("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(b.default.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class on extends Ji{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=Se("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!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"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function ln(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}on.prototype.controlText_="Seek to live, currently playing live",Ft.registerComponent("SeekToLive",on);var un=Object.freeze({__proto__:null,clamp:ln});class dn extends Ft{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){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)}disable(){if(!this.enabled())return;const e=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(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),i=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||ee||e.preventDefault(),Me(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;Re(),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()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",(()=>{const t=this.vertical()?"height":"width";this.bar.el().style[t]=(100*e).toFixed(2)+"%"}))),e}getProgress(){return Number(ln(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=Be(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,n=t&&t.horizontalSeek;i?n&&"ArrowLeft"===e.key||!n&&"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):n&&"ArrowRight"===e.key||!n&&"ArrowUp"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e):"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):"ArrowUp"===e.key||"ArrowRight"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}Ft.registerComponent("Slider",dn);const cn=(e,t)=>ln(e/t*100,0,100).toFixed(2)+"%";Ft.registerComponent("LoadProgressBar",class extends Ft{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",(e=>this.update(e)))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),t=Se("span",{className:"vjs-control-text"}),i=Se("span",{textContent:this.localize("Loaded")}),n=b.default.createTextNode(": ");return this.percentageEl_=Se("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(i),t.appendChild(n),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),n=this.player_.bufferedEnd(),r=this.partEls_,s=cn(n,i);this.percent_!==s&&(this.el_.style.width=s,Ae(this.percentageEl_,s),this.percent_=s);for(let e=0;e<t.length;e++){const i=t.start(e),s=t.end(e);let a=r[e];a||(a=this.el_.appendChild(Se()),r[e]=a),a.dataset.start===i&&a.dataset.end===s||(a.dataset.start=i,a.dataset.end=s,a.style.left=cn(i,n),a.style.width=cn(s-i,n))}for(let e=r.length;e>t.length;e--)this.el_.removeChild(r[e-1]);r.length=t.length}))}}),Ft.registerComponent("TimeTooltip",class extends Ft{constructor(e,t){super(e,t),this.update=_t(vt(this,this.update),yt)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,t,i){const n=Ue(this.el_),r=Ne(this.player_.el()),s=e.width*t;if(!r||!n)return;let a=e.left-r.left+s,o=e.width-s+(r.right-e.right);o||(o=e.width-s,a=s);let l=n.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>n.width&&(l=n.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ae(this.el_,e)}updateTime(e,t,i,n){this.requestNamedAnimationFrame("TimeTooltip#updateTime",(()=>{let r;const s=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;r=(i<1?"":"-")+Xt(i,e)}else r=Xt(i,s);this.update(e,t,r),n&&n()}))}});class hn extends Ft{constructor(e,t){super(e,t),this.setIcon("circle"),this.update=_t(vt(this,this.update),yt)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,t){const i=this.getChild("timeTooltip");if(!i)return;const n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,n)}}hn.prototype.options_={children:[]},fe||K||hn.prototype.options_.children.push("timeTooltip"),Ft.registerComponent("PlayProgressBar",hn);class pn extends Ft{constructor(e,t){super(e,t),this.update=_t(vt(this,this.update),yt)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t){const i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+"px"}))}}pn.prototype.options_={children:["timeTooltip"]},Ft.registerComponent("MouseTimeDisplay",pn);class fn extends dn{constructor(e,t){(t=V(fn.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(fe||K);(!fe&&!K||i)&&t.children.splice(1,0,"mouseTimeDisplay"),super(e,t),this.shouldDisableSeekWhileScrubbingOnMobile_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=vt(this,this.update),this.update=_t(this.update_,yt),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in b.default&&"visibilityState"in b.default&&this.on(b.default,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){"hidden"===b.default.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,yt))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if("hidden"===b.default.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame("SeekBar#update",(()=>{const e=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),i=this.player_.liveTracker;let n=this.player_.duration();i&&i.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===e&&this.duration_===n||(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Xt(e,n),Xt(n,n)],"{1} of {2}")),this.currentTime_=e,this.duration_=n),this.bar&&this.bar.update(Ne(this.el()),this.getProgress())})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}getPercent(){if(this.pendingSeekTime_)return this.pendingSeekTime_/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){$e(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbingOnMobile_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!$e(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const n=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(n>=.99)return void r.seekToLiveEdge();const e=r.seekableStart(),t=r.liveCurrentTime();if(i=e+n*r.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=n*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbingOnMobile_?this.pendingSeekTime_=i:this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.pendingSeekTime_&&(this.userSeek_(this.pendingSeekTime_),this.pendingSeekTime_=null),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Jt(this.player_.play()):this.update_()}stepForward(){this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(" "===e.key||"Enter"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if("Home"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if("End"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else"PageDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):"PageUp"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],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 b.default&&"visibilityState"in b.default&&this.off(b.default,"visibilitychange",this.toggleVisibility_),super.dispose()}}fn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12},Ft.registerComponent("SeekBar",fn);class gn extends Ft{constructor(e,t){super(e,t),this.handleMouseMove=_t(vt(this,this.handleMouseMove),yt),this.throttledHandleMouseSeek=_t(vt(this,this.handleMouseSeek),yt),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const t=this.getChild("seekBar");if(!t)return;const i=t.getChild("playProgressBar"),n=t.getChild("mouseTimeDisplay");if(!i&&!n)return;const r=t.el(),s=Ue(r);let a=Be(r,e).x;a=ln(a,0,1),n&&n.update(s,a),i&&i.update(s,t.getProgress())}handleMouseSeek(e){const t=this.getChild("seekBar");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Jt(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}gn.prototype.options_={children:["seekBar"]},Ft.registerComponent("ProgressControl",gn);class mn extends Ji{constructor(e,t){super(e,t),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],(e=>this.handlePictureInPictureChange(e))),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){"audio"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){b.default.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in _.default?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){"function"==typeof b.default.exitPictureInPicture&&super.show()}}mn.prototype.controlText_="Picture-in-Picture",Ft.registerComponent("PictureInPictureToggle",mn);class yn extends Ji{constructor(e,t){super(e,t),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",(e=>this.handleFullscreenChange(e))),!1===b.default[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}yn.prototype.controlText_="Fullscreen",Ft.registerComponent("FullscreenToggle",yn),Ft.registerComponent("VolumeLevel",class extends Ft{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}),Ft.registerComponent("VolumeLevelTooltip",class extends Ft{constructor(e,t){super(e,t),this.update=_t(vt(this,this.update),yt)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,t,i,n){if(!i){const i=Ne(this.el_),n=Ne(this.player_.el()),r=e.width*t;if(!n||!i)return;const s=e.left-n.left+r,a=e.width-r+(n.right-e.right);let o=i.width/2;s<o?o+=o-s:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${n}%`)}write(e){Ae(this.el_,e)}updateVolume(e,t,i,n,r){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(()=>{this.update(e,t,i,n.toFixed(0)),r&&r()}))}});class vn extends Ft{constructor(e,t){super(e,t),this.update=_t(vt(this,this.update),yt)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t,i){const n=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,n,(()=>{i?this.el_.style.bottom=e.height*t+"px":this.el_.style.left=e.width*t+"px"}))}}vn.prototype.options_={children:["volumeLevelTooltip"]},Ft.registerComponent("MouseVolumeLevelDisplay",vn);class _n extends dn{constructor(e,t){super(e,t),this.on("slideractive",(e=>this.updateLastVolume_(e))),this.on(e,"volumechange",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){$e(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild("mouseVolumeLevelDisplay");if(t){const i=this.el(),n=Ne(i),r=this.vertical();let s=Be(i,e);s=r?s.y:s.x,s=ln(s,0,1),t.update(n,s,r)}$e(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}_n.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},fe||K||_n.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),_n.prototype.playerEvent="volumechange",Ft.registerComponent("
vendor: 4,800 bytes, line 2
2VolumeBar",_n);class bn extends Ft{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||H(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(this,e),this.throttledHandleMouseMove=_t(vt(this,this.handleMouseMove),yt),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on("mousedown",(e=>this.handleMouseDown(e))),this.on("touchstart",(e=>this.handleMouseDown(e))),this.on("mousemove",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,["focus","slideractive"],(()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")})),this.on(this.volumeBar,["blur","sliderinactive"],(()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")}))}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}bn.prototype.options_={children:["volumeBar"]},Ft.registerComponent("VolumeControl",bn);class Tn extends Ji{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(this,e),this.on(e,["loadstart","volumechange"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon("volume-high"),fe&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon("volume-mute"),t=0):e<.33?(this.setIcon("volume-low"),t=1):e<.67&&(this.setIcon("volume-medium"),t=2),ke(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?" ":""}vjs-vol-${t}`),"")),Ce(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)}}Tn.prototype.controlText_="Mute",Ft.registerComponent("MuteToggle",Tn);class Sn extends Ft{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||H(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,["loadstart"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,"keyup",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,"keyup",(e=>this.handleVolumeControlKeyUp(e))),this.on("keydown",(e=>this.handleKeyPress(e))),this.on("mouseover",(e=>this.handleMouseOver(e))),this.on("mouseout",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){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")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){"Escape"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),ct(b.default,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),ht(b.default,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){"Escape"===e.key&&this.handleMouseOut()}}Sn.prototype.options_={children:["muteToggle","volumeControl"]}
vendor: 38,797 bytes, line 2
2,Ft.registerComponent("VolumePanel",Sn);class An extends Ji{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,n=i&&i.isLive()?i.seekableEnd():this.player_.duration();let r;r=t+this.skipTime<=n?t+this.skipTime:n,this.player_.currentTime(r)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}An.prototype.controlText_="Skip Forward",Ft.registerComponent("SkipForward",An);class wn extends Ji{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,n=i&&i.isLive()&&i.seekableStart();let r;r=n&&t-this.skipTime<=n?n:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(r)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}wn.prototype.controlText_="Skip Backward",Ft.registerComponent("SkipBackward",wn);class En extends Ft{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof Ft&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof Ft&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=Se(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const t=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),ct(t,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||b.default.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}Ft.registerComponent("Menu",En);class Cn extends Ft{constructor(e,t={}){super(e,t),this.menuButton_=new Ji(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const i=Ji.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+i,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const n=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,"tap",n),this.on(this.menuButton_,"click",n),this.on(this.menuButton_,"keydown",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,"mouseenter",(()=>{this.addClass("vjs-hover"),this.menu.show(),ct(b.default,"keyup",this.handleMenuKeyUp_)})),this.on("mouseleave",(e=>this.handleMouseLeave(e))),this.on("keydown",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),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"))}createMenu(){const e=new En(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Se("li",{className:"vjs-menu-title",textContent:Ut(this.options_.title),tabIndex:-1}),i=new Ft(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${Ji.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),ht(b.default,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){"Escape"===e.key||"Tab"===e.key?(this.buttonPressed_&&this.unpressButton(),"Tab"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):"Up"!==e.key&&("Down"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){"Escape"!==e.key&&"Tab"!==e.key||this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){"Escape"!==e.key&&"Tab"!==e.key||(this.buttonPressed_&&this.unpressButton(),"Tab"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),fe&&be())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}Ft.registerComponent("MenuButton",Cn);class kn extends Cn{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const n=vt(this,this.update);i.addEventListener("removetrack",n),i.addEventListener("addtrack",n),i.addEventListener("labelchange",n),this.player_.on("ready",n),this.player_.on("dispose",(function(){i.removeEventListener("removetrack",n),i.removeEventListener("addtrack",n),i.removeEventListener("labelchange",n)}))}}Ft.registerComponent("TrackButton",kn);class In extends zi{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,t,i){this.nonIconControl=!0;const n=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},t),i),r=Se("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?n.appendChild(r):n.replaceChild(r,n.querySelector(".vjs-icon-placeholder")),n}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(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))}}Ft.registerComponent("MenuItem",In);class xn extends In{constructor(e,t){const i=t.track,n=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected="showing"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const r=(...e)=>{this.handleTracksChange.apply(this,e)},s=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on(["loadstart","texttrackchange"],r),n.addEventListener("change",r),n.addEventListener("selectedlanguagechange",s),this.on("dispose",(function(){e.off(["loadstart","texttrackchange"],r),n.removeEventListener("change",r),n.removeEventListener("selectedlanguagechange",s)})),void 0===n.onchange){let e;this.on(["tap","click"],(function(){if("object"!=typeof _.default.Event)try{e=new _.default.Event("change")}catch(e){}e||(e=b.default.createEvent("Event"),e.initEvent("change",!0,!0)),n.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const n=i[e];-1!==this.kinds.indexOf(n.kind)&&(n===t?"showing"!==n.mode&&(n.mode="showing"):"disabled"!==n.mode&&(n.mode="disabled"))}}handleTracksChange(e){const t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if("showing"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}Ft.registerComponent("TextTrackMenuItem",xn);class Pn extends xn{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,n=t.length;e<n;e++){const n=t[e];if(this.options_.kinds.indexOf(n.kind)>-1&&"showing"===n.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,n=t.length;e<n;e++){const n=t[e];if(["captions","descriptions","subtitles"].indexOf(n.kind)>-1&&"showing"===n.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}Ft.registerComponent("OffTextTrackMenuItem",Pn);class Ln extends kn{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=xn){let i;this.label_&&(i=`${this.label_} off`),e.push(new Pn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<n.length;i++){const r=n[i];if(this.kinds_.indexOf(r.kind)>-1){const i=new t(this.player_,{track:r,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${r.kind}-menu-item`),e.push(i)}}return e}}Ft.registerComponent("TextTrackButton",Ln);class Dn extends In{constructor(e,t){const i=t.track,n=t.cue,r=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=n.text,t.selected=n.startTime<=r&&r<n.endTime,super(e,t),this.track=i,this.cue=n}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}Ft.registerComponent("ChaptersTrackMenuItem",Dn);class On extends Ln{constructor(e,t,i){super(e,t,i),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&"chapters"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(Ut(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,n=t.length;i<n;i++){const n=t[i],r=new Dn(this.player_,{track:this.track_,cue:n});e.push(r)}return e}}On.prototype.kind_="chapters",On.prototype.controlText_="Chapters",Ft.registerComponent("ChaptersButton",On);class Mn extends Ln{constructor(e,t,i){super(e,t,i),this.setIcon("audio-description");const n=e.textTracks(),r=vt(this,this.handleTracksChange);n.addEventListener("change",r),this.on("dispose",(function(){n.removeEventListener("change",r)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,n=t.length;e<n;e++){const n=t[e];if(n.kind!==this.kind_&&"showing"===n.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}Mn.prototype.kind_="descriptions",Mn.prototype.controlText_="Descriptions",Ft.registerComponent("DescriptionsButton",Mn);class Rn extends Ln{constructor(e,t,i){super(e,t,i),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}Rn.prototype.kind_="subtitles",Rn.prototype.controlText_="Subtitles",Ft.registerComponent("SubtitlesButton",Rn);class Nn extends xn{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",super(e,t),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+t.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}Ft.registerComponent("CaptionSettingsMenuItem",Nn);class Un extends Ln{constructor(e,t,i){super(e,t,i),this.setIcon("captions")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Nn(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}Un.prototype.kind_="captions",Un.prototype.controlText_="Captions",Ft.registerComponent("CaptionsButton",Un);class Bn extends xn{createEl(e,t,i){const n=super.createEl(e,t,i),r=n.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",n):r.appendChild(Se("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),r.appendChild(Se("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),n}}Ft.registerComponent("SubsCapsMenuItem",Bn);class jn extends Ln{constructor(e,t={}){super(e,t),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(Ut(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Nn(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,Bn),e}}jn.prototype.kinds_=["captions","subtitles"],jn.prototype.controlText_="Subtitles",Ft.registerComponent("SubsCapsButton",jn);class Fn extends In{constructor(e,t){const i=t.track,n=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const r=(...e)=>{this.handleTracksChange.apply(this,e)};n.addEventListener("change",r),this.on("dispose",(()=>{n.removeEventListener("change",r)}))}createEl(e,t,i){const n=super.createEl(e,t,i),r=n.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(r.appendChild(Se("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),r.appendChild(Se("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),n}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}Ft.registerComponent("AudioTrackMenuItem",Fn);class qn extends kn{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const n=t[i];e.push(new Fn(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return e}}qn.prototype.controlText_="Audio Track",Ft.registerComponent("AudioTrackButton",qn);class Hn extends In{constructor(e,t){const i=t.rate,n=parseFloat(i,10);t.label=i,t.selected=n===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=n,this.on(e,"ratechange",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Hn.prototype.contentElType="button",Ft.registerComponent("PlaybackRateMenuItem",Hn);class Vn extends Cn{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",(e=>this.updateVisibility(e))),this.on(e,"ratechange",(e=>this.updateLabel(e))),this.on(e,"playbackrateschange",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Se("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Hn(this.player(),{rate:e[i]+"x"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}Vn.prototype.controlText_="Playback Rate",Ft.registerComponent("PlaybackRateMenuButton",Vn);class $n extends Ft{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}Ft.registerComponent("Spacer",$n),Ft.registerComponent("CustomControlSpacer",class extends $n{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}});class zn extends Ft{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}zn.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},Ft.registerComponent("ControlBar",zn);class Wn extends ii{constructor(e,t){super(e,t),this.on(e,"error",(e=>{this.open(e)}))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}Wn.prototype.options_=Object.assign({},ii.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Ft.registerComponent("ErrorDisplay",Wn);class Gn extends Ft{constructor(e,t={}){super(e,t),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),Se("select",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${at()}`)+"-"+e[1].replace(/\W+/g,""),i=Se("option",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${t}`),i})))}}Ft.registerComponent("TextTrackSelect",Gn);class Xn extends Ft{constructor(e,t={}){super(e,t);const i=Se("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const n=this.options_.selects;for(const t of n){const i=this.options_.selectConfigs[t],n=i.className,r=i.id.replace("%s",this.options_.id_);let s=null;const a=`vjs_select_${at()}`;if("colors"===this.options_.type){s=Se("span",{className:n});const e=Se("label",{id:r,className:"vjs-label",textContent:this.localize(i.label)});e.setAttribute("for",a),s.appendChild(e)}const o=new Gn(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:r});this.addChild(o),"colors"===this.options_.type&&(s.appendChild(o.el()),this.el().appendChild(s))}}createEl(){return Se("fieldset",{className:this.options_.className})}}Ft.registerComponent("TextTrackFieldset",Xn);class Yn extends Ft{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,n=new Xn(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(n);const r=new Xn(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(r);const s=new Xn(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(s)}createEl(){return Se("div",{className:"vjs-track-settings-colors"})}}Ft.registerComponent("TextTrackSettingsColors",Yn);class Kn extends Ft{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,n=new Xn(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(n);const r=new Xn(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(r);const s=new Xn(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(s)}createEl(){return Se("div",{className:"vjs-track-settings-font"})}}Ft.registerComponent("TextTrackSettingsFont",Kn);class Qn extends Ft{constructor(e,t={}){super(e,t);const i=this.localize("restore all settings to the default values"),n=new Ji(e,{controlText:i,className:"vjs-default-button"});n.el().classList.remove("vjs-control","vjs-button"),n.el().textContent=this.localize("Reset"),this.addChild(n);const r=new Ji(e,{controlText:i,className:"vjs-done-button"});r.el().classList.remove("vjs-control","vjs-button"),r.el().textContent=this.localize("Done"),this.addChild(r)}createEl(){return Se("div",{className:"vjs-track-settings-controls"})}}Ft.registerComponent("TrackSettingsControls",Qn);const Zn="vjs-text-track-settings",Jn=["#000","Black"],er=["#00F","Blue"],tr=["#0FF","Cyan"],ir=["#0F0","Green"],nr=["#F0F","Magenta"],rr=["#F00","Red"],sr=["#FFF","White"],ar=["#FF0","Yellow"],or=["1","Opaque"],lr=["0.5","Semi-Transparent"],ur=["0","Transparent"],dr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Jn,sr,rr,ir,er,ar,nr,tr],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[or,lr,ur],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[sr,Jn,rr,ir,er,ar,nr,tr],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",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:"",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:e=>"1.00"===e?null:Number(e)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[or,lr],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[ur,lr,or],className:"vjs-window-opacity vjs-opacity"}};function cr(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}dr.windowColor.options=dr.backgroundColor.options,Ft.registerComponent("TextTrackSettings",class extends ii{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Se("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Yn(e,{textTrackComponentid:this.id_,selectConfigs:dr,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(t);const i=new Kn(e,{textTrackComponentid:this.id_,selectConfigs:dr,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(i);const n=new Qn(e);this.addChild(n)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(".vjs-default-button"),["click","tap"],(()=>{this.setDefaults(),this.updateDisplay()})),j(dr,(e=>{this.on(this.$(e.selector),"change",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return F(dr,((e,t,i)=>{const n=(r=this.$(t.selector),s=t.parser,cr(r.options[r.options.selectedIndex].value,s));var r,s;return void 0!==n&&(e[i]=n),e}),{})}setValues(e){j(dr,((t,i)=>{!function(e,t,i){if(t)for(let n=0;n<e.options.length;n++)if(cr(e.options[n].value,i)===t){e.selectedIndex=n;break}}(this.$(t.selector),e[i],t.parser)}))}setDefaults(){j(dr,(e=>{const t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(_.default.localStorage.getItem(Zn))}catch(e){R.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?_.default.localStorage.setItem(Zn,JSON.stringify(e)):_.default.localStorage.removeItem(Zn)}catch(e){R.warn(e)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}),Ft.registerComponent("ResizeManager",class extends Ft{constructor(e,t){let i=t.ResizeObserver||_.default.ResizeObserver;null===t.ResizeObserver&&(i=!1),super(e,V({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||_.default.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=bt((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){ht(this,"resize",e),ht(this,"unload",t),t=null};ct(this.el_.contentWindow,"unload",t),ct(this.el_.contentWindow,"resize",e)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")}dispose(){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,super.dispose()}});const hr={trackingThreshold:20,liveTolerance:15};Ft.registerComponent("LiveTracker",class extends Ft{constructor(e,t){super(e,V(hr,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,"durationchange",(e=>this.handleDurationchange(e))),this.on(this.player_,"canplay",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(_.default.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const n=this.liveCurrentTime(),r=this.player_.currentTime();let s=this.player_.paused()||this.seekedBehindLive_||Math.abs(n-r)>this.options_.liveTolerance;this.timeupdateSeen_&&n!==1/0||(s=!1),s!==this.behindLiveEdge_&&(this.behindLiveEdge_=s,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){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())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,yt),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_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){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_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return"number"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}),Ft.registerComponent("TitleBar",class extends Ft{constructor(e,t){super(e,t),this.on("statechanged",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:Se("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${at()}`}),description:Se("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${at()}`})},Se("div",{className:"vjs-title-bar"},{},$(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach((e=>{const n=this.state[e],r=this.els[e],s=i[e];Fe(r),n&&Ae(r,n),t&&(t.removeAttribute(s),n&&t.setAttribute(s,r.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),super.dispose(),this.els=null}});const pr={initialDisplay:4e3,position:[],takeFocus:!1};Ft.registerComponent("TransientButton",class extends Ji{constructor(e,t){super(e,t=V(pr,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],(e=>{this.removeClass("force-display")}))}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(" ")}`}createEl(){const e=Se("button",{},{type:"button",class:this.buildCSSClass()},Se("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass("force-display")}),this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const fr=e=>
2{const t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;const i=e.$$("source"),n=[];let r="";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===n.indexOf(t)&&n.push(t)}return!!n.length&&(1===n.length&&(r=n[0]),e.triggerSourceset(r),!0)},gr=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=b.default.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=b.default.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText="",_.default.Element.prototype.appendChild.call(this,i),this.innerHTML}}),mr=(e,t)=>{let i={};for(let n=0;n<e.length&&(i=Object.getOwnPropertyDescriptor(e[n],t),!(i&&i.set&&i.get));n++);return i.enumerable=!0,i.configurable=!0,i},yr=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},n=(e=>mr([e.el(),_.default.HTMLMediaElement.prototype,_.default.Element.prototype,gr],"innerHTML"))(e),r=i=>(...n)=>{const r=i.apply(t,n);return fr(e),r};["append","appendChild","insertAdjacentHTML"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=r(i[e]))})),Object.defineProperty(t,"innerHTML",V(n,{set:r(n.set)})),t.resetSourceWatch_=()=>
vendor: 17,706 bytes, line 2
2{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,"innerHTML",n)},e.one("sourceset",t.resetSourceWatch_)},vr=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?fi(_.default.Element.prototype.getAttribute.call(this,"src")):""},set(e){return _.default.Element.prototype.setAttribute.call(this,"src",e),e}});class _r extends ki{constructor(e,t){super(e,t);const i=e.source;let n=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&"VIDEO"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const r=e[t];"track"===r.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),this.textTracks().addTrack(r.track),n||this.el_.hasAttribute("crossorigin")||!mi(r.src)||(n=!0)):i.push(r))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&n&&R.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),this.restoreMetadataTracksInIOSNativePlayer_(),(he||le)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),_r.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){!function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>mr([e.el(),_.default.HTMLMediaElement.prototype,vr],"src"))(e),n=t.setAttribute,r=t.load;Object.defineProperty(t,"src",V(i,{set:n=>{const r=i.set.call(t,n);return e.triggerSourceset(t.src),r}})),t.setAttribute=(i,r)=>{const s=n.call(t,i,r);return/src/i.test(i)&&e.triggerSourceset(t.src),s},t.load=()=>{const i=r.call(t);return fr(e)||(e.triggerSourceset(""),yr(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):fr(e)||yr(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=r,t.setAttribute=n,Object.defineProperty(t,"src",i),t.resetSourceWatch_&&t.resetSourceWatch_()}}(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const n=e[i];"metadata"===n.kind&&t.push({track:n,storedMode:n.mode})}};i(),e.addEventListener("change",i),this.on("dispose",(()=>e.removeEventListener("change",i)));const n=()=>{for(let e=0;e<t.length;e++){const i=t[e];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(()=>{e.removeEventListener("change",i),e.removeEventListener("change",n),e.addEventListener("change",n)})),this.on("webkitendfullscreen",(()=>{e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",n)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const t=wi[e],i=this.el()[t.getterName],n=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const r={change:t=>{const i={type:"change",target:n,currentTarget:n,srcElement:n};n.trigger(i),"text"===e&&this[Ei.remoteText.getterName]().trigger(i)},addtrack(e){n.addTrack(e.track)},removetrack(e){n.removeTrack(e.track)}},s=function(){const e=[];for(let t=0;t<n.length;t++){let r=!1;for(let e=0;e<i.length;e++)if(i[e]===n[t]){r=!0;break}r||e.push(n[t])}for(;e.length;)n.removeTrack(e.shift())};this[t.getterName+"Listeners_"]=r,Object.keys(r).forEach((e=>{const t=r[e];i.addEventListener(e,t),this.on("dispose",(n=>i.removeEventListener(e,t)))})),this.on("loadstart",s),this.on("dispose",(e=>this.off("loadstart",s)))}proxyNativeTracks_(){wi.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),_r.disposeMediaElement(e),e=t}else{e=b.default.createElement("video");const t=V({},this.options_.tag&&Pe(this.options_.tag));he&&!0===this.options_.nativeControlsForTouch||delete t.controls,xe(e,Object.assign(t,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&De(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=["loop","muted","playsinline","autoplay"];for(let i=0;i<t.length;i++){const n=t[i],r=this.options_[n];void 0!==r&&(r?De(e,n,n):Oe(e,n),e[n]=r)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on("loadstart",t);const i=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",i),void this.ready((function(){this.off("loadstart",t),this.off("loadedmetadata",i),e||this.trigger("loadstart")}))}const t=["loadstart"];t.push("loadedmetadata"),e.readyState>=2&&t.push("loadeddata"),e.readyState>=3&&t.push("canplay"),e.readyState>=4&&t.push("canplaythrough"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&ge?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){R(e,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&K&&ee&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",t),this.on("dispose",(()=>{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)}))}supportsFullScreen(){return"function"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Jt(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return R.error("Invalid source URL."),!1;const i={src:e};t&&(i.type=t);const n=Se("source",{},i);return this.el_.appendChild(n),!0}removeSourceElement(e){if(!e)return R.error("Source URL is required to remove the source element."),!1;const t=this.el_.querySelectorAll("source");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return R.warn(`No matching source element found with src: ${e}`),!1}reset(){_r.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=b.default.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$("track");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),_.default.performance&&(e.creationTime=_.default.performance.now()),e}}z(_r,"TEST_VID",(function(){if(!ve())return;const e=b.default.createElement("video"),t=b.default.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e})),_r.isSupported=function(){try{_r.TEST_VID.volume=.5}catch(e){return!1}return!(!_r.TEST_VID||!_r.TEST_VID.canPlayType)},_r.canPlayType=function(e){return _r.TEST_VID.canPlayType(e)},_r.canPlaySource=function(e,t){return _r.canPlayType(e.type)},_r.canControlVolume=function(){try{const e=_r.TEST_VID.volume;_r.TEST_VID.volume=e/2+.1;const t=e!==_r.TEST_VID.volume;return t&&fe?(_.default.setTimeout((()=>{_r&&_r.prototype&&(_r.prototype.featuresVolumeControl=e!==_r.TEST_VID.volume)})),!1):t}catch(e){return!1}},_r.canMuteVolume=function(){try{const e=_r.TEST_VID.muted;return _r.TEST_VID.muted=!e,_r.TEST_VID.muted?De(_r.TEST_VID,"muted","muted"):Oe(_r.TEST_VID,"muted"),e!==_r.TEST_VID.muted}catch(e){return!1}},_r.canControlPlaybackRate=function(){if(K&&ee&&ie<58)return!1;try{const e=_r.TEST_VID.playbackRate;return _r.TEST_VID.playbackRate=e/2+.1,e!==_r.TEST_VID.playbackRate}catch(e){return!1}},_r.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(b.default.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(b.default.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(b.default.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(b.default.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},_r.supportsNativeTextTracks=function(){return ge||fe&&ee},_r.supportsNativeVideoTracks=function(){return!(!_r.TEST_VID||!_r.TEST_VID.videoTracks)},_r.supportsNativeAudioTracks=function(){return!(!_r.TEST_VID||!_r.TEST_VID.audioTracks)},_r.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([e,t]){z(_r.prototype,e,(()=>_r[t]()),!0)})),_r.prototype.featuresVolumeControl=_r.canControlVolume(),_r.prototype.movingMediaElementInDOM=!fe,_r.prototype.featuresFullscreenResize=!0,_r.prototype.featuresProgressEvents=!0,_r.prototype.featuresTimeupdateEvents=!0,_r.prototype.featuresVideoFrameCallback=!(!_r.TEST_VID||!_r.TEST_VID.requestVideoFrameCallback),_r.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},_r.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll("source");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){_r.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){_r.prototype["set"+Ut(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){_r.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){_r.prototype["set"+Ut(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){_r.prototype[e]=function(){return this.el_[e]()}})),ki.withSourceHandlers(_r),_r.nativeSourceHandler={},_r.nativeSourceHandler.canPlayType=function(e){try{return _r.TEST_VID.canPlayType(e)}catch(e){return""}},_r.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return _r.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=gi(e.src);return _r.nativeSourceHandler.canPlayType(`video/${t}`)}return""},_r.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},_r.nativeSourceHandler.dispose=function(){},_r.registerSourceHandler(_r.nativeSourceHandler),ki.registerTech("Html5",_r);const br=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Tr={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Sr=["tiny","xsmall","small","medium","large","xlarge","huge"],Ar={};Sr.forEach((e=>{const t="x"===e.charAt(0)?`x-${e.substring(1)}`:e;Ar[e]=`vjs-layout-${t}`}));const wr={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class Er extends Ft{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${at()}`,(t=Object.assign(Er.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest("[lang]");i&&(t.language=i.getAttribute("lang"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=N(this.id_),this.fsApi_=P,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.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(this.tag=e,this.tagAttributes=e&&Pe(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=Er.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||"",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if("function"!=typeof this[e])throw new Error(`plugin "${e}" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),Ot(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(ct(b.default,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const n=V(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=n,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new _.default
vendor: 17,827 bytes, line 2
2.DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg">\n  <defs>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-play">\n      <path d="M16 10v28l22-14z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-pause">\n      <path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-audio">\n      <path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-captions">\n      <path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">\n      <path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">\n      <path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">\n      <path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">\n      <path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">\n      <path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">\n      <path d="M14 18v12h8l10 10V8L22 18h-8z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">\n      <path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">\n      <path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-spinner">\n      <path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>\n    </symbol>\n    <symbol viewBox="0 0 24 24" id="vjs-icon-hd">\n      <path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-chapters">\n      <path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>\n    </symbol>\n    <symbol viewBox="0 0 40 40" id="vjs-icon-downloading">\n      <path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download">\n      <path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">\n      <path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">\n      <path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-share">\n      <path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-cog">\n      <path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-square">\n      <path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-circle">\n      <circle cx="24" cy="24" r="20"></circle>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">\n      <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">\n      <path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-cancel">\n      <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-replay">\n      <path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-repeat">\n      <path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">\n      <path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">\n      <path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">\n      <path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">\n      <path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">\n      <path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">\n      <path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>\n    </symbol>\n    <symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">\n      <g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-next-item">\n      <path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">\n      <path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">\n      <path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-cast">\n      <path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">\n      <path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>\n    </symbol>\n    <symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">\n      <path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>\n      <path fill="none" d="M-1-3h24v24H-1z"></path>\n    </symbol>\n    <symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">\n      <path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>\n    </symbol>\n    <symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">\n      <path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>\n    </symbol>\n    <symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">\n      <path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>\n    </symbol>\n    <symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">\n      <path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>\n    </symbol>\n    <symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">\n      <path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>\n    </symbol>\n  </defs>\n</svg>',"image/svg+xml");if(e.querySelector("parsererror"))
2R.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display="none",this.el_.appendChild(t),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio("audio"===e.nodeName.toLowerCase()),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new $i(this),this.addClass("vjs-spatial-navigation-enabled")),he&&this.addClass("vjs-touch-enabled"),fe||this.addClass("vjs-workinghover"),Er.players[this.id_]=this;const r=C.split(".")[0];this.addClass(`vjs-v${r}`),this.userActive(!0),this.reportUserActivity(),this.one("play",(e=>this.listenForUserActivity_(e))),this.on("keydown",(e=>this.handleKeyDown(e))),this.on("languagechange",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){this.trigger("dispose"),this.off("dispose"),ht(b.default,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),ht(b.default,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),Er.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),xi.hasOwnProperty(this.id())&&delete xi[this.id()],Ci.names.forEac
vendor: 4,247 bytes, line 2
2h((e=>{const t=this[Ci[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player");const n="video-js"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:n||(e=this.el_=super.createEl("div"));const r=Pe(t);if(n){for(e=this.el_=t,t=this.tag=b.default.createElement("video");e.children.length;)t.appendChild(e.firstChild);Ee(e,"video-js")||Ce(e,"video-js"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}t.setAttribute("tabindex","-1"),r.tabindex="-1",ee&&ae&&(t.setAttribute("role","application"),r.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in r&&delete r.width,"height"in r&&delete r.height,Object.getOwnPropertyNames(r).forEach((function(i){n&&"class"===i||e.setAttribute(i,r[i]),n&&t.setAttribute(i,r[i])})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=e.player=this,this.addClass("vjs-paused");const s=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter((e=>me[e])).map((e=>"vjs-device-"+e.substring(3).toLowerCase().replace(/\_/g,"-")));if(this.addClass(...s),!0!==_.default.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=tt("vjs-styles-dimensions");const e=ze(".vjs-styles-defaults"),t=ze("head");t.insertBefore(this.styleEl_,e?e.nextSibling:t.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);const a=t.getElementsByTagName("a");for(let e=0;e<a.length;e++){const t=a.item(e);Ce(t,"vjs-hidden"),t.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),we(t,e),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_("crossOrigin");null===e||"anonymous"===e||"use-credentials"===e?(this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)):R.warn(`crossOrigin must be null,  "anonymous" or "use-credentials", given "${e}"`)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,t){const i=e+"_";if(void 0===t)return this[i]||0;if(""===t||"auto"===t)return this[i]=void 0,void this.updateStyleEl_();const n=parseFloat(t);isNaN(n)?R.error(`Improper value "${t}" supplied for for ${e}`):(this[i]=n,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,Et(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),i=()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)},Et(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===_.default.VIDEOJS_NO_DYNAMIC_STYLE){const e="number"==typeof this.width_?this.width_:this.options_.width,t="number"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,n;i=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";const r=i.split(":"),s=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/s:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*s,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),it(this.styleEl_,`\n      .${n}
2 {\n        width: ${e}px;\n        height: ${t}px;\n      }\n\n      .${n}.vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: ${100*s}%;\n      }\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=Ut(e),n=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==i&&this.tag&&(ki.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let r=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(r=!1);const s={source:t,autoplay:r,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${n}_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};Ci.names.forEach((e=>{const t=Ci[e];s[t.getterName]=this[t.privateName]})),Object.assign(s,this.options_[i]),Object.assign(s,this.options_[n]),Object.assign(s,this.options_[e.toLowerCase()]),this.tag&&(s.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(s.startTime=this.cache_.currentTime);const a=ki.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);var o,l;this.tech_=new a(s),this.tech_.ready(vt(this,this.handleTechReady_),!0),o=this.textTracksJson_||[],l=this.tech_,o.forEach((function(e){const t=l.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>t.addCue(e)))})),l.textTracks(),br.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${Ut(e)}_`](t)))})),Object.keys(Tr).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${Tr[e]}_`].bind(this),event:t}):this[`handleTech${Tr[e]}_`](t)}))})),this.on(this.tech_,"loadstart",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,"sourceset",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,"waiting",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,"ended",(e=>this.handleTechEnded_(e))),this.on(this.tech_,"seeking",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,"play",(e=>this.handleTechPlay_(e))),this.on(this.tech_,"pause",(e=>this.handleTechPause_(e))),this.on(this.tech_,"durationchange",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,"fullscreenchange",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,"fullscreenerror",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,"enterpictureinpicture",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,"leavepictureinpicture",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,"error",(e=>this.handleTechError_(e))),this.on(this.tech_,"posterchange",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,"textdata",(e=>this.handleTechTextData_(e))),this.on(this.tech_,"ratechange",(e=>this.handleTechRateChange_(e))),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"===i&&this.tag||we(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Ci.names.forEach((e=>{const t=Ci[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=function(e){const t=e.$$("track"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=ei(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(ei))}(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&R.warn("Using the tech directly can be dangerous. I hope you know 
2what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_}version(){return{"video.js":C}}addTechControlsListeners_(){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_)}removeTechControlsListeners_(){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_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||"string"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Zt(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||""}`)}))};let i;return"any"!==e||this.muted()?i="muted"!==e||this.muted()?this.play():t():(i=this.play(),Zt(i)&&(i=i.catch(t))),Zt(i)?i.then((()=>{this.trigger({type:"autoplay-success",autoplay:e})})).catch((()=>{this.trigger({type:"autoplay-failure",autoplay:e})})):void 0}updateSourceCaches_(e=""){let t=e,i="";"string"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const n=e.$$("source");for(let e=0;e<n.length;e++){const i=n[e];if(i.type&&i.src&&i.src===t)return i.type}return ji(t)})(this,t)),this.cache_.source=V({},e,{src:t,type:i});const n=this.cache_.sources.filter((e=>e.src&&e.src===t)),r=[],s=this.$$("source"),a=[];for(let e=0;e<s.length;e++){const i=Pe(s[e]);r.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!n.length?this.cache_.sources=r:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,n=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(n)&&(!this.lastSource_||this.lastSource_.tech!==n&&this.lastSource_.player!==i)&&(t=()=>{}),t(n),e.src||this.tech_.any(["sourceset","loadstart"],(e=>{if("sourceset"===e.type)return;const t=this.techGet_("currentSrc");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}
vendor: 30,171 bytes, line 2
2handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){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,e):this.paused()?Jt(this.play()):this.pause()))}handleTechDoubleClick_(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(t=>t.contains(e.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,e):this.isInPictureInPicture()&&!b.default.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let n=b.default[this.fsApi_.fullscreenElement]===i;!n&&i.matches&&(n=i.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(n)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(()=>{this.removeClass("vjs-ios-native-fs")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){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}}techCall_(e,t){this.ready((function(){if(e in Mi)return function(e,t,i,n){return t[i](e.reduce(Ni(i),n))}(this.middleware_,this.tech_,e,t);if(e in Ri)return Di(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw R(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in Oi)return function(e,t,i){return e.reduceRight(Ni(i),t[i]())}(this.middleware_,this.tech_,e);if(e in Ri)return Di(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw R(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if("TypeError"===t.name)throw R(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw R(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Jt){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(ge||fe);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!t&&i&&this.load());const n=this.techGet_("play");i&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===n?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(n)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_("pause")}paused(){return!1!==this.techGet_("paused")}played(){return this.techGet_("played")||Vt(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return e&&e.length||(e=Vt(0,0)),e}seekable(){let e=this.techGet_("seekable");return e&&e.length||(e=Vt(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return Kt(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)}defaultMuted(e){return void 0!==e&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,n)=>{function r(){t.off("fullscreenerror",a),t.off("fullscreenchange",s)}function s(){r(),i()}function a(e,t){r(),n(t)}t.one("fullscreenchange",s),t.one("fullscreenerror",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(r,r),o.then(i,n))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&1==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function n(){e.off("fullscreenerror",s),e.off("fullscreenchange",r)}function r(){n(),t()}function s(e,t){n(),i(t)}e.one("fullscreenchange",r),e.one("fullscreenerror",s);const a=e.exitFullscreenHelper_();a&&(a.then(n,n),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=b.default[this.fsApi_.exitFullscreen]();return e&&Jt(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&1==!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=b.default.documentElement.style.overflow,ct(b.default,"keydown",this.boundFullWindowOnEscKey_),b.default.documentElement.style.overflow="hidden",Ce(b.default.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){"Escape"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,ht(b.default,"keydown",this.boundFullWindowOnEscKey_),b.default.documentElement.style.overflow=this.docOrigOverflow,ke(b.default.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&_.default.documentPictureInPicture){const e=b.default.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Se("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),_.default.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(Xe(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:t}),t.addEventListener("pagehide",(t=>{const i=t.target.querySelector(".video-js");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")})),t)))}return"pictureInPictureEnabled"in b.default&&!1===this.disablePictureInPicture()?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){return _.default.documentPictureInPicture&&_.default.documentPictureInPicture.window?(_.default.documentPictureInPicture.window.close(),Promise.resolve()):"pictureInPictureEnabled"in b.default?b.default.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;t&&t.hotkeys&&((e=>{const t=e.tagName.toLowerCase();return!!e.isContentEditable||("input"===t?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type):-1!==["textarea"].indexOf(t))})(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e)))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>"f"===e.key.toLowerCase(),muteKey:n=t=>"m"===e.key.toLowerCase(),playPauseKey:r=t=>"k"===e.key.toLowerCase()||" "===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=Ft.getComponent("FullscreenToggle");!1!==b.default[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else n.call(this,e)?(e.preventDefault(),e.stopPropagation(),Ft.getComponent("MuteToggle").prototype.handleClick.call(this,e)):r.call(this,e)&&(e.preventDefault(),e.stopPropagation(),Ft.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let t;for(let i=0,n=this.options_.techOrder;i<n.length;i++){const r=n[i];let s=ki.getTech(r);if(s||(s=Ft.getComponent(r)),s){if(s.isSupported()&&(t=s.canPlayType(e),t))return t}else R.error(`The "${r}" tech is undefined. Skipped browser support check for that tech.`)}return""}selectSource(e){const t=this.options_.techOrder.map((e=>[e,ki.getTech(e)])).filter((([e,t])=>t?t.isSupported():(R.error(`The "${e}" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let n;return e.some((e=>t.some((t=>{if(n=i(e,t),n)return!0})))),n};let n;const r=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var s;return n=this.options_.sourceOrder?i(e,t,(s=r,(e,t)=>s(t,e))):i(t,e,r),n||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Fi(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),Li(this,i[0],((e,n)=>{if(this.middleware_=n,t||(this.cache_.sources=i),this.updateSourceCaches_(e),this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var r,s;r=n,s=this.tech_,r.forEach((e=>e.setTech&&e.setTech(s)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off("error",e)};this.one("error",e),this.one("playing",t),this.resetRetryOnError_=()=>{this.off("error",e),this.off("playing",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(Bt(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_("load")}reset(){this.paused()?this.doReset_():Jt(this.play().then((()=>this.doReset_())))}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),Et(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:n}=this.controlBar||{},{seekBar:r}=i||{};e&&e.updateContent(),t&&t.updateContent(),n&&n.updateContent(),r&&(r.update(),r.loadProgressBar&&r.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}playsinline(e){return void 0!==e&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")}poster(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(void 0===e)return this.error_||null;if(I("beforeerror").forEach((t=>{const i=t(this,e);q(i)&&!Array.isArray(i)||"string"==typeof i||"number"==typeof i||null===i?e=i:this.log.error("please return a value that MediaError expects in beforeerror hooks")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=null,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Qt(e),this.addClass("vjs-error"),R.error(`(CODE:${this.error_.code} ${Qt.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),I("error").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,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(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,t,i;const n=vt(this,this.reportUserActivity),r=function(t){n(),this.clearInterval(e)};this.on("mousedown",(function(){n(),this.clearInterval(e),e=this.setInterval(n,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,n())})),this.on("mouseup",r),this.on("mouseleave",r);const s=this.getChild("controlBar");let a;!s||fe||K||(s.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),s.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",n),this.on("keyup",n),this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild("ControlBar");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),t=this.getChild("ControlBar"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass("vjs-hidden")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if("boolean"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return"boolean"!=typeof e||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()})):Promise.resolve().then((()=>{this.enablePosterModeUI_()})):Promise.resolve().then((()=>{this.disablePosterModeUI_()})))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Et(this)&&this.trigger("languagechange"))}languages(){return V(Er.prototype.options_.languages,this.languages_)}toJSON(){const e=V(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let n=t[i];n=V(n),n.player=void 0,e.tracks[i]=n}return e}createModal(e,t){(t=t||{}).content=e||"";const i=new ii(this,t);return this.addChild(i),i.on("dispose",(()=>{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<Sr.length;i++){const n=Sr[i];if(t<=this.breakpoints_[n]){if(e===n)return;e&&this.removeClass(Ar[e]),this.addClass(Ar[n]),this.breakpoint_=n;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=Object.assign({},wr,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return Ar[this.breakpoint_]||""}loadMedia(e,t){if(!e||"object"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=V(e);const{artist:n,artwork:r,description:s,poster:a,src:o,textTracks:l,title:u}=this.cache_.media;!r&&a&&(this.cache_.media.artwork=[{src:a,type:ji(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:u,description:s||n||""}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:ji(t.poster)}]),t}return V(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=Pe(e),n=i["data-setup"];if(Ee(e,"vjs-fill")&&(i.fill=!0),Ee(e,"vjs-fluid")&&(i.fluid=!0),null!==n)try{Object.assign(i,JSON.parse(n||"{}"))}catch(e){R.error("data-setup",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,n=i.length;e<n;e++){const n=i[e],r=n.nodeName.toLowerCase();"source"===r?t.sources.push(Pe(n)):"track"===r&&t.tracks.push(Pe(n))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(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)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>"number"==typeof e))&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}Ci.names.forEach((function(e){const t=Ci[e];Er.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Er.prototype.crossorigin=Er.prototype.crossOrigin,Er.players={};const Cr=_.default.navigator;Er.prototype.options_={techOrder:ki.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Cr&&(Cr.languages&&Cr.languages[0]||Cr.userLanguage||Cr.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,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1},br.forEach((function(e){Er.prototype[`handleTech${Ut(e)}_`]=function(){return this.trigger(e)}})),Ft.registerComponent("Player",Er);const kr="plugin",Ir="activePlugins_",xr={},Pr=e=>xr.hasOwnProperty(e),Lr=e=>Pr(e)?xr[e]:void 0,Dr=(e,t)=>{e[Ir]=e[Ir]||{},e[Ir][t]=!0},Or=(e,t,i)=>{const n=(i?"before":"")+"pluginsetup";e.trigger(n,t),e.trigger(n+":"+t.name,t)},Mr=(e,t)=>(t.prototype.name=e,function(...i){Or(this,{name:e,plugin:t,instance:null},!0);const n=new t(...[this,...i]);return this[e]=()=>n,Or(this,n.getEventHash()),n});class Rr{constructor(e){if(this.constructor===Rr)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),Ot(this),delete this.trigger,Rt(this,this.constructor.defaultState),Dr(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return pt(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[Ir][e]=!1,this.player=this.state=null,t[e]=Mr(e,xr[e])}static isBasic(e){const t="string"==typeof e?Lr(e):e;return"function"==typeof t&&!Rr.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if("string"!=typeof e)throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(Pr(e))R.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(Er.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if("function"!=typeof t)throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return xr[e]=t,e!==kr&&(Rr.isBasic(t)?Er.prototype[e]=function(e,t){const i=function(){Or(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return Dr(this,e),Or(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):Er.prototype[e]=Mr(e,t)),t}static deregisterPlugin(e){if(e===kr)throw new Error("Cannot de-register base plugin.");Pr(e)&&(delete xr[e],delete Er.prototype[e])}static getPlugins(e=Object.keys(xr)){let t;return e.forEach((e=>{const i=Lr(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=Lr(e);return t&&t.VERSION||""}}function Nr(e,t,i,n){return function(e,t){let i=!1;return function(...n){return i||R.warn(e),i=!0,t.apply(this,n)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,n)}Rr.getPlugin=Lr,Rr.BASE_PLUGIN_NAME=kr,Rr.registerPlugin(kr,Rr),Er.prototype.usingPlugin=function(e){return!!this[Ir]&&!0===this[Ir][e]},Er.prototype.hasPlugin=function(e){return!!Pr(e)};const Ur=e=>0===e.indexOf("#")?e.slice(1):e;function Br(e,t,i){let n=Br.getPlayer(e);if(n)return t&&R.warn(`Player "${e}" is already initialised. Options will not be applied.`),i&&n.ready(i),n;const r="string"==typeof e?ze("#"+Ur(e)):e;if(!_e(r))throw new TypeError("The element or ID supplied is not val
2id. (videojs)");const s="getRootNode"in r&&r.getRootNode()instanceof _.default.ShadowRoot?r.getRootNode():r.ownerDocument.body;r.ownerDocument.defaultView&&s.contains(r)||R.warn("The element supplied is not included in the DOM"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(r.parentNode&&r.parentNode.hasAttribute&&r.parentNode.hasAttribute("data-vjs-player")?r.parentNode:r).cloneNode(!0)),I("beforesetup").forEach((e=>{const i=e(r,V(t));q(i)&&!Array.isArray(i)?t=V(t,i):R.error("please return an object in beforesetup hooks")}));const a=Ft.getComponent("Player");return n=new a(r,t,i),I("setup").forEach((e=>e(n))),n}if(Br.hooks_=k,Br.hooks=I,Br.hook=function(e,t){I(e,t)},Br.hookOnce=function(e,t){I(e,[].concat(t).map((t=>{const i=(...n)=>(x(e,i),t(...n));return i})))},Br.removeHook=x,!0!==_.default.VIDEOJS_NO_DYNAMIC_STYLE&&ve()){let e=ze(".vjs-styles-defaults");if(!e){e=tt("vjs-styles-defaults");const t=ze("head");t&&t.insertBefore(e,t.firstChild),it(e,"\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    ")}}Je(1,Br),Br.VERSION=C,Br.options=Er.prototype.options_,Br.getPlayers=()=>Er.players,Br.getPlayer=e=>{const t=Er.players;let i;if("string"==typeof e){const n=Ur(e),r=t[n];if(r)return r;i=ze("#"+n)}else i=e;if(_e(i)){const{player:e,playerId:n}=i;if(e||t[n])return e||t[n]}},Br.getAllPlayers=()=>Object.keys(Er.players).map((e=>Er.players[e])).filter(Boolean),Br.players=Er.players,Br.getComponent=Ft.getComponent,Br.registerComponent=(e,t)=>(ki.isTech(t)&&R.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),Ft.registerComponent.call(Ft,e,t)),Br.getTech=ki.getTech,Br.registerTech=ki.registerTech,Br.use=function(e,t){Ii[e]=Ii[e]||[],Ii[e].push(t)},Object.defineProperty(Br,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Br.middleware,"TERMINATOR",{value:Pi,writeable:!1,enumerable:!0}),Br.browser=me,Br.obj=W,Br.mergeOptions=Nr(9,"videojs.mergeOptions","videojs.obj.merge",V),Br.defineLazyProperty=Nr(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",z),Br.bind=Nr(9,"videojs.bind","native Function.prototype.bind",vt),Br.registerPlugin=Rr.registerPlugin,Br.deregisterPlugin=Rr.deregisterPlugin,Br.plugin=(e,t)=>(R.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Rr.registerPlugin(e,t)),Br.getPlugins=Rr.getPlugins,Br.getPlugin=Rr.getPlugin,Br.getPluginVersion=Rr.getPluginVersion,Br.addLanguage=function(e,t){return e=(""+e).toLowerCase(),Br.options.languages=V(Br.options.languages,{[e]:t}),Br.options.languages[e]},Br.log=R,Br.createLogger=N,Br.time=Yt,Br.createTimeRange=Nr(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Vt),Br.createTimeRanges=Nr(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Vt),Br.formatTime=Nr(9,"videojs.formatTime","videojs.time.formatTime",Xt),Br.setFormatTime=Nr(9,"videojs.setFormatTime","videojs.time.setFormatTime",Wt),Br.resetFormatTime=Nr(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",Gt),Br.parseUrl=Nr(9,"videojs.parseUrl","videojs.url.parseUrl",pi),Br.isCrossOrigin=Nr(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",mi),Br.EventTarget=At,Br.any=gt,Br.on=ct,Br.one=ft,Br.off=ht,Br.trigger=pt,Br.xhr=T.default,Br.TextTrack=bi,Br.AudioTrack=Ti,Br.VideoTrack=Si,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((e=>{Br[e]=function(){return R.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),Ye[e].apply(null,arguments)}})),Br.computedStyle=Nr(9,"videojs.computedStyle","videojs.dom.computedStyle",Ge),Br.dom=Ye,Br.fn=Tt,Br.num=un,Br.str=jt,Br.url=yi,Br.Error={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};class jr{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Fr extends Br.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get:()=>e.selectedIndex_}),Object.defineProperty(e,"length",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new jr(e),""+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let i=0,n=this.length;i<n;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Fr.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const e in Fr.prototype.allowedEvents_)Fr.prototype["on"+e]=null;var qr="4.1.0";const Hr=function(e){return function(e){const t=e.qualityLevels,i=new Fr,n=function(){i.dispose(),e.qualityLevels=t,e.off("dispose",n)};return e.on("dispose",n),e.qualityLevels=()=>i,e.qualityLevels.VERSION=qr,i}(this,Br.obj.merge({},e))};Br.registerPlugin("qualityLevels",Hr),Hr.VERSION=qr;const Vr=w.default,$r=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,zr=e=>Br.log.debug?Br.log.debug.bind(Br,"VHS:",`${e} >`):function(){};function Wr(...e){const t=Br.obj||Br;return(t.merge||t.mergeOptions).apply(t,e)}function Gr(...e){const t=Br.time||Br;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Xr=1/30,Yr=.1,Kr=function(e,t){const i=[];let n;if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&i.push([e.start(n),e.end(n)]);return Gr(i)},Qr=function(e,t){return Kr(e,(function(e,i){return e-Yr<=t&&i+Yr>=t}))},Zr=function(e,t){return Kr(e,(function(e){return e-Xr>=t}))},Jr=e=>{const t=[];if(!e||!e.length)return"";for(let i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")},es=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},ts=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},is=function(e,t){let i=0;if(!e||!e.length)return i;for(let n=0;n<e.length;n++){const r=e.start(n),s=e.end(n);t>s||(i+=t>r&&t<=s?s-t:s-r)}return i},ns=(e,t)=>{if(!t.preload)return t.duration;let i=0;
vendor: 4,263 bytes, line 2
2return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(i+=e.partTargetDuration)})),i},rs=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(n,r){e.push({duration:n.duration,segmentIndex:i,partIndex:r,part:n,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),ss=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},as=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let n=(i||[]).reduce(((e,t)=>e+("PART"===t.type?1:0)),0);return n+=t&&t.length?t.length:0,n},os=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=ss(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},ls=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const n=function(e,t){let i=0,n=t-e.mediaSequence,r=e.segments[n];if(r){if(void 0!==r.start)return{result:r.start,precise:!0};if(void 0!==r.end)return{result:r.end-r.duration,precise:!0}}for(;n--;){if(r=e.segments[n],void 0!==r.end)return{result:i+r.end,precise:!0};if(i+=ns(e,r),void 0!==r.start)return{result:i+r.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(n.precise)return n.result;const r=function(e,t){let i,n=0,r=t-e.mediaSequence;for(;r<e.segments.length;r++){if(i=e.segments[r],void 0!==i.start)return{result:i.start-n,precise:!0};if(n+=ns(e,i),void 0!==i.end)return{result:i.end-n,precise:!0}}return{result:-1,precise:!1}}(e,t);return r.precise?r.result:n.result+i},us=function(e,t,i){if(!e)return 0;if("number"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return _.default.Infinity}return ls(e,t,i)},ds=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:n}){let r=0;if(i>n&&([i,n]=[n,i]),i<0){for(let t=i;t<Math.min(0,n);t++)r+=e;i=0}for(let e=i;e<n;e++)r+=t[e].duration;return r},cs=function(e,t,i,n){if(!e||!e.segments)return null;if(e.endList)return us(e);if(null===t)return null;t=t||0;let r=ls(e,e.mediaSequence+e.segments.length,t);return i&&(r-=n="number"==typeof n?n:os(null,e)),Math.max(0,r)},hs=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},ps=function(e){return e.excludeUntil&&e.excludeUntil===1/0},fs=function(e){const t=hs(e);return!e.disabled&&!t},gs=function(e,t){return t.attributes&&t.attributes[e]},ms=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!fs(e)&&(e.attributes.BANDWIDTH||0)<i)).length},ys=(e,t)=>!(!e&&!t||!e&&t||e&&!t||e!==t&&(!e.id||!t.id||e.id!==t.id)&&(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)&&(!e.uri||!t.uri||e.uri!==t.uri)),vs=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let n=!1;for(const e in i){for(const r in i[e])if(n=t(i[e][r]),n)break;if(n)break}return!!n},_s=e=>{if(!e||!e.playlists||!e.playlists.length)return vs(e,(e=>e.playlists&&e.playlists.length||e.uri));for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],n=i.attributes&&i.attributes.CODECS;if((!n||!n.split(",").every((e=>d.isAudioCodec(e))))&&!vs(e,(e=>ys(i,e))))return!1}return!0};var bs={liveEdgeDelay:os,duration:us,seekable:function(e,t,i){const n=t||0;let r=cs(e,t,!0,i);return null===r?Gr():(r<n&&(r=n),Gr(n,r))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:n,startTime:r,exactManifestTimings:s}){let a=t-r;const o=rs(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&("number"!=typeof n||"number"!=typeof t.partIndex||n===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,s){if(a<0)continue}else if(a+Xr<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:r-ds({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;
vendor: 1,725 bytes, line 2
2i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const n=i.duration>Xr;if(0!==a&&!(n&&a+Xr>=0)||t===o.length-1){if(s){if(a>0)continue}else if(a-Xr>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:r+ds({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:fs,isDisabled:function(e){return e.disabled},isExcluded:hs,isIncompatible:ps,playlistEnd:cs,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:gs,estimateSegmentRequestTime:function(e,t,i,n=0){return gs("BANDWIDTH",i)?(e*i.attributes.BANDWIDTH-8*n)/t:NaN},isLowestEnabledRendition:ms,isAudioOnly:_s,playlistMatch:ys,segmentDurationWithParts:ns};const{log:Ts}=Br,Ss=(e,t)=>`${e}-${t}`,As=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,ws=(e,t)=>{e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((i=>{if(e.mediaGroups[i])for(const n in e.mediaGroups[i])for(const r in e.mediaGroups[i][n]){const s=e.mediaGroups[i][n][r];t(s,i,n,r)}}))},Es=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},Cs=(e,t,i=As)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const n=_s(e);ws(e,((t,r,s,a)=>{if(!t.playlists||!t.playlists.length){if(n&&"AUDIO"===r&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===s)return}t.playlists=[A.default({},t)]}
vendor: 14,058 bytes, line 2
2t.playlists.forEach((function(t,n){const o=i(r,s,a,t),l=Ss(n,o);t.uri?t.resolvedUri=t.resolvedUri||Vr(e.uri,t.uri):(t.uri=0===n?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];Es({playlist:i,id:Ss(t,i.uri)}),i.resolvedUri=Vr(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||Ts.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}})(e),(e=>{ws(e,(t=>{t.uri&&(t.resolvedUri=Vr(e.uri,t.uri))}))})(e)};class ks{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,n)=>{if(!this.processedDateRanges_.has(n)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const Is=({requestType:e,request:t,error:i,parseFailure:n})=>{const r=t.status<200||t.status>299,s=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=r&&!s||n;if(i&&s)a.error=A.default({},i),a.errorType=Br.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=Br.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=Br.Error.NetworkRequestTimeout;else if(o){const e=n?Br.Error.NetworkBodyParserFailed:Br.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},xs=zr("CodecUtils"),Ps=function(e){const t=e.attributes||{};if(t.CODECS)return d.parseCodecs(t.CODECS)},Ls=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},Ds=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:n})=>{t[e]=t[e]||[],t[e].push(d.translateLegacyCodec(`${i}${n}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return xs(`multiple ${e} codecs found as attributes: ${t[e].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},Os=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},Ms=function(e,t){const i=t.attributes||{},n=Ds(Ps(t)||[]);if(Ls(e,t)&&!n.audio&&!((e,t)=>{if(!Ls(e,t))return!0;const i=t.attributes||{},n=e.mediaGroups.AUDIO[i.AUDIO];for(const e in n)if(!n[e].uri&&!n[e].playlists)return!0;return!1})(e,t)){const t=Ds(d.codecsFromDefault(e,i.AUDIO)||[]);t.audio&&(n.audio=t.audio)}return n},{EventTarget:Rs}=Br,Ns=(e,t)=>{if(!e)return t;const i=Wr(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let n=0;n<t.parts.length;n++)e.parts&&e.parts[n]&&(i.parts[n]=Wr(e.parts[n],t.parts[n]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},Us=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=Vr(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Vr(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Vr(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=Vr(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=Vr(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=Vr(t,e.uri))}))},Bs=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if("MAP"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},js=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Fs=(e,t,i=js)=>{const n=Wr(e,{}),r=n.playlists[t.id];if(!r)return null;if(i(r,t))return null;t.segments=Bs(t);const s=Wr(r,t);if(s.preloadSegment&&!t.preloadSegment&&delete s.preloadSegment,r.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}s.segments=((e,t,i)=>{const n=e.slice(),r=t.slice();i=i||0;const s=[];let a;for(let e=0;e<r.length;e++){const t=n[e+i],o=r[e];t?(a=t.map||a,s.push(Ns(t,o))):(a&&!o.map&&(o.map=a),s.push(o))}return s})(r.segments,t.segments,t.mediaSequence-r.mediaSequence)}s.segments.forEach((e=>{Us(e,s.resolvedUri)}));for(let e=0;e<n.playlists.length;e++)n.playlists[e].id===t.id&&(n.playlists[e]=s);return n.playlists[t.id]=s,n.playlists[t.uri]=s,ws(e,((e,i,n,r)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=s)})),n},qs=(e,t)=>{const i=e.segments||[],n=i[i.length-1],r=n&&n.parts&&n.parts[n.parts.length-1],s=r&&r.duration||n&&n.duration;return t&&s?1e3*s:500*(e.partTargetDuration||e.targetDuration||10)},Hs=(e,t,i)=>{if(!e)return;const n=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:r}=e.attributes;n.push({id:e.id,bandwidth:t,resolution:i,codecs:r})})),{type:t,isLive:i,renditions:n}};class Vs extends Rs{constructor(e,t,i={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=zr("PlaylistLoader");const{withCredentials:n=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=n,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const r=t.options_;this.customTagParsers=r&&r.customTagParsers||[],this.customTagMappers=r&&r.customTagMappers||[],this.llhls=r&&r.llhls,this.dateRangesStorage_=new ks,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if("HAVE_METADATA"!==this.state)return;const e=this.media();let t=Vr(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let n=t.mediaSequence+t.segments.length;if(e){const r=e.parts||[],s=as(t)-1;s>-1&&s!==r.length-1&&(i._HLS_part=s),(s>-1||r.length)&&n--}i._HLS_msn=n}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){const t=new _.default.URL(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:"hls-playlist"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),"HAVE_METADATA"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:n,id:r}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[r],status:e.status,message:`HLS playlist request error at URL: ${n}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:Is({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:n=[],customTagMappers:r=[],llhls:s})=>{const a=new u.Parser;e&&a.on("warn",e),t&&a.on("info",t),n.forEach((e=>a.addParser(e))),r.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(s||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=ss(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),Ts.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.")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:Br.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:n}=t.RESOLUTION||{};if(i&&n)return!0;const r=Ps(e)||[],s=Ds(r);return Boolean(s.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata({playlistString:e,playlistObject:t,url:i,id:n}){this.request=null,this.state="HAVE_METADATA";const r={playlistInfo:{type:"media",uri:i}};this.trigger({type:"playlistparsestart",metadata:r});const s=t||this.parseManifest_({url:i,manifestString:e});s.lastRequest=Date.now(),Es({playlist:s,uri:i,id:n});const a=Fs(this.main,s);this.targetDuration=s.partTargetDuration||s.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[n]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(qs(this.media(),!!a)),r.parsedPlaylist=Hs(this.main.playlists,r.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:r}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),_.default.clearTimeout(this.mediaUpdateTimeout),_.default.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new ks,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(_.default.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=_.default.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,n=!this.media_||e.id!==this.media_.id,r=this.main.playlists[e.id];if(r&&r.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(n&&(this.trigger("mediachanging"),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(qs(e,!0)),!n)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;const s={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:s}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},((t,n)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=$r(e.resolvedUri,n),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:"playlistrequestcomplete",metadata:s}),this.haveMetadata({playlistString:n.responseText,url:e.uri,id:e.id}),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")}}))}pause(){this.mediaUpdateTimeout&&(_.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(_.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=_.default.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(_.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=_.default.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)}),e))}
vendor: 1,095 bytes, line 2
2start(){if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=_.default.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:Is({requestType:i.requestType,request:i,error:t})},"HAVE_NOTHING"===this.state&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=$r(this.src,i),this.trigger({type:"playlistparsestart",metadata:e});const n=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=Hs(n.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(n)}))}
vendor: 1,551 bytes, line 2
2srcUri(){return"string"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists)return this.main=e,Cs(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=Bs(e),e.segments.forEach((t=>{Us(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||_.default.location.href;this.main=((e,t)=>{const i=Ss(0,t),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:_.default.location.href,resolvedUri:_.default.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return n.playlists[i]=n.playlists[0],n.playlists[t]=n.playlists[0],n})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,t){const i=this.main,n=e.ID;let r=i.playlists.length;for(;r--;){const s=i.playlists[r];if(s.attributes["PATHWAY-ID"]===n){const a=s.resolvedUri,o=s.id;if(t){const t=this.createCloneURI_(s.resolvedUri,e),a=Ss(n,t),o=this.createCloneAttributes_(n,s.attributes),l=this.createClonePlaylist_(s,a,e,o);i.playlists[r]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(r,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,n=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][n])for(const t in i.mediaGroups[e])if(t===n){for(const n in i.mediaGroups[e][t])i.mediaGroups[e][t][n].playlists.forEac
vendor: 4,489 bytes, line 2
2h(((e,t)=>{const n=i.playlists[e.id],r=n.id,s=n.resolvedUri;delete i.playlists[r],delete i.playlists[s]}));delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,n=i.playlists.length,r=this.createCloneURI_(t.resolvedUri,e),s=Ss(e.ID,r),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,s,e,a);i.playlists[n]=o,i.playlists[s]=o,i.playlists[r]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e["BASE-ID"],n=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((r=>{if(n.mediaGroups[r]&&!n.mediaGroups[r][t])for(const s in n.mediaGroups[r])if(s===i){n.mediaGroups[r][t]={};for(const i in n.mediaGroups[r][s]){const a=n.mediaGroups[r][s][i];n.mediaGroups[r][t][i]=A.default({},a);const o=n.mediaGroups[r][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((s,a)=>{const l=n.playlists[s.id],u=As(r,t,i),d=Ss(t,u);if(l&&!n.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;n.playlists[d]=t,n.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(s,d,e)}))}}}))}createClonePlaylist_(e,t,i,n){const r=this.createCloneURI_(e.resolvedUri,i),s={resolvedUri:r,uri:r,id:t};return e.segments&&(s.segments=[]),n&&(s.attributes=n),Wr(e,s)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t["URI-REPLACEMENT"].HOST;const n=t["URI-REPLACEMENT"].PARAMS;for(const e of Object.keys(n))i.searchParams.set(e,n[e]);return i.href}createCloneAttributes_(e,t){const i={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((n=>{t[n]&&(i[n]=e)})),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const n=e.contentProtection[i].attributes.keyId;n&&t.add(n.toLowerCase())}return t}}}const $s=function(e,t,i,n){const r="arraybuffer"===e.responseType?e.response:e.responseText;!t&&r&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=r.byteLength||r.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(r||e.responseText)))),n(t,e)},zs=function(){const e=function e(t,i){t=Wr({timeout:45e3},t);const n=e.beforeRequest||Br.Vhs.xhr.beforeRequest,r=e._requestCallbackSet||Br.Vhs.xhr._requestCallbackSet||new Set,s=e._responseCallbackSet||Br.Vhs.xhr._responseCallbackSet;n&&"function"==typeof n&&(Br.log.warn("beforeRequest is deprecated, use onRequest instead."),r.add(n));const a=!0===Br.Vhs.xhr.original?Br.xhr:Br.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(r,t);r.delete(n);const l=a(o||t,(function(e,t){return((e,t,i,n)=>{e&&e.size&&e.forEach((e=>{e(t,i,n)}))})(s,l,e,t),$s(l,e,t,i)})),u=l.abort;return l.abort=function(){return l.aborted=!0,u.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ws=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t="bigint"==typeof e.offset||"bigint"==typeof e.length?_.default.BigInt(e.offset)+_.default.BigInt(e.length)-_.default.BigInt(1):e.offset+e.length-1,"bytes="+i+"-"+t}(e.byterange)),t},Gs=function(e,t){return e.start(t)+"-"+e.end(t)},Xs=function(e,t){const i=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},Ys=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Ks=function(e){const t={};return Object.keys(e).forEach((i=>{const n=e[i];h.isArrayBufferView(n)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n})),t},Qs=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Zs=function(e){return e.resolvedUri},Js=e=>{const t=Array.prototype.slice.call(e),i=16;let n,r,s="";for(let e=0;e<t.length/i;e++)n=t.slice(e*i,e*i+i).map(Xs).join(""),r=t.slice(e*i,e*i+i).map(Ys).join(""),s+=n+" "+r+"\n";return s};var ea=Object.freeze({__proto__:null,createTransferableMessage:Ks,initSegmentId:Qs,segmentKeyId:Zs,hexDump:Js,tagDump:({bytes:e})=>Js(e),textRanges:e=>{let t,i="";for(t=0;t<e.length;t++)i+=Gs(e,t)+" ";return i}});const ta=({programTime:e,playlist:t,retryCount:i=2,seekTo:n,pauseAfterSeek:r=!0,tech:s,callback:a})=>{if(!a)throw new Error("seekToProgramTime: callback must be provided");
2if(void 0===e||!t||!n)return a({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!t.endList&&!s.hasStarted_)return a({message:"player must be playing a live stream to start buffering"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:"programDateTime tags must be provided in the manifest "+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let n=t.segments[0];if(i<new Date(n.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(n=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const r=t.segments[t.segments.length-1],s=r.dateTimeObject,a=r.videoTimingInfo?(o=r.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:r.duration+.25*r.duration;var o;return i>new Date(s.getTime()+1e3*a)?null:(i>new Date(s)&&(n=r),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:bs.duration(t,t.mediaSequence+t.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,u=((e,t)=>{let i,n;try{i=new Date(e),n=new Date(t)}catch(e){}const r=i.getTime();return(n.getTime()-r)/1e3})(l.dateTimeObject,e);if("estimate"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(n(o.estimatedStart+u),void s.one("seeked",(()=>{ta({programTime:e,playlist:t,retryCount:i-1,seekTo:n,pauseAfterSeek:r,tech:s,callback:a})})));const d=l.start+u;s.one("seeked",(()=>a(null,s.currentTime()))),r&&s.pause(),n(d)},ia=(e,t)=>{if(4===e.readyState)return t()},{EventTarget:na}=Br,ra=function(e,t){if(!js(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const n=e.segments[i],r=t.segments[i];if(n.uri!==r.uri)return!1;if(!n.byterange&&!r.byterange)continue;const s=n.byterange,a=r.byterange;if(s&&!a||!s&&a)return!1;if(s.offset!==a.offset||s.length!==a.length)return!1}return!0},sa=(e,t,i,n)=>`placeholder-uri-${e}-${t}-${n.attributes.NAME||i}`,aa=(e,t)=>{const i={};for(const s in e){const a=e[s].sidx;if(a){const e=p.generateSidxKey(a);if(!t[e])break;n=t[e].sidxInfo,r=a,(Boolean(!n.map&&!r.map)||Boolean(n.map&&r.map&&n.map.byterange.offset===r.map.byterange.offset&&n.map.byterange.length===r.map.byterange.length))&&n.uri===r.uri&&n.byterange.offset===r.byterange.offset&&n.byterange.length===r.byterange.length&&(i[e]=t[e])}}var n,r;return i};class oa extends na{constructor(e,t,i={},n){super(),this.isPaused_=!0,this.mainPlaylistLoader_=n||this,n||(this.isMain_=!0);const{withCredentials:r=!1}=i;if(this.vhs_=t,this.withCredentials=r,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",(()=>{this.refreshXml_()})),this.on("mediaupdatetimeout",(()=>{this.refreshMedia_(this.media().id)})),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=zr("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger("error"),!0):void 0)}addSidxSegments_(e,t,i){const n=e.sidx&&p.generateSidxKey(e.sidx);if(!e.sidx||!n||this.mainPlaylistLoader_.sidxMapping_[n])return _.default.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=_.default.setTimeout((()=>i(!1)),0));const r=$r(e.sidx.resolvedUri),s=(r,s)=>{if(this.requestErrored_(r,s,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=s;let l;try{l=E.default(h.toUint8(s.response).subarray(8))}catch(e){return e.metadata=Is({requestType:o,request:s,parseFailure:!0}),void this.requestErrored_(e,s,t)}return a[n]={sidxInfo:e.sidx,sidx:l},p.addSidxSegmentsToPlaylist(e,l,e.sidx.resolvedUri),i(!0)};this.request=((e,t,i)=>{let n,r=[],s=!1;const a=function(e,t,n,r){return t.abort(),s=!0,i(e,t,n,r)},o=function(e,t){if(s)return;if(e)return e.metadata=Is({requestType:"dash-sidx",request:t,error:e}),a(e,t,"",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=h.concatTypedArrays(r,h.stringToBytes(i,!0)),n=n||g.getId3Offset(r),r.length<10||n&&r.length<n+2)return ia(t,(()=>a(e,t,"",r)));const o=m.detectContainerForBytes(r);return"ts"===o&&r.length<188||!o&&r.length<376?ia(t,(()=>a(e,t,"",r))):a(null,t,o,r)},l={uri:e,beforeSend(e){e.overrideMimeType("text/plain;
2 charset=x-user-defined"),e.addEventListener("progress",(function({total:t,loaded:i}){return $s(e,null,{statusCode:e.status},o)}))}},u=t(l,(function(e,t){return $s(u,e,t,o)}));return u})(r,this.vhs_.xhr,((t,i,n,a)=>{if(t)return s(t,i);if(!n||"mp4"!==n){const t=n||"unknown";return s({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${r}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return s(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:r,responseType:"arraybuffer",requestType:"dash-sidx",headers:Ws({byterange:e.sidx.byterange})},s)}))}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},_.default.clearTimeout(this.minimumUpdatePeriodTimeout_),_.default.clearTimeout(this.mediaRequest_),_.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);const t=this.state;if("string"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),this.trigger("mediachange")));i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,_.default.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),"HAVE_MAIN_MANIFEST"===e?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),_.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(_.default.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,_.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=_.default.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()}start(){if(this.started=!0,!this.isMain_)return _.default.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=_.default.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},((i,n)=>{if(i){const{requestType:e}=n;i.metadata=Is({requestType:e,request:n,error:i})}if(this.requestErrored_(i,n))return void("HAVE_NOTHING"===this.state&&(this.started=!1));this.trigger({type:"manifestrequestcomplete",metadata:t});const r=n.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=n.responseText,n.responseHeaders&&n.responseHeaders.date?this.mainLoaded_=Date.parse(n.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=$r(this.mainPlaylistLoader_.srcUrl,n),r?(this.handleMain_(),void this.syncCl
vendor: 2,940 bytes, line 2
2ientServerClock_((()=>e(n,r)))):e(n,r)}))}syncClientServerClock_(e){const t=p.parseUTCTiming(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):"DIRECT"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Vr(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},((i,n)=>{if(!this.request)return;if(i){const{requestType:t}=n;return this.error.metadata=Is({requestType:t,request:n,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let r;r="HEAD"===t.method?n.responseHeaders&&n.responseHeaders.date?Date.parse(n.responseHeaders.date):this.mainLoaded_:Date.parse(n.responseText),this.mainPlaylistLoader_.clientOffset_=r-Date.now(),e()})))}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){_.default.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:"manifestparsestart",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:n,previousManifest:r})=>{const s=p.parse(e,{manifestUri:t,clientOffset:i,sidxMapping:n,previousManifest:r});return Cs(s,t,sa),s})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:Br.Error.StreamingDashManifestParserError,error:e},this.trigger("error")}e&&(i=((e,t,i)=>{let n=!0,r=Wr(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const s=t.playlists[e];if(s.sidx){const e=p.generateSidxKey(s.sidx);i&&i[e]&&i[e].sidx&&p.addSidxSegmentsToPlaylist(s,i[e].sidx,s.sidx.resolvedUri)}const a=Fs(r,s,ra);a&&(r=a,n=!1)}return ws(t,((e,t,i,s)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Fs(r,e.playlists[0],ra);o&&(r=o,s in r.mediaGroups[t][i]||(r.mediaGroups[t][i][s]=e),r.mediaGroups[t][i][s].playlists[0]=r.playlists[a],n=!1)}})),((e,t)=>{ws(e,((i,n,r,s)=>{t.mediaGroups[n][r]&&s in t.mediaGroups[n][r]||delete e.mediaGroups[n][r][s]}))})(r,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(n=!1),n?null:r})(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const n=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(n&&n!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=n),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:n}=i,r=[];
vendor: 4,980 bytes, line 2
2i.playlists.forEach((e=>{r.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const s={duration:e,isLive:!n,renditions:r};t.parsedManifest=s,this.trigger({type:"manifestparsecomplete",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(_.default.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=_.default.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=aa(e.playlists,t);return ws(e,((e,n,r,s)=>{if(e.playlists&&e.playlists.length){const n=e.playlists;i=Wr(i,aa(n,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=_.default.setTimeout((()=>{this.trigger("mediaupdatetimeout"),e()}),qs(this.media(),Boolean(i))))};e()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack("EventStream",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const n=e.contentProtection[i].attributes["cenc:default_KID"];n&&t.add(n.replace(/-/g,"").toLowerCase())}return t}}}var la={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};const ua=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},da=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=ua(new Worker(t));i.objURL=t;const n=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),n.call(this)},i}},ca=function(e){return`var browserWorkerPolyFill = ${ua.toString()};\nbrowserWorkerPolyFill(self);\n`+e},ha=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},pa=ca(ha((function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var n;return!!e[t]&&(n=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(n,1),n>-1)},this.trigger=function(t){var i,n,r,s;if(i=e[t])if(2===arguments.length)for(r=i.length,n=0;n<r;++n)i[n].call(this,arguments[1]);else{for(s=[],n=arguments.length,n=1;n<arguments.length;++n)s.push(arguments[n]);for(r=i.length,n=0;n<r;++n)i[n].apply(this,s)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger("data",e)},t.prototype.flush=function(e){this.trigger("done",e)},t.prototype.partialFlush=function(e){this.trigger("partialdone",e)},t.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},t.prototype.reset=function(e){this.trigger("reset",e)};var n,r,s,a,o,l,u,d,c,h,p,f,g,m,y,v,_,b,T,S,A,w,E,C,k,I,x,P,L,D,O,M,R,N,U,B,j,F,q,H,V=t,$=Math.pow(2,32),z={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?
vendor: 4,191 bytes, line 2
2Number(t):t:i.getUint32(0)*$+i.getUint32(4)},MAX_UINT32:$},W=z.MAX_UINT32;!function(){var e;if(w={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:[]},"undefined"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);E=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),k=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),C=new Uint8Array([0,0,0,1]),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]),x=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]),P={video:I,audio:x},O=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),M=new Uint8Array([0,0,0,0,0,0,0,0]),R=M,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),U=M,L=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),n=function(e){var t,i,n=[],r=0;for(t=1;t<arguments.length;t++)n.push(arguments[t]);for(t=n.length;t--;)r+=n[t].byteLength;for(i=new Uint8Array(r+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,r=8;t<n.length;t++)i.set(n[t],r),r+=n[t].byteLength;return i},r=function(){return n(w.dinf,n(w.dref,O))},s=function(e){return n(w.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,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},y=function(e){return n(w.hdlr,P[e])},m=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),n(w.mdhd,t)},g=function(e){return n(w.mdia,m(e),y(e.type),l(e))},o=function(e){return n(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},l=function(e){return n(w.minf,"video"===e.type?n(w.vmhd,L):n(w.smhd,D),r(),_(e))},u=function(e,t){for(var i=[],r=t.length;r--;)i[r]=T(t[r]);return n.apply(null,[w.moof,o(e)].concat(i))},d=function(e){for(var t=e.length,i=[];t--;)i[t]=p(e[t]);return n.apply(null,[w.moov,h(4294967295)].concat(i).concat(c(e)))},c=function(e){for(var t=e.length,i=[];t--;)i[t]=S(e[t]);return n.apply(null,[w.mvex].concat(i))},h=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,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 n(w.mvhd,t)},v=function(e){var t,i,r=e.samples||[],s=new Uint8Array(4+r.length);for(i=0;i<r.length;i++)t=r[i].flags,s[i+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return n(w.sdtp,s)},_=function(e){return n(w.stbl,b(e),n(w.stts,U),n(w.stsc,R),n(w.stsz,N),n(w.stco,M))},b=function(e){return n(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?B(e):j(e))},B=function(e){var t,i,r=e.sps||[],s=e.pps||[],a=[],o=[];for(t=0;t<r.length;t++)a.push((65280&r[t].byteLength)>>>8),a.push(255&r[t].byteLength),a=a.concat(Array.prototype.slice.call(r[t]));for(t=0;t<s.length;t++)o.push((65280&s[t].byteLength)>>>8),o.push(255&s[t].byteLength),o=o.concat(Array.prototype.slice.call(s[t]));if(i=[w.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&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.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]),n(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([r.length],a,[s.length],o))),n(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.s
vendor: 11,403 bytes, line 2
2arRatio[0],u=e.sarRatio[1];i.push(n(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u])))}return n.apply(null,i)},j=function(e){return n(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),s(e))},f=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.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&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return n(w.tkhd,t)},T=function(e){var t,i,r,s,a,o;return t=n(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/W),o=Math.floor(e.baseMediaDecodeTime%W),i=n(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),"audio"===e.type?(r=A(e,92),n(w.traf,t,i,r)):(s=v(e),r=A(e,s.length+92),n(w.traf,t,i,r,s))},p=function(e){return e.duration=e.duration||4294967295,n(w.trak,f(e),g(e))},S=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),n(w.trex,t)},H=function(e,t){var i=0,n=0,r=0,s=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(n=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(s=8)),[0,0,i|n|r|s,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},q=function(e,t){var i,r,s,a,o,l;for(t+=20+16*(a=e.samples||[]).length,s=H(a,t),(r=new Uint8Array(s.length+16*a.length)).set(s),i=s.length,l=0;l<a.length;l++)o=a[l],r[i++]=(4278190080&o.duration)>>>24,r[i++]=(16711680&o.duration)>>>16,r[i++]=(65280&o.duration)>>>8,r[i++]=255&o.duration,r[i++]=(4278190080&o.size)>>>24,r[i++]=(16711680&o.size)>>>16,r[i++]=(65280&o.size)>>>8,r[i++]=255&o.size,r[i++]=o.flags.isLeading<<2|o.flags.dependsOn,r[i++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,r[i++]=61440&o.flags.degradationPriority,r[i++]=15&o.flags.degradationPriority,r[i++]=(4278190080&o.compositionTimeOffset)>>>24,r[i++]=(16711680&o.compositionTimeOffset)>>>16,r[i++]=(65280&o.compositionTimeOffset)>>>8,r[i++]=255&o.compositionTimeOffset;return n(w.trun,r)},F=function(e,t){var i,r,s,a,o,l;for(t+=20+8*(a=e.samples||[]).length,s=H(a,t),(i=new Uint8Array(s.length+8*a.length)).set(s),r=s.length,l=0;l<a.length;l++)o=a[l],i[r++]=(4278190080&o.duration)>>>24,i[r++]=(16711680&o.duration)>>>16,i[r++]=(65280&o.duration)>>>8,i[r++]=255&o.duration,i[r++]=(4278190080&o.size)>>>24,i[r++]=(16711680&o.size)>>>16,i[r++]=(65280&o.size)>>>8,i[r++]=255&o.size;return n(w.trun,i)},A=function(e,t){return"audio"===e.type?F(e,t):q(e,t)};var G,X,Y,K,Q,Z,J,ee,te={ftyp:a=function(){return n(w.ftyp,E,C,E,k)},mdat:function(e){return n(w.mdat,e)},moof:u,moov:d,initSegment:function(e){var t,i=a(),n=d(e);return(t=new Uint8Array(i.byteLength+n.byteLength)).set(i),t.set(n,i.byteLength),t}},ie=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ne={groupNalsIntoFrames:function(e){var t,i,n=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,n.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(i=e[t]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return r.length&&(!n.duration||n.duration<=0)&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n),r},groupFramesIntoGops:function(e){var t,i,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(n.length&&(r.push(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return r.length&&n.duration<=0&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration,r.push(n),r},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,n,r,s,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(s=e[i],n=0;n<s.length;n++)a=s[n],o+=(r=ie(a,o)).size,l.push(r);return l},concatenateNalData:function(e){var t,i,n,r,s,a,o=0,l=e.byteLength,u=e.nalCount,d=new Uint8Array(l+4*u),c=new DataView(d.buffer);for(t=0;t<e.length;t++)for(r=e[t],i=0;i<r.length;i++)for(s=r[i],n=0;n<s.length;n++)a=s[n],c.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,n=[];return i=ie(e,t||0),n.push(i),n},concatenateNalDataForFrame:function(e){var t,i,n=0,r=e.byteLength,s=e.length,a=new Uint8Array(r+4*s),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(n,i.data.byteLength),n+=4,a.set(i.data,n),n+=i.data.byteLength;return a}},re=[33,16,5,32,164,27],se=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ae=function(e){for(var t=[];e--;)t.push(0);return t},oe=9e4;Z=function(e,t){return X(Q(e,t))},J=function(e,t){return Y(K(e),t)},ee=function(e,t,i){return K(i?e:e-t)};var le={ONE_SECOND_IN_TS:oe,secondsToVideoTs:X=function(e){return e*oe},secondsToAudioTs:Y=function(e,t){return e*t},videoTsToSeconds:K=function(e){return e/oe},audioTsToSeconds:Q=function(e,t){return e/t},audioTsToVideoTs:Z,videoTsToAudioTs:J,metadataTsToSeconds:ee},ue=le,de={prefixWithSilence:function(e,t,i,n){var r,s,a,o,l,u=0,d=0,c=0;if(t.length&&(r=ue.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),s=Math.ceil(ue.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&n&&(u=r-Math.max(i,n),c=(d=Math.floor(u/s))*s),!(d<1||c>ue.ONE_SECOND_IN_TS/2))){for((a=function(){if(!G){var e={96e3:[re,[227,64],ae(154),[56]],88200:[re,[231],ae(170),[56]],64e3:[re,[248,192],ae(240),[56]],48e3:[re,[255,192],ae(268),[55,148,128],ae(54),[112]],44100:[re,[255,192],ae(268),[55,163,128],ae(84),[112]],32e3:[re,[255,192],ae(268),[55,234],ae(226),[112]],24e3:[re,[255,192],ae(268),[55,255,128],ae(268),[111,112],ae(126),[224]],16e3:[re,[255,192],ae(268),[55,255,128],ae(268),[111,255],ae(269),[223,108],ae(195),[1,192]],12e3:[se,ae(268),[3,127,248],ae(268),[6,255,240],ae(268),[13,255,224],ae(268),[27,253,128],ae(259),[56]],11025:[se,ae(268),[3,127,248],ae(268),[6,255,240],ae(268),[13,255,224],ae(268),[27,255,192],ae(268),[55,175,128],ae(108),[112]],8e3:[se,ae(268),[3,121,16],ae(47),[7]]};t=e,G=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return G}()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-s,pts:l.pts-s});return e.baseMediaDecodeTime-=Math.floor(ue.videoTsToAudioTs(c,e.samplerate)),c}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,n=[];for(t=0;t<e.length;t++)i=e[t],n.push({size:i.data.byteLength,duration:1024});return n},concatenateFrameData:function(e){var t,i,n=0,r=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],r.set(i.data,n),n+=i.data.byteLength;return r}},ce=le.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,n=e.minSegmentDts;return t||(n-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===e.type&&(i*=e.samplerate/ce,i=Math.floor(i)),i},collectDtsInfo:function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},n=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)n+=255,t++;for(n+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!i.payload&&4===n){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=n,i.payloadSize=r,i.payload=e.subarray(t,t+r);break}i.payload=void 0}t+=r,n=0,r=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,n,r,s,a=[];if(!(64&t[0]))return a;for(n=31&t[0],i=0;i<n;i++)s={type:3&t[2+(r=3*i)],pts:e},4&t[r+2]&&(s.ccData=t[r+3]<<8|t[r+4],a.push(s));return a},discardEmulationPreventionBytes:function(e){for(var t,i,n=e.byteLength,r=[],s=1;s<n-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);var a=0;for(s=0;s<t;a++,s++)a===r[0]&&(a++,r.shift()),i[s]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},fe=V,ge=pe,me=function(e){e=e||{},me.prototype.init.call(this),this.parse708captions_="boolean"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ce(0,0),new Ce(0,1),new Ce(1,0),new Ce(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.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")))};me.prototype=new fe,me.prototype.push=function(e){var t,i,n;
vendor: 4,453 bytes, line 2
2if("sei_rbsp"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},me.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},me.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},me.prototype.flush=function(){return this.flushStream("flush")},me.prototype.partialFlush=function(){return this.flushStream("partialFlush")},me.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},me.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},me.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},me.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},me.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},me.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={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},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},_e=function(e){this.windowNum=e,this.reset()};_e.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},_e.prototype.getText=function(){return this.rows.join("\n")},_e.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},_e.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},_e.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},_e.prototype.addText=function(e){this.rows[this.rowIdx]+=e},_e.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var be=function(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new _e(-1),this.windows=[],this.stream=i,"string"==typeof t&&this.createTextDecoder(t)};be.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new _e(i),"function"==typeof t&&(this.windows[i].beforeRowOverflow=t)},be.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},be.prototype.createTextDecoder=function(e){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,n=e.captionServices||{},r={};
vendor: 4,332 bytes, line 2
2Object.keys(n).forEach((e=>{t=n[e],/^SERVICE/.test(e)&&(r[e]=t.encoding)})),this.serviceEncodings=r,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new fe,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,n=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(n)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,n=null,r=0,s=t[r++];for(e.seq=s>>6,e.sizeCode=63&s;r<t.length;r++)n=31&(s=t[r++]),7==(i=s>>5)&&n>0&&(i=s=t[r++]),this.pushServiceBlock(i,r,n),n>0&&(r+=n-1)},Te.prototype.pushServiceBlock=function(e,t,i){var n,r=t,s=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,r));r<t+i&&r<s.length;r++)n=s[r],ve(n)?r=this.handleText(r,a):24===n?r=this.multiByteCharacter(r,a):16===n?r=this.extendedCommands(r,a):128<=n&&n<=135?r=this.setCurrentWindow(r,a):152<=n&&n<=159?r=this.defineWindow(r,a):136===n?r=this.clearWindows(r,a):140===n?r=this.deleteWindows(r,a):137===n?r=this.displayWindows(r,a):138===n?r=this.hideWindows(r,a):139===n?r=this.toggleWindows(r,a):151===n?r=this.setWindowAttributes(r,a):144===n?r=this.setPenAttributes(r,a):145===n?r=this.setPenColor(r,a):146===n?r=this.setPenLocation(r,a):143===n?a=this.reset(r,a):8===n?a.currentWindow.backspace():12===n?a.currentWindow.clearText():13===n?a.currentWindow.pendingNewLine=!0:14===n?a.currentWindow.clearText():141===n&&r++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,n,r=this;return(i="SERVICE"+e)in this.serviceEncodings&&(n=this.serviceEncodings[i]),this.services[e]=new be(e,n,r),this.services[e].init(this.getPts(t),(function(t){r.flushDisplayed(t,r.services[e])})),this.services[e]},Te.prototype.handleText=function(e,t,i){var n,r,s,a,o=i&&i.isExtended,l=i&&i.isMultiByte,u=this.current708Packet.data,d=o?4096:0,c=u[e],h=u[e+1],p=t.currentWindow;if(l?(r=[c,h],e++):r=[c],t.textDecoder_&&!o)n=t.textDecoder_.decode(new Uint8Array(r));else if(l){const e=r.map((e=>("0"+(255&e).toString(16)).slice(-2))).join("");n=String.fromCharCode(parseInt(e,16))}else a=ye[s=d|c]||s,n=4096&s&&s===a?"":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(n),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,n=i[e+1],r=i[e+2];return ve(n)&&ve(r)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,n=i[e],r=7&n;t.setCurrentWindow(r);var s=t.currentWindow;return n=i[++e],s.visible=(32&n)>>5,s.rowLock=(16&n)>>4,s.columnLock=(8&n)>>3,s.priority=7&n,n=i[++e],s.relativePositioning=(128&n)>>7,s.anchorVertical=127&n,n=i[++e],s.anchorHorizontal=n,n=i[++e],s.anchorPoint=(240&n)>>4,s.rowCount=15&n,n=i[++e],s.columnCount=63&n,n=i[++e],s.windowStyle=(56&n)>>3,s.penStyle=7&n,s.virtualRowCount=s.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.winAttr;return n=i[++e],r.fillOpacity=(192&n)>>6,r.fillRed=(48&n)>>4,r.fillGreen=(12&n)>>2,r.fillBlue=3&n,n=i[++e],r.borderType=(192&n)>>6,r.borderRed=(48&n)>>4,r.borderGreen=(12&n)>>2,r.borderBlue=3&n,n=i[++e],r.borderType+=(128&n)>>5,r.wordWrap=(64&n)>>6,r.printDirection=(48&n)>>4,r.scrollDirection=(12&n)>>2,r.justify=3&n,n=i[++e],r.effectSpeed=(240&n)>>4,r.effectDirection=(12&n)>>2,r.displayEffect=3&n,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],n=0;n<8;n++)t.windows[n].visible&&!t.windows[n].isEmpty()&&i.push(t.windows[n].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream
vendor: 8,591 bytes, line 2
2:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&t.windows[r].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&t.windows[r].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penAttr;return n=i[++e],r.textTag=(240&n)>>4,r.offset=(12&n)>>2,r.penSize=3&n,n=i[++e],r.italics=(128&n)>>7,r.underline=(64&n)>>6,r.edgeType=(56&n)>>3,r.fontStyle=7&n,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penColor;return n=i[++e],r.fgOpacity=(192&n)>>6,r.fgRed=(48&n)>>4,r.fgGreen=(12&n)>>2,r.fgBlue=3&n,n=i[++e],r.bgOpacity=(192&n)>>6,r.bgRed=(48&n)>>4,r.bgGreen=(12&n)>>2,r.bgBlue=3&n,n=i[++e],r.edgeRed=(48&n)>>4,r.edgeGreen=(12&n)>>2,r.edgeBlue=3&n,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,n=i[++e],r.row=15&n,n=i[++e],r.column=63&n,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={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},Ae=function(e){return null===e?"":(e=Se[e]||e,String.fromCharCode(e))},we=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ee=function(){for(var e=[],t=15;t--;)e.push({text:"",indent:0,offset:0});return e},Ce=function(e,t){Ce.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,n,r,s;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),n=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Ee();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ee();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Ee()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(n,r))s=Ae((n=(3&n)<<8)|r),this[this.mode_](e.pts,s),this.column_++;else if(this.isExtCharacter(n,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),s=Ae((n=(3&n)<<8)|r),this[this.mode_](e.pts,s),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14&~r||this.addFormatting(e.pts,["i"]),1&~r||this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(n,r)){const e=3&r;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(n,r)){var a=we.indexOf(7968&t);if("rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(r)&&(14&~r||this.addFormatting(e.pts,["i"]))}else this.isNormalChar(n)&&(0===r&&(r=null),s=Ae(n),s+=Ae(r),this[this.mode_](e.pts,s),this.column_+=s.length)}else this.lastControlCode_=null}};Ce.prototype=new fe,Ce.prototype.flushDisplayed=function(e){const t=e=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+e+"."})},i=[];this.displayed_.forEach(((e,n)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(n)}e.text.length&&i.push({text:e.text,line:n+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(n)})),i.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ce.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ee(),this.nonDisplayed_=Ee(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ce.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_},Ce.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ce.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ce.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ce.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ce.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ce.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ce.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ce.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Ee(),this.displayed_=Ee()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:"",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ce.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,i)},Ce.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},Ce.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ce.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ce.prototype.shiftRowsUp_=function(){var e;
vendor: 6,722 bytes, line 2
2for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:"",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:"",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Ce.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var ke={CaptionStream:me,Cea608Stream:Ce,Cea708Stream:Te},Ie={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},xe=V,Pe="shared",Le=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},De=function(e){var t,i;De.prototype.init.call(this),this.type_=e||Pe,this.push=function(e){"metadata"!==e.type?this.type_!==Pe&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=Le(e.dts,i),e.pts=Le(e.pts,i),t=e.dts,this.trigger("data",e)):this.trigger("data",e)},this.flush=function(){i=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};De.prototype=new xe;var Oe,Me={TimestampRolloverStream:De,handleRollover:Le},Re=(e,t,i)=>{if(!e)return-1;for(var n=i;n<e.length;n++)if(e[n]===t)return n;return-1},Ne=function(e,t,i){var n,r="";for(n=t;n<i;n++)r+="%"+("00"+e[n].toString(16)).slice(-2);return r},Ue=function(e,t,i){return decodeURIComponent(Ne(e,t,i))},Be=function(e,t,i){return unescape(Ne(e,t,i))},je=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Fe={APIC:function(e){var t,i,n=1;3===e.data[0]&&((t=Re(e.data,0,n))<0||(e.mimeType=Be(e.data,n,t),n=t+1,e.pictureType=e.data[n],n++,(i=Re(e.data,0,n))<0||(e.description=Ue(e.data,n,i),n=i+1,"--\x3e"===e.mimeType?e.url=Be(e.data,n,e.data.length):e.pictureData=e.data.subarray(n,e.data.length))))},"T*":function(e){3===e.data[0]&&(e.value=Ue(e.data,1,e.data.length).replace(/\0*$/,""),e.values=e.value.split("\0"))},TXXX:function(e){var t;3===e.data[0]&&-1!==(t=Re(e.data,0,1))&&(e.description=Ue(e.data,1,t),e.value=Ue(e.data,t+1,e.data.length).replace(/\0*$/,""),e.data=e.value)},"W*":function(e){e.url=Be(e.data,0,e.data.length).replace(/\0.*$/,"")},WXXX:function(e){var t;3===e.data[0]&&-1!==(t=Re(e.data,0,1))&&(e.description=Ue(e.data,1,t),e.url=Be(e.data,t+1,e.data.length).replace(/\0.*$/,""))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Be(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},qe={parseId3Frames:function(e){var t,i=10,n=0,r=[];if(!(e.length<10||e[0]!=="I".charCodeAt(0)||e[1]!=="D".charCodeAt(0)||e[2]!=="3".charCodeAt(0))){n=je(e.subarray(6,10)),n+=10,64&e[5]&&(i+=4,i+=je(e.subarray(10,14)),n-=je(e.subarray(16,20)));do{if((t=je(e.subarray(i+4,i+8)))<1)break;var s={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};s.key=s.id,Fe[s.id]?Fe[s.id](s):"T"===s.id[0]?Fe["T*"](s):"W"===s.id[0]&&Fe["W*"](s),r.push(s),i+=10,i+=t}while(i<n);return r}},parseSyncSafeInteger:je,frameParsers:Fe},He=Ie,Ve=qe;(Oe=function(e){var t,i={descriptor:e&&e.descriptor},n=0,r=[],s=0;if(Oe.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=("00"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(s=0,r.length=0),0===r.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(r.push(e),s+=e.data.byteLength,1===r.length&&(n=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),n+=10),!(s<n)){for(t={data:new Uint8Array(n),frames:[],pts:r[0].pts,dts:r[0].dts},l=0;l<n;)t.data.set(r[0].data.subarray(0,n-l),l),l+=r[0].data.byteLength,s-=r[0].data.byteLength,r.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),n-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):"T"===o.id[0]?Ve.frameParsers["T*"](o):"W"===o.id[0]&&Ve.frameParsers["W*"](o),"com.apple.streaming.transportStreamTimestamp"===o.owner){var u=o.data,d=(1&u[3])<<30|u[4]<<22|u[5]<<14|u[6]<<6|u[7]>>>2;d*=4,d+=3&u[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),i+=10,i+=a}while(i<n);this.trigger("data",t)}}}).prototype=new V;var $e,ze,We,Ge=Oe,Xe=V,Ye=ke,Ke=Ie,Qe=Me.TimestampRolloverStream,Ze=188;($e=function(){var e=new Uint8Array(Ze),t=0;$e.prototype.init.call(this),this.push=function(i){var n,r=0,s=Ze;for(t?((n=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),n.set(i,t),t=0):n=i;s<n.byteLength;)71!==n[r]||71!==n[s]?(r++,s++):(this.trigger("data",n.subarray(r,s)),r+=Ze,s+=Ze);r<n.byteLength&&(e.set(n.subarray(r),0),t=n.byteLength-r)},this.flush=function(){t===Ze&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new Xe,(ze=function(){var e,t,i,n;ze.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,n){var r=0;n.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===n.type?t(e.subarray(r),n):i(e.subarray(r),n)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],n.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=n.pmtPid},i=function(e,t){var i,r;if(1&e[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&e[1])<<8|e[2])-4,r=12+((15&e[10])<<8|e[11]);r<i;){var s=e[r],a=(31&e[r+1])<<8|e[r+2];s===Ke.H264_STREAM_TYPE&&null===n.programMapTable.video?n.programMapTable.video=a:s===Ke.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio=a:s===Ke.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][a]=s),r+=5+((15&e[r+3])<<8|e[r+4])}t.programMapTable=n.programMapTable}},this.push=function(t){var i={},n=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(n+=t[n]+1),0===i.pid)i.type="pat",e(t.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",e(t.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());
vendor: 3,061 bytes, line 2
2else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,n,i]):this.processPes_(t,n,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Ke.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Ke.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}}).prototype=new Xe,ze.STREAM_TYPES={h264:27,adts:15},We=function(){var e,t=this,i=!1,n={data:[],size:0},r={data:[],size:0},s={data:[],size:0},a=function(e,i,n){var r,s,a=new Uint8Array(e.size),o={type:i},l=0,u=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)s=e.data[l],a.set(s.data,u),u+=s.data.byteLength;!function(e,t){var i;const n=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===n&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),r="video"===i||o.packetLength<=e.size,(n||r)&&(e.size=0,e.data.length=0),r&&t.trigger("data",o)}};We.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Ke.H264_STREAM_TYPE:e=n,t="video";break;case Ke.ADTS_STREAM_TYPE:e=r,t="audio";break;case Ke.METADATA_STREAM_TYPE:e=s,t="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(e=o.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),i=!0,t.trigger("data",n)}})[o.type]()},this.reset=function(){n.size=0,n.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){a(n,"video"),a(r,"audio"),a(s,"timed-metadata")},this.flush=function(){if(!i&&e){var n={type:"metadata",tracks:[]};null!==e.video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",n)}i=!1,this.flushStreams_(),this.trigger("done")}},We.prototype=new Xe;var Je={PAT_PID:0,MP2T_PACKET_LENGTH:Ze,TransportPacketStream:$e,TransportParseStream:ze,ElementaryStream:We,TimestampRolloverStream:Qe,CaptionStream:Ye.CaptionStream,Cea608Stream:Ye.Cea608Stream,Cea708Stream:Ye.Cea708Stream,MetadataStream:Ge};for(var et in Ke)Ke.hasOwnProperty(et)&&(Je[et]=Ke[et]);var tt,it=Je,nt=le.ONE_SECOND_IN_TS,rt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(tt=function(e){var t,i=0;tt.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:`adts ski
2ping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(n){var r,s,a,o,l,u=0;if(e||(i=0),"audio"===n.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+n.data.byteLength)).set(a),t.set(n.data,a.byteLength)):t=n.data;u+7<t.length;)if(255===t[u]&&240==(246&t[u+1])){if("number"==typeof d&&(this.skipWarn_(d,u),d=null),s=2*(1&~t[u+1]),r=(3&t[u+3])<<11|t[u+4]<<3|(224&t[u+5])>>5,l=(o=1024*(1+(3&t[u+6])))*nt/rt[(60&t[u+2])>>>2],t.byteLength-u<r)break;this.trigger("data",{pts:n.pts+i*l,dts:n.dts+i*l,sampleCount:o,audioobjecttype:1+(t[u+2]>>>6&3),channelcount:(1&t[u+2])<<2|(192&t[u+3])>>>6,samplerate:rt[(60&t[u+2])>>>2],samplingfrequencyindex:(60&t[u+2])>>>2,samplesize:16,data:t.subarray(u+7+s,u+r)}),i++,u+=r}else"number"!=typeof d&&(d=u),u++;"number"==typeof d&&(this.skipWarn_(d,u),d=null),t=t.subarray(u)}},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}}).prototype=new V;var st,at,ot,lt=tt,ut=V,dt=function(e){var t=e.byteLength,i=0,n=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+n},this.loadWord=function(){var r=e.byteLength-t,s=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");s.set(e.subarray(r,r+a)),i=new DataView(s.buffer).getUint32(0),n=8*a,t-=a},this.skipBits=function(e){var r;n>e?(i<<=e,n-=e):(e-=n,e-=8*(r=Math.floor(e/8)),t-=r,this.loadWord(),i<<=e,n-=e)},this.readBits=function(e){var r=Math.min(n,e),s=i>>>32-r;return(n-=r)>0?i<<=r:t>0&&this.loadWord(),(r=e-r)>0?s<<r|this.readBits(r):s},this.skipLeadingZeros=function(){var e;for(e=0;e<n;++e)if(i&2147483648>>>e)return i<<=e,n-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(at=function(){var e,t,i=0;at.prototype.init.call(this),this.push=function(n){var r;t?((r=new Uint8Array(t.byteLength+n.data.byteLength)).set(t),r.set(n.data,t.byteLength),t=r):t=n.data;for(var s=t.byteLength;i<s-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<s;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger("data",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<s);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new ut,ot={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},st=function(){var e,t,i,n,r,s,a,o=new at;st.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,n=e.dts,o.push(e))},o.on("data",(function(a){var o={trackId:t,pts:i,dts:n,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=r(a.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=r(a.subarray(1)),o.config=s(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,n=8,r=8;for(i=0;i<e;i++)0!==r&&(r=(n+t.readExpGolomb()+256)%256),n=0===r?n:r},r=function(e){for(var t,i,n=e.byteLength,r=[],s=1;s<n-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);var a=0;for(s=0;s<t;a++,s++)a===r[0]&&(a++,r.shift()),i[s]=e[a];return i},s=function(e){var t,i,n,r,s,o,l,u,d,c,h,p,f=0,g=0,m=0,y=0,v=[1,1];if(i=(t=new dt(e)).readUnsignedByte(),r=t.readUnsignedByte(),n=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ot[i]&&(3===(s=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==s?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),u=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(c=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(f=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:r,width:16*(u+1)-2*f-2*g,height:(2-c)*(d+1)*16-2*m-2*y,sarRatio:v}}},st.prototype=new ut;var ct,ht={H264Stream:st,NalByteStream:at},pt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],ft=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},gt=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1
vendor: 4,563 bytes, line 2
2]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=ft(e,t),gt(e,t))},mt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},yt={isLikelyAacData:function(e){var t=gt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:ft,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&!(240&~e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return pt[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,n;t=10,64&e[5]&&(t+=4,t+=mt(e.subarray(10,14)));do{if((i=mt(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){n=e.subarray(t+10,t+i+10);for(var r=0;r<n.byteLength;r++)if(0===n[r]){var s=unescape(function(e,t,i){var n,r="";for(n=0;n<i;n++)r+="%"+("00"+e[n].toString(16)).slice(-2);return r}(n,0,r));if("com.apple.streaming.transportStreamTimestamp"===s){var a=n.subarray(r+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return(o*=4)+(3&a[7])}break}}t+=10,t+=i}while(t<e.byteLength);return null}},vt=yt;(ct=function(){var e=new Uint8Array,t=0;ct.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var n,r,s,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=vt.parseAdtsSize(e,l))>e.length)break;s={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",s),l+=o}else{if(e.length-l<10)break;if(l+(o=vt.parseId3TagSize(e,l))>e.length)break;r={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",r),l+=o}n=e.length-l,e=n>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new V;var _t,bt,Tt,St,At=V,wt=te,Et=ne,Ct=de,kt=he,It=it,xt=le,Pt=lt,Lt=ht.H264Stream,Dt=ct,Ot=yt.isLikelyAacData,Mt=le.ONE_SECOND_IN_TS,Rt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Nt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Ut=function(e,t){t.stream=e,this.trigger("log",t)},Bt=function(e,t){for(var i=Object.keys(t),n=0;n<i.length;n++){var r=i[n];"headOfPipeline"!==r&&t[r].on&&t[r].on("log",Ut.bind(e,r))}},jt=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Ft=function(e,t,i,n,r,s){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(n-t),pts:e+(r-i)},prependedContentDuration:s,baseMediaDecodeTime:e}};bt=function(e,t){var i,n=[],r=0,s=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,bt.prototype.init.call(this),this.push=function(t){kt.collectDtsInfo(e,t),e&&Rt.forEach((function(i){e[i]=t[i]})),n.push(t)},this.setEarliestDts=function(e){r=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){s=e},this.flush=function(){var o,l,u,d,c,h,p;0!==n.length?(o=Ct.trimAdtsFramesByEarliestDts(n,e,r),e.baseMediaDecodeTime=kt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=Ct.prefixWithSilence(e,o,s,a),e.samples=Ct.generateSampleTable(o),u=wt.mdat(Ct.concatenateFrameData(o)),n=[],l=wt.moof(i,[e]),d=new Uint8Array(l.byteLength+u.byteLength),i++,d.set(l),d.set(u,l.byteLength),kt.clearDtsInfo(e),c=Math.ceil(1024*Mt/e.samplerate),o.length&&(h=o.length*c,this.trigger("segmentTimingInfo",Ft(xt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+h})),this.trigger("data",{track:e,boxes:d}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){kt.clearDtsInfo(e),n=[],this.trigger("reset")}},bt.prototype=new At,_t=function(e,t){var i,n,r,s=[],a=[];i=(t=t||{}).firstSequenceNumber||0,_t.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){kt.collectDtsInfo(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],Nt.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),s.push(t)},this.flush=function(){for(var n,r,o,l,u,d,c,h,p=0;s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();
vendor: 17,054 bytes, line 2
2if(0===s.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=Et.groupNalsIntoFrames(s),(o=Et.groupFramesIntoGops(n))[0][0].keyFrame||((r=this.getGopForFusion_(s[0],e))?(p=r.duration,o.unshift(r),o.byteLength+=r.byteLength,o.nalCount+=r.nalCount,o.pts=r.pts,o.dts=r.dts,o.duration+=r.duration):o=Et.extendFirstKeyFrame(o)),a.length){var f;if(!(f=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");kt.clearDtsInfo(e),o=f}kt.collectDtsInfo(e,o),e.samples=Et.generateSampleTable(o),u=wt.mdat(Et.concatenateNalData(o)),e.baseMediaDecodeTime=kt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),c=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",Ft(e.baseMediaDecodeTime,c.dts,c.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),l=wt.moof(i,[e]),d=new Uint8Array(l.byteLength+u.byteLength),i++,d.set(l),d.set(u,l.byteLength),this.trigger("data",{track:e,boxes:d}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),s=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){kt.clearDtsInfo(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var i,n,r,s,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)r=(s=this.gopCache_[a]).gop,e.pps&&jt(e.pps[0],s.pps[0])&&e.sps&&jt(e.sps[0],s.sps[0])&&(r.dts<e.timelineStartInfo.dts||(i=t.dts-r.dts-r.duration)>=-1e4&&i<=45e3&&(!n||o>i)&&(n=s,o=i));return n?n.gop:null},this.alignGopsAtStart_=function(e){var t,i,n,r,s,o,l,u;for(s=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(n=a[t],r=e[i],n.pts!==r.pts);)r.pts>n.pts?t++:(i++,s-=r.byteLength,o-=r.nalCount,l-=r.duration);return 0===i?e:i===e.length?null:((u=e.slice(i)).byteLength=s,u.duration=l,u.nalCount=o,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(e){var t,i,n,r,s,o,l;for(t=a.length-1,i=e.length-1,s=null,o=!1;t>=0&&i>=0;){if(n=a[t],r=e[i],n.pts===r.pts){o=!0;break}n.pts>r.pts?t--:(t===a.length-1&&(s=i),i--)}if(!o&&null===s)return null;if(0===(l=o?i:s))return e;var u=e.slice(l),d=u.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return u.byteLength=d.byteLength,u.duration=d.duration,u.nalCount=d.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(e){a=e}},_t.prototype=new At,St=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,St.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},St.prototype=new At,St.prototype.flush=function(e){var t,i,n,r,s=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)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?(o=this.videoTrack.timelineStartInfo.pts,Nt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Rt.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,n=wt.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(n.byteLength),a.initSegment.set(n),a.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)a.data.set(this.pendingBoxes[r],s),s+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(t=this.pendingCaptions[r]).startTime=xt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=xt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)(i=this.pendingMetadata[r]).cueTime=xt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.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",a),r=0;r<a.captions.length;r++)t=a.captions[r],this.trigger("caption",t);for(r=0;r<a.metadata.length;r++)i=a.metadata[r],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},St.prototype.setRemux=function(e){this.remuxTracks=e},(Tt=function(e){var t,i,n=this,r=!0;Tt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="aac",r.metadataStream=new It.MetadataStream,r.aacStream=new Dt,r.audioTimestampRolloverStream=new It.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=new It.TimestampRolloverStream("timed-metadata"),r.adtsStream=new Pt,r.coalesceStream=new St(e,r.metadataStream),r.headOfPipeline=r.aacStream,r.aacStream.pipe(r.audioTimestampRolloverStream).pipe(r.adtsStream),r.aacStream.pipe(r.timedMetadataTimestampRolloverStream).pipe(r.metadataStream).pipe(r.coalesceStream),r.metadataStream.on("timestamp",(function(e){r.aacStream.setTimestamp(e.timeStamp)})),r.aacStream.on("data",(function(s){"timed-metadata"!==s.type&&"audio"!==s.type||r.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"adts",type:"audio"},r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new bt(i,e),r.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t}))})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),Bt(this,r)},this.setupTsPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=new It.MetadataStream,r.packetStream=new It.TransportPacketStream,r.parseStream=new It.TransportParseStream,r.elementaryStream=new It.ElementaryStream,r.timestampRolloverStream=new It.TimestampRolloverStream,r.adtsStream=new Pt,r.h264Stream=new Lt,r.captionStream=new It.CaptionStream(e),r.coalesceStream=new St(e,r.metadataStream),r.headOfPipeline=r.packetStream,r.packetStream.pipe(r.parseStream).pipe(r.elementaryStream).pipe(r.timestampRolloverStream),r.timestampRolloverStream.pipe(r.h264Stream),r.timestampRolloverStream.pipe(r.adtsStream),r.timestampRolloverStream.pipe(r.metadataStream).pipe(r.coalesceStream),r.h264Stream.pipe(r.captionStream).pipe(r.coalesceStream),r.elementaryStream.on("data",(function(s){var a;if("metadata"===s.type){for(a=s.tracks.length;a--;)t||"video"!==s.tracks[a].type?i||"audio"!==s.tracks[a].type||((i=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime):(t=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime;t&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=new _t(t,e),r.videoSegmentStream.on("log",n.getLogTrigger_("videoSegmentStream")),r.videoSegmentStream.on("timelineStartInfo",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,r.audioSegmentStream.setEarliestDts(t.dts-n.baseMediaDecodeTime))})),r.videoSegmentStream.on("processedGopsInfo",n.trigger.bind(n,"gopInfo")),r.videoSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"videoSegmentTimingInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",(function(e){i&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),r.videoSegmentStream.on("timingInfo",n.trigger.bind(n,"videoTimingInfo")),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),i&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new bt(i,e),r.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),r.audioSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"audioSegmentTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream)),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t})}})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("id3Frame",(function(e){e.dispatchType=r.metadataStream.dispatchType,n.trigger("id3Frame",e)})),r.coalesceStream.on("caption",this.trigger.bind(this,"caption")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),Bt(this,r)},this.setBaseMediaDecodeTime=function(n){var r=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=n),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,kt.clearDtsInfo(i),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,kt.clearDtsInfo(t),r.captionStream.reset()),r.timestampRolloverStream&&r.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger("log",i)}},this.push=function(e){if(r){var t=Ot(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),r=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){r=!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()}}).prototype=new At;var qt,Ht,Vt={Transmuxer:Tt,VideoSegmentStream:_t,AudioSegmentStream:bt,AUDIO_PROPERTIES:Rt,VIDEO_PROPERTIES:Nt,generateSegmentTimingInfo:Ft},$t=function(e){return e>>>0},zt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),(t+=String.fromCharCode(e[2]))+String.fromCharCode(e[3])},Wt=$t,Gt=zt,Xt=function(e,t){var i,n,r,s,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)n=Wt(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),r=Gt(e.subarray(i+4,i+8)),s=n>1?i+n:e.byteLength,r===t[0]&&(1===t.length?o.push(e.subarray(i+8,s)):(a=Xt(e.subarray(i+8,s),t.slice(1))).length&&(o=o.concat(a))),i=s;return o},Yt=Xt,Kt=$t,Qt=z.getUint64,Zt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=Qt(e.subarray(4)):t.baseMediaDecodeTime=Kt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},Jt=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},r=1&n.flags[2],s=2&n.flags[2],a=8&n.flags[2],o=16&n.flags[2],l=32&n.flags[2],u=65536&n.flags[0],d=131072&n.flags[0];return t=8,r&&(t+=4,n.baseDataOffset=i.getUint32(12),t+=4),s&&(n.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(n.defaultSampleDuration=i.getUint32(t),t+=4),o&&(n.defaultSampleSize=i.getUint32(t),t+=4),l&&(n.defaultSampleFlags=i.getUint32(t)),u&&(n.durationIsEmpty=!0),!r&&d&&(n.baseDataOffsetIsMoof=!0),n},ei=z.getUint64,ti=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ii=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&i.flags[2],s=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],u=8&i.flags[1],d=n.getUint32(4),c=8;for(r&&(i.dataOffset=n.getInt32(c),c+=4),s&&d&&(t={flags:ti(e.subarray(c,c+4))},c+=4,a&&(t.duration=n.getUint32(c),c+=4),o&&(t.size=n.getUint32(c),c+=4),u&&(1===i.version?t.compositionTimeOffset=n.getInt32(c):t.compositionTimeOffset=n.getUint32(c),c+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=n.getUint32(c),c+=4),o&&(t.size=n.getUint32(c),c+=4),l&&(t.flags=ti(e.subarray(c,c+4)),c+=4),u&&(1===i.version?t.compositionTimeOffset=n.getInt32(c):t.compositionTimeOffset=n.getUint32(c),c+=4),i.samples.push(t);return i},ni=z.getUint64,ri=function(e){return new Date(1e3*e-20828448e5)},si=zt,ai=function(e){var t,i,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=[];for(t=0;t+4<e.length;t+=i)if(i=n.getUint32(t),t+=4,i<=0)r.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&e[t]){case 1:r.push("slice_layer_without_partitioning_rbsp");break;case 5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:r.push("sei_rbsp");break;case 7:r.push("seq_parameter_set_rbsp");break;case 8:r.push("pic_parameter_set_rbsp");break;case 9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+e[t]&31)}return r},oi={avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:qt(e.subarray(78,e.byteLength))}},avcC:function(e){var t,i,n,r,s=new DataView(e.buffer,e.byteOffset,e.byteLength),a={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},o=31&e[5];for(n=6,r=0;r<o;r++)i=s.getUint16(n),n+=2,a.sps.push(new Uint8Array(e.subarray(n,n+i))),n+=i;for(t=e[n],n++,r=0;r<t;r++)i=s.getUint16(n),n+=2,a.pps.push(new Uint8Array(e.subarray(n,n+i))),n+=i;return a},btrt:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{bufferSizeDB:t.getUint32(0),maxBitrate:t.getUint32(4),avgBitrate:t.getUint32(8)}},edts:function(e){return{boxes:qt(e)}},elst:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:i.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),edits:[]},r=i.getUint32(4);for(t=8;r;r--)0===n.version?(n.edits.push({segmentDuration:i.getUint32(t),mediaTime:i.getInt32(t+4),mediaRate:i.getUint16(t+8)+i.getUint16(t+10)/65536}),t+=12):(n.edits.push({segmentDuration:ni(e.subarray(t)),mediaTime:ni(e.subarray(t+8)),mediaRate:i.getUint16(t+16)+i.getUint16(t+18)/65536}),t+=20);return n},esds:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),esId:e[6]<<8|e[7],streamPriority:31&e[8],decoderConfig:{objectProfileIndication:e[11],streamType:e[12]>>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={majorBrand:si(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},n=8;n<e.byteLength;)i.compatibleBrands.push(si(e.subarray(n,n+4))),n+=4;return i},dinf:function(e){return{boxes:qt(e)}},dref:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),dataReferences:qt(e.subarray(8))}},hdlr:function(e){var t={version:new DataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0),flags:new Uint8Array(e.subarray(1,4)),handlerType:si(e.subarray(8,12)),name:""},i=8;for(i=24;i<e.byteLength;
vendor: 4,199 bytes, line 2
2i++){if(0===e[i]){i++;break}t.name+=String.fromCharCode(e[i])}return t.name=decodeURIComponent(escape(t.name)),t},mdat:function(e){return{byteLength:e.byteLength,nals:ai(e)}},mdhd:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,r={version:i.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===r.version?(n+=4,r.creationTime=ri(i.getUint32(n)),n+=8,r.modificationTime=ri(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=8,r.duration=i.getUint32(n)):(r.creationTime=ri(i.getUint32(n)),n+=4,r.modificationTime=ri(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=4,r.duration=i.getUint32(n)),n+=4,t=i.getUint16(n),r.language+=String.fromCharCode(96+(t>>10)),r.language+=String.fromCharCode(96+((992&t)>>5)),r.language+=String.fromCharCode(96+(31&t)),r},mdia:function(e){return{boxes:qt(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:qt(e)}},mp4a:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return e.byteLength>28&&(i.streamDescriptor=qt(e.subarray(28))[0]),i},moof:function(e){return{boxes:qt(e)}},moov:function(e){return{boxes:qt(e)}},mvex:function(e){return{boxes:qt(e)}},mvhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,n={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=ri(t.getUint32(i)),i+=8,n.modificationTime=ri(t.getUint32(i)),i+=4,n.timescale=t.getUint32(i),i+=8,n.duration=t.getUint32(i)):(n.creationTime=ri(t.getUint32(i)),i+=4,n.modificationTime=ri(t.getUint32(i)),i+=4,n.timescale=t.getUint32(i),i+=4,n.duration=t.getUint32(i)),i+=4,n.rate=t.getUint16(i)+t.getUint16(i+2)/16,i+=4,n.volume=t.getUint8(i)+t.getUint8(i+1)/8,i+=2,i+=2,i+=8,n.matrix=new Uint32Array(e.subarray(i,i+36)),i+=36,i+=24,n.nextTrackId=t.getUint32(i),n},pdin:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)i.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});return i},sidx:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},n=12;0===i.version?(i.earliestPresentationTime=t.getUint32(n),i.firstOffset=t.getUint32(n+4),n+=8):(i.earliestPresentationTime=ei(e.subarray(n)),i.firstOffset=ei(e.subarray(n+8)),n+=16),n+=2;var r=t.getUint16(n);for(n+=2;r>0;n+=12,r--)i.references.push({referenceType:(128&e[n])>>>7,referencedSize:2147483647&t.getUint32(n),subsegmentDuration:t.getUint32(n+4),startsWithSap:!!(128&e[n+8]),sapType:(112&e[n+8])>>>4,sapDeltaTime:268435455&t.getUint32(n+8)});return i},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:qt(e)}},ctts:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:i.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),compositionOffsets:[]},r=i.getUint32(4);for(t=8;r;t+=8,r--)n.compositionOffsets.push({sampleCount:i.getUint32(t),sampleOffset:i[0===n.version?"getUint32":"getInt32"](t+4)});return n},stss:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:i.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),syncSamples:[]},r=i.getUint32(4);for(t=8;r;t+=4,r--)n.syncSamples.push(i.getUint32(t));return n},stco:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},r=i.getUint32(4);for(t=8;r;t+=4,r--)n.chunkOffsets.push(i.getUint32(t));return n},stsc:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n=i.getUint32(4),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;n;
vendor: 39,698 bytes, line 2
2t+=12,n--)r.sampleToChunks.push({firstChunk:i.getUint32(t),samplesPerChunk:i.getUint32(t+4),sampleDescriptionIndex:i.getUint32(t+8)});return r},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:qt(e.subarray(8))}},stsz:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)n.entries.push(i.getUint32(t));return n},stts:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),timeToSamples:[]},r=i.getUint32(4);for(t=8;r;t+=8,r--)n.timeToSamples.push({sampleCount:i.getUint32(t),sampleDelta:i.getUint32(t+4)});return n},styp:function(e){return oi.ftyp(e)},tfdt:Zt,tfhd:Jt,tkhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,n={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=ri(t.getUint32(i)),i+=8,n.modificationTime=ri(t.getUint32(i)),i+=4,n.trackId=t.getUint32(i),i+=4,i+=8,n.duration=t.getUint32(i)):(n.creationTime=ri(t.getUint32(i)),i+=4,n.modificationTime=ri(t.getUint32(i)),i+=4,n.trackId=t.getUint32(i),i+=4,i+=4,n.duration=t.getUint32(i)),i+=4,i+=8,n.layer=t.getUint16(i),i+=2,n.alternateGroup=t.getUint16(i),i+=2,n.volume=t.getUint8(i)+t.getUint8(i+1)/8,i+=2,i+=2,n.matrix=new Uint32Array(e.subarray(i,i+36)),i+=36,n.width=t.getUint16(i)+t.getUint16(i+2)/65536,i+=4,n.height=t.getUint16(i)+t.getUint16(i+2)/65536,n},traf:function(e){return{boxes:qt(e)}},trak:function(e){return{boxes:qt(e)}},trex:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4),defaultSampleDescriptionIndex:t.getUint32(8),defaultSampleDuration:t.getUint32(12),defaultSampleSize:t.getUint32(16),sampleDependsOn:3&e[20],sampleIsDependedOn:(192&e[21])>>6,sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>1,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:ii,"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}};qt=function(e){for(var t,i,n,r,s,a=0,o=[],l=new ArrayBuffer(e.length),u=new Uint8Array(l),d=0;d<e.length;++d)u[d]=e[d];for(t=new DataView(l);a<e.byteLength;)i=t.getUint32(a),n=si(e.subarray(a+4,a+8)),r=i>1?a+i:e.byteLength,(s=(oi[n]||function(e){return{data:e}})(e.subarray(a+8,r))).size=i,s.type=n,o.push(s),a=r;return o},Ht=function(e,t){var i;return t=t||0,i=new Array(2*t+1).join(" "),e.map((function(e,n){return i+e.type+"\n"+Object.keys(e).filter((function(e){return"type"!==e&&"boxes"!==e})).map((function(t){var n=i+"  "+t+": ",r=e[t];if(r instanceof Uint8Array||r instanceof Uint32Array){var s=Array.prototype.slice.call(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)).map((function(e){return" "+("00"+e.toString(16)).slice(-2)})).join("").match(/.{1,24}/g);return s?1===s.length?n+"<"+s.join("").slice(1)+">":n+"<\n"+s.map((function(e){return i+"  "+e})).join("\n")+"\n"+i+"  >":n+"<>"}return n+JSON.stringify(r,null,2).split("\n").map((function(e,t){return 0===t?e:i+"  "+e})).join("\n")})).join("\n")+(e.boxes?"\n"+Ht(e.boxes,t+1):"")})).join("\n")};var li,ui,di,ci,hi,pi,fi,gi={inspect:qt,textify:Ht,parseType:si,findBox:Yt,parseTraf:oi.traf,parseTfdt:oi.tfdt,parseHdlr:oi.hdlr,parseTfhd:oi.tfhd,parseTrun:oi.trun,parseSidx:oi.sidx},mi=function(e){for(var t=0,i=String.fromCharCode(e[t]),n="";"\0"!==i;)n+=i,t++,i=String.fromCharCode(e[t]);return n+i},yi=z.getUint64,vi=function(e){return void 0!==e||null!==e},_i={parseEmsgBox:function(e){var t,i,n,r,s,a,o,l=4,u=e[0];if(0===u)l+=(t=mi(e.subarray(l))).length,l+=(i=mi(e.subarray(l))).length,n=(d=new DataView(e.buffer)).getUint32(l),l+=4,s=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===u){var d;n=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=yi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=mi(e.subarray(l))).length,l+=(i=mi(e.subarray(l))).length}var c={scheme_id_uri:t,value:i,timescale:n||1,presentation_time:r,presentation_time_delta:s,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return function(e,t){var i="\0"!==t.scheme_id_uri,n=0===e&&vi(t.presentation_time_delta)&&i,r=1===e&&vi(t.presentation_time)&&i;return!(e>1)&&n||r}(u,c)?c:void 0},scaleTime:function(e,t,i,n){return e||0===e?e/t:n+i/t}},bi="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},Ti=$t,Si=function(e){return("00"+e.toString(16)).slice(-2)},Ai=Yt,wi=zt,Ei=_i,Ci=Jt,ki=ii,Ii=Zt,xi=z.getUint64,Pi=bi,Li=qe.parseId3Frames;li=function(e){return Ai(e,["moov","trak"]).reduce((function(e,t){var i,n,r,s,a;return(i=Ai(t,["tkhd"])[0])?(n=i[0],s=Ti(i[r=0===n?12:20]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3]),(a=Ai(t,["mdia","mdhd"])[0])?(r=0===(n=a[0])?12:20,e[s]=Ti(a[r]<<24|a[r+1]<<16|a[r+2]<<8|a[r+3]),e):null):null}),{})},ui=function(e,t){var i=Ai(t,["moof","traf"]).reduce((function(t,i){var n,r=Ai(i,["tfhd"])[0],s=Ti(r[4]<<24|r[5]<<16|r[6]<<8|r[7]),a=e[s]||9e4,o=Ai(i,["tfdt"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let u;return"bigint"==typeof(n=1===o[0]?xi(o.subarray(4,12)):l.getUint32(4))?u=n/Pi.BigInt(a):"number"!=typeof n||isNaN(n)||(u=n/a),u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u<t&&(t=u),t}),1/0);return"bigint"==typeof i||isFinite(i)?i:0},di=function(e,t){var i,n=Ai(t,["moof","traf"]),r=0,s=0;if(n&&n.length){var a=Ai(n[0],["tfhd"])[0],o=Ai(n[0],["trun"])[0],l=Ai(n[0],["tfdt"])[0];if(a&&(i=Ci(a).trackId),l&&(r=Ii(l).baseMediaDecodeTime),o){var u=ki(o);u.samples&&u.samples.length&&(s=u.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;"bigint"==typeof r&&(s=Pi.BigInt(s),d=Pi.BigInt(d));var c=(r+s)/d;return"bigint"==typeof c&&c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c},ci=function(e){var t=Ai(e,["moov","trak"]),i=[];return t.forEach((function(e){var t=Ai(e,["mdia","hdlr"]),n=Ai(e,["tkhd"]);t.forEach((function(e,t){var r,s,a=wi(e.subarray(8,12)),o=n[t];"vide"===a&&(s=0===(r=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?r.getUint32(12):r.getUint32(20),i.push(s))}))})),i},pi=function(e){var t=0===e[0]?12:20;return Ti(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},hi=function(e){var t=Ai(e,["moov","trak"]),i=[];return t.forEach((function(e){var t,n,r={},s=Ai(e,["tkhd"])[0];s&&(n=(t=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0),r.id=0===n?t.getUint32(12):t.getUint32(20));var a=Ai(e,["mdia","hdlr"])[0];if(a){var o=wi(a.subarray(8,12));r.type="vide"===o?"video":"soun"===o?"audio":o}var l=Ai(e,["mdia","minf","stbl","stsd"])[0];if(l){var u=l.subarray(8);r.codec=wi(u.subarray(4,8));var d,c=Ai(u,[r.codec])[0];c&&(/^[asm]vc[1-9]$/i.test(r.codec)?(d=c.subarray(78),"avcC"===wi(d.subarray(4,8))&&d.length>11?(r.codec+=".",r.codec+=Si(d[9]),r.codec+=Si(d[10]),r.codec+=Si(d[11])):r.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(r.codec)?(d=c.subarray(28),"esds"===wi(d.subarray(4,8))&&d.length>20&&0!==d[19]?(r.codec+="."+Si(d[19]),r.codec+="."+Si(d[20]>>>2&63).replace(/^0/,"")):r.codec="mp4a.40.2"):r.codec=r.codec.toLowerCase())}var h=Ai(e,["mdia","mdhd"])[0];h&&(r.timescale=pi(h)),i.push(r)})),i},fi=function(e,t=0){return Ai(e,["emsg"]).map((e=>{var i=Ei.parseEmsgBox(new Uint8Array(e)),n=Li(i.message_data);return{cueTime:Ei.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Ei.scaleTime(i.event_duration,i.timescale),frames:n}}))};var Di={findBox:Ai,parseType:wi,timescale:li,startTime:ui,compositionStartTime:di,videoTrackIds:ci,tracks:hi,getTimescaleFromMediaHeader:pi,getEmsgID3:fi};const{parseTrun:Oi}=gi,{findBox:Mi}=Di;var Ri=bi,Ni={getMdatTrafPairs:function(e){var t=Mi(e,["moof","traf"]),i=Mi(e,["mdat"]),n=[];return i.forEach((function(e,i){var r=t[i];n.push({mdat:e,traf:r})})),n},parseSamples:function(e,t,i){var n=t,r=i.defaultSampleDuration||0,s=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=Oi(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=s),e.trackId=a,e.dts=n,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"==typeof n?(e.pts=n+Ri.BigInt(e.compositionTimeOffset),n+=Ri.BigInt(e.duration)):(e.pts=n+e.compositionTimeOffset,n+=e.duration)})),o=o.concat(t)})),o}},Ui=pe.discardEmulationPreventionBytes,Bi=ke.CaptionStream,ji=Yt,Fi=Zt,qi=Jt,{getMdatTrafPairs:Hi,parseSamples:Vi}=Ni,$i=function(e,t){for(var i=e,n=0;n<t.length;n++){var r=t[n];if(i<r.size)return r;i-=r.size}return null},zi=function(){var e,t,i,n,r,s,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Bi,a=!0,s=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/n,e.endTime=e.endPts/n,r.captions.push(e),r.captionStreams[e.stream]=!0})),e.on("log",(function(e){r.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length||i===e[0]&&n===t[i])},this.parse=function(e,s,a){var o;if(!this.isInitialized())return null;if(!s||!a)return null;if(this.isNewInit(s,a))i=s[0],n=a[i];else if(null===i||!n)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,s,a)}return o=function(e,t,i){if(null===t)return null;var n=function(e,t){var i={};return Hi(e).forEach((function(e){var n,r=e.mdat,s=e.traf,a=ji(s,["tfhd"]),o=qi(a[0]),l=o.trackId,u=ji(s,["tfdt"]),d=u.length>0?Fi(u[0]).baseMediaDecodeTime:0,c=ji(s,["trun"]);t===l&&c.length>0&&(n=function(e,t,i){var n,r,s,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(r=0;r+4<e.length;r+=s)if(s=o.getUint32(r),r+=4,!(s<=0))switch(31&e[r]){case 6:var u=e.subarray(r+1,r+1+s),d=$i(r,t);if(n={nalUnitType:"sei_rbsp",size:s,data:u,escapedRBSP:Ui(u),trackId:i},d)n.pts=d.pts,n.dts=d.dts,a=d;else{if(!a){l.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+r+" for trackId "+i+". See mux.js#223."});break}n.pts=a.pts,n.dts=a.dts}l.seiNals.push(n)}return l}(r,Vi(c,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(n.seiNals),i[l].logs=i[l].logs.concat(n.logs))})),i}(e,t)[t]||{};return{seiNals:n.seiNals,logs:n.logs,timescale:i}}(e,i,n),o&&o.logs&&(r.logs=r.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),r):r.logs.length?{logs:r.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;s?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){r.captions=[],r.captionStreams={},r.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,n=null,r?this.clearParsedCaptions():r={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Wi}=gi,Gi=Yt,{getTimescaleFromMediaHeader:Xi}=Di,{parseSamples:Yi,getMdatTrafPairs:Ki}=Ni;var Qi=function(){let e=9e4;this.init=function(t){const i=Gi(t,["moov","trak","mdia","mdhd"])[0];i&&(e=Xi(i))},this.parseSegment=function(t){const i=[],n=Ki(t);let r=0;return n.forEach((function(t){const n=t.mdat,s=t.traf,a=Gi(s,["tfdt"])[0],o=Gi(s,["tfhd"])[0],l=Gi(s,["trun"]);if(a){const e=Wi(a);r=e.baseMediaDecodeTime}if(l.length&&o){const t=Yi(l,r,o);let s=0;t.forEach((function(t){const r=new TextDecoder("utf-8"),a=n.slice(s,s+t.size);Gi(a,["vtte"])[0]||Gi(a,["vttc"]).forEach((function(n){const s=Gi(n,["payl"])[0],a=Gi(n,["sttg"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let u,d;if(s)try{u=r.decode(s)}catch(e){console.error(e)}if(a)try{d=r.decode(a)}catch(e){console.error(e)}t.duration&&u&&i.push({cueText:u,start:o,end:l,settings:d})})),s+=t.size}))}})),i}},Zi=Ie,Ji=function(e){var t=31&e[1];return(t<<=8)|e[2]},en=function(e){return!!(64&e[1])},tn=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},nn=function(e){switch(e){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}},rn={parseType:function(e,t){var i=Ji(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},parsePat:function(e){var t=en(e),i=4+tn(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=en(e),n=4+tn(e);if(i&&(n+=e[n]+1),1&e[n+5]){var r;r=3+((15&e[n+1])<<8|e[n+2])-4;for(var s=12+((15&e[n+10])<<8|e[n+11]);s<r;){var a=n+s;t[(31&e[a+1])<<8|e[a+2]]=e[a],s+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:en,parsePesType:function(e,t){switch(t[Ji(e)]){case Zi.H264_STREAM_TYPE:return"video";case Zi.ADTS_STREAM_TYPE:return"audio";case Zi.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!en(e))return null;var t=4+tn(e);if(t>=e.byteLength)return null;var i,n=null;return 192&(i=e[t+7])&&((n={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,n.pts*=4,n.pts+=(6&e[t+13])>>>1,n.dts=n.pts,64&i&&(n.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,n.dts*=4,n.dts+=(6&e[t+18])>>>1)),n},videoPacketContainsKeyFrame:function(e){for(var t=4+tn(e),i=e.subarray(t),n=0,r=0,s=!1;r<i.byteLength-3;r++)if(1===i[r+2]){n=r+5;break}for(;n<i.byteLength;)switch(i[n]){case 0:if(0!==i[n-1]){n+=2;break}if(0!==i[n-2]){n++;break}r+3!==n-2&&"slice_layer_without_partitioning_rbsp_idr"===nn(31&i[r+3])&&(s=!0);do{n++}while(1!==i[n]&&n<i.length);r=n-2,n+=3;break;case 1:if(0!==i[n-1]||0!==i[n-2]){n+=3;break}"slice_layer_without_partitioning_rbsp_idr"===nn(31&i[r+3])&&(s=!0),r=n-2,n+=3;break;default:n+=3}return i=i.subarray(r),n-=r,r=0,i&&i.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===nn(31&i[r+3])&&(s=!0),s}},sn=Ie,an=Me.handleRollover,on={};on.ts=rn,on.aac=yt;var ln=le.ONE_SECOND_IN_TS,un=188,dn=71,cn=function(e,t,i){for(var n,r,s,a,o=0,l=un,u=!1;l<=e.byteLength;)if(e[o]!==dn||e[l]!==dn&&l!==e.byteLength)o++,l++;else{if(n=e.subarray(o,l),"pes"===on.ts.parseType(n,t.pid)&&(r=on.ts.parsePesType(n,t.table),s=on.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&s&&(a=on.ts.parsePesTime(n))&&(a.type="audio",i.audio.push(a),u=!0)),u)break;o+=un,l+=un}for(o=(l=e.byteLength)-un,u=!1;o>=0;)if(e[o]!==dn||e[l]!==dn&&l!==e.byteLength)o--,l--;else{if(n=e.subarray(o,l),"pes"===on.ts.parseType(n,t.pid)&&(r=on.ts.parsePesType(n,t.table),s=on.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&s&&(a=on.ts.parsePesTime(n))&&(a.type="audio",i.audio.push(a),u=!0)),u)break;o-=un,l-=un}},hn=function(e,t,i){for(var n,r,s,a,o,l,u,d=0,c=un,h=!1,p={data:[],size:0};c<e.byteLength;)if(e[d]!==dn||e[c]!==dn)d++,c++;else{if(n=e.subarray(d,c),"pes"===on.ts.parseType(n,t.pid)&&(r=on.ts.parsePesType(n,t.table),s=on.ts.parsePayloadUnitStartIndicator(n),"video"===r&&(s&&!h&&(a=on.ts.parsePesTime(n))&&(a.type="video",i.video.push(a),h=!0),!i.firstKeyFrame))){if(s&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)u=p.data.shift(),o.set(u,l),l+=u.byteLength;if(on.ts.videoPacketContainsKeyFrame(o)){var f=on.ts.parsePesTime(o);f?(i.firstKeyFrame=f,i.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.")}p.size=0}p.data.push(n),p.size+=n.byteLength}if(h&&i.firstKeyFrame)break;d+=un,c+=un}for(d=(c=e.byteLength)-un,h=!1;d>=0;)if(e[d]!==dn||e[c]!==dn)d--,c--;else{if(n=e.subarray(d,c),"pes"===on.ts.parseType(n,t.pid)&&(r=on.ts.parsePesType(n,t.table),s=on.ts.parsePayloadUnitStartIndicator(n),"video"===r&&s&&(a=on.ts.parsePesTime(n))&&(a.type="video",i.video.push(a),h=!0)),h)break;d-=un,c-=un}},pn=function(e,t){var i;return i=on.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,n=0,r=null,s=null,a=0,o=0;e.length-o>=3;){switch(on.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){i=!0;break}if((a=on.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===s&&(t=e.subarray(o,o+a),s=on.aac.parseAacTimestamp(t)),o+=a;break;case"audio":if(e.length-o<7){i=!0;break}if((a=on.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=on.aac.parseSampleRate(t)),n++,o+=a;break;default:o++}if(i)return null}if(null===r||null===s)return null;var l=ln/r;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*n*l,pts:s+1024*n*l}]}}(e):function(e){var t={pid:null,table:null},i={};for(var n in function(e,t){for(var i,n=0,r=un;r<e.byteLength;)if(e[n]!==dn||e[r]!==dn)n++,r++;else{switch(i=e.subarray(n,r),on.ts.parseType(i,t.pid)){case"pat":t.pid=on.ts.parsePat(i);break;case"pmt":var s=on.ts.parsePmt(i);t.table=t.table||{},Object.keys(s).forEach((function(e){t.table[e]=s[e]}))}n+=un,r+=un}}(e,t),t.table)if(t.table.hasOwnProperty(n))switch(t.table[n]){case sn.H264_STREAM_TYPE:i.video=[],hn(e,t,i),0===i.video.length&&delete i.video;break;case sn.ADTS_STREAM_TYPE:i.audio=[],cn(e,t,i),0===i.audio.length&&delete i.audio}return i}(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=an(e.dts,i),e.pts=an(e.pts,i),e.dtsTime=e.dts/ln,e.ptsTime=e.pts/ln}))}if(e.video&&e.video.length){var n=t;if((void 0===n||isNaN(n))&&(n=e.video[0].dts),e.video.forEach((function(e){e.dts=an(e.dts,n),e.pts=an(e.pts,n),e.dtsTime=e.dts/ln,e.ptsTime=e.pts/ln})),e.firstKeyFrame){var r=e.firstKeyFrame;r.dts=an(r.dts,n),r.pts=an(r.pts,n),r.dtsTime=r.dts/ln,r.ptsTime=r.pts/ln}}}(i,t),i):null};class fn{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Vt.Transmuxer(this.options),function(e,t){t.on("data",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const n=t.data;t.data=n.buffer,e.postMessage({action:"data",segment:t,byteOffset:n.byteOffset,byteLength:n.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){const i={start:{decode:le.videoTsToSeconds(t.start.dts),presentation:le.videoTsToSeconds(t.start.pts)},end:{decode:le.videoTsToSeconds(t.end.dts),presentation:le.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:le.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=le.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:i})})),t.on("audioSegmentTimingInfo",(function(t){const i={start:{decode:le.videoTsToSeconds(t.start.dts),presentation:le.videoTsToSeconds(t.start.pts)},end:{decode:le.videoTsToSeconds(t.end.dts),presentation:le.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:le.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=le.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:i})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:le.videoTsToSeconds(t.start),end:le.videoTsToSeconds(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:le.videoTsToSeconds(t.start),end:le.videoTsToSeconds(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new zi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Qi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Qi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Di.startTime(e,t);this.self.postMessage({action:"probeMp4StartTime",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Di.tracks(e);this.self.postMessage({action:"probeMp4Tracks",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Di.getEmsgID3(e,t);this.self.postMessage({action:"probeEmsgID3",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i="number"!=typeof t||isNaN(t)?void 0:t*le.ONE_SECOND_IN_TS,n=pn(e,i);let r=null;n&&(r={hasVideo:n.video&&2===n.video.length||!1,hasAudio:n.audio&&2===n.audio.length||!1},r.hasVideo&&(r.videoStart=n.video[0].ptsTime),r.hasAudio&&(r.audioStart=n.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:r,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(le.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(le.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new fn(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new fn(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var fa=da(pa);const ga=e=>{const{transmuxer:t,bytes:i,audioAppendStart:n,gopsToAlignWith:r,remux:s,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:u,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:c,onId3:h,onCaptions:p,onDone:f,onEndedTimeline:g,onTransmuxerLog:m,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:_}=e,b={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&("data"===i.data.action&&((e,t,i)=>{const{type:n,initSegment:r,captions:s,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:u}=e.data.segment;t.buffer.push({captions:s,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},c={type:n,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(r.data,r.byteOffset,r.byteLength)};void 0!==l&&(c.videoFrameDtsTime=l),void 0!==u&&(c.videoFramePtsTime=u),i(c)})(i,b,a),"trackinfo"===i.data.action&&o(i.data.trackInfo),"gopInfo"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,b),"audioTimingInfo"===i.data.action&&l(i.data.audioTimingInfo),"videoTimingInfo"===i.data.action&&u(i.data.videoTimingInfo),"videoSegmentTimingInfo"===i.data.action&&d(i.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===i.data.action&&c(i.data.audioSegmentTimingInfo),"id3Frame"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),"caption"===i.data.action&&p(i.data.caption),"endedtimeline"===i.data.action&&(T=!1,g()),"log"===i.data.action&&m(i.data.log),"transmuxed"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:b,callback:f}),ma(t))))},t.onerror=()=>{const e={message:"Received an error message from the transmuxer worker",metadata:{errorType:Br.Error.StreamingFailedToTransmuxSegment,segmentInfo:Ka({segment:v})}};f(null,e)},n&&t.postMessage({action:"setAudioAppendStart",appendStart:n}),Array.isArray(r)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),void 0!==s&&t.postMessage({action:"setRemux",remux:s}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,n=i instanceof ArrayBuffer?0:i.byteOffset;_({type:"segmenttransmuxingstart",segment:v}),t.postMessage({action:"push",data:e,byteOffset:n,byteLength:i.byteLength},[e])}y&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},ma=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():ga(e.currentTransmux))},ya=(e,t)=>{e.postMessage({action:t}),ma(e)};var va=e=>{((e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ya(t,e);t.transmuxQueue.push(ya.bind(null,t,e))})("reset",e)};const _a=function(e){const t=e.transmuxer,i=e.endAction||e.action,n=e.callback,r=A.default({},e,{endAction:null,transmuxer:null,callback:null}),s=r=>{r.data.action===i&&(t.removeEventListener("message",s),r.data.data&&(r.data.data=new Uint8Array(r.data.data,e.byteOffset||0,e.byteLength||r.data.data.byteLength),e.data&&(e.data=r.data.data)),n(r.data))};if(t.addEventListener("message",s),e.data){const i=e.data instanceof ArrayBuffer;r.byteOffset=i?0:e.data.byteOffset,r.byteLength=e.data.byteLength;const n=[i?e.data:e.data.buffer];t.postMessage(r,n)}else t.postMessage(r)},ba=-101,Ta=-102,Sa="wvtt",Aa=e=>{e.forEach((e=>{e.abort()}))},wa=(e,t)=>{const{requestType:i}=t,n=Is({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:ba,xhr:t,metadata:n}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Ta,xhr:t,metadata:n}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:2,xhr:t,metadata:n}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:2,xhr:t,metadata:n}:null},Ea=(e,t,i,n)=>(r,s)=>{const a=s.response,o=wa(r,s);if(o)return i(o,e);if(16!==a.byteLength)return i({status:s.status,message:"Invalid HLS key at URL: "+s.uri,code:2,xhr:s},e);const l=new DataView(a),u=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=u;const d={uri:s.uri};return n({type:"segmentkeyloadcomplete",segment:e,keyInfo:d}),i(null,e)},Ca=(e,t)=>{const i=m.detectContainerForBytes(e.map.bytes);if("mp4"!==i){const n=e.map.resolvedUri||e.map.uri,r=i||"unknown";return t({internal:!0,message:`Found unsupported ${r} container for initialization segment at URL: ${n}`,code:2,metadata:{mediaType:r}})}_a({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:n})=>(e.map.bytes=n,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),"text"===t.type&&((e,t)=>{t===Sa&&e.transmuxer.postMessage({action:"initMp4WebVttParser",data:e.map.bytes})})(e,t.codec))})),t(null))})},ka=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:d,doneFn:c,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const f=e.map&&e.map.tracks||{},g=Boolean(f.audio&&f.video);let m=n.bind(null,e,"audio","start");const y=n.bind(null,e,"audio","end");let v=n.bind(null,e,"video","start");const _=n.bind(null,e,"video","end");_a({action:"probeTs",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:n=>{e.bytes=t=n.data;const f=n.result;f&&(i(e,{hasAudio:f.hasAudio,hasVideo:f.hasVideo,isMuxed:g}),i=null),(e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ga(e);e.transmuxer.transmuxQueue.push(e)})({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type="combined"===t.type?"video":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{m&&void 0!==e.start&&(m(e.start),m=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),_&&void 0!==e.end&&_(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:"segmenttransmuxingtiminginfoavailable",segment:e,timingInfo:i}),r(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:"segmenttransmuxingtiminginfoavailable",segment:e,timingInfo:i}),s(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{u()},onTransmuxerLog:h,onDone:(t,i)=>{c&&(t.type="combined"===t.type?"video":t.type,p({type:"segmenttransmuxingcomplete",segment:e}),c(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},Ia=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:d,doneFn:c,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let f=new Uint8Array(t);if(m.isLikelyFmp4MediaSegment(f)){e.isFmp4=!0;const{tracks:r}=e.map;if(r.text&&(!r.audio||!r.video))return d(e,{data:f,type:"text"}),void((e,t,i)=>{t===Sa&&_a({action:"getMp4WebVttText",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:n})=>{e.bytes=t,i(null,e,{mp4VttCues:n})}})})(e,r.text.codec,c);const s={isFmp4:!0,hasVideo:!!r.video,hasAudio:!!r.audio};r.audio&&r.audio.codec&&"enca"!==r.audio.codec&&(s.audioCodec=r.audio.codec),r.video&&r.video.codec&&"encv"!==r.video.codec&&(s.videoCodec=r.video.codec),r.video&&r.audio&&(s.isMuxed=!0),i(e,s);const l=(t,i)=>{d(e,{data:f,type:s.hasAudio&&!s.isMuxed?"audio":"video"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),c(null,e,{})};_a({action:"probeMp4StartTime",timescales:e.map.timescales,data:f,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=f=i,s.hasAudio&&!s.isMuxed&&n(e,"audio","start",a),s.hasVideo&&n(e,"video","start",a),_a({action:"probeEmsgID3",data:f,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:n})=>{t=i.buffer,e.bytes=f=i,r.video&&i.byteLength&&e.transmuxer?_a({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:e.transmuxer,data:f,timescales:e.map.timescales,trackIds:[r.video.id],callback:i=>{t=i.data.buffer,e.bytes=f=i.data,i.logs.forEach((function(e){h(Wr(e,{stream:"mp4CaptionParser"}))})),l(i.captions,n)}}):l(void 0,n)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=m.detectContainerForBytes(f)),"ts"!==e.container&&"aac"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void c(null,e,{});ka({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:d,doneFn:c,onTransmuxerLog:h,triggerSegmentEventFn:p})}else c(null,e,{})},xa=function({id:e,key:t,encryptedBytes:i,decryptionWorker:n,segment:r,doneFn:s},a){const o=t=>{if(t.data.source===e){n.removeEventListener("message",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;n.onerror=()=>{const e="An error occurred in the decryption worker",t=Ka({segment:r}),i={message:e,metadata:{error:new Error(e),errorType:Br.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:r.key.resolvedUri||r.map.key.resolvedUri}}};s(i,r)},n.addEventListener("message",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),n.postMessage(Ks({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},Pa=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:n,abortFn:r,progressFn:s,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:d,captionsFn:c,isEndOfTimeline:h,endedTimelineFn:p,dataFn:f,doneFn:g,onTransmuxerLog:m,triggerSegmentEventFn:y})=>{const v=[],_=(({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:d,doneFn:c,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let f=0,g=!1;return(m,y)=>{if(!g){if(m)return g=!0,Aa(e),c(m,y);if(f+=1,f===e.length){const f=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:d,doneFn:c,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:"segmentdecryptionstart"}),xa({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:c},(e=>{t.bytes=e,p({type:"segmentdecryptioncomplete",segment:t}),Ia({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:d,doneFn:c,onTransmuxerLog:h,triggerSegmentEventFn:p})}))})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:d,doneFn:c,onTransmuxerLog:h,triggerSegmentEventFn:p});Ia({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:d,doneFn:c,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:"segmentdecryptionstart",segment:y}),xa({decryptionWorker:t,id:y.requestId+"-init",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:c},(t=>{y.map.bytes=t,p({type:"segmentdecryptioncomplete",segment:y}),Ca(y,(t=>{if(t)return Aa(e),c(t,y);f()}))}));f()}}}})({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:d,captionsFn:c,isEndOfTimeline:h,endedTimelineFn:p,dataFn:f,doneFn:g,onTransmuxerLog:m,triggerSegmentEventFn:y});if(n.key&&!n.key.bytes){const i=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&i.push(n.map.key);const r=Wr(t,{uri:n.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),s=Ea(n,i,_,y);y({type:"segmentkeyloadstart",segment:n,keyInfo:{uri:n.key.resolvedUri}});const a=e(r,s);v.push(a)}if(n.map&&!n.map.bytes){if(n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri)){const i=Wr(t,{uri:n.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),r=Ea(n,[n.map.key],_,y);y({type:"segmentkeyloadstart",segment:n,keyInfo:{uri:n.map.key.resolvedUri}});const s=e(i,r);v.push(s)}const i=Wr(t,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:Ws(n.map),requestType:"segment-media-initialization"}),r=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(n,r)=>{const s=wa(n,r);if(s)return t(s,e);const a=new Uint8Array(r.response);if(i({type:"segmentloaded",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,Ca(e,(function(i){if(i)return i.xhr=r,i.status=r.status,t(i,e);t(null,e)}))})({segment:n,finishProcessingFn:_,triggerSegmentEventFn:y});y({type:"segmentloadstart",segment:n});const s=e(i,r);v.push(s)}const b=Wr(t,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:Ws(n),requestType:"segment"}),T=(({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:n})=>(r,s)=>{const a=wa(r,s);if(a)return t(a,e);n({type:"segmentloaded",segment:e});const o="arraybuffer"!==i&&s.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(s.responseText.substring(e.lastReachedChar||0)):s.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(s),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)})({segment:n,finishProcessingFn:_,responseType:b.responseType,triggerSegmentEventFn:y});y({type:"segmentloadstart",segment:n});const S=e(b,T);S.addEventListener("progress",(({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Wr(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)})({segment:n,progressFn:s,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:d,captionsFn:c,isEndOfTimeline:h,endedTimelineFn:p,dataFn:f})),v.push(S);const A={};return v.forEach((e=>{e.addEventListener("loadend",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:A,abortFn:r}))})),()=>Aa(v)},La=zr("PlaylistSelector"),Da=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})},Oa=function(e,t){if(!e)return"";const i=_.default.getComputedStyle(e);return i?i[t]:""},Ma=function(e,t){const i=e.slice();e.sort((function(e,n){const r=t(e,n);return 0===r?i.indexOf(e)-i.indexOf(n):r}))},Ra=function(e,t){let i,n;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||_.default.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),n=n||_.default.Number.MAX_VALUE,i-n};let Na=function(e){const{main:t,bandwidth:i,playerWidth:n,playerHeight:r,playerObjectFit:s,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:n,height:r,limitRenditionByPlayerDimensions:a};let u=t.playlists;bs.isAudioOnly(t)&&(u=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=u.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||_.default.Number.MAX_VALUE,{bandwidth:t,width:i,height:n,playlist:e}}));Ma(d,((e,t)=>e.bandwidth-t.bandwidth)),d=d.filter((e=>!bs.isIncompatible(e.playlist)));let c=d.filter((e=>bs.isEnabled(e.playlist)));c.length||(c=d.filter((e=>!bs.isDisabled(e.playlist))));const h=c.filter((e=>e.bandwidth*la.BANDWIDTH_VARIANCE<i));let p=h[h.length-1];const f=h.filter((e=>e.bandwidth===p.bandwidth))[0];if(!1===a){const e=f||c[0]||d[0];if(e&&e.playlist){let t="sortedPlaylistReps";return f&&(t="bandwidthBestRep"),c[0]&&(t="enabledPlaylistReps"),La(`choosing ${Da(e)} using ${t} with options`,l),e.playlist}return La("could not choose a playlist with options",l),null}const g=h.filter((e=>e.width&&e.height));Ma(g,((e,t)=>
vendor: 1,155 bytes, line 2
2e.width-t.width));const m=g.filter((e=>e.width===n&&e.height===r));p=m[m.length-1];const y=m.filter((e=>e.bandwidth===p.bandwidth))[0];let v,b,T,S;if(y||(v=g.filter((e=>"cover"===s?e.width>n&&e.height>r:e.width>n||e.height>r)),b=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),p=b[b.length-1],T=b.filter((e=>e.bandwidth===p.bandwidth))[0]),o.leastPixelDiffSelector){const e=g.map((e=>(e.pixelDiff=Math.abs(e.width-n)+Math.abs(e.height-r),e)));Ma(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),S=e[0]}const A=S||T||y||f||c[0]||d[0];if(A&&A.playlist){let e="sortedPlaylistReps";return S?e="leastPixelDiffRep":T?e="resolutionPlusOneRep":y?e="resolutionBestRep":f?e="bandwidthBestRep":c[0]&&(e="enabledPlaylistReps"),La(`choosing ${Da(A)} using ${e} with options`,l),A.playlist}return La("could not choose a playlist with options",l),null};const Ua=function(){let e=this.useDevicePixelRatio&&_.default.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Na({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(Oa(this.tech_.el(),"width"),10)*e,playerHe
vendor: 5,015 bytes, line 2
2ight:parseInt(Oa(this.tech_.el(),"height"),10)*e,playerObjectFit:this.usePlayerObjectFit?Oa(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function Ba(e){try{return new URL(e).pathname.split("/").slice(-2).join("/")}catch(e){return""}}const ja={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},Fa=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),qa=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,Br.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Ha=function(e,t,i){let n,r;if(i&&i.cues)for(n=i.cues.length;n--;)r=i.cues[n],r.startTime>=e&&r.endTime<=t&&i.removeCue(r)},Va=e=>"number"==typeof e&&isFinite(e),$a=1/60,za=e=>{const{startOfSegment:t,duration:i,segment:n,part:r,playlist:{mediaSequence:s,id:a,segments:o=[]},mediaIndex:l,partIndex:u,timeline:d}=e,c=o.length-1;let h="mediaIndex/partIndex increment";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(h+=` with independent ${e.independent}`);const p="number"==typeof u,f=e.segment.uri?"segment":"pre-segment",g=p?as({preloadSegment:n})-1:0;return`${f} [${s+l}/${s+c}]`+(p?` part [${u}/${g}]`:"")+` segment start/end [${n.start} => ${n.end}]`+(p?` part start/end [${r.start} => ${r.end}]`:"")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Wa=e=>`${e}TimingInfo`,Ga=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:n,audioDisabled:r})=>{if(t===i)return!1;if("audio"===n){const t=e.lastTimelineChange({type:"main"});return!t||t.to!==i}if("main"===n&&r){const t=e.pendingTimelineChange({type:"audio"});return!t||t.to!==i}return!1},Xa=e=>{const t=e.pendingSegment_;if(t&&Ga({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:"audio"}),i=e.pendingTimelineChange({type:"main"}),n=t&&i,r=n&&t.to!==i.to;return!(!n||-1===t.from||-1===i.from||!r)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:"audio"}),i=e.timelineChangeController_.pendingTimelineChange({type:"main"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger("audioTimelineBehind");e.timelineChangeController_.trigger("fixBadTimelineChange")}},Ya=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Xr,Ka=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),n=Boolean(t.map&&!t.map.bytes),r=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:r,duration:t.duration,isEncrypted:i,isMediaInitialization:n}};class Qa extends Br.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={}
vendor: 6,866 bytes, line 2
2,this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=zr(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Xa(this)})),this.sourceUpdater_.on("codecschange",(e=>{this.trigger(A.default({type:"codecschange"},e))})),"main"===this.loaderType_&&this.timelineChangeController_.on("pendingtimelinechange",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Xa(this)})),"audio"===this.loaderType_&&this.timelineChangeController_.on("timelinechange",(e=>{this.trigger(A.default({type:"timelinechange"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():Xa(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Xa(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return(e=>{const t=new fa;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:"init",options:e}),t})({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&_.default.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if("WAITING"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){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,_.default.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)}error(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&va(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Gr();if("main"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:n}=e;if(i&&t&&!this.audioDisabled_&&!n)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Qs(e);let n=this.initSegments_[i];return t&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),n||e}segmentKey(e,t=!1){if(!e)return null;const i=Zs(e);let n=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!n&&e.bytes&&(this.keyCache_[i]=n={resolvedUri:e.resolvedUri,bytes:e.bytes});const r={resolvedUri:(n||e).resolvedUri};return n&&(r.bytes=n.bytes),r}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,n=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let r=null;if(i&&(i.id?r=i.id:i.uri&&(r=i.uri)),this.logger_(`playlist update [${r} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\ncurrentTime: ${this.currentTime_()}\nbufferedEnd: ${ts(this.buffered_())}\n`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri)return null!==this.mediaIndex&&(e.endList||"number"!=typeof e.partTargetDuration?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");const s=e.mediaSequence-i.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{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}n&&(n.mediaIndex-=s,n.mediaIndex<0?(n.mediaIndex=null,n.partIndex=null):(n.mediaIndex>=0&&(n.segment=e.segments[n.mediaIndex]),n.partIndex>=0&&n.segment.parts&&(n.part=n.segment.parts[n.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(_.default.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}
vendor: 7,483 bytes, line 2
2resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&va(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;"hls"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,t,i=()=>{},n=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_("skipping remove because end ${end} is <= start ${start}");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_("skipping remove because no source updater or starting media info");let r=1;const s=()=>{r--,0===r&&i()};!n&&this.audioDisabled_||(r++,this.sourceUpdater_.removeAudio(e,t,s)),(n||"main"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,n)=>{const r=Math.ceil((t-n)*y.ONE_SECOND_IN_TS),s=Math.ceil((i-n)*y.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=s););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=r););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),r++,this.sourceUpdater_.removeVideo(e,t,s));for(const i in this.inbandTextTracks_)Ha(e,t,this.inbandTextTracks_[i]);Ha(e,t,this.segmentMetadataTrack_),s()}monitorBuffer_(){this.checkBufferTimeout_&&_.default.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=_.default.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&_.default.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=_.default.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Ka({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:t}),"number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const n="number"==typeof e&&t.segments[e],r=e+1===t.segments.length,s=!n||!n.parts||i+1===n.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&r&&s}chooseNextRequest_(){const e=this.buffered_(),t=ts(e)||0,i=is(e,this.currentTime_()),n=!this.hasPlayed_()&&i>=1,r=i>=this.goalBufferLength_(),s=this.playlist_.segments;if(!s.length||n||r)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const n=[];let r=0;for(let s=0;s<t.length;s++){const a=t[s];if(e===a.timeline&&(n.push(s),r+=a.duration,r>i))return s}return 0===n.length?0:n[n.length-1]}(this.currentTimeline_,s,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=s[this.mediaIndex],i="number"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,n;const r=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\nFor TargetTime: ${r}.\nCurrentTime: ${this.currentTime_()}\nBufferedEnd: ${t}\nFetch At Buffer: ${this.fetchAtBuffer_}\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(r);if(!t){const e="No sync info found while using media sequence sync";return this.error({message:e,metadata:{errorType:Br.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,n=t.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const t=bs.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:r,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,n=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${r}`:`currentTime ${r}`,a.mediaIndex=e,a.startOfSegment=n,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=s[a.mediaIndex];let l=o&&"number"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||"number"==typeof a.partIndex&&!l)return null;"number"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const u=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!u&&!l.independent)if(0===a.partIndex){const e=s[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent="previous segment")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent="previous part");const d=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=s.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const n=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return n?(n.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),n):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:n,startOfSegment:r,isSyncRequest:s,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,u=i.segments[n],d="number"==typeof a&&u.parts[a],c={requestId:"segment-loader-"+Math.random(),uri:d&&d.resolvedUri||u.resolvedUri,mediaIndex:n,partIndex:d?a:null,isSyncRequest:s,startOfSegment:r,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:u.timeline,duration:d&&d.duration||u.duration,segment:u,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;c.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:u.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),overrideCheck:h});
vendor: 4,183 bytes, line 2
2const p=ts(this.sourceUpdater_.audioBuffered());return"number"==typeof p&&(c.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(c.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const n=Math.ceil((t-i+3)*y.ONE_SECOND_IN_TS);let r;for(r=0;r<e.length&&!(e[r].pts>n);r++);return e.slice(r)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),c}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:n,overrideCheck:r})=>r||e!==t?e<t?i:n.length?n.end(n.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,n=this.pendingSegment_.duration,r=bs.estimateSegmentRequestTime(n,i,this.playlist_,e.bytesReceived),s=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(r<=s)return;const a=function(e){const{main:t,currentTime:i,bandwidth:n,duration:r,segmentDuration:s,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,u=t.playlists.filter((e=>!bs.isIncompatible(e)));let d=u.filter(bs.isEnabled);d.length||(d=u.filter((e=>!bs.isDisabled(e))));const c=d.filter(bs.hasAttribute.bind(null,"BANDWIDTH")).map((e=>{const t=l.getSyncPoint(e,r,o,i)?1:2;return{playlist:e,rebufferingImpact:bs.estimateSegmentRequestTime(s,n,e)*t-a}})),h=c.filter((e=>e.rebufferingImpact<=0));return Ma(h,((e,t)=>Ra(t.playlist,e.playlist))),h.length?h[0]:(Ma(c,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),c[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:s,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=r-s-a.rebufferingImpact;let l=.5;s<=Xr&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*la.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${za(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:n}=t,r={segmentInfo:Ka({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:n}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:r}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),n=Object.keys(t).sort();if(i.length!==n.length)return!1;for(let r=0;r<i.length;r++){const s=i[r];if(s!==n[r])return!1;if(e[s]!==t[s])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():Xa(this)))}handleTimingInfo_(e,t,i,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const r=this.pendingSegment_,s=Wa(t);r[s]=r[s]||{},r[s][i]=n,this.logger_(`timinginfo: ${t} - ${i} - ${n}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Xa(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.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,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),n={};t.forEach((e=>{n[e.stream]=n[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=n[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)}
vendor: 5,049 bytes, line 2
2)),Object.keys(n).forEach((e=>{const{startTime:t,endTime:r,captions:s}=n[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${r} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:"usage",name:"vhs-608"});let n=i;/^cc708_/.test(i)&&(n="SERVICE"+i.split("_")[1]);const r=t.textTracks().getTrackById(n);if(r)e[i]=r;else{let r=i,s=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[n];o&&(r=o.label,s=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:"captions",id:n,default:a,label:r,language:s},!1).track}}}(a,this.vhs_.tech_,e),Ha(t,r,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const n=_.default.WebKitDataCue||_.default.VTTCue;t.forEach((t=>{const r=t.stream;t.content?t.content.forEach((s=>{const a=new n(t.startTime+i,t.endTime+i,s.text);a.line=s.line,a.align="left",a.position=s.position,a.positionAlign="line-left",e[r].addCue(a)})):e[r].addCue(new n(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:s,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,i){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||(this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i)))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if("audio"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!(!e||this.getCurrentMediaInfo_()&&Ga({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:n,isMuxed:r}=t;return!(n&&!e.videoTimingInfo||i&&!this.audioDisabled_&&!r&&!e.audioTimingInfo||Ga({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return Xa(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[Wa(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t="main"===this.loaderType_&&e&&e.hasVideo;let n;t&&(n=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:n,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:"main"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:n}){if(i){const e=Qs(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=n,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}
vendor: 4,458 bytes, line 2
2,n){const r=this.sourceUpdater_.audioBuffered(),s=this.sourceUpdater_.videoBuffered();r.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+es(r).join(", ")),s.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+es(s).join(", "));const a=r.length?r.start(0):0,o=r.length?r.end(r.length-1):0,l=s.length?s.start(0):0,u=s.length?s.end(s.length-1):0;if(o-a<=1&&u-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${es(r).join(", ")}, video buffer: ${es(s).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:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=_.default.setTimeout((()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},n){n&&(22!==n.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",n),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:Br.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:n,bytes:r}){if(!r){const e=[n];let t=n.byteLength;i&&(e.unshift(i),t+=i.byteLength),r=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const s={segmentInfo:Ka({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:s}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:r},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:r}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const n=this.pendingSegment_.segment,r=`${e}TimingInfo`;n[r]||(n[r]={}),n[r].transmuxerPrependedSeconds=i.prependedContentDuration||0,n[r].transmuxedPresentationStart=i.start.presentation,n[r].transmuxedDecodeStart=i.start.decode,n[r].transmuxedPresentationEnd=i.end.presentation,n[r].transmuxedDecodeEnd=i.end.decode,n[r].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:n}=t;if(!n||!n.byteLength)return;if("audio"===i&&this.audioDisabled_)return;const r=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:r,data:n})}loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_())return Xa(this),void this.loadQueue_.push((()=>{const t=A.default({},e,{forceTimestampOffset:!0});A.default(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),n=null!==this.mediaIndex,r=e.timeline!==this.currentTimeline_&&e.timeline>0,s=i||n&&r;this.logger_(`Requesting\n${Ba(e.uri)}\n${za(e)}`),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Pa({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.b
vendor: 5,033 bytes, line 2
2ind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:s,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:n})=>{this.logger_(`${za(e)} logged from transmuxer stream ${n} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:n,timingInfo:r})=>{const s={segmentInfo:Ka({segment:t})};i&&(s.keyInfo=i),n&&(s.trackInfo=n),r&&(s.timingInfo=r),this.trigger({type:e,metadata:s})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let n=t-la.BACK_BUFFER_LENGTH;e.length&&(n=Math.max(n,e.start(0)));const r=t-i;return Math.min(r,n)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,n=e.segment.key||e.segment.map&&e.segment.map.key,r=e.segment.map&&!e.segment.map.bytes,s={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:n,isMediaInitialization:r},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?s.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(s.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);s.key=this.segmentKey(t.key),s.key.iv=i}return t.map&&(s.map=this.initSegmentForMap(t.map)),s}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<$a)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Ta)return;return this.pause(),e.code===ba?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}const n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,t.stats),n.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const n=t[0].pts;let r=0;for(;r<e.length&&!(e[r].pts>=n);r++);return e.slice(0,r).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(n)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:n,currentVideoTimestampOffset:r,useVideoTimingInfo:s,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!s)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===n+r?a.start:n}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),void this.trigger("error");const{hasAudio:i,hasVideo:n,isMuxed:r}=t,s="main"===this.loaderType_&&n,a=!this.audioDisabled_&&i&&!r;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);s&&e.waitingOnAppends++,a&&e.waitingOnAppends++,s&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}
vendor: 4,905 bytes, line 2
2checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>"main"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.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.":!t.hasVideo&&i.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_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger("error"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||"number"!=typeof e.timingInfo.start||e.changedTimestampOffset||"main"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&"number"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&"number"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end="number"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Ka({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:e})}if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});const t=((e,t)=>{if("hls"!==t)return null;const i=(e=>{let t=0;return["video","audio"].forEach((function(i){const n=e[`${i}TimingInfo`];if(!n)return;const{start:r,end:s}=n;let a;"bigint"==typeof r||"bigint"==typeof s?a=_.default.BigInt(s)-_.default.BigInt(r):"number"==typeof r&&"number"==typeof s&&(a=s-r),void 0!==a&&a>t&&(t=a)})),"bigint"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const n=e.playlist.targetDuration,r=Ya({segmentDuration:i,maxDuration:2*n}),s=Ya({segmentDuration:i,maxDuration:n}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${n}. 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`;return r||s?{severity:r?"warn":"info",message:a}:null})(e,this.sourceType_);if(t&&("warn"===t.severity?Br.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${za(e)}`);this.logger_(`Appended ${za(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const i=e.segment,n=e.part,r=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,s=n&&n.end&&this.currentTime_()-n.end>3*e.playlist.partTargetDuration;if(r||s)return this.logger_(`bad ${r?"segment":"part"} ${za(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_
vendor: 5,927 bytes, line 2
2(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<$a)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,n=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,n=t.end;if(!Va(i)||!Va(n))return;Ha(i,n,this.segmentMetadataTrack_);const r=_.default.WebKitDataCue||_.default.VTTCue,s={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:n},a=new r(i,n,JSON.stringify(s));a.value=s,this.segmentMetadataTrack_.addCue(a)}}function Za(){}const Ja=function(e){return"string"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},eo=["video","audio"],to=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},io=(e,t)=>{if(0===t.queue.length)return;let i=0,n=t.queue[i];if("mediaSource"!==n.type){if("mediaSource"!==e&&t.ready()&&"closed"!==t.mediaSource.readyState&&!to(e,t)){if(n.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const n=t[i];if("mediaSource"===n.type)return null;if(n.type===e)return i}return null})(e,t.queue),null===i)return;n=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=n,n.action(e,t),n.doneFn?void 0:(t.queuePending[e]=null,void io(e,t))}}else t.updating()||"closed"===t.mediaSource.readyState||(t.queue.shift(),n.action(t),n.doneFn&&n.doneFn(),io("audio",t),io("video",t))},no=(e,t)=>{const i=t[`${e}Buffer`],n=Ja(e);i&&(i.removeEventListener("updateend",t[`on${n}UpdateEnd_`]),i.removeEventListener("error",t[`on${n}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},ro=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),so=(e,t,i)=>(n,r)=>{const s=r[`${n}Buffer`];if(ro(r.mediaSource,s)){r.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${n}Buffer`);try{s.appendBuffer(e)}catch(e){r.logger_(`Error with code ${e.code} `+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${t.mediaIndex} to ${n}Buffer`),r.queuePending[n]=null,i(e)}}},ao=(e,t)=>(i,n)=>{const r=n[`${i}Buffer`];if(ro(n.mediaSource,r)){n.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{r.remove(e,t)}catch(r){n.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},oo=e=>(t,i)=>{const n=i[`${t}Buffer`];ro(i.mediaSource,n)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),n.timestampOffset=e)},lo=e=>(t,i)=>{e()},uo=e=>t=>{if("open"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||""})`);try{t.mediaSource.endOfStream(e)}catch(e){Br.log.warn("Failed to call media source endOfStream",e)}}},co=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){Br.log.warn("Failed to set media source duration",e)}},ho=(e,t)=>i=>{const n=Ja(e),r=d.getMimeForCodec(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const s=i.mediaSource.addSourceBuffer(r);s.addEventListener("updateend",i[`on${n}UpdateEnd_`]),s.addEventListener("error",i[`on${n}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=s},po=e=>t=>{const i=t[`${e}Buffer`];if(no(e,t),ro(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){Br.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},fo=e=>(t,i)=>{const n=i[`${t}Buffer`],r=d.getMimeForCodec(e);if(!ro(i.mediaSource,n))return;const s=e.substring(0,e.indexOf(".")),a=i.codecs[t];if(a.substring(0,a.indexOf("."))===s)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:"codecschange",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{n.changeType(r),i.codecs[t]=e}catch(e){o.errorType=Br.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger("error"),Br.log.warn(`Failed to changeType on ${t}Buffer`,e)}},go=({type:e,sourceUpdater:t,action:i,doneFn:n,name:r})=>{t.queue.push({type:e,action:i,doneFn:n,name:r}),io(e,t)},mo=(e,t)=>i=>{const n=function(e){if(0===e.length)return"Buffered Ranges are empty";let t="Buffered Ranges: \n";for(let i=0;i<e.length;i++){const n=e.start(i),r=e.end(i);t+=`${n} --\x3e ${r}. Duration (${r-n})\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received "updateend" event for ${e} Source Buffer: `,n),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}io(e,t)};class yo extends Br.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>io("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=zr("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=mo("video",this),this.onAudioUpdateEnd_=mo("audio",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}
vendor: 4,925 bytes, line 2
2triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){go({type:"mediaSource",sourceUpdater:this,action:ho(e,t),name:"addSourceBuffer"})}abort(e){go({type:e,sourceUpdater:this,action:(e,t)=>{if("open"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(ro(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){Br.log.warn(`Failed to abort on ${e}Buffer`,t)}}},name:"abort"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?go({type:"mediaSource",sourceUpdater:this,action:po(e),name:"removeSourceBuffer"}):Br.log.error("removeSourceBuffer is not supported!")}canRemoveSourceBuffer(){return!Br.browser.IS_FIREFOX&&_.default.MediaSource&&_.default.MediaSource.prototype&&"function"==typeof _.default.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return _.default.SourceBuffer&&_.default.SourceBuffer.prototype&&"function"==typeof _.default.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?go({type:e,sourceUpdater:this,action:fo(t),name:"changeType"}):Br.log.error("changeType is not supported!")}addOrChangeSourceBuffers(e){if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:n,bytes:r}=e;if(this.processedAppend_=!0,"audio"===n&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${r.length} until video append`);if(go({type:n,sourceUpdater:this,action:so(r,i||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===n){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return ro(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Gr()}videoBuffered(){return ro(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Gr()}buffered(){const e=ro(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=ro(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,n=null,r=0;const s=[],a=[];if(!(e&&e.length&&t&&t.length))return Gr();let o=e.length;for(;o--;)s.push({time:e.start(o),type:"start"}),s.push({time:e.end(o),type:"end"});for(o=t.length;o--;)s.push({time:t.start(o),type:"start"}),s.push({time:t.end(o),type:"end"});for(s.sort((function(e,t){return e.time-t.time})),o=0;o<s.length;o++)"start"===s[o].type?(r++,2===r&&(i=s[o].time)):"end"===s[o].type&&(r--,1===r&&(n=s[o].time)),null!==i&&null!==n&&(a.push([i,n]),i=null,n=null);return Gr(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Za){go({type:"mediaSource",sourceUpdater:this,action:co(e),name:"duration",doneFn:t})}endOfStream(e=null,t=Za){"string"!=typeof e&&(e=void 0),go({type:"mediaSource",sourceUpdater:this,action:uo(e),name:"endOfStream",doneFn:t})}removeAudio(e,t,i=Za){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?go({type:"audio",sourceUpdater:this,action:ao(e,t),doneFn:i,name:"remove"}):i()}removeVideo(e,t,i=Za){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?go({type:"video",sourceUpdater:this,action:ao(e,t),doneFn:i,name:"remove"}):i()}updating(){return!(!to("audio",this)&&!to("video",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(go({type:"audio",sourceUpdater:this,action:oo(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(go({type:"video",sourceUpdater:this,action:oo(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&go({type:"audio",sourceUpdater:this,action:lo(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&go({type:"video",sourceUpdater:this,action:lo(e),name:"callback"})}dispose(){this.trigger("dispose"),eo.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>no(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const vo=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),_o=new Uint8Array("\n\n".split("").map((e=>e.charCodeAt(0))));
vendor: 4,082 bytes, line 2
2class bo extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class To extends Qa{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Gr();const e=this.subtitlesTrack_.cues;return Gr([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Qs(e);let n=this.initSegments_[i];if(t&&!n&&e.bytes){const t=_o.byteLength+e.bytes.byteLength,r=new Uint8Array(t);r.set(e.bytes),r.set(_o,e.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:r}}return n||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Ha(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};return this.syncController_.one("timestampoffset",e),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state="READY");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===ba&&this.handleTimeout_(),e.code===Ta?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const n=this.pendingSegment_,r=i.mp4VttCues&&i.mp4VttCues.length;r&&(n.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(n.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const s=n.segment;if(s.map&&(s.map.bytes=t.map.bytes),n.bytes=t.bytes,"function"!=typeof _.default.WebVTT&&"function"==typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:"Error loading vtt.js"})));s.requested=!0;try{this.parseVTTCues_(n)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:Br.Error.StreamingVttParserError,error:e}})}if(r||this.updateTimeMapping_(n,this.syncController_.timelines[n.timeline],this.playlist_),n.cues.length?n.timingInfo={start:n.cues[0].startTime,end:n.cues[n.cues.length-1].endTime}:n.timingInfo={start:n.startOfSegment,end:n.startOfSegment+n.duration},n.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");n.byteLength=n.bytes.byteLength,this.mediaSecondsLoaded+=s.duration,n.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new _.default.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let n=t.length-1;n>=0;n--){const r=t[n],s=`${r.startTime}-${r.endTime}-${r.text}`;i[s]?e.removeCue(r):i[s]=r}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&"vtt"===e.type,n=t&&"text"===t.type;i&&n&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();
2e.mp4VttCues.forEach((i=>{const n=i.start+t,r=i.end+t,s=new _.default.VTTCue(n,r,i.cueText);i.settings&&i.settings.split(" ").forEach((e=>{const t=e.split(":"),i=t[0],n=t[1];s[i]=isNaN(n)?n:Number(n)})),e.cues.push(s)}))}parseVTTCues_(e){let t,i=!1;if("function"!=typeof _.default.WebVTT)throw new bo;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);"function"==typeof _.default.TextDecoder?t=new _.default.TextDecoder("utf8"):(t=_.default.WebVTT.StringDecoder(),i=!0);const n=new _.default.WebVTT.Parser(_.default,_.default.vttjs,t);if(n.oncue=e.cues.push.bind(e.cues),n.ontimestampmap=t=>{e.timestampmap=t},n.onparsingerror=e=>{Br.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=vo(t)),n.parse(t)}let r=e.bytes;i&&(r=vo(r)),n.parse(r),n.flush()}updateTimeMapping_(e,t,i){const n=e.segment;if(!t)return;if(!e.cues.length)return void(n.empty=!0);const{MPEGTS:r,LOCAL:s}=e.timestampmap,a=r/y.ONE_SECOND_IN_TS-s+t.mapping;if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,n=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(n,0),e.endTime=Math.max(n+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,r=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,r-n.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*y.ONE_SECOND_IN_TS;const n=t*y.ONE_SECOND_IN_TS;let r;for(r=n<i?-8589934592:8589934592;Math.abs(i-n)>4294967296;)i+=r;return i/y.ONE_SECOND_IN_TS}}const So=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const n=i[e];if(t>=n.adStartTime&&t<=n.adEndTime)return n}return null};class Ao{constructor({start:e,end:t,segmentIndex:i,partIndex:n=null,appended:r=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=n,this.appended_=r}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class wo{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class Eo{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:i,segments:n}=e;if(this.isReliable_=this.isReliablePlaylist_(i,n),this.isReliable_)return this.updateStorage_(n,i,this.calculateBaseTime_(i,n,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const n=new Map;let r="\n",s=i,a=t;this.start_=s,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=s,l=o+e.duration,u=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new Ao({start:o,end:l,appended:u,segmentIndex:t});e.syncInfo=d;let c=s;const h=(e.parts||[]).map(((e,n)=>{const s=c,o=c+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[n]&&i.partsSyncInfo[n].isAppended),u=new Ao({start:s,end:o,appended:l,segmentIndex:t,partIndex:n});return c=o,r+=`Media Sequence: ${a}.${n} | Range: ${s} --\x3e ${o} | Appended: ${l}\n`,e.syncInfo=u,u}));n.set(a,new wo(d,h)),r+=`${Ba(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\x3e ${l} | Appended: ${u}\n`,a++,s=l})),this.end_=s,this.storage_=n,this.diagnostics_=r}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const n=Math.min(...this.storage_.keys());if(e<n){const i=n-e;let r=this.storage_.get(n).segmentSyncInfo.start;for(let e=0;e<i;e++)r-=t[e].duration;return r}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}
vendor: 4,133 bytes, line 2
2class Co extends Eo{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const ko=[{name:"VOD",run:(e,t,i,n,r)=>i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(e,t,i,n,r,s)=>{const a=e.getMediaSequenceSync(s);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(r);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:"ProgramDateTime",run:(e,t,i,n,r)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let s=null,a=null;const o=rs(t);r=r||0;for(let i=0;i<o.length;i++){const n=o[t.endList||0===r?i:o.length-(i+1)],l=n.segment,u=e.timelineToDatetimeMappings[l.timeline];if(!u||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+u;if(l.parts&&"number"==typeof n.partIndex)for(let e=0;e<n.partIndex;e++)d+=l.parts[e].duration;const c=Math.abs(r-d);if(null!==a&&(0===c||a<c))break;a=c,s={time:d,segmentIndex:n.segmentIndex,partIndex:n.partIndex}}return s}},{name:"Segment",run:(e,t,i,n,r)=>{let s=null,a=null;r=r||0;const o=rs(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===r?e:o.length-(e+1)],l=i.segment,u=i.part&&i.part.start||l&&l.start;if(l.timeline===n&&void 0!==u){const e=Math.abs(r-u);if(null!==a&&a<e)break;(!s||null===a||a>=e)&&(a=e,s={time:u,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return s}},{name:"Discontinuity",run:(e,t,i,n,r)=>{let s=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let n=0;n<t.discontinuityStarts.length;n++){const a=t.discontinuityStarts[n],o=t.discontinuitySequence+n+1,l=e.discontinuities[o];if(l){const e=Math.abs(r-l.time);if(null!==i&&i<e)break;(!s||null===i||i>=e)&&(i=e,s={time:l.time,segmentIndex:a,partIndex:null})}}}return s}},{name:"Playlist",run:(e,t,i,n,r)=>t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}];class Io extends Br.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new Eo,i=new Co(t),n=new Co(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:n},this.logger_=zr("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,n,r){if(t!==1/0)return ko.find((({name:e})=>"VOD"===e)).run(this,e,t);const s=this.runStrategies_(e,t,i,n,r);if(!s.length)return null;for(const t of s){const{syncPoint:i,strategy:r}=t,{segmentIndex:s,time:a}=i;if(s<0)continue;const o=a,l=o+e.segments[s].duration;if(this.logger_(`Strategy: ${r}. Current time: ${n}. selected segment: ${s}. Time: [${o} -> ${l}]}`),n>=o&&n<l)return this.logger_("Found sync point with exact match: ",i),i}return this.selectSyncPoint_(s,{key:"time",value:n})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return n.segmentIndex>0&&(n.time*=-1),Math.abs(n.time+ds({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:n.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,n,r){const s=[];for(let a=0;a<ko.length;a++){const o=ko[a],l=o.run(this,e,t,i,n,r);l&&(l.strategy=o.name,s.push({strategy:o.name,syncPoint:l}))}return s}selectSyncPoint_(e,t){let i=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy;for(let s=1;s<e.length;s++){const a=Math.abs(e[s].syncPoint[t.key]-t.value);a<n&&(n=a,i=e[s].syncPoint,r=e[s].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${r}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+("number"==typeof i.partIndex?`,partIndex:${i.partIndex}`:"")+"]"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)Br.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let n=i-1;n>=0;n--){const i=e.segments[n];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:i.start}
vendor: 16,376 bytes, line 2
2,this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),n=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:n.start}));const r=n.dateTimeObject;n.discontinuity&&t&&r&&(this.timelineToDatetimeMappings[n.timeline]=-r.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const n=e.segment,r=e.part;let s,a,o=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),s=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;s=t.start+o.mapping,a=t.end+o.mapping}return r&&(r.start=s,r.end=a),(!n.start||s<n.start)&&(n.start=s),n.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let n=0;n<t.discontinuityStarts.length;n++){const r=t.discontinuityStarts[n],s=t.discontinuitySequence+n+1,a=r-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>o){let n;n=a<0?i.start-ds({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:r}):i.end+ds({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:r}),this.discontinuities[s]={time:n,accuracy:o}}}}dispose(){this.trigger("dispose"),this.off()}}class xo extends Br.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:i}){return"number"==typeof t&&"number"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if("number"==typeof t&&"number"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const n={timelineChangeInfo:{from:t,to:i}};this.trigger({type:"timelinechange",metadata:n})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const Po=ca(ha((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),s=t.length,a=0;a<s;++a)t[a].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();let t=null;class n{constructor(e){let i,n,r;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],n=t[4],r=i[4];let s,a,o;const l=[],u=[];let d,c,h,p,f,g;for(s=0;s<256;s++)u[(l[s]=s<<1^283*(s>>7))^s]=s;for(a=o=0;!n[a];a^=d||1,o=u[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,n[a]=p,r[p]=a,h=l[c=l[d=l[a]]],g=16843009*h^65537*c^257*d^16843008*a,f=257*l[p]^16843008*p,s=0;s<4;s++)t[s][a]=f=f<<24^f>>>8,i[s][p]=g=g<<24^g>>>8;for(s=0;s<5;s++)t[s]=t[s].slice(0),i[s]=i[s].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const s=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");const u=e.slice(0),d=[];for(this._key=[u,d],i=o;i<4*o+28;i++)r=u[i-1],(i%o==0||8===o&&i%o==4)&&(r=s[r>>>24]<<24^s[r>>16&255]<<16^s[r>>8&255]<<8^s[255&r],i%o==0&&(r=r<<8^r>>>24^l<<24,l=l<<1^283*(l>>7))),u[i]=u[i-o]^r;for(n=0;i;n++,i--)r=u[3&n?i:i-4],d[n]=i<=4||n<4?r:a[0][s[r>>>24]]^a[1][s[r>>16&255]]^a[2][s[r>>8&255]]^a[3][s[255&r]]}decrypt(e,t,i,n,r,s){const a=this._key[1];let o,l,u,d=e^a[0],c=n^a[1],h=i^a[2],p=t^a[3];const f=a.length/4-2;let g,m=4;const y=this._tables[1],v=y[0],_=y[1],b=y[2],T=y[3],S=y[4];for(g=0;g<f;g++)o=v[d>>>24]^_[c>>16&255]^b[h>>8&255]^T[255&p]^a[m],l=v[c>>>24]^_[h>>16&255]^b[p>>8&255]^T[255&d]^a[m+1],u=v[h>>>24]^_[p>>16&255]^b[d>>8&255]^T[255&c]^a[m+2],p=v[p>>>24]^_[d>>16&255]^b[c>>8&255]^T[255&h]^a[m+3],m+=4,d=o,c=l,h=u;for(g=0;g<4;g++)r[(3&-g)+s]=S[d>>>24]<<24^S[c>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[m++],o=d,d=c,c=h,h=p,p=o}}class r extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const s=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class a{constructor(e,t,i,n){const o=a.STEP,l=new Int32Array(e.buffer),u=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new r,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,u)),d=o;d<l.length;d+=o)i=new Uint32Array([s(l[d-4]),s(l[d-3]),s(l[d-2]),s(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,u));this.asyncStream_.push((function(){var e;n(null,(e=u).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,i,r){return function(){const a=function(e,t,i){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new n(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let u,d,c,h,p,f,g,m,y;for(u=i[0],d=i[1],c=i[2],h=i[3],y=0;y<r.length;y+=4)p=s(r[y]),f=s(r[y+1]),g=s(r[y+2]),m=s(r[y+3]),a.decrypt(p,f,g,m,l,y),l[y]=s(l[y]^u),l[y+1]=s(l[y+1]^d),l[y+2]=s(l[y+2]^c),l[y+3]=s(l[y+3]^h),u=p,d=f,c=g,h=m;return o}(e,t,i);r.set(a,e.byteOffset)}}}var o,l,u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},d=("undefined"!=typeof window?window:void 0!==u?u:"undefined"!=typeof self?self:{}).BigInt||Number;d("0x1"),d("0x100"),d("0x10000"),d("0x1000000"),d("0x100000000"),d("0x10000000000"),d("0x1000000000000"),d("0x100000000000000"),d("0x10000000000000000"),o=new Uint16Array([65484]),255===(l=new Uint8Array(o.buffer,o.byteOffset,o.byteLength))[0]||l[0];self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),n=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),r=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new a(i,n,r,(function(e,i){self.postMessage(function(e){const t={};return Object.keys(e).forEach((i=>{const n=e[i];var r;r=n,("function"===ArrayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n})),t}({source:t.source,decrypted:i}),[i.buffer])}))}})));var Lo=da(Po);const Do=e=>{let t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Oo=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Mo=(e,t)=>{t.activePlaylistLoader=e,e.load()},Ro={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:n}=t,r=i.activeTrack(),s=i.activeGroup(),a=(s.filter((e=>e.default))[0]||s[0]).id,o=i.tracks[a];if(r!==o){Br.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else n({error:{message:"Problem encountered loading the default audio track."}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;Br.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const n=i.activeTrack();n&&(n.mode="disabled"),i.onTrackChanged()}},No={AUDIO:(e,t,i)=>{if(!t)return;const{tech:n,requestOptions:r,segmentLoaders:{[e]:s}}=i;t.on("loadedmetadata",(()=>{const e=t.media();s.playlist(e,r),(!n.paused()||e.endList&&"none"!==n.preload())&&s.load()})),t.on("loadedplaylist",(()=>{s.playlist(t.media(),r),n.paused()||s.load()})),t.on("error",Ro[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:n,requestOptions:r,segmentLoaders:{[e]:s},mediaTypes:{[e]:a}}=i;t.on("loadedmetadata",(()=>{const e=t.media();s.playlist(e,r),s.track(a.activeTrack()),(!n.paused()||e.endList&&"none"!==n.preload())&&s.load()})),t.on("loadedplaylist",(()=>{s.playlist(t.media(),r),n.paused()||s.load()})),t.on("error",Ro[e](e,i))}},Uo={AUDIO:(e,t)=>{const{vhs:i,sourceType:n,segmentLoaders:{[e]:r},requestOptions:s,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:u}},mainPlaylistLoader:d}=t,c=_s(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},c&&(a[e].main.default.playlists=d.main.playlists));for(const r in a[e]){o[r]||(o[r]=[]);for(const h in a[e][r]){let p,f=a[e][r][h];if(c?(u(`AUDIO group '${r}' label '${h}' is a main playlist`),f.isMainPlaylist=!0,p=null):p="vhs-json"===n&&f.playlists?new Vs(f.playlists[0],i,s):f.resolvedUri?new Vs(f.resolvedUri,i,s):f.playlists&&"dash"===n?new oa(f.playlists[0],i,s,d):null,f=Wr({id:h,playlistLoader:p},f),No[e](e,f.playlistLoader,t),o[r].push(f),void 0===l[h]){const e=new Br.AudioTrack({id:h,kind:Do(f),enabled:!1,language:f.language,default:f.default,label:h});l[h]=e}}}r.on("error",Ro[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:n,sourceType:r,segmentLoaders:{[e]:s},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:u}},mainPlaylistLoader:d}=t;for(const s in o[e]){l[s]||(l[s]=[]);for(const c in o[e][s]){if(!n.options_.useForcedSubtitles&&o[e][s][c].forced)continue;let h,p=o[e][s][c];if("hls"===r)h=new Vs(p.resolvedUri,n,a);else if("dash"===r){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new oa(p.playlists[0],n,a,d)}else"vhs-json"===r&&(h=new Vs(p.playlists?p.playlists[0]:p.resolvedUri,n,a));if(p=Wr({id:c,playlistLoader:h},p),No[e](e,p.playlistLoader,t),l[s].push(p),void 0===u[c]){const e=i.addRemoteTextTrack({id:c,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:c},!1).track;u[c]=e}}}s.on("error",Ro[e](e,t))},"CLOSED-CAPTIONS":(e,t)=>{const{tech:i,main:{mediaGroups:n},mediaTypes:{[e]:{groups:r,tracks:s}}}=t;for(const t in n[e]){r[t]||(r[t]=[]);for(const a in n[e][t]){const o=n[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let u={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[u.instreamId]&&(u=Wr(u,l[u.instreamId])),void 0===u.default&&delete u.default,r[t].push(Wr({id:a},o)),void 0===s[a]){const e=i.addRemoteTextTrack({id:u.instreamId,kind:"captions",default:u.default,language:u.language,label:u.label},!1).track;s[a]=e}}}}},Bo=(e,t)=>{for(let i=0;i<e.length;i++){if(ys(t,e[i]))return!0;if(e[i].playlists&&Bo(e[i].playlists,t))return!0}return!1},jo={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if("showing"===i[e].mode||"hidden"===i[e].mode)return i[e];return null}};class Fo{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=Vr(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class qo extends Br.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Fo,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=zr("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger("error");i.startsWith("data:")?this.decodeDataUriManifest_(i.substring(i.indexOf(",")+1)):(this.steeringManifest.reloadUri=Vr(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),void this.dispose();const n={contentSteeringInfo:{uri:i}};this.trigger({type:"contentsteeringloadstart",metadata:n}),this.request_=this.xhr_({uri:i,requestType:"content-steering-manifest"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders["retry-after"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let r;this.trigger({type:"contentsteeringloadcomplete",metadata:n});try{r=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:Br.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:"error",metadata:t})}this.assignSteeringProperties_(r);const s={contentSteeringInfo:n.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:s}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new _.default.URL(e),i=new _.default.URL(this.proxyServerUrl_);return i.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(_.default.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new _.default.URL(e),i=this.getPathway(),n=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(n){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,n)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger("error");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for c
2ontent steering. Ending content steering."),this.trigger("error"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=_.default.setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){_.default.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Fo}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(Vr(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Ho;const Vo=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],$o=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class zo extends Br.EventTarget{constructor(e){super(),this.fastQualityChange_=(e=>{let t=null;return(...i)=>{clearTimeout(t),t=setTimeout((()=>{e.apply(null,i)}),100)}})(this.fastQualityChange_.bind(this));const{src:t,withCredentials:i,tech:n,bandwidth:r,externVhs:s,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:u,cacheEncryptionKeys:d,bufferBasedABR:c,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:f}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Ho=s,this.bufferBasedABR=Boolean(c),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=n,this.vhs_=n.vhs,this.player_=e.player_,this.sourceType_=u,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Za,activeTrack:Za,getActiveGroup:Za,onGroupChanged:Za,onTrackChanged:Za,lastTrack_:null,logger_:zr(`MediaGroups[${t}]`)}})),e})(),f&&_.default.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new _.default.ManagedMediaSource,this.usingManagedMediaSource_=!0,Br.log("Using ManagedMediaSource")):_.default.MediaSource&&(this.mediaSource=new _.default.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=Gr(),this.hasPlayed_=!1,this.syncController_=new Io(e),this.segmentMetadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new Lo,this.sourceUpdater_=new yo(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new xo,this.keyStatusMap_=new Map;const m={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:r,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_="dash"===this.sourceType_?new oa(t,this.vhs_,Wr(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Vs(t,this.vhs_,Wr(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Qa(Wr(m,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Qa(Wr(m,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new To(Wr(m,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){n.off("vttjserror",r),e()}function r(){n.off("vttjsloaded",i),t()}n.one("vttjsloaded",i),n.one("vttjserror",r),n.addWebVttScript_()}))}),e),this.contentSteeringController_=new qo(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",(()=>this.startABRTimer_())),this.tech_.on("pause",(()=>this.stopABRTimer_())),this.tech_.on("play",(()=>
vendor: 10,176 bytes, line 2
2this.startABRTimer_()))),Vo.forEach((e=>{this[e+"_"]=$o.bind(this,e)})),this.logger_=zr("pc"),this.triggeredFmp4Usage=!1,"none"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y="none"===this.tech_.preload()?"play":"loadstart";this.tech_.one(y,(()=>{const e=Date.now();this.tech_.one("loadeddata",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const n=this.media(),r=n&&(n.id||n.uri),s=e&&(e.id||e.uri);if(r&&r!==s){this.logger_(`switch media ${r} -> ${s} from ${t}`);const i={renditionInfo:{id:s,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:"renditionselected",metadata:i}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,n=this.contentSteeringController_.getPathway();if(i&&n){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===n));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=_.default.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(_.default.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,n=Object.keys(i);let r;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)r=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||n.length&&i[n[0]];for(const t in e)if(e[t].default){r={label:t};break}}if(!r)return t;const s=[];for(const t in i)if(i[t][r.label]){const n=i[t][r.label];if(n.playlists&&n.playlists.length)s.push.apply(s,n.playlists);else if(n.uri)s.push(n);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const n=e.playlists[i];n.attributes&&n.attributes.AUDIO&&n.attributes.AUDIO===t&&s.push(n)}}return s.length?s:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;ms(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&"none"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),(e=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((t=>{Uo[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:n,vhs:r,segmentLoaders:{AUDIO:s,main:a}}=e;["AUDIO","SUBTITLES"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:n,mediaTypes:{[e]:{groups:r}}}=t,s=n.media();if(!s)return null;let a=null;s.attributes[e]&&(a=r[s.attributes[e]]);const o=Object.keys(r);if(!a)if("AUDIO"===e&&o.length>1&&_s(t.main))for(let e=0;e<o.length;e++){const t=r[o[e]];if(Bo(t,s)){a=t;break}}else r.main?a=r.main:1===o.length&&(a=r[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=jo[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:n},mediaTypes:{[e]:r}}=t,s=r.activeTrack(),a=r.getActiveGroup(),o=r.activePlaylistLoader,l=r.lastGroup_;a&&l&&a.id===l.id||(r.lastGroup_=a,r.lastTrack_=s,Oo(i,r),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Mo(a.playlistLoader,r)):o&&n.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:n}}=t;n.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:n,main:r},mediaTypes:{[e]:s}}=t,a=s.activeTrack(),o=s.getActiveGroup(),l=s.activePlaylistLoader,u=s.lastTrack_;if((!u||!a||u.id!==a.id)&&(s.lastGroup_=o,s.lastTrack_=a,Oo(n,s),o)){if(o.isMainPlaylist){if(!a||!u||a.id===u.id)return;const e=t.vhs.playlistController_,n=e.selectPlaylist();if(e.media()===n)return;return s.logger_(`track change. Switching main audio from ${u.id} to ${a.id}`),i.pause(),r.resetEverything(),void e.fastQualityChange_(n)}if("AUDIO"===e){if(!o.playlistLoader)return r.setAudio(!0),void r.resetEverything();n.setAudio(!0),r.setAudio(!1)}l!==o.playlistLoader?(n.track&&n.track(a),n.resetEverything(),Mo(o.playlistLoader,s)):Mo(o.playlistLoader,s)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),s.setAudio(!0)):a.setAudio(!0)}i.on("mediachange",(()=>{["AUDIO","SUBTITLES"].forEach((e=>t[e].onGroupChanged()))})),i.on("mediachanging",(()=>{["AUDIO","SUBTITLES"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"vhs-audio-change"})};n.audioTracks().addEventListener("change",l),n.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",(()=>{n.audioTracks().removeEventListener("change",l),n.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),n.clearTracks("audio");for(const e in t.AUDIO.tracks)n.audioTracks().addTrack(t.AUDIO.tracks[e])})({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(()=>{this.trigger("selectedinitialmedia")}))})),this.mainPlaylistLoader_.on("loadedplaylist",(()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;if(this.initialMedia_=t,this.switchMedia_(this.initialMedia_,"initial"),"vhs-json"!==this.sourceType_||!this.initialMedia_.segments)return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on("error",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on("mediachanging",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on("mediachange",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;ms(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,"dash"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})})),this.mainPlaylistLoader_.on("playlistunchanged",(()=>{const e=this.mainPlaylistLoader_.media();"playlist-unchanged"!==e.lastExcludeReason_&&this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))})),this.mainPlaylistLoader_.on("renditiondisabled",(()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})})),this.mainPlaylistLoader_.on("renditionenabled",(()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})})),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(A.default({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let n=!0;const r=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e])i.AUDIO[e][t].uri||(n=!1);n&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Ho.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),r.length&&Object.keys(i.AUDIO[r[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pen
vendor: 1,433 bytes, line 2
2dingMedia_,i=this.tech_.currentTime(),n=this.bufferLowWaterLine(),r=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:n,bufferLowWaterLine:r,bufferHighWaterLine:s,duration:a,bufferBasedABR:o,log:l}){if(!n)return Br.log.warn("We received no playlist to switch to. Please check your stream."),!1;const u=`allowing switch ${e&&e.id||"null"} -> ${n.id}`;if(!e)return l(`${u} as current playlist is not set`),!0;if(n.id===e.id)return!1;const d=Boolean(Qr(t,i).length);if(!e.endList)return d||"number"!=typeof e.partTargetDuration?(l(`${u} as current playlist is live`),!0):(l(`not ${u} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const c=is(t,i),h=o?la.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:la.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${u} as duration < max low water line (${a} < ${h})`),!0;const p=n.attributes.BANDWIDTH,f=e.attributes.BANDWIDTH;if(p<f&&(!o||c<s)){let e=`${u} as next bandwidth < current bandwidth (${p} < ${f})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${c} < ${s})`),l(e),!0}if((!o||p>f)&&c>=r){let e=`${u} as forwardBuffer >= bufferLowWaterLine (${c} >= ${r})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${f})`),l(e),!0}return l(`not ${u} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:n,bufferHighWaterLine:r
vendor: 3,289 bytes, line 2
2,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",(()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("timeout",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",(()=>{this.trigger("progress")})),this.mainSegmentLoader_.on("error",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on("appenderror",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")})),this.mainSegmentLoader_.on("ended",(()=>{this.logger_("main segment loader ended"),this.onEndOfStream()})),this.timelineChangeController_.on("audioTimelineBehind",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on("fixBadTimelineChange",(()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on("earlyabort",(e=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()})),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(
vendor: 4,092 bytes, line 2
2A.default({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(A.default({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(A.default({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_("skipping fastQualityChange because new media is same as old"):(this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let n=i;if(e.start){const r=e.start.timeOffset;n=r<0?Math.max(i+r,t.start(0)):Math.min(i,r)}this.trigger("firstplay"),this.tech_.setCurrentTime(n)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(e=>{}))}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Ho.Playlist.playlistEnd(e,t),n=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return i-n<=Yr;const s=r.end(r.length-1);return s-n<=Yr&&i-s<=Yr}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));e.playlistErrors_++;const n=this.mainPlaylistLoader_.main.playlists,r=n.filter(fs),s=1===r.length&&r[0]===e;if(1===n.length&&i!==1/0)return Br.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(s);if(s){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;
vendor: 6,996 bytes, line 2
2n.forEach((i=>{if(i===e)return;const n=i.excludeUntil;void 0!==n&&n!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(Br.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const o=this.selectPlaylist();if(!o)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");const l=t.internal?this.logger_:Br.log.warn,u=t.message?" "+t.message:"";l(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${u} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const d=o.targetDuration/2*1e3||5e3,c="number"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,"exclude",s||c)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],n="all"===e;(n||"main"===e)&&i.push(this.mainPlaylistLoader_);const r=[];(n||"audio"===e)&&r.push("AUDIO"),(n||"subtitle"===e)&&(r.push("CLOSED-CAPTIONS"),r.push("SUBTITLES")),r.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),["main","audio","subtitle"].forEach((t=>{const n=this[`${t}SegmentLoader_`];!n||e!==t&&"all"!==e||i.push(n)})),i.forEach((e=>t.forEach((t=>{"function"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=Qr(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Ho.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const n=this.syncController_.getMediaSequenceSync(t);if(n&&n.isReliable){const e=n.start,t=n.end;if(!isFinite(e)||!isFinite(t))return null;const r=Ho.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Gr([[e,Math.max(e,t-r)]])}const r=this.syncController_.getExpiredTime(i,this.duration());if(null===r)return null;const s=Ho.Playlist.seekable(i,r,Ho.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return s.length?s:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),n=e.end(0),r=t.start(0),s=t.end(0);return r>n||i>s?e:Gr([[Math.max(i,r),Math.min(n,s)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Jr(this.seekable_)}]`);const n={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:n}),this.tech_.trigger("seekablechanged")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Ho.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((e=>{e.playlistLoader&&e.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()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=Ms(this.main(),t),n={},r=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(n.video=i.video||e.main.videoCodec||d.DEFAULT_VIDEO_CODEC),e.main.isMuxed&&(n.video+=`,${i.audio||e.main.audioCodec||d.DEFAULT_AUDIO_CODEC}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||r)&&(n.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||d.DEFAULT_AUDIO_CODEC,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!n.audio&&!n.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});const s=(e,t)=>e?d.browserSupportsCodec(t,this.usingManagedMediaSource_):d.muxerSupportsCodec(t),a={};let o;if(["video","audio"].forEach((function(t){if(n.hasOwnProperty(t)&&!s(e[t].isFmp4,n[t])){const i=e[t].isFmp4?"browser":"muxer";a[i]=a[i]||[],a[i].push(n[t]),"audio"===t&&(o=i)}})),r&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;
2this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): "${n.audio}"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if(["video","audio"].forEach((t=>{const i=(d.parseCodecs(this.sourceUpdater_.codecs[t]||"")[0]||{}).type,r=(d.parseCodecs(n[t]||"")[0]||{}).type;i&&r&&i.toLowerCase()!==r.toLowerCase()&&e.push(`"${this.sourceUpdater_.codecs[t]}" -> "${n[t]}"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0})}return n}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=", "),e+`${t} does not support codec(s): "${a[t].join(",")}"`)),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if("open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const n=e[i];if(-1!==t.indexOf(n.id))return;t.push(n.id);const r=Ms(this.main,n),s=[];!r.audio||d.muxerSupportsCodec(r.audio)||d.browserSupportsCodec(r.audio,this.usingManagedMediaSource_)||s.push(`audio codec ${r.audio}`),!r.video||d.muxerSupportsCodec(r.video)||d.browserSupportsCodec(r.video,this.usingManagedMediaSource_)||s.push(`video codec ${r.video}`),r.text&&"stpp.ttml.im1t"===r.text&&s.push(`text codec ${r.text}`),s.length&&(n.excludeUntil=1/0,this.logger_(`excluding ${n.id} for unsupported: ${s.join(", ")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,n=Ds(d.parseCodecs(e)),r=Os(n),s=n.video&&d.parseCodecs(n.video)[0]||null,a=n.audio&&d.parseCodecs(n.audio)[0]||null;
vendor: 7,555 bytes, line 2
2Object.keys(i).forEach((e=>{const n=i[e];if(-1!==t.indexOf(n.id)||n.excludeUntil===1/0)return;t.push(n.id);const o=[],l=Ms(this.mainPlaylistLoader_.main,n),u=Os(l);if(l.audio||l.video){if(u!==r&&o.push(`codec count "${u}" !== "${r}"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&d.parseCodecs(l.video)[0]||null,t=l.audio&&d.parseCodecs(l.audio)[0]||null;e&&s&&e.type.toLowerCase()!==s.type.toLowerCase()&&o.push(`video codec "${e.type}" !== "${s.type}"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec "${t.type}" !== "${a.type}"`)}o.length&&(n.excludeUntil=1/0,this.logger_(`excluding ${n.id}: ${o.join(" && ")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let n,r=i;for(let i=0;i<e.segments.length;i++){const s=e.segments[i];if(n||(n=So(t,r+s.duration/2)),n){if("cueIn"in s){n.endTime=r,n.adEndTime=r,r+=s.duration,n=null;continue}if(r<n.endTime){r+=s.duration;continue}n.endTime+=s.duration}else if("cueOut"in s&&(n=new _.default.VTTCue(r,r+s.duration,s.cueOut),n.adStartTime=r,n.adEndTime=r+parseFloat(s.cueOut),t.addCue(n)),"cueOutCont"in s){const[e,i]=s.cueOutCont.split("/").map(parseFloat);n=new _.default.VTTCue(r,r+s.duration,""),n.adStartTime=r-e,n.adEndTime=n.adStartTime+i,t.addCue(n)}r+=s.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=la.GOAL_BUFFER_LENGTH,i=la.GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,la.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,n)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=la.BUFFER_LOW_WATER_LINE,i=la.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,la.MAX_BUFFER_LOW_WATER_LINE),r=Math.max(t,la.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?r:n)}bufferHighWaterLine(){return la.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){qa(this.inbandTextTracks_,"com.apple.streaming",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const n=_.default.WebKitDataCue||_.default.VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Fa.has(t))continue;const r=new n(e.startTime,e.endTime,"");r.id=e.id,r.type="com.apple.quicktime.HLS",r.value={key:ja[t],data:e[t]},"scte35Out"!==t&&"scte35In"!==t||(r.value.data=new Uint8Array(r.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(r)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const n=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();qa(this.inbandTextTracks_,e,this.tech_),(({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:n})=>{if(!t)return;const r=_.default.WebKitDataCue||_.default.VTTCue,s=e.metadataTrack_;if(!s)return;if(t.forEach((e=>{const t=e.cueTime+i;!("number"!=typeof t||_.default.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new r(t,t,e.value||e.url||e.data||"");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(Br.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key)},value:{get:()=>(Br.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data)},privateData:{get:()=>(Br.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data)}})}(i),s.addCue(i)}))})),!s.cues||!s.cues.length)return;const a=s.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),u=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));u.forEach(((e,t)=>{const i=l[e],r=isFinite(n)?n:e,s=Number(u[t+1])||r;i.forEach((e=>{e.endTime=s}))}))})({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:n,videoDuration:i})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one("canplay",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(A.default({},e))}))})),"dash"===this.sourceType_&&this.mainPlaylistLoader_.on("loadedplaylist",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const n of e.playlists){const e=n.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let n=!1;Object.keys(t).forEach((r=>{const s=t[r],a=this.pathwayAttribute_(s),o=a&&e!==a;s.excludeUntil===1/0&&"content-steering"===s.lastExcludeReason_&&!o&&(delete s.excludeUntil,delete s.lastExcludeReason_,n=!0);const l=!s.excludeUntil&&s.excludeUntil!==1/0;!i.has(s.id)&&o&&l&&(i.add(s.id),s.excludeUntil=1/0,s.lastExcludeReason_="content-steering",this.logger_(`excluding ${s.id} for ${s.lastExcludeReason_}`))})),"DASH"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(n=!0)}})),n&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,n]of t.entries())i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(n),this.contentSteeringController_.excludePathway(e));for(const[n,r]of i.entries()){const i=t.get(n);i?this.equalPathwayClones_(i,r)||(this.mainPlaylistLoader_.updateOrDeleteClone(r,!0),this.contentSteeringController_.addAvailablePathway(n)):(e.filter((e=>e.attributes["PATHWAY-ID"]===r["BASE-ID"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(r,e)})),this.contentSteeringController_.addAvailablePathway(n))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;const i=e["URI-REPLACEMENT"].PARAMS,n=t["URI-REPLACEMENT"].PARAMS;for(const e in i)if(i[e]!==n[e])return!1;for(const e in n)if(i[e]!==n[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),"DASH"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t="non-usable";
vendor: 11,446 bytes, line 2
2this.mainPlaylistLoader_.main.playlists.forEach((i=>{const n=this.mainPlaylistLoader_.getKeyIdSet(i);n&&n.size&&n.forEach((n=>{const r="usable",s=this.keyStatusMap_.has(n)&&this.keyStatusMap_.get(n)===r,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;s?s&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${n} is ${r}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${n} doesn't exist in the keyStatusMap or is not ${r}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,n=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&n&&(delete e.excludeUntil,Br.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}addKeyStatus_(e,t){const i=("string"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,"0"))).join("")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class Wo{constructor(e,t,i){const{playlistController_:n}=e,r=n.fastQualityChange_.bind(n);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}var s,a,o;this.codecs=Ms(n.main(),t),this.playlist=t,this.id=i,this.enabled=(s=e.playlists,a=t.id,o=r,e=>{const t=s.main.playlists[a],i=ps(t),n=fs(t);if(void 0===e)return n;e?delete t.disabled:t.disabled=!0;const r={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:"fast-quality"};return e===n||i||(e?(o(t),s.trigger({type:"renditionenabled",metadata:r})):s.trigger({type:"renditiondisabled",metadata:r})),e})}}const Go=["seeking","seeked","pause","playing","error"];class Xo extends Br.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=zr("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),n=()=>this.techWaiting_(),r=()=>this.resetTimeUpdate_(),s=this.playlistController_,a=["main","subtitle","audio"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},s[`${e}SegmentLoader_`].on("appendsdone",o[e].updateend),s[`${e}SegmentLoader_`].on("playlistupdate",o[e].reset),this.tech_.on(["seeked","seeking"],o[e].reset)}));const l=e=>{["main","audio"].forEach((t=>{s[`${t}SegmentLoader_`][e]("appended",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l("off"))},this.clearSeekingAppendCheck_=()=>l("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",n),this.tech_.on(Go,r),this.tech_.on("canplay",i),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",n),this.tech_.off(Go,r),this.tech_.off("canplay",i),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),a.forEach((e=>{s[`${e}SegmentLoader_`].off("appendsdone",o[e].updateend),s[`${e}SegmentLoader_`].off("playlistupdate",o[e].reset),this.tech_.off(["seeked","seeking"],o[e].reset)})),this.checkCurrentTimeTimeout_&&_.default.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&_.default.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=_.default.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],n=i.buffered_(),r=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],n);if(this[`${e}Buffered_`]=n,r){const i={bufferedRanges:n};return t.trigger({type:"bufferedrangeschanged",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:es(n)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),"subtitle"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Yr>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Gr([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(i=e.end(e.length-1)),this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:Yr)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Jr(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const n=this.playlistController_.sourceUpdater_,r=this.tech_.buffered(),s=n.audioBuffer?n.audioBuffered():null,a=n.videoBuffer?n.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Xr),u=[s,a];for(let e=0;e<u.length;e++)if(u[e]&&is(u[e],t)<l)return!1;const d=Zr(r,t);return 0!==d.length&&(i=d.start(0)+Yr,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Qr(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,n=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const r=Zr(n,t);return r.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${r.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,n=!1){if(!e.length)return!1;let r=e.end(e.length-1)+Yr;const s=!i.endList,a="number"==typeof i.partTargetDuration;return s&&(a||n)&&(r=e.end(e.length-1)+3*i.targetDuration),t>r}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let n;if(e.length&&t.length){const r=Qr(e,i-3),s=Qr(e,i),a=Qr(t,i);a.length&&!s.length&&r.length&&(n={start:r.end(0),end:a.end(0)})}else Zr(e,i).length||(n=this.gapFromVideoUnderflow_(e,i));return!!n&&(this.logger_(`Encountered a gap in video from ${n.start} to ${n.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),n=Zr(t,i);if(this.resetTimeUpdate_(),0===n.length||i!==e)return;this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",n.start(0)),this.tech_.setCurrentTime(n.start(0)+Xr);const r={gapInfo:{from:i,to:n.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:r}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Gr();const t=[];for(let i=1;i<e.length;i++){const n=e.end(i-1),r=e.start(i);t.push([n,r])}return Gr(t)}(e);for(let e=0;e<i.length;e++){const n=i.start(e),r=i.end(e);if(t-n<4&&t-n>2)return{start:n,end:r}}return null}}const Yo={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Ko=function(e,t){let i=0,n=0;const r=Wr(Yo,t);e.ready((()=>{e.trigger({type:"usage",name:"vhs-error-reload-initialized"})}));const s=function(){n&&e.currentTime(n)},a=function(t){null!=t&&(n=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",s),e.src(t),e.trigger({type:"usage",name:"vhs-error-reload"}),e.play())},o=function(){if(Date.now()-i<1e3*r.errorInterval)e.trigger({type:"usage",name:"vhs-error-reload-canceled"});else{if(r.getSource&&"function"==typeof r.getSource)return i=Date.now(),r.getSource.call(e,a);Br.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},l=function(){e.off("loadedmetadata",s),e.off("error",o),e.off("dispose",l)};e.on("error",o),e.on("dispose",l),e.reloadSourceOnError=function(t){l(),Ko(e,t)}};var Qo="3.17.0";const Zo={PlaylistLoader:Vs,Playlist:bs,utils:ea,STANDARD_PLAYLIST_SELECTOR:Ua,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(bs.isEnabled);return Ma(e,((e,t)=>
2Ra(e,t))),e.filter((e=>!!Ms(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Ua,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let n=this.useDevicePixelRatio&&_.default.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(n=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Na({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(Oa(this.tech_.el(),"width"),10)*n,playerHeight:parseInt(Oa(this.tech_.el(),"height"),10)*n,playerObjectFit:this.usePlayerObjectFit?Oa(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Ra,comparePlaylistResolution:function(e,t){let i,n;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||_.default.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),n=n||_.default.Number.MAX_VALUE,i===n&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-n},xhr:zs()};Object.keys(la).forEach((e=>{Object.defineProperty(Zo,e,{get:()=>(Br.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),la[e]),set(t){Br.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),"number"!=typeof t||t<0?Br.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):la[e]=t}})}));const Jo="videojs-vhs",el=function(e,t){const i=t.media();let n=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){n=t;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})};Zo.canPlaySource=function(){return Br.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const tl=()=>{if(!_.default.localStorage)return null;const e=_.default.localStorage.getItem(Jo);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},il=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},nl=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},rl=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sl=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Zo.supportsNativeHls=function(){if(!b.default||!b.default.createElement)return!1;const e=b.default.createElement("video");return!!Br.getTech("Html5").isSupported()&&["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Zo.supportsNativeDash=!!(b.default&&b.default.createElement&&Br.getTech("Html5").isSupported())&&/maybe|probably/i.test(b.default.createElement("video").canPlayType("application/dash+xml")),Zo.supportsTypeNatively=e=>"hls"===e?Zo.supportsNativeHls:"dash"===e&&Zo.supportsNativeDash,Zo.isSupported=function(){return Br.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},Zo.xhr.onRequest=function(e){il(Zo.xhr,e)},Zo.xhr.onResponse=function(e){nl(Zo.xhr,e)},Zo.xhr.offRequest=function(e){rl(Zo.xhr,e)},Zo.xhr.offResponse=function(e){sl(Zo.xhr,e)};const al=Br.getComponent("Component");class ol extends al{constructor(e,t,i){if(super(t,i.vhs),"number"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=zr("VhsHandler"),t.options_&&t.options_.playerId){const e=Br.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(b.default,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(e=>{const t=b.default.fullscreenElement||b.default.webkitFullscreenElement||b.default.mozFullScreenElement||b.default.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,"error",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=Wr(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||
vendor: 8,818 bytes, line 2
2!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,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,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,"number"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=tl();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=la.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===la.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;"number"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(i.substring(i.indexOf(",")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Zo,this.options_.sourceType=c.simpleTypeFromSourceType(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new zo(this.options_);const n=Wr({liveRangeSafeTimeDelta:Yr},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new Xo(n),this.attachStreamingEventListeners_(),this.playlistController_.on("error",(()=>{const e=Br.players[this.tech_.options_.playerId];let t=this.playlistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const r=this.options_.bufferBasedABR?Zo.movingAverageBandwidthSelector(.55):Zo.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):r.bind(this),this.playlistController_.selectInitialPlaylist=Zo.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=_.default.navigator.connection||_.default.navigator.mozConnection||_.default.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const n=1e3*t.downlink*1e3;e=n>=i&&e>=i?Math.max(e,n):n}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;return t=this.throughput>0?1/this.throughput:0,Math.floor(1/(e+t))},set(){Br.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:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>es(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>es(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!_.default.localStorage)return!1;let t=tl();t=t?Wr(t,e):e;try{_.default.localStorage.setItem(Jo,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on("selectedinitialmedia",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=_s(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!ps(e))).map(((t,i)=>new Wo(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",(()=>{this.setupEme_()})),this.on(this.playlistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.playlistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=_.default.URL.createObjectURL(this.playlistController_.mediaSource),(Br.browser.IS_ANY_SAFARI||Br.browser.IS_IOS)&&this.options_.overrideNative&&"hls"===this.options_.sourceType&&"function"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),(({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:n})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const r=(o=i?n.concat([i]):n,l=Object.keys(t),o.reduce(((e,t)=>{if(!t.contentProtection)return e;const i=l.reduce(((e,i)=>{const n=t.contentProtection[i];return n&&n.pssh&&(e[i]={pssh:n.pssh}),e}),{});return Object.keys(i).length&&e.push(i),e}),[])),s=[],a=[];var o,l;return r.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one("keysessioncreated",t)}))),s.push(new Promise(((i,n)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?n(e):i()}))})))})),Promise.race([Promise.all(s),Promise.race(a)])})({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_("error while creating EME key session",e),this.player_.error({message:"Failed to initialize media ke
2ys for EME",code:3})}))}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=(({player:e,sourceKeySystems:t,media:i,audioMedia:n})=>{const r=((e,t,i)=>{if(!e)return e;let n={};t&&t.attributes&&t.attributes.CODECS&&(n=Ds(d.parseCodecs(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(n.audio=i.attributes.CODECS);const r=d.getMimeForCodec(n.video),s=d.getMimeForCodec(n.audio),a={};for(const i in e)a[i]={},s&&(a[i].audioContentType=s),r&&(a[i].videoContentType=r),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),"string"==typeof e[i]&&(a[i].url=e[i]);return Wr(e,a)})(t,i,n);return!(!r||(e.currentSource().keySystems=r,r&&!e.eme&&(Br.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:e&&e.media()});this.player_.tech_.on("keystatuschange",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=Br.players[this.tech_.options_.playerId];
vendor: 4,180 bytes, line 2
2e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),el(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on("mediachange",(()=>{el(this.qualityLevels_,this.playlists)})))}static version(){return{"@videojs/http-streaming":Qo,"mux.js":"7.1.0","mpd-parser":"1.3.1","m3u8-parser":"7.2.0","aes-decrypter":"4.0.2"}}version(){return this.constructor.version()}canChangeType(){return yo.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&_.default.URL.revokeObjectURL&&(_.default.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return(({playlist:e,time:t,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!e||void 0===t)return i({message:"getProgramTime: playlist and time must be provided"});const n=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,n=0;for(let r=0;r<t.segments.length&&(i=t.segments[r],n=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:n+i.duration,!(e<=n));r++);const r=t.segments[t.segments.length-1];if(r.videoTimingInfo&&r.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>n){if(e>n+.25*r.duration)return null;i=r}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:n-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}})(t,e);if(!n)return i({message:"valid programTime was not found"});if("estimate"===n.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:n.estimatedStart});const r={mediaSeconds:t},s=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,n=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*n)})(t,n.segment);return s&&(r.programDateTime=s.toISOString()),i(null,r)})({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,n=2){return ta({programTime:e,playlist:this.playlistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{il(this.xhr,e)},this.xhr.onResponse=e=>{nl(this.xhr,e)},this.xhr.offRequest=e=>{rl(this.xhr,e)},this.xhr.offResponse=e=>{sl(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(A.default({},e))}))})),["gapjumped","playedrangeschanged"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(A.default({},e))}))}))}}const ll={name:"videojs-http-streaming",VERSION:Qo,canHandleSource(e,t={}){const i=Wr(Br.options,t);return!(!i.vhs.experimentalUseMMS&&!d.browserSupportsCodec("avc1.4d400d,mp4a.40.2",!1))&&ll.canPlayType(e.type,i)},handleSource(e,t,i={}){const n=Wr(Br.options,i);return t.vhs=new ol(e,t,n),t.vhs.xhr=zs(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=c.simpleTypeFromSourceType(e);if(!i)return"";const n=ll.getOverrideNative(t);return!Zo.supportsTypeNatively(i)||n?"maybe":""},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(Br.browser.IS_ANY_SAFARI||Br.browser.IS_IOS),{overrideNative:n=i}=t;return n}};d.browserSupportsCodec("avc1.4d400d,mp4a.40.2",!0)&&Br.getTech("Html5").registerSourceHandler(ll,0),Br.VhsHandler=ol,Br.VhsSourceHandler=ll,Br.Vhs=Zo,Br.use||Br.registerComponent("
2Vhs",Zo),Br.options.vhs=Br.options.vhs||{},Br.getPlugin&&Br.getPlugin("reloadSourceOnError")||Br.registerPlugin("reloadSourceOnError",(function(e){Ko(this,e)})),e.exports=Br},3805:function(e,t,i){e.exports=function(e,t,i){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t,i=i&&i.hasOwnProperty("default")?i.default:i;var n="7.5.2";var r=function(e,t){t.isImmediatePropagationStopped=function(){return!0},t.cancelBubble=!0,t.isPropagationStopped=function(){return!0}},s=function(e,t,i){r(0,i),e.trigger({type:t+i.type,originalEvent:i})};function a(e){"playing"===e.type?function(e,t){e.ads.isInAdMode()&&(e.ads.isContentResuming()?e.ads._contentEnding&&s(e,"content",t):s(e,"ad",t))}(this,e):"ended"===e.type?function(e,t){e.ads.isInAdMode()?e.ads.isContentResuming()?(r(0,t),e.trigger("resumeended")):s(e,"ad",t):e.ads._contentHasEnded||e.ads.stitchedAds()||(s(e,"content",t),e.trigger("readyforpostroll"))}(this,e):"loadstart"===e.type||"loadeddata"===e.type||"loadedmetadata"===e.type?function(e,t){if(!("loadstart"===t.type&&!e.ads._hasThereBeenALoadStartDuringPlayerLife||"loadeddata"===t.type&&!e.ads._hasThereBeenALoadedData||"loadedmetadata"===t.type&&!e.ads._hasThereBeenALoadedMetaData))if(e.ads.inAdBreak())s(e,"ad",t);else{if(e.currentSrc()!==e.ads.contentSrc)return;s(e,"content",t)}}(this,e):"play"===e.type?function(e,t){e.ads.inAdBreak()?s(e,"ad",t):e.ads.isContentResuming()&&s(e,"content",t)}(this,e):this.ads.isInAdMode()&&(this.ads.isContentResuming()?s(this,"content",e):s(this,"ad",e))}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(this,arguments)}function l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u(e,t)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}var d={},c=function(){(function(){if(e.dom.isInFrame()&&"function"!=typeof t.__tcfapi){for(var i,n=t,r={};n;){try{if(n.frames.__tcfapiLocator){i=n;break}}catch(e){}if(n===t.top)break;n=n.parent}if(!i)return;t.__tcfapi=function(e,t,n,s){var a=Math.random()+"",o={__tcfapiCall:{command:e,parameter:s,version:t,callId:a}};r[a]=n,i.postMessage(o,"*")},t.addEventListener("message",(function(e){var t={};try{t="string"==typeof e.data?JSON.parse(e.data):e.data}catch(e){}var i=t.__tcfapiReturn;i&&"function"==typeof r[i.callId]&&(r[i.callId](i.returnValue,i.success),r[i.callId]=null)}),!1)}})(),"function"==typeof t.__tcfapi&&t.__tcfapi("addEventListener",2,(function(e,t){t&&(d=e)}))},h="",p=function(e,i){if(void 0===i&&(i=t),i.__uspapi)i.__uspapi("getUSPData",1,(function(t,i){var n=i?t.uspString:null;h=n,e(n)}));else{var n=function(e){for(var t=e.parent;t!==e.top;){try{if(t.frames&&t.frames.__uspapiLocator)return t}catch(e){}t=t.parent}try{if(e.top.frames&&e.top.frames.__uspapiLocator)return e.top}catch(e){}return null}(i);if(!n)return void e(null);var r=Math.random().toString(36).substring(2),s={__uspapiCall:{command:"getUSPData",version:1,callId:r}};i.addEventListener("message",(function t(n){if(n&&n.data&&n.data.__uspapiReturn&&n.data.__uspapiReturn.callId===r){i.removeEventListener("message",t,!1);var s=n.data.__uspapiReturn,a=s.returnValue,o=s.success?a.uspString:null;h=o,e(o)}}),!1),n.postMessage(s,"*")}},f={AdsBeforePrerollError:"ads-before-preroll-error",AdsPrerollError:"ads-preroll-error",AdsMidrollError:"ads-midroll-error",AdsPostrollError:"ads-postroll-error",AdsMacroReplacementFailed:"ads-macro-replacement-failed",AdsResumeContentFailed:"ads-resume-content-failed"},g=function(e,t){return t?encodeURIComponent(e):e},m=function(e,t){var i={};return["description","tags","reference_id","ad_keys"].forEach((function(n){e&&e[n]?i["{mediainfo."+n+"}"]=e[n]:t["{mediainfo."+n+"}"]?i["{mediainfo."+n+"}"]=t["{mediainfo."+n+"}"]:i["{mediainfo."+n+"}"]=""})),["custom_fields","customFields"].forEach((function(t){!function(e,t,i){if(e&&e[i])for(var n=e[i],r=Object.keys(n),s=0;s<r.length;s++)t["{mediainfo."+i+"."+r[s]+"}"]=n[r[s]]}(e,i,t)})),i},y=function(t,i,n,r,s){for(var a in void 0===r&&(r={}),i){var o=r.hasOwnProperty(a)?r[a]:a;if(o.startsWith("r:"))try{var l=new RegExp(o.slice(2),"g");t=t.replace(l,g(i[a],n))}catch(t){s.ads.error({errorType:f.AdsMacroReplacementFailed,macro:a,error:t}),e.log.warn('Unable to replace macro with regex "'+o+'". The provided regex may be invalid.')}else t=t.split(o).join(g(i[a],n))}return t};function v(n,r,s){void 0===r&&(r=!1),void 0===s&&(s={});var a=s.disableDefaultMacros||!1,l=s.macroNameOverrides||{};delete s.disableDefaultMacros,delete s.macroNameOverrides;var u=s;if(a)return y(n,u,r,l);var c,p=function(e){var t={},i=e.replace(/{([^}=]+)=([^}]*)}/g,(function(e,i,n){return t["{"+i+"}"]=n,"{"+i+"}"}));return{defaults:t,modifiedString:i}}(n),f=p.defaults,g=p.modifiedString;for(var v in n=g,o(u,{"{player.id}
2":(c=this).options_["data-player"]||c.id_,"{player.height}":c.currentHeight(),"{player.width}":c.currentWidth(),"{player.heightInt}":Math.round(c.currentHeight()),"{player.widthInt}":Math.round(c.currentWidth()),"{player.autoplay}":c.autoplay()?1:0,"{player.muted}":c.muted()?1:0,"{player.language}":c.language()||"","{mediainfo.id}":c.mediainfo?c.mediainfo.id:"","{mediainfo.name}":c.mediainfo?c.mediainfo.name:"","{mediainfo.duration}":c.mediainfo?c.mediainfo.duration:"","{player.duration}":c.duration(),"{player.durationInt}":Math.round(c.duration()),"{player.live}":c.duration()===1/0?1:0,"{player.pageUrl}":e.dom.isInFrame()?i.referrer:t.location.href,"{playlistinfo.id}":c.playlistinfo?c.playlistinfo.id:"","{playlistinfo.name}":c.playlistinfo?c.playlistinfo.name:"","{timestamp}":(new Date).getTime(),"{document.referrer}":i.referrer,"{window.location.href}":t.location.href,"{random}":Math.floor(1e12*Math.random())},m(this.mediainfo,f),function(e){var t={};return Object.keys(e).forEach((function(i){t["{tcf."+i+"}"]=e[i]})),t["{tcf.gdprAppliesInt}"]=e.gdprApplies?1:0,t}(d),{"{usp.uspString}":h},function(i,n,r){var s=new RegExp("{pageVariable\\.([^}]+)}","g"),a={},o=(i.match(s)||[]).concat(Object.keys(r).filter((function(e){return s.test(e)&&i.includes(r[e])})));if(o)return o.forEach((function(i){for(var r,s=i,o=i.slice(14,-1),l=o.split("."),u=t,d=0;d<l.length;d++)if(d===l.length-1)r=u[l[d]];else if(void 0===(u=u[l[d]]))break;var c=typeof r;null===r?a[s]="null":void 0===r?n[s]?a[s]=n[s]:(e.log.warn('Page variable "'+o+'" not found'),a[s]=""):"string"!==c&&"number"!==c&&"boolean"!==c?(e.log.warn('Page variable "'+o+'" is not a supported type'),a[s]=""):a[s]=r})),a}(n,f,l)),n=y(n,u,r,l,this),f)n=n.replace(v,f[v]);return n}var _={processMetadataTracks:function(e,t){for(var i=e.textTracks(),n=function(i){"metadata"===i.kind&&(e.ads.cueTextTracks.setMetadataTrackMode(i),t(e,i))},r=0;r<i.length;r++)n(i[r]);i.addEventListener("addtrack",(function(e){n(e.track)}))},setMetadataTrackMode:function(e){},getSupportedAdCue:function(e,t){return t},isSupportedAdCue:function(e,t){return!0},getCueId:function(e,t){return t.id}},b=function(e,t){return void 0!==t&&e.ads.includedCues[t]},T=function(e,t){void 0!==t&&""!==t&&(e.ads.includedCues[t]=!0)};function S(){!1!==this.ads._shouldBlockPlay&&(this.paused()||(this.ads.debug("Playback was canceled by cancelContentPlay"),this.pause()),this.ads._cancelledPlay=!0)}_.processAdTrack=function(t,i,n,r){t.ads.includedCues={};for(var s=0;s<i.length;s++){var a=i[s],o=this.getSupportedAdCue(t,a);if(!this.isSupportedAdCue(t,a))return void e.log.warn("Skipping as this is not a supported ad cue.",a);var l=this.getCueId(t,a),u=a.startTime;if(b(t,l))return void e.log("Skipping ad already seen with ID "+l);r&&r(t,o,l,u),n(t,o,l,u),T(t,l)}};var A={},w=e;A.isMiddlewareMediatorSupported=function(){return!w.browser.IS_IOS&&!w.browser.IS_ANDROID&&!!(w.use&&w.middleware&&w.middleware.TERMINATOR)},A.playMiddleware=function(t){return{setSource:function(e,t){t(null,e)},callPlay:function(){if(t.ads&&!0===t.ads._shouldBlockPlay)return t.ads.debug("Using playMiddleware to block content playback"),t.ads._playBlocked=!0,w.middleware.TERMINATOR},play:function(i,n){t.ads&&t.ads._playBlocked&&i?(t.ads.debug("Play call to Tech was terminated."),t.trigger("play"),t.addClass("vjs-has-started"),t.ads._playBlocked=!1):n&&n.catch&&n.catch((function(i){"NotAllowedError"!==i.name||e.browser.IS_SAFARI||t.trigger("pause")}))}}},A.testHook=function(e){w=e};var E=A.playMiddleware,C=A.isMiddlewareMediatorSupported;var k={src:"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAAxJtZGF03ABMYXZjNjEuMy4xMDAAQiAIwRg4AAACrgYF//+q3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2NCByMzEwOCAzMWUxOWY5IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMyAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0zIGJfcHlyYW1pZD0yIGJfYWRhcHQ9MSBiX2JpYXM9MCBkaXJlY3Q9MSB3ZWlnaHRiPTEgb3Blbl9nb3A9MCB3ZWlnaHRwPTIga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAAn//71sXwKaunqigzoMi7hlyTJrrYi4m0AwABFxzcqWKGahTaoBcQAAMWK4AlcFlIICBeldSEQBGCMHAAABVNtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAAIgABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAACQXRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAIgAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAABQAAAAPAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAACIAAAAAAAEAAAAAAbltZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAADwAAAACAFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAFkbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABJHN0YmwAAADAc3RzZAAAAAAAAAABAAAAsGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAABQADwAEgAAABIAAAAAAAAAAEUTGF2YzYxLjMuMTAwIGxpYngyNjQAAAAAAAAAAAAAAAAY//8AAAA2YXZjQwFkAA3/4QAZZ2QADazZQUH7ARAAAAMAEAAAAwPA8UKZYAEABmjr48siwP34+AAAAAAQcGFzcAAAAAEAAAABAAAAFGJ0cnQAAAAAAALAEAACwBAAAAAYc3R0cwAAAAAAAAABAAAAAQAAAgAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAAC7wAAAAEAAAAUc3RjbwAAAAAAAAABAAAARQAAAj10cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAAABgAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAAXAAAEAAABAAAAAAG1bWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAACsRAAACABVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAABYG1pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABJHN0YmwAAAB+c3RzZAAAAAAAAAABAAAAbm1wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAACsRAAAAAAANmVzZHMAAAAAA4CAgCUAAgAEgICAF0AVAAAAAAH0AAAAEisFgICABRIQVuUABoCAgAECAAAAFGJ0cnQAAAAAAAH0AAAAEisAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAAVAAAABgAAABhzdGNvAAAAAAAAAAIAAAAwAAADNAAAABpzZ3BkAQAAAHJvbGwAAAACAAAAAf//AAAAHHNiZ3AAAAAAcm9sbAAAAAEAAAACAAAAAQAAAGF1ZHRhAAAAWW1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALGlsc3QAAAAkqXRvbwAAABxkYXRhAAAAAQAAAABMYXZmNjEuMS4xMDA=",type:"video/mp4"},I=function(){function e(){}return e.getState=function(t){if(t)return e.states_&&e.states_[t]?e.states_[t]:void 0},e.registerState=function(t,i){if("string"!=typeof t||!t)throw new Error('Illegal state name, "'+t+'"; must be a non-empty string.');return e.states_||(e.states_={}),e.states_[t]=i,i},e}(),x=function(){function t(e){this.player=e}t._getName=function(){return"Anonymous State"};var i=t.prototype;return i.transitionTo=function(e){var t=this.player;this.cleanup(t);var i=new e(t);t.ads._state=i,t.ads.debug(this.constructor._getName()+" -> "+i.constructor._getName());for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];i.init.apply(i,[t].concat(r))},i.init=function(){},i.cleanup=function(){},i.onPlay=function(){},i.onPlaying=function(){},i.onEnded=function(){},i.onAdEnded=function(){},i.onAdsReady=function(){e.log.warn("Unexpected adsready event")},i.onAdsError=function(){},i.onAdsCanceled=function(){},i.onAdTimeout=function(){},i.onAdStarted=function(){},i.onAdSkipped=function(){},i.onContentChanged=function(){},i.onContentResumed=function(){},i.onReadyForPostroll=function(){e.log.warn("Unexpected readyforpostroll event")},i.onNoPreroll=function(){},i.onNoPostroll=function(){},i.startLinearAdMode=function(){e.log.warn("Unexpected startLinearAdMode invocation (State via "+this.constructor._getName()+")")},i.endLinearAdMode=function(){e.log.warn("Unexpected endLinearAdMode invocation (State via "+this.constructor._getName()+")")},i.skipLinearAdMode=function(){e.log.warn("Unexpected skipLinearAdMode invocation (State via "+this.constructor._getName()+")")},i.isAdState=function(){throw new Error("isAdState unimplemented for "+this.constructor._getName())},i.isWaitingForAdBreak=function(){return!1},i.isContentResuming=function(){return!1},i.inAdBreak=function(){return!1},i.handleEvent=function(e){var t=this.player;"play"===e?this.onPlay(t):"adsready"===e?this.onAdsReady(t):"adserror"===e?this.onAdsError(t):"adscanceled"===e?this.onAdsCanceled(t):"adtimeout"===e?this.onAdTimeout(t):"ads-ad-started"===e?this.onAdStarted(t):"ads-ad-skipped"===e?this.onAdSkipped(t):"contentchanged"===e?this.onContentChanged(t):"contentresumed"===e?this.onContentResumed(t):"readyforpostroll"===e?this.onReadyForPostroll(t):"playing"===e?this.onPlaying(t):"ended"===e?this.onEnded(t):"nopreroll"===e?this.onNoPreroll(t):"nopostroll"===e?this.onNoPostroll(t):"adended"===e&&this.onAdEnded(t)},t}();I.registerState("State",x);var P=function(e){function t(t){var i;return(i=e.call(this,t)||this).contentResuming=!1,i.waitingForAdBreak=!1,i}l(t,e);var i=t.prototype;return i.isAdState=function(){return!0},i.onPlaying=function(){var e=I.getState("ContentPlayback");this.contentResuming&&this.transitionTo(e)},i.onContentResumed=function(){var e=I.getState("ContentPlayback");this.contentResuming&&this.transitionTo(e)},i.isWaitingForAdBreak=function(){return this.waitingForAdBreak},i.isContentResuming=function(){return this.contentResuming},i.inAdBreak=function(){return!0===this.player.ads._inLinearAdMode},t}(x);I.registerState("AdState",P);var L=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var i=t.prototype;return i.isAdState=function(){return!1},i.onContentChanged=function(e){var t=I.getState("BeforePreroll"),i=I.getState("Preroll");e.ads.debug("Received contentchanged event (ContentState)"),e.paused()?this.transitionTo(t):(this.transitionTo(i,!1),e.pause(),e.ads._pausedOnContentupdate=!0)},t}(x);I.registerState("ContentState",L);var D,O=function(t){function i(){return t.apply(this,arguments)||this}l(i,t),i._getName=function(){return"AdsDone"};var n=i.prototype;return n.init=function(e){e.ads._contentHasEnded=!0,e.trigger("ended")},n.startLinearAdMode=function(){e.log.warn("Unexpected startLinearAdMode invocation (AdsDone)")},i}(I.getState("ContentState"));I.registerState("AdsDone",O);var M={start:function(t){t.ads.debug("Starting ad break"),t.ads._inLinearAdMode=!0,t.trigger("adstart"),t.ads.shouldTakeSnapshots()&&(t.ads.snapshot=function(t){var i;i=e.browser.IS_IOS&&t.ads.isLive(t)&&t.seekable().length>0?t.currentTime()-t.seekable().end(0):t.currentTime();var n=t.$(".vjs-tech"),r=t.textTracks?t.textTracks():[],s=[],a={ended:t.ended(),currentSrc:t.currentSrc(),sources:t.currentSources(),src:t.tech_.src(),currentTime:i,type:t.currentType()};n&&(a.style=n.getAttribute("style"));for(var o=0;o<r.length;o++){var l=r[o];s.push({track:l,mode:l.mode}),l.mode="disabled"}return a.suppressedTracks=s,a}(t)),t.ads.shouldPlayContentBehindAd(t)&&!t.ads.settings.stitchedAds&&(t.ads.preAdVolume_=t.volume(),t.volume(0)),t.addClass("vjs-ad-playing"),t.hasClass("vjs-live")&&t.removeClass("vjs-live"),t.ads.removeNativePoster(),t.ads.preAdPlaybackRate_=t.playbackRate(),t.playbackRate(1),t.controlBar&&t.controlBar.playbackRateMenuButton&&t.controlBar.playbackRateMenuButton.playbackRateSupported&&!t.controlBar.playbackRateMenuButton.hasClass("vjs-hidden")?(t.controlBar.playbackRateMenuButton.hide(),t.ads.showPlaybackMenuOnAdEnd_=!0):t.ads.showPlaybackMenuOnAdEnd_=!1},end:function(t,i){t.ads.debug("Ending ad break"),void 0===i&&(i=function(){}),t.ads.adType=null,t.ads._inLinearAdMode=!1,t.trigger("adend"),t.removeClass("vjs-ad-playing"),t.ads.isLive(t)&&t.addClass("vjs-live"),t.ads.shouldTakeSnapshots()?function(t,i){var n=t.ads.snapshot;if(void 0===i&&(i=function(){}),!0===t.ads.disableNextSnapshotRestore)return t.ads.disableNextSnapshotRestore=!1,delete t.ads.snapshot,void i();var r,s=t.$(".vjs-tech"),a=20,o=n.suppressedTracks,l=function(){for(var e=0;e<o.length;e++)(r=o[e]).track.mode=r.mode},u=function(){var i;if(e.browser.IS_IOS&&t.ads.isLive(t)){if(n.currentTime<0&&(i=t.seekable().length>0?t.seekable().end(0)+n.currentTime:t.currentTime(),t.currentTime(i)),t.paused()){var r=t.play();r&&r.catch&&r.catch((function(t){e.log.warn("Play promise rejected in IOS snapshot resume",t)}))}}else if(n.ended)t.currentTime(t.duration());else{t.currentTime(n.currentTime);var s=t.play();s&&s.catch&&s.catch((function(t){e.log.warn("Play promise rejected in snapshot resume",t)}))}
vendor: 9,068 bytes, line 2
2t.ads.shouldRemoveAutoplay_&&(t.autoplay(!1),t.ads.shouldRemoveAutoplay_=!1)},d=function i(){if(t.off("contentcanplay",i),D&&t.clearTimeout(D),(s=t.el().querySelector(".vjs-tech")).readyState>1)return u();if(void 0===s.seekable)return u();if(s.seekable.length>0)return u();if(a--)t.setTimeout(i,50);else try{u()}catch(i){t.ads.error({errorType:f.AdsResumeContentFailed,error:i}),e.log.warn("Failed to resume the content after an advertisement",i)}};if("style"in n&&s.setAttribute("style",n.style||""),t.ads.videoElementRecycled())t.one("resumeended",(function(){delete t.ads.snapshot,i()})),t.one("contentloadedmetadata",l),e.browser.IS_IOS&&!t.autoplay()&&"function"==typeof t.techCall_&&(t.techCall_("setAutoplay",!0),t.ads.shouldRemoveAutoplay_=!0),t.src(n.sources),t.one("contentcanplay",d),D=t.setTimeout(d,2e3);else{if(l(),!t.ended()){var c=t.play();c&&c.catch&&c.catch((function(t){e.log.warn("Play promise rejected in snapshot restore",t)}))}delete t.ads.snapshot,i()}}(t,i):(t.ads.preAdVolume_&&t.volume(t.ads.preAdVolume_),i()),t.playbackRate(t.ads.preAdPlaybackRate_),t.ads.showPlaybackMenuOnAdEnd_&&t.controlBar.playbackRateMenuButton.show()}},R=function(t){function i(){return t.apply(this,arguments)||this}l(i,t),i._getName=function(){return"Preroll"};var n=i.prototype;return n.init=function(e,t,i){if(this.waitingForAdBreak=!0,e.addClass("vjs-ad-loading"),i||e.ads.nopreroll_)return this.resumeAfterNoPreroll(e);var n=e.ads.settings.timeout;"number"==typeof e.ads.settings.prerollTimeout&&(n=e.ads.settings.prerollTimeout),this._timeout=e.setTimeout((function(){e.trigger("adtimeout")}),n),t?this.handleAdsReady():this.adsReady=!1},n.onAdsReady=function(t){t.ads.inAdBreak()?e.log.warn("Unexpected adsready event (Preroll)"):(t.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady())},n.handleAdsReady=function(){this.adsReady=!0,this.readyForPreroll()},n.afterLoadStart=function(e){var t=this.player;t.ads._hasThereBeenALoadStartDuringPlayerLife?e():(t.ads.debug("Waiting for loadstart..."),t.one("loadstart",(function(){t.ads.debug("Received loadstart event"),e()})))},n.noPreroll=function(){var e=this;this.afterLoadStart((function(){e.player.ads.debug("Skipping prerolls due to nopreroll event (Preroll)"),e.resumeAfterNoPreroll(e.player)}))},n.readyForPreroll=function(){var e=this.player;this.afterLoadStart((function(){e.ads.debug("Triggered readyforpreroll event (Preroll)"),e.trigger("readyforpreroll")}))},n.onAdsCanceled=function(e){var t=this;e.ads.debug("adscanceled (Preroll)"),this.afterLoadStart((function(){t.resumeAfterNoPreroll(e)}))},n.onAdsError=function(t){var i=this;e.log("adserror (Preroll)"),t.ads.error({errorType:f.AdsPrerollError}),this.inAdBreak()?t.ads.endLinearAdMode():this.afterLoadStart((function(){i.resumeAfterNoPreroll(t)}))},n.startLinearAdMode=function(){var t=this.player;!this.adsReady||t.ads.inAdBreak()||this.isContentResuming()?e.log.warn("Unexpected startLinearAdMode invocation (Preroll)"):(this.clearTimeout(t),t.ads.adType="preroll",this.waitingForAdBreak=!1,M.start(t),t.ads._shouldBlockPlay=!1)},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(e.removeClass("vjs-ad-loading"),e.addClass("vjs-ad-content-resuming"),this.contentResuming=!0,M.end(e))},n.skipLinearAdMode=function(){var t=this,i=this.player;i.ads.inAdBreak()||this.isContentResuming()?e.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart((function(){i.trigger("adskip"),i.ads.debug("skipLinearAdMode (Preroll)"),t.resumeAfterNoPreroll(i)}))},n.onAdTimeout=function(e){var t=this;this.afterLoadStart((function(){e.ads.debug("adtimeout (Preroll)"),t.resumeAfterNoPreroll(e)}))},n.onNoPreroll=function(t){t.ads.inAdBreak()||this.isContentResuming()?e.log.warn("Unexpected nopreroll event (Preroll)"):this.noPreroll()},n.resumeAfterNoPreroll=function(e){if(this.contentResuming=!0,e.ads._shouldBlockPlay=!1,this.cleanupPartial(e),e.ads._playRequested||e.ads._pausedOnContentupdate)if(e.paused()){e.ads.debug("resumeAfterNoPreroll: attempting to resume playback (Preroll)");var t=e.play();t&&t.then&&t.then(null,(function(e){}))}else e.ads.debug("resumeAfterNoPreroll: already playing (Preroll)"),e.trigger("play"),e.trigger("playing")},n.cleanup=function(t){t.ads._hasThereBeenALoadStartDuringPlayerLife||e.log.warn("Leaving Preroll state before loadstart event can cause issues."),this.cleanupPartial(t)},n.cleanupPartial=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming"),this.clearTimeout(e)},n.clearTimeout=function(e){e.clearTimeout(this._timeout),this._timeout=null},i}(I.getState("AdState"));I.registerState("Preroll",R);var N=function(e){function t(){return e.apply(this,arguments)||this}l(t,e),t._getName=function(){return"BeforePreroll"};var i=t.prototype;return i.init=function(e){this.adsReady=!1,this.shouldResumeToContent=!1,e.ads._shouldBlockPlay=!e.ads.settings.allowVjsAutoplay||!e.autoplay()},i.onAdsReady=function(e){e.ads.debug("Received adsready event (BeforePreroll)"),this.adsReady=!0},i.onPlay=function(e){var t=I.getState("Preroll");e.ads.debug("Received play event (BeforePreroll)"),this.transitionTo(t,this.adsReady,this.shouldResumeToContent)},i.onAdsCanceled=function(e){e.ads.debug("adscanceled (BeforePreroll)"),this.shouldResumeToContent=!0},i.onAdsError=function(){this.player.ads.debug("adserror (BeforePreroll)"),this.player.ads.error({errorType:f.AdsBeforePrerollError}),this.shouldResumeToContent=!0},i.onNoPreroll=function(){this.player.ads.debug("Skipping prerolls due to nopreroll event (BeforePreroll)"),this.shouldResumeToContent=!0},i.skipLinearAdMode=function(){var e=this.player;e.trigger("adskip"),e.ads.debug("skipLinearAdMode (BeforePreroll)"),this.shouldResumeToContent=!0},i.onContentChanged=function(){this.init(this.player)},t}(I.getState("ContentState"));I.registerState("BeforePreroll",N);var U=function(e){function t(){return e.apply(this,arguments)||this}l(t,e),t._getName=function(){return"Midroll"};var i=t.prototype;return i.init=function(e){e.ads.adType="midroll",M.start(e),e.addClass("vjs-ad-loading")},i.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},i.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(this.contentResuming=!0,e.addClass("vjs-ad-content-resuming"),e.removeClass("vjs-ad-loading"),M.end(e))},i.onAdsError=function(e){e.ads.error({errorType:f.AdsMidrollError}),this.inAdBreak()&&e.ads.endLinearAdMode()},i.cleanup=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming")},t}(I.getState("AdState"));I.registerState("Midroll",U);var B=function(t){function i(){return t.apply(this,arguments)||this}l(i,t),i._getName=function(){return"Postroll"};var n=i.prototype;return n.init=function(e){if(this.waitingForAdBreak=!0,e.ads._contentEnding=!0,e.ads.nopostroll_){this.resumeContent(e);var t=I.getState("AdsDone");this.transitionTo(t)}else{e.addClass("vjs-ad-loading");var i=e.ads.settings.timeout;"number"==typeof e.ads.settings.postrollTimeout&&(i=e.ads.settings.postrollTimeout),this._postrollTimeout=e.setTimeout((function(){e.trigger("adtimeout")}),i)}},n.startLinearAdMode=function(){var t=this.player;t.ads.inAdBreak()||this.isContentResuming()?e.log.warn("Unexpected startLinearAdMode invocation (Postroll)"):(t.ads.adType="postroll",t.clearTimeout(this._postrollTimeout),this.waitingForAdBreak=!1,M.start(t))},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this,t=this.player,i=I.getState("AdsDone");this.inAdBreak()&&(t.removeClass("vjs-ad-loading"),this.resumeContent(t),M.end(t,(function(){e.transitionTo(i)})))},n.skipLinearAdMode=function(){var t=this.player;t.ads.inAdBreak()||this.isContentResuming()?e.log.warn("Unexpected skipLinearAdMode invocation"):(t.ads.debug("Postroll abort (skipLinearAdMode)"),t.trigger("adskip"),this.abort(t))},n.onAdTimeout=function(e){e.ads.debug("Postroll abort (adtimeout)"),this.abort(e)},n.onAdsError=function(e){e.ads.debug("Postroll abort (adserror)"),e.ads.error({errorType:f.AdsPostrollError}),e.ads.inAdBreak()?e.ads.endLinearAdMode():this.abort(e)},n.onContentChanged=function(e){if(this.isContentResuming()){var t=I.getState("BeforePreroll");this.transitionTo(t)}else if(!this.inAdBreak()){var i=I.getState("Preroll");this.transitionTo(i)}},n.onNoPostroll=function(t){this.isContentResuming()||this.inAdBreak()?e.log.warn("Unexpected nopostroll event (Postroll)"):this.abort(t)},n.resumeContent=function(e){this.contentResuming=!0,e.addClass("vjs-ad-content-resuming")},n.abort=function(e){var t=I.getState("AdsDone");this.resumeContent(e),e.removeClass("vjs-ad-loading"),this.transitionTo(t)},n.cleanup=function(e){e.removeClass("vjs-ad-content-resuming"),e.clearTimeout(this._postrollTimeout),e.ads._contentEnding=!1},i}(I.getState("AdState"));I.registerState("Postroll",B);var j=function(e){function t(){return e.apply(this,arguments)||this}l(t,e),t._getName=function(){return"ContentPlayback"};var i=t.prototype;return i.init=function(e){e.ads._shouldBlockPlay=!1}
2,i.onAdsReady=function(e){e.ads.debug("Received adsready event (ContentPlayback)"),e.ads.nopreroll_||(e.ads.debug("Triggered readyforpreroll event (ContentPlayback)"),e.trigger("readyforpreroll"))},i.onReadyForPostroll=function(e){var t=I.getState("Postroll");e.ads.debug("Received readyforpostroll event"),this.transitionTo(t)},i.startLinearAdMode=function(){var e=I.getState("Midroll");this.transitionTo(e)},t}(I.getState("ContentState"));I.registerState("ContentPlayback",j);var F=function(e){function t(){return e.apply(this,arguments)||this}l(t,e),t._getName=function(){return"StitchedContentPlayback"};var i=t.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 e=I.getState("StitchedAdRoll");this.transitionTo(e)},t}(I.getState("ContentState"));I.registerState("StitchedContentPlayback",F);var q=function(e){function t(){return e.apply(this,arguments)||this}l(t,e),t._getName=function(){return"StitchedAdRoll"};var i=t.prototype;return i.init=function(){this.waitingForAdBreak=!1,this.contentResuming=!1,this.player.ads.adType="stitched",M.start(this.player)},i.onPlaying=function(){},i.onContentResumed=function(){},i.onAdEnded=function(){this.endLinearAdMode(),this.player.trigger("ended")},i.endLinearAdMode=function(){var e=I.getState("StitchedContentPlayback");M.end(this.player),this.transitionTo(e)},t}(I.getState("AdState"));I.registerState("StitchedAdRoll",q);var H=function(e){function t(){return e.apply(this,arguments)||this}l(t,e),t._getName=function(){return"OutstreamPending"};var i=t.prototype;return i.init=function(e){this.adsReady=!1},i.onPlay=function(e){var t=I.getState("OutstreamPlayback");e.ads.debug("Received play event (OutstreamPending)"),this.transitionTo(t,this.adsReady)},i.onAdsReady=function(e){e.ads.debug("Received adsready event (OutstreamPending)"),this.adsReady=!0},i.onAdsError=function(){this.player.ads.debug("adserror (OutstreamPending)"),this.adsReady=!1},t}(I.getState("AdState"));I.registerState("OutstreamPending",H);var V=function(t){function i(){return t.apply(this,arguments)||this}l(i,t),i._getName=function(){return"OutstreamPlayback"};var n=i.prototype;return n.init=function(e,t){e.addClass("vjs-ad-loading"),t?this.handleAdsReady():this.abort(e)},n.onAdsReady=function(t){t.ads.inAdBreak()?e.log.warn("Unexpected adsready event (Preroll)"):(t.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady())},n.abort=function(e){var t=I.getState("OutstreamDone");e.removeClass("vjs-ad-loading"),this.transitionTo(t)},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.handleAdsReady=function(){this.adsReady=!0,this.readyForOutstreamPlayback()},n.readyForOutstreamPlayback=function(){var e=this.player;this.afterLoadStart((function(){e.trigger("readyforoutstream")}))},n.startLinearAdMode=function(){var e=this.player;this.adsReady&&!e.ads.inAdBreak()&&M.start(e)},n.cleanup=function(t){t.ads._hasThereBeenALoadStartDuringPlayerLife||e.log.warn("Leaving OutstreamPlayback state before loadstart event can cause issues."),this.cleanupPartial(t)},n.cleanupPartial=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming"),this.clearTimeout(e)},n.clearTimeout=function(e){e.clearTimeout(this._timeout),this._timeout=null},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.onAdsError=function(t){var i=this;e.log("adserror (OutstreamPlayback)"),this.inAdBreak()?t.ads.endLinearAdMode():this.afterLoadStart((function(){i.abort(t)}))},n.onAdTimeout=function(e){var t=this;this.afterLoadStart((function(){e.ads.debug("adtimeout (OutstreamPlayback)"),t.abort(e)}))},n.onAdsCanceled=function(e){var t=this;e.ads.debug("adscanceled (OutstreamPlaybac)"),this.afterLoadStart((function(){t.abort(e)}))},n.endLinearAdMode=function(){var e=this;if(this.inAdBreak()){this.player.removeClass("vjs-ad-loading");var t=I.getState("OutstreamDone");M.end(this.player,(function(){e.transitionTo(t)}))}},n.afterLoadStart=function(e){var t=this.player;t.ads._hasThereBeenALoadStartDuringPlayerLife?e():(t.ads.debug("Waiting for loadstart..."),t.one("loadstart",(function(){t.ads.debug("Received loadstart event"),e()})))},n.skipLinearAdMode=function(){var t=this,i=this.player,n=I.getState("OutstreamDone");this.inAdBreak()?e.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart((function(){i.trigger("adskip"),i.ads.debug("skipLinearAdMode (OutstreamPlayback)"),t.transitionTo(n)}))},i}(I.getState("AdState"));I.registerState("OutstreamPlayback",V);var $=function(t){function i(){return t.apply(this,arguments)||this}l(i,t),i._getName=function(){return"OutstreamDone"};var n=i.prototype;return n.init=function(e){e.trigger("ended")},n.startLinearAdMode=function(){e.log.warn("Unexpected startLinearAdMode invocation (OutstreamDone)")},i}(I.getState("AdState"));I.registerState("OutstreamDone",$);var z=A.isMiddlewareMediatorSupported,W=e.getTech("Html5").Events,G={timeout:5e3,prerollTimeout:void 0,postrollTimeout:void 0,debug:!1,stitchedAds:!1,contentIsLive:void 0,liveCuePoints:!0,allowVjsAutoplay:e.options.normalizeAutoplay||!1},X=function(t){var i=this,r=e.obj.merge(G,t),s=[];
2W.concat(["firstplay","loadedalldata"]).forEach((function(e){-1===s.indexOf(e)&&s.push(e)})),i.on(s,a),z()||function(t,i){i&&e.log("Using cancelContentPlay to block content playback"),t.on("play",S)}(i,r.debug),i.setTimeout((function(){i.ads._hasThereBeenALoadStartDuringPlayerLife||""===i.src()||e.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 t=i.play();t&&t.catch&&t.catch((function(t){e.log.warn("Play promise rejected when playing ad",t)}))}})),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(t){return{disableNextSnapshotRestore:!1,_contentEnding:!1,_contentHasEnded:!1,_hasThereBeenALoadStartDuringPlayerLife:!1,_hasThereBeenALoadedData:!1,_hasThereBeenALoadedMetaData:!1,_inLinearAdMode:!1,_shouldBlockPlay:!1,_playBlocked:!1,_playRequested:!1,_error:null,adType:null,VERSION:n,reset:function(){t.ads.disableNextSnapshotRestore=!1,t.ads._contentEnding=!1,t.ads._contentHasEnded=!1,t.ads.snapshot=null,t.ads.adType=null,t.ads._hasThereBeenALoadedData=!1,t.ads._hasThereBeenALoadedMetaData=!1,t.ads._cancelledPlay=!1,t.ads._shouldBlockPlay=!1,t.ads._playBlocked=!1,t.ads.nopreroll_=!1,t.ads.nopostroll_=!1,t.ads._playRequested=!1,t.ads._error=null},startLinearAdMode:function(){t.ads._state.startLinearAdMode()},endLinearAdMode:function(){t.ads._state.endLinearAdMode()},skipLinearAdMode:function(){t.ads._state.skipLinearAdMode()},stitchedAds:function(t){return void 0!==t&&(e.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=!!t),this.settings.stitchedAds},videoElementRecycled:function(){if(t.ads.shouldPlayContentBehindAd(t))return!1;if(!this.snapshot)throw new Error("You cannot use videoElementRecycled while there is no snapshot.");var e=t.tech_.src()!==this.snapshot.src,i=t.currentSrc()!==this.snapshot.currentSrc;return e||i},isLive:function(i){return void 0===i&&(i=t),"boolean"==typeof i.ads.settings.contentIsLive?i.ads.settings.contentIsLive:i.duration()===1/0||"8"===e.browser.IOS_VERSION&&0===i.duration()},shouldPlayContentBehindAd:function(i){if(void 0===i&&(i=t),i)return!!i.ads.settings.liveCuePoints&&!e.browser.IS_IOS&&!e.browser.IS_ANDROID&&i.duration()===1/0;throw new Error("shouldPlayContentBehindAd requires a player as a param")},shouldTakeSnapshots:function(e){return void 0===e&&(e=t),!this.shouldPlayContentBehindAd(e)&&!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 e=t.$(".vjs-tech");e&&e.removeAttribute("poster")},debug:function(){if(this.settings.debug){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];1===i.length&&"string"==typeof i[0]?e.log("ADS: "+i[0]):e.log.apply(e,["ADS:"].concat(i))}},error:function(i){if(void 0===i)return this._error||null;null!==i&&i.errorType?(this._error=i,e.log.error("An error with Ads occured. Type: "+i.errorType+"."),t.trigger({type:"vjsadserror",error:this._error})):this._error=null}}}(i),i.ads.settings=r,r.stitchedAds=!!r.stitchedAds,"outstream"===r.playerMode?(i.src(k),i.ads._state=new(I.getState("OutstreamPending"))(i)):r.stitchedAds?i.ads._state=new(I.getState("StitchedContentPlayback"))(i):i.ads._state=new(I.getState("BeforePreroll"))(i),i.ads._state.init(i),i.ads.cueTextTracks=_,i.ads.adMacroReplacement=v.bind(i),function(e){e.ads.contentSrc=e.currentSrc(),e.ads._seenInitialLoadstart=!1,e.on("loadstart",(function(){if(!e.ads.inAdBreak()){var t=e.currentSrc();t!==e.ads.contentSrc&&(e.ads._seenInitialLoadstart&&e.trigger({type:"contentchanged"}),e.trigger({type:"contentupdate",oldValue:e.ads.contentSrc,newValue:t}),e.ads.contentSrc=t),e.ads._seenInitialLoadstart=!0}}
2))}(i),i.on("contentchanged",i.ads.reset);var o=function(){var t=i.textTracks();if(!i.ads.shouldPlayContentBehindAd(i)&&i.ads.inAdBreak()&&i.tech_.featuresNativeTextTracks&&e.browser.IS_IOS&&!Array.isArray(i.textTracks()))for(var n=0;n<t.length;n++){var r=t[n];"showing"===r.mode&&(r.mode="disabled")}};i.ready((function(){i.textTracks().addEventListener("change",o)})),i.on(["play","playing","ended","adsready","adscanceled","adskip","adserror","adtimeout","adended","ads-ad-started","ads-ad-skipped","contentchanged","dispose","contentresumed","readyforpostroll","nopreroll","nopostroll"],(function(e){i.ads._state.handleEvent(e.type)})),i.on("dispose",(function(){i.ads.reset(),i.textTracks().removeEventListener("change",o)})),c(),p((function(){})),i.ads.listenToTcf=c,i.ads.updateUsPrivacyString=function(e){return p(e)}};return X.Error=f,X.VERSION=n,function(t){!function(){if(e.getPlugin)return Boolean(e.getPlugin("ads"));var t=e.getComponent("Player");return Boolean(t&&t.prototype.ads)}()&&((e.registerPlugin||e.plugin)("ads",t),C()&&!e.usingContribAdsMiddleware_&&(e.use("*",E),e.usingContribAdsMiddleware_=!0,e.log.debug("Play middleware has been registered with videojs")))}(X),X}(i(2613),i(9840),i(9697))},5912:(e,t,i)=>{"use strict";var n=i(2613),r=i(9697);function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=s(n),o=s(r),l="6.2.0";const u=a.default.obj&&a.default.obj.merge||a.default.mergeOptions,d={header:"",code:"",message:"",timeout:45e3,backgroundTimeout:3e5,dismiss:!a.default.browser.IS_IPHONE,errors:{1:{type:"MEDIA_ERR_ABORTED",headline:"The video download was cancelled"},2:{type:"MEDIA_ERR_NETWORK",headline:"The video connection was lost, please confirm you are connected to the internet"},3:{type:"MEDIA_ERR_DECODE",headline:"The video is bad or in a format that cannot be played on your browser"},4:{type:"MEDIA_ERR_SRC_NOT_SUPPORTED",headline:"This video is either unavailable or not supported in this browser"},5:{type:"MEDIA_ERR_ENCRYPTED",headline:"The video you are trying to watch is encrypted and we do not know how to decrypt it"},unknown:{type:"MEDIA_ERR_UNKNOWN",headline:"An unanticipated problem was encountered, check back soon and try again"},"-1":{type:"PLAYER_ERR_NO_SRC",headline:"No video has been loaded"},"-2":{type:"PLAYER_ERR_TIMEOUT",headline:"It looks like you're having playback issues. Reloading the video may help."},PLAYER_ERR_DOMAIN_RESTRICTED:{headline:"This video is restricted from playing on your current domain"},PLAYER_ERR_IP_RESTRICTED:{headline:"This video is restricted at your current IP address"},PLAYER_ERR_GEO_RESTRICTED:{headline:"This video is restricted from playing in your current geographic region"}}},c=function(e,t){let i,n,r;const s=[],a=function(e){t.errors=u(t.errors,e),Object.keys(t.errors).forEach((e=>{const i=t.errors[e];i.type||(i.type=e)}))};a();const h=function(){e.error()&&-2===e.error().code&&e.error(null),e.clearTimeout(n),e.clearTimeout(i),r&&(r=!1,e.removeClass("vjs-waiting"));const s=[1/0,-1],a=(e,t)=>-1!==e.indexOf(t);"hidden"===o.default.visibilityState&&(e.muted()||a(s,t.backgroundTimeout))||"visible"===o.default.visibilityState&&a(s,t.timeout)||(n=e.setTimeout((function(){e.error()||e.paused()||e.ended()||(r=!0,e.addClass("vjs-waiting"))}),1e3),i=e.setTimeout((function(){e.error()||e.paused()||e.ended()||e.error({code:-2,type:"PLAYER_ERR_TIMEOUT"})}),"hidden"===o.default.visibilityState?t.backgroundTimeout:t.timeout))},p=function(){let t;for(;s.length;)t=s.shift(),e.off(t[0],t[1]);e.clearTimeout(i),e.clearTimeout(n)},f=function(){let t=0;p(),h(),function(t,i){const n=function(){if(!e.error()){if(e.paused())return h();if(e.ended())return h()}i.call(this)};e.on(t,n),s.push([t,n])}(["timeupdate","adtimeupdate"],(function(){const i=e.currentTime();i!==t&&(t=i,h())})),e.off(o.default,"visibilitychange",f),e.on(o.default,"visibilitychange",f)},g=function(){e.currentSrc()||e.error({code:-1,type:"PLAYER_ERR_NO_SRC"})},m=function(){let i="",n=e.error();const r=o.default.createElement("div");let s="";if(!n)return;e.off(o.default,"visibilitychange",f),n=u(n,t.errors[n.code||n.type||0]),n.message&&(i=`<div class="vjs-errors-details">${e.localize("Technical details")}\n        : <div class="vjs-errors-message">${e.localize(n.message)}</div>\n        </div>`);const a=e.getChild("errorDisplay");r.className="vjs-errors-dialog";const l=`<div class="vjs-errors-code"><b>${this.localize("Error Code")}:</b> ${n.type||n.code}</div>
2`,d=-2===n.code;s=`<div class="vjs-errors-content-container">\n        <h2 class="vjs-errors-headline">${this.localize(n.headline)}</h2>\n        ${d?"":l}\n        ${d?"":i}\n      </div>`;const c=a.closeable(!("dismiss"in n)||n.dismiss);if(d){s+=`<div class="vjs-errors-timeout-button-container">\n         <button>${this.localize("Reload Video")}</button>\n         <button>${this.localize("Dismiss")}</button>\n       </div>`,r.innerHTML=s,a.fillWith(r),a.getChild("closeButton").hide();const t=a.el().querySelector(".vjs-errors-timeout-button-container > button:first-child"),i=a.el().querySelector(".vjs-errors-timeout-button-container > button:last-child"),n=()=>{const t=e.currentSource();e.reset(),e.src(t)};e.on(t,"click",n),a.one("modalclose",(()=>{e.off(t,"click",n),e.off(i,"click",a.close)}))}else if(c){s+=`<div class="vjs-errors-ok-button-container">\n          <button class="vjs-errors-ok-button">${this.localize("OK")}</button>\n        </div>`,r.innerHTML=s,a.fillWith(r),a.contentEl().firstChild.appendChild(a.getChild("closeButton").el());const t=a.el().querySelector(".vjs-errors-ok-button");e.on(t,"click",(function(){a.close()}))}else r.innerHTML=s,a.fillWith(r);(e.currentWidth()<=600||e.currentHeight()<=250)&&a.addClass("vjs-xs"),a.one("modalclose",(()=>e.error(null)))},y=function(){p(),e.removeClass("vjs-errors"),e.off("play",f),e.off(o.default,"visibilitychange",f),e.off("play",g),e.off("dispose",y),e.off(["aderror","error"],m)},v=function(t){y(),c(e,u(d,t))};v.extend=e=>a(e),v.getAll=()=>u(t.errors),v.timeout=function(i){if(void 0===i)return t.timeout;i!==t.timeout&&(t.timeout=i,e.paused()||f())},v.backgroundTimeout=function(i){if(void 0===i)return t.backgroundTimeout;i!==t.backgroundTimeout&&(t.backgroundTimeout=i,e.paused()||f())},v.disableProgress=()=>{},e.on("play",f),e.on("play",g),e.on("dispose",y),e.on(["aderror","contenterror","error"],m),e.ready((()=>{e.addClass("vjs-errors")})),e.paused()||f(),v.VERSION=l,e.errors=v},h=function(e){c(this,u(d,e))};["extend","getAll"].forEach((e=>{h[e]=function(){a.default.log.warn(`The errors.${e}() method is not available until the plugin has been initialized!`)}})),h.VERSION=l,a.default.registerPlugin("errors",h),e.exports=h},4620:function(e,t,i){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e);const n=i.default.getComponent("MenuButton"),r=i.default.getComponent("Menu"),s=i.default.getComponent("Component"),a=i.default.dom;class o extends n{constructor(e){super(e,{title:e.localize("Quality"),name:"QualityButton"})}createItems(){return[]}createMenu(){const e=new r(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const i=a.createEl("li",{className:"vjs-menu-title",innerHTML:(t=this.options_.title,"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)),tabIndex:-1}),n=new s(this.player_,{el:i});this.hideThreshold_+=1,e.addItem(n)}var t;if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}}const l=i.default.getComponent("MenuItem");class u extends l{constructor(e,t,i,n){super(e,{label:t.label,selectable:!0,selected:t.selected||!1}),this.item=t,this.qualityButton=i,this.plugin=n}handleClick(){for(let e=0;e<this.qualityButton.items.length;++e)this.qualityButton.items[e].selected(!1);this.plugin.setQuality(this.item.value),this.selected(!0)}}const d=i.default.getPlugin("plugin"),c={};class h extends d{constructor(e,t){super(e),this.options=i.default.obj.merge(c,t),this.player.ready((()=>{this.player.qualityLevels&&(this.player.addClass("vjs-hls-quality-selector"),this.createQualityButton(),this.bindPlayerEvents())}))}bindPlayerEvents(){this.player.qualityLevels().on("addqualitylevel",this.onAddQualityLevel.bind(this))}createQualityButton(){const e=this.player;this._qualityButton=new o(e);const t=e.controlBar.children().length-2,i=e.controlBar.addChild(this._qualityButton,{componentClass:"qualitySelector"},this.options.placementIndex||t);if(i.addClass("vjs-quality-selector"),this.options.displayCurrentQuality)this.setButtonInnerText(e.localize("Auto"));else{const e=` ${this.options.vjsIconClass||"vjs-icon-hd"}`;i.menuButton_.$(".vjs-icon-placeholder").className+=e}i.removeClass("vjs-hidden")}setButtonInnerText(e){this._qualityButton.menuButton_.$(".vjs-icon-placeholder").innerHTML=e}getQualityMenuItem(e){const t=this.player;return new u(t,e,this._qualityButton,this)}onAddQualityLevel(){const e=this.player.qualityLevels().levels_||[],t=[];for(let i=0;i<e.length;++i){const{width:n,height:r}=e[i],s=n>r?r:n;if(s&&!t.filter((e=>e.item&&e.item.value===s)).length){const e=this.getQualityMenuItem.call(this,{label:s+"p",value:s});t.push(e)}}t.sort(((e,t)=>"object"!=typeof e||"object"!=typeof t||e.item.value<t.item.value?-1:e.item.value>t.item.value?1:0)),t.push(this.getQualityMenuItem.call(this,{label:this.player.localize("Auto"),value:"auto",selected:!0})),this._qualityButton&&(this._qualityButton.createItems=()=>t,this._qualityButton.update())}setQuality(e){const t=this.player.qualityLevels();this._currentQuality=e,this.options.displayCurrentQuality&&this.setButtonInnerText("auto"===e?this.player.localize("Auto"):`${e}p`);for(let i=0;i<t.length;++i){const{width:n,height:r}=t[i],s=n>r?r:n;t[i].enabled=s===e||"auto"===e}this._qualityButton.unpressButton()}getCurrentQuality(){return this._currentQuality||"auto"}}return h.VERSION="2.0.0",i.default.registerPlugin("hlsQualitySelector",h),h}(i(2613))},2155:function(e,t,i){!function(e,t){"use strict";function i(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function a(e,t,i){return t&&s(e.prototype,t),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function l(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return o(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,l=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){l=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(l)throw s}}}}t=t&&t.hasOwnProperty("default")?t.default:t;var u=function(e,t,i){this.vjsPlayer=e,this.controller=i,this.contentTrackingTimer=null,this.contentComplete=!1,this.updateTimeIntervalHandle=null,this.updateTimeInterval=1e3,this.seekCheckIntervalHandle=null,this.seekCheckInterval=1e3,this.resizeCheckIntervalHandle=null,this.resizeCheckInterval=250,this.seekThreshold=100,this.contentEndedListeners=[],this.contentSource="",this.contentSourceType="",this.contentPlayheadTracker={currentTime:0,previousTime:0,seeking:!1,duration:0},this.vjsPlayerDimensions={width:this.getPlayerWidth(),height:this.getPlayerHeight()},this.vjsControls=this.vjsPlayer.getChild("controlBar"),this.h5Player=null,this.vjsPlayer.one("play",this.setUpPlayerIntervals.bind(this)),this.boundContentEndedListener=this.localContentEndedListener.bind(this),this.vjsPlayer.on("contentended",this.boundContentEndedListener),this.vjsPlayer.on("dispose",this.playerDisposedListener.bind(this)),this.vjsPlayer.on("readyforpreroll",this.onReadyForPreroll.bind(this)),this.vjsPlayer.on("adtimeout",this.onAdTimeout.bind(this)),this.vjsPlayer.ready(this.onPlayerReady.bind(this)),"onPlay"===this.controller.getSettings().requestMode&&this.vjsPlayer.one("play",this.controller.requestAds.bind(this.controller)),this.vjsPlayer.ads||window.console.warn("You may be using a version of videojs-contrib-ads that is not compatible with your version of video.js."),this.vjsPlayer.ads(t)};u.prototype.setUpPlayerIntervals=function(){this.updateTimeIntervalHandle&&clearInterval(this.updateTimeIntervalHandle),this.seekCheckIntervalHandle&&clearInterval(this.seekCheckIntervalHandle),this.resizeCheckIntervalHandle&&clearInterval(this.resizeCheckIntervalHandle),this.updateTimeIntervalHandle=setInterval(this.updateCurrentTime.bind(this),this.updateTimeInterval),this.seekCheckIntervalHandle=setInterval(this.checkForSeeking.bind(this),this.seekCheckInterval),this.resizeCheckIntervalHandle=setInterval(this.checkForResize.bind(this),this.resizeCheckInterval)},u.prototype.updateCurrentTime=function(){this.contentPlayheadTracker.seeking||(this.contentPlayheadTracker.currentTime=this.vjsPlayer.currentTime())},u.prototype.checkForSeeking=function(){var e=1e3*(this.vjsPlayer.currentTime()-this.contentPlayheadTracker.previousTime);Math.abs(e)>this.seekCheckInterval+this.seekThreshold?this.contentPlayheadTracker.seeking=!0:this.contentPlayheadTracker.seeking=!1,this.contentPlayheadTracker.previousTime=this.vjsPlayer.currentTime()},u.prototype.checkForResize=function(){var e=this.getPlayerWidth(),t=this.getPlayerHeight();e==this.vjsPlayerDimensions.width&&t==this.vjsPlayerDimensions.height||(this.vjsPlayerDimensions.width=e,this.vjsPlayerDimensions.height=t,this.controller.onPlayerResize(e,t))},u.prototype.localContentEndedListener=function(){for(var e in this.contentComplete||(this.contentComplete=!0,this.controller.onContentComplete()),this.contentEndedListeners)"function"==typeof this.contentEndedListeners[e]&&this.contentEndedListeners[e]();
vendor: 32,877 bytes, line 2
2this.vjsPlayer.el()&&this.vjsPlayer.one("play",this.setUpPlayerIntervals.bind(this))},u.prototype.onNoPostroll=function(){this.vjsPlayer.trigger("nopostroll")},u.prototype.playerDisposedListener=function(){this.contentEndedListeners=[],this.controller.onPlayerDisposed(),this.contentComplete=!0,this.vjsPlayer.off("contentended",this.boundContentEndedListener),this.vjsPlayer.ads.adTimeoutTimeout&&clearTimeout(this.vjsPlayer.ads.adTimeoutTimeout);var e=[this.updateTimeIntervalHandle,this.seekCheckIntervalHandle,this.resizeCheckIntervalHandle];for(var t in e)e[t]&&clearInterval(e[t])},u.prototype.onReadyForPreroll=function(){this.controller.onPlayerReadyForPreroll()},u.prototype.onAdTimeout=function(){this.controller.onAdTimeout()},u.prototype.onPlayerReady=function(){this.h5Player=document.getElementById(this.getPlayerId()).getElementsByClassName("vjs-tech")[0],this.h5Player.hasAttribute("autoplay")&&this.controller.setSetting("adWillAutoPlay",!0),this.onVolumeChange(),this.vjsPlayer.on("fullscreenchange",this.onFullscreenChange.bind(this)),this.vjsPlayer.on("volumechange",this.onVolumeChange.bind(this)),this.controller.onPlayerReady()},u.prototype.onFullscreenChange=function(){this.vjsPlayer.isFullscreen()?this.controller.onPlayerEnterFullscreen():this.controller.onPlayerExitFullscreen()},u.prototype.onVolumeChange=function(){var e=this.vjsPlayer.muted()?0:this.vjsPlayer.volume();this.controller.onPlayerVolumeChanged(e)},u.prototype.injectAdContainerDiv=function(e){this.vjsControls.el().parentNode.appendChild(e)},u.prototype.getContentPlayer=function(){return this.h5Player},u.prototype.getVolume=function(){return this.vjsPlayer.muted()?0:this.vjsPlayer.volume()},u.prototype.setVolume=function(e){this.vjsPlayer.volume(e),0==e?this.vjsPlayer.muted(!0):this.vjsPlayer.muted(!1)},u.prototype.unmute=function(){this.vjsPlayer.muted(!1)},u.prototype.mute=function(){this.vjsPlayer.muted(!0)},u.prototype.play=function(){this.vjsPlayer.play()},u.prototype.togglePlayback=function(){this.vjsPlayer.paused()?this.vjsPlayer.play():this.vjsPlayer.pause()},u.prototype.getPlayerWidth=function(){var e=(getComputedStyle(this.vjsPlayer.el())||{}).width;return e&&0!==parseFloat(e)||(e=(this.vjsPlayer.el().getBoundingClientRect()||{}).width),parseFloat(e)||this.vjsPlayer.width()},u.prototype.getPlayerHeight=function(){var e=(getComputedStyle(this.vjsPlayer.el())||{}).height;return e&&0!==parseFloat(e)||(e=(this.vjsPlayer.el().getBoundingClientRect()||{}).height),parseFloat(e)||this.vjsPlayer.height()},u.prototype.getPlayerOptions=function(){return this.vjsPlayer.options_},u.prototype.getPlayerId=function(){return this.vjsPlayer.id()},u.prototype.toggleFullscreen=function(){this.vjsPlayer.isFullscreen()?this.vjsPlayer.exitFullscreen():this.vjsPlayer.requestFullscreen()},u.prototype.getContentPlayheadTracker=function(){return this.contentPlayheadTracker},u.prototype.onAdError=function(e){this.vjsControls.show();var t=void 0!==e.getError?e.getError():e.stack;this.vjsPlayer.trigger({type:"adserror",data:{AdError:t,AdErrorEvent:e}})},u.prototype.onAdLog=function(e){var t=e.getAdData(),i=void 0!==t.adError?t.adError.getMessage():void 0;this.vjsPlayer.trigger({type:"adslog",data:{AdError:i,AdEvent:e}})},u.prototype.onAdBreakStart=function(){this.contentSource=this.vjsPlayer.currentSrc(),this.contentSourceType=this.vjsPlayer.currentType(),this.vjsPlayer.off("contentended",this.boundContentEndedListener),this.vjsPlayer.ads.startLinearAdMode(),this.vjsControls.hide(),this.vjsPlayer.pause()},u.prototype.onAdBreakEnd=function(){this.vjsPlayer.on("contentended",this.boundContentEndedListener),this.vjsPlayer.ads.inAdBreak()&&this.vjsPlayer.ads.endLinearAdMode(),this.vjsControls.show()},u.prototype.onAdStart=function(){this.vjsPlayer.trigger("ads-ad-started")},u.prototype.onAllAdsCompleted=function(){1==this.contentComplete&&(this.contentSource&&this.vjsPlayer.currentSrc()!=this.contentSource&&this.vjsPlayer.src({src:this.contentSource,type:this.contentSourceType}),this.controller.onContentAndAdsCompleted())},u.prototype.onAdsReady=function(){this.vjsPlayer.trigger("adsready")},u.prototype.changeSource=function(e){this.vjsPlayer.currentSrc()&&(this.vjsPlayer.currentTime(0),this.vjsPlayer.pause()),e&&this.vjsPlayer.src(e),this.vjsPlayer.one("loadedmetadata",this.seekContentToZero.bind(this))},u.prototype.seekContentToZero=function(){this.vjsPlayer.currentTime(0)},u.prototype.triggerPlayerEvent=function(e,t){this.vjsPlayer.trigger(e,t)},u.prototype.addContentEndedListener=function(e){this.contentEndedListeners.push(e)},u.prototype.reset=function(){this.vjsPlayer.off("contentended",this.boundContentEndedListener),this.vjsPlayer.on("contentended",this.boundContentEndedListener),this.vjsControls.show(),this.vjsPlayer.ads.inAdBreak()&&this.vjsPlayer.ads.endLinearAdMode(),this.contentPlayheadTracker.currentTime=0,this.contentComplete=!1};var d=function(e){this.controller=e,this.adContainerDiv=document.createElement("div"),this.controlsDiv=document.createElement("div"),this.countdownDiv=document.createElement("div"),this.seekBarDiv=document.createElement("div"),this.progressDiv=document.createElement("div"),this.playPauseDiv=document.createElement("div"),this.muteDiv=document.createElement("div"),this.sliderDiv=document.createElement("div"),this.sliderLevelDiv=document.createElement("div"),this.fullscreenDiv=document.createElement("div"),this.boundOnMouseUp=this.onMouseUp.bind(this),this.boundOnMouseMove=this.onMouseMove.bind(this),this.adPlayheadTracker={currentTime:0,duration:0,isPod:!1,adPosition:0,totalAds:0},this.controlPrefix=this.controller.getPlayerId()+"_",this.showCountdown=!0,!1===this.controller.getSettings().showCountdown&&(this.showCountdown=!1),this.isAdNonlinear=!1,this.createAdContainer()};d.prototype.createAdContainer=function(){this.assignControlAttributes(this.adContainerDiv,"ima-ad-container"),this.adContainerDiv.style.position="absolute",this.adContainerDiv.style.zIndex=1111,this.adContainerDiv.addEventListener("mouseenter",this.showAdControls.bind(this),!1),this.adContainerDiv.addEventListener("mouseleave",this.hideAdControls.bind(this),!1),this.adContainerDiv.addEventListener("click",this.onAdContainerClick.bind(this),!1),this.createControls(),this.controller.injectAdContainerDiv(this.adContainerDiv)},d.prototype.createControls=function(){this.assignControlAttributes(this.controlsDiv,"ima-controls-div"),this.controlsDiv.style.width="100%",this.controller.getIsMobile()?this.countdownDiv.style.display="none":(this.assignControlAttributes(this.countdownDiv,"ima-countdown-div"),this.countdownDiv.innerHTML=this.controller.getSettings().adLabel,this.countdownDiv.style.display=this.showCountdown?"block":"none"),this.assignControlAttributes(this.seekBarDiv,"ima-seek-bar-div"),this.seekBarDiv.style.width="100%",this.assignControlAttributes(this.progressDiv,"ima-progress-div"),this.assignControlAttributes(this.playPauseDiv,"ima-play-pause-div"),this.addClass(this.playPauseDiv,"ima-playing"),this.playPauseDiv.addEventListener("click",this.onAdPlayPauseClick.bind(this),!1),this.assignControlAttributes(this.muteDiv,"ima-mute-div"),this.addClass(this.muteDiv,"ima-non-muted"),this.muteDiv.addEventListener("click",this.onAdMuteClick.bind(this),!1),this.assignControlAttributes(this.sliderDiv,"ima-slider-div"),this.sliderDiv.addEventListener("mousedown",this.onAdVolumeSliderMouseDown.bind(this),!1),this.controller.getIsIos()&&(this.sliderDiv.style.display="none"),this.assignControlAttributes(this.sliderLevelDiv,"ima-slider-level-div"),this.assignControlAttributes(this.fullscreenDiv,"ima-fullscreen-div"),this.addClass(this.fullscreenDiv,"ima-non-fullscreen"),this.fullscreenDiv.addEventListener("click",this.onAdFullscreenClick.bind(this),!1),this.adContainerDiv.appendChild(this.controlsDiv),this.controlsDiv.appendChild(this.countdownDiv),this.controlsDiv.appendChild(this.seekBarDiv),this.controlsDiv.appendChild(this.playPauseDiv),this.controlsDiv.appendChild(this.muteDiv),this.controlsDiv.appendChild(this.sliderDiv),this.controlsDiv.appendChild(this.fullscreenDiv),this.seekBarDiv.appendChild(this.progressDiv),this.sliderDiv.appendChild(this.sliderLevelDiv)},d.prototype.onAdPlayPauseClick=function(){this.controller.onAdPlayPauseClick()},d.prototype.onAdMuteClick=function(){this.controller.onAdMuteClick()},d.prototype.onAdFullscreenClick=function(){this.controller.toggleFullscreen()},d.prototype.onAdsPaused=function(){this.controller.sdkImpl.adPlaying=!1,this.addClass(this.playPauseDiv,"ima-paused"),this.removeClass(this.playPauseDiv,"ima-playing"),this.showAdControls()},d.prototype.onAdsResumed=function(){this.onAdsPlaying(),this.showAdControls()},d.prototype.onAdsPlaying=function(){this.controller.sdkImpl.adPlaying=!0,this.addClass(this.playPauseDiv,"ima-playing"),this.removeClass(this.playPauseDiv,"ima-paused")},d.prototype.updateAdUi=function(e,t,i,n,r){var s=Math.floor(t/60),a=Math.floor(t%60);a.toString().length<2&&(a="0"+a);var o=": ";r>1&&(o=" ("+n+" "+this.controller.getSettings().adLabelNofN+" "+r+"): "),this.countdownDiv.innerHTML=this.controller.getSettings().adLabel+o+s+":"+a;var l=e/i*100;this.progressDiv.style.width=l+"%"},d.prototype.unmute=function(){this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted"),this.sliderLevelDiv.style.width=100*this.controller.getPlayerVolume()+"%"},d.prototype.mute=function(){this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted"),this.sliderLevelDiv.style.width="0%"},d.prototype.onAdVolumeSliderMouseDown=function(){document.addEventListener("mouseup",this.boundOnMouseUp,!1),document.addEventListener("mousemove",this.boundOnMouseMove,!1)},d.prototype.onMouseMove=function(e){this.changeVolume(e)},d.prototype.onMouseUp=function(e){this.changeVolume(e),document.removeEventListener("mouseup",this.boundOnMouseUp),document.removeEventListener("mousemove",this.boundOnMouseMove)},d.prototype.changeVolume=function(e){var t=(e.clientX-this.sliderDiv.getBoundingClientRect().left)/this.sliderDiv.offsetWidth;t*=100,t=Math.min(Math.max(t,0),100),this.sliderLevelDiv.style.width=t+"%",0==this.percent?(this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted")):(this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted")),this.controller.setVolume(t/100)},d.prototype.showAdContainer=function(){this.adContainerDiv.style.display="block"},d.prototype.hideAdContainer=function(){this.adContainerDiv.style.display="none"},d.prototype.onAdContainerClick=function(){this.isAdNonlinear&&this.controller.togglePlayback()},d.prototype.reset=function(){this.hideAdContainer()},d.prototype.onAdError=function(){this.hideAdContainer()},d.prototype.onAdBreakStart=function(e){this.showAdContainer(),"application/javascript"!==e.getAd().getContentType()||this.controller.getSettings().showControlsForJSAds?this.controlsDiv.style.display="block":this.controlsDiv.style.display="none",this.onAdsPlaying(),this.hideAdControls()},d.prototype.onAdBreakEnd=function(){var e=this.controller.getCurrentAd();(null==e||e.isLinear())&&this.hideAdContainer(),this.controlsDiv.style.display="none",this.countdownDiv.innerHTML=""},d.prototype.onAllAdsCompleted=function(){this.hideAdContainer()},d.prototype.onLinearAdStart=function(){this.removeClass(this.adContainerDiv,"bumpable-ima-ad-container"),this.isAdNonlinear=!1},d.prototype.onNonLinearAdLoad=function(){this.adContainerDiv.style.display="block",this.addClass(this.adContainerDiv,"bumpable-ima-ad-container"),this.isAdNonlinear=!0},d.prototype.onPlayerEnterFullscreen=function(){this.addClass(this.fullscreenDiv,"ima-fullscreen"),this.removeClass(this.fullscreenDiv,"ima-non-fullscreen")},d.prototype.onPlayerExitFullscreen=function(){this.addClass(this.fullscreenDiv,"ima-non-fullscreen"),this.removeClass(this.fullscreenDiv,"ima-fullscreen")},d.prototype.onPlayerVolumeChanged=function(e){0==e?(this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted"),this.sliderLevelDiv.style.width="0%"):(this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted"),this.sliderLevelDiv.style.width=100*e+"%")},d.prototype.showAdControls=function(){this.controller.getSettings().disableAdControls||this.addClass(this.controlsDiv,"ima-controls-div-showing")},d.prototype.hideAdControls=function(){this.removeClass(this.controlsDiv,"ima-controls-div-showing")},d.prototype.assignControlAttributes=function(e,t){e.id=this.controlPrefix+t,e.className=this.controlPrefix+t+" "+t},d.prototype.getClassRegexp=function(e){return new RegExp("(^|[^A-Za-z-])"+e+"((?![A-Za-z-])|$)","gi")},d.prototype.elementHasClass=function(e,t){return this.getClassRegexp(t).test(e.className)},d.prototype.addClass=function(e,t){e.className=e.className.trim()+" "+t},d.prototype.removeClass=function(e,t){var i=this.getClassRegexp(t);e.className=e.className.trim().replace(i,"")},d.prototype.getAdContainerDiv=function(){return this.adContainerDiv},d.prototype.setShowCountdown=function(e){this.showCountdown=e,this.countdownDiv.style.display=this.showCountdown?"block":"none"};var c="2.3.0",h=function(e){this.controller=e,this.adDisplayContainer=null,this.adDisplayContainerInitialized=!1,this.adsLoader=null,this.adsManager=null,this.adsRenderingSettings=null,this.adsResponse=null,this.currentAd=null,this.adTrackingTimer=null,this.allAdsCompleted=!1,this.adsActive=!1,this.adPlaying=!1,this.adMuted=!1,this.adBreakReadyListener=void 0,this.contentCompleteCalled=!1,this.isAdTimedOut=!1,this.adsManagerDimensions={width:0,height:0},this.autoPlayAdBreaks=!0,!1===this.controller.getSettings().autoPlayAdBreaks&&(this.autoPlayAdBreaks=!1),this.controller.getSettings().locale&&google.ima.settings.setLocale(this.controller.getSettings().locale),this.controller.getSettings().disableFlashAds&&google.ima.settings.setDisableFlashAds(this.controller.getSettings().disableFlashAds),this.controller.getSettings().disableCustomPlaybackForIOS10Plus&&google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.controller.getSettings().disableCustomPlaybackForIOS10Plus),this.controller.getSettings().ppid&&google.ima.settings.setPpid(this.controller.getSettings().ppid),this.controller.getSettings().featureFlags&&google.ima.settings.setFeatureFlags(this.controller.getSettings().featureFlags)};h.prototype.initAdObjects=function(){this.adDisplayContainer=new google.ima.AdDisplayContainer(this.controller.getAdContainerDiv(),this.controller.getContentPlayer()),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),0==this.controller.getSettings().vpaidAllowed&&this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.DISABLED),void 0!==this.controller.getSettings().vpaidMode&&this.adsLoader.getSettings().setVpaidMode(this.controller.getSettings().vpaidMode),this.controller.getSettings().locale&&this.adsLoader.getSettings().setLocale(this.controller.getSettings().locale),this.controller.getSettings().numRedirects&&this.adsLoader.getSettings().setNumRedirects(this.controller.getSettings().numRedirects),this.controller.getSettings().sessionId&&this.adsLoader.getSettings().setSessionId(this.controller.getSettings().sessionId),this.adsLoader.getSettings().setPlayerType("videojs-ima"),this.adsLoader.getSettings().setPlayerVersion(c),this.adsLoader.getSettings().setAutoPlayAdBreaks(this.autoPlayAdBreaks),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoaded.bind(this),!1),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsLoaderError.bind(this),!1),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-loader",adsLoader:this.adsLoader})},h.prototype.requestAds=function(){var e=new google.ima.AdsRequest;if(this.controller.getSettings().adTagUrl?e.adTagUrl=this.controller.getSettings().adTagUrl:e.adsResponse=this.controller.getSettings().adsResponse,this.controller.getSettings().forceNonLinearFullSlot&&(e.forceNonLinearFullSlot=!0),this.controller.getSettings().vastLoadTimeout&&(e.vastLoadTimeout=this.controller.getSettings().vastLoadTimeout),this.controller.getSettings().omidMode&&window.console.warn("The additional setting `omidMode` has been removed. Use `omidVendorAccess` instead."),this.controller.getSettings().omidVendorAccess){e.omidAccessModeRules={};var t=this.controller.getSettings().omidVendorAccess;Object.keys(t).forEach((function(i){e.omidAccessModeRules[i]=t[i]}))}e.linearAdSlotWidth=this.controller.getPlayerWidth(),e.linearAdSlotHeight=this.controller.getPlayerHeight(),e.nonLinearAdSlotWidth=this.controller.getSettings().nonLinearWidth||this.controller.getPlayerWidth(),e.nonLinearAdSlotHeight=this.controller.getSettings().nonLinearHeight||this.controller.getPlayerHeight(),e.setAdWillAutoPlay(this.controller.adsWillAutoplay()),e.setAdWillPlayMuted(this.controller.adsWillPlayMuted());var i=this.controller.getSettings().adsRequest;i&&"object"===n(i)&&Object.keys(i).forEach((function(t){e[t]=i[t]})),this.adsLoader.requestAds(e),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-request",AdsRequest:e})},h.prototype.onAdsManagerLoaded=function(e){this.createAdsRenderingSettings(),this.adsManager=e.getAdsManager(this.controller.getContentPlayheadTracker(),this.adsRenderingSettings),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdError.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this.onAdBreakReady.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.onContentPauseRequested.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.onContentResumeRequested.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this.onAllAdsCompleted.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this.onAdLoaded.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this.onAdStarted.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this.onAdComplete.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this.onAdComplete.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this.onAdLog.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this.onAdPaused.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this.onAdResumed.bind(this)),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-manager",adsManager:this.adsManager}),this.autoPlayAdBreaks||this.initAdsManager();var t=this.controller.getSettings().preventLateAdStart;t?t&&!this.isAdTimedOut&&this.controller.onAdsReady():this.controller.onAdsReady(),this.controller.getSettings().adsManagerLoadedCallback&&this.controller.getSettings().adsManagerLoadedCallback()},h.prototype.onAdsLoaderError=function(e){window.console.warn("AdsLoader error: "+e.getError()),this.controller.onErrorLoadingAds(e),this.adsManager&&this.adsManager.destroy()},h.prototype.initAdsManager=function(){try{var e=this.controller.getPlayerWidth(),t=this.controller.getPlayerHeight();this.adsManagerDimensions.width=e,this.adsManagerDimensions.height=t,this.adsManager.init(e,t,google.ima.ViewMode.NORMAL),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.initializeAdDisplayContainer()}catch(e){this.onAdError(e)}},h.prototype.createAdsRenderingSettings=function(){if(this.adsRenderingSettings=new google.ima.AdsRenderingSettings,this.adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete=!0,this.controller.getSettings().adsRenderingSettings)for(var e in this.controller.getSettings().adsRenderingSettings)""!==e&&(this.adsRenderingSettings[e]=this.controller.getSettings().adsRenderingSettings[e])},h.prototype.onAdError=function(e){var t=void 0!==e.getError?e.getError():e.stack;window.console.warn("Ad error: "+t),this.adsManager.destroy(),this.controller.onAdError(e),this.adsActive=!1,this.adPlaying=!1},h.prototype.onAdBreakReady=function(e){this.adBreakReadyListener(e)},h.prototype.onContentPauseRequested=function(e){this.adsActive=!0,this.adPlaying=!0,this.controller.onAdBreakStart(e)},h.prototype.onContentResumeRequested=function(e){this.adsActive=!1,this.adPlaying=!1,this.controller.onAdBreakEnd()},h.prototype.onAllAdsCompleted=function(e){this.allAdsCompleted=!0,this.controller.onAllAdsCompleted()},h.prototype.onAdLoaded=function(e){e.getAd().isLinear()||(this.controller.onNonLinearAdLoad(),this.controller.playContent())},h.prototype.onAdStarted=function(e){this.currentAd=e.getAd(),this.currentAd.isLinear()?(this.adTrackingTimer=setInterval(this.onAdPlayheadTrackerInterval.bind(this),250),this.controller.onLinearAdStart()):this.controller.onNonLinearAdStart()},h.prototype.onAdPaused=function(){this.controller.onAdsPaused()},h.prototype.onAdResumed=function(e){this.controller.onAdsResumed()},h.prototype.onAdComplete=function(){this.currentAd.isLinear()&&clearInterval(this.adTrackingTimer)},h.prototype.onAdLog=function(e){this.controller.onAdLog(e)},h.prototype.onAdPlayheadTrackerInterval=function(){if(null!==this.adsManager){var e=this.adsManager.getRemainingTime(),t=this.currentAd.getDuration(),i=t-e;i=i>0?i:0;var n,r=0;this.currentAd.getAdPodInfo()&&(n=this.currentAd.getAdPodInfo().getAdPosition(),r=this.currentAd.getAdPodInfo().getTotalAds()),this.controller.onAdPlayheadUpdated(i,e,t,n,r)}},h.prototype.onContentComplete=function(){this.adsLoader&&(this.adsLoader.contentComplete(),this.contentCompleteCalled=!0),(this.adsManager&&this.adsManager.getCuePoints()&&!this.adsManager.getCuePoints().includes(-1)||!this.adsManager)&&this.controller.onNoPostroll(),this.allAdsCompleted&&this.controller.onContentAndAdsCompleted()},h.prototype.onPlayerDisposed=function(){this.adTrackingTimer&&clearInterval(this.adTrackingTimer),this.adsManager&&(this.adsManager.destroy(),this.adsManager=null)},h.prototype.onPlayerReadyForPreroll=function(){if(this.autoPlayAdBreaks){this.initAdsManager();try{this.controller.showAdContainer(),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.adsManager.start()}catch(e){this.onAdError(e)}}},h.prototype.onAdTimeout=function(){this.isAdTimedOut=!0},h.prototype.onPlayerReady=function(){this.initAdObjects(),(this.controller.getSettings().adTagUrl||this.controller.getSettings().adsResponse)&&"onLoad"===this.controller.getSettings().requestMode&&this.requestAds()},h.prototype.onPlayerEnterFullscreen=function(){this.adsManager&&this.adsManager.resize(window.screen.width,window.screen.height,google.ima.ViewMode.FULLSCREEN)},h.prototype.onPlayerExitFullscreen=function(){this.adsManager&&this.adsManager.resize(this.controller.getPlayerWidth(),this.controller.getPlayerHeight(),google.ima.ViewMode.NORMAL)},h.prototype.onPlayerVolumeChanged=function(e){this.adsManager&&this.adsManager.setVolume(e),this.adMuted=0==e},h.prototype.onPlayerResize=function(e,t){this.adsManager&&(this.adsManagerDimensions.width=e,this.adsManagerDimensions.height=t,this.adsManager.resize(e,t,google.ima.ViewMode.NORMAL))},h.prototype.getCurrentAd=function(){return this.currentAd},h.prototype.setAdBreakReadyListener=function(e){this.adBreakReadyListener=e},h.prototype.isAdPlaying=function(){return this.adPlaying},h.prototype.isAdMuted=function(){return this.adMuted},h.prototype.pauseAds=function(){this.adsManager.pause(),this.adPlaying=!1},h.prototype.resumeAds=function(){this.adsManager.resume(),this.adPlaying=!0},h.prototype.unmute=function(){this.adsManager.setVolume(1),this.adMuted=!1},h.prototype.mute=function(){this.adsManager.setVolume(0),this.adMuted=!0},h.prototype.setVolume=function(e){this.adsManager.setVolume(e),this.adMuted=0==e},h.prototype.initializeAdDisplayContainer=function(){this.adDisplayContainer&&(this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0))},h.prototype.playAdBreak=function(){this.autoPlayAdBreaks||(this.controller.showAdContainer(),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.adsManager.start())},h.prototype.addEventListener=function(e,t){this.adsManager&&this.adsManager.addEventListener(e,t)},h.prototype.getAdsManager=function(){return this.adsManager},h.prototype.reset=function(){this.adsActive=!1,this.adPlaying=!1,this.adTrackingTimer&&clearInterval(this.adTrackingTimer),this.adsManager&&(this.adsManager.destroy(),this.adsManager=null),this.adsLoader&&!this.contentCompleteCalled&&this.adsLoader.contentComplete(),this.contentCompleteCalled=!1,this.allAdsCompleted=!1};var p=function(e,t){this.settings={},this.contentAndAdsEndedListeners=[],this.isMobile=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i),this.isIos=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i),this.initWithSettings(t);var i={debug:this.settings.debug,timeout:this.settings.timeout,prerollTimeout:this.settings.prerollTimeout},n=Object.assign({},i,t.contribAdsSettings||{});this.playerWrapper=new u(e,n,this),this.adUi=new d(this),this.sdkImpl=new h(this)};p.IMA_DEFAULTS={adLabel:"Advertisement",adLabelNofN:"of",debug:!1,disableAdControls:!1,prerollTimeout:1e3,preventLateAdStart:!1,requestMode:"onLoad",showControlsForJSAds:!0,timeout:5e3},p.prototype.initWithSettings=function(e){this.settings=Object.assign({},p.IMA_DEFAULTS,e||{}),this.warnAboutDeprecatedSettings(),this.showCountdown=!0,!1===this.settings.showCountdown&&(this.showCountdown=!1)},p.prototype.warnAboutDeprecatedSettings=function(){var e=this;["adWillAutoplay","adsWillAutoplay","adWillPlayMuted","adsWillPlayMuted"].forEach((function(t){void 0!==e.settings[t]&&console.warn("WARNING: videojs.ima setting "+t+" is deprecated")}))},p.prototype.getSettings=function(){return this.settings},p.prototype.getIsMobile=function(){return this.isMobile},p.prototype.getIsIos=function(){return this.isIos},p.prototype.injectAdContainerDiv=function(e){this.playerWrapper.injectAdContainerDiv(e)},p.prototype.getAdContainerDiv=function(){return this.adUi.getAdContainerDiv()},p.prototype.getContentPlayer=function(){return this.playerWrapper.getContentPlayer()},p.prototype.getContentPlayheadTracker=function(){return this.playerWrapper.getContentPlayheadTracker()},p.prototype.requestAds=function(){this.sdkImpl.requestAds()},p.prototype.setSetting=function(e,t){this.settings[e]=t},p.prototype.onErrorLoadingAds=function(e){this.adUi.onAdError(),this.playerWrapper.onAdError(e)},p.prototype.onAdPlayPauseClick=function(){this.sdkImpl.isAdPlaying()?(this.adUi.onAdsPaused(),this.sdkImpl.pauseAds()):(this.adUi.onAdsPlaying(),this.sdkImpl.resumeAds())},p.prototype.onAdMuteClick=function(){this.sdkImpl.isAdMuted()?(this.playerWrapper.unmute(),this.adUi.unmute(),this.sdkImpl.unmute()):(this.playerWrapper.mute(),this.adUi.mute(),this.sdkImpl.mute())},p.prototype.setVolume=function(e){this.playerWrapper.setVolume(e),this.sdkImpl.setVolume(e)},p.prototype.getPlayerVolume=function(){return this.playerWrapper.getVolume()},p.prototype.toggleFullscreen=function(){this.playerWrapper.toggleFullscreen()},p.prototype.onAdError=function(e){this.adUi.onAdError(),this.playerWrapper.onAdError(e)},p.prototype.onAdBreakStart=function(e){this.playerWrapper.onAdBreakStart(),this.adUi.onAdBreakStart(e)},p.prototype.showAdContainer=function(){this.adUi.showAdContainer()},p.prototype.onAdBreakEnd=function(){this.playerWrapper.onAdBreakEnd(),this.adUi.onAdBreakEnd()},p.prototype.onAllAdsCompleted=function(){this.adUi.onAllAdsCompleted(),this.playerWrapper.onAllAdsCompleted()},p.prototype.onAdsPaused=function(){this.adUi.onAdsPaused()},p.prototype.onAdsResumed=function(){this.adUi.onAdsResumed()},p.prototype.onAdPlayheadUpdated=function(e,t,i,n,r){this.adUi.updateAdUi(e,t,i,n,r)},p.prototype.onAdLog=function(e){this.playerWrapper.onAdLog(e)},p.prototype.getCurrentAd=function(){return this.sdkImpl.getCurrentAd()},p.prototype.playContent=function(){this.playerWrapper.play()},p.prototype.onLinearAdStart=function(){this.adUi.onLinearAdStart(),this.playerWrapper.onAdStart()},p.prototype.onNonLinearAdLoad=function(){this.adUi.onNonLinearAdLoad()},p.prototype.onNonLinearAdStart=function(){this.adUi.onNonLinearAdLoad(),this.playerWrapper.onAdStart()},p.prototype.getPlayerWidth=function(){return this.playerWrapper.getPlayerWidth()},p.prototype.getPlayerHeight=function(){return this.playerWrapper.getPlayerHeight()},p.prototype.onAdsReady=function(){this.playerWrapper.onAdsReady()},p.prototype.onPlayerResize=function(e,t){this.sdkImpl.onPlayerResize(e,t)},p.prototype.onContentComplete=function(){this.sdkImpl.onContentComplete()},p.prototype.onNoPostroll=function(){this.playerWrapper.onNoPostroll()},p.prototype.onContentAndAdsCompleted=function(){for(var e in this.contentAndAdsEndedListeners)"function"==typeof this.contentAndAdsEndedListeners[e]&&this.contentAndAdsEndedListeners[e]()},p.prototype.onPlayerDisposed=function(){this.contentAndAdsEndedListeners=[],this.sdkImpl.onPlayerDisposed()},p.prototype.onPlayerReadyForPreroll=function(){this.sdkImpl.onPlayerReadyForPreroll()},p.prototype.onAdTimeout=function(){this.sdkImpl.onAdTimeout()},p.prototype.onPlayerReady=function(){this.sdkImpl.onPlayerReady()},p.prototype.onPlayerEnterFullscreen=function(){this.adUi.onPlayerEnterFullscreen(),this.sdkImpl.onPlayerEnterFullscreen()},p.prototype.onPlayerExitFullscreen=function(){this.adUi.onPlayerExitFullscreen(),this.sdkImpl.onPlayerExitFullscreen()},p.prototype.onPlayerVolumeChanged=function(e){this.adUi.onPlayerVolumeChanged(e),this.sdkImpl.onPlayerVolumeChanged(e)},p.prototype.setContentWithAdTag=function(e,t){this.reset(),this.settings.adTagUrl=t||this.settings.adTagUrl,this.playerWrapper.changeSource(e)},p.prototype.setContentWithAdsResponse=function(e,t){this.reset(),this.settings.adsResponse=t||this.settings.adsResponse,this.playerWrapper.changeSource(e)},p.prototype.setContentWithAdsRequest=function(e,t){this.reset(),this.settings.adsRequest=t||this.settings.adsRequest,this.playerWrapper.changeSource(e)},p.prototype.reset=function(){this.sdkImpl.reset(),this.playerWrapper.reset(),this.adUi.reset()},p.prototype.addContentEndedListener=function(e){this.playerWrapper.addContentEndedListener(e)},p.prototype.addContentAndAdsEndedListener=function(e){this.contentAndAdsEndedListeners.push(e)},p.prototype.setAdBreakReadyListener=function(e){this.sdkImpl.setAdBreakReadyListener(e)},p.prototype.setShowCountdown=function(e){this.adUi.setShowCountdown(e),this.showCountdown=e,this.adUi.countdownDiv.style.display=this.showCountdown?"block":"none"},p.prototype.initializeAdDisplayContainer=function(){this.sdkImpl.initializeAdDisplayContainer()},p.prototype.playAdBreak=function(){this.sdkImpl.playAdBreak()},p.prototype.addEventListener=function(e,t){this.sdkImpl.addEventListener(e,t)},p.prototype.getAdsManager=function(){return this.sdkImpl.getAdsManager()},p.prototype.getPlayerId=function(){return this.playerWrapper.getPlayerId()},p.prototype.changeAdTag=function(e){this.reset(),this.settings.adTagUrl=e},p.prototype.pauseAd=function(){this.adUi.onAdsPaused(),this.sdkImpl.pauseAds()},p.prototype.resumeAd=function(){this.adUi.onAdsPlaying(),this.sdkImpl.resumeAds()},p.prototype.togglePlayback=function(){this.playerWrapper.togglePlayback()},p.prototype.adsWillAutoplay=function(){return void 0!==this.settings.adsWillAutoplay?this.settings.adsWillAutoplay:void 0!==this.settings.adWillAutoplay?this.settings.adWillAutoplay:!!this.playerWrapper.getPlayerOptions().autoplay},p.prototype.adsWillPlayMuted=function(){return void 0!==this.settings.adsWillPlayMuted?this.settings.adsWillPlayMuted:void 0!==this.settings.adWillPlayMuted?this.settings.adWillPlayMuted:void 0!==this.playerWrapper.getPlayerOptions().muted?this.playerWrapper.getPlayerOptions().muted:0==this.playerWrapper.getVolume()},p.prototype.triggerPlayerEvent=function(e,t){this.playerWrapper.triggerPlayerEvent(e,t)};var f=function(e,t,i){this.vjsPlayer=e,this.daiController=i,this.vjsControls=this.vjsPlayer.getChild("controlBar"),this.h5Player=null,this.vjsPlayer.on("dispose",this.playerDisposedListener.bind(this)),this.vjsPlayer.on("pause",this.onPause.bind(this)),this.vjsPlayer.on("play",this.onPlay.bind(this)),this.vjsPlayer.on("seeked",this.onSeekEnd.bind(this)),this.vjsPlayer.ready(this.onPlayerReady.bind(this)),this.vjsPlayer.ads||window.console.warn("You may be using a version of videojs-contrib-ads that is not compatible with your version of video.js."),this.vjsPlayer.ads(t)};f.prototype.playerDisposedListener=function(){this.contentEndedListeners=[],this.daiController.onPlayerDisposed()},f.prototype.onPause=function(){this.daiController.isInAdBreak()&&this.vjsControls.show()},f.prototype.onP
vendor: 10,279 bytes, line 2
2lay=function(){this.daiController.isInAdBreak()&&this.vjsControls.hide()},f.prototype.onSeekEnd=function(){this.daiController.onSeekEnd(this.vjsPlayer.currentTime())},f.prototype.onPlayerReady=function(){this.h5Player=document.getElementById(this.getPlayerId()).getElementsByClassName("vjs-tech")[0],this.daiController.onPlayerReady()},f.prototype.getStreamPlayer=function(){return this.h5Player},f.prototype.getVjsPlayer=function(){return this.vjsPlayer},f.prototype.getPlayerOptions=function(){return this.vjsPlayer.options_},f.prototype.getPlayerId=function(){return this.vjsPlayer.id()},f.prototype.onAdError=function(e){this.vjsControls.show();var t=void 0!==e.getError?e.getError():e.stack;this.vjsPlayer.trigger({type:"adserror",data:{AdError:t,AdErrorEvent:e}})},f.prototype.onAdBreakStart=function(){this.vjsControls.hide()},f.prototype.onAdBreakEnd=function(){this.vjsControls.show()},f.prototype.reset=function(){this.vjsControls.show()};var g=function(e){this.daiController=e,this.streamPlayer=null,this.vjsPlayer=null,this.streamManager=null,this.uiSettings=new google.ima.dai.api.UiSettings,this.isAdBreak=!1,this.isSnapback=!1,this.snapForwardTime=0,this.timedMetadata,this.metadataLoaded={},this.SOURCE_TYPES={hls:"application/x-mpegURL",dash:"application/dash+xml"}};g.prototype.initImaDai=function(){this.streamPlayer=this.daiController.getStreamPlayer(),this.vjsPlayer=this.daiController.getVjsPlayer(),this.createAdUiDiv(),this.daiController.getSettings().locale&&this.uiSettings.setLocale(this.daiController.getSettings().locale),this.streamManager=new google.ima.dai.api.StreamManager(this.streamPlayer,this.adUiDiv,this.uiSettings),this.streamPlayer.addEventListener("pause",this.onStreamPause),this.streamPlayer.addEventListener("play",this.onStreamPlay),this.streamManager.addEventListener([google.ima.dai.api.StreamEvent.Type.LOADED,google.ima.dai.api.StreamEvent.Type.ERROR,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED],this.onStreamEvent.bind(this),!1),this.vjsPlayer.textTracks().onaddtrack=this.onAddTrack.bind(this),this.vjsPlayer.trigger({type:"stream-manager",StreamManager:this.streamManager}),this.requestStream()},g.prototype.onAddTrack=function(e){var t=this,i=e.track;"metadata"===i.kind&&(i.mode="hidden",i.addEventListener("cuechange",(function(e){var n,r=l(i.activeCues_);try{for(r.s();!(n=r.n()).done;){var s=n.value,a={};a[s.value.key]=s.value.data,t.streamManager.onTimedMetadata(a)}}catch(e){r.e(e)}finally{r.f()}})))},g.prototype.createAdUiDiv=function(){var e=document.createElement("div");e.id="ad-ui",e.style.height="calc(100% - 3em)",this.streamPlayer.parentNode.appendChild(e),this.adUiDiv=e},g.prototype.onStreamPause=function(){this.isAdBreak&&(this.adUiDiv.style.display="none")},g.prototype.onStreamPlay=function(){this.isAdBreak&&(this.adUiDiv.style.display="block")},g.prototype.onSeekEnd=function(e){if("live"!==this.daiController.getSettings().streamType)if(this.isSnapback)this.isSnapback=!1;else{var t=this.streamManager.previousCuePointForStreamTime(e);t&&!t.played&&(this.isSnapback=!0,this.snapForwardTime=e,this.vjsPlayer.currentTime(t.start))}},g.prototype.onStreamEvent=function(e){switch(e.type){case google.ima.dai.api.StreamEvent.Type.LOADED:this.loadUrl(e.getStreamData().url);break;case google.ima.dai.api.StreamEvent.Type.ERROR:window.console.warn("Error loading stream, attempting to play backup stream. "+e.getStreamData().errorMessage),this.daiController.onErrorLoadingAds(e),this.daiController.getSettings().fallbackStreamUrl&&this.loadurl(this.daiController.getSettings().fallbackStreamUrl);break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED:this.isAdBreak=!0,this.adUiDiv.style.display="block",this.daiController.onAdBreakStart();break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED:this.isAdBreak=!1,this.adUiDiv.style.display="none",this.daiController.onAdBreakEnd(),this.snapForwardTime&&this.snapForwardTime>this.vjsPlayer.currentTime()&&(this.vjsPlayer.currentTime(this.snapForwardTime),this.snapForwardTime=0)}},g.prototype.loadUrl=function(e){this.vjsPlayer.ready(function(){var t=this.daiController.getSettings().streamFormat;this.vjsPlayer.src({src:e,type:this.SOURCE_TYPES[t]});var i=this.daiController.getSettings().bookmarkTime;if(i){var n=this.streamManager.streamTimeForContentTime(i);this.isSnapback=!0,this.vjsPlayer.currentTime(n)}}.bind(this))},g.prototype.requestStream=function(){var e,t=this.daiController.getSettings().streamType;if("vod"===t?((e=new google.ima.dai.api.VODStreamRequest).contentSourceId=this.daiController.getSettings().cmsId,e.videoId=this.daiController.getSettings().videoId):"live"===t?(e=new google.ima.dai.api.LiveStreamRequest).assetKey=this.daiController.getSettings().assetKey:window.console.warn("No valid stream type selected"),e.format=this.daiController.getSettings().streamFormat,this.daiController.getSettings().apiKey&&(e.apiKey=this.daiController.getSettings().apiKey),this.daiController.getSettings().authToken&&(e.authToken=this.daiController.getSettings().authToken),this.daiController.getSettings().adTagParameters&&(e.adTagParameters=this.daiController.getSettings().adTagParameters),this.daiController.getSettings().streamActivityMonitorId&&(e.streamActivityMonitorId=this.daiController.getSettings().streamActivityMonitorId),this.daiController.getSettings().omidMode){e.omidAccessModeRules={};var i=this.daiController.getSettings().omidMode;i.FULL&&(e.omidAccessModeRules[google.ima.OmidAccessMode.FULL]=i.FULL),i.DOMAIN&&(e.omidAccessModeRules[google.ima.OmidAccessMode.DOMAIN]=i.DOMAIN),i.LIMITED&&(e.omidAccessModeRules[google.ima.OmidAccessMode.LIMITED]=i.LIMITED)}this.streamManager.requestStream(e),this.vjsPlayer.trigger({type:"stream-request",StreamRequest:e})},g.prototype.onPlayerReady=function(){this.initImaDai()},g.prototype.onPlayerDisposed=function(){this.streamManager&&this.streamManager.reset()},g.prototype.getStreamManager=function(){return this.StreamManager},g.prototype.reset=function(){this.StreamManager&&this.StreamManager.reset()};var m=function(e,t){this.inAdBreak=!1,this.settings={},this.isMobile=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i),this.isIos=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i),this.initWithSettings(t);var i={debug:this.settings.debug,timeout:this.settings.timeout,prerollTimeout:this.settings.prerollTimeout},n=Object.assign({},i,t.contribAdsSettings||{});this.playerWrapper=new f(e,n,this),this.sdkImpl=new g(this)};m.IMA_DEFAULTS={adLabel:"Advertisement",adLabelNofN:"of",debug:!1,disableAdControls:!1,showControlsForJSAds:!0},m.prototype.initWithSettings=function(e){this.settings=Object.assign({},m.IMA_DEFAULTS,e||{}),this.warnAboutDeprecatedSettings(),this.showCountdown=!0,!1===this.settings.showCountdown&&(this.showCountdown=!1)},m.prototype.warnAboutDeprecatedSettings=function(){var e=this;[].forEach((function(t){void 0!==e.settings[t]&&console.warn("WARNING: videojs.imaDai setting "+t+" is deprecated")}))},m.prototype.getSettings=function(){return this.settings},m.prototype.getIsMobile=function(){return this.isMobile},m.prototype.getIsIos=function(){return this.isIos},m.prototype.getStreamPlayer=function(){return this.playerWrapper.getStreamPlayer()},m.prototype.getVjsPlayer=function(){return this.playerWrapper.getVjsPlayer()},m.prototype.requestStream=function(){this.sdkImpl.requestStream()},m.prototype.setSetting=function(e,t){this.settings[e]=t},m.prototype.onErrorLoadingAds=function(e){this.playerWrapper.onAdError(e)},m.prototype.onAdError=function(e){this.playerWrapper.onAdError(e)},m.prototype.onAdBreakStart=function(){this.inAdBreak=!0,this.playerWrapper.onAdBreakStart()},m.prototype.onAdBreakEnd=function(){this.inAdBreak=!1,this.playerWrapper.onAdBreakEnd()},m.prototype.onPlayerDisposed=function(){this.contentAndAdsEndedListeners=[],this.sdkImpl.onPlayerDisposed()},m.prototype.isInAdBreak=function(){return this.inAdBreak},m.prototype.onSeekEnd=function(e){this.sdkImpl.onSeekEnd(e)},m.prototype.onPlayerReady=function(){this.sdkImpl.onPlayerReady()},m.prototype.reset=function(){this.sdkImpl.reset(),this.playerWrapper.reset()},m.prototype.addEventListener=function(e,t){this.sdkImpl.addEventListener(e,t)},m.prototype.getStreamManager=function(){return this.sdkImpl.getStreamManager()},m.prototype.getPlayerId=function(){return this.playerWrapper.getPlayerId()},m.prototype.streamWillAutoplay=function(){return void 0!==this.settings.streamWillAutoplay?this.settings.streamWillAutoplay:!!this.playerWrapper.getPlayerOptions().autoplay},m.prototype.triggerPlayerEvent=function(e,t){this.playerWrapper.triggerPlayerEvent(e,t)};var y=function(e,t){this.controller=new p(e,t),this.addContentAndAdsEndedListener=function(e){this.controller.addContentAndAdsEndedListener(e)}.bind(this),this.addContentEndedListener=function(e){this.controller.addContentEndedListener(e)}.bind(this),this.addEventListener=function(e,t){this.controller.addEventListener(e,t)}.bind(this),this.changeAdTag=function(e){this.controller.changeAdTag(e)}.bind(this),this.getAdsManager=function(){return this.controller.getAdsManager()}.bind(this),this.initializeAdDisplayContainer=function(){this.controller.initializeAdDisplayContainer()}.bind(this),this.pauseAd=function(){this.controller.pauseAd()}.bind(this),this.playAdBreak=function(){this.controller.playAdBreak()}.bind(this),this.requestAds=function(){this.controller.requestAds()}.bind(this),this.resumeAd=function(){this.controller.resumeAd()}.bind(this),this.setAdBreakReadyListener=function(e){this.controller.setAdBreakReadyListener(e)}.bind(this),this.setContentWithAdTag=function(e,t){this.controller.setContentWithAdTag(e,t)}.bind(this),this.setContentWithAdsResponse=function(e,t){this.controller.setContentWithAdsResponse(e,t)}.bind(this),this.setContentWithAdsRequest=function(e,t){this.controller.setContentWithAdsRequest(e,t)}.bind(this),this.setShowCountdown=function(e){this.controller.setShowCountdown(e)}.bind(this)},v=function(e,t){this.controller=new m(e,t),this.streamEndedListener=function(e){this.controller.addStreamEndedListener(e)}.bind(this),this.addEventListener=function(e,t){this.controller.addEventListener(e,t)}
2.bind(this),this.getStreamManager=function(){return this.controller.getStreamManager()}.bind(this)},_=a((function e(t,i){r(this,e),"hls"===(t=t.toLowerCase())||"dash"===t?"dash"!==t?"string"==typeof i?(this.streamFormat=t,this.assetKey=i):window.console.error("assetKey error: value must be string."):window.console.error("streamFormat error: DASH streams are notcurrently supported by this plugin."):window.console.error("VodStream error: incorrect streamFormat.")})),b=a((function e(t,i,n){r(this,e),"hls"===(t=t.toLowerCase())||"dash"===t?"dash"!==t?"string"==typeof i?"string"==typeof n?(this.streamFormat=t,this.cmsId=i,this.videoId=n):window.console.error("videoId error: value must be string."):window.console.error("cmsId error: value must be string."):window.console.error("streamFormat error: DASH streams are notcurrently supported by this plugin."):window.console.error("VodStream error: incorrect streamFormat.")})),T=t.registerPlugin||t.plugin;T("ima",(function(e){this.ima=new y(this,e)})),T("imaDai",(function(e,t){if(e instanceof _)t.streamType="live",t.assetKey=e.assetKey;else{if(!(e instanceof b))return void window.console.error("initDai() first parameter must be an instance of LiveStream or VodStream.");t.streamType="vod",t.cmsId=e.cmsId,t.videoId=e.videoId}t.streamFormat=e.streamFormat,this.imaDai=new v(this,t)})),e.default=y,e.VodStream=b,e.LiveStream=_,Object.defineProperty(e,"__esModule",{value:!0})}(t,i(2613))},368:(e,t,i)=>{"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(i(2613));let s=e=>{const t=e.playlist.autoadvance_;t.timeout&&e.clearTimeout(t.timeout),t.trigger&&e.off("ended",t.trigger),t.abortOrErrorHandler&&e.off(["abort","error"],t.abortOrErrorHandler),t.timeout=null,t.trigger=null,t.abortOrErrorHandler=null};const a=(e,t)=>{var i;s(e),"number"==typeof(i=t)&&!isNaN(i)&&i>=0&&i<1/0?(e.playlist.autoadvance_.delay=t,e.playlist.autoadvance_.trigger=function(){const i=()=>a(e,t);e.one("play",i),e.playlist.autoadvance_.timeout=e.setTimeout((()=>{s(e),e.off("play",i),e.one("loadstart",(function(){e.playlist.isAutoadvancing=!0})),e.playlist.next(!0)}),1e3*t)},e.playlist.autoadvance_.abortOrErrorHandler=function(){e.playlist.isAutoadvancing=!1},e.one("ended",e.playlist.autoadvance_.trigger),e.one(["abort","error"],e.playlist.autoadvance_.abortOrErrorHandler)):e.playlist.autoadvance_.delay=null};let o=1;const l=e=>{let t=e;return e&&"object"==typeof e||(t=Object(e),t.originalValue=e),t.playlistItemId_=o++,t},u=e=>e.map(l),d=(e,t)=>{let i=e,n=t;return"object"==typeof e&&(i=e.src),"object"==typeof t&&(n=t.src),/^\/\//.test(i)&&(n=n.slice(n.indexOf("//"))),/^\/\//.test(n)&&(i=i.slice(i.indexOf("//"))),i===n},c=(e,t)=>{for(let i=0;i<e.length;i++){const n=e[i].sources;if(Array.isArray(n))for(let e=0;e<n.length;e++){const r=n[e];if(r&&d(r,t))return i}}return-1};const h=function(e,t){!function(e,t,i=0){let n=null,o=!1;const l=e.playlist=(t,i=0)=>{if(o)throw new Error("do not call playlist() during a playlist change");if(Array.isArray(t)){const r=Array.isArray(n)?n.slice():null;n=u(t),o=!0,e.trigger({type:"duringplaylistchange",nextIndex:i,nextPlaylist:t,previousIndex:l.currentIndex_,previousPlaylist:r||[]}),o=!1,-1!==i&&l.currentItem(i),r&&e.setTimeout((()=>{e.trigger({type:"playlistchange",action:"change"})}),0)}return n.map((e=>e.originalValue||e))};e.on("loadstart",(()=>{-1===l.currentItem()&&s(e)})),l.currentIndex_=-1,l.player_=e,l.autoadvance_={},l.repeat_=!1,l.currentPlaylistItemId_=null,l.currentItem=(e,t)=>{if(o)return l.currentIndex_;if("number"==typeof e&&l.currentIndex_!==e&&e>=0&&e<n.length)return l.currentIndex_=e,((e,t,i=!1)=>{const n=!e.paused()||e.ended(),r=()=>{e.audioPosterMode()&&e.poster(t.poster||"")};e.trigger("beforeplaylistitem",t.originalValue||t),t.playlistItemId_&&(e.playlist.currentPlaylistItemId_=t.playlistItemId_),e.poster(i?"":t.poster||""),e.off("audiopostermodechange",r),e.one("audiopostermodechange",r),e.src(t.sources),(e=>{const t=e.remoteTextTracks();let i=t&&t.length||0;for(;i--;)e.removeRemoteTextTrack(t[i])})(e),e.ready((()=>
2{if((t.textTracks||[]).forEach(e.addRemoteTextTrack.bind(e)),e.trigger("playlistitem",t.originalValue||t),n){const t=e.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(e=>{}))}a(e,e.playlist.autoadvance_.delay)}))})(l.player_,n[l.currentIndex_],t),l.currentIndex_;const i=l.player_.currentSrc()||"";if(l.currentPlaylistItemId_){const e=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].playlistItemId_===t)return i;return-1})(n,l.currentPlaylistItemId_),t=n[e];if(t&&Array.isArray(t.sources)&&c([t],i)>-1)return l.currentIndex_=e,l.currentIndex_;l.currentPlaylistItemId_=null}return l.currentIndex_=l.indexOf(i),l.currentIndex_},l.add=(t,i)=>{if(o)throw new Error("cannot modify a playlist that is currently changing");("number"!=typeof i||i<0||i>n.length)&&(i=n.length),Array.isArray(t)||(t=[t]),n.splice(i,0,...u(t)),e.trigger({type:"playlistchange",action:"add"}),e.trigger({type:"playlistadd",count:t.length,index:i})},l.remove=(t,i=1)=>{if(o)throw new Error("cannot modify a playlist that is currently changing");"number"!=typeof t||t<0||t>n.length||(n.splice(t,i),e.trigger({type:"playlistchange",action:"remove"}),e.trigger({type:"playlistremove",count:i,index:t}))},l.contains=e=>-1!==l.indexOf(e),l.indexOf=e=>{if("string"==typeof e)return c(n,e);const t=Array.isArray(e)?e:e.sources;for(let e=0;e<t.length;e++){const i=t[e];if("string"==typeof i)return c(n,i);if(i.src)return c(n,i.src)}return-1},l.currentIndex=()=>l.currentItem(),l.lastIndex=()=>n.length-1,l.nextIndex=()=>{const e=l.currentItem();if(-1===e)return-1;const t=l.lastIndex();return l.repeat_&&e===t?0:Math.min(e+1,t)},l.previousIndex=()=>{const e=l.currentItem();return-1===e?-1:l.repeat_&&0===e?l.lastIndex():Math.max(e-1,0)},l.first=()=>{if(o)return;const e=l.currentItem(0);if(n.length)return n[e].originalValue||n[e];l.currentIndex_=-1},l.last=()=>{if(o)return;const e=l.currentItem(l.lastIndex());if(n.length)return n[e].originalValue||n[e];l.currentIndex_=-1},l.next=(e=!1)=>{if(o)return;const t=l.nextIndex();if(t!==l.currentIndex_){const i=l.currentItem(t,e);return n[i].originalValue||n[i]}},l.previous=()=>{if(o)return;const e=l.previousIndex();if(e!==l.currentIndex_){const t=l.currentItem(e);return n[t].originalValue||n[t]}},l.autoadvance=e=>{a(l.player_,e)},l.repeat=e=>void 0===e?l.repeat_:"boolean"==typeof e?(l.repeat_=!!e,l.repeat_):void r.default.log.error("videojs-playlist: Invalid value for repeat",e),l.sort=t=>{n.length&&(n.sort(t),o||e.trigger("playlistsorted"))},l.reverse=()=>{n.length&&(n.reverse(),o||e.trigger("playlistsorted"))},l.shuffle=({rest:t}={})=>{let i=0,r=n;t&&(i=l.currentIndex_+1,r=n.slice(i)),r.length<=1||((e=>{let t=-1;const i=e.length-1;for(;++t<e.length;){const n=t+Math.floor(Math.random()*(i-t+1)),r=e[n];e[n]=e[t],e[t]=r}})(r),t&&n.splice(...[i,r.length].concat(r)),o||e.trigger("playlistsorted"))},Array.isArray(t)?l(t,i):n=[]}(this,e,t)};(r.default.registerPlugin||r.default.plugin)("playlist",h),h.VERSION="5.2.0",e.exports=h},4784:(e,t,i)=>{var n=i(9840),r=e.exports={WebVTT:i(6311),VTTCue:i(184),VTTRegion:i(5891)};n.vttjs=r,n.WebVTT=r.WebVTT;var s=r.VTTCue,a=r.VTTRegion,o=n.VTTCue,l=n.VTTRegion;r.shim=function(){n.VTTCue=s,n.VTTRegion=a},r.restore=function(){n.VTTCue=o,n.VTTRegion=l},n.VTTCue||r.shim()},6311:(e,t,i)=>{var n=i(9697),r=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function s(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}var i=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function o(){this.values=r(null)}function l(e,t,i,n){var r=n?e.split(n):[e];for(var s in r)if("string"==typeof r[s]){var a=r[s].split(i);2===a.length&&t(a[0].trim(),a[1].trim())}}function u(e,t,i){var n=e;function r(){var t=a(e);if(null===t)throw new s(s.Errors.BadTimeStamp,"Malformed timestamp: "+n);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=r(),u(),"--\x3e"!==e.substr(0,3))throw new s(s.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+n);e=e.substr(3),u(),t.endTime=r(),u(),function(e,t){var n=new o;l(e,(function(e,t){switch(e){case"region":for(var r=i.length-1;r>=0;r--)if(i[r].id===t){n.set(e,i[r].region);break}break;case"vertical":n.alt(e,t,["rl","lr"]);break;case"line":var s=t.split(","),a=s[0];n.integer(e,a),n.percent(e,a)&&n.set("snapToLines",!1),n.alt(e,a,["auto"]),2===s.length&&n.alt("lineAlign",s[1],["start","center","end"]);break;case"position":s=t.split(","),n.percent(e,s[0]),2===s.length&&n.alt("positionAlign",s[1],["start","center","end"]);break;case"size":n.percent(e,t);break;case"align":n.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=n.get("region",null),t.vertical=n.get("vertical","");try{t.line=n.get("line","auto")}catch(e){}t.lineAlign=n.get("lineAlign","start"),t.snapToLines=n.get("snapToLines",!0),t.size=n.get("size",100);try{t.align=n.get("align","center")}catch(e){t.align=n.get("align","middle")}try{t.position=n.get("position","auto")}catch(e){t.position=n.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=n.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}s.prototype=r(Error.prototype),s.prototype.constructor=s,s.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};
vendor: 4,807 bytes, line 2
2var d=n.createElement&&n.createElement("textarea"),c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={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)"},p={v:"title",lang:"lang"},f={rt:"ruby"};function g(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function n(e,t){return!f[t.localName]||f[t.localName]===e.localName}function r(t,i){var n=c[t];if(!n)return null;var r=e.document.createElement(n),s=p[t];return s&&i&&(r[s]=i.trim()),r}for(var s,o,l=e.document.createElement("div"),u=l,g=[];null!==(s=i());)if("<"!==s[0])u.appendChild(e.document.createTextNode((o=s,d.innerHTML=o,o=d.textContent,d.textContent="",o)));else{if("/"===s[1]){g.length&&g[g.length-1]===s.substr(2).replace(">","")&&(g.pop(),u=u.parentNode);continue}var m,y=a(s.substr(1,s.length-2));if(y){m=e.document.createProcessingInstruction("timestamp",y),u.appendChild(m);continue}var v=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!v)continue;if(!(m=r(v[1],v[3])))continue;if(!n(u,m))continue;if(v[2]){var _=v[2].split(".");_.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(h.hasOwnProperty(i)){var n=t?"background-color":"color",r=h[i];m.style[n]=r}})),m.className=_.join(" ")}g.push(v[1]),u.appendChild(m),u=m}return l}var m=[[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 y(e){for(var t=0;t<m.length;t++){var i=m[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function v(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function n(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function r(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var s=i.match(/^.*(\n|\r)/);return s?(e.length=0,s[0]):i}return"ruby"===t.tagName?r(e):t.childNodes?(n(e,t),r(e)):void 0}for(n(t,e);i=r(t);)for(var s=0;s<i.length;s++)if(y(i.charCodeAt(s)))return"rtl";return"ltr"}function _(){}function b(e,t,i){_.call(this),this.cue=t,this.cueDiv=g(e,t.text);var n={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:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=e.document.createElement("div"),n={direction:v(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case"start":case"line-left":r=t.position;break;case"center":r=t.position-t.size/2;break;case"end":case"line-right":r=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")}
vendor: 5,724 bytes, line 2
2)}}function T(e){var t,i,n,r;if(e.div){i=e.div.offsetHeight,n=e.div.offsetWidth,r=e.div.offsetTop;var s=(s=e.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();e=e.div.getBoundingClientRect(),t=s?Math.max(s[0]&&s[0].height||0,e.height/s.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||i,this.bottom=e.bottom||r+(e.height||i),this.width=e.width||n,this.lineHeight=void 0!==t?t:e.lineHeight}function S(e,t,i,n){var r=new T(t),s=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,n=0,r=0;r<i.length&&i[r]!==t;r++)"showing"===i[r].mode&&n++;return-1*++n}(s),o=[];if(s.snapToLines){var l;switch(s.vertical){case"":o=["+y","-y"],l="height";break;case"rl":o=["+x","-x"],l="width";break;case"lr":o=["-x","+x"],l="width"}var u=r.lineHeight,d=u*Math.round(a),c=i[l]+u,h=o[0];Math.abs(d)>c&&(d=d<0?-1:1,d*=Math.ceil(c/u)*u),a<0&&(d+=""===s.vertical?i.height:i.width,o=o.reverse()),r.move(h,d)}else{var p=r.lineHeight/i.height*100;switch(s.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}o=["+y","-x","+x","-y"],r=new T(t)}var f=function(e,t){for(var r,s=new T(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(n);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(r=new T(e),a=l),e=new T(s)}return r||s}(r,o);t.move(f.toCSSCompatValues(i))}function A(){}_.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},_.prototype.formatStyle=function(e,t){return 0===e?0:e+t},b.prototype=r(_.prototype),b.prototype.constructor=b,T.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},T.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},T.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},T.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},T.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},T.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i}},A.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},A.convertCueToDOMTree=function(e,t){return e&&t?g(e,t):null},A.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var n=e.document.createElement("div");if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin="1.5%",i.appendChild(n),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var r=[],s=T.getSimpleBoxPosition(n),a={font:Math.round(.05*s.height*100)/100+"px sans-serif"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new b(e,o,a),n.appendChild(i.div),S(0,i,s,r),o.displayState=i.div,r.push(T.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)n.appendChild(t[o].displayState)},A.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},A.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof s))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t,i=this;function n(){for(var e=i.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var n=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,i.buffer=e.substr(t),n}e&&(i.buffer+=i.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;var d=(r=n()).match(/^WEBVTT([ \t].*)?$/);if(!d||!d[0])throw new s(s.Errors.BadSignature);i.state="HEADER"}for(var c=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(c?c=!1:r=n(),i.state){case"HEADER":/:/.test(r)?(t=r).match(/X-TIMESTAMP-MAP/)?l(t,(function(e,t){"X-TIMESTAMP-MAP"===e&&function(e){var t=new o;l(e,(function(e,i){switch(e){case"MPEGT":t.integer(e+"S",i);break;case"LOCA":t.set(e+"L",a(i))}}),/[^\d]:/,/,/),i.ontimestampmap&&i.ontimestampmap({MPEGTS:t.get("MPEGTS"),LOCAL:t.get("LOCAL")})}(t)}),/=/):l(t,(function(e,t){"Region"===e&&function(e){var t=new o;if(l(e,(function(e,i){switch(e){case"id":t.set(e,i);break;case"width":t.percent(e,i);break;
vendor: 2,295 bytes, line 2
2case"lines":t.integer(e,i);break;case"regionanchor":case"viewportanchor":var n=i.split(",");if(2!==n.length)break;var r=new o;if(r.percent("x",n[0]),r.percent("y",n[1]),!r.has("x")||!r.has("y"))break;t.set(e+"X",r.get("x")),t.set(e+"Y",r.get("y"));break;case"scroll":t.alt(e,i,["up"])}}),/=/,/\s/),t.has("id")){var n=new(i.vttjs.VTTRegion||i.window.VTTRegion);n.width=t.get("width",100),n.lines=t.get("lines",3),n.regionAnchorX=t.get("regionanchorX",0),n.regionAnchorY=t.get("regionanchorY",100),n.viewportAnchorX=t.get("viewportanchorX",0),n.viewportAnchorY=t.get("viewportanchorY",100),n.scroll=t.get("scroll",""),i.onregion&&i.onregion(n),i.regionList.push({id:t.get("id"),region:n})}}(t)}),/:/):r||(i.state="ID");continue;case"NOTE":r||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){i.state="NOTE";break}if(!r)continue;i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,"");try{i.cue.align="center"}catch(e){i.cue.align="middle"}if(i.state="CUE",-1===r.indexOf("--\x3e")){i.cue.id=r;continue}case"CUE":try{u(r,i.cue,i.regionList)}catch(e){i.reportOrThrowError(e),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var h=-1!==r.indexOf("--\x3e");if(!r||h&&(c=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=r.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":r||(i.state="ID");continue}}}catch(e){i.reportOrThrowError(e),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new s(s.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=A},184:e=>{var t={"":1,lr:1,rl:1},i={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function n(e){return"string"==typeof e&&!!i[e.toLowerCase()]&&e.toLowerCase()}function r(e,i,r){this.hasBeenReset=!1;var s="",a=!1,o=e,l=i,u=r,d=null,c="",h=!0,p="auto",f="start",g="auto",m="auto",y=100,v="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a}
vendor: 3,068 bytes, line 2
2,set:function(e){a=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");l=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return u},set:function(e){u=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return d},set:function(e){d=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var i=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===i)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");c=i,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");p=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=n(e);t?(f=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");g=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=n(e);t?(m=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");y=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return v},set:function(e){var t=n(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");v=t,this.hasBeenReset=!0}}}),this.displayState=void 0}r.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=r},5891:e=>{var t={"":!0,up:!0};function i(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,n=3,r=0,s=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!i(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return n},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");n=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!i(e))throw new Error("RegionAnchorX must be between 0 and 100.");s=e}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!i(e))throw new Error("RegionAnchorY must be between 0 and 100.");r=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!i(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a}
2,set:function(e){if(!i(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var i=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);!1===i?console.warn("Scroll: an invalid or illegal string was specified."):l=i}}})}},8037:()=>{var e,t;!function(){window.WebComponents=window.WebComponents||{flags:{}};var e=document.querySelector('script[src*="webcomponents-lite.js"]'),t={};if(!t.noOpts){if(location.search.slice(1).split("&").forEach((function(e){var i,n=e.split("=");n[0]&&(i=n[0].match(/wc-(.+)/))&&(t[i[1]]=n[1]||!0)})),e)for(var i,n=0;i=e.attributes[n];n++)"src"!==i.name&&(t[i.name]=i.value||!0);if(t.log&&t.log.split){var r=t.log.split(",");t.log={},r.forEach((function(e){t.log[e]=!0}))}else t.log={}}t.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=t.register),WebComponents.flags=t}(),function(e){"use strict";var t=!1;if(!e.forceJURL)try{var i=new URL("b","http://a");i.pathname="c%20d",t="http://a/c%20d"===i.href}catch(e){}if(!t){var n=Object.create(null);n.ftp=21,n.file=0,n.gopher=70,n.http=80,n.https=443,n.ws=80,n.wss=443;var r=Object.create(null);r["%2e"]=".",r[".%2e"]="..",r["%2e."]="..",r["%2e%2e"]="..";var s=void 0,a=/[a-zA-Z]/,o=/[a-zA-Z0-9\+\-\.]/;m.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var e="";return""==this._username&&null==this._password||(e=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment},set href(e){g.call(this),f.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||f.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&f.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&f.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&f.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],f.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&(this._query="?","?"==e[0]&&(e=e.slice(1)),f.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(e){this._isInvalid||(this._fragment="#","#"==e[0]&&(e=e.slice(1)),f.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return(e=this.host)?this._scheme+"://"+e:""}};var l=e.URL;l&&(m.createObjectURL=function(e){return l.createObjectURL.apply(l,arguments)},m.revokeObjectURL=function(e){l.revokeObjectURL(e)}),e.URL=m}function u(e){return void 0!==n[e]}function d(){g.call(this),this._isInvalid=!0}function c(e){return""==e&&d.call(this),e.toLowerCase()}function h(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function p(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function f(e,t,i){function l(e){_.push(e)}var f=t||"scheme start",g=0,m="",y=!1,v=!1,_=[];e:for(;(e[g-1]!=s||0==g)&&!this._isInvalid;){var b=e[g];switch(f){case"scheme start":if(!b||!a.test(b)){if(t){l("Invalid scheme.");break e}m="",f="no scheme";continue}m+=b.toLowerCase(),f="scheme";break;case"scheme":if(b&&o.test(b))m+=b.toLowerCase();else{if(":"!=b){if(t){if(s==b)break e;l("Code point not allowed in scheme: "+b);break e}m="",g=0,f="no scheme";continue}if(this._scheme=m,m="",t)break e;u(this._scheme)&&(this._isRelative=!0),f="file"==this._scheme?"relative":this._isRelative&&i&&i._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==b?(this._query="?",f="query"):"#"==b?(this._fragment="#",f="fragment"):s!=b&&"\t"!=b&&"\n"!=b&&"\r"!=b&&(this._schemeData+=h(b));break;case"no scheme":if(i&&u(i._scheme)){f="relative";continue}l("Missing scheme."),d.call(this);break;case"relative or authority":if("/"!=b||"/"!=e[g+1]){l("Expected /, got: "+b),f="relative";continue}f="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=i._scheme),s==b){this._host=i._host,this._port=i._port,this._path=i._path.slice(),this._query=i._query,this._username=i._username,this._password=i._password;break e}
2if("/"==b||"\\"==b)"\\"==b&&l("\\ is an invalid code point."),f="relative slash";else if("?"==b)this._host=i._host,this._port=i._port,this._path=i._path.slice(),this._query="?",this._username=i._username,this._password=i._password,f="query";else{if("#"!=b){var T=e[g+1],S=e[g+2];("file"!=this._scheme||!a.test(b)||":"!=T&&"|"!=T||s!=S&&"/"!=S&&"\\"!=S&&"?"!=S&&"#"!=S)&&(this._host=i._host,this._port=i._port,this._username=i._username,this._password=i._password,this._path=i._path.slice(),this._path.pop()),f="relative path";continue}this._host=i._host,this._port=i._port,this._path=i._path.slice(),this._query=i._query,this._fragment="#",this._username=i._username,this._password=i._password,f="fragment"}break;case"relative slash":if("/"!=b&&"\\"!=b){"file"!=this._scheme&&(this._host=i._host,this._port=i._port,this._username=i._username,this._password=i._password),f="relative path";continue}"\\"==b&&l("\\ is an invalid code point."),f="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=b){l("Expected '/', got: "+b),f="authority ignore slashes";continue}f="authority second slash";break;case"authority second slash":if(f="authority ignore slashes","/"!=b){l("Expected '/', got: "+b);continue}break;case"authority ignore slashes":if("/"!=b&&"\\"!=b){f="authority";continue}l("Expected authority, got: "+b);break;case"authority":if("@"==b){y&&(l("@ already seen."),m+="%40"),y=!0;for(var A=0;A<m.length;A++){var w=m[A];if("\t"!=w&&"\n"!=w&&"\r"!=w)if(":"!=w||null!==this._password){var E=h(w);null!==this._password?this._password+=E:this._username+=E}else this._password="";else l("Invalid whitespace in authority.")}m=""}else{if(s==b||"/"==b||"\\"==b||"?"==b||"#"==b){g-=m.length,m="",f="host";continue}m+=b}break;case"file host":if(s==b||"/"==b||"\\"==b||"?"==b||"#"==b){2!=m.length||!a.test(m[0])||":"!=m[1]&&"|"!=m[1]?(0==m.length||(this._host=c.call(this,m),m=""),f="relative path start"):f="relative path";continue}"\t"==b||"\n"==b||"\r"==b?l("Invalid whitespace in file host."):m+=b;break;case"host":case"hostname":if(":"!=b||v){if(s==b||"/"==b||"\\"==b||"?"==b||"#"==b){if(this._host=c.call(this,m),m="",f="relative path start",t)break e;continue}"\t"!=b&&"\n"!=b&&"\r"!=b?("["==b?v=!0:"]"==b&&(v=!1),m+=b):l("Invalid code point in host/hostname: "+b)}else if(this._host=c.call(this,m),m="",f="port","hostname"==t)break e;break;case"port":if(/[0-9]/.test(b))m+=b;else{if(s==b||"/"==b||"\\"==b||"?"==b||"#"==b||t){if(""!=m){var C=parseInt(m,10);C!=n[this._scheme]&&(this._port=C+""),m=""}if(t)break e;f="relative path start";continue}"\t"==b||"\n"==b||"\r"==b?l("Invalid code point in port: "+b):d.call(this)}break;case"relative path start":if("\\"==b&&l("'\\' not allowed in path."),f="relative path","/"!=b&&"\\"!=b)continue;break;case"relative path":var k;s!=b&&"/"!=b&&"\\"!=b&&(t||"?"!=b&&"#"!=b)?"\t"!=b&&"\n"!=b&&"\r"!=b&&(m+=h(b)):("\\"==b&&l("\\ not allowed in relative path."),(k=r[m.toLowerCase()])&&(m=k),".."==m?(this._path.pop(),"/"!=b&&"\\"!=b&&this._path.push("")):"."==m&&"/"!=b&&"\\"!=b?this._path.push(""):"."!=m&&("file"==this._scheme&&0==this._path.length&&2==m.length&&a.test(m[0])&&"|"==m[1]&&(m=m[0]+":"),this._path.push(m)),m="","?"==b?(this._query="?",f="query"):"#"==b&&(this._fragment="#",f="fragment"));break;case"query":t||"#"!=b?s!=b&&"\t"!=b&&"\n"!=b&&"\r"!=b&&(this._query+=p(b)):(this._fragment="#",f="fragment");break;case"fragment":s!=b&&"\t"!=b&&"\n"!=b&&"\r"!=b&&(this._fragment+=b)}g++}}function g(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function m(e,t){void 0===t||t instanceof m||(t=new m(String(t))),this._url=e,g.call(this);var i=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");f.call(this,i,null,t)}}(self),"undefined"==typeof WeakMap&&function(){var e=Object.defineProperty,t=Date.now()%1e9,i=function(){this.name="__st"+(1e9*Math.random()>>>0)+t+++"__"};i.prototype={set:function(t,i){var n=t[this.name];return n&&n[0]===t?n[1]=i:e(t,this.name,{value:[t,i],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},delete:function(e){var t=e[this.name];return!(!t||t[0]!==e||(t[0]=t[1]=void 0,0))},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=i}(),function(e){if(!e.JsMutationObserver){var t,i=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))t=setTimeout;else if(window.setImmediate)t=window.setImmediate;else{var n=[],r=String(Math.random());window.addEventListener("message",(function(e){if(e.data===r){var t=n;n=[],t.forEach((function(e){e()}
2))}})),t=function(e){n.push(e),window.postMessage(r,"*")}}var s,a,o=!1,l=[],u=0;h.prototype={observe:function(e,t){var n;if(n=e,e=window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(n)||n,!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var r,s=i.get(e);s||i.set(e,s=[]);for(var a=0;a<s.length;a++)if(s[a].observer===this){(r=s[a]).removeListeners(),r.options=t;break}r||(r=new m(this,e,t),s.push(r),this.nodes_.push(e)),r.addListeners()},disconnect:function(){this.nodes_.forEach((function(e){for(var t=i.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){r.removeListeners(),t.splice(n,1);break}}}),this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}},m.prototype={enqueue:function(e){var i,n=this.observer.records_,r=n.length;if(n.length>0){var u=function(e,t){return e===t?e:!a||(i=e)!==a&&i!==s?null:a;var i}(n[r-1],e);if(u)return void(n[r-1]=u)}else i=this.observer,l.push(i),o||(o=!0,t(d));n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=i.get(e);t||i.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach((function(e){this.removeListeners_(e);for(var t=i.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}}),this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,i=e.relatedNode.namespaceURI,n=e.target;(o=new f("attributes",n)).attributeName=t,o.attributeNamespace=i;var r=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;c(n,(function(e){if(e.attributes&&(!e.attributeFilter||!e.attributeFilter.length||-1!==e.attributeFilter.indexOf(t)||-1!==e.attributeFilter.indexOf(i)))return e.attributeOldValue?g(r):o}));break;case"DOMCharacterDataModified":var o=f("characterData",n=e.target);r=e.prevValue,c(n,(function(e){if(e.characterData)return e.characterDataOldValue?g(r):o}));break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var l,u,d=e.target;"DOMNodeInserted"===e.type?(l=[d],u=[]):(l=[],u=[d]);var h=d.previousSibling,p=d.nextSibling;(o=f("childList",e.target.parentNode)).addedNodes=l,o.removedNodes=u,o.previousSibling=h,o.nextSibling=p,c(e.relatedNode,(function(e){if(e.childList)return o}))}s=a=void 0}},e.JsMutationObserver=h,e.MutationObserver||(e.MutationObserver=h,h._isPolyfilled=!0)}function d(){o=!1;var e=l;l=[],e.sort((function(e,t){return e.uid_-t.uid_}));var t=!1;e.forEach((function(e){var n=e.takeRecords();!function(e){e.nodes_.forEach((function(t){var n=i.get(t);n&&n.forEach((function(t){t.observer===e&&t.removeTransientObservers()}))}))}(e),n.length&&(e.callback_(n,e),t=!0)})),t&&d()}function c(e,t){for(var n=e;n;n=n.parentNode){var r=i.get(n);if(r)for(var s=0;s<r.length;s++){var a=r[s],o=a.options;if(n===e||o.subtree){var l=t(o);l&&a.enqueue(l)}}}}function h(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++u}function p(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function f(e,t){return s=new p(e,t)}function g(e){return a||((i=new p((t=s).type,t.target)).addedNodes=t.addedNodes.slice(),i.removedNodes=t.removedNodes.slice(),i.previousSibling=t.previousSibling,i.nextSibling=t.nextSibling,i.attributeName=t.attributeName,i.attributeNamespace=t.attributeNamespace,i.oldValue=t.oldValue,(a=i).oldValue=e,a);var t,i}function m(e,t,i){this.observer=e,this.target=t,this.options=i,this.transientObservedNodes=[]}}(self),function(){var e,t="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&(e=document.importNode,document.importNode=function(){var t=e.apply(document,arguments);
2if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var i=document.createDocumentFragment();return i.appendChild(t),i}return t});var i=function(){if(!t){var e=document.createElement("template"),i=document.createElement("template");i.content.appendChild(document.createElement("div")),e.content.appendChild(i);var n=e.cloneNode(!0);return 0===n.content.childNodes.length||0===n.content.firstChild.content.childNodes.length}}(),n="template",r=function(){};if(t){var s=document.implementation.createHTMLDocument("template"),a=!0,o=document.createElement("style");o.textContent=n+"{display:none;}";var l=document.head;l.insertBefore(o,l.firstElementChild),r.prototype=Object.create(HTMLElement.prototype),r.decorate=function(e){if(!e.content){var t;for(e.content=s.createDocumentFragment();t=e.firstChild;)e.content.appendChild(t);if(e.cloneNode=function(e){return r.cloneNode(this,e)},a)try{Object.defineProperty(e,"innerHTML",{get:function(){for(var e="",t=this.content.firstChild;t;t=t.nextSibling)e+=t.outerHTML||t.data.replace(d,c);return e},set:function(e){for(s.body.innerHTML=e,r.bootstrap(s);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;s.body.firstChild;)this.content.appendChild(s.body.firstChild)},configurable:!0})}catch(e){a=!1}r.bootstrap(e.content)}},r.bootstrap=function(e){for(var t,i=e.querySelectorAll(n),s=0,a=i.length;s<a&&(t=i[s]);s++)r.decorate(t)},document.addEventListener("DOMContentLoaded",(function(){r.bootstrap(document)}));var u=document.createElement;document.createElement=function(){"use strict";var e=u.apply(document,arguments);return"template"===e.localName&&r.decorate(e),e};var d=/[&\u00A0<>]/g;function c(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}}}if(t||i){var h=Node.prototype.cloneNode;r.cloneNode=function(e,t){var i=h.call(e,!1);return this.decorate&&this.decorate(i),t&&(i.content.appendChild(h.call(e.content,!0)),this.fixClonedDom(i.content,e.content)),i},r.fixClonedDom=function(e,t){if(t.querySelectorAll)for(var i,r,s=t.querySelectorAll(n),a=e.querySelectorAll(n),o=0,l=a.length;o<l;o++)r=s[o],i=a[o],this.decorate&&this.decorate(r),i.parentNode.replaceChild(r.cloneNode(!0),i)};var p=document.importNode;Node.prototype.cloneNode=function(e){var t=h.call(this,e);return e&&r.fixClonedDom(t,this),t},document.importNode=function(e,t){if(e.localName===n)return r.cloneNode(e,t);var i=p.call(document,e,t);return t&&r.fixClonedDom(i,e),i},i&&(HTMLTemplateElement.prototype.cloneNode=function(e){return r.cloneNode(this,e)})}t&&(window.HTMLTemplateElement=r)}(),function(){"use strict";if(!window.performance||!window.performance.now){var e=Date.now();window.performance={now:function(){return Date.now()-e}}}var t,i;if(window.requestAnimationFrame||(window.requestAnimationFrame=(t=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame)?function(e){return t((function(){e(performance.now())}))}:function(e){return window.setTimeout(e,1e3/60)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}),(i=document.createEvent("Event")).initEvent("foo",!0,!0),i.preventDefault(),!i.defaultPrevented){var n=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(n.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var r=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||r&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var i=document.createEvent("CustomEvent");return i.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),i},window.CustomEvent.prototype=window.Event.prototype),!window.Event||r&&"function"!=typeof window.Event){var s=window.Event;window.Event=function(e,t){t=t||{};var i=document.createEvent("Event");return i.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),i},window.Event.prototype=s.prototype}}(window.WebComponents),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){var t="import",i=Boolean(t in document.createElement("link")),n=Boolean(window.ShadowDOMPolyfill),r=function(e){return n?window.ShadowDOMPolyfill.wrapIfNeeded(e):e},s=r(document),a={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return r(e)},configurable:!0};Object.defineProperty(document,"_currentScript",a),Object.defineProperty(s,"_currentScript",a);var o=/Trident/.test(navigator.userAgent);function l(e,t){c((function(){!function(e,t){var n,r=t.querySelectorAll("link[rel=import]"),s=0,a=r.length,o=[],l=[];function u(){s==a&&e&&e({allImports:r,loadedImports:o,errorImports:l})}function d(e){h(e),o.push(this),s++,u()}function c(e){l.push(this),s++,u()}if(a)for(var p,f=0;f<a&&(p=r[f]);f++)n=p,(i?n.__loaded||n.import&&"loading"!==n.import.readyState:n.__importParsed)?(o.push(this),s++,u()):(p.addEventListener("load",d),p.addEventListener("error",c));else u()}(e,t)}),t=t||s)}var u=o?"complete":"interactive",d="readystatechange";function c(e,t){if(function(e){return"complete"===e.readyState||e.readyState===u}(t))e&&e();else{var i=function(){"complete"!==t.readyState&&t.readyState!==u||(t.removeEventListener(d,i),c(e,t))};t.addEventListener(d,i)}}function h(e){e.target.__loaded=!0}if(i){function p(e){for(var t,i=0,n=e.length;i<n&&(t=e[i]);i++)"link"===(r=t).localName&&"import"===r.rel&&f(t);var r}function f(e){e.import?h({target:e}):(e.addEventListener("load",h),e.addEventListener("error",h))}new MutationObserver((function(e){for(var t,i=0,n=e.length;i<n&&(t=e[i]);i++)t.addedNodes&&p(t.addedNodes)})).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),i=0,n=t.length;i<n&&(e=t[i]);i++)f(e)}()}l((function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=s.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),s.dispatchEvent(t)})),e.IMPORT_LINK_TYPE=t,e.useNative=i,e.rootDocument=s,e.whenReady=l,e.isIE=o}(window.HTMLImports),e=window.HTMLImports,t=[],e.addModule=function(e){t.push(e)},e.initializeModules=function(){t.forEach((function(t){t(e)}))},window.HTMLImports.addModule((function(e){var t=/(url\()([^)]*)(\))/g,i=/(@import[\s]+(?!url\())([^;]*)(;)/g,n={resolveUrlsInStyle:function(e,t){var i=e.ownerDocument.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,i),e},resolveUrlsInCssText:function(e,n,r){var s=this.replaceUrls(e,r,n,t);return this.replaceUrls(s,r,n,i)},replaceUrls:function(e,t,i,n){return e.replace(n,(function(e,n,r,s
2){var a=r.replace(/["']/g,"");return i&&(a=new URL(a,i).href),t.href=a,n+"'"+(a=t.href)+"'"+s}))}};e.path=n})),window.HTMLImports.addModule((function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(i,n,r){var s=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(i+="?"+Math.random()),s.open("GET",i,t.async),s.addEventListener("readystatechange",(function(e){if(4===s.readyState){var i=null;try{var a=s.getResponseHeader("Location");a&&(i="/"===a.substr(0,1)?location.origin+a:a)}catch(e){console.error(e.message)}n.call(r,!t.ok(s)&&s,s.response||s.responseText,i)}})),s.send(),s},loadDocument:function(e,t,i){this.load(e,t,i).responseType="document"}};e.xhr=t})),window.HTMLImports.addModule((function(e){var t=e.xhr,i=e.flags,n=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};n.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,i=0,n=e.length;i<n&&(t=e[i]);i++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){return this.pending[e]?(this.pending[e].push(t),!0):this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,n){if(i.load&&console.log("fetch",e,n),e)if(e.match(/^data:/)){var r=e.split(","),s=r[0],a=r[1];a=s.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,n,null,a)}.bind(this),0)}else{var o=function(t,i,r){this.receive(e,n,t,i,r)}.bind(this);t.load(e,o)}else setTimeout(function(){this.receive(e,n,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,i,n,r){this.cache[e]=n;for(var s,a=this.pending[e],o=0,l=a.length;o<l&&(s=a[o]);o++)this.onload(e,s,n,i,r),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=n})),window.HTMLImports.addModule((function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,i=0,n=e.length;i<n&&(t=e[i]);i++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,i=0,n=e.length;i<n&&(t=e[i]);i++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t})),window.HTMLImports.addModule((function(e){var t=e.path,i=e.rootDocument,n=e.flags,r=e.isIE,s=e.IMPORT_LINK_TYPE,a="link[rel="+s+"]",o={documentSelectors:a,importsSelectors:[a,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))n.parse&&console.log("[%s] is already parsed",e.localName);else{var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))}},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){n.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,n.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(e.import=e.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e.import&&(e.import.__importParsed=!0),this.markParsingComplete(e),e.__resource&&!e.__error?e.dispatchEvent(new CustomEvent("load",{bubbles:!1})):e.dispatchEvent(new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)(t=e.__pending.shift())&&t({target:e});this.parseNext()},parseLink:function(e){l(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var i,n,r=e;(n=(i=e).ownerDocument.createElement("style")).textContent=i.textContent,t.resolveUrlsInStyle(n),e=n,r.__appliedElement=e,e.__importElement=r,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var i=this,n=function(r){e.removeEventListener("load",n),e.removeEventListener("error",n),t&&t(r),i.markParsingComplete(e),i.parseNext()};if(e.addEventListener("load",n),e.addEventListener("error",n),r&&"style"===e.localName){var s=!1;if(-1==e.textContent.indexOf("@import"))s=!0;else if(e.sheet){s=!0;for(var a,o=e.sheet.cssRules,l=o?o.length:0,u=0;u<l&&(a=o[u]);u++)a.type===CSSRule.IMPORT_RULE&&(s=s&&Boolean(a.styleSheet))}s&&setTimeout((function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))}
2))}},parseScript:function(t){var i=document.createElement("script");i.__importElement=t,i.src=t.src?t.src:function(e){var t=function(e){return e.textContent+function(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var i=e.ownerDocument.baseURI,n=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+i+n+".js\n"}(e)}(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}(t),e.currentScript=t,this.trackElement(i,(function(t){i.parentNode&&i.parentNode.removeChild(i),e.currentScript=null})),this.addElementToDocument(i)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(i)||this.nextToParseDynamic())},nextToParseInDoc:function(e,t){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var i,n=e.querySelectorAll(this.parseSelectorsForNode(e)),r=0,s=n.length;r<s&&(i=n[r]);r++)if(!this.isParsed(i))return this.hasResource(i)?l(i)?this.nextToParseInDoc(i.__doc,i):i:void 0}return t},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){return(e.ownerDocument||e)===i?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return!l(e)||void 0!==e.__doc}};function l(e){return"link"===e.localName&&e.rel===s}e.parser=o,e.IMPORT_SELECTOR=a})),window.HTMLImports.addModule((function(e){var t=e.flags,i=e.IMPORT_LINK_TYPE,n=e.IMPORT_SELECTOR,r=e.rootDocument,s=e.Loader,a=e.Observer,o=e.parser,l={documents:{},documentPreloadSelectors:n,importsPreloadSelectors:[n].join(","),loadNode:function(e){u.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);u.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){return(e.ownerDocument||e)===r?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,s,a){if(t.load&&console.log("loaded",e,n),n.__resource=r,n.__error=s,function(e){return function(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}(e,i)}(n)){var l=this.documents[e];void 0===l&&(l=s?null:function(e,t){var n=document.implementation.createHTMLDocument(i);n._URL=t;var r=n.createElement("base");r.setAttribute("href",t),n.baseURI||function(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}(n)||Object.defineProperty(n,"baseURI",{value:t});var s=n.createElement("meta");return s.setAttribute("charset","utf-8"),n.head.appendChild(s),n.head.appendChild(r),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}(r,a||e),l&&(l.__importLink=n,this.bootDocument(l)),this.documents[e]=l),n.__doc=l}o.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),o.parseNext()},loadedAll:function(){o.parseNext()}},u=new s(l.loaded.bind(l),l.loadedAll.bind(l));if(l.observer=new a,!document.baseURI){var d={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",d),Object.defineProperty(r,"baseURI",d)}e.importer=l,e.importLoader=u})),window.HTMLImports.addModule((function(e){var t=e.parser,i=e.importer,n={added:function(e){for(var n,r,s,a,o=0,l=e.length;o<l&&(a=e[o]);o++)n||(n=a.ownerDocument,r=t.isParsed(n)),(s=this.shouldLoadNode(a))&&i.loadNode(a),this.shouldParseNode(a)&&r&&t.parseDynamic(a,s)},shouldLoadNode:function(e){return 1===e.nodeType&&r.call(e,i.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&r.call(e,t.parseSelectorsForNode(e))}};i.observer.addCallback=n.added.bind(n);var r=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector})),function(e){var t=e.initializeModules;if(e.isIE,!e.useNative){t();var i=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?n():document.addEventListener("DOMContentLoaded",n)}function n(){window.HTMLImports.importer.bootDocument(i)}}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,i=[];e.addModule=function(e){i.push(e)}
2,e.initializeModules=function(){i.forEach((function(t){t(e)}))},e.hasNative=Boolean(document.registerElement),e.isIE=/Trident/.test(navigator.userAgent),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule((function(e){var t=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";function i(e,t){n(e,(function(e){if(t(e))return!0;r(e,t)})),r(e,t)}function n(e,t,i){var r=e.firstElementChild;if(!r)for(r=e.firstChild;r&&r.nodeType!==Node.ELEMENT_NODE;)r=r.nextSibling;for(;r;)!0!==t(r,i)&&n(r,t,i),r=r.nextElementSibling;return null}function r(e,t){for(var n=e.shadowRoot;n;)i(n,t),n=n.olderShadowRoot}function s(e,i,n){if(e=window.wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var r,a=e.querySelectorAll("link[rel="+t+"]"),o=0,l=a.length;o<l&&(r=a[o]);o++)r.import&&s(r.import,i,n);i(e)}}e.forDocumentTree=function(e,t){s(e,t,[])},e.forSubtree=i})),window.CustomElements.addModule((function(e){var t=e.flags,i=e.forSubtree,n=e.forDocumentTree;function r(e,t){return s(e,t)||a(e,t)}function s(t,i){if(e.upgrade(t,i))return!0;i&&h(t)}function a(e,t){i(e,(function(e){if(s(e,t))return!0}))}var o=window.MutationObserver._isPolyfilled&&t["throttle-attached"];e.hasPolyfillMutations=o,e.hasThrottledAttached=o;var l=!1,u=[];function d(e){u.push(e),l||(l=!0,setTimeout(c))}function c(){l=!1;for(var e,t=u,i=0,n=t.length;i<n&&(e=t[i]);i++)e();u=[]}function h(e){o?d((function(){p(e)})):p(e)}function p(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function f(e){o?d((function(){g(e)})):g(e)}function g(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function m(e,n){if(t.dom){var s=n[0];if(s&&"childList"===s.type&&s.addedNodes&&s.addedNodes){for(var a=s.addedNodes[0];a&&a!==document&&!a.host;)a=a.parentNode;var o=a&&(a.URL||a._URL||a.host&&a.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,o||"")}var l=function(e){for(var t=e,i=window.wrap(document);t;){if(t==i)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}(e);n.forEach((function(e){"childList"===e.type&&(y(e.addedNodes,(function(e){e.localName&&r(e,l)})),y(e.removedNodes,(function(e){var t;e.localName&&(f(t=e),i(t,(function(e){f(e)})))})))})),t.dom&&console.groupEnd()}var y=Array.prototype.forEach.call.bind(Array.prototype.forEach);function v(e){if(!e.__observer){var t=new MutationObserver(m.bind(this,e));t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function _(e){e=window.wrap(e),t.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),r(e,e===window.wrap(document)),v(e),t.dom&&console.groupEnd()}var b=Element.prototype.createShadowRoot;b&&(Element.prototype.createShadowRoot=function(){var e=b.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=function(e){if(e.shadowRoot&&!e.shadowRoot.__watched){t.dom&&console.log("watching shadow-root for: ",e.localName);for(var i=e.shadowRoot;i;)v(i),i=i.olderShadowRoot}},e.upgradeDocumentTree=function(e){n(e,_)},e.upgradeDocument=_,e.upgradeSubtree=a,e.upgradeAll=r,e.attached=h,e.takeRecords=function(e){for((e=window.wrap(e))||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(m(e,t.takeRecords()),c())}})),window.CustomElements.addModule((function(e){var t=e.flags;function i(i,r,s){return t.upgrade&&console.group("upgrade:",i.localName),r.is&&i.setAttribute("is",r.is),n(i,r),i.__upgraded__=!0,function(e){e.createdCallback&&e.createdCallback()}(i),s&&e.attached(i),e.upgradeSubtree(i,s),t.upgrade&&console.groupEnd(),i}function n(e,t){Object.__proto__||function(e,t,i){for(var n={},r=t;r!==i&&r!==HTMLElement.prototype;){for(var s,a=Object.getOwnPropertyNames(r),o=0;s=a[o];o++)n[s]||(Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s)),n[s]=1);r=Object.getPrototypeOf(r)}}(e,t.prototype,t.native),e.__proto__=t.prototype}e.upgrade=function(t,n){if("template"===t.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t),!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),s=e.getRegisteredDefinition(t.localName)||e.getRegisteredDefinition(r);if(s&&(r&&s.tag==t.localName||!r&&!s.extends))return i(t,s,n)}},e.upgradeWithDefinition=i,e.implementPrototype=n})),window.CustomElements.addModule((function(e){e.isIE;var t=e.upgradeDocumentTree,i=e.upgradeAll,n=e.upgradeWithDefinition,r=e.implementPrototype,s=e.useNative;function a(e,t,i){e=e.toLowerCase();var n=this.getAttribute(e);i.apply(this,arguments);var r=this.getAttribute(e);this.attributeChangedCallback&&r!==n&&this.attributeChangedCallback(e,n,r)}var o=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];function l(e){var t=d(e);return t?l(t.extends).concat([t]):[]}var u={};function d(e){if(e)return u[e.toLowerCase()]}function c(e,t){e&&(e=e.toLowerCase()),t&&(t=t.toLowerCase());var i,n=d(t||e);if(n){if(e==n.tag&&t==n.is)return new n.ctor;if(!t&&!n.is)return new n.ctor}return t?((i=c(e)).setAttribute("is",t),i):(i=p(e),e.indexOf("-")>=0&&r(i,HTMLElement),i)}var h,p=document.createElement.bind(document),f=document.createElementNS.bind(document);function g(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return i(e),e}}h=Object.__proto__||s?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var i=e;i;){if(i===t.prototype)return!0;
2i=i.__proto__}return!1},g(Node.prototype,"cloneNode"),g(document,"importNode"),document.registerElement=function(i,r){var s=r||{};if(!i)throw new Error("document.registerElement: first argument `name` must not be empty");if(i.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(i)+"'.");if(function(e){for(var t=0;t<o.length;t++)if(e===o[t])return!0}(i))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(i)+"'. The type name is invalid.");if(d(i))throw new Error("DuplicateDefinitionError: a type with name '"+String(i)+"' is already registered");return s.prototype||(s.prototype=Object.create(HTMLElement.prototype)),s.__name=i.toLowerCase(),s.extends&&(s.extends=s.extends.toLowerCase()),s.lifecycle=s.lifecycle||{},s.ancestry=l(s.extends),function(e){for(var t,i=e.extends,n=0;t=e.ancestry[n];n++)i=t.is&&t.tag;e.tag=i||e.__name,i&&(e.is=e.__name)}(s),function(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var i=document.createElement(e.tag);t=Object.getPrototypeOf(i)}for(var n,r=e.prototype,s=!1;r;)r==t&&(s=!0),(n=Object.getPrototypeOf(r))&&(r.__proto__=n),r=n;s||console.warn(e.tag+" prototype not found in prototype chain for "+e.is),e.native=t}}(s),function(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,i){a.call(this,e,i,t)};var i=e.removeAttribute;e.removeAttribute=function(e){a.call(this,e,null,i)},e.setAttribute._polyfilled=!0}}(s.prototype),function(e,t){u[e]=t}(s.__name,s),s.ctor=function(e){return function(){return function(e){return n(p(e.tag),e)}(e)}}(s),s.ctor.prototype=s.prototype,s.prototype.constructor=s.ctor,e.ready&&t(document),s.ctor},document.createElement=c,document.createElementNS=function(e,t,i){return"http://www.w3.org/1999/xhtml"===e?c(t,i):f(e,t)},e.registry=u,e.instanceof=h,e.reservedTagList=o,e.getRegisteredDefinition=d,document.register=document.registerElement})),function(e){var t=e.useNative,i=e.initializeModules;if(e.isIE,t){var n=function(){};e.watchShadow=n,e.upgrade=n,e.upgradeAll=n,e.upgradeDocumentTree=n,e.upgradeSubtree=n,e.takeRecords=n,e.instanceof=function(e,t){return e instanceof t}}else i();var r=e.upgradeDocumentTree,s=e.upgradeDocument;function a(){r(window.wrap(document)),window.CustomElements.ready=!0,(window.requestAnimationFrame||function(e){setTimeout(e,16)})((function(){setTimeout((function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))}))}))}if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){e.import&&s(wrap(e.import))}),"complete"===document.readyState||e.flags.eager)a();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var o=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(o,a)}else a()}(window.CustomElements),function(){var e=document.createElement("style");e.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var t=document.querySelector("head");t.insertBefore(e,t.firstChild)}(window.WebComponents)},542:()=>{},4634:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},9306:(e,t,i)=>{"use strict";var n=i(4901),r=i(6823),s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not a function")}},6469:(e,t,i)=>{"use strict";var n=i(8227),r=i(2360),s=i(4913).f,a=n("unscopables"),o=Array.prototype;void 0===o[a]&&s(o,a,{configurable:!0,value:r(null)}),e.exports=function(e){o[a][e]=!0}},8551:(e,t,i)=>{"use strict";var n=i(34),r=String,s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not an object")}},9617:(e,t,i)=>{"use strict";var n=i(5397),r=i(5610),s=i(6198),a=function(e){return function(t,i,a){var o=n(t),l=s(o);if(0===l)return!e&&-1;var u,d=r(a,l);
vendor: 4,379 bytes, line 2
2if(e&&i!=i){for(;l>d;)if((u=o[d++])!=u)return!0}else for(;l>d;d++)if((e||d in o)&&o[d]===i)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2195:(e,t,i)=>{"use strict";var n=i(9504),r=n({}.toString),s=n("".slice);e.exports=function(e){return s(r(e),8,-1)}},6699:(e,t,i)=>{"use strict";var n=i(3724),r=i(4913),s=i(6980);e.exports=n?function(e,t,i){return r.f(e,t,s(1,i))}:function(e,t,i){return e[t]=i,e}},6980:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},2106:(e,t,i)=>{"use strict";var n=i(283),r=i(4913);e.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),r.f(e,t,i)}},9433:(e,t,i)=>{"use strict";var n=i(4576),r=Object.defineProperty;e.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},3724:(e,t,i)=>{"use strict";var n=i(9039);e.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:(e,t,i)=>{"use strict";var n=i(4576),r=i(34),s=n.document,a=r(s)&&r(s.createElement);e.exports=function(e){return a?s.createElement(e):{}}},8727:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2839:(e,t,i)=>{"use strict";var n=i(4576).navigator,r=n&&n.userAgent;e.exports=r?String(r):""},9519:(e,t,i)=>{"use strict";var n,r,s=i(4576),a=i(2839),o=s.process,l=s.Deno,u=o&&o.versions||l&&l.version,d=u&&u.v8;d&&(r=(n=d.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!r&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(r=+n[1]),e.exports=r},9039:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},616:(e,t,i)=>{"use strict";var n=i(9039);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},9565:(e,t,i)=>{"use strict";var n=i(616),r=Function.prototype.call;e.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},350:(e,t,i)=>{"use strict";var n=i(3724),r=i(9297),s=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,o=r(s,"name"),l=o&&"something"===function(){}.name,u=o&&(!n||n&&a(s,"name").configurable);e.exports={EXISTS:o,PROPER:l,CONFIGURABLE:u}},9504:(e,t,i)=>{"use strict";var n=i(616),r=Function.prototype,s=r.call,a=n&&r.bind.bind(s,s);e.exports=n?a:function(e){return function(){return s.apply(e,arguments)}}},7751:(e,t,i)=>{"use strict";var n=i(4576),r=i(4901);e.exports=function(e,t){return arguments.length<2?(i=n[e],r(i)?i:void 0):n[e]&&n[e][t];var i}},5966:(e,t,i)=>{"use strict";var n=i(9306),r=i(4117);e.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}},4576:function(e,t,i){"use strict";var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof i.g&&i.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:(e,t,i)=>{"use strict";var n=i(9504),r=i(8981),s=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return s(r(e),t)}},421:e=>{"use strict";e.exports={}},397:(e,t,i)=>{"use strict";var n=i(7751);e.exports=n("document","documentElement")},5917:(e,t,i)=>{"use strict";var n=i(3724),r=i(9039),s=i(4055);e.exports=!n&&!r((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},7055:(e,t,i)=>{"use strict";var n=i(9504),r=i(9039),s=i(2195),a=Object,o=n("".split);e.exports=r((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"===s(e)?o(e,""):a(e)}:a},3706:(e,t,i)=>{"use strict";var n=i(9504),r=i(4901),s=i(7629),a=n(Function.toString);r(s.inspectSource)||(s.inspectSource=function(e){return a(e)}),e.exports=s.inspectSource},1181:(e,t,i)=>{"use strict";var n,r,s,a=i(8622),o=i(4576),l=i(34),u=i(6699),d=i(9297),c=i(7629),h=i(6119),p=i(421),f="Object already initialized",g=o.TypeError,m=o.WeakMap;if(a||c.state){var y=c.state||(c.state=new m);y.get=y.get,y.has=y.has,y.set=y.set,n=function(e,t){if(y.has(e))throw new g(f);return t.facade=e,y.set(e,t),t},r=function(e){return y.get(e)||{}},s=function(e){return y.has(e)}}else{var v=h("state");p[v]=!0,n=function(e,t){if(d(e,v))throw new g(f);return t.facade=e,u(e,v,t),t},r=function(e){return d(e,v)?e[v]:{}},s=function(e){return d(e,v)}}
vendor: 7,297 bytes, line 2
2e.exports={set:n,get:r,has:s,enforce:function(e){return s(e)?r(e):n(e,{})},getterFor:function(e){return function(t){var i;if(!l(t)||(i=r(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return i}}}},4901:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},4117:e=>{"use strict";e.exports=function(e){return null==e}},34:(e,t,i)=>{"use strict";var n=i(4901);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},6395:e=>{"use strict";e.exports=!1},757:(e,t,i)=>{"use strict";var n=i(7751),r=i(4901),s=i(1625),a=i(7040),o=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return r(t)&&s(t.prototype,o(e))}},6198:(e,t,i)=>{"use strict";var n=i(8014);e.exports=function(e){return n(e.length)}},283:(e,t,i)=>{"use strict";var n=i(9504),r=i(9039),s=i(4901),a=i(9297),o=i(3724),l=i(350).CONFIGURABLE,u=i(3706),d=i(1181),c=d.enforce,h=d.get,p=String,f=Object.defineProperty,g=n("".slice),m=n("".replace),y=n([].join),v=o&&!r((function(){return 8!==f((function(){}),"length",{value:8}).length})),_=String(String).split("String"),b=e.exports=function(e,t,i){"Symbol("===g(p(t),0,7)&&(t="["+m(p(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!a(e,"name")||l&&e.name!==t)&&(o?f(e,"name",{value:t,configurable:!0}):e.name=t),v&&i&&a(i,"arity")&&e.length!==i.arity&&f(e,"length",{value:i.arity});try{i&&a(i,"constructor")&&i.constructor?o&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=c(e);return a(n,"source")||(n.source=y(_,"string"==typeof t?t:"")),e};Function.prototype.toString=b((function(){return s(this)&&h(this).source||u(this)}),"toString")},741:e=>{"use strict";var t=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?i:t)(n)}},2360:(e,t,i)=>{"use strict";var n,r=i(8551),s=i(6801),a=i(8727),o=i(421),l=i(397),u=i(4055),d=i(6119),c="prototype",h="script",p=d("IE_PROTO"),f=function(){},g=function(e){return"<"+h+">"+e+"</"+h+">"},m=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},y=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,i;y="undefined"!=typeof document?document.domain&&n?m(n):(t=u("iframe"),i="java"+h+":",t.style.display="none",l.appendChild(t),t.src=String(i),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F):m(n);for(var r=a.length;r--;)delete y[c][a[r]];return y()};o[p]=!0,e.exports=Object.create||function(e,t){var i;return null!==e?(f[c]=r(e),i=new f,f[c]=null,i[p]=e):i=y(),void 0===t?i:s.f(i,t)}},6801:(e,t,i)=>{"use strict";var n=i(3724),r=i(8686),s=i(4913),a=i(8551),o=i(5397),l=i(1072);t.f=n&&!r?Object.defineProperties:function(e,t){a(e);for(var i,n=o(t),r=l(t),u=r.length,d=0;u>d;)s.f(e,i=r[d++],n[i]);return e}},4913:(e,t,i)=>{"use strict";var n=i(3724),r=i(5917),s=i(8686),a=i(8551),o=i(6969),l=TypeError,u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,c="enumerable",h="configurable",p="writable";t.f=n?s?function(e,t,i){if(a(e),t=o(t),a(i),"function"==typeof e&&"prototype"===t&&"value"in i&&p in i&&!i[p]){var n=d(e,t);n&&n[p]&&(e[t]=i.value,i={configurable:h in i?i[h]:n[h],enumerable:c in i?i[c]:n[c],writable:!1})}return u(e,t,i)}:u:function(e,t,i){if(a(e),t=o(t),a(i),r)try{return u(e,t,i)}catch(e){}if("get"in i||"set"in i)throw new l("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},1625:(e,t,i)=>{"use strict";var n=i(9504);e.exports=n({}.isPrototypeOf)},1828:(e,t,i)=>{"use strict";var n=i(9504),r=i(9297),s=i(5397),a=i(9617).indexOf,o=i(421),l=n([].push);e.exports=function(e,t){var i,n=s(e),u=0,d=[];for(i in n)!r(o,i)&&r(n,i)&&l(d,i);for(;t.length>u;)r(n,i=t[u++])&&(~a(d,i)||l(d,i));return d}},1072:(e,t,i)=>{"use strict";var n=i(1828),r=i(8727);e.exports=Object.keys||function(e){return n(e,r)}},4270:(e,t,i)=>{"use strict";var n=i(9565),r=i(4901),s=i(34),a=TypeError;e.exports=function(e,t){var i,o;if("string"===t&&r(i=e.toString)&&!s(o=n(i,e)))return o;if(r(i=e.valueOf)&&!s(o=n(i,e)))return o;if("string"!==t&&r(i=e.toString)&&!s(o=n(i,e)))return o;throw new a("Can't convert object to primitive value")}},7750:(e,t,i)=>{"use strict";var n=i(4117),r=TypeError;e.exports=function(e){if(n(e))throw new r("Can't call method on "+e);return e}},6119:(e,t,i)=>{"use strict";var n=i(5745),r=i(3392),s=n("keys");e.exports=function(e){return s[e]||(s[e]=r(e))}},7629:(e,t,i)=>{"use strict";var n=i(6395),r=i(4576),s=i(9433),a="__core-js_shared__",o=e.exports=r[a]||s(a,{});(o.versions||(o.versions=[])).push({version:"3.40.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(e,t,i)=>{"use strict";var n=i(7629);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},4495:(e,t,i)=>{"use strict";var n=i(9519),r=i(9039),s=i(4576).String;e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},5610:(e,t,i)=>{"use strict";var n=i(1291),r=Math.max,s=Math.min;e.exports=function(e,t){var i=n(e);return i<0?r(i+t,0):s(i,t)}},5397:(e,t,i)=>{"use strict";var n=i(7055),r=i(7750);e.exports=function(e){return n(r(e))}},1291:(e,t,i)=>{"use strict";var n=i(741);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},8014:(e,t,i)=>{"use strict";var n=i(1291),r=Math.min;e.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}},8981:(e,t,i)=>{"use strict";var n=i(7750),r=Object;e.exports=function(e){return r(n(e))}},2777:(e,t,i)=>{"use strict";var n=i(9565),r=i(34),s=i(757),a=i(5966),o=i(4270),l=i(8227),u=TypeError,d=l("toPrimitive");e.exports=function(e,t){if(!r(e)||s(e))return e;var i,l=a(e,d);if(l){if(void 0===t&&(t="default"),i=n(l,e,t),!r(i)||s(i))return i;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},6969:(e,t,i)=>{"use strict";var n=i(2777),r=i(757);e.exports=function(e){var t=n(e,"string");return r(t)?t:t+""}},6823:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},3392:(e,t,i)=>{"use strict";var n=i(9504),r=0,s=Math.random(),a=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++r+s,36)}},7040:(e,t,i)=>{"use strict";var n=i(4495);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:(e,t,i)=>{"use strict";var n=i(3724),r=i(9039);e.exports=n&&r((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8622:(e,t,i)=>{"use strict";var n=i(4576),r=i(4901),s=n.WeakMap;e.exports=r(s)&&/native code/.test(String(s))},8227:(e,t,i)=>{"use strict";var n=i(4576),r=i(5745),s=i(9297),a=i(3392),o=i(4495),l=i(7040),u=n.Symbol,d=r("wks"),c=l?u.for||u:u&&u.withoutSetter||a;e.exports=function(e){return s(d,e)||(d[e]=o&&s(u,e)?u[e]:c("Symbol."+e)),d[e]}},7656:(e,t,i)=>{"use strict";var n=i(3724),r=i(6469),s=i(8981),a=i(6198),o=i(2106);n&&(o(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=s(this),t=a(e);return 0===t?0:t-1}}),r("lastIndex"))}},t={};function i(n){var r=t[n];
2if(void 0!==r)return r.exports;var s=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.loaded=!0,s.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=i(4686),t=i.n(e),n=i(2613),r=i.n(n),s=i(8228),a=i.n(s);const o={};i(4620);const l=new class{constructor(){this.defaults={logLevel:"off",ima:null,fluid:!0,controls:!0,resizeManager:!1,liveui:!0,plugins:{},controlBar:{children:["playToggle","volumePanel","progressControl","liveDisplay","seekToLive","customControlSpacer","remainingTimeDisplay","hlsQualitySelector","fullscreenToggle"]}},r().log.history.disable(),r().hook("beforesetup",((e,t)=>
2(e.removeAttribute("data-setup"),e.classList.add("video-js"),t)))}setDefaultOptions(e){this.defaults=r().obj.merge(this.defaults,e)}initializePlayer(e,t){return void 0===t&&(t={}),new Promise(((i,n)=>{this.processOptions(t,e).then((t=>{r().log.debug("init player:",t,e);const n=r()(e,t,(()=>{r().log.debug("player ready:",n),i(n),e.onready&&"function"==typeof e.onready&&e.onready(n)}));n.hlsQualitySelector({displayCurrentQuality:!0}),t.ima&&(window.google&&window.google.ima?n.ima(t.ima):r().log.error("IMA SDK is missing or blocked!")),t.plugins.errors&&n.errors(t.plugins.errors)})).catch((e=>{r().log.error(e),n("error while player initializing")}))}))}processOptions(e,t){return this.processInstanceOptions(e,t).then((e=>new Promise(((i,n)=>{const s=r().obj.merge(this.defaults,e);this.defaults.logLevel=s.logLevel,r().log.level(s.logLevel),t.id||s.id||n("neither options.id nor element.id is present!");const a=this.processOptionPlugins(s.plugins,n);s.plugins.ima&&(s.ima=s.plugins.ima,delete s.plugins.ima,s.ima.id=t.id||s.id),a.length>0?Promise.all(a).finally((()=>i(s))):i(s)}))))}processInstanceOptions(e,t){return new Promise(((i,n)=>{let s=e;try{const i=JSON.parse(t.getAttribute("data-options"));s=r().obj.merge(i,e)}catch(e){r().log.error("Error while parsing element data-options:",e.message,t),n("Error while parsing data-options")}s.config?r().xhr.get(s.config,{withCredentials:!0,json:!0,headers:s.configHeaders||{}},((e,t,a)=>{((e=e||t.statusCode<200||t.statusCode>299?a:null)||"string"==typeof a)&&(r().log.error(e?"Request error:":"Syntax error in config file: \n",e||a),n(`Error while loading config file "${s.config}"`)),r().log.debug(`config file "${s.config}" loaded:`,a),i(r().obj.merge(a,s))})):i(s)}))}processOptionPlugins(e,t){const i=[];return Object.keys(e).forEach((n=>{var s;!1===e[n].enabled?delete e[n]:r().getPlugin(n)?e[n].script&&(r().log.debug("load dependency:",e[n].script),i.push((s=e[n].script,o[s]||(o[s]=new Promise(((e,t)=>{const i=document.createElement("script");i.addEventListener("load",e),i.addEventListener("error",t),i.src=s,document.head.appendChild(i)}))),o[s]).catch((()=>{delete e[n]})))):t(`player plugin "${n}" is missing`)})),i}getBase(){return r()}};i(3805),i(2155);const u=r().getPlugin("plugin");r().registerPlugin("autoPauseOthers",class extends u{constructor(e,t){super(e,t),e.on("playing",(()=>{r().getAllPlayers().forEach((t=>{t===e||t.paused()||(r().log.debug("autoPauseOthers: pause other player:",t),t.pause())}))}))}}),r().hook("beforesetup",((e,t)=>
2(t.plugins=t.plugins||{},t.plugins.autoPauseOthers={},t)));const d=r().getPlugin("plugin");r().registerPlugin("displaySticky",class extends d{constructor(e,t){super(e,t),this.state={isSticky:!1},this.addEventListener=()=>{window.addEventListener("scroll",this.onScroll),this.on("statechanged",this.updateView)},this.onScroll=()=>{this.setState({isSticky:!this.isPlayerVisible()&&!this.player.paused()})},this.updateView=()=>{const e=this.player.contentEl();this.state.isSticky?(e.parentNode.insertBefore(this.placeholder,e),e.classList.add("vjs-is-sticky")):(e.parentNode.removeChild(this.placeholder),e.classList.remove("vjs-is-sticky"))},r().browser.IS_IOS||r().browser.IS_ANDROID||(this.placeholder=document.createElement("div"),this.placeholder.className="video-js-sticky-placeholder",this.player.one("play",this.addEventListener))}isPlayerVisible(){const e=this.state.isSticky?this.placeholder:this.player.contentEl(),t=e.getBoundingClientRect(),i=t.top+e.offsetHeight,n=t.top>0&&t.top<window.innerHeight,r=i>0&&i<window.innerHeight,s=t.top<0&&i>window.innerHeight;return this.player.isFullscreen()||n||r||s}dispose(){super.dispose(),window.removeEventListener("scroll",this.onScroll)}});const c=r().getPlugin("plugin");r().registerPlugin("keyboardNavigation",class extends c{constructor(e,t){super(e,t),this.state={isKeyboardActive:!1},this.onKeyDown=e=>{9===e.which&&this.setState({isKeyboardActive:!0})},this.onMouseDown=()=>{this.setState({isKeyboardActive:!1})},this.updateView=()=>{const e=this.player.contentEl();this.state.isKeyboardActive?e.classList.add("vjs-is-keyboard-active"):e.classList.remove("vjs-is-keyboard-active")},document.addEventListener("keydown",this.onKeyDown),document.addEventListener("mousedown",this.onMouseDown),this.on("statechanged",this.updateView)}dispose(){super.dispose(),document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("mousedown",this.onMouseDown)}}),r().hook("beforesetup",((e,t)=>
2(t.plugins=t.plugins||{},t.plugins.keyboardNavigation={},t))),i(368),i(7656);const h=r().getComponent("MenuButton"),p=r().getComponent("Menu"),f=r().getComponent("Component"),g=r().dom;class m extends h{constructor(e){super(e,{title:e.localize("Playlist")})}createItems(){return[]}createMenu(){const e=new p(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=g.createEl("li",{className:"vjs-menu-title",innerHTML:this.options_.title,tabIndex:-1}),i=new f(this.player_,{el:t});this.hideThreshold_+=1,e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t+=1)e.addItem(this.items[t]);return e}}const y=r().getComponent("MenuItem");class v extends y{constructor(e,t,i,n){super(e,{label:t.label,selectable:!0,selected:t.selected||!1}),this.item=t,this.playlistButton=i,this.plugin=n}handleClick(){for(let e=0;e<this.playlistButton.items.length;e+=1)this.playlistButton.items[e].selected(!1);this.plugin.setPlaylistItem(this.item.value),this.selected(!0)}}const _=r().getComponent("Button");class b extends _{constructor(e,t){super(e,t),"prev"===this.options_.direction?this.controlText(this.options_.prevText):this.controlText(this.options_.nextText)}buildCSSClass(){return`vjs-playlist-controls vjs-playlist-controls-${this.options_.direction} ${super.buildCSSClass()}`}handleClick(){"prev"===this.options_.direction?this.player().playlist.previous():this.player().playlist.next()}}const T={prevText:"Vor",nextText:"Zurück",index:0,length:0};class S{constructor(e,t){this.player=e,this.config=t,this.createPlaylistButtons(),this.bindPlayerEvents()}bindPlayerEvents(){this.player.on("playlistitem",(()=>{this.setButtonInnerText(`${this.player.playlist.currentIndex()+1}/${this.player.playlist.lastIndex()+1}`),this.player.playlist.currentIndex()<this.player.playlist.lastIndex()?this._nextButton.enable():this._nextButton.disable(),this.player.playlist.currentIndex()>0?this._prevButton.enable():this._prevButton.disable()}))}createPlaylistButtons(){const{player:e}=this;this._playlistButton=new m(e),this._prevButton=new b(e,{direction:"prev"}),this._nextButton=new b(e,{direction:"next"}),e.controlBar.addChild(this._prevButton,{componentClass:"prevSegment"},1);const t=e.controlBar.addChild(this._playlistButton,{componentClass:"segmentSelector"},2);t.addClass("vjs-segment-selector"),t.removeClass("vjs-hidden"),e.controlBar.addChild(this._nextButton,{componentClass:"nextSegment"},3)}setButtonInnerText(e){this._playlistButton.menuButton_.$(".vjs-icon-placeholder").innerHTML=e}getPlaylistMenuItem(e){const{player:t}=this;return new v(t,e,this._playlistButton,this)}}r().registerPlugin("playlistControls",(function(e){e=r().obj.merge(T,e),this.segmentSelector=new S(this,e)}));var A=i(9840),w=i.n(A);const E=r().dom||r();class C{static hidePlayerOnHoverTime(e){e.el_.getElementsByClassName("vjs-mouse-display")[0].style.display="none"}static getScrollOffset(){return A.window.pageXOffset?{x:A.window.pageXOffset,y:A.window.pageYOffset}:{x:A.document.documentElement.scrollLeft,y:A.document.documentElement.scrollTop}}static createPreviewContainer(){const e=A.document.createElement("div");return e.className="vjs-timeline-player-container",e}static createPreviewVideo(){const e=A.document.createElement("video");return e.muted=!0,e.className="vjs-timeline-player-video",e.load(),e}static createPreviewTime(){const e=A.document.createElement("div");return e.className="vjs-timeline-player-time",e.id="vjs-time",e}static createPreviewArrowDown(){const e=A.document.createElement("div");return e.className="vjs-timeline-player-arrow",e.id="vjs-arrow",e}static getMouseLeftOffset(e,t,i,n){let r=e||n.clientX+A.document.body.scrollLeft+A.document.documentElement.scrollLeft;return r-=t.el().getBoundingClientRect().left+i,r}static keepPreviewInsidePlayer(e,t){return e>t?e-=e-t:e<0&&(e=0),e}static setCurrentTime(e,t){e.currentTime=t,e.play()}static timeDiff(e,t){return e>t?e-t:t-e}static handleTextDisplay(e,t,i,n){const r=n.length;let s=t.seekBar.mouseTimeDisplay.el_.textContent;if(r){const e=1;for(let t=0;t<r;t+=1)if(C.timeDiff(n[t].startTime,i)<=e){s=n[t].text;break}}e.innerHTML=s}static moveListener(e,t,i,n,r,s,a){const o=C.getScrollOffset().x,l=t.el().getBoundingClientRect(),u=(l.width||l.right)+o,d=t.seekBar.el(),c=E.getBoundingClientRect(d),h=E.getPointerPosition(d,e).x,p=Math.min(Number(h),1);let f=c.width*p;
2const g=p*a.duration();C.setCurrentTime(r,g),C.handleTextDisplay(n,t,g,s),f=C.keepPreviewInsidePlayer(f,u),i.style.left=`${f}px`,i.style.display="block"}static hidePreview(e,t){e.style.left="-1000px",e.style.display="none",t.pause()}static addChapterMarkers(e,t,i){const n=e.length;for(let r=0;r<n;r+=1){const n=A.document.createElement("div");n.className="vjs-marker",n.id=`cp${r}`,n.style.left=e[r].startTime/t*100+"%",i.appendChild(n)}}}C.chapters=[];const k={};r().registerPlugin("timelinePlayer",(function(e){if(r().browser.IS_IOS||r().browser.IS_ANDROID)return;this.options=r().obj.merge(k,e),this.previewVideo=null,this.previewContainer=null,this.timelineTime=null,this.chapterStartTimesAra=[];const t=(e,t)=>{t.on("mousemove",(i=>{C.moveListener(i,t,this.previewContainer,this.timelineTime,this.previewVideo,this.chapterStartTimesAra,e)})),t.on("touchmove",(i=>{C.moveListener(i,t,this.previewContainer,this.timelineTime,this.previewVideo,this.chapterStartTimesAra,e)})),t.on("mouseout",(()=>{C.hidePreview(this.previewContainer,this.previewVideo)})),t.on("touchcancel",(()=>{C.hidePreview(this.previewContainer,this.previewVideo)})),t.on("touchend",(()=>{C.hidePreview(this.previewContainer,this.previewVideo)}))},i=e=>{this.previewVideo=C.createPreviewVideo(),this.timelineTime=C.createPreviewTime();const i=C.createPreviewArrowDown();this.previewContainer=C.createPreviewContainer(),this.previewContainer.appendChild(this.previewVideo),this.previewContainer.appendChild(this.timelineTime),this.previewContainer.appendChild(i);const{progressControl:n}=e.controlBar;n.el().appendChild(this.previewContainer),C.hidePlayerOnHoverTime(n),t(e,n),this.previewVideo&&(this.previewVideo.src=this.options.playlist[this.playlist.currentIndex()].previewUrl)};this.ready((()=>{this.on("loadedmetadata",(()=>{this.chapterStartTimesAra=[];let e=[];const t=[].filter.call(this.textTracks(),(e=>"chapters"===e.kind));if(t.length){const i=this.controlBar.progressControl.getChild("seekBar").contentEl();t[0].one("cuechange",(()=>{e=t[0].cues;for(let t=0;t<e.length;t+=1)this.chapterStartTimesAra[t]=e[t];C.addChapterMarkers(this.chapterStartTimesAra,this.duration(),i)})),r().log.debug("chapters",this.chapterStartTimesAra)}!this.previewVideo&&this.options.playlist[this.playlist.currentIndex()].previewUrl&&i(this)})),this.on("playlistitem",(()=>{this.previewVideo&&(this.previewVideo.src=this.options.playlist[this.playlist.currentIndex()].previewUrl)})),this.on("userinactive",(()=>{this.previewContainer&&C.hidePreview(this.previewContainer,this.previewVideo)}))}))}));const I={align:"t",class:"",content:"",debug:!1,showBackground:!1,attachToControlBar:!1,overlays:[{start:"playing",end:"paused"}]},x=r().getComponent("Component"),P=r().dom||r(),L=e=>"number"==typeof e&&e==e,D=e=>"string"==typeof e&&/^\S+$/.test(e);class O extends x{constructor(e,t){super(e,t),["start","end"].forEach((e=>{const t=this.options_[e];if(L(t))this[`${e}Event_`]="timeupdate";else if(D(t))this[`${e}Event_`]=t;else if("start"===e)throw new Error('invalid "start" option; expected number or string')})),["endListener_","rewindListener_","startListener_"].forEach((e=>{this[e]=t=>O.prototype[e].call(this,t)})),"timeupdate"===this.startEvent_&&this.on(e,"timeupdate",this.rewindListener_),this.debug(`created, listening to "${this.startEvent_}" for "start" and "${this.endEvent_||"nothing"}" for "end"`),this.hide()}createEl(){const e=this.options_,{content:t}=e,i=e.showBackground?"vjs-overlay-background":"vjs-overlay-no-background",n=P.createEl("div",{className:`\n        vjs-overlay\n        vjs-overlay-${e.align}\n        ${e.class}\n        ${i}\n        vjs-hidden\n      `});return"string"==typeof t?n.innerHTML=t:t instanceof w().DocumentFragment?n.appendChild(t):P.appendContent(n,t),n}debug(){if(!this.options_.debug)return;const{log:e}=r();let t=e;for(var i=arguments.length,n=new Array(i),s=0;s<i;s++)n[s]=arguments[s];e.hasOwnProperty(n[0])&&"function"==typeof e[n[0]]&&(t=e[n.shift()]),t(`overlay#${this.id()}: `,...n)}hide(){return super.hide(),this.debug("hidden"),this.debug(`bound \`startListener_\` to "${this.startEvent_}"`),this.endEvent_&&(this.debug(`unbound \`endListener_\` from "${this.endEvent_}"`),this.off(this.player(),this.endEvent_,this.endListener_)),this.on(this.player(),this.startEvent_,this.startListener_),this}shouldHide_(e,t){const{end:i}=this.options_;return L(i)?e>=i:i===t}show(){return super.show(),this.off(this.player(),this.startEvent_,this.startListener_),this.debug("shown"),this.debug(`unbound \`startListener_\` from "${this.startEvent_}"`),this.endEvent_&&(this.debug(`bound \`endListener_\` to "${this.endEvent_}"`),this.on(this.player(),this.endEvent_,this.endListener_)),this}shouldShow_(e,t){const{start:i}=this.options_,{end:n}=this.options_;return L(i)?L(n)?e>=i&&e<n:this.hasShownSinceSeek_?Math.floor(e)===i:(this.hasShownSinceSeek_=!0,e>=i):i===t}startListener_(e){const t=this.player().currentTime();this.shouldShow_(t,e.type)&&this.show()}endListener_(e){const t=this.player().currentTime();this.shouldHide_(t,e.type)&&this.hide()}rewindListener_(){const e=this.player().currentTime(),t=this.previousTime_,{start:i}=this.options_,{end:n}=this.options_;e<t&&(this.debug("rewind detected"),L(n)&&!this.shouldShow_(e)?(this.debug(`hiding; ${n} is an integer and overlay should not show at this time`),this.hasShownSinceSeek_=!1,this.hide()):D(n)&&e<i&&(this.debug(`hiding; show point (${i}) is before now (${e}) and end point (${n}) is an event`),this.hasShownSinceSeek_=!1,this.hide())),this.previousTime_=e}}r().registerComponent("Overlay",O);r().registerPlugin("overlay",(function(e){if(r().browser.IS_IOS||r().browser.IS_ANDROID)return;const t=r().obj.merge(I,e);Array.isArray(this.overlays_)&&this.overlays_.forEach((e=>{this.removeChild(e),this.controlBar&&this.controlBar.removeChild(e),e.dispose()}));const{overlays:i}=t;delete t.overlays,this.overlays_=i.map((e=>{const i=r().obj.merge(t,e),n="string"==typeof i.attachToControlBar||!0===i.attachToControlBar;if(!this.controls()||!this.controlBar)return this.addChild("overlay",i);if(n&&-1!==i.align.indexOf("b")){let e=this.controlBar.children()[0];if(this.controlBar.getChild(i.attachToControlBar)&&(e=this.controlBar.getChild(i.attachToControlBar)),e){const t=this.controlBar.addChild("overlay",i);return this.controlBar.el().insertBefore(t.el(),e.el()),t}}const s=this.addChild("overlay",i);return this.el().insertBefore(s.el(),this.controlBar.el()),s}))}));const M={},R=r().getComponent("Component");r().registerComponent("EndCard",class extends R{constructor(e,t){super(e,t),this.upNextEvents=new(r().EventTarget),this.dashOffsetTotal=586,this.dashOffsetStart=293,this.interval=50,this.chunkSize=(this.dashOffsetTotal-this.dashOffsetStart)/(this.options_.timeout/this.interval),e.one("ended",(()=>{this.showCard((e=>{this.container.innerHTML=this.getGridTemplate(this.options_),this.renderGridItems(),a().applyBehaviour(this.container),e||this.options_.next(this.options_.playlist[0])})),e.one("playing",(()=>{this.upNextEvents.trigger("playing")}))}))}createEl(){const e=super.createEl("div",{className:"vjs-upnext-content",style:this.options_.getAutoplay()?`background-image: url(${this.options_.playlist[0].poster});`:"",innerHTML:this.options_.getAutoplay()?this.getTemplate(this.options_):this.getGridTemplate(this.options_)});return this.container=e,e.style.display="none",this.options_.getAutoplay()||this.renderGridItems(),this.autoplayRing=e.querySelector(".vjs-upnext-svg-autoplay-ring"),this.cancelButton=e.querySelector(".vjs-upnext-cancel-button"),this.nextButton=e.querySelector(".vjs-upnext-autoplay-icon"),this.cancelButton&&(this.cancelButton.onclick=()=>{this.upNextEvents.trigger("cancel"),this.container.style=""}),this.nextButton&&(this.nextButton.onclick=()=>{this.upNextEvents.trigger("next")}),a().applyBehaviour(e),e}renderGridItems(){const e=this.container.querySelector(".overlay");for(let t=0;t<this.options_.playlist.length;t+=1)e.innerHTML+=this.getPlaylistItemTemplate(this.options_.playlist[t])}getTemplate(e){return`\n        <div class="overlay">\n            <div class="vjs-upnext-top">
2\n              <span class="vjs-upnext-headtext">${e.headText}</span>\n              <span class="vjs-upnext-title">${e.playlist[0].title}</span>\n            </div>\n            \n            <div class="vjs-upnext-autoplay-icon">\n                <svg height="100%" version="1.1" viewbox="0 0 98 98" width="100%">\n                    <circle class="vjs-upnext-svg-autoplay-circle" cx="49" cy="49" fill="#000" fill-opacity="0.8" r="48"></circle>\n                    <circle class="vjs-upnext-svg-autoplay-ring" cx="-49" cy="49" fill-opacity="0" r="46.5" stroke="#FFFFFF" stroke-width="4" transform="rotate(-90)"></circle>\n                    <polygon class="vjs-upnext-svg-autoplay-triangle" fill="#fff" points="32,27 72,49 32,71"></polygon>\n                </svg>\n            </div>\n            \n            <span class="vjs-upnext-bottom">\n              <span class="vjs-upnext-cancel">\n                <button class="vjs-upnext-cancel-button" tabindex="0" aria-label="Cancel autoplay">${e.cancelText}</button>\n              </span>\n            </span>\n        </div>\n            \n        <div class="type-toggle playlist-toggle">\n            <span class="playlist-toggle-label">${e.autoplayText}</span>\n            <input class="jsb_ jsb_LocalStorage" id="playlist-autoplay" type="checkbox" name="playlist-autoplay" checked />\n            <label for="playlist-autoplay">${e.autoplayText}</label>\n        </div>\n      `}getGridTemplate(e){return`\n        <div class="overlay grid"></div>\n        \n        <div class="type-toggle playlist-toggle">\n            <span class="playlist-toggle-label">${e.autoplayText}</span>\n            <input class="jsb_ jsb_LocalStorage" id="playlist-autoplay" type="checkbox" name="playlist-autoplay" checked />\n            <label for="playlist-autoplay">${e.autoplayText}</label>\n        </div>\n      `}getPlaylistItemTemplate(e){return`\n        <div class="vjs-upnext-playlist-item">\n            <a class="video-link" href="${e.url}" title="${e.title}">\n                <div class="image-wrapper" style="background-image: url('${e.poster}');">\n                    <div class="overlay">\n                        <div class="${e.accessLevel} icon-lock"></div>\n                    </div>\n                </div>\n        \n                <div class="text-box">\n                    <span class="subtitle">\n                        ${e.eventDate}\n                    </span>\n                    <h3 class="title">\n                        ${e.title}\n                    </h3>\n                </div>\n            </a>\n        </div>\n      `}showCard(e){let t,i,n,r;this.autoplayRing&&(this.autoplayRing.setAttribute("stroke-dasharray",this.dashOffsetStart),this.autoplayRing.setAttribute("stroke-dashoffset",-this.dashOffsetStart)),this.upNextEvents.one("cancel",(()=>{clearTimeout(t),e(!0)})),this.upNextEvents.one("playing",(()=>{clearTimeout(t),this.dispose()})),this.upNextEvents.one("next",(()=>{clearTimeout(t),e(!1)}));const s=function(){n=this.options_.timeout-((new Date).getTime()-i),n<=0?(clearTimeout(t),e(!1)):(r=Math.max(-this.dashOffsetTotal,this.autoplayRing.getAttribute("stroke-dashoffset")-this.chunkSize),this.autoplayRing.setAttribute("stroke-dashoffset",r),t=setTimeout(s.bind(this),this.interval))};this.container.style.display="block",i=(new Date).getTime(),this.options_.getAutoplay()&&(t=setTimeout(s.bind(this),this.interval))}});const N=function(e){this.ready((()=>{r().obj.merge(M,e),this.addClass("vjs-upnext")}));const t=e||{},i={next:t.next,getAutoplay:t.getAutoplay||function(){return!1},playlist:t.playlist,timeout:t.timeout||1e4,cancelText:t.cancelText||"Cancel",headText:t.headText||"Up Next",autoplayText:t.autoplayText||"Autoplay"};this.removeChild("endCard"),this.addChild("endCard",i)};r().registerPlugin("upnext",N),N.VERSION="__VERSION__";const U=r().getPlugin("plugin");r().registerPlugin("livestreamOverlay",class extends U{constructor(e,t){super(e,t),this.state={errorInterval:5,maxRetries:3,lastCalled:0,retries:0,isOpen:!1,streamState:null,retryInterval:30,retryTimer:null},this.setSource=()=>{const e=this.getSource();e&&(this.player.src(e),this.player.play().catch((()=>{})))}
2,this.getSource=()=>this.player.currentSrc(),this.errorHandler=()=>{const e=this.player.error(),{isLive:t}=this.options.getLivestreamData().segments[this.player.playlist.currentItem()];if(!t||e&&4!==e.code||Date.now()-this.state.lastCalled<1e3*this.state.errorInterval)return;const i=new Date(this.options.getLivestreamData().eventStartDate).getTime(),n=new Date(this.options.getLivestreamData().eventEndDate).getTime();if(Date.now()<i){r().log.error("Livestream hasnt been started yet."),this.player.poster(`${this.options.assetsPath}img/player/stream-too-early.jpg`);const e=i-Date.now();this.startRetryTimer(e,(()=>{this.player.play().catch((()=>{this.player.poster(this.options.getLivestreamData().poster)}))}))}else{if(Date.now()>=i&&Date.now()>=n)return r().log.error("Livestream ended."),this.show("ended"),void this.player.pause();this.player.paused()&&4!==(null==e?void 0:e.code)||this.checkGeoblock().then((e=>{if(403===e.status)r().log.error("Livestream is Geoblocked in current Region."),this.show("geoblocked");else if(r().log.error("Connection to Livestream interrupted."),this.show("interrupted"),!this.player.paused()){const e=1e3*this.state.retryInterval;this.startRetryTimer(e,(()=>{this.player.play().catch((()=>{})),this.errorHandler()}))}})).catch((()=>{r().log.error("Livestream is Geoblocked in current Region."),this.show("geoblocked")})),this.setState({lastCalled:Date.now(),retries:this.state.retries+1})}},this.checkGeoblock=()=>fetch(this.getSource(),{method:"HEAD"}),this.startRetryTimer=(e,t)=>{r().log.debug("start livestream retry timer"),clearTimeout(this.state.retryTimer),this.setState({retryTimer:setTimeout((()=>{r().log.error("retry to play livestream"),t()}),e)})},this.show=e=>{if(this.player.error(null),!this.state.isOpen&&e!==this.state.streamState){if(this.player.poster(`${this.options.assetsPath}img/player/stream-${e}.jpg`),"interrupted"!==e){const t=r().getComponent("ModalDialog");this.modal=new t(this.player),this.modal.addClass(`stream-${e}`),this.player.addChild(this.modal),this.modal.on("modalclose",(()=>{this.modal.dispose()})),this.modal.open()}this.setState({isOpen:!0,streamState:e})}},this.hide=()=>{this.state.isOpen&&(this.modal&&this.modal.dispose(),clearTimeout(this.state.retryTimer),this.player.poster(this.options.getLivestreamData().poster),this.setState({retryTimer:null,lastCalled:0,retries:0,isOpen:!1,streamState:null}))},this.options=t,e.reloadSourceOnError(),e.on("retryplaylist",this.errorHandler),e.on("error",this.errorHandler),e.on("play",this.hide)}dispose(){this.player.off("retryplaylist",this.errorHandler),this.player.off("error",this.errorHandler),this.player.off("play",this.hide),this.hide(),super.dispose()}});const B=r().getComponent("Button");class j extends B{constructor(e,t){super(e,t),this.resumeFromTime=t.resumeFromTime,this.resumeIndex=t.resumeIndex,this.player=e}buildCSSClass(){return"vjs-resume b-btn is-primary btn"}createEl(){return super.createEl("button",{innerHTML:`${this.options_.resumeButtonText}`})}handleClick(){this.player.resumeModal.close(),this.options_.resumeCallback?this.options_.resumeCallback(this.resumeFromTime,this.resumeIndex):(this.player.playlist.currentItem(this.resumeIndex),this.player.currentTime(this.resumeFromTime),this.player.play())}}j.prototype.controlText_="Resume",r().registerComponent("ResumeButton",j);const F=r().getComponent("Button");class q extends F{buildCSSClass(){return"vjs-no-resume b-btn is-primary btn"}createEl(){return super.createEl("button",{innerHTML:`${this.options_.cancelButtonText}`})}handleClick(){this.player_.resumeModal.close()}}q.prototype.controlText_="No Thanks",r().registerComponent("ResumeCancelButton",q);const H=r().getComponent("Component");r().registerComponent("ResumeModalButtons",class extends H{constructor(e,t){super(e,t),this.addChild("ResumeButton",t),this.addChild("ResumeCancelButton",t)}createEl(){return super.createEl("div",{className:"vjs-resume-modal-buttons button-wrapper"})}});const V=r().getComponent("Component");r().registerComponent("ResumeModalText",class extends V{createEl(){return super.createEl("h3",{className:"title",innerHTML:this.options_.title})}});
2const $=r().getComponent("ModalDialog");r().registerComponent("ResumeModal",class extends ${constructor(e,t){super(e,t),this.player_.resumeModal=this,this.open(),this.addChild("ResumeModalText",t),this.addChild("ResumeModalButtons",t)}buildCSSClass(){return`vjs-resume-modal ${super.buildCSSClass()}`}});const z=function(e){const t=e.uuid,{userHash:i}=e,{apiToken:n}=e,s=e.title||"Continue watching?",a=e.resumeButtonText||"Yes",o=e.cancelButtonText||"No",l=e.playbackOffset||5,u=e.endOffset||15,{resumeCallback:d}=e,c=e.baseUrl||"",h=e.getEndpoint||"",p=e.setEndpoint||"",f=e.expires||30,g=e.storeInterval||15,m=`videojs-resume:${t}`;let y="idle",v=0,_=0,b=0;const T=function(e,s,a){void 0===a&&(a="PATCH"),"idle"===y&&v!==e&&(y="pending",fetch(c+p,{method:a,body:JSON.stringify({userId:i,videoId:t,videoIndex:s,seconds:e}),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest",Authorization:`Bearer ${n}`}}).then((t=>{if(!t.ok)throw y="error",Error(t.statusText);return v=e,y="idle",t})).catch((e=>r().log.error(e))))},S=()=>{v>0&&(r().log.debug("ResumePlayback: removeStoredTimeWatched"),i&&n?T(Math.round(this.duration()),0):document.cookie=`${m}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/`,v=0,_=0)};this.on("durationchange",(()=>{this.duration()>0&&this.duration()!==1/0&&0===v&&(b=Math.round(this.duration()-u),r().log.debug(`ResumePlayback: Set maxTimeToStore: ${b}`),(()=>{if(i&&n)return fetch(`${c+h+t}/${i}`,{method:"GET",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest",Authorization:`Bearer ${n}`}}).then((e=>e.json())).catch((e=>r().log.error(e)));let e={seconds:0,videoIndex:0};const s=document.cookie.split("; ").find((e=>e.startsWith(`${m}=`)));return s&&(r().log.debug(`ResumePlayback: parsing cookie > ${s}`),e=JSON.parse(s.split("=")[1]),r().log.debug("ResumePlayback: parsed cookie result",e)),Promise.resolve(e)})().then((e=>{v=(null==e?void 0:e.seconds)||0,_=(null==e?void 0:e.videoIndex)||0,r().log.debug(`ResumePlayback: getTimeWatched > index: ${_}, time: ${v}`),v>l&&v<b&&(r().log.debug("ResumePlayback: Create Resume-Modal"),this.addChild("ResumeModal",{title:s,resumeButtonText:a,cancelButtonText:o,resumeFromTime:v,resumeIndex:_,resumeCallback:d,storageKey:m,description:""}))})))})),this.on("timeupdate",(()=>{const e=Math.floor(this.currentTime()),t=this.playlist.currentItem();e>=b?S():e%g==0&&v!==e&&((e,t)=>{if((e-=l)>0)if(i&&n)T(e,t,v?"PATCH":"POST");else{const i=new Date;i.setTime(i.getTime()+24*f*60*60*1e3);const n=JSON.stringify({seconds:e,videoIndex:t});document.cookie=`${m}=${n};expires=${i.toUTCString()};path=/`}})(e,t)})),this.on("ended",(()=>{S()})),this.ready((()=>{r().log.debug(`ResumePlayback: Ready - playbackOffset: ${l}`)}))};r().registerPlugin("resumePlayback",z),z.VERSION="__VERSION__",i(5912),i(4373)(r());const W=class{constructor(e,i){t().applyLogging(this,"Player"),this.container=e;const n={loginUrl:"/login",aboUrl:"/user/profile",chromecast:{requestTitleFn:()=>this.options.title}};this.options={...n,...i},r().log.debug("PLAYER: options:",i),this.player=null,this.playerEl=null,this.isFirstPlay=!0,this.isTeaser=!1,this.errorCode=null,this.tokenRequested=!1,this.state="init",this.videoData=null,this.states=["error","playing","paused","ended","loading"],this.dispatchEvent("Player::LOADED",i),this.createVideoplayer()}createVideoplayer(){this.state="loading",this.playerEl=document.createElement("video"),this.container.appendChild(this.playerEl),this.options.plugins.eventTimeline&&(this.options.plugins.eventTimeline={...this.options.plugins.eventTimeline,getSyncTimeStart:()=>{let e=0;return this.player&&this.videoData.segments&&(e=this.videoData.segments[this.player.playlist.currentItem()].syncTimeStart),e},getSyncTimeEnd:()=>{let e=0;return this.player&&this.videoData.segments&&(e=this.videoData.segments[this.player.playlist.currentItem()].syncTimeEnd),e},getTitle:()=>this.videoData.title}),this.options.plugins.livestreamOverlay={assetsPath:this.options.assetsPath,getLivestreamData:()=>this.videoData,setSource:()=>this.setSource(0)},this.options.html5={vhs:{overrideNative:!r().browser.IS_SAFARI,playlistExclusionDuration:5,maxPlaylistRetries:3}},this.options.isEmbed||this.initializeUpNext(),l.initializePlayer(this.playerEl,this.options).then((e=>{if(this.player=e,this.loadSourcesByTokenService(),this.options.overlays.length&&e.overlay({overlays:this.options.overlays}),e.ima.initializeAdDisplayContainer){let t="click";(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(t="touchend");const i=()=>{e.ima.initializeAdDisplayContainer(),this.playerEl.removeEventListener(t,i)};this.playerEl.addEventListener(t,i)}e.on("timeupdate",(()=>{this.checkForCustomStartTime(),this.state="playing",this.dispatchEvent("Player::TIMEUPDATE",{currentTime:this.player.currentTime()})})),e.on("durationchange",(()=>{this.checkForCustomStartTime()})),e.on("seeking",(()=>{this.isSeeking||(this.isSeeking=!0,this.dispatchEvent("Player::SEEK",{videoId:this.videoData.id,seekTo:Math.round(e.currentTime()/e.duration()*100)}))})),e.on("seeked",(()=>{this.isSeeking=!1})),e.on("pause",(()=>{setTimeout((()=>
2{if(!this.isSeeking)return e.duration()===e.currentTime()?(this.isFirstPlay=!0,this.state="ended",void this.dispatchEvent("Player::ENDED",{videoId:this.videoData.id})):(this.state="paused",void this.dispatchEvent("Player::PAUSED"))}),0)})),e.on("play",(()=>{if(this.isSeeking)return;let e;this.isFirstPlay?(this.isFirstPlay=!1,e="Player::STARTED"):e="Player::PLAY",this.dispatchEvent(e,this.getPayload())})),e.on("playing",(()=>{this.dispatchEvent("Player::PLAYING")})),e.on("ended",(()=>{this.isTeaser&&this.setError(this.errorCode)})),e.tech_.on("retryplaylist",(()=>{e.trigger("retryplaylist")})),e.on("playlisterror",(e=>{"p"===e.nextItem.status&&this.loadSourcesByTokenService(e.nextIndex)})),this.dispatchEvent("Player::INITIALIZED")}))}getPayload(){return{segmentId:this.videoData.segments[this.player.playlist.currentItem()].id,videoId:this.videoData.id,title:this.videoData.title,publishDate:this.videoData.publishDate,startDate:this.videoData.startDate,categoryTitle:this.videoData.categoryTitle,accessLevel:this.videoData.accessLevel,description:this.videoData.description,duration:this.player.duration()}}checkForCustomStartTime(){if(!isNaN(this.options.startTime)&&this.options.startTime>0){const{startTime:e}=this.options;this.player.currentTime(e),this.options.startTime=0}}processVideoData(e,t){t&&"a"!==e.segments[t].status?this.setError("videoPassive",!0):(this.videoData={title:this.options.title,poster:this.options.poster,startDate:this.options.startDate,endDate:this.options.endDate,publishDate:this.options.publishDate,categoryTitle:this.options.categoryTitle,de
2scription:this.options.description,id:e.id,segments:e.segments,accessLevel:e.accessLevel,statsToken:e.statsToken,seamlessPlay:{userHash:e.userHash,apiToken:e.seamlessApiToken}},this.setSource(t),this.dispatchEvent("Player::DATA_LOADED",this.getPayload()))}setSource(e){this.dispatchEvent("Player::SET_SOURCE"),this.player.timelinePlayer({playlist:this.videoData.segments}),this.player.playlist(this.videoData.segments),e?this.player.playlist.currentItem(e):(this.player.playlist.autoadvance(0),this.videoData.segments.length>1&&this.player.playlistControls()),this.options.seamlessPlayEnabled&&!this.isTeaser&&this.player.resumePlayback({uuid:this.videoData.id,userHash:this.videoData.seamlessPlay.userHash,apiToken:this.videoData.seamlessPlay.apiToken,baseUrl:this.options.seamlessPlay.baseUrl,setEndpoint:this.options.seamlessPlay.setEndpoint,getEndpoint:this.options.seamlessPlay.getEndpoint,ignoreSSLVerification:this.options.seamlessPlay.ignoreSSLVerification,title:this.options.translations.resumePlayback.message,resumeButtonText:this.options.translations.resumePlayback.yes,cancelButtonText:this.options.translations.resumePlayback.no,resumeCallback:(t,i)=>{r().log.debug(`ResumePlayback: Resume video ${i} at ${t}`),this.options.startTime=t,e!==i&&this.player.playlist.currentItem(i),this.play()}})}initializeUpNext(){var e,t,i;if(null!==(e=this.options)&&void 0!==e&&null!==(t=e.relatedVideos)&&void 0!==t&&null!==(i=t.videos)&&void 0!==i&&i.length){const e=JSON.parse(localStorage.getItem("playlist-autoplay"));this.options.plugins.upnext={headText:this.options.translations.playlist.next,cancelText:this.options.translations.playlist.cancel,autoplayText:this.options.translations.playlist.autoplay,playlist:this.options.relatedVideos.videos,timeout:1e4,getAutoplay:()=>!1!==e,next:e=>{window.location.href=`${e.url}#autoplay`}}}}setVideoById(e){this.options.videoId=e,this.loadSourcesByTokenService()}play(){this.player&&(this.tokenRequested?this.player.paused()&&this.player.play():this.loadSourcesByTokenService())}pause(){this.player&&this.player.pause()}loadSourcesByTokenService(e){this.tokenRequested=!1;const t=`${this.options.baseUrl+this.options.tokenBasePath+this.options.videoId}?time=${(new Date).getTime()}`,i=new XMLHttpRequest;i.open("GET",t,!0),i.withCredentials=!0,i.onreadystatechange=()=>{if(4===i.readyState)if(200===i.status){const t=JSON.parse(i.responseText);if(t){const{message:i}=t;switch(r().log.debug("PLAYER: TokenService:",i),i){case"success":return this.tokenRequested=!0,void this.processVideoData(t,e);case"loginRequired":r().log.debug("PLAYER: TokenService: login required for this video"),this.onTokenError(i);break;case"insufficientRights":r().log.debug(`PLAYER: TokenService: insufficient rights for this video. Access-Level "${t.accessLevel}" required.`),this.onTokenError(t.accessLevel);break;case"insufficientRightsTicketRequired":r().log.debug(`PLAYER: TokenService: insufficient rights for this video. Access-Level "${t.accessLevel}" required.`),this.onTokenError("ticketRequired");break;default:r().log.warn("PLAYER: TokenService: unknown message",i),this.pause(),this.player&&this.player.currentTime&&this.player.currentTime(0)}}else r().log.error("PLAYER: TokenService: unknown response"),this.pause(),this.player.currentTime&&this.player.currentTime(0)}else r().log.error("PLAYER: TokenService: failed loading"),this.setError()},i.send()}setState(e){e!==this.state&&(this.states.includes(e)>=0?(r().log.debug(`PLAYER: set new state: ${e}, last state: ${this.state}`),this.container.classList.remove(this.state),this.container.classList.add(e),this.state=e,a().fireStickyEvent("Player::STATE_CHANGED",{id:this.options.id,state:e})):r().log.warn("PLAYER: cannot set unknown state:",e))}onTokenError(e){var t,i,n;null!==(t=this.options)&&void 0!==t&&null!==(i=t.teaser)&&void 0!==i&&null!==(n=i.segments)&&void 0!==n&&n.length?(this.errorCode=e,this.playTeaser()):this.setError(e)}playTeaser(){this.isTeaser=!0,this.tokenRequested=!0,this.processVideoData(this.options.teaser,0)}setError(e,t){t||(this.player.exitFullscreen(),this.setState("error")),a().fireStickyEvent("Player::ERROR",{id:this.options.id,errorCode:e})}jsbOn(e,t){const i=a().on(e,{id:this.options.id},t);return i.dontLeak(this),i}dispatchEvent(e,t){var i,n;t=t||{},t={id:this.options.id,trackingEnabled:!this.options.loop&&this.options.trackingEnabled,statsToken:null!==(i=this.videoData)&&void 0!==i&&i.statsToken?null===(n=this.videoData)||void 0===n?void 0:n.statsToken:null,...t},r().log.debug(`PLAYER: dispatchEvent: ${e} - ${JSON.stringify(t)}`),a().fireStickyEvent(e,t)}};var G=i(6978),X=i.n(G);const Y=new class{constructor(){t().applyLogging(this,"FanTvEmbed"),this.defaults={baseUrl:"/",configPath:"api/v2/video/player/config",cssClass:"b-player",prefix:"fantv-player",isEmbed:!0,autoplay:!1,loop:!1,controls:!0,muted:!1,playsinline:!0,displaySticky:!0},this.config={appname:"FanTV",heartbeatInterval:3e4,castFrameworkUrl:"https://www.gstatic.
2com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",initBasePath:"api/v2/video/player/init/",tokenBasePath:"api/v2/video/player/token/",videoStatsUrl:"/video-stats",imaSdkUrl:"https://imasdk.googleapis.com/js/sdkloader/ima3.js",ssoAuthURL:null,seamlessPlay:null,baseUrl:null,isAuthorized:!1},this.players=[],this.initQueue=[],this.initPlayerQueue=[],this.isConfigLoaded=!1,this.configCall=null,this.ssoAuthCall=null,this.disableAds=!1}init(e){e={...this.defaults,...e||{}},this.isConfigLoaded||null===e.isAuthorized||(this.config.isAuthorized=e.isAuthorized),e.baseUrl=e.basePath?e.basePath:e.baseUrl,this.waitForConsent().then((()=>{this.configCall&&!this.isConfigLoaded?this.initQueue.push(e):this.configCall=this.loadConfig(e).then((()=>{this.initPlayers(e);for(let e=this.initQueue.length;e>0;e-=1)this.init(this.initQueue.shift())}))}))}waitForConsent(){return new Promise((e=>{var t,i;if(null!==(t=window)&&void 0!==t&&null!==(i=t.Cookiebot)&&void 0!==i&&i.consent){if(window.Cookiebot.hasResponse)return this.disableAds=window.Cookiebot.declined,void e();if(window.Cookiebot.consent.hasResponse)return this.disableAds=window.Cookiebot.consent.declined,void e();window.addEventListener("CookiebotOnAccept",(()=>{e()}),!1),window.addEventListener("CookiebotOnDecline",(()=>{this.disableAds=!0,e()}),!1)}else e()}))}loadStylesheet(e){return new Promise(((t,i)=>{const n="fantv-player-stylesheet";let r=document.getElementById(n);if(r)return this.logDebug("player stylesheet already loaded, skipping..."),void t(r);let{cssPath:s}=this.config;"/"!==e.baseUrl&&(s=e.baseUrl+this.config.cssPath),r=document.createElement("link"),r.id=n,r.type="text/css",r.rel="stylesheet",r.href=s,r.onload=()=>{t(r)},r.onerror=()=>{i()},document.head.appendChild(r)}))}injectScript(e,t){return new Promise(((i,n)=>{const r=document.createElement("script");r.id=e,r.type="text/javascript",r.async=!1,r.onreadystatechange=()=>{i()},r.onload=()=>{i()},r.onerror=()=>{this.logError(`an error occurred while injecting ${t}`),n()},r.src=t,document.head.appendChild(r)}))}injectCastFramework(){const e="fantv-player-cast-framework";return document.getElementById(e)||window.cast&&"object"===window.cast.framework?(this.logDebug("cast framework already loaded, skipping..."),Promise.resolve()):this.injectScript(e,this.config.castFrameworkUrl)}injectImaSdk(){const e="fantv-player-ima-sdk";return document.getElementById(e)||window.ima&&"object"===window.ima?(this.logDebug("ima sdk already loaded, skipping..."),Promise.resolve()):this.injectScript(e,this.config.imaSdkUrl)}loadConfig(e){let t=e.configPath;return e.baseUrl&&(t=`${e.baseUrl+t}`),new Promise(((i,n)=>{if(this.isConfigLoaded)return void i();const r=new XMLHttpRequest;r.open("GET",t,!0),r.withCredentials=!0,r.onreadystatechange=()=>{if(4===r.readyState)if(200===r.status){const t=JSON.parse(r.responseText);this.config={...this.config,...t};const n=[];e.isEmbed&&n.push(this.loadStylesheet(e).catch((()=>{this.logError("Stylesheet load failed")}))),n.push(this.injectCastFramework().catch((e=>{this.logError("Cast framework injection failed.",e)}))),n.push(this.injectImaSdk().catch((e=>{this.logError("IMA SDK injection failed.",e)}))),Promise.all(n).then((()=>{this.initTracking(),this.isConfigLoaded=!0,i()})).catch((()=>{this.initTracking(),this.isConfigLoaded=!0,i()}))}else this.logError("Config call failed.",r.statusText),n()},r.send()}))}initTracking(){const{body:e}=window.document;e.classList.add("jsb_","jsb_Tracking"),a().applyBehaviour(window.document),a().fireEvent("Tracking::SET_CONFIG",{appname:this.config.appname,heartbeatInterval:this.config.heartbeatInterval,videoStatsUrl:this.config.videoStatsUrl,type:this.config.trackingType})}makeInitCall(e,t,i){if(i){let n=this.config.initBasePath+i;e.baseUrl&&(n=`${e.baseUrl+n}`);const r=new XMLHttpRequest;r.open("GET",n,!0),r.withCredentials=!0,r.onreadystatechange=()=>{if(4===r.readyState)if(200===r.status){const n=JSON.parse(r.responseText);this.createPlayer(e,t,i,n)}else this.logError("Init call failed.",r.statusText),t.innerHTML=`<div class="init-error">Failed to load Video-Configuration. Status: ${r.status}</div>`},r.send()}}authorize(){return new Promise((e=>{if(this.config.isAuthorized)return void e();const t=new XMLHttpRequest;t.open("GET",this.config.ssoAuthURL,!0),t.withCredentials=!0,t.onreadystatechange=()=>{4===t.readyState&&(this.config.isAuthorized=!0,e())},t.send()}))}initPlayers(e){if(this.config.isAuthorized){const t=this.getFanTvEmbedDomElements(e.prefix),i=t.length;for(let n=0;n<i;n+=1){const i=t[n],r=i.getAttribute("data-id");r?this.makeInitCall(e,i,r):this.logError("Error: video-id is missing!")}}else this.ssoAuthCall?this.initPlayerQueue.push(e):this.ssoAuthCall=this.authorize().then((()=>{this.initPlayers(e);for(let e=this.initPlayerQueue.length;e>0;e-=1)this.initPlayers(this.initPlayerQueue.shift())}))}getFanTvEmbedDomElements(e){const t=[],i=document.querySelectorAll(`.${e}`),n=i.length;for(let r=0;r<n;
2r+=1)i[r].classList.remove(e),t.push(i[r]);return t}createPlayer(e,t,i,n){const r=`fantv-player-${Math.random().toString(36).substr(2,9)}`;t.classList.add(e.cssClass),e.isEmbed&&t.classList.add("fantv-player-embed"),this.initErrorScreen(t,r),!1===e.displaySticky&&delete n.plugins.displaySticky,this.disableAds&&delete n.plugins.ima;let{autoplay:s}=e;!1===s&&(s="#autoplay"===window.location.hash);const a={...n,...this.config,isEmbed:e.isEmbed,techOrder:["chromecast","html5"],autoplay:s,baseUrl:e.baseUrl,loop:e.loop,controls:e.controls,muted:e.muted,playsinline:e.playsinline,liveui:!0,id:r,videoId:i,html5:{vhs:{},nativeTextTracks:!1},controlBar:{volumePanel:{inline:!1},children:["playToggle","volumePanel","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","subtitlesButton","audioTrackButton","chaptersButton","captionsButton","pictureInPictureToggle","qualityButton","chromecastButton","fullscreenToggle"]}};this.players[r]=new W(t,a)}initErrorScreen(e,t){e.innerHTML+=X()({playerId:t,errorMessages:this.config.errorMessages||{}}),a().applyBehaviour(e)}isInViewport(e){const{top:t,right:i,bottom:n,left:r}=e.getBoundingClientRect(),{innerHeight:s,innerWidth:a}=window;return(t>0&&t<s||n>0&&n<s)&&(r>0&&r<a||i>0&&i<a)}};a().registerHandler("EmbedPlayer",class{constructor(e,i){t().applyLogging(this,"EmbedPlayer"),i={isEmbed:!1,isAuthorized:!0,...i},Y.init(i)}});var K=i(3003),Q=i.n(K);a().registerHandler("ErrorScreen",class{constructor(e,i){t().applyLogging(this,`${i.playerId}][ErrorScreen`),this.defaults={errorMessages:{default:{message:"Es ist ein Fehler aufgetreten. Versuchen Sie es später noc
2h einmal."},videoPassive:{message:"Dieses Video ist leider noch nicht verfügbar.",buttons:[{label:"Schließen"}]},videoMissing:{message:"Dieses Video existiert nicht mehr."},playbackError:{message:"Beim Abspielen ist ein Fehler aufgetreten."},loadTimeout:{message:"Zeitüberschreitung beim Laden."},paid:{title:"Abo erforderlich!",message:"Um dieses Video schauen zu können, benötigen Sie ein Abo.",buttons:[{label:"Zu den Abos",url:"/user/edit_subscription"}]},loginRequired:{title:"Login erforderlich!",message:"Um dieses Video schauen zu können, müssen Sie eingeloggt sein.",buttons:[{label:"Login",url:"/login"}]},season_ticket_holder:{title:"Nicht für jeden!",message:"Dieses Video steht nur Inhabern von Saison-Abos, Dauerkarten oder Premium Abos zur Verfügung. Zeige jetzt deine Treue und hol dir das Abo!"},members:{title:"Nur für Mitglieder!",message:"Dieses Video ist exklusiv für Mitglieder. Werde jetzt Mitglied um das Video anzusehen!"}}},this.options={...this.defaults,...i},this.logDebug("options:",i),this.element=e,this.errorCode=null,this.initializeEventListeners()}initializeEventListeners(){a().whenFired("Player::ERROR",{id:this.options.playerId},(e=>{!1===e.errorCode?this.hide():this.show(e.errorCode)})).dontLeak(this),a().on("Player::DESTROY",{id:this.options.playerId},(()=>{a().fireEvent("Jsb::REMOVED_INSTANCE",this),this.element.off()})).dontLeak(this),a().on("Player::SET_SOURCE",{id:this.options.playerId},(()=>{this.element.innerHTML="",this.element.style.display=""})).dontLeak(this)}show(e){const t=this.options.errorMessages[e]||this.defaults.errorMessages[e]||this.options.errorMessages.default;this.errorCode=e,this.render(t,e),this.element.style.display="block",this.element.classList.add(e)}hide(){this.element.innerHTML="",this.element.style.display="none",this.element.classList.remove(this.errorCode),this.errorCode=null}render(e){if(this.element.innerHTML=Q()({error:e}),e.buttons&&e.buttons.length){const t=this.element.querySelectorAll(".js-btn"),i=this.element.querySelector(".error-wrapper");e.buttons.forEach(((e,n)=>{if(e.addReturnUrl&&e.returnUrlParam&&t[n].href){let i=new URL(t[n].href);i.searchParams.append(e.returnUrlParam,window.location.href),t[n].href=i}t[n].addEventListener("click",(t=>{e.event?(t.preventDefault(),a().fireEvent(e.event.name)):window.doLogin&&e.class&&e.class.contains("js-login-link")?(t.preventDefault(),window.doLogin()):this.hide(),i.style.display="none"}))}))}}}),i(9496),t().level=t().LEVEL_OFF,window.FanTvEmbed={init:Y.init.bind(Y)},window.videojs=r()})()})();

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