@castlabs/prestoplay 6.14.0 → 6.15.0

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +7 -7
  5. package/cjs/cl.cast.js +113 -111
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +550 -529
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +74 -73
  10. package/cjs/cl.externs.js +191 -64
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +69 -68
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -30
  15. package/cjs/cl.ima.js +23 -23
  16. package/cjs/cl.mse.js +290 -275
  17. package/cjs/cl.muxdata.js +15 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +13 -13
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.simid.js +15 -15
  22. package/cjs/cl.smooth.js +72 -71
  23. package/cjs/cl.thumbnails.js +26 -26
  24. package/cjs/cl.tizen.js +70 -70
  25. package/cjs/cl.ttml.js +28 -28
  26. package/cjs/cl.verimatrix.js +5 -5
  27. package/cjs/cl.vimond.js +13 -13
  28. package/cjs/cl.vr.js +19 -19
  29. package/cjs/cl.vtt.js +14 -14
  30. package/cjs/cl.youbora.js +20 -20
  31. package/cl.adobe.js +3 -3
  32. package/cl.airplay.js +3 -3
  33. package/cl.broadpeak.js +5 -5
  34. package/cl.cast.js +89 -88
  35. package/cl.conviva.js +27 -27
  36. package/cl.core.js +457 -438
  37. package/cl.crypto.js +9 -9
  38. package/cl.dash.js +70 -68
  39. package/cl.externs.js +187 -64
  40. package/cl.freewheel.js +19 -19
  41. package/cl.hls.js +71 -69
  42. package/cl.hlssmpte.js +5 -5
  43. package/cl.htmlcue.js +26 -26
  44. package/cl.ima.js +17 -17
  45. package/cl.mse.js +255 -240
  46. package/cl.muxdata.js +13 -13
  47. package/cl.onboard.js +4 -4
  48. package/cl.persistent.js +11 -11
  49. package/cl.playlist.js +5 -5
  50. package/cl.simid.js +13 -13
  51. package/cl.smooth.js +59 -59
  52. package/cl.thumbnails.js +19 -19
  53. package/cl.tizen.js +57 -57
  54. package/cl.ttml.js +22 -22
  55. package/cl.verimatrix.js +4 -4
  56. package/cl.vimond.js +8 -8
  57. package/cl.vr.js +15 -15
  58. package/cl.vtt.js +12 -12
  59. package/cl.youbora.js +15 -15
  60. package/clpp.styles.css +2 -0
  61. package/package.json +1 -1
  62. package/typings.d.ts +387 -90
package/cl.core.js CHANGED
@@ -1,368 +1,380 @@
1
- let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ka,ma,qa,ra,ta,ua,va,wa,Oa,Ta,Va,Wa,Xa,Ya,$a,eb,fb,hb,ib,jb,kb,lb,mb,ob,rb,xb,Ab,Bb,Cb,Fb,Hb,Kb,Lb,Ob,Pb,Rb,tc,Cc,Nc,Oc,Uc,Vc,Wc,Yc,Zc,ad,bd,cd,ed,fd,gd,hd,id,jd,qd,ud,Ad,Bd,Cd,Dd,Fd,Id,Jd,Kd,Pd,Wd,Xd,$d,de,ie,Be,Ie,Ke,Le,Me,Ne,Oe,Pe,Te,Ue,Ve,We,Xe,Ye,Ze,$e,df,ff,qf,tf,zf,Gf,Hf,Zf,cg,dg,eg,fg,gg,ig,jg,kg,lg,mg,ng,qg,rg,wg,tg,Eg,Fg,Jg,Lg,Tg,ch,dh,Xg,$g,fh,hh,gh,jh,kh,nh,qh,rh,th,uh,yh,Ah,Ch,wh,Hh,Jh,Ih,Kh,Lh,Mh,Ph,Qh,Th,si,wi,xi,yi,zi,Ai,Ci,Di,Ei,Fi,Ii,Li,Pi,Qi,Wi,Yi,Ti,Vi,Xi,
2
- Zi,$i,aj,cj,dj,jj,nj,sj,uj,rj,Ej,xj,wj,Pj,Qj,Sj,Tj,Uj,Vj,Wj,Xj,Zj,Yj,ak,bk,ek,fk,gk,Rj,ik,kk,mk,ok,vk,wk,xk,yk,zk,Ak,Bk,Ck,Dk,Ek,Fk,Lk,Uk,Wk,bl,gl,il,pl,Cl,ll,ul,Hl,Jl,Kl,Vl,Wl,cm,fm,gm,hm,jm,km,lm,dm,im,mm,nm,om,pm,qm,rm,xm,Cm,Em,Gm,Fm,Im,Am,Pm,Mm,Om,Nm,Dm,Qm,Rm,Sm,Ym,Zm,$m,cn,gn,hn,kn,en,dn,sn,tn,xn,wn,zn,Bn,Cn,yn,En,Fn,Kn,Pn,Qn,Rn,Vn,Wn,Un,Xn,Tn,Sn,Zn,ao,co,eo,fo,go,ho,io,jo,ko,lo,mo,qo,uo,vo,xo,zo,Co,Jo,Do,Eo,Ho,Ko,Lo,No,Ro,So,Uo,Wo,Xo,Vo,Qo,Oo,Po,Yo,Zo,$o,ap,cp,ep,fp,hp,jp,lp,dp,mp,np,ip,kp,
3
- op,pp,up,wp,vp,xp,yp,zp,Ap,rp,Cp,sp,qp,Hp,Lp,Mp,Tp,Up,Vp,Yp,Wp,Xp,Zp,$p,aq,bq,cq,dq,eq,fq,gq,hq,jq,kq,lq,nq,pq,uq,vq,wq,yq,zq,Aq,Cq,Dq,Bq,Eq,Hq,Gq,Fq,Iq,Lq,Pq,Oq,Wq,og,pg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="6.14.0";_.fa="AdaptationSet";_.ha="Already destroyed. No-op";_.ia="Already released. No-op";_.ja="Autoplay is not allowed due to browser policy.";ka="Autoplay should not be used for preloaded streams. ";_.la="BANDWIDTH";
4
- ma="CHECKSUM";_.na="CODECS";_.oa="Cannot retrieve buffer information due to platform limitations";_.pa="CastlabsPlayer";qa="Content-Length";ra="Content-Type";_.sa="Could not find configured DRM environment.";ta="DRM licenses loaded";ua="DRMtoday";va="DRMtodayOnboard";wa="Destroying player";_.xa="Disable track type ";_.ya="EXT-X-BYTERANGE";_.za="EXT-X-DATERANGE";_.Aa="EXT-X-DISCONTINUITY";_.Ba="EXT-X-DISCONTINUITY-SEQUENCE";_.Ca="EXT-X-ENDLIST";_.Da="EXT-X-KEY";_.Ea="EXT-X-MAP";_.Fa="EXT-X-MEDIA-SEQUENCE";
5
- _.Ga="EXT-X-PART-INF";_.Ha="EXT-X-PLAYLIST-TYPE";_.Ia="EXT-X-PRELOAD-HINT";_.Ja="EXT-X-PROGRAM-DATE-TIME";_.La="EXT-X-SERVER-CONTROL";_.Ma="EXT-X-TARGETDURATION";Oa="Error while decoding string!";_.Pa="Error while fetching license!";_.Qa="FairPlay Certificate URL is not defined";_.Ra="FairPlay License URL is not defined";_.Sa="GROUP-ID";Ta="HW_SECURE_ALL";Va="HW_SECURE_CRYPTO";Wa="HW_SECURE_DECODE";Xa="HeaderDrm";Ya="InvalidStateError";_.Za="LANGUAGE";$a="License verification failed: ";_.bb="Loading player with configuration";
6
- _.cb="MaxHeight";_.db="MaxWidth";eb="Missing media element";fb="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";hb="No event provided!";ib="No items in the playlist";jb="No track data attached to the event, unable to add track!";kb="Not a persistent session.";lb="NotAllowedError";mb="NotSupportedError";_.nb="PlayReady License URL is not defined";ob="Player not ready yet.";_.pb="Player sources";_.qb="Please make sure ";rb="Preloading is not supported by this player.";
7
- _.tb="QualityLevel";_.ub="RESOLUTION";_.vb="Releasing player with source";_.wb="Representation";xb="STANDARD";_.yb="SW_SECURE_CRYPTO";_.zb="SW_SECURE_DECODE";Ab="Session is closed";Bb="Signature Verification failed";Cb="Skipping Session creation. License for init data was already requested in ";_.Db="SmoothStreamingMedia";_.Eb="TYPE";Fb="The index is not in the allowed range.";_.Gb="URI";Hb="Unable to translate ";_.Ib="Unhandled/ignored event";_.Jb="Unregistering listeners";Kb="Unsupported keySystem";
8
- Lb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Nb="VIDEO";Ob="Wait for preloading to finish";Pb="WebkitEmeManager.MediaKeySession.load";_.Qb="Widevine License URL is not defined";Rb="Will create EME Manager: ";_.Sb="X-ASSET-LIST";_.Tb="X-ASSET-URI";_.Ub="X-PLAYOUT-LIMIT";_.Vb="X-RESUME-OFFSET";_.Wb="ad-break-started";_.Xb="ad-break-stopped";_.Zb="ad-buffering";_.$b="ad-clicked";_.ac="ad-completed";_.bc="ad-first-quartile";_.cc="ad-impression";_.dc="ad-loaded";_.ec="ad-midpoint";_.fc="ad-paused";
9
- _.gc="ad-progress";_.hc="ad-resumed";_.ic="ad-skipped";_.jc="ad-started";_.kc="ad-stopped";_.lc="ad-third-quartile";_.mc="addtrack";_.nc="ads-timeline-changed";_.oc="airplay-casting-ended";_.pc="airplay-casting-started";_.qc="airplay-status-changed";_.rc="application/cea-608";_.sc="application/dash+xml";tc="application/mp4";_.vc='application/mp4; codecs\x3d"stpp"';_.wc='application/mp4; codecs\x3d"wvtt"';_.xc="application/ttml+xml";_.Bc="application/vnd.ms-sstr+xml";Cc="application/x-www-form-urlencoded";
10
- _.p="audio";_.Dc="audio/aac";_.Ec="audio/ac3";_.Fc="audio/eac3";_.Gc="audio/mp4";_.Hc="audiobufferchanged";_.Ic="autoplaynotallowed";_.Jc="bitratechanged";_.Kc="boolean";_.Lc="bufferingended";_.Mc="bufferingstarted";Nc="canplay";Oc="canplaythrough";_.Pc="castingstarted";_.Qc="caststatuschanged";_.Rc="cdn-switch-success";_.Sc="cenc";_.Tc="center";Uc="certificate-request";Vc="change";Wc="chrome";_.Xc="clpp-fill";Yc="clpp-hidden";Zc="clpp-mc-playlist";ad="clpp-mc-playlist-item";bd="clpp-mc-playlist-video-el";
11
- cd="clpp-visible";_.dd="clpp.cast.CastSender";ed="clpp.drm.HeaderDrm";fd="clpp.drm.eme.AppleEmeManager";gd="clpp.interstitial.Player";hd="clpp.native.Player";id="clpp.plist.McPlaylist";jd="clpp.utils.Platform";_.kd="codecs";_.ld="column-reverse";_.md="com.adobe.primetime";_.nd="com.apple.fps";_.od="com.apple.hls.interstitial";_.pd="com.microsoft.playready";qd="com.microsoft.playready.recommendation";_.rd="com.widevine.alpha";_.td="config.drm.customData is not defined";ud="controls";_.vd="cuechange";
12
- _.wd="decoder";_.xd="destroy()";_.yd="disabled";_.zd="div";Ad="drm.mediaKeys.end";Bd="drm.mediaKeys.start";Cd="drm.onPlay.end";Dd="drm.onPlay.start";_.Ed="drmexpirationupdate";Fd="drmrenewalstarted";_.Gd="drmsessionpersisted";_.Hd="drmsessionupdate";Id="drmtoday";Jd="durationchange";Kd="encrypted";_.Ld="end";_.Md="ended";_.Nd="error";_.Od="forced";Pd="fullscreenElement";_.Qd="function";_.Rd="height";_.Sd="hidden";_.Td="html";_.Ud="image";_.Vd="internal-error";Wd="itemchange";Xd="keystatuseschange";
13
- _.Zd="left";$d="license-renewal";de="license-request";_.ee="line-left";_.fe="line-right";_.ge="loadeddata";_.he="loadedmetadata";ie="loadstart";_.je="main";_.ke="mdat";_.le="mdia";_.me="message";_.ne="metadata";_.oe="mimeType";_.pe="minf";_.qe="moov";_.re="mp4";_.se="mpd-type-changed";_.te="mpeg-dash-callback-event";_.ue="none";_.r="number";_.ve="object";_.we="onBitrateChanged()";_.xe="onPlayerError()";_.ye="onPlayerWillDestroy";_.ze="onPlayerWillRelease";_.Ae="onStateChanged()";Be="online-status-changed";
14
- _.Ce="optional";_.De="org.w3.clearkey";_.Ee="output-restricted";_.Fe="pause";_.Ge="persistent";_.He="persistent-license";Ie="picture-in-picture";_.Je="play";Ke="player.afterLoad.end";Le="player.afterLoad.start";Me="player.beforeLoad.end";Ne="player.beforeLoad.start";Oe="player.load.end";Pe="player.load.start";_.Qe="playing";_.Re="playlist-item-changed";_.Se="playlist-modified";Te="playlist.next.end";Ue="playlist.next.start";Ve="preload-aborted";We="preload-failed";Xe="preloaded";Ye="preloading";
15
- Ze="primary-before-load";$e="primary-content";_.af="progress";_.bf="px";_.cf="ratechange";df="released";_.ef="releasing";ff="removetrack";_.gf="required";_.hf="resize";_.jf="right";_.kf="seeked";_.lf="seeking";_.mf="showing";_.nf="simid-creative-started";_.of="simid-creative-stopped";_.pf="sinf";qf="stalled";_.rf="start";_.sf="statechanged";tf="status-pending";_.uf="stbl";_.vf="string";_.wf="stsd";_.xf="style";_.yf="subtitles-htmlcue";zf="temporary";_.u="text";_.Af="text/vtt";_.Bf="text/xml";
16
- _.Cf="timeupdate";_.Df="trak";_.Ef="ttml-xml";_.Ff="und";Gf="unknown";Hf="update";_.If="urn:scte:scte35";_.Jf="urn:scte:scte35:2014";_.Kf="user-seeked";_.Lf="user-seeking";_.Mf="value";_.Nf="vertical-lr";_.Of="vertical-rl";_.w="video";_.Pf="video/mp2t";_.Rf="video/mp4";_.Sf="videobufferchanged";_.Tf="videotrackchanged";_.Yf="vimond-response";Zf="visibilitychange";_.$f="vtt-xml";_.ag="waiting";_.bg="waitingforkey";cg="webkit-org.w3.clearkey";dg="webkitkeyadded";eg="webkitkeyerror";fg="webkitkeymessage";
17
- gg="webkitneedkey";_.hg="width";ig="x-dt-csl-tracking-token";jg="x-dt-follow-up-token";kg="x-dt-resp-code";mg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};ng=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:mg(a)}};
18
- qg=function(a,b){if(b){var c=og;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&pg(c,a,{configurable:!0,writable:!0,value:b})}};rg=function(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})};_.x=function(a){return rg(a())};
19
- _.z=function(a,b){a=a.split(".");var c=sg;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};_.vg=function(a){return _.B(a)||tg(a)?a:_.ug(a)};_.ug=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=wg(b,{merging:a[c]},1));return b.merging||null};_.xg=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
20
- wg=function(a,b,c){const d=c+1;if(_.B(a)||!_.yg(a))a={};for(const e in b)c=b[e],tg(c)||_.B(c)||_.zg(c)||c instanceof Element?a[e]=c:_.yg(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.zg(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=wg([],c,d):!_.B(c)&&_.Ag(c)&&20>d&&(a[e]=wg(a[e],c,d));return a};tg=function(a){a=typeof a;return a===_.vf||a===_.r||a===_.Kc};_.B=function(a){return null===a||"undefined"===typeof a};_.yg=function(a){return typeof a===_.ve};
21
- _.zg=function(a){return typeof a===_.Qd};_.Bg=function(a){return typeof a===_.vf};_.Cg=function(a){return typeof a===_.r};_.Ag=function(a){if(_.B(a)||!_.yg(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
22
- _.Dg=function(a,b,c,d){if(a===b||null===a&&null===b||void 0===a&&void 0===b)return!0;if(null===a&&null!==b||null!==a&&null===b||void 0!==a&&void 0===b||void 0===a&&void 0!==b||!_.yg(a)||!_.yg(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.B(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.B(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.B(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
23
- Eg=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};Fg=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.Gg=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};Jg=function(a){return a&&0<=Hg[a]?Hg[a]:Ig};Lg=function(a){if(!a)return _.C("clpp.log",Hb+a+ca),-1;const b=Kg[a.toUpperCase()];return void 0===b?(_.C("clpp.log",Hb+a+ca),-1):b};_.Ng=function(a){Mg.info.apply(Mg,arguments)};_.Og=function(a){Mg.debug.apply(Mg,arguments)};
24
- _.C=function(a){Mg.warn.apply(Mg,arguments)};_.Pg=function(a){Mg.error.apply(Mg,arguments)};_.Sg=function(a){if(a){var b=a.a();b in _.Qg?_.Rg.warn("Player-Factory '"+b+"' already registered"):(_.Qg[b]=a,_.Rg.info("Registered Player-Factory: '"+b+"'"))}};_.Ug=function(a){var b=a.a;var c=[];for(const d in b.a)c.push.apply(c,b.a[d]);b=c;for(c=0;c<b.length;++c)Tg(b[c]);a.a.clear()};_.Vg=function(a,b,c,d){const e=f=>{for(const g of c)a.off(b,g,e);d(f)};for(const f of c)a.on(b,f,e)};
25
- Tg=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
26
- ch=function(a,b){a.g.debug("onMetadata_()");b.mode=_.Sd;const c=[];let d=!0;const e=f=>{for(var g of c)if(f.startTime===g.startTime&&f.endTime===g.endTime)return g;g={schemeIdUri:"",value:"",startTime:0,endTime:0,id:"",type:_.Wg,eventElement:null};a.o&&d&&"SCTE35-IN"===f.value.key&&0<f.startTime?(g.startTime=0,g.endTime=f.startTime):(g.startTime=f.startTime,g.endTime=f.endTime);d=!1;c.push(g);return c[c.length-1]};if(b.cues){for(const f of b.cues){if(Xg(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
27
- _.Jf;g.type=_.Yg;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.m.trigger(new _.F(_.Zg,{detail:f}));Array.prototype.push.apply(a.h,c);$g(a,c,b);a.f.off(b,_.vd);a.f.on(b,_.vd,f=>{f=f.target.activeCues;f=f.length?Xg(a,f[0]):a.a;var g;if(g=f){{g=f;const h=a.m.getPosition();g=g.startTime<=h&&h<g.endTime}}if(g)a.a=f,a.m.trigger(new _.F(_.ah,{detail:f}));else{if(f=a.a)f=a.a,g=a.m.getPosition(),f=f.endTime<=g;f&&(f=a.a,a.a=null,a.m.trigger(new _.F(_.bh,{detail:f})))}})}};
28
- dh=function(a,b){a.j=b;a.l=a.j.textTracks;a.f.on(a.l,_.mc,c=>{c=c.track;c.kind===_.ne&&ch(a,c)})};Xg=function(a,b){for(const c of a.h)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};$g=function(a,b,c){if(a.o){for(;0<c.cues.length;)c.removeCue(c.cues[0]);b.forEach(function(d){c.addCue(new DataCue(d.startTime,d.endTime,{key:"SCTE35-OUT",data:null}))})}};_.eh=function(a){return Array.isArray(a)?a:[a]};
29
- fh=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};hh=function(a,b,c){if(null==a&&null==b)return!0;if(null==a||null==b)return!1;a=c?a.map(c):a;b=c?b.map(c):b;return gh(a,b)&&gh(b,a)};gh=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.ih=function(a,b={}){if(b.Oe){const c=[];for(const d of a)c.some(e=>b.Oe(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};
30
- jh=function(a,b){b=b.track;b.kind!==_.ne&&(b.mode===_.mf&&(b.mode=_.Sd),a.a.on(b,_.vd,c=>{c=c.target||c.srcElement;c.mode=_.Sd;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};kh=function(a,b,c,d){a=`${a===_.G?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.Bg(d))a+=": "+d;else if(null!=d&&void 0!=d)if(null!=d.message&&void 0!=d.message)a+=": "+d.message,delete d.message;else try{a+=": "+JSON.stringify(d)}catch(e){}return a};
31
- nh=function(a,b){const c=b||fh;let d=null,e=null,f=!1;return function(...g){if(f&&c(g,d))return e;f=!0;d=g;return e=a(...g)}};_.oh=function(a){return null!=a};qh=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new ph("No non-null, non-undefined value found");};rh=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
32
- _.sh=function(a){var b;a instanceof _.sh?(th(this,a.Ya),this.mc=a.mc,this.Ja=a.Ja,uh(this,a.Ec),this.ya=a.ya,_.vh(this,wh(a.a)),this.ac=a.ac):a&&(b=String(a).match(xh))?(th(this,b[1]||"",!0),this.mc=yh(b[2]||""),this.Ja=yh(b[3]||"",!0),uh(this,b[4]),this.ya=yh(b[5]||"",!0),_.vh(this,b[6]||"",!0),this.ac=yh(b[7]||"")):this.a=new _.zh(null)};th=function(a,b,c){a.Ya=c?yh(b,!0):b;a.Ya&&(a.Ya=a.Ya.replace(/:$/,""))};
33
- uh=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ec=b}else a.Ec=null};_.vh=function(a,b,c){b instanceof _.zh?a.a=b:(c||(b=Ah(b,Bh)),a.a=new _.zh(b))};yh=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};Ah=function(a,b,c){return typeof a===_.vf?(a=encodeURI(a).replace(b,Ch),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};Ch=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.zh=function(a){this.f=a||null};
34
- wh=function(a){var b=new _.zh;b.f=a.f;if(a.a){var c={},d;for(d in a.a)c[d]=a.a[d].concat();b.a=c;b.h=a.h}return b};_.I=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.H(_.G,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};_.Eh=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Dh.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Fh=function(a,b){a=_.Eh(a);b=_.Eh(b);return a.split("-")[0]==b.split("-")[0]};
35
- _.Gh=function(a,b){for(const c of a)if(!b(c))return!1;return!0};Hh=function*(a){for(let b=0;b<a;b++)yield b};Jh=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Ih(a)==Ih(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;const c=_.J(a);b=_.J(b);for(const d of Hh(a.byteLength))if(c[d]!=b[d])return!1;return!0};Ih=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.J=function(a,b=0,c=Infinity){return Kh(a,b,c,Uint8Array)};
36
- Kh=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=Ih(a),g=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b*e,g));c=Math.min(a+Math.max(c*e,0),g);a/=e;return new d(f,a,c/e-a)};Lh=function(a,b=0,c=Infinity){return Kh(a,b,c,Uint16Array)};Mh=function(a,b=0,c=Infinity){return Kh(a,b,c,Uint32Array)};_.Nh=function(a,b=0,c=Infinity){return Kh(a,b,c,Int32Array)};_.Oh=function(a,b=0,c=Infinity){return Kh(a,b,c,DataView)};
37
- Ph=function(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};Qh=function(a){let b="";for(let c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};
38
- _.Rh=function(a){if(!a)return"";a=_.J(a);239===a[0]&&187===a[1]&&191===a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(Oa);return a}a=escape(Qh(a));try{return decodeURIComponent(a)}catch(b){throw Error(Oa);}};
39
- Th=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Sh.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.J(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(_.J(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return Qh(c)};
40
- _.Uh=function(a,b){if(_.Bg(a))return a;let c="";b=!!b;const d=_.J(a);239==d[0]&&187==d[1]&&191==d[2]?c=_.Rh(d):254==d[0]&&255==d[1]?c=Th(d.subarray(2),!1):255==d[0]&&254==d[1]&&(c=Th(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Sh.debug("Unable to find byte-order-mark, making an educated guess.");0==d[0]&&0==d[2]?c=Th(a,!1):0==d[1]&&0==d[3]?c=Th(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Rh(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
41
- };_.Vh=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.Wh=function(a,b){const c=new Uint8Array(2*a.length),d=new DataView(c.buffer);for(let e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
42
- _.Xh=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=Mh(d):2===c?e=Lh(d):e=_.J(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Yh=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Zh=function(a,b){if(String.prototype.endsWith)return a.endsWith(b);const c=a.length-b.length;a=a.lastIndexOf(b,c);return-1!==a&&a===c};_.$h=function(a){return!!(a&&0<a.length)};_.ai=function(a){return!a||0===a.length};
43
- _.bi=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(Eg(b))return"";a="bps";1E3<=Math.abs(b)&&(a="Kbps",b/=1E3);1E3<=Math.abs(b)&&(a="Mbps",b/=1E3);return`${b.toFixed(2).replace(/[.,]00$/,"")}${a}`}catch(b){return""}};_.di=function(a){a=a.replace(/<[^>]+>/gi,"");ci.innerHTML=a;a=ci.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.fi=function(a,b){b=void 0==b?!0:b;a=_.ei(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};
44
- _.ei=function(a){a=Qh(_.J(a));return btoa(a)};_.gi=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.hi=function(a){const b=new Uint8Array(a.length/2);for(let c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b};_.ii=function(a){let b="";for(let c=0;c<a.length;++c){let d=a[c].toString(16);1==d.length&&(d="0"+d);b+=d}return b};
45
- _.ji=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!=b.length)return!1;for(let c=0;c<a.length;++c)if(a[c]!=b[c])return!1;return!0};_.ki=function(a){var b=0;for(var c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);c=0;for(let d=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};
46
- _.li=function(a,b){b.lastIndex=a.a;b=b.exec(a.f);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.a==a.f.length||null==b||b.position!=a.a)return null;a.a+=b.length;return b.results};
47
- _.pi=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.H(_.G,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.mi(d);var f;(f=_.li(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.li(d,g);)c.push(new _.ni(f[1],f[2]||f[3]))}return new _.oi(a,b,c,e)};_.ri=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...qi]}};
48
- si=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts;a.fatalStatusCodes=b.fatalStatusCodes||[...qi]};
49
- _.ui=function(a,b){_.Bg(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.ti,uriIndex:0,method:a.method||"GET",body:a.body||null,headers:Object.assign({},a.headers),allowCrossSiteCredentials:a.allowCrossSiteCredentials||!1,onProgress:a.onProgress||null,onFragment:a.onFragment||null,maxAttempts:a.maxAttempts||1,currentAttempt:0,baseDelay:a.baseDelay||1E3,backoffFactor:a.backoffFactor||2,fuzzFactor:a.fuzzFactor||.5,timeout:a.timeout||0,requestModifiers:a.requestModifiers||
50
- [],responseModifiers:a.responseModifiers||[],startTime:a.startTime||null,endTime:a.endTime||null,contentType:a.contentType||null,licenseRequestType:a.licenseRequestType||null,sessionId:null,bytesRemaining:-1,bytesLoaded:-1,bytesTotal:-1,timescale:a.timescale||null,rateLimitBps:a.rateLimitBps||null,disableFragmentSupport:a.disableFragmentSupport||!1,disableMergedFragments:a.disableMergedFragments||!1,fatalStatusCodes:[...qi],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&si(c,b);return c};
51
- _.vi=function(a,b,c,d,e,f,g,h){e&&(d=e);e={uri:d,data:b||new ArrayBuffer(0),headers:a,status:c,fromCache:!!a["x-shaka-from-cache"],timeMs:g,responseStartMs:h,request:f};if(200<=c&&299>=c&&202!==c)return e;g=null;try{g=_.Uh(b,!0)}catch(k){}_.Og("HTTP error text:",g);throw new _.H(0<=(f.fatalStatusCodes||[]).indexOf(c)?_.G:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};
52
- wi=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};xi=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};yi=function(a,b,c){if(0>=a)return Promise.resolve();const d=8*c/a-b/1E3;return 0<d?new Promise(e=>{setTimeout(e,1E3*d)}):Promise.resolve()};
53
- zi=function(a,b,c){try{const d=a(b);if(d&&d.P&&d.abort)return c.resolve(d.P),()=>d.abort();c.resolve(d);return()=>Promise.resolve(d).then(()=>{}).catch(()=>{})}catch(d){return c.reject(d),()=>Promise.resolve()}};Ai=function(a,b){a.P.then(()=>b(!0),()=>b(!1));return a};_.Bi=function(a,b){a.a.push(Ai(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};Ci=function(a,b){return _.x(function*(){const c=yield a.fetch(b);return _.Rh(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
54
- Di=function(a,b){return _.x(function*(){const c=yield Ci(a,b);try{const d=JSON.parse(c);if(null==d||typeof d!==_.ve)throw Error("Not an object");return d}catch(d){throw new ph("Failed to parse JSON response","json-failed");}})};Ei=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.x(function*(){if(!navigator.onLine)return!1;if(b){const e=_.ui(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).P}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
55
- Fi=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.Gi=function(a){return a&&a!==_.Ff?a:null};
56
- Ii=function(a){if(!a)throw new _.H(_.G,3,3101,`Invalid track type: ${a}`);if(!_.Bg(a))throw new _.H(_.G,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.K:return _.K;case _.L:return _.L;case _.M:return _.M;case Hi:return Hi}throw new _.H(_.G,3,3101,`Unknown track type: ${a}.`);};
57
- Li=function(a,b){a=Ii(a);const c=_.Gi(b.kind);let d=b.id;d||(d=String(_.Ji++));a=new _.Ki(d,c===_.ne?Hi:a);a.kind=c;a.label=_.Gi(b.label);a.language=_.Gi(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.Mi=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};
58
- _.Ni=function(a,b,c){return a?(c||Object.keys(a).sort()).reduce(function(d,e){if(!(e in a))return d;const f=a[e];let g="\x26";""===d&&(g=b?"":"?");d=d+g+encodeURIComponent(e);return d=d+"\x3d"+encodeURIComponent(void 0===f?"":f)},""):""};_.Oi=function(a){const b={};a=a||"";a=a.substring(a.indexOf("?")+1);for(const d of a.split("\x26")){var c=d.split("\x3d");a=decodeURIComponent(c[0]);c=decodeURIComponent(c[1]||"");a&&(b[a]=c)}return b};
59
- Pi=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};Qi=function(a,b){return _.x(function*(){const c=_.ui(b);return yield Ci(a.f,c)})};Wi=function(a,b,c){return _.x(function*(){const {mimeType:d,renditions:e}=yield Ti(a,b,c),f=new _.Ki("dummy",_.M),g=e.map((h,k)=>{k=new _.Ui(`R${k}`,f);k.bandwidth=h.bandwidth;k.Ic=h.Ic;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});Vi(g);return{renditions:g,mimeType:d||void 0}})};
60
- Yi=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Xi(c));const b=new Map;a.forEach(c=>{if(c.type&&c.name){const d=`${c.type}:${c.name}`;if(b.has(d))throw Error("#EXT-X-MEDIA:NAME attributes are not unique. It is impossible to map HLS metadata to Safari data structures.");b.set(d,c)}});return b};Ti=function(a,b,c){return _.x(function*(){const d=Zi(b),e=$i(b,c);return{mimeType:yield aj(a,e,d[0]?d[0].codec:null),renditions:d}})};
61
- Vi=function(a){const b=new Set;a.forEach(c=>{b.add(`${c.width}x${c.height}`)});if(b.size<a.length)throw Error("Playlist contains multiple renditions with the same resolution.");};Xi=function(a){const b=_.pi(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.Eb);c=null!=c?{AUDIO:_.L,VIDEO:_.M,SUBTITLES:_.K}[c]:void 0;return{type:c,groupId:a(_.Sa),name:a("NAME"),language:a(_.Za),oh:a("AUTOSELECT"),default:a("DEFAULT"),vh:a("FORCED"),Ne:a("CHARACTERISTICS"),uri:a(_.Gb)}};
62
- Zi=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.pi(0,b);if(c.getAttribute(_.Nb))throw Error("Playlist contains alternative video streams.");var d=_.I(c,_.ub);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.I(c,_.la);e=e?Number(e):null;var f=_.I(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.I(c,_.na);c=_.bj(_.w,c?c.split(","):[]);return b={bandwidth:e,Ic:f,codec:c,width:b,height:d,mimeType:null}})};
63
- $i=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?Pi(a,b):null};aj=function(a,b,c){return _.x(function*(){if(!b||!c)return null;var d=yield Qi(a,b);d=[cj(d,b),dj(d,b)].filter(Boolean);return _.ej(d,_.w,c)})};cj=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?Pi(a,b):null};dj=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.I(_.pi(0,a),_.Gb))?Pi(a,b):null:null};
64
- _.gj=function(a,b,c){for(const d of _.fj)if(d.probe(b,c))return d.create(a);return null};_.hj=function(a){a=_.fj.indexOf(a);0<=a&&_.fj.splice(a,1)};_.ij=function(a,b){b&&(a+='; codecs\x3d"'+b+'"');return a};jj=function(a,b,c){a.stop();let d=!0,e=null;a.a=()=>{c?clearInterval(e):clearTimeout(e);d=!1};const f=()=>{d&&a.f()};e=c?setInterval(f,1E3*b):setTimeout(f,1E3*b);return a};
65
- nj=function(){if(kj)return kj;lj||(lj=new _.mj(()=>{kj=null}));(kj=document.querySelector(_.w)||document.querySelector(_.p))||(kj=document.createElement(_.w));lj.ca(1);return kj};_.oj=function(){return!!navigator.userAgent.match(/Edge?\//)};_.pj=function(a){return(navigator.userAgent||"").includes(a)};_.qj=function(a){return _.pj("Tizen"+(a?" "+String(a):""))};
66
- sj=function(a){const b={major:-1,name:Gf};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=rj(a,c[0]));2<=c.length&&(b.minor=rj(a,c[1]));3<=c.length&&(b.patch=rj(a,c[2]));4<=c.length&&(b.build=rj(a,c[3]));return b};_.tj=function(){return _.pj("Web0S")};_.vj=function(){return _.tj()&&79===uj().major};
67
- uj=function(){const a=wj();const b=["ie","edge","opera","firefox","safari",Wc];var c=xj();const d=yj[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return sj(c[1]);return sj("")};_.zj=function(){return _.pj("CrKey")};_.Aj=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.qj()};_.Bj=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Aj()&&1<navigator.maxTouchPoints};_.Cj=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
68
- rj=function(a,b){try{return parseInt(b,10)}catch(c){Dj.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};Ej=function(a,b){if(!a||!b||0===b.length)return!1;for(let c=0;c<b.length;c++)if(0<=a.indexOf(b[c]))return!0;return!1};
69
- xj=function(){const a=wj();if(!a)return Fj;var b=a.match(/^.+?(?=\))/);if(!b)return Fj;b=b[0];if(Ej(b,["iphone","ipad"]))return Gj;if(Ej(b,["android"]))return Hj;if(Ej(b,["macintosh"]))return Ij;if(Ej(b,["windows nt"]))return Jj;if(Ej(b,["tizen"]))return Kj;if(Ej(b,["web0s"]))return Lj;if(Ej(b,["linux"]))return Mj;Dj.warn("Unable to identify OS from user agent: "+a);return Fj};wj=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
70
- _.Oj=function(){var a=xj();var b=xj();var c=yj[b];if(c){c=wj().match(c.os_version)[1];c=sj(c);if(b===Jj)if("5.1"===c.name)c.name="xp";else if("6.1"===c.name)c.name="7";else if("6.2"===c.name||"6.3"===c.name)c.name="8";b=c}else b=sj("");a:{c=wj();const e=["ie","edge","opera","firefox","safari",Wc];var d=xj();d=yj[d];for(let f=0,g=e.length;f<g;f++)if(d[e[f]]&&c.match(d[e[f]])){c=e[f];break a}c=Nj}return{os:a,osVersion:b,browser:c,browserVersion:uj()}};
71
- Pj=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.Dg(a,{kind:_.Gi(b.kind),language:_.Gi(b.language),label:_.Gi(b.label)},["kind","language","label"])};Qj=function(a){return a.enabled||a.selected||a.mode===_.mf||a.mode===_.Sd};Sj=function(a,b,c){return Rj(a)&&b===_.M&&!!c.enableHlsVideoTrackInfo};
72
- Tj=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.mimeType&&(b.mimeType=d.mimeType),d.renditions&&0<d.renditions.length&&(b.renditions=d.renditions,b.renditions.forEach(e=>{e.track=b})))})};Uj=function(a,b,c){return Rj(a)&&(b===_.L||b===_.K)&&!!c.enableMetadata};
73
- Vj=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.Bc&&(d=d.Bc.get(`${b.type}:${b.label}`))&&d.Ne&&(b.accessibility=d.Ne.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Wj=function(a,b){return a.h.filter(c=>c.type===b)};Xj=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};Zj=function(a,b){if(a=Yj(a,b))a=Array.from(a),b===_.K&&(a=a.filter(c=>c.kind!==_.ne));return a};
74
- Yj=function(a,b){if(!a.m)return null;a=a.m.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.L:return a.audioTracks;case _.M:return a.videoTracks;case _.K:return a.textTracks;default:return null}};ak=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};bk=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
75
- ek=function(a,b,c){const d=Zj(a,b);if(c){if(void 0===a.h.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.g.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.l.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.K:f="mode";e=_.mf;g=_.yd;break;case _.L:f="enabled";break;case _.M:f="selected"}if(f)for(const h of d)h[f]=Pj(c,h,c.type)?e:g}}else if(a.g.debug(_.xa+b),a.a.get(b)&&d&&b===_.K){for(e of d)e.mode=
76
- _.yd;a.a.set(b,null)}b===_.L?a.m.trigger(new _.F(_.ck)):b===_.K&&a.m.trigger(new _.F(_.dk))};fk=function(a,b,c){if(a.m){var d=a.m.getSurface().getMedia();if(d){var e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);e.src=_.ai(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
77
- gk=function(a,b){return _.x(function*(){var c=a.m.getConfiguration(),d=_.gj(c,b.mimeType,_.Af);if(d){c=_.ui(b.url);var e=yield a.m.getNetworkEngine().fetch(c).P;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.J(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Af},fk(a,d,c))}else a.g.warn("Track mimetype is not supported",b)})};Rj=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.hk&&!a.url.endsWith(".m3u8"))&&_.Aj()};
78
- ik=function(a,b,c){c=_.eh(c).filter(e=>e);a.g.info("Find preferred tracks for",b,c);const d=Wj(a,b);c.some(e=>{const f=_.Eh(e);return(e=d.find(g=>{g=_.Eh(g.language||"");return _.Fh(f,g)}))?(a.g.info("Will select track with id",e.id),ek(a,b,e),!0):!1})};kk=function(a){return a.name===lb&&jk.some(b=>a.message.startsWith(b))};
79
- _.nk=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Bj()&&(a=360);const b=_.ri();b.maxAttempts=3;a={source:"",license:lk,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.ri(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,
80
- restrictions:mk(a),useCmsd:!1},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.je,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,
1
+ let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,la,oa,sa,ta,va,wa,xa,ya,Qa,Wa,Xa,Ya,Za,ab,cb,db,ib,jb,kb,lb,mb,nb,ob,qb,rb,vb,yb,Cb,Fb,Gb,Hb,Kb,Mb,Pb,Rb,Ub,Vb,Xb,zc,Fc,Nc,Uc,Vc,ad,bd,cd,ed,fd,gd,hd,jd,ld,md,nd,od,pd,qd,xd,Bd,Hd,Id,Jd,Kd,Md,Pd,Qd,Sd,Xd,ee,ie,ke,le,re,Je,Qe,Se,Te,Ue,Ve,We,Xe,Ye,Ze,$e,af,ef,ff,gf,hf,jf,kf,lf,mf,qf,sf,Gf,Jf,Pf,Xf,bg,og,sg,tg,ug,vg,wg,yg,zg,Ag,Bg,Cg,Dg,Gg,Hg,Mg,Jg,Ug,Vg,Zg,ah,ih,jh,th,uh,nh,qh,yh,Ah,zh,Ch,Dh,Eh,Hh,Ih,Kh,Lh,Ph,Rh,Th,Nh,Vh,$h,bi,ai,ci,di,ei,hi,ii,li,Li,Pi,Qi,Ri,Si,Ti,Vi,Wi,Xi,Yi,
2
+ aj,fj,jj,kj,oj,qj,lj,nj,pj,rj,sj,tj,vj,wj,Dj,Jj,Kj,Oj,Tj,Vj,Sj,fk,Yj,Xj,qk,rk,tk,uk,vk,wk,xk,yk,Ak,zk,Bk,Ck,Fk,Gk,Hk,sk,Jk,Lk,Nk,Pk,Rk,Wk,Xk,Yk,Zk,$k,al,bl,dl,el,fl,gl,ml,vl,xl,Dl,Hl,Jl,Tl,cm,Ml,Yl,hm,jm,km,vm,wm,Dm,Gm,Hm,Jm,Lm,Mm,Nm,Em,Km,Om,Pm,Qm,Rm,Sm,Tm,Zm,dn,fn,hn,gn,kn,bn,rn,on,qn,pn,en,sn,tn,un,An,Bn,Cn,Fn,Jn,Kn,Mn,Hn,Gn,Un,Vn,Zn,Yn,ao,co,eo,$n,go,ho,io,no,so,to,uo,yo,zo,xo,Ao,wo,vo,Co,Eo,Go,Ho,Io,Jo,Ko,Lo,Mo,No,Oo,Po,To,Xo,Zo,ap,bp,cp,ep,fp,dp,np,hp,ip,op,lp,pp,sp,tp,up,qp,rp,vp,wp,zp,Dp,
3
+ Ep,Hp,Jp,Kp,Ip,Fp,yp,Cp,Ap,Bp,Np,Op,Pp,Qp,Rp,Tp,Vp,Wp,Yp,$p,bq,Up,cq,dq,Zp,aq,eq,fq,kq,mq,lq,nq,oq,pq,qq,hq,sq,iq,gq,xq,Bq,Cq,Jq,Kq,Lq,Oq,Mq,Nq,Pq,Qq,Rq,Sq,Tq,Uq,Vq,Wq,Xq,Yq,$q,ar,br,dr,fr,kr,nr,or,qr,rr,sr,ur,vr,tr,wr,zr,yr,xr,Ar,Dr,Hr,Gr,Mr,Eg,Fg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.fa="6.15.0";_.ha="AdaptationSet";_.ia="Already destroyed. No-op";_.ja="Already released. No-op";_.ka="Autoplay is not allowed due to browser policy.";
4
+ la="Autoplay should not be used for preloaded streams. ";_.ma="BANDWIDTH";_.na="BASIC";oa="CHECKSUM";_.pa="CODECS";_.qa="Cannot retrieve buffer information due to platform limitations";_.ra="CastlabsPlayer";sa="Content-Length";ta="Content-Type";_.ua="Could not find configured DRM environment.";va="DRM licenses loaded";wa="DRMtoday";xa="DRMtodayOnboard";ya="Destroying player";_.za="Disable track type ";_.Aa="EXT-X-BYTERANGE";_.Ba="EXT-X-DATERANGE";_.Ca="EXT-X-DISCONTINUITY";_.Da="EXT-X-DISCONTINUITY-SEQUENCE";
5
+ _.Ea="EXT-X-ENDLIST";_.Fa="EXT-X-KEY";_.Ga="EXT-X-MAP";_.Ha="EXT-X-MEDIA-SEQUENCE";_.Ia="EXT-X-PART-INF";_.Ka="EXT-X-PLAYLIST-TYPE";_.La="EXT-X-PRELOAD-HINT";_.Ma="EXT-X-PROGRAM-DATE-TIME";_.Oa="EXT-X-SERVER-CONTROL";_.Pa="EXT-X-TARGETDURATION";Qa="Error while decoding string!";_.Ra="Error while fetching license!";_.Sa="FairPlay Certificate URL is not defined";_.Ta="FairPlay License URL is not defined";_.Ua="GROUP-ID";Wa="HW_SECURE_ALL";Xa="HW_SECURE_CRYPTO";Ya="HW_SECURE_DECODE";Za="HeaderDrm";
6
+ ab="InvalidStateError";_.bb="LANGUAGE";cb="License verification failed: ";db="Load interrupted while a player release is pending";_.eb="Loading player with configuration";_.fb="MaxHeight";_.gb="MaxWidth";ib="Missing media element";jb="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";kb="No event provided!";lb="No items in the playlist";mb="No sources provided!";nb="No track data attached to the event, unable to add track!";ob="Not a persistent session.";
7
+ _.pb="Not supported";qb="NotAllowedError";rb="NotSupportedError";_.tb="PLAYLIST";_.ub="PlayReady License URL is not defined";vb="Player not ready yet.";_.wb="Player sources";_.xb="Please make sure ";yb="Preloading is not supported by this player.";_.zb="QualityLevel";_.Ab="RESOLUTION";_.Bb="Representation";Cb="STANDARD";_.Db="SW_SECURE_CRYPTO";_.Eb="SW_SECURE_DECODE";Fb="Session is closed";Gb="Signature Verification failed";Hb="Skipping Session creation. License for init data was already requested in ";
8
+ _.Ib="SmoothStreamingMedia";_.Jb="TYPE";Kb="The index is not in the allowed range.";_.Lb="URI";Mb="Unable to translate ";_.Nb="Unhandled/ignored event";_.Ob="Unregistering listeners";Pb="Unsupported keySystem";Rb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Sb="VIDEO";_.Tb="VOD";Ub="Wait for preloading to finish";Vb="WebkitEmeManager.MediaKeySession.load";_.Wb="Widevine License URL is not defined";Xb="Will create EME Manager: ";_.Yb="X-ASSET-LIST";_.Zb="X-ASSET-URI";_.$b="X-PLAYOUT-LIMIT";
9
+ _.ac="X-RESUME-OFFSET";_.bc="ad-break-started";_.cc="ad-break-stopped";_.ec="ad-buffering";_.fc="ad-clicked";_.gc="ad-completed";_.hc="ad-first-quartile";_.ic="ad-impression";_.jc="ad-loaded";_.kc="ad-midpoint";_.lc="ad-paused";_.mc="ad-progress";_.nc="ad-resumed";_.oc="ad-skipped";_.pc="ad-started";_.qc="ad-stopped";_.rc="ad-third-quartile";_.sc="addtrack";_.tc="ads-timeline-changed";_.uc="airplay-casting-ended";_.vc="airplay-casting-started";_.wc="airplay-status-changed";_.xc="application/cea-608";
10
+ _.yc="application/dash+xml";zc="application/mp4";_.Ac='application/mp4; codecs\x3d"stpp"';_.Bc='application/mp4; codecs\x3d"wvtt"';_.Cc="application/ttml+xml";_.Dc="application/vnd.ms-sstr+xml";Fc="application/x-www-form-urlencoded";_.p="audio";_.Gc="audio/aac";_.Hc="audio/ac3";_.Lc="audio/eac3";_.Mc="audio/mp4";Nc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Oc="audiobufferchanged";_.Pc="autoplaynotallowed";_.Qc="bitratechanged";_.Rc="boolean";_.Sc="bufferingended";_.Tc="bufferingstarted";Uc="canplay";
11
+ Vc="canplaythrough";_.Wc="castingstarted";_.Xc="caststatuschanged";_.Yc="cdn-switch-success";_.Zc="cenc";_.$c="center";ad="certificate-request";bd="change";cd="chrome";_.dd="clpp-fill";ed="clpp-hidden";fd="clpp-mc-playlist";gd="clpp-mc-playlist-item";hd="clpp-mc-playlist-video-el";jd="clpp-visible";_.kd="clpp.cast.CastSender";ld="clpp.drm.HeaderDrm";md="clpp.drm.eme.AppleEmeManager";nd="clpp.interstitial.Player";od="clpp.native.Player";pd="clpp.plist.McPlaylist";qd="clpp.utils.Platform";_.rd="codecs";
12
+ _.sd="column-reverse";_.td="com.adobe.primetime";_.ud="com.apple.fps";_.vd="com.apple.hls.interstitial";_.wd="com.microsoft.playready";xd="com.microsoft.playready.recommendation";_.yd="com.widevine.alpha";_.zd="config.drm.customData is not defined";Bd="controls";_.Cd="cuechange";_.Dd="decoder";_.Ed="destroy()";_.Fd="disabled";_.Gd="div";Hd="drm.mediaKeys.end";Id="drm.mediaKeys.start";Jd="drm.onPlay.end";Kd="drm.onPlay.start";_.Ld="drmexpirationupdate";Md="drmrenewalstarted";_.Nd="drmsessionpersisted";
13
+ _.Od="drmsessionupdate";Pd="drmtoday";Qd="durationchange";_.Rd="ec-3";Sd="encrypted";_.Td="end";_.Ud="ended";_.Vd="error";_.Wd="forced";Xd="fullscreenElement";_.Yd="function";_.Zd="height";_.$d="hidden";_.ae="html";_.be="image";_.de="internal-error";ee="itemchange";ie="keystatuseschange";_.je="left";ke="license-renewal";le="license-request";_.me="line-left";_.ne="line-right";_.oe="live-turned-static";_.pe="loadeddata";_.qe="loadedmetadata";re="loadstart";_.se="main";_.te="mdat";_.ue="mdia";_.ve="message";
14
+ _.we="metadata";_.xe="mimeType";_.ye="minf";_.ze="moov";_.Ae="mpd-type-changed";_.Be="mpeg-dash-callback-event";_.Ce="none";_.r="number";_.De="object";_.Ee="onBitrateChanged()";_.Fe="onPlayerError()";_.Ge="onPlayerWillDestroy";_.He="onPlayerWillRelease";_.Ie="onStateChanged()";Je="online-status-changed";_.Ke="optional";_.Le="org.w3.clearkey";_.Me="output-restricted";_.Ne="pause";_.Oe="persistent";_.Pe="persistent-license";Qe="picture-in-picture";_.Re="play";Se="player.afterLoad.end";Te="player.afterLoad.start";
15
+ Ue="player.appendLoad.end";Ve="player.appendLoad.start";We="player.beforeLoad.end";Xe="player.beforeLoad.start";Ye="player.load.end";Ze="player.load.start";$e="player.setupPlaylist.end";af="player.setupPlaylist.start";_.bf="playing";_.cf="playlist-item-changed";_.df="playlist-modified";ef="playlist.next.end";ff="playlist.next.start";gf="preload-aborted";hf="preload-failed";jf="preloaded";kf="preloading";lf="primary-before-load";mf="primary-content";_.nf="progress";_.of="px";_.pf="ratechange";qf="released";
16
+ _.rf="releasing";sf="removetrack";_.tf="required";_.uf="resize";_.vf="right";_.wf="sc-playlist-ended";_.xf="sc-playlist-item-changed";_.yf="sc-playlist-live-turned-static";_.zf="sc-playlist-timeline-changed";_.Af="seeked";_.Bf="seeking";_.Cf="showing";_.Df="simid-creative-started";_.Ef="simid-creative-stopped";_.Ff="sinf";Gf="stalled";_.Hf="start";_.If="statechanged";Jf="status-pending";_.Kf="stbl";_.Lf="string";_.Mf="stsd";_.Nf="style";_.Of="subtitles-htmlcue";Pf="temporary";_.Qf="text/vtt";
17
+ _.Rf="text/xml";_.Sf="timeupdate";_.Tf="trak";_.Vf="ttml-xml";_.Wf="und";Xf="unknown";bg="update";_.cg="urn:scte:scte35";_.dg="urn:scte:scte35:2014";_.eg="user-seeked";_.fg="user-seeking";_.gg="value";_.hg="vertical-lr";_.ig="vertical-rl";_.t="video";_.jg="video/mp2t";_.kg="video/mp4";_.lg="videobufferchanged";_.mg="videotrackchanged";_.ng="vimond-response";og="visibilitychange";_.pg="vtt-xml";_.qg="waiting";_.rg="waitingforkey";sg="webkit-org.w3.clearkey";tg="webkitkeyadded";ug="webkitkeyerror";
18
+ vg="webkitkeymessage";wg="webkitneedkey";_.xg="width";yg="x-dt-csl-tracking-token";zg="x-dt-follow-up-token";Ag="x-dt-resp-code";Cg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Dg=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Cg(a)}};
19
+ Gg=function(a,b){if(b){var c=Eg;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&Fg(c,a,{configurable:!0,writable:!0,value:b})}};Hg=function(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})};_.w=function(a){return Hg(a())};
20
+ _.x=function(a,b){a=a.split(".");var c=Ig;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};_.Lg=function(a){return _.z(a)||Jg(a)?a:_.Kg(a)};_.Kg=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=Mg(b,{merging:a[c]},1));return b.merging||null};_.Ng=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
21
+ Mg=function(a,b,c){const d=c+1;if(_.z(a)||!_.Og(a))a={};for(const e in b)c=b[e],Jg(c)||_.z(c)||_.Pg(c)||c instanceof Element?a[e]=c:_.Og(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.Pg(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=Mg([],c,d):!_.z(c)&&_.Qg(c)&&20>d&&(a[e]=Mg(a[e],c,d));return a};Jg=function(a){a=typeof a;return a===_.Lf||a===_.r||a===_.Rc};_.z=function(a){return null===a||"undefined"===typeof a};_.Og=function(a){return typeof a===_.De};
22
+ _.Pg=function(a){return typeof a===_.Yd};_.Rg=function(a){return typeof a===_.Lf};_.Sg=function(a){return typeof a===_.r};_.Qg=function(a){if(_.z(a)||!_.Og(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
23
+ _.Tg=function(a,b,c,d){if(a===b||null===a&&null===b||void 0===a&&void 0===b)return!0;if(null===a&&null!==b||null!==a&&null===b||void 0!==a&&void 0===b||void 0===a&&void 0!==b||!_.Og(a)||!_.Og(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.z(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.z(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.z(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
24
+ Ug=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};Vg=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.Wg=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};Zg=function(a){return a&&0<=Xg[a]?Xg[a]:Yg};ah=function(a){if(!a)return _.B("clpp.log",Mb+a+ca),-1;const b=$g[a.toUpperCase()];return void 0===b?(_.B("clpp.log",Mb+a+ca),-1):b};_.ch=function(a){bh.info.apply(bh,arguments)};_.dh=function(a){bh.debug.apply(bh,arguments)};
25
+ _.B=function(a){bh.warn.apply(bh,arguments)};_.eh=function(a){bh.error.apply(bh,arguments)};_.hh=function(a){if(a){var b=a.a();b in _.fh?_.gh.warn("Player-Factory '"+b+"' already registered"):(_.fh[b]=a,_.gh.info("Registered Player-Factory: '"+b+"'"))}};ih=function(a){return Object.values(_.fh).find(a)||null};_.kh=function(a){var b=a.a;var c=[];for(const d in b.a)c.push.apply(c,b.a[d]);b=c;for(c=0;c<b.length;++c)jh(b[c]);a.a.clear()};
26
+ _.lh=function(a,b,c,d){const e=f=>{for(const g of c)a.off(b,g,e);d(f)};for(const f of c)a.on(b,f,e)};jh=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
27
+ th=function(a,b){a.h.debug("onMetadata_()");b.mode=_.$d;const c=[];let d=!0;const e=f=>{for(var g of c)if(f.startTime===g.startTime&&f.endTime===g.endTime)return g;g={schemeIdUri:"",value:"",startTime:0,endTime:0,id:"",type:_.mh,eventElement:null};a.o&&d&&"SCTE35-IN"===f.value.key&&0<f.startTime?(g.startTime=0,g.endTime=f.startTime):(g.startTime=f.startTime,g.endTime=f.endTime);d=!1;c.push(g);return c[c.length-1]};if(b.cues){for(const f of b.cues){if(nh(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
28
+ _.dg;g.type=_.oh;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.m.trigger(new _.C(_.ph,{detail:f}));Array.prototype.push.apply(a.g,c);qh(a,c,b);a.f.off(b,_.Cd);a.f.on(b,_.Cd,f=>{f=f.target.activeCues;f=f.length?nh(a,f[0]):a.a;var g;if(g=f){{g=f;const h=a.m.getPosition();g=g.startTime<=h&&h<g.endTime}}if(g)a.a=f,a.m.trigger(new _.C(_.rh,{detail:f}));else{if(f=a.a)f=a.a,g=a.m.getPosition(),f=f.endTime<=g;f&&(f=a.a,a.a=null,a.m.trigger(new _.C(_.sh,{detail:f})))}})}};
29
+ uh=function(a,b){a.j=b;a.l=a.j.textTracks;a.f.on(a.l,_.sc,c=>{c=c.track;c.kind===_.we&&th(a,c)})};nh=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};qh=function(a,b,c){if(a.o){for(;0<c.cues.length;)c.removeCue(c.cues[0]);b.forEach(function(d){c.addCue(new DataCue(d.startTime,d.endTime,{key:"SCTE35-OUT",data:null}))})}};_.xh=function(a){return Array.isArray(a)?a:[a]};
30
+ yh=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};Ah=function(a,b,c){if(null==a&&null==b)return!0;if(null==a||null==b)return!1;a=c?a.map(c):a;b=c?b.map(c):b;return zh(a,b)&&zh(b,a)};zh=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.Bh=function(a,b={}){if(b.Ye){const c=[];for(const d of a)c.some(e=>b.Ye(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};
31
+ Ch=function(a,b){b=b.track;b.kind!==_.we&&(b.mode===_.Cf&&(b.mode=_.$d),a.a.on(b,_.Cd,c=>{c=c.target||c.srcElement;c.mode=_.$d;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};Dh=function(a,b,c,d){a=`${a===_.E?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.Rg(d))a+=": "+d;else if(null!=d)if(null!=d.message)a+=": "+d.message,delete d.message;else try{a+=": "+JSON.stringify(d)}catch(e){}return a};
32
+ Eh=function(a,b){const c=b||yh;let d=null,e=null,f=!1;return function(...g){if(f&&c(g,d))return e;f=!0;d=g;return e=a(...g)}};_.Fh=function(a){return null!=a};Hh=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.Gh("No non-null, non-undefined value found");};Ih=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
33
+ _.Jh=function(a){var b;a instanceof _.Jh?(Kh(this,a.Xa),this.nc=a.nc,this.Ha=a.Ha,Lh(this,a.Dc),this.wa=a.wa,_.Mh(this,Nh(a.a)),this.ac=a.ac):a&&(b=String(a).match(Oh))?(Kh(this,b[1]||"",!0),this.nc=Ph(b[2]||""),this.Ha=Ph(b[3]||"",!0),Lh(this,b[4]),this.wa=Ph(b[5]||"",!0),_.Mh(this,b[6]||"",!0),this.ac=Ph(b[7]||"")):this.a=new _.Qh(null)};Kh=function(a,b,c){a.Xa=c?Ph(b,!0):b;a.Xa&&(a.Xa=a.Xa.replace(/:$/,""))};
34
+ Lh=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Dc=b}else a.Dc=null};_.Mh=function(a,b,c){b instanceof _.Qh?a.a=b:(c||(b=Rh(b,Sh)),a.a=new _.Qh(b))};Ph=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};Rh=function(a,b,c){return typeof a===_.Lf?(a=encodeURI(a).replace(b,Th),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};Th=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.Qh=function(a){this.f=a||null};
35
+ Nh=function(a){var b=new _.Qh;b.f=a.f;if(a.a){var c={},d;for(d in a.a)c[d]=a.a[d].concat();b.a=c;b.g=a.g}return b};Vh=function(a,b){const c=Uh[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.F?"":null};_.H=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.G(_.E,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};
36
+ _.Xh=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Wh.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Yh=function(a,b){a=_.Xh(a);b=_.Xh(b);return a.split("-")[0]===b.split("-")[0]};_.Zh=function(a,b){for(const c of a)if(!b(c))return!1;return!0};$h=function*(a){for(let b=0;b<a;b++)yield b};
37
+ bi=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(ai(a)===ai(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.I(a);b=_.I(b);for(const d of $h(a.byteLength))if(c[d]!==b[d])return!1;return!0};ai=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.I=function(a,b=0,c=Infinity){return ci(a,b,c,Uint8Array)};
38
+ ci=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=ai(a),g=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b*e,g));c=Math.min(a+Math.max(c*e,0),g);a/=e;return new d(f,a,c/e-a)};di=function(a,b=0,c=Infinity){return ci(a,b,c,Uint16Array)};ei=function(a,b=0,c=Infinity){return ci(a,b,c,Uint32Array)};_.fi=function(a,b=0,c=Infinity){return ci(a,b,c,Int32Array)};_.gi=function(a,b=0,c=Infinity){return ci(a,b,c,DataView)};
39
+ hi=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};ii=function(a){let b="";for(let c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};
40
+ _.ji=function(a){if(!a)return"";a=_.I(a);239===a[0]&&187===a[1]&&191===a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(Qa);return a}a=escape(ii(a));try{return decodeURIComponent(a)}catch(b){throw Error(Qa);}};
41
+ li=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw ki.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.I(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(_.I(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return ii(c)};
42
+ _.mi=function(a,b){if(_.Rg(a))return a;let c="";b=!!b;const d=_.I(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.ji(d):254===d[0]&&255===d[1]?c=li(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=li(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);ki.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=li(a,!1):0===d[1]&&0===d[3]?c=li(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.ji(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
43
+ };_.ni=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.oi=function(a,b){const c=new Uint8Array(2*a.length),d=new DataView(c.buffer);for(let e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
44
+ _.pi=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=ei(d):2===c?e=di(d):e=_.I(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.qi=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.ri=function(a,b){if(String.prototype.endsWith)return a.endsWith(b);const c=a.length-b.length;a=a.lastIndexOf(b,c);return-1!==a&&a===c};_.si=function(a){return!!(a&&0<a.length)};_.ti=function(a){return!a||0===a.length};
45
+ _.ui=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(Ug(b))return"";a="bps";1E3<=Math.abs(b)&&(a="Kbps",b/=1E3);1E3<=Math.abs(b)&&(a="Mbps",b/=1E3);return`${b.toFixed(2).replace(/[.,]00$/,"")}${a}`}catch(b){return""}};_.wi=function(a){a=a.replace(/<[^>]+>/gi,"");vi.innerHTML=a;a=vi.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.yi=function(a,b=!0){a=_.xi(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.xi=function(a){a=ii(_.I(a));return btoa(a)};
46
+ _.zi=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.Ai=function(a){const b=new Uint8Array(a.length/2);for(let c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b};_.Bi=function(a){let b="";for(let c=0;c<a.length;++c){let d=a[c].toString(16);1===d.length&&(d="0"+d);b+=d}return b};
47
+ _.Ci=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!==b.length)return!1;for(let c=0;c<a.length;++c)if(a[c]!==b[c])return!1;return!0};_.Di=function(a){var b=0;for(var c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);c=0;for(let d=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};
48
+ _.Ei=function(a,b){b.lastIndex=a.a;b=b.exec(a.f);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.a===a.f.length||null===b||b.position!==a.a)return null;a.a+=b.length;return b.results};
49
+ _.Ii=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.G(_.E,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.Fi(d);var f;(f=_.Ei(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.Ei(d,g);)c.push(new _.Gi(f[1],f[2]||f[3]))}return new _.Hi(a,b,c,e)};_.Ki=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...Ji]}};
50
+ Li=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts;a.fatalStatusCodes=b.fatalStatusCodes||[...Ji]};
51
+ _.Ni=function(a,b){_.Rg(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.Mi,uriIndex:0,method:a.method||"GET",body:a.body||null,headers:Object.assign({},a.headers),allowCrossSiteCredentials:a.allowCrossSiteCredentials||!1,onProgress:a.onProgress||null,onFragment:a.onFragment||null,maxAttempts:a.maxAttempts||1,currentAttempt:0,baseDelay:a.baseDelay||1E3,backoffFactor:a.backoffFactor||2,fuzzFactor:a.fuzzFactor||.5,timeout:a.timeout||0,requestModifiers:a.requestModifiers||
52
+ [],responseModifiers:a.responseModifiers||[],startTime:a.startTime||null,endTime:a.endTime||null,contentType:a.contentType||null,licenseRequestType:a.licenseRequestType||null,sessionId:null,bytesRemaining:-1,bytesLoaded:-1,bytesTotal:-1,timescale:a.timescale||null,rateLimitBps:a.rateLimitBps||null,disableFragmentSupport:a.disableFragmentSupport||!1,disableMergedFragments:a.disableMergedFragments||!1,fatalStatusCodes:[...Ji],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&Li(c,b);return c};
53
+ _.Oi=function(a,b,c,d,e,f,g,h){e&&(d=e);e={uri:d,data:b||new ArrayBuffer(0),headers:a,status:c,fromCache:!!a["x-shaka-from-cache"],timeMs:g,responseStartMs:h,request:f};if(200<=c&&299>=c&&202!==c)return e;g=null;try{g=_.mi(b,!0)}catch(k){}_.dh("HTTP error text:",g);throw new _.G(0<=(f.fatalStatusCodes||[]).indexOf(c)?_.E:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};
54
+ Pi=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};Qi=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};Ri=function(a,b,c){if(0>=a)return Promise.resolve();const d=8*c/a-b/1E3;return 0<d?new Promise(e=>{setTimeout(e,1E3*d)}):Promise.resolve()};
55
+ Si=function(a,b,c){try{const d=a(b);if(d&&d.P&&d.abort)return c.resolve(d.P),()=>d.abort();c.resolve(d);return()=>Promise.resolve(d).then(()=>{}).catch(()=>{})}catch(d){return c.reject(d),()=>Promise.resolve()}};Ti=function(a,b){a.P.then(()=>b(!0),()=>b(!1));return a};_.Ui=function(a,b){a.a.push(Ti(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};Vi=function(a,b){return _.w(function*(){const c=yield a.fetch(b);return _.ji(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
56
+ Wi=function(a,b){return _.w(function*(){const c=yield Vi(a,b);try{const d=JSON.parse(c);if(null==d||typeof d!==_.De)throw Error("Not an object");return d}catch(d){throw new _.Gh("Failed to parse JSON response","json-failed");}})};Xi=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.w(function*(){if(!navigator.onLine)return!1;if(b){const e=_.Ni(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).P}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
57
+ Yi=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.Zi=function(a){return a&&a!==_.Wf?a:null};
58
+ aj=function(a){if(!a)throw new _.G(_.E,3,3101,`Invalid track type: ${a}`);if(!_.Rg(a))throw new _.G(_.E,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.J:return _.J;case _.K:return _.K;case _.L:return _.L;case $i:return $i}throw new _.G(_.E,3,3101,`Unknown track type: ${a}.`);};
59
+ fj=function(a,b){a=aj(a);const c=_.Zi(b.kind);let d=b.id;d||(d=String(_.bj++));a=new _.ej(d,c===_.we?$i:a);a.kind=c;a.label=_.Zi(b.label);a.language=_.Zi(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.gj=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.g}${a.f}`};
60
+ _.hj=function(a,b,c){return a?(c||Object.keys(a).sort()).reduce(function(d,e){if(!(e in a))return d;const f=a[e];let g="\x26";""===d&&(g=b?"":"?");d=d+g+encodeURIComponent(e);return d=d+"\x3d"+encodeURIComponent(void 0===f?"":f)},""):""};_.ij=function(a){const b={};a=a||"";a=a.substring(a.indexOf("?")+1);for(const d of a.split("\x26")){var c=d.split("\x3d");a=decodeURIComponent(c[0]);c=decodeURIComponent(c[1]||"");a&&(b[a]=c)}return b};
61
+ jj=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};kj=function(a,b){return _.w(function*(){const c=_.Ni(b);return yield Vi(a.f,c)})};oj=function(a,b,c){return _.w(function*(){const {mimeType:d,renditions:e}=yield lj(a,b,c),f=new _.ej("dummy",_.L),g=e.map((h,k)=>{k=new _.mj(`R${k}`,f);k.bandwidth=h.bandwidth;k.Hc=h.Hc;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});nj(g);return{renditions:g,mimeType:d||void 0}})};
62
+ qj=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>pj(c));const b=new Map;a.forEach(c=>{if(c.type&&c.name){const d=`${c.type}:${c.name}`;if(b.has(d))throw Error("#EXT-X-MEDIA:NAME attributes are not unique. It is impossible to map HLS metadata to Safari data structures.");b.set(d,c)}});return b};lj=function(a,b,c){return _.w(function*(){const d=rj(b),e=sj(b,c);return{mimeType:yield tj(a,e,d[0]?d[0].codec:null),renditions:d}})};
63
+ nj=function(a){const b=new Set;a.forEach(c=>{b.add(`${c.width}x${c.height}`)});if(b.size<a.length)throw Error("Playlist contains multiple renditions with the same resolution.");};pj=function(a){const b=_.Ii(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.Jb);c=null!=c?{AUDIO:_.K,VIDEO:_.L,SUBTITLES:_.J}[c]:void 0;return{type:c,groupId:a(_.Ua),name:a("NAME"),language:a(_.bb),Fh:a("AUTOSELECT"),default:a("DEFAULT"),Mh:a("FORCED"),Xe:a("CHARACTERISTICS"),uri:a(_.Lb)}};
64
+ rj=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.Ii(0,b);if(c.getAttribute(_.Sb))throw Error("Playlist contains alternative video streams.");var d=_.H(c,_.Ab);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.H(c,_.ma);e=e?Number(e):null;var f=_.H(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.H(c,_.pa);c=_.uj(_.t,c?c.split(","):[]);return b={bandwidth:e,Hc:f,codec:c,width:b,height:d,mimeType:null}})};
65
+ sj=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?jj(a,b):null};tj=function(a,b,c){return _.w(function*(){if(!b||!c)return null;var d=yield kj(a,b);d=[vj(d,b),wj(d,b)].filter(Boolean);return _.xj(d,_.t,c)})};vj=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?jj(a,b):null};wj=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.H(_.Ii(0,a),_.Lb))?jj(a,b):null:null};
66
+ _.zj=function(a,b,c){for(const d of _.yj)if(d.probe(b,c))return d.create(a);return null};_.Aj=function(a){a=_.yj.indexOf(a);0<=a&&_.yj.splice(a,1)};Dj=function(a,b){var c=Bj;Cj.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.Hj=function(a,b){var c=[Ej,Fj,Gj,Bj];for(const d of c)if(c=Cj.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};_.Ij=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a};
67
+ Jj=function(a){a=a.split(/ *; */);a.shift();return(a=a.find(b=>b.startsWith("codecs\x3d")))?a.split("\x3d")[1].replace(/^"|"$/g,"").split(/ *, */).join(","):""};Kj=function(a,b,c){a.stop();let d=!0,e=null;a.a=()=>{c?clearInterval(e):clearTimeout(e);d=!1};const f=()=>{d&&a.f()};e=c?setInterval(f,1E3*b):setTimeout(f,1E3*b);return a};
68
+ Oj=function(){if(Lj)return Lj;Mj||(Mj=new _.Nj(()=>{Lj=null}));(Lj=document.querySelector(_.t)||document.querySelector(_.p))||(Lj=document.createElement(_.t));Mj.da(1);return Lj};_.Pj=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Qj=function(a){return(navigator.userAgent||"").includes(a)};_.Rj=function(a){return _.Qj("Tizen"+(a?" "+String(a):""))};
69
+ Tj=function(a){const b={major:-1,name:Xf};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Sj(a,c[0]));2<=c.length&&(b.minor=Sj(a,c[1]));3<=c.length&&(b.patch=Sj(a,c[2]));4<=c.length&&(b.build=Sj(a,c[3]));return b};_.Uj=function(){return _.Qj("Web0S")};_.Wj=function(){return _.Uj()&&79===Vj().major};
70
+ Vj=function(){const a=Xj();const b=["ie","edge","opera","firefox","safari",cd];var c=Yj();const d=Zj[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Tj(c[1]);return Tj("")};_.ak=function(){return _.Qj("CrKey")};_.bk=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Rj()};_.ck=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.bk()&&1<navigator.maxTouchPoints};_.dk=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
71
+ Sj=function(a,b){try{return parseInt(b,10)}catch(c){ek.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};fk=function(a,b){if(!a||!b||0===b.length)return!1;for(let c=0;c<b.length;c++)if(0<=a.indexOf(b[c]))return!0;return!1};
72
+ Yj=function(){const a=Xj();if(!a)return gk;var b=a.match(/^.+?(?=\))/);if(!b)return gk;b=b[0];if(fk(b,["iphone","ipad"]))return hk;if(fk(b,["android"]))return ik;if(fk(b,["macintosh"]))return jk;if(fk(b,["windows nt"]))return kk;if(fk(b,["tizen"]))return lk;if(fk(b,["web0s"]))return mk;if(fk(b,["linux"]))return nk;ek.warn("Unable to identify OS from user agent: "+a);return gk};Xj=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
73
+ _.pk=function(){var a=Yj();var b=Yj();var c=Zj[b];if(c){c=Xj().match(c.os_version)[1];c=Tj(c);if(b===kk)if("5.1"===c.name)c.name="xp";else if("6.1"===c.name)c.name="7";else if("6.2"===c.name||"6.3"===c.name)c.name="8";b=c}else b=Tj("");a:{c=Xj();const e=["ie","edge","opera","firefox","safari",cd];var d=Yj();d=Zj[d];for(let f=0,g=e.length;f<g;f++)if(d[e[f]]&&c.match(d[e[f]])){c=e[f];break a}c=ok}return{os:a,osVersion:b,browser:c,browserVersion:Vj()}};
74
+ qk=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.Tg(a,{kind:_.Zi(b.kind),language:_.Zi(b.language),label:_.Zi(b.label)},["kind","language","label"])};rk=function(a){return a.enabled||a.selected||a.mode===_.Cf||a.mode===_.$d};tk=function(a,b,c){return sk(a)&&b===_.L&&!!c.enableHlsVideoTrackInfo};
75
+ uk=function(a,b,c){return _.w(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.mimeType&&(b.mimeType=d.mimeType),d.renditions&&0<d.renditions.length&&(b.renditions=d.renditions,b.renditions.forEach(e=>{e.track=b})))})};vk=function(a,b,c){return sk(a)&&(b===_.K||b===_.J)&&!!c.enableMetadata};
76
+ wk=function(a,b,c){return _.w(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.Ac&&(d=d.Ac.get(`${b.type}:${b.label}`))&&d.Xe&&(b.accessibility=d.Xe.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};xk=function(a,b){return a.g.filter(c=>c.type===b)};yk=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};Ak=function(a,b){if(a=zk(a,b))a=Array.from(a),b===_.J&&(a=a.filter(c=>c.kind!==_.we));return a};
77
+ zk=function(a,b){if(!a.m)return null;a=a.m.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.K:return a.audioTracks;case _.L:return a.videoTracks;case _.J:return a.textTracks;default:return null}};Bk=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};Ck=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
78
+ Fk=function(a,b,c){const d=Ak(a,b);if(c){if(void 0===a.g.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.h.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.l.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.J:f="mode";e=_.Cf;g=_.Fd;break;case _.K:f="enabled";break;case _.L:f="selected"}if(f)for(const h of d)h[f]=qk(c,h,c.type)?e:g}}else if(a.h.debug(_.za+b),a.a.get(b)&&d&&b===_.J){for(e of d)e.mode=
79
+ _.Fd;a.a.set(b,null)}b===_.K?a.m.trigger(new _.C(_.Dk)):b===_.J&&a.m.trigger(new _.C(_.Ek))};Gk=function(a,b,c){if(a.m){var d=a.m.getSurface().getMedia();if(d){var e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);e.src=_.ti(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
80
+ Hk=function(a,b){return _.w(function*(){var c=a.m.getConfiguration(),d=_.zj(c,b.mimeType,_.Qf);if(d){c=_.Ni(b.url);var e=yield a.m.getNetworkEngine().fetch(c).P;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.I(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Qf},Gk(a,d,c))}else a.h.warn("Track MIME type is not supported",b)})};sk=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.Ik&&!a.url.endsWith(".m3u8"))&&_.bk()};
81
+ Jk=function(a,b,c){c=_.xh(c).filter(e=>e);a.h.info("Find preferred tracks for",b,c);const d=xk(a,b);c.some(e=>{const f=_.Xh(e);return(e=d.find(g=>{g=_.Xh(g.language||"");return _.Yh(f,g)}))?(a.h.info("Will select track with id",e.id),Fk(a,b,e),!0):!1})};Lk=function(a){return a.name===qb&&Kk.some(b=>a.message.startsWith(b))};
82
+ _.Ok=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.ck()&&(a=360);const b=_.Ki();b.maxAttempts=3;a={source:"",license:Mk,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.Ki(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,
83
+ restrictions:Nk(a),useCmsd:!1},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.se,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,
81
84
  alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,
82
- disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},restrictions:mk(),tizen:{sideStreamText:_.qj(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},trickPlay:{speedUpMode:_.wd,preferTrickPlayTracks:!0}};if(_.pj("Edge/")||_.qj())a.streaming.gapDetectionThreshold=.5;_.tj()&&(a.streaming.stallEnabled=!1);_.vj()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.qj()&&(a.streaming.stallEnabled=
83
- !0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};mk=function(a){a=void 0===a?Infinity:a;return{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}};
84
- _.pk=function(...a){if(!a)return _.nk();var b=[_.nk()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.Bg(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,ignoreDrift:!0,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{lowLatencyMode:!0}}),c=!0),b.push(d),null!=d.suggestedPresentationDelay&&b.push({manifest:{suggestedPresentationDelay:d.suggestedPresentationDelay}}));
85
- a=_.ug.apply(null,b);_.Bg(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.B(a.volume)&&(!_.Cg(a.volume)||Eg(a.volume)))throw new _.H(_.G,7,7100,"config.volume is not a number");if(!_.B(a.preferredTextLanguage)&&!_.Bg(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.G,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.B(a.preferredAudioLanguage)&&!_.Bg(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.G,
86
- 7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.B(a.preferredAudioCodec)&&!_.Bg(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.G,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.B(a.preferredVideoCodec)&&!_.Bg(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.G,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.B(a.drm)){if(a.drm.env&&!_.Bg(a.drm.env))throw new _.H(_.G,7,
87
- 7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.Bg(a.drm.offlineId))throw new _.H(_.G,7,7100,"config.drm.offlineId is not a string");}if(b=a.streaming){b.bufferingGoal=Number(b.bufferingGoal);b.rebufferingGoal=Number(b.rebufferingGoal);b.bufferBehind=Number(b.bufferBehind);b.smallGapLimit=Number(b.smallGapLimit);b.durationBackoff=Number(b.durationBackoff);if(!_.Cg(b.bufferingGoal)||Eg(b.bufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.Cg(b.rebufferingGoal)||
88
- Eg(b.rebufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.Cg(b.bufferBehind)||Eg(b.bufferBehind))throw new _.H(_.G,7,7100,"config.streaming.bufferBehind is not a number");if(!_.Cg(b.smallGapLimit)||Eg(b.smallGapLimit))throw new _.H(_.G,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.Cg(b.durationBackoff)||Eg(b.durationBackoff))throw new _.H(_.G,
89
- 7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;if(_.B(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.r)throw new _.H(_.G,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");ok(a.restrictions);ok(a.abr.restrictions);a.abr.initialRestrictions&&ok(a.abr.initialRestrictions)}return a};
90
- ok=function(a){_.B(a.maxPixels)&&(a.maxPixels=Infinity);_.B(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.B(a.maxHeight)&&(a.maxHeight=Infinity);_.B(a.maxWidth)&&(a.maxWidth=Infinity);_.B(a.minPixels)&&(a.minPixels=0);_.B(a.minBandwidth)&&(a.minBandwidth=0);_.B(a.minHeight)&&(a.minHeight=0);_.B(a.minWidth)&&(a.minWidth=0);a.minWidth=Number(a.minWidth);a.maxWidth=Number(a.maxWidth);a.minHeight=Number(a.minHeight);a.maxHeight=Number(a.maxHeight);a.minBandwidth=Number(a.minBandwidth);a.maxBandwidth=Number(a.maxBandwidth);
91
- a.minPixels=Number(a.minPixels);a.maxPixels=Number(a.maxPixels);if(Number.isNaN(a.minWidth)||Number.isNaN(a.maxWidth)||Number.isNaN(a.minHeight)||Number.isNaN(a.maxHeight)||Number.isNaN(a.minBandwidth)||Number.isNaN(a.maxBandwidth)||Number.isNaN(a.minPixels)||Number.isNaN(a.maxPixels))throw new _.H(_.G,7,7100,"Restrictions contain NaN");};_.qk=function(a){return typeof a===_.ve&&!Array.isArray(a)&&"source"in a};_.sk=function(a){return _.rk.get(a)||null};
92
- _.uk=function(a){_.rk.get(a.id())?tk.warn("Component already in use."):_.rk.set(a.id(),a)};vk=function(a){return Array.from(_.rk.values()).find(b=>b instanceof a)||null};wk=function(a){for(const b of _.rk.values())a(b)};xk=function(a){wk(b=>{b.o(a)})};yk=function(a){wk(b=>{b.h(a)})};zk=function(){wk(()=>{})};Ak=function(){wk(()=>{})};Bk=function(a){if(null!==vk(a))return null;a=new a;a.f();_.uk(a);tk.info("Installed component:",a.id());return a};
93
- Ck=function(a){if(a=vk(a))a.a(),_.rk.delete(a.id()),tk.info("Uninstalled component:",a.id())};Dk=function(a){return _.Yh(a,_.nd)||_.Yh(a,_.pd)};Ek=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[ig]=a.f),a.a&&(b.headers[jg]=a.a))};
94
- Fk=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[ig],a.a=b.headers[jg],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.g.debug("Loaded tracking token "+a.f),a.a&&a.g.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.Rh(_.gi(b))),{delay:a.renewalPeriod,lh:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.Hk=function(a){_.Gk[a.I]=a};
95
- _.Jk=function(a){const b={attemptParameters:_.ri(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Sa:{}};if(a&&(b.enforceSingleSession=!!a.enforceSingleSession,b.delayLicenseRequestUntilPlayed=!!a.delayLicenseRequestUntilPlayed,b.preferredDrmSystem=a.preferredDrmSystem,b.emeApi=a.emeApi,a.attemptParameters&&(b.attemptParameters=a.attemptParameters),b.enableSessionCacheForSkd=!!a.enableSessionCacheForSkd,void 0!==a.ignoreUnrecognizedInitData&&
96
- (b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),a.env)){const c=_.Gk[a.env]||null;if(!c)throw _.Og(_.sa,_.qb+a.env+_.aa),new _.H(_.G,6,6015,`DRM environment '${a.env}' is missing.`);b.Sa=_.Ik(c,a.customData)||{};_.Yh(a.env.toLowerCase(),Id)&&(b.enforceSingleSession=!0)}return b};Lk=function(a){a=Kk[a];if(!a)return null;const b=_.Oj();return b.os===Hj&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
97
- _.Ik=function(a,b){const c={};var d=b?b.widevineVideoRobustness:void 0,e=b?b.widevineAudioRobustness:void 0;const f=b?b.serverCertificate:void 0;var g=a.f[_.rd];if(g){var h=g.licenseUrl;d=rh(d,g.videoRobustness);e=rh(e,g.audioRobustness);var k=g.modifiers,l=qh(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=qh(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.vf?Lk(f):f;c[_.rd]=
98
- {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.nd])&&(c[_.nd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.pd])&&(c[_.pd]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
99
- modifiers:g.modifiers});return c};_.Mk=function(){throw new _.H(_.G,3,3E3);};_.Nk=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.J(a.f.buffer);b=_.J(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.Mk()}};_.N=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.Mk()}};_.Ok=function(a){return a.a<a.f.byteLength};_.Pk=function(){throw new _.H(_.G,3,3E3,"Buffer read out of bounds.");};_.Qk=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.Pk()}};
100
- _.Rk=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.Pk()}};_.P=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.Pk()}};_.Sk=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.Pk()}};_.Tk=function(a){let b=0,c=0;try{!0===a.h?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.Pk()}if(2097151<c)throw new _.H(_.G,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
101
- Uk=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.Qk(a);return c};_.Vk=function(a,b){a.a+b>a.f.byteLength&&_.Pk();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.J(c)};Wk=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Xk=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.Yk=function(a){for(;_.Ok(a.reader)&&!a.parser.a;)a.parser.Bd(a.start+a.headerSize,a.reader,a.partialOkay)};
102
- _.Zk=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.Bd(a.start+a.headerSize,a.reader,a.partialOkay)};_.$k=function(a){return b=>{const c=b.reader.Ca()-b.reader.getPosition();a(_.Vk(b.reader,c))}};_.al=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};bl=function(a){let b="";try{b=_.Uh(a)}catch(c){}return b};_.el=function(a){a=bl(a);let b="";a.length&&(b=(new _.dl(a)).a);return b};
103
- gl=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Rh(a)),d=_.gi(c.sinf[0]);(new _.fl).L(_.pf,_.Yk).L("schi",_.Yk).L("tenc",e=>{e.reader.skip(6);_.Qk(e.reader)&&(e.reader.skip(1),b=_.ii(_.Vk(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
104
- il=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.G,6,6102);let d;typeof b===_.vf?d=_.Wh(b,!0):d=b;a=_.Wh(bl(a),!0);b=new _.hl(12+a.byteLength+d.byteLength+c.byteLength,!0);_.N(b,a.byteLength);_.Nk(b,_.J(a));_.N(b,d.byteLength);_.Nk(b,_.J(d));_.N(b,c.byteLength);_.Nk(b,_.J(c));return _.J(b.buffer)};_.jl=function(a){var b=_.J(a.body);b=_.fi(b);a.headers[ra]=Cc;a.body=_.Vh("spc\x3d"+b).buffer};
105
- _.kl=function(a){let b;try{b=_.Rh(a.data)}catch(c){return}b=b.trim();"\x3cckc\x3e"===b.substr(0,5)&&"\x3c/ckc\x3e"===b.substr(-6)&&(b=b.slice(5,-6));try{const c=JSON.parse(b);c.ckc&&(b=c.ckc);c.CkcMessage&&(b=c.CkcMessage);c.License&&(b=c.License)}catch(c){}a.data=Ph(_.gi(b))};pl=function(a,b){b=ll(b);if(a==_.rd)return b+ml;if(a==_.pd)return b+nl;if(a==_.nd)return b+ol;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
106
- _.sl=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(ua)?c.customData&&(_.rl(b,a),a=b.uris[0],d&&c.customData.assetId&&(a+="?assetId\x3d"+encodeURI(`${c.customData.assetId}`),c.customData.variantId&&(a+="\x26variantId\x3d"+encodeURI(`${c.customData.variantId}`)),b.uris[0]=a)):ql.warn(fb)};
107
- _.tl=function(a,b){try{const c=_.J(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));ql.debug("Widevine License response",d);const e=atob(d.license),f=new Uint8Array(e.length);for(a=0;a<e.length;++a)f[a]=e.charCodeAt(a);b.data=f.buffer}catch(c){ql.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
108
- _.vl=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.sl(a,b,c,!1);b.headers[ra]=Cc;c={spc:_.ei(b.body)};if((a=a.drm)&&a.env.startsWith(va)&&d){a={};var e=_.Oi((new _.dl(ul(d))).f);d=e.keyId;if(e=e.assetId)ql.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(ql.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(ql.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(ql.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
109
- _.Xh(_.Ni(c,!0))};_.wl=function(a,b){ql.debug("Clearing response data");200===b.status&&(a=_.Rh(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.gi(a).buffer)};
110
- _.xl=function(a,b,c){b=bl(b);c=c&&c.customData?c.customData:{};b=new _.dl(ul(b));const d=_.Oi(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.$h(`${a}`)&&(d.assetId=a,ql.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.$h(`${e}`)&&(d.variantId=e,ql.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],ql.debug("KeyId found in FPS SKD. Removing other parameters")):
111
- a=["assetId","variantId"];b.f=_.Ni(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.Mi(b);return c.fpsContentId=b};_.yl=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ua))ql.warn(fb);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(va)){const c=new _.sh(b.uris[0]);let d=c.ya;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.ya=d;b.uris[0]=c.toString()}};Cl=function(a,b,c){_.sl(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.sh(b.uris[0]);c.a.add(_.Ge,a);b.uris[0]=c.toString()};
112
- ll=function(a){if(a===Dl)return"https://lic.drmtoday.com";if(a===El)return"https://lic.staging.drmtoday.com";if(a===Fl)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};ul=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
113
- _.rl=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.xg(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};Hl=function(a){const b={},c=a?a[kg]:void 0;a=Gl[a?a[kg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
114
- Jl=function(a,b=0){_.Ng("Registering EME Factory: "+a.a());a={priority:b,Ib:a};for(let c=0;c<Il.length;++c)if(Il[c].priority<b){Il.splice(c,0,a);return}Il.push(a)};Kl=function(a){if(a){const {Ib:b}=Il.find(({Ib:c})=>c.a()===a);if(b&&b.da())return _.Ng(Rb+b.a()),b.create();_.Ng("Cannot create selected EME manager. Choosing by priority list.")}for(const {Ib:b}of Il)if(b.da())return _.Ng(Rb+b.a()),b.create();throw Error("Missing EME managers");};
115
- _.Ml=function(a,b){a=_.Ll(a,b);return 1!=a.length?null:a[0]};_.Ll=function(a,b){return Array.prototype.filter.call(a.childNodes,c=>c instanceof Element&&c.tagName==b)};_.Nl=function(a){return Array.prototype.every.call(a.childNodes,b=>b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE)?a.textContent.trim():null};
116
- _.Ol=function(a,b){const c=new DOMParser;let d=null,e=null;try{e=c.parseFromString(a,_.Bf)}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d};_.Rl=function(a){var b=_.hi(a);b=parseInt(b.byteLength,10).toString(16);b=_.hi("12"+b+a);return new Pl(Ql,a,b)};
117
- _.Tl=function(a){const b=new _.Sl(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.Xk(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.Vk(b,16);f=_.ii(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let t=_.Qk(b),v=(t&127)>>>0,y=7;for(;128<=t&&28>=y;)t=_.Qk(b),v=(v|(t&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:v},k=t=>{switch(t){case 0:do if(!_.Ok(b))throw Error("not enough data to skip!");while(_.Qk(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
118
- break;case 3:for(;4!==(t=h()&7);)k(t);break;case 5:b.skip(4);break;default:throw Error("invalid wire type "+t);}},l=[];let m=null;for(;_.Ok(b);){var n=h(),q=n&7;n>>>=3;if(2===q){q=h();if(0>q)throw Error(`unable to read length of field ${n}`);q=Uk(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.Og("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.ei(m):"","keyIds",l.map(t=>_.ii(t)));return 0<l.length?_.Rl(_.ii(l[0])):null};
119
- _.Ul=function(a){const b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);b.push(a[5]);b.push(a[4]);b.push(a[7]);b.push(a[6]);a=_.J(a);a.set(b,0);return a};
120
- _.Zl=function(a){a:{var b=new _.Sl(new DataView(a.buffer),!0);_.P(b);for(_.Rk(b);_.Ok(b);)if(1===_.Rk(b)){var c=_.Rk(b);b=_.Vk(b,c);break a}b=null}b||(b=a);a=Th(b,!0);c=_.Ol(a,"WRMHEADER");a=c.getAttribute("version");var d=_.Ml(c,"DATA");c=(c=_.Ml(d,"LA_URL"))?_.Nl(c):"";var e;if(e=_.Ml(d,"KID"))if(e=_.Nl(e)){var f=_.Ml(d,ma);e={value:e,Md:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=Vl(d))?[e]:(d=Wl(d))?d:null;const {value:g="",Md:h}=d&&d[0]||{};d=_.gi(g);d=_.Ul(d);d=_.ii(d);return new _.Xl(_.Yl,
121
- d,c,b,a,h)};Vl=function(a){a=_.Ml(a,"PROTECTINFO");if(!a)return null;var b=_.Ml(a,"KID");if(!b)return null;a=b.getAttribute("VALUE");if(!a)return null;const c=b.getAttribute(ma);b=b.getAttribute("ALGID");return{value:a,Md:c,Qf:b}};
122
- Wl=function(a){a=_.Ml(a,"PROTECTINFO");if(!a)return null;a=_.Ml(a,"KIDS");if(!a)return null;var b=_.Ll(a,"KID");if(!b.length)return null;a=[];for(const c of b)if(b=c.getAttribute("VALUE")){const d=c.getAttribute(ma),e=c.getAttribute("ALGID");a.push({value:b,Md:d,Qf:e})}return a.length?a:null};_.am=function(a){$l&&performance.mark(a)};_.bm=function(a,b,c){$l&&performance.measure(a,b,c)};
123
- cm=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.mj(c)).ca(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};_.em=function(a){return dm(a)?_.pd:a};fm=function(a,b){const c=[];b.forEach((d,e)=>{c.push({keySystem:e,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(const d of a)d.drmInfos=c};
124
- gm=function(a,b){if(a.keySystem){var c=_.em(a.keySystem);b=b[c];c===_.De&&a.licenseServerUri||(b&&(a.licenseServerUri=b.licenseUrl||""),a.keyIds||(a.keyIds=[]),b&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=b.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=b.persistentStateRequired),a.videoRobustness||(a.videoRobustness=b.videoRobustness||""),a.audioRobustness||(a.audioRobustness=b.audioRobustness||""),a.serverCertificate||(a.serverCertificate=
125
- b.serverCertificate||null)))}};hm=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};jm=function(a){return(a.audioCapabilities||[]).some(im)||(a.videoCapabilities||[]).some(im)};km=function(a,b){a=_.el(b);_.Og("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
126
- lm=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&"APPLE"===h){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.zg(k)||(k=km);let l="";try{l=k(b,c,g)}catch(m){throw new _.H(_.G,6,6103);}if(!l.length)throw new _.H(_.G,6,6101,"Content ID is an empty string");c=il(c,l,a)}return c};dm=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
127
- im=function(a){return null!=a.robustness&&""!==a.robustness};mm=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.ji(g,f.serverCertificate))||c.push(f.serverCertificate));if(f.initData){for(const g of f.initData)g.periodId=f.periodId;for(const g of f.initData)d.some(h=>h.keyId&&h.keyId==g.keyId&&h.periodId===g.periodId?!0:!1)||d.push(g)}if(f.keyIds)for(a=0;a<f.keyIds.length;++a)e.includes(f.keyIds[a])||e.push(f.keyIds[a])}};
128
- nm=function(a){var b=a.j;const c=a.W;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"==d)&&a.U(new _.H(_.G,6,6014));a.D.ke(_.Gg(c));a.o||a.g.info(ta);a.o=!0;a.B=!1};om=function(a){a.f.forEach((b,c)=>{const d=b.fe;let e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.fe=e)})};
129
- pm=function(a){return _.x(function*(){a.w.release();a.w=null;a.K.release();a.K=null;a.o=!1;a.B=!1;a.F.reject();a.Z.stop();a.Z=null;a.T.stop();a.T=null;const b=Array.from(a.f.keys());for(const c of a.f.values())c.qc&&c.qc.stop();a.f.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.x(function*(){a.g.debug("Closing session",c.sessionId);try{yield cm(c)}catch(d){a.g.warn("Error while closing session",d)}}))));if(a.A){try{yield a.l.h(null)}catch(c){a.g.warn("Error while resetting media keys",
130
- c)}a.A=null}a.l=null;a.a=null;a.J.clear();a.G=null;a.I=[];a.h=null;a.U=null;a.D=null;a.N=0;a.M=null})};_.tm=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=Fg(a.h.Sa);fm(b,d)}if(d=qm(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)gm(f,a.h.Sa);b=rm(a,b);if(!b.size)return a.R=!0,Promise.resolve();_.am(Bd);a=_.sm(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.am(Ad);_.bm("DRM queryMediaKeys_()",Bd,Ad)})};
131
- _.vm=function(a,b,c){a.H=um;a.I=c;a.C=0<c.length;a.g.debug("Using Persisted Licenses: "+a.C);a.h&&a.h.enableSessionCacheForSkd&&a.g.info("Enabled session cache for SKD license requests");return _.tm(a,b)};
132
- _.sm=function(a,b){if(1==b.size&&b.has(""))return Promise.reject(new _.H(_.G,6,6E3));null===a.l&&(a.l=Kl(a.h.emeApi));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.wm;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)==h&&(d=d.catch(()=>{if(a.ra)return null;if(l===_.pd){if(_.oj()&&!a.h.Sa[l].useLegacySystem)return k.label=qd,a.l.a(qd,[k]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
133
- k.label=_.pd;hm(k);return a.l.a(l,[k])});hm(k)}return a.l.a(l,[k]).catch(m=>{a:{if(l===_.rd&&jm(k)){const n=_.Oj();if(jm(k)&&n.os===Hj&&n.browser===Wc){a.g.warn("requestMediaKeySystemAccess() failed",m);a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");hm(k);m=a.l.a(l,[k]);break a}}throw m;}return m})}))};let f=a.h.preferredDrmSystem;if(!f){var g=_.Oj();if(g.os===Jj&&10<=g.osVersion.major&&"edge"===g.browser)f=_.pd;else if("safari"===
134
- g.browser)f=_.nd;else if(g.browser===Wc||"firefox"===g.browser)f=_.rd}f&&(g=b.get(f))&&(e(!0,g,f),e(!1,g,f));for(const h of[!0,!1])b.forEach((k,l)=>{l!==f&&e(h,k,l)});d=d.catch(h=>{throw new _.H(_.G,6,6001,null,h);});d=d.then(h=>{if(a.ra)return null;a.J.clear();var k=h.getConfiguration();a.g.info("Got MediaKeySystemAccess with configuration",k);var l=k.audioCapabilities||[];k=k.videoCapabilities||[];for(var m of l)a.J.add(m.contentType);for(var n of k)a.J.add(n.contentType);{l=h.keySystem;m=b.get(_.em(h.keySystem));
135
- n=[];k=[];const q=[],t=[];mm(m.drmInfos,n,k,q,t);1<k.length&&_.C("Multiple unique server certificates found! Only the first will be used.");1<n.length&&_.C("Multiple unique license server URIs found! Only the first will be used.");l={keySystem:l,licenseServerUri:n[0],distinctiveIdentifierRequired:m.distinctiveIdentifier==_.gf,persistentStateRequired:m.persistentState==_.gf,audioRobustness:m.audioCapabilities?m.audioCapabilities[0].robustness:"",videoRobustness:m.videoCapabilities?m.videoCapabilities[0].robustness:
136
- "",serverCertificate:k[0],initData:q,keyIds:t,periodId:null}}a.a=l;if(!a.a.licenseServerUri)throw new _.H(_.G,6,6012,a.a.keySystem);return h.createMediaKeys()}).then(h=>{a.ra||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.G=h,a.R=!0)}).catch(h=>{if(!a.ra){a.a=null;a.J.clear();if(h instanceof _.H)throw h;throw new _.H(_.G,6,6002,{browserError:h.message});}});c.reject();return d};
137
- qm=function(a){a=Fg(a.h.Sa[_.De]||{});if(0==a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.hi(f);e=_.hi(e);e={kty:"oct",kid:_.fi(f,!1),k:_.fi(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Vh(d),initDataType:"keyids"}];return{keySystem:_.De,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
85
+ disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},restrictions:Nk(),tizen:{sideStreamText:_.Rj(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},trickPlay:{speedUpMode:_.Dd,preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Tb,cropTimeline:!1}};if(_.Qj("Edge/")||_.Rj())a.streaming.gapDetectionThreshold=.5;_.Uj()&&(a.streaming.stallEnabled=!1);_.Wj()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=
86
+ .02);_.Rj()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};Nk=function(a){a=void 0===a?Infinity:a;return{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}};
87
+ _.Qk=function(...a){if(!a)return _.Ok();var b=[_.Ok()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.Rg(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,ignoreDrift:!0,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{lowLatencyMode:!0}}),c=!0),b.push(d),null!=d.suggestedPresentationDelay&&b.push({manifest:{suggestedPresentationDelay:d.suggestedPresentationDelay}}));
88
+ a=_.Kg.apply(null,b);_.Rg(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.z(a.volume)&&(!_.Sg(a.volume)||Ug(a.volume)))throw new _.G(_.E,7,7100,"config.volume is not a number");if(!_.z(a.preferredTextLanguage)&&!_.Rg(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.G(_.E,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.z(a.preferredAudioLanguage)&&!_.Rg(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.G(_.E,
89
+ 7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.z(a.preferredAudioCodec)&&!_.Rg(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.G(_.E,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.z(a.preferredVideoCodec)&&!_.Rg(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.G(_.E,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.z(a.drm)){if(a.drm.env&&!_.Rg(a.drm.env))throw new _.G(_.E,7,
90
+ 7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.Rg(a.drm.offlineId))throw new _.G(_.E,7,7100,"config.drm.offlineId is not a string");}if(b=a.streaming){b.bufferingGoal=Number(b.bufferingGoal);b.rebufferingGoal=Number(b.rebufferingGoal);b.bufferBehind=Number(b.bufferBehind);b.smallGapLimit=Number(b.smallGapLimit);b.durationBackoff=Number(b.durationBackoff);if(!_.Sg(b.bufferingGoal)||Ug(b.bufferingGoal))throw new _.G(_.E,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.Sg(b.rebufferingGoal)||
91
+ Ug(b.rebufferingGoal))throw new _.G(_.E,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.G(_.E,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.Sg(b.bufferBehind)||Ug(b.bufferBehind))throw new _.G(_.E,7,7100,"config.streaming.bufferBehind is not a number");if(!_.Sg(b.smallGapLimit)||Ug(b.smallGapLimit))throw new _.G(_.E,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.Sg(b.durationBackoff)||Ug(b.durationBackoff))throw new _.G(_.E,
92
+ 7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;if(_.z(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.r)throw new _.G(_.E,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Pk(a.restrictions);Pk(a.abr.restrictions);a.abr.initialRestrictions&&Pk(a.abr.initialRestrictions)}return a};
93
+ Pk=function(a){_.z(a.maxPixels)&&(a.maxPixels=Infinity);_.z(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.z(a.maxHeight)&&(a.maxHeight=Infinity);_.z(a.maxWidth)&&(a.maxWidth=Infinity);_.z(a.minPixels)&&(a.minPixels=0);_.z(a.minBandwidth)&&(a.minBandwidth=0);_.z(a.minHeight)&&(a.minHeight=0);_.z(a.minWidth)&&(a.minWidth=0);a.minWidth=Number(a.minWidth);a.maxWidth=Number(a.maxWidth);a.minHeight=Number(a.minHeight);a.maxHeight=Number(a.maxHeight);a.minBandwidth=Number(a.minBandwidth);a.maxBandwidth=Number(a.maxBandwidth);
94
+ a.minPixels=Number(a.minPixels);a.maxPixels=Number(a.maxPixels);if(Number.isNaN(a.minWidth)||Number.isNaN(a.maxWidth)||Number.isNaN(a.minHeight)||Number.isNaN(a.maxHeight)||Number.isNaN(a.minBandwidth)||Number.isNaN(a.maxBandwidth)||Number.isNaN(a.minPixels)||Number.isNaN(a.maxPixels))throw new _.G(_.E,7,7100,"Restrictions contain NaN");};Rk=function(a){return typeof a===_.De&&!Array.isArray(a)&&"source"in a};_.Tk=function(a){return _.Sk.get(a)||null};
95
+ _.Vk=function(a){_.Sk.get(a.id())?Uk.warn("Component already in use."):_.Sk.set(a.id(),a)};Wk=function(a){return Array.from(_.Sk.values()).find(b=>b instanceof a)||null};Xk=function(a){for(const b of _.Sk.values())a(b)};Yk=function(a){Xk(b=>{b.o(a)})};Zk=function(a){Xk(b=>{b.g(a)})};$k=function(){Xk(()=>{})};al=function(){Xk(()=>{})};bl=function(a){if(null!==Wk(a))return null;a=new a;a.f();_.Vk(a);Uk.info("Installed component:",a.id());return a};
96
+ dl=function(a){if(a=Wk(a))a.a(),_.Sk.delete(a.id()),Uk.info("Uninstalled component:",a.id())};el=function(a){return _.qi(a,_.ud)||_.qi(a,_.wd)};fl=function(a,b){3===b.type&&(a.f&&(a.h.debug("Attaching tracking token"),b.headers[yg]=a.f),a.a&&(b.headers[zg]=a.a))};
97
+ gl=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[yg],a.a=b.headers[zg],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.h.debug("Loaded tracking token "+a.f),a.a&&a.h.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.ji(_.zi(b))),{delay:a.renewalPeriod,Ch:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.il=function(a){_.hl[a.I]=a};
98
+ _.kl=function(a){const b={attemptParameters:_.Ki(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Qa:{}};if(a&&(b.enforceSingleSession=!!a.enforceSingleSession,b.delayLicenseRequestUntilPlayed=!!a.delayLicenseRequestUntilPlayed,b.preferredDrmSystem=a.preferredDrmSystem,b.emeApi=a.emeApi,a.attemptParameters&&(b.attemptParameters=a.attemptParameters),b.enableSessionCacheForSkd=!!a.enableSessionCacheForSkd,void 0!==a.ignoreUnrecognizedInitData&&
99
+ (b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),a.env)){const c=_.hl[a.env]||null;if(!c)throw _.dh(_.ua,_.xb+a.env+_.aa),new _.G(_.E,6,6015,`DRM environment '${a.env}' is missing.`);b.Qa=_.jl(c,a.customData)||{};_.qi(a.env.toLowerCase(),Pd)&&(b.enforceSingleSession=!0)}return b};ml=function(a){a=ll[a];if(!a)return null;const b=_.pk();return b.os===ik&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
100
+ _.jl=function(a,b){const c={};var d=b?b.widevineVideoRobustness:void 0,e=b?b.widevineAudioRobustness:void 0;const f=b?b.serverCertificate:void 0;var g=a.f[_.yd];if(g){var h=g.licenseUrl;d=Ih(d,g.videoRobustness);e=Ih(e,g.audioRobustness);var k=g.modifiers,l=Hh(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=Hh(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.Lf?ml(f):f;c[_.yd]=
101
+ {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.ud])&&(c[_.ud]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.wd])&&(c[_.wd]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
102
+ modifiers:g.modifiers});return c};_.nl=function(){throw new _.G(_.E,3,3E3);};_.ol=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.I(a.f.buffer);b=_.I(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.nl()}};_.N=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.nl()}};_.pl=function(a){return a.a<a.f.byteLength};_.ql=function(){throw new _.G(_.E,3,3E3,"Buffer read out of bounds.");};_.rl=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.ql()}};
103
+ _.sl=function(a){try{const b=a.f.getUint16(a.a,a.g);a.a+=2;return b}catch(b){_.ql()}};_.O=function(a){try{const b=a.f.getUint32(a.a,a.g);a.a+=4;return b}catch(b){_.ql()}};_.tl=function(a){try{const b=a.f.getInt32(a.a,a.g);a.a+=4;return b}catch(b){_.ql()}};_.ul=function(a){let b=0,c=0;try{!0===a.g?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.ql()}if(2097151<c)throw new _.G(_.E,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
104
+ vl=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.rl(a);return c};_.wl=function(a,b){a.a+b>a.f.byteLength&&_.ql();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.I(c)};xl=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.yl=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.zl=function(a){for(;_.pl(a.reader)&&!a.parser.a;)a.parser.Gd(a.start+a.headerSize,a.reader,a.partialOkay)};
105
+ _.Al=function(a){for(let b=_.O(a.reader);0<b&&!a.parser.a;--b)a.parser.Gd(a.start+a.headerSize,a.reader,a.partialOkay)};_.Bl=function(a){return b=>{const c=b.reader.Aa()-b.reader.getPosition();a(_.wl(b.reader,c))}};_.Cl=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};Dl=function(a){let b="";try{b=_.mi(a)}catch(c){}return b};_.Fl=function(a){a=Dl(a);let b="";a.length&&(b=(new _.El(a)).a);return b};
106
+ Hl=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.ji(a)),d=_.zi(c.sinf[0]);(new _.Gl).M(_.Ff,_.zl).M("schi",_.zl).M("tenc",e=>{e.reader.skip(6);_.rl(e.reader)&&(e.reader.skip(1),b=_.Bi(_.wl(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
107
+ Jl=function(a,b,c){if(!c||!c.byteLength)throw new _.G(_.E,6,6102);let d;typeof b===_.Lf?d=_.oi(b,!0):d=b;a=_.oi(Dl(a),!0);b=new _.Il(12+a.byteLength+d.byteLength+c.byteLength,!0);_.N(b,a.byteLength);_.ol(b,_.I(a));_.N(b,d.byteLength);_.ol(b,_.I(d));_.N(b,c.byteLength);_.ol(b,_.I(c));return _.I(b.buffer)};_.Kl=function(a){var b=_.I(a.body);b=_.yi(b);a.headers[ta]=Fc;a.body=_.ni("spc\x3d"+b).buffer};
108
+ _.Ll=function(a){let b;try{b=_.ji(a.data)}catch(c){return}b=b.trim();"\x3cckc\x3e"===b.substr(0,5)&&"\x3c/ckc\x3e"===b.substr(-6)&&(b=b.slice(5,-6));try{const c=JSON.parse(b);c.ckc&&(b=c.ckc);c.CkcMessage&&(b=c.CkcMessage);c.License&&(b=c.License)}catch(c){}a.data=hi(_.zi(b))};Tl=function(a,b){b=Ml(b);if(a===_.yd)return b+Nl;if(a===_.wd)return b+Ol;if(a===_.ud)return b+Sl;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
109
+ _.Wl=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(wa)?c.customData&&(_.Vl(b,a),a=b.uris[0],d&&c.customData.assetId&&(a+="?assetId\x3d"+encodeURI(`${c.customData.assetId}`),c.customData.variantId&&(a+="\x26variantId\x3d"+encodeURI(`${c.customData.variantId}`)),b.uris[0]=a)):Ul.warn(jb)};
110
+ _.Xl=function(a,b){try{const c=_.I(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Ul.debug("Widevine License response",d);const e=atob(d.license),f=new Uint8Array(e.length);for(a=0;a<e.length;++a)f[a]=e.charCodeAt(a);b.data=f.buffer}catch(c){Ul.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
111
+ _.Zl=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Wl(a,b,c,!1);b.headers[ta]=Fc;c={spc:_.xi(b.body)};if((a=a.drm)&&a.env.startsWith(xa)&&d){a={};var e=_.ij((new _.El(Yl(d))).f);d=e.keyId;if(e=e.assetId)Ul.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Ul.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Ul.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Ul.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
112
+ _.pi(_.hj(c,!0))};_.$l=function(a,b){Ul.debug("Clearing response data");200===b.status&&(a=_.ji(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.zi(a).buffer)};
113
+ _.am=function(a,b,c){b=Dl(b);c=c&&c.customData?c.customData:{};b=new _.El(Yl(b));const d=_.ij(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.si(`${a}`)&&(d.assetId=a,Ul.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.si(`${e}`)&&(d.variantId=e,Ul.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Ul.debug("KeyId found in FPS SKD. Removing other parameters")):
114
+ a=["assetId","variantId"];b.f=_.hj(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.gj(b);return c.fpsContentId=b};_.bm=function(a,b){a=a.drm;if(!a||!a.env.startsWith(wa))Ul.warn(jb);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(xa)){const c=new _.Jh(b.uris[0]);let d=c.wa;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.wa=d;b.uris[0]=c.toString()}};cm=function(a,b,c){_.Wl(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.Jh(b.uris[0]);c.a.add(_.Oe,a);b.uris[0]=c.toString()};
115
+ Ml=function(a){if(a===dm)return"https://lic.drmtoday.com";if(a===em)return"https://lic.staging.drmtoday.com";if(a===fm)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Yl=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
116
+ _.Vl=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.Ng(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};hm=function(a){const b={},c=a?a[Ag]:void 0;a=gm[a?a[Ag]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
117
+ jm=function(a,b=0){_.ch("Registering EME Factory: "+a.a());a={priority:b,Kb:a};for(let c=0;c<im.length;++c)if(im[c].priority<b){im.splice(c,0,a);return}im.push(a)};km=function(a){if(a){const {Kb:b}=im.find(({Kb:c})=>c.a()===a);if(b&&b.isSupported())return _.ch(Xb+b.a()),b.create();_.ch("Cannot create selected EME manager. Choosing by priority list.")}for(const {Kb:b}of im)if(b.isSupported())return _.ch(Xb+b.a()),b.create();throw Error("Missing EME managers");};
118
+ _.mm=function(a,b){a=_.lm(a,b);return 1!==a.length?null:a[0]};_.lm=function(a,b){return Array.prototype.filter.call(a.childNodes,c=>c instanceof Element&&c.tagName===b)};_.nm=function(a){return Array.prototype.every.call(a.childNodes,b=>b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE)?a.textContent.trim():null};
119
+ _.om=function(a,b){const c=new DOMParser;let d=null,e=null;try{e=c.parseFromString(a,_.Rf)}catch(f){}e&&e.documentElement.tagName===b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d};_.rm=function(a){var b=_.Ai(a);b=parseInt(b.byteLength,10).toString(16);b=_.Ai("12"+b+a);return new pm(qm,a,b)};
120
+ _.tm=function(a){const b=new _.sm(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.O(b);var c=_.O(b);c=_.yl(c);var d=_.O(b);const e=d>>>24;d&=16777215;var f=_.wl(b,16);f=_.Bi(f);if(0<e){var g=_.O(b);b.skip(16*g)}g=_.O(b);const h=()=>{let u=_.rl(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.rl(b),v=(v|(u&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:v},k=u=>{switch(u){case 0:do if(!_.pl(b))throw Error("not enough data to skip!");while(_.rl(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
121
+ break;case 3:for(;4!==(u=h()&7);)k(u);break;case 5:b.skip(4);break;default:throw Error("invalid wire type "+u);}},l=[];let m=null;for(;_.pl(b);){var n=h(),q=n&7;n>>>=3;if(2===q){q=h();if(0>q)throw Error(`unable to read length of field ${n}`);q=vl(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.dh("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.xi(m):"","keyIds",l.map(u=>_.Bi(u)));return 0<l.length?_.rm(_.Bi(l[0])):null};
122
+ _.um=function(a){const b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);b.push(a[5]);b.push(a[4]);b.push(a[7]);b.push(a[6]);a=_.I(a);a.set(b,0);return a};
123
+ _.zm=function(a){a:{var b=new _.sm(new DataView(a.buffer),!0);_.O(b);for(_.sl(b);_.pl(b);)if(1===_.sl(b)){var c=_.sl(b);b=_.wl(b,c);break a}b=null}b||(b=a);a=li(b,!0);c=_.om(a,"WRMHEADER");a=c.getAttribute("version");var d=_.mm(c,"DATA");c=(c=_.mm(d,"LA_URL"))?_.nm(c):"";var e;if(e=_.mm(d,"KID"))if(e=_.nm(e)){var f=_.mm(d,oa);e={value:e,Rd:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=vm(d))?[e]:(d=wm(d))?d:null;const {value:g="",Rd:h}=d&&d[0]||{};d=_.zi(g);d=_.um(d);d=_.Bi(d);return new _.xm(_.ym,
124
+ d,c,b,a,h)};vm=function(a){a=_.mm(a,"PROTECTINFO");if(!a)return null;var b=_.mm(a,"KID");if(!b)return null;a=b.getAttribute("VALUE");if(!a)return null;const c=b.getAttribute(oa);b=b.getAttribute("ALGID");return{value:a,Rd:c,ag:b}};
125
+ wm=function(a){a=_.mm(a,"PROTECTINFO");if(!a)return null;a=_.mm(a,"KIDS");if(!a)return null;var b=_.lm(a,"KID");if(!b.length)return null;a=[];for(const c of b)if(b=c.getAttribute("VALUE")){const d=c.getAttribute(oa),e=c.getAttribute("ALGID");a.push({value:b,Rd:d,ag:e})}return a.length?a:null};_.Bm=function(a){Am&&performance.mark(a)};_.Cm=function(a,b,c){Am&&performance.measure(a,b,c)};
126
+ Dm=function(a){return _.w(function*(){const b=new Promise(c=>{(new _.Nj(c)).da(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.B("Timeout waiting for session close")})};_.Fm=function(a){return Em(a)?_.wd:a};Gm=function(a,b){const c=[];b.forEach((d,e)=>{c.push({keySystem:e,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(const d of a)d.drmInfos=c};
127
+ Hm=function(a,b){if(a.keySystem){var c=_.Fm(a.keySystem);b=b[c];c===_.Le&&a.licenseServerUri||(b&&(a.licenseServerUri=b.licenseUrl||""),a.keyIds||(a.keyIds=[]),b&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=b.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=b.persistentStateRequired),a.videoRobustness||(a.videoRobustness=b.videoRobustness||""),a.audioRobustness||(a.audioRobustness=b.audioRobustness||""),a.serverCertificate||(a.serverCertificate=
128
+ b.serverCertificate||null)))}};_.Im=function(a,b){b=_.Ij(a.mimeType,b||a.codecs);if(_.Hj(b,a.type)){a=a.type;var c=_.Hj(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};Jm=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};Lm=function(a){return(a.audioCapabilities||[]).some(Km)||(a.videoCapabilities||[]).some(Km)};
129
+ Mm=function(a,b){a=_.Fl(b);_.dh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
130
+ Nm=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&"APPLE"===h){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.Pg(k)||(k=Mm);let l="";try{l=k(b,c,g)}catch(m){throw new _.G(_.E,6,6103);}if(!l.length)throw new _.G(_.E,6,6101,"Content ID is an empty string");c=Jl(c,l,a)}return c};Em=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
131
+ Km=function(a){return null!=a.robustness&&""!==a.robustness};Om=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.Ci(g,f.serverCertificate))||c.push(f.serverCertificate));if(f.initData){for(const g of f.initData)g.periodId=f.periodId;for(const g of f.initData)d.some(h=>h.keyId&&h.keyId===g.keyId&&h.periodId===g.periodId?!0:!1)||d.push(g)}if(f.keyIds)for(a=0;a<f.keyIds.length;++a)e.includes(f.keyIds[a])||e.push(f.keyIds[a])}};
132
+ Pm=function(a){var b=a.j;const c=a.W;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.V(new _.G(_.E,6,6014));a.D.oe(_.Wg(c));a.o||a.h.info(va);a.o=!0;a.B=!1};Qm=function(a){a.f.forEach((b,c)=>{const d=b.je;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.ne(c.sessionId,e),b.je=e)})};
133
+ Rm=function(a){return _.w(function*(){a.w.release();a.w=null;a.K.release();a.K=null;a.o=!1;a.B=!1;a.F.reject();a.X.stop();a.X=null;a.T.stop();a.T=null;const b=Array.from(a.f.keys());for(const c of a.f.values())c.sc&&c.sc.stop();a.f.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.w(function*(){a.h.debug("Closing session",c.sessionId);try{yield Dm(c)}catch(d){a.h.warn("Error while closing session",d)}}))));if(a.A){try{yield a.l.g(null)}catch(c){a.h.warn("Error while resetting media keys",
134
+ c)}a.A=null}a.l=null;a.a=null;a.H.clear();a.G=null;a.J=[];a.g=null;a.V=null;a.D=null;a.N=0;a.L=null})};_.Vm=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=Vg(a.g.Qa);Gm(b,d)}if(d=Sm(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)Hm(f,a.g.Qa);b=Tm(a,b);if(!b.size)return a.R=!0,Promise.resolve();_.Bm(Id);a=_.Um(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.Bm(Hd);_.Cm("DRM queryMediaKeys_()",Id,Hd)})};
135
+ _.Xm=function(a,b,c){c=void 0===c?[]:c;a.I=Wm;a.J=c;a.C=0<c.length;a.h.debug("Using Persisted Licenses: "+a.C);a.g&&a.g.enableSessionCacheForSkd&&a.h.info("Enabled session cache for SKD license requests");return _.Vm(a,b)};
136
+ _.Um=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.G(_.E,6,6E3));null===a.l&&(a.l=km(a.g.emeApi));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.Ym;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)===h&&(d=d.catch(()=>{if(a.pa)return null;if(l===_.wd){if(_.Pj()&&!a.g.Qa[l].useLegacySystem)return k.label=xd,a.l.a(xd,[k]).catch(()=>{a.h.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
137
+ k.label=_.wd;Jm(k);return a.l.a(l,[k])});Jm(k)}return a.l.a(l,[k]).catch(m=>{a:{if(l===_.yd&&Lm(k)){const n=_.pk();if(Lm(k)&&n.os===ik&&n.browser===cd){a.h.warn("requestMediaKeySystemAccess() failed",m);a.h.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");Jm(k);m=a.l.a(l,[k]);break a}}throw m;}return m})}))};let f=a.g.preferredDrmSystem;if(!f){var g=_.pk();if(g.os===kk&&10<=g.osVersion.major&&"edge"===g.browser)f=_.wd;else if("safari"===
138
+ g.browser)f=_.ud;else if(g.browser===cd||"firefox"===g.browser)f=_.yd}f&&(g=b.get(f))&&(e(!0,g,f),e(!1,g,f));for(const h of[!0,!1])b.forEach((k,l)=>{l!==f&&e(h,k,l)});d=d.catch(h=>{throw new _.G(_.E,6,6001,null,h);});d=d.then(h=>{if(a.pa)return null;a.H.clear();var k=h.getConfiguration();a.h.info("Got MediaKeySystemAccess with configuration",k);var l=k.audioCapabilities||[];k=k.videoCapabilities||[];for(var m of l)a.H.add(m.contentType.toLowerCase());for(var n of k)a.H.add(n.contentType.toLowerCase());
139
+ {l=h.keySystem;m=b.get(_.Fm(h.keySystem));n=[];k=[];const q=[],u=[];Om(m.drmInfos,n,k,q,u);1<k.length&&_.B("Multiple unique server certificates found! Only the first will be used.");1<n.length&&_.B("Multiple unique license server URIs found! Only the first will be used.");l={keySystem:l,licenseServerUri:n[0],distinctiveIdentifierRequired:m.distinctiveIdentifier===_.tf,persistentStateRequired:m.persistentState===_.tf,audioRobustness:m.audioCapabilities?m.audioCapabilities[0].robustness:"",videoRobustness:m.videoCapabilities?
140
+ m.videoCapabilities[0].robustness:"",serverCertificate:k[0],initData:q,keyIds:u,periodId:null}}a.a=l;if(!a.a.licenseServerUri)throw new _.G(_.E,6,6012,a.a.keySystem);return h.createMediaKeys()}).then(h=>{a.pa||(a.h.info("Created MediaKeys for key system",a.a.keySystem),a.G=h,a.R=!0)}).catch(h=>{if(!a.pa){a.a=null;a.H.clear();if(h instanceof _.G)throw h;throw new _.G(_.E,6,6002,{browserError:h.message});}});c.reject();return d};
141
+ Sm=function(a){a=Vg(a.g.Qa[_.Le]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Ai(f);e=_.Ai(e);e={kty:"oct",kid:_.yi(f,!1),k:_.yi(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.ni(d),initDataType:"keyids"}];return{keySystem:_.Le,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
138
142
  keyIds:[],periodId:null}};
139
- rm=function(a,b){var c=new Set;for(var d of b)for(var e of d.drmInfos)gm(e,a.h.Sa),c.add(e);d=a.C?_.gf:_.Ce;e=a.C?[_.He]:[zf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Sc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Ce,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.ij(b.mimeType,b.codecs):"",h=c?_.ij(c.mimeType,c.codecs):"";for(const k of f.drmInfos){const l=a.get(k.keySystem);l.drmInfos.push(k);
140
- k.initData&&k.initData.length&&(l.initDataTypes=[...new Set(k.initData.map(m=>m.initDataType))]);k.distinctiveIdentifierRequired&&(l.distinctiveIdentifier=_.gf);k.persistentStateRequired&&(l.persistentState=_.gf);b&&_.eh(k.audioRobustness).forEach(m=>{const n={robustness:m||"",contentType:g};l.audioCapabilities.find(q=>q.robustness===n.robustness&&q.contentType===n.contentType)||l.audioCapabilities.push(n)});c&&_.eh(k.videoRobustness).forEach(m=>{const n={robustness:m||"",contentType:h};l.videoCapabilities.find(q=>
141
- q.robustness===n.robustness&&q.contentType===n.contentType)||l.videoCapabilities.push(n)})}}return a};xm=function(a){return _.x(function*(){if(!a.l.o())if(a.M)yield a.M;else try{a.M=a.l.h(a.G),yield a.M}catch(b){a.ra||a.U(new _.H(_.G,6,6003,b.message,b))}})};
142
- _.Bm=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.H!==um)){var e=a.keySystem();if(!e.startsWith(_.nd)&&b===_.Sc){const f=new ym(c);if(1<f.a.length&&(e={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[e]))for(let g=0;g<f.f.length;g++)if(e===f.f[g]){c=c.subarray(f.a[g].start,f.a[g].end+1);break}}(a.A.webkitCurrentPlaybackTargetIsWireless||
143
- _.qj(2)||a.keySystem().startsWith(_.nd)||!_.zm(a,d,c,!0))&&Am(a,d,null,b,c)}};Cm=function(a,b){return _.x(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield xm(a);b.initData&&_.Bm(a,b.initDataType,_.J(b.initData))})};Em=function(a){return _.x(function*(){_.am(Dd);const b=a.V.map(c=>Dm(a,c));a.ba=!0;a.V=[];yield Promise.all(b);_.am(Cd);_.bm("drm.onPlay",Dd,Cd)})};
144
- Gm=function(a){const b=a.keySystem(),c=a.h.Sa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return Fm(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.ui([d],a.h.attemptParameters);f.type=3;f.licenseRequestType=Uc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.Ab.fetch(f).P}).then(f=>{a.a.serverCertificate=_.J(f.data)}).catch(f=>{var g=
145
- f.data.headers;g=Object.assign({message:"Error while fetching certificate!",url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},Hl(g));throw new _.H(_.G,6,6100,g,f);})};
146
- _.Hm=function(a){return _.x(function*(){if(a.G&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.G.setServerCertificate(a.a.serverCertificate);void 0===b||b||a.g.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.H(_.G,6,6004,{browserError:b.message});}})};
147
- _.Km=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.qj(2);if(a.h.enforceSingleSession&&!a.keySystem().startsWith(_.nd)){const e=a.f.values();for(const f of e)_.ji(c.initData,f.initData)?(a.g.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.g.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),Im(c.initData,f)||(f.nd.push(c.initData),c.keyId&&!f.Ta.includes(c.keyId)&&
148
- f.Ta.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,tf)),d=!1)}!d||a.C&&a.H===um||(_.zm(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),Am(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.I)_.Jm(a,c);b.length||a.I.length||(a.o||a.g.info(ta),a.o=!0,a.B=!1,a.F.resolve());return a.F};
149
- _.Lm=function(a,b){if(!a.G)return _.Vg(a.w,b,[Kd,"msneedkey",gg,"needkey"],()=>{a.U(new _.H(_.G,6,6010))}),Promise.resolve();a.A=b;a.l.l(b);a.w.one(a.A,_.Je,()=>Em(a));a.w.on(a.A,_.bg,e=>{const f=a.B;a.B=!a.o;!f&&a.B&&(a.g.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.a.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.l.f()!==xb||a.I.length)d=xm(a);c=Promise.resolve();_.tj()&&38===uj().major||(a.a&&a.a.keySystem!==_.De&&!a.a.serverCertificate&&(c=Gm(a)),
150
- c=c.then(()=>_.Hm(a)));return Promise.all([d,c]).then(()=>{a.ra||(_.Km(a),a.w.on(a.A,Kd,e=>Cm(a,e)))}).catch(e=>{if(!a.ra){if(6004===e.code&&a.a&&a.a.keySystem===_.rd&&1>a.N&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.U(new _.H(1,6,6004)),a.a.serverCertificate=null,a.N++,_.Lm(a,b);1<=a.N&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
151
- Fm=function(a,b){return _.x(function*(){const c=a.D.xc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
152
- _.Jm=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.G.createSession(_.He)}catch(e){const f=new _.H(_.G,6,6005,{browserError:e.message});a.U(f);return Promise.reject(f)}a.w.on(c,_.me,a.la.bind(a));a.w.on(c,Xd,a.ea.bind(a));const d={initData:null,loaded:!1,fe:Infinity,ob:null,Fa:new _.wm,periodId:null,nd:[],keyId:null,Ta:[],initDataType:null,$b:null,sessionContext:{ldlDelay:0,customData:{}}};d.Fa.catch(()=>{});a.f.set(c,d);return c.load(b).then(e=>{if(a.ra)return null;
153
- a.g.debug("Loaded offline session",b,e);if(!e)return a.f.delete(c),a.U(new _.H(_.G,6,6013)),null;d.loaded=!0;Mm(a)&&(a.o||a.g.info(ta),a.o=!0,a.B=!1,a.F.resolve());return c},e=>{a.ra||(a.f.delete(c),a.U(new _.H(_.G,6,6005,{browserError:e.message})))})};Im=function(a,b){if(!a)return!1;for(let c=0;c<b.nd.length;c++)if(_.ji(a,b.nd[c]))return!0;return!1};
154
- _.zm=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.f.keys()){const f=a.f.get(e);if(_.ji(c,f.initData))return b?f.Ta.includes(b)?d&&a.g.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.Ta.push(b),a.j.get(b)||a.j.set(b,tf),d&&a.g.info(Cb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(Cb+`Session: '${e.sessionId}'`),!0;if(Im(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
143
+ Tm=function(a,b){var c=new Set;for(var d of b)for(var e of d.drmInfos)Hm(e,a.g.Qa),c.add(e);d=a.C?_.tf:_.Ke;e=a.C?[_.Pe]:[Pf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Zc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Ke,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Im(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Rj()&&(h=_.Im(b,_.Rd));const k=c?_.Im(c):"";let l=null;c&&"ac-3"===
144
+ c.codecs.toLowerCase()&&_.Rj()&&(l=_.Im(c,_.Rd));for(const m of f.drmInfos){const n=a.get(m.keySystem);n.drmInfos.push(m);m.initData&&m.initData.length&&(n.initDataTypes=[...new Set(m.initData.map(q=>q.initDataType))]);m.distinctiveIdentifierRequired&&(n.distinctiveIdentifier=_.tf);m.persistentStateRequired&&(n.persistentState=_.tf);b&&_.xh(m.audioRobustness).forEach(q=>{const u={robustness:q||"",contentType:g};n.audioCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||
145
+ n.audioCapabilities.push(u);h&&n.audioCapabilities.push({robustness:q||"",contentType:h})});c&&_.xh(m.videoRobustness).forEach(q=>{const u={robustness:q||"",contentType:k};n.videoCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.videoCapabilities.push(u);l&&n.videoCapabilities.push({robustness:q||"",contentType:l})})}}return a};
146
+ Zm=function(a){return _.w(function*(){if(!a.l.o())if(a.L)yield a.L;else try{a.L=a.l.g(a.G),yield a.L}catch(b){a.pa||a.V(new _.G(_.E,6,6003,b.message,b))}})};
147
+ _.cn=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.I!==Wm)){var e=a.keySystem();if(!e.startsWith(_.ud)&&b===_.Zc){const f=new $m(c);if(1<f.a.length&&(e={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[e]))for(let g=0;g<f.f.length;g++)if(e===f.f[g]){c=c.subarray(f.a[g].start,f.a[g].end+1);break}}(a.A.webkitCurrentPlaybackTargetIsWireless||
148
+ _.Rj(2)||a.keySystem().startsWith(_.ud)||!_.an(a,d,c,!0))&&bn(a,d,null,b,c)}};dn=function(a,b){return _.w(function*(){a.h.info(`Handle encrypted event for type ${b.initDataType}`);yield Zm(a);b.initData&&_.cn(a,b.initDataType,_.I(b.initData))})};fn=function(a){return _.w(function*(){_.Bm(Kd);const b=a.U.map(c=>en(a,c));a.aa=!0;a.U=[];yield Promise.all(b);_.Bm(Jd);_.Cm("drm.onPlay",Kd,Jd)})};
149
+ hn=function(a){const b=a.keySystem(),c=a.g.Qa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return gn(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.Ni([d],a.g.attemptParameters);f.type=3;f.licenseRequestType=ad;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.h.debug("Fetching certificate");return a.D.nb.fetch(f).P}).then(f=>{a.a.serverCertificate=_.I(f.data)}).catch(f=>{var g=
150
+ f.data.headers;g=Object.assign({message:"Error while fetching certificate!",url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},hm(g));throw new _.G(_.E,6,6100,g,f);})};
151
+ _.jn=function(a){return _.w(function*(){if(a.G&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.G.setServerCertificate(a.a.serverCertificate);void 0===b||b||a.h.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.G(_.E,6,6004,{browserError:b.message});}})};
152
+ _.mn=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Rj(2);if(a.g.enforceSingleSession&&!a.keySystem().startsWith(_.ud)){const e=a.f.values();for(const f of e)_.Ci(c.initData,f.initData)?(a.h.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.h.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),kn(c.initData,f)||(f.sd.push(c.initData),c.keyId&&!f.Sa.includes(c.keyId)&&
153
+ f.Sa.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,Jf)),d=!1)}!d||a.C&&a.I===Wm||(_.an(a,c.keyId,c.initData)&&(d=!1),d&&(a.h.info("Request new media key session on create"),bn(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.J)_.ln(a,c);b.length||a.J.length||(a.o||a.h.info(va),a.o=!0,a.B=!1,a.F.resolve());return a.F};
154
+ _.nn=function(a,b){if(!a.G)return _.lh(a.w,b,[Sd,"msneedkey",wg,"needkey"],()=>{a.V(new _.G(_.E,6,6010))}),Promise.resolve();a.A=b;a.l.l(b);a.w.one(a.A,_.Re,()=>fn(a));a.w.on(a.A,_.rg,e=>{const f=a.B;a.B=!a.o;!f&&a.B&&(a.h.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.a.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.l.f()!==Cb||a.J.length)d=Zm(a);c=Promise.resolve();_.Uj()&&38===Vj().major||(a.a&&a.a.keySystem!==_.Le&&!a.a.serverCertificate&&(c=hn(a)),
155
+ c=c.then(()=>_.jn(a)));return Promise.all([d,c]).then(()=>{a.pa||(_.mn(a),a.w.on(a.A,Sd,e=>dn(a,e)))}).catch(e=>{if(!a.pa){if(6004===e.code&&a.a&&a.a.keySystem===_.yd&&1>a.N&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.h.warn("Detected invalid widevine server certificate!. Retrying"),a.V(new _.G(1,6,6004)),a.a.serverCertificate=null,a.N++,_.nn(a,b);1<=a.N&&a.h.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
156
+ gn=function(a,b){return _.w(function*(){const c=a.D.xc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
157
+ _.ln=function(a,b){let c;try{a.h.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Pe)}catch(e){const f=new _.G(_.E,6,6005,{browserError:e.message});a.V(f);return Promise.reject(f)}a.w.on(c,_.ve,a.ha.bind(a));a.w.on(c,ie,a.ea.bind(a));const d={initData:null,loaded:!1,je:Infinity,pb:null,Da:new _.Ym,periodId:null,sd:[],keyId:null,Sa:[],initDataType:null,Zb:null,sessionContext:{ldlDelay:0,customData:{}}};d.Da.catch(()=>{});a.f.set(c,d);return c.load(b).then(e=>{if(a.pa)return null;
158
+ a.h.debug("Loaded offline session",b,e);if(!e)return a.f.delete(c),a.V(new _.G(_.E,6,6013)),null;d.loaded=!0;on(a)&&(a.o||a.h.info(va),a.o=!0,a.B=!1,a.F.resolve());return c},e=>{a.pa||(a.f.delete(c),a.V(new _.G(_.E,6,6005,{browserError:e.message})))})};kn=function(a,b){if(!a)return!1;for(let c=0;c<b.sd.length;c++)if(_.Ci(a,b.sd[c]))return!0;return!1};
159
+ _.an=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.f.keys()){const f=a.f.get(e);if(_.Ci(c,f.initData))return b?f.Sa.includes(b)?d&&a.h.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.Sa.push(b),a.j.get(b)||a.j.set(b,Jf),d&&a.h.info(Hb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.h.info(Hb+`Session: '${e.sessionId}'`),!0;if(kn(c,f))return d&&a.h.info("Skipping Session creation. License for init data was already requested [extra]"),
155
160
  !0}return!1};
156
- Am=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.x(function*(){if(e.length){var h=b;if(!h)try{h=Nm(a,d,e,f)}catch(t){if(a.g.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:t,initDataType:d,initData:e}),a.h.ignoreUnrecognizedInitData)return}if(!g&&Om(a,h,d,e)){var k=!0;if("skd"===d&&!a.h.enableSessionCacheForSkd)for(var l of a.f.keys()){var m=a.f.get(l);
157
- if(h&&m.keyId===h){a.g.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(t){a.g.warn("Unable to close session",t)}k=!1}}if(k){a.g.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.C?_.He:zf;var q=a.G.createSession(n);a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(t){a.U(new _.H(_.G,6,6005,{browserError:t.message}));return}a.w.on(q,_.me,a.la.bind(a));a.w.on(q,Xd,a.ea.bind(a));k={$b:f,nd:[],initData:e,initDataType:d,keyId:h,
158
- Ta:h?[h]:[],loaded:!1,fe:Infinity,periodId:c,ob:null,Fa:new _.wm,sessionContext:{ldlDelay:0,customData:{}}};k.Fa.catch(()=>{});f&&(l=a.f.get(f),k.sessionContext=l.sessionContext);a.f.set(q,k);h&&!a.j.get(h)&&a.j.set(h,tf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.Ta.includes(m.keyId)&&_.ji(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.Ta.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,tf));l=a.D.getConfiguration();m=a.keySystem();m=a.h.Sa[m];n=(n=m.modifiers)&&n.transformInitData;
159
- _.zg(n)||(n=lm);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.l.f()})}catch(t){h=t;t instanceof _.H||(h=new _.H(_.G,6,6016,t));k.Fa&&k.Fa.reject(t);a.U(h);return}a.g.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(t=>{if(!a.ra){var v=null;t.errorCode&&t.errorCode.systemCode&&(v=t.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));a.U(new _.H(_.G,6,6006,{browserError:t.message,
160
- error:t,extended:v},t))}})}else a.g.warn("Empty init data")})};Pm=function(a){let b=Infinity;a=a.f.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};Mm=function(a){a=a.f.values();return _.Gh(a,b=>b.loaded)};Om=function(a,b,c,d){if(!b&&c!==_.pf)return!1;d=b||gl(d);for(const e of a.f.values())if(b&&e.keyId===b||b&&e.Ta.includes(b)||c===_.pf&&(e.keyId||gl(e.initData))===d)return!0;return!1};
161
- Nm=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;var f=a.keySystem(),g=a.h.Sa[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.zg(g)||(g=km);try{var h={ldlDelay:0,customData:{}};e&&(h=a.f.get(e).sessionContext);var k=g(f,c,h);a.g.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.g.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.pf)return gl(c)||"";if(b===_.Sc){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
162
- _.Tl(c);if(m)return m.a}else if(dm(l)){{f=new _.Sl(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.Xk(m);const n=_.P(f);c=n>>>24;k=n&16777215;const q=_.Vk(f,16),t=_.ii(q);if(0<c){const D=_.P(f);f.skip(16*D)}const v=_.P(f),y=_.Vk(f,v),A=_.Zl(y);_.Og("Parsed PR PSSH Box","size",g,"name",h,"version",c,"flags",k,"size",v,"systemId",t,"keyId",A.a);e=A}if(e)return e.a}}catch(m){throw a.g.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
163
- Dm=function(a,b){const c=b.target,d=a.f.get(c);var e=a.keySystem();let f=!1;e.match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength?(f=!0,a.g.info("WV Server certificate request for "+`SID:'${c.sessionId} `+`from msg '${b.messageType}'`)):a.g.info("License request for "+`SID:'${c.sessionId}'/KID:'${d.keyId}' `+`from msg '${b.messageType}'`);let g=a.a.licenseServerUri;e=a.h.Sa[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
164
- const h=_.ui([g],a.h.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===de&&d.$b?$d:f?Uc:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===$d)a.D.onEvent(new _.F(Fd));dm(a.a.keySystem)&&Qm(a,h);Ek(a.K,h);const k=Math.floor(b.timeStamp),l=Date.now();return Rm(a,h,d.sessionContext).then(()=>{_.am(`drm.license.req.${k}.start`);a.g.debug("Sending DRM license request to",g,h);return a.D.Ab.fetch(h).P}).then(m=>{_.am(`drm.license.req.${k}.end`);
165
- _.bm(`drm.license.req.${k}`,`drm.license.req.${k}.start`,`drm.license.req.${k}.end`);if(a.ra)return Promise.reject();const n=Date.now()-l;var q=Sm(a,m);let t="";q&&(t=` RID:${q}`);q=m&&m.data?m.data.byteLength:-1;f?a.g.info("WV Server certificate response for "+`SID:'${c.sessionId}' `+`${q} bytes `+`in ${n}ms${t}`):a.g.info("License response for "+`SID:'${c.sessionId}'/`+`KID:'${d.keyId}' `+`${q} bytes `+`in ${n}ms${t}`);const v=Fk(a.K,m);_.am(`drm.sess.update.${k}.start`);return c.update(m.data).then(()=>
166
- {_.am(`drm.sess.update.${k}.end`);_.bm(`drm.sess.update.${k}`,`drm.sess.update.${k}.start`,`drm.sess.update.${k}.end`);if(!f){var y=Pm(a),A=v?Date.now()+1E3*v.delay:Number.NaN;y=new _.F(_.Hd,{keySystem:a.keySystem(),expirationTime:y,expectedRenewalTime:A});a.D.onEvent(y);d&&(d.ob&&d.ob.resolve(),d.$b&&(y=d.$b,a.g.info(`Closing expired session '${y.sessionId}'`),cm(y).catch(()=>{a.g.warn("Unable to close expired session in time")}),(y=a.f.get(d.$b))&&y.qc&&y.qc.stop(),a.f.delete(d.$b),d.$b=null),(new _.mj(()=>
167
- {a.ra||(d.loaded=!0,d.Fa&&d.Fa.resolve(),Mm(a)&&(a.o||a.g.info(ta),a.o=!0,a.B=!1,a.F.resolve()))})).ca(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||v&&Dk(a.keySystem()))&&(y=new _.mj(()=>{!a.ra&&a.K&&(a.g.info("Updating CSL Sessions"),dm(a.keySystem())?Am(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.nd)&&c.update(_.Vh("renew")))}),d.qc=y,y.ca(v?v.delay:d.sessionContext.ldlDelay)))}})},m=>_.x(function*(){if(!a.ra){var n=m.data.headers;n=Object.assign({message:_.Pa,
168
- url:m.data.url,status:m.data.status,response:m.data.response},n?{headers:n}:{},Hl(n));n=new _.H(_.G,6,6007,n,m);a.U(n);d&&d.ob&&d.ob.reject(n);d&&d.Fa&&d.Fa.reject(n)}})).catch(m=>{a.ra||(m===Ab?a.g.info("Ignore update for closed sessions"):(m=new _.H(_.G,6,6008,{browserError:m.message}),a.U(m),d&&d.ob&&d.ob.reject(m),d&&d.Fa&&d.Fa.reject(m)))})};
169
- Qm=function(a,b){var c=Th(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.g.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.Mf).textContent;b.body=_.gi(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[ra]="text/xml; charset\x3dutf-8"};
170
- Rm=function(a,b,c){return _.x(function*(){const d=a.D.getConfiguration();yield Fm(a,d);const e=a.keySystem();var f=a.h.Sa[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.nd)&&b.requestModifiers.push(k=>_.jl(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.nd)&&b.responseModifiers.push(k=>_.kl(k))})};
171
- Sm=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.Rh(_.gi(b))).ti}catch(c){a.g.warn("Unable to parse DRMtoday Request ID",c)}return""};_.Vm=function(a,b){a&&b&&(_.Tm.set(a,b),_.Um.info(`Registered TextDisplayerFactory: '${a}'`))};
172
- _.Wm=function(a,b){b=b.find(c=>(c=_.Tm.get(c))?c.da(a):!1);if(null==b)return _.Um.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.Um.info(`Chosen the text displayer: ${b}`);return _.Tm.get(b)};_.Xm=function(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{{const c=Date.now()/1E3;a.a.duration=c-a.a.timestamp;a.a.state!=b&&(a.f.push(a.a),a.a={timestamp:c,state:b,duration:0})}}};
173
- Ym=function(a,b){let c=0;a.a&&a.a.state==b&&(c+=a.a.duration);for(const d of a.f)c+=d.state==b?d.duration:0;return c};Zm=function(a){const b=d=>({timestamp:d.timestamp,state:d.state,duration:d.duration}),c=[];for(const d of a.f)c.push(b(d));a.a&&c.push(b(a.a));return c};$m=function(a){return a.a.map(b=>_.vg(b))};
174
- _.an=function(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]}};cn=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=bn.value().get(b),c.one(a,b,d))};
175
- gn=function(a){a.g.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>dn(a,d.type);a.a.on(b,_.Md,()=>{a.j=!1;en(a,_.fn)});a.a.on(b,Nc,c);a.a.on(b,_.Qe,()=>{a.F=!0;a.j=!1;dn(a,_.Qe)});a.a.on(b,_.Fe,()=>{a.F=!1;a.j=!1;dn(a,_.Fe)});a.a.on(b,_.Cf,c);a.a.on(b,_.cf,c);a.a.on(b,_.kf,d=>{a.l=!1;a.j=!1;dn(a,d.type)});a.a.on(b,_.lf,d=>{a.l=!0;dn(a,d.type)});a.a.on(b,qf,c);a.a.on(b,_.ag,()=>{a.j=!0;dn(a,_.ag)});a.a.on(b,_.Nd,d=>a.U(d));a.a.on(b,_.he,c);a.a.on(b,Oc,()=>{a.C=!0;dn(a,
176
- Oc)});a.a.on(b,_.Lf,d=>{a.l=!0;dn(a,d.type)});a.a.on(b,_.Kf,d=>{a.l=!1;a.j=!1;dn(a,d.type)})};hn=function(a,b){return Object.keys(b)[a]};kn=function(a,b){const c={type:_.sf};b===_.Mc||b===_.Lc?(c.reason=a.w,b===_.Mc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.jn&&(c.reason=a.w),a.A===_.jn&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
177
- en=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.jn;a.A=a.f;a.f=b;a.A===_.fn&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.jn?(a.K=a.o,a.w=a.l?1:2,a.g.info("Buffering started. Reason: "+hn(a.w-1,_.ln)),b=kn(a,_.Mc),a.Sb(_.Mc,b)):d&&(a.B=a.o-a.K,a.g.info("Buffering finished. Reason: "+hn(a.w-1,_.ln)+". Buffering time: "+a.B+" ms"),b=kn(a,_.Lc),a.Sb(_.Lc,b));b=hn(a.A,_.mn);c=hn(a.f,_.mn);a.g.info(`Player state change: ${b} -> ${c}`);a.Sb(_.sf,kn(a,""));return!0};
178
- dn=function(a,b){if(a.f===_.nn)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused();var d=a.m.getPosition();var e=a.m.getDuration();if(d=a.m.isEnded()||a.f===_.fn&&1>=Math.abs(d-e)||c&&d>=e)en(a,_.fn)&&a.g.debug("Player claims to be in ended state, not checking more");else if(b!==_.Cf){e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Ia(e,!0):-1;a.G=e;e=a.m.getSurface().getMedia();a.h=e?e.readyState:null;a.J=a.m.getPlaybackRate()||1;
179
- e=typeof a.h===_.r&&2>a.h&&2===e.networkState;var f=typeof a.h===_.r&&0>=a.G&&a.f===_.on,g=typeof a.h===_.r&&2>=a.h&&a.j;e=a.l||f||e||g;!a.M||a.m.isLive()||a.f!==_.jn||e||(f=b===_.kf&&4===a.h,(g=a.A===_.pn)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=en(a,_.jn):c?f=en(a,_.qn):a.F&&(f=en(a,_.rn));f&&(a.C=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.l+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.h+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+
180
- f+", Current state: "+hn(a.f,_.mn))}}};sn=function(a){a=(new _.sh(a)).ya;if(!a)return null;a=a.toUpperCase();return _.Zh(a,".MPD")?_.sc:_.Zh(a,".M3U8")?_.hk:_.Zh(a,".MP4")?_.Rf:_.Zh(a,"MANIFEST")||_.Zh(a,".ISM")?_.Bc:null};_.un=function(a){let b;_.qk(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.vf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=tn(b[c]);d&&a.push(d)}return a};
181
- tn=function(a){let b=null;_.Bg(a)&&(a={url:a});typeof a===_.ve&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.B(a.drmProtected)||typeof a.drmProtected!==_.Kc||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.Kc||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.vf||(b.name=a.name),_.B(a.Eb)||typeof a.Eb!==_.vf||(b.Eb=a.Eb),_.B(a.audioMimeType)||typeof a.audioMimeType!==_.vf||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=sn(a.url),b.type?vn.debug("Detect media type "+
182
- b.type+" for "+a.url):vn.warn("Unable to detect media type for "+a.url));return b};xn=function(a){return a.A?wn():new Promise(b=>{if(a.a){const c=a.a;a.h.off(c,_.Nd);a.h.off(c,_.hf);a.a=null}b()})};wn=function(){return Promise.reject(new _.H(_.G,7,7E3))};
183
- zn=function(a,b){return a.A?wn():new Promise(c=>{a.a||(a.h.on(b,_.Nd,()=>{{const d=yn(a);if(d)a.onError(d)}}),a.h.on(b,_.hf,()=>{const d=b.videoWidth,e=b.videoHeight,f=a.getTrackManager();f&&0<d&&0<e&&(f.w={width:d,height:e});a.trigger(new _.F(_.Jc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
184
- Bn=function(a){return _.x(function*(){if(a.A)return wn();var b=a.w[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.Jk(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=new _.An({Ab:c,onError:d=>a.onError(d),ke:()=>{},onExpirationUpdated:(d,e)=>{a.trigger(new _.F(_.Ed,{expirationTime:e}))},onEvent:d=>{d instanceof _.F?a.dispatchEvent(d):
185
- a.log.debug(_.Ib,d.type)},getConfiguration:()=>a.getConfiguration(),xc:()=>a.xc()});a.o.h=b;yield _.vm(a.o,[{id:0,language:_.Ff,primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:()=>null,getSegmentReference:()=>null,adjustSegmentDurations:()=>{},getDuration:a.getDuration.bind(a),initSegmentReference:null,wa:0,mimeType:_.Rf,codecs:"",encrypted:!0,keyId:null,language:_.Ff,originalLanguage:_.Ff,label:null,type:_.w,primary:!1,frameRate:void 0,
186
- Ah:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,mh:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}],[]);yield _.Lm(a.o,a.a);return Promise.resolve()})};Cn=function(a,b){cn(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.nn&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
187
- yn=function(a){if(null===a.w||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.H(_.G,3,3016,{code:b,uh:c,message:a.a.error.message})};
188
- En=function(a){if(a.A)return new _.Dn(wn(),()=>{});const b=a.w[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.I;c&&Cn(a,c);if(d.preload!==_.ue)a.h.one(d,_.he,()=>{const g=Date.now()/1E3-e;a.f.A=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.qj()||_.tj())&&d.load();const f=new _.wm;a.h.one(d,qf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.F||(a.F=(new _.mj(()=>{f.reject(new _.H(_.G,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
189
- uri:b.url},d.error))})).ca(g))});cn(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(yn(a)):d.preload===_.ue&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.h.one(d,_.Nd,()=>{f.reject(yn(a))});return new _.Dn(f,
190
- ()=>{const g=new _.H(_.G,7,7001);f.reject(g);return Promise.resolve()})};Fn=function(a,b){cn(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.nn){var c=a.getSeekRange().end,d=a.getPosition();Infinity===c||20>c-d||(a.log.warn("Detected that HLS live stream was not started from close to the live edge. Auto-fixing, seeking to seek range end."+`(position: ${d}, seek range end: ${c})`),a.seek(c).catch(e=>{a.log.warn("Error while seeking to seek range edge.",e)}))}})};
191
- _.In=function(a){a&&(0<=Gn.indexOf(a)?Hn.warn(`Factory '${a.name()}' is already registered`):(Gn.push(a),Hn.info(`Factory ${a.name()}' has been registered.`)))};Kn=function(a,b){let c=Gn.find(d=>d.da(a,b));c||(c=new Jn);Hn.info(`Chosen ads: ${c.name()}`);return c};_.Ln=function(a,b){a=document.createElement(a);for(const c in b){const d=b[c];null===d||void 0===d?a.setAttribute(c,""):a.setAttribute(c,d)}return a};_.Mn=function(a,b){a.classList.add(b)};
192
- _.Nn=function(a,b){if(a&&typeof b===_.ve)for(const c in b)a.style[c]=b[c]};_.On=function(a){return document.createElement(a)};Pn=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());gh(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};Qn=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
193
- Rn=function(a,b,c){(_.tj()&&53===uj().major||_.tj()&&68===uj().major||_.vj())&&!b.hasAttribute(ud)&&(b.style.opacity="0",b.setAttribute(ud,""),a.j.one(b,Jd,()=>{b.removeAttribute(ud);b.style.opacity="1";c&&(c.style.opacity="1")}))};
194
- Vn=function(a){a.a.on(window,"offline",()=>{Sn(a,!1)});a.a.on(window,"online",()=>{a.f||Tn(a)});a.a.on(a.m,qf,()=>Un(a));a.a.on(a.m,"suspend",()=>Un(a));a.a.on(a.m,_.ag,()=>Un(a));a.a.on(a.m,_.Qe,()=>{a.f||Tn(a)});a.a.on(a.m,_.af,()=>{a.f||Tn(a)});a.a.on(a.m,_.sf,()=>{switch(a.m.getState()){case _.jn:Un(a);break;default:Un(a)}})};Wn=function(a){a.h&&(a.h.stop(),a.h=null)};Un=function(a){a.f&&Tn(a)};
195
- Xn=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Ei(a.j,b.url,b.attemptParameters,b.method),Sn(a,b))})};Tn=function(a){a.m.getConfiguration().connectivityCheck&&(Wn(a),a.h=(new _.mj(()=>Xn(a))).ca(5))};Sn=function(a,b){Wn(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.F(Be,{online:a.f})))};Zn=function(){for(let a=0;a<Yn.length;++a)Yn[a].pc()};
196
- _.$n=function(a,b){b=b||0;a={priority:b,pc:a};for(let c=0;c<Yn.length;c++)if(Yn[c].priority<b){Yn.splice(c,0,a);return}Yn.push(a)};ao=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};co=function(a){if(!a.a){var b=a.license.split(".");if(3!==b.length)throw Error("Expected to find 3 data sections in JWT raw data");b=new bo(b[0],b[1],b[2]);a.a=b}return a.a};
197
- eo=function(a){switch((a.rd()[0]||{src:"",type:""}).type){case _.sc:a="dash";break;case _.Bc:a="ss";break;case _.hk:a="hls";break;case _.Rf:a=_.re;break;default:a=""}return a};fo=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};go=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
198
- ho=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};io=function(a){a=a.getDrmInfo();return(new _.sh(a&&a.licenseServerUri||"")).Ja};jo=function(a){const b=a.getConfiguration();let c="no";b.drm&&!_.Dg(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Id)||io(a).endsWith("drmtoday.com"))&&(c=Id);return c};
199
- ko=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.keySystem){case _.rd:b="wv";break;case _.pd:b="pr";break;case _.nd:b="fps"}return b};lo=function(a){a=a.getDrmInfo();let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};mo=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.videoRobustness){case Wa:case Ta:b="L1";break;case Va:b="L2";break;case _.zb:case _.yb:b="L3"}return b};
200
- qo=function(a,b){const c="ie"===_.Oj().browser;var d=b.getConfiguration();const e=[...Array.from(_.rk.keys()),...b.pg()];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":fo(d),"CL-ASSET-ID":go(d),"CL-SESSION-ID":ho(d),"CL-PLAYBACK-TYPE":b.isLive()?no:oo,"CL-CONTENT-TYPE":eo(b),"CL-PLUGINS":e.join(" "),"CL-DRM":jo(b),"CL-DRM-CDM":ko(b),"CL-DRM-SEC-LEVEL":mo(b),"CL-DRM-OFFLINE":lo(b),"CL-DRM-IP":io(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=
201
- d);d=_.ui(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.po).fetch(d).P.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=co(a);f=f.data;var h=f.status;if(g.a&&g.a.ilv)g=Promise.resolve();else{switch(h){case 403:case 404:g=7101;var k="castLabs Player license is invalid";if(403===h){h=k;k="";try{k=JSON.parse(decodeURIComponent(f.responseText)).message}catch(l){}f=k;f=h+(": "+f)}else f=
202
- k+"!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:g=Promise.resolve();break a}a.g.error($a+k);g=Promise.reject(new _.H(_.G,7,g,k))}}return g})};_.so=function(a){a&&(0<=ro.indexOf(a)||ro.push(a))};
203
- uo=function(a){if(!a.M){a.M=!0;a.h.getMedia()||a.h.getCastElement();a.w||(a.w=new to(a.f.license));var b=Object.keys(a.K);qo(a.w,{getConfiguration:a.getConfiguration.bind(a),rd:a.rd.bind(a),getDrmInfo:a.getDrmInfo.bind(a),pg:()=>b,isLive:a.isLive.bind(a)}).then(()=>{a.g.debug("License verified remotely")}).catch(c=>{setTimeout(ao,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)})}};
204
- vo=function(a,b){a.w=new to(b);a.w.verify().catch(c=>{setTimeout(()=>{a.g.error($a+c);a.trigger(new _.F(_.Nd,{detail:new _.H(_.G,7,7101)}));a.destroy()},1E3)})};xo=function(a,b){a.J=b;for(const c of a.J)(b=c.id())&&(a.K[b]=c);_.wo(a,"onPlayerCreated")};_.yo=function(a,b){b!==a.a&&(a.a&&(a.a.removeDelegate(a),a.a.destroy()),a.a=b,a.a&&(a.a.init(a.h,a.f),a.a.setNetworkEngine(a.getNetworkEngine()),a.a.addDelegate(a)))};
205
- _.wo=function(a,b,...c){const d=a.J.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
206
- zo=function(a){return _.x(function*(){if(a.H)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.off(_.sf,a.C);a.A.off(a,_.sf,a.C);a.A.off(document,Zf);a.trigger(new _.F(_.ef));a.M=!1;a.h&&a.h.release();a.j&&(yield a.j.dispose(),a.j=null);if(a.a){let b=null;const c=a.a.on(_.sf,d=>{b=d});return _.wo(a,_.ze).then(()=>{a.a.removeDelegate(a);return Promise.all([a.a.release(),a.B.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
207
- a.trigger(b))}).finally(()=>{a.a.off(_.sf,c);a.trigger(new _.F(df))})}a.trigger(new _.F(df));return new Promise(b=>b())})};
208
- Co=function(a,b,c){return new Promise((d,e)=>{var f;if(b){var g=f=null;for(var h=0;h<b.length;h++);h=Object.values(_.Qg);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Ib:h[l],confidence:h[l].canPlay(b[k],c)};if(null===f||f.confidence<m.confidence)f=m,g=k}f&&typeof g===_.r&&0<f.confidence?(_.Rg.debug("Player Factory '"+f.Ib.a()+"' can play",b[g]),f=new Ao(f.Ib,g)):(_.Rg.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Ib.create(),d(new Bo(e,f.a))):
209
- (d=new _.F(_.Nd,{detail:new _.H(_.G,7,7003)}),a.trigger(d),e(d))})};
210
- _.Fo=function(a,b){return _.x(function*(){_.am(Ne);if(a.G)throw Error("Player is already destroyed.");if(!a.h)throw Error("No surface associated with this player!");yield a.release();a.o=_.un(b);a.f=_.pk(a.N,_.qk(b)?b:{},{source:a.o});if(0===a.o.length)throw Error("Invalid request to load: could not find source to load");a.H=!1;let c;var d=0;if(a.I||2!==a.canPlay(a.o[0],a.f))d=yield Co(a,a.o,a.f),c=d.player,d=d.a,a.I=!1;c?_.yo(a,c):a.a.addDelegate(a);Do(a);a.a&&a.a.setCdnErrorCallback(a.F);Eo(a,a.f);
211
- a.setSourceIndex(d);if(a.f.pauseWhenInBackground)a.A.on(document,Zf,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});yk(a);yield _.wo(a,"onContentWillLoad",a.f.source[d]);_.am(Me);_.bm("player.beforeLoad",Ne,Me)})};_.Go=function(a){return _.x(function*(){a.h.getMedia()||a.h.getCastElement();a.A.on(a,_.sf,a.C);a.trigger(new _.F(ie));yield Promise.all([a.a.load(a.f),a.j.load()])})};
212
- _.Io=function(a){return _.x(function*(){_.am(Le);const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);Ho(a);zk();yield _.wo(a,"onContentLoaded");a.f.autoplay&&(yield a.play());_.am(Ke);_.bm("player.afterLoad",Le,Ke)})};Jo=function(a){return _.x(function*(){if(a.a){var b=a.a;b.uf?(a.trigger(new _.F(ie)),yield b.uf(),yield _.Io(a)):a.g.warn(rb)}else a.g.warn(ob)})};
213
- Do=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.sc&&a.Od&&(a.Od=!1,yield a.sc(b))}))};Eo=function(a,b){a.j=Kn(a,b).create(a)};
214
- Ho=function(a){const b=_.eh(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().ga().filter(f=>c?f.kind===_.Od:f.kind!==_.Od);if(0===d.length)c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles are available.");else{if(c&&0===b.length){var e=a.getTrackManager().ja();e&&e.language?(e=_.Eh(e.language||""),b.push(e)):(e=a.getTrackManager().Ea())&&e.language&&(e=_.Eh(e.language||""),b.push(e));0===b.length&&a.g.warn("Forced subtitles are configured to be preferred, but neither the preferred text language is set, nor the audio or video track language is available to determine which forced subtitles language to select.")}b.some(f=>
215
- {const g=_.Eh(f);if(f=d.find(h=>{h=_.Eh(h.language||"");return _.Fh(h,g)}))return a.getTrackManager().Ha(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};
216
- Ko=function(a){const b=document.getElementById(a);if(!b)throw Error("Anchor element not found");b.classList.add(Zc);return Array.from({length:3}).map(()=>{const c=document.createElement(_.w);c.classList.add(bd);const d=document.createElement(_.zd);d.classList.add(ad);d.appendChild(c);b.appendChild(d);return new Q(c)})};
217
- Lo=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.info(`Show video element .${b}`),d.classList.add(cd)):(a.g.info(`Hide video element .${b}`),d.classList.remove(cd)),a.A&&a.A(d,c))};No=function(a,b){return _.x(function*(){const c=yield a.o.get();a.f=b;b.role=Mo;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Lo(a,c,!0);yield c.load(b.config);b.config.autoplay||(yield c.play())})};
218
- Ro=function(a){_.x(function*(){if(0===a.a)yield Oo(a);else if(a.a===a.h.length-1)yield Po(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>Qo(a,c)))}})};
219
- So=function(a,b){return _.x(function*(){if(b.player){if(b.state===Ye){a.g.info(Ob);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=Mo;Lo(a,b.player,!0);b.state===Xe?(_.am(Ue),a.w.preloadMedia?yield b.player.play():yield Jo(b.player),_.am(Te),_.bm("playlist.next",Ue,Te)):b.state===We&&(yield b.player.load(b.config));b.config.autoplay||(yield b.player.play())}})};
220
- Uo=function(a,b){return _.x(function*(){a.g.info(`Stop current playback (index: ${b.index})`);const c=b.player;b.player=null;b.videoEl=null;b.role=To;c.pause();yield a.o.release(c);Lo(a,c,!1)})};Wo=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Vo(a,b)))};Xo=function(a){return _.x(function*(){yield a.o.destroy();const b=document.getElementById(a.w.anchorId);b&&(b.classList.remove(Zc),b.innerHTML="")})};
221
- Vo=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield a.o.release(c.player)),a.l.delete(b))})};
222
- Qo=function(a,b){return _.x(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=To;d.state=Ye;a.trigger(new _.F(Hf));try{a.l.set(b,d),a.w.preloadMedia?(d.config.autoplay&&(a.g.warn(ka+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.load(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=Xe,a.trigger(new _.F(Hf))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=Ve):
223
- (a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.F(_.Nd,{detail:e})),d.state=We),a.trigger(new _.F(Hf))}})};Oo=function(a){return _.x(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield Qo(a,b)})};Po=function(a){return _.x(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield Qo(a,b)})};
224
- Yo=function(a,b,c){a.classList.add(Zc);return Array.from({length:b}).map(()=>{const d=document.createElement(_.w);d.classList.add(bd);const e=document.createElement(_.zd);e.classList.add(ad);e.appendChild(d);a.appendChild(e);return new Q(d,c)})};
225
- Zo=function(a,b,c){if(!a.A){var d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.info(`Show video element .${b}`),d.classList.add(cd),d.classList.remove("clpp-hide")):(a.g.info(`Hide video element .${b}`),d.classList.remove(cd),d.classList.add("clpp-hide")),a.w&&a.w(d,c))}};$o=function(a){return _.x(function*(){const b=a.a;b&&("loaded"!==b.state&&(yield b.Wc),yield b.player.play(),b.state=_.Qe,b.ic&&b.ic())})};ap=function(a,b){a.A=b;const c=a.a&&a.a.player;c&&Zo(a,c,!b)};
226
- cp=function(a,b){return _.x(function*(){if(b.player){if(b.state===Ye){a.g.info(Ob);try{yield b.preloadPromise}catch(c){}}a.a=b;b.role=bp;Zo(a,b.player,!0);b.state="loading";b.state===Xe?yield b.player.play():b.state===We&&(yield b.player.load(b.config));b.config.autoplay||(yield b.player.play());b.state=_.Qe}})};ep=function(a,b){return _.x(function*(){yield dp(a,b);b.config.autoplay||(yield b.player.play());b.state=_.Qe})};
227
- fp=function(a,b){const c=b.transition;if(c){if(c.hc){const d=c.hc,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.on(_.Md,e);b.Zb.push(()=>{b.player.off(_.Md,e)})}if(c.gf){const d=e=>{const f=c.gf.find(g=>g.cueId===e.detail.id);f&&(a.g.info(`Transition onCue to (ID: ${f.itemId})`),a.play(f.itemId))};b.player.on(_.ah,d);b.Zb.push(()=>{b.player.off(_.ah,d)})}if(c.mf){const d=c.mf,e=()=>{b.player.getPosition()>=d.position&&(a.g.info(`Transition onPosition to (ID: ${d.itemId})`),
228
- a.play(d.itemId))};b.player.on(_.Cf,e);b.Zb.push(()=>{b.player.off(_.Cf,e)})}}};hp=function(a,b){return _.x(function*(){a.g.info(`Stop current playback (ID: ${b.id})`);b.Zb.forEach(d=>d());b.Zb=[];const c=b.player;b.player=null;b.videoEl=null;b.role=gp;c.pause();yield a.l.release(c);Zo(a,c,!1)})};jp=function(a){return Promise.all(Array.from(a.f.keys()).map(b=>ip(a,b)))};
229
- lp=function(a,b){_.x(function*(){if(0!==b.length){a.g.info(`Preload items (IDs: ${b})`);var c=a.j.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>kp(a,d)))}})};dp=function(a,b){return _.x(function*(){const c=yield a.l.get();a.a=b;b.role=bp;a.a.player=c;a.a.videoEl=c.getSurface().getMedia();Zo(a,c,!0);b.primary&&a.trigger(new _.F(Ze,{detail:{player:c}}));b.state="loading";b.Wc=yield c.load(b.config);b.state="loaded"})};
230
- mp=function(a){return _.x(function*(){yield a.l.destroy();const b=a.o.anchorEl;b&&(b.classList.remove(Zc),b.innerHTML="")})};np=function(a){a.a&&(a.a.Zb.forEach(b=>b()),a.a.Zb=[],fp(a,a.a),jp(a),lp(a,a.a.next))};ip=function(a,b){return _.x(function*(){const c=a.f.get(b);c&&(a.g.info(`Stop preloading item (ID: ${b})`),c.player&&(yield a.l.release(c.player)),a.f.delete(b))})};
231
- kp=function(a,b){return _.x(function*(){const c=b.id,d=yield a.l.get();b.player=d;b.videoEl=d.getSurface().getMedia();b.role=gp;b.state=Ye;a.trigger(new _.F(Hf));try{a.f.set(c,b),b.config.autoplay&&(a.g.warn(ka+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1),b.primary&&a.trigger(new _.F(Ze,{detail:{player:d}})),b.preloadPromise=d.load(b.config),yield b.preloadPromise,b.state=Xe,a.trigger(new _.F(Hf))}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),b.state=Ve):(a.g.warn(`Preload failed (ID: ${c})`,
232
- e),a.trigger(new _.F(_.Nd,{detail:e})),b.state=We),a.trigger(new _.F(Hf))}})};op=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.vf&&typeof b.DURATION===_.r):!1};pp=function(a){a.h.forEach(b=>b());a.h=[]};
233
- up=function(a,b){const c=()=>_.x(function*(){var e=b.getPosition();if(e=qp(a,e))a.g.info(`Interstitial ${e.cueId} coming up `+`at ${e.startTime} s`),(yield rp(a,e))&&sp(a,e,b)});b.addEventListener(_.Cf,c);a.h.push(()=>{b.removeEventListener(_.Cf,c)});const d=()=>{a.trigger(new _.F(tp))};b.on(_.Md,d);a.h.push(()=>{b.off(_.Md,d)})};
234
- wp=function(a,b,c){return _.x(function*(){if(b.source){a.a.dd([{id:$e,primary:!0,config:_.vg(b),next:[]}]);yield a.a.load($e);var d=a.a.tb();d&&d.pd()?(d=Array.from(d.pd().cues()),vp(a,d,c)||(ap(a.a,!1),c||(yield $o(a.a)))):a.g.error("Failed to get cue timeline after load")}else a.g.error("Config must be of type cl.api.PlayerConfiguration")})};
235
- vp=function(a,b,c){var d=b.filter(f=>f.schemeIdUri===_.od&&f.Pa);a.g.info("Interstitial cues found",d);if(!xp(a,d))return!1;b=d.find(f=>f.startTime<a.f.prerollMarginSec);const e=d.filter(f=>f.startTime<a.f.resolutionOffsetSec&&!(f.startTime<a.f.prerollMarginSec));d=d.filter(f=>!(f.startTime<a.f.resolutionOffsetSec));b&&yp(a,b,c);0<e.length&&e.forEach(f=>zp(a,f));d.forEach(f=>Ap(a,f));a.trigger(new _.F(Bp,{detail:a.Oc()}));return!!b};
236
- xp=function(a,b){const c=b.sort((g,h)=>g.startTime-h.startTime),d=a.f.resolutionOffsetSec,e=[];for(let g=0;g<c.length-1;g++){const h=c[g],k=c[g+1];k&&k.startTime-h.endTime<d&&e.push(`Interstitials ${h.id} and ${k.id} `+`are too close to each other (less than ${d} s).`);k&&k.startTime<=h.endTime&&e.push(`Interstitials ${h.id} and ${k.id} `+"overlap.")}const f=[];b.forEach(g=>{const h=g.Pa[_.Tb],k=g.Pa[_.Ub];g.Pa[_.Sb]||h?null!=k&&1>k&&a.g.warn(`Interstitial cue ${g.id} is invalid `+"X-PLAYOUT-LIMIT is less than 1 s.",
237
- g):f.push(`Interstitial cue ${g.id} is invalid `+"it contains neither X-ASSET-LIST nor X-ASSET-URI.")});0<f.length?a.g.error("Invalid interstitials, all interstitials will "+`be skipped. ${f.join(" ")}`):0<e.length&&a.g.warn("Unsupported format of interstitials, playback may not "+`behave correctly. ${e.join(" ")}`);return 0===f.length};
238
- yp=function(a,b,c){_.x(function*(){const d=Ap(a,b),e=yield rp(a,d),f=d.Aa?d.Aa.length:0;e&&0<f?Cp(a,d,c):(e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping"),ap(a.a,!1),c||(yield $o(a.a)))})};
239
- zp=function(a,b){return _.x(function*(){const c=Ap(a,b);a.g.info(`Interstitial ${c.cueId} coming up `+`at ${c.startTime} s`);if(yield rp(a,c)){const e=a.a.getCurrentItem();if(!e)a.g.error("Cannot schedule interstitial "+`${c.cueId}, no primary content not found in `+"playlist");else if(e.player){var d=e.player;e.state===_.Qe?sp(a,c,d):e.ic=()=>{sp(a,c,d)}}}})};
240
- Ap=function(a,b){{const c=b.Pa[_.Vb];b={cueId:b.id,startTime:b.startTime,endTime:b.endTime,state:Dp,Ee:b.Pa[_.Sb],Fe:b.Pa[_.Tb],Aa:null,resumePosition:null==c?b.endTime:b.startTime+c,playoutLimit:b.Pa[_.Ub]}}a.j.push(b);return b};
241
- rp=function(a,b){return _.x(function*(){b.state=Ep;const c={id:b.cueId,startTime:b.startTime,endTime:b.endTime,resumePosition:b.resumePosition,itemCount:-1,playoutLimit:b.playoutLimit};a.trigger(new _.F(Fp,{detail:c}));if(b.Ee)try{a.g.info(`Load X-ASSET-LIST for ${b.cueId}`),a.trigger(new _.F(Gp,{detail:c})),b.Aa=yield Hp(a,b.Ee),b.state=Ip,c.itemCount=b.Aa.length}catch(d){a.g.error("Failed to load X-ASSET-LIST",d),b.state=Jp}finally{a.trigger(new _.F(Kp,{detail:c}))}else b.Fe?(b.Aa=[{URI:b.Fe,DURATION:b.endTime-
242
- b.startTime}],b.state=Ip):b.state=Jp;return b.state===Ip})};Cp=function(a,b,c){_.x(function*(){const d=a.a.getCurrentItem();if(d){var e=Lp(a,b,"preroll");a.a.dd(e);Mp(a,d,b,e,!0);np(a.a);b.state=Ip;c?yield a.a.load(e[0].id):yield a.a.play(e[0].id);ap(a.a,!1)}})};
243
- sp=function(a,b,c){if(b.Aa)if(0===b.Aa.length){const g=()=>{c.seek(b.resumePosition)};c.on(_.ah,g);a.h.push(()=>{c.off(_.ah,g)});a.g.info(`Interstitial ${b.cueId} scheduled to `+"be skipped")}else{var d=a.a.getCurrentItem();if(d){var e=Lp(a,b);a.a.dd(e);var f=e[0].id;Mp(a,d,b,e,!1);d.next=[f];d.transition={gf:[{cueId:b.cueId,itemId:f}]};np(a.a);b.state=Ip;a.g.info(`Interstitial ${b.cueId} scheduled for `+`${b.startTime} s`);a.trigger(new _.F(Np,{detail:{id:b.cueId,startTime:b.startTime,endTime:b.endTime,
244
- resumePosition:b.resumePosition,itemCount:e.length,playoutLimit:b.playoutLimit}}))}}};qp=function(a,b){return a.j.find(c=>{const d=c.startTime-b;return c.state===Dp&&0<d&&d<=a.f.resolutionOffsetSec})||null};Hp=function(a,b){return _.x(function*(){var c=a.a.tb();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.ui(b);c=yield Di(c,d);if(!op(c))throw new ph("Invalid X-ASSET-LIST list response");return Promise.resolve(c.ASSETS)})};
245
- Lp=function(a,b,c){c=void 0===c?"":c;let d=0,e=b.Aa.map((f,g)=>{const h=`${b.cueId}-${g}`;g=g===b.Aa.length-1?$e:`${b.cueId}-${g+1}`;d+=f.DURATION;f={id:h,config:{source:{url:f.URI,type:_.hk}},next:[g],transition:{hc:g},duration:f.DURATION,Pe:d,wh:b.cueId};return a.f.interstitialAssetConverter?a.f.interstitialAssetConverter(f):f});e.forEach((f,g)=>{f.ic=()=>{a.g.info(`Playing interstitial asset ${f.id}`,f);a.trigger(new _.F(Op,{detail:{id:f.id,podId:b.cueId,uri:f.config.source.url,duration:f.duration,
246
- podOrder:g+1,podCount:b.Aa.length}}))}});if(null!=b.playoutLimit){const f=b.playoutLimit;a.g.info(`Playout limit for ${b.cueId} is `+`${f} s`);e=e.filter(k=>k.Pe-k.duration<=f);const g=e[e.length-1],h=Math.abs(g.Pe-f);1>h?g.transition.hc=$e:(g.transition.hc=void 0,g.transition.mf={position:g.duration-h,itemId:$e});g.next=[$e]}e[0].ic=()=>{a.g.info(`Playing interstitial ${c} ${b.cueId} with `+`${b.Aa.length} assets and will resume primary `+`content at ${b.resumePosition} s.`,e);a.g.info(`Playing interstitial asset ${e[0].id}`,
247
- e[0]);a.trigger(new _.F(Pp,{detail:{id:b.cueId,startTime:b.startTime,endTime:b.endTime,resumePosition:b.resumePosition,itemCount:e.length,playoutLimit:b.playoutLimit}}));a.trigger(new _.F(Op,{detail:{id:e[0].id,podId:b.cueId,uri:b.Aa[0].URI,duration:b.Aa[0].DURATION,podOrder:1,podCount:b.Aa.length}}))};return e};
248
- Mp=function(a,b,c,d,e){b.ic=()=>{a.g.info("Resuming primary content at "+`${b.config.startTime} s.`);a.trigger(new _.F(Qp,{detail:{id:c.cueId}}));c.state=Rp;a.a.removeItems(d.map(f=>f.id));b.next=[];e&&a.trigger(new _.F(Sp))};b.config.startTime=c.resumePosition};Tp=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
249
- Up=function(a,b){a.f=b;_.Ug(a.a);if(!b)return Promise.resolve();a.a.on(b,Kd,c=>{_.Og("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.g.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,gg,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.J(c.initData);if(_.Oh(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=Th(c.subarray(4),
250
- !0);c=_.Vh(c);const d=new Event(Kd);d.initDataType="skd";d.initData=Ph(c);a.f.dispatchEvent(d)}});cn(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};Vp=function(a,b){Tp(a.keyStatuses,b);b=new _.F(Xd);a.dispatchEvent(b)};
251
- Yp=function(a,b){a.a=b;_.Ug(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event(Kd);d.initDataType=_.Sc;d.initData=Ph(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=Wp(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.F(_.me,{messageType:d?de:$d,message:c.message});d=e;_.Og("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.Pg("Session not found",c.sessionId)}}),a.f.on(b,a.h+"keyadded",c=>{(c=Wp(a,
252
- c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=Wp(a,c.sessionId);if(d){{var e=Error("EME v0.1b key error");const f=c.errorCode;f.systemCode=c.systemCode;e.errorCode=f;!c.sessionId&&d.f?(45===c.systemCode&&(e.message="Unsupported session type."),d.f.reject(e),d.f=null):c.sessionId&&d.a?(d.a.reject(e),d.a=null):(e=c.systemCode,c.errorCode.code===MediaKeyError.MEDIA_KEYERR_OUTPUT?Xp(d,_.Ee):1===e?Xp(d,"expired"):Xp(d,_.Vd))}}}))};
253
- Wp=function(a,b){let c=a.l.get(b);return c?c:(c=a.j.shift())?(c.sessionId=b,a.l.set(b,c),c):null};Xp=function(a,b){Tp(a.keyStatuses,b);b=new _.F(Xd);a.dispatchEvent(b)};Zp=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
254
- $p=function(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;let d;try{if(a.l===_.He)if(c)d=_.J(_.Vh("LOAD_SESSION|"+c));else{const f=_.Vh("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.J(b),f.byteLength);d=g}else d=_.J(b)}catch(f){return Promise.reject(f)}a.f=new _.wm;const e=Zp(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==Ya)return a.f=null,Promise.reject(f);(new _.mj(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
255
- a.f=null}})).ca(.01)}return a.f};aq=function(a,b,c){if(a.a)a.a.then(()=>aq(a,b,c)).catch(()=>aq(a,b,c));else{a.a=b;if(a.h===cg){var d=_.Rh(c);var e=JSON.parse(d);"oct"!==e.keys[0].kty&&(a.a.reject(Error("Response is not a valid JSON Web Key Set.")),a.a=null);d=_.gi(e.keys[0].k);e=_.gi(e.keys[0].kid)}else d=_.J(c),e=null;var f=Zp(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
256
- bq=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.Qd?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};cq=function(a){a=a.target;if(a.webkitPresentationMode===Ie){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement===a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)};
257
- dq=function(){return this.webkitSupportsPresentationMode(Ie)?(this.webkitSetPresentationMode(Ie),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};eq=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
258
- fq=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};gq=function(a,b,c){return new window.TextTrackCue(a,b,c)};hq=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};jq=function(a,b,c){if("input"===a)switch(this.type){case "range":a=Vc}iq.call(this,a,b,c)};kq=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
259
- lq=function(a){return kq()-a.a};nq=function(a){const b=new mq;b.a=a.a;return b};_.oq=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.qq=function(a,b,c,d){return _.x(function*(){try{return new (yield pq(a,b,c,d))}catch(e){throw e.a(_.G),e;}})};
260
- pq=function(a,b,c,d){return _.x(function*(){if(d){var e=_.rq[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.sq(a)){const f=_.tq[e];if(f)return f;_.C("Could not determine manifest type for extension ",e)}else _.C("Could not find extension for ",a);if(!d&&(d=yield uq(a,b,c))){if(e=_.rq[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.H(_.G,4,4E3,{url:a});})};
261
- _.sq=function(a){a=(new _.sh(a)).ya.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};uq=function(a,b,c){return _.x(function*(){var d=_.ui(a);si(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).P).headers["content-type"])?d.toLowerCase():""})};vq=function(a,b){var c=a.f+b.byteLength;if(a.a.byteLength<c){let d=a.a.byteLength;for(;d<c;)d*=2;c=new Uint8Array(d);c.set(a.a);a.a=c}a.a.set(b,a.f);a.f+=b.byteLength};
262
- wq=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(vq(a,e),xi(c,e.byteLength,lq(a.h)),a.h.a=kq());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>wq(a,b,c))})};
263
- yq=function(a){const b=a.uris[a.uriIndex],c=new xq,d=new mq,e=nq(d);let f=0,g;const h=new _.wm;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;let k=!1,l=!1;c.onreadystatechange=function(m){m=m.target;m.readyState>=XMLHttpRequest.LOADING&&0===f&&(g=lq(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(qa),wi(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
264
- const q={};for(const t of n)n=t.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const t=lq(e);l||xi(a,m.response?m.response.length:0,t);const v=_.vi(q,m.response,m.status,b,m.responseURL,a,t,g);a.rateLimitBps?yi(a.rateLimitBps,lq(e),a.bytesLoaded).then(()=>{h.resolve(v)}):h.resolve(v)}catch(t){h.reject(t)}};c.onerror=function(m){m=m.target;if(0>=m.status)h.reject(new _.H(1,1,1002,{url:b,request:a,status:m.status}));else{var n=m.getAllResponseHeaders();const t={};if(n){n=n.trim().split("\r\n");
265
- for(var q of n)n=q.split(": "),t[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.vi(t,m.response,m.status,b,m.responseURL,a,lq(e),g);h.resolve(q)}};c.ontimeout=function(){h.reject(new _.H(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=lq(d);d.a=kq();if(100<n||m.lengthComputable&&m.loaded===m.total)xi(a,m.loaded-f,n),f=m.loaded,l=!0};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);c.send(a.body);return{P:h,request:a,abort:()=>{c.abort();h.reject(new _.H(1,1,
266
- 7001,{url:b,request:a}));return Promise.resolve()}}};zq=function(a){let b=null;a.h!==a.f&&(b={start:a.h,end:a.f,length:a.f-a.h,data:new DataView(a.j.a.buffer,a.h,a.f-a.h),count:-1});return b};Aq=function(a,b){{var c=a.j;const d=c.f+b.byteLength;if(d>c.a.byteLength){const e=c.a;c.a=new Uint8Array(Math.max(Math.ceil(c.a.buffer.byteLength*c.h),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.h;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f)};
267
- Cq=function(a){if(0<=a.o&&a.f<a.o)return null;let b=Bq(a);for(;null!==b;){if(b.name===_.ke){const c={start:a.h,end:b.end,length:b.end-a.h,data:new DataView(a.j.a.buffer,a.h,b.end-a.h),count:1};a.h=b.end;return c}b=Bq(a)}return null};
268
- Dq=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,lq(a.w)),a.w.a=kq());if(f)return e=zq(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){Aq(a,g);var k=Cq(a);for(e=[];k;)e.push(k),k=Cq(a);if(!a.A)e.forEach(l=>{h=h.then(()=>c(!1,l))});else if(0<e.length){k=e[0];if(1<e.length){k=e[0];const l=e[e.length-1],m=l.end-k.start;k={start:k.start,end:l.end,length:m,data:new DataView(a.j.a.buffer,k.start,m),count:e.length}}(e=
269
- c(!1,k))&&(h=e)}}return h.then(()=>Dq(a,b,c,d))})};
270
- Bq=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Eq(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Eq(a);d=String.fromCharCode(d>>24&255,d>>16&255,d>>8&255,d&255);switch(c){case 0:c=a.f-b;break;case 1:if(a.a+8>=a.f)return a.a=a.f,null;{let e,f;try{f=a.l.getUint32(a.a,!1),e=a.l.getUint32(a.a+4,!1)}catch(g){throw new _.H(_.G,3,3E3);}if(2097151<f)throw new _.H(_.G,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.o=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
271
- Eq=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
272
- Hq=function(a){a.h=a.B.then(e=>{a.j=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=Fq(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Fq(e.request.fuzzFactor,.5));a.f*=Fq(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;Gq(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.H(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
273
- let b=0,c=0,d=0;return a.h.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.P}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.H){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return Hq(a);g&&e.a(_.G);a.w.reject(e)}else a.w.reject(e)})};Gq=function(a,b,c){a.o=setTimeout(b,c)};Fq=function(a,b){return null===a||void 0===a?b:a};
274
- Iq=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new ph("Parsing CMSD, missing parameter or wrong format");if(c&&!b)return{key:c,value:!0};const d=b[0];if('"'===d&&'"'===b[b.length-1])return{key:c,value:b.replaceAll(/(^")|("$)/g,"")};if(/^[-0-9]/.test(d))return{key:c,value:parseInt(b,10)};if(/^[a-zA-Z*]/.test(d))return{key:c,value:b};throw new ph(`Parsing CMSD, not recognized value type of ${a}`);};
275
- Lq=function(a){return b=>{if(a.a){a:{b=b.headers;for(const [d,e]of Object.entries(b))if("cmsd-dynamic"===d.toLowerCase()){b=e;break a}b=null}if(b){try{const d=new Map,e=b.split(";");for(b=0;b<e.length;b++){const {key:f,value:g}=Iq(e[b]);Object.values(Jq).includes(f)&&d.set(f,g)}var c=d}catch(d){Kq.error("CmsdManager parseCmsdDynamicHeader_ failed:",d),c=null}a.f=c}}}};
276
- Pq=function(a){var b=new Mq;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Nq,d={Jc:!1,yf:!1};b={P:Oq(a.uris[a.uriIndex],a,{body:a.body||void 0,headers:b,method:a.method,signal:c.signal,credentials:a.allowCrossSiteCredentials?"include":void 0},d),request:a,abort:()=>{d.Jc||(d.Jc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.yf=!0;c.abort()},a);b.P=b.P.finally(()=>{window.clearTimeout(e)})}return b};
277
- Oq=function(a,b,c,d){return _.x(function*(){let e,f,g;const h=new mq,k=nq(h);try{e=yield Qq(a,c);g=lq(h);const m=e.headers.get(qa);wi(b,m);const n=m?parseInt(m,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const q=e.body.getReader();f=yield Dq(new Rq(n,!b.disableMergedFragments),q,(t,v)=>{if(d.Jc)return null;v&&v.data&&(xi(b,v.data.byteLength,lq(h)),h.a=kq());return b.onFragment&&v?b.rateLimitBps?yi(b.rateLimitBps,lq(k),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},
278
- b.onProgress)}else{const q=e.body.getReader();f=yield wq(new Uq(n),q,b);b.rateLimitBps&&(yield yi(b.rateLimitBps,lq(k),f.byteLength))}}catch(m){if(d.Jc)throw new _.H(1,1,7001,{url:a,request:b});if(d.yf)throw new _.H(1,1,1003,{url:a,request:b});_.Pg("Error while fetching data:",m);throw new _.H(1,1,1002,{url:a,error:m,request:b,status:-1},m);}const l={};e.headers.forEach((m,n)=>{l[n.trim()]=m});if(d.Jc)throw new _.H(1,1,7001,{url:a,request:b});return _.vi(l,f,e.status,a,e.url,b,lq(k),g)})};
279
- Wq=function(a){try{const b=a.uris[a.uriIndex],c=_.Vq(b);return{P:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{P:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
280
- _.Vq=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.Pg("Bad data URI, failed to parse scheme"),new _.H(_.G,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.Pg("Bad data URI, failed to extract encoding and MIME type"),new _.H(_.G,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];let d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.gi(a).buffer:_.Vh(a).buffer,contentType:c}};_.Yq=function(a){delete _.Xq[a]};
281
- _.cr=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case Zq:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case $q:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case ar:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case br:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.ue}};og="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
282
- pg=typeof Object.defineProperties==_.Qd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
283
- qg("Promise",function(a){function b(g){this.f=0;this.l=void 0;this.a=[];var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.f=function(g){if(null==this.a){this.a=[];var h=this;this.h(function(){h.l()})}this.a.push(g)};var e=og.setTimeout;c.prototype.h=function(g){e(g,0)};c.prototype.l=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
284
- g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.h(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.C),reject:g(this.h)}};b.prototype.C=function(g){if(g===this)this.h(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.ve:var h=null!=g;break a;case _.Qd:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
285
- b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.Qd?this.G(h,g):this.o(g)};b.prototype.h=function(g){this.w(2,g)};b.prototype.o=function(g){this.w(1,g)};b.prototype.w=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.l=h;this.A()};b.prototype.A=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.f(this.a[g]);this.a=null}};var f=new c;b.prototype.F=function(g){var h=this.j();
286
- g.fd(h.resolve,h.reject)};b.prototype.G=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,t){return typeof q==_.Qd?function(v){try{l(q(v))}catch(y){m(y)}}:t}var l,m,n=new b(function(q,t){l=q;m=t});this.fd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.fd=function(g,h){function k(){switch(l.f){case 1:g(l.l);break;case 2:h(l.l);break;default:throw Error("Unexpected state: "+
287
- l.f);}}var l=this;null==this.a?f.f(k):this.a.push(k)};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=ng(g),m=l.next();!m.done;m=l.next())d(m.value).fd(h,k)})};b.all=function(g){var h=ng(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){q[v]=y;t--;0==t&&l(q)}}var q=[],t=0;do q.push(void 0),t++,d(k.value).fd(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var sg=this||self;
288
- sg.a=!0;_.z("clpp.utils.obj.cloneItem",_.vg);_.z("clpp.utils.obj.merge",_.ug);var Kg={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",Kg);var Ig=3,Hg={},dr=[];_.z("clpp.log.getLoggers",function(){return _.vg(Hg)});_.z("clpp.log.addInterceptor",function(a){a&&dr.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=dr.indexOf(a),0<=a&&dr.splice(a,1))});_.z("clpp.log.getTagLevel",Jg);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=Hg[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.Bg(b)&&(b=Lg(b)),Hg[a]=b)});
289
- _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.Bg(a)&&(a=Lg(a));Ig=a});_.z("clpp.log.getLogLevel",function(){return Ig});
290
- _.R=class{constructor(a){(this.tag=a)&&void 0===Hg[a]&&(Hg[a]=-1)}log(a,b){if(window.console){if(1<arguments.length){var c=arguments[0];Array.prototype.shift.call(arguments)}else c=3;var d=Jg(this.tag);if(0<=d){if(d<c)return}else if(Ig<c)return;this.tag&&Array.prototype.unshift.call(arguments,"["+this.tag+"]");d=new Date;d.toISOString&&(d=d.toISOString().substring(11).replace("Z",""),Array.prototype.unshift.call(arguments,d));4===c?console.log.apply(console,arguments):3===c?console.info.apply(console,
291
- arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of dr)e.call(e,c,arguments)}}info(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)}debug(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)}warn(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)}error(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)}$f(a){return a?
292
- this.tag?new _.R(this.tag+"."+a):new _.R(a):this}};_.z("clpp.log.Logger",_.R);_.R.prototype.createChild=_.R.prototype.$f;_.R.prototype.error=_.R.prototype.error;_.R.prototype.warn=_.R.prototype.warn;_.R.prototype.debug=_.R.prototype.debug;_.R.prototype.info=_.R.prototype.info;_.R.prototype.log=_.R.prototype.log;var Mg=new _.R("clpp");_.z("clpp.log.info",_.Ng);_.z("clpp.log.debug",_.Og);_.z("clpp.log.warn",_.C);_.z("clpp.log.error",_.Pg);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Ao,Bo;Ao=class{constructor(a,b){this.Ib=a;this.a=b}};Bo=class{constructor(a,b){this.player=a;this.a=b}};_.Rg=new _.R("clpp.players");_.Qg={};_.er=class{constructor(){this.a={}}push(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]}get(a){return(a=this.a[a])?a.slice():[]}remove(a,b){a=this.a[a];if(!a)return!1;let c=!1;for(let d=0;d<a.length;++d)a[d]==b&&(a.splice(d,1),--d,c=!0);return c}clear(){this.a={}}forEach(a){for(const b in this.a)a(b,this.a[b])}};var fr,gr;fr=class{constructor(a,b,c,d){this.f=a;this.pc=b;this.a=c;this.Qg=!!d}Sb(a){try{this.pc.handleEvent?this.pc.handleEvent(a):this.pc.call(this.a,a)}catch(b){_.Pg("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
293
- _.F=class{constructor(a,b){if(b)for(const c in b)this[c]=b[c];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.f=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.f=!0}stopPropagation(){}};
294
- gr=class{constructor(a){this.a=new _.er;this.f=a}trigger(a){const b=this.a.get(a.type);if(b)for(let c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].Sb(a),b[c].Qg&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new fr(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new fr(a,b,c||this.f,!0));return b}off(a,b){const c=this.a.get(a);let d=!1;if(c)for(let e=0;e<c.length;e++)c[e].pc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var hr;_.ir=class{constructor(){this.a=new _.er}release(){_.Ug(this)}on(a,b,c,d=!1){a=new hr(a,b,c,d);this.a.push(b,a)}one(a,b,c){const d=e=>{this.off(a,b,d);return c(e)};this.on(a,b,d)}off(a,b,c){const d=this.a.get(b)||[];for(let e=0;e<d.length;++e){const f=d[e];f.target!=a||c!=f.a&&c||(Tg(f),this.a.remove(b,f))}}};hr=class{constructor(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)}};var jr=class{constructor(a){this.m=a;this.o=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=null;this.f=new _.ir;this.a=this.l=null;this.h=[];this.g=new _.R("clpp.native.Metadata")}release(){this.f.release();this.h=[];this.a=null}destroy(){const a=this;return _.x(function*(){a.release();a.l=null;a.j=null})}getTimelineCues(){return this.h}};_.qr=class{constructor(a,b,c,d){d=void 0===d?_.kr:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.lr;this.writingMode=_.mr;this.lineInterpretation=_.nr;this.line=null;this.lineAlign=_.or;this.direction=pr;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}md(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
295
- a.payloadType}};_.z("clpp.text.Cue",_.qr);_.qr.positionAlign={LEFT:_.ee,RIGHT:_.fe,CENTER:_.Tc,AUTO:"auto"};_.kr=_.u;_.qr.payloadType={TEXT:_.kr,VTT_XML:_.$f,TTML_XML:_.Ef};_.lr=_.Tc;_.rr={LEFT:_.Zd,RIGHT:_.jf,CENTER:_.lr,START:_.Zd,END:_.jf};_.qr.textAlign=_.rr;var pr="ltr";_.qr.direction={HORIZONTAL_LEFT_TO_RIGHT:pr,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.mr="horizontal-tb";_.qr.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.mr,VERTICAL_LEFT_TO_RIGHT:_.Nf,VERTICAL_RIGHT_TO_LEFT:_.Of};_.nr=0;
296
- _.qr.lineInterpretation={LINE_NUMBER:_.nr,PERCENTAGE:1};_.or=_.rf;_.sr={CENTER:_.Tc,START:_.or,END:_.Ld};_.qr.lineAlign=_.sr;_.vr=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.tr;this.scroll=ur;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.vr);_.tr=1;_.vr.units={PX:0,PERCENTAGE:_.tr,LINES:2};var ur="";
297
- _.vr.scrollMode={NONE:ur,UP:"up"};_.vr.displayAlign={BEFORE:"flex-end",CENTER:_.Tc,AFTER:"flex-start"};_.vr.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.ld,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var wr=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.ir;this.j=!1;this.g=new _.R("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.h=this.f=null;return Promise.resolve()}start(a){this.j?this.g.warn("Already started. Ignoring request..."):(this.j=!0,this.h=a,this.f=this.h.textTracks,this.a.on(this.f,_.mc,b=>jh(this,b)),this.a.on(this.f,Vc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.mf&&(d.mode=
298
- _.Sd)}}}))}o(a){const b=new _.qr(a.startTime,a.endTime,a.text,_.$f);if(_.Bg(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Nf;break;case "rl":b.writingMode=_.Of}_.Cg(a.size)&&(b.size=a.size);if(_.Bg(a.align))switch(a.align){case _.Zd:case _.rf:b.textAlign=_.Zd;break;case _.Tc:b.textAlign=_.lr;break;case _.jf:case _.Ld:b.textAlign=_.jf}_.Cg(a.position)&&(b.position=a.position);if(_.Bg(a.positionAlign))switch(a.positionAlign){case _.ee:b.positionAlign=_.ee;break;case _.Tc:b.positionAlign=
299
- _.Tc;break;case _.fe:b.positionAlign=_.fe}_.Cg(a.line)&&(b.line=a.line);if(_.Bg(a.lineAlign))switch(a.lineAlign){case _.rf:b.lineAlign=_.or;break;case _.Tc:b.lineAlign=_.Tc;break;case _.Ld:b.lineAlign=_.Ld}typeof a.snapToLines===_.Kc&&(b.lineInterpretation=a.snapToLines?_.nr:1);return b}};_.H=class extends Error{constructor(a,b,c,d,e){super(kh(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.Bg(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.H)}a(a){this.severity!==a&&(this.severity=a,this.message=kh(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.z("clpp.Error",_.H);_.G=2;_.H.Severity={RECOVERABLE:1,FATAL:_.G};
300
- _.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
301
- _.H.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,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,FETCH_OR_APPEND_ERROR:2010,INVALID_MP4:2011,
161
+ bn=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.w(function*(){if(e.length){var h=b;if(!h)try{h=pn(a,d,e,f)}catch(u){if(a.h.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:u,initDataType:d,initData:e}),a.g.ignoreUnrecognizedInitData)return}if(!g&&qn(a,h,d,e)){var k=!0;if("skd"===d&&!a.g.enableSessionCacheForSkd)for(var l of a.f.keys()){var m=a.f.get(l);
162
+ if(h&&m.keyId===h){a.h.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.h.warn("Unable to close session",u)}k=!1}}if(k){a.h.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.C?_.Pe:Pf;var q=a.G.createSession(n);a.h.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.V(new _.G(_.E,6,6005,{browserError:u.message}));return}a.w.on(q,_.ve,a.ha.bind(a));a.w.on(q,ie,a.ea.bind(a));k={Zb:f,sd:[],initData:e,initDataType:d,keyId:h,
163
+ Sa:h?[h]:[],loaded:!1,je:Infinity,periodId:c,pb:null,Da:new _.Ym,sessionContext:{ldlDelay:0,customData:{}}};k.Da.catch(()=>{});f&&(l=a.f.get(f),k.sessionContext=l.sessionContext);a.f.set(q,k);h&&!a.j.get(h)&&a.j.set(h,Jf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.Sa.includes(m.keyId)&&_.Ci(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.Sa.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,Jf));l=a.D.getConfiguration();m=a.keySystem();m=a.g.Qa[m];n=(n=m.modifiers)&&n.transformInitData;
164
+ _.Pg(n)||(n=Nm);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.l.f()})}catch(u){h=u;u instanceof _.G||(h=new _.G(_.E,6,6016,u));k.Da&&k.Da.reject(u);a.V(h);return}a.h.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(u=>{if(!a.pa){var v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));a.V(new _.G(_.E,6,6006,{browserError:u.message,
165
+ error:u,extended:v},u))}})}else a.h.warn("Empty init data")})};rn=function(a){let b=Infinity;a=a.f.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};on=function(a){a=a.f.values();return _.Zh(a,b=>b.loaded)};qn=function(a,b,c,d){if(!b&&c!==_.Ff)return!1;d=b||Hl(d);for(const e of a.f.values())if(b&&e.keyId===b||b&&e.Sa.includes(b)||c===_.Ff&&(e.keyId||Hl(e.initData))===d)return!0;return!1};
166
+ pn=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;var f=a.keySystem(),g=a.g.Qa[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.Pg(g)||(g=Mm);try{var h={ldlDelay:0,customData:{}};e&&(h=a.f.get(e).sessionContext);var k=g(f,c,h);a.h.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.h.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.Ff)return Hl(c)||"";if(b===_.Zc){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
167
+ _.tm(c);if(m)return m.a}else if(Em(l)){{f=new _.sm(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.O(f);const m=_.O(f);h=_.yl(m);const n=_.O(f);c=n>>>24;k=n&16777215;const q=_.wl(f,16),u=_.Bi(q);if(0<c){const D=_.O(f);f.skip(16*D)}const v=_.O(f),y=_.wl(f,v),A=_.zm(y);_.dh("Parsed PR PSSH Box","size",g,"name",h,"version",c,"flags",k,"size",v,"systemId",u,"keyId",A.a);e=A}if(e)return e.a}}catch(m){throw a.h.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
168
+ en=function(a,b){const c=b.target,d=a.f.get(c);var e=a.keySystem();let f=!1;e.match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength?(f=!0,a.h.info("WV Server certificate request for "+`SID:'${c.sessionId} `+`from msg '${b.messageType}'`)):a.h.info("License request for "+`SID:'${c.sessionId}'/KID:'${d.keyId}' `+`from msg '${b.messageType}'`);let g=a.a.licenseServerUri;e=a.g.Qa[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
169
+ const h=_.Ni([g],a.g.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===le&&d.Zb?ke:f?ad:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===ke)a.D.onEvent(new _.C(Md));Em(a.a.keySystem)&&sn(a,h);fl(a.K,h);const k=Math.floor(b.timeStamp),l=Date.now();return tn(a,h,d.sessionContext).then(()=>{_.Bm(`drm.license.req.${k}.start`);a.h.debug("Sending DRM license request to",g,h);return a.D.nb.fetch(h).P}).then(m=>{_.Bm(`drm.license.req.${k}.end`);
170
+ _.Cm(`drm.license.req.${k}`,`drm.license.req.${k}.start`,`drm.license.req.${k}.end`);if(a.pa)return Promise.reject();const n=Date.now()-l;var q=un(a,m);let u="";q&&(u=` RID:${q}`);q=m&&m.data?m.data.byteLength:-1;f?a.h.info("WV Server certificate response for "+`SID:'${c.sessionId}' `+`${q} bytes `+`in ${n}ms${u}`):a.h.info("License response for "+`SID:'${c.sessionId}'/`+`KID:'${d.keyId}' `+`${q} bytes `+`in ${n}ms${u}`);const v=gl(a.K,m);_.Bm(`drm.sess.update.${k}.start`);return c.update(m.data).then(()=>
171
+ {_.Bm(`drm.sess.update.${k}.end`);_.Cm(`drm.sess.update.${k}`,`drm.sess.update.${k}.start`,`drm.sess.update.${k}.end`);if(!f){var y=rn(a),A=v?Date.now()+1E3*v.delay:Number.NaN;y=new _.C(_.Od,{keySystem:a.keySystem(),expirationTime:y,expectedRenewalTime:A});a.D.onEvent(y);d&&(d.pb&&d.pb.resolve(),d.Zb&&(y=d.Zb,a.h.info(`Closing expired session '${y.sessionId}'`),Dm(y).catch(()=>{a.h.warn("Unable to close expired session in time")}),(y=a.f.get(d.Zb))&&y.sc&&y.sc.stop(),a.f.delete(d.Zb),d.Zb=null),(new _.Nj(()=>
172
+ {a.pa||(d.loaded=!0,d.Da&&d.Da.resolve(),on(a)&&(a.o||a.h.info(va),a.o=!0,a.B=!1,a.F.resolve()))})).da(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||v&&el(a.keySystem()))&&(y=new _.Nj(()=>{!a.pa&&a.K&&(a.h.info("Updating CSL Sessions"),Em(a.keySystem())?bn(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.ud)&&c.update(_.ni("renew")))}),d.sc=y,y.da(v?v.delay:d.sessionContext.ldlDelay)))}})},m=>_.w(function*(){if(!a.pa){var n=m.data.headers;n=Object.assign({message:_.Ra,
173
+ url:m.data.url,status:m.data.status,response:m.data.response},n?{headers:n}:{},hm(n));n=new _.G(_.E,6,6007,n,m);a.V(n);d&&d.pb&&d.pb.reject(n);d&&d.Da&&d.Da.reject(n)}})).catch(m=>{a.pa||(m===Fb?a.h.info("Ignore update for closed sessions"):(m=new _.G(_.E,6,6008,{browserError:m.message}),a.V(m),d&&d.pb&&d.pb.reject(m),d&&d.Da&&d.Da.reject(m)))})};
174
+ sn=function(a,b){var c=li(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.h.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.gg).textContent;b.body=_.zi(a.querySelector("Challenge").textContent).buffer}else a.h.debug("PlayReady request is already unwrapped."),b.headers[ta]="text/xml; charset\x3dutf-8"};
175
+ tn=function(a,b,c){return _.w(function*(){const d=a.D.getConfiguration();yield gn(a,d);const e=a.keySystem();var f=a.g.Qa[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.ud)&&b.requestModifiers.push(k=>_.Kl(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.ud)&&b.responseModifiers.push(k=>_.Ll(k))})};
176
+ un=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.ji(_.zi(b))).ti}catch(c){a.h.warn("Unable to parse DRMtoday Request ID",c)}return""};_.xn=function(a,b){a&&b&&(_.vn.set(a,b),_.wn.info(`Registered TextDisplayerFactory: '${a}'`))};
177
+ _.yn=function(a,b){b=b.find(c=>(c=_.vn.get(c))?c.isSupported(a):!1);if(null==b)return _.wn.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.wn.info(`Chosen the text displayer: ${b}`);return _.vn.get(b)};_.zn=function(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{{const c=Date.now()/1E3;a.a.duration=c-a.a.timestamp;a.a.state!==b&&(a.f.push(a.a),a.a={timestamp:c,state:b,duration:0})}}};
178
+ An=function(a,b){let c=0;a.a&&a.a.state===b&&(c+=a.a.duration);for(const d of a.f)c+=d.state===b?d.duration:0;return c};Bn=function(a){const b=d=>({timestamp:d.timestamp,state:d.state,duration:d.duration}),c=[];for(const d of a.f)c.push(b(d));a.a&&c.push(b(a.a));return c};Cn=function(a){return a.a.map(b=>_.Lg(b))};
179
+ _.Dn=function(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]}};Fn=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=En.value().get(b),c.one(a,b,d))};
180
+ Jn=function(a){a.h.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>Gn(a,d.type);a.a.on(b,_.Ud,()=>{a.g||(a.j=!1,Hn(a,_.In))});a.a.on(b,Uc,c);a.a.on(b,_.bf,()=>{a.F=!0;a.j=!1;Gn(a,_.bf)});a.a.on(b,_.Ne,()=>{a.F=!1;a.j=!1;Gn(a,_.Ne)});a.a.on(b,_.Sf,c);a.a.on(b,_.pf,c);a.a.on(b,_.Af,d=>{a.g=!1;a.j=!1;Gn(a,d.type)});a.a.on(b,_.Bf,d=>{a.g=!0;Gn(a,d.type)});a.a.on(b,Gf,c);a.a.on(b,_.qg,()=>{a.j=!0;Gn(a,_.qg)});a.a.on(b,_.Vd,d=>a.V(d));a.a.on(b,_.qe,c);a.a.on(b,Vc,()=>{a.C=
181
+ !0;Gn(a,Vc)});a.a.on(b,_.fg,d=>{a.g=!0;Gn(a,d.type)});a.a.on(b,_.eg,d=>{a.g=!1;a.j=!1;Gn(a,d.type)})};Kn=function(a,b){return Object.keys(b)[a]};Mn=function(a,b){const c={type:_.If};b===_.Tc||b===_.Sc?(c.reason=a.w,b===_.Tc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.Ln&&(c.reason=a.w),a.A===_.Ln&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
182
+ Hn=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.Ln;a.A=a.f;a.f=b;a.A===_.In&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.Ln?(a.K=a.o,a.w=a.g?1:2,a.h.info("Buffering started. Reason: "+Kn(a.w-1,_.Nn)),b=Mn(a,_.Tc),a.Ub(_.Tc,b)):d&&(a.B=a.o-a.K,a.h.info("Buffering finished. Reason: "+Kn(a.w-1,_.Nn)+". Buffering time: "+a.B+" ms"),b=Mn(a,_.Sc),a.Ub(_.Sc,b));b=Kn(a.A,_.On);c=Kn(a.f,_.On);a.h.info(`Player state change: ${b} -> ${c}`);a.Ub(_.If,Mn(a,""));return!0};
183
+ Gn=function(a,b){if(a.f===_.Pn)a.h.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused(),d=a.m?a.m.isEnded():!1;if(d)a.g||(a.j=!1,Hn(a,_.In));else if(b!==_.Sf){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Ga(e,!0):-1;a.G=e;e=a.m.getSurface().getMedia();a.l=e?e.readyState:null;a.J=a.m.getPlaybackRate()||1;e=typeof a.l===_.r&&2>a.l&&2===e.networkState;var f=typeof a.l===_.r&&0>=a.G&&a.f===_.Qn,g=typeof a.l===_.r&&2>=a.l&&a.j;e=a.g||
184
+ f||e||g;!a.L||a.m.isLive()||a.f!==_.Ln||e||(f=b===_.Af&&4===a.l,(g=a.A===_.Rn)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=Hn(a,_.Ln):c?f=Hn(a,_.Sn):a.F&&(f=Hn(a,_.Tn));f&&(a.C=!1);a.h.debug("Video state check for event "+b+":: seeking: "+a.g+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.l+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+f+", Current state: "+Kn(a.f,_.On))}}};
185
+ Un=function(a){a=(new _.Jh(a)).wa;if(!a)return null;a=a.toUpperCase();return _.ri(a,".MPD")?_.yc:_.ri(a,".M3U8")?_.Ik:_.ri(a,".MP4")?_.kg:_.ri(a,"MANIFEST")||_.ri(a,".ISM")?_.Dc:null};_.Wn=function(a){let b;Rk(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Lf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Vn(b[c]);d&&a.push(d)}return a};
186
+ Vn=function(a){let b=null;_.Rg(a)&&(a={url:a});typeof a===_.De&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.z(a.drmProtected)||typeof a.drmProtected!==_.Rc||(b.drmProtected=a.drmProtected),_.z(a.isLive)||typeof a.isLive!==_.Rc||(b.isLive=a.isLive),_.z(a.name)||typeof a.name!==_.Lf||(b.name=a.name),_.z(a.Db)||typeof a.Db!==_.Lf||(b.Db=a.Db),_.z(a.audioMimeType)||typeof a.audioMimeType!==_.Lf||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Un(a.url),b.type?Xn.debug("Detect media type "+
187
+ b.type+" for "+a.url):Xn.warn("Unable to detect media type for "+a.url));return b};Zn=function(a){return a.w?Yn():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.Vd);a.g.off(c,_.uf);a.a=null}b()})};Yn=function(){return Promise.reject(new _.G(_.E,7,7E3))};
188
+ ao=function(a,b){return a.w?Yn():new Promise(c=>{a.a||(a.g.on(b,_.Vd,()=>{{const d=$n(a);if(d)a.onError(d)}}),a.g.on(b,_.uf,()=>{const d=b.videoWidth,e=b.videoHeight,f=a.getTrackManager();f&&0<d&&0<e&&(f.w={width:d,height:e});a.trigger(new _.C(_.Qc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
189
+ co=function(a){return _.w(function*(){if(a.w)return Yn();var b=a.ca[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.kl(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=new _.bo({nb:c,onError:d=>a.onError(d),oe:()=>{},ne:(d,e)=>{a.trigger(new _.C(_.Ld,{expirationTime:e}))},onEvent:d=>{d instanceof _.C?a.dispatchEvent(d):a.log.debug(_.Nb,
190
+ d.type)},getConfiguration:()=>a.getConfiguration(),xc:()=>a.xc()});a.o.g=b;yield _.Xm(a.o,[{id:0,language:_.Wf,primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:()=>null,getSegmentReference:()=>null,adjustSegmentDurations:()=>{},getDuration:a.getDuration.bind(a),initSegmentReference:null,ua:0,mimeType:_.kg,codecs:"",encrypted:!0,keyId:null,language:_.Wf,originalLanguage:_.Wf,label:null,type:_.t,primary:!1,frameRate:void 0,Rh:void 0,
191
+ trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,Dh:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.nn(a.o,a.a);return Promise.resolve()})};eo=function(a,b){Fn(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.Pn&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
192
+ $n=function(a){if(null===a.ca||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.G(_.E,3,3016,{code:b,Lh:c,message:a.a.error.message})};
193
+ go=function(a){if(a.w)return new _.fo(Yn(),()=>{});const b=a.ca[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&eo(a,c);if(d.preload!==_.Ce)a.g.one(d,_.qe,()=>{const g=Date.now()/1E3-e;a.f.A=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Rj()||_.Uj())&&d.load();const f=new _.Ym;a.g.one(d,Gf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Nj(()=>{f.reject(new _.G(_.E,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
194
+ uri:b.url},d.error))})).da(g))});Fn(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject($n(a)):d.preload===_.Ce&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.g.one(d,_.Vd,()=>{f.reject($n(a))});return new _.fo(f,
195
+ ()=>{const g=new _.G(_.E,7,7001);f.reject(g);return Promise.resolve()})};ho=function(a,b){Fn(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{if(a.isLive()&&a.getState()!==_.Pn){var c=a.getSeekRange().end,d=a.getPosition();Infinity===c||20>c-d||(a.log.warn("Detected that HLS live stream was not started from close to the live edge. Auto-fixing, seeking to seek range end."+`(position: ${d}, seek range end: ${c})`),a.seek(c).catch(e=>{a.log.warn("Error while seeking to seek range edge.",e)}))}})};
196
+ io=function(a,b){let c=!1;a.g.on(b,_.Bf,()=>{c=b.paused});a.g.on(b,_.Af,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};_.lo=function(a){a&&(0<=jo.indexOf(a)?ko.warn(`Factory '${a.name()}' is already registered`):(jo.push(a),ko.info(`Factory ${a.name()}' has been registered.`)))};no=function(a,b){let c=jo.find(d=>d.isSupported(a,b));c||(c=new mo);ko.info(`Chosen ads: ${c.name()}`);return c};
197
+ _.oo=function(a,b){a=document.createElement(a);for(const c in b){const d=b[c];null===d||void 0===d?a.setAttribute(c,""):a.setAttribute(c,d)}return a};_.po=function(a,b){a.classList.add(b)};_.qo=function(a,b){if(a&&typeof b===_.De)for(const c in b)a.style[c]=b[c]};_.ro=function(a){return document.createElement(a)};
198
+ so=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.g.values());zh(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};to=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.g.add(b))};
199
+ uo=function(a,b,c){(_.Uj()&&53===Vj().major||_.Uj()&&68===Vj().major||_.Wj())&&!b.hasAttribute(Bd)&&(b.style.opacity="0",b.setAttribute(Bd,""),a.j.one(b,Qd,()=>{b.removeAttribute(Bd);b.style.opacity="1";c&&(c.style.opacity="1")}))};
200
+ yo=function(a){a.a.on(window,"offline",()=>{vo(a,!1)});a.a.on(window,"online",()=>{a.f||wo(a)});a.a.on(a.m,Gf,()=>xo(a));a.a.on(a.m,"suspend",()=>xo(a));a.a.on(a.m,_.qg,()=>xo(a));a.a.on(a.m,_.bf,()=>{a.f||wo(a)});a.a.on(a.m,_.nf,()=>{a.f||wo(a)});a.a.on(a.m,_.If,()=>{switch(a.m.getState()){case _.Ln:xo(a);break;default:xo(a)}})};zo=function(a){a.g&&(a.g.stop(),a.g=null)};xo=function(a){a.f&&wo(a)};
201
+ Ao=function(a){return _.w(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Xi(a.j,b.url,b.attemptParameters,b.method),vo(a,b))})};wo=function(a){a.m.getConfiguration().connectivityCheck&&(zo(a),a.g=(new _.Nj(()=>Ao(a))).da(5))};vo=function(a,b){zo(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.C(Je,{online:a.f})))};Co=function(){for(let a=0;a<Bo.length;++a)Bo[a].qc()};
202
+ _.Do=function(a,b){b=b||0;a={priority:b,qc:a};for(let c=0;c<Bo.length;c++)if(Bo[c].priority<b){Bo.splice(c,0,a);return}Bo.push(a)};Eo=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};Go=function(a){if(!a.a){var b=a.license.split(".");if(3!==b.length)throw Error("Expected to find 3 data sections in JWT raw data");b=new Fo(b[0],b[1],b[2]);a.a=b}return a.a};
203
+ Ho=function(a){switch((a.ca[0]||{src:"",type:""}).type){case _.yc:a="dash";break;case _.Dc:a="ss";break;case _.Ik:a="hls";break;case _.kg:a="mp4";break;default:a=""}return a};Io=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};Jo=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
204
+ Ko=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Lo=function(a){a=a.drmInfo;return(new _.Jh(a&&a.licenseServerUri||"")).Ha};Mo=function(a){const b=a.configuration;let c="no";b.drm&&!_.Tg(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Pd)||Lo(a).endsWith("drmtoday.com"))&&(c=Pd);return c};No=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.yd:b="wv";break;case _.wd:b="pr";break;case _.ud:b="fps"}return b};
205
+ Oo=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Po=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Ya:case Wa:b="L1";break;case Xa:b="L2";break;case _.Eb:case _.Db:b="L3"}return b};
206
+ To=function(a,b){const c="ie"===_.pk().browser;var d=b.configuration;const e=[...Array.from(_.Sk.keys()),...b.Cf];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.fa,"CL-USER-ID":Io(d),"CL-ASSET-ID":Jo(d),"CL-SESSION-ID":Ko(d),"CL-PLAYBACK-TYPE":b.isLive?Qo:Ro,"CL-CONTENT-TYPE":Ho(b),"CL-PLUGINS":e.join(" "),"CL-DRM":Mo(b),"CL-DRM-CDM":No(b),"CL-DRM-SEC-LEVEL":Po(b),"CL-DRM-OFFLINE":Oo(b),"CL-DRM-IP":Lo(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=
207
+ _.Ni(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.So).fetch(d).P.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=Go(a);f=f.data;var h=f.status;if(g.a&&g.a.ilv)g=Promise.resolve();else{switch(h){case 403:case 404:g=7101;var k="castLabs Player license is invalid";if(403===h){h=k;k="";try{k=JSON.parse(decodeURIComponent(f.responseText)).message}catch(l){}f=k;f=h+(": "+f)}else f=k+
208
+ "!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:g=Promise.resolve();break a}a.h.error(cb+k);g=Promise.reject(new _.G(_.E,7,g,k))}}return g})};_.Vo=function(a){a&&(0<=Uo.indexOf(a)||Uo.push(a))};Xo=function(a,b){a.C=new Wo(b);a.C.verify().catch(c=>{setTimeout(()=>{a.h.error(cb+c);a.trigger(new _.C(_.Vd,{detail:new _.G(_.E,7,7101)}));a.destroy()},1E3)})};
209
+ Zo=function(a,b){a.T=b;for(const c of a.T)(b=c.id())&&(a.H[b]=c);_.Yo(a,"onPlayerCreated")};_.$o=function(a,b){null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null),b&&(b.init(a.g,a.A),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b))};
210
+ ap=function(a,b){_.w(function*(){a.g.getMedia()||a.g.getCastElement();a.C||(a.C=new Wo(a.f.license));try{a.h.debug("Verifying license remotely"),yield To(a.C,b),a.h.debug("License verified remotely")}catch(c){a.h.debug("License rejected by remote",c),setTimeout(Eo,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.Yo=function(a,b,...c){if(!a.U)return Promise.resolve();const d=a.T.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
211
+ bp=function(a){return _.w(function*(){if(a.L)return a.h.debug("The player is already released. No-op"),new Promise(b=>b());a.W.off(document,og);a.trigger(new _.C(_.rf));a.g&&a.g.release();a.j&&(yield a.j.dispose(),a.j=null);if(a.a){let b=null;const c=a.a.on(_.If,d=>{b=d});return _.Yo(a,_.He).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.F.release()])}).then(()=>{a.h.debug("Releasing player completed");b&&(a.h.debug("Re-post state change event after release"),a.trigger(b))}).finally(()=>
212
+ {a.a.off(_.If,c);a.trigger(new _.C(qf))})}a.trigger(new _.C(qf));return new Promise(b=>b())})};cp=function(a,b){const c=ih(d=>d.f(_.tb)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.G(_.E,7,7003,"No compatible player implementing playlist mode found!");return Promise.resolve({player:c.create(),sourceIndex:0})};ep=function(a,b,c){return _.w(function*(){if(2===(a.a?a.a.canPlay(b[0],c):0)&&!a.N)return{player:a.a,sourceIndex:0};a.N=!1;return dp(a,b,c)})};
213
+ fp=function(a,b,c){return a.J===_.tb?cp(b,c):ep(a,b,c)};
214
+ dp=function(a,b,c){return new Promise((d,e)=>{var f;if(b){var g=f=null;for(var h=0;h<b.length;h++);h=Object.values(_.fh);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Kb:h[l],confidence:h[l].canPlay(b[k],c)};if(null===f||f.confidence<m.confidence)f=m,g=k}f&&typeof g===_.r&&0<f.confidence?(_.gh.debug("Player Factory '"+f.Kb.a()+"' can play",b[g]),f=new gp(f.Kb,g)):(_.gh.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Kb.create(),d({player:e,sourceIndex:f.sourceIndex})):
215
+ (d=new _.C(_.Vd,{detail:new _.G(_.E,7,7003)}),a.trigger(d),e(d))})};
216
+ _.jp=function(a,b,c){return _.w(function*(){if(a.K)throw new _.G(_.E,7,7E3,"Player is already destroyed.");if(!a.g)throw new _.G(_.E,7,7E3,"No surface associated with this player!");_.Bm(Xe);yield a.release();const d=c||_.Wn(b);if(!b||0===d.length)throw new _.G(_.E,7,7003,mb);a.X=d;a.f=_.Qk(a.A,b,{source:d});a.L=!1;const e=yield fp(a,d,a.f);_.$o(a,e.player);a.a&&a.a.setSourceIndex(e.sourceIndex);hp(a);a.a&&a.a.setCdnErrorCallback(a.I);ip(a,a.f);if(a.f.pauseWhenInBackground)a.W.on(document,og,()=>
217
+ {document.hidden?(a.h.debug("Player is hidden: pausing..."),a.pause()):(a.h.debug("Player is visible: resuming..."),a.play())});Zk(a);yield _.Yo(a,"onContentWillLoad",d[e.sourceIndex]);_.Bm(We);_.Cm("player.beforeLoad",Xe,We)})};_.kp=function(a){return _.w(function*(){a.g.getMedia()||a.g.getCastElement();a.trigger(new _.C(re));yield Promise.all([a.a.load(a.f),a.j.load()])})};
218
+ _.mp=function(a){return _.w(function*(){_.Bm(Te);ap(a,{configuration:a.getConfiguration(),ca:a.lf(),drmInfo:a.getDrmInfo(),Cf:Object.keys(a.H),isLive:a.isLive()});lp(a);$k();yield _.Yo(a,"onContentLoaded");a.f.autoplay&&(yield a.play());_.Bm(Se);_.Cm("player.afterLoad",Te,Se)})};np=function(a){return _.w(function*(){if(a.a){var b=a.a;b.Mf?(a.trigger(new _.C(re)),yield b.Mf(),yield _.mp(a)):a.h.warn(yb)}else a.h.warn(vb)})};
219
+ hp=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.w(function*(){a.uc&&a.Td&&(a.Td=!1,yield a.uc(b))}))};ip=function(a,b){a.j=no(a,b).create(a)};
220
+ op=function(a){const b=_.xh(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().ga().filter(f=>c?f.kind===_.Wd:f.kind!==_.Wd);if(0===d.length)c&&a.h.warn("Forced subtitles are configured to be preferred, but no forced subtitles are available.");else{if(c&&0===b.length){var e=a.getTrackManager().ja();e&&e.language?(e=_.Xh(e.language||""),b.push(e)):(e=a.getTrackManager().Ca())&&e.language&&(e=_.Xh(e.language||""),b.push(e));0===b.length&&a.h.warn("Forced subtitles are configured to be preferred, but neither the preferred text language is set, nor the audio or video track language is available to determine which forced subtitles language to select.")}b.some(f=>
221
+ {const g=_.Xh(f);if(f=d.find(h=>{h=_.Xh(h.language||"");return _.Yh(h,g)}))return a.getTrackManager().Ea(f),!0;c&&a.h.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};lp=function(a){_.w(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);op(a)})};pp=function(a){a.G.forEach(b=>b());a.G=[]};
222
+ sp=function(a,b){return _.w(function*(){try{_.Bm(af);a.J=_.tb;a.U=!1;const c=b.slice(1).map(d=>({config:d,ca:_.Wn(d)}));yield _.jp(a,b[0]);c.forEach(d=>{qp(a,d.config,d.ca)});a.trigger(new _.C(re));yield a.a.setupPlaylist(b);yield _.mp(a);c.forEach(d=>{rp(a,d.config,d.ca)});_.Bm($e);_.Cm("player.setupPlaylist",af,$e)}catch(c){if(a.l)throw a.h.info(db),new _.G(_.E,7,7E3);throw c;}})};
223
+ tp=function(a,b){const c=d=>{a.B=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.xf,c);a.G.push(()=>{a.removeEventListener(_.xf,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.Sf,e),a.h.info("Playlist end time reached. Stopping playback."),a.trigger(new _.C(_.wf)),a.pause())};a.addEventListener(_.Sf,e);a.G.push(()=>{a.removeEventListener(_.Sf,e)})}};
224
+ up=function(a,b){return _.w(function*(){try{_.Bm(Ve);const c=_.Wn(b);qp(a,b,c);yield a.a.appendLoad(b);rp(a,b,c);_.Bm(Ue);_.Cm("player.appendLoad",Ve,Ue)}catch(c){if(a.l)throw a.h.info(db),new _.G(_.E,7,7E3,{id:b.id});throw c;}})};
225
+ qp=function(a,b,c){if(0===c.length)throw new _.G(_.E,7,7003,{message:mb,id:b.id});if(1<c.length)throw new _.G(_.E,7,7003,{message:"Multiple sources not supported!",id:b.id,source:c});if(2!==(a.a?a.a.canPlay(c[0],a.f):0))throw new _.G(_.E,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};rp=function(a,b,c){ap(a,{configuration:b,ca:c,drmInfo:a.getDrmInfo(),Cf:Object.keys(a.H),isLive:c[0].isLive})};
226
+ vp=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(fd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.t);d.classList.add(hd);const e=document.createElement(_.Gd);e.classList.add(gd);e.appendChild(d);c.appendChild(e);return new P(d,b)})};
227
+ wp=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.h.info(`Show video element .${b}`),d.classList.add(jd)):(a.h.info(`Hide video element .${b}`),d.classList.remove(jd)),a.A&&a.A(d,c))};zp=function(a,b){return _.w(function*(){const c=yield a.w.get();a.f=b;b.role=xp;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();wp(a,c,!0);yield c.load(b.config);yp(a,b);b.config.autoplay||(yield c.play())})};
228
+ Dp=function(a){_.w(function*(){if(0===a.a)yield Ap(a);else if(a.a===a.g.length-1)yield Bp(a);else{const b=[a.a-1,a.a+1];a.h.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>Cp(a,c)))}})};
229
+ Ep=function(a,b){return _.w(function*(){if(b.player){if(b.state===kf){a.h.info(Ub);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=xp;wp(a,b.player,!0);b.state===jf?(_.Bm(ff),a.o.preloadMedia?yield b.player.play():yield np(b.player),_.Bm(ef),_.Cm("playlist.next",ff,ef)):b.state===hf&&(yield b.player.load(b.config));yp(a,b);b.config.autoplay||(yield b.player.play())}})};
230
+ Hp=function(a,b){return _.w(function*(){a.h.info(`Stop current playback (index: ${b.index})`);b.player.pause();wp(a,b.player,!1);yield Fp(a,b);b.player=null;b.videoEl=null;b.role=Gp})};Jp=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Ip(a,b)))};Kp=function(a){return _.w(function*(){yield a.w.destroy();const b=document.getElementById(a.o.anchorId);b&&(b.classList.remove(fd),b.innerHTML="")})};
231
+ Ip=function(a,b){return _.w(function*(){const c=a.l.get(b);c&&(a.h.info(`Stop preloading item (index: ${b})`),c.player&&(yield Fp(a,c)),a.l.delete(b))})};Fp=function(a,b){return _.w(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.w.release(b.player))})};yp=function(a,b){if(a.o.autoplayNext){const c=()=>{a.h.info("Automatically transition to next item");a.Bf()};b.player.on(_.Ud,c);const d=b.player;b.disposers.push(()=>{d.off(_.Ud,c)})}};
232
+ Cp=function(a,b){return _.w(function*(){const c=yield a.w.get(),d=a.g[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Gp;d.state=kf;a.trigger(new _.C(bg));try{a.l.set(b,d),a.o.preloadMedia?(d.config.autoplay&&(a.h.warn(la+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.load(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=jf,a.trigger(new _.C(bg))}catch(e){7001===e.code?(a.h.info(`Preload aborted (index: ${b})`),d.state=gf):
233
+ (a.h.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.C(_.Vd,{detail:e})),d.state=hf),a.trigger(new _.C(bg))}})};Ap=function(a){return _.w(function*(){const b=a.a+1;a.h.info(`Preload following item (index: ${b})`);yield Cp(a,b)})};Bp=function(a){return _.w(function*(){const b=a.a-1;a.h.info(`Preload preceding item (index: ${b})`);yield Cp(a,b)})};
234
+ _.Mp=function(a){if(Lp.has(a))return Lp.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);Lp.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),Lp.set(a,b),b):!1};Np=function(a,b){b=b.replace(/mp2t/i,"mp4");a===_.p&&(b=b.replace(_.t,_.p));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){let d="avc1.";var c=a[1];d="66"===c?d+"4200":"77"===c?d+"4d00":d+"6400";c=Number(a[2]);d+=(c>>4).toString(16);d+=(c&15).toString(16);b=b.replace(a[0],d)}return b};
235
+ Op=function(a,b,c){a.classList.add(fd);return Array.from({length:b}).map(()=>{const d=document.createElement(_.t);d.classList.add(hd);const e=document.createElement(_.Gd);e.classList.add(gd);e.appendChild(d);a.appendChild(e);return new P(d,c)})};
236
+ Pp=function(a,b,c){if(!a.A){var d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.h.info(`Show video element .${b}`),d.classList.add(jd),d.classList.remove("clpp-hide")):(a.h.info(`Hide video element .${b}`),d.classList.remove(jd),d.classList.add("clpp-hide")),a.w&&a.w(d,c))}};Qp=function(a){return _.w(function*(){const b=a.a;b&&("loaded"!==b.state&&(yield b.bd),yield b.player.play(),b.state=_.bf,b.jc&&b.jc())})};Rp=function(a,b){a.A=b;const c=a.a&&a.a.player;c&&Pp(a,c,!b)};
237
+ Tp=function(a,b){return _.w(function*(){if(b.player){if(b.state===kf){a.h.info(Ub);try{yield b.preloadPromise}catch(c){}}a.a=b;b.role=Sp;Pp(a,b.player,!0);b.state="loading";b.state===jf?yield b.player.play():b.state===hf&&(yield b.player.load(b.config));b.config.autoplay||(yield b.player.play());b.state=_.bf}})};Vp=function(a,b){return _.w(function*(){yield Up(a,b);b.config.autoplay||(yield b.player.play());b.state=_.bf})};
238
+ Wp=function(a,b){const c=b.transition;if(c){if(c.ic){const d=c.ic,e=()=>{a.h.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.on(_.Ud,e);b.disposers.push(()=>{b.player.off(_.Ud,e)})}if(c.uf){const d=e=>{const f=c.uf.find(g=>g.cueId===e.detail.id);f&&(a.h.info(`Transition onCue to (ID: ${f.itemId})`),a.play(f.itemId))};b.player.on(_.rh,d);b.disposers.push(()=>{b.player.off(_.rh,d)})}if(c.zf){const d=c.zf,e=()=>{b.player.getPosition()>=d.position&&(a.h.info(`Transition onPosition to (ID: ${d.itemId})`),
239
+ a.play(d.itemId))};b.player.on(_.Sf,e);b.disposers.push(()=>{b.player.off(_.Sf,e)})}}};Yp=function(a,b){return _.w(function*(){a.h.info(`Stop current playback (ID: ${b.id})`);b.disposers.forEach(d=>d());b.disposers=[];const c=b.player;b.player=null;b.videoEl=null;b.role=Xp;c.pause();yield a.l.release(c);Pp(a,c,!1)})};$p=function(a){return Promise.all(Array.from(a.f.keys()).map(b=>Zp(a,b)))};
240
+ bq=function(a,b){_.w(function*(){if(0!==b.length){a.h.info(`Preload items (IDs: ${b})`);var c=a.j.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>aq(a,d)))}})};Up=function(a,b){return _.w(function*(){const c=yield a.l.get();a.a=b;b.role=Sp;a.a.player=c;a.a.videoEl=c.getSurface().getMedia();Pp(a,c,!0);b.primary&&a.trigger(new _.C(lf,{detail:{player:c}}));b.state="loading";b.bd=yield c.load(b.config);b.state="loaded"})};
241
+ cq=function(a){return _.w(function*(){yield a.l.destroy();const b=a.o.anchorEl;b&&(b.classList.remove(fd),b.innerHTML="")})};dq=function(a){a.a&&(a.a.disposers.forEach(b=>b()),a.a.disposers=[],Wp(a,a.a),$p(a),bq(a,a.a.next))};Zp=function(a,b){return _.w(function*(){const c=a.f.get(b);c&&(a.h.info(`Stop preloading item (ID: ${b})`),c.player&&(yield a.l.release(c.player)),a.f.delete(b))})};
242
+ aq=function(a,b){return _.w(function*(){const c=b.id,d=yield a.l.get();b.player=d;b.videoEl=d.getSurface().getMedia();b.role=Xp;b.state=kf;a.trigger(new _.C(bg));try{a.f.set(c,b),b.config.autoplay&&(a.h.warn(la+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1),b.primary&&a.trigger(new _.C(lf,{detail:{player:d}})),b.preloadPromise=d.load(b.config),yield b.preloadPromise,b.state=jf,a.trigger(new _.C(bg))}catch(e){7001===e.code?(a.h.info(`Preload aborted (ID: ${c})`),b.state=gf):(a.h.warn(`Preload failed (ID: ${c})`,
243
+ e),a.trigger(new _.C(_.Vd,{detail:e})),b.state=hf),a.trigger(new _.C(bg))}})};eq=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Lf&&typeof b.DURATION===_.r):!1};fq=function(a){a.g.forEach(b=>b());a.g=[]};
244
+ kq=function(a,b){const c=()=>_.w(function*(){var e=b.getPosition();if(e=gq(a,e))a.h.info(`Interstitial ${e.cueId} coming up `+`at ${e.startTime} s`),(yield hq(a,e))&&iq(a,e,b)});b.addEventListener(_.Sf,c);a.g.push(()=>{b.removeEventListener(_.Sf,c)});const d=()=>{a.trigger(new _.C(jq))};b.on(_.Ud,d);a.g.push(()=>{b.off(_.Ud,d)})};
245
+ mq=function(a,b,c){return _.w(function*(){if(b.source){a.a.kd([{id:mf,primary:!0,config:_.Lg(b),next:[]}]);yield a.a.load(mf);var d=a.a.tb();d&&d.td()?(d=Array.from(d.td().cues()),lq(a,d,c)||(Rp(a.a,!1),c||(yield Qp(a.a)))):a.h.error("Failed to get cue timeline after load")}else a.h.error("Config must be of type cl.api.PlayerConfiguration")})};
246
+ lq=function(a,b,c){var d=b.filter(f=>f.schemeIdUri===_.vd&&f.Na);a.h.info("Interstitial cues found",d);if(!nq(a,d))return!1;b=d.find(f=>f.startTime<a.f.prerollMarginSec);const e=d.filter(f=>f.startTime<a.f.resolutionOffsetSec&&!(f.startTime<a.f.prerollMarginSec));d=d.filter(f=>!(f.startTime<a.f.resolutionOffsetSec));b&&oq(a,b,c);0<e.length&&e.forEach(f=>pq(a,f));d.forEach(f=>qq(a,f));a.trigger(new _.C(rq,{detail:a.Oc()}));return!!b};
247
+ nq=function(a,b){const c=b.sort((g,h)=>g.startTime-h.startTime),d=a.f.resolutionOffsetSec,e=[];for(let g=0;g<c.length-1;g++){const h=c[g],k=c[g+1];k&&k.startTime-h.endTime<d&&e.push(`Interstitials ${h.id} and ${k.id} `+`are too close to each other (less than ${d} s).`);k&&k.startTime<=h.endTime&&e.push(`Interstitials ${h.id} and ${k.id} `+"overlap.")}const f=[];b.forEach(g=>{const h=g.Na[_.Zb],k=g.Na[_.$b];g.Na[_.Yb]||h?null!=k&&1>k&&a.h.warn(`Interstitial cue ${g.id} is invalid `+"X-PLAYOUT-LIMIT is less than 1 s.",
248
+ g):f.push(`Interstitial cue ${g.id} is invalid `+"it contains neither X-ASSET-LIST nor X-ASSET-URI.")});0<f.length?a.h.error("Invalid interstitials, all interstitials will "+`be skipped. ${f.join(" ")}`):0<e.length&&a.h.warn("Unsupported format of interstitials, playback may not "+`behave correctly. ${e.join(" ")}`);return 0===f.length};
249
+ oq=function(a,b,c){_.w(function*(){const d=qq(a,b),e=yield hq(a,d),f=d.ya?d.ya.length:0;e&&0<f?sq(a,d,c):(e?a.h.warn("Preroll interstitial has no assets, skipping"):a.h.error("Preroll interstitial failed, skipping"),Rp(a.a,!1),c||(yield Qp(a.a)))})};
250
+ pq=function(a,b){return _.w(function*(){const c=qq(a,b);a.h.info(`Interstitial ${c.cueId} coming up `+`at ${c.startTime} s`);if(yield hq(a,c)){const e=a.a.getCurrentItem();if(!e)a.h.error("Cannot schedule interstitial "+`${c.cueId}, no primary content not found in `+"playlist");else if(e.player){var d=e.player;e.state===_.bf?iq(a,c,d):e.jc=()=>{iq(a,c,d)}}}})};
251
+ qq=function(a,b){{const c=b.Na[_.ac];b={cueId:b.id,startTime:b.startTime,endTime:b.endTime,state:tq,Oe:b.Na[_.Yb],Pe:b.Na[_.Zb],ya:null,resumePosition:null==c?b.endTime:b.startTime+c,playoutLimit:b.Na[_.$b]}}a.j.push(b);return b};
252
+ hq=function(a,b){return _.w(function*(){b.state=uq;const c={id:b.cueId,startTime:b.startTime,endTime:b.endTime,resumePosition:b.resumePosition,itemCount:-1,playoutLimit:b.playoutLimit};a.trigger(new _.C(vq,{detail:c}));if(b.Oe)try{a.h.info(`Load X-ASSET-LIST for ${b.cueId}`),a.trigger(new _.C(wq,{detail:c})),b.ya=yield xq(a,b.Oe),b.state=yq,c.itemCount=b.ya.length}catch(d){a.h.error("Failed to load X-ASSET-LIST",d),b.state=zq}finally{a.trigger(new _.C(Aq,{detail:c}))}else b.Pe?(b.ya=[{URI:b.Pe,DURATION:b.endTime-
253
+ b.startTime}],b.state=yq):b.state=zq;return b.state===yq})};sq=function(a,b,c){_.w(function*(){const d=a.a.getCurrentItem();if(d){var e=Bq(a,b,"preroll");a.a.kd(e);Cq(a,d,b,e,!0);dq(a.a);b.state=yq;c?yield a.a.load(e[0].id):yield a.a.play(e[0].id);Rp(a.a,!1)}})};
254
+ iq=function(a,b,c){if(b.ya)if(0===b.ya.length){const g=()=>{c.seek(b.resumePosition)};c.on(_.rh,g);a.g.push(()=>{c.off(_.rh,g)});a.h.info(`Interstitial ${b.cueId} scheduled to `+"be skipped")}else{var d=a.a.getCurrentItem();if(d){var e=Bq(a,b);a.a.kd(e);var f=e[0].id;Cq(a,d,b,e,!1);d.next=[f];d.transition={uf:[{cueId:b.cueId,itemId:f}]};dq(a.a);b.state=yq;a.h.info(`Interstitial ${b.cueId} scheduled for `+`${b.startTime} s`);a.trigger(new _.C(Dq,{detail:{id:b.cueId,startTime:b.startTime,endTime:b.endTime,
255
+ resumePosition:b.resumePosition,itemCount:e.length,playoutLimit:b.playoutLimit}}))}}};gq=function(a,b){return a.j.find(c=>{const d=c.startTime-b;return c.state===tq&&0<d&&d<=a.f.resolutionOffsetSec})||null};xq=function(a,b){return _.w(function*(){var c=a.a.tb();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.Ni(b);c=yield Wi(c,d);if(!eq(c))throw new _.Gh("Invalid X-ASSET-LIST list response");return Promise.resolve(c.ASSETS)})};
256
+ Bq=function(a,b,c){c=void 0===c?"":c;let d=0,e=b.ya.map((f,g)=>{const h=`${b.cueId}-${g}`;g=g===b.ya.length-1?mf:`${b.cueId}-${g+1}`;d+=f.DURATION;f={id:h,config:{source:{url:f.URI,type:_.Ik}},next:[g],transition:{ic:g},duration:f.DURATION,Ze:d,Nh:b.cueId};return a.f.interstitialAssetConverter?a.f.interstitialAssetConverter(f):f});e.forEach((f,g)=>{f.jc=()=>{a.h.info(`Playing interstitial asset ${f.id}`,f);a.trigger(new _.C(Eq,{detail:{id:f.id,podId:b.cueId,uri:f.config.source.url,duration:f.duration,
257
+ podOrder:g+1,podCount:b.ya.length}}))}});if(null!=b.playoutLimit){const f=b.playoutLimit;a.h.info(`Playout limit for ${b.cueId} is `+`${f} s`);e=e.filter(k=>k.Ze-k.duration<=f);const g=e[e.length-1],h=Math.abs(g.Ze-f);1>h?g.transition.ic=mf:(g.transition.ic=void 0,g.transition.zf={position:g.duration-h,itemId:mf});g.next=[mf]}e[0].jc=()=>{a.h.info(`Playing interstitial ${c} ${b.cueId} with `+`${b.ya.length} assets and will resume primary `+`content at ${b.resumePosition} s.`,e);a.h.info(`Playing interstitial asset ${e[0].id}`,
258
+ e[0]);a.trigger(new _.C(Fq,{detail:{id:b.cueId,startTime:b.startTime,endTime:b.endTime,resumePosition:b.resumePosition,itemCount:e.length,playoutLimit:b.playoutLimit}}));a.trigger(new _.C(Eq,{detail:{id:e[0].id,podId:b.cueId,uri:b.ya[0].URI,duration:b.ya[0].DURATION,podOrder:1,podCount:b.ya.length}}))};return e};
259
+ Cq=function(a,b,c,d,e){b.jc=()=>{a.h.info("Resuming primary content at "+`${b.config.startTime} s.`);a.trigger(new _.C(Gq,{detail:{id:c.cueId}}));c.state=Hq;a.a.removeItems(d.map(f=>f.id));b.next=[];e&&a.trigger(new _.C(Iq))};b.config.startTime=c.resumePosition};Jq=function(a,b){a.size=void 0===b?0:1;a.h.debug("Setting key status to",b);a.a=b};
260
+ Kq=function(a,b){a.f=b;_.kh(a.a);if(!b)return Promise.resolve();a.a.on(b,Sd,c=>{_.dh("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.h.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,wg,c=>{{a.h.debug("Handle webkitNeedKey event");c=_.I(c.initData);if(_.gi(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=li(c.subarray(4),
261
+ !0);c=_.ni(c);const d=new Event(Sd);d.initDataType="skd";d.initData=hi(c);a.f.dispatchEvent(d)}});Fn(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.g));return Promise.resolve()};Lq=function(a,b){Jq(a.keyStatuses,b);b=new _.C(ie);a.dispatchEvent(b)};
262
+ Oq=function(a,b){a.a=b;_.kh(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(Sd);d.initDataType=_.Zc;d.initData=hi(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=Mq(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.C(_.ve,{messageType:d?le:ke,message:c.message});d=e;_.dh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.eh("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{(c=Mq(a,
263
+ c.sessionId))&&c.ready()}),a.f.on(b,a.g+"keyerror",c=>{var d=Mq(a,c.sessionId);if(d){{var e=Error("EME v0.1b key error");const f=c.errorCode;f.systemCode=c.systemCode;e.errorCode=f;!c.sessionId&&d.f?(45===c.systemCode&&(e.message="Unsupported session type."),d.f.reject(e),d.f=null):c.sessionId&&d.a?(d.a.reject(e),d.a=null):(e=c.systemCode,c.errorCode.code===MediaKeyError.MEDIA_KEYERR_OUTPUT?Nq(d,_.Me):1===e?Nq(d,"expired"):Nq(d,_.de))}}}))};
264
+ Mq=function(a,b){let c=a.l.get(b);return c?c:(c=a.j.shift())?(c.sessionId=b,a.l.set(b,c),c):null};Nq=function(a,b){Jq(a.keyStatuses,b);b=new _.C(ie);a.dispatchEvent(b)};Pq=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
265
+ Qq=function(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;let d;try{if(a.l===_.Pe)if(c)d=_.I(_.ni("LOAD_SESSION|"+c));else{const f=_.ni("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.I(b),f.byteLength);d=g}else d=_.I(b)}catch(f){return Promise.reject(f)}a.f=new _.Ym;const e=Pq(a,"generateKeyRequest");try{a.j[e](a.g,d)}catch(f){if(f.name!==ab)return a.f=null,Promise.reject(f);(new _.Nj(()=>{try{a.j[e](a.g,d)}catch(g){a.f.reject(g),
266
+ a.f=null}})).da(.01)}return a.f};Rq=function(a,b,c){if(a.a)a.a.then(()=>Rq(a,b,c)).catch(()=>Rq(a,b,c));else{a.a=b;if(a.g===sg){var d=_.ji(c);var e=JSON.parse(d);"oct"!==e.keys[0].kty&&(a.a.reject(Error("Response is not a valid JSON Web Key Set.")),a.a=null);d=_.zi(e.keys[0].k);e=_.zi(e.keys[0].kid)}else d=_.I(c),e=null;var f=Pq(a,"addKey");try{a.j[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
267
+ Sq=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.Yd?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};Tq=function(a){a=a.target;if(a.webkitPresentationMode===Qe){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement===a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)};
268
+ Uq=function(){return this.webkitSupportsPresentationMode(Qe)?(this.webkitSetPresentationMode(Qe),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};Vq=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
269
+ Wq=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};Xq=function(a,b,c){return new window.TextTrackCue(a,b,c)};Yq=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};$q=function(a,b,c){if("input"===a)switch(this.type){case "range":a=bd}Zq.call(this,a,b,c)};ar=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
270
+ br=function(a){return ar()-a.a};dr=function(a){const b=new cr;b.a=a.a;return b};_.er=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.gr=function(a,b,c,d){return _.w(function*(){try{return new (yield fr(a,b,c,d))}catch(e){throw e.a(_.E),e;}})};
271
+ fr=function(a,b,c,d){return _.w(function*(){if(d){var e=_.hr[d.toLowerCase()];if(e)return e;_.B("Could not determine manifest type using MIME type ",d)}if(e=_.ir(a)){const f=_.jr[e];if(f)return f;_.B("Could not determine manifest type for extension ",e)}else _.B("Could not find extension for ",a);if(!d&&(d=yield kr(a,b,c))){if(e=_.hr[d])return e;_.B("Could not determine manifest type using MIME type",d)}throw new _.G(_.E,4,4E3,{url:a});})};
272
+ _.ir=function(a){a=(new _.Jh(a)).wa.split("/").pop().split(".");return 1===a.length?"":a.pop().toLowerCase()};kr=function(a,b,c){return _.w(function*(){var d=_.Ni(a);Li(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).P).headers["content-type"])?d.toLowerCase():""})};nr=function(a,b){var c=a.f+b.byteLength;if(a.a.byteLength<c){let d=a.a.byteLength;for(;d<c;)d*=2;c=new Uint8Array(d);c.set(a.a);a.a=c}a.a.set(b,a.f);a.f+=b.byteLength};
273
+ or=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(nr(a,e),Qi(c,e.byteLength,br(a.g)),a.g.a=ar());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>or(a,b,c))})};
274
+ qr=function(a){const b=a.uris[a.uriIndex],c=new pr,d=new cr,e=dr(d);let f=0,g;const h=new _.Ym;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;let k=!1,l=!1;c.onreadystatechange=function(m){m=m.target;m.readyState>=XMLHttpRequest.LOADING&&0===f&&(g=br(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(sa),Pi(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
275
+ const q={};for(const u of n)n=u.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=br(e);l||Qi(a,m.response?m.response.length:0,u);const v=_.Oi(q,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?Ri(a.rateLimitBps,br(e),a.bytesLoaded).then(()=>{h.resolve(v)}):h.resolve(v)}catch(u){h.reject(u)}};c.onerror=function(m){m=m.target;if(0>=m.status)h.reject(new _.G(1,1,1002,{url:b,request:a,status:m.status}));else{var n=m.getAllResponseHeaders();const u={};if(n){n=n.trim().split("\r\n");
276
+ for(var q of n)n=q.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.Oi(u,m.response,m.status,b,m.responseURL,a,br(e),g);h.resolve(q)}};c.ontimeout=function(){h.reject(new _.G(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=br(d);d.a=ar();if(100<n||m.lengthComputable&&m.loaded===m.total)Qi(a,m.loaded-f,n),f=m.loaded,l=!0};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);c.send(a.body);return{P:h,request:a,abort:()=>{c.abort();h.reject(new _.G(1,1,
277
+ 7001,{url:b,request:a}));return Promise.resolve()}}};rr=function(a){let b=null;a.g!==a.f&&(b={start:a.g,end:a.f,length:a.f-a.g,data:new DataView(a.j.a.buffer,a.g,a.f-a.g),count:-1});return b};sr=function(a,b){{var c=a.j;const d=c.f+b.byteLength;if(d>c.a.byteLength){const e=c.a;c.a=new Uint8Array(Math.max(Math.ceil(c.a.buffer.byteLength*c.g),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.g;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f)};
278
+ ur=function(a){if(0<=a.o&&a.f<a.o)return null;let b=tr(a);for(;null!==b;){if(b.name===_.te){const c={start:a.g,end:b.end,length:b.end-a.g,data:new DataView(a.j.a.buffer,a.g,b.end-a.g),count:1};a.g=b.end;return c}b=tr(a)}return null};
279
+ vr=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,br(a.w)),a.w.a=ar());if(f)return e=rr(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){sr(a,g);var k=ur(a);for(e=[];k;)e.push(k),k=ur(a);if(!a.A)e.forEach(l=>{h=h.then(()=>c(!1,l))});else if(0<e.length){k=e[0];if(1<e.length){k=e[0];const l=e[e.length-1],m=l.end-k.start;k={start:k.start,end:l.end,length:m,data:new DataView(a.j.a.buffer,k.start,m),count:e.length}}(e=
280
+ c(!1,k))&&(h=e)}}return h.then(()=>vr(a,b,c,d))})};
281
+ tr=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=wr(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=wr(a);d=String.fromCharCode(d>>24&255,d>>16&255,d>>8&255,d&255);switch(c){case 0:c=a.f-b;break;case 1:if(a.a+8>=a.f)return a.a=a.f,null;{let e,f;try{f=a.l.getUint32(a.a,!1),e=a.l.getUint32(a.a+4,!1)}catch(g){throw new _.G(_.E,3,3E3);}if(2097151<f)throw new _.G(_.E,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.o=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
282
+ wr=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
283
+ zr=function(a){a.g=a.B.then(e=>{a.j=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=xr(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*xr(e.request.fuzzFactor,.5));a.f*=xr(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;yr(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.G(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
284
+ let b=0,c=0,d=0;return a.g.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.P}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.G){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return zr(a);g&&e.a(_.E);a.w.reject(e)}else a.w.reject(e)})};yr=function(a,b,c){a.o=setTimeout(b,c)};xr=function(a,b){return null===a||void 0===a?b:a};
285
+ Ar=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.Gh("Parsing CMSD, missing parameter or wrong format");if(c&&!b)return{key:c,value:!0};const d=b[0];if('"'===d&&'"'===b[b.length-1])return{key:c,value:b.replaceAll(/(^")|("$)/g,"")};if(/^[-0-9]/.test(d))return{key:c,value:parseInt(b,10)};if(/^[a-zA-Z*]/.test(d))return{key:c,value:b};throw new _.Gh(`Parsing CMSD, not recognized value type of ${a}`);};
286
+ Dr=function(a){return b=>{if(a.a){a:{b=b.headers;for(const [d,e]of Object.entries(b))if("cmsd-dynamic"===d.toLowerCase()){b=e;break a}b=null}if(b){try{const d=new Map,e=b.split(";");for(b=0;b<e.length;b++){const {key:f,value:g}=Ar(e[b]);Object.values(Br).includes(f)&&d.set(f,g)}var c=d}catch(d){Cr.error("CmsdManager parseCmsdDynamicHeader_ failed:",d),c=null}a.f=c}}}};
287
+ Hr=function(a){var b=new Er;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Fr,d={Ic:!1,Jf:!1};b={P:Gr(a.uris[a.uriIndex],a,{body:a.body||void 0,headers:b,method:a.method,signal:c.signal,credentials:a.allowCrossSiteCredentials?"include":void 0},d),request:a,abort:()=>{d.Ic||(d.Ic=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Jf=!0;c.abort()},a);b.P=b.P.finally(()=>{window.clearTimeout(e)})}return b};
288
+ Gr=function(a,b,c,d){return _.w(function*(){let e,f,g;const h=new cr,k=dr(h);try{e=yield Ir(a,c);g=br(h);const m=e.headers.get(sa);Pi(b,m);const n=m?parseInt(m,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const q=e.body.getReader();f=yield vr(new Jr(n,!b.disableMergedFragments),q,(u,v)=>{if(d.Ic)return null;v&&v.data&&(Qi(b,v.data.byteLength,br(h)),h.a=ar());return b.onFragment&&v?b.rateLimitBps?Ri(b.rateLimitBps,br(k),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},
289
+ b.onProgress)}else{const q=e.body.getReader();f=yield or(new Kr(n),q,b);b.rateLimitBps&&(yield Ri(b.rateLimitBps,br(k),f.byteLength))}}catch(m){if(d.Ic)throw new _.G(1,1,7001,{url:a,request:b});if(d.Jf)throw new _.G(1,1,1003,{url:a,request:b});_.eh("Error while fetching data:",m);throw new _.G(1,1,1002,{url:a,error:m,request:b,status:-1},m);}const l={};e.headers.forEach((m,n)=>{l[n.trim()]=m});if(d.Ic)throw new _.G(1,1,7001,{url:a,request:b});return _.Oi(l,f,e.status,a,e.url,b,br(k),g)})};
290
+ Mr=function(a){try{const b=a.uris[a.uriIndex],c=_.Lr(b);return{P:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{P:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
291
+ _.Lr=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.eh("Bad data URI, failed to parse scheme"),new _.G(_.E,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.eh("Bad data URI, failed to extract encoding and MIME type"),new _.G(_.E,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];let d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.zi(a).buffer:_.ni(a).buffer,contentType:c}};
292
+ _.Or=function(a,b){a=_.Ij(a.split(";")[0],Jj(a));_.Nr[a]=b};_.Pr=function(a){a=_.Ij(a.split(";")[0],Jj(a));return _.Nr[a]||null};_.Qr=function(a){a=_.Ij(a.split(";")[0],Jj(a));delete _.Nr[a]};_.Vr=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case Rr:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case Sr:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case Tr:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case Ur:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Ce}};
293
+ Eg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Fg=typeof Object.defineProperties==_.Yd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
294
+ Gg("Promise",function(a){function b(g){this.f=0;this.l=void 0;this.a=[];var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.f=function(g){if(null==this.a){this.a=[];var h=this;this.g(function(){h.l()})}this.a.push(g)};var e=Eg.setTimeout;c.prototype.g=function(g){e(g,0)};c.prototype.l=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
295
+ g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.g(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.C),reject:g(this.g)}};b.prototype.C=function(g){if(g===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.De:var h=null!=g;break a;case _.Yd:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
296
+ b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.g(k);return}typeof h==_.Yd?this.G(h,g):this.o(g)};b.prototype.g=function(g){this.w(2,g)};b.prototype.o=function(g){this.w(1,g)};b.prototype.w=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.l=h;this.A()};b.prototype.A=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.f(this.a[g]);this.a=null}};var f=new c;b.prototype.F=function(g){var h=this.j();
297
+ g.md(h.resolve,h.reject)};b.prototype.G=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,u){return typeof q==_.Yd?function(v){try{l(q(v))}catch(y){m(y)}}:u}var l,m,n=new b(function(q,u){l=q;m=u});this.md(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.md=function(g,h){function k(){switch(l.f){case 1:g(l.l);break;case 2:h(l.l);break;default:throw Error("Unexpected state: "+
298
+ l.f);}}var l=this;null==this.a?f.f(k):this.a.push(k)};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=Dg(g),m=l.next();!m.done;m=l.next())d(m.value).md(h,k)})};b.all=function(g){var h=Dg(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){q[v]=y;u--;0==u&&l(q)}}var q=[],u=0;do q.push(void 0),u++,d(k.value).md(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var Ig=this||self;
299
+ Ig.a=!0;_.x("clpp.utils.obj.cloneItem",_.Lg);_.x("clpp.utils.obj.merge",_.Kg);var $g={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.x("clpp.log.Level",$g);var Yg=3,Xg={},Wr=[];_.x("clpp.log.getLoggers",function(){return _.Lg(Xg)});_.x("clpp.log.addInterceptor",function(a){a&&Wr.push(a)});_.x("clpp.log.removeInterceptor",function(a){a&&(a=Wr.indexOf(a),0<=a&&Wr.splice(a,1))});_.x("clpp.log.getTagLevel",Zg);_.x("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=Xg[a]});_.x("clpp.log.setTagLevel",function(a,b){a&&(_.Rg(b)&&(b=ah(b)),Xg[a]=b)});
300
+ _.x("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.Rg(a)&&(a=ah(a));Yg=a});_.x("clpp.log.getLogLevel",function(){return Yg});
301
+ _.Q=class{constructor(a){(this.tag=a)&&void 0===Xg[a]&&(Xg[a]=-1)}log(a,b){if(window.console){if(1<arguments.length){var c=arguments[0];Array.prototype.shift.call(arguments)}else c=3;var d=Zg(this.tag);if(0<=d){if(d<c)return}else if(Yg<c)return;this.tag&&Array.prototype.unshift.call(arguments,"["+this.tag+"]");d=new Date;d.toISOString&&(d=d.toISOString().substring(11).replace("Z",""),Array.prototype.unshift.call(arguments,d));4===c?console.log.apply(console,arguments):3===c?console.info.apply(console,
302
+ arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Wr)e.call(e,c,arguments)}}info(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)}debug(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)}warn(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)}error(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)}kg(a){return a?
303
+ this.tag?new _.Q(this.tag+"."+a):new _.Q(a):this}};_.x("clpp.log.Logger",_.Q);_.Q.prototype.createChild=_.Q.prototype.kg;_.Q.prototype.error=_.Q.prototype.error;_.Q.prototype.warn=_.Q.prototype.warn;_.Q.prototype.debug=_.Q.prototype.debug;_.Q.prototype.info=_.Q.prototype.info;_.Q.prototype.log=_.Q.prototype.log;var bh=new _.Q("clpp");_.x("clpp.log.info",_.ch);_.x("clpp.log.debug",_.dh);_.x("clpp.log.warn",_.B);_.x("clpp.log.error",_.eh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var gp;gp=class{constructor(a,b){this.Kb=a;this.sourceIndex=b}};_.gh=new _.Q("clpp.players");_.fh={};_.Xr=class{constructor(){this.a={}}push(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]}get(a){return(a=this.a[a])?a.slice():[]}remove(a,b){a=this.a[a];if(!a)return!1;let c=!1;for(let d=0;d<a.length;++d)a[d]===b&&(a.splice(d,1),--d,c=!0);return c}clear(){this.a={}}forEach(a){for(const b in this.a)a(b,this.a[b])}};var Yr,Zr;Yr=class{constructor(a,b,c,d){this.f=a;this.qc=b;this.a=c;this.fh=!!d}Ub(a){try{this.qc.handleEvent?this.qc.handleEvent(a):this.qc.call(this.a,a)}catch(b){_.eh("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
304
+ _.C=class{constructor(a,b){if(b)for(const c in b)this[c]=b[c];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.f=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.f=!0}stopPropagation(){}};
305
+ Zr=class{constructor(a){this.a=new _.Xr;this.f=a}trigger(a){const b=this.a.get(a.type);if(b)for(let c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].Ub(a),b[c].fh&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new Yr(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Yr(a,b,c||this.f,!0));return b}off(a,b){const c=this.a.get(a);let d=!1;if(c)for(let e=0;e<c.length;e++)c[e].qc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var $r;_.as=class{constructor(){this.a=new _.Xr}release(){_.kh(this)}on(a,b,c,d=!1){a=new $r(a,b,c,d);this.a.push(b,a)}one(a,b,c){const d=e=>{this.off(a,b,d);return c(e)};this.on(a,b,d)}off(a,b,c){const d=this.a.get(b)||[];for(let e=0;e<d.length;++e){const f=d[e];f.target!==a||c!==f.a&&c||(jh(f),this.a.remove(b,f))}}};$r=class{constructor(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)}};var bs=class{constructor(a){this.m=a;this.o=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=null;this.f=new _.as;this.a=this.l=null;this.g=[];this.h=new _.Q("clpp.native.Metadata")}release(){this.f.release();this.g=[];this.a=null}destroy(){const a=this;return _.w(function*(){a.release();a.l=null;a.j=null})}getTimelineCues(){return this.g}};_.is=class{constructor(a,b,c,d){d=void 0===d?_.cs:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.ds;this.writingMode=_.es;this.lineInterpretation=_.fs;this.line=null;this.lineAlign=_.gs;this.direction=hs;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}vc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
306
+ a.payloadType}};_.x("clpp.text.Cue",_.is);_.is.positionAlign={LEFT:_.me,RIGHT:_.ne,CENTER:_.$c,AUTO:"auto"};_.cs="text";_.is.payloadType={TEXT:_.cs,VTT_XML:_.pg,TTML_XML:_.Vf};_.ds=_.$c;_.js={LEFT:_.je,RIGHT:_.vf,CENTER:_.ds,START:_.je,END:_.vf};_.is.textAlign=_.js;var hs="ltr";_.is.direction={HORIZONTAL_LEFT_TO_RIGHT:hs,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.es="horizontal-tb";_.is.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.es,VERTICAL_LEFT_TO_RIGHT:_.hg,VERTICAL_RIGHT_TO_LEFT:_.ig};_.fs=0;
307
+ _.is.lineInterpretation={LINE_NUMBER:_.fs,PERCENTAGE:1};_.gs=_.Hf;_.ks={CENTER:_.$c,START:_.gs,END:_.Td};_.is.lineAlign=_.ks;_.ns=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.ls;this.scroll=ms;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.x("clpp.text.CueRegion",_.ns);_.ls=1;_.ns.units={PX:0,PERCENTAGE:_.ls,LINES:2};var ms="";
308
+ _.ns.scrollMode={NONE:ms,UP:"up"};_.ns.displayAlign={BEFORE:"flex-end",CENTER:_.$c,AFTER:"flex-start"};_.ns.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.sd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var os=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.g=null;this.a=new _.as;this.j=!1;this.h=new _.Q("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.g=this.f=null;return Promise.resolve()}start(a){this.j?this.h.warn("Already started. Ignoring request..."):(this.j=!0,this.g=a,this.f=this.g.textTracks,this.a.on(this.f,_.sc,b=>Ch(this,b)),this.a.on(this.f,bd,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Cf&&(d.mode=
309
+ _.$d)}}}))}o(a){const b=new _.is(a.startTime,a.endTime,a.text,_.pg);if(_.Rg(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.hg;break;case "rl":b.writingMode=_.ig}_.Sg(a.size)&&(b.size=a.size);if(_.Rg(a.align))switch(a.align){case _.je:case _.Hf:b.textAlign=_.je;break;case _.$c:b.textAlign=_.ds;break;case _.vf:case _.Td:b.textAlign=_.vf}_.Sg(a.position)&&(b.position=a.position);if(_.Rg(a.positionAlign))switch(a.positionAlign){case _.me:b.positionAlign=_.me;break;case _.$c:b.positionAlign=
310
+ _.$c;break;case _.ne:b.positionAlign=_.ne}_.Sg(a.line)&&(b.line=a.line);if(_.Rg(a.lineAlign))switch(a.lineAlign){case _.Hf:b.lineAlign=_.gs;break;case _.$c:b.lineAlign=_.$c;break;case _.Td:b.lineAlign=_.Td}typeof a.snapToLines===_.Rc&&(b.lineInterpretation=a.snapToLines?_.fs:1);return b}};_.G=class extends Error{constructor(a,b,c,d,e){super(Dh(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.Rg(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.G)}a(a){this.severity!==a&&(this.severity=a,this.message=Dh(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.x("clpp.Error",_.G);_.E=2;_.G.Severity={RECOVERABLE:1,FATAL:_.E};
311
+ _.G.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
312
+ _.G.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,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,FETCH_OR_APPEND_ERROR:2010,INVALID_MP4:2011,
302
313
  TEXT_PARSER_MISSING:2012,THUMBNAILS_FAILED_TO_LOAD:2013,THUMBNAIL_ERROR:2014,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,
303
314
  MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,MP4_PARSER_ERROR:3019,MEDIA_LOAD_ERROR:3100,INVALID_TRACK_TYPE:3101,UNKNOWN_TRACK:3102,MEDIA_DECRYPTION_ERROR:3103,PLAY_NOT_ALLOWED:3200,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,
304
315
  DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,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_COULD_NOT_GUESS_MIME_TYPE:4021,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,
305
316
  DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,SMOOTH_INVALID_MANIFEST_XML:4033,SMOOTH_EMPTY_PRESENTATION:4034,SMOOTH_MEDIA_PROCESSING_ERROR:4035,SMOOTH_INVALID_VERSION:4036,SMOOTH_INVALID_FRAGMENT_METADATA:4037,SMOOTH_REQUIRED_ATTRIBUTE_MISSING:4038,SMOOTH_TRUNCATED_MEDIA_FILE:4039,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4040,HLS_MSE_ENCRYPTED_TS_NOT_SUPPORTED:4041,HLS_PLAYLIST_NOT_UTF8:4042,HLS_PLAYLIST_EMPTY:4043,HLS_INVALID_VALUE:4044,
306
317
  HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEATURE:4046,HLS_INCOMPATIBLE_PLAYLIST_UPDATE:4047,INVALID_STREAMS_CHOSEN:5005,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,
307
- EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,NO_CONTENT_ID:6101,SERVER_CERTIFICATE_REQUIRED:6102,EXTRACT_CONTENT_ID_MODIFIER_ERROR:6103,FAILED_TO_PERSIST_SESSION:6200,FAILED_TO_REMOVE_SESSION:6201,INVALID_SESSION_STORAGE_IMPLEMENTATION:6202,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CANNOT_LOAD_SOURCE:7003,MEDIA_ELEMENT_NOT_FOUND:7004,INVALID_MEDIA_ELEMENT:7005,INVALID_CONTAINER_ELEMENT:7006,INVALID_CONFIGURATION:7100,
308
- INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,KEY_LOAD_ERROR:7104,TIZEN_INTERNAL_ERROR:7200,CAF_INTERNAL_ERROR:7300,INTERNAL_CAST_ERROR:8E3,CAST_API_NOT_READY:8001,NO_RECEIVERS_AVAILABLE:8002,ALREADY_CASTING:8003,NO_CAST_SESSION:8004,CONVIVA_SDK_NOT_LOADED:9E3,CONVIVA_INVALID_CONFIGURATION:9001,CONVIVA_RUNTIME_ERROR:9002,GL_CONTEXT_ERROR:9003,GL_SHADER_ERROR:9004,YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,YOUBORA_SDK_VERSION_NOT_SUPPORTED:9102,VIMOND_INVALID_CONFIGURATION:9200,
309
- VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,SIMID_CONTAINER_MISSING:10100,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3};var ph=class extends Error{constructor(a,b){super(a);this.code=b}};var xh=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;lg=_.sh.prototype;lg.Ya="";lg.mc="";lg.Ja="";lg.Ec=null;lg.ya="";lg.ac="";lg.toString=function(){var a=[],b=this.Ya;b&&a.push(Ah(b,xr,!0),":");if(b=this.Ja){a.push("//");var c=this.mc;c&&a.push(Ah(c,xr,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ec;null!=b&&a.push(":",String(b))}if(b=this.ya)this.Ja&&"/"!=b.charAt(0)&&a.push("/"),a.push(Ah(b,"/"==b.charAt(0)?yr:zr,!0));(b=this.a.toString())&&a.push("?",b);(b=this.ac)&&a.push("#",Ah(b,Ar));return a.join("")};
310
- lg.resolve=function(a){var b=new _.sh(this);"data"===b.Ya&&(b=new _.sh);var c=!!a.Ya;c?th(b,a.Ya):c=!!a.mc;c?b.mc=a.mc:c=!!a.Ja;c?b.Ja=a.Ja:c=null!=a.Ec;var d=a.ya;if(c)uh(b,a.Ec);else if(c=!!a.ya){if("/"!=d.charAt(0))if(this.Ja&&!this.ya)d="/"+d;else{var e=b.ya.lastIndexOf("/");-1!=e&&(d=b.ya.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):
311
- ".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.ya=d:c=""!==a.a.toString();c?_.vh(b,wh(a.a)):c=!!a.ac;c&&(b.ac=a.ac);return b};var xr=/[#\/\?@]/g,zr=/[#\?:]/g,yr=/[#\?]/g,Bh=/[#\?@]/g,Ar=/#/g;_.zh.prototype.a=null;_.zh.prototype.h=null;
312
- _.zh.prototype.add=function(a,b){if(!this.a&&(this.a={},this.h=0,this.f))for(var c=this.f.split("\x26"),d=0;d<c.length;d++){var e=c[d].indexOf("\x3d"),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.f=null;(c=this.a.hasOwnProperty(a)&&this.a[a])||(this.a[a]=c=[]);c.push(b);null!==this.h&&this.h++;return this};
313
- _.zh.prototype.toString=function(){if(this.f)return this.f;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="\x3d"+encodeURIComponent(d[e]));a.push(f)}return this.f=a.join("\x26")};_.Br=1/15;var Cr;Cr={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.bj=(a,b)=>{const c=Cr[a];for(let d=0;d<c.length;d++)for(let e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return a===_.u?"":null};_.Dr={text:{mp4:tc,m4s:tc,m4i:tc,cmft:tc,vtt:_.Af,ttml:_.xc},video:{mp4:_.Rf,m4s:_.Rf,m4i:_.Rf,m4v:_.Rf,cmfv:_.Rf,ts:_.Pf},audio:{mp4:_.Gc,m4s:_.Gc,m4i:_.Gc,m4a:_.Gc,cmfa:_.Gc,ts:_.Pf,aac:_.Dc,ec3:_.Fc,ac3:_.Ec},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.ej=(a,b,c)=>a.map(d=>{d=_.Er(d)||"";return d=(d=_.Dr[b][d])?d:b===_.u?c&&"vtt"!==c?tc:_.Af:null}).filter(Boolean)[0]||null;
314
- _.Er=a=>{a=(new _.sh(a)).ya.split(".");return 1>=a.length?null:a.pop()};_.oi=class{constructor(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}toString(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}let b="#"+this.name;const c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b}getAttribute(a){const b=this.attributes.filter(c=>c.name==a);return b.length?b[0]:null}};_.ni=class{constructor(a,b){this.name=a;this.value=b}};var Dh=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",
315
- "cs"],["dan","da"],["deu","de"],[_.zd,"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",
318
+ EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,NO_CONTENT_ID:6101,SERVER_CERTIFICATE_REQUIRED:6102,EXTRACT_CONTENT_ID_MODIFIER_ERROR:6103,FAILED_TO_PERSIST_SESSION:6200,FAILED_TO_REMOVE_SESSION:6201,INVALID_SESSION_STORAGE_IMPLEMENTATION:6202,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CANNOT_LOAD_SOURCE:7003,MEDIA_ELEMENT_NOT_FOUND:7004,INVALID_MEDIA_ELEMENT:7005,INVALID_CONTAINER_ELEMENT:7006,INVALID_ARGUMENT:7007,
319
+ WRONG_ORDER_OF_OPERATIONS:7008,NOT_SUPPORTED:7009,INVALID_CONFIGURATION:7100,INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,KEY_LOAD_ERROR:7104,TIZEN_INTERNAL_ERROR:7200,CAF_INTERNAL_ERROR:7300,INTERNAL_CAST_ERROR:8E3,CAST_API_NOT_READY:8001,NO_RECEIVERS_AVAILABLE:8002,ALREADY_CASTING:8003,NO_CAST_SESSION:8004,CONVIVA_SDK_NOT_LOADED:9E3,CONVIVA_INVALID_CONFIGURATION:9001,CONVIVA_RUNTIME_ERROR:9002,GL_CONTEXT_ERROR:9003,GL_SHADER_ERROR:9004,YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,
320
+ YOUBORA_SDK_VERSION_NOT_SUPPORTED:9102,VIMOND_INVALID_CONFIGURATION:9200,VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,SIMID_CONTAINER_MISSING:10100,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3};
321
+ _.Gh=class extends Error{constructor(a,b){super(a);this.code=b}};var Oh=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;Bg=_.Jh.prototype;Bg.Xa="";Bg.nc="";Bg.Ha="";Bg.Dc=null;Bg.wa="";Bg.ac="";Bg.toString=function(){var a=[],b=this.Xa;b&&a.push(Rh(b,ps,!0),":");if(b=this.Ha){a.push("//");var c=this.nc;c&&a.push(Rh(c,ps,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Dc;null!=b&&a.push(":",String(b))}if(b=this.wa)this.Ha&&"/"!=b.charAt(0)&&a.push("/"),a.push(Rh(b,"/"==b.charAt(0)?qs:rs,!0));(b=this.a.toString())&&a.push("?",b);(b=this.ac)&&a.push("#",Rh(b,ss));return a.join("")};
322
+ Bg.resolve=function(a){var b=new _.Jh(this);"data"===b.Xa&&(b=new _.Jh);var c=!!a.Xa;c?Kh(b,a.Xa):c=!!a.nc;c?b.nc=a.nc:c=!!a.Ha;c?b.Ha=a.Ha:c=null!=a.Dc;var d=a.wa;if(c)Lh(b,a.Dc);else if(c=!!a.wa){if("/"!=d.charAt(0))if(this.Ha&&!this.wa)d="/"+d;else{var e=b.wa.lastIndexOf("/");-1!=e&&(d=b.wa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):
323
+ ".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.wa=d:c=""!==a.a.toString();c?_.Mh(b,Nh(a.a)):c=!!a.ac;c&&(b.ac=a.ac);return b};var ps=/[#\/\?@]/g,rs=/[#\?:]/g,qs=/[#\?]/g,Sh=/[#\?@]/g,ss=/#/g;_.Qh.prototype.a=null;_.Qh.prototype.g=null;
324
+ _.Qh.prototype.add=function(a,b){if(!this.a&&(this.a={},this.g=0,this.f))for(var c=this.f.split("\x26"),d=0;d<c.length;d++){var e=c[d].indexOf("\x3d"),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.f=null;(c=this.a.hasOwnProperty(a)&&this.a[a])||(this.a[a]=c=[]);c.push(b);null!==this.g&&this.g++;return this};
325
+ _.Qh.prototype.toString=function(){if(this.f)return this.f;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="\x3d"+encodeURIComponent(d[e]));a.push(f)}return this.f=a.join("\x26")};var Uh;_.F="text";_.ts=1/15;Uh={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]};Uh[_.F]=[/^vtt$/,/^wvtt/,/^stpp/];var us;us={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.uj=(a,b)=>{const c=us[a];for(let d=0;d<c.length;d++)for(let e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return a===_.F?"":null};_.vs={text:{mp4:zc,m4s:zc,m4i:zc,cmft:zc,vtt:_.Qf,ttml:_.Cc},video:{mp4:_.kg,m4s:_.kg,m4i:_.kg,m4v:_.kg,cmfv:_.kg,ts:_.jg},audio:{mp4:_.Mc,m4s:_.Mc,m4i:_.Mc,m4a:_.Mc,cmfa:_.Mc,ts:_.jg,aac:_.Gc,ec3:_.Lc,ac3:_.Hc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.xj=(a,b,c)=>a.map(d=>{d=_.ws(d)||"";return d=(d=_.vs[b][d])?d:b===_.F?c&&"vtt"!==c?zc:_.Qf:null}).filter(Boolean)[0]||null;
326
+ _.ws=a=>{a=(new _.Jh(a)).wa.split(".");return 1>=a.length?null:a.pop()};_.Hi=class{constructor(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}toString(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}let b="#"+this.name;const c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b}getAttribute(a){const b=this.attributes.filter(c=>c.name===a);return b.length?b[0]:null}};_.Gi=class{constructor(a,b){this.name=a;this.value=b}};var Wh=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",
327
+ "cs"],["dan","da"],["deu","de"],[_.Gd,"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",
316
328
  "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",
317
329
  "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",
318
330
  "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",
319
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var Fr=class{};_.z("clpp.utils.BufferUtils",Fr);Fr.toArrayBuffer=Ph;Fr.toDataView=_.Oh;Fr.toInt32Array=_.Nh;Fr.toUint32Array=Mh;Fr.toUint16Array=Lh;Fr.toUint8Array=_.J;Fr.equal=Jh;var Sh=new _.R("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.Rh);_.z("clpp.utils.strings.fromBytesAutoDetect",_.Uh);_.z("clpp.utils.strings.toUtf8",_.Vh);_.z("clpp.utils.strings.toUtf16",_.Wh);_.z("clpp.utils.strings.toByteArray",_.Xh);_.z("clpp.utils.strings.startsWith",_.Yh);_.z("clpp.utils.strings.endsWith",_.Zh);_.z("clpp.utils.strings.bitrateToString",_.bi);
320
- _.z("clpp.utils.strings.durationToString",function(a,b="%h:%mm:%ss"){if(null===a||void 0===a)a=0;if(null===b||void 0===b)b="%h:%mm:%ss";const c=Math.floor(a/3600),d=Math.floor((a-3600*c)/60);a=Math.floor(a-3600*c-60*d);const e=(g,h)=>g.length<h?e("0"+g,h):g,f=g=>(h,k)=>e(g,k.length-1);return b.replace(/(%h+)/,f(String(c))).replace(/(%m+)/,f(String(d))).replace(/(%s+)/,f(String(a)))});
321
- _.z("clpp.utils.strings.hashCode",function(a){let b=0;if(0===a.length)return b;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b});var ci=document.createElement("span");var Gr=class{};_.z("clpp.utils.Uint8ArrayUtils",Gr);Gr.toStandardBase64=_.ei;Gr.concat=_.ki;Gr.equal=_.ji;Gr.toHex=_.ii;Gr.fromHex=_.hi;Gr.fromBase64=_.gi;Gr.toBase64Url=_.fi;_.Hr=new _.R("clpp.hls.Utils");_.mi=class{constructor(a){this.f=a;this.a=0}};_.Ir=new Set([_.Ba,_.Ca,"EXT-X-I-FRAMES-ONLY",_.Fa,_.Ga,_.Ha,_.La,_.Ma]);_.Jr=new Set(["EXTINF",_.ya,_.Aa,_.Da,_.Ea,_.Ja]);_.Kr=new Set(["EXT-X-PART",_.Ia]);_.Lr=new Set([_.za]);var qi=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",qi);_.z("clpp.net.makeRequest",_.ui);_.ti=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.ti});_.wm=class{constructor(){let a,b;const c=new Promise((d,e)=>{a=d;b=e});c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.Dn=class{constructor(a,b){this.P=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}hd(a,b){const c=new _.wm;let d=()=>{c.reject(new _.H(_.G,7,7001));return this.abort()};this.P.then(e=>{this.a?c.reject(new _.H(_.G,7,7001)):a?d=zi(a,e,c):c.resolve(e)},e=>{b?d=zi(b,e,c):c.reject(e)});return new _.Dn(c,()=>d())}};_.Dn.aborted=function(){const a=Promise.reject(new _.H(_.G,7,7001));a.catch(()=>{});return new _.Dn(a,()=>Promise.resolve())};_.Dn.prototype.chain=_.Dn.prototype.hd;_.Mr=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.P.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.po=class{constructor(){this.f=[];this.h=[];this.o=!1;this.l=new _.Mr;this.a={};this.j=0;this.a.data=Wq;!window.fetch||!window.AbortController||_.qj(6)||_.tj()&&68<_.Oj().browserVersion.major?(this.a.http=yq,this.a.https=yq):(this.a.http=Pq,this.a.https=Pq)}Yg(a){0<a?_.C("Rate limit set to "+a+"bps"):_.C("Rate limit disabled");this.j=a}release(){return this.l.destroy()}destroy(){this.o=!0;this.f=[];this.h=[];return this.l.destroy()}De(a){this.f.push(a)}Hc(a){this.h.push(a)}rf(a){this.f=this.f.filter(b=>
322
- b!==a)}Cd(a){this.h=this.h.filter(b=>b!==a)}fetch(a){if(this.o)return new Nr(Promise.reject(new _.H(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.j&&0<this.j&&(a.rateLimitBps=this.j);var b=[];for(const f of this.f)b.push(f);if(a.requestModifiers)for(const f of a.requestModifiers)b.push(f);a.requestModifiers=b;b=[];for(var c of this.h)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.wm;try{for(const f of a.requestModifiers)d=d.then(g=>
323
- {if(e.a)throw new _.H(_.G,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.G,1,1006,null,g);});d=d.then(f=>{var g=new _.sh(f.uris[f.uriIndex]);var h=g.Ya;h||(h=location.protocol,h=h.slice(0,-1),th(g,h),f.uris[f.uriIndex]=g.toString());h=this.a[h];if(!h)throw new _.H(_.G,1,1E3,{url:g.toString()});g=h;return{request:f,plugin:g}});e=new Nr(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.G,1,7001,
324
- g?{url:g.request.uris[g.request.uriIndex],request:g.request}:null);};h();const k=f(g)||g;h();return k}).catch(g=>{if(g instanceof _.H&&g.data&&g.data.response){const h=f(g.data.response);if(h&&h.then)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.G,1,1007,null,g);});_.Bi(this.l,e);c.resolve(a);return e}catch(f){return new Nr(Promise.reject(f))}}};_.z("clpp.net.NetworkEngine",_.po);_.po.prototype.fetch=_.po.prototype.fetch;
325
- _.po.prototype.removeResponseModifier=_.po.prototype.Cd;_.po.prototype.removeRequestModifier=_.po.prototype.rf;_.po.prototype.addResponseModifier=_.po.prototype.Hc;_.po.prototype.addRequestModifier=_.po.prototype.De;_.po.prototype.setRateLimit=_.po.prototype.Yg;var Hi;
326
- _.Ki=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.frameRate=this.label=this.originalLanguage=this.language=this.kind=null;this.trickPlay=!1;this.channelsCount=this.src=this.mimeType=null;this.spatialAudio=!1;this.renditions=[];this.accessibility=[]}md(a){return this.type===a.type&&this.channelsCount===a.channelsCount&&this.frameRate===a.frameRate&&this.trickPlay===a.trickPlay&&this.kind===a.kind&&this.label===a.label&&this.language===a.language&&this.mimeType===a.mimeType&&hh(this.roles,
327
- a.roles)&&hh(this.accessibility,a.accessibility,Fi)}toString(){return`Track type: ${this.type} id: ${this.id}
328
- renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.Ki);_.Ki.prototype.toString=_.Ki.prototype.toString;_.Ui=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.drm=this.drmInfo=this.codec=this.Ic=this.bandwidth=this.height=this.width=null}};_.z("clpp.Rendition",_.Ui);_.Ji=1;_.M=_.w;_.L=_.p;_.K=_.u;Hi=_.ne;_.Or={VIDEO:_.M,AUDIO:_.L,TEXT:_.K,METADATA:Hi};_.Ki.Type=_.Or;_.dl=class{constructor(a){this.j=a;this.scheme=null;const b=document.createElement("a"),c=a.match(/^(.*:)(\/\/(.*))$/);let d=!1;if(c){if(this.scheme=c[1],b.href=c[2],":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+c[3],d=!0}else{b.href=a;if(":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+a.match(/\/?\/?(.*)/)[1],d=!0;this.scheme=b.protocol}""===this.scheme&&(this.scheme=window.location.protocol);this.a=d?"":b.hostname;this.port=b.port;this.path=b.pathname;
329
- _.Yh(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.z("clpp.utils.url.queryString",_.Ni);var Pr=class{constructor(a){this.f=a;this.g=new _.R("clpp.native.hls.HlsMetadataParser");this.a=nh(this.h.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}h(a,b){const c=this;return _.x(function*(){let d=null;try{d=yield Qi(c,a)}catch(f){return c.g.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield Wi(c,d,
330
- a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.g.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield Yi(d);e.Bc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.fj=[];_.S=class{Ld(){return!0}ig(a){return this.getVideoTracks().find(b=>_.Dg(b,a,a&&Object.keys(a)))}eg(a){return this.getAudioTracks().find(b=>_.Dg(b,a,a&&Object.keys(a)))}gg(a){return this.ga().find(b=>_.Dg(b,a,a&&Object.keys(a)))}hg(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.Dg(b,a,a&&Object.keys(a)))}dg(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.Dg(b,a,a&&Object.keys(a)))}fg(a){return this.ga().flatMap(b=>b.renditions).find(b=>_.Dg(b,a,a&&Object.keys(a)))}};
331
- _.z("clpp.TrackManager",_.S);_.S.prototype.isAbrEnabled=_.S.prototype.na;_.S.prototype.addTextTrack=_.S.prototype.addTextTrack;_.S.prototype.findTextRendition=_.S.prototype.fg;_.S.prototype.findAudioRendition=_.S.prototype.dg;_.S.prototype.findVideoRendition=_.S.prototype.hg;_.S.prototype.findTextTrack=_.S.prototype.gg;_.S.prototype.findAudioTrack=_.S.prototype.eg;_.S.prototype.findVideoTrack=_.S.prototype.ig;_.S.prototype.setTextRendition=_.S.prototype.$a;_.S.prototype.setAudioRendition=_.S.prototype.Za;
332
- _.S.prototype.setVideoRendition=_.S.prototype.Ra;_.S.prototype.setTextTrack=_.S.prototype.Ha;_.S.prototype.setAudioTrack=_.S.prototype.ta;_.S.prototype.setVideoTrack=_.S.prototype.ab;_.S.prototype.getTextTrack=_.S.prototype.qa;_.S.prototype.getAudioTrack=_.S.prototype.ja;_.S.prototype.getVideoTrack=_.S.prototype.Ea;_.S.prototype.getLoadingTextRendition=_.S.prototype.jb;_.S.prototype.getLoadingAudioRendition=_.S.prototype.ib;_.S.prototype.getLoadingVideoRendition=_.S.prototype.Va;
333
- _.S.prototype.getTextRendition=_.S.prototype.Da;_.S.prototype.getAudioRendition=_.S.prototype.Ka;_.S.prototype.getVideoRendition=_.S.prototype.ka;_.S.prototype.getTextTracks=_.S.prototype.ga;_.S.prototype.getAudioTracks=_.S.prototype.getAudioTracks;_.S.prototype.getVideoTracks=_.S.prototype.getVideoTracks;_.S.prototype.canSelectVideoTracks=_.S.prototype.Ld;_.Qr=new Map;_.Rr=(new Map).set(_.kd,_.kd).set("frameRate","framerate").set("bandwidth","bitrate").set(_.hg,_.hg).set(_.Rd,_.Rd).set("channelsCount","channels");_.Sr=class{constructor(a){this.f=a;this.a=null}ca(a){return jj(this,a,!1)}bb(a){return jj(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.mj=class{constructor(a){this.f=a;this.a=null}xe(){this.stop();this.f();return this}ca(a){this.stop();this.a=(new _.Sr(()=>{this.f()})).ca(a);return this}bb(a){this.stop();this.a=(new _.Sr(()=>{this.f()})).bb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.mj);_.mj.prototype.stop=_.mj.prototype.stop;_.mj.prototype.tickEvery=_.mj.prototype.bb;_.mj.prototype.tickAfter=_.mj.prototype.ca;_.mj.prototype.tickNow=_.mj.prototype.xe;var Tr=class{};_.z(jd,Tr);Tr.getInfo=_.Oj;
334
- var lj=null,kj=null,Dj=new _.R(jd),Hj="android",Gj="ios",Mj="linux",Ij="osx",Jj="windows",Kj="tizen",Lj="webos",Fj=Gf,Nj=Gf,yj={windows:{os_version:/windows\s+?nt\s([\d.]+)/i,ie:/windows\s+?nt.+?trident\/[\d.]+.*rv:([\d.]+)/i,edge:/windows\s+?nt.+?edge?\/([\d.]+)/i,chrome:/windows\s+?nt.+?chrome\/([\d.]+)/i,firefox:/windows\s+?nt.+?firefox\/([\d.]+)/i,opera:/windows\s+?nt.+?opr\/([\d.]+)/i},osx:{os_version:/macintosh.+?([\d._]+)/i,safari:/macintosh.+?version\/([\d._]+).+?safari/i,edge:/macintosh.+?edge?\/([\d._]+)/i,
331
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var xs=class{};_.x("clpp.utils.BufferUtils",xs);xs.toArrayBuffer=hi;xs.toDataView=_.gi;xs.toInt32Array=_.fi;xs.toUint32Array=ei;xs.toUint16Array=di;xs.toUint8Array=_.I;xs.equal=bi;var ki=new _.Q("clpp.utils.strings");_.x("clpp.utils.strings.fromUtf8",_.ji);_.x("clpp.utils.strings.fromBytesAutoDetect",_.mi);_.x("clpp.utils.strings.toUtf8",_.ni);_.x("clpp.utils.strings.toUtf16",_.oi);_.x("clpp.utils.strings.toByteArray",_.pi);_.x("clpp.utils.strings.startsWith",_.qi);_.x("clpp.utils.strings.endsWith",_.ri);_.x("clpp.utils.strings.bitrateToString",_.ui);
332
+ _.x("clpp.utils.strings.durationToString",function(a,b="%h:%mm:%ss"){if(null===a||void 0===a)a=0;if(null===b||void 0===b)b="%h:%mm:%ss";const c=Math.floor(a/3600),d=Math.floor((a-3600*c)/60);a=Math.floor(a-3600*c-60*d);const e=(g,h)=>g.length<h?e("0"+g,h):g,f=g=>(h,k)=>e(g,k.length-1);return b.replace(/(%h+)/,f(String(c))).replace(/(%m+)/,f(String(d))).replace(/(%s+)/,f(String(a)))});
333
+ _.x("clpp.utils.strings.hashCode",function(a){let b=0;if(0===a.length)return b;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b});var vi=document.createElement("span");var ys=class{};_.x("clpp.utils.Uint8ArrayUtils",ys);ys.toStandardBase64=_.xi;ys.concat=_.Di;ys.equal=_.Ci;ys.toHex=_.Bi;ys.fromHex=_.Ai;ys.fromBase64=_.zi;ys.toBase64Url=_.yi;_.zs=new _.Q("clpp.hls.Utils");_.Fi=class{constructor(a){this.f=a;this.a=0}};_.As=new Set([_.Da,_.Ea,"EXT-X-I-FRAMES-ONLY",_.Ha,_.Ia,_.Ka,_.Oa,_.Pa]);_.Bs=new Set(["EXTINF",_.Aa,_.Ca,_.Fa,_.Ga,_.Ma]);_.Cs=new Set(["EXT-X-PART",_.La]);_.Ds=new Set([_.Ba]);var Ji=[403,401];_.x("clpp.net.DEFAULT_FATAL_STATUS_CODES",Ji);_.x("clpp.net.makeRequest",_.Ni);_.Mi=6;_.x("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.Mi});_.Ym=class{constructor(){let a,b;const c=new Promise((d,e)=>{a=d;b=e});c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.fo=class{constructor(a,b){this.P=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}od(a,b){const c=new _.Ym;let d=()=>{c.reject(new _.G(_.E,7,7001));return this.abort()};this.P.then(e=>{this.a?c.reject(new _.G(_.E,7,7001)):a?d=Si(a,e,c):c.resolve(e)},e=>{b?d=Si(b,e,c):c.reject(e)});return new _.fo(c,()=>d())}};_.fo.aborted=function(){const a=Promise.reject(new _.G(_.E,7,7001));a.catch(()=>{});return new _.fo(a,()=>Promise.resolve())};_.fo.prototype.chain=_.fo.prototype.od;_.Es=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.P.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.So=class{constructor(){this.f=[];this.g=[];this.o=!1;this.l=new _.Es;this.a={};this.j=0;this.a.data=Mr;!window.fetch||!window.AbortController||_.Rj(6)||_.Uj()&&68<_.pk().browserVersion.major?(this.a.http=qr,this.a.https=qr):(this.a.http=Hr,this.a.https=Hr)}nh(a){0<a?_.B("Rate limit set to "+a+"bps"):_.B("Rate limit disabled");this.j=a}release(){return this.l.destroy()}destroy(){this.o=!0;this.f=[];this.g=[];return this.l.destroy()}Ne(a){this.f.push(a)}Gc(a){this.g.push(a)}Ef(a){this.f=this.f.filter(b=>
334
+ b!==a)}Hd(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.o)return new Fs(Promise.reject(new _.G(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.j&&0<this.j&&(a.rateLimitBps=this.j);var b=[];for(const f of this.f)b.push(f);if(a.requestModifiers)for(const f of a.requestModifiers)b.push(f);a.requestModifiers=b;b=[];for(var c of this.g)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.Ym;try{for(const f of a.requestModifiers)d=d.then(g=>
335
+ {if(e.a)throw new _.G(_.E,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.G)throw g;throw new _.G(_.E,1,1006,null,g);});d=d.then(f=>{var g=new _.Jh(f.uris[f.uriIndex]);var h=g.Xa;h||(h=location.protocol,h=h.slice(0,-1),Kh(g,h),f.uris[f.uriIndex]=g.toString());h=this.a[h];if(!h)throw new _.G(_.E,1,1E3,{url:g.toString()});g=h;return{request:f,plugin:g}});e=new Fs(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.G(_.E,1,7001,
336
+ g?{url:g.request.uris[g.request.uriIndex],request:g.request}:null);};h();const k=f(g)||g;h();return k}).catch(g=>{if(g instanceof _.G&&g.data&&g.data.response){const h=f(g.data.response);if(h&&h.then)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.G)throw g;throw new _.G(_.E,1,1007,null,g);});_.Ui(this.l,e);c.resolve(a);return e}catch(f){return new Fs(Promise.reject(f))}}};_.x("clpp.net.NetworkEngine",_.So);_.So.prototype.fetch=_.So.prototype.fetch;
337
+ _.So.prototype.removeResponseModifier=_.So.prototype.Hd;_.So.prototype.removeRequestModifier=_.So.prototype.Ef;_.So.prototype.addResponseModifier=_.So.prototype.Gc;_.So.prototype.addRequestModifier=_.So.prototype.Ne;_.So.prototype.setRateLimit=_.So.prototype.nh;var $i;
338
+ _.ej=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.frameRate=this.label=this.originalLanguage=this.language=this.kind=null;this.trickPlay=!1;this.channelsCount=this.src=this.mimeType=null;this.spatialAudio=!1;this.renditions=[];this.accessibility=[]}vc(a){return this.type===a.type&&this.channelsCount===a.channelsCount&&this.frameRate===a.frameRate&&this.trickPlay===a.trickPlay&&this.kind===a.kind&&this.label===a.label&&this.language===a.language&&this.mimeType===a.mimeType&&Ah(this.roles,
339
+ a.roles)&&Ah(this.accessibility,a.accessibility,Yi)}toString(){return`Track type: ${this.type} id: ${this.id}
340
+ renditions size: ${this.renditions.length}`}};_.x("clpp.Track",_.ej);_.ej.prototype.toString=_.ej.prototype.toString;_.mj=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.drm=this.drmInfo=this.codec=this.Hc=this.bandwidth=this.height=this.width=null}};_.x("clpp.Rendition",_.mj);_.bj=1;_.L=_.t;_.K=_.p;_.J="text";$i=_.we;_.Gs={VIDEO:_.L,AUDIO:_.K,TEXT:_.J,METADATA:$i};_.ej.Type=_.Gs;_.El=class{constructor(a){this.j=a;this.scheme=null;const b=document.createElement("a"),c=a.match(/^(.*:)(\/\/(.*))$/);let d=!1;if(c){if(this.scheme=c[1],b.href=c[2],":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+c[3],d=!0}else{b.href=a;if(":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+a.match(/\/?\/?(.*)/)[1],d=!0;this.scheme=b.protocol}""===this.scheme&&(this.scheme=window.location.protocol);this.a=d?"":b.hostname;this.port=b.port;this.path=b.pathname;
341
+ _.qi(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.g=b.hash}};_.x("clpp.utils.url.queryString",_.hj);var Hs=class{constructor(a){this.f=a;this.h=new _.Q("clpp.native.hls.HlsMetadataParser");this.a=Eh(this.g.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}g(a,b){const c=this;return _.w(function*(){let d=null;try{d=yield kj(c,a)}catch(f){return c.h.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield oj(c,d,
342
+ a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.h.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield qj(d);e.Ac=f}catch(f){c.h.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.yj=[];_.R=class{Qd(){return!0}tg(a){return this.getVideoTracks().find(b=>_.Tg(b,a,a&&Object.keys(a)))}pg(a){return this.getAudioTracks().find(b=>_.Tg(b,a,a&&Object.keys(a)))}rg(a){return this.ga().find(b=>_.Tg(b,a,a&&Object.keys(a)))}sg(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.Tg(b,a,a&&Object.keys(a)))}og(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.Tg(b,a,a&&Object.keys(a)))}qg(a){return this.ga().flatMap(b=>b.renditions).find(b=>_.Tg(b,a,a&&Object.keys(a)))}};
343
+ _.x("clpp.TrackManager",_.R);_.R.prototype.isAbrEnabled=_.R.prototype.ma;_.R.prototype.addTextTrack=_.R.prototype.addTextTrack;_.R.prototype.findTextRendition=_.R.prototype.qg;_.R.prototype.findAudioRendition=_.R.prototype.og;_.R.prototype.findVideoRendition=_.R.prototype.sg;_.R.prototype.findTextTrack=_.R.prototype.rg;_.R.prototype.findAudioTrack=_.R.prototype.pg;_.R.prototype.findVideoTrack=_.R.prototype.tg;_.R.prototype.setTextRendition=_.R.prototype.Za;_.R.prototype.setAudioRendition=_.R.prototype.Ya;
344
+ _.R.prototype.setVideoRendition=_.R.prototype.Pa;_.R.prototype.setTextTrack=_.R.prototype.Ea;_.R.prototype.setAudioTrack=_.R.prototype.ra;_.R.prototype.setVideoTrack=_.R.prototype.$a;_.R.prototype.getTextTrack=_.R.prototype.oa;_.R.prototype.getAudioTrack=_.R.prototype.ja;_.R.prototype.getVideoTrack=_.R.prototype.Ca;_.R.prototype.getLoadingTextRendition=_.R.prototype.ib;_.R.prototype.getLoadingAudioRendition=_.R.prototype.hb;_.R.prototype.getLoadingVideoRendition=_.R.prototype.Ua;
345
+ _.R.prototype.getTextRendition=_.R.prototype.Ba;_.R.prototype.getAudioRendition=_.R.prototype.Ia;_.R.prototype.getVideoRendition=_.R.prototype.ka;_.R.prototype.getTextTracks=_.R.prototype.ga;_.R.prototype.getAudioTracks=_.R.prototype.getAudioTracks;_.R.prototype.getVideoTracks=_.R.prototype.getVideoTracks;_.R.prototype.canSelectVideoTracks=_.R.prototype.Qd;var Cj=new Map,Bj=1,Gj=2,Fj=3,Ej=4;_.Is=(new Map).set(_.rd,_.rd).set("frameRate","framerate").set("bandwidth","bitrate").set(_.xg,_.xg).set(_.Zd,_.Zd).set("channelsCount","channels");_.Js=class{constructor(a){this.f=a;this.a=null}da(a){return Kj(this,a,!1)}ab(a){return Kj(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Nj=class{constructor(a){this.f=a;this.a=null}Ee(){this.stop();this.f();return this}da(a){this.stop();this.a=(new _.Js(()=>{this.f()})).da(a);return this}ab(a){this.stop();this.a=(new _.Js(()=>{this.f()})).ab(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.x("clpp.utils.Timer",_.Nj);_.Nj.prototype.stop=_.Nj.prototype.stop;_.Nj.prototype.tickEvery=_.Nj.prototype.ab;_.Nj.prototype.tickAfter=_.Nj.prototype.da;_.Nj.prototype.tickNow=_.Nj.prototype.Ee;var Ks=class{};_.x(qd,Ks);Ks.getInfo=_.pk;
346
+ var Mj=null,Lj=null,ek=new _.Q(qd),ik="android",hk="ios",nk="linux",jk="osx",kk="windows",lk="tizen",mk="webos",gk=Xf,ok=Xf,Zj={windows:{os_version:/windows\s+?nt\s([\d.]+)/i,ie:/windows\s+?nt.+?trident\/[\d.]+.*rv:([\d.]+)/i,edge:/windows\s+?nt.+?edge?\/([\d.]+)/i,chrome:/windows\s+?nt.+?chrome\/([\d.]+)/i,firefox:/windows\s+?nt.+?firefox\/([\d.]+)/i,opera:/windows\s+?nt.+?opr\/([\d.]+)/i},osx:{os_version:/macintosh.+?([\d._]+)/i,safari:/macintosh.+?version\/([\d._]+).+?safari/i,edge:/macintosh.+?edge?\/([\d._]+)/i,
335
347
  chrome:/macintosh.+?chrome\/([\d._]+)/i,firefox:/macintosh.+?firefox\/([\d._]+)/i,opera:/macintosh.+?opr\/([\d._]+)/i},unknown:{ie:/.+?trident\/([\d.]+)/i,edge:/.+?edge?\/([\d.]+)/i,safari:/.+?version\/([\d._]+).+?safari/i,chrome:/.+?chrome\/([\d._]+)/i,firefox:/.+?firefox\/([\d._]+)/i,opera:/.+?opr\/([\d._]+)/i},android:{os_version:/android.+?([\d._]+)/i,chrome:/android.+?chrome\/([\d._]+)/i,firefox:/android.+?firefox\/([\d._]+)/i,opera:/android.+?opr\/([\d._]+)/i},ios:{os_version:/(?:iPad|iPhone).+?([\d._]+)/i,
336
348
  chrome:/.+?CriOS\/([\d._]+)/i,firefox:/.+?FxiOS\/([\d._]+)/i,safari:/.+?version\/([\d._]+).+?safari/i,opera:/.+?opr\/([\d._]+)/i},linux:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i},tizen:{os_version:/tizen.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i},
337
- webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var T=class extends _.S{constructor(){super();this.g=new _.R("clpp.native.TrackManager");this.m=null;this.f=new _.ir;this.h=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.N=this.B.bind(this,_.K);this.T=this.F.bind(this,_.K);this.R=this.C.bind(this,_.K);this.V=this.B.bind(this,_.M);this.Z=this.F.bind(this,_.M);this.W=this.C.bind(this,_.M);this.J=this.B.bind(this,_.L);this.M=this.F.bind(this,_.L);this.K=this.C.bind(this,_.L);this.j=null}Ld(){return!_.Aj()}B(a,
338
- b){const c=this;return _.x(function*(){if(b){var d=b.track;if(d){var e=a===_.M,f=a===_.K,g=a===_.L||e,h=b.target,k=c.h.find(n=>Pj(n,d,a));if(k)c.g.warn("Track from event already exists",d,k);else{var l=Li(a,d),m=Qj(d);if(f){if(d.kind===_.ne)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(q=>Pj(l,q,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.rc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.h.find(n=>n.type===a&&_.Dg(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.g.debug(`Setting native ${a} track active`),
339
- c.a.set(a,k));c.g.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.Ui(l.id,l));c.h.push(l);const n=c.m.getConfiguration().safari;Sj(c,a,n)?yield Tj(c,l,n):Uj(c,a,n)&&(yield Vj(c,l,n));c.g.debug(a+" Track added",l);c.m.trigger(new _.F(_.Ur));const q=Wj(c,a).length,t=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.g.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${q}`,d);c.a.set(a,l)};m?f():1===q&&
340
- g&&(e?f():t&&1!==v||f())}catch(n){c.g.error("Error while converting track data",n)}}}else c.g.warn(jb)}else c.g.warn(hb)})}F(a,b){if(b){var c=b.track;c?a===_.K&&c.kind!==_.ne&&(b=this.h.find(d=>Pj(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),Xj(this)),this.g.debug(a+" Track removed, id: ",b.id)):this.g.warn(jb)}else this.g.warn(hb)}C(a,b){this.g.debug(a+" Track changed",b);a===_.K&&Xj(this);const c=Zj(this,a);if(c)for(let d=0;d<c.length;++d)if(Qj(c[d])){if(b=
341
- this.h.find(e=>Pj(e,c[d],a)))this.a.set(a,b),this.g.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.L?this.m.trigger(new _.F(_.ck)):a===_.K&&this.m.trigger(new _.F(_.dk));break}}initialize(a){this.m=a;this.j=new Pr(a.getNetworkEngine())}load(){this.A=!1;var a=Yj(this,_.K);a&&(this.f.on(a,_.mc,this.N),this.f.on(a,ff,this.T),this.f.on(a,Vc,this.R));if(a=Yj(this,_.L))this.f.on(a,_.mc,this.J),this.f.on(a,ff,this.M),this.f.on(a,Vc,this.K);if(a=Yj(this,_.M))this.f.on(a,
342
- _.mc,this.V),this.f.on(a,ff,this.Z),this.f.on(a,Vc,this.W);this.f.one(this.m,Oc,this.H.bind(this))}release(){this.A=!0;this.h=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return Wj(this,_.M)}getAudioTracks(){return Wj(this,_.L)}ga(){return Wj(this,_.K)}ka(){const a=this.a.get(_.M)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);if(b)return b}return a.renditions[0]||
343
- null}Ka(){return ak(this,_.L)}Da(){return ak(this,_.K)}Va(){return bk(this,_.M)}ib(){return bk(this,_.L)}jb(){return bk(this,_.K)}Ea(){return this.a.get(_.M)||null}ja(){return this.a.get(_.L)||null}qa(){return this.a.get(_.K)||null}ab(a){ek(this,_.M,a)}ta(a){ek(this,_.L,a)}Ha(a){ek(this,_.K,a)}Ra(a){ek(this,_.M,a&&a.track)}Za(a){ek(this,_.L,a&&a.track)}$a(a){ek(this,_.K,a&&a.track)}addTextTrack(a){const b=this;return _.x(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
344
- b.o[c]=a;fk(b,a,c)}else yield gk(b,a)})}na(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();ik(a,_.L,b.preferredAudioLanguage);if(!Zj(a,_.K).some(c=>Qj(c))){const c=Yj(a,_.K);yield new Promise(d=>{a.f.one(c,Vc,d);(new _.mj(d)).ca(1)})}a.A||ik(a,_.K,b.preferredTextLanguage)})}};T.prototype.isAbrEnabled=T.prototype.na;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.setTextRendition=T.prototype.$a;
345
- T.prototype.setAudioRendition=T.prototype.Za;T.prototype.setVideoRendition=T.prototype.Ra;T.prototype.setTextTrack=T.prototype.Ha;T.prototype.setAudioTrack=T.prototype.ta;T.prototype.setVideoTrack=T.prototype.ab;T.prototype.getTextTrack=T.prototype.qa;T.prototype.getAudioTrack=T.prototype.ja;T.prototype.getVideoTrack=T.prototype.Ea;T.prototype.getLoadingTextRendition=T.prototype.jb;T.prototype.getLoadingAudioRendition=T.prototype.ib;T.prototype.getLoadingVideoRendition=T.prototype.Va;
346
- T.prototype.getTextRendition=T.prototype.Da;T.prototype.getAudioRendition=T.prototype.Ka;T.prototype.getVideoRendition=T.prototype.ka;T.prototype.getTextTracks=T.prototype.ga;T.prototype.getAudioTracks=T.prototype.getAudioTracks;T.prototype.getVideoTracks=T.prototype.getVideoTracks;T.prototype.canSelectVideoTracks=T.prototype.Ld;_.Vr=class{constructor(a,b="total"){this.length=(this.f=a)?a.length:0;this.a=[];this.type=b}start(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(Fb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(Fb);}qb(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:1===this.length&&0>this.start(0)?0:this.start(0)}Ba(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
347
- 1)}ec(a,b=!0,c=0){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)||a>this.end(this.length-1))return!1;if(b)return c+a>=this.start(0)&&a<=this.end(this.length-1);for(b=0;b<this.length;b++)if(c+a>=this.start(b)&&a<=this.end(b))return!0;return!1}Ia(a,b=!1){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0))return 0;let c=0;if(b)b=this.Ba(),null!=b&&(c=Math.max(0,b-a));else for(b=this.length-1;0<=b&&this.end(b)>a;--b)c+=this.end(b)-Math.max(this.start(b),a);return c}toString(){let a=
348
- "";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.z("clpp.BufferInfo",_.Vr);_.Vr.prototype.bufferedAheadOf=_.Vr.prototype.Ia;_.Vr.prototype.isBuffered=_.Vr.prototype.ec;_.Vr.prototype.bufferEnd=_.Vr.prototype.Ba;_.Vr.prototype.bufferStart=_.Vr.prototype.qb;_.Vr.prototype.end=_.Vr.prototype.end;_.Vr.prototype.start=_.Vr.prototype.start;_.Wr=class{constructor(){this.Nc=new gr(this);this.Lc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Nc.on(a,b,c)}one(a,b,c){return this.Nc.one(a,b,c)}off(a,b){return this.Nc.off(a,b)}addDelegate(a){a&&(0<=this.Lc.indexOf(a)||this.Lc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}removeDelegate(a){a&&(a=this.Lc.indexOf(a),0<=a&&this.Lc.splice(a,1))}trigger(a){this.Nc.trigger(a);for(const b of this.Lc)b.dispatchEvent(a)}};
349
- _.Wr.prototype.off=_.Wr.prototype.off;_.Wr.prototype.one=_.Wr.prototype.one;_.Wr.prototype.on=_.Wr.prototype.on;_.Wr.prototype.removeEventListener=_.Wr.prototype.removeEventListener;_.Wr.prototype.addEventListener=_.Wr.prototype.addEventListener;_.z("clpp.events.ERROR",_.Nd);_.z("clpp.events.LOADEDMETADATA",_.he);_.z("clpp.events.BUFFERING_ENDED",_.Lc);_.z("clpp.events.BUFFERING_STARTED",_.Mc);_.z("clpp.events.STATE_CHANGED",_.sf);_.ck="audiotrackchanged";_.z("clpp.events.AUDIO_TRACK_CHANGED",_.ck);_.dk="texttrackchanged";_.z("clpp.events.TEXT_TRACK_CHANGED",_.dk);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.Tf);_.z("clpp.events.BITRATE_CHANGED",_.Jc);_.Ur="tracksadded";_.z("clpp.events.TRACKS_ADDED",_.Ur);_.z("clpp.events.LOAD_START",ie);
350
- _.z("clpp.events.RELEASING",_.ef);_.z("clpp.events.RELEASED",df);_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.Sf);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.Hc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_UPDATE",_.Hd);_.z("clpp.events.DRM_SESSION_PERSISTED",_.Gd);_.z("clpp.events.DRM_RENEWAL_STARTED",Fd);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Ed);
351
- _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Ic);_.z("clpp.events.PLAY",_.Je);_.z("clpp.events.SEEKING",_.lf);_.z("clpp.events.SEEKED",_.kf);_.z("clpp.events.USER_SEEKING",_.Lf);_.z("clpp.events.USER_SEEKED",_.Kf);_.ln={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.ln);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.nc);_.z("clpp.events.AD_LOADED",_.dc);_.z("clpp.events.AD_BREAK_STARTED",_.Wb);_.z("clpp.events.AD_STARTED",_.jc);_.z("clpp.events.AD_BUFFERING",_.Zb);_.z("clpp.events.AD_PROGRESS",_.gc);
352
- _.z("clpp.events.AD_FIRST_QUARTILE",_.bc);_.z("clpp.events.AD_MIDPOINT",_.ec);_.z("clpp.events.AD_THIRD_QUARTILE",_.lc);_.z("clpp.events.AD_PAUSED",_.fc);_.z("clpp.events.AD_RESUMED",_.hc);_.z("clpp.events.AD_SKIPPED",_.ic);_.z("clpp.events.AD_CLICKED",_.$b);_.z("clpp.events.AD_IMPRESSION",_.cc);_.z("clpp.events.AD_COMPLETED",_.ac);_.z("clpp.events.AD_STOPPED",_.kc);_.z("clpp.events.AD_BREAK_STOPPED",_.Xb);_.z("clpp.events.SIMID_CREATIVE_STARTED",_.nf);_.z("clpp.events.SIMID_CREATIVE_STOPPED",_.of);
353
- _.z("clpp.events.CASTING_STARTED",_.Pc);_.z("clpp.events.CASTING_ENDED","castingended");_.z("clpp.events.CAST_STATUS_CHANGED",_.Qc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.qc);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.pc);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.oc);_.Zg="timeline-cue-added";_.z("clpp.events.TIMELINE_CUE_ADDED",_.Zg);_.ah="timeline-cue-enter";_.z("clpp.events.TIMELINE_CUE_ENTER",_.ah);_.bh="timeline-cue-exit";_.z("clpp.events.TIMELINE_CUE_EXIT",_.bh);
354
- _.z("clpp.events.MPD_TYPE_CHANGED",_.se);_.z("clpp.events.VIMOND_RESPONSE",_.Yf);_.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.Re);_.z("clpp.events.PLAYLIST_MODIFIED",_.Se);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.Rc);_.z("clpp.events.ONLINE_STATUS_CHANGED",Be);var jk=["play() failed because the user didn't interact","The play method is not allowed by the user agent","The request is not allowed by the user agent or the platform"];_.z("clpp.version",_.da);_.z("clpp.name",_.pa);_.hk="application/x-mpegurl";_.z("clpp.Type",{DASH:_.sc,HLS:_.hk,SMOOTH_STREAMING:_.Bc,MP4:_.Rf});_.Yg="scte35";_.Wg=Gf;_.z("clpp.TimelineCueType",{SCTE35:_.Yg,DASH_CALLBACK:_.te,HLS_DATERANGE:"hls-daterange",UNKNOWN:_.Wg});_.z("clpp.SpeedUpMode",{DECODER:_.wd,SEEK:"seek"});var Xr=class{};_.z("clpp.utils.PlayerConfiguration",Xr);Xr.create=_.pk;var Yr=["abort",Nc,Oc,Jd,"emptied",Kd,_.Md,_.Nd,"interruptbegin","interruptend",_.ge,_.he,ie,"mozaudioavailable",_.Fe,_.Je,_.Qe,_.af,_.cf,_.kf,_.lf,qf,"suspend",_.Cf,"volumechange",_.ag,_.bg,_.hf,gg,fg,dg,eg];_.Zr=class extends _.Wr{constructor(a){super();this.log=new _.R(a);this.configuration=this.uc=_.nk();this.w=this.C=null;this.xd=this.Zd=!1;this.Gf=new _.R("clpp.video.events");this.Tb=null;this.vc=-1;this.Pf=this.Nf.bind(this);this.Yd=new _.po;this.N=new _.ir;this.cb=this.sc=this.M=null}init(a,b){this.configuration=this.uc=b;this.C=a;this.log.info("Initializing Player surface");a=this.C.getMedia();this.log.info("Attaching media element listeners");for(const c of Yr)this.N.on(a,c,this.Pf,c!==_.Nd);
355
- this.Tb||(this.Tb=this.wf());this.Tb.initialize(this);this.C.showMediaElement()}release(){this.M&&(this.M.destroy(),this.M=null);return Promise.resolve()}destroy(){this.N.release();return this.Yd.release()}canPlay(a,b){return _.Qg[this.namespace()].canPlay(a,b)}play(){if(!this.w)return Promise.reject("No sources specified yet. You need to load content before calling play.");const a=this.C.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c=
356
- {name:b.name||"",message:b.message||"",stack:b.stack||""};kk(c)?(this.trigger(new _.F(_.Ic)),this.log.warn(_.ja)):c.name===lb&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.w?new Promise((a,b)=>{const c=this.getState();if(c!==_.jn&&c!==_.fn&&c!==_.rn&&c!==_.qn)b();else if(this.C.getMedia().pause(),this.getState()===_.rn)this.N.one(this,_.sf,()=>{a()});else a()}):Promise.reject("No sources specified yet. You need to load content before calling pause.")}isPaused(){return this.C.getMedia().paused}isEnded(){return this.C.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.sc=
357
- a}setCdnErrorCallback(a){this.cb=a}xc(){return this.sc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.Vr(b?b.buffered:void 0,a)}getPosition(){const a=this.C.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this.getPosition();if(void 0===a||null===a||typeof a!==_.r||a===b)return Promise.resolve();const c=this.C.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),
358
- Promise.reject();const d=a-b;return.1>=Math.abs(d)?(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.F(_.Lf));this.N.on(c,_.kf,h);this.N.on(c,_.Cf,h);this.N.on(c,_.af,h);this.log.info("Seeking to "+a+". Delta "+d);this.xd=this.Zd=!0;c.currentTime=a},h=l=>{const m=this.getPosition(),n=.1>=Math.abs(a-m);var q=.25<m-a;const t=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,v=l.type===_.kf,y=l.type===_.af,A=l.type===_.Cf,
359
- D=y&&t;q=v||n&&D||A&&q;this.log.debug("Checking seeking state after "+l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",v,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",t,"Progress Ready:",D);q?(this.xd=this.Zd=!1,this.N.off(c,_.kf,h),this.N.off(c,_.Cf,h),this.N.off(c,_.af,h),this.Ff(),this.trigger(new _.F(_.Kf)),e()):y&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();
360
- else this.N.one(c,_.he,g)};this.getState()===_.on?(this.log.debug("Player is in IDLE state. Postpone seek."),this.N.one(this,_.sf,()=>{switch(this.getState()){case _.jn:case _.rn:case _.qn:this.log.debug("Valid seek state reached.");k();break;default:this.log.warn("Invalid seek target state. Aborting seek"),f()}})):k()})}getVolume(){const a=this.C.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.C.getMedia();
361
- b?_.Cg(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
362
- Value must be between 0 and 1.`):b.volume=a:this.log.warn("Can not set volume to "+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")}isMuted(){return this.C.getMedia().muted}setMuted(a){const b=this.C.getMedia();typeof a===_.Kc&&(b.muted=a)}getDuration(){return this.w?this.C.getMedia().duration:-1}getTrackManager(){return this.Tb}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||1}setPlaybackRate(a){const b=this.C.getMedia();
363
- void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.vc=a}getSourceIndex(){return this.vc}getLoadedSource(){return this.w&&-1!==this.vc?this.w[this.vc]:null}getPeriods(){return[]}getNetworkEngine(){return this.Yd}setNetworkEngine(a){this.Yd=a}getTextDisplayer(){return this.M}getTimelineCues(){return[]}resetAbr(){}Nf(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.Cf||a.type===_.af)this.Gf.debug(d);
364
- else{let e="";switch(a.type){case _.cf:e=`Rate: ${this.getPlaybackRate()}`;break;case Jd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Je:case _.Qe:case "suspend":case _.ag:case qf:case _.lf:case _.kf:case _.Cf:case _.af:case Nc:case Oc:b=this.getBufferInfo().Ia(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.hf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+
365
- e);this.Gf.info(d)}a.type!==_.Nd&&this.trigger(new _.F(a.type,{detail:a}))}Ff(){}};_.Zr.prototype.getTextDisplayer=_.Zr.prototype.getTextDisplayer;_.Zr.prototype.setNetworkEngine=_.Zr.prototype.setNetworkEngine;_.Zr.prototype.getNetworkEngine=_.Zr.prototype.getNetworkEngine;var tk;tk=new _.R("clpp.Components");_.rk=new Map;_.z("clpp.install",function(a){Bk(a)});_.z("clpp.uninstall",function(a){Ck(a)});var $r=class{constructor(){this.a=this.f=null;this.g=new _.R("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.yb,SW_SECURE_DECODE:_.zb,HW_SECURE_CRYPTO:Va,HW_SECURE_DECODE:Wa,HW_SECURE_ALL:Ta});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.ue,CLEAR_KEY:_.De,WIDEVINE:_.rd,PLAYREADY:_.pd,FAIRPLAY:_.nd,PRIMETIME:_.md});_.Gk={};_.z("clpp.drm.registerDrmEnvironment",_.Hk);var Kk={V1_STAGING:[10,191,2,8,3,18,16,40,112,52,84,192,8,246,54,24,173,231,68,61,182,196,200,24,139,231,249,144,5,34,142,2,48,130,1,10,2,130,1,1,0,181,33,18,184,208,93,2,63,204,93,149,226,194,81,193,198,73,180,23,124,216,210,190,239,53,91,176,103,67,222,102,30,61,42,188,49,130,183,153,70,213,95,220,8,223,233,84,7,129,94,154,98,116,179,34,162,199,245,224,103,187,95,10,192,122,137,212,90,234,148,178,81,111,7,91,102,239,129,29,13,38,225,185,166,184,148,242,185,133,121,98,170,23,28,79,102,99,13,62,76,
349
+ webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var S=class extends _.R{constructor(){super();this.h=new _.Q("clpp.native.TrackManager");this.m=null;this.f=new _.as;this.g=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.N=this.B.bind(this,_.J);this.T=this.F.bind(this,_.J);this.R=this.C.bind(this,_.J);this.U=this.B.bind(this,_.L);this.X=this.F.bind(this,_.L);this.W=this.C.bind(this,_.L);this.J=this.B.bind(this,_.K);this.L=this.F.bind(this,_.K);this.K=this.C.bind(this,_.K);this.j=null}Qd(){return!_.bk()}B(a,
350
+ b){const c=this;return _.w(function*(){if(b){var d=b.track;if(d){var e=a===_.L,f=a===_.J,g=a===_.K||e,h=b.target,k=c.g.find(n=>qk(n,d,a));if(k)c.h.warn("Track from event already exists",d,k);else{var l=fj(a,d),m=rk(d);if(f){if(d.kind===_.we)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(q=>qk(l,q,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.xc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.g.find(n=>n.type===a&&_.Tg(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.h.debug(`Setting native ${a} track active`),
351
+ c.a.set(a,k));c.h.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.mj(l.id,l));c.g.push(l);const n=c.m.getConfiguration().safari;tk(c,a,n)?yield uk(c,l,n):vk(c,a,n)&&(yield wk(c,l,n));c.h.debug(a+" Track added",l);c.m.trigger(new _.C(_.Ls));const q=xk(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.h.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${q}`,d);c.a.set(a,l)};m?f():1===q&&
352
+ g&&(e?f():u&&1!==v||f())}catch(n){c.h.error("Error while converting track data",n)}}}else c.h.warn(nb)}else c.h.warn(kb)})}F(a,b){if(b){var c=b.track;c?a===_.J&&c.kind!==_.we&&(b=this.g.find(d=>qk(d,c,a)))&&(this.g.splice(this.g.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),yk(this)),this.h.debug(a+" Track removed, id: ",b.id)):this.h.warn(nb)}else this.h.warn(kb)}C(a,b){this.h.debug(a+" Track changed",b);a===_.J&&yk(this);const c=Ak(this,a);if(c)for(let d=0;d<c.length;++d)if(rk(c[d])){if(b=
353
+ this.g.find(e=>qk(e,c[d],a)))this.a.set(a,b),this.h.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.K?this.m.trigger(new _.C(_.Dk)):a===_.J&&this.m.trigger(new _.C(_.Ek));break}}initialize(a){this.m=a;this.j=new Hs(a.getNetworkEngine())}load(){this.A=!1;var a=zk(this,_.J);a&&(this.f.on(a,_.sc,this.N),this.f.on(a,sf,this.T),this.f.on(a,bd,this.R));if(a=zk(this,_.K))this.f.on(a,_.sc,this.J),this.f.on(a,sf,this.L),this.f.on(a,bd,this.K);if(a=zk(this,_.L))this.f.on(a,
354
+ _.sc,this.U),this.f.on(a,sf,this.X),this.f.on(a,bd,this.W);this.f.one(this.m,Vc,this.H.bind(this))}release(){this.A=!0;this.g=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return xk(this,_.L)}getAudioTracks(){return xk(this,_.K)}ga(){return xk(this,_.J)}ka(){const a=this.a.get(_.L)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);if(b)return b}return a.renditions[0]||
355
+ null}Ia(){return Bk(this,_.K)}Ba(){return Bk(this,_.J)}Ua(){return Ck(this,_.L)}hb(){return Ck(this,_.K)}ib(){return Ck(this,_.J)}Ca(){return this.a.get(_.L)||null}ja(){return this.a.get(_.K)||null}oa(){return this.a.get(_.J)||null}$a(a){Fk(this,_.L,a)}ra(a){Fk(this,_.K,a)}Ea(a){Fk(this,_.J,a)}Pa(a){Fk(this,_.L,a&&a.track)}Ya(a){Fk(this,_.K,a&&a.track)}Za(a){Fk(this,_.J,a&&a.track)}addTextTrack(a){const b=this;return _.w(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
356
+ b.o[c]=a;Gk(b,a,c)}else yield Hk(b,a)})}ma(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.w(function*(){const b=a.m.getConfiguration();Jk(a,_.K,b.preferredAudioLanguage);if(!Ak(a,_.J).some(c=>rk(c))){const c=zk(a,_.J);yield new Promise(d=>{a.f.one(c,bd,d);(new _.Nj(d)).da(1)})}a.A||Jk(a,_.J,b.preferredTextLanguage)})}};S.prototype.isAbrEnabled=S.prototype.ma;S.prototype.addTextTrack=S.prototype.addTextTrack;S.prototype.setTextRendition=S.prototype.Za;
357
+ S.prototype.setAudioRendition=S.prototype.Ya;S.prototype.setVideoRendition=S.prototype.Pa;S.prototype.setTextTrack=S.prototype.Ea;S.prototype.setAudioTrack=S.prototype.ra;S.prototype.setVideoTrack=S.prototype.$a;S.prototype.getTextTrack=S.prototype.oa;S.prototype.getAudioTrack=S.prototype.ja;S.prototype.getVideoTrack=S.prototype.Ca;S.prototype.getLoadingTextRendition=S.prototype.ib;S.prototype.getLoadingAudioRendition=S.prototype.hb;S.prototype.getLoadingVideoRendition=S.prototype.Ua;
358
+ S.prototype.getTextRendition=S.prototype.Ba;S.prototype.getAudioRendition=S.prototype.Ia;S.prototype.getVideoRendition=S.prototype.ka;S.prototype.getTextTracks=S.prototype.ga;S.prototype.getAudioTracks=S.prototype.getAudioTracks;S.prototype.getVideoTracks=S.prototype.getVideoTracks;S.prototype.canSelectVideoTracks=S.prototype.Qd;_.Ms=class{constructor(a,b="total"){this.length=(this.f=a)?a.length:0;this.a=[];this.type=b}start(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(Kb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(Kb);}qb(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:1===this.length&&0>this.start(0)?0:this.start(0)}za(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
359
+ 1)}fc(a,b=!0,c=0){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)||a>this.end(this.length-1))return!1;if(b)return c+a>=this.start(0)&&a<=this.end(this.length-1);for(b=0;b<this.length;b++)if(c+a>=this.start(b)&&a<=this.end(b))return!0;return!1}Ga(a,b=!1){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0))return 0;let c=0;if(b)b=this.za(),null!=b&&(c=Math.max(0,b-a));else for(b=this.length-1;0<=b&&this.end(b)>a;--b)c+=this.end(b)-Math.max(this.start(b),a);return c}toString(){let a=
360
+ "";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.x("clpp.BufferInfo",_.Ms);_.Ms.prototype.bufferedAheadOf=_.Ms.prototype.Ga;_.Ms.prototype.isBuffered=_.Ms.prototype.fc;_.Ms.prototype.bufferEnd=_.Ms.prototype.za;_.Ms.prototype.bufferStart=_.Ms.prototype.qb;_.Ms.prototype.end=_.Ms.prototype.end;_.Ms.prototype.start=_.Ms.prototype.start;_.Ns=class{constructor(){this.Mc=new Zr(this);this.Kc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Mc.on(a,b,c)}one(a,b,c){return this.Mc.one(a,b,c)}off(a,b){return this.Mc.off(a,b)}forwardEventsTo(a){a&&(0<=this.Kc.indexOf(a)||this.Kc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.Kc.indexOf(a),0<=a&&this.Kc.splice(a,1))}trigger(a){this.Mc.trigger(a);for(const b of this.Kc)b.dispatchEvent(a)}};
361
+ _.Ns.prototype.off=_.Ns.prototype.off;_.Ns.prototype.one=_.Ns.prototype.one;_.Ns.prototype.on=_.Ns.prototype.on;_.Ns.prototype.removeEventListener=_.Ns.prototype.removeEventListener;_.Ns.prototype.addEventListener=_.Ns.prototype.addEventListener;_.x("clpp.events.ERROR",_.Vd);_.x("clpp.events.LOADEDMETADATA",_.qe);_.x("clpp.events.BUFFERING_ENDED",_.Sc);_.x("clpp.events.BUFFERING_STARTED",_.Tc);_.x("clpp.events.STATE_CHANGED",_.If);_.Dk="audiotrackchanged";_.x("clpp.events.AUDIO_TRACK_CHANGED",_.Dk);_.Ek="texttrackchanged";_.x("clpp.events.TEXT_TRACK_CHANGED",_.Ek);_.x("clpp.events.VIDEO_TRACK_CHANGED",_.mg);_.x("clpp.events.BITRATE_CHANGED",_.Qc);_.Ls="tracksadded";_.x("clpp.events.TRACKS_ADDED",_.Ls);_.x("clpp.events.LOAD_START",re);
362
+ _.x("clpp.events.RELEASING",_.rf);_.x("clpp.events.RELEASED",qf);_.x("clpp.events.DESTROYING","destroying");_.x("clpp.events.DESTROYED","destroyed");_.x("clpp.events.VIDEO_BUFFER_CHANGED",_.lg);_.x("clpp.events.AUDIO_BUFFER_CHANGED",_.Oc);_.x("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.x("clpp.events.DRM_SESSION_UPDATE",_.Od);_.x("clpp.events.DRM_SESSION_PERSISTED",_.Nd);_.x("clpp.events.DRM_RENEWAL_STARTED",Md);_.x("clpp.events.DRM_EXPIRATION_UPDATE",_.Ld);
363
+ _.x("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Pc);_.x("clpp.events.PLAY",_.Re);_.x("clpp.events.SEEKING",_.Bf);_.x("clpp.events.SEEKED",_.Af);_.x("clpp.events.USER_SEEKING",_.fg);_.x("clpp.events.USER_SEEKED",_.eg);_.Nn={SEEKING:1,NO_DATA:2};_.x("clpp.events.BufferingReasons",_.Nn);_.x("clpp.events.ADS_TIMELINE_CHANGED",_.tc);_.x("clpp.events.AD_LOADED",_.jc);_.x("clpp.events.AD_BREAK_STARTED",_.bc);_.x("clpp.events.AD_STARTED",_.pc);_.x("clpp.events.AD_BUFFERING",_.ec);_.x("clpp.events.AD_PROGRESS",_.mc);
364
+ _.x("clpp.events.AD_FIRST_QUARTILE",_.hc);_.x("clpp.events.AD_MIDPOINT",_.kc);_.x("clpp.events.AD_THIRD_QUARTILE",_.rc);_.x("clpp.events.AD_PAUSED",_.lc);_.x("clpp.events.AD_RESUMED",_.nc);_.x("clpp.events.AD_SKIPPED",_.oc);_.x("clpp.events.AD_CLICKED",_.fc);_.x("clpp.events.AD_IMPRESSION",_.ic);_.x("clpp.events.AD_COMPLETED",_.gc);_.x("clpp.events.AD_STOPPED",_.qc);_.x("clpp.events.AD_BREAK_STOPPED",_.cc);_.x("clpp.events.SIMID_CREATIVE_STARTED",_.Df);_.x("clpp.events.SIMID_CREATIVE_STOPPED",_.Ef);
365
+ _.x("clpp.events.CASTING_STARTED",_.Wc);_.x("clpp.events.CASTING_ENDED","castingended");_.x("clpp.events.CAST_STATUS_CHANGED",_.Xc);_.x("clpp.events.AIRPLAY_STATUS_CHANGED",_.wc);_.x("clpp.events.AIRPLAY_CASTING_STARTED",_.vc);_.x("clpp.events.AIRPLAY_CASTING_ENDED",_.uc);_.ph="timeline-cue-added";_.x("clpp.events.TIMELINE_CUE_ADDED",_.ph);_.rh="timeline-cue-enter";_.x("clpp.events.TIMELINE_CUE_ENTER",_.rh);_.sh="timeline-cue-exit";_.x("clpp.events.TIMELINE_CUE_EXIT",_.sh);
366
+ _.x("clpp.events.MPD_TYPE_CHANGED",_.Ae);_.x("clpp.events.LIVE_TURNED_STATIC",_.oe);_.x("clpp.events.VIMOND_RESPONSE",_.ng);_.x("clpp.events.PLAYLIST_ITEM_CHANGED",_.cf);_.x("clpp.events.PLAYLIST_MODIFIED",_.df);_.x("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.zf);_.x("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.xf);_.x("clpp.events.SC_PLAYLIST_ENDED",_.wf);_.x("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.yf);_.x("clpp.events.CDN_SWITCH_SUCCESS",_.Yc);_.x("clpp.events.ONLINE_STATUS_CHANGED",Je);var Kk=["play() failed because the user didn't interact","The play method is not allowed by the user agent","The request is not allowed by the user agent or the platform"];_.x("clpp.version",_.fa);_.x("clpp.name",_.ra);_.Ik="application/x-mpegurl";_.x("clpp.Type",{DASH:_.yc,HLS:_.Ik,SMOOTH_STREAMING:_.Dc,MP4:_.kg});_.oh="scte35";_.mh=Xf;_.x("clpp.TimelineCueType",{SCTE35:_.oh,DASH_CALLBACK:_.Be,HLS_DATERANGE:"hls-daterange",UNKNOWN:_.mh});_.x("clpp.SpeedUpMode",{DECODER:_.Dd,SEEK:"seek"});var Os=class{};_.x("clpp.utils.PlayerConfiguration",Os);Os.create=_.Qk;var Ps=["abort",Uc,Vc,Qd,"emptied",Sd,_.Ud,_.Vd,"interruptbegin","interruptend",_.pe,_.qe,re,"mozaudioavailable",_.Ne,_.Re,_.bf,_.nf,_.pf,_.Af,_.Bf,Gf,"suspend",_.Sf,"volumechange",_.qg,_.rg,_.uf,wg,vg,tg,ug];_.Qs=class extends _.Ns{constructor(a){super();this.log=new _.Q(a);this.configuration=this.cb=_.Ok();this.ca=this.C=null;this.Uc=this.se=!1;this.Me=new _.Q("clpp.video.events");this.Vb=null;this.xd=-1;this.Zf=this.Wf.bind(this);this.pe=new _.So;this.L=new _.as;this.rc=this.uc=this.U=null}init(a,b){this.configuration=this.cb=b;this.C=a;this.log.info("Initializing Player surface");a=this.C.getMedia();this.log.info("Attaching media element listeners");for(const c of Ps)this.L.on(a,c,this.Zf,c!==_.Vd);
367
+ this.Vb||(this.Vb=this.Nf());this.Vb.initialize(this);this.C.showMediaElement()}release(){this.U&&(this.U.destroy(),this.U=null);return Promise.resolve()}destroy(){this.L.release();return this.pe.release()}canPlay(a,b){return _.fh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.pb)}appendLoad(){return Promise.reject(_.pb)}seekWith(){return Promise.reject(_.pb)}play(){if(!this.ca)return Promise.reject("No sources specified yet. You need to load content before calling play.");
368
+ const a=this.C.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c={name:b.name||"",message:b.message||"",stack:b.stack||""};Lk(c)?(this.trigger(new _.C(_.Pc)),this.log.warn(_.ka)):c.name===qb&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ca?new Promise((a,b)=>{const c=this.getState();if(c!==_.Ln&&c!==_.In&&c!==_.Tn&&c!==_.Sn)b();else if(this.C.getMedia().pause(),this.getState()===
369
+ _.Tn)this.L.one(this,_.If,()=>{a()});else a()}):Promise.reject("No sources specified yet. You need to load content before calling pause.")}isPaused(){return this.C.getMedia().paused}isEnded(){return this.C.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.uc=a}setCdnErrorCallback(a){this.rc=a}xc(){return this.uc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.Ms(b?b.buffered:void 0,a)}getPosition(){return this.getMediaPosition()}getMediaPosition(){const a=
370
+ this.C.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this.getMediaPosition();if(void 0===a||null===a||typeof a!==_.r||a===b)return Promise.resolve();const c=this.C.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),Promise.reject();const d=a-b;return.1>=Math.abs(d)?(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=
371
+ ()=>{this.trigger(new _.C(_.fg));this.L.on(c,_.Af,h);this.L.on(c,_.Sf,h);this.L.on(c,_.nf,h);this.log.info("Seeking to "+a+". Delta "+d);this.Uc=this.se=!0;c.currentTime=a},h=l=>{const m=this.getMediaPosition(),n=.1>=Math.abs(a-m);var q=.25<m-a;const u=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,v=l.type===_.Af,y=l.type===_.nf,A=l.type===_.Sf,D=y&&u;q=v||n&&D||A&&q;this.log.debug("Checking seeking state after "+l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",
372
+ v,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",u,"Progress Ready:",D);q?(this.Uc=this.se=!1,this.L.off(c,_.Af,h),this.L.off(c,_.Sf,h),this.L.off(c,_.nf,h),this.Le(),this.trigger(new _.C(_.eg)),e()):y&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();else this.L.one(c,_.qe,g)};this.getState()===_.Qn?(this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.If,()=>{switch(this.getState()){case _.Ln:case _.Tn:case _.Sn:this.log.debug("Valid seek state reached.");
373
+ k();break;default:this.log.warn("Invalid seek target state. Aborting seek"),f()}})):k()})}getVolume(){const a=this.C.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.C.getMedia();b?_.Sg(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
374
+ Value must be between 0 and 1.`):b.volume=a:this.log.warn("Can not set volume to "+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")}isMuted(){return this.C.getMedia().muted}setMuted(a){const b=this.C.getMedia();typeof a===_.Rc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ca?this.C.getMedia().duration:-1}getTrackManager(){return this.Vb}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
375
+ 1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.xd=a}getSourceIndex(){return this.xd}getLoadedSource(){return this.ca&&-1!==this.xd?this.ca[this.xd]:null}getPeriods(){return[]}getNetworkEngine(){return this.pe}setNetworkEngine(a){this.pe=a}getTextDisplayer(){return this.U}getTimelineCues(){return[]}resetAbr(){}Wf(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+
376
+ c;if(a.type===_.Sf||a.type===_.nf)this.Me.debug(d);else{let e="";switch(a.type){case _.pf:e=`Rate: ${this.getPlaybackRate()}`;break;case Qd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Re:case _.bf:case "suspend":case _.qg:case Gf:case _.Bf:case _.Af:case _.Sf:case _.nf:case Uc:case Vc:b=this.getBufferInfo().Ga(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.uf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&
377
+ (d+=". "+e);this.Me.info(d)}a.type!==_.Vd&&this.trigger(new _.C(a.type,{detail:a}))}Le(){}};_.Qs.prototype.getTextDisplayer=_.Qs.prototype.getTextDisplayer;_.Qs.prototype.setNetworkEngine=_.Qs.prototype.setNetworkEngine;_.Qs.prototype.getNetworkEngine=_.Qs.prototype.getNetworkEngine;var Uk;Uk=new _.Q("clpp.Components");_.Sk=new Map;_.x("clpp.install",function(a){bl(a)});_.x("clpp.uninstall",function(a){dl(a)});var Rs=class{constructor(){this.a=this.f=null;this.h=new _.Q("clpp.drm.csl")}release(){this.a=this.f=null}};_.x("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.Db,SW_SECURE_DECODE:_.Eb,HW_SECURE_CRYPTO:Xa,HW_SECURE_DECODE:Ya,HW_SECURE_ALL:Wa});_.x("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.x("clpp.drm.KeySystem",{NONE:_.Ce,CLEAR_KEY:_.Le,WIDEVINE:_.yd,PLAYREADY:_.wd,FAIRPLAY:_.ud,PRIMETIME:_.td});_.hl={};_.x("clpp.drm.registerDrmEnvironment",_.il);var ll={V1_STAGING:[10,191,2,8,3,18,16,40,112,52,84,192,8,246,54,24,173,231,68,61,182,196,200,24,139,231,249,144,5,34,142,2,48,130,1,10,2,130,1,1,0,181,33,18,184,208,93,2,63,204,93,149,226,194,81,193,198,73,180,23,124,216,210,190,239,53,91,176,103,67,222,102,30,61,42,188,49,130,183,153,70,213,95,220,8,223,233,84,7,129,94,154,98,116,179,34,162,199,245,224,103,187,95,10,192,122,137,212,90,234,148,178,81,111,7,91,102,239,129,29,13,38,225,185,166,184,148,242,185,133,121,98,170,23,28,79,102,99,13,62,76,
366
378
  96,39,24,137,127,94,30,249,182,170,245,173,77,186,42,126,20,23,109,241,52,161,211,24,91,90,33,138,192,90,76,65,240,129,239,255,128,163,160,64,197,11,9,187,199,64,238,220,216,241,77,103,90,145,152,15,146,202,125,220,100,106,6,173,173,81,1,247,74,14,73,140,192,31,0,83,43,172,33,120,80,189,144,94,144,146,54,86,183,223,239,239,66,72,103,103,243,62,246,40,61,79,66,84,171,114,88,147,144,190,229,88,8,241,214,104,8,13,69,216,147,194,188,162,247,77,96,160,192,208,160,153,60,239,1,96,71,3,51,76,54,56,19,148,
367
379
  134,188,157,175,36,253,103,160,127,154,217,67,2,3,1,0,1,58,18,115,116,97,103,105,110,103,46,103,111,111,103,108,101,46,99,111,109,18,128,3,152,62,48,53,38,117,244,11,167,21,252,36,155,218,229,212,172,114,73,162,102,101,33,228,54,85,115,149,41,114,31,248,128,224,170,239,197,226,123,201,128,218,234,218,191,63,195,134,208,132,160,44,130,83,120,72,204,117,63,244,151,176,17,167,218,151,120,138,0,226,170,107,132,205,125,113,192,122,72,235,246,22,2,204,165,163,243,32,48,167,41,92,48,218,145,91,145,220,24,
368
380
  185,188,149,147,184,222,139,181,15,13,237,193,41,56,184,233,224,57,205,222,24,250,130,232,27,176,50,99,15,233,85,216,90,86,108,225,84,48,11,246,212,193,189,18,105,102,53,107,40,125,101,123,24,206,99,208,239,212,95,197,38,158,151,234,177,28,181,99,229,86,67,178,111,244,159,16,156,33,1,175,202,243,91,131,47,40,143,13,157,69,150,14,37,158,133,251,93,36,219,210,207,130,118,76,93,217,191,114,126,251,233,200,97,248,105,50,31,106,222,24,144,95,77,146,249,166,218,101,54,219,132,117,135,29,22,142,135,11,178,
@@ -376,94 +388,101 @@ e);this.Gf.info(d)}a.type!==_.Nd&&this.trigger(new _.F(a.type,{detail:a}))}Ff(){
376
388
  21,58,231,13,118,215,58,166,74,44,51,103,50,120,198,197,213,64,34,105,66,115,72,235,88,51,28,238,54,93,147,140,187,28,173,50,109,5,234,155,141,29,52,234,135,38,55,103,111,116,98,171,210,13,211,129,249,70,57,64,155,151,38,8,225,188,229,3,247,234,26,46,91,211,250,252,38,87,111,205,37,108,74,168,112,74,116,191,73,170,243,167,54,36,20,23,72,67,35,181,159,241,102,250,221,22,18,92,161,54,236,172,183,214,18,160,199,92,46,171,180,211,90,64,62,144,121,201,77,74,211,17,244,49,124,244,120,116,148,234,184,79,
377
389
  136,12,176,34,231,39,149,87,28,219,2,3,1,0,1,58,12,99,97,115,116,108,97,98,115,46,99,111,109,64,1,18,128,3,50,97,151,165,120,63,210,172,84,187,10,36,166,202,149,32,118,107,37,251,186,217,170,254,4,95,20,85,66,157,43,154,24,66,136,147,101,223,78,204,173,228,175,111,100,168,97,164,222,84,160,51,79,233,227,223,105,252,85,11,242,129,199,206,11,9,236,118,163,118,204,179,159,69,108,223,229,114,176,8,26,36,9,23,103,233,62,55,162,154,209,96,98,102,80,173,114,233,213,36,56,135,65,188,245,176,95,70,189,199,
378
390
  143,81,72,182,124,207,225,238,28,172,144,110,89,44,12,137,51,52,239,130,117,119,15,207,200,229,142,166,8,80,79,111,255,191,70,47,189,108,75,234,184,241,119,21,255,98,167,124,132,30,239,102,113,7,132,96,39,134,123,220,209,255,110,222,35,147,0,77,125,253,129,139,66,158,126,221,13,117,113,163,143,235,9,130,180,3,133,94,152,45,199,69,168,182,95,122,82,25,203,10,99,191,186,193,238,225,224,140,156,142,171,110,26,214,32,240,6,218,138,10,47,114,133,17,1,151,43,213,223,198,210,186,81,18,50,221,84,177,180,
379
- 26,58,164,235,113,177,235,207,22,230,8,119,76,167,166,176,173,209,214,53,116,116,231,227,221,238,174,87,249,19,166,195,81,47,210,172,15,75,251,202,192,80,85,213,23,17,178,104,181,193,115,239,91,72,230,167,55,143,10,250,26,54,8,60,13,213,206,235,3,215,179,205,232,1,144,158,35,48,196,149,117,219,63,196,130,117,40,165,193,65,215,122,44,201,218,67,216,6,131,178,5,168,229,21,137,112,215,254,127,48,160,181,68,49,255,64,46,247,236,85,155,146,208,5,219,252,37,174,31,218,136,135,55,119,112]};_.as=class{constructor(a){this.I=a;this.f={}}Ma(a,b){this.f[a]=b}};_.z("clpp.drm.DrmEnvironment",_.as);_.as.prototype.setDrmSystem=_.as.prototype.Ma;_.hl=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.Cg(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Ca(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.Mk();this.a=a}};_.Sl=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Ca(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.Pk();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.Pk();this.a=a}};
380
- _.z("clpp.utils.dataview.DataViewReader",_.Sl);_.fl=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.R("clpp.mp4")}L(a,b){a=Wk(a);this.h[a]=bs;this.f[a]=b;return this}$(a,b){a=Wk(a);this.h[a]=cs;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.J(a);a=new _.Sl(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.Ok(a)&&!this.a;)this.Bd(0,a,b)}Bd(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.g.debug("Parsing MP4 box",_.Xk(f));switch(e){case 0:e=b.Ca()-d;break;case 1:e=_.Tk(b),g=!0}const h=
381
- this.f[f];if(h){let m=null;var k=null;this.h[f]==cs&&(k=_.P(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Ca()&&(l=b.Ca());l-=b.getPosition();b=0<l?_.Vk(b,l):new Uint8Array(0);b=new _.Sl(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({parser:this,partialOkay:c||!1,version:m,flags:k,reader:b,size:e,start:d+a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.Ca()-b.getPosition()),b.skip(a)}};_.z("clpp.utils.Mp4Parser",_.fl);_.fl.typeToString=_.Xk;
382
- _.fl.allData=_.$k;_.fl.sampleDescription=_.Zk;_.fl.children=_.Yk;_.fl.prototype.parseNext=_.fl.prototype.Bd;_.fl.prototype.parse=_.fl.prototype.parse;_.fl.prototype.stop=_.fl.prototype.stop;_.fl.prototype.fullBox=_.fl.prototype.$;_.fl.prototype.box=_.fl.prototype.L;_.fl.headerSize=_.al;var bs=0,cs=1;var ds=class{};_.z("clpp.utils.FairplayUtils",ds);ds.parseFairPlayResponse=_.kl;ds.formatFairPlayRequest=_.jl;ds.createFairplayPayload=il;ds.extractContentId=_.el;ds.extractExtXKeyUri=bl;var ql=new _.R("clpp.drm.DrmToday"),Dl="PRODUCTION",El="STAGING",Fl="TEST",es={PRODUCTION:Dl,STAGING:El,TEST:Fl};_.z("clpp.drm.DrmToday.Environment",es);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
383
- var ml="/license-proxy-widevine/cenc/",nl="/license-proxy-headerauth/drmtoday/RightsManager.asmx",ol="/license-server-fairplay/",Gl={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",3E4:"General DRM error",4E4:"General Widevine Modular error",40001:"Widevine Device Certificate Revocation (wv 127)",40002:"Widevine Device Certificate Revocation - Permanently (wv 175)",41E3:"General Widevine Classic error",42E3:"General Playready error",
384
- 43E3:"General Fairplay error",44E3:"General OMA error",44001:"OMA Device registration failed",45E3:"General CDRM error",45001:"CDRM Device registration failed",6E4:"CSL",60001:"CSL - INVALID",60100:"CSL - Denied by Stream Limiting",7E4:"General Output Protection",70001:"All keys filtered by EOP settings",8E4:"TAKE DOWN",80001:"TAKE DOWN - Denied by Take Down",9E4:"General GBL error",90001:"License delivery prohibited in your region"},fs=[Ta,Wa,Va,_.zb,_.yb],gs=[_.zb,_.yb],hs=["3000","2000","150"],
385
- is=["2000","150"];
386
- for(const a of Object.keys(es)){let b=ua;a!==Dl&&(b+=`_${a}`);const c=new _.as(b);let d=null;switch(a){case Dl:d=Lk("V1_PROD");break;case El:d=Lk("V2");break;case Fl:d=null}c.Ma(_.rd,{licenseUrl:pl(_.rd,a),videoRobustness:fs,audioRobustness:gs,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.sl,licenseResponse:_.tl}});c.Ma(_.nd,{licenseUrl:pl(_.nd,a),certificateUrl:ll(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.vl,licenseResponse:_.wl,
387
- extractContentId:_.xl,certificateRequest:_.yl}});c.Ma(_.pd,{licenseUrl:pl(_.pd,a),videoRobustness:hs,audioRobustness:is,modifiers:{licenseRequest:Cl}});_.Hk(c)};var js=class{};_.z("clpp.drm.eme.EmeFactory",js);var Il=[];js.Apis={STANDARD:xb,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var Ql,ks,Pl;_.Yl=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];Ql=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];ks=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};Pl=class extends ks{};_.Xl=class extends ks{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.h=c;this.l=f}};var $l=!!(performance&&performance.mark&&performance.measure);var ym=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.fl).$("pssh",this.j.bind(this)).parse(a.buffer);0==this.a.length&&_.C("No pssh box found!")}j(a){if(1<a.version)_.C("Unrecognized PSSH version found!");else{var b=_.ii(_.Vk(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.ii(_.Vk(a.reader,16));c.push(f)}}d=_.P(a.reader);a.reader.skip(d);this.h.push.apply(this.h,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});a.reader.getPosition()!=
388
- a.reader.Ca()&&_.C("Mismatch between box size and data size!")}}};var um,ls;
389
- _.An=class{constructor(a){this.D=a;this.J=new Set;this.A=this.G=this.l=null;this.R=!1;this.a=null;this.H=ls;this.w=new _.ir;this.K=new $r;this.f=new Map;this.I=[];this.F=new _.wm;this.h=null;this.U=b=>{this.o=!0;this.B=!1;this.F.reject(b);a.onError(b)};this.j=new Map;this.W=new Map;this.T=new _.mj(()=>nm(this));this.ra=!1;this.aa=new _.wm;this.C=!1;this.V=[];this.ba=!1;this.N=0;this.g=new _.R("clpp.drm.DrmEngine");this.Z=(new _.mj(()=>{om(this)})).bb(1);this.F.catch(()=>{});this.o=this.B=!1;this.M=
390
- null}destroy(){const a=this;return _.x(function*(){a.ra?yield a.aa:(a.ra=!0,yield pm(a),a.aa.resolve())})}keySystem(){return this.a?_.em(this.a.keySystem):""}getDrmInfo(){return this.a}la(a){const b=this;return _.x(function*(){if(!b.C||b.H!==um){var c=Math.floor(a.timeStamp),d=`drm.msg.${c}.start`,e=`drm.msg.${c}.end`;_.am(d);!b.h.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.ba?yield Dm(b,a):b.V.push(a);_.am(e);_.bm(`drm.sess.msg.${c}`,d,e)}})}ea(a){const b=a.target;this.g.info("Key status changed for session",
391
- b.sessionId);const c=this.f.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f==_.vf){var g=f;f=e;e=g}if(dm(this.a.keySystem)&&16===f.byteLength&&_.oj()){g=_.Oh(f);const k=g.getUint32(0,!0),l=g.getUint16(4,!0),m=g.getUint16(6,!0);g.setUint32(0,k,!1);g.setUint16(4,l,!1);g.setUint16(6,m,!1)}c&&e!==tf&&(c.loaded=!0);c&&c.Fa&&c.Fa.resolve();"expired"===e&&(d=!0);f=_.J(f);let h=_.ii(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.nd)&&16!==f.byteLength&&(h=Qh(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):
392
- this.g.info(`Key status global keys: ${e}`);this.j.set(f,e);c&&!c.keyId&&this.f.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.Ta.forEach(e=>{this.j.get(e)===tf&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.Ee))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.j.get(e.keyId)===tf&&_.ji(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,
393
- _.Ee))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.ob&&(this.g.debug("Session has expired",b.sessionId),(a=this.f.get(b))&&a.qc&&a.qc.stop(),this.f.delete(b),b.close().catch(()=>{}));Mm(this)&&(this.F.resolve(),1!==this.f.size||d?this.T.ca(.5):nm(this))}};um=0;ls=3;_.Tm=new Map;_.Um=new _.R("clpp.text");var ms=class{constructor(){this.a=null;this.f=[]}};var ns=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.os=class{constructor(){this.f=this.o=this.A=this.C=this.j=this.l=this.h=this.w=NaN;this.a=new ms;this.B=new ns}getStats(){return{width:this.w,height:this.h,streamBandwidth:this.o,decodedFrames:this.j,droppedFrames:this.l,corruptedFrames:this.C,estimatedBandwidth:this.f,loadLatency:this.A,playTime:Ym(this.a,_.rn),pauseTime:Ym(this.a,_.qn),bufferingTime:Ym(this.a,_.jn),stateHistory:Zm(this.a),switchHistory:$m(this.B)}}};_.ps=class{constructor(a){this.f=a;this.a=void 0}value(){void 0==this.a&&(this.a=this.f());return this.a}};var bn=new _.ps(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.he],[HTMLMediaElement.HAVE_CURRENT_DATA,_.ge],[HTMLMediaElement.HAVE_FUTURE_DATA,Nc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Oc]]));var rs=class{constructor(a){this.g=new _.R("clpp.StateManager");this.m=a;this.a=new _.ir;this.f=_.on;this.A=_.qs;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.l=this.F=!1;this.G=0;this.h=null;this.J=0;this.M=_.Aj();this.C=!1;this.I=Date.now();gn(this)}Sb(a,b){this.m&&this.m.trigger(new _.F(a,{detail:b}))}getState(){return kn(this,"")}U(a){(a=a&&a.detail)&&a.severity&&a.severity===_.G&&en(this,_.nn)}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.z("clpp.utils.media.detectType",sn);var vn=new _.R("clpp.sources");var ss=class extends _.Zr{constructor(){super(hd);this.A=this.H=!1;this.l=this.B=this.o=this.a=this.j=null;this.h=new _.ir;this.G=this.F=this.f=this.I=null}init(a,b){super.init(a,b);this.j=new rs(this);en(this.j,_.on)}namespace(){return hd}unload(){const a=this;return _.x(function*(){if(a.w){a.log.debug(_.vb,a.w);a.F&&(a.F.stop(),a.F=null);const b=a.getTrackManager();b&&b.release();a.B&&(a.B.destroy(),a.B=null);a.M&&(a.M.destroy(),a.M=null);a.l&&a.l.release();a.o&&(a.o.destroy(),a.o=null);_.Ug(a.h);
394
- a.f&&(a.f=new _.os);a.G=null;a.w=null;a.H=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield xn(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&en(this.j,_.on)})}destroy(){if(this.A)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.A=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(wa);const a=this.getTrackManager();a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
395
- b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}detach(){}getTrackManager(){return this.Tb}load(a){const b=this;return _.x(function*(){if(b.A)return wn();if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.C.getMedia();b.I=Date.now()/1E3;b.f=new _.os;b.h.on(b,_.sf,()=>{b.f&&_.Xm(b.f.a,b.getState())});en(b.j,_.pn);b.w=_.un(a);_.qk(a)&&(b.configuration=_.pk(b.uc,
396
- a));b.log.debug(_.bb,b.configuration);b.log.debug(_.pb,b.w);const d=_.Wm(b.configuration,[_.Td,"native"]);b.M=d.create(b);b.M.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.sk(_.yf)&&!_.Cj()&&(b.B=new wr(b),b.B.start(c));b.l?b.l.release():b.l=new jr(b);dh(b.l,c);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.B(b.configuration.volume)||b.setVolume(b.configuration.volume);_.B(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(c,Nc,()=>{b.trigger(new _.F(_.Ur))});null==
397
- b.configuration.startTime&&Fn(b,c);try{yield zn(b,c),yield Bn(b),yield En(b).P}catch(e){b.H=!1,b.onError(e)}})}onError(a){this.H||(a.severity===_.G&&null!==this.j&&en(this.j,_.nn),this.trigger(new _.F(_.Nd,{detail:a})))}wf(){return new T}getState(){return null!==this.j?this.j.getState().currentState:_.qs}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?(this.log.warn("EXT-X-PROGRAM-DATETIME required to get presentation start time as Date!"),
398
- null):a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.G=a={start:a.start(0),end:a.end(a.length-1)};if(this.G)return this.G}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.an();this.f&&_.Xm(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.w=a.videoWidth;b.h=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,
399
- b=Number(c.totalVideoFrames),a.l=Number(c.droppedVideoFrames),a.j=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ka())a.bandwidth&&(this.f.o=a.bandwidth),a.Ic&&(this.f.f=a.Ic);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}};
400
- _.Sg(new class{a(){return hd}canPlay(a,b){a=a.type||"";const c=a===_.sc,d=a===_.Bc,e=a===_.hk;var f;_.zj()||c||d||e&&!_.Aj()?f=0:f=""!==nj().canPlayType(a)?e&&_.Aj()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}create(){return new ss}});_.z("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.z("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1});_.z("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var Hn=new _.R("clpp.ads"),Gn=[];_.z("clpp.utils.dom.createHTMLElement",_.On);var ts=class{constructor(a){this.a=null;this.h=new Set;this.f=null;this.set(a||null)}set(a){this.h.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=Pn(this,a)}get(){return this.a}};var ws=class{constructor(a,b){this.g=new _.R("clpp.PlayerSurface");this.w=_.ug(us,b);this.f=new ts;this.h=null;this.a=new ts;this.l=vs;vs+=1;this.o=`clpp-video-${this.l}`;this.j=new _.ir;if(null==a)throw new _.H(_.G,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.H(_.G,7,7004,"Media element not found");b=this.w;this.g.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.h=a;else{if(!(a instanceof
401
- HTMLMediaElement))throw new _.H(_.G,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.g.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.f.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.H(_.G,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.zd);a.parentNode?a.parentNode.replaceChild(c,
402
- a):this.g.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.Mn(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.xf);for(d of[_.hg,_.Rd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.qj()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),Qn(this.a,"clpp-container"),
403
- Qn(this.a,this.o),Qn(this.f,_.Xc),Qn(this.f,"clpp-video"));b.webOSStartupPatch&&Rn(this,a,d)}}getMedia(){return this.f.get()}getContainer(){return this.a.get()}getSafeContainer(){return this.a}getId(){return this.l}getUniqueCssClass(){return this.o}getCastElement(){return this.h}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.Mn(a,Yc):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(Yc):
404
- this.g.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.Mn(a,_.Xc);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)}removeElementFromContainer(a){const b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)}hide(a){_.Mn(a,Yc)}show(a){a.classList.remove(Yc)}release(){this.j.release()}};
405
- ws.prototype.removeElementFromContainer=ws.prototype.removeElementFromContainer;ws.prototype.addElementToContainer=ws.prototype.addElementToContainer;ws.prototype.getCastElement=ws.prototype.getCastElement;ws.prototype.getContainer=ws.prototype.getContainer;ws.prototype.getMedia=ws.prototype.getMedia;var us={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},vs=1;var xs=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.ir;this.h=null;this.f=!0;Vn(this)}release(){this.a.release();Wn(this);this.m=null}};_.z("clpp.polyfill.installAll",Zn);var Yn=[];_.z("clpp.polyfill.register",_.$n);var bo=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.Rh(_.gi(a)));this.a=JSON.parse(_.Rh(_.gi(b)));this.j=c}verify(a,b){const c={kty:"RSA",n:a.n,e:a.e},d=this.h+"."+this.f,e=this.j;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.Vh(d),n=_.gi(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(Bb)}).catch(g)}else b?
406
- g("Web Crypto API is not supported"):f()})}};var ys={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},lk="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var to=class{constructor(a){this.license=a;this.a=null;this.g=new _.R("clpp.utils.LicenseKey")}verify(){return(new Promise((a,b)=>{try{const c=co(this);a(c)}catch(c){b()}})).then(a=>a.verify(ys)).catch(a=>{if(a&&a!==Bb){{var b=window.location.href;const c=new _.sh(b);b=c.Ya||c.Ja?c:new _.sh("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Ja))return Promise.resolve()}throw a;})}},oo="vod",no="live";var Q=class extends _.Wr{constructor(a,b,c){super();Zn();this.g=new _.R("clpp.Player");if(!a)throw new _.H(_.G,7,7102);this.A=new _.ir;this.f=this.N=b||_.nk();this.l=null;void 0===this.f.license&&(this.f.license=lk,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.H(_.G,7,7101,"No license provided in configuration!");this.h=new ws(a,c);this.a=this.w=null;
407
- this.B=new _.po;this.j=null;this.J=[];this.K={};this.o=null;this.H=!0;this.I=this.G=!1;this.F=this.sc=null;this.Od=!1;this.T=new xs(this);this.M=!1;this.C=d=>{(d=d.detail)&&d.currentState===_.rn&&(this.off(_.sf,this.C),uo(this))};this.on(_.sf,()=>{this.getState()===_.nn&&this.unload()});this.on(_.pc,this.R.bind(this));this.on(_.oc,this.R.bind(this));vo(this,this.f.license);this.h.getMedia()&&(a=this.h.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
408
- void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of ro)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}xo(this,a);xk(this)}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,b)}init(){}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.F(_.Nd,{detail:a}),this.trigger(a)}bc(a){a=this.K[a];
409
- void 0===a&&(a=null);return a}getSurface(){return this.h}getConfiguration(){return _.vg(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}unload(){return this.a?this.a.unload():Promise.resolve()}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=zo(this);return this.l.finally(()=>{this.g.debug("Player released");this.l=null})}destroy(){if(this.G)return this.g.debug("The player is already destroyed. No-op"),
410
- new Promise(a=>a());this.G=!0;return this.release().then(()=>{this.g.debug(wa);this.trigger(new _.F("destroying"));return _.wo(this,_.ye)}).then(()=>{this.a&&this.a.removeDelegate(this);this.Nc.clear();this.T.release();if(this.a)return this.a.destroy()}).then(()=>this.B.destroy()).then(()=>{Ak();this.a=null;this.trigger(new _.F("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.am(Pe),yield _.Fo(b,a),yield _.Go(b),yield _.Io(b),_.am(Oe),_.bm("player.load",Pe,Oe)}catch(c){if(b.l)throw b.g.info("Load interrupted while a player release is pending"),
411
- new _.H(_.G,7,7E3);throw c;}})}preload(a){const b=this;return _.x(function*(){yield _.Fo(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(rb)}else b.g.warn(ob)})}use(a){(a=Bk(a))&&a.o(this)}remove(a){return(this.getState()<=_.on||this.H)&&null!==vk(a)?(Ck(a),this.I=!0):!1}play(){return this.a?this.j&&this.a.namespace()!==_.dd?this.j.start(this.a):this.a.play():Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?this.a.pause():
412
- Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.Vr}getState(){return this.a?this.a.getState():_.on}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&this.a.isEnded()||!1}isPaused(){return this.a&&this.a.isPaused()||!1}getPosition(){return this.a?this.a.getPosition():0}seek(a){return this.getState()===_.nn?Promise.reject("Cannot seek in current state."):
413
- this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}yc(){const a=this.a;return a&&a.yc?a.yc():null}getVolume(){return this.a?this.a.getVolume():null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.j}namespace(){return this.a&&this.a.namespace()||"Undefined"}canPlay(a,b){return this.a?
414
- this.a.canPlay(a,b):0}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a,b){this.a&&this.a.setPlaybackRate(a,b)}isMuted(){return this.a&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.B}setNetworkEngine(a){this.B=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}rd(){return Object.freeze(this.o)}setSourceIndex(a){this.a&&this.a.setSourceIndex(a)}getSourceIndex(){return this.a?
415
- this.a.getSourceIndex():-1}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}pd(){return this.a?this.a.pd():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.sc=a;Do(this)}setCdnErrorCallback(a){this.F=a;this.a&&this.a.setCdnErrorCallback(this.F)}R(){this.Od=!0}};_.z("clpp.Player",Q);Q.registerPlugin=_.so;Q.prototype.setCdnErrorCallback=Q.prototype.setCdnErrorCallback;
416
- Q.prototype.setDrmCustomDataModifier=Q.prototype.setDrmCustomDataModifier;Q.prototype.resetAbr=Q.prototype.resetAbr;Q.prototype.getTimelineCues=Q.prototype.getTimelineCues;Q.prototype.getLoadedSource=Q.prototype.getLoadedSource;Q.prototype.getSources=Q.prototype.rd;Q.prototype.getStats=Q.prototype.getStats;Q.prototype.isLive=Q.prototype.isLive;Q.prototype.getTextDisplayer=Q.prototype.getTextDisplayer;Q.prototype.setNetworkEngine=Q.prototype.setNetworkEngine;Q.prototype.getNetworkEngine=Q.prototype.getNetworkEngine;
417
- Q.prototype.setMuted=Q.prototype.setMuted;Q.prototype.isMuted=Q.prototype.isMuted;Q.prototype.setPlaybackRate=Q.prototype.setPlaybackRate;Q.prototype.getPlaybackRate=Q.prototype.getPlaybackRate;Q.prototype.namespace=Q.prototype.namespace;Q.prototype.getAdsManager=Q.prototype.getAdsManager;Q.prototype.getDuration=Q.prototype.getDuration;Q.prototype.setVolume=Q.prototype.setVolume;Q.prototype.getVolume=Q.prototype.getVolume;Q.prototype.getTimelineOffset=Q.prototype.yc;Q.prototype.getSeekRange=Q.prototype.getSeekRange;
418
- Q.prototype.getPresentationStartTime=Q.prototype.getPresentationStartTime;Q.prototype.seek=Q.prototype.seek;Q.prototype.getPosition=Q.prototype.getPosition;Q.prototype.isPaused=Q.prototype.isPaused;Q.prototype.isEnded=Q.prototype.isEnded;Q.prototype.getState=Q.prototype.getState;Q.prototype.getBufferInfo=Q.prototype.getBufferInfo;Q.prototype.getTrackManager=Q.prototype.getTrackManager;Q.prototype.pause=Q.prototype.pause;Q.prototype.play=Q.prototype.play;Q.prototype.remove=Q.prototype.remove;
419
- Q.prototype.use=Q.prototype.use;Q.prototype.load=Q.prototype.load;Q.prototype.destroy=Q.prototype.destroy;Q.prototype.release=Q.prototype.release;Q.prototype.getDrmInfo=Q.prototype.getDrmInfo;Q.prototype.getConfiguration=Q.prototype.getConfiguration;Q.prototype.getSurface=Q.prototype.getSurface;Q.prototype.getPlugin=Q.prototype.bc;Q.prototype.off=Q.prototype.off;Q.prototype.one=Q.prototype.one;Q.prototype.on=Q.prototype.on;_.on=0;_.pn=1;_.jn=2;_.rn=3;_.qn=4;_.fn=5;_.nn=6;_.qs=7;
420
- _.mn={IDLE:_.on,PREPARING:_.pn,BUFFERING:_.jn,PLAYING:_.rn,PAUSED:_.qn,ENDED:_.fn,ERROR:_.nn,UNSET:_.qs};Q.State=_.mn;var ro=[];var zs=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,ed:!0,ready:Promise.resolve()}));this.g=new _.R("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.ed)}get(){const a=this;return _.x(function*(){const b=a.a.find(c=>c.ed);if(!b)throw Error("No available players in the pool");b.ed=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.ed=!0;b.ready=new Promise(c=>{a.unload().catch(d=>{this.g.error("Failed to unload player",
421
- d)}).then(c)});return b.ready}destroy(){const a=this;return _.x(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};var As=class extends _.Wr{constructor(a){super();this.w=_.ug({transition:_.Fe,preloadMedia:!1},a);this.h=[];this.a=0;const b=Ko(a.anchorId);this.o=new zs(b);this.f=null;this.j=!1;this.l=new Map;this.A=a.toggleVisible;this.g=new _.R(id);this.o.a.forEach(c=>Lo(this,c.player,!1))}Pc(){return this.f}tb(){return this.f?this.f.player:null}Xe(){return this.l.get(this.a+1)||null}Ye(){return this.l.get(this.a-1)||null}Td(){return[this.Ye(),this.Xe()].filter(Boolean)}Vg(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
422
- this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve()}))}Ug(a){if(0===this.h.length)throw Error(ib);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}Ac(){return this.a<this.h.length-1}af(){return 0<this.a}Kg(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play first item while busy");else if(0===a.h.length)a.g.warn(ib);else{a.j=!0;a.g.info(`First (index: ${a.a})`);var b=a.h[a.a];try{a.g.info(`First loading (index: ${a.a})`),
423
- yield No(a,b),a.g.info(`First playing (index: ${a.a})`)}catch(c){throw a.g.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,Ro(a)}}})}Lg(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.Ac()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.w.transition===_.Fe&&b.player.pause();Vo(a,a.a+-2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Next loading (index: ${a.a})`),yield So(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
424
- d;}finally{a.j=!1,b&&Uo(a,b),Ro(a)}}else a.g.warn("There are no more items in the playlist")})}Mg(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.af()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.w.transition===_.Fe&&b.player.pause();Vo(a,a.a+2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Previous loading (index: ${a.a})`),yield So(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
425
- d;}finally{a.j=!1,b&&Uo(a,b),Ro(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield Promise.all([Wo(a),a.f?Uo(a,a.f):Promise.resolve()]);yield Xo(a)})}};_.z(id,As);As.prototype.destroy=As.prototype.destroy;As.prototype.playPrev=As.prototype.Mg;As.prototype.playNext=As.prototype.Lg;As.prototype.playFirst=As.prototype.Kg;As.prototype.hasPrev=As.prototype.af;As.prototype.hasNext=As.prototype.Ac;
426
- As.prototype.setIndex=As.prototype.Ug;As.prototype.setItems=As.prototype.Vg;As.prototype.getPreloading=As.prototype.Td;As.prototype.getPrev=As.prototype.Ye;As.prototype.getNext=As.prototype.Xe;As.prototype.getCurrentPlayer=As.prototype.tb;As.prototype.getCurrent=As.prototype.Pc;var To="preload",Mo=_.je;var Bs=class extends _.Wr{constructor(a){super();this.o=_.ug({Cg:2},a);this.j=[];const b=Yo(a.anchorEl,this.o.Cg+1,this.o.bg);this.l=new zs(b);this.a=null;this.h=!1;this.f=new Map;this.A=!1;this.w=a.toggleVisible;this.g=new _.R("clpp.interstitial.MultiController");this.l.a.forEach(c=>Zo(this,c.player,!1))}getCurrentItem(){return this.a}tb(){return this.a?this.a.player:null}Td(){return Array.from(this.f.values())}dd(a){this.g.info("Add items",a);this.j=this.j.concat(a.map(b=>Object.assign({},b,{state:"idle",
427
- Zb:[],preloadPromise:Promise.resolve(),Wc:Promise.resolve()})))}removeItems(a){this.g.info("Remove items",a);a?this.j=this.j.filter(b=>!a.includes(b.id)):this.j=[]}Ac(){return 0<this.f.size}play(a){const b=this;return _.x(function*(){if(b.h)b.g.warn(`Cannot play item while busy (ID: ${a})`);else{var c=b.getItem(a);if(c){b.g.info(`Play item (ID: ${a})`);b.h=!0;var d=b.a;d&&d.player.pause();var e=b.f.has(a);e&&b.f.delete(a);try{b.g.info(`Item loading (ID: ${a})`),e?yield cp(b,c):yield ep(b,c),c.ic&&
428
- c.ic(),b.trigger(new _.F(Wd,{detail:c})),fp(b,c),b.g.info(`Item playing (ID: ${a})`)}catch(f){throw b.g.error(`Item failed (ID: ${a})`),f;}finally{b.h=!1,d&&hp(b,d),jp(b),lp(b,c.next)}}else b.g.warn(`Item not found (ID: ${a})`)}})}load(a){const b=this;return _.x(function*(){if(b.h)b.g.warn(`Cannot load item while busy (ID: ${a})`);else{var c=b.getItem(a);if(c){b.g.info(`Load item (ID: ${a})`);b.h=!0;var d=b.a;d&&d.player.pause();var e=b.f.has(a);e&&b.f.delete(a);try{b.g.info(`Item loading (ID: ${a})`),
429
- e?b.g.error("Loading preloaded items is not supported"):yield dp(b,c),b.trigger(new _.F(Wd,{detail:c})),fp(b,c),b.g.info(`Item loaded (ID: ${a})`)}catch(f){throw b.g.error(`Item failed (ID: ${a})`),f;}finally{b.h=!1,d&&hp(b,d),jp(b),lp(b,c.next)}}else b.g.warn(`Item not found (ID: ${a})`)}})}getItem(a){return this.j.find(b=>b.id===a)||null}release(){const a=this;return _.x(function*(){yield Promise.all([jp(a),a.a?hp(a,a.a):Promise.resolve()]);a.a=null;a.h=!1;a.removeItems();ap(a,!0)})}destroy(){const a=
430
- this;return _.x(function*(){a.g.info("Destroy");yield a.release();yield mp(a)})}};Bs.prototype.destroy=Bs.prototype.destroy;Bs.prototype.release=Bs.prototype.release;Bs.prototype.getItem=Bs.prototype.getItem;Bs.prototype.load=Bs.prototype.load;Bs.prototype.play=Bs.prototype.play;Bs.prototype.hasNext=Bs.prototype.Ac;Bs.prototype.removeItems=Bs.prototype.removeItems;Bs.prototype.addItems=Bs.prototype.dd;Bs.prototype.getPreloading=Bs.prototype.Td;Bs.prototype.getCurrentPlayer=Bs.prototype.tb;
431
- Bs.prototype.getCurrentItem=Bs.prototype.getCurrentItem;var gp="preload",bp=_.je;var Fs=class extends _.Wr{constructor(a){super();this.f=_.ug({prerollMarginSec:.5,resolutionOffsetSec:35},a);this.g=new _.R(gd);this.l=null;this.a=new Bs({bg:this.f.config,anchorEl:a.anchorEl,preloadMedia:!0});ap(this.a,!0);this.a.on(Wd,b=>{const c=b.detail;c.primary&&(this.l=c.player.getDuration());this.trigger(new _.F(Cs,b));pp(this);c.primary&&up(this,c.player)});this.h=[];this.a.on(Ze,b=>{this.trigger(new _.F(Ds,{detail:{player:b.detail.player}}))});this.j=[]}load(a){const b=this;return _.x(function*(){yield wp(b,
432
- a,!1);b.trigger(new _.F(Es));b.a.getCurrentItem().primary&&b.trigger(new _.F(Sp))})}Oc(){const a=this.l;return a?this.j.map(b=>({cueId:b.cueId,startTime:b.startTime,endTime:b.endTime,primaryDuration:a})):[]}Bg(a){const b=this;return _.x(function*(){yield wp(b,a,!0)})}unload(){const a=this;return _.x(function*(){yield a.a.release();a.j=[]})}destroy(){const a=this;return _.x(function*(){yield a.a.destroy()})}eh(){const a=this;return _.x(function*(){yield $o(a.a);a.trigger(new _.F(Es));a.a.getCurrentItem().primary&&
433
- a.trigger(new _.F(Sp))})}getPosition(){const a=this.a.tb();return a?a.getPosition():null}tb(){return this.a.tb()}getCurrentItem(){return this.a.getCurrentItem()}};_.z(gd,Fs);Fs.prototype.getCurrentItem=Fs.prototype.getCurrentItem;Fs.prototype.getCurrentPlayer=Fs.prototype.tb;Fs.prototype.getPosition=Fs.prototype.getPosition;Fs.prototype.unpause=Fs.prototype.eh;Fs.prototype.destroy=Fs.prototype.destroy;Fs.prototype.unload=Fs.prototype.unload;Fs.prototype.loadPaused=Fs.prototype.Bg;
434
- Fs.prototype.getCues=Fs.prototype.Oc;Fs.prototype.load=Fs.prototype.load;var Dp="new",Ep="preparing",Ip="ready",Rp="completed",Jp="failed",Fp="interstitial-preload-started",Gp="x-asset-list-request-started",Kp="x-asset-list-request-ended",Np="interstitial-scheduled",Pp="interstitial-started",Qp="interstitial-ended",Op="interstitial-item-started",Ds="primary-player-changed",Cs="item-changed",Es="playback-started",Sp="primary-started",tp="primary-ended",Bp="cues-changed";var U=class{rb(){}sb(){}yb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}fc(){}Jb(){}getMediaUrl(){}vb(){}ub(){}kb(){}Wa(){}getPodIndex(){}Kb(){}Lb(){}xb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.z("clpp.ads.IAd",U);U.prototype.getWrapperCreativeIds=U.prototype.getWrapperCreativeIds;U.prototype.getWrapperAdSystems=U.prototype.getWrapperAdSystems;U.prototype.getWrapperAdIds=U.prototype.getWrapperAdIds;
435
- U.prototype.getSequenceLength=U.prototype.xb;U.prototype.getPositionInSequence=U.prototype.Lb;U.prototype.getPodTimeOffset=U.prototype.Kb;U.prototype.getPodIndex=U.prototype.getPodIndex;U.prototype.getPodType=U.prototype.Wa;U.prototype.getMediaBitrate=U.prototype.kb;U.prototype.getMediaHeight=U.prototype.ub;U.prototype.getMediaWidth=U.prototype.vb;U.prototype.getMediaUrl=U.prototype.getMediaUrl;U.prototype.getClickThroughUrl=U.prototype.Jb;U.prototype.isBumper=U.prototype.fc;
436
- U.prototype.getSkipTimeOffset=U.prototype.getSkipTimeOffset;U.prototype.getDuration=U.prototype.getDuration;U.prototype.getTitle=U.prototype.getTitle;U.prototype.getAdvertiserName=U.prototype.getAdvertiserName;U.prototype.getAdSystem=U.prototype.getAdSystem;U.prototype.getApiFramework=U.prototype.getApiFramework;U.prototype.getCreativeId=U.prototype.getCreativeId;U.prototype.getId=U.prototype.getId;U.prototype.getTechnology=U.prototype.yb;U.prototype.getAdManagerVersion=U.prototype.sb;
437
- U.prototype.getAdManagerName=U.prototype.rb;var Gs=class{name(){}da(){}create(){}};_.z("clpp.ads.IAdsManagerFactory",Gs);Gs.prototype.create=Gs.prototype.create;Gs.prototype.isSupported=Gs.prototype.da;Gs.prototype.name=Gs.prototype.name;var Hs=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.z("clpp.ads.IAdsManager",Hs);Hs.prototype.getPosition=Hs.prototype.getPosition;Hs.prototype.setVolume=Hs.prototype.setVolume;Hs.prototype.getVolume=Hs.prototype.getVolume;Hs.prototype.skip=Hs.prototype.skip;Hs.prototype.pause=Hs.prototype.pause;Hs.prototype.resume=Hs.prototype.resume;var Is=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.x(function*(){})}};Is.prototype.dispose=Is.prototype.dispose;Is.prototype.getPosition=Is.prototype.getPosition;Is.prototype.setVolume=Is.prototype.setVolume;Is.prototype.getVolume=Is.prototype.getVolume;Is.prototype.skip=Is.prototype.skip;Is.prototype.pause=Is.prototype.pause;Is.prototype.resume=Is.prototype.resume;
438
- Is.prototype.start=Is.prototype.start;Is.prototype.load=Is.prototype.load;var Jn=class{name(){return"clpp.ads.NopAdsManagerFactory"}da(){return!0}create(){return new Is}};Jn.prototype.create=Jn.prototype.create;Jn.prototype.isSupported=Jn.prototype.da;Jn.prototype.name=Jn.prototype.name;var Js=class{getCuePoints(){}Mb(){}lb(){}};_.z("clpp.ads.IAdsTimeline",Js);Js.prototype.hasPostroll=Js.prototype.lb;Js.prototype.hasPreroll=Js.prototype.Mb;Js.prototype.getCuePoints=Js.prototype.getCuePoints;_.Ks=class{f(){}a(){}h(){}o(){}};var Ls=class{constructor(){this.j=null;this.g=new _.R("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}h(a){return this.j?this.j.setMediaKeys(a):Promise.reject(eb)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.g.debug("Requesting media key system access for",a,b.map(c=>Object.assign({},c,{drmInfos:c.drmInfos.map(()=>"_anonymous_")})));return navigator.requestMediaKeySystemAccess(a,b).catch(c=>{c.message&&(c=Error(`${c.message} (keySystem: ${a})`));return Promise.reject(c)})}f(){return xb}};
439
- Jl(new class{a(){return xb}da(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Ls}},1E3);var Ns=class{constructor(){this.size=0;this.a=void 0;this.g=new _.R("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Ms.value())}get(a){if(this.has(a))return this.a}has(a){const b=Ms.value();return this.a&&Jh(a,b)?!0:!1}entries(){}keys(){}values(){}},Ms=new _.ps(()=>Ph(new Uint8Array([0])));var Os=class{l(){}h(a){_.Og("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.Og("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};Jl(new class{a(){return"NOP"}da(){return!0}create(){return new Os}},-1);var Qs=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&Up(b,null);return(this.j=a)?Up(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.Og("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Ps(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Ps=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.nd))for(var c of b){a:{a=c;if(a.persistentState===_.gf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
440
- persistentState:_.Ce,distinctiveIdentifier:_.Ce,initDataTypes:a.initDataTypes,sessionTypes:[zf],label:a.label};let d=!1,e=!1;if(a.audioCapabilities)for(const f of a.audioCapabilities)f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.audioCapabilities.push(f),e=!0));if(a.videoCapabilities)for(const f of a.videoCapabilities)f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),
441
- e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Rf));a=e?b:null}if(a){this.a=a;return}}c=Error(Kb);c.name=mb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Rs(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.Og("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Rs=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.ir;this.j=0;this.g=new _.R(fd);this.g.info("Created Media Keys for "+a)}createSession(a){a=
442
- void 0===a?zf:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==zf)throw new TypeError("Session type "+a+ba);return new Ss(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Ss=class extends _.Wr{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.ir;this.sessionId=b;this.expiration=NaN;this.closed=new _.wm;this.l=!1;this.keyStatuses=new Ns;this.g=new _.R(fd)}generateRequest(a,
443
- b){if(this.l)return Promise.reject(Ab);this.g.debug("generateRequest");this.h=new _.wm;try{const c=this.o.createSession(_.Rf,_.J(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,fg,d=>{{const e=this.keyStatuses.getStatus();this.g.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.F(_.me,{messageType:void 0===e||e===tf?de:$d,message:Ph(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,dg,d=>{this.g.debug("onWebkitKeyAdded_",
444
- d);this.f&&(Vp(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,eg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===tf)this.g.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.g.error(`Received key error in session ${this.sessionId} `+`with code ${this.a.error.code}. `+`Session Status ${d}.`),d=Error("EME AppleEmeManager key error"),d.errorCode=this.a.error,null!==this.h)this.h.reject(d),
445
- this.h=null;else if(null!==this.f)this.f.reject(d),this.f=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Vp(this,"output-not-allowed");break;default:Vp(this,_.Vd)}});Vp(this,tf)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug("load");return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(Ab);this.g.debug(Hf);this.f=new _.wm;try{this.a.update(_.J(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
446
- this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.Ug(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.g.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}};Jl(new class{a(){return"APPLE"}da(){return!!window.WebKitMediaKeys}create(){return new Qs}},1100);var Us=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.Og("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(eb);const b=this.w;b&&b!==a&&Yp(b,null);(this.w=a)&&Yp(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.Og("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.j)var c=this.j;else{var d=document.getElementsByTagName(_.w);c=d.length?d[0]:document.createElement(_.w)}const e=
447
- new Ts(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Ts=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.De&&(this.a=cg,a=!1);let e=!1;for(const g of d){d=[];var f=[];let h=!1;if(g.audioCapabilities)for(const k of g.audioCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType.split(";")[0],this.a)&&(d.push(k),e=!0));if(g.videoCapabilities)for(const k of g.videoCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType,
448
- this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.Rf,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.gf||a||(e=!1);if(e){this.f=g;return}}b=Kb;if(c===_.De||c===_.rd)b="None of the requested configurations were supported.";c=Error(b);c.name=mb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Vs(this.h,this.a))}getConfiguration(){return this.f}},Vs=class{constructor(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.ir;this.j=[];this.l=new Map}createSession(a=
449
- zf){if(a!==zf&&a!==_.He)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ya,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Ws(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Ws=class extends _.Wr{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.h=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.wm;this.keyStatuses=
450
- new Ns}ready(){_.Og("WebkitEmeManager.MediaKeySession.ready");Xp(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.Og("WebkitEmeManager.MediaKeySession.generateRequest");return $p(this,b,null)}load(a){_.Og(Pb);return this.l===_.He?$p(this,null,a):Promise.reject(Error(kb))}update(a){_.Og(Pb);const b=new _.wm;aq(this,b,a);return b}close(){_.Og("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.He){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
451
- this.closed;const a=Zp(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.Og("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.He?Promise.reject(Error(kb)):this.close()}};Jl(new class{a(){return"WEBKIT"}da(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Us}});var Zs=class extends _.as{constructor(a,b,c,d,e){super(Xa);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.R(ed);_.ai(this.l)?this.g.warn(_.Qb):this.Ma(_.rd,{licenseUrl:this.l,videoRobustness:[_.zb,void 0],audioRobustness:[_.yb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Yc.bind(this)}});_.ai(this.j)?this.g.warn(_.nb):this.Ma(_.pd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Yc.bind(this)}});
452
- _.ai(this.h)?this.g.warn(_.Ra):_.ai(this.a)?this.g.warn(_.Qa):this.Ma(_.nd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.jf.bind(this),licenseResponse:this.kf.bind(this),certificateRequest:this.Yc.bind(this),extractContentId:this.Se.bind(this)}})}Yc(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Se(a,b){a=bl(b);switch(this.o){case Xs:return a;case Ys:return(new _.dl(a)).a;default:throw Error("Unknown content ID strategy");}}jf(a,b){b.headers[ra]=
453
- Cc;this.Yc(a,b);a={spc:_.ei(b.body)};b.body=_.Xh(_.Ni(a,!0))}kf(a,b){a=_.Rh(b.data).trim();const c="\x3c/ckc\x3e"===a.substr(-6);"\x3cckc\x3e"===a.substr(0,5)&&c&&(a=a.slice(5,-6));b.data=_.gi(a).buffer}};_.z(ed,Zs);Zs.prototype.onFairPlayLicenseResponse=Zs.prototype.kf;Zs.prototype.onFairPlayLicenseRequest=Zs.prototype.jf;Zs.prototype.extractFairPlayContentId=Zs.prototype.Se;Zs.prototype.onLicenseRequest=Zs.prototype.Yc;Zs.prototype.constructor=Zs.prototype.constructor;Zs.NAME=Xa;
454
- var Ys="hostname",Xs="full-skd";Zs.FairPlayContentIdStrategy={HOSTNAME:Ys,FULL_SKD:Xs};_.z("clpp.drm.HeaderDrmComponent",class extends _.Ks{h(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Xa){a=a.drm.customData;if(!a)throw new _.H(_.G,7,7100,_.td);a=new Zs(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Xs);_.Hk(a)}}a(){delete _.Gk.HeaderDrm}id(){return"headerdrm"}});_.$n(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.J(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.$n(function(){_.Og("mathRound.install")});_.$n(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;Pd in document||(Object.defineProperty(document,Pd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
455
- {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",bq);document.addEventListener("webkitfullscreenerror",bq);document.addEventListener("mozfullscreenchange",bq);document.addEventListener("mozfullscreenerror",bq);document.addEventListener("MSFullscreenChange",bq);document.addEventListener("MSFullscreenError",bq)}});_.$n(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.Og("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=dq,document.exitPictureInPicture=eq,document.addEventListener("webkitpresentationmodechanged",cq,!0))}});_.$n(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=fq)}});_.$n(function(){if(window.VTTCue)_.Ng("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Ng(Lb),window.VTTCue=gq;else if(6===a)_.Ng("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=hq;else{try{var b=!!gq(1,2,"")}catch(c){b=!1}b&&(_.Ng(Lb),window.VTTCue=gq)}}else _.Pg("VTTCue not available.")});var iq;_.$n(function(){_.Og("InputEvent.install");_.pj("Trident/")&&HTMLInputElement.prototype.addEventListener!==jq&&(_.Ng("Patching input event support on IE."),iq=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=jq)});_.$n(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.$n(function(){_.Og("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});var mq=class{constructor(){this.a=kq()}};var $s=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};_.at=class{constructor(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.h.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var bt;_.ct=class{constructor(){this.a=new Blob([bt],{type:_.Rf})}canPlay(a){var b=document.createElement(_.w);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.wm;b=b.play();const d=(new _.mj(()=>{d.stop();c.resolve(a)})).ca(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===mb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
456
- bt=new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,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,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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
391
+ 26,58,164,235,113,177,235,207,22,230,8,119,76,167,166,176,173,209,214,53,116,116,231,227,221,238,174,87,249,19,166,195,81,47,210,172,15,75,251,202,192,80,85,213,23,17,178,104,181,193,115,239,91,72,230,167,55,143,10,250,26,54,8,60,13,213,206,235,3,215,179,205,232,1,144,158,35,48,196,149,117,219,63,196,130,117,40,165,193,65,215,122,44,201,218,67,216,6,131,178,5,168,229,21,137,112,215,254,127,48,160,181,68,49,255,64,46,247,236,85,155,146,208,5,219,252,37,174,31,218,136,135,55,119,112]};_.Ss=class{constructor(a){this.I=a;this.f={}}La(a,b){this.f[a]=b}};_.x("clpp.drm.DrmEnvironment",_.Ss);_.Ss.prototype.setDrmSystem=_.Ss.prototype.La;_.Il=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.Sg(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.g=b;this.buffer=this.f.buffer}getPosition(){return this.a}Aa(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.nl();this.a=a}};_.sm=class{constructor(a,b){this.f=a;this.g=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Aa(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.ql();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.ql();this.a=a}};
392
+ _.x("clpp.utils.dataview.DataViewReader",_.sm);_.Gl=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.Q("clpp.mp4")}M(a,b){a=xl(a);this.g[a]=Ts;this.f[a]=b;return this}ba(a,b){a=xl(a);this.g[a]=Us;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.I(a);a=new _.sm(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.pl(a)&&!this.a;)this.Gd(0,a,b)}Gd(a,b,c){const d=b.getPosition();let e=_.O(b);var f=_.O(b);let g=!1;this.h.debug("Parsing MP4 box",_.yl(f));switch(e){case 0:e=b.Aa()-d;break;case 1:e=_.ul(b),g=!0}const h=
393
+ this.f[f];if(h){let m=null;var k=null;this.g[f]===Us&&(k=_.O(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Aa()&&(l=b.Aa());l-=b.getPosition();b=0<l?_.wl(b,l):new Uint8Array(0);b=new _.sm(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({parser:this,partialOkay:c||!1,version:m,flags:k,reader:b,size:e,start:d+a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.Aa()-b.getPosition()),b.skip(a)}};_.x("clpp.utils.Mp4Parser",_.Gl);_.Gl.typeToString=_.yl;
394
+ _.Gl.allData=_.Bl;_.Gl.sampleDescription=_.Al;_.Gl.children=_.zl;_.Gl.prototype.parseNext=_.Gl.prototype.Gd;_.Gl.prototype.parse=_.Gl.prototype.parse;_.Gl.prototype.stop=_.Gl.prototype.stop;_.Gl.prototype.fullBox=_.Gl.prototype.ba;_.Gl.prototype.box=_.Gl.prototype.M;_.Gl.headerSize=_.Cl;var Ts=0,Us=1;var Vs=class{};_.x("clpp.utils.FairplayUtils",Vs);Vs.parseFairPlayResponse=_.Ll;Vs.formatFairPlayRequest=_.Kl;Vs.createFairplayPayload=Jl;Vs.extractContentId=_.Fl;Vs.extractExtXKeyUri=Dl;var Ul=new _.Q("clpp.drm.DrmToday"),dm="PRODUCTION",em="STAGING",fm="TEST",Ws={PRODUCTION:dm,STAGING:em,TEST:fm};_.x("clpp.drm.DrmToday.Environment",Ws);_.x("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
395
+ var Nl="/license-proxy-widevine/cenc/",Ol="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Sl="/license-server-fairplay/",gm={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",3E4:"General DRM error",4E4:"General Widevine Modular error",40001:"Widevine Device Certificate Revocation (wv 127)",40002:"Widevine Device Certificate Revocation - Permanently (wv 175)",41E3:"General Widevine Classic error",42E3:"General Playready error",
396
+ 43E3:"General Fairplay error",44E3:"General OMA error",44001:"OMA Device registration failed",45E3:"General CDRM error",45001:"CDRM Device registration failed",6E4:"CSL",60001:"CSL - INVALID",60100:"CSL - Denied by Stream Limiting",7E4:"General Output Protection",70001:"All keys filtered by EOP settings",8E4:"TAKE DOWN",80001:"TAKE DOWN - Denied by Take Down",9E4:"General GBL error",90001:"License delivery prohibited in your region"},Xs=[Wa,Ya,Xa,_.Eb,_.Db],Ys=[_.Eb,_.Db],Zs=["3000","2000","150"],
397
+ $s=["2000","150"];
398
+ for(const a of Object.keys(Ws)){let b=wa;a!==dm&&(b+=`_${a}`);const c=new _.Ss(b);let d=null;switch(a){case dm:d=ml("V1_PROD");break;case em:d=ml("V2");break;case fm:d=null}c.La(_.yd,{licenseUrl:Tl(_.yd,a),videoRobustness:Xs,audioRobustness:Ys,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Wl,licenseResponse:_.Xl}});c.La(_.ud,{licenseUrl:Tl(_.ud,a),certificateUrl:Ml(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Zl,licenseResponse:_.$l,
399
+ extractContentId:_.am,certificateRequest:_.bm}});c.La(_.wd,{licenseUrl:Tl(_.wd,a),videoRobustness:Zs,audioRobustness:$s,modifiers:{licenseRequest:cm}});_.il(c)};var at=class{};_.x("clpp.drm.eme.EmeFactory",at);var im=[];at.Apis={STANDARD:Cb,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var qm,bt,pm;_.ym=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];qm=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];bt=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};pm=class extends bt{};_.xm=class extends bt{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.g=c;this.l=f}};var Am=!!(performance&&performance.mark&&performance.measure);var $m=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.Gl).ba("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.B("No pssh box found!")}j(a){if(1<a.version)_.B("Unrecognized PSSH version found!");else{var b=_.Bi(_.wl(a.reader,16)),c=[];if(0<a.version){var d=_.O(a.reader);for(let e=0;e<d;++e){const f=_.Bi(_.wl(a.reader,16));c.push(f)}}d=_.O(a.reader);a.reader.skip(d);this.g.push.apply(this.g,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});
400
+ a.reader.getPosition()!==a.reader.Aa()&&_.B("Mismatch between box size and data size!")}}};var Wm,ct;
401
+ _.bo=class{constructor(a){this.D=a;this.H=new Set;this.A=this.G=this.l=null;this.R=!1;this.a=null;this.I=ct;this.w=new _.as;this.K=new Rs;this.f=new Map;this.J=[];this.F=new _.Ym;this.g=null;this.V=b=>{this.o=!0;this.B=!1;this.F.reject(b);a.onError(b)};this.j=new Map;this.W=new Map;this.T=new _.Nj(()=>Pm(this));this.pa=!1;this.$=new _.Ym;this.C=!1;this.U=[];this.aa=!1;this.N=0;this.h=new _.Q("clpp.drm.DrmEngine");this.X=(new _.Nj(()=>{Qm(this)})).ab(1);this.F.catch(()=>{});this.o=this.B=!1;this.L=
402
+ null}destroy(){const a=this;return _.w(function*(){a.pa?yield a.$:(a.pa=!0,yield Rm(a),a.$.resolve())})}keySystem(){return this.a?_.Fm(this.a.keySystem):""}getDrmInfo(){return this.a}ha(a){const b=this;return _.w(function*(){if(!b.C||b.I!==Wm){var c=Math.floor(a.timeStamp),d=`drm.msg.${c}.start`,e=`drm.msg.${c}.end`;_.Bm(d);!b.g.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.aa?yield en(b,a):b.U.push(a);_.Bm(e);_.Cm(`drm.sess.msg.${c}`,d,e)}})}ea(a){const b=a.target;this.h.info("Key status changed for session",
403
+ b.sessionId);const c=this.f.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===_.Lf){var g=f;f=e;e=g}if(Em(this.a.keySystem)&&16===f.byteLength&&_.Pj()){g=_.gi(f);const k=g.getUint32(0,!0),l=g.getUint16(4,!0),m=g.getUint16(6,!0);g.setUint32(0,k,!1);g.setUint16(4,l,!1);g.setUint16(6,m,!1)}c&&e!==Jf&&(c.loaded=!0);c&&c.Da&&c.Da.resolve();"expired"===e&&(d=!0);f=_.I(f);let h=_.Bi(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.ud)&&16!==f.byteLength&&(h=ii(f));(f=h||"")?this.h.info(`Key status for Key ID '${h}': ${e}`):
404
+ this.h.info(`Key status global keys: ${e}`);this.j.set(f,e);c&&!c.keyId&&this.f.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.Sa.forEach(e=>{this.j.get(e)===Jf&&(this.h.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.Me))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.j.get(e.keyId)===Jf&&_.Ci(e.initData,c.initData)&&(this.h.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,
405
+ _.Me))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.pb&&(this.h.debug("Session has expired",b.sessionId),(a=this.f.get(b))&&a.sc&&a.sc.stop(),this.f.delete(b),b.close().catch(()=>{}));on(this)&&(this.F.resolve(),1!==this.f.size||d?this.T.da(.5):Pm(this))}};Wm=0;ct=3;_.vn=new Map;_.wn=new _.Q("clpp.text");var dt=class{constructor(){this.a=null;this.f=[]}};var et=class{constructor(){this.g=this.f=this.j=null;this.a=[]}};_.ft=class{constructor(){this.f=this.o=this.A=this.C=this.j=this.l=this.g=this.w=NaN;this.a=new dt;this.B=new et}getStats(){return{width:this.w,height:this.g,streamBandwidth:this.o,decodedFrames:this.j,droppedFrames:this.l,corruptedFrames:this.C,estimatedBandwidth:this.f,loadLatency:this.A,playTime:An(this.a,_.Tn),pauseTime:An(this.a,_.Sn),bufferingTime:An(this.a,_.Ln),stateHistory:Bn(this.a),switchHistory:Cn(this.B)}}};_.gt=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var En=new _.gt(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.qe],[HTMLMediaElement.HAVE_CURRENT_DATA,_.pe],[HTMLMediaElement.HAVE_FUTURE_DATA,Uc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Vc]]));var it=class{constructor(a){this.h=new _.Q("clpp.StateManager");this.m=a;this.a=new _.as;this.f=_.Qn;this.A=_.ht;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.g=this.F=!1;this.G=0;this.l=null;this.J=0;this.L=_.bk();this.C=!1;this.I=Date.now();Jn(this)}Ub(a,b){this.m&&this.m.trigger(new _.C(a,{detail:b}))}getState(){return Mn(this,"")}V(a){(a=a&&a.detail)&&a.severity&&a.severity===_.E&&Hn(this,_.Pn)}destroy(){this.h.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.x("clpp.utils.media.detectType",Un);var Xn=new _.Q("clpp.sources");var jt=class extends _.Qs{constructor(){super(od);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.g=new _.as;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new it(this);Hn(this.j,_.Qn)}namespace(){return od}unload(){const a=this;return _.w(function*(){if(a.ca){a.log.debug("Releasing player with source",a.ca);a.B&&(a.B.stop(),a.B=null);const b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.U&&(a.U.destroy(),a.U=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
406
+ a.o=null);_.kh(a.g);a.f&&(a.f=new _.ft);a.F=null;a.ca=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Zn(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&Hn(this.j,_.Qn)})}destroy(){if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(ya);const a=this.getTrackManager();a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
407
+ b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}detach(){}getTrackManager(){return this.Vb}load(a){const b=this;return _.w(function*(){if(b.w)return Yn();if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.C.getMedia();b.H=Date.now()/1E3;b.f=new _.ft;b.g.on(b,_.If,()=>{b.f&&_.zn(b.f.a,b.getState())});Hn(b.j,_.Rn);b.ca=_.Wn(a);b.configuration=_.Qk(b.cb,
408
+ a);b.log.debug(_.eb,b.configuration);b.log.debug(_.wb,b.ca);const d=_.yn(b.configuration,[_.ae,"native"]);b.U=d.create(b);b.U.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Tk(_.Of)&&!_.dk()&&(b.A=new os(b),b.A.start(c));b.l?b.l.release():b.l=new bs(b);uh(b.l,c);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.z(b.configuration.volume)||b.setVolume(b.configuration.volume);_.z(b.configuration.muted)||b.setMuted(b.configuration.muted);b.g.one(c,Uc,()=>{b.trigger(new _.C(_.Ls))});null==
409
+ b.configuration.startTime&&ho(b,c);_.bk()&&io(b,c);try{yield ao(b,c),yield co(b),yield go(b).P}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.E&&null!==this.j&&Hn(this.j,_.Pn),this.trigger(new _.C(_.Vd,{detail:a})))}Nf(){return new S}getState(){return null!==this.j?this.j.getState().currentState:_.ht}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?(this.log.warn("EXT-X-PROGRAM-DATETIME required to get presentation start time as Date!"),
410
+ null):a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.F=a={start:a.start(0),end:a.end(a.length-1)};if(this.F)return this.F}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.Dn();this.f&&_.zn(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.w=a.videoWidth;b.g=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,
411
+ b=Number(c.totalVideoFrames),a.l=Number(c.droppedVideoFrames),a.j=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ka())a.bandwidth&&(this.f.o=a.bandwidth),a.Hc&&(this.f.f=a.Hc);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}};
412
+ _.hh(new class{a(){return od}canPlay(a,b){a=a.type||"";const c=a===_.yc,d=a===_.Dc,e=a===_.Ik;var f;_.ak()||c||d||e&&!_.bk()?f=0:f=""!==Oj().canPlayType(a)?e&&_.bk()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.na}create(){return new jt}});_.x("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.x("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1});_.x("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var ko=new _.Q("clpp.ads"),jo=[];_.x("clpp.utils.dom.createHTMLElement",_.ro);var kt=class{constructor(a){this.a=null;this.g=new Set;this.f=null;this.set(a||null)}set(a){this.g.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=so(this,a)}get(){return this.a}};var nt=class{constructor(a,b){this.h=new _.Q("clpp.PlayerSurface");this.w=_.Kg(lt,b);this.f=new kt;this.g=null;this.a=new kt;this.l=mt;mt+=1;this.o=`clpp-video-${this.l}`;this.j=new _.as;if(null==a)throw new _.G(_.E,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.G(_.E,7,7004,"Media element not found");b=this.w;this.h.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.g=a;else{if(!(a instanceof
413
+ HTMLMediaElement))throw new _.G(_.E,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.h.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.f.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.G(_.E,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Gd);a.parentNode?a.parentNode.replaceChild(c,
414
+ a):this.h.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.po(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Nf);for(d of[_.xg,_.Zd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Rj()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),to(this.a,"clpp-container"),
415
+ to(this.a,this.o),to(this.f,_.dd),to(this.f,"clpp-video"));b.webOSStartupPatch&&uo(this,a,d)}}getMedia(){return this.f.get()}getContainer(){return this.a.get()}getSafeContainer(){return this.a}getId(){return this.l}getUniqueCssClass(){return this.o}getCastElement(){return this.g}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.po(a,ed):this.h.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(ed):
416
+ this.h.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.po(a,_.dd);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)}removeElementFromContainer(a){const b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)}hide(a){_.po(a,ed)}show(a){a.classList.remove(ed)}release(){this.j.release()}};
417
+ nt.prototype.removeElementFromContainer=nt.prototype.removeElementFromContainer;nt.prototype.addElementToContainer=nt.prototype.addElementToContainer;nt.prototype.getCastElement=nt.prototype.getCastElement;nt.prototype.getContainer=nt.prototype.getContainer;nt.prototype.getMedia=nt.prototype.getMedia;var lt={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},mt=1;var ot=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.as;this.g=null;this.f=!0;yo(this)}release(){this.a.release();zo(this);this.m=null}};_.x("clpp.polyfill.installAll",Co);var Bo=[];_.x("clpp.polyfill.register",_.Do);var Fo=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.ji(_.zi(a)));this.a=JSON.parse(_.ji(_.zi(b)));this.j=c}verify(a,b){const c={kty:"RSA",n:a.n,e:a.e},d=this.g+"."+this.f,e=this.j;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.ni(d),n=_.zi(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(Gb)}).catch(g)}else b?
418
+ g("Web Crypto API is not supported"):f()})}};var pt={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Mk="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Wo=class{constructor(a){this.license=a;this.a=null;this.h=new _.Q("clpp.utils.LicenseKey")}verify(){return(new Promise((a,b)=>{try{const c=Go(this);a(c)}catch(c){b()}})).then(a=>a.verify(pt)).catch(a=>{if(a&&a!==Gb){{var b=window.location.href;const c=new _.Jh(b);b=c.Xa||c.Ha?c:new _.Jh("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Ha))return Promise.resolve()}throw a;})}},Ro="vod",Qo="live";var P=class extends _.Ns{constructor(a,b,c){super();Co();this.h=new _.Q("clpp.Player");if(!a)throw new _.G(_.E,7,7102);this.W=new _.as;this.f=this.A=b||_.Ok();this.l=null;void 0===this.f.license&&(this.f.license=Mk,this.h.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.h.error("You provided null or empty string as your license. Please check your license configuration."),new _.G(_.E,7,7101,"No license provided in configuration!");this.g=new nt(a,c);this.a=this.C=null;
419
+ this.F=new _.So;this.j=null;this.T=[];this.U=!0;this.H={};this.X=null;this.L=!0;this.N=this.K=!1;this.I=this.uc=null;this.Td=!1;this.aa=new ot(this);this.on(_.If,()=>{this.getState()===_.Pn&&(this.a?this.a.unload():Promise.resolve())});this.on(_.vc,this.$.bind(this));this.on(_.uc,this.$.bind(this));Xo(this,this.f.license);this.g.getMedia()&&(a=this.g.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.h.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
420
+ void 0===this.f.autoplay&&(this.f.autoplay=!0,this.h.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of Uo)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.h.error("Error while creating player plugin",e)}Zo(this,a);this.J=_.na;Yk(this)}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.C(_.Vd,{detail:a}),this.trigger(a)}bc(a){a=
421
+ this.H[a];void 0===a&&(a=null);return a}getSurface(){return this.g}getConfiguration(){return _.Lg(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.h.info("Player release already in progress"),this.l;this.h.debug("Releasing player");this.l=bp(this);return this.l.finally(()=>{this.h.debug("Player released");this.l=null})}destroy(){if(this.K)return this.h.debug("The player is already destroyed. No-op"),
422
+ new Promise(a=>a());this.K=!0;return this.release().then(()=>{this.h.debug(ya);this.trigger(new _.C("destroying"));return _.Yo(this,_.Ge)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.Mc.clear();this.aa.release();if(this.a)return this.a.destroy()}).then(()=>this.F.destroy()).then(()=>{al();this.a=null;this.trigger(new _.C("destroyed"))})}load(a){const b=this;return _.w(function*(){try{_.Bm(Ze);b.J=_.na;b.U=!0;const c=_.Wn(a);yield _.jp(b,Rk(a)?a:{},c);yield _.kp(b);yield _.mp(b);_.Bm(Ye);
423
+ _.Cm("player.load",Ze,Ye)}catch(c){if(b.l)throw b.h.info(db),new _.G(_.E,7,7E3);throw c;}})}preload(a){const b=this;return _.w(function*(){yield _.jp(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.h.warn(yb)}else b.h.warn(vb)})}use(a){(a=bl(a))&&a.o(this)}remove(a){return(this.getState()<=_.Qn||this.L)&&null!==Wk(a)?(dl(a),this.N=!0):!1}play(){return this.a?this.j&&this.a.namespace()!==_.kd?this.j.start(this.a):this.a.play():Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?
424
+ this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.Ms}getState(){return this.a?this.a.getState():_.Qn}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&this.a.isEnded()||!1}isPaused(){return this.a&&this.a.isPaused()||!1}getPosition(){return this.a?this.a.getPosition():0}seek(a){return this.getState()===
425
+ _.Pn?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}cc(){const a=this.a;return a&&a.cc?a.cc():null}getVolume(){return this.a?this.a.getVolume():null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.j}namespace(){return this.a&&
426
+ this.a.namespace()||"Undefined"}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a,b){this.a&&this.a.setPlaybackRate(a,b)}isMuted(){return this.a&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.F}setNetworkEngine(a){this.F=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}lf(){return Object.freeze(this.X)}getLoadedSource(){return this.a&&
427
+ this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}td(){return this.a?this.a.td():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.uc=a;hp(this)}setCdnErrorCallback(a){this.I=a;this.a&&this.a.setCdnErrorCallback(this.I)}$(){this.Td=!0}};_.x("clpp.Player",P);P.registerPlugin=_.Vo;P.prototype.setCdnErrorCallback=P.prototype.setCdnErrorCallback;P.prototype.setDrmCustomDataModifier=P.prototype.setDrmCustomDataModifier;P.prototype.resetAbr=P.prototype.resetAbr;
428
+ P.prototype.getTimelineCues=P.prototype.getTimelineCues;P.prototype.getLoadedSource=P.prototype.getLoadedSource;P.prototype.getSources=P.prototype.lf;P.prototype.getStats=P.prototype.getStats;P.prototype.isLive=P.prototype.isLive;P.prototype.getTextDisplayer=P.prototype.getTextDisplayer;P.prototype.setNetworkEngine=P.prototype.setNetworkEngine;P.prototype.getNetworkEngine=P.prototype.getNetworkEngine;P.prototype.isMuted=P.prototype.isMuted;P.prototype.setPlaybackRate=P.prototype.setPlaybackRate;
429
+ P.prototype.getPlaybackRate=P.prototype.getPlaybackRate;P.prototype.namespace=P.prototype.namespace;P.prototype.getAdsManager=P.prototype.getAdsManager;P.prototype.getDuration=P.prototype.getDuration;P.prototype.setVolume=P.prototype.setVolume;P.prototype.getVolume=P.prototype.getVolume;P.prototype.getTimelineOffset=P.prototype.cc;P.prototype.getSeekRange=P.prototype.getSeekRange;P.prototype.getPresentationStartTime=P.prototype.getPresentationStartTime;P.prototype.seek=P.prototype.seek;
430
+ P.prototype.getPosition=P.prototype.getPosition;P.prototype.isPaused=P.prototype.isPaused;P.prototype.isEnded=P.prototype.isEnded;P.prototype.getState=P.prototype.getState;P.prototype.getBufferInfo=P.prototype.getBufferInfo;P.prototype.getTrackManager=P.prototype.getTrackManager;P.prototype.pause=P.prototype.pause;P.prototype.play=P.prototype.play;P.prototype.remove=P.prototype.remove;P.prototype.use=P.prototype.use;P.prototype.load=P.prototype.load;P.prototype.destroy=P.prototype.destroy;
431
+ P.prototype.release=P.prototype.release;P.prototype.getDrmInfo=P.prototype.getDrmInfo;P.prototype.getConfiguration=P.prototype.getConfiguration;P.prototype.getSurface=P.prototype.getSurface;P.prototype.getPlugin=P.prototype.bc;P.prototype.off=P.prototype.off;P.prototype.one=P.prototype.one;P.prototype.on=P.prototype.on;_.Qn=0;_.Rn=1;_.Ln=2;_.Tn=3;_.Sn=4;_.In=5;_.Pn=6;_.ht=7;_.On={IDLE:_.Qn,PREPARING:_.Rn,BUFFERING:_.Ln,PLAYING:_.Tn,PAUSED:_.Sn,ENDED:_.In,ERROR:_.Pn,UNSET:_.ht};P.State=_.On;
432
+ var Uo=[];var qt=class extends P{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.A=_.Kg(this.A,a);this.f=_.Kg(this.f,a);this.B=0;this.o=[];this.R=!1;this.w=null;this.G=[]}open(a,b){const c=this;return _.w(function*(){if(c.w)throw new _.G(_.E,7,7008,`Cannot call open() while ${c.w}() is ongoing!`);if(0!==a)throw new _.G(_.E,7,7007,"The index parameter only supports the value of 0.");
433
+ if(0===b.length)throw new _.G(_.E,7,7003,mb);if(b.some(g=>!g.id||!g.source))throw new _.G(_.E,7,7100,"Some config is missing required properties `id` or `source`!");if((new Set(b.map(g=>g.id))).size!==b.length)throw new _.G(_.E,7,7100,"Some config contains a non-unique property `id`!");const d=b[0].playlist;if(d){var e=d.timeline,f=["flat","basic"];if(e&&!f.includes(e))throw new _.G(_.E,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.r||0>e))throw new _.G(_.E,
434
+ 7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.r||0>f||null!=e&&f<=e))throw new _.G(_.E,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.G(_.E,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{pp(c),c.w="open",yield sp(c,b),c.B=0,c.o=b,c.R=!0,tp(c,b[0].playlist||{})}finally{c.w=null}})}$f(a){const b=this;return _.w(function*(){if(b.w)throw new _.G(_.E,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
435
+ if(!b.R)throw new _.G(_.E,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.G(_.E,7,7100,"The config is missing required properties `id` or `source`!");if((new Set(b.o.map(c=>c.id))).has(a.id))throw new _.G(_.E,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield up(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.B]||null}getCurrentItemIndex(){return this.B}Bg(){return[...this.o]}Qc(){return this.o.length}getTimeline(){return this.a?
436
+ this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.B=0;this.R=!1;return super.release()}destroy(){pp(this);return super.destroy()}setCdnErrorCallback(){throw new _.G(1,7,7009,"CDN switching is not supported!");}};_.x("clpp.plist.ScPlaylist",qt);qt.prototype.setCdnErrorCallback=qt.prototype.setCdnErrorCallback;qt.prototype.destroy=qt.prototype.destroy;qt.prototype.release=qt.prototype.release;qt.prototype.seekWith=qt.prototype.seekWith;
437
+ qt.prototype.getTimeline=qt.prototype.getTimeline;qt.prototype.getSize=qt.prototype.Qc;qt.prototype.getPlaylist=qt.prototype.Bg;qt.prototype.getCurrentItemIndex=qt.prototype.getCurrentItemIndex;qt.prototype.getCurrentItem=qt.prototype.getCurrentItem;qt.prototype.addItem=qt.prototype.$f;qt.prototype.open=qt.prototype.open;var rt=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,ld:!0,ready:Promise.resolve()}));this.h=new _.Q("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.ld)}get(){const a=this;return _.w(function*(){const b=a.a.find(c=>c.ld);if(!b)throw Error("No available players in the pool");b.ld=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.ld=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.h.error("Failed to unload player",
438
+ d)}).then(c)});return b.ready}destroy(){const a=this;return _.w(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};var st=class extends _.Ns{constructor(a){super();this.o=_.Kg({transition:_.Ne,preloadMedia:!1},a);this.g=[];this.a=0;const b=vp(a.anchorId,this.o.config);this.w=new rt(b);this.f=null;this.j=!1;this.l=new Map;this.A=a.toggleVisible;this.h=new _.Q(pd);this.w.a.forEach(c=>wp(this,c.player,!1))}Pc(){return this.f}tb(){return this.f?this.f.player:null}hf(){return this.l.get(this.a+1)||null}jf(){return this.l.get(this.a-1)||null}Zd(){return[this.jf(),this.hf()].filter(Boolean)}kh(a){if(0<this.g.length)throw Error("Cannot re-set items in the playlist");
439
+ this.h.info("Set items",a);this.g=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}jh(a){if(0===this.g.length)throw Error(lb);if(0>a||a>this.g.length-1)throw Error("Index out of bounds");this.a=a}zc(){return this.a<this.g.length-1}mf(){return 0<this.a}$g(){const a=this;return _.w(function*(){if(a.j)a.h.warn("Cannot play first item while busy");else if(0===a.g.length)a.h.warn(lb);else{a.j=!0;a.h.info(`First (index: ${a.a})`);var b=a.g[a.a];try{a.h.info(`First loading (index: ${a.a})`),
440
+ yield zp(a,b),a.h.info(`First playing (index: ${a.a})`)}catch(c){throw a.h.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,Dp(a)}}})}Bf(){const a=this;return _.w(function*(){if(a.j)a.h.warn("Cannot play next item while busy");else if(a.zc()){a.j=!0;a.a+=1;a.h.info(`Next (index: ${a.a})`);var b=a.f;a.o.transition===_.Ne&&b.player.pause();Ip(a,a.a+-2);a.l.delete(a.a);var c=a.g[a.a];try{a.h.info(`Next loading (index: ${a.a})`),yield Ep(a,c),a.h.info(`Next playing (index: ${a.a})`)}catch(d){throw a.h.error(`Next failed (index: ${a.a})`),
441
+ d;}finally{a.j=!1,b&&Hp(a,b),Dp(a)}}else a.h.warn("There are no more items in the playlist")})}ah(){const a=this;return _.w(function*(){if(a.j)a.h.warn("Cannot play previous item while busy");else if(a.mf()){a.j=!0;--a.a;a.h.info(`Previous (index: ${a.a})`);var b=a.f;a.o.transition===_.Ne&&b.player.pause();Ip(a,a.a+2);a.l.delete(a.a);var c=a.g[a.a];try{a.h.info(`Previous loading (index: ${a.a})`),yield Ep(a,c),a.h.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.h.error(`Previous failed (index: ${a.a})`),
442
+ d;}finally{a.j=!1,b&&Hp(a,b),Dp(a)}}else a.h.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.w(function*(){a.h.info("Destroy");yield Promise.all([Jp(a),a.f?Hp(a,a.f):Promise.resolve()]);yield Kp(a)})}};_.x(pd,st);st.prototype.destroy=st.prototype.destroy;st.prototype.playPrev=st.prototype.ah;st.prototype.playNext=st.prototype.Bf;st.prototype.playFirst=st.prototype.$g;st.prototype.hasPrev=st.prototype.mf;st.prototype.hasNext=st.prototype.zc;
443
+ st.prototype.setIndex=st.prototype.jh;st.prototype.setItems=st.prototype.kh;st.prototype.getPreloading=st.prototype.Zd;st.prototype.getPrev=st.prototype.jf;st.prototype.getNext=st.prototype.hf;st.prototype.getCurrentPlayer=st.prototype.tb;st.prototype.getCurrent=st.prototype.Pc;var Gp="preload",xp=_.se;var Lp=new Map;var vt=class{constructor(a){this.g=a;this.f={keepOriginalTimestamps:!0,remux:!1};this.a=new muxjs.mp4.Transmuxer(this.f)}destroy(){this.a.dispose();this.a=null}reset(){this.a=new muxjs.mp4.Transmuxer(this.f)}isSupported(a,b){const c="mp2t"===a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]===_.Gc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Mp(Nc);if(b)return _.Mp(Np(b,a));b=Np(_.p,a);a=Np(_.t,a);return _.Mp(b)||_.Mp(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
444
+ b){const c=new Map;c.set(a,b);try{const d=b.split(";")[0],e=Jj(b).split(","),f=new Map,g=Vh(_.p,e),h=Vh(_.t,e);g&&f.set(_.p,this.convertCodecs(_.p,_.Ij(d,g)));h&&f.set(_.t,this.convertCodecs(_.t,_.Ij(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Gc?Nc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Np(a,b):b}getOriginalMimeType(){return this.g}transmux(a){const b=[],c=[];let d=[],e=null;a=_.I(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
445
+ h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===tt?b.push(k):h.type===ut&&c.push(k)},g=()=>{e={video:_.Di(...b),captions:d,audio:_.Di(...c)}};this.a.on("data",f);this.a.on("done",g);this.a.push(a);this.a.flush();this.a.off("data",f);this.a.off("done",g);if(!e)throw new _.G(_.E,3,3018);return e}};Dj(_.Gc,()=>new vt(_.Gc));Dj(_.jg,()=>new vt(_.jg));var ut=_.p,tt=_.t;var wt=class extends _.Ns{constructor(a){super();this.o=_.Kg({Sg:2},a);this.j=[];const b=Op(a.anchorEl,this.o.Sg+1,this.o.mg);this.l=new rt(b);this.a=null;this.g=!1;this.f=new Map;this.A=!1;this.w=a.toggleVisible;this.h=new _.Q("clpp.interstitial.MultiController");this.l.a.forEach(c=>Pp(this,c.player,!1))}getCurrentItem(){return this.a}tb(){return this.a?this.a.player:null}Zd(){return Array.from(this.f.values())}kd(a){this.h.info("Add items",a);this.j=this.j.concat(a.map(b=>Object.assign({},b,{state:"idle",
446
+ disposers:[],preloadPromise:Promise.resolve(),bd:Promise.resolve()})))}removeItems(a){this.h.info("Remove items",a);a?this.j=this.j.filter(b=>!a.includes(b.id)):this.j=[]}zc(){return 0<this.f.size}play(a){const b=this;return _.w(function*(){if(b.g)b.h.warn(`Cannot play item while busy (ID: ${a})`);else{var c=b.getItem(a);if(c){b.h.info(`Play item (ID: ${a})`);b.g=!0;var d=b.a;d&&d.player.pause();var e=b.f.has(a);e&&b.f.delete(a);try{b.h.info(`Item loading (ID: ${a})`),e?yield Tp(b,c):yield Vp(b,c),
447
+ c.jc&&c.jc(),b.trigger(new _.C(ee,{detail:c})),Wp(b,c),b.h.info(`Item playing (ID: ${a})`)}catch(f){throw b.h.error(`Item failed (ID: ${a})`),f;}finally{b.g=!1,d&&Yp(b,d),$p(b),bq(b,c.next)}}else b.h.warn(`Item not found (ID: ${a})`)}})}load(a){const b=this;return _.w(function*(){if(b.g)b.h.warn(`Cannot load item while busy (ID: ${a})`);else{var c=b.getItem(a);if(c){b.h.info(`Load item (ID: ${a})`);b.g=!0;var d=b.a;d&&d.player.pause();var e=b.f.has(a);e&&b.f.delete(a);try{b.h.info(`Item loading (ID: ${a})`),
448
+ e?b.h.error("Loading preloaded items is not supported"):yield Up(b,c),b.trigger(new _.C(ee,{detail:c})),Wp(b,c),b.h.info(`Item loaded (ID: ${a})`)}catch(f){throw b.h.error(`Item failed (ID: ${a})`),f;}finally{b.g=!1,d&&Yp(b,d),$p(b),bq(b,c.next)}}else b.h.warn(`Item not found (ID: ${a})`)}})}getItem(a){return this.j.find(b=>b.id===a)||null}release(){const a=this;return _.w(function*(){yield Promise.all([$p(a),a.a?Yp(a,a.a):Promise.resolve()]);a.a=null;a.g=!1;a.removeItems();Rp(a,!0)})}destroy(){const a=
449
+ this;return _.w(function*(){a.h.info("Destroy");yield a.release();yield cq(a)})}};wt.prototype.destroy=wt.prototype.destroy;wt.prototype.release=wt.prototype.release;wt.prototype.getItem=wt.prototype.getItem;wt.prototype.load=wt.prototype.load;wt.prototype.play=wt.prototype.play;wt.prototype.hasNext=wt.prototype.zc;wt.prototype.removeItems=wt.prototype.removeItems;wt.prototype.addItems=wt.prototype.kd;wt.prototype.getPreloading=wt.prototype.Zd;wt.prototype.getCurrentPlayer=wt.prototype.tb;
450
+ wt.prototype.getCurrentItem=wt.prototype.getCurrentItem;var Xp="preload",Sp=_.se;var At=class extends _.Ns{constructor(a){super();this.f=_.Kg({prerollMarginSec:.5,resolutionOffsetSec:35},a);this.h=new _.Q(nd);this.l=null;this.a=new wt({mg:this.f.config,anchorEl:a.anchorEl,preloadMedia:!0});Rp(this.a,!0);this.a.on(ee,b=>{const c=b.detail;c.primary&&(this.l=c.player.getDuration());this.trigger(new _.C(xt,b));fq(this);c.primary&&kq(this,c.player)});this.g=[];this.a.on(lf,b=>{this.trigger(new _.C(yt,{detail:{player:b.detail.player}}))});this.j=[]}load(a){const b=this;return _.w(function*(){yield mq(b,
451
+ a,!1);b.trigger(new _.C(zt));b.a.getCurrentItem().primary&&b.trigger(new _.C(Iq))})}Oc(){const a=this.l;return a?this.j.map(b=>({cueId:b.cueId,startTime:b.startTime,endTime:b.endTime,primaryDuration:a})):[]}Rg(a){const b=this;return _.w(function*(){yield mq(b,a,!0)})}unload(){const a=this;return _.w(function*(){yield a.a.release();a.j=[]})}destroy(){const a=this;return _.w(function*(){yield a.a.destroy()})}vh(){const a=this;return _.w(function*(){yield Qp(a.a);a.trigger(new _.C(zt));a.a.getCurrentItem().primary&&
452
+ a.trigger(new _.C(Iq))})}getPosition(){const a=this.a.tb();return a?a.getPosition():null}tb(){return this.a.tb()}getCurrentItem(){return this.a.getCurrentItem()}};_.x(nd,At);At.prototype.getCurrentItem=At.prototype.getCurrentItem;At.prototype.getCurrentPlayer=At.prototype.tb;At.prototype.getPosition=At.prototype.getPosition;At.prototype.unpause=At.prototype.vh;At.prototype.destroy=At.prototype.destroy;At.prototype.unload=At.prototype.unload;At.prototype.loadPaused=At.prototype.Rg;
453
+ At.prototype.getCues=At.prototype.Oc;At.prototype.load=At.prototype.load;var tq="new",uq="preparing",yq="ready",Hq="completed",zq="failed",vq="interstitial-preload-started",wq="x-asset-list-request-started",Aq="x-asset-list-request-ended",Dq="interstitial-scheduled",Fq="interstitial-started",Gq="interstitial-ended",Eq="interstitial-item-started",yt="primary-player-changed",xt="item-changed",zt="playback-started",Iq="primary-started",jq="primary-ended",rq="cues-changed";var T=class{rb(){}sb(){}yb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}gc(){}Lb(){}getMediaUrl(){}vb(){}ub(){}jb(){}Va(){}getPodIndex(){}Mb(){}Nb(){}xb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.x("clpp.ads.IAd",T);T.prototype.getWrapperCreativeIds=T.prototype.getWrapperCreativeIds;T.prototype.getWrapperAdSystems=T.prototype.getWrapperAdSystems;T.prototype.getWrapperAdIds=T.prototype.getWrapperAdIds;
454
+ T.prototype.getSequenceLength=T.prototype.xb;T.prototype.getPositionInSequence=T.prototype.Nb;T.prototype.getPodTimeOffset=T.prototype.Mb;T.prototype.getPodIndex=T.prototype.getPodIndex;T.prototype.getPodType=T.prototype.Va;T.prototype.getMediaBitrate=T.prototype.jb;T.prototype.getMediaHeight=T.prototype.ub;T.prototype.getMediaWidth=T.prototype.vb;T.prototype.getMediaUrl=T.prototype.getMediaUrl;T.prototype.getClickThroughUrl=T.prototype.Lb;T.prototype.isBumper=T.prototype.gc;
455
+ T.prototype.getSkipTimeOffset=T.prototype.getSkipTimeOffset;T.prototype.getDuration=T.prototype.getDuration;T.prototype.getTitle=T.prototype.getTitle;T.prototype.getAdvertiserName=T.prototype.getAdvertiserName;T.prototype.getAdSystem=T.prototype.getAdSystem;T.prototype.getApiFramework=T.prototype.getApiFramework;T.prototype.getCreativeId=T.prototype.getCreativeId;T.prototype.getId=T.prototype.getId;T.prototype.getTechnology=T.prototype.yb;T.prototype.getAdManagerVersion=T.prototype.sb;
456
+ T.prototype.getAdManagerName=T.prototype.rb;var Bt=class{name(){}isSupported(){}create(){}};_.x("clpp.ads.IAdsManagerFactory",Bt);Bt.prototype.create=Bt.prototype.create;Bt.prototype.isSupported=Bt.prototype.isSupported;Bt.prototype.name=Bt.prototype.name;var Ct=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.x("clpp.ads.IAdsManager",Ct);Ct.prototype.getPosition=Ct.prototype.getPosition;Ct.prototype.setVolume=Ct.prototype.setVolume;Ct.prototype.getVolume=Ct.prototype.getVolume;Ct.prototype.skip=Ct.prototype.skip;Ct.prototype.pause=Ct.prototype.pause;Ct.prototype.resume=Ct.prototype.resume;var Dt=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.w(function*(){})}};Dt.prototype.dispose=Dt.prototype.dispose;Dt.prototype.getPosition=Dt.prototype.getPosition;Dt.prototype.setVolume=Dt.prototype.setVolume;Dt.prototype.getVolume=Dt.prototype.getVolume;Dt.prototype.skip=Dt.prototype.skip;Dt.prototype.pause=Dt.prototype.pause;Dt.prototype.resume=Dt.prototype.resume;
457
+ Dt.prototype.start=Dt.prototype.start;Dt.prototype.load=Dt.prototype.load;var mo=class{name(){return"clpp.ads.NopAdsManagerFactory"}isSupported(){return!0}create(){return new Dt}};mo.prototype.create=mo.prototype.create;mo.prototype.isSupported=mo.prototype.isSupported;mo.prototype.name=mo.prototype.name;var Et=class{getCuePoints(){}Ob(){}lb(){}};_.x("clpp.ads.IAdsTimeline",Et);Et.prototype.hasPostroll=Et.prototype.lb;Et.prototype.hasPreroll=Et.prototype.Ob;Et.prototype.getCuePoints=Et.prototype.getCuePoints;_.Ft=class{f(){}a(){}g(){}o(){}};var Gt=class{constructor(){this.j=null;this.h=new _.Q("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}g(a){return this.j?this.j.setMediaKeys(a):Promise.reject(ib)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.h.debug("Requesting media key system access for",a,b.map(c=>Object.assign({},c,{drmInfos:c.drmInfos.map(()=>"_anonymous_")})));return navigator.requestMediaKeySystemAccess(a,b).catch(c=>{c.message&&(c=Error(`${c.message} (keySystem: ${a})`));return Promise.reject(c)})}f(){return Cb}};
458
+ jm(new class{a(){return Cb}isSupported(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Gt}},1E3);var It=class{constructor(){this.size=0;this.a=void 0;this.h=new _.Q("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Ht.value())}get(a){if(this.has(a))return this.a}has(a){const b=Ht.value();return this.a&&bi(a,b)?!0:!1}entries(){}keys(){}values(){}},Ht=new _.gt(()=>hi(new Uint8Array([0])));var Jt=class{l(){}g(a){_.dh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.dh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};jm(new class{a(){return"NOP"}isSupported(){return!0}create(){return new Jt}},-1);var Lt=class{constructor(){this.j=this.w=null}l(a){this.w=a}g(a){const b=this.j;b&&b!==a&&Kq(b,null);return(this.j=a)?Kq(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.dh("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Kt(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Kt=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.ud))for(var c of b){a:{a=c;if(a.persistentState===_.tf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
459
+ persistentState:_.Ke,distinctiveIdentifier:_.Ke,initDataTypes:a.initDataTypes,sessionTypes:[Pf],label:a.label};let d=!1,e=!1;if(a.audioCapabilities)for(const f of a.audioCapabilities)f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.audioCapabilities.push(f),e=!0));if(a.videoCapabilities)for(const f of a.videoCapabilities)f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),
460
+ e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.kg));a=e?b:null}if(a){this.a=a;return}}c=Error(Pb);c.name=rb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Mt(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.dh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Mt=class{constructor(a){this.f=null;this.g=new WebKitMediaKeys(a);this.a=new _.as;this.j=0;this.h=new _.Q(md);this.h.info("Created Media Keys for "+a)}createSession(a){a=
461
+ void 0===a?Pf:a;this.h.debug("Creating Apple MediaKeys Session");if(a!==Pf)throw new TypeError("Session type "+a+ba);return new Nt(this.g,`__session_${this.j++}`)}setServerCertificate(){this.h.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Nt=class extends _.Ns{constructor(a,b){super();this.a=null;this.o=a;this.f=this.g=null;this.j=new _.as;this.sessionId=b;this.expiration=NaN;this.closed=new _.Ym;this.l=!1;this.keyStatuses=new It;this.h=new _.Q(md)}generateRequest(a,
462
+ b){if(this.l)return Promise.reject(Fb);this.h.debug("generateRequest");this.g=new _.Ym;try{const c=this.o.createSession(_.kg,_.I(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,vg,d=>{{const e=this.keyStatuses.getStatus();this.h.debug(`Received Key Message in ${this.sessionId}`);this.g&&(this.g.resolve(),this.g=null);d=new _.C(_.ve,{messageType:void 0===e||e===Jf?le:ke,message:hi(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,tg,d=>{this.h.debug("onWebkitKeyAdded_",
463
+ d);this.f&&(Lq(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,ug,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Jf)this.h.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.h.error(`Received key error in session ${this.sessionId} `+`with code ${this.a.error.code}. `+`Session Status ${d}.`),d=Error("EME AppleEmeManager key error"),d.errorCode=this.a.error,null!==this.g)this.g.reject(d),
464
+ this.g=null;else if(null!==this.f)this.f.reject(d),this.f=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Lq(this,"output-not-allowed");break;default:Lq(this,_.de)}});Lq(this,Jf)}catch(c){this.g.reject(c)}return this.g}load(){this.h.debug("load");return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(Fb);this.h.debug(bg);this.f=new _.Ym;try{this.a.update(_.I(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
465
+ this.h.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.kh(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.h.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}};jm(new class{a(){return"APPLE"}isSupported(){return!!window.WebKitMediaKeys}create(){return new Lt}},1100);var Pt=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}g(a){_.dh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(ib);const b=this.w;b&&b!==a&&Oq(b,null);(this.w=a)&&Oq(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.dh("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.j)var c=this.j;else{var d=document.getElementsByTagName(_.t);c=d.length?d[0]:document.createElement(_.t)}const e=
466
+ new Ot(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Ot=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Le&&(this.a=sg,a=!1);let e=!1;for(const g of d){d=[];var f=[];let h=!1;if(g.audioCapabilities)for(const k of g.audioCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType.split(";")[0],this.a)&&(d.push(k),e=!0));if(g.videoCapabilities)for(const k of g.videoCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType,
467
+ this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.kg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.tf||a||(e=!1);if(e){this.f=g;return}}b=Pb;if(c===_.Le||c===_.yd)b="None of the requested configurations were supported.";c=Error(b);c.name=rb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Qt(this.g,this.a))}getConfiguration(){return this.f}},Qt=class{constructor(a,b){this.g=a;this.o=b;this.a=null;this.f=new _.as;this.j=[];this.l=new Map}createSession(a=
468
+ Pf){if(a!==Pf&&a!==_.Pe)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=ab,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Rt(this.g,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Rt=class extends _.Ns{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.g=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.Ym;this.keyStatuses=
469
+ new It}ready(){_.dh("WebkitEmeManager.MediaKeySession.ready");Nq(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.dh("WebkitEmeManager.MediaKeySession.generateRequest");return Qq(this,b,null)}load(a){_.dh(Vb);return this.l===_.Pe?Qq(this,null,a):Promise.reject(Error(ob))}update(a){_.dh(Vb);const b=new _.Ym;Rq(this,b,a);return b}close(){_.dh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Pe){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
470
+ this.closed;const a=Pq(this,"cancelKeyRequest");try{this.j[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.dh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Pe?Promise.reject(Error(ob)):this.close()}};jm(new class{a(){return"WEBKIT"}isSupported(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Pt}});var Ut=class extends _.Ss{constructor(a,b,c,d,e){super(Za);this.l=a;this.j=b;this.g=c;this.a=d;this.o=e;this.h=new _.Q(ld);_.ti(this.l)?this.h.warn(_.Wb):this.La(_.yd,{licenseUrl:this.l,videoRobustness:[_.Eb,void 0],audioRobustness:[_.Db,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.dd.bind(this)}});_.ti(this.j)?this.h.warn(_.ub):this.La(_.wd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.dd.bind(this)}});
471
+ _.ti(this.g)?this.h.warn(_.Ta):_.ti(this.a)?this.h.warn(_.Sa):this.La(_.ud,{licenseUrl:this.g,certificateUrl:this.a,modifiers:{licenseRequest:this.wf.bind(this),licenseResponse:this.xf.bind(this),certificateRequest:this.dd.bind(this),extractContentId:this.bf.bind(this)}})}dd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}bf(a,b){a=Dl(b);switch(this.o){case St:return a;case Tt:return(new _.El(a)).a;default:throw Error("Unknown content ID strategy");}}wf(a,b){b.headers[ta]=
472
+ Fc;this.dd(a,b);a={spc:_.xi(b.body)};b.body=_.pi(_.hj(a,!0))}xf(a,b){a=_.ji(b.data).trim();const c="\x3c/ckc\x3e"===a.substr(-6);"\x3cckc\x3e"===a.substr(0,5)&&c&&(a=a.slice(5,-6));b.data=_.zi(a).buffer}};_.x(ld,Ut);Ut.prototype.onFairPlayLicenseResponse=Ut.prototype.xf;Ut.prototype.onFairPlayLicenseRequest=Ut.prototype.wf;Ut.prototype.extractFairPlayContentId=Ut.prototype.bf;Ut.prototype.onLicenseRequest=Ut.prototype.dd;Ut.prototype.constructor=Ut.prototype.constructor;Ut.NAME=Za;
473
+ var Tt="hostname",St="full-skd";Ut.FairPlayContentIdStrategy={HOSTNAME:Tt,FULL_SKD:St};_.x("clpp.drm.HeaderDrmComponent",class extends _.Ft{g(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Za){a=a.drm.customData;if(!a)throw new _.G(_.E,7,7100,_.zd);a=new Ut(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||St);_.il(a)}}a(){delete _.hl.HeaderDrm}id(){return"headerdrm"}});_.Do(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.I(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.Do(function(){_.dh("mathRound.install")});_.Do(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;Xd in document||(Object.defineProperty(document,Xd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
474
+ {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Sq);document.addEventListener("webkitfullscreenerror",Sq);document.addEventListener("mozfullscreenchange",Sq);document.addEventListener("mozfullscreenerror",Sq);document.addEventListener("MSFullscreenChange",Sq);document.addEventListener("MSFullscreenError",Sq)}});_.Do(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.dh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Uq,document.exitPictureInPicture=Vq,document.addEventListener("webkitpresentationmodechanged",Tq,!0))}});_.Do(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Wq)}});_.Do(function(){if(window.VTTCue)_.ch("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.ch(Rb),window.VTTCue=Xq;else if(6===a)_.ch("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=Yq;else{try{var b=!!Xq(1,2,"")}catch(c){b=!1}b&&(_.ch(Rb),window.VTTCue=Xq)}}else _.eh("VTTCue not available.")});var Zq;_.Do(function(){_.dh("InputEvent.install");_.Qj("Trident/")&&HTMLInputElement.prototype.addEventListener!==$q&&(_.ch("Patching input event support on IE."),Zq=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=$q)});_.Do(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.Do(function(){_.dh("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});var cr=class{constructor(){this.a=ar()}};var Vt=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.Wt=class{constructor(a,b,c){this.g=a;this.j=b;this.f=c||this.g.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.g.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var Xt;_.Yt=class{constructor(){this.a=new Blob([Xt],{type:_.kg})}canPlay(a){var b=document.createElement(_.t);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.Ym;b=b.play();const d=(new _.Nj(()=>{d.stop();c.resolve(a)})).da(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===rb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
475
+ Xt=new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,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,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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
457
476
  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,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,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,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,0,0,0,55,167,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,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,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,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,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,0,0,
458
477
  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,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,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,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,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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,
459
478
  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,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,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,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,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,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,
460
479
  0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,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,0,0,1,15,109,105,110,102,0,0,
461
480
  0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,
462
- 116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49]);_.dt=new _.R("clpp.media.TimestampParser");_.rq={};_.tq={};var Uq=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new mq}};var xq=window.XMLHttpRequest;var Rq=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new $s(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new mq}};var Nr=class extends _.Dn{constructor(a){super(new _.wm,()=>Promise.resolve());this.B=a;this.h=null;this.w=this.P;this.f=-1;this.j=this.l=this.o=null;Hq(this)}then(a,b){this.P=this.P.then(a,b);return this}catch(a){this.P=this.P.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.h.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};_.ft=class{constructor(a){this.a=!1;this.h=a;this.j=Lq(this);this.h.Hc(this.j);this.f=null}enabled(){return this.a}We(){return this.a&&this.f&&this.f.has(et)?1E3*this.f.get(et):null}release(){this.f=null;this.a=!1;this.h.Cd(this.j)}};_.ft.prototype.getEstimatedThroughput=_.ft.prototype.We;var et="etp",Jq={jh:et},Kq=new _.R("clpp.net.CmsdManager");var Qq=window.fetch,Nq=window.AbortController,Mq=window.Headers;_.Xq={};_.ht=class{constructor(a){a=a.getConfiguration();a=_.vg(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.vf?a.backgroundColor:null;this.T=typeof a.windowColor===_.vf?a.windowColor:null;this.N=typeof a.fontColor===_.vf?a.fontColor:null;this.R=typeof a.fontFamily===_.vf?a.fontFamily:null;this.I=typeof a.fontSize===_.vf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.vf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
463
- _.vf&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.h()}getWindowColor(){return this.T}setWindowColor(a){this.T=a;this.h()}getFontFamily(){return this.R}setFontFamily(a){this.R=a;this.h()}getFontColor(){return this.N}setFontColor(a){this.N=a;this.h()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.h()}getFontSizePercent(){return null===this.C?gt:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
464
- a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.ht.prototype.setEdgeType=_.ht.prototype.setEdgeType;_.ht.prototype.getEdgeType=_.ht.prototype.getEdgeType;_.ht.prototype.setEdgeColor=_.ht.prototype.setEdgeColor;_.ht.prototype.getEdgeColor=_.ht.prototype.getEdgeColor;_.ht.prototype.setFontSizePercent=_.ht.prototype.setFontSizePercent;_.ht.prototype.getFontSizePercent=_.ht.prototype.getFontSizePercent;_.ht.prototype.setFontSize=_.ht.prototype.setFontSize;
465
- _.ht.prototype.getFontSize=_.ht.prototype.getFontSize;_.ht.prototype.setFontColor=_.ht.prototype.setFontColor;_.ht.prototype.getFontColor=_.ht.prototype.getFontColor;_.ht.prototype.setFontFamily=_.ht.prototype.setFontFamily;_.ht.prototype.getFontFamily=_.ht.prototype.getFontFamily;_.ht.prototype.setWindowColor=_.ht.prototype.setWindowColor;_.ht.prototype.getWindowColor=_.ht.prototype.getWindowColor;_.ht.prototype.setBackgroundColor=_.ht.prototype.setBackgroundColor;
466
- _.ht.prototype.getBackgroundColor=_.ht.prototype.getBackgroundColor;var gt=1/15;var Zq="raised",$q="depressed",br="dropshadow",ar="uniform";_.z("clpp.text.EdgeType",{NONE:_.ue,RAISED:Zq,DEPRESSED:$q,DROP_SHADOW:br,UNIFORM:ar});_.Xq[tc]=class{constructor(a){this.f=a;this.a=null;this.g=new _.R("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Xq[_.vc]||null;c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.ttml.Mp4TtmlParser class is not available. Please register the ttml component first.")}catch(c){b=null}if(b)this.a=b;else{try{const c=_.Xq[_.wc]||null;c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=
467
- null}if(b)this.a=b;else throw new _.H(_.G,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.H(_.G,2,2011);return this.a.parseMedia(a,b)}};var it;
468
- _.jt=class extends _.ht{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${it++}`;this.j=document.createElement(_.xf);this.l=this.A=!1;_.Mn(this.o,this.f);document.head.appendChild(this.j);this.h()}append(){}remove(){return!0}isTextVisible(){return this.A}setTextVisibility(a){this.A=a}h(){if(!this.l){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.cr(this)},b=
469
- Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.j.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.o.classList.remove(this.f);document.head.removeChild(this.j);this.l=!0;return Promise.resolve()}};it=0;_.Vm("native",new class{da(){return!0}create(a){return new _.jt(a)}});_.kt=class{onContentWillLoad(){return Promise.resolve()}onContentLoaded(){return Promise.resolve()}onPlayerWillDestroy(){}onPlayerWillRelease(){}};};f.call(g,window);g.clpp._ = _;delete window.clpp; export let clpp = g.clpp; export default clpp;
481
+ 116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49]);_.Zt=class{constructor(a,b,c,d){this.id=a;this.f=b;this.a=c;this.g=d}getDuration(){return this.a}getId(){return this.id}kb(){return this.f}Wc(){return this.g}vc(a){return this.getId()===a.getId()&&this.kb()===a.kb()&&this.getDuration()===a.getDuration()&&this.Wc()===a.Wc()}};_.x("clpp.media.TimelineWindow",_.Zt);_.Zt.prototype.isDynamic=_.Zt.prototype.Wc;_.Zt.prototype.getStart=_.Zt.prototype.kb;_.Zt.prototype.getId=_.Zt.prototype.getId;_.Zt.prototype.getDuration=_.Zt.prototype.getDuration;_.$t=new _.Q("clpp.media.TimestampParser");_.au=class{constructor(){this.a=[];this.f=-1;this.g=null}Eg(a){return this.a[a]||null}Fg(){return this.a.length}Gg(){return this.a}ff(){return this.a[this.f]||null}zg(){return this.f}};_.x("clpp.media.Timeline",_.au);_.au.prototype.getCurrentWindowIndex=_.au.prototype.zg;_.au.prototype.getCurrentWindow=_.au.prototype.ff;_.au.prototype.getWindows=_.au.prototype.Gg;_.au.prototype.getWindowCount=_.au.prototype.Fg;_.au.prototype.getWindow=_.au.prototype.Eg;_.hr={};_.jr={};var Kr=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new cr}};var pr=window.XMLHttpRequest;var Jr=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new Vt(a);this.length=a;this.A=b;this.f=this.a=this.g=0;this.l=null;this.o=-1;this.w=new cr}};var Fs=class extends _.fo{constructor(a){super(new _.Ym,()=>Promise.resolve());this.B=a;this.g=null;this.w=this.P;this.f=-1;this.j=this.l=this.o=null;zr(this)}then(a,b){this.P=this.P.then(a,b);return this}catch(a){this.P=this.P.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.g.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};_.cu=class{constructor(a){this.a=!1;this.g=a;this.j=Dr(this);this.g.Gc(this.j);this.f=null}enabled(){return this.a}gf(){return this.a&&this.f&&this.f.has(bu)?1E3*this.f.get(bu):null}release(){this.f=null;this.a=!1;this.g.Hd(this.j)}};_.cu.prototype.getEstimatedThroughput=_.cu.prototype.gf;var bu="etp",Br={Ah:bu},Cr=new _.Q("clpp.net.CmsdManager");var Ir=window.fetch,Fr=window.AbortController,Er=window.Headers;_.Nr={};_.eu=class{constructor(a){a=a.getConfiguration();a=_.Lg(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Lf?a.backgroundColor:null;this.T=typeof a.windowColor===_.Lf?a.windowColor:null;this.N=typeof a.fontColor===_.Lf?a.fontColor:null;this.R=typeof a.fontFamily===_.Lf?a.fontFamily:null;this.I=typeof a.fontSize===_.Lf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Lf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
482
+ _.Lf&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.g()}getWindowColor(){return this.T}setWindowColor(a){this.T=a;this.g()}getFontFamily(){return this.R}setFontFamily(a){this.R=a;this.g()}getFontColor(){return this.N}setFontColor(a){this.N=a;this.g()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.g()}getFontSizePercent(){return null===this.C?du:this.C}setFontSizePercent(a){this.C=a;this.g()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
483
+ a;this.g()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.g()}};_.eu.prototype.setEdgeType=_.eu.prototype.setEdgeType;_.eu.prototype.getEdgeType=_.eu.prototype.getEdgeType;_.eu.prototype.setEdgeColor=_.eu.prototype.setEdgeColor;_.eu.prototype.getEdgeColor=_.eu.prototype.getEdgeColor;_.eu.prototype.setFontSizePercent=_.eu.prototype.setFontSizePercent;_.eu.prototype.getFontSizePercent=_.eu.prototype.getFontSizePercent;_.eu.prototype.setFontSize=_.eu.prototype.setFontSize;
484
+ _.eu.prototype.getFontSize=_.eu.prototype.getFontSize;_.eu.prototype.setFontColor=_.eu.prototype.setFontColor;_.eu.prototype.getFontColor=_.eu.prototype.getFontColor;_.eu.prototype.setFontFamily=_.eu.prototype.setFontFamily;_.eu.prototype.getFontFamily=_.eu.prototype.getFontFamily;_.eu.prototype.setWindowColor=_.eu.prototype.setWindowColor;_.eu.prototype.getWindowColor=_.eu.prototype.getWindowColor;_.eu.prototype.setBackgroundColor=_.eu.prototype.setBackgroundColor;
485
+ _.eu.prototype.getBackgroundColor=_.eu.prototype.getBackgroundColor;var du=1/15;var Rr="raised",Sr="depressed",Ur="dropshadow",Tr="uniform";_.x("clpp.text.EdgeType",{NONE:_.Ce,RAISED:Rr,DEPRESSED:Sr,DROP_SHADOW:Ur,UNIFORM:Tr});_.Or(zc,class{constructor(a){this.f=a;this.a=null;this.h=new _.Q("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Pr(_.Ac);c?(b=new c(this.f),b.parseInit(a)):this.h.warn("The clpp.ttml.Mp4TtmlParser class is not available. Please register the ttml component first.")}catch(c){b=null}if(b)this.a=b;else{try{const c=_.Pr(_.Bc);c?(b=new c(this.f),b.parseInit(a)):this.h.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=null}if(b)this.a=
486
+ b;else throw new _.G(_.E,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.G(_.E,2,2011);return this.a.parseMedia(a,b)}});var fu;
487
+ _.gu=class extends _.eu{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${fu++}`;this.j=document.createElement(_.Nf);this.l=this.A=!1;_.po(this.o,this.f);document.head.appendChild(this.j);this.g()}append(){}remove(){return!0}isTextVisible(){return this.A}setTextVisibility(a){this.A=a}g(){if(!this.l){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.Vr(this)},b=
488
+ Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.j.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.o.classList.remove(this.f);document.head.removeChild(this.j);this.l=!0;return Promise.resolve()}};fu=0;_.xn("native",new class{isSupported(){return!0}create(a){return new _.gu(a)}});_.hu=class{onContentWillLoad(){return Promise.resolve()}onContentLoaded(){return Promise.resolve()}onPlayerWillDestroy(){}onPlayerWillRelease(){}};};f.call(g,window);g.clpp._ = _;delete window.clpp; export let clpp = g.clpp; export default clpp;