@castlabs/prestoplay 6.14.1 → 6.16.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 (61) hide show
  1. package/CHANGELOG.md +28 -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 +114 -112
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +553 -538
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +74 -73
  10. package/cjs/cl.externs.js +193 -58
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +69 -69
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -29
  15. package/cjs/cl.ima.js +24 -24
  16. package/cjs/cl.mse.js +368 -264
  17. package/cjs/cl.muxdata.js +15 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +14 -14
  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 +71 -71
  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 +455 -443
  37. package/cl.crypto.js +9 -9
  38. package/cl.dash.js +70 -68
  39. package/cl.externs.js +189 -58
  40. package/cl.freewheel.js +19 -19
  41. package/cl.hls.js +71 -71
  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 +318 -236
  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/package.json +1 -1
  61. package/typings.d.ts +393 -57
package/cl.core.js CHANGED
@@ -1,307 +1,313 @@
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,ab,fb,gb,ib,jb,kb,lb,mb,nb,ob,qb,tb,yb,Bb,Cb,Db,Gb,Ib,Mb,Nb,Pb,Qb,Sb,uc,Ac,Ic,Pc,Qc,Wc,Xc,Yc,$c,ad,cd,dd,ed,gd,hd,id,jd,kd,ld,td,wd,Cd,Dd,Ed,Fd,Hd,Kd,Ld,Nd,Sd,ce,de,fe,ge,me,Ee,Le,Ne,Oe,Pe,Qe,Re,Se,We,Xe,Ye,Ze,$e,af,bf,cf,gf,jf,tf,wf,Cf,Jf,Kf,bg,fg,gg,hg,ig,jg,lg,mg,ng,og,pg,qg,tg,ug,zg,wg,Hg,Ig,Mg,Og,Wg,fh,gh,$g,ch,ih,kh,jh,oh,ph,qh,th,uh,wh,xh,Bh,Dh,Fh,zh,Hh,Mh,Oh,Nh,Ph,Qh,Rh,Uh,Vh,Yh,xi,Bi,Ci,Di,Ei,Fi,Hi,Ii,Ji,Ki,Ni,Qi,Wi,Xi,aj,cj,
2
- Yi,$i,bj,dj,ej,fj,hj,ij,pj,vj,wj,Aj,Fj,Hj,Ej,Rj,Kj,Jj,ck,dk,fk,gk,hk,ik,jk,kk,mk,lk,nk,ok,rk,sk,tk,ek,vk,xk,zk,Bk,Dk,Ik,Jk,Kk,Lk,Mk,Nk,Ok,Pk,Qk,Rk,Sk,Yk,hl,jl,pl,tl,vl,Cl,Pl,yl,Kl,Ul,Wl,Xl,hm,im,pm,sm,tm,vm,xm,ym,zm,qm,wm,Am,Bm,Cm,Dm,Em,Fm,Lm,Qm,Sm,Um,Tm,Wm,Om,cn,$m,bn,an,Rm,dn,en,fn,mn,nn,on,rn,vn,wn,yn,tn,sn,Gn,Hn,Ln,Kn,Nn,Pn,Qn,Mn,Sn,Tn,Un,Zn,eo,fo,go,ko,lo,jo,mo,io,ho,oo,qo,so,to,uo,vo,wo,xo,yo,zo,Ao,Bo,Fo,Jo,Lo,No,Oo,Qo,Xo,Ro,So,Yo,Vo,Zo,$o,cp,gp,hp,kp,mp,np,lp,ip,bp,fp,dp,ep,qp,rp,sp,tp,up,
3
- wp,yp,zp,Bp,Dp,Fp,xp,Gp,Hp,Cp,Ep,Ip,Jp,Op,Qp,Pp,Rp,Sp,Tp,Up,Lp,Wp,Mp,Kp,aq,eq,fq,mq,nq,oq,rq,pq,qq,sq,tq,uq,vq,wq,xq,yq,zq,Aq,Bq,Dq,Eq,Fq,Hq,Jq,Oq,Pq,Qq,Sq,Tq,Uq,Wq,Xq,Vq,$q,cr,br,ar,dr,gr,kr,jr,pr,rg,sg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="6.14.1";_.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. ";
4
- _.la="BANDWIDTH";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";
5
- _.Fa="EXT-X-MEDIA-SEQUENCE";_.Ga="EXT-X-PART-INF";_.Ha="EXT-X-PLAYLIST-TYPE";_.Ja="EXT-X-PRELOAD-HINT";_.Ka="EXT-X-PROGRAM-DATE-TIME";_.La="EXT-X-SERVER-CONTROL";_.Na="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";_.$a="LANGUAGE";ab="License verification failed: ";
6
- _.cb="Loading player with configuration";_.db="MaxHeight";_.eb="MaxWidth";fb="Missing media element";gb="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";ib="No event provided!";jb="No items in the playlist";kb="No sources provided!";lb="No track data attached to the event, unable to add track!";mb="Not a persistent session.";nb="NotAllowedError";ob="NotSupportedError";_.pb="PlayReady License URL is not defined";qb="Player not ready yet.";_.rb="Player sources";
7
- _.sb="Please make sure ";tb="Preloading is not supported by this player.";_.ub="QualityLevel";_.vb="RESOLUTION";_.wb="Releasing player with source";_.xb="Representation";yb="STANDARD";_.zb="SW_SECURE_CRYPTO";_.Ab="SW_SECURE_DECODE";Bb="Session is closed";Cb="Signature Verification failed";Db="Skipping Session creation. License for init data was already requested in ";_.Eb="SmoothStreamingMedia";_.Fb="TYPE";Gb="The index is not in the allowed range.";_.Hb="URI";Ib="Unable to translate ";_.Jb="Unhandled/ignored event";
8
- _.Kb="Unregistering listeners";Mb="Unsupported keySystem";Nb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Ob="VIDEO";Pb="Wait for preloading to finish";Qb="WebkitEmeManager.MediaKeySession.load";_.Rb="Widevine License URL is not defined";Sb="Will create EME Manager: ";_.Tb="X-ASSET-LIST";_.Ub="X-ASSET-URI";_.Vb="X-PLAYOUT-LIMIT";_.Wb="X-RESUME-OFFSET";_.Xb="ad-break-started";_.Zb="ad-break-stopped";_.$b="ad-buffering";_.ac="ad-clicked";_.bc="ad-completed";_.cc="ad-first-quartile";
9
- _.dc="ad-impression";_.ec="ad-loaded";_.fc="ad-midpoint";_.gc="ad-paused";_.hc="ad-progress";_.ic="ad-resumed";_.jc="ad-skipped";_.kc="ad-started";_.lc="ad-stopped";_.mc="ad-third-quartile";_.nc="addtrack";_.oc="ads-timeline-changed";_.pc="airplay-casting-ended";_.qc="airplay-casting-started";_.rc="airplay-status-changed";_.sc="application/cea-608";_.tc="application/dash+xml";uc="application/mp4";_.vc='application/mp4; codecs\x3d"stpp"';_.wc='application/mp4; codecs\x3d"wvtt"';_.yc="application/ttml+xml";
10
- _.zc="application/vnd.ms-sstr+xml";Ac="application/x-www-form-urlencoded";_.p="audio";_.Ec="audio/aac";_.Fc="audio/ac3";_.Gc="audio/eac3";_.Hc="audio/mp4";Ic='audio/mp4;codecs\x3d"mp4a.40.2"';_.Jc="audiobufferchanged";_.Kc="autoplaynotallowed";_.Lc="bitratechanged";_.Mc="boolean";_.Nc="bufferingended";_.Oc="bufferingstarted";Pc="canplay";Qc="canplaythrough";_.Rc="castingstarted";_.Sc="caststatuschanged";_.Tc="cdn-switch-success";_.Uc="cenc";_.Vc="center";Wc="certificate-request";Xc="change";Yc="chrome";
11
- _.Zc="clpp-fill";$c="clpp-hidden";ad="clpp-mc-playlist";cd="clpp-mc-playlist-item";dd="clpp-mc-playlist-video-el";ed="clpp-visible";_.fd="clpp.cast.CastSender";gd="clpp.drm.HeaderDrm";hd="clpp.drm.eme.AppleEmeManager";id="clpp.interstitial.Player";jd="clpp.native.Player";kd="clpp.plist.McPlaylist";ld="clpp.utils.Platform";_.md="codecs";_.nd="column-reverse";_.od="com.adobe.primetime";_.pd="com.apple.fps";_.qd="com.apple.hls.interstitial";_.sd="com.microsoft.playready";td="com.microsoft.playready.recommendation";
12
- _.ud="com.widevine.alpha";_.vd="config.drm.customData is not defined";wd="controls";_.xd="cuechange";_.yd="decoder";_.zd="destroy()";_.Ad="disabled";_.Bd="div";Cd="drm.mediaKeys.end";Dd="drm.mediaKeys.start";Ed="drm.onPlay.end";Fd="drm.onPlay.start";_.Gd="drmexpirationupdate";Hd="drmrenewalstarted";_.Id="drmsessionpersisted";_.Jd="drmsessionupdate";Kd="drmtoday";Ld="durationchange";_.Md="ec-3";Nd="encrypted";_.Od="end";_.Pd="ended";_.Qd="error";_.Rd="forced";Sd="fullscreenElement";_.Td="function";
13
- _.Ud="height";_.Vd="hidden";_.Wd="html";_.Yd="image";_.Zd="internal-error";ce="itemchange";de="keystatuseschange";_.ee="left";fe="license-renewal";ge="license-request";_.he="line-left";_.ie="line-right";_.je="live-turned-static";_.ke="loadeddata";_.le="loadedmetadata";me="loadstart";_.ne="main";_.oe="mdat";_.pe="mdia";_.qe="message";_.re="metadata";_.se="mimeType";_.te="minf";_.ue="moov";_.ve="mpd-type-changed";_.we="mpeg-dash-callback-event";_.xe="none";_.r="number";_.ye="object";_.ze="onBitrateChanged()";
14
- _.Ae="onPlayerError()";_.Be="onPlayerWillDestroy";_.Ce="onPlayerWillRelease";_.De="onStateChanged()";Ee="online-status-changed";_.Fe="optional";_.Ge="org.w3.clearkey";_.He="output-restricted";_.Ie="pause";_.Je="persistent";_.Ke="persistent-license";Le="picture-in-picture";_.Me="play";Ne="player.afterLoad.end";Oe="player.afterLoad.start";Pe="player.beforeLoad.end";Qe="player.beforeLoad.start";Re="player.load.end";Se="player.load.start";_.Te="playing";_.Ue="playlist-item-changed";_.Ve="playlist-modified";
15
- We="playlist.next.end";Xe="playlist.next.start";Ye="preload-aborted";Ze="preload-failed";$e="preloaded";af="preloading";bf="primary-before-load";cf="primary-content";_.df="progress";_.ef="px";_.ff="ratechange";gf="released";_.hf="releasing";jf="removetrack";_.kf="required";_.lf="resize";_.mf="right";_.nf="seeked";_.of="seeking";_.pf="showing";_.qf="simid-creative-started";_.rf="simid-creative-stopped";_.sf="sinf";tf="stalled";_.uf="start";_.vf="statechanged";wf="status-pending";_.xf="stbl";_.yf="string";
16
- _.zf="stsd";_.Af="style";_.Bf="subtitles-htmlcue";Cf="temporary";_.Df="text/vtt";_.Ef="text/xml";_.Ff="timeupdate";_.Gf="trak";_.Hf="ttml-xml";_.If="und";Jf="unknown";Kf="update";_.Lf="urn:scte:scte35";_.Mf="urn:scte:scte35:2014";_.Of="user-seeked";_.Pf="user-seeking";_.Qf="value";_.Vf="vertical-lr";_.Wf="vertical-rl";_.u="video";_.Xf="video/mp2t";_.Yf="video/mp4";_.Zf="videobufferchanged";_.$f="videotrackchanged";_.ag="vimond-response";bg="visibilitychange";_.cg="vtt-xml";_.dg="waiting";_.eg="waitingforkey";
17
- fg="webkit-org.w3.clearkey";gg="webkitkeyadded";hg="webkitkeyerror";ig="webkitkeymessage";jg="webkitneedkey";_.kg="width";lg="x-dt-csl-tracking-token";mg="x-dt-follow-up-token";ng="x-dt-resp-code";pg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};qg=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:pg(a)}};
18
- tg=function(a,b){if(b){var c=rg;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&&sg(c,a,{configurable:!0,writable:!0,value:b})}};ug=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 ug(a())};
19
- _.x=function(a,b){a=a.split(".");var c=vg;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};_.yg=function(a){return _.z(a)||wg(a)?a:_.xg(a)};_.xg=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=zg(b,{merging:a[c]},1));return b.merging||null};_.Ag=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
20
- zg=function(a,b,c){const d=c+1;if(_.z(a)||!_.Bg(a))a={};for(const e in b)c=b[e],wg(c)||_.z(c)||_.Cg(c)||c instanceof Element?a[e]=c:_.Bg(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.Cg(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=zg([],c,d):!_.z(c)&&_.Dg(c)&&20>d&&(a[e]=zg(a[e],c,d));return a};wg=function(a){a=typeof a;return a===_.yf||a===_.r||a===_.Mc};_.z=function(a){return null===a||"undefined"===typeof a};_.Bg=function(a){return typeof a===_.ye};
21
- _.Cg=function(a){return typeof a===_.Td};_.Eg=function(a){return typeof a===_.yf};_.Fg=function(a){return typeof a===_.r};_.Dg=function(a){if(_.z(a)||!_.Bg(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
22
- _.Gg=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||!_.Bg(a)||!_.Bg(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};
23
- Hg=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};Ig=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.Jg=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};Mg=function(a){return a&&0<=Kg[a]?Kg[a]:Lg};Og=function(a){if(!a)return _.B("clpp.log",Ib+a+ca),-1;const b=Ng[a.toUpperCase()];return void 0===b?(_.B("clpp.log",Ib+a+ca),-1):b};_.Qg=function(a){Pg.info.apply(Pg,arguments)};_.Rg=function(a){Pg.debug.apply(Pg,arguments)};
24
- _.B=function(a){Pg.warn.apply(Pg,arguments)};_.Sg=function(a){Pg.error.apply(Pg,arguments)};_.Vg=function(a){if(a){var b=a.a();b in _.Tg?_.Ug.warn("Player-Factory '"+b+"' already registered"):(_.Tg[b]=a,_.Ug.info("Registered Player-Factory: '"+b+"'"))}};_.Xg=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)Wg(b[c]);a.a.clear()};_.Yg=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
- Wg=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
26
- fh=function(a,b){a.h.debug("onMetadata_()");b.mode=_.Vd;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:_.Zg,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($g(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
27
- _.Mf;g.type=_.ah;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.m.trigger(new _.C(_.bh,{detail:f}));Array.prototype.push.apply(a.g,c);ch(a,c,b);a.f.off(b,_.xd);a.f.on(b,_.xd,f=>{f=f.target.activeCues;f=f.length?$g(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(_.dh,{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(_.eh,{detail:f})))}})}};
28
- gh=function(a,b){a.j=b;a.l=a.j.textTracks;a.f.on(a.l,_.nc,c=>{c=c.track;c.kind===_.re&&fh(a,c)})};$g=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};ch=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}))})}};_.hh=function(a){return Array.isArray(a)?a:[a]};
29
- ih=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};kh=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 jh(a,b)&&jh(b,a)};jh=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.lh=function(a,b={}){if(b.Me){const c=[];for(const d of a)c.some(e=>b.Me(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};
30
- oh=function(a,b){b=b.track;b.kind!==_.re&&(b.mode===_.pf&&(b.mode=_.Vd),a.a.on(b,_.xd,c=>{c=c.target||c.srcElement;c.mode=_.Vd;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};ph=function(a,b,c,d){a=`${a===_.F?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.Eg(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
- qh=function(a,b){const c=b||ih;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)}};_.rh=function(a){return null!=a};th=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new sh("No non-null, non-undefined value found");};uh=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
32
- _.vh=function(a){var b;a instanceof _.vh?(wh(this,a.Ya),this.kc=a.kc,this.Ja=a.Ja,xh(this,a.Ec),this.ya=a.ya,_.yh(this,zh(a.a)),this.Zb=a.Zb):a&&(b=String(a).match(Ah))?(wh(this,b[1]||"",!0),this.kc=Bh(b[2]||""),this.Ja=Bh(b[3]||"",!0),xh(this,b[4]),this.ya=Bh(b[5]||"",!0),_.yh(this,b[6]||"",!0),this.Zb=Bh(b[7]||"")):this.a=new _.Ch(null)};wh=function(a,b,c){a.Ya=c?Bh(b,!0):b;a.Ya&&(a.Ya=a.Ya.replace(/:$/,""))};
33
- xh=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};_.yh=function(a,b,c){b instanceof _.Ch?a.a=b:(c||(b=Dh(b,Eh)),a.a=new _.Ch(b))};Bh=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};Dh=function(a,b,c){return typeof a===_.yf?(a=encodeURI(a).replace(b,Fh),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};Fh=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.Ch=function(a){this.f=a||null};
34
- zh=function(a){var b=new _.Ch;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};Hh=function(a,b){const c=Gh[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.G?"":null};_.I=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.H(_.F,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};
35
- _.Jh=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Ih.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Kh=function(a,b){a=_.Jh(a);b=_.Jh(b);return a.split("-")[0]==b.split("-")[0]};_.Lh=function(a,b){for(const c of a)if(!b(c))return!1;return!0};Mh=function*(a){for(let b=0;b<a;b++)yield b};
36
- Oh=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Nh(a)==Nh(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;const c=_.J(a);b=_.J(b);for(const d of Mh(a.byteLength))if(c[d]!=b[d])return!1;return!0};Nh=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.J=function(a,b=0,c=Infinity){return Ph(a,b,c,Uint8Array)};
37
- Ph=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=Nh(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)};Qh=function(a,b=0,c=Infinity){return Ph(a,b,c,Uint16Array)};Rh=function(a,b=0,c=Infinity){return Ph(a,b,c,Uint32Array)};_.Sh=function(a,b=0,c=Infinity){return Ph(a,b,c,Int32Array)};_.Th=function(a,b=0,c=Infinity){return Ph(a,b,c,DataView)};
38
- Uh=function(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};Vh=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};
39
- _.Wh=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(Vh(a));try{return decodeURIComponent(a)}catch(b){throw Error(Oa);}};
40
- Yh=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Xh.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 Vh(c)};
41
- _.Zh=function(a,b){if(_.Eg(a))return a;let c="";b=!!b;const d=_.J(a);239==d[0]&&187==d[1]&&191==d[2]?c=_.Wh(d):254==d[0]&&255==d[1]?c=Yh(d.subarray(2),!1):255==d[0]&&254==d[1]&&(c=Yh(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Xh.debug("Unable to find byte-order-mark, making an educated guess.");0==d[0]&&0==d[2]?c=Yh(a,!1):0==d[1]&&0==d[3]?c=Yh(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Wh(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
42
- };_.$h=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};_.ai=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};
43
- _.bi=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=Rh(d):2===c?e=Qh(d):e=_.J(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.ci=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.di=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};_.ei=function(a){return!!(a&&0<a.length)};_.fi=function(a){return!a||0===a.length};
44
- _.gi=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(Hg(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""}};_.ii=function(a){a=a.replace(/<[^>]+>/gi,"");hi.innerHTML=a;a=hi.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.ki=function(a,b){b=void 0==b?!0:b;a=_.ji(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};
45
- _.ji=function(a){a=Vh(_.J(a));return btoa(a)};_.li=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};_.mi=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};_.ni=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};
46
- _.oi=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};_.pi=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};
47
- _.qi=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};
48
- _.ui=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.H(_.F,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.ri(d);var f;(f=_.qi(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.qi(d,g);)c.push(new _.si(f[1],f[2]||f[3]))}return new _.ti(a,b,c,e)};_.wi=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...vi]}};
49
- xi=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||[...vi]};
50
- _.zi=function(a,b){_.Eg(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.yi,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||
51
- [],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:[...vi],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&xi(c,b);return c};
52
- _.Ai=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=_.Zh(b,!0)}catch(k){}_.Rg("HTTP error text:",g);throw new _.H(0<=(f.fatalStatusCodes||[]).indexOf(c)?_.F:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};
53
- Bi=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};Ci=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};Di=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()};
54
- Ei=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()}};Fi=function(a,b){a.P.then(()=>b(!0),()=>b(!1));return a};_.Gi=function(a,b){a.a.push(Fi(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};Hi=function(a,b){return _.w(function*(){const c=yield a.fetch(b);return _.Wh(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
55
- Ii=function(a,b){return _.w(function*(){const c=yield Hi(a,b);try{const d=JSON.parse(c);if(null==d||typeof d!==_.ye)throw Error("Not an object");return d}catch(d){throw new sh("Failed to parse JSON response","json-failed");}})};Ji=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.w(function*(){if(!navigator.onLine)return!1;if(b){const e=_.zi(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})};
56
- Ki=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.Li=function(a){return a&&a!==_.If?a:null};
57
- Ni=function(a){if(!a)throw new _.H(_.F,3,3101,`Invalid track type: ${a}`);if(!_.Eg(a))throw new _.H(_.F,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 Mi:return Mi}throw new _.H(_.F,3,3101,`Unknown track type: ${a}.`);};
58
- Qi=function(a,b){a=Ni(a);const c=_.Li(b.kind);let d=b.id;d||(d=String(_.Oi++));a=new _.Pi(d,c===_.re?Mi:a);a.kind=c;a.label=_.Li(b.label);a.language=_.Li(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.Ri=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.g}${a.f}`};
59
- _.Si=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)},""):""};_.Ti=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};
60
- Wi=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};Xi=function(a,b){return _.w(function*(){const c=_.zi(b);return yield Hi(a.f,c)})};aj=function(a,b,c){return _.w(function*(){const {mimeType:d,renditions:e}=yield Yi(a,b,c),f=new _.Pi("dummy",_.M),g=e.map((h,k)=>{k=new _.Zi(`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});$i(g);return{renditions:g,mimeType:d||void 0}})};
61
- cj=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>bj(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};Yi=function(a,b,c){return _.w(function*(){const d=dj(b),e=ej(b,c);return{mimeType:yield fj(a,e,d[0]?d[0].codec:null),renditions:d}})};
62
- $i=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.");};bj=function(a){const b=_.ui(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.Fb);c=null!=c?{AUDIO:_.L,VIDEO:_.M,SUBTITLES:_.K}[c]:void 0;return{type:c,groupId:a(_.Sa),name:a("NAME"),language:a(_.$a),nh:a("AUTOSELECT"),default:a("DEFAULT"),uh:a("FORCED"),Le:a("CHARACTERISTICS"),uri:a(_.Hb)}};
63
- dj=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.ui(0,b);if(c.getAttribute(_.Ob))throw Error("Playlist contains alternative video streams.");var d=_.I(c,_.vb);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=_.gj(_.u,c?c.split(","):[]);return b={bandwidth:e,Ic:f,codec:c,width:b,height:d,mimeType:null}})};
64
- ej=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?Wi(a,b):null};fj=function(a,b,c){return _.w(function*(){if(!b||!c)return null;var d=yield Xi(a,b);d=[hj(d,b),ij(d,b)].filter(Boolean);return _.jj(d,_.u,c)})};hj=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?Wi(a,b):null};ij=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.I(_.ui(0,a),_.Hb))?Wi(a,b):null:null};
65
- _.lj=function(a,b,c){for(const d of _.kj)if(d.probe(b,c))return d.create(a);return null};_.mj=function(a){a=_.kj.indexOf(a);0<=a&&_.kj.splice(a,1)};pj=function(a,b){var c=nj;oj.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.tj=function(a,b){var c=[qj,rj,sj,nj];for(const d of c)if(c=oj.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};_.uj=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a};
66
- vj=function(a){a=a.split(/ *; */);a.shift();return(a=a.find(b=>b.startsWith("codecs\x3d")))?a.split("\x3d")[1].replace(/^"|"$/g,"").split(/ *, */).join(","):""};wj=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};
67
- Aj=function(){if(xj)return xj;yj||(yj=new _.zj(()=>{xj=null}));(xj=document.querySelector(_.u)||document.querySelector(_.p))||(xj=document.createElement(_.u));yj.ca(1);return xj};_.Bj=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Cj=function(a){return(navigator.userAgent||"").includes(a)};_.Dj=function(a){return _.Cj("Tizen"+(a?" "+String(a):""))};
68
- Fj=function(a){const b={major:-1,name:Jf};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Ej(a,c[0]));2<=c.length&&(b.minor=Ej(a,c[1]));3<=c.length&&(b.patch=Ej(a,c[2]));4<=c.length&&(b.build=Ej(a,c[3]));return b};_.Gj=function(){return _.Cj("Web0S")};_.Ij=function(){return _.Gj()&&79===Hj().major};
69
- Hj=function(){const a=Jj();const b=["ie","edge","opera","firefox","safari",Yc];var c=Kj();const d=Lj[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Fj(c[1]);return Fj("")};_.Mj=function(){return _.Cj("CrKey")};_.Nj=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Dj()};_.Oj=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Nj()&&1<navigator.maxTouchPoints};_.Pj=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
70
- Ej=function(a,b){try{return parseInt(b,10)}catch(c){Qj.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};Rj=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};
71
- Kj=function(){const a=Jj();if(!a)return Sj;var b=a.match(/^.+?(?=\))/);if(!b)return Sj;b=b[0];if(Rj(b,["iphone","ipad"]))return Tj;if(Rj(b,["android"]))return Uj;if(Rj(b,["macintosh"]))return Vj;if(Rj(b,["windows nt"]))return Wj;if(Rj(b,["tizen"]))return Xj;if(Rj(b,["web0s"]))return Yj;if(Rj(b,["linux"]))return Zj;Qj.warn("Unable to identify OS from user agent: "+a);return Sj};Jj=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
72
- _.bk=function(){var a=Kj();var b=Kj();var c=Lj[b];if(c){c=Jj().match(c.os_version)[1];c=Fj(c);if(b===Wj)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=Fj("");a:{c=Jj();const e=["ie","edge","opera","firefox","safari",Yc];var d=Kj();d=Lj[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=ak}return{os:a,osVersion:b,browser:c,browserVersion:Hj()}};
73
- ck=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.Gg(a,{kind:_.Li(b.kind),language:_.Li(b.language),label:_.Li(b.label)},["kind","language","label"])};dk=function(a){return a.enabled||a.selected||a.mode===_.pf||a.mode===_.Vd};fk=function(a,b,c){return ek(a)&&b===_.M&&!!c.enableHlsVideoTrackInfo};
74
- gk=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})))})};hk=function(a,b,c){return ek(a)&&(b===_.L||b===_.K)&&!!c.enableMetadata};
75
- ik=function(a,b,c){return _.w(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.Le&&(b.accessibility=d.Le.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};jk=function(a,b){return a.g.filter(c=>c.type===b)};kk=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};mk=function(a,b){if(a=lk(a,b))a=Array.from(a),b===_.K&&(a=a.filter(c=>c.kind!==_.re));return a};
76
- lk=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}};nk=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};ok=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
77
- rk=function(a,b,c){const d=mk(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 _.K:f="mode";e=_.pf;g=_.Ad;break;case _.L:f="enabled";break;case _.M:f="selected"}if(f)for(const h of d)h[f]=ck(c,h,c.type)?e:g}}else if(a.h.debug(_.xa+b),a.a.get(b)&&d&&b===_.K){for(e of d)e.mode=
78
- _.Ad;a.a.set(b,null)}b===_.L?a.m.trigger(new _.C(_.pk)):b===_.K&&a.m.trigger(new _.C(_.qk))};sk=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=_.fi(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
79
- tk=function(a,b){return _.w(function*(){var c=a.m.getConfiguration(),d=_.lj(c,b.mimeType,_.Df);if(d){c=_.zi(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:_.Df},sk(a,d,c))}else a.h.warn("Track MIME type is not supported",b)})};ek=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.uk&&!a.url.endsWith(".m3u8"))&&_.Nj()};
80
- vk=function(a,b,c){c=_.hh(c).filter(e=>e);a.h.info("Find preferred tracks for",b,c);const d=jk(a,b);c.some(e=>{const f=_.Jh(e);return(e=d.find(g=>{g=_.Jh(g.language||"");return _.Kh(f,g)}))?(a.h.info("Will select track with id",e.id),rk(a,b,e),!0):!1})};xk=function(a){return a.name===nb&&wk.some(b=>a.message.startsWith(b))};
81
- _.Ak=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Oj()&&(a=360);const b=_.wi();b.maxAttempts=3;a={source:"",license:yk,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.wi(),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,
82
- restrictions:zk(a),useCmsd:!1},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.ne,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,Va,Xa,Ya,Za,$a,cb,db,hb,ib,kb,lb,mb,nb,ob,qb,rb,ub,yb,Cb,Fb,Gb,Hb,Kb,Mb,Pb,Qb,Tb,Ub,Wb,zc,Ec,Jc,Uc,Vc,ad,bd,cd,ed,fd,gd,hd,id,kd,ld,md,nd,od,qd,xd,Ad,Gd,Hd,Id,Jd,Md,Pd,Qd,Sd,Wd,ce,de,fe,ge,me,Ie,Pe,Re,Se,Te,Ue,Ve,We,Xe,Ye,Ze,$e,df,ef,ff,gf,hf,jf,lf,mf,qf,sf,Hf,Kf,Qf,Xf,Yf,kg,pg,ug,vg,wg,xg,zg,Ag,Bg,Cg,Dg,Eg,Hg,Ig,Ng,Kg,Vg,Wg,$g,bh,jh,kh,uh,vh,oh,rh,xh,zh,yh,Bh,Ch,Dh,Gh,Hh,Jh,Kh,Qh,Sh,Uh,Mh,Wh,ai,ci,bi,di,ei,fi,ii,ji,mi,Mi,Qi,Ri,Si,Ti,Ui,Wi,Xi,Yi,Zi,
2
+ bj,ej,ij,jj,nj,pj,kj,mj,oj,qj,rj,sj,uj,vj,Ej,Mj,Qj,Vj,Uj,hk,ak,Zj,sk,tk,vk,wk,xk,yk,zk,Ak,Ck,Bk,Dk,Ek,Hk,Ik,Jk,uk,Lk,Nk,Pk,Rk,Tk,Yk,Zk,$k,al,bl,dl,el,fl,gl,hl,il,ol,xl,zl,El,Il,Kl,Rl,am,Nl,Wl,fm,hm,im,tm,um,Bm,Hm,Im,Km,Mm,Nm,Om,Fm,Lm,Pm,Qm,Rm,Sm,Tm,Um,$m,en,gn,jn,hn,ln,cn,sn,pn,rn,qn,fn,tn,un,vn,Bn,Cn,Dn,Gn,Kn,Ln,Nn,In,Hn,Vn,Wn,$n,Zn,bo,eo,fo,ao,ho,io,jo,oo,to,uo,vo,zo,Ao,yo,Bo,xo,wo,Do,Fo,Ho,Io,Jo,Ko,Lo,Mo,No,Oo,Po,Qo,Uo,Yo,$o,bp,cp,dp,fp,gp,ep,op,ip,jp,pp,mp,qp,tp,up,vp,rp,sp,wp,xp,Ap,Ep,Fp,Ip,
3
+ Kp,Lp,Jp,Gp,zp,Dp,Bp,Cp,Op,Pp,Qp,Rp,Sp,Up,Wp,Xp,Zp,aq,cq,Vp,dq,eq,$p,bq,fq,gq,lq,nq,mq,oq,pq,qq,rq,iq,tq,jq,hq,yq,Cq,Dq,Kq,Lq,Mq,Pq,Nq,Oq,Qq,Rq,Sq,Tq,Uq,Vq,Wq,Xq,Yq,Zq,ar,br,cr,er,gr,lr,mr,nr,pr,qr,rr,tr,ur,sr,vr,yr,xr,wr,zr,Cr,Gr,Fr,Lr,Fg,Gg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.fa="6.16.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";_.Ja="EXT-X-PLAYLIST-TYPE";_.La="EXT-X-PRELOAD-HINT";_.Ma="EXT-X-PROGRAM-DATE-TIME";_.Na="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";Va="HW_SECURE_ALL";Xa="HW_SECURE_CRYPTO";Ya="HW_SECURE_DECODE";Za="HeaderDrm";
6
+ $a="InvalidStateError";_.ab="LANGUAGE";cb="License verification failed: ";db="Load interrupted while a player release is pending";_.eb="Loading player with configuration";_.fb="MaxHeight";_.gb="MaxWidth";hb="Missing media element";ib="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";_.sb="PLAYLIST";_.tb="PlayReady License URL is not defined";ub="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";Qb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Rb="VIDEO";_.Sb="VOD";Tb="Wait for preloading to finish";Ub="WebkitEmeManager.MediaKeySession.load";_.Vb="Widevine License URL is not defined";Wb="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";_.dc="ad-buffering";_.ec="ad-clicked";_.fc="ad-completed";_.gc="ad-first-quartile";_.hc="ad-impression";_.ic="ad-loaded";_.jc="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";Ec="application/x-www-form-urlencoded";_.p="audio";_.Fc="audio/aac";_.Gc="audio/ac3";_.Hc="audio/eac3";_.Ic="audio/mp4";Jc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Kc="audiobufferchanged";_.Lc="autoplaynotallowed";_.Nc="bitratechanged";_.Oc="boolean";_.Pc="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";id="clpp-visible";_.jd="clpp.cast.CastSender";kd="clpp.drm.HeaderDrm";ld="clpp.drm.eme.AppleEmeManager";md="clpp.interstitial.Player";nd="clpp.native.Player";od="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";Ad="controls";_.Bd="cuechange";_.Cd="decoder";_.Dd="destroy()";_.Ed="disabled";_.Fd="div";Gd="drm.mediaKeys.end";Hd="drm.mediaKeys.start";Id="drm.onPlay.end";Jd="drm.onPlay.start";_.Kd="drmexpirationupdate";Md="drmrenewalstarted";_.Nd="drmsessionpersisted";
13
+ _.Od="drmsessionupdate";Pd="drmtoday";Qd="durationchange";_.Rd="ec-3";Sd="encrypted";_.Td="end";_.Ud="ended";_.q="error";_.Vd="forced";Wd="fullscreenElement";_.Xd="function";_.Yd="height";_.Zd="hidden";_.$d="html";_.ae="image";_.be="internal-error";ce="itemchange";de="keystatuseschange";_.ee="left";fe="license-renewal";ge="license-request";_.he="line-left";_.ie="line-right";_.je="live-turned-static";_.ke="loadeddata";_.le="loadedmetadata";me="loadstart";_.ne="main";_.pe="mdat";_.qe="mdia";_.ue="message";
14
+ _.ve="metadata";_.we="mimeType";_.xe="minf";_.ye="moov";_.ze="mpd-type-changed";_.Ae="mpeg-dash-callback-event";_.Be="none";_.t="number";_.Ce="object";_.De="onBitrateChanged()";_.Ee="onPlayerError()";_.Fe="onPlayerWillDestroy";_.Ge="onPlayerWillRelease";_.He="onStateChanged()";Ie="online-status-changed";_.Je="optional";_.Ke="org.w3.clearkey";_.Le="output-restricted";_.Me="pause";_.Ne="persistent";_.Oe="persistent-license";Pe="picture-in-picture";_.Qe="play";Re="player.afterLoad.end";Se="player.afterLoad.start";
15
+ Te="player.appendLoad.end";Ue="player.appendLoad.start";Ve="player.beforeLoad.end";We="player.beforeLoad.start";Xe="player.load.end";Ye="player.load.start";Ze="player.setupPlaylist.end";$e="player.setupPlaylist.start";_.af="playing";_.bf="playlist-item-changed";_.cf="playlist-modified";df="playlist.next.end";ef="playlist.next.start";ff="preload-aborted";gf="preload-failed";hf="preloaded";jf="preloading";_.kf="prevent";lf="primary-before-load";mf="primary-content";_.nf="progress";_.of="px";_.pf="ratechange";
16
+ qf="released";_.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="smooth";Hf="stalled";_.If="start";_.Jf="statechanged";Kf="status-pending";_.Lf="stbl";_.Mf="string";_.Nf="stsd";_.Of="style";_.Pf="subtitles-htmlcue";Qf="temporary";
17
+ _.Rf="text/vtt";_.Sf="text/xml";_.Tf="timeupdate";_.Uf="trak";_.Vf="ttml-xml";_.Wf="und";Xf="unknown";Yf="update";_.Zf="urn:scte:scte35";_.$f="urn:scte:scte35:2014";_.ag="user-seeked";_.bg="user-seeking";_.cg="value";_.dg="vertical-lr";_.eg="vertical-rl";_.w="video";_.fg="video/mp2t";_.gg="video/mp4";_.hg="videobufferchanged";_.ig="videotrackchanged";_.jg="vimond-response";kg="visibilitychange";_.lg="vtt-xml";_.ng="waiting";_.og="waitingforkey";pg="webkit-org.w3.clearkey";ug="webkitkeyadded";vg="webkitkeyerror";
18
+ wg="webkitkeymessage";xg="webkitneedkey";_.yg="width";zg="x-dt-csl-tracking-token";Ag="x-dt-follow-up-token";Bg="x-dt-resp-code";Dg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Eg=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Dg(a)}};
19
+ Hg=function(a,b){if(b){var c=Fg;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&&Gg(c,a,{configurable:!0,writable:!0,value:b})}};Ig=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 Ig(a())};
20
+ _.z=function(a,b){a=a.split(".");var c=Jg;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};_.Mg=function(a){return _.A(a)||Kg(a)?a:_.Lg(a)};_.Lg=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=Ng(b,{merging:a[c]},1));return b.merging||null};_.Og=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
21
+ Ng=function(a,b,c){const d=c+1;if(_.A(a)||!_.Pg(a))a={};for(const e in b)c=b[e],Kg(c)||_.A(c)||_.Qg(c)||c instanceof Element?a[e]=c:_.Pg(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.Qg(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=Ng([],c,d):!_.A(c)&&_.Rg(c)&&20>d&&(a[e]=Ng(a[e],c,d));return a};Kg=function(a){a=typeof a;return a===_.Mf||a===_.t||a===_.Oc};_.A=function(a){return null===a||"undefined"===typeof a};_.Pg=function(a){return typeof a===_.Ce};
22
+ _.Qg=function(a){return typeof a===_.Xd};_.Sg=function(a){return typeof a===_.Mf};_.Tg=function(a){return typeof a===_.t};_.Rg=function(a){if(_.A(a)||!_.Pg(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
23
+ _.Ug=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||!_.Pg(a)||!_.Pg(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.A(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.A(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.A(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
24
+ Vg=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};Wg=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.Xg=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};$g=function(a){return a&&0<=Yg[a]?Yg[a]:Zg};bh=function(a){if(!a)return _.B("clpp.log",Mb+a+ca),-1;const b=ah[a.toUpperCase()];return void 0===b?(_.B("clpp.log",Mb+a+ca),-1):b};_.dh=function(a){ch.info.apply(ch,arguments)};_.eh=function(a){ch.debug.apply(ch,arguments)};
25
+ _.B=function(a){ch.warn.apply(ch,arguments)};_.fh=function(a){ch.error.apply(ch,arguments)};_.ih=function(a){if(a){var b=a.a();b in _.gh?_.hh.warn("Player-Factory '"+b+"' already registered"):(_.gh[b]=a,_.hh.info("Registered Player-Factory: '"+b+"'"))}};jh=function(a){return Object.values(_.gh).find(a)||null};_.lh=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)kh(b[c]);a.a.clear()};
26
+ _.mh=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)};kh=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
27
+ uh=function(a,b){a.g.debug("onMetadata_()");b.mode=_.Zd;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:_.nh,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(oh(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
28
+ _.$f;g.type=_.ph;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.m.trigger(new _.D(_.qh,{detail:f}));Array.prototype.push.apply(a.h,c);rh(a,c,b);a.f.off(b,_.Bd);a.f.on(b,_.Bd,f=>{f=f.target.activeCues;f=f.length?oh(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 _.D(_.sh,{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 _.D(_.th,{detail:f})))}})}};
29
+ vh=function(a,b){a.j=b;a.l=a.j.textTracks;a.f.on(a.l,_.sc,c=>{c=c.track;c.kind===_.ve&&uh(a,c)})};oh=function(a,b){for(const c of a.h)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};rh=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}))})}};_.wh=function(a){return Array.isArray(a)?a:[a]};
30
+ xh=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};zh=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 yh(a,b)&&yh(b,a)};yh=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.Ah=function(a,b={}){if(b.nf){const c=[];for(const d of a)c.some(e=>b.nf(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};
31
+ Bh=function(a,b){b=b.track;b.kind!==_.ve&&(b.mode===_.Cf&&(b.mode=_.Zd),a.a.on(b,_.Bd,c=>{c=c.target||c.srcElement;c.mode=_.Zd;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};Ch=function(a,b,c,d){a=`${a===_.E?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.Sg(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
+ Dh=function(a,b){const c=b||xh;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)}};_.Eh=function(a){return null!=a};Gh=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.Fh("No non-null, non-undefined value found");};Hh=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
33
+ _.Ih=function(a){var b;a instanceof _.Ih?(Jh(this,a.pb),this.xc=a.xc,this.Wa=a.Wa,Kh(this,a.Qc),this.Ka=a.Ka,_.Lh(this,Mh(a.a)),this.jc=a.jc):a&&(b=String(a).match(Nh))?(Jh(this,b[1]||"",!0),this.xc=Qh(b[2]||""),this.Wa=Qh(b[3]||"",!0),Kh(this,b[4]),this.Ka=Qh(b[5]||"",!0),_.Lh(this,b[6]||"",!0),this.jc=Qh(b[7]||"")):this.a=new _.Rh(null)};Jh=function(a,b,c){a.pb=c?Qh(b,!0):b;a.pb&&(a.pb=a.pb.replace(/:$/,""))};
34
+ Kh=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Qc=b}else a.Qc=null};_.Lh=function(a,b,c){b instanceof _.Rh?a.a=b:(c||(b=Sh(b,Th)),a.a=new _.Rh(b))};Qh=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};Sh=function(a,b,c){return typeof a===_.Mf?(a=encodeURI(a).replace(b,Uh),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};Uh=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.Rh=function(a){this.f=a||null};
35
+ Mh=function(a){var b=new _.Rh;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};Wh=function(a,b){const c=Vh[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.G?"":null};_.I=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.H(_.E,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};
36
+ _.Yh=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Xh.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Zh=function(a,b){a=_.Yh(a);b=_.Yh(b);return a.split("-")[0]===b.split("-")[0]};_.$h=function(a,b){for(const c of a)if(!b(c))return!1;return!0};ai=function*(a){for(let b=0;b<a;b++)yield b};
37
+ ci=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(bi(a)===bi(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.J(a);b=_.J(b);for(const d of ai(a.byteLength))if(c[d]!==b[d])return!1;return!0};bi=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.J=function(a,b=0,c=Infinity){return di(a,b,c,Uint8Array)};
38
+ di=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=bi(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)};ei=function(a,b=0,c=Infinity){return di(a,b,c,Uint16Array)};fi=function(a,b=0,c=Infinity){return di(a,b,c,Uint32Array)};_.gi=function(a,b=0,c=Infinity){return di(a,b,c,Int32Array)};_.hi=function(a,b=0,c=Infinity){return di(a,b,c,DataView)};
39
+ ii=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};ji=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
+ _.ki=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(Qa);return a}a=escape(ji(a));try{return decodeURIComponent(a)}catch(b){throw Error(Qa);}};
41
+ mi=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw li.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 ji(c)};
42
+ _.ni=function(a,b){if(_.Sg(a))return a;let c="";b=!!b;const d=_.J(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.ki(d):254===d[0]&&255===d[1]?c=mi(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=mi(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);li.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=mi(a,!1):0===d[1]&&0===d[3]?c=mi(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.ki(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
43
+ };_.oi=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};_.pi=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
+ _.qi=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=fi(d):2===c?e=ei(d):e=_.J(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.ri=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.si=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};_.ti=function(a){return!!(a&&0<a.length)};_.ui=function(a){return!a||0===a.length};
45
+ _.vi=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(Vg(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""}};_.xi=function(a){a=a.replace(/<[^>]+>/gi,"");wi.innerHTML=a;a=wi.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.zi=function(a,b=!0){a=_.yi(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.yi=function(a){a=ji(_.J(a));return btoa(a)};
46
+ _.Ai=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};_.Bi=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};_.Ci=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
+ _.Di=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};_.Ei=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
+ _.Fi=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
+ _.Ji=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.H(_.E,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.Gi(d);var f;(f=_.Fi(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.Fi(d,g);)c.push(new _.Hi(f[1],f[2]||f[3]))}return new _.Ii(a,b,c,e)};_.Li=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...Ki]}};
50
+ Mi=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||[...Ki]};
51
+ _.Oi=function(a,b){_.Sg(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.Ni,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:[...Ki],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&Mi(c,b);return c};
53
+ _.Pi=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=_.ni(b,!0)}catch(k){}_.eh("HTTP error text:",g);throw new _.H(0<=(f.fatalStatusCodes||[]).indexOf(c)?_.E:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};
54
+ Qi=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};Ri=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};Si=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
+ Ti=function(a,b,c){try{const d=a(b);if(d&&d.O&&d.abort)return c.resolve(d.O),()=>d.abort();c.resolve(d);return()=>Promise.resolve(d).then(()=>{}).catch(()=>{})}catch(d){return c.reject(d),()=>Promise.resolve()}};Ui=function(a,b){a.O.then(()=>b(!0),()=>b(!1));return a};_.Vi=function(a,b){a.a.push(Ui(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};Wi=function(a,b){return _.x(function*(){const c=yield a.fetch(b);return _.ki(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
56
+ Xi=function(a,b){return _.x(function*(){const c=yield Wi(a,b);try{const d=JSON.parse(c);if(null==d||typeof d!==_.Ce)throw Error("Not an object");return d}catch(d){throw new _.Fh("Failed to parse JSON response","json-failed");}})};Yi=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.x(function*(){if(!navigator.onLine)return!1;if(b){const e=_.Oi(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).O}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
57
+ Zi=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.$i=function(a){return a&&a!==_.Wf?a:null};
58
+ bj=function(a){if(!a)throw new _.H(_.E,3,3101,`Invalid track type: ${a}`);if(!_.Sg(a))throw new _.H(_.E,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 aj:return aj}throw new _.H(_.E,3,3101,`Unknown track type: ${a}.`);};
59
+ ej=function(a,b){a=bj(a);const c=_.$i(b.kind);let d=b.id;d||(d=String(_.cj++));a=new _.dj(d,c===_.ve?aj:a);a.kind=c;a.label=_.$i(b.label);a.language=_.$i(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.fj=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};
60
+ _.gj=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)},""):""};_.hj=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
+ ij=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};jj=function(a,b){return _.x(function*(){const c=_.Oi(b);return yield Wi(a.f,c)})};nj=function(a,b,c){return _.x(function*(){const {mimeType:d,renditions:e}=yield kj(a,b,c),f=new _.dj("dummy",_.M),g=e.map((h,k)=>{k=new _.lj(`R${k}`,f);k.bandwidth=h.bandwidth;k.Tc=h.Tc;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});mj(g);return{renditions:g,mimeType:d||void 0}})};
62
+ pj=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>oj(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};kj=function(a,b,c){return _.x(function*(){const d=qj(b),e=rj(b,c);return{mimeType:yield sj(a,e,d[0]?d[0].codec:null),renditions:d}})};
63
+ mj=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.");};oj=function(a){const b=_.Ji(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.Jb);c=null!=c?{AUDIO:_.L,VIDEO:_.M,SUBTITLES:_.K}[c]:void 0;return{type:c,groupId:a(_.Ua),name:a("NAME"),language:a(_.ab),Fh:a("AUTOSELECT"),default:a("DEFAULT"),Mh:a("FORCED"),mf:a("CHARACTERISTICS"),uri:a(_.Lb)}};
64
+ qj=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.Ji(0,b);if(c.getAttribute(_.Rb))throw Error("Playlist contains alternative video streams.");var d=_.I(c,_.Ab);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.I(c,_.ma);e=e?Number(e):null;var f=_.I(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.I(c,_.pa);c=_.tj(_.w,c?c.split(","):[]);return b={bandwidth:e,Tc:f,codec:c,width:b,height:d,mimeType:null}})};
65
+ rj=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?ij(a,b):null};sj=function(a,b,c){return _.x(function*(){if(!b||!c)return null;var d=yield jj(a,b);d=[uj(d,b),vj(d,b)].filter(Boolean);return _.yj(d,_.w,c)})};uj=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?ij(a,b):null};vj=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.I(_.Ji(0,a),_.Lb))?ij(a,b):null:null};
66
+ _.Aj=function(a,b,c){for(const d of _.zj)if(d.probe(b,c))return d.create(a);return null};_.Bj=function(a){a=_.zj.indexOf(a);0<=a&&_.zj.splice(a,1)};Ej=function(a,b){var c=Cj;Dj.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.Ij=function(a,b){var c=[Fj,Gj,Hj,Cj];for(const d of c)if(c=Dj.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};
67
+ _.Jj=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.Kj=function(a){return a.split(";")[0]};_.Lj=function(a){a=a.split(/\s*;\s*/);a.shift();return(a=a.find(b=>b.startsWith("codecs\x3d")))?a.split("\x3d")[1].replace(/^"|"$/g,"").split(/\s*,\s*/).join(","):""};Mj=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
+ Qj=function(){if(Nj)return Nj;Oj||(Oj=new _.Pj(()=>{Nj=null}));(Nj=document.querySelector(_.w)||document.querySelector(_.p))||(Nj=document.createElement(_.w));Oj.ia(1);return Nj};_.Rj=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Sj=function(a){return(navigator.userAgent||"").includes(a)};_.Tj=function(a){return _.Sj("Tizen"+(a?" "+String(a):""))};
69
+ Vj=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=Uj(a,c[0]));2<=c.length&&(b.minor=Uj(a,c[1]));3<=c.length&&(b.patch=Uj(a,c[2]));4<=c.length&&(b.build=Uj(a,c[3]));return b};_.Wj=function(){return _.Sj("Web0S")};_.Yj=function(){return _.Wj()&&79===_.Xj().major};
70
+ _.Xj=function(){const a=Zj();const b=["ie","edge","opera","firefox","safari",cd];var c=ak();const d=bk[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Vj(c[1]);return Vj("")};_.ck=function(){return _.Sj("CrKey")};_.dk=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Tj()};_.ek=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.dk()&&1<navigator.maxTouchPoints};_.fk=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
71
+ Uj=function(a,b){try{return parseInt(b,10)}catch(c){gk.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};hk=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
+ ak=function(){const a=Zj();if(!a)return ik;var b=a.match(/^.+?(?=\))/);if(!b)return ik;b=b[0];if(hk(b,["iphone","ipad"]))return jk;if(hk(b,["android"]))return kk;if(hk(b,["macintosh"]))return lk;if(hk(b,["windows nt"]))return mk;if(hk(b,["tizen"]))return nk;if(hk(b,["web0s"]))return ok;if(hk(b,["linux"]))return pk;gk.warn("Unable to identify OS from user agent: "+a);return ik};Zj=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
73
+ _.rk=function(){var a=ak();var b=ak();var c=bk[b];if(c){c=Zj().match(c.os_version)[1];c=Vj(c);if(b===mk)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=Vj("");a:{c=Zj();const e=["ie","edge","opera","firefox","safari",cd];var d=ak();d=bk[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=qk}return{os:a,osVersion:b,browser:c,browserVersion:_.Xj()}};
74
+ sk=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.Ug(a,{kind:_.$i(b.kind),language:_.$i(b.language),label:_.$i(b.label)},["kind","language","label"])};tk=function(a){return a.enabled||a.selected||a.mode===_.Cf||a.mode===_.Zd};vk=function(a,b,c){return uk(a)&&b===_.M&&!!c.enableHlsVideoTrackInfo};
75
+ wk=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})))})};xk=function(a,b,c){return uk(a)&&(b===_.L||b===_.K)&&!!c.enableMetadata};
76
+ yk=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.Kc&&(d=d.Kc.get(`${b.type}:${b.label}`))&&d.mf&&(b.accessibility=d.mf.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};zk=function(a,b){return a.h.filter(c=>c.type===b)};Ak=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};Ck=function(a,b){if(a=Bk(a,b))a=Array.from(a),b===_.K&&(a=a.filter(c=>c.kind!==_.ve));return a};
77
+ Bk=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}};Dk=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};Ek=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
78
+ Hk=function(a,b,c){const d=Ck(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=_.Cf;g=_.Ed;break;case _.L:f="enabled";break;case _.M:f="selected"}if(f)for(const h of d)h[f]=sk(c,h,c.type)?e:g}}else if(a.g.debug(_.za+b),a.a.get(b)&&d&&b===_.K){for(e of d)e.mode=
79
+ _.Ed;a.a.set(b,null)}b===_.L?a.m.trigger(new _.D(_.Fk)):b===_.K&&a.m.trigger(new _.D(_.Gk))};Ik=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=_.ui(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
80
+ Jk=function(a,b){return _.x(function*(){var c=a.m.getConfiguration(),d=_.Aj(c,b.mimeType,_.Rf);if(d){c=_.Oi(b.url);var e=yield a.m.getNetworkEngine().fetch(c).O;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:_.Rf},Ik(a,d,c))}else a.g.warn("Track MIME type is not supported",b)})};uk=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.Kk&&!a.url.endsWith(".m3u8"))&&_.dk()};
81
+ Lk=function(a,b,c){c=_.wh(c).filter(e=>e);a.g.info("Find preferred tracks for",b,c);const d=zk(a,b);c.some(e=>{const f=_.Yh(e);return(e=d.find(g=>{g=_.Yh(g.language||"");return _.Zh(f,g)}))?(a.g.info("Will select track with id",e.id),Hk(a,b,e),!0):!1})};Nk=function(a){return a.name===qb&&Mk.some(b=>a.message.startsWith(b))};
82
+ _.Qk=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.ek()&&(a=360);const b=_.Li();b.maxAttempts=3;a={source:"",license:Ok,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.Li(),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:Pk(a),useCmsd:!1},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.ne,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,
83
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,
84
- disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},restrictions:zk(),tizen:{sideStreamText:_.Dj(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},trickPlay:{speedUpMode:_.yd,preferTrickPlayTracks:!0}};if(_.Cj("Edge/")||_.Dj())a.streaming.gapDetectionThreshold=.5;_.Gj()&&(a.streaming.stallEnabled=!1);_.Ij()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Dj()&&(a.streaming.stallEnabled=
85
- !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};zk=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}};
86
- _.Ck=function(...a){if(!a)return _.Ak();var b=[_.Ak()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.Eg(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}}));
87
- a=_.xg.apply(null,b);_.Eg(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.z(a.volume)&&(!_.Fg(a.volume)||Hg(a.volume)))throw new _.H(_.F,7,7100,"config.volume is not a number");if(!_.z(a.preferredTextLanguage)&&!_.Eg(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.F,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.z(a.preferredAudioLanguage)&&!_.Eg(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.F,
88
- 7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.z(a.preferredAudioCodec)&&!_.Eg(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.F,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.z(a.preferredVideoCodec)&&!_.Eg(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.F,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.z(a.drm)){if(a.drm.env&&!_.Eg(a.drm.env))throw new _.H(_.F,7,
89
- 7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.Eg(a.drm.offlineId))throw new _.H(_.F,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(!_.Fg(b.bufferingGoal)||Hg(b.bufferingGoal))throw new _.H(_.F,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.Fg(b.rebufferingGoal)||
90
- Hg(b.rebufferingGoal))throw new _.H(_.F,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.F,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.Fg(b.bufferBehind)||Hg(b.bufferBehind))throw new _.H(_.F,7,7100,"config.streaming.bufferBehind is not a number");if(!_.Fg(b.smallGapLimit)||Hg(b.smallGapLimit))throw new _.H(_.F,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.Fg(b.durationBackoff)||Hg(b.durationBackoff))throw new _.H(_.F,
91
- 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 _.H(_.F,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Bk(a.restrictions);Bk(a.abr.restrictions);a.abr.initialRestrictions&&Bk(a.abr.initialRestrictions)}return a};
92
- Bk=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);
93
- 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(_.F,7,7100,"Restrictions contain NaN");};Dk=function(a){return typeof a===_.ye&&!Array.isArray(a)&&"source"in a};_.Fk=function(a){return _.Ek.get(a)||null};
94
- _.Hk=function(a){_.Ek.get(a.id())?Gk.warn("Component already in use."):_.Ek.set(a.id(),a)};Ik=function(a){return Array.from(_.Ek.values()).find(b=>b instanceof a)||null};Jk=function(a){for(const b of _.Ek.values())a(b)};Kk=function(a){Jk(b=>{b.o(a)})};Lk=function(a){Jk(b=>{b.g(a)})};Mk=function(){Jk(()=>{})};Nk=function(){Jk(()=>{})};Ok=function(a){if(null!==Ik(a))return null;a=new a;a.f();_.Hk(a);Gk.info("Installed component:",a.id());return a};
95
- Pk=function(a){if(a=Ik(a))a.a(),_.Ek.delete(a.id()),Gk.info("Uninstalled component:",a.id())};Qk=function(a){return _.ci(a,_.pd)||_.ci(a,_.sd)};Rk=function(a,b){3===b.type&&(a.f&&(a.h.debug("Attaching tracking token"),b.headers[lg]=a.f),a.a&&(b.headers[mg]=a.a))};
96
- Sk=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[lg],a.a=b.headers[mg],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(_.Wh(_.li(b))),{delay:a.renewalPeriod,kh:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.Uk=function(a){_.Tk[a.I]=a};
97
- _.Wk=function(a){const b={attemptParameters:_.wi(),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&&
98
- (b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),a.env)){const c=_.Tk[a.env]||null;if(!c)throw _.Rg(_.sa,_.sb+a.env+_.aa),new _.H(_.F,6,6015,`DRM environment '${a.env}' is missing.`);b.Sa=_.Vk(c,a.customData)||{};_.ci(a.env.toLowerCase(),Kd)&&(b.enforceSingleSession=!0)}return b};Yk=function(a){a=Xk[a];if(!a)return null;const b=_.bk();return b.os===Uj&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
99
- _.Vk=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[_.ud];if(g){var h=g.licenseUrl;d=uh(d,g.videoRobustness);e=uh(e,g.audioRobustness);var k=g.modifiers,l=th(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=th(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.yf?Yk(f):f;c[_.ud]=
100
- {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.pd])&&(c[_.pd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.sd])&&(c[_.sd]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
101
- modifiers:g.modifiers});return c};_.Zk=function(){throw new _.H(_.F,3,3E3);};_.$k=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){_.Zk()}};_.N=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.Zk()}};_.al=function(a){return a.a<a.f.byteLength};_.bl=function(){throw new _.H(_.F,3,3E3,"Buffer read out of bounds.");};_.dl=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.bl()}};
102
- _.el=function(a){try{const b=a.f.getUint16(a.a,a.g);a.a+=2;return b}catch(b){_.bl()}};_.P=function(a){try{const b=a.f.getUint32(a.a,a.g);a.a+=4;return b}catch(b){_.bl()}};_.fl=function(a){try{const b=a.f.getInt32(a.a,a.g);a.a+=4;return b}catch(b){_.bl()}};_.gl=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){_.bl()}if(2097151<c)throw new _.H(_.F,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
103
- hl=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.dl(a);return c};_.il=function(a,b){a.a+b>a.f.byteLength&&_.bl();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.J(c)};jl=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.kl=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.ll=function(a){for(;_.al(a.reader)&&!a.parser.a;)a.parser.xd(a.start+a.headerSize,a.reader,a.partialOkay)};
104
- _.ml=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.xd(a.start+a.headerSize,a.reader,a.partialOkay)};_.nl=function(a){return b=>{const c=b.reader.Ca()-b.reader.getPosition();a(_.il(b.reader,c))}};_.ol=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};pl=function(a){let b="";try{b=_.Zh(a)}catch(c){}return b};_.rl=function(a){a=pl(a);let b="";a.length&&(b=(new _.ql(a)).a);return b};
105
- tl=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Wh(a)),d=_.li(c.sinf[0]);(new _.sl).L(_.sf,_.ll).L("schi",_.ll).L("tenc",e=>{e.reader.skip(6);_.dl(e.reader)&&(e.reader.skip(1),b=_.ni(_.il(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
106
- vl=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.F,6,6102);let d;typeof b===_.yf?d=_.ai(b,!0):d=b;a=_.ai(pl(a),!0);b=new _.ul(12+a.byteLength+d.byteLength+c.byteLength,!0);_.N(b,a.byteLength);_.$k(b,_.J(a));_.N(b,d.byteLength);_.$k(b,_.J(d));_.N(b,c.byteLength);_.$k(b,_.J(c));return _.J(b.buffer)};_.wl=function(a){var b=_.J(a.body);b=_.ki(b);a.headers[ra]=Ac;a.body=_.$h("spc\x3d"+b).buffer};
107
- _.xl=function(a){let b;try{b=_.Wh(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=Uh(_.li(b))};Cl=function(a,b){b=yl(b);if(a==_.ud)return b+zl;if(a==_.sd)return b+Al;if(a==_.pd)return b+Bl;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
108
- _.Il=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(ua)?c.customData&&(_.Hl(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)):Gl.warn(gb)};
109
- _.Jl=function(a,b){try{const c=_.J(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Gl.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){Gl.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
110
- _.Ll=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Il(a,b,c,!1);b.headers[ra]=Ac;c={spc:_.ji(b.body)};if((a=a.drm)&&a.env.startsWith(va)&&d){a={};var e=_.Ti((new _.ql(Kl(d))).f);d=e.keyId;if(e=e.assetId)Gl.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Gl.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Gl.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Gl.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
111
- _.bi(_.Si(c,!0))};_.Ml=function(a,b){Gl.debug("Clearing response data");200===b.status&&(a=_.Wh(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.li(a).buffer)};
112
- _.Nl=function(a,b,c){b=pl(b);c=c&&c.customData?c.customData:{};b=new _.ql(Kl(b));const d=_.Ti(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.ei(`${a}`)&&(d.assetId=a,Gl.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.ei(`${e}`)&&(d.variantId=e,Gl.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Gl.debug("KeyId found in FPS SKD. Removing other parameters")):
113
- a=["assetId","variantId"];b.f=_.Si(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.Ri(b);return c.fpsContentId=b};_.Ol=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ua))Gl.warn(gb);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(va)){const c=new _.vh(b.uris[0]);let d=c.ya;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.ya=d;b.uris[0]=c.toString()}};Pl=function(a,b,c){_.Il(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.vh(b.uris[0]);c.a.add(_.Je,a);b.uris[0]=c.toString()};
114
- yl=function(a){if(a===Ql)return"https://lic.drmtoday.com";if(a===Rl)return"https://lic.staging.drmtoday.com";if(a===Sl)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Kl=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
115
- _.Hl=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.Ag(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};Ul=function(a){const b={},c=a?a[ng]:void 0;a=Tl[a?a[ng]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
116
- Wl=function(a,b=0){_.Qg("Registering EME Factory: "+a.a());a={priority:b,Hb:a};for(let c=0;c<Vl.length;++c)if(Vl[c].priority<b){Vl.splice(c,0,a);return}Vl.push(a)};Xl=function(a){if(a){const {Hb:b}=Vl.find(({Hb:c})=>c.a()===a);if(b&&b.isSupported())return _.Qg(Sb+b.a()),b.create();_.Qg("Cannot create selected EME manager. Choosing by priority list.")}for(const {Hb:b}of Vl)if(b.isSupported())return _.Qg(Sb+b.a()),b.create();throw Error("Missing EME managers");};
117
- _.Zl=function(a,b){a=_.Yl(a,b);return 1!=a.length?null:a[0]};_.Yl=function(a,b){return Array.prototype.filter.call(a.childNodes,c=>c instanceof Element&&c.tagName==b)};_.$l=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};
118
- _.am=function(a,b){const c=new DOMParser;let d=null,e=null;try{e=c.parseFromString(a,_.Ef)}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d};_.dm=function(a){var b=_.mi(a);b=parseInt(b.byteLength,10).toString(16);b=_.mi("12"+b+a);return new bm(cm,a,b)};
119
- _.fm=function(a){const b=new _.em(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.kl(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.il(b,16);f=_.ni(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let t=_.dl(b),v=(t&127)>>>0,y=7;for(;128<=t&&28>=y;)t=_.dl(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(!_.al(b))throw Error("not enough data to skip!");while(_.dl(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
120
- 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(;_.al(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=hl(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.Rg("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.ji(m):"","keyIds",l.map(t=>_.ni(t)));return 0<l.length?_.dm(_.ni(l[0])):null};
121
- _.gm=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};
122
- _.lm=function(a){a:{var b=new _.em(new DataView(a.buffer),!0);_.P(b);for(_.el(b);_.al(b);)if(1===_.el(b)){var c=_.el(b);b=_.il(b,c);break a}b=null}b||(b=a);a=Yh(b,!0);c=_.am(a,"WRMHEADER");a=c.getAttribute("version");var d=_.Zl(c,"DATA");c=(c=_.Zl(d,"LA_URL"))?_.$l(c):"";var e;if(e=_.Zl(d,"KID"))if(e=_.$l(e)){var f=_.Zl(d,ma);e={value:e,Jd:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=hm(d))?[e]:(d=im(d))?d:null;const {value:g="",Jd:h}=d&&d[0]||{};d=_.li(g);d=_.gm(d);d=_.ni(d);return new _.jm(_.km,
123
- d,c,b,a,h)};hm=function(a){a=_.Zl(a,"PROTECTINFO");if(!a)return null;var b=_.Zl(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,Jd:c,Of:b}};
124
- im=function(a){a=_.Zl(a,"PROTECTINFO");if(!a)return null;a=_.Zl(a,"KIDS");if(!a)return null;var b=_.Yl(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,Jd:d,Of:e})}return a.length?a:null};_.nm=function(a){mm&&performance.mark(a)};_.om=function(a,b,c){mm&&performance.measure(a,b,c)};
125
- pm=function(a){return _.w(function*(){const b=new Promise(c=>{(new _.zj(c)).ca(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.B("Timeout waiting for session close")})};_.rm=function(a){return qm(a)?_.sd:a};sm=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};
126
- tm=function(a,b){if(a.keySystem){var c=_.rm(a.keySystem);b=b[c];c===_.Ge&&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=
127
- b.serverCertificate||null)))}};_.um=function(a,b){b=_.uj(a.mimeType,b||a.codecs);if(_.tj(b,a.type)){a=a.type;var c=_.tj(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};vm=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};xm=function(a){return(a.audioCapabilities||[]).some(wm)||(a.videoCapabilities||[]).some(wm)};
128
- ym=function(a,b){a=_.rl(b);_.Rg("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
129
- zm=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;_.Cg(k)||(k=ym);let l="";try{l=k(b,c,g)}catch(m){throw new _.H(_.F,6,6103);}if(!l.length)throw new _.H(_.F,6,6101,"Content ID is an empty string");c=vl(c,l,a)}return c};qm=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
130
- wm=function(a){return null!=a.robustness&&""!==a.robustness};Am=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.oi(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])}};
131
- Bm=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.T(new _.H(_.F,6,6014));a.D.ke(_.Jg(c));a.o||a.h.info(ta);a.o=!0;a.B=!1};Cm=function(a){a.f.forEach((b,c)=>{const d=b.ee;let e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.je(c.sessionId,e),b.ee=e)})};
132
- Dm=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.Z.stop();a.Z=null;a.U.stop();a.U=null;const b=Array.from(a.f.keys());for(const c of a.f.values())c.pc&&c.pc.stop();a.f.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.w(function*(){a.h.debug("Closing session",c.sessionId);try{yield pm(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",
133
- c)}a.A=null}a.l=null;a.a=null;a.H.clear();a.G=null;a.J=[];a.g=null;a.T=null;a.D=null;a.O=0;a.M=null})};_.Hm=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=Ig(a.g.Sa);sm(b,d)}if(d=Em(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)tm(f,a.g.Sa);b=Fm(a,b);if(!b.size)return a.R=!0,Promise.resolve();_.nm(Dd);a=_.Gm(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.nm(Cd);_.om("DRM queryMediaKeys_()",Dd,Cd)})};
134
- _.Jm=function(a,b,c){c=void 0===c?[]:c;a.I=Im;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 _.Hm(a,b)};
135
- _.Gm=function(a,b){if(1==b.size&&b.has(""))return Promise.reject(new _.H(_.F,6,6E3));null===a.l&&(a.l=Xl(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 _.Km;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)==h&&(d=d.catch(()=>{if(a.ra)return null;if(l===_.sd){if(_.Bj()&&!a.g.Sa[l].useLegacySystem)return k.label=td,a.l.a(td,[k]).catch(()=>{a.h.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
136
- k.label=_.sd;vm(k);return a.l.a(l,[k])});vm(k)}return a.l.a(l,[k]).catch(m=>{a:{if(l===_.ud&&xm(k)){const n=_.bk();if(xm(k)&&n.os===Uj&&n.browser===Yc){a.h.warn("requestMediaKeySystemAccess() failed",m);a.h.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");vm(k);m=a.l.a(l,[k]);break a}}throw m;}return m})}))};let f=a.g.preferredDrmSystem;if(!f){var g=_.bk();if(g.os===Wj&&10<=g.osVersion.major&&"edge"===g.browser)f=_.sd;else if("safari"===
137
- g.browser)f=_.pd;else if(g.browser===Yc||"firefox"===g.browser)f=_.ud}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(_.F,6,6001,null,h);});d=d.then(h=>{if(a.ra)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());
138
- {l=h.keySystem;m=b.get(_.rm(h.keySystem));n=[];k=[];const q=[],t=[];Am(m.drmInfos,n,k,q,t);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==_.kf,persistentStateRequired:m.persistentState==_.kf,audioRobustness:m.audioCapabilities?m.audioCapabilities[0].robustness:"",videoRobustness:m.videoCapabilities?
139
- m.videoCapabilities[0].robustness:"",serverCertificate:k[0],initData:q,keyIds:t,periodId:null}}a.a=l;if(!a.a.licenseServerUri)throw new _.H(_.F,6,6012,a.a.keySystem);return h.createMediaKeys()}).then(h=>{a.ra||(a.h.info("Created MediaKeys for key system",a.a.keySystem),a.G=h,a.R=!0)}).catch(h=>{if(!a.ra){a.a=null;a.H.clear();if(h instanceof _.H)throw h;throw new _.H(_.F,6,6002,{browserError:h.message});}});c.reject();return d};
140
- Em=function(a){a=Ig(a.g.Sa[_.Ge]||{});if(0==a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.mi(f);e=_.mi(e);e={kty:"oct",kid:_.ki(f,!1),k:_.ki(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.$h(d),initDataType:"keyids"}];return{keySystem:_.Ge,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},mediaSource:{codecSwitchingStrategy:_.kf},restrictions:Pk(),tizen:{sideStreamText:_.Tj(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},trickPlay:{speedUpMode:_.Cd,preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Sb,cropTimeline:!1}};if(_.Sj("Edge/")||_.Tj())a.streaming.gapDetectionThreshold=.5;_.Wj()&&(a.streaming.stallEnabled=!1);_.Yj()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=
86
+ 1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Tj()&&(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};Pk=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
+ _.Sk=function(...a){if(!a)return _.Qk();var b=[_.Qk()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.Sg(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=_.Lg.apply(null,b);_.Sg(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.A(a.volume)&&(!_.Tg(a.volume)||Vg(a.volume)))throw new _.H(_.E,7,7100,"config.volume is not a number");if(!_.A(a.preferredTextLanguage)&&!_.Sg(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.E,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.A(a.preferredAudioLanguage)&&!_.Sg(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.E,
89
+ 7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.A(a.preferredAudioCodec)&&!_.Sg(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.E,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.A(a.preferredVideoCodec)&&!_.Sg(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.E,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.A(a.drm)){if(a.drm.env&&!_.Sg(a.drm.env))throw new _.H(_.E,7,
90
+ 7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.Sg(a.drm.offlineId))throw new _.H(_.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(!_.Tg(b.bufferingGoal)||Vg(b.bufferingGoal))throw new _.H(_.E,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.Tg(b.rebufferingGoal)||
91
+ Vg(b.rebufferingGoal))throw new _.H(_.E,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.E,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.Tg(b.bufferBehind)||Vg(b.bufferBehind))throw new _.H(_.E,7,7100,"config.streaming.bufferBehind is not a number");if(!_.Tg(b.smallGapLimit)||Vg(b.smallGapLimit))throw new _.H(_.E,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.Tg(b.durationBackoff)||Vg(b.durationBackoff))throw new _.H(_.E,
92
+ 7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;if(_.A(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.t)throw new _.H(_.E,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Rk(a.restrictions);Rk(a.abr.restrictions);a.abr.initialRestrictions&&Rk(a.abr.initialRestrictions)}return a};
93
+ Rk=function(a){_.A(a.maxPixels)&&(a.maxPixels=Infinity);_.A(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.A(a.maxHeight)&&(a.maxHeight=Infinity);_.A(a.maxWidth)&&(a.maxWidth=Infinity);_.A(a.minPixels)&&(a.minPixels=0);_.A(a.minBandwidth)&&(a.minBandwidth=0);_.A(a.minHeight)&&(a.minHeight=0);_.A(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 _.H(_.E,7,7100,"Restrictions contain NaN");};Tk=function(a){return typeof a===_.Ce&&!Array.isArray(a)&&"source"in a};_.Vk=function(a){return _.Uk.get(a)||null};
95
+ _.Xk=function(a){_.Uk.get(a.id())?Wk.warn("Component already in use."):_.Uk.set(a.id(),a)};Yk=function(a){return Array.from(_.Uk.values()).find(b=>b instanceof a)||null};Zk=function(a){for(const b of _.Uk.values())a(b)};$k=function(a){Zk(b=>{b.o(a)})};al=function(a){Zk(b=>{b.h(a)})};bl=function(){Zk(()=>{})};dl=function(){Zk(()=>{})};el=function(a){if(null!==Yk(a))return null;a=new a;a.f();_.Xk(a);Wk.info("Installed component:",a.id());return a};
96
+ fl=function(a){if(a=Yk(a))a.a(),_.Uk.delete(a.id()),Wk.info("Uninstalled component:",a.id())};gl=function(a){return _.ri(a,_.ud)||_.ri(a,_.wd)};hl=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[zg]=a.f),a.a&&(b.headers[Ag]=a.a))};
97
+ il=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[zg],a.a=b.headers[Ag],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(_.ki(_.Ai(b))),{delay:a.renewalPeriod,Ch:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.kl=function(a){_.jl[a.I]=a};
98
+ _.ml=function(a){const b={attemptParameters:_.Li(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,hb:{}};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=_.jl[a.env]||null;if(!c)throw _.eh(_.ua,_.xb+a.env+_.aa),new _.H(_.E,6,6015,`DRM environment '${a.env}' is missing.`);b.hb=_.ll(c,a.customData)||{};_.ri(a.env.toLowerCase(),Pd)&&(b.enforceSingleSession=!0)}return b};ol=function(a){a=nl[a];if(!a)return null;const b=_.rk();return b.os===kk&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
100
+ _.ll=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=Hh(d,g.videoRobustness);e=Hh(e,g.audioRobustness);var k=g.modifiers,l=Gh(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=Gh(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.Mf?ol(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};_.pl=function(){throw new _.H(_.E,3,3E3);};_.ql=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){_.pl()}};_.O=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.pl()}};_.rl=function(a){return a.a<a.f.byteLength};_.sl=function(){throw new _.H(_.E,3,3E3,"Buffer read out of bounds.");};_.tl=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.sl()}};
103
+ _.ul=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.sl()}};_.P=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.sl()}};_.vl=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.sl()}};_.wl=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){_.sl()}if(2097151<c)throw new _.H(_.E,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
104
+ xl=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.tl(a);return c};_.yl=function(a,b){a.a+b>a.f.byteLength&&_.sl();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.J(c)};zl=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Al=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.Q=function(a){for(;_.rl(a.reader)&&!a.parser.a;)a.parser.Td(a.start+a.headerSize,a.reader,a.partialOkay)};
105
+ _.Bl=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.Td(a.start+a.headerSize,a.reader,a.partialOkay)};_.Cl=function(a){return b=>{const c=b.reader.Ja()-b.reader.getPosition();a(_.yl(b.reader,c))}};_.Dl=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};El=function(a){let b="";try{b=_.ni(a)}catch(c){}return b};_.Gl=function(a){a=El(a);let b="";a.length&&(b=(new _.Fl(a)).a);return b};
106
+ Il=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.ki(a)),d=_.Ai(c.sinf[0]);(new _.Hl).L(_.Ff,_.Q).L("schi",_.Q).L("tenc",e=>{e.reader.skip(6);_.tl(e.reader)&&(e.reader.skip(1),b=_.Ci(_.yl(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
107
+ Kl=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.E,6,6102);let d;typeof b===_.Mf?d=_.pi(b,!0):d=b;a=_.pi(El(a),!0);b=new _.Jl(12+a.byteLength+d.byteLength+c.byteLength,!0);_.O(b,a.byteLength);_.ql(b,_.J(a));_.O(b,d.byteLength);_.ql(b,_.J(d));_.O(b,c.byteLength);_.ql(b,_.J(c));return _.J(b.buffer)};_.Ll=function(a){var b=_.J(a.body);b=_.zi(b);a.headers[ta]=Ec;a.body=_.oi("spc\x3d"+b).buffer};
108
+ _.Ml=function(a){let b;try{b=_.ki(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=ii(_.Ai(b))};Rl=function(a,b){b=Nl(b);if(a===_.yd)return b+Ol;if(a===_.wd)return b+Pl;if(a===_.ud)return b+Ql;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
109
+ _.Ul=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(wa)?c.customData&&(_.Tl(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)):Sl.warn(ib)};
110
+ _.Vl=function(a,b){try{const c=_.J(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Sl.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){Sl.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
111
+ _.Xl=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Ul(a,b,c,!1);b.headers[ta]=Ec;c={spc:_.yi(b.body)};if((a=a.drm)&&a.env.startsWith(xa)&&d){a={};var e=_.hj((new _.Fl(Wl(d))).f);d=e.keyId;if(e=e.assetId)Sl.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Sl.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Sl.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Sl.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
112
+ _.qi(_.gj(c,!0))};_.Yl=function(a,b){Sl.debug("Clearing response data");200===b.status&&(a=_.ki(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.Ai(a).buffer)};
113
+ _.Zl=function(a,b,c){b=El(b);c=c&&c.customData?c.customData:{};b=new _.Fl(Wl(b));const d=_.hj(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.ti(`${a}`)&&(d.assetId=a,Sl.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.ti(`${e}`)&&(d.variantId=e,Sl.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Sl.debug("KeyId found in FPS SKD. Removing other parameters")):
114
+ a=["assetId","variantId"];b.f=_.gj(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.fj(b);return c.fpsContentId=b};_.$l=function(a,b){a=a.drm;if(!a||!a.env.startsWith(wa))Sl.warn(ib);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(xa)){const c=new _.Ih(b.uris[0]);let d=c.Ka;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.Ka=d;b.uris[0]=c.toString()}};am=function(a,b,c){_.Ul(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.Ih(b.uris[0]);c.a.add(_.Ne,a);b.uris[0]=c.toString()};
115
+ Nl=function(a){if(a===bm)return"https://lic.drmtoday.com";if(a===cm)return"https://lic.staging.drmtoday.com";if(a===dm)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Wl=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
116
+ _.Tl=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.Og(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};fm=function(a){const b={},c=a?a[Bg]:void 0;a=em[a?a[Bg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
117
+ hm=function(a,b=0){_.dh("Registering EME Factory: "+a.a());a={priority:b,Wb:a};for(let c=0;c<gm.length;++c)if(gm[c].priority<b){gm.splice(c,0,a);return}gm.push(a)};im=function(a){if(a){const {Wb:b}=gm.find(({Wb:c})=>c.a()===a);if(b&&b.isSupported())return _.dh(Wb+b.a()),b.create();_.dh("Cannot create selected EME manager. Choosing by priority list.")}for(const {Wb:b}of gm)if(b.isSupported())return _.dh(Wb+b.a()),b.create();throw Error("Missing EME managers");};
118
+ _.km=function(a,b){a=_.jm(a,b);return 1!==a.length?null:a[0]};_.jm=function(a,b){return Array.prototype.filter.call(a.childNodes,c=>c instanceof Element&&c.tagName===b)};_.lm=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
+ _.mm=function(a,b){const c=new DOMParser;let d=null,e=null;try{e=c.parseFromString(a,_.Sf)}catch(f){}e&&e.documentElement.tagName===b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d};_.pm=function(a){var b=_.Bi(a);b=parseInt(b.byteLength,10).toString(16);b=_.Bi("12"+b+a);return new nm(om,a,b)};
120
+ _.rm=function(a){const b=new _.qm(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.Al(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.yl(b,16);f=_.Ci(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let v=_.tl(b),u=(v&127)>>>0,y=7;for(;128<=v&&28>=y;)v=_.tl(b),u=(u|(v&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:u},k=v=>{switch(v){case 0:do if(!_.rl(b))throw Error("not enough data to skip!");while(_.tl(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
121
+ break;case 3:for(;4!==(v=h()&7);)k(v);break;case 5:b.skip(4);break;default:throw Error("invalid wire type "+v);}},l=[];let m=null;for(;_.rl(b);){var n=h(),r=n&7;n>>>=3;if(2===r){r=h();if(0>r)throw Error(`unable to read length of field ${n}`);r=xl(b,r);2===n?l.push(r):4===n&&(m=r)}else k(r)}_.eh("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.yi(m):"","keyIds",l.map(v=>_.Ci(v)));return 0<l.length?_.pm(_.Ci(l[0])):null};
122
+ _.sm=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};
123
+ _.xm=function(a){a:{var b=new _.qm(new DataView(a.buffer),!0);_.P(b);for(_.ul(b);_.rl(b);)if(1===_.ul(b)){var c=_.ul(b);b=_.yl(b,c);break a}b=null}b||(b=a);a=mi(b,!0);c=_.mm(a,"WRMHEADER");a=c.getAttribute("version");var d=_.km(c,"DATA");c=(c=_.km(d,"LA_URL"))?_.lm(c):"";var e;if(e=_.km(d,"KID"))if(e=_.lm(e)){var f=_.km(d,oa);e={value:e,ae:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=tm(d))?[e]:(d=um(d))?d:null;const {value:g="",ae:h}=d&&d[0]||{};d=_.Ai(g);d=_.sm(d);d=_.Ci(d);return new _.vm(_.wm,
124
+ d,c,b,a,h)};tm=function(a){a=_.km(a,"PROTECTINFO");if(!a)return null;var b=_.km(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,ae:c,dg:b}};
125
+ um=function(a){a=_.km(a,"PROTECTINFO");if(!a)return null;a=_.km(a,"KIDS");if(!a)return null;var b=_.jm(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,ae:d,dg:e})}return a.length?a:null};_.zm=function(a){ym&&performance.mark(a)};_.Am=function(a,b,c){ym&&performance.measure(a,b,c)};
126
+ Bm=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.Pj(c)).ia(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.B("Timeout waiting for session close")})};_.Gm=function(a){return Fm(a)?_.wd:a};Hm=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
+ Im=function(a,b){if(a.keySystem){var c=_.Gm(a.keySystem);b=b[c];c===_.Ke&&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)))}};_.Jm=function(a,b){b=_.Jj(a.mimeType,b||a.codecs);if(_.Ij(b,a.type)){a=a.type;var c=_.Ij(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};Km=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};Mm=function(a){return(a.audioCapabilities||[]).some(Lm)||(a.videoCapabilities||[]).some(Lm)};
129
+ Nm=function(a,b){a=_.Gl(b);_.eh("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
+ Om=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;_.Qg(k)||(k=Nm);let l="";try{l=k(b,c,g)}catch(m){throw new _.H(_.E,6,6103);}if(!l.length)throw new _.H(_.E,6,6101,"Content ID is an empty string");c=Kl(c,l,a)}return c};Fm=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
131
+ Lm=function(a){return null!=a.robustness&&""!==a.robustness};Pm=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.Di(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
+ Qm=function(a){var b=a.j;const c=a.X;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.W(new _.H(_.E,6,6014));a.B.xe(_.Xg(c));a.o||a.g.info(va);a.o=!0;a.C=!1};Rm=function(a){a.f.forEach((b,c)=>{const d=b.te;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.B.ve(c.sessionId,e),b.te=e)})};
133
+ Sm=function(a){return _.x(function*(){a.w.release();a.w=null;a.K.release();a.K=null;a.o=!1;a.C=!1;a.F.reject();a.Y.stop();a.Y=null;a.S.stop();a.S=null;const b=Array.from(a.f.keys());for(const c of a.f.values())c.Dc&&c.Dc.stop();a.f.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.x(function*(){a.g.debug("Closing session",c.sessionId);try{yield Bm(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",
134
+ c)}a.A=null}a.l=null;a.a=null;a.H.clear();a.G=null;a.J=[];a.h=null;a.W=null;a.B=null;a.N=0;a.M=null})};_.Wm=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=Wg(a.h.hb);Hm(b,d)}if(d=Tm(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)Im(f,a.h.hb);b=Um(a,b);if(!b.size)return a.R=!0,Promise.resolve();_.zm(Hd);a=_.Vm(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.zm(Gd);_.Am("DRM queryMediaKeys_()",Hd,Gd)})};
135
+ _.Ym=function(a,b,c){c=void 0===c?[]:c;a.I=Xm;a.J=c;a.D=0<c.length;a.g.debug("Using Persisted Licenses: "+a.D);a.h&&a.h.enableSessionCacheForSkd&&a.g.info("Enabled session cache for SKD license requests");return _.Wm(a,b)};
136
+ _.Vm=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.H(_.E,6,6E3));null===a.l&&(a.l=im(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 _.Zm;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)===h&&(d=d.catch(()=>{if(a.Aa)return null;if(l===_.wd){if(_.Rj()&&!a.h.hb[l].useLegacySystem)return k.label=xd,a.l.a(xd,[k]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
137
+ k.label=_.wd;Km(k);return a.l.a(l,[k])});Km(k)}return a.l.a(l,[k]).catch(m=>{a:{if(l===_.yd&&Mm(k)){const n=_.rk();if(Mm(k)&&n.os===kk&&n.browser===cd){a.g.warn("requestMediaKeySystemAccess() failed",m);a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");Km(k);m=a.l.a(l,[k]);break a}}throw m;}return m})}))};let f=a.h.preferredDrmSystem;if(!f){var g=_.rk();if(g.os===mk&&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 _.H(_.E,6,6001,null,h);});d=d.then(h=>{if(a.Aa)return null;a.H.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.H.add(m.contentType.toLowerCase());for(var n of k)a.H.add(n.contentType.toLowerCase());
139
+ {l=h.keySystem;m=b.get(_.Gm(h.keySystem));n=[];k=[];const r=[],v=[];Pm(m.drmInfos,n,k,r,v);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:r,keyIds:v,periodId:null}}a.a=l;if(!a.a.licenseServerUri)throw new _.H(_.E,6,6012,a.a.keySystem);return h.createMediaKeys()}).then(h=>{a.Aa||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.G=h,a.R=!0)}).catch(h=>{if(!a.Aa){a.a=null;a.H.clear();if(h instanceof _.H)throw h;throw new _.H(_.E,6,6002,{browserError:h.message});}});c.reject();return d};
141
+ Tm=function(a){a=Wg(a.h.hb[_.Ke]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Bi(f);e=_.Bi(e);e={kty:"oct",kid:_.zi(f,!1),k:_.zi(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.oi(d),initDataType:"keyids"}];return{keySystem:_.Ke,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
141
142
  keyIds:[],periodId:null}};
142
- Fm=function(a,b){var c=new Set;for(var d of b)for(var e of d.drmInfos)tm(e,a.g.Sa),c.add(e);d=a.C?_.kf:_.Fe;e=a.C?[_.Ke]:[Cf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Uc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Fe,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.um(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Dj()&&(h=_.um(b,_.Md));const k=c?_.um(c):"";let l=null;c&&"ac-3"===
143
- c.codecs.toLowerCase()&&_.Dj()&&(l=_.um(c,_.Md));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=_.kf);m.persistentStateRequired&&(n.persistentState=_.kf);b&&_.hh(m.audioRobustness).forEach(q=>{const t={robustness:q||"",contentType:g};n.audioCapabilities.find(v=>v.robustness===t.robustness&&v.contentType===t.contentType)||
144
- n.audioCapabilities.push(t);h&&n.audioCapabilities.push({robustness:q||"",contentType:h})});c&&_.hh(m.videoRobustness).forEach(q=>{const t={robustness:q||"",contentType:k};n.videoCapabilities.find(v=>v.robustness===t.robustness&&v.contentType===t.contentType)||n.videoCapabilities.push(t);l&&n.videoCapabilities.push({robustness:q||"",contentType:l})})}}return a};
145
- Lm=function(a){return _.w(function*(){if(!a.l.o())if(a.M)yield a.M;else try{a.M=a.l.g(a.G),yield a.M}catch(b){a.ra||a.T(new _.H(_.F,6,6003,b.message,b))}})};
146
- _.Pm=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.I!==Im)){var e=a.keySystem();if(!e.startsWith(_.pd)&&b===_.Uc){const f=new Mm(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||
147
- _.Dj(2)||a.keySystem().startsWith(_.pd)||!_.Nm(a,d,c,!0))&&Om(a,d,null,b,c)}};Qm=function(a,b){return _.w(function*(){a.h.info(`Handle encrypted event for type ${b.initDataType}`);yield Lm(a);b.initData&&_.Pm(a,b.initDataType,_.J(b.initData))})};Sm=function(a){return _.w(function*(){_.nm(Fd);const b=a.V.map(c=>Rm(a,c));a.ba=!0;a.V=[];yield Promise.all(b);_.nm(Ed);_.om("drm.onPlay",Fd,Ed)})};
148
- Um=function(a){const b=a.keySystem(),c=a.g.Sa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return Tm(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.zi([d],a.g.attemptParameters);f.type=3;f.licenseRequestType=Wc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.h.debug("Fetching certificate");return a.D.mb.fetch(f).P}).then(f=>{a.a.serverCertificate=_.J(f.data)}).catch(f=>{var g=
149
- 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}:{},Ul(g));throw new _.H(_.F,6,6100,g,f);})};
150
- _.Vm=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 _.H(_.F,6,6004,{browserError:b.message});}})};
151
- _.Ym=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Dj(2);if(a.g.enforceSingleSession&&!a.keySystem().startsWith(_.pd)){const e=a.f.values();for(const f of e)_.oi(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}.`),Wm(c.initData,f)||(f.nd.push(c.initData),c.keyId&&!f.Ta.includes(c.keyId)&&
152
- f.Ta.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,wf)),d=!1)}!d||a.C&&a.I===Im||(_.Nm(a,c.keyId,c.initData)&&(d=!1),d&&(a.h.info("Request new media key session on create"),Om(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.J)_.Xm(a,c);b.length||a.J.length||(a.o||a.h.info(ta),a.o=!0,a.B=!1,a.F.resolve());return a.F};
153
- _.Zm=function(a,b){if(!a.G)return _.Yg(a.w,b,[Nd,"msneedkey",jg,"needkey"],()=>{a.T(new _.H(_.F,6,6010))}),Promise.resolve();a.A=b;a.l.l(b);a.w.one(a.A,_.Me,()=>Sm(a));a.w.on(a.A,_.eg,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()!==yb||a.J.length)d=Lm(a);c=Promise.resolve();_.Gj()&&38===Hj().major||(a.a&&a.a.keySystem!==_.Ge&&!a.a.serverCertificate&&(c=Um(a)),
154
- c=c.then(()=>_.Vm(a)));return Promise.all([d,c]).then(()=>{a.ra||(_.Ym(a),a.w.on(a.A,Nd,e=>Qm(a,e)))}).catch(e=>{if(!a.ra){if(6004===e.code&&a.a&&a.a.keySystem===_.ud&&1>a.O&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.h.warn("Detected invalid widevine server certificate!. Retrying"),a.T(new _.H(1,6,6004)),a.a.serverCertificate=null,a.O++,_.Zm(a,b);1<=a.O&&a.h.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
155
- Tm=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))}})};
156
- _.Xm=function(a,b){let c;try{a.h.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Ke)}catch(e){const f=new _.H(_.F,6,6005,{browserError:e.message});a.T(f);return Promise.reject(f)}a.w.on(c,_.qe,a.oa.bind(a));a.w.on(c,de,a.fa.bind(a));const d={initData:null,loaded:!1,ee:Infinity,ob:null,Fa:new _.Km,periodId:null,nd:[],keyId:null,Ta:[],initDataType:null,Yb:null,sessionContext:{ldlDelay:0,customData:{}}};d.Fa.catch(()=>{});a.f.set(c,d);return c.load(b).then(e=>{if(a.ra)return null;
157
- a.h.debug("Loaded offline session",b,e);if(!e)return a.f.delete(c),a.T(new _.H(_.F,6,6013)),null;d.loaded=!0;$m(a)&&(a.o||a.h.info(ta),a.o=!0,a.B=!1,a.F.resolve());return c},e=>{a.ra||(a.f.delete(c),a.T(new _.H(_.F,6,6005,{browserError:e.message})))})};Wm=function(a,b){if(!a)return!1;for(let c=0;c<b.nd.length;c++)if(_.oi(a,b.nd[c]))return!0;return!1};
158
- _.Nm=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(_.oi(c,f.initData))return b?f.Ta.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.Ta.push(b),a.j.get(b)||a.j.set(b,wf),d&&a.h.info(Db+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.h.info(Db+`Session: '${e.sessionId}'`),!0;if(Wm(c,f))return d&&a.h.info("Skipping Session creation. License for init data was already requested [extra]"),
143
+ Um=function(a,b){var c=new Set;for(var d of b)for(var e of d.drmInfos)Im(e,a.h.hb),c.add(e);d=a.D?_.tf:_.Je;e=a.D?[_.Oe]:[Qf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Zc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Je,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Jm(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Tj()&&(h=_.Jm(b,_.Rd));const k=c?_.Jm(c):"";let l=null;c&&"ac-3"===
144
+ c.codecs.toLowerCase()&&_.Tj()&&(l=_.Jm(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(r=>r.initDataType))]);m.distinctiveIdentifierRequired&&(n.distinctiveIdentifier=_.tf);m.persistentStateRequired&&(n.persistentState=_.tf);b&&_.wh(m.audioRobustness).forEach(r=>{const v={robustness:r||"",contentType:g};n.audioCapabilities.find(u=>u.robustness===v.robustness&&u.contentType===v.contentType)||
145
+ n.audioCapabilities.push(v);h&&n.audioCapabilities.push({robustness:r||"",contentType:h})});c&&_.wh(m.videoRobustness).forEach(r=>{const v={robustness:r||"",contentType:k};n.videoCapabilities.find(u=>u.robustness===v.robustness&&u.contentType===v.contentType)||n.videoCapabilities.push(v);l&&n.videoCapabilities.push({robustness:r||"",contentType:l})})}}return a};
146
+ $m=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.Aa||a.W(new _.H(_.E,6,6003,b.message,b))}})};
147
+ _.dn=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.D||a.I!==Xm)){var e=a.keySystem();if(!e.startsWith(_.ud)&&b===_.Zc){const f=new an(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
+ _.Tj(2)||a.keySystem().startsWith(_.ud)||!_.bn(a,d,c,!0))&&cn(a,d,null,b,c)}};en=function(a,b){return _.x(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield $m(a);b.initData&&_.dn(a,b.initDataType,_.J(b.initData))})};gn=function(a){return _.x(function*(){_.zm(Jd);const b=a.T.map(c=>fn(a,c));a.aa=!0;a.T=[];yield Promise.all(b);_.zm(Id);_.Am("drm.onPlay",Jd,Id)})};
149
+ jn=function(a){const b=a.keySystem(),c=a.h.hb[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.B.getConfiguration();return hn(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.Oi([d],a.h.attemptParameters);f.type=3;f.licenseRequestType=ad;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.B.Za.fetch(f).O}).then(f=>{a.a.serverCertificate=_.J(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}:{},fm(g));throw new _.H(_.E,6,6100,g,f);})};
151
+ _.kn=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(_.E,6,6004,{browserError:b.message});}})};
152
+ _.nn=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Tj(2);if(a.h.enforceSingleSession&&!a.keySystem().startsWith(_.ud)){const e=a.f.values();for(const f of e)_.Di(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}.`),ln(c.initData,f)||(f.Dd.push(c.initData),c.keyId&&!f.ib.includes(c.keyId)&&
153
+ f.ib.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,Kf)),d=!1)}!d||a.D&&a.I===Xm||(_.bn(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),cn(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.J)_.mn(a,c);b.length||a.J.length||(a.o||a.g.info(va),a.o=!0,a.C=!1,a.F.resolve());return a.F};
154
+ _.on=function(a,b){if(!a.G)return _.mh(a.w,b,[Sd,"msneedkey",xg,"needkey"],()=>{a.W(new _.H(_.E,6,6010))}),Promise.resolve();a.A=b;a.l.l(b);a.w.one(a.A,_.Qe,()=>gn(a));a.w.on(a.A,_.og,e=>{const f=a.C;a.C=!a.o;!f&&a.C&&(a.g.info("Waiting for DRM license key delivery"),a.B.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=$m(a);c=Promise.resolve();_.Wj()&&38===_.Xj().major||(a.a&&a.a.keySystem!==_.Ke&&!a.a.serverCertificate&&(c=jn(a)),
155
+ c=c.then(()=>_.kn(a)));return Promise.all([d,c]).then(()=>{a.Aa||(_.nn(a),a.w.on(a.A,Sd,e=>en(a,e)))}).catch(e=>{if(!a.Aa){if(6004===e.code&&a.a&&a.a.keySystem===_.yd&&1>a.N&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.W(new _.H(1,6,6004)),a.a.serverCertificate=null,a.N++,_.on(a,b);1<=a.N&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
156
+ hn=function(a,b){return _.x(function*(){const c=a.B.Ic();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
157
+ _.mn=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Oe)}catch(e){const f=new _.H(_.E,6,6005,{browserError:e.message});a.W(f);return Promise.reject(f)}a.w.on(c,_.ue,a.ga.bind(a));a.w.on(c,de,a.da.bind(a));const d={initData:null,loaded:!1,te:Infinity,Db:null,Sa:new _.Zm,periodId:null,Dd:[],keyId:null,ib:[],initDataType:null,hc:null,sessionContext:{ldlDelay:0,customData:{}}};d.Sa.catch(()=>{});a.f.set(c,d);return c.load(b).then(e=>{if(a.Aa)return null;
158
+ a.g.debug("Loaded offline session",b,e);if(!e)return a.f.delete(c),a.W(new _.H(_.E,6,6013)),null;d.loaded=!0;pn(a)&&(a.o||a.g.info(va),a.o=!0,a.C=!1,a.F.resolve());return c},e=>{a.Aa||(a.f.delete(c),a.W(new _.H(_.E,6,6005,{browserError:e.message})))})};ln=function(a,b){if(!a)return!1;for(let c=0;c<b.Dd.length;c++)if(_.Di(a,b.Dd[c]))return!0;return!1};
159
+ _.bn=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(_.Di(c,f.initData))return b?f.ib.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.ib.push(b),a.j.get(b)||a.j.set(b,Kf),d&&a.g.info(Hb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(Hb+`Session: '${e.sessionId}'`),!0;if(ln(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
159
160
  !0}return!1};
160
- Om=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=an(a,d,e,f)}catch(t){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:t,initDataType:d,initData:e}),a.g.ignoreUnrecognizedInitData)return}if(!g&&bn(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);
161
- if(h&&m.keyId===h){a.h.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(t){a.h.warn("Unable to close session",t)}k=!1}}if(k){a.h.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.C?_.Ke:Cf;var q=a.G.createSession(n);a.h.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(t){a.T(new _.H(_.F,6,6005,{browserError:t.message}));return}a.w.on(q,_.qe,a.oa.bind(a));a.w.on(q,de,a.fa.bind(a));k={Yb:f,nd:[],initData:e,initDataType:d,keyId:h,
162
- Ta:h?[h]:[],loaded:!1,ee:Infinity,periodId:c,ob:null,Fa:new _.Km,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,wf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.Ta.includes(m.keyId)&&_.oi(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.Ta.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,wf));l=a.D.getConfiguration();m=a.keySystem();m=a.g.Sa[m];n=(n=m.modifiers)&&n.transformInitData;
163
- _.Cg(n)||(n=zm);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(_.F,6,6016,t));k.Fa&&k.Fa.reject(t);a.T(h);return}a.h.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.T(new _.H(_.F,6,6006,{browserError:t.message,
164
- error:t,extended:v},t))}})}else a.h.warn("Empty init data")})};cn=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};$m=function(a){a=a.f.values();return _.Lh(a,b=>b.loaded)};bn=function(a,b,c,d){if(!b&&c!==_.sf)return!1;d=b||tl(d);for(const e of a.f.values())if(b&&e.keyId===b||b&&e.Ta.includes(b)||c===_.sf&&(e.keyId||tl(e.initData))===d)return!0;return!1};
165
- an=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.Sa[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.Cg(g)||(g=ym);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===_.sf)return tl(c)||"";if(b===_.Uc){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
166
- _.fm(c);if(m)return m.a}else if(qm(l)){{f=new _.em(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.kl(m);const n=_.P(f);c=n>>>24;k=n&16777215;const q=_.il(f,16),t=_.ni(q);if(0<c){const D=_.P(f);f.skip(16*D)}const v=_.P(f),y=_.il(f,v),A=_.lm(y);_.Rg("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.h.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
167
- Rm=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.Sa[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
168
- const h=_.zi([g],a.g.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===ge&&d.Yb?fe:f?Wc:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===fe)a.D.onEvent(new _.C(Hd));qm(a.a.keySystem)&&dn(a,h);Rk(a.K,h);const k=Math.floor(b.timeStamp),l=Date.now();return en(a,h,d.sessionContext).then(()=>{_.nm(`drm.license.req.${k}.start`);a.h.debug("Sending DRM license request to",g,h);return a.D.mb.fetch(h).P}).then(m=>{_.nm(`drm.license.req.${k}.end`);
169
- _.om(`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=fn(a,m);let t="";q&&(t=` 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${t}`):a.h.info("License response for "+`SID:'${c.sessionId}'/`+`KID:'${d.keyId}' `+`${q} bytes `+`in ${n}ms${t}`);const v=Sk(a.K,m);_.nm(`drm.sess.update.${k}.start`);return c.update(m.data).then(()=>
170
- {_.nm(`drm.sess.update.${k}.end`);_.om(`drm.sess.update.${k}`,`drm.sess.update.${k}.start`,`drm.sess.update.${k}.end`);if(!f){var y=cn(a),A=v?Date.now()+1E3*v.delay:Number.NaN;y=new _.C(_.Jd,{keySystem:a.keySystem(),expirationTime:y,expectedRenewalTime:A});a.D.onEvent(y);d&&(d.ob&&d.ob.resolve(),d.Yb&&(y=d.Yb,a.h.info(`Closing expired session '${y.sessionId}'`),pm(y).catch(()=>{a.h.warn("Unable to close expired session in time")}),(y=a.f.get(d.Yb))&&y.pc&&y.pc.stop(),a.f.delete(d.Yb),d.Yb=null),(new _.zj(()=>
171
- {a.ra||(d.loaded=!0,d.Fa&&d.Fa.resolve(),$m(a)&&(a.o||a.h.info(ta),a.o=!0,a.B=!1,a.F.resolve()))})).ca(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||v&&Qk(a.keySystem()))&&(y=new _.zj(()=>{!a.ra&&a.K&&(a.h.info("Updating CSL Sessions"),qm(a.keySystem())?Om(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.pd)&&c.update(_.$h("renew")))}),d.pc=y,y.ca(v?v.delay:d.sessionContext.ldlDelay)))}})},m=>_.w(function*(){if(!a.ra){var n=m.data.headers;n=Object.assign({message:_.Pa,
172
- url:m.data.url,status:m.data.status,response:m.data.response},n?{headers:n}:{},Ul(n));n=new _.H(_.F,6,6007,n,m);a.T(n);d&&d.ob&&d.ob.reject(n);d&&d.Fa&&d.Fa.reject(n)}})).catch(m=>{a.ra||(m===Bb?a.h.info("Ignore update for closed sessions"):(m=new _.H(_.F,6,6008,{browserError:m.message}),a.T(m),d&&d.ob&&d.ob.reject(m),d&&d.Fa&&d.Fa.reject(m)))})};
173
- dn=function(a,b){var c=Yh(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(_.Qf).textContent;b.body=_.li(a.querySelector("Challenge").textContent).buffer}else a.h.debug("PlayReady request is already unwrapped."),b.headers[ra]="text/xml; charset\x3dutf-8"};
174
- en=function(a,b,c){return _.w(function*(){const d=a.D.getConfiguration();yield Tm(a,d);const e=a.keySystem();var f=a.g.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(_.pd)&&b.requestModifiers.push(k=>_.wl(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.pd)&&b.responseModifiers.push(k=>_.xl(k))})};
175
- fn=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.Wh(_.li(b))).ti}catch(c){a.h.warn("Unable to parse DRMtoday Request ID",c)}return""};_.jn=function(a,b){a&&b&&(_.gn.set(a,b),_.hn.info(`Registered TextDisplayerFactory: '${a}'`))};
176
- _.kn=function(a,b){b=b.find(c=>(c=_.gn.get(c))?c.isSupported(a):!1);if(null==b)return _.hn.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.hn.info(`Chosen the text displayer: ${b}`);return _.gn.get(b)};_.ln=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})}}};
177
- mn=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};nn=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};on=function(a){return a.a.map(b=>_.yg(b))};
178
- _.pn=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:[]}};rn=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=qn.value().get(b),c.one(a,b,d))};
179
- vn=function(a){a.h.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>sn(a,d.type);a.a.on(b,_.Pd,()=>{a.g||(a.j=!1,tn(a,_.un))});a.a.on(b,Pc,c);a.a.on(b,_.Te,()=>{a.F=!0;a.j=!1;sn(a,_.Te)});a.a.on(b,_.Ie,()=>{a.F=!1;a.j=!1;sn(a,_.Ie)});a.a.on(b,_.Ff,c);a.a.on(b,_.ff,c);a.a.on(b,_.nf,d=>{a.g=!1;a.j=!1;sn(a,d.type)});a.a.on(b,_.of,d=>{a.g=!0;sn(a,d.type)});a.a.on(b,tf,c);a.a.on(b,_.dg,()=>{a.j=!0;sn(a,_.dg)});a.a.on(b,_.Qd,d=>a.T(d));a.a.on(b,_.le,c);a.a.on(b,Qc,()=>{a.C=
180
- !0;sn(a,Qc)});a.a.on(b,_.Pf,d=>{a.g=!0;sn(a,d.type)});a.a.on(b,_.Of,d=>{a.g=!1;a.j=!1;sn(a,d.type)})};wn=function(a,b){return Object.keys(b)[a]};yn=function(a,b){const c={type:_.vf};b===_.Oc||b===_.Nc?(c.reason=a.w,b===_.Oc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.xn&&(c.reason=a.w),a.A===_.xn&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
181
- tn=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.xn;a.A=a.f;a.f=b;a.A===_.un&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.xn?(a.K=a.o,a.w=a.g?1:2,a.h.info("Buffering started. Reason: "+wn(a.w-1,_.zn)),b=yn(a,_.Oc),a.Rb(_.Oc,b)):d&&(a.B=a.o-a.K,a.h.info("Buffering finished. Reason: "+wn(a.w-1,_.zn)+". Buffering time: "+a.B+" ms"),b=yn(a,_.Nc),a.Rb(_.Nc,b));b=wn(a.A,_.An);c=wn(a.f,_.An);a.h.info(`Player state change: ${b} -> ${c}`);a.Rb(_.vf,yn(a,""));return!0};
182
- sn=function(a,b){if(a.f===_.Bn)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,tn(a,_.un));else if(b!==_.Ff){var 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.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===_.Cn,g=typeof a.l===_.r&&2>=a.l&&a.j;e=a.g||
183
- f||e||g;!a.M||a.m.isLive()||a.f!==_.xn||e||(f=b===_.nf&&4===a.l,(g=a.A===_.Dn)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=tn(a,_.xn):c?f=tn(a,_.En):a.F&&(f=tn(a,_.Fn));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: "+wn(a.f,_.An))}}};
184
- Gn=function(a){a=(new _.vh(a)).ya;if(!a)return null;a=a.toUpperCase();return _.di(a,".MPD")?_.tc:_.di(a,".M3U8")?_.uk:_.di(a,".MP4")?_.Yf:_.di(a,"MANIFEST")||_.di(a,".ISM")?_.zc:null};_.In=function(a){let b;Dk(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.yf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Hn(b[c]);d&&a.push(d)}return a};
185
- Hn=function(a){let b=null;_.Eg(a)&&(a={url:a});typeof a===_.ye&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.z(a.drmProtected)||typeof a.drmProtected!==_.Mc||(b.drmProtected=a.drmProtected),_.z(a.isLive)||typeof a.isLive!==_.Mc||(b.isLive=a.isLive),_.z(a.name)||typeof a.name!==_.yf||(b.name=a.name),_.z(a.Eb)||typeof a.Eb!==_.yf||(b.Eb=a.Eb),_.z(a.audioMimeType)||typeof a.audioMimeType!==_.yf||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Gn(a.url),b.type?Jn.debug("Detect media type "+
186
- b.type+" for "+a.url):Jn.warn("Unable to detect media type for "+a.url));return b};Ln=function(a){return a.w?Kn():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.Qd);a.g.off(c,_.lf);a.a=null}b()})};Kn=function(){return Promise.reject(new _.H(_.F,7,7E3))};
187
- Nn=function(a,b){return a.w?Kn():new Promise(c=>{a.a||(a.g.on(b,_.Qd,()=>{{const d=Mn(a);if(d)a.onError(d)}}),a.g.on(b,_.lf,()=>{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(_.Lc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
188
- Pn=function(a){return _.w(function*(){if(a.w)return Kn();var b=a.ea[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.Wk(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=new _.On({mb:c,onError:d=>a.onError(d),ke:()=>{},je:(d,e)=>{a.trigger(new _.C(_.Gd,{expirationTime:e}))},onEvent:d=>{d instanceof _.C?a.dispatchEvent(d):a.log.debug(_.Jb,
189
- d.type)},getConfiguration:()=>a.getConfiguration(),xc:()=>a.xc()});a.o.g=b;yield _.Jm(a.o,[{id:0,language:_.If,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:_.Yf,codecs:"",encrypted:!0,keyId:null,language:_.If,originalLanguage:_.If,label:null,type:_.u,primary:!1,frameRate:void 0,zh:void 0,
190
- trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,lh:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.Zm(a.o,a.a);return Promise.resolve()})};Qn=function(a,b){rn(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.Bn&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
191
- Mn=function(a){if(null===a.ea||!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(_.F,3,3016,{code:b,th:c,message:a.a.error.message})};
192
- Sn=function(a){if(a.w)return new _.Rn(Kn(),()=>{});const b=a.ea[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&Qn(a,c);if(d.preload!==_.xe)a.g.one(d,_.le,()=>{const g=Date.now()/1E3-e;a.f.A=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Dj()||_.Gj())&&d.load();const f=new _.Km;a.g.one(d,tf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.C||(a.C=(new _.zj(()=>{f.reject(new _.H(_.F,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
193
- uri:b.url},d.error))})).ca(g))});rn(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject(Mn(a)):d.preload===_.xe&&(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,_.Qd,()=>{f.reject(Mn(a))});return new _.Rn(f,
194
- ()=>{const g=new _.H(_.F,7,7001);f.reject(g);return Promise.resolve()})};Tn=function(a,b){rn(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{if(a.isLive()&&a.getState()!==_.Bn){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)}))}})};
195
- Un=function(a,b){let c=!1;a.g.on(b,_.of,()=>{c=b.paused});a.g.on(b,_.nf,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};_.Xn=function(a){a&&(0<=Vn.indexOf(a)?Wn.warn(`Factory '${a.name()}' is already registered`):(Vn.push(a),Wn.info(`Factory ${a.name()}' has been registered.`)))};Zn=function(a,b){let c=Vn.find(d=>d.isSupported(a,b));c||(c=new Yn);Wn.info(`Chosen ads: ${c.name()}`);return c};
196
- _.$n=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};_.ao=function(a,b){a.classList.add(b)};_.bo=function(a,b){if(a&&typeof b===_.ye)for(const c in b)a.style[c]=b[c]};_.co=function(a){return document.createElement(a)};
197
- eo=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.g.values());jh(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};fo=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.g.add(b))};
198
- go=function(a,b,c){(_.Gj()&&53===Hj().major||_.Gj()&&68===Hj().major||_.Ij())&&!b.hasAttribute(wd)&&(b.style.opacity="0",b.setAttribute(wd,""),a.j.one(b,Ld,()=>{b.removeAttribute(wd);b.style.opacity="1";c&&(c.style.opacity="1")}))};
199
- ko=function(a){a.a.on(window,"offline",()=>{ho(a,!1)});a.a.on(window,"online",()=>{a.f||io(a)});a.a.on(a.m,tf,()=>jo(a));a.a.on(a.m,"suspend",()=>jo(a));a.a.on(a.m,_.dg,()=>jo(a));a.a.on(a.m,_.Te,()=>{a.f||io(a)});a.a.on(a.m,_.df,()=>{a.f||io(a)});a.a.on(a.m,_.vf,()=>{switch(a.m.getState()){case _.xn:jo(a);break;default:jo(a)}})};lo=function(a){a.g&&(a.g.stop(),a.g=null)};jo=function(a){a.f&&io(a)};
200
- mo=function(a){return _.w(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Ji(a.j,b.url,b.attemptParameters,b.method),ho(a,b))})};io=function(a){a.m.getConfiguration().connectivityCheck&&(lo(a),a.g=(new _.zj(()=>mo(a))).ca(5))};ho=function(a,b){lo(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.C(Ee,{online:a.f})))};oo=function(){for(let a=0;a<no.length;++a)no[a].nc()};
201
- _.po=function(a,b){b=b||0;a={priority:b,nc:a};for(let c=0;c<no.length;c++)if(no[c].priority<b){no.splice(c,0,a);return}no.push(a)};qo=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};so=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 ro(b[0],b[1],b[2]);a.a=b}return a.a};
202
- to=function(a){switch((a.ea[0]||{src:"",type:""}).type){case _.tc:a="dash";break;case _.zc:a="ss";break;case _.uk:a="hls";break;case _.Yf:a="mp4";break;default:a=""}return a};uo=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};vo=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
203
- wo=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};xo=function(a){a=a.drmInfo;return(new _.vh(a&&a.licenseServerUri||"")).Ja};yo=function(a){const b=a.configuration;let c="no";b.drm&&!_.Gg(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Kd)||xo(a).endsWith("drmtoday.com"))&&(c=Kd);return c};zo=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.ud:b="wv";break;case _.sd:b="pr";break;case _.pd:b="fps"}return b};
204
- Ao=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Bo=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Wa:case Ta:b="L1";break;case Va:b="L2";break;case _.Ab:case _.zb:b="L3"}return b};
205
- Fo=function(a,b){const c="ie"===_.bk().browser;var d=b.configuration;const e=[...Array.from(_.Ek.keys()),...b.Jg];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":uo(d),"CL-ASSET-ID":vo(d),"CL-SESSION-ID":wo(d),"CL-PLAYBACK-TYPE":b.isLive?Co:Do,"CL-CONTENT-TYPE":to(b),"CL-PLUGINS":e.join(" "),"CL-DRM":yo(b),"CL-DRM-CDM":zo(b),"CL-DRM-SEC-LEVEL":Bo(b),"CL-DRM-OFFLINE":Ao(b),"CL-DRM-IP":xo(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=
206
- _.zi(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Eo).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=so(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+
207
- "!";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(ab+k);g=Promise.reject(new _.H(_.F,7,g,k))}}return g})};_.Ho=function(a){a&&(0<=Go.indexOf(a)||Go.push(a))};Jo=function(a,b){a.w=new Io(b);a.w.verify().catch(c=>{setTimeout(()=>{a.h.error(ab+c);a.trigger(new _.C(_.Qd,{detail:new _.H(_.F,7,7101)}));a.destroy()},1E3)})};
208
- Lo=function(a,b){a.H=b;for(const c of a.H)(b=c.id())&&(a.I[b]=c);_.Ko(a,"onPlayerCreated")};_.Mo=function(a,b){b!==a.a&&(a.a&&(a.a.removeDelegate(a),a.a.destroy()),a.a=b,a.a&&(a.a.init(a.g,a.f),a.a.setNetworkEngine(a.getNetworkEngine()),a.a.addDelegate(a)))};
209
- No=function(a,b){_.w(function*(){a.g.getMedia()||a.g.getCastElement();a.w||(a.w=new Io(a.f.license));try{a.h.debug("Verifying license remotely"),yield Fo(a.w,b),a.h.debug("License verified remotely")}catch(c){a.h.debug("License rejected by remote",c),setTimeout(qo,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.Ko=function(a,b,...c){if(!a.O)return Promise.resolve();const d=a.H.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
210
- Oo=function(a){return _.w(function*(){if(a.F)return a.h.debug("The player is already released. No-op"),new Promise(b=>b());a.J.off(document,bg);a.trigger(new _.C(_.hf));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(_.vf,d=>{b=d});return _.Ko(a,_.Ce).then(()=>{a.a.removeDelegate(a);return Promise.all([a.a.release(),a.A.release()])}).then(()=>{a.h.debug("Releasing player completed");b&&(a.h.debug("Re-post state change event after release"),a.trigger(b))}).finally(()=>
211
- {a.a.off(_.vf,c);a.trigger(new _.C(gf))})}a.trigger(new _.C(gf));return new Promise(b=>b())})};
212
- Qo=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(_.Tg);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Hb: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?(_.Ug.debug("Player Factory '"+f.Hb.a()+"' can play",b[g]),f=new Po(f.Hb,g)):(_.Ug.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Hb.create(),d({player:e,sourceIndex:f.sourceIndex})):
213
- (d=new _.C(_.Qd,{detail:new _.H(_.F,7,7003)}),a.trigger(d),e(d))})};
214
- _.To=function(a,b){return _.w(function*(){_.nm(Qe);if(a.C)throw Error("Player is already destroyed.");if(!a.g)throw Error("No surface associated with this player!");yield a.release();if(!b)throw new _.H(_.F,7,7003,kb);a.o=_.In(b);a.f=_.Ck(a.K,Dk(b)?b:{},{source:a.o});if(0===a.o.length)throw new _.H(_.F,7,7003,kb);a.F=!1;let c;var d=0;if(a.G||2!==(a.a?a.a.canPlay(a.o[0],a.f):0))d=yield Qo(a,a.o,a.f),c=d.player,d=d.sourceIndex,a.G=!1;c?_.Mo(a,c):a.a.addDelegate(a);Ro(a);a.a&&a.a.setCdnErrorCallback(a.B);
215
- So(a,a.f);a.a&&a.a.setSourceIndex(d);if(a.f.pauseWhenInBackground)a.J.on(document,bg,()=>{document.hidden?(a.h.debug("Player is hidden: pausing..."),a.pause()):(a.h.debug("Player is visible: resuming..."),a.play())});Lk(a);yield _.Ko(a,"onContentWillLoad",a.f.source[d]);_.nm(Pe);_.om("player.beforeLoad",Qe,Pe)})};_.Uo=function(a){return _.w(function*(){a.g.getMedia()||a.g.getCastElement();a.trigger(new _.C(me));yield Promise.all([a.a.load(a.f),a.j.load()])})};
216
- _.Wo=function(a){return _.w(function*(){_.nm(Oe);No(a,{configuration:a.getConfiguration(),ea:a.Ye(),drmInfo:a.getDrmInfo(),Jg:Object.keys(a.I),isLive:a.isLive()});Vo(a);Mk();yield _.Ko(a,"onContentLoaded");a.f.autoplay&&(yield a.play());_.nm(Ne);_.om("player.afterLoad",Oe,Ne)})};Xo=function(a){return _.w(function*(){if(a.a){var b=a.a;b.rf?(a.trigger(new _.C(me)),yield b.rf(),yield _.Wo(a)):a.h.warn(tb)}else a.h.warn(qb)})};
217
- Ro=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.w(function*(){a.sc&&a.Ld&&(a.Ld=!1,yield a.sc(b))}))};So=function(a,b){a.j=Zn(a,b).create(a)};
218
- Yo=function(a){const b=_.hh(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().ga().filter(f=>c?f.kind===_.Rd:f.kind!==_.Rd);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=_.Jh(e.language||""),b.push(e)):(e=a.getTrackManager().Ea())&&e.language&&(e=_.Jh(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=>
219
- {const g=_.Jh(f);if(f=d.find(h=>{h=_.Jh(h.language||"");return _.Kh(h,g)}))return a.getTrackManager().Ha(f),!0;c&&a.h.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};Vo=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);Yo(a)})};
220
- Zo=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(ad);return Array.from({length:3}).map(()=>{const d=document.createElement(_.u);d.classList.add(dd);const e=document.createElement(_.Bd);e.classList.add(cd);e.appendChild(d);c.appendChild(e);return new Q(d,b)})};
221
- $o=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(ed)):(a.h.info(`Hide video element .${b}`),d.classList.remove(ed)),a.A&&a.A(d,c))};cp=function(a,b){return _.w(function*(){const c=yield a.w.get();a.f=b;b.role=ap;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();$o(a,c,!0);yield c.load(b.config);bp(a,b);b.config.autoplay||(yield c.play())})};
222
- gp=function(a){_.w(function*(){if(0===a.a)yield dp(a);else if(a.a===a.g.length-1)yield ep(a);else{const b=[a.a-1,a.a+1];a.h.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>fp(a,c)))}})};
223
- hp=function(a,b){return _.w(function*(){if(b.player){if(b.state===af){a.h.info(Pb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=ap;$o(a,b.player,!0);b.state===$e?(_.nm(Xe),a.o.preloadMedia?yield b.player.play():yield Xo(b.player),_.nm(We),_.om("playlist.next",Xe,We)):b.state===Ze&&(yield b.player.load(b.config));bp(a,b);b.config.autoplay||(yield b.player.play())}})};
224
- kp=function(a,b){return _.w(function*(){a.h.info(`Stop current playback (index: ${b.index})`);b.player.pause();$o(a,b.player,!1);yield ip(a,b);b.player=null;b.videoEl=null;b.role=jp})};mp=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>lp(a,b)))};np=function(a){return _.w(function*(){yield a.w.destroy();const b=document.getElementById(a.o.anchorId);b&&(b.classList.remove(ad),b.innerHTML="")})};
225
- lp=function(a,b){return _.w(function*(){const c=a.l.get(b);c&&(a.h.info(`Stop preloading item (index: ${b})`),c.player&&(yield ip(a,c)),a.l.delete(b))})};ip=function(a,b){return _.w(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.w.release(b.player))})};bp=function(a,b){if(a.o.autoplayNext){const c=()=>{a.h.info("Automatically transition to next item");a.pf()};b.player.on(_.Pd,c);const d=b.player;b.disposers.push(()=>{d.off(_.Pd,c)})}};
226
- fp=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=jp;d.state=af;a.trigger(new _.C(Kf));try{a.l.set(b,d),a.o.preloadMedia?(d.config.autoplay&&(a.h.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=$e,a.trigger(new _.C(Kf))}catch(e){7001===e.code?(a.h.info(`Preload aborted (index: ${b})`),d.state=Ye):
227
- (a.h.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.C(_.Qd,{detail:e})),d.state=Ze),a.trigger(new _.C(Kf))}})};dp=function(a){return _.w(function*(){const b=a.a+1;a.h.info(`Preload following item (index: ${b})`);yield fp(a,b)})};ep=function(a){return _.w(function*(){const b=a.a-1;a.h.info(`Preload preceding item (index: ${b})`);yield fp(a,b)})};
228
- _.pp=function(a){if(op.has(a))return op.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);op.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),op.set(a,b),b):!1};qp=function(a,b){b=b.replace(/mp2t/i,"mp4");a==_.p&&(b=b.replace(_.u,_.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};
229
- rp=function(a,b,c){a.classList.add(ad);return Array.from({length:b}).map(()=>{const d=document.createElement(_.u);d.classList.add(dd);const e=document.createElement(_.Bd);e.classList.add(cd);e.appendChild(d);a.appendChild(e);return new Q(d,c)})};
230
- sp=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(ed),d.classList.remove("clpp-hide")):(a.h.info(`Hide video element .${b}`),d.classList.remove(ed),d.classList.add("clpp-hide")),a.w&&a.w(d,c))}};tp=function(a){return _.w(function*(){const b=a.a;b&&("loaded"!==b.state&&(yield b.Wc),yield b.player.play(),b.state=_.Te,b.gc&&b.gc())})};up=function(a,b){a.A=b;const c=a.a&&a.a.player;c&&sp(a,c,!b)};
231
- wp=function(a,b){return _.w(function*(){if(b.player){if(b.state===af){a.h.info(Pb);try{yield b.preloadPromise}catch(c){}}a.a=b;b.role=vp;sp(a,b.player,!0);b.state="loading";b.state===$e?yield b.player.play():b.state===Ze&&(yield b.player.load(b.config));b.config.autoplay||(yield b.player.play());b.state=_.Te}})};yp=function(a,b){return _.w(function*(){yield xp(a,b);b.config.autoplay||(yield b.player.play());b.state=_.Te})};
232
- zp=function(a,b){const c=b.transition;if(c){if(c.fc){const d=c.fc,e=()=>{a.h.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.on(_.Pd,e);b.disposers.push(()=>{b.player.off(_.Pd,e)})}if(c.ff){const d=e=>{const f=c.ff.find(g=>g.cueId===e.detail.id);f&&(a.h.info(`Transition onCue to (ID: ${f.itemId})`),a.play(f.itemId))};b.player.on(_.dh,d);b.disposers.push(()=>{b.player.off(_.dh,d)})}if(c.lf){const d=c.lf,e=()=>{b.player.getPosition()>=d.position&&(a.h.info(`Transition onPosition to (ID: ${d.itemId})`),
233
- a.play(d.itemId))};b.player.on(_.Ff,e);b.disposers.push(()=>{b.player.off(_.Ff,e)})}}};Bp=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=Ap;c.pause();yield a.l.release(c);sp(a,c,!1)})};Dp=function(a){return Promise.all(Array.from(a.f.keys()).map(b=>Cp(a,b)))};
234
- Fp=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=>Ep(a,d)))}})};xp=function(a,b){return _.w(function*(){const c=yield a.l.get();a.a=b;b.role=vp;a.a.player=c;a.a.videoEl=c.getSurface().getMedia();sp(a,c,!0);b.primary&&a.trigger(new _.C(bf,{detail:{player:c}}));b.state="loading";b.Wc=yield c.load(b.config);b.state="loaded"})};
235
- Gp=function(a){return _.w(function*(){yield a.l.destroy();const b=a.o.anchorEl;b&&(b.classList.remove(ad),b.innerHTML="")})};Hp=function(a){a.a&&(a.a.disposers.forEach(b=>b()),a.a.disposers=[],zp(a,a.a),Dp(a),Fp(a,a.a.next))};Cp=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))})};
236
- Ep=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=Ap;b.state=af;a.trigger(new _.C(Kf));try{a.f.set(c,b),b.config.autoplay&&(a.h.warn(ka+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1),b.primary&&a.trigger(new _.C(bf,{detail:{player:d}})),b.preloadPromise=d.load(b.config),yield b.preloadPromise,b.state=$e,a.trigger(new _.C(Kf))}catch(e){7001===e.code?(a.h.info(`Preload aborted (ID: ${c})`),b.state=Ye):(a.h.warn(`Preload failed (ID: ${c})`,
237
- e),a.trigger(new _.C(_.Qd,{detail:e})),b.state=Ze),a.trigger(new _.C(Kf))}})};Ip=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.yf&&typeof b.DURATION===_.r):!1};Jp=function(a){a.g.forEach(b=>b());a.g=[]};
238
- Op=function(a,b){const c=()=>_.w(function*(){var e=b.getPosition();if(e=Kp(a,e))a.h.info(`Interstitial ${e.cueId} coming up `+`at ${e.startTime} s`),(yield Lp(a,e))&&Mp(a,e,b)});b.addEventListener(_.Ff,c);a.g.push(()=>{b.removeEventListener(_.Ff,c)});const d=()=>{a.trigger(new _.C(Np))};b.on(_.Pd,d);a.g.push(()=>{b.off(_.Pd,d)})};
239
- Qp=function(a,b,c){return _.w(function*(){if(b.source){a.a.dd([{id:cf,primary:!0,config:_.yg(b),next:[]}]);yield a.a.load(cf);var d=a.a.ub();d&&d.pd()?(d=Array.from(d.pd().cues()),Pp(a,d,c)||(up(a.a,!1),c||(yield tp(a.a)))):a.h.error("Failed to get cue timeline after load")}else a.h.error("Config must be of type cl.api.PlayerConfiguration")})};
240
- Pp=function(a,b,c){var d=b.filter(f=>f.schemeIdUri===_.qd&&f.Pa);a.h.info("Interstitial cues found",d);if(!Rp(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&&Sp(a,b,c);0<e.length&&e.forEach(f=>Tp(a,f));d.forEach(f=>Up(a,f));a.trigger(new _.C(Vp,{detail:a.Oc()}));return!!b};
241
- Rp=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[_.Ub],k=g.Pa[_.Vb];g.Pa[_.Tb]||h?null!=k&&1>k&&a.h.warn(`Interstitial cue ${g.id} is invalid `+"X-PLAYOUT-LIMIT is less than 1 s.",
242
- 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};
243
- Sp=function(a,b,c){_.w(function*(){const d=Up(a,b),e=yield Lp(a,d),f=d.Aa?d.Aa.length:0;e&&0<f?Wp(a,d,c):(e?a.h.warn("Preroll interstitial has no assets, skipping"):a.h.error("Preroll interstitial failed, skipping"),up(a.a,!1),c||(yield tp(a.a)))})};
244
- Tp=function(a,b){return _.w(function*(){const c=Up(a,b);a.h.info(`Interstitial ${c.cueId} coming up `+`at ${c.startTime} s`);if(yield Lp(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===_.Te?Mp(a,c,d):e.gc=()=>{Mp(a,c,d)}}}})};
245
- Up=function(a,b){{const c=b.Pa[_.Wb];b={cueId:b.id,startTime:b.startTime,endTime:b.endTime,state:Xp,Ce:b.Pa[_.Tb],De:b.Pa[_.Ub],Aa:null,resumePosition:null==c?b.endTime:b.startTime+c,playoutLimit:b.Pa[_.Vb]}}a.j.push(b);return b};
246
- Lp=function(a,b){return _.w(function*(){b.state=Yp;const c={id:b.cueId,startTime:b.startTime,endTime:b.endTime,resumePosition:b.resumePosition,itemCount:-1,playoutLimit:b.playoutLimit};a.trigger(new _.C(Zp,{detail:c}));if(b.Ce)try{a.h.info(`Load X-ASSET-LIST for ${b.cueId}`),a.trigger(new _.C($p,{detail:c})),b.Aa=yield aq(a,b.Ce),b.state=bq,c.itemCount=b.Aa.length}catch(d){a.h.error("Failed to load X-ASSET-LIST",d),b.state=cq}finally{a.trigger(new _.C(dq,{detail:c}))}else b.De?(b.Aa=[{URI:b.De,DURATION:b.endTime-
247
- b.startTime}],b.state=bq):b.state=cq;return b.state===bq})};Wp=function(a,b,c){_.w(function*(){const d=a.a.getCurrentItem();if(d){var e=eq(a,b,"preroll");a.a.dd(e);fq(a,d,b,e,!0);Hp(a.a);b.state=bq;c?yield a.a.load(e[0].id):yield a.a.play(e[0].id);up(a.a,!1)}})};
248
- Mp=function(a,b,c){if(b.Aa)if(0===b.Aa.length){const g=()=>{c.seek(b.resumePosition)};c.on(_.dh,g);a.g.push(()=>{c.off(_.dh,g)});a.h.info(`Interstitial ${b.cueId} scheduled to `+"be skipped")}else{var d=a.a.getCurrentItem();if(d){var e=eq(a,b);a.a.dd(e);var f=e[0].id;fq(a,d,b,e,!1);d.next=[f];d.transition={ff:[{cueId:b.cueId,itemId:f}]};Hp(a.a);b.state=bq;a.h.info(`Interstitial ${b.cueId} scheduled for `+`${b.startTime} s`);a.trigger(new _.C(gq,{detail:{id:b.cueId,startTime:b.startTime,endTime:b.endTime,
249
- resumePosition:b.resumePosition,itemCount:e.length,playoutLimit:b.playoutLimit}}))}}};Kp=function(a,b){return a.j.find(c=>{const d=c.startTime-b;return c.state===Xp&&0<d&&d<=a.f.resolutionOffsetSec})||null};aq=function(a,b){return _.w(function*(){var c=a.a.ub();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.zi(b);c=yield Ii(c,d);if(!Ip(c))throw new sh("Invalid X-ASSET-LIST list response");return Promise.resolve(c.ASSETS)})};
250
- eq=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?cf:`${b.cueId}-${g+1}`;d+=f.DURATION;f={id:h,config:{source:{url:f.URI,type:_.uk}},next:[g],transition:{fc:g},duration:f.DURATION,Ne:d,vh:b.cueId};return a.f.interstitialAssetConverter?a.f.interstitialAssetConverter(f):f});e.forEach((f,g)=>{f.gc=()=>{a.h.info(`Playing interstitial asset ${f.id}`,f);a.trigger(new _.C(hq,{detail:{id:f.id,podId:b.cueId,uri:f.config.source.url,duration:f.duration,
251
- podOrder:g+1,podCount:b.Aa.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.Ne-k.duration<=f);const g=e[e.length-1],h=Math.abs(g.Ne-f);1>h?g.transition.fc=cf:(g.transition.fc=void 0,g.transition.lf={position:g.duration-h,itemId:cf});g.next=[cf]}e[0].gc=()=>{a.h.info(`Playing interstitial ${c} ${b.cueId} with `+`${b.Aa.length} assets and will resume primary `+`content at ${b.resumePosition} s.`,e);a.h.info(`Playing interstitial asset ${e[0].id}`,
252
- e[0]);a.trigger(new _.C(iq,{detail:{id:b.cueId,startTime:b.startTime,endTime:b.endTime,resumePosition:b.resumePosition,itemCount:e.length,playoutLimit:b.playoutLimit}}));a.trigger(new _.C(hq,{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};
253
- fq=function(a,b,c,d,e){b.gc=()=>{a.h.info("Resuming primary content at "+`${b.config.startTime} s.`);a.trigger(new _.C(jq,{detail:{id:c.cueId}}));c.state=kq;a.a.removeItems(d.map(f=>f.id));b.next=[];e&&a.trigger(new _.C(lq))};b.config.startTime=c.resumePosition};mq=function(a,b){a.size=void 0===b?0:1;a.h.debug("Setting key status to",b);a.a=b};
254
- nq=function(a,b){a.f=b;_.Xg(a.a);if(!b)return Promise.resolve();a.a.on(b,Nd,c=>{_.Rg("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,jg,c=>{{a.h.debug("Handle webkitNeedKey event");c=_.J(c.initData);if(_.Th(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=Yh(c.subarray(4),
255
- !0);c=_.$h(c);const d=new Event(Nd);d.initDataType="skd";d.initData=Uh(c);a.f.dispatchEvent(d)}});rn(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.g));return Promise.resolve()};oq=function(a,b){mq(a.keyStatuses,b);b=new _.C(de);a.dispatchEvent(b)};
256
- rq=function(a,b){a.a=b;_.Xg(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(Nd);d.initDataType=_.Uc;d.initData=Uh(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=pq(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.C(_.qe,{messageType:d?ge:fe,message:c.message});d=e;_.Rg("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.Sg("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{(c=pq(a,
257
- c.sessionId))&&c.ready()}),a.f.on(b,a.g+"keyerror",c=>{var d=pq(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?qq(d,_.He):1===e?qq(d,"expired"):qq(d,_.Zd))}}}))};
258
- pq=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};qq=function(a,b){mq(a.keyStatuses,b);b=new _.C(de);a.dispatchEvent(b)};sq=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
259
- tq=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===_.Ke)if(c)d=_.J(_.$h("LOAD_SESSION|"+c));else{const f=_.$h("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 _.Km;const e=sq(a,"generateKeyRequest");try{a.j[e](a.g,d)}catch(f){if(f.name!==Ya)return a.f=null,Promise.reject(f);(new _.zj(()=>{try{a.j[e](a.g,d)}catch(g){a.f.reject(g),
260
- a.f=null}})).ca(.01)}return a.f};uq=function(a,b,c){if(a.a)a.a.then(()=>uq(a,b,c)).catch(()=>uq(a,b,c));else{a.a=b;if(a.g===fg){var d=_.Wh(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=_.li(e.keys[0].k);e=_.li(e.keys[0].kid)}else d=_.J(c),e=null;var f=sq(a,"addKey");try{a.j[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
261
- vq=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.Td?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};wq=function(a){a=a.target;if(a.webkitPresentationMode===Le){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)};
262
- xq=function(){return this.webkitSupportsPresentationMode(Le)?(this.webkitSetPresentationMode(Le),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};yq=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
263
- zq=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};Aq=function(a,b,c){return new window.TextTrackCue(a,b,c)};Bq=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};Dq=function(a,b,c){if("input"===a)switch(this.type){case "range":a=Xc}Cq.call(this,a,b,c)};Eq=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
264
- Fq=function(a){return Eq()-a.a};Hq=function(a){const b=new Gq;b.a=a.a;return b};_.Iq=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.Kq=function(a,b,c,d){return _.w(function*(){try{return new (yield Jq(a,b,c,d))}catch(e){throw e.a(_.F),e;}})};
265
- Jq=function(a,b,c,d){return _.w(function*(){if(d){var e=_.Lq[d.toLowerCase()];if(e)return e;_.B("Could not determine manifest type using MIME type ",d)}if(e=_.Mq(a)){const f=_.Nq[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 Oq(a,b,c))){if(e=_.Lq[d])return e;_.B("Could not determine manifest type using MIME type",d)}throw new _.H(_.F,4,4E3,{url:a});})};
266
- _.Mq=function(a){a=(new _.vh(a)).ya.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};Oq=function(a,b,c){return _.w(function*(){var d=_.zi(a);xi(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).P).headers["content-type"])?d.toLowerCase():""})};Pq=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};
267
- Qq=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(Pq(a,e),Ci(c,e.byteLength,Fq(a.g)),a.g.a=Eq());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>Qq(a,b,c))})};
268
- Sq=function(a){const b=a.uris[a.uriIndex],c=new Rq,d=new Gq,e=Hq(d);let f=0,g;const h=new _.Km;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=Fq(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(qa),Bi(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
269
- const q={};for(const t of n)n=t.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const t=Fq(e);l||Ci(a,m.response?m.response.length:0,t);const v=_.Ai(q,m.response,m.status,b,m.responseURL,a,t,g);a.rateLimitBps?Di(a.rateLimitBps,Fq(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");
270
- for(var q of n)n=q.split(": "),t[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.Ai(t,m.response,m.status,b,m.responseURL,a,Fq(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=Fq(d);d.a=Eq();if(100<n||m.lengthComputable&&m.loaded===m.total)Ci(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,
271
- 7001,{url:b,request:a}));return Promise.resolve()}}};Tq=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};Uq=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)};
272
- Wq=function(a){if(0<=a.o&&a.f<a.o)return null;let b=Vq(a);for(;null!==b;){if(b.name===_.oe){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=Vq(a)}return null};
273
- Xq=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,Fq(a.w)),a.w.a=Eq());if(f)return e=Tq(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){Uq(a,g);var k=Wq(a);for(e=[];k;)e.push(k),k=Wq(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=
274
- c(!1,k))&&(h=e)}}return h.then(()=>Xq(a,b,c,d))})};
275
- Vq=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=$q(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=$q(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(_.F,3,3E3);}if(2097151<f)throw new _.H(_.F,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};
276
- $q=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
277
- cr=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=ar(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*ar(e.request.fuzzFactor,.5));a.f*=ar(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;br(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)});
278
- 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 _.H){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return cr(a);g&&e.a(_.F);a.w.reject(e)}else a.w.reject(e)})};br=function(a,b,c){a.o=setTimeout(b,c)};ar=function(a,b){return null===a||void 0===a?b:a};
279
- dr=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new sh("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 sh(`Parsing CMSD, not recognized value type of ${a}`);};
280
- gr=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}=dr(e[b]);Object.values(er).includes(f)&&d.set(f,g)}var c=d}catch(d){fr.error("CmsdManager parseCmsdDynamicHeader_ failed:",d),c=null}a.f=c}}}};
281
- kr=function(a){var b=new hr;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new ir,d={Jc:!1,Af:!1};b={P:jr(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.Af=!0;c.abort()},a);b.P=b.P.finally(()=>{window.clearTimeout(e)})}return b};
282
- jr=function(a,b,c,d){return _.w(function*(){let e,f,g;const h=new Gq,k=Hq(h);try{e=yield lr(a,c);g=Fq(h);const m=e.headers.get(qa);Bi(b,m);const n=m?parseInt(m,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const q=e.body.getReader();f=yield Xq(new mr(n,!b.disableMergedFragments),q,(t,v)=>{if(d.Jc)return null;v&&v.data&&(Ci(b,v.data.byteLength,Fq(h)),h.a=Eq());return b.onFragment&&v?b.rateLimitBps?Di(b.rateLimitBps,Fq(k),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},
283
- b.onProgress)}else{const q=e.body.getReader();f=yield Qq(new nr(n),q,b);b.rateLimitBps&&(yield Di(b.rateLimitBps,Fq(k),f.byteLength))}}catch(m){if(d.Jc)throw new _.H(1,1,7001,{url:a,request:b});if(d.Af)throw new _.H(1,1,1003,{url:a,request:b});_.Sg("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 _.Ai(l,f,e.status,a,e.url,b,Fq(k),g)})};
284
- pr=function(a){try{const b=a.uris[a.uriIndex],c=_.or(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()}}};
285
- _.or=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.Sg("Bad data URI, failed to parse scheme"),new _.H(_.F,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.Sg("Bad data URI, failed to extract encoding and MIME type"),new _.H(_.F,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?_.li(a).buffer:_.$h(a).buffer,contentType:c}};
286
- _.rr=function(a,b){a=_.uj(a.split(";")[0],vj(a));_.qr[a]=b};_.sr=function(a){a=_.uj(a.split(";")[0],vj(a));return _.qr[a]||null};_.tr=function(a){a=_.uj(a.split(";")[0],vj(a));delete _.qr[a]};_.yr=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case ur:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case vr:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case wr:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case xr:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.xe}};
287
- rg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;sg=typeof Object.defineProperties==_.Td?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
288
- tg("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=rg.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=
289
- 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 _.ye:var h=null!=g;break a;case _.Td:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
290
- b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.g(k);return}typeof h==_.Td?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();
291
- 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==_.Td?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: "+
292
- 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=qg(g),m=l.next();!m.done;m=l.next())d(m.value).fd(h,k)})};b.all=function(g){var h=qg(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 vg=this||self;
293
- vg.a=!0;_.x("clpp.utils.obj.cloneItem",_.yg);_.x("clpp.utils.obj.merge",_.xg);var Ng={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.x("clpp.log.Level",Ng);var Lg=3,Kg={},zr=[];_.x("clpp.log.getLoggers",function(){return _.yg(Kg)});_.x("clpp.log.addInterceptor",function(a){a&&zr.push(a)});_.x("clpp.log.removeInterceptor",function(a){a&&(a=zr.indexOf(a),0<=a&&zr.splice(a,1))});_.x("clpp.log.getTagLevel",Mg);_.x("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=Kg[a]});_.x("clpp.log.setTagLevel",function(a,b){a&&(_.Eg(b)&&(b=Og(b)),Kg[a]=b)});
294
- _.x("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.Eg(a)&&(a=Og(a));Lg=a});_.x("clpp.log.getLogLevel",function(){return Lg});
295
- _.R=class{constructor(a){(this.tag=a)&&void 0===Kg[a]&&(Kg[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=Mg(this.tag);if(0<=d){if(d<c)return}else if(Lg<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,
296
- arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of zr)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)}Yf(a){return a?
297
- this.tag?new _.R(this.tag+"."+a):new _.R(a):this}};_.x("clpp.log.Logger",_.R);_.R.prototype.createChild=_.R.prototype.Yf;_.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 Pg=new _.R("clpp");_.x("clpp.log.info",_.Qg);_.x("clpp.log.debug",_.Rg);_.x("clpp.log.warn",_.B);_.x("clpp.log.error",_.Sg);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Po;Po=class{constructor(a,b){this.Hb=a;this.sourceIndex=b}};_.Ug=new _.R("clpp.players");_.Tg={};_.Ar=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 Br,Cr;Br=class{constructor(a,b,c,d){this.f=a;this.nc=b;this.a=c;this.Ng=!!d}Rb(a){try{this.nc.handleEvent?this.nc.handleEvent(a):this.nc.call(this.a,a)}catch(b){_.Sg("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
298
- _.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(){}};
299
- Cr=class{constructor(a){this.a=new _.Ar;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].Rb(a),b[c].Ng&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new Br(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Br(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].nc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var Dr;_.Er=class{constructor(){this.a=new _.Ar}release(){_.Xg(this)}on(a,b,c,d=!1){a=new Dr(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||(Wg(f),this.a.remove(b,f))}}};Dr=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 Fr=class{constructor(a){this.m=a;this.o=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=null;this.f=new _.Er;this.a=this.l=null;this.g=[];this.h=new _.R("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}};_.Mr=class{constructor(a,b,c,d){d=void 0===d?_.Gr:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.Hr;this.writingMode=_.Ir;this.lineInterpretation=_.Jr;this.line=null;this.lineAlign=_.Kr;this.direction=Lr;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===
300
- a.payloadType}};_.x("clpp.text.Cue",_.Mr);_.Mr.positionAlign={LEFT:_.he,RIGHT:_.ie,CENTER:_.Vc,AUTO:"auto"};_.Gr="text";_.Mr.payloadType={TEXT:_.Gr,VTT_XML:_.cg,TTML_XML:_.Hf};_.Hr=_.Vc;_.Nr={LEFT:_.ee,RIGHT:_.mf,CENTER:_.Hr,START:_.ee,END:_.mf};_.Mr.textAlign=_.Nr;var Lr="ltr";_.Mr.direction={HORIZONTAL_LEFT_TO_RIGHT:Lr,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.Ir="horizontal-tb";_.Mr.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Ir,VERTICAL_LEFT_TO_RIGHT:_.Vf,VERTICAL_RIGHT_TO_LEFT:_.Wf};_.Jr=0;
301
- _.Mr.lineInterpretation={LINE_NUMBER:_.Jr,PERCENTAGE:1};_.Kr=_.uf;_.Or={CENTER:_.Vc,START:_.Kr,END:_.Od};_.Mr.lineAlign=_.Or;_.Rr=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.Pr;this.scroll=Qr;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.x("clpp.text.CueRegion",_.Rr);_.Pr=1;_.Rr.units={PX:0,PERCENTAGE:_.Pr,LINES:2};var Qr="";
302
- _.Rr.scrollMode={NONE:Qr,UP:"up"};_.Rr.displayAlign={BEFORE:"flex-end",CENTER:_.Vc,AFTER:"flex-start"};_.Rr.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.nd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var Sr=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.g=null;this.a=new _.Er;this.j=!1;this.h=new _.R("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,_.nc,b=>oh(this,b)),this.a.on(this.f,Xc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.pf&&(d.mode=
303
- _.Vd)}}}))}o(a){const b=new _.Mr(a.startTime,a.endTime,a.text,_.cg);if(_.Eg(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Vf;break;case "rl":b.writingMode=_.Wf}_.Fg(a.size)&&(b.size=a.size);if(_.Eg(a.align))switch(a.align){case _.ee:case _.uf:b.textAlign=_.ee;break;case _.Vc:b.textAlign=_.Hr;break;case _.mf:case _.Od:b.textAlign=_.mf}_.Fg(a.position)&&(b.position=a.position);if(_.Eg(a.positionAlign))switch(a.positionAlign){case _.he:b.positionAlign=_.he;break;case _.Vc:b.positionAlign=
304
- _.Vc;break;case _.ie:b.positionAlign=_.ie}_.Fg(a.line)&&(b.line=a.line);if(_.Eg(a.lineAlign))switch(a.lineAlign){case _.uf:b.lineAlign=_.Kr;break;case _.Vc:b.lineAlign=_.Vc;break;case _.Od:b.lineAlign=_.Od}typeof a.snapToLines===_.Mc&&(b.lineInterpretation=a.snapToLines?_.Jr:1);return b}};_.H=class extends Error{constructor(a,b,c,d,e){super(ph(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.Eg(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=ph(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",_.H);_.F=2;_.H.Severity={RECOVERABLE:1,FATAL:_.F};
161
+ cn=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=qn(a,d,e,f)}catch(v){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:v,initDataType:d,initData:e}),a.h.ignoreUnrecognizedInitData)return}if(!g&&rn(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);
162
+ if(h&&m.keyId===h){a.g.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(v){a.g.warn("Unable to close session",v)}k=!1}}if(k){a.g.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.D?_.Oe:Qf;var r=a.G.createSession(n);a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(v){a.W(new _.H(_.E,6,6005,{browserError:v.message}));return}a.w.on(r,_.ue,a.ga.bind(a));a.w.on(r,de,a.da.bind(a));k={hc:f,Dd:[],initData:e,initDataType:d,keyId:h,
163
+ ib:h?[h]:[],loaded:!1,te:Infinity,periodId:c,Db:null,Sa:new _.Zm,sessionContext:{ldlDelay:0,customData:{}}};k.Sa.catch(()=>{});f&&(l=a.f.get(f),k.sessionContext=l.sessionContext);a.f.set(r,k);h&&!a.j.get(h)&&a.j.set(h,Kf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.ib.includes(m.keyId)&&_.Di(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.ib.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,Kf));l=a.B.getConfiguration();m=a.keySystem();m=a.h.hb[m];n=(n=m.modifiers)&&n.transformInitData;
164
+ _.Qg(n)||(n=Om);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.l.f()})}catch(v){h=v;v instanceof _.H||(h=new _.H(_.E,6,6016,v));k.Sa&&k.Sa.reject(v);a.W(h);return}a.g.info(`Generate License Request for key ID: '${h}'`);r.generateRequest(d,e.buffer).catch(v=>{if(!a.Aa){var u=null;v.errorCode&&v.errorCode.systemCode&&(u=v.errorCode.systemCode,0>u&&(u+=Math.pow(2,32)),u="0x"+u.toString(16));a.W(new _.H(_.E,6,6006,{browserError:v.message,
165
+ error:v,extended:u},v))}})}else a.g.warn("Empty init data")})};sn=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};pn=function(a){a=a.f.values();return _.$h(a,b=>b.loaded)};rn=function(a,b,c,d){if(!b&&c!==_.Ff)return!1;d=b||Il(d);for(const e of a.f.values())if(b&&e.keyId===b||b&&e.ib.includes(b)||c===_.Ff&&(e.keyId||Il(e.initData))===d)return!0;return!1};
166
+ qn=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.hb[f];f=a.B.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.Qg(g)||(g=Nm);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===_.Ff)return Il(c)||"";if(b===_.Zc){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
167
+ _.rm(c);if(m)return m.a}else if(Fm(l)){{f=new _.qm(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.Al(m);const n=_.P(f);c=n>>>24;k=n&16777215;const r=_.yl(f,16),v=_.Ci(r);if(0<c){const F=_.P(f);f.skip(16*F)}const u=_.P(f),y=_.yl(f,u),C=_.xm(y);_.eh("Parsed PR PSSH Box","size",g,"name",h,"version",c,"flags",k,"size",u,"systemId",v,"keyId",C.a);e=C}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""};
168
+ fn=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.hb[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
169
+ const h=_.Oi([g],a.h.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===ge&&d.hc?fe:f?ad:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===fe)a.B.onEvent(new _.D(Md));Fm(a.a.keySystem)&&tn(a,h);hl(a.K,h);const k=Math.floor(b.timeStamp),l=Date.now();return un(a,h,d.sessionContext).then(()=>{_.zm(`drm.license.req.${k}.start`);a.g.debug("Sending DRM license request to",g,h);return a.B.Za.fetch(h).O}).then(m=>{_.zm(`drm.license.req.${k}.end`);
170
+ _.Am(`drm.license.req.${k}`,`drm.license.req.${k}.start`,`drm.license.req.${k}.end`);if(a.Aa)return Promise.reject();const n=Date.now()-l;var r=vn(a,m);let v="";r&&(v=` RID:${r}`);r=m&&m.data?m.data.byteLength:-1;f?a.g.info("WV Server certificate response for "+`SID:'${c.sessionId}' `+`${r} bytes `+`in ${n}ms${v}`):a.g.info("License response for "+`SID:'${c.sessionId}'/`+`KID:'${d.keyId}' `+`${r} bytes `+`in ${n}ms${v}`);const u=il(a.K,m);_.zm(`drm.sess.update.${k}.start`);return c.update(m.data).then(()=>
171
+ {_.zm(`drm.sess.update.${k}.end`);_.Am(`drm.sess.update.${k}`,`drm.sess.update.${k}.start`,`drm.sess.update.${k}.end`);if(!f){var y=sn(a),C=u?Date.now()+1E3*u.delay:Number.NaN;y=new _.D(_.Od,{keySystem:a.keySystem(),expirationTime:y,expectedRenewalTime:C});a.B.onEvent(y);d&&(d.Db&&d.Db.resolve(),d.hc&&(y=d.hc,a.g.info(`Closing expired session '${y.sessionId}'`),Bm(y).catch(()=>{a.g.warn("Unable to close expired session in time")}),(y=a.f.get(d.hc))&&y.Dc&&y.Dc.stop(),a.f.delete(d.hc),d.hc=null),(new _.Pj(()=>
172
+ {a.Aa||(d.loaded=!0,d.Sa&&d.Sa.resolve(),pn(a)&&(a.o||a.g.info(va),a.o=!0,a.C=!1,a.F.resolve()))})).ia(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||u&&gl(a.keySystem()))&&(y=new _.Pj(()=>{!a.Aa&&a.K&&(a.g.info("Updating CSL Sessions"),Fm(a.keySystem())?cn(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.ud)&&c.update(_.oi("renew")))}),d.Dc=y,y.ia(u?u.delay:d.sessionContext.ldlDelay)))}})},m=>_.x(function*(){if(!a.Aa){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}:{},fm(n));n=new _.H(_.E,6,6007,n,m);a.W(n);d&&d.Db&&d.Db.reject(n);d&&d.Sa&&d.Sa.reject(n)}})).catch(m=>{a.Aa||(m===Fb?a.g.info("Ignore update for closed sessions"):(m=new _.H(_.E,6,6008,{browserError:m.message}),a.W(m),d&&d.Db&&d.Db.reject(m),d&&d.Sa&&d.Sa.reject(m)))})};
174
+ tn=function(a,b){var c=mi(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(_.cg).textContent;b.body=_.Ai(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[ta]="text/xml; charset\x3dutf-8"};
175
+ un=function(a,b,c){return _.x(function*(){const d=a.B.getConfiguration();yield hn(a,d);const e=a.keySystem();var f=a.h.hb[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=>_.Ll(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.ud)&&b.responseModifiers.push(k=>_.Ml(k))})};
176
+ vn=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.ki(_.Ai(b))).ti}catch(c){a.g.warn("Unable to parse DRMtoday Request ID",c)}return""};_.yn=function(a,b){a&&b&&(_.wn.set(a,b),_.xn.info(`Registered TextDisplayerFactory: '${a}'`))};
177
+ _.zn=function(a,b){b=b.find(c=>(c=_.wn.get(c))?c.isSupported(a):!1);if(null==b)return _.xn.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.xn.info(`Chosen the text displayer: ${b}`);return _.wn.get(b)};_.An=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
+ Bn=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};Cn=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};Dn=function(a){return a.a.map(b=>_.Mg(b))};
179
+ _.En=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:[]}};Gn=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Fn.value().get(b),c.one(a,b,d))};
180
+ Kn=function(a){a.g.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>Hn(a,d.type);a.a.on(b,_.Ud,()=>{a.h||(a.j=!1,In(a,_.Jn))});a.a.on(b,Uc,c);a.a.on(b,_.af,()=>{a.F=!0;a.j=!1;Hn(a,_.af)});a.a.on(b,_.Me,()=>{a.F=!1;a.j=!1;Hn(a,_.Me)});a.a.on(b,_.Tf,c);a.a.on(b,_.pf,c);a.a.on(b,_.Af,d=>{a.h=!1;a.j=!1;Hn(a,d.type)});a.a.on(b,_.Bf,d=>{a.h=!0;Hn(a,d.type)});a.a.on(b,Hf,c);a.a.on(b,_.ng,()=>{a.j=!0;Hn(a,_.ng)});a.a.on(b,_.q,d=>a.W(d));a.a.on(b,_.le,c);a.a.on(b,Vc,()=>{a.D=
181
+ !0;Hn(a,Vc)});a.a.on(b,_.bg,d=>{a.h=!0;Hn(a,d.type)});a.a.on(b,_.ag,d=>{a.h=!1;a.j=!1;Hn(a,d.type)})};Ln=function(a,b){return Object.keys(b)[a]};Nn=function(a,b){const c={type:_.Jf};b===_.Tc||b===_.Pc?(c.reason=a.w,b===_.Tc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.C):(a.f===_.Mn&&(c.reason=a.w),a.A===_.Mn&&(c.reason=a.w,c.bufferedTimeMS=a.C),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
182
+ In=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.Mn;a.A=a.f;a.f=b;a.A===_.Jn&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.Mn?(a.K=a.o,a.w=a.h?1:2,a.g.info("Buffering started. Reason: "+Ln(a.w-1,_.On)),b=Nn(a,_.Tc),a.dc(_.Tc,b)):d&&(a.C=a.o-a.K,a.g.info("Buffering finished. Reason: "+Ln(a.w-1,_.On)+". Buffering time: "+a.C+" ms"),b=Nn(a,_.Pc),a.dc(_.Pc,b));b=Ln(a.A,_.Pn);c=Ln(a.f,_.Pn);a.g.info(`Player state change: ${b} -> ${c}`);a.dc(_.Jf,Nn(a,""));return!0};
183
+ Hn=function(a,b){if(a.f===_.Qn)a.g.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.h||(a.j=!1,In(a,_.Jn));else if(b!==_.Tf){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().ya(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===_.t&&2>a.l&&2===e.networkState;var f=typeof a.l===_.t&&0>=a.G&&a.f===_.Rn,g=typeof a.l===_.t&&2>=a.l&&a.j;e=a.h||
184
+ f||e||g;!a.M||a.m.isLive()||a.f!==_.Mn||e||(f=b===_.Af&&4===a.l,(g=a.A===_.Sn)&&!a.D?e=!0:g||a.D||f||(e=!0));f=!1;e?f=In(a,_.Mn):c?f=In(a,_.Tn):a.F&&(f=In(a,_.Un));f&&(a.D=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.h+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.l+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+f+", Current state: "+Ln(a.f,_.Pn))}}};
185
+ Vn=function(a){a=(new _.Ih(a)).Ka;if(!a)return null;a=a.toUpperCase();return _.si(a,".MPD")?_.yc:_.si(a,".M3U8")?_.Kk:_.si(a,".MP4")?_.gg:_.si(a,"MANIFEST")||_.si(a,".ISM")?_.Dc:null};_.Xn=function(a){let b;Tk(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Mf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Wn(b[c]);d&&a.push(d)}return a};
186
+ Wn=function(a){let b=null;_.Sg(a)&&(a={url:a});typeof a===_.Ce&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.A(a.drmProtected)||typeof a.drmProtected!==_.Oc||(b.drmProtected=a.drmProtected),_.A(a.isLive)||typeof a.isLive!==_.Oc||(b.isLive=a.isLive),_.A(a.name)||typeof a.name!==_.Mf||(b.name=a.name),_.A(a.Ob)||typeof a.Ob!==_.Mf||(b.Ob=a.Ob),_.A(a.audioMimeType)||typeof a.audioMimeType!==_.Mf||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Vn(a.url),b.type?Yn.debug("Detect media type "+
187
+ b.type+" for "+a.url):Yn.warn("Unable to detect media type for "+a.url));return b};$n=function(a){return a.w?Zn():new Promise(b=>{if(a.a){const c=a.a;a.h.off(c,_.q);a.h.off(c,_.uf);a.a=null}b()})};Zn=function(){return Promise.reject(new _.H(_.E,7,7E3))};
188
+ bo=function(a,b){return a.w?Zn():new Promise(c=>{a.a||(a.h.on(b,_.q,()=>{{const d=ao(a);if(d)a.onError(d)}}),a.h.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 _.D(_.Nc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
189
+ eo=function(a){return _.x(function*(){if(a.w)return Zn();var b=a.ea[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.ml(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=new _.co({Za:c,onError:d=>a.onError(d),xe:()=>{},ve:(d,e)=>{a.trigger(new _.D(_.Kd,{expirationTime:e}))},onEvent:d=>{d instanceof _.D?a.dispatchEvent(d):a.log.debug(_.Nb,
190
+ d.type)},getConfiguration:()=>a.getConfiguration(),Ic:()=>a.Ic()});a.o.h=b;yield _.Ym(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,va:0,mimeType:_.gg,codecs:"",encrypted:!0,keyId:null,language:_.Wf,originalLanguage:_.Wf,label:null,type:_.w,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 _.on(a.o,a.a);return Promise.resolve()})};fo=function(a,b){Gn(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.Qn&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
192
+ ao=function(a){if(null===a.ea||!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(_.E,3,3016,{code:b,Lh:c,message:a.a.error.message})};
193
+ ho=function(a){if(a.w)return new _.go(Zn(),()=>{});const b=a.ea[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&fo(a,c);if(d.preload!==_.Be)a.h.one(d,_.le,()=>{const g=Date.now()/1E3-e;a.f.A=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Tj()||_.Wj())&&d.load();const f=new _.Zm;a.h.one(d,Hf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.C||(a.C=(new _.Pj(()=>{f.reject(new _.H(_.E,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
194
+ uri:b.url},d.error))})).ia(g))});Gn(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(ao(a)):d.preload===_.Be&&(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,_.q,()=>{f.reject(ao(a))});return new _.go(f,
195
+ ()=>{const g=new _.H(_.E,7,7001);f.reject(g);return Promise.resolve()})};io=function(a,b){Gn(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.Qn){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
+ jo=function(a,b){let c=!1;a.h.on(b,_.Bf,()=>{c=b.paused});a.h.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())})};_.mo=function(a){a&&(0<=ko.indexOf(a)?lo.warn(`Factory '${a.name()}' is already registered`):(ko.push(a),lo.info(`Factory ${a.name()}' has been registered.`)))};oo=function(a,b){let c=ko.find(d=>d.isSupported(a,b));c||(c=new no);lo.info(`Chosen ads: ${c.name()}`);return c};
197
+ _.po=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};_.qo=function(a,b){a.classList.add(b)};_.ro=function(a,b){if(a&&typeof b===_.Ce)for(const c in b)a.style[c]=b[c]};_.so=function(a){return document.createElement(a)};
198
+ to=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());yh(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};uo=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
199
+ vo=function(a,b,c){(_.Wj()&&53===_.Xj().major||_.Wj()&&68===_.Xj().major||_.Yj())&&!b.hasAttribute(Ad)&&(b.style.opacity="0",b.setAttribute(Ad,""),a.j.one(b,Qd,()=>{b.removeAttribute(Ad);b.style.opacity="1";c&&(c.style.opacity="1")}))};
200
+ zo=function(a){a.a.on(window,"offline",()=>{wo(a,!1)});a.a.on(window,"online",()=>{a.f||xo(a)});a.a.on(a.m,Hf,()=>yo(a));a.a.on(a.m,"suspend",()=>yo(a));a.a.on(a.m,_.ng,()=>yo(a));a.a.on(a.m,_.af,()=>{a.f||xo(a)});a.a.on(a.m,_.nf,()=>{a.f||xo(a)});a.a.on(a.m,_.Jf,()=>{switch(a.m.getState()){case _.Mn:yo(a);break;default:yo(a)}})};Ao=function(a){a.h&&(a.h.stop(),a.h=null)};yo=function(a){a.f&&xo(a)};
201
+ Bo=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Yi(a.j,b.url,b.attemptParameters,b.method),wo(a,b))})};xo=function(a){a.m.getConfiguration().connectivityCheck&&(Ao(a),a.h=(new _.Pj(()=>Bo(a))).ia(5))};wo=function(a,b){Ao(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.D(Ie,{online:a.f})))};Do=function(){for(let a=0;a<Co.length;++a)Co[a].Bc()};
202
+ _.Eo=function(a,b){b=b||0;a={priority:b,Bc:a};for(let c=0;c<Co.length;c++)if(Co[c].priority<b){Co.splice(c,0,a);return}Co.push(a)};Fo=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};Ho=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 Go(b[0],b[1],b[2]);a.a=b}return a.a};
203
+ Io=function(a){switch((a.ea[0]||{src:"",type:""}).type){case _.yc:a="dash";break;case _.Dc:a="ss";break;case _.Kk:a="hls";break;case _.gg:a="mp4";break;default:a=""}return a};Jo=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};Ko=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
204
+ Lo=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Mo=function(a){a=a.drmInfo;return(new _.Ih(a&&a.licenseServerUri||"")).Wa};No=function(a){const b=a.configuration;let c="no";b.drm&&!_.Ug(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Pd)||Mo(a).endsWith("drmtoday.com"))&&(c=Pd);return c};Oo=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
+ Po=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Qo=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Ya:case Va:b="L1";break;case Xa:b="L2";break;case _.Eb:case _.Db:b="L3"}return b};
206
+ Uo=function(a,b){const c="ie"===_.rk().browser;var d=b.configuration;const e=[...Array.from(_.Uk.keys()),...b.Of];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.fa,"CL-USER-ID":Jo(d),"CL-ASSET-ID":Ko(d),"CL-SESSION-ID":Lo(d),"CL-PLAYBACK-TYPE":b.isLive?Ro:So,"CL-CONTENT-TYPE":Io(b),"CL-PLUGINS":e.join(" "),"CL-DRM":No(b),"CL-DRM-CDM":Oo(b),"CL-DRM-SEC-LEVEL":Qo(b),"CL-DRM-OFFLINE":Po(b),"CL-DRM-IP":Mo(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=
207
+ _.Oi(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.To).fetch(d).O.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=Ho(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.g.error(cb+k);g=Promise.reject(new _.H(_.E,7,g,k))}}return g})};_.Wo=function(a){a&&(0<=Vo.indexOf(a)||Vo.push(a))};Yo=function(a,b){a.D=new Xo(b);a.D.verify().catch(c=>{setTimeout(()=>{a.g.error(cb+c);a.trigger(new _.D(_.q,{detail:new _.H(_.E,7,7101)}));a.destroy()},1E3)})};
209
+ $o=function(a,b){a.S=b;for(const c of a.S)(b=c.id())&&(a.H[b]=c);_.Zo(a,"onPlayerCreated")};_.ap=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.h,a.A),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b))};
210
+ bp=function(a,b){_.x(function*(){a.h.getMedia()||a.h.getCastElement();a.D||(a.D=new Xo(a.f.license));try{a.g.debug("Verifying license remotely"),yield Uo(a.D,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(Fo,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.Zo=function(a,b,...c){if(!a.T)return Promise.resolve();const d=a.S.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
211
+ cp=function(a){return _.x(function*(){if(a.M)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.X.off(document,kg);a.trigger(new _.D(_.rf));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(_.Jf,d=>{b=d});return _.Zo(a,_.Ge).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.F.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),a.trigger(b))}).finally(()=>
212
+ {a.a.off(_.Jf,c);a.trigger(new _.D(qf))})}a.trigger(new _.D(qf));return new Promise(b=>b())})};dp=function(a,b){const c=jh(d=>d.f(_.sb)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.H(_.E,7,7003,"No compatible player implementing playlist mode found!");return Promise.resolve({player:c.create(),sourceIndex:0})};fp=function(a,b,c){return _.x(function*(){if(2===(a.a?a.a.canPlay(b[0],c):0)&&!a.N)return{player:a.a,sourceIndex:0};a.N=!1;return ep(a,b,c)})};
213
+ gp=function(a,b,c){return a.J===_.sb?dp(b,c):fp(a,b,c)};
214
+ ep=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(_.gh);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Wb:h[l],confidence:h[l].canPlay(b[k],c)};if(null===f||f.confidence<m.confidence)f=m,g=k}f&&typeof g===_.t&&0<f.confidence?(_.hh.debug("Player Factory '"+f.Wb.a()+"' can play",b[g]),f=new hp(f.Wb,g)):(_.hh.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Wb.create(),d({player:e,sourceIndex:f.sourceIndex})):
215
+ (d=new _.D(_.q,{detail:new _.H(_.E,7,7003)}),a.trigger(d),e(d))})};
216
+ _.kp=function(a,b,c){return _.x(function*(){if(a.K)throw new _.H(_.E,7,7E3,"Player is already destroyed.");if(!a.h)throw new _.H(_.E,7,7E3,"No surface associated with this player!");_.zm(We);yield a.release();const d=c||_.Xn(b);if(!b||0===d.length)throw new _.H(_.E,7,7003,mb);a.Y=d;a.f=_.Sk(a.A,b,{source:d});a.M=!1;const e=yield gp(a,d,a.f);_.ap(a,e.player);a.a&&a.a.setSourceIndex(e.sourceIndex);ip(a);a.a&&a.a.setCdnErrorCallback(a.I);jp(a,a.f);if(a.f.pauseWhenInBackground)a.X.on(document,kg,()=>
217
+ {document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});al(a);yield _.Zo(a,"onContentWillLoad",d[e.sourceIndex]);_.zm(Ve);_.Am("player.beforeLoad",We,Ve)})};_.lp=function(a){return _.x(function*(){a.h.getMedia()||a.h.getCastElement();a.trigger(new _.D(me));yield Promise.all([a.a.load(a.f),a.j.load()])})};
218
+ _.np=function(a){return _.x(function*(){_.zm(Se);bp(a,{configuration:a.getConfiguration(),ea:a.Bf(),drmInfo:a.getDrmInfo(),Of:Object.keys(a.H),isLive:a.isLive()});mp(a);bl();yield _.Zo(a,"onContentLoaded");a.f.autoplay&&(yield a.play());_.zm(Re);_.Am("player.afterLoad",Se,Re)})};op=function(a){return _.x(function*(){if(a.a){var b=a.a;b.Yf?(a.trigger(new _.D(me)),yield b.Yf(),yield _.np(a)):a.g.warn(yb)}else a.g.warn(ub)})};
219
+ ip=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.Ec&&a.ce&&(a.ce=!1,yield a.Ec(b))}))};jp=function(a,b){a.j=oo(a,b).create(a)};
220
+ pp=function(a){const b=_.wh(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().ma().filter(f=>c?f.kind===_.Vd:f.kind!==_.Vd);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().na();e&&e.language?(e=_.Yh(e.language||""),b.push(e)):(e=a.getTrackManager().Ra())&&e.language&&(e=_.Yh(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=>
221
+ {const g=_.Yh(f);if(f=d.find(h=>{h=_.Yh(h.language||"");return _.Zh(h,g)}))return a.getTrackManager().Ta(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};mp=function(a){_.x(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);pp(a)})};qp=function(a){a.G.forEach(b=>b());a.G=[]};
222
+ tp=function(a,b){return _.x(function*(){try{_.zm($e);a.J=_.sb;a.T=!1;const c=b.slice(1).map(d=>({config:d,ea:_.Xn(d)}));yield _.kp(a,b[0]);c.forEach(d=>{rp(a,d.config,d.ea)});a.trigger(new _.D(me));yield a.a.setupPlaylist(b);yield _.np(a);c.forEach(d=>{sp(a,d.config,d.ea)});_.zm(Ze);_.Am("player.setupPlaylist",$e,Ze)}catch(c){if(a.l)throw a.g.info(db),new _.H(_.E,7,7E3);throw c;}})};
223
+ up=function(a,b){const c=d=>{a.C=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(_.Tf,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.D(_.wf)),a.pause())};a.addEventListener(_.Tf,e);a.G.push(()=>{a.removeEventListener(_.Tf,e)})}};
224
+ vp=function(a,b){return _.x(function*(){try{_.zm(Ue);const c=_.Xn(b);rp(a,b,c);yield a.a.appendLoad(b);sp(a,b,c);_.zm(Te);_.Am("player.appendLoad",Ue,Te)}catch(c){if(a.l)throw a.g.info(db),new _.H(_.E,7,7E3,{id:b.id});throw c;}})};
225
+ rp=function(a,b,c){if(0===c.length)throw new _.H(_.E,7,7003,{message:mb,id:b.id});if(1<c.length)throw new _.H(_.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 _.H(_.E,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};sp=function(a,b,c){bp(a,{configuration:b,ea:c,drmInfo:a.getDrmInfo(),Of:Object.keys(a.H),isLive:c[0].isLive})};
226
+ wp=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(_.w);d.classList.add(hd);const e=document.createElement(_.Fd);e.classList.add(gd);e.appendChild(d);c.appendChild(e);return new R(d,b)})};
227
+ xp=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(id)):(a.g.info(`Hide video element .${b}`),d.classList.remove(id)),a.A&&a.A(d,c))};Ap=function(a,b){return _.x(function*(){const c=yield a.w.get();a.f=b;b.role=yp;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();xp(a,c,!0);yield c.load(b.config);zp(a,b);b.config.autoplay||(yield c.play())})};
228
+ Ep=function(a){_.x(function*(){if(0===a.a)yield Bp(a);else if(a.a===a.h.length-1)yield Cp(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>Dp(a,c)))}})};
229
+ Fp=function(a,b){return _.x(function*(){if(b.player){if(b.state===jf){a.g.info(Tb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=yp;xp(a,b.player,!0);b.state===hf?(_.zm(ef),a.o.preloadMedia?yield b.player.play():yield op(b.player),_.zm(df),_.Am("playlist.next",ef,df)):b.state===gf&&(yield b.player.load(b.config));zp(a,b);b.config.autoplay||(yield b.player.play())}})};
230
+ Ip=function(a,b){return _.x(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();xp(a,b.player,!1);yield Gp(a,b);b.player=null;b.videoEl=null;b.role=Hp})};Kp=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Jp(a,b)))};Lp=function(a){return _.x(function*(){yield a.w.destroy();const b=document.getElementById(a.o.anchorId);b&&(b.classList.remove(fd),b.innerHTML="")})};
231
+ Jp=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield Gp(a,c)),a.l.delete(b))})};Gp=function(a,b){return _.x(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.w.release(b.player))})};zp=function(a,b){if(a.o.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.Nf()};b.player.on(_.Ud,c);const d=b.player;b.disposers.push(()=>{d.off(_.Ud,c)})}};
232
+ Dp=function(a,b){return _.x(function*(){const c=yield a.w.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Hp;d.state=jf;a.trigger(new _.D(Yf));try{a.l.set(b,d),a.o.preloadMedia?(d.config.autoplay&&(a.g.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=hf,a.trigger(new _.D(Yf))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=ff):
233
+ (a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.D(_.q,{detail:e})),d.state=gf),a.trigger(new _.D(Yf))}})};Bp=function(a){return _.x(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield Dp(a,b)})};Cp=function(a){return _.x(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield Dp(a,b)})};
234
+ _.Np=function(a){if(Mp.has(a))return Mp.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);Mp.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),Mp.set(a,b),b):!1};Op=function(a,b){b=b.replace(/mp2t/i,"mp4");a===_.p&&(b=b.replace(_.w,_.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
+ Pp=function(a,b,c){a.classList.add(fd);return Array.from({length:b}).map(()=>{const d=document.createElement(_.w);d.classList.add(hd);const e=document.createElement(_.Fd);e.classList.add(gd);e.appendChild(d);a.appendChild(e);return new R(d,c)})};
236
+ Qp=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(id),d.classList.remove("clpp-hide")):(a.g.info(`Hide video element .${b}`),d.classList.remove(id),d.classList.add("clpp-hide")),a.w&&a.w(d,c))}};Rp=function(a){return _.x(function*(){const b=a.a;b&&("loaded"!==b.state&&(yield b.nd),yield b.player.play(),b.state=_.af,b.sc&&b.sc())})};Sp=function(a,b){a.A=b;const c=a.a&&a.a.player;c&&Qp(a,c,!b)};
237
+ Up=function(a,b){return _.x(function*(){if(b.player){if(b.state===jf){a.g.info(Tb);try{yield b.preloadPromise}catch(c){}}a.a=b;b.role=Tp;Qp(a,b.player,!0);b.state="loading";b.state===hf?yield b.player.play():b.state===gf&&(yield b.player.load(b.config));b.config.autoplay||(yield b.player.play());b.state=_.af}})};Wp=function(a,b){return _.x(function*(){yield Vp(a,b);b.config.autoplay||(yield b.player.play());b.state=_.af})};
238
+ Xp=function(a,b){const c=b.transition;if(c){if(c.rc){const d=c.rc,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.on(_.Ud,e);b.disposers.push(()=>{b.player.off(_.Ud,e)})}if(c.If){const d=e=>{const f=c.If.find(g=>g.cueId===e.detail.id);f&&(a.g.info(`Transition onCue to (ID: ${f.itemId})`),a.play(f.itemId))};b.player.on(_.sh,d);b.disposers.push(()=>{b.player.off(_.sh,d)})}if(c.Lf){const d=c.Lf,e=()=>{b.player.getPosition()>=d.position&&(a.g.info(`Transition onPosition to (ID: ${d.itemId})`),
239
+ a.play(d.itemId))};b.player.on(_.Tf,e);b.disposers.push(()=>{b.player.off(_.Tf,e)})}}};Zp=function(a,b){return _.x(function*(){a.g.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=Yp;c.pause();yield a.l.release(c);Qp(a,c,!1)})};aq=function(a){return Promise.all(Array.from(a.f.keys()).map(b=>$p(a,b)))};
240
+ cq=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=>bq(a,d)))}})};Vp=function(a,b){return _.x(function*(){const c=yield a.l.get();a.a=b;b.role=Tp;a.a.player=c;a.a.videoEl=c.getSurface().getMedia();Qp(a,c,!0);b.primary&&a.trigger(new _.D(lf,{detail:{player:c}}));b.state="loading";b.nd=yield c.load(b.config);b.state="loaded"})};
241
+ dq=function(a){return _.x(function*(){yield a.l.destroy();const b=a.o.anchorEl;b&&(b.classList.remove(fd),b.innerHTML="")})};eq=function(a){a.a&&(a.a.disposers.forEach(b=>b()),a.a.disposers=[],Xp(a,a.a),aq(a),cq(a,a.a.next))};$p=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))})};
242
+ bq=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=Yp;b.state=jf;a.trigger(new _.D(Yf));try{a.f.set(c,b),b.config.autoplay&&(a.g.warn(la+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1),b.primary&&a.trigger(new _.D(lf,{detail:{player:d}})),b.preloadPromise=d.load(b.config),yield b.preloadPromise,b.state=hf,a.trigger(new _.D(Yf))}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),b.state=ff):(a.g.warn(`Preload failed (ID: ${c})`,
243
+ e),a.trigger(new _.D(_.q,{detail:e})),b.state=gf),a.trigger(new _.D(Yf))}})};fq=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Mf&&typeof b.DURATION===_.t):!1};gq=function(a){a.h.forEach(b=>b());a.h=[]};
244
+ lq=function(a,b){const c=()=>_.x(function*(){var e=b.getPosition();if(e=hq(a,e))a.g.info(`Interstitial ${e.cueId} coming up `+`at ${e.startTime} s`),(yield iq(a,e))&&jq(a,e,b)});b.addEventListener(_.Tf,c);a.h.push(()=>{b.removeEventListener(_.Tf,c)});const d=()=>{a.trigger(new _.D(kq))};b.on(_.Ud,d);a.h.push(()=>{b.off(_.Ud,d)})};
245
+ nq=function(a,b,c){return _.x(function*(){if(b.source){a.a.wd([{id:mf,primary:!0,config:_.Mg(b),next:[]}]);yield a.a.load(mf);var d=a.a.Ib();d&&d.Ed()?(d=Array.from(d.Ed().cues()),mq(a,d,c)||(Sp(a.a,!1),c||(yield Rp(a.a)))):a.g.error("Failed to get cue timeline after load")}else a.g.error("Config must be of type cl.api.PlayerConfiguration")})};
246
+ mq=function(a,b,c){var d=b.filter(f=>f.schemeIdUri===_.vd&&f.eb);a.g.info("Interstitial cues found",d);if(!oq(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&&pq(a,b,c);0<e.length&&e.forEach(f=>qq(a,f));d.forEach(f=>rq(a,f));a.trigger(new _.D(sq,{detail:a.Zc()}));return!!b};
247
+ oq=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.eb[_.Zb],k=g.eb[_.$b];g.eb[_.Yb]||h?null!=k&&1>k&&a.g.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.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};
249
+ pq=function(a,b,c){_.x(function*(){const d=rq(a,b),e=yield iq(a,d),f=d.Oa?d.Oa.length:0;e&&0<f?tq(a,d,c):(e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping"),Sp(a.a,!1),c||(yield Rp(a.a)))})};
250
+ qq=function(a,b){return _.x(function*(){const c=rq(a,b);a.g.info(`Interstitial ${c.cueId} coming up `+`at ${c.startTime} s`);if(yield iq(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===_.af?jq(a,c,d):e.sc=()=>{jq(a,c,d)}}}})};
251
+ rq=function(a,b){{const c=b.eb[_.ac];b={cueId:b.id,startTime:b.startTime,endTime:b.endTime,state:uq,cf:b.eb[_.Yb],df:b.eb[_.Zb],Oa:null,resumePosition:null==c?b.endTime:b.startTime+c,playoutLimit:b.eb[_.$b]}}a.j.push(b);return b};
252
+ iq=function(a,b){return _.x(function*(){b.state=vq;const c={id:b.cueId,startTime:b.startTime,endTime:b.endTime,resumePosition:b.resumePosition,itemCount:-1,playoutLimit:b.playoutLimit};a.trigger(new _.D(wq,{detail:c}));if(b.cf)try{a.g.info(`Load X-ASSET-LIST for ${b.cueId}`),a.trigger(new _.D(xq,{detail:c})),b.Oa=yield yq(a,b.cf),b.state=zq,c.itemCount=b.Oa.length}catch(d){a.g.error("Failed to load X-ASSET-LIST",d),b.state=Aq}finally{a.trigger(new _.D(Bq,{detail:c}))}else b.df?(b.Oa=[{URI:b.df,DURATION:b.endTime-
253
+ b.startTime}],b.state=zq):b.state=Aq;return b.state===zq})};tq=function(a,b,c){_.x(function*(){const d=a.a.getCurrentItem();if(d){var e=Cq(a,b,"preroll");a.a.wd(e);Dq(a,d,b,e,!0);eq(a.a);b.state=zq;c?yield a.a.load(e[0].id):yield a.a.play(e[0].id);Sp(a.a,!1)}})};
254
+ jq=function(a,b,c){if(b.Oa)if(0===b.Oa.length){const g=()=>{c.seek(b.resumePosition)};c.on(_.sh,g);a.h.push(()=>{c.off(_.sh,g)});a.g.info(`Interstitial ${b.cueId} scheduled to `+"be skipped")}else{var d=a.a.getCurrentItem();if(d){var e=Cq(a,b);a.a.wd(e);var f=e[0].id;Dq(a,d,b,e,!1);d.next=[f];d.transition={If:[{cueId:b.cueId,itemId:f}]};eq(a.a);b.state=zq;a.g.info(`Interstitial ${b.cueId} scheduled for `+`${b.startTime} s`);a.trigger(new _.D(Eq,{detail:{id:b.cueId,startTime:b.startTime,endTime:b.endTime,
255
+ resumePosition:b.resumePosition,itemCount:e.length,playoutLimit:b.playoutLimit}}))}}};hq=function(a,b){return a.j.find(c=>{const d=c.startTime-b;return c.state===uq&&0<d&&d<=a.f.resolutionOffsetSec})||null};yq=function(a,b){return _.x(function*(){var c=a.a.Ib();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.Oi(b);c=yield Xi(c,d);if(!fq(c))throw new _.Fh("Invalid X-ASSET-LIST list response");return Promise.resolve(c.ASSETS)})};
256
+ Cq=function(a,b,c){c=void 0===c?"":c;let d=0,e=b.Oa.map((f,g)=>{const h=`${b.cueId}-${g}`;g=g===b.Oa.length-1?mf:`${b.cueId}-${g+1}`;d+=f.DURATION;f={id:h,config:{source:{url:f.URI,type:_.Kk}},next:[g],transition:{rc:g},duration:f.DURATION,pf:d,Nh:b.cueId};return a.f.interstitialAssetConverter?a.f.interstitialAssetConverter(f):f});e.forEach((f,g)=>{f.sc=()=>{a.g.info(`Playing interstitial asset ${f.id}`,f);a.trigger(new _.D(Fq,{detail:{id:f.id,podId:b.cueId,uri:f.config.source.url,duration:f.duration,
257
+ podOrder:g+1,podCount:b.Oa.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.pf-k.duration<=f);const g=e[e.length-1],h=Math.abs(g.pf-f);1>h?g.transition.rc=mf:(g.transition.rc=void 0,g.transition.Lf={position:g.duration-h,itemId:mf});g.next=[mf]}e[0].sc=()=>{a.g.info(`Playing interstitial ${c} ${b.cueId} with `+`${b.Oa.length} assets and will resume primary `+`content at ${b.resumePosition} s.`,e);a.g.info(`Playing interstitial asset ${e[0].id}`,
258
+ e[0]);a.trigger(new _.D(Gq,{detail:{id:b.cueId,startTime:b.startTime,endTime:b.endTime,resumePosition:b.resumePosition,itemCount:e.length,playoutLimit:b.playoutLimit}}));a.trigger(new _.D(Fq,{detail:{id:e[0].id,podId:b.cueId,uri:b.Oa[0].URI,duration:b.Oa[0].DURATION,podOrder:1,podCount:b.Oa.length}}))};return e};
259
+ Dq=function(a,b,c,d,e){b.sc=()=>{a.g.info("Resuming primary content at "+`${b.config.startTime} s.`);a.trigger(new _.D(Hq,{detail:{id:c.cueId}}));c.state=Iq;a.a.removeItems(d.map(f=>f.id));b.next=[];e&&a.trigger(new _.D(Jq))};b.config.startTime=c.resumePosition};Kq=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
260
+ Lq=function(a,b){a.f=b;_.lh(a.a);if(!b)return Promise.resolve();a.a.on(b,Sd,c=>{_.eh("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,xg,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.J(c.initData);if(_.hi(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=mi(c.subarray(4),
261
+ !0);c=_.oi(c);const d=new Event(Sd);d.initDataType="skd";d.initData=ii(c);a.f.dispatchEvent(d)}});Gn(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};Mq=function(a,b){Kq(a.keyStatuses,b);b=new _.D(de);a.dispatchEvent(b)};
262
+ Pq=function(a,b){a.a=b;_.lh(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event(Sd);d.initDataType=_.Zc;d.initData=ii(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=Nq(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.D(_.ue,{messageType:d?ge:fe,message:c.message});d=e;_.eh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.fh("Session not found",c.sessionId)}}),a.f.on(b,a.h+"keyadded",c=>{(c=Nq(a,
263
+ c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=Nq(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?Oq(d,_.Le):1===e?Oq(d,"expired"):Oq(d,_.be))}}}))};
264
+ Nq=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};Oq=function(a,b){Kq(a.keyStatuses,b);b=new _.D(de);a.dispatchEvent(b)};Qq=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
265
+ Rq=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===_.Oe)if(c)d=_.J(_.oi("LOAD_SESSION|"+c));else{const f=_.oi("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 _.Zm;const e=Qq(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==$a)return a.f=null,Promise.reject(f);(new _.Pj(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
266
+ a.f=null}})).ia(.01)}return a.f};Sq=function(a,b,c){if(a.a)a.a.then(()=>Sq(a,b,c)).catch(()=>Sq(a,b,c));else{a.a=b;if(a.h===pg){var d=_.ki(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=_.Ai(e.keys[0].k);e=_.Ai(e.keys[0].kid)}else d=_.J(c),e=null;var f=Qq(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
267
+ Tq=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.Xd?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};Uq=function(a){a=a.target;if(a.webkitPresentationMode===Pe){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
+ Vq=function(){return this.webkitSupportsPresentationMode(Pe)?(this.webkitSetPresentationMode(Pe),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};Wq=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
+ Xq=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};Yq=function(a,b,c){return new window.TextTrackCue(a,b,c)};Zq=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};ar=function(a,b,c){if("input"===a)switch(this.type){case "range":a=bd}$q.call(this,a,b,c)};br=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
270
+ cr=function(a){return br()-a.a};er=function(a){const b=new dr;b.a=a.a;return b};_.fr=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.hr=function(a,b,c,d){return _.x(function*(){try{return new (yield gr(a,b,c,d))}catch(e){throw e.a(_.E),e;}})};
271
+ gr=function(a,b,c,d){return _.x(function*(){if(d){var e=_.ir[d.toLowerCase()];if(e)return e;_.B("Could not determine manifest type using MIME type ",d)}if(e=_.jr(a)){const f=_.kr[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 lr(a,b,c))){if(e=_.ir[d])return e;_.B("Could not determine manifest type using MIME type",d)}throw new _.H(_.E,4,4E3,{url:a});})};
272
+ _.jr=function(a){a=(new _.Ih(a)).Ka.split("/").pop().split(".");return 1===a.length?"":a.pop().toLowerCase()};lr=function(a,b,c){return _.x(function*(){var d=_.Oi(a);Mi(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).O).headers["content-type"])?d.toLowerCase():""})};mr=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
+ nr=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(mr(a,e),Ri(c,e.byteLength,cr(a.h)),a.h.a=br());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>nr(a,b,c))})};
274
+ pr=function(a){const b=a.uris[a.uriIndex],c=new or,d=new dr,e=er(d);let f=0,g;const h=new _.Zm;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=cr(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(sa),Qi(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
275
+ const r={};for(const v of n)n=v.split(": "),r[n[0].toLowerCase()]=n.slice(1).join(": ");try{const v=cr(e);l||Ri(a,m.response?m.response.length:0,v);const u=_.Pi(r,m.response,m.status,b,m.responseURL,a,v,g);a.rateLimitBps?Si(a.rateLimitBps,cr(e),a.bytesLoaded).then(()=>{h.resolve(u)}):h.resolve(u)}catch(v){h.reject(v)}};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 v={};if(n){n=n.trim().split("\r\n");
276
+ for(var r of n)n=r.split(": "),v[n[0].toLowerCase()]=n.slice(1).join(": ")}r=_.Pi(v,m.response,m.status,b,m.responseURL,a,cr(e),g);h.resolve(r)}};c.ontimeout=function(){h.reject(new _.H(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=cr(d);d.a=br();if(100<n||m.lengthComputable&&m.loaded===m.total)Ri(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{O:h,request:a,abort:()=>{c.abort();h.reject(new _.H(1,1,
277
+ 7001,{url:b,request:a}));return Promise.resolve()}}};qr=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};rr=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)};
278
+ tr=function(a){if(0<=a.o&&a.f<a.o)return null;let b=sr(a);for(;null!==b;){if(b.name===_.pe){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=sr(a)}return null};
279
+ ur=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,cr(a.w)),a.w.a=br());if(f)return e=qr(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){rr(a,g);var k=tr(a);for(e=[];k;)e.push(k),k=tr(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(()=>ur(a,b,c,d))})};
281
+ sr=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=vr(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=vr(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(_.E,3,3E3);}if(2097151<f)throw new _.H(_.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
+ vr=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
283
+ yr=function(a){a.h=a.C.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=wr(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*wr(e.request.fuzzFactor,.5));a.f*=wr(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;xr(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)});
284
+ 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.O}).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 yr(a);g&&e.a(_.E);a.w.reject(e)}else a.w.reject(e)})};xr=function(a,b,c){a.o=setTimeout(b,c)};wr=function(a,b){return null===a||void 0===a?b:a};
285
+ zr=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.Fh("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 _.Fh(`Parsing CMSD, not recognized value type of ${a}`);};
286
+ Cr=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}=zr(e[b]);Object.values(Ar).includes(f)&&d.set(f,g)}var c=d}catch(d){Br.error("CmsdManager parseCmsdDynamicHeader_ failed:",d),c=null}a.f=c}}}};
287
+ Gr=function(a){var b=new Dr;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Er,d={Uc:!1,Tf:!1};b={O:Fr(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.Uc||(d.Uc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Tf=!0;c.abort()},a);b.O=b.O.finally(()=>{window.clearTimeout(e)})}return b};
288
+ Fr=function(a,b,c,d){return _.x(function*(){let e,f,g;const h=new dr,k=er(h);try{e=yield Hr(a,c);g=cr(h);const m=e.headers.get(sa);Qi(b,m);const n=m?parseInt(m,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const r=e.body.getReader();f=yield ur(new Ir(n,!b.disableMergedFragments),r,(v,u)=>{if(d.Uc)return null;u&&u.data&&(Ri(b,u.data.byteLength,cr(h)),h.a=br());return b.onFragment&&u?b.rateLimitBps?Si(b.rateLimitBps,cr(k),b.bytesLoaded).then(()=>b.onFragment(u)):b.onFragment(u):null},
289
+ b.onProgress)}else{const r=e.body.getReader();f=yield nr(new Jr(n),r,b);b.rateLimitBps&&(yield Si(b.rateLimitBps,cr(k),f.byteLength))}}catch(m){if(d.Uc)throw new _.H(1,1,7001,{url:a,request:b});if(d.Tf)throw new _.H(1,1,1003,{url:a,request:b});_.fh("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.Uc)throw new _.H(1,1,7001,{url:a,request:b});return _.Pi(l,f,e.status,a,e.url,b,cr(k),g)})};
290
+ Lr=function(a){try{const b=a.uris[a.uriIndex],c=_.Kr(b);return{O:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{O:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
291
+ _.Kr=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.fh("Bad data URI, failed to parse scheme"),new _.H(_.E,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.fh("Bad data URI, failed to extract encoding and MIME type"),new _.H(_.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?_.Ai(a).buffer:_.oi(a).buffer,contentType:c}};
292
+ _.Nr=function(a,b){a=_.Jj(_.Kj(a),_.Lj(a));_.Mr[a]=b};_.Or=function(a){a=_.Jj(_.Kj(a),_.Lj(a));return _.Mr[a]||null};_.Pr=function(a){a=_.Jj(_.Kj(a),_.Lj(a));delete _.Mr[a]};_.Ur=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case Qr:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case Rr:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case Sr:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case Tr:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Be}};
293
+ Fg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Gg=typeof Object.defineProperties==_.Xd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
294
+ Hg("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=Fg.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=
295
+ 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.D),reject:g(this.h)}};b.prototype.D=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 _.Ce:var h=null!=g;break a;case _.Xd:h=!0;break a;default:h=!1}h?this.C(g):this.o(g)}};
296
+ b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.Xd?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();
297
+ g.yd(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(r,v){return typeof r==_.Xd?function(u){try{l(r(u))}catch(y){m(y)}}:v}var l,m,n=new b(function(r,v){l=r;m=v});this.yd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.yd=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=Eg(g),m=l.next();!m.done;m=l.next())d(m.value).yd(h,k)})};b.all=function(g){var h=Eg(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(y){r[u]=y;v--;0==v&&l(r)}}var r=[],v=0;do r.push(void 0),v++,d(k.value).yd(n(r.length-1),m),k=h.next();while(!k.done)})};return b});var Jg=this||self;
299
+ Jg.a=!0;_.z("clpp.utils.obj.cloneItem",_.Mg);_.z("clpp.utils.obj.merge",_.Lg);var ah={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",ah);var Zg=3,Yg={},Vr=[];_.z("clpp.log.getLoggers",function(){return _.Mg(Yg)});_.z("clpp.log.addInterceptor",function(a){a&&Vr.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=Vr.indexOf(a),0<=a&&Vr.splice(a,1))});_.z("clpp.log.getTagLevel",$g);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=Yg[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.Sg(b)&&(b=bh(b)),Yg[a]=b)});
300
+ _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.Sg(a)&&(a=bh(a));Zg=a});_.z("clpp.log.getLogLevel",function(){return Zg});
301
+ _.S=class{constructor(a){(this.tag=a)&&void 0===Yg[a]&&(Yg[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=$g(this.tag);if(0<=d){if(d<c)return}else if(Zg<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 Vr)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)}ng(a){return a?
303
+ this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.z("clpp.log.Logger",_.S);_.S.prototype.createChild=_.S.prototype.ng;_.S.prototype.error=_.S.prototype.error;_.S.prototype.warn=_.S.prototype.warn;_.S.prototype.debug=_.S.prototype.debug;_.S.prototype.info=_.S.prototype.info;_.S.prototype.log=_.S.prototype.log;var ch=new _.S("clpp");_.z("clpp.log.info",_.dh);_.z("clpp.log.debug",_.eh);_.z("clpp.log.warn",_.B);_.z("clpp.log.error",_.fh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var hp;hp=class{constructor(a,b){this.Wb=a;this.sourceIndex=b}};_.hh=new _.S("clpp.players");_.gh={};_.Wr=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 Xr,Yr;Xr=class{constructor(a,b,c,d){this.f=a;this.Bc=b;this.a=c;this.fh=!!d}dc(a){try{this.Bc.handleEvent?this.Bc.handleEvent(a):this.Bc.call(this.a,a)}catch(b){_.fh("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
304
+ _.D=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
+ Yr=class{constructor(a){this.a=new _.Wr;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].dc(a),b[c].fh&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new Xr(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Xr(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].Bc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var Zr;_.$r=class{constructor(){this.a=new _.Wr}release(){_.lh(this)}on(a,b,c,d=!1){a=new Zr(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||(kh(f),this.a.remove(b,f))}}};Zr=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 as=class{constructor(a){this.m=a;this.o=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=null;this.f=new _.$r;this.a=this.l=null;this.h=[];this.g=new _.S("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}};_.js=class{constructor(a,b,c,d){d=void 0===d?_.bs:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.cs;this.writingMode=_.ds;this.lineInterpretation=_.es;this.line=null;this.lineAlign=_.hs;this.direction=is;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}Fc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
306
+ a.payloadType}};_.z("clpp.text.Cue",_.js);_.js.positionAlign={LEFT:_.he,RIGHT:_.ie,CENTER:_.$c,AUTO:"auto"};_.bs="text";_.js.payloadType={TEXT:_.bs,VTT_XML:_.lg,TTML_XML:_.Vf};_.cs=_.$c;_.ks={LEFT:_.ee,RIGHT:_.vf,CENTER:_.cs,START:_.ee,END:_.vf};_.js.textAlign=_.ks;var is="ltr";_.js.direction={HORIZONTAL_LEFT_TO_RIGHT:is,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.ds="horizontal-tb";_.js.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.ds,VERTICAL_LEFT_TO_RIGHT:_.dg,VERTICAL_RIGHT_TO_LEFT:_.eg};_.es=0;
307
+ _.js.lineInterpretation={LINE_NUMBER:_.es,PERCENTAGE:1};_.hs=_.If;_.ls={CENTER:_.$c,START:_.hs,END:_.Td};_.js.lineAlign=_.ls;_.os=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.ms;this.scroll=ns;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.os);_.ms=1;_.os.units={PX:0,PERCENTAGE:_.ms,LINES:2};var ns="";
308
+ _.os.scrollMode={NONE:ns,UP:"up"};_.os.displayAlign={BEFORE:"flex-end",CENTER:_.$c,AFTER:"flex-start"};_.os.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.sd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var ps=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.$r;this.j=!1;this.g=new _.S("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,_.sc,b=>Bh(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
+ _.Zd)}}}))}o(a){const b=new _.js(a.startTime,a.endTime,a.text,_.lg);if(_.Sg(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.dg;break;case "rl":b.writingMode=_.eg}_.Tg(a.size)&&(b.size=a.size);if(_.Sg(a.align))switch(a.align){case _.ee:case _.If:b.textAlign=_.ee;break;case _.$c:b.textAlign=_.cs;break;case _.vf:case _.Td:b.textAlign=_.vf}_.Tg(a.position)&&(b.position=a.position);if(_.Sg(a.positionAlign))switch(a.positionAlign){case _.he:b.positionAlign=_.he;break;case _.$c:b.positionAlign=
310
+ _.$c;break;case _.ie:b.positionAlign=_.ie}_.Tg(a.line)&&(b.line=a.line);if(_.Sg(a.lineAlign))switch(a.lineAlign){case _.If:b.lineAlign=_.hs;break;case _.$c:b.lineAlign=_.$c;break;case _.Td:b.lineAlign=_.Td}typeof a.snapToLines===_.Oc&&(b.lineInterpretation=a.snapToLines?_.es:1);return b}};_.H=class extends Error{constructor(a,b,c,d,e){super(Ch(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.Sg(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=Ch(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);_.E=2;_.H.Severity={RECOVERABLE:1,FATAL:_.E};
305
311
  _.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
306
312
  _.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,
307
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,
@@ -309,65 +315,66 @@ MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR
309
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,
310
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,
311
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,
312
- 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,
313
- 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,
314
- 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 sh=class extends Error{constructor(a,b){super(a);this.code=b}};var Ah=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;og=_.vh.prototype;og.Ya="";og.kc="";og.Ja="";og.Ec=null;og.ya="";og.Zb="";og.toString=function(){var a=[],b=this.Ya;b&&a.push(Dh(b,Tr,!0),":");if(b=this.Ja){a.push("//");var c=this.kc;c&&a.push(Dh(c,Tr,!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(Dh(b,"/"==b.charAt(0)?Ur:Vr,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Zb)&&a.push("#",Dh(b,Wr));return a.join("")};
315
- og.resolve=function(a){var b=new _.vh(this);"data"===b.Ya&&(b=new _.vh);var c=!!a.Ya;c?wh(b,a.Ya):c=!!a.kc;c?b.kc=a.kc:c=!!a.Ja;c?b.Ja=a.Ja:c=null!=a.Ec;var d=a.ya;if(c)xh(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(""):
316
- ".."==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?_.yh(b,zh(a.a)):c=!!a.Zb;c&&(b.Zb=a.Zb);return b};var Tr=/[#\/\?@]/g,Vr=/[#\?:]/g,Ur=/[#\?]/g,Eh=/[#\?@]/g,Wr=/#/g;_.Ch.prototype.a=null;_.Ch.prototype.g=null;
317
- _.Ch.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};
318
- _.Ch.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 Gh;_.G="text";_.Xr=1/15;Gh={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/]};Gh[_.G]=[/^vtt$/,/^wvtt/,/^stpp/];var Yr;Yr={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.gj=(a,b)=>{const c=Yr[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===_.G?"":null};_.Zr={text:{mp4:uc,m4s:uc,m4i:uc,cmft:uc,vtt:_.Df,ttml:_.yc},video:{mp4:_.Yf,m4s:_.Yf,m4i:_.Yf,m4v:_.Yf,cmfv:_.Yf,ts:_.Xf},audio:{mp4:_.Hc,m4s:_.Hc,m4i:_.Hc,m4a:_.Hc,cmfa:_.Hc,ts:_.Xf,aac:_.Ec,ec3:_.Gc,ac3:_.Fc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.jj=(a,b,c)=>a.map(d=>{d=_.$r(d)||"";return d=(d=_.Zr[b][d])?d:b===_.G?c&&"vtt"!==c?uc:_.Df:null}).filter(Boolean)[0]||null;
319
- _.$r=a=>{a=(new _.vh(a)).ya.split(".");return 1>=a.length?null:a.pop()};_.ti=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}};_.si=class{constructor(a,b){this.name=a;this.value=b}};var Ih=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",
320
- "cs"],["dan","da"],["deu","de"],[_.Bd,"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
+ _.Fh=class extends Error{constructor(a,b){super(a);this.code=b}};var Nh=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;Cg=_.Ih.prototype;Cg.pb="";Cg.xc="";Cg.Wa="";Cg.Qc=null;Cg.Ka="";Cg.jc="";Cg.toString=function(){var a=[],b=this.pb;b&&a.push(Sh(b,qs,!0),":");if(b=this.Wa){a.push("//");var c=this.xc;c&&a.push(Sh(c,qs,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Qc;null!=b&&a.push(":",String(b))}if(b=this.Ka)this.Wa&&"/"!=b.charAt(0)&&a.push("/"),a.push(Sh(b,"/"==b.charAt(0)?rs:ss,!0));(b=this.a.toString())&&a.push("?",b);(b=this.jc)&&a.push("#",Sh(b,ts));return a.join("")};
322
+ Cg.resolve=function(a){var b=new _.Ih(this);"data"===b.pb&&(b=new _.Ih);var c=!!a.pb;c?Jh(b,a.pb):c=!!a.xc;c?b.xc=a.xc:c=!!a.Wa;c?b.Wa=a.Wa:c=null!=a.Qc;var d=a.Ka;if(c)Kh(b,a.Qc);else if(c=!!a.Ka){if("/"!=d.charAt(0))if(this.Wa&&!this.Ka)d="/"+d;else{var e=b.Ka.lastIndexOf("/");-1!=e&&(d=b.Ka.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.Ka=d:c=""!==a.a.toString();c?_.Lh(b,Mh(a.a)):c=!!a.jc;c&&(b.jc=a.jc);return b};var qs=/[#\/\?@]/g,ss=/[#\?:]/g,rs=/[#\?]/g,Th=/[#\?@]/g,ts=/#/g;_.Rh.prototype.a=null;_.Rh.prototype.h=null;
324
+ _.Rh.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};
325
+ _.Rh.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 Vh;_.G="text";_.us=1/15;Vh={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/]};Vh[_.G]=[/^vtt$/,/^wvtt/,/^stpp/];var vs;vs={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.tj=(a,b)=>{const c=vs[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===_.G?"":null};_.ws={text:{mp4:zc,m4s:zc,m4i:zc,cmft:zc,vtt:_.Rf,ttml:_.Cc},video:{mp4:_.gg,m4s:_.gg,m4i:_.gg,m4v:_.gg,cmfv:_.gg,ts:_.fg},audio:{mp4:_.Ic,m4s:_.Ic,m4i:_.Ic,m4a:_.Ic,cmfa:_.Ic,ts:_.fg,aac:_.Fc,ec3:_.Hc,ac3:_.Gc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.yj=(a,b,c)=>a.map(d=>{d=_.xs(d)||"";return d=(d=_.ws[b][d])?d:b===_.G?c&&"vtt"!==c?zc:_.Rf:null}).filter(Boolean)[0]||null;
326
+ _.xs=a=>{a=(new _.Ih(a)).Ka.split(".");return 1>=a.length?null:a.pop()};_.Ii=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}};_.Hi=class{constructor(a,b){this.name=a;this.value=b}};var Xh=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"],[_.Fd,"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",
321
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",
322
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",
323
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",
324
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var as=class{};_.x("clpp.utils.BufferUtils",as);as.toArrayBuffer=Uh;as.toDataView=_.Th;as.toInt32Array=_.Sh;as.toUint32Array=Rh;as.toUint16Array=Qh;as.toUint8Array=_.J;as.equal=Oh;var Xh=new _.R("clpp.utils.strings");_.x("clpp.utils.strings.fromUtf8",_.Wh);_.x("clpp.utils.strings.fromBytesAutoDetect",_.Zh);_.x("clpp.utils.strings.toUtf8",_.$h);_.x("clpp.utils.strings.toUtf16",_.ai);_.x("clpp.utils.strings.toByteArray",_.bi);_.x("clpp.utils.strings.startsWith",_.ci);_.x("clpp.utils.strings.endsWith",_.di);_.x("clpp.utils.strings.bitrateToString",_.gi);
325
- _.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)))});
326
- _.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 hi=document.createElement("span");var bs=class{};_.x("clpp.utils.Uint8ArrayUtils",bs);bs.toStandardBase64=_.ji;bs.concat=_.pi;bs.equal=_.oi;bs.toHex=_.ni;bs.fromHex=_.mi;bs.fromBase64=_.li;bs.toBase64Url=_.ki;_.cs=new _.R("clpp.hls.Utils");_.ri=class{constructor(a){this.f=a;this.a=0}};_.ds=new Set([_.Ba,_.Ca,"EXT-X-I-FRAMES-ONLY",_.Fa,_.Ga,_.Ha,_.La,_.Na]);_.es=new Set(["EXTINF",_.ya,_.Aa,_.Da,_.Ea,_.Ka]);_.fs=new Set(["EXT-X-PART",_.Ja]);_.gs=new Set([_.za]);var vi=[403,401];_.x("clpp.net.DEFAULT_FATAL_STATUS_CODES",vi);_.x("clpp.net.makeRequest",_.zi);_.yi=6;_.x("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.yi});_.Km=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(){}};_.Rn=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 _.Km;let d=()=>{c.reject(new _.H(_.F,7,7001));return this.abort()};this.P.then(e=>{this.a?c.reject(new _.H(_.F,7,7001)):a?d=Ei(a,e,c):c.resolve(e)},e=>{b?d=Ei(b,e,c):c.reject(e)});return new _.Rn(c,()=>d())}};_.Rn.aborted=function(){const a=Promise.reject(new _.H(_.F,7,7001));a.catch(()=>{});return new _.Rn(a,()=>Promise.resolve())};_.Rn.prototype.chain=_.Rn.prototype.hd;_.hs=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)}};_.Eo=class{constructor(){this.f=[];this.g=[];this.o=!1;this.l=new _.hs;this.a={};this.j=0;this.a.data=pr;!window.fetch||!window.AbortController||_.Dj(6)||_.Gj()&&68<_.bk().browserVersion.major?(this.a.http=Sq,this.a.https=Sq):(this.a.http=kr,this.a.https=kr)}Vg(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()}Be(a){this.f.push(a)}Hc(a){this.g.push(a)}tf(a){this.f=this.f.filter(b=>
327
- b!==a)}yd(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.o)return new is(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.g)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.Km;try{for(const f of a.requestModifiers)d=d.then(g=>
328
- {if(e.a)throw new _.H(_.F,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(_.F,1,1006,null,g);});d=d.then(f=>{var g=new _.vh(f.uris[f.uriIndex]);var h=g.Ya;h||(h=location.protocol,h=h.slice(0,-1),wh(g,h),f.uris[f.uriIndex]=g.toString());h=this.a[h];if(!h)throw new _.H(_.F,1,1E3,{url:g.toString()});g=h;return{request:f,plugin:g}});e=new is(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.F,1,7001,
329
- 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(_.F,1,1007,null,g);});_.Gi(this.l,e);c.resolve(a);return e}catch(f){return new is(Promise.reject(f))}}};_.x("clpp.net.NetworkEngine",_.Eo);_.Eo.prototype.fetch=_.Eo.prototype.fetch;
330
- _.Eo.prototype.removeResponseModifier=_.Eo.prototype.yd;_.Eo.prototype.removeRequestModifier=_.Eo.prototype.tf;_.Eo.prototype.addResponseModifier=_.Eo.prototype.Hc;_.Eo.prototype.addRequestModifier=_.Eo.prototype.Be;_.Eo.prototype.setRateLimit=_.Eo.prototype.Vg;var Mi;
331
- _.Pi=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&&kh(this.roles,
332
- a.roles)&&kh(this.accessibility,a.accessibility,Ki)}toString(){return`Track type: ${this.type} id: ${this.id}
333
- renditions size: ${this.renditions.length}`}};_.x("clpp.Track",_.Pi);_.Pi.prototype.toString=_.Pi.prototype.toString;_.Zi=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}};_.x("clpp.Rendition",_.Zi);_.Oi=1;_.M=_.u;_.L=_.p;_.K="text";Mi=_.re;_.js={VIDEO:_.M,AUDIO:_.L,TEXT:_.K,METADATA:Mi};_.Pi.Type=_.js;_.ql=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;
334
- _.ci(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.g=b.hash}};_.x("clpp.utils.url.queryString",_.Si);var ks=class{constructor(a){this.f=a;this.h=new _.R("clpp.native.hls.HlsMetadataParser");this.a=qh(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 Xi(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 aj(c,d,
335
- 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 cj(d);e.Bc=f}catch(f){c.h.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.kj=[];_.S=class{Hd(){return!0}gg(a){return this.getVideoTracks().find(b=>_.Gg(b,a,a&&Object.keys(a)))}cg(a){return this.getAudioTracks().find(b=>_.Gg(b,a,a&&Object.keys(a)))}eg(a){return this.ga().find(b=>_.Gg(b,a,a&&Object.keys(a)))}fg(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.Gg(b,a,a&&Object.keys(a)))}bg(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.Gg(b,a,a&&Object.keys(a)))}dg(a){return this.ga().flatMap(b=>b.renditions).find(b=>_.Gg(b,a,a&&Object.keys(a)))}};
336
- _.x("clpp.TrackManager",_.S);_.S.prototype.isAbrEnabled=_.S.prototype.ma;_.S.prototype.addTextTrack=_.S.prototype.addTextTrack;_.S.prototype.findTextRendition=_.S.prototype.dg;_.S.prototype.findAudioRendition=_.S.prototype.bg;_.S.prototype.findVideoRendition=_.S.prototype.fg;_.S.prototype.findTextTrack=_.S.prototype.eg;_.S.prototype.findAudioTrack=_.S.prototype.cg;_.S.prototype.findVideoTrack=_.S.prototype.gg;_.S.prototype.setTextRendition=_.S.prototype.$a;_.S.prototype.setAudioRendition=_.S.prototype.Za;
337
- _.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.ib;_.S.prototype.getLoadingAudioRendition=_.S.prototype.hb;_.S.prototype.getLoadingVideoRendition=_.S.prototype.Va;
338
- _.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.Hd;var oj=new Map,nj=1,sj=2,rj=3,qj=4;_.ls=(new Map).set(_.md,_.md).set("frameRate","framerate").set("bandwidth","bitrate").set(_.kg,_.kg).set(_.Ud,_.Ud).set("channelsCount","channels");_.ms=class{constructor(a){this.f=a;this.a=null}ca(a){return wj(this,a,!1)}bb(a){return wj(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.zj=class{constructor(a){this.f=a;this.a=null}ve(){this.stop();this.f();return this}ca(a){this.stop();this.a=(new _.ms(()=>{this.f()})).ca(a);return this}bb(a){this.stop();this.a=(new _.ms(()=>{this.f()})).bb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.x("clpp.utils.Timer",_.zj);_.zj.prototype.stop=_.zj.prototype.stop;_.zj.prototype.tickEvery=_.zj.prototype.bb;_.zj.prototype.tickAfter=_.zj.prototype.ca;_.zj.prototype.tickNow=_.zj.prototype.ve;var ns=class{};_.x(ld,ns);ns.getInfo=_.bk;
339
- var yj=null,xj=null,Qj=new _.R(ld),Uj="android",Tj="ios",Zj="linux",Vj="osx",Wj="windows",Xj="tizen",Yj="webos",Sj=Jf,ak=Jf,Lj={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 ys=class{};_.z("clpp.utils.BufferUtils",ys);ys.toArrayBuffer=ii;ys.toDataView=_.hi;ys.toInt32Array=_.gi;ys.toUint32Array=fi;ys.toUint16Array=ei;ys.toUint8Array=_.J;ys.equal=ci;var li=new _.S("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.ki);_.z("clpp.utils.strings.fromBytesAutoDetect",_.ni);_.z("clpp.utils.strings.toUtf8",_.oi);_.z("clpp.utils.strings.toUtf16",_.pi);_.z("clpp.utils.strings.toByteArray",_.qi);_.z("clpp.utils.strings.startsWith",_.ri);_.z("clpp.utils.strings.endsWith",_.si);_.z("clpp.utils.strings.bitrateToString",_.vi);
332
+ _.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)))});
333
+ _.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 wi=document.createElement("span");var zs=class{};_.z("clpp.utils.Uint8ArrayUtils",zs);zs.toStandardBase64=_.yi;zs.concat=_.Ei;zs.equal=_.Di;zs.toHex=_.Ci;zs.fromHex=_.Bi;zs.fromBase64=_.Ai;zs.toBase64Url=_.zi;_.As=new _.S("clpp.hls.Utils");_.Gi=class{constructor(a){this.f=a;this.a=0}};_.Bs=new Set([_.Da,_.Ea,"EXT-X-I-FRAMES-ONLY",_.Ha,_.Ia,_.Ja,_.Na,_.Pa]);_.Cs=new Set(["EXTINF",_.Aa,_.Ca,_.Fa,_.Ga,_.Ma]);_.Ds=new Set(["EXT-X-PART",_.La]);_.Es=new Set([_.Ba]);var Ki=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",Ki);_.z("clpp.net.makeRequest",_.Oi);_.Ni=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.Ni});_.Zm=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(){}};_.go=class{constructor(a,b){this.O=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}Bd(a,b){const c=new _.Zm;let d=()=>{c.reject(new _.H(_.E,7,7001));return this.abort()};this.O.then(e=>{this.a?c.reject(new _.H(_.E,7,7001)):a?d=Ti(a,e,c):c.resolve(e)},e=>{b?d=Ti(b,e,c):c.reject(e)});return new _.go(c,()=>d())}};_.go.aborted=function(){const a=Promise.reject(new _.H(_.E,7,7001));a.catch(()=>{});return new _.go(a,()=>Promise.resolve())};_.go.prototype.chain=_.go.prototype.Bd;_.Fs=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.O.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.To=class{constructor(){this.f=[];this.h=[];this.o=!1;this.l=new _.Fs;this.a={};this.j=0;this.a.data=Lr;!window.fetch||!window.AbortController||_.Tj(6)||_.Wj()&&68<_.rk().browserVersion.major?(this.a.http=pr,this.a.https=pr):(this.a.http=Gr,this.a.https=Gr)}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.h=[];return this.l.destroy()}bf(a){this.f.push(a)}Sc(a){this.h.push(a)}Qf(a){this.f=this.f.filter(b=>
334
+ b!==a)}Ud(a){this.h=this.h.filter(b=>b!==a)}fetch(a){if(this.o)return new Gs(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 _.Zm;try{for(const f of a.requestModifiers)d=d.then(g=>
335
+ {if(e.a)throw new _.H(_.E,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(_.E,1,1006,null,g);});d=d.then(f=>{var g=new _.Ih(f.uris[f.uriIndex]);var h=g.pb;h||(h=location.protocol,h=h.slice(0,-1),Jh(g,h),f.uris[f.uriIndex]=g.toString());h=this.a[h];if(!h)throw new _.H(_.E,1,1E3,{url:g.toString()});g=h;return{request:f,plugin:g}});e=new Gs(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.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 _.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(_.E,1,1007,null,g);});_.Vi(this.l,e);c.resolve(a);return e}catch(f){return new Gs(Promise.reject(f))}}};_.z("clpp.net.NetworkEngine",_.To);_.To.prototype.fetch=_.To.prototype.fetch;
337
+ _.To.prototype.removeResponseModifier=_.To.prototype.Ud;_.To.prototype.removeRequestModifier=_.To.prototype.Qf;_.To.prototype.addResponseModifier=_.To.prototype.Sc;_.To.prototype.addRequestModifier=_.To.prototype.bf;_.To.prototype.setRateLimit=_.To.prototype.nh;var aj;
338
+ _.dj=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=[]}Fc(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&&zh(this.roles,
339
+ a.roles)&&zh(this.accessibility,a.accessibility,Zi)}toString(){return`Track type: ${this.type} id: ${this.id}
340
+ renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.dj);_.dj.prototype.toString=_.dj.prototype.toString;_.lj=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.drm=this.drmInfo=this.codec=this.Tc=this.bandwidth=this.height=this.width=null}};_.z("clpp.Rendition",_.lj);_.cj=1;_.M=_.w;_.L=_.p;_.K="text";aj=_.ve;_.Hs={VIDEO:_.M,AUDIO:_.L,TEXT:_.K,METADATA:aj};_.dj.Type=_.Hs;_.Fl=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
+ _.ri(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.z("clpp.utils.url.queryString",_.gj);var Is=class{constructor(a){this.f=a;this.g=new _.S("clpp.native.hls.HlsMetadataParser");this.a=Dh(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 jj(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 nj(c,d,
342
+ 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 pj(d);e.Kc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.zj=[];_.T=class{$d(){return!0}wg(a){return this.getVideoTracks().find(b=>_.Ug(b,a,a&&Object.keys(a)))}sg(a){return this.getAudioTracks().find(b=>_.Ug(b,a,a&&Object.keys(a)))}ug(a){return this.ma().find(b=>_.Ug(b,a,a&&Object.keys(a)))}vg(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.Ug(b,a,a&&Object.keys(a)))}rg(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.Ug(b,a,a&&Object.keys(a)))}tg(a){return this.ma().flatMap(b=>b.renditions).find(b=>_.Ug(b,a,a&&Object.keys(a)))}};
343
+ _.z("clpp.TrackManager",_.T);_.T.prototype.isAbrEnabled=_.T.prototype.ua;_.T.prototype.addTextTrack=_.T.prototype.addTextTrack;_.T.prototype.findTextRendition=_.T.prototype.tg;_.T.prototype.findAudioRendition=_.T.prototype.rg;_.T.prototype.findVideoRendition=_.T.prototype.vg;_.T.prototype.findTextTrack=_.T.prototype.ug;_.T.prototype.findAudioTrack=_.T.prototype.sg;_.T.prototype.findVideoTrack=_.T.prototype.wg;_.T.prototype.setTextRendition=_.T.prototype.rb;_.T.prototype.setAudioRendition=_.T.prototype.qb;
344
+ _.T.prototype.setVideoRendition=_.T.prototype.gb;_.T.prototype.setTextTrack=_.T.prototype.Ta;_.T.prototype.setAudioTrack=_.T.prototype.Da;_.T.prototype.setVideoTrack=_.T.prototype.sb;_.T.prototype.getTextTrack=_.T.prototype.za;_.T.prototype.getAudioTrack=_.T.prototype.na;_.T.prototype.getVideoTrack=_.T.prototype.Ra;_.T.prototype.getLoadingTextRendition=_.T.prototype.xb;_.T.prototype.getLoadingAudioRendition=_.T.prototype.wb;_.T.prototype.getLoadingVideoRendition=_.T.prototype.kb;
345
+ _.T.prototype.getTextRendition=_.T.prototype.Pa;_.T.prototype.getAudioRendition=_.T.prototype.Xa;_.T.prototype.getVideoRendition=_.T.prototype.oa;_.T.prototype.getTextTracks=_.T.prototype.ma;_.T.prototype.getAudioTracks=_.T.prototype.getAudioTracks;_.T.prototype.getVideoTracks=_.T.prototype.getVideoTracks;_.T.prototype.canSelectVideoTracks=_.T.prototype.$d;var Dj=new Map,Cj=1,Hj=2,Gj=3,Fj=4;_.Js=(new Map).set(_.rd,_.rd).set("frameRate","framerate").set("bandwidth","bitrate").set(_.yg,_.yg).set(_.Yd,_.Yd).set("channelsCount","channels");_.Ks=class{constructor(a){this.f=a;this.a=null}ia(a){return Mj(this,a,!1)}tb(a){return Mj(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Pj=class{constructor(a){this.f=a;this.a=null}Me(){this.stop();this.f();return this}ia(a){this.stop();this.a=(new _.Ks(()=>{this.f()})).ia(a);return this}tb(a){this.stop();this.a=(new _.Ks(()=>{this.f()})).tb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.Pj);_.Pj.prototype.stop=_.Pj.prototype.stop;_.Pj.prototype.tickEvery=_.Pj.prototype.tb;_.Pj.prototype.tickAfter=_.Pj.prototype.ia;_.Pj.prototype.tickNow=_.Pj.prototype.Me;var Ls=class{};_.z(qd,Ls);Ls.getInfo=_.rk;
346
+ var Oj=null,Nj=null,gk=new _.S(qd),kk="android",jk="ios",pk="linux",lk="osx",mk="windows",nk="tizen",ok="webos",ik=Xf,qk=Xf,bk={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,
340
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,
341
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},
342
- 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.h=new _.R("clpp.native.TrackManager");this.m=null;this.f=new _.Er;this.g=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.O=this.B.bind(this,_.K);this.U=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}Hd(){return!_.Nj()}B(a,
343
- b){const c=this;return _.w(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.g.find(n=>ck(n,d,a));if(k)c.h.warn("Track from event already exists",d,k);else{var l=Qi(a,d),m=dk(d);if(f){if(d.kind===_.re)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(q=>ck(l,q,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.sc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.g.find(n=>n.type===a&&_.Gg(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.h.debug(`Setting native ${a} track active`),
344
- 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 _.Zi(l.id,l));c.g.push(l);const n=c.m.getConfiguration().safari;fk(c,a,n)?yield gk(c,l,n):hk(c,a,n)&&(yield ik(c,l,n));c.h.debug(a+" Track added",l);c.m.trigger(new _.C(_.os));const q=jk(c,a).length,t=!(!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&&
345
- g&&(e?f():t&&1!==v||f())}catch(n){c.h.error("Error while converting track data",n)}}}else c.h.warn(lb)}else c.h.warn(ib)})}F(a,b){if(b){var c=b.track;c?a===_.K&&c.kind!==_.re&&(b=this.g.find(d=>ck(d,c,a)))&&(this.g.splice(this.g.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),kk(this)),this.h.debug(a+" Track removed, id: ",b.id)):this.h.warn(lb)}else this.h.warn(ib)}C(a,b){this.h.debug(a+" Track changed",b);a===_.K&&kk(this);const c=mk(this,a);if(c)for(let d=0;d<c.length;++d)if(dk(c[d])){if(b=
346
- this.g.find(e=>ck(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===_.L?this.m.trigger(new _.C(_.pk)):a===_.K&&this.m.trigger(new _.C(_.qk));break}}initialize(a){this.m=a;this.j=new ks(a.getNetworkEngine())}load(){this.A=!1;var a=lk(this,_.K);a&&(this.f.on(a,_.nc,this.O),this.f.on(a,jf,this.U),this.f.on(a,Xc,this.R));if(a=lk(this,_.L))this.f.on(a,_.nc,this.J),this.f.on(a,jf,this.M),this.f.on(a,Xc,this.K);if(a=lk(this,_.M))this.f.on(a,
347
- _.nc,this.V),this.f.on(a,jf,this.Z),this.f.on(a,Xc,this.W);this.f.one(this.m,Qc,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 jk(this,_.M)}getAudioTracks(){return jk(this,_.L)}ga(){return jk(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]||
348
- null}Ka(){return nk(this,_.L)}Da(){return nk(this,_.K)}Va(){return ok(this,_.M)}hb(){return ok(this,_.L)}ib(){return ok(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){rk(this,_.M,a)}ta(a){rk(this,_.L,a)}Ha(a){rk(this,_.K,a)}Ra(a){rk(this,_.M,a&&a.track)}Za(a){rk(this,_.L,a&&a.track)}$a(a){rk(this,_.K,a&&a.track)}addTextTrack(a){const b=this;return _.w(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
349
- b.o[c]=a;sk(b,a,c)}else yield tk(b,a)})}ma(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.w(function*(){const b=a.m.getConfiguration();vk(a,_.L,b.preferredAudioLanguage);if(!mk(a,_.K).some(c=>dk(c))){const c=lk(a,_.K);yield new Promise(d=>{a.f.one(c,Xc,d);(new _.zj(d)).ca(1)})}a.A||vk(a,_.K,b.preferredTextLanguage)})}};T.prototype.isAbrEnabled=T.prototype.ma;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.setTextRendition=T.prototype.$a;
350
- 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.ib;T.prototype.getLoadingAudioRendition=T.prototype.hb;T.prototype.getLoadingVideoRendition=T.prototype.Va;
351
- 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.Hd;_.ps=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(Gb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(Gb);}rb(){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-
352
- 1)}cc(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=
353
- "";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",_.ps);_.ps.prototype.bufferedAheadOf=_.ps.prototype.Ia;_.ps.prototype.isBuffered=_.ps.prototype.cc;_.ps.prototype.bufferEnd=_.ps.prototype.Ba;_.ps.prototype.bufferStart=_.ps.prototype.rb;_.ps.prototype.end=_.ps.prototype.end;_.ps.prototype.start=_.ps.prototype.start;_.qs=class{constructor(){this.Nc=new Cr(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)}};
354
- _.qs.prototype.off=_.qs.prototype.off;_.qs.prototype.one=_.qs.prototype.one;_.qs.prototype.on=_.qs.prototype.on;_.qs.prototype.removeEventListener=_.qs.prototype.removeEventListener;_.qs.prototype.addEventListener=_.qs.prototype.addEventListener;_.x("clpp.events.ERROR",_.Qd);_.x("clpp.events.LOADEDMETADATA",_.le);_.x("clpp.events.BUFFERING_ENDED",_.Nc);_.x("clpp.events.BUFFERING_STARTED",_.Oc);_.x("clpp.events.STATE_CHANGED",_.vf);_.pk="audiotrackchanged";_.x("clpp.events.AUDIO_TRACK_CHANGED",_.pk);_.qk="texttrackchanged";_.x("clpp.events.TEXT_TRACK_CHANGED",_.qk);_.x("clpp.events.VIDEO_TRACK_CHANGED",_.$f);_.x("clpp.events.BITRATE_CHANGED",_.Lc);_.os="tracksadded";_.x("clpp.events.TRACKS_ADDED",_.os);_.x("clpp.events.LOAD_START",me);
355
- _.x("clpp.events.RELEASING",_.hf);_.x("clpp.events.RELEASED",gf);_.x("clpp.events.DESTROYING","destroying");_.x("clpp.events.DESTROYED","destroyed");_.x("clpp.events.VIDEO_BUFFER_CHANGED",_.Zf);_.x("clpp.events.AUDIO_BUFFER_CHANGED",_.Jc);_.x("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.x("clpp.events.DRM_SESSION_UPDATE",_.Jd);_.x("clpp.events.DRM_SESSION_PERSISTED",_.Id);_.x("clpp.events.DRM_RENEWAL_STARTED",Hd);_.x("clpp.events.DRM_EXPIRATION_UPDATE",_.Gd);
356
- _.x("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Kc);_.x("clpp.events.PLAY",_.Me);_.x("clpp.events.SEEKING",_.of);_.x("clpp.events.SEEKED",_.nf);_.x("clpp.events.USER_SEEKING",_.Pf);_.x("clpp.events.USER_SEEKED",_.Of);_.zn={SEEKING:1,NO_DATA:2};_.x("clpp.events.BufferingReasons",_.zn);_.x("clpp.events.ADS_TIMELINE_CHANGED",_.oc);_.x("clpp.events.AD_LOADED",_.ec);_.x("clpp.events.AD_BREAK_STARTED",_.Xb);_.x("clpp.events.AD_STARTED",_.kc);_.x("clpp.events.AD_BUFFERING",_.$b);_.x("clpp.events.AD_PROGRESS",_.hc);
357
- _.x("clpp.events.AD_FIRST_QUARTILE",_.cc);_.x("clpp.events.AD_MIDPOINT",_.fc);_.x("clpp.events.AD_THIRD_QUARTILE",_.mc);_.x("clpp.events.AD_PAUSED",_.gc);_.x("clpp.events.AD_RESUMED",_.ic);_.x("clpp.events.AD_SKIPPED",_.jc);_.x("clpp.events.AD_CLICKED",_.ac);_.x("clpp.events.AD_IMPRESSION",_.dc);_.x("clpp.events.AD_COMPLETED",_.bc);_.x("clpp.events.AD_STOPPED",_.lc);_.x("clpp.events.AD_BREAK_STOPPED",_.Zb);_.x("clpp.events.SIMID_CREATIVE_STARTED",_.qf);_.x("clpp.events.SIMID_CREATIVE_STOPPED",_.rf);
358
- _.x("clpp.events.CASTING_STARTED",_.Rc);_.x("clpp.events.CASTING_ENDED","castingended");_.x("clpp.events.CAST_STATUS_CHANGED",_.Sc);_.x("clpp.events.AIRPLAY_STATUS_CHANGED",_.rc);_.x("clpp.events.AIRPLAY_CASTING_STARTED",_.qc);_.x("clpp.events.AIRPLAY_CASTING_ENDED",_.pc);_.bh="timeline-cue-added";_.x("clpp.events.TIMELINE_CUE_ADDED",_.bh);_.dh="timeline-cue-enter";_.x("clpp.events.TIMELINE_CUE_ENTER",_.dh);_.eh="timeline-cue-exit";_.x("clpp.events.TIMELINE_CUE_EXIT",_.eh);
359
- _.x("clpp.events.MPD_TYPE_CHANGED",_.ve);_.x("clpp.events.LIVE_TURNED_STATIC",_.je);_.x("clpp.events.VIMOND_RESPONSE",_.ag);_.x("clpp.events.PLAYLIST_ITEM_CHANGED",_.Ue);_.x("clpp.events.PLAYLIST_MODIFIED",_.Ve);_.x("clpp.events.CDN_SWITCH_SUCCESS",_.Tc);_.x("clpp.events.ONLINE_STATUS_CHANGED",Ee);var wk=["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",_.da);_.x("clpp.name",_.pa);_.uk="application/x-mpegurl";_.x("clpp.Type",{DASH:_.tc,HLS:_.uk,SMOOTH_STREAMING:_.zc,MP4:_.Yf});_.ah="scte35";_.Zg=Jf;_.x("clpp.TimelineCueType",{SCTE35:_.ah,DASH_CALLBACK:_.we,HLS_DATERANGE:"hls-daterange",UNKNOWN:_.Zg});_.x("clpp.SpeedUpMode",{DECODER:_.yd,SEEK:"seek"});var rs=class{};_.x("clpp.utils.PlayerConfiguration",rs);rs.create=_.Ck;var ss=["abort",Pc,Qc,Ld,"emptied",Nd,_.Pd,_.Qd,"interruptbegin","interruptend",_.ke,_.le,me,"mozaudioavailable",_.Ie,_.Me,_.Te,_.df,_.ff,_.nf,_.of,tf,"suspend",_.Ff,"volumechange",_.dg,_.eg,_.lf,jg,ig,gg,hg];_.ts=class extends _.qs{constructor(a){super();this.log=new _.R(a);this.configuration=this.qc=_.Ak();this.ea=this.A=null;this.Vb=this.Wd=!1;this.Gf=new _.R("clpp.video.events");this.qb=null;this.uc=-1;this.Nf=this.Lf.bind(this);this.Vd=new _.Eo;this.M=new _.Er;this.oc=this.sc=this.K=null}init(a,b){this.configuration=this.qc=b;this.A=a;this.log.info("Initializing Player surface");a=this.A.getMedia();this.log.info("Attaching media element listeners");for(const c of ss)this.M.on(a,c,this.Nf,c!==_.Qd);
360
- this.qb||(this.qb=this.sf());this.qb.initialize(this);this.A.showMediaElement()}release(){this.K&&(this.K.destroy(),this.K=null);return Promise.resolve()}destroy(){this.M.release();return this.Vd.release()}canPlay(a,b){return _.Tg[this.namespace()].canPlay(a,b)}play(){if(!this.ea)return Promise.reject("No sources specified yet. You need to load content before calling play.");const a=this.A.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c=
361
- {name:b.name||"",message:b.message||"",stack:b.stack||""};xk(c)?(this.trigger(new _.C(_.Kc)),this.log.warn(_.ja)):c.name===nb&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ea?new Promise((a,b)=>{const c=this.getState();if(c!==_.xn&&c!==_.un&&c!==_.Fn&&c!==_.En)b();else if(this.A.getMedia().pause(),this.getState()===_.Fn)this.M.one(this,_.vf,()=>{a()});else a()}):Promise.reject("No sources specified yet. You need to load content before calling pause.")}isPaused(){return this.A.getMedia().paused}isEnded(){return this.A.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.sc=
362
- a}setCdnErrorCallback(a){this.oc=a}xc(){return this.sc}getSurface(){return this.A}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.ps(b?b.buffered:void 0,a)}getPosition(){const a=this.A.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.A.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),
363
- 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 _.C(_.Pf));this.M.on(c,_.nf,h);this.M.on(c,_.Ff,h);this.M.on(c,_.df,h);this.log.info("Seeking to "+a+". Delta "+d);this.Vb=this.Wd=!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===_.nf,y=l.type===_.df,A=l.type===_.Ff,
364
- 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.Vb=this.Wd=!1,this.M.off(c,_.nf,h),this.M.off(c,_.Ff,h),this.M.off(c,_.df,h),this.Ff(),this.trigger(new _.C(_.Of)),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();
365
- else this.M.one(c,_.le,g)};this.getState()===_.Cn?(this.log.debug("Player is in IDLE state. Postpone seek."),this.M.one(this,_.vf,()=>{switch(this.getState()){case _.xn:case _.Fn:case _.En: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.A.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.A.getMedia();
366
- b?_.Fg(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
367
- 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.A.getMedia().muted}setMuted(a){const b=this.A.getMedia();typeof a===_.Mc&&(b.muted=a)}getDuration(){return this.ea?this.A.getMedia().duration:-1}getTrackManager(){return this.qb}getPlaybackRate(){const a=this.A.getMedia();return a&&a.playbackRate||1}setPlaybackRate(a){const b=this.A.getMedia();
368
- void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.uc=a}getSourceIndex(){return this.uc}getLoadedSource(){return this.ea&&-1!==this.uc?this.ea[this.uc]:null}getPeriods(){return[]}getNetworkEngine(){return this.Vd}setNetworkEngine(a){this.Vd=a}getTextDisplayer(){return this.K}getTimelineCues(){return[]}resetAbr(){}Lf(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===_.Ff||a.type===_.df)this.Gf.debug(d);
369
- else{let e="";switch(a.type){case _.ff:e=`Rate: ${this.getPlaybackRate()}`;break;case Ld:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Me:case _.Te:case "suspend":case _.dg:case tf:case _.of:case _.nf:case _.Ff:case _.df:case Pc:case Qc:b=this.getBufferInfo().Ia(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.lf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+
370
- e);this.Gf.info(d)}a.type!==_.Qd&&this.trigger(new _.C(a.type,{detail:a}))}Ff(){}};_.ts.prototype.getTextDisplayer=_.ts.prototype.getTextDisplayer;_.ts.prototype.setNetworkEngine=_.ts.prototype.setNetworkEngine;_.ts.prototype.getNetworkEngine=_.ts.prototype.getNetworkEngine;var Gk;Gk=new _.R("clpp.Components");_.Ek=new Map;_.x("clpp.install",function(a){Ok(a)});_.x("clpp.uninstall",function(a){Pk(a)});var us=class{constructor(){this.a=this.f=null;this.h=new _.R("clpp.drm.csl")}release(){this.a=this.f=null}};_.x("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.zb,SW_SECURE_DECODE:_.Ab,HW_SECURE_CRYPTO:Va,HW_SECURE_DECODE:Wa,HW_SECURE_ALL:Ta});_.x("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.x("clpp.drm.KeySystem",{NONE:_.xe,CLEAR_KEY:_.Ge,WIDEVINE:_.ud,PLAYREADY:_.sd,FAIRPLAY:_.pd,PRIMETIME:_.od});_.Tk={};_.x("clpp.drm.registerDrmEnvironment",_.Uk);var Xk={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 U=class extends _.T{constructor(){super();this.g=new _.S("clpp.native.TrackManager");this.m=null;this.f=new _.$r;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.C.bind(this,_.K);this.S=this.F.bind(this,_.K);this.R=this.D.bind(this,_.K);this.T=this.C.bind(this,_.M);this.Y=this.F.bind(this,_.M);this.X=this.D.bind(this,_.M);this.J=this.C.bind(this,_.L);this.M=this.F.bind(this,_.L);this.K=this.D.bind(this,_.L);this.j=null}$d(){return!_.dk()}C(a,
350
+ 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=>sk(n,d,a));if(k)c.g.warn("Track from event already exists",d,k);else{var l=ej(a,d),m=tk(d);if(f){if(d.kind===_.ve)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(r=>sk(l,r,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.xc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.h.find(n=>n.type===a&&_.Ug(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.g.debug(`Setting native ${a} track active`),
351
+ 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 _.lj(l.id,l));c.h.push(l);const n=c.m.getConfiguration().safari;vk(c,a,n)?yield wk(c,l,n):xk(c,a,n)&&(yield yk(c,l,n));c.g.debug(a+" Track added",l);c.m.trigger(new _.D(_.Ms));const r=zk(c,a).length,v=!(!h||!h.length),u=h&&h.length||0;f=()=>{c.g.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${r}`,d);c.a.set(a,l)};m?f():1===r&&
352
+ g&&(e?f():v&&1!==u||f())}catch(n){c.g.error("Error while converting track data",n)}}}else c.g.warn(nb)}else c.g.warn(kb)})}F(a,b){if(b){var c=b.track;c?a===_.K&&c.kind!==_.ve&&(b=this.h.find(d=>sk(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),Ak(this)),this.g.debug(a+" Track removed, id: ",b.id)):this.g.warn(nb)}else this.g.warn(kb)}D(a,b){this.g.debug(a+" Track changed",b);a===_.K&&Ak(this);const c=Ck(this,a);if(c)for(let d=0;d<c.length;++d)if(tk(c[d])){if(b=
353
+ this.h.find(e=>sk(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 _.D(_.Fk)):a===_.K&&this.m.trigger(new _.D(_.Gk));break}}initialize(a){this.m=a;this.j=new Is(a.getNetworkEngine())}load(){this.A=!1;var a=Bk(this,_.K);a&&(this.f.on(a,_.sc,this.N),this.f.on(a,sf,this.S),this.f.on(a,bd,this.R));if(a=Bk(this,_.L))this.f.on(a,_.sc,this.J),this.f.on(a,sf,this.M),this.f.on(a,bd,this.K);if(a=Bk(this,_.M))this.f.on(a,
354
+ _.sc,this.T),this.f.on(a,sf,this.Y),this.f.on(a,bd,this.X);this.f.one(this.m,Vc,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 zk(this,_.M)}getAudioTracks(){return zk(this,_.L)}ma(){return zk(this,_.K)}oa(){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]||
355
+ null}Xa(){return Dk(this,_.L)}Pa(){return Dk(this,_.K)}kb(){return Ek(this,_.M)}wb(){return Ek(this,_.L)}xb(){return Ek(this,_.K)}Ra(){return this.a.get(_.M)||null}na(){return this.a.get(_.L)||null}za(){return this.a.get(_.K)||null}sb(a){Hk(this,_.M,a)}Da(a){Hk(this,_.L,a)}Ta(a){Hk(this,_.K,a)}gb(a){Hk(this,_.M,a&&a.track)}qb(a){Hk(this,_.L,a&&a.track)}rb(a){Hk(this,_.K,a&&a.track)}addTextTrack(a){const b=this;return _.x(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
356
+ b.o[c]=a;Ik(b,a,c)}else yield Jk(b,a)})}ua(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();Lk(a,_.L,b.preferredAudioLanguage);if(!Ck(a,_.K).some(c=>tk(c))){const c=Bk(a,_.K);yield new Promise(d=>{a.f.one(c,bd,d);(new _.Pj(d)).ia(1)})}a.A||Lk(a,_.K,b.preferredTextLanguage)})}};U.prototype.isAbrEnabled=U.prototype.ua;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.setTextRendition=U.prototype.rb;
357
+ U.prototype.setAudioRendition=U.prototype.qb;U.prototype.setVideoRendition=U.prototype.gb;U.prototype.setTextTrack=U.prototype.Ta;U.prototype.setAudioTrack=U.prototype.Da;U.prototype.setVideoTrack=U.prototype.sb;U.prototype.getTextTrack=U.prototype.za;U.prototype.getAudioTrack=U.prototype.na;U.prototype.getVideoTrack=U.prototype.Ra;U.prototype.getLoadingTextRendition=U.prototype.xb;U.prototype.getLoadingAudioRendition=U.prototype.wb;U.prototype.getLoadingVideoRendition=U.prototype.kb;
358
+ U.prototype.getTextRendition=U.prototype.Pa;U.prototype.getAudioRendition=U.prototype.Xa;U.prototype.getVideoRendition=U.prototype.oa;U.prototype.getTextTracks=U.prototype.ma;U.prototype.getAudioTracks=U.prototype.getAudioTracks;U.prototype.getVideoTracks=U.prototype.getVideoTracks;U.prototype.canSelectVideoTracks=U.prototype.$d;_.Ns=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);}Fa(){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)}ha(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
359
+ 1)}mb(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}ya(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.ha(),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}};_.z("clpp.BufferInfo",_.Ns);_.Ns.prototype.bufferedAheadOf=_.Ns.prototype.ya;_.Ns.prototype.isBuffered=_.Ns.prototype.mb;_.Ns.prototype.bufferEnd=_.Ns.prototype.ha;_.Ns.prototype.bufferStart=_.Ns.prototype.Fa;_.Ns.prototype.end=_.Ns.prototype.end;_.Ns.prototype.start=_.Ns.prototype.start;_.Os=class{constructor(){this.Xc=new Yr(this);this.Wc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Xc.on(a,b,c)}one(a,b,c){return this.Xc.one(a,b,c)}off(a,b){return this.Xc.off(a,b)}forwardEventsTo(a){a&&(0<=this.Wc.indexOf(a)||this.Wc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.Wc.indexOf(a),0<=a&&this.Wc.splice(a,1))}trigger(a){this.Xc.trigger(a);for(const b of this.Wc)b.dispatchEvent(a)}};
361
+ _.Os.prototype.off=_.Os.prototype.off;_.Os.prototype.one=_.Os.prototype.one;_.Os.prototype.on=_.Os.prototype.on;_.Os.prototype.removeEventListener=_.Os.prototype.removeEventListener;_.Os.prototype.addEventListener=_.Os.prototype.addEventListener;_.z("clpp.events.ERROR",_.q);_.z("clpp.events.LOADEDMETADATA",_.le);_.z("clpp.events.BUFFERING_ENDED",_.Pc);_.z("clpp.events.BUFFERING_STARTED",_.Tc);_.z("clpp.events.STATE_CHANGED",_.Jf);_.Fk="audiotrackchanged";_.z("clpp.events.AUDIO_TRACK_CHANGED",_.Fk);_.Gk="texttrackchanged";_.z("clpp.events.TEXT_TRACK_CHANGED",_.Gk);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.ig);_.z("clpp.events.BITRATE_CHANGED",_.Nc);_.Ms="tracksadded";_.z("clpp.events.TRACKS_ADDED",_.Ms);_.z("clpp.events.LOAD_START",me);
362
+ _.z("clpp.events.RELEASING",_.rf);_.z("clpp.events.RELEASED",qf);_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.hg);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.Kc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_UPDATE",_.Od);_.z("clpp.events.DRM_SESSION_PERSISTED",_.Nd);_.z("clpp.events.DRM_RENEWAL_STARTED",Md);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Kd);
363
+ _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Lc);_.z("clpp.events.PLAY",_.Qe);_.z("clpp.events.SEEKING",_.Bf);_.z("clpp.events.SEEKED",_.Af);_.z("clpp.events.USER_SEEKING",_.bg);_.z("clpp.events.USER_SEEKED",_.ag);_.On={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.On);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.tc);_.z("clpp.events.AD_LOADED",_.ic);_.z("clpp.events.AD_BREAK_STARTED",_.bc);_.z("clpp.events.AD_STARTED",_.pc);_.z("clpp.events.AD_BUFFERING",_.dc);_.z("clpp.events.AD_PROGRESS",_.mc);
364
+ _.z("clpp.events.AD_FIRST_QUARTILE",_.gc);_.z("clpp.events.AD_MIDPOINT",_.jc);_.z("clpp.events.AD_THIRD_QUARTILE",_.rc);_.z("clpp.events.AD_PAUSED",_.lc);_.z("clpp.events.AD_RESUMED",_.nc);_.z("clpp.events.AD_SKIPPED",_.oc);_.z("clpp.events.AD_CLICKED",_.ec);_.z("clpp.events.AD_IMPRESSION",_.hc);_.z("clpp.events.AD_COMPLETED",_.fc);_.z("clpp.events.AD_STOPPED",_.qc);_.z("clpp.events.AD_BREAK_STOPPED",_.cc);_.z("clpp.events.SIMID_CREATIVE_STARTED",_.Df);_.z("clpp.events.SIMID_CREATIVE_STOPPED",_.Ef);
365
+ _.z("clpp.events.CASTING_STARTED",_.Wc);_.z("clpp.events.CASTING_ENDED","castingended");_.z("clpp.events.CAST_STATUS_CHANGED",_.Xc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.wc);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.vc);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.uc);_.qh="timeline-cue-added";_.z("clpp.events.TIMELINE_CUE_ADDED",_.qh);_.sh="timeline-cue-enter";_.z("clpp.events.TIMELINE_CUE_ENTER",_.sh);_.th="timeline-cue-exit";_.z("clpp.events.TIMELINE_CUE_EXIT",_.th);
366
+ _.z("clpp.events.MPD_TYPE_CHANGED",_.ze);_.z("clpp.events.LIVE_TURNED_STATIC",_.je);_.z("clpp.events.VIMOND_RESPONSE",_.jg);_.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.bf);_.z("clpp.events.PLAYLIST_MODIFIED",_.cf);_.z("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.zf);_.z("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.xf);_.z("clpp.events.SC_PLAYLIST_ENDED",_.wf);_.z("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.yf);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.Yc);_.z("clpp.events.ONLINE_STATUS_CHANGED",Ie);var Mk=["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",_.fa);_.z("clpp.name",_.ra);_.Kk="application/x-mpegurl";_.z("clpp.Type",{DASH:_.yc,HLS:_.Kk,SMOOTH_STREAMING:_.Dc,MP4:_.gg});_.ph="scte35";_.nh=Xf;_.z("clpp.TimelineCueType",{SCTE35:_.ph,DASH_CALLBACK:_.Ae,HLS_DATERANGE:"hls-daterange",UNKNOWN:_.nh});_.z("clpp.SpeedUpMode",{DECODER:_.Cd,SEEK:"seek"});_.z("clpp.CodecSwitchingStrategy",{PREVENT:_.kf,SMOOTH:_.Gf});var Ps=class{};_.z("clpp.utils.PlayerConfiguration",Ps);Ps.create=_.Sk;var Qs=["abort",Uc,Vc,Qd,"emptied",Sd,_.Ud,_.q,"interruptbegin","interruptend",_.ke,_.le,me,"mozaudioavailable",_.Me,_.Qe,_.af,_.nf,_.pf,_.Af,_.Bf,Hf,"suspend",_.Tf,"volumechange",_.ng,_.og,_.uf,xg,wg,ug,vg];_.Rs=class extends _.Os{constructor(a){super();this.log=new _.S(a);this.configuration=this.Va=_.Qk();this.ea=this.D=null;this.ed=this.Ce=!1;this.af=new _.S("clpp.video.events");this.ec=null;this.Jd=-1;this.bg=this.ag.bind(this);this.Be=new _.To;this.M=new _.$r;this.Cc=this.Ec=this.X=null}init(a,b){this.configuration=this.Va=b;this.D=a;this.log.info("Initializing Player surface");a=this.D.getMedia();this.log.info("Attaching media element listeners");for(const c of Qs)this.M.on(a,c,this.bg,c!==_.q);
367
+ this.ec||(this.ec=this.$f());this.ec.initialize(this);this.D.showMediaElement()}release(){this.X&&(this.X.destroy(),this.X=null);return Promise.resolve()}destroy(){this.M.release();return this.Be.release()}canPlay(a,b){return _.gh[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.ea)return Promise.reject("No sources specified yet. You need to load content before calling play.");
368
+ const a=this.D.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||""};Nk(c)?(this.trigger(new _.D(_.Lc)),this.log.warn(_.ka)):c.name===qb&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ea?new Promise((a,b)=>{const c=this.getState();if(c!==_.Mn&&c!==_.Jn&&c!==_.Un&&c!==_.Tn)b();else if(this.D.getMedia().pause(),this.getState()===
369
+ _.Un)this.M.one(this,_.Jf,()=>{a()});else a()}):Promise.reject("No sources specified yet. You need to load content before calling pause.")}isPaused(){return this.D.getMedia().paused}isEnded(){return this.D.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.Ec=a}setCdnErrorCallback(a){this.Cc=a}Ic(){return this.Ec}getSurface(){return this.D}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.Ns(b?b.buffered:void 0,a)}getPosition(){return this.getMediaPosition()}getMediaPosition(){const a=
370
+ this.D.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!==_.t||a===b)return Promise.resolve();const c=this.D.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 _.D(_.bg));this.M.on(c,_.Af,h);this.M.on(c,_.Tf,h);this.M.on(c,_.nf,h);this.log.info("Seeking to "+a+". Delta "+d);this.ed=this.Ce=!0;c.currentTime=a},h=l=>{const m=this.getMediaPosition(),n=.1>=Math.abs(a-m);var r=.25<m-a;const v=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,u=l.type===_.Af,y=l.type===_.nf,C=l.type===_.Tf,F=y&&v;r=u||n&&F||C&&r;this.log.debug("Checking seeking state after "+l.type+" event. Seek completed:",r,"Current Time:",m,"Target Time:",a,"Native Event:",
372
+ u,"Time reached",n,"Timeupdate:",C,"Progress:",y,"ReadyState:",v,"Progress Ready:",F);r?(this.ed=this.Ce=!1,this.M.off(c,_.Af,h),this.M.off(c,_.Tf,h),this.M.off(c,_.nf,h),this.Ye(),this.trigger(new _.D(_.ag)),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.M.one(c,_.le,g)};this.getState()===_.Rn?(this.log.debug("Player is in IDLE state. Postpone seek."),this.M.one(this,_.Jf,()=>{switch(this.getState()){case _.Mn:case _.Un:case _.Tn: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.D.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.D.getMedia();b?_.Tg(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.D.getMedia().muted}setMuted(a){const b=this.D.getMedia();typeof a===_.Oc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ea?this.D.getMedia().duration:-1}getTrackManager(){return this.ec}getPlaybackRate(){const a=this.D.getMedia();return a&&a.playbackRate||
375
+ 1}setPlaybackRate(a){const b=this.D.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.Jd=a}getSourceIndex(){return this.Jd}getLoadedSource(){return this.ea&&-1!==this.Jd?this.ea[this.Jd]:null}getPeriods(){return[]}getNetworkEngine(){return this.Be}setNetworkEngine(a){this.Be=a}getTextDisplayer(){return this.X}getTimelineCues(){return[]}resetAbr(){}ag(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===_.Tf||a.type===_.nf)this.af.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 _.Qe:case _.af:case "suspend":case _.ng:case Hf:case _.Bf:case _.Af:case _.Tf:case _.nf:case Uc:case Vc:b=this.getBufferInfo().ya(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.af.info(d)}a.type!==_.q&&this.trigger(new _.D(a.type,{detail:a}))}Ye(){}};_.Rs.prototype.getTextDisplayer=_.Rs.prototype.getTextDisplayer;_.Rs.prototype.setNetworkEngine=_.Rs.prototype.setNetworkEngine;_.Rs.prototype.getNetworkEngine=_.Rs.prototype.getNetworkEngine;var Wk;Wk=new _.S("clpp.Components");_.Uk=new Map;_.z("clpp.install",function(a){el(a)});_.z("clpp.uninstall",function(a){fl(a)});var Ss=class{constructor(){this.a=this.f=null;this.g=new _.S("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.Db,SW_SECURE_DECODE:_.Eb,HW_SECURE_CRYPTO:Xa,HW_SECURE_DECODE:Ya,HW_SECURE_ALL:Va});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.Be,CLEAR_KEY:_.Ke,WIDEVINE:_.yd,PLAYREADY:_.wd,FAIRPLAY:_.ud,PRIMETIME:_.td});_.jl={};_.z("clpp.drm.registerDrmEnvironment",_.kl);var nl={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,
371
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,
372
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,
373
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,
@@ -381,96 +388,101 @@ e);this.Gf.info(d)}a.type!==_.Qd&&this.trigger(new _.C(a.type,{detail:a}))}Ff(){
381
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,
382
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,
383
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,
384
- 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]};_.vs=class{constructor(a){this.I=a;this.f={}}Ma(a,b){this.f[a]=b}};_.x("clpp.drm.DrmEnvironment",_.vs);_.vs.prototype.setDrmSystem=_.vs.prototype.Ma;_.ul=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.Fg(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.g=b;this.buffer=this.f.buffer}getPosition(){return this.a}Ca(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.Zk();this.a=a}};_.em=class{constructor(a,b){this.f=a;this.g=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&&_.bl();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.bl();this.a=a}};
385
- _.x("clpp.utils.dataview.DataViewReader",_.em);_.sl=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.R("clpp.mp4")}L(a,b){a=jl(a);this.g[a]=ws;this.f[a]=b;return this}$(a,b){a=jl(a);this.g[a]=xs;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.J(a);a=new _.em(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.al(a)&&!this.a;)this.xd(0,a,b)}xd(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.h.debug("Parsing MP4 box",_.kl(f));switch(e){case 0:e=b.Ca()-d;break;case 1:e=_.gl(b),g=!0}const h=
386
- this.f[f];if(h){let m=null;var k=null;this.g[f]==xs&&(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?_.il(b,l):new Uint8Array(0);b=new _.em(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)}};_.x("clpp.utils.Mp4Parser",_.sl);_.sl.typeToString=_.kl;
387
- _.sl.allData=_.nl;_.sl.sampleDescription=_.ml;_.sl.children=_.ll;_.sl.prototype.parseNext=_.sl.prototype.xd;_.sl.prototype.parse=_.sl.prototype.parse;_.sl.prototype.stop=_.sl.prototype.stop;_.sl.prototype.fullBox=_.sl.prototype.$;_.sl.prototype.box=_.sl.prototype.L;_.sl.headerSize=_.ol;var ws=0,xs=1;var ys=class{};_.x("clpp.utils.FairplayUtils",ys);ys.parseFairPlayResponse=_.xl;ys.formatFairPlayRequest=_.wl;ys.createFairplayPayload=vl;ys.extractContentId=_.rl;ys.extractExtXKeyUri=pl;var Gl=new _.R("clpp.drm.DrmToday"),Ql="PRODUCTION",Rl="STAGING",Sl="TEST",zs={PRODUCTION:Ql,STAGING:Rl,TEST:Sl};_.x("clpp.drm.DrmToday.Environment",zs);_.x("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
388
- var zl="/license-proxy-widevine/cenc/",Al="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Bl="/license-server-fairplay/",Tl={"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",
389
- 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"},As=[Ta,Wa,Va,_.Ab,_.zb],Bs=[_.Ab,_.zb],Cs=["3000","2000","150"],
390
- Ds=["2000","150"];
391
- for(const a of Object.keys(zs)){let b=ua;a!==Ql&&(b+=`_${a}`);const c=new _.vs(b);let d=null;switch(a){case Ql:d=Yk("V1_PROD");break;case Rl:d=Yk("V2");break;case Sl:d=null}c.Ma(_.ud,{licenseUrl:Cl(_.ud,a),videoRobustness:As,audioRobustness:Bs,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Il,licenseResponse:_.Jl}});c.Ma(_.pd,{licenseUrl:Cl(_.pd,a),certificateUrl:yl(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Ll,licenseResponse:_.Ml,
392
- extractContentId:_.Nl,certificateRequest:_.Ol}});c.Ma(_.sd,{licenseUrl:Cl(_.sd,a),videoRobustness:Cs,audioRobustness:Ds,modifiers:{licenseRequest:Pl}});_.Uk(c)};var Es=class{};_.x("clpp.drm.eme.EmeFactory",Es);var Vl=[];Es.Apis={STANDARD:yb,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var cm,Fs,bm;_.km=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];cm=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];Fs=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};bm=class extends Fs{};_.jm=class extends Fs{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 mm=!!(performance&&performance.mark&&performance.measure);var Mm=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.sl).$("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=_.ni(_.il(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.ni(_.il(a.reader,16));c.push(f)}}d=_.P(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});a.reader.getPosition()!=
393
- a.reader.Ca()&&_.B("Mismatch between box size and data size!")}}};var Im,Gs;
394
- _.On=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=Gs;this.w=new _.Er;this.K=new us;this.f=new Map;this.J=[];this.F=new _.Km;this.g=null;this.T=b=>{this.o=!0;this.B=!1;this.F.reject(b);a.onError(b)};this.j=new Map;this.W=new Map;this.U=new _.zj(()=>Bm(this));this.ra=!1;this.aa=new _.Km;this.C=!1;this.V=[];this.ba=!1;this.O=0;this.h=new _.R("clpp.drm.DrmEngine");this.Z=(new _.zj(()=>{Cm(this)})).bb(1);this.F.catch(()=>{});this.o=this.B=!1;this.M=
395
- null}destroy(){const a=this;return _.w(function*(){a.ra?yield a.aa:(a.ra=!0,yield Dm(a),a.aa.resolve())})}keySystem(){return this.a?_.rm(this.a.keySystem):""}getDrmInfo(){return this.a}oa(a){const b=this;return _.w(function*(){if(!b.C||b.I!==Im){var c=Math.floor(a.timeStamp),d=`drm.msg.${c}.start`,e=`drm.msg.${c}.end`;_.nm(d);!b.g.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.ba?yield Rm(b,a):b.V.push(a);_.nm(e);_.om(`drm.sess.msg.${c}`,d,e)}})}fa(a){const b=a.target;this.h.info("Key status changed for session",
396
- b.sessionId);const c=this.f.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f==_.yf){var g=f;f=e;e=g}if(qm(this.a.keySystem)&&16===f.byteLength&&_.Bj()){g=_.Th(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!==wf&&(c.loaded=!0);c&&c.Fa&&c.Fa.resolve();"expired"===e&&(d=!0);f=_.J(f);let h=_.ni(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.pd)&&16!==f.byteLength&&(h=Vh(f));(f=h||"")?this.h.info(`Key status for Key ID '${h}': ${e}`):
397
- 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.Ta.forEach(e=>{this.j.get(e)===wf&&(this.h.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.He))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.j.get(e.keyId)===wf&&_.oi(e.initData,c.initData)&&(this.h.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,
398
- _.He))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.ob&&(this.h.debug("Session has expired",b.sessionId),(a=this.f.get(b))&&a.pc&&a.pc.stop(),this.f.delete(b),b.close().catch(()=>{}));$m(this)&&(this.F.resolve(),1!==this.f.size||d?this.U.ca(.5):Bm(this))}};Im=0;Gs=3;_.gn=new Map;_.hn=new _.R("clpp.text");var Hs=class{constructor(){this.a=null;this.f=[]}};var Is=class{constructor(){this.g=this.f=this.j=null;this.a=[]}};_.Js=class{constructor(){this.f=this.o=this.A=this.C=this.j=this.l=this.g=this.w=NaN;this.a=new Hs;this.B=new Is}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:mn(this.a,_.Fn),pauseTime:mn(this.a,_.En),bufferingTime:mn(this.a,_.xn),stateHistory:nn(this.a),switchHistory:on(this.B)}}};_.Ks=class{constructor(a){this.f=a;this.a=void 0}value(){void 0==this.a&&(this.a=this.f());return this.a}};var qn=new _.Ks(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.le],[HTMLMediaElement.HAVE_CURRENT_DATA,_.ke],[HTMLMediaElement.HAVE_FUTURE_DATA,Pc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Qc]]));var Ms=class{constructor(a){this.h=new _.R("clpp.StateManager");this.m=a;this.a=new _.Er;this.f=_.Cn;this.A=_.Ls;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.M=_.Nj();this.C=!1;this.I=Date.now();vn(this)}Rb(a,b){this.m&&this.m.trigger(new _.C(a,{detail:b}))}getState(){return yn(this,"")}T(a){(a=a&&a.detail)&&a.severity&&a.severity===_.F&&tn(this,_.Bn)}destroy(){this.h.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.x("clpp.utils.media.detectType",Gn);var Jn=new _.R("clpp.sources");var Ns=class extends _.ts{constructor(){super(jd);this.w=this.G=!1;this.l=this.B=this.o=this.a=this.j=null;this.g=new _.Er;this.F=this.C=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new Ms(this);tn(this.j,_.Cn)}namespace(){return jd}unload(){const a=this;return _.w(function*(){if(a.ea){a.log.debug(_.wb,a.ea);a.C&&(a.C.stop(),a.C=null);const b=a.getTrackManager();b&&b.release();a.B&&(a.B.destroy(),a.B=null);a.K&&(a.K.destroy(),a.K=null);a.l&&a.l.release();a.o&&(a.o.destroy(),a.o=null);_.Xg(a.g);
399
- a.f&&(a.f=new _.Js);a.F=null;a.ea=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Ln(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&tn(this.j,_.Cn)})}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(wa);const a=this.getTrackManager();a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
400
- 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.qb}load(a){const b=this;return _.w(function*(){if(b.w)return Kn();if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.A.getMedia();b.H=Date.now()/1E3;b.f=new _.Js;b.g.on(b,_.vf,()=>{b.f&&_.ln(b.f.a,b.getState())});tn(b.j,_.Dn);b.ea=_.In(a);b.configuration=_.Ck(b.qc,
401
- a);b.log.debug(_.cb,b.configuration);b.log.debug(_.rb,b.ea);const d=_.kn(b.configuration,[_.Wd,"native"]);b.K=d.create(b);b.K.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Fk(_.Bf)&&!_.Pj()&&(b.B=new Sr(b),b.B.start(c));b.l?b.l.release():b.l=new Fr(b);gh(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,Pc,()=>{b.trigger(new _.C(_.os))});null==
402
- b.configuration.startTime&&Tn(b,c);_.Nj()&&Un(b,c);try{yield Nn(b,c),yield Pn(b),yield Sn(b).P}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.F&&null!==this.j&&tn(this.j,_.Bn),this.trigger(new _.C(_.Qd,{detail:a})))}sf(){return new T}getState(){return null!==this.j?this.j.getState().currentState:_.Ls}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!"),
403
- 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 _.pn();this.f&&_.ln(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,
404
- 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():[]}};
405
- _.Vg(new class{a(){return jd}canPlay(a,b){a=a.type||"";const c=a===_.tc,d=a===_.zc,e=a===_.uk;var f;_.Mj()||c||d||e&&!_.Nj()?f=0:f=""!==Aj().canPlayType(a)?e&&_.Nj()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}create(){return new Ns}});_.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 Wn=new _.R("clpp.ads"),Vn=[];_.x("clpp.utils.dom.createHTMLElement",_.co);var Os=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=eo(this,a)}get(){return this.a}};var Rs=class{constructor(a,b){this.h=new _.R("clpp.PlayerSurface");this.w=_.xg(Ps,b);this.f=new Os;this.g=null;this.a=new Os;this.l=Qs;Qs+=1;this.o=`clpp-video-${this.l}`;this.j=new _.Er;if(null==a)throw new _.H(_.F,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.H(_.F,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
406
- HTMLMediaElement))throw new _.H(_.F,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 _.H(_.F,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Bd);a.parentNode?a.parentNode.replaceChild(c,
407
- 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),_.ao(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Af);for(d of[_.kg,_.Ud])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Dj()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),fo(this.a,"clpp-container"),
408
- fo(this.a,this.o),fo(this.f,_.Zc),fo(this.f,"clpp-video"));b.webOSStartupPatch&&go(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?_.ao(a,$c):this.h.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove($c):
409
- 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&&_.ao(a,_.Zc);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){_.ao(a,$c)}show(a){a.classList.remove($c)}release(){this.j.release()}};
410
- Rs.prototype.removeElementFromContainer=Rs.prototype.removeElementFromContainer;Rs.prototype.addElementToContainer=Rs.prototype.addElementToContainer;Rs.prototype.getCastElement=Rs.prototype.getCastElement;Rs.prototype.getContainer=Rs.prototype.getContainer;Rs.prototype.getMedia=Rs.prototype.getMedia;var Ps={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},Qs=1;var Ss=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.Er;this.g=null;this.f=!0;ko(this)}release(){this.a.release();lo(this);this.m=null}};_.x("clpp.polyfill.installAll",oo);var no=[];_.x("clpp.polyfill.register",_.po);var ro=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.Wh(_.li(a)));this.a=JSON.parse(_.Wh(_.li(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=_.$h(d),n=_.li(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(Cb)}).catch(g)}else b?
411
- g("Web Crypto API is not supported"):f()})}};var Ts={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},yk="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Io=class{constructor(a){this.license=a;this.a=null;this.h=new _.R("clpp.utils.LicenseKey")}verify(){return(new Promise((a,b)=>{try{const c=so(this);a(c)}catch(c){b()}})).then(a=>a.verify(Ts)).catch(a=>{if(a&&a!==Cb){{var b=window.location.href;const c=new _.vh(b);b=c.Ya||c.Ja?c:new _.vh("//"+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;})}},Do="vod",Co="live";var Q=class extends _.qs{constructor(a,b,c){super();oo();this.h=new _.R("clpp.Player");if(!a)throw new _.H(_.F,7,7102);this.J=new _.Er;this.f=this.K=b||_.Ak();this.l=null;void 0===this.f.license&&(this.f.license=yk,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 _.H(_.F,7,7101,"No license provided in configuration!");this.g=new Rs(a,c);this.a=this.w=null;
412
- this.A=new _.Eo;this.j=null;this.H=[];this.O=!0;this.I={};this.o=null;this.F=!0;this.G=this.C=!1;this.B=this.sc=null;this.Ld=!1;this.R=new Ss(this);this.on(_.vf,()=>{this.getState()===_.Bn&&(this.a?this.a.unload():Promise.resolve())});this.on(_.qc,this.M.bind(this));this.on(_.pc,this.M.bind(this));Jo(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."),
413
- 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 Go)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.h.error("Error while creating player plugin",e)}Lo(this,a);Kk(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(_.Qd,{detail:a}),this.trigger(a)}$b(a){a=this.I[a];
414
- void 0===a&&(a=null);return a}getSurface(){return this.g}getConfiguration(){return _.yg(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=Oo(this);return this.l.finally(()=>{this.h.debug("Player released");this.l=null})}destroy(){if(this.C)return this.h.debug("The player is already destroyed. No-op"),new Promise(a=>
415
- a());this.C=!0;return this.release().then(()=>{this.h.debug(wa);this.trigger(new _.C("destroying"));return _.Ko(this,_.Be)}).then(()=>{this.a&&this.a.removeDelegate(this);this.Nc.clear();this.R.release();if(this.a)return this.a.destroy()}).then(()=>this.A.destroy()).then(()=>{Nk();this.a=null;this.trigger(new _.C("destroyed"))})}load(a){const b=this;return _.w(function*(){try{_.nm(Se),b.O=!0,yield _.To(b,a),yield _.Uo(b),yield _.Wo(b),_.nm(Re),_.om("player.load",Se,Re)}catch(c){if(b.l)throw b.h.info("Load interrupted while a player release is pending"),
416
- new _.H(_.F,7,7E3);throw c;}})}preload(a){const b=this;return _.w(function*(){yield _.To(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.h.warn(tb)}else b.h.warn(qb)})}use(a){(a=Ok(a))&&a.o(this)}remove(a){return(this.getState()<=_.Cn||this.F)&&null!==Ik(a)?(Pk(a),this.G=!0):!1}play(){return this.a?this.j&&this.a.namespace()!==_.fd?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():
417
- 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 _.ps}getState(){return this.a?this.a.getState():_.Cn}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()===_.Bn?Promise.reject("Cannot seek in current state."):
418
- 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"}getPlaybackRate(){return this.a?
419
- 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.A}setNetworkEngine(a){this.A=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}Ye(){return Object.freeze(this.o)}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?
420
- this.a.getTimelineCues():[]}pd(){return this.a?this.a.pd():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.sc=a;Ro(this)}setCdnErrorCallback(a){this.B=a;this.a&&this.a.setCdnErrorCallback(this.B)}M(){this.Ld=!0}};_.x("clpp.Player",Q);Q.registerPlugin=_.Ho;Q.prototype.setCdnErrorCallback=Q.prototype.setCdnErrorCallback;Q.prototype.setDrmCustomDataModifier=Q.prototype.setDrmCustomDataModifier;Q.prototype.resetAbr=Q.prototype.resetAbr;Q.prototype.getTimelineCues=Q.prototype.getTimelineCues;
421
- Q.prototype.getLoadedSource=Q.prototype.getLoadedSource;Q.prototype.getSources=Q.prototype.Ye;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;Q.prototype.isMuted=Q.prototype.isMuted;Q.prototype.setPlaybackRate=Q.prototype.setPlaybackRate;Q.prototype.getPlaybackRate=Q.prototype.getPlaybackRate;
422
- 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;Q.prototype.getPresentationStartTime=Q.prototype.getPresentationStartTime;Q.prototype.seek=Q.prototype.seek;Q.prototype.getPosition=Q.prototype.getPosition;
423
- 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;Q.prototype.use=Q.prototype.use;Q.prototype.load=Q.prototype.load;Q.prototype.destroy=Q.prototype.destroy;Q.prototype.release=Q.prototype.release;
424
- Q.prototype.getDrmInfo=Q.prototype.getDrmInfo;Q.prototype.getConfiguration=Q.prototype.getConfiguration;Q.prototype.getSurface=Q.prototype.getSurface;Q.prototype.getPlugin=Q.prototype.$b;Q.prototype.off=Q.prototype.off;Q.prototype.one=Q.prototype.one;Q.prototype.on=Q.prototype.on;_.Cn=0;_.Dn=1;_.xn=2;_.Fn=3;_.En=4;_.un=5;_.Bn=6;_.Ls=7;_.An={IDLE:_.Cn,PREPARING:_.Dn,BUFFERING:_.xn,PLAYING:_.Fn,PAUSED:_.En,ENDED:_.un,ERROR:_.Bn,UNSET:_.Ls};Q.State=_.An;var Go=[];var Us=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,ed:!0,ready:Promise.resolve()}));this.h=new _.R("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.ed)}get(){const a=this;return _.w(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.release().catch(d=>{this.h.error("Failed to unload player",
425
- d)}).then(c)});return b.ready}destroy(){const a=this;return _.w(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};var Vs=class extends _.qs{constructor(a){super();this.o=_.xg({transition:_.Ie,preloadMedia:!1},a);this.g=[];this.a=0;const b=Zo(a.anchorId,this.o.config);this.w=new Us(b);this.f=null;this.j=!1;this.l=new Map;this.A=a.toggleVisible;this.h=new _.R(kd);this.w.a.forEach(c=>$o(this,c.player,!1))}Pc(){return this.f}ub(){return this.f?this.f.player:null}Ve(){return this.l.get(this.a+1)||null}We(){return this.l.get(this.a-1)||null}Qd(){return[this.We(),this.Ve()].filter(Boolean)}Sg(a){if(0<this.g.length)throw Error("Cannot re-set items in the playlist");
426
- this.h.info("Set items",a);this.g=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}Rg(a){if(0===this.g.length)throw Error(jb);if(0>a||a>this.g.length-1)throw Error("Index out of bounds");this.a=a}Ac(){return this.a<this.g.length-1}$e(){return 0<this.a}Hg(){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(jb);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})`),
427
- yield cp(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,gp(a)}}})}pf(){const a=this;return _.w(function*(){if(a.j)a.h.warn("Cannot play next item while busy");else if(a.Ac()){a.j=!0;a.a+=1;a.h.info(`Next (index: ${a.a})`);var b=a.f;a.o.transition===_.Ie&&b.player.pause();lp(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 hp(a,c),a.h.info(`Next playing (index: ${a.a})`)}catch(d){throw a.h.error(`Next failed (index: ${a.a})`),
428
- d;}finally{a.j=!1,b&&kp(a,b),gp(a)}}else a.h.warn("There are no more items in the playlist")})}Ig(){const a=this;return _.w(function*(){if(a.j)a.h.warn("Cannot play previous item while busy");else if(a.$e()){a.j=!0;--a.a;a.h.info(`Previous (index: ${a.a})`);var b=a.f;a.o.transition===_.Ie&&b.player.pause();lp(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 hp(a,c),a.h.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.h.error(`Previous failed (index: ${a.a})`),
429
- d;}finally{a.j=!1,b&&kp(a,b),gp(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([mp(a),a.f?kp(a,a.f):Promise.resolve()]);yield np(a)})}};_.x(kd,Vs);Vs.prototype.destroy=Vs.prototype.destroy;Vs.prototype.playPrev=Vs.prototype.Ig;Vs.prototype.playNext=Vs.prototype.pf;Vs.prototype.playFirst=Vs.prototype.Hg;Vs.prototype.hasPrev=Vs.prototype.$e;Vs.prototype.hasNext=Vs.prototype.Ac;
430
- Vs.prototype.setIndex=Vs.prototype.Rg;Vs.prototype.setItems=Vs.prototype.Sg;Vs.prototype.getPreloading=Vs.prototype.Qd;Vs.prototype.getPrev=Vs.prototype.We;Vs.prototype.getNext=Vs.prototype.Ve;Vs.prototype.getCurrentPlayer=Vs.prototype.ub;Vs.prototype.getCurrent=Vs.prototype.Pc;var jp="preload",ap=_.ne;var op=new Map;var Ys=class{constructor(a){this.w=a;this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0,remux:!1});this.f=null;this.o=[];this.l=[];this.g=[];this.j=!1;this.a.on("data",b=>{{this.g=b.captions;const c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);b.type===Ws?this.o.push(c):b.type===Xs&&this.l.push(c)}});this.a.on("done",()=>{{const b={video:_.pi(...this.o),captions:this.g,audio:_.pi(...this.l)};this.f.resolve(b);this.j=
431
- !1}})}destroy(){this.a&&this.a.dispose();this.a=null;return Promise.resolve()}isSupported(a,b){const c="mp2t"==a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]==_.Ec;if(!window.muxjs||!c&&!d)return!1;if(d)return _.pp(Ic);if(b)return _.pp(qp(b,a));b=qp(_.p,a);a=qp(_.u,a);return _.pp(b)||_.pp(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,b){const c=new Map;c.set(a,b);try{const d=b.split(";")[0],e=vj(b).split(","),f=new Map,g=Hh(_.p,e),h=Hh(_.u,e);
432
- g&&f.set(_.p,this.convertCodecs(_.p,_.uj(d,g)));h&&f.set(_.u,this.convertCodecs(_.u,_.uj(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]==_.Ec?Ic:"mp2t"==b.toLowerCase().split(";")[0].split("/")[1]?qp(a,b):b}getOriginalMimeType(){return this.w}transmux(a){this.j=!0;this.f=new _.Km;this.o=[];this.l=[];this.g=[];a=_.J(a);this.a.push(a);this.a.flush();this.j&&this.f.reject(new _.H(_.F,3,3018));return this.f}};pj(_.Ec,()=>new Ys(_.Ec));pj(_.Xf,()=>new Ys(_.Xf));
433
- var Xs=_.p,Ws=_.u;var Zs=class extends _.qs{constructor(a){super();this.o=_.xg({zg:2},a);this.j=[];const b=rp(a.anchorEl,this.o.zg+1,this.o.$f);this.l=new Us(b);this.a=null;this.g=!1;this.f=new Map;this.A=!1;this.w=a.toggleVisible;this.h=new _.R("clpp.interstitial.MultiController");this.l.a.forEach(c=>sp(this,c.player,!1))}getCurrentItem(){return this.a}ub(){return this.a?this.a.player:null}Qd(){return Array.from(this.f.values())}dd(a){this.h.info("Add items",a);this.j=this.j.concat(a.map(b=>Object.assign({},b,{state:"idle",
434
- disposers:[],preloadPromise:Promise.resolve(),Wc:Promise.resolve()})))}removeItems(a){this.h.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 _.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 wp(b,c):yield yp(b,c),
435
- c.gc&&c.gc(),b.trigger(new _.C(ce,{detail:c})),zp(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&&Bp(b,d),Dp(b),Fp(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})`),
436
- e?b.h.error("Loading preloaded items is not supported"):yield xp(b,c),b.trigger(new _.C(ce,{detail:c})),zp(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&&Bp(b,d),Dp(b),Fp(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([Dp(a),a.a?Bp(a,a.a):Promise.resolve()]);a.a=null;a.g=!1;a.removeItems();up(a,!0)})}destroy(){const a=
437
- this;return _.w(function*(){a.h.info("Destroy");yield a.release();yield Gp(a)})}};Zs.prototype.destroy=Zs.prototype.destroy;Zs.prototype.release=Zs.prototype.release;Zs.prototype.getItem=Zs.prototype.getItem;Zs.prototype.load=Zs.prototype.load;Zs.prototype.play=Zs.prototype.play;Zs.prototype.hasNext=Zs.prototype.Ac;Zs.prototype.removeItems=Zs.prototype.removeItems;Zs.prototype.addItems=Zs.prototype.dd;Zs.prototype.getPreloading=Zs.prototype.Qd;Zs.prototype.getCurrentPlayer=Zs.prototype.ub;
438
- Zs.prototype.getCurrentItem=Zs.prototype.getCurrentItem;var Ap="preload",vp=_.ne;var ct=class extends _.qs{constructor(a){super();this.f=_.xg({prerollMarginSec:.5,resolutionOffsetSec:35},a);this.h=new _.R(id);this.l=null;this.a=new Zs({$f:this.f.config,anchorEl:a.anchorEl,preloadMedia:!0});up(this.a,!0);this.a.on(ce,b=>{const c=b.detail;c.primary&&(this.l=c.player.getDuration());this.trigger(new _.C($s,b));Jp(this);c.primary&&Op(this,c.player)});this.g=[];this.a.on(bf,b=>{this.trigger(new _.C(at,{detail:{player:b.detail.player}}))});this.j=[]}load(a){const b=this;return _.w(function*(){yield Qp(b,
439
- a,!1);b.trigger(new _.C(bt));b.a.getCurrentItem().primary&&b.trigger(new _.C(lq))})}Oc(){const a=this.l;return a?this.j.map(b=>({cueId:b.cueId,startTime:b.startTime,endTime:b.endTime,primaryDuration:a})):[]}yg(a){const b=this;return _.w(function*(){yield Qp(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()})}ah(){const a=this;return _.w(function*(){yield tp(a.a);a.trigger(new _.C(bt));a.a.getCurrentItem().primary&&
440
- a.trigger(new _.C(lq))})}getPosition(){const a=this.a.ub();return a?a.getPosition():null}ub(){return this.a.ub()}getCurrentItem(){return this.a.getCurrentItem()}};_.x(id,ct);ct.prototype.getCurrentItem=ct.prototype.getCurrentItem;ct.prototype.getCurrentPlayer=ct.prototype.ub;ct.prototype.getPosition=ct.prototype.getPosition;ct.prototype.unpause=ct.prototype.ah;ct.prototype.destroy=ct.prototype.destroy;ct.prototype.unload=ct.prototype.unload;ct.prototype.loadPaused=ct.prototype.yg;
441
- ct.prototype.getCues=ct.prototype.Oc;ct.prototype.load=ct.prototype.load;var Xp="new",Yp="preparing",bq="ready",kq="completed",cq="failed",Zp="interstitial-preload-started",$p="x-asset-list-request-started",dq="x-asset-list-request-ended",gq="interstitial-scheduled",iq="interstitial-started",jq="interstitial-ended",hq="interstitial-item-started",at="primary-player-changed",$s="item-changed",bt="playback-started",lq="primary-started",Np="primary-ended",Vp="cues-changed";var U=class{sb(){}tb(){}zb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}dc(){}Ib(){}getMediaUrl(){}wb(){}vb(){}jb(){}Wa(){}getPodIndex(){}Jb(){}Kb(){}yb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.x("clpp.ads.IAd",U);U.prototype.getWrapperCreativeIds=U.prototype.getWrapperCreativeIds;U.prototype.getWrapperAdSystems=U.prototype.getWrapperAdSystems;U.prototype.getWrapperAdIds=U.prototype.getWrapperAdIds;
442
- U.prototype.getSequenceLength=U.prototype.yb;U.prototype.getPositionInSequence=U.prototype.Kb;U.prototype.getPodTimeOffset=U.prototype.Jb;U.prototype.getPodIndex=U.prototype.getPodIndex;U.prototype.getPodType=U.prototype.Wa;U.prototype.getMediaBitrate=U.prototype.jb;U.prototype.getMediaHeight=U.prototype.vb;U.prototype.getMediaWidth=U.prototype.wb;U.prototype.getMediaUrl=U.prototype.getMediaUrl;U.prototype.getClickThroughUrl=U.prototype.Ib;U.prototype.isBumper=U.prototype.dc;
443
- 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.zb;U.prototype.getAdManagerVersion=U.prototype.tb;
444
- U.prototype.getAdManagerName=U.prototype.sb;var dt=class{name(){}isSupported(){}create(){}};_.x("clpp.ads.IAdsManagerFactory",dt);dt.prototype.create=dt.prototype.create;dt.prototype.isSupported=dt.prototype.isSupported;dt.prototype.name=dt.prototype.name;var et=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.x("clpp.ads.IAdsManager",et);et.prototype.getPosition=et.prototype.getPosition;et.prototype.setVolume=et.prototype.setVolume;et.prototype.getVolume=et.prototype.getVolume;et.prototype.skip=et.prototype.skip;et.prototype.pause=et.prototype.pause;et.prototype.resume=et.prototype.resume;var ft=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.w(function*(){})}};ft.prototype.dispose=ft.prototype.dispose;ft.prototype.getPosition=ft.prototype.getPosition;ft.prototype.setVolume=ft.prototype.setVolume;ft.prototype.getVolume=ft.prototype.getVolume;ft.prototype.skip=ft.prototype.skip;ft.prototype.pause=ft.prototype.pause;ft.prototype.resume=ft.prototype.resume;
445
- ft.prototype.start=ft.prototype.start;ft.prototype.load=ft.prototype.load;var Yn=class{name(){return"clpp.ads.NopAdsManagerFactory"}isSupported(){return!0}create(){return new ft}};Yn.prototype.create=Yn.prototype.create;Yn.prototype.isSupported=Yn.prototype.isSupported;Yn.prototype.name=Yn.prototype.name;var gt=class{getCuePoints(){}Lb(){}kb(){}};_.x("clpp.ads.IAdsTimeline",gt);gt.prototype.hasPostroll=gt.prototype.kb;gt.prototype.hasPreroll=gt.prototype.Lb;gt.prototype.getCuePoints=gt.prototype.getCuePoints;_.ht=class{f(){}a(){}g(){}o(){}};var it=class{constructor(){this.j=null;this.h=new _.R("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}g(a){return this.j?this.j.setMediaKeys(a):Promise.reject(fb)}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 yb}};
446
- Wl(new class{a(){return yb}isSupported(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new it}},1E3);var kt=class{constructor(){this.size=0;this.a=void 0;this.h=new _.R("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,jt.value())}get(a){if(this.has(a))return this.a}has(a){const b=jt.value();return this.a&&Oh(a,b)?!0:!1}entries(){}keys(){}values(){}},jt=new _.Ks(()=>Uh(new Uint8Array([0])));var lt=class{l(){}g(a){_.Rg("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.Rg("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};Wl(new class{a(){return"NOP"}isSupported(){return!0}create(){return new lt}},-1);var nt=class{constructor(){this.j=this.w=null}l(a){this.w=a}g(a){const b=this.j;b&&b!==a&&nq(b,null);return(this.j=a)?nq(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.Rg("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new mt(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},mt=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.pd))for(var c of b){a:{a=c;if(a.persistentState===_.kf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
447
- persistentState:_.Fe,distinctiveIdentifier:_.Fe,initDataTypes:a.initDataTypes,sessionTypes:[Cf],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),
448
- e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Yf));a=e?b:null}if(a){this.a=a;return}}c=Error(Mb);c.name=ob;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new ot(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.Rg("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},ot=class{constructor(a){this.f=null;this.g=new WebKitMediaKeys(a);this.a=new _.Er;this.j=0;this.h=new _.R(hd);this.h.info("Created Media Keys for "+a)}createSession(a){a=
449
- void 0===a?Cf:a;this.h.debug("Creating Apple MediaKeys Session");if(a!==Cf)throw new TypeError("Session type "+a+ba);return new pt(this.g,`__session_${this.j++}`)}setServerCertificate(){this.h.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},pt=class extends _.qs{constructor(a,b){super();this.a=null;this.o=a;this.f=this.g=null;this.j=new _.Er;this.sessionId=b;this.expiration=NaN;this.closed=new _.Km;this.l=!1;this.keyStatuses=new kt;this.h=new _.R(hd)}generateRequest(a,
450
- b){if(this.l)return Promise.reject(Bb);this.h.debug("generateRequest");this.g=new _.Km;try{const c=this.o.createSession(_.Yf,_.J(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,ig,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(_.qe,{messageType:void 0===e||e===wf?ge:fe,message:Uh(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,gg,d=>{this.h.debug("onWebkitKeyAdded_",
451
- d);this.f&&(oq(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,hg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===wf)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),
452
- 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:oq(this,"output-not-allowed");break;default:oq(this,_.Zd)}});oq(this,wf)}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(Bb);this.h.debug(Kf);this.f=new _.Km;try{this.a.update(_.J(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
453
- this.h.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.Xg(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"))}};Wl(new class{a(){return"APPLE"}isSupported(){return!!window.WebKitMediaKeys}create(){return new nt}},1100);var rt=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}g(a){_.Rg("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(fb);const b=this.w;b&&b!==a&&rq(b,null);(this.w=a)&&rq(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.Rg("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.j)var c=this.j;else{var d=document.getElementsByTagName(_.u);c=d.length?d[0]:document.createElement(_.u)}const e=
454
- new qt(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},qt=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Ge&&(this.a=fg,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,
455
- this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.Yf,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.kf||a||(e=!1);if(e){this.f=g;return}}b=Mb;if(c===_.Ge||c===_.ud)b="None of the requested configurations were supported.";c=Error(b);c.name=ob;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new st(this.g,this.a))}getConfiguration(){return this.f}},st=class{constructor(a,b){this.g=a;this.o=b;this.a=null;this.f=new _.Er;this.j=[];this.l=new Map}createSession(a=
456
- Cf){if(a!==Cf&&a!==_.Ke)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 tt(this.g,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},tt=class extends _.qs{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 _.Km;this.keyStatuses=
457
- new kt}ready(){_.Rg("WebkitEmeManager.MediaKeySession.ready");qq(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.Rg("WebkitEmeManager.MediaKeySession.generateRequest");return tq(this,b,null)}load(a){_.Rg(Qb);return this.l===_.Ke?tq(this,null,a):Promise.reject(Error(mb))}update(a){_.Rg(Qb);const b=new _.Km;uq(this,b,a);return b}close(){_.Rg("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Ke){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
458
- this.closed;const a=sq(this,"cancelKeyRequest");try{this.j[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.Rg("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Ke?Promise.reject(Error(mb)):this.close()}};Wl(new class{a(){return"WEBKIT"}isSupported(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new rt}});var wt=class extends _.vs{constructor(a,b,c,d,e){super(Xa);this.l=a;this.j=b;this.g=c;this.a=d;this.o=e;this.h=new _.R(gd);_.fi(this.l)?this.h.warn(_.Rb):this.Ma(_.ud,{licenseUrl:this.l,videoRobustness:[_.Ab,void 0],audioRobustness:[_.zb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Yc.bind(this)}});_.fi(this.j)?this.h.warn(_.pb):this.Ma(_.sd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Yc.bind(this)}});
459
- _.fi(this.g)?this.h.warn(_.Ra):_.fi(this.a)?this.h.warn(_.Qa):this.Ma(_.pd,{licenseUrl:this.g,certificateUrl:this.a,modifiers:{licenseRequest:this.hf.bind(this),licenseResponse:this.jf.bind(this),certificateRequest:this.Yc.bind(this),extractContentId:this.Qe.bind(this)}})}Yc(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Qe(a,b){a=pl(b);switch(this.o){case ut:return a;case vt:return(new _.ql(a)).a;default:throw Error("Unknown content ID strategy");}}hf(a,b){b.headers[ra]=
460
- Ac;this.Yc(a,b);a={spc:_.ji(b.body)};b.body=_.bi(_.Si(a,!0))}jf(a,b){a=_.Wh(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=_.li(a).buffer}};_.x(gd,wt);wt.prototype.onFairPlayLicenseResponse=wt.prototype.jf;wt.prototype.onFairPlayLicenseRequest=wt.prototype.hf;wt.prototype.extractFairPlayContentId=wt.prototype.Qe;wt.prototype.onLicenseRequest=wt.prototype.Yc;wt.prototype.constructor=wt.prototype.constructor;wt.NAME=Xa;
461
- var vt="hostname",ut="full-skd";wt.FairPlayContentIdStrategy={HOSTNAME:vt,FULL_SKD:ut};_.x("clpp.drm.HeaderDrmComponent",class extends _.ht{g(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Xa){a=a.drm.customData;if(!a)throw new _.H(_.F,7,7100,_.vd);a=new wt(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||ut);_.Uk(a)}}a(){delete _.Tk.HeaderDrm}id(){return"headerdrm"}});_.po(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})});_.po(function(){_.Rg("mathRound.install")});_.po(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;Sd in document||(Object.defineProperty(document,Sd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
462
- {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",vq);document.addEventListener("webkitfullscreenerror",vq);document.addEventListener("mozfullscreenchange",vq);document.addEventListener("mozfullscreenerror",vq);document.addEventListener("MSFullscreenChange",vq);document.addEventListener("MSFullscreenError",vq)}});_.po(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.Rg("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=xq,document.exitPictureInPicture=yq,document.addEventListener("webkitpresentationmodechanged",wq,!0))}});_.po(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=zq)}});_.po(function(){if(window.VTTCue)_.Qg("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Qg(Nb),window.VTTCue=Aq;else if(6===a)_.Qg("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=Bq;else{try{var b=!!Aq(1,2,"")}catch(c){b=!1}b&&(_.Qg(Nb),window.VTTCue=Aq)}}else _.Sg("VTTCue not available.")});var Cq;_.po(function(){_.Rg("InputEvent.install");_.Cj("Trident/")&&HTMLInputElement.prototype.addEventListener!==Dq&&(_.Qg("Patching input event support on IE."),Cq=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Dq)});_.po(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.po(function(){_.Rg("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 Gq=class{constructor(){this.a=Eq()}};var xt=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.yt=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 zt;_.At=class{constructor(){this.a=new Blob([zt],{type:_.Yf})}canPlay(a){var b=document.createElement(_.u);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.Km;b=b.play();const d=(new _.zj(()=>{d.stop();c.resolve(a)})).ca(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===ob?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
463
- zt=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]};_.Ts=class{constructor(a){this.I=a;this.f={}}bb(a,b){this.f[a]=b}};_.z("clpp.drm.DrmEnvironment",_.Ts);_.Ts.prototype.setDrmSystem=_.Ts.prototype.bb;_.Jl=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.Tg(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Ja(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.pl();this.a=a}};_.qm=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Ja(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.sl();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.sl();this.a=a}};
392
+ _.z("clpp.utils.dataview.DataViewReader",_.qm);_.Hl=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.S("clpp.mp4")}L(a,b){a=zl(a);this.h[a]=Us;this.f[a]=b;return this}ba(a,b){a=zl(a);this.h[a]=Vs;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.J(a);a=new _.qm(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.rl(a)&&!this.a;)this.Td(0,a,b)}Td(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.g.debug("Parsing MP4 box",_.Al(f));switch(e){case 0:e=b.Ja()-d;break;case 1:e=_.wl(b),g=!0}const h=
393
+ this.f[f];if(h){let m=null;var k=null;this.h[f]===Vs&&(k=_.P(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Ja()&&(l=b.Ja());l-=b.getPosition();b=0<l?_.yl(b,l):new Uint8Array(0);b=new _.qm(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.Ja()-b.getPosition()),b.skip(a)}};_.z("clpp.utils.Mp4Parser",_.Hl);_.Hl.typeToString=_.Al;
394
+ _.Hl.allData=_.Cl;_.Hl.sampleDescription=_.Bl;_.Hl.children=_.Q;_.Hl.prototype.parseNext=_.Hl.prototype.Td;_.Hl.prototype.parse=_.Hl.prototype.parse;_.Hl.prototype.stop=_.Hl.prototype.stop;_.Hl.prototype.fullBox=_.Hl.prototype.ba;_.Hl.prototype.box=_.Hl.prototype.L;_.Hl.headerSize=_.Dl;var Us=0,Vs=1;var Ws=class{};_.z("clpp.utils.FairplayUtils",Ws);Ws.parseFairPlayResponse=_.Ml;Ws.formatFairPlayRequest=_.Ll;Ws.createFairplayPayload=Kl;Ws.extractContentId=_.Gl;Ws.extractExtXKeyUri=El;var Sl=new _.S("clpp.drm.DrmToday"),bm="PRODUCTION",cm="STAGING",dm="TEST",Xs={PRODUCTION:bm,STAGING:cm,TEST:dm};_.z("clpp.drm.DrmToday.Environment",Xs);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
395
+ var Ol="/license-proxy-widevine/cenc/",Pl="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Ql="/license-server-fairplay/",em={"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"},Ys=[Va,Ya,Xa,_.Eb,_.Db],Zs=[_.Eb,_.Db],$s=["3000","2000","150"],
397
+ at=["2000","150"];
398
+ for(const a of Object.keys(Xs)){let b=wa;a!==bm&&(b+=`_${a}`);const c=new _.Ts(b);let d=null;switch(a){case bm:d=ol("V1_PROD");break;case cm:d=ol("V2");break;case dm:d=null}c.bb(_.yd,{licenseUrl:Rl(_.yd,a),videoRobustness:Ys,audioRobustness:Zs,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Ul,licenseResponse:_.Vl}});c.bb(_.ud,{licenseUrl:Rl(_.ud,a),certificateUrl:Nl(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Xl,licenseResponse:_.Yl,
399
+ extractContentId:_.Zl,certificateRequest:_.$l}});c.bb(_.wd,{licenseUrl:Rl(_.wd,a),videoRobustness:$s,audioRobustness:at,modifiers:{licenseRequest:am}});_.kl(c)};var bt=class{};_.z("clpp.drm.eme.EmeFactory",bt);var gm=[];bt.Apis={STANDARD:Cb,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var om,ct,nm;_.wm=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];om=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];ct=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};nm=class extends ct{};_.vm=class extends ct{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 ym=!!(performance&&performance.mark&&performance.measure);var an=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.Hl).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=_.Ci(_.yl(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.Ci(_.yl(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});
400
+ a.reader.getPosition()!==a.reader.Ja()&&_.B("Mismatch between box size and data size!")}}};var Xm,dt;
401
+ _.co=class{constructor(a){this.B=a;this.H=new Set;this.A=this.G=this.l=null;this.R=!1;this.a=null;this.I=dt;this.w=new _.$r;this.K=new Ss;this.f=new Map;this.J=[];this.F=new _.Zm;this.h=null;this.W=b=>{this.o=!0;this.C=!1;this.F.reject(b);a.onError(b)};this.j=new Map;this.X=new Map;this.S=new _.Pj(()=>Qm(this));this.Aa=!1;this.Z=new _.Zm;this.D=!1;this.T=[];this.aa=!1;this.N=0;this.g=new _.S("clpp.drm.DrmEngine");this.Y=(new _.Pj(()=>{Rm(this)})).tb(1);this.F.catch(()=>{});this.o=this.C=!1;this.M=
402
+ null}destroy(){const a=this;return _.x(function*(){a.Aa?yield a.Z:(a.Aa=!0,yield Sm(a),a.Z.resolve())})}keySystem(){return this.a?_.Gm(this.a.keySystem):""}getDrmInfo(){return this.a}ga(a){const b=this;return _.x(function*(){if(!b.D||b.I!==Xm){var c=Math.floor(a.timeStamp),d=`drm.msg.${c}.start`,e=`drm.msg.${c}.end`;_.zm(d);!b.h.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.aa?yield fn(b,a):b.T.push(a);_.zm(e);_.Am(`drm.sess.msg.${c}`,d,e)}})}da(a){const b=a.target;this.g.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===_.Mf){var g=f;f=e;e=g}if(Fm(this.a.keySystem)&&16===f.byteLength&&_.Rj()){g=_.hi(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!==Kf&&(c.loaded=!0);c&&c.Sa&&c.Sa.resolve();"expired"===e&&(d=!0);f=_.J(f);let h=_.Ci(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.ud)&&16!==f.byteLength&&(h=ji(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):
404
+ 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.ib.forEach(e=>{this.j.get(e)===Kf&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.Le))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.j.get(e.keyId)===Kf&&_.Di(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,
405
+ _.Le))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.Db&&(this.g.debug("Session has expired",b.sessionId),(a=this.f.get(b))&&a.Dc&&a.Dc.stop(),this.f.delete(b),b.close().catch(()=>{}));pn(this)&&(this.F.resolve(),1!==this.f.size||d?this.S.ia(.5):Qm(this))}};Xm=0;dt=3;_.wn=new Map;_.xn=new _.S("clpp.text");var et=class{constructor(){this.a=null;this.f=[]}};var ft=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.gt=class{constructor(){this.f=this.o=this.A=this.D=this.j=this.l=this.h=this.w=NaN;this.a=new et;this.C=new ft}getStats(){return{width:this.w,height:this.h,streamBandwidth:this.o,decodedFrames:this.j,droppedFrames:this.l,corruptedFrames:this.D,estimatedBandwidth:this.f,loadLatency:this.A,playTime:Bn(this.a,_.Un),pauseTime:Bn(this.a,_.Tn),bufferingTime:Bn(this.a,_.Mn),stateHistory:Cn(this.a),switchHistory:Dn(this.C)}}};_.ht=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var Fn=new _.ht(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.le],[HTMLMediaElement.HAVE_CURRENT_DATA,_.ke],[HTMLMediaElement.HAVE_FUTURE_DATA,Uc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Vc]]));var jt=class{constructor(a){this.g=new _.S("clpp.StateManager");this.m=a;this.a=new _.$r;this.f=_.Rn;this.A=_.it;this.H=0;this.w=-1;this.K=this.o=this.I=this.C=0;this.j=this.h=this.F=!1;this.G=0;this.l=null;this.J=0;this.M=_.dk();this.D=!1;this.I=Date.now();Kn(this)}dc(a,b){this.m&&this.m.trigger(new _.D(a,{detail:b}))}getState(){return Nn(this,"")}W(a){(a=a&&a.detail)&&a.severity&&a.severity===_.E&&In(this,_.Qn)}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.z("clpp.utils.media.detectType",Vn);var Yn=new _.S("clpp.sources");var kt=class extends _.Rs{constructor(){super(nd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.$r;this.F=this.C=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new jt(this);In(this.j,_.Rn)}namespace(){return nd}unload(){const a=this;return _.x(function*(){if(a.ea){a.log.debug("Releasing player with source",a.ea);a.C&&(a.C.stop(),a.C=null);const b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.X&&(a.X.destroy(),a.X=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
406
+ a.o=null);_.lh(a.h);a.f&&(a.f=new _.gt);a.F=null;a.ea=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield $n(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&In(this.j,_.Rn)})}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.ec}load(a){const b=this;return _.x(function*(){if(b.w)return Zn();if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.D.getMedia();b.H=Date.now()/1E3;b.f=new _.gt;b.h.on(b,_.Jf,()=>{b.f&&_.An(b.f.a,b.getState())});In(b.j,_.Sn);b.ea=_.Xn(a);b.configuration=_.Sk(b.Va,
408
+ a);b.log.debug(_.eb,b.configuration);b.log.debug(_.wb,b.ea);const d=_.zn(b.configuration,[_.$d,"native"]);b.X=d.create(b);b.X.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Vk(_.Pf)&&!_.fk()&&(b.A=new ps(b),b.A.start(c));b.l?b.l.release():b.l=new as(b);vh(b.l,c);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.A(b.configuration.volume)||b.setVolume(b.configuration.volume);_.A(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(c,Uc,()=>{b.trigger(new _.D(_.Ms))});null==
409
+ b.configuration.startTime&&io(b,c);_.dk()&&jo(b,c);try{yield bo(b,c),yield eo(b),yield ho(b).O}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.E&&null!==this.j&&In(this.j,_.Qn),this.trigger(new _.D(_.q,{detail:a})))}$f(){return new U}getState(){return null!==this.j?this.j.getState().currentState:_.it}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 _.En();this.f&&_.An(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,
411
+ b=Number(c.totalVideoFrames),a.l=Number(c.droppedVideoFrames),a.j=b,this.f.D=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.oa())a.bandwidth&&(this.f.o=a.bandwidth),a.Tc&&(this.f.f=a.Tc);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}};
412
+ _.ih(new class{a(){return nd}canPlay(a,b){a=a.type||"";const c=a===_.yc,d=a===_.Dc,e=a===_.Kk;var f;_.ck()||c||d||e&&!_.dk()?f=0:f=""!==Qj().canPlayType(a)?e&&_.dk()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.na}create(){return new kt}});_.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 lo=new _.S("clpp.ads"),ko=[];_.z("clpp.utils.dom.createHTMLElement",_.so);var lt=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=to(this,a)}get(){return this.a}};var ot=class{constructor(a,b){this.g=new _.S("clpp.PlayerSurface");this.w=_.Lg(mt,b);this.f=new lt;this.h=null;this.a=new lt;this.l=nt;nt+=1;this.o=`clpp-video-${this.l}`;this.j=new _.$r;if(null==a)throw new _.H(_.E,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.H(_.E,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
413
+ HTMLMediaElement))throw new _.H(_.E,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(_.E,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Fd);a.parentNode?a.parentNode.replaceChild(c,
414
+ 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),_.qo(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Of);for(d of[_.yg,_.Yd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Tj()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),uo(this.a,"clpp-container"),
415
+ uo(this.a,this.o),uo(this.f,_.dd),uo(this.f,"clpp-video"));b.webOSStartupPatch&&vo(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?_.qo(a,ed):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(ed):
416
+ 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&&_.qo(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){_.qo(a,ed)}show(a){a.classList.remove(ed)}release(){this.j.release()}};
417
+ ot.prototype.removeElementFromContainer=ot.prototype.removeElementFromContainer;ot.prototype.addElementToContainer=ot.prototype.addElementToContainer;ot.prototype.getCastElement=ot.prototype.getCastElement;ot.prototype.getContainer=ot.prototype.getContainer;ot.prototype.getMedia=ot.prototype.getMedia;var mt={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},nt=1;var pt=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.$r;this.h=null;this.f=!0;zo(this)}release(){this.a.release();Ao(this);this.m=null}};_.z("clpp.polyfill.installAll",Do);var Co=[];_.z("clpp.polyfill.register",_.Eo);var Go=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.ki(_.Ai(a)));this.a=JSON.parse(_.ki(_.Ai(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=_.oi(d),n=_.Ai(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 qt={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Ok="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Xo=class{constructor(a){this.license=a;this.a=null;this.g=new _.S("clpp.utils.LicenseKey")}verify(){return(new Promise((a,b)=>{try{const c=Ho(this);a(c)}catch(c){b()}})).then(a=>a.verify(qt)).catch(a=>{if(a&&a!==Gb){{var b=window.location.href;const c=new _.Ih(b);b=c.pb||c.Wa?c:new _.Ih("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Wa))return Promise.resolve()}throw a;})}},So="vod",Ro="live";var R=class extends _.Os{constructor(a,b,c){super();Do();this.g=new _.S("clpp.Player");if(!a)throw new _.H(_.E,7,7102);this.X=new _.$r;this.f=this.A=b||_.Qk();this.l=null;void 0===this.f.license&&(this.f.license=Ok,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(_.E,7,7101,"No license provided in configuration!");this.h=new ot(a,c);this.a=this.D=null;
419
+ this.F=new _.To;this.j=null;this.S=[];this.T=!0;this.H={};this.Y=null;this.M=!0;this.N=this.K=!1;this.I=this.Ec=null;this.ce=!1;this.aa=new pt(this);this.on(_.Jf,()=>{this.getState()===_.Qn&&(this.a?this.a.unload():Promise.resolve())});this.on(_.vc,this.Z.bind(this));this.on(_.uc,this.Z.bind(this));Yo(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."),
420
+ 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 Vo)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}$o(this,a);this.J=_.na;$k(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 _.D(_.q,{detail:a}),this.trigger(a)}kc(a){a=
421
+ this.H[a];void 0===a&&(a=null);return a}getSurface(){return this.h}getConfiguration(){return _.Mg(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.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=cp(this);return this.l.finally(()=>{this.g.debug("Player released");this.l=null})}destroy(){if(this.K)return this.g.debug("The player is already destroyed. No-op"),
422
+ new Promise(a=>a());this.K=!0;return this.release().then(()=>{this.g.debug(ya);this.trigger(new _.D("destroying"));return _.Zo(this,_.Fe)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.Xc.clear();this.aa.release();if(this.a)return this.a.destroy()}).then(()=>this.F.destroy()).then(()=>{dl();this.a=null;this.trigger(new _.D("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.zm(Ye);b.J=_.na;b.T=!0;const c=_.Xn(a);yield _.kp(b,Tk(a)?a:{},c);yield _.lp(b);yield _.np(b);_.zm(Xe);
423
+ _.Am("player.load",Ye,Xe)}catch(c){if(b.l)throw b.g.info(db),new _.H(_.E,7,7E3);throw c;}})}preload(a){const b=this;return _.x(function*(){yield _.kp(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(yb)}else b.g.warn(ub)})}use(a){(a=el(a))&&a.o(this)}remove(a){return(this.getState()<=_.Rn||this.M)&&null!==Yk(a)?(fl(a),this.N=!0):!1}play(){return this.a?this.j&&this.a.namespace()!==_.jd?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 _.Ns}getState(){return this.a?this.a.getState():_.Rn}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
+ _.Qn?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}}mc(){const a=this.a;return a&&a.mc?a.mc():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}Bf(){return Object.freeze(this.Y)}getLoadedSource(){return this.a&&
427
+ this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}Ed(){return this.a?this.a.Ed():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.Ec=a;ip(this)}setCdnErrorCallback(a){this.I=a;this.a&&this.a.setCdnErrorCallback(this.I)}Z(){this.ce=!0}};_.z("clpp.Player",R);R.registerPlugin=_.Wo;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;
428
+ R.prototype.getTimelineCues=R.prototype.getTimelineCues;R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.Bf;R.prototype.getStats=R.prototype.getStats;R.prototype.isLive=R.prototype.isLive;R.prototype.getTextDisplayer=R.prototype.getTextDisplayer;R.prototype.setNetworkEngine=R.prototype.setNetworkEngine;R.prototype.getNetworkEngine=R.prototype.getNetworkEngine;R.prototype.isMuted=R.prototype.isMuted;R.prototype.setPlaybackRate=R.prototype.setPlaybackRate;
429
+ R.prototype.getPlaybackRate=R.prototype.getPlaybackRate;R.prototype.namespace=R.prototype.namespace;R.prototype.getAdsManager=R.prototype.getAdsManager;R.prototype.getDuration=R.prototype.getDuration;R.prototype.setVolume=R.prototype.setVolume;R.prototype.getVolume=R.prototype.getVolume;R.prototype.getTimelineOffset=R.prototype.mc;R.prototype.getSeekRange=R.prototype.getSeekRange;R.prototype.getPresentationStartTime=R.prototype.getPresentationStartTime;R.prototype.seek=R.prototype.seek;
430
+ R.prototype.getPosition=R.prototype.getPosition;R.prototype.isPaused=R.prototype.isPaused;R.prototype.isEnded=R.prototype.isEnded;R.prototype.getState=R.prototype.getState;R.prototype.getBufferInfo=R.prototype.getBufferInfo;R.prototype.getTrackManager=R.prototype.getTrackManager;R.prototype.pause=R.prototype.pause;R.prototype.play=R.prototype.play;R.prototype.remove=R.prototype.remove;R.prototype.use=R.prototype.use;R.prototype.load=R.prototype.load;R.prototype.destroy=R.prototype.destroy;
431
+ R.prototype.release=R.prototype.release;R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.kc;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;R.prototype.on=R.prototype.on;_.Rn=0;_.Sn=1;_.Mn=2;_.Un=3;_.Tn=4;_.Jn=5;_.Qn=6;_.it=7;_.Pn={IDLE:_.Rn,PREPARING:_.Sn,BUFFERING:_.Mn,PLAYING:_.Un,PAUSED:_.Tn,ENDED:_.Jn,ERROR:_.Qn,UNSET:_.it};R.State=_.Pn;
432
+ var Vo=[];var rt=class extends R{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.A=_.Lg(this.A,a);this.f=_.Lg(this.f,a);this.C=0;this.o=[];this.R=!1;this.w=null;this.G=[]}open(a,b){const c=this;return _.x(function*(){if(c.w)throw new _.H(_.E,7,7008,`Cannot call open() while ${c.w}() is ongoing!`);if(0!==a)throw new _.H(_.E,7,7007,"The index parameter only supports the value of 0.");
433
+ if(0===b.length)throw new _.H(_.E,7,7003,mb);if(b.some(g=>!g.id||!g.source))throw new _.H(_.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 _.H(_.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 _.H(_.E,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.t||0>e))throw new _.H(_.E,
434
+ 7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.t||0>f||null!=e&&f<=e))throw new _.H(_.E,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.H(_.E,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{qp(c),c.w="open",yield tp(c,b),c.C=0,c.o=b,c.R=!0,up(c,b[0].playlist||{})}finally{c.w=null}})}cg(a){const b=this;return _.x(function*(){if(b.w)throw new _.H(_.E,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
435
+ if(!b.R)throw new _.H(_.E,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.H(_.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 _.H(_.E,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield vp(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.C]||null}getCurrentItemIndex(){return this.C}Eg(){return[...this.o]}lc(){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.C=0;this.R=!1;return super.release()}destroy(){qp(this);return super.destroy()}setCdnErrorCallback(){throw new _.H(1,7,7009,"CDN switching is not supported!");}};_.z("clpp.plist.ScPlaylist",rt);rt.prototype.setCdnErrorCallback=rt.prototype.setCdnErrorCallback;rt.prototype.destroy=rt.prototype.destroy;rt.prototype.release=rt.prototype.release;rt.prototype.seekWith=rt.prototype.seekWith;
437
+ rt.prototype.getTimeline=rt.prototype.getTimeline;rt.prototype.getSize=rt.prototype.lc;rt.prototype.getPlaylist=rt.prototype.Eg;rt.prototype.getCurrentItemIndex=rt.prototype.getCurrentItemIndex;rt.prototype.getCurrentItem=rt.prototype.getCurrentItem;rt.prototype.addItem=rt.prototype.cg;rt.prototype.open=rt.prototype.open;var st=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,xd:!0,ready:Promise.resolve()}));this.g=new _.S("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.xd)}get(){const a=this;return _.x(function*(){const b=a.a.find(c=>c.xd);if(!b)throw Error("No available players in the pool");b.xd=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.xd=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
438
+ d)}).then(c)});return b.ready}destroy(){const a=this;return _.x(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};var tt=class extends _.Os{constructor(a){super();this.o=_.Lg({transition:_.Me,preloadMedia:!1},a);this.h=[];this.a=0;const b=wp(a.anchorId,this.o.config);this.w=new st(b);this.f=null;this.j=!1;this.l=new Map;this.A=a.toggleVisible;this.g=new _.S(od);this.w.a.forEach(c=>xp(this,c.player,!1))}$c(){return this.f}Ib(){return this.f?this.f.player:null}yf(){return this.l.get(this.a+1)||null}zf(){return this.l.get(this.a-1)||null}he(){return[this.zf(),this.yf()].filter(Boolean)}kh(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
439
+ this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}jh(a){if(0===this.h.length)throw Error(lb);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}Jc(){return this.a<this.h.length-1}Cf(){return 0<this.a}$g(){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(lb);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})`),
440
+ yield Ap(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,Ep(a)}}})}Nf(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.Jc()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.o.transition===_.Me&&b.player.pause();Jp(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 Fp(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
441
+ d;}finally{a.j=!1,b&&Ip(a,b),Ep(a)}}else a.g.warn("There are no more items in the playlist")})}ah(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.Cf()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.o.transition===_.Me&&b.player.pause();Jp(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 Fp(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
442
+ d;}finally{a.j=!1,b&&Ip(a,b),Ep(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([Kp(a),a.f?Ip(a,a.f):Promise.resolve()]);yield Lp(a)})}};_.z(od,tt);tt.prototype.destroy=tt.prototype.destroy;tt.prototype.playPrev=tt.prototype.ah;tt.prototype.playNext=tt.prototype.Nf;tt.prototype.playFirst=tt.prototype.$g;tt.prototype.hasPrev=tt.prototype.Cf;tt.prototype.hasNext=tt.prototype.Jc;
443
+ tt.prototype.setIndex=tt.prototype.jh;tt.prototype.setItems=tt.prototype.kh;tt.prototype.getPreloading=tt.prototype.he;tt.prototype.getPrev=tt.prototype.zf;tt.prototype.getNext=tt.prototype.yf;tt.prototype.getCurrentPlayer=tt.prototype.Ib;tt.prototype.getCurrent=tt.prototype.$c;var Hp="preload",yp=_.ne;var Mp=new Map;var wt=class{constructor(a){this.h=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]===_.Fc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Np(Jc);if(b)return _.Np(Op(b,a));b=Op(_.p,a);a=Op(_.w,a);return _.Np(b)||_.Np(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=_.Kj(b),e=_.Lj(b).split(","),f=new Map,g=Wh(_.p,e),h=Wh(_.w,e);g&&f.set(_.p,this.convertCodecs(_.p,_.Jj(d,g)));h&&f.set(_.w,this.convertCodecs(_.w,_.Jj(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Fc?Jc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Op(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.J(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===ut?b.push(k):h.type===vt&&c.push(k)},g=()=>{e={video:_.Ei(...b),captions:d,audio:_.Ei(...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 _.H(_.E,3,3018);return e}};Ej(_.Fc,()=>new wt(_.Fc));Ej(_.fg,()=>new wt(_.fg));var vt=_.p,ut=_.w;var xt=class extends _.Os{constructor(a){super();this.o=_.Lg({Ug:2},a);this.j=[];const b=Pp(a.anchorEl,this.o.Ug+1,this.o.pg);this.l=new st(b);this.a=null;this.h=!1;this.f=new Map;this.A=!1;this.w=a.toggleVisible;this.g=new _.S("clpp.interstitial.MultiController");this.l.a.forEach(c=>Qp(this,c.player,!1))}getCurrentItem(){return this.a}Ib(){return this.a?this.a.player:null}he(){return Array.from(this.f.values())}wd(a){this.g.info("Add items",a);this.j=this.j.concat(a.map(b=>Object.assign({},b,{state:"idle",
446
+ disposers:[],preloadPromise:Promise.resolve(),nd:Promise.resolve()})))}removeItems(a){this.g.info("Remove items",a);a?this.j=this.j.filter(b=>!a.includes(b.id)):this.j=[]}Jc(){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 Up(b,c):yield Wp(b,c),
447
+ c.sc&&c.sc(),b.trigger(new _.D(ce,{detail:c})),Xp(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&&Zp(b,d),aq(b),cq(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})`),
448
+ e?b.g.error("Loading preloaded items is not supported"):yield Vp(b,c),b.trigger(new _.D(ce,{detail:c})),Xp(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&&Zp(b,d),aq(b),cq(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([aq(a),a.a?Zp(a,a.a):Promise.resolve()]);a.a=null;a.h=!1;a.removeItems();Sp(a,!0)})}destroy(){const a=
449
+ this;return _.x(function*(){a.g.info("Destroy");yield a.release();yield dq(a)})}};xt.prototype.destroy=xt.prototype.destroy;xt.prototype.release=xt.prototype.release;xt.prototype.getItem=xt.prototype.getItem;xt.prototype.load=xt.prototype.load;xt.prototype.play=xt.prototype.play;xt.prototype.hasNext=xt.prototype.Jc;xt.prototype.removeItems=xt.prototype.removeItems;xt.prototype.addItems=xt.prototype.wd;xt.prototype.getPreloading=xt.prototype.he;xt.prototype.getCurrentPlayer=xt.prototype.Ib;
450
+ xt.prototype.getCurrentItem=xt.prototype.getCurrentItem;var Yp="preload",Tp=_.ne;var Bt=class extends _.Os{constructor(a){super();this.f=_.Lg({prerollMarginSec:.5,resolutionOffsetSec:35},a);this.g=new _.S(md);this.l=null;this.a=new xt({pg:this.f.config,anchorEl:a.anchorEl,preloadMedia:!0});Sp(this.a,!0);this.a.on(ce,b=>{const c=b.detail;c.primary&&(this.l=c.player.getDuration());this.trigger(new _.D(yt,b));gq(this);c.primary&&lq(this,c.player)});this.h=[];this.a.on(lf,b=>{this.trigger(new _.D(zt,{detail:{player:b.detail.player}}))});this.j=[]}load(a){const b=this;return _.x(function*(){yield nq(b,
451
+ a,!1);b.trigger(new _.D(At));b.a.getCurrentItem().primary&&b.trigger(new _.D(Jq))})}Zc(){const a=this.l;return a?this.j.map(b=>({cueId:b.cueId,startTime:b.startTime,endTime:b.endTime,primaryDuration:a})):[]}Tg(a){const b=this;return _.x(function*(){yield nq(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()})}vh(){const a=this;return _.x(function*(){yield Rp(a.a);a.trigger(new _.D(At));a.a.getCurrentItem().primary&&
452
+ a.trigger(new _.D(Jq))})}getPosition(){const a=this.a.Ib();return a?a.getPosition():null}Ib(){return this.a.Ib()}getCurrentItem(){return this.a.getCurrentItem()}};_.z(md,Bt);Bt.prototype.getCurrentItem=Bt.prototype.getCurrentItem;Bt.prototype.getCurrentPlayer=Bt.prototype.Ib;Bt.prototype.getPosition=Bt.prototype.getPosition;Bt.prototype.unpause=Bt.prototype.vh;Bt.prototype.destroy=Bt.prototype.destroy;Bt.prototype.unload=Bt.prototype.unload;Bt.prototype.loadPaused=Bt.prototype.Tg;
453
+ Bt.prototype.getCues=Bt.prototype.Zc;Bt.prototype.load=Bt.prototype.load;var uq="new",vq="preparing",zq="ready",Iq="completed",Aq="failed",wq="interstitial-preload-started",xq="x-asset-list-request-started",Bq="x-asset-list-request-ended",Eq="interstitial-scheduled",Gq="interstitial-started",Hq="interstitial-ended",Fq="interstitial-item-started",zt="primary-player-changed",yt="item-changed",At="playback-started",Jq="primary-started",kq="primary-ended",sq="cues-changed";var V=class{Gb(){}Hb(){}Mb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}pc(){}Xb(){}getMediaUrl(){}Kb(){}Jb(){}yb(){}lb(){}getPodIndex(){}Yb(){}Zb(){}Lb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.z("clpp.ads.IAd",V);V.prototype.getWrapperCreativeIds=V.prototype.getWrapperCreativeIds;V.prototype.getWrapperAdSystems=V.prototype.getWrapperAdSystems;V.prototype.getWrapperAdIds=V.prototype.getWrapperAdIds;
454
+ V.prototype.getSequenceLength=V.prototype.Lb;V.prototype.getPositionInSequence=V.prototype.Zb;V.prototype.getPodTimeOffset=V.prototype.Yb;V.prototype.getPodIndex=V.prototype.getPodIndex;V.prototype.getPodType=V.prototype.lb;V.prototype.getMediaBitrate=V.prototype.yb;V.prototype.getMediaHeight=V.prototype.Jb;V.prototype.getMediaWidth=V.prototype.Kb;V.prototype.getMediaUrl=V.prototype.getMediaUrl;V.prototype.getClickThroughUrl=V.prototype.Xb;V.prototype.isBumper=V.prototype.pc;
455
+ V.prototype.getSkipTimeOffset=V.prototype.getSkipTimeOffset;V.prototype.getDuration=V.prototype.getDuration;V.prototype.getTitle=V.prototype.getTitle;V.prototype.getAdvertiserName=V.prototype.getAdvertiserName;V.prototype.getAdSystem=V.prototype.getAdSystem;V.prototype.getApiFramework=V.prototype.getApiFramework;V.prototype.getCreativeId=V.prototype.getCreativeId;V.prototype.getId=V.prototype.getId;V.prototype.getTechnology=V.prototype.Mb;V.prototype.getAdManagerVersion=V.prototype.Hb;
456
+ V.prototype.getAdManagerName=V.prototype.Gb;var Ct=class{name(){}isSupported(){}create(){}};_.z("clpp.ads.IAdsManagerFactory",Ct);Ct.prototype.create=Ct.prototype.create;Ct.prototype.isSupported=Ct.prototype.isSupported;Ct.prototype.name=Ct.prototype.name;var Dt=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.z("clpp.ads.IAdsManager",Dt);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;var Et=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.x(function*(){})}};Et.prototype.dispose=Et.prototype.dispose;Et.prototype.getPosition=Et.prototype.getPosition;Et.prototype.setVolume=Et.prototype.setVolume;Et.prototype.getVolume=Et.prototype.getVolume;Et.prototype.skip=Et.prototype.skip;Et.prototype.pause=Et.prototype.pause;Et.prototype.resume=Et.prototype.resume;
457
+ Et.prototype.start=Et.prototype.start;Et.prototype.load=Et.prototype.load;var no=class{name(){return"clpp.ads.NopAdsManagerFactory"}isSupported(){return!0}create(){return new Et}};no.prototype.create=no.prototype.create;no.prototype.isSupported=no.prototype.isSupported;no.prototype.name=no.prototype.name;var Ft=class{getCuePoints(){}$b(){}Ab(){}};_.z("clpp.ads.IAdsTimeline",Ft);Ft.prototype.hasPostroll=Ft.prototype.Ab;Ft.prototype.hasPreroll=Ft.prototype.$b;Ft.prototype.getCuePoints=Ft.prototype.getCuePoints;_.Gt=class{f(){}a(){}h(){}o(){}};var Ht=class{constructor(){this.j=null;this.g=new _.S("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}h(a){return this.j?this.j.setMediaKeys(a):Promise.reject(hb)}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 Cb}};
458
+ hm(new class{a(){return Cb}isSupported(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Ht}},1E3);var Jt=class{constructor(){this.size=0;this.a=void 0;this.g=new _.S("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,It.value())}get(a){if(this.has(a))return this.a}has(a){const b=It.value();return this.a&&ci(a,b)?!0:!1}entries(){}keys(){}values(){}},It=new _.ht(()=>ii(new Uint8Array([0])));var Kt=class{l(){}h(a){_.eh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.eh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};hm(new class{a(){return"NOP"}isSupported(){return!0}create(){return new Kt}},-1);var Mt=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&Lq(b,null);return(this.j=a)?Lq(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.eh("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Lt(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Lt=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:_.Je,distinctiveIdentifier:_.Je,initDataTypes:a.initDataTypes,sessionTypes:[Qf],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,_.gg));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 Nt(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.eh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Nt=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.$r;this.j=0;this.g=new _.S(ld);this.g.info("Created Media Keys for "+a)}createSession(a){a=
461
+ void 0===a?Qf:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==Qf)throw new TypeError("Session type "+a+ba);return new Ot(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Ot=class extends _.Os{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.$r;this.sessionId=b;this.expiration=NaN;this.closed=new _.Zm;this.l=!1;this.keyStatuses=new Jt;this.g=new _.S(ld)}generateRequest(a,
462
+ b){if(this.l)return Promise.reject(Fb);this.g.debug("generateRequest");this.h=new _.Zm;try{const c=this.o.createSession(_.gg,_.J(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,wg,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 _.D(_.ue,{messageType:void 0===e||e===Kf?ge:fe,message:ii(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,ug,d=>{this.g.debug("onWebkitKeyAdded_",
463
+ d);this.f&&(Mq(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,vg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Kf)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),
464
+ 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:Mq(this,"output-not-allowed");break;default:Mq(this,_.be)}});Mq(this,Kf)}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(Fb);this.g.debug(Yf);this.f=new _.Zm;try{this.a.update(_.J(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
465
+ this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.lh(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"))}};hm(new class{a(){return"APPLE"}isSupported(){return!!window.WebKitMediaKeys}create(){return new Mt}},1100);var Qt=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.eh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(hb);const b=this.w;b&&b!==a&&Pq(b,null);(this.w=a)&&Pq(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.eh("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=
466
+ new Pt(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Pt=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.Ke&&(this.a=pg,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(_.gg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.tf||a||(e=!1);if(e){this.f=g;return}}b=Pb;if(c===_.Ke||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 Rt(this.h,this.a))}getConfiguration(){return this.f}},Rt=class{constructor(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.$r;this.j=[];this.l=new Map}createSession(a=
468
+ Qf){if(a!==Qf&&a!==_.Oe)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=$a,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new St(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},St=class extends _.Os{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 _.Zm;this.keyStatuses=
469
+ new Jt}ready(){_.eh("WebkitEmeManager.MediaKeySession.ready");Oq(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.eh("WebkitEmeManager.MediaKeySession.generateRequest");return Rq(this,b,null)}load(a){_.eh(Ub);return this.l===_.Oe?Rq(this,null,a):Promise.reject(Error(ob))}update(a){_.eh(Ub);const b=new _.Zm;Sq(this,b,a);return b}close(){_.eh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Oe){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
470
+ this.closed;const a=Qq(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.eh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Oe?Promise.reject(Error(ob)):this.close()}};hm(new class{a(){return"WEBKIT"}isSupported(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Qt}});var Vt=class extends _.Ts{constructor(a,b,c,d,e){super(Za);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.S(kd);_.ui(this.l)?this.g.warn(_.Vb):this.bb(_.yd,{licenseUrl:this.l,videoRobustness:[_.Eb,void 0],audioRobustness:[_.Db,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.od.bind(this)}});_.ui(this.j)?this.g.warn(_.tb):this.bb(_.wd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.od.bind(this)}});
471
+ _.ui(this.h)?this.g.warn(_.Ta):_.ui(this.a)?this.g.warn(_.Sa):this.bb(_.ud,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.Jf.bind(this),licenseResponse:this.Kf.bind(this),certificateRequest:this.od.bind(this),extractContentId:this.sf.bind(this)}})}od(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}sf(a,b){a=El(b);switch(this.o){case Tt:return a;case Ut:return(new _.Fl(a)).a;default:throw Error("Unknown content ID strategy");}}Jf(a,b){b.headers[ta]=
472
+ Ec;this.od(a,b);a={spc:_.yi(b.body)};b.body=_.qi(_.gj(a,!0))}Kf(a,b){a=_.ki(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=_.Ai(a).buffer}};_.z(kd,Vt);Vt.prototype.onFairPlayLicenseResponse=Vt.prototype.Kf;Vt.prototype.onFairPlayLicenseRequest=Vt.prototype.Jf;Vt.prototype.extractFairPlayContentId=Vt.prototype.sf;Vt.prototype.onLicenseRequest=Vt.prototype.od;Vt.prototype.constructor=Vt.prototype.constructor;Vt.NAME=Za;
473
+ var Ut="hostname",Tt="full-skd";Vt.FairPlayContentIdStrategy={HOSTNAME:Ut,FULL_SKD:Tt};_.z("clpp.drm.HeaderDrmComponent",class extends _.Gt{h(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Za){a=a.drm.customData;if(!a)throw new _.H(_.E,7,7100,_.zd);a=new Vt(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Tt);_.kl(a)}}a(){delete _.jl.HeaderDrm}id(){return"headerdrm"}});_.Eo(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})});_.Eo(function(){_.eh("mathRound.install")});_.Eo(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;Wd in document||(Object.defineProperty(document,Wd,{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",Tq);document.addEventListener("webkitfullscreenerror",Tq);document.addEventListener("mozfullscreenchange",Tq);document.addEventListener("mozfullscreenerror",Tq);document.addEventListener("MSFullscreenChange",Tq);document.addEventListener("MSFullscreenError",Tq)}});_.Eo(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.eh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Vq,document.exitPictureInPicture=Wq,document.addEventListener("webkitpresentationmodechanged",Uq,!0))}});_.Eo(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Xq)}});_.Eo(function(){if(window.VTTCue)_.dh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.dh(Qb),window.VTTCue=Yq;else if(6===a)_.dh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=Zq;else{try{var b=!!Yq(1,2,"")}catch(c){b=!1}b&&(_.dh(Qb),window.VTTCue=Yq)}}else _.fh("VTTCue not available.")});var $q;_.Eo(function(){_.eh("InputEvent.install");_.Sj("Trident/")&&HTMLInputElement.prototype.addEventListener!==ar&&(_.dh("Patching input event support on IE."),$q=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=ar)});_.Eo(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.Eo(function(){_.eh("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 dr=class{constructor(){this.a=br()}};var Wt=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};_.Xt=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 Yt;_.Zt=class{constructor(){this.a=new Blob([Yt],{type:_.gg})}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 _.Zm;b=b.play();const d=(new _.Pj(()=>{d.stop();c.resolve(a)})).ia(.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
+ Yt=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,
464
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,
465
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,
466
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,
467
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,
468
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,
469
- 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]);_.Bt=new _.R("clpp.media.TimestampParser");_.Lq={};_.Nq={};var nr=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new Gq}};var Rq=window.XMLHttpRequest;var mr=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new xt(a);this.length=a;this.A=b;this.f=this.a=this.g=0;this.l=null;this.o=-1;this.w=new Gq}};var is=class extends _.Rn{constructor(a){super(new _.Km,()=>Promise.resolve());this.B=a;this.g=null;this.w=this.P;this.f=-1;this.j=this.l=this.o=null;cr(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(()=>{})}};_.Dt=class{constructor(a){this.a=!1;this.g=a;this.j=gr(this);this.g.Hc(this.j);this.f=null}enabled(){return this.a}Ue(){return this.a&&this.f&&this.f.has(Ct)?1E3*this.f.get(Ct):null}release(){this.f=null;this.a=!1;this.g.yd(this.j)}};_.Dt.prototype.getEstimatedThroughput=_.Dt.prototype.Ue;var Ct="etp",er={ih:Ct},fr=new _.R("clpp.net.CmsdManager");var lr=window.fetch,ir=window.AbortController,hr=window.Headers;_.qr={};_.Ft=class{constructor(a){a=a.getConfiguration();a=_.yg(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.yf?a.backgroundColor:null;this.U=typeof a.windowColor===_.yf?a.windowColor:null;this.O=typeof a.fontColor===_.yf?a.fontColor:null;this.R=typeof a.fontFamily===_.yf?a.fontFamily:null;this.I=typeof a.fontSize===_.yf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.yf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
470
- _.yf&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.g()}getWindowColor(){return this.U}setWindowColor(a){this.U=a;this.g()}getFontFamily(){return this.R}setFontFamily(a){this.R=a;this.g()}getFontColor(){return this.O}setFontColor(a){this.O=a;this.g()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.g()}getFontSizePercent(){return null===this.C?Et:this.C}setFontSizePercent(a){this.C=a;this.g()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
471
- a;this.g()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.g()}};_.Ft.prototype.setEdgeType=_.Ft.prototype.setEdgeType;_.Ft.prototype.getEdgeType=_.Ft.prototype.getEdgeType;_.Ft.prototype.setEdgeColor=_.Ft.prototype.setEdgeColor;_.Ft.prototype.getEdgeColor=_.Ft.prototype.getEdgeColor;_.Ft.prototype.setFontSizePercent=_.Ft.prototype.setFontSizePercent;_.Ft.prototype.getFontSizePercent=_.Ft.prototype.getFontSizePercent;_.Ft.prototype.setFontSize=_.Ft.prototype.setFontSize;
472
- _.Ft.prototype.getFontSize=_.Ft.prototype.getFontSize;_.Ft.prototype.setFontColor=_.Ft.prototype.setFontColor;_.Ft.prototype.getFontColor=_.Ft.prototype.getFontColor;_.Ft.prototype.setFontFamily=_.Ft.prototype.setFontFamily;_.Ft.prototype.getFontFamily=_.Ft.prototype.getFontFamily;_.Ft.prototype.setWindowColor=_.Ft.prototype.setWindowColor;_.Ft.prototype.getWindowColor=_.Ft.prototype.getWindowColor;_.Ft.prototype.setBackgroundColor=_.Ft.prototype.setBackgroundColor;
473
- _.Ft.prototype.getBackgroundColor=_.Ft.prototype.getBackgroundColor;var Et=1/15;var ur="raised",vr="depressed",xr="dropshadow",wr="uniform";_.x("clpp.text.EdgeType",{NONE:_.xe,RAISED:ur,DEPRESSED:vr,DROP_SHADOW:xr,UNIFORM:wr});_.rr(uc,class{constructor(a){this.f=a;this.a=null;this.h=new _.R("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.sr(_.vc);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=_.sr(_.wc);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=
474
- b;else throw new _.H(_.F,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.H(_.F,2,2011);return this.a.parseMedia(a,b)}});var Gt;
475
- _.Ht=class extends _.Ft{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${Gt++}`;this.j=document.createElement(_.Af);this.l=this.A=!1;_.ao(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":_.yr(this)},b=
476
- 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()}};Gt=0;_.jn("native",new class{isSupported(){return!0}create(a){return new _.Ht(a)}});_.It=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]);_.$t=class{constructor(a,b,c,d){this.id=a;this.f=b;this.a=c;this.h=d}getDuration(){return this.a}getId(){return this.id}zb(){return this.f}gd(){return this.h}Fc(a){return this.getId()===a.getId()&&this.zb()===a.zb()&&this.getDuration()===a.getDuration()&&this.gd()===a.gd()}};_.z("clpp.media.TimelineWindow",_.$t);_.$t.prototype.isDynamic=_.$t.prototype.gd;_.$t.prototype.getStart=_.$t.prototype.zb;_.$t.prototype.getId=_.$t.prototype.getId;_.$t.prototype.getDuration=_.$t.prototype.getDuration;_.au=new _.S("clpp.media.TimestampParser");_.bu=class{constructor(){this.a=[];this.f=-1;this.h=null}Hg(a){return this.a[a]||null}Ig(){return this.a.length}Jg(){return this.a}wf(){return this.a[this.f]||null}Cg(){return this.f}};_.z("clpp.media.Timeline",_.bu);_.bu.prototype.getCurrentWindowIndex=_.bu.prototype.Cg;_.bu.prototype.getCurrentWindow=_.bu.prototype.wf;_.bu.prototype.getWindows=_.bu.prototype.Jg;_.bu.prototype.getWindowCount=_.bu.prototype.Ig;_.bu.prototype.getWindow=_.bu.prototype.Hg;_.ir={};_.kr={};var Jr=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new dr}};var or=window.XMLHttpRequest;var Ir=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new Wt(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new dr}};var Gs=class extends _.go{constructor(a){super(new _.Zm,()=>Promise.resolve());this.C=a;this.h=null;this.w=this.O;this.f=-1;this.j=this.l=this.o=null;yr(this)}then(a,b){this.O=this.O.then(a,b);return this}catch(a){this.O=this.O.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(()=>{})}};_.du=class{constructor(a){this.a=!1;this.h=a;this.j=Cr(this);this.h.Sc(this.j);this.f=null}enabled(){return this.a}xf(){return this.a&&this.f&&this.f.has(cu)?1E3*this.f.get(cu):null}release(){this.f=null;this.a=!1;this.h.Ud(this.j)}};_.du.prototype.getEstimatedThroughput=_.du.prototype.xf;var cu="etp",Ar={Ah:cu},Br=new _.S("clpp.net.CmsdManager");var Hr=window.fetch,Er=window.AbortController,Dr=window.Headers;_.Mr={};_.fu=class{constructor(a){a=a.getConfiguration();a=_.Mg(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Mf?a.backgroundColor:null;this.S=typeof a.windowColor===_.Mf?a.windowColor:null;this.N=typeof a.fontColor===_.Mf?a.fontColor:null;this.R=typeof a.fontFamily===_.Mf?a.fontFamily:null;this.I=typeof a.fontSize===_.Mf?a.fontSize:null;this.D=typeof a.fontSizePercent===_.t?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Mf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
482
+ _.Mf&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.h()}getWindowColor(){return this.S}setWindowColor(a){this.S=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.D?eu:this.D}setFontSizePercent(a){this.D=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
483
+ a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.fu.prototype.setEdgeType=_.fu.prototype.setEdgeType;_.fu.prototype.getEdgeType=_.fu.prototype.getEdgeType;_.fu.prototype.setEdgeColor=_.fu.prototype.setEdgeColor;_.fu.prototype.getEdgeColor=_.fu.prototype.getEdgeColor;_.fu.prototype.setFontSizePercent=_.fu.prototype.setFontSizePercent;_.fu.prototype.getFontSizePercent=_.fu.prototype.getFontSizePercent;_.fu.prototype.setFontSize=_.fu.prototype.setFontSize;
484
+ _.fu.prototype.getFontSize=_.fu.prototype.getFontSize;_.fu.prototype.setFontColor=_.fu.prototype.setFontColor;_.fu.prototype.getFontColor=_.fu.prototype.getFontColor;_.fu.prototype.setFontFamily=_.fu.prototype.setFontFamily;_.fu.prototype.getFontFamily=_.fu.prototype.getFontFamily;_.fu.prototype.setWindowColor=_.fu.prototype.setWindowColor;_.fu.prototype.getWindowColor=_.fu.prototype.getWindowColor;_.fu.prototype.setBackgroundColor=_.fu.prototype.setBackgroundColor;
485
+ _.fu.prototype.getBackgroundColor=_.fu.prototype.getBackgroundColor;var eu=1/15;var Qr="raised",Rr="depressed",Tr="dropshadow",Sr="uniform";_.z("clpp.text.EdgeType",{NONE:_.Be,RAISED:Qr,DEPRESSED:Rr,DROP_SHADOW:Tr,UNIFORM:Sr});_.Nr(zc,class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Or(_.Ac);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=_.Or(_.Bc);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=null}if(b)this.a=
486
+ b;else throw new _.H(_.E,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.H(_.E,2,2011);return this.a.parseMedia(a,b)}});var gu;
487
+ _.hu=class extends _.fu{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${gu++}`;this.j=document.createElement(_.Of);this.l=this.A=!1;_.qo(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":_.Ur(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()}};gu=0;_.yn("native",new class{isSupported(){return!0}create(a){return new _.hu(a)}});_.iu=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;