@npo/player 2.0.0-beta.2 → 2.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,128 @@
1
+ (function(Or,li){typeof exports=="object"&&typeof module<"u"?li(exports):typeof define=="function"&&define.amd?define(["exports"],li):(Or=typeof globalThis<"u"?globalThis:Or||self,li(Or.NpoPlayer={}))})(this,function(Or){"use strict";var UR=Object.defineProperty;var BR=(Or,li,Pi)=>li in Or?UR(Or,li,{enumerable:!0,configurable:!0,writable:!0,value:Pi}):Or[li]=Pi;var be=(Or,li,Pi)=>BR(Or,typeof li!="symbol"?li+"":li,Pi);const li=Object.freeze({VOD:"vod",LIVE:"live",LIVE_NO_DVR:"live-no-dvr",NONE:"none"}),Pi=Object.freeze({INLINE:"inline",FULLSCREEN:"fullscreen",PIP:"pip"}),es=Object.freeze({VIDEO:"video",AUDIO:"audio"}),Kr=Object.freeze({PLAY:"play",PAUSE:"pause",BUFFERING:"buffering",READY:"ready",ERROR:"error",ENDED:"ended"}),Ih=Object.freeze({ERROR:"logError",EVENT:"logEvent"}),Aa=Object.freeze({CHAPTER:"chapter",MARKER:"marker",CALLBACK:"callback",PLAY_NEXT:"play-next"}),Gx=Object.freeze({ACTION:"action",SEGMENT:"segment",HIDDEN:"hidden"}),ts=Object.freeze({EnterFullscreen:"webkitEnterFullscreen",ExitFullscreen:"webkitExitFullscreen",DisplayingFullscreen:"webkitDisplayingFullscreen",PresentationModeChanged:"webkitpresentationmodechanged",BeginFullscreen:"webkitbeginfullscreen",EndFullscreen:"webkitendfullscreen"}),xt=Object.freeze({MediaStateChanged:"mediaStateChanged",DisplayModeChanged:"displayModeChanged",CastStateChanged:"castStateChanged",AirPlayStateChanged:"airPlayStateChanged",AirPlayConnectionChanged:"webkitcurrentplaybacktargetiswirelesschanged",AirPlayAvailabilityChanged:"webkitplaybacktargetavailabilitychanged",AdComplete:"ad-complete",AdError:"ad-error",AdPaused:"ad-paused",AdResumed:"ad-resumed",AdSkipped:"ad-skipped",AdStarted:"ad-started",AdUiUpdate:"ad-ui-update",AllAdsCompleted:"all-ads-completed",CanPlay:"canplay",CanPlayThrough:"canplaythrough",DurationChange:"durationchange",Ended:"ended",Error:"error",LoadedData:"loadeddata",LoadedMetadata:"loadedmetadata",Pause:"pause",Play:"play",Playing:"playing",Progress:"progress",RateChange:"ratechange",Buffering:"buffering",Seeked:"seeked",Seeking:"seeking",Stalled:"stalled",TimeUpdate:"timeupdate",VolumeChange:"volumechange",Waiting:"waiting",TimeBoundActionTriggered:"time-bound-action-triggered",TimeBoundActionExited:"time-bound-action-exited",ChapterEntered:"chapter-entered",ChapterExited:"chapter-exited",StreamTrackChanged:"stream-track-changed"}),kr=Object.freeze({BeforeUnload:"beforeunload",Cancel:"cancel",Change:"change",Click:"click",Error:"error",Focus:"focus",FocusIn:"focusin",FocusOut:"focusout",FullscreenChange:"fullscreenchange",EnterPictureInPicture:"enterpictureinpicture",KeyDown:"keydown",LeavePictureInPicture:"leavepictureinpicture",Load:"load",MouseDown:"mousedown",MouseLeave:"mouseleave",MouseMove:"mousemove",UnhandledRejection:"unhandledrejection"}),iv=[.8,1,1.2,1.5,2],ov=19999,Kx={PRODUCTION_V2:"123D5E9D"},sv="nl",Wx="https://cdn.npoplayer.nl/posters/default-npo-poster.png",Zc=Object.freeze({INITIAL_WIDTH_PERCENTAGE:0,DEFAULT_SECONDS_TO_SKIP:15,BUFFER_STATE_TRIGGER_DELAY_MS:400,CAST_CHECK_INTERVAL_MS:2e3}),qc="error.stream-not-found",Lt="error.generic",gi="error.drm-error",$s="error.cast-error",zx="error.stream-expired",xr="error.stream-error",av=Object.freeze({19999:Lt,19e3:Lt,19001:Lt,19002:Lt,19003:Lt,19004:"error.not-supported",19005:"error.19005",19006:"error.19006",19007:"error.19007",19008:"error.19008",19009:"error.19009",19010:"error.19010",19011:"error.19011",19012:"error.19012",19013:"error.19013",19014:"error.19014",19015:"error.19015",19016:"error.19016",19017:"error.19017",19018:"error.19018",19019:"error.19019",19020:"error.19020",19021:"error.19021",19022:"error.19022",19023:"error.19023",19024:"error.19024",19025:"error.19025",19100:Lt,19101:Lt,19102:Lt,19103:Lt,19104:Lt,19200:$s,19201:$s,19202:"error.19202",19203:"error.19203",19204:"error.19204",19205:"error.19205",19206:"error.19206",19207:"error.19207",19208:"error.19208",19209:"error.19209",19210:"error.19210",19211:"error.19211",19212:"error.19212",19213:"error.19213",19214:"error.19214",19215:"error.19215",19216:"error.19216",19300:"error.19300",19301:"error.19301",19302:"error.19302",19303:"error.19303",19304:"error.19304",19305:"error.19305",19306:"error.19306",19307:"error.19307",19308:"error.19308",19309:"error.19309",19310:"error.19310",19311:"error.19311",1001:qc,1002:zx,1003:Lt,400:Lt,401:Lt,402:"error.payment-required",403:qc,404:qc,408:Lt,410:qc,412:Lt,422:"error.configuration-error",429:Lt,450:"error.age-restriction",451:"error.restricted",500:Lt,502:Lt,503:Lt,504:Lt,1e3:Lt,1004:Lt,1006:Lt,1007:Lt,1008:Lt,1009:Lt,1010:Lt,1011:Lt,1012:Lt,2e3:Lt,2001:Lt,2003:Lt,2004:Lt,2005:Lt,2007:Lt,2008:Lt,2009:Lt,2010:Lt,2011:Lt,2012:Lt,2013:Lt,3e3:Lt,3016:Lt,3001:Lt,3002:Lt,3003:Lt,3004:Lt,3005:Lt,3006:Lt,3007:Lt,3008:Lt,3009:Lt,3010:Lt,3011:Lt,3012:Lt,3013:Lt,3014:Lt,3015:Lt,3017:Lt,3018:Lt,3019:Lt,3020:Lt,3022:Lt,3023:Lt,4e3:xr,4001:xr,4002:xr,4003:xr,4004:xr,4005:xr,4006:xr,4007:xr,4008:xr,4009:xr,4010:xr,4015:xr,4016:xr,4017:xr,4020:xr,4023:xr,4024:xr,4025:xr,4026:xr,4027:xr,4028:xr,4032:xr,4033:xr,4036:xr,4037:xr,4038:xr,4039:xr,4040:xr,4041:xr,6e3:gi,6001:gi,6002:gi,6003:gi,6004:gi,6005:gi,6006:gi,6007:gi,6008:gi,6010:gi,6012:gi,6013:gi,6014:gi,6015:gi,6016:gi,6017:gi,6018:gi,6019:gi,6020:gi,7e3:Lt,7001:Lt,7002:Lt,7003:Lt,7004:Lt,7005:Lt,7006:Lt,7007:Lt,8e3:$s,8001:$s,8002:$s,8003:$s,8004:$s,8005:$s,8006:$s}),$x="widevine",Xx="playready",Yx="fairplay",Jx="dash",Qx="hls";var uv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zx(Se){return Se&&Se.__esModule&&Object.prototype.hasOwnProperty.call(Se,"default")?Se.default:Se}var lv={};/*
2
+ @license
3
+ Shaka Player
4
+ Copyright 2016 Google LLC
5
+ SPDX-License-Identifier: Apache-2.0
6
+ */(function(Se){(function(){var p=typeof window<"u"?window:uv,S={};(function(R,de,T){var f,c=typeof Object.create=="function"?Object.create:function(e){function t(){}return t.prototype=e,new t},v=typeof Object.defineProperties=="function"?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};function C(e){e=[typeof globalThis=="object"&&globalThis,e,typeof R=="object"&&R,typeof self=="object"&&self,typeof de=="object"&&de];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}var w=C(this);function I(e,t){if(t)e:{var n=w;e=e.split(".");for(var r=0;r<e.length-1;r++){var i=e[r];if(!(i in n))break e;n=n[i]}e=e[e.length-1],r=n[e],t=t(r),t!=r&&t!=null&&v(n,e,{configurable:!0,writable:!0,value:t})}}var L;if(typeof Object.setPrototypeOf=="function")L=Object.setPrototypeOf;else{var z;e:{var F={a:!0},K={};try{K.__proto__=F,z=K.a;break e}catch{}z=!1}L=z?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var N=L;function P(e,t){if(e.prototype=c(t.prototype),e.prototype.constructor=e,N)N(e,t);else for(var n in t)if(n!="prototype")if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,n);r&&Object.defineProperty(e,n,r)}else e[n]=t[n];e.Gm=t.prototype}function $(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}function d(e){var t=typeof Symbol<"u"&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if(typeof e.length=="number")return{next:$(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function M(e){if(!(e instanceof Array)){e=d(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}function U(e){if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object")}function J(){this.J=!1,this.H=null,this.i=void 0,this.h=1,this.G=this.I=0,this.M=this.C=null}function G(e){if(e.J)throw new TypeError("Generator is already running");e.J=!0}J.prototype.K=function(e){this.i=e};function Y(e,t){e.C={Yh:t,ni:!0},e.h=e.I||e.G}J.prototype.getNextAddressJsc=function(){return this.h},J.prototype.getYieldResultJsc=function(){return this.i},J.prototype.return=function(e){this.C={return:e},this.h=this.G},J.prototype.return=J.prototype.return,J.prototype.O=function(e){this.C={A:e},this.h=this.G},J.prototype.jumpThroughFinallyBlocks=J.prototype.O,J.prototype.g=function(e,t){return this.h=t,{value:e}},J.prototype.yield=J.prototype.g,J.prototype.P=function(e,t){e=d(e);var n=e.next();if(U(n),n.done)this.i=n.value,this.h=t;else return this.H=e,this.g(n.value,t)},J.prototype.yieldAll=J.prototype.P,J.prototype.A=function(e){this.h=e},J.prototype.jumpTo=J.prototype.A,J.prototype.j=function(){this.h=0},J.prototype.jumpToEnd=J.prototype.j,J.prototype.m=function(e,t){this.I=e,t!=null&&(this.G=t)},J.prototype.setCatchFinallyBlocks=J.prototype.m,J.prototype.D=function(e){this.I=0,this.G=e||0},J.prototype.setFinallyBlock=J.prototype.D,J.prototype.o=function(e,t){this.h=e,this.I=t||0},J.prototype.leaveTryBlock=J.prototype.o,J.prototype.l=function(e){return this.I=e||0,e=this.C.Yh,this.C=null,e},J.prototype.enterCatchBlock=J.prototype.l,J.prototype.u=function(e,t,n){n?this.M[n]=this.C:this.M=[this.C],this.I=e||0,this.G=t||0},J.prototype.enterFinallyBlock=J.prototype.u,J.prototype.B=function(e,t){t=this.M.splice(t||0)[0],(t=this.C=this.C||t)?t.ni?this.h=this.I||this.G:t.A!=null&&this.G<t.A?(this.h=t.A,this.C=null):this.h=this.G:this.h=e},J.prototype.leaveFinallyBlock=J.prototype.B,J.prototype.N=function(e){return new ee(e)},J.prototype.forIn=J.prototype.N;function ee(e){this.i=e,this.g=[];for(var t in e)this.g.push(t);this.g.reverse()}ee.prototype.h=function(){for(;this.g.length>0;){var e=this.g.pop();if(e in this.i)return e}return null},ee.prototype.getNext=ee.prototype.h;function q(e){this.g=new J,this.h=e}function oe(e,t){G(e.g);var n=e.g.H;return n?ne(e,"return"in n?n.return:function(r){return{value:r,done:!0}},t,e.g.return):(e.g.return(t),ae(e))}function ne(e,t,n,r){try{var i=t.call(e.g.H,n);if(U(i),!i.done)return e.g.J=!1,i;var o=i.value}catch(s){return e.g.H=null,Y(e.g,s),ae(e)}return e.g.H=null,r.call(e.g,o),ae(e)}function ae(e){for(;e.g.h;)try{var t=e.h(e.g);if(t)return e.g.J=!1,{value:t.value,done:!1}}catch(n){e.g.i=void 0,Y(e.g,n)}if(e.g.J=!1,e.g.C){if(t=e.g.C,e.g.C=null,t.ni)throw t.Yh;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function xe(e){this.next=function(t){return G(e.g),e.g.H?t=ne(e,e.g.H.next,t,e.g.K):(e.g.K(t),t=ae(e)),t},this.throw=function(t){return G(e.g),e.g.H?t=ne(e,e.g.H.throw,t,e.g.K):(Y(e.g,t),t=ae(e)),t},this.return=function(t){return oe(e,t)},this[Symbol.iterator]=function(){return this}}function he(e){function t(r){return e.next(r)}function n(r){return e.throw(r)}return new Promise(function(r,i){function o(s){s.done?r(s.value):Promise.resolve(s.value).then(t,n).then(o,i)}o(e.next())})}function H(e){return he(new xe(new q(e)))}function we(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}I("Symbol",function(e){function t(o){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return new n(r+(o||"")+"_"+i++,o)}function n(o,s){this.g=o,v(this,"description",{configurable:!0,writable:!0,value:s})}if(e)return e;n.prototype.toString=function(){return this.g};var r="jscomp_symbol_"+(Math.random()*1e9>>>0)+"_",i=0;return t}),I("Symbol.iterator",function(e){return e||(e=Symbol("Symbol.iterator"),v(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return Ae($(this))}}),e)});function Ae(e){return e={next:e},e[Symbol.iterator]=function(){return this},e}I("Promise",function(e){function t(s){this.h=0,this.i=void 0,this.g=[],this.o=!1;var a=this.j();try{s(a.resolve,a.reject)}catch(u){a.reject(u)}}function n(){this.g=null}function r(s){return s instanceof t?s:new t(function(a){a(s)})}if(e)return e;n.prototype.h=function(s){if(this.g==null){this.g=[];var a=this;this.i(function(){a.l()})}this.g.push(s)};var i=w.setTimeout;n.prototype.i=function(s){i(s,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var s=this.g;this.g=[];for(var a=0;a<s.length;++a){var u=s[a];s[a]=null;try{u()}catch(l){this.j(l)}}}this.g=null},n.prototype.j=function(s){this.i(function(){throw s})},t.prototype.j=function(){function s(l){return function(h){u||(u=!0,l.call(a,h))}}var a=this,u=!1;return{resolve:s(this.G),reject:s(this.l)}},t.prototype.G=function(s){if(s===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(s instanceof t)this.I(s);else{e:switch(typeof s){case"object":var a=s!=null;break e;case"function":a=!0;break e;default:a=!1}a?this.D(s):this.m(s)}},t.prototype.D=function(s){var a=void 0;try{a=s.then}catch(u){this.l(u);return}typeof a=="function"?this.J(a,s):this.m(s)},t.prototype.l=function(s){this.u(2,s)},t.prototype.m=function(s){this.u(1,s)},t.prototype.u=function(s,a){if(this.h!=0)throw Error("Cannot settle("+s+", "+a+"): Promise already settled in state"+this.h);this.h=s,this.i=a,this.h===2&&this.H(),this.B()},t.prototype.H=function(){var s=this;i(function(){if(s.C()){var a=w.console;typeof a<"u"&&a.error(s.i)}},1)},t.prototype.C=function(){if(this.o)return!1;var s=w.CustomEvent,a=w.Event,u=w.dispatchEvent;return typeof u>"u"?!0:(typeof s=="function"?s=new s("unhandledrejection",{cancelable:!0}):typeof a=="function"?s=new a("unhandledrejection",{cancelable:!0}):(s=w.document.createEvent("CustomEvent"),s.initCustomEvent("unhandledrejection",!1,!0,s)),s.promise=this,s.reason=this.i,u(s))},t.prototype.B=function(){if(this.g!=null){for(var s=0;s<this.g.length;++s)o.h(this.g[s]);this.g=null}};var o=new n;return t.prototype.I=function(s){var a=this.j();s.Me(a.resolve,a.reject)},t.prototype.J=function(s,a){var u=this.j();try{s.call(a,u.resolve,u.reject)}catch(l){u.reject(l)}},t.prototype.then=function(s,a){function u(m,E){return typeof m=="function"?function(A){try{l(m(A))}catch(k){h(k)}}:E}var l,h,g=new t(function(m,E){l=m,h=E});return this.Me(u(s,l),u(a,h)),g},t.prototype.catch=function(s){return this.then(void 0,s)},t.prototype.Me=function(s,a){function u(){switch(l.h){case 1:s(l.i);break;case 2:a(l.i);break;default:throw Error("Unexpected state: "+l.h)}}var l=this;this.g==null?o.h(u):this.g.push(u),this.o=!0},t.resolve=r,t.reject=function(s){return new t(function(a,u){u(s)})},t.race=function(s){return new t(function(a,u){for(var l=d(s),h=l.next();!h.done;h=l.next())r(h.value).Me(a,u)})},t.all=function(s){var a=d(s),u=a.next();return u.done?r([]):new t(function(l,h){function g(A){return function(k){m[A]=k,E--,E==0&&l(m)}}var m=[],E=0;do m.push(void 0),E++,r(u.value).Me(g(m.length-1),h),u=a.next();while(!u.done)})},t});function Ie(e,t){return Object.prototype.hasOwnProperty.call(e,t)}I("WeakMap",function(e){function t(u){if(this.g=(a+=Math.random()+1).toString(),u){u=d(u);for(var l;!(l=u.next()).done;)l=l.value,this.set(l[0],l[1])}}function n(){}function r(u){var l=typeof u;return l==="object"&&u!==null||l==="function"}function i(u){if(!Ie(u,s)){var l=new n;v(u,s,{value:l})}}function o(u){var l=Object[u];l&&(Object[u]=function(h){return h instanceof n?h:(Object.isExtensible(h)&&i(h),l(h))})}if(function(){if(!e||!Object.seal)return!1;try{var u=Object.seal({}),l=Object.seal({}),h=new e([[u,2],[l,3]]);return h.get(u)!=2||h.get(l)!=3?!1:(h.delete(u),h.set(l,4),!h.has(u)&&h.get(l)==4)}catch{return!1}}())return e;var s="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var a=0;return t.prototype.set=function(u,l){if(!r(u))throw Error("Invalid WeakMap key");if(i(u),!Ie(u,s))throw Error("WeakMap key fail: "+u);return u[s][this.g]=l,this},t.prototype.get=function(u){return r(u)&&Ie(u,s)?u[s][this.g]:void 0},t.prototype.has=function(u){return r(u)&&Ie(u,s)&&Ie(u[s],this.g)},t.prototype.delete=function(u){return r(u)&&Ie(u,s)&&Ie(u[s],this.g)?delete u[s][this.g]:!1},t}),I("Map",function(e){function t(){var a={};return a.sc=a.next=a.head=a}function n(a,u){var l=a[1];return Ae(function(){if(l){for(;l.head!=a[1];)l=l.sc;for(;l.next!=l.head;)return l=l.next,{done:!1,value:u(l)};l=null}return{done:!0,value:void 0}})}function r(a,u){var l=u&&typeof u;l=="object"||l=="function"?o.has(u)?l=o.get(u):(l=""+ ++s,o.set(u,l)):l="p_"+u;var h=a[0][l];if(h&&Ie(a[0],l))for(a=0;a<h.length;a++){var g=h[a];if(u!==u&&g.key!==g.key||u===g.key)return{id:l,list:h,index:a,entry:g}}return{id:l,list:h,index:-1,entry:void 0}}function i(a){if(this[0]={},this[1]=t(),this.size=0,a){a=d(a);for(var u;!(u=a.next()).done;)u=u.value,this.set(u[0],u[1])}}if(function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var a=Object.seal({x:4}),u=new e(d([[a,"s"]]));if(u.get(a)!="s"||u.size!=1||u.get({x:4})||u.set({x:4},"t")!=u||u.size!=2)return!1;var l=u.entries(),h=l.next();return h.done||h.value[0]!=a||h.value[1]!="s"?!1:(h=l.next(),!(h.done||h.value[0].x!=4||h.value[1]!="t"||!l.next().done))}catch{return!1}}())return e;var o=new WeakMap;i.prototype.set=function(a,u){a=a===0?0:a;var l=r(this,a);return l.list||(l.list=this[0][l.id]=[]),l.entry?l.entry.value=u:(l.entry={next:this[1],sc:this[1].sc,head:this[1],key:a,value:u},l.list.push(l.entry),this[1].sc.next=l.entry,this[1].sc=l.entry,this.size++),this},i.prototype.delete=function(a){return a=r(this,a),a.entry&&a.list?(a.list.splice(a.index,1),a.list.length||delete this[0][a.id],a.entry.sc.next=a.entry.next,a.entry.next.sc=a.entry.sc,a.entry.head=null,this.size--,!0):!1},i.prototype.clear=function(){this[0]={},this[1]=this[1].sc=t(),this.size=0},i.prototype.has=function(a){return!!r(this,a).entry},i.prototype.get=function(a){return(a=r(this,a).entry)&&a.value},i.prototype.entries=function(){return n(this,function(a){return[a.key,a.value]})},i.prototype.keys=function(){return n(this,function(a){return a.key})},i.prototype.values=function(){return n(this,function(a){return a.value})},i.prototype.forEach=function(a,u){for(var l=this.entries(),h;!(h=l.next()).done;)h=h.value,a.call(u,h[1],h[0],this)},i.prototype[Symbol.iterator]=i.prototype.entries;var s=0;return i}),I("Set",function(e){function t(n){if(this.g=new Map,n){n=d(n);for(var r;!(r=n.next()).done;)this.add(r.value)}this.size=this.g.size}return function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var n=Object.seal({x:4}),r=new e(d([n]));if(!r.has(n)||r.size!=1||r.add(n)!=r||r.size!=1||r.add({x:4})!=r||r.size!=2)return!1;var i=r.entries(),o=i.next();return o.done||o.value[0]!=n||o.value[1]!=n?!1:(o=i.next(),o.done||o.value[0]==n||o.value[0].x!=4||o.value[1]!=o.value[0]?!1:i.next().done)}catch{return!1}}()?e:(t.prototype.add=function(n){return n=n===0?0:n,this.g.set(n,n),this.size=this.g.size,this},t.prototype.delete=function(n){return n=this.g.delete(n),this.size=this.g.size,n},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(n){return this.g.has(n)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(n,r){var i=this;this.g.forEach(function(o){return n.call(r,o,o,i)})},t)});function He(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i<r;i++){var o=e[i];if(t.call(n,o,i,e))return{ji:i,v:o}}return{ji:-1,v:void 0}}I("Array.prototype.findIndex",function(e){return e||function(t,n){return He(this,t,n).ji}});function nt(e,t){e instanceof String&&(e+="");var n=0,r=!1,i={next:function(){if(!r&&n<e.length){var o=n++;return{value:t(o,e[o]),done:!1}}return r=!0,{done:!0,value:void 0}}};return i[Symbol.iterator]=function(){return i},i}I("Array.prototype.values",function(e){return e||function(){return nt(this,function(t,n){return n})}}),I("Array.from",function(e){return e||function(t,n,r){n=n??function(a){return a};var i=[],o=typeof Symbol<"u"&&Symbol.iterator&&t[Symbol.iterator];if(typeof o=="function"){t=o.call(t);for(var s=0;!(o=t.next()).done;)i.push(n.call(r,o.value,s++))}else for(o=t.length,s=0;s<o;s++)i.push(n.call(r,t[s],s));return i}}),I("Array.prototype.keys",function(e){return e||function(){return nt(this,function(t){return t})}});function Xe(e,t,n){if(e==null)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}I("String.prototype.startsWith",function(e){return e||function(t,n){var r=Xe(this,t,"startsWith"),i=r.length,o=t.length;n=Math.max(0,Math.min(n|0,r.length));for(var s=0;s<o&&n<i;)if(r[n++]!=t[s++])return!1;return s>=o}}),I("Object.is",function(e){return e||function(t,n){return t===n?t!==0||1/t===1/n:t!==t&&n!==n}}),I("Array.prototype.includes",function(e){return e||function(t,n){var r=this;r instanceof String&&(r=String(r));var i=r.length;for(n=n||0,n<0&&(n=Math.max(n+i,0));n<i;n++){var o=r[n];if(o===t||Object.is(o,t))return!0}return!1}}),I("String.prototype.includes",function(e){return e||function(t,n){return Xe(this,t,"includes").indexOf(t,n||0)!==-1}}),I("String.fromCodePoint",function(e){return e||function(t){for(var n="",r=0;r<arguments.length;r++){var i=Number(arguments[r]);if(i<0||i>1114111||i!==Math.floor(i))throw new RangeError("invalid_code_point "+i);i<=65535?n+=String.fromCharCode(i):(i-=65536,n+=String.fromCharCode(i>>>10&1023|55296),n+=String.fromCharCode(i&1023|56320))}return n}}),I("WeakSet",function(e){function t(n){if(this.g=new WeakMap,n){n=d(n);for(var r;!(r=n.next()).done;)this.add(r.value)}}return function(){if(!e||!Object.seal)return!1;try{var n=Object.seal({}),r=Object.seal({}),i=new e([n]);return!i.has(n)||i.has(r)?!1:(i.delete(n),i.add(r),!i.has(n)&&i.has(r))}catch{return!1}}()?e:(t.prototype.add=function(n){return this.g.set(n,!0),this},t.prototype.has=function(n){return this.g.has(n)},t.prototype.delete=function(n){return this.g.delete(n)},t)}),I("Array.prototype.find",function(e){return e||function(t,n){return He(this,t,n).v}}),I("Object.entries",function(e){return e||function(t){var n=[],r;for(r in t)Ie(t,r)&&n.push([r,t[r]]);return n}});var it=typeof Object.assign=="function"?Object.assign:function(e,t){if(e==null)throw new TypeError("No nullish arg");e=Object(e);for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var i in r)Ie(r,i)&&(e[i]=r[i])}return e};I("Object.assign",function(e){return e||it}),I("Promise.prototype.finally",function(e){return e||function(t){return this.then(function(n){return Promise.resolve(t()).then(function(){return n})},function(n){return Promise.resolve(t()).then(function(){throw n})})}}),I("Array.prototype.entries",function(e){return e||function(){return nt(this,function(t,n){return[t,n]})}}),I("Number.EPSILON",function(){return 2220446049250313e-31}),I("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991}),I("Math.clz32",function(e){return e||function(t){if(t=Number(t)>>>0,t===0)return 32;var n=0;return!(t&4294901760)&&(t<<=16,n+=16),!(t&4278190080)&&(t<<=8,n+=8),!(t&4026531840)&&(t<<=4,n+=4),!(t&3221225472)&&(t<<=2,n+=2),!(t&2147483648)&&n++,n}}),I("Number.isNaN",function(e){return e||function(t){return typeof t=="number"&&isNaN(t)}}),I("String.prototype.repeat",function(e){return e||function(t){var n=Xe(this,null,"repeat");if(t<0||t>1342177279)throw new RangeError("Invalid count value");t|=0;for(var r="";t;)t&1&&(r+=n),(t>>>=1)&&(n+=n);return r}}),I("Number.isFinite",function(e){return e||function(t){return typeof t!="number"?!1:!isNaN(t)&&t!==1/0&&t!==-1/0}}),I("Object.values",function(e){return e||function(t){var n=[],r;for(r in t)Ie(t,r)&&n.push(t[r]);return n}}),I("Math.log2",function(e){return e||function(t){return Math.log(t)/Math.LN2}}),I("String.prototype.endsWith",function(e){return e||function(t,n){var r=Xe(this,t,"endsWith");n===void 0&&(n=r.length),n=Math.max(0,Math.min(n|0,r.length));for(var i=t.length;i>0&&n>0;)if(r[--n]!=t[--i])return!1;return i<=0}}),I("Math.trunc",function(e){return e||function(t){if(t=Number(t),isNaN(t)||t===1/0||t===-1/0||t===0)return t;var n=Math.floor(Math.abs(t));return t<0?-n:n}});var ht=this||self;function Re(e,t){e=e.split(".");var n=ht;e[0]in n||typeof n.execScript>"u"||n.execScript("var "+e[0]);for(var r;e.length&&(r=e.shift());)e.length||t===void 0?n[r]&&n[r]!==Object.prototype[r]?n=n[r]:n=n[r]={}:n[r]=t}function Qe(e){this.i=Math.log(.5),this.g=Math.exp(this.i/e),this.j=this.h=0}Qe.prototype.sample=function(e,t){var n=Math.pow(this.g,e);t=t*(1-n)+n*this.h,isNaN(t)||(this.h=t,this.j+=e)};function st(e){return e.h/(1-Math.pow(e.g,e.j))}function Xt(){this.h=new Qe(2),this.j=new Qe(5),this.g=0,this.i=128e3,this.l=16e3}Xt.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes;var t=this.h;t.g=Math.exp(t.i/e.fastHalfLife),t=this.j,t.g=Math.exp(t.i/e.slowHalfLife)},Xt.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},Xt.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(st(this.h),st(this.j))};function Gt(){}function gn(){}function ut(){}function In(e){var t=we.apply(1,arguments);pr.has(e)||(pr.add(e),ut.apply(Gt,M(t)))}function Fn(){}function hr(){}function wr(){}var pr=new Set;R.console&&(new Map().set(1,function(){return console.error.apply(console,M(we.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,M(we.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,M(we.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,M(we.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,M(we.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,M(we.apply(0,arguments)))}),ut=function(){return console.warn.apply(console,M(we.apply(0,arguments)))},gn=function(){console.error.apply(console,M(we.apply(0,arguments)))});function Kn(e,t){return typeof e=="number"&&typeof t=="number"&&isNaN(e)&&isNaN(t)?!0:e===t}function $t(e,t){t=e.indexOf(t),t>-1&&e.splice(t,1)}function Sn(e,t,n){if(n||(n=Kn),e.length!=t.length)return!1;t=t.slice(),e=d(e);for(var r=e.next(),i={};!r.done;i={pi:void 0},r=e.next()){if(i.pi=r.value,r=t.findIndex(function(o){return function(s){return n(o.pi,s)}}(i)),r==-1)return!1;t[r]=t[t.length-1],t.pop()}return t.length==0}function Rn(e,t){var n=[],r=[];e=d(e);for(var i=e.next();!i.done;i=e.next())i=i.value,t(i)?n.push(i):r.push(i);return[n,r]}function Ye(e,t,n){if(e===t)return!0;if(!e||!t)return e==t;if(n||(n=Kn),e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Tt(){this.g=new Map}f=Tt.prototype,f.push=function(e,t){this.g.has(e)?this.g.get(e).push(t):this.g.set(e,[t])},f.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},f.remove=function(e,t){if(this.g.has(e)){var n=this.g.get(e).filter(function(r){return r!=t});this.g.set(e,n),n.length||this.g.delete(e)}},f.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},f.size=function(){return this.g.size},f.keys=function(){return Array.from(this.g.keys())};function Et(){this.g=new Tt}f=Et.prototype,f.release=function(){this.Ra(),this.g=null},f.F=function(e,t,n,r){this.g&&(e=new Dn(e,t,n,r),this.g.push(t,e))},f.Aa=function(e,t,n,r){function i(s){o.Na(e,t,i),n(s)}var o=this;this.F(e,t,i,r)},f.Na=function(e,t,n){if(this.g){var r=this.g.get(t)||[];r=d(r);for(var i=r.next();!i.done;i=r.next())i=i.value,i.target!=e||n!=i.listener&&n||(i.Na(),this.g.remove(t,i))}},f.Ra=function(){if(this.g){for(var e=[],t=d(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,M(n.value));for(e=d(e),t=e.next();!t.done;t=e.next())t.value.Na();this.g.g.clear()}},Re("shaka.util.EventManager",Et),Et.prototype.removeAll=Et.prototype.Ra,Et.prototype.unlisten=Et.prototype.Na,Et.prototype.listenOnce=Et.prototype.Aa,Et.prototype.listen=Et.prototype.F,Et.prototype.release=Et.prototype.release;function Dn(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.g=nr(e,r),this.target.addEventListener(t,n,this.g)}Dn.prototype.Na=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};function nr(e,t){if(t==null)return!1;if(typeof t=="boolean")return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(r){return!n.has(r)}),Lr(e)?t:t.capture||!1}function Lr(e){var t=ei;if(t==null){t=!1;try{var n={},r={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",r),Object.defineProperty(n,"capture",r),r=function(){},e.addEventListener("test",r,n),e.removeEventListener("test",r,n)}catch{t=!1}ei=t}return t||!1}var ei=void 0;Re("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function Kt(e){this.h=e,this.g=void 0}Kt.prototype.value=function(){return this.g===void 0&&(this.g=this.h()),this.g};/*
7
+ @license
8
+ Shaka Player
9
+ Copyright 2025 Google LLC
10
+ SPDX-License-Identifier: Apache-2.0
11
+ */function ct(){return Vt.value()}var Nn=null,at=null,Vt=new Kt(function(){var e=void 0;return Nn&&(e=Nn()),!e&&at&&(e=at()),e});function On(e,t){this.g=e,this.h=t}On.prototype.toString=function(){return"v"+this.g+"."+this.h};function lt(e,t){var n=new On(5,0),r=Cr,i=r.g,o=n.h-i.h;((n.g-i.g||o)>0?r.i:r.h)(r.g,n,e,t)}function un(e,t,n,r){ut([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",r].join(" "))}function Ur(e,t,n,r){gn([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",r].join(" "))}var Cr=null;/*
12
+ @license
13
+ Copyright 2008 The Closure Library Authors
14
+ SPDX-License-Identifier: Apache-2.0
15
+ */var Br=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
16
+ @license
17
+ Copyright 2006 The Closure Library Authors
18
+ SPDX-License-Identifier: Apache-2.0
19
+ */function Ct(e){var t;e instanceof Ct?(ln(this,e.bc),this.Zc=e.Zc,tn(this,e.Ab),cn(this,e.wd),this.$b=e.$b,Pe(this,e.g.clone()),this.Lc=e.Lc):e&&(t=String(e).match(Br))?(ln(this,t[1]||"",!0),this.Zc=Ne(t[2]||""),tn(this,t[3]||"",!0),cn(this,t[4]),this.$b=Ne(t[5]||"",!0),Pe(this,t[6]||"",!0),this.Lc=Ne(t[7]||"")):this.g=new Mr(null)}f=Ct.prototype,f.bc="",f.Zc="",f.Ab="",f.wd=null,f.$b="",f.Lc="",f.toString=function(){var e=[],t=this.bc;if(t&&e.push(Cn(t,Jn,!0),":"),t=this.Ab){e.push("//");var n=this.Zc;n&&e.push(Cn(n,Jn,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t=this.wd,t!=null&&e.push(":",String(t))}return(t=this.$b)&&(this.Ab&&t.charAt(0)!="/"&&e.push("/"),e.push(Cn(t,t.charAt(0)=="/"?oo:mn,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.Lc)&&e.push("#",Cn(t,rr)),e.join("")},f.resolve=function(e){var t=this.clone();t.bc==="data"&&(t=new Ct);var n=!!e.bc;n?ln(t,e.bc):n=!!e.Zc,n?t.Zc=e.Zc:n=!!e.Ab,n?tn(t,e.Ab):n=e.wd!=null;var r=e.$b;if(n)cn(t,e.wd);else if(n=!!e.$b){if(r.charAt(0)!="/")if(this.Ab&&!this.$b)r="/"+r;else{var i=t.$b.lastIndexOf("/");i!=-1&&(r=t.$b.substr(0,i+1)+r)}if(r==".."||r==".")r="";else if(r.indexOf("./")!=-1||r.indexOf("/.")!=-1){i=r.lastIndexOf("/",0)==0,r=r.split("/");for(var o=[],s=0;s<r.length;){var a=r[s++];a=="."?i&&s==r.length&&o.push(""):a==".."?((o.length>1||o.length==1&&o[0]!="")&&o.pop(),i&&s==r.length&&o.push("")):(o.push(a),i=!0)}r=o.join("/")}}return n?t.$b=r:n=e.g.toString()!=="",n?Pe(t,e.g.clone()):n=!!e.Lc,n&&(t.Lc=e.Lc),t},f.clone=function(){return new Ct(this)};function ln(e,t,n){e.bc=n?Ne(t,!0):t,e.bc&&(e.bc=e.bc.replace(/:$/,""))}function tn(e,t,n){e.Ab=n?Ne(t,!0):t}function cn(e,t){if(t){if(t=Number(t),isNaN(t)||t<0)throw Error("Bad port number "+t);e.wd=t}else e.wd=null}function Pe(e,t,n){t instanceof Mr?e.g=t:(n||(t=Cn(t,So)),e.g=new Mr(t))}function Ne(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Cn(e,t,n){return e!=null?(e=encodeURI(e).replace(t,Bn),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Bn(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(e&15).toString(16)}var Jn=/[#\/\?@]/g,mn=/[#\?:]/g,oo=/[#\?]/g,So=/[#\?@]/g,rr=/#/g;function Mr(e){this.g=e||null}function To(e){if(!e.fb&&(e.fb=new Map,e.Pd=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(r>=0){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];o=decodeURIComponent(o),i=i||"",e.add(o,decodeURIComponent(i))}}f=Mr.prototype,f.fb=null,f.Pd=null,f.add=function(e,t){To(this),this.g=null;var n=this.fb.has(e)?this.fb.get(e):null;return n||this.fb.set(e,n=[]),n.push(t),this.Pd++,this},f.set=function(e,t){return To(this),this.g=null,this.fb.has(e)?this.fb.set(e,[t]):this.add(e,t),this},f.get=function(e){return To(this),this.fb.get(e)||[]},f.toString=function(){if(this.g)return this.g;if(!this.fb||!this.fb.size)return"";for(var e=[],t=d(this.fb.keys()),n=t.next();!n.done;n=t.next()){var r=n.value;n=encodeURIComponent(r),r=this.fb.get(r);for(var i=0;i<r.length;i++){var o=n;r[i]!==""&&(o+="="+encodeURIComponent(r[i])),e.push(o)}}return this.g=e.join("&")},f.clone=function(){var e=new Mr;if(e.g=this.g,this.fb){for(var t=new Map,n=d(this.fb),r=n.next();!r.done;r=n.next()){var i=d(r.value);r=i.next().value,i=i.next().value,t.set(r,i.concat())}e.fb=t,e.Pd=this.Pd}return e};function ti(){}function Pr(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if((ArrayBuffer.isView(e)?e.buffer:e)==(ArrayBuffer.isView(t)?t.buffer:t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=wt(e);t=wt(t);for(var r=0;r<e.byteLength;r++)if(n[r]!=t[r])return!1;return!0}function Wr(e){return ArrayBuffer.isView(e)?e.byteOffset==0&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function wt(e,t,n){return n=n===void 0?1/0:n,Ui(e,t===void 0?0:t,n,Uint8Array)}function Qi(e,t,n){return n=n===void 0?1/0:n,Ui(e,t===void 0?0:t,n,Uint16Array)}function gr(e,t,n){return n=n===void 0?1/0:n,Ui(e,t===void 0?0:t,n,DataView)}function Ui(e,t,n,r){var i=ArrayBuffer.isView(e)?e.buffer:e,o=1;"BYTES_PER_ELEMENT"in r&&(o=r.BYTES_PER_ELEMENT);var s=((e.byteOffset||0)+e.byteLength)/o;return e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/o,s))),new r(i,e,Math.floor(Math.min(e+Math.max(n,0),s))-e)}Re("shaka.util.BufferUtils",ti),ti.toDataView=gr,ti.toUint16=Qi,ti.toUint8=wt,ti.toArrayBuffer=Wr,ti.equal=Pr;function rs(e,t){if(e===t||!e.length||!t.length)return!0;e=d(e);for(var n=e.next();!n.done;n=e.next()){if(n=n.value,ys(n))return!0;for(var r=d(t),i=r.next();!i.done;i=r.next())if(i=i.value,n.keySystem===i.keySystem||ys(i))return!0}return!1}function so(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=d(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;for(var i=d(t),o=i.next();!o.done;o=i.next())if(o=o.value,r.keySystem==o.keySystem){i=new Map;for(var s=d((r.initData||[]).concat(o.initData||[])),a=s.next();!a.done;a=s.next())a=a.value,i.set(a.keyId,a);i=Array.from(i.values()),s=r.keyIds&&o.keyIds?new Set([].concat(M(r.keyIds),M(o.keyIds))):r.keyIds||o.keyIds,n.push({keySystem:r.keySystem,licenseServerUri:r.licenseServerUri||o.licenseServerUri,distinctiveIdentifierRequired:r.distinctiveIdentifierRequired||o.distinctiveIdentifierRequired,persistentStateRequired:r.persistentStateRequired||o.persistentStateRequired,videoRobustness:r.videoRobustness||o.videoRobustness,audioRobustness:r.audioRobustness||o.audioRobustness,serverCertificate:r.serverCertificate||o.serverCertificate,serverCertificateUri:r.serverCertificateUri||o.serverCertificateUri,initData:i,keyIds:s});break}else ys(r)?n.push(r):ys(o)&&n.push(o)}return n}function Bi(e){return e==="org.w3.clearkey"}function Ns(e){return e?!!e.match(/^com\.widevine\.alpha/):!1}function Eo(e){return e?!!e.match(/^com\.(microsoft|chromecast)\.playready/):!1}function xo(e){return e?!!e.match(/^com\.apple\.fps/):!1}function ys(e){return(e=e.licenseServerUri)?e.startsWith("data:application/json;base64,"):!1}function is(e,t,n,r){return r=[].concat(M(new Set(r))).sort().join("#"),e+"#"+t+"#"+n+"#"+r}var ao=new Kt(function(){return Wr(new Uint8Array([0]))}),wo=new Map;function fe(e,t,n){var r=we.apply(3,arguments);this.severity=e,this.category=t,this.code=n,this.data=r,this.handled=!1,this.message="Shaka Error "+this.code;try{throw Error(this.message||"Shaka Error")}catch(i){this.stack=i.stack}}fe.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},Re("shaka.util.Error",fe),fe.Severity={RECOVERABLE:1,CRITICAL:2},fe.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},fe.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4055,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,PRELOAD_DESTROYED:7006,QUEUE_INDEX_OUT_OF_BOUNDS:7007,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function ki(){}function Un(e){if(!e)return"";if(e=wt(e),e[0]==239&&e[1]==187&&e[2]==191&&(e=e.subarray(3)),R.TextDecoder&&!ct().sh())return e=new TextDecoder().decode(e),e.includes("�")&&gn('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),e;for(var t="",n=0;n<e.length;++n){var r=65533;if(e[n]&128?e.length>=n+2&&(e[n]&224)==192&&(e[n+1]&192)==128?(r=(e[n]&31)<<6|e[n+1]&63,n+=1):e.length>=n+3&&(e[n]&240)==224&&(e[n+1]&192)==128&&(e[n+2]&192)==128?(r=(e[n]&15)<<12|(e[n+1]&63)<<6|e[n+2]&63,n+=2):e.length>=n+4&&(e[n]&241)==240&&(e[n+1]&192)==128&&(e[n+2]&192)==128&&(e[n+3]&192)==128&&(r=(e[n]&7)<<18|(e[n+1]&63)<<12|(e[n+2]&63)<<6|e[n+3]&63,n+=3):r=e[n],r<=65535)t+=String.fromCharCode(r);else{r-=65536;var i=r&1023;t+=String.fromCharCode(55296+(r>>10)),t+=String.fromCharCode(56320+i)}}return t}function Zi(e,t,n){if(!e)return"";if(!n&&e.byteLength%2!=0)throw new fe(2,2,2004);n=Math.floor(e.byteLength/2);var r=new Uint16Array(n);e=gr(e);for(var i=0;i<n;i++)r[i]=e.getUint16(i*2,t);return Xs.value()(r)}function fi(e){function t(r){return n.byteLength<=r||n[r]>=9&&n[r]<=126}if(!e)return"";var n=wt(e);if(n[0]==239&&n[1]==187&&n[2]==191)return Un(n);if(n[0]==254&&n[1]==255)return Zi(n.subarray(2),!1);if(n[0]==255&&n[1]==254)return Zi(n.subarray(2),!0);if(n[0]==0&&n[2]==0)return Zi(e,!1);if(n[1]==0&&n[3]==0)return Zi(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return Un(e);throw new fe(2,2,2003)}function Vi(e){if(R.TextEncoder&&!ct().sh()){var t=new TextEncoder;return Wr(t.encode(e))}e=encodeURIComponent(e),e=unescape(e),t=new Uint8Array(e.length);for(var n=0;n<e.length;n++)t[n]=e[n].charCodeAt(0);return Wr(t)}function _i(e,t){for(var n=new ArrayBuffer(e.length*2),r=new DataView(n),i=0;i<e.length;++i)r.setUint16(i*2,e.charCodeAt(i),t);return n}function zr(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":" ","&lrm;":"‎","&rlm;":"‏"},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,r=RegExp(n.source);return e&&r.test(e)?e.replace(n,function(i){return i[1]=="#"?(i=i[2]=="x"||i[2]=="X"?parseInt(i.substring(3),16):parseInt(i.substring(2),10),i>=0&&i<=1114111?String.fromCodePoint(i):""):t[i]||"'"}):e||""}Re("shaka.util.StringUtils",ki),ki.resetFromCharCode=function(){Xs.g=void 0},ki.toUTF16=_i,ki.toUTF8=Vi,ki.fromBytesAutoDetect=fi,ki.fromUTF16=Zi,ki.fromUTF8=Un;var Xs=new Kt(function(){function e(n){try{var r=new Uint8Array(n);return String.fromCharCode.apply(null,r).length>0}catch{return!1}}for(var t={Jc:65536};t.Jc>0;t={Jc:t.Jc},t.Jc/=2)if(e(t.Jc))return function(n){return function(r){for(var i="",o=0;o<r.length;o+=n.Jc)i+=String.fromCharCode.apply(null,r.subarray(o,o+n.Jc));return i}}(t);return null});function Sr(){}function Uo(e){return e=wt(e),Uint8Array.prototype.toBase64?e.toBase64({alphabet:"base64",omitPadding:!1}):(e=Xs.value()(e),btoa(e))}function Ri(e,t){return t=t??!0,Uint8Array.prototype.toBase64?wt(e).toBase64({alphabet:"base64url",omitPadding:!t}):(e=Uo(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,""))}function bi(e){if(!("fromBase64"in Uint8Array)){e=R.atob(e.replace(/-/g,"+").replace(/_/g,"/"));for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}return e=e.replace(/\s+/g,""),Uint8Array.fromBase64(e,{alphabet:/[-_]/.test(e)?"base64url":"base64"})}function os(e){if(!("fromHex"in Uint8Array)){for(var t=e.length/2,n=new Uint8Array(t),r=0;r<t;r++)n[r]=R.parseInt(e.substr(r*2,2),16);return n}return Uint8Array.fromHex(e)}function Ao(e){var t=wt(e);if(!Uint8Array.prototype.toHex){e="",t=d(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n=n.toString(16),n.length==1&&(n="0"+n),e+=n;return e}return t.toHex()}function dr(){for(var e=we.apply(0,arguments),t=0,n=0;n<e.length;++n)t+=e[n].byteLength;t=new Uint8Array(t);for(var r=n=0;r<e.length;++r){var i=e[r];ArrayBuffer.isView(i)&&i.BYTES_PER_ELEMENT===1?t.set(i,n):t.set(wt(i),n),n+=i.byteLength}return t}Re("shaka.util.Uint8ArrayUtils",Sr),Sr.concat=dr,Sr.toHex=Ao,Sr.fromHex=os,Sr.fromBase64=bi,Sr.toBase64=Ri,Sr.toStandardBase64=Uo;function Rr(e,t,n){if(n=n===void 0?"":n,t.length==0)return e;if(e.length==1&&t.length==1){var r=new Ct(e[0]);return t=new Ct(t[0]),t=r.resolve(t),n&&Pe(t,n),[t.toString()]}t=t.map(function(a){return new Ct(a)}),r=[],e=d(e);for(var i=e.next();!i.done;i=e.next()){i=new Ct(i.value);for(var o=d(t),s=o.next();!s.done;s=o.next())s=i.resolve(s.value),n&&Pe(s,n),r.push(s.toString())}return r}function Io(e,t,n,r,i){return t={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set,mediaTypes:i},r&&(t.keySystemUris=new Set([r])),!n&&xo(e)&&t.initData.push({initDataType:"sinf",initData:new Uint8Array(0),keyId:null}),t}function Ia(e,t){t=t===void 0?"cenc":t;var n=[],r=[],i=[];e.forEach(function(s,a){var u=a;u.length!=22&&(u=Ri(os(a),!1));var l=s;l.length!=22&&(l=Ri(os(s),!1)),s={kty:"oct",kid:u,k:l},n.push(s),r.push(s.kid),i.push(a)}),e=JSON.stringify({keys:n});var o=JSON.stringify({kids:r});return o=[{initData:wt(Vi(o)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:t,licenseServerUri:"data:application/json;base64,"+R.btoa(e),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:o,keyIds:new Set(i)}}function Ss(e,t){if(t.length==1)return t[0];if(e=ni(e,t),e!=null)return e;throw new fe(2,4,4025,t)}function ni(e,t){var n=Qs.get(e);n=d(n);for(var r=n.next();!r.done;r=n.next()){r=r.value;for(var i=d(t),o=i.next();!o.done;o=i.next())if(o=o.value,r.test(o.trim()))return o.trim()}return e==Bt?"":null}function Ys(e,t){var n=[];e=Qs.get(e),e=d(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;for(var i=d(t),o=i.next();!o.done;o=i.next())o=o.value,r.test(o.trim())&&n.push(o.trim())}return n}var Bt="text",mr={wa:"video",aa:"audio",Oa:Bt,Tf:"image",ql:"application"},Js=1/15,Qs=new Map().set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cehx]?$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^mp2v/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function Ts(e,t,n,r){this.g=null,this.l=e,this.i=t,this.m=n,this.o=r,this.j=!1;e:{if(typeof libDPIModule>"u"&&ut("Could not find LCEVC Library dependencies on this page"),typeof LCEVCdec<"u")this.h=LCEVCdec;else if(typeof LcevcDil<"u")this.h=LcevcDil,this.j=!0,lt("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{ut("Could not find LCEVC Library on this page"),e=!1;break e}typeof this.h.SupportObject>"u"?(ut("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||ut(this.h.SupportObject.SupportError),e=typeof this.h<"u"&&typeof libDPIModule<"u"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function Ls(e,t,n,r){r.type!=="video"||e.o&&!r.baseOriginalId||e.g&&e.g.appendBuffer(t,"video",r.id,-n,!e.o)}function qa(e){e.g&&e.i.classList.add("shaka-hidden")}Ts.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function eu(e){return e&&typeof LCEVCdec<"u"?e.codecs=="lvc1":!1}Re("shaka.lcevc.Dec",Ts),Ts.prototype.release=Ts.prototype.release;function js(){}function Hi(e,t){Bo.set(e,t)}function Zs(){var e={};if(ct(),Ks())for(var t=d(Bo.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(t=d(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]),n=t.next();!n.done;n=t.next())n=n.value,e[n]=Ks()?Bo.has(n):Tu().canPlayType(n)!="";return e}function Ca(e,t){if(t){var n=Bo.get(t.toLowerCase());if(n)return n}throw new fe(2,4,4e3,e,t)}Re("shaka.media.ManifestParser",js),js.unregisterParserByMime=function(e){Bo.delete(e)},js.registerParserByMime=Hi,js.registerParserByExtension=function(){lt("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},js.AccessibilityPurpose={Am:"visually impaired",Ll:"hard of hearing",hm:"spoken subtitles"};var Bo=new Map;function Di(){}Di.prototype.extract=function(){},Di.prototype.decode=function(){return[]},Di.prototype.clear=function(){},Di.prototype.getStreams=function(){return[]};function tu(){}tu.prototype.init=function(){},tu.prototype.parse=function(){return[]};function mi(e){this.h=new Map,this.i=0,this.j=new tu,(e=ru(e.toLowerCase()))&&(this.j=e()),this.g=new Di,(e=Vn)&&(this.g=e(),this.h.set(this.i,this.g))}mi.prototype.init=function(e,t,n){if(t=t===void 0?!1:t,n=n===void 0?-1:n,n!=-1&&this.i!=n){t=n;var r=this.h.get(t);this.h.set(this.i,this.g),r?this.g=r:((r=Vn)&&(this.g=r()),this.h.set(t,this.g))}else t||this.g.clear();this.j.init(e),n!=-1&&(this.i=n)};function qs(e,t){t=e.j.parse(t),t=d(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;var r=wt(n.packet);r.length>0&&e.g.extract(r,n.pts)}return e.g.decode()}mi.prototype.remove=function(e){e=e===void 0?[]:e,e=new Set(e);for(var t=d(this.h.keys()),n=t.next();!n.done;n=t.next())if(n=n.value,!e.has(n)){var r=this.h.get(n);r&&r.clear(),this.h.delete(n)}};function nu(e,t){Gi.set(e,t)}function ru(e){return Gi.get(e)}Re("shaka.media.ClosedCaptionParser",mi),mi.findDecoder=function(){return Vn},mi.unregisterDecoder=function(){Vn=null},mi.registerDecoder=function(e){Vn=e},mi.findParser=ru,mi.unregisterParser=function(e){Gi.delete(e)},mi.registerParser=nu;var Gi=new Map,Vn=null;function ss(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Vr,this.scroll=Vo}Re("shaka.text.CueRegion",ss);var Vr=1;ss.units={PX:0,PERCENTAGE:Vr,LINES:2};var Vo="";ss.scrollMode={NONE:Vo,UP:"up"};function Es(e){this.h=e||"",this.g=0}function Fs(e){Us(e,/[ \t]+/gm)}function Us(e,t){return t.lastIndex=e.g,t=t.exec(e.h),t=t==null?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||t==null||t.position!=e.g?null:(e.g+=t.length,t.results)}function as(e){return e.g==e.h.length?null:(e=Us(e,/[^ \t\n]*/gm))?e[0]:null}function xs(e){if(e=Us(e,Ma),e==null)return null;var t=Number(e[2]),n=Number(e[3]);return t>59||n>59?null:(Number(e[6])||0)/1e3+n+t*60+(Number(e[1])||0)*3600}function ws(e){return e?xs(new Es(e)):null}var Ma=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function ea(){}function Ki(e){function t(r){switch(typeof r){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return r;default:if(!r||ArrayBuffer.isView(r))return r;if(n.has(r))return null;var i=Array.isArray(r);if(r.constructor!=Object&&!i)return null;n.add(r);var o=i?[]:{},s;for(s in r)o[s]=t(r[s]);return i&&(o.length=r.length),o}}var n=new WeakSet;return t(e)}function _o(e){var t={},n;for(n in e)t[n]=e[n];return t}function ta(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++){var r=n.toString(),i=e[n];i!==void 0&&(i=ta(i))&&t.push(r+":"+i)}e="["+t.join(",")+"]"}else if(typeof e=="function")e="";else if(e instanceof Object){for(n=Object.keys(e),n.sort(),t=[],n=d(n),r=n.next();!r.done;r=n.next())i=r.value,r=JSON.stringify(i),i=e[i],i!==void 0&&(i=ta(i))&&t.push(r+":"+i);e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}Re("shaka.util.ObjectUtils",ea),ea.alphabeticalKeyOrderStringify=ta,ea.shallowCloneObject=_o,ea.cloneObject=Ki;/*
20
+ @license
21
+ tXml
22
+ Copyright 2015 Tobias Nickel
23
+ SPDX-License-Identifier: MIT
24
+ */function na(e,t){var n=n===void 0?!1:n;return e=fi(e),As(e,t,n)}function As(e,t,n){if(e=jl(e,n===void 0?!1:n),!t&&e.length)return e[0];var r=t.split(",");return(t=e.find(function(i){return r.includes(i.tagName)}))?t:null}function ra(e){return qt.has(e)?qt.get(e):""}function jl(e,t){function n(o,s){s=s===void 0?!1:s;for(var a=[];e[i];)if(e.charCodeAt(i)==60){if(e.charCodeAt(i+1)===47){s=i+2,i=e.indexOf(">",i),s=e.substring(s,i);var u=s.indexOf(o);if(u==-1){var l=o.indexOf(".");l>0&&(u=s.indexOf(o.substring(0,l)))}if(u==-1)throw o=e.substring(0,i).split(`
25
+ `),Error(`Unexpected close tag
26
+ Line: `+(o.length-1)+`
27
+ Column: `+(o[o.length-1].length+1)+`
28
+ Char: `+e[i]);i+1&&(i+=1);break}else if(e.charCodeAt(i+1)===33){if(e.charCodeAt(i+2)==45){for(;i!==-1&&(e.charCodeAt(i)!==62||e.charCodeAt(i-1)!=45||e.charCodeAt(i-2)!=45||i==-1);)i=e.indexOf(">",i+1);i===-1&&(i=e.length)}else if(e.charCodeAt(i+2)===91&&e.charCodeAt(i+8)===91&&e.substr(i+3,5).toLowerCase()==="cdata"){u=e.indexOf("]]>",i),u==-1?(a.push(e.substr(i+9)),i=e.length):(a.push(e.substring(i+9,u)),i=u+3);continue}i++;continue}e:{l=s,i++;var h=r(),g={};for(u=[];e.charCodeAt(i)!==62&&e[i];){var m=e.charCodeAt(i);if(m>64&&m<91||m>96&&m<123){m=r();for(var E=e.charCodeAt(i);E&&E!==39&&E!==34&&!(E>64&&E<91||E>96&&E<123)&&E!==62;)i++,E=e.charCodeAt(i);var A=i+1;if(i=e.indexOf(e[i],A),A=(" "+e.slice(A,i)).slice(1),E===39||E===34){if(i===-1){if(l={tagName:h,attributes:g,children:u,parent:null},t)for(h=0;h<u.length;h++)typeof u[h]!="string"&&(u[h].parent=l);u=l;break e}}else A=null,i--;if(m.startsWith("xmlns:")){E=A;var k=m.split(":")[1];qt.set(E,k),vn.set(k,E)}h==="tt"&&m==="xml:space"&&A==="preserve"&&(l=!0),g[m]=A}i++}for(e.charCodeAt(i-1)!==47?(i++,u=n(h,l)):i++,l={tagName:h,attributes:g,children:u,parent:null},h=u.length,g=0;g<h;g++)m=u[g],typeof m!="string"?t&&(m.parent=l):g==h-1&&m==`
29
+ `&&u.pop();u=l}if(a.push(u),typeof u=="string")break;u.tagName[0]==="?"&&u.children&&(a.push.apply(a,M(u.children)),u.children=[])}else u=i,i=e.indexOf("<",i)-1,i===-2&&(i=e.length),u=(" "+e.slice(u,i+1)).slice(1),s?u.length>0&&a.push(u):(a.length&&u.length==1&&u[0]==`
30
+ `||u.trim().length>0)&&a.push(u),i++;return a}function r(){for(var o=i;`\r
31
+ >/= `.indexOf(e[i])===-1&&e[i];)i++;return(" "+e.slice(o,i)).slice(1)}var i=0;return n("")}function Bs(e){return typeof e=="string"}function bu(e){var t=[];if(!e.children)return[];e=d(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n!="string"&&t.push(n);return t}function Mn(e,t){var n=[];if(!e.children)return[];e=d(e.children);for(var r=e.next();!r.done;r=e.next())r=r.value,r.tagName===t&&n.push(r);return n}function vr(e){if(typeof e=="string")return zr(e);var t=[];e=d(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n=="string"&&t.push(n);return t=t.join(""),t===""?null:zr(t)}function _r(e){for(var t=d(e.children),n=t.next();!n.done;n=t.next())if(typeof n.value!="string")return null;return(e=vr(e))&&(e=e.trim()),e}function di(e,t,n){if(n=n===void 0?[]:n,e.tagName===t&&n.push(e),e.children){e=d(e.children);for(var r=e.next();!r.done;r=e.next())di(r.value,t,n)}return n}function Pn(e,t){return e=Mn(e,t),e.length!=1?null:e[0]}function Oi(e,t,n){return e=iu(e,t,n),e.length!=1?null:e[0]}function At(e,t,n,r){r=r===void 0?null:r;var i=null;return e=e.attributes[t],e==null||e===""&&r!==null||(i=n(e)),i??r}function Co(e,t,n){return t=ra(t),e.attributes[t+":"+n]||null}function iu(e,t,n){var r=ra(t);if(t=[],e.children)for(n=r?r+":"+n:n,e=d(e.children),r=e.next();!r.done;r=e.next())(r=r.value)&&r.tagName===n&&t.push(r);return t}function uo(e,t,n){t=d(t);for(var r=t.next();!r.done;r=t.next())if(r=Co(e,r.value,n))return r;return null}function W(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:e/1e3):null}function Q(e){return!e||(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").exec(e),!e)?null:(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null)}function D(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return!t||(e=Number(t[1]),!isFinite(e))?null:(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null)}function re(e){return e=Number(e),e%1===0?e:null}function ge(e){return e=Number(e),e%1===0&&e>0?e:null}function je(e){return e=Number(e),e%1===0&&e>=0?e:null}function qe(e){return e=Number(e),isNaN(e)?null:e}function tt(e){return e?e.toLowerCase()==="true":!1}function rt(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function vt(e){var t=[];e=zr(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/),e=d(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var r=n.match(/^([\w]+)/);if(r){var i=n.match(/(@id='(.*?)')/),o=n.match(/(@t='(\d+)')/),s=n.match(/(@n='(\d+)')/),a=n.match(/\[(\d+)\]/);t.push({name:r[0],id:i?i[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:o?Number(o[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:s?Number(s[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:a?Number(a[1])-1:null,yc:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].yc=n.slice(1))}return t}function En(e,t){var n=vt(t.attributes.sel||"");if(n.length){var r=n[n.length-1],i=t.attributes.pos||null;n=r.position,n==null&&(r.t!==null&&(n=or(e,"t",r.t)),r.n!==null&&(n=or(e,"n",r.n))),n===null?n=i==="prepend"?0:e.length:i==="prepend"?--n:i==="after"&&++n,i=t.tagName,(r=r.yc)&&e[n]?Qn(e[n],i,r,_r(t)||""):(i!=="remove"&&i!=="replace"||e.splice(n,1),i!=="add"&&i!=="replace"||e.splice.apply(e,[n,0].concat(M(t.children))))}}function or(e,t,n){var r=0;e=d(e);for(var i=e.next();!i.done;i=e.next()){if(Number(i.value.attributes[t])===n)return r;r++}return null}function Qn(e,t,n,r){t==="remove"?delete e.attributes[n]:(t==="add"||t==="replace")&&(e.attributes[n]=r)}function Xn(e){var t="",n=e.tagName.split(":");n.length>0&&(t=n[0],t=vn.has(t)?vn.get(t):""),t=document.createElementNS(t,e.tagName);for(var r in e.attributes)t.setAttribute(r,e.attributes[r]);for(e=d(e.children),r=e.next();!r.done;r=e.next())r=r.value,n=void 0,typeof r=="string"?n=new Text(r):n=Xn(r),t.appendChild(n);return t}function _t(e){if(!e)return null;var t={tagName:e.tagName,attributes:_o(e.attributes),children:[],parent:null};e=d(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n=="string"||(n=_t(n),n.parent=t),t.children.push(n);return t}var qt=new Map,vn=new Map;function It(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new ss,this.position=null,this.positionAlign=ri,this.size=0,this.textAlign=Jt,this.direction=Zn,this.writingMode=sr,this.lineInterpretation=xn,this.line=null,this.lineHeight="",this.lineAlign=Ar,this.displayAlign=nn,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=Ou,this.fontStyle=ou,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",this.textDecoration=[],this.textStrokeWidth=this.textStrokeColor=this.textShadow="",this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.rubyTag=null,this.cellResolution={columns:32,rows:15}}function Tn(e,t){return e=new It(e,t,""),e.lineBreak=!0,e}It.prototype.clone=function(){var e=new It(0,0,""),t;for(t in this)e[t]=this[t],Array.isArray(e[t])&&(e[t]=e[t].slice());return e};function Wn(e,t){if(e.payload!=t.payload||!(Math.abs(e.startTime-t.startTime)<.001&&Math.abs(e.endTime-t.endTime)<.001))return!1;for(var n in e)if(n!="startTime"&&n!="endTime"&&n!="payload"){if(n=="nestedCues"){if(!Ye(e.nestedCues,t.nestedCues,Wn))return!1}else if(n=="region"||n=="cellResolution"){for(var r in e[n])if(e[n][r]!=t[n][r])return!1}else if(Array.isArray(e[n])){if(!Ye(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function $r(e,t){t=t===void 0?new Map:t;var n=e.payload;if(n.includes("<")){t.size===0&&lo(t);var r=n;n=[];for(var i=-1,o=0;o<r.length;o++)r[o]==="<"?i=o+1:r[o]===">"&&i>0&&(i=r.substr(i,o-i),i.match(sf)&&n.push(i),i=-1);for(n=d(n),o=n.next();!o.done;o=n.next())o=o.value,r=r.replace("<"+o+">",'<div time="'+o+'">'),r+="</div>";e:{o=r,i=[];var s=-1;n="",r=!1;for(var a=0;a<o.length;a++)if(o[a]==="/"){var u=o.indexOf(">",a);if(u===-1){n=o;break e}if((u=o.substring(a+1,u))&&u=="v"){r=!0;var l=null;if(i.length&&(l=i[i.length-1]),l){if(l===u)n+="/"+u+">";else{if(!l.startsWith("v")){n+=o[a];continue}n+="/"+l+">"}a+=u.length+1}else n+=o[a]}else n+=o[a]}else o[a]==="<"?(s=a+1,o[s]!="v"&&(s=-1)):o[a]===">"&&s>0&&(i.push(o.substr(s,a-s)),s=-1),n+=o[a];for(o=d(i),i=o.next();!i.done;i=o.next())i=i.value,s=i.replace(" ",".voice-"),n=n.replace("<"+i+">","<"+s+">"),n=n.replace("</"+i+">","</"+s+">"),r||(n+="</"+s+">")}n=us(n),e.payload="",r="<span>"+n.replace(/\n/g,"<br />")+"</span>";try{var h=As(r,"span")}catch{}if(h)if(h=h.children,h.length!=1||h[0].tagName)for(h=d(h),n=h.next();!n.done;n=h.next())Ni(n.value,e,t);else e.payload=zr(n);else e.payload=zr(n)}else e.payload=zr(n)}function lo(e){for(var t=d(Object.entries(Ir)),n=t.next();!n.done;n=t.next()){var r=d(n.value);n=r.next().value,r=r.next().value;var i=new It(0,0,"");i.color=r,e.set("."+n,i)}for(t=d(Object.entries(Du)),n=t.next();!n.done;n=t.next())r=d(n.value),n=r.next().value,r=r.next().value,i=new It(0,0,""),i.backgroundColor=r,e.set("."+n,i)}function us(e){var t={"< ":""," >":" &gt;"},n=/(< +>|<\s|\s>)/g,r=RegExp(n.source);return e&&r.test(e)?e.replace(n,function(i){return t[i]||""}):e||""}function Ni(e,t,n){var r=t.clone();if(r.nestedCues=[],r.payload="",r.rubyTag="",r.line=null,r.region=new ss,r.position=null,r.size=0,r.textAlign=Jt,e.tagName)for(var i=d(e.tagName.split(/(?=[ .])+/g)),o=i.next();!o.done;o=i.next()){var s=o=o.value;if(s.startsWith(".voice-")){var a=s.split("-").pop();s='v[voice="'+a+'"]',n.has(s)||(s="v[voice="+a+"]")}switch(n.has(s)&&(a=r,s=n.get(s))&&(a.backgroundColor=vi(s.backgroundColor,a.backgroundColor),a.color=vi(s.color,a.color),a.fontFamily=vi(s.fontFamily,a.fontFamily),a.fontSize=vi(s.fontSize,a.fontSize),a.textShadow=vi(s.textShadow,a.textShadow),a.fontWeight=s.fontWeight,a.fontStyle=s.fontStyle,a.opacity=s.opacity,a.rubyTag=s.rubyTag,a.textCombineUpright=s.textCombineUpright,a.wrapLine=s.wrapLine),o){case"br":r=Tn(r.startTime,r.endTime),t.nestedCues.push(r);return;case"b":r.fontWeight=ia;break;case"i":r.fontStyle=Pa;break;case"u":r.textDecoration.push(Is);break;case"font":(o=e.attributes.color)&&(r.color=o);break;case"div":if(o=e.attributes.time,!o)break;(o=ws(o))&&(r.startTime=o);break;case"ruby":case"rp":case"rt":r.rubyTag=o}}if(i=e.children,Bs(e)||i.length==1&&Bs(i[0]))for(n=vr(e).split(`
32
+ `),e=!0,n=d(n),i=n.next();!i.done;i=n.next())i=i.value,e||(e=Tn(r.startTime,r.endTime),t.nestedCues.push(e)),i.length>0&&(e=r.clone(),e.payload=zr(i),t.nestedCues.push(e)),e=!1;else for(t.nestedCues.push(r),t=d(i),e=t.next();!e.done;e=t.next())Ni(e.value,r,n)}function vi(e,t){return e&&e.length>0?e:t}Re("shaka.text.Cue",It),It.parseCuePayload=$r,It.equal=Wn,It.prototype.clone=It.prototype.clone;var ri="auto";It.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ri};var Jt="center",fn={LEFT:"left",RIGHT:"right",CENTER:Jt,START:"start",END:"end"};It.textAlign=fn;var nn="after",en={BEFORE:"before",CENTER:"center",AFTER:nn};It.displayAlign=en;var Zn="ltr";It.direction={HORIZONTAL_LEFT_TO_RIGHT:Zn,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var sr="horizontal-tb";It.writingMode={HORIZONTAL_TOP_TO_BOTTOM:sr,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var xn=0;It.lineInterpretation={LINE_NUMBER:xn,PERCENTAGE:1};var Ar="start",yn={CENTER:"center",START:Ar,END:"end"};It.lineAlign=yn;var Ir={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};It.defaultTextColor=Ir;var Du={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};It.defaultTextBackgroundColor=Du;var Ou=400,ia=700;It.fontWeight={NORMAL:Ou,BOLD:ia};var ou="normal",Pa="italic",su={NORMAL:ou,ITALIC:Pa,OBLIQUE:"oblique"};It.fontStyle=su;var Is="underline";It.textDecoration={UNDERLINE:Is,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var sf=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Ho(){}Ho.prototype.destroy=function(){};function ls(e,t,n){Fl.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,wf:t})}function oa(e,t){for(var n=e.toLowerCase().split(";")[0],r=d([Ul,Nu,Nr,Cs]),i=r.next();!i.done;i=r.next())if(i=Fl.get(n+"-"+i.value)){var o=i.wf(),s=o.isSupported(e,t);if(o.destroy(),s)return i.wf}return null}Re("shaka.transmuxer.TransmuxerEngine",Ho),Ho.findTransmuxer=oa,Ho.unregisterTransmuxer=function(e,t){Fl.delete(e.toLowerCase().split(";")[0]+"-"+t)},Ho.registerTransmuxer=ls,Ho.prototype.destroy=Ho.prototype.destroy;var Fl=new Map,Cs=1,Nr=2,Nu=3,Ul=4;Ho.PluginPriority={FALLBACK:Cs,PREFERRED_SECONDARY:Nr,PREFERRED:Nu,APPLICATION:Ul};function Bl(){}function ar(e,t){var n=e;return t&&!Ms.includes(e)&&(n+='; codecs="'+t+'"'),n}function au(e,t){return t&&(e+='; codecs="'+t+'"'),e}function Lu(e,t,n){var r=ar(e,t);return t=au(e,t),oa(t)?(e=oa(t))?(e=e(),n=e.convertCodecs(n,t),e.destroy()):n=t:n=e!="video/mp2t"&&n=="audio"?r.replace("video","audio"):r,n}function ka(e){return e.split(";")[0].split("/")[1]}function ii(e){var t=af(e);switch(e=t[0].toLowerCase(),t=t[1].toLowerCase(),!0){case(e==="mp4a"&&t==="69"):case(e==="mp4a"&&t==="6b"):case(e==="mp4a"&&t==="40.34"):return"mp3";case(e==="mp4a"&&t==="66"):case(e==="mp4a"&&t==="67"):case(e==="mp4a"&&t==="68"):case(e==="mp4a"&&t==="40.2"):case(e==="mp4a"&&t==="40.02"):case(e==="mp4a"&&t==="40.5"):case(e==="mp4a"&&t==="40.05"):case(e==="mp4a"&&t==="40.29"):case(e==="mp4a"&&t==="40.42"):return"aac";case(e==="mp4a"&&t==="a5"):case e==="ac3":case e==="ac-3":return"ac-3";case(e==="mp4a"&&t==="a6"):case e==="eac3":case e==="ec-3":return"ec-3";case e==="ac-4":return"ac-4";case(e==="mp4a"&&t==="b2"):return"dtsx";case(e==="mp4a"&&t==="a9"):return"dtsc";case e==="vp09":case e==="vp9":return"vp9";case e==="avc1":case e==="avc3":return"avc";case e==="hvc1":case e==="hev1":return"hevc";case e==="vvc1":case e==="vvi1":return"vvc";case e==="dvh1":case e==="dvhe":return t&&t.startsWith("05")?"dovi-p5":"dovi-hevc";case e==="dvav":case e==="dva1":return"dovi-avc";case e==="dav1":return"dovi-av1";case e==="dvc1":case e==="dvi1":return"dovi-vvc";case e==="lvc1":return"lcevc"}return e}function Vs(e){var t=[];e=d(e.split(","));for(var n=e.next();!n.done;n=e.next())n=af(n.value),t.push(n[0]);return t.sort().join(",")}function yi(e){return e.split(";")[0]}function Si(e){return e=e.split(/ *; */),e.shift(),(e=e.find(function(t){return t.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function uu(e){return e==="application/x-mpegurl"||e==="application/vnd.apple.mpegurl"}function af(e){e=e.split(".");var t=e[0];return e.shift(),[t,e.join(".")]}Re("shaka.util.MimeUtils",Bl),Bl.getFullTypeWithAllCodecs=au,Bl.getFullType=ar,new Map().set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var Ms=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Ps(e){this.i=null,this.l=e,this.B=this.G=!1,this.m=this.u=0,this.o=1/0,this.h=this.g=null,this.D="",this.C=function(){},this.j=new Map}function oi(e,t){Ra.set(e,t)}function lu(e){return Ra.get(e)}function cu(e){return Ra.has(e)?!0:e=="application/cea-608"||e=="application/cea-708"?!!Vn:!1}Ps.prototype.destroy=function(){return this.l=this.i=null,this.j.clear(),Promise.resolve()};function Lh(e,t,n,r,i){var o,s,a,u,l,h,g,m;return H(function(E){if(E.h==1)return E.g(Promise.resolve(),2);if(!e.i||!e.l)return E.return();if(n==null||r==null)return e.i.parseInit(wt(t)),E.return();for(o=e.B?0:e.u,s=e.G||e.B?n:e.u,a={periodStart:o,segmentStart:n,segmentEnd:r,vttOffset:s},u=e.i.parseMedia(wt(t),a,i,[]),l=d(u),h=l.next();!h.done;h=l.next())g=h.value,e.C(g,i||null,a);m=u.filter(function(A){return A.startTime>=e.m&&A.startTime<e.o}),e.l.append(m),e.g==null&&(e.g=Math.max(n,e.m)),e.h=Math.min(r,e.o),E.j()})}Ps.prototype.remove=function(e,t,n){n=n===void 0?!1:n;var r=this;return H(function(i){if(i.h==1)return i.g(Promise.resolve(),2);if(e>=t||n&&(_l(r,e,t),r.D===""))return i.return();r.l&&r.l.remove(e,t)&&r.g!=null&&(t<=r.g||e>=r.h||(e<=r.g&&t>=r.h?r.g=r.h=null:e<=r.g&&t<r.h?r.g=t:e>r.g&&t>=r.h&&(r.h=e)),fu(r)),i.j()})};function uf(e,t,n){e.m=t,e.o=n}function Vl(e,t,n){e.D=t,(t=e.j.get(t))&&(t=t.filter(function(r){return r.endTime<=n}),t.length&&e.l.append(t))}function lf(e,t,n){t.startTime+=n,t.endTime+=n,t=d(t.nestedCues);for(var r=t.next();!r.done;r=t.next())lf(e,r.value,n)}function ju(e,t,n){var r=new Map;t=d(t);for(var i=t.next();!i.done;i=t.next()){var o=i.value;i=o.stream,o=o.cue,r.has(i)||r.set(i,[]),lf(e,o,n),o.startTime>=e.m&&o.startTime<e.o&&(r.get(i).push(o),i==e.D&&e.l.append([o]))}for(n=d(r.keys()),t=n.next();!t.done;t=n.next())for(t=t.value,e.j.has(t)||e.j.set(t,[]),i=d(r.get(t)),o=i.next();!o.done;o=i.next())o=o.value,e.j.get(t).push(o);fu(e)}function _l(e,t,n){for(var r=d(e.j.keys()),i=r.next();!i.done;i=r.next()){i=i.value;var o=e.j.get(i);o=o.filter(function(s){return s.startTime<t||s.endTime>=n}),e.j.set(i,o)}}function fu(e){for(var t=1/0,n=-1/0,r=d(e.j.values()),i=r.next();!i.done;i=r.next()){i=d(i.value);for(var o=i.next();!o.done;o=i.next())o=o.value,t=Math.min(t,o.startTime),n=Math.max(n,o.endTime)}t!==1/0&&n!==-1/0&&(e.g=e.g==null?Math.max(t,e.m):Math.min(e.g,Math.max(t,e.m)),e.h=Math.max(e.h,Math.min(n,e.o)))}Re("shaka.text.TextEngine",Ps),Ps.prototype.destroy=Ps.prototype.destroy,Ps.findParser=lu,Ps.unregisterParser=function(e){Ra.delete(e)},Ps.registerParser=oi;var Ra=new Map;function sa(e){this.h=e,this.g=null}sa.prototype.ka=function(e){var t=this;this.stop();var n=!0,r=null;return this.g=function(){R.clearTimeout(r),n=!1},r=R.setTimeout(function(){n&&t.h()},e*1e3),this},sa.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Yt(e){this.h=e,this.g=null}Yt.prototype.xb=function(){return this.stop(),this.h(),this},Yt.prototype.ka=function(e){var t=this;return this.stop(),this.g=new sa(function(){t.h()}).ka(e),this},Yt.prototype.Ea=function(e){var t=this;return this.stop(),this.g=new sa(function(){t.g.ka(e),t.h()}).ka(e),this},Yt.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},Re("shaka.util.Timer",Yt),Yt.prototype.stop=Yt.prototype.stop,Yt.prototype.tickEvery=Yt.prototype.Ea,Yt.prototype.tickAfter=Yt.prototype.ka,Yt.prototype.tickNow=Yt.prototype.xb;function jh(e,t){return e.concat(t)}function Fh(){}function cs(e){return e!=null}function Fu(e,t){return Promise.race([t,new Promise(function(n,r){new Yt(r).ka(e)})])}function co(){}function ba(e,t){return e=bn(e),t=bn(t),e.split("-")[0]==t.split("-")[0]}function du(e,t){return e=bn(e),t=bn(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&e.length==1&&t.length==2}function Hl(e,t){return e=bn(e),t=bn(t),e=e.split("-"),t=t.split("-"),e.length==2&&t.length==2&&e[0]==t[0]}function bn(e){e=d(e.split("-x-"));var t=e.next().value;t=t===void 0?"":t,e=e.next().value,e=e===void 0?"":e;var n=d(t.split("-"));return t=n.next().value,t=t===void 0?"":t,n=n.next().value,n=n===void 0?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=O.get(t)||t,n=n.toUpperCase(),(n?t+"-"+n:t)+(e?"-"+e:"")}function Xr(e,t){return e=bn(e),t=bn(t),t==e?4:du(t,e)?3:Hl(t,e)?2:du(e,t)?1:0}function hu(e){var t=e.indexOf("-");return e=t>=0?e.substring(0,t):e,e=e.toLowerCase(),e=O.get(e)||e}function y(e){return e.language?bn(e.language):e.audio&&e.audio.language?bn(e.audio.language):e.video&&e.video.language?bn(e.video.language):"und"}function x(e,t){e=bn(e);var n=new Set;t=d(t);for(var r=t.next();!r.done;r=t.next())n.add(bn(r.value));for(t=d(n),r=t.next();!r.done;r=t.next())if(r=r.value,r==e)return r;for(t=d(n),r=t.next();!r.done;r=t.next())if(r=r.value,du(r,e))return r;for(t=d(n),r=t.next();!r.done;r=t.next())if(r=r.value,Hl(r,e))return r;for(n=d(n),t=n.next();!t.done;t=n.next())if(t=t.value,du(e,t))return t;return null}Re("shaka.util.LanguageUtils",co),co.findClosestLocale=x,co.getLocaleForVariant=y,co.getLocaleForText=function(e){return bn(e.language||"und")},co.getBase=hu,co.relatedness=Xr,co.areSiblings=function(e,t){var n=hu(e),r=hu(t);return e!=n&&t!=r&&n==r},co.normalize=bn,co.isSiblingOf=Hl,co.isParentOf=du,co.areLanguageCompatible=ba,co.areLocaleCompatible=function(e,t){return e=bn(e),t=bn(t),e==t};var O=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function _(){}function X(e,t,n,r,i){if(i.length){var o=e.textStreams;i=d(i);for(var s=i.next(),a={};!s.done;a={Ch:void 0},s=i.next())if(a.Ch=s.value,s=o.filter(function(A){return function(k){return!!(k.codecs.startsWith(A.Ch)||k.mimeType.startsWith(A.Ch))}}(a)),s.length){o=s;break}e.textStreams=o}if(o=e.variants,(t.length||n.length)&&(o=se(o,t,n)),r.length){for(t=new Tt,o=d(o),n=o.next();!n.done;n=o.next())n=n.value,t.push(String(n.video.width||0),n);var u=[];t.forEach(function(A,k){A=0;var b=[];k=d(k);for(var V=k.next(),B={};!V.done;B={Sf:void 0},V=k.next())B.Sf=V.value,V=r.filter(function(Z){return function(ue){return Z.Sf.decodingInfos[0][ue]}}(B)).length,V>A?(A=V,b=[B.Sf]):V==A&&b.push(B.Sf);u.push.apply(u,M(b))}),o=u}for(t=new Set,n=d(o),i=n.next();!i.done;i=n.next())i=i.value,i.video&&t.add(i.video);if(t.size){var l={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};i=Array.from(t).sort(function(A,k){return A.bandwidth&&k.bandwidth&&A.bandwidth!=k.bandwidth?A.bandwidth-k.bandwidth:A.width!=k.width?A.width-k.width:A.codecs&&k.codecs?(A=ii(A.codecs),k=ii(k.codecs),(l[A]||1)-(l[k]||1)):0});var h=[];for(t=new Map,n=function(A){var k=[String(A.width||""),String(A.height||""),String(Math.round(A.frameRate||0)),A.hdr||"",A.fastSwitching];return A.dependencyStream&&k.push(A.dependencyStream.baseOriginalId||""),A.roles&&k.push(A.roles.sort().join("_")),k.join(";")},i=d(i),s=i.next();!s.done;s=i.next()){s=s.value,a=n(s);var g=t.get(a)||[];if(g.length){var m=ii(g[g.length-1].codecs),E=ii(s.codecs);m==E&&(g.push(s),h.push(s.id))}else g.push(s),h.push(s.id);t.set(a,g)}e.variants=o.filter(function(A){return!((A=A.video)&&!h.includes(A.id))})}else e.variants=o}function se(e,t,n){t=d(t);for(var r=t.next(),i={};!r.done;i={ij:void 0},r=t.next())if(i.ij=r.value,r=e.filter(function(o){return function(s){return s.video&&s.video.codecs.startsWith(o.ij)}}(i)),r.length){e=r;break}for(n=d(n),t=n.next(),r={};!t.done;r={Nh:void 0},t=n.next())if(r.Nh=t.value,t=e.filter(function(o){return function(s){return s.audio&&s.audio.codecs.startsWith(o.Nh)}}(r)),t.length){e=t;break}return e}function me(e,t,n){e.variants=e.variants.filter(function(r){return Oe(r,t,n)})}function Oe(e,t,n){function r(s,a,u){return s>=a&&s<=u}if(e&&e.video&&e.video.width&&e.video.height){var i=e.video.width,o=e.video.height;if(o>i&&(o=d([o,i]),i=o.next().value,o=o.next().value),!r(i,t.minWidth,Math.min(t.maxWidth,n.width))||!r(o,t.minHeight,Math.min(t.maxHeight,n.height))||!r(i*o,t.minPixels,t.maxPixels))return!1}return!(e&&e.video&&e.video.frameRate&&!r(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||e&&e.audio&&e.audio.channelsCount&&!r(e.audio.channelsCount,t.minChannelsCount,t.maxChannelsCount)||!r(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function Ue(e,t,n,r){return n=n===void 0?[]:n,r=r===void 0?{}:r,H(function(i){return i.h==1?i.g(Ke(e,t,t.offlineSessionIds.length>0,n,r),2):(ot(t),i.g(Ht(t),0))})}function Ke(e,t,n,r,i){var o,s;return H(function(a){if(a.h==1)return ct().Wi()&&Te(t.variants),a.g(Ze(t.variants,n,!1,r),2);o=null,e&&(s=e.g)&&(o=s.keySystem),t.variants=t.variants.filter(function(u){var l=Me(u,o,i);if(!l){var h=[];u.audio&&h.push(ir(u.audio)),u.video&&h.push(ir(u.video))}return l}),a.j()})}function Te(e){var t=new Map().set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),n=new Set;e=d(e);for(var r=e.next();!r.done;r=e.next())r=r.value,r.video&&n.add(r.video);for(n=d(n),e=n.next();!e.done;e=n.next()){e=e.value,r=d(t);for(var i=r.next();!i.done;i=r.next()){var o=d(i.value);if(i=o.next().value,o=o.next().value,e.codecs.includes(i)){e.codecs=e.codecs.replace(i,o);break}}}}function Me(e,t,n){if(!e.decodingInfos.some(function(u){return!(!u.supported||t&&(u=u.keySystemAccess)&&(n[u.keySystem]||u.keySystem)!=t)}))return!1;var r=ct(),i=r.Hb()==="Xbox";r=r.Pa()==="MOBILE"&&r.Ia()==="GECKO";var o=e.video,s=o&&o.width||0,a=o&&o.height||0;return i&&o&&(s>1920||a>1080)&&(o.codecs.includes("avc1.")||o.codecs.includes("avc3."))||(i=o&&o.dependencyStream)&&!eu(i)?!1:(e=e.audio,!(r&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus")||e&&e.dependencyStream))}function Be(e,t){var n,r,i,o,s,a,u;return H(function(l){if(l.h==1){for(n=function(h,g){if(h){var m=_o(h);return m.supported=h.supported&&g.supported,m.powerEfficient=h.powerEfficient&&g.powerEfficient,m.smooth=h.smooth&&g.smooth,g.keySystemAccess&&!m.keySystemAccess&&(m.keySystemAccess=g.keySystemAccess),m}return g},r=null,i=[],o=d(t),s=o.next(),a={};!s.done;a={cache:void 0,Le:void 0},s=o.next())u=s.value,a.Le=ta(u),a.cache=cf,a.cache.has(a.Le)?r=n(r,a.cache.get(a.Le)):i.push(Fe(u).then(function(h){return function(g){var m=null;g=d(g||[]);for(var E=g.next();!E.done;E=g.next())m=n(m,E.value);m&&(h.cache.set(h.Le,m),r=n(r,m))}}(a)));return l.g(Promise.all(i),2)}r&&e.decodingInfos.push(r),l.j()})}function Fe(e){var t=[""];e.video&&(t=Si(e.video.contentType).split(","));var n=[""];e.audio&&(n=Si(e.audio.contentType).split(","));var r=[];t=d(t);for(var i=t.next();!i.done;i=t.next()){i=i.value;for(var o=d(n),s=o.next(),a={};!s.done;a={Kc:void 0},s=o.next())s=s.value,a.Kc=Ki(e),e.video&&(a.Kc.video.contentType=ar(yi(a.Kc.video.contentType),i)),e.audio&&(a.Kc.audio.contentType=ar(yi(a.Kc.audio.contentType),s)),r.push(new Promise(function(u){return function(l,h){(ct().Pa()=="MOBILE"?Fu(5,navigator.mediaCapabilities.decodingInfo(u.Kc)):navigator.mediaCapabilities.decodingInfo(u.Kc)).then(function(g){l(g)}).catch(h)}}(a)))}return Promise.all(r).catch(function(){return JSON.stringify(e),null})}function Ze(e,t,n,r){var i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe;return H(function(te){switch(te.h){case 1:if(e.some(function(le){return le.decodingInfos.length}))return te.return();i=d(r),o=i.next(),s={};case 2:if(o.done){te.A(4);break}s.Ei=o.value,a=!1,u=d(e),l=u.next();case 5:if(l.done){te.A(7);break}h=l.value,g=$e(h,t,n).filter(function(le){return function(ie){return ie=ie[0],(ie.keySystemConfiguration&&ie.keySystemConfiguration.keySystem)===le.Ei}}(s)),m=d(g),E=m.next();case 8:if(E.done){te.A(10);break}return A=E.value,te.g(Be(h,A),9);case 9:E=m.next(),te.A(8);break;case 10:h.decodingInfos.some(function(le){return le.supported})&&(a=!0),l=u.next(),te.A(5);break;case 7:if(a)return te.return();s={Ei:void 0},o=i.next(),te.A(2);break;case 4:k=d(e),b=k.next();case 12:if(b.done){te.A(0);break}V=b.value,B=$e(V,t,n).filter(function(le){return le=le[0],le=le.keySystemConfiguration&&le.keySystemConfiguration.keySystem,!le||!r.includes(le)}),Z=d(B),ue=Z.next();case 15:if(ue.done){b=k.next(),te.A(12);break}return pe=ue.value,te.g(Be(V,pe),16);case 16:ue=Z.next(),te.A(15)}})}function $e(e,t,n){var r=e.audio,i=e.video,o=[],s=[];if(i)for(var a=d(i.fullMimeTypes),u=a.next();!u.done;u=a.next()){u=u.value;var l=Si(u);if(l.includes(",")&&!r){var h=l.split(","),g=yi(u);l=Ss("video",h),h=Ss("audio",h),h=ze(h,g),g=Lu(g,h,"audio"),s.push({contentType:g,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(l=kt(l),u={contentType:Lu(yi(u),l,"video"),width:i.width||64,height:i.height||64,bitrate:i.bandwidth||e.bandwidth||1,framerate:i.frameRate||30},i.hdr)switch(i.hdr){case"PQ":u.transferFunction="pq";break;case"HLG":u.transferFunction="hlg"}i.colorGamut&&(u.colorGamut=i.colorGamut),o.push(u)}if(r)for(a=d(r.fullMimeTypes),u=a.next();!u.done;u=a.next())l=u.value,u=yi(l),l=ze(Si(l),u),u=Lu(u,l,"audio"),s.push({contentType:u,channels:r.channelsCount||2,bitrate:r.bandwidth||e.bandwidth||1,samplerate:r.audioSamplingRate||1,spatialRendering:r.spatialAudio});for(a=[],o.length==0&&o.push(null),s.length==0&&s.push(null),o=d(o),u=o.next();!u.done;u=o.next())for(u=u.value,l=d(s),g=l.next();!g.done;g=l.next())g=g.value,h={type:n?"file":"media-source"},u&&(h.video=u),g&&(h.audio=g),a.push(h);if(s=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]),!s.length)return[a];for(e=[],n=new Map,s=d(s),o=s.next();!o.done;o=s.next())o=o.value,n.get(o.keySystem)||n.set(o.keySystem,[]),n.get(o.keySystem).push(o);for(s=t?"required":"optional",t=t?["persistent-license"]:["temporary"],o=d(n.keys()),u=o.next();!u.done;u=o.next()){for(u=u.value,g=n.get(u),l=new Map,g=d(g),h=g.next();!h.done;h=g.next()){h=h.value;var m=h.videoRobustness+","+h.audioRobustness;l.get(m)||l.set(m,[]),l.get(m).push(h)}for(l=d(l.values()),g=l.next();!g.done;g=l.next()){g=g.value,h=[],m=d(a);for(var E=m.next();!E.done;E=m.next()){E=Object.assign({},E.value);for(var A={keySystem:u,initDataType:"cenc",persistentState:s,distinctiveIdentifier:"optional",sessionTypes:t},k=d(g),b=k.next();!b.done;b=k.next()){if(b=b.value,b.initData&&b.initData.length){for(var V=new Set,B=d(b.initData),Z=B.next();!Z.done;Z=B.next())V.add(Z.value.initDataType);A.initDataType=b.initData[0].initDataType}b.distinctiveIdentifierRequired&&(A.distinctiveIdentifier="required"),b.persistentStateRequired&&(A.persistentState="required"),b.sessionType&&(A.sessionTypes=[b.sessionType]),r&&(A.audio?(b.encryptionScheme&&(A.audio.encryptionScheme=A.audio.encryptionScheme||b.encryptionScheme),A.audio.robustness=A.audio.robustness||b.audioRobustness):(A.audio={robustness:b.audioRobustness},b.encryptionScheme&&(A.audio.encryptionScheme=b.encryptionScheme)),A.audio.robustness==""&&delete A.audio.robustness),i&&(A.video?(b.encryptionScheme&&(A.video.encryptionScheme=A.video.encryptionScheme||b.encryptionScheme),A.video.robustness=A.video.robustness||b.videoRobustness):(A.video={robustness:b.videoRobustness},b.encryptionScheme&&(A.video.encryptionScheme=b.encryptionScheme)),A.video.robustness==""&&delete A.video.robustness)}E.keySystemConfiguration=A,h.push(E)}e.push(h)}}return e}function ze(e,t){var n=ct();return e.toLowerCase()=="flac"?n.Ia()!="WEBKIT"?"flac":"fLaC":e.toLowerCase()==="opus"?n.Ia()!="WEBKIT"?"opus":ka(t)=="mp4"?"Opus":"opus":e.toLowerCase()=="ac-3"&&n.ke()?"ec-3":e}function kt(e){if(e.includes("avc1")){var t=e.split(".");if(t.length==3)return e=t.shift()+".",e+=parseInt(t.shift(),10).toString(16),e+=("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if(e=="vp9")return"vp09.00.41.08";return e}function ot(e){e.textStreams=e.textStreams.filter(function(t){return t=ar(t.mimeType,t.codecs),cu(t)})}function Ht(e){var t,n,r,i,o,s,a;return H(function(u){switch(u.h){case 1:t=[],n=d(e.imageStreams),r=n.next();case 2:if(r.done){u.A(4);break}if(i=r.value,o=i.mimeType,o=="application/mp4"&&i.codecs=="mjpg"&&(o="image/jpg"),ff.has(o)){u.A(5);break}if(s=fA.get(o),!s){ff.set(o,!1),u.A(5);break}return u.g(We(s),7);case 7:a=u.i,ff.set(o,a);case 5:ff.get(o)&&t.push(i),r=n.next(),u.A(2);break;case 4:e.imageStreams=t,u.j()}})}function We(e){return new Promise(function(t){var n=new Image;n.src=e,"decode"in n?n.decode().then(function(){t(!0)}).catch(function(){t(!1)}):n.onload=n.onerror=function(){t(n.height===2)}})}function mt(e){var t=e.audio,n=e.video,r=t?t.mimeType:null,i=n?n.mimeType:null,o=t?t.codecs:null,s=n?n.codecs:null,a=t?t.groupId:null,u=[];n&&u.push(n.mimeType),t&&u.push(t.mimeType),u=u[0]||null;var l=[];t&&l.push(t.kind),n&&l.push(n.kind),l=l[0]||null;var h=new Set;if(t)for(var g=d(t.roles),m=g.next();!m.done;m=g.next())h.add(m.value);if(n)for(g=d(n.roles),m=g.next();!m.done;m=g.next())h.add(m.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,videoLabel:null,kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:u,audioMimeType:r,videoMimeType:i,codecs:"",audioCodec:o,videoCodec:s,primary:e.primary,roles:Array.from(h),audioRoles:null,videoRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:a,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null,e.colorGamut=n.colorGamut||null,e.videoLayout=n.videoLayout||null,e.videoRoles=n.roles,e.videoLabel=n.label,(r=n.dependencyStream)&&(e.width=r.width||e.width,e.height=r.height||e.height,e.videoCodec=r.codecs||e.videoCodec,e.pixelAspectRatio=r.pixelAspectRatio||e.pixelAspectRatio,e.videoBandwidth&&r.bandwidth&&(e.videoBandwidth+=r.bandwidth)),s.includes(","))){e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage,e.audioMimeType=i,i=s.split(",");try{e.videoCodec=Ss("video",i),e.audioCodec=Ss("audio",i)}catch{}}return t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage,i=t.dependencyStream)&&(e.audioCodec=i.codecs||e.audioCodec,e.audioBandwidth&&i.bandwidth&&(e.audioBandwidth+=i.bandwidth)),n&&!e.videoBandwidth&&(t?e.audioBandwidth&&(e.videoBandwidth=e.bandwidth-e.audioBandwidth):e.videoBandwidth=e.bandwidth),t&&!e.audioBandwidth&&(n?e.videoBandwidth&&(e.audioBandwidth=e.bandwidth-e.videoBandwidth):e.audioBandwidth=e.bandwidth),t=[],e.videoCodec&&t.push(e.videoCodec),e.audioCodec&&t.push(e.audioCodec),e.codecs=t.join(", "),e}function ur(e){return{id:e.id,active:!1,type:Bt,bandwidth:e.bandwidth||0,language:e.language,label:e.label,kind:e.kind||null,mimeType:e.mimeType,codecs:e.codecs||null,primary:e.primary,roles:e.roles,accessibilityPurpose:e.accessibilityPurpose,forced:e.forced,originalTextId:e.originalId,originalLanguage:e.originalLanguage}}function si(e){var t=e.width||null,n=e.height||null,r=null;e.segmentIndex&&(r=ks(e.segmentIndex));var i=e.tilesLayout;return r&&(i=r.tilesLayout||i),i&&t!=null&&(t/=Number(i.split("x")[0])),i&&n!=null&&(n/=Number(i.split("x")[1])),{id:e.id,type:"image",bandwidth:e.bandwidth||0,width:t,height:n,mimeType:e.mimeType,codecs:e.codecs||null,tilesLayout:i||null,originalImageId:e.originalId}}function Ti(e){return e.__shaka_id||(e.__shaka_id=cA++),e.__shaka_id}function pu(e){var t={id:Ti(e),active:e.mode!="disabled",type:Bt,bandwidth:0,language:bn(e.language||"und"),label:e.label,kind:e.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:e.kind=="forced",originalTextId:e.id,originalLanguage:e.language};return e.kind=="captions"&&(t.mimeType="unknown"),e.kind=="subtitles"&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),t}function _s(e,t){var n=e?e.language:null;if(n={id:Ti(e||t),active:e?e.enabled:t.selected,type:"variant",bandwidth:0,language:bn(n||"und"),label:e?e.label:null,videoLabel:null,kind:e?e.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:e?e.kind=="main":!1,roles:[],forced:!1,audioRoles:null,videoRoles:null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:t?t.id:null,originalAudioId:e?e.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:n},e&&e.kind&&(n.roles=[e.kind],n.audioRoles=[e.kind]),e&&e.configuration&&(e.configuration.codec&&(n.audioCodec=e.configuration.codec,n.codecs=n.audioCodec),e.configuration.bitrate&&(n.audioBandwidth=e.configuration.bitrate,n.bandwidth+=n.audioBandwidth),e.configuration.sampleRate&&(n.audioSamplingRate=e.configuration.sampleRate),e.configuration.numberOfChannels&&(n.channelsCount=e.configuration.numberOfChannels)),t&&t.configuration&&(t.configuration.codec&&(n.videoCodec=t.configuration.codec,n.codecs=n.codecs?n.codecs+(","+n.videoCodec):n.videoCodec),t.configuration.bitrate&&(n.videoBandwidth=t.configuration.bitrate,n.bandwidth+=n.videoBandwidth),t.configuration.framerate&&(n.frameRate=t.configuration.framerate),t.configuration.width&&(n.width=t.configuration.width),t.configuration.height&&(n.height=t.configuration.height),t.configuration.colorSpace&&t.configuration.colorSpace.transfer))switch(t.configuration.colorSpace.transfer){case"pq":n.hdr="PQ";break;case"hlg":n.hdr="HLG";break;case"bt709":n.hdr="SDR"}return n}function aa(e){return e.allowedByApplication&&e.allowedByKeySystem&&e.disabledUntilTime==0}function Uu(e){return e.filter(function(t){return aa(t)})}function _e(e,t,n,r){var i=e,o=e.filter(function(u){return u.primary});o.length&&(i=o);var s=i.length?i[0].language:"";if(i=i.filter(function(u){return u.language==s}),t){var a=x(bn(t),e.map(function(u){return u.language}));a&&(i=e.filter(function(u){return bn(u.language)==a}))}if(i=i.filter(function(u){return u.forced==r}),n){if(e=et(i,n),e.length)return e}else if(e=i.filter(function(u){return u.roles.length==0}),e.length)return e;return e=i.map(function(u){return u.roles}).reduce(jh,[]),e.length?et(i,e[0]):i}function et(e,t){return e.filter(function(n){return n.roles.includes(t)})}function gt(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),t}function rn(e,t){t.length&&(t=t.filter(function(n){return ii(e.codecs)==ii(n.codecs)}).sort(function(n,r){return n.bandwidth&&r.bandwidth&&n.bandwidth!=r.bandwidth?n.bandwidth-r.bandwidth:(n.width||0)-(r.width||0)}),e.trickModeVideo=t[0],t.length>1&&(t=t.find(function(n){return e.width==n.width&&e.height==n.height})))&&(e.trickModeVideo=t)}function ir(e){return e.type=="audio"?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:e.type=="video"?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}function Li(e,t,n){if(n.autoShowText==0)return!1;if(n.autoShowText==1)return!0;var r=bn(n.preferredTextLanguage);return t=bn(t.language),n.autoShowText==2?ba(t,r):n.autoShowText==3?e?(e=bn(e.language),ba(t,r)&&!ba(e,t)):!1:(ut("Invalid autoShowText setting!"),!1)}function Rv(e){var t={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};e=d(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var r={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:n?yi(n):"",codecs:n?Si(n):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};r.fullMimeTypes.add(ar(r.mimeType,r.codecs)),n.startsWith("audio/")?(r.type="audio",t.audio=r):t.video=r}return t}Re("shaka.util.StreamUtils",_),_.meetsRestrictions=Oe;var cf=new Map,cA=0,ff=new Map().set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),fA=new Map().set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Tr(){var e=this;this.G=null,this.H=!1,this.u=new Xt,this.j=new Et,navigator.connection&&navigator.connection.addEventListener&&this.j.F(navigator.connection,"change",function(){e.g.useNetworkInformation&&navigator.onLine&&(e.u=new Xt,e.g&&e.u.configure(e.g.advanced),e.trySuggestStreams())}),this.l=[],this.I=1,this.J=!1,this.h=this.o=this.g=this.B=null,this.m=new Yt(function(){if(e.H&&(e.g.restrictToElementSize||e.g.restrictToScreenSize)){var t=e.chooseVariant();t&&e.G&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.C=R,"documentPictureInPicture"in R&&this.j.F(R.documentPictureInPicture,"enter",function(){e.C=R.documentPictureInPicture.window,e.m&&e.m.xb(),e.j.Aa(e.C,"pagehide",function(){e.C=R,e.m&&e.m.xb()})}),this.D=this.i=null}f=Tr.prototype,f.stop=function(){this.G=null,this.H=!1,this.l=[],this.I=1,this.o=this.B=null,this.h&&(this.h.disconnect(),this.h=null),this.m&&this.m.stop(),this.D=this.i=null},f.release=function(){this.stop(),this.j.release(),this.m=null},f.init=function(e){this.G=e},f.chooseVariant=function(e){e=e===void 0?!1:e;var t=1/0,n=1/0;if(this.g.restrictToScreenSize&&(n=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio,t=this.C.screen.height*n,n*=this.C.screen.width),this.h&&this.g.restrictToElementSize){var r=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio,i=this.o.clientHeight,o=this.o.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.o&&(i=this.i.height,o=this.i.width),t=Math.min(t,i*r),n=Math.min(n,o*r)}if(i=this.l.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)}),i.length||(i=this.l),r=i,e&&i.length!=this.l.length&&(r=this.l.filter(function(l){return l&&!!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)})),e=Uh(this,this.g.restrictions,r,1/0,1/0),t!=1/0||n!=1/0){for(e=dA(e),e=d(e),i=e.next();!i.done;i=e.next())if(i=i.value,i.height>=t&&i.width>=n){t=i.height,n=i.width;break}e=Uh(this,this.g.restrictions,r,t,n)}for(t=this.getBandwidthEstimate(),r.length&&!e.length&&(e=Uh(this,null,r,1/0,1/0),e=[e[0]]),n=e[0]||null,r=0;r<e.length;r++){i=e[r];var s=isNaN(this.I)?1:Math.abs(this.I);o=s*i.bandwidth/this.g.bandwidthDowngradeTarget;for(var a={bandwidth:1/0},u=r+1;u<e.length;u++)if(i.bandwidth!=e[u].bandwidth){a=e[u];break}s=s*a.bandwidth/this.g.bandwidthUpgradeTarget,n&&i&&t>=o&&t<=s&&(n.bandwidth!=i.bandwidth||n.bandwidth==i.bandwidth&&n.video&&i.video&&(n.video.width<i.video.width||n.video.height<i.video.height))&&(n=i)}return this.B=Date.now(),n},f.enable=function(){this.H=!0,this.l.length&&this.trySuggestStreams()},f.disable=function(){this.H=!1},f.segmentDownloaded=function(e,t,n,r){var i=e;this.g.removeLatencyFromFirstPacketTime&&r&&r.packetNumber===1&&r.timeToFirstByte&&(i=e-r.timeToFirstByte),i>=this.g.cacheLoadThreshold&&this.u.sample(i,t),n&&this.B!=null&&this.H&&bv(this)},f.trySuggestStreams=function(){this.H&&(this.B=Date.now(),bv(this,!0))},f.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=navigator.connection.downlink*1e6),navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth?e:(e=this.u.getBandwidthEstimate(e),this.D?this.D.getBandwidthEstimate(e):e)},f.setVariants=function(e){return Sn(e,this.l)?!1:(this.l=e,!0)},f.playbackRateChanged=function(e){this.I=e},f.setMediaElement=function(e){function t(){n.m.ka(hA)}var n=this;this.o=e,this.h&&(this.h.disconnect(),this.h=null),this.o&&"ResizeObserver"in R&&(this.h=new ResizeObserver(t),this.h.observe(this.o)),this.j.F(e,"enterpictureinpicture",function(r){r.pictureInPictureWindow&&(n.i=r.pictureInPictureWindow,n.j.F(n.i,"resize",t))}),this.j.F(e,"leavepictureinpicture",function(){n.i&&n.j.Na(n.i,"resize",t),n.i=null})},f.setCmsdManager=function(e){this.D=e},f.configure=function(e){this.g=e,this.u&&this.g&&this.u.configure(this.g.advanced)};function bv(e,t){if(t===void 0||!t){if(!e.J){if(t=e.u,!(t.g>=t.i))return;e.J=!0,e.B-=(e.g.switchInterval-e.g.minTimeToSwitch)*1e3}if(Date.now()-e.B<e.g.switchInterval*1e3)return}t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.G&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}function Uh(e,t,n,r,i){if(e.D){var o=e.D.di();o&&(n=n.filter(function(s){return s.bandwidth&&o?s.bandwidth<=o:!0}))}return t&&(n=n.filter(function(s){return Oe(s,t,{width:i,height:r})})),n.sort(function(s,a){return s.bandwidth-a.bandwidth})}function dA(e){var t=[];e=d(e);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&(n=n.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(r,i){return r.width-i.width})}Re("shaka.abr.SimpleAbrManager",Tr),Tr.prototype.configure=Tr.prototype.configure,Tr.prototype.setCmsdManager=Tr.prototype.setCmsdManager,Tr.prototype.setMediaElement=Tr.prototype.setMediaElement,Tr.prototype.playbackRateChanged=Tr.prototype.playbackRateChanged,Tr.prototype.setVariants=Tr.prototype.setVariants,Tr.prototype.getBandwidthEstimate=Tr.prototype.getBandwidthEstimate,Tr.prototype.trySuggestStreams=Tr.prototype.trySuggestStreams,Tr.prototype.segmentDownloaded=Tr.prototype.segmentDownloaded,Tr.prototype.disable=Tr.prototype.disable,Tr.prototype.enable=Tr.prototype.enable,Tr.prototype.chooseVariant=Tr.prototype.chooseVariant,Tr.prototype.init=Tr.prototype.init,Tr.prototype.release=Tr.prototype.release,Tr.prototype.stop=Tr.prototype.stop;var hA=1;function Dv(e,t){var n=fs();this.l=e.maxAttempts==null?n.maxAttempts:e.maxAttempts,this.j=e.baseDelay==null?n.baseDelay:e.baseDelay,this.o=e.fuzzFactor==null?n.fuzzFactor:e.fuzzFactor,this.m=e.backoffFactor==null?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=t===void 0?!1:t)&&(this.g=1)}function Ov(e){var t,n;return H(function(r){if(r.h==1){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new fe(2,7,1010);return t=e.g,e.g++,t==0?r.return():(n=e.h*(1+(Math.random()*2-1)*e.o),r.g(new Promise(function(i){new Yt(i).ka(n/1e3)}),2))}e.h*=e.m,r.j()})}function fs(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function zn(){var e,t,n=new Promise(function(r,i){e=r,t=i});return n.resolve=e,n.reject=t,n}zn.prototype.resolve=function(){},zn.prototype.reject=function(){};function br(e,t){this.promise=e,this.i=t,this.g=null}function Da(e){return new br(Promise.reject(e),function(){return Promise.resolve()})}function Bh(){var e=Promise.reject(new fe(2,7,7001));return e.catch(function(){}),new br(e,function(){return Promise.resolve()})}function Bu(e){return new br(Promise.resolve(e),function(){return Promise.resolve()})}function Nv(e){return new br(e,function(){return e.catch(function(){})})}br.prototype.abort=function(){return this.g||(this.g=this.i()),this.g};function Lv(e){return new br(Promise.all(e.map(function(t){return t.promise})),function(){return Promise.all(e.map(function(t){return t.abort()}))})}br.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},br.prototype.Xa=function(e,t){function n(a){return function(u){if(i.g&&a)o.reject(s);else{var l=a?e:t;l?r=pA(l,u,o):(a?o.resolve:o.reject)(u)}}}function r(){return o.reject(s),i.abort()}var i=this,o=new zn;o.catch(function(){});var s=new fe(2,7,7001);return this.promise.then(n(!0),n(!1)),new br(o,function(){return r()})};function pA(e,t,n){try{var r=e(t);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Promise.resolve(r).then(function(){},function(){})})}catch(i){return n.reject(i),function(){return Promise.resolve()}}}w.Object.defineProperties(br.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}}),Re("shaka.util.AbortableOperation",br),br.prototype.chain=br.prototype.Xa,br.prototype.finally=br.prototype.finally,br.all=Lv,br.prototype.abort=br.prototype.abort,br.notAbortable=Nv,br.completed=Bu,br.aborted=Bh,br.failed=Da;function yt(e,t){if(t)if(t instanceof Map)for(var n=d(t.keys()),r=n.next();!r.done;r=n.next())r=r.value,Object.defineProperty(this,r,{value:t.get(r),writable:!0,enumerable:!0});else for(n in t)Object.defineProperty(this,n,{value:t[n],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=R.performance&&R.performance.now?R.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function jv(e){var t=new yt(e.type),n;for(n in e)Object.defineProperty(t,n,{value:e[n],writable:!0,enumerable:!0});return t}yt.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},yt.prototype.stopImmediatePropagation=function(){this.g=!0},yt.prototype.stopPropagation=function(){},Re("shaka.util.FakeEvent",yt);var df={ul:"abrstatuschanged",vl:"adaptation",wl:"audiotrackchanged",xl:"audiotrackschanged",yl:"boundarycrossed",zl:"buffering",Al:"canupdatestarttime",Bl:"complete",Cl:"currentitemchanged",Dl:"downloadcompleted",El:"downloadfailed",Fl:"downloadheadersreceived",Gl:"drmsessionupdate",Hl:"emsg",Nl:"itemsinserted",Ol:"itemsremoved",dm:"prft",Error:"error",Il:"expirationupdated",Jl:"firstquartile",Kl:"gapjumped",Pl:"keystatuschanged",Sl:"loaded",Tl:"loading",Vl:"manifestparsed",Wl:"manifestupdated",Xl:"mediaqualitychanged",Yl:"mediasourcerecovered",Zl:"metadataadded",Metadata:"metadata",$l:"midpoint",am:"nospatialvideoinfo",bm:"onstatechange",fm:"ratechange",im:"segmentappended",jm:"sessiondata",lm:"spatialvideoinfo",nm:"stalldetected",om:"started",pm:"statechanged",qm:"streaming",rm:"textchanged",sm:"texttrackvisibility",tm:"thirdquartile",um:"timelineregionadded",vm:"timelineregionenter",wm:"timelineregionexit",xm:"trackschanged",zm:"unloading",Bm:"variantchanged"};function _n(){this.ab=new Tt,this.Ce=this}_n.prototype.addEventListener=function(e,t){this.ab&&this.ab.push(e,t)},_n.prototype.removeEventListener=function(e,t){this.ab&&this.ab.remove(e,t)},_n.prototype.dispatchEvent=function(e){if(!this.ab)return!0;var t=this.ab.get(e.type)||[],n=this.ab.get("All");for(n&&(t=t.concat(n)),t=d(t),n=t.next();!n.done;n=t.next()){n=n.value,e.target=this.Ce,e.currentTarget=this.Ce;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch{}if(e.g)break}return e.defaultPrevented},_n.prototype.release=function(){this.ab=null};function Vu(){this.g=[]}function gu(e,t){e.g.push(t.finally(function(){$t(e.g,t)}))}Vu.prototype.destroy=function(){for(var e=[],t=d(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)};function lr(e,t,n,r,i,o,s){_n.call(this),this.i=null,this.j=!1,this.u=new Vu,this.g=new Set,this.h=new Set,this.o=e||null,this.m=t||null,this.B=n||null,this.C=r||null,this.D=i||null,this.H=o||null,this.G=s||null,this.l=new Map}P(lr,_n),f=lr.prototype,f.configure=function(e){this.i=e};function ua(e,t,n,r){r=r===void 0?!1:r,n=n||_v;var i=pf.get(e);(!i||n>=i.priority)&&pf.set(e,{priority:n,wf:t,Gk:r})}function Fv(e,t){for(var n=d(e.g),r=n.next();!r.done;r=n.next())t.g.add(r.value);for(e=d(e.h),n=e.next();!n.done;n=e.next())t.h.add(n.value)}f.Jk=function(e){this.g.add(e)},f.il=function(e){this.g.delete(e)},f.sj=function(){this.g.clear()},f.Kk=function(e){this.h.add(e)},f.jl=function(e){this.h.delete(e)},f.tj=function(){this.h.clear()},f.Sh=function(){this.l.clear()};function jr(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:n===void 0?null:n}}f.destroy=function(){return this.j=!0,this.g.clear(),this.h.clear(),this.l.clear(),_n.prototype.release.call(this),this.u.destroy()},f.request=function(e,t,n){var r=this,i=new Vv;if(this.j){var o=Promise.reject(new fe(2,7,7001));return o.catch(function(){}),new hf(o,function(){return Promise.resolve()},i)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Ki(t.retryParameters):fs(),t.uris=Ki(t.uris),o=gA(this,e,t,n);var s=o.Xa(function(){return Uv(r,e,t,n,new Dv(t.retryParameters,!1),0,null,i)}),a=s.Xa(function(m){return mA(r,e,m,n)}),u=Date.now(),l=0;o.promise.then(function(){l=Date.now()-u},function(){});var h=0;s.promise.then(function(){h=Date.now()},function(){});var g=a.Xa(function(m){var E=Date.now()-h,A=m.response;return A.timeMs+=l,A.timeMs+=E,m.gk||!r.o||A.fromCache||t.method=="HEAD"||e!=Go||r.o(A.timeMs,A.data.byteLength,Bv(n),t,n),r.G&&r.G(e,A,n),A},function(m){throw m&&(m.severity=2),m});return o=new hf(g.promise,function(){return g.abort()},i),gu(this.u,o),o};function gA(e,t,n,r){function i(a){o=o.Xa(function(){return n.body&&(n.body=Wr(n.body)),a(t,n,r)})}var o=Bu(void 0);e.D&&i(e.D),e=d(e.g);for(var s=e.next();!s.done;s=e.next())i(s.value);return o.Xa(void 0,function(a){throw a instanceof fe&&a.code==7001?a:new fe(2,1,1006,a)})}function Uv(e,t,n,r,i,o,s,a){e.i.forceHTTP&&(n.uris[o]=n.uris[o].replace("https://","http://")),e.i.forceHTTPS&&(n.uris[o]=n.uris[o].replace("http://","https://")),o>0&&e.H&&e.H(t,r,n.uris[o],n.uris[o-1]);var u=new Ct(n.uris[o]),l=u.bc,h=!1;l||(l=location.protocol,l=l.slice(0,-1),ln(u,l),n.uris[o]=u.toString()),l=l.toLowerCase();var g=(l=pf.get(l))?l.wf:null;if(!g)return Da(new fe(2,1,1e3,u));var m=l.Gk;(u=e.l.get(u.Ab))&&(n.headers["common-access-token"]=u);var E=null,A=null,k=!1,b=!1,V;return Nv(Ov(i)).Xa(function(){if(e.j)return Bh();V=Date.now();var B=0;n.requestStartTime=Date.now();var Z=g(n.uris[o],n,t,function(te,le,ie){E&&E.stop(),A&&A.ka(pe/1e3),e.o&&t==Go&&(B++,n.packetNumber=B,e.o(te,le,Bv(r),n,r),h=!0,a.g=ie)},function(te){b=!0,n.timeToFirstByte=Date.now()-n.requestStartTime,e.m&&e.m(te,n,t)},{minBytesForProgressEvents:e.i.minBytesForProgressEvents});if(!m)return Z;var ue=n.retryParameters.connectionTimeout;ue&&(E=new Yt(function(){k=!0,Z.abort()}),E.ka(ue/1e3));var pe=n.retryParameters.stallTimeout;return pe&&(A=new Yt(function(){k=!0,Z.abort()})),Z}).Xa(function(B){E&&E.stop(),A&&A.stop(),B.timeMs==null&&(B.timeMs=Date.now()-V);var Z=B.headers["common-access-token"];if(Z){var ue=new Ct(B.uri);e.l.set(ue.Ab,Z)}return Z={response:B,gk:h},!b&&e.m&&e.m(B.headers,n,t),e.B&&e.B(n,B),Z},function(B){if(E&&E.stop(),A&&A.stop(),e.C){var Z=null,ue=0;B instanceof fe&&(Z=B,B.code==1001&&(ue=B.data[1])),e.C(n,Z,ue,k)}if(e.j)return Bh();if(k&&(B=new fe(1,1,1003,n.uris[o],t)),B instanceof fe){if(B.code==7001)throw B;if(B.code==1010)throw s;if(B.severity==1){if(Z=new Map().set("error",B),Z=new yt("retry",Z),Z.cancelable=!0,e.dispatchEvent(Z),Z.defaultPrevented)throw B;return o=(o+1)%n.uris.length,Uv(e,t,n,r,i,o,B,a)}}throw B})}function mA(e,t,n,r){var i=Bu(void 0);e=d(e.h);for(var o=e.next(),s={};!o.done;s={Ki:void 0},o=e.next())s.Ki=o.value,i=i.Xa(function(a){return function(){var u=n.response;return u.data&&(u.data=Wr(u.data)),(0,a.Ki)(t,u,r)}}(s));return i.Xa(function(){return n},function(a){var u=2;if(a instanceof fe){if(a.code==7001)throw a;u=a.severity}throw new fe(u,1,1007,a)})}function Bv(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.Qc)return!1}return!0}Re("shaka.net.NetworkingEngine",lr),lr.prototype.request=lr.prototype.request,lr.prototype.destroy=lr.prototype.destroy,lr.makeRequest=jr,lr.defaultRetryParameters=function(){return fs()},lr.prototype.clearCommonAccessTokenMap=lr.prototype.Sh,lr.prototype.clearAllResponseFilters=lr.prototype.tj,lr.prototype.unregisterResponseFilter=lr.prototype.jl,lr.prototype.registerResponseFilter=lr.prototype.Kk,lr.prototype.clearAllRequestFilters=lr.prototype.sj,lr.prototype.unregisterRequestFilter=lr.prototype.il,lr.prototype.registerRequestFilter=lr.prototype.Jk,lr.unregisterScheme=function(e){pf.delete(e)},lr.registerScheme=ua,lr.prototype.configure=lr.prototype.configure;function Vv(){this.g=0}lr.NumBytesRemainingClass=Vv;function hf(e,t,n){br.call(this,e,t),this.h=n}P(hf,br),lr.PendingRequest=hf;var Go=1;lr.RequestType={MANIFEST:0,SEGMENT:Go,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9},lr.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var _v=3;lr.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:_v};var pf=new Map;function _u(e){this.g=!1,this.h=new zn,this.i=e}_u.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then(function(){e.h.resolve()},function(){e.h.resolve()}))};function qn(e,t){if(e.g)throw t instanceof fe&&t.code==7003?t:new fe(2,7,7003,t)}function Vh(e,t){var n=[];e=d(e);for(var r=e.next();!r.done;r=e.next())n.push(t(r.value));return n}function vA(e,t){e=d(e);for(var n=e.next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}function Hu(e){for(var t=new Map,n=d(Object.keys(e)),r=n.next();!r.done;r=n.next())r=r.value,t.set(r,e[r]);return t}function _h(e){var t={};return e.forEach(function(n,r){t[r]=n}),t}function cr(e,t){this.h=gr(e),this.i=t==Hv,this.g=0}f=cr.prototype,f.La=function(){return this.g<this.h.byteLength},f.Qa=function(){return this.g},f.getLength=function(){return this.h.byteLength},f.Z=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch{throw la()}},f.Da=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch{throw la()}},f.W=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch{throw la()}},f.$g=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch{throw la()}},f.yd=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch{throw la()}if(t>2097151)throw new fe(2,3,3001);return this.g+=8,t*4294967296+e},f.Mb=function(e,t){if(this.g+e>this.h.byteLength)throw la();var n=wt(this.h,this.g,e);return this.g+=e,t?new Uint8Array(n):n},f.skip=function(e){if(this.g+e>this.h.byteLength)throw la();this.g+=e},f.Li=function(e){if(this.g<e)throw la();this.g-=e},f.seek=function(e){if(e<0||e>this.h.byteLength)throw la();this.g=e},f.xd=function(){for(var e=this.g;this.La()&&this.h.getUint8(this.g)!=0;)this.g+=1;return e=wt(this.h,e,this.g-e),this.g+=1,Un(e)};function la(){return new fe(2,3,3e3)}Re("shaka.util.DataViewReader",cr),cr.prototype.readTerminatedString=cr.prototype.xd,cr.prototype.seek=cr.prototype.seek,cr.prototype.rewind=cr.prototype.Li,cr.prototype.skip=cr.prototype.skip,cr.prototype.readBytes=cr.prototype.Mb,cr.prototype.readUint64=cr.prototype.yd,cr.prototype.readInt32=cr.prototype.$g,cr.prototype.readUint32=cr.prototype.W,cr.prototype.readUint16=cr.prototype.Da,cr.prototype.readUint8=cr.prototype.Z,cr.prototype.getLength=cr.prototype.getLength,cr.prototype.getPosition=cr.prototype.Qa,cr.prototype.hasMoreData=cr.prototype.La;var Hv=1;cr.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Hv};function Hn(){this.i=new Map,this.h=new Map,this.g=!1}f=Hn.prototype,f.box=function(e,t){return e=Gv(e),this.i.set(e,yA),this.h.set(e,t),this},f.S=function(e,t){return e=Gv(e),this.i.set(e,Kv),this.h.set(e,t),this},f.stop=function(){this.g=!0},f.parse=function(e,t,n){for(e=new cr(e,0),this.g=!1;e.La()&&!this.g;)this.ud(0,e,t,n)},f.ud=function(e,t,n,r){var i=t.Qa();if(r&&i+8>t.getLength())this.g=!0;else{var o=t.W(),s=t.W(),a=mf(s),u=!1;switch(o){case 0:o=t.getLength()-i;break;case 1:if(r&&t.Qa()+8>t.getLength()){this.g=!0;return}o=t.yd(),u=!0}var l=this.h.get(s);if(l){var h=null,g=null;if(this.i.get(s)==Kv){if(r&&t.Qa()+4>t.getLength()){this.g=!0;return}g=t.W(),h=g>>>24,g&=16777215}s=i+o,n&&s>t.getLength()&&(s=t.getLength()),r&&s>t.getLength()?this.g=!0:(s-=t.Qa(),t=s>0?t.Mb(s,!1):new Uint8Array(0),t=new cr(t,0),l({name:a,parser:this,partialOkay:n||!1,stopOnPartial:r||!1,version:h,flags:g,reader:t,size:o,start:i+e,has64BitSize:u}))}else t.skip(Math.min(i+o-t.Qa(),t.getLength()-t.Qa()))}};function Wt(e){for(var t=Oa(e);e.reader.La()&&!e.parser.g;)e.parser.ud(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function ca(e){for(var t=Oa(e),n=e.reader.W(),r=0;r<n&&(e.parser.ud(e.start+t,e.reader,e.partialOkay,e.stopOnPartial),!e.parser.g);r++);}function fo(e){var t=Oa(e);for(e.reader.skip(78);e.reader.La()&&!e.parser.g;)e.parser.ud(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function gf(e){var t=Oa(e);e.reader.skip(8);var n=e.reader.Da();for(e.reader.skip(6),n==2?e.reader.skip(48):e.reader.skip(12),n==1&&e.reader.skip(16);e.reader.La()&&!e.parser.g;)e.parser.ud(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function Gu(e,t){return function(n){e(n.reader.Mb(n.reader.getLength()-n.reader.Qa(),t))}}function Gv(e){var t=0;e=d(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function mf(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function Oa(e){return 8+(e.has64BitSize?8:0)+(e.flags!=null?4:0)}Re("shaka.util.Mp4Parser",Hn),Hn.headerSize=Oa,Hn.typeToString=mf,Hn.allData=Gu,Hn.audioSampleEntry=gf,Hn.visualSampleEntry=fo,Hn.sampleDescription=ca,Hn.children=Wt,Hn.prototype.parseNext=Hn.prototype.ud,Hn.prototype.parse=Hn.prototype.parse,Hn.prototype.stop=Hn.prototype.stop,Hn.prototype.fullBox=Hn.prototype.S,Hn.prototype.box=Hn.prototype.box;var yA=0,Kv=1;function Hh(e){var t=this;this.g=[],this.data=[],new Hn().box("moov",Wt).box("moof",Wt).S("pssh",function(n){if(!(n.version>1)){var r=wt(n.reader.h,-12,n.size);t.data.push(r),n=n.reader.Mb(16,!1),t.g.push(Ao(n))}}).parse(e)}function vf(e,t,n,r){var i=e.length,o=12+t.length+4+i;r>0&&(o+=4+16*n.size);var s=new Uint8Array(o),a=gr(s),u=0;if(a.setUint32(u,o),u+=4,a.setUint32(u,1886614376),u+=4,r<1?a.setUint32(u,0):a.setUint32(u,16777216),u+=4,s.set(t,u),u+=t.length,r>0)for(a.setUint32(u,n.size),u+=4,t=d(n),n=t.next();!n.done;n=t.next())n=os(n.value),s.set(n,u),u+=n.length;return a.setUint32(u,i),s.set(e,u+4),s}function yf(e){var t=this;this.D=e,this.l=this.B=null,this.$=this.T=!1,this.J=0,this.g=null,this.o=new Et,this.i=new Map,this.X=[],this.C=new Map,this.K=!1,this.m=new zn,this.h=null,this.u=function(n){n.severity==2&&t.m.reject(n),e.onError(n)},this.ba=new Map,this.ma=new Map,this.M=new Yt(function(){return kA(t)}),this.P=!1,this.N=[],this.oa=!1,this.G=new Yt(function(){bA(t)}),this.m.catch(function(){}),this.j=new _u(function(){return SA(t)}),this.O=!1,this.H=this.I=null,this.V=function(){return!1}}f=yf.prototype,f.destroy=function(){return this.j.destroy()};function SA(e){return H(function(t){switch(t.h){case 1:return e.o.release(),e.o=null,e.m.reject(),e.G.stop(),e.G=null,e.M.stop(),e.M=null,t.g(Kl(e),2);case 2:if(!e.l){t.A(3);break}return t.m(4),t.g(e.l.setMediaKeys(null),6);case 6:t.o(5);break;case 4:t.l();case 5:e.l=null;case 3:e.g=null,e.B=null,e.C=new Map,e.h=null,e.u=function(){},e.D=null,e.O=!1,e.I=null,t.j()}})}f.configure=function(e,t){this.h=e,t&&(this.V=t),this.G&&this.T&&this.g&&this.G.Ea(this.h.updateExpirationTime)};function TA(e,t,n){return e.$=!0,e.C=new Map,e.P=n,zv(e,t,!1)}function Wv(e,t,n,r){r=r===void 0?!0:r,e.C=new Map,n=d(n);for(var i=n.next();!i.done;i=n.next())e.C.set(i.value,{initData:null,initDataType:null});for(n=d(e.h.persistentSessionsMetadata),i=n.next();!i.done;i=n.next())i=i.value,e.C.set(i.sessionId,{initData:i.initData,initDataType:i.initDataType});return e.P=e.C.size>0,zv(e,t,r)}function EA(e,t,n,r,i,o){var s,a,u,l,h;return H(function(g){return g.h==1?(s=[],o.length&&s.push(o[0].contentType),i.length&&s.push(i[0].contentType),a=function(m){return m=Io(t,m,null),m.licenseServerUri=n,m.serverCertificate=r,m.persistentStateRequired=!0,m.sessionType="persistent-license",m},u=Rv(s),u.video&&(l=a(o[0].encryptionScheme||""),u.video.drmInfos.push(l)),u.audio&&(h=a(i[0].encryptionScheme||""),u.audio.drmInfos.push(h)),g.g(Ze([u],!0,e.O,[]),2)):(qn(e.j),g.return(Jv(e,[u])))})}function zv(e,t,n){var r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue;return H(function(pe){if(pe.h==1){for(ny(e.h.clearKeys,t),r=t.some(function(te){return!!(te.video&&te.video.drmInfos.length||te.audio&&te.audio.drmInfos.length)}),i=Hu(e.h.servers),o=Hu(e.h.advanced||{}),!r&&n&&OA(t,i),s=new WeakSet,a=d(t),u=a.next();!u.done;u=a.next())for(l=u.value,h=ty(l),g=d(h),m=g.next();!m.done;m=g.next())E=m.value,s.has(E)||(s.add(E),LA(E,i,o,e.h.keySystemsMapping));for(A=function(te,le){var ie=[];te=d(te);for(var ve=te.next();!ve.done;ve=te.next()){ve=ve.value;var ce=ve[le]||o.has(ve.keySystem)&&o.get(ve.keySystem)[le]||"";if(ce==""&&Ns(ve.keySystem)&&(le=="audioRobustness"?ce=[e.h.defaultAudioRobustnessForWidevine]:le=="videoRobustness"&&(ce=[e.h.defaultVideoRobustnessForWidevine])),typeof ce=="string")ie.push(ve);else if(Array.isArray(ce)){ce.length===0&&(ce=[""]),ce=d(ce);for(var Ee=ce.next();!Ee.done;Ee=ce.next()){var ye={};ie.push(Object.assign({},ve,(ye[le]=Ee.value,ye)))}}}return ie},k=new WeakSet,b=d(t),V=b.next();!V.done;V=b.next())B=V.value,B.video&&!k.has(B.video)&&(B.video.drmInfos=A(B.video.drmInfos,"videoRobustness"),B.video.drmInfos=A(B.video.drmInfos,"audioRobustness"),k.add(B.video)),B.audio&&!k.has(B.audio)&&(B.audio.drmInfos=A(B.audio.drmInfos,"videoRobustness"),B.audio.drmInfos=A(B.audio.drmInfos,"audioRobustness"),k.add(B.audio));return pe.g(Ze(t,e.P,e.O,e.h.preferredKeySystems),2)}return qn(e.j),Z=r||i.size>0,Z?(ue=Jv(e,t),pe.return(r?ue:ue.catch(function(){}))):(e.T=!0,pe.return(Promise.resolve()))})}function $v(e){var t;return H(function(n){switch(n.h){case 1:if(e.l.mediaKeys)return n.return();if(!e.I){n.A(2);break}return n.g(e.I,3);case 3:return qn(e.j),n.return();case 2:return n.m(4),e.I=e.l.setMediaKeys(e.B),n.g(e.I,6);case 6:n.o(5);break;case 4:t=n.l(),e.u(new fe(2,6,6003,t.message));case 5:qn(e.j),n.j()}})}function xA(e,t){return H(function(n){if(n.h==1)return n.g($v(e),2);Gl(e,t.initDataType,wt(t.initData)),n.j()})}f.Ob=function(e){var t=this,n,r;return H(function(i){if(i.h==1)return t.l===e?i.return():t.B?(t.l=e,t.h.delayLicenseRequestUntilPlayed&&t.o.Aa(t.l,"play",function(){for(var o=d(t.N),s=o.next();!s.done;s=o.next())Wh(t,s.value);t.oa=!0,t.N=[]}),t.l.remote?(t.o.F(t.l.remote,"connect",function(){return Kl(t)}),t.o.F(t.l.remote,"connecting",function(){return Kl(t)}),t.o.F(t.l.remote,"disconnect",function(){return Kl(t)})):"webkitCurrentPlaybackTargetIsWireless"in t.l&&t.o.F(t.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Kl(t)}),t.H=t.g&&t.g.initData.find(function(o){return o.initData.length>0})||null,n=t.g.keySystem,(r=ct().Sg(n))||!t.H&&t.g.keySystem==="com.apple.fps"&&!t.C.size?i.A(2):i.g($v(t),2)):(t.o.Aa(e,"encrypted",function(){t.u(new fe(2,6,6010))}),i.return());Xv(t).catch(function(){}),!r&&(t.H||t.C.size||t.h.parseInbandPsshEnabled)||t.o.F(t.l,"encrypted",function(o){return xA(t,o)}),i.j()})};function wA(e){var t,n,r,i,o;return H(function(s){switch(s.h){case 1:if(!e.B||!e.g)return s.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){s.A(2);break}return t=jr([e.g.serverCertificateUri],e.h.retryParameters),s.m(3),n=e.D.nc.request(5,t,{isPreload:e.V()}),s.g(n.promise,5);case 5:r=s.i,e.g.serverCertificate=wt(r.data),s.o(4);break;case 3:throw i=s.l(),new fe(2,6,6017,i);case 4:if(e.j.g)return s.return();case 2:return!e.g.serverCertificate||!e.g.serverCertificate.length?s.return():(s.m(6),s.g(e.B.setServerCertificate(e.g.serverCertificate),8));case 8:s.o(0);break;case 6:throw o=s.l(),new fe(2,6,6004,o.message)}})}function AA(e,t){var n,r,i;return H(function(o){if(o.h==1)return o.g(Zv(e,t,{initData:null,initDataType:null}),2);if(o.h!=3)return n=o.i,n?(r=[],(i=e.i.get(n))&&(i.Eb=new zn,r.push(i.Eb)),r.push(n.remove()),o.g(Promise.all(r),3)):o.return();e.i.delete(n),o.j()})}function Xv(e){var t,n,r,i,o;return H(function(s){if(s.h==1)return e.C.size?(e.C.forEach(function(a,u){Zv(e,u,a)}),s.g(e.m,3)):s.A(2);if(s.h!=2){if(t=e.g&&e.g.keyIds||new Set([]),t.size>0&&DA(e))return s.return(e.m);e.K=!1,e.m=new zn,e.m.catch(function(){})}for(n=(e.g?e.g.initData:[])||[],r=d(n),i=r.next();!i.done;i=r.next())o=i.value,Gl(e,o.initDataType,o.initData);return Wl(e)&&e.m.resolve(),s.return(e.m)})}function Gl(e,t,n){if(n.length){try{n=e.h.initDataTransform(n,t,e.g)}catch(s){t=s,s instanceof fe||(t=new fe(2,6,6016,s)),e.u(t);return}if(e.h.ignoreDuplicateInitData){var r=e.i.values();r=d(r);for(var i=r.next();!i.done;i=r.next())if(Pr(n,i.value.initData))return;var o=!1;if(e.C.forEach(function(s){!o&&Pr(n,s.initData)&&(o=!0)}),o)return}e.K=!0,e.i.size>0&&Wl(e)&&(e.m.resolve(),e.K=!1,e.m=new zn,e.m.catch(function(){})),MA(e,t,n,e.g.sessionType)}}function Yv(e){return e=e.i.keys(),e=Vh(e,function(t){return t.sessionId}),Array.from(e)}f.Eg=function(){var e=this,t=this.i.keys();return t=Vh(t,function(n){var r=e.i.get(n);return{sessionId:n.sessionId,sessionType:r.type,initData:r.initData,initDataType:r.initDataType}}),Array.from(t)},f.Td=function(){var e=1/0,t=this.i.keys();t=d(t);for(var n=t.next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e};function IA(e){return e.J?e.J:NaN}f.Ve=function(){return _h(this.ma)};function Jv(e,t){var n,r,i,o,s,a,u;return H(function(l){switch(l.h){case 1:if(n=new Map,r=CA(e,t,n),!r)throw navigator.requestMediaKeySystemAccess?new fe(2,6,6001):new fe(2,6,6020);qn(e.j),l.m(2),r.getConfiguration();var h=i=e.h.keySystemsMapping[r.keySystem]||r.keySystem,g=n.get(i),m=[],E=[],A=[],k=[],b=[],V=new Set,B=new Set;NA(g,m,E,k,A,b,V,B);var Z=e.P?"persistent-license":"temporary";for(h={keySystem:h,encryptionScheme:m[0],licenseServerUri:E[0],distinctiveIdentifierRequired:g[0].distinctiveIdentifierRequired,persistentStateRequired:g[0].persistentStateRequired,sessionType:g[0].sessionType||Z,audioRobustness:g[0].audioRobustness||"",videoRobustness:g[0].videoRobustness||"",serverCertificate:k[0],serverCertificateUri:A[0],initData:b,keyIds:V,mediaTypes:g[0].mediaTypes},B.size>0&&(h.keySystemUris=B),g=d(g),B=g.next();!B.done;B=g.next())B=B.value,B.distinctiveIdentifierRequired&&(h.distinctiveIdentifierRequired=B.distinctiveIdentifierRequired),B.persistentStateRequired&&(h.persistentStateRequired=B.persistentStateRequired);if(e.g=h,!e.g.licenseServerUri)throw new fe(2,6,6012,e.g.keySystem);return l.g(r.createMediaKeys(),4);case 4:if(o=l.i,qn(e.j),e.B=o,!(e.h.minHdcpVersion!=""&&"getStatusForPolicy"in e.B)){l.A(5);break}return l.m(6),l.g(e.B.getStatusForPolicy({minHdcpVersion:e.h.minHdcpVersion}),8);case 8:if(s=l.i,s!="usable")throw new fe(2,6,6018);qn(e.j),l.o(5,2);break;case 6:throw a=l.l(2),a instanceof fe?a:new fe(2,6,6019,a.message);case 5:return e.T=!0,e.G.Ea(e.h.updateExpirationTime),l.g(wA(e),9);case 9:qn(e.j),l.o(0);break;case 2:throw u=l.l(),qn(e.j,u),e.g=null,u instanceof fe?u:new fe(2,6,6002,u.message)}})}function CA(e,t,n){for(var r=d(t),i=r.next();!i.done;i=r.next()){i=d(ty(i.value));for(var o=i.next();!o.done;o=i.next())o=o.value,n.has(o.keySystem)||n.set(o.keySystem,[]),n.get(o.keySystem).push(o)}if(n.size==1&&n.has(""))throw new fe(2,6,6e3);r=e.h.preferredKeySystems,r.length||(i=Hu(e.h.servers),i.size==1&&(r=Array.from(i.keys()))),i=d(r);var s=i.next();for(o={};!s.done;o={Fi:void 0},s=i.next()){o.Fi=s.value,s=d(t);for(var a=s.next();!a.done;a=s.next())if(a=a.value.decodingInfos.find(function(g){return function(m){return m.supported&&m.keySystemAccess!=null&&m.keySystemAccess.keySystem==g.Fi}}(o)))return a.keySystemAccess}for(i=d([!0,!1]),o=i.next();!o.done;o=i.next())for(o=o.value,s=d(t),a=s.next();!a.done;a=s.next()){a=d(a.value.decodingInfos);for(var u=a.next();!u.done;u=a.next())if(u=u.value,u.supported&&u.keySystemAccess){var l=u.keySystemAccess.keySystem;if(!r.includes(l)){var h=n.get(l);for(!h&&e.h.keySystemsMapping[l]&&(h=n.get(e.h.keySystemsMapping[l])),l=d(h),h=l.next();!h.done;h=l.next())if(!!h.value.licenseServerUri==o)return u.keySystemAccess}}}return null}function Gh(e){Wl(e)&&e.m.resolve()}function Qv(e,t){new Yt(function(){t.loaded=!0,Gh(e)}).ka(FA)}function Zv(e,t,n){var r,i,o,s,a,u,l;return H(function(h){switch(h.h){case 1:try{r=e.B.createSession("persistent-license")}catch(g){return i=new fe(2,6,6005,g.message),e.u(i),h.return(Promise.reject(i))}return e.o.F(r,"message",function(g){Kh(e)?e.N.push(g):Wh(e,g)}),e.o.F(r,"keystatuseschange",function(g){return qv(e,g)}),o={initData:n.initData,initDataType:n.initDataType,loaded:!1,Vg:1/0,Eb:null,type:"persistent-license"},e.i.set(r,o),h.m(2),h.g(r.load(t),4);case 4:return s=h.i,qn(e.j),s||(e.i.delete(r),a=e.h.persistentSessionOnlinePlayback?1:2,e.u(new fe(a,6,6013)),o.loaded=!0),Qv(e,o),Gh(e),h.return(r);case 2:u=h.l(),qn(e.j,u),e.i.delete(r),l=e.h.persistentSessionOnlinePlayback?1:2,e.u(new fe(l,6,6005,u.message)),o.loaded=!0,Gh(e);case 3:return h.return(Promise.resolve())}})}function MA(e,t,n,r){try{var i=e.B.createSession(r)}catch(o){e.u(new fe(2,6,6005,o.message));return}e.o.F(i,"message",function(o){Kh(e)?e.N.push(o):Wh(e,o)}),e.o.F(i,"keystatuseschange",function(o){return qv(e,o)}),e.i.set(i,{initData:n,initDataType:t,loaded:!1,Vg:1/0,Eb:null,type:r}),e.h.logLicenseExchange&&Ri(n),i.generateRequest(t,n).catch(function(o){if(!e.j.g){e.i.delete(i);var s=o.errorCode;if(s&&s.systemCode){var a=s.systemCode;a<0&&(a+=4294967296),a="0x"+a.toString(16)}e.u(new fe(2,6,6006,o.message,o,a))}})}function Kh(e){return e.l?e.h.delayLicenseRequestUntilPlayed&&e.l.paused&&!e.oa:!e.$&&e.h.delayLicenseRequestUntilPlayed}function PA(e){return H(function(t){return t.h==1?!e.K||Kh(e)?t.A(0):t.g(e.m,3):t.g(Promise.all(e.X.map(function(n){return n.promise})),0)})}function Wh(e,t){var n,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V;H(function(B){switch(B.h){case 1:if(n=t.target,e.h.logLicenseExchange&&Ri(t.message),r=e.i.get(n),i=e.g.licenseServerUri,o=e.h.advanced[e.g.keySystem],t.messageType=="individualization-request"&&o&&o.individualizationServer&&(i=o.individualizationServer),s=jr([i],e.h.retryParameters),s.body=t.message,s.method="POST",s.licenseRequestType=t.messageType,s.sessionId=n.sessionId,s.drmInfo=e.g,r&&(s.initData=r.initData,s.initDataType=r.initDataType),o&&o.headers)for(a in o.headers)s.headers[a]=o.headers[a];if(Bi(e.g.keySystem)){var Z=s,ue=e.g;try{var pe=fi(Z.body);if(pe){var te=JSON.parse(pe);te.type||(te.type=ue.sessionType,Z.body=Vi(JSON.stringify(te)))}}catch{}}if(Eo(e.g.keySystem))if(Z=Zi(s.body,!0,!0),Z.includes("PlayReadyKeyMessage")){for(Z=As(Z,"PlayReadyKeyMessage"),ue=di(Z,"HttpHeader"),ue=d(ue),pe=ue.next();!pe.done;pe=ue.next())te=pe.value,pe=di(te,"name")[0],te=di(te,"value")[0],s.headers[vr(pe)]=vr(te);Z=di(Z,"Challenge")[0],s.body=bi(vr(Z))}else s.headers["Content-Type"]="text/xml; charset=utf-8";return u=Date.now(),B.m(2),h=e.D.nc.request(2,s,{isPreload:e.V()}),e.X.push(h),B.g(h.promise,4);case 4:l=B.i,$t(e.X,h),B.o(3);break;case 2:return g=B.l(),e.j.g||(m={sessionId:n.sessionId,sessionType:r.type,initData:r.initData,initDataType:r.initDataType},E=new fe(2,6,6007,g,m),e.i.size==1?(e.u(E),r&&r.Eb&&r.Eb.reject(E)):(r&&r.Eb&&r.Eb.reject(E),e.i.delete(n),Wl(e)&&(e.m.resolve(),e.M.ka(.1)))),B.return();case 3:return e.j.g?B.return():(e.J+=(Date.now()-u)/1e3,e.h.logLicenseExchange&&Ri(l.data),B.m(5),B.g(n.update(l.data),7));case 7:B.o(6);break;case 5:return k=(A=B.l())&&A.message||String(A),b=new fe(2,6,6008,k),e.u(b),r&&r.Eb&&r.Eb.reject(b),B.return();case 6:if(e.j.g)return B.return();V=new yt("drmsessionupdate"),e.D.onEvent(V),r&&(r.Eb&&r.Eb.resolve(),Qv(e,r)),B.j()}})}function qv(e,t){t=t.target;var n=e.i.get(t),r=!1;t.keyStatuses.forEach(function(o,s){if(typeof s=="string"){var a=s;s=o,o=a}if(a=ct(),Eo(e.g.keySystem)&&s.byteLength==16&&a.Af()){a=gr(s);var u=a.getUint32(0,!0),l=a.getUint16(4,!0),h=a.getUint16(6,!0);a.setUint32(0,u,!1),a.setUint16(4,l,!1),a.setUint16(6,h,!1)}o!="status-pending"&&(n.loaded=!0),o=="expired"&&(r=!0),s=Ao(s).slice(0,32),e.ba.set(s,o)});var i=t.expiration-Date.now();(i<0||r&&i<1e3)&&n&&!n.Eb&&(e.i.delete(t),ey(t)),Wl(e)&&(e.m.resolve(),e.M.ka(UA))}function kA(e){var t=e.ba,n=e.ma;n.clear(),t.forEach(function(r,i){return n.set(i,r)}),t=Array.from(n.values()),t.length&&t.every(function(r){return r=="expired"})&&e.u(new fe(2,6,6014)),e.D.vf(_h(n))}function RA(){var e,t,n,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce,Ee,ye;return H(function(Ve){if(Ve.h==1){if(e="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" "),!(R.MediaKeys&&R.navigator&&R.navigator.requestMediaKeySystemAccess&&R.MediaKeySystemAccess&&R.MediaKeySystemAccess.prototype.getConfiguration)){for(t={},n=d(e),r=n.next();!r.done;r=n.next())i=r.value,t[i]=null;return Ve.return(t)}for(o="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),s=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],a=["150","2000","3000"],u={"com.widevine.alpha":s,"com.widevine.alpha.experiment":s,"com.microsoft.playready.recommendation":a},l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],h=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],g={videoCapabilities:l,audioCapabilities:h,initDataTypes:["cenc","sinf","skd","keyids"]},m=[null,"cenc","cbcs"],E=new Map,A=ct(),k=function(Le,Ce,ke){var Ge,Je,Ft,dt,kn,Ut,Gn,sn,Qt,hn,An,pn,Zt;return H(function(an){switch(an.h){case 1:return an.m(2),an.g(Ce.createMediaKeys(),5);case 5:Ge=an.i;case 4:an.o(3);break;case 2:return an.l(),an.return();case 3:if(Ft=(Je=Ce.getConfiguration().sessionTypes)?Je.includes("persistent-license"):!1,A.xi()&&(Ft=!1),dt=Ce.getConfiguration().videoCapabilities,kn=Ce.getConfiguration().audioCapabilities,Ut={persistentState:Ft,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]},E.get(Le)?Ut=E.get(Le):E.set(Le,Ut),(Gn=dt[0].encryptionScheme)&&!Ut.encryptionSchemes.includes(Gn)&&Ut.encryptionSchemes.push(Gn),(sn=dt[0].robustness)&&!Ut.videoRobustnessLevels.includes(sn)&&Ut.videoRobustnessLevels.push(sn),(Qt=kn[0].robustness)&&!Ut.audioRobustnessLevels.includes(Qt)&&Ut.audioRobustnessLevels.push(Qt),!(ke&&"getStatusForPolicy"in Ge)){an.A(0);break}hn=d(o),An=hn.next();case 7:if(An.done){an.A(0);break}if(pn=An.value,Ut.minHdcpVersions.includes(pn)){an.A(8);break}return an.g(Ge.getStatusForPolicy({minHdcpVersion:pn}),10);case 10:if(Zt=an.i,Zt=="usable")Ut.minHdcpVersions.includes(pn)||Ut.minHdcpVersions.push(pn);else{an.A(0);break}case 8:An=hn.next(),an.A(7)}})},b=function(Le,Ce,ke,Ge,Je){Je=Je===void 0?!1:Je;var Ft,dt,kn,Ut,Gn,sn,Qt,hn,An,pn,Zt;return H(function(an){switch(an.h){case 1:for(an.m(2),Ft=Ki(g),dt=d(Ft.videoCapabilities),kn=dt.next();!kn.done;kn=dt.next())Ut=kn.value,Ut.encryptionScheme=Ce,Ut.robustness=ke;for(Gn=d(Ft.audioCapabilities),sn=Gn.next();!sn.done;sn=Gn.next())Qt=sn.value,Qt.encryptionScheme=Ce,Qt.robustness=Ge;return hn=Ki(Ft),hn.persistentState="required",hn.sessionTypes=["persistent-license"],An=[hn,Ft],Zt=ct(),Zt.Pa()=="MOBILE"?an.g(Fu(5,navigator.requestMediaKeySystemAccess(Le,An)),7):an.g(navigator.requestMediaKeySystemAccess(Le,An),6);case 6:pn=an.i,an.A(5);break;case 7:pn=an.i;case 5:return an.g(k(Le,pn,Je),8);case 8:an.o(0);break;case 2:an.l(),an.j()}})},V=function(Le){return!(ct().Ia()==="WEBKIT"&&Bi(Le))},B=[],Z=d(e),ue=Z.next();!ue.done;ue=Z.next())if(pe=ue.value,E.set(pe,null),V(pe)){for(te=!0,le=d(m),ie=le.next();!ie.done;ie=le.next())ve=ie.value,B.push(b(pe,ve,"","",te)),te=!1;for(ce=d(u[pe]||[]),Ee=ce.next();!Ee.done;Ee=ce.next())ye=Ee.value,B.push(b(pe,null,ye,"")),B.push(b(pe,null,"",ye))}return Ve.g(Promise.all(B),2)}return Ve.return(_h(E))})}function ey(e){return H(function(t){if(t.h==1)return t.m(2),t.g(Fu(jA,Promise.all([e.close().catch(function(){}),e.closed])),4);if(t.h!=2)return t.o(0);t.l(),t.j()})}function Kl(e){var t;return H(function(n){return t=Array.from(e.i.entries()),e.i.clear(),n.g(Promise.all(t.map(function(r){r=d(r);var i=r.next().value,o=r.next().value;return H(function(s){if(s.h==1)return s.m(2),e.$||e.C.has(i.sessionId)||o.type!=="persistent-license"||e.h.persistentSessionOnlinePlayback?s.g(ey(i),5):s.g(i.remove(),5);if(s.h!=2)return s.o(0);s.l(),s.j()})})),0)})}function ty(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function bA(e){e.i.forEach(function(t,n){var r=t.Vg,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(e.D.onExpirationUpdated(n.sessionId,i),t.Vg=i)})}function Wl(e){return e=e.i.values(),vA(e,function(t){return t.loaded})}function DA(e){for(var t=d(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if(e.ba.get(n.value)!=="usable")return!1;return!0}function OA(e,t){var n=[];for(t.forEach(function(r,i){n.push({keySystem:i,licenseServerUri:r,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),e=d(e),t=e.next();!t.done;t=e.next())t=t.value,t.video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}function NA(e,t,n,r,i,o,s,a){var u=[];e=d(e);for(var l=e.next(),h={};!l.done;h={Ma:void 0},l=e.next()){if(h.Ma=l.value,t.includes(h.Ma.encryptionScheme)||t.push(h.Ma.encryptionScheme),h.Ma.keySystem=="org.w3.clearkey"&&h.Ma.licenseServerUri.startsWith("data:application/json;base64,")?u.includes(h.Ma.licenseServerUri)||u.push(h.Ma.licenseServerUri):n.includes(h.Ma.licenseServerUri)||n.push(h.Ma.licenseServerUri),i.includes(h.Ma.serverCertificateUri)||i.push(h.Ma.serverCertificateUri),h.Ma.serverCertificate&&(r.some(function(E){return function(A){return Pr(A,E.Ma.serverCertificate)}}(h))||r.push(h.Ma.serverCertificate)),h.Ma.initData){l=d(h.Ma.initData);for(var g=l.next(),m={};!g.done;m={Kg:void 0},g=l.next())m.Kg=g.value,o.some(function(E){return function(A){var k=E.Kg;return A.keyId&&A.keyId==k.keyId?!0:A.initDataType==k.initDataType&&Pr(A.initData,k.initData)}}(m))||o.push(m.Kg)}if(h.Ma.keyIds)for(l=d(h.Ma.keyIds),g=l.next();!g.done;g=l.next())s.add(g.value);if(h.Ma.keySystemUris&&a)for(h=d(h.Ma.keySystemUris),l=h.next();!l.done;l=h.next())a.add(l.value)}if(u.length==1)n.push(u[0]);else if(u.length>0){for(t=[],u=d(u),r=u.next();!r.done;r=u.next())r=R.atob(r.value.split("data:application/json;base64,").pop()),r=JSON.parse(r),t.push.apply(t,M(r.keys));u=JSON.stringify({keys:t}),n.push("data:application/json;base64,"+R.btoa(u))}}function LA(e,t,n,r){var i=e.keySystem;i&&(i!="org.w3.clearkey"||!e.licenseServerUri)&&(t.size&&t.get(i)&&(t=t.get(i),e.licenseServerUri=t),e.keyIds||(e.keyIds=new Set),(n=n.get(i))&&(e.distinctiveIdentifierRequired||(e.distinctiveIdentifierRequired=n.distinctiveIdentifierRequired),e.persistentStateRequired||(e.persistentStateRequired=n.persistentStateRequired),e.serverCertificate||(e.serverCertificate=n.serverCertificate),n.sessionType&&(e.sessionType=n.sessionType),e.serverCertificateUri||(e.serverCertificateUri=n.serverCertificateUri)),r[i]&&(e.keySystem=r[i]),R.cast&&R.cast.__platform__&&i=="com.microsoft.playready"&&(e.keySystem="com.chromecast.playready"))}function ny(e,t){if(e=Hu(e),e.size!=0){e=Ia(e),t=d(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}var jA=1,FA=5,UA=.5;function BA(){this.g=vu,this.j=new Map().set(vu,2).set(mu,1),this.i=0,this.h=-1}function zh(e,t){var n=e.g!==t;return e.g=t,n&&t===vu&&(e.i=Date.now()),n}var mu=0,vu=1;/*
33
+ @license
34
+ Shaka Player
35
+ Copyright 2023 Google LLC
36
+ SPDX-License-Identifier: Apache-2.0
37
+ */function $h(e,t,n){this.h=e,this.i=t,this.g=n}function ry(e,t){return H(function(n){if(n.h==1)return n.g(Ue(e.g,t,e.h.drm.preferredKeySystems,e.h.drm.keySystemsMapping),2);if(e.h.streaming.dontChooseCodecs||X(t,e.h.preferredVideoCodecs,e.h.preferredAudioCodecs,e.h.preferredDecodingAttributes,e.h.preferredTextFormats),!t.variants.some(aa))throw new fe(2,4,4032);return n.return(oy(e,t))})}function iy(e,t){var n=e.h.restrictions;e=e.i;var r=!1;t=d(t.variants);for(var i=t.next();!i.done;i=t.next()){i=i.value;var o=i.allowedByApplication;i.allowedByApplication=Oe(i,n,e),o!=i.allowedByApplication&&(r=!0)}return r}function oy(e,t){var n=iy(e,t);if(t){var r=e.g?e.g.g:null;if(r&&e.g.B){for(var i=new Set,o=d(t.variants),s=o.next();!s.done;s=o.next())s=s.value,s.audio&&i.add(s.audio),s.video&&i.add(s.video);for(i=d(i),o=i.next();!o.done;o=i.next())sy(e,r.keySystem,o.value)}ay(e,t)}return n}function sy(e,t,n){n=d(n.drmInfos);for(var r=n.next();!r.done;r=n.next())if(r=r.value,r.keySystem==t){for(var i=d(r.initData||[]),o=i.next();!o.done;o=i.next())o=o.value,Gl(e.g,o.initDataType,o.initData);i=e.g,i.g&&i.g.mediaTypes!==r.mediaTypes&&(i.g.mediaTypes=r.mediaTypes)}}function ay(e,t){function n(l){if(l&&!a.has(l)&&(a.add(l),l.keyIds.size)){l=d(l.keyIds);for(var h=l.next();!h.done;h=l.next()){h=h.value;var g=r[i?"00":h];g?uy.includes(g)&&s.add(g):o.add(h)}}}var r=e.g?e.g.Ve():{};e=Object.keys(r);var i=e.length&&e[0]=="00";e=!1;var o=new Set,s=new Set,a=new WeakSet;t=d(t.variants);for(var u=t.next();!u.done;u=t.next()){if(u=u.value,!u.allowedByApplication)e=!0;else if(u.allowedByKeySystem)return;n(u.audio),n(u.video)}throw e={hasAppRestrictions:e,missingKeys:Array.from(o),restrictedKeyStatuses:Array.from(s)},new fe(2,4,4012,e)}var uy=["output-restricted","internal-error"];Re("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function ji(e){if(Xh.has(e))return Xh.get(e);var t=R.ManagedMediaSource||R.MediaSource;return t?(t=t.isTypeSupported(e),Xh.set(e,t),t):!1}function ly(){var e=R.ManagedMediaSource||R.MediaSource;return e&&e.prototype?!!e.prototype.setLiveSeekableRange&&!!e.prototype.clearLiveSeekableRange:!1}var Xh=new Map;function Sf(e,t){var n=null,r=null,i=null,o=null,s=e.W();return t&1&&(i=e.yd()),t&2&&(o=e.W()),t&8&&(n=e.W()),t&16&&(r=e.W()),{trackId:s,Qd:n,Rd:r,oj:i,Mi:o}}function Tf(e,t){return t==1?(t=e.W(),e=e.W(),{baseMediaDecodeTime:t*4294967296+e}):{baseMediaDecodeTime:e.W()}}function Ef(e,t){return t==1?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.W(),e.skip(4),e=e.Da(),{timescale:t,language:String.fromCharCode((e>>10)+96)+String.fromCharCode(((e&960)>>5)+96)+String.fromCharCode((e&31)+96)}}function xf(e,t,n){var r=e.W(),i=[],o=null;n&1&&(o=e.$g()),n&4&&e.skip(4);for(var s=0;s<r;s++){var a={kh:null,sampleSize:null,Bf:null};n&256&&(a.kh=e.W()),n&512&&(a.sampleSize=e.W()),n&1024&&e.skip(4),n&2048&&(a.Bf=t==0?e.W():e.$g()),i.push(a)}return{Fm:r,jh:i,kg:o}}function cy(e){e.skip(6),e.skip(2),e.skip(8);var t=e.Da();return e.skip(2),e.skip(2),e.skip(2),e=e.Da()+e.Da()/65536,{channelCount:t,sampleRate:e}}function Yh(e){return e=e.W(),{codec:mf(e)}}function VA(e){var t=null,n=null,r=e.Mb(4,!1),i=String.fromCharCode(r[0]);if(i+=String.fromCharCode(r[1]),i+=String.fromCharCode(r[2]),i+=String.fromCharCode(r[3]),i==="nclx"){switch(e.Da()){case 1:case 5:case 6:case 7:t="srgb";break;case 9:t="rec2020";break;case 11:case 12:t="p3"}switch(r=e.Da(),e.Da(),r){case 1:case 6:case 13:case 14:case 15:n="SDR";break;case 16:n="PQ";break;case 18:n="HLG"}}return{colorGamut:t,re:n}}function zl(e,t){return t=t===void 0?!1:t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function ho(e){return(e<10?"0":"")+e}function Ku(e){this.g=e=e===void 0?[]:e}function Wu(e){if(e.g.length===0)throw Error("StreamInfos must have elements");for(var t=[],n=d(e.g),r=n.next();!r.done;r=n.next()){var i=t,o=i.push,s=r.value;r=dn;var a=s.id+1,u=s.stream.width||0,l=s.stream.height||0;s.type=="audio"&&(l=u=0);var h=s.duration*s.timescale,g=Math.floor(h/(Na+1));switch(h=Math.floor(h%(Na+1)),a=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(M(yr(a,4)),[0,0,0,0],M(yr(g,4)),M(yr(h,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],M(yr(u,2)),[0,0],M(yr(l,2)),[0,0])),a=dn("tkhd",a),u=dn,g=s.duration*s.timescale,l=Math.floor(g/(Na+1)),g=Math.floor(g%(Na+1)),h=s.stream.language,h=h.charCodeAt(0)-96<<10|h.charCodeAt(1)-96<<5|h.charCodeAt(2)-96,l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(M(yr(s.timescale,4)),M(yr(l,4)),M(yr(g,4)),M(yr(h,2)),[0,0])),l=dn("mdhd",l),g=s,h=new Uint8Array([]),g.type){case"video":h=HA.value();break;case"audio":h=GA.value()}g=dn("hdlr",h);e:{switch(s.type){case"video":s=dn("minf",dn("vmhd",XA.value()),vy.value(),fy(s));break e;case"audio":s=dn("minf",dn("smhd",YA.value()),vy.value(),fy(s));break e}s=new Uint8Array([])}s=u("mdia",l,g,s),r=r("trak",a,s),o.call(i,r)}for(t=dr.apply(Sr,M(t)),n=e.g[0],i=dn,r=n.duration*n.timescale,o=Math.floor(r/(Na+1)),r=Math.floor(r%(Na+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(M(yr(n.timescale,4)),M(yr(o,4)),M(yr(r,4)),[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])),o=dn("mvhd",o),r=[],e=d(e.g),u=e.next();!u.done;u=e.next())s=r,a=s.push,u=new Uint8Array([0,0,0,0].concat(M(yr(u.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),u=dn("trex",u),a.call(s,u);return e=dr.apply(Sr,M(r)),e=dn("mvex",e),e=i("moov",o,t,e,hy(n.stream)),t=QA.value(),n=new Uint8Array(t.byteLength+e.byteLength),n.set(t),n.set(e,t.byteLength),n}function fy(e){var t=dn,n="aac";e.codecs.includes("mp3")?n="mp3":e.codecs.includes("ac-3")?n=ct().ke()?"ec-3":"ac-3":e.codecs.includes("ec-3")?n="ec-3":e.codecs.includes("opus")&&(n="opus");var r=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){if(n=e.stream.width||0,r=e.stream.height||0,e.Ta.byteLength>0)var i=dn("avcC",e.Ta);else{i=dn;for(var o=7,s=[],a=[],u=0,l=0,h=0,g=0;g<e.yb.length;g++){var m=py(e.yb[g]);switch(m[0]&31){case 7:s.push(m),o+=m.length+2;break;case 8:a.push(m),o+=m.length+2}}for(s.length>0&&(u=s[0][1],h=s[0][2],l=s[0][3]),o=new Uint8Array(o),g=0,o[g++]=1,o[g++]=u,o[g++]=h,o[g++]=l,o[g++]=255,o[g++]=224|s.length,u=0;u<s.length;u++)o[g++]=(s[u].length&65280)>>8,o[g++]=s[u].length&255,o.set(s[u],g),g+=s[u].length;for(o[g++]=a.length,s=0;s<a.length;s++)o[g++]=(a[s].length&65280)>>8,o[g++]=a[s].length&255,o.set(a[s],g),g+=a[s].length;i=i("avcC",o)}n=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].concat(M(yr(n,2)),M(yr(r,2)),[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])),r="avc1",a=dy(e),s=new Uint8Array([]),Su(e.stream)&&(s=yu(e.stream,e.codecs),r="encv"),r=dn(r,n,i,a,s)}else e.codecs.includes("hvc1")&&(r=e.stream.width||0,i=e.stream.height||0,n=new Uint8Array([]),e.Ta.byteLength>0&&(n=dn("hvcC",e.Ta)),r=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].concat(M(yr(r,2)),M(yr(i,2)),[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])),i="hvc1",a=dy(e),s=new Uint8Array([]),Su(e.stream)&&(s=yu(e.stream,e.codecs),i="encv"),r=dn(i,r,n,a,s));break;case"audio":n=="mp3"?e=dn(".mp3",$l(e)):n=="ac-3"?(n=dn("dac3",e.Ha),r="ac-3",i=new Uint8Array([]),Su(e.stream)&&(i=yu(e.stream,e.codecs),r="enca"),e=dn(r,$l(e),n,i)):n=="ec-3"?(n=dn("dec3",e.Ha),r="ec-3",i=new Uint8Array([]),Su(e.stream)&&(i=yu(e.stream,e.codecs),r="enca"),e=dn(r,$l(e),n,i)):n=="opus"?(n=dn("dOps",e.Ha),r="Opus",i=new Uint8Array([]),Su(e.stream)&&(i=yu(e.stream,e.codecs),r="enca"),e=dn(r,$l(e),n,i)):(e.Ha.byteLength>0?n=dn("esds",e.Ha):(n=dn,r=e.id+1,i=e.stream.channelsCount||2,s=e.stream.audioSamplingRate||44100,u=Ss("audio",e.codecs.split(",")),l={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12},a=l[s],(u==="mp4a.40.5"||u==="mp4a.40.29")&&(a=l[s*2]),s=parseInt(u.split(".").pop(),10),r=new Uint8Array([0,0,0,0,3,25].concat(M(yr(r,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,s<<3|a>>>1,a<<7|i<<3,6,1,2])),n=n("esds",r)),r="mp4a",i=new Uint8Array([]),Su(e.stream)&&(i=yu(e.stream,e.codecs),r="enca"),e=dn(r,$l(e),n,i)),r=e}return e=dn("stsd",JA.value(),r),t("stbl",e,dn("stts",KA.value()),dn("stsc",WA.value()),dn("stsz",$A.value()),dn("stco",zA.value()))}function dy(e){if(!e.Za&&!e.$a)return new Uint8Array([]);var t=e.$a;return e=new Uint8Array([].concat(M(yr(e.Za,4)),M(yr(t,4)))),dn("pasp",e)}function $l(e){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.stream.channelsCount||2,0,16,0,0,0,0].concat(M(yr(e.stream.audioSamplingRate||44100,2)),[0,0]))}function hy(e){var t=[];if(!Su(e))return new Uint8Array([]);e=d(e.drmInfos);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.initData){n=d(n.initData);for(var r=n.next();!r.done;r=n.next())t.push(r.value.initData)}return dr.apply(Sr,M(t))}function yu(e,t){var n=dn;t=new Uint8Array([].concat(M(yr(gy(t.split(".")[0]),4)))),t=dn("frma",t);var r="cenc",i=e.drmInfos[0];i&&i.encryptionScheme&&(r=i.encryptionScheme),r=new Uint8Array([0,0,0,0].concat(M(yr(gy(r),4)),[0,1,0,0])),r=dn("schm",r),i=dn;var o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e=d(e.drmInfos);for(var s=e.next();!s.done;s=e.next())if((s=s.value)&&s.keyIds&&s.keyIds.size){s=d(s.keyIds);for(var a=s.next();!a.done;a=s.next())o=py(a.value)}return e=new Uint8Array([0,0,0,0,0,0,1,8]),o=dn("tenc",e,o),n("sinf",t,r,i("schi",o))}function Xl(e){var t=[];e=d(e.g);for(var n=e.next();!n.done;n=e.next()){n=n.value;var r=t.push,i=r.apply,o=dn,s=new Uint8Array([0,0,0,0].concat(M(yr(n.data?n.data.sequenceNumber:0,4))));s=dn("mfhd",s);var a,u=n.data?n.data.sb:[],l=new Uint8Array(4+u.length);for(a=0;a<u.length;a++){var h=u[a].flags;l[a+4]=h.Se<<4|h.df<<2|h.Ze}u=dn("sdtp",l);var g=u.length+32+20+8+16+8+8;l=dn,a=new Uint8Array([0,0,0,58].concat(M(yr(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=dn("tfhd",a),h=n.data?n.data.baseMediaDecodeTime:0;var m=Math.floor(h%(Na+1));h=new Uint8Array([1,0,0,0].concat(M(yr(Math.floor(h/(Na+1)),4)),M(yr(m,4)))),h=dn("tfdt",h);var E=g;g=n.data?n.data.sb:[],m=g.length;var A=12+16*m,k=new Uint8Array(A);for(E+=8+A,k.set([n.type==="video"?1:0,0,15,1].concat(M(yr(m,4)),M(yr(E,4))),0),E=0;E<m;E++){var b=g[E];A=yr(b.duration,4);var V=yr(b.size,4),B=b.flags;b=yr(b.ob,4),k.set([].concat(M(A),M(V),[B.Ng<<2|B.Se,B.df<<6|B.Ze<<4|B.Og,B.Re&61440,B.Re&15],M(b)),12+16*E)}g=dn("trun",k),u=l("traf",a,h,g,u),o=o("moof",s,u),i.call(r,t,[o,_A(n)])}return dr.apply(Sr,M(t))}function _A(e){return e=(e.data?e.data.sb:[]).map(function(t){return t.data}),e=dr.apply(Sr,M(e)),dn("mdat",e)}function yr(e,t){var n=[];for(--t;t>=0;t--)n.push(e>>8*t&255);return n}function py(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[n*2]+e[n*2+1]),16);return t}function gy(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<(e.length-n-1)*8;return t}function dn(e){var t=we.apply(1,arguments),n=my.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],my.set(e,n));for(var r=8,i=t.length-1;i>=0;i--)r+=t[i].byteLength;for(i=new Uint8Array(r),i[0]=r>>24&255,i[1]=r>>16&255,i[2]=r>>8&255,i[3]=r&255,i.set(n,4),n=0,r=8;n<t.length;n++)i.set(t[n],r),r+=t[n].byteLength;return i}function Su(e){return e.encrypted&&e.drmInfos.length>0}var Na=4294967295,my=new Map,HA=new Kt(function(){return 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])}),GA=new Kt(function(){return 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])}),KA=new Kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),WA=new Kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),zA=new Kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),$A=new Kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])}),XA=new Kt(function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}),YA=new Kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),JA=new Kt(function(){return new Uint8Array([0,0,0,0,0,0,0,1])}),QA=new Kt(function(){var e=new Uint8Array([105,115,111,109]),t=new Uint8Array([97,118,99,49]),n=new Uint8Array([0,0,0,1]);return dn("ftyp",e,n,e,t)}),vy=new Kt(function(){var e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);return e=dn("dref",e),dn("dinf",e)});function ZA(e){e=wt(e);var t=null;return new Hn().box("moov",Wt).box("trak",Wt).box("mdia",Wt).box("minf",Wt).box("stbl",Wt).S("stsd",ca).box("enca",function(n){return t=n.reader.h,gf(n)}).box("sinf",Wt).box("frma",function(n){n.parser.stop(),Yh(n.reader).codec==="ec-3"&&t&&t.getUint16(16)!==2&&t.setUint16(16,2)}).parse(e),e}function qA(e,t,n){function r(E){g.push({box:E,zi:1701733217})}function i(E){g.push({box:E,zi:1701733238})}function o(E){u=!0,E.parser.stop()}function s(E){h.push(E),Wt(E)}var a=t=wt(t),u=!1,l,h=[],g=[];if(new Hn().box("moov",s).box("trak",s).box("mdia",s).box("minf",s).box("stbl",s).S("stsd",function(E){l=E,h.push(E),ca(E)}).S("encv",o).S("enca",o).S("dvav",i).S("dva1",i).S("dvh1",i).S("dvhe",i).S("dvc1",i).S("dvi1",i).S("hev1",i).S("hvc1",i).S("avc1",i).S("avc3",i).S("ac-3",r).S("ec-3",r).S("ac-4",r).S("Opus",r).S("fLaC",r).S("mp4a",r).parse(t),u)return t;if(g.length==0||!l)throw Ao(t),new fe(2,3,3019,n);g.reverse(),n=d(g);for(var m=n.next();!m.done;m=n.next())m=m.value,a=nI(e,a,l,m.box,h,m.zi);return a=rI(e,a),ct().gh()?(e=new Uint8Array(t.byteLength+a.byteLength),e.set(a),e.set(t,a.byteLength),e):a}function eI(e){e=wt(e);var t=[];new Hn().box("mdat",function(s){t.push(s)}).parse(e);for(var n=[],r=0;r<t.length;r++){var i=t[r-1],o=t[r];n.push(tI(e.subarray(i?i.start+i.size:0,o.start+o.size)))}return dr.apply(Sr,M(n))}function tI(e){function t(g){s.push(g),Wt(g)}var n,r,i,o,s=[];if(new Hn().box("moof",t).box("traf",t).S("tfhd",function(g){n=g,i=Sf(g.reader,g.flags)}).S("trun",function(g){r=g,o=xf(g.reader,g.version,g.flags)}).parse(e),i&&i.Mi!==2){var a=n.start+Oa(n)+4+(i.oj!==null?8:0),u=gr(e);if(i.Mi!==null)u.setUint32(a,2);else{Yl(e,n.start,n.size+4);var l=u.getUint32(n.start+8);u.setUint32(n.start+8,l|2),o&&o.kg!==null&&u.setInt32(r.start+Oa(r)+4,o.kg+4),l=e.subarray(0,a),u=e.subarray(a),e=new Uint8Array(e.byteLength+4),e.set(l),l=[];for(var h=3;h>=0;h--)l.push(2>>8*h&255);for(e.set(new Uint8Array(l),a),e.set(u,a+4),a=d(s),u=a.next();!u.done;u=a.next())u=u.value,Yl(e,u.start,u.size+4)}}return e}function nI(e,t,n,r,i,o){var s=yu(e,r.name),a=t.subarray(r.start,r.start+r.size);for(e=new Uint8Array(r.size+s.byteLength),e.set(a,0),gr(e).setUint32(4,o),e.set(s,r.size),Yl(e,0,e.byteLength),o=new Uint8Array(t.byteLength+e.byteLength),r=ct().cf()?r.start:r.start+r.size,s=t.subarray(r),o.set(t.subarray(0,r)),o.set(e,r),o.set(s,r+e.byteLength),t=d(i),i=t.next();!i.done;i=t.next())i=i.value,Yl(o,i.start,i.size+e.byteLength);return e=gr(o,n.start),n=Oa(n),t=e.getUint32(n),e.setUint32(n,t+1),o}function rI(e,t){if(e=hy(e),e.byteLength===0)return t;var n=0,r=0;new Hn().box("moov",function(a){n=a.start,r=a.size,a.parser.stop()}).parse(t);var i=n+r;Yl(t,n,r+e.byteLength);var o=new Uint8Array(t.byteLength+e.byteLength),s=t.subarray(i);return o.set(t.subarray(0,i)),o.set(e,i),o.set(s,i+e.byteLength),o}function Yl(e,t,n){e=gr(e,t),t=e.getUint32(0),t!=0&&(t==1?(e.setUint32(8,n>>32),e.setUint32(12,n&4294967295)):e.setUint32(0,n))}function iI(e){function t(i){r.push({start:i.start,size:i.size}),Wt(i)}var n=wt(e),r=[];return new Hn().box("moov",t).box("trak",t).box("mdia",t).box("minf",t).box("stbl",t).box("stsd",function(i){r.push({start:i.start,size:i.size});for(var o=gr(n,i.start),s=0;s<i.size-3;s++){var a=o.getUint32(s);a==1633889587?o.setUint32(s,1700998451):a==1684103987&&o.setUint32(s,1684366131)}}).parse(n),n}function qi(e,t,n,r,i,o,s,a){this.R=e,this.startByte=t,this.endByte=n,this.rd=r===void 0?null:r,this.timescale=i===void 0?null:i,this.h=o===void 0?null:o,this.aesKey=s===void 0?null:s,this.g=this.mimeType=this.codecs=null,this.encrypted=a===void 0?!1:a}qi.prototype.Ec=function(){return this.startByte},qi.prototype.Cc=function(){return this.endByte},qi.prototype.le=function(e){this.h=e},qi.prototype.Ub=function(){return this.h};function Jl(e,t){return e===t?!0:e&&t?e.Ec()==t.Ec()&&e.Cc()==t.Cc()&&Ye(e.R().sort(),t.R().sort())&&Pr(e.Ub(),t.Ub()):e==t}Re("shaka.media.InitSegmentReference",qi),qi.prototype.getEndByte=qi.prototype.Cc,qi.prototype.getStartByte=qi.prototype.Ec;function Rt(e,t,n,r,i,o,s,a,u,l,h,g,m,E,A,k){for(l=l===void 0?[]:l,E=E===void 0?fa:E,this.startTime=e,this.j=this.endTime=t,this.C=n,this.startByte=r,this.endByte=i,this.ea=o,this.timestampOffset=s,this.appendWindowStart=a,this.appendWindowEnd=u,this.g=l,this.tilesLayout=h===void 0?"":h,this.B=g===void 0?null:g,this.h=m===void 0?null:m,this.status=E,this.preload=!1,this.l=!0,this.o=!1,this.aesKey=A===void 0?null:A,this.thumbnailSprite=null,this.i=-1,this.m=k===void 0?!1:k,this.ae=this.Qc=!1,e=d(this.g),t=e.next();!t.done;t=e.next())t.value.ui();this.m&&this.g.length&&this.g[this.g.length-1].ti(),this.u=this.bandwidth=this.mimeType=this.codecs=null,this.D=!1}f=Rt.prototype,f.R=function(){return this.C()},f.getStartTime=function(){return this.startTime},f.Hj=function(){return this.endTime},f.Ec=function(){return this.startByte},f.Cc=function(){return this.endByte};function Jh(e){if(e.endByte)return e.endByte+1-e.startByte;if(e.bandwidth){var t=e.bandwidth*(e.endTime-e.startTime);if(!isNaN(t)&&t>0)return t}if(e.g.length>0&&e.m)for(e=d(e.g),e=e.next();!e.done;e=e.next()){Jh(e.value);break}return null}f.bk=function(){return this.tilesLayout},f.$j=function(){return this.B},f.Vb=function(){return this.status},f.xk=function(){this.status=Sy},f.Rg=function(){this.preload=!0},f.isPreload=function(){return this.preload},f.qd=function(){this.l=!1},f.lk=function(){return this.l},f.ui=function(){this.Qc=!0},f.pk=function(){return this.Qc},f.ti=function(){this.ae=!0},f.nk=function(){return this.ae},f.si=function(){this.o=!0},f.hk=function(){return this.o},f.Hf=function(e){this.thumbnailSprite=e},f.Yj=function(){return this.thumbnailSprite},f.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=d(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},f.Ah=function(e){this.h==null?gn("Sync attempted without sync time!"):(e=this.h-e-this.startTime,Math.abs(e)>=.001&&this.offset(e))},f.le=function(e,t){this.u=e,this.D=t===void 0?!1:t},f.Ub=function(e){var t=this.u;return(e===void 0||e)&&this.D&&(this.u=null),t};function yy(e,t){e.ea=t,e=d(e.g);for(var n=e.next();!n.done;n=e.next())yy(n.value,t)}Re("shaka.media.SegmentReference",Rt),Rt.prototype.getSegmentData=Rt.prototype.Ub,Rt.prototype.setSegmentData=Rt.prototype.le,Rt.prototype.syncAgainst=Rt.prototype.Ah,Rt.prototype.offset=Rt.prototype.offset,Rt.prototype.getThumbnailSprite=Rt.prototype.Yj,Rt.prototype.setThumbnailSprite=Rt.prototype.Hf,Rt.prototype.hasByterangeOptimization=Rt.prototype.hk,Rt.prototype.markAsByterangeOptimization=Rt.prototype.si,Rt.prototype.isLastPartial=Rt.prototype.nk,Rt.prototype.markAsLastPartial=Rt.prototype.ti,Rt.prototype.isPartial=Rt.prototype.pk,Rt.prototype.markAsPartial=Rt.prototype.ui,Rt.prototype.isIndependent=Rt.prototype.lk,Rt.prototype.markAsNonIndependent=Rt.prototype.qd,Rt.prototype.isPreload=Rt.prototype.isPreload,Rt.prototype.markAsPreload=Rt.prototype.Rg,Rt.prototype.markAsUnavailable=Rt.prototype.xk,Rt.prototype.getStatus=Rt.prototype.Vb,Rt.prototype.getTileDuration=Rt.prototype.$j,Rt.prototype.getTilesLayout=Rt.prototype.bk,Rt.prototype.getEndByte=Rt.prototype.Cc,Rt.prototype.getStartByte=Rt.prototype.Ec,Rt.prototype.getEndTime=Rt.prototype.Hj,Rt.prototype.getStartTime=Rt.prototype.getStartTime,Rt.prototype.getUris=Rt.prototype.R;var fa=0,Sy=1;Rt.Status={rl:fa,ym:Sy,Ul:2};function Ql(e){return e.length==1&&e.end(0)-e.start(0)<1e-4}function Ty(e){return!e||Ql(e)?null:e.length==1&&e.start(0)<0?0:e.length?e.start(0):null}function wf(e){return!e||Ql(e)?null:e.length?e.end(e.length-1):null}function Qh(e,t){return!e||!e.length||Ql(e)||t>e.end(e.length-1)?!1:t>=e.start(0)}function Ey(e,t){if(!e||!e.length||Ql(e))return 0;var n=0;e=d(da(e));for(var r=e.next();!r.done;r=e.next()){var i=r.value;r=i.start,i=i.end,i>t&&(n+=i-Math.max(r,t))}return n}function oI(e,t,n){return!e||!e.length||Ql(e)?null:(e=da(e).findIndex(function(r,i,o){return r.start>t&&(i==0||o[i-1].end-t<=n)}),e>=0?e:null)}function da(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function Zh(){}function xy(e,t){var n=document.createElement("source");return n.src=e,n.type=t===void 0?"":t,n}function Af(e){for(var t=!1,n=e.getElementsByTagName("source"),r=n.length-1;r>=0;--r)e.removeChild(n[r]),t=!0;return e.src&&(e.removeAttribute("src"),t=!0),t}function Zl(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function Tu(){return zu||(qh||(qh=new Yt(function(){zu=null})),(zu=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(zu=document.createElement("video")),qh.ka(1),zu)}function sI(e,t){var n,r,i,o,s;return H(function(a){if(a.h==1)return"fonts"in document&&"FontFace"in R?a.g(document.fonts.ready,2):a.return();if(!("entries"in document.fonts))return a.return();for(n=function(u){u=u.entries();for(var l=[],h=u.next();h.done===!1;)l.push(h.value),h=u.next();return l},r=d(n(document.fonts)),i=r.next();!i.done;i=r.next())if(o=i.value,o.family===e&&o.display==="swap")return a.return();s=new FontFace(e,"url("+t+")",{display:"swap"}),document.fonts.add(s),a.j()})}Re("shaka.util.Dom",Zh),Zh.removeAllChildren=Zl,Zh.clearSourceFromVideo=Af;var qh=null,zu=null;/*
38
+ @license
39
+ Shaka Player
40
+ Copyright 2022 Google LLC
41
+ SPDX-License-Identifier: Apache-2.0
42
+ */function ep(){}function wy(e,t){return t+10<=e.length&&e[t]===73&&e[t+1]===68&&e[t+2]===51&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function Ay(e,t){return t+10<=e.length&&e[t]===51&&e[t+1]===68&&e[t+2]===73&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function tp(e,t){var n=(e[t]&127)<<21;return n|=(e[t+1]&127)<<14,n|=(e[t+2]&127)<<7,n|=e[t+3]&127}function aI(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(e.type==="APIC"){if(e.size<2||e.data[0]!==3)return null;var n=e.data.subarray(1).indexOf(0);if(n===-1)return null;var r=Un(wt(e.data,1,n)),i=e.data[2+n],o=e.data.subarray(3+n).indexOf(0);if(o===-1)return null;var s=Un(wt(e.data,3+n,o)),a;return r==="-->"?a=Un(wt(e.data,4+n+o)):a=Wr(e.data.subarray(4+n+o)),t.mimeType=r,t.pictureType=i,t.description=s,t.data=a,t}return e.type==="TXXX"?e.size<2||e.data[0]!==3||(r=e.data.subarray(1).indexOf(0),r===-1)?null:(n=Un(wt(e.data,1,r)),e=Un(wt(e.data,2+r)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="WXXX"?e.size<2||e.data[0]!==3||(r=e.data.subarray(1).indexOf(0),r===-1)?null:(n=Un(wt(e.data,1,r)),e=Un(wt(e.data,2+r)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="PRIV"?e.size<2||(n=e.data.indexOf(0),n===-1)?null:(n=Un(wt(e.data,0,n)),t.description=n,n=="com.apple.streaming.transportStreamTimestamp"?(n=e.data.subarray(n.length+1),e=n[3]&1,n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7],n/=45,e&&(n+=4772185884e-2),t.data=n):(e=Wr(e.data.subarray(n.length+1)),t.data=e),t):e.type[0]==="T"?e.size<2||e.data[0]!==3?null:(e=Un(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):e.type[0]==="W"?(e=Un(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=Wr(e.data),t):null}function Eu(e){for(var t=0,n=[];wy(e,t);){var r=tp(e,t+6);for(e[t+5]>>6&1&&(t+=10),t+=10,r=t+r;t+10<r;){var i=e.subarray(t),o=tp(i,4);i={type:String.fromCharCode(i[0],i[1],i[2],i[3]),size:o,data:i.subarray(10,10+o)},(o=aI(i))&&n.push(o),t+=i.size+10}Ay(e,t)&&(t+=10)}return n}function $u(e,t){for(var n=t=t===void 0?0:t,r=0;wy(e,t);)e[t+5]>>6&1&&(r+=10),r+=10,r+=tp(e,t+6),Ay(e,t+10)&&(r+=10),t+=r;return r>0?e.subarray(n,n+r):new Uint8Array([])}Re("shaka.util.Id3Utils",ep),ep.getID3Data=$u,ep.getID3Frames=Eu;function Xu(e,t,n){return n=n===void 0?Number.EPSILON:n,e===t?!0:(e=Math.abs(e-t),e<=n?!0:n!==Number.EPSILON?Math.abs(e-n)<=Number.EPSILON:!1)}function Iy(e){return new Date(Date.UTC(1900,0,1,0,0,0,0)+e).getTime()}function ha(e,t){if(this.j=e,t!==void 0&&t){t=new Uint8Array(e.byteLength);for(var n=0,r=0;r<e.byteLength;r++)r>=2&&e[r]==3&&e[r-1]==0&&e[r-2]==0||(t[n]=e[r],n++);this.j=wt(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function If(e){var t=e.j.byteLength-e.i,n=Math.min(4,e.i);if(n!==0){for(var r=0,i=0;i<n;i++)r=r<<8|e.j[t+i];e.h=r<<(4-n)*8,e.g=n*8,e.i-=n}}function po(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=n*8,e.g-=n,If(e)}e.h<<=t,e.g-=t}function on(e,t){var n=Math.min(e.g,t),r=e.h>>>32-n;return e.g-=n,e.g>0?e.h<<=n:e.i>0&&If(e),n=t-n,n>0?r<<n|on(e,n):r}function Cy(e){for(var t=0;e.g===0;){if(e.i===0)return t;If(e)}for(;;){var n=Math.clz32(e.h);if(n>e.g&&(n=e.g),t+=n,e.h<<=n,e.g-=n,e.g>0||e.i===0)break;If(e)}return t}function hi(e){po(e,1+Cy(e))}function pt(e){var t=Cy(e);return on(e,t+1)-1}function Yu(e){return e=pt(e),1&e?1+e>>>1:-1*(e>>>1)}function Mt(e){return on(e,1)===1}function Ln(e){return on(e,8)}function Cf(e,t){for(var n=8,r=8,i=0;i<t;i++)r!==0&&(r=Yu(e),r=(n+r+256)%256),n=r===0?n:r}function uI(e){return Ln(e),pt(e),pt(e)}Re("shaka.util.ExpGolomb",ha);function er(){this.I=null,this.J=!1,this.u=this.K=null,this.j=[],this.g=[],this.C=this.D=null,this.i=[],this.h=[],this.G=null,this.l=[],this.B=this.H=this.m=this.o=null}f=er.prototype,f.clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},f.Ff=function(e){this.B!=null&&this.B!=e&&(this.m=this.o=null),this.B=e},f.parse=function(e){if(e.length<564)return this;for(var t=Math.max(0,rp(e)),n=e.length-(e.length+t)%188,r=!1,i=t;i<n;i+=188)if(e[i]==71){var o=!!(e[i+1]&64),s=((e[i+1]&31)<<8)+e[i+2];if((e[i+3]&48)>>4>1){var a=i+5+e[i+4];if(a==i+188)continue}else a=i+4;switch(s){case 0:o&&(a+=e[a]+1),this.I=(e[a+10]&31)<<8|e[a+11];break;case 17:case 8191:break;case this.I:o&&(a+=e[a]+1),o=e,s={audio:-1,video:-1,$e:-1,audioCodec:"",videoCodec:""};var u=a+3+((o[a+1]&15)<<8|o[a+2])-4;for(a+=12+((o[a+10]&15)<<8|o[a+11]);a<u;){var l=(o[a+1]&31)<<8|o[a+2],h=(o[a+3]&15)<<8|o[a+4];switch(o[a]){case 6:if(h>0)for(var g=a+5,m=h;m>2;){var E=o[g+1]+2;switch(o[g]){case 5:var A=g+2;A=o[A]<<24|o[A+1]<<16|o[A+2]<<8|o[A+3],s.audio==-1&&A===1332770163?(s.audio=l,s.audioCodec="opus"):s.video==-1&&A===1096167473&&(s.video=l,s.videoCodec="av1");break;case 106:s.audio==-1&&(s.audio=l,s.audioCodec="ac3");break;case 122:s.audio==-1&&(s.audio=l,s.audioCodec="ec3");break;case 124:s.audio==-1&&(s.audio=l,s.audioCodec="aac");break;case 127:s.audioCodec=="opus"&&(A=null,o[g+2]===128&&(A=o[g+3]),A!=null&&(this.H={channelCount:A&15?A&15:2,rj:A,sampleRate:48e3}))}g+=E,m-=E}break;case 15:s.audio==-1&&(s.audio=l,s.audioCodec="aac");break;case 17:s.audio==-1&&(s.audio=l,s.audioCodec="aac-loas");break;case 21:s.$e==-1&&(s.$e=l);break;case 27:s.video==-1&&(s.video=l,s.videoCodec="avc");break;case 3:case 4:s.audio==-1&&(s.audio=l,s.audioCodec="mp3");break;case 36:s.video==-1&&(s.video=l,s.videoCodec="hvc");break;case 129:s.audio==-1&&(s.audio=l,s.audioCodec="ac3");break;case 132:case 135:s.audio==-1&&(s.audio=l,s.audioCodec="ec3")}a+=h+5}o=s,o.video!=-1&&(this.K=o.video,this.u=o.videoCodec),o.audio!=-1&&(this.D=o.audio,this.C=o.audioCodec),o.$e!=-1&&(this.G=o.$e),r&&!this.J&&(r=!1,i=t-188),this.J=!0;break;case this.K:a=e.subarray(a,i+188),o?this.j.push([a]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(a);break;case this.D:a=e.subarray(a,i+188),o?this.i.push([a]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(a);break;case this.G:a=e.subarray(a,i+188),o?this.l.push([a]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(a);break;default:r=!0}}return this};function np(e,t){if((t[0]<<16|t[1]<<8|t[2])!==1)return null;var n={data:new Uint8Array(0),packetLength:t[4]<<8|t[5],pts:null,dts:null,nalus:[]};if(n.packetLength&&n.packetLength>t.byteLength-6)return null;var r=t[7];if(r&192){var i=(t[9]&14)*536870912+(t[10]&255)*4194304+(t[11]&254)*16384+(t[12]&255)*128+(t[13]&254)/2;e.o==null&&(e.o=i),n.pts=Py(i,e.o),e.o=n.pts,n.dts=n.pts,r&64&&(r=(t[14]&14)*536870912+(t[15]&255)*4194304+(t[16]&254)*16384+(t[17]&255)*128+(t[18]&254)/2,e.m==null&&(e.m=r),n.dts=n.pts!=i?Py(r,e.m):r),e.m=n.dts}return e=t[8]+9,t.byteLength<=e?null:(n.data=t.subarray(e),n)}f.Fk=function(e){return lt("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Xg(e,{ce:null,state:null})},f.Xg=function(e,t){var n=e.pts?e.pts/9e4:null;e=e.data;var r=e.byteLength,i=1;this.u=="hvc"&&(i=2);var o=t.state||0,s=o,a=0,u=[],l=-1,h=0,g=this.u==="hvc";for(o==-1&&(l=0,h=g?e[0]>>1&63:e[0]&31,o=0,a=1);a<r;){var m=e[a++];o?o===1?o=m?0:2:m?m==1?(m=a-o-1,l>=0?u.push({data:e.subarray(l+i,m),fullData:e.subarray(l,m),type:h,time:n,state:null}):(o=u.length?u[u.length-1]:t.ce)&&(s&&a<=4-s&&o.state&&(o.data=o.data.subarray(0,o.data.byteLength-s),o.fullData=o.fullData.subarray(0,o.fullData.byteLength-s)),m>0&&(m=e.subarray(0,m),o.data=dr(o.data,m),o.fullData=dr(o.fullData,m),o.state=0)),a<r?(h=g?e[a]>>1&63:e[a]&31,l=a,o=0):o=-1):o=0:o=3:o=m?0:1}return l>=0&&o>=0&&u.push({data:e.subarray(l+i,r),fullData:e.subarray(l,r),type:h,time:n,state:o}),!u.length&&t.ce&&(n=u.length?u[u.length-1]:t.ce)&&(n.data=dr(n.data,e),n.fullData=dr(n.fullData,e)),t.state=o,u},f.getMetadata=function(){for(var e=[],t=d(this.l),n=t.next();!n.done;n=t.next())n=dr.apply(Sr,M(n.value)),(n=np(this,n))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:Eu(n.data),dts:n.dts,pts:n.pts});return e},f.qb=function(){if(this.i.length&&!this.h.length)for(var e=d(this.i),t=e.next();!t.done;t=e.next()){var n=dr.apply(Sr,M(t.value)),r=np(this,n);t=this.h.length?this.h[this.h.length-1]:null,r&&r.pts!=null&&r.dts!=null&&(!t||t.pts!=r.pts&&t.dts!=r.dts)?this.h.push(r):this.h.length&&(n=r?r.data:n)&&(t=this.h.pop(),t.data=dr(t.data,n),this.h.push(t))}return this.h},f.nd=function(e){if(e=e===void 0?!0:e,this.j.length&&!this.g.length){for(var t=d(this.j),n=t.next();!n.done;n=t.next()){var r=dr.apply(Sr,M(n.value)),i=np(this,r);n=this.g.length?this.g[this.g.length-1]:null,i&&i.pts!=null&&i.dts!=null&&(!n||n.pts!=i.pts&&n.dts!=i.dts)?this.g.push(i):this.g.length&&(r=i?i.data:r)&&(n=this.g.pop(),n.data=dr(n.data,r),this.g.push(n))}if(e){for(t={ce:null,state:null},n=[],r=d(this.g),i=r.next();!i.done;i=r.next())i=i.value,i.nalus=this.Xg(i,t),i.nalus.length&&(n.push(i),t.ce=i.nalus[i.nalus.length-1]);this.g=n}}return e?this.g:(e=this.g,this.g=[],e)},f.getStartTime=function(e){if(e=="audio"){e=null;var t=this.qb();return t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e}return e=="video"?(e=null,t=this.nd(!1),t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},f.Sd=function(){return{audio:this.C,video:this.u}},f.Ye=function(){for(var e=[],t=d(this.nd()),n=t.next();!n.done;n=t.next())e.push.apply(e,M(n.value.nalus));return e},f.ek=function(){lt("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Ig();return{height:e.height,width:e.width}},f.Ig=function(){return this.u=="hvc"?cI(this):lI(this)};function My(e){var t=e.nd();return t.length>1&&(e=t[0].pts,t=t[1].pts,!isNaN(t-e))?String(Math.abs(1/(t-e)*9e4)):null}function lI(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Ye();if(!n.length||(n=n.find(function(E){return E.type==7}),!n))return t;n=new ha(n.data);var r=Ln(n),i=Ln(n),o=Ln(n);if(hi(n),fI.includes(r)){var s=pt(n);if(s===3&&po(n,1),hi(n),hi(n),po(n,1),Mt(n)){s=s!==3?8:12;for(var a=0;a<s;a++)Mt(n)&&(a<6?Cf(n,16):Cf(n,64))}}if(hi(n),s=pt(n),s===0)pt(n);else if(s===1)for(po(n,1),hi(n),hi(n),s=pt(n),a=0;a<s;a++)hi(n);hi(n),po(n,1),s=pt(n),a=pt(n);var u=on(n,1);u===0&&po(n,1),po(n,1);var l=0,h=0,g=0,m=0;return Mt(n)&&(l=pt(n),h=pt(n),g=pt(n),m=pt(n)),t.height=String((2-u)*(a+1)*16-g*2-m*2),t.width=String((s+1)*16-l*2-h*2),t.codec="avc1."+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+o.toString(16).toUpperCase()).slice(-2),t.frameRate=My(e),t}function cI(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Ye();if(!n.length||(n=n.find(function(pe){return pe.type==33}),!n))return t;var r=new ha(n.fullData,!0);Ln(r),Ln(r),on(r,4);var i=on(r,3);Mt(r);var o=on(r,2),s=on(r,1),a=on(r,5),u=on(r,32);n=Ln(r);for(var l=Ln(r),h=Ln(r),g=Ln(r),m=Ln(r),E=Ln(r),A=Ln(r),k=[],b=[],V=0;V<i;V++)k.push(Mt(r)),b.push(Mt(r));if(i>0)for(V=i;V<8;V++)on(r,2);for(V=0;V<i;V++)k[V]&&on(r,88),b[V]&&Ln(r);pt(r),i=pt(r),i==3&&on(r,1),k=pt(r),b=pt(r);var B=V=0,Z=0,ue=0;return Mt(r)&&(V+=pt(r),B+=pt(r),Z+=pt(r),ue+=pt(r)),t.width=String(k-(V+B)*(i===1||i===2?2:1)),t.height=String(b-(Z+ue)*(i===1?2:1)),r=function(pe){for(var te=0,le=0;le<32;le++)te|=(pe>>le&1)<<31-le;return te>>>0}(u),s=s==1?"H":"L",o="hvc1"+("."+["","A","B","C"][o]+a),o+="."+r.toString(16).toUpperCase(),o+="."+s+A,E&&(o+="."+E.toString(16).toUpperCase()),m&&(o+="."+m.toString(16).toUpperCase()),g&&(o+="."+g.toString(16).toUpperCase()),h&&(o+="."+h.toString(16).toUpperCase()),l&&(o+="."+l.toString(16).toUpperCase()),n&&(o+="."+n.toString(16).toUpperCase()),t.codec=o,t.frameRate=My(e),t}function Py(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=n*8589934592;return e}function Ju(e){return!(rp(e)<0)}function rp(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(e[n]==71&&e[n+188]==71&&e[n+376]==71)return n;var r=e.indexOf(71,n+1);n=r>=0&&r<t?r:n+1}return-1}Re("shaka.util.TsParser",er),er.syncOffset=rp,er.probe=Ju,er.prototype.getVideoInfo=er.prototype.Ig,er.prototype.getVideoResolution=er.prototype.ek,er.prototype.getVideoNalus=er.prototype.Ye,er.prototype.getCodecs=er.prototype.Sd,er.prototype.getStartTime=er.prototype.getStartTime,er.prototype.getVideoData=er.prototype.nd,er.prototype.getAudioData=er.prototype.qb,er.prototype.getMetadata=er.prototype.getMetadata,er.prototype.parseNalus=er.prototype.Xg,er.prototype.parseAvcNalus=er.prototype.Fk,er.prototype.parse=er.prototype.parse,er.prototype.setDiscontinuitySequence=er.prototype.Ff,er.prototype.clearData=er.prototype.clearData,er.Timescale=9e4;var fI=[100,110,122,244,44,83,86,118,128,138,139,134];function ky(e,t,n,r,i){var o=this;this.g=e,this.O=n,this.B=r,this.ba=t,this.l=new Map,this.G=new Map,this.Ka=new Map,this.h=null,this.Ga=!1,this.C=i||null,this.m=new Map,this.u=new Et,this.j=new Map,this.K=null,this.M=new zn,this.Ba="",this.ib=!1,this.za=!0,this.N=!1,this.D=this.P=null,this.i=ip(this,this.M),this.Ua=this.I=!1,this.H=new _u(function(){return pI(o)}),this.J=!1,this.T="UNKNOWN",this.eb=this.hb=!1,this.ab=new zn,this.o=!1,this.ya=null,this.$=new Map,this.oa=this.V=this.ua=this.X=null,this.ma=new zn,this.g.remote&&(this.N=this.g.remote.state!="disconnected",this.u.F(this.g.remote,"connect",function(){o.N=o.g.remote.state!="disconnected"}),this.u.F(this.g.remote,"connecting",function(){o.N=o.g.remote.state!="disconnected"}),this.u.F(this.g.remote,"disconnect",function(){o.N=o.g.remote.state!="disconnected"}))}function ip(e,t){if(e.za=!0,R.ManagedMediaSource){e.D||(e.g.disableRemotePlayback=!0);var n=new ManagedMediaSource;e.u.F(n,"startstreaming",function(){e.za=!0}),e.u.F(n,"endstreaming",function(){e.za=!1})}else n=new MediaSource;if(e.u.Aa(n,"sourceopen",function(){URL.revokeObjectURL(e.Ba),t.resolve()}),e.u.Aa(e.g,"playing",function(){e.ib=!0}),e.Ba=up(n),e.B.useSourceElements){e.g.removeAttribute("src");var r;((r=e.P)==null?void 0:r.parentElement)===e.g&&e.g.removeChild(e.P);var i;((i=e.D)==null?void 0:i.parentElement)===e.g&&e.g.removeChild(e.D),e.P=xy(e.Ba),e.g.appendChild(e.P),e.D&&e.g.appendChild(e.D),e.g.load()}else e.g.src=e.Ba;return n}function dI(e,t,n){if(e.g&&R.ManagedMediaSource&&e.i&&e.B.useSourceElements){var r;((r=e.D)==null?void 0:r.parentElement)===e.g&&e.g.removeChild(e.D),e.D=xy(t,n),e.g.appendChild(e.D),e.g.disableRemotePlayback=!1}}function hI(){var e='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.20000000.L153.B0",video/mp4; codecs="hvc1.2.4.L120.b0",video/mp4; codecs="hvc1.2.4.L123.b0",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="av01.0.31M.10.0.111.09.16.09.0",video/mp4; codecs="av01.0.31M.10.0.112.09.18.09.0",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.08.01",video/mp4; codecs="dav1.10.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.03",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(M(Ms)),t={};ct(),e=d(e);for(var n=e.next();!n.done;n=e.next()){if(n=n.value,cu(n))t[n]=!0;else if(Ks()){var r=yi(n),i=ze(Si(n),r);r=ar(r,i),t[n]=ji(r)||!!oa(r)}else t[n]=Tu().canPlayType(n)!="";r=n.split(";")[0],t[r]=t[r]||t[n]}return t}f=ky.prototype,f.destroy=function(){return this.H.destroy()};function pI(e){var t,n,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V;return H(function(B){if(B.h==1){for(t=[],n=d(e.m),r=n.next();!r.done;r=n.next())for(i=r.value,o=d(i),s=o.next().value,a=o.next().value,u=a[0],l=s,e.m.set(l,a.slice(0,1)),u&&t.push(u.p.catch(Fh)),h=d(a.slice(1)),g=h.next();!g.done;g=h.next())m=g.value,m.p.reject(new fe(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),B.g(Promise.all(t),2)}for(E=d(e.j.values()),A=E.next();!A.done;A=E.next())k=A.value,k.destroy();e.u&&(e.u.release(),e.u=null),e.g&&((b=e.D)==null?void 0:b.parentElement)===e.g&&e.g.removeChild(e.D),e.g&&((V=e.P)==null?void 0:V.parentElement)===e.g&&(e.g.removeChild(e.P),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.P=null,e.D=null,e.B=null,e.i=null,e.h=null,e.ba=null,e.l.clear(),e.Ka.clear(),e.j.clear(),e.K=null,e.m.clear(),e.C=null,e.$.clear(),e.O=null,B.j()})}f.init=function(e,t,n,r){t=t===void 0?!1:t,n=n===void 0?"UNKNOWN":n,r=r===void 0?!1:r;var i=this,o,s,a,u,l,h;return H(function(g){if(g.h==1)return o=mr,g.g(i.M,2);if(g.h!=3)return!xu(i)&&!La(i)?g.A(3):(gn("Expected MediaSource to be open during init(); reopening the media source."),i.M=new zn,i.i=ip(i,i.M),g.g(i.M,3));for(i.J=t,i.T=n,i.hb=r,i.eb=!i.J&&i.T=="HLS"&&!i.hb,i.$.clear(),i.X=null,i.ua=null,i.V=null,i.oa=null,i.ma=new zn,s=d(e.keys()),a=s.next();!a.done;a=s.next())u=a.value,l=e.get(u),Mf(i,u,l,l.codecs),i.o?(i.m.set(o.aa,[]),i.m.set(o.wa,[])):i.m.set(u,[]);(h=e.get(o.aa))&&h.isAudioMuxedInVideo&&(i.o=!0),g.j()})};function Mf(e,t,n,r){t=="audio"&&r&&(r=ze(r,n.mimeType)),t=="video"&&r&&n.mimeType=="video/mp4"&&(r=kt(r));var i=ar(n.mimeType,r);if(t==Bt)Pf(e,i,e.J,n.external);else{var o=e.B.forceTransmux;(!ji(i)||!e.J&&Ms.includes(i))&&(o=!0);var s=au(n.mimeType,r);if(o){if(o=ni("audio",(r||"").split(",")),r=ni("video",(r||"").split(",")),o&&r){e.o=!0,Mf(e,"audio",n,o),Mf(e,"video",n,r);return}(r=oa(s))&&(i=r(),e.j.set(t,i),i=i.convertCodecs(t,s))}s=i+e.B.addExtraFeaturesToSourceBuffer(i),qn(e.H);try{var a=e.i.addSourceBuffer(s)}catch(u){throw new fe(2,3,3015,u,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.J&&(a.mode=MI),e.u.F(a,"error",function(){var u=e.m.get(t)[0];u.p.reject(new fe(2,3,3014,e.g.error?e.g.error.code:0,u.uri))}),e.u.F(a,"updateend",function(){return Fa(e,t)}),e.l.set(t,a),e.G.set(t,i),e.Ka.set(t,!!n.drmInfos.length)}}f.configure=function(e){this.B=e,this.h&&(this.h.C=e.modifyCueCallback)};function Ry(e){return e.za&&!e.N&&!e.I}function Pf(e,t,n,r){e.h||(e.h=new Ps(e.ba),e.h&&(e.h.C=e.B.modifyCueCallback));var i=e.h,o=e.Ga;e=e.T,t=="application/cea-608"||t=="application/cea-708"?i.i=null:(i.i=Ra.get(t)(),i.i.setSequenceMode?i.i.setSequenceMode(n):lt("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),i.i.setManifestType?i.i.setManifestType(e):lt("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),i.G=o,i.B=r)}function xu(e){return e.I?!1:e.i?e.i.readyState=="ended":!0}function La(e){return e.I?!1:e.i?e.i.readyState=="closed":!0}function op(e,t){return e.l.size?t==Bt?e.h.g:Ty(Qu(e,t)):null}function ja(e,t){return e.l.size?t==Bt?e.h.h:wf(Qu(e,t)):null}function gI(e,t,n){return t==Bt?(e=e.h,e.h==null||e.h<n?0:e.h-Math.max(n,e.g)):(e=Qu(e,t),Ey(e,n))}f.Bc=function(){var e={total:this.I?[]:da(this.g.buffered),audio:da(Qu(this,"audio")),video:da(Qu(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;t!=null&&n!=null&&e.text.push({start:t,end:n})}return e};function Qu(e,t){if(e.I||e.N||La(e))return null;try{return e.l.get(t).buffered}catch{return e.l.has(t),null}}function mI(e,t,n,r,i,o,s){s=s===void 0?!1:s;var a=null,u=[],l=wt(n);if(Ms.includes(o))n=Eu(l),n.length&&r&&((s=n.find(function(k){return k.description==="com.apple.streaming.transportStreamTimestamp"}))&&typeof s.data=="number"&&(a=Math.round(s.data)/1e3),e.O.onMetadata([{cueTime:r.startTime,data:l,frames:n,dts:r.startTime,pts:r.startTime}],0,r.endTime));else if(o.includes("/mp4")&&r&&r.ea){l=new Hn;var h=i.emsgSchemeIdUris!=null&&i.emsgSchemeIdUris.length>0||e.B.dispatchAllEmsgBoxes,g=[];h&&l.S("emsg",function(k){e:{var b=i.emsgSchemeIdUris;if(k.version===0)var V=k.reader.xd(),B=k.reader.xd(),Z=k.reader.W(),ue=k.reader.W(),pe=k.reader.W(),te=k.reader.W(),le=r.startTime+ue/Z;else Z=k.reader.W(),le=k.reader.yd()/Z+r.timestampOffset,ue=le-r.startTime,pe=k.reader.W(),te=k.reader.W(),V=k.reader.xd(),B=k.reader.xd();if(k=k.reader.Mb(k.reader.getLength()-k.reader.Qa(),!0),b&&b.includes(V)||e.B.dispatchAllEmsgBoxes)if(V=="urn:mpeg:dash:event:2012")e.O.Ek();else{b=le,(V!=="https://aomedia.org/emsg/ID3"||pe!==4294967295)&&(b+=pe/Z),Z={startTime:le,endTime:b,schemeIdUri:V,value:B,timescale:Z,presentationTimeDelta:ue,eventDuration:pe,id:te,messageData:k};break e}Z=null}Z&&g.push(Z)});var m=r.ea.timescale;t=m&&!isNaN(m);var E=0,A=!1;for(t&&l.S("prft",function(k){var b=k.reader,V=k.version;b.W(),k=b.W();var B=b.W();k=k*1e3+B/4294967296*1e3,V===0?b=b.W():(V=b.W(),b=b.W(),b=V*4294967296+b),k=Iy(k),b=new Map().set("detail",{wallClockTime:k,programStartDate:new Date(k-b/m*1e3)}),b=new yt("prft",b),e.O.onEvent(b)}).box("moof",Wt).box("traf",Wt).S("tfdt",function(k){A||(E=Tf(k.reader,k.version).baseMediaDecodeTime/m,A=!0,h||k.parser.stop())}),(h||t)&&l.parse(n,!1,s),A&&r.timestampOffset==0&&(a=E),l=d(g),n=l.next();!n.done;n=l.next())vI(e,n.value,r,a)}else o.includes("/mp4")||o.includes("/webm")||!Ju(l)||(e.$.has(t)||e.$.set(t,new er),u=e.$.get(t),u.clearData(),u.Ff(r.i),u.parse(l),l=u.getStartTime(t),l!=null&&(a=l),u=u.getMetadata());return{timestamp:a,metadata:u}}function vI(e,t,n,r){var i=Xu(t.startTime,n.startTime+t.presentationTimeDelta/t.timescale);r&&e.T=="HLS"&&!i&&(n=-r+n.startTime,t.startTime+=n,t.endTime+=n),e.O.Ck(t),!t.messageData||t.schemeIdUri!="https://aomedia.org/emsg/ID3"&&t.schemeIdUri!="https://developer.apple.com/streaming/emsg-id3"||(n=Eu(t.messageData),n.length&&(r=t.startTime,e.O.onMetadata([{cueTime:r,data:t.messageData,frames:n,dts:r,pts:r}],0,t.endTime)))}function kf(e,t,n,r,i,o,s,a,u,l,h){s=s===void 0?!1:s,a=a===void 0?!1:a,u=u===void 0?!1:u,l=l===void 0?!1:l;var g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce,Ee,ye,Ve,Le;return H(function(Ce){switch(Ce.h){case 1:if(g=mr,t!=g.Oa){Ce.A(2);break}if(e.T!="HLS"){Ce.A(3);break}return Ce.g(e.ab,4);case 4:m=Ce.i,e.h.u=m;case 3:return Ce.g(Lh(e.h,n,r?r.startTime:null,r?r.endTime:null,r?r.R()[0]:null),5);case 5:return Ce.return();case 2:if(l||!e.o){Ce.A(6);break}return Ce.g(kf(e,g.aa,n,r,i,o,s,a,u,!0),7);case 7:return Ce.g(kf(e,g.wa,n,r,i,o,s,a,u,!0),8);case 8:return Ce.return();case 6:if(!e.l.has(t))return Ce.return();if(E=e.l.get(t).timestampOffset,A=e.G.get(t),e.j.has(t)&&(A=e.j.get(t).getOriginalMimeType()),r&&(k=mI(e,t,n,r,i,A,u),b=k.timestamp,V=k.metadata,b!=null&&(e.X==null&&t==g.wa&&(e.X=b,e.ua=r.startTime,e.V!=null&&(B=0,e.ua==e.oa&&(B=e.X-e.V),e.ma.resolve(B))),e.V==null&&t==g.aa&&(e.V=b,e.oa=r.startTime,e.X!=null&&(Z=0,e.ua==e.oa&&(Z=e.X-e.V),e.ma.resolve(Z))),ue=b,pe=Ms,!e.J&&pe.includes(e.G.get(t))&&(ue=0),te=r.startTime-ue,le=Math.abs(E-te),(le>=.001||s||a)&&(!u||te>0||!E)&&(E=te,e.eb&&(Yr(e,t,function(){return Zu(e,t)},null),Yr(e,t,function(){return qu(e,t,E)},null))),(t==g.wa||!e.l.has(g.wa))&&e.ab.resolve(E)),V.length)&&e.O.onMetadata(V,E,r?r.endTime:null),o&&t==g.wa&&(e.h||Pf(e,"application/cea-608",e.J,!1),e.K||(ie=A.split(";",1)[0],e.K=new mi(ie)),r?(ve=qs(e.K,n),ve.length&&ju(e.h,ve,E)):e.K.init(n,a,h)),!e.j.has(t)){Ce.A(9);break}return Ce.g(e.j.get(t).transmux(n,i,r,e.i.duration,t),10);case 10:ce=Ce.i,ArrayBuffer.isView(ce)?n=ce:(Ee=ce,Ee.init!=null&&(ye=Ee.init,Yr(e,t,function(){e.C&&Ls(e.C,ye,E,i),e.l.get(t).appendBuffer(ye)},r?r.R()[0]:null)),n=Ee.data);case 9:if(n=xI(e,i,n,r,t),!r||!e.J||t==g.Oa){Ce.A(11);break}if(!s&&!a){Ce.A(11);break}if(Ve=r.startTime,e.T!="HLS"||e.o||t!=g.aa||!e.l.has(g.wa)){Ce.A(13);break}return Ce.g(e.ma,14);case 14:Le=Ce.i,Math.abs(Le)>.15&&(Ve-=Le);case 13:Yr(e,t,function(){return Zu(e,t)},null),Yr(e,t,function(){return qu(e,t,Ve)},null);case 11:return Ce.g(Yr(e,t,function(){var ke=n;e.C&&Ls(e.C,ke,E,i),e.l.get(t).appendBuffer(ke)},r?r.R()[0]:null),15);case 15:Ce.j()}})}function yI(e,t){var n=ja(e,"video")||0;Vl(e.h,t,n)}function SI(e){e.h&&Vl(e.h,"",0)}f.remove=function(e,t,n,r){var i=this,o,s;return H(function(a){return a.h==1?(o=mr,e==o.wa&&i.K&&(i.K.remove(r),s=i.h.g||0,i.h.remove(s,n,!0)),e==o.Oa?a.g(i.h.remove(t,n),0):n>t?a.g(Yr(i,e,function(){return Rf(i,e,t,n)},null),5):a.A(0)):i.o?a.g(Yr(i,o.aa,function(){return Rf(i,o.aa,t,n)},null),0):a.A(0)})};function by(e,t){var n;return H(function(r){return r.h==1?(n=mr,t==n.Oa?e.h?r.g(e.h.remove(0,1/0),0):r.return():t===n.wa&&e.K&&e.h?r.g(e.h.remove(0,1/0,!0),4):r.A(4)):r.h!=6?r.g(Yr(e,t,function(){return Rf(e,t,0,e.i.duration)},null),6):e.o?r.g(Yr(e,n.aa,function(){return Rf(e,n.aa,0,e.i.duration)},null),0):r.A(0)})}f.flush=function(e){var t=this,n;return H(function(r){return r.h==1?(n=mr,e==n.Oa?r.return():r.g(Yr(t,e,function(){t.g.currentTime-=.001,Fa(t,e)},null),2)):t.o?r.g(Yr(t,n.aa,function(){var i=n.aa;t.g.currentTime-=.001,Fa(t,i)},null),0):r.A(0)})};function Dy(e,t,n,r,i,o,s,a,u){var l,h,g;return H(function(m){return m.h==1?(l=mr,t==l.Oa?(o||(e.h.u=n),uf(e.h,r,i),m.return()):(h=[],m.g(II(e,t,s,a,u),2))):(g=m.i,g||(h.push(Yr(e,t,function(){return Zu(e,t)},null)),e.o&&h.push(Yr(e,l.aa,function(){return Zu(e,l.aa)},null))),o||(h.push(Yr(e,t,function(){return qu(e,t,n)},null)),e.o&&h.push(Yr(e,l.aa,function(){return qu(e,l.aa,n)},null))),(r!=0||i!=1/0)&&(h.push(Yr(e,t,function(){return Ny(e,t,r,i)},null)),e.o&&h.push(Yr(e,l.aa,function(){return Ny(e,l.aa,r,i)},null))),h.length?m.g(Promise.all(h),0):m.A(0))})}function Oy(e,t,n){var r,i;return H(function(o){return o.h==1?(r=mr,t==r.Oa||(t==r.wa&&(e.ab=new zn),!e.J||(i=ja(e,t))&&Math.abs(i-n)<.15)?o.return():(Yr(e,t,function(){return Zu(e,t)},null),e.o&&Yr(e,r.aa,function(){return Zu(e,r.aa)},null),o.g(Yr(e,t,function(){return qu(e,t,n)},null),2))):e.o?o.g(Yr(e,r.aa,function(){return qu(e,r.aa,n)},null),0):o.A(0)})}f.endOfStream=function(e){var t=this;return H(function(n){return n.g(ql(t,function(){xu(t)||La(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},f.ub=function(e){var t=this;return H(function(n){return n.g(ql(t,function(){if(t.B.durationReductionEmitsUpdateEnd&&e<t.i.duration)for(var r=d(t.l.keys()),i=r.next();!i.done;i=r.next()){i=i.value;var o={start:function(){},p:new zn,uri:null};t.m.get(i).unshift(o)}t.i.duration=e,t.ya=e}),0)})},f.getDuration=function(){return this.i.duration};function TI(e,t,n){H(function(r){return e.H.g||e.g.error||e.N||e.I||xu(e)||La(e)?r.return():r.g(ql(e,function(){xu(e)||La(e)||e.i.setLiveSeekableRange(t,n)}),0)})}function sp(e){H(function(t){return e.H.g||e.g.error||e.N||e.I||xu(e)||La(e)?t.return():t.g(ql(e,function(){xu(e)||La(e)||e.i.clearLiveSeekableRange()}),0)})}function Rf(e,t,n,r){if(r<=n)Fa(e,t);else{if(e.C){var i=e.C;t==="video"&&i.g&&i.g.flushBuffer(n,r)}e.l.get(t).remove(n,r)}}function Zu(e,t){var n=e.l.get(t),r=n.appendWindowStart,i=n.appendWindowEnd;n.abort(),n.appendWindowStart=r,n.appendWindowEnd=i,Fa(e,t)}function qu(e,t,n){n<0&&(n+=.001),e.l.get(t).timestampOffset=n,Fa(e,t)}function Ny(e,t,n,r){var i=e.l.get(t);(i.appendWindowEnd!==r||i.appendWindowStart!==n)&&(i.appendWindowStart=0,i.appendWindowEnd=r,i.appendWindowStart=n),Fa(e,t)}function Fa(e,t){if(e.I||e.H.g){var n=e.m.get(t);n&&n.length&&((n=n[0])&&n.p&&n.p.resolve(),e.m.set(t,[]))}else(n=e.m.get(t)[0])&&(n.p.resolve(),ap(e,t))}function Yr(e,t,n,r){return qn(e.H),n={start:n,p:new zn,uri:r},e.m.get(t).push(n),e.m.get(t).length==1&&Ly(e,t),n.p}function ql(e,t){var n,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z;return H(function(ue){switch(ue.h){case 1:for(qn(e.H),n=[],r=Array.from(e.l.keys()),i=new Map,o=d(r),s=o.next(),a={};!s.done;a={ready:void 0},s=o.next())u=s.value,a.ready=new zn,l={start:function(pe){return function(){return pe.ready.resolve()}}(a),p:a.ready,uri:null},h=e.m.get(u),h.push(l),n.push(a.ready),i.set(u,l),h.length==1&&l.start();return ue.m(2),ue.g(Promise.all(n),4);case 4:ue.o(3);break;case 2:if(g=ue.l(),e.H.g){for(m=d(r),E=m.next();!E.done;E=m.next())A=E.value,k=e.m.get(A),i.has(A)&&$t(k,i.get(A));return ue.return()}throw g;case 3:return ue.m(5,6),ue.g(t(),6);case 6:for(ue.u(),b=d(r),V=b.next();!V.done;V=b.next())B=V.value,ap(e,B);ue.B(0);break;case 5:throw Z=ue.l(),new fe(2,3,3015,Z,e.g.error||"No error in the media element",null)}})}function ap(e,t){e.m.get(t).shift(),Ly(e,t)}function Ly(e,t){var n=e.m.get(t)[0];if(n)try{n.start()}catch(r){r.name=="QuotaExceededError"?n.p.reject(new fe(2,3,3017,t)):Ry(e)?n.p.reject(new fe(2,3,3015,r,e.g.error||"No error in the media element",n.uri)):n.p.reject(new fe(2,3,3024,t)),ap(e,t)}}function EI(e,t){e.ba=t,e.h&&(e.h.l=t)}function xI(e,t,n,r,i){if(ka(e.G.get(i))!="mp4")return n;var o=r===null,s=e.Ka.get(i),a=e.O.Mj(),u=!1;r&&r.ea&&(u=r.ea.encrypted),r=r?r.R()[0]:null;var l=ct();return e.B.correctEc3Enca&&o&&i==="audio"&&(n=ZA(n)),e.B.insertFakeEncryptionInInit&&s&&l.zd(a,i)&&(o?n=qA(t,n,r):!u&&l.Ii(i)&&(n=eI(n))),o&&l.ke()&&(n=iI(n)),n}function wI(e,t,n,r){return Yr(e,t,function(){if(t!==Bt){if(e.G.get(t),ct().wb()){e.j.has(t)&&(e.j.get(t).destroy(),e.j.delete(t)),r&&e.j.set(t,r);var i=n+e.B.addExtraFeaturesToSourceBuffer(n);e.l.get(t).changeType(i),e.G.set(t,n)}Fa(e,t)}},null)}function AI(e,t){var n,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe;return H(function(te){if(te.h==1){if(e.I||e.N)return te.return();for(n=mr,e.I=!0,e.o=!1,r=e.g.currentTime,i=e.g.autoplay,e.g.paused||(e.Ua=!0),e.ib&&(e.g.autoplay=!1),te.D(2),e.u.Ra(),o=d(e.j.values()),s=o.next();!s.done;s=o.next())a=s.value,a.destroy();for(u=d(e.l.values()),l=u.next();!l.done;l=u.next()){h=l.value;try{e.i.removeSourceBuffer(h)}catch{}}return e.j.clear(),e.l.clear(),g=e.i.duration,e.M=new zn,e.i=ip(e,e.M),te.g(e.M,4)}if(te.h!=2){for(!isNaN(g)&&g?e.i.duration=g:!isNaN(e.ya)&&e.ya&&(e.i.duration=e.ya),m=new zn,E=e.i.sourceBuffers,A=t.size,k=0,b=function(){k++,k===A&&(m.resolve(),e.u.Na(E,"addsourcebuffer",b))},e.u.F(E,"addsourcebuffer",b),V=d(t.keys()),B=V.next();!B.done;B=V.next())Z=B.value,ue=t.get(Z),Mf(e,Z,ue,ue.codecs);return(pe=t.get(n.aa))&&pe.isAudioMuxedInVideo&&(e.o=!0),e.o&&!e.m.has(n.aa)&&e.m.set(n.aa,[]),te.g(m,2)}return te.u(),e.I=!1,qn(e.H),e.u.Aa(e.g,"loadedmetadata",function(){e.H.g||(e.g.currentTime=r)}),e.u.Aa(e.g,"canplaythrough",function(){e.H.g||(e.g.autoplay=i,e.Ua&&(e.Ua=!1,e.g.play()))}),te.B(0)})}function jy(e,t){return ql(e,function(){return AI(e,t)})}function Fy(e,t,n,r){var i=!1,o=ni("audio",(r||"").split(",")),s=ni("video",(r||"").split(",")),a=s;t=="audio"&&(a=o),a||(a=r);var u=ar(n,a),l=yi(e.G.get(t)),h=e.B.forceTransmux;if(!ji(u)||!e.J&&Ms.includes(u)?h=!0:h||n==l||(h=!ct().If()&&Ms.includes(n)),h&&(e=au(n,a),a=oa(e))){var g=a();o&&s&&(i=!0),u=g.convertCodecs(t,e)}return!g&&t==="video"&&o&&(u=ar(n,r)),t=ii(Si(u)),{dc:g,hl:i,Ph:yi(u),codec:t,mimeType:u}}function Uy(e,t,n,r,i){if(t==Bt)return{type:lp,rf:n,dc:null};var o=ii(Si(e.G.get(t))),s=yi(e.G.get(t)),a=Fy(e,t,n,r),u=a.dc,l=a.hl,h=a.Ph,g=a.codec;a=a.mimeType;var m=!0;return l&&e.G.has("audio")&&(n=Fy(e,"audio",n,r),r=ii(Si(e.G.get("audio"))),m=yi(e.G.get("audio")),m=r==n.codec&&m==n.Ph,n.dc&&n.dc.destroy()),o===g&&s===h&&m?{type:lp,rf:a,dc:u}:(o=!0,(e.o&&!i.has("audio")||l&&u&&!e.j.has(t))&&(o=!1),t=ct(),o&&e.B.codecSwitchingStrategy==="smooth"&&t.wb()?{type:By,rf:a,dc:u}:(u&&u.destroy(),{type:cp,rf:a,dc:null}))}function II(e,t,n,r,i){var o,s,a,u,l,h;return H(function(g){return g.h==1?(o=mr,s=Uy(e,t,n,r,i),a=s.type,u=s.dc,l=s.rf,(h=i.get(o.aa))&&(e.o=h.isAudioMuxedInVideo),a==lp?(e.j.has(t)&&!u?(e.j.get(t).destroy(),e.j.delete(t)):!e.j.has(t)&&u?e.j.set(t,u):u&&(e.j.has(t)&&e.j.get(t).transmux!==u.transmux?(e.j.get(t).destroy(),e.j.set(t,u)):u.destroy()),g.return(!1)):a==By?g.g(wI(e,t,l,u),3):a!=cp?g.A(3):(u&&u.destroy(),g.g(jy(e,i),3))):g.return(!0)})}function CI(e,t,n,r,i){return e=Uy(e,t,n,r,i),e.dc&&e.dc.destroy(),e.type==cp}var up=R.URL.createObjectURL,MI="sequence",lp="none",cp="reset",By="changeType";function jt(e,t,n){this.i=e,this.D=t,this.u=this.l=1/0,this.h=1,this.g=this.j=null,this.B=0,this.C=!0,this.J=!1,this.I=0,this.G=n===void 0?!0:n,this.H=0,this.o=!1,this.m=e}f=jt.prototype,f.getDuration=function(){return this.l},f.Oj=function(){return this.h},f.Ri=function(e){this.i=e},f.ub=function(e){this.l=e},f.Tj=function(){return this.i},f.Qi=function(e){this.B=e},f.Uc=function(e){e&&!this.C&&(this.J=!0),this.C=e},f.Gf=function(e){this.u=e},f.Xe=function(){return this.u},f.ph=function(e){this.D=e},f.Gj=function(){return this.D},f.Ci=function(e,t){if(e.length!=0){var n=(Date.now()+this.B)/1e3;if(e=e.filter(function(i){return i.start+t<n}),e.length!=0){var r=e[e.length-1].end+t;this.tf(e[0].start+t),this.h=e.reduce(function(i,o){return Math.max(i,o.end-o.start)},this.h),this.g=Math.max(this.g,r),this.i!=null&&this.G&&!this.o&&(this.i=n-this.g-this.h)}}},f.ee=function(e){if(e.length!=0){var t=e[0].startTime,n=e[0].endTime,r=(Date.now()+this.B)/1e3;e=d(e);for(var i=e.next();!i.done;i=e.next())i=i.value,r<i.startTime||(t=Math.min(t,i.startTime),n=Math.max(n,i.endTime),this.h=Math.max(this.h,i.endTime-i.startTime));this.tf(t),this.g=Math.max(this.g,n),this.i!=null&&this.G&&!this.o&&(this.i=r-this.g-this.h)}},f.Bi=function(e,t){this.tf(e),t==1/0||this.U()||(this.g=Math.max(this.g,t))},f.Pj=function(){return this.g},f.lf=function(){this.o=!0},f.qk=function(){return this.o},f.qh=function(e){this.m=e},f.Lj=function(){return this.m},f.tf=function(e){this.j==null?this.j=e:this.J||(this.j=Math.min(this.j,e))},f.Tg=function(e){this.h=Math.max(this.h,e)},f.offset=function(e){this.j!=null&&(this.j+=e),this.g!=null&&(this.g+=e)},f.U=function(){return this.l==1/0&&!this.C},f.Oc=function(){return this.l!=1/0&&!this.C},f.Db=function(){return Math.max(this.I,this.Dc()-this.u)},f.Ui=function(e){this.I=e},f.Dc=function(){return this.U()||this.Oc()?Math.min(Math.max(0,(Date.now()+this.B)/1e3-this.h-this.i)+this.H,this.l):this.g?Math.min(this.g,this.l):this.l},f.Vd=function(e){var t=Math.max(this.j,this.I);return this.u==1/0?Math.ceil(t*1e3)/1e3:Math.max(t,Math.min(this.Dc()-this.u+e,this.Cb()))},f.Tb=function(){return this.Vd(0)},f.Cb=function(){return Math.max(0,this.Dc()-(this.U()||this.Oc()?this.D:0))},f.hj=function(){return!(this.i==null||this.g!=null&&this.G)},f.Pi=function(e){this.H=e},f.Bj=function(){return this.H},Re("shaka.media.PresentationTimeline",jt),jt.prototype.getAvailabilityTimeOffset=jt.prototype.Bj,jt.prototype.setAvailabilityTimeOffset=jt.prototype.Pi,jt.prototype.usingPresentationStartTime=jt.prototype.hj,jt.prototype.getSeekRangeEnd=jt.prototype.Cb,jt.prototype.getSeekRangeStart=jt.prototype.Tb,jt.prototype.getSafeSeekRangeStart=jt.prototype.Vd,jt.prototype.getSegmentAvailabilityEnd=jt.prototype.Dc,jt.prototype.setUserSeekStart=jt.prototype.Ui,jt.prototype.getSegmentAvailabilityStart=jt.prototype.Db,jt.prototype.isInProgress=jt.prototype.Oc,jt.prototype.isLive=jt.prototype.U,jt.prototype.offset=jt.prototype.offset,jt.prototype.notifyMaxSegmentDuration=jt.prototype.Tg,jt.prototype.notifyMinSegmentStartTime=jt.prototype.tf,jt.prototype.getInitialProgramDateTime=jt.prototype.Lj,jt.prototype.setInitialProgramDateTime=jt.prototype.qh,jt.prototype.isStartTimeLocked=jt.prototype.qk,jt.prototype.lockStartTime=jt.prototype.lf,jt.prototype.getMaxSegmentEndTime=jt.prototype.Pj,jt.prototype.notifyPeriodDuration=jt.prototype.Bi,jt.prototype.notifySegments=jt.prototype.ee,jt.prototype.notifyTimeRange=jt.prototype.Ci,jt.prototype.getDelay=jt.prototype.Gj,jt.prototype.setDelay=jt.prototype.ph,jt.prototype.getSegmentAvailabilityDuration=jt.prototype.Xe,jt.prototype.setSegmentAvailabilityDuration=jt.prototype.Gf,jt.prototype.setStatic=jt.prototype.Uc,jt.prototype.setClockOffset=jt.prototype.Qi,jt.prototype.getPresentationStartTime=jt.prototype.Tj,jt.prototype.setDuration=jt.prototype.ub,jt.prototype.setPresentationStartTime=jt.prototype.Ri,jt.prototype.getMaxSegmentDuration=jt.prototype.Oj,jt.prototype.getDuration=jt.prototype.getDuration;function fp(e,t,n,r){var i=this;this.u=r,this.g=e,this.D=t,this.h=n,this.j=new Et,this.m=!1,this.l=0,this.C=!1,this.H=this.G=0,this.o=kI(this),this.B=!1,this.j.F(e,"waiting",function(){return ec(i)}),this.i=new Yt(function(){ec(i)}).Ea(this.h.gapJumpTimerTime)}fp.prototype.release=function(){this.j&&(this.j.release(),this.j=null),this.i!=null&&(this.i.stop(),this.i=null),this.o&&(this.o.release(),this.o=null),this.g=this.D=this.u=null},fp.prototype.td=function(){this.B=!0,this.i&&this.i.Ea(this.h.gapJumpTimerTime),ec(this)};function ec(e){if(e.g.readyState!=0){if(e.g.seeking){if(!e.m)return}else e.m=!1;if(!e.g.paused||e.g.currentTime==e.l&&(e.g.autoplay||e.g.currentTime!=e.l)){var t;if(!(t=!e.o)){t=e.o;var n=t.h,r=Hy(n),i=n.g.currentTime,o=Date.now()/1e3;(t.g!=i||t.m!=r)&&(t.l=o,t.g=i,t.m=r,t.i=!1),i=o-t.l,(r=i>=t.o&&r&&!t.i)&&(t.j&&t.j(t.g,i),t.i=!0,t.g=n.g.currentTime),t=!r}t&&(t=e.g.currentTime,n=e.g.buffered,r=oI(n,t,e.h.gapDetectionThreshold),r==null||r==0&&!e.B||(i=n.start(r),(o=e.h.gapPadding)&&(i=Math.ceil((i+o)*100)/100),i>=e.D.Cb()||i-t<.001||(r!=0&&n.end(r-1),PI(e,i),t==e.l&&(e.l=i),e.G++,e.u(new yt("gapjumped")))))}}}function PI(e,t){e.C=!0,e.j.Aa(e.g,"seeked",function(){e.C=!1}),e.g.currentTime=t}function kI(e){if(!e.h.stallEnabled)return null;var t=e.h.stallThreshold,n=e.h.stallSkip;return new Vy(new _y(e.g),t,function(){var r;return H(function(i){if(i.h==1)return r=da(e.g.buffered),r.length?n?(e.g.currentTime+=n,i.A(2)):i.g(e.g.play(),3):i.return();if(i.h!=2){if(!e.g)return i.return();e.g.pause(),e.g.play()}e.H++,e.u(new yt("stalldetected")),i.j()})})}function Vy(e,t,n){this.h=e,this.m=Hy(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.i=!1,this.o=t,this.j=n}Vy.prototype.release=function(){this.h&&this.h.release(),this.j=this.h=null};function _y(e){var t=this;this.g=e,this.h=new Et,this.i=!1,this.h.F(this.g,"audiofocuspaused",function(){t.i=!0}),this.h.F(this.g,"audiofocusgranted",function(){t.i=!1}),this.h.F(this.g,"audiofocuslost",function(){t.i=!0})}function Hy(e){if(e.g.paused||e.g.playbackRate==0||e.i||e.g.buffered.length==0)var t=!1;else e:{t=e.g.currentTime,e=d(da(e.g.buffered));for(var n=e.next();!n.done;n=e.next())if(n=n.value,!(t<n.start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}_y.prototype.release=function(){this.h&&this.h.release(),this.h=null};function el(e,t,n,r){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?r():(t=RI.value().get(t),n.Aa(e,t,r))}var RI=new Kt(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Gy(e,t,n,r){var i=this;this.g=e,this.m=t,this.u=n,this.l=null,this.j=function(){return i.l==null&&(i.l=r()),i.l},this.o=!1,this.h=new Et,this.i=new $y(e),el(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Wy(i,i.j())})}Gy.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i!=null&&(this.i.release(),this.i=null),this.m=function(){},this.g=null};function dp(e){return e.o?e.g.currentTime:e.j()}function Ky(e,t){e.g.readyState>0?Xy(e.i,t):el(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){Wy(e,e.j())})}function Wy(e,t){Math.abs(e.g.currentTime-t)<.001?zy(e):(e.h.Aa(e.g,"seeking",function(){zy(e)}),Xy(e.i,e.g.currentTime&&e.g.currentTime!=0?e.g.currentTime:t))}function zy(e){e.o=!0,e.h.F(e.g,"seeking",function(){return e.m()}),e.u(e.g.currentTime)}function $y(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new Yt(function(){t.i<=0||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)})}$y.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null};function Xy(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.Ea(.1)}function Yy(e){this.g=e,this.i=!1,this.h=null,this.j=new Et}f=Yy.prototype,f.ready=function(){function e(){if(t.h==null||t.h==0&&t.g.duration!=1/0)t.i=!0;else{var n=t.g.currentTime,r=null;if(typeof t.h=="number")r=t.h;else if(t.h instanceof Date){var i=Jy(t);i!==null&&(r=t.h.getTime()/1e3-i,r=Qy(t,r))}r==null?t.i=!0:(r<0&&(r=Math.max(0,n+r)),n!=r?(t.j.Aa(t.g,"seeking",function(){t.i=!0}),t.g.currentTime=r):t.i=!0)}}var t=this;el(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){e()})},f.release=function(){this.j&&(this.j.release(),this.j=null),this.g=null},f.Uf=function(e){this.h=this.i?this.h:e},f.Kd=function(){var e=this.i?this.g.currentTime:this.h;return e instanceof Date&&(e=e.getTime()/1e3-(Jy(this)||0),e=Qy(this,e)),e||0},f.Jh=function(){return 0},f.Hh=function(){return 0},f.Ih=function(){return!1},f.Ai=function(){},f.mi=function(){var e=wf(this.g.buffered);return e!=null&&e>=this.g.duration-1};function Jy(e){return e.g.getStartDate&&(e=e.g.getStartDate().getTime(),!isNaN(e))?e/1e3:null}function Qy(e,t){return e=e.g.seekable,e.length>0&&(t=Math.max(e.start(0),t),t=Math.min(e.end(e.length-1),t)),t}function Zy(e,t,n,r,i,o){var s=this;this.h=e,this.g=t.presentationTimeline,this.l=n,this.u=i,this.o=null,this.i=new fp(e,t.presentationTimeline,n,o),this.j=new Gy(e,function(){e:{var a=s.i;a.m=!0,a.B=!1,a.i&&a.i.Ea(a.h.gapJumpTimerTime),ec(a);var u=dp(s.j);if(a=t0(s,u),!ly()&&Math.abs(a-u)>.001){u=!1;var l=ct().Ni();if(l){var h=Date.now()/1e3;(!s.o||s.o<h-l)&&(s.o=h,u=!0)}else u=!0;if(u){Ky(s.j,a),a=void 0;break e}}s.u(),a=void 0}return a},function(a){var u=s.i;u.g.seeking&&!u.m&&(u.m=!0,u.l=a),u.i&&u.i.Ea(u.h.gapJumpTimerTime),ec(u)},function(){return qy(s,r)}),this.m=new Yt(function(){if(s.h.readyState!=0&&!s.h.paused){var a=dp(s.j),u=s.g.Tb(),l=s.g.Cb();l-u<3&&(u=l-3),a<u&&(a=t0(s,a),s.h.currentTime=a)}})}f=Zy.prototype,f.ready=function(){this.m.Ea(.25)},f.release=function(){this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.m&&(this.m.stop(),this.m=null),this.h=this.j=this.g=this.l=null,this.u=function(){}},f.Uf=function(e){Ky(this.j,qy(this,e))},f.Kd=function(){var e=dp(this.j);return this.h.readyState>0&&!this.h.paused?n0(this,e):e},f.Jh=function(){return this.i.H},f.Hh=function(){return this.i.G},f.Ih=function(){return this.i.C};function qy(e,t){return t==null?t=e.g.getDuration()<1/0?e.g.Tb():e.g.Cb():t instanceof Date?t=t.getTime()/1e3-(e.g.m||e.g.i):t<0&&(t=e.g.Cb()+t),e0(e,n0(e,t))}f.Ai=function(){this.i.td()},f.mi=function(){if(this.g.U()){var e=this.g.Dc(),t=wf(this.h.buffered);if(t!=null&&t>=e)return!0}return!1};function e0(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function t0(e,t){var n=e.l.rebufferingGoal,r=e.l.safeSeekOffset,i=e.g.Tb(),o=e.g.Cb(),s=e.g.getDuration();o-i<3&&(i=o-3);var a=e.g.Vd(n),u=e.g.Vd(r);return n=e.g.Vd(n+r),t>=s?e0(e,t):t>o?o-e.l.safeSeekEndOffset:t<i?e.g.U()&&e.l.returnToEndOfLiveWindowWhenOutside?o-e.l.safeSeekEndOffset:Qh(e.h.buffered,u)?u:n:t>=a||Qh(e.h.buffered,t)?t:n}function n0(e,t){var n=e.g.Tb();return t<n?n:(e=e.g.Cb(),t>e?e:t)}function wn(e){this.g=e,this.m=null,this.i=0,this.o=!1}f=wn.prototype,f.getNumReferences=function(){return this.g.length},f.getNumEvicted=function(){return this.i},f.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},f.yk=function(){this.o=!0},f.Bb=function(e){for(var t=d(this.g),n=t.next();!n.done;n=t.next())e(n.value)};function ks(e){return e.g[0]||null}f.find=function(e){for(var t=this.g.length-1,n=t;n>=0;--n){var r=this.g[n],i=n<t?this.g[n+1].startTime:r.endTime;if(e>=r.startTime&&e<i)return n+this.i}return this.g.length&&e<this.g[0].startTime?this.i:null},f.get=function(e){return this.g.length==0?null:(e-=this.i,e<0||e>=this.g.length?null:this.g[e])},f.offset=function(e){if(!this.o)for(var t=d(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},f.nf=function(e){if(!this.o&&e.length){var t=Math.round(e[0].startTime*1e3)/1e3;this.g=this.g.filter(function(n){return Math.round(n.startTime*1e3)/1e3<t}),this.g.push.apply(this.g,M(e))}},f.be=function(e,t){var n=this;e=e.filter(function(r){return r.endTime>t&&(n.g.length==0||r.endTime>n.g[0].startTime)}),this.nf(e),this.Ya(t)},f.Ya=function(e){if(!this.o){var t=this.g.length;this.g=this.g.filter(function(n){return n.endTime>e}),this.i+=t-this.g.length}},f.gd=function(e,t,n){if(n=n===void 0?!1:n,!this.o){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.i++;this.g.length!=0&&(e=this.g[this.g.length-1],t=new Rt(e.startTime,t,e.C,e.startByte,e.endByte,e.ea,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.B,e.h,e.status,e.aesKey),t.mimeType=e.mimeType,t.codecs=e.codecs,t.i=e.i,this.g[this.g.length-1]=t)}},f.Mf=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new Yt(function(){var r=t();r?n.g.push.apply(n.g,M(r)):(n.m.stop(),n.m=null)}),this.m.Ea(e))},wn.prototype[Symbol.iterator]=function(){return this.Qb(0)},wn.prototype.Qb=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?!1:n;var r=this.find(e);if(r==null)return null;var i=this.get(r);n?r++:r--;var o=-1;if(i&&i.g.length>0)for(var s=i.g.length-1;s>=0;--s){var a=i.g[s];if(e>=a.startTime&&e<a.endTime){if(!t){for(;s&&!a.l;)s--,a=i.g[s];if(!a.l)return gn("No independent partial segment found!"),null}n?r--:r++,o=s-1;break}}return new Ko(this,r,o,n)},wn.prototype.Pe=function(){return-1};function bf(e,t,n){return e=new Rt(e,e+t,function(){return n},0,null,null,e,e,e+t),new wn([e])}Re("shaka.media.SegmentIndex",wn),wn.forSingleSegment=bf,wn.prototype.getIteratorForTime=wn.prototype.Qb,wn.prototype.updateEvery=wn.prototype.Mf,wn.prototype.fit=wn.prototype.gd,wn.prototype.evict=wn.prototype.Ya,wn.prototype.mergeAndEvict=wn.prototype.be,wn.prototype.offset=wn.prototype.offset,wn.prototype.get=wn.prototype.get,wn.prototype.find=wn.prototype.find,wn.prototype.markImmutable=wn.prototype.yk,wn.prototype.release=wn.prototype.release,wn.prototype.getNumEvicted=wn.prototype.getNumEvicted,wn.prototype.getNumReferences=wn.prototype.getNumReferences;function Ko(e,t,n,r){this.i=e,this.h=t,this.g=n,this.reverse=r}f=Ko.prototype,f.Ed=function(e){this.reverse=e},f.wj=function(){return this.h},f.current=function(){var e=this.i.get(this.h);return e&&e.g.length>0&&e.m&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&e.g.length>0?e.g[this.g]:e},f.next=function(){var e=this.i.get(this.h);return this.reverse?e&&e.g.length>0?(this.g--,this.g<0&&(this.h--,this.g=(e=this.i.get(this.h))&&e.g.length>0?e.g.length-1:0)):(this.h--,this.g=0):e&&e.g.length>0?(this.g++,e.m&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),e=this.current(),{value:e,done:!e}},f.hh=function(){var e=this.current();if(e&&e.Qc&&!e.l&&(e=this.i.get(this.h))&&e.g.length>0)for(var t=e.g[this.g];t.l&&!(this.g<=0);)this.g--,t=e.g[this.g]},Re("shaka.media.SegmentIterator",Ko),Ko.prototype.resetToLastIndependent=Ko.prototype.hh,Ko.prototype.next=Ko.prototype.next,Ko.prototype.current=Ko.prototype.current,Ko.prototype.currentPosition=Ko.prototype.wj,Ko.prototype.setReverse=Ko.prototype.Ed;function Er(){wn.call(this,[]),this.h=[]}P(Er,wn),f=Er.prototype,f.clone=function(){var e=new Er;return e.h=this.h.slice(),e.i=this.i,e},f.release=function(){this.h=[]},f.Bb=function(e){for(var t=d(this.h),n=t.next();!n.done;n=t.next())n.value.Bb(e)};function bI(e,t){e=d(e.h);for(var n=e.next();!n.done;n=e.next())t(n.value)}f.find=function(e){for(var t=this.i,n=d(this.h),r=n.next();!r.done;r=n.next()){r=r.value;var i=r.find(e);if(i!=null)return i+t;t+=r.getNumEvicted()+r.getNumReferences()}return null};function DI(e,t){e=d(e.h);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.find(t)!=null)return n.Pe();return-1}f.get=function(e){for(var t=this.i,n=d(this.h),r=n.next();!r.done;r=n.next()){r=r.value;var i=r.get(e-t);if(i)return i;i=r.getNumReferences(),t+=r.getNumEvicted()+i}return null},f.offset=function(){},f.nf=function(){},f.Ya=function(e){if(this.h.length){var t=this.h[0];t.Ya(e),t.getNumReferences()==0&&(this.h.shift(),this.i+=t.getNumEvicted(),t.release(),this.Ya(e))}},f.be=function(){},f.gd=function(){},f.Mf=function(){},Re("shaka.media.MetaSegmentIndex",Er),Er.prototype.updateEvery=Er.prototype.Mf,Er.prototype.fit=Er.prototype.gd,Er.prototype.mergeAndEvict=Er.prototype.be,Er.prototype.evict=Er.prototype.Ya,Er.prototype.merge=Er.prototype.nf,Er.prototype.offset=Er.prototype.offset,Er.prototype.get=Er.prototype.get,Er.prototype.find=Er.prototype.find,Er.prototype.forEachTopLevelReference=Er.prototype.Bb,Er.prototype.release=Er.prototype.release;function Df(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Gg(),this.h=new Yt(function(){t.g.isPaused()||t.g.Ak(t.i*.25)})}Df.prototype.release=function(){this.set(this.kd()),this.h&&(this.h.stop(),this.h=null),this.g=null},Df.prototype.set=function(e){this.i=e,hp(this)},Df.prototype.kd=function(){return this.g.kd()};function hp(e){e.h.stop();var t=e.j?0:e.i;if(t>=0)try{e.g.Gg()!=t&&e.g.Si(t);return}catch{}e.h.Ea(.25),e.g.Gg()!=0&&e.g.Si(0)}function pp(e){var t=this;this.j=e,this.h=new Et,this.g=new Set,this.i=new Yt(function(){r0(t,!1)}).xb(),e.paused||this.i.Ea(.25),this.h.F(e,"playing",function(){t.i.xb().Ea(.25)}),this.h.F(e,"pause",function(){t.i.stop()}),this.h.F(e,"seeked",function(){t.i.xb(),e.paused||t.i.Ea(.25)})}pp.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=d(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()};function r0(e,t){var n=e.j.currentTime;e=d(e.g);for(var r=e.next();!r.done;r=e.next())r.value.j(n,t)}function Of(e){_n.call(this),this.g=new Map,this.h=e}P(Of,_n),Of.prototype.release=function(){this.g.clear(),_n.prototype.release.call(this)};function OI(e,t){var n=e.g.get(t);return n||(n={je:[],jg:null,contentType:t},e.g.set(t,n)),n}function NI(e,t,n){var r=OI(e,t.contentType);LI(e,r),e={rd:t,position:n},r=r.je,t=r.findIndex(function(i){return i.position>=n}),t>=0?r.splice(t,r[t].position==n?1:0,e):r.push(e)}Of.prototype.j=function(e){for(var t=d(this.g.values()),n=t.next();!n.done;n=t.next()){n=n.value;var r=n.jg;e:{for(var i=n.je,o=i.length-1;o>=0;o--){var s=i[o];if(s.position<=e){i=s.rd;break e}}i=null}o=i&&!(r===i||r&&i&&r.bandwidth==i.bandwidth&&r.audioSamplingRate==i.audioSamplingRate&&r.codecs==i.codecs&&r.contentType==i.contentType&&r.frameRate==i.frameRate&&r.height==i.height&&r.mimeType==i.mimeType&&r.channelsCount==i.channelsCount&&r.pixelAspectRatio==i.pixelAspectRatio&&r.width==i.width),s=i&&r&&i.label&&r.label&&r.label!==i.label;var a=i&&r&&i.language&&r.language&&r.language!==i.language;r=i&&r&&i.roles&&r.roles&&!Ye(r.roles,i.roles),(s||a||r)&&i0(this,e,i.contentType)&&(n.jg=i,r=new yt("audiotrackchange",new Map([["quality",i],["position",e]])),this.dispatchEvent(r)),o&&i0(this,e,i.contentType)&&(n.jg=i,JSON.stringify(i),n=new yt("qualitychange",new Map([["quality",i],["position",e]])),this.dispatchEvent(n))}};function i0(e,t,n){return!!((e=e.h()[n])&&e.length>0&&(n=e[e.length-1].end,t>=e[0].start&&t<n))}function LI(e,t){if((e=e.h()[t.contentType])&&e.length>0){var n=e[0].start,r=e[e.length-1].end,i=t.je;t.je=i.filter(function(o,s){return!(o.position<=n&&s+1<i.length&&i[s+1].position<=n||o.position>=r)})}else t.je=[]}function Nf(e){var t={bandwidth:e.bandwidth||0,audioSamplingRate:null,codecs:e.codecs,contentType:e.type,frameRate:null,height:null,mimeType:e.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:e.roles,language:null};return e.type=="video"&&(t.frameRate=e.frameRate||null,t.height=e.height||null,t.pixelAspectRatio=e.pixelAspectRatio||null,t.width=e.width||null),e.type=="audio"&&(t.audioSamplingRate=e.audioSamplingRate,t.channelsCount=e.channelsCount,t.label=e.label||null,t.language=e.language),t}function tc(e){_n.call(this),this.h=new Map,this.i=e,this.g=null}P(tc,_n),tc.prototype.release=function(){this.h.clear(),this.g&&(this.g.stop(),this.g=null),_n.prototype.release.call(this)};function gp(e,t){var n=t.schemeIdUri+"_"+t.id+"_"+(t.startTime.toFixed(1)+"_"+t.endTime.toFixed(1));e.h.has(n)||(e.h.set(n,t),t=new yt("regionadd",new Map([["region",t]])),e.dispatchEvent(t),jI(e))}function jI(e){e.g||(e.g=new Yt(function(){for(var t=e.i(),n=d(e.h),r=n.next();!r.done;r=n.next()){var i=d(r.value);r=i.next().value,i=i.next().value,i.endTime<t.start&&(e.h.delete(r),r=new yt("regionremove",new Map([["region",i]])),e.dispatchEvent(r))}!e.h.size&&e.g&&(e.g.stop(),e.g=null)}).Ea(2))}function Lf(e,t,n,r,i){function o(s,a){return!(a.fastSwitching&&s.Qc&&s.ae)}this.m=e,this.i=t,this.l=n,this.g=new Map,this.j=new Map,this.h=null,this.o=r,this.u=i||o}function FI(e,t){e.l=t,e=d(e.g.values());for(var n=e.next();!n.done;n=e.next())n.value.g=t}function nc(e,t,n){if(n=n===void 0?!1:n,!e.i.segmentIndex||(e.h||(e.h=e.i.segmentIndex.Qb(t,!0,e.o)),!e.h))return Promise.resolve();for(n&&e.h.next(),t=[];e.g.size<e.m&&(n=e.h.next().value,!!n);){var r=!0;if(n.isPreload()&&n.endByte!=null&&(r=!1),n.Vb()==2&&(r=!1),n.Ub(!1)&&(r=!1),r&&n.ea&&t.push(o0(e,n.ea)),r&&!e.g.has(n)&&(r=new vp(e.l),t.push(u0(r,n,e.i)),e.g.set(n,r)),!e.u(n,e.i))break}return mp(e),Promise.all(t)}function o0(e,t){if(!e.i.segmentIndex||t.Ub()||Array.from(e.j.keys()).some(function(i){return Jl(i,t)}))return Promise.resolve();var n=new vp(e.l),r=u0(n,t,e.i);return e.j.set(t,n),r}function s0(e,t){t=d(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&rc(e,n)}function Rs(e){s0(e,e.g),s0(e,e.j),e.h=null}Lf.prototype.Ya=function(e,t){t=t===void 0?!1:t;for(var n=d(this.g.keys()),r=n.next();!r.done;r=n.next())r=r.value,e>r.endTime&&rc(this,r);t&&mp(this)},Lf.prototype.Ed=function(e){this.o=e,this.h&&this.h.Ed(e)};function mp(e){if(e.g.size)for(var t=Array.from(e.g.keys()),n=d(e.j.keys()),r=n.next(),i={};!r.done;i={Lg:void 0},r=n.next())i.Lg=r.value,t.some(function(o){return function(s){return Jl(s.ea,o.Lg)}}(i))||rc(e,i.Lg)}function a0(e,t){e.m=t;for(var n=Array.from(e.g.keys());n.length>t;){var r=n.pop();r&&rc(e,r)}mp(e)}function UI(e,t){t&&t!==e.i&&(Rs(e),e.i=t)}function rc(e,t){var n=e.g;t instanceof qi&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function vp(e){this.g=e,this.fe=this.xh=null}function u0(e,t,n){var r=new Uint8Array(0);return e.fe=e.g(t,n,function(i){return H(function(o){if(o.h==1)return r.byteLength>0?r=dr(r,i):r=i,e.xh?o.g(e.xh(r),3):o.A(0);r=new Uint8Array(0),o.j()})}),e.fe.promise.catch(function(i){return i instanceof fe&&i.code==7001?Promise.resolve():Promise.reject(i)})}vp.prototype.abort=function(){this.fe&&this.fe.abort()},Re("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function yp(e){var t=yi(e),n=t.split("/")[0];return e=Si(e),{type:n,mimeType:t,codecs:e,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,re:null,colorGamut:null,frameRate:null,timescale:null}}function BI(e,t,n){function r(ie){B=ie.name;var ve=ie.reader;ve.skip(24);var ce=ve.Da(),Ee=ve.Da();ve.skip(50),m=String(ce),g=String(Ee),ie.reader.La()&&Wt(ie)}function i(ie){var ve=cy(ie.reader);E=ve.channelCount,A=ve.sampleRate,o(ie.name)}function o(ie){switch(ie=ie.toLowerCase(),ie){case"avc1":case"avc3":a.push(ie+".42E01E"),l=!0;break;case"hev1":case"hvc1":a.push(ie+".1.6.L93.90"),l=!0;break;case"dvh1":case"dvhe":a.push(ie+".05.04"),l=!0;break;case"vp09":a.push(ie+".00.10.08"),l=!0;break;case"av01":a.push(ie+".0.01M.08"),l=!0;break;case"mp4a":s.push("mp4a.40.2"),u=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":s.push(ie),u=!0;break;case"apac":s.push("apac.31.00"),u=!0}}var s=[],a=[],u=!1,l=!1,h=null,g=null,m=null,E=null,A=null,k=null,b=null,V=null,B;if(new Hn().box("moov",Wt).box("trak",Wt).box("mdia",Wt).S("mdhd",function(ie){ie=Ef(ie.reader,ie.version),h=ie.language,V=ie.timescale}).box("minf",Wt).box("stbl",Wt).S("stsd",ca).box("mp4a",function(ie){var ve=cy(ie.reader);E=ve.channelCount,A=ve.sampleRate,ie.reader.La()?Wt(ie):o(ie.name)}).box("esds",function(ie){ie=ie.reader;for(var ve="mp4a",ce,Ee;ie.La();){ce=ie.Z();for(var ye=ie.Z();ye&128;)ye=ie.Z();if(ce==3)ie.Da(),ye=ie.Z(),ye&128&&ie.Da(),ye&64&&ie.skip(ie.Z()),ye&32&&ie.Da();else if(ce==4)Ee=ie.Z(),ie.skip(12);else if(ce==5)break}Ee&&(ve+="."+zl(Ee),ce==5&&ie.La()&&(ce=ie.Z(),Ee=(ce&248)>>3,Ee===31&&ie.La()&&(Ee=32+((ce&7)<<3)+((ie.Z()&224)>>5)),ve+="."+Ee)),s.push(ve),u=!0}).box("ac-3",i).box("ec-3",i).box("ac-4",i).box("Opus",i).box("fLaC",i).box("apac",i).box("avc1",r).box("avc3",r).box("hev1",r).box("hvc1",r).box("dva1",r).box("dvav",r).box("dvh1",r).box("dvhe",r).box("vp09",r).box("av01",r).box("avcC",function(ie){var ve=B||"";switch(B){case"dvav":ve="avc3";break;case"dva1":ve="avc1"}ie=ie.reader,ie.skip(1),ie=ve+"."+zl(ie.Z())+zl(ie.Z())+zl(ie.Z()),a.push(ie),l=!0}).box("hvcC",function(ie){var ve=B||"";switch(B){case"dvh1":ve="hvc1";break;case"dvhe":ve="hev1"}var ce=ie.reader;ce.skip(1),ie=ce.Z();var Ee=["","A","B","C"][ie>>6],ye=ie&31,Ve=ce.W(),Le=(ie&32)>>5?"H":"L";ie=[ce.Z(),ce.Z(),ce.Z(),ce.Z(),ce.Z(),ce.Z()],ce=ce.Z();for(var Ce=0,ke=0;ke<32&&(Ce|=Ve&1,ke!=31);ke++)Ce<<=1,Ve>>=1;for(ve=ve+("."+Ee+ye)+("."+zl(Ce,!0)),ve+="."+Le+ce,Ee="",ye=ie.length;ye--;)((Le=ie[ye])||Ee)&&(Ee="."+Le.toString(16).toUpperCase()+Ee);ve+=Ee,a.push(ve),l=!0}).box("dvcC",function(ie){var ve=B||"";switch(B){case"hvc1":ve="dvh1";break;case"hev1":ve="dvhe";break;case"avc1":ve="dva1";break;case"avc3":ve="dvav";break;case"av01":ve="dav1"}var ce=ie.reader;ce.skip(2),ie=ce.Z(),ce=ce.Z(),a.push(ve+"."+ho(ie>>1&127)+"."+ho(ie<<5&32|ce>>3&31)),l=!0}).box("dvvC",function(ie){var ve=B||"";switch(B){case"hvc1":ve="dvh1";break;case"hev1":ve="dvhe";break;case"avc1":ve="dva1";break;case"avc3":ve="dvav";break;case"av01":ve="dav1"}var ce=ie.reader;ce.skip(2),ie=ce.Z(),ce=ce.Z(),a.push(ve+"."+ho(ie>>1&127)+"."+ho(ie<<5&32|ce>>3&31)),l=!0}).S("vpcC",function(ie){var ve=B||"",ce=ie.reader;ie=ce.Z();var Ee=ce.Z();ce=ce.Z()>>4&15,a.push(ve+"."+ho(ie)+"."+ho(Ee)+"."+ho(ce)),l=!0}).box("av1C",function(ie){var ve=B||"";switch(B){case"dav1":ve="av01"}var ce=ie.reader;ce.skip(1),ie=ce.Z(),ce=ce.Z();var Ee=ie>>>5,ye=(ce&64)>>6;a.push(ve+"."+Ee+"."+ho(ie&31)+(ce>>>7?"H":"M")+"."+ho(Ee===2&&ye?(ce&32)>>5?12:10:ye?10:8)+"."+((ce&16)>>4)+"."+((ce&8)>>3)+((ce&4)>>2)+(ce&3)+"."+ho(1)+"."+ho(1)+"."+ho(1)+".0"),l=!0}).box("enca",gf).box("encv",fo).box("sinf",Wt).box("frma",function(ie){ie=Yh(ie.reader).codec,o(ie)}).box("colr",function(ie){a=a.map(function(Ee){if(Ee.startsWith("av01.")){var ye=ie.reader,Ve=ye.Qa(),Le=ye.Mb(4,!1),Ce=String.fromCharCode(Le[0]);if(Ce+=String.fromCharCode(Le[1]),Ce+=String.fromCharCode(Le[2]),Ce+=String.fromCharCode(Le[3]),Ce==="nclx"){Le=ye.Da(),Ce=ye.Da();var ke=ye.Da(),Ge=ye.Z()>>7,Je=Ee.split(".");Je.length==10&&(Je[6]=ho(Le),Je[7]=ho(Ce),Je[8]=ho(ke),Je[9]=String(Ge),Ee=Je.join("."))}ye.seek(Ve)}return Ee});var ve=VA(ie.reader),ce=ve.colorGamut;k=ve.re,b=ce}).parse(e||t,!0,!0),!s.length&&!a.length)return null;var Z=u&&!l,ue=new Map;if(l&&!n){n=new mi("video/mp4"),e&&n.init(e);try{qs(n,t);for(var pe=d(n.g.getStreams()),te=pe.next();!te.done;te=pe.next()){var le=te.value;ue.set(le,le)}}catch{}n.g.clear()}return{type:Z?"audio":"video",mimeType:Z?"audio/mp4":"video/mp4",codecs:Sp(s.concat(a)).join(", "),language:h,height:g,width:m,channelCount:E,sampleRate:A,closedCaptions:ue,re:k,colorGamut:b,frameRate:null,timescale:V}}function Sp(e){var t=new Set,n=[];e=d(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;var i=Vs(r);t.has(i)||(n.push(r),t.add(i))}return t=Ys("audio",n),r=Ys("video",n),e=Ys(Bt,n),r=VI(r),t=t.concat(r).concat(e),n.length&&!t.length?n:t}function VI(e){if(e.length<=1)return e;var t=e.find(function(n){return n.startsWith("dvav.")||n.startsWith("dva1.")||n.startsWith("dvh1.")||n.startsWith("dvhe.")||n.startsWith("dav1.")||n.startsWith("dvc1.")||n.startsWith("dvi1.")});return t?ji('video/mp4; codecs="'+t+'"')?[t]:e.filter(function(n){return n!=t}):e}function _I(e){var t=null;return new Hn().box("moov",Wt).box("trak",Wt).box("mdia",Wt).box("minf",Wt).box("stbl",Wt).S("stsd",ca).box("encv",fo).box("enca",gf).box("sinf",Wt).box("schi",Wt).S("tenc",function(n){n=n.reader,n.Z(),n.Z(),n.Z(),n.Z(),n=n.Mb(16,!1),t=Ao(n)}).parse(e,!0),t}function Tp(e,t,n){var r,i,o,s,a;return H(function(u){if(u.h==1)return r=t,r.cryptoKey?u.A(2):u.g(r.fetchKey(),3);if(i=r.iv,!i)for(i=wt(new ArrayBuffer(16)),o=r.firstMediaSequenceNumber+n,s=i.byteLength-1;s>=0;s--)i[s]=o&255,o>>=8;return t.blockCipherMode=="CBC"?a={name:"AES-CBC",iv:i}:a={name:"AES-CTR",counter:i,length:64},u.return(R.crypto.subtle.decrypt(a,r.cryptoKey,e))})}function tl(e,t,n){var r,i,o,s,a,u,l;return H(function(h){switch(h.h){case 1:return r=nl(e),(i=HI.get(r))?h.return(i):(o=0,s=jr([e],n),h.m(2),s.method="HEAD",h.g(t.request(o,s).promise,4));case 4:a=h.i,i=a.headers["content-type"],h.o(3);break;case 2:if(u=h.l(),!u||u.code!=1002&&u.code!=1001){h.A(3);break}return s.method="GET",h.g(t.request(o,s).promise,6);case 6:l=h.i,i=l.headers["content-type"];case 3:return h.return(i?i.toLowerCase().split(";").shift():"")}})}function nl(e){for(var t=e.length,n=t-1;n>=0;n--){var r=e.charCodeAt(n);if(r===46){if(n+1<t)return e.slice(n+1,t).toLowerCase();break}if(r===47)break;(r===63||r===35)&&(t=n)}return""}function ic(e,t,n,r,i){return e=jr(e,r,i),(t!=0||n!=null)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}var HI=new Map().set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv","text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function l0(e,t){var n=this;this.g=t,this.j=e,this.i=null,this.M=new Map,this.C=1,this.B=this.o=null,this.V=0,this.h=new Map,this.N=!1,this.X=null,this.D=!1,this.l=new _u(function(){return GI(n)}),this.P=Date.now()/1e3,this.m=new Map,this.T={projection:null,hfov:null},this.ba=0,this.$=1/0,this.H=null,this.O=[],this.u=new Yt(function(){if(n.j&&n.g)if(n.j.presentationTimeline.U()){var r=n.j.presentationTimeline.Tb(),i=n.j.presentationTimeline.Cb();i-r>1?TI(n.g.Y,r,i):sp(n.g.Y)}else sp(n.g.Y),n.u&&n.u.stop();else n.u&&n.u.stop()}),this.I=null,this.J=!1,this.K=new Yt(function(){var r=n.g.video;!r.ended&&n.I&&(n.J=!0,r.currentTime=n.I,n.I=null)}),this.G=new Et}f=l0.prototype,f.destroy=function(){return this.l.destroy()};function GI(e){var t,n,r,i,o,s,a;return H(function(u){if(u.h==1){for(e.u&&e.u.stop(),e.u=null,e.K&&e.K.stop(),e.K=null,e.G&&(e.G.release(),e.G=null),t=[],n=d(e.h.values()),r=n.next();!r.done;r=n.next())i=r.value,Hs(i),t.push(_f(i)),i.ia&&(Rs(i.ia),i.ia=null);for(o=d(e.m.values()),s=o.next();!s.done;s=o.next())a=s.value,Rs(a);return u.g(Promise.all(t),2)}e.h.clear(),e.m.clear(),e.g=null,e.j=null,e.i=null,e.I=null,u.j()})}f.configure=function(e){if(this.i=e,this.X=new Dv({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor},!0),e.disableAudioPrefetch){var t=this.h.get("audio");t&&t.ia&&(Rs(t.ia),t.ia=null),t=d(this.m.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,Rs(this.m.get(n)),this.m.delete(n)}for(e.disableTextPrefetch&&(t=this.h.get(Bt))&&t.ia&&(Rs(t.ia),t.ia=null),e.disableVideoPrefetch&&(t=this.h.get("video"))&&t.ia&&(Rs(t.ia),t.ia=null),t=d(this.h.keys()),n=t.next();!n.done;n=t.next())n=this.h.get(n.value),n.ia?(a0(n.ia,e.segmentPrefetchLimit),e.segmentPrefetchLimit>0||(Rs(n.ia),n.ia=null)):e.segmentPrefetchLimit>0&&(n.ia=xp(this,n.stream));e.disableAudioPrefetch||JI(this)};function KI(e,t,n){e.j.presentationTimeline.U()||(e.ba=t,e.$=n)}f.start=function(e){var t=this;return H(function(n){if(n.h==1)return n.g(YI(t,e||new Map),2);qn(t.l),t.N=!0,n.j()})};function WI(e,t){var n,r,i,o,s,a;H(function(u){switch(u.h){case 1:return n=mr,e.V++,r=e.V,u.m(2),u.g(by(e.g.Y,n.Oa),4);case 4:u.o(3);break;case 2:i=u.l(),e.g&&e.g.onError(i);case 3:o=ar(t.mimeType,t.codecs),Pf(e.g.Y,o,e.j.sequenceMode,t.external),s=e.g.Y.ba,(s.isTextVisible()||e.i.alwaysStreamText)&&e.V==r&&(a=Ff(e,t),e.h.set(n.Oa,a),Ei(e,a,0)),u.j()}})}function zI(e){var t=e.h.get(Bt);t&&(Hs(t),_f(t).catch(function(){}),e.H=e.h.get(Bt),e.h.delete(Bt),t.stream&&t.stream.closeSegmentIndex&&t.stream.closeSegmentIndex()),e.B=null}function c0(e,t){for(var n=e.g.Ib()<0,r=d(e.h.values()),i=r.next();!i.done;i=r.next())i=i.value,i.sa&&i.sa.Ed(n),i.ia&&i.ia.Ed(n);for(r=d(e.m.values()),i=r.next();!i.done;i=r.next())i.value.Ed(n);(n=e.h.get("video"))&&(r=n.stream)&&(t?(t=r.trickModeVideo)&&!n.Hc&&(rl(e,t,!1,0,!1),n.Hc=r):(t=n.Hc)&&(n.Hc=null,rl(e,t,!0,0,!1)))}function f0(e,t,n,r,i,o){n=n===void 0?!1:n,r=r===void 0?0:r,i=i===void 0?!1:i,o=o===void 0?!1:o,e.o=t,e.N&&(t.video&&rl(e,t.video,n,r,i,o),t.audio&&rl(e,t.audio,n,r,i,o))}function jf(e,t){H(function(n){if(n.h==1)return e.H=null,e.B=t,e.N?t.segmentIndex?n.A(2):n.g(t.createSegmentIndex(),2):n.return();rl(e,t,!0,0,!1),n.j()})}function $I(e){var t=e.h.get(Bt);t&&rl(e,t.stream,!0,0,!0)}function XI(e,t){for(var n=d(e.M.entries()),r=n.next();!r.done;r=n.next()){var i=d(r.value);r=i.next().value,i=i.next().value,r.includes(t.type)&&(i(),e.M.delete(r))}}function rl(e,t,n,r,i,o){var s=e.h.get(t.type);s||t.type!=Bt?s&&(s.Hc&&(t.trickModeVideo?(s.Hc=t,t=t.trickModeVideo):s.Hc=null),s.stream!=t||i)&&(e.m.has(t)?s.ia=e.m.get(t):s.ia&&UI(s.ia,t),t.type==Bt&&s.stream!=t&&(i=ar(t.mimeType,t.codecs),Pf(e.g.Y,i,e.j.sequenceMode,t.external)),!e.m.has(s.stream)&&s.stream.closeSegmentIndex&&(s.Ja?(i="("+s.type+":"+s.stream.id+")",e.M.has(i)||e.M.set(i,s.stream.closeSegmentIndex)):s.stream.closeSegmentIndex()),i=s.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,s.stream=t,s.sa=null,s.$f=!!o,t.dependencyStream?s.Ac=Ff(e,t.dependencyStream):s.Ac=null,g0(e),i&&(s.jb=null,s.lc=null,s.kc=null,t.isAudioMuxedInVideo&&(t=null,s.type==="video"?t=e.h.get("audio"):s.type==="audio"&&(t=e.h.get("video")),t&&(_f(t).catch(function(){}),t.jb=null,t.lc=null,t.kc=null,Ep(e,t),d0(e,t).catch(function(a){e.g&&e.g.onError(a)})))),n?s.Pb?s.Hd=!0:s.Ja?(s.Nb=!0,s.cd=r,s.Hd=!0):(Hs(s),Ip(e,s,!0,r).catch(function(a){e.g&&e.g.onError(a)})):s.Ja||s.kb||Ei(e,s,0),d0(e,s).catch(function(a){e.g&&e.g.onError(a)})):WI(e,t)}function d0(e,t){var n,r,i;return H(function(o){if(o.h==1)return t.Va?(n=t.stream,r=t.Va,n.segmentIndex?o.A(2):o.g(n.createSegmentIndex(),2)):o.return();if(o.h!=4)return i=n.dependencyStream,!i||i.segmentIndex?o.A(4):o.g(i.createSegmentIndex(),4);if(t.Va!=r||t.stream!=n)return o.return();var s=e.g.Sb(),a=ja(e.g.Y,t.type),u=t.stream.segmentIndex.find(t.Fa?t.Fa.endTime:s),l=u==null?null:t.stream.segmentIndex.get(u);u=l?Jh(l):null,l&&!u&&(u=(l.endTime-l.getStartTime())*(t.stream.bandwidth||e.o.bandwidth)/8),u?((l=l.ea)&&(u+=(l.endByte?l.endByte+1-l.startByte:null)||0),l=e.g.getBandwidthEstimate(),s=u*8/l<(a||0)-s-e.i.rebufferingGoal||t.Va.h.g>u):s=!0,s&&t.Va.abort(),o.j()})}f.Tc=function(){if(this.g){for(var e=this.g.Sb(),t=d(this.h.keys()),n=t.next();!n.done;n=t.next()){var r=n.value;n=this.h.get(r);var i;if((i=!this.J)&&(i=this.g.Y,r==Bt?(i=i.h,i=i.g==null||i.h==null?!1:e>=i.g&&e<i.h):(i=Qu(i,r),i=Qh(i,e)),i=!i),i){if(this.P=0,n.ia&&(n.ia.h=null),n.type==="audio"){i=d(this.m.values());for(var o=i.next();!o.done;o=i.next())o.value.h=null}n.sa=null,(ja(this.g.Y,r)!=null||n.Ja)&&Ep(this,n),n.Va&&(n.Va.abort(),n.Va=null),r===Bt&&(r=this.g.Y,r.K&&r.K.g.clear()),n.Tc=!0}!this.J||n.Pb||n.Ja||n.kb||Ei(this,n,0)}sc(this)&&Pp(this)}};function Ep(e,t){t.Pb||t.Nb||(t.Ja?(t.Nb=!0,t.cd=0):op(e.g.Y,t.type)==null?t.kb==null&&Ei(e,t,0):(Hs(t),Ip(e,t,!1,0).catch(function(n){e.g&&e.g.onError(n)})))}function YI(e,t){var n,r,i,o,s,a,u,l;return H(function(h){if(h.h==1){if(!e.o)throw new fe(2,5,5006);return n=Gf(e,!0),r=e.g.Y,h.g(r.init(n,e.j.sequenceMode,e.j.type,e.j.ignoreManifestTimestampsInSegmentsMode),2)}for(qn(e.l),e.updateDuration(),i=d(n.keys()),o=i.next();!o.done;o=i.next())s=o.value,a=n.get(s),e.h.has(s)||(u=Ff(e,a),t.has(a.id)&&(l=t.get(a.id),FI(l,function(g,m,E){return Vf(g,m,E||null,e.i.retryParameters,e.g.nc)}),u.ia=l),e.h.set(s,u),Ei(e,u,0));g0(e),h.j()})}function Ff(e,t){var n={stream:t,type:t.type,sa:null,ia:xp(e,t),Fa:null,jb:null,kf:null,lc:null,kc:null,hf:null,jf:null,Hc:null,endOfStream:!1,Ja:!1,kb:null,Nb:!1,cd:0,Hd:!1,Pb:!1,Tc:!0,$f:!1,bh:!1,od:!1,Va:null,Ac:null};return t.dependencyStream&&(n.Ac=Ff(e,t.dependencyStream)),n}function xp(e,t){if(t.type==="video"&&e.i.disableVideoPrefetch||t.type==="audio"&&e.i.disableAudioPrefetch||t.type===Bt&&(t.mimeType=="application/cea-608"||t.mimeType=="application/cea-708")||t.type===Bt&&e.i.disableTextPrefetch)return null;if(e.m.has(t))return e.m.get(t);var n=e.h.get(t.type);return(n=n&&n.ia)&&t===n.i?n:e.i.segmentPrefetchLimit>0?new Lf(e.i.segmentPrefetchLimit,t,function(r,i,o){return Vf(r,i,o||null,e.i.retryParameters,e.g.nc)},e.g.Ib()<0,e.g.cl):null}function JI(e){for(var t=e.i.segmentPrefetchLimit,n=e.i.prefetchAudioLanguages,r=d(e.j.variants),i=r.next(),o={};!i.done;o={Gb:void 0},i=r.next())if(o.Gb=i.value,o.Gb.audio)if(e.m.has(o.Gb.audio)){if(i=e.m.get(o.Gb.audio),a0(i,t),!(t>0&&n.some(function(a){return function(u){return ba(a.Gb.audio.language,u)}}(o)))){var s=e.h.get(o.Gb.audio.type);i!==(s&&s.ia)&&Rs(i),e.m.delete(o.Gb.audio)}}else t<=0||!n.some(function(a){return function(u){return ba(a.Gb.audio.language,u)}}(o))||!(i=xp(e,o.Gb.audio))||(o.Gb.audio.segmentIndex||o.Gb.audio.createSegmentIndex(),e.m.set(o.Gb.audio,i))}f.updateDuration=function(){var e=ly(),t=this.j.presentationTimeline.getDuration();t<1/0?(e&&(this.u&&this.u.stop(),sp(this.g.Y)),this.g.Y.ub(t)):e?(this.u&&this.u.Ea(.5),this.g.Y.ub(1/0)):this.g.Y.ub(4294967296)};function QI(e,t){var n,r,i,o,s,a,u,l,h;return H(function(g){switch(g.h){case 1:if(qn(e.l),n=mr,t.Ja||t.kb==null||t.Pb)return g.return();if(t.kb=null,!t.Nb){g.A(2);break}return g.g(Ip(e,t,t.Hd,t.cd),3);case 3:return g.return();case 2:if(XI(e,t),t.stream.segmentIndex){g.A(4);break}return r=t.stream,g.m(5),g.g(t.stream.createSegmentIndex(),7);case 7:g.o(6);break;case 5:return i=g.l(),g.g(Cp(e,t,i),8);case 8:return g.return();case 6:if(r!=t.stream)return r.closeSegmentIndex&&r.closeSegmentIndex(),t.Ja||t.kb||Ei(e,t,0),g.return();case 4:if(!t.Ac){g.A(9);break}if(t.Ac.stream.segmentIndex){g.A(9);break}return g.m(11),g.g(t.Ac.stream.createSegmentIndex(),13);case 13:g.o(9);break;case 11:g.l();case 9:g.m(14),o=ZI(e,t),o!=null&&(Ei(e,t,o),t.od=!1),g.o(15);break;case 14:return s=g.l(),g.g(Cp(e,t,s),16);case 16:return g.return();case 15:if(t.type===n.Oa)return g.return();if(a=[],t.stream&&!t.stream.isAudioMuxedInVideo&&a.push(t),u=t.type===n.aa?n.wa:n.aa,(l=e.h.get(u))&&l.stream&&!l.stream.isAudioMuxedInVideo&&a.push(l),!e.N||!a.every(function(m){return m.endOfStream})){g.A(0);break}return g.g(e.g.Y.endOfStream(),18);case 18:qn(e.l),h=e.g.Y.getDuration(),h!=0&&h<e.j.presentationTimeline.getDuration()&&e.j.presentationTimeline.ub(h),g.j()}})}function ZI(e,t){if(Ap(t))return yI(e.g.Y,t.stream.originalId||""),null;if(t.type==Bt&&SI(e.g.Y),t.stream.isAudioMuxedInVideo&&t.type=="audio")return null;if(t.type!=Bt&&La(e.g.Y))return Hf(e,!0),null;var n=e.i.updateIntervalSeconds/Math.max(1,Math.abs(e.g.Ib()));if(!Ry(e.g.Y)&&t.type!=Bt)return n/2;var r=e.g.Sb();if(t.type==="audio")for(var i=d(e.m.keys()),o=i.next();!o.done;o=i.next())o=e.m.get(o.value),o.Ya(r,!0),nc(o,r);i=t.Fa?t.Fa.endTime:r;var s=gI(e.g.Y,t.type,r);o=Math.max(1,Math.max(e.i.rebufferingGoal,e.i.bufferingGoal)*e.C);var a=e.j.presentationTimeline.getDuration()-i,u=ja(e.g.Y,t.type);if(a<1e-6&&u)return t.endOfStream=!0,t.type=="video"&&((n=e.h.get(Bt))&&Ap(n)&&(n.endOfStream=!0),(n=e.h.get("audio"))&&n.stream.isAudioMuxedInVideo&&(n.endOfStream=!0)),null;if(t.endOfStream=!1,s>=o)return n/2;if(a=!t.sa,u=Uf(e,t,r,u),!u)return e=1/0,(t=t.Fa)&&(e=t.endTime-t.startTime),Math.min(e/2,n);s=t.jb;var l=u.ea;s&&l&&Jl(l,s)&&(s.g=l.g),s=!1,a&&t.$f&&(s=!0,t.$f=!1),a=1/0,l=Array.from(e.h.values()),l=d(l);for(var h=l.next();!h.done;h=l.next())h=h.value,Ap(h)||h.stream.isAudioMuxedInVideo||h.sa&&!h.sa.current()||(a=Math.min(a,h.Fa?h.Fa.endTime:r));return i>=a+e.j.presentationTimeline.h?n:(t.ia&&t.sa&&!e.m.has(t.stream)&&(t.ia.Ya(u.startTime+.001),nc(t.ia,u.startTime).catch(function(){})),sc(e)&&rC(e,t,u)||(qI(e,t,r,u,s).catch(function(){}),t.Ac&&h0(e,t.Ac,r,o)),null)}function Uf(e,t,n,r){if(t.sa){var i=t.sa.current();return i&&t.Fa&&(n=t.Fa.endTime,Xu(t.Fa.startTime,i.startTime,.002)&&Xu(n,i.endTime,.002)&&(i=t.sa.next().value)),i}if(t.Fa||r)return i=t.Fa?t.Fa.endTime:r,n=e.g.Ib()<0,t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Qb(i,!1,n)),t.sa&&t.sa.next().value;r=e.j.sequenceMode||sc(e)?0:e.i.inaccurateManifestTolerance;var o=Math.max(n-r,0),s=e.g.Y.getDuration();for(Math.abs(o-s)<1&&(r=1,o=Math.max(n-r,0)),s=e.g.Ib()<0,e=null,r&&(t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Qb(o,!1,s)),e=t.sa&&t.sa.next().value),e||(t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Qb(n,!1,s)),e=t.sa&&t.sa.next().value);((i=e)==null?void 0:i.Vb())===2;)r=n=void 0,e=(r=(n=t.sa)==null?void 0:n.next().value)!=null?r:null;return e}function qI(e,t,n,r,i){var o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe;return H(function(te){switch(te.h){case 1:if(o=mr,s=t.stream,a=t.sa,t.Ja=!0,te.m(2),r.Vb()==2)throw new fe(1,1,1011);return te.g(tC(e,t,r,i),4);case 4:return qn(e.l),e.D?te.return():(u=s.mimeType=="video/mp4"||s.mimeType=="audio/mp4",l=R.ReadableStream,e.i.lowLatencyMode&&e.j.isLowLatency&&l&&u&&(e.j.type!="HLS"||r.o)?(m=new Uint8Array(0),A=E=!1,b=function(le){var ie,ve,ce;return H(function(Ee){switch(Ee.h){case 1:if(E||(A=!0,qn(e.l),e.D))return Ee.return();if(Ee.m(2),m=dr(m,le),ie=!1,ve=0,new Hn().box("mdat",function(ye){ve=ye.size+ye.start,ie=!0}).parse(m,!1,!0),!ie){Ee.A(4);break}return ce=m.subarray(0,ve),m=m.subarray(ve),Ee.g(wp(e,t,n,s,r,ce,!0,i),5);case 5:t.ia&&t.sa&&nc(t.ia,r.startTime,!0);case 4:Ee.o(0);break;case 2:k=Ee.l(),Ee.j()}})},te.g(oc(e,t,r,b),9)):(h=oc(e,t,r),te.g(h,7)));case 7:return g=te.i,qn(e.l),e.D?te.return():(qn(e.l),t.Nb?(t.Ja=!1,Ei(e,t,0),te.return()):te.g(wp(e,t,n,s,r,g,!1,i),6));case 9:if(V=te.i,k)throw k;if(A){te.A(10);break}return E=!0,qn(e.l),e.D?te.return():t.Nb?(t.Ja=!1,Ei(e,t,0),te.return()):te.g(wp(e,t,n,s,r,V,!1,i),10);case 10:t.ia&&t.sa&&nc(t.ia,r.startTime,!0);case 6:if(qn(e.l),e.D)return te.return();t.Fa=r,a.next(),t.Ja=!1,t.bh=!1,B=e.g.Y.Bc(),Z=B[t.type],JSON.stringify(Z),t.Nb||(ue=null,t.type===o.wa?ue=e.h.get(o.aa):t.type===o.aa&&(ue=e.h.get(o.wa)),ue&&ue.type==o.aa?e.g.td(r,t.stream,ue.stream.isAudioMuxedInVideo,!1):e.g.td(r,t.stream,t.stream.codecs.includes(","),!1)),Hs(t),Ei(e,t,0),te.o(0);break;case 2:if(pe=te.l(),qn(e.l,pe),e.D)return te.return();if(t.Ja=!1,pe.code==7001)t.Ja=!1,Hs(t),Ei(e,t,0),te.A(0);else if(t.type==o.Oa&&e.i.ignoreTextStreamFailures)e.h.delete(o.Oa),te.A(0);else return pe.code==3017?te.g(eC(e,t,pe),0):(t.od=!0,pe.category==1&&t.ia&&rc(t.ia,r),pe.severity=2,te.g(Cp(e,t,pe),0))}})}function h0(e,t,n,r){var i,o,s,a,u,l,h,g,m,E,A,k,b;return H(function(V){switch(V.h){case 1:for(i=mr,o=t.stream,u=(a=(s=o.segmentIndex)&&s.Qb(n))&&a.next().value;u&&e.O.includes(u.startTime);)u=a&&a.next().value;if(!u){V.A(0);break}if(l=u.ea,!l||Jl(l,t.jb)){V.A(3);break}return t.jb=l,V.m(4),V.g(oc(e,t,l),6);case 6:if(h=V.i,!e.g)return V.return();var B=e.g.Y;B.C&&Ls(B.C,h,0,o),e.O=[],V.o(3);break;case 4:throw g=V.l(),t.jb=null,g;case 3:if(t.Fa&&t.Fa==u){V.A(0);break}return t.Fa=u,V.m(8),V.g(oc(e,t,u),10);case 10:if(m=V.i,!e.g)return V.return();B=e.g.Y,B.C&&Ls(B.C,m,0,o),e.O.push(u.startTime),V.o(9);break;case 8:throw E=V.l(),t.Fa=null,E;case 9:if(!e.g)return V.return();if(t.Nb||(A=null,t.type===i.wa?A=e.h.get(i.aa):t.type===i.aa&&(A=e.h.get(i.wa)),A&&A.type==i.aa?e.g.td(u,t.stream,A.stream.isAudioMuxedInVideo,!0):e.g.td(u,t.stream,t.stream.codecs.includes(","),!0)),k=Math.max.apply(Math,[0].concat(M(e.O))),b=e.g.Sb(),b+r>k)return V.g(h0(e,t,u.startTime,r),0);V.A(0)}})}function eC(e,t,n){var r,i,o,s,a,u,l;return H(function(h){switch(h.h){case 1:if(r=Array.from(e.h.values()),r.some(function(g){return g!=t&&g.bh})){h.A(2);break}if(e.i.avoidEvictionOnQuotaExceededError)return i=Mp(e,n),e.g.disableStream(t.stream,i)||Ei(e,t,4),h.return();if(o=Math.round(100*e.C),o>20){e.C-=.2,h.A(3);break}if(o>4){e.C-=.04,h.A(3);break}if(s=Mp(e,n),a=e.g.disableStream(t.stream,s),!a){t.od=!0,e.D=!0,e.g.onError(n),h.A(5);break}return e.C=1,u=e.g.Sb(),h.g(Bf(e,t,u),5);case 5:return h.return();case 3:return t.bh=!0,l=e.g.Sb(),h.g(Bf(e,t,l),2);case 2:Ei(e,t,4),h.j()}})}function tC(e,t,n,r){var i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z;return H(function(ue){switch(ue.h){case 1:if(i=mr,o=t.Fa==null,s=[],a=Math.max(0,Math.max(n.appendWindowStart,e.ba)-.1),u=Math.min(n.appendWindowEnd,e.$)+.1,l=n.codecs||t.stream.codecs,h=Vs(l),g=yi(n.mimeType||t.stream.mimeType),m=n.timestampOffset,m==t.kf&&a==t.lc&&u==t.kc&&h==t.hf&&g==t.jf){ue.A(2);break}if(E=t.hf&&t.jf&&CI(e.g.Y,t.type,g,l,Gf(e)),!E){ue.A(3);break}if(A=null,t.type===i.wa?A=e.h.get(i.aa):t.type===i.aa&&(A=e.h.get(i.wa)),!A){ue.A(3);break}return ue.g(_f(A).catch(function(){}),5);case 5:A.jb=null,A.lc=null,A.kc=null,Ep(e,A);case 3:return ue.g(p0(e,t,m,a,u,n,h,g),2);case 2:return Jl(n.ea,t.jb)||(t.jb=n.ea,n.l&&n.ea&&(k=oc(e,t,n.ea),b=function(){var pe,te,le,ie,ve,ce,Ee,ye,Ve,Le,Ce;return H(function(ke){switch(ke.h){case 1:return ke.m(2),ke.g(k,4);case 4:return pe=ke.i,qn(e.l),te=null,le=new Map,ie={projection:null,hfov:null},t.stream&&(ve=t.stream.videoLayout)&&(ce=ve.split("/"),ce.includes("PROJ-RECT")?ie.projection="rect":ce.includes("PROJ-EQUI")?ie.projection="equi":ce.includes("PROJ-HEQU")?ie.projection="hequ":ce.includes("PROJ-PRIM")?ie.projection="prim":ce.includes("PROJ-AIV")&&(ie.projection="hequ")),Ee=new Hn,Ee.box("moov",Wt).box("trak",Wt).box("mdia",Wt).S("mdhd",function(Ge){te=Ef(Ge.reader,Ge.version).timescale}).S("hdlr",function(Ge){switch(Ge=Ge.reader,Ge.skip(4),Ge=Ge.Mb(4,!1),String.fromCharCode(Ge[0],Ge[1],Ge[2],Ge[3])){case"soun":le.set(i.aa,te);break;case"vide":le.set(i.wa,te)}te=null}),t.type!==i.wa||ie.projection||Ee.box("minf",Wt).box("stbl",Wt).S("stsd",ca).box("encv",fo).box("avc1",fo).box("avc3",fo).box("hev1",fo).box("hvc1",fo).box("dvav",fo).box("dva1",fo).box("dvh1",fo).box("dvhe",fo).box("dvc1",fo).box("dvi1",fo).box("vexu",Wt).box("proj",Wt).S("prji",function(Ge){Ge=Ge.reader.xd(),ie.projection=Ge}).box("hfov",function(Ge){Ge=Ge.reader.W()/1e3,ie.hfov=Ge}),Ee.parse(pe,!0,!0),t.type===i.wa&&nC(e,ie),le.has(t.type)?n.ea.timescale=le.get(t.type):te!=null&&(n.ea.timescale=te),ye=t.stream.segmentIndex,ye instanceof Er&&(Ve=DI(ye,n.startTime)),Le=t.stream.closedCaptions&&t.stream.closedCaptions.size>0,ke.g(e.g.Qh(t.type,pe),5);case 5:return ke.g(kf(e.g.Y,t.type,pe,null,t.stream,Le,t.Tc,r,!1,!1,Ve),6);case 6:ke.o(0);break;case 2:throw Ce=ke.l(),t.jb=null,Ce}})},V=n.startTime,o&&(B=ja(e.g.Y,t.type),B!=null&&(V=B)),e.g.Dk(V,n.ea),s.push(b()))),Z=t.Fa?t.Fa.i:-1,n.i!=Z&&s.push(Oy(e.g.Y,t.type,n.startTime)),ue.g(Promise.all(s),0)}})}function p0(e,t,n,r,i,o,s,a){var u,l,h,g,m;return H(function(E){switch(E.h){case 1:if(u=mr,l=Gf(e),E.m(2),t.lc=r,t.kc=i,s&&(t.hf=s),a&&(t.jf=a),t.kf=n,h=e.j.sequenceMode||e.j.type=="HLS",g=null,t.type===u.wa?g=e.h.get(u.aa):t.type===u.aa&&(g=e.h.get(u.wa)),!(g&&g.stream&&g.stream.isAudioMuxedInVideo)){E.A(4);break}return E.g(Dy(e.g.Y,g.type,n,r,i,h,g.stream.mimeType,g.stream.codecs,l),4);case 4:return E.g(Dy(e.g.Y,t.type,n,r,i,h,o.mimeType||t.stream.mimeType,o.codecs||t.stream.codecs,l),6);case 6:E.o(0);break;case 2:throw m=E.l(),t.lc=null,t.kc=null,t.hf=null,t.jf=null,t.kf=null,m}})}function wp(e,t,n,r,i,o,s,a){s=s===void 0?!1:s,a=a===void 0?!1:a;var u,l,h,g;return H(function(m){switch(m.h){case 1:return u=r.closedCaptions&&r.closedCaptions.size>0,e.i.shouldFixTimestampOffset&&(l=r.mimeType=="video/mp4"||r.mimeType=="audio/mp4",h=null,i.ea&&(h=i.ea.timescale),l&&h&&r.type==="video"&&e.j.type=="DASH"&&new Hn().box("moof",Wt).box("traf",Wt).S("tfdt",function(E){var A,k,b,V,B,Z;return H(function(ue){return A=Tf(E.reader,E.version),k=A.baseMediaDecodeTime,k?(b=-k/h,V=Number(t.kf)||0,V<b?(B=t.lc,Z=t.kc,ue.g(p0(e,t,b,B,Z,i),0)):ue.A(0)):ue.return()})}).parse(o,!1,s)),m.g(Bf(e,t,n),2);case 2:return qn(e.l),g=t.Tc,t.Tc=!1,m.g(e.g.Qh(t.type,o),3);case 3:return m.g(kf(e.g.Y,t.type,o,i,r,u,g,a,s),4);case 4:qn(e.l),m.j()}})}function Bf(e,t,n){var r,i,o,s,a,u,l,h,g;return H(function(m){if(m.h==1)return e.H==t&&(e.H=null),r=t.stream.segmentIndex,r instanceof Er&&(r.Ya(e.j.presentationTimeline.Db()),i=[],bI(r,function(E){i.push(E.Pe())})),o=Math.max(e.i.bufferBehind*e.C,e.j.presentationTimeline.h),s=op(e.g.Y,t.type),s==null?m.return():(a=n-s,u=e.i.evictionGoal,l=e.j.presentationTimeline.Tb(),h=e.j.presentationTimeline.Cb(),g=a-o,h-l>u&&(g=Math.max(a-o,l-u-s)),g<=u?m.return():m.g(e.g.Y.remove(t.type,s,s+g,i),2));if(m.h!=4)return qn(e.l),e.H?m.g(Bf(e,e.H,n),4):m.A(0);qn(e.l),m.j()})}function Ap(e){return e&&e.type==Bt&&(e.stream.mimeType=="application/cea-608"||e.stream.mimeType=="application/cea-708")}function oc(e,t,n,r){var i,o,s,a,u;return H(function(l){switch(l.h){case 1:if(i=n.Ub())return l.return(i);if(o=null,t.ia){var h=t.ia,g=h.g;n instanceof qi&&(g=h.j),g.has(n)?(h=g.get(n),r&&(h.xh=r),o=h.fe):o=null}return o||(o=Vf(n,t.stream,r||null,e.i.retryParameters,e.g.nc)),s=0,t.sa&&(s=t.sa.h),t.Va=o,l.g(o.promise,2);case 2:if(a=l.i,t.Va=null,u=a.data,!n.aesKey){l.A(3);break}return l.g(Tp(u,n.aesKey,s),4);case 4:u=l.i;case 3:return l.return(u)}})}function Vf(e,t,n,r,i,o){o=o===void 0?!1:o;var s=e instanceof Rt?e:void 0,a=s?1:0;return e=ic(e.R(),e.startByte,e.endByte,r,n),e.contentType=t.type,i.request(Go,e,{type:a,stream:t,segment:s,isPreload:o})}function Ip(e,t,n,r){var i,o;return H(function(s){if(s.h==1)return t.Nb=!1,t.Hd=!1,t.cd=0,t.Pb=!0,t.Fa=null,t.sa=null,t.ia&&!e.m.has(t.stream)&&Rs(t.ia),r?(i=e.g.Sb(),o=e.g.Y.getDuration(),s.g(e.g.Y.remove(t.type,i+r,o),3)):s.g(by(e.g.Y,t.type),4);if(s.h!=3)return qn(e.l),n?s.g(e.g.Y.flush(t.type),3):s.A(3);qn(e.l),t.Pb=!1,t.endOfStream=!1,t.Ja||t.kb||Ei(e,t,0),s.j()})}function Ei(e,t,n){var r=t.type;(r!=Bt||e.h.has(r))&&(t.kb=new sa(function(){var i;return H(function(o){if(o.h==1)return o.m(2),o.g(QI(e,t),4);if(o.h!=2)return o.o(0);i=o.l(),e.g&&e.g.onError(i),o.j()})}).ka(n))}function Hs(e){e.kb!=null&&(e.kb.stop(),e.kb=null)}function _f(e){return H(function(t){return e.Va?t.g(e.Va.abort(),0):t.A(0)})}function Cp(e,t,n){var r,i,o,s,a;return H(function(u){switch(u.h){case 1:return n.code==3024?(t.Ja=!1,Hs(t),Ei(e,t,0),u.return()):u.g(Ov(e.X),2);case 2:if(qn(e.l),n.category===1&&n.code!=1003){if(t.Hc)return c0(e,!1),u.return();r=Mp(e,n),n.handled=e.g.disableStream(t.stream,r),n.handled&&(n.severity=1)}if(n.handled||n.code!=1011){u.A(3);break}for(i=e.g.Sb(),o=ja(e.g.Y,t.type),s=Uf(e,t,i,o);((a=s)==null?void 0:a.Vb())===2;)t.Fa=s,s=Uf(e,t,i,o);if(!s){u.A(3);break}return u.g(Oy(e.g.Y,t.type,s.startTime),5);case 5:return t.Ja=!1,t.od=!1,Hs(t),Ei(e,t,0),u.return();case 3:(!n.handled||n.code!=1011)&&e.g.onError(n),n.handled||e.i.failureCallback(n),u.j()}})}function Mp(e,t){return e.i.maxDisabledTime===0&&t.code==1011?1:e.i.maxDisabledTime}function Hf(e,t){t=t===void 0?!1:t;var n,r,i,o,s,a;return H(function(u){return u.h==1?(n=Date.now()/1e3,r=e.i.minTimeBetweenRecoveries,!t&&(!e.i.allowMediaSourceRecoveries||n-e.P<r)?u.return(!1):(e.P=n,i=mr,(o=e.h.get(i.aa))&&(Hs(o),o.Va&&(o.Va.abort(),o.Va=null),o.jb=null,o.lc=null,o.kc=null,o.Ja=!1,o.Nb=!1,o.cd=0,o.Hd=!1,o.Pb=!1,o.sa&&o.sa.hh()),(s=e.h.get(i.wa))&&(Hs(s),s.Va&&(s.Va.abort(),s.Va=null),s.jb=null,s.lc=null,s.kc=null,s.Ja=!1,s.Nb=!1,s.cd=0,s.Hd=!1,s.Pb=!1,s.sa&&s.sa.hh()),a=e.g.video.paused,u.g(jy(e.g.Y,Gf(e)),2))):(!s||s.Pb||s.Ja||s.kb||Ei(e,s,0),!o||o.Pb||o.Ja||o.kb||Ei(e,o,0),a||e.g.video.play(),u.return(!0))})}function nC(e,t){if(e.T.projection!=t.projection||e.T.hfov!=t.hfov){if(t.projection!=null||t.hfov!=null){var n=new Map().set("detail",t);n=new yt("spatialvideoinfo",n)}else n=new yt("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.T=t}}function sc(e){if(e.i.crossBoundaryStrategy!=="keep")return!0;var t=ct();if(t.wb()){if(!t.If()){for(t=d(e.h.keys()),n=t.next();!n.done;n=t.next())if(n=e.h.get(n.value),n.type!==mr.Oa&&(n=n.stream)&&n.fullMimeTypes&&n.fullMimeTypes.size>1){for(e=new Set,t=d(n.fullMimeTypes),n=t.next();!n.done;n=t.next())e.add(ka(n.value));return e.size>1}}}else{t=d(e.h.keys());for(var n=t.next();!n.done;n=t.next())if(n=e.h.get(n.value),n.type!==mr.Oa&&(n=n.stream)&&n.fullMimeTypes&&n.fullMimeTypes.size>1)return!0}return!1}function g0(e){e.G.Ra(),sc(e)&&(e.G.F(e.g.video,"waiting",function(){return Pp(e)}),e.G.F(e.g.video,"timeupdate",function(){return Pp(e)}))}function Pp(e){if(sc(e)){e.K.stop();var t=e.g.Sb(),n=e.h.get("video")||e.h.get("audio");n&&(n=n.jb)&&n.g!==null&&(t=n.g-t,t<0||t>1||(e.I=n.g+.1,e.K.ka(t)))}}function rC(e,t,n){if(t.type===Bt)return!1;var r=t.jb;if(!r)return!1;var i=n.ea;if(n=r.g!==i.g,e.i.crossBoundaryStrategy==="reset_to_encrypted"&&(r.encrypted||i.encrypted||(n=!1),r.encrypted&&(e.i.crossBoundaryStrategy="keep")),e.i.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&r.encrypted==i.encrypted&&(n=!1),e.i.crossBoundaryStrategy==="keep"&&r.mimeType&&i.mimeType){var o=ii(Si(r.mimeType)),s=ii(Si(r.mimeType));r.mimeType==i.mimeType&&o==s&&(n=!1)}return(e.h.get("video")||e.h.get("audio"))===t&&n&&(e.J||t.Tc)&&(e.J=!1,Hf(e,!0).then(function(){var a=new Map().set("oldEncrypted",r.encrypted).set("newEncrypted",i.encrypted);e.g.onEvent(new yt("boundarycrossed",a))})),n}function Gf(e,t){function n(o){if(o.fullMimeTypes&&o.fullMimeTypes.size>1&&e.h.has(o.type)){var s=e.h.get(o.type),a=ja(e.g.Y,s.type),u=e.g.Sb();(s=Uf(e,s,u,a))&&s.codecs&&s.mimeType&&(o.codecs=s.codecs,o.mimeType=s.mimeType)}}t=t===void 0?!1:t;var r=new Map,i=e.o.audio;return i&&(n(i),r.set("audio",i)),(i=e.o.video)&&(n(i),r.set("video",i)),t&&e.B&&r.set(Bt,e.B),r}function Kf(){}function kp(e,t,n,r,i){var o=i in r,s=o?n.constructor==Object&&Object.keys(r).length==0:n.constructor==Object&&Object.keys(n).length==0,a=o||s,u=!0,l;for(l in t){var h=i+"."+l,g=o?r[i]:n[l];a||l in n?t[l]===void 0?g===void 0||a?delete e[l]:e[l]=Ki(g):s?e[l]=t[l]:g.constructor==Object&&t[l]&&t[l].constructor==Object?(e[l]||(e[l]=Ki(g)),h=kp(e[l],t[l],g,r,h),u=u&&h):typeof t[l]!=typeof g||t[l]==null||typeof t[l]!="function"&&t[l].constructor!=g.constructor?(gn("Invalid config, wrong type for "+h),u=!1):typeof n[l]=="function"&&n[l].length!=t[l].length?(ut("Unexpected number of arguments for "+h),e[l]=t[l]):e[l]=Array.isArray(e[l])?t[l].slice():t[l]:(gn("Invalid config, unrecognized key "+h),u=!1)}return u}function Wf(e,t){for(var n={},r=n,i=0,o=0;i=e.indexOf(".",i),!(i<0);)(i==0||e[i-1]!="\\")&&(o=e.substring(o,i).replace(/\\\./g,"."),r[o]={},r=r[o],o=i+1),i+=1;return r[e.substring(o).replace(/\\\./g,".")]=t,n}function il(e,t){return e&&t}function m0(e,t){function n(o){for(var s=d(Object.keys(o)),a=s.next();!a.done;a=s.next())if(a=a.value,!(o[a]instanceof HTMLElement))if(i(o[a])&&Object.keys(o[a]).length===0)delete o[a];else{var u=o[a];Array.isArray(u)&&u.length===0||typeof o[a]=="function"?delete o[a]:i(o[a])&&(n(o[a]),Object.keys(o[a]).length===0&&delete o[a])}}function r(o,s){return Object.keys(o).reduce(function(a,u){var l=o[u];return s.hasOwnProperty(u)?l instanceof HTMLElement&&s[u]instanceof HTMLElement?l.isEqualNode(s[u])||(a[u]=l):i(l)&&i(s[u])?(l=r(l,s[u]),(Object.keys(l).length>0||!i(l))&&(a[u]=l)):Array.isArray(l)&&Array.isArray(s[u])?Sn(l,s[u])||(a[u]=l):Number.isNaN(l)&&Number.isNaN(s[u])||l!==s[u]&&(a[u]=l):a[u]=l,a},{})}function i(o){return o&&typeof o=="object"&&!Array.isArray(o)}return e=r(e,t),n(e),e}Re("shaka.util.ConfigUtils",Kf),Kf.getDifferenceFromConfigObjects=m0,Kf.convertToConfigObject=Wf,Kf.mergeConfigObjects=kp,Re("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function eo(){}function v0(e){return e=fi(e),new Ct(e).Ab}function ac(e,t,n){function r(a){gr(o).setUint32(s,a.byteLength,!0),s+=4,o.set(wt(a),s),s+=a.byteLength}if(!n||!n.byteLength)throw new fe(2,6,6015);var i;typeof t=="string"?i=_i(t,!0):i=t,e=fi(e),e=_i(e,!0);var o=new Uint8Array(12+e.byteLength+i.byteLength+n.byteLength),s=0;return r(e),r(i),r(n),o}function Rp(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=fi(e).split("skd://").pop(),ac(e,n,t))}function zf(e,t){e===2&&(e=t.drmInfo)&&xo(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}Re("shaka.drm.FairPlay",eo),eo.commonFairPlayResponse=function(e,t){if(e===2&&(e=t.originalRequest.drmInfo)&&xo(e.keySystem)){try{var n=Un(t.data)}catch{return}if(e=!1,n=n.trim(),n.substr(0,5)==="<ckc>"&&n.substr(-6)==="</ckc>"&&(n=n.slice(5,-6),e=!0),!e)try{var r=JSON.parse(n);r.ckc&&(n=r.ckc,e=!0),r.CkcMessage&&(n=r.CkcMessage,e=!0),r.License&&(n=r.License,e=!0)}catch{}e&&(t.data=Wr(bi(n)))}},eo.muxFairPlayRequest=function(e,t){zf(e,t)},eo.expressplayFairPlayRequest=function(e,t){if(e===2){var n=t.drmInfo;n&&xo(n.keySystem)&&zf(e,t)}},eo.conaxFairPlayRequest=function(e,t){zf(e,t)},eo.ezdrmFairPlayRequest=function(e,t){zf(e,t)},eo.verimatrixFairPlayRequest=function(e,t){e===2&&(e=t.drmInfo)&&xo(e.keySystem)&&(e=wt(t.body),e=Ri(e),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=Vi("spc="+e))},eo.muxInitDataTransform=function(e,t,n){return Rp(e,t,n)},eo.expressplayInitDataTransform=function(e,t,n){return Rp(e,t,n)},eo.conaxInitDataTransform=function(e,t,n){if(t!=="skd")return e;t=n.serverCertificate,n=fi(e).split("skd://").pop().split("?").shift(),n=R.atob(n);var r=new ArrayBuffer(n.length*2);r=Qi(r);for(var i=0,o=n.length;i<o;i++)r[i]=n.charCodeAt(i);return ac(e,r,t)},eo.ezdrmInitDataTransform=function(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=fi(e).split(";").pop(),ac(e,n,t))},eo.verimatrixInitDataTransform=function(e,t,n){return Rp(e,t,n)},eo.initDataTransform=ac,eo.defaultGetContentId=v0,eo.isFairPlaySupported=function(){var e;return H(function(t){return t.h==1?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},t.m(2),t.g(navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):t.h!=2?t.return(!0):(t.l(),t.return(!1))})};function $f(e,t,n){for(n=n===void 0?!0:n,this.h=e,this.g=new Set([e]),t=t||[],e=d(t),t=e.next();!t.done;t=e.next())this.add(t.value,n)}$f.prototype.add=function(e,t){var n=this.h;t=t===void 0?!0:t;var r;if(!(r=!!n.audio!=!!e.audio||!!n.video!=!!e.video||n.language!=e.language)&&(r=n.audio&&e.audio)){r=n.audio;var i=e.audio;r=!(!((!r.channelsCount||!i.channelsCount||r.channelsCount>2||i.channelsCount>2)&&r.channelsCount!=i.channelsCount||r.spatialAudio!==i.spatialAudio||t&&!y0(r,i))&&Sn(r.roles,i.roles)&&r.groupId===i.groupId)}return!r&&(r=n.video&&e.video)&&(n=n.video,r=e.video,r=!((!t||y0(n,r))&&Sn(n.roles,r.roles))),r?!1:(this.g.add(e),!0)},$f.prototype.values=function(){return this.g.values()};function y0(e,t){return e.mimeType!=t.mimeType?!1:(e=e.codecs.split(",").map(function(n){return Vs(n)}),t=t.codecs.split(",").map(function(n){return Vs(n)}),Sn(e,t))}Re("shaka.media.AdaptationSet",$f);function uc(){this.h=this.g=null}uc.prototype.configure=function(e){this.g=e},uc.prototype.getConfiguration=function(){return this.g},uc.prototype.create=function(e){var t;if(this.g.language){var n=iC(e,this.g.language);n.length&&(t=n)}t||(t=e.filter(function(o){return o.primary}),t=t.length?t:e),e=oC(t,this.g.role),e.length&&(t=e),e=sC(t,this.g.videoRole),e.length&&(t=e),this.g.videoLayout&&(e=fC(t,this.g.videoLayout),e.length&&(t=e)),this.g.hdrLevel&&(e=cC(t,this.g.hdrLevel),e.length&&(t=e));var r=[this.g.channelCount,this.g.preferredAudioChannelCount];if(e=r.filter(function(o,s){return o&&r.indexOf(o)===s}),e.length){for(e=d(e),n=e.next();!n.done;n=e.next())if(n=lC(t,n.value),n.length){t=n;break}}this.g.audioLabel&&(e=aC(t,this.g.audioLabel),e.length&&(t=e)),this.g.videoLabel&&(e=uC(t,this.g.videoLabel),e.length&&(t=e)),e=dC(t,this.g.spatialAudio),e.length&&(t=e);var i=[this.g.audioCodec,this.g.activeAudioCodec].concat(M(this.g.preferredAudioCodecs));if(e=i.filter(function(o,s){return o&&i.indexOf(o)===s}),e.length){for(e=d(e),n=e.next();!n.done;n=e.next())if(n=hC(t,n.value),n.length){t=n;break}}return e=ct(),e=this.g.codecSwitchingStrategy=="smooth"&&e.wb(),this.h=new $f(t[0],t,!e)},uc.prototype.getLastAdaptationSet=function(){return this.h};function iC(e,t){t=bn(t);var n=x(t,e.map(function(r){return y(r)}));return n?e.filter(function(r){return n==y(r)}):[]}function oC(e,t){return e.filter(function(n){return n.audio?t?n.audio.roles.includes(t):n.audio.roles.length==0:!1})}function sC(e,t){return e.filter(function(n){return n.video?t?n.video.roles.includes(t):n.video.roles.length==0:!1})}function aC(e,t){return e.filter(function(n){return n.audio&&n.audio.label?n.audio.label.toLowerCase()==t.toLowerCase():!1})}function uC(e,t){return e.filter(function(n){return n.video&&n.video.label?n.video.label.toLowerCase()==t.toLowerCase():!1})}function lC(e,t){return e.filter(function(n){return!(n.audio&&n.audio.channelsCount&&n.audio.channelsCount>t)}).sort(function(n,r){return n.audio||r.audio?n.audio?r.audio?(r.audio.channelsCount||0)-(n.audio.channelsCount||0):1:-1:0})}function cC(e,t){if(t=="AUTO"){var n=e.some(function(r){return!!(r.video&&r.video.hdr&&r.video.hdr=="HLG")});t=ct().ld(n)}return e.filter(function(r){return!(r.video&&r.video.hdr&&r.video.hdr!=t)})}function fC(e,t){return e.filter(function(n){return!(n.video&&n.video.videoLayout&&n.video.videoLayout!=t)})}function dC(e,t){return e.filter(function(n){return!(n.audio&&n.audio.spatialAudio!=t)})}function hC(e,t){return e.filter(function(n){return!(n.audio&&n.audio.codecs!=t)})}function Xf(){}function ol(){var e=1/0,t=ct();navigator.connection&&navigator.connection.saveData&&(e=360);var n={retryParameters:fs(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(a,u,l){return R.shakaMediaKeysPolyfill==="apple"&&u=="skd"&&(u=l.serverCertificate,l=v0(a),a=ac(a,l,u)),a},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},r="reload";t.wb()&&(r="smooth");var i={retryParameters:fs(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,ignoreDrmInfo:!1,enableAudioGroups:!0,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:Yf,manifestPreprocessorTXml:Jf,sequenceMode:!1,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:t.Xc(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:Yf,manifestPreprocessorTXml:Jf,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},o={trackSelectionCallback:function(a){return H(function(u){return u.return(a)})},downloadSizeCallback:function(a){var u;return H(function(l){return l.h==1?navigator.storage&&navigator.storage.estimate?l.g(navigator.storage.estimate(),3):l.return(!0):(u=l.i,l.return(u.usage+a<u.quota*.95))})},progressCallback:function(a,u){return il([a,u])},usePersistentLicense:!0,numberOfParallelDownloads:5},s={drm:n,manifest:i,streaming:{retryParameters:fs(),failureCallback:function(a){return il([a])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!0,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3},mediaSource:{codecSwitchingStrategy:r,addExtraFeaturesToSourceBuffer:function(a){return il([a],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(a,u,l){return il([a,u,l])},dispatchAllEmsgBoxes:!1,useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:o,abrFactory:function(){return new Tr},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(uc,[null].concat(M(we.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!1},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredAudioRole:"",preferredVideoRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1,targets:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:1/0,preloadPrevItem:!0,repeatMode:0}};return o.trackSelectionCallback=function(a){return H(function(u){return u.return(pC(a,s.preferredAudioLanguage,s.preferredVideoHdrLevel))})},t.Wa(s)}function S0(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}function pa(e,t,n){var r={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return kp(e,t,n||ol(),r,"")}function pC(e,t,n){var r=n;r=="AUTO"&&(n=e.some(function(a){return!!(a.hdr&&a.hdr=="HLG")}),r=ct().ld(n));var i=e.filter(function(a){return!(a.type!="variant"||a.hdr&&a.hdr!=r)});n=[];var o=x(t,i.map(function(a){return a.language}));o&&(n=i.filter(function(a){return bn(a.language)==o})),n.length==0&&(n=i.filter(function(a){return a.primary})),n.length==0&&(i.map(function(a){return a.language}),n=i);var s=n.filter(function(a){return a.height&&a.height<=480});for(s.length&&(s.sort(function(a,u){return u.height-a.height}),n=s.filter(function(a){return a.height==s[0].height})),t=[],n.length&&(i=Math.floor(n.length/2),n.sort(function(a,u){return a.bandwidth-u.bandwidth}),t.push(n[i])),e=d(e),n=e.next();!n.done;n=e.next())n=n.value,n.type!=Bt&&n.type!="image"||t.push(n);return t}function Yf(e){return il([e],e)}function Jf(e){return il([e],e)}Re("shaka.util.PlayerConfiguration",Xf),Xf.mergeConfigObjects=pa,Xf.createDefaultForLL=S0,Xf.createDefault=ol;function gC(){this.g=null,this.h=[]}function bp(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=d(e.h);for(var r=e.next();!r.done;r=e.next())r=r.value,n+=r.state==t?r.duration:0;return n}function mC(e){function t(o){return{timestamp:o.timestamp,state:o.state,duration:o.duration}}for(var n=[],r=d(e.h),i=r.next();!i.done;i=r.next())n.push(t(i.value));return e.g&&n.push(t(e.g)),n}function vC(){this.i=this.h=null,this.g=[]}function Dp(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function Qf(){this.C=this.X=NaN,this.l="",this.j=this.ri=this.u=this.B=this.K=this.D=this.o=this.m=this.J=this.G=this.i=this.T=this.V=this.N=this.O=this.P=NaN,this.M=0,this.H=this.I=NaN,this.g=new gC,this.h=new vC}function yC(e,t,n){e.P=t,e.O=n}function T0(e,t,n){e.X=t,e.C=n}function SC(e,t){e.i=isNaN(e.i)?t:Math.max(e.i,t)}function TC(e,t){t>=0&&(e.o=t)}function EC(e,t){t>=0&&(e.D=t)}function xC(e,t){t>=0&&(e.K=t)}function E0(e,t){e.j=isNaN(e.j)?t:e.j+t}function wC(e){var t=e.X,n=e.C,r=e.l,i=e.B,o=e.O,s=e.P,a=e.N,u=e.V,l=e.T,h=e.u,g=e.i,m=e.G,E=e.J,A=e.m,k=bp(e.g,"playing"),b=bp(e.g,"paused"),V=bp(e.g,"buffering"),B=e.o,Z=e.D,ue=e.K,pe=e.ri,te=e.j,le=e.M,ie=e.I,ve=e.H,ce=mC(e.g),Ee=[];e=d(e.h.g);for(var ye=e.next();!ye.done;ye=e.next())ye=ye.value,Ee.push({timestamp:ye.timestamp,id:ye.id,type:ye.type,fromAdaptation:ye.fromAdaptation,bandwidth:ye.bandwidth});return{width:t,height:n,currentCodecs:r,streamBandwidth:i,decodedFrames:o,droppedFrames:s,corruptedFrames:a,stallsDetected:u,gapsJumped:l,estimatedBandwidth:h,completionPercent:g,loadLatency:m,manifestTimeSeconds:E,drmTimeSeconds:A,playTime:k,pauseTime:b,bufferingTime:V,licenseTime:B,liveLatency:Z,maxSegmentDuration:ue,manifestSizeBytes:pe,bytesDownloaded:te,nonFatalErrorCount:le,manifestPeriodCount:ie,manifestGapCount:ve,stateHistory:ce,switchHistory:Ee}}function Wo(e,t,n,r){_n.call(this),this.N=e,this.V=t,this.Ba=r.networkingEngine,this.o=n,this.C=null,this.za=0,this.Ka=r.dd,this.G=r.vk,this.Ua=r.wk,this.g=r.config,this.m=this.H=this.h=null,this.oa=!1,this.I=r.Ik,this.ua=!1,this.j=null,this.ba=!1,this.u=null,this.M=new Map,this.ya=!1,this.Ga=r.Hk,this.X=new Qf,this.ma=new zn,this.B=new zn,this.O=null,this.l=!1,this.$=r.mj,this.T=this.i=null,this.P=!1,this.K=[],this.J=[],this.D=!0}P(Wo,_n);function lc(e,t,n){(e=t?e.J:e.K)?e.push(n):n()}function AC(e){if(e.J)for(var t=d(e.J),n=t.next();!n.done;n=t.next())n=n.value,n();e.J=null}function x0(e,t){if(e.O=t,e.P=!0,e.K){t=d(e.K);for(var n=t.next();!n.done;n=t.next())n=n.value,n()}e.K=null}f=Wo.prototype,f.getStartTime=function(){return this.o},f.jd=function(){return this.N},f.Fg=function(){return this.h};function IC(e){return e.ua=!0,e.I}f.getStats=function(){return this.X};function CC(e){return e.ba=!0,e.j}f.Sj=function(){return this.i?mt(this.i):null},f.Rj=function(){return this.T?ur(this.T):null};function MC(e){return e.ya=!0,e.M}f.start=function(){var e=this;(function(){var t;return H(function(n){switch(n.h){case 1:return n.g(Promise.resolve(),2);case 2:return n.m(3),n.g(PC(e),5);case 5:if(Ua(e),R.shakaMediaKeysPolyfill==="webkit"){n.A(6);break}return n.g(w0(e),7);case 7:Ua(e);case 6:return n.g(RC(e),8);case 8:if(Ua(e),!e.$){n.A(9);break}return n.g(bC(e),10);case 10:Ua(e);case 9:if(!e.$||!e.j){n.A(11);break}return n.g(PA(e.j),12);case 12:Ua(e);case 11:e.B.resolve(),n.o(0);break;case 3:t=n.l(),t instanceof fe&&(t.code==7001||t.code==7003)||e.B.reject(t),n.j()}})})()},f.dispatchEvent=function(e){return this.O?this.O.dispatchEvent(e):_n.prototype.dispatchEvent.call(this,e)},f.onError=function(e){e.severity===2&&(this.B.reject(e),this.destroy());var t=new Map().set("detail",e);t=new yt("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)};function Ua(e){if(e.l)throw new fe(2,7,7003)}function Op(e,t){e.dispatchEvent(new yt("onstatechange",new Map().set("state",t)))}function PC(e){var t,n,r,i,o,s;return H(function(a){switch(a.h){case 1:if(Op(e,"manifest-parser"),e.m||(e.H=Ca(e.N,e.V),e.m=e.H(),e.m.configure(e.g.manifest,function(){return e.D})),t=Date.now()/1e3,Op(e,"manifest"),e.h){a.A(2);break}return a.g(e.m.start(e.N,e.Ua),3);case 3:return e.h=a.i,I0(e.h),a.g(kC(e),2);case 2:return e.ma.resolve(),n=new yt("manifestparsed",void 0),a.g(Promise.resolve(),5);case 5:if(e.dispatchEvent(n),e.h.variants.length==0)throw new fe(2,4,4036);if(I0(e.h),r=iy(e.G,e.h),!r){a.A(6);break}return i=new yt("trackschanged",void 0),a.g(Promise.resolve(),7);case 7:Ua(e),e.dispatchEvent(i);case 6:o=Date.now()/1e3,s=o-t,s>=0&&(e.X.J=s),a.j()}})}function w0(e,t){var n,r,i,o;return H(function(s){switch(s.h){case 1:return!e.h||e.j?s.return():(Op(e,"drm-engine"),e.za=Date.now()/1e3,e.j=e.Ka(),e.G.g=e.j,e.j.configure(e.g.drm,function(){return e.D}),n=Uu(e.h.variants),r=!0,e.h&&e.h.presentationTimeline&&(r=e.h.presentationTimeline.U()),s.g(Wv(e.j,n,e.h.offlineSessionIds,r),2));case 2:if(Ua(e),!t){s.A(3);break}return s.g(e.j.Ob(t),4);case 4:Ua(e);case 3:return s.g(ry(e.G,e.h),5);case 5:if(i=s.i,!i){s.A(0);break}return o=new yt("trackschanged",void 0),s.g(Promise.resolve(),7);case 7:e.dispatchEvent(o),s.j()}})}f.configure=function(e,t){e=Wf(e,t),pa(this.g,e)},f.getConfiguration=function(){return Ki(this.g)};function kC(e){return H(function(t){return e.C||(e.C=e.g.adaptationSetCriteriaFactory(),e.C.configure({language:e.g.preferredAudioLanguage,role:e.g.preferredAudioRole,videoRole:e.g.preferredVideoRole,channelCount:0,hdrLevel:e.g.preferredVideoHdrLevel,spatialAudio:e.g.preferSpatialAudio,videoLayout:e.g.preferredVideoLayout,audioLabel:e.g.preferredAudioLabel,videoLabel:e.g.preferredVideoLabel,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount})),e.i||!e.h.variants.length||e.h.variants.length!=1&&e.h.type!="HLS"?t.A(0):(e.i=Np(e),e.i?t.g(A0(e.i),0):t.A(0))})}function RC(e){return H(function(t){return t.h==1?!e.i||e.h.variants.includes(e.i)?t.A(0):t.g(DC(e.i),3):(e.i=Np(e),e.i?t.g(A0(e.i),0):t.A(0))})}function bC(e){var t,n,r,i,o;return H(function(s){return!e.i&&(t=Np(e))&&(e.i=t),e.i?(n=e.h.presentationTimeline.U(),r=[],i=e.i,i.video&&r.push(Lp(e,i.video,n)),i.audio&&r.push(Lp(e,i.audio,n)),(o=_e(e.h.textStreams,e.g.preferredTextLanguage,e.g.preferredTextRole,e.g.preferForcedSubs)[0]||null)&&Li(i.audio,o,e.g)&&(r.push(Lp(e,o,n)),e.T=o),s.g(Promise.all(r),0)):s.A(0)})}function Np(e){if(!e.u){var t=e.g.abrFactory;e.u=t(),e.u.configure(e.g.abr)}return t=Uu(e.h.variants),t=e.C.create(t),e.u.setVariants(Array.from(t.values())),e.u.chooseVariant(!0)}function Lp(e,t,n){var r,i,o,s,a;return H(function(u){return u.h==1?(r=e.g.streaming.segmentPrefetchLimit||2,i=new Lf(r,t,function(l,h,g){return Vf(l,h,g||null,e.g.streaming.retryParameters,e.Ba,e.D)},!1),e.M.set(t.id,i),t.segmentIndex?u.A(2):u.g(t.createSegmentIndex(),2)):(o=typeof e.o=="number"?e.o:0,s=t.segmentIndex.Qb(o),a=null,s&&(a=s.current(),a||(a=s.next().value)),a||(a=ks(t.segmentIndex)),a?n?a.ea?u.g(o0(i,a.ea),0):u.A(0):u.g(nc(i,a.startTime),0):u.A(0))})}function A0(e){var t,n,r,i;return H(function(o){for(t=[],n=d([e.video,e.audio]),r=n.next();!r.done;r=n.next())(i=r.value)&&!i.segmentIndex&&t.push(i.createSegmentIndex());return t.length>0?o.g(Promise.all(t),0):o.A(0)})}function DC(e){var t,n,r,i;return H(function(o){for(t=[],n=d([e.video,e.audio]),r=n.next();!r.done;r=n.next())(i=r.value)&&i.segmentIndex&&i.closeSegmentIndex&&t.push(i.closeSegmentIndex());return t.length>0?o.g(Promise.all(t),0):o.A(0)})}f.ol=function(){return this.B},f.destroy=function(){var e=this,t,n,r;return H(function(i){if(i.h==1)return e.l=!0,!e.m||e.oa?i.A(2):i.g(e.m.stop(),2);if(i.h!=4)return e.u&&e.u.release(),e.I&&!e.ua&&e.I.release(),!e.j||e.ba?i.A(4):i.g(e.j.destroy(),4);if(e.M.size>0&&!e.ya)for(t=d(e.M.values()),n=t.next();!n.done;n=t.next())r=n.value,Rs(r);i.j()})};function I0(e){function t(n){return n.video&&n.audio||n.video&&n.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}Re("shaka.media.PreloadManager",Wo),Wo.prototype.destroy=Wo.prototype.destroy,Wo.prototype.waitForFinish=Wo.prototype.ol,Wo.prototype.getPrefetchedTextTrack=Wo.prototype.Rj,Wo.prototype.getPrefetchedVariantTrack=Wo.prototype.Sj;function wu(e,t){_n.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{bd:null,$c:sl,Nc:function(r,i){return ga(n,"enter",r,i)}},{bd:cc,$c:sl,Nc:function(r,i){return ga(n,"enter",r,i)}},{bd:fc,$c:sl,Nc:function(r,i){return ga(n,"enter",r,i)}},{bd:sl,$c:cc,Nc:function(r,i){return ga(n,"exit",r,i)}},{bd:sl,$c:fc,Nc:function(r,i){return ga(n,"exit",r,i)}},{bd:cc,$c:fc,Nc:function(r,i){i?ga(n,"skip",r,i):(ga(n,"enter",r,i),ga(n,"exit",r,i))}},{bd:fc,$c:cc,Nc:function(r,i){return ga(n,"skip",r,i)}}],this.h=new Et,this.h.F(this.i,"regionremove",function(r){n.g.delete(r.region)})}P(wu,_n),wu.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,_n.prototype.release.call(this)},wu.prototype.j=function(e,t){if(!this.l||e!=0){this.l=!1;for(var n=d(this.i.h.values()),r=n.next();!r.done;r=n.next()){r=r.value;var i=this.g.get(r),o=e<r.startTime?cc:e>r.endTime?fc:sl;this.g.set(r,o);for(var s=d(this.m),a=s.next();!a.done;a=s.next())a=a.value,a.bd==i&&a.$c==o&&a.Nc(r,t)}}};function ga(e,t,n,r){t=new yt(t,new Map([["region",n],["seeking",r]])),e.dispatchEvent(t)}var cc=1,sl=2,fc=3;/*
43
+ @license
44
+ Copyright 2013 Ali Al Dallal
45
+
46
+ Licensed under the MIT license.
47
+
48
+ Permission is hereby granted, free of charge, to any person obtaining a copy
49
+ of this software and associated documentation files (the "Software"), to deal
50
+ in the Software without restriction, including without limitation the rights
51
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
52
+ copies of the Software, and to permit persons to whom the Software is
53
+ furnished to do so, subject to the following conditions:
54
+
55
+ The above copyright notice and this permission notice shall be included in
56
+ all copies or substantial portions of the Software.
57
+
58
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
59
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
60
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
61
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
62
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
63
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
64
+ SOFTWARE.
65
+ */for(var Ba={ach:"Lwo",ady:"Адыгэбзэ",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"Tɕɥi",ar:"العربية","ar-AR":"العربية","ar-MA":"العربية","ar-SA":"العربية (السعودية)","ay-BO":"Aymar aru",az:"Azərbaycan dili","az-AZ":"Azərbaycan dili","be-BY":"Беларуская",bg:"Български","bg-BG":"Български",bn:"বাংলা","bn-IN":"বাংলা (ভারত)","bn-BD":"বাংলা(বাংলাদেশ)","bs-BA":"Bosanski",ca:"Català","ca-ES":"Català",cak:"Maya Kaqchikel","ck-US":"ᏣᎳᎩ (tsalagi)",cs:"Čeština","cs-CZ":"Čeština",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (Österreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserbšćina",el:"Ελληνικά","el-GR":"Ελληνικά",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)","en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Español","es-AR":"Español (Argentine)","es-419":"Español (Latinoamérica)","es-CL":"Español (Chile)","es-CO":"Español (Colombia)","es-EC":"Español (Ecuador)","es-ES":"Español (España)","es-LA":"Español (Latinoamérica)","es-NI":"Español (Nicaragua)","es-MX":"Español (México)","es-US":"Español (Estados Unidos)","es-VE":"Español (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"فارسی","fa-IR":"فارسی","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"Føroyskt",fr:"Français","fr-CA":"Français (Canada)","fr-FR":"Français (France)","fr-BE":"Français (Belgique)","fr-CH":"Français (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",gl:"Galego","gl-ES":"Galego","gn-PY":"Avañe'ẽ","gu-IN":"ગુજરાતી","gx-GR":"Ἑλληνική ἀρχαία",he:"עברית‏","he-IL":"עברית‏",hi:"हिन्दी","hi-IN":"हिन्दी",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserbšćina",ht:"Kreyòl",hu:"Magyar","hu-HU":"Magyar","hy-AM":"Հայերեն",id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"Íslenska","is-IS":"Íslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"日本語","ja-JP":"日本語","jv-ID":"Basa Jawa","ka-GE":"ქართული","kk-KZ":"Қазақша",km:"ភាសាខ្មែរ","km-KH":"ភាសាខ្មែរ",kab:"Taqbaylit",kn:"ಕನ್ನಡ","kn-IN":"ಕನ್ನಡ (India)",ko:"한국어","ko-KR":"한국어 (韩国)",ku:"Kurdî","ku-TR":"Kurdî",la:"Latin","la-VA":"Latin",lb:"Lëtzebuergesch","li-NL":"Lèmbörgs",lt:"Lietuvių","lt-LT":"Lietuvių",lv:"Latviešu","lv-LV":"Latviešu",mai:"मैथिली, মৈথিলী","mg-MG":"Malagasy",mk:"Македонски","mk-MK":"Македонски (Македонски)",ml:"മലയാളം","ml-IN":"മലയാളം","mn-MN":"Монгол",mr:"मराठी","mr-IN":"मराठी",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"ဗမာစကာ",nb:"Norsk (bokmål)","nb-NO":"Norsk (bokmål)",ne:"नेपाली","ne-NP":"नेपाली",nl:"Nederlands","nl-BE":"Nederlands (België)","nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"ଓଡ଼ିଆ",pa:"ਪੰਜਾਬੀ","pa-IN":"ਪੰਜਾਬੀ (ਭਾਰਤ ਨੂੰ)",pl:"Polski","pl-PL":"Polski","ps-AF":"پښتو",pt:"Português","pt-BR":"Português (Brasil)","pt-PT":"Português (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Română","ro-RO":"Română",ru:"Русский","ru-RU":"Русский","sa-IN":"संस्कृतम्","se-NO":"Davvisámegiella","si-LK":"පළාත",sk:"Slovenčina","sk-SK":"Slovenčina (Slovakia)",sl:"Slovenščina","sl-SI":"Slovenščina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"Српски","sr-RS":"Српски (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili","sw-KE":"Kiswahili",ta:"தமிழ்","ta-IN":"தமிழ்",te:"తెలుగు","te-IN":"తెలుగు",tg:"забо́ни тоҷикӣ́","tg-TJ":"тоҷикӣ",th:"ภาษาไทย","th-TH":"ภาษาไทย (ประเทศไทย)",tl:"Filipino","tl-PH":"Filipino",tlh:"tlhIngan-Hol",tr:"Türkçe","tr-TR":"Türkçe","tt-RU":"татарча",uk:"Українська","uk-UA":"Українська",ur:"اردو","ur-PK":"اردو",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Tiếng Việt","vi-VN":"Tiếng Việt","xh-ZA":"isiXhosa",yi:"ייִדיש","yi-DE":"ייִדיש (German)",zh:"中文","zh-HANS":"中文简体","zh-HANT":"中文繁體","zh-CN":"中文(中国)","zh-HK":"中文(香港)","zh-SG":"中文(新加坡)","zh-TW":"中文(台灣)","zu-ZA":"isiZulu"},C0=d(Object.keys(Ba)),jp=C0.next();!jp.done;jp=C0.next()){var M0=jp.value;Ba[M0.toLowerCase()]=Ba[M0]}function P0(e,t){if(e.lineBreak)return`
66
+ `;if(e.nestedCues.length)return e.nestedCues.map(function(s){return P0(s,e)}).join("");if(!e.payload)return e.payload;var n=[],r=e.fontWeight>=ia,i=e.fontStyle==Pa,o=e.textDecoration.includes(Is);return r&&n.push(["b"]),i&&n.push(["i"]),o&&n.push(["u"]),i=e.color,i==""&&t&&(i=t.color),r="",(i=k0(i))&&(r+="."+i),i=e.backgroundColor,i==""&&t&&(i=t.backgroundColor),(t=k0(i))&&(r+=".bg_"+t),r&&n.push(["c",r]),n.reduceRight(function(s,a){var u=d(a);return a=u.next().value,u=u.next().value,"<"+a+(u===void 0?"":u)+">"+s+"</"+a+">"},e.payload)}function k0(e){e=e.toLowerCase();var t=e.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(parseInt(t[1],10)|256).toString(16).slice(1)+(parseInt(t[2],10)|256).toString(16).slice(1)+(parseInt(t[3],10)|256).toString(16).slice(1):e.startsWith("#")&&e.length>7&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function Fp(e,t){var n=[];e=d(R0(e));for(var r=e.next();!r.done;r=e.next())if(r=r.value,r.isContainer)n.push.apply(n,M(Fp(r.nestedCues,r)));else{var i=r.clone();i.nestedCues=[],i.payload=P0(r,t),n.push(i)}return n}function R0(e){var t=[];e=d(e);for(var n=e.next(),r={};!n.done;r={gg:void 0},n=e.next())r.gg=n.value,t.some(function(i){return function(o){return Wn(i.gg,o)}}(r))||t.push(r.gg);return t}function OC(e){function t(r){for(var i=5381,o=r.length;o;)i=i*33^r.charCodeAt(--o);return(i>>>0).toString()}if(e.startTime>=e.endTime)return null;var n=new VTTCue(e.startTime,e.endTime,e.payload);n.id=t(e.startTime.toString())+t(e.endTime.toString())+t(e.payload),n.lineAlign=e.lineAlign,n.positionAlign=e.positionAlign,e.size&&(n.size=e.size);try{n.align=e.textAlign}catch{}return e.textAlign=="center"&&n.align!="center"&&(n.align="middle"),e.writingMode=="vertical-lr"?n.vertical="lr":e.writingMode=="vertical-rl"&&(n.vertical="rl"),e.lineInterpretation==1&&(n.snapToLines=!1),e.line!=null&&(n.line=e.line),e.position!=null&&(n.position=e.position),n}function b0(e,t){var n=Fp(t),r=[];t=e.cues?Array.from(e.cues):[],n=d(n);for(var i=n.next(),o={};!i.done;o={pd:void 0},i=n.next())o.pd=i.value,!t.some(function(s){return function(a){return a.startTime==s.pd.startTime&&a.endTime==s.pd.endTime&&a.text==s.pd.payload}}(o))&&o.pd.payload&&(i=OC(o.pd))&&r.push(i);for(t=r.slice().sort(function(s,a){return s.startTime!=a.startTime?s.startTime-a.startTime:s.endTime!=a.endTime?s.endTime-a.startTime:"line"in VTTCue.prototype?r.indexOf(a)-r.indexOf(s):r.indexOf(s)-r.indexOf(a)}),t=d(t),n=t.next();!n.done;n=t.next())e.addCue(n.value)}function Up(e,t){var n=!1;e.mode==="disabled"&&(n=!0,e.mode="hidden");for(var r=0;r<e.cues.length;){var i=e.cues[r];t(i)?e.removeCue(i):r++}n&&(e.mode="disabled")}function Jr(e){var t=this;this.i=e,this.l=new Et,this.j=null,this.h=new Map,this.g=-1,this.u=!1,this.m=null,this.C=function(){var n;(n=t.m)==null||n.stop(),t.m=null,t.l.Na(t.i,"textchanged",t.o),t.l.Na(t.j.textTracks,"change",t.B),n=d(t.h.values());for(var r=n.next();!r.done;r=n.next())r.value.remove();t.h.clear(),t.g=-1,t.j=null},this.o=function(){var n=new Map,r=t.i.Fc();r=d(r);for(var i=r.next();!i.done;i=r.next()){if(i=i.value,t.h.has(i.id)){var o=t.h.get(i.id);i.active||o.track.mode==="disabled"||(o.track.mode="disabled"),t.h.delete(i.id)}else{var s=o=t.j.ownerDocument.createElement("track"),a=ct();if(a=i.forced&&a.Ia()==="WEBKIT"?"forced":i.kind==="caption"?"captions":"subtitles",s.kind=a,s=o,a=void 0,i.label)a=i.label;else if(i.language)if(i.language in Ba)a=Ba[i.language];else{var u=hu(i.language);u in Ba&&(a=Ba[u]+" ("+i.language+")")}a||(a=i.originalTextId,i.language&&i.language!==i.originalTextId&&(a+=" ("+i.language+")")),s.label=a,i.language?i.language in Ba?o.srclang=i.language:(s=hu(i.language),a=void 0,o.srclang=(a=s)!=null?a:"und"):o.srclang="und",o.src="data:,WEBVTT",o.track.mode="disabled",t.j.appendChild(o)}n.set(i.id,o),i.active&&(t.g=i.id)}for(r=d(t.h.values()),i=r.next();!i.done;i=r.next())i.value.remove();t.g>-1&&(n.has(t.g)?(r=n.get(t.g).track,r.mode==="disabled"&&(r.mode=t.u?"showing":"hidden")):t.g=-1),t.h=n},this.B=function(){if(!t.m){var n=t.j;t.m=new Yt(function(){if(t.m=null,t.j===n){var r=-1,i=!1;if(t.h.has(t.g)){var o=t.h.get(t.g);o.track.mode==="showing"?(r=t.g,i=!0):o.track.mode==="hidden"&&(r=t.g)}if(!i)for(i=d(t.h),o=i.next();!o.done;o=i.next()){var s=d(o.value);if(o=s.next().value,s=s.next().value,s.track.mode==="showing"){r=o;break}else r<0&&s.track.mode==="hidden"&&(r=o)}for(i=d(t.h),o=i.next();!o.done;o=i.next())s=d(o.value),o=s.next().value,s=s.next().value,o!==r&&s.track.mode!=="disabled"&&(s.track.mode="disabled");t.g!==r&&(t.g=r,r>-1&&t.i.nh({id:r})),t.i.rh(r>-1&&t.h.get(r).track.mode==="showing")}}).ka(0)}},this.l.F(e,"loaded",function(){return t.enableTextDisplayer()}),this.enableTextDisplayer()}f=Jr.prototype,f.configure=function(){},f.remove=function(e,t){if(this.i)this.h.has(this.g)&&Up(this.h.get(this.g).track,function(n){return n.startTime<t&&n.endTime>e});else return!1;return!0},f.append=function(e){this.h.has(this.g)&&b0(this.h.get(this.g).track,e)},f.destroy=function(){this.i&&(this.j&&this.C(),this.i=null);var e;(e=this.m)==null||e.stop(),this.m=null;var t;return(t=this.l)==null||t.release(),this.l=null,Promise.resolve()},f.isTextVisible=function(){return this.u},f.setTextVisibility=function(e){if(this.u=e,this.h.has(this.g)){var t=this.h.get(this.g).track;t.mode!=="disabled"&&(e=e?"showing":"hidden",t.mode!==e&&(t.mode=e))}else if(this.i&&this.i.Ud()===3)if(t=Array.from(this.i.We().textTracks).filter(function(r){return["captions","subtitles","forced"].includes(r.kind)}),e){e=null,t=d(t);for(var n=t.next();!n.done;n=t.next())if(n=n.value,n.mode==="showing"){e=null;break}else e||n.mode!=="hidden"||(e=n);e&&(e.mode="showing")}else for(e=d(t),t=e.next();!t.done;t=e.next())t=t.value,t.mode==="showing"&&(t.mode="hidden")},f.setTextLanguage=function(){},f.enableTextDisplayer=function(){!this.j&&this.i&&this.i.Ud()===2&&(this.j=this.i.We(),this.l.Aa(this.i,"unloading",this.C),this.l.F(this.i,"textchanged",this.o),this.l.F(this.j.textTracks,"change",this.B),this.o())},Re("shaka.text.NativeTextDisplayer",Jr),Jr.prototype.enableTextDisplayer=Jr.prototype.enableTextDisplayer,Jr.prototype.setTextLanguage=Jr.prototype.setTextLanguage,Jr.prototype.setTextVisibility=Jr.prototype.setTextVisibility,Jr.prototype.isTextVisible=Jr.prototype.isTextVisible,Jr.prototype.destroy=Jr.prototype.destroy,Jr.prototype.append=Jr.prototype.append,Jr.prototype.remove=Jr.prototype.remove,Jr.prototype.configure=Jr.prototype.configure;function xi(e,t){for(lt("SimpleTextDisplayer","Please migrate to NativeTextDisplayer"),this.h=e,this.i=t,this.g=null,e=d(Array.from(this.h.textTracks)),t=e.next();!t.done;t=e.next())t=t.value,t.kind!=="metadata"&&t.kind!=="chapters"&&(t.mode="disabled",t.label==this.i&&(this.g=t));this.g&&(this.g.mode="hidden")}f=xi.prototype,f.configure=function(){},f.remove=function(e,t){return this.g?(Up(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0):!1},f.append=function(e){this.g&&b0(this.g,e)},f.destroy=function(){return this.g&&(Up(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},f.isTextVisible=function(){return this.g?this.g.mode=="showing":!1},f.setTextVisibility=function(e){e&&!this.g&&D0(this),this.g&&(this.g.mode=e?"showing":"hidden")},f.setTextLanguage=function(){},f.enableTextDisplayer=function(){D0(this)};function D0(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}Re("shaka.text.SimpleTextDisplayer",xi),xi.prototype.enableTextDisplayer=xi.prototype.enableTextDisplayer,xi.prototype.setTextLanguage=xi.prototype.setTextLanguage,xi.prototype.setTextVisibility=xi.prototype.setTextVisibility,xi.prototype.isTextVisible=xi.prototype.isTextVisible,xi.prototype.destroy=xi.prototype.destroy,xi.prototype.append=xi.prototype.append,xi.prototype.remove=xi.prototype.remove,xi.prototype.configure=xi.prototype.configure;function wi(){}f=wi.prototype,f.configure=function(){},f.remove=function(){},f.append=function(){},f.destroy=function(){},f.isTextVisible=function(){return!1},f.setTextVisibility=function(){},f.setTextLanguage=function(){},f.enableTextDisplayer=function(){},Re("shaka.text.StubTextDisplayer",wi),wi.prototype.enableTextDisplayer=wi.prototype.enableTextDisplayer,wi.prototype.setTextLanguage=wi.prototype.setTextLanguage,wi.prototype.setTextVisibility=wi.prototype.setTextVisibility,wi.prototype.isTextVisible=wi.prototype.isTextVisible,wi.prototype.destroy=wi.prototype.destroy,wi.prototype.append=wi.prototype.append,wi.prototype.remove=wi.prototype.remove,wi.prototype.configure=wi.prototype.configure;function Ai(e,t){var n=this;this.j=!1,this.h=[],this.m=e,this.l=t,this.C=this.u=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.B=new Yt(function(){n.m.paused||Va(n)}),dc(this),this.o=new Map,this.i=new Et,this.i.F(document,"fullscreenchange",function(){Va(n,!0)}),this.i.F(this.m,"seeking",function(){Va(n,!0)}),this.i.F(this.m,"ratechange",function(){dc(n)}),this.i.F(this.m,"resize",function(){var r=n.m,i=r.videoWidth;r=r.videoHeight,i&&r?n.u=i/r:n.u=null}),this.H=!1,this.D=null,"ResizeObserver"in R&&(this.D=new ResizeObserver(function(){n.H||(n.H=!0,requestAnimationFrame(function(){n.H=!1,n.g&&n.g.parentElement&&n.j&&Va(n,!0)}))}),this.D.observe(this.l)),this.G=new Map}f=Ai.prototype,f.configure=function(e){this.C=e,dc(this),Va(this,!0)},f.append=function(e){var t=[].concat(M(this.h));e=d(R0(e));for(var n=e.next(),r={};!n.done;r={hg:void 0},n=e.next())r.hg=n.value,t.some(function(i){return function(o){return Wn(o,i.hg)}}(r))||this.h.push(r.hg);this.h.length&&dc(this),Va(this)},f.destroy=function(){return this.g&&(this.g.parentElement&&this.l.removeChild(this.g),this.g=null,this.j=!1,this.h=[],this.B&&(this.B.stop(),this.B=null),this.o.clear(),this.i&&(this.i.release(),this.i=null),this.D&&(this.D.disconnect(),this.D=null)),Promise.resolve()},f.remove=function(e,t){if(!this.g)return!1;var n=this.h.length;return this.h=this.h.filter(function(r){return r.startTime<e||r.endTime>=t}),Va(this,n>this.h.length),this.h.length||dc(this),!0},f.isTextVisible=function(){return this.j},f.setTextVisibility=function(e){(this.j=e)?(this.g.parentElement||this.l.appendChild(this.g),Va(this,!0)):this.g.parentElement&&this.l.removeChild(this.g)},f.setTextLanguage=function(e){e&&e!="und"?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},f.enableTextDisplayer=function(){};function dc(e){e.B&&(e.h.length?e.B.Ea((e.C?e.C.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.m.playbackRate))):e.B.stop())}function NC(e,t){for(;t!=null;){if(t==e.g)return!0;t=t.parentElement}return!1}function O0(e,t,n,r,i){var o=!1,s=[],a=[];t=d(t);for(var u=t.next();!u.done;u=t.next()){u=u.value,i.push(u);var l=e.o.get(u),h=u.startTime<=r&&u.endTime>r,g=l?l.kj:null;l&&(s.push(l.ig),l.Sc&&s.push(l.Sc),h||(o=!0,e.o.delete(u),l=null)),h&&(a.push(u),l?NC(e,g)||(o=!0):(LC(e,u,i),l=e.o.get(u),g=l.kj,o=!0)),u.nestedCues.length>0&&g&&O0(e,u.nestedCues,g,r,i),i.pop()}if(o){for(r=d(s),i=r.next();!i.done;i=r.next())i=i.value,i.parentElement&&i.parentElement.removeChild(i);for(a.sort(function(m,E){return m.startTime!=E.startTime?m.startTime-E.startTime:m.endTime-E.endTime}),a=d(a),r=a.next();!r.done;r=a.next())r=e.o.get(r.value),r.Sc?(r.Sc.contains(n)&&r.Sc.removeChild(n),n.appendChild(r.Sc),r.Sc.appendChild(r.ig)):n.appendChild(r.ig)}}function Va(e,t){if(e.g){var n=e.m.currentTime;if(!e.j||t!==void 0&&t){t=d(e.G.values());for(var r=t.next();!r.done;r=t.next())Zl(r.value);Zl(e.g),e.o.clear(),e.G.clear()}e.j&&O0(e,e.h,e.g,n,[])}}function LC(e,t,n){var r=n.length>1,i=r?"span":"div";t.lineBreak&&(i="br"),t.rubyTag&&(i=t.rubyTag),r=!r&&t.nestedCues.length>0;var o=document.createElement(i);if(i!="br"&&FC(e,o,t,n,r),n=null,t.region&&t.region.id){var s=t.region,a=e.u===4/3?2.5:1.9;if(n=s.id+"_"+s.width+"x"+s.height+(s.heightUnits==Vr?"%":"px")+"-"+s.viewportAnchorX+"x"+s.viewportAnchorY+(s.viewportAnchorUnits==Vr?"%":"px"),e.G.has(n))n=e.G.get(n);else{i=document.createElement("span");var u=s.heightUnits==Vr?"%":"px",l=s.widthUnits==Vr?"%":"px",h=s.viewportAnchorUnits==Vr?"%":"px";i.id="shaka-text-region---"+n,i.classList.add("shaka-text-region"),i.style.position="absolute";var g=s.height,m=s.width;s.heightUnits===2&&(g=s.height*5.33,u="%"),s.widthUnits===2&&(m=s.width*a,l="%"),i.style.height=g+u,i.style.width=m+l,s.viewportAnchorUnits===2?(a=s.viewportAnchorY/75*100,u=s.viewportAnchorX/(e.u===4/3?160:210)*100,a-=s.regionAnchorY*g/100,u-=s.regionAnchorX*m/100,i.style.top=a+"%",i.style.left=u+"%"):(i.style.top=s.viewportAnchorY-s.regionAnchorY*g/100+h,i.style.left=s.viewportAnchorX-s.regionAnchorX*m/100+h),s.heightUnits!==0&&s.widthUnits!==0&&s.viewportAnchorUnits!==0&&(s=Math.max(0,Math.min(100-(parseInt(i.style.width.slice(0,-1),10)||0),parseInt(i.style.left.slice(0,-1),10)||0)),i.style.top=Math.max(0,Math.min(100-(parseInt(i.style.height.slice(0,-1),10)||0),parseInt(i.style.top.slice(0,-1),10)||0))+"%",i.style.left=s+"%"),i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="center",i.style.justifyContent=t.displayAlign=="before"?"flex-start":t.displayAlign=="center"?"center":"flex-end",e.G.set(n,i),n=i}}i=o,r&&(i=document.createElement("span"),i.classList.add("shaka-text-wrapper"),i.style.backgroundColor=t.backgroundColor,i.style.lineHeight="normal",o.appendChild(i)),e.o.set(t,{ig:o,kj:i,Sc:n})}function jC(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==ri?n:e==="left"||e==="start"&&t===Zn||e==="end"&&t==="rtl"?"line-left":e==="right"||e==="start"&&t==="rtl"||e==="end"&&t===Zn?"line-right":"center"}function FC(e,t,n,r,i){var o=t.style,s=n.nestedCues.length==0,a=r.length>1;o.whiteSpace="pre-wrap";var u=n.payload.replace(/\s+$/g,function(h){return" ".repeat(h.length)});if(o.webkitTextStrokeColor=n.textStrokeColor,o.webkitTextStrokeWidth=n.textStrokeWidth,o.color=n.color,o.direction=n.direction,o.opacity=n.opacity,o.paddingLeft=Bp(n.linePadding,n,e.l),o.paddingRight=Bp(n.linePadding,n,e.l),o.textCombineUpright=n.textCombineUpright,o.textShadow=n.textShadow,n.backgroundImage)o.backgroundImage="url('"+n.backgroundImage+"')",o.backgroundRepeat="no-repeat",o.backgroundSize="contain",o.backgroundPosition="center",n.backgroundColor&&(o.backgroundColor=n.backgroundColor),o.width="100%",o.height="100%";else{if(n.nestedCues.length)var l=t;else l=document.createElement("span"),t.appendChild(l);n.border&&(l.style.border=n.border),i||((t=UC(r,function(h){return h.backgroundColor}))?l.style.backgroundColor=t:u&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)")),u&&(l.setAttribute("translate","no"),l.textContent=u)}a&&!r[r.length-1].isContainer?o.display="inline":(o.display="flex",o.flexDirection="column",o.alignItems="center",n.textAlign=="left"||n.textAlign=="start"?(o.width="100%",o.alignItems="flex-start"):(n.textAlign=="right"||n.textAlign=="end")&&(o.width="100%",o.alignItems="flex-end"),o.justifyContent=n.displayAlign=="before"?"flex-start":n.displayAlign=="center"?"center":"flex-end"),s||(o.margin="0"),o.fontFamily=n.fontFamily,o.fontWeight=n.fontWeight.toString(),o.fontStyle=n.fontStyle,o.letterSpacing=n.letterSpacing,r=e.C?e.C.fontScaleFactor:1,(r!==1||n.fontSize)&&(o.fontSize=Bp(n.fontSize||"1em",n,e.l,r)),r=n.line,r!=null&&(s=n.lineInterpretation,s==xn&&(s=1,a=16,e.u&&e.u<1&&(a=32),r=r<0?100+r/a*100:r/a*100),s==1&&(o.position="absolute",n.writingMode==sr?(o.width="100%",n.lineAlign==Ar?o.top=r+"%":n.lineAlign=="end"&&(o.bottom=100-r+"%")):n.writingMode=="vertical-lr"?(o.height="100%",n.lineAlign==Ar?o.left=r+"%":n.lineAlign=="end"&&(o.right=100-r+"%")):(o.height="100%",n.lineAlign==Ar?o.right=r+"%":n.lineAlign=="end"&&(o.left=100-r+"%")))),o.lineHeight=n.lineHeight,e=jC(n),e=="line-left"?(o.cssFloat="left",n.position!==null&&(o.position="absolute",n.writingMode==sr?(o.left=n.position+"%",o.width="auto"):o.top=n.position+"%")):e=="line-right"?(o.cssFloat="right",n.position!==null&&(o.position="absolute",n.writingMode==sr?(o.right=100-n.position+"%",o.width="auto"):o.bottom=n.position+"%")):n.position!==null&&n.position!=50&&(o.position="absolute",n.writingMode==sr?(o.left=n.position+"%",o.width="auto"):o.top=n.position+"%",n.size&&(o.transform="translateX(-50%)")),o.textAlign=n.textAlign,o.textDecoration=n.textDecoration.join(" "),o.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&o.writingMode==n.writingMode||(o.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==sr?o.width=n.size+"%":o.height=n.size+"%")}function Bp(e,t,n,r){r=r===void 0?1:r;var i=(i=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(i[1]),unit:i[2]}:null;if(!i)return e;switch(e=i.unit,r*=i.value,e){case"%":return r/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*r/t.cellResolution.rows+"px";default:return r+e}}function UC(e,t){for(var n=e.length-1;n>=0;n--){var r=t(e[n]);if(r||r===0)return r}return null}Re("shaka.text.UITextDisplayer",Ai),Ai.prototype.enableTextDisplayer=Ai.prototype.enableTextDisplayer,Ai.prototype.setTextLanguage=Ai.prototype.setTextLanguage,Ai.prototype.setTextVisibility=Ai.prototype.setTextVisibility,Ai.prototype.isTextVisible=Ai.prototype.isTextVisible,Ai.prototype.remove=Ai.prototype.remove,Ai.prototype.destroy=Ai.prototype.destroy,Ai.prototype.append=Ai.prototype.append,Ai.prototype.configure=Ai.prototype.configure;function BC(e,t){function n(o){for(var s=o,a=d(t),u=a.next();!u.done;u=a.next())u=u.value,u.end&&u.start<o&&(s+=u.end-u.start);return o=Math.floor(s/3600),a=Math.floor(s/60%60),u=Math.floor(s%60),s=Math.floor(s*1e3%1e3),(o<10?"0":"")+o+":"+(a<10?"0":"")+a+":"+(u<10?"0":"")+u+"."+(s<100?s<10?"00":"0":"")+s}var r=Fp(e);e=`WEBVTT
67
+
68
+ `,r=d(r);for(var i=r.next();!i.done;i=r.next())i=i.value,e+=n(i.startTime)+" --> "+n(i.endTime)+function(o){var s=[];switch(o.textAlign){case"left":s.push("align:left");break;case"right":s.push("align:right");break;case Jt:s.push("align:middle");break;case"start":s.push("align:start");break;case"end":s.push("align:end")}switch(o.writingMode){case"vertical-lr":s.push("vertical:lr");break;case"vertical-rl":s.push("vertical:rl")}return s.length?" "+s.join(" "):""}(i)+`
69
+ `,e+=i.payload+`
70
+
71
+ `;return e}Re("shaka.text.WebVttGenerator",function(){});function Vp(e,t){this.g=t,this.j=e,this.m=new Map,this.l=void 0,this.D=!1,this.J=!0,this.u=this.I=!1,this.C=this.B=void 0,this.H=0,this.K={request:!1,response:!1,event:!1},this.o={},this.i=new Et,this.G=[],this.h=null}Vp.prototype.setMediaElement=function(e){this.h=e,KC(this)},Vp.prototype.configure=function(e){this.g=e,WC(this)};function VC(e){e.m.clear(),e.D=!1,e.J=!0,e.I=!1,e.u=!1,e.B=0,e.C=0,e.H=0,e.K={request:!1,response:!1,event:!1},N0(e),e.o={},e.h=null,e.i.Ra()}function _C(e,t){e.u=t,e.u?e.l==rd?e.l=id:e.l==od&&(e.l=sd):e.l==id?e.l=rd:e.l==sd&&(e.l=od)}function HC(e,t){if(e.g&&e.g.enabled&&(Ii(e,"ps",{Vc:"d"}),e.h&&e.h.autoplay)){var n=e.h.play();n&&n.then(function(){e.H=t}).catch(function(){e.H=0})}}function GC(e,t,n){try{if(!e.g.enabled)return t;var r=Hp(e);e:{switch(n.toLowerCase()){case"audio/mp4":case"audio/webm":case"audio/ogg":case"audio/mpeg":case"audio/aac":case"audio/flac":case"audio/wav":var i=qf;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":i=td;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":i=_0;break e}i=void 0}r.ot=i,r.su=!0;var o=hc(r);return Zf(t,o)}catch(s){return In("CMCD_SRC_ERROR","Could not generate src CMCD data.",s),t}}function KC(e){e.i.F(e.h,"playing",function(){e.C||(e.C=Date.now()),Ii(e,"ps",{Vc:"p"})}),e.i.F(e.h,"volumechange",function(){Ii(e,e.h.muted?"m":"um")}),e.i.F(e.h,"play",function(){e.B||(e.B=Date.now(),Ii(e,"ps",{Vc:"s"}))}),e.i.F(e.h,"pause",function(){Ii(e,"ps",{Vc:"a"})}),e.i.F(e.j,"buffering",function(){Ii(e,"ps",{Vc:"w"})}),e.i.F(e.h,"seeking",function(){return Ii(e,"ps",{Vc:"k"})}),e.i.F(document,"fullscreenchange",function(){Ii(e,document.fullscreenElement?"pe":"pc")});var t=e.h;(t.webkitPresentationMode||t.webkitSupportsFullscreen)&&e.i.F(t,"webkitpresentationmodechanged",function(){t.webkitPresentationMode?Ii(e,t.webkitPresentationMode!=="inline"?"pe":"pc"):t.webkitSupportsFullscreen&&Ii(e,t.webkitDisplayingFullscreen?"pe":"pc")}),e.i.F(e.h,"enterpictureinpicture",function(){Ii(e,"pe")}),e.i.F(e.h,"leavepictureinpicture",function(){Ii(e,"pc")}),"documentPictureInPicture"in R&&e.i.F(R.documentPictureInPicture,"enter",function(n){Ii(e,"pe"),e.i.Aa(n.window,"pagehide",function(){Ii(e,"pc")})}),e.i.F(document,"visibilitychange",function(){document.hidden?Ii(e,"b",{bg:!0}):Ii(e,"b")}),e.i.F(e.j,"complete",function(){Ii(e,"ps",{Vc:"e"})})}function WC(e){N0(e);var t=L0(e);t=d(t);for(var n=t.next();!n.done;n=t.next())if(n=n.value.timeInterval,n===void 0&&(n=i2),n>=1){var r=new Yt(function(){return Ii(e,o2)});r.Ea(n),e.G.push(r)}}function N0(e){if(e.G)for(var t=d(e.G),n=t.next();!n.done;n=t.next())n.value.stop();e.G=[]}function L0(e){return(e=e.g.targets)?e.filter(function(t){return t.mode===z0&&t.enabled}):[]}function _p(e){return(e=e.g.targets)?e.filter(function(t){return t.mode===W0&&t.enabled===!0}):[]}function Hp(e){return e.g.sessionId||(e.g.sessionId=R.crypto.randomUUID()),{v:e.g.version,sf:e.l,sid:e.g.sessionId,cid:e.g.contentId,mtp:e.j.getBandwidthEstimate()/1e3}}function Ii(e,t,n){if(n=n===void 0?{}:n,t=Object.assign({e:t,ts:Date.now()},n),t=Wp(e,t,z0),n=e.g.targets,!(e.g.version<$p)&&n){var r=L0(e);n=Array.from(new Set([].concat(M(Xp),M(t2)))),r=d(r);for(var i=r.next();!i.done;i=r.next()){i=i.value;var o=Gp(i.includeKeys||[],n);o.includes(G0)||o.push(G0),o=Kp(t,o);var s=i.events||[],a=o.e,u=o.sta;a&&(!n2.includes(a)||!(a!=="ps"||u&&r2.includes(u))||s&&s.length>0&&!s.includes(a))||j0(e,o,i)}}}function al(e,t,n){if(e.g.enabled){n=Wp(e,n,K0);var r=F0({mode:K0,useHeaders:e.g.useHeaders,includeKeys:e.g.includeKeys||[]});e.o[r]||(e.o[r]={request:1,response:1}),n.sn=e.o[r].request++,r=e.g.includeKeys||[];var i=e.g.version==$p?Array.from(new Set([].concat(M(Xp),M(qC)))):H0;r=Gp(r,i),n=Kp(n,r),zC(e,n,t,e.g.useHeaders)}}function j0(e,t,n,r){var i=fs(),o=n.url;if(n.useHeaders){if(t=V0(t),!Object.keys(t).length)return;r&&Object.assign(r.headers,t),r=jr([o],i),Object.assign(r.headers,t)}else{if(t=hc(t),!t)return;o=Zf(o,t),r&&(r.uri=o),r=jr([o],i)}e.j.Rb().request(9,r)}function zC(e,t,n,r){if(r){if(t=V0(t),!Object.keys(t).length)return;Object.assign(n.headers,t)}else{var i=hc(t);if(!i)return;n.uris=n.uris.map(function(o){return Zf(o,i)})}_p(e).length>0||!e.m.has(n)||e.m.delete(n)}function Gp(e,t){if(!e||e.length===0)return t;for(var n=d(e),r=n.next();!r.done;r=n.next())t.includes(r.value);return e=e.filter(function(i){return t.includes(i)})}function Kp(e,t){return Object.keys(e).reduce(function(n,r){return t.includes(r)&&(n[r]=e[r]),n},{})}function $C(e){if(e.type===0)return JC;if(e=e.stream){var t=e.type;if(t=="video")return e.codecs&&e.codecs.includes(",")?td:ed;if(t=="audio")return qf;if(t=="text")return e.mimeType==="application/mp4"?nd:zp}}function F0(e){var t=Object.keys(e).sort().reduce(function(n,r){return r!=="enabled"&&(n[r]=e[r]),n},{});return JSON.stringify(t)}function XC(e,t){if(t=e.j.Bc()[t],!t.length)return NaN;var n=e.h?e.h.currentTime:0;return(e=t.find(function(r){return r.start<=n&&r.end>=n}))?(e.end-n)*1e3:NaN}function U0(e,t){if(t=e.j.Bc()[t],!t.length)return 0;var n=e.h?e.h.currentTime:0;return(e=t.find(function(r){return r.start<=n&&r.end>=n}))?(e.end-n)*1e3:0}function YC(e,t){var n=e.j.jc();if(!n.length)return NaN;e=n[0],n=d(n);for(var r=n.next();!r.done;r=n.next())r=r.value,r.type==="variant"&&r.bandwidth>e.bandwidth&&(e=r);switch(t){case ed:return e.videoBandwidth||NaN;case qf:return e.audioBandwidth||NaN;default:return e.bandwidth}}function B0(e,t,n){var r=t.segment,i=0;r&&(i=r.endTime-r.startTime),i={d:i*1e3,st:e.j.U()?ZC:QC},i.ot=$C(t);var o=i.ot===ed||i.ot===qf||i.ot===td||i.ot===nd;if(t=t.stream){var s=e.j.Ib();if(o&&(i.bl=XC(e,t.type),i.ot!==nd)){var a=U0(e,t.type);i.dl=s?a/Math.abs(s):a}if(t.bandwidth&&(i.br=t.bandwidth/1e3),t.segmentIndex&&r){if((s=t.segmentIndex.Qb(r.endTime,!0,s<0))&&(s=s.next().value)&&s!=r){if(n&&!Ye(r.R(),s.R())){var u=s.R()[0];a=new URL(u);var l=new URL(n);if(a.origin!==l.origin)n=u;else{n=a.pathname.split("/").slice(1),u=l.pathname.split("/").slice(1,-1),l=Math.min(n.length,u.length);for(var h=0;h<l&&n[h]===u[h];h++)n.shift(),u.shift();for(;u.length;)u.shift(),n.unshift("..");n=n.join("/")+a.search+a.hash}i.nor=n}!s.startByte&&!s.endByte||r.startByte==s.startByte&&r.endByte==s.endByte||(n=s.startByte+"-",s.endByte&&(n+=s.endByte),i.nrr=n)}s=e.j.Ib()||1,n=U0(e,t.type)||500,r=(t=t.bandwidth)?t*(r.endTime-r.startTime)/1e3/(n/s/1e3)*e.g.rtpSafetyFactor:NaN,isNaN(r)||(i.rtp=r)}}return o&&i.ot!==nd&&(i.tb=YC(e,i.ot)/1e3),i}function Wp(e,t,n){Object.assign(t,Hp(e)),t.pr=e.j.Ib();var r=t.ot===ed||t.ot===td;return e.I&&r&&(t.bs=!0,t.su=!0,e.I=!1),t.su==null&&(t.su=e.J),e.j.U()&&(r=p1(e.j),t.ltc=r||void 0),document.hidden&&(t.bg=!0),r=e.C&&e.B?e.C-(e.H||e.B):void 0,r==null||e.K[n]||(t.msd=r,e.K[n]=!0),t}function hc(e){function t(g){return n(g/100)*100}function n(g){return Math.round(g)}function r(g){return!Number.isNaN(g)&&g!=null&&g!==""&&g!==!1}var i=[],o={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(g){return encodeURIComponent(g)},rtp:t,tb:n,ttfb:n,ttlb:n},s=Object.keys(e||{}).sort();s=d(s);for(var a=s.next();!a.done;a=s.next()){a=a.value;var u=e[a];if(r(u)&&(a!=="v"||u!==1)&&(a!="pr"||u!==1)){var l=o[a];l&&(u=l(u)),l=typeof u;var h=void 0;h=l==="string"&&a!=="ot"&&a!=="sf"&&a!=="st"?a+"="+JSON.stringify(u):l==="boolean"?a:l==="symbol"?a+"="+u.description:a+"="+u,i.push(h)}}return i.join(",")}function V0(e){var t=Object.keys(e),n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],o={br:0,d:0,ot:0,tb:0,url:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,ttfb:1,ttlb:1,ts:1,rc:1,cmsdd:1,cmsds:1,sn:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3,bg:3};t=d(t);for(var s=t.next();!s.done;s=t.next())s=s.value,i[o[s]!=null?o[s]:1][s]=e[s];for(e=0;e<i.length;e++)(o=hc(i[e]))&&(n["CMCD-"+r[e]]=o);return n}function Zf(e,t){return!t||e.includes("offline:")?e:(e=new Ct(e),e.g.set("CMCD",t),e.toString())}var _0="m",qf="a",ed="v",td="av",JC="i",zp="c",nd="tt",$p=2,QC="v",ZC="l",rd="d",id="ld",od="h",sd="lh";Re("shaka.util.CmcdManager.StreamingFormat",{DASH:rd,Ql:id,HLS:od,Rl:sd,gm:"s",OTHER:"o"});var H0="br bl bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" "),Xp="br ab bl tbl bs cdn cid ltc mtp pr sf sid bg sta st ts tpb tb lb tab lab pt ec msd v sn".split(" "),qC="ab bl tbl bs cdn cid d dl ltc mtp nor ot pr rtp sf sid bg sta st su ts tpb tb lb tab lab pt ec msd v".split(" "),e2="d dl nor ot rtp rc su ttfb ttfbb ttlb url cmsdd cmsds".split(" "),t2=["e","sta"],n2="ps e t c b m um pe pc".split(" "),r2="spawkrfeqd".split(""),i2=10,G0="ts",o2="t",K0="request",W0="response",z0="event";function zo(e){this.h=e,this.g=null}f=zo.prototype,f.configure=function(e){this.h=e},f.di=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Y0)?this.g.get(Y0)*1e3:null},f.bi=function(){return this.h.enabled&&this.g&&this.g.has(X0)?this.g.get(X0)*1e3:null},f.Uj=function(){return this.h.enabled&&this.g&&this.g.has(J0)?this.g.get(J0):null},f.Vj=function(){return this.h.enabled&&this.g&&this.g.has(Q0)?this.g.get(Q0):null},f.getBandwidthEstimate=function(e){var t=this.bi();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return n>0&&n<=1?e*(1-n)+t*n:e};function $0(e){return e?e.toLowerCase()==="false"?!1:/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""):!0}Re("shaka.util.CmsdManager",zo),zo.prototype.getBandwidthEstimate=zo.prototype.getBandwidthEstimate,zo.prototype.getRoundTripTime=zo.prototype.Vj,zo.prototype.getResponseDelay=zo.prototype.Uj,zo.prototype.getEstimatedThroughput=zo.prototype.bi,zo.prototype.getMaxBitrate=zo.prototype.di;var X0="etp",Y0="mb",J0="rd",Q0="rtt";function Z0(){this.g=null,this.h=[]}function Yp(e,t){return H(function(n){if(n.h==1)return e.g?n.g(new Promise(function(r){return e.h.push(r)}),2):n.A(2);e.g=t,n.j()})}Z0.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null};function De(e,t,n){t=t===void 0?null:t,_n.call(this);var r=this;this.m=hd,this.h=null,this.ue=t,this.$=!1,this.Ee=new Et,this.ve=new Et,this.j=new Et,this.Zb=new Et,this.Bd=new Et,this.G=this.H=this.D=this.N=null,this.Fe=0,this.ba=new Z0,this.O=this.Ga=this.X=this.i=this.uc=this.I=this.l=this.qe=this.T=this.Lh=this.ua=this.K=this.hb=this.za=this.se=this.P=this.Ka=this.M=this.Wb=null,this.Ua=!1,this.ze=this.o=null,this.ye=1e9,this.De=[],this.tc=new Map,this.ib=[],this.Vf=-1,this.g=bs(this),this.Xf=S0(),this.V=null,this.Ge=-1,this.Yb=null,this.ya={width:1/0,height:1/0},this.xe=new $h(this.g,this.ya,null),this.Be=[],this.B=null,this.J=this.g.adaptationSetCriteriaFactory(),this.J.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredAudioRole,videoRole:this.g.preferredVideoRole,channelCount:0,hdrLevel:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,audioLabel:this.g.preferredAudioLabel,videoLabel:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount}),this.Fd=this.g.preferredTextLanguage,this.Jd=this.g.preferredTextRole,this.Id=this.g.preferForcedSubs,this.we=[],n&&n(this),this.K=new Vp(this,this.g.cmcd),this.ua=new zo(this.g.cmsd),this.N=s1(this),this.ma=this.oa=this.Ba=this.C=null,this.Zf=!1,this.Wf=[],this.Yf=new Yt(function(){return H(function(i){if(i.h==1)return r.oa?i.g(r.Ob(r.ma,!0),3):i.A(0);if(i.h!=4)return i.g(r.load(r.oa),4);r.Zf?r.ma.pause():r.ma.play(),r.oa=null,r.Zf=!1,i.j()})}),pd&&(this.C=pd(),this.C.configure(this.g.ads),this.Bd.F(this.C,"ad-content-pause-requested",function(i){var o,s;return H(function(a){if(a.h==1)return r.Yf.stop(),r.oa?a.A(0):(r.ma=r.h,r.Zf=r.Zd(),o=i.saveLivePosition||!1,s=!0,r.U()&&(s=o),a.g(r.Wh(!0,s),3));r.oa=a.i,a.j()})}),this.Bd.F(this.C,"ad-content-resume-requested",function(i){if(i=i.offset||0,r.oa){var o=r.oa;o.o&&i&&(typeof o.o=="number"?o.o+=i:o.o.setTime(o.o.getTime()+i*1e3))}r.Yf.ka(.1)}),this.Bd.F(this.C,"ad-content-attach-requested",function(){return H(function(i){if(i.h==1)return r.h||!r.ma?i.A(0):i.g(r.Ob(r.ma,!0),3);r.ma=null,i.j()})})),gd&&(this.Ba=gd(this),this.Ba.configure(this.g.queue)),this.Ee.F(R,"online",function(){ng(r),r.ih()}),this.Ae=new Yt(function(){for(var i=Date.now()/1e3,o=!1,s=!0,a=d(r.i.variants),u=a.next();!u.done;u=a.next())u=u.value,u.disabledUntilTime>0&&u.disabledUntilTime<=i&&(u.disabledUntilTime=0,o=!0),u.disabledUntilTime>0&&(s=!1);s&&r.Ae.stop(),o&&Ha(r,!1,void 0,!1,!1)}),this.eb=null,e&&(lt("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Ob(e,!0)),this.u=null}P(De,_n);function ad(e){e.T!=null&&(qa(e.T),e.T.release(),e.T=null)}function s2(e,t,n){n||t.lcevc.enabled?(ad(e),e.T==null&&(e.T=new Ts(e.h,e.Lh,t.lcevc,n),e.H&&(e.H.C=e.T))):ad(e)}function Yn(e,t){return new yt(e,t)}f=De.prototype,f.destroy=function(){var e=this,t;return H(function(n){switch(n.h){case 1:return e.m==ds?n.return():(ad(e),t=e.detach(),e.m=ds,n.g(t,2));case 2:return n.g(e.lg(),3);case 3:if(e.Ee&&(e.Ee.release(),e.Ee=null),e.ve&&(e.ve.release(),e.ve=null),e.j&&(e.j.release(),e.j=null),e.Zb&&(e.Zb.release(),e.Zb=null),e.Bd&&(e.Bd.release(),e.Bd=null),e.ze=null,e.g=null,e.B=null,e.ue=null,e.K=null,e.ua=null,!e.N){n.A(4);break}return n.g(e.N.destroy(),5);case 5:e.N=null;case 4:e.o&&(e.o.release(),e.o=null),e.Ba&&(e.Ba.destroy(),e.Ba=null),_n.prototype.release.call(e),n.j()}})};function q0(e,t){k1.set(e,t)}function ul(e,t){e.dispatchEvent(Yn("onstatechange",new Map().set("state",t)))}f.Ob=function(e,t){t=t===void 0?!0:t;var n=this,r,i,o;return H(function(s){switch(s.h){case 1:if(n.m==ds)throw new fe(2,7,7e3);if(r=n.h&&n.h==e,!n.h||n.h==e){s.A(2);break}return s.g(n.detach(),2);case 2:return s.g(Jp(n,"attach"),4);case 4:if(s.i)return s.return();if(s.m(5,6),r||(ul(n,"attach"),i=function(){var a=rg(n,!1);a&&ll(n,a)},n.ve.F(e,"error",i),n.h=e,n.K&&n.K.setMediaElement(e)),ct(),!t||!Ks()||n.H){s.A(6);break}return s.g(Qp(n),6);case 6:s.u(),n.ba.release(),s.B(0);break;case 5:return o=s.l(),s.g(n.detach(),10);case 10:throw o}})},f.nj=function(e){this.Lh=e},f.detach=function(e){e=e===void 0?!1:e;var t=this;return H(function(n){if(n.h==1){if(t.m==ds)throw new fe(2,7,7e3);return n.g(t.xc(!1,e),2)}if(n.h!=3)return n.g(Jp(t,"detach"),3);if(n.i)return n.return();try{t.h&&(t.ve.Ra(),t.h=null),ul(t,"detach"),t.C&&!e&&t.C.release()}finally{t.ba.release()}n.j()})};function Jp(e,t){var n;return H(function(r){return r.h==1?(n=++e.Fe,r.g(Yp(e.ba,t),2)):n!=e.Fe?(e.ba.release(),r.return(!0)):r.return(!1)})}f.xc=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B;return H(function(Z){switch(Z.h){case 1:return n.m!=ds&&(n.m=hd),Z.g(Jp(n,"unload"),2);case 2:return Z.i?Z.return():(Z.D(3),n.Ua=!1,ul(n,"unload"),ad(n),r=n.we.map(function(ue){return ue()}),n.we=[],Z.g(Promise.all(r),5));case 5:if(n.dispatchEvent(Yn("unloading")),n.se&&(n.se.release(),n.se=null),n.za&&(n.za.release(),n.za=null),n.hb&&(n.hb.release(),n.hb=null),n.h&&(n.j.Ra(),n.Zb.Ra()),n.Ae.stop(),n.Wb&&(n.Wb.release(),n.Wb=null),n.Ka&&(n.Ka.stop(),n.Ka=null),!n.I){Z.A(6);break}return Z.g(n.I.stop(),7);case 7:n.I=null,n.uc=null;case 6:if(n.o&&n.o.stop(),!n.l){Z.A(8);break}return Z.g(n.l.destroy(),9);case 9:n.l=null;case 8:if(n.M&&(n.M.release(),n.M=null),n.G&&(n.G.release(),n.G=null),R.shakaMediaKeysPolyfill!=="webkit"||!n.D){Z.A(10);break}return Z.g(n.D.destroy(),11);case 11:n.D=null;case 10:if(!n.H){Z.A(12);break}return Z.g(n.H.destroy(),13);case 13:n.H=null;case 12:if(n.C&&!t&&n.C.onAssetUnload(),n.oa&&!t&&(n.oa.destroy(),n.oa=null),t||n.Yf.stop(),n.K&&VC(n.K),n.ua&&(n.ua.g=null),!n.u){Z.A(14);break}return Z.g(n.u.destroy(),15);case 15:n.u=null;case 14:if(n.$=!1,n.h){for(i=d(n.Wf),o=i.next();!o.done;o=i.next())s=o.value,s.src.startsWith("blob:")&&URL.revokeObjectURL(s.src),s.remove();n.Wf=[],Af(n.h)&&n.h.load()}if(!n.D){Z.A(16);break}return Z.g(n.D.destroy(),17);case 17:n.D=null;case 16:if(n.eb&&n.X!=n.eb.jd()&&(n.eb.l||n.eb.destroy(),n.eb=null),n.X=null,n.Ga=null,n.P=null,n.i){for(a=d(n.i.variants),u=a.next();!u.done;u=a.next())for(l=u.value,h=d([l.audio,l.video]),g=h.next();!g.done;g=h.next())(m=g.value)&&m.segmentIndex&&m.segmentIndex.release();for(E=d(n.i.textStreams),A=E.next();!A.done;A=E.next())k=A.value,k.segmentIndex&&k.segmentIndex.release()}for(n.g&&n.g.streaming.clearDecodingCache&&(cf.clear(),wo.clear()),n.i=null,n.B=new Qf,n.Kh=null,n.Yb=null,n.V=null,n.Ge=-1,n.De=[],b=d(n.tc.values()),V=b.next();!V.done;V=b.next())B=V.value,B.stop();n.tc.clear(),n.ib=[],n.Vf=-1,n.N&&n.N.Sh(),pc(n);case 3:Z.u(),n.ba.release(),Z.B(4);break;case 4:if(ct(),e&&Ks()&&!n.H&&n.h)return Z.g(Qp(n),0);Z.A(0)}})},f.ll=function(e){this.O=e},f.load=function(e,t,n){t=t===void 0?null:t;var r=this,i,o,s,a,u,l,h,g,m,E,A,k,b,V;return H(function(B){switch(B.h){case 1:if(r.m==ds)throw new fe(2,7,7e3);if(r.h||!r.ma){B.A(2);break}return B.g(r.Ob(r.ma,!0),3);case 3:r.ma=null;case 2:if(i=null,o="",e instanceof Wo){if(e.l)throw new fe(2,7,7006);i=e,o=i.jd()||""}else o=e||"";return B.g(Yp(r.ba,"load"),4);case 4:if(r.ba.release(),!r.h)throw new fe(2,7,7002);if(!r.X){B.A(5);break}return r.X=o,B.g(r.xc(!1),5);case 5:if(s=++r.Fe,a=function(){return H(function(Z){if(Z.h==1)return r.Fe==s?Z.A(0):i?Z.g(i.destroy(),3):Z.A(3);throw new fe(2,7,7e3)})},u=function(Z,ue){return H(function(pe){switch(pe.h){case 1:return pe.D(2),pe.g(Yp(r.ba,ue),4);case 4:return pe.g(a(),5);case 5:return pe.g(Z(),6);case 6:return pe.g(a(),7);case 7:i&&r.g&&(i.g=r.g);case 2:pe.u(),r.ba.release(),pe.B(0)}})},B.m(7,8),t==null&&i&&(t=i.getStartTime()),r.O=t,r.Ua=!1,r.dispatchEvent(Yn("loading")),i){n=i.V,B.A(10);break}if(n){B.A(10);break}return B.g(u(function(){return H(function(Z){if(Z.h==1)return Z.g(r1(r,o),2);n=Z.i,Z.j()})},"guessMimeType_"),10);case 10:if(l=!!i,i){x0(i,r),r.B=i.getStats(),B.A(13);break}return B.g(t1(r,o,t,n,!0,r.g),14);case 14:(i=B.i)?(i.D=!1,x0(i,r),r.B=i.getStats(),i.start(),i.B.catch(function(){})):r.B=new Qf;case 13:return h=!i,g=Date.now()/1e3,r.B=i?i.getStats():new Qf,r.X=o,r.Ga=n||null,pc(r),m=function(){var Z=r.h?r.h.buffered:null;return{start:Ty(Z)||0,end:wf(Z)||0}},r.za=new tc(m),r.za.addEventListener("regionadd",function(Z){Zp(r,Z.region,"metadataadded")}),h?B.g(u(function(){return H(function(Z){return Z.g(c2(r,n),0)})},"initializeSrcEqualsDrmInner_"),25):(r.hb=new tc(m),B.g(u(function(){return H(function(Z){if(Z.h==1)return Z.g(Promise.race([i.ma,i.B]),2);r.uc=i.H;var ue=i;ue.oa=!0,r.I=ue.m,r.i=i.Fg(),Z.j()})},"waitForFinish"),17));case 17:if(r.H){B.A(18);break}return B.g(u(function(){return H(function(Z){return Z.g(Qp(r),0)})},"initializeMediaSourceEngineInner_"),18);case 18:return r.i&&r.i.textStreams.length&&(r.u.enableTextDisplayer?r.u.enableTextDisplayer():lt("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),B.g(u(function(){return H(function(Z){return Z.g(i.B,0)})},"waitForFinish"),20);case 20:if(r.g=i.getConfiguration(),r.xe=i.G,r.I&&r.I.setMediaElement&&r.h&&r.I.setMediaElement(r.h),r.se=IC(i),r.qe=i.Ga,(E=i.C)&&(r.J=E),l&&r.h&&r.h.nodeName==="AUDIO"&&(a2(r),r.configure("manifest.disableVideo",!0)),i.j){B.A(21);break}return B.g(u(function(){return H(function(Z){return Z.g(w0(i,r.h),0)})},"drmEngine_.init"),21);case 21:return r.D=CC(i),B.g(u(function(){return H(function(Z){return Z.g(r.D.Ob(r.h),0)})},"drmEngine_.attach"),23);case 23:return A=r.g.abrFactory,r.o&&r.ze==A||(r.ze=A,r.o&&r.o.release(),r.o=A(),typeof r.o.setMediaElement!="function"&&(lt("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),r.o.setMediaElement=function(){}),typeof r.o.setCmsdManager!="function"&&(lt("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),r.o.setCmsdManager=function(){}),typeof r.o.trySuggestStreams!="function"&&(lt("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),r.o.trySuggestStreams=function(){}),r.o.configure(r.g.abr)),k=MC(i),b=i.i,B.g(u(function(){return H(function(Z){return Z.g(l2(r,g,b,k),0)})},"loadInner_"),24);case 24:AC(i),r.Ga&&ct().cj()&&uu(r.Ga)&&dI(r.H,r.X,r.Ga),B.A(16);break;case 25:return B.g(u(function(){return H(function(Z){return Z.g(f2(r,g,n),0)})},"srcEqualsInner_"),16);case 16:r.dispatchEvent(Yn("loaded"));case 8:if(B.u(),!i){B.A(27);break}return B.g(i.destroy(),27);case 27:r.eb=null,B.B(0);break;case 7:if(V=B.l(),!V||V.code==7e3){B.A(29);break}return B.g(r.xc(!1),29);case 29:throw V}})};function a2(e){for(var t=d(e.i.variants),n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.closeSegmentIndex(),n.video=null),n.bandwidth=n.audio&&n.audio.bandwidth?n.audio.bandwidth:0;e.i.variants=e.i.variants.filter(function(r){return r.audio})}f.gj=function(e,t,n){e=e===void 0?!0:e,t=t===void 0?!1:t,n=n===void 0?!1:n;var r=this,i;return H(function(o){return o.h==1?o.g(e1(r,n),2):o.h!=3?(i=o.i,o.g(r.xc(e,t),3)):o.return(i)})},f.Wh=function(e,t){e=e===void 0?!1:e,t=t===void 0?!1:t;var n=this,r;return H(function(i){return i.h==1?i.g(e1(n,t),2):i.h!=3?(r=i.i,i.g(n.detach(e),3)):i.return(r)})};function e1(e,t){t=t===void 0?!1:t;var n,r,i;return H(function(o){if(o.h==1)return n=null,e.i&&e.I&&e.uc&&e.X&&e.g?(r=e.h.currentTime,t||(r=null),o.g(n1(e,e.X,r,e.Ga,e.g,!0,!1),3)):o.A(2);if(o.h!=2){n=o.i,e.Be.push(n),e.I&&e.I.setMediaElement&&e.I.setMediaElement(null),(i=e.l?e.l.o:null)&&(n.i=i);var s=n,a=e.I,u=e.uc;s.h=e.i,s.m=a,s.H=u,n.C=e.J,n.start(),e.i=null,e.I=null,e.uc=null,e.o=null,e.ze=null}return o.return(n)})}f.preload=function(e,t,n,r){t=t===void 0?null:t;var i=this,o,s;return H(function(a){return a.h==1?(o=bs(i),pa(o,r||i.g,bs(i)),a.g(t1(i,e,t,n,!1,o),2)):((s=a.i)?s.start():ll(i,new fe(2,7,7005)),a.return(s))})},f.lg=function(){var e=this,t,n,r,i;return H(function(o){for(t=[],n=d(e.Be),r=n.next();!r.done;r=n.next())i=r.value,i.l||t.push(i.destroy());return e.Be=[],o.g(Promise.all(t),0)})};function t1(e,t,n,r,i,o){i=i===void 0?!1:i;var s,a,u;return H(function(l){return l.h==1?r?l.A(2):l.g(r1(e,t),3):(l.h!=2&&(r=l.i),u2(e,r)?l.return(null):(s=o||e.g,a=!1,i&&e.h&&e.h.nodeName==="AUDIO"&&(a=!0),u=n1(e,t,n,r||null,s,!i,a),u=i?u.then(function(h){return h.D=!1,h}):u.then(function(h){return e.Be.push(h),h}),l.return(u)))})}function n1(e,t,n,r,i,o,s){o=o===void 0?!0:o,s=s===void 0?!1:s;var a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe;return H(function(te){return te.h==1?(a=null,u=Ki(i),s&&(u.manifest.disableVideo=!0),l=function(){return a.P&&a.l?null:a},h=function(){return l()?l().getConfiguration():e.g},e.ya.width!=1/0||e.ya.height!=1/0||e.g.ignoreHardwareResolution?te.A(2):(g=ct(),te.g(g.fc(),3))):(te.h!=2&&(m=te.i,e.ya.width=m.width,e.ya.height=m.height),E=new $h(u,e.ya,null),A={networkingEngine:e.N,filter:function(le){var ie,ve;return H(function(ce){if(ce.h==1)return ce.g(ry(E,le),2);if(ce.h!=4)return ie=ce.i,ie?(ve=Yn("trackschanged"),ce.g(Promise.resolve(),4)):ce.A(0);a.dispatchEvent(ve),ce.j()})},makeTextStreamsForClosedCaptions:function(le){return A2(e,le)},onTimelineRegionAdded:function(le){gp(a.I,le)},onEvent:function(le){return a.dispatchEvent(le)},onError:function(le){return a.onError(le)},isLowLatencyMode:function(){return h().streaming.lowLatencyMode},updateDuration:function(){e.l&&a.P&&e.l.updateDuration()},newDrmInfo:function(le){var ie=a.j,ve=ie?ie.g:null;ve&&ie.B&&sy(E,ve.keySystem,le)},onManifestUpdated:function(){var le=new Map().set("isLive",e.U());a.dispatchEvent(Yn("manifestupdated",le)),lc(a,!1,function(){e.C&&e.C.onManifestUpdated(e.U())})},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},onMetadata:function(le,ie,ve,ce){var Ee=le;(le=="com.apple.hls.interstitial"||le=="com.apple.hls.overlay")&&(Ee="com.apple.quicktime.HLS",le={startTime:ie,endTime:ve,values:ce},e.C&&e.C.onHLSInterstitialMetadata(e,e.h,le)),ce=d(ce),le=ce.next();for(var ye={};!le.done;ye={Zg:void 0},le=ce.next())ye.Zg=le.value,ye.Zg.name!="ID"&&lc(a,!1,function(Ve){return function(){qp(e,ie,ve,Ee,Ve.Zg)}}(ye))},disableStream:function(le){return e.disableStream(le,e.g.streaming.maxDisabledTime)},addFont:function(le,ie){return e.addFont(le,ie)}},k=new tc(function(){return e.Sa()}),k.addEventListener("regionadd",function(le){var ie=le.region;yc(e,"timelineregionadded",ie,a),lc(a,!1,function(){e.C&&(e.C.onDashTimedMetadata(ie),e.C.onDASHInterstitialMetadata(e,e.h,ie))})}),b=null,u.streaming.observeQualityChanges&&(b=new Of(function(){return e.Bc()}),b.addEventListener("qualitychange",function(le){I1(e,le.quality,le.position)}),b.addEventListener("audiotrackchange",function(le){I1(e,le.quality,le.position,!0)})),V=!0,B={nc:e.N,onError:function(le){return a.onError(le)},vf:function(le){lc(a,!0,function(){e.D&&C2(e,le)})},onExpirationUpdated:function(le,ie){var ve=Yn("expirationupdated");a.dispatchEvent(ve),(ve=a.m)&&ve.onExpirationUpdated&&ve.onExpirationUpdated(le,ie)},onEvent:function(le){if(a.dispatchEvent(le),le.type=="drmsessionupdate"&&V){V=!1,le=Date.now()/1e3-a.za;var ie=e.B||a.getStats();le>=0&&(ie.m=le),e.T&&qa(e.T)}}},Z=s1(e,l),Fv(e.N,Z),ue=function(){return e.dd(B)},pe={config:u,wk:A,Ik:k,Hk:b,dd:ue,vk:E,networkingEngine:Z,mj:o},a=new Wo(t,r,n,pe),te.return(a))})}function r1(e,t){var n,r,i,o;return H(function(s){return s.h==1?(n=e.g.manifest.retryParameters,s.g(tl(t,e.N,n),2)):(r=s.i,r=="application/x-mpegurl"&&(i=ct(),i.Ia()==="WEBKIT"&&(r="application/vnd.apple.mpegurl")),r=="video/quicktime"&&(o=ct(),o.Ia()==="CHROMIUM"&&(r="video/mp4")),s.return(r))})}function u2(e,t){if(!Ks(ct()))return!0;if(t){if((e.h||Tu()).canPlayType(t)=="")return!1;if(!Ks(ct())||!Bo.has(t.toLowerCase()))return!0;if(uu(t))return ct().Ia()==="WEBKIT"&&(e.g.drm.servers["com.apple.fps"]||e.g.drm.servers["com.apple.fps.1_0"])?e.g.streaming.useNativeHlsForFairPlay:e.g.streaming.preferNativeHls;if(t==="application/dash+xml"||t==="video/vnd.mpeg.dash.mpd")return e.g.streaming.preferNativeDash}return!1}function ud(e,t){var n=e.g.textDisplayFactory;e.Kh!==n||t!==void 0&&t?(t=e.u,e.u=n(),e.u.configure?e.u.configure(e.g.textDisplayer):lt("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.u.setTextLanguage||lt("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),t?(e.u.setTextVisibility(t.isTextVisible()),t.destroy().catch(function(){})):e.u.setTextVisibility(e.$),e.H&&EI(e.H,e.u),e.Kh=n,e.l&&$I(e.l)):e.u&&e.u.configure&&e.u.configure(e.g.textDisplayer)}function Qp(e){var t,n,r;return H(function(i){if(i.h==1)return ct(),ul(e,"media-source"),e.g.mediaSource.useSourceElements&&Af(e.h),ud(e),t=S2(e.h,e.u,{Mj:function(){return e.keySystem()},onMetadata:function(o,s,a){o=d(o);for(var u=o.next();!u.done;u=o.next())if(u=u.value,u.data&&typeof u.cueTime=="number"&&u.frames){var l=u.cueTime+s,h=a;h&&l>h&&(h=l);for(var g=d(u.frames),m=g.next();!m.done;m=g.next())qp(e,l,h,"org.id3",m.value);e.C&&e.C.onHlsTimedMetadata(u,l)}},Ck:function(o){e.hb&&gp(e.hb,{schemeIdUri:o.schemeIdUri,startTime:o.startTime,endTime:o.endTime,id:String(o.id),emsg:o})},onEvent:function(o){return e.dispatchEvent(o)},Ek:function(){e.I&&e.I.update&&e.I.update()}},e.T,e.g.mediaSource),n=e.g.manifest,r=n.segmentRelativeVttTiming,t.Ga=r,i.g(t.M,2);e.H=t,i.j()})}function i1(e,t){e.M=new Df({Gg:function(){return t.playbackRate},kd:function(){return t.defaultPlaybackRate},Si:function(n){t.playbackRate=n},Ak:function(n){t.currentTime+=n},isPaused:function(){return t.paused}})}function o1(e,t,n){function r(){return eg(e)}if(e.j.F(t,"playing",r),e.j.F(t,"pause",r),e.j.F(t,"ended",r),e.j.F(t,"ratechange",function(){var o=e.h.playbackRate;o!=0&&(e.M&&(e.M.set(o),e.m==pi&&e.o.playbackRateChanged(o),m1(e,o)),o=Yn("ratechange"),e.dispatchEvent(o))}),t.remote&&(e.j.F(t.remote,"connect",function(){e.l&&t.remote.state=="connected"&&ma(e),Wi(e)}),e.j.F(t.remote,"connecting",function(){return Wi(e)}),e.j.F(t.remote,"disconnect",function(){return H(function(o){if(o.h==1)return e.l&&t.remote.state=="disconnected"?o.g(Hf(e.l),3):o.A(2);o.h!=2&&ma(e),Wi(e),o.j()})})),t.audioTracks&&(e.j.F(t.audioTracks,"addtrack",function(){return Wi(e)}),e.j.F(t.audioTracks,"removetrack",function(){return Wi(e)}),e.j.F(t.audioTracks,"change",function(){return Wi(e)})),t.videoTracks&&(e.j.F(t.videoTracks,"addtrack",function(){return Wi(e)}),e.j.F(t.videoTracks,"removetrack",function(){return Wi(e)}),e.j.F(t.videoTracks,"change",function(){return Wi(e)})),(t.webkitPresentationMode||t.webkitSupportsFullscreen)&&e.j.F(t,"webkitpresentationmodechanged",function(){e.ue&&ud(e,!0)}),t.textTracks){var i=function(){e.m===go&&e.u instanceof Jr&&ma(e),Wi(e)};e.j.F(t.textTracks,"addtrack",function(o){if(o.track)switch(o=o.track,o.kind){case"metadata":p2(e,o);break;case"chapters":g2(e,o);break;default:i()}}),e.j.F(t.textTracks,"removetrack",i),e.j.F(t.textTracks,"change",i)}t.preload!="none"&&e.j.Aa(t,"loadedmetadata",function(){var o=e.B,s=Date.now()/1e3-n;s>=0&&(o.G=s)})}function l2(e,t,n,r){var i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce,Ee,ye,Ve,Le,Ce;return H(function(ke){switch(ke.h){case 1:for(ul(e,"load"),i=e.h,i1(e,i),o1(e,i,t),("onchange"in R.screen)&&e.j.F(R.screen,"change",function(){if(e.J.getConfiguration){var Ge=e.J.getConfiguration();Ge.hdrLevel=="AUTO"?_a(e):e.g.preferredVideoHdrLevel=="AUTO"&&e.g.abr.enabled&&(Ge.hdrLevel="AUTO",e.J.configure(Ge),_a(e))}}),o=!1,s=d(e.i.variants),a=s.next();!a.done;a=s.next())u=a.value,(l=u.video&&u.video.dependencyStream)&&(o=eu(l));s2(e,e.g,o),e.Fd=e.g.preferredTextLanguage,e.Jd=e.g.preferredTextRole,e.Id=e.g.preferForcedSubs,ig(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.o.init(function(Ge,Je,Ft){e.i&&e.l&&Ge!=e.l.o&&mc(e,Ge,!0,Je===void 0?!1:Je,Ft===void 0?0:Ft)}),e.o.setMediaElement(i),e.o.setCmsdManager(e.ua),e.l=T2(e),e.l.configure(e.g.streaming),e.m=pi,e.dispatchEvent(Yn("streaming")),h=n;case 2:for((m=e.l.o)||h||(h=y1(e,!0)),E=[],g=m||h,A=d([g.video,g.audio]),k=A.next();!k.done;k=A.next())(b=k.value)&&!b.segmentIndex&&(E.push(b.createSegmentIndex()),b.dependencyStream&&E.push(b.dependencyStream.createSegmentIndex()));if(!(E.length>0)){ke.A(4);break}return ke.g(Promise.all(E),4);case 4:if(!g||g.disabledUntilTime!=0){ke.A(2);break}if(_a(e),e.I&&e.I.onInitialVariantChosen&&e.I.onInitialVariantChosen(g),e.i.isLowLatency&&(e.g.streaming.lowLatencyMode?e.configure(e.Xf):ut("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.")),e.K&&(_C(e.K,e.i.isLowLatency&&e.g.streaming.lowLatencyMode),HC(e.K,t*1e3)),ig(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),KI(e.l,e.g.playRangeStart,e.g.playRangeEnd),e.Ua=!0,e.dispatchEvent(Yn("canupdatestarttime")),V=function(Ge){e.G=m2(e,Ge),e.Wb=v2(e,Ge),a1(e,i,!1)},e.g.streaming.startAtSegmentBoundary||(B=e.O,B==null&&e.i.startTime&&(B=e.i.startTime),V(B)),m){ke.A(7);break}if(!e.g.streaming.startAtSegmentBoundary){ke.A(8);break}return Z=e.i.presentationTimeline,e.O instanceof Date&&(pe=Z.m||Z.i,te=e.O.getTime()/1e3-pe,te!=null&&(ue=te)),ue==null&&(ue=typeof e.O=="number"?e.O:e.U()?1/0:e.h.currentTime),e.O==null&&e.i.startTime&&(ue=e.i.startTime),le=Z.Tb(),ie=Z.Cb(),ue<le?ue=le:ue>ie&&(ue=ie),ke.g(I2(h,ue),9);case 9:ve=ke.i,V(ve);case 8:mc(e,h,!0,!1,0);case 7:return e.G.ready(),ce=e.Fc().find(function(Ge){return Ge.active}),ce||((Ee=_e(e.i.textStreams,e.Fd,e.Jd,e.Id)[0]||null)&&Dp(e.B.h,Ee,!0),h&&(Ee?(Li(h.audio,Ee,e.g)&&(e.$=!0),e.$&&e.u.setTextVisibility(!0)):(e.$=!1,e.u.setTextVisibility(!1)),w1(e)),Ee&&(e.g.streaming.alwaysStreamText||e.Pg())&&(jf(e.l,Ee),vc(e))),ke.g(e.l.start(r),10);case 10:e.g.abr.enabled&&(e.o.enable(),A1(e)),Wi(e),e.i.variants.some(function(Ge){return Ge.primary}),((ye=e.U())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.i.serviceDescription||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(Ve=function(){return v1(e)},e.j.F(i,"timeupdate",Ve)),ye||(Le=function(){return dd(e)},e.j.F(i,"timeupdate",Le),dd(e),e.i.nextUrl&&(e.g.streaming.preloadNextUrlWindow>0&&(Ce=function(){var Ge;return H(function(Je){if(Je.h==1)return Ge=e.Sa().end-e.h.currentTime,isNaN(Ge)||!(Ge<=e.g.streaming.preloadNextUrlWindow)?Je.A(0):(e.j.Na(i,"timeupdate",Ce),Je.g(e.preload(e.i.nextUrl),4));e.eb=Je.i,Je.j()})},e.j.F(i,"timeupdate",Ce)),e.j.F(i,"ended",function(){e.load(e.eb||e.i.nextUrl)}))),e.C&&e.C.onManifestUpdated(ye),ke.j()}})}function c2(e,t){var n,r,i;return H(function(o){return o.h==1?(n=Date.now()/1e3,r=!0,e.D=e.dd({nc:e.N,onError:function(s){ll(e,s)},vf:function(){},onExpirationUpdated:function(){var s=Yn("expirationupdated");e.dispatchEvent(s)},onEvent:function(s){if(e.dispatchEvent(s),s.type=="drmsessionupdate"&&r){r=!1,s=e.B;var a=Date.now()/1e3-n;a>=0&&(s.m=a)}}}),e.D.configure(e.g.drm),i=Rv([t]),e.D.O=!0,o.g(Wv(e.D,[i],[]),2)):o.g(e.D.Ob(e.h),0)})}function f2(e,t,n){var r,i,o,s,a,u,l,h,g,m,E,A;return H(function(k){switch(k.h){case 1:if(ul(e,"src-equals"),r=e.h,e.G=new Yy(r),i=!1,e.we.push(function(){i=!0}),e.dispatchEvent(Yn("canupdatestarttime")),e.O!=null&&e.G.Uf(e.O),e.Wb=y2(e,e.O||0),i1(e,r),a1(e,r,!0),r.textTracks&&(ud(e),o=function(b){if(!(e.u instanceof Jr)){var V=ld(e).find(function(B){return B.mode!=="disabled"});V&&(V.mode=b?"showing":"hidden"),e.u instanceof xi&&(V=E2(e))&&(V.mode=!b&&e.u.isTextVisible()?"showing":"hidden")}},e.j.F(r,"enterpictureinpicture",function(){return o(!0)}),e.j.F(r,"leavepictureinpicture",function(){return o(!1)}),r.remote?(e.j.F(r.remote,"connect",function(){return o(!1)}),e.j.F(r.remote,"connecting",function(){return o(!1)}),e.j.F(r.remote,"disconnect",function(){return o(!1)})):"webkitCurrentPlaybackTargetIsWireless"in r&&e.j.F(r,"webkitcurrentplaybacktargetiswirelesschanged",function(){return o(!1)}),s=r,(s.webkitPresentationMode||s.webkitSupportsFullscreen)&&e.j.F(s,"webkitpresentationmodechanged",function(){s.webkitPresentationMode?o(s.webkitPresentationMode!=="inline"):s.webkitSupportsFullscreen&&o(s.webkitDisplayingFullscreen)})),o1(e,r,t),a=GC(e.K,e.X,n),!a.includes("#t=")&&(e.g.playRangeStart>0||isFinite(e.g.playRangeEnd))&&(a+="#t=",e.g.playRangeStart>0&&(a+=e.g.playRangeStart),isFinite(e.g.playRangeEnd)&&(a+=","+e.g.playRangeEnd)),!e.H){k.A(2);break}return k.g(e.H.destroy(),3);case 3:e.H=null;case 2:return Af(r),r.src=a,u=ct(),u.Pa()=="TV"&&r.load(),r.preload!="none"&&!r.autoplay&&uu(n)&&u.Ia()==="WEBKIT"&&r.load(),e.m=go,e.dispatchEvent(Yn("streaming")),l=function(){return new Promise(function(b){var V=new Yt(b);e.j.F(r.textTracks,"change",function(){return V.ka(.5)}),V.ka(.5)})},h=new zn,el(r,HTMLMediaElement.HAVE_METADATA,e.j,function(){return H(function(b){if(b.h==1)return e.G.ready(),e.Ga&&uu(e.Ga)?b.g(l(),3):(h.resolve(),b.A(0));h.resolve(),b.j()})}),el(r,HTMLMediaElement.HAVE_CURRENT_DATA,e.j,function(){var b,V,B,Z,ue;return H(function(pe){if(pe.h==1)return pe.g(l(),2);if(i)return pe.return();if(d2(e),b=ld(e),b.some(function(te){return te.mode==="showing"})&&(e.$=!0,e.u.setTextVisibility(!0)),!(e.u instanceof Jr))for(b.length&&(e.u.enableTextDisplayer?e.u.enableTextDisplayer():lt("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),V=!1,B=d(b),Z=B.next();!Z.done;Z=B.next())ue=Z.value,ue.mode!=="disabled"&&(V?(ue.mode="disabled",ut("Found more than one enabled text track, disabling it",ue)):(h1(e,ue),V=!0));h2(e),pe.j()})}),r.error?h.reject(rg(e)):r.preload=="none"&&(ut('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve()),e.j.Aa(r,"error",function(){h.reject(rg(e))}),k.g(Fu(e.g.streaming.loadTimeout,h),4);case 4:((g=e.U())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(m=function(){return v1(e)},e.j.F(r,"timeupdate",m)),g||(E=function(){return dd(e)},e.j.F(r,"timeupdate",E),dd(e)),e.C&&(e.C.onManifestUpdated(g),g&&(A=e.Sa().end,e.j.F(r,"progress",function(){var b=e.Sa().end;A!=b&&(e.C.onManifestUpdated(e.U()),A=b)}))),e.Ua=!0,k.j()}})}function d2(e){var t=e.g.preferredAudioLanguage;t!=""&&e.Oi(t,e.g.preferredAudioRole)}function h2(e){var t=e.g.preferredTextLanguage;t!=""&&e.mh(t,e.g.preferredTextRole,e.g.preferForcedSubs)}function p2(e,t){if(t.kind=="metadata"){t.mode="hidden",e.j.F(t,"cuechange",function(){if(t.activeCues)for(var r=d(t.activeCues),i=r.next();!i.done;i=r.next())i=i.value,qp(e,i.startTime,i.endTime,i.type,i.value),e.C&&e.C.onCueMetadataChange(i.value);if(t.cues){r=[],i=d(t.cues);for(var o=i.next(),s={};!o.done;s={zc:void 0},o=i.next())s.zc=o.value,s.zc.type=="com.apple.quicktime.HLS"&&s.zc.startTime!=null&&(o=r.find(function(a){return function(u){return u.startTime==a.zc.startTime&&u.endTime==a.zc.endTime}}(s)),o||(o={startTime:s.zc.startTime,endTime:s.zc.endTime,values:[]},r.push(o)),o.values.push(s.zc.value));for(r=d(r),i=r.next();!i.done;i=r.next())i=i.value,i.values.some(function(a){return a.key=="X-ASSET-URI"||a.key=="X-ASSET-LIST"})&&e.C&&(i.values.push({key:"CUE",description:"",data:i.startTime!=0||e.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),e.C.onHLSInterstitialMetadata(e,e.h,i))}});var n=new Yt(function(){var r=x2(e);r=d(r);for(var i=r.next();!i.done;i=r.next())i.value.mode="hidden"}).xb().ka(.5);e.we.push(function(){n.stop()})}}function Zp(e,t,n){t=new Map().set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent(Yn(n,t))}function qp(e,t,n,r,i){e.za&&(t={schemeIdUri:r,startTime:t,endTime:n||1/0,id:"",payload:i},t.id=JSON.stringify(t),gp(e.za,t))}function g2(e,t){if(t&&t.kind=="chapters"){t.mode="hidden";var n=new Yt(function(){t.mode="hidden"}).xb().ka(.5);e.we.push(function(){n.stop()})}}f.Mk=function(){for(var e=this.ba;e.g;)e.release()},f.dd=function(e){return new yf(e)};function s1(e,t){function n(o){t()?t().dispatchEvent(o):e.dispatchEvent(o)}function r(o){t()?lc(t(),!0,o):o()}t||(t=function(){return null});var i=new lr(function(o,s,a,u,l){r(function(){e.o&&e.o.segmentDownloaded(o,s,a,u,l)})},function(o,s,a){s=new Map().set("headers",o).set("request",s).set("requestType",a),n(Yn("downloadheadersreceived",s)),r(function(){if(e.ua){var u=e.ua;if(u.h.enabled){var l=o["cmsd-static"];if(l)try{var h=new Map,g=l.split(",");for(l=0;l<g.length;l++){var m=g[l].split("=");h.set(m[0],$0(m[1]))}}catch{}if(h=o["cmsd-dynamic"]){e:{try{var E=new Map,A=h.split(";");for(h=1;h<A.length;h++){var k=A[h].split("=");E.set(k[0],$0(k[1]))}var b=E;break e}catch{b=null;break e}b=void 0}b&&(u.g=b)}}}})},function(o,s){o=new Map().set("request",o).set("response",s),n(Yn("downloadcompleted",o))},function(o,s,a,u){o=new Map().set("request",o).set("error",s).set("httpResponseCode",a).set("aborted",u),n(Yn("downloadfailed",o))},function(o,s,a){r(function(){if(e.K){var u=e.K,l=a;if(l=l===void 0?{}:l,u.g.enabled)if(s.method==="HEAD")al(u,s,{});else switch(o){case 0:try{if(u.g.enabled){if(l.type){e:{switch(l.type){case 4:var h=u.u?id:rd;break e;case 3:case 2:h=u.u?sd:od;break e;case 5:h="s";break e}h=void 0}u.l=h}al(u,s,{ot:_0,su:!u.D})}}catch(m){In("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",m)}break;case Go:try{if(u.g.enabled){var g=B0(u,l,s.uris[0]);g.ts=Date.now(),u.m.has(s)&&u.m.delete(s),u.m.set(s,g.ts),al(u,s,g)}}catch(m){In("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:al(u,s,{ot:"k"});break;case 4:al(u,s,{ot:"o"})}}})},function(o,s,a,u){(o=t()?t().m:e.I)&&o.banLocation&&o.banLocation(u)},function(o,s,a){if(s.data){var u=s.data.byteLength,l=t()?t().getStats():e.B;if(l&&(E0(l,u),o===0&&(l.ri=u)),u=e.K,a=a===void 0?{}:a,_p(u).length!==0)switch(o){case Go:try{var h=B0(u,a,s.uri);s.originalRequest&&s.originalRequest.timeToFirstByte!=null&&(h.ttfb=s.originalRequest.timeToFirstByte),s.timeMs!=null&&(h.ttlb=s.timeMs);var g=s.originalUri||s.uri;if(g.includes("CMCD="))try{var m=new URL(g);m.searchParams.delete("CMCD");var E=m.toString()}catch{E=g}else E=g;h.url=E,u.m.has(s.originalRequest)?(h.ts=u.m.get(s.originalRequest),u.m.delete(s.originalRequest)):h.ts||(h.ts=Date.now());var A=_p(u);if(A.length!==0){var k=u.g.version==$p?Array.from(new Set([].concat(M(Xp),M(e2)))):H0;h.rc=s.status||0;var b=Wp(u,h,W0);s.headers&&s.headers["CMSD-Static"]&&(b.cmsds=btoa(s.headers["CMSD-Static"])),s.headers&&s.headers["CMSD-Dynamic"]&&(b.cmsdd=btoa(s.headers["CMSD-Dynamic"]));for(var V=d(A),B=V.next();!B.done;B=V.next()){var Z=B.value,ue=Gp(Z.includeKeys||[],k),pe=F0(Z);u.o[pe]||(u.o[pe]={request:1,response:1}),b.sn=u.o[pe].response++;var te=Kp(b,ue);j0(u,te,Z,s)}}}catch(le){In("CMCD_SEGMENT_ERROR","Could not generate response segment CMCD data.",le)}}}});return i.configure(e.g.networking),i}function m2(e,t){return new Zy(e.h,e.i,e.g.streaming,t,function(){e.Wb&&r0(e.Wb,!e.G.Ih()),e.l&&e.l.Tc(),e.P&&Gs(e,"seeking")},function(n){return e.dispatchEvent(n)})}function v2(e,t){var n=e.U()||typeof t=="number"&&t>0;t=new wu(e.se,n),t.addEventListener("enter",function(o){yc(e,"timelineregionenter",o.region)}),t.addEventListener("exit",function(o){yc(e,"timelineregionexit",o.region)}),t.addEventListener("skip",function(o){var s=o.region;o.seeking||(yc(e,"timelineregionenter",s),yc(e,"timelineregionexit",s))});var r=new wu(e.za,n);r.addEventListener("enter",function(o){Zp(e,o.region,"metadata")}),n=new wu(e.hb,n),n.addEventListener("enter",function(o){o=new Map().set("detail",o.region.emsg),e.dispatchEvent(Yn("emsg",o))});var i=new pp(e.h);return i.g.add(t),i.g.add(r),i.g.add(n),e.qe&&i.g.add(e.qe),i}function y2(e,t){t=new wu(e.za,t instanceof Date||t>0),t.addEventListener("enter",function(r){Zp(e,r.region,"metadata")});var n=new pp(e.h);return n.g.add(t),n}function a1(e,t,n){e.P=new BA,zh(e.P,mu),u1(e),pc(e),e.Ka=new Yt(function(){Gs(e)}),e.g.streaming.rebufferingGoal&&e.Ka.Ea(.25),e.j.F(t,"waiting",function(){return Gs(e,"waiting")}),e.j.F(t,"canplaythrough",function(){return Gs(e,"canplaythrough")}),e.j.F(t,"playing",function(){return Gs(e,"playing")}),e.j.F(t,"seeked",function(){return Gs(e,"seeked")}),e.j.F(t,"timeupdate",function(){return Gs(e,"timeupdate")}),n&&(e.j.F(t,"progress",function(){return Gs(e,"progress")}),e.j.F(t,"stalled",function(){return Gs(e,"stalled")}))}function u1(e){var t=e.g.streaming.rebufferingGoal;e.P.j.set(vu,Math.min(.5,t/2)).set(mu,t)}function Gs(e,t){if(e.g.streaming.rebufferingGoal){t=e.H?xu(e.H):!1,t=e.Zd()||t||e.G.mi();var n=Ey(e.h.buffered,e.h.currentTime),r=e.P,i=r.j.get(r.g);zh(r,t||n>=i&&n>0?vu:mu)&&pc(e)}else if(t){n=e.P,r=e.h.currentTime,i=n.h,n.h=r;var o=void 0;switch(t){case"seeking":case"waiting":n.h=-1,o=mu;break;case"canplaythrough":case"playing":case"seeked":o=vu;break;case"timeupdate":i>=0&&r-i>.01&&(o=vu)}o!==void 0&&zh(n,o)&&pc(e)}}function S2(e,t,n,r,i){return new ky(e,t,n,i,r)}function T2(e){return new l0(e.i,{Sb:function(){return e.G?e.G.Kd():0},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},Ib:function(){return e.Ib()},video:e.h,Y:e.H,nc:e.N,onError:function(t){return ll(e,t)},onEvent:function(t){return e.dispatchEvent(t)},td:function(t,n,r,i){var o=t.startTime,s=t.endTime,a=n.type;if(a!=Bt){if(e.G){e.G.Ai();var u=op(e.H,a);!e.U()&&e.h.paused&&!e.h.seeking&&u!=null&&u>0&&e.G.Kd()<u&&!Xu(e.G.Kd(),u,.001)&&e.G.Uf(u)}Gs(e)}r=new Map().set("start",o).set("end",s).set("contentType",a).set("isMuxed",r).set("isDependency",i),e.dispatchEvent(Yn("segmentappended",r)),e.o&&n.fastSwitching&&t.Qc&&t.ae&&e.o.trySuggestStreams()},Dk:function(t,n){(n=n.rd)&&e.qe&&NI(e.qe,n,t)},Qh:function(t,n){var r=e.D;if(r.h.parseInbandPsshEnabled&&!r.H&&["audio","video"].includes(t)){t=new Hh(wt(n)),n=0;for(var i=d(t.data),o=i.next();!o.done;o=i.next())n+=o.value.length;if(n==0)r=Promise.resolve();else{for(n=new Uint8Array(n),i=0,t=d(t.data),o=t.next();!o.done;o=t.next())o=o.value,n.set(o,i),i+=o.length;Gl(r,"cenc",n),r=r.m}}else r=Promise.resolve();return r},disableStream:function(t,n){return e.disableStream(t,n)},cl:function(t,n){return!(e.g.abr.enabled&&n.fastSwitching&&t.Qc&&t.ae)}})}f.configure=function(e,t){var n=this.getConfiguration();if(arguments.length==2&&typeof e=="string"&&(e=Wf(e,t)),"preferredVariantRole"in e&&(lt("preferredVariantRole configuration","Please Use preferredAudioRole instead."),e.preferredAudioRole=e.preferredVariantRole,delete e.preferredVariantRole),e.streaming&&"forceTransmuxTS"in e.streaming&&(lt("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(lt("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming){lt("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var r=ct();e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&r.Ia()==="WEBKIT",delete e.streaming.useNativeHlsOnSafari}if(e.streaming&&typeof e.streaming.liveSync=="boolean"&&(lt("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),r=e.streaming.liveSync,e.streaming.liveSync={},e.streaming.liveSync.enabled=r),e.streaming&&!(e.streaming.liveSync&&"targetLatency"in e.streaming.liveSync)&&("liveSyncMinLatency"in e.streaming||"liveSyncMaxLatency"in e.streaming)){r=e.streaming.liveSyncMinLatency||0;var i=Math.abs((e.streaming.liveSyncMaxLatency||1)-r)/2;e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=r+i,e.streaming.liveSync.targetLatencyTolerance=i}if(e.streaming&&"liveSyncMaxLatency"in e.streaming&&(lt("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMaxLatency),e.streaming&&"liveSyncMinLatency"in e.streaming&&(lt("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMinLatency),e.streaming&&"liveSyncTargetLatency"in e.streaming&&(lt("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=e.streaming.liveSyncTargetLatency,delete e.streaming.liveSyncTargetLatency),e.streaming&&"liveSyncTargetLatencyTolerance"in e.streaming&&(lt("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatencyTolerance=e.streaming.liveSyncTargetLatencyTolerance,delete e.streaming.liveSyncTargetLatencyTolerance),e.streaming&&"liveSyncPlaybackRate"in e.streaming&&(lt("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.maxPlaybackRate=e.streaming.liveSyncPlaybackRate,delete e.streaming.liveSyncPlaybackRate),e.streaming&&"liveSyncMinPlaybackRate"in e.streaming&&(lt("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.minPlaybackRate=e.streaming.liveSyncMinPlaybackRate,delete e.streaming.liveSyncMinPlaybackRate),e.streaming&&"liveSyncPanicMode"in e.streaming&&(lt("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicMode=e.streaming.liveSyncPanicMode,delete e.streaming.liveSyncPanicMode),e.streaming&&"liveSyncPanicThreshold"in e.streaming&&(lt("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicThreshold=e.streaming.liveSyncPanicThreshold,delete e.streaming.liveSyncPanicThreshold),e.mediaSource&&"sourceBufferExtraFeatures"in e.mediaSource){lt("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var o=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return o},delete e.mediaSource.sourceBufferExtraFeatures}if(e.manifest&&e.manifest.hls&&"useSafariBehaviorForLive"in e.manifest.hls&&(lt("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete e.manifest.hls.useSafariBehaviorForLive),e.streaming&&"parsePrftBox"in e.streaming&&(lt("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(lt("manifest.dash.enableAudioGroups configuration","Please Use manifest.enableAudioGroups instead."),e.manifest.enableAudioGroups=e.manifest.dash.enableAudioGroups,delete e.manifest.dash.enableAudioGroups),e.streaming&&"dispatchAllEmsgBoxes"in e.streaming&&(lt("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&"autoLowLatencyMode"in e.streaming&&(lt("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),e.streaming.lowLatencyMode=e.streaming.autoLowLatencyMode,delete e.streaming.autoLowLatencyMode),e.manifest&&e.manifest.dash&&"ignoreSupplementalCodecs"in e.manifest.dash&&(lt("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.dash.ignoreSupplementalCodecs,delete e.manifest.dash.ignoreSupplementalCodecs),e.manifest&&e.manifest.hls&&"ignoreSupplementalCodecs"in e.manifest.hls&&(lt("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.hls.ignoreSupplementalCodecs,delete e.manifest.hls.ignoreSupplementalCodecs),e.manifest&&e.manifest.dash&&"updatePeriod"in e.manifest.dash&&(lt("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.dash.updatePeriod,delete e.manifest.dash.updatePeriod),e.manifest&&e.manifest.hls&&"updatePeriod"in e.manifest.hls&&(lt("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.hls.updatePeriod,delete e.manifest.hls.updatePeriod),e.manifest&&e.manifest.dash&&"ignoreDrmInfo"in e.manifest.dash&&(lt("manifest.dash.ignoreDrmInfo configuration","Please Use manifest.ignoreDrmInfo instead."),e.manifest.ignoreDrmInfo=e.manifest.dash.ignoreDrmInfo,delete e.manifest.dash.ignoreDrmInfo),e.drm&&e.drm.advanced){r=!1;for(var s in e.drm.advanced){var a=e.drm.advanced[s];i=a.videoRobustness,a=a.audioRobustness,"videoRobustness"in e.drm.advanced[s]&&!Array.isArray(e.drm.advanced[s].videoRobustness)&&(e.drm.advanced[s].videoRobustness=[i],r=!0),"audioRobustness"in e.drm.advanced[s]&&!Array.isArray(e.drm.advanced[s].audioRobustness)&&(e.drm.advanced[s].audioRobustness=[a],r=!0)}r&&lt("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}return e.streaming&&"forceHTTP"in e.streaming&&(lt("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),e.networking=e.networking||{},e.networking.forceHTTP=e.streaming.forceHTTP,delete e.streaming.forceHTTP),e.streaming&&"forceHTTPS"in e.streaming&&(lt("streaming.forceHTTPS configuration","Please Use networking.forceHTTP instead."),e.networking=e.networking||{},e.networking.forceHTTPS=e.streaming.forceHTTPS,delete e.streaming.forceHTTPS),e.streaming&&"minBytesForProgressEvents"in e.streaming&&(lt("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),e.networking=e.networking||{},e.networking.minBytesForProgressEvents=e.streaming.minBytesForProgressEvents,delete e.streaming.minBytesForProgressEvents),s=pa(this.g,e,bs(this)),l1(this,n),s},f.vj=function(e){this.Xf=e};function l1(e,t){if(e.xe=new $h(e.g,e.ya,e.D),e.I){var n=Ki(e.g.manifest);e.h&&e.h.nodeName==="AUDIO"&&(n.disableVideo=!0),e.I.configure(n)}if(e.D&&e.D.configure(e.g.drm),e.l){e.l.configure(e.g.streaming);try{e.m!=ds&&oy(e.xe,e.i)&&Wi(e)}catch(i){ll(e,i)}e.o&&_a(e),n=e.l.o,!n||n.allowedByApplication&&n.allowedByKeySystem||Ha(e)}if(e.N&&e.N.configure(e.g.networking),e.H&&(e.H.configure(e.g.mediaSource),e.H.Ga=e.g.manifest.segmentRelativeVttTiming),e.u&&ud(e),e.o&&(e.o.configure(e.g.abr),e.g.abr.enabled?e.o.enable():e.o.disable(),A1(e)),e.P&&u1(e),e.Ka&&(e.g.streaming.rebufferingGoal?e.Ka.Ea(.25):e.Ka.stop()),e.i&&ig(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.C&&e.C.configure(e.g.ads),e.K&&e.K.configure(e.g.cmcd),e.ua&&e.ua.configure(e.g.cmsd),e.Ba&&e.Ba.configure(e.g.queue),e.m==pi&&e.J.getConfiguration){n=e.J.getConfiguration();var r=!1;t.preferredVideoHdrLevel!=e.g.preferredVideoHdrLevel&&n.hdrLevel!=e.g.preferredVideoHdrLevel&&(n.hdrLevel=e.g.preferredVideoHdrLevel,r=!0),t.preferredVideoLayout!=e.g.preferredVideoLayout&&n.videoLayout!=e.g.preferredVideoLayout&&(n.videoLayout=e.g.preferredVideoLayout,r=!0),t.preferSpatialAudio!=e.g.preferSpatialAudio&&n.spatialAudio!=e.g.preferSpatialAudio&&(n.spatialAudio=e.g.preferSpatialAudio,r=!0),t.preferredVideoRole!=e.g.preferredVideoRole&&n.videoRole!=e.g.preferredVideoRole&&(n.videoRole=e.g.preferredVideoRole,r=!0),r&&(e.J.configure(n),Ha(e))}}f.getConfiguration=function(){var e=bs(this);return pa(e,this.g,bs(this)),e},f.Fj=function(){return this.Xf},f.ei=function(){var e=bs(this);return pa(e,this.g,bs(this)),m0(this.g,bs(this))},f.ai=function(){if(this.h){var e=this.h.buffered.length;e=e?this.h.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(t=Math.min(this.h.currentTime+t,this.Sa().end),e>=t)return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},f.Ji=function(){var e=this.getConfiguration(),t;for(t in this.g)delete this.g[t];pa(this.g,bs(this),bs(this)),l1(this,e)},f.Ud=function(){return this.m},f.ci=function(){return this.i?this.i.type:null},f.We=function(){return this.h},f.Rb=function(){return this.N},f.jd=function(){return this.X},f.$h=function(){return this.C?this.C:null},f.ii=function(){return this.Ba?this.Ba:null},f.U=function(){return this.i&&!this.xa()?this.i.presentationTimeline.U():this.h&&(this.h.src||this.xa())?this.h.duration==1/0:!1},f.Oc=function(){return this.i?this.i.presentationTimeline.Oc():!1},f.ik=function(){if(this.i&&!this.xa()){var e=this.i.variants;return e.length?!e[0].video:!1}return this.h&&(this.h.src||this.xa())?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1},f.oi=function(){if(this.i&&!this.xa()){var e=this.i.variants;return e.length?(e=e[0],e.audio||!e.video?!1:!e.video.codecs.includes(",")):!1}return this.h&&(this.h.src||this.xa())&&this.h.audioTracks?this.h.audioTracks.length==0:!1},f.Sa=function(){if(this.i&&!this.xa()){if(!this.Ua&&this.i.type=="HLS")return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Tb(),end:e.Cb()}}if(this.h&&(this.h.src||this.xa())&&(e=this.h.seekable)&&e.length){var t=this.g?this.g.playRangeStart:0;t=Math.max(e.start(0),t);var n=this.g?this.g.playRangeEnd:1/0;return e=Math.min(e.end(e.length-1),n),{start:t,end:e}}return{start:0,end:0}},f.fk=function(){this.U()&&(this.h.currentTime=this.Sa().end)},f.jk=function(){return this.Ua},f.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},f.drmInfo=function(){return this.D?this.D.g:null},f.Td=function(){return this.D?this.D.Td():1/0},f.Eg=function(){return this.D?this.D.Eg():[]},f.Ve=function(){return this.D?this.D.Ve():{}},f.Mg=function(){return this.P?this.P.g==mu:!!this.X},f.Ib=function(){return this.h?this.M?this.M.i:1:0},f.Gh=function(e){this.m==pi&&this.l&&c0(this.l,e)},f.pe=function(e,t){t=t===void 0?!0:t,e==0?ut("A trick play rate of 0 is unsupported!"):(this.M.set(e),this.m==pi&&(this.o.playbackRateChanged(e),this.Gh(t&&e!=1)),m1(this,e))},f.Md=function(){var e=this.M.kd();this.m==go&&this.M.set(e),this.m==pi&&(this.M.set(e),this.o.playbackRateChanged(e),this.Gh(!1)),this.Zb.Ra()},f.jc=function(){if(this.i&&!this.xa()){for(var e=this.l?this.l.o:null,t=[],n=0,r=d(this.i.variants),i=r.next();!i.done;i=r.next())if(i=i.value,aa(i)){var o=mt(i);o.active=i==e,o.active||n==1||e==null||i.video!=e.video||i.audio!=e.audio||(o.active=!0),o.active&&n++,t.push(o)}return t}if(this.h&&this.h.audioTracks){var s=S1(this);return e=Array.from(this.h.audioTracks),e.length?e.map(function(a){return _s(a,s)}):s?[_s(null,s)]:[]}return[]},f.Fc=function(){if(this.i){if(this.xa())return[];for(var e=this.l?this.l.B:null,t=[],n=d(this.i.textStreams),r=n.next();!r.done;r=n.next()){r=r.value;var i=ur(r);i.active=r==e,t.push(i)}return t}return this.h&&this.h.src&&this.h.textTracks?ld(this).map(function(o){return pu(o)}):[]},f.Kj=function(){var e=this.De;return this.i&&(e=this.i.imageStreams),e.map(function(t){return si(t)})},f.yj=function(e){var t=this,n,r;return H(function(i){return i.h==1?i.g(f1(t,e),2):(n=i.i,n?(r=[],n.segmentIndex.Bb(function(o){var s=c1(o.tilesLayout||n.tilesLayout);if(s)for(var a=s.rows*s.columns,u=(o.j-o.startTime)/a,l=0;l<a;l++){var h=d1(o,n,o.startTime+l*u,s);if(!h)break;r.push(h)}}),n.closeSegmentIndex&&n.closeSegmentIndex(),i.return(r)):i.return(null))})};function c1(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{columns:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}f.Zj=function(e,t){var n=this,r,i,o,s,a,u;return H(function(l){return l.h==1?l.g(f1(n,e),2):(r=l.i,!r||(r.closeSegmentIndex&&(n.tc.has(r)||(i=new Yt(function(){r.closeSegmentIndex(),n.tc.delete(r)}),n.tc.set(r,i)),o=n.tc.get(r),o.ka(5)),s=r.segmentIndex.find(t),s==null)?l.return(null):(a=r.segmentIndex.get(s),(u=c1(a.tilesLayout||r.tilesLayout))?l.return(d1(a,r,t,u)):l.return(null)))})};function f1(e,t){var n,r;return H(function(i){return i.h==1?e.m!=pi&&e.m!=go||(n=e.De,e.i&&(n=e.i.imageStreams),r=n[0],!r)?i.return(null):(t!=null&&(r=n.find(function(o){return o.id==t})),r?r.segmentIndex?i.A(2):i.g(r.createSegmentIndex(),2):i.return(null)):i.return(r)})}function d1(e,t,n,r){var i=t.width||0,o=t.height||0,s=i/r.columns,a=o/r.rows,u=r.columns*r.rows,l=e.j-e.startTime;l=e.B||l/u;var h=e.startTime,g=0,m=0;return u>1&&(m=Math.floor((n-e.startTime)/l+1e-4),h=e.startTime+m*l,g=m%r.columns*s,m=Math.floor(m/r.columns)*a),h>=e.endTime||Xu(h,e.endTime,1e-4)?null:(r=!1,(n=e.thumbnailSprite)&&(r=!0,a=n.height,g=n.positionX,m=n.positionY,s=n.width),{segment:e,imageHeight:o,imageWidth:i,height:a,positionX:g,positionY:m,startTime:h,duration:l,uris:e.R(),startByte:e.Ec(),endByte:e.Cc(),width:s,sprite:r,mimeType:e.mimeType||t.mimeType,codecs:e.codecs||t.codecs})}f.nh=function(e){function t(){var r=n.i.textStreams.find(function(i){return i.id==e.id});r&&r!=n.l.B&&(Dp(n.B.h,r,!1),jf(n.l,r),ma(n),vc(n),n.Fd=r.language)}var n=this;this.i&&this.G&&(t(),!this.xa())||function(){if(n.h&&n.h.textTracks){var r=ld(n),i=r.find(function(a){return Ti(a)===e.id});if(i){if(n.u instanceof Jr){r=d(r);for(var o=r.next();!o.done;o=r.next()){o=o.value;var s=o===i?n.$?"showing":"hidden":"disabled";o.mode!==s&&(o.mode=s)}}else r=r.find(function(a){return a.mode!=="disabled"}),r!==i&&(r&&(r.mode="disabled",n.j.Na(r,"cuechange"),n.u.remove(0,1/0)),i&&h1(n,i));ma(n),vc(n)}}}()};function h1(e,t){e.j.F(t,"cuechange",function(){e.u.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));var n={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},r=[],i=Array.from(t.activeCues||[]);i=d(i);for(var o=i.next();!o.done;o=i.next()){if(o=o.value,o.endTime===1/0||o.endTime<o.startTime)o=null;else{var s=new It(o.startTime,o.endTime,o.text);s.line=typeof o.line=="number"?o.line:null,o.lineAlign&&(s.lineAlign=o.lineAlign),s.lineInterpretation=o.snapToLines?xn:1,s.position=typeof o.position=="number"?o.position:null,o.positionAlign&&(s.positionAlign=o.positionAlign),s.size=o.size,s.textAlign=o.align,o.vertical==="lr"?s.writingMode="vertical-lr":o.vertical==="rl"&&(s.writingMode="vertical-rl"),o.region&&(s.region.id=o.region.id,s.region.height=o.region.lines,s.region.heightUnits=2,s.region.regionAnchorX=o.region.regionAnchorX,s.region.regionAnchorY=o.region.regionAnchorY,s.region.scroll=o.region.scroll,s.region.viewportAnchorX=o.region.viewportAnchorX,s.region.viewportAnchorY=o.region.viewportAnchorY,s.region.viewportAnchorUnits=Vr,s.region.width=o.region.width,s.region.widthUnits=Vr),$r(s),o=s}o&&((s=e.g.mediaSource.modifyCueCallback)&&s(o,null,n),r.push(o))}e.u.append(r)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}f.Ef=function(e,t,n){function r(){var o=i.i.variants.find(function(a){return a.id==e.id});if(o&&aa(o)){var s=i.l.o;i.g.abr.enabled&&(s.video!=o.video||s.audio&&o.audio&&s.audio.language==o.audio.language&&s.audio.channelsCount==o.audio.channelsCount&&s.audio.label==o.audio.label)&&ut("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),i.xa()?mc(i,o,!1,!1,0):mc(i,o,!1,t||!1,n||0),i.J.configure({language:o.language,role:o.audio&&o.audio.roles&&o.audio.roles[0]||"",videoRole:o.video&&o.video.roles&&o.video.roles[0]||"",channelCount:o.audio&&o.audio.channelsCount?o.audio.channelsCount:0,hdrLevel:o.video&&o.video.hdr?o.video.hdr:"",spatialAudio:o.audio&&o.audio.spatialAudio?o.audio.spatialAudio:!1,videoLayout:o.video&&o.video.videoLayout?o.video.videoLayout:"",audioLabel:o.audio&&o.audio.label?o.audio.label:"",videoLabel:o.video&&o.video.label?o.video.label:"",codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:o.audio&&o.audio.codecs?o.audio.codecs:"",activeAudioCodec:s.audio&&s.audio.codecs?s.audio.codecs:"",activeAudioChannelCount:s.audio&&s.audio.channelsCount?s.audio.channelsCount:0,preferredAudioCodecs:i.g.preferredAudioCodecs,preferredAudioChannelCount:i.g.preferredAudioChannelCount}),_a(i)}}var i=this;t=t===void 0?!1:t,n=n===void 0?0:n,!(this.i&&this.G&&(r(),!this.xa()))&&function(){if(e.originalAudioId&&i.h&&i.h.audioTracks){var o=Array.from(i.h.audioTracks);o=d(o);for(var s=o.next();!s.done;s=o.next())if(s=s.value,Ti(s)==e.id){tg(i,s);break}}}()},f.Uk=function(e,t){function n(){var i=r.J.getConfiguration();i.audioCodec=e.codecs||"",i.audioLabel=e.label||"",i.channelCount=e.channelsCount||0,i.language=e.language,i.role=e.roles[0]||"",i.spatialAudio=e.spatialAudio;var o=r.l.o;(o=o&&o.audio)&&(i.activeAudioCodec=o.codecs||"",i.activeAudioChannelCount=o.channelsCount||0),r.J.configure(i),Ha(r,!0,t,!1,!1)}var r=this;t=t===void 0?0:t,!(this.i&&this.G&&(n(),!this.xa()))&&function(){if(r.h&&r.h.audioTracks){var i=bn(e.language),o=Array.from(r.h.audioTracks),s=null;o=d(o);for(var a=o.next();!a.done;a=o.next()){a=a.value;var u=a.language||"und";if(a.label==e.label&&bn(u)==i&&a.kind==e.roles[0]){s=a;break}}s&&tg(r,s)}}()},f.getAudioTracks=function(){if(this.i&&!this.xa()){var e=this.jc();if(!e.length)return[];var t=e.find(function(o){return o.active});if(!t)return[];var n=e;if(this.m!=pi||this.xa()||(n=e.filter(function(o){return o.originalVideoId===t.originalVideoId&&(o.audioCodec||Ms.includes(o.audioMimeType||""))})),!n.length)return[];e=new Map,n=d(n);for(var r=n.next();!r.done;r=n.next()){var i=r.value;r=[i.language,i.originalLanguage,i.label||"",(i.audioRoles||[]).join(","),i.channelsCount,i.spatialAudio,i.audioCodec||"",i.accessibilityPurpose||""].join("_"),i={active:i.active,language:i.language,label:i.label,mimeType:i.audioMimeType,codecs:i.audioCodec,primary:i.primary,roles:i.audioRoles||[],accessibilityPurpose:i.accessibilityPurpose,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,originalLanguage:i.originalLanguage},e.has(r)?!e.get(r).active&&i.active&&e.set(r,i):e.set(r,i)}return Array.from(e.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(o){var s=o.language;return s={active:o.enabled,language:bn(s||"und"),label:o.label,mimeType:null,codecs:null,primary:o.kind=="main",roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:s},o.kind&&(o.kind=="description"&&(s.accessibilityPurpose="visually impaired"),s.roles.push(o.kind)),o.configuration&&(o.configuration.codec&&(s.codecs=o.configuration.codec),o.configuration.sampleRate&&(s.audioSamplingRate=o.configuration.sampleRate),o.configuration.numberOfChannels&&(s.channelsCount=o.configuration.numberOfChannels)),s}):[]},f.Wk=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?0:n;var r=this.jc();if(r.length){var i=r.find(function(s){return s.active});if(i){r=r.filter(function(s){return(s.videoBandwidth||s.bandwidth)==e.bandwidth&&s.width==e.width&&s.height==e.height&&s.frameRate==e.frameRate&&s.pixelAspectRatio==e.pixelAspectRatio&&s.hdr==e.hdr&&s.colorGamut==e.colorGamut&&s.videoLayout==e.videoLayout&&s.videoMimeType==e.mimeType&&s.videoCodec==e.codecs&&Ye(s.videoRoles,e.roles)&&s.videoLabel==e.label});var o;r.length==1?o=r[0]:o=r.find(function(s){return s.audioId===i.audioId}),o||(o=r.find(function(s){return s.language==i.language&&s.label===i.label&&s.channelsCount===i.channelsCount&&s.spatialAudio===i.spatialAudio&&s.audioMimeType===i.audioMimeType&&ii(s.audioCodec||"")===ii(i.audioCodec||"")&&Ye(s.audioRoles,i.audioRoles)})),o&&!o.active&&this.Ef(o,t,n)}}},f.getVideoTracks=function(){if(this.m==go||this.xa())return[];var e=this.jc();if(!e.length)return[];var t=e.find(function(o){return o.active});if(!t)return[];var n=e;if(this.oi()||(n=e.filter(function(o){return o.videoCodec&&o.audioGroupId===t.audioGroupId&&o.originalAudioId===t.originalAudioId?o.audioId===t.audioId?!0:o.language===t.language&&o.label===t.label&&o.channelsCount===t.channelsCount&&o.spatialAudio===t.spatialAudio&&o.audioMimeType===t.audioMimeType&&ii(o.audioCodec||"")===ii(t.audioCodec||"")&&Ye(o.audioRoles,t.audioRoles):!1})),!n.length)return[];e=new Map,n=d(n);for(var r=n.next();!r.done;r=n.next()){r=r.value;var i=r.originalVideoId;i||r.videoId==null||(i=String(r.videoId)),i&&e.set(i,{active:r.active,bandwidth:r.videoBandwidth||r.bandwidth,width:r.width,height:r.height,frameRate:r.frameRate,pixelAspectRatio:r.pixelAspectRatio,hdr:r.hdr,colorGamut:r.colorGamut,videoLayout:r.videoLayout,mimeType:r.videoMimeType,codecs:r.videoCodec,roles:r.videoRoles||[],label:r.videoLabel})}return Array.from(e.values())},f.Aj=function(){return M1(this.jc())},f.Xj=function(){return M1(this.Fc())},f.zj=function(){return Array.from(C1(this.jc()))},f.Wj=function(){return Array.from(C1(this.Fc()))},f.Oi=function(e,t,n,r,i,o,s){function a(){function l(A,k){return A.video||k.video?A.video&&k.video?Math.abs((A.video.height||0)-(k.video.height||0))+Math.abs((A.video.width||0)-(k.video.width||0)):1/0:0}var h=u.l.o;u.J=u.g.adaptationSetCriteriaFactory(),u.J.configure({language:e,role:t||"",videoRole:h.video&&h.video.roles&&h.video.roles[0]||"",channelCount:n||0,hdrLevel:"",spatialAudio:o||!1,videoLayout:"",audioLabel:s||"",videoLabel:"",codecSwitchingStrategy:u.g.mediaSource.codecSwitchingStrategy,audioCodec:i||"",activeAudioCodec:h.audio&&h.audio.codecs?h.audio.codecs:"",activeAudioChannelCount:h.audio&&h.audio.channelsCount?h.audio.channelsCount:0,preferredAudioCodecs:u.g.preferredAudioCodecs,preferredAudioChannelCount:u.g.preferredAudioChannelCount});var g=u.J.create(u.i.variants),m=null;g=d(g.values());for(var E=g.next();!E.done;E=g.next())E=E.value,aa(E)&&(!m||l(m,h)>l(E,h))&&(m=E);m!=h&&(m?(h=mt(m),u.Ef(h,!0,r||0)):Ha(u))}var u=this;n=n===void 0?0:n,r=r===void 0?0:r,i=i===void 0?"":i,o=o===void 0?!1:o,s=s===void 0?"":s,!(this.i&&this.G&&(a(),!this.xa()))&&function(){if(u.h&&u.h.audioTracks){var l=_e(u.jc(),e,t||"",!1)[0];l&&u.Ef(l)}}()},f.mh=function(e,t,n){function r(){i.Fd=e,i.Jd=t||"",i.Id=n||!1;var o=_e(i.i.textStreams,i.Fd,i.Jd,i.Id)[0]||null;o&&o!=i.l.B&&(Dp(i.B.h,o,!1),i.g.streaming.alwaysStreamText||i.Pg())&&(jf(i.l,o),ma(i),vc(i))}var i=this;n=n===void 0?!1:n,!(this.i&&this.G&&(r(),!this.xa()))&&function(){var o=_e(i.Fc(),e,t||"",n||!1)[0];o&&i.nh(o)}()},f.Vk=function(e,t,n){function r(){for(var o=null,s=d(i.i.variants),a=s.next();!a.done;a=s.next())if(a=a.value,a.audio.label==e){o=a;break}o!=null&&(i.J=i.g.adaptationSetCriteriaFactory(),i.J.configure({language:o.language,role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",videoLabel:"",audioLabel:e,codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:i.g.preferredAudioCodecs,preferredAudioChannelCount:i.g.preferredAudioChannelCount}),Ha(i,t,n))}var i=this;t=t===void 0?!0:t,n=n===void 0?0:n,!(this.i&&this.G&&(r(),!this.xa()))&&function(){if(i.h&&i.h.audioTracks){var o=Array.from(i.h.audioTracks),s=null;o=d(o);for(var a=o.next();!a.done;a=o.next())a=a.value,a.label==e&&(s=a);s&&tg(i,s)}}()},f.Pg=function(){var e=this.$;return this.u?this.u.isTextVisible():e},f.Ej=function(){return this.ib.map(function(e){return ur(e)})},f.Cj=function(e){if(lt("getChapters","Please use an getChaptersAsync."),!this.ib.length)return[];var t=bn(e);if(e=this.ib.filter(function(o){return bn(o.language)==t}),!e.length)return[];var n=[],r=new Set;e=d(e);for(var i=e.next();!i.done;i=e.next())i=i.value,i.segmentIndex&&i.segmentIndex.Bb(function(o){var s=o.R()[0],a=o.startTime+"-"+o.endTime+"-"+s;o={id:a,title:s,startTime:o.startTime,endTime:o.endTime},r.has(a)||(n.push(o),r.add(a))});return n},f.Dj=function(e){var t=this,n,r,i,o,s,a,u;return H(function(l){switch(l.h){case 1:if(!t.ib.length)return l.return([]);if(n=bn(e),r=t.ib.filter(function(h){return bn(h.language)==n}),!r.length)return l.return([]);i=[],o=new Set,s=d(r),a=s.next();case 2:if(a.done){l.A(4);break}if(u=a.value,u.segmentIndex){l.A(5);break}return l.g(u.createSegmentIndex(),5);case 5:u.segmentIndex.Bb(function(h){var g=h.R()[0],m=h.startTime+"-"+h.endTime+"-"+g;h={id:m,title:g,startTime:h.startTime,endTime:h.endTime},o.has(m)||(i.push(h),o.add(m))}),a=s.next(),l.A(2);break;case 4:return l.return(i)}})};function ld(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind!="metadata"&&t.kind!="chapters"&&t.label!="Shaka Player TextTrack"})}function E2(e){return Array.from(e.h.textTracks).find(function(t){return t.label=="Shaka Player TextTrack"})}function x2(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind=="metadata"})}f.rh=function(e){e=!!e,this.$!=e&&(this.$=e,this.m==pi?(this.u.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.l.B||(e=_e(this.i.textStreams,this.Fd,this.Jd,this.Id),e.length>0&&(jf(this.l,e[0]),ma(this),vc(this))):zI(this.l))):this.h&&this.h.src&&this.h.textTracks&&this.u.setTextVisibility(e),w1(this))},f.Qj=function(){if(this.G)var e=this.G.Kd();else{if(this.O==null)return new Date;if(this.O instanceof Date)return this.O;e=this.O}if(this.i&&!this.xa()){var t=this.i.presentationTimeline;return new Date(((t.m||t.i)+e)*1e3)}return this.h&&this.h.getStartDate?(t=this.h.getStartDate(),t instanceof Date&&!isNaN(t.getTime())?new Date(t.getTime()+e*1e3):null):null},f.gi=function(){if(this.i&&!this.xa()){var e=this.i.presentationTimeline;return e=e.m||e.i,e===null?null:new Date(e*1e3)}return this.h&&this.h.getStartDate?(e=this.h.getStartDate(),e instanceof Date&&!isNaN(e.getTime())?e:null):null},f.Xe=function(){return this.U()&&this.i?this.i.presentationTimeline.Xe():null},f.Bc=function(){if(this.m==pi)return this.H.Bc();var e={total:[],audio:[],video:[],text:[]};return this.m==go&&(e.total=da(this.h.buffered)),e};function p1(e){if(!e.h||!e.h.currentTime)return null;var t=e.gi();return t?Math.floor(Date.now()-(t.getTime()+e.h.currentTime*1e3)):null}f.getBandwidthEstimate=function(){return this.o?this.o.getBandwidthEstimate():NaN},f.getStats=function(){if(this.m!=pi&&this.m!=go)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};eg(this);var e=this.h,t=e.currentTime/e.duration;if(isNaN(t)||this.U()||SC(this.B,Math.round(100*t)),this.G&&(this.B.T=this.G.Hh(),this.B.V=this.G.Jh()),e.getVideoPlaybackQuality&&(t=e.getVideoPlaybackQuality(),yC(this.B,Number(t.droppedVideoFrames),Number(t.totalVideoFrames)),this.B.N=Number(t.corruptedVideoFrames)),TC(this.B,this.D?IA(this.D):NaN),T0(this.B,e.videoWidth||NaN,e.videoHeight||NaN),this.B.l="",this.U()&&(e=p1(this),e!=null&&EC(this.B,e/1e3)),t=this.jc().find(function(i){return i.active}),e=this.Fc().find(function(i){return i.active}),t){if(t.bandwidth){var n=this.M?this.M.i:1,r=n*t.bandwidth;e&&e.bandwidth&&(r+=n*e.bandwidth),this.B.B=r}t.width&&t.height&&T0(this.B,t.width||NaN,t.height||NaN),t=t.codecs,e&&(t+=","+(e.codecs||e.mimeType)),t&&(this.B.l=t)}return this.m!=pi||this.xa()||(this.i&&(this.B.I=this.i.periodCount,this.B.H=this.i.gapCount,this.i.presentationTimeline&&xC(this.B,this.i.presentationTimeline.h)),e=this.o.getBandwidthEstimate(),this.B.u=e),this.m==go&&E0(this.B,NaN),wC(this.B)},f.Ld=function(e,t,n,r,i,o,s){s=s===void 0?!1:s;var a=this,u,l,h,g,m,E,A,k,b,V,B,Z;return H(function(ue){switch(ue.h){case 1:if(a.m!=pi&&a.m!=go)throw new fe(1,7,7004);if(n!="subtitles"&&n!="captions"&&ut("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),r){ue.A(2);break}return ue.g(cd(a,e),3);case 3:r=ue.i;case 2:if(u=[],a.C&&(u=a.C.getCuePoints()),a.m!=go){ue.A(4);break}return l=ct(),s&&l.Ia()==="WEBKIT"&&(n="forced"),ue.g(w2(a,e,t,n,r,o||"",u),5);case 5:if(h=ue.i,h.track)return Wi(a),ma(a),ue.return(pu(h.track));throw new fe(1,2,2012);case 4:if(g=mr,m=a.Sa(),E=m.end-m.start,a.i&&(E=a.i.presentationTimeline.getDuration()),E==1/0)throw new fe(1,4,4033);if(!u.length){ue.A(6);break}return ue.g(fd(a,e),7);case 7:A=ue.i,k=g1(a,A,r,u),b=new Blob([k],{type:"text/vtt"}),e=up(b),r="text/vtt";case 6:if(V={id:a.ye++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:bf(0,E,[e]),mimeType:r||"",codecs:i||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:o||null,type:g.Oa,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!s,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ar(r||"",i||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},B=ar(V.mimeType,V.codecs),Z=cu(B),!Z)throw new fe(2,2,2014,r);return a.i.textStreams.push(V),Wi(a),ma(a),ue.return(ur(V))}})},f.Ie=function(e,t){var n=this,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue;return H(function(pe){switch(pe.h){case 1:if(n.m!=pi&&n.m!=go)throw new fe(1,7,7004);if(t){pe.A(2);break}return pe.g(cd(n,e),3);case 3:t=pe.i;case 2:if(t!="text/vtt")throw new fe(1,2,2017,e);if(r=mr,i=n.Sa(),o=i.end-i.start,n.i&&(o=n.i.presentationTimeline.getDuration()),o==1/0)throw new fe(1,4,4045);return pe.g(fd(n,e),4);case 4:if(s=pe.i,a=lu(t),!a)throw new fe(2,2,2014,t);for(u=a(),l={periodStart:0,segmentStart:0,segmentEnd:o,vttOffset:0},h=wt(s),g=u.parseMedia(h,l,e,[]),m=[],E=d(g),A=E.next(),k={};!A.done;k={Rf:void 0,ed:void 0},A=E.next())k.ed=A.value,k.Rf=null,b=function(te){return function(){return te.Rf==null&&(te.Rf=Rr([e],[te.ed.payload])),te.Rf||[]}}(k),V=new Rt(k.ed.startTime,k.ed.endTime,b,0,null,null,0,0,1/0),k.ed.payload.includes("#xywh")&&(B=k.ed.payload.split("#xywh=")[1].split(","),B.length===4&&V.Hf({height:parseInt(B[3],10),positionX:parseInt(B[0],10),positionY:parseInt(B[1],10),width:parseInt(B[2],10)})),m.push(V);if(Z=t,!m.length){pe.A(5);break}return pe.g(cd(n,m[0].R()[0]),6);case 6:Z=pe.i;case 5:return ue={id:n.ye++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new wn(m),mimeType:Z||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:r.Tf,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ar(Z||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},n.m==go?n.De.push(ue):n.i.imageStreams.push(ue),Wi(n),pe.return(si(ue))}})},f.He=function(e,t,n){var r=this,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B;return H(function(Z){switch(Z.h){case 1:if(r.m!=pi&&r.m!=go)throw new fe(1,7,7004);if(n){Z.A(2);break}return Z.g(cd(r,e),3);case 3:n=Z.i;case 2:if(i=mr,o=r.Sa(),s=o.end-o.start,r.i&&(s=r.i.presentationTimeline.getDuration()),s==1/0)throw new fe(1,4,4055);if(a=lu(n),!a)throw new fe(2,2,2014,n);return Z.g(fd(r,e),4);case 4:for(u=Z.i,l=a(),h={periodStart:0,segmentStart:0,segmentEnd:s,vttOffset:0},g=wt(u),m=l.parseMedia(g,h,e,[]),E=[],A=d(m),k=A.next(),b={};!k.done;b={Qe:void 0},k=A.next())b.Qe=k.value,V=new Rt(b.Qe.startTime,b.Qe.endTime,function(ue){return function(){return[ue.Qe.payload]}}(b),0,null,null,0,0,1/0),E.push(V);return B={id:r.ye++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new wn(E),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:null,type:i.Oa,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ar("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},r.ib.push(B),Wi(r),Z.return(ur(B))}})};function cd(e,t){var n;return H(function(r){switch(r.h){case 1:return r.m(2),r.g(tl(t,e.N,e.g.streaming.retryParameters),4);case 4:n=r.i,r.o(3);break;case 2:r.l();case 3:if(n)return r.return(n);throw new fe(1,2,2011,t)}})}function w2(e,t,n,r,i,o,s){var a,u,l,h;return H(function(g){if(g.h==1)return i!="text/vtt"||s.length?g.g(fd(e,t),3):g.A(2);g.h!=2&&(a=g.i,u=g1(e,a,i,s),l=new Blob([u],{type:"text/vtt"}),t=up(l),i="text/vtt"),h=document.createElement("track");e:{var m=e.K,E=t;try{if(!m.g.enabled){var A=E;break e}var k=Hp(m);k.ot=zp,k.su=!0;var b=hc(k);A=Zf(E,b);break e}catch(V){In("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",V),A=E;break e}A=void 0}return h.src=A,h.label=o,h.kind=r,h.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(h),e.Wf.push(h),g.return(h)})}function fd(e,t){var n,r,i,o;return H(function(s){if(s.h==1){n=Go,r=e.g.streaming.retryParameters,i=jr([t],r),i.method="GET";var a=e.K;try{a.g.enabled&&al(a,i,{ot:zp,su:!0})}catch(u){In("CMCD_TEXT_ERROR","Could not generate text CMCD data.",u)}return s.g(e.N.request(n,i).promise,2)}return o=s.i,s.return(o.data)})}function g1(e,t,n,r){var i=lu(n);if(i)return n=i(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=wt(t),t=n.parseMedia(t,e,null,[]),BC(t,r);throw new fe(2,2,2014,n)}f.al=function(e,t){this.ya.width=e,this.ya.height=t},f.ih=function(e){if(this.m==pi){var t=this.l;if(e=e===void 0?.1:e,t.l.g)t=!1;else if(t.D)t=!1;else{for(var n=d(t.h.values()),r=n.next();!r.done;r=n.next())r=r.value,!r.od||r.Ja||r.kb||(r.od=!1,Ei(t,r,e));t=!0}}else t=!1;return t},f.Fg=function(){return ut("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for."),this.i},f.Nj=function(){return this.uc},f.Ij=function(){var e={video:null,audio:null,text:null};if(this.m!=pi)return e;var t=this.l.o,n=this.h.currentTime;t=d([t.video,t.audio,this.l.B]);for(var r=t.next();!r.done;r=t.next())if((r=r.value)&&r.segmentIndex){var i=r.segmentIndex.find(n);i=r.segmentIndex.get(i),i={codecs:i.codecs||r.codecs,mimeType:i.mimeType||r.mimeType,bandwidth:i.bandwidth||r.bandwidth},r.type=="video"?(i.width=r.width,i.height=r.height,e.video=i):r.type=="audio"?e.audio=i:r.type==Bt&&(e.text=i)}return e};function bs(e){var t=ol();return t.streaming.failureCallback=function(n){if(e.U()){var r=null;n.code==1001||n.code==1002?(r=1,e.g.streaming.lowLatencyMode&&(r=.1)):n.code==1003&&(r=.1),r!=null&&(n.severity=1,e.ih(r))}},t.textDisplayFactory=function(){if(e.ue){var n=e.h;n=!(n.webkitDisplayingFullscreen||n.webkitPresentationMode&&n.webkitPresentationMode!="inline")}else n=!1;return n?new Ai(e.h,e.ue):"track"in document.createElement("track")?new Jr(e):new wi},t}f.Vi=function(e){this.ue=e};function A2(e,t){for(var n=new Set,r=d(t.textStreams),i=r.next();!i.done;i=r.next())i=i.value,i.mimeType!="application/cea-608"&&i.mimeType!="application/cea-708"||n.add(i.originalId);for(r=d(t.variants),i=r.next();!i.done;i=r.next())if((i=i.value.video)&&i.closedCaptions){for(var o=d(i.closedCaptions.keys()),s=o.next();!s.done;s=o.next())if(s=s.value,!n.has(s)){var a=s.startsWith("CC")?"application/cea-608":"application/cea-708",u=new Er,l=i.closedCaptions.get(s);a={id:e.ye++,originalId:s,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:a,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Bt,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:i.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([ar(a,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},t.textStreams.push(a),n.add(s)}}}function I2(e,t){var n,r,i,o,s;return H(function(a){return a.h==1?(n=e.audio,r=e.video,i=function(u,l){var h,g,m;return H(function(E){return E.h==1?u?u.segmentIndex?E.A(2):E.g(u.createSegmentIndex(),2):E.return(null):(g=(h=u.segmentIndex.Qb(l))?h.next().value:null,g?(m=g.startTime,E.return(m)):E.return(null))})},a.g(i(n,t),2)):a.h!=3?(o=a.i,a.g(i(r,t),3)):(s=a.i,s!=null&&o!=null?a.return(Math.max(s,o)):s!=null?a.return(s):o!=null?a.return(o):a.return(t))})}function pc(e){var t=e.Mg();if(e.B&&e.P&&e.G){if(e.g.streaming.rebufferingGoal==0){var n=e.M;n.j=!1,hp(n)}else n=e.M,n.j=t,hp(n);if(e.K&&(n=e.K,t||n.D||(n.D=!0),n.D&&t&&(n.I=!0,Ii(n,"ps",{Vc:"r"})),n.J=t),eg(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Ge<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var r=e.g.streaming.liveSync.targetLatencyTolerance,i=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.V&&(e.V=Math.min(e.V+ ++e.Ge*i,n-r))}}t=new Map().set("buffering",t),e.dispatchEvent(Yn("buffering",t))}function m1(e,t){e.Zb.Ra(),e.Zb.F(e.h,"timeupdate",function(){var n=e.h.currentTime,r=e.Sa(),i=e.U(),o=i?e.g.streaming.safeSeekOffset:0;t>0?i&&t>1&&Math.floor(n)>=Math.floor(r.end)&&e.Md():Math.floor(n)<=Math.floor(r.start+o)&&e.Md()})}function eg(e){if(e.B&&e.P){var t=e.B.g,n="playing";e.P.g==mu?n="buffering":e.Zd()?n="ended":e.h.paused&&(n="paused");var r=n;if(t.g==null)t.g={timestamp:Date.now()/1e3,state:r,duration:0},t=!0;else{var i=Date.now()/1e3;t.g.duration=i-t.g.timestamp,t.g.state==r?t=!1:(t.h.push(t.g),t.g={timestamp:i,state:r,duration:0},t=!0)}t&&(n=new Map().set("newstate",n),e.dispatchEvent(Yn("statechanged",n)))}}function v1(e){var t=e.h.playbackRate,n=e.U();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var r=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,i=e.ai();i<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=r&&e.pe(r,!1):i==1&&t!==e.M.kd()&&e.Md()}if(n&&(n=e.Sa(),Number.isFinite(n.end)&&!(e.h.currentTime<n.start||e.h.paused))){r=e.g.streaming.liveSync.targetLatencyTolerance,i=e.g.streaming.liveSync.dynamicTargetLatency.enabled;var o=e.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled)var s=e.g.streaming.liveSync.targetLatency,a=s+r,u=Math.max(0,s-r),l=e.g.streaming.liveSync.maxPlaybackRate,h=e.g.streaming.liveSync.minPlaybackRate;else e.i&&e.i.serviceDescription&&(s=e.i.serviceDescription.targetLatency,e.i.serviceDescription.targetLatency!=null?a=e.i.serviceDescription.targetLatency+r:e.i.serviceDescription.maxLatency!=null&&(a=e.i.serviceDescription.maxLatency),e.i.serviceDescription.targetLatency!=null?u=Math.max(0,e.i.serviceDescription.targetLatency-r):e.i.serviceDescription.minLatency!=null&&(u=e.i.serviceDescription.minLatency),l=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,h=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.V||typeof s!="number"||(e.V=s);var g=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;i&&e.Yb&&e.V!==null&&typeof s=="number"&&e.Ge<g&&Date.now()-e.Yb>o*1e3&&(o=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.V=Math.max(e.V-(s-o)/2,o+r),e.Yb=Date.now()),i&&e.V!==null&&(a=e.V+r,u=e.V-r),s=n.end-e.h.currentTime,r=0,e.m==go&&(i=e.h.buffered,i.length>0&&(r=i.end(i.length-1),r=Math.max(l,r-n.end))),n=e.g.streaming.liveSync.panicMode,i=e.g.streaming.liveSync.panicThreshold*1e3,o=Date.now()-e.P.i,n&&!h&&(h=e.g.streaming.liveSync.minPlaybackRate),n&&h&&o<=i?t!=h&&e.pe(h,!1):a!=null&&l&&s-r>a?(t!=l&&e.pe(l,!1),e.Yb=null):u!=null&&h&&s-r<u?(t!=h&&e.pe(h,!1),e.Yb=null):t!==e.M.kd()&&(e.Md(),e.Yb=Date.now())}}function gc(e,t,n){return(Xu(t,n,.01)||n>t)&&e.Vf<t?(e.Vf=t,!0):!1}function dd(e){if(e.h){var t=e.Sa();if(t=t.end-t.start,t=t>0?e.h.currentTime/t:0,!isNaN(t)){if(t*=100,gc(e,0,t))var n=Yn("started");else gc(e,25,t)?n=Yn("firstquartile"):gc(e,50,t)?n=Yn("midpoint"):gc(e,75,t)?n=Yn("thirdquartile"):((gc(e,100,t)||t>100)&&(n=Yn("complete")),e.g&&e.g.playRangeEnd!=1/0&&e.Zd()&&e.h.pause());n&&e.dispatchEvent(n)}}}function _a(e){try{ay(e.xe,e.i)}catch(n){return ll(e,n),!1}var t=Uu(e.i.variants);return t=e.J.create(t),e=e.o.setVariants(Array.from(t.values())),typeof e=="boolean"?e:!0}function y1(e,t){if(t=t===void 0?!1:t,_a(e)){if(!e.g.abr.enabled){var n=e.J;if(typeof n.getLastAdaptationSet!="function"&&(lt("AdaptationSetCriteria w/o getLastAdaptationSet","Please use an AdaptationSetCriteria with getLastAdaptationSet."),n.getLastAdaptationSet=function(){return null}),(n=n.getLastAdaptationSet())&&(n=Array.from(n.values()),n.length)){var r=e.l.o;if(r&&r.video&&(n=n.find(function(i){return i.video==r.video})))return n}}return e.o.chooseVariant(t)}return null}function Ha(e,t,n,r,i){t=t===void 0?!0:t,n=n===void 0?0:n,r=r===void 0?!1:r,i=i===void 0?!0:i;var o=y1(e);o&&mc(e,o,i,t,n,r)}function mc(e,t,n,r,i,o){o=o===void 0?!1:o;var s=e.l.o;if(t==s)r&&f0(e.l,t,r,i,!0);else{var a=e.B.h;if(a.h!=t&&(a.h=t,a.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),f0(e.l,t,r,i,o,n),r=null,s&&(r=mt(s)),s=mt(t),s.active=!0,e.T&&(i=e.T,t=t.video)){switch(t.dependencyStream&&(t=t.dependencyStream),o=0,a=-1,t.mimeType){case"video/webm":o=1;break;case"video/mp4":o=2}switch(e.ci()){case"DASH":a=1;break;case"HLS":a=0}i.g&&(i.g.setLevelSwitching(t.id,!0),i.g.setContainerFormat(o),i.j||i.g.setStreamingFormat(a))}n?(n=new Map().set("oldTrack",r).set("newTrack",s),n=Yn("adaptation",n),Au(e,n)):T1(e,r,s),E1(e,r,s)}}function tg(e,t){var n=Array.from(e.h.audioTracks).find(function(i){return i.enabled});if(t.enabled=!0,n){t.id!==n.id&&(n.enabled=!1);var r=S1(e);n=_s(n,r),t=_s(t,r),T1(e,n,t),E1(e,n,t)}}function S1(e){return e.h&&e.h.videoTracks?Array.from(e.h.videoTracks).find(function(t){return t.selected}):null}function Wi(e){var t=Yn("trackschanged");Au(e,t),x1(e)}function T1(e,t,n){t=new Map().set("oldTrack",t).set("newTrack",n),t=Yn("variantchanged",t),Au(e,t)}function E1(e,t,n){var r=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(r=!0),r&&x1(e)}function x1(e){var t=Yn("audiotrackschanged");Au(e,t)}function ma(e){var t=Yn("textchanged");Au(e,t)}function w1(e){var t=Yn("texttrackvisibility");Au(e,t)}function A1(e){e.g.abr.enabled||ng(e);var t=new Map().set("newStatus",e.g.abr.enabled);Au(e,Yn("abrstatuschanged",t))}function vc(e){var t=e.Fc().find(function(n){return n.active});t&&e.u&&e.u.setTextLanguage&&e.u.setTextLanguage(t.language)}function ng(e,t){if(t=t===void 0?!0:t,e.m==pi){e.Ae.stop();for(var n=d(e.i.variants),r=n.next();!r.done;r=n.next())r.value.disabledUntilTime=0;t&&_a(e)}}f.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===ds||!navigator.onLine||t==0||!this.i)return!1;if(this.i.variants.some(function(a){var u=a[e.type];return u&&u.id!==e.id&&!a.disabledUntilTime?e.type=="audio"?e.language===u.language:!0:!1})){for(var n=!1,r=!1,i=d(this.i.variants),o=i.next();!o.done;o=i.next()){o=o.value;var s=o[e.type];s&&(s.id===e.id?(o.disabledUntilTime=Date.now()/1e3+t,n=!0):s.trickModeVideo&&s.trickModeVideo.id==e.id&&(r=!0))}return!n&&r?!1:(this.Ae.Ea(1),t=this.Bc().video.reduce(function(a,u){return a+u.end-u.start},0),Ha(this,!1,t,!0,!1),!0)}return!1};function ll(e,t){var n,r,i,o,s;return H(function(a){switch(a.h){case 1:if(e.m==ds)return a.return();if(t.severity===1&&e.B.M++,n=!0,!(e.Ua&&e.i&&e.l)||t.code!=3016&&t.code!=3014&&t.code!=3015&&t.code!=3024&&t.code!=3018){a.A(2);break}return r=ct(),r.Ia()==="WEBKIT"&&t.code==3016?a.return():(a.m(3),a.g(Hf(e.l),5));case 5:i=a.i,n=!i,i&&(o=Yn("mediasourcerecovered"),e.dispatchEvent(o)),a.o(2);break;case 3:a.l(),n=!0;case 2:if(!n)return a.return();t.severity===2&&ng(e,!1),s=Yn("error",new Map().set("detail",t)),e.dispatchEvent(s),s.defaultPrevented&&(t.handled=!0),a.j()}})}f.addFont=function(e,t){return sI(e,t)};function yc(e,t,n,r){r=r===void 0?e:r,e=new Map().set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,timescale:n.timescale,eventElement:n.eventElement,eventNode:n.eventNode}),r.dispatchEvent(Yn(t,e))}function I1(e,t,n,r){r=r===void 0?!1:r,t=new Map().set("mediaQuality",{bandwidth:t.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate,height:t.height,mimeType:t.mimeType,channelsCount:t.channelsCount,pixelAspectRatio:t.pixelAspectRatio,width:t.width,label:t.label,roles:t.roles,language:t.language}).set("position",n),e.dispatchEvent(Yn(r?"audiotrackchanged":"mediaqualitychanged",t))}function rg(e,t){if(t=t===void 0?!0:t,!e.h.error)return t?new fe(2,3,3016):null;var n=e.h.error.code;return!t&&n==1?null:((t=e.h.error.msExtendedCode)&&(t<0&&(t+=4294967296),t=t.toString(16)),new fe(2,3,3016,n,t,e.h.error.message))}function C2(e,t){var n=Yn("keystatuschanged");e.dispatchEvent(n);var r=Object.keys(t);r.length==1&&r[0]==""&&(r=["00"],t={"00":t[""]});var i=r.length==1&&r[0]=="00";if(n=!1,r.length){r=e.keySystem();for(var o=Hu(e.g.drm.clearKeys),s=function(A,k){A.allowedByKeySystem=!0,k=d(k);for(var b=k.next();!b.done;b=k.next())b=b.value,((b=t[i?"00":b])||e.D.H)&&(A.allowedByKeySystem=A.allowedByKeySystem&&!!b&&!uy.includes(b))},a=d(e.i.variants),u=a.next();!u.done;u=a.next()){u=u.value;var l=gt(u);l=d(l);for(var h=l.next();!h.done;h=l.next()){h=h.value;var g=u.allowedByKeySystem;if(h.keyIds.size)if(h.drmInfos.length&&!o.size&&e.i.type=="HLS")for(var m=d(h.drmInfos),E=m.next();!E.done;E=m.next())E=E.value,E.keySystem==r&&(E.keyIds.size?s(u,E.keyIds):s(u,h.keyIds));else s(u,h.keyIds);g!=u.allowedByKeySystem&&(n=!0)}}}n&&(Wi(e),(n=e.l.o)&&!n.allowedByKeySystem?Ha(e):_a(e))}function ig(e,t,n){t>0&&(e.U()||e.Ui(t)),t=e.getDuration(),n<t&&(e.U()||e.ub(n))}function Au(e,t){H(function(n){if(n.h==1)return n.g(Promise.resolve(),2);e.m!=ds&&e.dispatchEvent(t),n.j()})}function C1(e){var t=new Set;e=d(e);for(var n=e.next();!n.done;n=e.next())n=n.value,n.language?t.add(bn(n.language)):t.add("und");return t}function M1(e){for(var t=new Map,n=new Map,r=0;r<e.length;r++){var i=e[r],o="und",s=[];i.language&&(o=bn(i.language)),i.type=="variant"?s=i.audioRoles:s=i.roles,s&&s.length||(s=[""]),t.has(o)||t.set(o,new Set),s=d(s);for(var a=s.next();!a.done;a=s.next())a=a.value,t.get(o).add(a),i.label&&(n.has(o)||n.set(o,new Map),n.get(o).set(a,i.label))}var u=[];return t.forEach(function(l,h){l=d(l);for(var g=l.next();!g.done;g=l.next()){g=g.value;var m=null;n.has(h)&&n.get(h).has(g)&&(m=n.get(h).get(g)),u.push({language:h,role:g,label:m})}}),u}f.xa=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1},f.Zd=function(){return!this.h||this.h.ended?!0:this.Ua&&!this.U()&&this.h.currentTime>=this.Sa().end},Re("shaka.Player",De),De.prototype.isEnded=De.prototype.Zd,De.prototype.isRemotePlayback=De.prototype.xa,De.prototype.addFont=De.prototype.addFont,De.prototype.setVideoContainer=De.prototype.Vi,De.prototype.getFetchedPlaybackInfo=De.prototype.Ij,De.prototype.getManifestParserFactory=De.prototype.Nj,De.prototype.getManifest=De.prototype.Fg,De.prototype.retryStreaming=De.prototype.ih,De.prototype.setMaxHardwareResolution=De.prototype.al,De.prototype.addChaptersTrack=De.prototype.He,De.prototype.addThumbnailsTrack=De.prototype.Ie,De.prototype.addTextTrackAsync=De.prototype.Ld,De.prototype.getStats=De.prototype.getStats,De.prototype.getBufferedInfo=De.prototype.Bc,De.prototype.getSegmentAvailabilityDuration=De.prototype.Xe,De.prototype.getPresentationStartTimeAsDate=De.prototype.gi,De.prototype.getPlayheadTimeAsDate=De.prototype.Qj,De.prototype.setTextTrackVisibility=De.prototype.rh,De.prototype.getChaptersAsync=De.prototype.Dj,De.prototype.getChapters=De.prototype.Cj,De.prototype.getChaptersTracks=De.prototype.Ej,De.prototype.isTextTrackVisible=De.prototype.Pg,De.prototype.selectVariantsByLabel=De.prototype.Vk,De.prototype.selectTextLanguage=De.prototype.mh,De.prototype.selectAudioLanguage=De.prototype.Oi,De.prototype.getTextLanguages=De.prototype.Wj,De.prototype.getAudioLanguages=De.prototype.zj,De.prototype.getTextLanguagesAndRoles=De.prototype.Xj,De.prototype.getAudioLanguagesAndRoles=De.prototype.Aj,De.prototype.getVideoTracks=De.prototype.getVideoTracks,De.prototype.selectVideoTrack=De.prototype.Wk,De.prototype.getAudioTracks=De.prototype.getAudioTracks,De.prototype.selectAudioTrack=De.prototype.Uk,De.prototype.selectVariantTrack=De.prototype.Ef,De.prototype.selectTextTrack=De.prototype.nh,De.prototype.getThumbnails=De.prototype.Zj,De.prototype.getAllThumbnails=De.prototype.yj,De.prototype.getImageTracks=De.prototype.Kj,De.prototype.getTextTracks=De.prototype.Fc,De.prototype.getVariantTracks=De.prototype.jc,De.prototype.cancelTrickPlay=De.prototype.Md,De.prototype.trickPlay=De.prototype.pe,De.prototype.useTrickPlayTrackIfAvailable=De.prototype.Gh,De.prototype.getPlaybackRate=De.prototype.Ib,De.prototype.isBuffering=De.prototype.Mg,De.prototype.getKeyStatuses=De.prototype.Ve,De.prototype.getActiveSessionsMetadata=De.prototype.Eg,De.prototype.getExpiration=De.prototype.Td,De.prototype.drmInfo=De.prototype.drmInfo,De.prototype.keySystem=De.prototype.keySystem,De.prototype.isFullyLoaded=De.prototype.jk,De.prototype.goToLive=De.prototype.fk,De.prototype.seekRange=De.prototype.Sa,De.prototype.isVideoOnly=De.prototype.oi,De.prototype.isAudioOnly=De.prototype.ik,De.prototype.isInProgress=De.prototype.Oc,De.prototype.isLive=De.prototype.U,De.prototype.getQueueManager=De.prototype.ii,De.prototype.getAdManager=De.prototype.$h,De.prototype.getAssetUri=De.prototype.jd,De.prototype.getNetworkingEngine=De.prototype.Rb,De.prototype.getMediaElement=De.prototype.We,De.prototype.getManifestType=De.prototype.ci,De.prototype.getLoadMode=De.prototype.Ud,De.prototype.resetConfiguration=De.prototype.Ji,De.prototype.getBufferFullness=De.prototype.ai,De.prototype.getNonDefaultConfiguration=De.prototype.ei,De.prototype.getConfigurationForLowLatency=De.prototype.Fj,De.prototype.getConfiguration=De.prototype.getConfiguration,De.prototype.configurationForLowLatency=De.prototype.vj,De.prototype.configure=De.prototype.configure,De.prototype.releaseAllMutexes=De.prototype.Mk,De.prototype.destroyAllPreloads=De.prototype.lg,De.prototype.preload=De.prototype.preload,De.prototype.detachAndSavePreload=De.prototype.Wh,De.prototype.unloadAndSavePreload=De.prototype.gj,De.prototype.load=De.prototype.load,De.prototype.updateStartTime=De.prototype.ll,De.prototype.unload=De.prototype.xc,De.prototype.detach=De.prototype.detach,De.prototype.attachCanvas=De.prototype.nj,De.prototype.attach=De.prototype.Ob,De.probeSupport=function(e){e=e===void 0?!0:e;var t,n,r,i,o,s,a;return H(function(u){switch(u.h){case 1:if(t={},!e){u.A(2);break}return u.g(RA(),3);case 3:t=u.i;case 2:return n=Zs(),r=hI(),i=ct(),u.g(i.fc(),4);case 4:return o=u.i,s={manifest:n,media:r,drm:t,hardwareResolution:o},a=k1,a.forEach(function(l,h){s[h]=l()}),u.return(s)}})},De.isBrowserSupported=function(){return R.Promise||ut("A Promise implementation or polyfill is required"),!(R.Promise&&R.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/")?!1:(ct(),Ks()?!0:Tu().canPlayType("application/x-mpegurl")!="")},De.setQueueManagerFactory=function(e){gd=e},De.setAdManagerFactory=function(e){pd=e},De.registerSupportPlugin=q0,De.prototype.destroy=De.prototype.destroy;var ds=0,hd=1,pi=2,go=3;De.LoadMode={DESTROYED:ds,NOT_LOADED:hd,MEDIA_SOURCE:pi,SRC_EQUALS:go},De.version="v4.16.24";var P1=["4","16"];Cr=new function(e){this.g=e,this.i=un,this.h=Ur}(new On(Number(P1[0]),Number(P1[1])));var k1=new Map,pd=null,gd=null;function R1(){this.g=[],this.i=this.m=this.l=this.j=this.h=0}function M2(e){return e.g.length?e.g.reduce(function(t,n){return t+n},0)/e.g.length:0}function bt(e,t,n){var r=this;this.g=e,this.h=t,this.m=n,this.i=!1,this.j=this.h.getVolume(),this.l=new Et,this.l.F(this.h,google.ima.AdEvent.Type.PAUSED,function(){r.i=!0}),this.l.F(this.h,google.ima.AdEvent.Type.RESUMED,function(){r.i=!1})}f=bt.prototype,f.needsSkipUI=function(){return!1},f.isClientRendering=function(){return!0},f.hasCustomClick=function(){return!0},f.isUsingAnotherMediaElement=function(){return!0},f.getDuration=function(){return this.g.getDuration()},f.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},f.getRemainingTime=function(){return this.h.getRemainingTime()},f.isPaused=function(){return this.i},f.isSkippable=function(){return this.g.getSkipTimeOffset()>=0},f.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},f.canSkipNow=function(){return this.h.getAdSkippableState()},f.skip=function(){return this.h.skip()},f.pause=function(){return this.h.pause()},f.play=function(){return this.h.resume()},f.getVolume=function(){return this.h.getVolume()},f.setVolume=function(e){return this.m.volume=e,this.h.setVolume(e)},f.isMuted=function(){return this.h.getVolume()==0},f.isLinear=function(){return this.g.isLinear()},f.resize=function(e,t){this.h.resize(e,t)},f.setMuted=function(e){(this.m.muted=e)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)},f.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},f.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},f.getTitle=function(){return this.g.getTitle()},f.getDescription=function(){return this.g.getDescription()},f.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},f.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},f.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},f.getVastAdId=function(){return""},f.getAdId=function(){return this.g.getAdId()},f.getCreativeAdId=function(){return this.g.getCreativeAdId()},f.getAdvertiserName=function(){return this.g.getAdvertiserName()},f.getMediaUrl=function(){return this.g.getMediaUrl()},f.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},f.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},f.release=function(){this.h=this.g=null},Re("shaka.ads.ClientSideAd",bt),bt.prototype.release=bt.prototype.release,bt.prototype.getPodIndex=bt.prototype.getPodIndex,bt.prototype.getTimeOffset=bt.prototype.getTimeOffset,bt.prototype.getMediaUrl=bt.prototype.getMediaUrl,bt.prototype.getAdvertiserName=bt.prototype.getAdvertiserName,bt.prototype.getCreativeAdId=bt.prototype.getCreativeAdId,bt.prototype.getAdId=bt.prototype.getAdId,bt.prototype.getVastAdId=bt.prototype.getVastAdId,bt.prototype.getVastMediaWidth=bt.prototype.getVastMediaWidth,bt.prototype.getVastMediaHeight=bt.prototype.getVastMediaHeight,bt.prototype.getVastMediaBitrate=bt.prototype.getVastMediaBitrate,bt.prototype.getDescription=bt.prototype.getDescription,bt.prototype.getTitle=bt.prototype.getTitle,bt.prototype.getPositionInSequence=bt.prototype.getPositionInSequence,bt.prototype.getSequenceLength=bt.prototype.getSequenceLength,bt.prototype.setMuted=bt.prototype.setMuted,bt.prototype.resize=bt.prototype.resize,bt.prototype.isLinear=bt.prototype.isLinear,bt.prototype.isMuted=bt.prototype.isMuted,bt.prototype.setVolume=bt.prototype.setVolume,bt.prototype.getVolume=bt.prototype.getVolume,bt.prototype.play=bt.prototype.play,bt.prototype.pause=bt.prototype.pause,bt.prototype.skip=bt.prototype.skip,bt.prototype.canSkipNow=bt.prototype.canSkipNow,bt.prototype.getTimeUntilSkippable=bt.prototype.getTimeUntilSkippable,bt.prototype.isSkippable=bt.prototype.isSkippable,bt.prototype.isPaused=bt.prototype.isPaused,bt.prototype.getRemainingTime=bt.prototype.getRemainingTime,bt.prototype.getMinSuggestedDuration=bt.prototype.getMinSuggestedDuration,bt.prototype.getDuration=bt.prototype.getDuration,bt.prototype.isUsingAnotherMediaElement=bt.prototype.isUsingAnotherMediaElement,bt.prototype.hasCustomClick=bt.prototype.hasCustomClick,bt.prototype.isClientRendering=bt.prototype.isClientRendering,bt.prototype.needsSkipUI=bt.prototype.needsSkipUI;function fr(){}function b1(e,t){var n=[];e=d(Mn(e,"Ad"));for(var r=e.next();!r.done;r=e.next())if((r=Pn(r.value,"InLine"))&&(r=Pn(r,"Creatives"))){r=d(Mn(r,"Creative"));for(var i=r.next();!i.done;i=r.next()){i=i.value;var o=Pn(i,"Linear");if(o&&P2(n,t,o),i=Pn(i,"NonLinearAds")){i=Mn(i,"NonLinear"),i=d(i);for(var s=i.next();!s.done;s=i.next())e:{o=n;var a=t,u=s.value,l=Pn(u,"StaticResource");if(l)s=l.attributes.creativeType;else{if(l=Pn(u,"HTMLResource"),!l)break e;s="text/html"}if(l=_r(l)){s==="text/html"&&(l="data:text/html;charset=UTF-8,"+encodeURIComponent(l));var h=At(u,"width",re)||At(u,"expandedWidth",re),g=At(u,"height",re)||At(u,"expandedHeight",re);if(h||g){var m=null,E=Pn(u,"NonLinearClickThrough");E&&(E=_r(E))&&(m=E),E=null,(u=u.attributes.minSuggestedDuration)&&(E=ws(u)),u=0,a!=null&&(u=a),o.push({id:null,groupId:null,startTime:u,endTime:null,uri:l,mimeType:s,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:E,once:!0,pre:a==null,post:a==1/0,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:h||0,y:g||0}},displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:m})}}}}}}return n}function P2(e,t,n){var r=0;t!=null&&(r=t);var i=null;n.attributes.skipoffset&&(i=ws(n.attributes.skipoffset),isNaN(i)&&(i=null));var o=Pn(n,"MediaFiles");if(o){var s=null;for((n=Pn(n,"VideoClicks"))&&(n=Pn(n,"ClickThrough"))&&(n=_r(n))&&(s=n),o=n=Mn(o,"MediaFile"),n=n.filter(function(u){return u.attributes.delivery=="streaming"}),n.length&&(o=n),o=o.sort(function(u,l){return(parseInt(l.attributes.height,10)||0)-(parseInt(u.attributes.height,10)||0)}),o=d(o),n=o.next();!n.done;n=o.next())if(n=n.value,!n.attributes.apiFramework){var a=_r(n);if(a){e.push({id:null,groupId:null,startTime:r,endTime:null,uri:a,mimeType:n.attributes.type||null,isSkippable:i!=null,skipOffset:i,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:t==null,post:t==1/0,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:s});break}}}}function k2(e){var t=[];e=d(Mn(e,"vmap:AdBreak"));for(var n=e.next();!n.done;n=e.next()){var r=n.value,i=r.attributes.timeOffset;i&&(n=null,i=="start"?n=null:i=="end"?n=1/0:n=ws(i),(r=Pn(r,"vmap:AdSource"))&&(r=Pn(r,"vmap:AdTagURI"))&&(r=vr(r))&&t.push({time:n,uri:r}))}return t}Re("shaka.ads.Utils",fr),fr.ADS_LOADED="ads-loaded",fr.AD_STARTED="ad-started",fr.AD_FIRST_QUARTILE="ad-first-quartile",fr.AD_MIDPOINT="ad-midpoint",fr.AD_THIRD_QUARTILE="ad-third-quartile",fr.AD_COMPLETE="ad-complete",fr.AD_STOPPED="ad-stopped",fr.AD_SKIPPED="ad-skipped",fr.AD_VOLUME_CHANGED="ad-volume-changed",fr.AD_MUTED="ad-muted",fr.AD_PAUSED="ad-paused",fr.AD_RESUMED="ad-resumed",fr.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",fr.CUEPOINTS_CHANGED="ad-cue-points-changed",fr.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",fr.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",fr.AD_CLICKED="ad-clicked",fr.AD_PROGRESS="ad-progress",fr.AD_BUFFERING="ad-buffering",fr.AD_IMPRESSION="ad-impression",fr.AD_DURATION_CHANGED="ad-duration-changed",fr.AD_CLOSED="ad-closed",fr.AD_LOADED="ad-loaded",fr.ALL_ADS_COMPLETED="all-ads-completed",fr.AD_LINEAR_CHANGED="ad-linear-changed",fr.AD_METADATA="ad-metadata",fr.AD_RECOVERABLE_ERROR="ad-recoverable-error",fr.AD_ERROR="ad-error",fr.AD_BREAK_READY="ad-break-ready",fr.AD_INTERACTION="ad-interaction",fr.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",fr.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",fr.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function md(e,t,n,r,i){var o=this;this.u=e,this.i=t,this.G=!1,this.B=this.o=null,this.H=NaN,this.l=i,this.j=null,this.h=new Et,google.ima.settings.setLocale(n),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.D=new google.ima.AdDisplayContainer(this.u,this.i),this.D.initialize(),this.m=new google.ima.AdsLoader(this.D),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.16.24"),this.g=null,this.C=r||new google.ima.AdsRenderingSettings,this.h.F(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(s){R2(o,s)}),this.h.F(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(s){D1(o,s)}),this.h.F(this.i,"ended",function(){o.m.contentComplete()}),this.h.Aa(this.i,"play",function(){o.G=!0})}md.prototype.configure=function(e){this.o=e},md.prototype.stop=function(){this.g&&this.g.stop(),this.u&&Zl(this.u)},md.prototype.release=function(){this.stop(),this.B&&this.B.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy(),this.D.destroy()};function D1(e,t){t.getError(),t=new Map().set("originalEvent",t),e.l(new yt("ad-error",t)),vd(e,null),e.l(new yt("ad-cue-points-changed",new Map().set("cuepoints",[])))}function R2(e,t){if(e.l(new yt("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.H))),e.o.customPlayheadTracker){var n={currentTime:e.i.currentTime};e.g=t.getAdsManager(n,e.C),e.i.muted?e.g.setVolume(0):e.g.setVolume(e.i.volume),e.h.F(e.i,"timeupdate",function(){e.i.duration&&(n.currentTime=e.i.currentTime)}),e.h.F(e.i,"volumechange",function(){e.j&&(e.j.setVolume(e.i.volume),e.i.muted&&e.j.setMuted(!0))})}else e.g=t.getAdsManager(e.i,e.C);e.l(new yt("ima-ad-manager-loaded",new Map().set("imaAdManager",e.g)));var r=e.g.getCuePoints();if(r.length){t=[],r=d(r);for(var i=r.next();!i.done;i=r.next())t.push({start:i.value,end:null});e.l(new yt("ad-cue-points-changed",new Map().set("cuepoints",t)))}b2(e);try{e.g.init(e.i.offsetWidth,e.i.offsetHeight),e.h.F(e.i,"loadeddata",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),"ResizeObserver"in R?(e.B=new ResizeObserver(function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),e.B.observe(e.i)):e.h.F(document,"fullscreenchange",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),e.G||e.o.skipPlayDetection?e.g.start():e.h.Aa(e.i,"play",function(){e.G=!0,e.g.start()})}catch{vd(e,null)}}function b2(e){function t(n,r){n=new Map().set("originalEvent",n),e.l(new yt(r,n))}e.h.F(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(n){D1(e,n)}),e.h.F(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(n){O1(e,n)}),e.h.F(e.g,google.ima.AdEvent.Type.STARTED,function(n){O1(e,n)}),e.h.F(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(n){t(n,"ad-first-quartile")}),e.h.F(e.g,google.ima.AdEvent.Type.MIDPOINT,function(n){t(n,"ad-midpoint")}),e.h.F(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(n){t(n,"ad-third-quartile")}),e.h.F(e.g,google.ima.AdEvent.Type.COMPLETE,function(n){t(n,"ad-complete")}),e.h.F(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(n){vd(e,n)}),e.h.F(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){t(n,"all-ads-completed"),vd(e,n)}),e.h.F(e.g,google.ima.AdEvent.Type.SKIPPED,function(n){t(n,"ad-skipped")}),e.h.F(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(n){t(n,"ad-volume-changed")}),e.h.F(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(n){t(n,"ad-muted")}),e.h.F(e.g,google.ima.AdEvent.Type.PAUSED,function(n){e.j&&(e.j.i=!0,t(n,"ad-paused"))}),e.h.F(e.g,google.ima.AdEvent.Type.RESUMED,function(n){e.j&&(e.j.i=!1,t(n,"ad-resumed"))}),e.h.F(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(n){e.j&&t(n,"ad-skip-state-changed")}),e.h.F(e.g,google.ima.AdEvent.Type.CLICK,function(n){t(n,"ad-clicked")}),e.h.F(e.g,google.ima.AdEvent.Type.AD_PROGRESS,function(n){t(n,"ad-progress")}),e.h.F(e.g,google.ima.AdEvent.Type.AD_BUFFERING,function(n){t(n,"ad-buffering")}),e.h.F(e.g,google.ima.AdEvent.Type.IMPRESSION,function(n){t(n,"ad-impression")}),e.h.F(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(n){t(n,"ad-duration-changed")}),e.h.F(e.g,google.ima.AdEvent.Type.USER_CLOSE,function(n){t(n,"ad-closed")}),e.h.F(e.g,google.ima.AdEvent.Type.LOADED,function(n){t(n,"ad-loaded")}),e.h.F(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(n){t(n,"ad-linear-changed")}),e.h.F(e.g,google.ima.AdEvent.Type.AD_METADATA,function(n){t(n,"ad-metadata")}),e.h.F(e.g,google.ima.AdEvent.Type.LOG,function(n){t(n,"ad-recoverable-error")}),e.h.F(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(n){t(n,"ad-break-ready")}),e.h.F(e.g,google.ima.AdEvent.Type.INTERACTION,function(n){t(n,"ad-interaction")})}function O1(e,t){var n=t.getAd();n?(e.j=new bt(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new yt("ad-content-pause-requested")),t=new Map().set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new yt("ad-started",t)),e.j.isLinear()&&(e.u.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?(t=e.j,t.j=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):ut("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function vd(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new yt("ad-content-resume-requested")),e.l(new yt("ad-stopped",new Map().set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.u.removeAttribute("ad-active"),e.o.customPlayheadTracker||e.i.ended||e.i.play())}function Dt(e,t,n,r,i,o){this.g=e,this.h=t,this.j=(this.i=t.isSkippable)?t.skipOffset||0:t.skipOffset,this.l=t.skipFor,this.B=n,this.o=r,this.m=i,this.u=o,this.C=t.overlay}f=Dt.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!0},f.hasCustomClick=function(){return this.h.clickThroughUrl!=null},f.isUsingAnotherMediaElement=function(){return this.u},f.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},f.isPaused=function(){return this.g.paused},f.isSkippable=function(){return this.i&&this.l!=null?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.i},f.getTimeUntilSkippable=function(){if(this.isSkippable()){var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)}return Math.max(this.getRemainingTime(),0)},f.canSkipNow=function(){return this.i&&this.getTimeUntilSkippable()==0},f.skip=function(){this.canSkipNow()&&this.B()},f.pause=function(){return this.g.pause()},f.play=function(){return this.g.play()},f.getVolume=function(){return this.g.volume},f.setVolume=function(e){this.g.volume=e},f.isMuted=function(){return this.g.muted},f.isLinear=function(){return this.C==null},f.resize=function(){},f.setMuted=function(e){this.g.muted=e},f.getSequenceLength=function(){return this.o},f.getPositionInSequence=function(){return this.m},f.getTitle=function(){return""},f.getDescription=function(){return""},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return 0},f.getVastMediaWidth=function(){return 0},f.getVastAdId=function(){return""},f.getAdId=function(){return this.h.id||""},f.getCreativeAdId=function(){return""},f.getAdvertiserName=function(){return""},f.getMediaUrl=function(){return this.h.uri},f.getTimeOffset=function(){return this.h.pre?0:this.h.post?-1:this.h.startTime},f.getPodIndex=function(){return 0},f.release=function(){this.g=null},Re("shaka.ads.InterstitialAd",Dt),Dt.prototype.release=Dt.prototype.release,Dt.prototype.getPodIndex=Dt.prototype.getPodIndex,Dt.prototype.getTimeOffset=Dt.prototype.getTimeOffset,Dt.prototype.getMediaUrl=Dt.prototype.getMediaUrl,Dt.prototype.getAdvertiserName=Dt.prototype.getAdvertiserName,Dt.prototype.getCreativeAdId=Dt.prototype.getCreativeAdId,Dt.prototype.getAdId=Dt.prototype.getAdId,Dt.prototype.getVastAdId=Dt.prototype.getVastAdId,Dt.prototype.getVastMediaWidth=Dt.prototype.getVastMediaWidth,Dt.prototype.getVastMediaHeight=Dt.prototype.getVastMediaHeight,Dt.prototype.getVastMediaBitrate=Dt.prototype.getVastMediaBitrate,Dt.prototype.getDescription=Dt.prototype.getDescription,Dt.prototype.getTitle=Dt.prototype.getTitle,Dt.prototype.getPositionInSequence=Dt.prototype.getPositionInSequence,Dt.prototype.getSequenceLength=Dt.prototype.getSequenceLength,Dt.prototype.setMuted=Dt.prototype.setMuted,Dt.prototype.resize=Dt.prototype.resize,Dt.prototype.isLinear=Dt.prototype.isLinear,Dt.prototype.isMuted=Dt.prototype.isMuted,Dt.prototype.setVolume=Dt.prototype.setVolume,Dt.prototype.getVolume=Dt.prototype.getVolume,Dt.prototype.play=Dt.prototype.play,Dt.prototype.pause=Dt.prototype.pause,Dt.prototype.skip=Dt.prototype.skip,Dt.prototype.canSkipNow=Dt.prototype.canSkipNow,Dt.prototype.getTimeUntilSkippable=Dt.prototype.getTimeUntilSkippable,Dt.prototype.isSkippable=Dt.prototype.isSkippable,Dt.prototype.isPaused=Dt.prototype.isPaused,Dt.prototype.getRemainingTime=Dt.prototype.getRemainingTime,Dt.prototype.getMinSuggestedDuration=Dt.prototype.getMinSuggestedDuration,Dt.prototype.getDuration=Dt.prototype.getDuration,Dt.prototype.isUsingAnotherMediaElement=Dt.prototype.isUsingAnotherMediaElement,Dt.prototype.hasCustomClick=Dt.prototype.hasCustomClick,Dt.prototype.isClientRendering=Dt.prototype.isClientRendering,Dt.prototype.needsSkipUI=Dt.prototype.needsSkipUI;function Ot(e,t,n){this.g=e,this.j=t,this.h=n,this.i=e.overlay==null}f=Ot.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!0},f.hasCustomClick=function(){return this.g.clickThroughUrl!=null},f.isUsingAnotherMediaElement=function(){return!1},f.getDuration=function(){return-1},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){return-1},f.isPaused=function(){return!1},f.isSkippable=function(){return!1},f.getTimeUntilSkippable=function(){return 0},f.canSkipNow=function(){return!1},f.skip=function(){},f.pause=function(){},f.play=function(){},f.getVolume=function(){return 1},f.setVolume=function(){},f.isMuted=function(){return!1},f.isLinear=function(){return this.i},f.resize=function(){},f.setMuted=function(){},f.getSequenceLength=function(){return this.j},f.getPositionInSequence=function(){return this.h},f.getTitle=function(){return""},f.getDescription=function(){return""},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return 0},f.getVastMediaWidth=function(){return 0},f.getVastAdId=function(){return""},f.getAdId=function(){return this.g.id||""},f.getCreativeAdId=function(){return""},f.getAdvertiserName=function(){return""},f.getMediaUrl=function(){return this.g.uri},f.getTimeOffset=function(){return this.g.pre?0:this.g.post?-1:this.g.startTime},f.getPodIndex=function(){return 0},f.release=function(){},Re("shaka.ads.InterstitialStaticAd",Ot),Ot.prototype.release=Ot.prototype.release,Ot.prototype.getPodIndex=Ot.prototype.getPodIndex,Ot.prototype.getTimeOffset=Ot.prototype.getTimeOffset,Ot.prototype.getMediaUrl=Ot.prototype.getMediaUrl,Ot.prototype.getAdvertiserName=Ot.prototype.getAdvertiserName,Ot.prototype.getCreativeAdId=Ot.prototype.getCreativeAdId,Ot.prototype.getAdId=Ot.prototype.getAdId,Ot.prototype.getVastAdId=Ot.prototype.getVastAdId,Ot.prototype.getVastMediaWidth=Ot.prototype.getVastMediaWidth,Ot.prototype.getVastMediaHeight=Ot.prototype.getVastMediaHeight,Ot.prototype.getVastMediaBitrate=Ot.prototype.getVastMediaBitrate,Ot.prototype.getDescription=Ot.prototype.getDescription,Ot.prototype.getTitle=Ot.prototype.getTitle,Ot.prototype.getPositionInSequence=Ot.prototype.getPositionInSequence,Ot.prototype.getSequenceLength=Ot.prototype.getSequenceLength,Ot.prototype.setMuted=Ot.prototype.setMuted,Ot.prototype.resize=Ot.prototype.resize,Ot.prototype.isLinear=Ot.prototype.isLinear,Ot.prototype.isMuted=Ot.prototype.isMuted,Ot.prototype.setVolume=Ot.prototype.setVolume,Ot.prototype.getVolume=Ot.prototype.getVolume,Ot.prototype.play=Ot.prototype.play,Ot.prototype.pause=Ot.prototype.pause,Ot.prototype.skip=Ot.prototype.skip,Ot.prototype.canSkipNow=Ot.prototype.canSkipNow,Ot.prototype.getTimeUntilSkippable=Ot.prototype.getTimeUntilSkippable,Ot.prototype.isSkippable=Ot.prototype.isSkippable,Ot.prototype.isPaused=Ot.prototype.isPaused,Ot.prototype.getRemainingTime=Ot.prototype.getRemainingTime,Ot.prototype.getMinSuggestedDuration=Ot.prototype.getMinSuggestedDuration,Ot.prototype.getDuration=Ot.prototype.getDuration,Ot.prototype.isUsingAnotherMediaElement=Ot.prototype.isUsingAnotherMediaElement,Ot.prototype.hasCustomClick=Ot.prototype.hasCustomClick,Ot.prototype.isClientRendering=Ot.prototype.isClientRendering,Ot.prototype.needsSkipUI=Ot.prototype.needsSkipUI;function N1(e,t,n,r){function i(s){return s?s.overlay?!0:o.g.ended?s.post:!o.g.paused:!1}var o=this;this.M=null,this.m=e,this.C=t,this.g=n,this.G=null,this.u=!0,this.h=this.g,this.ua=r,this.ma=new Set,this.T=new Set,this.H=new Set,this.D=new Map,this.K=new Map,this.i=new De,ug(this),this.I=new Et,this.j=new Et,this.J=!1,this.$=this.o=this.B=this.l=null,this.ba=!1,this.O=-1,this.X=function(){if(!o.J&&o.l&&!o.C.xa()){o.l=o.g.currentTime;var s=cl(o);s&&i(s)&&yd(o,s,1,1,Date.now())}},this.V=function(){if(!(o.J||o.l||o.C.xa())){o.g.paused||(o.l=o.g.currentTime);var s=cl(o,!0);s||(s=cl(o)),s&&i(s)&&yd(o,s,1,1,Date.now())}},this.oa=function(){if(!o.J&&o.l&&!o.C.xa()){var s=o.g.currentTime;o.B&&!o.B.pre&&!o.B.post&&s<(o.B.endTime||o.B.startTime)&&(o.B=null)}},this.P=new Yt(this.X),this.N=new Yt(function(){var s,a,u,l,h,g,m,E,A,k,b;return H(function(V){switch(V.h){case 1:if(!o.H.size||o.l==null){V.A(0);break}if(s=o.C.Ud(),s==ds||s==hd)return V.return();a=!1,u=Array.from(o.H),l=o.C.Sa(),h=d(u),g=h.next();case 3:if(g.done){V.A(5);break}if(m=g.value,m==o.B){V.A(4);break}if(E=m.endTime||m.startTime,!(l.start-E>=1)){A=m.startTime-o.l,A>0&&A<=10&&(!o.D.has(m)&&j1(m)&&o.D.set(m,o.i.preload(m.uri,null,m.mimeType||void 0)),U1(o,m)),V.A(4);break}if(!o.D.has(m)){V.A(7);break}return V.g(o.D.get(m),8);case 8:(k=V.i)&&k.destroy(),o.D.delete(m);case 7:B1(o,m),b=m.id||JSON.stringify(m),o.T.has(b)&&o.T.delete(b),o.H.delete(m),og(o),m.overlay||(a=!0);case 4:g=h.next(),V.A(3);break;case 5:a&&Sd(o),V.j()}})}),this.configure(this.C.getConfiguration().ads)}f=N1.prototype,f.configure=function(e){this.M=e,this.J||sg(this)};function D2(e){if(!e.ba&&e.H.size){if(e.I.F(e.g,"playing",e.V),e.I.F(e.g,"timeupdate",e.V),e.I.F(e.g,"seeked",e.oa),e.I.F(e.g,"ended",e.X),"requestVideoFrameCallback"in e.g&&!F1()){var t=e.g,n=function(){e.O!=-1&&(e.X(),e.O!=-1&&(e.O=t.requestVideoFrameCallback(n)))};e.O=t.requestVideoFrameCallback(n)}else e.P.Ea(.025);e.N&&e.N.Ea(1),e.ba=!0}}function og(e){e.ba&&!e.H.size&&(e.I.Na(e.g,"playing",e.V),e.I.Na(e.g,"timeupdate",e.V),e.I.Na(e.g,"seeked",e.oa),e.I.Na(e.g,"ended",e.X),e.O!=-1&&(e.g.cancelVideoFrameCallback(e.O),e.O=-1),e.P&&e.P.stop(),e.N&&e.N.stop(),e.ba=!1)}function sg(e){if(e.m&&e.M){var t=e.M.supportsMultipleMediaElements,n=e.g;(n.controls||n.webkitPresentationMode&&n.webkitPresentationMode!=="inline"||n.webkitDisplayingFullscreen)&&(t=!1),e.u==t&&(e.u=!t,e.u?(e.h=e.g,e.G&&(e.G.parentElement&&e.m.removeChild(e.G),e.G=null)):(e.G||(t=document.createElement(e.g.tagName),t.autoplay=!0,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.display="none",t.setAttribute("playsinline",""),e.G=t),e.h=e.G))}else e.u=!0}f.stop=function(){if(this.j&&this.j.Ra(),this.ma.clear(),this.T.clear(),this.H.clear(),this.i.lg(),this.D.size){var e=Array.from(this.D.values());e=d(e);for(var t=e.next();!t.done;t=e.next())(t=t.value)&&t.then(function(n){n&&n.destroy()})}if(this.D.clear(),this.K.size)for(e=Array.from(this.K.keys()),e=d(e),t=e.next();!t.done;t=e.next())B1(this,t.value);this.K.clear(),this.i.detach(),this.J=!1,this.B=this.l=null,this.u=!0,this.h=this.g,this.G=null,ag(this),og(this),this.m&&Zl(this.m),this.o&&(this.o.stop(),this.o=null)},f.release=function(){this.stop(),this.I&&this.I.release(),this.j&&this.j.release(),this.P&&(this.P.stop(),this.P=null),this.N&&(this.N.stop(),this.N=null),this.i.destroy()},f.md=function(){return this.i};function O2(e,t){var n,r,i;H(function(o){if(o.h==1){if(n=null,(r=t.values.find(function(s){return s.key=="ID"}))&&(n=r.data),n){if(e.ma.has(n))return o.return();e.ma.add(n)}return ug(e),i=[],t&&t.values.find(function(s){return s.key=="X-OVERLAY-ID"})?(i=U2(t),o.A(2)):o.g(F2(e,t),3)}o.h!=2&&(i=o.i),i.length?Sc(e,i):ut("Unsupported HLS interstitial",t),o.j()})}function N2(e,t){var n=Pn(t.eventNode,"OverlayEvent"),r=n.attributes.uri,i=n.attributes.mimeType,o=n.attributes.loop=="true",s=At(n,"z",re);if(r&&s!=0){var a=null,u=Pn(n,"Background");if(u){var l=u.attributes.uri;l?a="center / contain no-repeat url('"+l+"')":a=_r(u)}u=1920,l=1080;var h=Pn(n,"Viewport");if(h&&(u=At(h,"x",re),u==null||(l=At(h,"y",re),l==null)))return;var g={viewport:{x:u,y:l},topLeft:{x:0,y:0},size:{x:u,y:l}},m=Pn(n,"Overlay");if(h&&m){var E=Pn(m,"TopLeft"),A=Pn(m,"Size");if(E&&A){if(m=At(E,"x",re),m==null||(E=At(E,"y",re),E==null))return;var k=At(A,"x",re);if(k==null||(A=At(A,"y",re),A==null))return;g.topLeft.x=m,g.topLeft.y=E,g.size.x=k,g.size.y=A}}if(m=null,n=Pn(n,"Squeeze"),h&&n&&(A=Pn(n,"TopLeft"),n=Pn(n,"Size"),A&&n)){if(h=At(A,"x",re),h==null||(m=At(A,"y",re),m==null)||(A=At(n,"x",re),A==null)||(n=At(n,"y",re),n==null))return;m={viewport:{x:u,y:l},topLeft:{x:h,y:m},size:{x:A,y:n}}}Sc(e,[{id:t.id,groupId:null,startTime:t.startTime,endTime:t.endTime,uri:r,mimeType:i,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:o,overlay:g,displayOnBackground:s==-1,currentVideo:m,background:a,clickThroughUrl:null}])}}f.addAdUrlInterstitial=function(e){var t=this,n,r,i,o,s,a,u,l,h;return H(function(g){if(g.h==1)return n={type:12},g.g(lg(t,e,n),2);if(g.h!=3){if(r=g.i,i=na(r,"VAST,vmap:VMAP"),!i)throw new fe(2,10,10007);if(o=[],i.tagName=="VAST")return o=b1(i,t.l),g.A(3);if(i.tagName!="vmap:VMAP")return g.A(3);for(s=function(m){var E,A;return H(function(k){if(k.h==1)return k.g(lg(t,m.uri,n),2);if(E=k.i,A=na(E,"VAST"),!A)throw new fe(2,10,10007);o.push.apply(o,M(b1(A,m.time))),k.j()})},a=[],u=d(k2(i)),l=u.next();!l.done;l=u.next())h=l.value,a.push(s(h));return a.length?g.g(Promise.all(a),3):g.A(3)}Sc(t,o),g.j()})};function Sc(e,t){var n,r,i,o,s,a,u,l;H(function(h){switch(h.h){case 1:n=!1,r=d(t),i=r.next();case 2:if(i.done){h.A(4);break}if(o=i.value,!o.uri){ut("Missing URL in interstitial",o),h.A(3);break}if(o.mimeType){h.A(5);break}return h.m(6),s=e.i.Rb(),h.g(tl(o.uri,s,e.C.getConfiguration().streaming.retryParameters),8);case 8:o.mimeType=h.i,h.o(5);break;case 6:h.l();case 5:if(a=o.id||JSON.stringify(o),e.T.has(a)){h.A(3);break}o.loop&&!o.overlay&&ut("Loop is only supported in overlay interstitials",o),o.overlay||(n=!0),e.T.add(a),e.H.add(o),u=!1,o.pre&&e.l==null?u=!0:o.startTime!=0||o.canJump?e.l!=null&&(l=o.startTime-e.l,l>0&&l<=10&&(u=!0)):u=!0,u&&(!e.D.has(o)&&j1(o)&&e.D.set(o,e.i.preload(o.uri,null,o.mimeType||void 0)),U1(e,o));case 3:i=r.next(),h.A(2);break;case 4:n&&Sd(e),D2(e),h.j()}})}function cl(e,t,n){t=t===void 0?!1:t,n=n===void 0?null:n;var r=0,i=null;if(e.H.size&&e.l!=null){var o=e.g.ended,s=Array.from(e.H).sort(function(g,m){return m.startTime-g.startTime}),a=s;for(a=t?s.filter(function(g){return g.pre}):o?s.filter(function(g){return g.post}):s.filter(function(g){return!g.pre&&!g.post}),s=d(a),a=s.next();!a.done;a=s.next()){a=a.value;var u=!1;if(t)u=a.pre;else if(o)u=a.post;else if(!a.pre&&!a.post){var l=e.l-Math.round(a.startTime*1e3)/1e3,h=1;e.M.allowStartInMiddleOfInterstitial&&a.endTime&&a.endTime!=1/0&&(h=a.endTime-a.startTime),(l>0||l==0&&e.l==0)&&(l<=h||!a.canJump)&&(u=!(n==null&&e.B&&!e.B.pre&&!e.B.post&&e.B.startTime>=a.startTime))}u&&(!e.B||a.startTime>=e.B.startTime)&&(r==(n||0)?i=a:i&&!a.canJump&&Math.round(a.startTime*1e3)/1e3-Math.round(i.startTime*1e3)/1e3>.001&&(i=a,r=0),r++)}}return i}function yd(e,t,n,r,i,o){o=o===void 0?0:o,e.B=t,sg(e),e.u||!e.m||e.h.parentElement||e.m.appendChild(e.h),r==1&&n==1&&(n=Array.from(e.H).filter(function(s){return t.pre?s.pre==t.pre:t.post?s.post==t.post:Math.abs(s.startTime-t.startTime)<.001}).length),t.once&&(o++,e.H.delete(t),og(e),t.overlay||Sd(e)),t.mimeType&&(t.mimeType.startsWith("image/")||t.mimeType==="text/html")?t.overlay?L2(e,t,n,r,o):ut("Unsupported interstitial",t):e.u&&t.overlay?ut("Unsupported interstitial",t):j2(e,t,n,r,i,o)}function L2(e,t,n,r,i){function o(){e.o&&(e.o.stop(),e.o=null),e.m.removeChild(u),ag(e,t),Dr(e,"ad-stopped"),e.j.Ra();var m=cl(e,t.pre,r-i);m?yd(e,m,n,++r,Date.now(),i):e.J=!1}e.J=!0;var s=t.overlay,a=t.mimeType=="text/html"?"iframe":"img",u=document.createElement(a);u.style.objectFit="contain",u.style.position="absolute",u.style.border="none",L1(e,t);var l=new Ot(t,n,r);Dr(e,"ad-impression"),Dr(e,"ad-started",new Map().set("ad",l)),a=="iframe"?u.src=t.uri:(u.src=t.uri,u.onerror=function(m){Dr(e,"ad-error",new Map().set("originalEvent",m)),o()}),l=s.viewport;var h=s.topLeft;s=s.size,l.x==0&&l.y==0?(u.width=t.overlay.size.x,u.height=t.overlay.size.y,u.style.bottom="10%",u.style.left="0",u.style.right="0",u.style.width="100%",t.overlay.size.y||a!="iframe"||(u.style.height="auto")):(u.style.height=s.y/l.y*100+"%",u.style.left=h.x/l.x*100+"%",u.style.top=h.y/l.y*100+"%",u.style.width=s.x/l.x*100+"%"),e.m.appendChild(u);var g=Date.now();e.o&&e.o.stop(),e.o=new Yt(function(){t.playoutLimit&&(Date.now()-g)/1e3>t.playoutLimit||t.endTime&&e.g.currentTime>t.endTime?(Dr(e,"ad-complete"),o()):e.g.currentTime<t.startTime&&(Dr(e,"ad-skipped"),o())}),t.playoutLimit&&!t.endTime?e.o.ka(t.playoutLimit):t.endTime&&e.o.Ea(.025),e.j.F(e.g,"seeked",function(){var m=e.g.currentTime;(m<t.startTime||t.endTime&&m>t.endTime)&&(e.o&&e.o.stop(),Dr(e,"ad-skipped"),o())}),t.clickThroughUrl&&e.j.F(u,"click",function(){t.clickThroughUrl&&R.open(t.clickThroughUrl,"_blank")})}function j2(e,t,n,r,i,o){var s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce;H(function(Ee){switch(Ee.h){case 1:if(s=Date.now(),e.J=!0,a=!1,u=function(){if(!e.u&&!t.overlay&&t.resumeOffset==null)if(t.timelineRange&&t.endTime&&t.endTime!=1/0)e.g.currentTime!=t.endTime&&(e.g.currentTime=t.endTime);else{var ye=Date.now();e.g.currentTime+=(ye-i)/1e3,i=ye}},l=function(ye){var Ve,Le;return H(function(Ce){if(Ce.h==1){if(u(),Ve=cl(e,t.pre,r-o),ye&&t.groupId)for(;Ve&&Ve.groupId==t.groupId;)r++,Ve=cl(e,t.pre,r-o);return e.o&&(!t.groupId||Ve&&Ve.groupId!=t.groupId)&&(e.o.stop(),e.o=null),ag(e,t),Ve&&!Ve.overlay?Ce.A(2):(t.post&&(e.l=null,e.B=null),e.u?Ce.g(e.i.detach(),4):Ce.g(e.i.xc(),4))}Ce.h!=2&&(e.u&&(Le=t.resumeOffset,Le==null&&(Le=t.timelineRange&&t.endTime&&t.endTime!=1/0?t.endTime-(e.l||0):(Date.now()-i)/1e3),Dr(e,"ad-content-resume-requested",new Map().set("offset",Le))),Dr(e,"ad-stopped"),e.j.Ra(),e.J=!1,e.u?Sd(e):(e.h.style.display="none",u(),e.g.ended||e.g.play())),sg(e),Ve&&(Dr(e,"ad-stopped"),e.j.Ra(),yd(e,Ve,n,++r,i,o)),Ce.j()})},h=function(ye){return H(function(Ve){return a?Ve.return():(a=!0,Dr(e,"ad-error",new Map().set("originalEvent",ye)),Ve.g(l(!1),0))})},g=function(){return H(function(ye){if(ye.h==1)return a?ye.return():(a=!0,ye.g(l(!1),2));Dr(e,"ad-complete"),ye.j()})},e.$=function(){return H(function(ye){return a?ye.return():(a=!0,Dr(e,"ad-skipped"),ye.g(l(!0),0))})},m=new Dt(e.h,t,e.$,n,r,!e.u),e.u||(m.setMuted(e.g.muted),m.setVolume(e.g.volume)),Dr(e,"ad-started",new Map().set("ad",m)),(E=m.canSkipNow())&&Dr(e,"ad-skip-state-changed"),e.j.Aa(e.i,"error",h),e.j.F(e.h,"timeupdate",function(){if(e.h.duration){var ye=m.canSkipNow();E!=ye&&m.getRemainingTime()>0&&m.getDuration()>0&&Dr(e,"ad-skip-state-changed"),E=ye,!e.u&&!t.overlay&&t.resumeOffset==null&&t.timelineRange&&t.endTime&&t.endTime!=1/0&&e.g.currentTime!=t.endTime&&e.C.Sa().end>=t.endTime&&(e.g.currentTime=t.endTime)}}),e.j.Aa(e.i,"firstquartile",function(){u(),Dr(e,"ad-first-quartile")}),e.j.Aa(e.i,"midpoint",function(){u(),Dr(e,"ad-midpoint")}),e.j.Aa(e.i,"thirdquartile",function(){u(),Dr(e,"ad-third-quartile")}),e.j.Aa(e.i,"complete",g),e.j.F(e.h,"play",function(){Dr(e,"ad-resumed")}),e.j.F(e.h,"pause",function(){var ye=e.i.getConfiguration();e.h.currentTime>=ye.playRangeEnd?g():Dr(e,"ad-paused")}),e.j.F(e.h,"volumechange",function(){e.h.muted?Dr(e,"ad-muted"):Dr(e,"ad-volume-changed"),e.u||(e.g.volume=e.h.volume,e.g.muted=e.h.muted)}),t.clickThroughUrl&&(A=e.m||e.h,e.j.F(A,"click",function(){t.clickThroughUrl&&(m.isPaused()||m.pause(),R.open(t.clickThroughUrl,"_blank"))})),!e.u||r!=1){Ee.A(2);break}return Dr(e,"ad-content-pause-requested",new Map().set("saveLivePosition",!0)),k=new zn,b=function(ye){return H(function(Ve){if(Ve.h==1)return ye.state!="detach"?Ve.A(0):F1()?Ve.g(new Promise(function(Le){return new Yt(Le).ka(.1)}),3):Ve.A(3);k.resolve(),e.j.Na(e.C,"onstatechange",b),Ve.j()})},e.j.F(e.C,"onstatechange",b),Ee.g(k,2);case 2:return L1(e,t),e.u||(e.h.style.display="",t.overlay?(e.h.loop=t.loop,V=t.overlay.viewport,B=t.overlay.topLeft,Z=t.overlay.size,e.h.style.height=Z.y/V.y*100+"%",e.h.style.left=B.x/V.x*100+"%",e.h.style.top=B.y/V.y*100+"%",e.h.style.width=Z.x/V.x*100+"%"):(e.g.pause(),t.resumeOffset!=null&&t.resumeOffset!=0&&(e.g.currentTime+=t.resumeOffset),e.h.loop=!1,e.h.style.height="100%",e.h.style.left="0",e.h.style.top="0",e.h.style.width="100%")),Ee.m(4),ug(e),t.startTime&&t.endTime&&t.endTime!=1/0&&t.startTime!=t.endTime&&(ue=t.endTime-t.startTime,ue>0&&e.i.configure("playRangeEnd",ue)),t.playoutLimit&&!e.o&&(e.o=new Yt(function(){e.$()}).ka(t.playoutLimit),e.i.configure("playRangeEnd",t.playoutLimit)),Ee.g(e.i.Ob(e.h),6);case 6:return pe=null,t.pre||t.post||!e.M.allowStartInMiddleOfInterstitial||e.l==null||(te=e.l-t.startTime,Math.abs(te)>.25&&(pe=te)),e.D.has(t)?Ee.g(e.D.get(t),10):Ee.g(e.i.load(t.uri,pe,t.mimeType||void 0),8);case 10:return le=Ee.i,e.D.delete(t),le?Ee.g(e.i.load(le),8):Ee.g(e.i.load(t.uri,pe,t.mimeType||void 0),8);case 8:t.overlay&&e.g.paused?e.h.pause():e.h.play(),ie=(Date.now()-s)/1e3,Dr(e,"ads-loaded",new Map().set("loadTime",ie)),e.u&&e.g.play(),t.overlay&&(t.pre||t.post||e.C.U()&&!(t.startTime>0)||(ve=function(){var ye=e.g.currentTime-t.startTime;Math.abs(ye-e.h.currentTime)>.1&&(e.h.currentTime=ye)},e.j.Aa(e.h,"playing",ve),e.j.F(e.g,"seeking",ve)),e.j.F(e.g,"seeked",function(){var ye=e.g.currentTime;(ye<t.startTime||t.endTime&&ye>t.endTime)&&e.$()})),Ee.o(0);break;case 4:if(ce=Ee.l(),!e.J)return Ee.return();h(ce),Ee.j()}})}function L1(e,t){if(t.displayOnBackground&&(e.g.style.zIndex="1"),t.currentVideo!=null){var n=t.currentVideo;e.g.style.transformOrigin="top left";var r=!0,i=[],o=n.topLeft.x/n.viewport.x*100;o>0&&o<=100&&(i.push("translateX("+o+"%)"),r=!1),o=n.topLeft.y/n.viewport.y*100,o>0&&o<=100&&(i.push("translateY("+o+"%)"),r=!1),o=n.size.x/n.viewport.x,o<1&&i.push("scaleX("+o+")"),n=n.size.y/n.viewport.y,o<1&&i.push("scaleY("+n+")"),i.length&&(e.g.style.transform=i.join(" ")),r&&(e.g.style.transition="transform 250ms")}e.m&&(t.clickThroughUrl?(e.m.setAttribute("ad-active","true"),e.m.style.pointerEvents=""):e.m.style.pointerEvents="none",t.background&&(e.m.style.background=t.background)),e.G&&(e.G.style.background=t.overlay?"":"rgb(0, 0, 0)")}function ag(e,t){(!t||t.displayOnBackground)&&(e.g.style.zIndex=""),t&&t.currentVideo==null||(e.g.style.transformOrigin="",e.g.style.transition="",e.g.style.transform=""),e.m&&(e.m.removeAttribute("ad-active"),e.m.style.pointerEvents="",!t||t.background)&&(e.m.style.background=""),e.G&&(e.G.style.background="")}function F2(e,t){var n,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce,Ee,ye,Ve,Le,Ce,ke,Ge,Je,Ft,dt,kn,Ut,Gn,sn,Qt,hn,An;return H(function(pn){switch(pn.h){case 1:if(n=[],!t||(r=t.values.find(function(Zt){return Zt.key=="X-ASSET-URI"}),i=t.values.find(function(Zt){return Zt.key=="X-ASSET-LIST"}),!r&&!i))return pn.return(n);if(o=null,(s=t.values.find(function(Zt){return Zt.key=="ID"}))&&(o=s.data),a=o==null?Math.floor(t.startTime*10)/10:t.startTime,(u=t.endTime)&&t.endTime!=1/0&&typeof t.endTime=="number"&&(u=o==null?Math.floor(t.endTime*10)/10:t.endTime),l=t.values.find(function(Zt){return Zt.key=="X-RESTRICT"}),g=h=!0,l&&l.data&&(m=l.data,h=!m.includes("SKIP"),g=!m.includes("JUMP")),E=h?0:null,(A=t.values.find(function(Zt){return Zt.key=="X-ENABLE-SKIP-AFTER"}))&&(k=A.data,E=parseFloat(k),isNaN(E)&&(E=h?0:null)),b=null,(V=t.values.find(function(Zt){return Zt.key=="X-ENABLE-SKIP-FOR"}))&&(B=V.data,b=parseFloat(B),isNaN(E)&&(b=null)),Z=null,(ue=t.values.find(function(Zt){return Zt.key=="X-RESUME-OFFSET"}))&&(pe=ue.data,Z=parseFloat(pe),isNaN(Z)&&(Z=null)),te=null,(le=t.values.find(function(Zt){return Zt.key=="X-PLAYOUT-LIMIT"}))&&(ie=le.data,te=parseFloat(ie),isNaN(te)&&(te=null)),Ee=ce=ve=!1,(ye=t.values.find(function(Zt){return Zt.key=="CUE"}))&&(Ve=ye.data,ve=Ve.includes("ONCE"),ce=Ve.includes("PRE"),Ee=Ve.includes("POST")),Le=!1,(Ce=t.values.find(function(Zt){return Zt.key=="X-TIMELINE-OCCUPIES"}))?(ke=Ce.data,Le=ke.includes("RANGE")):!ue&&e.C.U()&&(Le=!ce&&!Ee),r){if(Ge=r.data,!Ge)return pn.return(n);n.push({id:o,groupId:null,startTime:a,endTime:u,uri:Ge,mimeType:null,isSkippable:h,skipOffset:E,skipFor:b,canJump:g,resumeOffset:Z,playoutLimit:te,once:ve,pre:ce,post:Ee,timelineRange:Le,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null}),pn.A(2);break}if(!i){pn.A(2);break}return Je=i.data,Je?(pn.m(4),Ft={type:11},pn.g(lg(e,Je,Ft),6)):pn.return(n);case 6:for(dt=pn.i,kn=Un(dt),Ut=JSON.parse(kn),(Gn=Ut["SKIP-CONTROL"])&&(sn=Gn["ENABLE-SKIP-AFTER"],typeof sn=="number"&&(E=parseFloat(sn),isNaN(sn)&&(E=h?0:null)),Qt=Gn["ENABLE-SKIP-FOR"],typeof Qt=="number"&&(b=parseFloat(Qt),isNaN(Qt)&&(b=null))),hn=0;hn<Ut.ASSETS.length;hn++)An=Ut.ASSETS[hn],An.URI&&n.push({id:o+"_shaka_asset_"+hn,groupId:o,startTime:a,endTime:u,uri:An.URI,mimeType:null,isSkippable:h,skipOffset:E,skipFor:b,canJump:g,resumeOffset:Z,playoutLimit:te,once:ve,pre:ce,post:Ee,timelineRange:Le,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null});pn.o(2);break;case 4:pn.l();case 2:return pn.return(n)}})}function U2(e){var t=[];if(!e)return t;var n=e.values.find(function(b){return b.key=="X-ASSET-URI"});if(!n||(n=n.data,!n))return t;var r=null,i=e.values.find(function(b){return b.key=="X-OVERLAY-ID"});i&&(r=i.data),i=r==null?Math.floor(e.startTime*10)/10:e.startTime;var o=e.endTime;e.endTime&&e.endTime!=1/0&&typeof e.endTime=="number"&&(o=r==null?Math.floor(e.endTime*10)/10:e.endTime);var s=!1,a=!1,u=!1,l=e.values.find(function(b){return b.key=="CUE"});l&&(u=l.data,s=u.includes("ONCE"),a=u.includes("PRE"),u=u.includes("POST")),l=null;var h=e.values.find(function(b){return b.key=="X-ASSET-MIMETYPE"});h&&(l=h.data),h=!1;var g=e.values.find(function(b){return b.key=="X-LOOP"});g&&(h=g.data=="YES"),g=1;var m=e.values.find(function(b){return b.key=="X-DEPTH"});m&&(g=parseFloat(m.data),isNaN(g)&&(g=1)),m=null;var E=e.values.find(function(b){return b.key=="X-BACKGROUND"});E&&(m=E.data),E=1920;var A=1080,k=e.values.find(function(b){return b.key=="X-VIEWPORT"});if(k){if(A=k.data.split("x"),A.length!=2)return t;E=parseFloat(A[0]),A=parseFloat(A[1])}if(E={viewport:{x:E,y:A},topLeft:{x:0,y:0},size:{x:E,y:A}},A=e.values.find(function(b){return b.key=="X-OVERLAY-POSITION"})){if(A=A.data.split("x"),A.length!=2)return t;E.topLeft.x=parseFloat(A[0]),E.topLeft.y=parseFloat(A[1])}if(A=e.values.find(function(b){return b.key=="X-OVERLAY-SIZE"})){if(A=A.data.split("x"),A.length!=2)return t;E.size.x=parseFloat(A[0]),E.size.y=parseFloat(A[1])}if(A=null,(k=e.values.find(function(b){return b.key=="X-SQUEEZECURRENT"}))&&(A=parseFloat(k.data),isNaN(A)&&(A=1),A={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*A,y:1080*A}},e=e.values.find(function(b){return b.key=="X-SQUEEZECURRENT-POSITION"}))){if(e=e.data.split("x"),e.length!=2)return t;A.topLeft.x=parseFloat(e[0]),A.topLeft.y=parseFloat(e[1])}return t.push({id:r,groupId:null,startTime:i,endTime:o,uri:n,mimeType:l,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:s,pre:a,post:u,timelineRange:!0,loop:h,overlay:E,displayOnBackground:g==-1,currentVideo:A,background:m,clickThroughUrl:null}),t}function Sd(e){for(var t=[],n=d(e.H),r=n.next(),i={};!r.done;i={wc:void 0},r=n.next())r=r.value,r.overlay||(i.wc={start:r.startTime,end:null},r.pre?(i.wc.start=0,i.wc.end=null):r.post?(i.wc.start=-1,i.wc.end=null):r.timelineRange&&(i.wc.end=r.endTime),t.find(function(o){return function(s){return o.wc.start==s.start&&o.wc.end==s.end}}(i))||t.push(i.wc));Dr(e,"ad-cue-points-changed",new Map().set("cuepoints",t))}function ug(e){e.i.configure(e.C.ei()),e.i.configure("ads.disableHLSInterstitial",!0),e.i.configure("ads.disableDASHInterstitial",!0),e.i.configure("playRangeEnd",1/0),Fv(e.C.Rb(),e.i.Rb())}function lg(e,t,n){var r,i,o;return H(function(s){return s.h==1?(r=jr([t],fs()),i=e.C.Rb().request(7,r,n),s.g(i.promise,2)):(o=s.i,s.return(o.data))})}function j1(e){return(e=e.mimeType)?!e.startsWith("image/")&&e!=="text/html":!0}function F1(){var e=ct().Pa();return e=="TV"||e=="CONSOLE"||e=="CAST"}function U1(e,t){if(!(e.K.has(t)||e.M&&!e.M.allowPreloadOnDomElements)){var n=function(o){var s=document.createElement("link");return s.rel="preload",s.href=o,s.as="image",document.head.appendChild(s),s},r=[];if(t.background){var i=t.background.match(/url\(('|")?([^'"()]+)('|")\)?/);i&&r.push(n(i[2]))}t.mimeType&&t.mimeType.startsWith("image/")&&r.push(n(t.uri)),e.K.set(t,r)}}function B1(e,t){if(e.K.has(t)){var n=e.K.get(t);n=d(n);for(var r=n.next();!r.done;r=n.next())r=r.value,r.parentNode.removeChild(r);e.K.delete(t)}}function Dr(e,t,n){e.ua(new yt(t,n))}function Pt(e,t,n,r,i){this.h=e,this.j=ws(this.h.skipOffset),this.g=i,this.i=t,this.l=n,this.o=r,this.m=!1}f=Pt.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!1},f.hasCustomClick=function(){return!1},f.isUsingAnotherMediaElement=function(){return!1},f.getDuration=function(){return this.h.durationInSeconds},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},f.isPaused=function(){return this.g.paused},f.isSkippable=function(){return typeof this.j=="number"},f.getTimeUntilSkippable=function(){if(typeof this.j!="number")return this.getRemainingTime();var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)},f.canSkipNow=function(){return this.getTimeUntilSkippable()==0},f.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},f.pause=function(){return this.g.pause()},f.play=function(){return this.g.play()},f.getVolume=function(){return this.g.volume},f.setVolume=function(e){this.g.volume=e},f.isMuted=function(){return this.g.muted},f.isLinear=function(){return this.o},f.resize=function(){},f.setMuted=function(e){this.g.muted=e},f.getSequenceLength=function(){return this.l?this.l:1},f.getPositionInSequence=function(){return this.i?this.i:1},f.getTitle=function(){return this.h.adTitle},f.getDescription=function(){return""},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return 0},f.getVastMediaWidth=function(){return 0},f.getVastAdId=function(){return this.h.vastAdId||""},f.getAdId=function(){return this.h.adId},f.getCreativeAdId=function(){return this.h.creativeId},f.getAdvertiserName=function(){return""},f.getMediaUrl=function(){return null},f.getTimeOffset=function(){return 0},f.getPodIndex=function(){return 0},f.release=function(){this.l=this.i=this.g=this.h=null},Re("shaka.ads.MediaTailorAd",Pt),Pt.prototype.release=Pt.prototype.release,Pt.prototype.getPodIndex=Pt.prototype.getPodIndex,Pt.prototype.getTimeOffset=Pt.prototype.getTimeOffset,Pt.prototype.getMediaUrl=Pt.prototype.getMediaUrl,Pt.prototype.getAdvertiserName=Pt.prototype.getAdvertiserName,Pt.prototype.getCreativeAdId=Pt.prototype.getCreativeAdId,Pt.prototype.getAdId=Pt.prototype.getAdId,Pt.prototype.getVastAdId=Pt.prototype.getVastAdId,Pt.prototype.getVastMediaWidth=Pt.prototype.getVastMediaWidth,Pt.prototype.getVastMediaHeight=Pt.prototype.getVastMediaHeight,Pt.prototype.getVastMediaBitrate=Pt.prototype.getVastMediaBitrate,Pt.prototype.getDescription=Pt.prototype.getDescription,Pt.prototype.getTitle=Pt.prototype.getTitle,Pt.prototype.getPositionInSequence=Pt.prototype.getPositionInSequence,Pt.prototype.getSequenceLength=Pt.prototype.getSequenceLength,Pt.prototype.setMuted=Pt.prototype.setMuted,Pt.prototype.resize=Pt.prototype.resize,Pt.prototype.isLinear=Pt.prototype.isLinear,Pt.prototype.isMuted=Pt.prototype.isMuted,Pt.prototype.setVolume=Pt.prototype.setVolume,Pt.prototype.getVolume=Pt.prototype.getVolume,Pt.prototype.play=Pt.prototype.play,Pt.prototype.pause=Pt.prototype.pause,Pt.prototype.skip=Pt.prototype.skip,Pt.prototype.canSkipNow=Pt.prototype.canSkipNow,Pt.prototype.getTimeUntilSkippable=Pt.prototype.getTimeUntilSkippable,Pt.prototype.isSkippable=Pt.prototype.isSkippable,Pt.prototype.isPaused=Pt.prototype.isPaused,Pt.prototype.getRemainingTime=Pt.prototype.getRemainingTime,Pt.prototype.getMinSuggestedDuration=Pt.prototype.getMinSuggestedDuration,Pt.prototype.getDuration=Pt.prototype.getDuration,Pt.prototype.isUsingAnotherMediaElement=Pt.prototype.isUsingAnotherMediaElement,Pt.prototype.hasCustomClick=Pt.prototype.hasCustomClick,Pt.prototype.isClientRendering=Pt.prototype.isClientRendering,Pt.prototype.needsSkipUI=Pt.prototype.needsSkipUI;function Tc(e,t,n,r){this.C=e,this.K=t,this.h=n,this.l=null,this.P=NaN,this.i=r,this.J=!1,this.B=null,this.j=[],this.N=[],this.M=this.D=this.g=null,this.G=new Map,this.m=[],this.u=[],this.H="",this.O=!0,this.I="",this.o=new Et}Tc.prototype.stop=function(){for(var e=d(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Na(t.target,t.type,t.listener);fl(this),this.m=[],this.u=[],this.H="",this.O=!0,this.I="",this.B=null,this.j=[],this.N=[],this.G.clear()},Tc.prototype.release=function(){this.stop(),this.o&&this.o.release()},Tc.prototype.onManifestUpdated=function(e){this.J=e,this.H!=""&&(V2(this,this.H,this.O),this.O=!1)},Tc.prototype.getCuePoints=function(){for(var e=[],t=d(this.j),n=t.next();!n.done;n=t.next()){n=d(n.value.ads);for(var r=n.next();!r.done;r=n.next())r=r.value,e.push({start:r.startTimeInSeconds,end:r.startTimeInSeconds+r.durationInSeconds})}return e};function B2(e,t,n){var r,i,o,s,a,u,l,h,g,m,E,A;H(function(k){if(k.h==1)return r={type:7},i=jr([t],fs()),i.method="POST",n&&(o=JSON.stringify(n),i.body=Vi(o)),s=e.K.request(7,i,r),k.m(2),k.g(s.promise,4);if(k.h!=2){if(a=k.i,u=Un(a.data),l=JSON.parse(u),l.manifestUrl&&l.trackingUrl)h=new Ct(t),g=new Ct(l.trackingUrl),e.H=h.resolve(g).toString(),m=Date.now()/1e3,E=m-e.P,e.i(new yt("ads-loaded",new Map().set("loadTime",E))),A=new Ct(l.manifestUrl),e.l.resolve(h.resolve(A).toString()),e.l=null;else throw Error("Insufficient data from MediaTailor.");return k.o(0)}if(k.l(),!e.I.length)return e.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),e.l=null,k.return();e.l.resolve(e.I),e.l=null,k.j()})}function V2(e,t,n){var r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B;H(function(Z){if(Z.h==1)return r={type:8},i=jr([t],fs()),o=e.K.request(7,i,r),Z.m(2),Z.g(o.promise,4);if(Z.h!=2){if(s=Z.i,a=[],u=Un(s.data),l=JSON.parse(u),l.avails.length>0){if(JSON.stringify(e.j)!=JSON.stringify(l.avails)){for(e.j=l.avails,h=d(e.j),g=h.next();!g.done;g=h.next())for(m=g.value,E=d(m.nonLinearAdsList),A=E.next();!A.done;A=E.next())for(k=A.value,b=d(k.nonLinearAdList),V=b.next();!V.done;V=b.next())B=V.value,_2(e,B);a=e.getCuePoints(),e.i(new yt("ad-cue-points-changed",new Map().set("cuepoints",a)))}}else e.j.length&&e.i(new yt("ad-cue-points-changed",new Map().set("cuepoints",a))),fl(e),e.j=[];return n&&(e.J||a.length>0)&&H2(e),Z.o(0)}Z.l(),Z.j()})}function _2(e,t){var n,r,i,o,s,a,u,l;H(function(h){if(h.h==1)return!t.staticResource||(n=V1(t),e.G.get(n))?h.return():(r={type:9},i=jr([t.staticResource],fs()),o=e.K.request(7,i,r),h.m(2),e.G.set(n,[]),h.g(o.promise,4));if(h.h!=2)return s=h.i,a=Un(s.data),u=JSON.parse(a),l=u.apps,e.G.set(n,l),h.o(0);h.l(),e.G.delete(n),h.j()})}function V1(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function H2(e){H1(e),e.J||(_1(e),e.o.F(e.h,"seeked",function(){_1(e)}),e.o.F(e.h,"ended",function(){fl(e)})),e.o.F(e.h,"timeupdate",function(){H1(e)})}function _1(e){var t=e.h.currentTime;if(t!=0&&e.B==null){for(var n,r,i=d(e.j),o=i.next();!o.done;o=i.next()){o=o.value;for(var s=d(o.ads),a=s.next();!a.done;a=s.next())if(a=a.value,!r)a.startTimeInSeconds<t&&(r=a,n=o);else if(a.startTimeInSeconds<t&&a.startTimeInSeconds>r.startTimeInSeconds+r.durationInSeconds){r=a,n=o;break}}n&&r&&!e.N.includes(r.adId)&&(e.B=t,e.h.currentTime=n.startTimeInSeconds)}}function H1(e){if(e.h.duration&&(e.g||e.j.length)){var t=e.h.currentTime,n=!1;if(e.g){n=!0;var r=e.D,i=r.startTimeInSeconds+.5*r.durationInSeconds,o=r.startTimeInSeconds+.75*r.durationInSeconds;t>=r.startTimeInSeconds+.25*r.durationInSeconds&&!e.u.includes("firstQuartile")?(e.u.push("firstQuartile"),zi(e,"firstQuartile")):t>=i&&!e.u.includes("midpoint")?(e.u.push("midpoint"),zi(e,"midpoint")):t>=o&&!e.u.includes("thirdQuartile")&&(e.u.push("thirdQuartile"),zi(e,"thirdQuartile")),r=e.g.getRemainingTime(),i=e.g.getDuration(),e.g.canSkipNow()&&r>0&&i>0&&zi(e,"skipStateChanged"),i>0&&(r<=0||r>i)&&fl(e)}if(!e.g||!e.g.isLinear()){e:for(r=d(e.j),i=r.next();!i.done&&(i=i.value,!(e.g&&e.g.isLinear()));i=r.next())for(o=0;o<i.ads.length;o++){var s=i.ads[o],a=s.startTimeInSeconds+s.durationInSeconds;if(s.startTimeInSeconds<=t&&a>t){if(e.N.includes(s.adId)){if(e.h.ended)continue;e.h.currentTime=a;break e}fl(e),e.M=i,e.g=new Pt(s,o+1,i.ads.length,!0,e.h),e.D=s,o===0&&zi(e,"breakStart"),G1(e);break}}if(!e.g){for(r=d(e.j),i=r.next();!i.done&&(i=i.value,!e.g);i=r.next())for(o=0;o<i.nonLinearAdsList.length;o++)if(s=i.nonLinearAdsList[o],s.nonLinearAdList.length){a=i.startTimeInSeconds;var u=e.G.get(V1(s.nonLinearAdList[0]));if(a<=t&&u&&u.length){fl(e),a=e,u=d(u);for(var l=u.next();!l.done;l=u.next())if(l=l.value,l.data.source.length){var h=document.createElement("img");h.src=l.data.source[0].url,h.style.top=(l.placeholder.top||0)+"%",h.style.height=100-(l.placeholder.top||0)+"%",h.style.left=(l.placeholder.left||0)+"%",h.style.maxWidth=100-(l.placeholder.left||0)+"%",h.style.objectFit="contain",h.style.position="absolute",a.C.appendChild(h)}e.M=i,e.g=new Pt(s,o+1,i.ads.length,!1,e.h),e.D=s,o===0&&zi(e,"breakStart"),G1(e);break}}}n&&!e.g&&(t=e.h.currentTime,e.B&&e.B>t&&(e.h.currentTime=e.B),e.B=null)}}}function fl(e){if(e.g){for(;e.C.lastChild;)e.C.removeChild(e.C.firstChild);e.J||e.N.push(e.D.adId);var t=e.g.m;t!==void 0&&t?zi(e,"skip"):zi(e,"complete"),t=d(e.m);for(var n=t.next();!n.done;n=t.next())n=n.value,e.o.Na(n.target,n.type,n.listener);e.m=[],e.u=[],t=e.g.getPositionInSequence(),n=e.g.getSequenceLength(),t===n&&zi(e,"breakEnd"),e.g=null,e.D=null,e.M=null}}function G1(e){var t=!1;e.h.paused?t=!0:(zi(e,"impression"),zi(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&zi(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||zi(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(zi(e,"impression"),zi(e,"start"),t=!1):zi(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){zi(e,"pause")}});for(var n=d(e.m),r=n.next();!r.done;r=n.next())r=r.value,e.o.F(r.target,r.type,r.listener)}function zi(e,t){var n=e.D.trackingEvents.find(function(o){return o.eventType==t});if(n||(n=e.M.adBreakTrackingEvents.find(function(o){return o.eventType==t})),n){var r={type:10};n=d(n.beaconUrls);for(var i=n.next();!i.done;i=n.next())(i=i.value)&&i!=""&&(i=jr([i],fs()),i.method="POST",e.K.request(7,i,r))}switch(t){case"impression":e.i(new yt("ad-impression"));break;case"start":e.i(new yt("ad-started",new Map().set("ad",e.g)));break;case"mute":e.i(new yt("ad-muted"));break;case"unmute":e.i(new yt("ad-volume-changed"));break;case"resume":e.i(new yt("ad-resumed"));break;case"pause":e.i(new yt("ad-paused"));break;case"firstQuartile":e.i(new yt("ad-first-quartile"));break;case"midpoint":e.i(new yt("ad-midpoint"));break;case"thirdQuartile":e.i(new yt("ad-third-quartile"));break;case"complete":e.i(new yt("ad-complete")),e.i(new yt("ad-stopped"));break;case"skip":e.i(new yt("ad-skipped")),e.i(new yt("ad-stopped"));break;case"breakStart":e.C.setAttribute("ad-active","true");break;case"breakEnd":e.C.removeAttribute("ad-active");break;case"skipStateChanged":e.i(new yt("ad-skip-state-changed"))}}function Nt(e,t){this.g=e,this.i=null,this.h=t}f=Nt.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!1},f.hasCustomClick=function(){return!0},f.isUsingAnotherMediaElement=function(){return!1},f.getDuration=function(){return this.i?this.i.duration:-1},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},f.isPaused=function(){return this.h.paused},f.isSkippable=function(){return this.g.isSkippable()},f.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},f.canSkipNow=function(){return this.getTimeUntilSkippable()==0},f.skip=function(){this.h.currentTime+=this.getRemainingTime()},f.pause=function(){return this.h.pause()},f.play=function(){return this.h.play()},f.getVolume=function(){return this.h.volume},f.setVolume=function(e){this.h.volume=e},f.isMuted=function(){return this.h.muted},f.isLinear=function(){return!0},f.resize=function(){},f.setMuted=function(e){this.h.muted=e},f.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},f.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},f.getTitle=function(){return this.g.getTitle()},f.getDescription=function(){return this.g.getDescription()},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},f.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},f.getVastAdId=function(){return""},f.getAdId=function(){return this.g.getAdId()},f.getCreativeAdId=function(){return this.g.getCreativeAdId()},f.getAdvertiserName=function(){return this.g.getAdvertiserName()},f.getMediaUrl=function(){return null},f.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},f.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},f.release=function(){this.h=this.i=this.g=null},Re("shaka.ads.ServerSideAd",Nt),Nt.prototype.release=Nt.prototype.release,Nt.prototype.getPodIndex=Nt.prototype.getPodIndex,Nt.prototype.getTimeOffset=Nt.prototype.getTimeOffset,Nt.prototype.getMediaUrl=Nt.prototype.getMediaUrl,Nt.prototype.getAdvertiserName=Nt.prototype.getAdvertiserName,Nt.prototype.getCreativeAdId=Nt.prototype.getCreativeAdId,Nt.prototype.getAdId=Nt.prototype.getAdId,Nt.prototype.getVastAdId=Nt.prototype.getVastAdId,Nt.prototype.getVastMediaWidth=Nt.prototype.getVastMediaWidth,Nt.prototype.getVastMediaHeight=Nt.prototype.getVastMediaHeight,Nt.prototype.getVastMediaBitrate=Nt.prototype.getVastMediaBitrate,Nt.prototype.getDescription=Nt.prototype.getDescription,Nt.prototype.getTitle=Nt.prototype.getTitle,Nt.prototype.getPositionInSequence=Nt.prototype.getPositionInSequence,Nt.prototype.getSequenceLength=Nt.prototype.getSequenceLength,Nt.prototype.setMuted=Nt.prototype.setMuted,Nt.prototype.resize=Nt.prototype.resize,Nt.prototype.isLinear=Nt.prototype.isLinear,Nt.prototype.isMuted=Nt.prototype.isMuted,Nt.prototype.setVolume=Nt.prototype.setVolume,Nt.prototype.getVolume=Nt.prototype.getVolume,Nt.prototype.play=Nt.prototype.play,Nt.prototype.pause=Nt.prototype.pause,Nt.prototype.skip=Nt.prototype.skip,Nt.prototype.canSkipNow=Nt.prototype.canSkipNow,Nt.prototype.getTimeUntilSkippable=Nt.prototype.getTimeUntilSkippable,Nt.prototype.isSkippable=Nt.prototype.isSkippable,Nt.prototype.isPaused=Nt.prototype.isPaused,Nt.prototype.getRemainingTime=Nt.prototype.getRemainingTime,Nt.prototype.getMinSuggestedDuration=Nt.prototype.getMinSuggestedDuration,Nt.prototype.getDuration=Nt.prototype.getDuration,Nt.prototype.isUsingAnotherMediaElement=Nt.prototype.isUsingAnotherMediaElement,Nt.prototype.hasCustomClick=Nt.prototype.hasCustomClick,Nt.prototype.isClientRendering=Nt.prototype.isClientRendering,Nt.prototype.needsSkipUI=Nt.prototype.needsSkipUI;function K1(e,t,n,r){var i=this;this.u=e,this.l=t,this.j=null,this.G=NaN,this.i=r,this.H=!1,this.B=this.m=this.o=null,this.C="",this.D=[],this.h=new Et,e=new google.ima.dai.api.UiSettings,e.setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.u,e),this.i(new yt("ima-stream-manager-loaded",new Map().set("imaStreamManager",this.g))),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(o){G2(i,o)}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){i.C.length?i.j.resolve(i.C):i.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),i.j=null}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(o){o=o.getAd(),i.m=new Nt(o,i.l),i.B&&(i.m.i=i.B),i.i(new yt("ad-started",new Map().set("ad",i.m))),i.u.setAttribute("ad-active","true")}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){i.u.removeAttribute("ad-active");var o=i.l.currentTime;i.o&&i.o>o&&(i.l.currentTime=i.o,i.o=null)}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(o){i.B=o.getStreamData().adProgressData,i.m&&(i.m.i=i.B)}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){i.i(new yt("ad-first-quartile"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){i.i(new yt("ad-midpoint"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){i.i(new yt("ad-third-quartile"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){i.i(new yt("ad-complete")),i.i(new yt("ad-stopped")),i.u.removeAttribute("ad-active"),i.m=null}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){i.i(new yt("ad-skipped")),i.i(new yt("ad-stopped"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(o){var s=o.getStreamData();o=[],s=d(s.cuepoints);for(var a=s.next();!a.done;a=s.next())a=a.value,o.push({start:a.start,end:a.end});i.D=o,i.i(new yt("ad-cue-points-changed",new Map().set("cuepoints",o)))})}f=K1.prototype,f.configure=function(){},f.stop=function(){this.C="",this.o=null,this.D=[]},f.release=function(){this.stop(),this.h&&this.h.release()},f.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},f.getCuePoints=function(){return this.D};function G2(e,t){e.i(new yt("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.G))),t=t.getStreamData().url,e.j.resolve(t),e.j=null,e.H||e.h.F(e.l,"seeked",function(){var n=e.l.currentTime;if(n!=0){e.g.streamTimeForContentTime(n);var r=e.g.previousCuePointForStreamTime(n);r&&!r.played&&(e.o=n,e.l.currentTime=r.start)}})}function ft(){_n.call(this),this.h=this.i=this.j=this.g=null,this.m=new R1,this.o=navigator.language,this.l=null}P(ft,_n),f=ft.prototype,f.setLocale=function(e){this.o=e},f.configure=function(e){this.l=e,this.g&&this.g.configure(this.l),this.j&&this.j.configure(this.l),this.h&&this.h.configure(this.l)},f.initInterstitial=function(e,t,n){var r=this;this.g&&this.g.release(),this.g=new N1(e,t,n,function(i){return Td(r,i)}),this.g.configure(this.l)},f.initClientSide=function(e,t,n){var r=this;if(!R.google||!google.ima||!google.ima.AdsLoader)throw new fe(2,10,1e4);this.j&&this.j.release(),this.j=new md(e,t,this.o,n,function(i){return Td(r,i)}),this.j.configure(this.l)},f.release=function(){this.g&&(this.g.release(),this.g=null),this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.h&&(this.h.release(),this.h=null),_n.prototype.release.call(this)},f.onAssetUnload=function(){this.g&&this.g.stop(),this.j&&this.j.stop(),this.i&&this.i.stop(),this.h&&this.h.stop(),this.dispatchEvent(new yt("ad-stopped")),this.dispatchEvent(new yt("ad-content-attach-requested")),this.m=new R1},f.requestClientSideAds=function(e){if(!this.j)throw new fe(1,10,10001);var t=this.j;t.g&&t.g.destroy(),t.m&&t.m.contentComplete(),t.H=Date.now()/1e3,t.m.requestAds(e)},f.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new fe(1,10,10001);var t=this.j;t.C=e,t.g&&t.g.updateAdsRenderingSettings(t.C)},f.initMediaTailor=function(e,t,n){var r=this;this.i&&this.i.release(),this.i=new Tc(e,t,n,function(i){return Td(r,i)})},f.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new fe(1,10,10005);var r=this.i;return n=n===void 0?"":n,r.l?e=Promise.reject(new fe(1,10,10004)):(r.l=new zn,B2(r,e,t),r.I=n||"",r.P=Date.now()/1e3,e=r.l),e},f.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new fe(1,10,10005);var t=this.i;t.H=e,t.i(new yt("ads-loaded",new Map().set("loadTime",0)))},f.initServerSide=function(e,t){var n=this;if(!R.google||!google.ima||!google.ima.dai)throw new fe(2,10,10002);this.h&&this.h.release(),this.h=new K1(e,t,this.o,function(r){return Td(n,r)}),this.h.configure(this.l)},f.requestServerSideStream=function(e,t){if(t=t===void 0?"":t,!this.h)throw new fe(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&ut('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.16.24",n=this.h,n.j?e=Promise.reject(new fe(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.H=!0),n.j=new zn,n.g.requestStream(e),n.C=t||"",n.G=Date.now()/1e3,e=n.j),e},f.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new fe(1,10,10003);(e.mpt||e.mpv)&&ut('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.mpt="Shaka Player",e.mpv="v4.16.24",this.h.g.replaceAdTagParameters(e)},f.getServerSideCuePoints=function(){return lt("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},f.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},f.getStats=function(){var e=this.m;return{loadTimes:e.g,averageLoadTime:M2(e),started:e.h,overlayAds:e.j,playedCompletely:e.l,skipped:e.m,errors:e.i}},f.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},f.onDashTimedMetadata=function(e){this.h&&e.schemeIdUri=="urn:google:dai:2018"&&this.h.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime)},f.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},f.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},f.onHLSInterstitialMetadata=function(e,t,n){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&O2(this.g,n))},f.onDASHInterstitialMetadata=function(e,t,n){if(!this.l||!this.l.disableDASHInterstitial){var r=n.schemeIdUri;if(r=="urn:mpeg:dash:event:alternativeMPD:insert:2025"||r=="urn:mpeg:dash:event:alternativeMPD:replace:2025"){if(this.g||this.initInterstitial(null,e,t),this.g&&(e=this.g,t=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025",r=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025",t||r)){for(var i=n.startTime,o=n.endTime,s=null,a=0,u,l=d(n.eventNode.children),h=l.next();!h.done;h=l.next())if(h=h.value,h.tagName=="AlternativeMPD"){if(h=h.attributes.uri){u=h;break}}else if(h.tagName=="InsertPresentation"||h.tagName=="ReplacePresentation"){var g=h.attributes.uri||h.attributes.url;if(g){u=zr(g),(l=At(h,"maxDuration",re))&&(s=l/n.timescale),(l=At(h,"returnOffset",re))&&(a=l/n.timescale),t&&a&&(o=i+a);break}}u&&Sc(e,[{id:n.id,groupId:null,startTime:i,endTime:o,uri:u,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:r?a:null,playoutLimit:s,once:!1,pre:!1,post:!1,timelineRange:t&&!r,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null}])}}else(r=="urn:mpeg:dash:event:2012"||r=="urn:scte:dash:scte214-events")&&n.eventNode&&Pn(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&N2(this.g,n))}},f.addCustomInterstitial=function(e){if(!this.g)throw new fe(1,10,10006);Sc(this.g,[e])},f.addAdUrlInterstitial=function(e){if(!this.g)throw new fe(1,10,10006);return this.g.addAdUrlInterstitial(e)},f.getInterstitialPlayer=function(){if(!this.g)throw new fe(1,10,10006);return this.g.md()};function Td(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.m.g.push(t.loadTime);break;case"ad-started":e.m.h++;var n=t.ad;n&&!n.isLinear()&&e.m.j++;break;case"ad-complete":e.m.l++;break;case"ad-skipped":e.m.m++;break;case"ad-error":e.m.i++}e.dispatchEvent(t)}Re("shaka.ads.AdManager",ft),ft.prototype.getInterstitialPlayer=ft.prototype.getInterstitialPlayer,ft.prototype.addAdUrlInterstitial=ft.prototype.addAdUrlInterstitial,ft.prototype.addCustomInterstitial=ft.prototype.addCustomInterstitial,ft.prototype.onDASHInterstitialMetadata=ft.prototype.onDASHInterstitialMetadata,ft.prototype.onHLSInterstitialMetadata=ft.prototype.onHLSInterstitialMetadata,ft.prototype.onCueMetadataChange=ft.prototype.onCueMetadataChange,ft.prototype.onHlsTimedMetadata=ft.prototype.onHlsTimedMetadata,ft.prototype.onDashTimedMetadata=ft.prototype.onDashTimedMetadata,ft.prototype.onManifestUpdated=ft.prototype.onManifestUpdated,ft.prototype.getStats=ft.prototype.getStats,ft.prototype.getCuePoints=ft.prototype.getCuePoints,ft.prototype.getServerSideCuePoints=ft.prototype.getServerSideCuePoints,ft.prototype.replaceServerSideAdTagParameters=ft.prototype.replaceServerSideAdTagParameters,ft.prototype.requestServerSideStream=ft.prototype.requestServerSideStream,ft.prototype.initServerSide=ft.prototype.initServerSide,ft.prototype.addMediaTailorTrackingUrl=ft.prototype.addMediaTailorTrackingUrl,ft.prototype.requestMediaTailorStream=ft.prototype.requestMediaTailorStream,ft.prototype.initMediaTailor=ft.prototype.initMediaTailor,ft.prototype.updateClientSideAdsRenderingSettings=ft.prototype.updateClientSideAdsRenderingSettings,ft.prototype.requestClientSideAds=ft.prototype.requestClientSideAds,ft.prototype.onAssetUnload=ft.prototype.onAssetUnload,ft.prototype.release=ft.prototype.release,ft.prototype.initClientSide=ft.prototype.initClientSide,ft.prototype.initInterstitial=ft.prototype.initInterstitial,ft.prototype.configure=ft.prototype.configure,ft.prototype.setLocale=ft.prototype.setLocale,ft.ADS_LOADED="ads-loaded",ft.AD_STARTED="ad-started",ft.AD_FIRST_QUARTILE="ad-first-quartile",ft.AD_MIDPOINT="ad-midpoint",ft.AD_THIRD_QUARTILE="ad-third-quartile",ft.AD_COMPLETE="ad-complete",ft.AD_STOPPED="ad-stopped",ft.AD_SKIPPED="ad-skipped",ft.AD_VOLUME_CHANGED="ad-volume-changed",ft.AD_MUTED="ad-muted",ft.AD_PAUSED="ad-paused",ft.AD_RESUMED="ad-resumed",ft.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",ft.CUEPOINTS_CHANGED="ad-cue-points-changed",ft.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",ft.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",ft.AD_CLICKED="ad-clicked",ft.AD_PROGRESS="ad-progress",ft.AD_BUFFERING="ad-buffering",ft.AD_IMPRESSION="ad-impression",ft.AD_DURATION_CHANGED="ad-duration-changed",ft.AD_CLOSED="ad-closed",ft.AD_LOADED="ad-loaded",ft.ALL_ADS_COMPLETED="all-ads-completed",ft.AD_LINEAR_CHANGED="ad-linear-changed",ft.AD_METADATA="ad-metadata",ft.AD_RECOVERABLE_ERROR="ad-recoverable-error",ft.AD_ERROR="ad-error",ft.AD_BREAK_READY="ad-break-ready",ft.AD_INTERACTION="ad-interaction",ft.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",ft.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",ft.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",pd=function(){return new ft};function cg(e){return JSON.stringify(e,function(t,n){if(typeof n!="function"){if(t=n instanceof yt,n instanceof Event||t){var r={};for(o in n){var i=n[o];i&&typeof i=="object"?o=="detail"?r[o]=i:i instanceof Event||i instanceof yt?r[o]={__type__:"Event",event:cg(i)}:t&&Array.isArray(i)&&(r[o]=i):o in Event||(r[o]=i)}return r}if(n instanceof Error){var o=new Set(["name","message","stack"]);for(r in n)o.add(r);for(t=d(Object.getOwnPropertyNames(n)),r=t.next();!r.done;r=t.next())o.add(r.value);for(t={},o=d(o),r=o.next();!r.done;r=o.next())r=r.value,t[r]=n[r];n={__type__:"Error",contents:t}}else if(n instanceof TimeRanges){for(o={__type__:"TimeRanges",length:n.length,start:[],end:[]},n=d(da(n)),t=n.next();!t.done;t=n.next())t=t.value,r=t.end,o.start.push(t.start),o.end.push(r);n=o}else n=ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT===1?{__type__:"Uint8Array",entries:Array.from(n)}:typeof n=="number"?isNaN(n)?"NaN":isFinite(n)?n:n<0?"-Infinity":"Infinity":n;return n}})}function Ed(e){return JSON.parse(e,function(t,n){if(n=="NaN")var r=NaN;else if(n=="-Infinity")r=-1/0;else if(n=="Infinity")r=1/0;else if(n&&typeof n=="object"&&n.__type__=="TimeRanges")r=K2(n);else if(n&&typeof n=="object"&&n.__type__=="Uint8Array")r=new Uint8Array(n.entries);else if(n&&typeof n=="object"&&n.__type__=="Error"){t=n.contents,n=Error(t.message);for(r in t)n[r]=t[r];r=n}else r=n&&typeof n=="object"&&n.__type__=="Event"?Ed(n.event):n;return r})}function K2(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}var W1="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),W2="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),fg=["loop","playbackRate"],z2=["pause","play"],dg=new Map().set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",4).set("getTextLanguagesAndRoles",4).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("isVideoOnly",10).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1).set("getBandwidthEstimate",1).set("isRemotePlayback",1),hg=new Map().set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getChaptersTracks",2).set("getImageTracks",2).set("getVideoTracks",2).set("getTextTracks",2).set("getVariantTracks",2),z1=new Map().set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),$1=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],X1=[["isTextTrackVisible","setTextTrackVisibility"]],$2="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "),X2="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function pg(e,t,n,r,i,o,s){var a=this;this.H=e,this.K=s,this.l=new Yt(t),this.M=n,this.u=!1,this.B=r,this.G=i,this.N=o,this.i=this.m=!1,this.J="",this.o=null,this.C=function(){return gg(a)},this.D=function(u,l){switch(u=Ed(l),u.type){case"event":var h=u.targetName,g=jv(u.event);a.B(h,g);break;case"update":h=u.update;for(g in h){u=a.g[g]||{};for(var m in h[g])u[m]=h[g][m]}a.u&&(a.M(),a.u=!1);break;case"asyncComplete":if(m=u.id,g=u.error,l=u.res,u=a.h.get(m),a.h.delete(m),u)if(g){m=new fe(g.severity,g.category,g.code);for(h in g)m[h]=g[h];u.reject(m)}else u.resolve(l)}},this.g={video:{},player:{}},this.I=0,this.h=new Map,this.j=null,xc.add(this)}f=pg.prototype,f.destroy=function(){return xc.delete(this),mg(this),hs&&J1(this),this.l&&(this.l.stop(),this.l=null),this.G=this.B=null,this.i=this.m=!1,this.D=this.C=this.j=this.h=this.g=this.o=null,Promise.resolve()},f.rb=function(){return this.i},f.ah=function(){return this.J},f.init=function(){if(this.H.length)if(R.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.xb();var e=new chrome.cast.SessionRequest(this.H,[],null,this.K,null);e=new chrome.cast.ApiConfig(e,function(t){for(var n=d(xc),r=n.next();!r.done;r=n.next()){r=r.value;var i=t;r.j=new zn,r.u=!0,xd(r,i)}},function(t){for(var n=d(xc),r=n.next();!r.done;r=n.next())r=r.value,wd=t=="available",r.l.xb()},"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),wd&&this.l.ka(J2),(e=hs)&&e.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new zn,this.u=!0,xd(this,e)):hs=null}else R.__onGCastApiAvailable!==Q1&&(Ad=R.__onGCastApiAvailable||null,R.__onGCastApiAvailable=Q1)},f.oh=function(e){this.o=e,this.i&&Ec(this,{type:"appData",appData:this.o})},f.cast=function(){var e=this;return H(function(t){if(!e.m)throw new fe(1,8,8e3);if(!wd)throw new fe(1,8,8001);if(e.i)throw new fe(1,8,8002);return e.j=new zn,chrome.cast.requestSession(function(n){return xd(e,n)},function(n){return Y1(e,n)}),t.g(e.j,0)})};function Y2(e){e.i&&chrome.cast.requestSession(function(t){return xd(e,t)},function(t){return Y1(e,t)})}f.hd=function(){if(this.i){if(mg(this),hs){J1(this);try{hs.stop(function(){},function(){})}catch{}hs=null}gg(this)}},f.get=function(e,t){var n=this;if(e=="video"){if(z2.includes(t))return function(){return n.Hi.apply(n,[e,t].concat(M(we.apply(0,arguments))))}}else if(e=="player"){if(z1.has(t)&&!this.get("player","isLive")())return function(){};if($2.includes(t))return function(){return n.Hi.apply(n,[e,t].concat(M(we.apply(0,arguments))))};if(X2.includes(t))return function(){return n.Nk.apply(n,[e,t].concat(M(we.apply(0,arguments))))};if(dg.has(t)||hg.has(t))return function(){return n.g[e][t]}}return this.g[e][t]},f.set=function(e,t,n){this.g[e][t]=n,Ec(this,{type:"set",targetName:e,property:t,value:n})};function xd(e,t){var n=e.N();hs=t,t.addUpdateListener(e.C),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.D),gg(e),Ec(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function Y1(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.j.reject(new fe(2,8,n,t))}f.Hi=function(e,t){Ec(this,{type:"call",targetName:e,methodName:t,args:we.apply(2,arguments)})},f.Nk=function(e,t){var n=we.apply(2,arguments),r=new zn,i=this.I.toString();this.I++,this.h.set(i,r);try{Ec(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:i})}catch(o){r.reject(o)}return r};function J1(e){var t=hs;t.removeUpdateListener(e.C),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.D)}function gg(e){var t=hs?hs.status=="connected":!1;if(e.i&&!t){e.G();for(var n in e.g)e.g[n]={};mg(e)}e.i=t,e.J=t?hs.receiver.friendlyName:"",e.l.xb()}function mg(e){if(e.h)for(var t=d(e.h.keys()),n=t.next();!n.done;n=t.next()){n=n.value;var r=e.h.get(n);e.h.delete(n),r.reject(new fe(1,7,7e3))}}function Ec(e,t){t=cg(t);var n=hs;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},Fn)}catch(r){throw t=new fe(2,8,8005,r),n=new yt("error",new Map().set("detail",t)),e.B("player",n),e.hd(),t}}var J2=.02,wd=!1,hs=null,Ad=null,xc=new Set;function Q1(e){if(Ad?R.__onGCastApiAvailable=Ad:delete R.__onGCastApiAvailable,Ad=null,e)for(var t=d(xc),n=t.next();!n.done;n=t.next())n.value.init();typeof R.__onGCastApiAvailable=="function"&&R.__onGCastApiAvailable(e)}function Fr(e,t,n,r){r=r===void 0?!1:r,_n.call(this);var i=this;this.i=e,this.h=t,this.l=this.o=this.m=this.u=this.j=null,this.I=n,this.H=r,this.D=[],this.C=[],this.B=[],this.G=new Map,this.g=null,R.chrome&&ct().Pa()!="CAST"?(this.g=new pg(n,function(){return eS(i)},function(){return tS(i)},function(o,s){return rS(i,o,s)},function(){return nS(i)},function(){return q1(i)},r),Q2(this)):(this.j=this.i,this.u=this.h)}P(Fr,_n),f=Fr.prototype,f.destroy=function(e){return this.g&&(e!==void 0&&e)&&this.g.hd(),this.l&&(this.l.release(),this.l=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.u=this.j=this.i=null,_n.prototype.release.call(this),Promise.all(e)},f.dk=function(){return this.j},f.md=function(){return this.u},f.pj=function(){return this.g?this.g.m&&wd:!1},f.rb=function(){return this.g?this.g.rb():!1},f.ah=function(){return this.g?this.g.ah():""},f.cast=function(){var e=this;return H(function(t){return t.h==1?e.g?t.g(e.g.cast(),2):t.return():e.h?t.g(e.h.xc(),0):t.return()})},f.oh=function(e){this.g&&this.g.oh(e)},f.fl=function(){this.g&&Y2(this.g)},f.hd=function(){this.g&&this.g.hd()},f.qj=function(e,t){t=t===void 0?!1:t;var n=this;return H(function(r){if(r.h==1)return e==n.I&&t==n.H||(n.I=e,n.H=t,!n.g)?r.return():(n.g.hd(),r.g(n.g.destroy(),2));n.g=null,n.g=new pg(e,function(){return eS(n)},function(){return tS(n)},function(i,o){return rS(n,i,o)},function(){return nS(n)},function(){return q1(n)},t),n.g.init(),r.j()})};function Q2(e){e.g.init(),e.l=new Et;for(var t=d(W1),n=t.next();!n.done;n=t.next())e.l.F(e.i,n.value,function(o){e.g.rb()||(o=jv(o),e.m.dispatchEvent(o))});for(var r in df)e.l.F(e.h,df[r],function(o){e.g.rb()||e.o.dispatchEvent(o)});e.j={},t={};for(var i in e.i)t={$d:t.$d},t.$d=i,Object.defineProperty(e.j,t.$d,{configurable:!1,enumerable:!0,get:function(o){return function(){return q2(e,o.$d)}}(t),set:function(o){return function(s){var a=o.$d;e.g.rb()?e.g.set("video",a,s):e.i[a]=s}}(t)});e.u={},Z1(e,function(o){Object.defineProperty(e.u,o,{configurable:!1,enumerable:!0,get:function(){return Id(e,o)}})}),Z2(e),e.m=new _n,e.m.Ce=e.j,e.o=new _n,e.o.Ce=e.u,e.l.F(e.h,"unloading",function(){e.g&&e.g.rb()||vg(e)})}function Z2(e){var t=new Map;Z1(e,function(n,r){t.has(r)?(r=t.get(r),n.length<r.length?e.G.set(n,r):e.G.set(r,n)):t.set(r,n)})}function Z1(e,t){function n(u){return u=="constructor"||typeof r[u]!="function"?!1:!i.has(u)}var r=e.h,i=new Set,o;for(o in r)n(o)&&(i.add(o),t(o,r[o]));for(e=Object.getPrototypeOf(r),o=Object.getPrototypeOf({});e&&e!=o;){for(var s=d(Object.getOwnPropertyNames(e)),a=s.next();!a.done;a=s.next())a=a.value,n(a)&&(i.add(a),t(a,r[a]));e=Object.getPrototypeOf(e)}}function q1(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.jd(),startTime:null,addThumbnailsTrackCalls:e.D,addTextTrackAsyncCalls:e.C,addChaptersTrackCalls:e.B};e.i.pause();for(var n=d(fg),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.i[r];for(e.i.ended||(t.startTime=e.i.currentTime),n=d($1),r=n.next();!r.done;r=n.next()){var i=r.value;r=i[1],i=e.h[i[0]](),t.player[r]=i}for(n=d(X1),r=n.next();!r.done;r=n.next())i=r.value,r=i[1],i=e.h[i[0]](),t.playerAfterLoad[r]=i;return t}function eS(e){var t=new yt("caststatuschanged");e.dispatchEvent(t)}function tS(e){var t=new yt(e.j.paused?"pause":"play");e.m.dispatchEvent(t)}function nS(e){for(var t=d($1),n=t.next();!n.done;n=t.next()){var r=n.value;n=r[1],r=e.g.get("player",r[0])(),e.h[n](r)}var i=e.D,o=e.C,s=e.B;vg(e);var a=e.g.get("player","getAssetUri")();r=e.g.get("video","ended"),t=Promise.resolve();var u=e.i.autoplay;n=null,r||(n=e.g.get("video","currentTime"));var l;(r=e.g.get("player","getTextTracks")())&&r.length&&(l=r.find(function(m){return m.active}));var h=e.g.get("player","isTextTrackVisible")();a&&(e.i.autoplay=!1,t=e.h.load(a,n));var g={};for(n=d(fg),r=n.next();!r.done;r=n.next())r=r.value,g[r]=e.g.get("video",r);t.then(function(){if(e.i){for(var m=d(i),E=m.next();!E.done;E=m.next()){E=E.value;var A;(A=e.md()).Ie.apply(A,M(E))}for(m=d(o),A=m.next();!A.done;A=m.next()){A=A.value;var k;(k=e.md()).Ld.apply(k,M(A))}for(k=d(s),m=k.next();!m.done;m=k.next()){m=m.value;var b;(b=e.md()).He.apply(b,M(m))}for(b=d(fg),k=b.next();!k.done;k=b.next())k=k.value,e.i[k]=g[k];for(b=d(X1),k=b.next();!k.done;k=b.next())m=k.value,k=m[1],m=e.g.get("player",m[0])(),e.h[k](m);e.h.rh(h),l&&e.h.mh(l.language,l.roles,l.forced),e.i.autoplay=u,a&&e.i.play()}},function(m){m=new Map().set("detail",m),m=new yt("error",m),e.h.dispatchEvent(m)})}function q2(e,t){if(t=="addEventListener")return function(r,i,o){return e.m.addEventListener(r,i,o)};if(t=="removeEventListener")return function(r,i,o){return e.m.removeEventListener(r,i,o)};if(e.g.rb()&&Object.keys(e.g.g.video).length==0){var n=e.i[t];if(typeof n!="function")return n}return e.g.rb()?e.g.get("video",t):(t=e.i[t],typeof t=="function"&&(t=t.bind(e.i)),t)}function Id(e,t,n){if(n=n===void 0?!1:n,e.G.has(t)&&(t=e.G.get(t)),t=="addEventListener")return function(r,i,o){return e.o.addEventListener(r,i,o)};if(t=="removeEventListener")return function(r,i,o){return e.o.removeEventListener(r,i,o)};if(t=="getMediaElement")return function(){return e.j};if(t=="getSharedConfiguration")return e.g.get("player","getConfiguration");if(t=="getNetworkingEngine")return function(){return e.h.Rb()};if(t=="getDrmEngine")return function(){return e.h.D};if(t=="getAdManager")return function(){return e.h.$h()};if(t=="getQueueManager")return function(){return e.h.ii()};if(t=="setVideoContainer")return function(r){return e.h.Vi(r)};if(!n){if(t=="addThumbnailsTrack")return function(){var r=we.apply(0,arguments);return e.D.push(r),Id(e,t,!0).apply(null,M(r))};if(t=="addTextTrackAsync")return function(){var r=we.apply(0,arguments);return e.C.push(r),Id(e,t,!0).apply(null,M(r))};if(t=="addChaptersTrack")return function(){var r=we.apply(0,arguments);return e.B.push(r),Id(e,t,!0).apply(null,M(r))}}if(e.g.rb()){if(t=="getManifest"||t=="drmInfo")return function(){return ut(t+"() does not work while casting!"),null};if(t=="attach"||t=="detach")return function(){return ut(t+"() does not work while casting!"),Promise.resolve()};if(t=="getChapters")return function(){return ut(t+"() does not work while casting!"),[]}}return e.g.rb()&&Object.keys(e.g.g.video).length==0&&(dg.has(t)||hg.has(t))||!e.g.rb()?e.h[t].bind(e.h):e.g.get("player",t)}function rS(e,t,n){e.g.rb()&&(t=="video"?e.m.dispatchEvent(n):t=="player"&&(n.type=="unloading"&&vg(e),e.o.dispatchEvent(n)))}function vg(e){e.D=[],e.C=[],e.B=[]}Re("shaka.cast.CastProxy",Fr),Fr.prototype.changeReceiverId=Fr.prototype.qj,Fr.prototype.forceDisconnect=Fr.prototype.hd,Fr.prototype.suggestDisconnect=Fr.prototype.fl,Fr.prototype.setAppData=Fr.prototype.oh,Fr.prototype.cast=Fr.prototype.cast,Fr.prototype.receiverName=Fr.prototype.ah,Fr.prototype.isCasting=Fr.prototype.rb,Fr.prototype.canCast=Fr.prototype.pj,Fr.prototype.getPlayer=Fr.prototype.md,Fr.prototype.getVideo=Fr.prototype.dk,Fr.prototype.destroy=Fr.prototype.destroy;function Ci(e,t,n,r){_n.call(this);var i=this;this.h=e,this.g=t,this.j=new Et,this.I={video:e,player:t},this.G=n||function(){},this.J=r||function(o){return o},this.i=null,this.H=!1,this.o=!0,this.m=0,this.C=!1,this.B=!0,this.u=this.l=null,this.D=new Yt(function(){yg(i)}),eM(this)}P(Ci,_n),f=Ci.prototype,f.isConnected=function(){return this.H},f.kk=function(){return this.o},f.Zk=function(e){this.i=e},f.uj=function(){this.i=null},f.$k=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},f.Yk=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},f.Xk=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},f.destroy=function(){var e=this,t,n;return H(function(r){if(r.h==1)return e.j&&(e.j.release(),e.j=null),t=[],e.g&&(t.push(e.g.destroy()),e.g=null),e.D&&(e.D.stop(),e.D=null),e.h=null,e.I=null,e.G=null,e.H=!1,e.o=!0,e.l=null,e.u=null,_n.prototype.release.call(e),r.g(Promise.all(t),2);n=cast.receiver.CastReceiverManager.getInstance(),n.stop(),r.j()})};function eM(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return iS(e)},t.onSenderDisconnected=function(){return iS(e)},t.onSystemVolumeChanged=function(){var i=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();i&&va(e,{type:"update",update:{video:{volume:i.level,muted:i.muted}}},e.l),va(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.u=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.u.onMessage=function(i){return rM(e,i)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(i){return nM(e,i)},t.start(),t=d(W1);for(var n=t.next();!n.done;n=t.next())e.j.F(e.h,n.value,function(i){return oS(e,"video",i)});for(var r in df)e.j.F(e.g,df[r],function(i){return oS(e,"player",i)});e.j.F(e.h,"loadeddata",function(){e.C=!0}),e.j.F(e.g,"loading",function(){e.o=!1,dl(e)}),e.j.F(e.h,"playing",function(){e.o=!1,dl(e)}),e.j.F(e.h,"pause",function(){dl(e)}),e.j.F(e.g,"unloading",function(){e.o=!0,dl(e)}),e.j.F(e.h,"ended",function(){new Yt(function(){e.h&&e.h.ended&&(e.o=!0,dl(e))}).ka(oM)})}function iS(e){e.m=0,e.B=!0,e.H=cast.receiver.CastReceiverManager.getInstance().getSenders().length!=0,dl(e)}function dl(e){var t;H(function(n){if(n.h==1)return n.g(Promise.resolve(),2);if(!e.g)return n.return();t=new yt("caststatuschanged"),e.dispatchEvent(t),sS(e)||ya(e),n.j()})}function tM(e,t,n){var r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe;H(function(te){switch(te.h){case 1:for(r in t.player)i=t.player[r],e.g[r](i);return e.G(n),o=e.h.autoplay,t.manifest?(e.h.autoplay=!1,te.m(5),te.g(e.g.load(t.manifest,t.startTime),7)):te.g(Promise.resolve(),3);case 7:if(t.addThumbnailsTrackCalls)for(s=d(t.addThumbnailsTrackCalls),a=s.next();!a.done;a=s.next())u=a.value,e.g.Ie.apply(e.g,M(u));if(t.addTextTrackAsyncCalls)for(l=d(t.addTextTrackAsyncCalls),h=l.next();!h.done;h=l.next())g=h.value,e.g.Ld.apply(e.g,M(g));if(t.addChaptersTrackCalls)for(m=d(t.addChaptersTrackCalls),E=m.next();!E.done;E=m.next())A=E.value,e.g.He.apply(e.g,M(A));te.o(3);break;case 5:return k=te.l(),b=new Map().set("detail",k),V=new yt("error",b),e.g&&e.g.dispatchEvent(V),te.return();case 3:if(!e.g)return te.return();for(B in t.video)Z=t.video[B],e.h[B]=Z;for(ue in t.playerAfterLoad)pe=t.playerAfterLoad[ue],e.g[ue](pe);e.h.autoplay=o,t.manifest&&(e.h.play(),ya(e)),te.j()}})}function oS(e,t,n){e.g&&(yg(e),va(e,{type:"event",targetName:t,event:n},e.l))}function yg(e){e.D.ka(iM);for(var t={video:{},player:{}},n=d(W2),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.h[r];e.g.U()&&z1.forEach(function(i,o){e.m%i==0&&(t.player[o]=e.g[o]())}),dg.forEach(function(i,o){e.m%i==0&&(t.player[o]=e.g[o]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),va(e,{type:"update",update:t},e.l),hg.forEach(function(i,o){e.m%i==0&&(i={player:{}},i.player[o]=e.g[o](),va(e,{type:"update",update:i},e.l))}),e.C&&(e.m+=1),sS(e)}function sS(e){return e.B&&(e.h.duration||e.g.U())?(Sg(e),e.B=!1,!0):!1}function Sg(e,t){var n={contentId:e.g.jd(),streamType:e.g.U()?"LIVE":"BUFFERED",contentType:""};e.g.U()||(n.duration=e.h.duration),e.i&&(n.metadata=e.i),ya(e,t===void 0?0:t,n)}function nM(e,t){var n=Ed(t.data);switch(n.type){case"init":e.m=0,e.C=!1,e.B=!0,tM(e,n.initState,n.appData),yg(e);break;case"appData":e.G(n.appData);break;case"set":var r=n.targetName,i=n.property;if(n=n.value,r=="video"){if(t=cast.receiver.CastReceiverManager.getInstance(),i=="volume"){t.setSystemVolumeLevel(n);break}else if(i=="muted"){t.setSystemVolumeMuted(n);break}}e.I[r][i]=n;break;case"call":r=e.I[n.targetName],r[n.methodName].apply(r,n.args);break;case"asyncCall":r=n.targetName,i=n.methodName,r=="player"&&i=="load"&&(e.m=0,e.C=!1);var o=n.id,s=t.senderId;t=e.I[r],n=t[i].apply(t,n.args),r=="player"&&i=="load"&&(n=n.then(function(){e.B=!0})),n.then(function(a){return aS(e,s,o,null,a)},function(a){return aS(e,s,o,a,null)})}}function rM(e,t){var n=Ed(t.data);switch(n.type){case"PLAY":e.h.play(),ya(e);break;case"PAUSE":e.h.pause(),ya(e);break;case"SEEK":t=n.currentTime;var r=n.resumeState;t!=null&&(e.h.currentTime=Number(t)),r&&r=="PLAYBACK_START"?(e.h.play(),ya(e)):r&&r=="PLAYBACK_PAUSE"&&(e.h.pause(),ya(e));break;case"STOP":e.g.xc().then(function(){e.g&&ya(e)});break;case"GET_STATUS":Sg(e,Number(n.requestId));break;case"VOLUME":r=n.volume,t=r.level,r=r.muted;var i=e.h.volume,o=e.h.muted;t!=null&&(e.h.volume=Number(t)),r!=null&&(e.h.muted=r),i==e.h.volume&&o==e.h.muted||ya(e);break;case"LOAD":e.m=0,e.C=!1,e.B=!1,t=n.media,r=n.currentTime,i=e.J(t.contentId),o=n.autoplay||!0,e.G(t.customData),o&&(e.h.autoplay=!0),e.g.load(i,r).then(function(){e.g&&Sg(e)}).catch(function(s){var a="LOAD_FAILED";s.category==7&&s.code==7e3&&(a="LOAD_CANCELLED"),va(e,{requestId:Number(n.requestId),type:a},e.u)});break;default:va(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.u)}}function aS(e,t,n,r,i){e.g&&va(e,{type:"asyncComplete",id:n,error:r,res:i},e.l,t)}function va(e,t,n,r){e.H&&(e=cg(t),r?n.getCastChannel(r).send(e):n.broadcast(e))}function ya(e,t,n){n=n===void 0?null:n;var r={mediaSessionId:0,playbackRate:e.h.playbackRate,playerState:e.o?sM:e.g.Mg()?uM:e.h.paused?lM:aM,currentTime:e.h.currentTime,supportedMediaCommands:63,volume:{level:e.h.volume,muted:e.h.muted}};n&&(r.media=n),va(e,{requestId:t===void 0?0:t,type:"MEDIA_STATUS",status:[r]},e.u)}Re("shaka.cast.CastReceiver",Ci),Ci.prototype.destroy=Ci.prototype.destroy,Ci.prototype.setContentArtist=Ci.prototype.Xk,Ci.prototype.setContentImage=Ci.prototype.Yk,Ci.prototype.setContentTitle=Ci.prototype.$k,Ci.prototype.clearContentMetadata=Ci.prototype.uj,Ci.prototype.setContentMetadata=Ci.prototype.Zk,Ci.prototype.isIdle=Ci.prototype.kk,Ci.prototype.isConnected=Ci.prototype.isConnected;var iM=.5,oM=5,sM="IDLE",aM="PLAYING",uM="BUFFERING",lM="PAUSED";function uS(e,t,n,r,i){if(r>=i)return null;for(var o=-1,s=-1,a=0;a<n.length;a++)if(n[a].some(function(ue){return ue!=null&&ue.g.trim()!=""})){o=a;break}for(a=n.length-1;a>=0;a--)if(n[a].some(function(ue){return ue!=null&&ue.g.trim()!=""})){s=a;break}if(o===-1||s===-1)return null;for(var u=a=!1,l="white",h="black",g=Tg(r,i,a,u,l,h);o<=s;o++){for(var m=n[o],E=-1,A=-1,k=0;k<m.length;k++)if(m[k]!=null&&m[k].g.trim()!==""){E=k;break}for(k=m.length-1;k>=0;k--)if(m[k]!=null&&m[k].g.trim()!==""){A=k;break}if(E===-1||A===-1)m=lS(r,i),e.nestedCues.push(m);else{for(;E<=A;E++)if(k=m[E]){var b=k.l,V=k.i,B=k.j,Z=k.h;(b!=a||V!=u||B!=l||Z!=h)&&(g.payload&&e.nestedCues.push(g),g=Tg(r,i,b,V,B,Z),a=b,u=V,l=B,h=Z),g.payload+=k.g}else g.payload+=" ";g.payload&&e.nestedCues.push(g),o!==s&&(g=lS(r,i),e.nestedCues.push(g)),g=Tg(r,i,a,u,l,h)}}return e.nestedCues.length?{cue:e,stream:t}:null}function Tg(e,t,n,r,i,o){return e=new It(e,t,""),n&&e.textDecoration.push(Is),r&&(e.fontStyle=Pa),e.color=i,e.backgroundColor=o,e}function lS(e,t){return e=new It(e,t,""),e.lineBreak=!0,e}function cS(e,t,n,r,i){this.g=e,this.l=t,this.i=n,this.h=r,this.j=i}function Eg(e,t){this.i=[],this.g=1,this.h=0,this.D=e,this.C=t,this.j=this.m=!1,this.l="white",this.o="black",this.u=this.B=null,wc(this)}function Cd(e,t,n){var r="CC"+((e.D<<1|e.C)+1),i=new It(t,n,"");i.lineInterpretation=1;var o=hS.get(e.g);return o&&(i.line=o),e.u!=null&&e.B!=null&&(i.position=10+Math.min(70,e.u*10)+e.B*2.5),(t=uS(i,r,e.i,t,n))&&e.g+t.cue.nestedCues.length-3>15&&(o=hS.get(e.g+3-t.cue.nestedCues.length))&&(i.line=o),t}function wc(e){Sa(e,0,15),e.g=1}function hl(e,t,n){if(!(n<32||n>127)){var r="";switch(t){case 0:r=dS.has(n)?dS.get(n):String.fromCharCode(n);break;case 1:r=cM.get(n);break;case 2:e.i[e.g].pop(),r=fM.get(n);break;case 3:e.i[e.g].pop(),r=dM.get(n)}r&&e.i[e.g].push(new cS(r,e.m,e.j,e.o,e.l))}}function fS(e,t,n,r){if(!(n<0||t<0))if(t>=n)for(--r;r>=0;r--)e.i[t+r]=e.i[n+r].map(function(o){return o});else for(var i=0;i<r;i++)e.i[t+i]=e.i[n+i].map(function(o){return o})}function Sa(e,t,n){for(var r=0;r<=n;r++)e.i[t+r]=[]}var dS=new Map([[39,"’"],[42,"á"],[92,"é"],[92,"é"],[94,"í"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ñ"],[126,"ñ"],[127,"█"]]),cM=new Map([[48,"®"],[49,"°"],[50,"½"],[51,"¿"],[52,"™"],[53,"¢"],[54,"£"],[55,"♪"],[56,"à"],[57," "],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),fM=new Map([[32,"Á"],[33,"É"],[34,"Ó"],[35,"Ú"],[36,"Ü"],[37,"ü"],[38,"‘"],[39,"¡"],[40,"*"],[41,"'"],[42,"─"],[43,"©"],[44,"℠"],[45,"·"],[46,"“"],[47,"”"],[48,"À"],[49,"Â"],[50,"Ç"],[51,"È"],[52,"Ê"],[53,"Ë"],[54,"ë"],[55,"Î"],[56,"Ï"],[57,"ï"],[58,"Ô"],[59,"Ù"],[60,"ù"],[61,"Û"],[62,"«"],[63,"»"]]),dM=new Map([[32,"Ã"],[33,"ã"],[34,"Í"],[35,"Ì"],[36,"ì"],[37,"Ò"],[38,"ò"],[39,"Õ"],[40,"õ"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"Ä"],[49,"ä"],[50,"Ö"],[51,"ö"],[52,"ß"],[53,"¥"],[54,"¤"],[55,"│"],[56,"Å"],[57,"å"],[58,"Ø"],[59,"ø"],[60,"┌"],[61,"┐"],[62,"└"],[63,"┘"]]),hS=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function Md(e,t){this.h=0,this.o=new Eg(e,t),this.i=new Eg(e,t),this.g=this.j=new Eg(e,t),this.l=0,this.m=null}function xg(e,t,n){e.g=e.i;var r=e.g,i=null;return e.h!==3&&e.h!==4&&(i=Cd(r,e.l,n),n=e.i,n.g=n.h>0?n.h:0,Sa(n,0,15),n=e.j,n.g=n.h>0?n.h:0,Sa(n,0,15),r.g=15),e.h=3,r.h=t,i}function pS(e){e.h=1,e.g=e.j,e.g.h=0}function gS(e){In("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var hM="black green blue cyan red yellow magenta black".split(" "),mS="white green blue cyan red yellow magenta white_italics".split(" ");function wg(e,t){this.J=t,this.N=e,this.K=this.l=!1,this.m=this.o=this.H=this.M=this.I=0,this.G=2,this.i=[],this.g=this.h=this.j=0,this.D=this.B=!1,this.C="white",this.u="black",Ag(this)}function Ag(e){e.i=[];for(var t=0;t<16;t++)e.i.push(Ig())}function Ig(){for(var e=[],t=0;t<42;t++)e.push(null);return e}function Ga(e,t){vS(e)&&(e.i[e.h][e.g]=new cS(t,e.D,e.B,e.u,e.C),e.g++)}function vS(e){var t=e.g<e.m&&e.g>=0;return e.h<e.o&&e.h>=0&&t}wg.prototype.isVisible=function(){return this.l};function pM(e){for(var t=0,n=1;n<16;n++,t++)e.i[t]=e.i[n];for(n=0;n<1;n++,t++)e.i[t]=Ig()}function Iu(e,t,n){var r=new It(e.j,t,"");r.textAlign=e.G===0?"left":e.G===1?"right":Jt;var i=r.region;switch(e.J&&(i.id+="svc"+e.J),i.id+="win"+e.N,i.height=e.o,i.width=e.m,i.heightUnits=2,i.widthUnits=2,i.viewportAnchorX=e.I,i.viewportAnchorY=e.M,i.viewportAnchorUnits=e.K?Vr:2,e.H){case 0:i.regionAnchorX=0,i.regionAnchorY=0;break;case 1:i.regionAnchorX=50,i.regionAnchorY=0;break;case 2:i.regionAnchorX=100,i.regionAnchorY=0;break;case 3:i.regionAnchorX=0,i.regionAnchorY=50;break;case 4:i.regionAnchorX=50,i.regionAnchorY=50;break;case 5:i.regionAnchorX=100,i.regionAnchorY=50;break;case 6:i.regionAnchorX=0,i.regionAnchorY=100;break;case 7:i.regionAnchorX=50,i.regionAnchorY=100;break;case 8:i.regionAnchorX=100,i.regionAnchorY=100}return(n=uS(r,"svc"+n,e.i,e.j,t))&&(e.j=t),n}wg.prototype.display=function(){this.l=!0};function gM(){this.i=[],this.h=null,this.g=0}function mM(e,t){t.type===3?(e.g=(t.value&63)*2-1,e.h=[]):e.h&&(e.g>0&&(e.h.push(t),e.g--),e.g===0&&(e.i.push(new Ac(e.h)),e.h=null,e.g=0))}function Ac(e){this.g=0,this.h=e}Ac.prototype.La=function(){return this.g<this.h.length},Ac.prototype.Qa=function(){return this.g};function Qr(e){if(!e.La())throw new fe(2,2,3e3);return e.h[e.g++]}Ac.prototype.skip=function(e){if(this.g+e>this.h.length)throw new fe(2,2,3e3);this.g+=e},Ac.prototype.Li=function(e){if(this.g-e<0)throw new fe(2,2,3e3);this.g-=e};function vM(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function yM(e,t,n,r){if(!e.g)return[];if(n==24)return n=Qr(t).value,r=Qr(t).value,n=function(o){return o.map(function(s){return("0"+(s&255).toString(16)).slice(-2)}).join("")}([n,r]),Ga(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var i=null;switch(n){case 8:!vS(t)||t.g<=0&&t.h<=0||(t.g<=0?(t.g=t.m-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(i=Iu(t,r,e.i)),t.h+1>=t.o?pM(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(i=Iu(t,r,e.i)),t.i[t.h]=Ig(),t.g=0;break;case 12:t.isVisible()&&(i=Iu(t,r,e.i)),Ag(t),t.h=0,t.g=0}return i?[i]:[]}function SM(e,t,n,r){if(n>=128&&n<=135)r=n&7,e.h[r]&&(e.g=e.h[r]);else{if(n===136){n=Qr(t).value,t=[],n=d(Ic(e,n));for(var i=n.next();!i.done;i=n.next()){if(i=e.h[i.value],i.isVisible()){var o=Iu(i,r,e.i);o&&t.push(o)}Ag(i)}return t}if(n===137)for(t=Qr(t).value,t=d(Ic(e,t)),n=t.next();!n.done;n=t.next())n=e.h[n.value],n.isVisible()||(n.j=r),n.display();else{if(n===138){for(n=Qr(t).value,t=null,n=d(Ic(e,n)),i=n.next();!i.done;i=n.next())i=e.h[i.value],i.isVisible()&&(t=Iu(i,r,e.i)),i.l=!1;return t?[t]:[]}if(n===139){for(n=Qr(t).value,t=null,n=d(Ic(e,n)),i=n.next();!i.done;i=n.next())i=e.h[i.value],i.isVisible()?t=Iu(i,r,e.i):i.j=r,i.l=!i.l;return t?[t]:[]}if(n===140)return t=Qr(t).value,yS(e,t,r);if(n===143)return r=yS(e,255,r),SS(e),r;if(n===144)t.skip(1),r=Qr(t).value,e.g&&(e.g.B=(r&128)>0,e.g.D=(r&64)>0);else if(n===145)r=Qr(t).value,n=Qr(t).value,t.skip(1),e.g&&(t=TS((n&48)>>4,(n&12)>>2,n&3),e.g.C=TS((r&48)>>4,(r&12)>>2,r&3),e.g.u=t);else if(n===146)r=Qr(t).value,t=Qr(t).value,e.g&&(e=e.g,e.h=r&15,e.g=t&63);else if(n===151)t.skip(1),t.skip(1),r=Qr(t).value,t.skip(1),e.g&&(e.g.G=r&3);else if(n>=152&&n<=159){n=(n&15)-8,i=e.h[n]!==null,i||(o=new wg(n,e.i),o.j=r,e.h[n]=o),r=Qr(t).value,o=Qr(t).value;var s=Qr(t).value,a=Qr(t).value,u=Qr(t).value;t=Qr(t).value,i&&!(t&7)||(t=e.h[n],t.h=0,t.g=0,t.D=!1,t.B=!1,t.C="white",t.u="black"),t=e.h[n],t.l=(r&32)>0,t.M=o&127,t.I=s,t.H=(a&240)>>4,t.K=(o&128)>0,t.o=(a&15)+1,t.m=(u&63)+1,e.g=e.h[n]}}}return[]}function Ic(e,t){for(var n=[],r=0;r<8;r++)(t&1)===1&&e.h[r]&&n.push(r),t>>=1;return n}function yS(e,t,n){var r=[];t=d(Ic(e,t));for(var i=t.next();!i.done;i=t.next()){i=i.value;var o=e.h[i];o.isVisible()&&(o=Iu(o,n,e.i))&&r.push(o),e.h[i]=null}return r}function SS(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function TS(e,t,n){var r={0:0,1:0,2:1,3:1};return e=r[e],t=r[t],n=r[n],TM[e<<2|t<<1|n]}var ES=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,"‘"],[50,"’"],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),TM="black blue green cyan red magenta yellow white".split(" ");function pl(){this.h=[],this.g=[],this.i=new gM,this.l=0,this.m=new Map([["CC1",new Md(0,0)],["CC2",new Md(0,1)],["CC3",new Md(1,0)],["CC4",new Md(1,1)]]),this.u=this.o=0,this.j=new Map,this.C=!0,this.B=new Set,Cg(this)}pl.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,Cg(this),e=d(this.j.values());for(var t=e.next();!t.done;t=e.next())SS(t.value)};function Cg(e){e.o=0,e.u=0;for(var t=d(e.m.values()),n=t.next();!n.done;n=t.next())n=n.value,n.h=0,n.g=n.j,n.m=null,wc(n.i),wc(n.j),wc(n.o);e.C=!0}pl.prototype.extract=function(e,t){if(this.C){for(var n=d(this.m.values()),r=n.next();!r.done;r=n.next())r.value.l=t;this.C=!1}if(e=new cr(e,0),!(e.getLength()<8)&&e.Z()===181&&e.Da()===49&&e.W()===1195456820&&e.Z()===3&&(n=e.Z(),(n&64)!==0))for(n&=31,e.skip(1),r=0;r<n;r++){var i=e.Z(),o=(i&4)>>2,s=e.Z(),a=e.Z();o&&(i&=3,i===0||i===1?this.h.push({pts:t,type:i,zb:s,ec:a,order:this.h.length}):(this.g.push({pts:t,type:i,value:s,order:this.g.length}),this.g.push({pts:t,type:2,value:a,order:this.g.length})))}},pl.prototype.decode=function(){function e(i,o){return i.pts-o.pts||i.order-o.order}var t=[];this.h.sort(e),this.g.sort(e);for(var n=d(this.h),r=n.next();!r.done;r=n.next())(r=EM(this,r.value))&&t.push(r);for(n=d(this.g),r=n.next();!r.done;r=n.next())mM(this.i,r.value);for(n=d(this.i.i),r=n.next();!r.done;r=n.next())r=xM(this,r.value),t.push.apply(t,M(r));return this.i.i=[],this.h=[],this.g=[],t};function EM(e,t){var n=t.type;if((t.zb&112)===16){var r=t.zb>>3&1;n===0?e.o=r:e.u=r}if(r="CC"+((n<<1|(n?e.u:e.o))+1),n=e.m.get(r),t.zb===255&&t.ec===255||!t.zb&&!t.ec||!xS(t.zb)||!xS(t.ec))return++e.l>=45&&Cg(e),null;e.l=0,t.zb&=127,t.ec&=127;var i=t.zb;if(i>=1&&i<=15||!t.zb&&!t.ec)return null;if(i=null,(t.zb&112)===16)e:{if(e.B.add(r),r=t.zb,e=t.ec,n.m===(r<<8|e))n.m=null;else if(n.m=r<<8|e,(r&240)===16&&(e&192)===64){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(r&7)<<1|e>>5&1],r="white",i=!1;var o=null,s=e>95?e-96:e-64;s<=13?r=mS[Math.floor(s/2)]:s<=15?i=!0:o=Math.floor((s-16)/2),e=(e&1)===1,n.h!==4&&(s=n.g,n.h===3&&t!==s.g&&(n=1+t-s.h,fS(s,n,1+s.g-s.h,s.h),Sa(s,0,n-1),Sa(s,t+1,15-t)),s.g=t,s.m=e,s.j=i,s.l=r,s.u=o,s.o="black")}else if((r&247)===17&&(e&240)===32)n.g.m=!1,n.g.j=!1,n.g.l="white",hl(n.g,0,32),r=!1,t=mS[(e&14)>>1],t==="white_italics"&&(t="white",r=!0),n.g.m=(e&1)===1,n.g.j=r,n.g.l=t;else if((r&247)===16&&(e&240)===32||(r&247)===23&&(e&255)===45)t="black",!(r&7)&&(t=hM[(e&14)>>1]),n.g.o=t;else if((r&247)===17&&(e&240)===48)hl(n.g,1,e);else if((r&246)===18&&(e&224)===32)hl(n.g,r&1?3:2,e);else{if((r&246)===20&&(e&240)===32){switch(e=t.pts,r=null,t.ec){case 32:pS(n);break;case 33:n=n.g,n.i[n.g].pop();break;case 37:r=xg(n,2,e);break;case 38:r=xg(n,3,e);break;case 39:r=xg(n,4,e);break;case 40:hl(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:wc(n.o),gS(n);break;case 43:gS(n);break;case 44:t=n.i,r=null,n.h!==4&&(r=Cd(t,n.l,e)),Sa(t,0,15);break;case 45:t=n.g,n.h!==3?r=null:(r=Cd(t,n.l,e),i=t.g-t.h+1,fS(t,i-1,i,t.h),Sa(t,0,i-1),Sa(t,t.g,15-t.g),n.l=e);break;case 46:Sa(n.j,0,15);break;case 47:t=null,n.h!==4&&(t=Cd(n.i,n.l,e)),r=n.j,n.j=n.i,n.i=r,pS(n),n.l=e,r=t}i=r;break e}(r==23||r==31)&&e>=33&&e<=35&&(n.g.B=e-32)}i=null}else e=t.ec,hl(n.g,0,t.zb),hl(n.g,0,e);return i}function xM(e,t){var n=[];try{for(;t.La();){var r=Qr(t).value,i=(r&224)>>5,o=r&31;if(i===7&&o!=0&&(i=Qr(t).value&63),i!=0){e.B.add("svc"+i),e.j.has(i)||e.j.set(i,new vM(i));for(var s=e.j.get(i),a=t.Qa();t.Qa()-a<o;){i=s;var u=t,l=Qr(u),h=l.value,g=l.pts;if(h===16){var m=Qr(u);h=h<<16|m.value}if(h>=0&&h<=31)var E=yM(i,u,h,g);else if(h>=128&&h<=159)E=SM(i,u,h,g);else{if(h>=4096&&h<=4127)i=u,u=h&255,u>=8&&u<=15?i.skip(1):u>=16&&u<=23?i.skip(2):u>=24&&u<=31&&i.skip(3);else if(h>=4224&&h<=4255)i=u,u=h&255,u>=128&&u<=135?i.skip(4):u>=136&&u<=143&&i.skip(5);else if(h>=32&&h<=127)u=h,i.g&&(u===127?Ga(i.g,"♪"):Ga(i.g,String.fromCharCode(u)));else if(h>=160&&h<=255)i.g&&Ga(i.g,String.fromCharCode(h));else if(h>=4128&&h<=4223){if(u=h&255,i.g)if(ES.has(u)){var A=ES.get(u);Ga(i.g,A)}else Ga(i.g,"_")}else h>=4256&&h<=4351&&i.g&&((h&255)!=160?Ga(i.g,"_"):Ga(i.g,"[CC]"));E=[]}n.push.apply(n,M(E))}}}}catch(k){if(k instanceof fe&&k.code===3e3)In("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw k}return n}function xS(e){for(var t=0;e;)t^=e&1,e>>=1;return t===1}pl.prototype.getStreams=function(){return Array.from(this.B)},Re("shaka.cea.CeaDecoder",pl),Vn=function(){return new pl};function wS(e){for(var t=[],n=e,r=e=0;r<n.length;)e==2&&n[r]==3?(e=0,n=[].concat(M(n)),n.splice(r,1),n=new Uint8Array(n)):n[r]==0?e++:e=0,r++;for(e=n,r=0;r<e.length;){for(n=0;e[r]==255;)n+=255,r++;n+=e[r++];for(var i=0;e[r]==255;)i+=255,r++;i+=e[r++],n==4&&t.push(e.subarray(r,r+i)),r+=i}return t}function Pd(){this.j=new Map,this.i=this.h=0,this.g=Mg}Pd.prototype.init=function(e){function t(o){o=o.name,kd.has(o)&&(n.g=kd.get(o))}var n=this,r=[],i=[];if(new Hn().box("moov",Wt).box("mvex",Wt).S("trex",function(o){var s=o.reader;s.skip(4),s.skip(4),o=s.W(),s=s.W(),n.h=o,n.i=s}).box("trak",Wt).S("tkhd",function(o){var s=o.reader;o=o.version,o==1?(s.skip(8),s.skip(8)):(s.skip(4),s.skip(4));var a=s.W();o==1?s.skip(8):s.skip(4),s.skip(4),s.skip(8),s.skip(2),s.skip(2),s.skip(2),s.skip(2),s.skip(36),s.Da(),s.Da(),s.Da(),s.Da(),r.push(a)}).box("mdia",Wt).S("mdhd",function(o){o=Ef(o.reader,o.version),i.push(o.timescale)}).box("minf",Wt).box("stbl",Wt).S("stsd",ca).box("avc1",t).box("avc3",t).box("dvav",t).box("dva1",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("vvc1",t).box("vvi1",t).box("dvc1",t).box("dvi1",t).box("encv",fo).box("sinf",Wt).box("frma",function(o){o=Yh(o.reader).codec,kd.has(o)&&(n.g=kd.get(o))}).parse(e,!0,!0),!r.length||!i.length||r.length!=i.length)throw new fe(2,2,2010);this.g==Mg&&ut("Unable to determine bitstream format for CEA parsing!"),r.forEach(function(o,s){n.j.set(o,i[s])})},Pd.prototype.parse=function(e){var t=this;if(this.g==Mg)return[];var n=[],r=0,i=[];return new Hn().box("moof",function(o){r=o.start,i=[],Wt(o)}).box("traf",function(o){i.push({baseMediaDecodeTime:null,Qd:t.h,Rd:t.i,Di:[],timescale:9e4}),Wt(o)}).S("trun",function(o){var s=i[i.length-1];o=xf(o.reader,o.version,o.flags),s.Di.push(o)}).S("tfhd",function(o){var s=i[i.length-1];o=Sf(o.reader,o.flags),s.Qd=o.Qd||t.h,s.Rd=o.Rd||t.i,o=o.trackId,t.j.has(o)&&(s.timescale=t.j.get(o))}).S("tfdt",function(o){var s=i[i.length-1];o=Tf(o.reader,o.version),s.baseMediaDecodeTime=o.baseMediaDecodeTime}).box("mdat",function(o){for(var s=r-o.start-8,a=o.reader.Qa(),u=d(i),l=u.next();!l.done;l=u.next())l=l.value,l.baseMediaDecodeTime===null?ut("Unable to find base media decode time for CEA captions!"):(o.reader.seek(a),wM(t,o.reader,l.baseMediaDecodeTime,l.timescale,l.Qd,l.Rd,s,l.Di,n))}).parse(e,!1,!0),n};function wM(e,t,n,r,i,o,s,a,u){var l=0,h=o,g=a.map(function(A){return A.jh});for(g=[].concat.apply([],M(g)),g.length&&(h=g[0].sampleSize||o),t.skip(s+a[0].kg);t.La();){s=t.W();var m=t.Z(),E=null;switch(E=!1,a=1,e.g){case Cc:E=m&31,E=E==6;break;case Mc:a=2,t.skip(1),E=m>>1&63,E=E==39||E==40;break;case Pc:a=2,t.skip(1),E=m>>1&63,E=E==23||E==24;break;default:return}if(E)for(m=0,l<g.length&&(m=g[l].Bf||0),m=(n+m)/r,a=t.Mb(s-a,!1),a=d(wS(a)),E=a.next();!E.done;E=a.next())u.push({packet:E.value,pts:m});else try{t.skip(s-a)}catch{break}h-=s+4,h==0&&(n=l<g.length?n+(g[l].kh||i):n+i,l++,l<g.length?h=g[l].sampleSize||o:h=o)}}Re("shaka.cea.Mp4CeaParser",Pd);var Mg=0,Cc=1,Mc=2,Pc=3,kd=new Map().set("avc1",Cc).set("avc3",Cc).set("dvav",Cc).set("dva1",Cc).set("hev1",Mc).set("hvc1",Mc).set("dvh1",Mc).set("dvhe",Mc).set("vvc1",Pc).set("vvi1",Pc).set("dvc1",Pc).set("dvi1",Pc);nu("video/mp4",function(){return new Pd});function Rd(){this.g=null}Rd.prototype.init=function(){},Rd.prototype.parse=function(e){this.g?this.g.clearData():this.g=new er;var t=[];if(e=wt(e),!Ju(e))return t;e=this.g.parse(e);var n=e.Sd(),r=e.Ye();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(n=d(r),r=n.next();!r.done;r=n.next())if(r=r.value,e.includes(r.type)&&r.time!=null)for(var i=d(wS(r.data)),o=i.next();!o.done;o=i.next())t.push({packet:o.value,pts:r.time});return t},Re("shaka.cea.TsCeaParser",Rd),nu("video/mp2t",function(){return new Rd});function AM(e){var t=0,n=gr(e),r=n.getUint32(t,!0);if(r!=e.byteLength)return[];e:{for(e=t+4+2,t=[];e<n.byteLength-1;){r=n.getUint16(e,!0),e+=2;var i=n.getUint16(e,!0);if(e+=2,i&1||i+e>n.byteLength){n=[];break e}var o=wt(n,e,i);t.push({type:r,value:o}),e+=i}n=t}return n}function AS(e){return e=bi(vr(e)),e=AM(e).filter(function(t){return t.type===IM})[0],e?(e=Zi(e.value,!0),(e=As(e,"WRMHEADER"))?e:null):null}function bd(e){try{var t=AS(e);if(t)e:{for(var n=d(di(t,"DATA")),r=n.next();!r.done;r=n.next()){var i=r.value;if(i.children)for(var o=d(i.children),s=o.next();!s.done;s=o.next()){var a=s.value;if(a.tagName=="LA_URL"){var u=vr(a);break e}}}u=""}else u="";return u}catch{return""}}var IM=1;function IS(){this.g=new Map}IS.prototype.release=function(){this.g.clear()};function CS(e,t,n,r){var i=PM(e,t),o=null;e=[];var s=[];t=null;var a=new Set(i.map(function(l){return l.keyId}));a.delete(null);var u="cenc";if(a.size>1)throw new fe(2,4,4010);if(!n){if(s=i.filter(function(l){return l.Cd=="urn:mpeg:dash:sea:2012"}),s.length>1)throw new fe(2,4,4050);s.length&&(t=RM(s[0])),(s=i.find(function(l){return l.Cd=="urn:mpeg:dash:mp4protection:2011"}))&&s.encryptionScheme&&(u=s.encryptionScheme),s=i.filter(function(l){return l.Cd=="urn:mpeg:dash:mp4protection:2011"?(o=l.init||o,!1):l.Cd!="urn:mpeg:dash:sea:2012"}),s.length&&(e=MM(o,u,s,r,a),e.length==0&&(e=[Io("",u,o)]))}if(i.length&&!t&&(n||!s.length))for(e=[],n=d(Object.values(r)),r=n.next();!r.done;r=n.next())r=r.value,r!="org.w3.clearkey"&&(r=Io(r,u,o),e.push(r));if(a=Array.from(a)[0]||null)for(u=d(e),n=u.next();!n.done;n=u.next())for(n=d(n.value.initData),r=n.next();!r.done;r=n.next())r.value.keyId=a;return{Uh:a,Cm:o,drmInfos:e,ag:t,Zh:!0}}function CM(e,t,n,r,i){var o=CS(e,t,r,i);if(n.Zh)e=n.drmInfos.length==1&&!n.drmInfos[0].keySystem,t=o.drmInfos.length==0,(n.drmInfos.length==0||e&&!t)&&(n.drmInfos=o.drmInfos),n.Zh=!1;else if(o.drmInfos.length>0&&(n.drmInfos=n.drmInfos.filter(function(s){return o.drmInfos.some(function(a){return a.keySystem==s.keySystem})}),n.drmInfos.length==0))throw new fe(2,4,4008);return o.Uh||n.Uh}function Dd(e){var t=Oi(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=vr(t)))return t;if((t=Oi(e.node,"urn:microsoft:playready","pro"))&&vr(t))return bd(t);if((e=Oi(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=vr(e))){t=bi(e),e=8,t=gr(t);var n=t.getUint8(e);return e+=20,n>0&&(e+=4+16*t.getUint32(e)),e=wt(t,e+4),e=Uo(e),e=As("<pro>"+e+"</pro>"),bd(e)}return""}function MM(e,t,n,r,i){var o=[];n=d(n);for(var s=n.next();!s.done;s=n.next()){s=s.value;var a=r[s.Cd];if(a){var u;if((u=Oi(s.node,"urn:microsoft:playready","pro"))&&vr(u)){u=vr(u),u=bi(u);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);u=[{initData:vf(u,l,new Set,0),initDataType:"cenc",keyId:s.keyId}]}else u=null;if(l=null,s.Cd==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){l=s;var h=i;if(h.size==0)l=null;else{var g=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]),m=new Uint8Array([]);l=[{initData:vf(m,g,h,1),initDataType:"cenc",keyId:l.keyId}]}}u=Io(a,t,s.init||e||u||l),(a=bM.get(a))&&(u.licenseServerUri=a(s));e:{if((s=Oi(s.node,"https://dashif.org/CPS","Certurl"))&&(s=vr(s)))break e;s=""}u.serverCertificateUri=s,o.push(u)}}return o}function PM(e,t){var n=[];t=d(t);for(var r=t.next();!r.done;r=t.next())(r=kM(e,r.value))&&n.push(r);return n}function kM(e,t){var n=t.attributes.schemeIdUri,r=Co(t,"urn:mpeg:cenc:2013","default_KID"),i=iu(t,"urn:mpeg:cenc:2013","pssh").map(_r),o=t.attributes.value;if(!n)return null;if(n=n.toLowerCase(),r&&(r=r.replace(/-/g,"").toLowerCase(),r.includes(" ")))throw new fe(2,4,4009);var s=[];try{s=i.map(function(a){if(!e.g.has(a)){var u=bi(a);e.g.set(a,u)}return{initDataType:"cenc",initData:e.g.get(a),keyId:null}})}catch{throw new fe(2,4,4007)}return{node:t,Cd:n,keyId:r,init:s.length>0?s:null,encryptionScheme:o}}function RM(e){if(!R.crypto||!R.crypto.subtle)throw ut("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new fe(2,4,4042);var t=Oi(e.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!t)throw new fe(2,4,4051);if(t.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new fe(2,4,4051);if(t=Oi(e.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"),!t)throw new fe(2,4,4051);if(e=t.attributes.IV,t=zr(t.attributes.keyUriTemplate),!e||!t)throw new fe(2,4,4051);if(e=os(e.substr(2)),e.byteLength!=16)throw new fe(2,4,4048);return{rk:t,iv:e}}var bM=new Map().set("com.apple.fps",function(e){if(R.shakaMediaKeysPolyfill==="apple")throw new fe(2,4,4054);return(e=Oi(e.node,"https://dashif.org/CPS","Laurl"))&&(e=vr(e))?e:""}).set("com.widevine.alpha",function(e){var t=Oi(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=vr(t))?t:(e=Oi(e.node,"urn:microsoft","laurl"))&&zr(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",Dd).set("com.microsoft.playready.recommendation",Dd).set("com.microsoft.playready.software",Dd).set("com.microsoft.playready.hardware",Dd).set("org.w3.clearkey",function(e){var t=Oi(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=vr(t))?t:(e=Oi(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&e.attributes.Lic_type==="EME-1.0"&&e&&(e=vr(e))?e:""});function kc(e,t,n,r,i,o){var s=new Map().set("RepresentationID",t).set("Number",n).set("SubNumber",r).set("Bandwidth",i).set("Time",o);return e.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(a,u,l,h){if(a=="$$")return"$";var g=s.get(u);if(g==null)return a;switch(u=="RepresentationID"&&l&&(l=void 0),u=="Time"&&typeof g!="bigint"&&(Math.abs(g-Math.round(g))>=.2&&ut("Calculated $Time$ values must be close to integers"),g=Math.round(g)),h){case void 0:case"d":case"i":case"u":a=g.toString();break;case"o":a=g.toString(8);break;case"x":a=g.toString(16);break;case"X":a=g.toString(16).toUpperCase();break;default:a=g.toString()}return l=R.parseInt(l,10)||1,Array(Math.max(0,l-a.length)+1).join("0")+a})}function MS(e,t){var n=ps(e,t,"timescale"),r=1;n&&(r=ge(n)||1),n=ps(e,t,"duration");var i=(n=ge(n||""))?n/r:null,o=ps(e,t,"startNumber"),s=Number(ps(e,t,"presentationTimeOffset"))||0,a=je(o||"");if((o==null||a==null)&&(a=1),o=null,t=gl(e,t,"SegmentTimeline")){t=Mn(t,"S"),o=r,e=e.na.duration||1/0;for(var u=a,l=[],h=-s,g=0;g<t.length;++g){var m=t[g],E=t[g+1],A=At(m,"t",je),k=At(m,"d",je),b=At(m,"r",re);if(m=At(m,"k",re)||0,A!=null&&(A-=s),k){if(A=A??h,b=b||0,b<0)if(E){if(E=At(E,"t",je),E==null)break;if(A>=E)break;b=Math.ceil((E-A)/k)-1}else{if(e==1/0)break;if(A/o>=e)break;b=Math.ceil((e*o-A)/k)-1}for(l.length>0&&A!=h&&(l[l.length-1].end=A/o),E=0;E<=b;++E)h=A+k,l.push({start:A/o,Gd:A,end:h/o,Fh:h,qc:m,Tk:l.length+u}),A=h}}o=l}return{timescale:r,Lf:n,gb:i,me:a,ac:s/r||0,Yc:s,timeline:o}}function PS(e,t){return[t(e.L),t(e.qa),t(e.va)].filter(cs)}function ps(e,t,n){t=PS(e,t),e=null,t=d(t);for(var r=t.next();!r.done&&!(e=r.value.attributes[n]);r=t.next());return e}function gl(e,t,n){t=PS(e,t),e=null,t=d(t);for(var r=t.next();!r.done&&!(e=Pn(r.value,n));r=t.next());return e}function DM(e,t,n,r,i,o){for(var s=Co(e,"http://www.w3.org/1999/xlink","href"),a=Co(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",u=d(Object.keys(e.attributes)),l=u.next();!l.done;l=u.next()){l=l.value;var h=l.split(":"),g=ra("http://www.w3.org/1999/xlink");h[0]==g&&delete e.attributes[l]}if(o>=5)return Da(new fe(2,4,4028));if(a!="onLoad")return Da(new fe(2,4,4027));var m=Rr([r],[s]);return i.request(0,jr(m,t)).Xa(function(E){if(E=na(E.data,e.tagName),!E)return Da(new fe(2,4,4001,s));for(e.children=[];E.children.length;){var A=E.children.shift();e.children.push(A)}A=d(Object.keys(E.attributes));for(var k=A.next();!k.done;k=A.next())k=k.value,e.attributes[k]=E.attributes[k];return Od(e,t,n,m[0],i,o+1)})}function Od(e,t,n,r,i,o){if(o=o===void 0?0:o,Co(e,"http://www.w3.org/1999/xlink","href")){var s=DM(e,t,n,r,i,o);return n&&(s=s.Xa(void 0,function(){return Od(e,t,n,r,i,o)})),s}s=[];for(var a=d(bu(e)),u=a.next(),l={};!u.done;l={Nd:void 0},u=a.next())l.Nd=u.value,Co(l.Nd,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?e.children=e.children.filter(function(h){return function(g){return g!==h.Nd}}(l)):l.Nd.tagName!="SegmentTimeline"&&s.push(Od(l.Nd,t,n,r,i,o));return Lv(s).Xa(function(){return e})}function OM(e,t,n,r,i,o,s,a){var u,l=new Hn().S("sidx",function(h){u=NM(t,r,i,o,s,n,h,a)});if(e&&l.parse(e),u)return u;throw new fe(2,3,3004)}function NM(e,t,n,r,i,o,s,a){a=a===void 0?!1:a;var u=[];s.reader.skip(4);var l=s.reader.W();if(l==0)throw new fe(2,3,3005);if(s.version==0)var h=s.reader.W(),g=s.reader.W();else h=s.reader.yd(),g=s.reader.yd();s.reader.skip(2);var m=s.reader.Da();for(e=(a?-s.size:e)+s.size+g,a=0;a<m;a++){var E=s.reader.W();g=(E&2147483648)>>>31,E&=2147483647;var A=s.reader.W();if(s.reader.skip(4),g==1)throw new fe(2,3,3006);u.push(new Rt(h/l+n,(h+A)/l+n,function(){return o},e,e+E-1,t,n,r,i)),h+=A,e+=E}return s.parser.stop(),u}function Ka(e){this.h=gr(e),this.g=new cr(this.h,0)}Ka.prototype.La=function(){return this.g.La()};function Ta(e){var t=kS(e);if(t.length>7)throw new fe(2,3,3002);var n=0;t=d(t);for(var r=t.next();!r.done;r=t.next())n=256*n+r.value;t=kS(e);e:{r=d(LM);for(var i=r.next();!i.done;i=r.next())if(Pr(t,new Uint8Array(i.value))){r=!0;break e}r=!1}if(r)t=e.h.byteLength-e.g.Qa();else{if(t.length==8&&t[1]&224)throw new fe(2,3,3001);for(i=r=0;i<t.length;i++){var o=t[i];r=i==0?o&(1<<8-t.length)-1:256*r+o}t=r}return t=e.g.Qa()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Qa(),r=gr(e.h,e.g.Qa(),t),e.g.skip(t),new jM(n,r)}function kS(e){var t=e.g.Qa(),n=e.g.Z();if(n==0)throw new fe(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),wt(e.h,t,n)}var LM=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function jM(e,t){this.id=e,this.g=t}function Pg(e){if(e.g.byteLength>8)throw new fe(2,3,3002);if(e.g.byteLength==8&&e.g.getUint8(0)&224)throw new fe(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++){var r=e.g.getUint8(n);t=256*t+r}return t}function FM(e,t,n,r,i,o,s){if(t=new Ka(t),Ta(t).id!=440786851)throw new fe(2,3,3008);var a=Ta(t);if(a.id!=408125543)throw new fe(2,3,3009);t=a.g.byteOffset,a=new Ka(a.g);for(var u=null;a.La();){var l=Ta(a);if(l.id==357149030){u=l;break}}if(!u)throw new fe(2,3,3010);for(u=new Ka(u.g),l=1e6,a=null;u.La();){var h=Ta(u);if(h.id==2807729)l=Pg(h);else if(h.id==17545)if(h.g.byteLength==4)a=h.g.getFloat32(0);else if(h.g.byteLength==8)a=h.g.getFloat64(0);else throw new fe(2,3,3003)}if(a==null)throw new fe(2,3,3011);if(u=l/1e9,a*=u,e=Ta(new Ka(e)),e.id!=475249515)throw new fe(2,3,3007);return UM(e,t,u,a,n,r,i,o,s)}function UM(e,t,n,r,i,o,s,a,u){function l(){return i}var h=[];e=new Ka(e.g);for(var g=null,m=null;e.La();){var E=Ta(e);if(E.id==187){var A=BM(E);A&&(E=n*A.kl,A=t+A.Lk,g!=null&&h.push(new Rt(g+s,E+s,l,m,A-1,o,s,a,u)),g=E,m=A)}}return g!=null&&h.push(new Rt(g+s,r+s,l,m,null,o,s,a,u)),h}function BM(e){var t=new Ka(e.g);if(e=Ta(t),e.id!=179)throw new fe(2,3,3013);if(e=Pg(e),t=Ta(t),t.id!=183)throw new fe(2,3,3012);t=new Ka(t.g);for(var n=0;t.La();){var r=Ta(t);if(r.id==241){n=Pg(r);break}}return{kl:e,Lk:n}}function RS(e,t,n){if(t=gl(e,t,"Initialization"),!t)return null;var r=e.L.bb(),i=t.attributes.sourceURL;i&&(r=Rr(r,[zr(i)],e.Fb())),i=0;var o=null;return(t=At(t,"range",D))&&(i=t.start,o=t.end),n=new qi(function(){return r},i,o,NS(e),null,null,n,e.qa.encrypted),n.codecs=e.L.codecs,n.mimeType=e.L.mimeType,e.na&&!e.na.ef&&(n.g=e.na.start+e.na.duration),n}function VM(e,t,n){var r=Number(ps(e,ml,"presentationTimeOffset"))||0,i=ps(e,ml,"timescale"),o=1;i&&(o=ge(i)||1);var s=r/o||0,a=RS(e,ml,n);_M(e,a);var u=_o(e);return{endTime:-1,timeline:-1,Mc:function(){var l=gl(u,ml,"RepresentationIndex"),h=u.L.bb();return l&&(l=zr(l.attributes.sourceURL))&&(h=Rr(h,[l],u.Fb())),l=DS(u),bS(u,t,a,h,l.start,l.end,s)},timescale:o}}function bS(e,t,n,r,i,o,s){var a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce;return H(function(Ee){if(Ee.h==1)return a=e.presentationTimeline,u=!e.pb||!e.na.ef,l=e.na.start,h=e.na.duration,g=e.L.mimeType.split("/")[1],m=t,E=null,A=[m(r,i,o,!1),g=="webm"?m(n.R(),n.startByte,n.endByte,!0):null],m=null,Ee.g(Promise.all(A),2);for(k=Ee.i,b=k[0],V=k[1]||null,B=null,Z=l-s,ue=l,pe=h?l+h:1/0,te=e.L.bb(),le=te.length!=r.length||te.some(function(ye,Ve){return ye!=r[Ve]}),B=g=="mp4"?OM(b,i,te,n,Z,ue,pe,le):FM(b,V,te,n,Z,ue,pe),ie=d(B),ve=ie.next();!ve.done;ve=ie.next())ce=ve.value,ce.codecs=e.L.codecs,ce.mimeType=e.L.mimeType,ce.bandwidth=e.bandwidth;return a.ee(B),E=new wn(B),u&&E.gd(ue,pe,!0),Ee.return(E)})}function ml(e){return e.Dd}function DS(e){var t=gl(e,ml,"RepresentationIndex");return e=ps(e,ml,"indexRange"),e=D(e||""),t&&(e=At(t,"range",D,e)),e}function _M(e,t){if(OS(e,t),!DS(e))throw new fe(2,4,4002)}function OS(e,t){var n=e.L.mimeType.split("/")[1];if(e.L.contentType!=Bt&&n!="mp4"&&n!="webm")throw new fe(2,4,4006);if(n=="webm"&&!t)throw new fe(2,4,4005)}function NS(e){var t=e.L;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.uf,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.qa.label||null,roles:e.roles||null,language:e.qa.language||null}}function HM(e,t,n){var r=RS(e,LS,n),i=GM(e);if(!i.gb&&!i.timeline&&i.sd.length>1)throw new fe(2,4,4002);if(!i.gb&&!e.na.duration&&!i.timeline&&i.sd.length==1)throw new fe(2,4,4002);if(i.timeline&&i.timeline.length==0)throw new fe(2,4,4002);var o=null,s=null;e.va.id&&e.L.id&&(s=t.get(e.va.id+","+e.L.id))&&(o=s.segmentIndex);var a=KM(e.na.start,e.na.duration,e.L.bb,i,r,n,e.L.mimeType,e.L.codecs,e.bandwidth,e.Fb);return t=!o,o?o.be(a,e.presentationTimeline.Db()):o=new wn(a),e.presentationTimeline.ee(a),e.pb&&e.na.ef||o.gd(e.na.start,e.na.duration?e.na.start+e.na.duration:1/0,t),s&&(s.segmentIndex=o),{endTime:-1,timeline:-1,Mc:function(){return o&&o.getNumReferences()!=0||o.nf(a),Promise.resolve(o)},timescale:i.timescale}}function LS(e){return e.vc}function GM(e){var t=WM(e);e=MS(e,LS);var n=e.me;n==0&&(n=1);var r=0;return e.gb?r=e.gb*(n-1):e.timeline&&e.timeline.length>0&&(r=e.timeline[0].start),{gb:e.gb,startTime:r,me:n,ac:e.ac,timescale:e.timescale,timeline:e.timeline,sd:t}}function KM(e,t,n,r,i,o,s,a,u,l){var h=r.sd.length;r.timeline&&r.timeline.length!=r.sd.length&&(h=Math.min(r.timeline.length,r.sd.length));for(var g=e-r.ac,m=t?e+t:1/0,E=[],A=r.startTime,k={},b=0;b<h;k={Nf:void 0,Cf:void 0},b++){k.Cf=r.sd[b];var V=A;A=void 0,A=r.gb!=null?V+r.gb:r.timeline?r.timeline[b].end:V+t,k.Nf=null,k=new Rt(e+V,e+A,function(B){return function(){return B.Nf==null&&(B.Nf=Rr(n(),[B.Cf.zk],l())),B.Nf}}(k),k.Cf.start,k.Cf.end,i,g,e,m,[],"",null,null,fa,o),k.codecs=a,k.mimeType=s,k.bandwidth=u,E.push(k)}return E}function WM(e){return[e.L.vc,e.qa.vc,e.va.vc].filter(cs).map(function(t){return Mn(t,"SegmentURL")}).reduce(function(t,n){return t.length>0?t:n}).map(function(t){t.attributes.indexRange&&!e.Jg&&(e.Jg=!0);var n=zr(t.attributes.media);return t=At(t,"mediaRange",D,{start:0,end:null}),{zk:n,start:t.start,end:t.end}})}function jS(e,t,n,r,i,o,s,a,u,l){u||e.L.bf||(e.L.bf=ps(e,Wa,"initialization"));var h=e.L.bf?YM(e,s):null,g=zM(e);$M(g);var m=_o(e);if(g.Yd)return OS(e,h),{endTime:-1,timeline:-1,Mc:function(){var V=kc(g.Yd,m.L.originalId,null,null,m.bandwidth||null,null);return V=Rr(m.L.bb(),[V]),bS(m,t,h,V,0,null,g.ac)},timescale:g.timescale};if(g.gb)return r||e.qa.contentType==="image"||e.qa.contentType==="text"||(r=e.na.start,l=e.va.id,n=e.na.duration,l=(l=l!=null&&o.get(l)||n)?r+l:1/0,e.presentationTimeline.Tg(g.gb),e.presentationTimeline.Bi(r,l)),{endTime:-1,timeline:-1,Mc:function(){return XM(m,g,i,h,o,s,a,e.L.Df)},timescale:g.timescale};var E=null;r=r=null,e.va.id&&e.L.id&&(r=e.va.id+","+e.L.id,r=n.get(r))&&(E=r.segmentIndex);var A=e.na.start,k=e.na.duration?A+e.na.duration:1/0;if(E)l=E,FS(l,g,A,k,h,e.pb),l.Ya(e.presentationTimeline.Db());else{if(n=0,u=-1,e.va.id!=null&&e.L.id!=null){var b=l.get(e.va.id);if(b)u=b.timeline;else for(l=d(l.values()),b=l.next();!b.done;b=l.next())if(b=b.value,Math.abs(g.ac-b.endTime)<=Js&&b.eh.includes(e.L.id)){u=b.timeline;break}else b.timeline>=n&&(n=b.timeline+1)}u==-1&&(u=n),E=new Rc(e.pb,g,e.L.originalId,e.bandwidth,e.L.bb,e.Fb,A,k,h,s,e.L.Df,u)}return g.timeline&&e.qa.contentType!=="image"&&e.qa.contentType!=="text"&&e.presentationTimeline.Ci(E.h?E.h.timeline:[],A),r&&e.pb&&(r.segmentIndex=E),r=(r=(r=g.timeline)&&r[r.length-1])?r.end+g.ac:-1,l=-1,E instanceof Rc&&(l=E.Pe()),{endTime:r,timeline:l,Mc:function(){return E instanceof Rc&&E.getNumReferences()==0&&FS(E,g,A,k,h,e.pb),Promise.resolve(E)},timescale:g.timescale}}function Wa(e){return e.Ic}function zM(e){var t=MS(e,Wa),n=ps(e,Wa,"media"),r=ps(e,Wa,"index"),i=ps(e,Wa,"k"),o=0;return i&&(o=parseInt(i,10)),{Lf:t.Lf,gb:t.gb,timescale:t.timescale,me:t.me,ac:t.ac,Yc:t.Yc,timeline:t.timeline,Xb:n&&zr(n),Yd:r,mimeType:e.L.mimeType,codecs:e.L.codecs,bandwidth:e.bandwidth,Bk:o}}function $M(e){var t=e.Yd?1:0;if(t+=e.timeline?1:0,t+=e.gb?1:0,t==0)throw new fe(2,4,4002);if(t!=1&&(e.Yd&&(e.timeline=null),e.Lf=null,e.gb=null),!e.Yd&&!e.Xb)throw new fe(2,4,4002)}function XM(e,t,n,r,i,o,s,a){function u(ye){var Ve=ye-b,Le=Ve*k,Ce=t.Lf,ke=Ve*Ce;"BigInt"in R&&ke>Number.MAX_SAFE_INTEGER&&(ke=BigInt(Ve)*BigInt(Ce)),Le+=m,Ve=Le+k,Ce=Math.min(Ve,h());var Ge=[],Je=t.Bk;if(Je)for(var Ft=(Ce-Le)/Je,dt={},kn=0;kn<Je;dt={Yi:void 0},kn++){var Ut=Le+Ft*kn,Gn=Ut+Ft;dt.Yi=kn,dt=new Rt(Ut,Gn,function(sn){return function(){var Qt=kc(V,Z,ye,sn.Yi,B,ke);return Rr(ue(),[Qt],pe())}}(dt),0,null,r,te,m,h(),[],"",null,null,fa,o),dt.codecs=e.L.codecs,dt.mimeType=e.L.mimeType,a==0?kn>0&&dt.qd():kn%a!=0&&dt.qd(),Ge.push(dt)}return Le=new Rt(Le,Ce,function(){if(Je)return[];var sn=kc(V,Z,ye,null,B,ke);return Rr(ue(),[sn],pe())},0,null,r,te,m,h(),Ge,"",null,null,fa,o,Ge.length>0),Le.codecs=e.L.codecs,Le.mimeType=e.L.mimeType,Le.bandwidth=e.bandwidth,Le.j=Ve,Le}function l(){var ye=[Math.max(g.Db(),m),Math.min(g.Dc(),h())].map(function(Ve){return Ve-m});return ye=[Math.ceil(ye[0]/k),Math.ceil(ye[1]/k)-1],e.L.mb&&ye[1]++,ye.map(function(Ve){return Ve+b})}function h(){var ye=E!=null&&i.get(E)||A;return ye?m+ye:1/0}var g=e.presentationTimeline,m=e.na.start,E=e.va.id,A=e.na.duration,k=t.gb,b=t.me,V=t.Xb,B=e.bandwidth||null,Z=e.L.originalId,ue=e.L.bb,pe=e.Fb,te=m-t.ac,le=l();n=e.pb?Math.max(le[0],le[1]-n+1):le[0],s=s||le[1],le=[];for(var ie=n;ie<=s;++ie){var ve=u(ie);le.push(ve)}var ce=new wn(le);if(le=g.Dc()<h(),ie=g.U(),le||ie){var Ee=Math.max(n,s+1);n=k,e.L.mb&&(n=.1),ce.Mf(n,function(){var ye=g.Db();ce.Ya(ye);var Ve=d(l());Ve.next(),Ve=Ve.next().value;for(var Le=[];Ee<=Ve;){var Ce=u(Ee);Le.push(Ce),Ee++}return ye>h()&&!Le.length?null:Le})}return Promise.resolve(ce)}function YM(e,t){var n=e.L.bf;if(n||(n=ps(e,Wa,"initialization")),!n)return null;n=zr(n);var r=e.L.originalId,i=e.bandwidth||null,o=e.L.bb,s=e.Fb;return t=new qi(function(){var a=kc(n,r,null,null,i,null);return Rr(o(),[a],s())},0,null,NS(e),null,null,t,e.qa.encrypted),t.codecs=e.L.codecs,t.mimeType=e.L.mimeType,e.na&&!e.na.ef&&(t.g=e.na.start+e.na.duration),t}function Rc(e,t,n,r,i,o,s,a,u,l,h,g){wn.call(this,[]),this.D=e,this.h=t,this.H=n,this.C=r,this.G=i,this.J=o,this.j=s,this.l=a,this.u=u,this.B=l,this.I=h,this.K=g,kg(this)}P(Rc,wn),f=Rc.prototype,f.getNumReferences=function(){return this.h?this.h.timeline.length:0},f.release=function(){wn.prototype.release.call(this),this.h=null},f.Ya=function(e){if(this.h){for(var t=0,n=this.h.timeline,r=0;r<n.length&&n[r].end+this.j<=e;r+=1)t+=1;t>0&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.i+=t,this.getNumReferences()===0&&this.release())}};function FS(e,t,n,r,i,o){if(JM(e,i),e.D=o,e.h){if(e.h.Yc!==t.Yc)for(n=t.Yc-e.h.Yc,i=0;i<t.timeline.length;i++)o=t.timeline[i],o.Gd+=n,o.Fh+=n,o.start=(o.Gd+n)/t.timescale,o.end=(o.Fh+n)/t.timescale;if(e.h.Xb!==t.Xb&&(e.h.Xb=t.Xb),n=e.h.timeline,n.length){var s=n[n.length-1];t=t.timeline.filter(function(a){return a.end>s.end})}else t=t.timeline.slice();t.length>0&&e.h.timeline.push.apply(e.h.timeline,M(t)),e.l!==r&&(e.l=r)}else e.h=t,e.j=n,e.l=r;kg(e)}function JM(e,t){if(e.u!==t){e.u=t,e=d(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&yy(n,t)}}function kg(e){if(e.h&&!e.o){for(var t=[],n=d(e.h.timeline),r=n.next();!r.done;r=n.next())r=r.value,r.start>=e.l||r.end<=0||t.push(r);e.h.timeline=t,e.Ya(e.j)}}f.find=function(e){if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var t=this.h.timeline;if(e<this.j||e>=this.l)return null;for(var n=t.length-1,r=0;r<t.length;r++){var i=t[r],o=i.start+this.j;if(i=r<n?t[r+1].start+this.j:this.l===1/0?i.end+this.j:this.l,e>=o&&e<i)return r+this.i}return null},f.get=function(e){var t=this;if(e-=this.i,e<0||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){n=this.h.timeline[e];var r=n.Tk,i=n.Gd+this.h.Yc,o=this.j-this.h.ac,s=this.j+n.end,a=s;e===this.getNumReferences()-1&&this.l!==1/0&&(a=this.D&&Math.abs(a-this.l)>.1?Math.min(a,this.l):this.l);var u=this.h.codecs,l=this.h.mimeType,h=this.h.bandwidth,g=[],m=!1;if(n.qc&&this.h&&this.h.Xb&&(m=this.h.Xb.includes("$SubNumber$")),m){m=(n.end-n.start)/n.qc;for(var E={},A=0;A<n.qc;E={Of:void 0,Zi:void 0},A++){var k=n.start+m*A,b=k+m;E.Zi=A,E.Of=null,E=new Rt(this.j+k,this.j+b,function(V){return function(){return t.h?(V.Of==null&&(V.Of=US(t.h.Xb,t.H,r,t.C,i,V.Zi,t.G,t.J)),V.Of):[]}}(E),0,null,this.u,o,this.j,this.l,[],"",null,null,fa,this.B),E.codecs=u,E.mimeType=l,E.bandwidth=h,this.I==0?A>0&&E.qd():A%this.I!=0&&E.qd(),g.push(E)}}n=new Rt(this.j+n.start,a,function(){return g.length>0||!t.h?[]:US(t.h.Xb,t.H,r,t.C,i,null,t.G,t.J)},0,null,this.u,o,this.j,this.l,g,"",null,null,fa,this.B,g.length>0),n.codecs=u,n.mimeType=l,n.j=s,n.bandwidth=h,this.g[e]=n}return n},f.Bb=function(e){kg(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}};function US(e,t,n,r,i,o,s,a){return e=kc(e,t,n,o,r||null,i),Rr(s(),[e],a()).map(function(u){return u.toString()})}f.Pe=function(){return this.K};function vl(e){this.o=null,this.B=e,this.H=new Vu,this.i=[],this.h=null,this.m=[],this.C=null,this.G=[],this.D=300,this.l=new Map,this.j=new Map,this.g=null,this.u="UNKNOWN"}vl.prototype.configure=function(e){this.o=e},vl.prototype.destroy=function(){return this.B=this.o=null,this.i=[],this.h=null,this.m=[],this.G=[],this.l.clear(),this.g!=null&&(this.g.stop(),this.g=null),this.H.destroy()},vl.prototype.setManifestType=function(e){this.u=e};function bc(e,t){var n,r,i,o,s,a,u;return H(function(l){if(l.h==1)return n=Rr(e.i,[QM(e,t)]),r=jr(n,e.o.retryParameters),i=e.B.networkingEngine.request(8,r),gu(e.H,i),l.m(2),l.g(i.promise,4);if(l.h!=2)return o=l.i,s=Un(o.data),a=JSON.parse(s),a.VERSION==1&&ZM(e,a,o.uri),l.o(0);if((u=l.l())&&u.code==7001)return l.return();e.g!=null&&(e.g.stop(),e.g=null),e.g=new Yt(function(){bc(e,t)}),e.g.ka(e.D),l.j()})}function QM(e,t){if(!e.m.length)return t;t=new Ct(t);var n=e.C||e.m[0],r=Math.round(e.B.getBandwidthEstimate()),i=t.g;return e.u=="DASH"?(i.add("_DASH_pathway",n),i.add("_DASH_throughput",String(r))):e.u=="HLS"&&(i.add("_HLS_pathway",n),i.add("_HLS_throughput",String(r))),To(i),i.Pd&&Pe(t,i),t.toString()}function ZM(e,t,n){e.g!=null&&(e.g.stop(),e.g=null);var r=t["RELOAD-URI"]||n;e.g=new Yt(function(){bc(e,r)}),(n=t.TTL)&&(e.D=n),e.g.ka(e.D),e.m=t["PATHWAY-PRIORITY"]||[],e.G=t["PATHWAY-CLONES"]||[]}function yl(e,t,n,r){var i=e.l.get(t);i||(i=new Map),i.set(n,r),e.l.set(t,i)}vl.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)};function Dc(e,t,n){n=n===void 0?!1:n,t=e.l.get(t)||new Map;for(var r=[],i=d(e.m),o=i.next(),s={};!o.done;s={vd:void 0},o=i.next())if(s.vd=o.value,o=t.get(s.vd))r.push({Yg:s.vd,location:o});else if(o=e.G.find(function(u){return function(l){return l.Ml==u.vd}}(s))){var a=t.get(o["BASE-ID"]);a&&(o["URI-REPLACEMENT"].lj?(a=new Ct(a),tn(a,o["URI-REPLACEMENT"].lj),r.push({Yg:s.vd,location:a.toString()})):r.push({Yg:s.vd,location:a}))}for(i=Date.now(),s=d(e.j.keys()),o=s.next();!o.done;o=s.next())o=o.value,a=e.j.get(o),i>a&&e.j.delete(o);if(r=r.filter(function(u){for(var l=d(e.j.keys()),h=l.next();!h.done;h=l.next())if(h.value.includes(new Ct(u.location).Ab))return!1;return!0}),r.length&&(e.C=r[0].Yg),r=r.map(function(u){return u.location}),!r.length&&e.h)for(i=d(e.h.split(",")),s=i.next();!s.done;s=i.next())(s=t.get(s.value))&&(e.C=e.h,r.push(s));if(!r.length)for(t=d(t.values()),i=t.next();!i.done;i=t.next())r.push(i.value);return n?r:Rr(e.i,r)}function to(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.o=!1,this.m=new Set}f=to.prototype,f.release=function(){for(var e=d(this.h.concat(this.g,this.j,this.i)),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.j=[],this.i=[],this.l=[],this.o=!1,this.m.clear()},f.ck=function(){return this.l},f.Hg=function(){return this.j.slice()},f.Jj=function(){return this.i},f.Vh=function(e,t){if(e){if(e.type=="audio")for(var n=d(this.h),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e});else if(e.type=="video")for(n=d(this.g),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e}),r.trickModeVideo&&(r.trickModeVideo.matchedStreams=r.trickModeVideo.matchedStreams.filter(function(i){return i!==e})),r.dependencyStream&&(r.dependencyStream.matchedStreams=r.dependencyStream.matchedStreams.filter(function(i){return i!==e}));else if(e.type==Bt)for(n=d(this.j),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e});else if(e.type=="image")for(n=d(this.i),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e});e.segmentIndex&&e.closeSegmentIndex(),this.m.delete(t)}};function BS(e,t){var n=[],r=[],i=[],o=[];e=d(e);for(var s=e.next();!s.done;s=e.next()){var a=s.value;s=new Map(a.audioStreams.map(function(g){return[Og(g),g]}));var u=new Map(a.videoStreams.map(function(g){return[Dg(g),g]})),l=new Map(a.textStreams.map(function(g){return[Nc(g),g]}));if(a=new Map(a.imageStreams.map(function(g){return[Lc(g),g]})),t){var h=zS(Bt);l.set(Nc(h),h),h=zS("image"),a.set(Lc(h),h)}n.push(s),r.push(u),i.push(l),o.push(a)}return{Oh:n,jj:r,dj:i,li:o}}f.fg=function(e,t,n){n=n===void 0?!1:n;var r=this,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce,Ee,ye,Ve,Le,Ce,ke,Ge,Je,Ft;return H(function(dt){if(dt.h==1){if(i=mr,!t&&e.length==1)return o=BS(e,!1),s=o.Oh,a=o.jj,u=o.dj,l=o.li,r.h=Array.from(s[0].values()),r.g=Array.from(a[0].values()),r.j=Array.from(u[0].values()),r.i=Array.from(l[0].values()),dt.A(2);for(h=n?r.m.size:0,g=-1,m=0;m<e.length;m++)E=e[m],r.m.has(E.id)||(r.m.add(E.id),g==-1&&(g=m));return g==-1?dt.return():(A=BS(e,!0),k=A.Oh,b=A.jj,V=A.dj,B=A.li,dt.g(Promise.all([za(r,r.h,k,g,Sl,$a,h),za(r,r.g,b,g,Sl,$a,h),za(r,r.j,V,g,Sl,$a,h),za(r,r.i,B,g,Sl,$a,h)]),2))}if(Z=0,ue=[],r.g.length&&r.h.length)for(Ee=d(r.h),ye=Ee.next();!ye.done;ye=Ee.next())for(Ve=ye.value,Le=d(r.g),Ce=Le.next();!Ce.done;Ce=Le.next())ke=Ce.value,Ge=so(Ve.drmInfos,ke.drmInfos),Ve.drmInfos.length&&ke.drmInfos.length&&!Ge.length||(Je=(Ve.bandwidth||0)+(ke.bandwidth||0),Ve.dependencyStream&&(Je+=Ve.dependencyStream.bandwidth||0),ke.dependencyStream&&(Je+=ke.dependencyStream.bandwidth||0),Ft=Z++,ue.push({id:Ft,language:Ve.language,disabledUntilTime:0,primary:Ve.primary,audio:Ve,video:ke,bandwidth:Je,drmInfos:Ge,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(pe=r.g.length?r.g:r.h,te=d(pe),le=te.next();!le.done;le=te.next())ie=le.value,ve=Z++,ce=ie.bandwidth||0,ie.dependencyStream&&(ce+=ie.dependencyStream.bandwidth||0),ue.push({id:ve,language:ie.language,disabledUntilTime:0,primary:ie.primary,audio:ie.type==i.aa?ie:null,video:ie.type==i.wa?ie:null,bandwidth:ce,drmInfos:ie.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});r.l=ue,dt.j()})};function VS(e){var t,n,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce,Ee,ye,Ve,Le;return H(function(Ce){switch(Ce.h){case 1:if(t=mr,e.length==1)return Ce.return(e[0]);for(n=e.map(function(ke){return new Map(ke.filter(function(Ge){return Ge.type===t.aa}).map(function(Ge){return[Og(Ge),Ge]}))}),r=e.map(function(ke){return new Map(ke.filter(function(Ge){return Ge.type===t.wa}).map(function(Ge){return[Dg(Ge),Ge]}))}),i=e.map(function(ke){return new Map(ke.filter(function(Ge){return Ge.type===t.Oa}).map(function(Ge){return[Nc(Ge),Ge]}))}),o=e.map(function(ke){return new Map(ke.filter(function(Ge){return Ge.type===t.Tf}).map(function(Ge){return[Lc(Ge),Ge]}))}),s=d(i),a=s.next();!a.done;a=s.next())u=a.value,l=WS(t.Oa),u.set(Nc(l),l);for(h=d(o),g=h.next();!g.done;g=h.next())m=g.value,E=WS(t.Tf),m.set(Lc(E),E);return A=new to,Ce.g(za(A,[],n,0,Nd,Ld,0),2);case 2:return k=Ce.i,Ce.g(za(A,[],r,0,Nd,Ld,0),3);case 3:return b=Ce.i,Ce.g(za(A,[],i,0,Nd,Ld,0),4);case 4:return V=Ce.i,Ce.g(za(A,[],o,0,Nd,Ld,0),5);case 5:if(B=Ce.i,Z=0,b.length&&k.length)for(ie=d(k),ve=ie.next();!ve.done;ve=ie.next())for(ce=ve.value,Ee=d(b),ye=Ee.next();!ye.done;ye=Ee.next())Ve=ye.value,Le=Z++,Ve.variantIds.push(Le),ce.variantIds.push(Le);else for(ue=b.concat(k),pe=d(ue),te=pe.next();!te.done;te=pe.next())le=te.value,le.variantIds=[Z++];return Ce.return(b.concat(k).concat(V).concat(B))}})}function za(e,t,n,r,i,o,s){var a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve;return H(function(ce){switch(ce.h){case 1:for(a=[],u=0;u<n.length;u++)u>=r?a.push(new Set(n[u].values())):a.push(new Set);l=d(t),h=l.next();case 2:if(h.done){ce.A(4);break}return g=h.value,ce.g(qM(e,g,n,r,o,a,s),5);case 5:if(m=ce.i,!m)throw new fe(2,4,4037);h=l.next(),ce.A(2);break;case 4:for(E=d(a),A=E.next();!A.done;A=E.next())for(k=A.value,b=d(k),V=b.next();!V.done;V=b.next())B=V.value,(Z=eP(e,t,B,n,i,o,a))&&t.push(Z);for(ue=d(a),pe=ue.next();!pe.done;pe=ue.next())for(te=pe.value,le=d(te),ie=le.next(),ve={};!ie.done;ve={uh:void 0},ie=le.next())if(ve.uh=ie.value,!bg(ve.uh)&&t.some(function(Ee){return function(ye){return Rg(Ee.uh,ye)}}(ve)))throw new fe(2,4,4037);return ce.return(t)}})}function qM(e,t,n,r,i,o,s){return H(function(a){return a.h==1?(GS(e,n,t,s>0),t.matchedStreams?t.segmentIndex?a.g(_S(t,r+s),2):a.A(2):a.return(!1)):(HS(t,r,i,o,s),a.return(!0))})}function _S(e,t){var n,r,i,o,s,a;return H(function(u){if(u.h==1){for(n=[],r=e.matchedStreams,i=t;i<r.length;i++)o=r[i],n.push(o.createSegmentIndex()),o.trickModeVideo&&!o.trickModeVideo.segmentIndex&&n.push(o.trickModeVideo.createSegmentIndex()),o.dependencyStream&&!o.dependencyStream.segmentIndex&&n.push(o.dependencyStream.createSegmentIndex());return u.g(Promise.all(n),2)}if(e.segmentIndex instanceof Er)for(s=t;s<r.length;s++)a=r[s],a.segmentIndex&&e.segmentIndex.h.push(a.segmentIndex);u.j()})}function eP(e,t,n,r,i,o,s){if(bg(n))return null;var a=i(n);return GS(e,r,a),a.createSegmentIndex&&(a.createSegmentIndex=function(){return H(function(u){return a.segmentIndex?u.A(0):(a.segmentIndex=new Er,u.g(_S(a,0),0))})},a.closeSegmentIndex=function(){if(a.segmentIndex&&(a.segmentIndex.release(),a.segmentIndex=null),a.matchedStreams)for(var u=d(a.matchedStreams),l=u.next();!l.done;l=u.next()){l=l.value;var h;if(h=l.segmentIndex){e:{h=d(t);for(var g=h.next();!g.done;g=h.next())if(g=g.value,g!==a&&g.segmentIndex&&g.matchedStreams&&g.matchedStreams.includes(l)){h=!0;break e}h=!1}h=!h}h&&(l.segmentIndex.release(),l.segmentIndex=null)}}),!a.matchedStreams||!a.matchedStreams.length?null:(HS(a,0,o,s,0),a)}function HS(e,t,n,r,i){var o=e.matchedStreams;for(t+=i;t<o.length;t++){var s=o[t];n(e,s);var a=!0;if(e.type=="audio"&&Xr(e.language,s.language)==0&&(a=!1),a&&((a=r[t-i])&&a.delete(s),s.fullMimeTypes))for(s=d(s.fullMimeTypes.values()),a=s.next();!a.done;a=s.next())e.fullMimeTypes.add(a.value)}}function Sl(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set(e.keyIds),t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t.trickModeVideo=null,t.dependencyStream=null,t}function Nd(e){var t=Object.assign({},e);return t.roles=t.roles.slice(),t.keyIds=new Set(e.keyIds),t.segments=[],t.variantIds=[],t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t}function $a(e,t){function n(s,a){s||(s=[]),a=d(a);for(var u=a.next();!u.done;u=a.next())u=u.value,s.includes(u)||s.push(u);return s}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var r=d(t.keyIds),i=r.next();!i.done;i=r.next())e.keyIds.add(i.value);if(e.originalId==null?e.originalId=t.originalId:(r=t.originalId||"")&&!e.originalId.endsWith(r)&&(e.originalId+=","+r),r=so(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!r.length)throw new fe(2,4,4038);if(e.drmInfos=r,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),r=d(t.closedCaptions),i=r.next();!i.done;i=r.next()){var o=d(i.value);i=o.next().value,o=o.next().value,e.closedCaptions.set(i,o)}e.bandwidth&&t.bandwidth&&(e.bandwidth=Math.max(e.bandwidth,t.bandwidth)),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=Sl(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var s=new Er,a=d(e.trickModeVideo.matchedStreams),u=a.next();!u.done;u=a.next())s.h.push(u.value.segmentIndex);return e.trickModeVideo.segmentIndex=s,Promise.resolve()}),e.trickModeVideo.matchedStreams.push(t.trickModeVideo),$a(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),$a(e.trickModeVideo,t)),t.dependencyStream?(e.dependencyStream||(e.dependencyStream=Sl(t.dependencyStream),e.dependencyStream.matchedStreams=[],e.dependencyStream.createSegmentIndex=function(){if(e.dependencyStream.segmentIndex)return Promise.resolve();for(var s=new Er,a=d(e.dependencyStream.matchedStreams),u=a.next();!u.done;u=a.next())s.h.push(u.value.segmentIndex);return e.dependencyStream.segmentIndex=s,Promise.resolve()}),e.dependencyStream.matchedStreams.push(t.dependencyStream),$a(e.dependencyStream,t.dependencyStream)):e.dependencyStream&&(e.dependencyStream.matchedStreams.push(t),$a(e.dependencyStream,t))}function Ld(e,t){var n=e.roles;n||(n=[]);for(var r=d(t.roles),i=r.next();!i.done;i=r.next())i=i.value,n.includes(i)||n.push(i);for(e.roles=n,n=d(t.keyIds),r=n.next();!r.done;r=n.next())e.keyIds.add(r.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,M(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),t=d(t.closedCaptions),n=t.next();!n.done;n=t.next())r=d(n.value),n=r.next().value,r=r.next().value,e.closedCaptions.set(n,r)}function GS(e,t,n,r){r=r!==void 0&&r?n.matchedStreams:[],t=d(t);for(var i=t.next();!i.done;i=t.next()){if(i=tP(e,i.value,n),!i)return;r.push(i)}n.matchedStreams=r}function tP(e,t,n){var r={audio:Og,video:Dg,text:Nc,image:Lc}[n.type],i=null,o=r(n);if(t.has(o))i=t.get(o);else{o={audio:function(l,h){return Rg(l,h)},video:function(l,h){return Rg(l,h)},text:nP,image:rP}[n.type];for(var s={audio:iP,video:oP,text:sP,image:aP}[n.type],a=d(t.values()),u=a.next();!u.done;u=a.next())u=u.value,!o(n,u)||n.fastSwitching!=u.fastSwitching||i&&!s(n,i,u)||(i=u)}return e.o&&!bg(i)&&t.delete(r(i)),i}function KS(e,t){return e.mimeType!=t.mimeType?!1:YS(e.codecs)===YS(t.codecs)}f.Ti=function(e){this.o=e};function Rg(e,t){return!(e.drmInfos&&!rs(e.drmInfos,t.drmInfos))}function nP(e,t){return t.language?!(e.forced!==t.forced||Xr(e.language,t.language)==0||t.kind!=e.kind):!0}function rP(){return!0}function iP(e,t,n){var r=$S(e,t,n);if(r===mo)return!0;if(r===$o)return!1;r=Xr(e.language,t.language);var i=Xr(e.language,n.language);if(i>r)return!0;if(i<r)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(r=t.roles.filter(function(o){return e.roles.includes(o)}),i=n.roles.filter(function(o){return e.roles.includes(o)}),i.length>r.length)return!0;if(i.length<r.length)return!1;if(n.roles.length!==t.roles.length)return n.roles.length<t.roles.length}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!t.primary&&n.primary?!0:t.primary&&!n.primary?!1:(r=Oc(e.channelsCount,t.channelsCount,n.channelsCount),r==mo?!0:r==$o?!1:(r=Oc(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate),r==mo?!0:r==$o?!1:!!(e.bandwidth&&XS(e.bandwidth,t.bandwidth,n.bandwidth)==mo)))}function oP(e,t,n){var r=$S(e,t,n);if(r===mo)return!0;if(r===$o)return!1;if(r=Oc(e.width*e.height,t.width*t.height,n.width*n.height),r==mo)return!0;if(r==$o)return!1;if(e.frameRate){if(r=Oc(e.frameRate,t.frameRate,n.frameRate),r==mo)return!0;if(r==$o)return!1}return!!(e.bandwidth&&XS(e.bandwidth,t.bandwidth,n.bandwidth)==mo)}function sP(e,t,n){var r=Xr(e.language,t.language),i=Xr(e.language,n.language);if(i>r)return!0;if(i<r)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(r=t.roles.filter(function(o){return e.roles.includes(o)}),i=n.roles.filter(function(o){return e.roles.includes(o)}),i.length>r.length)return!0;if(i.length<r.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!(n.mimeType!=e.mimeType||n.codecs!=e.codecs||t.mimeType==e.mimeType&&t.codecs==e.codecs)}function aP(e,t,n){return Oc(e.width*e.height,t.width*t.height,n.width*n.height)==mo}function WS(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,baseOriginalId:null}}function zS(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new wn([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null}}function Oc(e,t,n){if(t==e&&e!=n)return $o;if(n==e&&e!=t)return mo;if(t>e){if(n<=e||n-e<t-e)return mo;if(n-e>t-e)return $o}else{if(n>e)return $o;if(e-n<e-t)return mo;if(e-n>e-t)return $o}return Ng}function $S(e,t,n){var r=e.mimeType===t.mimeType&&e.codecs===t.codecs,i=e.mimeType===n.mimeType&&e.codecs===n.codecs;return r&&!i?$o:!r&&i?mo:(t=KS(e,t),e=KS(e,n),t&&!e?$o:!t&&e?mo:Ng)}function XS(e,t,n){return t=Math.abs(e-t),e=Math.abs(e-n),e<t?mo:t<e?$o:Ng}function bg(e){switch(e.type){case Bt:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function Dg(e){return jd([e.fastSwitching,e.width,e.frameRate,e.codecs,e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function Og(e){return jd([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,e.codecs,e.mimeType,e.roles,e.audioSamplingRate,e.primary,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function Nc(e){return jd([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function Lc(e){return jd([e.width,e.codecs,e.mimeType])}function jd(e){return JSON.stringify(e)}function YS(e){if(!Lg.has(e)){var t=ii(e);Lg.set(e,t)}return Lg.get(e)}Re("shaka.util.PeriodCombiner",to),to.prototype.setUseStreamOnce=to.prototype.Ti,to.prototype.combinePeriods=to.prototype.fg,to.prototype.deleteStream=to.prototype.Vh,to.prototype.getImageStreams=to.prototype.Jj,to.prototype.getTextStreams=to.prototype.Hg,to.prototype.getVariants=to.prototype.ck;var mo=1,Ng=0,$o=-1,Lg=new Map;function uP(e,t){var n=new DOMParser,r=lP.value()(e);e=null;try{e=n.parseFromString(r,"text/xml")}catch{return null}if(n=e.documentElement,!n||n.getElementsByTagName("parsererror").length||n.tagName!=t)return null;if(!("createNodeIterator"in document))return n;for(t=document.createNodeIterator(e,NodeFilter.SHOW_ALL);e=t.nextNode();)if(e instanceof HTMLElement||e instanceof SVGElement)return null;return n}function JS(e,t){try{var n=fi(e);return uP(n,t)}catch{return null}}var lP=new Kt(function(){if(typeof trustedTypes<"u"){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(t){return t}});return function(t){return e.createHTML(t)}}return function(t){return t}});function jc(){var e=this;this.j=this.g=null,this.B=[],this.h=null,this.Ka=1,this.I=[],this.l={qf:"",type:"",profiles:[],mc:null,mb:0,bb:null,ie:0},this.u=new Map,this.C=new Map,this.H=new Map,this.o=new Map,this.G=new Map,this.Ba=new Map,this.m=new to,this.M=0,this.Ga=new Qe(5),this.N=new Yt(function(){if(e.K&&!e.g.continueLoadingWhenPaused&&(e.J.Na(e.K,"timeupdate"),e.K.paused)){e.J.Aa(e.K,"timeupdate",function(){return rT(e)});return}rT(e)}),this.T=new Vu,this.P=null,this.D=[],this.ma=1/0,this.ya=!1,this.i=null,this.O=0,this.V=!1,this.J=new Et,this.K=null,this.X=!1,this.ba="",this.ua=function(){return!1},this.$=[],this.oa=new Set,this.za=new IS}f=jc.prototype,f.configure=function(e,t){var n=this.j&&e.updatePeriod!=this.g.updatePeriod&&e.updatePeriod>=0;this.g=e,t&&(this.ua=t),n&&this.h&&this.h.presentationTimeline.U()&&this.N.xb(),this.i&&this.i.configure(this.g),this.m&&this.m.Ti(this.g.dash.useStreamOnceInPeriodFlattening)},f.start=function(e,t){var n=this,r;return H(function(i){if(i.h==1)return n.ya=t.isLowLatencyMode(),n.B=[e],n.j=t,i.g(jg(n),2);if(r=i.i,n.j&&Fg(n,r),!n.j)throw new fe(2,7,7001);return i.return(n.h)})},f.stop=function(){for(var e=d(this.o.values()),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();return this.m&&this.m.release(),this.g=this.j=null,this.B=[],this.h=null,this.o.clear(),this.G.clear(),this.u.clear(),this.C.clear(),this.H.clear(),this.l={qf:"",type:"",profiles:[],mc:null,mb:0,bb:null,ie:0},this.m=null,this.N!=null&&(this.N.stop(),this.N=null),this.i&&this.i.destroy(),this.J&&(this.J.release(),this.J=null),this.oa.clear(),this.za.release(),this.T.destroy()},f.update=function(){var e=this,t;return H(function(n){if(n.h==1)return n.m(2),n.g(jg(e),4);if(n.h!=2)return n.o(0);if(t=n.l(),!e.j||!t)return n.return();e.j.onError(t),n.j()})},f.onExpirationUpdated=function(){},f.onInitialVariantChosen=function(e){if(this.h&&this.h.presentationTimeline.U()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.h.presentationTimeline.Dc();var n=t.segmentIndex.find(e);n!=null&&(t=t.segmentIndex.get(n))&&(this.M=t.endTime-e,Fg(this,0))}}},f.banLocation=function(e){this.i&&this.i.banLocation(e)},f.setMediaElement=function(e){this.K=e};function jg(e){var t,n,r,i,o,s,a,u,l,h,g;return H(function(m){return m.h==1?(t=4,n="MPD",r=IP(e),i=e.B,r.length?(i=r,n="Patch",t=6):e.B.length>1&&e.i&&(o=Dc(e.i,"Location",!0),o.length&&(i=o)),s=jr(i,e.g.retryParameters),a=Date.now(),m.g(Bg(e,s,0,{type:t}),2)):m.h!=3?(u=m.i,e.j?(u.uri&&u.uri!=u.originalUri&&!e.B.includes(u.uri)&&e.B.unshift(u.uri),l=new Ct(u.uri),e.ba=l.g.toString(),m.g(cP(e,u.data,u.uri,n),3)):m.return(0)):(h=Date.now(),g=(h-a)/1e3,e.Ga.sample(1,g),e.oa.clear(),m.return(g))})}function cP(e,t,n,r){var i,o,s,a,u,l,h,g,m,E;return H(function(A){if(A.h==1){if(i=t,o=e.g.dash.manifestPreprocessor,s=Yf,o!=s){if(lt("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),a=JS(i,r),!a)throw new fe(2,4,4001,n);o(a),i=Vi(a.outerHTML)}if(u=na(i,r),!u)throw new fe(2,4,4001,n);return l=e.g.dash.manifestPreprocessorTXml,h=Jf,l!=h&&l(u),r==="Patch"?A.return(fP(e,u)):e.g.dash.disableXlinkProcessing?A.return(QS(e,u,n)):(g=e.g.dash.xlinkFailGracefully,m=Od(u,e.g.retryParameters,g,n,e.j.networkingEngine),gu(e.T,m),A.g(m.promise,2))}return E=A.i,A.return(QS(e,E,n))})}function QS(e,t,n){var r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce,Ee,ye,Ve,Le,Ce,ke,Ge,Je,Ft,dt,kn,Ut,Gn,sn,Qt,hn,An,pn,Zt,an,qr,Hr,jo,io,Xi,Pu,xa,gs,Cl,Ml,mh;return H(function(ms){switch(ms.h){case 1:for(e.i&&e.i.l.clear(),r=[n],i=[],o=new Map,s=Mn(t,"Location"),a=d(s),u=a.next();!u.done;u=a.next())l=u.value,h=l.attributes.serviceLocation,(g=_r(l))&&(m=Rr(r,[g])[0],h&&(e.i?yl(e.i,"Location",h,m):o.set(h,m)),i.push(m));if(e.i?(E=Dc(e.i,"Location",!0),E.length>0&&(r=e.B=E)):i.length&&(r=e.B=i),e.l.qf=t.attributes.id||"",e.l.ie=At(t,"publishTime",W)||0,e.I=Mn(t,"PatchLocation"),A=Promise.resolve(),(k=Pn(t,"ContentSteering"))&&e.j)for(b=k.attributes.defaultServiceLocation,e.i?(e.i.i=r,e.i.h=b):(e.i=new vl(e.j),e.i.configure(e.g),e.i.setManifestType("DASH"),e.i.i=r,e.i.h=b,(V=_r(k))&&(At(k,"queryBeforeStart",tt,!1)?A=bc(e.i,V):bc(e.i,V))),B=d(o.keys()),Z=B.next();!Z.done;Z=B.next())ue=Z.value,pe=o.get(ue),yl(e.i,"Location",ue,pe);if(te=Mn(t,"BaseURL"),le=!1,e.i)for(ie=d(te),ve=ie.next();!ve.done;ve=ie.next())ce=ve.value,Ee=ce.attributes.serviceLocation,ye=_r(ce),Ee&&ye&&(yl(e.i,"BaseURL",Ee,ye),le=!0);if(e.$.splice(0),le&&e.i||(Ve=te.map(_r),e.$.push.apply(e.$,M(Rr(r,Ve)))),Le=e.i,Ce=e.$,ke=CP,Ge=ke.call(jc,Le,le,Ce),e.l.bb=Ge,Je=0,te&&te.length&&(Je=At(te[0],"availabilityTimeOffset",qe)||0),e.l.mb=Je,e.M=At(t,"minimumUpdatePeriod",Q,-1),Ft=At(t,"availabilityStartTime",W),dt=At(t,"timeShiftBufferDepth",Q),kn=e.g.dash.ignoreSuggestedPresentationDelay,Ut=null,kn||(Ut=At(t,"suggestedPresentationDelay",Q)),Gn=e.g.dash.ignoreMaxSegmentDuration,sn=null,Gn||(sn=At(t,"maxSegmentDuration",Q)),Qt=t.attributes.type||"static",e.h&&e.h.presentationTimeline&&(e.X=e.h.presentationTimeline.U()&&Qt=="static"),e.l.type=Qt,e.h)for(hn=e.h.presentationTimeline,An=hn.Db(),pn=d(e.o.values()),Zt=pn.next();!Zt.done;Zt=pn.next())an=Zt.value,an.segmentIndex&&an.segmentIndex.Ya(An);else qr=e.g.dash.ignoreMinBufferTime,Hr=0,qr||(Hr=At(t,"minBufferTime",Q)||0),jo=0,jo=Ut!=null?Math.min(Ut,dt||1/0):e.g.defaultPresentationDelay>0?e.g.defaultPresentationDelay:Math.min(Hr*1.5,dt||1/0),hn=new jt(Ft,jo,e.g.dash.autoCorrectDrift);return hn.Uc(Qt=="static"),hn.U()&&!isNaN(e.g.availabilityWindowOverride)&&(dt=e.g.availabilityWindowOverride),dt==null&&(dt=1/0),hn.Gf(dt),io=t.attributes.profiles||"",e.l.profiles=io.split(","),Xi={pb:Qt!="static",presentationTimeline:hn,va:null,na:null,qa:null,L:null,bandwidth:0,Jg:!1,mb:Je,mc:null,profiles:io.split(","),roles:null,Fb:aT},ms.g(A,2);case 2:return e.O=0,Pu=tT(e,Xi,Ge,t,!1),xa=Pu.duration,gs=Pu.periods,(Qt!="static"||e.X)&&Pu.Xh||hn.ub(xa||1/0),e.V&&e.ya&&hn.Pi(e.ma),hn.Tg(sn||1),e.V&&e.ya&&(Cl=Ut??e.g.defaultPresentationDelay,hn.ph(Cl)),e.h?(e.h.periodCount=gs.length,e.h.gapCount=e.O,ms.g(ZS(e,gs,!1),4)):ms.g(e.m.fg(gs,Xi.pb),6);case 6:var vh=hn,Wm=e.m.l,yh=e.m.Hg(),Pl=e.m.i,Xc=e.g.dash.sequenceMode,Gr=Pn(t,"ServiceDescription");if(Gr){var yo=Pn(Gr,"Latency");if(Gr=Pn(Gr,"PlaybackRate"),yo||Gr){var Yi={};yo&&("target"in yo.attributes&&(Yi.targetLatency=parseInt(yo.attributes.target,10)/1e3),"max"in yo.attributes&&(Yi.maxLatency=parseInt(yo.attributes.max,10)/1e3),"min"in yo.attributes&&(Yi.minLatency=parseInt(yo.attributes.min,10)/1e3)),Gr&&("max"in Gr.attributes&&(Yi.maxPlaybackRate=parseFloat(Gr.attributes.max)),"min"in Gr.attributes&&(Yi.minPlaybackRate=parseFloat(Gr.attributes.min))),yo=Yi}else yo=null}else yo=null;e:{if(Gr=Mn(t,"SupplementalProperty"),Gr.length){for(Gr=d(Gr),Yi=Gr.next();!Yi.done;Yi=Gr.next())if(Yi=Yi.value,Yi.attributes.schemeIdUri=="urn:mpeg:dash:chaining:2016"){Gr=Yi.attributes.value;break e}}Gr=null}if(e.h={presentationTimeline:vh,variants:Wm,textStreams:yh,imageStreams:Pl,offlineSessionIds:[],sequenceMode:Xc,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:yo,nextUrl:Gr,periodCount:gs.length,gapCount:e.O,isLowLatency:e.V,startTime:null},!hn.hj()){ms.A(7);break}return Ml=Mn(t,"UTCTiming"),ms.g(wP(e,Ge,Ml),8);case 8:if(mh=ms.i,!e.j)return ms.return();hn.Qi(mh);case 7:hn.lf(),e.m&&!e.h.presentationTimeline.U()&&e.m.release();case 4:e.j.makeTextStreamsForClosedCaptions(e.h),pP(e),gP(e,gs),ms.j()}})}function ZS(e,t,n){var r;return H(function(i){if(i.h==1)return i.g(e.m.fg(t,!0,n),2);e.h.variants=e.m.l,r=e.m.Hg(),r.length>0&&(e.h.textStreams=r),e.h.imageStreams=e.m.i,e.j.filter(e.h),i.j()})}function fP(e,t){var n,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce,Ee,ye;return H(function(Ve){if(Ve.h==1){if(n=t.attributes.mpdId,r=At(t,"originalPublishTime",W),!n||n!==e.l.qf||r!==e.l.ie)throw e.I=[],new fe(1,4,4052);for(i=[],o=[],s=new Set,a=d(bu(t)),u=a.next();!u.done;u=a.next())if(l=u.value,h=vt(l.attributes.sel||""),g=h[h.length-1],m=_r(l)||"",g.name==="MPD")if(g.yc==="mediaPresentationDuration"){E=_r(l)||"";var Le=Q(E);if(Le!=null){e.l.mc=Le;for(var Ce=d(e.u.values()),ke=Ce.next();!ke.done;ke=Ce.next())ke.value.mc=Le}}else if(g.yc==="type"){for(e.h.presentationTimeline.Uc(m=="static"),e.l.type=m,Le=d(e.u.values()),Ce=Le.next();!Ce.done;Ce=Le.next())Ce.value.pb=m=="dynamic";m=="static"&&(e.M=-1)}else g.yc==="publishTime"?e.l.ie=W(m)||0:g.yc===null&&l.tagName==="add"&&o.push(l);else if(g.name==="PatchLocation")En(e.I,l);else if(g.name==="Period")l.tagName==="add"?o.push(l):l.tagName==="remove"&&g.id&&dP(e,g.id);else if(g.name==="SegmentTemplate"){if(Ce=vt(l.attributes.sel||""),Le=Ce[Ce.length-1],Le.yc){Ce=qS(e,Ce),ke=_r(l)||"";for(var Ge=d(Ce),Je=Ge.next();!Je.done;Je=Ge.next())Je=e.u.get(Je.value),Qn(Je.L.Ic,l.tagName,Le.yc,ke);Le=Ce}else Le=[];for(A=Le,k=d(A),b=k.next();!b.done;b=k.next())V=b.value,s.add(V)}else if(g.name==="SegmentTimeline"||g.name==="S"){for(Le=vt(l.attributes.sel||""),Le=qS(e,Le),Ce=d(Le),ke=Ce.next();!ke.done;ke=Ce.next())ke=e.u.get(ke.value),ke=gl(ke,Wa,"SegmentTimeline"),Ge=Mn(ke,"S"),En(Ge,l),ke.children=Ge;for(B=Le,Z=d(B),ue=Z.next();!ue.done;ue=Z.next())pe=ue.value,s.add(pe)}for(te=d(s),le=te.next();!le.done;le=te.next())ie=le.value,eT(e,ie);for(ve=d(o),ce=ve.next();!ce.done;ce=ve.next())Ee=ce.value,i.push.apply(i,M(tT(e,{pb:e.l.type=="dynamic",presentationTimeline:e.h.presentationTimeline,va:null,na:null,qa:null,L:null,bandwidth:0,Jg:!1,mb:e.l.mb,profiles:e.l.profiles,mc:e.l.mc,roles:null,Fb:aT},e.l.bb,Ee,!0).periods));return i.length?(e.h.periodCount+=i.length,e.h.gapCount=e.O,Ve.g(ZS(e,i,!0),2)):Ve.A(2)}e.l.type=="static"&&(ye=e.l.mc,e.h.presentationTimeline.ub(ye||1/0)),Ve.j()})}function dP(e,t){e.h.periodCount--;for(var n=d(e.u.keys()),r=n.next();!r.done;r=n.next())if(r=r.value,r.startsWith(t)){var i=e.u.get(r);gl(i,Wa,"SegmentTimeline").children=[],eT(e,r),e.u.delete(r)}e.D=e.D.filter(function(o){return o!==t}),e.H.delete(t)}function qS(e,t){var n="",r="",i=-1,o="";t=d(t);for(var s=t.next();!s.done;s=t.next())s=s.value,s.name==="Period"?n=s.id:s.name==="AdaptationSet"?(r=s.id,s.position!==null&&(i=s.position)):s.name==="Representation"&&(o=s.id);if(t=[],o)t.push(n+","+o);else if(r)for(i=d(e.u.values()),e=i.next();!e.done;e=i.next())e=e.value,e.va.id===n&&e.qa.id===r&&e.L.id&&t.push(n+","+e.L.id);else if(i>-1)for(r=d(e.u.values()),e=r.next();!e.done;e=r.next())e=e.value,e.va.id===n&&e.qa.position===i&&e.L.id&&t.push(n+","+e.L.id);return t}function eT(e,t){var n=e.u.get(t),r=e.o.get(t);r.segmentIndex&&r.segmentIndex.Ya(e.h.presentationTimeline.Db());try{var i=jS(n,function(o,s,a,u){return oT(e,o,s,a,u)},e.o,!0,e.g.dash.initialSegmentLimit,e.Ba,n.L.aesKey,null,!0,e.C);r.createSegmentIndex=function(){return H(function(o){if(o.h==1)return r.segmentIndex?o.A(0):o.g(i.Mc(),3);r.segmentIndex=o.i,o.j()})}}catch(o){if(t=n.L.contentType,t!=Bt&&t!="application"&&t!="image"||o.code!=4002)throw o}}function tT(e,t,n,r,i){var o=t.mc;o||(o=At(r,"mediaPresentationDuration",Q),e.l.mc=o);var s=0;e.h&&e.h.presentationTimeline&&e.X&&(s=e.h.presentationTimeline.Tb());var a=[],u=s;r=Mn(r,"Period");var l=t.pb;l||e.H.clear();for(var h=l&&!i?new Set(e.D.slice(1,-1)):null,g=0;g<r.length;g++){var m=r[g],E=r[g+1],A=At(m,"start",Q,u),k=m.attributes.id,b=At(m,"duration",Q);A=g==0&&A==0&&e.X?s:A;var V=null;if(E){var B=At(E,"start",Q);B!=null&&(V=B-A+s)}else o!=null&&(V=o-A+s);if(B=Js,V&&b&&Math.abs(V-b)>B&&V>b&&e.O++,V==null&&(V=b),!(e.P!==null&&k!=null&&A!==null&&A<e.P)||e.D.includes(k)||g+1==r.length){if(A!==null&&(e.P===null||A>e.P)&&(e.P=A),u={start:A,duration:V,node:m,ef:V==null||!E},m=null,E=g>0&&g<r.length-1,l&&h&&E&&!i&&(k!=null||(k="__shaka_period_"+A),h.has(k)&&(k=e.H.get(k))&&(m=k)),m||(m=mP(e,t,n,u),l&&m.id&&e.H.set(m.id,m)),a.push(m),m.id&&V&&e.Ba.set(m.id,V),V==null){u=null;break}u=A+V}}if(l&&!i&&hP(e,a),i)for(t=d(a),n=t.next();!n.done;n=t.next())n=n.value.id,e.D.includes(n)||e.D.push(n);else e.D=a.map(function(Z){return Z.id});return o!=null?{periods:a,duration:o+s,Xh:!1}:{periods:a,duration:u,Xh:!0}}function hP(e,t){t=new Set(t.map(function(i){return i.id}));for(var n=d(Array.from(e.H.keys())),r=n.next();!r.done;r=n.next())r=r.value,t.has(r)||e.H.delete(r)}function pP(e){var t=Array.from(e.G.keys()).filter(function(a){return!e.D.includes(a)});t=d(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var r=!0,i=d(e.G.get(n)),o=i.next();!o.done;o=i.next()){o=o.value;var s=e.o.get(o);s&&(s.segmentIndex&&s.segmentIndex.getNumReferences()!=0?r=!1:(e.m&&e.m.Vh(s,n),e.o.delete(o)))}r&&e.G.delete(n)}}function gP(e,t){t=new Set(t.map(function(i){return i.id}));for(var n=d(e.C.keys()),r=n.next();!r.done;r=n.next())r=r.value,t.has(r)||e.C.delete(r)}function mP(e,t,n,r){t.va=Ug(e,r.node,null,n),t.na=r,t.va.mb=t.mb,t.va.id||(t.va.id="__shaka_period_"+r.start);var i=Mn(r.node,"EventStream");n=t.presentationTimeline.Db(),i=d(i);for(var o=i.next();!o.done;o=i.next())AP(e,r.start,r.duration,o.value,n);for(n=Mn(r.node,"SupplementalProperty"),n=d(n),i=n.next();!i.done;i=n.next())i=i.value,i.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(i=Fc(e,i))&&(t.Fb=i);if(n=Mn(r.node,"AdaptationSet").map(function(E,A){return nT(e,t,A,E)}).filter(cs),t.pb){i=[],o=d(n);for(var s=o.next();!s.done;s=o.next()){s=d(s.value.Pk);for(var a=s.next();!a.done;a=s.next())i.push(a.value)}if(i.length!=new Set(i).size)throw new fe(2,4,4018)}for(i=new Map,o=d(n),s=o.next();!s.done;s=o.next())for(s=d(s.value.xj),a=s.next();!a.done;a=s.next()){var u=d(a.value);a=u.next().value,u=u.next().value,i.set(a,u)}if(i.size)for(o=null,s=d(n),a=s.next();!a.done;a=s.next()){a=a.value,u=[];for(var l=d(a.streams),h=l.next(),g={};!h.done;g={wh:void 0},h=l.next())if(g.wh=h.value,i.has(g.wh.originalId)){o||(o=Mn(r.node,"AdaptationSet").map(function(E,A){return nT(e,t,A,E)}).filter(cs)),h=d(o);for(var m=h.next();!m.done;m=h.next())(m=m.value.streams.find(function(E){return function(A){return A.originalId==E.wh.originalId}}(g)))&&(m.dependencyStream=i.get(m.originalId),m.originalId+=m.dependencyStream.originalId,u.push(m))}u.length&&a.streams.push.apply(a.streams,M(u))}if(r=d(Rn(n,function(E){return!!E.fj})),n=r.next().value,r=r.next().value,!e.g.disableIFrames){for(n=d(n),i=n.next();!i.done;i=n.next())for(i=i.value,o=i.fj.split(" "),s=d(r),a=s.next();!a.done;a=s.next())if(a=a.value,o.includes(a.id))for(a=d(a.streams),u=a.next();!u.done;u=a.next())rn(u.value,i.streams)}if(n=Fd(e.g.disableAudio,r,"audio"),i=Fd(e.g.disableVideo,r,"video"),o=Fd(e.g.disableText,r,Bt),r=Fd(e.g.disableThumbnails,r,"image"),i.length===0&&n.length===0)throw new fe(2,4,4004);return{id:t.va.id,audioStreams:n,videoStreams:i,textStreams:o,imageStreams:r}}function Fd(e,t,n){return e||!t.length?[]:t.reduce(function(r,i){return i.contentType!=n||r.push.apply(r,M(i.streams)),r},[])}function nT(e,t,n,r){function i(ye){var Ve=ye.attributes["dvb:fontFamily"];ye=ye.attributes["dvb:url"],Ve&&ye&&(ye=Rr(t.qa.bb(),[ye],t.Fb()),e.j.addFont(Ve,ye[0]))}function o(ye){switch(ye){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function s(ye){switch(ye){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.qa=Ug(e,r,t.va,null),t.qa.position=n;var a=!1;n=Mn(r,"Role");var u=n.map(function(ye){return ye.attributes.value}).filter(cs),l=void 0,h=t.qa.contentType==Bt;h&&(l="subtitle"),n=d(n);for(var g=n.next();!g.done;g=n.next()){g=g.value;var m=g.attributes.schemeIdUri;if(m==null||m=="urn:mpeg:dash:role:2011")switch(g=g.attributes.value,g){case"main":a=!0;break;case"caption":case"subtitle":l=g}}var E=Mn(r,"EssentialProperty");n=null;var A=!1;g=null,m=!1,E=d(E);for(var k=E.next();!k.done;k=E.next()){k=k.value;var b=k.attributes.schemeIdUri;if(b=="http://dashif.org/guidelines/trickmode")n=k.attributes.value;else if(b=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var V=s(parseInt(k.attributes.value,10));else if(b=="urn:mpeg:mpegB:cicp:ColourPrimaries")var B=o(parseInt(k.attributes.value,10));else b!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(b=="urn:mpeg:dash:ssr:2023"&&e.g.dash.enableFastSwitching?A=!0:b=="urn:dvb:dash:fontdownload:2014"?i(k):b=="urn:mpeg:dash:urlparam:2014"&&(g=Fc(e,k))||(m=!0))}if(m)return null;var Z=null;for(m=Mn(r,"SupplementalProperty"),m=d(m),E=m.next();!E.done;E=m.next())E=E.value,k=E.attributes.schemeIdUri,k=="http://dashif.org/guidelines/last-segment-number"?Z=parseInt(E.attributes.value,10)-1:k=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?V=s(parseInt(E.attributes.value,10)):k=="urn:mpeg:mpegB:cicp:ColourPrimaries"?B=o(parseInt(E.attributes.value,10)):k=="urn:dvb:dash:fontdownload:2014"?i(E):k=="urn:mpeg:dash:urlparam:2014"&&(g=Fc(e,E));g&&(t.Fb=g),g=Mn(r,"Accessibility");var ue=new Map,pe;for(g=d(g),m=g.next();!m.done;m=g.next())if(E=m.value,m=E.attributes.schemeIdUri,E=E.attributes.value,m!="urn:scte:dash:cc:cea-608:2015"||e.g.disableText)if(m!="urn:scte:dash:cc:cea-708:2015"||e.g.disableText)m=="urn:mpeg:dash:role:2011"?E!=null&&(u.push(E),E=="captions"&&(l="caption")):m=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(E=="1"?pe="visually impaired":E=="2"?pe="hard of hearing":E=="9"&&(pe="spoken subtitles"));else if(m=1,E!=null)for(E=d(E.split(";")),k=E.next();!k.done;k=E.next()){b=k.value;var te=k=void 0;b.includes("=")?(b=b.split("="),k="svc"+b[0],te=b[1].split(",")[0].split(":").pop()):(k="svc"+m,m++,te=b),ue.set(k,bn(te))}else ue.set("svc1","und");else if(m=1,E!=null)for(E=E.split(";"),k=d(E),b=k.next();!b.done;b=k.next()){te=b.value;var le=b=void 0;te.includes("=")?(te=te.split("="),b=te[0].startsWith("CC")?te[0]:"CC"+te[0],le=te[1]||"und"):(b="CC"+m,E.length==2?m+=2:m++,le=te),ue.set(b,bn(le))}else ue.set("CC1","und");g=Mn(r,"ContentProtection");var ie=CS(e.za,g,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI);t.qa.encrypted=g.length>0;var ve=bn(t.qa.language||"und"),ce=t.qa.label,Ee=new Map;if(r=Mn(r,"Representation"),!e.g.ignoreSupplementalCodecs){for(g=[],m=d(r),E=m.next();!E.done;E=m.next())k=E.value,(E=Co(k,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&(k=Ki(k),k.attributes.codecs=E.split(" ").join(","),k.attributes.id&&(k.attributes.supplementalId=k.attributes.id+"_supplementalCodecs"),g.push(k));r.push.apply(r,M(g))}if(g=r.map(function(ye){var Ve=vP(e,t,ie,l,ve,ce,a,u,ue,ye,pe,Z);return Ve&&(Ve.hdr=Ve.hdr||V,Ve.colorGamut=Ve.colorGamut||B,Ve.fastSwitching=A,ye=ye.attributes.dependencyId)?(Ve.baseOriginalId=ye,Ee.set(ye,Ve),null):Ve}).filter(function(ye){return!!ye}),g.length==0&&Ee.size==0){if(n=t.qa.contentType=="image",e.g.dash.ignoreEmptyAdaptationSet||h||n)return null;throw new fe(2,4,4003)}if(!t.qa.contentType||t.qa.contentType=="application")for(t.qa.contentType=sT(g[0].mimeType,g[0].codecs),h=d(g),m=h.next();!m.done;m=h.next())m.value.type=t.qa.contentType;for(h=t.qa.id||"__fake__"+e.Ka++,m=d(g),E=m.next();!E.done;E=m.next()){for(E=E.value,k=d(ie.drmInfos),b=k.next();!b.done;b=k.next())b=b.value,b.keyIds=b.keyIds&&E.keyIds?new Set([].concat(M(b.keyIds),M(E.keyIds))):b.keyIds||E.keyIds;e.g.enableAudioGroups&&(E.groupId=h)}return r=r.map(function(ye){return ye.attributes.supplementalId||ye.attributes.id}).filter(cs),{id:h,contentType:t.qa.contentType,language:ve,Dm:a,streams:g,drmInfos:ie.drmInfos,fj:n,Pk:r,xj:Ee}}function Fc(e,t){if((t=Oi(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&At(t,"useMPDUrlQuery",tt,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return n=="$querypart$"?e.ba:n.split("&").map(function(r){if(r=="$querypart$")return e.ba;var i=/\$query:(.*?)\$/g.exec(r);if(i&&i.length==2){i=i[1];var o=new Mr(e.ba).get(i);if(o.length)return i+"="+o[0]}return r}).join("&")}}return null}function vP(e,t,n,r,i,o,s,a,u,l,h,g){t.L=Ug(e,l,t.qa,null);var m=t.L.id;if(e.ma=Math.min(e.ma,t.L.mb),e.V=e.ma>0,!xP(t.L))return null;var E=t.na.start;t.bandwidth=At(l,"bandwidth",ge)||0,t.roles=a;var A=Mn(l,"SupplementalProperty"),k=Mn(l,"EssentialProperty"),b=Mn(l,"ContentProtection");l=null;var V=k.find(function(Ce){return Ce.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});(V||(V=A.find(function(Ce){return Ce.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"})))&&(l=Fc(e,V)),l&&(t.Fb=l),V=t.L.contentType,l=V==Bt||V=="application",V=V=="image",b.length&&(t.qa.encrypted=!0);try{var B=void 0;if(n.ag){var Z=t.L.bb,ue=t.Fb,pe=Rr(Z(),[n.ag.rk],ue()),te=jr(pe,e.g.retryParameters);B={bitsKey:128,blockCipherMode:"CBC",iv:n.ag.iv,firstMediaSequenceNumber:0,fetchKey:function(){var Ce,ke,Ge;return H(function(Je){if(Je.h==1)return Je.g(Bg(e,te,6),2);if(Je.h!=3){if(Ce=Je.i,!Ce.data||Ce.data.byteLength!=16)throw new fe(2,4,4049);return ke={name:"AES-CBC"},Ge=B,Je.g(R.crypto.subtle.importKey("raw",Ce.data,ke,!0,["decrypt"]),3)}Ge.cryptoKey=Je.i,B.fetchKey=void 0,Je.j()})}}}if(t.L.aesKey=B,Z=function(Ce,ke,Ge,Je){return oT(e,Ce,ke,Ge,Je)},t.L.Dd)var le=VM(t,Z,B);else if(t.L.vc)le=HM(t,e.o,B);else if(t.L.Ic)le=jS(t,Z,e.o,!!e.h,e.g.dash.initialSegmentLimit,e.Ba,B,g,!1,e.C);else{var ie=t.na.duration||0,ve=t.L.bb,ce=t.L.mimeType,Ee=t.L.codecs;le={endTime:-1,timeline:-1,Mc:function(){var Ce=bf(E,ie,ve());return Ce.Bb(function(ke){ke.mimeType=ce,ke.codecs=Ee}),Promise.resolve(Ce)},timescale:1}}}catch(Ce){if((l||V)&&Ce.code==4002)return null;throw Ce}g=CM(e.za,b,n,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI),g=new Set(g?[g]:[]),b=!1,A.some(function(Ce){return Ce.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&Ce.attributes.value=="JOC"})&&(b=!0),A=!1,l&&(A=a.includes("forced_subtitle")||a.includes("forced-subtitle"));var ye;if(V&&((k=k.find(function(Ce){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(Ce.attributes.schemeIdUri)}))&&(ye=k.attributes.value),!ye))return null;var Ve;l=t.L.codecs,t.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(Ve="PQ"),k=t.L.id?t.va.id+","+t.L.id:"",e.I.length&&m&&e.u.set(t.va.id+","+m,SP(t)),t.L.xf&&yP(e,t.L.xf,le,t.presentationTimeline),le.endTime!=-1&&t.va.id!=null&&t.L.id!=null&&((m=e.C.get(t.va.id))?(m.endTime=le.endTime,m.eh.includes(t.L.id)||m.eh.push(t.L.id),e.C.set(t.va.id,m)):e.C.set(t.va.id,{endTime:le.endTime,timeline:le.timeline,eh:[t.L.id]}));var Le=k&&e.o.has(k)?e.o.get(k):{id:e.Ka++,originalId:t.L.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){Le.segmentIndex&&(Le.segmentIndex.release(),Le.segmentIndex=null)},segmentIndex:null,mimeType:t.L.mimeType,codecs:l,frameRate:t.L.frameRate,pixelAspectRatio:t.L.pixelAspectRatio,bandwidth:t.bandwidth,width:t.L.width,height:t.L.height,kind:r,encrypted:n.drmInfos.length>0,drmInfos:n.drmInfos,keyIds:g,language:i,originalLanguage:t.qa.language,label:o,type:t.qa.contentType,primary:s,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:t.L.emsgSchemeIdUris,roles:a,forced:A,channelsCount:t.L.uf,audioSamplingRate:t.L.audioSamplingRate,spatialAudio:b,closedCaptions:u,hdr:Ve,colorGamut:void 0,videoLayout:void 0,tilesLayout:ye,accessibilityPurpose:h,external:!1,fastSwitching:!1,fullMimeTypes:new Set([ar(t.L.mimeType,t.L.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};return Le.createSegmentIndex=function(){var Ce;return H(function(ke){if(ke.h==1)return Le.segmentIndex?ke.A(0):(Ce=Le,ke.g(le.Mc(),3));Ce.segmentIndex=ke.i,ke.j()})},k&&t.pb&&!e.o.has(k)&&(t=t.va.id||"",e.G.has(t)||e.G.set(t,[]),e.o.set(k,Le),e.G.get(t).push(k)),Le}function yP(e,t,n,r){if(!e.oa.has(t)){e.oa.add(t);var i=At(t,"presentationTime",je)||0,o=Pn(t,"UTCTiming"),s;(s=o&&o.attributes.schemeIdUri)&&(o=o.attributes.schemeIdUri,s=!(o==="urn:mpeg:dash:utc:http-ntp:2014"||o==="urn:mpeg:dash:utc:ntp:2014"||o==="urn:mpeg:dash:utc:sntp:2014")),s?t=(At(t,"wallClockTime",W)||0)*1e3:(t=At(t,"wallClockTime",je)||0,t=Iy(t)),n=new Date(t-i/n.timescale*1e3),i=n.getTime()/1e3,isNaN(i)||(r.o||r.qh(i),r=new Map().set("detail",{wallClockTime:t,programStartDate:n}),r=new yt("prft",r),e.j.onEvent(r))}}function SP(e){function t(n){return n?(n=_o(n),n.Dd=null,n.vc=null,n.Ic=_t(n.Ic),n.xf=null,n):null}return e=_o(e),e.va=t(e.va),e.qa=t(e.qa),e.L=t(e.L),e.na&&(e.na=_o(e.na),e.na.node=null),e}function rT(e){var t,n;return H(function(r){switch(r.h){case 1:return t=0,r.m(2),r.g(jg(e),4);case 4:t=r.i,r.o(3);break;case 2:if(n=r.l(),e.j){if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.j.onError(n),r.return();n.severity=1,e.j.onError(n)}case 3:if(!e.j)return r.return();e.j.onManifestUpdated(),Fg(e,t),r.j()}})}function Fg(e,t){if(!(e.M<0)){var n=e.M;e.g.updatePeriod>=0&&(n=e.g.updatePeriod),e.N.ka(Math.max(n-t,st(e.Ga)))}}function Ug(e,t,n,r){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,uf:null,audioSamplingRate:null,mb:0,Df:1,encrypted:!1},r=r||n.bb;var i=t.attributes.id,o=t.attributes.supplementalId,s=Mn(t,"BaseURL"),a,u=!1;if(e.i)for(var l=d(s),h=l.next();!h.done;h=l.next()){var g=h.value;h=g.attributes.serviceLocation,g=_r(g),h&&g&&(yl(e.i,i,h,g),u=!0)}u&&e.i||(a=s.map(_r));var m=e.i;e=t.attributes.contentType||n.contentType,l=t.attributes.mimeType||n.mimeType,h=Sp([t.attributes.codecs||n.codecs]).join(","),g=At(t,"frameRate",rt)||n.frameRate;var E=t.attributes.sar||n.pixelAspectRatio,A=TP(Mn(t,"InbandEventStream"),n.emsgSchemeIdUris),k=Mn(t,"AudioChannelConfiguration");k=EP(k)||n.uf;var b=At(t,"audioSamplingRate",je)||n.audioSamplingRate;e||(e=sT(l,h));var V=Pn(t,"SegmentBase"),B=Pn(t,"SegmentTemplate"),Z=V&&At(V,"availabilityTimeOffset",qe)||0,ue=B&&At(B,"availabilityTimeOffset",qe)||0,pe=s&&s.length&&At(s[0],"availabilityTimeOffset",qe)||0;Z=n.mb+pe+Z+ue,ue=null,(pe=Pn(t,"SegmentSequenceProperties"))&&(pe=At(pe,"cadence",ge))&&(ue=pe),pe=t.attributes.label;var te=Mn(t,"Label");return te&&te.length&&(te=te[0],vr(te)&&(pe=vr(te))),{bb:function(){return Rr(r(),s.length?m&&u?Dc(m,i):a||[]:[])},Dd:V||n.Dd,vc:Pn(t,"SegmentList")||n.vc,Ic:B||n.Ic,xf:Pn(t,"ProducerReferenceTime")||n.xf,width:At(t,"width",je)||n.width,height:At(t,"height",je)||n.height,contentType:e,mimeType:l,codecs:h,frameRate:g,pixelAspectRatio:E,emsgSchemeIdUris:A,id:o||i,originalId:i,language:t.attributes.lang,uf:k,audioSamplingRate:b,mb:Z,bf:null,Df:ue||n.Df,label:pe||null,encrypted:!1}}function TP(e,t){t=t.slice(),e=d(e);for(var n=e.next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}function EP(e){e=d(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=t.attributes.schemeIdUri;if(n&&(t=t.attributes.value))switch(n){case"urn:mpeg:dash:outputChannelPositionList:2012":return t.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(t=parseInt(t,10),!t)continue;return t;case"tag:dolby.com,2015:dash:audio_channel_configuration:2015":if(n=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2],t=parseInt(t,16),!t)continue;for(var r=0,i=0;i<n.length;i++)t&1<<i&&(r+=n[i]);if(r)return r;continue;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(n=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse(),t=parseInt(t,16),!t)continue;for(i=r=0;i<n.length;i++)t&1<<i&&(r+=n[i]);if(r)return r;continue;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(n=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(t=parseInt(t,10))&&t>0&&t<n.length)return n[t]}}return null}function xP(e){var t=e.Dd?1:0;return t+=e.vc?1:0,t+=e.Ic?1:0,t==0?e.contentType==Bt||e.contentType=="application":(t!=1&&(e.Dd&&(e.vc=null),e.Ic=null),!0)}function iT(e,t,n,r){var i,o,s,a,u,l,h;return H(function(g){if(g.h==1)return i=[zr(n)],o=Rr(t(),i),s=jr(o,e.g.retryParameters),s.method=r,a=e.j.networkingEngine.request(4,s,{isPreload:e.ua()}),gu(e.T,a),g.g(a.promise,2);if(u=g.i,r=="HEAD"){if(!u.headers||!u.headers.date)return g.return(0);l=u.headers.date}else l=Un(u.data);return h=Date.parse(l),isNaN(h)?g.return(0):g.return(h-Date.now())})}function wP(e,t,n){var r,i,o,s,a,u,l,h;return H(function(g){switch(g.h){case 1:r=n.map(function(m){return{scheme:m.attributes.schemeIdUri,value:m.attributes.value}}),i=e.g.dash.clockSyncUri,!r.length&&i&&r.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:i}),o=d(r),s=o.next();case 2:if(s.done){g.A(4);break}switch(a=s.value,g.m(5),u=a.scheme,l=a.value,u){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return g.A(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return g.A(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return h=Date.parse(l),g.return(isNaN(h)?0:h-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":ut("NTP UTCTiming scheme is not supported");break;default:ut("Unrecognized scheme in UTCTiming element",u)}g.A(9);break;case 7:return g.g(iT(e,t,l,"HEAD"),10);case 10:return g.return(g.i);case 8:return g.g(iT(e,t,l,"GET"),11);case 11:return g.return(g.i);case 9:g.o(3);break;case 5:g.l();case 3:s=o.next(),g.A(2);break;case 4:return ut("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),g.return(0)}})}function AP(e,t,n,r,i){var o=r.attributes.schemeIdUri||"",s=r.attributes.value||"",a=At(r,"timescale",je)||1,u=At(r,"presentationTimeOffset",je)||0;r=d(Mn(r,"Event"));for(var l=r.next();!l.done;l=r.next()){l=l.value;var h=At(l,"presentationTime",je)||0,g=At(l,"duration",je)||0;h=Math.max((h-u)/a+t,t),g=h+g/a,n!=null&&(h=Math.min(h,t+n),g=Math.min(g,t+n)),g<i||(l={schemeIdUri:o,value:s,startTime:h,endTime:g,id:l.attributes.id||"",timescale:a,eventElement:Xn(l),eventNode:_t(l)},e.j.onTimelineRegionAdded(l))}}function oT(e,t,n,r,i){var o,s,a,u;return H(function(l){return l.h==1?(o=Go,s=i?0:1,a=ic(t,n,r,e.g.retryParameters),l.g(Bg(e,a,o,{type:s}),2)):(u=l.i,l.return(u.data))})}function sT(e,t){return t=ar(e,t),cu(t)?Bt:e.split("/")[0]}function Bg(e,t,n,r){return r||(r={}),r.isPreload=e.ua(),t=e.j.networkingEngine.request(n,t,r),gu(e.T,t),t.promise}function IP(e){var t=e.l.ie;if(!e.l.qf||!t||!e.I.length)return[];var n=Date.now()/1e3,r=e.I.filter(function(i){return i=je(i.attributes.ttl),!i||t+i>n}).map(_r).filter(cs);return r.length?Rr(e.B,r):[]}function aT(){return""}function CP(e,t,n){return function(){return e&&t?Dc(e,"BaseURL"):n.slice()}}Re("shaka.dash.DashParser",jc),Hi("application/dash+xml",function(){return new jc}),Hi("video/vnd.mpeg.dash.mpd",function(){return new jc});function Ud(){}Re("shaka.dependencies",Ud),Ud.has=function(e){return Vg.has(e)},Ud.add=function(e,t){if(!lT[e])throw Error(e+" is not supported");e==uT?lt("mux.js","mux.js is no longer used in Shaka Player."):Vg.set(e,function(){return t})};var uT="muxjs",lT={Em:uT,ISOBoxer:"ISOBoxer"};Ud.Allowed=lT;var Vg=new Map([["ISOBoxer",function(){return R.ISOBoxer}]]);function jn(){this.j=new Kt(function(){for(var e=navigator.userAgent.toLowerCase(),t=d([{type:"VR",dh:/oculus|quest/},{type:"TV",dh:/smart[ _]?tv|android ?tv/},{type:"MOBILE",dh:/iphone|ipad|ipod|android/}]),n=t.next();!n.done;n=t.next())if(n=n.value,n.dh.test(e))return n.type;e=navigator.userAgentData;var r;if(t=(e==null||(r=e.platform)==null?void 0:r.toLowerCase())||"",e){if(e.mobile)return"MOBILE";if(t.includes("android"))return"TV"}return"DESKTOP"}),this.l=new Kt(function(){var e=navigator.userAgent;return navigator.vendor.includes("Apple")&&(e.includes("Version/")||e.includes("OS/"))?"WEBKIT":e.includes("Edge/")?"EDGE":e.includes("Chrome/")?"CHROMIUM":e.includes("Firefox/")?"GECKO":"UNKNOWN"})}function Ks(){var e=R.ManagedMediaSource||R.MediaSource;return!!(e&&e.isTypeSupported)}f=jn.prototype,f.cc=function(){return!!navigator.mediaCapabilities},f.Pa=function(){return this.j.value()},f.Ia=function(){return this.l.value()},f.zd=function(){return!1},f.gh=function(){return!1},f.cf=function(){return!1},f.Ii=function(){return!1},f.ke=function(){return!1},f.Xc=function(){return!0},f.wb=function(){var e=R.ManagedSourceBuffer||R.SourceBuffer;return!!e&&!!e.prototype&&!!e.prototype.changeType},f.oe=function(){return!0},f.Ni=function(){return 0},f.fc=function(){return Promise.resolve({width:1/0,height:1/0})},f.Wi=function(){return!1},f.sh=function(){return!1},f.Wa=function(e){var t=this.Pa();return(t==="TV"||t==="CONSOLE"||t==="CAST")&&(e.ads.customPlayheadTracker=!0,e.ads.skipPlayDetection=!0,e.ads.supportsMultipleMediaElements=!1),e},f.yh=function(){return!!R.indexedDB},f.Gi=function(){return[]},f.ld=function(e){return R.matchMedia!==void 0&&R.matchMedia("(color-gamut: p3)").matches?e?"HLG":"PQ":"SDR"},f.cj=function(){return!1},f.wi=function(){return!1},f.Af=function(){return!1},f.Jf=function(){return!0},f.xi=function(){return!1},f.bj=function(){return!0},f.Wc=function(){return!1},f.Sg=function(e){return e==="com.apple.fps"},f.If=function(){return!0},f.toString=function(){return"Device: "+this.Hb()+" v"+this.Ca()+"; Type: "+this.Pa()};function _g(){jn.call(this),this.g=new Kt(function(){var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}),this.h=new Kt(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}P(_g,jn),f=_g.prototype,f.Ca=function(){return this.g.value()},f.Hb=function(){return"Apple Browser"},f.Pa=function(){return this.h.value()},f.Ia=function(){return"WEBKIT"},f.cc=function(){return!1},f.zd=function(e,t){return t==="audio"},f.cf=function(){return!0},f.Ii=function(e){return e==="audio"},f.Wa=function(e){return jn.prototype.Wa.call(this,e),e.abr.minTimeToSwitch=.5,e},f.cj=function(){return!0},f.If=function(){return!1},(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(Nn=function(){return new _g});function Hg(){if(!cT())throw Error("Not a Chromecast device!");jn.call(this),this.h=new Kt(function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}),this.g=new Kt(function(){var e=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;return e=e.toLowerCase(),e.includes("android")?fT:e.includes("fuchsia")?dT:Gg})}P(Hg,jn),f=Hg.prototype,f.Ca=function(){return this.h.value()},f.Hb=function(){return"Chromecast with "+this.g.value()},f.Pa=function(){return"CAST"},f.Ia=function(){return"CHROMIUM"},f.cc=function(){return jn.prototype.cc.call(this)&&this.g.value()!==Gg},f.wb=function(){return jn.prototype.wb.call(this)&&this.g.value()!==Gg},f.Ni=function(){switch(this.g.value()){case fT:return 0;case dT:return 3;default:return 1}},f.fc=function(){var e,t,n,r,i;return H(function(o){switch(o.h){case 1:if(e=R.cast&&cast.__platform__&&cast.__platform__.canDisplayType,t={width:1280,height:720},o.m(2),!(n=e)){o.A(4);break}return o.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:n=o.i;case 4:if(n){t.width=3840,t.height=2160,o.A(6);break}if(!(r=e)){o.A(7);break}return o.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:r=o.i;case 7:r&&(t.width=1920,t.height=1080);case 6:o.o(3);break;case 2:i=o.l(),gn("Failed to check canDisplayType:",i);case 3:return o.return(t)}})},f.Wa=function(e){return jn.prototype.Wa.call(this,e),e.streaming.stallSkip=0,e},f.yh=function(){return!1},f.Wc=function(){return!0};function cT(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var fT="Android",dT="Fuchsia",Gg="Linux";cT()&&(Nn=function(){return new Hg});function Kg(){jn.call(this);var e=this;this.i=new Kt(function(){var t=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return t?parseInt(t[2],10):null}),this.g=new Kt(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"}),this.h=new Kt(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}),this.u=new Kt(function(){return jn.prototype.wb.call(e)?navigator.userAgent.match(/Edge?\//)?!e.h.value():!0:!1}),this.o=new Kt(function(){return navigator.userAgent.includes("sony.hbbtv.tv")}),this.m=new Kt(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":!!navigator.userAgent.includes("Android")})}P(Kg,jn),f=Kg.prototype,f.Ca=function(){return this.i.value()},f.Hb=function(){return this.g.value()},f.zd=function(e){return Eo(e)?this.g.value()==="Edge"&&this.h.value():!1},f.gh=function(){return this.g.value()==="Edge"&&this.h.value()},f.cf=function(){return this.g.value()==="Edge"&&this.h.value()},f.wb=function(){return this.u.value()},f.Wa=function(e){if(jn.prototype.Wa.call(this,e),this.h.value())switch(this.g.value()){case"Firefox":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case"Chrome":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}return this.m.value()&&(e.drm.defaultAudioRobustnessForWidevine="",e.drm.defaultVideoRobustnessForWidevine=""),e},f.Af=function(){return this.g.value()==="Edge"||this.o.value()},f.Wc=function(){if(this.Ia()==="GECKO"){var e=this.Ca();return e!==null?e>=100:jn.prototype.Wc.call(this)}return jn.prototype.Wc.call(this)},f.Sg=function(e){return this.Ia()==="GECKO"?e.startsWith("com.microsoft.playready.recommendation"):jn.prototype.Sg.call(this,e)},at=function(){return new Kg};function Wg(){jn.apply(this,arguments)}P(Wg,jn),f=Wg.prototype,f.Ca=function(){return null},f.Hb=function(){return"Hisense"},f.Pa=function(){return"TV"},f.cc=function(){return!1},f.wb=function(){return!1},f.fc=function(){var e={width:1920,height:1080},t=null;if(R.Hisense_Get4KSupportState)try{t=R.Hisense_Get4KSupportState()}catch{}return t==null&&(t=navigator.userAgent.includes("UHD")),t&&(e.width=3840,e.height=2160),Promise.resolve(e)},f.Wa=function(e){return jn.prototype.Wa.call(this,e),e.streaming.stallSkip=0,e},(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))&&(Nn=function(){return new Wg});function zg(){jn.call(this),this.g=new Kt(function(){var e=navigator.userAgent.match(/PlayStation (\d+)/);return e?parseInt(e[1],10):null})}P(zg,jn),f=zg.prototype,f.Hb=function(){return"PlayStation"},f.Pa=function(){return"CONSOLE"},f.Ia=function(){return"WEBKIT"},f.Ca=function(){return this.g.value()},f.cc=function(){return!1},f.Xc=function(){return!1},f.wb=function(){return!1},f.sh=function(){return this.Ca()===4},f.fc=function(){var e,t,n,r,i;return H(function(o){switch(o.h){case 1:return e={width:1920,height:1080},t=!1,o.m(2),o.g(R.msdk.device.getDisplayInfo(),4);case 4:n=o.i,t=n.resolution==="4K",o.o(3);break;case 2:return o.l(),o.m(5),o.g(R.msdk.device.getDisplayInfoImmediate(),7);case 7:r=o.i,t=r.resolution==="4K",o.o(3);break;case 5:i=o.l(),ut("PlayStation: Failed to get the display info:",i);case 3:return t&&(e.width=3840,e.height=2160),o.return(e)}})},f.Wa=function(e){return jn.prototype.Wa.call(this,e),this.Ca()===4&&e.drm.preferredKeySystems.push("com.microsoft.playready"),e.streaming.clearDecodingCache=!0,e},f.Af=function(){return this.Ca()===4},f.Jf=function(){return this.Ca()!==4},navigator.userAgent.includes("PlayStation")&&(Nn=function(){return new zg});function $g(){jn.call(this);var e=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=e?parseInt(e[1],10):null,this.h=e?parseInt(e[2],10):null}P($g,jn),f=$g.prototype,f.Ca=function(){return this.g},f.Hb=function(){return"Tizen"},f.Ia=function(){return"CHROMIUM"},f.Pa=function(){return"TV"},f.zd=function(){return!0},f.ke=function(){return this.Ca()===3},f.cc=function(){return!1},f.Xc=function(){var e=this.Ca();return e!==null?e>=4:jn.prototype.Xc.call(this)},f.wb=function(){return!1},f.oe=function(){return this.g&&this.h?this.g===5?this.h>=5:this.g>5:jn.prototype.oe.call(this)},f.fc=function(){var e=R.devicePixelRatio;e={width:R.screen.width*e>1920?3840:1920,height:R.screen.height*e>1080?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var t=webapis.systeminfo.getMaxVideoResolution();e.width=t.width,e.height=t.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(e.width=7680,e.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(e.width=3840,e.height=2160)}catch{ut("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},f.Wa=function(e){return jn.prototype.Wa.call(this,e),e.drm.ignoreDuplicateInitData=this.Ca()!==2,this.Ca()===3&&(e.streaming.crossBoundaryStrategy="reset_to_encrypted"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e.streaming.gapPadding=2,e},f.Gi=function(){var e=[];return this.g!==null&&this.g<5&&e.push("opus"),e},f.ld=function(e){try{if(webapis.avinfo.isHdrTvSupport())return e?"HLG":"PQ"}catch{return jn.prototype.ld.call(this,e)}return"SDR"},f.wi=function(){return!0},f.xi=function(){return this.Ca()===3},navigator.userAgent.includes("Tizen")&&(Nn=function(){return new $g});function Tl(){jn.apply(this,arguments)}P(Tl,jn),Tl.prototype.Ca=function(){return null},Tl.prototype.Hb=function(){return"Vizio"},Tl.prototype.Pa=function(){return"TV"},Tl.prototype.cc=function(){return!1},navigator.userAgent.includes("VIZIO SmartCast")&&(Nn=function(){return new Tl});function Xg(){jn.call(this),this.i=new Kt(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")}),this.h=new Kt(function(){return navigator.userAgent.includes("SOPOpenBrowser")}),this.g=new Kt(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null})}P(Xg,jn),f=Xg.prototype,f.Ca=function(){return this.g.value()},f.Hb=function(){return"WebKit STB"},f.Pa=function(){return"TV"},f.Ia=function(){return"WEBKIT"},f.cc=function(){return!1},f.Xc=function(){var e=this.g.value();return e!==null?e>=15:!0},f.zd=function(){return this.h.value()},f.fc=function(){return Promise.resolve({width:R.screen.width*R.devicePixelRatio,height:R.screen.height*R.devicePixelRatio})},f.Jf=function(){return!this.i.value()},f.If=function(){return!1},(navigator.userAgent.includes("SOPOpenBrowser")||navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))&&(Nn=function(){return new Xg});function Yg(){jn.call(this);var e=this;this.h=MP(),this.g=null;try{var t=new PalmServiceBridge;t.onservicecallback=function(n){n=JSON.parse(n);var r,i,o,s;e.g=(s=(o=(r=n.configs)==null?void 0:r["tv.model.supportHDR"])!=null?o:(i=n.configs)==null?void 0:i["tv.config.supportDolbyHDRContents"])!=null?s:!1},t.call("luna://com.webos.service.config/getConfigs",JSON.stringify({configNames:["tv.model.supportHDR","tv.config.supportDolbyHDRContents"]}))}catch(n){ut("WebOS: getConfigs call failed",n)}}P(Yg,jn),f=Yg.prototype,f.Ca=function(){return this.h},f.Hb=function(){return"WebOS"},f.Pa=function(){return"TV"},f.Ia=function(){return"CHROMIUM"},f.cc=function(){return!1},f.Xc=function(){var e=this.Ca();return e!==null?e>3:jn.prototype.Xc.call(this)},f.wb=function(){return!1},f.oe=function(){var e=this.Ca();return e!==null?e>3:jn.prototype.oe.call(this)},f.fc=function(){var e={width:1920,height:1080};try{var t=JSON.parse(R.PalmSystem.deviceInfo);e.width=Math.max(1920,t.screenWidth),e.height=Math.max(1080,t.screenHeight)}catch{ut("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},f.Wa=function(e){return jn.prototype.Wa.call(this,e),this.Ca()===3&&(e.streaming.crossBoundaryStrategy="reset"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e},f.ld=function(e){return this.g==null?(ut("WebOS: getConfigs call haven't finished"),jn.prototype.ld.call(this,e)):this.g?e?"HLG":"PQ":"SDR"};function MP(){var e=null,t=navigator.userAgent.match(/Chrome\/(\d+)/);switch(t&&(e=parseInt(t[1],10)),e){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;default:return null}}if(f.bj=function(){return!1},f.Wc=function(){var e=this.Ca();return e!==null?e>=6:jn.prototype.Wc.call(this)},navigator.userAgent.includes("Web0S")){var PP=new Yg;Nn=function(){return PP}}function Jg(){jn.call(this),this.g=navigator.userAgent.includes("Edge/");var e=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=e?parseInt(e[1],10):null}P(Jg,jn),f=Jg.prototype,f.Ca=function(){return this.h},f.Hb=function(){return"Xbox"},f.Pa=function(){return"CONSOLE"},f.Ia=function(){return this.g?"EDGE":"CHROMIUM"},f.zd=function(){return!0},f.gh=function(){return!0},f.cf=function(){return!0},f.Wi=function(){return this.g},f.fc=function(){var e={width:1920,height:1080},t=hT();if(t)try{var n=new t.Media.Protection.ProtectionCapabilities,r=t.Media.Protection.ProtectionCapabilityResult;t=null;do t=n.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(t===r.maybe);t===r.probably&&(e.width=3840,e.height=2160)}catch{ut("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},f.Wa=function(e){return jn.prototype.Wa.call(this,e),e.drm.parseInbandPsshEnabled=this.g,e.drm.preferredKeySystems.push("com.microsoft.playready"),this.g&&(e.streaming.gapPadding=.01),e},f.Af=function(){return!0},f.yh=function(){return!1};function hT(){var e=null;try{e=typeof Windows<"u"?Windows:chrome.webview.hostObjects.sync.Windows}catch{}return e}(navigator.userAgent.includes("Xbox One")||hT()!==null)&&(Nn=function(){return new Jg});function pT(e,t,n){this.type=e,this.ha=t,this.segments=n||null}function El(e,t,n,r){this.id=e,this.name=t,this.attributes=n,this.value=r===void 0?null:r}El.prototype.toString=function(e){function t(i){return i.name+"="+(isNaN(Number(i.value))?'"'+i.value+'"':i.value)}var n="#"+this.name,r=this.attributes?this.attributes.filter(function(i){return e?!e.has(i.name):!0}).map(t):[];return this.value&&r.unshift(this.value),r.length>0&&(n+=":"+r.join(",")),n};function Qg(e,t){return t?e.toString():(t=new Set().add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI"),e.toString(t))}function xl(e,t){return e.attributes.find(function(n){return n.name===t})||null}function St(e,t,n){return(e=xl(e,t))?e.value:n||null}function $n(e,t){if(e=xl(e,t),!e)throw new fe(2,4,4023,t);return e.value}function gT(e,t,n){n=n===void 0?[]:n,this.ha=t,this.g=e,this.qc=n}function Bd(e,t){this.name=e,this.value=t}function Xo(e,t){return e.filter(function(n){return n.name==t})}function mT(e,t){return e.filter(function(n){return $n(n,"TYPE")==t})}function ai(e,t){e=d(e);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.name===t)return n;return null}function wl(e,t,n){return n=n===void 0?0:n,(e=ai(e,t))?Number(e.value):n}function Xa(e,t,n){return t?vT(e,[t],n):[]}function vT(e,t,n){if(!t.length)return[];var r=t;return n&&n.size&&(r=t.map(function(i){return yT(i,n)})),Rr(e,r)}function yT(e,t){if(!t||!t.size)return e;e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}");var n=e.match(/{\$\w*}/g);if(n){n=d(n);for(var r=n.next();!r.done;r=n.next()){r=r.value;var i=r.slice(2,r.length-1),o=t.get(i);if(o)e=e.replace(r,o);else throw new fe(2,4,4039,i)}}return e}function Zg(e){e=e.value;var t=e.indexOf(",");return Number(t===-1?e:e.substring(0,t))}function kP(){this.g=0}function qg(e,t){var n=Un(t).trim().split(/[\r\n]+/);if(!RP.test(n[0]))throw new fe(2,4,4015);t=0;for(var r=!1,i=[],o=!0,s=0;s<n.length;s++){var a=n[s],u=n[s+1];if(a.startsWith("#")&&!a.startsWith("#EXT")||o)o=!1;else{if(a=ST(e,a),r||(TT.has(a.name)?(t=1,r=!0):a.name=="EXT-X-STREAM-INF"||a.name=="EXT-X-MEDIA"?r=!0:ET.has(a.name)&&(t=1,r=!0)),ET.has(a.name)){if(t!=1)throw new fe(2,4,4017);o=e,e=Array(Math.max(100,Math.floor((n.length-s)/2))),r=0,a=[];var l=[];for(u=null;s<n.length;s++){var h=n[s];h.startsWith("#EXT")?(h=ST(o,h),TT.has(h.name)?i.push(h):h.name=="EXT-X-MAP"?u=h:h.name=="EXT-X-PART"?l.push(h):h.name=="EXT-X-PRELOAD-HINT"?St(h,"TYPE")=="PART"?l.push(h):St(h,"TYPE")=="MAP"&&(h.name="EXT-X-MAP",u=h):a.push(h)):(!h.startsWith("#")||h.startsWith("#EXT"))&&(h=h.trim(),u&&a.push(u),a=new gT(h,a,l),r<e.length?e[r++]=a:(e.push(a),r++),a=[],l=[])}return l.length&&(u&&a.push(u),n=new gT("",a,l),r<e.length?e[r++]=n:(e.push(n),r++)),new pT(t,i,r<e.length?e.slice(0,r):e)}i.push(a),a.name=="EXT-X-STREAM-INF"&&(a.attributes.push(new Bd("URI",u)),o=!0)}}return new pT(t,i)}function ST(e,t){e=e.g++;var n=t.indexOf(":"),r=n===-1?t.substring(1):t.substring(1,n);if(!r.startsWith("EXT"))throw new fe(2,4,4016,t);if(t=n===-1?null:t.substring(n+1),t===null)e=new El(e,r,[]);else if(t.indexOf("=")===-1)e=new El(e,r,[],t);else{n=[];var i=null,o=0,s=t.indexOf(","),a=t.indexOf("=");for(s!==-1&&s<a&&(i=t.substring(0,s),o=s+1);o<t.length;){for(;t[o]===" ";)o++;if(a=t.indexOf("=",o),a===-1)break;if(s=t.substring(o,a),o=a+1,t[o]==='"'){o++;var u=t.indexOf('"',o);a=u===-1?t.substring(o):t.substring(o,u),o=u===-1?t.length:u+1}else u=t.indexOf(",",o),a=u===-1?t.substring(o):t.substring(o,u),o=u===-1?t.length:u;o<t.length&&t[o]===","&&o++,n.push(new Bd(s,a))}e=new El(e,r,n,i)}return e}var RP=/^#EXTM3U($|[ \t\n])/m,TT=new Set("EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" ")),ET=new Set("EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" "));function xT(){}function wT(e,t){try{var n=Vd(e);return Bu({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(r){return Da(r)}}function Vd(e){if(!e.startsWith("data:"))throw new fe(2,1,1004,e);var t=e.substring(5),n=t.indexOf(",");if(n<0)throw new fe(2,1,1004,e);e=t.substring(0,n),t=decodeURIComponent(t.substring(n+1)),n=e.split(";"),e=n[0];var r=!1;n.length>1&&n[n.length-1].toLowerCase()=="base64"&&(r=!0,n.pop());var i;return r?i=bi(t):i=Vi(t),{data:i,contentType:e,Eh:n}}Re("shaka.net.DataUriPlugin",xT),xT.parse=wT,ua("data",wT);function _d(){var e=this;this.g=this.h=null,this.G=1,this.C=new Map,this.M=new Map,this.D=new Map,this.D.set("video",new Map),this.D.set("audio",new Map),this.D.set(Bt,new Map),this.D.set("image",new Map),this.Zb=new Map().set("com.apple.streamingkeydelivery",function(t,n,r){return i3(e,t,n,r)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(t){var n=$n(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var r="cenc";n=="SAMPLE-AES"&&(r="cbcs");var i=$n(t,"URI");if(n=Vd(i.split("?")[0]),i=i.split("?")[0],!e.I.has(i)){var o=wt(n.data);e.I.set(i,o)}r=Io("com.widevine.alpha",r,[{initDataType:"cenc",initData:e.I.get(i)}],void 0,n.Eh),(t=St(t,"KEYID"))&&r.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(r)}else t=Promise.resolve(null);return t}).set("com.microsoft.playready",function(t){var n=$n(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var r="cenc";n=="SAMPLE-AES"&&(r="cbcs"),t=$n(t,"URI"),n=Vd(t.split("?")[0]),t=wt(n.data);var i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);i=vf(t,i,new Set,0),r=Io("com.microsoft.playready",r,[{initDataType:"cenc",initData:i}],void 0,n.Eh),(t=As(["<PLAYREADY>",Ri(t),"</PLAYREADY>"].join(`
72
+ `)))&&(r.licenseServerUri=bd(t)),r=Promise.resolve(r)}else r=Promise.resolve(null);return r}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(t){var n=$n(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var r="cenc";n=="SAMPLE-AES"&&(r="cbcs");var i=$n(t,"URI");if(n=Vd(i.split("?")[0]),i=i.split("?")[0],!e.I.has(i)){var o=wt(n.data);e.I.set(i,o)}r=Io("com.huawei.wiseplay",r,[{initDataType:"cenc",initData:e.I.get(i)}],void 0,n.Eh),(t=St(t,"KEYID"))&&r.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(r)}else t=Promise.resolve(null);return t}),this.ib=new Set,this.j=new Map,this.m=null,this.H="",this.ab=new kP,this.N=-1,this.ma=1/0,this.ba=this.uc=this.hb=!1,this.B=new Yt(function(){if(e.X&&!e.g.continueLoadingWhenPaused&&(e.V.Na(e.X,"timeupdate"),e.X.paused)){e.V.Aa(e.X,"timeupdate",function(){return KT(e)});return}KT(e)}),this.Ga=Xd,this.i=null,this.eb=0,this.u=1/0,this.Ua=this.Ka=this.T=0,this.$=new Vu,this.J=new Map,this.K=new Map,this.Ba=new Map,this.ua=new Map,this.O=new Map,this.ya=new Map,this.za=new Map,this.tc=this.oa=!1,this.Wb=new Qe(5),this.l=null,this.P=!0,this.V=new Et,this.o=this.X=null,this.Yb=function(){return!1},this.I=new Map}f=_d.prototype,f.configure=function(e,t){var n=this.h&&e.updatePeriod!=this.g.updatePeriod&&e.updatePeriod>=0;this.g=e,t&&(this.Yb=t),this.l&&this.l.configure(this.g),n&&this.i&&this.i.presentationTimeline.U()&&this.B.xb()},f.start=function(e,t){var n=this,r;return H(function(i){return i.h==1?(n.h=t,n.oa=t.isLowLatencyMode(),i.g(sm(n,[e]).promise,2)):i.h!=3?(r=i.i,n.H=r.uri,i.g(OP(n,r.data),3)):i.return(n.i)})},f.stop=function(){this.B&&(this.B.stop(),this.B=null);var e=[];return this.$&&(e.push(this.$.destroy()),this.$=null),this.g=this.h=null,this.ib.clear(),this.i=null,this.j.clear(),this.M.clear(),this.K.clear(),this.C.clear(),this.Ba.clear(),this.ua.clear(),this.O.clear(),this.ya.clear(),this.za.clear(),this.I.clear(),this.l&&this.l.destroy(),this.V&&(this.V.release(),this.V=null),Promise.all(e)},f.update=function(){var e=this,t,n,r,i,o,s,a,u,l,h;return H(function(g){if(g.h==1){if(!Fi(e)||(t=[],n=Array.from(e.j.values()),r=n.filter(function(m){return!m.stream.isAudioMuxedInVideo&&m.stream.segmentIndex}),r.length===0))return g.return();for(e.u=1/0,e.i.gapCount=0,i=d(r),o=i.next();!o.done;o=i.next())s=o.value,t.push(bP(e,s));return g.g(Promise.all(t),2)}for(bT(e,r.map(function(m){return m.stream})),a=r.some(function(m){return m.Wd==0}),r.length&&!a&&(Wd(e,Xd),Hd(e)),a&&Hd(e),u=d(r),l=u.next();!l.done;l=u.next())h=l.value,h.stream.isAudioMuxedInVideo||!h.stream.segmentIndex||ks(h.stream.segmentIndex)||e.h.disableStream(h.stream);g.j()})};function em(e,t){return Fi(e)?e.D.get(t.type):t.mf}function bP(e,t){var n,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce,Ee,ye,Ve,Le,Ce,ke,Ge,Je,Ft,dt,kn;return H(function(Ut){switch(Ut.h){case 1:if(t.stream.isAudioMuxedInVideo)return Ut.return();for(n=[],r=d(t.R()),i=r.next();!i.done;i=r.next())o=i.value,s=new Ct(o),a=s.g,t.Ne&&(t.Kb>=0&&a.add("_HLS_msn",String(t.Kb)),t.Lb>=0&&a.add("_HLS_part",String(t.Lb))),t.Oe&&a.add("_HLS_skip","YES"),n.push(s.toString());return Ut.m(2),Ut.g(sm(e,n,!0).promise,4);case 4:u=Ut.i,Ut.o(3);break;case 2:throw l=Ut.l(),e.h&&e.h.disableStream(t.stream),l;case 3:if(!t.stream.segmentIndex)return Ut.return();if(h=qg(e.ab,u.data),h.type!=1)throw new fe(2,4,4017);return g=u.uri,g==u.originalUri||t.R().includes(g)||t.yf.push(g),m=Xo(h.ha,"EXT-X-DEFINE"),E=tm(e,m,g),A=t.stream,k=em(e,t),Ut.g(LT(e,h,A.mimeType,t.R,E),5);case 5:for(b=Ut.i,V=b.keyIds,B=b.drmInfos,Z=b.encrypted,ue=b.Mh,A.encrypted||!Z||ue||(A.encrypted=!0),pe=function(Gn,sn){return Gn.size===sn.size&&[].concat(M(Gn)).every(function(Qt){return sn.has(Qt)})},pe(A.keyIds,V)||(A.keyIds=V,A.drmInfos=B,e.h.newDrmInfo(A)),te=_T(e,h,k,E,t.R,t.type),le=te.segments,(ie=te.bandwidth)&&(A.bandwidth=ie),ve=Nf(A),ce=d(le),Ee=ce.next();!Ee.done;Ee=ce.next())ye=Ee.value,ye.ea&&(ye.ea.rd=ve);A.segmentIndex.be(le,e.m.Db()),le.length&&(Ve=wl(h.ha,"EXT-X-MEDIA-SEQUENCE",0),Ce=(Le=ai(h.ha,"EXT-X-SKIP"))?Number(St(Le,"SKIPPED-SEGMENTS")):0,ke=OT(Ve,le),Ge=ke.Kb,Je=ke.Lb,t.Kb=Ge+Ce,t.Lb=Je,Ft=k.get(Ve),A.segmentIndex.Ya(Ft)),(dt=ks(A.segmentIndex))&&(t.Pc=dt.startTime,kn=le[le.length-1],t.Gc=kn.endTime),ai(h.ha,"EXT-X-ENDLIST")&&(t.Wd=!0),rm(e,h),im(e,h.ha,A.type,E,t.R),Ut.j()}})}f.onExpirationUpdated=function(){},f.onInitialVariantChosen=function(){},f.banLocation=function(e){this.l&&this.l.banLocation(e)},f.setMediaElement=function(e){this.X=e};function AT(e,t,n){n=n===void 0?!1:n;for(var r=e.N==-1,i=d(t),o=i.next();!o.done;o=i.next()){o=o.value;var s=o.stream.segmentIndex,a=em(e,o);if(s=ks(s)){a=d(a);for(var u=a.next();!u.done;u=a.next()){u=d(u.value);var l=u.next().value;if(u.next().value==s.startTime){r&&(e.N=Math.max(e.N,l)),o.mg=l;break}}}}if(!(e.N<0))for(t=d(t),r=t.next();!r.done;r=t.next())r=r.value,(Uc(e,r.type)||n)&&(i=r.stream.segmentIndex)&&(o=e.N-r.mg,o>0&&(i.g.splice(0,o),i=ks(i))&&(i=-i.startTime,r.stream.segmentIndex.offset(i),IT(e,r,i)))}function DP(e,t){if(e.ma==1/0){t=d(t);for(var n=t.next();!n.done;n=t.next())n=ks(n.value.stream.segmentIndex),n!=null&&n.h!=null&&(e.ma=Math.min(e.ma,n.h))}if(t=e.ma,t!=1/0){n=d(e.j.values());for(var r=n.next();!r.done;r=n.next())if(r=r.value,!Uc(e,r.type)){var i=r.stream.segmentIndex;if(i!=null){var o=ks(i);if(o)if(o.h==null)gn("Missing EXT-X-PROGRAM-DATE-TIME for stream",r.R(),"Expect AV sync issues!");else for(IT(e,r,o.h-t-o.startTime),r=d(i),i=r.next();!i.done;i=r.next())i.value.Ah(t)}}}}function IT(e,t,n){if(!(Math.abs(n)<.001)){t.Pc+=n,t.Gc+=n,e=em(e,t);for(var r=d(e),i=r.next();!i.done;i=r.next()){var o=d(i.value);i=o.next().value,o=o.next().value,e.set(i,o+n)}t.R()}}function OP(e,t){var n,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce,Ee,ye,Ve,Le,Ce,ke,Ge,Je,Ft,dt,kn,Ut,Gn,sn,Qt,hn,An,pn;return H(function(Zt){switch(Zt.h){case 1:return n=mr,r=qg(e.ab,t),i=Xo(r.ha,"EXT-X-DEFINE"),o=[],s=[],a=[],e.m=new jt(null,0),e.m.Uc(!0),u=function(){return[e.H]},l=null,h=new Map,e.i={presentationTimeline:e.m,variants:o,textStreams:s,imageStreams:a,offlineSessionIds:[],sequenceMode:e.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:e.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:e.o},r.type==1?(e.P=!1,Ge=Xo(r.ha,"EXT-X-DEFINE"),h=tm(e,Ge,e.H),l=n.wa,Je="",Ft=new Map,Zt.g(DT(e,e.G++,h,r,u,"",l,Je,!0,"Media Playlist",null,Ft,null,!1,null,!1),7)):(LP(e,i),g=Xo(r.ha,"EXT-X-MEDIA"),m=Xo(r.ha,"EXT-X-STREAM-INF"),E=Xo(r.ha,"EXT-X-IMAGE-STREAM-INF"),A=Xo(r.ha,"EXT-X-I-FRAME-STREAM-INF"),k=Xo(r.ha,"EXT-X-SESSION-KEY"),b=Xo(r.ha,"EXT-X-SESSION-DATA"),V=Xo(r.ha,"EXT-X-CONTENT-STEERING"),FP(e,b),Zt.g(UP(e,V),4));case 4:if(!e.g.ignoreSupplementalCodecs){for(B=[],Z=d(m),ue=Z.next(),pe={};!ue.done;pe={$i:void 0},ue=Z.next())te=ue.value,(le=St(te,"SUPPLEMENTAL-CODECS"))&&(pe.$i=le.split(/\s*,\s*/).map(function(an){return an.split("/")[0]}),ie=te.attributes.map(function(an){return function(qr){var Hr=qr.name,jo=qr.value;return Hr=="CODECS"&&(jo=an.$i.join(","),qr=qr.value.split(","),qr.length>1&&(qr=ni("audio",qr))&&(jo+=","+qr)),new Bd(Hr,jo)}}(pe)),B.push(new El(te.id,te.name,ie,null)));for(m.push.apply(m,M(B)),ve=[],ce=d(A),Ee=ce.next(),ye={};!Ee.done;ye={aj:void 0},Ee=ce.next())Ve=Ee.value,(Le=St(Ve,"SUPPLEMENTAL-CODECS"))&&(ye.aj=Le.split(/\s*,\s*/).map(function(an){return an.split("/")[0]}),Ce=Ve.attributes.map(function(an){return function(qr){var Hr=qr.name;return qr=qr.value,Hr=="CODECS"&&(qr=an.aj.join(",")),new Bd(Hr,qr)}}(ye)),ve.push(new El(Ve.id,Ve.name,Ce,null)));A.push.apply(A,M(ve))}return jP(e,m),JP(e,g),ke=HP(e,A),Zt.g(GP(e,m,k,g,u,e.C,ke),5);case 5:return o=Zt.i,s=BP(e,g),Zt.g(VP(e,E,A),6);case 6:a=Zt.i,Zt.A(3);break;case 7:dt=Zt.i,e.j.set(e.H,dt),dt.stream&&(kn=Nf(dt.stream),dt.stream.segmentIndex.Bb(function(an){an.ea&&(an.ea.rd=kn)})),l=dt.stream.type,Ut=!0,(e.g.disableAudio&&dt.type=="audio"||e.g.disableVideo&&dt.type=="video"&&!dt.stream.codecs.includes(","))&&(Ut=!1),Ut&&o.push({id:0,language:bn(Je||"und"),disabledUntilTime:0,primary:!0,audio:dt.type=="audio"?dt.stream:null,video:dt.type=="video"?dt.stream:null,bandwidth:dt.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!e.h)throw new fe(2,7,7001);if(FT(e,r),r.type==1&&(Fi(e)&&(UT(e,r),Gn=e.u,e.B.ka(Gn)),sn=Array.from(e.j.values()),nm(e,sn),Hd(e),im(e,r.ha,l,h,u)),e.i.variants=o,e.i.textStreams=s,e.i.imageStreams=a,e.i.startTime=e.o,e.ba||!e.g.hls.disableCodecGuessing){Zt.A(8);break}for(Qt=[],hn=d(e.i.variants),An=hn.next();!An.done;An=hn.next())pn=An.value,pn.audio&&pn.audio.codecs===""&&Qt.push(pn.audio.createSegmentIndex()),pn.video&&pn.video.codecs===""&&Qt.push(pn.video.createSegmentIndex());return Zt.g(Promise.all(Qt),8);case 8:e.h.makeTextStreamsForClosedCaptions(e.i),Zt.j()}})}function NP(e,t){var n,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V;return H(function(B){if(B.h==1)return n=yp(e.g.hls.mediaPlaylistFullMimeType),t.length?(r=HT(e,t),i=r.segment,o=r.segmentIndex,s=i.R(),(a=nl(s[0]))&&(u=am.get(a))?B.return(yp(u)):B.g(Promise.all([CT(e,i.ea,0),CT(e,i,o)]),2)):B.return(n);if(l=B.i,h=l[1].mimeType,g=l[0].data,m=l[1].data,E="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),A=["audio/mp4","video/mp4","video/iso.segment"],k=i.ea||A.includes(h),!k&&Ju(wt(m))){var Z=m,ue=e.g.disableAudio,pe=e.g.disableVideo,te=e.g.disableText,le=wt(Z),ie=new er().parse(le),ve=ie.Sd();le=ie.Ig();var ce=[],Ee=!1,ye=!1;if(!ue)switch(ve.audio){case"aac":case"aac-loas":ie.qb().length&&(ce.push("mp4a.40.2"),Ee=!0);break;case"mp3":ie.qb().length&&(ce.push("mp4a.40.34"),Ee=!0);break;case"ac3":ie.qb().length&&(ce.push("ac-3"),Ee=!0);break;case"ec3":ie.qb().length&&(ce.push("ec-3"),Ee=!0);break;case"opus":ie.qb().length&&(ce.push("opus"),Ee=!0)}if(!pe)switch(ve.video){case"avc":le.codec?ce.push(le.codec):ce.push("avc1.42E01E"),ye=!0;break;case"hvc":le.codec?ce.push(le.codec):ce.push("hvc1.1.6.L93.90"),ye=!0;break;case"av1":ce.push("av01.0.01M.08"),ye=!0}if(ce.length){if(ue=Ee&&!ye,pe=new Map,ye&&!te){for(te=new mi("video/mp2t"),qs(te,Z),Z=d(te.g.getStreams()),ye=Z.next();!ye.done;ye=Z.next())ye=ye.value,pe.set(ye,ye);te.g.clear()}le={type:ue?"audio":"video",mimeType:"video/mp2t",codecs:ce.join(", "),language:null,height:le.height,width:le.width,channelCount:null,sampleRate:null,closedCaptions:pe,re:null,colorGamut:null,frameRate:le.frameRate,timescale:null}}else le=null;if(b=le)return B.return(b)}else if((k||E.includes(a))&&(V=BI(g,m,e.g.disableText)))return B.return(V);return h?B.return(yp(h)):B.return(n)})}function CT(e,t,n){var r,i,o,s,a,u;return H(function(l){switch(l.h){case 1:return t?(r=Go,i=ic(t.R(),t.Ec(),t.Cc(),e.g.retryParameters),o=t instanceof Rt?1:0,l.g(Ea(e,i,r,{type:o}).promise,2)):l.return({mimeType:null,data:null});case 2:if(s=l.i,a=s.data,!t.aesKey){l.A(3);break}return l.g(Tp(a,t.aesKey,n),4);case 4:a=l.i;case 3:return t instanceof Rt?t.le(a,!0):t.le(a),(u=s.headers["content-type"])&&(u=u.split(";")[0].toLowerCase()),l.return({mimeType:u,data:a})}})}function Hd(e){if(Fi(e)){if(e.Ga==um){for(var t=1/0,n=1/0,r=d(e.j.values()),i=r.next();!i.done;i=r.next())i=i.value,i.stream.segmentIndex&&i.stream.type!="text"&&!i.stream.isAudioMuxedInVideo&&(t=Math.min(t,i.Gc),n=Math.min(n,i.Pc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.m.Gf(t)}}else e.m.ub(RT(e));if(!e.m.o)for(t=d(e.j.values()),n=t.next();!n.done;n=t.next())n=n.value,!n.stream.segmentIndex||n.type!="audio"&&n.type!="video"||(n=ks(n.stream.segmentIndex))&&n.h!=null&&e.m.qh(n.h);e.m.lf()}function LP(e,t){var n=new Ct(e.H).g;t=d(t);for(var r=t.next();!r.done;r=t.next()){var i=r.value;r=St(i,"NAME");var o=St(i,"VALUE");i=St(i,"QUERYPARAM"),r&&o&&(e.C.has(r)||e.C.set(r,o)),i&&(r=n.get(i)[0])&&!e.C.has(r)&&e.C.set(i,r)}}function tm(e,t,n){n=new Ct(n).g;var r=new Map;t=d(t);for(var i=t.next();!i.done;i=t.next()){var o=i.value,s=St(o,"NAME"),a=St(o,"VALUE");i=St(o,"QUERYPARAM"),o=St(o,"IMPORT"),s&&a&&(r.has(s)||r.set(s,a)),i&&(s=n.get(i)[0])&&!r.has(s)&&r.set(i,s),o&&(i=e.C.get(o))&&r.set(o,i)}return r}function jP(e,t){t=d(t);for(var n=t.next();!n.done;n=t.next()){var r=n.value,i=St(r,"AUDIO");n=St(r,"VIDEO");var o=St(r,"SUBTITLES");if(r=MT(e,r),o){var s=ni(Bt,r);e.K.set(o,s),$t(r,s)}i&&(o=ni("audio",r),o||(o=e.g.hls.defaultAudioCodec),e.K.set(i,o)),n&&(i=ni("video",r),i||(i=e.g.hls.defaultVideoCodec),e.K.set(n,i))}}function FP(e,t){t=d(t);for(var n=t.next();!n.done;n=t.next()){var r=n.value,i=St(r,"DATA-ID");n=St(r,"URI");var o=St(r,"LANGUAGE");r=St(r,"VALUE"),i=new Map().set("id",i),n&&i.set("uri",Xa([e.H],n,e.C)[0]),o&&i.set("language",o),r&&i.set("value",r),n=new yt("sessiondata",i),e.h&&e.h.onEvent(n)}}function UP(e,t){var n,r,i,o,s,a;return H(function(u){if(!e.h||!e.g)return u.return();for(r=d(t),i=r.next();!i.done;i=r.next())if(o=i.value,s=St(o,"PATHWAY-ID"),a=St(o,"SERVER-URI"),s&&a){e.l=new vl(e.h),e.l.configure(e.g),e.l.i=[e.H],e.l.setManifestType("HLS"),e.l.h=s,n=bc(e.l,a);break}return u.g(n,0)})}function BP(e,t){var n=mT(t,"SUBTITLES"),r={};t=d(n);for(var i=t.next();!i.done;i=t.next()){i=i.value;var o=Qg(i,!e.l);r[o]?r[o].push(i):r[o]=[i]}if(t=[],!e.g.disableText)for(var s in r)try{t.push(PT(e,r[s],new Map).stream)}catch(a){if(!e.g.hls.ignoreTextStreamFailures)throw a}for(s=d(n),n=s.next();!n.done;n=s.next())if(r=$n(n.value,"GROUP-ID"),(n=e.K.get(r))&&(r=e.M.get(r)))for(r=d(r),i=r.next();!i.done;i=r.next())i=i.value,i.stream.codecs=n,i.stream.mimeType=om(Bt,n)||Kd(Bt),Al(i.stream);return t.filter(function(a){return a})}function Al(e){var t=new Set([ar(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.Bb(function(n){n.mimeType&&t.add(ar(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function VP(e,t,n){var r,i;return H(function(o){return o.h==1?(r=t.map(function(s){var a,u;return H(function(l){if(l.h==1)return e.g.disableThumbnails?l.return(null):(l.m(2),l.g(QP(e,s),4));if(l.h!=2)return a=l.i,l.return(a.stream);if(u=l.l(),e.g.hls.ignoreImageStreamFailures)return l.return(null);throw u})}).concat(n.map(function(s){if(e.g.disableThumbnails)return null;try{var a=kT(e,s);return a.stream.type!=="image"?null:a.stream}catch(u){if(e.g.hls.ignoreImageStreamFailures)return null;throw u}})),o.g(Promise.all(r),2)):(i=o.i,o.return(i.filter(function(s){return s})))})}function _P(e,t,n){t=t.filter(function(a){var u=St(a,"URI")||"";return a=St(a,"TYPE"),a!="SUBTITLES"&&(u!=""||a=="AUDIO")});var r={};t=d(t);for(var i=t.next();!i.done;i=t.next()){i=i.value;var o=Qg(i,!e.l);r[o]?r[o].push(i):r[o]=[i]}for(var s in r)PT(e,r[s],n,!1)}function HP(e,t){return t.map(function(n){return n=kT(e,n),n.stream.type!=="video"?null:n.stream}).filter(function(n){return n})}function GP(e,t,n,r,i,o,s){var a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce,Ee,ye,Ve,Le,Ce,ke,Ge,Je,Ft,dt,kn,Ut,Gn,sn,Qt,hn;return H(function(An){switch(An.h){case 1:if(a=[],u=new Set,e.g.ignoreDrmInfo||!(n.length>0)){An.A(2);break}l=d(n),h=l.next();case 3:if(h.done){An.A(2);break}if(g=h.value,m=$n(g,"METHOD"),E=St(g,"KEYFORMAT")||"identity",A=null,m=="NONE"){An.A(4);break}if(zd(m)){k=Xa(i(),$n(g,"URI"),o),b=k.sort().join(""),e.O.has(b)||(V=jr(k,e.g.retryParameters),B=Ea(e,V,6).promise,e.O.set(b,B)),An.A(4);break}if(E=="identity")return An.g(WT(e,g,"",i,null,o),12);if(Z=e.Zb.get(E),!Z){ue=null,An.A(10);break}return An.g(Z(g,"",null),11);case 11:ue=An.i;case 10:A=ue,An.A(6);break;case 12:A=An.i;case 6:if(A){if(A.keyIds)for(pe=d(A.keyIds),te=pe.next();!te.done;te=pe.next())le=te.value,u.add(le);a.push(A)}case 4:h=l.next(),An.A(3);break;case 2:for(ie={},ve=d(t),ce=ve.next();!ce.done;ce=ve.next())Ee=ce.value,ye=Qg(Ee,!e.l),ie[ye]?ie[ye].push(Ee):ie[ye]=[Ee];Ve=[];for(Le in ie)Ce=ie[Le],ke=Ce[0],Ge=St(ke,"FRAME-RATE"),Je=Number($n(ke,"BANDWIDTH"))||Number(St(ke,"AVERAGE-BANDWIDTH")),Ft=St(ke,"RESOLUTION"),dt=d(Ft?Ft.split("x"):[null,null]),kn=dt.next().value,Ut=dt.next().value,Gn=St(ke,"VIDEO-RANGE"),(sn=St(ke,"REQ-VIDEO-LAYOUT"))&&sn.includes(",")&&(Qt=sn.split(",").filter(function(pn){return pn=="CH-STEREO"||pn=="CH-MONO"}),sn=Qt[0]),sn=sn||"CH-MONO",hn=KP(e,Ce,r),Ve.push.apply(Ve,M(YP(e,hn.audio,hn.video,Je,kn,Ut,Ge,Gn,sn,a,u,s)));return An.return(Ve.filter(function(pn){return pn!=null}))}})}function KP(e,t,n){for(var r={audio:[],video:[]},i=new Map,o=[],s=!1,a=!1,u=d(t),l=u.next();!l.done;l=u.next()){var h=l.value;l=St(h,"AUDIO");var g=St(h,"VIDEO"),m=l||g;m&&(o.includes(m)||o.push(m),(h=St(h,"PATHWAY-ID"))&&i.set(m,h),l?s=!0:g&&(a=!0))}o.length&&n.length&&(n=n.filter(function(A){return o.includes($n(A,"GROUP-ID"))}),_P(e,n,i)),n=(i=o.sort().join(","))&&e.M.has(i)?e.M.get(i):[],s?r.audio.push.apply(r.audio,M(n)):a&&r.video.push.apply(r.video,M(n)),a=!1;var E=t.map(function(A){return $n(A,"URI")});return s=r.audio.find(function(A){return A&&A.R().find(function(k){return E.includes(k)})}),n=MT(e,t[0]),u=ni("video",n),(l=ni("audio",n))&&!u?(s="audio",a=r.audio.length>0&&!r.audio.some(function(A){return A.stream.isAudioMuxedInVideo})):!r.audio.length&&!r.video.length&&l&&u?(s="video",n=[[u,l].join()]):r.audio.length&&s?(s="audio",a=!0):s=r.video.length&&!r.audio.length?"audio":"video",a||(t=ZP(e,t,n,s),i&&e.g.enableAudioGroups&&(t.stream.groupId=i),t.stream.type=="audio"&&s==="audio"&&r.audio.some(function(A){return A.stream.isAudioMuxedInVideo})&&(e=r.audio[0].stream,t.stream.language=e.language,t.stream.channelsCount=e.channelsCount,t.stream.label=e.label,t.stream.audioSamplingRate=e.audioSamplingRate,t.stream.originalId=e.originalId,t.stream.originalLanguage=e.originalLanguage),r[t.stream.type]=[t]),r}function MT(e,t){return t=St(t,"CODECS")||"",e.ba=t.length>0,e.ba||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),t=t.join(",")),Sp(t.split(/\s*,\s*/))}function WP(e){return(e=St(e,"CHANNELS"))?parseInt(e.split("/")[0],10):null}function zP(e){return(e=St(e,"SAMPLE-RATE"))?parseInt(e,10):null}function $P(e){return e=St(e,"CHANNELS"),e?(e=e.split("/"),e.length!=2?!1:e[1]==="JOC"||e[1].includes("ATMOS")):!1}function XP(e){return e=$n(e,"TYPE").toLowerCase(),e=="subtitles"&&(e=Bt),e}function YP(e,t,n,r,i,o,s,a,u,l,h,g){for(var m=d(n),E=m.next();!E.done;E=m.next())GT(E.value.stream,i,o,s,a,u,null);for(i=e.g.disableVideo,(!n.length||i)&&(n=[null]),i&&(t=t.filter(function(V){return!V.stream.isAudioMuxedInVideo})),i=e.g.disableAudio,(!t.length||i)&&(t=[null]),i=[],t=d(t),o=t.next();!o.done;o=t.next())for(o=o.value,s=d(n),a=s.next();!a.done;a=s.next()){var A=a.value;(a=o?o.stream:null)&&(a.drmInfos=l,a.keyIds=h),(u=A?A.stream:null)&&(u.drmInfos=l,u.keyIds=h,e.g.disableIFrames||rn(u,g)),u&&!a&&(u.bandwidth=r),!u&&a&&(a.bandwidth=r),m=o?o.stream.drmInfos:null,E=A?A.stream.drmInfos:null,A=A?A.R().sort().join(","):"";var k=o?o.R().sort().join(","):"",b=[];a&&a.codecs&&b.push(a.codecs),u&&u.codecs&&b.push(u.codecs),A=[A,k,b.sort()].join("-"),a&&u&&!rs(m,E)||e.ib.has(A)||(a={id:e.G++,language:a?a.language:"und",disabledUntilTime:0,primary:!!a&&a.primary||!!u&&u.primary,audio:a,video:u,bandwidth:r,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},i.push(a),e.ib.add(A))}return i}function JP(e,t){t=mT(t,"CLOSED-CAPTIONS"),e.P=t.length==0,t=d(t);for(var n=t.next();!n.done;n=t.next()){var r=n.value,i=St(r,"LANGUAGE");n=bn(i||"und"),i||(i=St(r,"NAME"))&&(n=i),i=$n(r,"GROUP-ID"),r=$n(r,"INSTREAM-ID").replace("SERVICE","svc"),e.J.get(i)||e.J.set(i,new Map),e.J.get(i).set(r,n)}}function PT(e,t,n,r){r=r===void 0?!0:r;for(var i=[],o=[],s=new Map,a=d(t),u=a.next(),l={};!u.done;l={ki:void 0},u=a.next()){u=u.value,l.ki=++e.G,l=function(k){return function(){return"shaka://hls-muxed"+k.ki}}(l);var h=r?$n(u,"URI"):St(u,"URI")||l();l=$n(u,"GROUP-ID"),i.push(h),o.push(l),s.set(l,h),(u=St(u,"PATHWAY-ID"))&&n.set(l,u)}if(r=o.sort().join(","),u=t[0],t="",a=XP(u),a==Bt)t=St(u,"CODECS")||"";else for(o=d(o),l=o.next();!l.done;l=o.next())if(l=l.value,e.K.has(l)){t=e.K.get(l);break}if(o=i.sort().join(","),a=="audio"&&r&&(o+=r),e.j.has(o))return e.j.get(o);if(l=e.G++,e.l)for(s=d(s),h=s.next();!h.done;h=s.next()){var g=d(h.value);h=g.next().value,g=g.next().value,(h=n.get(h))&&yl(e.l,l,h,g)}n=St(u,"LANGUAGE"),s=St(u,"NAME"),h=St(u,"DEFAULT")=="YES",g=a=="audio"?WP(u):null;var m=a=="audio"?$P(u):!1,E=St(u,"CHARACTERISTICS"),A=St(u,"FORCED")=="YES";return u=a=="audio"?zP(u):null,i=Gd(e,l,i,t,a,n,h,s,g,null,E,A,u,m),i.stream&&e.g.enableAudioGroups&&(i.stream.groupId=r),e.M.has(r)?e.M.get(r).push(i):e.M.set(r,[i]),e.j.set(o,i),i}function QP(e,t){var n,r,i,o,s,a,u,l,h,g;return H(function(m){return m.h==1?(n=$n(t,"URI"),r=St(t,"CODECS","jpeg")||"",e.j.has(n)?m.return(e.j.get(n)):(i=St(t,"LANGUAGE"),o=St(t,"NAME"),s=St(t,"CHARACTERISTICS"),a=Gd(e,e.G++,[n],r,"image",i,!1,o,null,null,s,!1,null,!1),(u=St(t,"RESOLUTION"))?m.g(a.stream.createSegmentIndex(),3):m.A(2))):(m.h!=2&&(l=ks(a.stream.segmentIndex),(h=l.tilesLayout)&&(a.stream.width=Number(u.split("x")[0])*Number(h.split("x")[0]),a.stream.height=Number(u.split("x")[1])*Number(h.split("x")[1])),a.stream.closeSegmentIndex()),(g=St(t,"BANDWIDTH"))&&(a.stream.bandwidth=Number(g)),e.j.set(n,a),m.return(a))})}function kT(e,t){var n="video",r=$n(t,"URI"),i=St(t,"CODECS")||"";if(i=="mjpg"&&(n="image"),e.j.has(r))return e.j.get(r);var o=St(t,"LANGUAGE"),s=St(t,"NAME"),a=St(t,"CHARACTERISTICS");return n=Gd(e,e.G++,[r],i,n,o,!1,s,null,null,a,!1,null,!1),i=St(t,"RESOLUTION"),o=d(i?i.split("x"):[null,null]),i=o.next().value,o=o.next().value,n.stream.width=Number(i)||void 0,n.stream.height=Number(o)||void 0,(t=St(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.j.set(r,n),n}function ZP(e,t,n,r){for(var i=e.G++,o=[],s=d(t),a=s.next();!a.done;a=s.next()){var u=a.value;a=$n(u,"URI"),u=St(u,"PATHWAY-ID"),e.l&&u&&yl(e.l,i,u,a),o.push(a)}if(s=o.sort().join(",")+n.sort().join(","),e.j.has(s))return e.j.get(s);a=o.join(",");e:{if(t=St(t[0],"CLOSED-CAPTIONS"),r=="video"){if(e.g.disableText){e.P=!1,t=null;break e}if(t){if(t!="NONE"){t=e.J.get(t);break e}e.P=!1}else if(!t&&e.J.size)for(t=d(e.J.keys()),t=t.next();!t.done;t=t.next()){t=e.J.get(t.value);break e}}t=null}return n=Ss(r,n),r=Gd(e,i,o,n,r,null,!1,a,null,t,null,!1,null,!1),e.j.set(s,r),r}function Gd(e,t,n,r,i,o,s,a,u,l,h,g,m,E){function A(ue){var pe,te,le,ie,ve,ce,Ee,ye,Ve,Le,Ce,ke,Ge,Je,Ft,dt,kn,Ut,Gn,sn;return H(function(Qt){switch(Qt.h){case 1:return pe=mr,Qt.m(2),Qt.g(ue.promise,4);case 4:if(te=Qt.i,ue.aborted)return Qt.return();if(le=te.uri,le!=te.originalUri&&(ie=V.R(),ie.includes(le)||V.yf.push(le)),ve=qg(e.ab,te.data),ve.type!=1)throw new fe(2,4,4017);return ce=Xo(ve.ha,"EXT-X-DEFINE"),Ee=tm(e,ce,le),ye=!1,(!e.ba&&e.g.hls.disableCodecGuessing||e.P&&i==pe.wa&&!e.g.hls.disableClosedCaptionsDetection)&&ve.segments.length>0&&(e.P=!1,ye=!0),Ve=!e.ba&&e.g.hls.disableCodecGuessing,Le=Fi(e),Qt.g(DT(e,0,Ee,ve,k,r,i,o,s,a,u,l,h,g,m,E,void 0,ye,Ve),5);case 5:if(Ce=Qt.i,ue.aborted)return Qt.return();ke=Ce.stream,FT(e,ve),Fi(e)&&!Le&&UT(e,ve),V.Pc=Ce.Pc,V.Gc=Ce.Gc,V.Oe=Ce.Oe,V.Ne=Ce.Ne,V.Wd=Ce.Wd,V.mf=Ce.mf,V.Kb=Ce.Kb,V.Lb=Ce.Lb,b.segmentIndex=ke.segmentIndex,b.encrypted=ke.encrypted,b.drmInfos=ke.drmInfos,b.keyIds=ke.keyIds,b.mimeType=ke.mimeType,b.bandwidth=b.bandwidth||ke.bandwidth,b.codecs=b.codecs||ke.codecs,b.closedCaptions=b.closedCaptions||ke.closedCaptions,b.width=b.width||ke.width,b.height=b.height||ke.height,b.hdr=b.hdr||ke.hdr,b.colorGamut=b.colorGamut||ke.colorGamut,b.frameRate=b.frameRate||ke.frameRate,b.language=="und"&&ke.language!="und"&&(b.language=ke.language),b.language=b.language||ke.language,b.channelsCount=b.channelsCount||ke.channelsCount,b.audioSamplingRate=b.audioSamplingRate||ke.audioSamplingRate,Al(b),b.drmInfos.length&&e.h.newDrmInfo(b),Ge=!1,(!l&&b.closedCaptions||l&&b.closedCaptions&&l.size!=b.closedCaptions.size)&&(Ge=!0),e.i&&Ge&&e.h.makeTextStreamsForClosedCaptions(e.i),i==pe.Oa&&(Je=ks(ke.segmentIndex))&&Je.ea&&(b.mimeType="application/mp4",Al(b)),Ft=Nf(b),b.segmentIndex.Bb(function(hn){hn.ea&&(hn.ea.rd=Ft)}),qP(e)&&(e.uc?nm(e,[V]):(e.uc=!0,dt=Array.from(e.j.values()),kn=dt.filter(function(hn){return hn.stream.segmentIndex}),nm(e,kn),Hd(e),Ut=e.u,Ut>0&&e.B.ka(Ut))),im(e,ve.ha,b.type,Ee,k),e.i&&(e.i.startTime=e.o),Qt.o(0);break;case 2:if(Gn=Qt.l(),b.closeSegmentIndex(),Gn.code===7001)return Qt.return();if(sn=e.h.disableStream(b),!sn)throw Gn;Qt.j()}})}function k(){return e.l&&n.length>1?Dc(e.l,t):V.yf.concat(vT([e.H],n,e.C))}var b=NT(e,r,i,o,s,a,u,l,h,g,m,E);n.some(function(ue){return ue.startsWith("shaka://hls-muxed")})&&(b.isAudioMuxedInVideo=!0,b.mimeType="video/mp2t",Al(b));var V={stream:b,type:i,yf:[],Pc:0,Gc:0,mf:new Map,Oe:!1,Ne:!1,Wd:!1,mg:-1,Kb:-1,Lb:-1,R:k},B=null,Z;return b.createSegmentIndex=function(){return B||(b.isAudioMuxedInVideo?(b.segmentIndex=new wn([]),Promise.resolve()):(Z=sm(e,V.R(),!0),B=new Promise(function(ue){ue(A(Z))})))},b.closeSegmentIndex=function(){B&&!b.segmentIndex&&Z.abort(),b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null),B=null},V}function RT(e){var t=1/0;e=d(e.j.values());for(var n=e.next();!n.done;n=e.next())n=n.value,n.stream.segmentIndex&&n.stream.type!="text"&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.Gc));return t}function bT(e,t){var n=[];t=d(t);for(var r=t.next();!r.done;r=t.next())r=r.value,r.segmentIndex&&r.segmentIndex.Bb(function(i){n.push(i)});e.m.ee(n)}function nm(e,t){if(!Fi(e))for(var n=RT(e),r=d(t),i=r.next();!i.done;i=r.next())i.value.stream.segmentIndex.gd(0,n);bT(e,t.map(function(o){return o.stream})),r=Array.from(e.j.values()).filter(function(o){return o.stream.segmentIndex}),n=r.some(function(o){return o.stream.type=="audio"}),i=r.some(function(o){return o.stream.type=="video"}),r=Fi(e)&&!e.hb,n=!Fi(e)&&e.hb&&!(n&&i),e.g.hls.ignoreManifestProgramDateTime||r||n?AT(e,t,r):(DP(e,t),e.g.hls.ignoreManifestProgramDateTimeForTypes.length>0&&AT(e,t))}function Uc(e,t){return e.g.hls.ignoreManifestProgramDateTime?!0:e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function qP(e){if(!e.i||!e.i.variants.length)return!1;var t=[],n=[];e=d(e.i.variants);for(var r=e.next();!r.done;r=e.next())r=r.value,r.video&&t.push(r.video),r.audio&&n.push(r.audio);return!(t.length>0&&!t.some(function(i){return i.segmentIndex})||n.length>0&&!n.some(function(i){return i.segmentIndex}))}function DT(e,t,n,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B){V=V===void 0?!0:V,B=B===void 0?!0:B;var Z,ue,pe,te,le,ie,ve,ce,Ee,ye,Ve,Le,Ce,ke,Ge,Je,Ft,dt,kn,Ut,Gn,sn,Qt,hn,An,pn,Zt,an,qr;return H(function(Hr){switch(Hr.h){case 1:if(Z=r.segments||[],ue=Z.every(function(jo){return!!ai(jo.ha,"EXT-X-GAP")}),!Z.length||ue)throw new fe(2,4,4053);if(e3(e,r),Fi(e)&&rm(e,r),pe=Fi(e)?e.D.get(s):new Map,te=_T(e,r,pe,n,i,s),le=te.segments,ie=te.bandwidth,Ve=ye=Ee=ce=ve=null,!(le.length>0&&V)){Hr.A(2);break}return Hr.g(NP(e,le),3);case 3:Le=Hr.i,s!=Le.type&&Fi(e)&&(e.D.set(Le.type,e.D.get(s)),e.D.set(s,new Map)),s=Le.type,a=Le.language,h=Le.channelCount,A=Le.sampleRate,e.g.disableText||(g=Le.closedCaptions),ce=Le.height,ve=Le.width,Ee=Le.re,ye=Le.colorGamut,Ve=Le.frameRate,B&&(b=Le.mimeType,o=Le.codecs);case 2:if(b){Hr.A(4);break}return Hr.g(r3(e,s,o,le),5);case 5:b=Hr.i,s!=Bt||o||b!="application/mp4"||!le[0]||le[0].ea||(b="text/vtt");case 4:return Hr.g(LT(e,r,b,i,n),6);case 6:if(Ce=Hr.i,ke=Ce.drmInfos,Ge=Ce.keyIds,Je=Ce.encrypted,Ft=Ce.Mh,Je&&!ke.length&&!Ft)throw new fe(2,4,4026);return dt=NT(e,o,s,a,u,l,h,g,m,E,A,k),dt.encrypted=Je&&!Ft,dt.drmInfos=ke,dt.keyIds=Ge,dt.mimeType=b,ie&&(dt.bandwidth=ie),Al(dt),s=="video"&&(ve||ce||Ee||ye)&&GT(dt,ve,ce,Ve,Ee,null,ye),Fi(e)&&rm(e,r),kn=le[0].startTime,Ut=le[le.length-1],Gn=Ut.endTime,sn=new wn(le),dt.segmentIndex=sn,hn=(Qt=ai(r.ha,"EXT-X-SERVER-CONTROL"))?xl(Qt,"CAN-SKIP-UNTIL")!=null:!1,An=Qt?xl(Qt,"CAN-BLOCK-RELOAD")!=null:!1,pn=wl(r.ha,"EXT-X-MEDIA-SEQUENCE",0),Zt=OT(pn,le),an=Zt.Kb,qr=Zt.Lb,Hr.return({stream:dt,type:s,yf:[],R:i,Pc:kn,Gc:Gn,Oe:hn,Ne:An,Wd:!1,mg:-1,Kb:an,Lb:qr,mf:pe})}})}function OT(e,t){e=e+t.length-1;var n=-1;if(!t.length)return e++,{Kb:e,Lb:n};t=t[t.length-1];var r=t.g;return t.g.length?(n=r.length-1,r[r.length-1].isPreload()||(e++,n=0),{Kb:e,Lb:n}):(e++,t.o&&(n=0),{Kb:e,Lb:n})}function NT(e,t,n,r,i,o,s,a,u,l,h,g){var m=om(n,t)||Kd(n),E=[];if(u){u=d(u.split(","));for(var A=u.next();!A.done;A=u.next())E.push(A.value)}return A=void 0,u=null,n==Bt?A=E.includes("public.accessibility.transcribes-spoken-dialog")&&E.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":E.includes("public.accessibility.describes-video")&&(u="visually impaired"),E.length||A!=="subtitle"||E.push("subtitle"),A=null,n!="video"&&(A=o),e={id:e.G++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:m,codecs:t,kind:n==Bt?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:bn(r||"und"),originalLanguage:r,label:A,type:n,primary:i,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:E,forced:l,channelsCount:s,audioSamplingRate:h,spatialAudio:g,closedCaptions:a,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null},Al(e),e}function LT(e,t,n,r,i){var o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce,Ee,ye,Ve,Le,Ce,ke,Ge;return H(function(Je){switch(Je.h){case 1:if(o=new Map,!e.g.ignoreDrmInfo&&t.segments){for(s=d(t.segments),a=s.next();!a.done;a=s.next())if(u=a.value,l=Xo(u.ha,"EXT-X-KEY"),h=null,l.length)for(h=BT(e,t,u.ha,r,i),g=d(l),m=g.next();!m.done;m=g.next())E=m.value,o.set(E,h)}k=A=!1,b=[],V=new Set,B=d(o),Z=B.next();case 2:if(Z.done){Je.A(4);break}if(ue=Z.value,pe=d(ue),te=pe.next().value,le=pe.next().value,ie=te,ve=le,ce=$n(ie,"METHOD"),ce=="NONE"){Je.A(3);break}if(A=!0,Ee=St(ie,"KEYFORMAT")||"identity",ye=null,zd(ce)){k=!0,Je.A(3);break}if(Ee=="identity")return Je.g(WT(e,ie,n,r,ve,i),11);if(Ve=e.Zb.get(Ee),!Ve){Le=null,Je.A(9);break}return Je.g(Ve(ie,n,ve),10);case 10:Le=Je.i;case 9:ye=Le,Je.A(6);break;case 11:ye=Je.i;case 6:if(ye){if(ye.keyIds)for(Ce=d(ye.keyIds),ke=Ce.next();!ke.done;ke=Ce.next())Ge=ke.value,V.add(Ge);b.push(ye)}case 3:Z=B.next(),Je.A(2);break;case 4:return Je.return({drmInfos:b,keyIds:V,encrypted:A,Mh:k})}})}function jT(e,t,n,r,i){if(!R.crypto||!R.crypto.subtle)throw ut("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new fe(2,4,4042);var o=0,s=St(t,"IV","");if(s){var a=os(s.substr(2));if(a.byteLength!=16)throw new fe(2,4,4048)}else o=wl(n.ha,"EXT-X-MEDIA-SEQUENCE",0);var u=Xa(r(),$n(t,"URI"),i),l=u.sort().join("");if(n=t.toString()+"-"+o+"-"+l,!e.ua.has(n)){var h={bitsKey:128,blockCipherMode:"CBC",iv:a,firstMediaSequenceNumber:o};switch($n(t,"METHOD")){case"AES-256":h.bitsKey=256;break;case"AES-256-CTR":h.bitsKey=256,h.blockCipherMode="CTR"}h.fetchKey=function(){var g,m,E,A;return H(function(k){if(k.h==1)return e.O.has(l)||(g=jr(u,e.g.retryParameters),m=Ea(e,g,6).promise,e.O.set(l,m)),k.g(e.O.get(l),2);if(k.h!=3){if(E=k.i,!E.data||E.data.byteLength!=h.bitsKey/8)throw new fe(2,4,4049);return A={name:h.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:h.bitsKey},k.g(R.crypto.subtle.importKey("raw",E.data,A,!0,["decrypt"]),3)}h.cryptoKey=k.i,h.fetchKey=void 0,k.j()})},e.ua.set(n,h)}return e.ua.get(n)}function FT(e,t){e.o==null&&(t=ai(t.ha,"EXT-X-START"))&&(e.o=Number($n(t,"TIME-OFFSET")))}function e3(e,t){var n=ai(t.ha,"EXT-X-PLAYLIST-TYPE");t=ai(t.ha,"EXT-X-ENDLIST"),t=n&&n.value=="VOD"||t,n=n&&n.value=="EVENT"&&!t,n=!t&&!n,t?Wd(e,Xd):n?Wd(e,um):Wd(e,l3)}function rm(e,t){var n=1/0,r=t.segments;if(r.length)for(var i=r.length-1;i>=0;){var o=ai(r[i].ha,"EXTINF");if(o){n=Zg(o);break}i--}if(r=ai(t.ha,"EXT-X-TARGETDURATION"),!r)throw new fe(2,4,4024,"EXT-X-TARGETDURATION");r=Number(r.value),(i=ai(t.ha,"EXT-X-PART-INF"))&&(e.T=Number($n(i,"PART-TARGET"))),t=ai(t.ha,"EXT-X-SERVER-CONTROL"),e.oa&&e.T?(e.u=e.tc?e.T*5<=n?Math.min(e.T,e.u):Math.min(n,e.u):Math.min(e.T,e.u),e.Ua=t?Number($n(t,"PART-HOLD-BACK")):0):(e.u=Math.min(n,e.u),n=t?xl(t,"HOLD-BACK"):null,e.Ka=n?Number(n.value):0),e.eb=Math.max(r,e.eb)}function UT(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Ua)n=e.Ua;else if(e.Ka)n=e.Ka;else for(var r=t.segments.length,i=r-Math.min(r,e.g.hls.liveSegmentsDelay);i<r;i++){var o=ai(t.segments[i].ha,"EXTINF");n=o?n+Zg(o):n+e.eb}e.o&&e.o<0&&(n=Math.min(-e.o,n),e.o+=n),e.m.Ri(0),e.m.ph(n),e.m.Uc(!1)}function BT(e,t,n,r,i){var o=ai(n,"EXT-X-MAP");if(!o)return null;var s=$n(o,"URI"),a=Xa(r(),s,i);if(s=[a.toString(),St(o,"BYTERANGE","")].join("-"),!e.Ba.has(s)){var u=void 0,l=null,h=!1;n=d(n);for(var g=n.next();!g.done;g=n.next())g=g.value,g.name=="EXT-X-KEY"?(h=$n(g,"METHOD"),zd(h)&&g.id<o.id?(h=!1,u=jT(e,g,t,r,i)):h=h!="NONE"):g.name=="EXT-X-BYTERANGE"&&g.id<o.id&&(l=g);t=t3(a,o,l,u,h),e.Ba.set(s,t)}return e.Ba.get(s)}function t3(e,t,n,r,i){var o=0,s=null;return t=St(t,"BYTERANGE"),!t&&n&&(t=n.value),t&&(o=t.split("@"),s=Number(o[0]),o=Number(o[1]),s=o+s-1,r&&(n=s+1-o,n%16&&(s+=16-n%16))),new qi(function(){return e},o,s,null,null,null,r,i)}function n3(e,t,n,r,i,o,s,a,u,l){var h=r.ha,g=ai(h,"EXTINF"),m=0,E=0,A=null;r.qc.length&&(e.i.isLowLatency=!0);var k=null;if(!e.g.hls.ignoreManifestProgramDateTime){var b=ai(h,"EXT-X-PROGRAM-DATE-TIME");b&&b.value&&(k=W(b.value),e.hb=!0)}var V=fa;if(ai(h,"EXT-X-GAP")&&(e.i.gapCount++,V=2),!g){if(r.qc.length==0)throw new fe(2,4,4024,"EXTINF");if(!e.oa)return null}var B=[];b=!1;var Z=null,ue=!1,pe=!1;if(e.oa&&r.qc.length){m=t&&R.ReadableStream&&e.g.hls.allowLowLatencyByteRangeOptimization;for(var te=k,le={},ie=0;ie<r.qc.length;le={Pf:void 0,ge:void 0},ie++){var ve=r.qc[ie],ce=ie==0?n:B[B.length-1],Ee=ie==0?i:ce.endTime,ye=Number(St(ve,"DURATION"))||e.T;if(ye){var Ve=Ee+ye,Le=0,Ce=null;if(ve.name=="EXT-X-PRELOAD-HINT"?(Le=(Le=St(ve,"BYTERANGE-START"))?Number(Le):0,(ce=St(ve,"BYTERANGE-LENGTH"))?Ce=Le+Number(ce)-1:Le&&(Ce=Number.MAX_SAFE_INTEGER)):(Le=St(ve,"BYTERANGE"),Ce=d(VT(ce,Le)),Le=Ce.next().value,Ce=Ce.next().value),le.ge=St(ve,"URI"),le.ge){ce=fa,St(ve,"GAP")=="YES"&&(e.i.gapCount++,ce=2,ue=!0),le.Pf=null;var ke=function(Je){return function(){return Je.Pf==null&&(Je.Pf=Xa(a(),Je.ge,o)),Je.Pf}}(le);m&&Le>=0&&Ce!=null&&(Z=ke,b=!0),Ee=new Rt(Ee,Ve,ke,Le,Ce,t,0,0,1/0,[],"",null,te,ce,l),ve.name=="EXT-X-PRELOAD-HINT"&&(Ee.Rg(),pe=!0),St(ve,"INDEPENDENT")!="YES"&&ie>0&&Ee.qd(),ve=u,ve||(B.length&&B[0].mimeType?ve=B[0].mimeType:le.ge&&(le=nl(le.ge),ve=$d.get(s).get(le)||null)),ve&&(Ee.mimeType=ve,$T.has(ve)&&(Ee.ea=null)),B.push(Ee),te&&(te+=ye)}}}}if(g){if(g=Zg(g),g==0)return null;m=i+g}else if(B.length)m=B[B.length-1].endTime;else return null;b&&(ue||B[0].startByte!=0?(b=!1,Z=null):B=[]),(g=ai(h,"EXT-X-BYTERANGE"))?(A=d(VT(n,g.value)),E=A.next().value,A=A.next().value):B.length&&(E=B[0].startByte,A=B[B.length-1].endByte),n="",g=null,s=="image"&&(n="1x1",s=ai(h,"EXT-X-TILES"))&&(n=$n(s,"LAYOUT"),(s=St(s,"DURATION"))&&(g=Number(s)));var Ge=null;return t=new Rt(i,m,function(){return Z?Z():(Ge==null&&(Ge=Xa(a(),r.g,o)),Ge||[])},E,A,t,0,0,1/0,B,n,g,k,V,l,B.length>0&&!!r.g),u&&(t.mimeType=u,$T.has(u)&&(t.ea=null)),b&&(e.tc=!0,t.si(),pe&&t.Rg()),t}function VT(e,t){var n=0,r=null;return t&&(n=t.split("@"),t=Number(n[0]),n=n[1]?Number(n[1]):e.endByte+1,r=n+t-1),[n,r]}function im(e,t,n,r,i){if(n=="video"||n=="audio"){var o=e.m.m;if(o!=null&&!Uc(e,n))for(t=Xo(t,"EXT-X-DATERANGE"),t=t.filter(function(ce){return xl(ce,"START-DATE")!=null}).sort(function(ce,Ee){return ce=$n(ce,"START-DATE"),Ee=$n(Ee,"START-DATE"),ce<Ee?-1:ce>Ee?1:0}),n=0;n<t.length;n++){var s=t[n];try{var a=$n(s,"START-DATE"),u=W(a);if(!isNaN(u)){var l=Math.max(0,u-o),h=null,g=St(s,"END-DATE");if(g){var m=W(g);if(!isNaN(m)&&(h=m-o,h<0))continue}if(h==null){var E=St(s,"DURATION")||St(s,"PLANNED-DURATION");if(E){var A=parseFloat(E);if(isNaN(A)||(h=l+A),u-o+A<0)continue}}var k=St(s,"CLASS")||"com.apple.quicktime.HLS",b=St(s,"END-ON-NEXT")=="YES";if(h==null&&b){for(var V=n+1;V<t.length;V++){var B=St(t[V],"CLASS")||"com.apple.quicktime.HLS";if(k==B){var Z=$n(t[V],"START-DATE"),ue=W(Z);if(!isNaN(ue)&&ue&&ue>u){h=Math.max(0,ue-o);break}}}if(h==null)continue}V=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var pe=[],te=d(s.attributes),le=te.next();!le.done;le=te.next()){var ie=le.value;if(!V.includes(ie.name)){var ve=yT(ie.value,r);(ie.name=="X-ASSET-URI"||ie.name=="X-ASSET-LIST")&&(ve=Xa(i(),ie.value,r)[0]),pe.push({key:ie.name,description:"",data:ve,mimeType:null,pictureType:null})}}pe.length>1&&e.h.onMetadata(k,l,h,pe)}}catch{}}}}function _T(e,t,n,r,i,o){function s(ce){if(ce=nl(ce),!ce)return null;var Ee=$d.get(o).get(ce);return Ee||(Ee=am.get(ce)),Ee}var a=t.segments,u=null,l=null,h=null,g=null,m=void 0,E=wl(t.ha,"EXT-X-DISCONTINUITY-SEQUENCE",-1),A=wl(t.ha,"EXT-X-MEDIA-SEQUENCE",0),k=ai(t.ha,"EXT-X-SKIP"),b=k?Number(St(k,"SKIPPED-SEGMENTS")):0,V=A+b,B=0;Fi(e)&&n.has(V)&&(B=n.get(V)),B===0&&e.Ga==um&&n.size>0&&!n.has(V)&&e.m.i!=null&&(B=e.m.Db());var Z=[],ue=null;k=[];for(var pe=0;pe<a.length;pe++){var te=a[pe];(V=ai(te.ha,"EXT-X-MAP"))&&V.id!==l&&(u=BT(e,t,te.ha,i,r),l=V.id),V=te.g;var le="";V&&(le=nl(V)),le!==g&&(h=s(V),g=le),le=pe==0?B:ue.endTime,V=A+b+pe,ai(te.ha,"EXT-X-DISCONTINUITY")&&(E++,ue&&ue.ea&&(ue.ea.g=le));for(var ie=d(te.ha),ve=ie.next();!ve.done;ve=ie.next())ve=ve.value,ve.name=="EXT-X-KEY"&&(zd($n(ve,"METHOD"))?m=jT(e,ve,t,i,r):m=void 0);if(n.set(V,le),le=n3(e,u,ue,te,le,r,o,i,h,m)){if((ue=wl(te.ha,"EXT-X-BITRATE"))?(k.push({bitrate:ue,duration:le.endTime-le.startTime}),le.bandwidth=ue):le.endByte?(te=Jh(le))&&(ue=le.endTime-le.startTime,te=te*8/ue/1e3,k.push({bitrate:te,duration:ue}),le.bandwidth=te):k.length&&(ue=k.pop(),ue.duration+=le.endTime-le.startTime,k.push(ue),le.bandwidth=ue.bitrate),le.bandwidth)for(ue=d(le.g),te=ue.next();!te.done;te=ue.next())te.value.bandwidth=le.bandwidth;ue=le,le.i=E,Uc(e,o)&&e.N!=null&&V<e.N||Z.push(le)}}if(t=void 0,k.length&&(t=k.reduce(function(ce,Ee){return ce+Ee.duration},0),t=Math.round(k.reduce(function(ce,Ee){return ce+Ee.bitrate*Ee.duration},0)/t*1e3)),k=Z.some(function(ce){return ce.h!=null})){for(n={},r=0;r<Z.length;n={Ue:void 0,Te:void 0,Ke:void 0,Rc:void 0,Je:void 0},r++)if(n.Rc=Z[r],n.Rc.h==null)for(n.Te=0,n.Ue=r,i=function(ce){return function(){var Ee=Z[ce.Ue];if(Ee){if(Ee.h!=null)return Ee.h+ce.Te;ce.Te-=Ee.endTime-Ee.startTime,ce.Ue+=1}return null}}(n),n.Je=0,n.Ke=r,a=function(ce){return function(){var Ee=Z[ce.Ke];if(Ee){if(Ee!=ce.Rc&&(ce.Je+=Ee.endTime-Ee.startTime),Ee.h!=null)return Ee.h+ce.Je;--ce.Ke}return null}}(n);n.Rc.h==null;)n.Rc.h=a(),n.Rc.h==null&&(n.Rc.h=i())}if(k)for(n=d(Z),r=n.next();!r.done;r=n.next())for(i=r.value,r=i.h,i=d(i.g),a=i.next();!a.done;a=i.next())a=a.value,a.h=r,r+=a.endTime-a.startTime;if(n=e.ma,k&&n!=1/0&&!Uc(e,o))for(e=d(Z),k=e.next();!k.done;k=e.next())k.value.Ah(n);return{segments:Z,bandwidth:t}}function om(e,t){if(e==Bt){if(t=="vtt"||t=="wvtt")return"text/vtt";if(t&&t!=="")return"application/mp4"}return e!="image"||t&&t!="jpeg"?e=="audio"&&t=="mp4a.40.34"?"audio/mpeg":t=="mjpg"?"application/mp4":null:"image/jpeg"}function Kd(e){return e==Bt?"text/vtt":$d.get(e).get("mp4")}function HT(e,t){e=Fi(e)?Math.trunc((t.length-1)/2):0;for(var n=t[e];n.Vb()==2&&e+1<t.length;)e++,n=t[e];return{segment:n,segmentIndex:e}}function r3(e,t,n,r){var i,o,s,a,u,l,h,g,m,E,A,k,b;return H(function(V){switch(V.h){case 1:return i=Go,o=HT(e,r),s=o.segment,s.status==2?V.return(Kd(t)):(u=s.R(),(l=nl(u[0]))&&(h=$d.get(t),(g=h.get(l))||(g=am.get(l)))?V.return(g):(a=om(t,n))?V.return(a):(E=1,A=jr(u,e.g.retryParameters),V.m(2),A.method="HEAD",V.g(Ea(e,A,i,{type:E}).promise,4)));case 4:k=V.i,m=k.headers["content-type"],V.o(3);break;case 2:if(b=V.l(),!b||b.code!=1002&&b.code!=1001){V.A(3);break}return A.method="GET",e.g.hls.allowRangeRequestsToGuessMimeType&&(A.headers.Range="bytes=0-0"),V.g(Ea(e,A,i,{type:E}).promise,6);case 6:k=V.i,m=k.headers["content-type"];case 3:if(!m){V.A(7);break}if(a=m.toLowerCase().split(";")[0],a!="application/octet-stream"){V.A(8);break}if(k.data.byteLength){V.A(9);break}return A.method="GET",V.g(Ea(e,A,i,{type:E}).promise,10);case 10:k=V.i;case 9:Ju(wt(k.data))&&(a="video/mp2t");case 8:if(a!="application/octet-stream")return V.return(a);case 7:return V.return(Kd(t))}})}function GT(e,t,n,r,i,o,s){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(r)||void 0,e.hdr=i||void 0,e.videoLayout=o||void 0,e.colorGamut=s||void 0)}function sm(e,t,n){return Ea(e,jr(t,e.g.retryParameters),0,{type:n?2:3})}function KT(e){var t,n,r,i,o,s;return H(function(a){switch(a.h){case 1:return e.h?(a.m(2),t=Date.now(),a.g(e.update(),4)):a.return();case 4:n=Date.now(),Fi(e)&&(r=(n-t)/1e3,e.Wb.sample(1,r),i=e.g.updatePeriod>0?e.g.updatePeriod:e.u,o=Math.max(0,i-st(e.Wb)),isFinite(o)?e.B.ka(o):e.B.ka(1)),a.o(3);break;case 2:if(s=a.l(),!e.h)return a.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.h.onError(s),a.return();s.severity=1,e.h.onError(s),e.B.ka(.1);case 3:if(!e.h)return a.return();e.h.onManifestUpdated(),a.j()}})}function Fi(e){return e.Ga!=Xd}function Wd(e,t){e.Ga=t,e.m&&e.m.Uc(!Fi(e)),Fi(e)||e.B.stop()}function Ea(e,t,n,r){if(!e.$)throw new fe(2,7,7001);return r||(r={}),r.isPreload=e.Yb(),t=e.h.networkingEngine.request(n,t,r),gu(e.$,t),t}function zd(e){return e=="AES-128"||e=="AES-256"||e=="AES-256-CTR"}function i3(e,t,n,r){var i,o,s,a,u,l;return H(function(h){if(h.h==1){if(n=="video/mp2t")throw new fe(2,4,4040);if(R.shakaMediaKeysPolyfill==="apple")throw new fe(2,4,4041);if(i=$n(t,"METHOD"),o=["SAMPLE-AES","SAMPLE-AES-CTR"],!o.includes(i))return h.return(null);s="cenc",i=="SAMPLE-AES"&&(s="cbcs"),a=$n(t,"URI"),u=Io("com.apple.fps",s,null,a);var g=new Ct(a).Ab.replace(/-/g,"").toLowerCase();return(l=g.length===32&&/^[0-9a-f]+$/.test(g)?g:null)||!r?h.A(2):h.g(zT(e,r),3)}return h.h!=2&&(l=h.i),l&&u.keyIds.add(l),h.return(u)})}function WT(e,t,n,r,i,o){var s,a,u,l,h,g,m,E,A,k,b,V;return H(function(B){switch(B.h){case 1:if(n=="video/mp2t")throw new fe(2,4,4040);if(R.shakaMediaKeysPolyfill==="apple")throw new fe(2,4,4041);if(s=$n(t,"METHOD"),a=["SAMPLE-AES","SAMPLE-AES-CTR"],!a.includes(s))return B.return(null);if(u=Xa(r(),$n(t,"URI"),o),u[0].startsWith("data:text/plain;base64,")){l=Ao(bi(u[0].split("data:text/plain;base64,").pop())),B.A(2);break}return h=u.sort().join(""),e.ya.has(h)||(g=jr(u,e.g.retryParameters),m=Ea(e,g,6).promise,e.ya.set(h,m)),B.g(e.ya.get(h),3);case 3:E=B.i,l=Ao(E.data);case 2:if(A="00000000000000000000000000000000",!i){B.A(4);break}return B.g(zT(e,i),5);case 5:(k=B.i)&&(A=k);case 4:return b=new Map,b.set(A,l),V="cenc",s=="SAMPLE-AES"&&(V="cbcs"),B.return(Ia(b,V))}})}function zT(e,t){var n,r,i,o;return H(function(s){return s.h==1?(n=null,e.za.has(t)?(n=e.za.get(t),s.A(2)):(r=ic(t.R(),t.Ec(),t.Cc(),e.g.retryParameters),i=Go,s.g(Ea(e,r,i,{type:0}).promise,3))):(s.h!=2&&(o=s.i,t.le(o.data),n=_I(o.data),e.za.set(t,n)),s.return(n))})}Re("shaka.hls.HlsParser",_d);var am=new Map().set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),o3=new Map().set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),s3=new Map().set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts","video/mp2t").set("tsv","video/mp2t"),a3=new Map().set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),u3=new Map().set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),$d=new Map().set("audio",o3).set("video",s3).set("text",a3).set("image",u3),$T=new Set(["video/mp2t"].concat(M(Ms))),Xd="VOD",l3="EVENT",um="LIVE";Hi("application/x-mpegurl",function(){return new _d}),Hi("application/vnd.apple.mpegurl",function(){return new _d});function Yd(e){return bd(e)}var c3=new Map().set("com.microsoft.playready",Yd).set("com.microsoft.playready.recommendation",Yd).set("com.microsoft.playready.software",Yd).set("com.microsoft.playready.hardware",Yd);function lm(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.u=1,this.i=null,this.D=new Qe(5),this.o=new Yt(function(){f3(e)}),this.C=new Vu,this.m=new Map,this.B=function(){return!1}}f=lm.prototype,f.configure=function(e,t){this.g=e,t&&(this.B=t)},f.start=function(e,t){var n=this;return H(function(r){if(r.h==1)return n.l=[e],n.h=t,r.g(cm(n),2);if(!n.h)throw new fe(2,7,7001);return r.return(n.j)})};function f3(e){var t;H(function(n){switch(n.h){case 1:return n.m(2),n.g(cm(e),4);case 4:n.o(3);break;case 2:t=n.l(),e.h&&(t.severity=1,e.h.onError(t));case 3:if(!e.h)return n.return();n.j()}})}f.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,this.o!=null&&(this.o.stop(),this.o=null),this.m.clear(),this.C.destroy()},f.update=function(){var e=this,t;return H(function(n){if(n.h==1)return n.m(2),n.g(cm(e),4);if(n.h!=2)return n.o(0);if(t=n.l(),!e.h||!t)return n.return();e.h.onError(t),n.j()})},f.onExpirationUpdated=function(){},f.onInitialVariantChosen=function(){},f.banLocation=function(){},f.setMediaElement=function(){};function cm(e){var t,n,r,i,o,s,a;return H(function(u){if(u.h==1)return t=jr(e.l,e.g.retryParameters),n=e.h.networkingEngine,r=Date.now(),i=n.request(0,t,{type:5,isPreload:e.B()}),gu(e.C,i),u.g(i.promise,2);if(o=u.i,!e.h)return u.return();o.uri&&!e.l.includes(o.uri)&&e.l.unshift(o.uri);var l=o.uri,h=o.data,g=e.g.mss.manifestPreprocessor;if(g!=Yf){if(lt("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),h=JS(h,"SmoothStreamingMedia"),!h)throw new fe(2,4,4046,l);g(h),h=Vi(h.outerHTML)}var m=na(h,"SmoothStreamingMedia");if(!m)throw new fe(2,4,4046,l);if(l=e.g.mss.manifestPreprocessorTXml,l!=Jf&&l(m),e.i||(e.i=new jt(null,0)),l=At(m,"IsLive",tt,!1))throw new fe(2,4,4047);e.i.Uc(!l),g=At(m,"TimeScale",je,1e7),h=At(m,"DVRWindowLength",je),l&&(h===0||isNaN(h))&&(h=1/0);var E=At(m,"CanSeek",tt,!1);h===0&&E&&(h=1/0),E=null,h&&h>0&&(E=h/g),l&&!isNaN(e.g.availabilityWindowOverride)&&(E=e.g.availabilityWindowOverride),E==null&&(E=1/0),e.i.Gf(E),h=At(m,"Duration",je,1/0),l||e.i.ub(h/g),l={variants:[],textStreams:[],timescale:g,duration:h/g};var A;for(E=Mn(m,"Protection"),g=e.g.mss.keySystemsBySystemId,h=[],E=d(E),A=E.next();!A.done;A=E.next())h=h.concat(Mn(A.value,"ProtectionHeader"));if(h.length){for(E=[],A=0;A<h.length;A++){var k=h[A],b=k.attributes.SystemID.toLowerCase(),V=g[b];if(V){var B;e:{if(B=AS(k)){B=d(di(B,"DATA"));for(var Z=B.next();!Z.done;Z=B.next())if(Z=Pn(Z.value,"KID")){B=bi(vr(Z)),B=new Uint8Array([B[3],B[2],B[1],B[0],B[5],B[4],B[7],B[6]].concat(M(B.slice(8)))),B=Ao(B);break e}}B=null}Z=bi(vr(k)),b=os(b.replace(/-/g,"")),b=[{initData:vf(Z,b,new Set,0),initDataType:"cenc",keyId:B}],b=Io(V,"cenc",b),B&&b.keyIds.add(B),(V=c3.get(V))&&(b.licenseServerUri=V(k)),E.push(b)}}g=E}else g=[];for(A=g,E=[],g=[],h=[],m=Mn(m,"StreamIndex"),m=d(m),k=m.next();!k.done;k=m.next()){k=k.value,V=Mn(k,"QualityLevel"),b=l.timescale,B=l.duration,Z=Mn(k,"c");for(var ue=[],pe=0,te=0;te<Z.length;++te){var le=Z[te],ie=Z[te+1],ve=At(le,"t",je),ce=At(le,"d",je);if(le=At(le,"r",re),!ce)break;if(ve=ve??pe,(le=le||0)&&le--,le<0)if(ie){if(ie=At(ie,"t",je),ie==null)break;if(ve>=ie)break;le=Math.ceil((ie-ve)/ce)-1}else{if(B==1/0)break;if(ve/b>=B)break;le=Math.ceil((B*b-ve)/ce)-1}for(ie=0;ie<=le;++ie)pe=ve+ce,ue.push({start:ve/b,end:pe/b,Gd:ve}),ve=pe}for(b=ue,V=d(V),B=V.next();!B.done;B=V.next())(B=d3(e,k,B.value,b,A,l))&&(B.type!="audio"||e.g.disableAudio?B.type!="video"||e.g.disableVideo?B.type!=Bt||e.g.disableText||h.push(B):g.push(B):E.push(B))}for(m=[],E=d(E.length>0?E:[null]),A=E.next();!A.done;A=E.next())for(A=A.value,k=d(g.length>0?g:[null]),ue=k.next();!ue.done;ue=k.next())V=m,b=V.push,B=e,Z=A,ue=ue.value,te=0,Z&&Z.bandwidth&&Z.bandwidth>0&&(te+=Z.bandwidth),ue&&ue.bandwidth&&ue.bandwidth>0&&(te+=ue.bandwidth),B={id:B.u++,language:Z?Z.language:"und",disabledUntilTime:0,primary:!!Z&&Z.primary||!!ue&&ue.primary,audio:Z,video:ue,bandwidth:te,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},b.call(V,B);l.variants=m,l.textStreams=h,e.j?(e.j.variants=l.variants,e.j.textStreams=l.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},e.i.lf()),Promise.resolve(),s=Date.now(),a=(s-r)/1e3,e.D.sample(1,a),u.j()})}function d3(e,t,n,r,i,o){var s=t.attributes.Type;if(s!=="audio"&&s!=="video"&&s!=="text")return ut("Ignoring unrecognized type:",s),null;var a=t.attributes.Language,u=e.u++,l=At(n,"Bitrate",ge),h=At(n,"MaxWidth",ge),g=At(n,"MaxHeight",ge),m=At(n,"Channels",ge),E=At(n,"SamplingRate",ge),A=o.duration;r.length&&(A=r[r.length-1].end-r[0].start);var k=e.i.getDuration();e.i.ub(Math.min(A,k)),(k=t.attributes.Name)&&(k+=n.attributes.Index),k||(k=String(u));var b={id:u,originalId:k,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:h||void 0,height:g||void 0,kind:"",encrypted:i.length>0,drmInfos:i,keyIds:new Set,language:bn(a||"und"),originalLanguage:a,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:m,audioSamplingRate:E,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:A,timescale:o.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if((i=t.attributes.Subtype)&&((i=y3.get(i))&&b.roles.push(i),i==="main"&&(b.primary=!0)),i=n.attributes.FourCC,(i===null||i==="")&&(i=t.attributes.FourCC),!i){if(s==="audio")i="AAC";else if(s==="video")return ut('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null}if(!v3.includes(i.toUpperCase()))return ut("Codec not supported:",i),null;switch(n=h3(n,s,i,b),b.mssPrivateData.codecPrivateData=n,s){case"audio":if(!n)return ut("Quality unsupported without CodecPrivateData",s),null;b.type="audio",b.mimeType="mss/audio/mp4",b.codecs=p3(i,n);break;case"video":if(!n)return ut("Quality unsupported without CodecPrivateData",s),null;b.type="video",b.mimeType="mss/video/mp4",b.codecs=g3(n);break;case"text":b.type=Bt,b.mimeType="application/mp4",(i==="TTML"||i==="DFXP")&&(b.codecs="stpp")}return b.fullMimeTypes.add(ar(b.mimeType,b.codecs)),b.createSegmentIndex=function(){if(b.segmentIndex)return Promise.resolve();if(e.m.has(b.id))var V=e.m.get(b.id);else V=[],b.type=="video"&&(V=b.mssPrivateData.codecPrivateData.split("00000001").slice(1)),V={id:b.id,type:b.type,codecs:b.codecs,encrypted:b.encrypted,timescale:b.mssPrivateData.timescale,duration:b.mssPrivateData.duration,yb:V,Ha:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:null,stream:b},V=Wu(new Ku([V])),e.m.set(b.id,V);return V=m3(e,new qi(function(){return[]},0,null,Nf(b),b.mssPrivateData.timescale,V,null,b.encrypted),b,t,r),b.segmentIndex=new wn(V),Promise.resolve()},b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null)},b}function h3(e,t,n,r){if(e=e.attributes.CodecPrivateData)return e;if(t!=="audio")return null;t=r.channelsCount||2,e=r.audioSamplingRate||44100;var i={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12};return r=i[e],n==="AACH"?(n=new Uint8Array(4),e=i[e*2],n[0]=40|r>>1,n[1]=r<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,t=new Uint16Array(2),t[0]=(n[0]<<8)+n[1],t[1]=(n[2]<<8)+n[3],t[0].toString(16)+t[1].toString(16)):(n=new Uint8Array(2),n[0]=16|r>>1,n[1]=r<<7|t<<3,t=new Uint16Array(1),t[0]=(n[0]<<8)+n[1],t[0].toString(16))}function p3(e,t){var n=0;return e==="AACH"&&(n=5),t?n===0&&(n=(parseInt(t.substr(0,2),16)&248)>>3):(n=2,e==="AACH"&&(n=5)),"mp4a.40."+n}function g3(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}function m3(e,t,n,r,i){var o=r.attributes.Url.replace("{bitrate}",String(n.bandwidth));r=[],i=d(i);for(var s=i.next(),a={};!s.done;a={Kf:void 0},s=i.next())a.Kf=s.value,r.push(new Rt(a.Kf.start,a.Kf.end,function(u){return function(){return Rr(e.l,[o.replace("{start time}",String(u.Kf.Gd))])}}(a),0,null,t,0,0,n.mssPrivateData.duration));return r}Re("shaka.mss.MssParser",lm);var v3="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),y3=new Map().set("CAPT","main").set("SUBT","alternate").set("DESC","main");Hi("application/vnd.ms-sstr+xml",function(){return new lm});function XT(e,t,n,r,i,o,s){if(n>=200&&n<=299&&n!=202||n==304)return{uri:i||r,originalUri:r,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"],originalRequest:o};o=null;try{o=fi(t)}catch{}throw new fe(n==401||n==403?2:1,1,1001,r,n,o,e,s,i||r)}function fm(){}function Jd(e,t,n,r,i,o){var s=new A3;try{Hu(t.headers).forEach(function(h,g){s.append(g,h)})}catch(h){return Da(new fe(1,1,1002,e,h,n))}var a=new x3,u={Rh:!1,ej:!1};if(e=S3(e,t,n,{body:t.body||void 0,headers:s,method:t.method,signal:a.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},u,r,i,t.streamDataCallback,o.minBytesForProgressEvents||0),e=new br(e,function(){return u.Rh=!0,a.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var l=new Yt(function(){u.ej=!0,a.abort()});l.ka(t/1e3),e.finally(function(){l.stop()})}return e}function S3(e,t,n,r,i,o,s,a,u){var l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le;return H(function(ie){switch(ie.h){case 1:return l=E3,h=w3,m=new ArrayBuffer(0),A=E=0,k={},b=Date.now(),ie.m(2),ie.g(l(e,r),4);case 4:if(g=ie.i,k=T3(g.headers),s(k),r.method=="HEAD"){ie.A(5);break}return B=(V=g.headers.get("Content-Length"))?parseInt(V,10):0,g.body?(Z=g.clone().body.getReader(),ue=function(ve){function ce(){var Ee,ye,Ve,Le;return H(function(Ce){switch(Ce.h){case 1:return Ce.m(2),Ce.g(Z.read(),4);case 4:Ee=Ce.i,Ce.o(3);break;case 2:return Ce.l(),Ce.return();case 3:if(Ee.done){Ce.A(5);break}if(E+=Ee.value.byteLength,!a){Ce.A(5);break}return Ce.g(a(Ee.value),5);case 5:ye=Date.now(),Ve=E-A,(ye-b>100&&Ve>=u||Ee.done)&&(Le=Ee.done?0:B-E,o(ye-b,Ve,Le),A=E,b=ye),Ee.done?ve.close():(ve.enqueue(Ee.value),ce()),Ce.j()}})}ce()},new h({start:ue}),ie.g(g.arrayBuffer(),8)):ie.g(g.arrayBuffer(),9);case 8:m=ie.i,ie.A(5);break;case 9:m=ie.i,pe=Date.now(),o(pe-b,m.byteLength,0);case 5:t.headers.Range&&(te=t.headers.Range.replace("bytes=","").split("-").filter(function(ve){return ve}).map(function(ve){return parseInt(ve,10)}),te.length==2&&m.byteLength!=te[1]-te[0]+1&&ut("Payload length does not match range requested bytes",t,g)),ie.o(3);break;case 2:throw le=ie.l(),i.Rh?new fe(1,1,7001,e,n):i.ej?new fe(1,1,1003,e,n):new fe(1,1,1002,e,le,n);case 3:return ie.return(XT(k,m,g.status,e,g.url,t,n))}})}function T3(e){var t={};return e.forEach(function(n,r){t[r.trim()]=n}),t}function YT(){if(R.ReadableStream)try{new ReadableStream({})}catch{return!1}else return!1;if(R.Response){if(!new Response("").body)return!1}else return!1;return!(!R.fetch||"polyfill"in R.fetch||!R.AbortController)}Re("shaka.net.HttpFetchPlugin",fm),fm.isSupported=YT,fm.parse=Jd;var E3=R.fetch,x3=R.AbortController,w3=R.ReadableStream,A3=R.Headers;YT()&&(ua("http",Jd,2,!0),ua("https",Jd,2,!0),ua("blob",Jd,2,!0));function JT(){}function Qd(e,t,n,r,i,o){var s=new I3,a=Date.now(),u=0,l=new Promise(function(h,g){s.open(t.method,e,!0),s.responseType="arraybuffer",s.timeout=t.retryParameters.timeout,s.withCredentials=t.allowCrossSiteCredentials;var m={};s.onabort=function(){g(new fe(1,1,7001,e,n))},s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.HEADERS_RECEIVED){var A=s.getAllResponseHeaders().trim().split(`\r
73
+ `),k={};A=d(A);for(var b=A.next();!b.done;b=A.next()){b=b.value;var V=b.indexOf(": ");V!==-1&&(k[b.slice(0,V).toLowerCase()]=b.slice(V+2))}m=k,i(m)}},s.onload=function(){var A=s.response;try{var k=XT(m,A,s.status,e,s.responseURL,t,n);h(k)}catch(b){g(b)}},s.onerror=function(A){g(new fe(1,1,1002,e,A,n))},s.ontimeout=function(){g(new fe(1,1,1003,e,n))},s.onprogress=function(A){var k=Date.now(),b=o.minBytesForProgressEvents||0,V=A.loaded-u;(k-a>100&&V>=b||A.lengthComputable&&A.loaded==A.total)&&(r(k-a,V,s.readyState==4?0:A.total-A.loaded),u=A.loaded,a=k)};for(var E in t.headers)try{s.setRequestHeader(E.toLowerCase(),t.headers[E])}catch(A){throw new fe(1,1,1002,e,A,n)}s.send(t.body)});return new br(l,function(){return s.abort(),Promise.resolve()})}Re("shaka.net.HttpXHRPlugin",JT),JT.parse=Qd;var I3=R.XMLHttpRequest;ua("http",Qd,1,!0),ua("https",Qd,1,!0),ua("blob",Qd,1,!0);function QT(e,t,n,r,i){this.g=e,this.i=t,this.groupId=n,this.h=r,this.j=i}function dm(e){var t=e.Ub(!1);return t?Ri(t):e.R().map(function(n){return"{"+encodeURI(n.split("#xywh=")[0])+"}"}).join("")+":"+e.startByte+":"+e.endByte}function C3(e,t){return ic(e.g.R(),e.g.startByte,e.g.endByte,t.streaming.retryParameters)}function ZT(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function qT(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}ZT.prototype.close=function(e,t){if(this.h.has(e)){var n=this.h.get(e);this.h.delete(e),this.j+=n,this.g+=t}};function eE(e){return e.i==0?0:e.j/e.i}function hm(e){var t=this;this.u=e,this.i=new Map,this.h=new _u(function(){return pm(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new ZT,this.l=!1}hm.prototype.destroy=function(){return this.h.destroy()};function M3(e,t,n){e.o=t,e.m=n}function pm(e){e.l=!0;var t=e.j.map(function(n){return n()});return e.j=[],Promise.all(t)}hm.prototype.queue=function(e,t,n,r,i){var o=this;qn(this.h);var s=(this.i.get(e)||Promise.resolve()).then(function(){var a,u,l,h,g,m,E;return H(function(A){if(A.h==1)return A.g(R3(o,t),2);if(a=A.i,o.h.g)throw new fe(2,9,7001);if(r)for(h in u=wt(a),l=new Hh(u),l.data)g=Number(h),m=l.data[g],E=l.g[g],o.m(m,E);return o.g.close(n,a.byteLength),o.o(eE(o.g),o.g.g),A.return(i(a))})});return this.i.set(e,s),s};function P3(e,t,n,r,i,o){qn(e.h);var s=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new fe(2,9,7001);if(i){var a=wt(n);a=new Hh(a);for(var u in a.data){var l=Number(u);e.m(a.data[l],a.g[l])}}return e.g.close(r,n.byteLength),e.o(eE(e.g),e.g.g),o(n)});e.i.set(t,s)}function k3(e){return H(function(t){return t.h==1?t.g(Promise.all(e.i.values()),2):t.return(e.g.g)})}function R3(e,t){var n,r,i,o;return H(function(s){return s.h==1?(n=Go,r=e.u.request(n,t),i=function(){return r.abort()},e.j.push(i),s.g(r.promise,2)):(o=s.i,$t(e.j,i),s.return(o.data))})}function Zd(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new zn,e.onabort=function(r){r.preventDefault(),n.g.reject()},e.onerror=function(r){r.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}Zd.prototype.abort=function(){var e=this;return H(function(t){if(t.h==1){try{e.i.abort()}catch{}return t.m(2),t.g(e.g,4)}if(t.h!=2)return t.o(0);t.l(),t.j()})};function gm(e,t){return new Promise(function(n,r){var i=e.h.openCursor();i.onerror=r,i.onsuccess=function(){var o;return H(function(s){if(s.h==1)return i.result==null?(n(),s.return()):(o=i.result,s.g(t(o.key,o.value,o),2));o.continue(),s.j()})}})}Zd.prototype.store=function(){return this.h},Zd.prototype.promise=function(){return this.g};function mm(e){this.h=e,this.g=[]}mm.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))};function Cu(e,t){return qd(e,t,"readwrite")}function qd(e,t,n){n=e.h.transaction([t],n);var r=new Zd(n,t);return e.g.push(r),r.promise().then(function(){$t(e.g,r)},function(){$t(e.g,r)}),r}function Mu(e,t,n){this.h=new mm(e),this.i=t,this.g=n}f=Mu.prototype,f.destroy=function(){return this.h.destroy()},f.hasFixedKeySpace=function(){return!0},f.addSegments=function(){return tE(this.i)},f.removeSegments=function(e,t){return nE(this,this.i,e,t)},f.getSegments=function(e){var t=this,n;return H(function(r){return r.h==1?r.g(rE(t,t.i,e),2):(n=r.i,r.return(n.map(function(i){return t.Th(i)})))})},f.addManifests=function(){return tE(this.g)},f.updateManifest=function(){return Promise.reject(new fe(2,9,9016,"Cannot modify values in "+this.g))};function b3(e,t,n){e=Cu(e.h,e.g);var r=e.store();return r.get(t).onsuccess=function(){r.put(n,t)},e.promise()}f.updateManifestExpiration=function(e,t){var n=Cu(this.h,this.g),r=n.store();return r.get(e).onsuccess=function(i){(i=i.target.result)&&(i.expiration=t,r.put(i,e))},n.promise()},f.removeManifests=function(e,t){return nE(this,this.g,e,t)},f.getManifests=function(e){var t=this,n;return H(function(r){return r.h==1?r.g(rE(t,t.g,e),2):(n=r.i,r.return(Promise.all(n.map(function(i){return t.Od(i)}))))})},f.getAllManifests=function(){var e=this,t,n;return H(function(r){return r.h==1?(t=qd(e.h,e.g,"readonly"),n=new Map,r.g(gm(t,function(i,o){var s;return H(function(a){if(a.h==1)return a.g(e.Od(o),2);s=a.i,n.set(i,s),a.j()})}),2)):r.h!=3?r.g(t.promise(),3):r.return(n)})},f.Th=function(e){return e},f.Od=function(e){return Promise.resolve(e)};function tE(e){return Promise.reject(new fe(2,9,9011,"Cannot add new value to "+e))}f.add=function(e,t){var n=this,r,i,o,s,a,u,l;return H(function(h){if(h.h==1){for(r=Cu(n.h,e),i=r.store(),o=[],s=d(t),a=s.next(),u={};!a.done;u={fh:void 0},a=s.next())l=a.value,u.fh=i.add(l),u.fh.onsuccess=function(g){return function(){o.push(g.fh.result)}}(u);return h.g(r.promise(),2)}return h.return(o)})};function nE(e,t,n,r){e=Cu(e.h,t),t=e.store(),n=d(n);for(var i=n.next(),o={};!i.done;o={Qg:void 0},i=n.next())o.Qg=i.value,t.delete(o.Qg).onsuccess=function(s){return function(){return r(s.Qg)}}(o);return e.promise()}function rE(e,t,n){var r,i,o,s,a,u,l;return H(function(h){if(h.h==1){for(r=qd(e.h,t,"readonly"),i=r.store(),o={},s=[],a=d(n),u=a.next(),l={};!u.done;l={zf:void 0,gf:void 0},u=a.next())l.gf=u.value,l.zf=i.get(l.gf),l.zf.onsuccess=function(g){return function(){g.zf.result==null&&s.push(g.gf),o[g.gf]=g.zf.result}}(l);return h.g(r.promise(),2)}if(s.length)throw new fe(2,9,9012,"Could not find values for "+s);return h.return(n.map(function(g){return o[g]}))})}function Bc(e){this.g=new mm(e)}Bc.prototype.destroy=function(){return this.g.destroy()},Bc.prototype.getAll=function(){var e=this,t,n;return H(function(r){return r.h==1?(t=qd(e.g,"session-ids","readonly"),n=[],r.g(gm(t,function(i,o){n.push(o)}),2)):r.h!=3?r.g(t.promise(),3):r.return(n)})},Bc.prototype.add=function(e){var t=Cu(this.g,"session-ids"),n=t.store();e=d(e);for(var r=e.next();!r.done;r=e.next())n.add(r.value);return t.promise()},Bc.prototype.remove=function(e){var t=this,n;return H(function(r){return r.h==1?(n=Cu(t.g,"session-ids"),r.g(gm(n,function(i,o,s){e.includes(o.sessionId)&&s.delete()}),2)):r.g(n.promise(),0)})};function no(){this.g=new Map}no.prototype.destroy=function(){for(var e=[],t=d(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},no.prototype.init=function(){var e=this;Vc.forEach(function(i,o){(i=i())&&e.g.set(o,i)});for(var t=[],n=d(this.g.values()),r=n.next();!r.done;r=n.next())t.push(r.value.init());return Promise.all(t)};function iE(e){var t=null;if(e.g.forEach(function(n,r){n.getCells().forEach(function(i,o){i.hasFixedKeySpace()||t||(t={path:{Jb:r,cb:o},cb:i})})}),t)return t;throw new fe(2,9,9013,"Could not find a cell that supports add-operations")}function D3(e,t){e.g.forEach(function(n,r){n.getCells().forEach(function(i,o){t({Jb:r,cb:o},i)})})}function eh(e,t,n){if(e=e.g.get(t),!e)throw new fe(2,9,9013,"Could not find mechanism with name "+t);if(t=e.getCells().get(n),!t)throw new fe(2,9,9013,"Could not find cell with name "+n);return t}function O3(e,t){e.g.forEach(function(n){t(n.getEmeSessionCell())})}function N3(e){var t=Array.from(e.g.keys());if(!t.length)throw new fe(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}function L3(e){var t,n,r;return H(function(i){return i.h==1?(t=Array.from(e.g.values()),n=t.length>0,n||(r=Vc,r.forEach(function(o){(o=o())&&t.push(o)})),i.g(Promise.all(t.map(function(o){return o.erase()})),2)):n?i.A(0):i.g(Promise.all(t.map(function(o){return o.destroy()})),0)})}function oE(e,t){Vc.set(e,t)}Re("shaka.offline.StorageMuxer",no),no.unregister=function(e){Vc.delete(e)},no.register=oE,no.prototype.destroy=no.prototype.destroy;var Vc=new Map;function _c(){Mu.apply(this,arguments)}P(_c,Mu),_c.prototype.updateManifestExpiration=function(e,t){var n=this,r,i,o;return H(function(s){return r=Cu(n.h,n.g),i=r.store(),o=new zn,i.get(e).onsuccess=function(a){(a=a.target.result)?(a.expiration=t,i.put(a),o.resolve()):o.reject(new fe(2,9,9012,"Could not find values for "+e))},s.g(Promise.all([r.promise(),o]),0)})},_c.prototype.Od=function(e){var t,n,r,i,o,s;return H(function(a){if(a.h==1){for(t=[],n=0;n<e.periods.length;++n)r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime,o=j3(e.periods[n],i),t.push(o);return a.g(VS(t),2)}return s=a.i,a.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:e.expiration==null?1/0:e.expiration,streams:s,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})};function j3(e,t){U3(e);for(var n=d(e.streams),r=n.next();!r.done;r=n.next());return e.streams.map(function(i){return F3(i,e.startTime,t)})}function F3(e,t,n){var r=e.initSegmentUri?sE(e.initSegmentUri):null,i=t+e.presentationTimeOffset,o=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,initSegmentKey:r,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(s){var a=sE(s.uri);return{startTime:t+s.startTime,endTime:t+s.endTime,dataKey:a,initSegmentKey:r,appendWindowStart:t,appendWindowEnd:o,timestampOffset:i,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}_c.prototype.Th=function(e){return{data:e.data}};function sE(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new fe(2,9,9004,"Could not parse uri "+e)}function U3(e){var t=e.streams.filter(function(a){return a.contentType=="audio"});if(e=e.streams.filter(function(a){return a.contentType=="video"}),!t.every(function(a){return a.variantIds})||!e.every(function(a){return a.variantIds})){for(var n=d(t),r=n.next();!r.done;r=n.next())r.value.variantIds=[];for(n=d(e),r=n.next();!r.done;r=n.next())r.value.variantIds=[];if(n=0,e.length&&!t.length){r=n++;for(var i=d(e),o=i.next();!o.done;o=i.next())o.value.variantIds.push(r)}if(!e.length&&t.length)for(r=n++,i=d(t),o=i.next();!o.done;o=i.next())o.value.variantIds.push(r);if(e.length&&t.length)for(t=d(t),r=t.next();!r.done;r=t.next())for(r=r.value,i=d(e),o=i.next();!o.done;o=i.next()){o=o.value;var s=n++;r.variantIds.push(s),o.variantIds.push(s)}}}function th(){Mu.apply(this,arguments)}P(th,Mu),th.prototype.Od=function(e){var t,n,r,i,o,s;return H(function(a){if(a.h==1){for(t=[],n=0;n<e.periods.length;++n){r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime;for(var u=e.periods[n],l=[],h=d(u.streams),g=h.next();!g.done;g=h.next())g=g.value,g.variantIds.length!=0&&l.push(B3(g,u.startTime,u.startTime+i));o=l,t.push(o)}return a.g(VS(t),2)}return s=a.i,a.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:e.expiration==null?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:s,sequenceMode:!1})})};function B3(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(r){return{startTime:t+r.startTime,endTime:t+r.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:r.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}function vm(){Mu.apply(this,arguments)}P(vm,Mu),f=vm.prototype,f.hasFixedKeySpace=function(){return!1},f.addSegments=function(e){return this.add(this.i,e)},f.addManifests=function(e){return this.add(this.g,e)},f.updateManifest=function(e,t){return b3(this,e,t)},f.Od=function(e){return e.expiration==null&&(e.expiration=1/0),Promise.resolve(e)};function aE(){this.m=this.j=this.i=this.h=this.g=this.l=null}f=aE.prototype,f.init=function(){var e=this,t=new zn,n=!1,r=new Yt(function(){n=!0,t.reject(new fe(2,9,9017))});typeof nh=="number"&&nh>0&&r.ka(nh);var i=R.indexedDB.open("shaka_offline_db",5);return i.onsuccess=function(){if(!n){r.stop();var o=i.result;e.l=o;var s=o.objectStoreNames;s=s.contains("manifest")&&s.contains("segment")?new _c(o,"segment","manifest"):null,e.g=s,s=o.objectStoreNames,s=s.contains("manifest-v2")&&s.contains("segment-v2")?new th(o,"segment-v2","manifest-v2"):null,e.h=s,s=o.objectStoreNames,s=s.contains("manifest-v3")&&s.contains("segment-v3")?new th(o,"segment-v3","manifest-v3"):null,e.i=s,s=o.objectStoreNames,s=s.contains("manifest-v5")&&s.contains("segment-v5")?new vm(o,"segment-v5","manifest-v5"):null,e.j=s,o=o.objectStoreNames.contains("session-ids")?new Bc(o):null,e.m=o,t.resolve()}},i.onupgradeneeded=function(){for(var o=i.result,s=d(["segment-v5","manifest-v5","session-ids"]),a=s.next();!a.done;a=s.next())a=a.value,o.objectStoreNames.contains(a)||o.createObjectStore(a,{autoIncrement:!0})},i.onerror=function(o){n||(r.stop(),t.reject(new fe(2,9,9001,i.error)),o.preventDefault())},t},f.destroy=function(){var e=this;return H(function(t){switch(t.h){case 1:if(!e.g){t.A(2);break}return t.g(e.g.destroy(),2);case 2:if(!e.h){t.A(4);break}return t.g(e.h.destroy(),4);case 4:if(!e.i){t.A(6);break}return t.g(e.i.destroy(),6);case 6:if(!e.j){t.A(8);break}return t.g(e.j.destroy(),8);case 8:if(!e.m){t.A(10);break}return t.g(e.m.destroy(),10);case 10:e.l&&e.l.close(),t.j()}})},f.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},f.getEmeSessionCell=function(){return this.m},f.erase=function(){var e=this;return H(function(t){switch(t.h){case 1:if(!e.g){t.A(2);break}return t.g(e.g.destroy(),2);case 2:if(!e.h){t.A(4);break}return t.g(e.h.destroy(),4);case 4:if(!e.i){t.A(6);break}return t.g(e.i.destroy(),6);case 6:if(!e.j){t.A(8);break}return t.g(e.j.destroy(),8);case 8:return e.l&&e.l.close(),t.g(V3(),10);case 10:return e.l=null,e.g=null,e.h=null,e.i=null,e.j=null,t.g(e.init(),0)}})};function V3(){var e=new zn,t=R.indexedDB.deleteDatabase("shaka_offline_db");return t.onblocked=function(){},t.onsuccess=function(){e.resolve()},t.onerror=function(n){e.reject(new fe(2,9,9001,t.error)),n.preventDefault()},e}var nh=5;Re("shaka.offline.indexeddb.StorageMechanismOpenTimeout",nh),oE("idb",function(){return ct().yh()?new aE:null});function Ws(e,t,n,r){this.g=e,this.i=t,this.h=n,this.l=r,this.j=["offline:",e,"/",t,"/",n,"/",r].join("")}Ws.prototype.Jb=function(){return this.i},Ws.prototype.cb=function(){return this.h},Ws.prototype.key=function(){return this.l},Ws.prototype.toString=function(){return this.j};function ym(e){if(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e),e==null)return null;var t=e[1];if(t!="manifest"&&t!="segment")return null;var n=e[2];if(!n)return null;var r=e[3];return r&&t!=null?new Ws(t,n,r,Number(e[4])):null}function uE(e,t){this.h=e,this.g=t}function lE(e,t){var n=new jt(null,0);n.ub(t.duration);var r=t.streams.filter(function(l){return l.type=="audio"}),i=t.streams.filter(function(l){return l.type=="video"});r=_3(e,r,i,n),i=t.streams.filter(function(l){return l.type==Bt}).map(function(l){return rh(e,l,n)});var o=t.streams.filter(function(l){return l.type=="image"}).map(function(l){return rh(e,l,n)}),s=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var a=d(r.values()),u=a.next();!u.done;u=a.next())u=u.value,u.audio&&u.audio.encrypted&&(u.audio.drmInfos=s),u.video&&u.video.encrypted&&(u.video.drmInfos=s);return{presentationTimeline:n,offlineSessionIds:t.sessionIds,variants:Array.from(r.values()),textStreams:i,imageStreams:o,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}function _3(e,t,n,r){for(var i=new Set,o=d(t),s=o.next();!s.done;s=o.next()){s=d(s.value.variantIds);for(var a=s.next();!a.done;a=s.next())i.add(a.value)}for(o=d(n),s=o.next();!s.done;s=o.next())for(s=d(s.value.variantIds),a=s.next();!a.done;a=s.next())i.add(a.value);for(o=new Map,i=d(i),s=i.next();!s.done;s=i.next())s=s.value,o.set(s,{id:s,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=d(t),i=t.next();!i.done;i=t.next())for(s=i.value,i=rh(e,s,r),s=d(s.variantIds),a=s.next();!a.done;a=s.next())a=o.get(a.value),a.language=i.language,a.primary=a.primary||i.primary,a.audio=i;for(n=d(n),t=n.next();!t.done;t=n.next())for(i=t.value,t=rh(e,i,r),i=d(i.variantIds),s=i.next();!s.done;s=i.next())s=o.get(s.value),s.primary=s.primary||t.primary,s.video=t;return o}function rh(e,t,n){var r=t.segments.map(function(i){return H3(e,i,t)});return n.ee(r),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new wn(r),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,colorGamut:t.colorGamut,videoLayout:t.videoLayout,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,mssPrivateData:t.mssPrivateData,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching,fullMimeTypes:new Set([ar(t.mimeType,t.codecs)]),isAudioMuxedInVideo:t.isAudioMuxedInVideo||!1,baseOriginalId:null}}function H3(e,t,n){var r=new Ws("segment",e.h,e.g,t.dataKey);return e=new Rt(t.startTime,t.endTime,function(){return[r.toString()]},0,null,t.initSegmentKey!=null?G3(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||""),e.mimeType=t.mimeType||n.mimeType||"",e.codecs=t.codecs||n.codecs||"",t.thumbnailSprite&&e.Hf(t.thumbnailSprite),e}function G3(e,t){var n=new Ws("segment",e.h,e.g,t);return new qi(function(){return[n.toString()]},0,null)}function cE(){this.g=null}f=cE.prototype,f.configure=function(){},f.start=function(e,t){var n=this,r,i,o,s,a,u,l;return H(function(h){switch(h.h){case 1:if(r=ym(e),n.g=r,r==null||r.g!="manifest")throw new fe(2,1,9004,e);return i=new no,h.D(2),h.g(i.init(),4);case 4:return h.g(eh(i,r.Jb(),r.cb()),5);case 5:return o=h.i,h.g(o.getManifests([r.key()]),6);case 6:return s=h.i,a=s[0],u=new uE(r.Jb(),r.cb()),l=lE(u,a),t.makeTextStreamsForClosedCaptions(l),h.return(l);case 2:return h.u(),h.g(i.destroy(),7);case 7:h.B(0)}})},f.stop=function(){return Promise.resolve()},f.update=function(){},f.onExpirationUpdated=function(e,t){var n=this,r,i,o,s,a,u,l;return H(function(h){switch(h.h){case 1:return r=n.g,i=new no,h.m(2,3),h.g(i.init(),5);case 5:return h.g(eh(i,r.Jb(),r.cb()),6);case 6:return o=h.i,h.g(o.getManifests([r.key()]),7);case 7:if(s=h.i,a=s[0],u=a.sessionIds.includes(e),l=a.expiration==null||a.expiration>t,!u||!l){h.A(3);break}return h.g(o.updateManifestExpiration(r.key(),t),3);case 3:return h.u(),h.g(i.destroy(),10);case 10:h.B(0);break;case 2:h.l(),h.A(3)}})},f.onInitialVariantChosen=function(){},f.banLocation=function(){},f.setMediaElement=function(){},Hi("application/x-offline-manifest",function(){return new cE});function fE(){}function dE(e,t){var n=ym(e);return n&&n.g=="manifest"?(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:t},e=Bu(e)):e=n&&n.g=="segment"?K3(n.key(),n,t):Da(new fe(2,1,9004,e)),e}function K3(e,t,n){var r=new no;return Bu(void 0).Xa(function(){return r.init()}).Xa(function(){return eh(r,t.Jb(),t.cb())}).Xa(function(i){return i.getSegments([t.key()])}).Xa(function(i){return{uri:t,data:i[0].data,headers:{},originalRequest:n}}).finally(function(){return r.destroy()})}Re("shaka.offline.OfflineScheme",fE),fE.plugin=dE,ua("offline",dE);function hE(e,t,n){var r,i,o,s,a,u;return H(function(l){switch(l.h){case 1:r=[];for(var h=[],g=d(n),m=g.next();!m.done;m=g.next()){m=m.value;for(var E=!1,A=d(h),k=A.next();!k.done;k=A.next())if(k=k.value,z3(k.info,m)){k.sessionIds.push(m.sessionId),E=!0;break}E||h.push({info:m,sessionIds:[m.sessionId]})}i=d(h),o=i.next();case 2:if(o.done){l.A(4);break}return s=o.value,a=W3(e,t,s),l.g(a,5);case 5:u=l.i,r=r.concat(u),o=i.next(),l.A(2);break;case 4:return l.return(r)}})}function W3(e,t,n){var r,i;return H(function(o){switch(o.h){case 1:return r=new yf({nc:t,onError:function(){},vf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),o.m(2),r.configure(e),o.g(EA(r,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:o.o(3);break;case 2:return o.l(),o.g(r.destroy(),5);case 5:return o.return([]);case 3:return i=[],o.g(Promise.all(n.sessionIds.map(function(s){return H(function(a){if(a.h==1)return a.m(2),a.g(AA(r,s),4);if(a.h!=2)return i.push(s),a.o(0);a.l(),a.j()})})),6);case 6:return o.g(r.destroy(),7);case 7:return o.return(i)}})}function z3(e,t){function n(r,i){return r.robustness==i.robustness&&r.contentType==i.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&Sn(e.audioCapabilities,t.audioCapabilities,n)&&Sn(e.videoCapabilities,t.videoCapabilities,n)}function $3(e,t,n){var r=t.presentationTimeline.getDuration();return t=pE(t),{offlineUri:null,originalManifestUri:e,duration:r,size:0,expiration:1/0,tracks:t,appMetadata:n,isIncomplete:!1}}function Sm(e,t){var n=lE(new uE(e.Jb(),e.cb()),t),r=t.appMetadata||{};return n=pE(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:r,isIncomplete:t.isIncomplete||!1}}function pE(e){var t=[],n=Uu(e.variants);n=d(n);for(var r=n.next();!r.done;r=n.next())t.push(mt(r.value));for(e=d(e.textStreams),n=e.next();!n.done;n=e.next())t.push(ur(n.value));return t}function X3(){this.g=new Map}function Y3(e,t){var n=t.audio,r=t.video;if(n&&!r&&e.g.set(n.id,n.bandwidth||t.bandwidth),!n&&r&&e.g.set(r.id,r.bandwidth||t.bandwidth),n&&r){var i=n.bandwidth||393216,o=r.bandwidth||t.bandwidth-i;o<=0&&(o=t.bandwidth),e.g.set(n.id,i),e.g.set(r.id,o)}}function J3(e,t){e.g.set(t.id,t.bandwidth||2048)}function gE(e,t){return e=e.g.get(t),e==null&&(e=0),e}function ci(e){var t=this;if(e&&e.constructor!=De)throw new fe(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.Rb()):(this.h=ol(),this.g=new lr,this.g.configure(this.h.networking)),this.i=[],this.l=[];var n=!e;this.j=new _u(function(){var r,i,o,s,a;return H(function(u){switch(u.h){case 1:return u.g(Promise.all(t.l.map(function(l){return pm(l)})),2);case 2:for(r=function(){},i=[],o=d(t.i),s=o.next();!s.done;s=o.next())a=s.value,i.push(a.then(r,r));return u.g(Promise.all(i),3);case 3:if(!n){u.A(4);break}return u.g(t.g.destroy(),4);case 4:t.h=null,t.g=null,u.j()}})}),this.m=1e9}function Tm(){if(Ks(ct()))e:{for(var e=d(Vc.values()),t=e.next();!t.done;t=e.next())if(t=t.value,t=t()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}f=ci.prototype,f.destroy=function(){return this.j.destroy()},f.configure=function(e,t){return arguments.length==2&&typeof e=="string"&&(e=Wf(e,t)),pa(this.h,e)},f.getConfiguration=function(){var e=ol();return pa(e,this.h,ol()),e},f.Rb=function(){return this.g},f.store=function(e,t,n,r,i){var o=this,s=this.getConfiguration(),a=new hm(this.g);return this.l.push(a),t=Q3(this,e,t||{},r||[],i||[],function(){var u;return H(function(l){return l.h==1?n?l.A(2):l.g(tl(e,o.g,s.manifest.retryParameters),3):(l.h!=2&&(n=l.i),u=Ca(e,n||null),l.return(u()))})},s,a),t=new br(t,function(){return pm(a)}),t.finally(function(){$t(o.l,a)}),hk(this,t)};function Q3(e,t,n,r,i,o,s,a){var u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce,Ee,ye,Ve,Le,Ce;return H(function(ke){switch(ke.h){case 1:return ih(),l=u=null,h=new no,E=m=g=null,ke.m(2,3),ke.g(o(),5);case 5:return u=ke.i,ke.g(sk(e,t,u,s),6);case 6:if(A=ke.i,Mo(e),k=!A.presentationTimeline.U()&&!A.presentationTimeline.Oc(),!k)throw new fe(2,9,9005,t);b=d(r),V=b.next();case 7:if(V.done){ke.A(9);break}return B=V.value,ke.g(ak(e,B,A),10);case 10:Z=ke.i,A.imageStreams.push(Z),Mo(e),V=b.next(),ke.A(7);break;case 9:ue=d(i),pe=ue.next();case 11:return pe.done?(ny(s.drm.clearKeys,A.variants),ie=A.variants.some(function(Ge){if(Ge.audio){for(var Je=d(Ge.audio.drmInfos),Ft=Je.next();!Ft.done;Ft=Je.next())if(Ft.value.licenseServerUri.startsWith("data:"))return!0}if(Ge.video){for(Ge=d(Ge.video.drmInfos),Je=Ge.next();!Je.done;Je=Ge.next())if(Je.value.licenseServerUri.startsWith("data:"))return!0}return!1}),ve=s.offline.usePersistentLicense,ie&&(ve=!1),ke.g(e.dd(A,function(Ge){E=E||Ge},s,ve),15)):(te=pe.value,ke.g(uk(e,A,te.uri,te.language,te.kind,te.mime,te.codecs),14));case 14:le=ke.i,A.textStreams.push(le),Mo(e),pe=ue.next(),ke.A(11);break;case 15:if(l=ke.i,Mo(e),E)throw E;return ke.g(q3(A,l,s,ve),16);case 16:return ke.g(h.init(),17);case 17:return Mo(e),ke.g(iE(h),18);case 18:return g=ke.i,Mo(e),ce=ek(l,A,t,n,s,a,ve),Ee=ce.tk,ye=ce.Dh,ke.g(g.cb.addManifests([Ee]),19);case 19:if(Ve=ke.i,Mo(e),m=Ve[0],Mo(e),E)throw E;return ke.g(Z3(e,ye,m,Ee,a,s,g.cb,A,l,ve),20);case 20:return Mo(e),SE(A,Ee,l,ve),ke.g(g.cb.updateManifest(m,Ee),21);case 21:return Mo(e),Le=new Ws("manifest",g.path.Jb,g.path.cb,m),ke.return(Sm(Le,Ee));case 3:return ke.u(),ke.g(h.destroy(),22);case 22:if(!u){ke.A(23);break}return ke.g(u.stop(),23);case 23:if(!l){ke.A(25);break}return ke.g(l.destroy(),25);case 25:ke.B(0);break;case 2:if(Ce=ke.l(),m==null){ke.A(27);break}return ke.g(mE(m),27);case 27:throw E||Ce}})}function Z3(e,t,n,r,i,o,s,a,u,l){var h,g,m,E,A,k,b,V,B,Z,ue;return H(function(pe){switch(pe.h){case 1:if(h={},g=0,m=function(){if(e.j.g||i.l)throw new fe(2,9,7001)},E=function(te,le){var ie,ve,ce,Ee,ye,Ve,Le,Ce,ke;return H(function(Ge){if(Ge.h==1){for(ie=d(te),ve=ie.next(),ce={};!ve.done;ce={hc:void 0},ve=ie.next())ce.hc=ve.value,m(),Ee=C3(ce.hc,o),ye=ce.hc.i,Ve=ce.hc.h,Le=function(Je){return function(Ft){var dt,kn,Ut,Gn;return H(function(sn){switch(sn.h){case 1:if(dt=Je.hc.g,kn=dt.Ub(!1),!dt.aesKey||kn){sn.A(2);break}return sn.g(Tp(Ft,dt.aesKey,Je.hc.j),3);case 3:Ft=sn.i;case 2:return Ut=dm(dt),sn.g(s.addSegments([{data:Ft}]),4);case 4:Gn=sn.i,m(),h[Ut]=Gn[0],g+=Ft.byteLength,sn.j()}})}}(ce),Ce=ce.hc.g,(ke=Ce.Ub(!1))?P3(i,ce.hc.groupId,ke,ye,Ve,Le):i.queue(ce.hc.groupId,Ee,ye,Ve,Le);return Ge.g(k3(i),2)}return m(),!le||i.l?Ge.A(0):(SE(a,r,u,l),Ge.g(s.updateManifest(n,r),0))})},A=!1,pe.m(2),!Em(a)||!A||yE(a)){pe.A(4);break}return pe.g(E(t.filter(function(te){return te.h}),!0),5);case 5:return m(),t=t.filter(function(te){return!te.h}),k=h,b=g,h={},g=0,pe.g(vE(s,n,r,k,b,function(){return Mo(e)}),6);case 6:m();case 4:if(A){pe.A(7);break}return pe.g(E(t,!1),8);case 8:return m(),V=h,B=g,h={},g=0,pe.g(vE(s,n,r,V,B,function(){return m()}),9);case 9:m();case 7:pe.o(0);break;case 2:return Z=pe.l(),ue=Object.values(h),pe.g(s.removeSegments(ue,function(){}),10);case 10:throw Z}})}function mE(e){var t,n,r,i;return H(function(o){switch(o.h){case 1:return t=new no,o.g(t.init(),2);case 2:return o.g(iE(t),3);case 3:return n=o.i,r=new Ws("manifest",n.path.Jb,n.path.cb,e),o.g(t.destroy(),4);case 4:return i=new ci,o.g(i.remove(r.toString()),0)}})}function vE(e,t,n,r,i,o){var s,a,u,l,h,g,m,E,A,k,b;return H(function(V){switch(V.h){case 1:for(s=!1,V.m(2),a=!0,u=d(n.streams),l=u.next();!l.done;l=u.next())for(h=l.value,g=d(h.segments),m=g.next();!m.done;m=g.next())E=m.value,A=E.pendingSegmentRefId?r[E.pendingSegmentRefId]:null,A!=null&&(E.dataKey=A,E.pendingSegmentRefId=void 0),A=E.pendingInitSegmentRefId?r[E.pendingInitSegmentRefId]:null,A!=null&&(E.initSegmentKey=A,E.pendingInitSegmentRefId=void 0),E.pendingSegmentRefId&&(a=!1),E.pendingInitSegmentRefId&&(a=!1);return n.size+=i,a&&(n.isIncomplete=!1),V.g(e.updateManifest(t,n),4);case 4:s=!0,o(),V.o(0);break;case 2:return k=V.l(),V.g(mE(t),5);case 5:if(s){V.A(6);break}return b=Object.values(r),V.g(e.removeSegments(b,function(){}),6);case 6:throw k}})}function q3(e,t,n,r){var i,o,s,a,u,l,h,g,m,E,A,k,b,V,B,Z,ue,pe,te,le,ie,ve,ce,Ee,ye,Ve,Le,Ce,ke,Ge;return H(function(Je){switch(Je.h){case 1:return i={width:1/0,height:1/0},me(e,n.restrictions,i),Je.g(Ke(t,e,r,n.drm.preferredKeySystems,n.drm.keySystemsMapping),2);case 2:for(o=[],s=n.preferredDecodingAttributes,a=n.preferredVideoCodecs,u=n.preferredAudioCodecs,l=n.preferredTextFormats,X(e,a,u,s,l),h=d(e.variants),g=h.next();!g.done;g=h.next())m=g.value,o.push(mt(m));for(E=d(e.textStreams),A=E.next();!A.done;A=E.next())k=A.value,o.push(ur(k));for(b=d(e.imageStreams),V=b.next();!V.done;V=b.next())B=V.value,o.push(si(B));return Je.g(n.offline.trackSelectionCallback(o),3);case 3:for(Z=Je.i,ue=e.presentationTimeline.getDuration(),pe=0,te=d(Z),le=te.next();!le.done;le=te.next())ie=le.value,ve=ie.bandwidth*ue/8,pe+=ve;return Je.m(4),Je.g(n.offline.downloadSizeCallback(pe),6);case 6:if(ce=Je.i,!ce)throw new fe(2,9,9014);Je.o(5);break;case 4:throw Ee=Je.l(),Ee instanceof fe?Ee:new fe(2,9,9015);case 5:for(ye=new Set,Ve=new Set,Le=new Set,Ce=d(Z),ke=Ce.next();!ke.done;ke=Ce.next())Ge=ke.value,Ge.type=="variant"&&ye.add(Ge.id),Ge.type=="text"&&Ve.add(Ge.id),Ge.type=="image"&&Le.add(Ge.id);e.variants=e.variants.filter(function(Ft){return ye.has(Ft.id)}),e.textStreams=e.textStreams.filter(function(Ft){return Ve.has(Ft.id)}),e.imageStreams=e.imageStreams.filter(function(Ft){return Le.has(Ft.id)}),mk(e),Je.j()}})}function ek(e,t,n,r,i,o,s){var a=$3(n,t,r),u=i.offline.progressCallback;M3(o,function(A,k){a.size=k,u(a,A)},function(A,k){l&&s&&h==k&&Gl(e,"cenc",A)});var l=Em(t)&&!yE(t),h=null;l&&(h=vk.get(e.g.keySystem));for(var g=new X3,m=d(t.textStreams),E=m.next();!E.done;E=m.next())g.g.set(E.value.id,52);for(m=d(t.imageStreams),E=m.next();!E.done;E=m.next())J3(g,E.value);for(m=d(t.variants),E=m.next();!E.done;E=m.next())Y3(g,E.value);return o=ck(o,g,t,i),i=o.streams,o=o.Dh,(g=e.g)&&s&&(g.initData=[]),{tk:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.Td(),streams:i,sessionIds:s?Yv(e):[],drmInfo:g,appMetadata:r,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},Dh:o}}function Em(e){return e.variants.some(function(t){var n=t.audio&&t.audio.encrypted;return t.video&&t.video.encrypted||n})}function yE(e){return e.variants.some(function(t){return(t.video?t.video.drmInfos:[]).concat(t.audio?t.audio.drmInfos:[]).some(function(n){return n.initData&&n.initData.length})})}function SE(e,t,n,r){if(t.expiration=n.Td(),n=Yv(n),t.sessionIds=r?n:[],Em(e)&&r&&!n.length)throw new fe(2,9,9007)}f.remove=function(e){return xm(this,tk(this,e))};function tk(e,t){var n,r,i,o,s,a;return H(function(u){switch(u.h){case 1:if(ih(),n=ym(t),n==null||n.g!="manifest")throw new fe(2,9,9004,t);return r=n,i=new no,u.D(2),u.g(i.init(),4);case 4:return u.g(eh(i,r.Jb(),r.cb()),5);case 5:return o=u.i,u.g(o.getManifests([r.key()]),6);case 6:return s=u.i,a=s[0],u.g(Promise.all([nk(e,a,i),rk(o,r,a)]),2);case 2:return u.u(),u.g(i.destroy(),8);case 8:u.B(0)}})}function TE(e,t){for(var n=[],r=d(e.streams),i=r.next();!i.done;i=r.next())i=i.value,t&&i.type=="video"?n.push({contentType:ar(i.mimeType,i.codecs),robustness:e.drmInfo.videoRobustness}):t||i.type!="audio"||n.push({contentType:ar(i.mimeType,i.codecs),robustness:e.drmInfo.audioRobustness});return n}function nk(e,t,n){return H(function(r){return r.g(gk(e.g,e.h.drm,n,t),0)})}function rk(e,t,n){function r(){}var i=pk(n);return Sm(t,n),Promise.all([e.removeSegments(i,r),e.removeManifests([t.key()],r)])}f.Ok=function(){return xm(this,ik(this))};function ik(e){var t,n,r,i,o,s,a,u,l,h;return H(function(g){switch(g.h){case 1:return ih(),t=e.g,n=e.h.drm,r=new no,i=!1,g.D(2),g.g(r.init(),4);case 4:o=[],O3(r,function(m){return o.push(m)}),s=d(o),a=s.next();case 5:if(a.done){g.A(2);break}return u=a.value,g.g(u.getAll(),8);case 8:return l=g.i,g.g(hE(n,t,l),9);case 9:return h=g.i,g.g(u.remove(h),10);case 10:h.length!=l.length&&(i=!0),a=s.next(),g.A(5);break;case 2:return g.u(),g.g(r.destroy(),11);case 11:g.B(3);break;case 3:return g.return(!i)}})}f.list=function(){return xm(this,ok())};function ok(){var e,t,n;return H(function(r){switch(r.h){case 1:return ih(),e=[],t=new no,r.D(2),r.g(t.init(),4);case 4:return n=Promise.resolve(),D3(t,function(i,o){n=n.then(function(){var s;return H(function(a){if(a.h==1)return a.g(o.getAllManifests(),2);s=a.i,s.forEach(function(u,l){u=Sm(new Ws("manifest",i.Jb,i.cb,l),u),e.push(u)}),a.j()})})}),r.g(n,2);case 2:return r.u(),r.g(t.destroy(),6);case 6:r.B(3);break;case 3:return r.return(e)}})}function sk(e,t,n,r){var i,o,s,a,u;return H(function(l){if(l.h==1)return i=null,o=e.g,s={networkingEngine:o,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(h){i=h},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return r.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},addFont:function(){}},n.configure(r.manifest),Mo(e),l.g(n.start(t,s),2);if(l.h!=3)return a=l.i,Mo(e),u=xE(a),l.g(Promise.all(Vh(u,function(h){return h.createSegmentIndex()})),3);if(Mo(e),i)throw i;return l.return(a)})}function ak(e,t,n){var r,i,o,s,a,u,l,h,g,m,E,A,k,b,V;return H(function(B){switch(B.h){case 1:return B.g(EE(e,t),2);case 2:if(r=B.i,r!="text/vtt")throw new fe(1,2,2017,t);return B.g(lk(t,e.g,e.h.streaming.retryParameters),3);case 3:if(i=B.i,o=lu(r),!o)throw new fe(2,2,2014,r);for(s=o(),a={periodStart:0,segmentStart:0,segmentEnd:n.presentationTimeline.getDuration(),vttOffset:0},u=wt(i),l=s.parseMedia(u,a,t,[]),h=[],g=d(l),m=g.next(),E={};!m.done;E={Qf:void 0,fd:void 0},m=g.next())E.fd=m.value,E.Qf=null,A=function(Z){return function(){return Z.Qf==null&&(Z.Qf=Rr([t],[Z.fd.payload])),Z.Qf||[]}}(E),k=new Rt(E.fd.startTime,E.fd.endTime,A,0,null,null,0,0,1/0),E.fd.payload.includes("#xywh")&&(b=E.fd.payload.split("#xywh=")[1].split(","),b.length===4&&k.Hf({height:parseInt(b[3],10),positionX:parseInt(b[0],10),positionY:parseInt(b[1],10),width:parseInt(b[2],10)})),h.push(k);if(V=r,!h.length){B.A(4);break}return B.g(tl(h[0].R()[0],e.g,e.h.manifest.retryParameters),5);case 5:V=B.i;case 4:return B.return({id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new wn(h),mimeType:V||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ar(V||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}function uk(e,t,n,r,i,o,s){var a,u,l;return H(function(h){if(h.h==1)return o?h.A(2):h.g(EE(e,n),3);if(h.h!=2&&(o=h.i),a={id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:bf(0,t.presentationTimeline.getDuration(),[n]),mimeType:o||"",codecs:s||"",kind:i,encrypted:!1,drmInfos:[],keyIds:new Set,language:r,originalLanguage:r,label:null,type:Bt,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ar(o||"",s||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},u=ar(a.mimeType,a.codecs),l=cu(u),!l)throw new fe(2,2,2014,o);return h.return(a)})}function EE(e,t){var n;return H(function(r){switch(r.h){case 1:return r.m(2),r.g(tl(t,e.g,e.h.streaming.retryParameters),4);case 4:n=r.i,r.o(3);break;case 2:r.l();case 3:if(n)return r.return(n);throw new fe(1,2,2011,t)}})}function lk(e,t,n){var r,i,o;return H(function(s){return s.h==1?(r=Go,i=jr([e],n),i.method="GET",s.g(t.request(r,i).promise,2)):(o=s.i,s.return(o.data))})}f.dd=function(e,t,n,r){var i=this,o;return H(function(s){return s.h==1?(o=new yf({nc:i.g,onError:t,vf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),o.configure(n.drm),s.g(TA(o,e.variants,r),2)):s.h!=3?s.g(Xv(o),3):s.return(o)})};function ck(e,t,n,r){var i=new Map,o=xE(n),s=new Map;o=d(o);for(var a=o.next();!a.done;a=o.next()){a=a.value;var u=fk(e,t,n,a,r,i);s.set(a.id,u)}for(e=d(n.variants),t=e.next();!t.done;t=e.next())t=t.value,t.audio&&s.get(t.audio.id).variantIds.push(t.id),t.video&&s.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(s.values()),Dh:Array.from(i.values())}}function fk(e,t,n,r,i,o){var s={id:r.id,originalId:r.originalId,groupId:r.groupId,primary:r.primary,type:r.type,mimeType:r.mimeType,codecs:r.codecs,frameRate:r.frameRate,pixelAspectRatio:r.pixelAspectRatio,hdr:r.hdr,colorGamut:r.colorGamut,videoLayout:r.videoLayout,kind:r.kind,language:r.language,originalLanguage:r.originalLanguage,label:r.label,width:r.width||null,height:r.height||null,encrypted:r.encrypted,keyIds:r.keyIds,segments:[],variantIds:[],roles:r.roles,forced:r.forced,channelsCount:r.channelsCount,audioSamplingRate:r.audioSamplingRate,spatialAudio:r.spatialAudio,closedCaptions:r.closedCaptions,tilesLayout:r.tilesLayout,mssPrivateData:r.mssPrivateData,external:r.external,fastSwitching:r.fastSwitching,isAudioMuxedInVideo:r.isAudioMuxedInVideo},a=i.offline.numberOfParallelDownloads,u=a===0?r.id:0;return dk(r,n.presentationTimeline.Db(),function(l,h){var g=dm(l),m=void 0;if(!o.has(g)){var E=l.endTime-l.startTime;E=gE(t,r.id)*E,E=qT(e.g,E),o.set(g,new QT(l,E,u,!1,h))}l.ea&&(m=dm(l.ea),o.has(m)||(E=gE(t,r.id)*.5,E=qT(e.g,E),o.set(m,new QT(l.ea,E,u,!0,h)))),s.segments.push({pendingInitSegmentRefId:m,initSegmentKey:m?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:g,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite}),a!==0&&(u=(u+1)%a)}),s}function dk(e,t,n){if(t=e.segmentIndex.find(t),t!=null)for(var r=e.segmentIndex.get(t);r;)n(r,t),r=e.segmentIndex.get(++t)}function Mo(e){if(e.j.g)throw new fe(2,9,7001)}function ih(){if(!Tm())throw new fe(2,9,9e3)}function xm(e,t){return H(function(n){return n.h==1?(e.i.push(t),n.D(2),n.g(t,4)):n.h!=2?n.return(n.i):(n.u(),$t(e.i,t),n.B(0))})}function hk(e,t){var n=t.promise;return e.i.push(n),t.finally(function(){$t(e.i,n)})}function pk(e){var t=new Set;e=d(e.streams);for(var n=e.next();!n.done;n=e.next()){n=d(n.value.segments);for(var r=n.next();!r.done;r=n.next())r=r.value,r.initSegmentKey!=null&&t.add(r.initSegmentKey),t.add(r.dataKey)}return Array.from(t)}function gk(e,t,n,r){var i,o,s;return H(function(a){return a.h==1?r.drmInfo?(i=N3(n),o=r.sessionIds.map(function(u){return{sessionId:u,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:TE(r,!1),videoCapabilities:TE(r,!0)}}),a.g(hE(t,e,o),2)):a.return():a.h!=3?(s=a.i,a.g(i.remove(s),3)):a.g(i.add(o.filter(function(u){return!s.includes(u.sessionId)})),0)})}function xE(e){for(var t=new Set,n=d(e.variants),r=n.next();!r.done;r=n.next())r=r.value,r.audio&&t.add(r.audio),r.video&&t.add(r.video);for(n=d(e.textStreams),r=n.next();!r.done;r=n.next())t.add(r.value);for(e=d(e.imageStreams),n=e.next();!n.done;n=e.next())t.add(n.value);return t}function mk(e){e.variants.map(function(o){return o.video});var t=new Set(e.variants.map(function(o){return o.audio}));e=e.textStreams;for(var n=d(t),r=n.next();!r.done;r=n.next()){r=d(t);for(var i=r.next();!i.done;i=r.next());}for(t=d(e),n=t.next();!n.done;n=t.next())for(n=d(e),r=n.next();!r.done;r=n.next());}Re("shaka.offline.Storage",ci),ci.deleteAll=function(){var e;return H(function(t){return t.h==1?(e=new no,t.D(2),t.g(L3(e),2)):t.h!=5?(t.u(),t.g(e.destroy(),5)):t.B(0)})},ci.prototype.list=ci.prototype.list,ci.prototype.removeEmeSessions=ci.prototype.Ok,ci.prototype.remove=ci.prototype.remove,ci.prototype.store=ci.prototype.store,ci.prototype.getNetworkingEngine=ci.prototype.Rb,ci.prototype.getConfiguration=ci.prototype.getConfiguration,ci.prototype.configure=ci.prototype.configure,ci.prototype.destroy=ci.prototype.destroy,ci.support=Tm;var vk=new Map().set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");q0("offline",Tm);function ro(){}function Po(e,t){for(e={priority:t||0,callback:e},t=0;t<Hc.length;t++)if(Hc[t].priority<e.priority){Hc.splice(t,0,e);return}Hc.push(e)}Re("shaka.polyfill",ro),ro.register=Po,ro.installAll=function(){for(var e=d(Hc),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(n){ut("Error installing polyfill!",n)}}};var Hc=[];function oh(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}oh.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=d(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(t=d(e.audioCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},oh.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function wE(e){return xo(e)?"cbcs":Ns(e)||Eo(e)||Bi(e)||e==="com.huawei.wiseplay"?"cenc":(ut("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function AE(e){if(!e)return!1;e=e.getConfiguration();var t=e.audioCapabilities&&e.audioCapabilities[0];return!!((e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&e.encryptionScheme!==void 0)}function wm(e,t){return!!(!e||e==t||(e=="cbcs"||e=="cbcs-1-9")&&ct().Wc())}function IE(){}var Gc;function CE(){ct().Jf()&&!Gc&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(Gc=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=yk,navigator.emeEncryptionSchemePolyfilled=!0)}function yk(e,t){var n=this,r;return H(function(i){return i.h==1?i.g(Gc.call(n,e,t),2):(r=i.i,AE(r)?(navigator.requestMediaKeySystemAccess=Gc,i.return(r)):(navigator.requestMediaKeySystemAccess=ME,i.return(ME.call(n,e,t))))})}function ME(e,t){var n=this,r,i,o,s,a,u,l,h,g,m,E,A;return H(function(k){if(k.h==1){for(r=wE(e),i=[],o=d(t),s=o.next();!s.done;s=o.next())a=s.value,u=PE(a.videoCapabilities,r),l=PE(a.audioCapabilities,r),a.videoCapabilities&&a.videoCapabilities.length&&!u.length||a.audioCapabilities&&a.audioCapabilities.length&&!l.length||(h=Object.assign({},a),h.videoCapabilities=u,h.audioCapabilities=l,i.push(h));if(!i.length)throw g=Error("Unsupported keySystem or supportedConfigurations."),g.name="NotSupportedError",g.code=DOMException.NOT_SUPPORTED_ERR,g;return k.g(Gc.call(n,e,i),2)}return m=k.i,A=E=null,i[0]&&(i[0].videoCapabilities&&(E=i[0].videoCapabilities[0].encryptionScheme),i[0].audioCapabilities&&(A=i[0].audioCapabilities[0].encryptionScheme)),k.return(new oh(m,E,A))})}function PE(e,t){return e&&e.filter(function(n){return wm(n.encryptionScheme,t)})}ro.EmeEncryptionScheme=IE,IE.install=CE,Po(CE);function kE(){}var Kc;function RE(){ct().Jf()&&!Kc&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(Kc=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=Sk,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}function Sk(e){var t=this,n,r;return H(function(i){switch(i.h){case 1:return i.g(Kc.call(t,e),2);case 2:if(n=i.i,!n.supported||!e.keySystemConfiguration)return i.return(n);if(r=n.keySystemAccess,AE(r))return navigator.mediaCapabilities.decodingInfo=Kc,i.return(n);if(navigator.mediaCapabilities.decodingInfo=bE,r){i.A(3);break}return i.g(DE(e),4);case 4:return n.keySystemAccess=i.i,i.return(n);case 3:return i.return(bE.call(t,e))}})}function bE(e){var t=this,n,r,i,o,s,a,u;return H(function(l){switch(l.h){case 1:return r=n=null,!e.keySystemConfiguration||(i=e.keySystemConfiguration,o=i.keySystem,r=i.audio&&i.audio.encryptionScheme,n=i.video&&i.video.encryptionScheme,s=wE(o),a={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},wm(r,s)&&wm(n,s))?l.g(Kc.call(t,e),2):l.return(a);case 2:if(u=l.i,u.keySystemAccess){u.keySystemAccess=new oh(u.keySystemAccess,n,r),l.A(3);break}if(!e.keySystemConfiguration){l.A(3);break}return l.g(DE(e),5);case 5:u.keySystemAccess=l.i;case 3:return l.return(u)}})}function DE(e){var t,n;return H(function(r){if(r.h==1){var i=e.keySystemConfiguration,o=[],s=[];return i.audio&&o.push({robustness:i.audio.robustness||"",contentType:e.audio.contentType,encryptionScheme:i.audio.encryptionScheme}),i.video&&s.push({robustness:i.video.robustness||"",contentType:e.video.contentType,encryptionScheme:i.video.encryptionScheme}),i={initDataTypes:i.initDataType?[i.initDataType]:[],distinctiveIdentifier:i.distinctiveIdentifier,persistentState:i.persistentState,sessionTypes:i.sessionTypes},o.length&&(i.audioCapabilities=o),s.length&&(i.videoCapabilities=s),t=i,r.g(navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=r.i,r.return(n)})}ro.MCapEncryptionScheme=kE,kE.install=RE,Po(RE,-2);function sh(){}function OE(){ct().cc()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),sh.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Tk)}function Tk(e){var t,n,r,i,o,s,a,u,l,h,g;return H(function(m){switch(m.h){case 1:if(t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},ct(),n=e.video,r=e.audio,e.type!="media-source"){if(e.type=="file"){if(n&&(i=n.contentType,o=Tu().canPlayType(i)!="",!o)||r&&(s=r.contentType,a=Tu().canPlayType(s)!="",!a))return m.return(t)}else return m.return(t);m.A(2);break}if(!Ks())return m.return(t);if(!n){m.A(3);break}return m.g(Ek(n),4);case 4:if(u=m.i,!u)return m.return(t);case 3:if(r){var E=ct().Pa(),A=r.contentType;if(E==="CAST"&&r.spatialRendering&&(A+="; spatialRendering=true"),l=ji(A),!l)return m.return(t)}case 2:return e.keySystemConfiguration?(h=e.keySystemConfiguration,m.g(xk(n,r,h),6)):(t.supported=!0,m.return(t));case 6:(g=m.i)&&(t.supported=!0,t.keySystemAccess=g);case 5:return m.return(t)}})}function Ek(e){var t,n,r;return H(function(i){return i.h==1?(t=ct(),n=t.Pa(),n!=="CAST"?i.A(2):i.g(wk(e),3)):i.h!=2?(r=i.i,i.return(r)):i.return(ji(e.contentType))})}function xk(e,t,n){var r,i,o,s,a,u,l,h,g,m,E,A;return H(function(k){switch(k.h){case 1:r=[],i=[],o=[],n.audio&&(s={robustness:n.audio.robustness||"",contentType:t.contentType},ct().wi()&&t.contentType.includes('codecs="ac-3"')&&(s.contentType='audio/mp4; codecs="ec-3"'),n.audio.encryptionScheme&&(s.encryptionScheme=n.audio.encryptionScheme,o.push(n.audio.encryptionScheme)),r.push(s)),n.video&&(a={robustness:n.video.robustness||"",contentType:e.contentType},n.video.encryptionScheme&&(a.encryptionScheme=n.video.encryptionScheme,o.push(n.video.encryptionScheme)),i.push(a)),u={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes},r.length&&(u.audioCapabilities=r),i.length&&(u.videoCapabilities=i),l=e?e.contentType:"",h=t?t.contentType:"",g=yi(l)+";"+Vs(l),m=yi(h)+";"+Vs(h),E=n.keySystem,A=null,k.m(2);var b=is(g,m,E,o);if(wo.has(b)){b=is(g,m,E,o),A=wo.get(b)||null,k.A(4);break}return k.g(navigator.requestMediaKeySystemAccess(n.keySystem,[u]),5);case 5:b=A=k.i;var V=is(g,m,E,o);wo.set(V,b);case 4:k.o(3);break;case 2:k.l();case 3:return k.return(A)}})}function wk(e){var t,n,r,i,o;return H(function(s){if(s.h==1){if(!(R.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return s.return(ji(e.contentType));switch(t=e.contentType,e.width&&e.height&&e.width>1280&&e.height>720&&(t+="; width="+e.width+"; height="+e.height),e.framerate&&(n=Math.round(e.framerate),n<24||n>30)&&(t+="; framerate="+e.framerate),r=e.transferFunction||"",r){case"":case"srgb":break;case"pq":t+="; eotf=smpte2084";break;case"hlg":t+="; eotf=arib-std-b67";break;default:return s.return(!1)}return i=!1,o=Ak,o.has(t)?(i=o.get(t),s.A(2)):s.g(cast.__platform__.canDisplayType(t),3)}return s.h!=2&&(i=s.i,o.set(t,i)),s.return(i)})}ro.MediaCapabilities=sh,sh.install=OE,sh.originalMcap=null;var Ak=new Map;Po(OE,-1);function NE(){}function LE(){var e=ct(),t=e.Ia()==="WEBKIT"?e.Ca():null;for((R.MediaSource||R.ManagedMediaSource)&&t&&R.MediaSource&&(t<=12?(jE(),Ik()):t<=15&&jE()),e=d(e.Gi()),t=e.next();!t.done;t=e.next())Mk(t.value);(R.MediaSource||R.ManagedMediaSource)&&Ck(),R.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Pk()}function jE(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,we.apply(0,arguments));return t.abort=function(){},t}}function Ik(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function Ck(){if(R.MediaSource){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(n){return ka(n)!="mp2t"&&e(n)}}if(R.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);R.ManagedMediaSource.isTypeSupported=function(n){return ka(n)!="mp2t"&&t(n)}}}function Mk(e){var t=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(r){return Vs(r)!=e&&t(r)},R.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);R.ManagedMediaSource.isTypeSupported=function(r){return Vs(r)!=e&&n(r)}}}function Pk(){var e=MediaSource.isTypeSupported;ct().bj()&&(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),r=n.findIndex(function(s){return s.startsWith("codecs=")});if(r<0)return e(t);var i=n[r].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),o=i.findIndex(function(s){return s.startsWith("vp09")});return o>=0&&(i[o]="vp9",n[r]='codecs="'+i.join(",")+'"',t=n.join("; ")),e(t)})}ro.MediaSource=NE,NE.install=LE,Po(LE);function Am(){}var Im,Cm,Mm,Pm,km,Rm;function FE(e){R.HTMLVideoElement&&R.WebKitMediaKeys&&R.shakaMediaKeysPolyfill!=Dm&&(e!==void 0&&e&&(Im=!0,Cm=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Mm=HTMLMediaElement.prototype.setMediaKeys,Pm=R.MediaKeys,km=R.MediaKeySystemAccess,Rm=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Rk,R.MediaKeys=Wc,R.MediaKeySystemAccess=ah,navigator.requestMediaKeySystemAccess=kk,R.shakaMediaKeysPolyfill=Dm,cf.clear(),wo.clear())}function kk(e,t){try{var n=new ah(e,t);return Promise.resolve(n)}catch(r){return Promise.reject(r)}}function Rk(e){var t=this.mediaKeys;return t&&t!=e&&UE(t,null),delete this.mediaKeys,(this.mediaKeys=e)?UE(e,this):Promise.resolve()}function bk(e){if(e=wt(e.initData),gr(e).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=Zi(e.subarray(4),!0),e=Vi(e);var t=new Event("encrypted");t.initDataType="skd",t.initData=Wr(e),this.dispatchEvent(t)}ro.PatchedMediaKeysApple=Am,Am.uninstall=function(){R.shakaMediaKeysPolyfill==Dm&&Im&&(Im=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Cm),HTMLMediaElement.prototype.setMediaKeys=Mm,R.MediaKeys=Pm,R.MediaKeySystemAccess=km,navigator.requestMediaKeySystemAccess=Rm,Cm=Rm=Mm=km=Pm=null,R.shakaMediaKeysPolyfill="",cf.clear(),wo.clear())},Am.install=FE;function ah(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(e=d(t),t=e.next();!t.done;t=e.next()){var n=t.value;if(n.persistentState=="required")t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var r=!1,i=!1;if(n.audioCapabilities)for(var o=d(n.audioCapabilities),s=o.next();!s.done;s=o.next())s=s.value,s.contentType&&(r=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,s.contentType.split(";")[0])&&(t.audioCapabilities.push(s),i=!0));if(n.videoCapabilities)for(n=d(n.videoCapabilities),o=n.next();!o.done;o=n.next())o=o.value,o.contentType&&(r=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,o.contentType.split(";")[0])&&(t.videoCapabilities.push(o),i=!0));r||(i=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=i?t:null}if(t){this.g=t;return}}throw e=Error("Unsupported keySystem"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}ah.prototype.createMediaKeys=function(){var e=new Wc(this.keySystem);return Promise.resolve(e)},ah.prototype.getConfiguration=function(){return this.g};function Wc(e){this.h=new WebKitMediaKeys(e),this.g=new Et}Wc.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary")throw new TypeError("Session type "+e+" is unsupported on this platform.");return new bm(this.h)},Wc.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function UE(e,t){if(e.g.Ra(),!t)return Promise.resolve();e.g.F(t,"webkitneedkey",bk);try{return el(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(n){return Promise.reject(n)}}Wc.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function bm(e){_n.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new Et,this.sessionId="",this.expiration=NaN,this.closed=new zn,this.keyStatuses=new BE,this.onkeystatuseschange=null}P(bm,_n),f=bm.prototype,f.generateRequest=function(e,t){var n=this;this.h=new zn;try{var r=this.l.createSession("video/mp4",wt(t));this.i=r,this.sessionId=r.sessionId||"",this.j.F(this.i,"webkitkeymessage",function(i){n.h&&(n.h.resolve(),n.h=null),i=new Map().set("messageType",n.keyStatuses.Vb()==null?"license-request":"license-renewal").set("message",Wr(i.message)),i=new yt("message",i),n.dispatchEvent(i)}),this.j.F(r,"webkitkeyadded",function(){n.g&&(uh(n,"usable"),n.g.resolve(),n.g=null)}),this.j.F(r,"webkitkeyerror",function(){var i=Error("EME PatchedMediaKeysApple key error");if(i.errorCode=n.i.error,n.h!=null)n.h.reject(i),n.h=null;else if(n.g!=null)n.g.reject(i),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:uh(n,"output-not-allowed");break;default:uh(n,"internal-error")}}),uh(this,"status-pending")}catch(i){this.h.reject(i)}return this.h},f.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},f.update=function(e){this.g=new zn;try{this.i.update(wt(e))}catch(t){this.g.reject(t)}return this.g},f.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ra()}catch(e){this.closed.reject(e)}return this.closed},f.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function uh(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new yt("keystatuseschange"),e.dispatchEvent(t),e.onkeystatuseschange&&e.onkeystatuseschange(t)}function BE(){this.size=0,this.g=void 0}f=BE.prototype,f.Vb=function(){return this.g},f.forEach=function(e){this.g&&e(this.g,ao.value())},f.get=function(e){if(this.has(e))return this.g},f.has=function(e){var t=ao.value();return!!(this.g&&Pr(e,t))},f.entries=function(){},f.keys=function(){},f.values=function(){};var Dm="apple";Po(function(){R.HTMLVideoElement&&R.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||FE())});function VE(){}function _E(){if(R.MediaKeys){var e=ct();MediaKeys.prototype.setServerCertificate&&e.oe()||(MediaKeys.prototype.setServerCertificate=Dk)}}function Dk(){return Promise.resolve(!1)}ro.PatchedMediaKeysCert=VE,VE.install=_E,Po(_E);function HE(){}function GE(){if(!(!R.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Fm="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Ok,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Nk,R.MediaKeys=zc,R.MediaKeySystemAccess=lh,R.shakaMediaKeysPolyfill=Lk}}function Om(e){var t=Fm;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function Ok(e,t){try{var n=new lh(e,t);return Promise.resolve(n)}catch(r){return Promise.reject(r)}}function Nk(e){var t=this.mediaKeys;return t&&t!=e&&KE(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&KE(e,this),Promise.resolve()}ro.PatchedMediaKeysWebkit=HE,HE.install=GE;function lh(e,t){this.g=this.keySystem=e;var n=!1;e=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",n=!1);var r=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video"),t=d(t);for(var o=t.next();!o.done;o=t.next()){o=o.value;var s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:o.initDataTypes,sessionTypes:["temporary"],label:o.label},a=!1;if(o.audioCapabilities)for(var u=d(o.audioCapabilities),l=u.next();!l.done;l=u.next())l=l.value,l.contentType&&(a=!0,i.canPlayType(l.contentType.split(";")[0],this.g)&&(s.audioCapabilities.push(l),r=!0));if(o.videoCapabilities)for(u=d(o.videoCapabilities),l=u.next();!l.done;l=u.next())l=l.value,l.contentType&&(a=!0,i.canPlayType(l.contentType,this.g)&&(s.videoCapabilities.push(l),r=!0));if(a||(r=i.canPlayType("video/mp4",this.g)||i.canPlayType("video/webm",this.g)),o.persistentState=="required"&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):r=!1),r){this.h=s;return}}throw n="Unsupported keySystem",(e=="org.w3.clearkey"||e=="com.widevine.alpha")&&(n="None of the requested configurations were supported."),e=Error(n),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}lh.prototype.createMediaKeys=function(){var e=new zc(this.g);return Promise.resolve(e)},lh.prototype.getConfiguration=function(){return this.h};function zc(e){this.l=e,this.h=null,this.g=new Et,this.i=[],this.j=new Map}function KE(e,t){e.h=t,e.g.Ra();var n=Fm;t&&(e.g.F(t,n+"needkey",function(r){var i=new CustomEvent("encrypted");i.initDataType="cenc",i.initData=Wr(r.initData),e.h.dispatchEvent(i)}),e.g.F(t,n+"keymessage",function(r){var i=Nm(e,r.sessionId);i&&(r=new Map().set("messageType",i.keyStatuses.Vb()==null?"licenserequest":"licenserenewal").set("message",r.message),r=new yt("message",r),i.h&&(i.h.resolve(),i.h=null),i.dispatchEvent(r))}),e.g.F(t,n+"keyadded",function(r){(r=Nm(e,r.sessionId))&&r.ready()}),e.g.F(t,n+"keyerror",function(r){var i=Nm(e,r.sessionId);if(i){var o=Error("EME v0.1b key error"),s=r.errorCode;s.systemCode=r.systemCode,o.errorCode=s,!r.sessionId&&i.h?(r.systemCode==45&&(o.message="Unsupported session type."),i.h.reject(o),i.h=null):r.sessionId&&i.g?(i.g.reject(o),i.g=null):(o=r.systemCode,r.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?ch(i,"output-restricted"):o==1?ch(i,"expired"):ch(i,"internal-error"))}}))}zc.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary"&&e!="persistent-license")throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new Lm(t,this.l,e),this.i.push(e),e},zc.prototype.setServerCertificate=function(){return Promise.resolve(!1)},zc.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Nm(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function Lm(e,t,n){_n.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new zn,this.keyStatuses=new zE,this.onkeystatuseschange=null}P(Lm,_n),f=Lm.prototype,f.ready=function(){ch(this,"usable"),this.g&&this.g.resolve(),this.g=null};function WE(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if(e.l=="persistent-license")if(n)var r=wt(Vi("LOAD_SESSION|"+n));else{var i=Vi("PERSISTENT|");r=dr(i,t)}else r=wt(t)}catch(s){return Promise.reject(s)}e.h=new zn;var o=Om("generateKeyRequest");try{e.j[o](e.i,r)}catch(s){if(s.name!="InvalidStateError")return e.h=null,Promise.reject(s);new Yt(function(){try{e.j[o](e.i,r)}catch(a){e.h.reject(a),e.h=null}}).ka(.01)}return e.h}function jm(e,t,n){if(e.g)e.g.then(function(){return jm(e,t,n)}).catch(function(){return jm(e,t,n)});else{if(e.g=t,e.i=="webkit-org.w3.clearkey"){var r=Un(n),i=JSON.parse(r);i.keys[0].kty!="oct"&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),r=bi(i.keys[0].k),i=bi(i.keys[0].kid)}else r=wt(n),i=null;var o=Om("addKey");try{e.j[o](e.i,r,i,e.sessionId)}catch(s){e.g.reject(s),e.g=null}}}function ch(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new yt("keystatuseschange"),e.dispatchEvent(t),e.onkeystatuseschange&&e.onkeystatuseschange(t)}f.generateRequest=function(e,t){return WE(this,t,null)},f.load=function(e){return this.l=="persistent-license"?WE(this,null,e):Promise.reject(Error("Not a persistent session."))},f.update=function(e){var t=new zn;return jm(this,t,e),t},f.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=Om("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch{}}return this.closed.resolve(),this.closed},f.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function zE(){this.size=0,this.g=void 0}f=zE.prototype,f.Vb=function(){return this.g},f.forEach=function(e){this.g&&e(this.g,ao.value())},f.get=function(e){if(this.has(e))return this.g},f.has=function(e){var t=ao.value();return!!(this.g&&Pr(e,t))},f.entries=function(){},f.keys=function(){},f.values=function(){};var Fm="",Lk="webkit";Po(GE);function $E(){}function XE(){R.crypto&&("randomUUID"in R.crypto||(R.crypto.randomUUID=jk))}function jk(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}ro.RandomUUID=$E,$E.install=XE,Po(XE);function YE(){}function JE(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:Fk})}function Fk(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}ro.Symbol=YE,YE.install=JE,Po(JE);function QE(){}function ZE(){for(var e=d([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),t=e.next();!t.done;t=e.next())t=t.value,t.prototype.indexOf||(t.prototype.indexOf=Uk),t.prototype.lastIndexOf||(t.prototype.lastIndexOf=Bk),t.prototype.includes||(t.prototype.includes=Vk)}function Uk(e,t){return Array.prototype.indexOf.call(this,e,t)}function Bk(e,t){return Array.prototype.lastIndexOf.call(this,e,t)}function Vk(e,t){return this.indexOf(e,t)!==-1}ro.TypedArray=QE,QE.install=ZE,Po(ZE);function qE(){}function ex(){if(R.HTMLMediaElement){var e=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var t=e.apply(this);return t&&t.catch(function(){}),t}}}ro.VideoPlayPromise=qE,qE.install=ex,Po(ex);function tx(){}function nx(){if(R.HTMLVideoElement){var e=HTMLVideoElement.prototype;!e.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in e||typeof Tu().webkitDroppedFrameCount=="number")&&(e.getVideoPlaybackQuality=_k)}}function _k(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}ro.VideoPlaybackQuality=tx,tx.install=nx,Po(nx);function rx(){}function ix(){if(!R.VTTCue&&R.TextTrackCue){var e=null,t=TextTrackCue.length;if(t==3)e=Um;else if(t==6)e=Hk;else{try{var n=!!Um(1,2,"")}catch{n=!1}n&&(e=Um)}e&&(R.VTTCue=function(r,i,o){return e(r,i,o)})}}function Um(e,t,n){return new R.TextTrackCue(e,t,n)}function Hk(e,t,n){return new R.TextTrackCue(e+"-"+t+"-"+n,e,t,n)}ro.VTTCue=rx,rx.install=ix,Po(ix);function ui(e){_n.call(this),this.g=e,this.m=null,this.h=[],this.j=-1,this.i=this.l=null,this.o=new Et}P(ui,_n),f=ui.prototype,f.destroy=function(){var e=this;return H(function(t){if(t.h==1)return t.g(e.removeAllItems(),2);e.g=null,e.o&&(e.o.release(),e.o=null),_n.prototype.release.call(e),t.j()})},f.configure=function(e){this.m=e},f.getConfiguration=function(){return this.m},f.getCurrentItem=function(){return this.h.length&&this.j>=0&&this.j<this.h.length?this.h[this.j]:null},f.getCurrentItemIndex=function(){return this.j},f.getItems=function(){return this.h.slice()},f.insertItems=function(e){this.h.push.apply(this.h,M(e)),this.dispatchEvent(new yt("itemsinserted"))},f.removeAllItems=function(){var e=this,t,n,r,i;return H(function(o){if(o.h==1)return e.o.Ra(),e.h.length&&e.j>=0?o.g(e.g.xc(),2):o.A(2);if(o.h!=4){for(t=[],e.i&&(e.i.preloadManager.l||t.push(e.i.preloadManager.destroy()),e.i=null),e.l&&(e.l.preloadManager.l||t.push(e.l.preloadManager.destroy()),e.l=null),n=d(e.h),r=n.next();!r.done;r=n.next())i=r.value,i.preloadManager&&!i.preloadManager.l&&t.push(i.preloadManager.destroy());return t.length?o.g(Promise.all(t),4):o.A(4)}e.h=[],e.j=-1,e.dispatchEvent(new yt("itemsremoved")),o.j()})},f.playItem=function(e){var t=this,n,r,i,o,s,a,u,l,h,g,m,E,A,k,b,V,B;return H(function(Z){switch(Z.h){case 1:if(t.o.Ra(),!t.h.length||e>=t.h.length)throw new fe(2,7,7007);if(n=t.getCurrentItem(),r=t.h[e],t.j!=e&&(t.j=e,t.dispatchEvent(new yt("currentitemchanged"))),i=t.g.We(),o=t.m?t.m.preloadNextUrlWindow:0,o>0&&(s=!1,t.o.F(i,"timeupdate",function(){var ue,pe,te,le;return H(function(ie){switch(ie.h){case 1:if(t.l||t.h.length<=1||s||t.g.U()||!i.duration)return ie.return();if(ue=t.g.Sa().end-i.currentTime,isNaN(ue)){ie.A(0);break}if(!(ue<=o)){ie.A(0);break}if(pe=t.m&&t.m.repeatMode,te=null,t.j+1<t.h.length?te=t.h[t.j+1]:pe==1&&(te=t.h[0]),!te||te.preloadManager&&!te.preloadManager.l){ie.A(0);break}return s=!0,le=null,ie.m(5),ie.g(t.g.preload(te.manifestUri,te.startTime,te.mimeType,te.config),7);case 7:le=ie.i,ie.o(6);break;case 5:ie.l(),le=null;case 6:t.l={item:te,preloadManager:le},s=!1,ie.j()}})})),t.o.F(t.g,"complete",function(){var ue=t.m&&t.m.repeatMode,pe=!1;if(ue==2)pe=!0;else{var te=t.j+1;te<t.h.length?t.playItem(te):ue==1&&(t.h.length==1?pe=!0:t.playItem(0))}pe&&(i.paused?(i.currentTime=t.g.Sa().start,i.play()):t.o.F(i,"paused",function(){i.currentTime=t.g.Sa().start,i.play()}))}),a=r.manifestUri,r.preloadManager&&!r.preloadManager.l&&(a=r.preloadManager),u=!1,t.l&&t.l.item==r&&t.l.preloadManager?a=t.l.preloadManager:t.i&&t.i.item==r&&t.i.preloadManager&&(a=t.i.preloadManager,u=!0),!t.i){Z.A(2);break}if(u||t.i.preloadManager.l){Z.A(3);break}return Z.g(t.i.preloadManager.destroy(),3);case 3:t.i=null;case 2:if(!(t.m&&t.m.preloadPrevItem&&n&&t.g.Ud()===pi)){Z.A(5);break}return l=null,Z.m(6),Z.g(t.g.gj(),8);case 8:l=Z.i,Z.o(7);break;case 6:Z.l(),l=null;case 7:t.i={item:n,preloadManager:l};case 5:return r.config&&(t.g.Ji(),t.g.configure(r.config)),Z.g(t.g.load(a,r.startTime,r.mimeType),9);case 9:if(t.l=null,r.extraText)for(h=d(r.extraText),g=h.next();!g.done;g=h.next())m=g.value,m.mime?t.g.Ld(m.uri,m.language,m.kind,m.mime,m.codecs):t.g.Ld(m.uri,m.language,m.kind);if(r.extraThumbnail)for(E=d(r.extraThumbnail),A=E.next();!A.done;A=E.next())k=A.value,t.g.Ie(k);if(r.extraChapter)for(b=d(r.extraChapter),V=b.next();!V.done;V=b.next())B=V.value,t.g.He(B.uri,B.language,B.mime);Z.j()}})},Re("shaka.queue.QueueManager",ui),ui.prototype.playItem=ui.prototype.playItem,ui.prototype.removeAllItems=ui.prototype.removeAllItems,ui.prototype.insertItems=ui.prototype.insertItems,ui.prototype.getItems=ui.prototype.getItems,ui.prototype.getCurrentItemIndex=ui.prototype.getCurrentItemIndex,ui.prototype.getCurrentItem=ui.prototype.getCurrentItem,ui.prototype.getConfiguration=ui.prototype.getConfiguration,ui.prototype.configure=ui.prototype.configure,ui.prototype.destroy=ui.prototype.destroy,gd=function(e){return new ui(e)};function ko(){}ko.prototype.parseInit=function(){},ko.prototype.setSequenceMode=function(){},ko.prototype.setManifestType=function(){},ko.prototype.parseMedia=function(e,t){var n=null,r=[];e=Un(e).split(/\r?\n/),e=d(e);for(var i=e.next();!i.done;i=e.next())if((i=i.value)&&!/^\s+$/.test(i)&&(i=Gk.exec(i))){var o=Kk.exec(i[1]);o=parseInt(o[1],10)*60+parseFloat(o[2].replace(",",".")),i=new It(o,t.segmentEnd?t.segmentEnd:o+2,i[2]),n&&(n.endTime=o,r.push(n)),n=i}return n&&r.push(n),r},Re("shaka.text.LrcTextParser",ko),ko.prototype.parseMedia=ko.prototype.parseMedia,ko.prototype.setManifestType=ko.prototype.setManifestType,ko.prototype.setSequenceMode=ko.prototype.setSequenceMode,ko.prototype.parseInit=ko.prototype.parseInit;var Gk=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Kk=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;oi("application/x-subtitle-lrc",function(){return new ko});function vo(){this.g="UNKNOWN"}vo.prototype.parseInit=function(){},vo.prototype.setSequenceMode=function(){},vo.prototype.setManifestType=function(e){this.g=e},vo.prototype.parseMedia=function(e,t,n,r){var i=Un(e);if(e=[],i=="")return e;var o=As(i,"tt",!0);if(!o)throw new fe(2,2,2005,"Failed to parse TTML.");if(i=di(o,"body")[0],!i)return[];var s=uo(o,$c,"frameRate"),a=uo(o,$c,"subFrameRate"),u=uo(o,$c,"frameRateMultiplier"),l=uo(o,$c,"tickRate"),h=uo(o,$c,"cellResolution"),g=o.attributes["xml:space"]||"default",m=uo(o,hh,"extent");if(g!="default"&&g!="preserve")throw new fe(2,2,2005,"Invalid xml:space value: "+g);g=g=="default",s=new Yk(s,a,u,l),h=Xk(h),a=di(o,"metadata")[0],a=(a?a.children:[]).filter(function(k){return k!=`
74
+ `}),u=di(o,"style"),o=di(o,"region"),l=[];for(var E=d(o),A=E.next();!A.done;A=E.next())(A=Wk(this,A.value,u,m))&&l.push(A);if(Mn(i,"p").length)throw new fe(2,2,2001,"<p> can only be inside <div> in TTML");for(m=d(Mn(i,"div")),E=m.next();!E.done;E=m.next())if(Mn(E.value,"span").length)throw new fe(2,2,2001,"<span> can only be inside <p> in TTML");return(t=ox(this,i,t,s,a,u,o,l,g,h,null,!1,n,r))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e};function ox(e,t,n,r,i,o,s,a,u,l,h,g,m,E){var A=h;if(Bs(t)){if(!g)return null;var k={tagName:"span",children:[vr(t)],attributes:{},parent:null}}else k=t;for(var b=null,V=d(gx),B=V.next();!B.done&&!(b=dh(k,"backgroundImage",i,"#",B.value)[0]);B=V.next());V=null,B=uo(k,gx,"backgroundImage");var Z=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(B&&Z.test(B)){if(V=parseInt(B.split(":").pop(),10)-1,V>=E.length)return null;V=E[V]}else m&&B&&!B.startsWith("#")&&(Z=new Ct(m),B=new Ct(B),(B=Z.resolve(B).toString())&&(V=B));if((t.tagName=="p"||b||V)&&(g=!0),t=g,B=(k.attributes["xml:space"]||(u?"default":"preserve"))=="default",Z=k.children.every(Bs),u=[],!Z)for(var ue=d(k.children),pe=ue.next();!pe.done;pe=ue.next())(pe=ox(e,pe.value,n,r,i,o,s,a,B,l,k,g,m,E))&&u.push(pe);if(i=h!=null,m=vr(k),m=k.children.length&&m&&/\S/.test(m),ue=k.attributes.begin||k.attributes.end||k.attributes.dur,!(ue||m||k.tagName=="br"||u.length!=0||i&&!B))return null;for(E=ux(k,r),m=E.start,E=E.end;A&&A.tagName&&A.tagName!="tt";)E=$k(A,r,m,E),m=E.start,E=E.end,A=A.parent;if(m==null&&(m=0),m+=n.periodStart,E=E==null?1/0:E+n.periodStart,e.g!=="HLS"&&(m=Math.max(m,n.segmentStart),E=Math.min(E,n.segmentEnd)),!ue&&u.length>0)for(m=1/0,E=0,n=d(u),r=n.next();!r.done;r=n.next())r=r.value,m=Math.min(m,r.startTime),E=Math.max(E,r.endTime);if(k.tagName=="br")return e=new It(m,E,""),e.lineBreak=!0,e;if(n="",Z&&(n=zr(vr(k)||""),B&&(n=n.replace(/\s+/g," "))),n=new It(m,E,n),n.nestedCues=u,g||(n.isContainer=!0),l&&(n.cellResolution=l),l=dh(k,"region",s,"")[0],k.attributes.region&&l&&l.attributes["xml:id"]){var te=l.attributes["xml:id"];n.region=a.filter(function(le){return le.id==te})[0]}return a=l,h&&i&&!k.attributes.region&&!k.attributes.style&&(a=dh(h,"region",s,"")[0]),zk(e,n,k,a,b,V,o,t,u.length==0),n}function Wk(e,t,n,r){var i=new ss,o=t.attributes["xml:id"];if(!o)return null;i.id=o,o=null,r&&(o=Gm.exec(r)||Km.exec(r)),r=o?Number(o[1]):null,o=o?Number(o[2]):null;var s,a=fh(e,t,n,"extent");if(a){var u=(s=Gm.exec(a))||Km.exec(a);u!=null&&(i.width=Number(u[1]),i.height=Number(u[2]),s||(r!=null&&(i.width=i.width*100/r),o!=null&&(i.height=i.height*100/o)),i.widthUnits=s||r!=null?Vr:0,i.heightUnits=s||o!=null?Vr:0)}return(e=fh(e,t,n,"origin"))&&(u=(s=Gm.exec(e))||Km.exec(e),u!=null&&(i.viewportAnchorX=Number(u[1]),i.viewportAnchorY=Number(u[2]),s?a||(i.width=100-i.viewportAnchorX,i.widthUnits=Vr,i.height=100-i.viewportAnchorY,i.heightUnits=Vr):(o!=null&&(i.viewportAnchorY=i.viewportAnchorY*100/o),r!=null&&(i.viewportAnchorX=i.viewportAnchorX*100/r)),i.viewportAnchorUnits=s||r!=null?Vr:0)),i}function Bm(e){var t=e.match(/rgba\(([^)]+)\)/);return t&&(t=t[1].split(","),t.length==4)?(t[3]=String(Number(t[3])/255),"rgba("+t.join(",")+")"):e}function zk(e,t,n,r,i,o,s,a,u){if(a=a||u,Mi(e,n,r,s,"direction",a)=="rtl"&&(t.direction="rtl"),u=Mi(e,n,r,s,"writingMode",a),u=="tb"||u=="tblr"?t.writingMode="vertical-lr":u=="tbrl"?t.writingMode="vertical-rl":u=="rltb"||u=="rl"?t.direction="rtl":u&&(t.direction=Zn),(u=Mi(e,n,r,s,"textAlign",!0))?(t.positionAlign=Zk.get(u),t.lineAlign=Qk.get(u),t.textAlign=fn[u.toUpperCase()]):t.textAlign=Jt,(u=Mi(e,n,r,s,"displayAlign",!0))&&(t.displayAlign=en[u.toUpperCase()]),(u=Mi(e,n,r,s,"color",a))&&(t.color=Bm(u)),(u=Mi(e,n,r,s,"backgroundColor",a))&&(t.backgroundColor=Bm(u)),(u=Mi(e,n,r,s,"border",a))&&(t.border=u),u=Mi(e,n,r,s,"fontFamily",a))switch(u){case"monospaceSerif":t.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":t.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":t.fontFamily="sans-serif";break;case"monospaceSansSerif":t.fontFamily="Consolas,monospace";break;case"proportionalSerif":t.fontFamily="serif";break;default:t.fontFamily=u.split(",").filter(function(l){return l!="default"}).join(",")}switch((u=Mi(e,n,r,s,"fontWeight",a))&&u=="bold"&&(t.fontWeight=ia),u=Mi(e,n,r,s,"wrapOption",a),t.wrapLine=!(u&&u=="noWrap"),(u=Mi(e,n,r,s,"lineHeight",a))&&u.match(Il)&&(t.lineHeight=u),(u=Mi(e,n,r,s,"fontSize",a))&&(u.match(Il)||u.match(Jk))&&(t.fontSize=u),(u=Mi(e,n,r,s,"fontStyle",a))&&(t.fontStyle=su[u.toUpperCase()]),i?(o=i.attributes.imageType||i.attributes.imagetype,u=i.attributes.encoding,i=vr(i).trim(),o=="PNG"&&u=="Base64"&&i&&(t.backgroundImage="data:image/png;base64,"+i)):o&&(t.backgroundImage=o),(i=Mi(e,n,r,s,"textOutline",a))&&(i=i.split(" "),i[0].match(Il)?t.textStrokeColor=t.color:(t.textStrokeColor=Bm(i[0]),i.shift()),i[0]&&i[0].match(Il)?t.textStrokeWidth=i[0]:t.textStrokeColor=""),(i=Mi(e,n,r,s,"letterSpacing",a))&&i.match(Il)&&(t.letterSpacing=i),(i=Mi(e,n,r,s,"linePadding",a))&&i.match(Il)&&(t.linePadding=i),(i=Mi(e,n,r,s,"opacity",a))&&(t.opacity=parseFloat(i)),(i=fh(e,r,s,"textDecoration"))&&sx(t,i),(i=Vm(e,n,s,"textDecoration"))&&sx(t,i),(i=Mi(e,n,r,s,"textCombine",a))&&(t.textCombineUpright=i),Mi(e,n,r,s,"ruby",a)){case"container":t.rubyTag="ruby";break;case"text":t.rubyTag="rt"}}function sx(e,t){t=d(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(Is)||e.textDecoration.push(Is);break;case"noUnderline":e.textDecoration.includes(Is)&&$t(e.textDecoration,Is);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&$t(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&$t(e.textDecoration,"overline")}}function Mi(e,t,n,r,i,o){return o=o===void 0?!0:o,(t=Vm(e,t,r,i))?t:o?fh(e,n,r,i):null}function fh(e,t,n,r){if(!t)return null;var i=uo(t,hh,r);return i||ax(e,t,n,r)}function Vm(e,t,n,r){var i=uo(t,hh,r);return i||ax(e,t,n,r)}function ax(e,t,n,r){t=dh(t,"style",n,"");for(var i=null,o=0;o<t.length;o++){var s=Co(t[o],"urn:ebu:tt:style",r);s||(s=uo(t[o],hh,r)),s||(s=Vm(e,t[o],n,r)),s&&(i=s)}return i}function dh(e,t,n,r,i){var o=[];if(!e||n.length<1)return o;var s=e;for(e=null;!e&&!(e=i?Co(s,i,t):s.attributes[t])&&(s=s.parent,s););if(t=e){for(t=d(t.split(" ")),i=t.next();!i.done;i=t.next())for(i=i.value,e=d(n),s=e.next();!s.done;s=e.next())if(s=s.value,r+s.attributes["xml:id"]==i){o.push(s);break}}return o}function $k(e,t,n,r){return e=ux(e,t),n==null?n=e.start:e.start!=null&&(n+=e.start),r==null?r=e.end:e.start!=null&&(r+=e.start),{start:n,end:r}}function ux(e,t){var n=_m(e.attributes.begin,t),r=_m(e.attributes.end,t);return e=_m(e.attributes.dur,t),r==null&&e!=null&&(r=n+e),{start:n,end:r}}function _m(e,t){var n=null;if(lx.test(e)){e=lx.exec(e),n=Number(e[1]);var r=Number(e[2]),i=Number(e[3]),o=Number(e[4]);o+=(Number(e[5])||0)/t.h,i+=o/t.frameRate,n=i+r*60+n*3600}else if(cx.test(e))n=Hm(cx,e);else if(fx.test(e))n=Hm(fx,e);else if(dx.test(e))e=dx.exec(e),n=Number(e[1])/t.frameRate;else if(hx.test(e))e=hx.exec(e),n=Number(e[1])/t.g;else if(px.test(e))n=Hm(px,e);else if(e)throw new fe(2,2,2001,"Could not parse cue time range in TTML");return n}function Hm(e,t){return e=e.exec(t),e==null||e[0]==""?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+(Number(e[2])||0)*60+(Number(e[1])||0)*3600}function Xk(e){return e&&(e=/^(\d+) (\d+)$/.exec(e))?{columns:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}Re("shaka.text.TtmlTextParser",vo),vo.prototype.parseMedia=vo.prototype.parseMedia,vo.prototype.setManifestType=vo.prototype.setManifestType,vo.prototype.setSequenceMode=vo.prototype.setSequenceMode,vo.prototype.parseInit=vo.prototype.parseInit;function Yk(e,t,n,r){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(r),this.g==0&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}var Gm=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Jk=/^(\d{1,4}(?:\.\d+)?|100)%$/,Il=/^(\d+px|\d+em|\d*\.?\d+c)$/,Km=/^(\d+)px (\d+)px$/,lx=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,cx=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,fx=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,dx=/^(\d*(?:\.\d*)?)f$/,hx=/^(\d*(?:\.\d*)?)t$/,px=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Qk=new Map().set("left",Ar).set("center","center").set("right","end").set("start",Ar).set("end","end"),Zk=new Map().set("left","line-left").set("center","center").set("right","line-right").set("start","line-left").set("end","line-right"),$c=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],hh=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],gx=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];oi("application/ttml+xml",function(){return new vo});function Zr(){this.g=new vo}Zr.prototype.parseInit=function(e){var t=!1;if(new Hn().box("moov",Wt).box("trak",Wt).box("mdia",Wt).box("minf",Wt).box("stbl",Wt).S("stsd",ca).box("stpp",function(n){t=!0,n.parser.stop()}).parse(e),!t)throw new fe(2,2,2007)},Zr.prototype.setSequenceMode=function(e){this.g.setSequenceMode(e)},Zr.prototype.setManifestType=function(e){this.g.setManifestType(e)},Zr.prototype.parseMedia=function(e,t,n){var r=[],i=null,o=[],s=new Map,a=[];if(new Hn().box("moof",Wt).box("traf",Wt).S("tfhd",function(V){i=Sf(V.reader,V.flags).Rd}).S("trun",function(V){V=xf(V.reader,V.version,V.flags),V=d(V.jh);for(var B=V.next();!B.done;B=V.next())a.push(B.value.sampleSize||i||0)}).S("subs",function(V){for(var B=V.reader,Z=B.W(),ue=-1,pe=0;pe<Z;pe++){var te=B.W();ue+=te,te=B.Da();for(var le=[],ie=0;ie<te;ie++)V.version==1?le.push(B.W()):le.push(B.Da()),B.Z(),B.Z(),B.W();s.set(ue,le)}}).box("mdat",Gu(function(V){o.push(V)},!1)).parse(e,!1),o.length==0)throw new fe(2,2,2007);e=dr.apply(Sr,M(o));for(var u=0,l=0;l<a.length;l++){var h=wt(e,u,a[l]);u+=a[l];var g=s.get(l);if(g&&g.length){for(var m=wt(h,0,g[0]),E=[],A=g[0],k=1;k<g.length;k++){var b=wt(h,A,g[k]);b=Uo(b),E.push("data:image/png;base64,"+b),A+=g[k]}r=r.concat(this.g.parseMedia(m,t,n,E))}else r=r.concat(this.g.parseMedia(h,t,n,[]))}return r},Re("shaka.text.Mp4TtmlParser",Zr),Zr.prototype.parseMedia=Zr.prototype.parseMedia,Zr.prototype.setManifestType=Zr.prototype.setManifestType,Zr.prototype.setSequenceMode=Zr.prototype.setSequenceMode,Zr.prototype.parseInit=Zr.prototype.parseInit,oi('application/mp4; codecs="stpp"',function(){return new Zr}),oi('application/mp4; codecs="stpp.ttml"',function(){return new Zr}),oi('application/mp4; codecs="stpp.ttml.im1i"',function(){return new Zr}),oi('application/mp4; codecs="stpp.ttml.im1t"',function(){return new Zr}),oi('application/mp4; codecs="stpp.ttml.im2i"',function(){return new Zr}),oi('application/mp4; codecs="stpp.ttml.im2t"',function(){return new Zr}),oi('application/mp4; codecs="stpp.ttml.etd1"',function(){return new Zr}),oi('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new Zr}),oi('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new Zr}),oi('application/mp4; codecs="stpp.TTML.im1t"',function(){return new Zr});function $i(){this.g="UNKNOWN"}$i.prototype.parseInit=function(){},$i.prototype.setSequenceMode=function(){},$i.prototype.setManifestType=function(e){this.g=e},$i.prototype.parseMedia=function(e,t){e=Un(e),e=e.replace(/\r\n|\r(?=[^\n]|$)/gm,`
75
+ `);var n=e.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new fe(2,2,2e3);if(e=t.vttOffset,this.g=="HLS"&&n[0].includes("X-TIMESTAMP-MAP")){var r=n[0];if(e=r.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),r=r.match(/MPEGTS:(\d+)/m),!e||!r)throw new fe(2,2,2e3);if(e=ws(e[1]),e==null)throw new fe(2,2,2e3);r=Number(r[1]);for(var i=t.segmentStart-t.periodStart;i>=95443.7176888889;)i-=95443.7176888889,r+=8589934592;e=t.periodStart+r/9e4-e}for(t=[],r=d(n[0].split(`
76
+ `)),i=r.next();!i.done;i=r.next())if(i=i.value,/^Region:/.test(i)){i=new Es(i);var o=new ss;as(i),Fs(i);for(var s=as(i);s;){var a=o,u=s;(s=/^id=(.*)$/.exec(u))?a.id=s[1]:(s=/^width=(\d{1,2}|100)%$/.exec(u))?a.width=Number(s[1]):(s=/^lines=(\d+)$/.exec(u))?(a.height=Number(s[1]),a.heightUnits=2):(s=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(a.regionAnchorX=Number(s[1]),a.regionAnchorY=Number(s[2])):(s=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(a.viewportAnchorX=Number(s[1]),a.viewportAnchorY=Number(s[2])):/^scroll=up$/.exec(u)&&(a.scroll="up"),Fs(i),s=as(i)}t.push(o)}for(r=new Map,lo(r),i=[],n=d(n.slice(1)),o=n.next();!o.done;o=n.next()){if(o=o.value.split(`
77
+ `),(o.length!=1||o[0])&&!vx.test(o[0])&&o[0]=="STYLE"){for(a=[],s=-1,u=1;u<o.length;u++)o[u].includes("::cue")&&(a.push([]),s=a.length-1),s!=-1&&(a[s].push(o[u]),o[u].includes("}")&&(s=-1));for(a=d(a),s=a.next();!s.done;s=a.next()){var l=s.value;s="global",(u=l[0].match(/\((.*)\)/))&&(s=u.pop()),u=l.slice(1,-1),l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(u=l[1].split(";")),(l=r.get(s))||(l=new It(0,0,""));for(var h=!1,g=0;g<u.length;g++){var m=/^\s*([^:]+):\s*(.*)/.exec(u[g]);if(m){var E=m[2].trim().replace(";","");switch(m[1].trim()){case"background-color":case"background":h=!0,l.backgroundColor=E;break;case"color":h=!0,l.color=E;break;case"font-family":h=!0,l.fontFamily=E;break;case"font-size":h=!0,l.fontSize=E;break;case"font-weight":(parseInt(E,10)>=700||E=="bold")&&(h=!0,l.fontWeight=ia);break;case"font-style":switch(E){case"normal":h=!0,l.fontStyle=ou;break;case"italic":h=!0,l.fontStyle=Pa;break;case"oblique":h=!0,l.fontStyle="oblique"}break;case"opacity":h=!0,l.opacity=parseFloat(E);break;case"text-combine-upright":h=!0,l.textCombineUpright=E;break;case"text-shadow":h=!0,l.textShadow=E;break;case"white-space":h=!0,l.wrapLine=E!="noWrap"}}}h&&r.set(s,l)}}if(l=o,g=e,l.length==1&&!l[0]||vx.test(l[0])||l[0]=="STYLE"||l[0]=="REGION")o=null;else if(o=null,h=0,l[0].includes("-->")||(o=l[0],h=1),a=new Es(l[h]),s=xs(a),m=Us(a,/[ \t]+--\x3e[ \t]+/g),u=xs(a),s==null||m==null||u==null)ut("Failed to parse VTT time code. Cue skipped:",o,l),o=null;else{for(s+=g,u+=g,s<0&&(s=0),g="",m=h+1;m<l.length;m++)m>h+1&&(g+=`
78
+ `),g+=l[m];for(g=g.trim(),r.has("global")?(l=r.get("global").clone(),l.startTime=s,l.endTime=u,l.payload=g):l=new It(s,u,g),Fs(a),s=as(a);s;)mx(l,s,t),Fs(a),s=as(a);$r(l,r),o!=null&&(l.id=o),o=l}o&&i.push(o)}return i};function mx(e,t,n){var r;(r=eR.exec(t))?(t=r[1],t=="middle"?e.textAlign=Jt:e.textAlign=fn[t.toUpperCase()]):(r=tR.exec(t))?e.writingMode=r[1]=="lr"?"vertical-lr":"vertical-rl":(r=nR.exec(t))?e.size=Number(r[1]):(r=rR.exec(t))?(e.position=Number(r[1]),r[2]&&(t=r[2],e.positionAlign=t=="line-left"||t=="start"?"line-left":t=="line-right"||t=="end"?"line-right":t=="center"||t=="middle"?"center":ri)):(r=iR.exec(t))?(t=qk(n,r[1]))&&(e.region=t):(n=oR.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=yn[n[2].toUpperCase()])):(n=sR.exec(t))&&(e.lineInterpretation=xn,e.line=Number(n[1]),n[2]&&(e.lineAlign=yn[n[2].toUpperCase()]))}function qk(e,t){return e=e.filter(function(n){return n.id==t}),e.length?e[0]:null}Re("shaka.text.VttTextParser",$i),$i.prototype.parseMedia=$i.prototype.parseMedia,$i.prototype.setManifestType=$i.prototype.setManifestType,$i.prototype.setSequenceMode=$i.prototype.setSequenceMode,$i.prototype.parseInit=$i.prototype.parseInit;var vx=/^NOTE($|[ \t])/,eR=/^align:(start|middle|center|end|left|right)$/,tR=/^vertical:(lr|rl)$/,nR=/^size:([\d.]+)%$/,rR=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/,iR=/^region:(.*)$/,oR=/^line:([\d.]+)%(?:,(start|end|center))?$/,sR=/^line:(-?\d+)(?:,(start|end|center))?$/;oi("text/vtt",function(){return new $i}),oi('text/vtt; codecs="vtt"',function(){return new $i}),oi('text/vtt; codecs="wvtt"',function(){return new $i});function Ro(){this.g=null}Ro.prototype.parseInit=function(e){var t=this,n=!1;if(new Hn().box("moov",Wt).box("trak",Wt).box("mdia",Wt).S("mdhd",function(r){r=Ef(r.reader,r.version),t.g=r.timescale}).box("minf",Wt).box("stbl",Wt).S("stsd",ca).box("wvtt",function(){n=!0}).parse(e),!this.g)throw new fe(2,2,2008);if(!n)throw new fe(2,2,2008)},Ro.prototype.setSequenceMode=function(){},Ro.prototype.setManifestType=function(){},Ro.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new fe(2,2,2008);var n=0,r=[],i,o=[],s=!1,a=!1,u=!1,l=null;if(new Hn().box("moof",Wt).box("traf",Wt).S("tfdt",function(Z){s=!0,n=Tf(Z.reader,Z.version).baseMediaDecodeTime}).S("tfhd",function(Z){l=Sf(Z.reader,Z.flags).Qd}).S("trun",function(Z){a=!0,r=xf(Z.reader,Z.version,Z.flags).jh}).box("mdat",Gu(function(Z){u=!0,i=Z},!1)).parse(e,!1),!u&&!s&&!a)throw new fe(2,2,2008);e=n;for(var h=new cr(i,0),g=d(r),m=g.next();!m.done;m=g.next()){m=m.value;var E=m.kh||l,A=m.Bf?n+m.Bf:e;e=A+(E||0);var k=0;do{var b=h.W();k+=b;var V=h.W(),B=null;mf(V)=="vttc"?b>8&&(B=h.Mb(b-8,!1)):h.skip(b-8),E&&B&&(b=aR(B,t.periodStart+A/this.g,t.periodStart+e/this.g),o.push(b))}while(m.sampleSize&&k<m.sampleSize)}return o.filter(cs)};function aR(e,t,n){var r,i,o;return new Hn().box("payl",Gu(function(s){r=Un(s)},!1)).box("iden",Gu(function(s){i=Un(s)},!1)).box("sttg",Gu(function(s){o=Un(s)},!1)).parse(e),r?uR(r,i,o,t,n):null}function uR(e,t,n,r,i){if(e=new It(r,i,e),$r(e),t&&(e.id=t),n)for(t=new Es(n),n=as(t);n;)mx(e,n,[]),Fs(t),n=as(t);return e}Re("shaka.text.Mp4VttParser",Ro),Ro.prototype.parseMedia=Ro.prototype.parseMedia,Ro.prototype.setManifestType=Ro.prototype.setManifestType,Ro.prototype.setSequenceMode=Ro.prototype.setSequenceMode,Ro.prototype.parseInit=Ro.prototype.parseInit,oi('application/mp4; codecs="wvtt"',function(){return new Ro});function bo(){}bo.prototype.parseInit=function(){},bo.prototype.setSequenceMode=function(){},bo.prototype.setManifestType=function(){},bo.prototype.parseMedia=function(e){var t=Un(e).replace(/\r+/g,"");if(t=t.trim(),e=[],t=="")return e;t=d(t.split(`
79
+
80
+ `));for(var n=t.next();!n.done;n=t.next()){n=n.value.split(`
81
+ `);var r=new Es(n[0]),i=xs(r),o=Us(r,/,/g);if(r=xs(r),i==null||o==null||r==null)throw new fe(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new It(i,r,n.slice(1).join(`
82
+ `).trim()))}return e},Re("shaka.text.SbvTextParser",bo),bo.prototype.parseMedia=bo.prototype.parseMedia,bo.prototype.setManifestType=bo.prototype.setManifestType,bo.prototype.setSequenceMode=bo.prototype.setSequenceMode,bo.prototype.parseInit=bo.prototype.parseInit,oi("text/x-subviewer",function(){return new bo});function Do(){this.g=new $i}Do.prototype.parseInit=function(){},Do.prototype.setSequenceMode=function(){},Do.prototype.setManifestType=function(){},Do.prototype.parseMedia=function(e,t,n){var r=Un(e);if(e=`WEBVTT
83
+
84
+ `,r!=""){r=r.replace(/\r+/g,""),r=r.trim(),r=d(r.split(`
85
+
86
+ `));for(var i=r.next();!i.done;i=r.next())i=i.value.split(/\n/),i[0].match(/\d+/)&&i.shift(),i[0]=i[0].replace(/,/g,"."),e+=i.join(`
87
+ `).replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+`
88
+
89
+ `}return e=wt(Vi(e)),this.g.parseMedia(e,t,n,[])},Re("shaka.text.SrtTextParser",Do),Do.prototype.parseMedia=Do.prototype.parseMedia,Do.prototype.setManifestType=Do.prototype.setManifestType,Do.prototype.setSequenceMode=Do.prototype.setSequenceMode,Do.prototype.parseInit=Do.prototype.parseInit,oi("text/srt",function(){return new Do});function Oo(){}Oo.prototype.parseInit=function(){},Oo.prototype.setSequenceMode=function(){},Oo.prototype.setManifestType=function(){},Oo.prototype.parseMedia=function(e){var t="",n="",r=null,i=null;for(i=Un(e).split(/\r?\n\s*\r?\n/),e=d(i),i=e.next();!i.done;i=e.next()){var o=i.value;i=o,(o=cR.exec(o))&&(r=o[1],i=o[2]),r=="V4 Styles"||r=="V4+ Styles"?(t=i,t=n?t+(`
90
+ `+i):i):r=="Events"&&(n=n?n+(`
91
+ `+i):i)}for(r=[],i=null,t=d(t.split(/\r?\n/)),e=t.next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(o=Tx.exec(e))){if(e=o[1].trim(),o=o[2].trim(),e=="Format")i=o.split(ph);else if(e=="Style"){e=o.split(ph),o={};for(var s=0;s<i.length&&s<e.length;s++)o[i[s]]=e[s];r.push(o)}}for(i=[],t=null,n=d(n.split(/\r?\n/)),o=n.next(),e={};!o.done;e={Xi:void 0},o=n.next())if(o=o.value,!/^\s*;/.test(o)&&(s=Tx.exec(o))){if(o=s[1].trim(),s=s[2].trim(),o=="Format")t=s.split(ph);else if(o=="Dialogue"){s=s.split(ph),o={};for(var a=0;a<t.length&&a<s.length;a++)o[t[a]]=s[a];a=Sx(o.Start);var u=Sx(o.End);s=new It(a,u,s.slice(t.length-1).join(",").replace(/\\N/g,`
92
+ `).replace(/\{[^}]+\}/g,"")),e.Xi=o.Style,(e=r.find(function(l){return function(h){return h.Name==l.Xi}}(e)))&&lR(s,e),i.push(s)}}return i};function lR(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=yx(n))&&(e.color=n),(n=t.BackColour)&&(n=yx(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=ia),t.Italic&&(e.fontStyle=Pa),t.Underline&&e.textDecoration.push(Is),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=nn,e.textAlign="start";break;case 2:e.displayAlign=nn,e.textAlign=Jt;break;case 3:e.displayAlign=nn,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=Jt;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=Jt;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}function yx(e){return e=parseInt(e.replace("&H",""),16),e>=0?"rgba("+(e&255)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function Sx(e){return e=fR.exec(e),(e[1]?parseInt(e[1].replace(":",""),10):0)*3600+parseInt(e[2],10)*60+parseFloat(e[3])}Re("shaka.text.SsaTextParser",Oo),Oo.prototype.parseMedia=Oo.prototype.parseMedia,Oo.prototype.setManifestType=Oo.prototype.setManifestType,Oo.prototype.setSequenceMode=Oo.prototype.setSequenceMode,Oo.prototype.parseInit=Oo.prototype.parseInit;var cR=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Tx=/^\s*([^:]+):\s*(.*)/,ph=/\s*,\s*/,fR=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;oi("text/x-ssa",function(){return new Oo});function Ex(e,t){var n=e[t+1]&1?7:9;return t+n<=e.length&&(e=((e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5)-n,e>0)?{Xd:n,ra:e}:null}function xx(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=(e[t+2]&60)>>>2;if(r>n.length-1)return null;var i=((e[t+2]&192)>>>6)+1,o=(e[t+2]&1)<<2;return o|=(e[t+3]&192)>>>6,{sampleRate:n[r],channelCount:o,codec:"mp4a.40."+i}}function wx(e,t){if(t+1<e.length&&e[t]===255&&(e[t+1]&246)===240){var n=e[t+1]&1?7:9;if(t+n>=e.length)return!1;var r=(e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5;return r<=n?!1:(t+=r,t===e.length||t+1<e.length&&e[t]===255&&(e[t+1]&246)===240)}return!1}function dR(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2||t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}var Ds=Object.freeze({Ng:0,df:0,Ze:0,Re:0,Se:2,Og:0}),Ax=Object.freeze({Ng:0,df:0,Ze:0,Re:0,Se:2,Og:0}),Ix=Object.freeze({Ng:0,df:0,Ze:0,Re:0,Se:1,Og:1});function No(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=No.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/aac"?ji(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(Si(t)||"mp4a.40.2")+'"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,r){for(var i=wt(e),o=$u(i),s=o.length;s<i.length&&!wx(i,s);s++);if(e=n.endTime*1e3,o=Eu(o),o.length&&n&&(o=o.find(function(h){return h.description==="com.apple.streaming.transportStreamTimestamp"}))&&(e=o.data),o=xx(i,s),!o)return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));t.audioSamplingRate=o.sampleRate,t.channelsCount=o.channelCount;for(var a=[];s<i.length;){var u=Ex(i,s);if(!u)return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));var l=u.Xd+u.ra;s+l<=i.length&&a.push({data:i.subarray(s+u.Xd,s+l),size:u.ra,duration:1024,ob:0,flags:Ds}),s+=l}return i=o.sampleRate,e=Math.floor(e*i/1e3),r={id:t.id,type:"audio",codecs:o.codec,timescale:i,duration:r,yb:[],Ha:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,sb:a},stream:t},r=new Ku([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Wu(r),this.g.set(n,t)),n=this.i!==t,r=Xl(r),this.i=t,this.h++,Promise.resolve({data:r,init:n?t:null})},Re("shaka.transmuxer.AacTransmuxer",No),No.prototype.transmux=No.prototype.transmux,No.prototype.getOriginalMimeType=No.prototype.getOriginalMimeType,No.prototype.convertCodecs=No.prototype.convertCodecs,No.prototype.isSupported=No.prototype.isSupported,No.prototype.destroy=No.prototype.destroy,ls("audio/aac",function(){return new No("audio/aac")},Cs);function Cx(e,t){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return null;var n=e[t+4]>>6;if(n>=3)return null;var r=e[t+4]&63,i=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][r*3+n]*2;if(t+i>e.length)return null;var o=e[t+6]>>5,s=0;o===2?s+=2:(o&1&&o!==1&&(s+=2),o&4&&(s+=2)),s=(e[t+6]<<8|e[t+7])>>12-s&1;var a=e[t+5]&7;return e=new Uint8Array([n<<6|e[t+5]>>3<<1|a>>2,(a&3)<<6|o<<3|s<<2|r>>4,r<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][o]+s,Ha:e,ra:i}}function hR(e,t){if(e[t]===11&&e[t+1]===119){var n=0,r=5;t+=r;for(var i,o;r>0;){o=e[t];var s=Math.min(r,8),a=8-s;i=4278190080>>>24+a<<a,i=(o&i)>>a,n=n?n<<s|i:i,t+=1,r-=s}if(n<16)return!0}return!1}function Yo(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=Yo.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ac3"?ji(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ac3"?ct().ke()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,r){e=wt(e);for(var i=$u(e),o=i.length;o<e.length&&!hR(e,o);o++);var s=n.endTime*1e3;i=Eu(i),i.length&&n&&(i=i.find(function(h){return h.description==="com.apple.streaming.transportStreamTimestamp"}))&&(s=i.data),i=0;for(var a=new Uint8Array([]),u=[];o<e.length;){var l=Cx(e,o);if(!l)return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,i=l.sampleRate,a=l.Ha,u.push({data:e.subarray(o,o+l.ra),size:l.ra,duration:1536,ob:0,flags:Ds}),o+=l.ra}return e=Math.floor(s*i/1e3),r={id:t.id,type:"audio",codecs:"ac-3",timescale:i,duration:r,yb:[],Ha:a,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,sb:u},stream:t},r=new Ku([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Wu(r),this.g.set(n,t)),n=this.i!==t,r=Xl(r),this.i=t,this.h++,Promise.resolve({data:r,init:n?t:null})},Re("shaka.transmuxer.Ac3Transmuxer",Yo),Yo.prototype.transmux=Yo.prototype.transmux,Yo.prototype.getOriginalMimeType=Yo.prototype.getOriginalMimeType,Yo.prototype.convertCodecs=Yo.prototype.convertCodecs,Yo.prototype.isSupported=Yo.prototype.isSupported,Yo.prototype.destroy=Yo.prototype.destroy,ls("audio/ac3",function(){return new Yo("audio/ac3")},Cs);function Mx(e,t){if(t+8>e.length||(e[t]<<8|e[t+1]<<0)!==2935)return null;var n=new ha(e.subarray(t+2));po(n,2),po(n,3);var r=on(n,11)+1<<1,i=on(n,2);if(i==3){i=on(n,2),i=[24e3,22060,16e3][i];var o=3}else i=[48e3,44100,32e3][i],o=on(n,2);var s=on(n,3),a=on(n,1);return n=on(n,5),t+r>e.byteLength?null:(e=Math.floor(r*i/([1,2,3,6][o]*16)),e=new Uint8Array([(e&8160)>>5,(e&31)<<3,i<<6|n<<1|0,0|s<<1|a<<0,0]),{sampleRate:i,channelCount:[2,1,2,3,3,4,4,5][s]+a,Ha:e,ra:r})}function Jo(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=Jo.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ec3"?ji(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,r){e=wt(e);for(var i=$u(e),o=i.length;o<e.length&&(e[o]<<8|e[o+1]<<0)!==2935;o++);var s=n.endTime*1e3;i=Eu(i),i.length&&n&&(i=i.find(function(h){return h.description==="com.apple.streaming.transportStreamTimestamp"}))&&(s=i.data),i=0;for(var a=new Uint8Array([]),u=[];o<e.length;){var l=Mx(e,o);if(!l)return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,i=l.sampleRate,a=l.Ha,u.push({data:e.subarray(o,o+l.ra),size:l.ra,duration:1536,ob:0,flags:Ds}),o+=l.ra}return e=Math.floor(s*i/1e3),r={id:t.id,type:"audio",codecs:"ec-3",timescale:i,duration:r,yb:[],Ha:a,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,sb:u},stream:t},r=new Ku([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Wu(r),this.g.set(n,t)),n=this.i!==t,r=Xl(r),this.i=t,this.h++,Promise.resolve({data:r,init:n?t:null})},Re("shaka.transmuxer.Ec3Transmuxer",Jo),Jo.prototype.transmux=Jo.prototype.transmux,Jo.prototype.getOriginalMimeType=Jo.prototype.getOriginalMimeType,Jo.prototype.convertCodecs=Jo.prototype.convertCodecs,Jo.prototype.isSupported=Jo.prototype.isSupported,Jo.prototype.destroy=Jo.prototype.destroy,ls("audio/ec3",function(){return new Jo("audio/ec3")},Cs);function pR(e){if(!e.length)return null;var t=e.find(function(k){return k.type==7});if(e=e.find(function(k){return k.type==8}),!t||!e)return null;var n=new ha(t.data),r=Ln(n);if(Ln(n),Ln(n),hi(n),mR.includes(r)&&(r=pt(n),r===3&&po(n,1),hi(n),hi(n),po(n,1),Mt(n))){r=r!==3?8:12;for(var i=0;i<r;i++)Mt(n)&&(i<6?Cf(n,16):Cf(n,64))}if(hi(n),r=pt(n),r===0)pt(n);else if(r===1)for(po(n,1),hi(n),hi(n),r=pt(n),i=0;i<r;i++)hi(n);hi(n),po(n,1);var o=pt(n),s=pt(n),a=on(n,1);a===0&&po(n,1),po(n,1);var u=0,l=0,h=0,g=0;if(Mt(n)&&(u=pt(n),l=pt(n),h=pt(n),g=pt(n)),i=r=1,Mt(n)&&Mt(n)){var m=Ln(n),E=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],A=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];m>0&&m<=16?(r=E[m-1],i=A[m-1]):m===255&&(r=on(n,16),i=on(n,16))}return n=(2-a)*(s+1)*16-h*2-g*2,o=(o+1)*16-u*2-l*2,u=[],t=t.fullData,u.push(t.byteLength>>>8&255),u.push(t.byteLength&255),u=u.concat.apply(u,M(t)),t=[],e=e.fullData,t.push(e.byteLength>>>8&255),t.push(e.byteLength&255),t=t.concat.apply(t,M(e)),e=new Uint8Array([1,u[3],u[4],u[5],255,225].concat(u,[1],t)),{height:n,width:o,Ta:e,Za:r,$a:i}}function gR(e){function t(A){i={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:A.pts,dts:A.dts,nalus:[]}}function n(){if(i&&i.nalus.length&&i.frame){for(var A=[],k=d(i.nalus),b=k.next();!b.done;b=k.next()){b=b.value;var V=b.fullData.byteLength,B=new Uint8Array(4);B[0]=V>>24&255,B[1]=V>>16&255,B[2]=V>>8&255,B[3]=V&255,A.push(B),A.push(b.fullData)}i.data=dr.apply(Sr,M(A)),r.push(i)}}for(var r=[],i=null,o=!1,s=0;s<e.length;s++){var a=e[s],u=a.nalus,l=!1;i&&u.length&&!o&&(n(),t(a)),u=d(a.nalus);for(var h=u.next();!h.done;h=u.next()){h=h.value;var g=!1;switch(h.type){case 1:var m=!1;g=!0;var E=h.data;l&&E.length>4&&(E=uI(new ha(E)),E===2||E===4||E===7||E===9)&&(m=!0),m&&i&&i.frame&&!i.isKeyframe&&(n(),i=null),i||t(a),i.frame=!0,i.isKeyframe=m;break;case 5:g=!0,i&&i.frame&&!i.isKeyframe&&(n(),i=null),i||t(a),i.frame=!0,i.isKeyframe=!0;break;case 6:g=!0;break;case 7:l=g=!0;break;case 8:g=!0;break;case 9:o=g=!0,i&&i.frame&&(n(),i=null),i||t(a);break;case 12:g=!0;break;default:g=!1}i&&g&&i.nalus.push(h)}}return n(),r}var mR=[100,110,122,244,44,83,86,118,128,138,139,134];function vR(e){if(!e.length)return null;var t=e.find(function(s){return s.type==32}),n=e.find(function(s){return s.type==33}),r=e.find(function(s){return s.type==34});if(!t||!n||!r)return null;var i=yR(t.fullData);e=SR(n.fullData);var o=TR(r.fullData);return t=ER(t.fullData,n.fullData,r.fullData,{Ug:i.Ug,Bh:i.Bh,Cg:e.Cg,Dg:e.Dg,wg:e.wg,Bg:e.Bg,xg:e.xg,yg:e.yg,zg:e.zg,Ag:e.Ag,pg:e.pg,qg:e.qg,rg:e.rg,sg:e.sg,ug:e.ug,vg:e.vg,pf:e.pf,eg:e.eg,dg:e.dg,cg:e.cg,Wg:o.Wg,og:e.og,ng:e.ng}),{height:e.height,width:e.width,Ta:t,Za:e.Sk,$a:e.Rk}}function yR(e){var t=new ha(e,!0);return Ln(t),Ln(t),on(t,4),on(t,2),on(t,6),e=on(t,3),t=Mt(t),{Ug:e+1,Bh:t}}function SR(e){e=new ha(e,!0),Ln(e),Ln(e);var t=0,n=0,r=0,i=0;on(e,4);var o=on(e,3);Mt(e);for(var s=on(e,2),a=on(e,1),u=on(e,5),l=Ln(e),h=Ln(e),g=Ln(e),m=Ln(e),E=Ln(e),A=Ln(e),k=Ln(e),b=Ln(e),V=Ln(e),B=Ln(e),Z=Ln(e),ue=[],pe=[],te=0;te<o;te++)ue.push(Mt(e)),pe.push(Mt(e));if(o>0)for(te=o;te<8;te++)on(e,2);for(te=0;te<o;te++)ue[te]&&on(e,88),pe[te]&&Ln(e);pt(e),ue=pt(e),ue==3&&on(e,1),pe=pt(e),te=pt(e),Mt(e)&&(t+=pt(e),n+=pt(e),r+=pt(e),i+=pt(e));var le=pt(e),ie=pt(e),ve=pt(e);if(Mt(e))for(var ce=0;ce<=o;ce++)pt(e),pt(e),pt(e);else pt(e),pt(e),pt(e);if(pt(e),pt(e),pt(e),pt(e),pt(e),pt(e),Mt(e)&&Mt(e))for(ce=0;ce<4;ce++)for(var Ee=0;Ee<(ce===3?2:6);Ee++)if(Mt(e)){var ye=Math.min(64,1<<4+(ce<<1));ce>1&&Yu(e);for(var Ve=0;Ve<ye;Ve++)Yu(e)}else pt(e);for(Mt(e),Mt(e),Mt(e)&&(Ln(e),pt(e),pt(e),Mt(e)),ce=pt(e),ye=Ee=0;ye<ce;ye++)if(Ve=!1,ye!==0&&(Ve=Mt(e)),Ve){ye===ce&&pt(e),Mt(e),pt(e);for(var Le=Ve=0;Le<=Ee;Le++){var Ce=Mt(e),ke=!1;Ce||(ke=Mt(e)),(Ce||ke)&&Ve++}Ee=Ve}else{for(Le=pt(e),Ve=pt(e),Ee=Le+Ve,Ce=0;Ce<Le;Ce++)pt(e),Mt(e);for(Le=0;Le<Ve;Le++)pt(e),Mt(e)}if(Mt(e))for(ce=pt(e),Ee=0;Ee<ce;Ee++){for(ye=0;ye<ve+4;ye++)on(e,1);on(e,1)}if(ce=ve=1,Ee=!0,ye=1,Le=Ve=0,Mt(e),Mt(e),Mt(e)){if(Mt(e)){Ce=Ln(e),ke=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2];var Ge=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Ce>0&&Ce<=16?(ve=ke[Ce-1],ce=Ge[Ce-1]):Ce===255&&(ve=on(e,16),ce=on(e,16))}if(Mt(e)&&Mt(e),Mt(e)&&(on(e,3),Mt(e),Mt(e)&&(Ln(e),Ln(e),Ln(e))),Mt(e)&&(pt(e),pt(e)),Mt(e),Mt(e),Mt(e),(Ce=Mt(e))&&(hi(e),hi(e),hi(e),hi(e)),Mt(e)&&(ye=on(e,32),Ve=on(e,32),Mt(e)&&pt(e),Mt(e))){Ge=!1,Ce=Mt(e),ke=Mt(e),(Ce||ke)&&((Ge=Mt(e))&&(Ln(e),on(e,5),Mt(e),on(e,5)),on(e,4),on(e,4),Ge&&on(e,4),on(e,5),on(e,5),on(e,5));for(var Je=0;Je<=o;Je++){Ee=Mt(e);var Ft=!0,dt=1;Ee||(Ft=Mt(e));var kn=!1;if(Ft?pt(e):kn=Mt(e),kn||(dt=pt(e)+1),Ce){for(Ft=0;Ft<dt;Ft++)pt(e),pt(e),Ge&&(pt(e),pt(e));Mt(e)}if(ke){for(Ft=0;Ft<dt;Ft++)pt(e),pt(e),Ge&&(pt(e),pt(e));Mt(e)}}}Mt(e)&&(Mt(e),Mt(e),Mt(e),Le=pt(e),pt(e),pt(e),pt(e),pt(e))}return{wg:Z,Cg:s,Dg:a,Bg:u,xg:l,yg:h,zg:g,Ag:m,pg:E,qg:A,rg:k,sg:b,ug:V,vg:B,pf:Le,eg:ue,dg:le,cg:ie,width:pe-(t+n)*(ue===1||ue===2?2:1),height:te-(r+i)*(ue===1?2:1),Sk:ve,Rk:ce,og:Ve/ye,ng:Ee}}function TR(e){var t=new ha(e,!0);Ln(t),Ln(t),pt(t),pt(t),Mt(t),Mt(t),on(t,3),Mt(t),Mt(t),pt(t),pt(t),Yu(t),Mt(t),Mt(t),Mt(t)&&pt(t),Yu(t),Yu(t),Mt(t),Mt(t),Mt(t),Mt(t),e=Mt(t),t=Mt(t);var n=1;return t&&e?n=0:t?n=3:e&&(n=2),{Wg:n}}function ER(e,t,n,r){var i=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));for(i[0]=1,i[1]=(r.Cg&3)<<6|(r.Dg?1:0)<<5|r.Bg&31,i[2]=r.xg,i[3]=r.yg,i[4]=r.zg,i[5]=r.Ag,i[6]=r.pg,i[7]=r.qg,i[8]=r.rg,i[9]=r.sg,i[10]=r.ug,i[11]=r.vg,i[12]=r.wg,i[13]=240|(r.pf&3840)>>8,i[14]=r.pf&255,i[15]=252|r.Wg&3,i[16]=252|r.eg&3,i[17]=248|r.dg&7,i[18]=248|r.cg&7,i[19]=0,i[20]=parseInt(r.og,10),i[21]=((r.ng?1:0)&3)<<6|(r.Ug&7)<<3|(r.Bh?1:0)<<2|3,i[22]=3,e=[e,t,n],t=23,n=e.length-1,r=0;r<e.length;r+=1)i.set(new Uint8Array([32+r|(r===n?128:0),0,1]),t),t+=3,i.set(new Uint8Array([e[r].byteLength>>8,e[r].byteLength&255]),t),t+=2,i.set(e[r],t),t+=e[r].byteLength;return i}function gh(e,t){var n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,o=e[t+2]>>2&3;if(n!==1&&i!==0&&i!==15&&o!==3){var s=e[t+3]>>6;i=xR[(n===3?3-r:r===3?3:4)*14+i-1]*1e3,o=wR[(n===3?0:n===2?1:2)*3+o],n=AR[n][r];var a=IR[r],u=Math.floor(n*i/o+(e[t+2]>>1&1))*a,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(l=l?parseInt(l[1],10):0)&&l<=87&&r===2&&i>=224e3&&s===0&&(e[t+3]|=128),{sampleRate:o,channelCount:s===3?1:2,ra:u,Qk:n*8*a}}return null}function Px(e,t){return e[t]===255&&(e[t+1]&224)===224&&(e[t+1]&6)!==0}function kx(e,t){if(t+1<e.length&&Px(e,t)){var n=gh(e,t),r=4;return n&&n.ra&&(r=n.ra),t+=r,t===e.length||t+1<e.length&&Px(e,t)}return!1}var xR=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],wR=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],AR=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],IR=[0,1,1,4];function Qo(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=Qo.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/mpeg"?ji(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,r){for(var i=wt(e),o=$u(i).length;o<i.length&&!kx(i,o);o++);var s;for(e=[];o<i.length;){var a=gh(i,o);if(!a)return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));s||(s=a),o+a.ra<=i.length&&e.push({data:i.subarray(o,o+a.ra),size:a.ra,duration:1152,ob:0,flags:Ds}),o+=a.ra}return s?(i=s.Qk*9e4/s.sampleRate*this.h,r={id:t.id,type:"audio",codecs:"mp3",timescale:s.sampleRate,duration:r,yb:[],Ha:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:i,sb:e},stream:t},r=new Ku([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Wu(r),this.g.set(n,t)),n=this.i!==t,r=Xl(r),this.i=t,this.h++,Promise.resolve({data:r,init:n?t:null})):Promise.reject(new fe(2,3,3018,n?n.R()[0]:null))},Re("shaka.transmuxer.Mp3Transmuxer",Qo),Qo.prototype.transmux=Qo.prototype.transmux,Qo.prototype.getOriginalMimeType=Qo.prototype.getOriginalMimeType,Qo.prototype.convertCodecs=Qo.prototype.convertCodecs,Qo.prototype.isSupported=Qo.prototype.isSupported,Qo.prototype.destroy=Qo.prototype.destroy,ls("audio/mpeg",function(){return new Qo("audio/mpeg")},Cs);function Zo(e){this.h=e,this.g=null}f=Zo.prototype,f.destroy=function(){},f.isSupported=function(e){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var t=Si(e).split(","),n=ni("audio",t);return t=ni("video",t),!n||t||ii(n)!="mp3"?!1:ji(this.convertCodecs("audio",e))},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":t},f.getOriginalMimeType=function(){return this.h},f.transmux=function(e,t,n,r,i){if(this.g?this.g.clearData():this.g=new er,this.g.Ff(n.i),e=wt(e),e=this.g.parse(e),e.Sd().audio!="mp3"||i!="audio")return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));for(n=new Uint8Array([]),i=d(e.qb()),e=i.next();!e.done;e=i.next())if(e=e.value.data)for(t=0;t<e.length;)(r=gh(e,t))?(t+r.ra<=e.length&&(n=dr(n,e.subarray(t,t+r.ra))),t+=r.ra):t++;return Promise.resolve(n)},Re("shaka.transmuxer.MpegTsTransmuxer",Zo),Zo.prototype.transmux=Zo.prototype.transmux,Zo.prototype.getOriginalMimeType=Zo.prototype.getOriginalMimeType,Zo.prototype.convertCodecs=Zo.prototype.convertCodecs,Zo.prototype.isSupported=Zo.prototype.isSupported,Zo.prototype.destroy=Zo.prototype.destroy,ls("video/mp2t",function(){return new Zo("video/mp2t")},Nr);/*
93
+ @license
94
+ MSS Transmuxer
95
+ Copyright 2015 Dash Industry Forum
96
+ SPDX-License-Identifier: BSD-3-Clause
97
+ */function Lo(e){this.h=e,(this.g=Vg.get("ISOBoxer")())&&CR(this)}function CR(e){function t(){this._procFullBox(),this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8)),this._procField("sample_count","uint",32),this._procEntries("entry",this.sample_count,function(n){this._procEntryField(n,"InitializationVector","data",8),this.flags&2&&(this._procEntryField(n,"NumberOfEntries","uint",16),this._procSubEntries(n,"clearAndCryptedData",n.NumberOfEntries,function(r){this._procEntryField(r,"BytesOfClearData","uint",16),this._procEntryField(r,"BytesOfEncryptedData","uint",32)}))})}e.g.addBoxProcessor("saio",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",this.version===1?64:32)}),e.g.addBoxProcessor("saiz",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),this.default_sample_info_size===0&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)}),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",function(){for(var n=!0,r=0;r<16;r++)this.usertype[r]!==MR[r]&&(n=!1);n&&(this._parsing&&(this.type="sepiff"),t.call(this))})}f=Lo.prototype,f.destroy=function(){},f.isSupported=function(e,t){var n=e.startsWith("mss/");return!this.g||!n?!1:t?ji(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),ji(t)||ji(e))},f.convertCodecs=function(e,t){return t.replace("mss/","")},f.getOriginalMimeType=function(){return this.h},f.transmux=function(e,t,n){if(!n)return Promise.resolve(wt(e));if(!t.mssPrivateData)return Promise.reject(new fe(2,3,3020,n?n.R()[0]:null));try{var r,i=this.g.parseBuffer(e),o=i.fetch("tfhd");o.track_ID=t.id+1;var s=i.fetch("tfdt"),a=i.fetch("traf");s===null&&(s=this.g.createFullBox("tfdt",a,o),s.version=1,s.flags=0,s.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var u=i.fetch("trun"),l=i.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var h=i.fetch("tfrf");h&&h._parent.boxes.splice(h._parent.boxes.indexOf(h),1);var g=i.fetch("sepiff");if(g!==null){g.type="senc",g.usertype=void 0;var m=i.fetch("saio");if(m===null){m=this.g.createFullBox("saio",a),m.version=0,m.flags=0,m.entry_count=1,m.offset=[0];var E=this.g.createFullBox("saiz",a);if(E.version=0,E.flags=0,E.sample_count=g.sample_count,E.default_sample_info_size=0,E.sample_info_size=[],g.flags&2)for(r=0;r<g.sample_count;r+=1)E.sample_info_size[r]=10+6*g.entry[r].NumberOfEntries;else E.default_sample_info_size=8}}o.flags&=16777214,o.flags|=131072,u.flags|=1;var A=i.fetch("moof");u.data_offset=A.getLength()+8;var k=i.fetch("saio");k!==null&&(k.offset[0]=Rx(A,"traf")+Rx(a,"senc")+16);var b=wt(i.write());return Promise.resolve(b)}catch(V){return V instanceof fe?Promise.reject(V):Promise.reject(new fe(2,3,3022,n?n.R()[0]:null))}};function Rx(e,t){for(var n=8,r=0;r<e.boxes.length&&e.boxes[r].type!==t;r++)n+=e.boxes[r].size;return n}Re("shaka.transmuxer.MssTransmuxer",Lo),Lo.prototype.transmux=Lo.prototype.transmux,Lo.prototype.getOriginalMimeType=Lo.prototype.getOriginalMimeType,Lo.prototype.convertCodecs=Lo.prototype.convertCodecs,Lo.prototype.isSupported=Lo.prototype.isSupported,Lo.prototype.destroy=Lo.prototype.destroy;var MR=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);ls("mss/audio/mp4",function(){return new Lo("mss/audio/mp4")},Cs),ls("mss/video/mp4",function(){return new Lo("mss/video/mp4")},Cs);function qo(e){this.m=e,this.g=0,this.j=new Map,this.l=this.i=this.h=null}f=qo.prototype,f.destroy=function(){this.j.clear(),this.i&&this.i.destroy()},f.isSupported=function(e,t){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var n=e;t&&(n=this.convertCodecs(t,e));var r=Si(n).split(",");return n=ni("audio",r),r=ni("video",r),n&&(n=ii(n),!PR.includes(n))||r&&(n=ii(r),!kR.includes(n))?!1:t?ji(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),ji(t)||ji(e))},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?(t=Si(t).replace("mp4a.40.34","mp3").split(",").map(function(n){return ze(n,"audio/mp4")}).map(kt).join(","),e=="audio"?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},f.getOriginalMimeType=function(){return this.m},f.transmux=function(e,t,n,r,i){var o=wt(e);if(i=="audio"&&!Ju(o)){for(var s=$u(o),a=s.length;a<o.length;a++)if(kx(o,a))return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));for(a=s.length;a<o.length;a++)if(wx(o,a))return this.i||(this.i=new No("audio/aac")),this.i.transmux(e,t,n,r,i);return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null))}this.h?this.h.clearData():this.h=new er,this.h.Ff(n.i);var u=this.h.parse(o),l=[],h=u.Sd();try{var g=null;if(i=="video"){switch(h.video){case"avc":var m=[],E=null,A=u.nd(),k=gR(A);if(!k.length)throw new fe(2,3,3023,n?n.R()[0]:null);for(var b=0;b<k.length;b++){var V=k[b];E==null&&(E=V.dts);var B=void 0;B=b+1<k.length?(k[b+1].dts||0)-(V.dts||0):k.length>1?(V.dts||0)-(k[b-1].dts||0):(n.endTime-n.startTime)*9e4,m.push({data:V.data,size:V.data.byteLength,duration:B,ob:Math.round((V.pts||0)-(V.dts||0)),flags:V.isKeyframe?Ax:Ix})}for(var Z=[],ue=d(A),pe=ue.next();!pe.done;pe=ue.next())Z.push.apply(Z,M(pe.value.nalus));var te=pR(Z);if(!te||E==null)throw new fe(2,3,3018,n?n.R()[0]:null);t.height=t.height||te.height,t.width=t.width||te.width,g={id:t.id,type:"video",codecs:"avc1",timescale:9e4,duration:r,yb:[],Ha:new Uint8Array([]),Ta:te.Ta,Za:te.Za,$a:te.$a,data:{sequenceNumber:this.g,baseMediaDecodeTime:E,sb:m},stream:t};break;case"hvc":var le=[],ie=null,ve=[],ce=u.nd();if(!ce.length)throw new fe(2,3,3023,n?n.R()[0]:null);for(var Ee=0;Ee<ce.length;Ee++){var ye=ce[Ee],Ve=ye.nalus;ve.push.apply(ve,M(Ve));for(var Le=!1,Ce=[],ke=!1,Ge=d(Ve),Je=Ge.next();!Je.done;Je=Ge.next()){var Ft=Je.value;switch(Ft.type){case 1:case 0:var dt=ke=!0;break;case 19:case 20:case 21:Le=dt=ke=!0;break;case 32:dt=!0;break;case 33:dt=!0;break;case 34:dt=!0;break;case 35:ke=dt=!0;break;case 39:case 40:dt=!0;break;default:dt=!1}if(ke&&dt){var kn=Ft.fullData.byteLength,Ut=new Uint8Array(4);Ut[0]=kn>>24&255,Ut[1]=kn>>16&255,Ut[2]=kn>>8&255,Ut[3]=kn&255,Ce.push(Ut),Ce.push(Ft.fullData)}}var Gn=Ce.length?{data:dr.apply(Sr,M(Ce)),isKeyframe:Le}:null;if(Gn){ie==null&&ye.dts!=null&&(ie=ye.dts);var sn=void 0;sn=Ee+1<ce.length?(ce[Ee+1].dts||0)-(ye.dts||0):ce.length>1?(ye.dts||0)-(ce[Ee-1].dts||0):(n.endTime-n.startTime)*9e4,le.push({data:Gn.data,size:Gn.data.byteLength,duration:sn,ob:Math.round((ye.pts||0)-(ye.dts||0)),flags:Gn.isKeyframe?Ax:Ix})}}var Qt=vR(ve);if(!Qt||ie==null)throw new fe(2,3,3018,n?n.R()[0]:null);t.height=t.height||Qt.height,t.width=t.width||Qt.width,g={id:t.id,type:"video",codecs:"hvc1",timescale:9e4,duration:r,yb:[],Ha:new Uint8Array([]),Ta:Qt.Ta,Za:Qt.Za,$a:Qt.$a,data:{sequenceNumber:this.g,baseMediaDecodeTime:ie,sb:le},stream:t}}g&&(l.push(g),g=null)}if(i=="audio"){switch(h.audio){case"aac":for(var hn=[],An,pn=null,Zt=null,an=null,qr=d(u.qb()),Hr=qr.next();!Hr.done;Hr=qr.next()){var jo=Hr.value,io=jo.data;if(io){var Xi=0;if(Zt==-1&&an)io=dr(an,jo.data),Zt=null;else if(Zt!=null&&an){Xi=Math.max(0,Zt);var Pu=dr(an,io.subarray(0,Xi));hn.push({data:Pu,size:Pu.byteLength,duration:1024,ob:0,flags:Ds}),Zt=an=null}if(An=xx(io,Xi),!An)throw new fe(2,3,3018,n?n.R()[0]:null);for(t.audioSamplingRate=An.sampleRate,t.channelsCount=An.channelCount,pn==null&&jo.pts!==null&&(pn=jo.pts);Xi<io.length;){var xa=Ex(io,Xi);if(!xa){an=io.subarray(Xi,io.length),Zt=-1;break}var gs=xa.Xd+xa.ra;Zt=Math.max(0,Xi+gs-io.length),Zt!=0?an=io.subarray(Xi+xa.Xd,Xi+gs):Xi+gs<=io.length&&hn.push({data:io.subarray(Xi+xa.Xd,Xi+gs),size:xa.ra,duration:1024,ob:0,flags:Ds}),Xi+=gs}}}if(!An||pn==null){pn=n.startTime*9e4;var Cl=ni("audio",t.codecs.split(","));if(!Cl||!t.channelsCount||!t.audioSamplingRate)throw new fe(2,3,3018,n?n.R()[0]:null);An={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:Cl};var Ml=dR(Cl,t.channelsCount);if(!Ml)throw new fe(2,3,3018,n?n.R()[0]:null);for(var mh=pn+(n.endTime-n.startTime)*9e4,ms=pn;ms<mh;)hn.push({data:Ml,size:Ml.byteLength,duration:1024,ob:0,flags:Ds}),ms+=1024/An.sampleRate*9e4}var vh=An.sampleRate,Wm=pn/9e4*vh;g={id:t.id,type:"audio",codecs:An.codec,timescale:vh,duration:r,yb:[],Ha:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:Wm,sb:hn},stream:t};break;case"ac3":for(var yh=[],Pl=0,Xc=new Uint8Array([]),Gr=null,yo=d(u.qb()),Yi=yo.next();!Yi.done;Yi=yo.next()){var zm=Yi.value,$m=zm.data;Gr==null&&zm.pts!==null&&(Gr=zm.pts);for(var kl=0;kl<$m.length;){var Ya=Cx($m,kl);Ya?(t.audioSamplingRate=Ya.sampleRate,t.channelsCount=Ya.channelCount,Pl=Ya.sampleRate,Xc=Ya.Ha,yh.push({data:$m.subarray(kl,kl+Ya.ra),size:Ya.ra,duration:1536,ob:0,flags:Ds}),kl+=Ya.ra):kl++}}if(Pl==0||Xc.byteLength==0||Gr==null)throw new fe(2,3,3018,n?n.R()[0]:null);var RR=Gr/9e4*Pl;g={id:t.id,type:"audio",codecs:"ac-3",timescale:Pl,duration:r,yb:[],Ha:Xc,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:RR,sb:yh},stream:t};break;case"ec3":for(var Dx=[],Sh=0,Xm=new Uint8Array([]),Th=null,Ox=d(u.qb()),Ym=Ox.next();!Ym.done;Ym=Ox.next()){var Jm=Ym.value,Qm=Jm.data;Th==null&&Jm.pts!==null&&(Th=Jm.pts);for(var Rl=0;Rl<Qm.length;){var Ja=Mx(Qm,Rl);Ja?(t.audioSamplingRate=Ja.sampleRate,t.channelsCount=Ja.channelCount,Sh=Ja.sampleRate,Xm=Ja.Ha,Dx.push({data:Qm.subarray(Rl,Rl+Ja.ra),size:Ja.ra,duration:1536,ob:0,flags:Ds}),Rl+=Ja.ra):Rl++}}if(Sh==0||Xm.byteLength==0||Th==null)throw new fe(2,3,3018,n?n.R()[0]:null);var bR=Th/9e4*Sh;g={id:t.id,type:"audio",codecs:"ec-3",timescale:Sh,duration:r,yb:[],Ha:Xm,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:bR,sb:Dx},stream:t};break;case"mp3":for(var Nx=[],Eh,xh=null,Lx=d(u.qb()),Zm=Lx.next();!Zm.done;Zm=Lx.next()){var qm=Zm.value,Yc=qm.data;if(Yc){xh==null&&qm.pts!==null&&(xh=qm.pts);for(var ku=0;ku<Yc.length;){var bl=gh(Yc,ku);bl?(Eh||(Eh=bl),ku+bl.ra<=Yc.length&&Nx.push({data:Yc.subarray(ku,ku+bl.ra),size:bl.ra,duration:1152,ob:0,flags:Ds}),ku+=bl.ra):ku++}}}if(!Eh||xh==null)throw new fe(2,3,3018,n?n.R()[0]:null);var jx=Eh.sampleRate,DR=xh/9e4*jx;g={id:t.id,type:"audio",codecs:"mp3",timescale:jx,duration:r,yb:[],Ha:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:DR,sb:Nx},stream:t};break;case"opus":var Fx=[],wh=null,zs=u.H;if(!zs)throw new fe(2,3,3018,n?n.R()[0]:null);var Ji=[];switch(zs.rj){case 1:case 2:Ji=[0];break;case 0:Ji=[255,1,1,0,1];break;case 128:Ji=[255,2,0,0,1];break;case 3:Ji=[1,2,1,0,2,1];break;case 4:Ji=[1,2,2,0,1,2,3];break;case 5:Ji=[1,3,2,0,4,1,2,3];break;case 6:Ji=[1,4,2,0,4,1,2,3,5];break;case 7:Ji=[1,4,2,0,4,1,2,3,5,6];break;case 8:Ji=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Ji=[1,1,2,0,1];break;case 131:Ji=[1,1,3,0,1,2];break;case 132:Ji=[1,1,4,0,1,2,3];break;case 133:Ji=[1,1,5,0,1,2,3,4];break;case 134:Ji=[1,1,6,0,1,2,3,4,5];break;case 135:Ji=[1,1,7,0,1,2,3,4,5,6];break;case 136:Ji=[1,1,8,0,1,2,3,4,5,6,7]}for(var Ux=new Uint8Array([0,zs.channelCount,0,0,zs.sampleRate>>>24&255,zs.sampleRate>>>17&255,zs.sampleRate>>>8&255,zs.sampleRate>>>0&255,0,0].concat(M(Ji))),Bx=zs.sampleRate,Vx=d(u.qb()),ev=Vx.next();!ev.done;ev=Vx.next()){var tv=ev.value,Dl=tv.data;wh==null&&tv.pts!==null&&(wh=tv.pts);for(var Jc=0;Jc<Dl.length;){for(var OR=(Dl[Jc+1]&16)!==0,NR=(Dl[Jc+1]&8)!==0,wa=Jc+2,Ah=0;Dl[wa]===255;)Ah+=255,wa+=1;Ah+=Dl[wa],wa+=1,wa+=OR?2:0,wa+=NR?2:0;var _x=Dl.slice(wa,wa+Ah);Fx.push({data:_x,size:_x.byteLength,duration:960,ob:0,flags:Ds}),Jc=wa+Ah}}if(Ux.byteLength==0||wh==null)throw new fe(2,3,3018,n?n.R()[0]:null);t.audioSamplingRate=zs.sampleRate,t.channelsCount=zs.channelCount;var LR=wh/9e4*Bx;g={id:t.id,type:"audio",codecs:"opus",timescale:Bx,duration:r,yb:[],Ha:Ux,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:LR,sb:Fx},stream:t}}g&&(l.push(g),g=null)}}catch(rv){return rv&&rv.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(rv)}if(!l.length)return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));var Hx=new Ku(l),nv=t.id+"_"+n.i;if(this.j.has(nv))var Qc=this.j.get(nv);else Qc=Wu(Hx),this.j.set(nv,Qc);var jR=this.l!==Qc,FR=Xl(Hx);return this.l=Qc,this.g++,Promise.resolve({data:FR,init:jR?Qc:null})},Re("shaka.transmuxer.TsTransmuxer",qo),qo.prototype.transmux=qo.prototype.transmux,qo.prototype.getOriginalMimeType=qo.prototype.getOriginalMimeType,qo.prototype.convertCodecs=qo.prototype.convertCodecs,qo.prototype.isSupported=qo.prototype.isSupported,qo.prototype.destroy=qo.prototype.destroy;var PR=["aac","ac-3","ec-3","mp3","opus"],kR=["avc","hevc"];ls("video/mp2t",function(){return new qo("video/mp2t")},Nu);function bx(){}P(bx,eo),Re("shaka.util.FairPlayUtils",bx)}).call(S,p,p,void 0);for(var j in S.shaka)Se[j]=S.shaka[j]})()})(lv);const vs=Zx(lv);function qx(Se,p){let S;const j=()=>{S&&(globalThis.clearTimeout(S),S=void 0)},R=f=>{p.state.mediaState!==f&&(p.state.mediaState=f,p.playerEvents.emit({eventName:xt.MediaStateChanged,value:f}))},de=f=>{if(j(),f!==Kr.BUFFERING){R(f);return}S=globalThis.setTimeout(()=>{R(Kr.BUFFERING)},Zc.BUFFER_STATE_TRIGGER_DELAY_MS)},T={playing:()=>de(Kr.PLAY),pause:()=>de(Kr.PAUSE),timeupdate:()=>{Se.paused||de(Kr.PLAY)},loadstart:()=>de(Kr.BUFFERING),loadeddata:()=>de(Kr.READY),error:()=>de(Kr.ERROR),waiting:()=>cv(Se)&&de(Kr.BUFFERING),stalled:()=>cv(Se)&&de(Kr.BUFFERING),suspend:()=>Se.readyState<2&&de(Kr.BUFFERING),seeked:()=>{p.state.mediaState!==Kr.ENDED&&de(Se.paused?Kr.PAUSE:Kr.PLAY)},canplay:()=>{j(),p.state.mediaState===Kr.BUFFERING&&de(Se.paused?Kr.READY:Kr.PLAY)},ended:()=>{var f,c;if((f=p.isLive)!=null&&f.call(p))return console.error("Live stream ended unexpectedly");(c=p.state.cast)!=null&&c.connected||de(Kr.ENDED)}};for(const[f,c]of Object.entries(T))Se.addEventListener(f,c);return()=>{j();for(const[f,c]of Object.entries(T))Se.removeEventListener(f,c)}}function cv(Se){return Se.readyState<HTMLMediaElement.HAVE_FUTURE_DATA}class zt extends Error{constructor({code:S,message:j,original:R,silent:de}){super(j);be(this,"code");be(this,"original");be(this,"silent",!1);this.code=S,this.original=R,this.silent=de??!1,Object.setPrototypeOf(this,zt.prototype)}}const Fo=class Fo{constructor(p){be(this,"errorListeners",[]);be(this,"resetListeners",[]);be(this,"warningListeners",[]);be(this,"npoPlayerRef");be(this,"debounceCleanup");be(this,"isDestroyed",!1);if(!p)throw new Error("Player is required for first initialization");this.npoPlayerRef=p,Fo._lastInstance=this,this.attachGlobalErrorHandlers()}destroy(){this.isDestroyed=!0,this.debounceCleanup&&(this.debounceCleanup(),this.debounceCleanup=void 0),Fo._lastInstance===this&&(Fo._lastInstance=void 0),this.errorListeners.length=0,this.resetListeners.length=0,this.warningListeners.length=0,this.npoPlayerRef=void 0}attachGlobalErrorHandlers(){const p=globalThis.window;if(Fo.globalHandlersAttached||p===void 0)return;const S=R=>{var f;const de=Fo._lastInstance;if(!de)return;const T=R.error??R;if((f=R.message)!=null&&f.includes("ResizeObserver")){Fo.handleSilentError(T);return}de.handleError({errorEvent:T})},j=R=>{const de=Fo._lastInstance;de&&de.handleError({errorEvent:R.reason??R})};p.addEventListener(kr.Error,S),p.addEventListener(kr.UnhandledRejection,j),Fo.globalHandlersAttached=!0}setNpoPlayerRef(p){this.npoPlayerRef=p}onError(p){this.errorListeners.push(p)}onReset(p){this.resetListeners.push(p)}onWarning(p){this.warningListeners.push(p)}static handleSilentError(p){const S=Fo._lastInstance;p.silent=!0,S==null||S.handleError({errorEvent:p})}handleError(p){var C;const{errorEvent:S,customErrorMessageOverlayConfig:j,emitError:R}=p,de=(S==null?void 0:S.status)??(S==null?void 0:S.code)??((C=S==null?void 0:S.detail)==null?void 0:C.code)??ov,T=av[ov],f=(j==null?void 0:j[de])||av[de]||T;console.error(`${de} - ${S.message||f}`,S.original||S);const c=(S==null?void 0:S.silent)??!1,v={code:de,message:f,original:S,silent:c};if(c)for(const w of this.warningListeners)w(v);else for(const w of this.errorListeners)w(v);return R==null||R(v),this._logNpoTagError(v),v}_logNpoTagError(p){if(this.isDestroyed||!this.npoPlayerRef)return;const{npoTagProps:S}=this.npoPlayerRef;!(S!=null&&S.streamTracker)||!(S!=null&&S.qosMetrics)||Promise.resolve().then(()=>lA).then(({logErrorEvent:j})=>{var R,de;this.isDestroyed||!((R=this.npoPlayerRef)!=null&&R.player)||j({npoPlayer:this.npoPlayerRef,error:p,streamPosition:((de=this.npoPlayerRef.player.getMediaElement())==null?void 0:de.currentTime)??0})}).catch(j=>{console.error("Failed to log NPOTag error event:",j)})}handleErrorState(p){const{mediaElement:S,errorEvent:j,customErrorMessageOverlayConfig:R,emitError:de,setErrorState:T,resetFn:f,retryCallback:c}=p,v=this.handleError({errorEvent:j,customErrorMessageOverlayConfig:R,emitError:de});if(T==null||T(v),c&&c(S.currentTime).catch(C=>{console.error("Retry callback failed:",C)}),f||this.resetListeners.length>0){const C=()=>{f==null||f();for(const w of this.resetListeners)w();S.removeEventListener(xt.CanPlay,C)};S.addEventListener(xt.CanPlay,C)}}setupErrorDebounce(p){this.debounceCleanup&&this.debounceCleanup();const{setTimeout:S,clearTimeout:j}=globalThis;let R,de=!1,T=!1,f;const c=p.debounceTimeInMs??2e3,v=()=>{R&&j(R),R=S(()=>{de&&f&&(p.setErrorStateFn?p.setErrorStateFn(f):this.handleError({errorEvent:f}),de=!1,T=!0)},c)},C=I=>{de=!0,f=I,v()},w=()=>{var I;if(de)v();else if(T){T=!1,(I=p.resetFn)==null||I.call(p);for(const L of this.resetListeners)L()}};p.player.player.addEventListener(xt.Error,C),p.player.getMediaElement().addEventListener(xt.Error,C),p.player.on(xt.AdError,C),p.player.on(xt.Error,C),p.mediaElement.addEventListener(xt.TimeUpdate,w),this.debounceCleanup=()=>{var I;R&&j(R),p.player.player.removeEventListener(xt.Error,C),(I=p.player.getMediaElement())==null||I.removeEventListener(xt.Error,C),p.player.off(xt.AdError,C),p.player.off(xt.Error,C),p.mediaElement.removeEventListener(xt.TimeUpdate,w)}}simulateError(p=1012){const S={code:p,detail:{code:p},type:"simulated"};return this.handleError({errorEvent:S})}};be(Fo,"globalHandlersAttached",!1),be(Fo,"_lastInstance");let tr=Fo;function fv(){return/Chrom(e|ium)/.test(navigator.userAgent)}function Ol(Se){const p=navigator.userAgent,S=p.toLowerCase(),j=/chrom(e|ium)/i.test(p),R=/edge|edg/i.test(p),de=/opr|opera/i.test(p),T=/firefox/i.test(p);switch(Se){case"chrome":return j&&!R;case"chromium":return S.includes("chromium");case"edge":return R;case"firefox":return T;case"safari":return S.includes("safari")&&!S.includes("chrome")&&!S.includes("chromium")&&!S.includes("android");case"opera":return de;default:return!1}}async function ew(Se,p){if(vs.polyfill.installAll(),vs.polyfill.PatchedMediaKeysApple&&vs.polyfill.PatchedMediaKeysApple.install(!0),!vs.Player.isBrowserSupported())throw new zt({code:19004,message:"Shaka Player is not supported on this browser!"});const S=Se.getPlayerContainer();let j=S.querySelector(`${p}`);j||(j=document.createElement(p),S.appendChild(j)),p===es.VIDEO&&(j.setAttribute("crossorigin","anonymous"),j.setAttribute("playsinline",""));const R=new vs.Player;Ol("safari")&&R.configure({streaming:{preferNativeHls:!0}});const de=qx(j,Se);return Se.mediaStateListeners=de,await R.attach(j),R}function Ch(Se){return!Number.isNaN(Se)&&Number.isFinite(Se)}function Nl(Se,p){return Number.isNaN(Se)?p.min:Math.max(p.min,Math.min(Se,p.max))}function tw(){return Math.random().toString(36).slice(2,10)}function nw(Se,p){var de,T,f;const S=Se.getConfiguration(),j=((de=S.drm)==null?void 0:de.advanced)??{};if(!((T=S.drm)!=null&&T.servers)||Object.keys(S.drm.servers).length===0)return[];const R=[];for(const[c,v]of Object.entries(S.drm.servers)){const C={protectionSystem:c,licenseUrl:v};p?C.headers={Authorization:`Bearer ${p}`}:(f=j[c])!=null&&f.headers&&(C.headers=j[c].headers),S.drm.withCredentials&&(C.withCredentials=!0),R.push(C)}return R}function dv(Se){return/^(?:[\w=-]+\.){2}[\w+./=-]+$/.test(Se)}function rw(Se,p){const S=new Image;S.addEventListener(kr.Load,()=>{p({width:S.width,height:S.height})}),S.src=Se}function iw(Se){const{duration:p,durationIsInMs:S}=Se;return p===void 0||p===Number.POSITIVE_INFINITY?-1:S?Number(p)/1e3:Number.isFinite(+p)?Number(p):-1}function ow(Se){return Se!==""&&Se!==void 0?Se:"unknown"}function sw(Se){const p={mpd:"application/dash+xml",m3u8:"application/vnd.apple.mpegurl",mp4:"video/mp4",webm:"video/webm",mp3:"audio/mpeg",m4a:"audio/mp4"};try{const j=new URL(Se).pathname.toLowerCase(),R=/\.([\da-z]+)$/.exec(j);if(R){const de=R[1];return p[de]||void 0}return}catch{return}}const aw=1e4;class uw{constructor(p,S){be(this,"castInitialized",!1);be(this,"receiverApplicationId");be(this,"player");be(this,"castContext");be(this,"streamObject");be(this,"volumeBeforeCasting");be(this,"playbackRate",1);be(this,"npoTagSession");be(this,"drmConfig");be(this,"source");be(this,"boundMediaListeners",[]);be(this,"currentAvailability",!1);be(this,"checkCastAvailabilityIntervalId");be(this,"userStoppedCast",!1);be(this,"pendingPause",!1);this.receiverApplicationId=S,this.player=p}destroy(){this.checkCastAvailabilityIntervalId&&(globalThis.clearInterval(this.checkCastAvailabilityIntervalId),this.checkCastAvailabilityIntervalId=void 0),this.stopCastSession()}initializeCastCheckInterval(){this.checkCastAvailabilityIntervalId&&globalThis.clearInterval(this.checkCastAvailabilityIntervalId),this.checkCastAvailabilityIntervalId=globalThis.setInterval(()=>{this.checkCastAvailability()},this.getCheckCastIntervalTime())}checkCastAvailability(){const p=this.isCastAvailable();this.updateCastState({available:p,connected:this.isCastConnected()}),this.currentAvailability!==p&&(this.currentAvailability=p,this.initializeCastCheckInterval())}isCastConnected(){var S,j,R,de;const p=(j=(S=this.castContext)==null?void 0:S.getCastState)==null?void 0:j.call(S);return!!(this.castInitialized&&(cast!=null&&cast.framework)&&p!==void 0&&p===((de=(R=cast==null?void 0:cast.framework)==null?void 0:R.CastState)==null?void 0:de.CONNECTED))}getCheckCastIntervalTime(){return this.isCastAvailable()?aw:Zc.CAST_CHECK_INTERVAL_MS}loadCastSdk(){return globalThis.__castSdkLoadPromise||(globalThis.__castSdkLoadPromise=new Promise((p,S)=>{var R;if((R=globalThis.cast)!=null&&R.framework)return p();globalThis.__onGCastApiAvailable=de=>de?p():S(new zt({code:19215,message:"Load Cast SDK failed: cast SDK is not available"}));const j=document.createElement("script");j.src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",j.async=!0,j.addEventListener(kr.Error,()=>S(new zt({code:19216,message:"Failed to load Cast SDK"}))),document.head.appendChild(j),this.initializeCastCheckInterval()}).catch(p=>{throw globalThis.__castSdkLoadPromise=void 0,p})),globalThis.__castSdkLoadPromise}updateCastingData({source:p,streamObject:S,metadata:j,npoTagSession:R}){if(!fv())return;this.source=p,this.npoTagSession=R,this.streamObject={...S,metadata:{...S==null?void 0:S.metadata,...j}};const de=dv(p)?p:void 0;this.drmConfig=nw(this.player,de),this.isCastActive()&&this.loadMedia()}async initialize(){if(!(!fv()||this.castInitialized))try{await this.loadCastSdk(),this.castContext=cast.framework.CastContext.getInstance(),this.castContext.setOptions({receiverApplicationId:this.receiverApplicationId,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED}),this.castContext.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,p=>{this.updateCastState({available:p.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE,connected:p.castState===cast.framework.CastState.CONNECTED})}),this.castContext.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,p=>{if(p.sessionState===cast.framework.SessionState.SESSION_STARTED&&(this.userStoppedCast=!1,this.updateCastState({connected:!0}),this.loadMedia()),p.sessionState===cast.framework.SessionState.SESSION_ENDED&&this.player.state.cast.connected&&this.updateCastState({connected:!1}),p.sessionState===cast.framework.SessionState.SESSION_RESUMED){if(this.userStoppedCast)return;const S=this.castContext.getCurrentSession(),j=S==null?void 0:S.getMediaSession();this.player.state.cast.connected||this.updateCastState({connected:!0}),S&&!j&&this.loadMedia()}}),this.castInitialized=!0,this.updateCastState({available:this.isCastAvailable(),connected:!1})}catch(p){let S=p;throw p instanceof zt||(S=new zt({code:19201,message:"Failed to initialize Cast",original:p})),this.player.state.cast.error=S.message,S}}isCastAvailable(){var S,j,R,de;const p=(j=(S=this.castContext)==null?void 0:S.getCastState)==null?void 0:j.call(S);return!!(this.castInitialized&&(cast!=null&&cast.framework)&&p!==void 0&&p!==((de=(R=cast==null?void 0:cast.framework)==null?void 0:R.CastState)==null?void 0:de.NO_DEVICES_AVAILABLE))}isCastActive(){return this.castInitialized?this.player.state.cast.connected:!1}startCastSession(){if(!this.castInitialized){console.warn("Start cast session failed: cast SDK is not initialized.");return}if(!this.isCastAvailable()){console.warn("No Cast devices available.");return}this.volumeBeforeCasting=this.player.getMediaElement().volume,this.castContext.getCurrentSession()?this.loadMedia().then(()=>{this.updateCastState({connected:!0})}).catch(S=>{this.updateCastState({connected:!1}),tr.handleSilentError(new zt({code:19202,message:"Error loading media on existing cast session",original:S}))}):this.castContext.requestSession().then(()=>{this.updateCastState({connected:!0})}).catch(S=>{this.updateCastState({connected:!1}),tr.handleSilentError(new zt({code:19203,message:"Error starting cast session",original:S}))})}updateMediaElementVisibility(){const p=this.player.getMediaElement();p&&p.classList.toggle("npoplayer-hidden",this.isCastActive())}stopCastSession(){if(!this.castInitialized){console.warn("Stop cast session failed: cast SDK is not initialized.");return}this.userStoppedCast=!0;const p=this.castContext.getCurrentSession();if(!p){console.warn("No active cast session to stop.");return}p.endSession(!0),this.updateCastState({connected:!1});for(const{type:S,handler:j}of this.boundMediaListeners)this.player.getMediaElement().removeEventListener(S,j);this.boundMediaListeners=[],this.player.getMediaElement().volume=this.volumeBeforeCasting||.5}getCastDeviceName(){var S;const p=this.castContext.getCurrentSession();if(p)return(S=p.getCastDevice())==null?void 0:S.friendlyName}hasValidMediaUrl(){var S,j;const p=((j=(S=this.streamObject)==null?void 0:S.stream)==null?void 0:j.streamURL)||this.source;return p||tr.handleSilentError(new zt({code:19204,message:"No media URL found for casting."})),p}getSession(){const p=this.castContext.getCurrentSession();return p||tr.handleSilentError(new zt({code:19205,message:"No active cast session found."})),p}async loadMedia(){const p=this.hasValidMediaUrl();if(!p)return;const S=this.getSession();if(!S)return;this.player.getMediaElement().volume=0;const j=sw(p);j||tr.handleSilentError(new zt({code:19214,message:"MIME type is undefined, this item may not cast correctly."}));const R=new chrome.cast.media.MediaInfo(p,j);this.player.isLive()?(R.streamType=chrome.cast.media.StreamType.LIVE,R.duration=-1):(R.streamType=chrome.cast.media.StreamType.BUFFERED,R.duration=this.player.getDuration()),R.customData=await this.constructMediaMetadata();const de=new chrome.cast.media.LoadRequest(R);if(de.autoplay=!this.player.getMediaElement().paused,this.player.isLive()){const{start:T}=this.player.getSeekRange();de.currentTime=this.player.getMediaElement().currentTime-T}else de.currentTime=this.player.getMediaElement().currentTime;de.playbackRate=this.player.getMediaElement().playbackRate||this.playbackRate,await S.loadMedia(de).then(()=>{this.updateCastState({connected:!0}),this.syncCastAndPlayer()},T=>tr.handleSilentError(new zt({code:19206,message:"Error loading media on existing cast session",original:T})))}getImageSizeAsync(p){return new Promise(S=>{rw(p,j=>S(j||{width:0,height:0}))})}async constructMediaMetadata(){var S,j;const p={};if(p.title=this.streamObject.metadata.title,p.subtitle=this.streamObject.metadata.description,p.drmType=(j=(S=this.streamObject.stream)==null?void 0:S.drm)==null?void 0:j.type,p.npoTagSession=this.npoTagSession,p.streamLinkAsJsonString=JSON.stringify(this.streamObject),dv(this.source)&&(p.jwt=this.source),p.drm=this.drmConfig.length>0?{...this.drmConfig[0]}:void 0,this.streamObject.metadata.poster){const R=await this.getImageSizeAsync(this.streamObject.metadata.poster);p.images=[{url:this.streamObject.metadata.poster,width:R.width,height:R.height}]}return p}attachMediaListeners(p){for(const{type:c,handler:v}of this.boundMediaListeners)this.player.getMediaElement().removeEventListener(c,v);this.boundMediaListeners=[];const S=new chrome.cast.media.PlayRequest,j=()=>{var c;this.pendingPause=!1,(c=p.getMediaSession())==null||c.play(S,()=>this.player.state.cast.error=void 0,v=>{this.player.state.cast.error=`${v.code}: ${v.description}`,tr.handleSilentError(new zt({code:19207,message:`Error playing media on cast session: ${this.player.state.cast.error}`,original:v}))})},R=new chrome.cast.media.PauseRequest,de=()=>{var c;this.pendingPause=!0,(c=p.getMediaSession())==null||c.pause(R,()=>this.player.state.cast.error=void 0,v=>{this.player.state.cast.error=`${v.code}: ${v.description}`,tr.handleSilentError(new zt({code:19208,message:`Error pausing media on cast session: ${this.player.state.cast.error}`,original:v}))})},T=()=>{const c=p.getMediaSession();if(!c)return;const v=this.player.getMediaElement().currentTime;let C,w;if(this.player.isLive()){const{start:L}=this.player.getSeekRange();C=v-L;const z=L+c.getEstimatedTime();w=Math.abs(z-v)>2}else C=v,w=Math.abs(c.getEstimatedTime()-v)>2;if(!w)return;const I=new chrome.cast.media.SeekRequest;I.currentTime=C,I.resumeState=this.player.getMediaElement().paused?chrome.cast.media.ResumeState.PLAYBACK_PAUSE:chrome.cast.media.ResumeState.PLAYBACK_START,c.seek(I,()=>{},L=>{this.player.state.cast.error=`${L.code}: ${L.description}`,tr.handleSilentError(new zt({code:19209,message:`Error seeking media on cast session: ${this.player.state.cast.error}`,original:L}))})},f=()=>{const c=this.player.getMediaElement().playbackRate;if(this.isCastActive()&&c>0&&c!==this.playbackRate){this.playbackRate=c;const v=p.getMediaSession();v&&(v.playbackRate=this.playbackRate)}};this.boundMediaListeners.push({type:"play",handler:j},{type:"pause",handler:de},{type:"seeked",handler:T},{type:"ratechange",handler:f});for(const{type:c,handler:v}of this.boundMediaListeners)this.player.getMediaElement().addEventListener(c,v)}updateCastState(p){Object.entries(p).some(([j,R])=>this.player.state.cast[j]!==R)&&(this.player.state.cast={...this.player.state.cast,...p},this.updateMediaElementVisibility(),this.player.reemit(xt.CastStateChanged,this.player.state.cast))}syncCastAndPlayer(){const p=this.castContext.getCurrentSession();if(!p){tr.handleSilentError(new zt({code:19210,message:"No active cast session found."}));return}this.waitForMediaSession(p).then(S=>{this.attachMediaListeners(p),S.playerState===chrome.cast.media.PlayerState.PLAYING&&this.player.getMediaElement().paused&&(this.player.getMediaElement().volume=0),S.addUpdateListener(()=>{if(this.player.getMediaElement()){if(S.playerState===chrome.cast.media.PlayerState.IDLE&&S.idleReason===chrome.cast.media.IdleReason.FINISHED){this.player.state.mediaState!==Kr.ENDED&&(this.player.state.mediaState=Kr.ENDED,this.player.reemit(xt.MediaStateChanged,Kr.ENDED));return}this.syncPlayState(S),this.syncTimePosition(S)}})}).catch(S=>{tr.handleSilentError(new zt({code:19213,message:"Failed to get media session",original:S}))})}waitForMediaSession(p,S=15e3){return new Promise((j,R)=>{const de=Date.now(),T=()=>{const f=p.getMediaSession();if(f)return j(f);if(Date.now()-de>S)return R(new zt({code:19211,message:"Timed out waiting for media session"}));setTimeout(T,200)};T()})}syncPlayState(p){p.playerState===chrome.cast.media.PlayerState.PLAYING&&this.player.getMediaElement().paused&&!this.pendingPause?(this.player.getMediaElement().play().catch(S=>tr.handleSilentError(new zt({code:19212,message:"Error playing media on cast session",original:S}))),this.player.getMediaElement().volume=0):p.playerState===chrome.cast.media.PlayerState.PAUSED&&!this.player.getMediaElement().paused&&this.player.getMediaElement().pause(),p.playerState===chrome.cast.media.PlayerState.PAUSED&&(this.pendingPause=!1)}syncTimePosition(p){const S=p.getEstimatedTime();if(p.playerState===chrome.cast.media.PlayerState.PLAYING||p.playerState===chrome.cast.media.PlayerState.PAUSED)if(this.player.isLive()){const{start:R}=this.player.getSeekRange(),de=R+S;Math.abs(de-this.player.getMediaElement().currentTime)>1&&(this.player.getMediaElement().volume=0,this.player.getMediaElement().currentTime=de)}else Math.abs(S-this.player.getMediaElement().currentTime)>1&&(this.player.getMediaElement().volume=0,this.player.getMediaElement().currentTime=S)}}function lw(Se){const p={adActive:!1,adPaused:!1,airPlay:{available:!1,connected:!1},audioPlaybackQuality:-1,audioLanguage:sv,cast:{available:!1,connected:!1},displayMode:Pi.INLINE,forceUIVisible:!1,fullscreen:!1,language:sv,mediaState:void 0,muted:!1,videoPlaybackQuality:-1,playbackRate:1,subtitleLanguage:"",useAudioDescription:!1,volume:1};return Se?{...p,audioLanguage:Se.get("audioLanguage",p.audioLanguage),audioPlaybackQuality:Se.get("audioPlaybackQuality",p.audioPlaybackQuality),muted:Se.get("muted",p.muted),playbackRate:Se.get("playbackRate",p.playbackRate),subtitleLanguage:Se.get("subtitleLanguage",p.subtitleLanguage),useAudioDescription:Se.get("useAudioDescription",p.useAudioDescription),videoPlaybackQuality:Se.get("videoPlaybackQuality",p.videoPlaybackQuality),volume:Se.get("volume",p.volume)}:p}class cw{constructor(){be(this,"listeners",Object.create(null))}addEventListener(p,S){S&&(this.listeners[p]||(this.listeners[p]=[]),this.listeners[p].some(j=>j.listener===S)||this.listeners[p].push({listener:S}))}removeEventListener(p,S){if(!S)return;const j=this.listeners[p];j&&(this.listeners[p]=j.filter(R=>R.listener!==S))}dispatchEvent(p){if(!p||typeof p.type!="string")throw new TypeError("Failed to execute 'dispatchEvent': event must have a type.");const S=this.listeners[p.type];if(!S||S.length===0)return!0;const j=[...S],R=de=>{try{Object.defineProperty(p,de,{configurable:!0,value:this})}catch{p[de]=this}};p.target==null&&R("target"),R("currentTarget");for(const de of j){const{listener:T}=de;typeof T=="function"?T(p):T&&typeof T.handleEvent=="function"&&T.handleEvent(p)}return!p.defaultPrevented}}class fw{constructor(p){be(this,"eventTarget",new cw);be(this,"_allListeners",[]);this.playerId=p}emit(p){const{eventName:S,value:j}=p;this.eventTarget.dispatchEvent(new CustomEvent(S,{detail:j}))}on(p){const S=p.eventName;this.eventTarget.addEventListener(S,p.listener),this._allListeners.push({eventName:S,listener:p.listener})}off(p){const S=p.eventName;this.eventTarget.removeEventListener(S,p.listener),this._allListeners=this._allListeners.filter(j=>!(j.eventName===S&&j.listener===p.listener))}once(p){const S=j=>{p.listener(j),this.off({eventName:p.eventName,listener:S})};this.on({eventName:p.eventName,listener:S})}addEventListener(p,S){this.eventTarget.addEventListener(p,S)}removeEventListener(p,S){this.eventTarget.removeEventListener(p,S)}dispatchEvent(p){return this.eventTarget.dispatchEvent(p)}removeAllListeners(){for(const{eventName:p,listener:S}of this._allListeners)this.eventTarget.removeEventListener(p,S);this._allListeners=[]}}function dw(Se){return new fw(Se)}const hw={start:0,firstQuartile:.25,midpoint:.5,thirdQuartile:.75,complete:1};class pw{async parse(p){const S=await fetch(p.toString(),{credentials:"omit"});if(!S.ok)throw new Error(`VastParser: failed to fetch ${p.toString()} (${S.status})`);const j=await S.text();return this.parseFromString(j,{baseURL:p})}parseFromString(p,S){const j=new DOMParser().parseFromString(p,"application/xml");if(j.querySelectorAll("parsererror").length>0)throw new Error("VastParser: XML parsing error.");return this.parseDocument(j,S)}parseDocument(p,S){return[...p.querySelectorAll("Ad")].map((R,de)=>this.parseAdElement(R,{idx:de,base:S==null?void 0:S.baseURL}))}parseAdElement(p,S){const{idx:j,base:R}=S,de={id:p.getAttribute("id")??void 0,title:void 0,duration:void 0,clickThrough:void 0,clickTrackingURLs:[],mediaFileURL:void 0,trackingEvents:[],indexInQueue:j},T=p.querySelectorAll("AdTitle")[0],f=this.trimText(T==null?void 0:T.textContent);f&&(de.title=f);const c=p.querySelectorAll("Duration")[0],v=this.parseVASTDuration(this.trimText(c==null?void 0:c.textContent));v!=null&&(de.duration=v);const C=p.querySelectorAll("ClickThrough")[0],w=this.makeURL(this.trimText(C==null?void 0:C.textContent),R);w&&(de.clickThrough=w);const I=new Set,L=[...p.querySelectorAll("ClickTracking")];for(const P of L){const $=this.makeURL(this.trimText(P.textContent),R);if(!$)continue;const d=$.toString();I.has(d)||(I.add(d),de.clickTrackingURLs.push($))}const z=p.querySelectorAll("MediaFile")[0],F=this.makeURL(this.trimText(z==null?void 0:z.textContent),R);F&&(de.mediaFileURL=F);const K=[...p.querySelectorAll("Tracking")],N=new Set;for(const P of K){const $=this.trimText(P.getAttribute("event"));if(!$)continue;const d=this.makeURL(this.trimText(P.textContent),R);if(!d)continue;const M=this.normalizeTrackingEventName($);if(!M)continue;const U=`${M}|${d.toString()}`;if(N.has(U))continue;N.add(U);const J=this.timeFor(M,de.duration);de.trackingEvents.push({name:M,time:J,url:d})}return de}trimText(p){return(p??"").trim()}parseVASTDuration(p){const S=this.trimText(p);if(!S)return;const j=S.replace(",",".");if(j.includes(":")){const de=j.split(":");if(de.length!==3){const I=Number(j);return Number.isFinite(I)?I:void 0}const[T,f,c]=de,v=Number(T),C=Number(f),w=Number(c);return!Number.isFinite(v)||!Number.isFinite(C)||!Number.isFinite(w)?void 0:v*3600+C*60+w}const R=Number(j);return Number.isFinite(R)?R:void 0}timeFor(p,S){if(S==null)return 0;const j=this.normalizeTrackingEventName(p);if(!j)return 0;const R=hw[j];return S*R}normalizeTrackingEventName(p){switch(p.toLowerCase()){case"start":return"start";case"firstquartile":return"firstQuartile";case"midpoint":return"midpoint";case"thirdquartile":return"thirdQuartile";case"complete":return"complete";default:return}}makeURL(p,S){const j=this.trimText(p);if(!j)return;const R=this.safeDecodeURIComponent(j);try{return S?new URL(R,S.toString()):new URL(R)}catch{return}}safeDecodeURIComponent(p){try{return decodeURIComponent(p)}catch{return p}}}function gw(Se){const p=document.createElement("div");p.className="vast-ad-container",p.style.cssText=`
98
+ position: absolute;
99
+ inset: 0;
100
+ width: 100%;
101
+ height: 100%;
102
+ z-index: 9;
103
+ display: none;
104
+ background: black;
105
+ overflow: hidden;
106
+ `;const S=document.createElement("video");return S.playsInline=!0,S.preload="auto",S.controls=!1,S.disablePictureInPicture=!0,S.setAttribute("disablePictureInPicture",""),S.muted=!1,S.style.cssText=`
107
+ width: 100%;
108
+ height: 100%;
109
+ object-fit: contain;
110
+ display: block;
111
+ background: black;
112
+ `,p.appendChild(S),Se.appendChild(p),{container:p,video:S}}function mw(Se){const{video:p,container:S}=Se;if(p){try{p.pause(),p.src="",p.load(),p.removeAttribute("src")}catch{}p.remove()}S!=null&&S.parentNode&&S.remove()}function hv(Se){if(Se)try{Se.pause(),Se.src="",Se.load(),Se.removeAttribute("src")}catch{}}class vw{constructor(){be(this,"firedTracking",new Set);be(this,"mirroredEvents",new Set(["start","firstquartile","midpoint","thirdquartile","complete"]))}reset(){this.firedTracking.clear()}shouldMirror(p){return this.mirroredEvents.has(p.toLowerCase())}maybeFireTracking(p){const S=p.name.toLowerCase(),j=`${S}:${Math.round(p.time*1e3)}`;if(!this.firedTracking.has(j)){this.firedTracking.add(j);for(const R of p.events)R.name.toLowerCase()===S&&this.pingTracking(R.url)}}handleAdClick(p){if(p){if(p.clickThrough)try{window.open(p.clickThrough.toString(),"_blank","noopener,noreferrer")}catch{}for(const S of p.clickTrackingURLs)this.pingTracking(S)}}pingTracking(p){try{fetch(p.toString(),{method:"GET",mode:"no-cors",keepalive:!0})}catch{}}}class yw{constructor(p,S){be(this,"intervalId");be(this,"intervalMs");be(this,"dispatch");this.intervalMs=p,this.dispatch=S}start(p){this.stop(),this.emit(p),this.intervalId=setInterval(()=>{const S=p();if(!S||S.isPaused){this.stop();return}S.isPlaying&&this.dispatch(this.toPayload(S))},this.intervalMs)}stop(){this.intervalId!==void 0&&(clearInterval(this.intervalId),this.intervalId=void 0)}emit(p,S){const j=p();j&&this.dispatch(this.toPayload(j,S))}toPayload(p,S){const{video:j,ad:R,isPlaying:de,isPaused:T,adPosition:f,totalAds:c}=p,v=S??(Number.isFinite(j.duration)?j.duration:R.duration??0),C=j.currentTime,w=Math.max(0,v-C);return{duration:v,remainingTime:w,currentTime:C,isPlayingAd:de,isAdPaused:T,adPosition:f,totalAds:c,isLinear:!0}}}const of=class of{constructor(p){be(this,"player");be(this,"adVideoElement");be(this,"adContainer");be(this,"contentVideoElement");be(this,"adTracking",new vw);be(this,"uiEmitter");be(this,"adPlaylist",[]);be(this,"currentIndex",0);be(this,"currentAd");be(this,"isAdPlaying",!1);be(this,"isAdPaused",!1);be(this,"isSkippable",!1);be(this,"hasEmittedStarted",!1);be(this,"hasFiredStartTracking",!1);be(this,"onTimeUpdate",()=>{if(!this.currentAd||!this.isAdPlaying)return;const p=this.adVideoElement.currentTime,S=this.getDuration();for(const j of this.currentAd.trackingEvents){const R=j.name.toLowerCase();this.adTracking.shouldMirror(R)&&(j.time<=0||p>=j.time&&this.adTracking.maybeFireTracking({name:j.name,time:j.time,events:this.currentAd.trackingEvents}))}this.uiEmitter.emit(()=>this.getUiContext(),S)});be(this,"onPause",()=>{this.isAdPlaying&&(this.isAdPaused=!0,this.player.state.adPaused=!0,this.hasEmittedStarted&&(this.player.reemit(xt.AdPaused),this.uiEmitter.stop()))});be(this,"onPlay",()=>{this.isAdPlaying&&(this.isAdPaused=!1,this.player.state.adPaused=!1,this.adContainer.style.display="block",!this.hasEmittedStarted&&this.currentAd?(this.hasEmittedStarted=!0,this.player.reemit(xt.AdStarted,{ad:this.asPublicAdPayload(this.currentAd)})):this.player.reemit(xt.AdResumed),!this.hasFiredStartTracking&&this.currentAd&&(this.hasFiredStartTracking=!0,this.adTracking.maybeFireTracking({name:"start",time:0,events:this.currentAd.trackingEvents})),this.uiEmitter.start(()=>this.getUiContext()))});be(this,"onEnded",()=>{var S,j;const p=((S=this.currentAd)==null?void 0:S.trackingEvents)??[];this.adTracking.maybeFireTracking({name:"complete",time:((j=this.adVideoElement)==null?void 0:j.duration)??0,events:p}),this.player.reemit(xt.AdComplete),this.finishAdThenMaybeNext()});be(this,"onVideoError",()=>{const p=this.adVideoElement.error??new zt({code:19101,message:"unknown ad video error"});this.onAdError(p)});this.player=p.player,this.adVideoElement=p.adVideoElement,this.adContainer=p.adContainer,this.contentVideoElement=p.contentVideoElement,this.uiEmitter=new yw(of.AD_UPDATE_INTERVAL_MS,S=>{this.player.reemit(xt.AdUiUpdate,S)}),this.bindAdVideoElementListeners()}async start(p){this.adPlaylist=p,this.currentIndex=0,this.currentAd=void 0,this.isSkippable=!1,this.hasEmittedStarted=!1,this.hasFiredStartTracking=!1,await this.playAd()}pause(){this.isAdPlaying&&this.adVideoElement.pause()}resume(){this.isAdPlaying&&this.adVideoElement.play().catch(()=>{})}skip(){this.isSkippable&&(this.player.reemit(xt.AdSkipped),this.finishAdThenMaybeNext())}getDuration(){var p;return Number.isFinite(this.adVideoElement.duration)?this.adVideoElement.duration:((p=this.currentAd)==null?void 0:p.duration)??0}getRemainingTime(){if(!this.isAdPlaying)return 0;const p=this.getDuration();return Math.max(0,p-this.adVideoElement.currentTime)}setVolume(p){this.adVideoElement.volume=Nl(p,{min:0,max:1})}getVolume(){return this.adVideoElement.volume}mute(){this.adVideoElement.muted=!0}unmute(){this.adVideoElement.muted=!1,this.adVideoElement.volume=Nl(this.player.state.volume??this.player.getVolume(),{min:0,max:1})}isPlaying(){return this.isAdPlaying&&!!this.currentAd}isPaused(){return this.isAdPaused}handleAdClick(){this.adTracking.handleAdClick(this.currentAd),this.pause()}getCurrentTime(){return this.adVideoElement.currentTime}getTotalAds(){return this.adPlaylist.length}getAdPosition(){return this.currentIndex}destroy(){this.uiEmitter.stop(),this.unbindAdVideoElementListeners(),this.adTracking.reset(),this.adPlaylist=[],this.currentIndex=0,this.currentAd=void 0,this.isAdPlaying=!1,this.isAdPaused=!1,this.isSkippable=!1,this.hasEmittedStarted=!1,this.hasFiredStartTracking=!1,this.player.state.adActive=!1,this.player.state.adPaused=!1,hv(this.adVideoElement),this.adContainer.style.display="none";const p=this;p.player=void 0,p.adVideoElement=void 0,p.adContainer=void 0,p.contentVideoElement=void 0,p.uiEmitter=void 0}async playAd(){if(this.currentIndex>=this.adPlaylist.length){this.onAllAdsCompleted();return}this.currentAd=this.adPlaylist[this.currentIndex],this.adTracking.reset(),this.isSkippable=!1,this.hasEmittedStarted=!1,this.hasFiredStartTracking=!1,this.currentIndex===0&&this.contentVideoElement.pause(),this.adVideoElement.src=this.currentAd.mediaFileURL.toString(),this.adVideoElement.currentTime=0,await this.onAdPlaybackStarted();try{await this.adVideoElement.play()}catch(p){if(this.isAutoplayBlockedError(p)){this.isAdPaused=!0,this.player.state.adPaused=!0;return}this.onAdError(p)}}onAllAdsCompleted(){this.cleanupAfterAd(),this.player.reemit(xt.AllAdsCompleted)}bindAdVideoElementListeners(){this.adVideoElement.addEventListener(xt.TimeUpdate,this.onTimeUpdate),this.adVideoElement.addEventListener(xt.Pause,this.onPause),this.adVideoElement.addEventListener(xt.Play,this.onPlay),this.adVideoElement.addEventListener(xt.Ended,this.onEnded),this.adVideoElement.addEventListener(xt.Error,this.onVideoError)}unbindAdVideoElementListeners(){this.adVideoElement.removeEventListener(xt.TimeUpdate,this.onTimeUpdate),this.adVideoElement.removeEventListener(xt.Pause,this.onPause),this.adVideoElement.removeEventListener(xt.Play,this.onPlay),this.adVideoElement.removeEventListener(xt.Ended,this.onEnded),this.adVideoElement.removeEventListener(xt.Error,this.onVideoError)}finishAdThenMaybeNext(){this.isAdPlaying=!1,this.isAdPaused=!1,this.uiEmitter.stop(),this.currentIndex+=1,this.currentIndex<this.adPlaylist.length?this.playAd():this.onAllAdsCompleted()}onAdError(p){this.onAllAdsCompleted();const S=p instanceof zt?p:new zt({code:19100,message:"[adPlaybackSession] Ad playback error",original:p});this.player.reemit(xt.AdError,{error:S})}cleanupAfterAd(p={}){const{resumeContent:S=!0}=p;this.isAdPlaying=!1,this.isAdPaused=!1,this.player.state.adActive=!1,this.player.state.adPaused=!1,this.hasEmittedStarted=!1,this.hasFiredStartTracking=!1,this.currentAd=void 0,this.adTracking.reset(),this.uiEmitter.stop(),hv(this.adVideoElement),this.adContainer.style.display="none",S&&this.contentVideoElement.play().catch(()=>{})}async onAdPlaybackStarted(){this.currentAd&&(this.player.state.displayMode===Pi.PIP&&await this.player.exitPip().catch(()=>{}),this.isAdPlaying=!0,this.isAdPaused=!1,this.player.state.adActive=!0,this.player.state.adPaused=!1)}getUiContext(){if(!(!this.isAdPlaying||!this.currentAd))return{video:this.adVideoElement,ad:this.currentAd,isPlaying:this.isAdPlaying,isPaused:this.isAdPaused,adPosition:this.currentIndex,totalAds:this.adPlaylist.length}}asPublicAdPayload(p){var S,j;return{id:p.id,title:p.title,duration:p.duration,clickThrough:(S=p.clickThrough)==null?void 0:S.toString(),mediaFileURL:(j=p.mediaFileURL)==null?void 0:j.toString(),isLinear:!0}}isAutoplayBlockedError(p){return p instanceof Error&&p.name==="NotAllowedError"}};be(of,"AD_UPDATE_INTERVAL_MS",50);let Mh=of;const ef="[AdManager]",Qa={ALREADY_INIT:`${ef} Already initialized`,INIT_FAILED:`${ef} Initialization failed`,NO_DOM:`${ef} Ad video/container not available`,NO_SEEK:"Cannot seek during ad playback",REQUEST_ERROR:`${ef} Error requesting ads`};class Sw{constructor(p){be(this,"player");be(this,"vastParser",new pw);be(this,"adContainer");be(this,"adVideoElement");be(this,"clickElement");be(this,"isInitialized",!1);be(this,"session");be(this,"videoElement");be(this,"boundClickElementHandler",p=>{var S;p.preventDefault(),p.stopPropagation(),(S=this.session)==null||S.handleAdClick()});this.player=p}initialize(){if(this.isInitialized){console.warn(Qa.ALREADY_INIT);return}try{const{container:p,video:S}=gw(this.player.getPlayerContainer());this.adContainer=p,this.adVideoElement=S,this.isInitialized=!0}catch(p){throw new zt({code:19104,message:Qa.INIT_FAILED,original:p})}}async requestAds(p){var j,R;this.isInitialized||await this.initialize();const S=(j=p.assets)==null?void 0:j.preroll;if(S)try{const T=(await this.vastParser.parse(S)).filter(c=>!!c.mediaFileURL);if(T.length===0){this.player.reemit(xt.AllAdsCompleted);return}const f=this.ensureSession();f.unmute(),await f.start(T)}catch(de){(R=this.session)==null||R.destroy();const T=new zt({code:19102,message:Qa.REQUEST_ERROR,original:de});this.player.reemit(xt.AdError,{error:T})}}pauseAd(){var p;(p=this.session)==null||p.pause()}resumeAd(){var p;(p=this.session)==null||p.resume()}isPlayingAd(){var p;return((p=this.session)==null?void 0:p.isPlaying())??!1}isAdPaused(){var p;return((p=this.session)==null?void 0:p.isPaused())??!1}skipAd(){var p;(p=this.session)==null||p.skip()}getAdRemainingTime(){var p;return((p=this.session)==null?void 0:p.getRemainingTime())??0}getCurrentTime(){var p;return((p=this.session)==null?void 0:p.getCurrentTime())??0}getDuration(){var p;return((p=this.session)==null?void 0:p.getDuration())??0}getTotalAds(){var p;return(p=this.session)==null?void 0:p.getTotalAds()}getAdPosition(){var p;return(p=this.session)==null?void 0:p.getAdPosition()}setVolume(p){var S;(S=this.session)==null||S.setVolume(p)}getVolume(){var p;return((p=this.session)==null?void 0:p.getVolume())??0}mute(){var p;(p=this.session)==null||p.mute()}unmute(){var p;(p=this.session)==null||p.unmute()}destroy(){var p;try{(p=this.session)==null||p.destroy(),this.session=void 0,this.clickElement&&(this.clickElement.removeEventListener(kr.Click,this.boundClickElementHandler),this.clickElement=void 0),mw({video:this.adVideoElement,container:this.adContainer}),this.adContainer=void 0,this.adVideoElement=void 0,this.videoElement=void 0}finally{this.isInitialized=!1}}setAdClickElement(p){this.clickElement&&this.clickElement.removeEventListener(kr.Click,this.boundClickElementHandler),this.clickElement=void 0,p&&(this.clickElement=p,this.clickElement.addEventListener(kr.Click,this.boundClickElementHandler,{passive:!1}))}getContentVideo(){return this.videoElement||(this.videoElement=this.player.getMediaElement()),this.videoElement}ensureSession(){if(!this.adVideoElement||!this.adContainer)throw new Error(Qa.NO_DOM);if(!this.session){const p=this.getContentVideo();this.session=new Mh({player:this.player,adContainer:this.adContainer,adVideoElement:this.adVideoElement,contentVideoElement:p}),p.pause()}return this.session}}function Tw(Se){return/^(http|https):\/\/(?:www\.)?[\dA-Za-z-]+(?:\.[A-Za-z]{2,})+(?:\/[^ "]+)?(?:\?.*)?$/.test(Se)}const Ew=Se=>Se.endsWith("/")?Se.slice(0,-1):Se;async function pv(Se,p){try{const S=new AbortController,{signal:j}=S,R=setTimeout(()=>{S.abort()},5e3),de=await fetch(Ew(p.baseURL)+"/stream-link",{method:"post",headers:{Accept:"*/*",Authorization:p.jwt,"Content-Type":"application/json"},body:JSON.stringify(p.data),signal:j});clearTimeout(R);const T=await de.json();if(de.ok)return T;Se(T);return}catch(S){throw Se(S),S instanceof Error?S:new Error(JSON.stringify(S))}}class xw{constructor(p){be(this,"player");be(this,"mediaEl");be(this,"boundCheckConnected");be(this,"boundCheckAvailability");be(this,"isAirPlaySession",!1);be(this,"capturedAirPlayActive",!1);be(this,"apiPayload");be(this,"currentLicenseUrl");be(this,"currentFilter");this.player=p,this.mediaEl=this.player.getMediaElement(),this.boundCheckConnected=this.checkConnected.bind(this),this.boundCheckAvailability=this.checkAvailability.bind(this),this.checkAvailability(),this.addEventListeners()}destroy(){this.player.off(xt.AirPlayConnectionChanged,this.boundCheckConnected),this.player.off(xt.AirPlayAvailabilityChanged,this.boundCheckAvailability),this.unregisterCurrentFilter()}addEventListeners(){this.player.on(xt.AirPlayConnectionChanged,this.boundCheckConnected),this.player.on(xt.AirPlayAvailabilityChanged,this.boundCheckAvailability)}updateAirPlayState(p){this.player.state.airPlay={...this.player.state.airPlay,...p},this.player.reemit(xt.AirPlayStateChanged,this.player.state.airPlay)}unregisterCurrentFilter(){var p;this.currentFilter&&((p=this.player.getNetworkingEngine())==null||p.unregisterRequestFilter(this.currentFilter),this.currentFilter=void 0)}registerSimpleFilter(){const p=(S,j)=>{var R;S!==vs.net.NetworkingEngine.RequestType.LICENSE||!this.isAirPlaySession&&!this.mediaEl.webkitCurrentPlaybackTargetIsWireless||(this.currentLicenseUrl&&(j.uris=[this.currentLicenseUrl]),(R=this.apiPayload)!=null&&R.jwt&&(j.headers.Authorization=`Bearer ${this.apiPayload.jwt}`))};this.player.getNetworkingEngine().registerRequestFilter(p),this.currentFilter=p}registerRenewalFilter(){const p=async(S,j)=>{var R;if(!(S!==vs.net.NetworkingEngine.RequestType.LICENSE||!this.isAirPlaySession&&!this.mediaEl.webkitCurrentPlaybackTargetIsWireless||!this.apiPayload))try{const de=await pv(()=>{},this.apiPayload),T=de==null?void 0:de.stream.drm;T!=null&&T.licenseUrl&&(j.uris=[T.licenseUrl],T.httpHeaders&&Object.assign(j.headers,T.httpHeaders),this.currentLicenseUrl=T.licenseUrl)}catch{this.currentLicenseUrl&&(j.uris=[this.currentLicenseUrl]),(R=this.apiPayload)!=null&&R.jwt&&(j.headers.Authorization=`Bearer ${this.apiPayload.jwt}`)}};this.player.getNetworkingEngine().registerRequestFilter(p),this.currentFilter=p}checkAvailability(){const p=!!globalThis.WebKitPlaybackTargetAvailabilityEvent;return this.updateAirPlayState({available:p}),p}checkConnected(){const p=!!this.mediaEl.webkitCurrentPlaybackTargetIsWireless;return this.updateAirPlayState({connected:p}),p}showAirPlayTargetPicker(){var p,S;if(!this.player.state.airPlay.available){this.updateAirPlayState({error:"AirPlay not available"});return}this.unregisterCurrentFilter(),this.registerRenewalFilter();try{(S=(p=this.mediaEl).webkitShowPlaybackTargetPicker)==null||S.call(p)}catch(j){this.updateAirPlayState({error:j.message})}}captureContext(){this.capturedAirPlayActive=!!this.mediaEl.webkitCurrentPlaybackTargetIsWireless}waitForReconnect(p=2e3){return!this.capturedAirPlayActive||this.mediaEl.webkitCurrentPlaybackTargetIsWireless?Promise.resolve():new Promise(S=>{const j=setTimeout(S,p),R=()=>{this.mediaEl.webkitCurrentPlaybackTargetIsWireless&&(clearTimeout(j),this.mediaEl.removeEventListener(xt.AirPlayConnectionChanged,R),S())};this.mediaEl.addEventListener(xt.AirPlayConnectionChanged,R)})}clearSessionsForAirPlay(){this.capturedAirPlayActive&&setTimeout(()=>{this.mediaEl.remote?this.mediaEl.remote.dispatchEvent(new Event("connecting")):this.mediaEl.dispatchEvent(new Event(xt.AirPlayConnectionChanged))},0)}init(p,S){var j;this.apiPayload=p,this.currentLicenseUrl=(j=S.stream.drm)==null?void 0:j.licenseUrl,this.isAirPlaySession=this.capturedAirPlayActive||!!this.mediaEl.webkitCurrentPlaybackTargetIsWireless,this.unregisterCurrentFilter(),this.registerSimpleFilter()}}class ww{constructor(p){be(this,"player");be(this,"fullscreenChangeHandler",()=>{const p=!!document.fullscreenElement;this.player.state.displayMode=p?Pi.FULLSCREEN:Pi.INLINE,this.player.reemit(String(xt.DisplayModeChanged),this.player.state.displayMode)});be(this,"webkitBeginFullscreenHandler",()=>{this.player.state.displayMode=Pi.FULLSCREEN,this.player.reemit(String(xt.DisplayModeChanged),this.player.state.displayMode)});be(this,"webkitEndFullscreenHandler",()=>{this.player.state.displayMode=Pi.INLINE,this.player.reemit(String(xt.DisplayModeChanged),this.player.state.displayMode)});be(this,"enterPipHandler",()=>{this.player.state.displayMode=Pi.PIP,this.player.reemit(String(xt.DisplayModeChanged),this.player.state.displayMode)});be(this,"leavePipHandler",()=>{this.player.state.displayMode=Pi.INLINE,this.player.reemit(String(xt.DisplayModeChanged),this.player.state.displayMode)});be(this,"webkitPresentationModeChangedHandler",()=>{switch(this.player.getMediaElement().webkitPresentationMode){case"picture-in-picture":{this.player.state.displayMode=Pi.PIP;break}case"inline":{this.player.state.displayMode=Pi.INLINE;break}case"fullscreen":{this.player.state.displayMode=Pi.FULLSCREEN;break}}this.player.reemit(String(xt.DisplayModeChanged),this.player.state.displayMode)});this.player=p,this.initFullScreenEventListeners(),this.initPipEventListeners()}destroy(){this.removeFullscreenEventListeners(),this.removePipEventListeners()}initPipEventListeners(){this.removePipEventListeners();const p=this.player.getMediaElement();p.addEventListener(kr.EnterPictureInPicture,this.enterPipHandler),p.addEventListener(kr.LeavePictureInPicture,this.leavePipHandler),p.addEventListener(ts.PresentationModeChanged,this.webkitPresentationModeChangedHandler)}initFullScreenEventListeners(){this.removeFullscreenEventListeners(),document.addEventListener(kr.FullscreenChange,this.fullscreenChangeHandler);const p=this.player.getMediaElement();p.addEventListener(ts.BeginFullscreen,this.webkitBeginFullscreenHandler),p.addEventListener(ts.EndFullscreen,this.webkitEndFullscreenHandler)}removePipEventListeners(){const p=this.player.getMediaElement();p&&(p.removeEventListener(kr.EnterPictureInPicture,this.enterPipHandler),p.removeEventListener(kr.LeavePictureInPicture,this.leavePipHandler),p.removeEventListener(ts.PresentationModeChanged,this.webkitPresentationModeChangedHandler))}removeFullscreenEventListeners(){document.removeEventListener(kr.FullscreenChange,this.fullscreenChangeHandler);const p=this.player.getMediaElement();p&&(p.removeEventListener(ts.BeginFullscreen,this.webkitBeginFullscreenHandler),p.removeEventListener(ts.EndFullscreen,this.webkitEndFullscreenHandler))}}const Ru=class Ru{constructor(){be(this,"cues",[]);be(this,"vttFileUrl","")}async parse(p){this.vttFileUrl=p,this.cues=[];try{const S=await fetch(p);if(!S.ok)throw new zt({code:19013,message:`Failed to fetch VTT file: ${S.statusText}`});const j=await S.text();this.parseVttText(j)}catch(S){throw S instanceof zt?S:new zt({code:19012,message:`Error parsing thumbnail VTT: ${S.message}`,original:S})}}parseVttText(p){const S=p.split(`
113
+ `);let j=0;for(;j<S.length&&!S[j].includes("WEBVTT");)j++;for(j++;j<S.length;){const R=S[j].trim();if(!R||/^\d+$/.test(R)){j++;continue}const de=Ru.TIMESTAMP_REGEX.exec(R);if(de){const T=this.parseTimestamp(de[1]),f=this.parseTimestamp(de[2]);if(j++,j<S.length){const c=S[j].trim(),v=this.parseCueLine({cueDataLine:c,startTime:T,endTime:f});v&&this.cues.push(v)}}j++}}parseTimestamp(p){const[S,j,R]=p.split(":"),de=Number.parseFloat(R);return+S*3600+ +j*60+de}parseCueLine(p){const{cueDataLine:S,startTime:j,endTime:R}=p,de=Ru.SPRITE_COORDINATES_REGEX.exec(S);if(!de)return;const T=this.resolveUrl(de[1]),f=Number.parseInt(de[2],10),c=Number.parseInt(de[3],10),v=Number.parseInt(de[4],10),C=Number.parseInt(de[5],10);return{startTime:j,endTime:R,url:T,x:f,y:c,width:v,height:C}}resolveUrl(p){try{return this.vttFileUrl?new URL(p,this.vttFileUrl).href:new URL(p).href}catch{return p}}getCueAtTime(p){let S=0,j=this.cues.length-1;for(;S<=j;){const R=Math.floor((S+j)/2),de=this.cues[R];if(p<de.startTime)j=R-1;else if(p>=de.endTime)S=R+1;else return de}}getAllCues(){return this.cues}hasLoadedCues(){return this.cues.length>0}clear(){this.cues=[],this.vttFileUrl=""}};be(Ru,"TIMESTAMP_REGEX",/^(\d{2}:\d{2}:\d{2}(?:\.\d{3})?)\s+-->\s+(\d{2}:\d{2}:\d{2}(?:\.\d{3})?)/),be(Ru,"SPRITE_COORDINATES_REGEX",/^(.+?)#xywh=(\d+),(\d+),(\d+),(\d+)/);let Ph=Ru;class Aw{constructor(){be(this,"vttParser");be(this,"spriteImageCache",new Map);be(this,"isInitialized",!1);this.vttParser=new Ph}async initialize(p){if(!p){this.isInitialized=!1;return}try{await this.vttParser.parse(p),this.isInitialized=this.vttParser.hasLoadedCues(),this.preloadInitialImages()}catch(S){let j=S;S instanceof zt||(j=new zt({code:19009,message:"Failed to initialize thumbnail track service",original:S})),tr.handleSilentError(j),this.isInitialized=!1}}preloadInitialImages(){const p=this.vttParser.getAllCues(),j=[...new Set(p.map(R=>typeof R.url=="string"?R.url:String(R.url)))].slice(0,3);for(const R of j)this.loadSpriteImage(R)}loadSpriteImage(p){return this.spriteImageCache.has(p)?Promise.resolve(this.spriteImageCache.get(p)):new Promise(S=>{const j=new Image;try{j.crossOrigin="anonymous"}catch{}j.addEventListener(kr.Load,()=>{this.spriteImageCache.set(p,j),S(j)}),j.addEventListener(kr.Error,()=>{tr.handleSilentError(new zt({code:19011,message:`Failed to load sprite image: ${p}`})),S(void 0)}),j.src=p})}getThumbnailAtTime(p){if(!this.isInitialized)return;const S=this.vttParser.getCueAtTime(p);if(S)return{imageUrl:typeof S.url=="string"?S.url:String(S.url),spriteX:S.x,spriteY:S.y,spriteWidth:S.width,spriteHeight:S.height}}async renderThumbnailToCanvas(p,S){const j=this.getThumbnailAtTime(p);if(j)try{const R=await this.loadSpriteImage(j.imageUrl);if(!R)return;const de=S.getContext("2d");if(!de)return;S.width=j.spriteWidth,S.height=j.spriteHeight,de.clearRect(0,0,S.width,S.height),de.drawImage(R,j.spriteX,j.spriteY,j.spriteWidth,j.spriteHeight,0,0,j.spriteWidth,j.spriteHeight)}catch(R){tr.handleSilentError(new zt({code:19010,message:`Failed to render thumbnail: ${j.imageUrl}`,original:R}))}}isAvailable(){return this.isInitialized}reset(){this.vttParser.clear(),this.spriteImageCache.clear(),this.isInitialized=!1}getParser(){return this.vttParser}}const Os=class Os{constructor(p){be(this,"player");be(this,"actions",new Map);be(this,"triggeredOnceActions",new Set);be(this,"currentActiveActions",new Set);be(this,"intervalId");be(this,"lastCheckTime",-1);be(this,"isInitialized",!1);be(this,"streamStartEpoch");be(this,"onSeeked",()=>{this.evaluateActions()});be(this,"isEvaluatingActions",!1);be(this,"pendingEvaluateActions",!1);this.player=p}initialize(){if(this.isInitialized)return;const p=this.player.getMediaElement();this.startIntervalCheck(),p.addEventListener(xt.Seeked,this.onSeeked),this.isInitialized=!0}destroy(){if(!this.isInitialized)return;this.stopIntervalCheck(),this.player.getMediaElement().removeEventListener(xt.Seeked,this.onSeeked),this.clearActions(),this.isInitialized=!1}registerAction(p){this.actions.has(p.id)&&console.warn(`[TimeBoundActionsService] Action with id "${p.id}" is already registered. Overwriting existing action.`),this.actions.set(p.id,p),this.detectAndSetStreamStartEpoch(p)}registerActions(p){for(const S of p)this.registerAction(S)}unregisterAction(p){this.actions.delete(p),this.triggeredOnceActions.delete(p),this.currentActiveActions.delete(p)}resetFiredActions(p){for(const S of p){const j=this.actions.get(S);j&&this.handleActionExited(j,this.player.getCurrentTime())}p.clear()}clearActions(){this.resetFiredActions(this.triggeredOnceActions),this.resetFiredActions(this.currentActiveActions),this.actions.clear(),this.lastCheckTime=-1,this.streamStartEpoch=void 0}startIntervalCheck(){this.intervalId===void 0&&(this.intervalId=setInterval(()=>{this.player.isPlaying()&&this.onTimeUpdate()},Os.CHECK_INTERVAL_MS))}stopIntervalCheck(){this.intervalId!==void 0&&(clearInterval(this.intervalId),this.intervalId=void 0)}onTimeUpdate(){const p=this.player.getCurrentTime();Math.abs(p-this.lastCheckTime)<=Os.TIME_TOLERANCE_SECONDS||(this.lastCheckTime=p,this.evaluateActions())}evaluateActions(){if(this.isEvaluatingActions){this.pendingEvaluateActions=!0;return}this.isEvaluatingActions=!0;try{const p=this.player.getCurrentTime(),S=this.getNowActiveActions(p);this.processNewActions(S,p),this.processExitedActions(S,p),this.currentActiveActions.clear();for(const j of S)this.currentActiveActions.add(j)}finally{this.isEvaluatingActions=!1,this.handlePendingEvaluation()}}getNowActiveActions(p){const S=new Set;for(const[j,R]of this.actions)this.isTimeInRange(p,R)&&S.add(j);return S}processNewActions(p,S){for(const j of p){if(this.currentActiveActions.has(j))continue;const R=this.actions.get(j);R&&this.handleActionEntered(R,S)}}processExitedActions(p,S){for(const j of this.currentActiveActions){if(p.has(j))continue;const R=this.actions.get(j);R&&(this.handleActionExited(R,S),R.type===Aa.PLAY_NEXT&&this.triggeredOnceActions.delete(j))}}handlePendingEvaluation(){this.pendingEvaluateActions&&(this.pendingEvaluateActions=!1,this.evaluateActions())}detectAndSetStreamStartEpoch(p){if(this.streamStartEpoch===void 0&&p.startTime>Os.EPOCH_THRESHOLD){const S=this.player.getCurrentTime(),j=Date.now()/1e3;this.streamStartEpoch=j-S}}convertToPlayerTime(p){return p>Os.EPOCH_THRESHOLD&&this.streamStartEpoch!==void 0?p-this.streamStartEpoch:p}isPointInTimeAction(p){return p.endTime===void 0}isWithinTolerance(p,S){return Math.abs(p-S)<=Os.TIME_TOLERANCE_SECONDS}isTimeInRange(p,S){const j=this.convertToPlayerTime(S.startTime);if(this.isPointInTimeAction(S))return this.isWithinTolerance(p,j);const R=this.convertToPlayerTime(S.endTime);return p>=j&&p<=R}handleActionEntered(p,S){const j=p.fireOnce??p.type===Aa.PLAY_NEXT;if(j&&this.triggeredOnceActions.has(p.id))return;const R={currentTime:S,duration:this.player.getDuration(),action:p,player:this.player};if(j&&this.triggeredOnceActions.add(p.id),p.callback)try{p.callback(R)}catch(de){tr.handleSilentError({code:19023,message:`[TimeBoundActionsService] Callback error for action ${p.id}`,original:de})}this.player.reemit(xt.TimeBoundActionTriggered,{action:p,context:R})}handleActionExited(p,S){const j={currentTime:S,duration:this.player.getDuration(),action:p,player:this.player};this.player.reemit(xt.TimeBoundActionExited,{action:p,context:j})}reset(){this.destroy()}};be(Os,"CHECK_INTERVAL_MS",250),be(Os,"TIME_TOLERANCE_SECONDS",.5),be(Os,"EPOCH_THRESHOLD",1e9);let kh=Os;const Iw=[];class Cw{constructor(p,S){be(this,"player");be(this,"skippableTypes");be(this,"chaptersMap",new Map);be(this,"activeChapters",new Set);be(this,"currentChapter");be(this,"isCurrentChapterSkippable",!1);be(this,"handleActionTriggered",p=>{const{action:S}=p.detail;S.type!==Aa.CHAPTER||!this.chaptersMap.get(S.id)||(this.activeChapters.add(S.id),this.updateCurrentChapter())});be(this,"handleActionExited",p=>{const{action:S}=p.detail;S.type===Aa.CHAPTER&&(this.activeChapters.delete(S.id),this.updateCurrentChapter())});this.player=p,this.skippableTypes=(S==null?void 0:S.skippableTypes)??Iw,this.setupEventListeners()}setSkippableTypes(p){p&&(this.skippableTypes=[...p])}registerChapters(p){if(!p||p.length===0)return;this.chaptersMap.clear();for(const j of p){const R=this.getChapterId(j);this.chaptersMap.set(R,j)}const S=this.convertChaptersToActions(p);this.player.timeBoundActionsService.registerActions(S)}skipCurrentChapter(){this.currentChapter&&this.player.seek(this.currentChapter.until/1e3)}getChapterId(p){return`chapter-${p.from}-${p.until}`}convertChaptersToActions(p){return p.map(S=>({id:this.getChapterId(S),type:Aa.CHAPTER,startTime:S.from/1e3,endTime:S.until/1e3,label:S.title,fireOnce:!1}))}isChapterSkippable(p){return p.type==="IDENT"?!1:this.skippableTypes.includes(p.type)}setupEventListeners(){this.player.on(xt.TimeBoundActionTriggered,this.handleActionTriggered),this.player.on(xt.TimeBoundActionExited,this.handleActionExited)}updateCurrentChapter(){if(this.activeChapters.size===0){this.clearCurrentChapter();return}if(this.hasAnyNonSkippableChapter()){this.hideSkipButton();return}const p=this.findLongestSkippableChapter();p&&this.setCurrentChapter(p)}clearCurrentChapter(){if(!this.currentChapter)return;const p=this.currentChapter;this.currentChapter=void 0,this.isCurrentChapterSkippable=!1,this.emitChapterExitEvent(p)}hasAnyNonSkippableChapter(){for(const p of this.activeChapters){const S=this.chaptersMap.get(p);if(S&&!this.isChapterSkippable(S))return!0}return!1}hideSkipButton(){const p=this.currentChapter,S=this.isCurrentChapterSkippable;this.currentChapter=void 0,this.isCurrentChapterSkippable=!1,S&&p&&this.emitChapterExitEvent(p)}findLongestSkippableChapter(){let p,S=-1;for(const j of this.activeChapters){const R=this.chaptersMap.get(j);if(!R||!this.isChapterSkippable(R))continue;const de=R.until-R.from;(!p||de>S)&&(p=R,S=de)}return p}setCurrentChapter(p){const S=this.currentChapter;this.currentChapter=p,this.isCurrentChapterSkippable=!0,this.hasChapterChanged(S,p)&&this.player.reemit(xt.ChapterEntered,{chapter:p,isSkippable:!0})}hasChapterChanged(p,S){return(p==null?void 0:p.from)!==S.from||(p==null?void 0:p.until)!==S.until}emitChapterExitEvent(p){this.player.reemit(xt.ChapterExited,{action:{id:this.getChapterId(p),type:Aa.CHAPTER,startTime:p.from/1e3,endTime:p.until/1e3}})}clearChapters(){const p=[...this.chaptersMap.values()],S=this.convertChaptersToActions(p);for(const j of S)this.player.timeBoundActionsService.unregisterAction(j.id);this.chaptersMap.clear(),this.activeChapters.clear(),this.currentChapter=void 0,this.isCurrentChapterSkippable=!1}destroy(){this.player.off(xt.TimeBoundActionTriggered,this.handleActionTriggered),this.player.off(xt.TimeBoundActionExited,this.handleActionExited),this.clearChapters()}reset(){this.clearChapters()}}class Mw{constructor(p){be(this,"player");be(this,"_isAudioOnly");this.player=p}isAudioOnly(){if(this._isAudioOnly===void 0){const p=this.player.getMediaElement();this._isAudioOnly=p instanceof HTMLAudioElement}return this._isAudioOnly}reset(){this.isAudioOnly()||this.player.removeAllTextTracks()}handleSubtitles(p){var S;this.isAudioOnly()||(this.reset(),(S=p.assets.subtitles)!=null&&S.length&&this.player.addTextTracks(p.assets.subtitles))}}class Pw{async parseManifestForTracks(p){try{if(!(p!=null&&p.includes(".m3u8")))return[];const S=await fetch(p);if(!S.ok)return console.error("Failed to fetch manifest:",S.statusText),[];const j=await S.text();return this.parseHLSManifest(j,p)}catch(S){return console.error("Failed to parse manifest:",S),[]}}parseHLSManifest(p,S){const j=p.split(`
114
+ `),R=this.parseAudioGroups(j);return this.parseVariantStreams({lines:j,baseUrl:S,audioGroups:R}).sort((T,f)=>(T.bandwidth||0)-(f.bandwidth||0))}parseAudioGroups(p){const S=new Map;for(const j of p){const R=j.trim();if(R.startsWith("#EXT-X-MEDIA:TYPE=AUDIO")){const de=this.parseAudioGroup(R);de&&S.set(de.id,de)}}return S}parseVariantStreams({lines:p,baseUrl:S,audioGroups:j}){const R=[];let de=0;for(let T=0;T<p.length;T++){const f=p[T].trim();if(!(f!=null&&f.startsWith("#EXT-X-STREAM-INF:")))continue;const c=(p[T+1]||"").trim();if(!c||c.startsWith("#"))continue;const v=this.parseHLSStreamInfo({infoLine:f,playlistUrl:c,baseUrl:S,trackId:de,audioGroups:j});v&&(R.push(v),de++)}return R}parseAudioGroup(p){const S=/group-id="([^"]+)"/i.exec(p),j=/language="([^"]+)"/i.exec(p),R=/name="([^"]+)"/i.exec(p),de=/characteristics="([^"]+)"/i.exec(p);if(!S)return;const f=(de?de[1]:"").includes("public.accessibility.describes-video");return{id:S[1],language:j?j[1]:"und",name:R?R[1]:"",isAudioDescription:f}}parseHLSStreamInfo({infoLine:p,playlistUrl:S,baseUrl:j,trackId:R,audioGroups:de}){const T=/bandwidth=(\d+)/i.exec(p),f=T?Number.parseInt(T[1],10):0,c=/resolution=\d+x(\d+)/i.exec(p);let v=c?Number.parseInt(c[1],10):0;const C=/codecs="([^"]+)"/i.exec(p),w=C?C[1]:"",I=!/avc|hvc|hev|vp9/i.test(w),L=/audio="([^"]+)"/i.exec(p),z=L?L[1]:void 0,F=z?de.get(z):void 0,K=/language="([^"]+)"/i.exec(p),N=(F==null?void 0:F.language)||(K?K[1]:"und"),P=(F==null?void 0:F.isAudioDescription)||!1;v||(v=this.getHeightFromUrl(S));let $=S;try{$=new URL(S,j).href}catch{}const d=I?this.getBandwidthFromUrl(S)||Math.round(f/1e3):v||Math.round(f/1e3),M=!I&&v>0?`${v}p`:`${Math.round((this.getBandwidthFromUrl(S)||f||0)/1e3)} kbps`;return{id:R,width:0,height:v,bandwidth:f,value:d,label:M,originalTrack:void 0,streamTrackId:R,language:N,isAudioOnly:I,isAudioDescription:P,playlistUrl:$}}getHeightFromUrl(p){const S=/(\d{3,4})p|[_-](\d{3,4})[._-]/.exec(p),j=S?S[1]||S[2]:void 0;return j?Number.parseInt(j,10):0}getBandwidthFromUrl(p){const S=/=(\d{3,6})/.exec(p);return S?Number.parseInt(S[1],10):0}}const gv="description",mv="public.accessibility.describes-video";class kw{constructor(p){be(this,"player");be(this,"hlsManifestParser");be(this,"manifestTracks",[]);be(this,"currentManifestUri","");be(this,"_currentTrack");be(this,"idAutoTrack",-1);this.player=p,this.hlsManifestParser=new Pw}get currentTrack(){return!this._currentTrack||this._currentTrack.streamTrackId===this.idAutoTrack?this.getActiveTrack():this._currentTrack}isManifestTrackAvailable(){return!1}reset(){this.manifestTracks=[],this.currentManifestUri="",this._currentTrack=void 0}getShakaPlayer(){return this.player.player}getVariantTracks(){return this.getShakaPlayer().getVariantTracks()}getAudioTracks(){return this.getShakaPlayer().getAudioTracks()}getVideoTracks(){return this.getShakaPlayer().getVideoTracks()}isAudioOnly(){return this.getShakaPlayer().isAudioOnly()}getAvailableVideoTracks(){const p=this.mapVariantTracksToStreamTracks(this.getVariantTracks()).filter(j=>!j.isAudioOnly);if(p.length<=1&&this.isManifestTrackAvailable())return this.getVideoTracksFromManifest();if(p.length===0)return[];const S=new Map;for(const j of p)j.value!==this.idAutoTrack&&!S.has(j.value)&&S.set(j.value,j);return this.addAutoRow([...S.values()])}getAudioTracksByVideoQuality(p){var j;if(this.isAudioOnly())return[];const S=this.mapVariantTracksToStreamTracks(this.getVariantTracks());if(!this.hasChoiceOfTrack(S))return[];if(S.some(R=>R.isAudioDescription)){const R=this.getActiveTrack(),de=(R==null?void 0:R.height)||((j=S.find(T=>T.height))==null?void 0:j.height);return S.filter(T=>!de||T.height===de)}return S.some(R=>R.height===p)?this.mapVariantTracksToStreamTracks(S.filter(R=>R.height===p)):[]}getAudioOnlyTracks(){if(!this.isAudioOnly())return[];const p=this.getVariantTracks();return!this.hasChoiceOfTrack(p)&&this.isManifestTrackAvailable()?this.addAutoRow(this.manifestTracks.filter(S=>S.isAudioOnly)):this.addAutoRow(this.mapVariantTracksToStreamTracks(p))}init(){const p=this.getVariantTracks();let S;if(this.isAudioOnly()){const j=p.find(R=>R.bandwidth===this.player.state.audioPlaybackQuality);j&&(S=this.mapVariantTracksToStreamTracks([j])[0])}else{let j=this.mapVariantTracksToStreamTracks(p.filter(R=>R.height===this.player.state.videoPlaybackQuality));j.length>1&&(j=j.filter(R=>R.isAudioDescription===this.player.state.useAudioDescription&&R.language===this.player.state.audioLanguage)),j.length>0&&(S=j[0])}S||(S=this.mapVariantTracksToStreamTracks(this.addAutoRow([]))[0]),this.setTrack(S,!1)}setTrack(p,S){if(this._currentTrack=p,this.isManifestTrackAvailable()){this.loadQualityDirect(p,S);return}this.setStreamTrack(p,S),this.player.reemit(xt.StreamTrackChanged)}setVideoTrackByQuality(p){const S=this.getAvailableVideoTracks().find(j=>j.value===p);S&&this.setTrack(S,!0)}getAlternateStreamURLForSafari(){var p,S;if(this.isManifestTrackAvailable()){if(this.manifestTracks.some(j=>!j.isAudioOnly)){if(this.player.state.videoPlaybackQuality>0)return(p=this.manifestTracks.find(j=>j.height===this.player.state.videoPlaybackQuality))==null?void 0:p.playlistUrl}else if(this.player.state.audioPlaybackQuality>0)return(S=this.manifestTracks.find(j=>j.bandwidth===this.player.state.audioPlaybackQuality))==null?void 0:S.playlistUrl}}async parseManifestForTracks(p){this.currentManifestUri=p,this.manifestTracks=await this.hlsManifestParser.parseManifestForTracks(p)}mapVariantTracksToStreamTracks(p){if(p.length>0&&"streamTrackId"in p[0])return p;let S=1;return p.map(j=>{var w,I;const R=j,de=!!R.videoId,T=!!R.bandwidth;let f;de?f=`${R.height}p`:T?f=`${Math.round(R.bandwidth/1e3)} kbps`:f=R.label;const c=((w=R.audioRoles)==null?void 0:w.some(L=>L===gv||L===mv))||!1,v=((I=R.roles)==null?void 0:I.some(L=>L===gv||L===mv))||!1,C=c||v;return{id:R.id,width:R.width,height:R.height,bandwidth:R.bandwidth,value:de?R.height:R.bandwidth||S,label:f,originalTrack:R,streamTrackId:S++,language:R.language,isAudioOnly:!de,isAudioDescription:C}})}addAutoRow(p){return p.some(j=>j.value===this.idAutoTrack)?p:[{id:this.idAutoTrack,value:this.idAutoTrack,label:"Auto",streamTrackId:this.idAutoTrack,isAudioOnly:this.isAudioOnly(),isAudioDescription:!1,originalTrack:void 0,playlistUrl:this.currentManifestUri},...p]}async loadQualityDirect(p,S){const j=this.manifestTracks.find(c=>{const v=c.value===p.value||c.streamTrackId===p.streamTrackId||c.bandwidth===p.bandwidth,C=!p.language||c.language===p.language,w=c.isAudioDescription===p.isAudioDescription;return v&&C&&w}),R=p.value===this.idAutoTrack?this.currentManifestUri:(j==null?void 0:j.playlistUrl)||this.currentManifestUri,de=this.player.getCurrentTime(),T=this.player.isPlaying(),f=this.getShakaPlayer().getAssetUri();if(!(!f||R===f))try{await this.loadAndResume({targetUrl:R,currentTime:de,wasPlaying:T}),this.updatePlayerState(p,S)}catch(c){console.error("Failed to load quality directly, falling back to master manifest",c),this.currentManifestUri!==R&&(await this.loadAndResume({targetUrl:this.currentManifestUri,currentTime:de,wasPlaying:T}),this.updatePlayerState(p,S))}}async loadAndResume({targetUrl:p,currentTime:S,wasPlaying:j}){if(await this.getShakaPlayer().load(p,S),j)try{await this.player.play()}catch{}}updatePlayerState(p,S){S&&(this.isAudioOnly()?(this.player.state.audioPlaybackQuality=p.bandwidth,this.player.settingsStore.set("audioPlaybackQuality",p.bandwidth)):(this.player.state.videoPlaybackQuality=p.height,this.player.state.useAudioDescription=p.isAudioDescription,this.player.settingsStore.set("videoPlaybackQuality",p.height),this.player.settingsStore.set("useAudioDescription",p.isAudioDescription)),this.player.state.audioLanguage=p.language,this.player.settingsStore.set("audioLanguage",p.language))}getVideoTracksFromManifest(){const p=this.manifestTracks.filter(S=>!S.isAudioOnly);if(p.length>0){const S=p.map((j,R)=>({...j,streamTrackId:R})).sort((j,R)=>(j.bandwidth||0)-(R.bandwidth||0));return this.addAutoRow(S)}return[]}setStreamTrack(p,S=!1){if(((p==null?void 0:p.streamTrackId)??this.idAutoTrack)===this.idAutoTrack){this.player.configure({abr:{enabled:!0}}),S&&p&&this.setPlayerQualityState(p,!0);return}const R=2;this.player.configure({abr:{enabled:!1}}),this.getShakaPlayer().selectVariantTrack(p.originalTrack,!0,R),this.setPlayerQualityState(p,S)}setPlayerQualityState(p,S){if(this.isAudioOnly()){this.player.state.audioPlaybackQuality=p.bandwidth,S&&this.player.settingsStore.set("audioPlaybackQuality",p.bandwidth);return}this.player.state.videoPlaybackQuality=p.height,this.player.state.useAudioDescription=p.isAudioDescription,this.player.state.audioLanguage=p.language,S&&(this.player.settingsStore.set("videoPlaybackQuality",p.height),this.player.settingsStore.set("useAudioDescription",p.isAudioDescription),this.player.settingsStore.set("audioLanguage",p.language))}getActiveTrack(){const p=this.getVariantTracks();if(p.length===0)return;if(p.length===1)return this.mapVariantTracksToStreamTracks(p)[0];const S=p.find(j=>j.active);if(S)return this.mapVariantTracksToStreamTracks([S])[0]}hasChoiceOfTrack(p){return p.length>1}}class Rw{constructor(p,S){be(this,"airPlayService");be(this,"castService");be(this,"advertService");be(this,"playerId");be(this,"playerEvents");be(this,"state");be(this,"uiEvents");be(this,"mediaStateListeners");be(this,"thumbnailService");be(this,"timeBoundActionsService");be(this,"chapterSkipService");be(this,"subtitlesService");be(this,"streamTrackService");be(this,"playerConfig");be(this,"container");be(this,"settingsStore");be(this,"displayModeHandler");be(this,"isInitialized",!1);be(this,"_player");be(this,"streamLoadingData",{});be(this,"mediaEventListeners",new Map);be(this,"onLoadedMetadata",()=>{const p=this.getMediaElement();this.isLive()&&this.getPlaybackRate()!==1&&p&&(p.playbackRate=1)});var j;this.playerConfig=S,this.container=p,this.settingsStore=S.settingsStore,this.playerId=tw(),this.playerEvents=dw(this.playerId),this.state=lw(S.settingsStore),this.advertService=new Sw(this),this.castService=new uw(this,S.chromecastReceiverId||Kx.PRODUCTION_V2),this.thumbnailService=new Aw,this.timeBoundActionsService=new kh(this),this.chapterSkipService=new Cw(this,{skippableTypes:(j=S.options)==null?void 0:j.skippableChapters}),this.subtitlesService=new Mw(this),this.streamTrackService=new kw(this)}get player(){return this._player}destroy(){var S,j,R,de,T,f,c;this.isInitialized=!1;const p=this.getMediaElement();if(p){for(const[v,C]of this.mediaEventListeners.entries())p.removeEventListener(v,C);this.mediaEventListeners.clear(),p.removeEventListener(xt.LoadedMetadata,this.onLoadedMetadata)}this.mediaStateListeners&&this.mediaStateListeners(),(S=this.displayModeHandler)==null||S.destroy(),(j=this.timeBoundActionsService)==null||j.destroy(),(R=this.chapterSkipService)==null||R.destroy(),(de=this.castService)==null||de.destroy(),(T=this.advertService)==null||T.destroy(),(f=this.subtitlesService)==null||f.reset(),(c=this.streamTrackService)==null||c.reset(),this.playerEvents.removeAllListeners(),this._player&&(this._player.destroy(),this._player=void 0)}async initialize(){this.isInitialized||(this._player=await ew(this,this.playerConfig.mediaType??es.VIDEO),this.displayModeHandler=new ww(this),this.forwardAllMediaEvents(),this.initAirPlayService(),this.setupPlaybackRateHandler(),this.castService.initialize(),this.isInitialized=!0)}getPlayerContainer(){return this.container}async load(p,S){await this.initialize(),this.streamLoadingData=S??{};const j=this.player.load(p);this.applyPersistedSettings(),this.timeBoundActionsService.initialize(),await j,this.applyPlaybackRateForCurrentStream()}async unload(){const p=this.player.unload();this.advertService.destroy(),this.timeBoundActionsService.reset(),this.thumbnailService.reset(),this.subtitlesService.reset(),this.chapterSkipService.reset(),this.streamTrackService.reset(),this.streamLoadingData={},await p}setStreamLoadingData(p){this.streamLoadingData=p}async play(){if(this.advertService.isPlayingAd()){this.advertService.resumeAd();return}await this.getMediaElement().play()}pause(){if(this.advertService.isPlayingAd()){this.advertService.pauseAd();return}this.getMediaElement().pause()}async togglePlayPause(){if(this.advertService.isPlayingAd()){this.advertService.isAdPaused()?this.advertService.resumeAd():this.advertService.pauseAd();return}await(this.isPlaying()?this.pause():this.play())}replay(){if(this.isLive())return;const p=this.getMediaElement();this.seek(0),p.play()}seek(p){if(this.advertService.isPlayingAd()){console.warn(Qa.NO_SEEK);return}const S=this.getMediaElement();if(this.getMode()===li.LIVE){const{start:R,end:de}=this.getSeekRange();S.currentTime=Nl(p,{min:R,max:de});return}const j=S.duration;if(!Ch(j)){tr.handleSilentError(new zt({code:19020,message:"Cannot seek: Media duration is not available or invalid."}));return}S.currentTime=Nl(p,{min:0,max:j}),this.state.mediaState===Kr.ENDED&&p<j&&this.play()}forward(p=Zc.DEFAULT_SECONDS_TO_SKIP){if(this.advertService.isPlayingAd()){console.warn(Qa.NO_SEEK);return}if(this.getMode()===li.LIVE_NO_DVR)return;if(!Number.isFinite(p)||p<=0){console.warn("Invalid forward time:",p);return}const S=this.getMediaElement(),j=this.getCurrentTime();if(!Ch(j)){console.warn("Cannot seek forward: Current time is not available or invalid.");return}const R=this.isLive()?this.getSeekRange().end:S.duration;if(!Ch(R)){console.warn("Cannot seek forward: Maximum seek time is not available or invalid.");return}const de=Math.min(j+p,R);this.seek(de)}backward(p=Zc.DEFAULT_SECONDS_TO_SKIP){if(this.advertService.isPlayingAd()){console.warn(Qa.NO_SEEK);return}if(this.getMode()===li.LIVE_NO_DVR)return;if(p<=0){console.warn("Backward time must be a positive value.");return}const S=this.getCurrentTime();if(Number.isNaN(S)||!Number.isFinite(S)){console.warn("Cannot seek backward: Current time is not valid.");return}const j=this.isLive()?this.getSeekRange().start:0,R=Math.max(S-p,j);this.seek(R)}getCurrentTime(){return this.getMediaElement().currentTime}getPlaybackRate(){return this.getMediaElement().playbackRate??this.state.playbackRate??1}setPlaybackRate(p){this.state.playbackRate=p,this.settingsStore.set("playbackRate",p);const S=this.getMediaElement();S.playbackRate=p}getVolume(){var S;const p=this.getMediaElement();return p?p.volume:((S=this.state)==null?void 0:S.volume)??.5}setVolume(p){const S=Nl(p,{min:0,max:1});this.state.volume=S,this.settingsStore.set("volume",S);const j=this.getMediaElement();j&&(j.volume=S),this.advertService.isPlayingAd()&&this.advertService.setVolume(S)}mute(){this.state.muted=!0,this.settingsStore.set("muted",!0);const p=this.getMediaElement();p&&(p.muted=!0),this.advertService.isPlayingAd()&&this.advertService.mute()}isMuted(){return this.getMediaElement().muted}unMute(){this.state.muted=!1,this.settingsStore.set("muted",!1);const p=this.getMediaElement();p&&(p.muted=!1),this.advertService.isPlayingAd()&&this.advertService.unmute()}toggleMute(){this.isMuted()?this.unMute():this.mute()}isPlaying(){return this.advertService.isPlayingAd()?!this.advertService.isAdPaused():this.getMediaElement().paused===!1}isLive(){var p,S;return((p=this.streamLoadingData)==null?void 0:p.isLiveStream)===!0?!0:((S=this.streamLoadingData)==null?void 0:S.isLiveStream)===!1?!1:this.player.isLive()}isBuffering(){return this.player.isBuffering()}getDuration(){return this.getMediaElement().duration}seekToLiveEdge(){if(!this.isLive())return;const{end:p}=this.getSeekRange();this.seek(p)}getNetworkingEngine(){return this.player.getNetworkingEngine()}getSeekRange(){return{start:this.player.seekRange().start,end:this.player.seekRange().end}}getMediaElement(){return this.player.getMediaElement()}addTextTracks(p){for(const S of p)this.addTextTrack(S)}addTextTrack(p){const S=this.getMediaElement(),j=document.createElement("track");j.kind="subtitles",j.src=p.location,j.srclang=p.iso,j.label=p.name,S.appendChild(j)}setTextTrackVisibility({language:p,persist:S=!0}){const j=this.getMediaElement().textTracks,R=this.player.getTextTracks(),de=new Set(R.map(T=>T.language));for(const T of j)T.mode="disabled";if(p&&de.has(p))this.player.selectTextLanguage(p),this.player.setTextTrackVisibility(!0);else if(p){const T=[...j].find(f=>f.language===p);T&&(T.mode="showing")}else this.player.setTextTrackVisibility(!1);S&&(this.state.subtitleLanguage=p,this.settingsStore.set("subtitleLanguage",p))}getSelectedTextTrack(){for(const p of this.getMediaElement().textTracks)if(p.mode!=="disabled")return p}removeAllTextTracks(){const p=this.getMediaElement();for(const S of p.querySelectorAll("track"))S.remove()}getTextTracks(){var S,j;const p=new Map;for(const R of this.getMediaElement().textTracks)p.set(R.language,{language:R.language,label:R.label??void 0,active:R.mode!=="disabled"});for(const R of this.player.getTextTracks())p.set(R.language,{language:R.language,label:R.label??((S=p.get(R.language))==null?void 0:S.label)??void 0,active:!!R.active||((j=p.get(R.language))==null?void 0:j.active)===!0});return[...p.values()]}isFullscreenPossible(){return this.container.requestFullscreen?!0:!!this.getMediaElement()[ts.EnterFullscreen]}enterFullscreen(){if(this.container.requestFullscreen){this.container.requestFullscreen().catch(S=>{tr.handleSilentError(new zt({code:19021,message:"Failed to enter fullscreen",original:S}))});return}const p=this.getMediaElement();p[ts.EnterFullscreen]&&p[ts.EnterFullscreen]()}exitFullscreen(){if(document.fullscreenElement){document.exitFullscreen().catch(S=>{tr.handleSilentError(new zt({code:19022,message:"Failed to exit fullscreen",original:S}))});return}const p=this.getMediaElement();p[ts.DisplayingFullscreen]&&p[ts.ExitFullscreen]&&p[ts.ExitFullscreen]()}isDisplayModeChangeAllowed(){return this.state.displayMode!==Pi.INLINE||this.state.cast.connected===!1&&this.state.airPlay.connected===!1}isPipSupported(){var R;if(((R=this.streamLoadingData)==null?void 0:R.normalizedAvType)===es.AUDIO)return!1;const p=this.getMediaElement(),S=typeof p.requestPictureInPicture=="function"&&!!document.pictureInPictureEnabled,j="webkitPresentationMode"in p;return S||j}async enterPip(){const p=this.player.getMediaElement();if(!this.isPipSupported()){console.warn("Picture-in-Picture is not supported in this browser");return}if(!this.isDisplayModeChangeAllowed()){console.warn("Picture-in-Picture is not allowed while casting or AirPlaying");return}try{await p.requestPictureInPicture(),this.state.displayMode=Pi.PIP}catch(S){tr.handleSilentError(new zt({code:19007,message:"Failed to enter Picture-in-Picture",original:S}))}}async exitPip(){try{document.pictureInPictureElement&&(typeof document.exitPictureInPicture=="function"?await document.exitPictureInPicture():await document.pictureInPictureElement.requestPictureInPicture())}catch(p){tr.handleSilentError(new zt({code:19008,message:"Failed to exit Picture-in-Picture",original:p}))}}configure(p){this.player.configure(p)}applyPersistedSettings(){const p=this.getMediaElement(),S=Math.max(0,Math.min(1,this.state.volume??1));p.volume=S,p.muted=this.state.muted,p.playbackRate=this.state.playbackRate}applyPlaybackRateForCurrentStream(){const p=this.getMediaElement();p.playbackRate=this.isLive()?1:this.state.playbackRate}setupPlaybackRateHandler(){const p=this.getMediaElement();p&&p.addEventListener(xt.LoadedMetadata,this.onLoadedMetadata)}initAirPlayService(){this.airPlayService||(this.airPlayService=new xw(this))}forwardAllMediaEvents(){const p=this.getMediaElement();if(!p)return;const S=Object.values(xt).filter(j=>j!==String(xt.MediaStateChanged)&&j!==String(xt.DisplayModeChanged)&&j!==String(xt.Error));for(const j of S){const R=this.toPlayerEventName(j);if(!R)continue;const de=this.createMediaEventForwardingHandler(R);this.mediaEventListeners.set(j,de),p.addEventListener(j,de)}}createMediaEventForwardingHandler(p){return(function(j){this.playerEvents.emit({eventName:p,value:j})}).bind(this)}toPlayerEventName(p){if(Object.values(xt).includes(p))return p;if(p in xt)return xt[p];console.warn(`Unknown player event name: ${p}`)}on(p,S){const j=this.toPlayerEventName(p);j&&this.playerEvents.on({eventName:j,listener:S})}off(p,S){const j=this.toPlayerEventName(p);j&&this.playerEvents.off({eventName:j,listener:S})}once(p,S){const j=this.toPlayerEventName(p);j&&this.playerEvents.once({eventName:j,listener:S})}reemit(p,S){const j=this.toPlayerEventName(p);j&&this.playerEvents.emit({eventName:j,value:S})}getConfiguration(){return this.player.getConfiguration()}onAdEvent(p,S){this.on(p,S)}offAdEvent(p,S){this.off(p,S)}isPlayingAd(){return this.advertService.isPlayingAd()}setAdClickElement(p){return this.advertService.setAdClickElement(p)}getAdUiState(){if(this.advertService.isPlayingAd())return{isPlayingAd:this.advertService.isPlayingAd(),isAdPaused:this.advertService.isAdPaused(),remainingTime:this.advertService.getAdRemainingTime(),duration:this.advertService.getDuration(),currentTime:this.advertService.getCurrentTime(),adPosition:this.advertService.getAdPosition(),totalAds:this.advertService.getTotalAds()}}getMode(){return this.determineStreamMode()}determineStreamMode(){if(this.streamLoadingData.isLiveStream===!1)return li.VOD;if(this.streamLoadingData.isLiveStream===!0&&this.streamLoadingData.hasDvrWindow===!1)return li.LIVE_NO_DVR;const p=this.getSeekRange();return p.end===Number.POSITIVE_INFINITY||p.end-p.start<30?li.LIVE_NO_DVR:li.LIVE}}var vv={exports:{}};(function(Se,p){(function(j,R){Se.exports=R()})(uv,function(){return function(){var S={3144:function(T,f,c){var v=c(6743),C=c(1002),w=c(76),I=c(7119);T.exports=I||v.call(w,C)},1002:function(T){T.exports=Function.prototype.apply},76:function(T){T.exports=Function.prototype.call},3126:function(T,f,c){var v=c(6743),C=c(9675),w=c(76),I=c(3144);T.exports=function(z){if(z.length<1||typeof z[0]!="function")throw new C("a function is required");return I(v,w,z)}},7119:function(T){T.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply},6556:function(T,f,c){var v=c(453),C=c(3126),w=C([v("%String.prototype.indexOf%")]);T.exports=function(L,z){var F=v(L,!!z);return typeof F=="function"&&w(L,".prototype.")>-1?C([F]):F}},7898:function(T,f,c){f.UINT32=c(3122),f.UINT64=c(174)},3122:function(T,f){var c,v;(function(C){w(Math.pow(36,5)),w(Math.pow(16,7)),w(Math.pow(10,9)),w(Math.pow(2,30)),w(36),w(16),w(10),w(2);function w(F,K){if(!(this instanceof w))return new w(F,K);if(this._low=0,this._high=0,this.remainder=null,typeof K>"u")return L.call(this,F);if(typeof F=="string")return z.call(this,F,K);I.call(this,F,K)}function I(F,K){return this._low=F|0,this._high=K|0,this}w.prototype.fromBits=I;function L(F){return this._low=F&65535,this._high=F>>>16,this}w.prototype.fromNumber=L;function z(F,K){var N=parseInt(F,K||10);return this._low=N&65535,this._high=N>>>16,this}w.prototype.fromString=z,w.prototype.toNumber=function(){return this._high*65536+this._low},w.prototype.toString=function(F){return this.toNumber().toString(F||10)},w.prototype.add=function(F){var K=this._low+F._low,N=K>>>16;return N+=this._high+F._high,this._low=K&65535,this._high=N&65535,this},w.prototype.subtract=function(F){return this.add(F.clone().negate())},w.prototype.multiply=function(F){var K=this._high,N=this._low,P=F._high,$=F._low,d,M;return M=N*$,d=M>>>16,d+=K*$,d&=65535,d+=N*P,this._low=M&65535,this._high=d&65535,this},w.prototype.div=function(F){if(F._low==0&&F._high==0)throw Error("division by zero");if(F._high==0&&F._low==1)return this.remainder=new w(0),this;if(F.gt(this))return this.remainder=this.clone(),this._low=0,this._high=0,this;if(this.eq(F))return this.remainder=new w(0),this._low=1,this._high=0,this;for(var K=F.clone(),N=-1;!this.lt(K);)K.shiftLeft(1,!0),N++;for(this.remainder=this.clone(),this._low=0,this._high=0;N>=0;N--)K.shiftRight(1),this.remainder.lt(K)||(this.remainder.subtract(K),N>=16?this._high|=1<<N-16:this._low|=1<<N);return this},w.prototype.negate=function(){var F=(~this._low&65535)+1;return this._low=F&65535,this._high=~this._high+(F>>>16)&65535,this},w.prototype.equals=w.prototype.eq=function(F){return this._low==F._low&&this._high==F._high},w.prototype.greaterThan=w.prototype.gt=function(F){return this._high>F._high?!0:this._high<F._high?!1:this._low>F._low},w.prototype.lessThan=w.prototype.lt=function(F){return this._high<F._high?!0:this._high>F._high?!1:this._low<F._low},w.prototype.or=function(F){return this._low|=F._low,this._high|=F._high,this},w.prototype.and=function(F){return this._low&=F._low,this._high&=F._high,this},w.prototype.not=function(){return this._low=~this._low&65535,this._high=~this._high&65535,this},w.prototype.xor=function(F){return this._low^=F._low,this._high^=F._high,this},w.prototype.shiftRight=w.prototype.shiftr=function(F){return F>16?(this._low=this._high>>F-16,this._high=0):F==16?(this._low=this._high,this._high=0):(this._low=this._low>>F|this._high<<16-F&65535,this._high>>=F),this},w.prototype.shiftLeft=w.prototype.shiftl=function(F,K){return F>16?(this._high=this._low<<F-16,this._low=0,K||(this._high&=65535)):F==16?(this._high=this._low,this._low=0):(this._high=this._high<<F|this._low>>16-F,this._low=this._low<<F&65535,K||(this._high&=65535)),this},w.prototype.rotateLeft=w.prototype.rotl=function(F){var K=this._high<<16|this._low;return K=K<<F|K>>>32-F,this._low=K&65535,this._high=K>>>16,this},w.prototype.rotateRight=w.prototype.rotr=function(F){var K=this._high<<16|this._low;return K=K>>>F|K<<32-F,this._low=K&65535,this._high=K>>>16,this},w.prototype.clone=function(){return new w(this._low,this._high)},c=[],v=(function(){return w}).apply(f,c),v!==void 0&&(T.exports=v)})()},174:function(T,f){var c,v;(function(C){var w={16:L(Math.pow(16,5)),10:L(Math.pow(10,5)),2:L(Math.pow(2,5))},I={16:L(16),10:L(10),2:L(2)};function L(N,P,$,d){if(!(this instanceof L))return new L(N,P,$,d);if(this.remainder=null,typeof N=="string")return K.call(this,N,P);if(typeof P>"u")return F.call(this,N);z.apply(this,arguments)}function z(N,P,$,d){return typeof $>"u"?(this._a00=N&65535,this._a16=N>>>16,this._a32=P&65535,this._a48=P>>>16,this):(this._a00=N|0,this._a16=P|0,this._a32=$|0,this._a48=d|0,this)}L.prototype.fromBits=z;function F(N){return this._a00=N&65535,this._a16=N>>>16,this._a32=0,this._a48=0,this}L.prototype.fromNumber=F;function K(N,P){P=P||10,this._a00=0,this._a16=0,this._a32=0,this._a48=0;for(var $=w[P]||new L(Math.pow(P,5)),d=0,M=N.length;d<M;d+=5){var U=Math.min(5,M-d),J=parseInt(N.slice(d,d+U),P);this.multiply(U<5?new L(Math.pow(P,U)):$).add(new L(J))}return this}L.prototype.fromString=K,L.prototype.toNumber=function(){return this._a16*65536+this._a00},L.prototype.toString=function(N){N=N||10;var P=I[N]||new L(N);if(!this.gt(P))return this.toNumber().toString(N);for(var $=this.clone(),d=new Array(64),M=63;M>=0&&($.div(P),d[M]=$.remainder.toNumber().toString(N),!!$.gt(P));M--);return d[M-1]=$.toNumber().toString(N),d.join("")},L.prototype.add=function(N){var P=this._a00+N._a00,$=P>>>16;$+=this._a16+N._a16;var d=$>>>16;d+=this._a32+N._a32;var M=d>>>16;return M+=this._a48+N._a48,this._a00=P&65535,this._a16=$&65535,this._a32=d&65535,this._a48=M&65535,this},L.prototype.subtract=function(N){return this.add(N.clone().negate())},L.prototype.multiply=function(N){var P=this._a00,$=this._a16,d=this._a32,M=this._a48,U=N._a00,J=N._a16,G=N._a32,Y=N._a48,ee=P*U,q=ee>>>16;q+=P*J;var oe=q>>>16;q&=65535,q+=$*U,oe+=q>>>16,oe+=P*G;var ne=oe>>>16;return oe&=65535,oe+=$*J,ne+=oe>>>16,oe&=65535,oe+=d*U,ne+=oe>>>16,ne+=P*Y,ne&=65535,ne+=$*G,ne&=65535,ne+=d*J,ne&=65535,ne+=M*U,this._a00=ee&65535,this._a16=q&65535,this._a32=oe&65535,this._a48=ne&65535,this},L.prototype.div=function(N){if(N._a16==0&&N._a32==0&&N._a48==0){if(N._a00==0)throw Error("division by zero");if(N._a00==1)return this.remainder=new L(0),this}if(N.gt(this))return this.remainder=this.clone(),this._a00=0,this._a16=0,this._a32=0,this._a48=0,this;if(this.eq(N))return this.remainder=new L(0),this._a00=1,this._a16=0,this._a32=0,this._a48=0,this;for(var P=N.clone(),$=-1;!this.lt(P);)P.shiftLeft(1,!0),$++;for(this.remainder=this.clone(),this._a00=0,this._a16=0,this._a32=0,this._a48=0;$>=0;$--)P.shiftRight(1),this.remainder.lt(P)||(this.remainder.subtract(P),$>=48?this._a48|=1<<$-48:$>=32?this._a32|=1<<$-32:$>=16?this._a16|=1<<$-16:this._a00|=1<<$);return this},L.prototype.negate=function(){var N=(~this._a00&65535)+1;return this._a00=N&65535,N=(~this._a16&65535)+(N>>>16),this._a16=N&65535,N=(~this._a32&65535)+(N>>>16),this._a32=N&65535,this._a48=~this._a48+(N>>>16)&65535,this},L.prototype.equals=L.prototype.eq=function(N){return this._a48==N._a48&&this._a00==N._a00&&this._a32==N._a32&&this._a16==N._a16},L.prototype.greaterThan=L.prototype.gt=function(N){return this._a48>N._a48?!0:this._a48<N._a48?!1:this._a32>N._a32?!0:this._a32<N._a32?!1:this._a16>N._a16?!0:this._a16<N._a16?!1:this._a00>N._a00},L.prototype.lessThan=L.prototype.lt=function(N){return this._a48<N._a48?!0:this._a48>N._a48?!1:this._a32<N._a32?!0:this._a32>N._a32?!1:this._a16<N._a16?!0:this._a16>N._a16?!1:this._a00<N._a00},L.prototype.or=function(N){return this._a00|=N._a00,this._a16|=N._a16,this._a32|=N._a32,this._a48|=N._a48,this},L.prototype.and=function(N){return this._a00&=N._a00,this._a16&=N._a16,this._a32&=N._a32,this._a48&=N._a48,this},L.prototype.xor=function(N){return this._a00^=N._a00,this._a16^=N._a16,this._a32^=N._a32,this._a48^=N._a48,this},L.prototype.not=function(){return this._a00=~this._a00&65535,this._a16=~this._a16&65535,this._a32=~this._a32&65535,this._a48=~this._a48&65535,this},L.prototype.shiftRight=L.prototype.shiftr=function(N){return N%=64,N>=48?(this._a00=this._a48>>N-48,this._a16=0,this._a32=0,this._a48=0):N>=32?(N-=32,this._a00=(this._a32>>N|this._a48<<16-N)&65535,this._a16=this._a48>>N&65535,this._a32=0,this._a48=0):N>=16?(N-=16,this._a00=(this._a16>>N|this._a32<<16-N)&65535,this._a16=(this._a32>>N|this._a48<<16-N)&65535,this._a32=this._a48>>N&65535,this._a48=0):(this._a00=(this._a00>>N|this._a16<<16-N)&65535,this._a16=(this._a16>>N|this._a32<<16-N)&65535,this._a32=(this._a32>>N|this._a48<<16-N)&65535,this._a48=this._a48>>N&65535),this},L.prototype.shiftLeft=L.prototype.shiftl=function(N,P){return N%=64,N>=48?(this._a48=this._a00<<N-48,this._a32=0,this._a16=0,this._a00=0):N>=32?(N-=32,this._a48=this._a16<<N|this._a00>>16-N,this._a32=this._a00<<N&65535,this._a16=0,this._a00=0):N>=16?(N-=16,this._a48=this._a32<<N|this._a16>>16-N,this._a32=(this._a16<<N|this._a00>>16-N)&65535,this._a16=this._a00<<N&65535,this._a00=0):(this._a48=this._a48<<N|this._a32>>16-N,this._a32=(this._a32<<N|this._a16>>16-N)&65535,this._a16=(this._a16<<N|this._a00>>16-N)&65535,this._a00=this._a00<<N&65535),P||(this._a48&=65535),this},L.prototype.rotateLeft=L.prototype.rotl=function(N){if(N%=64,N==0)return this;if(N>=32){var P=this._a00;if(this._a00=this._a32,this._a32=P,P=this._a48,this._a48=this._a16,this._a16=P,N==32)return this;N-=32}var $=this._a48<<16|this._a32,d=this._a16<<16|this._a00,M=$<<N|d>>>32-N,U=d<<N|$>>>32-N;return this._a00=U&65535,this._a16=U>>>16,this._a32=M&65535,this._a48=M>>>16,this},L.prototype.rotateRight=L.prototype.rotr=function(N){if(N%=64,N==0)return this;if(N>=32){var P=this._a00;if(this._a00=this._a32,this._a32=P,P=this._a48,this._a48=this._a16,this._a16=P,N==32)return this;N-=32}var $=this._a48<<16|this._a32,d=this._a16<<16|this._a00,M=$>>>N|d<<32-N,U=d>>>N|$<<32-N;return this._a00=U&65535,this._a16=U>>>16,this._a32=M&65535,this._a48=M>>>16,this},L.prototype.clone=function(){return new L(this._a00,this._a16,this._a32,this._a48)},c=[],v=(function(){return L}).apply(f,c),v!==void 0&&(T.exports=v)})()},7176:function(T,f,c){var v=c(3126),C=c(5795),w;try{w=[].__proto__===Array.prototype}catch(F){if(!F||typeof F!="object"||!("code"in F)||F.code!=="ERR_PROTO_ACCESS")throw F}var I=!!w&&C&&C(Object.prototype,"__proto__"),L=Object,z=L.getPrototypeOf;T.exports=I&&typeof I.get=="function"?v([I.get]):typeof z=="function"?function(K){return z(K==null?K:L(K))}:!1},3036:function(T){var f=Object.defineProperty||!1;if(f)try{f({},"a",{value:1})}catch{f=!1}T.exports=f},1237:function(T){T.exports=EvalError},9383:function(T){T.exports=Error},9290:function(T){T.exports=RangeError},9538:function(T){T.exports=ReferenceError},8068:function(T){T.exports=SyntaxError},9675:function(T){T.exports=TypeError},5345:function(T){T.exports=URIError},9612:function(T){T.exports=Object},9353:function(T){var f="Function.prototype.bind called on incompatible ",c=Object.prototype.toString,v=Math.max,C="[object Function]",w=function(F,K){for(var N=[],P=0;P<F.length;P+=1)N[P]=F[P];for(var $=0;$<K.length;$+=1)N[$+F.length]=K[$];return N},I=function(F,K){for(var N=[],P=K,$=0;P<F.length;P+=1,$+=1)N[$]=F[P];return N},L=function(z,F){for(var K="",N=0;N<z.length;N+=1)K+=z[N],N+1<z.length&&(K+=F);return K};T.exports=function(F){var K=this;if(typeof K!="function"||c.apply(K)!==C)throw new TypeError(f+K);for(var N=I(arguments,1),P,$=function(){if(this instanceof P){var G=K.apply(this,w(N,arguments));return Object(G)===G?G:this}return K.apply(F,w(N,arguments))},d=v(0,K.length-N.length),M=[],U=0;U<d;U++)M[U]="$"+U;if(P=Function("binder","return function ("+L(M,",")+"){ return binder.apply(this,arguments); }")($),K.prototype){var J=function(){};J.prototype=K.prototype,P.prototype=new J,J.prototype=null}return P}},6743:function(T,f,c){var v=c(9353);T.exports=Function.prototype.bind||v},453:function(T,f,c){var v,C=c(9612),w=c(9383),I=c(1237),L=c(9290),z=c(9538),F=c(8068),K=c(9675),N=c(5345),P=c(1514),$=c(8968),d=c(6188),M=c(8002),U=c(5880),J=c(414),G=c(3093),Y=Function,ee=function(Kn){try{return Y('"use strict"; return ('+Kn+").constructor;")()}catch{}},q=c(5795),oe=c(3036),ne=function(){throw new K},ae=q?function(){try{return arguments.callee,ne}catch{try{return q(arguments,"callee").get}catch{return ne}}}():ne,xe=c(4039)(),he=c(3628),H=c(1064),we=c(8648),Ae=c(1002),Ie=c(76),He={},nt=typeof Uint8Array>"u"||!he?v:he(Uint8Array),Xe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":xe&&he?he([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":He,"%AsyncGenerator%":He,"%AsyncGeneratorFunction%":He,"%AsyncIteratorPrototype%":He,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":w,"%eval%":eval,"%EvalError%":I,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":Y,"%GeneratorFunction%":He,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":xe&&he?he(he([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!xe||!he?v:he(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":C,"%Object.getOwnPropertyDescriptor%":q,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":L,"%ReferenceError%":z,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!xe||!he?v:he(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":xe&&he?he(""[Symbol.iterator]()):v,"%Symbol%":xe?Symbol:v,"%SyntaxError%":F,"%ThrowTypeError%":ae,"%TypedArray%":nt,"%TypeError%":K,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":N,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet,"%Function.prototype.call%":Ie,"%Function.prototype.apply%":Ae,"%Object.defineProperty%":oe,"%Object.getPrototypeOf%":H,"%Math.abs%":P,"%Math.floor%":$,"%Math.max%":d,"%Math.min%":M,"%Math.pow%":U,"%Math.round%":J,"%Math.sign%":G,"%Reflect.getPrototypeOf%":we};if(he)try{null.error}catch(Kn){var it=he(he(Kn));Xe["%Error.prototype%"]=it}var ht=function Kn($t){var Sn;if($t==="%AsyncFunction%")Sn=ee("async function () {}");else if($t==="%GeneratorFunction%")Sn=ee("function* () {}");else if($t==="%AsyncGeneratorFunction%")Sn=ee("async function* () {}");else if($t==="%AsyncGenerator%"){var Rn=Kn("%AsyncGeneratorFunction%");Rn&&(Sn=Rn.prototype)}else if($t==="%AsyncIteratorPrototype%"){var Ye=Kn("%AsyncGenerator%");Ye&&he&&(Sn=he(Ye.prototype))}return Xe[$t]=Sn,Sn},Re={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Qe=c(6743),st=c(9957),Xt=Qe.call(Ie,Array.prototype.concat),Gt=Qe.call(Ae,Array.prototype.splice),gn=Qe.call(Ie,String.prototype.replace),ut=Qe.call(Ie,String.prototype.slice),In=Qe.call(Ie,RegExp.prototype.exec),Fn=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,hr=/\\(\\)?/g,wr=function($t){var Sn=ut($t,0,1),Rn=ut($t,-1);if(Sn==="%"&&Rn!=="%")throw new F("invalid intrinsic syntax, expected closing `%`");if(Rn==="%"&&Sn!=="%")throw new F("invalid intrinsic syntax, expected opening `%`");var Ye=[];return gn($t,Fn,function(Tt,Et,Dn,nr){Ye[Ye.length]=Dn?gn(nr,hr,"$1"):Et||Tt}),Ye},pr=function($t,Sn){var Rn=$t,Ye;if(st(Re,Rn)&&(Ye=Re[Rn],Rn="%"+Ye[0]+"%"),st(Xe,Rn)){var Tt=Xe[Rn];if(Tt===He&&(Tt=ht(Rn)),typeof Tt>"u"&&!Sn)throw new K("intrinsic "+$t+" exists, but is not available. Please file an issue!");return{alias:Ye,name:Rn,value:Tt}}throw new F("intrinsic "+$t+" does not exist!")};T.exports=function($t,Sn){if(typeof $t!="string"||$t.length===0)throw new K("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Sn!="boolean")throw new K('"allowMissing" argument must be a boolean');if(In(/^%?[^%]*%?$/,$t)===null)throw new F("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Rn=wr($t),Ye=Rn.length>0?Rn[0]:"",Tt=pr("%"+Ye+"%",Sn),Et=Tt.name,Dn=Tt.value,nr=!1,Lr=Tt.alias;Lr&&(Ye=Lr[0],Gt(Rn,Xt([0,1],Lr)));for(var ei=1,Kt=!0;ei<Rn.length;ei+=1){var ct=Rn[ei],Nn=ut(ct,0,1),at=ut(ct,-1);if((Nn==='"'||Nn==="'"||Nn==="`"||at==='"'||at==="'"||at==="`")&&Nn!==at)throw new F("property names with quotes must have matching quotes");if((ct==="constructor"||!Kt)&&(nr=!0),Ye+="."+ct,Et="%"+Ye+"%",st(Xe,Et))Dn=Xe[Et];else if(Dn!=null){if(!(ct in Dn)){if(!Sn)throw new K("base intrinsic for "+$t+" exists, but the property is not available.");return}if(q&&ei+1>=Rn.length){var Vt=q(Dn,ct);Kt=!!Vt,Kt&&"get"in Vt&&!("originalValue"in Vt.get)?Dn=Vt.get:Dn=Dn[ct]}else Kt=st(Dn,ct),Dn=Dn[ct];Kt&&!nr&&(Xe[Et]=Dn)}}return Dn}},1064:function(T,f,c){var v=c(9612);T.exports=v.getPrototypeOf||null},8648:function(T){T.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null},3628:function(T,f,c){var v=c(8648),C=c(1064),w=c(7176);T.exports=v?function(L){return v(L)}:C?function(L){if(!L||typeof L!="object"&&typeof L!="function")throw new TypeError("getProto: not an object");return C(L)}:w?function(L){return w(L)}:null},6549:function(T){T.exports=Object.getOwnPropertyDescriptor},5795:function(T,f,c){var v=c(6549);if(v)try{v([],"length")}catch{v=null}T.exports=v},4039:function(T,f,c){var v=typeof Symbol<"u"&&Symbol,C=c(1333);T.exports=function(){return typeof v!="function"||typeof Symbol!="function"||typeof v("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:C()}},1333:function(T){T.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var c={},v=Symbol("test"),C=Object(v);if(typeof v=="string"||Object.prototype.toString.call(v)!=="[object Symbol]"||Object.prototype.toString.call(C)!=="[object Symbol]")return!1;var w=42;c[v]=w;for(var I in c)return!1;if(typeof Object.keys=="function"&&Object.keys(c).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(c).length!==0)return!1;var L=Object.getOwnPropertySymbols(c);if(L.length!==1||L[0]!==v||!Object.prototype.propertyIsEnumerable.call(c,v))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var z=Object.getOwnPropertyDescriptor(c,v);if(z.value!==w||z.enumerable!==!0)return!1}return!0}},9957:function(T,f,c){var v=Function.prototype.call,C=Object.prototype.hasOwnProperty,w=c(6743);T.exports=w.call(v,C)},1514:function(T){T.exports=Math.abs},8968:function(T){T.exports=Math.floor},4459:function(T){T.exports=Number.isNaN||function(c){return c!==c}},6188:function(T){T.exports=Math.max},8002:function(T){T.exports=Math.min},5880:function(T){T.exports=Math.pow},414:function(T){T.exports=Math.round},3093:function(T,f,c){var v=c(4459);T.exports=function(w){return v(w)||w===0?w:w<0?-1:1}},6769:function(T,f,c){T.exports=c(187)},187:function(T,f){(function(c,v){var C={version:"3.0.1",x86:{},x64:{}};function w(d,M){return(d&65535)*M+(((d>>>16)*M&65535)<<16)}function I(d,M){return d<<M|d>>>32-M}function L(d){return d^=d>>>16,d=w(d,2246822507),d^=d>>>13,d=w(d,3266489909),d^=d>>>16,d}function z(d,M){d=[d[0]>>>16,d[0]&65535,d[1]>>>16,d[1]&65535],M=[M[0]>>>16,M[0]&65535,M[1]>>>16,M[1]&65535];var U=[0,0,0,0];return U[3]+=d[3]+M[3],U[2]+=U[3]>>>16,U[3]&=65535,U[2]+=d[2]+M[2],U[1]+=U[2]>>>16,U[2]&=65535,U[1]+=d[1]+M[1],U[0]+=U[1]>>>16,U[1]&=65535,U[0]+=d[0]+M[0],U[0]&=65535,[U[0]<<16|U[1],U[2]<<16|U[3]]}function F(d,M){d=[d[0]>>>16,d[0]&65535,d[1]>>>16,d[1]&65535],M=[M[0]>>>16,M[0]&65535,M[1]>>>16,M[1]&65535];var U=[0,0,0,0];return U[3]+=d[3]*M[3],U[2]+=U[3]>>>16,U[3]&=65535,U[2]+=d[2]*M[3],U[1]+=U[2]>>>16,U[2]&=65535,U[2]+=d[3]*M[2],U[1]+=U[2]>>>16,U[2]&=65535,U[1]+=d[1]*M[3],U[0]+=U[1]>>>16,U[1]&=65535,U[1]+=d[2]*M[2],U[0]+=U[1]>>>16,U[1]&=65535,U[1]+=d[3]*M[1],U[0]+=U[1]>>>16,U[1]&=65535,U[0]+=d[0]*M[3]+d[1]*M[2]+d[2]*M[1]+d[3]*M[0],U[0]&=65535,[U[0]<<16|U[1],U[2]<<16|U[3]]}function K(d,M){return M%=64,M===32?[d[1],d[0]]:M<32?[d[0]<<M|d[1]>>>32-M,d[1]<<M|d[0]>>>32-M]:(M-=32,[d[1]<<M|d[0]>>>32-M,d[0]<<M|d[1]>>>32-M])}function N(d,M){return M%=64,M===0?d:M<32?[d[0]<<M|d[1]>>>32-M,d[1]<<M]:[d[1]<<M-32,0]}function P(d,M){return[d[0]^M[0],d[1]^M[1]]}function $(d){return d=P(d,[0,d[0]>>>1]),d=F(d,[4283543511,3981806797]),d=P(d,[0,d[0]>>>1]),d=F(d,[3301882366,444984403]),d=P(d,[0,d[0]>>>1]),d}C.x86.hash32=function(d,M){d=d||"",M=M||0;for(var U=d.length%4,J=d.length-U,G=M,Y=0,ee=3432918353,q=461845907,oe=0;oe<J;oe=oe+4)Y=d.charCodeAt(oe)&255|(d.charCodeAt(oe+1)&255)<<8|(d.charCodeAt(oe+2)&255)<<16|(d.charCodeAt(oe+3)&255)<<24,Y=w(Y,ee),Y=I(Y,15),Y=w(Y,q),G^=Y,G=I(G,13),G=w(G,5)+3864292196;switch(Y=0,U){case 3:Y^=(d.charCodeAt(oe+2)&255)<<16;case 2:Y^=(d.charCodeAt(oe+1)&255)<<8;case 1:Y^=d.charCodeAt(oe)&255,Y=w(Y,ee),Y=I(Y,15),Y=w(Y,q),G^=Y}return G^=d.length,G=L(G),G>>>0},C.x86.hash128=function(d,M){d=d||"",M=M||0;for(var U=d.length%16,J=d.length-U,G=M,Y=M,ee=M,q=M,oe=0,ne=0,ae=0,xe=0,he=597399067,H=2869860233,we=951274213,Ae=2716044179,Ie=0;Ie<J;Ie=Ie+16)oe=d.charCodeAt(Ie)&255|(d.charCodeAt(Ie+1)&255)<<8|(d.charCodeAt(Ie+2)&255)<<16|(d.charCodeAt(Ie+3)&255)<<24,ne=d.charCodeAt(Ie+4)&255|(d.charCodeAt(Ie+5)&255)<<8|(d.charCodeAt(Ie+6)&255)<<16|(d.charCodeAt(Ie+7)&255)<<24,ae=d.charCodeAt(Ie+8)&255|(d.charCodeAt(Ie+9)&255)<<8|(d.charCodeAt(Ie+10)&255)<<16|(d.charCodeAt(Ie+11)&255)<<24,xe=d.charCodeAt(Ie+12)&255|(d.charCodeAt(Ie+13)&255)<<8|(d.charCodeAt(Ie+14)&255)<<16|(d.charCodeAt(Ie+15)&255)<<24,oe=w(oe,he),oe=I(oe,15),oe=w(oe,H),G^=oe,G=I(G,19),G+=Y,G=w(G,5)+1444728091,ne=w(ne,H),ne=I(ne,16),ne=w(ne,we),Y^=ne,Y=I(Y,17),Y+=ee,Y=w(Y,5)+197830471,ae=w(ae,we),ae=I(ae,17),ae=w(ae,Ae),ee^=ae,ee=I(ee,15),ee+=q,ee=w(ee,5)+2530024501,xe=w(xe,Ae),xe=I(xe,18),xe=w(xe,he),q^=xe,q=I(q,13),q+=G,q=w(q,5)+850148119;switch(oe=0,ne=0,ae=0,xe=0,U){case 15:xe^=d.charCodeAt(Ie+14)<<16;case 14:xe^=d.charCodeAt(Ie+13)<<8;case 13:xe^=d.charCodeAt(Ie+12),xe=w(xe,Ae),xe=I(xe,18),xe=w(xe,he),q^=xe;case 12:ae^=d.charCodeAt(Ie+11)<<24;case 11:ae^=d.charCodeAt(Ie+10)<<16;case 10:ae^=d.charCodeAt(Ie+9)<<8;case 9:ae^=d.charCodeAt(Ie+8),ae=w(ae,we),ae=I(ae,17),ae=w(ae,Ae),ee^=ae;case 8:ne^=d.charCodeAt(Ie+7)<<24;case 7:ne^=d.charCodeAt(Ie+6)<<16;case 6:ne^=d.charCodeAt(Ie+5)<<8;case 5:ne^=d.charCodeAt(Ie+4),ne=w(ne,H),ne=I(ne,16),ne=w(ne,we),Y^=ne;case 4:oe^=d.charCodeAt(Ie+3)<<24;case 3:oe^=d.charCodeAt(Ie+2)<<16;case 2:oe^=d.charCodeAt(Ie+1)<<8;case 1:oe^=d.charCodeAt(Ie),oe=w(oe,he),oe=I(oe,15),oe=w(oe,H),G^=oe}return G^=d.length,Y^=d.length,ee^=d.length,q^=d.length,G+=Y,G+=ee,G+=q,Y+=G,ee+=G,q+=G,G=L(G),Y=L(Y),ee=L(ee),q=L(q),G+=Y,G+=ee,G+=q,Y+=G,ee+=G,q+=G,("00000000"+(G>>>0).toString(16)).slice(-8)+("00000000"+(Y>>>0).toString(16)).slice(-8)+("00000000"+(ee>>>0).toString(16)).slice(-8)+("00000000"+(q>>>0).toString(16)).slice(-8)},C.x64.hash128=function(d,M){d=d||"",M=M||0;for(var U=d.length%16,J=d.length-U,G=[0,M],Y=[0,M],ee=[0,0],q=[0,0],oe=[2277735313,289559509],ne=[1291169091,658871167],ae=0;ae<J;ae=ae+16)ee=[d.charCodeAt(ae+4)&255|(d.charCodeAt(ae+5)&255)<<8|(d.charCodeAt(ae+6)&255)<<16|(d.charCodeAt(ae+7)&255)<<24,d.charCodeAt(ae)&255|(d.charCodeAt(ae+1)&255)<<8|(d.charCodeAt(ae+2)&255)<<16|(d.charCodeAt(ae+3)&255)<<24],q=[d.charCodeAt(ae+12)&255|(d.charCodeAt(ae+13)&255)<<8|(d.charCodeAt(ae+14)&255)<<16|(d.charCodeAt(ae+15)&255)<<24,d.charCodeAt(ae+8)&255|(d.charCodeAt(ae+9)&255)<<8|(d.charCodeAt(ae+10)&255)<<16|(d.charCodeAt(ae+11)&255)<<24],ee=F(ee,oe),ee=K(ee,31),ee=F(ee,ne),G=P(G,ee),G=K(G,27),G=z(G,Y),G=z(F(G,[0,5]),[0,1390208809]),q=F(q,ne),q=K(q,33),q=F(q,oe),Y=P(Y,q),Y=K(Y,31),Y=z(Y,G),Y=z(F(Y,[0,5]),[0,944331445]);switch(ee=[0,0],q=[0,0],U){case 15:q=P(q,N([0,d.charCodeAt(ae+14)],48));case 14:q=P(q,N([0,d.charCodeAt(ae+13)],40));case 13:q=P(q,N([0,d.charCodeAt(ae+12)],32));case 12:q=P(q,N([0,d.charCodeAt(ae+11)],24));case 11:q=P(q,N([0,d.charCodeAt(ae+10)],16));case 10:q=P(q,N([0,d.charCodeAt(ae+9)],8));case 9:q=P(q,[0,d.charCodeAt(ae+8)]),q=F(q,ne),q=K(q,33),q=F(q,oe),Y=P(Y,q);case 8:ee=P(ee,N([0,d.charCodeAt(ae+7)],56));case 7:ee=P(ee,N([0,d.charCodeAt(ae+6)],48));case 6:ee=P(ee,N([0,d.charCodeAt(ae+5)],40));case 5:ee=P(ee,N([0,d.charCodeAt(ae+4)],32));case 4:ee=P(ee,N([0,d.charCodeAt(ae+3)],24));case 3:ee=P(ee,N([0,d.charCodeAt(ae+2)],16));case 2:ee=P(ee,N([0,d.charCodeAt(ae+1)],8));case 1:ee=P(ee,[0,d.charCodeAt(ae)]),ee=F(ee,oe),ee=K(ee,31),ee=F(ee,ne),G=P(G,ee)}return G=P(G,[0,d.length]),Y=P(Y,[0,d.length]),G=z(G,Y),Y=z(Y,G),G=$(G),Y=$(Y),G=z(G,Y),Y=z(Y,G),("00000000"+(G[0]>>>0).toString(16)).slice(-8)+("00000000"+(G[1]>>>0).toString(16)).slice(-8)+("00000000"+(Y[0]>>>0).toString(16)).slice(-8)+("00000000"+(Y[1]>>>0).toString(16)).slice(-8)},T.exports&&(f=T.exports=C),f.murmurHash3=C})()},8859:function(T,f,c){var v=typeof Map=="function"&&Map.prototype,C=Object.getOwnPropertyDescriptor&&v?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,w=v&&C&&typeof C.get=="function"?C.get:null,I=v&&Map.prototype.forEach,L=typeof Set=="function"&&Set.prototype,z=Object.getOwnPropertyDescriptor&&L?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,F=L&&z&&typeof z.get=="function"?z.get:null,K=L&&Set.prototype.forEach,N=typeof WeakMap=="function"&&WeakMap.prototype,P=N?WeakMap.prototype.has:null,$=typeof WeakSet=="function"&&WeakSet.prototype,d=$?WeakSet.prototype.has:null,M=typeof WeakRef=="function"&&WeakRef.prototype,U=M?WeakRef.prototype.deref:null,J=Boolean.prototype.valueOf,G=Object.prototype.toString,Y=Function.prototype.toString,ee=String.prototype.match,q=String.prototype.slice,oe=String.prototype.replace,ne=String.prototype.toUpperCase,ae=String.prototype.toLowerCase,xe=RegExp.prototype.test,he=Array.prototype.concat,H=Array.prototype.join,we=Array.prototype.slice,Ae=Math.floor,Ie=typeof BigInt=="function"?BigInt.prototype.valueOf:null,He=Object.getOwnPropertySymbols,nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Xe=typeof Symbol=="function"&&typeof Symbol.iterator=="object",it=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Xe||!0)?Symbol.toStringTag:null,ht=Object.prototype.propertyIsEnumerable,Re=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(Pe){return Pe.__proto__}:null);function Qe(Pe,Ne){if(Pe===1/0||Pe===-1/0||Pe!==Pe||Pe&&Pe>-1e3&&Pe<1e3||xe.call(/e/,Ne))return Ne;var Cn=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof Pe=="number"){var Bn=Pe<0?-Ae(-Pe):Ae(Pe);if(Bn!==Pe){var Jn=String(Bn),mn=q.call(Ne,Jn.length+1);return oe.call(Jn,Cn,"$&_")+"."+oe.call(oe.call(mn,/([0-9]{3})/g,"$&_"),/_$/,"")}}return oe.call(Ne,Cn,"$&_")}var st=c(2634),Xt=st.custom,Gt=Ye(Xt)?Xt:null,gn={__proto__:null,double:'"',single:"'"},ut={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};T.exports=function Pe(Ne,Cn,Bn,Jn){var mn=Cn||{};if(Dn(mn,"quoteStyle")&&!Dn(gn,mn.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Dn(mn,"maxStringLength")&&(typeof mn.maxStringLength=="number"?mn.maxStringLength<0&&mn.maxStringLength!==1/0:mn.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var oo=Dn(mn,"customInspect")?mn.customInspect:!0;if(typeof oo!="boolean"&&oo!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Dn(mn,"indent")&&mn.indent!==null&&mn.indent!==" "&&!(parseInt(mn.indent,10)===mn.indent&&mn.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Dn(mn,"numericSeparator")&&typeof mn.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var So=mn.numericSeparator;if(typeof Ne>"u")return"undefined";if(Ne===null)return"null";if(typeof Ne=="boolean")return Ne?"true":"false";if(typeof Ne=="string")return lt(Ne,mn);if(typeof Ne=="number"){if(Ne===0)return 1/0/Ne>0?"0":"-0";var rr=String(Ne);return So?Qe(Ne,rr):rr}if(typeof Ne=="bigint"){var Mr=String(Ne)+"n";return So?Qe(Ne,Mr):Mr}var To=typeof mn.depth>"u"?5:mn.depth;if(typeof Bn>"u"&&(Bn=0),Bn>=To&&To>0&&typeof Ne=="object")return hr(Ne)?"[Array]":"[Object]";var ti=ln(mn,Bn);if(typeof Jn>"u")Jn=[];else if(ei(Jn,Ne)>=0)return"[Circular]";function Pr(ki,Un,Zi){if(Un&&(Jn=we.call(Jn),Jn.push(Un)),Zi){var fi={depth:mn.depth};return Dn(mn,"quoteStyle")&&(fi.quoteStyle=mn.quoteStyle),Pe(ki,fi,Bn+1,Jn)}return Pe(ki,mn,Bn+1,Jn)}if(typeof Ne=="function"&&!pr(Ne)){var Wr=Lr(Ne),wt=cn(Ne,Pr);return"[Function"+(Wr?": "+Wr:" (anonymous)")+"]"+(wt.length>0?" { "+H.call(wt,", ")+" }":"")}if(Ye(Ne)){var Qi=Xe?oe.call(String(Ne),/^(Symbol\(.*\))_[^)]*$/,"$1"):nt.call(Ne);return typeof Ne=="object"&&!Xe?Ur(Qi):Qi}if(On(Ne)){for(var gr="<"+ae.call(String(Ne.nodeName)),Ui=Ne.attributes||[],rs=0;rs<Ui.length;rs++)gr+=" "+Ui[rs].name+"="+In(Fn(Ui[rs].value),"double",mn);return gr+=">",Ne.childNodes&&Ne.childNodes.length&&(gr+="..."),gr+="</"+ae.call(String(Ne.nodeName))+">",gr}if(hr(Ne)){if(Ne.length===0)return"[]";var so=cn(Ne,Pr);return ti&&!Ct(so)?"["+tn(so,ti)+"]":"[ "+H.call(so,", ")+" ]"}if(Kn(Ne)){var Bi=cn(Ne,Pr);return!("cause"in Error.prototype)&&"cause"in Ne&&!ht.call(Ne,"cause")?"{ ["+String(Ne)+"] "+H.call(he.call("[cause]: "+Pr(Ne.cause),Bi),", ")+" }":Bi.length===0?"["+String(Ne)+"]":"{ ["+String(Ne)+"] "+H.call(Bi,", ")+" }"}if(typeof Ne=="object"&&oo){if(Gt&&typeof Ne[Gt]=="function"&&st)return st(Ne,{depth:To-Bn});if(oo!=="symbol"&&typeof Ne.inspect=="function")return Ne.inspect()}if(Kt(Ne)){var Ns=[];return I&&I.call(Ne,function(ki,Un){Ns.push(Pr(Un,Ne,!0)+" => "+Pr(ki,Ne))}),Br("Map",w.call(Ne),Ns,ti)}if(at(Ne)){var Eo=[];return K&&K.call(Ne,function(ki){Eo.push(Pr(ki,Ne))}),Br("Set",F.call(Ne),Eo,ti)}if(ct(Ne))return Cr("WeakMap");if(Vt(Ne))return Cr("WeakSet");if(Nn(Ne))return Cr("WeakRef");if(Sn(Ne))return Ur(Pr(Number(Ne)));if(Tt(Ne))return Ur(Pr(Ie.call(Ne)));if(Rn(Ne))return Ur(J.call(Ne));if($t(Ne))return Ur(Pr(String(Ne)));if(typeof window<"u"&&Ne===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Ne===globalThis||typeof c.g<"u"&&Ne===c.g)return"{ [object globalThis] }";if(!wr(Ne)&&!pr(Ne)){var xo=cn(Ne,Pr),ys=Re?Re(Ne)===Object.prototype:Ne instanceof Object||Ne.constructor===Object,is=Ne instanceof Object?"":"null prototype",ao=!ys&&it&&Object(Ne)===Ne&&it in Ne?q.call(nr(Ne),8,-1):is?"Object":"",wo=ys||typeof Ne.constructor!="function"?"":Ne.constructor.name?Ne.constructor.name+" ":"",fe=wo+(ao||is?"["+H.call(he.call([],ao||[],is||[]),": ")+"] ":"");return xo.length===0?fe+"{}":ti?fe+"{"+tn(xo,ti)+"}":fe+"{ "+H.call(xo,", ")+" }"}return String(Ne)};function In(Pe,Ne,Cn){var Bn=Cn.quoteStyle||Ne,Jn=gn[Bn];return Jn+Pe+Jn}function Fn(Pe){return oe.call(String(Pe),/"/g,"&quot;")}function hr(Pe){return nr(Pe)==="[object Array]"&&(!it||!(typeof Pe=="object"&&it in Pe))}function wr(Pe){return nr(Pe)==="[object Date]"&&(!it||!(typeof Pe=="object"&&it in Pe))}function pr(Pe){return nr(Pe)==="[object RegExp]"&&(!it||!(typeof Pe=="object"&&it in Pe))}function Kn(Pe){return nr(Pe)==="[object Error]"&&(!it||!(typeof Pe=="object"&&it in Pe))}function $t(Pe){return nr(Pe)==="[object String]"&&(!it||!(typeof Pe=="object"&&it in Pe))}function Sn(Pe){return nr(Pe)==="[object Number]"&&(!it||!(typeof Pe=="object"&&it in Pe))}function Rn(Pe){return nr(Pe)==="[object Boolean]"&&(!it||!(typeof Pe=="object"&&it in Pe))}function Ye(Pe){if(Xe)return Pe&&typeof Pe=="object"&&Pe instanceof Symbol;if(typeof Pe=="symbol")return!0;if(!Pe||typeof Pe!="object"||!nt)return!1;try{return nt.call(Pe),!0}catch{}return!1}function Tt(Pe){if(!Pe||typeof Pe!="object"||!Ie)return!1;try{return Ie.call(Pe),!0}catch{}return!1}var Et=Object.prototype.hasOwnProperty||function(Pe){return Pe in this};function Dn(Pe,Ne){return Et.call(Pe,Ne)}function nr(Pe){return G.call(Pe)}function Lr(Pe){if(Pe.name)return Pe.name;var Ne=ee.call(Y.call(Pe),/^function\s*([\w$]+)/);return Ne?Ne[1]:null}function ei(Pe,Ne){if(Pe.indexOf)return Pe.indexOf(Ne);for(var Cn=0,Bn=Pe.length;Cn<Bn;Cn++)if(Pe[Cn]===Ne)return Cn;return-1}function Kt(Pe){if(!w||!Pe||typeof Pe!="object")return!1;try{w.call(Pe);try{F.call(Pe)}catch{return!0}return Pe instanceof Map}catch{}return!1}function ct(Pe){if(!P||!Pe||typeof Pe!="object")return!1;try{P.call(Pe,P);try{d.call(Pe,d)}catch{return!0}return Pe instanceof WeakMap}catch{}return!1}function Nn(Pe){if(!U||!Pe||typeof Pe!="object")return!1;try{return U.call(Pe),!0}catch{}return!1}function at(Pe){if(!F||!Pe||typeof Pe!="object")return!1;try{F.call(Pe);try{w.call(Pe)}catch{return!0}return Pe instanceof Set}catch{}return!1}function Vt(Pe){if(!d||!Pe||typeof Pe!="object")return!1;try{d.call(Pe,d);try{P.call(Pe,P)}catch{return!0}return Pe instanceof WeakSet}catch{}return!1}function On(Pe){return!Pe||typeof Pe!="object"?!1:typeof HTMLElement<"u"&&Pe instanceof HTMLElement?!0:typeof Pe.nodeName=="string"&&typeof Pe.getAttribute=="function"}function lt(Pe,Ne){if(Pe.length>Ne.maxStringLength){var Cn=Pe.length-Ne.maxStringLength,Bn="... "+Cn+" more character"+(Cn>1?"s":"");return lt(q.call(Pe,0,Ne.maxStringLength),Ne)+Bn}var Jn=ut[Ne.quoteStyle||"single"];Jn.lastIndex=0;var mn=oe.call(oe.call(Pe,Jn,"\\$1"),/[\x00-\x1f]/g,un);return In(mn,"single",Ne)}function un(Pe){var Ne=Pe.charCodeAt(0),Cn={8:"b",9:"t",10:"n",12:"f",13:"r"}[Ne];return Cn?"\\"+Cn:"\\x"+(Ne<16?"0":"")+ne.call(Ne.toString(16))}function Ur(Pe){return"Object("+Pe+")"}function Cr(Pe){return Pe+" { ? }"}function Br(Pe,Ne,Cn,Bn){var Jn=Bn?tn(Cn,Bn):H.call(Cn,", ");return Pe+" ("+Ne+") {"+Jn+"}"}function Ct(Pe){for(var Ne=0;Ne<Pe.length;Ne++)if(ei(Pe[Ne],`
115
+ `)>=0)return!1;return!0}function ln(Pe,Ne){var Cn;if(Pe.indent===" ")Cn=" ";else if(typeof Pe.indent=="number"&&Pe.indent>0)Cn=H.call(Array(Pe.indent+1)," ");else return null;return{base:Cn,prev:H.call(Array(Ne+1),Cn)}}function tn(Pe,Ne){if(Pe.length===0)return"";var Cn=`
116
+ `+Ne.prev+Ne.base;return Cn+H.call(Pe,","+Cn)+`
117
+ `+Ne.prev}function cn(Pe,Ne){var Cn=hr(Pe),Bn=[];if(Cn){Bn.length=Pe.length;for(var Jn=0;Jn<Pe.length;Jn++)Bn[Jn]=Dn(Pe,Jn)?Ne(Pe[Jn],Pe):""}var mn=typeof He=="function"?He(Pe):[],oo;if(Xe){oo={};for(var So=0;So<mn.length;So++)oo["$"+mn[So]]=mn[So]}for(var rr in Pe)Dn(Pe,rr)&&(Cn&&String(Number(rr))===rr&&rr<Pe.length||Xe&&oo["$"+rr]instanceof Symbol||(xe.call(/[^\w$]/,rr)?Bn.push(Ne(rr,Pe)+": "+Ne(Pe[rr],Pe)):Bn.push(rr+": "+Ne(Pe[rr],Pe))));if(typeof He=="function")for(var Mr=0;Mr<mn.length;Mr++)ht.call(Pe,mn[Mr])&&Bn.push("["+Ne(mn[Mr])+"]: "+Ne(Pe[mn[Mr]],Pe));return Bn}},4569:function(T,f){(function(c,v){v(f)})(this,function(c){var v={site:"",collectDomain:"",path:"event",visitorStorageMode:"fixed",storageLifetimeVisitor:395,storageLifetimeUser:395,storageLifetimePrivacy:395,privacyDefaultMode:"optin",sendEventWhenOptout:!0,isVisitorClientSide:!0,enableCallbacks:!0,cookieDomain:"",cookieSecure:!0,cookiePath:"/",cookieSameSite:"lax",encodeStorageBase64:!1,addEventURL:"withoutQS",clickAutoManagement:!0,enableUTMTracking:!0,campaignPrefix:["at_"],storageVisitor:"pa_vid",storageUser:"pa_user",version:"6.12.2",minHeartbeat:5,minBufferingHeartbeat:1,queueVarName:"_paq",globalVarName:"pa",enableAutomaticPageRefresh:!0,allowHighEntropyClientHints:!0,sendEmptyProperties:!0,privacy:{storageKey:"pa_privacy",legacyKeys:{pa_vid:!0,pa_privacy:!0,atuserid:!0},storageKeys:{pa_user:!0},modes:{optin:{name:"optin",properties:{include:{visitor_privacy_consent:!0,visitor_privacy_mode:"optin"},allowed:{"*":{"*":!0}},forbidden:{"*":{}}},storage:{allowed:{"*":!0},forbidden:{}},events:{allowed:{"*":!0},forbidden:{}}},optout:{name:"optout",visitorId:"OPT-OUT",properties:{include:{visitor_privacy_consent:!1,visitor_privacy_mode:"optout"},allowed:{"*":{}},forbidden:{"*":{}}},storage:{allowed:{pa_vid:!0,pa_privacy:!0},forbidden:{}},events:{allowed:{"*":!0},forbidden:{}}},"no-consent":{name:"no-consent",visitorId:"no-consent",properties:{include:{visitor_privacy_consent:!1,visitor_privacy_mode:"no-consent"},allowed:{"*":{}},forbidden:{"*":{}}},storage:{allowed:{},forbidden:{"*":!0}},events:{allowed:{"*":!0},forbidden:{}}},"no-storage":{name:"no-storage",visitorId:"no-storage",properties:{include:{visitor_privacy_consent:!1,visitor_privacy_mode:"no-storage"},allowed:{"*":{"*":!0}},forbidden:{"*":{}}},storage:{allowed:{},forbidden:{"*":!0}},events:{allowed:{"*":!0},forbidden:{}}},exempt:{name:"exempt",properties:{include:{visitor_privacy_consent:!1,visitor_privacy_mode:"exempt"},allowed:{"*":{app_crash:!0,app_crash_class:!0,app_crash_screen:!0,app_version:!0,browser:!0,browser_cookie_acceptance:!0,browser_group:!0,browser_version:!0,click:!0,click_chapter1:!0,click_chapter2:!0,click_chapter3:!0,click_full_name:!0,connection_monitor:!0,connection_organisation:!0,cookie_creation_date:!0,date:!0,date_day:!0,date_daynumber:!0,date_month:!0,date_monthnumber:!0,date_week:!0,date_year:!0,date_yearofweek:!0,device_brand:!0,device_display_height:!0,device_display_width:!0,device_name:!0,device_name_tech:!0,device_screen_diagonal:!0,device_screen_height:!0,device_screen_width:!0,device_type:!0,event_collection_platform:!0,event_collection_version:!0,event_hour:!0,event_id:!0,event_minute:!0,event_position:!0,event_second:!0,event_time:!0,event_time_utc:!0,event_url:!0,event_url_domain:!0,event_url_full:!0,exclusion_cause:!0,exclusion_type:!0,geo_city:!0,geo_continent:!0,geo_country:!0,geo_metro:!0,geo_region:!0,goal_type:!0,hit_time_utc:!0,os:!0,os_group:!0,os_version:!0,os_version_name:!0,page:!0,page_chapter1:!0,page_chapter2:!0,page_chapter3:!0,page_duration:!0,page_full_name:!0,page_position:!0,page_title_html:!0,page_url:!0,pageview_id:!0,previous_url:!0,privacy_status:!0,site:!0,site_env:!0,site_id:!0,site_platform:!0,src:!0,src_detail:!0,src_direct_access:!0,src_organic:!0,src_organic_detail:!0,src_portal_domain:!0,src_portal_site:!0,src_portal_site_id:!0,src_portal_url:!0,src_referrer_site_domain:!0,src_referrer_site_url:!0,src_referrer_url:!0,src_se:!0,src_se_category:!0,src_se_country:!0,src_type:!0,src_url:!0,src_url_domain:!0,src_webmail:!0}},forbidden:{"*":{}}},storage:{allowed:{pa_vid:!0,pa_privacy:!0,atuserid:!0},forbidden:{}},events:{allowed:{"click.exit":!0,"click.navigation":!0,"click.download":!0,"click.action":!0,"page.display":!0},forbidden:{}}},"*":{properties:{allowed:{"*":{connection_type:!0,device_timestamp_utc:!0,visitor_privacy_consent:!0,visitor_privacy_mode:!0,"ch_ua*":!0}},forbidden:{"*":{}}},storage:{allowed:{},forbidden:{}},events:{allowed:{},forbidden:{}}}}}};function C(y){return(C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x})(y)}function w(y,x){(x==null||x>y.length)&&(x=y.length);for(var O=0,_=new Array(x);O<x;O++)_[O]=y[O];return _}function I(y,x){var O,_,X,se,me=typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(me)return _=!(O=!0),{s:function(){me=me.call(y)},n:function(){var Oe=me.next();return O=Oe.done,Oe},e:function(Oe){_=!0,X=Oe},f:function(){try{O||me.return==null||me.return()}finally{if(_)throw X}}};if(Array.isArray(y)||(me=function(Oe,Ue){var Ke;if(Oe)return typeof Oe=="string"?w(Oe,Ue):(Ke=(Ke=Object.prototype.toString.call(Oe).slice(8,-1))==="Object"&&Oe.constructor?Oe.constructor.name:Ke)==="Map"||Ke==="Set"?Array.from(Oe):Ke==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ke)?w(Oe,Ue):void 0}(y))||x&&y&&typeof y.length=="number")return me&&(y=me),se=0,{s:x=function(){},n:function(){return se>=y.length?{done:!0}:{done:!1,value:y[se++]}},e:function(Oe){throw Oe},f:x};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
118
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var L=function y(x,O){if(C(x)!=="object"||x===null||x instanceof Date)return x;var _,X=new x.constructor;for(_ in x)!Object.prototype.hasOwnProperty.call(x,_)||_===void 0||O||(X[_]=y(x[_]));return X},z,F={post:function(y,x){var O=!1;!(O=window.navigator&&typeof window.navigator.sendBeacon=="function"?window.navigator.sendBeacon(y,x):O)&&window.fetch&&window.fetch(y,{method:"POST",body:x,headers:{"Content-Type":"text/plain;charset=UTF-8"}})}},K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",N={utf8:{encode:function(y){y=y.replace(/\r\n/g,`
119
+ `);for(var x="",O=0;O<y.length;O++){var _=y.charCodeAt(O);_<128?x+=String.fromCharCode(_):x=127<_&&_<2048?(x+=String.fromCharCode(_>>6|192))+String.fromCharCode(63&_|128):(x=(x+=String.fromCharCode(_>>12|224))+String.fromCharCode(_>>6&63|128))+String.fromCharCode(63&_|128)}return x},decode:function(y){var x,O,_,X="",se=0;for(x=0;se<y.length;)(_=y.charCodeAt(se))<128?(X+=String.fromCharCode(_),se++):191<_&&_<224?(x=y.charCodeAt(se+1),X+=String.fromCharCode((31&_)<<6|63&x),se+=2):(x=y.charCodeAt(se+1),O=y.charCodeAt(se+2),X+=String.fromCharCode((15&_)<<12|(63&x)<<6|63&O),se+=3);return X}},base64:{encode:function(y){var x,O,_,X,se,me,Oe="",Ue=0;for(y=N.utf8.encode(y);Ue<y.length;)_=(x=y.charCodeAt(Ue++))>>2,X=(3&x)<<4|(x=y.charCodeAt(Ue++))>>4,se=(15&x)<<2|(O=y.charCodeAt(Ue++))>>6,me=63&O,isNaN(x)?se=me=64:isNaN(O)&&(me=64),Oe=Oe+K.charAt(_)+K.charAt(X)+K.charAt(se)+K.charAt(me);return Oe},decode:function(y){var x,O,_,X,se,me,Oe="",Ue=0;for(y=y.replace(/[^A-Za-z0-9\+\/\=]/g,"");Ue<y.length;)_=K.indexOf(y.charAt(Ue++)),x=(15&(X=K.indexOf(y.charAt(Ue++))))<<4|(se=K.indexOf(y.charAt(Ue++)))>>2,O=(3&se)<<6|(me=K.indexOf(y.charAt(Ue++))),Oe+=String.fromCharCode(_<<2|X>>4),se!=64&&(Oe+=String.fromCharCode(x)),me!=64&&(Oe+=String.fromCharCode(O));return Oe=N.utf8.decode(Oe)}}},P=(z=window.crypto||window.msCrypto,{v4:function(){try{if(z!==null&&C(z)==="object")return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,function(y){return(y^z.getRandomValues(new Uint32Array(1))[0]&15>>y/4).toString(16)})}catch(y){console.error(y)}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(y){var x=16*Math.random()|0;return(y==="x"?x:3&x|8).toString(16)})}});function $(y){var x=y;function O(_,X){X!==null&&X!==""&&X!==void 0&&(x[_]=X)}return{setConfiguration:O,setConfigurations:function(_){for(var X in _)Object.prototype.hasOwnProperty.call(_,X)&&O(X,_[X])},getConfiguration:function(_){return x[_]!==void 0?L(x[_]):null},cloneData:function(){return L(x)},deleteProperty:function(_){delete x[_]}}}function d(y){var x=[];return{push:function(O){x.push(O),x.length===1&&y[O[0]].apply(y,O.slice(1))},next:function(){var O;x.shift(),0<x.length&&y[(O=x[0])[0]].apply(y,O.slice(1))}}}function M(y,x,O){this.properties=L(y._properties),this.setProperty=function(_,X,se){y._privacy.call("isPropAllowed",_)&&(this.properties[_]={value:X,options:se||{}})},this.hasProperty=function(_){return Object.prototype.hasOwnProperty.call(this.properties,_)},this.getConfiguration=O.getConfiguration,this.setConfiguration=O.setConfiguration,this.options=x.options||{},this.visitorId=null,this.build={url:"",data:{}},this.events=x.events||[]}function U(y,x,O,_){_!==!1&&0<O.length&&typeof O[0]=="function"?O[0](y,x,O.slice(1)):y._queue.next()}function J(y,x,O){var X=x.getConfiguration("collectDomain"),_=X.startsWith("https://")||X.startsWith("http://")?"":"https://",_="".concat(_).concat(X,"/").concat(x.getConfiguration("path")),X="?s=".concat(x.getConfiguration("site")).concat(x.visitorId?"&idclient="+x.visitorId:"");x.build.url=_+X,x.build.data={events:x.events},U(y,x,O)}function G(y,x,O,_,X){var se,me=function(Ue,Ke,Te){for(var Me={},Be=new RegExp("[&#?]{1}([^&=#?]*)=([^&#]*)?","g"),Fe=Be.exec(Ke);Fe!==null;)Fe[1].indexOf(Ue)===0&&(Me[Te+Fe[1].substring(Ue.length)]=window.decodeURIComponent(Fe[2])),Fe=Be.exec(Ke);return Me}(_,O,X),Oe=!1;for(se in me)Object.prototype.hasOwnProperty.call(me,se)&&!x.properties[se]&&x.setProperty(se,me[se],{persistent:!0}),Oe=!0;return Oe}function Y(y,x,O){var _,X=document.location.href,se=I(x.getConfiguration("campaignPrefix"));try{for(se.s();!(_=se.n()).done&&!G(0,x,X,_.value,"src_"););}catch(me){se.e(me)}finally{se.f()}x.getConfiguration("enableUTMTracking")&&G(0,x,X,"utm_","utm_"),U(y,x,O)}function ee(y){return y.indexOf('"')===0&&(y=y.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")),ne(y)}var q,oe=function(y){function x(X){X&&_.setDate(_.getDate()+X)}var O,_=new Date;return y instanceof Date?_=y:typeof y=="number"?x(y):(O=y.days,y=y.minutes,x(O),y&&_.setMinutes(_.getMinutes()+y)),_},ne=function(y){y=y.replace(/\+/g," ").replace(/^\s+|\s+$/g,"");try{return decodeURIComponent(y)}catch{return y}},ae=(q="_cookie_test",{set:he,get:we,getNames:function(){var y=[];return H(function(x){y.push(x)}),y},remove:Ae,getTopLevelDomain:function(y){y===void 0&&(y=[]);var x=window.location.hostname.split("."),O=new Date().getTime().toString(36)+Math.round(2147483647*Math.random()).toString(36),_=new Date;_.setSeconds(_.getSeconds()+30);for(var X=0;X<x.length;X++)try{var se=x.slice(-(X+1)).join(".");if(!y.includes(se)){he(q,O,{expires:_,path:"/",domain:se});var me=we(q)===O;if(Ae(q,{path:"/",domain:se}),me)return se}}catch{}},__private__:{_generateCookieString:xe}});function xe(y,x,O){var _=(O=O===void 0?{}:O).path,X=O.domain,se=O.expires,me=O.secure,Oe=O.samesite;return((O=O.raw)?y:encodeURIComponent(y))+"="+(O?x:encodeURIComponent(x))+(se?"; expires=".concat(oe(se).toUTCString()):"")+(_?"; path=".concat(_):"")+(X?"; domain=".concat(X):"")+(me?"; secure":"")+(Oe?typeof Oe=="boolean"?"; sameSite":"; sameSite=".concat(Oe):"")}function he(y,x,O,_){x===void 0||_!==void 0&&encodeURI(x).split(/%(?:u[\dA-F]{2})?[\dA-F]{2}|./).length-1>_||(document.cookie=xe(y,x,O))}function H(y){for(var x=document.cookie.split(";"),O=0;O<x.length;O++){var _=x[O].split("=");if(y(ne(_[0]),_[1]||""))return}}function we(y){var x=null,O={};return H(function(_,X){if(y)return _===y&&(x=ee(X),1);O[_]=ee(X)}),y?x:O}function Ae(y,x){he(y,"",Object.assign({},x,{expires:-1}))}Ie="_ls_ttl",He=function(){try{var y=window.localStorage.getItem(Ie);return y?JSON.parse(y):null}catch{return null}},nt=function(y){try{Object.keys(y).length?window.localStorage.setItem(Ie,JSON.stringify(y)):window.localStorage.removeItem(Ie)}catch{}},it();var Ie,He,nt,Xe={get:function(y){var x;it();try{return(x=window.localStorage.getItem(y))!=null?x:null}catch{return null}},set:function(y,x,O){if(_=y,O=(O=O===void 0?{}:O).expires,X=He(),O===void 0?(X!=null&&X[_]&&(delete X[_],nt(X)),!0):(O=oe(O).getTime())>Date.now()&&((X=X||{})[_]=O.toString(36),nt(X),!0))try{window.localStorage.setItem(y,x)}catch{}var _,X},getNames:ht,remove:function(y){try{window.localStorage.removeItem(y)}catch{}it()},expires:it,__protected__:{get ttlName(){return Ie}}};function it(){var y=ht(),x=He(),O={};x&&(Object.keys(x).forEach(function(_){if(y.includes(_)){var X=x[_]?parseInt(x[_],36):null;if(!(X=X)||X>Date.now())O[_]=x[_];else try{window.localStorage.removeItem(_)}catch{}}}),JSON.stringify(x)!==JSON.stringify(O))&&nt(O)}function ht(){try{return Object.keys(window.localStorage)}catch{return[]}}function Re(y,x){return{cookieName:x=x===void 0?"_pctx":x,readonly:!1,init:function(O){return(O=O??y)!=null?O:null},refresh:function(O){return O},update:function(O){return O},set:function(O){return O},get:function(O){return O}}}function Qe(y){return Ye(Ye({},Re(y)),{cookieName:null})}function st(y){return y==null}function Xt(){var y={};return{add:function(x){y[x]=!0},values:function(){return Tt(y)}}}function Gt(y,x){var O,_=NaN,X=NaN;return function(se){var me=x==null?void 0:x();return se===X&&_===me||(_=me,O=y(X=se)),O}}function gn(y){var x;return function(O){var _=y();_!==x&&O(x=_)}}function ut(y){return Kt(y,function(x){return(x==null?void 0:x.type)!=="CX"})}function In(y,x){return x({protect:!0}),ei()}function Fn(y,x,O){var _=tn().reduce(function(X,se){return se=se.id,X[se]=O(y==null?void 0:y[se],x==null?void 0:x[se],se),X},{});return lt(_,x)?x:_}function hr(y,x){return Fn(y,x,function(O,_,X){return O||_||Qi()[X]})}function wr(){return Cr().consent_modifiers||null}function pr(){return!!Cr().requireConsent}function Kn(y,x,O){return"".concat(y.join(", ")," ").concat(1<y.length?O:x)}var $t,Sn,Rn={get:function(y){try{return window.sessionStorage.getItem(y)}catch{return null}},set:function(y,x){try{window.sessionStorage.setItem(y,x)}catch{}},getNames:function(){try{return Object.keys(window.sessionStorage)}catch{return[]}},remove:function(y){try{window.sessionStorage.removeItem(y)}catch{}}},Ye=function(){return(Ye=Object.assign||function(y){for(var x,O=1,_=arguments.length;O<_;O++)for(var X in x=arguments[O])Object.prototype.hasOwnProperty.call(x,X)&&(y[X]=x[X]);return y}).apply(this,arguments)},en=Re("anon"),Tt=function(y){return y?Object.keys(y):[]},Et=function(y){return Array.isArray(y)},Dn=function(y){return!st(y)},nr=function(y){return C(y)==="object"},Lr=function(y){return typeof y=="string"},ei=function(){for(var y=new Date().getTime().toString(36);y.length<16;)y+=Math.round(2147483647*Math.random()).toString(36);return y.substr(0,16)},Kt=function(y,x){return y&&Tt(y).filter(function(O){return x(y[O])}).reduce(function(O,_){return Ye(Ye({},O),((O={})[_]=y[_],O))},{})},ct=function(y,x){return nr(y)?Tt(y).reduce(function(O,_){var X=y[_],se=x[_],se=se&&se(X);return se!==void 0&&(O[_]=se),O},{}):y},Nn=function(y){return y==="true"||y===!0},at=function y(x,O){try{return x()}catch{return O?y(O):null}},Vt=function(y,x){return x===void 0&&(x=!1),at(function(){return JSON.parse(y)},function(){return x?JSON.parse(window.atob(y)):null})||null},On=function(y,x){x===void 0&&(x=!1);var O=JSON.stringify(y);return at(function(){return x?window.btoa(O):O})||O},lt=function(y,x){var O,_;return y===x||(y&&x?(O=Tt(y),_=Tt(x),O.length===_.length&&!O.some(function(X){return y[X]!==x[X]})):null)},un=Ye(Ye({},Re(null)),{init:function(y){return ut(y||null)},refresh:ut,set:function(y,x){return y===null?null:Kt(Ye(Ye({},x),y),function(O){return O!==null})}}),Ur="pdl",Cr=function(){return window[Ur]||{}},Bs=Ye(Ye({},Qe()),{init:function(y,x){return x({protect:!0}),Cr().pageViewId||ei()},refresh:In,update:In,set:function(y,x,O){return O({protect:!0}),y}}),fn=Ye(Ye({},Re(null,"_pcid")),{init:function(y,x){return x({protect:!0}),y||ei()},update:function(y,x){return x({protect:!0}),ei()},set:function(y,x,O){return O({protect:!0}),y}}),Br=["PA","DMP","COMPOSER","ID","VX","ESP","SOCIAL_FLOW","DL"].map(function(y,x){return{name:y,id:x}}),Ct=Br.reduce(function(y,x,O){return x=x.name,Ye(Ye({},y),((y={})[x]=O,y[x.toLowerCase()]=O,y))},{}),ln=(Ct["social flow"]=Ct.SOCIAL_FLOW,Ct["Social Flow"]=Ct.SOCIAL_FLOW,gn(function(){var y;return(y=Ia(Cr().consent))==null?void 0:y.products})),tn=($t=Br,function(){return ln(function(y){$t=y?Br.filter(function(x){return y.includes(x.name)||x.name==="DL"}):Br}),$t}),cn=function(y){var x=Number(y);return Number.isNaN(x)?(y=Ct[y.toLowerCase()])!=null?y:null:x<Br.length?x:null},Pe=function(y,x){return Tt(y).reduce(function(O,se){var X=Br[Number(se)].name,se=y[se];return O[X]=x?x(se,X):se,O},{})},Ne="opt-in",Cn="essential",Bn="opt-out",Jn="custom",mn=[Ne,Cn,Bn],oo=mn.concat(Jn),So=oo.reduce(function(y,x,O){return Ye(Ye({},y),((y={})[O]=x,y))},{}),rr=[Ne,Jn,Cn,Bn],Mr=function(y,x){return y=rr.indexOf(y),x=rr.indexOf(x),rr[Math.max(y,x)]},To=function(y){return oo.includes(y)},ti=function(y){return mn.includes(y)},Pr={AD:["DMP","SOCIAL_FLOW"],CP:["COMPOSER"],AM:["PA"],PR:["ESP","VX","ID"],DL:["DL"]},Wr=Tt(Pr).reduce(function(y,x){return Pr[x].forEach(function(O){O=Ct[O],y[O]=x}),y},{}),wt=gn(function(){var y;return(y=Ia(Cr().consent))==null?void 0:y.defaultPurposes}),Qi=(Sn=Ye({},Wr),function(){return wt(function(y){Sn=Ye({},Wr),y&&Tt(y).forEach(function(x){var O=Ct[x];Sn[O]=(O=y[x])==null?void 0:O.substring(0,32)})}),Sn}),gr=Ye(Ye({},Re(null,"_pprv")),{init:function(y){return Ui()?hr(y||null,null):null},set:function(y,x){return Ui()?y==null?x:hr(Tt(O=y).reduce(function(_,me){var se=cn(me),me=Eo(O[me]);return se!==null&&me!==so&&se!==Ct.DL&&me&&(_[se]=me),_},{}),x):null;var O}}),Ui=function(){return Cr().requireConsent==="v2"},rs=function(y,x){return y===Jn&&!((y=wr())!=null&&y[x])},so="DL",Bi=["AD","AM","CP","PR",so].reduce(function(y,x){return Ye(Ye({},y),((y={})[x]=x,y[x.toLowerCase()]=x,y))},{}),Ns=function(y){return Bi[(y==null?void 0:y.toLowerCase())||""]||null},Eo=function(y){return Ns(y)||(y==null?void 0:y.substring(0,32))},xo="Consent v2 is disabled",ys='the "DL" purpose is reserved',is=function(y){return'"'.concat(y,'" can not be applied for the dl product')},ao=function(y){return"".concat(y," is unknown consent mode")},wo=function(y){return Kn(y,"does","do")+"n't have modifier in the pdl. Custom mode can't be applied"},fe="Unknown purpose. Provide a product or define within pdl config",ki=function(y){return"Custom purpose: "+Kn(y,"is","are")+" unknown"};function Un(y,x,O,_,X){function se(Fe,Ze){return Ze=Eo(Ze),Bi[Ze]||Object.values(y||{}).includes(Ze)?Be(Fe,Ze):Me(fe)}var me,Oe,Ue,Ke,Te,Me=function(Fe){return{error:Fe}},Be=function(Fe,Ze,$e){var ze,kt=[];return To(Fe)?(ze=tn().reduce(function(ot,mt){var We=mt.id,mt=mt.name;return(!Ze||(y==null?void 0:y[We])===Ze||$e!=null&&$e.includes(We))&&(rs(Fe,mt)?kt.push(mt):ot[We]={mode:Fe}),ot},{}),kt.length?Me(wo(kt)):Object.keys(ze).length?{consent:ze}:null):Me(ao(Fe))};return Ui()?X?(me=_,X=X,Ke=Eo(Oe=O),X=Et(X)?X:[X],(Te=X.map(cn).filter(Dn)).length?Ke!==so&&Te.includes(Ct.DL)?{error:is(Ke)}:Ke===so&&Te.some(function(Fe){return Fe!==Ct.DL})?Me(ys):(Ue=Be(me,Ke,Te))!=null&&Ue.error?Ue:(Te=Te.reduce(function(Fe,Ze){return Fe[Ze]=Ke,Fe},{}),{consent:(Ue==null?void 0:Ue.consent)||null,purposes:Te}):Ns(Oe)?se(me,Oe):Me(ki(X))):_?se(_,O):Be(O):Me(xo)}function Zi(y,x){return function(O){return x(y+O)}}function fi(y,x){x===void 0&&(x=dr);var O=Ct[y.toLowerCase()];return O!==void 0?Br[O].name:(x('"'.concat(y,'" is not found')),null)}function Vi(y,x){var O,_;return x===void 0&&(x=dr),y?(O={},y.products&&(Et(y.products)?O.products=y.products.reduce(function(X,se){return se=fi(se,Zi("consent.products: ",x)),se&&X.push(se),X},[]):x("consent.products: should be an array")),y.defaultPreset&&(O.defaultPreset=Tt(y.defaultPreset).reduce(function(X,se){var me=fi(se,Zi("consent.defaultPreset: ",x)),Oe=Rr(y.defaultPreset[se]);return Oe||x("consent.defaultPreset: "+Ao(se,mn)),me&&Oe&&(X[me]=Oe),X},{})),(_=y.defaultPurposes)&&(O.defaultPurposes=Tt(_).reduce(function(X,se){var me=Zi("consent.defaultPurposes: ",x),Oe=fi(se,me),Ue=_[se],Ke=Eo(Ue);return Ke===so||Oe==="DL"?me('"'.concat(se,": ").concat(Ue,'" - invalid config')):Oe&&Ke&&(X[Oe]=Ke),X},{})),O):null}function _i(y){return y.reduce(function(x,O,_){return Ye(Ye({},x),((x={})[_]={mode:So[O]},x))},{})}function zr(y,x){return Fn(y,x,function(O,_,X){return O=(O==null?void 0:O.mode)||(_==null?void 0:_.mode)||mr()[0].preset[X].mode,O!==(_==null?void 0:_.mode)?{mode:O}:_})}function Xs(y){var x=Number(y);return Number.isNaN(x)?String(y):x}function Sr(y){return Et(y)?y:y.split(",").map(function(x){return x.trim().replace(/^['"](.+)['"]$/,"$1")})}function Uo(y){return y}var Ri,bi=function(y,x){var O;return y?(O=Pe(x||Wr),tn().reduce(function(_,se){var se=se.name,me=O[se],Oe=((Oe=y[se])==null?void 0:Oe.mode)||Ne;return _[me]?(_[me].mode=Mr(_[me].mode,Oe),_[me].products.push(se)):_[me]={mode:Oe,products:[se]},_},{})):null},os=["include","exclude","obfuscate"],Ao=function(y,x){return'"'.concat(y,'" should be one of ').concat(x.join(", "))},dr=function(){},Rr=function(y){return ti(y)?y:null},Io=function(_,x){x===void 0&&(x=dr);var O=_.source,_=_.patches||[];return Rr(O)||(x(Ao("source",mn)),O=Ne),Et(_)||(x('"patches" should be an array'),_=[]),{source:O,patches:_=_.reduce(function(X,se,me){var Oe,Ue;return!nr(se)||Et(se)?x("patch[".concat(me,"]: should be type of {action, item, with?}")):(Oe=se.action,Ue=se.item,os.includes(Oe)?Ue&&nr(Ue)&&Ue.key&&Ue.type?X.push(se):x("patch[".concat(me,']: "item" should be type of {key, type}')):x("patch[".concat(me,"]: ")+Ao("action",os))),X},[])}},Ia=Gt(Vi),Ss=function(y,x){return x===void 0&&(x=dr),Tt(y||{}).reduce(function(O,_){var X=y==null?void 0:y[_],se=fi((X==null?void 0:X.source)||"",x);return O[_]=Ye(Ye({},X),{source:se}),O},{})},ni=[[0,0,0,0,0,0,0,0],[0,0,2,2,2,2,2,0],[1,2,2,2,2,2,2,1],[0,2,0,2,2,2,0,0],[1,2,2,2,2,2,1,1],[2,0,0,2,2,2,2,0],[2,0,2,2,2,2,2,0],[2,2,2,2,2,2,0,2],[2,2,0,0,0,0,2,0],[2,2,1,2,1,2,2,1],[2,2,1,1,2,2,2,1]],Ys=ni.map(function(y,x){return{id:x,preset:_i(y)}}),Bt=gn(function(){var y;return(y=Ia(Cr().consent))==null?void 0:y.defaultPreset}),mr=(Ri=Ys,function(){return Bt(function(y){Ri=Ys.slice(),y&&(Ri[0]={id:0,preset:Ye({},Ri[0].preset)},Tt(y).forEach(function(_){var O=y[_],_=Ct[_];Ri[0].preset[_]={mode:O}}))}),Ri}),ou=Ye(Ye({},Re(null,"_pprv")),{init:function(y){return pr()&&y?zr(y,null):null},set:function(y,x){var O,_,X;return pr()?y!=null&&(O=typeof y=="number"?((O=mr()[y])==null?void 0:O.preset)||null:Et(y)?(X=null,y.forEach(function(se){var me=ni[se];!X&&me?X=me:X&&me&&(X=X.map(function(Oe,Ue){return Math.min(Oe,me[Ue])}))}),X&&_i(X)):Tt(_=y).reduce(function(se,Ue){var Oe=_[Ue],Ue=cn(Ue);return Ue!==null&&(Oe=To(Oe.mode)?Oe.mode:null)&&((se=se||{})[Ue]={mode:Oe}),se},null))?zr(O,x):x:null},get:Gt(function(y){return y&&Pe(y,function(X,O){var _,X=Ye({},X);return X.mode===Jn&&(X.modifier=((_=wr())==null?void 0:_[O])||null),X})},wr)}),su=Ye(Ye({},Qe()),{init:mr,set:mr}),Ho=Ye(Ye({},Qe()),{init:tn,set:tn}),Js=Ye(Ye({},Qe(null)),{readonly:!0,set:function(){return null},get:wr}),Qs={id:Uo,type:Uo,zone:Uo,createdAt:Xs,modifiedAt:Xs,authors:Sr,section:Uo,tags:Sr,keywords:Sr,title:Uo,description:Uo,isNative:Nn},Ts=function(y){return y==="first"},Ls=function(y){return y==="last"};function qa(y,x){return y===void 0&&(y="meta"),Ts(x)?document.querySelector(y):(y=document.querySelectorAll(y),Ls(x)?y[y.length-1]:Array.from(y))}function eu(y){var x=y.getContent||function(Ke){return Ke.content};if(y.selector)return(_=qa(y.selector,y.take||"first"))&&x(_)||null;var O=Ca.find(y.attr||["name"],y.hasContent),_=y.names||[],X=y.take!=="all",se=Ls(y.take);if(O)for(var me=0,Oe=_;me<Oe.length;me++){var Ue=function(Be){var Te,Me=[],Be=O[Be];if(Be){if(X)return Te=Be[se?Be.length-1:0],{value:x(Te)||""};Be.forEach(function(Fe){Me=Me.concat(x(Fe)||"")})}if(Me.length)return{value:Me}}(Oe[me]);if(C(Ue)==="object")return Ue.value}return null}function js(O){var x=O.replace(/DAY/g,"(0?[1-9]|[12][0-9]|3[01])").replace(/MONTHLONG/g,"("+Tt(qs).join("|")+")").replace(/MONTH/g,"(0?[1-9]|1[012])").replace(/YEAR2/g,"([0-9][0-9])").replace(/YEAR/g,"(197[1-9]|19[8-9][0-9]|20[0-9][0-9])").replace(/TIME/g,"([0-9][0-9]):([0-9][0-9]):([0-9][0-9])(?:\\.[0-9][0-9][0-9])?([zZ]|[+-][0-9][0-9](?::?[0-9][0-9])?)?"),O=O.replace(/.*?([YMD])(EAR|ONTH|AY).*?/g,"$1").substring(0,3);return[new RegExp(x),O]}function Hi(y){return y&&parseInt(y,10)||0}Zs=null;var Zs,Ca={refresh:function(){(Zs=qa()||null)&&setTimeout(function(){Zs=null},0)},find:function(y,x){return x===void 0&&(x=!1),Zs?Zs.reduce(function(O,_){for(var X=0,se=y;X<se.length;X++){var me=se[X],me=((me==="name"?_.name:_.getAttribute(me))||"").trim().toLowerCase(),Oe=_.content;if(me&&(!x||Oe)){O[me]||(O[me]=[]),O[me].push(_);break}}return O},{}):null}},Bo=function(y){for(var x=0,O=y;x<O.length;x++){var _=O[x],_=eu(_);if(_)return _}},Di=function(y,x,O){var _,X=Qs[x];!y[x]&&X&&(X=(_=(typeof O=="function"?O:function(){return(Et(O)?Bo:eu)(O)})())&&X(_))&&(y[x]=X)},tu=function(y){return{attr:["property"],names:[y]}},mi=function(y){return{names:[y]}},qs={januar:"01",january:"01",jan:"01",februar:"02",february:"02",feb:"02",mars:"03",march:"03",mar:"03",april:"04",apr:"04",mai:"05",may:"05",juni:"06",june:"06",jun:"06",juli:"07",july:"07",jul:"07",august:"08",aug:"08",september:"09",sept:"09",sep:"09",oktober:"10",october:"10",okt:"10",oct:"10",november:"11",nov:"11",desember:"12",december:"12",dec:"12",des:"12"},nu=["\\bDAY\\.MONTH\\.YEAR\\b","\\bDAY\\.?\\s{0,3}MONTHLONG\\.?\\s{1,3}YEAR\\b","\\bYEAR-MONTH-DAY(?:[tT]|\\b)","\\bMONTHLONG\\.?\\s{0,3}DAY(?:st|nd|rd|th)?,?\\s{1,3}YEAR\\b","\\bDAY(?:st|nd|rd|th|\\.)?\\s{0,3}MONTHLONG\\.?,?\\s{1,3}YEAR\\b","\\bYEAR[/年]MONTH[/月]DAY(?=\\b|日)","\\bDAY\\.MONTH\\.YEAR2\\b","\\bDAY/MONTH/YEAR\\b"].map(js),ru=js("YEAR-MONTH-DAY[tT]TIME")[0];function Gi(y,x,O,_,X,se,me){return y=new Date(Date.UTC(Hi(y),Hi(x)-1,Hi(O),Hi(_),Hi(X),Hi(se))),x=(me||"").match(/^([+-][0-9][0-9])(?::?([0-9][0-9])?)$/),x&&(y=new Date(y.getTime()-36e5*Number(x[1])-6e4*(Number(x[2])||0))),O=Date.now()-y.getTime(),0<O||-O<1728e5?y.toISOString():null}var Vn=function(y){return y.replace(/<\/?[^>?]*\/?>/g," ").replace(/\s+/g," ").trim()};function ss(y){return Vn((y=y===void 0?"":y).replace(/,(?=\s*(jr|sr)(\.?)\b)/g," "))}function Vr(y){return Ye(Ye({},y),{take:"last"})}function Vo(y){return Ye(Ye({},y),{take:"last",hasContent:!0,getContent:function(x){return Vn(x.content||"")}})}function Es(y){Di(y,"createdAt",function(){var O=Bo(ea);if(!O)return null;var x=O.toLowerCase(),O=(x=x.toLowerCase()).match(ru);if(O)return Gi(O[1],O[2],O[3],O[4],O[5],O[6],O[7]);for(var _=0,X=nu;_<X.length;_++){var se=X[_],me=x.match(se[0]);if(me)return Gi((me=se[1]==="DMY"?["",me[3],me[2],me[1]]:se[1]==="MDY"?["",me[3],me[1],me[2]]:me)[1].length===2?(Hi(me[1])<60?"20":"19")+me[1]:me[1],me[2].length<=2?me[2]:qs[me[2]],me[3])}}),Di(y,"modifiedAt",Ki),Di(y,"authors",_o),Di(y,"keywords",function(){var x=Bo(ta);return x&&x.length<=1024?x:null}),Di(y,"title",As),Di(y,"description",na)}function Fs(){var y,x=Array.from(document.querySelectorAll("meta[property^=content]")).reduce(function(O,_){var X=(X=_==null?void 0:_.getAttribute("property"))==null?void 0:X.split(":").pop(),se=Qs[X];return se&&_&&(O[X]=se((_==null?void 0:_.getAttribute("content"))||"")),O},{});return Ca.refresh(),Di(y=x,"type",tu("og:type")),Di(y,"section",mi("section")),Di(y,"id",mi("id")),Di(y,"authors",mi("author")),Es(x),x}function Us(y){return y.getTime().toString(36)}function as(y){return y?at(function(){return new Date(parseInt(y,36))}):null}function xs(y,x,O){return O===void 0&&(O=!1),{cookieName:y,consent:x=x===void 0?_r:x,encode:function(_){return On(_,O)},decode:function(_){return Vt(_,!0)}}}function ws(y){function x(kt){return Ye(Ye({},Be),Kt(kt||{},Dn))}function O(kt,ot){var Ht=kt&&ot;!Ze()&&Ht&&$e(),Ze()&&!Ht&&ze(),Ze()&&Ht&&!Ke&&$e(),me=kt,Te=ot}var _=y.cookieName,X=y.consent,se=ae.get(_),me=!!se,Oe=me,Ue=Mn(se,y),Ke=!!Ue.fixedAt,Te=me,Me=null,Be=Ye({},bu),Fe=null,Ze=function(){return me&&Te},$e=function(Ht){var ot,Ht=x(Ht),We=Me||(Fe?Ue.encode(Fe,Ht):"");We||(ot=ae.get(_),We=(ot=Ue.decode(ot||""))?Ue.encode(ot,Ht):""),We&&(Ke=!0,ae.set(_,We,Ue.bindOptions(Ht)),Oe=!0)},ze=function(kt){Ze()&&(Oe&&ae.remove(_,x(kt)),Oe=!1)};return Ue.onChange(function(){Ze()&&(Ke=!1,$e())}),{get cookieName(){return _},get cookieEnabled(){return Ze()},get fixedAt(){return Ue.fixedAt},get consent(){return X},set:function(kt,ot){Fe=kt,Ze()&&$e(ot)},get:function(){return Ue.decode(ae.get(_)||"")},remove:ze,setCookieOptions:function(kt){Be=x(kt),Ze()&&$e()},setCookieEnabled:function(kt,ot){ot===void 0&&(ot=null),Me=kt?ot:null,O(kt,Te)},lazyActive:function(){O(me,!0)},setFixedMode:function(kt){Ue.setMode(kt)}}}var Ma,ea=[Vr({attr:["name","property","itemprop"],names:["cxenseparse:publishtime","cxenseparse:recs:publishtime","article:published_time","date","dc.date","dc.date.created","dc.terms.issued","pub_date","article.published","datepublished","og:article:published_time"]}),Vr({selector:"time.published[datetime],time[pubdate][datetime]",getContent:function(y){return y.getAttribute("datetime")}}),Vr({selector:"time[datetime]",getContent:function(y){return y.getAttribute("datetime")}})],Ki={selector:'meta[property="article:modified_time"]'},_o=[{attr:["property","name"],names:["cxenseparse:author","og:article:author","article:author","og:book:author","book:author","author","dc.creator","article.author"],take:"all",getContent:function(O){var x=O.getAttribute("data-separator"),O=O.content;return x?ss(O).split(x):ss((x=(x=O)===void 0?"":x).replace(/\n+/,";").replace(/(\<|&lt;)br(\>|&gt;)/,";").replace(/\b(and|und|og)\b/g,";")).split(/[,;]/)}}],ta=[Vo({names:["cxenseparse:keywords"]}),Vo({attr:["property","name"],names:["news_keywords"]}),Vo({names:["keywords"]})],na=[Vo({names:["cxenseparse:description"]}),Vo({attr:["property"],names:["og:description"]}),Vo({names:["description"]})],As=[{names:["cxenseparse:title"]},Vr({attr:["property","name"],names:["og:title"]})],ra=Ye(Ye({},Qe(null)),{init:Fs,refresh:function(y){var x=Fs();return y!=null&&y._fixed_&&y!=null&&y._fixed_.forEach(function(O){delete x[O]}),Ye(Ye({},y),x)},set:function(y,x){var O,_;return y===null?{}:(O=new Set(x&&x._fixed_),(_=function(X,se){Tt(Kt(y,X)).forEach(se)})(Dn,function(X){O.add(X)}),_(st,function(X){O.delete(X)}),Kt(Ye(Ye(Ye({},x),y),{_fixed_:Array.from(O.values())}),Dn))},get:Gt(function(y){var x=Ye({},y);return delete x._fixed_,y&&x})}),jl=Ye(Ye({},Re(null,"_pcus")),{init:function(y){return(y=y===void 0?null:y)&&Kt(y,function(x){return nr(x)&&Array.isArray(x.segments)})}}),Bs={pageViewId:Bs,browserId:fn,users:un,userStatus:en,siteId:Re(),consent:ou,consentPresets:su,products:Ho,consentModifiers:Js,purposes:gr,content:ra,userSegments:jl},bu={path:"/",expires:395,samesite:"lax",secure:window.location.protocol==="https:",domain:ae.getTopLevelDomain(["pantheon.io","go-vip.net","go-vip.co"])},Mn=function(y,x){function O(Ke){return me=me||function(Te){var Me=new Date;if(Te instanceof Date)Me=Te;else{if(typeof Te!="number")return null;Me.setDate(Me.getDate()+Te)}return Me}(Ke.expires)}var _=x.encode,X=x.decode,se=!1,me=null,Oe=null,Ue=null;return(x=(x=X(y||""))==null?void 0:x._t)&&(x=x.split("|"),me=as(x[0]),Oe=as(x[1]),se=!!me),{get fixedAt(){return se?[Oe,me]:null},onChange:function(Ke){Ue=Ke},setMode:function(Ke){var Te=se;(se=Ke)!==Te&&(Oe=me=null)!=Ue&&Ue(se)},bindOptions:function(Ke){return se&&(me=O(Ke))?Ye(Ye({},Ke),{expires:me}):Ke},decode:function(Ke){return Ke=X(Ke),Ke!=null&&Ke._t&&delete Ke._t,Ke},encode:function(Ke,Te){return se?(me=O(Te))&&(Ke._t=Us(me)+"|"+Us(Oe=Oe||new Date)):delete Ke._t,_(Ke)}}},vr="essential",_r="optional",di="mandatory",Pn=String.fromCharCode,Oi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",At={};(Ma=Ma||{}).URI="URI";function Co(){function y(Oe,Ue,Ke){Ke===void 0&&(Ke=!1);var Te=[];return Tt(Ue).forEach(function(Me){var Be=Ue[Me],Fe=!se.has(Me)||se.get(Me)===Oe||Ke;Be&&Fe?se.set(Me,Oe):!Be&&Fe?se.delete(Me):Te.push(Me)}),0<Te.length?Te:null}var x=Zn(),O={},_=null,X=new Map,se=new Map,me=[];return function(Oe,Ue){var Ke=ei();return X.set(Ke,Oe),Ue&&x.register(Ue),O=Ye(Ye({},x.get()),O),{getInitCookieData:function(){return O},getCachedData:function(){return _||Ar},setProtectionData:function(Te){return y(Ke,Te)},setProtectionDataUnsafe:function(Te){return y(Ke,Te,!0)},updateData:function(Te){return Be={},Fe={},Tt(Me=Te).forEach(function($e){se.has($e)?Be[$e]=(_==null?void 0:_[$e])||null:Fe[$e]=Me[$e]}),Te=_||O,Ze=Ye(Ye({},_),Fe),lt(Ze,Te)||(x.set(Ze,Te),_=Ze,me.forEach(function($e){return(0,$e[1])(Fe)})),0<Tt(Be).length?Be:null;var Me,Be,Fe,Ze},onUpdateData:function(Te){me.push([Ke,Te])},terminate:function(){var Te;Te=Ke,me=me.filter(function(Me){return Me[0]!==Te}),X.delete(Ke)},setCookieOptions:function(){return null},setCookieEnabled:function(){return null},get registeredCookiesWrapper(){return x.wrappers}}}}function iu(y){return Tt(y).filter(Ir).map(function(x){return Du(x,y[x])})}function uo(y,x){switch(y){case Ne:return!0;case Cn:return x===vr||x===di;case Bn:return x===di;default:return!0}}function W(y){function x(X){return at(function(){return window.localStorage.getItem(X)})}var O=x(y),_=at(function(){return parseInt(Vt(x("_ls_ttl"))[y],36)});return _&&_<=Date.now()?null:O}function Q(y){var x=y&&y.length;return x===16||x===36?y:null}function D(y){var x,O=Ye(Ye({},sf),Ss((x=Cr())==null?void 0:x.migration));Tt(O).forEach(function(_){var X=y.params.get(_),se=O[_]===sf[_],me=(me=O[_])==null?void 0:me.source,me=me&&((me=Is[me])==null?void 0:me[_])||[];X&&me.length&&(me=Pa(me))&&(X.readonly=!1,y.updateValues(_,me,!0),X.readonly=!se)})}function re(){function y(O){return ct(O,{path:String,domain:String,secure:Nn,expires:function(_){return _ instanceof Date?_:Number(_)},samesite:function(_){return Lr(_)?_:Nn(_)}})}var x=Ye({},window[Ur]);return x!=null&&x.cookies&&(x.cookies=Tt(x.cookies).reduce(function(O,_){return O[_]=y(x.cookies[_]),O},{})),x!=null&&x.cookieDefault&&(x.cookieDefault=y(x.cookieDefault)),x}function ge(y){function x(me){return me||((me=y.get("consent"))==null?void 0:me.DL)||null}function O(me){var Oe,Ue=Fl(),Ke=(Oe=y.getConnection())==null?void 0:Oe.registeredCookiesWrapper;Ke&&(Oe=Tt(Ke).map(function(Te){return Ke[Te].cookieName}),X(Oe,me).forEach(function(Be){var Me=Be.name,Fe=Be.allowed,Be=Be.data,Fe=Fe&&!Ue[Me];Ke[Me].setCookieEnabled(Fe,Be||null)}))}var _=Tt(nn).reduce(function(me,Oe){return me[Oe]=nn[Oe].consent,me},{}),X=ia({items:_,type:"cookie",getConsent:x}),se=x();y.addChangeListener("consent",function(me){me=(me==null?void 0:me.DL)||null,(se==null?void 0:se.mode)!==(me===null?void 0:me.mode)&&O(se=me)}),O(se)}function je(y){function x(X){var se,me,Oe=bi(X,y.get("purposes"));Oe&&X&&(se=!1,me=Tt(Oe).reduce(function(Ue,Ke){var Te=Oe[Ke].mode;return Oe[Ke].products.forEach(function(Me){var Be;Te!==((Be=X[Me])==null?void 0:Be.mode)&&(rs(Te,Me)?_[Me]||(_[Me]=!0,Cs(Me,Te,1)):(Ue[Me]={mode:Te},se=!0,Cs(Me,Te,2)))}),Ue},{}),se)&&y.updateValues({consent:me})}var O=null,_={};y.addChangeListener("consent",function(X){Ui()&&(O&&(clearTimeout(O),O=null),O=setTimeout(function(){x(X),O=null},200))}),Ui()&&x(y.get("consent"))}var qe,tt,rt,vt,En,or,Qn,Xn,_t,qt,vn,It,Tn,Wn,$r,lo,us,Ni,vi,ri={URI:{prefix:"{u}",compress:function(y){if(y==null)return"";var x=y,O=6,_=function(ot){return Oi.charAt(ot)};if(x==null)return"";for(var X,se,me,Oe,Ue={},Ke={},Te="",Me=2,Be=3,Fe=2,Ze=[],$e=0,ze=0,kt=0;kt<x.length;kt+=1)if(me=x.charAt(kt),Object.prototype.hasOwnProperty.call(Ue,me)||(Ue[me]=Be++,Ke[me]=!0),Oe=Te+me,Object.prototype.hasOwnProperty.call(Ue,Oe))Te=Oe;else{if(Object.prototype.hasOwnProperty.call(Ke,Te)){if(Te.charCodeAt(0)<256){for(X=0;X<Fe;X++)$e<<=1,ze==O-1?(ze=0,Ze.push(_($e)),$e=0):ze++;for(se=Te.charCodeAt(0),X=0;X<8;X++)$e=$e<<1|1&se,ze==O-1?(ze=0,Ze.push(_($e)),$e=0):ze++,se>>=1}else{for(se=1,X=0;X<Fe;X++)$e=$e<<1|se,ze==O-1?(ze=0,Ze.push(_($e)),$e=0):ze++,se=0;for(se=Te.charCodeAt(0),X=0;X<16;X++)$e=$e<<1|1&se,ze==O-1?(ze=0,Ze.push(_($e)),$e=0):ze++,se>>=1}--Me==0&&(Me=Math.pow(2,Fe),Fe++),delete Ke[Te]}else for(se=Ue[Te],X=0;X<Fe;X++)$e=$e<<1|1&se,ze==O-1?(ze=0,Ze.push(_($e)),$e=0):ze++,se>>=1;--Me==0&&(Me=Math.pow(2,Fe),Fe++),Ue[Oe]=Be++,Te=String(me)}if(Te!==""){if(Object.prototype.hasOwnProperty.call(Ke,Te)){if(Te.charCodeAt(0)<256){for(X=0;X<Fe;X++)$e<<=1,ze==O-1?(ze=0,Ze.push(_($e)),$e=0):ze++;for(se=Te.charCodeAt(0),X=0;X<8;X++)$e=$e<<1|1&se,ze==O-1?(ze=0,Ze.push(_($e)),$e=0):ze++,se>>=1}else{for(se=1,X=0;X<Fe;X++)$e=$e<<1|se,ze==O-1?(ze=0,Ze.push(_($e)),$e=0):ze++,se=0;for(se=Te.charCodeAt(0),X=0;X<16;X++)$e=$e<<1|1&se,ze==O-1?(ze=0,Ze.push(_($e)),$e=0):ze++,se>>=1}--Me==0&&(Me=Math.pow(2,Fe),Fe++),delete Ke[Te]}else for(se=Ue[Te],X=0;X<Fe;X++)$e=$e<<1|1&se,ze==O-1?(ze=0,Ze.push(_($e)),$e=0):ze++,se>>=1;--Me==0&&(Me=Math.pow(2,Fe),Fe++)}for(se=2,X=0;X<Fe;X++)$e=$e<<1|1&se,ze==O-1?(ze=0,Ze.push(_($e)),$e=0):ze++,se>>=1;for(;;){if($e<<=1,ze==O-1){Ze.push(_($e));break}ze++}return Ze.join("")},decompress:function(y){if(y==null)return"";if(y=="")return null;for(var x,O,_,X,se,me,Oe=(y=y.replace(/ /g,"+")).length,Ue=32,Ke=function(We){var Ht=Oi,We=y.charAt(We);if(!At[Ht]){At[Ht]={};for(var mt=0;mt<Ht.length;mt++)At[Ht][Ht.charAt(mt)]=mt}return At[Ht][We]},Te=[],Me=4,Be=4,Fe=3,Ze="",$e=[],ze={val:Ke(0),position:Ue,index:1},kt=0;kt<3;kt+=1)Te[kt]=kt;for(O=0,X=Math.pow(2,2),se=1;se!=X;)_=ze.val&ze.position,ze.position>>=1,ze.position==0&&(ze.position=Ue,ze.val=Ke(ze.index++)),O|=(0<_?1:0)*se,se<<=1;switch(O){case 0:for(O=0,X=Math.pow(2,8),se=1;se!=X;)_=ze.val&ze.position,ze.position>>=1,ze.position==0&&(ze.position=Ue,ze.val=Ke(ze.index++)),O|=(0<_?1:0)*se,se<<=1;me=Pn(O);break;case 1:for(O=0,X=Math.pow(2,16),se=1;se!=X;)_=ze.val&ze.position,ze.position>>=1,ze.position==0&&(ze.position=Ue,ze.val=Ke(ze.index++)),O|=(0<_?1:0)*se,se<<=1;me=Pn(O);break;case 2:return""}for(x=Te[3]=me,$e.push(me);;){if(Oe<ze.index)return"";for(O=0,X=Math.pow(2,Fe),se=1;se!=X;)_=ze.val&ze.position,ze.position>>=1,ze.position==0&&(ze.position=Ue,ze.val=Ke(ze.index++)),O|=(0<_?1:0)*se,se<<=1;switch(me=O){case 0:for(O=0,X=Math.pow(2,8),se=1;se!=X;)_=ze.val&ze.position,ze.position>>=1,ze.position==0&&(ze.position=Ue,ze.val=Ke(ze.index++)),O|=(0<_?1:0)*se,se<<=1;Te[Be++]=Pn(O),me=Be-1,Me--;break;case 1:for(O=0,X=Math.pow(2,16),se=1;se!=X;)_=ze.val&ze.position,ze.position>>=1,ze.position==0&&(ze.position=Ue,ze.val=Ke(ze.index++)),O|=(0<_?1:0)*se,se<<=1;Te[Be++]=Pn(O),me=Be-1,Me--;break;case 2:return $e.join("")}if(Me==0&&(Me=Math.pow(2,Fe),Fe++),Te[me])Ze=Te[me];else{if(me!==Be)return null;Ze=x+x.charAt(0)}$e.push(Ze),Te[Be++]=x+Ze.charAt(0),x=Ze,--Me==0&&(Me=Math.pow(2,Fe),Fe++)}}}},Jt=Tt(ri).reduce(function(y,x){return y[ri[x].prefix]=ri[x],y},{}),fn={cookieName:"_pctx",consent:di,encode:function(y,x){return x===void 0&&(x=Ma.URI),y=JSON.stringify(y),y=ri[x].compress(y),ri[x].prefix+y},decode:function(y){return y=function(_){var O=_.slice(0,3),_=_.slice(3);if(!Jt[O]||(O=Jt[O].decompress(_),!O))return null;try{return JSON.parse(O)}catch{return null}}(y||""),nr(y)?y:null}},nn={_pprv:xs("_pprv",di,(un=(un=Cr().cookies)==null?void 0:un._pprv)==null||!un.jsonOnly),_pcid:xs("_pcid",vr),_pcus:xs("_pcus",_r,!0),_pctx:fn},en=Tt(qe=nn).reduce(function(y,x){return y[x]=ws(qe[x]),y},{}),Zn=function(){var y=null,x=null;return{register:function(O){return y=Ye(Ye({},O.fields),y),x=Ye(Ye({},O.cookieByName),x)},get wrappers(){return x},get:function(){var O={};return x&&Tt(x).forEach(function(_){O=Ye(Ye({},O),x[_].get())}),O},set:function(O,_){_===void 0&&(_=null);var X={};Tt(O).forEach(function(se){var me=O[se],Oe=y==null?void 0:y[se];Oe&&(X[Oe]||(X[Oe]={wrapper:x==null?void 0:x[Oe],data:{},update:!1,remove:!0}),X[Oe].data[se]=me,X[Oe].remove=X[Oe].remove&&me===null,_&&(X[Oe].update||me===_[se])||(X[Oe].update=!0))}),Tt(X).forEach(function(se){var Ue=X[se],me=Ue.wrapper,Oe=Ue.update,Ue=Ue.remove;Ue&&me.remove(),Oe&&!Ue&&me.set(X[se].data)})}}},sr="__pctx_connection__",xn="uvm42pas28m",Ar={},yn=(tt===void 0&&(tt=!1),function(y,x){var O=Co();try{Object.defineProperty(window,sr,{configurable:tt,set:function(_){var X=_();X===xn?_(O):X==="mrlqf5trgho"&&(O=Co())}})}catch{}return window[sr]=function(_){return _&&(O=_),xn},O(y,x)}),Ir=function(y){return y.includes("*")},Du=function(y,x){return[new RegExp("^"+y.replace(/\*/g,".*")+"$"),x]},Ou=function(y,x){for(var O=0,_=x;O<_.length;O++){var X=_[O];if(X[0].test(y))return X[1]}return null},ia=function(y){function x(X){return O[X]||Ou(X,_)||_r}var O=Object.assign({},y.items),_=iu(O);return function(Be,se){var me,Oe,Ue,Ke=Cr().requireConsent,Te=!Et(Be),Me=Te?[Be]:Be,Be=(Ue=se||y.getConsent())?Ue.mode===Jn?(me=function(Ze,$e,ze){if($e=$e&&Io($e,ze),!$e)return null;for(var kt=[],ot={},Ht=0,We=$e.patches;Ht<We.length;Ht++){var si=We[Ht],mt=si.action,ur=si.with,si=si.item;si.type===Ze&&(ot[si.key]=mt={action:mt,data:ur===void 0?null:ur},Ir(si.key))&&kt.push(Du(si.key,mt))}return{source:$e.source,getModifier:function(Ti){return ot[Ti]||Ou(Ti,kt)}}}(y.type,Ue.modifier,y.log))?(Oe=me.source,Me.map(function(Ze){var $e=me.getModifier(Ze),ze=(ze=$e==null?void 0:$e.action,kt=$e==null?void 0:$e.data,ze==="obfuscate"?kt:null),kt={name:Ze,allowed:$e!=null&&$e.action?function(ot){switch(ot){case"include":return!0;case"exclude":return!1;case"obfuscate":return!0}}($e.action):uo(Oe,x(Ze))};return ze!==null&&(kt.data=ze),kt})):Fe():Me.map(function(Ze){return{name:Ze,allowed:uo(Ue.mode,x(Ze))}}):Fe();function Fe(){return Me.map(function(Ze){return{name:Ze,allowed:!Ke}})}return Te?Be[0]:Be}},ou=Object.freeze({__proto__:null,createCheckConsentWrapper:ia,createMask:Du,getByMask:Ou,isMask:Ir,itemsToMask:iu}),Pa=(rt={pa_vid:function(y){return Q(Vt(y||"",!0)||y)},atuserid:function(y){return Q(((y=Vt(y||"",!0))==null?void 0:y.val)||"")}},function(y){for(var x=0,O=y;x<O.length;x++){var _=function(X){try{var se=X.ls?W(X.ls)||null:(me=ae.get(X),rt[X]&&me?rt[X](me):me);if(se)return{value:se}}catch{}var me}(O[x]);if(C(_)==="object")return _.value}return null}),su=[{ls:"_cX_P"},"cX_P"],Is={PA:{browserId:["pa_vid","atuserid"].concat(su)},DMP:{browserId:su}},sf={browserId:{source:"DMP"}},Ho="@@Data-layer/",ls=Ho+"update_value",oa=Ho+"refresh_value",Fl=function(){return{_pprv:!Cr().requireConsent}},Cs=function(y,x,O){O=O===1?"can not be":"was",console.warn('[DL]: Consent v2: the "'.concat(y,'" has a conflicted consent mode, ')+"mode ".concat(O,' changed to "').concat(x,'"'))},Nr=(En=function(y){ge(y),D(y),je(y)},Js=Js=en,Xn={fields:Tt(or=vt=Bs).reduce(function(y,x){var O=or[x].cookieName;return O!==null&&(y[x]=O),y},{}),cookieByName:Js},_t=yn("data-layer",Xn),qt=!1,vn=new Map,It=new Set,Tn=new Map,Wn=function(){if(_t)return _t;throw new Error("DataLayer can't be connected")},$r=function(y){var x=Wn().registeredCookiesWrapper;x&&y(x)},lo=function(y){$r(function(x){y.forEach(function(O){O=x[O],O&&O.lazyActive()})})},us=function(){function y(O){return Tt(x).reduce(function(_,X){var se=x[X];return se[O]!==void 0&&(_[X]=se[O]),_},{})}var x={};return{add:function(O,_){x[O]=_},call:function(){var O;O=y("protect"),0<Tt(O).length&&Wn().setProtectionData(O),O=y("protectUnsafe"),0<Tt(O).length&&Wn().setProtectionDataUnsafe(O)}}},Ni=function(y,x){return Tt(y).reduce(function(O,_){var X=Tn.get(_),se=y[_];return X&&(O[_]=x?x(X,se):X.get(se)),O},{})},vi=function(Ue,x,O){O===void 0&&(O=!1);var _,Oe=Ue,X=Xt(),se=(Lr(Ue)&&((_={})[Ue]=x,Oe=_),us()),me=us(),Oe=Tt(Oe).reduce(function(Ke,Te){var Me=Oe[Te],Be=Tn.get(Te),Fe=Te;return Be!=null&&Be.readonly||(Be&&Be.cookieName&&X.add(Be.cookieName),Be&&Me!==Qn[Te]&&(Me===oa?(Ke[Te]=Be.refresh(Qn[Te],function(Ze){me.add(Fe,Ze)}),Ke[Te]!==Qn[Te]&&se.add(Fe,{protectUnsafe:!1})):Ke[Te]=Me===ls?Be.update(Qn[Te],function(Ze){me.add(Fe,Ze)}):Be.set(Me,Qn[Te],function(Ze){me.add(Fe,Ze)}))),Ke},{}),Ue=(lo(X.values()),se.call(),Wn().updateData(Oe));return Ue&&O&&(x=Tt(Ue).reduce(function(Ke,Te){return Ye(Ye({},Ke),((Ke={})[Te]=!1,Ke))},{}),Wn().setProtectionDataUnsafe(x),Wn().updateData(Oe)),me.call(),Ue&&Ni(Ue)},{init:function(y){var x,O,_,X,se,me;y===void 0&&(y={}),qt||(_t=_t||yn("data-layer",Xn),x=Ye(Ye({},y),re()),O=x.cookieDefault,$r(function(Oe){Tt(Oe).forEach(function(Ue){var Ke,Te,Be=Oe[Ue].cookieName,Me=(Me=x.cookies)==null?void 0:Me[Be],Be=((Be=x.cookies)==null?void 0:Be.storageMode)==="fixed";(Te=(Ke=Oe[Ue]).setFixedMode)!=null&&Te.call(Ke,Be),(O||Me)&&Oe[Ue].setCookieOptions(Ye(Ye({},O),Me))})}),qt=!0,Tt(vt).forEach(function(Oe){var Ue=vt[Oe];vn.set(Oe,new Set),Tn.set(Oe,Ue)}),_=!1,X=Wn().getInitCookieData(),se=Wn().getCachedData(),me=us(),y=Tt(vt).reduce(function(Oe,Ue){var Ke=Ue,Te=vt[Ue];return Oe[Ue]=(se==null?void 0:se[Ke])||Te.init(X==null?void 0:X[Ke],function(Me){me.add(Ke,Me)}),se!=null&&se[Ke]||(_=!0),Oe},{}),Qn=y,_&&Wn().updateData(y),me.call(),Wn().onUpdateData(Bl),En!=null&&En(Ul()))},set:au,get:ar,update:function(y){return Lu(y)},refresh:function(){var y,x;return!Wn().setProtectionData(((x={})["@@Data-layer/refresh_locked_key"]=!0,x))&&(y=[],Tn.forEach(function(O,_){return y.push(_)}),x=y.reduce(function(O,_){return O[_]=oa,O},{}),vi(x),!0)},protect:function(y,x){return ka(y,x)},addChangeListener:ii,removeChangeListener:function(y){It.delete(y),vn.forEach(function(x){return x.delete(y)})},terminate:function(){_t!=null&&_t.terminate(),vn.clear(),It.clear(),_t=null,qt=!1,Qn={}},updateMigration:function(){qt&&D(Ul())},get isReady(){return qt},utils:{validateModifier:Io,validateConsent:Vi,checkConsent:ou,setConsent:function(y,x,O){if(ar("consent"),y=Un(ar("purposes"),0,y,x,O)){if(y.error)return y.error;au({consent:y.consent,purposes:y.purposes})}return null},getConsent:function(){var x=ar(["consent","purposes"]),y=x.consent,x=x.purposes;return bi(y,x)},notAcquiredConsent:Ui()?Tt(Pr).reduce(function(y,x){return y[x]={mode:"not-acquired",products:Pr[x]},y},{}):null},get cookies(){return Nu()},get cookieEnabled(){return Nu()},setUnsafe:function(y,x){vi(y,x,!0)},protectUnsafe:function(y,x){return ka(y,x,!0)},updateUnsafe:function(y){return Lu(y,!0)},setCookieEnabled:function(y){$r(function(x){var O=Tt(y);O.length?O.forEach(function(_){var X=x[_];X&&X.setCookieEnabled(y[_])}):Tt(x).forEach(function(_){x[_].setCookieEnabled(y)})})}});function Nu(){var y=null;return $r(function(x){y=Tt(x).reduce(function(O,_){var X=x[_].cookieEnabled,se=x[_].fixedAt||null;return O[x[_].cookieName]=X?{enabled:X,fixedAt:se}:null,O},{})}),y}function Ul(){return{params:Tn,getConnection:Wn,addChangeListener:ii,get:ar,updateValues:vi}}function Bl(y){var x=!1;Tt(y).forEach(function(O){var _,X=Tn.get(O);X&&(_=y[O],Qn[O]!==_)&&(Qn[O]=_,x=!0,(O=vn.get(O))!=null)&&O.forEach(function(se){return se(X.get(_))})}),x&&It.forEach(function(O){return O(Ni(Qn))})}function ar(y){var x=Xt(),O=Lr(y),_=y===void 0?Qn:O?((_={})[y]=Qn[y],_):y.reduce(function(X,se){return Tn.has(se)&&(X[se]=Qn[se]),X},{});return _=Ni(_,function(X,se){return X.cookieName&&x.add(X.cookieName),X.get(se)}),lo(x.values()),O?_[y]:_}function au(y,x){return vi(y,x,!1)}function Lu(y,x){x===void 0&&(x=!1);var O=y;return Et(y)||(O=[y]),vi(O.reduce(function(_,X){return _[X]=ls,_},{}),void 0,x)}function ka(y,x,X){var _,X=(X=X===void 0?!1:X)?Wn().setProtectionDataUnsafe:Wn().setProtectionData,se=y;return Lr(y)&&((_={})[y]=x,se=_),X(se)}function ii(y,x){var O;Lr(y)?(O=vn.get(y))!=null&&O.add(x):It.add(y)}function Vs(y,x,O){x.setProperty("event_collection_platform","js"),x.setProperty("event_collection_version",x.getConfiguration("version"));var _,We=new Date,X=(x.setProperty("device_timestamp_utc",We.getTime()),x.setProperty("device_local_hour",We.getTime()),x.setProperty("device_hour",We.getHours()),"isManualPageRefresh"),se="pageview_id",me="_isNotFirstPageView",Oe=I(x.events);try{for(Oe.s();!(_=Oe.n()).done;){var Ue=_.value;Ue.name==="page.display"&&(y.getConfiguration(X)===null&&y.getConfiguration(me)&&y.setConfiguration(X,!1),y.getConfiguration("enableAutomaticPageRefresh")&&y.getConfiguration(X)===!1&&y.getConfiguration(me)&&Nr.refresh(),y.getConfiguration(me)||y.setConfiguration(me,!0)),yi(se,x,Ue)&&y._privacy.call("isPropAllowed",se)&&(Ue.data[se]=Nr.get("pageViewId"))}}catch(mt){Oe.e(mt)}finally{Oe.f()}try{var Ke,Te=new Date(new Date(Nr.cookies._pcid.fixedAt[0]).setUTCHours(0,0,0,0)).toISOString(),Me=I(x.events);try{for(Me.s();!(Ke=Me.n()).done;){var Be=Ke.value;yi("cookie_creation_date",x,Be)&&x.setProperty("cookie_creation_date",Te)}}catch(mt){Me.e(mt)}finally{Me.f()}}catch{}var Fe,Ze=Nr.get("content");for(Fe in Ze)if(Object.prototype.hasOwnProperty.call(Ze,Fe)){var $e,ze=Fe==="createdAt"||Fe==="tags"?{createdAt:"content_publication_date",tags:"tags_array"}[Fe]:"content_".concat(Fe).replace(/[\w]([A-Z])/g,function(mt){return mt[0]+"_"+mt[1]}).toLowerCase(),kt=I(x.events);try{for(kt.s();!($e=kt.n()).done;){var ot=$e.value;yi(ze,x,ot)&&y._privacy.call("isPropAllowed",ze)&&(ot.data[ze]=Ze[Fe])}}catch(mt){kt.e(mt)}finally{kt.f()}}x.setProperty("has_access",Nr.get("userStatus")),x.setProperty("device_screen_width",window.screen.width),x.setProperty("device_screen_height",window.screen.height),x.setProperty("device_display_width",window.innerWidth||document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:""),x.setProperty("device_display_height",window.innerHeight||document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:"");var Ht,We=function(mt,ur){var si,Ti=I(ur);try{for(Ti.s();!(si=Ti.n()).done;){var pu,_s=si.value;if(-1<mt.indexOf(_s))return[(pu=mt.split(_s))[0],pu.slice(1).join(_s)]}}catch(aa){Ti.e(aa)}finally{Ti.f()}return["",""]}(window.navigator?window.navigator.language||window.navigator.userLanguage:"",["-","_"]),We=(x.setProperty("browser_language",We[0]),x.setProperty("browser_language_local",We[1]),x.setProperty("previous_url",document.referrer||""),document.title&&x.setProperty("page_title_html",document.title),x.getConfiguration("addEventURL").toString()==="true");!We&&x.getConfiguration("addEventURL")!=="withoutQS"||x.setProperty("event_url_full",We?window.location.href.split("#")[0]:"".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname));try{y.getConfiguration("allowHighEntropyClientHints")?window.navigator.userAgentData.getHighEntropyValues(["architecture","bitness","brands","mobile","model","platform","platformVersion","uaFullVersion","fullVersionList"]).then(function(mt){uu(x,mt)}).finally(function(){U(y,x,O)}):(Ht={brands:window.navigator.userAgentData.brands,platform:window.navigator.userAgentData.platform,mobile:window.navigator.userAgentData.mobile},uu(x,Ht),U(y,x,O))}catch{U(y,x,O)}}function yi(y,x,O){if(x.hasProperty(y)&&x.properties[y].options.events){if(x=x.properties[y].options.events,-1<x.indexOf(O.name))return;var _,X=I(x);try{for(X.s();!(_=X.n()).done;){var se=_.value;if(se.charAt(se.length-1)==="*"&&O.name.indexOf(se.substring(0,se.length-1))===0)return}}catch(me){X.e(me)}finally{X.f()}}return O.data[y]===void 0}function Si(y){return y!==void 0}function uu(y,x){var O=[{metric:"brands",property:"ch_ua"},{metric:"architecture",property:"ch_ua_arch"},{metric:"bitness",property:"ch_ua_bitness"},{metric:"fullVersionList",property:"ch_ua_full_version_list"},{metric:"mobile",property:"ch_ua_mobile"},{metric:"model",property:"ch_ua_model"},{metric:"platform",property:"ch_ua_platform"},{metric:"platformVersion",property:"ch_ua_platform_version"},{metric:"uaFullVersion",property:"ch_ua_full_version"}];if(Si(x))for(var _=0;_<O.length;_++)Si(x[O[_].metric])&&y.setProperty(O[_].property,x[O[_].metric])}function af(y,x,O){function _(X){U(y,x,O,X)}x.options&&x.options.onBeforeBuild?x.options.onBeforeBuild(y,x,_):_()}function Ms(y,x,O){function _(X){U(y,x,O,X)}x.options&&x.options.onBeforeSend?x.options.onBeforeSend(y,x,_):_()}function Ps(y,x,O){y._privacy.call("filterEvents",x.events),y._privacy.call("filterProps",x.properties);for(var _=x.events,X=0;X<_.length;X++){y._privacy.call("filterProps",_[X].data,_[X].name);var se,me=y._privacy.call("getModeMetadata")||{};for(se in me)Object.prototype.hasOwnProperty.call(me,se)&&x.setProperty(se,me[se])}U(y,x,O)}function oi(y,x,O){var _,X=[];for(_ in x.properties)if(Object.prototype.hasOwnProperty.call(x.properties,_)){var se,me=!1,Oe=I(x.events);try{for(Oe.s();!(se=Oe.n()).done;){var Ue=se.value,Ke=!1,Te=x.properties[_].options.events;if(Te)if(-1<Te.indexOf(Ue.name))Ke=!0;else{var Me,Be=I(Te);try{for(Be.s();!(Me=Be.n()).done;){var Fe=Me.value;if(Fe.charAt(Fe.length-1)==="*"&&Ue.name.indexOf(Fe.substring(0,Fe.length-1))===0){Ke=!0;break}}}catch(We){Be.e(We)}finally{Be.f()}}else Ke=!0;Ke&&(Ue.data[_]=x.properties[_].value,me=!0)}}catch(We){Oe.e(We)}finally{Oe.f()}me&&!x.properties[_].options.persistent&&X.push(_)}for(var Ze=0,$e=X;Ze<$e.length;Ze++)delete y._properties[$e[Ze]];if(!x.getConfiguration("sendEmptyProperties")){var ze,kt=I(x.events);try{for(kt.s();!(ze=kt.n()).done;){var ot,Ht=ze.value;for(ot in Ht.data)!Object.prototype.hasOwnProperty.call(Ht.data,ot)||Ht.data[ot]!==""&&Ht.data[ot]!==void 0||delete Ht.data[ot]}}catch(We){kt.e(We)}finally{kt.f()}}U(y,x,O)}function lu(y,x,O){(y._privacy.call("getMode")!==y._privacy.modeEnum.OPTOUT||y._privacy.call("getMode")===y._privacy.modeEnum.OPTOUT&&x.getConfiguration("sendEventWhenOptout"))&&0<x.build.data.events.length&&F.post(x.build.url,JSON.stringify(x.build.data)),U(y,x,O)}function cu(y,x,O){x.properties.user_id!==void 0?U(y,x,O):y.getUser(function(_){var X;_!==null&&(x.setProperty("user_id",_.id,X={persistent:!0}),x.setProperty("user_category",_.category,X),x.setProperty("user_recognition",!0,X)),U(y,x,O)})}function Lh(y,x,O){y._storage.getItem(x.getConfiguration("storageVisitor"),function(_){var X;x.getConfiguration("isVisitorClientSide")&&(x.visitorId=x.getConfiguration("visitorId")||Nr.get("browserId"),x.getConfiguration("isLegacyPrivacy")||y.consent.getMode()!=="opt-out"||(x.visitorId="OPT-OUT"),X=x.visitorId!=="OPT-OUT"&&x.visitorId!=="no-consent"&&x.visitorId!=="no-storage"&&x.visitorId!==x.getConfiguration("visitorId"),x.visitorId!==Nr.get("browserId"))&&X&&(x.visitorId=x.visitorId+"-NO"),U(y,x,O)})}function uf(y,x,O){function _(me){(me=se(Ra(O.dataLayer,O.items,y.getNames),me))!=null&&me.forEach(function(Oe){Oe.allowed?Oe.data&&y.set(Oe.name,Oe.data):y.remove(Oe.name)})}var X=ju(O),se=fu(O.dataLayer,{items:O.items,type:x,getConsent:X});return x=O.checkConsentOnInit===void 0&&O.enableAutoRemove,O.enableAutoRemove&&_l(O,_),x&&_(X()),Object.assign({},y,{set:function(me,Oe,Ue){var Ke=se(me);Ke!=null&&Ke.allowed&&(Ke=(Ke=Ke.data)!=null?Ke:Oe,y.set.apply(null,Ue?[me,Ke,Ue]:[me,Ke]))},check:se})}function Vl(y,x){return{check:fu(x.dataLayer,{items:x.items,type:y,getConsent:ju(x)})}}var lf=function(y){this.setItem=function(x,O,_,X){x="".concat(x,"=").concat(y.getConfiguration("encodeStorageBase64")?N.base64.encode(JSON.stringify(O)):encodeURIComponent(JSON.stringify(O))),x=(x=(x=(x=(x+=";path=".concat(y.getConfiguration("cookiePath")))+";domain=".concat(y.getConfiguration("cookieDomain")))+(y.getConfiguration("cookieSecure")?";secure":""))+";samesite=".concat(y.getConfiguration("cookieSameSite")))+(_?";expires=".concat(_.toUTCString()):""),document.cookie=x,X&&X()},this.getItem=function(X,O){var _=null,X=new RegExp("(?:^| )".concat(X,"=([^;]+)")).exec(document.cookie)||null;if(X)try{_=JSON.parse(decodeURIComponent(X[1]))}catch{_=JSON.parse(N.base64.decode(X[1]))}O&&O(_)},this.deleteItem=function(x,O){var _=new Date;_.setTime(_.getTime()-1e3),this.setItem(x,"",_,O)}},ju=function(y){return function(){var x=y.dataLayer.get("consent");return x&&x[y.productName]||null}},_l=function(y,x){function O(X){(X=(X==null?void 0:X[y.productName])||null)!==_&&x(_=X)}var _=null;return y.dataLayer.addChangeListener("consent",O),function(){y.dataLayer.removeChangeListener(O)}},fu=function(y,x){return y.utils.checkConsent.createCheckConsentWrapper(x)},Ra=function(y,x,O){var _=y.utils.checkConsent,X=_.itemsToMask(x),se=Object.keys(x).filter(function(me){return!_.isMask(me)});return O().filter(function(me){return se.includes(me)||_.getByMask(me,X)})},sa={createLocalStorage:function(y){x=y.dataLayer,X=Xe.__protected__.ttlName,_=fu((x={dataLayer:x,productName:"DL"}).dataLayer,{items:((O={})[X]="mandatory",O),type:"localStorage",getConsent:ju(x)}),se=function(){var Te=_(X);return Te.allowed&&!Te.data},me=!0,_l(x,Ue),Ue();var x,O,_,X,se,me,Oe=function(){return me};function Ue(){(me=se())||Xe.remove(X)}var Ke=uf(Xe,"localStorage",y);return Object.assign({},Ke,{set:function(Te,Me,Be){var Fe=Be;return Be!=null&&Be.expires&&!Oe()&&delete(Fe=Object.assign({},Be)).expires,Ke.set(Te,Me,Fe)}})},createProperty:function(y){return Vl("property",y)},createCookie:function(y){function x(Te){(Te=Ke(Ra(y.dataLayer,Oe,ae.getNames),Te))!=null&&Te.forEach(function(Me){function Be(){return se[Me.name]||_.getByMask(Me.name,me)||Ue}Me.allowed?Me.data&&ae.set(Me.name,Me.data,Be()):ae.remove(Me.name,Be())})}var O,_=y.dataLayer.utils.checkConsent,X=ju(y),se={},me=[],Oe={},Ue={},Ke=(Object.keys(y.items).forEach(function(Te){var Me,Be,Fe,Ze,$e=y.items[Te];$e.type?(Me=$e.type,Be=$e.domain,Fe=$e.path,Ze={},Oe[Te]=Me,Be&&(Ze.domain=Be),Fe&&(Ze.path=Fe),_.isMask(Te)?me.push(_.createMask(Te,Ze)):se[Te]=Ze):Oe[Te]=$e}),fu(y.dataLayer,{items:Oe,type:"cookie",getConsent:X}));return O=!(y.checkConsentOnInit!==void 0||!y.enableAutoRemove),y.enableAutoRemove&&(Ue=y.enableAutoRemove,_l(y,x)),O&&x(X()),Object.assign({},ae,{check:Ke,set:function(Te,Me,Be,Fe){var Ze=Ke(Te);Ze!=null&&Ze.allowed&&ae.set(Te,(Te=Ze.data)!=null?Te:Me,Be,Fe)}})},createSessionStorage:function(y){return uf(Rn,"sessionStorage",y)},createEvent:function(y){return Vl("event",y)}},Yt={"*":"optional",pa_vid:"mandatory",pa_privacy:"mandatory",atuserid:"essential"},jh={"click.exit":"mandatory","click.navigation":"mandatory","click.download":"mandatory","click.action":"mandatory","page.display":"mandatory"},Fh={"*":"optional",connection_type:"mandatory",device_timestamp_utc:"mandatory",visitor_privacy_consent:"mandatory",visitor_privacy_mode:"mandatory",ch_ua:"mandatory",ch_ua_arch:"mandatory",ch_ua_bitness:"mandatory",ch_ua_full_version:"mandatory",ch_ua_full_version_list:"mandatory",ch_ua_mobile:"mandatory",ch_ua_model:"mandatory",ch_ua_platform:"mandatory",ch_ua_platform_version:"mandatory",app_crash:"essential",app_crash_class:"essential",app_crash_screen:"essential",app_version:"essential",browser:"essential",browser_cookie_acceptance:"essential",browser_group:"essential",browser_version:"essential",click:"essential",click_chapter1:"essential",click_chapter2:"essential",click_chapter3:"essential",click_full_name:"essential",connection_monitor:"essential",connection_organisation:"essential",cookie_creation_date:"essential",date:"essential",date_day:"essential",date_daynumber:"essential",date_month:"essential",date_monthnumber:"essential",date_week:"essential",date_year:"essential",date_yearofweek:"essential",device_brand:"essential",device_display_height:"essential",device_display_width:"essential",device_name:"essential",device_name_tech:"essential",device_screen_diagonal:"essential",device_screen_height:"essential",device_screen_width:"essential",device_type:"essential",event_collection_platform:"essential",event_collection_version:"essential",event_hour:"essential",event_id:"essential",event_minute:"essential",event_position:"essential",event_second:"essential",event_time:"essential",event_time_utc:"essential",event_url:"essential",event_url_domain:"essential",event_url_full:"essential",exclusion_cause:"essential",exclusion_type:"essential",geo_city:"essential",geo_continent:"essential",geo_country:"essential",geo_metro:"essential",geo_region:"essential",goal_type:"essential",hit_time_utc:"essential",os:"essential",os_group:"essential",os_version:"essential",os_version_name:"essential",page:"essential",page_chapter1:"essential",page_chapter2:"essential",page_chapter3:"essential",page_duration:"essential",page_full_name:"essential",page_position:"essential",page_title_html:"essential",page_url:"essential",pageview_id:"essential",previous_url:"essential",privacy_status:"essential",site:"essential",site_env:"essential",site_id:"essential",site_platform:"essential",src:"essential",src_detail:"essential",src_direct_access:"essential",src_organic:"essential",src_organic_detail:"essential",src_portal_domain:"essential",src_portal_site:"essential",src_portal_site_id:"essential",src_portal_url:"essential",src_referrer_site_domain:"essential",src_referrer_site_url:"essential",src_referrer_url:"essential",src_se:"essential",src_se_category:"essential",src_se_country:"essential",src_type:"essential",src_url:"essential",src_url_domain:"essential",src_webmail:"essential"};function cs(y,x){var O;return O=x,window.pdl&&window.pdl.consent_items&&window.pdl.consent_items.PA&&window.pdl.consent_items.PA[O]&&Object.assign(y,window.pdl.consent_items.PA[x]),y}function Fu(y){this.storageKeys=["pa_vid","pa_user","pa_privacy","atuserid"],this.propertyConsent={},this.eventConsent={},this.storageConsent={},this.consentItems={propertyItems:{},eventItems:{},cookieItems:{}},this.modeMetadata={"opt-in":{visitor_privacy_consent:!0,visitor_privacy_mode:"optin"},"opt-out":{visitor_privacy_consent:!1,visitor_privacy_mode:"optout"},essential:{visitor_privacy_consent:!1,visitor_privacy_mode:"exempt"},custom:{visitor_privacy_consent:!1,visitor_privacy_mode:"custom"}},this.init=function(){this.consentItems={propertyItems:cs(Fh,"properties"),eventItems:cs(jh,"events"),cookieItems:cs(Yt,"storages")},this.propertyConsent=sa.createProperty({dataLayer:Nr,productName:"PA",items:this.consentItems.propertyItems}),this.eventConsent=sa.createEvent({dataLayer:Nr,productName:"PA",items:this.consentItems.eventItems}),this.storageConsent=sa.createCookie({dataLayer:Nr,productName:"PA",items:this.consentItems.cookieItems}),y.getConfiguration("isLegacyPrivacy")||(this.initMode(),this.filterKeys())},this.initMode=function(){Nr.get("consent")===null&&(window.pdl.consent&&window.pdl.consent.defaultPreset?Nr.set("consent",0):this.setMode("opt-in"))},this.setMode=function(x){Nr.set("consent",{PA:{mode:x}}),this.filterKeys()},this.setPresets=function(x){Nr.set("consent",x),this.filterKeys()},this.getMode=function(){var x="opt-in",O=Nr.get("consent");return x=O&&O.PA&&O.PA.mode?Nr.get("consent").PA.mode:x},this.setCustomModeMetadata=function(x,O){this.modeMetadata.custom.visitor_privacy_mode=O||"custom",this.modeMetadata.custom.visitor_privacy_consent=x},this.getModeMetadata=function(){return this.modeMetadata[this.getMode()]||{}},this.getConsentItems=function(){return this.consentItems},this.isPropAllowed=(function(x){return this.propertyConsent.check(x).allowed}).bind(this),this.isEventAllowed=(function(x){return this.eventConsent.check(x).allowed}).bind(this),this.isKeyAllowed=(function(x){return this.storageConsent.check(x).allowed}).bind(this),this.filterProps=function(x){for(var O in x)Object.prototype.hasOwnProperty.call(x,O)&&!this.isPropAllowed(O)&&delete x[O]},this.filterEvents=function(x){for(var O=x.length-1;0<=O;O--)this.isEventAllowed(x[O].name)||x.splice(O,1)},this.filterKeys=function(){var x,O=I(this.storageKeys);try{for(O.s();!(x=O.n()).done;){var _=x.value;this.isKeyAllowed(_)||y._storage.deleteItem(_)}}catch(X){O.e(X)}finally{O.f()}},this.setItem=function(x,O,_,X){this.isKeyAllowed(x)?y._storage.setItem(x,O,_,X):X&&X()},this.dl=Nr,this.init()}function co(y,x,O,_){var X,se=O?null:y,me=x||[],Oe=!1,Ue=!1,Ke=!1;if(0<me.length){for(var Te=0;Te<me.length;Te++)Me(me[Te],se);Be()}function Me(Fe,Ze){try{(function $e(ze,kt,ot,Ht){var We=ze[kt[0]];return We===void 0||(kt.length===1?(We.apply(Ht||ze,ot),!1):$e(We,kt.slice(1),ot,Ht))})(y,Fe[0].split("."),Fe.slice(1),Ze)?Ue=!0:Oe=!0}catch{Ue=!0}}function Be(){Ue&&Oe&&!Ke&&(console.error("Piano Analytics SDK - window.".concat(_,' is used for Piano Analytics integration and somewhere else. Please check "queueVarName" configuration if needed.')),Ke=!0)}O&&(X=window[_].push.bind(window[_]),window[_].push=function(Fe){Me(Fe),Be(),X(Fe)})}function ba(y){function x(Te,Me,Be,Fe){return Be=me(Me[Be].events[Te],Fe),Me=me(Me["*"].events[Te],Fe),Be||Me}function O(Te,Me,Be,Fe,ze){var $e,ze=ze?($e=Oe(Me[Be].properties,Te,Fe,ze),Oe(Me["*"].properties,Te,Fe,ze)):($e=Ue(Me[Be].properties,Te,Fe),Ue(Me["*"].properties,Te,Fe));return $e||ze}function _(Te,Me,Be,Fe){return Be=Ke(Me[Be].storage,Te,Fe),Me=Ke(Me["*"].storage,Te,Fe),Be||Me}var X=y.getConfiguration("privacy"),se=(this.currentMode="",this.modes=X.modes,this._storageKeys=Object.assign(X.legacyKeys,X.storageKeys),this.init=function(){y.getConfiguration("isLegacyPrivacy")&&(window._pac=window._pac||{privacy:[]},co(this,window._pac.privacy),y._storage.getItem(X.storageKey,(function(Te){this.setMode(Te&&this.modes[Te]?Te:y.getConfiguration("privacyDefaultMode"))}).bind(this)))},this.setMode=function(Te){Te!==this.currentMode&&this.modes[Te]&&(this.currentMode=Te,y._storage.getItem(X.storageKey,(function(Me){Te==="optout"||Te==="no-consent"||Te==="no-storage"?y.setConfiguration("visitorId",this.modes[Te].visitorId):y.getConfiguration("visitorId")!=="OPT-OUT"&&y.getConfiguration("visitorId")!=="no-consent"&&y.getConfiguration("visitorId")!=="no-storage"||y.cfg.deleteProperty("visitorId"),this.filterProps(y._properties),this.filterKeys(),Me!==Te&&((Me=new Date).setTime(Me.getTime()+24*y.getConfiguration("storageLifetimePrivacy")*60*60*1e3),this.setItem(X.storageKey,Te,Me))}).bind(this)))},this.createMode=function(Te,Me){var Be;this.modes[Te]||((Be=L(this.modes.exempt)).name=Te,Be.properties.include.visitor_privacy_mode=Te,Be.properties.include.visitor_privacy_consent=Me,this.modes[Te]=Be)},this.getMode=function(){return this.currentMode},(function(Te,Me,Be,Fe,Ze,$e){var ze=["*"],kt=["*"],ot="properties",Ht=Fe?"forbidden":"allowed";Me&&(ze=typeof Me=="string"?[Me]:Me),Be&&(kt=typeof Be=="string"?[Be]:Be),Ze&&(ot="storage"),$e&&(ot="events");for(var We=0;We<ze.length;We++)if(this.modes[ze[We]]!==void 0)for(var mt=this.modes[ze[We]],ur=0;ur<kt.length;ur++){var si=mt[ot][Ht];si[kt[ur]]!==void 0||Ze||$e||(si[kt[ur]]={});for(var Ti=0;Ti<Te.length;Ti++)Ze||$e?si[Te[Ti]]=!0:si[kt[ur]][Te[Ti]]=!0}}).bind(this)),me=(this.include={properties:function(Te,Me,Be){se(Te,Me,Be)},property:function(Te,Me,Be){se([Te],Me,Be)},storageKeys:function(Te,Me){se(Te,Me,null,!1,!0)},storageKey:function(Te,Me){se([Te],Me,null,!1,!0)},events:function(Te,Me){se(Te,Me,null,!1,!1,!0)},event:function(Te,Me){se([Te],Me,null,!1,!1,!0)}},this.exclude={properties:function(Te,Me,Be){se(Te,Me,Be,!0)},property:function(Te,Me,Be){se([Te],Me,Be,!0)},storageKeys:function(Te,Me){se(Te,Me,null,!0,!0)},storageKey:function(Te,Me){se([Te],Me,null,!0,!0)},events:function(Te,Me){se(Te,Me,null,!0,!1,!0)},event:function(Te,Me){se([Te],Me,null,!0,!1,!0)}},function(Te,Me){if(Te[Me])return!0;for(var Be in Te)if(Object.prototype.hasOwnProperty.call(Te,Be)&&Be.charAt(Be.length-1)==="*"&&Me.indexOf(Be.substring(0,Be.length-1))===0)return!0;return!1}),Oe=(this.isEventAllowed=function(Be){var Me=x("forbidden",this.modes,this.currentMode,Be),Be=x("allowed",this.modes,this.currentMode,Be);return!Me&&Be},function(Te,Me,Be,Fe){var Ze,$e=Te[Me];if($e[Fe]&&$e[Fe][Be]||$e["*"][Be])return!0;for(Ze in $e)if(Object.prototype.hasOwnProperty.call($e,Ze)&&Ze.charAt(Ze.length-1)==="*"&&Fe.indexOf(Ze.substring(0,Ze.length-1))===0||Ze===Fe){for(var ze in $e[Ze])if(Object.prototype.hasOwnProperty.call($e[Ze],ze)&&(ze.charAt(ze.length-1)==="*"&&Be.indexOf(ze.substring(0,ze.length-1))===0||Be===ze))return!0}return!1}),Ue=function(Te,Me,Be){if(Me==="forbidden"&&Te[Me]["*"][Be])return!0;for(var Fe in Te[Me])if(Object.prototype.hasOwnProperty.call(Te[Me],Fe)){if(Te[Me][Fe][Be])return!0;for(var Ze in Te[Me][Fe])if(Ze.charAt(Ze.length-1)==="*"&&Be.indexOf(Ze.substring(0,Ze.length-1))===0)return!0}return!1},Ke=(this.isPropAllowed=function(Fe,Me){var Be=O("forbidden",this.modes,this.currentMode,Fe,Me),Fe=O("allowed",this.modes,this.currentMode,Fe,Me);return!Be&&Fe},function(Te,Me,Be){var Fe,Ze=Te[Me];if(Ze[Be])return!0;for(Fe in Ze)if(Object.prototype.hasOwnProperty.call(Ze,Fe)&&Fe.charAt(Fe.length-1)==="*"&&Be.indexOf(Fe.substring(0,Fe.length-1))===0)return!0;return!1});this.isKeyAllowed=function(Be){var Me=_("forbidden",this.modes,this.currentMode,Be),Be=_("allowed",this.modes,this.currentMode,Be);return!Me&&Be},this.setItem=function(Te,Me,Be,Fe){this.isKeyAllowed(Te)?y._storage.setItem(Te,Me,Be,Fe):Fe&&Fe()},this.filterProps=function(Te,Me){for(var Be in Te)Object.prototype.hasOwnProperty.call(Te,Be)&&!this.isPropAllowed(Be,Me||void 0)&&delete Te[Be]},this.filterKeys=function(){for(var Te in this._storageKeys)Object.prototype.hasOwnProperty.call(this._storageKeys,Te)&&!this.isKeyAllowed(Te)&&y._storage.deleteItem(Te)},this.filterEvents=function(Te){for(var Me=Te.length-1;0<=Me;Me--)this.isEventAllowed(Te[Me].name)||Te.splice(Me,1)},this.getModeMetadata=function(){return this.modes[this.getMode()].properties.include},this.init()}function du(y){this.modeEnum={OPTOUT:y.getConfiguration("isLegacyPrivacy")?"optout":"opt-out"},this.call=function(x){for(var O=y.getConfiguration("isLegacyPrivacy")?"privacy":"consent",_=arguments.length,X=new Array(1<_?_-1:0),se=1;se<_;se++)X[se-1]=arguments[se];return y[O][x].apply(y[O],X)}}function Hl(y){var x=y.getConfiguration("storageUser");this.setUser=function(O,_,X){var se={id:O,category:_};y.setProperties({user_id:O,user_category:_,user_recognition:!1},{persistent:!0}),X!==!1&&((O=new Date).setTime(O.getTime()+24*y.getConfiguration("storageLifetimeUser")*60*60*1e3),y._privacy.call("setItem",x,se,O))},this.getUser=function(O){y._storage.getItem(x,function(_){var X=_;!_&&y._properties.user_id&&(X={id:y._properties.user_id.value,category:y._properties.user_category.value}),O&&O(X)})},this.deleteUser=function(O){y.deleteProperty("user_id"),y.deleteProperty("user_category"),y.deleteProperty("user_recognition"),y._storage.deleteItem(x,function(){O&&O()})}}function bn(y){function x(){this.debugError={trigger:"AvInsights:Media:setContentValues:Error",level:"ERROR",messageObject:"Not an object"},this.processHeartbeatValue=function(Ue,Ke){return Ue=parseInt(Ue,10),Ue?Math.max(Ue,Ke):0},this.value2Number=function(Ue){var Ke=0;return isNaN(Number(Ue))||(Ke=Number(Ue)),Math.max(Ke,0)}}var O={minHeartbeat:y.getConfiguration("minHeartbeat"),minBufferingHeartbeat:y.getConfiguration("minBufferingHeartbeat")},_="_ATVALUE",X="_ATPREFIX";function se(Me,Ke){var Te,Me=Me.length<2||Me[1]!==":"?(Te="",Me):Me.length<4||Me[3]!==":"?(Te=Me.substring(0,1),Me.substring(2,Me.length)):(Te=Me.substring(0,3),Me.substring(4,Me.length));return Te=Te.toLowerCase(),Me=Me.toLowerCase(),{prefix:Te,key:Me}}function me(Ue){return Ue!==null&&C(Ue)==="object"&&!(Ue instanceof Array)}function Oe(Ue,Ke,Te,Me,Be){var Fe,Ze,$e,ze="",kt="",ot="",Ht=0;for($e in Ue)if(Object.prototype.hasOwnProperty.call(Ue,$e))if(ze=(Fe=se($e)).prefix||Me||"",kt=(Ke?Ke+"_":"")+Fe.key,me(Ue[$e]))Oe(Ue[$e],kt,Te,ze);else{for(Ze=kt.split("_"),ot="",Ht=0;Ht<Ze.length;Ht++)ze=(Fe=se(Ze[Ht])).prefix||ze,ot+=Fe.key+(Ht<Ze.length-1?"_":"");Te[kt=ot||kt]=Te[kt]||{},Te[kt][_]=Ue[$e],Te[kt][X]=ze}}y.avInsights={},y.avInsights.Media=function(Ue,Ke,Te){function Me(_e){_e?We.delayBufferingConfiguration=L(We.delayBufferingConfigurationBackup):We.delayConfiguration=L(We.delayConfigurationBackup)}function Be(_e,et){if(et){Ti(_e);var gt,rn={};for(gt in me(et)?rn=et:isNaN(et)?rn=JSON.parse(et):rn[0]=et,rn)Object.prototype.hasOwnProperty.call(rn,gt)&&(_e?We.delayBufferingConfiguration.push({delay:Ht.processHeartbeatValue(gt,0),number:0,timeout:-1,refresh:Ht.processHeartbeatValue(rn[gt],O.minBufferingHeartbeat)}):We.delayConfiguration.push({delay:Ht.processHeartbeatValue(gt,0),number:0,timeout:-1,refresh:Ht.processHeartbeatValue(rn[gt],O.minHeartbeat)}));pu(_e),si(_e)}}function Fe(_e,Li,gt,rn){var ir=L(ur),Li=(ir.av_session_id={},ir.av_session_id[_]=We.sessionId,ir.av_session_id[X]="",Li&&(aa(ir),We.previousEvent=_e),me(rn)&&Oe(rn,null,ir,null),Uu(ir));y.sendEvent(_e,Li,gt)}function Ze(){var _e=this,et=0,gt=0;_e.getEventDuration=function(){var rn=new Date().getTime()-et-gt;return gt+=rn,rn},_e.initBaseTime=function(){et===0&&(et=new Date().getTime())},_e.resetProperties=function(){gt=et=0},_e.initHeartbeatTimer=function(rn,ir){var Li=ir?We.delayBufferingConfiguration:We.delayConfiguration;0<Li.length&&(_s(ir),clearTimeout(Li[0].timeout),Li[0].timeout=setTimeout(function(){Li[0].number===0&&Li.splice(0,1),rn&&rn()},1e3*Li[0].refresh))},_e.stopHeartbeatTimer=function(rn){for(var ir=rn?We.delayBufferingConfiguration:We.delayConfiguration,Li=0;Li<ir.length;Li++)clearTimeout(ir[Li].timeout),ir[Li].timeout=-1}}function $e(_e,et,gt,rn,ir){mt.initBaseTime(),We.eventDuration=mt.getEventDuration(),We.previousCursorPosition=We.currentCursorPosition,We.currentCursorPosition=_e?We.previousCursorPosition+Math.floor(We.playbackSpeed*We.eventDuration):gt,et&&mt.initHeartbeatTimer(function(){$e(!0,!0)},!1),Fe("av.heartbeat",!0,rn,ir)}function ze(_e,et,gt){mt.initBaseTime(),We.eventDuration=mt.getEventDuration(),_e&&mt.initHeartbeatTimer(function(){ze(!0)},!0),Fe("av.buffer.heartbeat",!0,et,gt)}function kt(_e,et,gt){mt.initBaseTime(),We.eventDuration=mt.getEventDuration(),We.previousCursorPosition=We.currentCursorPosition,_e&&mt.initHeartbeatTimer(function(){kt(!0)},!0),Fe("av.rebuffer.heartbeat",!0,et,gt)}var ot=this,Ht=new x,We=null,mt=null,ur=null,si=function(_e){_e?We.delayBufferingConfigurationBackup=L(We.delayBufferingConfiguration):We.delayConfigurationBackup=L(We.delayConfiguration)},Ti=function(_e){_e?(We.delayBufferingConfiguration=[],We.delayBufferingConfigurationBackup=[]):(We.delayConfiguration=[],We.delayConfigurationBackup=[])},pu=function(_e){(_e?We.delayBufferingConfiguration:We.delayConfiguration).sort(function(et,gt){return et.delay<gt.delay?-1:et.delay>gt.delay?1:0})},_s=function(gt){var et,gt=gt?We.delayBufferingConfiguration:We.delayConfiguration;(et=gt[1]!==void 0?gt[1].delay:et)===void 0?gt[0].number=1:0<gt[0].number?gt[0].number--:typeof et=="number"&&(gt[0].number=Math.floor(60*(et-gt[0].delay)/gt[0].refresh)-1)},aa=function(_e){_e.av_previous_position={},_e.av_previous_position[_]=We.previousCursorPosition,_e.av_previous_position[X]="",_e.av_position={},_e.av_position[_]=We.currentCursorPosition,_e.av_position[X]="",_e.av_duration={},_e.av_duration[_]=We.eventDuration,_e.av_duration[X]="",_e.av_previous_event={},_e.av_previous_event[_]=We.previousEvent,_e.av_previous_event[X]=""},Uu=function(_e){var et,gt={};for(et in _e)Object.prototype.hasOwnProperty.call(_e,et)&&(Object.prototype.hasOwnProperty.call(_e[et],_)?gt[_e[et][X]?"".concat(_e[et][X],":").concat(et):et]=_e[et][_]:gt[et]=_e[et]);return gt};ot.set=function(_e,et){_e=se(_e),ur[_e.key]=ur[_e.key]||{},ur[_e.key][_]=et,ur[_e.key][X]=_e.prefix},ot.get=function(gt){var et=null,gt=se(gt);return et=ur[gt.key]!==void 0?ur[gt.key][_]:et},ot.del=function(_e){_e=se(_e),ur[_e.key]!==void 0&&delete ur[_e.key]},ot.setProps=function(_e){me(_e)&&Oe(_e,null,ur,null)},ot.getProps=function(){var _e,et=null;for(_e in ur)Object.prototype.hasOwnProperty.call(ur,_e)&&((et=et||{})[_e]=ur[_e][_]);return et},ot.delProps=function(){ur={}},ot.setPlaybackSpeed=function(_e){_e=Ht.value2Number(_e)||We.playbackSpeed,_e!==We.playbackSpeed&&(mt.stopHeartbeatTimer(!1),We.isPlaying&&($e(!0,!1),mt.initHeartbeatTimer(function(){$e(!0,!0)},!1)),We.playbackSpeed=_e)},ot.getSessionID=function(){return We.sessionId},ot.track=function(_e,et,gt,rn){var ir=et||{};switch(_e){case"av.heartbeat":ot.heartbeat(ir.av_position,gt,rn);break;case"av.buffer.heartbeat":ot.bufferHeartbeat(gt,rn);break;case"av.rebuffer.heartbeat":ot.rebufferHeartbeat(gt,rn);break;case"av.play":ot.play(ir.av_position,gt,rn);break;case"av.buffer.start":ot.bufferStart(ir.av_position,gt,rn);break;case"av.start":ot.playbackStart(ir.av_position,gt,rn);break;case"av.resume":ot.playbackResumed(ir.av_position,gt,rn);break;case"av.pause":ot.playbackPaused(ir.av_position,gt,rn);break;case"av.stop":ot.playbackStopped(ir.av_position,gt,rn);break;case"av.backward":ot.seekBackward(ir.av_previous_position,ir.av_position,gt,rn);break;case"av.forward":ot.seekForward(ir.av_previous_position,ir.av_position,gt,rn);break;case"av.seek.start":ot.seekStart(ir.av_previous_position,gt,rn);break;case"av.error":ot.error(ir.av_player_error,gt,rn);break;default:Fe(_e,!1,gt,rn)}},ot.heartbeat=function(_e,et,gt){var rn,ir=!0;_e!=null&&0<=_e&&(ir=!1,rn=Ht.value2Number(_e)),$e(ir,!1,rn,et,gt)},ot.bufferHeartbeat=function(_e,et){ze(!1,_e,et)},ot.rebufferHeartbeat=function(_e,et){kt(!1,_e,et)},ot.play=function(_e,et,gt){mt.initBaseTime(),_e=Ht.value2Number(_e),We.eventDuration=0,We.previousCursorPosition=_e,We.currentCursorPosition=_e,We.isPlaying=!1,We.isPlaybackActivated=!1,mt.stopHeartbeatTimer(!1),mt.stopHeartbeatTimer(!0),Fe("av.play",!0,et,gt)},ot.bufferStart=function(_e,et,gt){mt.initBaseTime(),_e=Ht.value2Number(_e),We.eventDuration=mt.getEventDuration(),We.previousCursorPosition=We.currentCursorPosition,We.currentCursorPosition=_e,mt.stopHeartbeatTimer(!1),mt.stopHeartbeatTimer(!0),We.isPlaybackActivated?(mt.initHeartbeatTimer(function(){kt(!0)},!0),Fe("av.rebuffer.start",!0,et,gt)):(mt.initHeartbeatTimer(function(){ze(!0)},!0),Fe("av.buffer.start",!0,et,gt))},ot.playbackStart=function(_e,et,gt){mt.initBaseTime(),_e=Ht.value2Number(_e),We.eventDuration=mt.getEventDuration(),We.previousCursorPosition=_e,We.currentCursorPosition=_e,We.isPlaying=!0,We.isPlaybackActivated=!0,mt.stopHeartbeatTimer(!1),mt.stopHeartbeatTimer(!0),mt.initHeartbeatTimer(function(){$e(!0,!0)},!1),Fe("av.start",!0,et,gt)},ot.playbackResumed=function(_e,et,gt){mt.initBaseTime(),_e=Ht.value2Number(_e),We.eventDuration=mt.getEventDuration(),We.previousCursorPosition=We.currentCursorPosition,We.currentCursorPosition=_e,We.isPlaying=!0,We.isPlaybackActivated=!0,mt.stopHeartbeatTimer(!1),mt.stopHeartbeatTimer(!0),mt.initHeartbeatTimer(function(){$e(!0,!0)},!1),Fe("av.resume",!0,et,gt)},ot.playbackPaused=function(_e,et,gt){mt.initBaseTime(),_e=Ht.value2Number(_e),We.eventDuration=mt.getEventDuration(),We.previousCursorPosition=We.currentCursorPosition,We.currentCursorPosition=_e,We.isPlaying=!1,We.isPlaybackActivated=!0,mt.stopHeartbeatTimer(!1),mt.stopHeartbeatTimer(!0),Fe("av.pause",!0,et,gt)},ot.playbackStopped=function(_e,et,gt){mt.initBaseTime(),_e=Ht.value2Number(_e),We.eventDuration=mt.getEventDuration(),We.previousCursorPosition=We.currentCursorPosition,We.currentCursorPosition=_e,We.isPlaying=!1,We.isPlaybackActivated=!1,mt.stopHeartbeatTimer(!1),mt.stopHeartbeatTimer(!0),mt.resetProperties(),Me(!1),Me(!0),Fe("av.stop",!0,et,gt),We.previousCursorPosition=0,We.currentCursorPosition=0,We.eventDuration=0,We.previousEvent="",We.sessionId=P.v4()},ot.seek=function(_e,et,gt,rn){_e=Ht.value2Number(_e),et=Ht.value2Number(et),et<_e?ot.seekBackward(_e,et,gt,rn):ot.seekForward(_e,et,gt,rn)},ot.seekBackward=function(_e,et,gt,rn){ot.seekStart(_e,null,rn),We.eventDuration=0,We.previousCursorPosition=Ht.value2Number(_e),We.currentCursorPosition=Ht.value2Number(et),Fe("av.backward",!0,gt,rn)},ot.seekForward=function(_e,et,gt,rn){ot.seekStart(_e,null,rn),We.eventDuration=0,We.previousCursorPosition=Ht.value2Number(_e),We.currentCursorPosition=Ht.value2Number(et),Fe("av.forward",!0,gt,rn)},ot.seekStart=function(_e,et,gt){_e=Ht.value2Number(_e),We.previousCursorPosition=We.currentCursorPosition,We.currentCursorPosition=_e,We.isPlaying?We.eventDuration=mt.getEventDuration():We.eventDuration=0,Fe("av.seek.start",!0,et,gt)},ot.adClick=function(_e,et){Fe("av.ad.click",!1,_e,et)},ot.adSkip=function(_e,et){Fe("av.ad.skip",!1,_e,et)},ot.error=function(_e,et,gt){var rn={};(rn=me(gt)?gt:rn).av_player_error=String(_e),Fe("av.error",!1,et,rn)},ot.display=function(_e,et){Fe("av.display",!1,_e,et)},ot.close=function(_e,et){Fe("av.close",!1,_e,et)},ot.volume=function(_e,et){Fe("av.volume",!1,_e,et)},ot.subtitleOn=function(_e,et){Fe("av.subtitle.on",!1,_e,et)},ot.subtitleOff=function(_e,et){Fe("av.subtitle.off",!1,_e,et)},ot.fullscreenOn=function(_e,et){Fe("av.fullscreen.on",!1,_e,et)},ot.fullscreenOff=function(_e,et){Fe("av.fullscreen.off",!1,_e,et)},ot.quality=function(_e,et){Fe("av.quality",!1,_e,et)},ot.speed=function(_e,et){Fe("av.speed",!1,_e,et)},ot.share=function(_e,et){Fe("av.share",!1,_e,et)},Be(!(We={previousCursorPosition:0,currentCursorPosition:0,eventDuration:0,playbackSpeed:1,previousEvent:"",isPlaybackActivated:!1,isPlaying:!1,sessionId:"",delayConfiguration:[],delayConfigurationBackup:[],delayBufferingConfiguration:[],delayBufferingConfigurationBackup:[]}),Ue),Be(!0,Ke),We.sessionId=Te||P.v4(),mt=new Ze,Ue=window,Ke="pagehide",Te=function(){mt.stopHeartbeatTimer(!1),mt.stopHeartbeatTimer(!0)},Ue.addEventListener?Ue.addEventListener(Ke,Te,!1):Ue.attachEvent&&Ue.attachEvent("on"+Ke,Te),ur={}}}function Xr(X){var x,O=this;for(x in O.cfg=new $(L(X)||v),O.setConfiguration=O.cfg.setConfiguration,O.setConfigurations=O.cfg.setConfigurations,O.getConfiguration=O.cfg.getConfiguration,window._pac=window._pac||{privacy:[]},window._pac)Object.prototype.hasOwnProperty.call(window._pac,x)&&x!=="privacy"&&O.setConfiguration(x,window._pac[x]);this._storage=new lf(this),this._queue=new d(this),this._properties={},this._sendEvent=hu;var _,X=this;X.setConfiguration("isLegacyPrivacy",!0),window.pdl===void 0?window.pdl={migration:{browserId:{source:"PA"}},cookies:{storageMode:"fixed"}}:(window.pdl.requireConsent&&X.setConfiguration("isLegacyPrivacy",!1),window.pdl.cookies===void 0?window.pdl.cookies={storageMode:"fixed"}:window.pdl.cookies&&window.pdl.cookies.storageMode===void 0&&(window.pdl.cookies.storageMode="fixed")),Nr.init({cookieDefault:{domain:X.getConfiguration("cookieDomain"),secure:X.getConfiguration("cookieSecure"),path:X.getConfiguration("cookiePath"),samesite:X.getConfiguration("cookieSameSite")},cookies:{_pcid:{expires:X.getConfiguration("storageLifetimeVisitor")}}}),X.privacy=new ba(X),X.consent=new Fu(X),X._privacy=new du(X),this.user=new Hl(this),bn(this),_=(X=this).getConfiguration("queueVarName"),window[_]=window[_]||[],co(X,window[_],!0,_)}function hu(y,me){for(var O=[Ps,Lh,cu,Y,Vs,oi,af,J,Ms,lu],_=0;_<y.length;_++){var X={name:"",data:{}};if(typeof y[_]=="string")X.name=y[_];else{if(y[_].data!==void 0)continue;X.name=y[_].name}y[_]=X}var se,me={events:y,options:me};0<O.length&&typeof O[0]=="function"&&(se=new $(this.cfg.cloneData()),O[0](this,new M(this,me,se),O.slice(1)))}Xr.prototype.setProperty=function(y,x,O){this._privacy.call("isPropAllowed",y)&&(this._properties[y]={value:x,options:O||{}})},Xr.prototype.setProperties=function(y,x){for(var O in y)Object.prototype.hasOwnProperty.call(y,O)&&this.setProperty(O,y[O],x)},Xr.prototype.deleteProperty=function(y){delete this._properties[y]},Xr.prototype.sendEvent=function(y,x,O){this._queue.push(["_sendEvent",[{name:y,data:x}],O])},Xr.prototype.sendEvents=function(y,x){this._queue.push(["_sendEvent",y,x])},Xr.prototype.getVisitorId=function(y){var x,O=this.getConfiguration("visitorId")||null;if(O=O||Nr.get("browserId"),(x=y)&&x(O),y===void 0)return O},Xr.prototype.setVisitorId=function(y){this.setConfiguration("visitorId",y);var x=new Date;x.setTime(x.getTime()+24*this.getConfiguration("storageLifetimeVisitor")*60*60*1e3),this._privacy.call("setItem",this.getConfiguration("storageVisitor"),y,x,function(){Nr.updateMigration()})},Xr.prototype.setUser=function(y,x,O){this.user.setUser(y,x,O)},Xr.prototype.getUser=function(y){this.user.getUser(y)},Xr.prototype.deleteUser=function(){this.user.deleteUser()},(Xr.prototype.PA=Xr).prototype.refresh=function(){this.getConfiguration("isManualPageRefresh")===null&&this.setConfiguration("isManualPageRefresh",!0),this.getConfiguration("isManualPageRefresh")&&Nr.refresh()},Xr.prototype.setContentProperty=function(y,x){var O={};y==="content_publication_date"||y==="tags_array"?O[{content_publication_date:"createdAt",tags_array:"tags"}[y]]=x:O[y]=x,Nr.set("content",O)},Xr.prototype.setContentProperties=function(y){for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&this.setContentProperty(x,y[x])},gr=new Xr(v),window&&!window[gr.getConfiguration("globalVarName")]&&(window[gr.getConfiguration("globalVarName")]=gr),ra=gr,c.pianoAnalytics=ra,Object.defineProperty(c,"__esModule",{value:!0})})},4765:function(T){var f=String.prototype.replace,c=/%20/g,v={RFC1738:"RFC1738",RFC3986:"RFC3986"};T.exports={default:v.RFC3986,formatters:{RFC1738:function(C){return f.call(C,c,"+")},RFC3986:function(C){return String(C)}},RFC1738:v.RFC1738,RFC3986:v.RFC3986}},5373:function(T,f,c){var v=c(8636),C=c(2642),w=c(4765);T.exports={formats:w,parse:C,stringify:v}},2642:function(T,f,c){var v=c(7720),C=Object.prototype.hasOwnProperty,w=Array.isArray,I={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:v.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},L=function(M){return M.replace(/&#(\d+);/g,function(U,J){return String.fromCharCode(parseInt(J,10))})},z=function(M,U){return M&&typeof M=="string"&&U.comma&&M.indexOf(",")>-1?M.split(","):M},F="utf8=%26%2310003%3B",K="utf8=%E2%9C%93",N=function(U,J){var G={__proto__:null},Y=J.ignoreQueryPrefix?U.replace(/^\?/,""):U;Y=Y.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var ee=J.parameterLimit===1/0?void 0:J.parameterLimit,q=Y.split(J.delimiter,ee),oe=-1,ne,ae=J.charset;if(J.charsetSentinel)for(ne=0;ne<q.length;++ne)q[ne].indexOf("utf8=")===0&&(q[ne]===K?ae="utf-8":q[ne]===F&&(ae="iso-8859-1"),oe=ne,ne=q.length);for(ne=0;ne<q.length;++ne)if(ne!==oe){var xe=q[ne],he=xe.indexOf("]="),H=he===-1?xe.indexOf("="):he+1,we,Ae;H===-1?(we=J.decoder(xe,I.decoder,ae,"key"),Ae=J.strictNullHandling?null:""):(we=J.decoder(xe.slice(0,H),I.decoder,ae,"key"),Ae=v.maybeMap(z(xe.slice(H+1),J),function(He){return J.decoder(He,I.decoder,ae,"value")})),Ae&&J.interpretNumericEntities&&ae==="iso-8859-1"&&(Ae=L(Ae)),xe.indexOf("[]=")>-1&&(Ae=w(Ae)?[Ae]:Ae);var Ie=C.call(G,we);Ie&&J.duplicates==="combine"?G[we]=v.combine(G[we],Ae):(!Ie||J.duplicates==="last")&&(G[we]=Ae)}return G},P=function(M,U,J,G){for(var Y=G?U:z(U,J),ee=M.length-1;ee>=0;--ee){var q,oe=M[ee];if(oe==="[]"&&J.parseArrays)q=J.allowEmptyArrays&&(Y===""||J.strictNullHandling&&Y===null)?[]:[].concat(Y);else{q=J.plainObjects?Object.create(null):{};var ne=oe.charAt(0)==="["&&oe.charAt(oe.length-1)==="]"?oe.slice(1,-1):oe,ae=J.decodeDotInKeys?ne.replace(/%2E/g,"."):ne,xe=parseInt(ae,10);!J.parseArrays&&ae===""?q={0:Y}:!isNaN(xe)&&oe!==ae&&String(xe)===ae&&xe>=0&&J.parseArrays&&xe<=J.arrayLimit?(q=[],q[xe]=Y):ae!=="__proto__"&&(q[ae]=Y)}Y=q}return Y},$=function(U,J,G,Y){if(U){var ee=G.allowDots?U.replace(/\.([^.[]+)/g,"[$1]"):U,q=/(\[[^[\]]*])/,oe=/(\[[^[\]]*])/g,ne=G.depth>0&&q.exec(ee),ae=ne?ee.slice(0,ne.index):ee,xe=[];if(ae){if(!G.plainObjects&&C.call(Object.prototype,ae)&&!G.allowPrototypes)return;xe.push(ae)}for(var he=0;G.depth>0&&(ne=oe.exec(ee))!==null&&he<G.depth;){if(he+=1,!G.plainObjects&&C.call(Object.prototype,ne[1].slice(1,-1))&&!G.allowPrototypes)return;xe.push(ne[1])}if(ne){if(G.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+G.depth+" and strictDepth is true");xe.push("["+ee.slice(ne.index)+"]")}return P(xe,J,G,Y)}},d=function(U){if(!U)return I;if(typeof U.allowEmptyArrays<"u"&&typeof U.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof U.decodeDotInKeys<"u"&&typeof U.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(U.decoder!==null&&typeof U.decoder<"u"&&typeof U.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof U.charset<"u"&&U.charset!=="utf-8"&&U.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var J=typeof U.charset>"u"?I.charset:U.charset,G=typeof U.duplicates>"u"?I.duplicates:U.duplicates;if(G!=="combine"&&G!=="first"&&G!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var Y=typeof U.allowDots>"u"?U.decodeDotInKeys===!0?!0:I.allowDots:!!U.allowDots;return{allowDots:Y,allowEmptyArrays:typeof U.allowEmptyArrays=="boolean"?!!U.allowEmptyArrays:I.allowEmptyArrays,allowPrototypes:typeof U.allowPrototypes=="boolean"?U.allowPrototypes:I.allowPrototypes,allowSparse:typeof U.allowSparse=="boolean"?U.allowSparse:I.allowSparse,arrayLimit:typeof U.arrayLimit=="number"?U.arrayLimit:I.arrayLimit,charset:J,charsetSentinel:typeof U.charsetSentinel=="boolean"?U.charsetSentinel:I.charsetSentinel,comma:typeof U.comma=="boolean"?U.comma:I.comma,decodeDotInKeys:typeof U.decodeDotInKeys=="boolean"?U.decodeDotInKeys:I.decodeDotInKeys,decoder:typeof U.decoder=="function"?U.decoder:I.decoder,delimiter:typeof U.delimiter=="string"||v.isRegExp(U.delimiter)?U.delimiter:I.delimiter,depth:typeof U.depth=="number"||U.depth===!1?+U.depth:I.depth,duplicates:G,ignoreQueryPrefix:U.ignoreQueryPrefix===!0,interpretNumericEntities:typeof U.interpretNumericEntities=="boolean"?U.interpretNumericEntities:I.interpretNumericEntities,parameterLimit:typeof U.parameterLimit=="number"?U.parameterLimit:I.parameterLimit,parseArrays:U.parseArrays!==!1,plainObjects:typeof U.plainObjects=="boolean"?U.plainObjects:I.plainObjects,strictDepth:typeof U.strictDepth=="boolean"?!!U.strictDepth:I.strictDepth,strictNullHandling:typeof U.strictNullHandling=="boolean"?U.strictNullHandling:I.strictNullHandling}};T.exports=function(M,U){var J=d(U);if(M===""||M===null||typeof M>"u")return J.plainObjects?Object.create(null):{};for(var G=typeof M=="string"?N(M,J):M,Y=J.plainObjects?Object.create(null):{},ee=Object.keys(G),q=0;q<ee.length;++q){var oe=ee[q],ne=$(oe,G[oe],J,typeof M=="string");Y=v.merge(Y,ne,J)}return J.allowSparse===!0?Y:v.compact(Y)}},8636:function(T,f,c){var v=c(920),C=c(7720),w=c(4765),I=Object.prototype.hasOwnProperty,L={brackets:function(Y){return Y+"[]"},comma:"comma",indices:function(Y,ee){return Y+"["+ee+"]"},repeat:function(Y){return Y}},z=Array.isArray,F=Array.prototype.push,K=function(G,Y){F.apply(G,z(Y)?Y:[Y])},N=Date.prototype.toISOString,P=w.default,$={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:C.encode,encodeValuesOnly:!1,format:P,formatter:w.formatters[P],indices:!1,serializeDate:function(Y){return N.call(Y)},skipNulls:!1,strictNullHandling:!1},d=function(Y){return typeof Y=="string"||typeof Y=="number"||typeof Y=="boolean"||typeof Y=="symbol"||typeof Y=="bigint"},M={},U=function G(Y,ee,q,oe,ne,ae,xe,he,H,we,Ae,Ie,He,nt,Xe,it,ht,Re){for(var Qe=Y,st=Re,Xt=0,Gt=!1;(st=st.get(M))!==void 0&&!Gt;){var gn=st.get(Y);if(Xt+=1,typeof gn<"u"){if(gn===Xt)throw new RangeError("Cyclic object value");Gt=!0}typeof st.get(M)>"u"&&(Xt=0)}if(typeof we=="function"?Qe=we(ee,Qe):Qe instanceof Date?Qe=He(Qe):q==="comma"&&z(Qe)&&(Qe=C.maybeMap(Qe,function(Et){return Et instanceof Date?He(Et):Et})),Qe===null){if(ae)return H&&!it?H(ee,$.encoder,ht,"key",nt):ee;Qe=""}if(d(Qe)||C.isBuffer(Qe)){if(H){var ut=it?ee:H(ee,$.encoder,ht,"key",nt);return[Xe(ut)+"="+Xe(H(Qe,$.encoder,ht,"value",nt))]}return[Xe(ee)+"="+Xe(String(Qe))]}var In=[];if(typeof Qe>"u")return In;var Fn;if(q==="comma"&&z(Qe))it&&H&&(Qe=C.maybeMap(Qe,H)),Fn=[{value:Qe.length>0?Qe.join(",")||null:void 0}];else if(z(we))Fn=we;else{var hr=Object.keys(Qe);Fn=Ae?hr.sort(Ae):hr}var wr=he?ee.replace(/\./g,"%2E"):ee,pr=oe&&z(Qe)&&Qe.length===1?wr+"[]":wr;if(ne&&z(Qe)&&Qe.length===0)return pr+"[]";for(var Kn=0;Kn<Fn.length;++Kn){var $t=Fn[Kn],Sn=typeof $t=="object"&&typeof $t.value<"u"?$t.value:Qe[$t];if(!(xe&&Sn===null)){var Rn=Ie&&he?$t.replace(/\./g,"%2E"):$t,Ye=z(Qe)?typeof q=="function"?q(pr,Rn):pr:pr+(Ie?"."+Rn:"["+Rn+"]");Re.set(Y,Xt);var Tt=v();Tt.set(M,Re),K(In,G(Sn,Ye,q,oe,ne,ae,xe,he,q==="comma"&&it&&z(Qe)?null:H,we,Ae,Ie,He,nt,Xe,it,ht,Tt))}}return In},J=function(Y){if(!Y)return $;if(typeof Y.allowEmptyArrays<"u"&&typeof Y.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof Y.encodeDotInKeys<"u"&&typeof Y.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(Y.encoder!==null&&typeof Y.encoder<"u"&&typeof Y.encoder!="function")throw new TypeError("Encoder has to be a function.");var ee=Y.charset||$.charset;if(typeof Y.charset<"u"&&Y.charset!=="utf-8"&&Y.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var q=w.default;if(typeof Y.format<"u"){if(!I.call(w.formatters,Y.format))throw new TypeError("Unknown format option provided.");q=Y.format}var oe=w.formatters[q],ne=$.filter;(typeof Y.filter=="function"||z(Y.filter))&&(ne=Y.filter);var ae;if(Y.arrayFormat in L?ae=Y.arrayFormat:"indices"in Y?ae=Y.indices?"indices":"repeat":ae=$.arrayFormat,"commaRoundTrip"in Y&&typeof Y.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var xe=typeof Y.allowDots>"u"?Y.encodeDotInKeys===!0?!0:$.allowDots:!!Y.allowDots;return{addQueryPrefix:typeof Y.addQueryPrefix=="boolean"?Y.addQueryPrefix:$.addQueryPrefix,allowDots:xe,allowEmptyArrays:typeof Y.allowEmptyArrays=="boolean"?!!Y.allowEmptyArrays:$.allowEmptyArrays,arrayFormat:ae,charset:ee,charsetSentinel:typeof Y.charsetSentinel=="boolean"?Y.charsetSentinel:$.charsetSentinel,commaRoundTrip:Y.commaRoundTrip,delimiter:typeof Y.delimiter>"u"?$.delimiter:Y.delimiter,encode:typeof Y.encode=="boolean"?Y.encode:$.encode,encodeDotInKeys:typeof Y.encodeDotInKeys=="boolean"?Y.encodeDotInKeys:$.encodeDotInKeys,encoder:typeof Y.encoder=="function"?Y.encoder:$.encoder,encodeValuesOnly:typeof Y.encodeValuesOnly=="boolean"?Y.encodeValuesOnly:$.encodeValuesOnly,filter:ne,format:q,formatter:oe,serializeDate:typeof Y.serializeDate=="function"?Y.serializeDate:$.serializeDate,skipNulls:typeof Y.skipNulls=="boolean"?Y.skipNulls:$.skipNulls,sort:typeof Y.sort=="function"?Y.sort:null,strictNullHandling:typeof Y.strictNullHandling=="boolean"?Y.strictNullHandling:$.strictNullHandling}};T.exports=function(G,Y){var ee=G,q=J(Y),oe,ne;typeof q.filter=="function"?(ne=q.filter,ee=ne("",ee)):z(q.filter)&&(ne=q.filter,oe=ne);var ae=[];if(typeof ee!="object"||ee===null)return"";var xe=L[q.arrayFormat],he=xe==="comma"&&q.commaRoundTrip;oe||(oe=Object.keys(ee)),q.sort&&oe.sort(q.sort);for(var H=v(),we=0;we<oe.length;++we){var Ae=oe[we];q.skipNulls&&ee[Ae]===null||K(ae,U(ee[Ae],Ae,xe,he,q.allowEmptyArrays,q.strictNullHandling,q.skipNulls,q.encodeDotInKeys,q.encode?q.encoder:null,q.filter,q.sort,q.allowDots,q.serializeDate,q.format,q.formatter,q.encodeValuesOnly,q.charset,H))}var Ie=ae.join(q.delimiter),He=q.addQueryPrefix===!0?"?":"";return q.charsetSentinel&&(q.charset==="iso-8859-1"?He+="utf8=%26%2310003%3B&":He+="utf8=%E2%9C%93&"),Ie.length>0?He+Ie:""}},7720:function(T,f,c){var v=c(4765),C=Object.prototype.hasOwnProperty,w=Array.isArray,I=function(){for(var Y=[],ee=0;ee<256;++ee)Y.push("%"+((ee<16?"0":"")+ee.toString(16)).toUpperCase());return Y}(),L=function(ee){for(;ee.length>1;){var q=ee.pop(),oe=q.obj[q.prop];if(w(oe)){for(var ne=[],ae=0;ae<oe.length;++ae)typeof oe[ae]<"u"&&ne.push(oe[ae]);q.obj[q.prop]=ne}}},z=function(ee,q){for(var oe=q&&q.plainObjects?Object.create(null):{},ne=0;ne<ee.length;++ne)typeof ee[ne]<"u"&&(oe[ne]=ee[ne]);return oe},F=function Y(ee,q,oe){if(!q)return ee;if(typeof q!="object"){if(w(ee))ee.push(q);else if(ee&&typeof ee=="object")(oe&&(oe.plainObjects||oe.allowPrototypes)||!C.call(Object.prototype,q))&&(ee[q]=!0);else return[ee,q];return ee}if(!ee||typeof ee!="object")return[ee].concat(q);var ne=ee;return w(ee)&&!w(q)&&(ne=z(ee,oe)),w(ee)&&w(q)?(q.forEach(function(ae,xe){if(C.call(ee,xe)){var he=ee[xe];he&&typeof he=="object"&&ae&&typeof ae=="object"?ee[xe]=Y(he,ae,oe):ee.push(ae)}else ee[xe]=ae}),ee):Object.keys(q).reduce(function(ae,xe){var he=q[xe];return C.call(ae,xe)?ae[xe]=Y(ae[xe],he,oe):ae[xe]=he,ae},ne)},K=function(ee,q){return Object.keys(q).reduce(function(oe,ne){return oe[ne]=q[ne],oe},ee)},N=function(Y,ee,q){var oe=Y.replace(/\+/g," ");if(q==="iso-8859-1")return oe.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(oe)}catch{return oe}},P=1024,$=function(ee,q,oe,ne,ae){if(ee.length===0)return ee;var xe=ee;if(typeof ee=="symbol"?xe=Symbol.prototype.toString.call(ee):typeof ee!="string"&&(xe=String(ee)),oe==="iso-8859-1")return escape(xe).replace(/%u[0-9a-f]{4}/gi,function(nt){return"%26%23"+parseInt(nt.slice(2),16)+"%3B"});for(var he="",H=0;H<xe.length;H+=P){for(var we=xe.length>=P?xe.slice(H,H+P):xe,Ae=[],Ie=0;Ie<we.length;++Ie){var He=we.charCodeAt(Ie);if(He===45||He===46||He===95||He===126||He>=48&&He<=57||He>=65&&He<=90||He>=97&&He<=122||ae===v.RFC1738&&(He===40||He===41)){Ae[Ae.length]=we.charAt(Ie);continue}if(He<128){Ae[Ae.length]=I[He];continue}if(He<2048){Ae[Ae.length]=I[192|He>>6]+I[128|He&63];continue}if(He<55296||He>=57344){Ae[Ae.length]=I[224|He>>12]+I[128|He>>6&63]+I[128|He&63];continue}Ie+=1,He=65536+((He&1023)<<10|we.charCodeAt(Ie)&1023),Ae[Ae.length]=I[240|He>>18]+I[128|He>>12&63]+I[128|He>>6&63]+I[128|He&63]}he+=Ae.join("")}return he},d=function(ee){for(var q=[{obj:{o:ee},prop:"o"}],oe=[],ne=0;ne<q.length;++ne)for(var ae=q[ne],xe=ae.obj[ae.prop],he=Object.keys(xe),H=0;H<he.length;++H){var we=he[H],Ae=xe[we];typeof Ae=="object"&&Ae!==null&&oe.indexOf(Ae)===-1&&(q.push({obj:xe,prop:we}),oe.push(Ae))}return L(q),ee},M=function(ee){return Object.prototype.toString.call(ee)==="[object RegExp]"},U=function(ee){return!ee||typeof ee!="object"?!1:!!(ee.constructor&&ee.constructor.isBuffer&&ee.constructor.isBuffer(ee))},J=function(ee,q){return[].concat(ee,q)},G=function(ee,q){if(w(ee)){for(var oe=[],ne=0;ne<ee.length;ne+=1)oe.push(q(ee[ne]));return oe}return q(ee)};T.exports={arrayToObject:z,assign:K,combine:J,compact:d,decode:N,encode:$,isBuffer:U,isRegExp:M,maybeMap:G,merge:F}},4803:function(T,f,c){var v=c(8859),C=c(9675),w=function(K,N,P){for(var $=K,d;(d=$.next)!=null;$=d)if(d.key===N)return $.next=d.next,P||(d.next=K.next,K.next=d),d},I=function(K,N){if(K){var P=w(K,N);return P&&P.value}},L=function(K,N,P){var $=w(K,N);$?$.value=P:K.next={key:N,next:K.next,value:P}},z=function(K,N){return K?!!w(K,N):!1},F=function(K,N){if(K)return w(K,N,!0)};T.exports=function(){var N,P={assert:function($){if(!P.has($))throw new C("Side channel does not contain "+v($))},delete:function($){var d=N&&N.next,M=F(N,$);return M&&d&&d===M&&(N=void 0),!!M},get:function($){return I(N,$)},has:function($){return z(N,$)},set:function($,d){N||(N={next:void 0}),L(N,$,d)}};return P}},507:function(T,f,c){var v=c(453),C=c(6556),w=c(8859),I=c(9675),L=v("%Map%",!0),z=C("Map.prototype.get",!0),F=C("Map.prototype.set",!0),K=C("Map.prototype.has",!0),N=C("Map.prototype.delete",!0),P=C("Map.prototype.size",!0);T.exports=!!L&&function(){var d,M={assert:function(U){if(!M.has(U))throw new I("Side channel does not contain "+w(U))},delete:function(U){if(d){var J=N(d,U);return P(d)===0&&(d=void 0),J}return!1},get:function(U){if(d)return z(d,U)},has:function(U){return d?K(d,U):!1},set:function(U,J){d||(d=new L),F(d,U,J)}};return M}},2271:function(T,f,c){var v=c(453),C=c(6556),w=c(8859),I=c(507),L=c(9675),z=v("%WeakMap%",!0),F=C("WeakMap.prototype.get",!0),K=C("WeakMap.prototype.set",!0),N=C("WeakMap.prototype.has",!0),P=C("WeakMap.prototype.delete",!0);T.exports=z?function(){var d,M,U={assert:function(J){if(!U.has(J))throw new L("Side channel does not contain "+w(J))},delete:function(J){if(z&&J&&(typeof J=="object"||typeof J=="function")){if(d)return P(d,J)}else if(I&&M)return M.delete(J);return!1},get:function(J){return z&&J&&(typeof J=="object"||typeof J=="function")&&d?F(d,J):M&&M.get(J)},has:function(J){return z&&J&&(typeof J=="object"||typeof J=="function")&&d?N(d,J):!!M&&M.has(J)},set:function(J,G){z&&J&&(typeof J=="object"||typeof J=="function")?(d||(d=new z),K(d,J,G)):I&&(M||(M=I()),M.set(J,G))}};return U}:I},920:function(T,f,c){var v=c(9675),C=c(8859),w=c(4803),I=c(507),L=c(2271),z=L||I||w;T.exports=function(){var K,N={assert:function(P){if(!N.has(P))throw new v("Side channel does not contain "+C(P))},delete:function(P){return!!K&&K.delete(P)},get:function(P){return K&&K.get(P)},has:function(P){return!!K&&K.has(P)},set:function(P,$){K||(K=z()),K.set(P,$)}};return N}},9134:function(T,f,c){T.exports={h32:c(2492),h64:c(7470)}},2492:function(T,f,c){var v=c(7898).UINT32;v.prototype.xxh_update=function(P,$){var d=w._low,M=w._high,U,J;J=P*d,U=J>>>16,U+=$*d,U&=65535,U+=P*M;var G=this._low+(J&65535),Y=G>>>16;Y+=this._high+(U&65535);var ee=Y<<16|G&65535;ee=ee<<13|ee>>>19,G=ee&65535,Y=ee>>>16,d=C._low,M=C._high,J=G*d,U=J>>>16,U+=Y*d,U&=65535,U+=G*M,this._low=J&65535,this._high=U&65535};var C=v("2654435761"),w=v("2246822519"),I=v("3266489917"),L=v("668265263"),z=v("374761393");function F(P){for(var $=[],d=0,M=P.length;d<M;d++){var U=P.charCodeAt(d);U<128?$.push(U):U<2048?$.push(192|U>>6,128|U&63):U<55296||U>=57344?$.push(224|U>>12,128|U>>6&63,128|U&63):(d++,U=65536+((U&1023)<<10|P.charCodeAt(d)&1023),$.push(240|U>>18,128|U>>12&63,128|U>>6&63,128|U&63))}return new Uint8Array($)}function K(){if(arguments.length==2)return new K(arguments[1]).update(arguments[0]).digest();if(!(this instanceof K))return new K(arguments[0]);N.call(this,arguments[0])}function N(P){return this.seed=P instanceof v?P.clone():v(P),this.v1=this.seed.clone().add(C).add(w),this.v2=this.seed.clone().add(w),this.v3=this.seed.clone(),this.v4=this.seed.clone().subtract(C),this.total_len=0,this.memsize=0,this.memory=null,this}K.prototype.init=N,K.prototype.update=function(P){var $=typeof P=="string",d;$&&(P=F(P),$=!1,d=!0),typeof ArrayBuffer<"u"&&P instanceof ArrayBuffer&&(d=!0,P=new Uint8Array(P));var M=0,U=P.length,J=M+U;if(U==0)return this;if(this.total_len+=U,this.memsize==0&&($?this.memory="":d?this.memory=new Uint8Array(16):this.memory=new Buffer(16)),this.memsize+U<16)return $?this.memory+=P:d?this.memory.set(P.subarray(0,U),this.memsize):P.copy(this.memory,this.memsize,0,U),this.memsize+=U,this;if(this.memsize>0){$?this.memory+=P.slice(0,16-this.memsize):d?this.memory.set(P.subarray(0,16-this.memsize),this.memsize):P.copy(this.memory,this.memsize,0,16-this.memsize);var G=0;$?(this.v1.xxh_update(this.memory.charCodeAt(G+1)<<8|this.memory.charCodeAt(G),this.memory.charCodeAt(G+3)<<8|this.memory.charCodeAt(G+2)),G+=4,this.v2.xxh_update(this.memory.charCodeAt(G+1)<<8|this.memory.charCodeAt(G),this.memory.charCodeAt(G+3)<<8|this.memory.charCodeAt(G+2)),G+=4,this.v3.xxh_update(this.memory.charCodeAt(G+1)<<8|this.memory.charCodeAt(G),this.memory.charCodeAt(G+3)<<8|this.memory.charCodeAt(G+2)),G+=4,this.v4.xxh_update(this.memory.charCodeAt(G+1)<<8|this.memory.charCodeAt(G),this.memory.charCodeAt(G+3)<<8|this.memory.charCodeAt(G+2))):(this.v1.xxh_update(this.memory[G+1]<<8|this.memory[G],this.memory[G+3]<<8|this.memory[G+2]),G+=4,this.v2.xxh_update(this.memory[G+1]<<8|this.memory[G],this.memory[G+3]<<8|this.memory[G+2]),G+=4,this.v3.xxh_update(this.memory[G+1]<<8|this.memory[G],this.memory[G+3]<<8|this.memory[G+2]),G+=4,this.v4.xxh_update(this.memory[G+1]<<8|this.memory[G],this.memory[G+3]<<8|this.memory[G+2])),M+=16-this.memsize,this.memsize=0,$&&(this.memory="")}if(M<=J-16){var Y=J-16;do $?(this.v1.xxh_update(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2)),M+=4,this.v2.xxh_update(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2)),M+=4,this.v3.xxh_update(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2)),M+=4,this.v4.xxh_update(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2))):(this.v1.xxh_update(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2]),M+=4,this.v2.xxh_update(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2]),M+=4,this.v3.xxh_update(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2]),M+=4,this.v4.xxh_update(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2])),M+=4;while(M<=Y)}return M<J&&($?this.memory+=P.slice(M):d?this.memory.set(P.subarray(M,J),this.memsize):P.copy(this.memory,this.memsize,M,J),this.memsize=J-M),this},K.prototype.digest=function(){var P=this.memory,$=typeof P=="string",d=0,M=this.memsize,U,J,G=new v;for(this.total_len>=16?U=this.v1.rotl(1).add(this.v2.rotl(7).add(this.v3.rotl(12).add(this.v4.rotl(18)))):U=this.seed.clone().add(z),U.add(G.fromNumber(this.total_len));d<=M-4;)$?G.fromBits(P.charCodeAt(d+1)<<8|P.charCodeAt(d),P.charCodeAt(d+3)<<8|P.charCodeAt(d+2)):G.fromBits(P[d+1]<<8|P[d],P[d+3]<<8|P[d+2]),U.add(G.multiply(I)).rotl(17).multiply(L),d+=4;for(;d<M;)G.fromBits($?P.charCodeAt(d++):P[d++],0),U.add(G.multiply(z)).rotl(11).multiply(C);return J=U.clone().shiftRight(15),U.xor(J).multiply(w),J=U.clone().shiftRight(13),U.xor(J).multiply(I),J=U.clone().shiftRight(16),U.xor(J),this.init(this.seed),U},T.exports=K},7470:function(T,f,c){var v=c(7898).UINT64,C=v("11400714785074694791"),w=v("14029467366897019727"),I=v("1609587929392839161"),L=v("9650029242287828579"),z=v("2870177450012600261");function F(P){for(var $=[],d=0,M=P.length;d<M;d++){var U=P.charCodeAt(d);U<128?$.push(U):U<2048?$.push(192|U>>6,128|U&63):U<55296||U>=57344?$.push(224|U>>12,128|U>>6&63,128|U&63):(d++,U=65536+((U&1023)<<10|P.charCodeAt(d)&1023),$.push(240|U>>18,128|U>>12&63,128|U>>6&63,128|U&63))}return new Uint8Array($)}function K(){if(arguments.length==2)return new K(arguments[1]).update(arguments[0]).digest();if(!(this instanceof K))return new K(arguments[0]);N.call(this,arguments[0])}function N(P){return this.seed=P instanceof v?P.clone():v(P),this.v1=this.seed.clone().add(C).add(w),this.v2=this.seed.clone().add(w),this.v3=this.seed.clone(),this.v4=this.seed.clone().subtract(C),this.total_len=0,this.memsize=0,this.memory=null,this}K.prototype.init=N,K.prototype.update=function(P){var $=typeof P=="string",d;$&&(P=F(P),$=!1,d=!0),typeof ArrayBuffer<"u"&&P instanceof ArrayBuffer&&(d=!0,P=new Uint8Array(P));var M=0,U=P.length,J=M+U;if(U==0)return this;if(this.total_len+=U,this.memsize==0&&($?this.memory="":d?this.memory=new Uint8Array(32):this.memory=new Buffer(32)),this.memsize+U<32)return $?this.memory+=P:d?this.memory.set(P.subarray(0,U),this.memsize):P.copy(this.memory,this.memsize,0,U),this.memsize+=U,this;if(this.memsize>0){$?this.memory+=P.slice(0,32-this.memsize):d?this.memory.set(P.subarray(0,32-this.memsize),this.memsize):P.copy(this.memory,this.memsize,0,32-this.memsize);var G=0;if($){var Y;Y=v(this.memory.charCodeAt(G+1)<<8|this.memory.charCodeAt(G),this.memory.charCodeAt(G+3)<<8|this.memory.charCodeAt(G+2),this.memory.charCodeAt(G+5)<<8|this.memory.charCodeAt(G+4),this.memory.charCodeAt(G+7)<<8|this.memory.charCodeAt(G+6)),this.v1.add(Y.multiply(w)).rotl(31).multiply(C),G+=8,Y=v(this.memory.charCodeAt(G+1)<<8|this.memory.charCodeAt(G),this.memory.charCodeAt(G+3)<<8|this.memory.charCodeAt(G+2),this.memory.charCodeAt(G+5)<<8|this.memory.charCodeAt(G+4),this.memory.charCodeAt(G+7)<<8|this.memory.charCodeAt(G+6)),this.v2.add(Y.multiply(w)).rotl(31).multiply(C),G+=8,Y=v(this.memory.charCodeAt(G+1)<<8|this.memory.charCodeAt(G),this.memory.charCodeAt(G+3)<<8|this.memory.charCodeAt(G+2),this.memory.charCodeAt(G+5)<<8|this.memory.charCodeAt(G+4),this.memory.charCodeAt(G+7)<<8|this.memory.charCodeAt(G+6)),this.v3.add(Y.multiply(w)).rotl(31).multiply(C),G+=8,Y=v(this.memory.charCodeAt(G+1)<<8|this.memory.charCodeAt(G),this.memory.charCodeAt(G+3)<<8|this.memory.charCodeAt(G+2),this.memory.charCodeAt(G+5)<<8|this.memory.charCodeAt(G+4),this.memory.charCodeAt(G+7)<<8|this.memory.charCodeAt(G+6)),this.v4.add(Y.multiply(w)).rotl(31).multiply(C)}else{var Y;Y=v(this.memory[G+1]<<8|this.memory[G],this.memory[G+3]<<8|this.memory[G+2],this.memory[G+5]<<8|this.memory[G+4],this.memory[G+7]<<8|this.memory[G+6]),this.v1.add(Y.multiply(w)).rotl(31).multiply(C),G+=8,Y=v(this.memory[G+1]<<8|this.memory[G],this.memory[G+3]<<8|this.memory[G+2],this.memory[G+5]<<8|this.memory[G+4],this.memory[G+7]<<8|this.memory[G+6]),this.v2.add(Y.multiply(w)).rotl(31).multiply(C),G+=8,Y=v(this.memory[G+1]<<8|this.memory[G],this.memory[G+3]<<8|this.memory[G+2],this.memory[G+5]<<8|this.memory[G+4],this.memory[G+7]<<8|this.memory[G+6]),this.v3.add(Y.multiply(w)).rotl(31).multiply(C),G+=8,Y=v(this.memory[G+1]<<8|this.memory[G],this.memory[G+3]<<8|this.memory[G+2],this.memory[G+5]<<8|this.memory[G+4],this.memory[G+7]<<8|this.memory[G+6]),this.v4.add(Y.multiply(w)).rotl(31).multiply(C)}M+=32-this.memsize,this.memsize=0,$&&(this.memory="")}if(M<=J-32){var ee=J-32;do{if($){var Y;Y=v(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2),P.charCodeAt(M+5)<<8|P.charCodeAt(M+4),P.charCodeAt(M+7)<<8|P.charCodeAt(M+6)),this.v1.add(Y.multiply(w)).rotl(31).multiply(C),M+=8,Y=v(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2),P.charCodeAt(M+5)<<8|P.charCodeAt(M+4),P.charCodeAt(M+7)<<8|P.charCodeAt(M+6)),this.v2.add(Y.multiply(w)).rotl(31).multiply(C),M+=8,Y=v(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2),P.charCodeAt(M+5)<<8|P.charCodeAt(M+4),P.charCodeAt(M+7)<<8|P.charCodeAt(M+6)),this.v3.add(Y.multiply(w)).rotl(31).multiply(C),M+=8,Y=v(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2),P.charCodeAt(M+5)<<8|P.charCodeAt(M+4),P.charCodeAt(M+7)<<8|P.charCodeAt(M+6)),this.v4.add(Y.multiply(w)).rotl(31).multiply(C)}else{var Y;Y=v(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2],P[M+5]<<8|P[M+4],P[M+7]<<8|P[M+6]),this.v1.add(Y.multiply(w)).rotl(31).multiply(C),M+=8,Y=v(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2],P[M+5]<<8|P[M+4],P[M+7]<<8|P[M+6]),this.v2.add(Y.multiply(w)).rotl(31).multiply(C),M+=8,Y=v(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2],P[M+5]<<8|P[M+4],P[M+7]<<8|P[M+6]),this.v3.add(Y.multiply(w)).rotl(31).multiply(C),M+=8,Y=v(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2],P[M+5]<<8|P[M+4],P[M+7]<<8|P[M+6]),this.v4.add(Y.multiply(w)).rotl(31).multiply(C)}M+=8}while(M<=ee)}return M<J&&($?this.memory+=P.slice(M):d?this.memory.set(P.subarray(M,J),this.memsize):P.copy(this.memory,this.memsize,M,J),this.memsize=J-M),this},K.prototype.digest=function(){var P=this.memory,$=typeof P=="string",d=0,M=this.memsize,U,J,G=new v;for(this.total_len>=32?(U=this.v1.clone().rotl(1),U.add(this.v2.clone().rotl(7)),U.add(this.v3.clone().rotl(12)),U.add(this.v4.clone().rotl(18)),U.xor(this.v1.multiply(w).rotl(31).multiply(C)),U.multiply(C).add(L),U.xor(this.v2.multiply(w).rotl(31).multiply(C)),U.multiply(C).add(L),U.xor(this.v3.multiply(w).rotl(31).multiply(C)),U.multiply(C).add(L),U.xor(this.v4.multiply(w).rotl(31).multiply(C)),U.multiply(C).add(L)):U=this.seed.clone().add(z),U.add(G.fromNumber(this.total_len));d<=M-8;)$?G.fromBits(P.charCodeAt(d+1)<<8|P.charCodeAt(d),P.charCodeAt(d+3)<<8|P.charCodeAt(d+2),P.charCodeAt(d+5)<<8|P.charCodeAt(d+4),P.charCodeAt(d+7)<<8|P.charCodeAt(d+6)):G.fromBits(P[d+1]<<8|P[d],P[d+3]<<8|P[d+2],P[d+5]<<8|P[d+4],P[d+7]<<8|P[d+6]),G.multiply(w).rotl(31).multiply(C),U.xor(G).rotl(27).multiply(C).add(L),d+=8;for(d+4<=M&&($?G.fromBits(P.charCodeAt(d+1)<<8|P.charCodeAt(d),P.charCodeAt(d+3)<<8|P.charCodeAt(d+2),0,0):G.fromBits(P[d+1]<<8|P[d],P[d+3]<<8|P[d+2],0,0),U.xor(G.multiply(C)).rotl(23).multiply(w).add(I),d+=4);d<M;)G.fromBits($?P.charCodeAt(d++):P[d++],0,0,0),U.xor(G.multiply(z)).rotl(11).multiply(C);return J=U.clone().shiftRight(33),U.xor(J).multiply(w),J=U.clone().shiftRight(29),U.xor(J).multiply(I),J=U.clone().shiftRight(32),U.xor(J),this.init(this.seed),U},T.exports=K},2634:function(){},5172:function(T){function f(c,v){this.v=c,this.k=v}T.exports=f,T.exports.__esModule=!0,T.exports.default=T.exports},6993:function(T,f,c){var v=c(5546);function C(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var w,I,L=typeof Symbol=="function"?Symbol:{},z=L.iterator||"@@iterator",F=L.toStringTag||"@@toStringTag";function K(G,Y,ee,q){var oe=Y&&Y.prototype instanceof P?Y:P,ne=Object.create(oe.prototype);return v(ne,"_invoke",function(ae,xe,he){var H,we,Ae,Ie=0,He=he||[],nt=!1,Xe={p:0,n:0,v:w,a:it,f:it.bind(w,4),d:function(Re,Qe){return H=Re,we=0,Ae=w,Xe.n=Qe,N}};function it(ht,Re){for(we=ht,Ae=Re,I=0;!nt&&Ie&&!Qe&&I<He.length;I++){var Qe,st=He[I],Xt=Xe.p,Gt=st[2];ht>3?(Qe=Gt===Re)&&(we=st[4]||3,Ae=st[5]===w?st[3]:st[5],st[4]=3,st[5]=w):st[0]<=Xt&&((Qe=ht<2&&Xt<st[1])?(we=0,Xe.v=Re,Xe.n=st[1]):Xt<Gt&&(Qe=ht<3||st[0]>Re||Re>Gt)&&(st[4]=ht,st[5]=Re,Xe.n=Gt,we=0))}if(Qe||ht>1)return N;throw nt=!0,Re}return function(ht,Re,Qe){if(Ie>1)throw TypeError("Generator is already running");for(nt&&Re===1&&it(Re,Qe),we=Re,Ae=Qe;(I=we<2?w:Ae)||!nt;){H||(we?we<3?(we>1&&(Xe.n=-1),it(we,Ae)):Xe.n=Ae:Xe.v=Ae);try{if(Ie=2,H){if(we||(ht="next"),I=H[ht]){if(!(I=I.call(H,Ae)))throw TypeError("iterator result is not an object");if(!I.done)return I;Ae=I.value,we<2&&(we=0)}else we===1&&(I=H.return)&&I.call(H),we<2&&(Ae=TypeError("The iterator does not provide a '"+ht+"' method"),we=1);H=w}else if((I=(nt=Xe.n<0)?Ae:ae.call(xe,Xe))!==N)break}catch(st){H=w,we=1,Ae=st}finally{Ie=1}}return{value:I,done:nt}}}(G,ee,q),!0),ne}var N={};function P(){}function $(){}function d(){}I=Object.getPrototypeOf;var M=[][z]?I(I([][z]())):(v(I={},z,function(){return this}),I),U=d.prototype=P.prototype=Object.create(M);function J(G){return Object.setPrototypeOf?Object.setPrototypeOf(G,d):(G.__proto__=d,v(G,F,"GeneratorFunction")),G.prototype=Object.create(U),G}return $.prototype=d,v(U,"constructor",d),v(d,"constructor",$),$.displayName="GeneratorFunction",v(d,F,"GeneratorFunction"),v(U),v(U,F,"Generator"),v(U,z,function(){return this}),v(U,"toString",function(){return"[object Generator]"}),(T.exports=C=function(){return{w:K,m:J}},T.exports.__esModule=!0,T.exports.default=T.exports)()}T.exports=C,T.exports.__esModule=!0,T.exports.default=T.exports},5869:function(T,f,c){var v=c(887);function C(w,I,L,z,F){var K=v(w,I,L,z,F);return K.next().then(function(N){return N.done?N.value:K.next()})}T.exports=C,T.exports.__esModule=!0,T.exports.default=T.exports},887:function(T,f,c){var v=c(6993),C=c(1791);function w(I,L,z,F,K){return new C(v().w(I,L,z,F),K||Promise)}T.exports=w,T.exports.__esModule=!0,T.exports.default=T.exports},1791:function(T,f,c){var v=c(5172),C=c(5546);function w(I,L){function z(K,N,P,$){try{var d=I[K](N),M=d.value;return M instanceof v?L.resolve(M.v).then(function(U){z("next",U,P,$)},function(U){z("throw",U,P,$)}):L.resolve(M).then(function(U){d.value=U,P(d)},function(U){return z("throw",U,P,$)})}catch(U){$(U)}}var F;this.next||(C(w.prototype),C(w.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),C(this,"_invoke",function(K,N,P){function $(){return new L(function(d,M){z(K,P,d,M)})}return F=F?F.then($,$):$()},!0)}T.exports=w,T.exports.__esModule=!0,T.exports.default=T.exports},5546:function(T){function f(c,v,C,w){var I=Object.defineProperty;try{I({},"",{})}catch{I=0}T.exports=f=function(z,F,K,N){if(F)I?I(z,F,{value:K,enumerable:!N,configurable:!N,writable:!N}):z[F]=K;else{var P=function(d,M){f(z,d,function(U){return this._invoke(d,M,U)})};P("next",0),P("throw",1),P("return",2)}},T.exports.__esModule=!0,T.exports.default=T.exports,f(c,v,C,w)}T.exports=f,T.exports.__esModule=!0,T.exports.default=T.exports},4373:function(T){function f(c){var v=Object(c),C=[];for(var w in v)C.unshift(w);return function I(){for(;C.length;)if((w=C.pop())in v)return I.value=w,I.done=!1,I;return I.done=!0,I}}T.exports=f,T.exports.__esModule=!0,T.exports.default=T.exports},4633:function(T,f,c){var v=c(5172),C=c(6993),w=c(5869),I=c(887),L=c(1791),z=c(4373),F=c(579);function K(){var N=C(),P=N.m(K),$=(Object.getPrototypeOf?Object.getPrototypeOf(P):P.__proto__).constructor;function d(J){var G=typeof J=="function"&&J.constructor;return!!G&&(G===$||(G.displayName||G.name)==="GeneratorFunction")}var M={throw:1,return:2,break:3,continue:3};function U(J){var G,Y;return function(ee){G||(G={stop:function(){return Y(ee.a,2)},catch:function(){return ee.v},abrupt:function(oe,ne){return Y(ee.a,M[oe],ne)},delegateYield:function(oe,ne,ae){return G.resultName=ne,Y(ee.d,F(oe),ae)},finish:function(oe){return Y(ee.f,oe)}},Y=function(oe,ne,ae){ee.p=G.prev,ee.n=G.next;try{return oe(ne,ae)}finally{G.next=ee.n}}),G.resultName&&(G[G.resultName]=ee.v,G.resultName=void 0),G.sent=ee.v,G.next=ee.n;try{return J.call(this,G)}finally{ee.p=G.prev,ee.n=G.next}}}return(T.exports=K=function(){return{wrap:function(Y,ee,q,oe){return N.w(U(Y),ee,q,oe&&oe.reverse())},isGeneratorFunction:d,mark:N.m,awrap:function(Y,ee){return new v(Y,ee)},AsyncIterator:L,async:function(Y,ee,q,oe,ne){return(d(ee)?I:w)(U(Y),ee,q,oe,ne)},keys:z,values:F}},T.exports.__esModule=!0,T.exports.default=T.exports)()}T.exports=K,T.exports.__esModule=!0,T.exports.default=T.exports},579:function(T,f,c){var v=c(3738).default;function C(w){if(w!=null){var I=w[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],L=0;if(I)return I.call(w);if(typeof w.next=="function")return w;if(!isNaN(w.length))return{next:function(){return w&&L>=w.length&&(w=void 0),{value:w&&w[L++],done:!w}}}}throw new TypeError(v(w)+" is not iterable")}T.exports=C,T.exports.__esModule=!0,T.exports.default=T.exports},3738:function(T){function f(c){"@babel/helpers - typeof";return T.exports=f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},T.exports.__esModule=!0,T.exports.default=T.exports,f(c)}T.exports=f,T.exports.__esModule=!0,T.exports.default=T.exports},4756:function(T,f,c){var v=c(4633)();T.exports=v;try{regeneratorRuntime=v}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=v:Function("r","regeneratorRuntime = r")(v)}},9306:function(T,f,c){var v=c(4901),C=c(6823),w=TypeError;T.exports=function(I){if(v(I))return I;throw new w(C(I)+" is not a function")}},5548:function(T,f,c){var v=c(3517),C=c(6823),w=TypeError;T.exports=function(I){if(v(I))return I;throw new w(C(I)+" is not a constructor")}},3506:function(T,f,c){var v=c(3925),C=String,w=TypeError;T.exports=function(I){if(v(I))return I;throw new w("Can't set "+C(I)+" as a prototype")}},6469:function(T,f,c){var v=c(8227),C=c(2360),w=c(4913).f,I=v("unscopables"),L=Array.prototype;L[I]===void 0&&w(L,I,{configurable:!0,value:C(null)}),T.exports=function(z){L[I][z]=!0}},7829:function(T,f,c){var v=c(8183).charAt;T.exports=function(C,w,I){return w+(I?v(C,w).length:1)}},679:function(T,f,c){var v=c(1625),C=TypeError;T.exports=function(w,I){if(v(I,w))return w;throw new C("Incorrect invocation")}},8551:function(T,f,c){var v=c(34),C=String,w=TypeError;T.exports=function(I){if(v(I))return I;throw new w(C(I)+" is not an object")}},5652:function(T,f,c){var v=c(9039);T.exports=v(function(){if(typeof ArrayBuffer=="function"){var C=new ArrayBuffer(8);Object.isExtensible(C)&&Object.defineProperty(C,"a",{value:8})}})},235:function(T,f,c){var v=c(9213).forEach,C=c(4598),w=C("forEach");T.exports=w?[].forEach:function(L){return v(this,L,arguments.length>1?arguments[1]:void 0)}},7916:function(T,f,c){var v=c(6080),C=c(9565),w=c(8981),I=c(6319),L=c(4209),z=c(3517),F=c(6198),K=c(4659),N=c(81),P=c(851),$=Array;T.exports=function(M){var U=w(M),J=z(this),G=arguments.length,Y=G>1?arguments[1]:void 0,ee=Y!==void 0;ee&&(Y=v(Y,G>2?arguments[2]:void 0));var q=P(U),oe=0,ne,ae,xe,he,H,we;if(q&&!(this===$&&L(q)))for(ae=J?new this:[],he=N(U,q),H=he.next;!(xe=C(H,he)).done;oe++)we=ee?I(he,Y,[xe.value,oe],!0):xe.value,K(ae,oe,we);else for(ne=F(U),ae=J?new this(ne):$(ne);ne>oe;oe++)we=ee?Y(U[oe],oe):U[oe],K(ae,oe,we);return ae.length=oe,ae}},9617:function(T,f,c){var v=c(5397),C=c(5610),w=c(6198),I=function(L){return function(z,F,K){var N=v(z),P=w(N);if(P===0)return!L&&-1;var $=C(K,P),d;if(L&&F!==F){for(;P>$;)if(d=N[$++],d!==d)return!0}else for(;P>$;$++)if((L||$ in N)&&N[$]===F)return L||$||0;return!L&&-1}};T.exports={includes:I(!0),indexOf:I(!1)}},9213:function(T,f,c){var v=c(6080),C=c(9504),w=c(7055),I=c(8981),L=c(6198),z=c(1469),F=C([].push),K=function(N){var P=N===1,$=N===2,d=N===3,M=N===4,U=N===6,J=N===7,G=N===5||U;return function(Y,ee,q,oe){for(var ne=I(Y),ae=w(ne),xe=L(ae),he=v(ee,q),H=0,we=oe||z,Ae=P?we(Y,xe):$||J?we(Y,0):void 0,Ie,He;xe>H;H++)if((G||H in ae)&&(Ie=ae[H],He=he(Ie,H,ne),N))if(P)Ae[H]=He;else if(He)switch(N){case 3:return!0;case 5:return Ie;case 6:return H;case 2:F(Ae,Ie)}else switch(N){case 4:return!1;case 7:F(Ae,Ie)}return U?-1:d||M?M:Ae}};T.exports={forEach:K(0),map:K(1),filter:K(2),some:K(3),every:K(4),find:K(5),findIndex:K(6),filterReject:K(7)}},597:function(T,f,c){var v=c(9039),C=c(8227),w=c(9519),I=C("species");T.exports=function(L){return w>=51||!v(function(){var z=[],F=z.constructor={};return F[I]=function(){return{foo:1}},z[L](Boolean).foo!==1})}},4598:function(T,f,c){var v=c(9039);T.exports=function(C,w){var I=[][C];return!!I&&v(function(){I.call(null,w||function(){return 1},1)})}},4527:function(T,f,c){var v=c(3724),C=c(4376),w=TypeError,I=Object.getOwnPropertyDescriptor,L=v&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(z){return z instanceof TypeError}}();T.exports=L?function(z,F){if(C(z)&&!I(z,"length").writable)throw new w("Cannot set read only .length");return z.length=F}:function(z,F){return z.length=F}},7680:function(T,f,c){var v=c(9504);T.exports=v([].slice)},4488:function(T,f,c){var v=c(7680),C=Math.floor,w=function(I,L){var z=I.length;if(z<8)for(var F=1,K,N;F<z;){for(N=F,K=I[F];N&&L(I[N-1],K)>0;)I[N]=I[--N];N!==F++&&(I[N]=K)}else for(var P=C(z/2),$=w(v(I,0,P),L),d=w(v(I,P),L),M=$.length,U=d.length,J=0,G=0;J<M||G<U;)I[J+G]=J<M&&G<U?L($[J],d[G])<=0?$[J++]:d[G++]:J<M?$[J++]:d[G++];return I};T.exports=w},7433:function(T,f,c){var v=c(4376),C=c(3517),w=c(34),I=c(8227),L=I("species"),z=Array;T.exports=function(F){var K;return v(F)&&(K=F.constructor,C(K)&&(K===z||v(K.prototype))?K=void 0:w(K)&&(K=K[L],K===null&&(K=void 0))),K===void 0?z:K}},1469:function(T,f,c){var v=c(7433);T.exports=function(C,w){return new(v(C))(w===0?0:w)}},6319:function(T,f,c){var v=c(8551),C=c(9539);T.exports=function(w,I,L,z){try{return z?I(v(L)[0],L[1]):I(L)}catch(F){C(w,"throw",F)}}},4428:function(T,f,c){var v=c(8227),C=v("iterator"),w=!1;try{var I=0,L={next:function(){return{done:!!I++}},return:function(){w=!0}};L[C]=function(){return this},Array.from(L,function(){throw 2})}catch{}T.exports=function(z,F){try{if(!F&&!w)return!1}catch{return!1}var K=!1;try{var N={};N[C]=function(){return{next:function(){return{done:K=!0}}}},z(N)}catch{}return K}},2195:function(T,f,c){var v=c(9504),C=v({}.toString),w=v("".slice);T.exports=function(I){return w(C(I),8,-1)}},6955:function(T,f,c){var v=c(2140),C=c(4901),w=c(2195),I=c(8227),L=I("toStringTag"),z=Object,F=w(function(){return arguments}())==="Arguments",K=function(N,P){try{return N[P]}catch{}};T.exports=v?w:function(N){var P,$,d;return N===void 0?"Undefined":N===null?"Null":typeof($=K(P=z(N),L))=="string"?$:F?w(P):(d=w(P))==="Object"&&C(P.callee)?"Arguments":d}},6938:function(T,f,c){var v=c(2360),C=c(2106),w=c(6279),I=c(6080),L=c(679),z=c(4117),F=c(2652),K=c(1088),N=c(2529),P=c(7633),$=c(3724),d=c(3451).fastKey,M=c(1181),U=M.set,J=M.getterFor;T.exports={getConstructor:function(G,Y,ee,q){var oe=G(function(H,we){L(H,ne),U(H,{type:Y,index:v(null),first:null,last:null,size:0}),$||(H.size=0),z(we)||F(we,H[q],{that:H,AS_ENTRIES:ee})}),ne=oe.prototype,ae=J(Y),xe=function(H,we,Ae){var Ie=ae(H),He=he(H,we),nt,Xe;return He?He.value=Ae:(Ie.last=He={index:Xe=d(we,!0),key:we,value:Ae,previous:nt=Ie.last,next:null,removed:!1},Ie.first||(Ie.first=He),nt&&(nt.next=He),$?Ie.size++:H.size++,Xe!=="F"&&(Ie.index[Xe]=He)),H},he=function(H,we){var Ae=ae(H),Ie=d(we),He;if(Ie!=="F")return Ae.index[Ie];for(He=Ae.first;He;He=He.next)if(He.key===we)return He};return w(ne,{clear:function(){for(var we=this,Ae=ae(we),Ie=Ae.first;Ie;)Ie.removed=!0,Ie.previous&&(Ie.previous=Ie.previous.next=null),Ie=Ie.next;Ae.first=Ae.last=null,Ae.index=v(null),$?Ae.size=0:we.size=0},delete:function(H){var we=this,Ae=ae(we),Ie=he(we,H);if(Ie){var He=Ie.next,nt=Ie.previous;delete Ae.index[Ie.index],Ie.removed=!0,nt&&(nt.next=He),He&&(He.previous=nt),Ae.first===Ie&&(Ae.first=He),Ae.last===Ie&&(Ae.last=nt),$?Ae.size--:we.size--}return!!Ie},forEach:function(we){for(var Ae=ae(this),Ie=I(we,arguments.length>1?arguments[1]:void 0),He;He=He?He.next:Ae.first;)for(Ie(He.value,He.key,this);He&&He.removed;)He=He.previous},has:function(we){return!!he(this,we)}}),w(ne,ee?{get:function(we){var Ae=he(this,we);return Ae&&Ae.value},set:function(we,Ae){return xe(this,we===0?0:we,Ae)}}:{add:function(we){return xe(this,we=we===0?0:we,we)}}),$&&C(ne,"size",{configurable:!0,get:function(){return ae(this).size}}),oe},setStrong:function(G,Y,ee){var q=Y+" Iterator",oe=J(Y),ne=J(q);K(G,Y,function(ae,xe){U(this,{type:q,target:ae,state:oe(ae),kind:xe,last:null})},function(){for(var ae=ne(this),xe=ae.kind,he=ae.last;he&&he.removed;)he=he.previous;return!ae.target||!(ae.last=he=he?he.next:ae.state.first)?(ae.target=null,N(void 0,!0)):N(xe==="keys"?he.key:xe==="values"?he.value:[he.key,he.value],!1)},ee?"entries":"values",!ee,!0),P(Y)}}},6468:function(T,f,c){var v=c(6518),C=c(4576),w=c(9504),I=c(2796),L=c(6840),z=c(3451),F=c(2652),K=c(679),N=c(4901),P=c(4117),$=c(34),d=c(9039),M=c(4428),U=c(687),J=c(3167);T.exports=function(G,Y,ee){var q=G.indexOf("Map")!==-1,oe=G.indexOf("Weak")!==-1,ne=q?"set":"add",ae=C[G],xe=ae&&ae.prototype,he=ae,H={},we=function(ht){var Re=w(xe[ht]);L(xe,ht,ht==="add"?function(st){return Re(this,st===0?0:st),this}:ht==="delete"?function(Qe){return oe&&!$(Qe)?!1:Re(this,Qe===0?0:Qe)}:ht==="get"?function(st){return oe&&!$(st)?void 0:Re(this,st===0?0:st)}:ht==="has"?function(st){return oe&&!$(st)?!1:Re(this,st===0?0:st)}:function(st,Xt){return Re(this,st===0?0:st,Xt),this})},Ae=I(G,!N(ae)||!(oe||xe.forEach&&!d(function(){new ae().entries().next()})));if(Ae)he=ee.getConstructor(Y,G,q,ne),z.enable();else if(I(G,!0)){var Ie=new he,He=Ie[ne](oe?{}:-0,1)!==Ie,nt=d(function(){Ie.has(1)}),Xe=M(function(ht){new ae(ht)}),it=!oe&&d(function(){for(var ht=new ae,Re=5;Re--;)ht[ne](Re,Re);return!ht.has(-0)});Xe||(he=Y(function(ht,Re){K(ht,xe);var Qe=J(new ae,ht,he);return P(Re)||F(Re,Qe[ne],{that:Qe,AS_ENTRIES:q}),Qe}),he.prototype=xe,xe.constructor=he),(nt||it)&&(we("delete"),we("has"),q&&we("get")),(it||He)&&we(ne),oe&&xe.clear&&delete xe.clear}return H[G]=he,v({global:!0,constructor:!0,forced:he!==ae},H),U(he,G),oe||ee.setStrong(he,G,q),he}},7740:function(T,f,c){var v=c(9297),C=c(5031),w=c(7347),I=c(4913);T.exports=function(L,z,F){for(var K=C(z),N=I.f,P=w.f,$=0;$<K.length;$++){var d=K[$];!v(L,d)&&!(F&&v(F,d))&&N(L,d,P(z,d))}}},2211:function(T,f,c){var v=c(9039);T.exports=!v(function(){function C(){}return C.prototype.constructor=null,Object.getPrototypeOf(new C)!==C.prototype})},2529:function(T){T.exports=function(f,c){return{value:f,done:c}}},6699:function(T,f,c){var v=c(3724),C=c(4913),w=c(6980);T.exports=v?function(I,L,z){return C.f(I,L,w(1,z))}:function(I,L,z){return I[L]=z,I}},6980:function(T){T.exports=function(f,c){return{enumerable:!(f&1),configurable:!(f&2),writable:!(f&4),value:c}}},4659:function(T,f,c){var v=c(3724),C=c(4913),w=c(6980);T.exports=function(I,L,z){v?C.f(I,L,w(0,z)):I[L]=z}},2106:function(T,f,c){var v=c(283),C=c(4913);T.exports=function(w,I,L){return L.get&&v(L.get,I,{getter:!0}),L.set&&v(L.set,I,{setter:!0}),C.f(w,I,L)}},6840:function(T,f,c){var v=c(4901),C=c(4913),w=c(283),I=c(9433);T.exports=function(L,z,F,K){K||(K={});var N=K.enumerable,P=K.name!==void 0?K.name:z;if(v(F)&&w(F,P,K),K.global)N?L[z]=F:I(z,F);else{try{K.unsafe?L[z]&&(N=!0):delete L[z]}catch{}N?L[z]=F:C.f(L,z,{value:F,enumerable:!1,configurable:!K.nonConfigurable,writable:!K.nonWritable})}return L}},6279:function(T,f,c){var v=c(6840);T.exports=function(C,w,I){for(var L in w)v(C,L,w[L],I);return C}},9433:function(T,f,c){var v=c(4576),C=Object.defineProperty;T.exports=function(w,I){try{C(v,w,{value:I,configurable:!0,writable:!0})}catch{v[w]=I}return I}},4606:function(T,f,c){var v=c(6823),C=TypeError;T.exports=function(w,I){if(!delete w[I])throw new C("Cannot delete property "+v(I)+" of "+v(w))}},3724:function(T,f,c){var v=c(9039);T.exports=!v(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},4055:function(T,f,c){var v=c(4576),C=c(34),w=v.document,I=C(w)&&C(w.createElement);T.exports=function(L){return I?w.createElement(L):{}}},6837:function(T){var f=TypeError,c=9007199254740991;T.exports=function(v){if(v>c)throw f("Maximum allowed index exceeded");return v}},7400:function(T){T.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:function(T,f,c){var v=c(4055),C=v("span").classList,w=C&&C.constructor&&C.constructor.prototype;T.exports=w===Object.prototype?void 0:w},8727:function(T){T.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3709:function(T,f,c){var v=c(2839),C=v.match(/firefox\/(\d+)/i);T.exports=!!C&&+C[1]},3763:function(T,f,c){var v=c(2839);T.exports=/MSIE|Trident/.test(v)},4265:function(T,f,c){var v=c(2839);T.exports=/ipad|iphone|ipod/i.test(v)&&typeof Pebble<"u"},9544:function(T,f,c){var v=c(2839);T.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(v)},8574:function(T,f,c){var v=c(4215);T.exports=v==="NODE"},7860:function(T,f,c){var v=c(2839);T.exports=/web0s(?!.*chrome)/i.test(v)},2839:function(T,f,c){var v=c(4576),C=v.navigator,w=C&&C.userAgent;T.exports=w?String(w):""},9519:function(T,f,c){var v=c(4576),C=c(2839),w=v.process,I=v.Deno,L=w&&w.versions||I&&I.version,z=L&&L.v8,F,K;z&&(F=z.split("."),K=F[0]>0&&F[0]<4?1:+(F[0]+F[1])),!K&&C&&(F=C.match(/Edge\/(\d+)/),(!F||F[1]>=74)&&(F=C.match(/Chrome\/(\d+)/),F&&(K=+F[1]))),T.exports=K},3607:function(T,f,c){var v=c(2839),C=v.match(/AppleWebKit\/(\d+)\./);T.exports=!!C&&+C[1]},4215:function(T,f,c){var v=c(4576),C=c(2839),w=c(2195),I=function(L){return C.slice(0,L.length)===L};T.exports=function(){return I("Bun/")?"BUN":I("Cloudflare-Workers")?"CLOUDFLARE":I("Deno/")?"DENO":I("Node.js/")?"NODE":v.Bun&&typeof Bun.version=="string"?"BUN":v.Deno&&typeof Deno.version=="object"?"DENO":w(v.process)==="process"?"NODE":v.window&&v.document?"BROWSER":"REST"}()},6193:function(T,f,c){var v=c(9504),C=Error,w=v("".replace),I=function(F){return String(new C(F).stack)}("zxcasd"),L=/\n\s*at [^:]*:[^\n]*/,z=L.test(I);T.exports=function(F,K){if(z&&typeof F=="string"&&!C.prepareStackTrace)for(;K--;)F=w(F,L,"");return F}},747:function(T,f,c){var v=c(6699),C=c(6193),w=c(6249),I=Error.captureStackTrace;T.exports=function(L,z,F,K){w&&(I?I(L,z):v(L,"stack",C(F,K)))}},6249:function(T,f,c){var v=c(9039),C=c(6980);T.exports=!v(function(){var w=new Error("a");return"stack"in w?(Object.defineProperty(w,"stack",C(1,7)),w.stack!==7):!0})},6518:function(T,f,c){var v=c(4576),C=c(7347).f,w=c(6699),I=c(6840),L=c(9433),z=c(7740),F=c(2796);T.exports=function(K,N){var P=K.target,$=K.global,d=K.stat,M,U,J,G,Y,ee;if($?U=v:d?U=v[P]||L(P,{}):U=v[P]&&v[P].prototype,U)for(J in N){if(Y=N[J],K.dontCallGetSet?(ee=C(U,J),G=ee&&ee.value):G=U[J],M=F($?J:P+(d?".":"#")+J,K.forced),!M&&G!==void 0){if(typeof Y==typeof G)continue;z(Y,G)}(K.sham||G&&G.sham)&&w(Y,"sham",!0),I(U,J,Y,K)}}},9039:function(T){T.exports=function(f){try{return!!f()}catch{return!0}}},9228:function(T,f,c){c(7495);var v=c(9565),C=c(6840),w=c(7323),I=c(9039),L=c(8227),z=c(6699),F=L("species"),K=RegExp.prototype;T.exports=function(N,P,$,d){var M=L(N),U=!I(function(){var ee={};return ee[M]=function(){return 7},""[N](ee)!==7}),J=U&&!I(function(){var ee=!1,q=/a/;return N==="split"&&(q={},q.constructor={},q.constructor[F]=function(){return q},q.flags="",q[M]=/./[M]),q.exec=function(){return ee=!0,null},q[M](""),!ee});if(!U||!J||$){var G=/./[M],Y=P(M,""[N],function(ee,q,oe,ne,ae){var xe=q.exec;return xe===w||xe===K.exec?U&&!ae?{done:!0,value:v(G,q,oe,ne)}:{done:!0,value:v(ee,oe,q,ne)}:{done:!1}});C(String.prototype,N,Y[0]),C(K,M,Y[1])}d&&z(K[M],"sham",!0)}},2744:function(T,f,c){var v=c(9039);T.exports=!v(function(){return Object.isExtensible(Object.preventExtensions({}))})},8745:function(T,f,c){var v=c(616),C=Function.prototype,w=C.apply,I=C.call;T.exports=typeof Reflect=="object"&&Reflect.apply||(v?I.bind(w):function(){return I.apply(w,arguments)})},6080:function(T,f,c){var v=c(7476),C=c(9306),w=c(616),I=v(v.bind);T.exports=function(L,z){return C(L),z===void 0?L:w?I(L,z):function(){return L.apply(z,arguments)}}},616:function(T,f,c){var v=c(9039);T.exports=!v(function(){var C=(function(){}).bind();return typeof C!="function"||C.hasOwnProperty("prototype")})},566:function(T,f,c){var v=c(9504),C=c(9306),w=c(34),I=c(9297),L=c(7680),z=c(616),F=Function,K=v([].concat),N=v([].join),P={},$=function(d,M,U){if(!I(P,M)){for(var J=[],G=0;G<M;G++)J[G]="a["+G+"]";P[M]=F("C,a","return new C("+N(J,",")+")")}return P[M](d,U)};T.exports=z?F.bind:function(M){var U=C(this),J=U.prototype,G=L(arguments,1),Y=function(){var q=K(G,L(arguments));return this instanceof Y?$(U,q.length,q):U.apply(M,q)};return w(J)&&(Y.prototype=J),Y}},9565:function(T,f,c){var v=c(616),C=Function.prototype.call;T.exports=v?C.bind(C):function(){return C.apply(C,arguments)}},350:function(T,f,c){var v=c(3724),C=c(9297),w=Function.prototype,I=v&&Object.getOwnPropertyDescriptor,L=C(w,"name"),z=L&&(function(){}).name==="something",F=L&&(!v||v&&I(w,"name").configurable);T.exports={EXISTS:L,PROPER:z,CONFIGURABLE:F}},6706:function(T,f,c){var v=c(9504),C=c(9306);T.exports=function(w,I,L){try{return v(C(Object.getOwnPropertyDescriptor(w,I)[L]))}catch{}}},7476:function(T,f,c){var v=c(2195),C=c(9504);T.exports=function(w){if(v(w)==="Function")return C(w)}},9504:function(T,f,c){var v=c(616),C=Function.prototype,w=C.call,I=v&&C.bind.bind(w,w);T.exports=v?I:function(L){return function(){return w.apply(L,arguments)}}},7751:function(T,f,c){var v=c(4576),C=c(4901),w=function(I){return C(I)?I:void 0};T.exports=function(I,L){return arguments.length<2?w(v[I]):v[I]&&v[I][L]}},851:function(T,f,c){var v=c(6955),C=c(5966),w=c(4117),I=c(6269),L=c(8227),z=L("iterator");T.exports=function(F){if(!w(F))return C(F,z)||C(F,"@@iterator")||I[v(F)]}},81:function(T,f,c){var v=c(9565),C=c(9306),w=c(8551),I=c(6823),L=c(851),z=TypeError;T.exports=function(F,K){var N=arguments.length<2?L(F):K;if(C(N))return w(v(N,F));throw new z(I(F)+" is not iterable")}},6933:function(T,f,c){var v=c(9504),C=c(4376),w=c(4901),I=c(2195),L=c(655),z=v([].push);T.exports=function(F){if(w(F))return F;if(C(F)){for(var K=F.length,N=[],P=0;P<K;P++){var $=F[P];typeof $=="string"?z(N,$):(typeof $=="number"||I($)==="Number"||I($)==="String")&&z(N,L($))}var d=N.length,M=!0;return function(U,J){if(M)return M=!1,J;if(C(this))return J;for(var G=0;G<d;G++)if(N[G]===U)return J}}}},5966:function(T,f,c){var v=c(9306),C=c(4117);T.exports=function(w,I){var L=w[I];return C(L)?void 0:v(L)}},2478:function(T,f,c){var v=c(9504),C=c(8981),w=Math.floor,I=v("".charAt),L=v("".replace),z=v("".slice),F=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,K=/\$([$&'`]|\d{1,2})/g;T.exports=function(N,P,$,d,M,U){var J=$+N.length,G=d.length,Y=K;return M!==void 0&&(M=C(M),Y=F),L(U,Y,function(ee,q){var oe;switch(I(q,0)){case"$":return"$";case"&":return N;case"`":return z(P,0,$);case"'":return z(P,J);case"<":oe=M[z(q,1,-1)];break;default:var ne=+q;if(ne===0)return ee;if(ne>G){var ae=w(ne/10);return ae===0?ee:ae<=G?d[ae-1]===void 0?I(q,1):d[ae-1]+I(q,1):ee}oe=d[ne-1]}return oe===void 0?"":oe})}},4576:function(T,f,c){var v=function(C){return C&&C.Math===Math&&C};T.exports=v(typeof globalThis=="object"&&globalThis)||v(typeof window=="object"&&window)||v(typeof self=="object"&&self)||v(typeof c.g=="object"&&c.g)||v(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},9297:function(T,f,c){var v=c(9504),C=c(8981),w=v({}.hasOwnProperty);T.exports=Object.hasOwn||function(L,z){return w(C(L),z)}},421:function(T){T.exports={}},3138:function(T){T.exports=function(f,c){try{arguments.length===1?console.error(f):console.error(f,c)}catch{}}},397:function(T,f,c){var v=c(7751);T.exports=v("document","documentElement")},5917:function(T,f,c){var v=c(3724),C=c(9039),w=c(4055);T.exports=!v&&!C(function(){return Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a!==7})},7055:function(T,f,c){var v=c(9504),C=c(9039),w=c(2195),I=Object,L=v("".split);T.exports=C(function(){return!I("z").propertyIsEnumerable(0)})?function(z){return w(z)==="String"?L(z,""):I(z)}:I},3167:function(T,f,c){var v=c(4901),C=c(34),w=c(2967);T.exports=function(I,L,z){var F,K;return w&&v(F=L.constructor)&&F!==z&&C(K=F.prototype)&&K!==z.prototype&&w(I,K),I}},3706:function(T,f,c){var v=c(9504),C=c(4901),w=c(7629),I=v(Function.toString);C(w.inspectSource)||(w.inspectSource=function(L){return I(L)}),T.exports=w.inspectSource},7584:function(T,f,c){var v=c(34),C=c(6699);T.exports=function(w,I){v(I)&&"cause"in I&&C(w,"cause",I.cause)}},3451:function(T,f,c){var v=c(6518),C=c(9504),w=c(421),I=c(34),L=c(9297),z=c(4913).f,F=c(8480),K=c(298),N=c(4124),P=c(3392),$=c(2744),d=!1,M=P("meta"),U=0,J=function(ne){z(ne,M,{value:{objectID:"O"+U++,weakData:{}}})},G=function(ne,ae){if(!I(ne))return typeof ne=="symbol"?ne:(typeof ne=="string"?"S":"P")+ne;if(!L(ne,M)){if(!N(ne))return"F";if(!ae)return"E";J(ne)}return ne[M].objectID},Y=function(ne,ae){if(!L(ne,M)){if(!N(ne))return!0;if(!ae)return!1;J(ne)}return ne[M].weakData},ee=function(ne){return $&&d&&N(ne)&&!L(ne,M)&&J(ne),ne},q=function(){oe.enable=function(){},d=!0;var ne=F.f,ae=C([].splice),xe={};xe[M]=1,ne(xe).length&&(F.f=function(he){for(var H=ne(he),we=0,Ae=H.length;we<Ae;we++)if(H[we]===M){ae(H,we,1);break}return H},v({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:K.f}))},oe=T.exports={enable:q,fastKey:G,getWeakData:Y,onFreeze:ee};w[M]=!0},1181:function(T,f,c){var v=c(8622),C=c(4576),w=c(34),I=c(6699),L=c(9297),z=c(7629),F=c(6119),K=c(421),N="Object already initialized",P=C.TypeError,$=C.WeakMap,d,M,U,J=function(q){return U(q)?M(q):d(q,{})},G=function(q){return function(oe){var ne;if(!w(oe)||(ne=M(oe)).type!==q)throw new P("Incompatible receiver, "+q+" required");return ne}};if(v||z.state){var Y=z.state||(z.state=new $);Y.get=Y.get,Y.has=Y.has,Y.set=Y.set,d=function(q,oe){if(Y.has(q))throw new P(N);return oe.facade=q,Y.set(q,oe),oe},M=function(q){return Y.get(q)||{}},U=function(q){return Y.has(q)}}else{var ee=F("state");K[ee]=!0,d=function(q,oe){if(L(q,ee))throw new P(N);return oe.facade=q,I(q,ee,oe),oe},M=function(q){return L(q,ee)?q[ee]:{}},U=function(q){return L(q,ee)}}T.exports={set:d,get:M,has:U,enforce:J,getterFor:G}},4209:function(T,f,c){var v=c(8227),C=c(6269),w=v("iterator"),I=Array.prototype;T.exports=function(L){return L!==void 0&&(C.Array===L||I[w]===L)}},4376:function(T,f,c){var v=c(2195);T.exports=Array.isArray||function(w){return v(w)==="Array"}},4901:function(T){var f=typeof document=="object"&&document.all;T.exports=typeof f>"u"&&f!==void 0?function(c){return typeof c=="function"||c===f}:function(c){return typeof c=="function"}},3517:function(T,f,c){var v=c(9504),C=c(9039),w=c(4901),I=c(6955),L=c(7751),z=c(3706),F=function(){},K=L("Reflect","construct"),N=/^\s*(?:class|function)\b/,P=v(N.exec),$=!N.test(F),d=function(J){if(!w(J))return!1;try{return K(F,[],J),!0}catch{return!1}},M=function(J){if(!w(J))return!1;switch(I(J)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return $||!!P(N,z(J))}catch{return!0}};M.sham=!0,T.exports=!K||C(function(){var U;return d(d.call)||!d(Object)||!d(function(){U=!0})||U})?M:d},2796:function(T,f,c){var v=c(9039),C=c(4901),w=/#|\.prototype\./,I=function(N,P){var $=z[L(N)];return $===K?!0:$===F?!1:C(P)?v(P):!!P},L=I.normalize=function(N){return String(N).replace(w,".").toLowerCase()},z=I.data={},F=I.NATIVE="N",K=I.POLYFILL="P";T.exports=I},4117:function(T){T.exports=function(f){return f==null}},34:function(T,f,c){var v=c(4901);T.exports=function(C){return typeof C=="object"?C!==null:v(C)}},3925:function(T,f,c){var v=c(34);T.exports=function(C){return v(C)||C===null}},6395:function(T){T.exports=!1},757:function(T,f,c){var v=c(7751),C=c(4901),w=c(1625),I=c(7040),L=Object;T.exports=I?function(z){return typeof z=="symbol"}:function(z){var F=v("Symbol");return C(F)&&w(F.prototype,L(z))}},2652:function(T,f,c){var v=c(6080),C=c(9565),w=c(8551),I=c(6823),L=c(4209),z=c(6198),F=c(1625),K=c(81),N=c(851),P=c(9539),$=TypeError,d=function(U,J){this.stopped=U,this.result=J},M=d.prototype;T.exports=function(U,J,G){var Y=G&&G.that,ee=!!(G&&G.AS_ENTRIES),q=!!(G&&G.IS_RECORD),oe=!!(G&&G.IS_ITERATOR),ne=!!(G&&G.INTERRUPTED),ae=v(J,Y),xe,he,H,we,Ae,Ie,He,nt=function(it){return xe&&P(xe,"normal",it),new d(!0,it)},Xe=function(it){return ee?(w(it),ne?ae(it[0],it[1],nt):ae(it[0],it[1])):ne?ae(it,nt):ae(it)};if(q)xe=U.iterator;else if(oe)xe=U;else{if(he=N(U),!he)throw new $(I(U)+" is not iterable");if(L(he)){for(H=0,we=z(U);we>H;H++)if(Ae=Xe(U[H]),Ae&&F(M,Ae))return Ae;return new d(!1)}xe=K(U,he)}for(Ie=q?U.next:xe.next;!(He=C(Ie,xe)).done;){try{Ae=Xe(He.value)}catch(it){P(xe,"throw",it)}if(typeof Ae=="object"&&Ae&&F(M,Ae))return Ae}return new d(!1)}},9539:function(T,f,c){var v=c(9565),C=c(8551),w=c(5966);T.exports=function(I,L,z){var F,K;C(I);try{if(F=w(I,"return"),!F){if(L==="throw")throw z;return z}F=v(F,I)}catch(N){K=!0,F=N}if(L==="throw")throw z;if(K)throw F;return C(F),z}},3994:function(T,f,c){var v=c(7657).IteratorPrototype,C=c(2360),w=c(6980),I=c(687),L=c(6269),z=function(){return this};T.exports=function(F,K,N,P){var $=K+" Iterator";return F.prototype=C(v,{next:w(+!P,N)}),I(F,$,!1,!0),L[$]=z,F}},1088:function(T,f,c){var v=c(6518),C=c(9565),w=c(6395),I=c(350),L=c(4901),z=c(3994),F=c(2787),K=c(2967),N=c(687),P=c(6699),$=c(6840),d=c(8227),M=c(6269),U=c(7657),J=I.PROPER,G=I.CONFIGURABLE,Y=U.IteratorPrototype,ee=U.BUGGY_SAFARI_ITERATORS,q=d("iterator"),oe="keys",ne="values",ae="entries",xe=function(){return this};T.exports=function(he,H,we,Ae,Ie,He,nt){z(we,H,Ae);var Xe=function(In){if(In===Ie&&st)return st;if(!ee&&In&&In in Re)return Re[In];switch(In){case oe:return function(){return new we(this,In)};case ne:return function(){return new we(this,In)};case ae:return function(){return new we(this,In)}}return function(){return new we(this)}},it=H+" Iterator",ht=!1,Re=he.prototype,Qe=Re[q]||Re["@@iterator"]||Ie&&Re[Ie],st=!ee&&Qe||Xe(Ie),Xt=H==="Array"&&Re.entries||Qe,Gt,gn,ut;if(Xt&&(Gt=F(Xt.call(new he)),Gt!==Object.prototype&&Gt.next&&(!w&&F(Gt)!==Y&&(K?K(Gt,Y):L(Gt[q])||$(Gt,q,xe)),N(Gt,it,!0,!0),w&&(M[it]=xe))),J&&Ie===ne&&Qe&&Qe.name!==ne&&(!w&&G?P(Re,"name",ne):(ht=!0,st=function(){return C(Qe,this)})),Ie)if(gn={values:Xe(ne),keys:He?st:Xe(oe),entries:Xe(ae)},nt)for(ut in gn)(ee||ht||!(ut in Re))&&$(Re,ut,gn[ut]);else v({target:H,proto:!0,forced:ee||ht},gn);return(!w||nt)&&Re[q]!==st&&$(Re,q,st,{name:Ie}),M[H]=st,gn}},7657:function(T,f,c){var v=c(9039),C=c(4901),w=c(34),I=c(2360),L=c(2787),z=c(6840),F=c(8227),K=c(6395),N=F("iterator"),P=!1,$,d,M;[].keys&&(M=[].keys(),"next"in M?(d=L(L(M)),d!==Object.prototype&&($=d)):P=!0);var U=!w($)||v(function(){var J={};return $[N].call(J)!==J});U?$={}:K&&($=I($)),C($[N])||z($,N,function(){return this}),T.exports={IteratorPrototype:$,BUGGY_SAFARI_ITERATORS:P}},6269:function(T){T.exports={}},6198:function(T,f,c){var v=c(8014);T.exports=function(C){return v(C.length)}},283:function(T,f,c){var v=c(9504),C=c(9039),w=c(4901),I=c(9297),L=c(3724),z=c(350).CONFIGURABLE,F=c(3706),K=c(1181),N=K.enforce,P=K.get,$=String,d=Object.defineProperty,M=v("".slice),U=v("".replace),J=v([].join),G=L&&!C(function(){return d(function(){},"length",{value:8}).length!==8}),Y=String(String).split("String"),ee=T.exports=function(q,oe,ne){M($(oe),0,7)==="Symbol("&&(oe="["+U($(oe),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),ne&&ne.getter&&(oe="get "+oe),ne&&ne.setter&&(oe="set "+oe),(!I(q,"name")||z&&q.name!==oe)&&(L?d(q,"name",{value:oe,configurable:!0}):q.name=oe),G&&ne&&I(ne,"arity")&&q.length!==ne.arity&&d(q,"length",{value:ne.arity});try{ne&&I(ne,"constructor")&&ne.constructor?L&&d(q,"prototype",{writable:!1}):q.prototype&&(q.prototype=void 0)}catch{}var ae=N(q);return I(ae,"source")||(ae.source=J(Y,typeof oe=="string"?oe:"")),q};Function.prototype.toString=ee(function(){return w(this)&&P(this).source||F(this)},"toString")},9340:function(T){var f=Math.log,c=Math.LOG10E;T.exports=Math.log10||function(C){return f(C)*c}},741:function(T){var f=Math.ceil,c=Math.floor;T.exports=Math.trunc||function(C){var w=+C;return(w>0?c:f)(w)}},1955:function(T,f,c){var v=c(4576),C=c(3389),w=c(6080),I=c(9225).set,L=c(8265),z=c(9544),F=c(4265),K=c(7860),N=c(8574),P=v.MutationObserver||v.WebKitMutationObserver,$=v.document,d=v.process,M=v.Promise,U=C("queueMicrotask"),J,G,Y,ee,q;if(!U){var oe=new L,ne=function(){var ae,xe;for(N&&(ae=d.domain)&&ae.exit();xe=oe.get();)try{xe()}catch(he){throw oe.head&&J(),he}ae&&ae.enter()};!z&&!N&&!K&&P&&$?(G=!0,Y=$.createTextNode(""),new P(ne).observe(Y,{characterData:!0}),J=function(){Y.data=G=!G}):!F&&M&&M.resolve?(ee=M.resolve(void 0),ee.constructor=M,q=w(ee.then,ee),J=function(){q(ne)}):N?J=function(){d.nextTick(ne)}:(I=w(I,v),J=function(){I(ne)}),U=function(ae){oe.head||J(),oe.add(ae)}}T.exports=U},6043:function(T,f,c){var v=c(9306),C=TypeError,w=function(I){var L,z;this.promise=new I(function(F,K){if(L!==void 0||z!==void 0)throw new C("Bad Promise constructor");L=F,z=K}),this.resolve=v(L),this.reject=v(z)};T.exports.f=function(I){return new w(I)}},2603:function(T,f,c){var v=c(655);T.exports=function(C,w){return C===void 0?arguments.length<2?"":w:v(C)}},2703:function(T,f,c){var v=c(4576),C=c(9039),w=c(9504),I=c(655),L=c(3802).trim,z=c(7452),F=v.parseInt,K=v.Symbol,N=K&&K.iterator,P=/^[+-]?0x/i,$=w(P.exec),d=F(z+"08")!==8||F(z+"0x16")!==22||N&&!C(function(){F(Object(N))});T.exports=d?function(U,J){var G=L(I(U));return F(G,J>>>0||($(P,G)?16:10))}:F},2360:function(T,f,c){var v=c(8551),C=c(6801),w=c(8727),I=c(421),L=c(397),z=c(4055),F=c(6119),K=">",N="<",P="prototype",$="script",d=F("IE_PROTO"),M=function(){},U=function(q){return N+$+K+q+N+"/"+$+K},J=function(q){q.write(U("")),q.close();var oe=q.parentWindow.Object;return q=null,oe},G=function(){var q=z("iframe"),oe="java"+$+":",ne;return q.style.display="none",L.appendChild(q),q.src=String(oe),ne=q.contentWindow.document,ne.open(),ne.write(U("document.F=Object")),ne.close(),ne.F},Y,ee=function(){try{Y=new ActiveXObject("htmlfile")}catch{}ee=typeof document<"u"?document.domain&&Y?J(Y):G():J(Y);for(var q=w.length;q--;)delete ee[P][w[q]];return ee()};I[d]=!0,T.exports=Object.create||function(oe,ne){var ae;return oe!==null?(M[P]=v(oe),ae=new M,M[P]=null,ae[d]=oe):ae=ee(),ne===void 0?ae:C.f(ae,ne)}},6801:function(T,f,c){var v=c(3724),C=c(8686),w=c(4913),I=c(8551),L=c(5397),z=c(1072);f.f=v&&!C?Object.defineProperties:function(K,N){I(K);for(var P=L(N),$=z(N),d=$.length,M=0,U;d>M;)w.f(K,U=$[M++],P[U]);return K}},4913:function(T,f,c){var v=c(3724),C=c(5917),w=c(8686),I=c(8551),L=c(6969),z=TypeError,F=Object.defineProperty,K=Object.getOwnPropertyDescriptor,N="enumerable",P="configurable",$="writable";f.f=v?w?function(M,U,J){if(I(M),U=L(U),I(J),typeof M=="function"&&U==="prototype"&&"value"in J&&$ in J&&!J[$]){var G=K(M,U);G&&G[$]&&(M[U]=J.value,J={configurable:P in J?J[P]:G[P],enumerable:N in J?J[N]:G[N],writable:!1})}return F(M,U,J)}:F:function(M,U,J){if(I(M),U=L(U),I(J),C)try{return F(M,U,J)}catch{}if("get"in J||"set"in J)throw new z("Accessors not supported");return"value"in J&&(M[U]=J.value),M}},7347:function(T,f,c){var v=c(3724),C=c(9565),w=c(8773),I=c(6980),L=c(5397),z=c(6969),F=c(9297),K=c(5917),N=Object.getOwnPropertyDescriptor;f.f=v?N:function($,d){if($=L($),d=z(d),K)try{return N($,d)}catch{}if(F($,d))return I(!C(w.f,$,d),$[d])}},298:function(T,f,c){var v=c(2195),C=c(5397),w=c(8480).f,I=c(7680),L=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],z=function(F){try{return w(F)}catch{return I(L)}};T.exports.f=function(K){return L&&v(K)==="Window"?z(K):w(C(K))}},8480:function(T,f,c){var v=c(1828),C=c(8727),w=C.concat("length","prototype");f.f=Object.getOwnPropertyNames||function(L){return v(L,w)}},3717:function(T,f){f.f=Object.getOwnPropertySymbols},2787:function(T,f,c){var v=c(9297),C=c(4901),w=c(8981),I=c(6119),L=c(2211),z=I("IE_PROTO"),F=Object,K=F.prototype;T.exports=L?F.getPrototypeOf:function(N){var P=w(N);if(v(P,z))return P[z];var $=P.constructor;return C($)&&P instanceof $?$.prototype:P instanceof F?K:null}},4124:function(T,f,c){var v=c(9039),C=c(34),w=c(2195),I=c(5652),L=Object.isExtensible,z=v(function(){});T.exports=z||I?function(K){return!C(K)||I&&w(K)==="ArrayBuffer"?!1:L?L(K):!0}:L},1625:function(T,f,c){var v=c(9504);T.exports=v({}.isPrototypeOf)},1828:function(T,f,c){var v=c(9504),C=c(9297),w=c(5397),I=c(9617).indexOf,L=c(421),z=v([].push);T.exports=function(F,K){var N=w(F),P=0,$=[],d;for(d in N)!C(L,d)&&C(N,d)&&z($,d);for(;K.length>P;)C(N,d=K[P++])&&(~I($,d)||z($,d));return $}},1072:function(T,f,c){var v=c(1828),C=c(8727);T.exports=Object.keys||function(I){return v(I,C)}},8773:function(T,f){var c={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,C=v&&!c.call({1:2},1);f.f=C?function(I){var L=v(this,I);return!!L&&L.enumerable}:c},2967:function(T,f,c){var v=c(6706),C=c(34),w=c(7750),I=c(3506);T.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var L=!1,z={},F;try{F=v(Object.prototype,"__proto__","set"),F(z,[]),L=z instanceof Array}catch{}return function(N,P){return w(N),I(P),C(N)&&(L?F(N,P):N.__proto__=P),N}}():void 0)},2357:function(T,f,c){var v=c(3724),C=c(9039),w=c(9504),I=c(2787),L=c(1072),z=c(5397),F=c(8773).f,K=w(F),N=w([].push),P=v&&C(function(){var d=Object.create(null);return d[2]=2,!K(d,2)}),$=function(d){return function(M){for(var U=z(M),J=L(U),G=P&&I(U)===null,Y=J.length,ee=0,q=[],oe;Y>ee;)oe=J[ee++],(!v||(G?oe in U:K(U,oe)))&&N(q,d?[oe,U[oe]]:U[oe]);return q}};T.exports={entries:$(!0),values:$(!1)}},3179:function(T,f,c){var v=c(2140),C=c(6955);T.exports=v?{}.toString:function(){return"[object "+C(this)+"]"}},4270:function(T,f,c){var v=c(9565),C=c(4901),w=c(34),I=TypeError;T.exports=function(L,z){var F,K;if(z==="string"&&C(F=L.toString)&&!w(K=v(F,L))||C(F=L.valueOf)&&!w(K=v(F,L))||z!=="string"&&C(F=L.toString)&&!w(K=v(F,L)))return K;throw new I("Can't convert object to primitive value")}},5031:function(T,f,c){var v=c(7751),C=c(9504),w=c(8480),I=c(3717),L=c(8551),z=C([].concat);T.exports=v("Reflect","ownKeys")||function(K){var N=w.f(L(K)),P=I.f;return P?z(N,P(K)):N}},9167:function(T,f,c){var v=c(4576);T.exports=v},1103:function(T){T.exports=function(f){try{return{error:!1,value:f()}}catch(c){return{error:!0,value:c}}}},916:function(T,f,c){var v=c(4576),C=c(550),w=c(4901),I=c(2796),L=c(3706),z=c(8227),F=c(4215),K=c(6395),N=c(9519),P=C&&C.prototype,$=z("species"),d=!1,M=w(v.PromiseRejectionEvent),U=I("Promise",function(){var J=L(C),G=J!==String(C);if(!G&&N===66||K&&!(P.catch&&P.finally))return!0;if(!N||N<51||!/native code/.test(J)){var Y=new C(function(oe){oe(1)}),ee=function(oe){oe(function(){},function(){})},q=Y.constructor={};if(q[$]=ee,d=Y.then(function(){})instanceof ee,!d)return!0}return!G&&(F==="BROWSER"||F==="DENO")&&!M});T.exports={CONSTRUCTOR:U,REJECTION_EVENT:M,SUBCLASSING:d}},550:function(T,f,c){var v=c(4576);T.exports=v.Promise},3438:function(T,f,c){var v=c(8551),C=c(34),w=c(6043);T.exports=function(I,L){if(v(I),C(L)&&L.constructor===I)return L;var z=w.f(I),F=z.resolve;return F(L),z.promise}},537:function(T,f,c){var v=c(550),C=c(4428),w=c(916).CONSTRUCTOR;T.exports=w||!C(function(I){v.all(I).then(void 0,function(){})})},1056:function(T,f,c){var v=c(4913).f;T.exports=function(C,w,I){I in C||v(C,I,{configurable:!0,get:function(){return w[I]},set:function(L){w[I]=L}})}},8265:function(T){var f=function(){this.head=null,this.tail=null};f.prototype={add:function(c){var v={item:c,next:null},C=this.tail;C?C.next=v:this.head=v,this.tail=v},get:function(){var c=this.head;if(c){var v=this.head=c.next;return v===null&&(this.tail=null),c.item}}},T.exports=f},6682:function(T,f,c){var v=c(9565),C=c(8551),w=c(4901),I=c(2195),L=c(7323),z=TypeError;T.exports=function(F,K){var N=F.exec;if(w(N)){var P=v(N,F,K);return P!==null&&C(P),P}if(I(F)==="RegExp")return v(L,F,K);throw new z("RegExp#exec called on incompatible receiver")}},7323:function(T,f,c){var v=c(9565),C=c(9504),w=c(655),I=c(7979),L=c(8429),z=c(5745),F=c(2360),K=c(1181).get,N=c(3635),P=c(8814),$=z("native-string-replace",String.prototype.replace),d=RegExp.prototype.exec,M=d,U=C("".charAt),J=C("".indexOf),G=C("".replace),Y=C("".slice),ee=function(){var ae=/a/,xe=/b*/g;return v(d,ae,"a"),v(d,xe,"a"),ae.lastIndex!==0||xe.lastIndex!==0}(),q=L.BROKEN_CARET,oe=/()??/.exec("")[1]!==void 0,ne=ee||oe||q||N||P;ne&&(M=function(xe){var he=this,H=K(he),we=w(xe),Ae=H.raw,Ie,He,nt,Xe,it,ht,Re;if(Ae)return Ae.lastIndex=he.lastIndex,Ie=v(M,Ae,we),he.lastIndex=Ae.lastIndex,Ie;var Qe=H.groups,st=q&&he.sticky,Xt=v(I,he),Gt=he.source,gn=0,ut=we;if(st&&(Xt=G(Xt,"y",""),J(Xt,"g")===-1&&(Xt+="g"),ut=Y(we,he.lastIndex),he.lastIndex>0&&(!he.multiline||he.multiline&&U(we,he.lastIndex-1)!==`
120
+ `)&&(Gt="(?: "+Gt+")",ut=" "+ut,gn++),He=new RegExp("^(?:"+Gt+")",Xt)),oe&&(He=new RegExp("^"+Gt+"$(?!\\s)",Xt)),ee&&(nt=he.lastIndex),Xe=v(d,st?He:he,ut),st?Xe?(Xe.input=Y(Xe.input,gn),Xe[0]=Y(Xe[0],gn),Xe.index=he.lastIndex,he.lastIndex+=Xe[0].length):he.lastIndex=0:ee&&Xe&&(he.lastIndex=he.global?Xe.index+Xe[0].length:nt),oe&&Xe&&Xe.length>1&&v($,Xe[0],He,function(){for(it=1;it<arguments.length-2;it++)arguments[it]===void 0&&(Xe[it]=void 0)}),Xe&&Qe)for(Xe.groups=ht=F(null),it=0;it<Qe.length;it++)Re=Qe[it],ht[Re[0]]=Xe[Re[1]];return Xe}),T.exports=M},7979:function(T,f,c){var v=c(8551);T.exports=function(){var C=v(this),w="";return C.hasIndices&&(w+="d"),C.global&&(w+="g"),C.ignoreCase&&(w+="i"),C.multiline&&(w+="m"),C.dotAll&&(w+="s"),C.unicode&&(w+="u"),C.unicodeSets&&(w+="v"),C.sticky&&(w+="y"),w}},1034:function(T,f,c){var v=c(9565),C=c(9297),w=c(1625),I=c(7979),L=RegExp.prototype;T.exports=function(z){var F=z.flags;return F===void 0&&!("flags"in L)&&!C(z,"flags")&&w(L,z)?v(I,z):F}},8429:function(T,f,c){var v=c(9039),C=c(4576),w=C.RegExp,I=v(function(){var F=w("a","y");return F.lastIndex=2,F.exec("abcd")!==null}),L=I||v(function(){return!w("a","y").sticky}),z=I||v(function(){var F=w("^r","gy");return F.lastIndex=2,F.exec("str")!==null});T.exports={BROKEN_CARET:z,MISSED_STICKY:L,UNSUPPORTED_Y:I}},3635:function(T,f,c){var v=c(9039),C=c(4576),w=C.RegExp;T.exports=v(function(){var I=w(".","s");return!(I.dotAll&&I.test(`
121
+ `)&&I.flags==="s")})},8814:function(T,f,c){var v=c(9039),C=c(4576),w=C.RegExp;T.exports=v(function(){var I=w("(?<a>b)","g");return I.exec("b").groups.a!=="b"||"b".replace(I,"$<a>c")!=="bc"})},7750:function(T,f,c){var v=c(4117),C=TypeError;T.exports=function(w){if(v(w))throw new C("Can't call method on "+w);return w}},3389:function(T,f,c){var v=c(4576),C=c(3724),w=Object.getOwnPropertyDescriptor;T.exports=function(I){if(!C)return v[I];var L=w(v,I);return L&&L.value}},9472:function(T,f,c){var v=c(4576),C=c(8745),w=c(4901),I=c(4215),L=c(2839),z=c(7680),F=c(2812),K=v.Function,N=/MSIE .\./.test(L)||I==="BUN"&&function(){var P=v.Bun.version.split(".");return P.length<3||P[0]==="0"&&(P[1]<3||P[1]==="3"&&P[2]==="0")}();T.exports=function(P,$){var d=$?2:1;return N?function(M,U){var J=F(arguments.length,1)>d,G=w(M)?M:K(M),Y=J?z(arguments,d):[],ee=J?function(){C(G,this,Y)}:G;return $?P(ee,U):P(ee)}:P}},7633:function(T,f,c){var v=c(7751),C=c(2106),w=c(8227),I=c(3724),L=w("species");T.exports=function(z){var F=v(z);I&&F&&!F[L]&&C(F,L,{configurable:!0,get:function(){return this}})}},687:function(T,f,c){var v=c(4913).f,C=c(9297),w=c(8227),I=w("toStringTag");T.exports=function(L,z,F){L&&!F&&(L=L.prototype),L&&!C(L,I)&&v(L,I,{configurable:!0,value:z})}},6119:function(T,f,c){var v=c(5745),C=c(3392),w=v("keys");T.exports=function(I){return w[I]||(w[I]=C(I))}},7629:function(T,f,c){var v=c(6395),C=c(4576),w=c(9433),I="__core-js_shared__",L=T.exports=C[I]||w(I,{});(L.versions||(L.versions=[])).push({version:"3.42.0",mode:v?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(T,f,c){var v=c(7629);T.exports=function(C,w){return v[C]||(v[C]=w||{})}},2293:function(T,f,c){var v=c(8551),C=c(5548),w=c(4117),I=c(8227),L=I("species");T.exports=function(z,F){var K=v(z).constructor,N;return K===void 0||w(N=v(K)[L])?F:C(N)}},8183:function(T,f,c){var v=c(9504),C=c(1291),w=c(655),I=c(7750),L=v("".charAt),z=v("".charCodeAt),F=v("".slice),K=function(N){return function(P,$){var d=w(I(P)),M=C($),U=d.length,J,G;return M<0||M>=U?N?"":void 0:(J=z(d,M),J<55296||J>56319||M+1===U||(G=z(d,M+1))<56320||G>57343?N?L(d,M):J:N?F(d,M,M+2):(J-55296<<10)+(G-56320)+65536)}};T.exports={codeAt:K(!1),charAt:K(!0)}},2333:function(T,f,c){var v=c(1291),C=c(655),w=c(7750),I=RangeError;T.exports=function(z){var F=C(w(this)),K="",N=v(z);if(N<0||N===1/0)throw new I("Wrong number of repetitions");for(;N>0;(N>>>=1)&&(F+=F))N&1&&(K+=F);return K}},3802:function(T,f,c){var v=c(9504),C=c(7750),w=c(655),I=c(7452),L=v("".replace),z=RegExp("^["+I+"]+"),F=RegExp("(^|[^"+I+"])["+I+"]+$"),K=function(N){return function(P){var $=w(C(P));return N&1&&($=L($,z,"")),N&2&&($=L($,F,"$1")),$}};T.exports={start:K(1),end:K(2),trim:K(3)}},4495:function(T,f,c){var v=c(9519),C=c(9039),w=c(4576),I=w.String;T.exports=!!Object.getOwnPropertySymbols&&!C(function(){var L=Symbol("symbol detection");return!I(L)||!(Object(L)instanceof Symbol)||!Symbol.sham&&v&&v<41})},8242:function(T,f,c){var v=c(9565),C=c(7751),w=c(8227),I=c(6840);T.exports=function(){var L=C("Symbol"),z=L&&L.prototype,F=z&&z.valueOf,K=w("toPrimitive");z&&!z[K]&&I(z,K,function(N){return v(F,this)},{arity:1})}},1296:function(T,f,c){var v=c(4495);T.exports=v&&!!Symbol.for&&!!Symbol.keyFor},9225:function(T,f,c){var v=c(4576),C=c(8745),w=c(6080),I=c(4901),L=c(9297),z=c(9039),F=c(397),K=c(7680),N=c(4055),P=c(2812),$=c(9544),d=c(8574),M=v.setImmediate,U=v.clearImmediate,J=v.process,G=v.Dispatch,Y=v.Function,ee=v.MessageChannel,q=v.String,oe=0,ne={},ae="onreadystatechange",xe,he,H,we;z(function(){xe=v.location});var Ae=function(Xe){if(L(ne,Xe)){var it=ne[Xe];delete ne[Xe],it()}},Ie=function(Xe){return function(){Ae(Xe)}},He=function(Xe){Ae(Xe.data)},nt=function(Xe){v.postMessage(q(Xe),xe.protocol+"//"+xe.host)};(!M||!U)&&(M=function(it){P(arguments.length,1);var ht=I(it)?it:Y(it),Re=K(arguments,1);return ne[++oe]=function(){C(ht,void 0,Re)},he(oe),oe},U=function(it){delete ne[it]},d?he=function(Xe){J.nextTick(Ie(Xe))}:G&&G.now?he=function(Xe){G.now(Ie(Xe))}:ee&&!$?(H=new ee,we=H.port2,H.port1.onmessage=He,he=w(we.postMessage,we)):v.addEventListener&&I(v.postMessage)&&!v.importScripts&&xe&&xe.protocol!=="file:"&&!z(nt)?(he=nt,v.addEventListener("message",He,!1)):ae in N("script")?he=function(Xe){F.appendChild(N("script"))[ae]=function(){F.removeChild(this),Ae(Xe)}}:he=function(Xe){setTimeout(Ie(Xe),0)}),T.exports={set:M,clear:U}},1240:function(T,f,c){var v=c(9504);T.exports=v(1 .valueOf)},5610:function(T,f,c){var v=c(1291),C=Math.max,w=Math.min;T.exports=function(I,L){var z=v(I);return z<0?C(z+L,0):w(z,L)}},5397:function(T,f,c){var v=c(7055),C=c(7750);T.exports=function(w){return v(C(w))}},1291:function(T,f,c){var v=c(741);T.exports=function(C){var w=+C;return w!==w||w===0?0:v(w)}},8014:function(T,f,c){var v=c(1291),C=Math.min;T.exports=function(w){var I=v(w);return I>0?C(I,9007199254740991):0}},8981:function(T,f,c){var v=c(7750),C=Object;T.exports=function(w){return C(v(w))}},2777:function(T,f,c){var v=c(9565),C=c(34),w=c(757),I=c(5966),L=c(4270),z=c(8227),F=TypeError,K=z("toPrimitive");T.exports=function(N,P){if(!C(N)||w(N))return N;var $=I(N,K),d;if($){if(P===void 0&&(P="default"),d=v($,N,P),!C(d)||w(d))return d;throw new F("Can't convert object to primitive value")}return P===void 0&&(P="number"),L(N,P)}},6969:function(T,f,c){var v=c(2777),C=c(757);T.exports=function(w){var I=v(w,"string");return C(I)?I:I+""}},2140:function(T,f,c){var v=c(8227),C=v("toStringTag"),w={};w[C]="z",T.exports=String(w)==="[object z]"},655:function(T,f,c){var v=c(6955),C=String;T.exports=function(w){if(v(w)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return C(w)}},6823:function(T){var f=String;T.exports=function(c){try{return f(c)}catch{return"Object"}}},3392:function(T,f,c){var v=c(9504),C=0,w=Math.random(),I=v(1 .toString);T.exports=function(L){return"Symbol("+(L===void 0?"":L)+")_"+I(++C+w,36)}},7040:function(T,f,c){var v=c(4495);T.exports=v&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:function(T,f,c){var v=c(3724),C=c(9039);T.exports=v&&C(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},2812:function(T){var f=TypeError;T.exports=function(c,v){if(c<v)throw new f("Not enough arguments");return c}},8622:function(T,f,c){var v=c(4576),C=c(4901),w=v.WeakMap;T.exports=C(w)&&/native code/.test(String(w))},511:function(T,f,c){var v=c(9167),C=c(9297),w=c(1951),I=c(4913).f;T.exports=function(L){var z=v.Symbol||(v.Symbol={});C(z,L)||I(z,L,{value:w.f(L)})}},1951:function(T,f,c){var v=c(8227);f.f=v},8227:function(T,f,c){var v=c(4576),C=c(5745),w=c(9297),I=c(3392),L=c(4495),z=c(7040),F=v.Symbol,K=C("wks"),N=z?F.for||F:F&&F.withoutSetter||I;T.exports=function(P){return w(K,P)||(K[P]=L&&w(F,P)?F[P]:N("Symbol."+P)),K[P]}},7452:function(T){T.exports=`
122
+ \v\f\r                 \u2028\u2029\uFEFF`},4601:function(T,f,c){var v=c(7751),C=c(9297),w=c(6699),I=c(1625),L=c(2967),z=c(7740),F=c(1056),K=c(3167),N=c(2603),P=c(7584),$=c(747),d=c(3724),M=c(6395);T.exports=function(U,J,G,Y){var ee="stackTraceLimit",q=Y?2:1,oe=U.split("."),ne=oe[oe.length-1],ae=v.apply(null,oe);if(ae){var xe=ae.prototype;if(!M&&C(xe,"cause")&&delete xe.cause,!G)return ae;var he=v("Error"),H=J(function(we,Ae){var Ie=N(Y?Ae:we,void 0),He=Y?new ae(we):new ae;return Ie!==void 0&&w(He,"message",Ie),$(He,H,He.stack,2),this&&I(xe,this)&&K(He,this,H),arguments.length>q&&P(He,arguments[q]),He});if(H.prototype=xe,ne!=="Error"?L?L(H,he):z(H,he,{name:!0}):d&&ee in ae&&(F(H,ae,ee),F(H,ae,"prepareStackTrace")),z(H,ae),!M)try{xe.name!==ne&&w(xe,"name",ne),xe.constructor=H}catch{}return H}}},8706:function(T,f,c){var v=c(6518),C=c(9039),w=c(4376),I=c(34),L=c(8981),z=c(6198),F=c(6837),K=c(4659),N=c(1469),P=c(597),$=c(8227),d=c(9519),M=$("isConcatSpreadable"),U=d>=51||!C(function(){var Y=[];return Y[M]=!1,Y.concat()[0]!==Y}),J=function(Y){if(!I(Y))return!1;var ee=Y[M];return ee!==void 0?!!ee:w(Y)},G=!U||!P("concat");v({target:"Array",proto:!0,arity:1,forced:G},{concat:function(ee){var q=L(this),oe=N(q,0),ne=0,ae,xe,he,H,we;for(ae=-1,he=arguments.length;ae<he;ae++)if(we=ae===-1?q:arguments[ae],J(we))for(H=z(we),F(ne+H),xe=0;xe<H;xe++,ne++)xe in we&&K(oe,ne,we[xe]);else F(ne+1),K(oe,ne++,we);return oe.length=ne,oe}})},2008:function(T,f,c){var v=c(6518),C=c(9213).filter,w=c(597),I=w("filter");v({target:"Array",proto:!0,forced:!I},{filter:function(z){return C(this,z,arguments.length>1?arguments[1]:void 0)}})},113:function(T,f,c){var v=c(6518),C=c(9213).find,w=c(6469),I="find",L=!0;I in[]&&Array(1)[I](function(){L=!1}),v({target:"Array",proto:!0,forced:L},{find:function(F){return C(this,F,arguments.length>1?arguments[1]:void 0)}}),w(I)},3418:function(T,f,c){var v=c(6518),C=c(7916),w=c(4428),I=!w(function(L){Array.from(L)});v({target:"Array",stat:!0,forced:I},{from:C})},4423:function(T,f,c){var v=c(6518),C=c(9617).includes,w=c(9039),I=c(6469),L=w(function(){return!Array(1).includes()});v({target:"Array",proto:!0,forced:L},{includes:function(F){return C(this,F,arguments.length>1?arguments[1]:void 0)}}),I("includes")},3792:function(T,f,c){var v=c(5397),C=c(6469),w=c(6269),I=c(1181),L=c(4913).f,z=c(1088),F=c(2529),K=c(6395),N=c(3724),P="Array Iterator",$=I.set,d=I.getterFor(P);T.exports=z(Array,"Array",function(U,J){$(this,{type:P,target:v(U),index:0,kind:J})},function(){var U=d(this),J=U.target,G=U.index++;if(!J||G>=J.length)return U.target=null,F(void 0,!0);switch(U.kind){case"keys":return F(G,!1);case"values":return F(J[G],!1)}return F([G,J[G]],!1)},"values");var M=w.Arguments=w.Array;if(C("keys"),C("values"),C("entries"),!K&&N&&M.name!=="values")try{L(M,"name",{value:"values"})}catch{}},8598:function(T,f,c){var v=c(6518),C=c(9504),w=c(7055),I=c(5397),L=c(4598),z=C([].join),F=w!==Object,K=F||!L("join",",");v({target:"Array",proto:!0,forced:K},{join:function(P){return z(I(this),P===void 0?",":P)}})},2062:function(T,f,c){var v=c(6518),C=c(9213).map,w=c(597),I=w("map");v({target:"Array",proto:!0,forced:!I},{map:function(z){return C(this,z,arguments.length>1?arguments[1]:void 0)}})},4114:function(T,f,c){var v=c(6518),C=c(8981),w=c(6198),I=c(4527),L=c(6837),z=c(9039),F=z(function(){return[].push.call({length:4294967296},1)!==4294967297}),K=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(P){return P instanceof TypeError}},N=F||!K();v({target:"Array",proto:!0,arity:1,forced:N},{push:function($){var d=C(this),M=w(d),U=arguments.length;L(M+U);for(var J=0;J<U;J++)d[M]=arguments[J],M++;return I(d,M),M}})},4782:function(T,f,c){var v=c(6518),C=c(4376),w=c(3517),I=c(34),L=c(5610),z=c(6198),F=c(5397),K=c(4659),N=c(8227),P=c(597),$=c(7680),d=P("slice"),M=N("species"),U=Array,J=Math.max;v({target:"Array",proto:!0,forced:!d},{slice:function(Y,ee){var q=F(this),oe=z(q),ne=L(Y,oe),ae=L(ee===void 0?oe:ee,oe),xe,he,H;if(C(q)&&(xe=q.constructor,w(xe)&&(xe===U||C(xe.prototype))?xe=void 0:I(xe)&&(xe=xe[M],xe===null&&(xe=void 0)),xe===U||xe===void 0))return $(q,ne,ae);for(he=new(xe===void 0?U:xe)(J(ae-ne,0)),H=0;ne<ae;ne++,H++)ne in q&&K(he,H,q[ne]);return he.length=H,he}})},6910:function(T,f,c){var v=c(6518),C=c(9504),w=c(9306),I=c(8981),L=c(6198),z=c(4606),F=c(655),K=c(9039),N=c(4488),P=c(4598),$=c(3709),d=c(3763),M=c(9519),U=c(3607),J=[],G=C(J.sort),Y=C(J.push),ee=K(function(){J.sort(void 0)}),q=K(function(){J.sort(null)}),oe=P("sort"),ne=!K(function(){if(M)return M<70;if(!($&&$>3)){if(d)return!0;if(U)return U<603;var he="",H,we,Ae,Ie;for(H=65;H<76;H++){switch(we=String.fromCharCode(H),H){case 66:case 69:case 70:case 72:Ae=3;break;case 68:case 71:Ae=4;break;default:Ae=2}for(Ie=0;Ie<47;Ie++)J.push({k:we+Ie,v:Ae})}for(J.sort(function(He,nt){return nt.v-He.v}),Ie=0;Ie<J.length;Ie++)we=J[Ie].k.charAt(0),he.charAt(he.length-1)!==we&&(he+=we);return he!=="DGBEFHACIJK"}}),ae=ee||!q||!oe||!ne,xe=function(he){return function(H,we){return we===void 0?-1:H===void 0?1:he!==void 0?+he(H,we)||0:F(H)>F(we)?1:-1}};v({target:"Array",proto:!0,forced:ae},{sort:function(H){H!==void 0&&w(H);var we=I(this);if(ne)return H===void 0?G(we):G(we,H);var Ae=[],Ie=L(we),He,nt;for(nt=0;nt<Ie;nt++)nt in we&&Y(Ae,we[nt]);for(N(Ae,xe(H)),He=L(Ae),nt=0;nt<He;)we[nt]=Ae[nt++];for(;nt<Ie;)z(we,nt++);return we}})},739:function(T,f,c){var v=c(6518),C=c(9039),w=c(8981),I=c(2777),L=C(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});v({target:"Date",proto:!0,arity:1,forced:L},{toJSON:function(F){var K=w(this),N=I(K,"number");return typeof N=="number"&&!isFinite(N)?null:K.toISOString()}})},6280:function(T,f,c){var v=c(6518),C=c(4576),w=c(8745),I=c(4601),L="WebAssembly",z=C[L],F=new Error("e",{cause:7}).cause!==7,K=function(P,$){var d={};d[P]=I(P,$,F),v({global:!0,constructor:!0,arity:1,forced:F},d)},N=function(P,$){if(z&&z[P]){var d={};d[P]=I(L+"."+P,$,F),v({target:L,stat:!0,constructor:!0,arity:1,forced:F},d)}};K("Error",function(P){return function(d){return w(P,this,arguments)}}),K("EvalError",function(P){return function(d){return w(P,this,arguments)}}),K("RangeError",function(P){return function(d){return w(P,this,arguments)}}),K("ReferenceError",function(P){return function(d){return w(P,this,arguments)}}),K("SyntaxError",function(P){return function(d){return w(P,this,arguments)}}),K("TypeError",function(P){return function(d){return w(P,this,arguments)}}),K("URIError",function(P){return function(d){return w(P,this,arguments)}}),N("CompileError",function(P){return function(d){return w(P,this,arguments)}}),N("LinkError",function(P){return function(d){return w(P,this,arguments)}}),N("RuntimeError",function(P){return function(d){return w(P,this,arguments)}})},2010:function(T,f,c){var v=c(3724),C=c(350).EXISTS,w=c(9504),I=c(2106),L=Function.prototype,z=w(L.toString),F=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,K=w(F.exec),N="name";v&&!C&&I(L,N,{configurable:!0,get:function(){try{return K(F,z(this))[1]}catch{return""}}})},3110:function(T,f,c){var v=c(6518),C=c(7751),w=c(8745),I=c(9565),L=c(9504),z=c(9039),F=c(4901),K=c(757),N=c(7680),P=c(6933),$=c(4495),d=String,M=C("JSON","stringify"),U=L(/./.exec),J=L("".charAt),G=L("".charCodeAt),Y=L("".replace),ee=L(1 .toString),q=/[\uD800-\uDFFF]/g,oe=/^[\uD800-\uDBFF]$/,ne=/^[\uDC00-\uDFFF]$/,ae=!$||z(function(){var we=C("Symbol")("stringify detection");return M([we])!=="[null]"||M({a:we})!=="{}"||M(Object(we))!=="{}"}),xe=z(function(){return M("\uDF06\uD834")!=='"\\udf06\\ud834"'||M("\uDEAD")!=='"\\udead"'}),he=function(we,Ae){var Ie=N(arguments),He=P(Ae);if(!(!F(He)&&(we===void 0||K(we))))return Ie[1]=function(nt,Xe){if(F(He)&&(Xe=I(He,this,d(nt),Xe)),!K(Xe))return Xe},w(M,null,Ie)},H=function(we,Ae,Ie){var He=J(Ie,Ae-1),nt=J(Ie,Ae+1);return U(oe,we)&&!U(ne,nt)||U(ne,we)&&!U(oe,He)?"\\u"+ee(G(we,0),16):we};M&&v({target:"JSON",stat:!0,arity:3,forced:ae||xe},{stringify:function(Ae,Ie,He){var nt=N(arguments),Xe=w(ae?he:M,null,nt);return xe&&typeof Xe=="string"?Y(Xe,q,H):Xe}})},8523:function(T,f,c){var v=c(6468),C=c(6938);v("Map",function(w){return function(){return w(this,arguments.length?arguments[0]:void 0)}},C)},6033:function(T,f,c){c(8523)},761:function(T,f,c){var v=c(6518),C=c(741);v({target:"Math",stat:!0},{trunc:C})},2892:function(T,f,c){var v=c(6518),C=c(6395),w=c(3724),I=c(4576),L=c(9167),z=c(9504),F=c(2796),K=c(9297),N=c(3167),P=c(1625),$=c(757),d=c(2777),M=c(9039),U=c(8480).f,J=c(7347).f,G=c(4913).f,Y=c(1240),ee=c(3802).trim,q="Number",oe=I[q],ne=L[q],ae=oe.prototype,xe=I.TypeError,he=z("".slice),H=z("".charCodeAt),we=function(it){var ht=d(it,"number");return typeof ht=="bigint"?ht:Ae(ht)},Ae=function(it){var ht=d(it,"number"),Re,Qe,st,Xt,Gt,gn,ut,In;if($(ht))throw new xe("Cannot convert a Symbol value to a number");if(typeof ht=="string"&&ht.length>2){if(ht=ee(ht),Re=H(ht,0),Re===43||Re===45){if(Qe=H(ht,2),Qe===88||Qe===120)return NaN}else if(Re===48){switch(H(ht,1)){case 66:case 98:st=2,Xt=49;break;case 79:case 111:st=8,Xt=55;break;default:return+ht}for(Gt=he(ht,2),gn=Gt.length,ut=0;ut<gn;ut++)if(In=H(Gt,ut),In<48||In>Xt)return NaN;return parseInt(Gt,st)}}return+ht},Ie=F(q,!oe(" 0o1")||!oe("0b1")||oe("+0x1")),He=function(it){return P(ae,it)&&M(function(){Y(it)})},nt=function(ht){var Re=arguments.length<1?0:oe(we(ht));return He(this)?N(Object(Re),this,nt):Re};nt.prototype=ae,Ie&&!C&&(ae.constructor=nt),v({global:!0,constructor:!0,wrap:!0,forced:Ie},{Number:nt});var Xe=function(it,ht){for(var Re=w?U(ht):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Qe=0,st;Re.length>Qe;Qe++)K(ht,st=Re[Qe])&&!K(it,st)&&G(it,st,J(ht,st))};C&&ne&&Xe(L[q],ne),(Ie||C)&&Xe(L[q],oe)},5374:function(T,f,c){var v=c(6518);v({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},2337:function(T,f,c){var v=c(6518),C=c(9504),w=c(1291),I=c(1240),L=c(2333),z=c(9340),F=c(9039),K=RangeError,N=String,P=isFinite,$=Math.abs,d=Math.floor,M=Math.pow,U=Math.round,J=C(1 .toExponential),G=C(L),Y=C("".slice),ee=J(-69e-12,4)==="-6.9000e-11"&&J(1.255,2)==="1.25e+0"&&J(12345,3)==="1.235e+4"&&J(25,0)==="3e+1",q=function(){return F(function(){J(1,1/0)})&&F(function(){J(1,-1/0)})},oe=function(){return!F(function(){J(1/0,1/0),J(NaN,1/0)})},ne=!ee||!q()||!oe();v({target:"Number",proto:!0,forced:ne},{toExponential:function(xe){var he=I(this);if(xe===void 0)return J(he);var H=w(xe);if(!P(he))return String(he);if(H<0||H>20)throw new K("Incorrect fraction digits");if(ee)return J(he,H);var we="",Ae,Ie,He,nt;if(he<0&&(we="-",he=-he),he===0)Ie=0,Ae=G("0",H+1);else{var Xe=z(he);Ie=d(Xe);var it=M(10,Ie-H),ht=U(he/it);2*he>=(2*ht+1)*it&&(ht+=1),ht>=M(10,H+1)&&(ht/=10,Ie+=1),Ae=N(ht)}return H!==0&&(Ae=Y(Ae,0,1)+"."+Y(Ae,1)),Ie===0?(He="+",nt="0"):(He=Ie>0?"+":"-",nt=N($(Ie))),Ae+="e"+He+nt,we+Ae}})},9868:function(T,f,c){var v=c(6518),C=c(9504),w=c(1291),I=c(1240),L=c(2333),z=c(9039),F=RangeError,K=String,N=Math.floor,P=C(L),$=C("".slice),d=C(1 .toFixed),M=function(q,oe,ne){return oe===0?ne:oe%2===1?M(q,oe-1,ne*q):M(q*q,oe/2,ne)},U=function(q){for(var oe=0,ne=q;ne>=4096;)oe+=12,ne/=4096;for(;ne>=2;)oe+=1,ne/=2;return oe},J=function(q,oe,ne){for(var ae=-1,xe=ne;++ae<6;)xe+=oe*q[ae],q[ae]=xe%1e7,xe=N(xe/1e7)},G=function(q,oe){for(var ne=6,ae=0;--ne>=0;)ae+=q[ne],q[ne]=N(ae/oe),ae=ae%oe*1e7},Y=function(q){for(var oe=6,ne="";--oe>=0;)if(ne!==""||oe===0||q[oe]!==0){var ae=K(q[oe]);ne=ne===""?ae:ne+P("0",7-ae.length)+ae}return ne},ee=z(function(){return d(8e-5,3)!=="0.000"||d(.9,0)!=="1"||d(1.255,2)!=="1.25"||d(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!z(function(){d({})});v({target:"Number",proto:!0,forced:ee},{toFixed:function(oe){var ne=I(this),ae=w(oe),xe=[0,0,0,0,0,0],he="",H="0",we,Ae,Ie,He;if(ae<0||ae>20)throw new F("Incorrect fraction digits");if(ne!==ne)return"NaN";if(ne<=-1e21||ne>=1e21)return K(ne);if(ne<0&&(he="-",ne=-ne),ne>1e-21)if(we=U(ne*M(2,69,1))-69,Ae=we<0?ne*M(2,-we,1):ne/M(2,we,1),Ae*=4503599627370496,we=52-we,we>0){for(J(xe,0,Ae),Ie=ae;Ie>=7;)J(xe,1e7,0),Ie-=7;for(J(xe,M(10,Ie,1),0),Ie=we-1;Ie>=23;)G(xe,8388608),Ie-=23;G(xe,1<<Ie),J(xe,1,1),G(xe,2),H=Y(xe)}else J(xe,0,Ae),J(xe,1<<-we,0),H=Y(xe)+P("0",ae);return ae>0?(He=H.length,H=he+(He<=ae?"0."+P("0",ae-He)+H:$(H,0,He-ae)+"."+$(H,He-ae))):H=he+H,H}})},3851:function(T,f,c){var v=c(6518),C=c(9039),w=c(5397),I=c(7347).f,L=c(3724),z=!L||C(function(){I(1)});v({target:"Object",stat:!0,forced:z,sham:!L},{getOwnPropertyDescriptor:function(K,N){return I(w(K),N)}})},1278:function(T,f,c){var v=c(6518),C=c(3724),w=c(5031),I=c(5397),L=c(7347),z=c(4659);v({target:"Object",stat:!0,sham:!C},{getOwnPropertyDescriptors:function(K){for(var N=I(K),P=L.f,$=w(N),d={},M=0,U,J;$.length>M;)J=P(N,U=$[M++]),J!==void 0&&z(d,U,J);return d}})},9773:function(T,f,c){var v=c(6518),C=c(4495),w=c(9039),I=c(3717),L=c(8981),z=!C||w(function(){I.f(1)});v({target:"Object",stat:!0,forced:z},{getOwnPropertySymbols:function(K){var N=I.f;return N?N(L(K)):[]}})},9432:function(T,f,c){var v=c(6518),C=c(8981),w=c(1072),I=c(9039),L=I(function(){w(1)});v({target:"Object",stat:!0,forced:L},{keys:function(F){return w(C(F))}})},6099:function(T,f,c){var v=c(2140),C=c(6840),w=c(3179);v||C(Object.prototype,"toString",w,{unsafe:!0})},6034:function(T,f,c){var v=c(6518),C=c(2357).values;v({target:"Object",stat:!0},{values:function(I){return C(I)}})},8940:function(T,f,c){var v=c(6518),C=c(2703);v({global:!0,forced:parseInt!==C},{parseInt:C})},6499:function(T,f,c){var v=c(6518),C=c(9565),w=c(9306),I=c(6043),L=c(1103),z=c(2652),F=c(537);v({target:"Promise",stat:!0,forced:F},{all:function(N){var P=this,$=I.f(P),d=$.resolve,M=$.reject,U=L(function(){var J=w(P.resolve),G=[],Y=0,ee=1;z(N,function(q){var oe=Y++,ne=!1;ee++,C(J,P,q).then(function(ae){ne||(ne=!0,G[oe]=ae,--ee||d(G))},M)}),--ee||d(G)});return U.error&&M(U.value),$.promise}})},2003:function(T,f,c){var v=c(6518),C=c(6395),w=c(916).CONSTRUCTOR,I=c(550),L=c(7751),z=c(4901),F=c(6840),K=I&&I.prototype;if(v({target:"Promise",proto:!0,forced:w,real:!0},{catch:function(P){return this.then(void 0,P)}}),!C&&z(I)){var N=L("Promise").prototype.catch;K.catch!==N&&F(K,"catch",N,{unsafe:!0})}},436:function(T,f,c){var v=c(6518),C=c(6395),w=c(8574),I=c(4576),L=c(9565),z=c(6840),F=c(2967),K=c(687),N=c(7633),P=c(9306),$=c(4901),d=c(34),M=c(679),U=c(2293),J=c(9225).set,G=c(1955),Y=c(3138),ee=c(1103),q=c(8265),oe=c(1181),ne=c(550),ae=c(916),xe=c(6043),he="Promise",H=ae.CONSTRUCTOR,we=ae.REJECTION_EVENT,Ae=ae.SUBCLASSING,Ie=oe.getterFor(he),He=oe.set,nt=ne&&ne.prototype,Xe=ne,it=nt,ht=I.TypeError,Re=I.document,Qe=I.process,st=xe.f,Xt=st,Gt=!!(Re&&Re.createEvent&&I.dispatchEvent),gn="unhandledrejection",ut="rejectionhandled",In=0,Fn=1,hr=2,wr=1,pr=2,Kn,$t,Sn,Rn,Ye=function(at){var Vt;return d(at)&&$(Vt=at.then)?Vt:!1},Tt=function(at,Vt){var On=Vt.value,lt=Vt.state===Fn,un=lt?at.ok:at.fail,Ur=at.resolve,Cr=at.reject,Br=at.domain,Ct,ln,tn;try{un?(lt||(Vt.rejection===pr&&ei(Vt),Vt.rejection=wr),un===!0?Ct=On:(Br&&Br.enter(),Ct=un(On),Br&&(Br.exit(),tn=!0)),Ct===at.promise?Cr(new ht("Promise-chain cycle")):(ln=Ye(Ct))?L(ln,Ct,Ur,Cr):Ur(Ct)):Cr(On)}catch(cn){Br&&!tn&&Br.exit(),Cr(cn)}},Et=function(at,Vt){at.notified||(at.notified=!0,G(function(){for(var On=at.reactions,lt;lt=On.get();)Tt(lt,at);at.notified=!1,Vt&&!at.rejection&&nr(at)}))},Dn=function(at,Vt,On){var lt,un;Gt?(lt=Re.createEvent("Event"),lt.promise=Vt,lt.reason=On,lt.initEvent(at,!1,!0),I.dispatchEvent(lt)):lt={promise:Vt,reason:On},!we&&(un=I["on"+at])?un(lt):at===gn&&Y("Unhandled promise rejection",On)},nr=function(at){L(J,I,function(){var Vt=at.facade,On=at.value,lt=Lr(at),un;if(lt&&(un=ee(function(){w?Qe.emit("unhandledRejection",On,Vt):Dn(gn,Vt,On)}),at.rejection=w||Lr(at)?pr:wr,un.error))throw un.value})},Lr=function(at){return at.rejection!==wr&&!at.parent},ei=function(at){L(J,I,function(){var Vt=at.facade;w?Qe.emit("rejectionHandled",Vt):Dn(ut,Vt,at.value)})},Kt=function(at,Vt,On){return function(lt){at(Vt,lt,On)}},ct=function(at,Vt,On){at.done||(at.done=!0,On&&(at=On),at.value=Vt,at.state=hr,Et(at,!0))},Nn=function(at,Vt,On){if(!at.done){at.done=!0,On&&(at=On);try{if(at.facade===Vt)throw new ht("Promise can't be resolved itself");var lt=Ye(Vt);lt?G(function(){var un={done:!1};try{L(lt,Vt,Kt(Nn,un,at),Kt(ct,un,at))}catch(Ur){ct(un,Ur,at)}}):(at.value=Vt,at.state=Fn,Et(at,!1))}catch(un){ct({done:!1},un,at)}}};if(H&&(Xe=function(Vt){M(this,it),P(Vt),L(Kn,this);var On=Ie(this);try{Vt(Kt(Nn,On),Kt(ct,On))}catch(lt){ct(On,lt)}},it=Xe.prototype,Kn=function(Vt){He(this,{type:he,done:!1,notified:!1,parent:!1,reactions:new q,rejection:!1,state:In,value:null})},Kn.prototype=z(it,"then",function(Vt,On){var lt=Ie(this),un=st(U(this,Xe));return lt.parent=!0,un.ok=$(Vt)?Vt:!0,un.fail=$(On)&&On,un.domain=w?Qe.domain:void 0,lt.state===In?lt.reactions.add(un):G(function(){Tt(un,lt)}),un.promise}),$t=function(){var at=new Kn,Vt=Ie(at);this.promise=at,this.resolve=Kt(Nn,Vt),this.reject=Kt(ct,Vt)},xe.f=st=function(at){return at===Xe||at===Sn?new $t(at):Xt(at)},!C&&$(ne)&&nt!==Object.prototype)){Rn=nt.then,Ae||z(nt,"then",function(Vt,On){var lt=this;return new Xe(function(un,Ur){L(Rn,lt,un,Ur)}).then(Vt,On)},{unsafe:!0});try{delete nt.constructor}catch{}F&&F(nt,it)}v({global:!0,constructor:!0,wrap:!0,forced:H},{Promise:Xe}),K(Xe,he,!1,!0),N(he)},3362:function(T,f,c){c(436),c(6499),c(2003),c(7743),c(1481),c(280)},7743:function(T,f,c){var v=c(6518),C=c(9565),w=c(9306),I=c(6043),L=c(1103),z=c(2652),F=c(537);v({target:"Promise",stat:!0,forced:F},{race:function(N){var P=this,$=I.f(P),d=$.reject,M=L(function(){var U=w(P.resolve);z(N,function(J){C(U,P,J).then($.resolve,d)})});return M.error&&d(M.value),$.promise}})},1481:function(T,f,c){var v=c(6518),C=c(6043),w=c(916).CONSTRUCTOR;v({target:"Promise",stat:!0,forced:w},{reject:function(L){var z=C.f(this),F=z.reject;return F(L),z.promise}})},280:function(T,f,c){var v=c(6518),C=c(7751),w=c(6395),I=c(550),L=c(916).CONSTRUCTOR,z=c(3438),F=C("Promise"),K=w&&!L;v({target:"Promise",stat:!0,forced:w||L},{resolve:function(P){return z(K&&this===F?I:this,P)}})},825:function(T,f,c){var v=c(6518),C=c(7751),w=c(8745),I=c(566),L=c(5548),z=c(8551),F=c(34),K=c(2360),N=c(9039),P=C("Reflect","construct"),$=Object.prototype,d=[].push,M=N(function(){function G(){}return!(P(function(){},[],G)instanceof G)}),U=!N(function(){P(function(){})}),J=M||U;v({target:"Reflect",stat:!0,forced:J,sham:J},{construct:function(Y,ee){L(Y),z(ee);var q=arguments.length<3?Y:L(arguments[2]);if(U&&!M)return P(Y,ee,q);if(Y===q){switch(ee.length){case 0:return new Y;case 1:return new Y(ee[0]);case 2:return new Y(ee[0],ee[1]);case 3:return new Y(ee[0],ee[1],ee[2]);case 4:return new Y(ee[0],ee[1],ee[2],ee[3])}var oe=[null];return w(d,oe,ee),new(w(I,Y,oe))}var ne=q.prototype,ae=K(F(ne)?ne:$),xe=w(Y,ae,ee);return F(xe)?xe:ae}})},5472:function(T,f,c){var v=c(6518),C=c(4576),w=c(687);v({global:!0},{Reflect:{}}),w(C.Reflect,"Reflect",!0)},7495:function(T,f,c){var v=c(6518),C=c(7323);v({target:"RegExp",proto:!0,forced:/./.exec!==C},{exec:C})},906:function(T,f,c){c(7495);var v=c(6518),C=c(9565),w=c(4901),I=c(8551),L=c(655),z=function(){var K=!1,N=/[ac]/;return N.exec=function(){return K=!0,/./.exec.apply(this,arguments)},N.test("abc")===!0&&K}(),F=/./.test;v({target:"RegExp",proto:!0,forced:!z},{test:function(K){var N=I(this),P=L(K),$=N.exec;if(!w($))return C(F,N,P);var d=C($,N,P);return d===null?!1:(I(d),!0)}})},8781:function(T,f,c){var v=c(350).PROPER,C=c(6840),w=c(8551),I=c(655),L=c(9039),z=c(1034),F="toString",K=RegExp.prototype,N=K[F],P=L(function(){return N.call({source:"a",flags:"b"})!=="/a/b"}),$=v&&N.name!==F;(P||$)&&C(K,F,function(){var M=w(this),U=I(M.source),J=I(z(M));return"/"+U+"/"+J},{unsafe:!0})},2405:function(T,f,c){var v=c(6468),C=c(6938);v("Set",function(w){return function(){return w(this,arguments.length?arguments[0]:void 0)}},C)},1415:function(T,f,c){c(2405)},7764:function(T,f,c){var v=c(8183).charAt,C=c(655),w=c(1181),I=c(1088),L=c(2529),z="String Iterator",F=w.set,K=w.getterFor(z);I(String,"String",function(N){F(this,{type:z,string:C(N),index:0})},function(){var P=K(this),$=P.string,d=P.index,M;return d>=$.length?L(void 0,!0):(M=v($,d),P.index+=M.length,L(M,!1))})},5440:function(T,f,c){var v=c(8745),C=c(9565),w=c(9504),I=c(9228),L=c(9039),z=c(8551),F=c(4901),K=c(34),N=c(1291),P=c(8014),$=c(655),d=c(7750),M=c(7829),U=c(5966),J=c(2478),G=c(6682),Y=c(8227),ee=Y("replace"),q=Math.max,oe=Math.min,ne=w([].concat),ae=w([].push),xe=w("".indexOf),he=w("".slice),H=function(He){return He===void 0?He:String(He)},we=function(){return"a".replace(/./,"$0")==="$0"}(),Ae=function(){return/./[ee]?/./[ee]("a","$0")==="":!1}(),Ie=!L(function(){var He=/./;return He.exec=function(){var nt=[];return nt.groups={a:"7"},nt},"".replace(He,"$<a>")!=="7"});I("replace",function(He,nt,Xe){var it=Ae?"$":"$0";return[function(Re,Qe){var st=d(this),Xt=K(Re)?U(Re,ee):void 0;return Xt?C(Xt,Re,st,Qe):C(nt,$(st),Re,Qe)},function(ht,Re){var Qe=z(this),st=$(ht);if(typeof Re=="string"&&xe(Re,it)===-1&&xe(Re,"$<")===-1){var Xt=Xe(nt,Qe,st,Re);if(Xt.done)return Xt.value}var Gt=F(Re);Gt||(Re=$(Re));var gn=Qe.global,ut;gn&&(ut=Qe.unicode,Qe.lastIndex=0);for(var In=[],Fn;Fn=G(Qe,st),!(Fn===null||(ae(In,Fn),!gn));){var hr=$(Fn[0]);hr===""&&(Qe.lastIndex=M(st,P(Qe.lastIndex),ut))}for(var wr="",pr=0,Kn=0;Kn<In.length;Kn++){Fn=In[Kn];for(var $t=$(Fn[0]),Sn=q(oe(N(Fn.index),st.length),0),Rn=[],Ye,Tt=1;Tt<Fn.length;Tt++)ae(Rn,H(Fn[Tt]));var Et=Fn.groups;if(Gt){var Dn=ne([$t],Rn,Sn,st);Et!==void 0&&ae(Dn,Et),Ye=$(v(Re,void 0,Dn))}else Ye=J($t,st,Sn,Rn,Et,Re);Sn>=pr&&(wr+=he(st,pr,Sn)+Ye,pr=Sn+$t.length)}return wr+he(st,pr)}]},!Ie||!we||Ae)},6761:function(T,f,c){var v=c(6518),C=c(4576),w=c(9565),I=c(9504),L=c(6395),z=c(3724),F=c(4495),K=c(9039),N=c(9297),P=c(1625),$=c(8551),d=c(5397),M=c(6969),U=c(655),J=c(6980),G=c(2360),Y=c(1072),ee=c(8480),q=c(298),oe=c(3717),ne=c(7347),ae=c(4913),xe=c(6801),he=c(8773),H=c(6840),we=c(2106),Ae=c(5745),Ie=c(6119),He=c(421),nt=c(3392),Xe=c(8227),it=c(1951),ht=c(511),Re=c(8242),Qe=c(687),st=c(1181),Xt=c(9213).forEach,Gt=Ie("hidden"),gn="Symbol",ut="prototype",In=st.set,Fn=st.getterFor(gn),hr=Object[ut],wr=C.Symbol,pr=wr&&wr[ut],Kn=C.RangeError,$t=C.TypeError,Sn=C.QObject,Rn=ne.f,Ye=ae.f,Tt=q.f,Et=he.f,Dn=I([].push),nr=Ae("symbols"),Lr=Ae("op-symbols"),ei=Ae("wks"),Kt=!Sn||!Sn[ut]||!Sn[ut].findChild,ct=function(Ct,ln,tn){var cn=Rn(hr,ln);cn&&delete hr[ln],Ye(Ct,ln,tn),cn&&Ct!==hr&&Ye(hr,ln,cn)},Nn=z&&K(function(){return G(Ye({},"a",{get:function(){return Ye(this,"a",{value:7}).a}})).a!==7})?ct:Ye,at=function(Ct,ln){var tn=nr[Ct]=G(pr);return In(tn,{type:gn,tag:Ct,description:ln}),z||(tn.description=ln),tn},Vt=function(ln,tn,cn){ln===hr&&Vt(Lr,tn,cn),$(ln);var Pe=M(tn);return $(cn),N(nr,Pe)?(cn.enumerable?(N(ln,Gt)&&ln[Gt][Pe]&&(ln[Gt][Pe]=!1),cn=G(cn,{enumerable:J(0,!1)})):(N(ln,Gt)||Ye(ln,Gt,J(1,G(null))),ln[Gt][Pe]=!0),Nn(ln,Pe,cn)):Ye(ln,Pe,cn)},On=function(ln,tn){$(ln);var cn=d(tn),Pe=Y(cn).concat(Br(cn));return Xt(Pe,function(Ne){(!z||w(un,cn,Ne))&&Vt(ln,Ne,cn[Ne])}),ln},lt=function(ln,tn){return tn===void 0?G(ln):On(G(ln),tn)},un=function(ln){var tn=M(ln),cn=w(Et,this,tn);return this===hr&&N(nr,tn)&&!N(Lr,tn)?!1:cn||!N(this,tn)||!N(nr,tn)||N(this,Gt)&&this[Gt][tn]?cn:!0},Ur=function(ln,tn){var cn=d(ln),Pe=M(tn);if(!(cn===hr&&N(nr,Pe)&&!N(Lr,Pe))){var Ne=Rn(cn,Pe);return Ne&&N(nr,Pe)&&!(N(cn,Gt)&&cn[Gt][Pe])&&(Ne.enumerable=!0),Ne}},Cr=function(ln){var tn=Tt(d(ln)),cn=[];return Xt(tn,function(Pe){!N(nr,Pe)&&!N(He,Pe)&&Dn(cn,Pe)}),cn},Br=function(Ct){var ln=Ct===hr,tn=Tt(ln?Lr:d(Ct)),cn=[];return Xt(tn,function(Pe){N(nr,Pe)&&(!ln||N(hr,Pe))&&Dn(cn,nr[Pe])}),cn};F||(wr=function(){if(P(pr,this))throw new $t("Symbol is not a constructor");var ln=!arguments.length||arguments[0]===void 0?void 0:U(arguments[0]),tn=nt(ln),cn=function(Pe){var Ne=this===void 0?C:this;Ne===hr&&w(cn,Lr,Pe),N(Ne,Gt)&&N(Ne[Gt],tn)&&(Ne[Gt][tn]=!1);var Cn=J(1,Pe);try{Nn(Ne,tn,Cn)}catch(Bn){if(!(Bn instanceof Kn))throw Bn;ct(Ne,tn,Cn)}};return z&&Kt&&Nn(hr,tn,{configurable:!0,set:cn}),at(tn,ln)},pr=wr[ut],H(pr,"toString",function(){return Fn(this).tag}),H(wr,"withoutSetter",function(Ct){return at(nt(Ct),Ct)}),he.f=un,ae.f=Vt,xe.f=On,ne.f=Ur,ee.f=q.f=Cr,oe.f=Br,it.f=function(Ct){return at(Xe(Ct),Ct)},z&&(we(pr,"description",{configurable:!0,get:function(){return Fn(this).description}}),L||H(hr,"propertyIsEnumerable",un,{unsafe:!0}))),v({global:!0,constructor:!0,wrap:!0,forced:!F,sham:!F},{Symbol:wr}),Xt(Y(ei),function(Ct){ht(Ct)}),v({target:gn,stat:!0,forced:!F},{useSetter:function(){Kt=!0},useSimple:function(){Kt=!1}}),v({target:"Object",stat:!0,forced:!F,sham:!z},{create:lt,defineProperty:Vt,defineProperties:On,getOwnPropertyDescriptor:Ur}),v({target:"Object",stat:!0,forced:!F},{getOwnPropertyNames:Cr}),Re(),Qe(wr,gn),He[Gt]=!0},9463:function(T,f,c){var v=c(6518),C=c(3724),w=c(4576),I=c(9504),L=c(9297),z=c(4901),F=c(1625),K=c(655),N=c(2106),P=c(7740),$=w.Symbol,d=$&&$.prototype;if(C&&z($)&&(!("description"in d)||$().description!==void 0)){var M={},U=function(){var ae=arguments.length<1||arguments[0]===void 0?void 0:K(arguments[0]),xe=F(d,this)?new $(ae):ae===void 0?$():$(ae);return ae===""&&(M[xe]=!0),xe};P(U,$),U.prototype=d,d.constructor=U;var J=String($("description detection"))==="Symbol(description detection)",G=I(d.valueOf),Y=I(d.toString),ee=/^Symbol\((.*)\)[^)]+$/,q=I("".replace),oe=I("".slice);N(d,"description",{configurable:!0,get:function(){var ae=G(this);if(L(M,ae))return"";var xe=Y(ae),he=J?oe(xe,7,-1):q(xe,ee,"$1");return he===""?void 0:he}}),v({global:!0,constructor:!0,forced:!0},{Symbol:U})}},1510:function(T,f,c){var v=c(6518),C=c(7751),w=c(9297),I=c(655),L=c(5745),z=c(1296),F=L("string-to-symbol-registry"),K=L("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!z},{for:function(N){var P=I(N);if(w(F,P))return F[P];var $=C("Symbol")(P);return F[P]=$,K[$]=P,$}})},2259:function(T,f,c){var v=c(511);v("iterator")},2675:function(T,f,c){c(6761),c(1510),c(7812),c(3110),c(9773)},7812:function(T,f,c){var v=c(6518),C=c(9297),w=c(757),I=c(6823),L=c(5745),z=c(1296),F=L("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!z},{keyFor:function(N){if(!w(N))throw new TypeError(I(N)+" is not a symbol");if(C(F,N))return F[N]}})},3500:function(T,f,c){var v=c(4576),C=c(7400),w=c(9296),I=c(235),L=c(6699),z=function(K){if(K&&K.forEach!==I)try{L(K,"forEach",I)}catch{K.forEach=I}};for(var F in C)C[F]&&z(v[F]&&v[F].prototype);z(w)},2953:function(T,f,c){var v=c(4576),C=c(7400),w=c(9296),I=c(3792),L=c(6699),z=c(687),F=c(8227),K=F("iterator"),N=I.values,P=function(d,M){if(d){if(d[K]!==N)try{L(d,K,N)}catch{d[K]=N}if(z(d,M,!0),C[M]){for(var U in I)if(d[U]!==I[U])try{L(d,U,I[U])}catch{d[U]=I[U]}}}};for(var $ in C)P(v[$]&&v[$].prototype,$);P(w,"DOMTokenList")},5575:function(T,f,c){var v=c(6518),C=c(4576),w=c(9472),I=w(C.setInterval,!0);v({global:!0,bind:!0,forced:C.setInterval!==I},{setInterval:I})},4599:function(T,f,c){var v=c(6518),C=c(4576),w=c(9472),I=w(C.setTimeout,!0);v({global:!0,bind:!0,forced:C.setTimeout!==I},{setTimeout:I})},6031:function(T,f,c){c(5575),c(4599)},7208:function(T,f,c){var v=c(6518),C=c(9565);v({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return C(URL.prototype.toString,this)}})}},j={};function R(T){var f=j[T];if(f!==void 0)return f.exports;var c=j[T]={exports:{}};return S[T].call(c.exports,c,c.exports,R),c.exports}(function(){R.n=function(T){var f=T&&T.__esModule?function(){return T.default}:function(){return T};return R.d(f,{a:f}),f}})(),function(){R.d=function(T,f){for(var c in f)R.o(f,c)&&!R.o(T,c)&&Object.defineProperty(T,c,{enumerable:!0,get:f[c]})}}(),function(){R.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()}(),function(){R.o=function(T,f){return Object.prototype.hasOwnProperty.call(T,f)}}(),function(){R.r=function(T){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(T,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(T,"__esModule",{value:!0})}}();var de={};return function(){R.r(de),R.d(de,{newATInternetPlugin:function(){return uo},newConsoleLoggerPlugin:function(){return Eo},newGovoltePlugin:function(){return jl},newPageTracker:function(){return ln},newRecommendationTracker:function(){return Ns},newStreamTracker:function(){return rs},newTag:function(){return Pr},newTagFromSession:function(){return wt}}),R(2675),R(3851),R(4114),R(1278);function T(W){"@babel/helpers - typeof";return T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Q){return typeof Q}:function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},T(W)}function f(W,Q){if(T(W)!="object"||!W)return W;var D=W[Symbol.toPrimitive];if(D!==void 0){var re=D.call(W,Q);if(T(re)!="object")return re;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Q==="string"?String:Number)(W)}function c(W){var Q=f(W,"string");return T(Q)=="symbol"?Q:Q+""}function v(W,Q,D){return(Q=c(Q))in W?Object.defineProperty(W,Q,{value:D,enumerable:!0,configurable:!0,writable:!0}):W[Q]=D,W}R(9432),R(4423),R(8598),R(2062),R(8706),R(6099),R(8781),R(8940),R(3500),R(2008),R(3110),R(7495),R(5440),R(9868);var w={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let I;const L=new Uint8Array(16);function z(){if(!I){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");I=crypto.getRandomValues.bind(crypto)}return I(L)}const F=[];for(let W=0;W<256;++W)F.push((W+256).toString(16).slice(1));function K(W,Q=0){return(F[W[Q+0]]+F[W[Q+1]]+F[W[Q+2]]+F[W[Q+3]]+"-"+F[W[Q+4]]+F[W[Q+5]]+"-"+F[W[Q+6]]+F[W[Q+7]]+"-"+F[W[Q+8]]+F[W[Q+9]]+"-"+F[W[Q+10]]+F[W[Q+11]]+F[W[Q+12]]+F[W[Q+13]]+F[W[Q+14]]+F[W[Q+15]]).toLowerCase()}function N(W,Q,D){var ge;if(w.randomUUID&&!Q&&!W)return w.randomUUID();W=W||{};const re=W.random??((ge=W.rng)==null?void 0:ge.call(W))??z();if(re.length<16)throw new Error("Random bytes length must be >= 16");if(re[6]=re[6]&15|64,re[8]=re[8]&63|128,Q){if(D=D||0,D<0||D+16>Q.length)throw new RangeError(`UUID byte range ${D}:${D+15} is out of buffer bounds`);for(let je=0;je<16;++je)Q[D+je]=re[je];return Q}return K(re)}var P=N,$=Date.now().toString(36);function d(){var W=P().replace(/-/g,"");return"1:".concat($,":").concat(W)}function M(){return[new Date().getTime(),Math.random().toFixed(8).substring(2,10)].join("_")}R(6031),R(6034);var U="_dvp",J=365*2,G="_dvs",Y=1/48,ee="cs_fpid",q=3*30,oe="_dvb",ne=Y,ae="_dvsl",xe=Y,he=function(W){return W.PAGE_VIEW="pageView",W.SEARCH_QUERY="searchQuery",W.CHOICE="choice",W.OFFER="offer",W.CLICK="click",W.PAGE_HEARTBEAT="pageHeartbeat",W.APP_CRASH="appCrash",W.ERROR_DISPLAYED="errorDisplayed",W.STREAM_WAYPOINT="streamWaypoint",W.STREAM_SEEK="streamSeek",W.STREAM_PAUSE="streamPause",W.STREAM_RESUME="streamResume",W.STREAM_COMPLETE="streamComplete",W.STREAM_BUFFERING="streamBuffering",W.STREAM_BUFFERING_COMPLETE="streamBufferingComplete",W.STREAM_LOAD="streamLoad",W.STREAM_LOAD_COMPLETE="streamLoadComplete",W.STREAM_START="streamStart",W.STREAM_FULLSCREEN="streamFullscreen",W.STREAM_WINDOWED="streamWindowed",W.STREAM_STOP="streamStop",W.STREAM_ERROR="streamError",W.MISSING_CLICK="missingClick",W.SCROLL="scroll",W}({}),H="npo-tag-web";function we(){return"".concat(new Date().toISOString()," ").concat(H)}function Ae(W,Q){if(!(nt>He.DEBUG)){for(var D=arguments.length,re=new Array(D>2?D-2:0),ge=2;ge<D;ge++)re[ge-2]=arguments[ge];console.debug("".concat(we()," ").concat(W,": ").concat(Q),re)}}function Ie(W,Q){if(!(nt>He.WARN)){for(var D=arguments.length,re=new Array(D>2?D-2:0),ge=2;ge<D;ge++)re[ge-2]=arguments[ge];console.warn("".concat(we()," ").concat(W,": ").concat(Q),re)}}var He=function(W){return W[W.DEBUG=0]="DEBUG",W[W.INFO=1]="INFO",W[W.WARN=2]="WARN",W[W.ERROR=3]="ERROR",W}({}),nt=He.DEBUG;function Xe(W){nt=W}R(2010),R(3792),R(1415),R(7764),R(2953),R(5374),R(2892);var it=R(9134),ht=function(Q,D){var re="";D.conditions.forEach(function(vt){return re+=vt.name+"".concat(vt.weight)});var ge=Q+D.experiment_name+re,je=0,qe=new Set;D.conditions.forEach(function(vt){(vt.weight<0||vt.weight>1)&&console.warn(D.experiment_name+" conditions should have weights between 0.0 and 1.0"),je+=vt.weight,qe.add(vt.name)});var tt=200*Number.EPSILON,rt=Math.abs(je-1)>tt;return rt?(console.warn(D.experiment_name+" weights do not sum to one! total= "+je),"default"):qe.size!==D.conditions.length?(console.warn(D.experiment_name+" condition names are not unique!"),"default"):Re(ge,D.conditions)},Re=function(Q,D){var re=(0,it.h32)().update(Q).digest(),ge=4294967295,je=Number(re),qe=[],tt=0;D.forEach(function(vt){var En={name:vt.name,lower:tt,upper:tt+vt.weight*ge};qe.push(En),tt=En.upper});var rt="default";return qe.forEach(function(vt){vt.lower<=je&&vt.upper>=je&&(rt=vt.name)}),rt};R(6280),R(825),R(5472);function Qe(W,Q){if(!(W instanceof Q))throw new TypeError("Cannot call a class as a function")}function st(W,Q){for(var D=0;D<Q.length;D++){var re=Q[D];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(W,c(re.key),re)}}function Xt(W,Q,D){return Q&&st(W.prototype,Q),D&&st(W,D),Object.defineProperty(W,"prototype",{writable:!1}),W}function Gt(W,Q){return Gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(D,re){return D.__proto__=re,D},Gt(W,Q)}function gn(W,Q){if(typeof Q!="function"&&Q!==null)throw new TypeError("Super expression must either be null or a function");W.prototype=Object.create(Q&&Q.prototype,{constructor:{value:W,writable:!0,configurable:!0}}),Object.defineProperty(W,"prototype",{writable:!1}),Q&&Gt(W,Q)}function ut(W){if(W===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W}function In(W,Q){if(Q&&(T(Q)=="object"||typeof Q=="function"))return Q;if(Q!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ut(W)}function Fn(W){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Q){return Q.__proto__||Object.getPrototypeOf(Q)},Fn(W)}var hr=function(){function W(Q,D){Qe(this,W),this.clock=D||function(){return new Date},this.tag=Q}return Xt(W,[{key:"getValueFromRaw",value:function(D){var re=JSON.parse(D),ge=this.clock();if(!(re.expiresAt&&re.expiresAt<ge.getTime()))return re.value}},{key:"create",value:function(D,re){var ge=void 0;if(re!=null&&re.expires){var je=864e5;ge=this.clock().getTime()+re.expires*je}return{value:D,expiresAt:ge}}}]),W}();function wr(W){var Q=pr();return function(){var D,re=Fn(W);if(Q){var ge=Fn(this).constructor;D=Reflect.construct(re,arguments,ge)}else D=re.apply(this,arguments);return In(this,D)}}function pr(){try{var W=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pr=function(){return!!W})()}var Kn="npotag_",$t="LocalStorage",Sn=function(W){gn(D,W);var Q=wr(D);function D(re){return Qe(this,D),Q.call(this,$t,re)}return Xt(D,[{key:"get",value:function(ge){try{var je=localStorage.getItem(Kn+ge);if(!je)return;var qe=this.getValueFromRaw(je);return typeof qe>"u"&&(Ae(this.tag,"Expiring storage item ".concat(ge)),this.remove(ge)),qe}catch(tt){Ae(this.tag,"Error retrieving item ".concat(Kn+ge," from storage: ").concat(tt));return}}},{key:"set",value:function(ge,je,qe){var tt=this.create(je,qe);localStorage.setItem(Kn+ge,JSON.stringify(tt))}},{key:"remove",value:function(ge){Ae(this.tag,"removing item ".concat(Kn+ge)),localStorage.removeItem(Kn+ge)}}]),D}(hr);/*! js-cookie v3.0.5 | MIT */function Rn(W){for(var Q=1;Q<arguments.length;Q++){var D=arguments[Q];for(var re in D)W[re]=D[re]}return W}var Ye={read:function(W){return W[0]==='"'&&(W=W.slice(1,-1)),W.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(W){return encodeURIComponent(W).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Tt(W,Q){function D(ge,je,qe){if(!(typeof document>"u")){qe=Rn({},Q,qe),typeof qe.expires=="number"&&(qe.expires=new Date(Date.now()+qe.expires*864e5)),qe.expires&&(qe.expires=qe.expires.toUTCString()),ge=encodeURIComponent(ge).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var tt="";for(var rt in qe)qe[rt]&&(tt+="; "+rt,qe[rt]!==!0&&(tt+="="+qe[rt].split(";")[0]));return document.cookie=ge+"="+W.write(je,ge)+tt}}function re(ge){if(!(typeof document>"u"||arguments.length&&!ge)){for(var je=document.cookie?document.cookie.split("; "):[],qe={},tt=0;tt<je.length;tt++){var rt=je[tt].split("="),vt=rt.slice(1).join("=");try{var En=decodeURIComponent(rt[0]);if(qe[En]=W.read(vt,En),ge===En)break}catch{}}return ge?qe[ge]:qe}}return Object.create({set:D,get:re,remove:function(ge,je){D(ge,"",Rn({},je,{expires:-1}))},withAttributes:function(ge){return Tt(this.converter,Rn({},this.attributes,ge))},withConverter:function(ge){return Tt(Rn({},this.converter,ge),this.attributes)}},{attributes:{value:Object.freeze(Q)},converter:{value:Object.freeze(W)}})}var Et=Tt(Ye,{path:"/"}),Dn=function(){function W(){Qe(this,W)}return Xt(W,[{key:"get",value:function(D){return Et.get(D)}},{key:"set",value:function(D,re,ge){Et.set(D,re,{expires:ge&&ge.expires})}},{key:"remove",value:function(D){Et.remove(D)}}]),W}();function nr(W){var Q=Lr();return function(){var D,re=Fn(W);if(Q){var ge=Fn(this).constructor;D=Reflect.construct(re,arguments,ge)}else D=re.apply(this,arguments);return In(this,D)}}function Lr(){try{var W=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lr=function(){return!!W})()}var ei="MemoryStorage",Kt=function(W){gn(D,W);var Q=nr(D);function D(re){var ge;return Qe(this,D),ge=Q.call(this,ei,re),ge.store={},ge}return Xt(D,[{key:"get",value:function(ge){try{var je=this.store[ge];if(!je)return;var qe=this.getValueFromRaw(je);return typeof qe>"u"&&(Ae(this.tag,"Expiring storage item ".concat(ge)),this.remove(ge)),qe}catch(tt){Ae(this.tag,"Error retrieving item ".concat(ge," from storage: ").concat(tt));return}}},{key:"set",value:function(ge,je,qe){var tt=this.create(je,qe);this.store[ge]=JSON.stringify(tt)}},{key:"remove",value:function(ge){delete this.store[ge]}}]),D}(hr),ct="Storage",Nn=void 0;function at(){var W=void 0;if(Nn)return Nn;var Q="npo_tag_storage_tester",D=(Math.random()*20428572).toFixed(0);try{if(window&&window.localStorage){W=new Sn,W.set(Q,D,{expires:1});var re=W.get(Q);if(W.remove(Q),re!==D)throw new Error("magic value mismatch");Nn=W}}catch(je){Ie(ct,"Not using local storage because: ",je)}if(!Nn)try{Ae(ct,"Try cookie storage"),W=new Dn,W.set(Q,D,{expires:1});var ge=W.get(Q);if(W.remove(Q),ge!==D)throw new Error("magic value mismatch");Nn=W}catch(je){Ie(ct,"Not using cookie storage because: ",je)}return Nn||(Ae(ct,"Falling back to memory storage"),Nn=new Kt),Nn}var Vt=function(){return Nn||(Ie(ct,"Storage used before being created?"),Nn=at()),Nn},On=function(W){return W[W.SCROLL_25=25]="SCROLL_25",W[W.SCROLL_50=50]="SCROLL_50",W[W.SCROLL_75=75]="SCROLL_75",W[W.SCROLL_100=100]="SCROLL_100",W}({});function lt(W,Q){var D=Object.keys(W);if(Object.getOwnPropertySymbols){var re=Object.getOwnPropertySymbols(W);Q&&(re=re.filter(function(ge){return Object.getOwnPropertyDescriptor(W,ge).enumerable})),D.push.apply(D,re)}return D}function un(W){for(var Q=1;Q<arguments.length;Q++){var D=arguments[Q]!=null?arguments[Q]:{};Q%2?lt(Object(D),!0).forEach(function(re){v(W,re,D[re])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(D)):lt(Object(D)).forEach(function(re){Object.defineProperty(W,re,Object.getOwnPropertyDescriptor(D,re))})}return W}var Ur="PageTracker",Cr="home",Br="https://nmonpoendpoint.2cnt.net?vendor=at",Ct=10*1e3;function ln(W,Q){var D=un(un({},Q),{},{pageViewId:d()});if(W.getContext().disableNmoDam!==!0){var re=tn();Cn(re),D=un(un({},D),{},{nmoid:re})}var ge=null,je=function(){Qi(he.PAGE_HEARTBEAT,W,D)},qe=function(){ge||(ge=window.setInterval(function(){je()},Ct))},tt=function(){ge!==null&&(window.clearInterval(ge),ge=null)},rt=function(){document.hidden?tt():qe()};D.heartbeat_enabled&&(document.addEventListener("visibilitychange",function(){rt()}),rt());var vt=0;return{npoTag:W,pageContext:D,abAssign:function(or){var Qn=W.getContext().user_profile||W.getContext().user_pseudoid||W.getParty(),Xn=ht(Qn,or);return this.pageContext.experiment=or.experiment_name,this.pageContext.condition=Xn,Xn},pageView:function(){return Qi(he.PAGE_VIEW,W,D)},click:function(or){return Qi(he.CLICK,W,un(un({},D),or))},errorDisplayed:function(or){Qi(he.ERROR_DISPLAYED,W,un({},D),un({},or))},sendPageHeartbeat:je,scroll:function(or){var Qn=or.scroll_percentage;if(!(Q!=null&&Q.scroll_tracking)){console.warn("You must enable scroll tracking in the pageContext to track scroll events");return}for(var Xn=Object.values(On),_t=0,qt=Xn;_t<qt.length;_t++){var vn=qt[_t];Qn>=vn&&vt<vn&&(vt=vn,Qi(he.SCROLL,W,un({},D),un(un({},or),{},{scroll_percentage:vt})))}}}}function tn(){var W=Vt().get(ee);if(W)return Ae(Ur,"Using nmoId: ".concat(W)),W;var Q=M();return Ae(Ur,"Generated new nmoId: ".concat(Q)),cn(Q),Q}function cn(W){Vt().set(ee,W,{expires:q})}var Pe,Ne;function Cn(W){if(Pe===void 0)try{sessionStorage.getItem(W),Pe=!0}catch{Pe=!1}if(!(Pe&&sessionStorage.getItem(W)==="sent")&&!(!Pe&&Ne)){Ae(Ur,"Sending nmoId to Kantar",W);var Q=Br+"&cs_fpid="+W;if(typeof navigator.sendBeacon>"u"||navigator.sendBeacon(Q)===!1){var D=new Image;D.src=Q}Pe&&sessionStorage.setItem(W,"sent"),Ne=!0}}var Bn=function(){var Q=function(){return document.body||document.getElementsByTagName("body").item(0)},D=function(){return window.screen.availWidth},re=function(){return window.screen.availHeight},ge=function(){return window.innerWidth||document.documentElement.clientWidth||Q().clientWidth||document.documentElement.offsetWidth||Q().offsetWidth},je=function(){return window.innerHeight||document.documentElement.clientHeight||Q().clientHeight||document.documentElement.offsetHeight||Q().offsetHeight},qe=function(){var En,or=screen,Qn=((En=screen.orientation)===null||En===void 0?void 0:En.type)||or.mozOrientation||or.msOrientation;if(Qn)return Qn;if(window.orientation!==void 0)switch(window.orientation){case 0:return"portrait-primary";case 90:return"landscape-primary";case 180:return"portrait-secondary";case-90:return"landscape-secondary"}return ge()>je()?"landscape-primary":"portrait-primary"},tt=function(){return window.location.href},rt=function(){return document.referrer||void 0};return{getScreenWidth:D,getScreenHeight:re,getWindowWidth:ge,getWindowHeight:je,getScreenOrientation:qe,getLocation:tt,getReferrer:rt}};R(3362),R(113);function Jn(W){return new Promise(function(Q){return setTimeout(Q,W)})}function mn(W){return new Date(W).getTime()}function oo(W){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Date.now(),D=new Intl.DateTimeFormat("en-GB",{timeZone:"Europe/Amsterdam",year:"numeric",month:"2-digit",day:"2-digit"}),re=D.formatToParts(Q),ge=re.find(function(rt){return rt.type==="year"}).value,je=re.find(function(rt){return rt.type==="month"}).value,qe=re.find(function(rt){return rt.type==="day"}).value,tt=new Date("".concat(ge,"-").concat(je,"-").concat(qe,"T00:00:00.000+01:00")).getTime();return W<tt}function So(W,Q){var D=Object.keys(W);if(Object.getOwnPropertySymbols){var re=Object.getOwnPropertySymbols(W);Q&&(re=re.filter(function(ge){return Object.getOwnPropertyDescriptor(W,ge).enumerable})),D.push.apply(D,re)}return D}function rr(W){for(var Q=1;Q<arguments.length;Q++){var D=arguments[Q]!=null?arguments[Q]:{};Q%2?So(Object(D),!0).forEach(function(re){v(W,re,D[re])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(D)):So(Object(D)).forEach(function(re){Object.defineProperty(W,re,Object.getOwnPropertyDescriptor(D,re))})}return W}var Mr="NPOTag",To=["dev","preprod","prod"],ti={user_subscription:"anonymous"};function Pr(W,Q,D){return Wr(W,Q,D)}var Wr=function(Q,D,re){if(!(typeof window>"u")){var ge=at(),je=Q.serializedSessionInfo?JSON.parse(Q.serializedSessionInfo):void 0,qe=function(It){if(It.environment===void 0||To.includes(It.environment))return!0;var Tn=To.map(function(Wn){return"'".concat(Wn,"'")}).join(", ");return Ie(Mr,"Invalid environment type. Must be one of ".concat(Tn,". Received: '").concat(It.environment,"'. Environment will be ignored.")),!1},tt=rr(rr(rr({},ti),Q),{},{environment:qe(Q)?Q.environment:void 0});Q.debug?Xe(He.DEBUG):Xe(re??He.ERROR),Q.disableNmoDam&&Ie(Mr,"Disabling the NMO-DAM measurement in the NPOTag risks running old/incompatible implementations that may harm representation in the NMO-DAM statistics. Doing so is at your own risk.");var rt=(je==null?void 0:je.govoltePartyId)||ge.get(U),vt=rt||d(),En=!rt;Ae(Mr,"".concat(En?"Generated new":"Using"," partyId: ").concat(vt));var or=function(){var It=(je==null?void 0:je.sessionId)||ge.get(G),Tn=ge.get(oe),Wn=tt.brand_id.toString(),$r=ge.get(ae),lo=Tn&&Tn!==Wn,us=Date.now(),Ni=null;if($r)try{var vi=JSON.parse($r);Ni=vi.value?parseInt(vi.value,10):parseInt($r,10)}catch{Ni=parseInt($r,10)}var ri=Ni&&!isNaN(Ni)?oo(Ni,us):!1,Jt,fn=!1;return!It||lo||ri?(Jt=d(),fn=!0,ge.set(Jt,"",{expires:Y}),lo&&Ae(Mr,"Brand ID changed from ".concat(Tn," to ").concat(Wn,", generating new sessionId: ").concat(Jt)),ri&&Ae(Mr,"Session was used before last midnight CET, generating new sessionId: ".concat(Jt))):Jt=It,ge.set(oe,Wn,{expires:ne}),Ae(Mr,"".concat(fn?"Generated new":"Using"," sessionId: ").concat(Jt)),Jt},Qn=or();if(ge.set(G,Qn,{expires:Y}),En&&ge.set(vt,Qn,{expires:Y}),je){je.npoUserId&&(tt.user_id=je.npoUserId,tt.user_profile=je.npoProfileId,tt.user_pseudoid=je.npoPseudoId,tt.user_subscription=je.npoSubscription),cn(je.nmoId);var Xn=je;D==null||D.forEach(function(vn){return vn.initializeFromSessionInfo(Xn)})}var _t=function(){var It=ge.get(G),Tn=It!==void 0&&ge.get(vt)===It;return Tn?ge.set(vt,It,{expires:Y}):ge.remove(vt),Tn},qt=function(){var It={brand:tt.brand,brandId:tt.brand_id,platform:tt.platform,platformVersion:tt.platform_version,govoltePartyId:vt,sessionId:Qn,nmoId:tn(),npoUserId:tt.user_id,npoProfileId:tt.user_profile,npoPseudoId:tt.user_pseudoid,npoSubscription:tt.user_subscription},Tn=rr({},It);return D&&D.forEach(function(Wn){Tn=rr(rr({},Tn),Wn.getSessionInfo())}),Object.keys(Tn).filter(function(Wn){return Tn[Wn]===void 0}).forEach(function(Wn){return delete Tn[Wn]}),JSON.stringify(Tn)};return{getContext:function(){return rr({},tt)},login:function(It){Ae(Mr,"Login with userId ".concat(It.user_id)),tt=rr(rr({},tt),It)},logout:function(){Ae(Mr,"Logout"),tt=rr(rr({},tt),{},{user_profile:ti.user_profile,user_subscription:ti.user_subscription,user_pseudoid:ti.user_pseudoid,user_id:ti.user_id,user_profile_type:ti.user_profile_type})},getPlugins:function(){return D||[]},getParty:function(){return vt},getIsNewParty:_t,getSession:or,getSerializedSessionInfo:qt}}};function wt(W,Q,D){var re=W.serializedSessionInfo?JSON.parse(W.serializedSessionInfo):void 0;if((re==null?void 0:re.brand)===void 0||re.brandId===void 0){Ie(Mr,"Unable to build tag from session, the 'brand' of 'brand_id' field is missing from export.");return}var ge={brand:re.brand,brand_id:re.brandId,platform:re.platform,platform_version:re.platformVersion,debug:W.debug,environment:W.environment,disableNmoDam:W.disableNmoDam,serializedSessionInfo:W.serializedSessionInfo};return Wr(ge,Q,D)}function Qi(W,Q,D,re){var ge=Bn(),je=Q.getSession(),qe=Vt(),tt=rr(rr(rr(rr({},Q.getContext()),D),re),{},{party_id:Q.getParty(),isNewParty:Q.getIsNewParty(),is_homepage:D.page===Cr,client_timestamp:new Date().toISOString(),sdk_version:"3.2.11",session_id:je,isFirstInSession:qe.get(je)!==void 0,location:ge.getLocation(),referrer:ge.getReferrer()});qe.set(U,tt.party_id,{expires:J}),qe.set(G,tt.session_id,{expires:Y}),qe.set(oe,tt.brand_id.toString(),{expires:ne}),qe.set(ae,Date.now().toString(),{expires:xe}),qe.remove(je),Ae(Mr,"Submitting event",W,tt),Q.getPlugins().forEach(function(rt){return rt.submitEvent(W,tt)})}function gr(W,Q){var D=Object.keys(W);if(Object.getOwnPropertySymbols){var re=Object.getOwnPropertySymbols(W);Q&&(re=re.filter(function(ge){return Object.getOwnPropertyDescriptor(W,ge).enumerable})),D.push.apply(D,re)}return D}function Ui(W){for(var Q=1;Q<arguments.length;Q++){var D=arguments[Q]!=null?arguments[Q]:{};Q%2?gr(Object(D),!0).forEach(function(re){v(W,re,D[re])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(D)):gr(Object(D)).forEach(function(re){Object.defineProperty(W,re,Object.getOwnPropertyDescriptor(D,re))})}return W}function rs(W,Q,D){function re(ge,je){var qe,tt=je.stream_position,rt=void 0,vt=je.seek_from,En=void 0;if(D!=null&&D.isLive){var or=Date.now()/1e3;tt=or+je.stream_position,rt=je.stream_position,je.seek_from!==void 0&&(vt=or+je.seek_from,En=je.seek_from)}Qi(ge,W.npoTag,W.pageContext,Ui(Ui({},Q),{},{stream_position:tt,bitrate_audio:je.bitrate_audio,bitrate_video:je.bitrate_video,startupTime:je.startupTime,drmLoadTime:je.drmLoadTime,stream_error_code:je.stream_error_code,live_offset:rt,stream_seek_from:vt,live_offset_from:En,isLiveStream:(qe=D==null?void 0:D.isLive)!==null&&qe!==void 0?qe:!1}))}return{pageTracker:W,streamContext:Q,time:function(je){re(he.STREAM_WAYPOINT,je)},seek:function(je){re(he.STREAM_SEEK,je)},pause:function(je){re(he.STREAM_PAUSE,je)},resume:function(je){re(he.STREAM_RESUME,je)},complete:function(je){re(he.STREAM_COMPLETE,je)},buffering:function(je){re(he.STREAM_BUFFERING,je)},buffering_complete:function(je){re(he.STREAM_BUFFERING_COMPLETE,je)},load:function(je){re(he.STREAM_LOAD,je)},load_complete:function(je){re(he.STREAM_LOAD_COMPLETE,je)},start:function(je){re(he.STREAM_START,je)},fullscreen:function(je){re(he.STREAM_FULLSCREEN,je)},windowed:function(je){re(he.STREAM_WINDOWED,je)},stop:function(je){re(he.STREAM_STOP,je)},error:function(je){re(he.STREAM_ERROR,je)}}}function so(W,Q){var D=Object.keys(W);if(Object.getOwnPropertySymbols){var re=Object.getOwnPropertySymbols(W);Q&&(re=re.filter(function(ge){return Object.getOwnPropertyDescriptor(W,ge).enumerable})),D.push.apply(D,re)}return D}function Bi(W){for(var Q=1;Q<arguments.length;Q++){var D=arguments[Q]!=null?arguments[Q]:{};Q%2?so(Object(D),!0).forEach(function(re){v(W,re,D[re])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(D)):so(Object(D)).forEach(function(re){Object.defineProperty(W,re,Object.getOwnPropertyDescriptor(D,re))})}return W}function Ns(W,Q){var D=Bi(Bi({},Q),{},{offer_id:d()});return{pageTracker:W,recommendationContext:D,offer:function(ge){return Qi(he.OFFER,W.npoTag,W.pageContext,Bi(Bi({},D),ge))},choice:function(ge){return Qi(he.CHOICE,W.npoTag,W.pageContext,Bi(Bi({},D),ge))}}}function Eo(){function W(Q,D){var re={timestamp:new Date().toISOString(),eventType:Q,event:D};return JSON.stringify(re)}return{submitEvent:function(D,re){console.log(W(D,re))},initializeFromSessionInfo:function(){},getSessionInfo:function(){return{}}}}function xo(W,Q){if(W==null)return{};var D={};for(var re in W)if({}.hasOwnProperty.call(W,re)){if(Q.indexOf(re)!==-1)continue;D[re]=W[re]}return D}function ys(W,Q){if(W==null)return{};var D,re,ge=xo(W,Q);if(Object.getOwnPropertySymbols){var je=Object.getOwnPropertySymbols(W);for(re=0;re<je.length;re++)D=je[re],Q.indexOf(D)===-1&&{}.propertyIsEnumerable.call(W,D)&&(ge[D]=W[D])}return ge}function is(W,Q,D,re,ge,je,qe){try{var tt=W[je](qe),rt=tt.value}catch(vt){return void D(vt)}tt.done?Q(rt):Promise.resolve(rt).then(re,ge)}function ao(W){return function(){var Q=this,D=arguments;return new Promise(function(re,ge){var je=W.apply(Q,D);function qe(rt){is(je,re,ge,qe,tt,"next",rt)}function tt(rt){is(je,re,ge,qe,tt,"throw",rt)}qe(void 0)})}}function wo(W,Q){(Q==null||Q>W.length)&&(Q=W.length);for(var D=0,re=Array(Q);D<Q;D++)re[D]=W[D];return re}function fe(W){if(Array.isArray(W))return wo(W)}function ki(W){if(typeof Symbol<"u"&&W[Symbol.iterator]!=null||W["@@iterator"]!=null)return Array.from(W)}function Un(W,Q){if(W){if(typeof W=="string")return wo(W,Q);var D={}.toString.call(W).slice(8,-1);return D==="Object"&&W.constructor&&(D=W.constructor.name),D==="Map"||D==="Set"?Array.from(W):D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D)?wo(W,Q):void 0}}function Zi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
123
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fi(W){return fe(W)||ki(W)||Un(W)||Zi()}var Vi=R(4756),_i=R.n(Vi);R(4782);var zr=function(){function W(){Qe(this,W),v(this,"items",[]),v(this,"offset",0)}return Xt(W,[{key:"enqueue",value:function(){var D;return(D=this.items).push.apply(D,arguments)}},{key:"dequeue",value:function(){if(this.isEmpty())return null;var D=this.peek();return this.offset+=1,this.offset*2<this.items.length||(this.items=this.items.slice(this.offset),this.offset=0),D}},{key:"size",value:function(){return this.items.length-this.offset}},{key:"isEmpty",value:function(){return this.size()===0}},{key:"peek",value:function(){return this.isEmpty()?null:this.items[this.offset]}},{key:"swapTopElement",value:function(D){this.items[this.offset]=D}},{key:"getAllItems",value:function(){return this.items.slice(this.offset)}},{key:"clear",value:function(){this.items=[],this.offset=0}},{key:"getOffset",value:function(){return this.offset}}]),W}(),Xs=function(){try{var Q=window.localStorage,D="__storage_test__";return Q.setItem(D,D),Q.removeItem(D),!0}catch{return!1}},Sr=function(Q){return Q.toString(36)},Uo=function(Q){return unescape(encodeURIComponent(Q))};R(2337),R(739),R(7208);var Ri=function(){function W(){Qe(this,W),v(this,"stringEscapingRegex",/[~!]/g),v(this,"buffer",""),v(this,"pendingFieldName",null),v(this,"pendingArrayFieldName",null)}return Xt(W,[{key:"startObject",value:function(){this.addRecord("(")}},{key:"endObject",value:function(){this.pendingFieldName=null,this.addRecord(")")}},{key:"startArray",value:function(){this.pendingArrayFieldName=this.pendingFieldName,this.pendingFieldName=null}},{key:"endArray",value:function(D){this.buffer.length>D?this.addRecord("."):this.pendingArrayFieldName=null}},{key:"setNextFieldName",value:function(D){this.pendingFieldName=D}},{key:"addRecord",value:function(D,re){this.pendingArrayFieldName!==null&&(this.buffer+="a",this.buffer+=this.escapeString(this.pendingArrayFieldName),this.buffer+="!",this.pendingFieldName=null,this.pendingArrayFieldName=null),this.buffer+=D,this.pendingFieldName!==null&&(this.buffer+=this.escapeString(this.pendingFieldName),this.buffer+="!",this.pendingFieldName=null),re&&(this.buffer+=re)}},{key:"escapeString",value:function(D){return D.replace(this.stringEscapingRegex,"~$&")}},{key:"encodeString",value:function(D){this.addRecord("s",this.escapeString(D)+"!")}},{key:"encodeNumber",value:function(D){if(isFinite(D)){var re=D===Math.floor(D)?D.toString(36):null,ge=D.toExponential(),je=String(D);re!==null&&re.length<=ge.length&&re.length<=je.length?this.addRecord("d",re+"!"):this.addRecord("j",(ge.length<je.length?ge:je)+"!")}else this.encode(null,!1)}},{key:"encodeBoolean",value:function(D){this.addRecord(D?"t":"f")}},{key:"encodeNull",value:function(){this.addRecord("n")}},{key:"encodeArray",value:function(D){var re=this.buffer.length;this.startArray();for(var ge=0;ge<D.length;++ge)this.encode(D[ge],!0);this.endArray(re)}},{key:"encodeDate",value:function(D){var re=isFinite(D.valueOf())?D.getUTCFullYear()+"-"+this.pad(2,D.getUTCMonth()+1)+"-"+this.pad(2,D.getUTCDate())+"T"+this.pad(2,D.getUTCHours())+":"+this.pad(2,D.getUTCMinutes())+":"+this.pad(2,D.getUTCSeconds())+"."+this.pad(3,D.getUTCMilliseconds())+"Z":null;this.encode(re,!1)}},{key:"pad",value:function(D,re){for(var ge=re.toString();ge.length<D;)ge="0"+ge;return ge}},{key:"encodeJavaScriptObject",value:function(D){if(!Object.values(D).every(function(ge){return typeof ge>"u"})){this.startObject();for(var re in D)Object.prototype.hasOwnProperty.call(D,re)&&(this.setNextFieldName(re),this.encode(D[re],!1));this.endObject()}}},{key:"encodeObject",value:function(D,re){if(D===null)this.encodeNull();else if(typeof D.toJSON=="function")this.encode(D.toJSON(),re);else switch(Object.prototype.toString.call(D)){case"[object Array]":this.encodeArray(D);break;case"[object Date]":this.encodeDate(D);break;default:this.encodeJavaScriptObject(D)}}},{key:"encode",value:function(D,re){switch(T(D)){case"string":this.encodeString(D);break;case"number":this.encodeNumber(D);break;case"boolean":this.encodeBoolean(D);break;case"object":this.encodeObject(D,re);break;case"undefined":re&&this.encode(null,!1);break;default:throw"Cannot encode of type: "+T(D)}var ge=this.buffer;return ge!==""?ge:void 0}}]),W}(),bi=function(Q){return new Ri().encode(Q,!1)},os=0,Ao=function(){return os++},dr=function(Q){return"".concat(Q,"#").concat(Ao())};R(6910);var Rr=R(6769),Io=R.n(Rr),Ia=function(Q){var D=[];for(var re in Q)Object.prototype.hasOwnProperty.call(Q,re)&&D.push(re);D.sort();for(var ge="",je=0;je<D.length;++je){var qe=D[je],tt=Q[qe];ge+=qe,ge+="=";for(var rt=0;rt<tt.length;++rt)ge+=tt[rt],ge+=",";ge+=";"}var vt=Uo(ge),En=Io().x86.hash32(vt);return En};function Ss(W,Q){var D=Object.keys(W);if(Object.getOwnPropertySymbols){var re=Object.getOwnPropertySymbols(W);Q&&(re=re.filter(function(ge){return Object.getOwnPropertyDescriptor(W,ge).enumerable})),D.push.apply(D,re)}return D}function ni(W){for(var Q=1;Q<arguments.length;Q++){var D=arguments[Q]!=null?arguments[Q]:{};Q%2?Ss(Object(D),!0).forEach(function(re){v(W,re,D[re])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(D)):Ss(Object(D)).forEach(function(re){Object.defineProperty(W,re,Object.getOwnPropertyDescriptor(D,re))})}return W}var Ys=function(Q){return Q?"t":"f"},Bt=function(Q,D){var re=mr(Q,D);return Object.keys(re).forEach(function(ge){re[ge]===void 0&&delete re[ge]}),ni(ni({},re),{},{x:Sr(Js(re))})},mr=function(Q,D){var re=Bn(),ge={brand:D.brand,brandId:D.brand_id,chapters:{chapter1:D.chapter_1,chapter2:D.chapter_2,chapter3:D.chapter_3},pageName:D.page,platformType:D.platform,content_context_id:D.content_context_id,user:{npoId:D.user_id,profileId:D.user_profile,type:D.user_subscription,pseudoid:D.user_pseudoid,profileType:D.user_profile_type},query:D.query||D.query_context,experiment:D.experiment,condition:D.condition,platformVersion:D.platform_version,environment:D.environment,customLabels:{label1:D.custom_label1,label2:D.custom_label2,label3:D.custom_label3,label4:D.custom_label4,label5:D.custom_label5},error:D.error_code,program:D.program,broadcaster:D.broadcasters,screenOrientation:re.getScreenOrientation(),nmoid:D.nmoid,position:D.stream_position,from:D.stream_seek_from,length:D.stream_length,id:D.stream_id,playerId:D.player_id,adLength:D.stream_ad_length,avType:D.av_type,avSubtype:D.av_subtype,PlayerVersion:D.player_version,SKOPlayerVersion:D.sko_player_version,liveOffset:D.live_offset,liveOffsetFrom:D.live_offset_from,isLiveStream:D.live_offset!=null,destination:{recommender:D.recommender,contentId:D.target_id,index:D.offer_index,numberDisplayed:D.total_offers},panel_format:D.panel_format,panel_position:D.panel_position,panel:D.panel_id,offerId:D.offer_id,sdk_version:D.sdk_version,click_name:D.click_name,click_type:D.click_type,click_chapter_1:D.click_chapter_1,click_chapter_2:D.click_chapter_2,click_chapter_3:D.click_chapter_3,click_position_x:D.click_position_x,click_position_y:D.click_position_y,error_message:D.error_message,scrollEnabled:D.scroll_tracking,scrollPercentage:D.scroll_percentage,errorCode:D.stream_error_code,isp:D.isp,mediaUrl:D.mediaURL,bitrateAudio:D.bitrate_audio,bitrateVideo:D.bitrate_video,startupTime:D.startupTime,drmLoadTime:D.drmLoadTime,drmType:D.drmType};return{p:D.party_id,s:D.session_id,v:D.pageViewId,e:dr(D.pageViewId),c:Sr(new Date(D.client_timestamp).getTime()),n:Ys(D.isNewParty),f:Ys(D.isFirstInSession),l:D.location,r:D.referrer,j:Sr(re.getScreenHeight()),i:Sr(re.getScreenWidth()),k:Sr(window.devicePixelRatio),h:Sr(re.getWindowHeight()),w:Sr(re.getWindowWidth()),t:Q,u:bi(ge)}},Js=function(Q){var D={};return Object.keys(Q).forEach(function(re){var ge=Q[re];D[re]=ge?[ge]:[]}),Ia(D)},Qs=Bn(),Ts=function(Q,D){var re={event_type:Q,client_timestamp_iso:D.client_timestamp,event_id:dr(D.pageViewId),is_new_party:D.isNewParty,is_new_session:D.isFirstInSession,party_id:D.party_id,session_id:D.session_id,sdk_version:D.sdk_version};D.error_code&&(re.error_code=D.error_code);var ge={},je=D.query||D.query_context;return(D.brand||D.brand_id||D.nmoid||D.page||D.pageViewId)&&(ge.topspin={brand:D.brand,brandId:D.brand_id,nmoid:D.nmoid,pageName:D.page,pageId:D.pageViewId,content_context_id:D.content_context_id,platformType:D.platform,platformVersion:D.platform_version,program:D.program,broadcaster:D.broadcasters,environment:D.environment,scrollEnabled:D.scroll_tracking,avType:D.av_type,avSubtype:D.av_subtype},(D.chapter_1||D.chapter_2||D.chapter_3)&&(ge.topspin.chapters={chapter1:D.chapter_1,chapter2:D.chapter_2,chapter3:D.chapter_3})),(D.user_id||D.user_profile||D.user_subscription)&&(ge.npo={userId:D.user_id,profileId:D.user_profile,subscription:D.user_subscription,pseudoId:D.user_pseudoid,userProfileType:D.user_profile_type}),(D.stream_id||D.stream_position!==void 0)&&(ge.stream={id:D.stream_id,length:D.stream_length,adLength:D.stream_ad_length,position:D.stream_position,playerId:D.player_id,playerVersion:D.player_version,skoPlayerVersion:D.sko_player_version,liveOffset:D.live_offset,liveOffsetFrom:D.live_offset_from,isLiveStream:D.live_offset!==void 0&&D.live_offset!==null,seekFrom:D.stream_seek_from,bitrateAudio:D.bitrate_audio,bitrateVideo:D.bitrate_video,startupTime:D.startupTime,drmLoadTime:D.drmLoadTime,errorCode:D.stream_error_code,isp:D.isp,mediaUrl:D.mediaURL,drmType:D.drmType}),(D.panel_id||D.panel_format||D.panel_position!==void 0||D.offer_id||je||D.recommender||D.target_id||D.offer_index!==void 0||D.total_offers!==void 0)&&(ge.recommendation={panel:D.panel_id,panel_format:D.panel_format,position:D.panel_position,offerId:D.offer_id,query:je},D.recommender&&D.target_id&&D.offer_index!==void 0&&D.total_offers!==void 0&&(ge.recommendation.destinations=[{recommender:D.recommender,contentId:D.target_id,index:D.offer_index,numberDisplayed:D.total_offers}])),D.experiment&&(ge.experiment=D.experiment),ge.screen={height:Qs.getWindowHeight(),width:Qs.getWindowWidth(),orientation:Qs.getScreenOrientation(),pixelRatio:window.devicePixelRatio},(D.click_name||D.click_type)&&(ge.click={name:D.click_name,type:D.click_type,position_x:D.click_position_x,position_y:D.click_position_y,chapter_1:D.click_chapter_1,chapter_2:D.click_chapter_2,chapter_3:D.click_chapter_3}),D.error_message&&(ge.error={message:D.error_message}),D.scroll_percentage!==void 0&&(ge.scroll={percentage:D.scroll_percentage}),Object.keys(ge).length>0&&(re.parameters=ge),re},Ls=function(Q,D){var re=Bn(),ge={t:Q.event_type,c:Q.client_timestamp_iso,e:Q.event_id,n:Q.is_new_party,f:Q.is_new_session,p:Q.party_id,s:Q.session_id};D.condition&&(ge.condition=D.condition),Q.error_code&&(ge.error_code=Q.error_code),D.location&&(ge.l=D.location),D.referrer&&(ge.r=D.referrer),ge.j=re.getScreenHeight(),ge.i=re.getScreenWidth(),ge.k=window.devicePixelRatio,ge.screen_orientation=re.getScreenOrientation(),Q.sdk_version&&(ge.sdk_version=Q.sdk_version);var je=[D.custom_label1,D.custom_label2,D.custom_label3,D.custom_label4,D.custom_label5];return je.some(Boolean)&&(ge.customLabels={label1:D.custom_label1,label2:D.custom_label2,label3:D.custom_label3,label4:D.custom_label4,label5:D.custom_label5}),Q.parameters&&(ge.parameters=Q.parameters),ge},qa=R(5373),eu=R.n(qa);R(6033),R(761),R(3418),R(906),R(9463),R(2259);function js(){var W,Q=0;return{start:function(re){W||(W=mn(re))},stop:function(re){if(W){var ge=mn(re)-W;Q+=ge,W=void 0}},elapsedTime:function(re){return W?mn(re)-W+Q:Q}}}function Hi(W,Q){var D=typeof Symbol<"u"&&W[Symbol.iterator]||W["@@iterator"];if(!D){if(Array.isArray(W)||(D=Zs(W))||Q){D&&(W=D);var re=0,ge=function(){};return{s:ge,n:function(){return re>=W.length?{done:!0}:{done:!1,value:W[re++]}},e:function(vt){throw vt},f:ge}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
124
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var je,qe=!0,tt=!1;return{s:function(){D=D.call(W)},n:function(){var vt=D.next();return qe=vt.done,vt},e:function(vt){tt=!0,je=vt},f:function(){try{qe||D.return==null||D.return()}finally{if(tt)throw je}}}}function Zs(W,Q){if(W){if(typeof W=="string")return Ca(W,Q);var D={}.toString.call(W).slice(8,-1);return D==="Object"&&W.constructor&&(D=W.constructor.name),D==="Map"||D==="Set"?Array.from(W):D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D)?Ca(W,Q):void 0}}function Ca(W,Q){(Q==null||Q>W.length)&&(Q=W.length);for(var D=0,re=Array(Q);D<Q;D++)re[D]=W[D];return re}function Bo(W){var Q=new Map,D=new Map;function re(qe){var tt=Q.get(qe);if(tt)return tt;var rt=js();return Q.set(qe,rt),rt}function ge(qe,tt){if(T(W)!=="object")return qe-tt<W;var rt=Object.keys(W).map(function(_t){return parseInt(_t)}).sort(function(_t,qt){return _t-qt}),vt=0,En=Math.trunc(tt/1e3),or=Hi(rt),Qn;try{for(or.s();!(Qn=or.n()).done;){var Xn=Qn.value;if(En<Xn)break;vt=Xn}}catch(_t){or.e(_t)}finally{or.f()}return qe-tt<W[vt]}function je(qe,tt,rt){var vt=rt||0,En=tt.elapsedTime(qe);return ge(En,vt)}return{shouldThrottleEvent:function(tt,rt){return tt!==he.STREAM_WAYPOINT?!1:je(rt.client_timestamp,re(rt.stream_id),D.get(rt.stream_id))},onSendEvent:function(tt,rt){switch(tt){case he.STREAM_START:case he.STREAM_BUFFERING_COMPLETE:case he.STREAM_RESUME:re(rt.stream_id).start(rt.client_timestamp);break;case he.STREAM_BUFFERING:case he.STREAM_PAUSE:re(rt.stream_id).stop(rt.client_timestamp);break;case he.STREAM_WAYPOINT:D.set(rt.stream_id,re(rt.stream_id).elapsedTime(rt.client_timestamp));break;case he.STREAM_COMPLETE:case he.STREAM_STOP:Q.delete(rt.stream_id),D.delete(rt.stream_id);break}}}}function Di(W,Q){var D=typeof Symbol<"u"&&W[Symbol.iterator]||W["@@iterator"];if(!D){if(Array.isArray(W)||(D=tu(W))||Q){D&&(W=D);var re=0,ge=function(){};return{s:ge,n:function(){return re>=W.length?{done:!0}:{done:!1,value:W[re++]}},e:function(vt){throw vt},f:ge}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
125
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var je,qe=!0,tt=!1;return{s:function(){D=D.call(W)},n:function(){var vt=D.next();return qe=vt.done,vt},e:function(vt){tt=!0,je=vt},f:function(){try{qe||D.return==null||D.return()}finally{if(tt)throw je}}}}function tu(W,Q){if(W){if(typeof W=="string")return mi(W,Q);var D={}.toString.call(W).slice(8,-1);return D==="Object"&&W.constructor&&(D=W.constructor.name),D==="Map"||D==="Set"?Array.from(W):D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D)?mi(W,Q):void 0}}function mi(W,Q){(Q==null||Q>W.length)&&(Q=W.length);for(var D=0,re=Array(Q);D<Q;D++)re[D]=W[D];return re}function qs(W,Q,D){var re=Di(D),ge;try{for(re.s();!(ge=re.n()).done;){var je=ge.value;if(je.shouldThrottleEvent(W,Q))return!0}}catch(qe){re.e(qe)}finally{re.f()}return D.forEach(function(qe){return qe.onSendEvent(W,Q)}),!1}var nu=["trialCount"];function ru(W,Q){var D=Object.keys(W);if(Object.getOwnPropertySymbols){var re=Object.getOwnPropertySymbols(W);Q&&(re=re.filter(function(ge){return Object.getOwnPropertyDescriptor(W,ge).enumerable})),D.push.apply(D,re)}return D}function Gi(W){for(var Q=1;Q<arguments.length;Q++){var D=arguments[Q]!=null?arguments[Q]:{};Q%2?ru(Object(D),!0).forEach(function(re){v(W,re,D[re])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(D)):ru(Object(D)).forEach(function(re){Object.defineProperty(W,re,Object.getOwnPropertyDescriptor(D,re))})}return W}var Vn="GovoltePlugin",ss="https://topspin.npo.nl",Vr={submitEvent:"web-event"},Vo="Govolte_queue",Es=1e3,Fs=5e3,Us=5e3,as=3,xs=3e4,ws=3e4,Ma=0,ea=10,Ki=0,_o=3e4,ta=0,na=20,As=3e4,ra={maxRetryCount:as,delayBetweenRetriesInMs:Us,delayBetweenStreamWaypointsInMs:xs,baseUrl:ss,is_batch:!1,batch_size:na,max_batch_age:As};function jl(W){var Q=Gi(Gi({},ra),W),D=[Bo(Q.delayBetweenStreamWaypointsInMs)],re=Q.maxRetryCount;if(re<Ki)throw Error("Invalid maxRetryCount(".concat(re,"). Minimum maxRetryCount is ").concat(Ki,"."));if(re>ea)throw Error("Invalid maxRetryCount(".concat(re,"). Maximum maxRetryCount is ").concat(ea,"."));var ge=Q.delayBetweenRetriesInMs;if(ge<Ma)throw Error("Invalid delayBetweenRetriesInMs(".concat(ge,"). Minimum delayBetweenRetriesInMs is ").concat(Ma,"."));if(ge>ws)throw Error("Invalid delayBetweenRetriesInMs(".concat(ge,"). Maximum delayBetweenRetriesInMs is ").concat(ws,"."));var je=Q.delayBetweenStreamWaypointsInMs;if(je<ta)throw Error("Invalid delayBetweenStreamTimeEventsInMs(".concat(je,"). Minimum delayBetweenStreamTimeEventsInMs is ").concat(ta,"."));if(je>_o)throw Error("Invalid delayBetweenStreamTimeEventsInMs(".concat(je,"). Maximum delayBetweenStreamTimeEventsInMs is ").concat(_o,"."));var qe=new zr,tt=!1,rt=new zr,vt=null,En=!1;function or(){if(!Xs()){Ie(Vn,"Local storage is unavailable. Event queue won't be saved to local storage.");return}var Jt=localStorage.getItem(Vo);if(Jt){var fn=JSON.parse(Jt),nn=fn.filter(function(en){return en.t!==he.STREAM_STOP});Q.is_batch?(Ae(Vn,"Converting ".concat(nn.length," old individual events to batch format")),nn.forEach(function(en){if(en.originalEventType&&en.originalEvent)try{var Zn=Ts(en.originalEventType,en.originalEvent),sr={eventType:en.originalEventType,event:en.originalEvent,jsonEvent:Zn,trialCount:en.trialCount||0,timestamp:Date.now()};rt.enqueue(sr),Ae(Vn,"Converted event ".concat(en.originalEventType," to batch format"))}catch(xn){Ie(Vn,"Failed to convert event ".concat(en.originalEventType," to batch format"),xn),qe.enqueue(en)}else Ae(Vn,"Event ".concat(en.t," missing original data, keeping in individual queue")),qe.enqueue(en)}),localStorage.removeItem(Vo),rt.isEmpty()||(Ae(Vn,"Starting batch timer for converted events"),lo())):qe.enqueue.apply(qe,fi(nn))}}function Qn(Jt){Xs()&&(Q.is_batch||(Jt.length>Es&&(Ie("Hit storage limit. Can't save all events to local storage. Keeping last",Es),Jt=Jt.slice(Jt.length-Es)),localStorage.setItem(Vo,JSON.stringify(Jt))))}function Xn(Jt){return _t.apply(this,arguments)}function _t(){return _t=ao(_i().mark(function Jt(fn){return _i().wrap(function(en){for(;;)switch(en.prev=en.next){case 0:return en.abrupt("return",new Promise(function(Zn,sr){var xn=setTimeout(function(){yn=!0,sr("Sending event took too long.")},Fs),Ar=new Image(1,1),yn=!1;Ar.onload=function(){yn||(clearTimeout(xn),Zn())},Ar.onerror=function(Ir){return sr(Ir)},Ar.src=fn}));case 1:case"end":return en.stop()}},Jt)})),_t.apply(this,arguments)}function qt(Jt,fn,nn){return vn.apply(this,arguments)}function vn(){return vn=ao(_i().mark(function Jt(fn,nn,en){var Zn,sr,xn,Ar;return _i().wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:if(!(typeof fetch>"u")){Ir.next=2;break}throw new Error("fetch is not available");case 2:return Zn="".concat(Q.baseUrl,"/").concat(Vr.submitEvent,"?p=").concat(encodeURIComponent(en)),sr=Ls(fn,nn),Ae(Vn,"Sending individual JSON POST request",{url:Zn,partyId:en,jsonEvent:fn,originalEvent:nn,payload:sr}),Ir.prev=5,Ir.next=8,fetch(Zn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(sr)});case 8:return xn=Ir.sent,Ar=xn.ok||xn.status===204,Ae(Vn,"Individual JSON POST response: ".concat(xn.status," ").concat(xn.statusText),{success:Ar,status:xn.status,statusText:xn.statusText}),Ir.abrupt("return",Ar);case 14:return Ir.prev=14,Ir.t0=Ir.catch(5),Ie("Error delivering JSON event",Ir.t0),Ir.abrupt("return",!1);case 18:case"end":return Ir.stop()}},Jt,null,[[5,14]])})),vn.apply(this,arguments)}function It(Jt,fn){return Tn.apply(this,arguments)}function Tn(){return Tn=ao(_i().mark(function Jt(fn,nn){var en,Zn,sr,xn;return _i().wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:if(!(typeof fetch>"u")){yn.next=2;break}throw new Error("fetch is not available");case 2:return en="".concat(Q.baseUrl,"/").concat(Vr.submitEvent,"?p=").concat(encodeURIComponent(nn)),Zn=fn.map(function(Ir){return Ls(Ir.jsonEvent,Ir.event)}),Ae(Vn,"Sending batch POST request",{url:en,partyId:nn,batchSize:fn.length,payload:Zn}),yn.prev=5,yn.next=8,fetch(en,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Zn)});case 8:return sr=yn.sent,xn=sr.ok||sr.status===204,Ae(Vn,"Batch POST response: ".concat(sr.status," ").concat(sr.statusText),{success:xn,status:sr.status,statusText:sr.statusText}),yn.abrupt("return",xn);case 14:return yn.prev=14,yn.t0=yn.catch(5),Ie("Error delivering JSON event batch",yn.t0),yn.abrupt("return",!1);case 18:case"end":return yn.stop()}},Jt,null,[[5,14]])})),Tn.apply(this,arguments)}function Wn(Jt){return $r.apply(this,arguments)}function $r(){return $r=ao(_i().mark(function Jt(fn){var nn,en,Zn,sr,xn;return _i().wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:if(nn=fn,Ae(Vn,"Sending individual event: ".concat(nn.t),{govolteEvent:fn,originalEventType:nn.originalEventType,originalEvent:nn.originalEvent}),!(nn.originalEventType&&nn.originalEvent)){yn.next=16;break}return yn.prev=3,en=Ts(nn.originalEventType,nn.originalEvent),Ae(Vn,"Sending as JSON POST",{jsonEvent:en}),yn.next=8,qt(en,nn.originalEvent,nn.originalEvent.party_id);case 8:return Zn=yn.sent,Ae(Vn,Zn?"JSON POST successful":"JSON POST failed"),yn.abrupt("return",Zn);case 13:yn.prev=13,yn.t0=yn.catch(3),Ie("Error sending JSON event, falling back to GET",yn.t0);case 16:return sr=eu().stringify(fn),xn="".concat(Q.baseUrl,"/").concat(Vr.submitEvent,"?").concat(sr),Ae(Vn,"Sending as GET request",{url:xn}),yn.prev=19,yn.next=22,Xn(xn);case 22:return Ae(Vn,"GET request successful"),yn.abrupt("return",!0);case 26:return yn.prev=26,yn.t1=yn.catch(19),Ie("Error delivering event",yn.t1),yn.abrupt("return",!1);case 30:case"end":return yn.stop()}},Jt,null,[[3,13],[19,26]])})),$r.apply(this,arguments)}function lo(){vt&&window.clearTimeout(vt),vt=window.setTimeout(function(){us()},Q.max_batch_age)}function us(){return Ni.apply(this,arguments)}function Ni(){return Ni=ao(_i().mark(function Jt(){var fn,nn,en,Zn;return _i().wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:if(!(En||rt.isEmpty())){xn.next=2;break}return xn.abrupt("return");case 2:if(En=!0,vt&&(window.clearTimeout(vt),vt=null),nn=rt.getAllItems(),en=(fn=nn[0])===null||fn===void 0?void 0:fn.event.party_id,en){xn.next=9;break}return En=!1,xn.abrupt("return");case 9:return Ae(Vn,"Sending batch of ".concat(nn.length," events"),{eventsToSend:nn.map(function(Ar){return{eventType:Ar.eventType,event:Ar.event,jsonEvent:Ar.jsonEvent}}),partyId:en}),xn.prev=10,xn.next=13,It(nn,en);case 13:Zn=xn.sent,Zn?(Ae(Vn,"Successfully sent batch of ".concat(nn.length," events")),rt.clear()):(Ae(Vn,"Failed to send batch, will retry individual events"),nn.forEach(function(Ar){var yn=Bt(Ar.eventType,Ar.event),Ir=Gi(Gi({},yn),{},{trialCount:0});qe.enqueue(Ir)}),rt.clear(),ri()),xn.next=23;break;case 17:xn.prev=17,xn.t0=xn.catch(10),Ie("Error sending batch",xn.t0),nn.forEach(function(Ar){var yn=Bt(Ar.eventType,Ar.event),Ir=Gi(Gi({},yn),{},{trialCount:0});qe.enqueue(Ir)}),rt.clear(),ri();case 23:En=!1,rt.isEmpty()||lo();case 25:case"end":return xn.stop()}},Jt,null,[[10,17]])})),Ni.apply(this,arguments)}function vi(Jt,fn){var nn=Ts(Jt,fn),en={eventType:Jt,event:fn,jsonEvent:nn,trialCount:0,timestamp:Date.now()};rt.enqueue(en),Ae(Vn,"Event added to batch queue. Size: ".concat(rt.size(),"/").concat(Q.batch_size),{eventType:Jt,event:fn,jsonEvent:nn,batchSize:rt.size(),maxBatchSize:Q.batch_size}),rt.size()===1&&(Ae(Vn,"Starting batch timer (".concat(Q.max_batch_age,"ms)")),lo()),rt.size()>=Q.batch_size&&(Ae(Vn,"Batch is full, sending immediately"),us())}function ri(){var Jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(!(tt&&Jt)){var fn=qe.peek();if(fn){var nn=fn.trialCount,en=ys(fn,nu),Zn=isNaN(nn)?1:nn+1;qe.swapTopElement(Gi(Gi({},en),{},{trialCount:Zn})),Qn(qe.getAllItems()),Ae(Vn,"Sending event [attempt ".concat(Zn,"]: ").concat(en.t),en),tt=!0,Wn(en).then(function(sr){if(sr||Zn>re)tt=!1,sr?Ae(Vn,"Successfully sent event [attempt ".concat(Zn,"]: ").concat(en.t)):Ae(Vn,"Removing event because already tried sending ".concat(Zn," times. MaxRetryCount is ").concat(re,". Event: ").concat(en.t)),qe.dequeue(),Qn(qe.getAllItems()),ri(!1);else{var xn=ge*Zn;Ae(Vn,"Failed sending event: ".concat(en.t,". Now waiting for ").concat(xn,"ms before retry [attempt ").concat(Zn,"/").concat(re,"].")),Jn(xn).then(function(){return ri(!1)})}})}}}return or(),ri(!1),{submitEvent:function(fn,nn){if(Ae(Vn,"Submitting event: ".concat(fn),{eventType:fn,event:nn,batchMode:Q.is_batch}),qs(fn,nn,D)){Ae(Vn,"Event throttled: ".concat(fn));return}if(Q.is_batch)Ae(Vn,"Adding event to batch: ".concat(fn)),vi(fn,nn);else{var en=Bt(fn,nn),Zn=Gi(Gi({},en),{},{trialCount:0,originalEventType:fn,originalEvent:nn});Ae(Vn,"Adding event to individual queue: ".concat(fn),en),qe.enqueue(Zn),Qn(qe.getAllItems()),ri()}},queuedEvents:function(){return qe.getAllItems()},isSendingEvent:function(Jt){function fn(){return Jt.apply(this,arguments)}return fn.toString=function(){return Jt.toString()},fn}(function(){return tt||En}),delayBetweenRetriesInMs:ge,maxRetryCount:re,delayBetweenStreamWaypointsInMs:je,is_batch:Q.is_batch,batch_size:Q.batch_size,max_batch_age:Q.max_batch_age,getSessionInfo:function(){return{}},initializeFromSessionInfo:function(){}}}var Bs={brand_id:"site",chapter_1:"page_chapter1",chapter_2:"page_chapter2",chapter_3:"page_chapter3",page:"page",platform:"platform",content_context_id:"contextID",user_subscription:"user_type",query_context:"ise_keyword",platform_version:"platform_version",custom_label1:"customlabel_1",custom_label2:"customlabel_2",custom_label3:"customlabel_3",custom_label4:"customlabel_4",custom_label5:"customlabel_5",error_code:"error_code",program:"programma",broadcasters:"omroep",is_homepage:"c_nmo_02",location:"location",referrer:"referrer",nmoid:"cs_fpid",live_offset:"live_offset_sec",live_offset_from:"live_offset_from_sec",isLiveStream:"av_broadcasting_type",stream_length:"av_content_duration",stream_id:"av_content_id",player_id:"av_player",av_type:"av_content_type",player_version:"player_version",sko_player_version:"av_player_version",sdk_version:"sdk_version",click_name:"click",click_type:"event_name",click_chapter_1:"click_chapter1",click_chapter_2:"click_chapter2",click_chapter_3:"click_chapter3"},bu=function(Q,D){switch(Q){case"is_homepage":return D?1:0;case"isLiveStream":return D?"live":"clip";case"stream_length":return+D*1e3;default:return D}},Mn=function(Q){var D={};return Object.keys(Q).forEach(function(re){var ge=re,je=Bs[ge],qe=Q[ge];qe!==void 0&&je!==void 0&&(D[je]=bu(ge,qe))}),D},vr=function(){function W(){Qe(this,W),v(this,"expiryTimeInDays",395),this.storage=at()}return Xt(W,[{key:"visitorId",get:function(){return this.storage.get(W.PIANO_VISITOR_ID_STORAGE_KEY)}},{key:"setVisitorId",value:function(D){this.storage.set(W.PIANO_VISITOR_ID_STORAGE_KEY,D,{expires:this.expiryTimeInDays})}}],[{key:"getInstance",value:function(){return W.instance||(W.instance=new W),W.instance}}]),W}();v(vr,"PIANO_VISITOR_ID_STORAGE_KEY","PianoVisitorID");function _r(W,Q){var D=Object.keys(W);if(Object.getOwnPropertySymbols){var re=Object.getOwnPropertySymbols(W);Q&&(re=re.filter(function(ge){return Object.getOwnPropertyDescriptor(W,ge).enumerable})),D.push.apply(D,re)}return D}function di(W){for(var Q=1;Q<arguments.length;Q++){var D=arguments[Q]!=null?arguments[Q]:{};Q%2?_r(Object(D),!0).forEach(function(re){v(W,re,D[re])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(D)):_r(Object(D)).forEach(function(re){Object.defineProperty(W,re,Object.getOwnPropertyDescriptor(D,re))})}return W}var Pn="ATInternetPlugin",Oi="https://atconnect.npo.nl",At=1e4,Co=6e4,iu={collectDomain:Oi};function uo(W){Ie(Pn,`Piano/ATInternet functionality is being phased out.
126
+ The Piano tag will be removed from the NPO tag SDK after September 30th, 2025.
127
+ This ATInternetPlugin will become non-functional after that date.
128
+ Please plan to migrate away from Piano analytics before the deadline.`);var Q=di(di({},iu),W),D=[Bo({0:At,60:Co})],re,ge=function(){if(!re){var _t=R(4569).pianoAnalytics,qt=vr.getInstance(),vn=_t.setVisitorId.bind(_t);if(_t.setVisitorId=function($r){vn($r),qt.setVisitorId($r)},qt.visitorId){var Wn=qt.visitorId;_t.setVisitorId(Wn)}else{var It=_t.getVisitorId();if(!It){var Tn=P();_t.setVisitorId(Tn)}}_t.setConfigurations({collectDomain:Q.collectDomain}),re=_t}return re};function je(Xn,_t){ge().sendEvent(Xn,Mn(_t),{onBeforeSend:function(vn,It,Tn){Ae(Pn,"Sending event",Xn,It),Tn()}})}var qe=new Map,tt=void 0;function rt(Xn){var _t=qe.get(Xn);if(_t)return _t;var qt=ge(),vn=new qt.avInsights.Media(void 0,void 0,tt);return tt=void 0,qe.set(Xn,vn),vn}function vt(Xn){return Math.trunc(Xn*1e3)}function En(Xn){return Math.trunc(Xn)}function or(Xn){var _t=ge();_t.getConfiguration("site")!==Xn&&_t.setConfiguration("site",Xn)}function Qn(Xn,_t){var qt=rt(_t.stream_id),vn=_t.isLiveStream?En(_t.stream_position):vt(_t.stream_position),It=Mn(_t),Tn=function(lo){return{onBeforeSend:function(Ni,vi,ri){Ae(Pn,"Sending stream event",lo,vi),ri()}}};switch(Xn){case he.STREAM_WAYPOINT:qt.heartbeat(vn,Tn("av.heartbeat"),It);break;case he.STREAM_SEEK:{if(_t.stream_seek_from===void 0){Ie(Pn,"A 'stream_seek_from' value is required for seek events.");return}var Wn=_t.isLiveStream?En(_t.stream_seek_from):vt(_t.stream_seek_from);qt.seek(Wn,vn,Tn(Wn>vn?"av.backward":"av.forward"),It);break}case he.STREAM_PAUSE:qt.playbackPaused(vn,Tn("av.pause"),It);break;case he.STREAM_RESUME:qt.playbackResumed(vn,Tn("av.resume"),It);break;case he.STREAM_COMPLETE:case he.STREAM_STOP:qt.playbackStopped(vn,Tn("av.stop"),It);break;case he.STREAM_BUFFERING:qt.bufferStart(vn,Tn("av.rebuffer.start"),It);break;case he.STREAM_BUFFERING_COMPLETE:qt.rebufferHeartbeat(Tn("av.rebuffer.heartbeat"),It);break;case he.STREAM_LOAD:qt.bufferStart(vn,Tn("av.buffer.start"),It);break;case he.STREAM_LOAD_COMPLETE:qt.bufferHeartbeat(Tn("av.buffer.heartbeat"),It);break;case he.STREAM_START:qt.playbackStart(vn,Tn("av.start"),It);break;case he.STREAM_FULLSCREEN:qt.fullscreenOn(Tn("av.fullscreen.on"),It);break;case he.STREAM_WINDOWED:qt.fullscreenOff(Tn("av.fullscreen.off"),It);break}}return{submitEvent:function(_t,qt){if(!qs(_t,qt,D))switch(or(qt.brand_id),_t){case he.PAGE_VIEW:je("page.display",qt);break;case he.CLICK:switch(qt.click_type){case"navigation":case"action":case"exit":case"download":je("click.".concat(qt.click_type),qt);break;default:Ie(Pn,"Click type '".concat(qt.click_type,"' is not supported. Event will not be sent."))}break;case he.STREAM_WAYPOINT:case he.STREAM_SEEK:case he.STREAM_PAUSE:case he.STREAM_RESUME:case he.STREAM_COMPLETE:case he.STREAM_BUFFERING:case he.STREAM_BUFFERING_COMPLETE:case he.STREAM_LOAD:case he.STREAM_LOAD_COMPLETE:case he.STREAM_START:case he.STREAM_FULLSCREEN:case he.STREAM_WINDOWED:case he.STREAM_STOP:Qn(_t,qt);break}},getCollectDomain:function(){return ge().getConfiguration("collectDomain")},getSessionInfo:function(){var _t=ge(),qt=qe.values().next().value,vn={atVisitorId:_t.getVisitorId(),avSessionId:qt&&qt.getSessionID()};return di({},vn)},initializeFromSessionInfo:function(_t){var qt=_t,vn=ge();qt.atVisitorId?vn.setVisitorId(qt.atVisitorId):Ie(Pn,"Configuration error: session info did not contain atVisitorId"),tt=qt.avSessionId}}}}(),de}()})})(vv);var tf=vv.exports;const bw=[tf.newGovoltePlugin({maxRetryCount:5,delayBetweenRetriesInMs:3e3})];function yv(Se){const p=Se.npoTagProps;p.npoTag===void 0&&p.initprops!==void 0&&(p.npoTag=tf.newTag(p.initprops,bw)),p.npoTag&&p.pageTracker===void 0&&(p.pageTracker=tf.newPageTracker(p.npoTag))}function ns({npoPlayer:Se,event:p,data:S}){if(!Se.player||Se.player.castService.isCastActive())return;if(!Se.npoTagProps.streamTracker){console.error("No streamTracker available, no tracking will be performed.");return}const j=Se.npoTagProps.streamTracker,R=S??{stream_position:0},T={start:j.start,buffering:j.buffering,buffering_complete:j.buffering_complete,complete:j.complete,load:j.load,load_complete:j.load_complete,pause:j.pause,resume:j.resume,stop:j.stop,time:j.time,seek:()=>{j==null||j.seek(R)},error:()=>{j.error(R),Se.npoTagProps.debugMode&&console.log("[NPOTag Error Event - Debug]",{event:"error",props:R,timestamp:new Date().toISOString()})}}[p];Se.logEmitter.emit(Ih.EVENT,p,R),T?T(R):console.warn(`No handler found for event: ${p}`)}function Dw(Se){if(!Se)return{};const p=Se.getMetrics();return{bitrate_audio:p.bitrateAudio,bitrate_video:p.bitrateVideo,startupTime:p.startupTime,drmLoadTime:p.drmLoadTime,drmType:p.drmType,mediaURL:p.mediaURL,isp:p.isp}}function nf(Se,p){return{stream_position:Se,...Dw(p)}}function Ow({streamErrorCode:Se,streamPosition:p,qosMetrics:S}){return{...nf(p,S),stream_error_code:Se}}const Nw=()=>{};function Lw(Se){const p=Se.player.getMediaElement(),S=3;if(!p)return Nw;const j=Se.npoTagProps.qosMetrics;let R=nf(0,j),de=!0,T=0,f=!1,c=!1,v=!1,C=!1,w=!1;const I=()=>{var ne,ae;const ee=p.currentTime,q=((ne=Se.player)==null?void 0:ne.isLive())??!1;let oe;if(q){const xe=(ae=Se.player)==null?void 0:ae.getSeekRange(),he=(xe==null?void 0:xe.end)==null?0:ee-xe.end;oe=he>=-3?0:he}else oe=ee;R=nf(+oe.toFixed(S),j)},L=ee=>()=>{I(),ns({npoPlayer:Se,event:ee,data:R})},z=()=>{j.markStreamLoadStart(),v=!1,C=!1},F=()=>{I(),de=!0,j.markFirstFrameDisplayed(),ns({npoPlayer:Se,event:"load_complete",data:R}),v=!0},K=()=>{I(),de?(ns({npoPlayer:Se,event:"start",data:R}),de=!1):ns({npoPlayer:Se,event:"resume",data:R}),c=!0,C=!0},N=()=>{j.updateBitrates()},P=()=>{I(),ns({npoPlayer:Se,event:"pause",data:R}),c=!1,de=!1},$=()=>{f||(I(),ns({npoPlayer:Se,event:"time",data:R}),j.updateBitrates())},d=()=>{f=!0,T=R&&"stream_position"in R&&R.stream_position||0},M=()=>{f=!1,I();const ee={...R,seek_from:+T.toFixed(S)};v&&C&&(ns({npoPlayer:Se,event:"seek",data:ee}),c&&ns({npoPlayer:Se,event:"resume",data:R}))},U=L("buffering"),J=()=>{L("complete")(),L("stop")(),de=!0},G=()=>{w||(I(),ns({npoPlayer:Se,event:"stop",data:R}))},Y=[["loadstart",z],["loadeddata",F],["play",K],["playing",N],["pause",P],["timeupdate",$],["seeking",d],["seeked",M],["stalled",U],["ended",J]];for(const[ee,q]of Y)p.addEventListener(ee,q);return window.addEventListener(kr.BeforeUnload,G),()=>{if(!w){w=!0,C&&!de&&(I(),ns({npoPlayer:Se,event:"stop",data:R}));for(const[ee,q]of Y)p.removeEventListener(ee,q);window.removeEventListener(kr.BeforeUnload,G)}}}function jw({npoPlayer:Se,duration:p,source:S,avType:j}){const{version:R,npoTagProps:de}=Se,T=de.npoTag,f=de.pageTracker;if(!S)throw new Error("Could not initialize streamTracker, no source specified.");if(!T)throw new Error("No npoTagInstance available. Could not create streamtracker.");if(!f)throw new Error("No npoTagPageTracker available. Could not create streamtracker.");if(!p)throw new Error("No duration specified. Could not create streamtracker.");const c={stream_length:p,stream_id:ow(S),player_id:"npoplayer-web",av_type:j,player_version:R,sko_player_version:"1.0.0"},v=Se.player.isLive();return tf.newStreamTracker(f,c,{isLive:v})}class Fw{constructor(p){be(this,"metrics",{isp:void 0,mediaURL:void 0,bitrateAudio:void 0,bitrateVideo:void 0,startupTime:void 0,drmLoadTime:void 0,drmType:void 0});be(this,"startupTimeStart");be(this,"drmLoadTimeStart");be(this,"hasFirstFrameDisplayed",!1);this.npoPlayer=p}markStreamLoadStart(){this.startupTimeStart=performance.now(),this.hasFirstFrameDisplayed=!1}markFirstFrameDisplayed(){this.startupTimeStart!==void 0&&!this.hasFirstFrameDisplayed&&(this.metrics.startupTime=Math.round(performance.now()-this.startupTimeStart),this.hasFirstFrameDisplayed=!0)}markDrmLoadStart(){this.drmLoadTimeStart=performance.now()}markDrmLoadComplete(){this.drmLoadTimeStart!==void 0&&(this.metrics.drmLoadTime=Math.round(performance.now()-this.drmLoadTimeStart))}updateBitrates(){try{const p=this.npoPlayer.player;if(!(p!=null&&p.player))return;const S=p.streamTrackService.getVariantTracks();if(!S||S.length===0)return;const j=S.find(R=>R.active);if(!j)return;j.audioBandwidth&&(this.metrics.bitrateAudio=String(j.audioBandwidth)),this.metrics.bitrateVideo=j.videoBandwidth?String(j.videoBandwidth):void 0}catch(p){tr.handleSilentError({code:19014,message:"Failed to get the bitrates",original:p})}}setMediaURL(p){this.metrics.mediaURL=p}setDrmType(p){this.metrics.drmType=p||void 0}getMetrics(){return this.updateBitrates(),{...this.metrics}}reset(){this.metrics={isp:void 0,mediaURL:void 0,bitrateAudio:void 0,bitrateVideo:void 0,startupTime:void 0,drmLoadTime:void 0,drmType:void 0},this.startupTimeStart=performance.now(),this.drmLoadTimeStart=void 0,this.hasFirstFrameDisplayed=!1}}const rf=()=>{};function Uw(Se){var j,R;const p=(j=Se.npoTagProps)==null?void 0:j.qosMetrics;if(!p)return rf;const S=(R=Se.player)==null?void 0:R.player;if(!S)return rf;try{const de=S.getNetworkingEngine();if(!de)return rf;const T=c=>{c===vs.net.NetworkingEngine.RequestType.LICENSE&&p.markDrmLoadStart()},f=c=>{c===vs.net.NetworkingEngine.RequestType.LICENSE&&p.markDrmLoadComplete()};return de.registerRequestFilter(T),de.registerResponseFilter(f),()=>{try{de.unregisterRequestFilter(T),de.unregisterResponseFilter(f)}catch(c){tr.handleSilentError(new zt({code:19024,message:"Failed to cleanup DRM tracking",original:c}))}}}catch(de){return tr.handleSilentError(new zt({code:19025,message:"Failed to setup DRM tracking",original:de})),rf}}function Sv(Se){if(!Se)return es.VIDEO;const p=Se.trim().toLowerCase();return p==="aod"||p==="audio"?es.AUDIO:es.VIDEO}const Tv=function({npoPlayer:Se,source:p,duration:S,streamAvType:j}){Se.npoTagProps.cleanup&&(Se.npoTagProps.cleanup(),Se.npoTagProps.cleanup=void 0);const R=Se.player.getMediaElement();if(!R)throw new Error("Could not initialize streamTracker, audio element not found.");const de=S??R.duration??void 0;if(!p)throw new Error("Could not initialize streamTracker, no source specified.");const T=Sv(j??Se.playerConfig.mediaType??es.VIDEO);Se.npoTagProps.streamTracker=jw({npoPlayer:Se,duration:iw({duration:de}),source:p,avType:T}),Se.npoTagProps.qosMetrics=new Fw(Se),Se.npoTagProps.debugMode=!1;const f=Uw(Se),c=Lw(Se);Se.npoTagProps.cleanup=()=>{f(),c()};const C=Number.isFinite(R.currentTime)?+R.currentTime.toFixed(3):0,w=nf(C,Se.npoTagProps.qosMetrics);ns({npoPlayer:Se,event:"load",data:w})},Ll="widevine",Rh="playready",bh="fairplay",Dh="dash",Ev="hls";function Bw(Se,p){if(!Se)return tr.handleSilentError(new zt({code:19005,message:"No player detected, cannot decide the profile"})),{profileName:"",drm:""};if(p)return{profileName:p.profileName,drm:p.drmType};const S=Vw(),{bestWithDRM:j,bestDRM:R}=_w(S),de=Hw(Se.streamTrackService.getVariantTracks());return j&&R?{profileName:j,drm:R}:{profileName:de,drm:R||""}}function Vw(){const Se=[];return Ol("chrome")&&Se.push(Ll),Ol("firefox")&&Se.push(Ll),Ol("edge")&&Se.push(Rh),Ol("safari")&&Se.push(bh),Se}function _w(Se){let p="",S="";const j={widevine:{drm:Ll,stream:Dh},fairplay:{drm:bh,stream:Ev},playready:{drm:Rh,stream:Dh}};for(const R of Se){if(p)continue;const de=j[R];p=de.stream,S=de.drm}return{bestWithDRM:p,bestDRM:S}}function Hw(Se){const p=Se.some(j=>j.mimeType.includes("mp4")||j.mimeType.includes("dash")),S=Se.some(j=>j.mimeType.includes("m3u8"));return p?Dh:S?Ev:""}function Gw(Se){return Se.replace(/['()*]/g,p=>{var S;return`%${(S=p.codePointAt(0))==null?void 0:S.toString(16).toUpperCase()}`})}const Kw=({playerConfig:Se,streamObjectMetaData:p,streamOptions:S})=>{var R,de;let j="";return(R=S==null?void 0:S.metadata)!=null&&R.poster?j=S.metadata.poster:p.posterIsDefault&&((de=Se.options)!=null&&de.customFallbackPoster)?j=Se.options.customFallbackPoster:p.poster&&(j=p.poster),Gw(j)};var xv=["SW_SECURE_CRYPTO"];const wv={[Ll]:"com.widevine.alpha",[Rh]:"com.microsoft.playready",[bh]:"com.apple.fps"};function Ww(Se){Se.configure({drm:{servers:{},advanced:{},initDataTransform:void 0}})}function zw({player:Se,streamObject:p,customDRMConfig:S}){const j=$w(p);if(!j)return;const R=Xw(j.type);if(!R)return;const de=Yw(j,S),T=Jw(R,j.licenseUrl);Se.configure({drm:{servers:T,advanced:Qw({keySystem:R,drmConfig:j,headers:de}),initDataTransform:Zw()}})}function $w(Se){return Se.stream.drm}function Xw(Se){if(Se)return wv[Se.toLowerCase()]}function Yw(Se,p){const S=p!=null&&p.secure?p.headers:void 0;if(!(!Se.httpHeaders&&!S))return{...Se.httpHeaders,...S}}function Jw(Se,p){return{[Se]:p}}function Qw({keySystem:Se,drmConfig:p,headers:S}){const j={};return p.certificateUrl&&(j.serverCertificateUri=p.certificateUrl),S&&Object.keys(S).length>0&&(j.headers=S),Se===wv[Ll]&&(j.videoRobustness=xv,j.audioRobustness=xv),{[Se]:j}}function Zw(){return function(...[Se,p,S]){var j;if(p==="skd"){const de=((j=vs.util.StringUtils.fromBytesAutoDetect(Se).split("/").pop())==null?void 0:j.split("?")[0])||"",T=S.serverCertificate;if(!T)return console.warn("DRM: No certificate found for FairPlay transform"),Se;try{return vs.util.FairPlayUtils.initDataTransform(Se,de,T)}catch(f){return console.error("FairPlay transform error:",f),Se}}return Se}}function qw({player:Se,isLiveStream:p,startOffset:S,hasDvrWindow:j,liveOffset:R,liveProgramTime:de}){if(p)Se.once(xt.Play,()=>{var C,w;if(!Se.isLive()||!j)return;const T=(w=(C=Se.player).seekRange)==null?void 0:w.call(C);if(!T){tr.handleSilentError({code:19006,message:"[handleOffset] Seek range not available, cannot seek"});return}const f=T.end,c=T.start;let v;if(R&&typeof de=="number"){const I=Se.player.getManifest(),L=I==null?void 0:I.presentationTimeline;if(L!=null&&L.getPresentationStartTime){const F=L.getPresentationStartTime()+f-de;v=f-F}else v=f}else v=f;v=Math.max(c,Math.min(v,f)),Se.seek(v)});else{const T=typeof S=="number"&&S>0?S:0;Se.getMediaElement().currentTime=T}}function Av(Se){return Se.streamOptions.autoplay??Se.playerConfig.autoplay??!1}function Iv(Se){Av(Se)&&Se.play().catch(S=>{tr.handleSilentError({code:19016,message:"Autoplay failed",original:S})})}function Oh(Se){var p,S;return((p=Se.metadata)==null?void 0:p.hasPreroll)==="true"&&!!((S=Se.assets)!=null&&S.preroll)}async function Cv(Se,p){const{streamObject:S}=p;try{const j=Se.getMediaElement();j instanceof HTMLVideoElement&&j.pause(),await Se.advertService.requestAds(S)}catch(j){tr.handleSilentError(new zt({code:19103,message:"[PrerollService] Failed to load preroll ad",original:j})),Se.reemit(xt.AllAdsCompleted)}finally{p.autoplay&&!Se.advertService.isPlayingAd()&&Se.play().catch(j=>{tr.handleSilentError({code:19016,message:"Autoplay failed after ad attempt",original:j})})}}function eA(Se,p){Oh(p)&&Se.once(xt.Play,()=>{Cv(Se,{streamObject:p,autoplay:!0})})}function tA(Se,p){!Oh(p)||!(Se.getMediaElement()instanceof HTMLVideoElement)||Cv(Se,{streamObject:p,autoplay:!0})}function Mv(Se,p){"mediaSession"in navigator&&(navigator.mediaSession.metadata=new MediaMetadata({title:p.title,artist:p.description,album:p.broadcaster,artwork:[{src:p.poster,type:"image/*"}]}),navigator.mediaSession.setActionHandler("play",()=>{Se.play()}),navigator.mediaSession.setActionHandler("pause",()=>{Se.pause()}),navigator.mediaSession.setActionHandler("seekbackward",S=>{Se.backward(S.seekOffset||10)}),navigator.mediaSession.setActionHandler("seekforward",S=>{Se.forward(S.seekOffset||10)}),navigator.mediaSession.setActionHandler("previoustrack",null),navigator.mediaSession.setActionHandler("nexttrack",null))}function nA({player:Se,playNext:p,duration:S}){if(!(p!=null&&p.showPlayNext)||Se.isLive())return;if(!Number.isFinite(S)||S<=0){console.warn("Invalid duration, cannot register play next action:",S);return}const j=p.offset??20,R=p.duration??20,de=Math.max(0,S-j),T=Math.min(S,de+R);if(de>=S){console.warn("Offset is greater than duration, skipping play next registration");return}const f={id:"play-next-action",type:Aa.PLAY_NEXT,startTime:de,endTime:T,playNext:p};Se.timeBoundActionsService.registerAction(f)}class rA{constructor(){be(this,"playNextRegistrationId",0);be(this,"deferredPlayNextCleanup")}async loadMedia({source:p,npoPlayer:S,errorCallback:j}){const{player:R,uiFactory:de}=S;R.airPlayService.captureContext(),await R.unload(),de==null||de.resetUI(),de==null||de.setLoadingState();const T=Tw(p);let f;return T?await this.loadDirectMedia({source:p,npoPlayer:S}):f=await this.loadStreamMedia({source:p,npoPlayer:S,errorCallback:j}),de==null||de.updateModeClass(),f}async loadDirectMedia({source:p,npoPlayer:S}){var I;const{player:j,uiFactory:R,npoTagProps:de,streamOptions:T}=S;this.clearDeferredPlayNextRegistration(),this.playNextRegistrationId+=1;const f=p;await j.load(f);const c=j.streamTrackService.isAudioOnly()?es.AUDIO:es.VIDEO;j.setStreamLoadingData({normalizedAvType:c,avType:c,isLiveStream:j.isLive(),hasDvrWindow:!j.isLive()});const v=this.getMetadata(T),C={...v,poster:v.poster||Wx,avType:c};Mv(j,C);const w=j.getDuration();de&&C.prid&&(Tv({npoPlayer:S,source:C.prid,duration:Number.isNaN(w)?0:w}),this.initQosMetrics({npoTagProps:de,source:p,drmType:void 0})),this.initCast({player:j,currentSource:f,parsedMetadata:C,npoTagProps:de}),this.initOffset({player:j,isLiveStream:!1,hasDvrWindow:!1,streamOptions:T}),this.initTimeBound(j,T),this.initPlayNext({player:j,streamOptions:T,duration:w}),j.streamTrackService.init(),R==null||R.setMetadata(C,(T==null?void 0:T.infoPanelHTML)||""),(I=R==null?void 0:R.setBackButtonCallback)==null||I.call(R,T==null?void 0:T.backButtonCallback),R==null||R.removeLoadingState(),Iv(S)}async loadStreamMedia({source:p,npoPlayer:S,errorCallback:j}){var U,J,G,Y,ee,q,oe;const{player:R,uiFactory:de,playerConfig:T,npoTagProps:f,streamOptions:c}=S;this.clearDeferredPlayNextRegistration();const v=++this.playNextRegistrationId,C=Bw(R,c==null?void 0:c.customDRMConfig),w=this.buildApiPayload({source:p,profile:C,playerConfig:T,streamOptions:c}),I=await pv(j,w);if(!I)return;let L=I.stream.streamURL;const z=Sv(I.stream.avType);if(f&&this.initQosMetrics({npoTagProps:f,source:L,drmType:(U=I.stream.drm)==null?void 0:U.type}),R.streamTrackService.isManifestTrackAvailable()){await R.streamTrackService.parseManifestForTracks(L);const ne=R.streamTrackService.getAlternateStreamURLForSafari();ne&&(L=ne)}R.subtitlesService.handleSubtitles(I),Ww(R),R.airPlayService.init(w,I),this.shouldConfigureDrm(I,c)&&zw({player:R,streamObject:I,customDRMConfig:c.customDRMConfig});const F=Kw({playerConfig:T,streamObjectMetaData:I.metadata,streamOptions:c}),N={...this.getMetadata(c,I.metadata),poster:F,avType:I.stream.avType};await R.load(L,{normalizedAvType:z,avType:I.stream.avType,isLiveStream:I.stream.isLiveStream,hasDvrWindow:I.stream.hasDvrWindow,streamProfile:I.stream.streamProfile,sourceProfile:I.stream.sourceProfile}),this.shouldConfigureDrm(I,c)&&R.airPlayService.clearSessionsForAirPlay(),Mv(R,N),(J=I.assets)!=null&&J.scrubbingThumbnail?await R.thumbnailService.initialize(I.assets.scrubbingThumbnail):R.thumbnailService.reset(),this.initCast({player:R,streamObject:I,parsedMetadata:N,npoTagProps:f});const P=R.getDuration();Tv({npoPlayer:S,source:I.metadata.prid,duration:P,streamAvType:z}),this.initOffset({player:R,isLiveStream:I.stream.isLiveStream,hasDvrWindow:I.stream.hasDvrWindow,streamOptions:c}),this.initTimeBound(R,c),R.streamTrackService.init(),(Y=(G=R.chapterSkipService)==null?void 0:G.setSkippableTypes)==null||Y.call(G,c.skippableChapters),(q=(ee=R.chapterSkipService)==null?void 0:ee.registerChapters)==null||q.call(ee,I.metadata.chapters),de==null||de.setMetadata(N,(c==null?void 0:c.infoPanelHTML)||""),(oe=de==null?void 0:de.setBackButtonCallback)==null||oe.call(de,c==null?void 0:c.backButtonCallback),de==null||de.removeLoadingState();const $=Av(S),d=Oh(I),M=()=>{v===this.playNextRegistrationId&&this.initPlayNext({player:R,streamOptions:c,duration:R.getDuration()})};if(c!=null&&c.playNext&&d){let ne=!1,ae=()=>{};const xe=()=>{ne||(ne=!0,ae(),M())};ae=()=>{R.off(xt.AllAdsCompleted,xe),R.off(xt.AdError,xe),this.deferredPlayNextCleanup===ae&&(this.deferredPlayNextCleanup=void 0)},R.on(xt.AllAdsCompleted,xe),R.on(xt.AdError,xe),this.deferredPlayNextCleanup=ae}else M();return $&&d?tA(R,I):(eA(R,I),Iv(S)),I}buildApiPayload({source:p,profile:S,playerConfig:j,streamOptions:R}){var L;const de=j.options,T="https://prod.npoplayer.nl/",f="npo-app-desktop",c=4,v="web",C=(R==null?void 0:R.endpoint)??T,w=(L=R==null?void 0:R.metadata)==null?void 0:L.ster,I=de==null?void 0:de.ster;return{baseURL:C,jwt:p,data:{profileName:S.profileName,drmType:S.drm,referrerUrl:globalThis.location.href,ster:{identifier:(w==null?void 0:w.identifier)??(I==null?void 0:I.identifier)??f,deviceType:(w==null?void 0:w.deviceType)??(I==null?void 0:I.deviceType)??c,player:v}}}}getMetadata(p,S){const j=p==null?void 0:p.metadata;return{title:(j==null?void 0:j.title)??(S==null?void 0:S.title)??"",broadcaster:(j==null?void 0:j.broadcaster)??(S==null?void 0:S.broadcaster)??"",description:(j==null?void 0:j.description)??(S==null?void 0:S.description)??"",ageRating:(j==null?void 0:j.ageRating)??(S==null?void 0:S.ageRating)??"",poster:(j==null?void 0:j.poster)??(S==null?void 0:S.poster)??"",nicam:(j==null?void 0:j.nicam)??(S==null?void 0:S.nicam)??[],prid:(j==null?void 0:j.prid)??(S==null?void 0:S.prid)??"",posterIsDefault:(j==null?void 0:j.poster)===void 0?(S==null?void 0:S.posterIsDefault)??!1:!1}}shouldConfigureDrm(p,S){var R;return!!(!!((R=p.stream.drm)!=null&&R.licenseUrl)||S!=null&&S.customDRMConfig)}initQosMetrics({npoTagProps:p,source:S,drmType:j}){p.qosMetrics&&(p.qosMetrics.reset(),p.qosMetrics.setMediaURL(S),j&&p.qosMetrics.setDrmType(j))}initCast({player:p,currentSource:S,streamObject:j,parsedMetadata:R,npoTagProps:de}){p.castService.updateCastingData({source:S,streamObject:j,metadata:R,npoTagSession:de!=null&&de.npoTag?String(de.npoTag.getSerializedSessionInfo()):void 0})}initOffset({player:p,isLiveStream:S,hasDvrWindow:j,streamOptions:R}){qw({player:p,isLiveStream:S,hasDvrWindow:j,startOffset:R==null?void 0:R.startOffset,liveOffset:S?R==null?void 0:R.liveOffset:void 0,liveProgramTime:S?R==null?void 0:R.liveProgramTime:void 0})}initTimeBound(p,S){S!=null&&S.timeBoundActions&&p.timeBoundActionsService.registerActions(S.timeBoundActions)}initPlayNext({player:p,streamOptions:S,duration:j}){S!=null&&S.playNext&&nA({player:p,playNext:S.playNext,duration:j})}clearDeferredPlayNextRegistration(){var p;(p=this.deferredPlayNextCleanup)==null||p.call(this),this.deferredPlayNextCleanup=void 0}}class iA{constructor(){be(this,"listeners",new Map)}emit(p,...S){const j=this.listeners.get(p);if(!j)return!1;for(const R of j)R(...S);return!0}on(p,S){return this.listeners.has(p)||this.listeners.set(p,new Set),this.listeners.get(p).add(S),this}once(p,S){const j=(...R)=>{this.off(p,j),S(...R)};return this.on(p,j),this}off(p,S){var j;return(j=this.listeners.get(p))==null||j.delete(S),this}}const Za=class Za{constructor(){be(this,"trackedContainers",new Map);be(this,"containerInteractionStates",new Map);be(this,"isListening",!1);be(this,"focusHandler",p=>{const S=p.target;if(S){for(const[j,R]of this.trackedContainers.entries())if(!j.contains(S)&&S!==j){this.containerInteractionStates.set(j,!0);for(const T of R)T(!0,S)}}});be(this,"clickHandler",p=>{const S=p.target;if(S){for(const[j,R]of this.trackedContainers.entries())if(!j.contains(S)&&S!==j){this.containerInteractionStates.set(j,!0);for(const T of R)T(!0,S)}}});be(this,"containerInteractionHandler",p=>{const S=p.currentTarget;if(!S)return;this.containerInteractionStates.set(S,!1);const j=this.trackedContainers.get(S);if(j)for(const R of j)R(!1,void 0)})}static getInstance(){return Za.instance||(Za.instance=new Za),Za.instance}startListening(){this.isListening||(document.addEventListener(kr.FocusIn,this.focusHandler),document.addEventListener(kr.Click,this.clickHandler,{capture:!0}),this.isListening=!0)}stopListening(){this.isListening&&(document.removeEventListener(kr.FocusIn,this.focusHandler),document.removeEventListener(kr.Click,this.clickHandler,{capture:!0}),this.isListening=!1)}trackContainer(p,S){this.trackedContainers.has(p)||(this.trackedContainers.set(p,new Set),this.containerInteractionStates.set(p,!1),p.addEventListener(kr.Click,this.containerInteractionHandler),p.addEventListener(kr.FocusIn,this.containerInteractionHandler)),this.trackedContainers.get(p).add(S),this.trackedContainers.size===1&&this.startListening()}untrackContainer(p,S){const j=this.trackedContainers.get(p);j&&(S?(j.delete(S),j.size===0&&this.removeContainer(p)):this.removeContainer(p))}removeContainer(p){this.trackedContainers.delete(p),this.containerInteractionStates.delete(p),p.removeEventListener(kr.Click,this.containerInteractionHandler),p.removeEventListener(kr.FocusIn,this.containerInteractionHandler),this.trackedContainers.size===0&&this.stopListening()}hasUserInteractedOutside(p){return this.containerInteractionStates.get(p)??!1}resetInteractionState(p){this.containerInteractionStates.set(p,!1);const S=this.trackedContainers.get(p);if(S)for(const j of S)j(!1,void 0)}isFormElement(p){return["INPUT","TEXTAREA","SELECT","BUTTON"].includes(p.tagName)||p.contentEditable==="true"}shouldAllowGlobalInteraction(p){const S=document.activeElement;if(p.contains(S)||S===p)return!0;const j=this.hasUserInteractedOutside(p),R=S&&this.isFormElement(S);return!j&&!R}destroy(){for(const p of this.trackedContainers.keys())this.removeContainer(p);this.trackedContainers.clear(),this.containerInteractionStates.clear(),this.stopListening()}};be(Za,"instance");let Nh=Za;class oA{constructor(p,S){be(this,"keyMappings",[]);be(this,"player");be(this,"container");be(this,"focusManager");be(this,"isAttached",!1);be(this,"playbackRateOptions");be(this,"defaultKeyCombos",{togglePlayPause:{key:" "},exitFullscreen:{key:"Escape"},volumeUp:{key:"ArrowUp"},volumeDown:{key:"ArrowDown"},seekForward:{key:"ArrowRight"},seekBackward:{key:"ArrowLeft"},toggleMute:{key:"m"},toggleFullscreen:{key:"f"},increasePlaybackRate:{key:">",shift:!0},decreasePlaybackRate:{key:"<",shift:!0}});be(this,"keydownHandler",p=>{if(this.shouldHandleKeyEvent())for(const S of this.keyMappings)this.matchesKeyCombo(p,S.combo)&&S.handler(p)});this.player=p,this.container=S,this.focusManager=Nh.getInstance(),this.setupKeyMappings()}setupKeyMappings(){this.keyMappings=[{combo:this.defaultKeyCombos.togglePlayPause,handler:p=>{p.preventDefault(),this.player.togglePlayPause()}},{combo:this.defaultKeyCombos.exitFullscreen,handler:p=>{p.preventDefault(),this.player.exitFullscreen()}},{combo:this.defaultKeyCombos.seekBackward,handler:p=>{p.preventDefault(),this.player.backward()}},{combo:this.defaultKeyCombos.seekForward,handler:p=>{p.preventDefault(),this.player.forward()}},{combo:this.defaultKeyCombos.volumeUp,handler:p=>{p.preventDefault(),this.volumeUp()}},{combo:this.defaultKeyCombos.volumeDown,handler:p=>{p.preventDefault(),this.volumeDown()}},{combo:this.defaultKeyCombos.toggleMute,handler:p=>{p.preventDefault(),this.player.toggleMute()}},{combo:this.defaultKeyCombos.toggleFullscreen,handler:p=>{p.preventDefault(),document.fullscreenElement?this.player.exitFullscreen():this.player.enterFullscreen()}},{combo:this.defaultKeyCombos.increasePlaybackRate,handler:p=>{p.preventDefault(),this.increasePlaybackRate()}},{combo:this.defaultKeyCombos.decreasePlaybackRate,handler:p=>{p.preventDefault(),this.decreasePlaybackRate()}}]}matchesKeyCombo(p,S){return p.key.toLowerCase()===S.key.toLowerCase()&&!!S.ctrl===p.ctrlKey&&!!S.alt===p.altKey&&!!S.shift===p.shiftKey&&!!S.meta===p.metaKey}shouldHandleKeyEvent(){return this.focusManager.shouldAllowGlobalInteraction(this.container)}volumeUp(){const p=this.player.getVolume(),S=Math.min(1,p+.1);this.player.setVolume(S)}volumeDown(){const p=this.player.getVolume(),S=Math.max(0,p-.1);this.player.setVolume(S)}increasePlaybackRate(){const p=[...this.playbackRateOptions??iv],S=this.player.getPlaybackRate(),j=p.find(R=>R>S)||p[p.length-1];this.player.setPlaybackRate(j)}decreasePlaybackRate(){const p=[...this.playbackRateOptions??iv],S=this.player.getPlaybackRate(),j=p.reverse().find(R=>R<S)||p[p.length-1];this.player.setPlaybackRate(j)}attach(){this.isAttached||(this.container.hasAttribute("tabindex")||this.container.setAttribute("tabindex","0"),document.addEventListener(kr.KeyDown,this.keydownHandler),this.isAttached=!0)}detach(){this.isAttached&&(document.removeEventListener(kr.KeyDown,this.keydownHandler),this.isAttached=!1)}addKeyMapping(p,S){this.keyMappings.push({combo:p,handler:j=>{j.preventDefault(),S(j)}})}removeKeyMapping(p){this.keyMappings=this.keyMappings.filter(S=>!(S.combo.key.toLowerCase()===p.key.toLowerCase()&&!!S.combo.ctrl==!!p.ctrl&&!!S.combo.alt==!!p.alt&&!!S.combo.shift==!!p.shift&&!!S.combo.meta==!!p.meta))}resetInteractionState(){this.focusManager.resetInteractionState(this.container)}hasUserInteractedOutsideContainer(){return this.focusManager.hasUserInteractedOutside(this.container)}isInputHandlerAttached(){return this.isAttached}destroy(){this.detach(),this.keyMappings=[],this.focusManager.destroy()}}class sA{constructor(p,S){be(this,"cache");be(this,"storageKey");be(this,"useLocalStorage");this.storageKey=p,this.cache={...S},this.useLocalStorage=!1;try{typeof globalThis<"u"&&globalThis.localStorage&&(this.useLocalStorage=!0)}catch(j){tr.handleSilentError(new zt({code:19018,message:"localStorage unavailable, using in-memory storage",original:j}))}if(this.useLocalStorage)try{const j=globalThis.localStorage.getItem(this.storageKey);if(j){const R=JSON.parse(j);R&&typeof R=="object"&&!Array.isArray(R)&&(this.cache={...this.cache,...R})}}catch(j){tr.handleSilentError(new zt({code:19019,message:`Failed to parse settings from localStorage '${this.storageKey}', using defaults`,original:j}))}this.persist()}set(p,S){this.cache[p]=S,this.persist()}get(p,S){return p in this.cache?this.cache[p]:S}persist(){if(this.useLocalStorage)try{globalThis.localStorage.setItem(this.storageKey,JSON.stringify(this.cache))}catch(p){tr.handleSilentError(new zt({code:19017,message:`Failed to save settings to localStorage '${this.storageKey}'`,original:p}))}}}class Pv{constructor(p,S){be(this,"player");be(this,"uiFactory");be(this,"errorManager");be(this,"version","2.0.0-beta.3");be(this,"container");be(this,"npoTagProps");be(this,"logEmitter");be(this,"playerConfig");be(this,"settingsStore");be(this,"inputHandler");be(this,"playerContext");be(this,"streamOptions",{});be(this,"ready");be(this,"loadStreamService");be(this,"loadGeneration",0);be(this,"cast");var j;this.container=p,this.playerConfig=S,this.settingsStore=S.settingsStore||new sA("npo-player-settings",{playbackRate:1,volume:1,muted:!1}),S.settingsStore=this.settingsStore,this.player=new Rw(this.container,S),this.npoTagProps=S.npoTag?{...S.npoTag,streamTracker:void 0,qosMetrics:void 0}:void 0,this.logEmitter=new iA,this.errorManager=new tr(this),this.inputHandler=new oA(this.player,this.container),this.loadStreamService=new rA,this.inputHandler.playbackRateOptions=S.playbackRateOptions,((j=S.options)==null?void 0:j.enableKeyboardControls)!==!1&&this.inputHandler.attach(),this.cast={isAvailable:()=>this.player.castService.isCastAvailable(),isActive:()=>this.player.castService.isCastActive(),startSession:()=>this.player.castService.startCastSession(),stopSession:()=>this.player.castService.stopCastSession()},this.uiFactory=S.uiFactory,this.ready=new Promise((R,de)=>{this.player.initialize().then(()=>{var T;(T=this.uiFactory)==null||T.init({container:this.container,player:this.player,options:S.options||{},errorManager:this.errorManager,retryCallback:this.retry.bind(this),inputHandler:this.inputHandler,logClick:this.logClick.bind(this)}),this.errorManager.setupErrorDebounce({player:this.player,mediaElement:this.player.getMediaElement(),setErrorStateFn:void 0,resetFn:void 0}),R(void 0)}).catch(T=>{const f=new zt({code:19001,message:"Error during player initialization",original:T});this.doError(f),de(f)})}),this.ready.catch(()=>{})}doError(p){var S;this.errorManager&&((S=this.logEmitter)==null||S.emit(Ih.ERROR,p.status,p.context),this.errorManager.handleError({errorEvent:p}))}async load(p,S){var R;await this.ready;const j=++this.loadGeneration;this.streamOptions=S||{},this.playerContext={source:p,playerConfig:this.playerConfig,streamObject:void 0,streamOptions:this.streamOptions},(R=S==null?void 0:S.npotag)!=null&&R.pageTracker&&this.npoTagProps&&(this.npoTagProps.pageTracker=S.npotag.pageTracker);try{const de=await this.loadStreamService.loadMedia({source:p,npoPlayer:this,errorCallback:T=>{this.doError(T)}});de&&(this.playerContext.streamObject=de)}catch(de){if((de==null?void 0:de.category)===7&&(de==null?void 0:de.code)===7e3&&j<this.loadGeneration)return;const T=new zt({code:19002,message:"Error loading media",original:de});throw this.doError(T),T}}async play(){await this.player.play()}pause(){this.player.pause()}async unload(){var S;(S=this.uiFactory)==null||S.resetUI();const p=this.player.getMediaElement();p&&(p.src="",p.load()),await this.player.unload()}async destroy(){var p,S;(p=this.inputHandler)==null||p.detach(),await this.unload(),this.uiFactory&&(this.uiFactory.destroy(),this.uiFactory=void 0),this.errorManager&&(this.errorManager.destroy(),this.errorManager=void 0),this.inputHandler&&(this.inputHandler.destroy(),this.inputHandler=void 0),this.player&&(this.player.destroy(),this.player=void 0),(S=this.npoTagProps)!=null&&S.cleanup&&(this.npoTagProps.cleanup(),this.npoTagProps.cleanup=void 0),this.container.innerHTML="",typeof globalThis<"u"&&(globalThis.NpoPlayer===this&&delete globalThis.NpoPlayer,globalThis.NpoAudioPlayer===this&&delete globalThis.NpoAudioPlayer,globalThis.NpoVideoPlayer===this&&delete globalThis.NpoVideoPlayer),this.playerContext=void 0}seek(p){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for seeking."});this.player.seek(p)}getCurrentTime(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for getting current time."});return this.player.getCurrentTime()}mute(){this.player.mute()}unmute(){this.player.unMute()}isMuted(){return this.player.isMuted()}isPlaying(){return this.player.isPlaying()}setVolume(p){this.player.setVolume(p)}getVolume(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for getting volume."});return this.player.getVolume()}getDuration(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for getting duration."});return this.player.getDuration()}isLive(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for checking live status."});return this.player.isLive()}isBuffering(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for checking buffering status."});return this.player.isBuffering()}getPlaybackRate(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for getting playback rate."});return this.player.getPlaybackRate()}setPlaybackRate(p){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for setting playback rate."});this.player.setPlaybackRate(p)}getSeekRange(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for getting seek range."});return this.player.getSeekRange()}seekToLiveEdge(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for seeking to live edge."});this.player.seekToLiveEdge()}getAvailableVideoQualities(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for getting available video qualities."});return this.player.streamTrackService.getAvailableVideoTracks()||[]}setVideoQuality(p){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for setting video quality."});this.player.streamTrackService.setVideoTrackByQuality(p)}on(p,S){return this.player.on(p,S)}off(p,S){return this.player.off(p,S)}once(p,S){return this.player.once(p,S)}enableKeyboardControls(){this.inputHandler.attach()}disableKeyboardControls(){this.inputHandler.detach()}isKeyboardControlsEnabled(){return this.inputHandler.isInputHandlerAttached()}addKeyboardShortcut(p,S){this.inputHandler.addKeyMapping(p,S)}async retry(p){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for retry."});return this.load(this.playerContext.source,this.streamOptions).then(()=>{typeof p=="number"&&p>0&&this.player.seek(p)}).catch(S=>{throw new zt({code:19003,message:"Error during retry.",original:S})})}logClick(p){var j,R;const S=this.container.id||"unknown";(R=(j=this.npoTagProps)==null?void 0:j.pageTracker)==null||R.click({...p,click_chapter_1:`player_${S}`})}}class aA extends Pv{constructor(p,S){S.mediaType||(S.mediaType=es.AUDIO),super(p,S),yv(this)}}class kv extends Pv{constructor(p,S){p.mediaType||(p.mediaType=es.VIDEO),super(S,p),yv(this)}}function uA({npoPlayer:Se,error:p,streamPosition:S}){const j=Se.npoTagProps.qosMetrics;if(!j)return;const R=Ow({streamErrorCode:p.code,streamPosition:S,qosMetrics:j});Se.npoTagProps.debugMode&&console.log("[NPOTag Error Event - Prepared]",{event:"error",props:R}),ns({npoPlayer:Se,event:"error",data:R})}const lA=Object.freeze(Object.defineProperty({__proto__:null,logErrorEvent:uA},Symbol.toStringTag,{value:"Module"}));Or.DRM_FAIRPLAY=Yx,Or.DRM_PLAYREADY=Xx,Or.DRM_WIDEVINE=$x,Or.LogEventType=Ih,Or.MarkerTypes=Gx,Or.MediaStates=Kr,Or.MediaType=es,Or.Modes=li,Or.NpoAudioPlayer=aA,Or.NpoVideoPlayer=kv,Or.PROFILE_DASH=Jx,Or.PROFILE_HLS=Qx,Or.PlayerEventNames=xt,Or.TimeBoundActionType=Aa,Or.default=kv,Object.defineProperties(Or,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});