ingParams",[X])}; g.o3=function(D){return(D=g.Km(D.vC()))?D.gX():{}}; g.sDz=function(D){D=(D=D.getVideoData())&&D.Z;return!!D&&!(!D.audio||!D.video)&&D.mimeType!=="application/x-mpegURL"}; g.eK=function(D,X,B){D=D.JF().element;let C=jU(D.children,V=>{V=Number(V.getAttribute("data-layer"));return B-V||1}); C<0&&(C=-(C+1));$I(D,X,C);X.setAttribute("data-layer",String(B))}; g.dP=function(D){const X=D.j();if(!X.aG)return!1;const B=D.getVideoData();if(!B||D.getPresentingPlayerType()===3)return!1;var C=(!B.isLiveDefaultBroadcast||X.X("allow_poltergust_autoplay"))&&!B.U7();C=B.isLivePlayback&&(!X.X("allow_live_autoplay")||!C);const V=B.isLivePlayback&&X.X("allow_live_autoplay_on_mweb");D=D.getPlaylist();D=!!D&&D.hasNext();var x=B.s7&&B.s7.playerOverlays||null;x=!!(x&&x.playerOverlayRenderer&&x.playerOverlayRenderer.autoplay);x=B.UW&&x;return!B.ypcPreview&&(!C||V)&&!g.XP(B.m1, "ypc")&&!D&&(!g.WU(X)||x)}; REz=function(D,X){D=UR1(D.app.jS().S);for(const B of D){D=B.getAvailableAudioTracks();let C=null;for(const V of D)if(V.getLanguageInfo().getId()===X){C=V;break}C&&B.BS(C,!0)}}; ZZ=function(){GL||(GL=new cms);return GL}; Q0=function(D,X){X?D.requestHeaders.Authorization=`Bearer ${X}`:delete D.requestHeaders.Authorization}; Lm=function(D){const X=D.A.getRootNode();return D.A.X("web_watch_pip")||D.A.X("web_shorts_pip")?Zt(X):document}; NA_=function(D){D.sourceElement&&(document.activeElement&&g.v3(D.element,document.activeElement)&&D.sourceElement.focus(),D.sourceElement.setAttribute("aria-expanded","false"),D.sourceElement=void 0);D.G.Z();D.S=void 0}; gP=function(D,X,B){D.lm()?D.Df():D.xt(X,B)}; g.Ev=function(D={},X=[],B=!1,C=!1){X.push("ytp-menuitem");"role"in D||(D.role="menuitem");B||"tabindex"in D||(D.tabindex="0");D={O:B?"a":"div",l0:X,B:D,W:[{O:"div",D:"ytp-menuitem-icon",QV:"{{icon}}"},{O:"div",D:"ytp-menuitem-label",QV:"{{label}}"},{O:"div",D:"ytp-menuitem-content",QV:"{{content}}"}]};C&&D.W.push({O:"div",D:"ytp-menuitem-secondary-icon",QV:"{{secondaryIcon}}"});return D}; g.nm=function(D,X){D.updateValue("label",X)}; wP=function(D){return D?g.mv(D):""}; SK=function(D,X,B,C){X in D.L||(B=new g.TL(B,C,{id:X,priority:2,namespace:"appad"}),D.api.i8([B],1),D.L[X]=B)}; P5=function(D,X){qOX(D,X).then(B=>{g.eg(X,void 0,void 0,B)})}; tc=function(D,X){X.forEach(B=>{P5(D,B)})}; KP$=function(D,X,B){if(!(B in X))return!1;X=X[B];Array.isArray(X)||(X=[X]);for(const C of X)X={CPN:D.api.getVideoData().clientPlaybackNonce},X=g.N9(C,X),g.eg(X,void 0,HT(FB(X,arY),X,!1,"Active View 3rd Party Integration URL")||HT(FB(X,YOY),X,!1,"Google/YouTube Brand Lift URL")||HT(FB(X,Irs),X,!1,"Nielsen OCR URL"));return!0}; qOX=function(D,X){return g.uA(D.api.j())&&sG(X)&&ze(X)?g.IM(D.api.j(),D.api.getVideoData().S()).then(B=>{let C;B&&(C={Authorization:`Bearer ${B}`});return C},void 0):CE()}; o1A=function(D){const X=!D.j().vK&&D.getPresentingPlayerType()!==3;return D.isFullscreen()||X}; Hl=function(D,X,B,C){var V=X^D;if((D&25)==D){for(var x=V^7288,y=[];++x-y[h[V^7217]]-(V^7192);)switch(x){case V^7170:x=V^7256;continue;case V^7267:x=V^7188;break;case V^7289:x=V^7191;continue;case V^7190:x=V^7329;case V^7235:x-=V^7170;default:y[h[V^7200]](String[h[V^7204]](x))}var m=y}(D-3&7)==2&&(WN(6,V^5707,B),m=B[h[V^5250]]);(D>>1&7)>=4&&D-3>>4<1&&(((0,B[V^494])((0,B[V^457])(B[V^505],B[V^462]),B[new C(h[V^426])/(V^522)],B[V^475],(0,B[V^492])(),B[V^427]),B[V^457])(B[V^505],B[V^506]),(0,B[V^437])(B[V^ 427]),(0,B[4])(B[V^475],(0,B[V^469])(),B[V^505]),m=[]);return m}; g.Ov=function(D,X,B=!1,C){const V=D.currentTarget;if(!B&&g.L9(D))return D.preventDefault(),!0;X.pauseVideo();D=V.getAttribute("href");g.Or(D,C,!0);return!1}; g.rP=function(D,X,B){if(jG(X.j())&&X.getPresentingPlayerType()!==2){if(g.L9(B))return X.isFullscreen()&&!X.j().externalFullscreen&&X.toggleFullscreen(),B.preventDefault(),!0}else{const C=g.L9(B);C&&X.pauseVideo();g.Or(D,void 0,!0);C&&(g.rc(D),B.preventDefault())}return!1}; eEX=function(D){D=Dm.includes("en")?D.X("delhi_modern_web_player_icons")?f9():{O:"svg",B:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{O:"path",GD:!0,B:{d:"M11,11 C9.89,11 9,11.9 9,13 L9,23 C9,24.1 9.89,25 11,25 L25,25 C26.1,25 27,24.1 27,23 L27,13 C27,11.9 26.1,11 25,11 L11,11 Z M17,17 L15.5,17 L15.5,16.5 L13.5,16.5 L13.5,19.5 L15.5,19.5 L15.5,19 L17,19 L17,20 C17,20.55 16.55,21 16,21 L13,21 C12.45,21 12,20.55 12,20 L12,16 C12,15.45 12.45,15 13,15 L16,15 C16.55,15 17,15.45 17,16 L17,17 L17,17 Z M24,17 L22.5,17 L22.5,16.5 L20.5,16.5 L20.5,19.5 L22.5,19.5 L22.5,19 L24,19 L24,20 C24,20.55 23.55,21 23,21 L20,21 C19.45,21 19,20.55 19,20 L19,16 C19,15.45 19.45,15 20,15 L23,15 C23.55,15 24,15.45 24,16 L24,17 L24,17 Z", fill:"#fff"}}]}:D.X("delhi_modern_web_player_icons")?X8_():{O:"svg",B:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},W:[{O:"path",GD:!0,B:{d:"M11,11 C9.9,11 9,11.9 9,13 L9,23 C9,24.1 9.9,25 11,25 L25,25 C26.1,25 27,24.1 27,23 L27,13 C27,11.9 26.1,11 25,11 L11,11 Z M11,17 L14,17 L14,19 L11,19 L11,17 L11,17 Z M20,23 L11,23 L11,21 L20,21 L20,23 L20,23 Z M25,23 L22,23 L22,21 L25,21 L25,23 L25,23 Z M25,19 L16,19 L16,17 L25,17 L25,19 L25,19 Z",fill:"#fff"}}]};D.D="ytp-subtitles-button-icon"; return D}; dRA=function(D){return Dm.includes("en")?D?f9():{O:"svg",B:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{O:"path",B:{d:"M6,14v-4c0-0.55,.45-1,1-1h3c0.55,0,1,.45,1,1v1H9.5v-0.5h-2v3h2V13H11v1c0,.55-0.45,1-1,1H7C6.45,15,6,14.55,6,14z M14,15h3c0.55,0,1-0.45,1-1v-1h-1.5v0.5h-2v-3h2V11H18v-1c0-0.55-0.45-1-1-1h-3c-0.55,0-1,.45-1,1v4C13,14.55,13.45,15,14,15z M20,4H4v16h16V4 M21,3v18H3V3.01C3,3,3,3,3.01,3H21L21,3z",fill:"white"}}]}:D?{O:"svg",B:{fill:"none",height:"24",viewBox:"0 0 24 24", width:"24"},W:[{O:"path",B:{d:"M21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V19L1.01 19.20C1.05 19.66 1.26 20.08 1.58 20.41C1.91 20.73 2.33 20.94 2.79 20.99L3 21H21L21.20 20.98C21.66 20.94 22.08 20.73 22.41 20.41C22.73 20.08 22.94 19.66 22.99 19.20L23 19V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01ZM3 19V5H21V19H3ZM8 11H6C5.73 11 5.48 11.10 5.29 11.29C5.10 11.48 5 11.73 5 12C5 12.26 5.10 12.51 5.29 12.70C5.48 12.89 5.73 13 6 13H8C8.26 13 8.51 12.89 8.70 12.70C8.89 12.51 9 12.26 9 12C9 11.73 8.89 11.48 8.70 11.29C8.51 11.10 8.26 11 8 11ZM18 11H12C11.73 11 11.48 11.10 11.29 11.29C11.10 11.48 11 11.73 11 12C11 12.26 11.10 12.51 11.29 12.70C11.48 12.89 11.73 13 12 13H18C18.26 13 18.51 12.89 18.70 12.70C18.89 12.51 19 12.26 19 12C19 11.73 18.89 11.48 18.70 11.29C18.51 11.10 18.26 11 18 11ZM18 15H16C15.73 15 15.48 15.10 15.29 15.29C15.10 15.48 15 15.73 15 16C15 16.26 15.10 16.51 15.29 16.70C15.48 16.89 15.73 17 16 17H18C18.26 17 18.51 16.89 18.70 16.70C18.89 16.51 19 16.26 19 16C19 15.73 18.89 15.48 18.70 15.29C18.51 15.10 18.26 15 18 15ZM12 15H6C5.73 15 5.48 15.10 5.29 15.29C5.10 15.48 5 15.73 5 16C5 16.26 5.10 16.51 5.29 16.70C5.48 16.89 5.73 17 6 17H12C12.26 17 12.51 16.89 12.70 16.70C12.89 16.51 13 16.26 13 16C13 15.73 12.89 15.48 12.70 15.29C12.51 15.10 12.26 15 12 15Z", fill:"white"}}]}:{O:"svg",B:{height:"24",viewBox:"0 0 24 24",width:"24"},W:[{O:"path",B:{d:"M5,11h2v2H5V11z M15,15H5v2h10V15z M19,15h-2v2h2V15z M19,11H9v2h10V11z M22,6H2v14h20V6z M3,7h18v12H3V7z",fill:"white"}}]}}; Xe=function(){return{O:"div",D:"ytp-spinner-container",W:[{O:"div",D:"ytp-spinner-rotator",W:[{O:"div",D:"ytp-spinner-left",W:[{O:"div",D:"ytp-spinner-circle"}]},{O:"div",D:"ytp-spinner-right",W:[{O:"div",D:"ytp-spinner-circle"}]}]}]}}; Bo=function(D){if(document.createRange){const X=document.createRange();X&&(X.selectNodeContents(D),D=window.getSelection())&&(D.removeAllRanges(),D.addRange(X))}}; Glu=function(D,X){const B=X.getAudioTrack();return B.id!=="und"?g.gu(D,C=>C.Se?.name===B.getLanguageInfo().name):D}; Z6A=function(D,X){return X.getUserAudio51Preference()?g.gu(D,CK):D}; QDB=function(D){return D.map(X=>new Qy(X.id,"application/x-mpegURL",{Se:X.Se}))}; LP1=function(D){return g.ys("yt-player-drc-pref")?g.gu(D,V$):D}; g1b=function(D){return QOY()===2?g.gu(D,xS):D}; E1A=function(D){return LW_()===1?g.gu(D,y$):D}; y$=function(D){return D.audio?.audioQuality==="AUDIO_QUALITY_HIGH"&&!CK(D)}; V$=function(D){return D.audio?.L===!0}; CK=function(D){return D.S()}; n11=function(D){return D.Se!==void 0}; xS=function(D){return D.audio?.Z===!0}; mD=function(D,X){if(D.length<2)return!1;const B=X(D[0]);return D.some(C=>X(C)!==B)}; wzu=function(D,X){D=new Set(D.map(X));D.delete(void 0);return D.size>=2}; TAb=function(D){return D.A.j().X("web_player_autonav_use_server_provided_state")&&D.HA().SN()}; SO_=function(D){D.isChecked=D.isChecked;D.oa("ytp-autonav-toggle-button").setAttribute("aria-checked",String(D.isChecked));const X=D.isChecked?"Autoplay is on":"Autoplay is off";D.A.j().X("player_tooltip_data_title_killswitch")?D.update({title:X,label:X}):D.update({"data-tooltip-title":X,label:X});D.A.LH()}; th9=function(D){D.menuItem||(D.menuItem=new Prz(D.api),g.U(D,D.menuItem),D.menuItem.fv(D.L))}; O6Y=function(D){var X=D.api.X("delhi_modern_web_player_compact_controls"),B=g.vg(D.api.j().experiments,"delhi_modern_web_player_responsive_compact_controls_threshold"),C=X||B>0&&D.api.getPlayerSize().width<=B;X=D.api.getRootNode();X.classList.toggle("ytp-delhi-modern-compact-controls",C);B=C?"40px":"48px";const V=C?"8px":"12px",x=C?"56px":"72px",y=C?"56px":"64px";let m=C?"48px":"56px",l=C?"12px":"20px";C=C?"72px":"96px";D.api.X("delhi_modern_web_player_big_mode_consistent_pill_height")&&(m="56px", l="12px",C="80px");X.style.setProperty("--yt-delhi-pill-height",B);X.style.setProperty("--yt-delhi-pill-top-height",V);X.style.setProperty("--yt-delhi-bottom-controls-height",x);X.style.setProperty("--yt-delhi-bottom-controls-height-xsmall-width-mode",y);X.style.setProperty("--yt-delhi-big-mode-pill-height",m);X.style.setProperty("--yt-delhi-big-mode-pill-top-height",l);X.style.setProperty("--yt-delhi-big-mode-bottom-controls-height",C)}; rm9=function(D,X){for(const B of X){X=Number(B.playbackPosition?.utcTimeMillis)/1E3;const C=`embargo_${X}`;D.api.addUtcCueRange(C,X,X+Number(B.duration?.seconds),"embargo",!1);B.onEnter&&(D.L[C]=B.onEnter.filter(D.Z))}}; XXV=function(D){var X=D.api.getRootNode();X=D.api.getWebPlayerContextConfig().embedsEnableEmc3ds?X.parentElement?.parentElement||X:X;D.L=new Dyz(X,B=>{B!=null&&(D.api.j().FN=B,D.api.j().nD="EMBEDDED_PLAYER_VISIBILITY_FRACTION_SOURCE_INTERSECTION_OBSERVER")}); g.U(D,D.L);D.events.C(D.api,"videoStatsPingCreated",B=>{var C=D.L;C=C.L==null?null:Math.round(C.L*100)/100;B.inview=C!=null?C:void 0;C=D.api.getPlayerSize();if(C.height>0&&C.width>0){C=[Math.round(C.width),Math.round(C.height)];const V=g.zV();V>1&&C.push(V);C=C.join(":")}else C=void 0;B.size=C})}; B8X=function(D){return(D?.messageRenderers||[]).find(X=>!!X.timeCounterRenderer)?.timeCounterRenderer||null}; C0Y=function(D){var X=Math,B=X.round;const C=Math.min((0,g.Q)()-D.U,D.Z);X=B.call(X,(D.Z-C)/1E3);D.updateValue("duration",wk({seconds:X}));X<=0&&D.L?D.stopTimer():D.L&&D.L.start()}; VtX=function(D,X){D.L||(D.Z=X,D.U=(0,g.Q)(),D.L=new g.Td(()=>{C0Y(D)},null),C0Y(D))}; yUs=function(D,X){let B=0;for(B=0;B{const y=g.Z(x?.onTap,aV);y&&g.pm(D.api,"innertubeCommand",y)}); D.L[B]=C}for(;B0&&V&&(B=Math.max(B,D.policy.aC));return lYV(D,B,X)}; fK=function(D){return $S(D)/D.playbackRate}; uq=function(D,X,B){const C=D.policy.playbackStartPolicy.resumeMinReadaheadPolicy||[],V=D.policy.playbackStartPolicy.startMinReadaheadPolicy||[];D=Infinity;X=X&&C.length>0?C:V;for(const x of X)X=x.minReadaheadMs||0,B<(x.minBandwidthBytesPerSec||0)||D>X&&(D=X);return D=0?X[V]:null;var v;if(v=B){v=C;var f=V,u=B.startTimeMs+B.durationMs,p=v.startTimeMs+v.durationMs;if(v.startTimeMs-u>D.L)v=!1;else if(Wcu(D,B.formatId, v.formatId))B.durationMs=Math.max(u,p)-B.startTimeMs,B.WU=Math.max(B.WU,v.WU),v=!0;else if(Math.abs(B.startTimeMs-v.startTimeMs)<=D.L)if(B.durationMs>v.durationMs+D.L){f=B.formatId;var M=B.HK,k=B.WU;B.formatId=v.formatId;B.durationMs=v.durationMs;B.HK=v.HK;B.WU=v.WU;v.formatId=f;v.startTimeMs=p;v.durationMs=u-p;v.HK=M;v.WU=k;v=!1}else B.formatId=v.formatId,v=!0;else u>v.startTimeMs&&(u>p&&(X.splice(f+1,0,{formatId:B.formatId,startTimeMs:p,durationMs:u-p,HK:v.WU+1,WU:B.WU}),D.logger&&D.logger({splitOldStart:B.startTimeMs?.toFixed(3), splitOldEnd:u?.toFixed(3),splitNewStart:v.startTimeMs?.toFixed(3),splitNewEnd:p?.toFixed(3)})),B.durationMs=v.startTimeMs-B.startTimeMs,B.WU=v.HK-1),v=!1}v?C=B:(V+=1,X.splice(V,0,C));B=0;for(v=V+1;v=M+u.L?u=!0:k+u.LB.startTimeMs-C.startTimeMs); return D>=0?D:-D-2}; fYV=function(D,X,B){if(D.logger){var C=[];for(let V=0;V0&&(0,g.Q)()-D.K<5E3&&(D.logger&&D.logger({dend:C.info.AZ()}),B=Xr$(B,V,V+.01))}D.policy.cY&&D.logger&&D.logger({cbri:`${D.Z}`});C=[];for(var x=V=0;V=y){const p={...D.Xw[x]};var l=D.gw.G.get(zo(D.Xw[x].formatId)),W=Math.max(m,y);y=l.index.iW(W+ D.L/1E3);m=l.index.getStartTime(y);var v=y+ +(Math.abs(m-W)>D.L/1E3);W=v+D.V;v=l.index.getStartTime(v)*1E3;x!==D.Z||X?(p.HK=W,p.startTimeMs=v):(D.logger&&D.logger({pEvict:"1",og:p.startTimeMs,adj:m*1E3}),p.HK=y+D.V,p.startTimeMs=m*1E3);y=D.U?.info.duration||11;x===D.Z&&fD.L/1E3);y=m+D.V;l=l.index.I9(m)*1E3;p.WU=y;p.durationMs=l-p.startTimeMs;p.HK<=p.WU&&C.push(p)}u{X.push({...x})}); const C=D.vZ.gs();let V=D.Z;for(const x of C)V=vZ9(D,X,B,x,V);X.forEach(x=>{x.startTimeMs&&(x.startTimeMs+=D.timestampOffset*1E3)}); return{Xw:X,Av:B}}; Wcu=function(D,X,B){return X.itag!==B.itag||X.xtags!==B.xtags?!1:D.gw.ao||X.lmt===B.lmt}; Mtb=function(D,X,B,C,V){if(!X.VV.L()){if(!(V=B===0||!!X.Z.length&&X.Z[0]instanceof pK))a:{if(X.Z.length&&(V=X.Z[0],V instanceof hJ&&V.mO&&V.EQ)){V=!0;break a}V=!1}V||D.policy.L||JJ(X);return B}const x=Mt(X,B);if(!isNaN(x))return x;if(D.loader.Y6(B*1E3))return B;V.DD?D.policy.f2&&(D=AJ(D.loader,X),hTB(X.U,B+D,!0)):(X.WN(),D.loader.NN(!1,`sta_${+X.VV.info.Y4()}`));return C&&(D=OO(C.UD(),B),!isNaN(D))?(jE(X,D+JU9,V),B):jE(X,B,V)}; AU_=function(D,X,B){if(!D.policy.S){D=X.VV.index;var C=X.L.Xy;D.Qw(C)||B&&B.Xy===C?(X.V=!D.Qw(C),X.J=!D.Qw(C)):(X.V=!0,X.J=!0)}}; HDV=function(D){const X=Math.max(D.videoTrack.U.U||0,D.audioTrack.U.U||0);jys(D.videoTrack);jys(D.audioTrack);D.policy.S||fUs(D.gw);D.gw.isManifestless&&!D.policy.S&&(D.L=!0,D.Z=0);var B=D.loader;if(!B.policy.Z3||B.policy.Cv)B.currentTime=X;D.V=!0;D.U=new Y8;return D.U}; zf=function(D){var X=D.videoTrack.G!==-1,B=D.audioTrack.G!==-1;if(!X||!B)if(X=!X&&Ho(D.videoTrack),B=!B&&Ho(D.audioTrack),X||B)if(B=X?D.videoTrack:D.audioTrack,X=X?D.audioTrack:D.videoTrack,B.G=Ho(B).info.Xy,D.policy.S&&(X.G=Ho(X)?.info.pv()||X.G),X.G!==-1){let C=Math.max(X.VV.index.getStartTime(X.G),B.VV.index.getStartTime(B.G));Ak(D.gw)&&Math.abs(C-Ak(D.gw))>432E3&&pi1(D.gw);D.Z&&(C=D.Z,D.Z=0);g.oW(()=>{D.policy.S||Fe(D,C,102)}); D.loader.T2("initManifestlessSync",{st:C,ost:C+D.loader.MA(),a:D.audioTrack.G,v:D.videoTrack.G});D.U&&(D.U.resolve(C+.1),D.U=null);D.policy.S&&Fe(D,C,102)}}; Fcs=function(D,X,B){if(!D.isSeeking())return-1;B=(B?D.videoTrack:D.audioTrack).VV.index;const C=B.iW(D.targetTime);return(B.Qw(D.gw.gB)||X.Xy===D.gw.gB)&&C{zf(D)}); else{if(D.isSeeking()&&D.targetTime){const x=Fcs(D,X,B);if(x!==-1){D.videoTrack.V=!1;D.audioTrack.V=!1;D.L=!0;D.Z=0;g.oW(()=>{D.loader.T2("seekreason",{reason:"behindMinSq",tgt:x});Fe(D,x)}); return}}B?D.videoTrack.J=!1:D.audioTrack.J=!1;var V=!D.L;Mt(D.videoTrack,D.targetTime)>=0&&Mt(D.audioTrack,D.targetTime)>=0&&V?((D.videoTrack.V||D.audioTrack.V)&&D.loader.T2("iterativeSeeking",{status:"done",count:D.seekCount}),D.videoTrack.V=!1,D.audioTrack.V=!1):C&&g.oW(()=>{if(D.L||!D.policy.xU)zf(D);else{var x=X.startTime,y=X.duration;if(!D.policy.S){var m=D.videoTrack.G!==-1&&D.audioTrack.G!==-1,l=!D.videoTrack.J&&!D.audioTrack.J;(B?D.videoTrack.V:D.audioTrack.V)&&m&&l&&(D.targetTime>=x&&D.targetTime< x+y+.1?((B?D.videoTrack:D.audioTrack).V=!1,D.videoTrack.V||D.audioTrack.V||(D.loader.T2("iterativeSeeking",{status:"done",target:x,originalTime:x+D.loader.MA(),count:D.seekCount}),D.seekCount=0)):D.seekCount<8?(D.seekCount++,D.loader.T2("iterativeSeeking",{status:"inprogress",count:D.seekCount,target:D.targetTime,actual:x,duration:y,isVideo:B}),D.seek(D.targetTime,{})):(D.loader.T2("iterativeSeeking",{status:"incomplete",count:D.seekCount,target:D.targetTime,actual:x}),D.seekCount=0,D.videoTrack.V= !1,D.audioTrack.V=!1,bq(D.loader,x+.1,{aF:!0,EX:"chunkSelectorSynchronizeMedia",DW:!0})))}}})}}; kS=function(D,X,B){bD$(D.qA,X);D.O7&&(D.O7.add(Math.ceil(X)-Math.ceil(D.Y)),D.O7.add(Math.max(0,Math.ceil(B/1024)-Math.ceil(D.V/1024))));const C=X-D.Y,V=B-D.V;D.Ci=V;D.Lr=Math.max(D.Lr,V/(C+.01)*1E3);D.Y=X;D.V=B;D.b0&&B>D.b0&&k4_(D)}; k4_=function(D){D.YU=Math.max(D.YU,D.V-D.dJ);D.G2=Math.max(D.G2,D.Y-D.pQ);D.b0=0}; syu=function(D,X){D.url=X;window.performance&&!performance.onresourcetimingbufferfull&&(performance.onresourcetimingbufferfull=()=>{performance.clearResourceTimings()})}; Uys=function(D){D.HZ=D.L+D.snapshot.delay*1E3;D.Cr=!1}; U7=function(D,X,B){if(!D.on){X=Math.max(X,.01);var C=D.Yl?Math.max(X,B/D.Yl):X,V=D.qA.Z.U;V&&(C=X,D.Yl&&(C=Math.max(X,B/D.Yl*V)));s7(D.qA,X,B,C)}}; RTV=function(D){const X=D.ww||D.D3;return X?D.snapshot.delay+Math.min(D.eS,(D.J-D.pv)/1E3)+X:D.Jx}; cUs=function(D){return(D.K-D.L)/1E3}; R7=function(D,X){if(D.SD&&D.Xy!==void 0&&D.UI!==void 0){var B=Math,C=B.min,V=D.S;var x=D.SD;var y=D.L;if(N81(x,D.Xy))x=X;else{var m=0;x.LD&&(m=.2);x=y+(x.eS+m)*1E3}D.S=C.call(B,V,x);B=Math;C=B.min;V=D.Z3;x=D.SD;y=D.L;m=qI$(x,D.Xy,D.UI);m!==2&&(X=m?X:y+x.eS*1E3,x.LD&&(X+=x.eS*1E3));D.Z3=C.call(B,V,X);D.S<=D.L?Uys(D):(D.HZ=D.S,D.Cr=!0)}}; aYY=function(D,X){if(X+1<=D.totalLength){var B=z0(D,X);B=B<128?1:B<192?2:B<224?3:B<240?4:5}else B=0;if(B<1||!(X+B<=D.totalLength))return[-1,X];if(B===1)D=z0(D,X++);else if(B===2)B=z0(D,X++),D=z0(D,X++),D=(B&63)+64*D;else if(B===3){B=z0(D,X++);var C=z0(D,X++);D=z0(D,X++);D=(B&31)+32*(C+256*D)}else if(B===4){B=z0(D,X++);C=z0(D,X++);const V=z0(D,X++);D=z0(D,X++);D=(B&15)+16*(C+256*(V+256*D))}else B=X+1,D.focus(B),jz(D,B,4)?D=dE_(D).getUint32(B-D.U,!0):(C=z0(D,B+2)+256*z0(D,B+3),D=z0(D,B)+256*(z0(D,B+ 1)+256*C)),X+=5;return[D,X]}; YIb=function(D){return g.P1(D.info.dw,X=>X.type===3)}; RS$=async function(D,X){return X?(new x8(D.Z)).encrypt(X,D.L):X}; aDo=async function(D,X){return X?await (new x8(D.Z)).decrypt(X,D.L):X}; IYz=function(D){D.U.read().then(D.Y,D.onError).then(void 0,sW)}; co=function(D,X,B,C,V){if(pl(11,6857,D.FI))return new KcV(D,B);D=D.hO();return C?qDB()?new oZV(D,X,B,V):new eTV(D,X,B,V):new dyX(D,B,V)}; Nt=function(D,X,B){D.L&&(MA(D.L,X),X=D.L,D.L=null);let C=0,V=0;for(const l of D.dw){if(l.range&&C+l.Z<=D.Z){C+=l.Z;continue}if(Nb(l)&&!B&&D.Z+X.totalLength-V=400?(D.lastError="net.badstatus",!0):V?(D.lastError="ump.spsrejectfailure",!0):B||C?!1:(D.lastError=X===204?"net.nocontent":"net.connect",!0)}; I7=function(D,X){if(D.policy.C_)return!1;const B=X.getResponseHeader("content-type"),C=X.Eh();D=!C||C<=D.policy.J5;return(!X.sC()||!B||B.indexOf("text/plain")!==-1)&&D}; Qyo=function(D,X){let B="";X=X.Aw();X.totalLength<=D.policy.J5&&(D=H6(X),D=kb(D),B=Jg(D)?D:"");return B}; Lcu=function(D){const X=D.timing.N();X.shost=Hl(21,5307,D.YB.FI);D.policy.e1&&D.policy.Tn&&(X.csrc=1);return X}; gZu=function(D,X){return D?.maxWidth>X?.maxWidth||D?.maxHeight>X?.maxHeight}; EZA=function(D,X){for(const B of X.keys()){const C=X.get(B);if(C.length===0)continue;g.HA(C,(y,m)=>m.maxFramerate-y.maxFramerate); const V=[C[0]];let x=0;for(let y=1;yD.L||B.push(C);return B}; KK=function(D,X,B){let C=T8V[D]||[];B.X("html5_shorts_onesie_mismatched_fix")&&(C=SI1[D]||[]);X.push(...C);B.X("html5_early_media_for_drm")&&X.push(...(P0u[D]||[]))}; Byz=function(D,X){const B=g.om(D);var C=D.j();const V=C.G;C=C.X("html5_shorts_onesie_mismatched_fix");const x=D.sQ();if(C){if(!V.L){if(x&&o7)return o7;if(eE)return eE}}else if(eE&&!V.L)return eE;const y=[],m=[],l={};var W=dn.concat(tt$);C&&(W=dn.concat(ODY));D.X("html5_early_media_for_drm")&&(W=W.concat(rUY),D.X("allow_vp9_1080p_mq_enc")&&W.push(DGB));const v=[...Xn$];D.X("html5_iamf_audio_onesie_fmt")&&v.push(["773"]);for(var f of W){W=!1;for(const p of f){var u=oM(p,x&&C);if(!u||!u.video)continue; if(u.L()&&!B.U7&&u.video.qualityOrdinal>B.Ya)continue;const M=g.vg(D.j().experiments,"html5_drm_byterate_soft_cap");if(M>0&&OVY(u)&&u.Zf>M)continue;if(W){y.push(p);KK(p,y,D);continue}u=Ra(B,u,V);u===!0?(W=!0,y.push(p),KK(p,y,D)):l[p]=u}}for(const p of v)for(const M of p){f=p69(M);if(!f||!f.audio||!D.X("html5_onesie_51_audio")&&f.S())continue;f=Ra(B,f,V);if(f===!0){m.push(M);KK(M,m,D);break}else l[M]=f}if(!D.X("html5_enable_audio_quality_setting")){D=["141","774"];for(const p of D)m.includes(p)&&(g.yN(m, p),l[p]="blkhqa")}B.L&&X("orfmts",l);if(C)return V.L&&(V.L=!1,o7=eE=void 0),x?o7={video:y,audio:m}:eE={video:y,audio:m};eE={video:y,audio:m};V.L=!1;return eE}; g.xGA=function(D,X,B){const C=B.G,V=[],x=[];var y=B.X("html5_shorts_onesie_mismatched_fix");D=D.sQ();var m=dn.concat(tt$);y&&(m=dn.concat(ODY));B.X("html5_early_media_for_drm")&&(m=m.concat(rUY),B.X("allow_vp9_1080p_mq_enc")&&m.push(DGB));const l=[...Xn$];B.X("html5_iamf_audio_onesie_fmt")&&l.push(["773"]);for(const W of m)for(const v of W){m=oM(v,D&&y);if(!m||!m.video)continue;const f=g.vg(B.experiments,"html5_drm_byterate_soft_cap");if(!(f>0&&OVY(m)&&m.Zf>f)&&Ra(X,m,C)===!0){V.push({videoCodec:Cgu[Wa[v]], maxWidth:m.video.width,maxHeight:m.video.height,maxFramerate:m.video.fps});break}}for(const W of l)for(const v of W)if((y=p69(v))&&y.audio&&(B.X("html5_onesie_51_audio")||!y.S())&&Ra(X,y,C)===!0){x.push({audioCodec:VVV[Wa[v]],numChannels:y.audio.numChannels});break}return{videoFormatCapabilities:V,audioFormatCapabilities:x}}; lMo=function(D){const X={};var B=D.kU;const C=D.qF,V=D.qA,x=B.getVideoData();var y=WG(0);var m=B.getVisibilityState();C.X("html5_enable_audio_quality_setting")&&(X.wI=C.wI);y&&(X.K$=y,X.lastManualDirection=KWo(),y=OvA()||0,y>0&&(y=(C.X("html5_use_date_now_for_local_storage")?Date.now():(0,g.Q)())-y,C.X("html5_use_date_now_for_local_storage")?y>0&&(X.timeSinceLastManualFormatSelectionMs=y):X.timeSinceLastManualFormatSelectionMs=y));if(V.Z3||C.X("html5_sabr_ugc_vod_web_embedded_client_default_bandwidth_on_iphone")&& ke)y=C.X("html5_disable_bandwidth_cofactors_for_sabr_live")?!!D.R6?.bv:!1,X.Jz=lq(V,!y);var l=g.Y1.medium,W=Math.floor(l*16/9);(y=x.sQ())||(x.L&&x.U&&x.U.videoInfos.length!==0?(y=x.U.videoInfos[0],y=!!y.video&&y.video.width0&&(X.Xd===0||X.Xd>m)&&(X.Xd=m,B.T2("lsl",{q:m}));m=(C.X("html5_fix_drm_license_constraint_for_tv_and_onesie")?D.Di:x.fetchType==="onesie")||x.ZD?[{trackType:1,isHdr:!1},{trackType:2,isHdr:!1},{trackType:2,isHdr:!0},{trackType:3, isHdr:!1},{trackType:3,isHdr:!0},{trackType:4,isHdr:!1},{trackType:4,isHdr:!0},{trackType:5,isHdr:!1},{trackType:5,isHdr:!0}]:[{trackType:1,isHdr:!1},{trackType:2,isHdr:!1},{trackType:2,isHdr:!0}];X.jY=D.authorizedFormats&&D.authorizedFormats.length>0?{authorizedFormats:D.authorizedFormats}:{authorizedFormats:m};D.sabrLicenseConstraint&&(X.jY.sabrLicenseConstraint=D.sabrLicenseConstraint);if(C.X("html5_onesie_media_capabilities")||n8(x))X.Y_=3;C.X("html5_onesie_audio_only_playback")&&Yd(x)&&(X.Y_= 1);D.R6?.uY&&D.eb&&(X.Y_=X.Y_===void 0?7:X.Y_|4);m=x.Cv?x.Cv:g.om(x);C.X("html5_onesie_media_capabilities")&&(X.mediaCapabilities=g.xGA(x,m,C));if(D.R6?.O7()){W=D.Sr;v=D.hs;var f=D.R6?.Zf;y=[];l=[];const N=new Map;var u=x.KH.L;for(var p of u.values())if(p.Y4)l.push({audioCodec:VVV[p.NF],numChannels:p.numChannels,spatialCapabilityBitmask:mG1[p.NF]});else{u=Cgu[p.NF];var M=p.maxBitrateBps||0,k=f?f*8:0;M={videoCodec:u,maxWidth:v?854:p.maxWidth||0,maxHeight:v?480:p.maxHeight||0,maxFramerate:p.maxFramerate|| 0,is10BitSupported:p.Xm||!1,maxBitrateBps:k&&M?Math.min(k,M):k||M,efficient:!0};u=`${u}_${p.Xm}`;k=N.get(u)||[];k.push(M);N.set(u,k)}y=EZA(y,N);p=W?[...W]:[];x.X("html5_ssff_denylist_opus_low")&&p.push(249,350);g.om(x);X.mediaCapabilities={videoFormatCapabilities:y,audioFormatCapabilities:l,hdrModeBitmask:3,perPlaybackAttributes:p.length?{itagDenylist:p}:{}}}D.R6?.L&&(X.Dt=m.Dt,X.Ya=D.R6?.Ya);C.Ni&&(X.MS=C.Ni);X.gL=D.RT;X.Fm=D.Fm;X.W_=D.W_;X.Yq=D.Yq;D.He&&(X.Dc=(0,g.Q)()-D.He);D.Pa&&(X.Pa=D.Pa);f8|| (X.kM=!0);p=Wo(V)*1E3;p>0&&(X.cn=p);D.R6?.DI&&D.xQ&&D.xQ0?B:V.interruptions[0]||0;D.R6?.Lr&&(X.Bt=D.Bt);C.ww&&(X.audioTrackId=C.ww);x.vN()&&!X.audioTrackId&&(C.X("html5_fill_default_mosaic_audio_track_id")||(D=Wdz(x),X.audioTrackId=D),x?.T2("misstrkchg", {"default":X.audioTrackId}));if(D=navigator.connection?.type||"")X.detailedNetworkType=iY1[D]||iY1.other;!C.X("html5_enable_voice_boost")||x.sQ()||x.isAd()||(X.sK=C.gI);return X}; Gf=function(D,X,B,C,V,x,y){const m={};X&&(m.X1=X);if(!D)return m;m.playbackCookie=B?.playbackCookie;V&&(m.wL=V);m.Zl=[];m.g_=[];if(y?.size)for(const l of y.values())m.g_.push(l);if(D.sabrContextUpdates.size>0)for(const l of D.sabrContextUpdates.values())$Gb(m,l,C);SG(D)&&x&&$Gb(m,x,C);X=D.j().L;m.clientInfo={clientName:WAs[X.c.toUpperCase()]||0};X.cbrand&&(m.clientInfo.deviceMake=X.cbrand);X.cmodel&&(m.clientInfo.deviceModel=X.cmodel);X.cver&&(m.clientInfo.clientVersion=X.cver);X.cos&&(m.clientInfo.osName= X.cos);X.cosver&&(m.clientInfo.osVersion=X.cosver);X=D.j();X.X("html5_sabr_enable_server_xtag_selection")&&X.uY&&(m.clientInfo.hl=X.uY);D.rg&&(m.rg=D.rg);return m}; var vzY=function(D){return Cg[h[2]](this,16,6053,D)}; var $Gb=function(D,X,B){const C=X.type||0;B?.has(C)?D.g_.push(X):D.Zl.push(C)},fMb=function(D){if(!(e6(D.info)&&D.info.M7()&&D.policy.dJ&&D.Sz)||D.info.cC.Z>=2||WG()>0||!ZrB())return!1; var X=D.YB.get("aitags");if(!X)return!1;X=y_(X).split(",");const B=[];for(const C of D.Sz)g.XP(X,C)&&B.push(C);if(!B.length)return!1;D.YB.set("altitags",g.xh(B.join(",")));return!0},uAu=function(D,X,B=!1){g.E(X); D.ya.lastError="player.exception";D.errorMessage=`${X.name}_${X.message}`;B?g.oW(()=>{a7(D.ya)}):a7(D.ya)},pnY=function(D){D.R5&&(D.xhr.status=D.R5,D.gf=D.R5)},hk_=function(D,X){D.timing.s7=!0; D.xhr.sC()&&D.timing.U7();D.policy.Cr&&D.g4?.stop();Nt(D.Q9,X,!1)},JYs=function(D,X,B){let C=D.Yl?Math.max(X,B/D.Yl):X; const V=D.qA.Z.U;V&&(C=X,D.Yl&&(C=Math.max(X,B/D.Yl*V)));s7(D.qA,X,B,C)},MVV=function(D,X,B,C,V,x){D.Z3&&(D.Z3.add(Math.round(X)),D.Z3.add(Math.round(B)),D.Z3.add(Math.round(C)),D.Z3.add(Math.round(V)),D.Z3.add(Math.round(x)),D.Z3.add(Math.round(D.Cr)))},AYY=function(D,X,B){switch(X){case 68:D.Q8(B); break;case 35:D.tM(B);break;case 44:D.qa(B);break;case 43:D.h8(B);break;case 53:D.Bl(B);break;case 56:D.oP();break;case 57:D.ZV(B);break;case 42:D.g3(B);break;case 45:D.MN(B);break;case 59:D.Vl(B);break;case 51:D.GB(B);break;case 49:D.IP(B);break;case 50:D.uU(B);break;case 47:D.Hq(B);break;case 58:D.Rq(B);break;case 61:D.UP(B);break;case 66:D.bR(B);break;case 46:D.UA(B);break;case 67:D.onSnackbarMessage(B);break;case 71:X=Yb(B,dFA),D.z2.pY(X)}},jf$=function(D){Zm=D},HYY=function(D,X,B){D.ZL.get(X).onProgress= B},Q$=function(D,X){D.jM(X)&&(Zm?D.ZL.get(X).EY.clear():D.ZL.get(X).PU=new qA,D.Z(X),D.V=!0)},FA$=function(D){for(const [X, B]of D.ZL){const C=X;B.du||Q$(D,C)}},zko=function(D,X){D=D.ZL.get(X); if(!D)return 0;X=0;if(D.dw.length>0){for(const B of D.dw)X+=B.range?.length||0;return X}if(D.dh.length>0)for(const B of D.dh)X+=B.fl||0;return X+D.Qi},LK=function(D,X){if(Zm){let B=0; D=D.ZL.get(X);if(!D?.EY)return 0;for(const C of D.EY.values())B+=C.data.totalLength;return B}return D.ZL.get(X)?.PU.G()||0},gn=function(D,X){D=D.ZL.get(X); if(Zm){if(!D?.du)return!1;X=D.EY.size>0;return D.n7.length>0||X}return!!D?.du&&!!D?.PU.G()},bYu=function(D,X){const B=D.ZL.get(X),C=zko(D,X),V=!C&&!!B.bytesReceived; if(Zm){if(D.gw?.ao){for(var x of B.EY.values())if(!x.Aa)return!1;return V}}else if(x=D.I_(X),V&&D.U&&x!==void 0)return x;return(V||B.bytesReceived===C)&&B.wO+LK(D,X)===B.bytesReceived},kq9=function(D,X,B){const C=D.gw?.G.get(X); if(!C)return[];if(B.Hi)return C.Y(0,B.clipId)?.dw||[];if(C.U()){var V=B.startMs,x=B.durationMs,y=1E3;D.R6?.L&&B.timeRange&&(V=B.timeRange.startTicks??-1,x=B.timeRange.Pc??-1,y=B.timeRange.timescale??-1);if(B.wV<0||B.cN<0||x<0||V<0||B.fl<0||y<0)return Q$(D,X),[];D=Ug(B.wV,B.fl);X=B.Nc||0;return[new IR(3,C,D,"makeSliceInfosMediaBytes",B.cN-1,V/y,x/y,X,D.length-X,void 0,B.WK,B.clipId)]}return B.cN<0?(Q$(D,X),[]):D.gw?.ao?(x=C.Ba,y=x*C.info.Zf,X=B.Nc,D.R6?.L&&D.S.XV()!=="ONESIE"&&B.timeRange&&!X&&(V= B.timeRange.startTicks/B.timeRange.timescale),[new IR(3,C,void 0,"makeSliceInfosMediaBytes",B.cN,V,x,X,y,!0,B.WK,B.clipId)]):[]},UG$=function(D,X,B,C){B.dw.push(...C); if(Zm)B.Om.has(X)||B.Om.set(X,[]),B.Om.get(X).push(...C);else if(B.Q9)for(const V of C)B.Q9.dw.push(V);else B.Q9=new sf_(D.R6,[...B.dw]),D.R6?.nD&&g.U(D,B.Q9)},Rk1=function(D,X,B){D.gw=X; D.R6=B;for(const [C,V]of D.ZL){X=C;B=V;for(const x of B.W6){const y=kq9(D,X,x);UG$(D,x.Ui,B,y)}}},cYX=function(D){return D.Xn()&&!D.yP},Nyb=function(D){D.policy.tS&&D.QS&&!D.d6?D.d6=!0:D.kB.U7()},q8$=function(D,X){let B=-1,C=-1,V=-1; if(D.zJ?.items)for(const x of D.zJ.items)X=m,l=D.gw.isManifestless,y?(D.L?.Gh.event==="predictStart"&&D.L.XyD.G&&(D.G=NaN,D.S=NaN);if(D.L&&D.L.Xy===X){if(C=D.L,!D.policy.G||!D.policy.Z)if(V&&C){var x=C.Gh,y=V.zt(x);x.event==="predictStart"&&(D.J=X);D.T2("sdai",{onqevt:x.event,sq:X,mt:B,gab:y,cst:x.startSecs,cueid:D.policy.f_&&(y||x.event==="start")?x.identifier:void 0},!0);y?x.event!=="predictStart"?(x.event==="start"&&D.J===X-1&&D.T2("sdai",{gabonstart:X}),C.HP?wn(D,4,"cue"):(D.G=X,D.S=B,D.T2("sdai",{joinad:D.Z,sg:D.G,st:D.S.toFixed(3)}),D.K=Date.now(),wn(D,2,D.Z===3? "staftpred":"join"),eku(V,C.Gh))):(y=dGu(D),X+=Math.max(Math.ceil(-x.L/y),1),x=Math.floor(B-x.L/1E3),D.policy.Z?D.U=x:D.V=X,D.T2("sdai",{onpred:B,estsq:X,estmt:x.toFixed(3)}),SE(D.loader,x,x,X,y),D.K=Date.now(),wn(D,3,"predict"),eku(V,C.Gh)):D.Z===1?D.Ro?.Eg(B)?(SE(D.loader,B,B,X),wn(D,4,"sk2head")):wn(D,5,"nogab"):x.event==="predictStart"&&(D.policy.Z&&D.U>0?(B=Math.floor(B-x.L/1E3),D.U!==B&&D.T2("sdai",{updateSt:B,old:D.U}),D.U=B):D.V>0&&(B=X+Math.max(Math.ceil(-x.L/dGu(D)),1),D.V!==B&&(D.T2("sdai", {updateSt:B,old:D.V}),D.V=B)))}else D.T2("sdai",{nulldec:1,sq:X,mt:B.toFixed(3),evt:C?.Gh?.event||"none"})}else D.Z===1&&wn(D,5,"noad")},Po=function(D,X,B){return(B<0||B===D.G)&&!isNaN(D.S)?D.S:X},Tf=function(D,X,B){X.startSecs+=isNaN(D.Y)?0:D.Y; uqu(D.gw,X,B)},KAX=function(D,X){if(D.L){var B=D.L.Gh.BA-(X.startTime+D.Y-D.L.Gh.startSecs); B<=0||(B=new gH(D.L.Gh.startSecs-(isNaN(D.Y)?0:D.Y),B,D.L.Gh.context,D.L.Gh.identifier,"stop",D.L.Gh.L+X.duration*1E3),D.T2("cuepointdiscontinuity",{segNum:X.Xy}),Tf(D,B,X.Xy))}},dGu=function(D){switch(D.policy.latencyClass){case "LOW":return 2E3; case "ULTRALOW":return 1E3;default:return 5E3}},tJ=function(D,X,B,C=!1){C?wn(D,1,"seek"):X>0&&Math.abs(X-B)>=5&&D.Z===4&&wn(D,5,"sk2t")},ZY$=function(D){if(!D)return"unknown"; switch(D){case 5:return"predictStart";case 1:return"start";case 2:return"continue";case 3:return"stop";case 6:return"prefetch";default:return"unknown"}},O7=function(D,X){return X?D.policy.Jo&&X.tileContext?`${X.identifier};${X.tileContext}`:X.identifier:""},Qfb=function(D,X){let B=-(X.Gh?.n3||0); X.timeRange&&(B+=(X.timeRange.startTicks||0)/(X.timeRange.timescale||1));return new gH(B,X.Gh?.zx||0,X.Gh?.wH||"",X.Gh?.identifier||"",ZY$(X.Gh?.event),(X.Gh?.n3||0)*1E3,D.policy.Jo?X.tileContext:void 0)},LA1=function(D){switch(D){case 1:return"timeout"; case 2:return"ratecontrol";case 3:return"sverr";case 4:return"deleted";case 5:return"waiting";case 6:return"ready";case 7:return"ssdisabled";default:return"unknown"}},gz9=function(D,X){let B=""; const C=[];for(const [V,x]of D.L.entries()){const y=V,m=x;m?.startTimeSecs<=X&&X<=m?.startTimeSecs+m?.BA&&C.push(y);B+=`${y}:${m?.startTimeSecs.toFixed(3)}:${m?.BA.toFixed(3)};`}C.length===0&&D.T2("clsdai",{no_cid:1,mt:X.toFixed(3),adConfigMap:B.substring(0,1024)});return C},Ezz=function(D,X,B=!1){B&&(D.S=!0); ++D.G;B=6E4*2**D.G;B=(0,g.Q)()+B;D.V.set(X.info.id,B)},rn=function(D){for(const [X, B]of D.V.entries()){const C=X;B<(0,g.Q)()&&D.V.delete(C)}return D.V},Dq=function(D,X){D.L!==X&&(D.L=X,D.U=!0)},nzs=function(D,X){let B=null; if(D.policy.A$){let C=[];if(X){const V=g.O$(D.Z.Z,x=>x.id===X); if(V&&V.Se){const x=V.Se.id;C=g.gu(D.Z.Z,y=>y.Se?.id===x)}}C.length===0&&(C=g.gu(D.Z.Z,V=>!!V.Se?.isDefault),X&&D.T2("iaf",{id:X, sid:C[0]?.id}));C.length>0&&(B=g.O$(C,V=>V.audio.L===D.policy.GY)||C[0])}else X&&(B=g.O$(D.Z.Z,C=>C.id===X)),B||(B=g.O$(D.Z.Z,C=>!!C.Se?.isDefault),X&&D.T2("iaf",{id:X, sid:B?.id}));return B},XW=function(D){if(!D.Z||!D.policy.V&&!D.Z.info.Se){var X=D.S.Z; D.Z&&(X=X.filter(C=>C.audio.L===D.Z.info.audio.L),X.length||(X=D.S.Z)); D.Z=D.gw.L[X[0].id];if(X.length>1&&!D.policy.fD){if(!D.policy.aq){var B=g.O$(X,C=>C.audio.audioQuality!=="AUDIO_QUALITY_HIGH"); B&&(D.Z=D.gw.L[B.id])}B=!1;if(B=D.policy.F2?!0:D.L.isLocked()?D.L.L<240:wn_(D,D.Z))D.Z=D.gw.L[g.du(X).id]}}},Cp=function(D,X){D.L=X; var B=D.S.videoInfos;if(!D.L.isLocked()){const x=(0,g.Q)();B=g.gu(B,function(y){if(y.Zf>this.policy.Zf)return!1;const m=this.gw.L[y.id];return rn(this.G).get(y.id)>x||m.cC.Z>4||m.YU>4?!1:this.U7.has(+y.itag)?!1:!0},D); D.G.hs()&&(B=g.gu(B,y=>y.video.width<=854&&y.video.height<=480))}B.length||(B=D.S.videoInfos); let C=B;D.policy.ZY&&(C=Ty$(D,C,X));C=g.gu(C,X.V,X);if(D.L.isLocked()&&D.G.L){var V=g.O$(B,x=>x.id===D.G.L); V?C=[V]:Dq(D.G,"")}D.policy.ZY||(C=Ty$(D,C,X));C.length||(C=[B[0]]);C.sort((x,y)=>BP(D,x)-BP(D,y)); for(X=1;XV.video.width?(g.xg(C,X),X--):BP(D,B)*D.policy.K>BP(D,V)&&(g.xg(C,X-1),X--);X=C[C.length-1];D.ww=!!D.U&&!!D.U.info&&D.U.info.NF!==X.NF;D.V=C;D.O7.clear();B=!1;for(V=0;V=1080&&(B=!0);S8X(D.policy,X,D.gw.ao)},PgY=function(D){var X=D.policy.J; const B=fK(D.pv)/X-BP(D,D.Z.info);X=g.ru(D.V,function(C){return BP(this,C)0&&!(BP(D,D.V[X])<=V);X--);for(B=B/D.policy.K-C;X=B);X++);D.nextVideo=D.gw.L[D.V[X].id];D.K=X}},Bw$=function(D,X){if(Xmu(D,X))return null; if(X.reason==="m"&&X.isLocked())return Cp(D,X),D.K=D.V.length-1,XW(D),xu(D),D.J=D.J||D.U!==D.nextVideo,D.U=D.nextVideo,new VR(D.Z,D.U,X.reason);X.reason==="r"&&(D.N=-1);Cp(D,X);xu(D);if(X.reason==="r"&&D.nextVideo===D.U)return new VR(D.Z,D.nextVideo,X.reason);D.U&&D.nextVideo&&BP(D,D.U.info)1.5&&D.loader.T2("overshoot",{sq:X.Xy,br:B,max:C}))}},yR=function(D,X,B=!1){Ezz(D.G,X,B); D.N=-1;Cp(D,D.L)},x7u=function(D,X){return new VR(D.Y,D.U,X||D.L.reason)},BP=function(D,X){if(!D.vZ[X.id]){var B=D.gw.L[X.id].index.O8(D.s7,15); B=X.Yc&&D.U&&D.U.index.isLoaded()?B||X.Yc:B||X.Zf;D.vZ[X.id]=B}B=D.vZ[X.id];D.O7.has(X.itag)&&(B*=1.5);return B*=Math.max(1,D.D3.C6()||0)},yuz=function(D,X){const B={}; for(const C of X){if(!C||!C.video)continue;X=C.video.qualityOrdinal;const V=B[X],x=V&&V.L()&&V.video.qualityOrdinal>D.policy.Ya,y=X<=D.policy.Ya?C.L():C.V();if(!V||x||y)B[X]=C}return B},Ty$=function(D,X,B){const C=B.reason==="m"||B.reason==="s"; D.policy.WV&&mx&&g.o6&&(!C||B.L<1080)&&(X=X.filter(V=>V.video&&(!V.G||V.G.powerEfficient))); if(X.length>0)if(CD()){const V=yuz(D,X);X=X.filter(x=>!!x&&!!x.video&&x.NF===V[x.video.qualityOrdinal].NF)}else{const V=X[0]?.video?.qualityOrdinal; if(V){B=X.filter(y=>!!y&&!!y.video&&y.video.qualityOrdinal===V); const x=yuz(D,B)[V].NF;X=X.filter(y=>!!y&&!!y.video&&y.NF===x)}}return X},OYA=function(D){const X=g.O$(D.S.Z,C=>C.audio.L),B=g.O$(D.S.Z,C=>!C.audio.L); return X?D.policy.GY?X:B:null},wn_=function(D,X){let B=0; for(;B+1C},rYu=function(D,X,B){if(X.info.NF==="f"||D.G2.includes(bI(X,D.gw.ao)))return X; for(let C=0;CB.info.itag===X); if(!D)throw Error("Itag "+X+" from server not known.");return D},igu=function(D){const X=[]; if(D.L.reason==="m"||D.L.reason==="s")return X;if(VaY(D.gw)){for(let B=Math.max(0,D.K-2);Bx?V=0:C[y]>D.buffered[y]&&(y===x-1?V=2:y===x-2&&C[y+1]>D.buffered[y+1]&&(V=3))}D.L.add(X<<3|(B&&4)|V);X=Math.ceil(D.track.q5()*1E3);D.L.add(X-D.G);D.G=X;if(V===1)for(D.L.add(x),X=0,y=0;y=2&&D.L.add(C[x-1]-D.buffered[x- 1]);B&&D.L.add(B);D.buffered=C},vn9=function(D){if(D.policy.Z1&&D.policy.BV)for(const X of D.policy.Z1){const B=g.jX(X),C=+B.clen,V=+B.csz; if(C>0&&V>0&&D.policy.V===B.docid&&D.L.info.id===B.fmtid&&D.L.info.lastModified===+B.lmt)return{clen:C,csz:V,ck:B.ck,civ:B.civ}}},$u=function(D){return{downloadedEndTime:Math.round(D.m6?D.m6.G:0), maxKnownEndTime:Math.round(D.L.index.Bg()),averageByteRate:Math.round(D.L.info.Yc)}},fp=function(D,X=!1){!X||D.indexRange&&D.initRange&&D.m6||WP(D,new vP("Woffle: Expect isFinal to always have indexRange and initRange and lastSlice")); X={lmt:D.L.info.lastModified,docid:D.policy.V,fmtid:D.L.info.id,type:D.L.info.mimeType.split(";")[0],csz:D.chunkSize,clen:D.V*D.chunkSize+D.Z};D.crypto&&(X.ck=D.Y,X.civ=D.S);X="local://localhost/videoplayback?"+JT(X);X={itag:+D.L.info.itag,mimeType:D.L.info.mimeType,bitrate:D.L.info.Zf*8,lastModified:String(D.L.info.lastModified),initRange:D.initRange?.L(),indexRange:D.indexRange?.L(),url:X};var B=D.L.info.Z;B&&(X.xtags=B);if(B=D.L.info.video)if(X.quality=B.quality,X.qualityLabel=B.qualityLabel,X.width= B.width,X.height=B.height,B=B.fps)X.fps=B;if(D=D.L.info.audio){if(B=D.sampleRate)X.audioSampleRate=String(B);if(D=D.numChannels)X.audioChannels=D}return X},uP=function(D,X,B=!1){X.then(C=>{D.Z3.delete(X); (B||C===4)&&D.K.resolve(C)},C=>{D.K.reject(C)})},pp=function(D){return!!D.m6&&D.m6.S()},WP=function(D,X){g.VU(D.policy.V)!==4&&(g.xd(D.policy.V,4),g.UW(X),D.K.reject(new vP(X.message)))},fR_=function(D,X){let B=0; const C=H6(X.Z);if(D.V=C.length)return;if(B<0)throw Error("Missing data");D.V=D.U;D.Z=0}for(;B{const V=iZ(C,D.m6.VV.info,fp(D,!0),B,D.policy.D3,D.V,X,D.crypto);uP(D,V,!0)})}else WP(D,new vP("Woffle: Expect always re-mark currentChunkOffset at EOS")); else WP(D,new vP("Woffle: Expect at EOS to always have lastSlice or indexRange"))},hKu=function(D,X){if(!pp(D)&&!D.S7()){if(!(D.pv||(D.pv=!0,D.U>0))){var B=$u(D); B=iZ(D.policy.V,D.L.info,fp(D),B,D.policy.D3);uP(D,B)}if(X.info.type===1){if(D.m6){WP(D,Error("Woffle: Expect INIT slices to always start us off"));return}D.initRange=Ug(0,X.Z.totalLength)}else if(X.info.type===2)D.m6&&D.m6.type===1||WP(D,Error("Woffle: Index before init")),D.indexRange=Ug(D.initRange.end+1,X.Z.totalLength);else if(X.info.type===3){if(!D.m6){WP(D,Error("Woffle: Expect MEDIA slices to always have lastSlice"));return}if(D.m6.type===3&&!cy(D.m6,X.info)&&(D.N=[],X.info.Xy!==aR(D.m6)|| X.info.L!==0))return;if(X.info.U){for(const C of D.N)fR_(D,C);D.N=[]}else{D.N.push(X);D.m6=X.info;return}}else{WP(D,Error("Woffle: Unexpected slice type"));return}D.m6=X.info;fR_(D,X);pmV(D)}},uM1=function(D){return{downloadedEndTime:-1, maxKnownEndTime:Math.round(D.L.index.Bg()),averageByteRate:Math.round(D.L.info.Yc)}},JuY=function(D){D=g.DI(D,1886614376); for(const X of D);return g.E$(D,X=>MA9(X))},MrX=function(D){var X=wu(D,(C,V)=>C+V.length,0); X=new Uint8Array(X);let B=0;for(const C of D)X.set(C,B),B+=C.length;return X},jv9=function(D){a:{var X=D.initData; try{var B=0;const V=new DataView(X.buffer);for(;B0){const l=V.getUint32(B+28);y+=l*16+4}const m=V.getUint32(B+y-4);try{const l=AuB(X.subarray(B+y,B+y+m));if(l!==null){var C=l;break a}}catch(l){}B+=x}C=null;break a}catch(V){C=null;break a}C=void 0}if(C!=null){X=j3(uk(C,7,void 0,Dz));X==null||D.o8||(D.cryptoPeriodIndex=X);X=j3(uk(C,10,void 0,Dz));X!=null&&X>0&&!D.o8&&(D.L= X);for(const V of Ff(C,2,bk,void 0===Lw?2:4))C=D.U,X=C.push,B=Z6(V),B=g.s5(B,4),X.call(C,B)}},Hg1=function(D){return isNaN(D.cryptoPeriodIndex)?g.s5(D.initData):`${D.cryptoPeriodIndex}`},he=function(D){if(D.offset>=D.Z.totalLength)throw Error(); return z0(D.Z,D.offset++)},FoY=function(D,X=!1){var B=he(D); if(B===1){X=-1;for(B=0;B<7;B++){var C=he(D);X===-1&&C!==255&&(X=0);X>-1&&(X=X*256+C)}return X}C=128;for(let V=0;V<6&&C>B;V++)B=B*256+he(D),C*=128;return X?B:B-C},zKs=function(D){try{const X=FoY(D,!0),B=FoY(D,!1); return{id:X,size:B}}catch(X){return{id:-1,size:-1}}},kSA=function(D){var X=new bgX(D),B=-1,C=0; let V=0;for(;!C||!V;){const {id:x,size:y}=zKs(X);if(x<0)return;if(x===176){if(y!==2)return;C=X.L()}else if(x===186){if(y!==2)return;V=X.L()}x===374648427?B=X.L()+y:x!==408125543&&x!==174&&x!==224&&X.skip(y)}X=Ft(D,0,B);B=new DataView(X.buffer);B.setUint16(C,3840);B.setUint16(V,2160);C=new qA([X]);MA(C,D);return C},Je=function(D){D.S?.dispose(); D.S=null},sv_=function(D){return D.Z.length?D.Z[0]:null},U7B=function(D,X){return D.Z.some(B=>B.info.Xy===X)},MH=function(D,X){X={rst4disc:X, cd:D.Y.toFixed(3),sq:D.U7?D.U7.Xy:-1};D.U=NaN;D.Y=0;D.O7=-1;D.U7=null;D.YU=NaN;D.b0=NaN;D.HZ=null;D.loader.T2("mdstm",X)},Ae=function(D){D.L=null; D.J=-1;D.K=0;D.G=null;D.s7=NaN;D.N=0;D.Z3=null},jS=function(D,X){if(X.info.U){D.ww=X.info; if(D.G){var B=D.G,C=RK$(D,!1);B=cuY(B);D.loader.Qx(D.VV,C,B);D.Z3||D.policy.Ni||NwA(D);D.Z3=null}Ae(D)}D.S&&hKu(D.S,X);if(C=D.Bm())if(C=C.S(X,D.policy.DU,D.policy.Wo)){D.Z.pop();D.Z.push(C);return}D.Z.push(X)},Koo=function(D,X,B,C=0){if(D.V){var V=D.V.L+D.V.Z; if(B.info.L>0)if(B.info.Xy===D.V.Xy&&B.info.L=0&&D.V.Xy>=0&&!cy(D.V,B.info))throw new g.AO("improper_continuation",D.V.AZ(),B.info.AZ());rto(D.V,B.info)||MH(D,"d")}else if(B.info.L>0)throw new g.AO("continuation_of_null",B.info.AZ());D.V=B.info;D.VV=B.info.VV;if(B.info.L===0){if(D.L)if(!D.loader.isOffline()||D.policy.y7)D.loader.T2("slice_not_fully_processed",{buffered:D.L.info.AZ(),push:B.info.AZ()});else throw new g.AO("slice_not_fully_processed", D.L.info.AZ(),B.info.AZ());Ae(D);D.vZ=C}else{if(D.vZ&&C&&D.vZ!==C)throw D=new g.AO("lmt_mismatch",B.info.Xy,D.vZ,C),D.level="WARNING",D;!B.info.VV.U()&&D.G&&(C=B.info,V=D.G.segmentNumber,C.Y="updateWithEmsg",C.Xy=V)}if(D.L){C=D.L.S(B);if(!C)throw new g.AO("failed_to_merge",D.L.info.AZ(),B.info.AZ());D.L=C}else D.L=B;a:{B=g.EO(D.L.info.VV.info);if(D.L.info.type!==3){if(!D.L.info.U)break a;D.L.info.type===6?qFX(D,X,D.L):aRB(D,D.L);D.L=null}for(;D.L;){C=D.L.Z.totalLength;if(D.J<=0&&D.K===0){var x=D.L.Z; let W=V=-1;if(B){for(var y=0;y+80))break;if(u!==408125543)if(u===524531317)y=!0,p>=0&&(W=x.L()+p,m=!0);else{if(y&&(u===160||u===163)&&(V<0&&(V=l),m))break;u===163&&(V=Math.max(0,V),W=x.L()+p);if(u===160){V<0&&(W=V=x.L()+p);break}x.skip(p)}}V<0&&(W=-1)}const {L$:v,fm:f}={L$:V,fm:W};if(v<0)break;D.J=v;D.K= f-v}if(D.J>C)break;D.J?(C=YFo(D,D.J),C.G&&IRb(D,C),qFX(D,X,C),jS(D,C),D.J=0):D.K&&(C=YFo(D,D.K<0?Infinity:D.K),D.K-=C.Z.totalLength,jS(D,C))}}D.L&&D.L.info.U&&(jS(D,D.L),D.L=null)},IRb=function(D,X){var B=g.S6(X); if(L6(X.info.VV.info)&&X.info.VV.info.video.primaries==="bt2020"){var C=new By(B);CC(C,[408125543,374648427,174,224,21936,21937])&&(C=C.start+C.pos,B.getUint8(C)===129&&B.getUint8(C+1)===1&&B.setUint8(C+1,9))}C=X.info.VV.info;C.V()&&!L6(C)&&(C=g.S6(X),(new By(C)).Hi(),mG([408125543,374648427,174,224],21936,C));X.info.VV.info.qp()&&(C=X.info.VV,C.info&&C.info.video&&C.info.video.projectionType==="MESH"&&!C.N&&(g.EO(C.info)?C.N=UeA(B):C.info.o8()&&(C.N=oH1(B))));X.info.VV.info.o8()&&X.info.qp()&&(B= g.S6(X),(new By(B)).Hi(),mG([408125543,374648427,174,224],30320,B)&&mG([408125543,374648427,174,224],21432,B));if(D.policy.w$&&X.info.VV.info.o8()){C=g.S6(X);var V=new By(C);if(CC(V,[408125543,374648427,174,29637])){B=yP(V,!0);V=V.start+V.pos;for(var x=0;xC.info.VB+C.Z.totalLength,0); D.L&&(X+=D.L.Z.totalLength);return X},YFo=function(D,X){var B=D.L; X=Math.min(X,B.Z.totalLength);if(X===B.Z.totalLength)return D.L=null,B;B=z1u(B,X);D.L=B[1];return B[0]},qFX=function(D,X,B){if(B.info.VV.U()){if(D.D3&&GS$(B)){X=g.S6(B); var C=g.PG(X,0,1953658222);if(C){C.skip(1);var V=Kt(C)<<16|oa(C),x=V&1,y=V&4;if(V&256){X=V&512;var m=V&1024;V&=2048;var l=dH(C);l<2||(x&&C.skip(4),y&&C.skip(4),x=dH(C),C.skip((l-1)*(4+(X?4:0)+(m?4:0)+(V?4:0))-4),C.data.setUint32(C.offset+C.L,x))}}}if(X=D.pv&&!!D.pv.VV.pv)if(X=B.info.qp())X=UzY(B),m=D.pv,FW?(C=1/X,X=zZ(D,X)>=zZ(m)+C):X=D.getDuration()>=m.getDuration(),X=!X;X&&GS$(B)&&(X=D.pv,FW?(C=UzY(B),m=1/C,C=zZ(D,C),X=zZ(X)+m-C):X=X.getDuration()-D.getDuration(),X=1+X/B.info.duration,bG$(g.S6(B), X))}else{C=!1;D.G||(cD$(B),B.L&&(D.G=B.L,C=!0,x=B.info,y=B.L.segmentNumber,x.Y="updateWithEmsg",x.Xy=y,x=B.L,x.S&&(y=D.VV.index,y.G=!x.S,y.S="emsg"),x=B.info.VV.info,y=g.S6(B),g.EO(x)?Xc(y,1701671783):x.o8()&&mG([408125543],307544935,y)));a:if((x=D9(B,D.policy.zW))&&R11(B))y=Zg9(D,B),D.Y+=y,x-=y,D.N+=x,D.U=D.policy.FN?D.U+x:NaN;else{if(D.policy.sy){if(y=l=D.loader.DW(g.Og(B),1),D.U>=0&&B.info.type!==6){if(D.policy.FN&&isNaN(D.b0)){g.UW(new g.AO("Missing duration while processing previous chunk",B.info.AZ())); D.loader.isOffline()&&!D.policy.y7||Qvz(D,B,y);MH(D,"m");break a}V=l-D.U;var W=V-D.Y;const v=B.info.Xy,f=D.U7?D.U7.Xy:-1,u=D.YU,p=D.b0,M=D.policy.WS&&V>D.policy.WS,k=Math.abs(W)>10,N=Math.abs(D.U-y)<1E-7;if(Math.abs(W)>1E-4){D.G2+=1;const Y=D.G?.U();W={audio:`${+D.Y4()}`,sq:v.toFixed(),sliceStart:l,lastSq:f.toFixed(),lastSliceStart:u,lastSliceDuration:p,totalDrift:(V*1E3).toFixed(),segDrift:(W*1E3).toFixed(),skipRewrite:`${+(M||k)}`};Y?.length&&(W.adCpn=Y[0]);D.loader.handleError("qoe.avsync",W); D.O7=v}M||k||N||(y=D.U);l=Zg9(D,B,l);x-=l;D.Y=V+l}}else y=isNaN(D.U)?B.info.startTime:D.U;Qvz(D,B,y)&&(D.N+=x,D.U=y+x,D.policy.nY&&D.G2>=D.policy.nY&&(D.G2=0,D.loader.zd({resetForRewrites:"count"})))}D.U7=B.info;D.b0=rR(B);B.U>=0&&(D.YU=B.U);if(C&&D.G){C=RK$(D,!0);KC(B.info,C);D.L&&KC(D.L.info,C);for(m of X)D.policy.S&&m.Xy!==D.G?.segmentNumber||KC(m,C);(B.info.U||D.L&&D.L.info.U)&&B.info.type!==6||(D.Z3=C,D.policy.Z?(X=cuY(D.G),D.loader.Qx(D.VV,C,X)):(X=D.loader,X.gw.isManifestless&&LoB(X,C,null, !!D.VV.info.video)),D.policy.Ni||NwA(D))}}eK9(D,B);D.timestampOffset&&knu(B,D.timestampOffset)},RK$=function(D,X){let B; const C=D.G;if(B=jVb(C))B.startSecs+=D.s7;const V=D.s7;let x=0;D.VV instanceof Ha&&(x=D.VV.Ba);return new nC(C.segmentNumber,V,X?x:D.N,C.ingestionTime,`sq/${C.segmentNumber}`,void 0,void 0,X,B)},cuY=function(D){if(D.HP()){var X=D.data["Stitched-Video-Id"]?D.data["Stitched-Video-Id"].split(",").slice(0,-1):[],B=D.U(); var C=[];if(D.data["Stitched-Video-Duration-Us"])for(var V of D.data["Stitched-Video-Duration-Us"].split(",").slice(0,-1))C.push((Number(V)||0)/1E6);V=[];if(D.data["Stitched-Video-Start-Frame-Index"])for(var x of D.data["Stitched-Video-Start-Frame-Index"].split(",").slice(0,-1))V.push(Number(x)||0);x=[];if(D.data["Stitched-Video-Start-Time-Within-Ad-Us"])for(const y of D.data["Stitched-Video-Start-Time-Within-Ad-Us"].split(",").slice(0,-1))x.push((Number(y)||0)/1E6);D=new gn1(X,B,C,x,g.F8o(D),g.zdo(D))}else D= null;return D},NwA=function(D){const X=D.G,B=jVb(X); B&&(B.startSecs+=D.s7,D.loader.fU(D.VV,B,X.segmentNumber,X.HP()))},Zg9=function(D,X,B){var C=0; if(X.info.VV.info.o8()&&!R11(X))return 0;if(D.pv&&!D.Y4()){let W=0;B&&g.EO(X.info.VV.info)?W=B-D.U:X.info.VV.info.o8()&&(W=D.Y);var V=X.info.Xy;B=D9(X,D.policy.zW);var x=D.pv;const {wN:v,Bn:f}={wN:x.O7,Bn:x.Y};x=Math.abs(f-W)>.02;if((V===v||V>v&&V>D.O7)&&x){C=Math.max(.95,Math.min(1.05,(B-(f-W))/B));if(g.EO(X.info.VV.info))bG$(g.S6(X),C);else if(X.info.VV.info.o8()&&(x=W-f,!g.EO(X.info.VV.info)&&(X.info.VV.info.o8(),C=new By(g.S6(X)),V=X.G?C:new By(new DataView(X.info.VV.Z.buffer)),D9(X,!0)))){var y= x*1E3,m=uI(V);V=C.pos;C.pos=0;if(C.L.getUint8(C.pos)===160||pC(C))if(xW(C,160))if(yP(C,!0),xW(C,155)){x=C.pos;var l=yP(C,!0);C.pos=x;y=y*1E9/m;m=lI(C);y=m+Math.max(-m*.7,Math.min(m,y));y=Math.sign(y)*Math.floor(Math.abs(y));if(!(Math.ceil(Math.log(y)/Math.log(2)/8)>l)){C.pos=x+1;for(x=l-1;x>=0;x--)C.L.setUint8(C.pos+x,y&255),y>>>=8;C.pos=V}}else C.pos=V;else C.pos=V;else C.pos=V}C=D9(X,D.policy.zW);C=B-C}C&&X.info.VV.info.o8()&&D.loader.T2("webmDurationAdjustment",{durationAdjustment:C,videoDrift:W+ C,audioDrift:f})}return C},Qvz=function(D,X,B){if(!b9_(X,B))return X=YW(X.info),X.smst="1",D.loader.handleError("fmt.unparseable",X||{},1),!1; isNaN(D.s7)&&(D.s7=B);return!0},GS$=function(D){return D.info.VV.U()&&D.info.Xy===D.info.VV.index.NU()},zZ=function(D,X=0){X=X?Math.round(D.timestampOffset*X)/X:D.timestampOffset; D.VV.pv&&X&&(X+=D.VV.pv.L);return X+D.getDuration()},En_=function(D,X){X<0||(D.Z.forEach(B=>{knu(B,X)}),D.timestampOffset=X)},Uw=function(D,X=!1){var B=D.loader.getCurrentTime(); if(D.policy.l1){var C=D.loader.Qk();isNaN(C)||(B=C-D.loader.MA())}var V=D.U.Bm();let x=V?.info.G||0;if(D.policy.N1&&!isFinite(B))return 0;V?.info.VV.s7()&&!V.info.U&&(D.policy.OY?x=V.info.V:D.policy.Yg&&(C=V.info,x=C.range?C.G:Math.min(C.startTime+Math.min(C.duration*C.L/C.VV.info.Zf,C.duration)+(C.range?C.K:Math.min(C.duration,C.duration*C.Z/C.VV.info.Zf)),C.startTime+C.duration)));if(!D.xx){if((D.policy.L||D.policy.Ht)&&X&&!isNaN(B)){if(V)return x-B;if(D.policy.Ht&&D.VV.info.NF==="f")return Infinity}return 0}if((C= bP(D))&&ku(C))return C.G;var y=D.xx.UD(!0);if(X&&V)return C=0,D.policy.L&&(C=Xz(y,x+.02)),C+x-B;X=Xz(y,B);D.policy.PV&&C&&(V=Pz(y,B),y=Pz(y,C.V-.02),V===y&&(B=C.G-B,D.policy.U&&B>X+.02&&D.T2("abh",{bh:X,bhtls:B}),X=Math.max(X,B)));return X},jys=function(D){D.S=!0; D.V=!0;D.G=-1;jE(D,Infinity)},JJ=function(D){for(const X of D.Z)RS(D,X); D.Z=[];D.L=null},Mt=function(D,X,B=!1){if(D.xx){const C=D.xx.UD(),V=OO(C,X); let x=NaN;const y=bP(D);y&&(x=OO(C,y.VV.index.getStartTime(y.Xy)));if(V===x&&D.L&&D.L.Z&&nnb(cP(D),0))return X}D=NH(D,X,B);return D>=0?D:NaN},jE=function(D,X,B){D.VV.L(); var C=NH(D,X);if(C>=0)return C;D.Y?.J(X,B);C=Math;var V=C.min,x=D.U;if(x.S)if(x=x.S,x.m6&&x.m6.type===3)x=x.m6.startTime;else if(x.U>0){var y=x.L.index;y=g.AK(y.offsets.subarray(0,y.count),x.U*x.chunkSize);x=x.L.index.getStartTime(y>=0?y:Math.max(0,-y-2))}else x=0;else x=Infinity;X=V.call(C,X,x);D.L=D.policy.pv?null:D.VV.S(X).dw[0];qH(D)&&(D.policy.QG&&B?.seekSource===60||D.xx&&D.xx.abort(),D.policy.Jj&&D.Y?.Y());D.vZ=0;return D.L?D.L.startTime:X},Ho=function(D){return sv_(D.U)},wmu=function(D,X){return!!D.Y?.Z3(X)|| U7B(D.U,X)},aS=function(D,X,B=!1){X&&FW&&En_(D.U,X.Pf()); B||D.Y?.S();D.xx=X;D.Y?.pv(D.xx)},bP=function(D){return D.policy.ih?D.Y?.U7()||null:D.xx&&D.xx.AR()},TwX=function(D){const X={}; for(let B=0;B4&&D.pv.shift()},SFb=function(D,X){if(X.Xt()){const B=X.Cz(); for(const C of B)D.policy.U&&X instanceof pK&&