@castlabs/prestoplay 6.6.1-beta.2 → 6.7.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 (59) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +6 -6
  5. package/cjs/cl.cast.js +110 -110
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +403 -403
  8. package/cjs/cl.crypto.js +10 -10
  9. package/cjs/cl.dash.js +71 -71
  10. package/cjs/cl.externs.js +47 -41
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +68 -49
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +31 -31
  15. package/cjs/cl.ima.js +24 -23
  16. package/cjs/cl.mse.js +263 -260
  17. package/cjs/cl.muxdata.js +11 -12
  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.smooth.js +70 -69
  22. package/cjs/cl.thumbnails.js +24 -24
  23. package/cjs/cl.tizen.js +71 -71
  24. package/cjs/cl.ttml.js +27 -27
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +13 -13
  27. package/cjs/cl.vr.js +13 -13
  28. package/cjs/cl.vtt.js +11 -11
  29. package/cjs/cl.youbora.js +19 -19
  30. package/cl.adobe.js +3 -3
  31. package/cl.airplay.js +3 -3
  32. package/cl.broadpeak.js +5 -5
  33. package/cl.cast.js +88 -88
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +345 -343
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +67 -67
  38. package/cl.externs.js +47 -41
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +57 -40
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +25 -25
  43. package/cl.ima.js +17 -16
  44. package/cl.mse.js +227 -227
  45. package/cl.muxdata.js +9 -8
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +10 -10
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +58 -58
  50. package/cl.thumbnails.js +17 -17
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +22 -22
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +15 -15
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +14 -14
  58. package/package.json +1 -1
  59. package/typings.d.ts +118 -12
package/cl.core.js CHANGED
@@ -1,317 +1,319 @@
1
- let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,la,qa,ra,ta,ua,va,wa,ya,Da,Ea,Fa,Ga,Ia,Na,Oa,Pa,Qa,Ra,Sa,Ua,cb,fb,hb,jb,lb,nb,qb,tb,ub,wb,Vb,$b,oc,pc,vc,wc,xc,zc,Bc,Cc,Dc,Ec,Mc,Sc,Vc,Wc,Xc,ad,hd,jd,kd,pd,sd,Id,Rd,Zd,ae,ie,le,se,ze,Ne,Re,Se,Te,Ue,Ve,Xe,Ye,Ze,$e,af,bf,ef,ff,lf,hf,sf,tf,Df,Ff,Nf,Xf,Yf,Rf,Uf,Zf,ag,cg,fg,gg,kg,mg,og,lg,ig,qg,tg,Ag,zg,Bg,Cg,Dg,Gg,Hg,Kg,$g,dh,eh,fh,gh,hh,jh,kh,nh,qh,th,uh,vh,zh,Bh,wh,yh,Ah,Ch,Dh,Eh,Gh,Hh,Qh,Uh,Zh,ai,Yh,ki,di,ci,xi,yi,Ai,Bi,Ci,Di,Ei,Fi,Hi,Gi,Ii,Ji,Mi,Ni,Oi,zi,Qi,Si,Ui,Wi,cj,kj,lj,
2
- mj,sj,tj,Bj,Ej,Jj,Nj,Pj,Wj,fk,Sj,ak,kk,mk,nk,yk,zk,Gk,Jk,Kk,Lk,Mk,Hk,Nk,Ok,Pk,Qk,Rk,Sk,Yk,dl,fl,hl,gl,jl,al,ql,nl,pl,ol,el,rl,sl,tl,zl,Al,Bl,El,Il,Jl,Ll,Gl,Fl,Tl,Ul,Yl,Xl,$l,bm,cm,Zl,em,fm,km,pm,qm,rm,vm,wm,um,xm,tm,sm,zm,Bm,Dm,Em,Fm,Gm,Hm,Im,Jm,Km,Lm,Mm,Qm,Um,Vm,Xm,Zm,bn,cn,dn,gn,jn,kn,ln,on,mn,nn,pn,qn,rn,sn,tn,un,vn,wn,xn,yn,An,Bn,Cn,En,Gn,Ln,Mn,Nn,Pn,Qn,Rn,Tn,Un,Sn,Vn,Yn,Xn,Wn,bo,ao,ho,cf,df;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";
3
- _.da="6.6.1-beta.2";_.ea="AdaptationSet";_.fa="Already destroyed. No-op";_.ia="Already released. No-op";_.ja="Autoplay is not allowed due to browser policy.";_.ka="BANDWIDTH";la="CHECKSUM";_.ma="CODECS";_.na="Cannot retrieve buffer information due to platform limitations";_.oa="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="Error while decoding string!";
4
- _.za="Error while fetching license!";_.Aa="FairPlay Certificate URL is not defined";_.Ba="FairPlay License URL is not defined";_.Ca="GROUP-ID";Da="HW_SECURE_CRYPTO";Ea="HW_SECURE_DECODE";Fa="HeaderDrm";Ga="InvalidStateError";Ia="License verification failed: ";_.Ja="Loading player with configuration";_.Ka="MaxHeight";_.La="MaxWidth";Na="Missing media element";Oa="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Pa="No event provided!";Qa="No track data attached to the event, unable to add track!";
5
- Ra="Not a persistent session.";Sa="NotAllowedError";Ua="NotSupportedError";_.Va="PlayReady License URL is not defined";_.Wa="Player sources";_.Xa="Please make sure ";_.Ya="QualityLevel";_.Za="RESOLUTION";_.$a="Releasing player with source";_.bb="Representation";cb="STANDARD";_.db="SW_SECURE_CRYPTO";_.eb="SW_SECURE_DECODE";fb="Session is closed";hb="Signature Verification failed";jb="Skipping Session creation. License for init data was already requested in ";_.kb="SmoothStreamingMedia";lb="The index is not in the allowed range.";
6
- _.mb="URI";nb="Unable to translate ";_.ob="Unhandled/ignored event";_.pb="Unregistering listeners";qb="Unsupported keySystem";tb="Using VTTCue polyfill from 3 argument TextTrackCue.";ub="WebkitEmeManager.MediaKeySession.load";_.vb="Widevine License URL is not defined";wb="Will create EME Manager: ";_.xb="ad-break-started";_.yb="ad-break-stopped";_.zb="ad-buffering";_.Ab="ad-clicked";_.Bb="ad-completed";_.Cb="ad-first-quartile";_.Db="ad-impression";_.Eb="ad-loaded";_.Fb="ad-midpoint";_.Gb="ad-paused";
7
- _.Hb="ad-progress";_.Ib="ad-resumed";_.Jb="ad-skipped";_.Kb="ad-started";_.Lb="ad-stopped";_.Mb="ad-third-quartile";_.Nb="addtrack";_.Ob="ads-timeline-changed";_.Pb="airplay-casting-ended";_.Rb="airplay-casting-started";_.Sb="airplay-status-changed";_.Tb="application/cea-608";_.Ub="application/dash+xml";Vb="application/mp4";_.Wb='application/mp4; codecs\x3d"stpp"';_.Xb='application/mp4; codecs\x3d"wvtt"';_.Yb="application/ttml+xml";_.Zb="application/vnd.ms-sstr+xml";$b="application/x-www-form-urlencoded";
8
- _.ac="audio";_.bc="audio/aac";_.cc="audio/ac3";_.dc="audio/eac3";_.ec="audio/mp4";_.fc="audiobufferchanged";_.gc="autoplaynotallowed";_.hc="bitratechanged";_.lc="boolean";_.mc="bufferingended";_.nc="bufferingstarted";oc="canplay";pc="canplaythrough";_.qc="castingstarted";_.rc="caststatuschanged";_.sc="cdn-switch-success";_.tc="cenc";_.uc="center";vc="certificate-request";wc="change";xc="chrome";_.yc="clpp-fill";zc="clpp-hidden";_.Ac="clpp.cast.CastSender";Bc="clpp.drm.HeaderDrm";Cc="clpp.drm.eme.AppleEmeManager";
1
+ let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ka,pa,ra,ta,ua,va,wa,ya,Da,Ea,Fa,Ga,Ha,Na,Oa,Pa,Ra,Sa,Ta,Ua,db,gb,hb,ib,lb,nb,qb,rb,ub,wb,Wb,ac,oc,pc,vc,wc,xc,zc,Bc,Cc,Dc,Ec,Mc,Sc,Vc,Wc,Xc,ad,gd,jd,kd,pd,sd,Hd,Rd,Zd,ae,ie,le,se,ze,Oe,Se,Te,Ue,Ve,We,Ye,Ze,$e,af,bf,cf,ff,gf,mf,jf,tf,uf,yf,Af,Mf,Wf,Xf,Qf,Tf,Yf,$f,bg,eg,fg,jg,lg,ng,kg,hg,pg,vg,xg,wg,yg,zg,Ag,Dg,Eg,Hg,ih,mh,nh,oh,ph,qh,sh,th,wh,zh,Ch,Dh,Eh,Ih,Kh,Fh,Hh,Jh,Lh,Mh,Nh,Ph,Qh,Wh,$h,ei,gi,di,qi,ji,ii,Di,Ei,Gi,Hi,Ii,Ji,Ki,Li,Ni,Mi,Oi,Pi,Si,Ti,Ui,Fi,Wi,Yi,$i,bj,ij,jj,kj,
2
+ lj,rj,sj,Aj,Dj,Jj,Nj,Pj,Wj,fk,Sj,ak,kk,mk,nk,yk,zk,Dk,Jk,Kk,Lk,Mk,Hk,Nk,Ok,Pk,Qk,Rk,Sk,Yk,dl,fl,hl,gl,jl,al,ql,nl,pl,ol,el,rl,sl,tl,zl,Al,Bl,El,Il,Jl,Ll,Gl,Fl,Tl,Ul,Yl,Xl,$l,bm,cm,Zl,em,fm,km,pm,qm,rm,vm,wm,um,xm,tm,sm,zm,Bm,Dm,Em,Fm,Gm,Hm,Im,Jm,Km,Lm,Mm,Qm,Um,Vm,Xm,Zm,bn,cn,dn,gn,jn,kn,ln,on,mn,nn,pn,qn,rn,sn,tn,un,vn,wn,xn,yn,An,Bn,Cn,En,Gn,Ln,Mn,Nn,Pn,Qn,Rn,Tn,Un,Sn,Vn,Yn,Xn,Wn,bo,ao,ho,df,ef;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";
3
+ _.da="6.7.0";_.ea="AdaptationSet";_.fa="Already destroyed. No-op";_.ha="Already released. No-op";_.ia="Autoplay is not allowed due to browser policy.";_.ja="BANDWIDTH";ka="CHECKSUM";_.la="CODECS";_.ma="Cannot retrieve buffer information due to platform limitations";_.oa="CastlabsPlayer";pa="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="Error while decoding string!";
4
+ _.za="Error while fetching license!";_.Aa="FairPlay Certificate URL is not defined";_.Ba="FairPlay License URL is not defined";_.Ca="GROUP-ID";Da="HW_SECURE_CRYPTO";Ea="HW_SECURE_DECODE";Fa="HeaderDrm";Ga="InvalidStateError";Ha="License verification failed: ";_.Ja="Loading player with configuration";_.Ka="MaxHeight";_.La="MaxWidth";Na="Missing media element";Oa="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Pa="No event provided!";Ra="No track data attached to the event, unable to add track!";
5
+ Sa="Not a persistent session.";Ta="NotAllowedError";Ua="NotSupportedError";_.Va="PlayReady License URL is not defined";_.Wa="Player sources";_.Xa="Please make sure ";_.Ya="QualityLevel";_.Za="RESOLUTION";_.$a="Releasing player with source";_.ab="Representation";db="STANDARD";_.eb="SW_SECURE_CRYPTO";_.fb="SW_SECURE_DECODE";gb="Session is closed";hb="Signature Verification failed";ib="Skipping Session creation. License for init data was already requested in ";_.kb="SmoothStreamingMedia";lb="The index is not in the allowed range.";
6
+ _.mb="URI";nb="Unable to translate ";_.ob="Unhandled/ignored event";_.pb="Unregistering listeners";qb="Unsupported keySystem";rb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.sb="VIDEO";ub="WebkitEmeManager.MediaKeySession.load";_.vb="Widevine License URL is not defined";wb="Will create EME Manager: ";_.xb="ad-break-started";_.yb="ad-break-stopped";_.zb="ad-buffering";_.Ab="ad-clicked";_.Bb="ad-completed";_.Cb="ad-first-quartile";_.Db="ad-impression";_.Eb="ad-loaded";_.Fb="ad-midpoint";
7
+ _.Gb="ad-paused";_.Hb="ad-progress";_.Ib="ad-resumed";_.Jb="ad-skipped";_.Kb="ad-started";_.Lb="ad-stopped";_.Mb="ad-third-quartile";_.Nb="addtrack";_.Ob="ads-timeline-changed";_.Qb="airplay-casting-ended";_.Sb="airplay-casting-started";_.Tb="airplay-status-changed";_.Ub="application/cea-608";_.Vb="application/dash+xml";Wb="application/mp4";_.Xb='application/mp4; codecs\x3d"stpp"';_.Yb='application/mp4; codecs\x3d"wvtt"';_.Zb="application/ttml+xml";_.$b="application/vnd.ms-sstr+xml";ac="application/x-www-form-urlencoded";
8
+ _.p="audio";_.bc="audio/aac";_.cc="audio/ac3";_.dc="audio/eac3";_.ec="audio/mp4";_.fc="audiobufferchanged";_.gc="autoplaynotallowed";_.hc="bitratechanged";_.ic="boolean";_.jc="bufferingended";_.nc="bufferingstarted";oc="canplay";pc="canplaythrough";_.qc="castingstarted";_.rc="caststatuschanged";_.sc="cdn-switch-success";_.tc="cenc";_.uc="center";vc="certificate-request";wc="change";xc="chrome";_.yc="clpp-fill";zc="clpp-hidden";_.Ac="clpp.cast.CastSender";Bc="clpp.drm.HeaderDrm";Cc="clpp.drm.eme.AppleEmeManager";
9
9
  Dc="clpp.native.Player";Ec="clpp.utils.Platform";_.Fc="codecs";_.Gc="column-reverse";_.Hc="com.adobe.primetime";_.Ic="com.apple.fps";_.Jc="com.microsoft.playready";_.Kc="com.widevine.alpha";_.Lc="config.drm.customData is not defined";Mc="controls";_.Nc="cuechange";_.Oc="destroy()";_.Pc="disabled";_.Qc="div";_.Rc="drmexpirationupdate";Sc="drmrenewalstarted";_.Tc="drmsessionpersisted";_.Uc="drmsessionupdate";Vc="drmtoday";Wc="durationchange";Xc="encrypted";_.Yc="end";_.Zc="ended";_.$c="error";ad="fullscreenElement";
10
- _.bd="function";_.cd="height";_.dd="hidden";_.ed="image";_.fd="internal-error";hd="keystatuseschange";_.id="left";jd="license-renewal";kd="license-request";_.ld="line-left";_.md="line-right";_.nd="loadeddata";_.od="loadedmetadata";pd="loadstart";_.qd="mdat";_.rd="mdia";sd="message";_.td="metadata";_.ud="mimeType";_.vd="minf";_.wd="moov";_.xd="mp4";_.yd="mpd-type-changed";_.zd="mpeg-dash-callback-event";_.Ad="none";_.p="number";_.Bd="object";_.Cd="onBitrateChanged()";_.Dd="onPlayerError()";_.Ed="onPlayerWillDestroy";
11
- _.Fd="onPlayerWillRelease";_.Gd="onStateChanged()";Id="online-status-changed";_.Jd="optional";_.Md="org.w3.clearkey";_.Nd="output-restricted";_.Od="pause";_.Pd="persistent";_.Qd="persistent-license";Rd="picture-in-picture";_.Sd="play";_.Td="playing";_.Ud="playlist-item-changed";_.Vd="playlist-modified";_.Wd="progress";_.Xd="px";_.Yd="ratechange";Zd="released";_.$d="releasing";ae="removetrack";_.be="required";_.ce="resize";_.de="right";_.ee="seeked";_.fe="seeking";_.ge="showing";_.he="sinf";ie="stalled";
12
- _.je="start";_.ke="statechanged";le="status-pending";_.me="stbl";_.ne="string";_.oe="stsd";_.pe="style";_.qe="subtitles-htmlcue";_.re="subtitles-ttml";se="temporary";_.r="text";_.te="text/vtt";_.ue="text/xml";_.ve="timeupdate";_.we="trak";_.xe="ttml-xml";_.ye="und";ze="unknown";_.Ae="urn:scte:scte35";_.Be="urn:scte:scte35:2014";_.Ce="user-seeked";_.Ee="user-seeking";_.Fe="value";_.Ge="vertical-lr";_.He="vertical-rl";_.v="video";_.Ie="video/mp2t";_.Je="video/mp4";_.Ke="videobufferchanged";_.Le="videotrackchanged";
13
- _.Me="vimond-response";Ne="visibilitychange";_.Oe="vtt-xml";_.Pe="waiting";_.Qe="waitingforkey";Re="webkit-org.w3.clearkey";Se="webkitkeyadded";Te="webkitkeyerror";Ue="webkitkeymessage";Ve="webkitneedkey";_.We="width";Xe="x-dt-csl-tracking-token";Ye="x-dt-follow-up-token";Ze="x-dt-resp-code";af=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};bf=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:af(a)}};
14
- ef=function(a,b){if(b){var c=cf;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&&df(c,a,{configurable:!0,writable:!0,value:b})}};ff=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 ff(a())};
15
- _.x=function(a,b){a=a.split(".");var c=gf;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};_.kf=function(a){return _.z(a)||hf(a)?a:_.jf(a)};_.jf=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=lf(b,{merging:a[c]},1));return b.merging||null};
16
- lf=function(a,b,c){const d=c+1;if(_.z(a)||!_.mf(a))a={};for(const e in b)c=b[e],hf(c)||_.z(c)||_.nf(c)||c instanceof Element?a[e]=c:_.mf(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.nf(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=lf([],c,d):!_.z(c)&&_.of(c)&&20>d&&(a[e]=lf(a[e],c,d));return a};hf=function(a){a=typeof a;return a===_.ne||a===_.p||a===_.lc};_.z=function(a){return null===a||"undefined"===typeof a};_.mf=function(a){return typeof a===_.Bd};
17
- _.nf=function(a){return typeof a===_.bd};_.pf=function(a){return typeof a===_.ne};_.qf=function(a){return typeof a===_.p};_.of=function(a){if(_.z(a)||!_.mf(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
18
- _.rf=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||!_.mf(a)||!_.mf(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};
19
- sf=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};tf=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.wf=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};Df=function(a){return a&&0<=xf[a]?xf[a]:yf};Ff=function(a){if(!a)return _.B("clpp.log",nb+a+ca),-1;const b=Ef[a.toUpperCase()];return void 0===b?(_.B("clpp.log",nb+a+ca),-1):b};_.Hf=function(a){Gf.info.apply(Gf,arguments)};_.If=function(a){Gf.debug.apply(Gf,arguments)};
20
- _.B=function(a){Gf.warn.apply(Gf,arguments)};_.Jf=function(a){Gf.error.apply(Gf,arguments)};_.Mf=function(a){if(a){var b=a.a();b in _.Kf?_.Lf.warn("Player-Factory '"+b+"' already registered"):(_.Kf[b]=a,_.Lf.info("Registered Player-Factory: '"+b+"'"))}};_.Of=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)Nf(b[c]);a.a.clear()};_.Pf=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)};
21
- Nf=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
22
- Xf=function(a,b){a.o.debug("onMetadata_()");b.mode=_.dd;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:_.Qf,eventElement:null};a.m&&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(Rf(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
23
- _.Be;g.type=_.Sf;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.l.trigger(new _.C(_.Tf,{detail:f}));Array.prototype.push.apply(a.g,c);Uf(a,c,b);a.f.off(b,_.Nc);a.f.on(b,_.Nc,f=>{f=f.target.activeCues;f=f.length?Rf(a,f[0]):a.a;var g;if(g=f){{g=f;const h=a.l.getPosition();g=g.startTime<=h&&h<g.endTime}}if(g)a.a=f,a.l.trigger(new _.C(_.Vf,{detail:f}));else{if(f=a.a)f=a.a,g=a.l.getPosition(),f=f.endTime<=g;f&&(f=a.a,a.a=null,a.l.trigger(new _.C(_.Wf,{detail:f})))}})}};
24
- Yf=function(a,b){a.h=b;a.j=a.h.textTracks;a.f.on(a.j,_.Nb,c=>{c=c.track;c.kind===_.td&&Xf(a,c)})};Rf=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};Uf=function(a,b,c){if(a.m){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}))})}};
25
- Zf=function(a,b){b=b.track;b.kind!==_.td&&(b.mode===_.ge&&(b.mode=_.dd),a.a.on(b,_.Nc,c=>{c=c.target||c.srcElement;c.mode=_.dd;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.j.append(c,[]))}))};_.$f=function(a){return Array.isArray(a)?a:[a]};ag=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};_.bg=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};
26
- cg=function(a,b){const c=b||ag;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)}};_.dg=function(a){return null!=a};_.eg=function(a){var b;a instanceof _.eg?(fg(this,a.Qa),this.cc=a.cc,this.Ha=a.Ha,gg(this,a.qc),this.ta=a.ta,_.hg(this,ig(a.a)),this.Sb=a.Sb):a&&(b=String(a).match(jg))?(fg(this,b[1]||"",!0),this.cc=kg(b[2]||""),this.Ha=kg(b[3]||"",!0),gg(this,b[4]),this.ta=kg(b[5]||"",!0),_.hg(this,b[6]||"",!0),this.Sb=kg(b[7]||"")):this.a=new lg(null)};
27
- fg=function(a,b,c){a.Qa=c?kg(b,!0):b;a.Qa&&(a.Qa=a.Qa.replace(/:$/,""))};gg=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};_.hg=function(a,b,c){b instanceof lg?a.a=b:(c||(b=mg(b,ng)),a.a=new lg(b))};kg=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};mg=function(a,b,c){return typeof a===_.ne?(a=encodeURI(a).replace(b,og),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};
28
- og=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};lg=function(a){this.f=a||null};_.pg=function(a){if(!a.a&&(a.a={},a.g=0,a.f))for(var b=a.f.split("\x26"),c=0;c<b.length;c++){var d=b[c].indexOf("\x3d"),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}};
29
- ig=function(a){var b=new lg;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};qg=function(a,b,c,d){a=`${a===_.F?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.pf(d))a+=": "+d;else if(null!=d&&void 0!=d)if(null!=d.message&&void 0!=d.message)a+=": "+d.message,delete d.message,_.pf(d.causeText)&&(a+=`\n Caused by: ${d.causeText}`);else try{a+=": "+JSON.stringify(d)}catch(e){}return a};
30
- _.rg=function(a,b,c){return(a=a.getAttribute(b))?a.value:c||null};_.sg=function(a,b){for(const c of a)if(!b(c))return!1;return!0};tg=function*(a){for(let b=0;b<a;b++)yield b};_.ug=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};
31
- _.yg=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.G(_.F,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.vg(d);var f;(f=_.ug(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.ug(d,g);)c.push(new _.wg(f[1],f[2]||f[3]))}return new _.xg(a,b,c,e)};
32
- Ag=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(zg(a)==zg(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;const c=_.H(a);b=_.H(b);for(const d of tg(a.byteLength))if(c[d]!=b[d])return!1;return!0};zg=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.H=function(a,b=0,c=Infinity){return Bg(a,b,c,Uint8Array)};
33
- Bg=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=zg(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)};Cg=function(a,b=0,c=Infinity){return Bg(a,b,c,Uint16Array)};Dg=function(a,b=0,c=Infinity){return Bg(a,b,c,Uint32Array)};_.Eg=function(a,b=0,c=Infinity){return Bg(a,b,c,Int32Array)};_.Fg=function(a,b=0,c=Infinity){return Bg(a,b,c,DataView)};
34
- Gg=function(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};Hg=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};
35
- _.Ig=function(a){if(!a)return"";a=_.H(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(ya);return a}a=escape(Hg(a));try{return decodeURIComponent(a)}catch(b){throw Error(ya);}};
36
- Kg=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Jg.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.H(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(_.H(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 Hg(c)};
37
- _.Lg=function(a,b){if(_.pf(a))return a;let c="";b=!!b;const d=_.H(a);239==d[0]&&187==d[1]&&191==d[2]?c=_.Ig(d):254==d[0]&&255==d[1]?c=Kg(d.subarray(2),!1):255==d[0]&&254==d[1]&&(c=Kg(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Jg.debug("Unable to find byte-order-mark, making an educated guess.");0==d[0]&&0==d[2]?c=Kg(a,!1):0==d[1]&&0==d[3]?c=Kg(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Ig(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
38
- };_.Mg=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};_.Ng=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};
39
- _.Og=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=Dg(d):2===c?e=Cg(d):e=_.H(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Pg=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Sg=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};_.Tg=function(a){return!!(a&&0<a.length)};_.Ug=function(a){return!a||0===a.length};
40
- _.Vg=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(sf(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""}};_.Xg=function(a){a=a.replace(/<[^>]+>/gi,"");Wg.innerHTML=a;a=Wg.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.Zg=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...Yg]}};
41
- $g=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||[...Yg]};
42
- _.bh=function(a,b){_.pf(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.ah,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||
43
- [],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:[...Yg]};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&$g(c,b);return c};
44
- _.ch=function(a,b,c,d,e,f,g){e&&(d=e);e={uri:d,data:b||new ArrayBuffer(0),headers:a,status:c,fromCache:!!a["x-shaka-from-cache"],timeMs:g,request:f};if(200<=c&&299>=c&&202!==c)return e;g=null;try{g=_.Lg(b,!0)}catch(h){}_.If("HTTP error text:",g);throw new _.G(0<=(f.fatalStatusCodes||[]).indexOf(c)?_.F:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};dh=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};
45
- eh=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};fh=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()};gh=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()}};
46
- hh=function(a,b){a.P.then(()=>b(!0),()=>b(!1));return a};_.ih=function(a,b){a.a.push(hh(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};jh=function(a,b){return _.w(function*(){const c=yield a.fetch(b);return _.Ig(c.data)})};kh=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.w(function*(){if(!navigator.onLine)return!1;if(b){const e=_.bh(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})};
47
- _.lh=function(a){return a&&a!==_.ye?a:null};nh=function(a){if(!a)throw new _.G(_.F,3,3101,`Invalid track type: ${a}`);if(!_.pf(a))throw new _.G(_.F,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.I:return _.I;case _.J:return _.J;case _.K:return _.K;case mh:return mh}throw new _.G(_.F,3,3101,`Unknown track type: ${a}.`);};
48
- qh=function(a,b){a=nh(a);const c=_.lh(b.kind);let d=b.id;d||(d=String(_.oh++));a=new _.ph(d,c===_.td?mh:a);a.kind=c;a.label=_.lh(b.label);a.language=_.lh(b.language);return a};_.rh=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.g}${a.f}`};
49
- _.sh=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)},""):""};th=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};
50
- uh=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};vh=function(a,b){return _.w(function*(){const c=_.bh(b);return yield jh(a.g,c)})};zh=function(a,b,c){return _.w(function*(){const {mimeType:d,renditions:e}=yield wh(a,b,c),f=new _.ph("dummy",_.K),g=e.map((h,k)=>{k=new _.xh(`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});yh(g);return{renditions:g,mimeType:d||void 0}})};
51
- Bh=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Ah(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};wh=function(a,b,c){return _.w(function*(){const d=Ch(b),e=Dh(b,c);return{mimeType:yield Eh(a,e,d[0]?d[0].codec:null),renditions:d}})};
52
- yh=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.");};Ah=function(a){const b=_.yg(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a("TYPE");c=null!=c?{AUDIO:_.J,VIDEO:_.K,SUBTITLES:_.I}[c]:void 0;return{type:c,groupId:a(_.Ca),name:a("NAME"),language:a("LANGUAGE"),hg:a("AUTOSELECT"),default:a("DEFAULT"),og:a("FORCED"),ke:a("CHARACTERISTICS"),uri:a(_.mb)}};
53
- Ch=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.yg(0,b);if(c.getAttribute("VIDEO"))throw Error("Playlist contains alternative video streams.");var d=_.rg(c,_.Za);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.rg(c,_.ka);e=e?Number(e):null;var f=_.rg(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.rg(c,_.ma);c=_.Fh(_.v,c?c.split(","):[]);return b={bandwidth:e,tc:f,codec:c,width:b,height:d,mimeType:null}})};
54
- Dh=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?uh(a,b):null};Eh=function(a,b,c){return _.w(function*(){if(!b||!c)return null;var d=yield vh(a,b);d=[Gh(d,b),Hh(d,b)].filter(Boolean);return _.Ih(d,_.v,c)})};Gh=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?uh(a,b):null};Hh=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.rg(_.yg(0,a),_.mb))?uh(a,b):null:null};
55
- _.Kh=function(a,b,c){for(const d of _.Jh)if(d.probe(b,c))return d.create(a);return null};_.Lh=function(a){a=_.Jh.indexOf(a);0<=a&&_.Jh.splice(a,1)};_.Nh=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Mh.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Oh=function(a,b){a=_.Nh(a);b=_.Nh(b);return a.split("-")[0]==b.split("-")[0]};_.Ph=function(a,b){b&&(a+='; codecs\x3d"'+b+'"');return a};
56
- Qh=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};Uh=function(){if(Rh)return Rh;Sh||(Sh=new _.Th(()=>{Rh=null}));(Rh=document.querySelector(_.v)||document.querySelector(_.ac))||(Rh=document.createElement(_.v));Sh.$(1);return Rh};_.Vh=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Wh=function(a){return(navigator.userAgent||"").includes(a)};
57
- _.Xh=function(a){return _.Wh("Tizen"+(a?" "+String(a):""))};Zh=function(a){const b={major:-1,name:ze};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Yh(a,c[0]));2<=c.length&&(b.minor=Yh(a,c[1]));3<=c.length&&(b.patch=Yh(a,c[2]));4<=c.length&&(b.build=Yh(a,c[3]));return b};_.$h=function(){return _.Wh("Web0S")};_.bi=function(){return _.$h()&&79===ai().major};
58
- ai=function(){const a=ci();const b=["ie","edge","opera","firefox","safari",xc];var c=di();const d=ei[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Zh(c[1]);return Zh("")};_.fi=function(){return _.Wh("CrKey")};_.gi=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Xh()};_.hi=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.gi()&&1<navigator.maxTouchPoints};_.ii=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
59
- Yh=function(a,b){try{return parseInt(b,10)}catch(c){ji.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};ki=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};
60
- di=function(){const a=ci();if(!a)return ni;var b=a.match(/^.+?(?=\))/);if(!b)return ni;b=b[0];if(ki(b,["iphone","ipad"]))return oi;if(ki(b,["android"]))return pi;if(ki(b,["macintosh"]))return qi;if(ki(b,["windows nt"]))return ri;if(ki(b,["tizen"]))return si;if(ki(b,["web0s"]))return ti;if(ki(b,["linux"]))return ui;ji.warn("Unable to identify OS from user agent: "+a);return ni};ci=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
61
- _.wi=function(){var a=di();var b=di();var c=ei[b];if(c){c=ci().match(c.os_version)[1];c=Zh(c);if(b===ri)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=Zh("");a:{c=ci();const e=["ie","edge","opera","firefox","safari",xc];var d=di();d=ei[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=vi}return{os:a,osVersion:b,browser:c,browserVersion:ai()}};
62
- xi=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.rf(a,{kind:_.lh(b.kind),language:_.lh(b.language),label:_.lh(b.label)},["kind","language","label"])};yi=function(a){return a.enabled||a.selected||a.mode===_.ge||a.mode===_.dd};Ai=function(a,b,c){return zi(a)&&b===_.K&&!!c.enableHlsVideoTrackInfo};
63
- Bi=function(a,b,c){return _.w(function*(){var d=a.l.getLoadedSource();d&&a.j&&(d=yield a.j.f(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})))})};Ci=function(a,b,c){return zi(a)&&(b===_.J||b===_.I)&&!!c.enableMetadata};
64
- Di=function(a,b,c){return _.w(function*(){var d=a.l.getLoadedSource();d&&a.j&&(d=yield a.j.f(d.url,c),d.ue&&(d=d.ue.get(`${b.type}:${b.label}`))&&d.ke&&(b.accessibility=d.ke.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Ei=function(a,b){return a.h.filter(c=>c.type===b)};Fi=function(a){(a=a.l.getTextDisplayer())&&a.remove(0,Infinity)};Hi=function(a,b){if(a=Gi(a,b))a=Array.from(a),b===_.I&&(a=a.filter(c=>c.kind!==_.td));return a};
65
- Gi=function(a,b){if(!a.l)return null;a=a.l.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.J:return a.audioTracks;case _.K:return a.videoTracks;case _.I:return a.textTracks;default:return null}};Ii=function(a,b){return(a=a.f.get(b)||null)&&a.renditions[0]};Ji=function(a,b){return(a=a.m.get(b))&&a.renditions[0]};
66
- Mi=function(a,b,c){const d=Hi(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.a.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.m.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.I:f="mode";e=_.ge;g=_.Pc;break;case _.J:f="enabled";break;case _.K:f="selected"}if(f)for(const h of d)h[f]=xi(c,h,c.type)?e:g}}else if(a.a.debug(_.xa+b),a.f.get(b)&&d&&b===_.I){for(e of d)e.mode=
67
- _.Pc;a.f.set(b,null)}b===_.J?a.l.trigger(new _.C(_.Ki)):b===_.I&&a.l.trigger(new _.C(_.Li))};Ni=function(a,b,c){if(a.l){var d=a.l.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=_.Ug(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
68
- Oi=function(a,b){return _.w(function*(){var c=a.l.getConfiguration(),d=_.Kh(c,b.mimeType,_.te);if(d){c=_.bh(b.url);var e=yield a.l.getNetworkEngine().fetch(c).P;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.H(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.te},Ni(a,d,c))}else a.a.warn("Track mimetype is not supported",b)})};zi=function(a){a=a.l.getLoadedSource();return!(!a||a.type!==_.Pi&&!a.url.endsWith(".m3u8"))&&_.gi()};
69
- Qi=function(a,b,c){c=_.$f(c).filter(e=>e);a.a.info("Find preferred tracks for",b,c);const d=Ei(a,b);c.some(e=>{const f=_.Nh(e);return(e=d.find(g=>{g=_.Nh(g.language||"");return _.Oh(f,g)}))?(a.a.info("Will select track with id",e.id),Mi(a,b,e),!0):!1})};Si=function(a){return a.name===Sa&&Ri.some(b=>a.message.startsWith(b))};
70
- _.Vi=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.hi()&&(a=360);const b=_.Zg();b.maxAttempts=3;a={source:"",license:Ti,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.Zg(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,
71
- restrictions:Ui(a)},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:"main",preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],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,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,
72
- gapDetectionThreshold:.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,disableFragmentSupport:!1,disableMergedFragments:!1},restrictions:Ui(),tizen:{sideStreamText:_.Xh(2)},safari:{enableHlsVideoTrackInfo:!1,
73
- enableMetadata:!0}};if(_.Wh("Edge/")||_.Xh())a.streaming.gapDetectionThreshold=.5;_.$h()&&(a.streaming.stallEnabled=!1);_.bi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Xh()&&(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};
74
- Ui=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}};
75
- _.Xi=function(...a){if(!a)return _.Vi();var b=[_.Vi()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.pf(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({suggestedPresentationDelay:0,streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{hlsLowLatency:!0}}),c=!0),b.push(d));a=_.jf.apply(null,b);_.pf(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));
76
- if(!_.z(a.volume)&&(!_.qf(a.volume)||sf(a.volume)))throw new _.G(_.F,7,7100,"config.volume is not a number");if(!_.z(a.preferredTextLanguage)&&!_.pf(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.G(_.F,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.z(a.preferredAudioLanguage)&&!_.pf(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.G(_.F,7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.z(a.preferredAudioCodec)&&
77
- !_.pf(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.G(_.F,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.z(a.preferredVideoCodec)&&!_.pf(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.G(_.F,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.z(a.drm)){if(a.drm.env&&!_.pf(a.drm.env))throw new _.G(_.F,7,7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.pf(a.drm.offlineId))throw new _.G(_.F,
78
- 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(!_.qf(b.bufferingGoal)||sf(b.bufferingGoal))throw new _.G(_.F,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.qf(b.rebufferingGoal)||sf(b.rebufferingGoal))throw new _.G(_.F,7,7100,"config.streaming.rebufferingGoal is not a number");
79
- if(b.rebufferingGoal>b.bufferingGoal)throw new _.G(_.F,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.qf(b.bufferBehind)||sf(b.bufferBehind))throw new _.G(_.F,7,7100,"config.streaming.bufferBehind is not a number");if(!_.qf(b.smallGapLimit)||sf(b.smallGapLimit))throw new _.G(_.F,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.qf(b.durationBackoff)||sf(b.durationBackoff))throw new _.G(_.F,7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;
80
- if(_.z(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.p)throw new _.G(_.F,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Wi(a.restrictions);Wi(a.abr.restrictions);a.abr.initialRestrictions&&Wi(a.abr.initialRestrictions)}return a};
81
- Wi=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);
82
- a.minPixels=Number(a.minPixels);a.maxPixels=Number(a.maxPixels);if(Number.isNaN(a.minWidth)||Number.isNaN(a.maxWidth)||Number.isNaN(a.minHeight)||Number.isNaN(a.maxHeight)||Number.isNaN(a.minBandwidth)||Number.isNaN(a.maxBandwidth)||Number.isNaN(a.minPixels)||Number.isNaN(a.maxPixels))throw new _.G(_.F,7,7100,"Restrictions contain NaN");};_.Yi=function(a){return typeof a===_.Bd&&!Array.isArray(a)&&"source"in a};_.$i=function(a){return _.Zi.get(a)||null};
83
- _.bj=function(a){_.Zi.get(a.id())?aj.warn("Component already in use."):_.Zi.set(a.id(),a)};cj=function(a){for(const b of _.Zi.values())a(b)};_.ej=function(a,b){b=void 0==b?!0:b;a=_.dj(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.dj=function(a){a=Hg(_.H(a));return btoa(a)};_.fj=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};
84
- _.gj=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};_.hj=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};_.ij=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};
85
- _.jj=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};kj=function(a){return _.Pg(a,_.Ic)||_.Pg(a,_.Jc)};lj=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Xe]=a.f),a.a&&(b.headers[Ye]=a.a))};
86
- mj=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Xe],a.a=b.headers[Ye],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(_.Ig(_.fj(b))),{delay:a.renewalPeriod,eg:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.oj=function(a){_.nj[a.I]=a};
87
- _.qj=function(a){const b={attemptParameters:_.Zg(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,La:{}};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,a.env)){const c=_.nj[a.env]||null;if(!c)throw _.If(_.sa,
88
- _.Xa+a.env+_.aa),new _.G(_.F,6,6015,`DRM environment '${a.env}' is missing.`);b.La=_.pj(c,a.customData)||{};_.Pg(a.env.toLowerCase(),Vc)&&(b.enforceSingleSession=!0)}return b};sj=function(a){a=rj[a];if(!a)return null;const b=_.wi();return b.os===pi&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
89
- _.pj=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.g[_.Kc];if(g){var h=g.licenseUrl;d=tj(d,g.videoRobustness);e=tj(e,g.audioRobustness);var k=g.modifiers,l=g.distinctiveIdentifierRequired,m=g.persistentStateRequired;g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.ne?sj(f):f;c[_.Kc]={licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,
10
+ _.bd="function";_.cd="height";_.dd="hidden";_.ed="image";_.fd="internal-error";gd="keystatuseschange";_.id="left";jd="license-renewal";kd="license-request";_.ld="line-left";_.md="line-right";_.nd="loadeddata";_.od="loadedmetadata";pd="loadstart";_.qd="mdat";_.rd="mdia";sd="message";_.td="metadata";_.ud="mimeType";_.vd="minf";_.wd="moov";_.xd="mp4";_.yd="mpd-type-changed";_.zd="mpeg-dash-callback-event";_.Ad="none";_.r="number";_.Bd="object";_.Cd="onBitrateChanged()";_.Dd="onPlayerError()";_.Ed="onPlayerWillDestroy";
11
+ _.Fd="onPlayerWillRelease";_.Gd="onStateChanged()";Hd="online-status-changed";_.Id="optional";_.Kd="org.w3.clearkey";_.Ld="output-restricted";_.Od="pause";_.Pd="persistent";_.Qd="persistent-license";Rd="picture-in-picture";_.Sd="play";_.Td="playing";_.Ud="playlist-item-changed";_.Vd="playlist-modified";_.Wd="progress";_.Xd="px";_.Yd="ratechange";Zd="released";_.$d="releasing";ae="removetrack";_.be="required";_.ce="resize";_.de="right";_.ee="seeked";_.fe="seeking";_.ge="showing";_.he="sinf";ie="stalled";
12
+ _.je="start";_.ke="statechanged";le="status-pending";_.me="stbl";_.ne="string";_.oe="stsd";_.pe="style";_.qe="subtitles-htmlcue";_.re="subtitles-ttml";se="temporary";_.v="text";_.te="text/vtt";_.ue="text/xml";_.ve="timeupdate";_.we="trak";_.xe="ttml-xml";_.ye="und";ze="unknown";_.Ae="urn:scte:scte35";_.Be="urn:scte:scte35:2014";_.Ce="user-seeked";_.De="user-seeking";_.Ee="value";_.Ge="vertical-lr";_.Ie="vertical-rl";_.w="video";_.Je="video/mp2t";_.Ke="video/mp4";_.Le="videobufferchanged";_.Me="videotrackchanged";
13
+ _.Ne="vimond-response";Oe="visibilitychange";_.Pe="vtt-xml";_.Qe="waiting";_.Re="waitingforkey";Se="webkit-org.w3.clearkey";Te="webkitkeyadded";Ue="webkitkeyerror";Ve="webkitkeymessage";We="webkitneedkey";_.Xe="width";Ye="x-dt-csl-tracking-token";Ze="x-dt-follow-up-token";$e="x-dt-resp-code";bf=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};cf=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:bf(a)}};
14
+ ff=function(a,b){if(b){var c=df;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&&ef(c,a,{configurable:!0,writable:!0,value:b})}};gf=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())})};_.y=function(a){return gf(a())};
15
+ _.z=function(a,b){a=a.split(".");var c=hf;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};_.lf=function(a){return _.B(a)||jf(a)?a:_.kf(a)};_.kf=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=mf(b,{merging:a[c]},1));return b.merging||null};
16
+ mf=function(a,b,c){const d=c+1;if(_.B(a)||!_.nf(a))a={};for(const e in b)c=b[e],jf(c)||_.B(c)||_.of(c)||c instanceof Element?a[e]=c:_.nf(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.of(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=mf([],c,d):!_.B(c)&&_.pf(c)&&20>d&&(a[e]=mf(a[e],c,d));return a};jf=function(a){a=typeof a;return a===_.ne||a===_.r||a===_.ic};_.B=function(a){return null===a||"undefined"===typeof a};_.nf=function(a){return typeof a===_.Bd};
17
+ _.of=function(a){return typeof a===_.bd};_.qf=function(a){return typeof a===_.ne};_.rf=function(a){return typeof a===_.r};_.pf=function(a){if(_.B(a)||!_.nf(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
18
+ _.sf=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||!_.nf(a)||!_.nf(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.B(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.B(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.B(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
19
+ tf=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};uf=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.vf=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};yf=function(a){return a&&0<=wf[a]?wf[a]:xf};Af=function(a){if(!a)return _.C("clpp.log",nb+a+ca),-1;const b=zf[a.toUpperCase()];return void 0===b?(_.C("clpp.log",nb+a+ca),-1):b};_.Gf=function(a){Ff.info.apply(Ff,arguments)};_.Hf=function(a){Ff.debug.apply(Ff,arguments)};
20
+ _.C=function(a){Ff.warn.apply(Ff,arguments)};_.If=function(a){Ff.error.apply(Ff,arguments)};_.Lf=function(a){if(a){var b=a.a();b in _.Jf?_.Kf.warn("Player-Factory '"+b+"' already registered"):(_.Jf[b]=a,_.Kf.info("Registered Player-Factory: '"+b+"'"))}};_.Nf=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)Mf(b[c]);a.a.clear()};_.Of=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)};
21
+ Mf=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
22
+ Wf=function(a,b){a.o.debug("onMetadata_()");b.mode=_.dd;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:_.Pf,eventElement:null};a.m&&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(Qf(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
23
+ _.Be;g.type=_.Rf;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.l.trigger(new _.F(_.Sf,{detail:f}));Array.prototype.push.apply(a.g,c);Tf(a,c,b);a.f.off(b,_.Nc);a.f.on(b,_.Nc,f=>{f=f.target.activeCues;f=f.length?Qf(a,f[0]):a.a;var g;if(g=f){{g=f;const h=a.l.getPosition();g=g.startTime<=h&&h<g.endTime}}if(g)a.a=f,a.l.trigger(new _.F(_.Uf,{detail:f}));else{if(f=a.a)f=a.a,g=a.l.getPosition(),f=f.endTime<=g;f&&(f=a.a,a.a=null,a.l.trigger(new _.F(_.Vf,{detail:f})))}})}};
24
+ Xf=function(a,b){a.h=b;a.j=a.h.textTracks;a.f.on(a.j,_.Nb,c=>{c=c.track;c.kind===_.td&&Wf(a,c)})};Qf=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};Tf=function(a,b,c){if(a.m){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}))})}};
25
+ Yf=function(a,b){b=b.track;b.kind!==_.td&&(b.mode===_.ge&&(b.mode=_.dd),a.a.on(b,_.Nc,c=>{c=c.target||c.srcElement;c.mode=_.dd;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.j.append(c,[]))}))};_.Zf=function(a){return Array.isArray(a)?a:[a]};$f=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};_.ag=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};
26
+ bg=function(a,b){const c=b||$f;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)}};_.cg=function(a){return null!=a};_.dg=function(a){var b;a instanceof _.dg?(eg(this,a.Sa),this.dc=a.dc,this.La=a.La,fg(this,a.vc),this.wa=a.wa,_.gg(this,hg(a.a)),this.Ub=a.Ub):a&&(b=String(a).match(ig))?(eg(this,b[1]||"",!0),this.dc=jg(b[2]||""),this.La=jg(b[3]||"",!0),fg(this,b[4]),this.wa=jg(b[5]||"",!0),_.gg(this,b[6]||"",!0),this.Ub=jg(b[7]||"")):this.a=new kg(null)};
27
+ eg=function(a,b,c){a.Sa=c?jg(b,!0):b;a.Sa&&(a.Sa=a.Sa.replace(/:$/,""))};fg=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.vc=b}else a.vc=null};_.gg=function(a,b,c){b instanceof kg?a.a=b:(c||(b=lg(b,mg)),a.a=new kg(b))};jg=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};lg=function(a,b,c){return typeof a===_.ne?(a=encodeURI(a).replace(b,ng),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};
28
+ ng=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};kg=function(a){this.f=a||null};_.og=function(a){if(!a.a&&(a.a={},a.g=0,a.f))for(var b=a.f.split("\x26"),c=0;c<b.length;c++){var d=b[c].indexOf("\x3d"),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}};
29
+ hg=function(a){var b=new kg;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};pg=function(a,b,c,d){a=`${a===_.G?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.qf(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};
30
+ _.qg=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.H(_.G,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};_.sg=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=rg.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.tg=function(a,b){a=_.sg(a);b=_.sg(b);return a.split("-")[0]==b.split("-")[0]};_.ug=function(a,b){for(const c of a)if(!b(c))return!1;return!0};vg=function*(a){for(let b=0;b<a;b++)yield b};
31
+ xg=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(wg(a)==wg(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;const c=_.I(a);b=_.I(b);for(const d of vg(a.byteLength))if(c[d]!=b[d])return!1;return!0};wg=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.I=function(a,b=0,c=Infinity){return yg(a,b,c,Uint8Array)};
32
+ yg=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=wg(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)};zg=function(a,b=0,c=Infinity){return yg(a,b,c,Uint16Array)};Ag=function(a,b=0,c=Infinity){return yg(a,b,c,Uint32Array)};_.Bg=function(a,b=0,c=Infinity){return yg(a,b,c,Int32Array)};_.Cg=function(a,b=0,c=Infinity){return yg(a,b,c,DataView)};
33
+ Dg=function(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};Eg=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};
34
+ _.Fg=function(a){if(!a)return"";a=_.I(a);239===a[0]&&187===a[1]&&191===a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(ya);return a}a=escape(Eg(a));try{return decodeURIComponent(a)}catch(b){throw Error(ya);}};
35
+ Hg=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Gg.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.I(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(_.I(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return Eg(c)};
36
+ _.Ig=function(a,b){if(_.qf(a))return a;let c="";b=!!b;const d=_.I(a);239==d[0]&&187==d[1]&&191==d[2]?c=_.Fg(d):254==d[0]&&255==d[1]?c=Hg(d.subarray(2),!1):255==d[0]&&254==d[1]&&(c=Hg(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Gg.debug("Unable to find byte-order-mark, making an educated guess.");0==d[0]&&0==d[2]?c=Hg(a,!1):0==d[1]&&0==d[3]?c=Hg(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Fg(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
37
+ };_.Jg=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};_.Kg=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};
38
+ _.Lg=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=Ag(d):2===c?e=zg(d):e=_.I(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Mg=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Ng=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};_.Og=function(a){return!!(a&&0<a.length)};_.Pg=function(a){return!a||0===a.length};
39
+ _.Qg=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(tf(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""}};_.Sg=function(a){a=a.replace(/<[^>]+>/gi,"");Rg.innerHTML=a;a=Rg.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.Wg=function(a,b){b=void 0==b?!0:b;a=_.Tg(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};
40
+ _.Tg=function(a){a=Eg(_.I(a));return btoa(a)};_.Xg=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};_.Yg=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};_.Zg=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};
41
+ _.$g=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};_.ah=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};
42
+ _.bh=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};
43
+ _.fh=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.H(_.G,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.ch(d);var f;(f=_.bh(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.bh(d,g);)c.push(new _.dh(f[1],f[2]||f[3]))}return new _.eh(a,b,c,e)};_.hh=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...gh]}};
44
+ ih=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||[...gh]};
45
+ _.kh=function(a,b){_.qf(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.jh,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||
46
+ [],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:[...gh],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&ih(c,b);return c};
47
+ _.lh=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=_.Ig(b,!0)}catch(k){}_.Hf("HTTP error text:",g);throw new _.H(0<=(f.fatalStatusCodes||[]).indexOf(c)?_.G:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};
48
+ mh=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};nh=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};oh=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()};
49
+ ph=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()}};qh=function(a,b){a.P.then(()=>b(!0),()=>b(!1));return a};_.rh=function(a,b){a.a.push(qh(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};sh=function(a,b){return _.y(function*(){const c=yield a.fetch(b);return _.Fg(c.data)})};
50
+ th=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.y(function*(){if(!navigator.onLine)return!1;if(b){const e=_.kh(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})};_.uh=function(a){return a&&a!==_.ye?a:null};
51
+ wh=function(a){if(!a)throw new _.H(_.G,3,3101,`Invalid track type: ${a}`);if(!_.qf(a))throw new _.H(_.G,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.J:return _.J;case _.K:return _.K;case _.L:return _.L;case vh:return vh}throw new _.H(_.G,3,3101,`Unknown track type: ${a}.`);};zh=function(a,b){a=wh(a);const c=_.uh(b.kind);let d=b.id;d||(d=String(_.xh++));a=new _.yh(d,c===_.td?vh:a);a.kind=c;a.label=_.uh(b.label);a.language=_.uh(b.language);return a};
52
+ _.Ah=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.g}${a.f}`};_.Bh=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)},""):""};
53
+ Ch=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};Dh=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};Eh=function(a,b){return _.y(function*(){const c=_.kh(b);return yield sh(a.g,c)})};
54
+ Ih=function(a,b,c){return _.y(function*(){const {mimeType:d,renditions:e}=yield Fh(a,b,c),f=new _.yh("dummy",_.L),g=e.map((h,k)=>{k=new _.Gh(`R${k}`,f);k.bandwidth=h.bandwidth;k.yc=h.yc;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});Hh(g);return{renditions:g,mimeType:d||void 0}})};
55
+ Kh=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Jh(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};Fh=function(a,b,c){return _.y(function*(){const d=Lh(b),e=Mh(b,c);return{mimeType:yield Nh(a,e,d[0]?d[0].codec:null),renditions:d}})};
56
+ Hh=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.");};Jh=function(a){const b=_.fh(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a("TYPE");c=null!=c?{AUDIO:_.K,VIDEO:_.L,SUBTITLES:_.J}[c]:void 0;return{type:c,groupId:a(_.Ca),name:a("NAME"),language:a("LANGUAGE"),yg:a("AUTOSELECT"),default:a("DEFAULT"),Fg:a("FORCED"),oe:a("CHARACTERISTICS"),uri:a(_.mb)}};
57
+ Lh=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.fh(0,b);if(c.getAttribute(_.sb))throw Error("Playlist contains alternative video streams.");var d=_.qg(c,_.Za);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.qg(c,_.ja);e=e?Number(e):null;var f=_.qg(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.qg(c,_.la);c=_.Oh(_.w,c?c.split(","):[]);return b={bandwidth:e,yc:f,codec:c,width:b,height:d,mimeType:null}})};
58
+ Mh=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?Dh(a,b):null};Nh=function(a,b,c){return _.y(function*(){if(!b||!c)return null;var d=yield Eh(a,b);d=[Ph(d,b),Qh(d,b)].filter(Boolean);return _.Rh(d,_.w,c)})};Ph=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?Dh(a,b):null};Qh=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.qg(_.fh(0,a),_.mb))?Dh(a,b):null:null};
59
+ _.Th=function(a,b,c){for(const d of _.Sh)if(d.probe(b,c))return d.create(a);return null};_.Uh=function(a){a=_.Sh.indexOf(a);0<=a&&_.Sh.splice(a,1)};_.Vh=function(a,b){b&&(a+='; codecs\x3d"'+b+'"');return a};Wh=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};
60
+ $h=function(){if(Xh)return Xh;Yh||(Yh=new _.Zh(()=>{Xh=null}));(Xh=document.querySelector(_.w)||document.querySelector(_.p))||(Xh=document.createElement(_.w));Yh.$(1);return Xh};_.ai=function(){return!!navigator.userAgent.match(/Edge?\//)};_.bi=function(a){return(navigator.userAgent||"").includes(a)};_.ci=function(a){return _.bi("Tizen"+(a?" "+String(a):""))};
61
+ ei=function(a){const b={major:-1,name:ze};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=di(a,c[0]));2<=c.length&&(b.minor=di(a,c[1]));3<=c.length&&(b.patch=di(a,c[2]));4<=c.length&&(b.build=di(a,c[3]));return b};_.fi=function(){return _.bi("Web0S")};_.hi=function(){return _.fi()&&79===gi().major};
62
+ gi=function(){const a=ii();const b=["ie","edge","opera","firefox","safari",xc];var c=ji();const d=ki[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return ei(c[1]);return ei("")};_.li=function(){return _.bi("CrKey")};_.mi=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.ci()};_.ni=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.mi()&&1<navigator.maxTouchPoints};_.oi=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
63
+ di=function(a,b){try{return parseInt(b,10)}catch(c){pi.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};qi=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};
64
+ ji=function(){const a=ii();if(!a)return ri;var b=a.match(/^.+?(?=\))/);if(!b)return ri;b=b[0];if(qi(b,["iphone","ipad"]))return ui;if(qi(b,["android"]))return vi;if(qi(b,["macintosh"]))return wi;if(qi(b,["windows nt"]))return xi;if(qi(b,["tizen"]))return yi;if(qi(b,["web0s"]))return zi;if(qi(b,["linux"]))return Ai;pi.warn("Unable to identify OS from user agent: "+a);return ri};ii=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
65
+ _.Ci=function(){var a=ji();var b=ji();var c=ki[b];if(c){c=ii().match(c.os_version)[1];c=ei(c);if(b===xi)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=ei("");a:{c=ii();const e=["ie","edge","opera","firefox","safari",xc];var d=ji();d=ki[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=Bi}return{os:a,osVersion:b,browser:c,browserVersion:gi()}};
66
+ Di=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.sf(a,{kind:_.uh(b.kind),language:_.uh(b.language),label:_.uh(b.label)},["kind","language","label"])};Ei=function(a){return a.enabled||a.selected||a.mode===_.ge||a.mode===_.dd};Gi=function(a,b,c){return Fi(a)&&b===_.L&&!!c.enableHlsVideoTrackInfo};
67
+ Hi=function(a,b,c){return _.y(function*(){var d=a.l.getLoadedSource();d&&a.j&&(d=yield a.j.f(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})))})};Ii=function(a,b,c){return Fi(a)&&(b===_.K||b===_.J)&&!!c.enableMetadata};
68
+ Ji=function(a,b,c){return _.y(function*(){var d=a.l.getLoadedSource();d&&a.j&&(d=yield a.j.f(d.url,c),d.tc&&(d=d.tc.get(`${b.type}:${b.label}`))&&d.oe&&(b.accessibility=d.oe.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Ki=function(a,b){return a.h.filter(c=>c.type===b)};Li=function(a){(a=a.l.getTextDisplayer())&&a.remove(0,Infinity)};Ni=function(a,b){if(a=Mi(a,b))a=Array.from(a),b===_.J&&(a=a.filter(c=>c.kind!==_.td));return a};
69
+ Mi=function(a,b){if(!a.l)return null;a=a.l.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.K:return a.audioTracks;case _.L:return a.videoTracks;case _.J:return a.textTracks;default:return null}};Oi=function(a,b){return(a=a.f.get(b)||null)&&a.renditions[0]};Pi=function(a,b){return(a=a.m.get(b))&&a.renditions[0]};
70
+ Si=function(a,b,c){const d=Ni(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.a.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.m.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.J:f="mode";e=_.ge;g=_.Pc;break;case _.K:f="enabled";break;case _.L:f="selected"}if(f)for(const h of d)h[f]=Di(c,h,c.type)?e:g}}else if(a.a.debug(_.xa+b),a.f.get(b)&&d&&b===_.J){for(e of d)e.mode=
71
+ _.Pc;a.f.set(b,null)}b===_.K?a.l.trigger(new _.F(_.Qi)):b===_.J&&a.l.trigger(new _.F(_.Ri))};Ti=function(a,b,c){if(a.l){var d=a.l.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=_.Pg(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
72
+ Ui=function(a,b){return _.y(function*(){var c=a.l.getConfiguration(),d=_.Th(c,b.mimeType,_.te);if(d){c=_.kh(b.url);var e=yield a.l.getNetworkEngine().fetch(c).P;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.I(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.te},Ti(a,d,c))}else a.a.warn("Track mimetype is not supported",b)})};Fi=function(a){a=a.l.getLoadedSource();return!(!a||a.type!==_.Vi&&!a.url.endsWith(".m3u8"))&&_.mi()};
73
+ Wi=function(a,b,c){c=_.Zf(c).filter(e=>e);a.a.info("Find preferred tracks for",b,c);const d=Ki(a,b);c.some(e=>{const f=_.sg(e);return(e=d.find(g=>{g=_.sg(g.language||"");return _.tg(f,g)}))?(a.a.info("Will select track with id",e.id),Si(a,b,e),!0):!1})};Yi=function(a){return a.name===Ta&&Xi.some(b=>a.message.startsWith(b))};
74
+ _.aj=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.ni()&&(a=360);const b=_.hh();b.maxAttempts=3;a={source:"",license:Zi,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.hh(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,
75
+ restrictions:$i(a)},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:"main",preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],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,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,
76
+ gapDetectionThreshold:.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,disableFragmentSupport:!1,disableMergedFragments:!1},restrictions:$i(),tizen:{sideStreamText:_.ci(2)},safari:{enableHlsVideoTrackInfo:!1,
77
+ enableMetadata:!0}};if(_.bi("Edge/")||_.ci())a.streaming.gapDetectionThreshold=.5;_.fi()&&(a.streaming.stallEnabled=!1);_.hi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.ci()&&(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};
78
+ $i=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}};
79
+ _.cj=function(...a){if(!a)return _.aj();var b=[_.aj()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.qf(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({suggestedPresentationDelay:0,streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{hlsLowLatency:!0}}),c=!0),b.push(d));a=_.kf.apply(null,b);_.qf(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));
80
+ if(!_.B(a.volume)&&(!_.rf(a.volume)||tf(a.volume)))throw new _.H(_.G,7,7100,"config.volume is not a number");if(!_.B(a.preferredTextLanguage)&&!_.qf(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.G,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.B(a.preferredAudioLanguage)&&!_.qf(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.G,7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.B(a.preferredAudioCodec)&&
81
+ !_.qf(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.G,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.B(a.preferredVideoCodec)&&!_.qf(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.G,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.B(a.drm)){if(a.drm.env&&!_.qf(a.drm.env))throw new _.H(_.G,7,7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.qf(a.drm.offlineId))throw new _.H(_.G,
82
+ 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(!_.rf(b.bufferingGoal)||tf(b.bufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.rf(b.rebufferingGoal)||tf(b.rebufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal is not a number");
83
+ if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.rf(b.bufferBehind)||tf(b.bufferBehind))throw new _.H(_.G,7,7100,"config.streaming.bufferBehind is not a number");if(!_.rf(b.smallGapLimit)||tf(b.smallGapLimit))throw new _.H(_.G,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.rf(b.durationBackoff)||tf(b.durationBackoff))throw new _.H(_.G,7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;
84
+ if(_.B(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.r)throw new _.H(_.G,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");bj(a.restrictions);bj(a.abr.restrictions);a.abr.initialRestrictions&&bj(a.abr.initialRestrictions)}return a};
85
+ bj=function(a){_.B(a.maxPixels)&&(a.maxPixels=Infinity);_.B(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.B(a.maxHeight)&&(a.maxHeight=Infinity);_.B(a.maxWidth)&&(a.maxWidth=Infinity);_.B(a.minPixels)&&(a.minPixels=0);_.B(a.minBandwidth)&&(a.minBandwidth=0);_.B(a.minHeight)&&(a.minHeight=0);_.B(a.minWidth)&&(a.minWidth=0);a.minWidth=Number(a.minWidth);a.maxWidth=Number(a.maxWidth);a.minHeight=Number(a.minHeight);a.maxHeight=Number(a.maxHeight);a.minBandwidth=Number(a.minBandwidth);a.maxBandwidth=Number(a.maxBandwidth);
86
+ a.minPixels=Number(a.minPixels);a.maxPixels=Number(a.maxPixels);if(Number.isNaN(a.minWidth)||Number.isNaN(a.maxWidth)||Number.isNaN(a.minHeight)||Number.isNaN(a.maxHeight)||Number.isNaN(a.minBandwidth)||Number.isNaN(a.maxBandwidth)||Number.isNaN(a.minPixels)||Number.isNaN(a.maxPixels))throw new _.H(_.G,7,7100,"Restrictions contain NaN");};_.dj=function(a){return typeof a===_.Bd&&!Array.isArray(a)&&"source"in a};_.fj=function(a){return _.ej.get(a)||null};
87
+ _.hj=function(a){_.ej.get(a.id())?gj.warn("Component already in use."):_.ej.set(a.id(),a)};ij=function(a){for(const b of _.ej.values())a(b)};jj=function(a){return _.Mg(a,_.Ic)||_.Mg(a,_.Jc)};kj=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Ye]=a.f),a.a&&(b.headers[Ze]=a.a))};
88
+ lj=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Ye],a.a=b.headers[Ze],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(_.Fg(_.Xg(b))),{delay:a.renewalPeriod,vg:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.nj=function(a){_.mj[a.I]=a};
89
+ _.pj=function(a){const b={attemptParameters:_.hh(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,Na:{}};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,a.env)){const c=_.mj[a.env]||null;if(!c)throw _.Hf(_.sa,
90
+ _.Xa+a.env+_.aa),new _.H(_.G,6,6015,`DRM environment '${a.env}' is missing.`);b.Na=_.oj(c,a.customData)||{};_.Mg(a.env.toLowerCase(),Vc)&&(b.enforceSingleSession=!0)}return b};rj=function(a){a=qj[a];if(!a)return null;const b=_.Ci();return b.os===vi&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
91
+ _.oj=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.g[_.Kc];if(g){var h=g.licenseUrl;d=sj(d,g.videoRobustness);e=sj(e,g.audioRobustness);var k=g.modifiers,l=g.distinctiveIdentifierRequired,m=g.persistentStateRequired;g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.ne?rj(f):f;c[_.Kc]={licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,
90
92
  serverCertificate:g}}(g=a.g[_.Ic])&&(c[_.Ic]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.g[_.Jc])&&(c[_.Jc]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});return c};
91
- tj=function(a,b){const c=_.wi();if(c.os!==pi||c.browser!==xc)return a||b};_.uj=function(){throw new _.G(_.F,3,3E3);};_.vj=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.H(a.f.buffer);b=_.H(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.uj()}};_.L=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.uj()}};_.wj=function(a){return a.a<a.f.byteLength};_.xj=function(){throw new _.G(_.F,3,3E3,"Buffer read out of bounds.");};_.yj=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.xj()}};
92
- _.zj=function(a){try{const b=a.f.getUint16(a.a,a.g);a.a+=2;return b}catch(b){_.xj()}};_.M=function(a){try{const b=a.f.getUint32(a.a,a.g);a.a+=4;return b}catch(b){_.xj()}};_.Aj=function(a){try{const b=a.f.getInt32(a.a,a.g);a.a+=4;return b}catch(b){_.xj()}};Bj=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.yj(a);return c};
93
- _.Cj=function(a){let b,c=0;try{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){_.xj()}if(2097151<c)throw new _.G(_.F,3,3001);a.a+=8;return c*Math.pow(2,32)+b};_.Dj=function(a,b){a.a+b>a.f.byteLength&&_.xj();const c=a.f.buffer.slice(a.a,a.a+b);a.a+=b;return _.H(c)};Ej=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Fj=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};
94
- _.N=function(a){for(;_.wj(a.reader)&&!a.parser.a;)a.parser.Zc(a.start+a.headerSize,a.reader,a.partialOkay)};_.Gj=function(a){for(let b=_.M(a.reader);0<b&&!a.parser.a;--b)a.parser.Zc(a.start+a.headerSize,a.reader,a.partialOkay)};_.Hj=function(a){return b=>{const c=b.reader.wa()-b.reader.getPosition();a(_.Dj(b.reader,c))}};_.Ij=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};Jj=function(a){let b="";try{b=_.Lg(a)}catch(c){}return b};
95
- _.Lj=function(a){a=Jj(a);let b="";a.length&&(b=(new _.Kj(a)).a);return b};Nj=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Ig(a)),d=_.fj(c.sinf[0]);(new _.Mj).M(_.he,_.N).M("schi",_.N).M("tenc",e=>{e.reader.skip(6);_.yj(e.reader)&&(e.reader.skip(1),b=_.hj(_.Dj(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
96
- Pj=function(a,b,c){if(!c||!c.byteLength)throw new _.G(_.F,6,6102);let d;typeof b===_.ne?d=_.Ng(b,!0):d=b;a=_.Ng(Jj(a),!0);b=new _.Oj(12+a.byteLength+d.byteLength+c.byteLength,!0);_.L(b,a.byteLength);_.vj(b,_.H(a));_.L(b,d.byteLength);_.vj(b,_.H(d));_.L(b,c.byteLength);_.vj(b,_.H(c));return _.H(b.buffer)};_.Qj=function(a){var b=_.H(a.body);b=_.ej(b);a.headers[ra]=$b;a.body=_.Mg("spc\x3d"+b).buffer};
97
- _.Rj=function(a){let b;try{b=_.Ig(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=Gg(_.fj(b))};Wj=function(a,b){b=Sj(b);if(a==_.Kc)return b+Tj;if(a==_.Jc)return b+Uj;if(a==_.Ic)return b+Vj;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
93
+ sj=function(a,b){const c=_.Ci();if(c.os!==vi||c.browser!==xc)return a||b};_.tj=function(){throw new _.H(_.G,3,3E3);};_.uj=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.I(a.f.buffer);b=_.I(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.tj()}};_.M=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.tj()}};_.vj=function(a){return a.a<a.f.byteLength};_.wj=function(){throw new _.H(_.G,3,3E3,"Buffer read out of bounds.");};_.xj=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.wj()}};
94
+ _.yj=function(a){try{const b=a.f.getUint16(a.a,a.g);a.a+=2;return b}catch(b){_.wj()}};_.N=function(a){try{const b=a.f.getUint32(a.a,a.g);a.a+=4;return b}catch(b){_.wj()}};_.zj=function(a){try{const b=a.f.getInt32(a.a,a.g);a.a+=4;return b}catch(b){_.wj()}};Aj=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.xj(a);return c};
95
+ _.Bj=function(a){let b,c=0;try{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){_.wj()}if(2097151<c)throw new _.H(_.G,3,3001);a.a+=8;return c*Math.pow(2,32)+b};_.Cj=function(a,b){a.a+b>a.f.byteLength&&_.wj();const c=a.f.buffer.slice(a.a,a.a+b);a.a+=b;return _.I(c)};Dj=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Ej=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};
96
+ _.Fj=function(a){for(;_.vj(a.reader)&&!a.parser.a;)a.parser.ed(a.start+a.headerSize,a.reader,a.partialOkay)};_.Gj=function(a){for(let b=_.N(a.reader);0<b&&!a.parser.a;--b)a.parser.ed(a.start+a.headerSize,a.reader,a.partialOkay)};_.Hj=function(a){return b=>{const c=b.reader.za()-b.reader.getPosition();a(_.Cj(b.reader,c))}};_.Ij=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};Jj=function(a){let b="";try{b=_.Ig(a)}catch(c){}return b};
97
+ _.Lj=function(a){a=Jj(a);let b="";a.length&&(b=(new _.Kj(a)).a);return b};Nj=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Fg(a)),d=_.Xg(c.sinf[0]);(new _.Mj).L(_.he,_.Fj).L("schi",_.Fj).L("tenc",e=>{e.reader.skip(6);_.xj(e.reader)&&(e.reader.skip(1),b=_.Zg(_.Cj(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
98
+ Pj=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.G,6,6102);let d;typeof b===_.ne?d=_.Kg(b,!0):d=b;a=_.Kg(Jj(a),!0);b=new _.Oj(12+a.byteLength+d.byteLength+c.byteLength,!0);_.M(b,a.byteLength);_.uj(b,_.I(a));_.M(b,d.byteLength);_.uj(b,_.I(d));_.M(b,c.byteLength);_.uj(b,_.I(c));return _.I(b.buffer)};_.Qj=function(a){var b=_.I(a.body);b=_.Wg(b);a.headers[ra]=ac;a.body=_.Jg("spc\x3d"+b).buffer};
99
+ _.Rj=function(a){let b;try{b=_.Fg(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=Dg(_.Xg(b))};Wj=function(a,b){b=Sj(b);if(a==_.Kc)return b+Tj;if(a==_.Jc)return b+Uj;if(a==_.Ic)return b+Vj;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
98
100
  _.Yj=function(a,b,c,d){d=void 0===d?!0:d;a=a.drm;a&&a.env.startsWith(ua)?a.customData&&(c=btoa(JSON.stringify({userId:a.customData.userId,sessionId:a.customData.sessionId,merchant:a.customData.merchant})),b.headers["dt-custom-data"]=c,a.customData.authToken&&(b.headers["x-dt-auth-token"]=`${a.customData.authToken}`),c=b.uris[0],d&&a.customData.assetId&&(c+="?assetId\x3d"+encodeURI(`${a.customData.assetId}`),a.customData.variantId&&(c+="\x26variantId\x3d"+encodeURI(`${a.customData.variantId}`)),b.uris[0]=
99
- c)):Xj.warn(Oa)};_.Zj=function(a,b){try{const c=_.H(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Xj.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){Xj.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
100
- _.bk=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Yj(a,b,c,!1);b.headers[ra]=$b;c={spc:_.dj(b.body)};if((a=a.drm)&&a.env.startsWith(va)&&d){a={};var e=th((new _.Kj(ak(d))).f);d=e.keyId;if(e=e.assetId)Xj.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Xj.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Xj.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Xj.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
101
- _.Og(_.sh(c,!0))};_.ck=function(a,b){Xj.debug("Clearing response data");200===b.status&&(a=_.Ig(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.fj(a).buffer)};
102
- _.dk=function(a,b,c){b=Jj(b);c=c&&c.customData?c.customData:{};b=new _.Kj(ak(b));const d=th(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.Tg(`${a}`)&&(d.assetId=a,Xj.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.Tg(`${e}`)&&(d.variantId=e,Xj.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Xj.debug("KeyId found in FPS SKD. Removing other parameters")):
103
- a=["assetId","variantId"];b.f=_.sh(d,!1,a);"/"!==b.path||b.h.includes(`${b.a}/`)||(b.path="");b=_.rh(b);return c.fpsContentId=b};_.ek=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ua))Xj.warn(Oa);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(va)){const c=new _.eg(b.uris[0]);let d=c.ta;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.ta=d;b.uris[0]=c.toString()}};fk=function(a,b,c){_.Yj(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.eg(b.uris[0]);c.a.add(_.Pd,a);b.uris[0]=c.toString()};
104
- Sj=function(a){if(a===gk)return"https://lic.drmtoday.com";if(a===hk)return"https://lic.staging.drmtoday.com";if(a===ik)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};ak=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};kk=function(a){const b={},c=a?a[Ze]:void 0;a=jk[a?a[Ze]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
105
- mk=function(a,b=0){_.Hf("Registering EME Factory: "+a.a());a={priority:b,Bb:a};for(let c=0;c<lk.length;++c)if(lk[c].priority<b){lk.splice(c,0,a);return}lk.push(a)};nk=function(a){if(a){const {Bb:b}=lk.find(({Bb:c})=>c.a()===a);if(b&&b.aa())return _.Hf(wb+b.a()),b.create();_.Hf("Cannot create selected EME manager. Choosing by priority list.")}for(const {Bb:b}of lk)if(b.aa())return _.Hf(wb+b.a()),b.create();throw Error("Missing EME managers");};
101
+ c)):Xj.warn(Oa)};_.Zj=function(a,b){try{const c=_.I(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Xj.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){Xj.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
102
+ _.bk=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Yj(a,b,c,!1);b.headers[ra]=ac;c={spc:_.Tg(b.body)};if((a=a.drm)&&a.env.startsWith(va)&&d){a={};var e=Ch((new _.Kj(ak(d))).f);d=e.keyId;if(e=e.assetId)Xj.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Xj.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Xj.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Xj.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
103
+ _.Lg(_.Bh(c,!0))};_.ck=function(a,b){Xj.debug("Clearing response data");200===b.status&&(a=_.Fg(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.Xg(a).buffer)};
104
+ _.dk=function(a,b,c){b=Jj(b);c=c&&c.customData?c.customData:{};b=new _.Kj(ak(b));const d=Ch(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.Og(`${a}`)&&(d.assetId=a,Xj.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.Og(`${e}`)&&(d.variantId=e,Xj.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Xj.debug("KeyId found in FPS SKD. Removing other parameters")):
105
+ a=["assetId","variantId"];b.f=_.Bh(d,!1,a);"/"!==b.path||b.h.includes(`${b.a}/`)||(b.path="");b=_.Ah(b);return c.fpsContentId=b};_.ek=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ua))Xj.warn(Oa);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(va)){const c=new _.dg(b.uris[0]);let d=c.wa;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.wa=d;b.uris[0]=c.toString()}};fk=function(a,b,c){_.Yj(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.dg(b.uris[0]);c.a.add(_.Pd,a);b.uris[0]=c.toString()};
106
+ Sj=function(a){if(a===gk)return"https://lic.drmtoday.com";if(a===hk)return"https://lic.staging.drmtoday.com";if(a===ik)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};ak=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};kk=function(a){const b={},c=a?a[$e]:void 0;a=jk[a?a[$e]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
107
+ mk=function(a,b=0){_.Gf("Registering EME Factory: "+a.a());a={priority:b,Fb:a};for(let c=0;c<lk.length;++c)if(lk[c].priority<b){lk.splice(c,0,a);return}lk.push(a)};nk=function(a){if(a){const {Fb:b}=lk.find(({Fb:c})=>c.a()===a);if(b&&b.ba())return _.Gf(wb+b.a()),b.create();_.Gf("Cannot create selected EME manager. Choosing by priority list.")}for(const {Fb:b}of lk)if(b.ba())return _.Gf(wb+b.a()),b.create();throw Error("Missing EME managers");};
106
108
  _.pk=function(a,b){a=_.ok(a,b);return 1!=a.length?null:a[0]};_.ok=function(a,b){return Array.prototype.filter.call(a.childNodes,c=>c instanceof Element&&c.tagName==b)};_.qk=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};
107
- _.rk=function(a,b){const c=new DOMParser;let d=null,e=null;try{e=c.parseFromString(a,_.ue)}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d};_.uk=function(a){var b=_.gj(a);b=parseInt(b.byteLength,10).toString(16);b=_.gj("12"+b+a);return new sk(tk,a,b)};
108
- _.wk=function(a){const b=new _.vk(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.M(b);var c=_.M(b);c=_.Fj(c);var d=_.M(b);const e=d>>>24;d&=16777215;var f=_.Dj(b,16);f=_.hj(f);if(0<e){var g=_.M(b);b.skip(16*g)}g=_.M(b);const h=()=>{let t=_.yj(b),u=(t&127)>>>0,y=7;for(;128<=t&&28>=y;)t=_.yj(b),u=(u|(t&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:u},k=t=>{switch(t){case 0:do if(!_.wj(b))throw Error("not enough data to skip!");while(_.yj(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
109
- 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(;_.wj(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=Bj(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.If("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.dj(m):"","keyIds",l.map(t=>_.hj(t)));return 0<l.length?_.uk(_.hj(l[0])):null};
110
- _.xk=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=_.H(a);a.set(b,0);return a};
111
- _.Fk=function(a){a:{a=new _.vk(new DataView(a.buffer),!0);_.M(a);for(_.zj(a);_.wj(a);)if(1===_.zj(a)){var b=_.zj(a);a=_.Dj(a,b);break a}a=null}b=Kg(a,!0);var c=_.rk(b,"WRMHEADER");b=c.getAttribute("version");var d=_.pk(c,"DATA");c=(c=_.pk(d,"LA_URL"))?_.qk(c):"";var e;if(e=_.pk(d,"KID"))if(e=_.qk(e)){var f=_.pk(d,la);e={value:e,jd:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=yk(d))?[e]:(d=zk(d))?d:null;const {value:g="",jd:h}=d&&d[0]||{};d=_.fj(g);d=_.xk(d);d=_.hj(d);return new _.Ak(_.Ek,
112
- d,c,a,b,h)};yk=function(a){a=_.pk(a,"PROTECTINFO");if(!a)return null;var b=_.pk(a,"KID");if(!b)return null;a=b.getAttribute("VALUE");if(!a)return null;const c=b.getAttribute(la);b=b.getAttribute("ALGID");return{value:a,jd:c,We:b}};
113
- zk=function(a){a=_.pk(a,"PROTECTINFO");if(!a)return null;a=_.pk(a,"KIDS");if(!a)return null;var b=_.ok(a,"KID");if(!b.length)return null;a=[];for(const c of b)if(b=c.getAttribute("VALUE")){const d=c.getAttribute(la),e=c.getAttribute("ALGID");a.push({value:b,jd:d,We:e})}return a.length?a:null};Gk=function(a){return _.w(function*(){const b=new Promise(c=>{(new _.Th(c)).$(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.B("Timeout waiting for session close")})};
109
+ _.rk=function(a,b){const c=new DOMParser;let d=null,e=null;try{e=c.parseFromString(a,_.ue)}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d};_.uk=function(a){var b=_.Yg(a);b=parseInt(b.byteLength,10).toString(16);b=_.Yg("12"+b+a);return new sk(tk,a,b)};
110
+ _.wk=function(a){const b=new _.vk(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.N(b);var c=_.N(b);c=_.Ej(c);var d=_.N(b);const e=d>>>24;d&=16777215;var f=_.Cj(b,16);f=_.Zg(f);if(0<e){var g=_.N(b);b.skip(16*g)}g=_.N(b);const h=()=>{let t=_.xj(b),u=(t&127)>>>0,x=7;for(;128<=t&&28>=x;)t=_.xj(b),u=(u|(t&(28>x?127:15))<<x)>>>0,x+=7;return 28<x?-1:u},k=t=>{switch(t){case 0:do if(!_.vj(b))throw Error("not enough data to skip!");while(_.xj(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
111
+ 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(;_.vj(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=Aj(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.Hf("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Tg(m):"","keyIds",l.map(t=>_.Zg(t)));return 0<l.length?_.uk(_.Zg(l[0])):null};
112
+ _.xk=function(a){const b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);b.push(a[5]);b.push(a[4]);b.push(a[7]);b.push(a[6]);a=_.I(a);a.set(b,0);return a};
113
+ _.Ck=function(a){a:{a=new _.vk(new DataView(a.buffer),!0);_.N(a);for(_.yj(a);_.vj(a);)if(1===_.yj(a)){var b=_.yj(a);a=_.Cj(a,b);break a}a=null}b=Hg(a,!0);var c=_.rk(b,"WRMHEADER");b=c.getAttribute("version");var d=_.pk(c,"DATA");c=(c=_.pk(d,"LA_URL"))?_.qk(c):"";var e;if(e=_.pk(d,"KID"))if(e=_.qk(e)){var f=_.pk(d,ka);e={value:e,nd:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=yk(d))?[e]:(d=zk(d))?d:null;const {value:g="",nd:h}=d&&d[0]||{};d=_.Xg(g);d=_.xk(d);d=_.Zg(d);return new _.Ak(_.Bk,
114
+ d,c,a,b,h)};yk=function(a){a=_.pk(a,"PROTECTINFO");if(!a)return null;var b=_.pk(a,"KID");if(!b)return null;a=b.getAttribute("VALUE");if(!a)return null;const c=b.getAttribute(ka);b=b.getAttribute("ALGID");return{value:a,nd:c,ef:b}};
115
+ zk=function(a){a=_.pk(a,"PROTECTINFO");if(!a)return null;a=_.pk(a,"KIDS");if(!a)return null;var b=_.ok(a,"KID");if(!b.length)return null;a=[];for(const c of b)if(b=c.getAttribute("VALUE")){const d=c.getAttribute(ka),e=c.getAttribute("ALGID");a.push({value:b,nd:d,ef:e})}return a.length?a:null};Dk=function(a){return _.y(function*(){const b=new Promise(c=>{(new _.Zh(c)).$(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};
114
116
  _.Ik=function(a){return Hk(a)?_.Jc:a};Jk=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};
115
- Kk=function(a,b){if(a.keySystem){var c=_.Ik(a.keySystem);b=b[c];c===_.Md&&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=
116
- b.serverCertificate||null)))}};Lk=function(a,b){a=_.Lj(b);_.If("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
117
- Mk=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;_.nf(k)||(k=Lk);let l="";try{l=k(b,c,g)}catch(m){throw new _.G(_.F,6,6103);}if(!l.length)throw new _.G(_.F,6,6101,"Content ID is an empty string");c=Pj(c,l,a)}return c};Hk=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
118
- Nk=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.ij(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])}};
119
- Ok=function(a){var b=a.j;const c=a.V;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 _.G(_.F,6,6014));a.D.Kd(_.wf(c));a.o||a.a.info(ta);a.o=!0;a.B=!1};Pk=function(a){a.g.forEach((b,c)=>{const d=b.Fd;let e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Fd=e)})};
120
- Qk=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.W.stop();a.W=null;a.S.stop();a.S=null;const b=Array.from(a.g.keys());for(const c of a.g.values())c.gc&&c.gc.stop();a.g.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.w(function*(){a.a.debug("Closing session",c.sessionId);try{yield Gk(c)}catch(d){a.a.warn("Error while closing session",d)}}))));if(a.A){try{yield a.m.g(null)}catch(c){a.a.warn("Error while resetting media keys",
121
- c)}a.A=null}a.m=null;a.f=null;a.J.clear();a.G=null;a.I=[];a.h=null;a.T=null;a.D=null;a.N=0;a.L=null})};_.Uk=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=tf(a.h.La);Jk(b,d)}if(d=Rk(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)Kk(f,a.h.La);b=Sk(a,b);if(!b.size)return a.R=!0,Promise.resolve();a=_.Tk(a,b);return c?a:a.catch(()=>{})};
117
+ Kk=function(a,b){if(a.keySystem){var c=_.Ik(a.keySystem);b=b[c];c===_.Kd&&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=
118
+ b.serverCertificate||null)))}};Lk=function(a,b){a=_.Lj(b);_.Hf("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
119
+ Mk=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;_.of(k)||(k=Lk);let l="";try{l=k(b,c,g)}catch(m){throw new _.H(_.G,6,6103);}if(!l.length)throw new _.H(_.G,6,6101,"Content ID is an empty string");c=Pj(c,l,a)}return c};Hk=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
120
+ Nk=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.$g(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])}};
121
+ Ok=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(_.G,6,6014));a.D.Od(_.vf(c));a.o||a.a.info(ta);a.o=!0;a.B=!1};Pk=function(a){a.g.forEach((b,c)=>{const d=b.Kd;let e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Kd=e)})};
122
+ Qk=function(a){return _.y(function*(){a.w.release();a.w=null;a.K.release();a.K=null;a.o=!1;a.B=!1;a.F.reject();a.X.stop();a.X=null;a.S.stop();a.S=null;const b=Array.from(a.g.keys());for(const c of a.g.values())c.ic&&c.ic.stop();a.g.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.y(function*(){a.a.debug("Closing session",c.sessionId);try{yield Dk(c)}catch(d){a.a.warn("Error while closing session",d)}}))));if(a.A){try{yield a.m.g(null)}catch(c){a.a.warn("Error while resetting media keys",
123
+ c)}a.A=null}a.m=null;a.f=null;a.J.clear();a.G=null;a.I=[];a.h=null;a.T=null;a.D=null;a.O=0;a.M=null})};_.Uk=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=uf(a.h.Na);Jk(b,d)}if(d=Rk(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)Kk(f,a.h.Na);b=Sk(a,b);if(!b.size)return a.R=!0,Promise.resolve();a=_.Tk(a,b);return c?a:a.catch(()=>{})};
122
124
  _.Wk=function(a,b,c){a.H=Vk;a.I=c;a.C=0<c.length;a.a.debug("Using Persisted Licenses: "+a.C);a.h&&a.h.enableSessionCacheForSkd&&a.a.info("Enabled session cache for SKD license requests");return _.Uk(a,b)};
123
- _.Tk=function(a,b){if(1==b.size&&b.has(""))return Promise.reject(new _.G(_.F,6,6E3));null===a.m&&(a.m=nk(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 _.Xk;const e=k=>{for(const l of k.audioCapabilities)delete l.robustness;for(const l of k.videoCapabilities)delete l.robustness},f=(k,l,m)=>{l.drmInfos.some(n=>!!n.licenseServerUri)==k&&(d=d.catch(()=>{if(a.ma)return null;if(m===_.Jc){const n=
124
- a.D.getConfiguration();if(!_.Vh()||n.streaming.patchEdgeWhenMixedContent||a.h.La[m].useLegacySystem)e(l);else return a.m.a("com.microsoft.playready.recommendation",[l]).catch(()=>{e(l);return a.m.a(m,[l])})}return a.m.a(m,[l])}))};let g=a.h.preferredDrmSystem;if(!g){var h=_.wi();if(h.os===ri&&10<=h.osVersion.major&&"edge"===h.browser)g=_.Jc;else if("safari"===h.browser)g=_.Ic;else if(h.browser===xc||"firefox"===h.browser)g=_.Kc}g&&(h=b.get(g))&&(f(!0,h,g),f(!1,h,g));for(const k of[!0,!1])b.forEach((l,
125
- m)=>{m!==g&&f(k,l,m)});d=d.catch(k=>{throw new _.G(_.F,6,6001,null,k);});d=d.then(k=>{if(a.ma)return null;a.J.clear();var l=k.getConfiguration();a.a.debug("Got MediaKeySystemAccess with configuration",l);var m=l.audioCapabilities||[];l=l.videoCapabilities||[];for(var n of m)a.J.add(n.contentType);for(var q of l)a.J.add(q.contentType);{m=k.keySystem;n=b.get(_.Ik(k.keySystem));q=[];l=[];const t=[],u=[];Nk(n.drmInfos,q,l,t,u);1<l.length&&_.B("Multiple unique server certificates found! Only the first will be used.");
126
- 1<q.length&&_.B("Multiple unique license server URIs found! Only the first will be used.");m={keySystem:m,licenseServerUri:q[0],distinctiveIdentifierRequired:n.distinctiveIdentifier==_.be,persistentStateRequired:n.persistentState==_.be,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:"",serverCertificate:l[0],initData:t,keyIds:u,periodId:null}}a.f=m;if(!a.f.licenseServerUri)throw new _.G(_.F,6,6012,a.f.keySystem);
127
- return k.createMediaKeys()}).then(k=>{a.ma||(a.a.info("Created MediaKeys for key system",a.f.keySystem),a.G=k,a.R=!0)}).catch(k=>{if(!a.ma){a.f=null;a.J.clear();if(k instanceof _.G)throw k;throw new _.G(_.F,6,6002,{browserError:k.message});}});c.reject();return d};
128
- Rk=function(a){a=tf(a.h.La[_.Md]||{});if(0==a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.gj(f);e=_.gj(e);e={kty:"oct",kid:_.ej(f,!1),k:_.ej(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Mg(d),initDataType:"keyids"}];return{keySystem:_.Md,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
125
+ _.Tk=function(a,b){if(1==b.size&&b.has(""))return Promise.reject(new _.H(_.G,6,6E3));null===a.m&&(a.m=nk(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 _.Xk;const e=k=>{for(const l of k.audioCapabilities)delete l.robustness;for(const l of k.videoCapabilities)delete l.robustness},f=(k,l,m)=>{l.drmInfos.some(n=>!!n.licenseServerUri)==k&&(d=d.catch(()=>{if(a.pa)return null;if(m===_.Jc){const n=
126
+ a.D.getConfiguration();if(!_.ai()||n.streaming.patchEdgeWhenMixedContent||a.h.Na[m].useLegacySystem)e(l);else return a.m.a("com.microsoft.playready.recommendation",[l]).catch(()=>{e(l);return a.m.a(m,[l])})}return a.m.a(m,[l])}))};let g=a.h.preferredDrmSystem;if(!g){var h=_.Ci();if(h.os===xi&&10<=h.osVersion.major&&"edge"===h.browser)g=_.Jc;else if("safari"===h.browser)g=_.Ic;else if(h.browser===xc||"firefox"===h.browser)g=_.Kc}g&&(h=b.get(g))&&(f(!0,h,g),f(!1,h,g));for(const k of[!0,!1])b.forEach((l,
127
+ m)=>{m!==g&&f(k,l,m)});d=d.catch(k=>{throw new _.H(_.G,6,6001,null,k);});d=d.then(k=>{if(a.pa)return null;a.J.clear();var l=k.getConfiguration();a.a.debug("Got MediaKeySystemAccess with configuration",l);var m=l.audioCapabilities||[];l=l.videoCapabilities||[];for(var n of m)a.J.add(n.contentType);for(var q of l)a.J.add(q.contentType);{m=k.keySystem;n=b.get(_.Ik(k.keySystem));q=[];l=[];const t=[],u=[];Nk(n.drmInfos,q,l,t,u);1<l.length&&_.C("Multiple unique server certificates found! Only the first will be used.");
128
+ 1<q.length&&_.C("Multiple unique license server URIs found! Only the first will be used.");m={keySystem:m,licenseServerUri:q[0],distinctiveIdentifierRequired:n.distinctiveIdentifier==_.be,persistentStateRequired:n.persistentState==_.be,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:"",serverCertificate:l[0],initData:t,keyIds:u,periodId:null}}a.f=m;if(!a.f.licenseServerUri)throw new _.H(_.G,6,6012,a.f.keySystem);
129
+ return k.createMediaKeys()}).then(k=>{a.pa||(a.a.info("Created MediaKeys for key system",a.f.keySystem),a.G=k,a.R=!0)}).catch(k=>{if(!a.pa){a.f=null;a.J.clear();if(k instanceof _.H)throw k;throw new _.H(_.G,6,6002,{browserError:k.message});}});c.reject();return d};
130
+ Rk=function(a){a=uf(a.h.Na[_.Kd]||{});if(0==a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Yg(f);e=_.Yg(e);e={kty:"oct",kid:_.Wg(f,!1),k:_.Wg(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Jg(d),initDataType:"keyids"}];return{keySystem:_.Kd,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
129
131
  keyIds:[],periodId:null}};
130
- Sk=function(a,b){var c=new Set;for(var d of b)for(var e of d.drmInfos)c.add(e);for(const f of c)Kk(f,a.h.La);d=a.C?_.be:_.Jd;e=a.C?[_.Qd]:[se];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.tc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Jd,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Ph(b.mimeType,b.codecs):"",h=c?_.Ph(c.mimeType,c.codecs):"";for(const k of f.drmInfos){const l=a.get(k.keySystem);
131
- l.drmInfos.push(k);k.initData&&k.initData.length&&(l.initDataTypes=[...new Set(k.initData.map(m=>m.initDataType))]);k.distinctiveIdentifierRequired&&(l.distinctiveIdentifier=_.be);k.persistentStateRequired&&(l.persistentState=_.be);b&&_.$f(k.audioRobustness).forEach(m=>{l.audioCapabilities.push({robustness:m||"",contentType:g})});c&&_.$f(k.videoRobustness).forEach(m=>{l.videoCapabilities.push({robustness:m||"",contentType:h})})}}return a};
132
- Yk=function(a){return _.w(function*(){if(!a.m.m())if(a.L)yield a.L;else try{a.L=a.m.g(a.G),yield a.L}catch(b){a.ma||a.T(new _.G(_.F,6,6003,b.message,b))}})};
132
+ Sk=function(a,b){var c=new Set;for(var d of b)for(var e of d.drmInfos)c.add(e);for(const f of c)Kk(f,a.h.Na);d=a.C?_.be:_.Id;e=a.C?[_.Qd]:[se];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.tc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Id,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Vh(b.mimeType,b.codecs):"",h=c?_.Vh(c.mimeType,c.codecs):"";for(const k of f.drmInfos){const l=a.get(k.keySystem);
133
+ l.drmInfos.push(k);k.initData&&k.initData.length&&(l.initDataTypes=[...new Set(k.initData.map(m=>m.initDataType))]);k.distinctiveIdentifierRequired&&(l.distinctiveIdentifier=_.be);k.persistentStateRequired&&(l.persistentState=_.be);b&&_.Zf(k.audioRobustness).forEach(m=>{l.audioCapabilities.push({robustness:m||"",contentType:g})});c&&_.Zf(k.videoRobustness).forEach(m=>{l.videoCapabilities.push({robustness:m||"",contentType:h})})}}return a};
134
+ Yk=function(a){return _.y(function*(){if(!a.m.m())if(a.M)yield a.M;else try{a.M=a.m.g(a.G),yield a.M}catch(b){a.pa||a.T(new _.H(_.G,6,6003,b.message,b))}})};
133
135
  _.bl=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.H!==Vk)){var e=a.keySystem();if(!e.startsWith(_.Ic)){const f=new Zk(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||
134
- _.Xh(2)||a.keySystem().startsWith(_.Ic)||!_.$k(a,d,c,!0))&&al(a,d,null,b,c)}};dl=function(a,b){return _.w(function*(){a.a.info(`Handle encrypted event for type ${b.initDataType}`);yield Yk(a);b.initData&&_.bl(a,b.initDataType,_.H(b.initData))})};fl=function(a){return _.w(function*(){const b=a.U.map(c=>el(a,c));a.ba=!0;a.U=[];yield Promise.all(b)})};
135
- hl=function(a){const b=a.keySystem(),c=a.h.La[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return gl(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.bh([d],a.h.attemptParameters);f.type=3;f.licenseRequestType=vc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.a.debug("Fetching certificate");return a.D.ub.fetch(f).P}).then(f=>{a.f.serverCertificate=_.H(f.data)}).catch(f=>{var g=
136
- 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}:{},kk(g));throw new _.G(_.F,6,6100,g,f);})};
137
- _.il=function(a){return _.w(function*(){if(a.G&&a.f&&a.f.serverCertificate&&a.f.serverCertificate.length)try{const b=yield a.G.setServerCertificate(a.f.serverCertificate);void 0===b||b||a.a.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.G(_.F,6,6004,{browserError:b.message});}})};
138
- _.ll=function(a){const b=a.f?a.f.initData||[]:[];for(const c of b){let d=!_.Xh(2);if(a.h.enforceSingleSession&&!a.keySystem().startsWith(_.Ic)){const e=a.g.values();for(const f of e)_.ij(c.initData,f.initData)?(a.a.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.a.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),jl(c.initData,f)||(f.Oc.push(c.initData),c.keyId&&!f.Za.includes(c.keyId)&&
139
- f.Za.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,le)),d=!1)}!d||a.C&&a.H===Vk||(_.$k(a,c.keyId,c.initData)&&(d=!1),d&&(a.a.info("Request new media key session on create"),al(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.I)_.kl(a,c);b.length||a.I.length||(a.o||a.a.info(ta),a.o=!0,a.B=!1,a.F.resolve());return a.F};
140
- _.ml=function(a,b){if(!a.G)return _.Pf(a.w,b,[Xc,"msneedkey",Ve,"needkey"],()=>{a.T(new _.G(_.F,6,6010))}),Promise.resolve();a.A=b;a.m.j(b);a.w.one(a.A,_.Sd,()=>fl(a));a.w.on(a.A,_.Qe,e=>{const f=a.B;a.B=!a.o;!f&&a.B&&(a.a.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.f.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.m.f()!==cb||a.I.length)d=Yk(a);c=Promise.resolve();_.$h()&&38===ai().major||(a.f&&a.f.keySystem!==_.Md&&!a.f.serverCertificate&&(c=hl(a)),
141
- c=c.then(()=>_.il(a)));return Promise.all([d,c]).then(()=>{a.ma||(_.ll(a),a.w.on(a.A,Xc,e=>dl(a,e)))}).catch(e=>{if(!a.ma){if(6004===e.code&&a.f&&a.f.keySystem===_.Kc&&1>a.N&&a.f.serverCertificate&&a.f.serverCertificate.length)return a.a.warn("Detected invalid widevine server certificate!. Retrying"),a.T(new _.G(1,6,6004)),a.f.serverCertificate=null,a.N++,_.ml(a,b);1<=a.N&&a.a.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
142
- gl=function(a,b){return _.w(function*(){const c=a.D.nc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
143
- _.kl=function(a,b){let c;try{a.a.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Qd)}catch(e){const f=new _.G(_.F,6,6005,{browserError:e.message});a.T(f);return Promise.reject(f)}a.w.on(c,sd,a.ja.bind(a));a.w.on(c,hd,a.ea.bind(a));const d={initData:null,loaded:!1,Fd:Infinity,jb:null,xa:new _.Xk,periodId:null,Oc:[],keyId:null,Za:[],initDataType:null,Rb:null,sessionContext:{ldlDelay:0,customData:{}}};d.xa.catch(()=>{});a.g.set(c,d);return c.load(b).then(e=>{if(a.ma)return null;
144
- a.a.debug("Loaded offline session",b,e);if(!e)return a.g.delete(c),a.T(new _.G(_.F,6,6013)),null;d.loaded=!0;nl(a)&&(a.o||a.a.info(ta),a.o=!0,a.B=!1,a.F.resolve());return c},e=>{a.ma||(a.g.delete(c),a.T(new _.G(_.F,6,6005,{browserError:e.message})))})};jl=function(a,b){if(!a)return!1;for(let c=0;c<b.Oc.length;c++)if(_.ij(a,b.Oc[c]))return!0;return!1};
145
- _.$k=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.g.keys()){const f=a.g.get(e);if(_.ij(c,f.initData))return b?f.Za.includes(b)?d&&a.a.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.Za.push(b),a.j.get(b)||a.j.set(b,le),d&&a.a.info(jb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.a.info(jb+`Session: '${e.sessionId}'`),!0;if(jl(c,f))return d&&a.a.info("Skipping Session creation. License for init data was already requested [extra]"),
136
+ _.ci(2)||a.keySystem().startsWith(_.Ic)||!_.$k(a,d,c,!0))&&al(a,d,null,b,c)}};dl=function(a,b){return _.y(function*(){a.a.info(`Handle encrypted event for type ${b.initDataType}`);yield Yk(a);b.initData&&_.bl(a,b.initDataType,_.I(b.initData))})};fl=function(a){return _.y(function*(){const b=a.U.map(c=>el(a,c));a.da=!0;a.U=[];yield Promise.all(b)})};
137
+ hl=function(a){const b=a.keySystem(),c=a.h.Na[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return gl(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.kh([d],a.h.attemptParameters);f.type=3;f.licenseRequestType=vc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.a.debug("Fetching certificate");return a.D.wb.fetch(f).P}).then(f=>{a.f.serverCertificate=_.I(f.data)}).catch(f=>{var g=
138
+ 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}:{},kk(g));throw new _.H(_.G,6,6100,g,f);})};
139
+ _.il=function(a){return _.y(function*(){if(a.G&&a.f&&a.f.serverCertificate&&a.f.serverCertificate.length)try{const b=yield a.G.setServerCertificate(a.f.serverCertificate);void 0===b||b||a.a.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.H(_.G,6,6004,{browserError:b.message});}})};
140
+ _.ll=function(a){const b=a.f?a.f.initData||[]:[];for(const c of b){let d=!_.ci(2);if(a.h.enforceSingleSession&&!a.keySystem().startsWith(_.Ic)){const e=a.g.values();for(const f of e)_.$g(c.initData,f.initData)?(a.a.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.a.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),jl(c.initData,f)||(f.Vc.push(c.initData),c.keyId&&!f.$a.includes(c.keyId)&&
141
+ f.$a.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,le)),d=!1)}!d||a.C&&a.H===Vk||(_.$k(a,c.keyId,c.initData)&&(d=!1),d&&(a.a.info("Request new media key session on create"),al(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.I)_.kl(a,c);b.length||a.I.length||(a.o||a.a.info(ta),a.o=!0,a.B=!1,a.F.resolve());return a.F};
142
+ _.ml=function(a,b){if(!a.G)return _.Of(a.w,b,[Xc,"msneedkey",We,"needkey"],()=>{a.T(new _.H(_.G,6,6010))}),Promise.resolve();a.A=b;a.m.j(b);a.w.one(a.A,_.Sd,()=>fl(a));a.w.on(a.A,_.Re,e=>{const f=a.B;a.B=!a.o;!f&&a.B&&(a.a.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.f.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.m.f()!==db||a.I.length)d=Yk(a);c=Promise.resolve();_.fi()&&38===gi().major||(a.f&&a.f.keySystem!==_.Kd&&!a.f.serverCertificate&&(c=hl(a)),
143
+ c=c.then(()=>_.il(a)));return Promise.all([d,c]).then(()=>{a.pa||(_.ll(a),a.w.on(a.A,Xc,e=>dl(a,e)))}).catch(e=>{if(!a.pa){if(6004===e.code&&a.f&&a.f.keySystem===_.Kc&&1>a.O&&a.f.serverCertificate&&a.f.serverCertificate.length)return a.a.warn("Detected invalid widevine server certificate!. Retrying"),a.T(new _.H(1,6,6004)),a.f.serverCertificate=null,a.O++,_.ml(a,b);1<=a.O&&a.a.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
144
+ gl=function(a,b){return _.y(function*(){const c=a.D.rc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
145
+ _.kl=function(a,b){let c;try{a.a.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Qd)}catch(e){const f=new _.H(_.G,6,6005,{browserError:e.message});a.T(f);return Promise.reject(f)}a.w.on(c,sd,a.ma.bind(a));a.w.on(c,gd,a.ga.bind(a));const d={initData:null,loaded:!1,Kd:Infinity,kb:null,Aa:new _.Xk,periodId:null,Vc:[],keyId:null,$a:[],initDataType:null,Tb:null,sessionContext:{ldlDelay:0,customData:{}}};d.Aa.catch(()=>{});a.g.set(c,d);return c.load(b).then(e=>{if(a.pa)return null;
146
+ a.a.debug("Loaded offline session",b,e);if(!e)return a.g.delete(c),a.T(new _.H(_.G,6,6013)),null;d.loaded=!0;nl(a)&&(a.o||a.a.info(ta),a.o=!0,a.B=!1,a.F.resolve());return c},e=>{a.pa||(a.g.delete(c),a.T(new _.H(_.G,6,6005,{browserError:e.message})))})};jl=function(a,b){if(!a)return!1;for(let c=0;c<b.Vc.length;c++)if(_.$g(a,b.Vc[c]))return!0;return!1};
147
+ _.$k=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.g.keys()){const f=a.g.get(e);if(_.$g(c,f.initData))return b?f.$a.includes(b)?d&&a.a.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.$a.push(b),a.j.get(b)||a.j.set(b,le),d&&a.a.info(ib+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.a.info(ib+`Session: '${e.sessionId}'`),!0;if(jl(c,f))return d&&a.a.info("Skipping Session creation. License for init data was already requested [extra]"),
146
148
  !0}return!1};
147
- al=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||ol(a,d,e,f);if(!g&&pl(a,h,d,e)){var k=!0;if("skd"===d&&!a.h.enableSessionCacheForSkd)for(var l of a.g.keys()){var m=a.g.get(l);if(h&&m.keyId===h){a.a.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(t){a.a.warn("Unable to close session",t)}k=!1}}if(k){a.a.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.C?_.Qd:se;var q=a.G.createSession(n);a.a.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(t){a.T(new _.G(_.F,
148
- 6,6005,{browserError:t.message}));return}a.w.on(q,sd,a.ja.bind(a));a.w.on(q,hd,a.ea.bind(a));k={Rb:f,Oc:[],initData:e,initDataType:d,keyId:h,Za:h?[h]:[],loaded:!1,Fd:Infinity,periodId:c,jb:null,xa:new _.Xk,sessionContext:{ldlDelay:0,customData:{}}};k.xa.catch(()=>{});f&&(l=a.g.get(f),k.sessionContext=l.sessionContext);a.g.set(q,k);h&&!a.j.get(h)&&a.j.set(h,le);if(e)for(l=0;l<a.f.initData.length;l++)m=a.f.initData[l],m.keyId&&!k.Za.includes(m.keyId)&&_.ij(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),
149
- k.Za.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,le));l=a.D.getConfiguration();m=a.keySystem();m=a.h.La[m];n=(n=m.modifiers)&&n.transformInitData;_.nf(n)||(n=Mk);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.f,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.m.f()})}catch(t){h=t;t instanceof _.G||(h=new _.G(_.F,6,6016,t));k.xa&&k.xa.reject(t);a.T(h);return}a.a.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(t=>{if(!a.ma){var u=null;
150
- t.errorCode&&t.errorCode.systemCode&&(u=t.errorCode.systemCode,0>u&&(u+=Math.pow(2,32)),u="0x"+u.toString(16));a.T(new _.G(_.F,6,6006,{browserError:t.message,error:t,extended:u},t))}})}})};ql=function(a){let b=Infinity;a=a.g.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};nl=function(a){a=a.g.values();return _.sg(a,b=>b.loaded)};
149
+ al=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.y(function*(){if(e.length){var h=b||ol(a,d,e,f);if(!g&&pl(a,h,d,e)){var k=!0;if("skd"===d&&!a.h.enableSessionCacheForSkd)for(var l of a.g.keys()){var m=a.g.get(l);if(h&&m.keyId===h){a.a.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(t){a.a.warn("Unable to close session",t)}k=!1}}if(k){a.a.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.C?_.Qd:se;var q=a.G.createSession(n);a.a.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(t){a.T(new _.H(_.G,
150
+ 6,6005,{browserError:t.message}));return}a.w.on(q,sd,a.ma.bind(a));a.w.on(q,gd,a.ga.bind(a));k={Tb:f,Vc:[],initData:e,initDataType:d,keyId:h,$a:h?[h]:[],loaded:!1,Kd:Infinity,periodId:c,kb:null,Aa:new _.Xk,sessionContext:{ldlDelay:0,customData:{}}};k.Aa.catch(()=>{});f&&(l=a.g.get(f),k.sessionContext=l.sessionContext);a.g.set(q,k);h&&!a.j.get(h)&&a.j.set(h,le);if(e)for(l=0;l<a.f.initData.length;l++)m=a.f.initData[l],m.keyId&&!k.$a.includes(m.keyId)&&_.$g(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),
151
+ k.$a.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,le));l=a.D.getConfiguration();m=a.keySystem();m=a.h.Na[m];n=(n=m.modifiers)&&n.transformInitData;_.of(n)||(n=Mk);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.f,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.m.f()})}catch(t){h=t;t instanceof _.H||(h=new _.H(_.G,6,6016,t));k.Aa&&k.Aa.reject(t);a.T(h);return}a.a.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(t=>{if(!a.pa){var u=null;
152
+ t.errorCode&&t.errorCode.systemCode&&(u=t.errorCode.systemCode,0>u&&(u+=Math.pow(2,32)),u="0x"+u.toString(16));a.T(new _.H(_.G,6,6006,{browserError:t.message,error:t,extended:u},t))}})}})};ql=function(a){let b=Infinity;a=a.g.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};nl=function(a){a=a.g.values();return _.ug(a,b=>b.loaded)};
151
153
  pl=function(a,b,c,d){if(!b&&c!==_.he)return!1;d=b||Nj(d);for(const e of a.g.values())if(b&&e.keyId===b||c===_.he&&(e.keyId||Nj(e.initData))===d)return!0;return!1};
152
- ol=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{b=d;b=void 0===b?null:b;d=a.keySystem();var e=a.h.La[d];d=a.D.getConfiguration();e=e&&e.modifiers&&e.modifiers.extractContentId;_.nf(e)||(e=Lk);try{var f={ldlDelay:0,customData:{}};b&&(f=a.g.get(b).sessionContext);const h=e(d,c,f);a.a.debug(`Extracted Content ID '${h}' from SKD`);var g=h;break a}catch(h){a.a.warn("Unable to extract Content ID from SKD",h)}g=""}return g}if(b===_.he)return Nj(c)||"";if(b===_.tc)try{e=a.keySystem();if(Hk(e))return _.Fk(c).a;
154
+ ol=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{b=d;b=void 0===b?null:b;d=a.keySystem();var e=a.h.Na[d];d=a.D.getConfiguration();e=e&&e.modifiers&&e.modifiers.extractContentId;_.of(e)||(e=Lk);try{var f={ldlDelay:0,customData:{}};b&&(f=a.g.get(b).sessionContext);const h=e(d,c,f);a.a.debug(`Extracted Content ID '${h}' from SKD`);var g=h;break a}catch(h){a.a.warn("Unable to extract Content ID from SKD",h)}g=""}return g}if(b===_.he)return Nj(c)||"";if(b===_.tc)try{e=a.keySystem();if(Hk(e))return _.Ck(c).a;
153
155
  if(e.match(/^com\.widevine\.alpha/)&&(f=_.wk(c)))return f.a}catch(h){a.a.warn("Unable to extract Key ID from PSSH data",h)}return""};
154
- el=function(a,b){const c=b.target,d=a.g.get(c);var e=a.keySystem();let f=!1;e.match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength?(f=!0,a.a.info("WV Server certificate request for "+`SID:'${c.sessionId} `+`from msg '${b.messageType}'`)):a.a.info("License request for "+`SID:'${c.sessionId}'/KID:'${d.keyId}' `+`from msg '${b.messageType}'`);let g=a.f.licenseServerUri;e=a.h.La[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
155
- const h=_.bh([g],a.h.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===kd&&d.Rb?jd:f?vc:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===jd)a.D.onEvent(new _.C(Sc));Hk(a.f.keySystem)&&rl(a,h);lj(a.K,h);const k=Date.now();return sl(a,h,d.sessionContext).then(()=>{a.a.debug("Sending DRM license request to",g,h);return a.D.ub.fetch(h).P}).then(l=>{if(a.ma)return Promise.reject();const m=Date.now()-k;var n=tl(a,l);let q="";n&&(q=` RID:${n}`);
156
- n=l&&l.data?l.data.byteLength:-1;f?a.a.info("WV Server certificate response for "+`SID:'${c.sessionId}' `+`${n} bytes `+`in ${m}ms${q}`):a.a.info("License response for "+`SID:'${c.sessionId}'/`+`KID:'${d.keyId}' `+`${n} bytes `+`in ${m}ms${q}`);const t=mj(a.K,l);return c.update(l.data).then(()=>{if(!f){var u=ql(a),y=t?Date.now()+1E3*t.delay:Number.NaN;u=new _.C(_.Uc,{keySystem:a.keySystem(),expirationTime:u,expectedRenewalTime:y});a.D.onEvent(u);d&&(d.jb&&d.jb.resolve(),d.Rb&&(u=d.Rb,a.a.info(`Closing expired session '${u.sessionId}'`),
157
- Gk(u).catch(()=>{a.a.warn("Unable to close expired session in time")}),(u=a.g.get(d.Rb))&&u.gc&&u.gc.stop(),a.g.delete(d.Rb),d.Rb=null),(new _.Th(()=>{a.ma||(d.loaded=!0,d.xa&&d.xa.resolve(),nl(a)&&(a.o||a.a.info(ta),a.o=!0,a.B=!1,a.F.resolve()))})).$(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||t&&kj(a.keySystem()))&&(u=new _.Th(()=>{!a.ma&&a.K&&(a.a.info("Updating CSL Sessions"),Hk(a.keySystem())?al(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.Ic)&&c.update(_.Mg("renew")))}),
158
- d.gc=u,u.$(t?t.delay:d.sessionContext.ldlDelay)))}})},l=>_.w(function*(){if(!a.ma){var m=l.data.headers;m=Object.assign({message:_.za,url:l.data.url,status:l.data.status,response:l.data.response},m?{headers:m}:{},kk(m));m=new _.G(_.F,6,6007,m,l);a.T(m);d&&d.jb&&d.jb.reject(m);d&&d.xa&&d.xa.reject(m)}})).catch(l=>{a.ma||(l===fb?a.a.info("Ignore update for closed sessions"):(l=new _.G(_.F,6,6008,{browserError:l.message}),a.T(l),d&&d.jb&&d.jb.reject(l),d&&d.xa&&d.xa.reject(l)))})};
159
- rl=function(a,b){var c=Kg(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.a.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(_.Fe).textContent;b.body=_.fj(a.querySelector("Challenge").textContent).buffer}else a.a.debug("PlayReady request is already unwrapped."),b.headers[ra]="text/xml; charset\x3dutf-8"};
160
- sl=function(a,b,c){return _.w(function*(){const d=a.D.getConfiguration();yield gl(a,d);const e=a.keySystem();var f=a.h.La[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.Ic)&&b.requestModifiers.push(k=>_.Qj(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.Ic)&&b.responseModifiers.push(k=>_.Rj(k))})};
161
- tl=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.Ig(_.fj(b))).ti}catch(c){a.a.warn("Unable to parse DRMtoday Request ID",c)}return""};_.wl=function(a,b){a&&b&&(ul.set(a,b),vl.info(`Registered TextDisplayerFactory: '${a}'`))};_.xl=function(a,b){b=b.find(c=>(c=ul.get(c))?c.aa(a):!1);if(null==b)return vl.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;vl.info(`Chosen the text displayer: ${b}`);return ul.get(b)};
156
+ el=function(a,b){const c=b.target,d=a.g.get(c);var e=a.keySystem();let f=!1;e.match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength?(f=!0,a.a.info("WV Server certificate request for "+`SID:'${c.sessionId} `+`from msg '${b.messageType}'`)):a.a.info("License request for "+`SID:'${c.sessionId}'/KID:'${d.keyId}' `+`from msg '${b.messageType}'`);let g=a.f.licenseServerUri;e=a.h.Na[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
157
+ const h=_.kh([g],a.h.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===kd&&d.Tb?jd:f?vc:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===jd)a.D.onEvent(new _.F(Sc));Hk(a.f.keySystem)&&rl(a,h);kj(a.K,h);const k=Date.now();return sl(a,h,d.sessionContext).then(()=>{a.a.debug("Sending DRM license request to",g,h);return a.D.wb.fetch(h).P}).then(l=>{if(a.pa)return Promise.reject();const m=Date.now()-k;var n=tl(a,l);let q="";n&&(q=` RID:${n}`);
158
+ n=l&&l.data?l.data.byteLength:-1;f?a.a.info("WV Server certificate response for "+`SID:'${c.sessionId}' `+`${n} bytes `+`in ${m}ms${q}`):a.a.info("License response for "+`SID:'${c.sessionId}'/`+`KID:'${d.keyId}' `+`${n} bytes `+`in ${m}ms${q}`);const t=lj(a.K,l);return c.update(l.data).then(()=>{if(!f){var u=ql(a),x=t?Date.now()+1E3*t.delay:Number.NaN;u=new _.F(_.Uc,{keySystem:a.keySystem(),expirationTime:u,expectedRenewalTime:x});a.D.onEvent(u);d&&(d.kb&&d.kb.resolve(),d.Tb&&(u=d.Tb,a.a.info(`Closing expired session '${u.sessionId}'`),
159
+ Dk(u).catch(()=>{a.a.warn("Unable to close expired session in time")}),(u=a.g.get(d.Tb))&&u.ic&&u.ic.stop(),a.g.delete(d.Tb),d.Tb=null),(new _.Zh(()=>{a.pa||(d.loaded=!0,d.Aa&&d.Aa.resolve(),nl(a)&&(a.o||a.a.info(ta),a.o=!0,a.B=!1,a.F.resolve()))})).$(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||t&&jj(a.keySystem()))&&(u=new _.Zh(()=>{!a.pa&&a.K&&(a.a.info("Updating CSL Sessions"),Hk(a.keySystem())?al(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.Ic)&&c.update(_.Jg("renew")))}),
160
+ d.ic=u,u.$(t?t.delay:d.sessionContext.ldlDelay)))}})},l=>_.y(function*(){if(!a.pa){var m=l.data.headers;m=Object.assign({message:_.za,url:l.data.url,status:l.data.status,response:l.data.response},m?{headers:m}:{},kk(m));m=new _.H(_.G,6,6007,m,l);a.T(m);d&&d.kb&&d.kb.reject(m);d&&d.Aa&&d.Aa.reject(m)}})).catch(l=>{a.pa||(l===gb?a.a.info("Ignore update for closed sessions"):(l=new _.H(_.G,6,6008,{browserError:l.message}),a.T(l),d&&d.kb&&d.kb.reject(l),d&&d.Aa&&d.Aa.reject(l)))})};
161
+ rl=function(a,b){var c=Hg(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.a.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(_.Ee).textContent;b.body=_.Xg(a.querySelector("Challenge").textContent).buffer}else a.a.debug("PlayReady request is already unwrapped."),b.headers[ra]="text/xml; charset\x3dutf-8"};
162
+ sl=function(a,b,c){return _.y(function*(){const d=a.D.getConfiguration();yield gl(a,d);const e=a.keySystem();var f=a.h.Na[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.Ic)&&b.requestModifiers.push(k=>_.Qj(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.Ic)&&b.responseModifiers.push(k=>_.Rj(k))})};
163
+ tl=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.Fg(_.Xg(b))).ti}catch(c){a.a.warn("Unable to parse DRMtoday Request ID",c)}return""};_.wl=function(a,b){a&&b&&(ul.set(a,b),vl.info(`Registered TextDisplayerFactory: '${a}'`))};_.xl=function(a,b){b=b.find(c=>(c=ul.get(c))?c.ba(a):!1);if(null==b)return vl.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;vl.info(`Chosen the text displayer: ${b}`);return ul.get(b)};
162
164
  _.yl=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})}}};zl=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};Al=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};
163
- Bl=function(a){return a.a.map(b=>_.kf(b))};_.Cl=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:[]}};El=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Dl.value().get(b),c.one(a,b,d))};
164
- Il=function(a){a.g.debug("Start watching for video events for "+a.l.namespace());const b=a.l,c=d=>Fl(a,d.type);a.a.on(b,_.Zc,()=>{a.j=!1;Gl(a,_.Hl)});a.a.on(b,oc,c);a.a.on(b,_.Td,()=>{a.F=!0;a.j=!1;Fl(a,_.Td)});a.a.on(b,_.Od,()=>{a.F=!1;a.j=!1;Fl(a,_.Od)});a.a.on(b,_.ve,c);a.a.on(b,_.Yd,c);a.a.on(b,_.ee,d=>{a.m=!1;a.j=!1;Fl(a,d.type)});a.a.on(b,_.fe,d=>{a.m=!0;Fl(a,d.type)});a.a.on(b,ie,c);a.a.on(b,_.Pe,()=>{a.j=!0;Fl(a,_.Pe)});a.a.on(b,_.$c,d=>a.T(d));a.a.on(b,_.od,c);a.a.on(b,pc,()=>{a.C=!0;Fl(a,
165
- pc)});a.a.on(b,_.Ee,d=>{a.m=!0;Fl(a,d.type)});a.a.on(b,_.Ce,d=>{a.m=!1;a.j=!1;Fl(a,d.type)})};Jl=function(a,b){return Object.keys(b)[a]};Ll=function(a,b){const c={type:_.ke};b===_.nc||b===_.mc?(c.reason=a.w,b===_.nc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.Kl&&(c.reason=a.w),a.A===_.Kl&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
166
- Gl=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.Kl;a.A=a.f;a.f=b;a.A===_.Hl&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.Kl?(a.K=a.o,a.w=a.m?1:2,a.g.info("Buffering started. Reason: "+Jl(a.w-1,_.Ml)),b=Ll(a,_.nc),a.Lb(_.nc,b)):d&&(a.B=a.o-a.K,a.g.info("Buffering finished. Reason: "+Jl(a.w-1,_.Ml)+". Buffering time: "+a.B+" ms"),b=Ll(a,_.mc),a.Lb(_.mc,b));b=Jl(a.A,_.Nl);c=Jl(a.f,_.Nl);a.g.info(`Player state change: ${b} -> ${c}`);a.Lb(_.ke,Ll(a,""));return!0};
167
- Fl=function(a,b){if(a.f===_.Ol)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.l.isPaused();var d=a.l.getPosition();var e=a.l.getDuration();if(d=a.l.isEnded()||a.f===_.Hl&&1>=Math.abs(d-e)||c&&d>=e)Gl(a,_.Hl)&&a.g.debug("Player claims to be in ended state, not checking more");else if(b!==_.ve){e=a.l.getPosition();e=null!==e&&void 0!==e&&0<=e?a.l.getBufferInfo().za(e,!0):-1;a.G=e;e=a.l.getSurface().getMedia();a.h=e?e.readyState:null;a.J=a.l.getPlaybackRate()||1;
168
- e=typeof a.h===_.p&&2>a.h&&2===e.networkState;var f=typeof a.h===_.p&&0>=a.G&&a.f===_.Pl,g=typeof a.h===_.p&&2>=a.h&&a.j;e=a.m||f||e||g;!a.L||a.l.isLive()||a.f!==_.Kl||e||(f=b===_.ee&&4===a.h,(g=a.A===_.Ql)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=Gl(a,_.Kl):c?f=Gl(a,_.Rl):a.F&&(f=Gl(a,_.Sl));f&&(a.C=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.m+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.h+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+
169
- f+", Current state: "+Jl(a.f,_.Nl))}}};Tl=function(a){a=(new _.eg(a)).ta;if(!a)return null;a=a.toUpperCase();return _.Sg(a,".MPD")?_.Ub:_.Sg(a,".M3U8")?_.Pi:_.Sg(a,".MP4")?_.Je:_.Sg(a,"MANIFEST")||_.Sg(a,".ISM")?_.Zb:null};_.Vl=function(a){let b;_.Yi(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.ne||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Ul(b[c]);d&&a.push(d)}return a};
170
- Ul=function(a){let b=null;_.pf(a)&&(a={url:a});typeof a===_.Bd&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.z(a.drmProtected)||typeof a.drmProtected!==_.lc||(b.drmProtected=a.drmProtected),_.z(a.isLive)||typeof a.isLive!==_.lc||(b.isLive=a.isLive),_.z(a.name)||typeof a.name!==_.ne||(b.name=a.name),_.z(a.yb)||typeof a.yb!==_.ne||(b.yb=a.yb),_.z(a.audioMimeType)||typeof a.audioMimeType!==_.ne||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Tl(a.url),b.type?Wl.debug("Detect media type "+
171
- b.type+" for "+a.url):Wl.warn("Unable to detect media type for "+a.url));return b};Yl=function(a){return a.w?Xl():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.$c);a.g.off(c,_.ce);a.a=null}b()})};Xl=function(){return Promise.reject(new _.G(_.F,7,7E3))};
172
- $l=function(a,b){return a.w?Xl():new Promise(c=>{a.a||(a.g.on(b,_.$c,()=>{{const d=Zl(a);if(d)a.onError(d)}}),a.g.on(b,_.ce,()=>{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(_.hc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
173
- bm=function(a){return _.w(function*(){if(a.w)return Xl();var b=a.o[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.qj(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.m=new _.am({ub:c,onError:d=>a.onError(d),Kd:()=>{},onExpirationUpdated:(d,e)=>{a.trigger(new _.C(_.Rc,{expirationTime:e}))},onEvent:d=>{d instanceof _.C?a.dispatchEvent(d):
174
- a.log.debug(_.ob,d.type)},getConfiguration:()=>a.getConfiguration(),nc:()=>a.nc()});a.m.h=b;yield _.Wk(a.m,[{id:0,language:_.ye,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,Da:0,mimeType:_.Je,codecs:"",encrypted:!0,keyId:null,language:_.ye,label:null,type:_.v,primary:!1,frameRate:void 0,tg:void 0,trickModeVideo:null,
175
- emsgSchemeIdUris:null,roles:[],channelsCount:null,fg:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}],[]);yield _.ml(a.m,a.a);return Promise.resolve()})};cm=function(a,b){El(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.Ol&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
176
- Zl=function(a){if(null===a.o||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.G(_.F,3,3016,{code:b,ng:c,message:a.a.error.message})};
177
- em=function(a){if(a.w)return new _.dm(Xl(),()=>{});const b=a.o[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&cm(a,c);if(d.preload!==_.Ad)a.g.one(d,_.od,()=>{const g=Date.now()/1E3-e;a.f.w=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Xh()||_.$h())&&d.load();const f=new _.Xk;a.g.one(d,ie,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.C||(a.C=(new _.Th(()=>{f.reject(new _.G(_.F,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
165
+ Bl=function(a){return a.a.map(b=>_.lf(b))};_.Cl=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:[]}};El=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Dl.value().get(b),c.one(a,b,d))};
166
+ Il=function(a){a.g.debug("Start watching for video events for "+a.l.namespace());const b=a.l,c=d=>Fl(a,d.type);a.a.on(b,_.Zc,()=>{a.j=!1;Gl(a,_.Hl)});a.a.on(b,oc,c);a.a.on(b,_.Td,()=>{a.F=!0;a.j=!1;Fl(a,_.Td)});a.a.on(b,_.Od,()=>{a.F=!1;a.j=!1;Fl(a,_.Od)});a.a.on(b,_.ve,c);a.a.on(b,_.Yd,c);a.a.on(b,_.ee,d=>{a.m=!1;a.j=!1;Fl(a,d.type)});a.a.on(b,_.fe,d=>{a.m=!0;Fl(a,d.type)});a.a.on(b,ie,c);a.a.on(b,_.Qe,()=>{a.j=!0;Fl(a,_.Qe)});a.a.on(b,_.$c,d=>a.T(d));a.a.on(b,_.od,c);a.a.on(b,pc,()=>{a.C=!0;Fl(a,
167
+ pc)});a.a.on(b,_.De,d=>{a.m=!0;Fl(a,d.type)});a.a.on(b,_.Ce,d=>{a.m=!1;a.j=!1;Fl(a,d.type)})};Jl=function(a,b){return Object.keys(b)[a]};Ll=function(a,b){const c={type:_.ke};b===_.nc||b===_.jc?(c.reason=a.w,b===_.nc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.Kl&&(c.reason=a.w),a.A===_.Kl&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
168
+ Gl=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.Kl;a.A=a.f;a.f=b;a.A===_.Hl&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.Kl?(a.K=a.o,a.w=a.m?1:2,a.g.info("Buffering started. Reason: "+Jl(a.w-1,_.Ml)),b=Ll(a,_.nc),a.Ob(_.nc,b)):d&&(a.B=a.o-a.K,a.g.info("Buffering finished. Reason: "+Jl(a.w-1,_.Ml)+". Buffering time: "+a.B+" ms"),b=Ll(a,_.jc),a.Ob(_.jc,b));b=Jl(a.A,_.Nl);c=Jl(a.f,_.Nl);a.g.info(`Player state change: ${b} -> ${c}`);a.Ob(_.ke,Ll(a,""));return!0};
169
+ Fl=function(a,b){if(a.f===_.Ol)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.l.isPaused();var d=a.l.getPosition();var e=a.l.getDuration();if(d=a.l.isEnded()||a.f===_.Hl&&1>=Math.abs(d-e)||c&&d>=e)Gl(a,_.Hl)&&a.g.debug("Player claims to be in ended state, not checking more");else if(b!==_.ve){e=a.l.getPosition();e=null!==e&&void 0!==e&&0<=e?a.l.getBufferInfo().Ca(e,!0):-1;a.G=e;e=a.l.getSurface().getMedia();a.h=e?e.readyState:null;a.J=a.l.getPlaybackRate()||1;
170
+ e=typeof a.h===_.r&&2>a.h&&2===e.networkState;var f=typeof a.h===_.r&&0>=a.G&&a.f===_.Pl,g=typeof a.h===_.r&&2>=a.h&&a.j;e=a.m||f||e||g;!a.M||a.l.isLive()||a.f!==_.Kl||e||(f=b===_.ee&&4===a.h,(g=a.A===_.Ql)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=Gl(a,_.Kl):c?f=Gl(a,_.Rl):a.F&&(f=Gl(a,_.Sl));f&&(a.C=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.m+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.h+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+
171
+ f+", Current state: "+Jl(a.f,_.Nl))}}};Tl=function(a){a=(new _.dg(a)).wa;if(!a)return null;a=a.toUpperCase();return _.Ng(a,".MPD")?_.Vb:_.Ng(a,".M3U8")?_.Vi:_.Ng(a,".MP4")?_.Ke:_.Ng(a,"MANIFEST")||_.Ng(a,".ISM")?_.$b:null};_.Vl=function(a){let b;_.dj(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.ne||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Ul(b[c]);d&&a.push(d)}return a};
172
+ Ul=function(a){let b=null;_.qf(a)&&(a={url:a});typeof a===_.Bd&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.B(a.drmProtected)||typeof a.drmProtected!==_.ic||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.ic||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.ne||(b.name=a.name),_.B(a.Ab)||typeof a.Ab!==_.ne||(b.Ab=a.Ab),_.B(a.audioMimeType)||typeof a.audioMimeType!==_.ne||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Tl(a.url),b.type?Wl.debug("Detect media type "+
173
+ b.type+" for "+a.url):Wl.warn("Unable to detect media type for "+a.url));return b};Yl=function(a){return a.w?Xl():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.$c);a.g.off(c,_.ce);a.a=null}b()})};Xl=function(){return Promise.reject(new _.H(_.G,7,7E3))};
174
+ $l=function(a,b){return a.w?Xl():new Promise(c=>{a.a||(a.g.on(b,_.$c,()=>{{const d=Zl(a);if(d)a.onError(d)}}),a.g.on(b,_.ce,()=>{const d=b.videoWidth,e=b.videoHeight,f=a.getTrackManager();f&&0<d&&0<e&&(f.w={width:d,height:e});a.trigger(new _.F(_.hc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
175
+ bm=function(a){return _.y(function*(){if(a.w)return Xl();var b=a.o[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.pj(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.m=new _.am({wb:c,onError:d=>a.onError(d),Od:()=>{},onExpirationUpdated:(d,e)=>{a.trigger(new _.F(_.Rc,{expirationTime:e}))},onEvent:d=>{d instanceof _.F?a.dispatchEvent(d):
176
+ a.log.debug(_.ob,d.type)},getConfiguration:()=>a.getConfiguration(),rc:()=>a.rc()});a.m.h=b;yield _.Wk(a.m,[{id:0,language:_.ye,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,Ha:0,mimeType:_.Ke,codecs:"",encrypted:!0,keyId:null,language:_.ye,label:null,type:_.w,primary:!1,frameRate:void 0,Jg:void 0,trickModeVideo:null,
177
+ emsgSchemeIdUris:null,roles:[],channelsCount:null,wg:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}],[]);yield _.ml(a.m,a.a);return Promise.resolve()})};cm=function(a,b){El(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.Ol&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
178
+ Zl=function(a){if(null===a.o||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.H(_.G,3,3016,{code:b,Eg:c,message:a.a.error.message})};
179
+ em=function(a){if(a.w)return new _.dm(Xl(),()=>{});const b=a.o[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&cm(a,c);if(d.preload!==_.Ad)a.g.one(d,_.od,()=>{const g=Date.now()/1E3-e;a.f.w=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.ci()||_.fi())&&d.load();const f=new _.Xk;a.g.one(d,ie,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.C||(a.C=(new _.Zh(()=>{f.reject(new _.H(_.G,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
178
180
  uri:b.url},d.error))})).$(g))});El(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject(Zl(a)):d.preload===_.Ad&&(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,_.$c,()=>{f.reject(Zl(a))});return new _.dm(f,
179
- ()=>{const g=new _.G(_.F,7,7001);f.reject(g);return Promise.resolve()})};fm=function(a,b){El(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{if(a.isLive()&&a.getState()!==_.Ol){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)}))}})};
180
- _.im=function(a){a&&(0<=gm.indexOf(a)?hm.warn(`Factory '${a.name()}' is already registered`):(gm.push(a),hm.info(`Factory ${a.name()}' has been registered.`)))};km=function(a,b){let c=gm.find(d=>d.aa(a,b));c||(c=new jm);hm.info(`Chosen ads: ${c.name()}`);return c};_.lm=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};_.mm=function(a,b){a.classList.add(b)};
181
- _.nm=function(a,b){if(a&&typeof b===_.Bd)for(const c in b)a.style[c]=b[c]};_.om=function(a){return document.createElement(a)};pm=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.g.values());_.bg(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};qm=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.g.add(b))};
182
- rm=function(a,b,c){(_.$h()&&53===ai().major||_.$h()&&68===ai().major||_.bi())&&!b.hasAttribute(Mc)&&(b.style.opacity="0",b.setAttribute(Mc,""),a.j.one(b,Wc,()=>{b.removeAttribute(Mc);b.style.opacity="1";c&&(c.style.opacity="1")}))};
183
- vm=function(a){a.a.on(window,"offline",()=>{sm(a,!1)});a.a.on(window,"online",()=>{a.f||tm(a)});a.a.on(a.l,ie,()=>um(a));a.a.on(a.l,"suspend",()=>um(a));a.a.on(a.l,_.Pe,()=>um(a));a.a.on(a.l,_.Td,()=>{a.f||tm(a)});a.a.on(a.l,_.Wd,()=>{a.f||tm(a)});a.a.on(a.l,_.ke,()=>{switch(a.l.getState()){case _.Kl:um(a);break;default:um(a)}})};wm=function(a){a.g&&(a.g.stop(),a.g=null)};um=function(a){a.f&&tm(a)};
184
- xm=function(a){return _.w(function*(){var b=a.l.getConfiguration().connectivityCheck;b&&a.l&&(b=yield kh(a.h,b.url,b.attemptParameters,b.method),sm(a,b))})};tm=function(a){a.l.getConfiguration().connectivityCheck&&(wm(a),a.g=(new _.Th(()=>xm(a))).$(5))};sm=function(a,b){wm(a);a.f!==b&&(a.f=b,a.l&&a.l.getConfiguration().connectivityCheck&&a.l.trigger(new _.C(Id,{online:a.f})))};zm=function(){for(let a=0;a<ym.length;++a)ym[a].fc()};
185
- _.Am=function(a,b){b=b||0;a={priority:b,fc:a};for(let c=0;c<ym.length;c++)if(ym[c].priority<b){ym.splice(c,0,a);return}ym.push(a)};Bm=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};Dm=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 Cm(b[0],b[1],b[2]);a.a=b}return a.a};
186
- Em=function(a){switch((a.Sc()[0]||{src:"",type:""}).type){case _.Ub:a="dash";break;case _.Zb:a="ss";break;case _.Pi:a="hls";break;case _.Je:a=_.xd;break;default:a=""}return a};Fm=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};Gm=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
187
- Hm=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Im=function(a){a=a.getDrmInfo();return(new _.eg(a&&a.licenseServerUri||"")).Ha};Jm=function(a){const b=a.getConfiguration();let c="no";b.drm&&!_.rf(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Vc)||Im(a).endsWith("drmtoday.com"))&&(c=Vc);return c};
188
- Km=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.keySystem){case _.Kc:b="wv";break;case _.Jc:b="pr";break;case _.Ic:b="fps"}return b};Lm=function(a){a=a.getDrmInfo();let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Mm=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.videoRobustness){case Ea:case "HW_SECURE_ALL":b="L1";break;case Da:b="L2";break;case _.eb:case _.db:b="L3"}return b};
189
- Qm=function(a,b){const c="ie"===_.wi().browser;var d=b.getConfiguration();const e=[...Array.from(_.Zi.keys()),...b.uf()];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":Fm(d),"CL-ASSET-ID":Gm(d),"CL-SESSION-ID":Hm(d),"CL-PLAYBACK-TYPE":b.isLive()?Nm:Om,"CL-CONTENT-TYPE":Em(b),"CL-PLUGINS":e.join(" "),"CL-DRM":Jm(b),"CL-DRM-CDM":Km(b),"CL-DRM-SEC-LEVEL":Mm(b),"CL-DRM-OFFLINE":Lm(b),"CL-DRM-IP":Im(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=
190
- d);d=_.bh(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Pm).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=Dm(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=
191
- k+"!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:g=Promise.resolve();break a}a.f.error(Ia+k);g=Promise.reject(new _.G(_.F,7,g,k))}}return g})};_.Sm=function(a){a&&(0<=Rm.indexOf(a)||Rm.push(a))};
192
- Um=function(a){if(!a.L){a.L=!0;a.h.getMedia()||a.h.getCastElement();a.w||(a.w=new Tm(a.f.license));var b=Object.keys(a.K);Qm(a.w,{getConfiguration:a.getConfiguration.bind(a),Sc:a.Sc.bind(a),getDrmInfo:a.getDrmInfo.bind(a),uf:()=>b,isLive:a.isLive.bind(a)}).then(()=>{a.g.debug("License verified remotely")}).catch(c=>{setTimeout(Bm,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)})}};
193
- Vm=function(a,b){a.w=new Tm(b);a.w.verify().catch(c=>{setTimeout(()=>{a.g.error(Ia+c);a.trigger(new _.C(_.$c,{detail:new _.G(_.F,7,7101)}));a.destroy()},1E3)})};Xm=function(a,b){a.J=b;for(const c of a.J)(b=c.id())&&(a.K[b]=c);_.Wm(a,"onPlayerCreated")};_.Ym=function(a,b){b!==a.a&&(a.a&&(a.a.removeDelegate(a),a.a.destroy()),a.a=b,a.a&&(a.a.init(a.h,a.f),a.a.setNetworkEngine(a.getNetworkEngine()),a.a.addDelegate(a)))};
181
+ ()=>{const g=new _.H(_.G,7,7001);f.reject(g);return Promise.resolve()})};fm=function(a,b){El(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{if(a.isLive()&&a.getState()!==_.Ol){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)}))}})};
182
+ _.im=function(a){a&&(0<=gm.indexOf(a)?hm.warn(`Factory '${a.name()}' is already registered`):(gm.push(a),hm.info(`Factory ${a.name()}' has been registered.`)))};km=function(a,b){let c=gm.find(d=>d.ba(a,b));c||(c=new jm);hm.info(`Chosen ads: ${c.name()}`);return c};_.lm=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};_.mm=function(a,b){a.classList.add(b)};
183
+ _.nm=function(a,b){if(a&&typeof b===_.Bd)for(const c in b)a.style[c]=b[c]};_.om=function(a){return document.createElement(a)};pm=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.g.values());_.ag(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};qm=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.g.add(b))};
184
+ rm=function(a,b,c){(_.fi()&&53===gi().major||_.fi()&&68===gi().major||_.hi())&&!b.hasAttribute(Mc)&&(b.style.opacity="0",b.setAttribute(Mc,""),a.j.one(b,Wc,()=>{b.removeAttribute(Mc);b.style.opacity="1";c&&(c.style.opacity="1")}))};
185
+ vm=function(a){a.a.on(window,"offline",()=>{sm(a,!1)});a.a.on(window,"online",()=>{a.f||tm(a)});a.a.on(a.l,ie,()=>um(a));a.a.on(a.l,"suspend",()=>um(a));a.a.on(a.l,_.Qe,()=>um(a));a.a.on(a.l,_.Td,()=>{a.f||tm(a)});a.a.on(a.l,_.Wd,()=>{a.f||tm(a)});a.a.on(a.l,_.ke,()=>{switch(a.l.getState()){case _.Kl:um(a);break;default:um(a)}})};wm=function(a){a.g&&(a.g.stop(),a.g=null)};um=function(a){a.f&&tm(a)};
186
+ xm=function(a){return _.y(function*(){var b=a.l.getConfiguration().connectivityCheck;b&&a.l&&(b=yield th(a.h,b.url,b.attemptParameters,b.method),sm(a,b))})};tm=function(a){a.l.getConfiguration().connectivityCheck&&(wm(a),a.g=(new _.Zh(()=>xm(a))).$(5))};sm=function(a,b){wm(a);a.f!==b&&(a.f=b,a.l&&a.l.getConfiguration().connectivityCheck&&a.l.trigger(new _.F(Hd,{online:a.f})))};zm=function(){for(let a=0;a<ym.length;++a)ym[a].hc()};
187
+ _.Am=function(a,b){b=b||0;a={priority:b,hc:a};for(let c=0;c<ym.length;c++)if(ym[c].priority<b){ym.splice(c,0,a);return}ym.push(a)};Bm=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};Dm=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 Cm(b[0],b[1],b[2]);a.a=b}return a.a};
188
+ Em=function(a){switch((a.Xc()[0]||{src:"",type:""}).type){case _.Vb:a="dash";break;case _.$b:a="ss";break;case _.Vi:a="hls";break;case _.Ke:a=_.xd;break;default:a=""}return a};Fm=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};Gm=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
189
+ Hm=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Im=function(a){a=a.getDrmInfo();return(new _.dg(a&&a.licenseServerUri||"")).La};Jm=function(a){const b=a.getConfiguration();let c="no";b.drm&&!_.sf(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Vc)||Im(a).endsWith("drmtoday.com"))&&(c=Vc);return c};
190
+ Km=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.keySystem){case _.Kc:b="wv";break;case _.Jc:b="pr";break;case _.Ic:b="fps"}return b};Lm=function(a){a=a.getDrmInfo();let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Mm=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.videoRobustness){case Ea:case "HW_SECURE_ALL":b="L1";break;case Da:b="L2";break;case _.fb:case _.eb:b="L3"}return b};
191
+ Qm=function(a,b){const c="ie"===_.Ci().browser;var d=b.getConfiguration();const e=[...Array.from(_.ej.keys()),...b.Ef()];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":Fm(d),"CL-ASSET-ID":Gm(d),"CL-SESSION-ID":Hm(d),"CL-PLAYBACK-TYPE":b.isLive()?Nm:Om,"CL-CONTENT-TYPE":Em(b),"CL-PLUGINS":e.join(" "),"CL-DRM":Jm(b),"CL-DRM-CDM":Km(b),"CL-DRM-SEC-LEVEL":Mm(b),"CL-DRM-OFFLINE":Lm(b),"CL-DRM-IP":Im(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=
192
+ d);d=_.kh(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Pm).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=Dm(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=
193
+ k+"!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:g=Promise.resolve();break a}a.f.error(Ha+k);g=Promise.reject(new _.H(_.G,7,g,k))}}return g})};_.Sm=function(a){a&&(0<=Rm.indexOf(a)||Rm.push(a))};
194
+ Um=function(a){if(!a.M){a.M=!0;a.h.getMedia()||a.h.getCastElement();a.w||(a.w=new Tm(a.f.license));var b=Object.keys(a.K);Qm(a.w,{getConfiguration:a.getConfiguration.bind(a),Xc:a.Xc.bind(a),getDrmInfo:a.getDrmInfo.bind(a),Ef:()=>b,isLive:a.isLive.bind(a)}).then(()=>{a.g.debug("License verified remotely")}).catch(c=>{setTimeout(Bm,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)})}};
195
+ Vm=function(a,b){a.w=new Tm(b);a.w.verify().catch(c=>{setTimeout(()=>{a.g.error(Ha+c);a.trigger(new _.F(_.$c,{detail:new _.H(_.G,7,7101)}));a.destroy()},1E3)})};Xm=function(a,b){a.J=b;for(const c of a.J)(b=c.id())&&(a.K[b]=c);_.Wm(a,"onPlayerCreated")};_.Ym=function(a,b){b!==a.a&&(a.a&&(a.a.removeDelegate(a),a.a.destroy()),a.a=b,a.a&&(a.a.init(a.h,a.f),a.a.setNetworkEngine(a.getNetworkEngine()),a.a.addDelegate(a)))};
194
196
  _.Wm=function(a,b,...c){const d=a.J.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
195
- Zm=function(a){return _.w(function*(){if(a.H)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.off(_.ke,a.B);a.A.off(a,_.ke,a.B);a.A.off(document,Ne);a.trigger(new _.C(_.$d));a.L=!1;a.h&&a.h.release();a.j&&(yield a.j.dispose(),a.j=null);cj(b=>{b.release()});if(a.a){let b=null;const c=a.a.on(_.ke,d=>{b=d});return _.Wm(a,_.Fd).then(()=>{a.a.removeDelegate(a);return Promise.all([a.a.release(),a.G.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
196
- a.trigger(b))}).finally(()=>{a.a.off(_.ke,c);a.trigger(new _.C(Zd))})}a.trigger(new _.C(Zd));return new Promise(b=>b())})};
197
- bn=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(_.Kf);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Bb:h[l],confidence:h[l].canPlay(b[k],c)};if(null===f||f.confidence<m.confidence)f=m,g=k}f&&typeof g===_.p&&0<f.confidence?(_.Lf.debug("Player Factory '"+f.Bb.a()+"' can play",b[g]),f=new $m(f.Bb,g)):(_.Lf.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Bb.create(),d(new an(e,f.a))):
198
- (d=new _.C(_.$c,{detail:new _.G(_.F,7,7003)}),a.trigger(d),e(d))})};
199
- _.en=function(a,b){return _.w(function*(){if(a.F)throw Error("Player is already destroyed.");if(!a.h)throw Error("No surface associated with this player!");yield a.release();a.o=_.Vl(b);a.f=_.Xi(a.N,_.Yi(b)?b:{},{source:a.o});if(0===a.o.length)throw Error("Invalid request to load: could not find source to load");a.H=!1;let c;var d=0;if(a.I||2!==a.canPlay(a.o[0],a.f))d=yield bn(a,a.o,a.f),c=d.a,d=d.f,a.I=!1;c?_.Ym(a,c):a.a.addDelegate(a);cn(a);a.a&&a.a.setCdnErrorCallback(a.C);dn(a,a.f);a.setSourceIndex(d);
200
- if(a.f.pauseWhenInBackground)a.A.on(document,Ne,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});cj(e=>{e.g()});yield _.Wm(a,"onContentWillLoad",a.f.source[d])})};_.fn=function(a){return _.w(function*(){a.h.getMedia()||a.h.getCastElement();a.A.on(a,_.ke,a.B);a.trigger(new _.C(pd));yield Promise.all([a.a.load(a.f),a.j.load()])})};
201
- _.hn=function(a){return _.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);gn(a);cj(()=>{});yield _.Wm(a,"onContentLoaded");a.f.autoplay&&(yield a.play())})};cn=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.w(function*(){a.jc&&a.ld&&(a.ld=!1,yield a.jc(b))}))};dn=function(a,b){a.j=km(a,b).create(a)};
202
- gn=function(a){const b=_.$f(a.f.preferredTextLanguage).filter(d=>d),c=a.getTrackManager().ga();b.some(d=>{const e=_.Nh(d);return(d=c.find(f=>{f=_.Nh(f.language||"");return _.Oh(f,e)}))?(a.getTrackManager().ya(d),!0):!1})};jn=function(a,b){a.size=void 0===b?0:1;a.f.debug("Setting key status to",b);a.a=b};
203
- kn=function(a,b){a.g=b;_.Of(a.f);if(!b)return Promise.resolve();a.f.on(b,Xc,c=>{_.If("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.a.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.f.on(b,Ve,c=>{{a.a.debug("Handle webkitNeedKey event");c=_.H(c.initData);if(_.Fg(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=Kg(c.subarray(4),
204
- !0);c=_.Mg(c);const d=new Event(Xc);d.initDataType="skd";d.initData=Gg(c);a.g.dispatchEvent(d)}});El(b,HTMLMediaElement.HAVE_METADATA,a.f,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};ln=function(a,b){jn(a.keyStatuses,b);b=new _.C(hd);a.dispatchEvent(b)};
205
- on=function(a,b){a.a=b;_.Of(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(Xc);d.initDataType=_.tc;d.initData=Gg(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=mn(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.C(sd,{messageType:d?kd:jd,message:c.message});d=e;_.If("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.Jf("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{if(c=mn(a,
206
- c.sessionId))_.If("WebkitEmeManager.MediaKeySession.ready"),nn(c,"usable"),c.a&&c.a.resolve(),c.a=null}),a.f.on(b,a.g+"keyerror",c=>{var d=mn(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?nn(d,_.Nd):1===e?nn(d,"expired"):
207
- nn(d,_.fd))}}}))};mn=function(a,b){let c=a.j.get(b);return c?c:(c=a.h.shift())?(c.sessionId=b,a.j.set(b,c),c):null};nn=function(a,b){jn(a.keyStatuses,b);b=new _.C(hd);a.dispatchEvent(b)};pn=function(a,b){return a.o?a.o+b.charAt(0).toUpperCase()+b.slice(1):b};
208
- qn=function(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;let d;try{if(a.j===_.Qd)if(c)d=_.H(_.Mg("LOAD_SESSION|"+c));else{const f=_.Mg("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.H(b),f.byteLength);d=g}else d=_.H(b)}catch(f){return Promise.reject(f)}a.f=new _.Xk;const e=pn(a,"generateKeyRequest");try{a.h[e](a.g,d)}catch(f){if(f.name!==Ga)return a.f=null,Promise.reject(f);(new _.Th(()=>{try{a.h[e](a.g,d)}catch(g){a.f.reject(g),
209
- a.f=null}})).$(.01)}return a.f};rn=function(a,b,c){if(a.a)a.a.then(()=>rn(a,b,c)).catch(()=>rn(a,b,c));else{a.a=b;if(a.g===Re){var d=_.Ig(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=_.fj(e.keys[0].k);e=_.fj(e.keys[0].kid)}else d=_.H(c),e=null;var f=pn(a,"addKey");try{a.h[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
197
+ Zm=function(a){return _.y(function*(){if(a.H)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.off(_.ke,a.B);a.A.off(a,_.ke,a.B);a.A.off(document,Oe);a.trigger(new _.F(_.$d));a.M=!1;a.h&&a.h.release();a.j&&(yield a.j.dispose(),a.j=null);ij(b=>{b.release()});if(a.a){let b=null;const c=a.a.on(_.ke,d=>{b=d});return _.Wm(a,_.Fd).then(()=>{a.a.removeDelegate(a);return Promise.all([a.a.release(),a.G.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
198
+ a.trigger(b))}).finally(()=>{a.a.off(_.ke,c);a.trigger(new _.F(Zd))})}a.trigger(new _.F(Zd));return new Promise(b=>b())})};
199
+ bn=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(_.Jf);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Fb: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?(_.Kf.debug("Player Factory '"+f.Fb.a()+"' can play",b[g]),f=new $m(f.Fb,g)):(_.Kf.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Fb.create(),d(new an(e,f.a))):
200
+ (d=new _.F(_.$c,{detail:new _.H(_.G,7,7003)}),a.trigger(d),e(d))})};
201
+ _.en=function(a,b){return _.y(function*(){if(a.F)throw Error("Player is already destroyed.");if(!a.h)throw Error("No surface associated with this player!");yield a.release();a.o=_.Vl(b);a.f=_.cj(a.O,_.dj(b)?b:{},{source:a.o});if(0===a.o.length)throw Error("Invalid request to load: could not find source to load");a.H=!1;let c;var d=0;if(a.I||2!==a.canPlay(a.o[0],a.f))d=yield bn(a,a.o,a.f),c=d.a,d=d.f,a.I=!1;c?_.Ym(a,c):a.a.addDelegate(a);cn(a);a.a&&a.a.setCdnErrorCallback(a.C);dn(a,a.f);a.setSourceIndex(d);
202
+ if(a.f.pauseWhenInBackground)a.A.on(document,Oe,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});ij(e=>{e.g()});yield _.Wm(a,"onContentWillLoad",a.f.source[d])})};_.fn=function(a){return _.y(function*(){a.h.getMedia()||a.h.getCastElement();a.A.on(a,_.ke,a.B);a.trigger(new _.F(pd));yield Promise.all([a.a.load(a.f),a.j.load()])})};
203
+ _.hn=function(a){return _.y(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);gn(a);ij(()=>{});yield _.Wm(a,"onContentLoaded");a.f.autoplay&&(yield a.play())})};cn=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.y(function*(){a.lc&&a.pd&&(a.pd=!1,yield a.lc(b))}))};dn=function(a,b){a.j=km(a,b).create(a)};
204
+ gn=function(a){const b=_.Zf(a.f.preferredTextLanguage).filter(d=>d),c=a.getTrackManager().ja();b.some(d=>{const e=_.sg(d);return(d=c.find(f=>{f=_.sg(f.language||"");return _.tg(f,e)}))?(a.getTrackManager().Ba(d),!0):!1})};jn=function(a,b){a.size=void 0===b?0:1;a.f.debug("Setting key status to",b);a.a=b};
205
+ kn=function(a,b){a.g=b;_.Nf(a.f);if(!b)return Promise.resolve();a.f.on(b,Xc,c=>{_.Hf("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.a.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.f.on(b,We,c=>{{a.a.debug("Handle webkitNeedKey event");c=_.I(c.initData);if(_.Cg(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=Hg(c.subarray(4),
206
+ !0);c=_.Jg(c);const d=new Event(Xc);d.initDataType="skd";d.initData=Dg(c);a.g.dispatchEvent(d)}});El(b,HTMLMediaElement.HAVE_METADATA,a.f,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};ln=function(a,b){jn(a.keyStatuses,b);b=new _.F(gd);a.dispatchEvent(b)};
207
+ on=function(a,b){a.a=b;_.Nf(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(Xc);d.initDataType=_.tc;d.initData=Dg(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=mn(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.F(sd,{messageType:d?kd:jd,message:c.message});d=e;_.Hf("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.If("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{if(c=mn(a,
208
+ c.sessionId))_.Hf("WebkitEmeManager.MediaKeySession.ready"),nn(c,"usable"),c.a&&c.a.resolve(),c.a=null}),a.f.on(b,a.g+"keyerror",c=>{var d=mn(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?nn(d,_.Ld):1===e?nn(d,"expired"):
209
+ nn(d,_.fd))}}}))};mn=function(a,b){let c=a.j.get(b);return c?c:(c=a.h.shift())?(c.sessionId=b,a.j.set(b,c),c):null};nn=function(a,b){jn(a.keyStatuses,b);b=new _.F(gd);a.dispatchEvent(b)};pn=function(a,b){return a.o?a.o+b.charAt(0).toUpperCase()+b.slice(1):b};
210
+ qn=function(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;let d;try{if(a.j===_.Qd)if(c)d=_.I(_.Jg("LOAD_SESSION|"+c));else{const f=_.Jg("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.I(b),f.byteLength);d=g}else d=_.I(b)}catch(f){return Promise.reject(f)}a.f=new _.Xk;const e=pn(a,"generateKeyRequest");try{a.h[e](a.g,d)}catch(f){if(f.name!==Ga)return a.f=null,Promise.reject(f);(new _.Zh(()=>{try{a.h[e](a.g,d)}catch(g){a.f.reject(g),
211
+ a.f=null}})).$(.01)}return a.f};rn=function(a,b,c){if(a.a)a.a.then(()=>rn(a,b,c)).catch(()=>rn(a,b,c));else{a.a=b;if(a.g===Se){var d=_.Fg(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=_.Xg(e.keys[0].k);e=_.Xg(e.keys[0].kid)}else d=_.I(c),e=null;var f=pn(a,"addKey");try{a.h[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
210
212
  sn=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.bd?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};tn=function(a){a=a.target;if(a.webkitPresentationMode===Rd){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)};
211
213
  un=function(){return this.webkitSupportsPresentationMode(Rd)?(this.webkitSetPresentationMode(Rd),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};vn=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
212
214
  wn=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};xn=function(a,b,c){return new window.TextTrackCue(a,b,c)};yn=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};An=function(a,b,c){if("input"===a)switch(this.type){case "range":a=wc}zn.call(this,a,b,c)};Bn=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
213
- Cn=function(a){return Bn()-a.a};En=function(a){const b=new Dn;b.a=a.a;return b};_.Fn=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.Hn=function(a,b,c,d){return _.w(function*(){try{return new (yield Gn(a,b,c,d))}catch(e){throw e.a(_.F),e;}})};
214
- Gn=function(a,b,c,d){return _.w(function*(){if(d){var e=_.In[d.toLowerCase()];if(e)return e;_.B("Could not determine manifest type using MIME type ",d)}if(e=_.Jn(a)){const f=_.Kn[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 Ln(a,b,c))){if(e=_.In[d])return e;_.B("Could not determine manifest type using MIME type",d)}throw new _.G(_.F,4,4E3,{url:a});})};
215
- _.Jn=function(a){a=(new _.eg(a)).ta.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};Ln=function(a,b,c){return _.w(function*(){var d=_.bh(a);$g(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).P).headers["content-type"])?d.toLowerCase():""})};Mn=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};
216
- Nn=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(Mn(a,e),eh(c,e.byteLength,Cn(a.g)),a.g.a=Bn());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>Nn(a,b,c))})};
217
- Pn=function(a){const b=a.uris[a.uriIndex],c=new On,d=new Dn,e=En(d);let f=0;const g=new _.Xk;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;let h=!1,k=!1;c.onreadystatechange=function(l){l=l.target;l.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!h&&(l=l.getResponseHeader(qa),dh(a,l),h=!0)};c.onload=function(l){l=l.target;var m=(l.getAllResponseHeaders()||"").trim().split("\r\n");const n={};for(const q of m)m=q.split(": "),n[m[0].toLowerCase()]=
218
- m.slice(1).join(": ");try{const q=Cn(e);k||eh(a,l.response?l.response.length:0,q);const t=_.ch(n,l.response,l.status,b,l.responseURL,a,q);a.rateLimitBps?fh(a.rateLimitBps,Cn(e),a.bytesLoaded).then(()=>{g.resolve(t)}):g.resolve(t)}catch(q){g.reject(q)}};c.onerror=function(l){l=l.target;if(0>=l.status)g.reject(new _.G(1,1,1002,{url:b,request:a,status:l.status}));else{var m=l.getAllResponseHeaders();const q={};if(m){m=m.trim().split("\r\n");for(var n of m)m=n.split(": "),q[m[0].toLowerCase()]=m.slice(1).join(": ")}n=
219
- _.ch(q,l.response,l.status,b,l.responseURL,a,Cn(e));g.resolve(n)}};c.ontimeout=function(){g.reject(new _.G(1,1,1003,{url:b,request:a}))};c.onprogress=function(l){const m=Cn(d);d.a=Bn();if(100<m||l.lengthComputable&&l.loaded===l.total)eh(a,l.loaded-f,m),f=l.loaded,k=!0};for(const l in a.headers)c.setRequestHeader(l.toLowerCase(),a.headers[l]);c.send(a.body);return{P:g,request:a,abort:()=>{c.abort();g.reject(new _.G(1,1,7001,{url:b,request:a}));return Promise.resolve()}}};
220
- Qn=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.h.a.buffer,a.g,a.f-a.g),count:-1});return b};Rn=function(a,b){{var c=a.h;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.h.f;a.j=new DataView(a.h.a.buffer,0,a.h.f)};
215
+ Cn=function(a){return Bn()-a.a};En=function(a){const b=new Dn;b.a=a.a;return b};_.Fn=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.Hn=function(a,b,c,d){return _.y(function*(){try{return new (yield Gn(a,b,c,d))}catch(e){throw e.a(_.G),e;}})};
216
+ Gn=function(a,b,c,d){return _.y(function*(){if(d){var e=_.In[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.Jn(a)){const f=_.Kn[e];if(f)return f;_.C("Could not determine manifest type for extension ",e)}else _.C("Could not find extension for ",a);if(!d&&(d=yield Ln(a,b,c))){if(e=_.In[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.H(_.G,4,4E3,{url:a});})};
217
+ _.Jn=function(a){a=(new _.dg(a)).wa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};Ln=function(a,b,c){return _.y(function*(){var d=_.kh(a);ih(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).P).headers["content-type"])?d.toLowerCase():""})};Mn=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};
218
+ Nn=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(Mn(a,e),nh(c,e.byteLength,Cn(a.g)),a.g.a=Bn());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>Nn(a,b,c))})};
219
+ Pn=function(a){const b=a.uris[a.uriIndex],c=new On,d=new Dn,e=En(d);let f=0,g;const h=new _.Xk;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=Cn(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(pa),mh(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
220
+ const q={};for(const t of n)n=t.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const t=Cn(e);l||nh(a,m.response?m.response.length:0,t);const u=_.lh(q,m.response,m.status,b,m.responseURL,a,t,g);a.rateLimitBps?oh(a.rateLimitBps,Cn(e),a.bytesLoaded).then(()=>{h.resolve(u)}):h.resolve(u)}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");
221
+ for(var q of n)n=q.split(": "),t[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.lh(t,m.response,m.status,b,m.responseURL,a,Cn(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=Cn(d);d.a=Bn();if(100<n||m.lengthComputable&&m.loaded===m.total)nh(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,
222
+ 7001,{url:b,request:a}));return Promise.resolve()}}};Qn=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.h.a.buffer,a.g,a.f-a.g),count:-1});return b};Rn=function(a,b){{var c=a.h;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.h.f;a.j=new DataView(a.h.a.buffer,0,a.h.f)};
221
223
  Tn=function(a){if(0<=a.m&&a.f<a.m)return null;let b=Sn(a);for(;null!==b;){if(b.name===_.qd){const c={start:a.g,end:b.end,length:b.end-a.g,data:new DataView(a.h.a.buffer,a.g,b.end-a.g),count:1};a.g=b.end;return c}b=Sn(a)}return null};
222
224
  Un=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,Cn(a.o)),a.o.a=Bn());if(f)return e=Qn(a),(e=c(!0,e))?e.then(()=>a.h.a.buffer):Promise.resolve(a.h.a.buffer);let h=Promise.resolve();if(null!=g){Rn(a,g);var k=Tn(a);for(e=[];k;)e.push(k),k=Tn(a);if(!a.w)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.h.a.buffer,k.start,m),count:e.length}}(e=
223
225
  c(!1,k))&&(h=e)}}return h.then(()=>Un(a,b,c,d))})};
224
- Sn=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Vn(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Vn(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.j.getUint32(a.a,!1),e=a.j.getUint32(a.a+4,!1)}catch(g){throw new _.G(_.F,3,3E3);}if(2097151<f)throw new _.G(_.F,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.m=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
226
+ Sn=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Vn(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Vn(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.j.getUint32(a.a,!1),e=a.j.getUint32(a.a+4,!1)}catch(g){throw new _.H(_.G,3,3E3);}if(2097151<f)throw new _.H(_.G,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.m=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
225
227
  Vn=function(a){const b=a.j.getUint32(a.a,!1);a.a+=4;return b};
226
- Yn=function(a){a.g=a.A.then(e=>{a.h=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=Wn(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Wn(e.request.fuzzFactor,.5));a.f*=Wn(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.j=h;Xn(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.G(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
227
- 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.o.resolve(e)}).catch(e=>{if(e instanceof _.G){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return Yn(a);g&&e.a(_.F);a.o.reject(e)}else a.o.reject(e)})};Xn=function(a,b,c){a.m=setTimeout(b,c)};Wn=function(a,b){return null===a||void 0===a?b:a};
228
- bo=function(a){var b=new Zn;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new $n,d={uc:!1,Me:!1};b={P:ao(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.Me=!0;c.abort()},a);b.P=b.P.finally(()=>{window.clearTimeout(e)})}return b};
229
- ao=function(a,b,c,d){return _.w(function*(){let e,f;const g=new Dn,h=En(g);try{e=yield co(a,c);const l=e.headers.get(qa);dh(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=e.body.getReader();f=yield Un(new eo(m,!b.disableMergedFragments),n,(q,t)=>{if(d.uc)return null;t&&t.data&&(eh(b,t.data.byteLength,Cn(g)),g.a=Bn());return b.onFragment&&t?b.rateLimitBps?fh(b.rateLimitBps,Cn(h),b.bytesLoaded).then(()=>b.onFragment(t)):b.onFragment(t):null},b.onProgress)}else{const n=
230
- e.body.getReader();f=yield Nn(new fo(m),n,b);b.rateLimitBps&&(yield fh(b.rateLimitBps,Cn(h),f.byteLength))}}catch(l){if(d.uc)throw new _.G(1,1,7001,{url:a,request:b});if(d.Me)throw new _.G(1,1,1003,{url:a,request:b});_.Jf("Error while fetching data:",l);throw new _.G(1,1,1002,{url:a,error:l,request:b,status:-1},l);}const k={};e.headers.forEach((l,m)=>{k[m.trim()]=l});if(d.uc)throw new _.G(1,1,7001,{url:a,request:b});return _.ch(k,f,e.status,a,e.url,b,Cn(h))})};
228
+ Yn=function(a){a.g=a.A.then(e=>{a.h=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=Wn(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Wn(e.request.fuzzFactor,.5));a.f*=Wn(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.j=h;Xn(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)});
229
+ 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.o.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 Yn(a);g&&e.a(_.G);a.o.reject(e)}else a.o.reject(e)})};Xn=function(a,b,c){a.m=setTimeout(b,c)};Wn=function(a,b){return null===a||void 0===a?b:a};
230
+ bo=function(a){var b=new Zn;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new $n,d={zc:!1,Te:!1};b={P:ao(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.zc||(d.zc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Te=!0;c.abort()},a);b.P=b.P.finally(()=>{window.clearTimeout(e)})}return b};
231
+ ao=function(a,b,c,d){return _.y(function*(){let e,f,g;const h=new Dn,k=En(h);try{e=yield co(a,c);g=Cn(h);const m=e.headers.get(pa);mh(b,m);const n=m?parseInt(m,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const q=e.body.getReader();f=yield Un(new eo(n,!b.disableMergedFragments),q,(t,u)=>{if(d.zc)return null;u&&u.data&&(nh(b,u.data.byteLength,Cn(h)),h.a=Bn());return b.onFragment&&u?b.rateLimitBps?oh(b.rateLimitBps,Cn(k),b.bytesLoaded).then(()=>b.onFragment(u)):b.onFragment(u):null},
232
+ b.onProgress)}else{const q=e.body.getReader();f=yield Nn(new fo(n),q,b);b.rateLimitBps&&(yield oh(b.rateLimitBps,Cn(k),f.byteLength))}}catch(m){if(d.zc)throw new _.H(1,1,7001,{url:a,request:b});if(d.Te)throw new _.H(1,1,1003,{url:a,request:b});_.If("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.zc)throw new _.H(1,1,7001,{url:a,request:b});return _.lh(l,f,e.status,a,e.url,b,Cn(k),g)})};
231
233
  ho=function(a){try{const b=a.uris[a.uriIndex],c=_.go(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()}}};
232
- _.go=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.Jf("Bad data URI, failed to parse scheme"),new _.G(_.F,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.Jf("Bad data URI, failed to extract encoding and MIME type"),new _.G(_.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?_.fj(a).buffer:_.Mg(a).buffer,contentType:c}};_.jo=function(a){delete _.io[a]};
233
- _.oo=function(a){if(!a.o)return null;const b=a.G;switch(a.o){case ko:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case lo:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case mo:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case no:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Ad}};cf="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
234
- df=typeof Object.defineProperties==_.bd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
235
- ef("Promise",function(a){function b(g){this.f=0;this.j=void 0;this.a=[];var h=this.g();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.j()})}this.a.push(g)};var e=cf.setTimeout;c.prototype.g=function(g){e(g,0)};c.prototype.j=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
234
+ _.go=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.If("Bad data URI, failed to parse scheme"),new _.H(_.G,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.If("Bad data URI, failed to extract encoding and MIME type"),new _.H(_.G,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];let d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.Xg(a).buffer:_.Jg(a).buffer,contentType:c}};_.jo=function(a){delete _.io[a]};
235
+ _.oo=function(a){if(!a.o)return null;const b=a.G;switch(a.o){case ko:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case lo:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case mo:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case no:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Ad}};df="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
236
+ ef=typeof Object.defineProperties==_.bd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
237
+ ff("Promise",function(a){function b(g){this.f=0;this.j=void 0;this.a=[];var h=this.g();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.j()})}this.a.push(g)};var e=df.setTimeout;c.prototype.g=function(g){e(g,0)};c.prototype.j=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
236
238
  g[h];g[h]=null;try{k()}catch(l){this.h(l)}}}this.a=null};c.prototype.h=function(g){this.g(function(){throw g;})};b.prototype.g=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.B),reject:g(this.h)}};b.prototype.B=function(g){if(g===this)this.h(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.C(g);else{a:switch(typeof g){case _.Bd:var h=null!=g;break a;case _.bd:h=!0;break a;default:h=!1}h?this.A(g):this.m(g)}};
237
239
  b.prototype.A=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.bd?this.F(h,g):this.m(g)};b.prototype.h=function(g){this.o(2,g)};b.prototype.m=function(g){this.o(1,g)};b.prototype.o=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.j=h;this.w()};b.prototype.w=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.C=function(g){var h=this.g();
238
- g.Jc(h.resolve,h.reject)};b.prototype.F=function(g,h){var k=this.g();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==_.bd?function(u){try{l(q(u))}catch(y){m(y)}}:t}var l,m,n=new b(function(q,t){l=q;m=t});this.Jc(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Jc=function(g,h){function k(){switch(l.f){case 1:g(l.j);break;case 2:h(l.j);break;default:throw Error("Unexpected state: "+
239
- 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=bf(g),m=l.next();!m.done;m=l.next())d(m.value).Jc(h,k)})};b.all=function(g){var h=bf(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(y){q[u]=y;t--;0==t&&l(q)}}var q=[],t=0;do q.push(void 0),t++,d(k.value).Jc(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var gf=this||self;
240
- gf.a=!0;_.x("clpp.utils.obj.cloneItem",_.kf);_.x("clpp.utils.obj.merge",_.jf);var Ef={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.x("clpp.log.Level",Ef);var yf=3,xf={},po=[];_.x("clpp.log.getLoggers",function(){return _.kf(xf)});_.x("clpp.log.addInterceptor",function(a){a&&po.push(a)});_.x("clpp.log.removeInterceptor",function(a){a&&(a=po.indexOf(a),0<=a&&po.splice(a,1))});_.x("clpp.log.getTagLevel",Df);_.x("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=xf[a]});_.x("clpp.log.setTagLevel",function(a,b){a&&(_.pf(b)&&(b=Ff(b)),xf[a]=b)});
241
- _.x("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.pf(a)&&(a=Ff(a));yf=a});_.x("clpp.log.getLogLevel",function(){return yf});
242
- _.O=class{constructor(a){(this.a=a)&&void 0===xf[a]&&(xf[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=Df(this.a);if(0<=d){if(d<c)return}else if(yf<c)return;this.a&&Array.prototype.unshift.call(arguments,"["+this.a+"]");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,arguments):
243
- 2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of po)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)}df(a){return a?
244
- this.a?new _.O(this.a+"."+a):new _.O(a):this}};_.x("clpp.log.Logger",_.O);_.O.prototype.createChild=_.O.prototype.df;_.O.prototype.error=_.O.prototype.error;_.O.prototype.warn=_.O.prototype.warn;_.O.prototype.debug=_.O.prototype.debug;_.O.prototype.info=_.O.prototype.info;_.O.prototype.log=_.O.prototype.log;var Gf=new _.O("clpp");_.x("clpp.log.info",_.Hf);_.x("clpp.log.debug",_.If);_.x("clpp.log.warn",_.B);_.x("clpp.log.error",_.Jf);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var $m,an;$m=class{constructor(a,b){this.Bb=a;this.a=b}};an=class{constructor(a,b){this.a=a;this.f=b}};_.Lf=new _.O("clpp.players");_.Kf={};_.qo=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 ro,so;ro=class{constructor(a,b,c,d){this.f=a;this.fc=b;this.a=c;this.Mf=!!d}Lb(a){try{this.fc.handleEvent?this.fc.handleEvent(a):this.fc.call(this.a,a)}catch(b){_.Jf("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
245
- _.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(){}};
246
- so=class{constructor(a){this.a=new _.qo;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].Lb(a),b[c].Mf&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new ro(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new ro(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].fc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var to;_.uo=class{constructor(){this.a=new _.qo}release(){_.Of(this)}on(a,b,c,d=!1){a=new to(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||(Nf(f),this.a.remove(b,f))}}};to=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 vo=class{constructor(a){this.l=a;this.m=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.h=null;this.f=new _.uo;this.a=this.j=null;this.g=[];this.o=new _.O("clpp.native.Metadata")}release(){this.f.release();this.g=[];this.a=null}destroy(){const a=this;return _.w(function*(){a.release();a.j=null;a.h=null})}getTimelineCues(){return this.g}};_.Co=class{constructor(a,b,c,d){d=void 0===d?_.wo:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.xo;this.writingMode=_.yo;this.lineInterpretation=_.zo;this.line=null;this.lineAlign=_.Ao;this.direction=Bo;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}};_.x("clpp.text.Cue",_.Co);_.Co.positionAlign={LEFT:_.ld,RIGHT:_.md,CENTER:_.uc,AUTO:"auto"};_.wo=_.r;
247
- _.Co.payloadType={TEXT:_.wo,VTT_XML:_.Oe,TTML_XML:_.xe};_.xo=_.uc;_.Do={LEFT:_.id,RIGHT:_.de,CENTER:_.xo,START:_.id,END:_.de};_.Co.textAlign=_.Do;var Bo="ltr";_.Co.direction={HORIZONTAL_LEFT_TO_RIGHT:Bo,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.yo="horizontal-tb";_.Co.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.yo,VERTICAL_LEFT_TO_RIGHT:_.Ge,VERTICAL_RIGHT_TO_LEFT:_.He};_.zo=0;_.Co.lineInterpretation={LINE_NUMBER:_.zo,PERCENTAGE:1};_.Ao=_.je;_.Eo={CENTER:_.uc,START:_.Ao,END:_.Yc};_.Co.lineAlign=_.Eo;
248
- _.Ho=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.Fo;this.scroll=Go;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.x("clpp.text.CueRegion",_.Ho);_.Fo=1;_.Ho.units={PX:0,PERCENTAGE:_.Fo,LINES:2};var Go="";_.Ho.scrollMode={NONE:Go,UP:"up"};_.Ho.displayAlign={BEFORE:"flex-end",CENTER:_.uc,AFTER:"flex-start"};
249
- _.Ho.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Gc,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var Io=class{constructor(a){this.l=a;this.j=a.getTextDisplayer();this.f=this.g=null;this.a=new _.uo;this.h=!1;this.m=new _.O("clpp.native.CueHandler")}destroy(){this.a.release();this.h=!1;this.j=this.a=this.g=this.f=null;return Promise.resolve()}start(a){this.h?this.m.warn("Already started. Ignoring request..."):(this.h=!0,this.g=a,this.f=this.g.textTracks,this.a.on(this.f,_.Nb,b=>Zf(this,b)),this.a.on(this.f,wc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.ge&&(d.mode=
250
- _.dd)}}}))}o(a){const b=new _.Co(a.startTime,a.endTime,a.text,_.Oe);if(_.pf(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Ge;break;case "rl":b.writingMode=_.He}_.qf(a.size)&&(b.size=a.size);if(_.pf(a.align))switch(a.align){case _.id:case _.je:b.textAlign=_.id;break;case _.uc:b.textAlign=_.xo;break;case _.de:case _.Yc:b.textAlign=_.de}_.qf(a.position)&&(b.position=a.position);if(_.pf(a.positionAlign))switch(a.positionAlign){case _.ld:b.positionAlign=_.ld;break;case _.uc:b.positionAlign=
251
- _.uc;break;case _.md:b.positionAlign=_.md}_.qf(a.line)&&(b.line=a.line);if(_.pf(a.lineAlign))switch(a.lineAlign){case _.je:b.lineAlign=_.Ao;break;case _.uc:b.lineAlign=_.uc;break;case _.Yc:b.lineAlign=_.Yc}typeof a.snapToLines===_.lc&&(b.lineInterpretation=a.snapToLines?_.zo:1);return b}};var jg=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;$e=_.eg.prototype;$e.Qa="";$e.cc="";$e.Ha="";$e.qc=null;$e.ta="";$e.Sb="";$e.toString=function(){var a=[],b=this.Qa;b&&a.push(mg(b,Jo,!0),":");if(b=this.Ha){a.push("//");var c=this.cc;c&&a.push(mg(c,Jo,!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.ta)this.Ha&&"/"!=b.charAt(0)&&a.push("/"),a.push(mg(b,"/"==b.charAt(0)?Ko:Lo,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Sb)&&a.push("#",mg(b,Mo));return a.join("")};
252
- $e.resolve=function(a){var b=new _.eg(this);"data"===b.Qa&&(b=new _.eg);var c=!!a.Qa;c?fg(b,a.Qa):c=!!a.cc;c?b.cc=a.cc:c=!!a.Ha;c?b.Ha=a.Ha:c=null!=a.qc;var d=a.ta;if(c)gg(b,a.qc);else if(c=!!a.ta){if("/"!=d.charAt(0))if(this.Ha&&!this.ta)d="/"+d;else{var e=b.ta.lastIndexOf("/");-1!=e&&(d=b.ta.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(""):
253
- ".."==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.ta=d:c=""!==a.a.toString();c?_.hg(b,ig(a.a)):c=!!a.Sb;c&&(b.Sb=a.Sb);return b};var Jo=/[#\/\?@]/g,Lo=/[#\?:]/g,Ko=/[#\?]/g,ng=/[#\?@]/g,Mo=/#/g;lg.prototype.a=null;lg.prototype.g=null;lg.prototype.add=function(a,b){_.pg(this);this.f=null;var c=this.a.hasOwnProperty(a)&&this.a[a];c||(this.a[a]=c=[]);c.push(b);null!==this.g&&this.g++;return this};
254
- lg.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")};_.No=1/15;var Oo;Oo={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Fh=(a,b)=>{const c=Oo[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===_.r?"":null};_.Po={text:{mp4:Vb,m4s:Vb,m4i:Vb,cmft:Vb,vtt:_.te,ttml:_.Yb},video:{mp4:_.Je,m4s:_.Je,m4i:_.Je,m4v:_.Je,cmfv:_.Je,ts:_.Ie},audio:{mp4:_.ec,m4s:_.ec,m4i:_.ec,m4a:_.ec,cmfa:_.ec,ts:_.Ie,aac:_.bc,ec3:_.dc,ac3:_.cc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.Ih=(a,b,c)=>a.map(d=>{d=_.Qo(d)||"";return d=(d=_.Po[b][d])?d:b===_.r?c&&"vtt"!==c?Vb:_.te:null}).filter(Boolean)[0]||null;
255
- _.Qo=a=>{a=(new _.eg(a)).ta.split(".");return 1>=a.length?null:a.pop()};_.G=class extends Error{constructor(a,b,c,d,e){super(qg(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.pf(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.G)}a(a){this.severity!==a&&(this.severity=a,this.message=qg(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.x("clpp.Error",_.G);_.F=2;_.G.Severity={RECOVERABLE:1,FATAL:_.F};
256
- _.G.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
257
- _.G.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,FETCH_OR_APPEND_ERROR:2010,INVALID_MP4:2011,
240
+ g.Pc(h.resolve,h.reject)};b.prototype.F=function(g,h){var k=this.g();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==_.bd?function(u){try{l(q(u))}catch(x){m(x)}}:t}var l,m,n=new b(function(q,t){l=q;m=t});this.Pc(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Pc=function(g,h){function k(){switch(l.f){case 1:g(l.j);break;case 2:h(l.j);break;default:throw Error("Unexpected state: "+
241
+ 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=cf(g),m=l.next();!m.done;m=l.next())d(m.value).Pc(h,k)})};b.all=function(g){var h=cf(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(x){q[u]=x;t--;0==t&&l(q)}}var q=[],t=0;do q.push(void 0),t++,d(k.value).Pc(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var hf=this||self;
242
+ hf.a=!0;_.z("clpp.utils.obj.cloneItem",_.lf);_.z("clpp.utils.obj.merge",_.kf);var zf={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",zf);var xf=3,wf={},po=[];_.z("clpp.log.getLoggers",function(){return _.lf(wf)});_.z("clpp.log.addInterceptor",function(a){a&&po.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=po.indexOf(a),0<=a&&po.splice(a,1))});_.z("clpp.log.getTagLevel",yf);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=wf[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.qf(b)&&(b=Af(b)),wf[a]=b)});
243
+ _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.qf(a)&&(a=Af(a));xf=a});_.z("clpp.log.getLogLevel",function(){return xf});
244
+ _.O=class{constructor(a){(this.a=a)&&void 0===wf[a]&&(wf[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=yf(this.a);if(0<=d){if(d<c)return}else if(xf<c)return;this.a&&Array.prototype.unshift.call(arguments,"["+this.a+"]");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,arguments):
245
+ 2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of po)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)}pf(a){return a?
246
+ this.a?new _.O(this.a+"."+a):new _.O(a):this}};_.z("clpp.log.Logger",_.O);_.O.prototype.createChild=_.O.prototype.pf;_.O.prototype.error=_.O.prototype.error;_.O.prototype.warn=_.O.prototype.warn;_.O.prototype.debug=_.O.prototype.debug;_.O.prototype.info=_.O.prototype.info;_.O.prototype.log=_.O.prototype.log;var Ff=new _.O("clpp");_.z("clpp.log.info",_.Gf);_.z("clpp.log.debug",_.Hf);_.z("clpp.log.warn",_.C);_.z("clpp.log.error",_.If);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var $m,an;$m=class{constructor(a,b){this.Fb=a;this.a=b}};an=class{constructor(a,b){this.a=a;this.f=b}};_.Kf=new _.O("clpp.players");_.Jf={};_.qo=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 ro,so;ro=class{constructor(a,b,c,d){this.f=a;this.hc=b;this.a=c;this.bg=!!d}Ob(a){try{this.hc.handleEvent?this.hc.handleEvent(a):this.hc.call(this.a,a)}catch(b){_.If("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
247
+ _.F=class{constructor(a,b){if(b)for(const c in b)this[c]=b[c];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.f=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.f=!0}stopPropagation(){}};
248
+ so=class{constructor(a){this.a=new _.qo;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].Ob(a),b[c].bg&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new ro(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new ro(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].hc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var to;_.uo=class{constructor(){this.a=new _.qo}release(){_.Nf(this)}on(a,b,c,d=!1){a=new to(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||(Mf(f),this.a.remove(b,f))}}};to=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 vo=class{constructor(a){this.l=a;this.m=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.h=null;this.f=new _.uo;this.a=this.j=null;this.g=[];this.o=new _.O("clpp.native.Metadata")}release(){this.f.release();this.g=[];this.a=null}destroy(){const a=this;return _.y(function*(){a.release();a.j=null;a.h=null})}getTimelineCues(){return this.g}};_.Co=class{constructor(a,b,c,d){d=void 0===d?_.wo:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.xo;this.writingMode=_.yo;this.lineInterpretation=_.zo;this.line=null;this.lineAlign=_.Ao;this.direction=Bo;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}};_.z("clpp.text.Cue",_.Co);_.Co.positionAlign={LEFT:_.ld,RIGHT:_.md,CENTER:_.uc,AUTO:"auto"};_.wo=_.v;
249
+ _.Co.payloadType={TEXT:_.wo,VTT_XML:_.Pe,TTML_XML:_.xe};_.xo=_.uc;_.Do={LEFT:_.id,RIGHT:_.de,CENTER:_.xo,START:_.id,END:_.de};_.Co.textAlign=_.Do;var Bo="ltr";_.Co.direction={HORIZONTAL_LEFT_TO_RIGHT:Bo,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.yo="horizontal-tb";_.Co.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.yo,VERTICAL_LEFT_TO_RIGHT:_.Ge,VERTICAL_RIGHT_TO_LEFT:_.Ie};_.zo=0;_.Co.lineInterpretation={LINE_NUMBER:_.zo,PERCENTAGE:1};_.Ao=_.je;_.Eo={CENTER:_.uc,START:_.Ao,END:_.Yc};_.Co.lineAlign=_.Eo;
250
+ _.Ho=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.Fo;this.scroll=Go;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.Ho);_.Fo=1;_.Ho.units={PX:0,PERCENTAGE:_.Fo,LINES:2};var Go="";_.Ho.scrollMode={NONE:Go,UP:"up"};_.Ho.displayAlign={BEFORE:"flex-end",CENTER:_.uc,AFTER:"flex-start"};
251
+ _.Ho.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Gc,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var Io=class{constructor(a){this.l=a;this.j=a.getTextDisplayer();this.f=this.g=null;this.a=new _.uo;this.h=!1;this.m=new _.O("clpp.native.CueHandler")}destroy(){this.a.release();this.h=!1;this.j=this.a=this.g=this.f=null;return Promise.resolve()}start(a){this.h?this.m.warn("Already started. Ignoring request..."):(this.h=!0,this.g=a,this.f=this.g.textTracks,this.a.on(this.f,_.Nb,b=>Yf(this,b)),this.a.on(this.f,wc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.ge&&(d.mode=
252
+ _.dd)}}}))}o(a){const b=new _.Co(a.startTime,a.endTime,a.text,_.Pe);if(_.qf(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Ge;break;case "rl":b.writingMode=_.Ie}_.rf(a.size)&&(b.size=a.size);if(_.qf(a.align))switch(a.align){case _.id:case _.je:b.textAlign=_.id;break;case _.uc:b.textAlign=_.xo;break;case _.de:case _.Yc:b.textAlign=_.de}_.rf(a.position)&&(b.position=a.position);if(_.qf(a.positionAlign))switch(a.positionAlign){case _.ld:b.positionAlign=_.ld;break;case _.uc:b.positionAlign=
253
+ _.uc;break;case _.md:b.positionAlign=_.md}_.rf(a.line)&&(b.line=a.line);if(_.qf(a.lineAlign))switch(a.lineAlign){case _.je:b.lineAlign=_.Ao;break;case _.uc:b.lineAlign=_.uc;break;case _.Yc:b.lineAlign=_.Yc}typeof a.snapToLines===_.ic&&(b.lineInterpretation=a.snapToLines?_.zo:1);return b}};var ig=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;af=_.dg.prototype;af.Sa="";af.dc="";af.La="";af.vc=null;af.wa="";af.Ub="";af.toString=function(){var a=[],b=this.Sa;b&&a.push(lg(b,Jo,!0),":");if(b=this.La){a.push("//");var c=this.dc;c&&a.push(lg(c,Jo,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.vc;null!=b&&a.push(":",String(b))}if(b=this.wa)this.La&&"/"!=b.charAt(0)&&a.push("/"),a.push(lg(b,"/"==b.charAt(0)?Ko:Lo,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Ub)&&a.push("#",lg(b,Mo));return a.join("")};
254
+ af.resolve=function(a){var b=new _.dg(this);"data"===b.Sa&&(b=new _.dg);var c=!!a.Sa;c?eg(b,a.Sa):c=!!a.dc;c?b.dc=a.dc:c=!!a.La;c?b.La=a.La:c=null!=a.vc;var d=a.wa;if(c)fg(b,a.vc);else if(c=!!a.wa){if("/"!=d.charAt(0))if(this.La&&!this.wa)d="/"+d;else{var e=b.wa.lastIndexOf("/");-1!=e&&(d=b.wa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):
255
+ ".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.wa=d:c=""!==a.a.toString();c?_.gg(b,hg(a.a)):c=!!a.Ub;c&&(b.Ub=a.Ub);return b};var Jo=/[#\/\?@]/g,Lo=/[#\?:]/g,Ko=/[#\?]/g,mg=/[#\?@]/g,Mo=/#/g;kg.prototype.a=null;kg.prototype.g=null;kg.prototype.add=function(a,b){_.og(this);this.f=null;var c=this.a.hasOwnProperty(a)&&this.a[a];c||(this.a[a]=c=[]);c.push(b);null!==this.g&&this.g++;return this};
256
+ kg.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")};_.No=1/15;var Oo;Oo={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Oh=(a,b)=>{const c=Oo[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===_.v?"":null};_.Po={text:{mp4:Wb,m4s:Wb,m4i:Wb,cmft:Wb,vtt:_.te,ttml:_.Zb},video:{mp4:_.Ke,m4s:_.Ke,m4i:_.Ke,m4v:_.Ke,cmfv:_.Ke,ts:_.Je},audio:{mp4:_.ec,m4s:_.ec,m4i:_.ec,m4a:_.ec,cmfa:_.ec,ts:_.Je,aac:_.bc,ec3:_.dc,ac3:_.cc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.Ro=(a,b,c)=>{a=_.Qo(a)||"";return(a=_.Po[b][a])?a:b===_.v?c&&"vtt"!==c?Wb:_.te:null};_.Rh=(a,b,c)=>a.map(d=>_.Ro(d,b,c)).filter(Boolean)[0]||null;
257
+ _.Qo=a=>{a=(new _.dg(a)).wa.split(".");return 1>=a.length?null:a.pop()};_.H=class extends Error{constructor(a,b,c,d,e){super(pg(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.qf(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=pg(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.z("clpp.Error",_.H);_.G=2;_.H.Severity={RECOVERABLE:1,FATAL:_.G};
258
+ _.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
259
+ _.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,
258
260
  TEXT_PARSER_MISSING:2012,THUMBNAILS_FAILED_TO_LOAD:2013,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,
259
261
  MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,MP4_PARSER_ERROR:3019,MEDIA_LOAD_ERROR:3100,INVALID_TRACK_TYPE:3101,UNKNOWN_TRACK:3102,MEDIA_DECRYPTION_ERROR:3103,PLAY_NOT_ALLOWED:3200,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,
260
262
  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,
261
- 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,INVALID_STREAMS_CHOSEN:5005,
262
- NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,
263
- 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,INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,KEY_LOAD_ERROR:7104,TIZEN_INTERNAL_ERROR:7200,
264
- 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,VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,
265
- IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3};_.xg=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}};_.wg=class{constructor(a,b){this.name=a;this.value=b}};_.vg=class{constructor(a){this.f=a;this.a=0}};var Ro=class{};_.x("clpp.utils.BufferUtils",Ro);Ro.toArrayBuffer=Gg;Ro.toDataView=_.Fg;Ro.toInt32Array=_.Eg;Ro.toUint32Array=Dg;Ro.toUint16Array=Cg;Ro.toUint8Array=_.H;Ro.equal=Ag;var Jg=new _.O("clpp.utils.strings");_.x("clpp.utils.strings.fromUtf8",_.Ig);_.x("clpp.utils.strings.fromBytesAutoDetect",_.Lg);_.x("clpp.utils.strings.toUtf8",_.Mg);_.x("clpp.utils.strings.toUtf16",_.Ng);_.x("clpp.utils.strings.toByteArray",_.Og);_.x("clpp.utils.strings.startsWith",_.Pg);_.x("clpp.utils.strings.endsWith",_.Sg);_.x("clpp.utils.strings.bitrateToString",_.Vg);
266
- _.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)))});
267
- _.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 Wg=document.createElement("span");var Yg=[403,401];_.x("clpp.net.DEFAULT_FATAL_STATUS_CODES",Yg);_.x("clpp.net.makeRequest",_.bh);_.ah=6;_.x("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.ah});_.Xk=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(){}};_.dm=class{constructor(a,b){this.P=a;this.w=b;this.a=!1}abort(){this.a=!0;return this.w()}Kc(a,b){const c=new _.Xk;let d=()=>{c.reject(new _.G(_.F,7,7001));return this.abort()};this.P.then(e=>{this.a?c.reject(new _.G(_.F,7,7001)):a?d=gh(a,e,c):c.resolve(e)},e=>{b?d=gh(b,e,c):c.reject(e)});return new _.dm(c,()=>d())}};_.dm.aborted=function(){const a=Promise.reject(new _.G(_.F,7,7001));a.catch(()=>{});return new _.dm(a,()=>Promise.resolve())};_.dm.prototype.chain=_.dm.prototype.Kc;_.So=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)}};_.Pm=class{constructor(){this.f=[];this.g=[];this.m=!1;this.j=new _.So;this.a={};this.h=0;this.a.data=ho;!window.fetch||!window.AbortController||_.Xh(6)||_.$h()&&68<_.wi().browserVersion.major?(this.a.http=Pn,this.a.https=Pn):(this.a.http=bo,this.a.https=bo)}Sf(a){0<a?_.B("Rate limit set to "+a+"bps"):_.B("Rate limit disabled");this.h=a}release(){return this.j.destroy()}destroy(){this.m=!0;this.f=[];this.g=[];return this.j.destroy()}Ve(a){this.f.push(a)}dd(a){this.g.push(a)}Nf(a){this.f=this.f.filter(b=>
268
- b!==a)}Pd(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.m)return new To(Promise.reject(new _.G(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.h&&0<this.h&&(a.rateLimitBps=this.h);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 _.Xk;try{for(const f of a.requestModifiers)d=d.then(g=>
269
- {if(e.a)throw new _.G(_.F,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.G)throw g;throw new _.G(_.F,1,1006,null,g);});d=d.then(f=>{var g=new _.eg(f.uris[f.uriIndex]);var h=g.Qa;h||(h=location.protocol,h=h.slice(0,-1),fg(g,h),f.uris[f.uriIndex]=g.toString());h=this.a[h];if(!h)throw new _.G(_.F,1,1E3,{url:g.toString()});g=h;return{request:f,plugin:g}});e=new To(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.G(_.F,1,7001,
270
- g?{url:g.request.uris[g.request.uriIndex],request:g.request}:null);};h();const k=f(g)||g;h();return k}).catch(g=>{if(g instanceof _.G&&g.data&&g.data.response){const h=f(g.data.response);if(h)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.G)throw g;throw new _.G(_.F,1,1007,null,g);});_.ih(this.j,e);c.resolve(a);return e}catch(f){return new To(Promise.reject(f))}}};_.x("clpp.net.NetworkEngine",_.Pm);_.Pm.prototype.fetch=_.Pm.prototype.fetch;
271
- _.Pm.prototype.removeResponseModifier=_.Pm.prototype.Pd;_.Pm.prototype.removeRequestModifier=_.Pm.prototype.Nf;_.Pm.prototype.addResponseModifier=_.Pm.prototype.dd;_.Pm.prototype.addRequestModifier=_.Pm.prototype.Ve;_.Pm.prototype.setRateLimit=_.Pm.prototype.Sf;var mh;_.ph=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.channelsCount=this.src=this.mimeType=this.frameRate=this.label=this.language=this.kind=null;this.renditions=[];this.accessibility=[]}toString(){return`Track type: ${this.type} id: ${this.id}
272
- renditions size: ${this.renditions.length}`}};_.x("clpp.Track",_.ph);_.ph.prototype.toString=_.ph.prototype.toString;_.xh=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}};_.x("clpp.Rendition",_.xh);_.oh=1;_.K=_.v;_.J=_.ac;_.I=_.r;mh=_.td;_.Uo={VIDEO:_.K,AUDIO:_.J,TEXT:_.I,METADATA:mh};_.ph.Type=_.Uo;_.Kj=class{constructor(a){this.h=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;
273
- _.Pg(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.g=b.hash}};_.x("clpp.utils.url.queryString",_.sh);var Vo=class{constructor(a){this.g=a;this.a=new _.O("clpp.native.hls.HlsMetadataParser");this.f=cg(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 _.w(function*(){let d=null;try{d=yield vh(c,a)}catch(f){return c.a.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield zh(c,d,
274
- a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.a.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield Bh(d);e.ue=f}catch(f){c.a.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.Jh=[];_.P=class{hd(){return!0}mf(a){return this.getVideoTracks().find(b=>_.rf(b,a,a&&Object.keys(a)))}hf(a){return this.getAudioTracks().find(b=>_.rf(b,a,a&&Object.keys(a)))}kf(a){return this.ga().find(b=>_.rf(b,a,a&&Object.keys(a)))}lf(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.rf(b,a,a&&Object.keys(a)))}gf(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.rf(b,a,a&&Object.keys(a)))}jf(a){return this.ga().flatMap(b=>b.renditions).find(b=>_.rf(b,a,a&&Object.keys(a)))}};
275
- _.x("clpp.TrackManager",_.P);_.P.prototype.isAbrEnabled=_.P.prototype.ia;_.P.prototype.addTextTrack=_.P.prototype.addTextTrack;_.P.prototype.findTextRendition=_.P.prototype.jf;_.P.prototype.findAudioRendition=_.P.prototype.gf;_.P.prototype.findVideoRendition=_.P.prototype.lf;_.P.prototype.findTextTrack=_.P.prototype.kf;_.P.prototype.findAudioTrack=_.P.prototype.hf;_.P.prototype.findVideoTrack=_.P.prototype.mf;_.P.prototype.setTextRendition=_.P.prototype.ib;_.P.prototype.setAudioRendition=_.P.prototype.hb;
276
- _.P.prototype.setVideoRendition=_.P.prototype.Ra;_.P.prototype.setTextTrack=_.P.prototype.ya;_.P.prototype.setAudioTrack=_.P.prototype.pa;_.P.prototype.setVideoTrack=_.P.prototype.Sa;_.P.prototype.getTextTrack=_.P.prototype.la;_.P.prototype.getAudioTrack=_.P.prototype.ka;_.P.prototype.getVideoTrack=_.P.prototype.Ca;_.P.prototype.getLoadingTextRendition=_.P.prototype.bb;_.P.prototype.getLoadingAudioRendition=_.P.prototype.ab;_.P.prototype.getLoadingVideoRendition=_.P.prototype.Na;
277
- _.P.prototype.getTextRendition=_.P.prototype.Ba;_.P.prototype.getAudioRendition=_.P.prototype.Aa;_.P.prototype.getVideoRendition=_.P.prototype.fa;_.P.prototype.getTextTracks=_.P.prototype.ga;_.P.prototype.getAudioTracks=_.P.prototype.getAudioTracks;_.P.prototype.getVideoTracks=_.P.prototype.getVideoTracks;_.P.prototype.canSelectVideoTracks=_.P.prototype.hd;var Mh=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",
263
+ 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,
264
+ HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEATURE:4046,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,EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,
265
+ 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,INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,
266
+ 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,VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,
267
+ MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3};_.eh=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}};_.dh=class{constructor(a,b){this.name=a;this.value=b}};var rg=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",
278
268
  "cs"],["dan","da"],["deu","de"],[_.Qc,"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",
279
269
  "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",
280
270
  "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",
281
271
  "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",
282
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);_.Wo=(new Map).set(_.Fc,_.Fc).set("frameRate","framerate").set("bandwidth","bitrate").set(_.We,_.We).set(_.cd,_.cd).set("channelsCount","channels");_.Xo=class{constructor(a){this.f=a;this.a=null}$(a){return Qh(this,a,!1)}Ua(a){return Qh(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Th=class{constructor(a){this.f=a;this.a=null}Xd(){this.stop();this.f();return this}$(a){this.stop();this.a=(new _.Xo(()=>{this.f()})).$(a);return this}Ua(a){this.stop();this.a=(new _.Xo(()=>{this.f()})).Ua(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.x("clpp.utils.Timer",_.Th);_.Th.prototype.stop=_.Th.prototype.stop;_.Th.prototype.tickEvery=_.Th.prototype.Ua;_.Th.prototype.tickAfter=_.Th.prototype.$;_.Th.prototype.tickNow=_.Th.prototype.Xd;var Yo=class{};_.x(Ec,Yo);Yo.getInfo=_.wi;
283
- var Sh=null,Rh=null,ji=new _.O(Ec),pi="android",oi="ios",ui="linux",qi="osx",ri="windows",si="tizen",ti="webos",ni=ze,vi=ze,ei={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,
272
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var So=class{};_.z("clpp.utils.BufferUtils",So);So.toArrayBuffer=Dg;So.toDataView=_.Cg;So.toInt32Array=_.Bg;So.toUint32Array=Ag;So.toUint16Array=zg;So.toUint8Array=_.I;So.equal=xg;var Gg=new _.O("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.Fg);_.z("clpp.utils.strings.fromBytesAutoDetect",_.Ig);_.z("clpp.utils.strings.toUtf8",_.Jg);_.z("clpp.utils.strings.toUtf16",_.Kg);_.z("clpp.utils.strings.toByteArray",_.Lg);_.z("clpp.utils.strings.startsWith",_.Mg);_.z("clpp.utils.strings.endsWith",_.Ng);_.z("clpp.utils.strings.bitrateToString",_.Qg);
273
+ _.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)))});
274
+ _.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 Rg=document.createElement("span");var To=class{};_.z("clpp.utils.Uint8ArrayUtils",To);To.toStandardBase64=_.Tg;To.concat=_.ah;To.equal=_.$g;To.toHex=_.Zg;To.fromHex=_.Yg;To.fromBase64=_.Xg;To.toBase64Url=_.Wg;_.ch=class{constructor(a){this.f=a;this.a=0}};var gh=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",gh);_.z("clpp.net.makeRequest",_.kh);_.jh=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.jh});_.Xk=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(){}};_.dm=class{constructor(a,b){this.P=a;this.w=b;this.a=!1}abort(){this.a=!0;return this.w()}Rc(a,b){const c=new _.Xk;let d=()=>{c.reject(new _.H(_.G,7,7001));return this.abort()};this.P.then(e=>{this.a?c.reject(new _.H(_.G,7,7001)):a?d=ph(a,e,c):c.resolve(e)},e=>{b?d=ph(b,e,c):c.reject(e)});return new _.dm(c,()=>d())}};_.dm.aborted=function(){const a=Promise.reject(new _.H(_.G,7,7001));a.catch(()=>{});return new _.dm(a,()=>Promise.resolve())};_.dm.prototype.chain=_.dm.prototype.Rc;_.Uo=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)}};_.Pm=class{constructor(){this.f=[];this.g=[];this.m=!1;this.j=new _.Uo;this.a={};this.h=0;this.a.data=ho;!window.fetch||!window.AbortController||_.ci(6)||_.fi()&&68<_.Ci().browserVersion.major?(this.a.http=Pn,this.a.https=Pn):(this.a.http=bo,this.a.https=bo)}hg(a){0<a?_.C("Rate limit set to "+a+"bps"):_.C("Rate limit disabled");this.h=a}release(){return this.j.destroy()}destroy(){this.m=!0;this.f=[];this.g=[];return this.j.destroy()}df(a){this.f.push(a)}hd(a){this.g.push(a)}cg(a){this.f=this.f.filter(b=>
275
+ b!==a)}Sd(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.m)return new Vo(Promise.reject(new _.H(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.h&&0<this.h&&(a.rateLimitBps=this.h);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 _.Xk;try{for(const f of a.requestModifiers)d=d.then(g=>
276
+ {if(e.a)throw new _.H(_.G,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.G,1,1006,null,g);});d=d.then(f=>{var g=new _.dg(f.uris[f.uriIndex]);var h=g.Sa;h||(h=location.protocol,h=h.slice(0,-1),eg(g,h),f.uris[f.uriIndex]=g.toString());h=this.a[h];if(!h)throw new _.H(_.G,1,1E3,{url:g.toString()});g=h;return{request:f,plugin:g}});e=new Vo(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.G,1,7001,
277
+ 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)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.G,1,1007,null,g);});_.rh(this.j,e);c.resolve(a);return e}catch(f){return new Vo(Promise.reject(f))}}};_.z("clpp.net.NetworkEngine",_.Pm);_.Pm.prototype.fetch=_.Pm.prototype.fetch;
278
+ _.Pm.prototype.removeResponseModifier=_.Pm.prototype.Sd;_.Pm.prototype.removeRequestModifier=_.Pm.prototype.cg;_.Pm.prototype.addResponseModifier=_.Pm.prototype.hd;_.Pm.prototype.addRequestModifier=_.Pm.prototype.df;_.Pm.prototype.setRateLimit=_.Pm.prototype.hg;var vh;_.yh=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.channelsCount=this.src=this.mimeType=this.frameRate=this.label=this.language=this.kind=null;this.renditions=[];this.accessibility=[]}toString(){return`Track type: ${this.type} id: ${this.id}
279
+ renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.yh);_.yh.prototype.toString=_.yh.prototype.toString;_.Gh=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.drm=this.drmInfo=this.codec=this.yc=this.bandwidth=this.height=this.width=null}};_.z("clpp.Rendition",_.Gh);_.xh=1;_.L=_.w;_.K=_.p;_.J=_.v;vh=_.td;_.Wo={VIDEO:_.L,AUDIO:_.K,TEXT:_.J,METADATA:vh};_.yh.Type=_.Wo;_.Kj=class{constructor(a){this.h=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;
280
+ _.Mg(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.g=b.hash}};_.z("clpp.utils.url.queryString",_.Bh);var Xo=class{constructor(a){this.g=a;this.a=new _.O("clpp.native.hls.HlsMetadataParser");this.f=bg(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 _.y(function*(){let d=null;try{d=yield Eh(c,a)}catch(f){return c.a.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield Ih(c,d,
281
+ a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.a.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield Kh(d);e.tc=f}catch(f){c.a.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.Sh=[];_.P=class{md(){return!0}xf(a){return this.getVideoTracks().find(b=>_.sf(b,a,a&&Object.keys(a)))}tf(a){return this.getAudioTracks().find(b=>_.sf(b,a,a&&Object.keys(a)))}vf(a){return this.ja().find(b=>_.sf(b,a,a&&Object.keys(a)))}wf(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.sf(b,a,a&&Object.keys(a)))}sf(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.sf(b,a,a&&Object.keys(a)))}uf(a){return this.ja().flatMap(b=>b.renditions).find(b=>_.sf(b,a,a&&Object.keys(a)))}};
282
+ _.z("clpp.TrackManager",_.P);_.P.prototype.isAbrEnabled=_.P.prototype.la;_.P.prototype.addTextTrack=_.P.prototype.addTextTrack;_.P.prototype.findTextRendition=_.P.prototype.uf;_.P.prototype.findAudioRendition=_.P.prototype.sf;_.P.prototype.findVideoRendition=_.P.prototype.wf;_.P.prototype.findTextTrack=_.P.prototype.vf;_.P.prototype.findAudioTrack=_.P.prototype.tf;_.P.prototype.findVideoTrack=_.P.prototype.xf;_.P.prototype.setTextRendition=_.P.prototype.jb;_.P.prototype.setAudioRendition=_.P.prototype.ib;
283
+ _.P.prototype.setVideoRendition=_.P.prototype.Ta;_.P.prototype.setTextTrack=_.P.prototype.Ba;_.P.prototype.setAudioTrack=_.P.prototype.sa;_.P.prototype.setVideoTrack=_.P.prototype.Ua;_.P.prototype.getTextTrack=_.P.prototype.oa;_.P.prototype.getAudioTrack=_.P.prototype.na;_.P.prototype.getVideoTrack=_.P.prototype.Ga;_.P.prototype.getLoadingTextRendition=_.P.prototype.cb;_.P.prototype.getLoadingAudioRendition=_.P.prototype.bb;_.P.prototype.getLoadingVideoRendition=_.P.prototype.Pa;
284
+ _.P.prototype.getTextRendition=_.P.prototype.Ea;_.P.prototype.getAudioRendition=_.P.prototype.Da;_.P.prototype.getVideoRendition=_.P.prototype.ia;_.P.prototype.getTextTracks=_.P.prototype.ja;_.P.prototype.getAudioTracks=_.P.prototype.getAudioTracks;_.P.prototype.getVideoTracks=_.P.prototype.getVideoTracks;_.P.prototype.canSelectVideoTracks=_.P.prototype.md;_.Yo=(new Map).set(_.Fc,_.Fc).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Xe,_.Xe).set(_.cd,_.cd).set("channelsCount","channels");_.Zo=class{constructor(a){this.f=a;this.a=null}$(a){return Wh(this,a,!1)}Va(a){return Wh(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Zh=class{constructor(a){this.f=a;this.a=null}$d(){this.stop();this.f();return this}$(a){this.stop();this.a=(new _.Zo(()=>{this.f()})).$(a);return this}Va(a){this.stop();this.a=(new _.Zo(()=>{this.f()})).Va(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.Zh);_.Zh.prototype.stop=_.Zh.prototype.stop;_.Zh.prototype.tickEvery=_.Zh.prototype.Va;_.Zh.prototype.tickAfter=_.Zh.prototype.$;_.Zh.prototype.tickNow=_.Zh.prototype.$d;var $o=class{};_.z(Ec,$o);$o.getInfo=_.Ci;
285
+ var Yh=null,Xh=null,pi=new _.O(Ec),vi="android",ui="ios",Ai="linux",wi="osx",xi="windows",yi="tizen",zi="webos",ri=ze,Bi=ze,ki={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,
284
286
  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,
285
287
  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},
286
- 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 Q=class extends _.P{constructor(){super();this.a=new _.O("clpp.native.TrackManager");this.l=null;this.g=new _.uo;this.h=[];this.G=0;this.o={};this.I=[];this.f=new Map;this.w=null;this.m=new Map;this.A=!0;this.N=this.B.bind(this,_.I);this.S=this.F.bind(this,_.I);this.R=this.C.bind(this,_.I);this.U=this.B.bind(this,_.K);this.W=this.F.bind(this,_.K);this.V=this.C.bind(this,_.K);this.J=this.B.bind(this,_.J);this.L=this.F.bind(this,_.J);this.K=this.C.bind(this,_.J);this.j=null}hd(){return!_.gi()}B(a,
287
- b){const c=this;return _.w(function*(){if(b){var d=b.track;if(d){var e=c.h.find(h=>xi(h,d,a));if(e)c.a.warn("Track from event already exists",d,e);else{var f=qh(a,d),g=yi(d);if(a===_.I){if(d.kind===_.td)return;let h;void 0!==d.id?h=c.o[d.id]:h=Object.values(c.o).find(k=>xi(f,k,a));f.kind&&"captions"===f.kind&&(f.mimeType=_.Tb);h&&(f.src=h.url,f.mimeType=h.mimeType)}else if(e=c.h.find(h=>h.type===a&&_.rf(h,f,["kind","label","language"]))){e.id=d.id;g&&(c.a.debug(`Setting native ${a} track active`),
288
- c.f.set(a,e));c.a.debug("Track from event seems to already exists, flipped native track to",d);return}try{f.renditions.push(new _.xh(f.id,f));c.h.push(f);const h=c.l.getConfiguration().safari;Ai(c,a,h)?yield Bi(c,f,h):Ci(c,a,h)&&(yield Di(c,f,h));c.a.debug(a+" Track added",f);c.l.trigger(new _.C(_.Zo));const k=Ei(c,a).length;e=a===_.K||a===_.J;if(g||1===k&&e)c.a.debug(`Setting native ${a} track active. `+`Native track active: ${g}. `+`Number of tracks: ${k}`,d),c.f.set(a,f)}catch(h){c.a.error("Error while converting track data",
289
- h)}}}else c.a.warn(Qa)}else c.a.warn(Pa)})}F(a,b){if(b){var c=b.track;c?a===_.I&&c.kind!==_.td&&(b=this.h.find(d=>xi(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.f.get(a)||null)===b&&(this.f.set(a,null),Fi(this)),this.a.debug(a+" Track removed, id: ",b.id)):this.a.warn(Qa)}else this.a.warn(Pa)}C(a,b){this.a.debug(a+" Track changed",b);a===_.I&&Fi(this);const c=Hi(this,a);if(c)for(let d=0;d<c.length;++d)if(yi(c[d])){if(b=this.h.find(e=>xi(e,c[d],a)))this.f.set(a,b),this.a.debug("Track change detected, id:",
290
- b.id),b===this.m.get(a)&&this.m.set(a,null),a===_.J?this.l.trigger(new _.C(_.Ki)):a===_.I&&this.l.trigger(new _.C(_.Li));break}}initialize(a){this.l=a;this.j=new Vo(a.getNetworkEngine())}load(){this.A=!1;var a=Gi(this,_.I);a&&(this.g.on(a,_.Nb,this.N),this.g.on(a,ae,this.S),this.g.on(a,wc,this.R));if(a=Gi(this,_.J))this.g.on(a,_.Nb,this.J),this.g.on(a,ae,this.L),this.g.on(a,wc,this.K);if(a=Gi(this,_.K))this.g.on(a,_.Nb,this.U),this.g.on(a,ae,this.W),this.g.on(a,wc,this.V);this.g.one(this.l,pc,this.H.bind(this))}release(){this.A=
291
- !0;this.h=[];this.o={};this.f.clear();this.m.clear();this.g.release()}destroy(){this.release();this.l=null}getVideoTracks(){return Ei(this,_.K)}getAudioTracks(){return Ei(this,_.J)}ga(){return Ei(this,_.I)}fa(){const a=this.f.get(_.K)||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]||null}Aa(){return Ii(this,_.J)}Ba(){return Ii(this,_.I)}Na(){return Ji(this,_.K)}ab(){return Ji(this,_.J)}bb(){return Ji(this,
292
- _.I)}Ca(){return this.f.get(_.K)||null}ka(){return this.f.get(_.J)||null}la(){return this.f.get(_.I)||null}Sa(a){Mi(this,_.K,a)}pa(a){Mi(this,_.J,a)}ya(a){Mi(this,_.I,a)}Ra(a){Mi(this,_.K,a&&a.track)}hb(a){Mi(this,_.J,a&&a.track)}ib(a){Mi(this,_.I,a&&a.track)}addTextTrack(a){const b=this;return _.w(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;b.o[c]=a;Ni(b,a,c)}else yield Oi(b,a)})}ia(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;
293
- return _.w(function*(){const b=a.l.getConfiguration();Qi(a,_.J,b.preferredAudioLanguage);if(!Hi(a,_.I).some(c=>yi(c))){const c=Gi(a,_.I);yield new Promise(d=>{a.g.one(c,wc,d);(new _.Th(d)).$(1)})}a.A||Qi(a,_.I,b.preferredTextLanguage)})}};Q.prototype.isAbrEnabled=Q.prototype.ia;Q.prototype.addTextTrack=Q.prototype.addTextTrack;Q.prototype.setTextRendition=Q.prototype.ib;Q.prototype.setAudioRendition=Q.prototype.hb;Q.prototype.setVideoRendition=Q.prototype.Ra;Q.prototype.setTextTrack=Q.prototype.ya;
294
- Q.prototype.setAudioTrack=Q.prototype.pa;Q.prototype.setVideoTrack=Q.prototype.Sa;Q.prototype.getTextTrack=Q.prototype.la;Q.prototype.getAudioTrack=Q.prototype.ka;Q.prototype.getVideoTrack=Q.prototype.Ca;Q.prototype.getLoadingTextRendition=Q.prototype.bb;Q.prototype.getLoadingAudioRendition=Q.prototype.ab;Q.prototype.getLoadingVideoRendition=Q.prototype.Na;Q.prototype.getTextRendition=Q.prototype.Ba;Q.prototype.getAudioRendition=Q.prototype.Aa;Q.prototype.getVideoRendition=Q.prototype.fa;
295
- Q.prototype.getTextTracks=Q.prototype.ga;Q.prototype.getAudioTracks=Q.prototype.getAudioTracks;Q.prototype.getVideoTracks=Q.prototype.getVideoTracks;Q.prototype.canSelectVideoTracks=Q.prototype.hd;_.$o=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(lb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(lb);}lb(){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)}va(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
296
- 1)}Wb(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}za(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.va(),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=
297
- "";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",_.$o);_.$o.prototype.bufferedAheadOf=_.$o.prototype.za;_.$o.prototype.isBuffered=_.$o.prototype.Wb;_.$o.prototype.bufferEnd=_.$o.prototype.va;_.$o.prototype.bufferStart=_.$o.prototype.lb;_.$o.prototype.end=_.$o.prototype.end;_.$o.prototype.start=_.$o.prototype.start;_.ap=class{constructor(){this.yc=new so(this);this.wc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.yc.on(a,b,c)}one(a,b,c){return this.yc.one(a,b,c)}off(a,b){return this.yc.off(a,b)}addDelegate(a){a&&(0<=this.wc.indexOf(a)||this.wc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}removeDelegate(a){a&&(a=this.wc.indexOf(a),0<=a&&this.wc.splice(a,1))}trigger(a){this.yc.trigger(a);for(const b of this.wc)b.dispatchEvent(a)}};
298
- _.ap.prototype.off=_.ap.prototype.off;_.ap.prototype.one=_.ap.prototype.one;_.ap.prototype.on=_.ap.prototype.on;_.ap.prototype.removeEventListener=_.ap.prototype.removeEventListener;_.ap.prototype.addEventListener=_.ap.prototype.addEventListener;_.x("clpp.events.ERROR",_.$c);_.x("clpp.events.LOADEDMETADATA",_.od);_.x("clpp.events.BUFFERING_ENDED",_.mc);_.x("clpp.events.BUFFERING_STARTED",_.nc);_.x("clpp.events.STATE_CHANGED",_.ke);_.Ki="audiotrackchanged";_.x("clpp.events.AUDIO_TRACK_CHANGED",_.Ki);_.Li="texttrackchanged";_.x("clpp.events.TEXT_TRACK_CHANGED",_.Li);_.x("clpp.events.VIDEO_TRACK_CHANGED",_.Le);_.x("clpp.events.BITRATE_CHANGED",_.hc);_.Zo="tracksadded";_.x("clpp.events.TRACKS_ADDED",_.Zo);_.x("clpp.events.LOAD_START",pd);
299
- _.x("clpp.events.RELEASING",_.$d);_.x("clpp.events.RELEASED",Zd);_.x("clpp.events.DESTROYING","destroying");_.x("clpp.events.DESTROYED","destroyed");_.x("clpp.events.VIDEO_BUFFER_CHANGED",_.Ke);_.x("clpp.events.AUDIO_BUFFER_CHANGED",_.fc);_.x("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.x("clpp.events.DRM_SESSION_UPDATE",_.Uc);_.x("clpp.events.DRM_SESSION_PERSISTED",_.Tc);_.x("clpp.events.DRM_RENEWAL_STARTED",Sc);_.x("clpp.events.DRM_EXPIRATION_UPDATE",_.Rc);
300
- _.x("clpp.events.AUTOPLAY_NOT_ALLOWED",_.gc);_.x("clpp.events.PLAY",_.Sd);_.x("clpp.events.SEEKING",_.fe);_.x("clpp.events.SEEKED",_.ee);_.x("clpp.events.USER_SEEKING",_.Ee);_.x("clpp.events.USER_SEEKED",_.Ce);_.Ml={SEEKING:1,NO_DATA:2};_.x("clpp.events.BufferingReasons",_.Ml);_.x("clpp.events.ADS_TIMELINE_CHANGED",_.Ob);_.x("clpp.events.AD_LOADED",_.Eb);_.x("clpp.events.AD_BREAK_STARTED",_.xb);_.x("clpp.events.AD_STARTED",_.Kb);_.x("clpp.events.AD_BUFFERING",_.zb);_.x("clpp.events.AD_PROGRESS",_.Hb);
301
- _.x("clpp.events.AD_FIRST_QUARTILE",_.Cb);_.x("clpp.events.AD_MIDPOINT",_.Fb);_.x("clpp.events.AD_THIRD_QUARTILE",_.Mb);_.x("clpp.events.AD_PAUSED",_.Gb);_.x("clpp.events.AD_RESUMED",_.Ib);_.x("clpp.events.AD_SKIPPED",_.Jb);_.x("clpp.events.AD_CLICKED",_.Ab);_.x("clpp.events.AD_IMPRESSION",_.Db);_.x("clpp.events.AD_COMPLETED",_.Bb);_.x("clpp.events.AD_STOPPED",_.Lb);_.x("clpp.events.AD_BREAK_STOPPED",_.yb);_.x("clpp.events.CASTING_STARTED",_.qc);_.x("clpp.events.CASTING_ENDED","castingended");
302
- _.x("clpp.events.CAST_STATUS_CHANGED",_.rc);_.x("clpp.events.AIRPLAY_STATUS_CHANGED",_.Sb);_.x("clpp.events.AIRPLAY_CASTING_STARTED",_.Rb);_.x("clpp.events.AIRPLAY_CASTING_ENDED",_.Pb);_.Tf="timeline-cue-added";_.x("clpp.events.TIMELINE_CUE_ADDED",_.Tf);_.Vf="timeline-cue-enter";_.x("clpp.events.TIMELINE_CUE_ENTER",_.Vf);_.Wf="timeline-cue-exit";_.x("clpp.events.TIMELINE_CUE_EXIT",_.Wf);_.x("clpp.events.MPD_TYPE_CHANGED",_.yd);_.x("clpp.events.VIMOND_RESPONSE",_.Me);
303
- _.x("clpp.events.PLAYLIST_ITEM_CHANGED",_.Ud);_.x("clpp.events.PLAYLIST_MODIFIED",_.Vd);_.x("clpp.events.CDN_SWITCH_SUCCESS",_.sc);_.x("clpp.events.ONLINE_STATUS_CHANGED",Id);var Ri=["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"];var bp=class{};_.x("clpp.utils.PlayerConfiguration",bp);bp.create=_.Xi;var cp=["abort",oc,pc,Wc,"emptied",Xc,_.Zc,_.$c,"interruptbegin","interruptend",_.nd,_.od,pd,"mozaudioavailable",_.Od,_.Sd,_.Td,_.Wd,_.Yd,_.ee,_.fe,ie,"suspend",_.ve,"volumechange",_.Pe,_.Qe,_.ce,Ve,Ue,Se,Te];_.dp=class extends _.ap{constructor(a){super();this.log=new _.O(a);this.configuration=this.hc=_.Vi();this.o=this.B=null;this.Uc=this.td=!1;this.Oe=new _.O("clpp.video.events");this.Mb=null;this.lc=-1;this.Te=this.Re.bind(this);this.we=new _.Pm;this.J=new _.uo;this.ea=this.jc=this.I=null}init(a,b){this.configuration=this.hc=b;this.B=a;this.log.info("Initializing Player surface");a=this.B.getMedia();this.log.info("Attaching media element listeners");for(const c of cp)this.J.on(a,c,this.Te,c!==_.$c);
304
- this.Mb||(this.Mb=this.De());this.Mb.initialize(this);this.B.showMediaElement()}release(){this.I&&(this.I.destroy(),this.I=null);return Promise.resolve()}destroy(){this.J.release();return Promise.resolve()}canPlay(a,b){return _.Kf[this.namespace()].canPlay(a,b)}play(){if(!this.o)return Promise.reject("No sources specified yet. You need to load content before calling play.");const a=this.B.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c=
305
- {name:b.name||"",message:b.message||"",stack:b.stack||""};Si(c)?(this.trigger(new _.C(_.gc)),this.log.warn(_.ja)):c.name===Sa&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.o?new Promise((a,b)=>{const c=this.getState();if(c!==_.Kl&&c!==_.Hl&&c!==_.Sl&&c!==_.Rl)b();else if(this.B.getMedia().pause(),this.getState()===_.Sl)this.J.one(this,_.ke,()=>{a()});else a()}):Promise.reject("No sources specified yet. You need to load content before calling pause.")}isPaused(){return this.B.getMedia().paused}isEnded(){return this.B.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.jc=
306
- a}setCdnErrorCallback(a){this.ea=a}nc(){return this.jc}getSurface(){return this.B}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.$o(b?b.buffered:void 0,a)}getPosition(){const a=this.B.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!==_.p||a===b)return Promise.resolve();const c=this.B.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),
307
- 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(_.Ee));this.J.on(c,_.ee,h);this.J.on(c,_.ve,h);this.J.on(c,_.Wd,h);this.log.info("Seeking to "+a+". Delta "+d);this.Uc=this.td=!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,u=l.type===_.ee,y=l.type===_.Wd,A=l.type===_.ve,
308
- E=y&&t;q=u||n&&E||A&&q;this.log.debug("Checking seeking state after "+l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",u,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",t,"Progress Ready:",E);q?(this.Uc=this.td=!1,this.J.off(c,_.ee,h),this.J.off(c,_.ve,h),this.J.off(c,_.Wd,h),this.Ne(),this.trigger(new _.C(_.Ce)),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();
288
+ 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 Q=class extends _.P{constructor(){super();this.a=new _.O("clpp.native.TrackManager");this.l=null;this.g=new _.uo;this.h=[];this.G=0;this.o={};this.I=[];this.f=new Map;this.w=null;this.m=new Map;this.A=!0;this.O=this.B.bind(this,_.J);this.S=this.F.bind(this,_.J);this.R=this.C.bind(this,_.J);this.U=this.B.bind(this,_.L);this.X=this.F.bind(this,_.L);this.W=this.C.bind(this,_.L);this.J=this.B.bind(this,_.K);this.M=this.F.bind(this,_.K);this.K=this.C.bind(this,_.K);this.j=null}md(){return!_.mi()}B(a,
289
+ b){const c=this;return _.y(function*(){if(b){var d=b.track;if(d){var e=c.h.find(h=>Di(h,d,a));if(e)c.a.warn("Track from event already exists",d,e);else{var f=zh(a,d),g=Ei(d);if(a===_.J){if(d.kind===_.td)return;let h;void 0!==d.id?h=c.o[d.id]:h=Object.values(c.o).find(k=>Di(f,k,a));f.kind&&"captions"===f.kind&&(f.mimeType=_.Ub);h&&(f.src=h.url,f.mimeType=h.mimeType)}else if(e=c.h.find(h=>h.type===a&&_.sf(h,f,["kind","label","language"]))){e.id=d.id;g&&(c.a.debug(`Setting native ${a} track active`),
290
+ c.f.set(a,e));c.a.debug("Track from event seems to already exists, flipped native track to",d);return}try{f.renditions.push(new _.Gh(f.id,f));c.h.push(f);const h=c.l.getConfiguration().safari;Gi(c,a,h)?yield Hi(c,f,h):Ii(c,a,h)&&(yield Ji(c,f,h));c.a.debug(a+" Track added",f);c.l.trigger(new _.F(_.ap));const k=Ki(c,a).length;e=a===_.L||a===_.K;if(g||1===k&&e)c.a.debug(`Setting native ${a} track active. `+`Native track active: ${g}. `+`Number of tracks: ${k}`,d),c.f.set(a,f)}catch(h){c.a.error("Error while converting track data",
291
+ h)}}}else c.a.warn(Ra)}else c.a.warn(Pa)})}F(a,b){if(b){var c=b.track;c?a===_.J&&c.kind!==_.td&&(b=this.h.find(d=>Di(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.f.get(a)||null)===b&&(this.f.set(a,null),Li(this)),this.a.debug(a+" Track removed, id: ",b.id)):this.a.warn(Ra)}else this.a.warn(Pa)}C(a,b){this.a.debug(a+" Track changed",b);a===_.J&&Li(this);const c=Ni(this,a);if(c)for(let d=0;d<c.length;++d)if(Ei(c[d])){if(b=this.h.find(e=>Di(e,c[d],a)))this.f.set(a,b),this.a.debug("Track change detected, id:",
292
+ b.id),b===this.m.get(a)&&this.m.set(a,null),a===_.K?this.l.trigger(new _.F(_.Qi)):a===_.J&&this.l.trigger(new _.F(_.Ri));break}}initialize(a){this.l=a;this.j=new Xo(a.getNetworkEngine())}load(){this.A=!1;var a=Mi(this,_.J);a&&(this.g.on(a,_.Nb,this.O),this.g.on(a,ae,this.S),this.g.on(a,wc,this.R));if(a=Mi(this,_.K))this.g.on(a,_.Nb,this.J),this.g.on(a,ae,this.M),this.g.on(a,wc,this.K);if(a=Mi(this,_.L))this.g.on(a,_.Nb,this.U),this.g.on(a,ae,this.X),this.g.on(a,wc,this.W);this.g.one(this.l,pc,this.H.bind(this))}release(){this.A=
293
+ !0;this.h=[];this.o={};this.f.clear();this.m.clear();this.g.release()}destroy(){this.release();this.l=null}getVideoTracks(){return Ki(this,_.L)}getAudioTracks(){return Ki(this,_.K)}ja(){return Ki(this,_.J)}ia(){const a=this.f.get(_.L)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);if(b)return b}return a.renditions[0]||null}Da(){return Oi(this,_.K)}Ea(){return Oi(this,_.J)}Pa(){return Pi(this,_.L)}bb(){return Pi(this,_.K)}cb(){return Pi(this,
294
+ _.J)}Ga(){return this.f.get(_.L)||null}na(){return this.f.get(_.K)||null}oa(){return this.f.get(_.J)||null}Ua(a){Si(this,_.L,a)}sa(a){Si(this,_.K,a)}Ba(a){Si(this,_.J,a)}Ta(a){Si(this,_.L,a&&a.track)}ib(a){Si(this,_.K,a&&a.track)}jb(a){Si(this,_.J,a&&a.track)}addTextTrack(a){const b=this;return _.y(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;b.o[c]=a;Ti(b,a,c)}else yield Ui(b,a)})}la(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;
295
+ return _.y(function*(){const b=a.l.getConfiguration();Wi(a,_.K,b.preferredAudioLanguage);if(!Ni(a,_.J).some(c=>Ei(c))){const c=Mi(a,_.J);yield new Promise(d=>{a.g.one(c,wc,d);(new _.Zh(d)).$(1)})}a.A||Wi(a,_.J,b.preferredTextLanguage)})}};Q.prototype.isAbrEnabled=Q.prototype.la;Q.prototype.addTextTrack=Q.prototype.addTextTrack;Q.prototype.setTextRendition=Q.prototype.jb;Q.prototype.setAudioRendition=Q.prototype.ib;Q.prototype.setVideoRendition=Q.prototype.Ta;Q.prototype.setTextTrack=Q.prototype.Ba;
296
+ Q.prototype.setAudioTrack=Q.prototype.sa;Q.prototype.setVideoTrack=Q.prototype.Ua;Q.prototype.getTextTrack=Q.prototype.oa;Q.prototype.getAudioTrack=Q.prototype.na;Q.prototype.getVideoTrack=Q.prototype.Ga;Q.prototype.getLoadingTextRendition=Q.prototype.cb;Q.prototype.getLoadingAudioRendition=Q.prototype.bb;Q.prototype.getLoadingVideoRendition=Q.prototype.Pa;Q.prototype.getTextRendition=Q.prototype.Ea;Q.prototype.getAudioRendition=Q.prototype.Da;Q.prototype.getVideoRendition=Q.prototype.ia;
297
+ Q.prototype.getTextTracks=Q.prototype.ja;Q.prototype.getAudioTracks=Q.prototype.getAudioTracks;Q.prototype.getVideoTracks=Q.prototype.getVideoTracks;Q.prototype.canSelectVideoTracks=Q.prototype.md;_.bp=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(lb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(lb);}mb(){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)}ya(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
298
+ 1)}Yb(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}Ca(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.ya(),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=
299
+ "";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",_.bp);_.bp.prototype.bufferedAheadOf=_.bp.prototype.Ca;_.bp.prototype.isBuffered=_.bp.prototype.Yb;_.bp.prototype.bufferEnd=_.bp.prototype.ya;_.bp.prototype.bufferStart=_.bp.prototype.mb;_.bp.prototype.end=_.bp.prototype.end;_.bp.prototype.start=_.bp.prototype.start;_.cp=class{constructor(){this.Dc=new so(this);this.Bc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Dc.on(a,b,c)}one(a,b,c){return this.Dc.one(a,b,c)}off(a,b){return this.Dc.off(a,b)}addDelegate(a){a&&(0<=this.Bc.indexOf(a)||this.Bc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}removeDelegate(a){a&&(a=this.Bc.indexOf(a),0<=a&&this.Bc.splice(a,1))}trigger(a){this.Dc.trigger(a);for(const b of this.Bc)b.dispatchEvent(a)}};
300
+ _.cp.prototype.off=_.cp.prototype.off;_.cp.prototype.one=_.cp.prototype.one;_.cp.prototype.on=_.cp.prototype.on;_.cp.prototype.removeEventListener=_.cp.prototype.removeEventListener;_.cp.prototype.addEventListener=_.cp.prototype.addEventListener;_.z("clpp.events.ERROR",_.$c);_.z("clpp.events.LOADEDMETADATA",_.od);_.z("clpp.events.BUFFERING_ENDED",_.jc);_.z("clpp.events.BUFFERING_STARTED",_.nc);_.z("clpp.events.STATE_CHANGED",_.ke);_.Qi="audiotrackchanged";_.z("clpp.events.AUDIO_TRACK_CHANGED",_.Qi);_.Ri="texttrackchanged";_.z("clpp.events.TEXT_TRACK_CHANGED",_.Ri);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.Me);_.z("clpp.events.BITRATE_CHANGED",_.hc);_.ap="tracksadded";_.z("clpp.events.TRACKS_ADDED",_.ap);_.z("clpp.events.LOAD_START",pd);
301
+ _.z("clpp.events.RELEASING",_.$d);_.z("clpp.events.RELEASED",Zd);_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.Le);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.fc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_UPDATE",_.Uc);_.z("clpp.events.DRM_SESSION_PERSISTED",_.Tc);_.z("clpp.events.DRM_RENEWAL_STARTED",Sc);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Rc);
302
+ _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.gc);_.z("clpp.events.PLAY",_.Sd);_.z("clpp.events.SEEKING",_.fe);_.z("clpp.events.SEEKED",_.ee);_.z("clpp.events.USER_SEEKING",_.De);_.z("clpp.events.USER_SEEKED",_.Ce);_.Ml={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.Ml);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.Ob);_.z("clpp.events.AD_LOADED",_.Eb);_.z("clpp.events.AD_BREAK_STARTED",_.xb);_.z("clpp.events.AD_STARTED",_.Kb);_.z("clpp.events.AD_BUFFERING",_.zb);_.z("clpp.events.AD_PROGRESS",_.Hb);
303
+ _.z("clpp.events.AD_FIRST_QUARTILE",_.Cb);_.z("clpp.events.AD_MIDPOINT",_.Fb);_.z("clpp.events.AD_THIRD_QUARTILE",_.Mb);_.z("clpp.events.AD_PAUSED",_.Gb);_.z("clpp.events.AD_RESUMED",_.Ib);_.z("clpp.events.AD_SKIPPED",_.Jb);_.z("clpp.events.AD_CLICKED",_.Ab);_.z("clpp.events.AD_IMPRESSION",_.Db);_.z("clpp.events.AD_COMPLETED",_.Bb);_.z("clpp.events.AD_STOPPED",_.Lb);_.z("clpp.events.AD_BREAK_STOPPED",_.yb);_.z("clpp.events.CASTING_STARTED",_.qc);_.z("clpp.events.CASTING_ENDED","castingended");
304
+ _.z("clpp.events.CAST_STATUS_CHANGED",_.rc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.Tb);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.Sb);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.Qb);_.Sf="timeline-cue-added";_.z("clpp.events.TIMELINE_CUE_ADDED",_.Sf);_.Uf="timeline-cue-enter";_.z("clpp.events.TIMELINE_CUE_ENTER",_.Uf);_.Vf="timeline-cue-exit";_.z("clpp.events.TIMELINE_CUE_EXIT",_.Vf);_.z("clpp.events.MPD_TYPE_CHANGED",_.yd);_.z("clpp.events.VIMOND_RESPONSE",_.Ne);
305
+ _.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.Ud);_.z("clpp.events.PLAYLIST_MODIFIED",_.Vd);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.sc);_.z("clpp.events.ONLINE_STATUS_CHANGED",Hd);var Xi=["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"];var dp=class{};_.z("clpp.utils.PlayerConfiguration",dp);dp.create=_.cj;var ep=["abort",oc,pc,Wc,"emptied",Xc,_.Zc,_.$c,"interruptbegin","interruptend",_.nd,_.od,pd,"mozaudioavailable",_.Od,_.Sd,_.Td,_.Wd,_.Yd,_.ee,_.fe,ie,"suspend",_.ve,"volumechange",_.Qe,_.Re,_.ce,We,Ve,Te,Ue];_.fp=class extends _.cp{constructor(a){super();this.log=new _.O(a);this.configuration=this.jc=_.aj();this.o=this.B=null;this.Zc=this.yd=!1;this.We=new _.O("clpp.video.events");this.Pb=null;this.nc=-1;this.bf=this.$e.bind(this);this.Be=new _.Pm;this.J=new _.uo;this.ga=this.lc=this.I=null}init(a,b){this.configuration=this.jc=b;this.B=a;this.log.info("Initializing Player surface");a=this.B.getMedia();this.log.info("Attaching media element listeners");for(const c of ep)this.J.on(a,c,this.bf,c!==_.$c);
306
+ this.Pb||(this.Pb=this.Ie());this.Pb.initialize(this);this.B.showMediaElement()}release(){this.I&&(this.I.destroy(),this.I=null);return Promise.resolve()}destroy(){this.J.release();return Promise.resolve()}canPlay(a,b){return _.Jf[this.namespace()].canPlay(a,b)}play(){if(!this.o)return Promise.reject("No sources specified yet. You need to load content before calling play.");const a=this.B.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c=
307
+ {name:b.name||"",message:b.message||"",stack:b.stack||""};Yi(c)?(this.trigger(new _.F(_.gc)),this.log.warn(_.ia)):c.name===Ta&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.o?new Promise((a,b)=>{const c=this.getState();if(c!==_.Kl&&c!==_.Hl&&c!==_.Sl&&c!==_.Rl)b();else if(this.B.getMedia().pause(),this.getState()===_.Sl)this.J.one(this,_.ke,()=>{a()});else a()}):Promise.reject("No sources specified yet. You need to load content before calling pause.")}isPaused(){return this.B.getMedia().paused}isEnded(){return this.B.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.lc=
308
+ a}setCdnErrorCallback(a){this.ga=a}rc(){return this.lc}getSurface(){return this.B}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.bp(b?b.buffered:void 0,a)}getPosition(){const a=this.B.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.B.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),
309
+ Promise.reject();const d=a-b;return.1>=Math.abs(d)?(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.F(_.De));this.J.on(c,_.ee,h);this.J.on(c,_.ve,h);this.J.on(c,_.Wd,h);this.log.info("Seeking to "+a+". Delta "+d);this.Zc=this.yd=!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,u=l.type===_.ee,x=l.type===_.Wd,A=l.type===_.ve,
310
+ E=x&&t;q=u||n&&E||A&&q;this.log.debug("Checking seeking state after "+l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",u,"Time reached",n,"Timeupdate:",A,"Progress:",x,"ReadyState:",t,"Progress Ready:",E);q?(this.Zc=this.yd=!1,this.J.off(c,_.ee,h),this.J.off(c,_.ve,h),this.J.off(c,_.Wd,h),this.Ue(),this.trigger(new _.F(_.Ce)),e()):x&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();
309
311
  else this.J.one(c,_.od,g)};this.getState()===_.Pl?(this.log.debug("Player is in IDLE state. Postpone seek."),this.J.one(this,_.ke,()=>{switch(this.getState()){case _.Kl:case _.Sl:case _.Rl: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.B.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.B.getMedia();
310
- b?_.qf(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
311
- 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.B.getMedia().muted}setMuted(a){const b=this.B.getMedia();typeof a===_.lc&&(b.muted=a)}getDuration(){return this.o?this.B.getMedia().duration:-1}getTrackManager(){return this.Mb}getPlaybackRate(){const a=this.B.getMedia();return a&&a.playbackRate||1}setPlaybackRate(a){const b=this.B.getMedia();
312
- void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.lc=a}getSourceIndex(){return this.lc}getLoadedSource(){return this.o&&-1!==this.lc?this.o[this.lc]:null}getPeriods(){return[]}getNetworkEngine(){return this.we}setNetworkEngine(a){this.we=a}getTextDisplayer(){return this.I}getTimelineCues(){return[]}resetAbr(){}Re(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===_.ve||a.type===_.Wd)this.Oe.debug(d);
313
- else{let e="";switch(a.type){case _.Yd:e=`Rate: ${this.getPlaybackRate()}`;break;case Wc:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Sd:case _.Td:case "suspend":case _.Pe:case ie:case _.fe:case _.ee:case _.ve:case _.Wd:case oc:case pc:b=this.getBufferInfo().za(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.ce:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+
314
- e);this.Oe.info(d)}a.type!==_.$c&&this.trigger(new _.C(a.type,{detail:a}))}Ne(){}};_.dp.prototype.getTextDisplayer=_.dp.prototype.getTextDisplayer;_.dp.prototype.setNetworkEngine=_.dp.prototype.setNetworkEngine;_.dp.prototype.getNetworkEngine=_.dp.prototype.getNetworkEngine;var aj;aj=new _.O("clpp.Components");_.Zi=new Map;var ep=class{};_.x("clpp.utils.Uint8ArrayUtils",ep);ep.toStandardBase64=_.dj;ep.concat=_.jj;ep.equal=_.ij;ep.toHex=_.hj;ep.fromHex=_.gj;ep.fromBase64=_.fj;ep.toBase64Url=_.ej;var fp=class{constructor(){this.a=this.f=null;this.g=new _.O("clpp.drm.csl")}release(){this.a=this.f=null}};_.x("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.db,SW_SECURE_DECODE:_.eb,HW_SECURE_CRYPTO:Da,HW_SECURE_DECODE:Ea,HW_SECURE_ALL:"HW_SECURE_ALL"});_.x("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.x("clpp.drm.KeySystem",{NONE:_.Ad,CLEAR_KEY:_.Md,WIDEVINE:_.Kc,PLAYREADY:_.Jc,FAIRPLAY:_.Ic,PRIMETIME:_.Hc});_.nj={};_.x("clpp.drm.registerDrmEnvironment",_.oj);var rj={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,
312
+ b?_.rf(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
313
+ 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.B.getMedia().muted}setMuted(a){const b=this.B.getMedia();typeof a===_.ic&&(b.muted=a)}getDuration(){return this.o?this.B.getMedia().duration:-1}getTrackManager(){return this.Pb}getPlaybackRate(){const a=this.B.getMedia();return a&&a.playbackRate||1}setPlaybackRate(a){const b=this.B.getMedia();
314
+ void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.nc=a}getSourceIndex(){return this.nc}getLoadedSource(){return this.o&&-1!==this.nc?this.o[this.nc]:null}getPeriods(){return[]}getNetworkEngine(){return this.Be}setNetworkEngine(a){this.Be=a}getTextDisplayer(){return this.I}getTimelineCues(){return[]}resetAbr(){}$e(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===_.ve||a.type===_.Wd)this.We.debug(d);
315
+ else{let e="";switch(a.type){case _.Yd:e=`Rate: ${this.getPlaybackRate()}`;break;case Wc:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Sd:case _.Td:case "suspend":case _.Qe:case ie:case _.fe:case _.ee:case _.ve:case _.Wd:case oc:case pc:b=this.getBufferInfo().Ca(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.ce:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+
316
+ e);this.We.info(d)}a.type!==_.$c&&this.trigger(new _.F(a.type,{detail:a}))}Ue(){}};_.fp.prototype.getTextDisplayer=_.fp.prototype.getTextDisplayer;_.fp.prototype.setNetworkEngine=_.fp.prototype.setNetworkEngine;_.fp.prototype.getNetworkEngine=_.fp.prototype.getNetworkEngine;var gj;gj=new _.O("clpp.Components");_.ej=new Map;var gp=class{constructor(){this.a=this.f=null;this.g=new _.O("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.eb,SW_SECURE_DECODE:_.fb,HW_SECURE_CRYPTO:Da,HW_SECURE_DECODE:Ea,HW_SECURE_ALL:"HW_SECURE_ALL"});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.Ad,CLEAR_KEY:_.Kd,WIDEVINE:_.Kc,PLAYREADY:_.Jc,FAIRPLAY:_.Ic,PRIMETIME:_.Hc});_.mj={};_.z("clpp.drm.registerDrmEnvironment",_.nj);var qj={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,
315
317
  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,
316
318
  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,
317
319
  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,
@@ -325,77 +327,77 @@ e);this.Oe.info(d)}a.type!==_.$c&&this.trigger(new _.C(a.type,{detail:a}))}Ne(){
325
327
  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,
326
328
  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,
327
329
  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,
328
- 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]};_.gp=class{constructor(a){this.I=a;this.g={}}Ea(a,b){this.g[a]=b}};_.x("clpp.drm.DrmEnvironment",_.gp);_.gp.prototype.setDrmSystem=_.gp.prototype.Ea;_.Oj=class{constructor(a,b){this.f=_.qf(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.g=!!b;this.buffer=this.f.buffer}getPosition(){return this.a}wa(){return this.f.byteLength}seek(a){(0>a||a>this.f.byteLength)&&_.uj();this.a=a}};_.Oj.prototype.seek=_.Oj.prototype.seek;
329
- _.vk=class{constructor(a,b){this.f=a;this.g=void 0===b?!0:b;this.a=0}getPosition(){return this.a}wa(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.xj();this.a+=a}seek(a){if(0>a||a>this.f.byteLength)throw _.xj();this.a=a}};_.x("clpp.utils.dataview.DataViewReader",_.vk);_.Mj=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.O("clpp.mp4")}M(a,b){a=Ej(a);this.g[a]=hp;this.f[a]=b;return this}X(a,b){a=Ej(a);this.g[a]=ip;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.H(a);a=new _.vk(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.wj(a)&&!this.a;)this.Zc(0,a,b)}Zc(a,b,c){const d=b.getPosition();let e=_.M(b);var f=_.M(b);let g=!1;this.h.debug("Parsing MP4 box",_.Fj(f));switch(e){case 0:e=b.wa()-d;break;case 1:e=_.Cj(b),g=!0}const h=
330
- this.f[f];if(h){let m=null;var k=null;this.g[f]==ip&&(k=_.M(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.wa()&&(l=b.wa());l-=b.getPosition();b=0<l?_.Dj(b,l):new Uint8Array(0);b=new _.vk(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.wa()-b.getPosition()),b.skip(a)}};_.x("clpp.utils.Mp4Parser",_.Mj);_.Mj.typeToString=_.Fj;
331
- _.Mj.allData=_.Hj;_.Mj.sampleDescription=_.Gj;_.Mj.children=_.N;_.Mj.prototype.parseNext=_.Mj.prototype.Zc;_.Mj.prototype.parse=_.Mj.prototype.parse;_.Mj.prototype.stop=_.Mj.prototype.stop;_.Mj.prototype.fullBox=_.Mj.prototype.X;_.Mj.prototype.box=_.Mj.prototype.M;_.Mj.headerSize=_.Ij;var hp=0,ip=1;var jp=class{};_.x("clpp.utils.FairplayUtils",jp);jp.parseFairPlayResponse=_.Rj;jp.formatFairPlayRequest=_.Qj;jp.createFairplayPayload=Pj;jp.extractContentId=_.Lj;jp.extractExtXKeyUri=Jj;var Xj=new _.O("clpp.drm.DrmToday"),gk="PRODUCTION",hk="STAGING",ik="TEST",kp={PRODUCTION:gk,STAGING:hk,TEST:ik};_.x("clpp.drm.DrmToday.Environment",kp);_.x("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
330
+ 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]};_.hp=class{constructor(a){this.I=a;this.g={}}Ia(a,b){this.g[a]=b}};_.z("clpp.drm.DrmEnvironment",_.hp);_.hp.prototype.setDrmSystem=_.hp.prototype.Ia;_.Oj=class{constructor(a,b){this.f=_.rf(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.g=!!b;this.buffer=this.f.buffer}getPosition(){return this.a}za(){return this.f.byteLength}seek(a){(0>a||a>this.f.byteLength)&&_.tj();this.a=a}};_.Oj.prototype.seek=_.Oj.prototype.seek;
331
+ _.vk=class{constructor(a,b){this.f=a;this.g=void 0===b?!0:b;this.a=0}getPosition(){return this.a}za(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.wj();this.a+=a}seek(a){if(0>a||a>this.f.byteLength)throw _.wj();this.a=a}};_.z("clpp.utils.dataview.DataViewReader",_.vk);_.Mj=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.O("clpp.mp4")}L(a,b){a=Dj(a);this.g[a]=ip;this.f[a]=b;return this}Y(a,b){a=Dj(a);this.g[a]=jp;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.I(a);a=new _.vk(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.vj(a)&&!this.a;)this.ed(0,a,b)}ed(a,b,c){const d=b.getPosition();let e=_.N(b);var f=_.N(b);let g=!1;this.h.debug("Parsing MP4 box",_.Ej(f));switch(e){case 0:e=b.za()-d;break;case 1:e=_.Bj(b),g=!0}const h=
332
+ this.f[f];if(h){let m=null;var k=null;this.g[f]==jp&&(k=_.N(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.za()&&(l=b.za());l-=b.getPosition();b=0<l?_.Cj(b,l):new Uint8Array(0);b=new _.vk(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.za()-b.getPosition()),b.skip(a)}};_.z("clpp.utils.Mp4Parser",_.Mj);_.Mj.typeToString=_.Ej;
333
+ _.Mj.allData=_.Hj;_.Mj.sampleDescription=_.Gj;_.Mj.children=_.Fj;_.Mj.prototype.parseNext=_.Mj.prototype.ed;_.Mj.prototype.parse=_.Mj.prototype.parse;_.Mj.prototype.stop=_.Mj.prototype.stop;_.Mj.prototype.fullBox=_.Mj.prototype.Y;_.Mj.prototype.box=_.Mj.prototype.L;_.Mj.headerSize=_.Ij;var ip=0,jp=1;var kp=class{};_.z("clpp.utils.FairplayUtils",kp);kp.parseFairPlayResponse=_.Rj;kp.formatFairPlayRequest=_.Qj;kp.createFairplayPayload=Pj;kp.extractContentId=_.Lj;kp.extractExtXKeyUri=Jj;var Xj=new _.O("clpp.drm.DrmToday"),gk="PRODUCTION",hk="STAGING",ik="TEST",lp={PRODUCTION:gk,STAGING:hk,TEST:ik};_.z("clpp.drm.DrmToday.Environment",lp);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
332
334
  var Tj="/license-proxy-widevine/cenc/",Uj="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Vj="/license-server-fairplay/",jk={"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",
333
- 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"},lp=[_.eb,void 0],op=[_.db,void 0],pp=["3000"],qp=["2000"];
334
- for(const a of Object.keys(kp)){let b=ua;a!==gk&&(b+=`_${a}`);const c=new _.gp(b);let d=null;switch(a){case gk:d=sj("V1_PROD");break;case hk:d=sj("V2");break;case ik:d=null}c.Ea(_.Kc,{licenseUrl:Wj(_.Kc,a),videoRobustness:lp,audioRobustness:op,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Yj,licenseResponse:_.Zj}});c.Ea(_.Ic,{licenseUrl:Wj(_.Ic,a),certificateUrl:Sj(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.bk,licenseResponse:_.ck,
335
- extractContentId:_.dk,certificateRequest:_.ek}});c.Ea(_.Jc,{licenseUrl:Wj(_.Jc,a),videoRobustness:pp,audioRobustness:qp,modifiers:{licenseRequest:fk}});_.oj(c)};var rp=class{};_.x("clpp.drm.eme.EmeFactory",rp);var lk=[];rp.Apis={STANDARD:cb,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var tk,sp,sk;_.Ek=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];tk=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];sp=class{constructor(a,b,c){this.h=new Uint8Array(a);this.a=b;this.f=c}};sk=class extends sp{};_.Ak=class extends sp{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.g=c;this.j=f}};var Zk=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.Mj).X("pssh",this.h.bind(this)).parse(a.buffer);0==this.a.length&&_.B("No pssh box found!")}h(a){if(1<a.version)_.B("Unrecognized PSSH version found!");else{var b=_.hj(_.Dj(a.reader,16)),c=[];if(0<a.version){var d=_.M(a.reader);for(let e=0;e<d;++e){const f=_.hj(_.Dj(a.reader,16));c.push(f)}}d=_.M(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()!=
336
- a.reader.wa()&&_.B("Mismatch between box size and data size!")}}};var Vk,tp;
337
- _.am=class{constructor(a){this.D=a;this.J=new Set;this.A=this.G=this.m=null;this.R=!1;this.f=null;this.H=tp;this.w=new _.uo;this.K=new fp;this.g=new Map;this.I=[];this.F=new _.Xk;this.h=null;this.T=b=>{this.o=!0;this.B=!1;this.F.reject(b);a.onError(b)};this.j=new Map;this.V=new Map;this.S=new _.Th(()=>Ok(this));this.ma=!1;this.Z=new _.Xk;this.C=!1;this.U=[];this.ba=!1;this.N=0;this.a=new _.O("clpp.drm.DrmEngine");this.W=(new _.Th(()=>{Pk(this)})).Ua(1);this.F.catch(()=>{});this.o=this.B=!1;this.L=
338
- null}destroy(){const a=this;return _.w(function*(){a.ma?yield a.Z:(a.ma=!0,yield Qk(a),a.Z.resolve())})}keySystem(){return this.f?_.Ik(this.f.keySystem):""}getDrmInfo(){return this.f}ja(a){const b=this;return _.w(function*(){b.C&&b.H===Vk||(!b.h.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.ba?yield el(b,a):b.U.push(a))})}ea(a){const b=a.target;this.a.info("Key status changed for session",b.sessionId);const c=this.g.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f==_.ne){var g=f;f=
339
- e;e=g}if(Hk(this.f.keySystem)&&16===f.byteLength&&_.Vh()){g=_.Fg(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!==le&&(c.loaded=!0);c&&c.xa&&c.xa.resolve();"expired"===e&&(d=!0);f=_.H(f);let h=_.hj(f);"00"===h&&c&&c.keyId?h=c.keyId:this.f.keySystem.startsWith(_.Ic)&&16!==f.byteLength&&(h=Hg(f));(f=h||"")?this.a.info(`Key status for Key ID '${h}': ${e}`):this.a.info(`Key status global keys: ${e}`);this.j.set(f,e);
340
- c&&!c.keyId&&this.g.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.Za.forEach(e=>{this.j.get(e)===le&&(this.a.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.Nd))});for(a=0;a<this.f.initData.length;a++){const e=this.f.initData[a];e.keyId&&this.j.get(e.keyId)===le&&_.ij(e.initData,c.initData)&&(this.a.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,_.Nd))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.jb&&
341
- (this.a.debug("Session has expired",b.sessionId),(a=this.g.get(b))&&a.gc&&a.gc.stop(),this.g.delete(b),b.close().catch(()=>{}));nl(this)&&(this.F.resolve(),1!==this.g.size||d?this.S.$(.5):Ok(this))}};Vk=0;tp=3;var ul=new Map,vl=new _.O("clpp.text");var up=class{constructor(){this.a=null;this.f=[]}};var vp=class{constructor(){this.g=this.f=this.h=null;this.a=[]}};_.wp=class{constructor(){this.f=this.m=this.w=this.B=this.h=this.j=this.g=this.o=NaN;this.a=new up;this.A=new vp}getStats(){return{width:this.o,height:this.g,streamBandwidth:this.m,decodedFrames:this.h,droppedFrames:this.j,corruptedFrames:this.B,estimatedBandwidth:this.f,loadLatency:this.w,playTime:zl(this.a,_.Sl),pauseTime:zl(this.a,_.Rl),bufferingTime:zl(this.a,_.Kl),stateHistory:Al(this.a),switchHistory:Bl(this.A)}}};_.xp=class{constructor(a){this.f=a;this.a=void 0}value(){void 0==this.a&&(this.a=this.f());return this.a}};var Dl=new _.xp(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.od],[HTMLMediaElement.HAVE_CURRENT_DATA,_.nd],[HTMLMediaElement.HAVE_FUTURE_DATA,oc],[HTMLMediaElement.HAVE_ENOUGH_DATA,pc]]));var zp=class{constructor(a){this.g=new _.O("clpp.StateManager");this.l=a;this.a=new _.uo;this.f=_.Pl;this.A=_.yp;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.m=this.F=!1;this.G=0;this.h=null;this.J=0;this.L=_.gi();this.C=!1;this.I=Date.now();Il(this)}Lb(a,b){this.l&&this.l.trigger(new _.C(a,{detail:b}))}getState(){return Ll(this,"")}T(a){(a=a&&a.detail)&&a.severity&&a.severity===_.F&&Gl(this,_.Ol)}destroy(){this.g.debug("Stop watching for video events for "+this.l.namespace());this.a.release()}};_.x("clpp.version",_.da);_.x("clpp.name",_.oa);_.Pi="application/x-mpegurl";_.x("clpp.Type",{DASH:_.Ub,HLS:_.Pi,SMOOTH_STREAMING:_.Zb,MP4:_.Je});_.Sf="scte35";_.Qf=ze;_.x("clpp.TimelineCueType",{SCTE35:_.Sf,DASH_CALLBACK:_.zd,UNKNOWN:_.Qf});_.x("clpp.utils.media.detectType",Tl);var Wl=new _.O("clpp.sources");var Ap=class extends _.dp{constructor(){super(Dc);this.w=this.G=!1;this.j=this.A=this.m=this.a=this.h=null;this.g=new _.uo;this.F=this.C=this.f=this.H=null}init(a,b){super.init(a,b);this.h=new zp(this);Gl(this.h,_.Pl)}namespace(){return Dc}unload(){const a=this;return _.w(function*(){if(a.o){a.log.debug(_.$a,a.o);a.C&&(a.C.stop(),a.C=null);const b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.I&&(a.I.destroy(),a.I=null);a.j&&a.j.release();a.m&&(a.m.destroy(),a.m=null);_.Of(a.g);
342
- a.f&&(a.f=new _.wp);a.F=null;a.o=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Yl(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.h&&Gl(this.h,_.Pl)})}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.j&&(this.j.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
343
- b)}),this.j=null);this.h&&(this.h.destroy(),this.h=null);this.f=null})}getDrmInfo(){return this.m?this.m.getDrmInfo():null}getTrackManager(){return this.Mb}load(a){const b=this;return _.w(function*(){if(b.w)return Xl();if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.B.getMedia();b.H=Date.now()/1E3;b.f=new _.wp;b.g.on(b,_.ke,()=>{b.f&&_.yl(b.f.a,b.getState())});Gl(b.h,_.Ql);b.o=_.Vl(a);_.Yi(a)&&(b.configuration=_.Xi(b.hc,a));
344
- b.log.debug(_.Ja,b.configuration);b.log.debug(_.Wa,b.o);const d=_.xl(b.configuration,["html","native"]);b.I=d.create(b);b.I.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.$i(_.qe)&&!_.ii()&&(b.A=new Io(b),b.A.start(c));b.j?b.j.release():b.j=new vo(b);Yf(b.j,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,oc,()=>{b.trigger(new _.C(_.Zo))});null==
345
- b.configuration.startTime&&fm(b,c);try{yield $l(b,c),yield bm(b),yield em(b).P}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.F&&null!==this.h&&Gl(this.h,_.Ol),this.trigger(new _.C(_.$c,{detail:a})))}De(){return new Q}getState(){return null!==this.h?this.h.getState().currentState:_.yp}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!"),
335
+ 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"},mp=[_.fb,void 0],np=[_.eb,void 0],op=["3000"],pp=["2000"];
336
+ for(const a of Object.keys(lp)){let b=ua;a!==gk&&(b+=`_${a}`);const c=new _.hp(b);let d=null;switch(a){case gk:d=rj("V1_PROD");break;case hk:d=rj("V2");break;case ik:d=null}c.Ia(_.Kc,{licenseUrl:Wj(_.Kc,a),videoRobustness:mp,audioRobustness:np,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Yj,licenseResponse:_.Zj}});c.Ia(_.Ic,{licenseUrl:Wj(_.Ic,a),certificateUrl:Sj(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.bk,licenseResponse:_.ck,
337
+ extractContentId:_.dk,certificateRequest:_.ek}});c.Ia(_.Jc,{licenseUrl:Wj(_.Jc,a),videoRobustness:op,audioRobustness:pp,modifiers:{licenseRequest:fk}});_.nj(c)};var qp=class{};_.z("clpp.drm.eme.EmeFactory",qp);var lk=[];qp.Apis={STANDARD:db,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var tk,rp,sk;_.Bk=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];tk=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];rp=class{constructor(a,b,c){this.h=new Uint8Array(a);this.a=b;this.f=c}};sk=class extends rp{};_.Ak=class extends rp{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.g=c;this.j=f}};var Zk=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.Mj).Y("pssh",this.h.bind(this)).parse(a.buffer);0==this.a.length&&_.C("No pssh box found!")}h(a){if(1<a.version)_.C("Unrecognized PSSH version found!");else{var b=_.Zg(_.Cj(a.reader,16)),c=[];if(0<a.version){var d=_.N(a.reader);for(let e=0;e<d;++e){const f=_.Zg(_.Cj(a.reader,16));c.push(f)}}d=_.N(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()!=
338
+ a.reader.za()&&_.C("Mismatch between box size and data size!")}}};var Vk,sp;
339
+ _.am=class{constructor(a){this.D=a;this.J=new Set;this.A=this.G=this.m=null;this.R=!1;this.f=null;this.H=sp;this.w=new _.uo;this.K=new gp;this.g=new Map;this.I=[];this.F=new _.Xk;this.h=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.S=new _.Zh(()=>Ok(this));this.pa=!1;this.aa=new _.Xk;this.C=!1;this.U=[];this.da=!1;this.O=0;this.a=new _.O("clpp.drm.DrmEngine");this.X=(new _.Zh(()=>{Pk(this)})).Va(1);this.F.catch(()=>{});this.o=this.B=!1;this.M=
340
+ null}destroy(){const a=this;return _.y(function*(){a.pa?yield a.aa:(a.pa=!0,yield Qk(a),a.aa.resolve())})}keySystem(){return this.f?_.Ik(this.f.keySystem):""}getDrmInfo(){return this.f}ma(a){const b=this;return _.y(function*(){b.C&&b.H===Vk||(!b.h.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.da?yield el(b,a):b.U.push(a))})}ga(a){const b=a.target;this.a.info("Key status changed for session",b.sessionId);const c=this.g.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f==_.ne){var g=f;
341
+ f=e;e=g}if(Hk(this.f.keySystem)&&16===f.byteLength&&_.ai()){g=_.Cg(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!==le&&(c.loaded=!0);c&&c.Aa&&c.Aa.resolve();"expired"===e&&(d=!0);f=_.I(f);let h=_.Zg(f);"00"===h&&c&&c.keyId?h=c.keyId:this.f.keySystem.startsWith(_.Ic)&&16!==f.byteLength&&(h=Eg(f));(f=h||"")?this.a.info(`Key status for Key ID '${h}': ${e}`):this.a.info(`Key status global keys: ${e}`);this.j.set(f,
342
+ e);c&&!c.keyId&&this.g.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.$a.forEach(e=>{this.j.get(e)===le&&(this.a.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.Ld))});for(a=0;a<this.f.initData.length;a++){const e=this.f.initData[a];e.keyId&&this.j.get(e.keyId)===le&&_.$g(e.initData,c.initData)&&(this.a.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,_.Ld))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.kb&&
343
+ (this.a.debug("Session has expired",b.sessionId),(a=this.g.get(b))&&a.ic&&a.ic.stop(),this.g.delete(b),b.close().catch(()=>{}));nl(this)&&(this.F.resolve(),1!==this.g.size||d?this.S.$(.5):Ok(this))}};Vk=0;sp=3;var ul=new Map,vl=new _.O("clpp.text");var tp=class{constructor(){this.a=null;this.f=[]}};var up=class{constructor(){this.g=this.f=this.h=null;this.a=[]}};_.vp=class{constructor(){this.f=this.m=this.w=this.B=this.h=this.j=this.g=this.o=NaN;this.a=new tp;this.A=new up}getStats(){return{width:this.o,height:this.g,streamBandwidth:this.m,decodedFrames:this.h,droppedFrames:this.j,corruptedFrames:this.B,estimatedBandwidth:this.f,loadLatency:this.w,playTime:zl(this.a,_.Sl),pauseTime:zl(this.a,_.Rl),bufferingTime:zl(this.a,_.Kl),stateHistory:Al(this.a),switchHistory:Bl(this.A)}}};_.wp=class{constructor(a){this.f=a;this.a=void 0}value(){void 0==this.a&&(this.a=this.f());return this.a}};var Dl=new _.wp(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.od],[HTMLMediaElement.HAVE_CURRENT_DATA,_.nd],[HTMLMediaElement.HAVE_FUTURE_DATA,oc],[HTMLMediaElement.HAVE_ENOUGH_DATA,pc]]));var yp=class{constructor(a){this.g=new _.O("clpp.StateManager");this.l=a;this.a=new _.uo;this.f=_.Pl;this.A=_.xp;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.m=this.F=!1;this.G=0;this.h=null;this.J=0;this.M=_.mi();this.C=!1;this.I=Date.now();Il(this)}Ob(a,b){this.l&&this.l.trigger(new _.F(a,{detail:b}))}getState(){return Ll(this,"")}T(a){(a=a&&a.detail)&&a.severity&&a.severity===_.G&&Gl(this,_.Ol)}destroy(){this.g.debug("Stop watching for video events for "+this.l.namespace());this.a.release()}};_.z("clpp.version",_.da);_.z("clpp.name",_.oa);_.Vi="application/x-mpegurl";_.z("clpp.Type",{DASH:_.Vb,HLS:_.Vi,SMOOTH_STREAMING:_.$b,MP4:_.Ke});_.Rf="scte35";_.Pf=ze;_.z("clpp.TimelineCueType",{SCTE35:_.Rf,DASH_CALLBACK:_.zd,UNKNOWN:_.Pf});_.z("clpp.utils.media.detectType",Tl);var Wl=new _.O("clpp.sources");var zp=class extends _.fp{constructor(){super(Dc);this.w=this.G=!1;this.j=this.A=this.m=this.a=this.h=null;this.g=new _.uo;this.F=this.C=this.f=this.H=null}init(a,b){super.init(a,b);this.h=new yp(this);Gl(this.h,_.Pl)}namespace(){return Dc}unload(){const a=this;return _.y(function*(){if(a.o){a.log.debug(_.$a,a.o);a.C&&(a.C.stop(),a.C=null);const b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.I&&(a.I.destroy(),a.I=null);a.j&&a.j.release();a.m&&(a.m.destroy(),a.m=null);_.Nf(a.g);
344
+ a.f&&(a.f=new _.vp);a.F=null;a.o=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Yl(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.h&&Gl(this.h,_.Pl)})}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.j&&(this.j.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
345
+ b)}),this.j=null);this.h&&(this.h.destroy(),this.h=null);this.f=null})}getDrmInfo(){return this.m?this.m.getDrmInfo():null}detach(){}getTrackManager(){return this.Pb}load(a){const b=this;return _.y(function*(){if(b.w)return Xl();if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.B.getMedia();b.H=Date.now()/1E3;b.f=new _.vp;b.g.on(b,_.ke,()=>{b.f&&_.yl(b.f.a,b.getState())});Gl(b.h,_.Ql);b.o=_.Vl(a);_.dj(a)&&(b.configuration=_.cj(b.jc,
346
+ a));b.log.debug(_.Ja,b.configuration);b.log.debug(_.Wa,b.o);const d=_.xl(b.configuration,["html","native"]);b.I=d.create(b);b.I.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.fj(_.qe)&&!_.oi()&&(b.A=new Io(b),b.A.start(c));b.j?b.j.release():b.j=new vo(b);Xf(b.j,c);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.B(b.configuration.volume)||b.setVolume(b.configuration.volume);_.B(b.configuration.muted)||b.setMuted(b.configuration.muted);b.g.one(c,oc,()=>{b.trigger(new _.F(_.ap))});
347
+ null==b.configuration.startTime&&fm(b,c);try{yield $l(b,c),yield bm(b),yield em(b).P}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.G&&null!==this.h&&Gl(this.h,_.Ol),this.trigger(new _.F(_.$c,{detail:a})))}Ie(){return new Q}getState(){return null!==this.h?this.h.getState().currentState:_.xp}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!"),
346
348
  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 _.Cl();this.f&&_.yl(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.o=a.videoWidth;b.g=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,
347
- b=Number(c.totalVideoFrames),a.j=Number(c.droppedVideoFrames),a.h=b,this.f.B=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.fa())a.bandwidth&&(this.f.m=a.bandwidth),a.tc&&(this.f.f=a.tc);return this.f.getStats()}getTimelineCues(){return this.j?this.j.getTimelineCues():[]}};
348
- _.Mf(new class{a(){return Dc}canPlay(a,b){a=a.type||"";const c=a===_.Ub,d=a===_.Zb,e=a===_.Pi;var f;_.fi()||c||d||e&&!_.gi()?f=0:f=""!==Uh().canPlayType(a)?e&&_.gi()&&window.MediaSource&&MediaSource.isTypeSupported&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}create(){return new Ap}});_.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 hm=new _.O("clpp.ads"),gm=[];_.x("clpp.utils.dom.createHTMLElement",_.om);var Bp=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=pm(this,a)}get(){return this.a}};var Ep=class{constructor(a,b){this.a=new _.O("clpp.PlayerSurface");this.w=_.jf(Cp,b);this.g=new Bp;this.h=null;this.f=new Bp;this.m=Dp;Dp+=1;this.o=`clpp-video-${this.m}`;this.j=new _.uo;if(null==a)throw new _.G(_.F,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.G(_.F,7,7004,"Media element not found");b=this.w;this.a.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.h=a;else{if(!(a instanceof
349
- HTMLMediaElement))throw new _.G(_.F,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.a.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.g.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.G(_.F,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{b=document.createElement(_.Qc);a.parentNode?a.parentNode.replaceChild(b,
350
- a):this.a.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");c=[];for(let f=0;f<a.classList.length;f++)c.push(a.classList[f]);for(var e of c)a.classList.remove(e),_.mm(b,e);b.style.cssText=a.style.cssText;a.removeAttribute(_.pe);for(d of[_.We,_.cd])e=a.getAttribute(d),e=parseInt(e,10),isNaN(e)||(b.style[d]=`${e}px`),_.Xh()||a.removeAttribute(d);b.appendChild(a);d=b}d&&(this.f.set(d),qm(this.f,"clpp-container"),
349
+ b=Number(c.totalVideoFrames),a.j=Number(c.droppedVideoFrames),a.h=b,this.f.B=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ia())a.bandwidth&&(this.f.m=a.bandwidth),a.yc&&(this.f.f=a.yc);return this.f.getStats()}getTimelineCues(){return this.j?this.j.getTimelineCues():[]}};
350
+ _.Lf(new class{a(){return Dc}canPlay(a,b){a=a.type||"";const c=a===_.Vb,d=a===_.$b,e=a===_.Vi;var f;_.li()||c||d||e&&!_.mi()?f=0:f=""!==$h().canPlayType(a)?e&&_.mi()&&window.MediaSource&&MediaSource.isTypeSupported&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}create(){return new zp}});_.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 hm=new _.O("clpp.ads"),gm=[];_.z("clpp.utils.dom.createHTMLElement",_.om);var Ap=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=pm(this,a)}get(){return this.a}};var Dp=class{constructor(a,b){this.a=new _.O("clpp.PlayerSurface");this.w=_.kf(Bp,b);this.g=new Ap;this.h=null;this.f=new Ap;this.m=Cp;Cp+=1;this.o=`clpp-video-${this.m}`;this.j=new _.uo;if(null==a)throw new _.H(_.G,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.H(_.G,7,7004,"Media element not found");b=this.w;this.a.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.h=a;else{if(!(a instanceof
351
+ HTMLMediaElement))throw new _.H(_.G,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.a.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.g.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.H(_.G,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{b=document.createElement(_.Qc);a.parentNode?a.parentNode.replaceChild(b,
352
+ a):this.a.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");c=[];for(let f=0;f<a.classList.length;f++)c.push(a.classList[f]);for(var e of c)a.classList.remove(e),_.mm(b,e);b.style.cssText=a.style.cssText;a.removeAttribute(_.pe);for(d of[_.Xe,_.cd])e=a.getAttribute(d),e=parseInt(e,10),isNaN(e)||(b.style[d]=`${e}px`),_.ci()||a.removeAttribute(d);b.appendChild(a);d=b}d&&(this.f.set(d),qm(this.f,"clpp-container"),
351
353
  qm(this.f,this.o),qm(this.g,_.yc),qm(this.g,"clpp-video"));rm(this,a,d)}}getMedia(){return this.g.get()}getContainer(){return this.f.get()}getSafeContainer(){return this.f}getId(){return this.m}getUniqueCssClass(){return this.o}getCastElement(){return this.h}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.mm(a,zc):this.a.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(zc):this.a.debug("No media element available that could be shown")}addElementToContainer(a,
352
- 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&&_.mm(a,_.yc);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){_.mm(a,zc)}show(a){a.classList.remove(zc)}release(){this.j.release()}};Ep.prototype.removeElementFromContainer=Ep.prototype.removeElementFromContainer;
353
- Ep.prototype.addElementToContainer=Ep.prototype.addElementToContainer;Ep.prototype.getCastElement=Ep.prototype.getCastElement;Ep.prototype.getContainer=Ep.prototype.getContainer;Ep.prototype.getMedia=Ep.prototype.getMedia;var Cp={disableContainer:!1,crossorigin:"anonymous",containerEl:null},Dp=1;var Fp=class{constructor(a){this.l=a;this.h=this.l.getNetworkEngine();this.a=new _.uo;this.g=null;this.f=!0;vm(this)}release(){this.a.release();wm(this);this.l=null}};_.x("clpp.polyfill.installAll",zm);var ym=[];_.x("clpp.polyfill.register",_.Am);var Cm=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.Ig(_.fj(a)));this.a=JSON.parse(_.Ig(_.fj(b)));this.h=c}verify(a,b){const c={kty:"RSA",n:a.n,e:a.e},d=this.g+"."+this.f,e=this.h;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=_.Mg(d),n=_.fj(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(hb)}).catch(g)}else b?
354
- g("Web Crypto API is not supported"):f()})}};var Gp={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Ti="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Tm=class{constructor(a){this.license=a;this.a=null;this.f=new _.O("clpp.utils.LicenseKey")}verify(){return(new Promise((a,b)=>{try{const c=Dm(this);a(c)}catch(c){b()}})).then(a=>a.verify(Gp)).catch(a=>{if(a&&a!==hb){{var b=window.location.href;const c=new _.eg(b);b=c.Qa||c.Ha?c:new _.eg("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Ha))return Promise.resolve()}throw a;})}},Om="vod",Nm="live";var R=class extends _.ap{constructor(a,b,c){super();zm();this.g=new _.O("clpp.Player");if(!a)throw new _.G(_.F,7,7102);this.A=new _.uo;this.f=this.N=b||_.Vi();this.m=null;void 0===this.f.license&&(this.f.license=Ti,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 _.G(_.F,7,7101,"No license provided in configuration!");this.h=new Ep(a,c);this.a=this.w=null;
355
- this.G=new _.Pm;this.j=null;this.J=[];this.K={};this.o=null;this.H=!0;this.I=this.F=!1;this.C=this.jc=null;this.ld=!1;this.S=new Fp(this);this.L=!1;this.B=d=>{(d=d.detail)&&d.currentState===_.Sl&&(this.off(_.ke,this.B),Um(this))};this.on(_.ke,()=>{this.getState()===_.Ol&&this.unload()});this.on(_.Rb,this.R.bind(this));this.on(_.Pb,this.R.bind(this));Vm(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."),
356
- 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 Rm)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Xm(this,a);_.Zi.clear()}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,b)}init(){}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.C(_.$c,{detail:a}),this.trigger(a)}Tb(a){a=
357
- this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.h}getConfiguration(){return _.kf(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}unload(){return this.a?this.a.unload():Promise.resolve()}release(){if(null!=this.m)return this.g.info("Player release already in progress"),this.m;this.g.debug("Releasing player");this.m=Zm(this);return this.m.finally(()=>{this.g.debug("Player released");this.m=null})}destroy(){if(this.F)return this.g.debug("The player is already destroyed. No-op"),
358
- new Promise(a=>a());this.F=!0;return this.release().then(()=>{this.g.debug(wa);this.trigger(new _.C("destroying"));return _.Wm(this,_.Ed)}).then(()=>{this.a&&this.a.removeDelegate(this);this.yc.clear();this.S.release();if(this.a)return this.a.destroy()}).then(()=>{cj(a=>{a.a()});_.Zi.clear();this.a=null;this.trigger(new _.C("destroyed"))})}load(a){const b=this;return _.w(function*(){try{yield _.en(b,a),yield _.fn(b),yield _.hn(b)}catch(c){if(b.m)throw b.g.info("Load interrupted while a player release is pending"),
359
- new _.G(_.F,7,7E3);throw c;}})}use(a){a=new a;a.f(this);_.bj(a)}remove(a){if(this.getState()<=_.Pl||this.H){let b="";cj(c=>{c instanceof a&&(b=c.id(),c.a())});if(b)return _.Zi.delete(b),this.I=!0}return!1}play(){return this.a?this.j&&this.a.namespace()!==_.Ac?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():Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&
360
- this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.$o}getState(){return this.a?this.a.getState():_.Pl}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()===_.Ol?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?
354
+ 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&&_.mm(a,_.yc);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){_.mm(a,zc)}show(a){a.classList.remove(zc)}release(){this.j.release()}};Dp.prototype.removeElementFromContainer=Dp.prototype.removeElementFromContainer;
355
+ Dp.prototype.addElementToContainer=Dp.prototype.addElementToContainer;Dp.prototype.getCastElement=Dp.prototype.getCastElement;Dp.prototype.getContainer=Dp.prototype.getContainer;Dp.prototype.getMedia=Dp.prototype.getMedia;var Bp={disableContainer:!1,crossorigin:"anonymous",containerEl:null},Cp=1;var Ep=class{constructor(a){this.l=a;this.h=this.l.getNetworkEngine();this.a=new _.uo;this.g=null;this.f=!0;vm(this)}release(){this.a.release();wm(this);this.l=null}};_.z("clpp.polyfill.installAll",zm);var ym=[];_.z("clpp.polyfill.register",_.Am);var Cm=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.Fg(_.Xg(a)));this.a=JSON.parse(_.Fg(_.Xg(b)));this.h=c}verify(a,b){const c={kty:"RSA",n:a.n,e:a.e},d=this.g+"."+this.f,e=this.h;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=_.Jg(d),n=_.Xg(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(hb)}).catch(g)}else b?
356
+ g("Web Crypto API is not supported"):f()})}};var Hp={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Zi="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Tm=class{constructor(a){this.license=a;this.a=null;this.f=new _.O("clpp.utils.LicenseKey")}verify(){return(new Promise((a,b)=>{try{const c=Dm(this);a(c)}catch(c){b()}})).then(a=>a.verify(Hp)).catch(a=>{if(a&&a!==hb){{var b=window.location.href;const c=new _.dg(b);b=c.Sa||c.La?c:new _.dg("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.La))return Promise.resolve()}throw a;})}},Om="vod",Nm="live";var R=class extends _.cp{constructor(a,b,c){super();zm();this.g=new _.O("clpp.Player");if(!a)throw new _.H(_.G,7,7102);this.A=new _.uo;this.f=this.O=b||_.aj();this.m=null;void 0===this.f.license&&(this.f.license=Zi,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.H(_.G,7,7101,"No license provided in configuration!");this.h=new Dp(a,c);this.a=this.w=null;
357
+ this.G=new _.Pm;this.j=null;this.J=[];this.K={};this.o=null;this.H=!0;this.I=this.F=!1;this.C=this.lc=null;this.pd=!1;this.S=new Ep(this);this.M=!1;this.B=d=>{(d=d.detail)&&d.currentState===_.Sl&&(this.off(_.ke,this.B),Um(this))};this.on(_.ke,()=>{this.getState()===_.Ol&&this.unload()});this.on(_.Sb,this.R.bind(this));this.on(_.Qb,this.R.bind(this));Vm(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."),
358
+ 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 Rm)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Xm(this,a);_.ej.clear()}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,b)}init(){}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.F(_.$c,{detail:a}),this.trigger(a)}Vb(a){a=
359
+ this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.h}getConfiguration(){return _.lf(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}unload(){return this.a?this.a.unload():Promise.resolve()}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.m)return this.g.info("Player release already in progress"),this.m;this.g.debug("Releasing player");this.m=Zm(this);return this.m.finally(()=>{this.g.debug("Player released");this.m=null})}destroy(){if(this.F)return this.g.debug("The player is already destroyed. No-op"),
360
+ new Promise(a=>a());this.F=!0;return this.release().then(()=>{this.g.debug(wa);this.trigger(new _.F("destroying"));return _.Wm(this,_.Ed)}).then(()=>{this.a&&this.a.removeDelegate(this);this.Dc.clear();this.S.release();if(this.a)return this.a.destroy()}).then(()=>{ij(a=>{a.a()});_.ej.clear();this.a=null;this.trigger(new _.F("destroyed"))})}load(a){const b=this;return _.y(function*(){try{yield _.en(b,a),yield _.fn(b),yield _.hn(b)}catch(c){if(b.m)throw b.g.info("Load interrupted while a player release is pending"),
361
+ new _.H(_.G,7,7E3);throw c;}})}use(a){a=new a;a.f(this);_.hj(a)}remove(a){if(this.getState()<=_.Pl||this.H){let b="";ij(c=>{c instanceof a&&(b=c.id(),c.a())});if(b)return _.ej.delete(b),this.I=!0}return!1}play(){return this.a?this.j&&this.a.namespace()!==_.Ac?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():Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&
362
+ this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.bp}getState(){return this.a?this.a.getState():_.Pl}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()===_.Ol?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?
361
363
  this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}getVolume(){return this.a?this.a.getVolume():null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.j}namespace(){return this.a&&this.a.namespace()||"Undefined"}canPlay(a,b){return this.a?this.a.canPlay(a,b):0}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a){this.a&&this.a.setPlaybackRate(a)}isMuted(){return this.a&&
362
- this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.G}setNetworkEngine(a){this.G=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}Sc(){return Object.freeze(this.o)}setSourceIndex(a){this.a&&this.a.setSourceIndex(a)}getSourceIndex(){return this.a?this.a.getSourceIndex():-1}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?
363
- this.a.getTimelineCues():[]}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.jc=a;cn(this)}setCdnErrorCallback(a){this.C=a;this.a&&this.a.setCdnErrorCallback(this.C)}R(){this.ld=!0}};_.x("clpp.Player",R);R.registerPlugin=_.Sm;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;
364
- R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.Sc;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.setMuted=R.prototype.setMuted;R.prototype.isMuted=R.prototype.isMuted;R.prototype.setPlaybackRate=R.prototype.setPlaybackRate;
364
+ this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.G}setNetworkEngine(a){this.G=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}Xc(){return Object.freeze(this.o)}setSourceIndex(a){this.a&&this.a.setSourceIndex(a)}getSourceIndex(){return this.a?this.a.getSourceIndex():-1}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?
365
+ this.a.getTimelineCues():[]}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.lc=a;cn(this)}setCdnErrorCallback(a){this.C=a;this.a&&this.a.setCdnErrorCallback(this.C)}R(){this.pd=!0}};_.z("clpp.Player",R);R.registerPlugin=_.Sm;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;
366
+ R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.Xc;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.setMuted=R.prototype.setMuted;R.prototype.isMuted=R.prototype.isMuted;R.prototype.setPlaybackRate=R.prototype.setPlaybackRate;
365
367
  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.getSeekRange=R.prototype.getSeekRange;R.prototype.getPresentationStartTime=R.prototype.getPresentationStartTime;R.prototype.seek=R.prototype.seek;R.prototype.getPosition=R.prototype.getPosition;
366
368
  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;R.prototype.release=R.prototype.release;
367
- R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.Tb;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;R.prototype.on=R.prototype.on;_.Pl=0;_.Ql=1;_.Kl=2;_.Sl=3;_.Rl=4;_.Hl=5;_.Ol=6;_.yp=7;_.Nl={IDLE:_.Pl,PREPARING:_.Ql,BUFFERING:_.Kl,PLAYING:_.Sl,PAUSED:_.Rl,ENDED:_.Hl,ERROR:_.Ol,UNSET:_.yp};R.State=_.Nl;var Rm=[];var S=class{mb(){}nb(){}sb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}Xb(){}Cb(){}getMediaUrl(){}pb(){}ob(){}cb(){}Oa(){}getPodIndex(){}Db(){}Eb(){}rb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.x("clpp.ads.IAd",S);S.prototype.getWrapperCreativeIds=S.prototype.getWrapperCreativeIds;S.prototype.getWrapperAdSystems=S.prototype.getWrapperAdSystems;S.prototype.getWrapperAdIds=S.prototype.getWrapperAdIds;
368
- S.prototype.getSequenceLength=S.prototype.rb;S.prototype.getPositionInSequence=S.prototype.Eb;S.prototype.getPodTimeOffset=S.prototype.Db;S.prototype.getPodIndex=S.prototype.getPodIndex;S.prototype.getPodType=S.prototype.Oa;S.prototype.getMediaBitrate=S.prototype.cb;S.prototype.getMediaHeight=S.prototype.ob;S.prototype.getMediaWidth=S.prototype.pb;S.prototype.getMediaUrl=S.prototype.getMediaUrl;S.prototype.getClickThroughUrl=S.prototype.Cb;S.prototype.isBumper=S.prototype.Xb;
369
- S.prototype.getSkipTimeOffset=S.prototype.getSkipTimeOffset;S.prototype.getDuration=S.prototype.getDuration;S.prototype.getTitle=S.prototype.getTitle;S.prototype.getAdvertiserName=S.prototype.getAdvertiserName;S.prototype.getAdSystem=S.prototype.getAdSystem;S.prototype.getApiFramework=S.prototype.getApiFramework;S.prototype.getCreativeId=S.prototype.getCreativeId;S.prototype.getId=S.prototype.getId;S.prototype.getTechnology=S.prototype.sb;S.prototype.getAdManagerVersion=S.prototype.nb;
370
- S.prototype.getAdManagerName=S.prototype.mb;var Hp=class{name(){}aa(){}create(){}};_.x("clpp.ads.IAdsManagerFactory",Hp);Hp.prototype.create=Hp.prototype.create;Hp.prototype.isSupported=Hp.prototype.aa;Hp.prototype.name=Hp.prototype.name;var Ip=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.x("clpp.ads.IAdsManager",Ip);Ip.prototype.getPosition=Ip.prototype.getPosition;Ip.prototype.setVolume=Ip.prototype.setVolume;Ip.prototype.getVolume=Ip.prototype.getVolume;Ip.prototype.skip=Ip.prototype.skip;Ip.prototype.pause=Ip.prototype.pause;Ip.prototype.resume=Ip.prototype.resume;var Jp=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.w(function*(){})}};Jp.prototype.dispose=Jp.prototype.dispose;Jp.prototype.getPosition=Jp.prototype.getPosition;Jp.prototype.setVolume=Jp.prototype.setVolume;Jp.prototype.getVolume=Jp.prototype.getVolume;Jp.prototype.skip=Jp.prototype.skip;Jp.prototype.pause=Jp.prototype.pause;Jp.prototype.resume=Jp.prototype.resume;
371
- Jp.prototype.start=Jp.prototype.start;Jp.prototype.load=Jp.prototype.load;var jm=class{name(){return"clpp.ads.NopAdsManagerFactory"}aa(){return!0}create(){return new Jp}};jm.prototype.create=jm.prototype.create;jm.prototype.isSupported=jm.prototype.aa;jm.prototype.name=jm.prototype.name;var Kp=class{getCuePoints(){}Fb(){}eb(){}};_.x("clpp.ads.IAdsTimeline",Kp);Kp.prototype.hasPostroll=Kp.prototype.eb;Kp.prototype.hasPreroll=Kp.prototype.Fb;Kp.prototype.getCuePoints=Kp.prototype.getCuePoints;_.Lp=class{g(){}release(){}};var Mp=class{constructor(){this.h=null}j(a){this.h=a}g(a){return this.h?this.h.setMediaKeys(a):Promise.reject(Na)}m(){return this.h&&this.h.mediaKeys}a(a,b){return navigator.requestMediaKeySystemAccess(a,b)}f(){return cb}};mk(new class{a(){return cb}aa(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Mp}},1E3);var Op=class{constructor(){this.size=0;this.a=void 0;this.f=new _.O("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Np.value())}get(a){if(this.has(a))return this.a}has(a){const b=Np.value();return this.a&&Ag(a,b)?!0:!1}entries(){}keys(){}values(){}},Np=new _.xp(()=>Gg(new Uint8Array([0])));var Pp=class{j(){}g(a){_.If("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}m(){return null}a(){_.If("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};mk(new class{a(){return"NOP"}aa(){return!0}create(){return new Pp}},-1);var Rp=class{constructor(){this.h=this.o=null}j(a){this.o=a}g(a){const b=this.h;b&&b!==a&&kn(b,null);return(this.h=a)?kn(a,this.o):Promise.resolve()}m(){return this.h}a(a,b){_.If("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Qp(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Qp=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.Ic))for(var c of b){a:{a=c;if(a.persistentState===_.be){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
372
- persistentState:_.Jd,distinctiveIdentifier:_.Jd,initDataTypes:a.initDataTypes,sessionTypes:[se],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),
373
- e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Je));a=e?b:null}if(a){this.a=a;return}}c=Error(qb);c.name=Ua;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Sp(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.If("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Sp=class{constructor(a){this.g=null;this.h=new WebKitMediaKeys(a);this.f=new _.uo;this.j=0;this.a=new _.O(Cc);this.a.info("Created Media Keys for "+a)}createSession(a){a=
374
- void 0===a?se:a;this.a.debug("Creating Apple MediaKeys Session");if(a!==se)throw new TypeError("Session type "+a+ba);return new Tp(this.h,`__session_${this.j++}`)}setServerCertificate(){this.a.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Tp=class extends _.ap{constructor(a,b){super();this.a=null;this.o=a;this.g=this.h=null;this.j=new _.uo;this.sessionId=b;this.expiration=NaN;this.closed=new _.Xk;this.m=!1;this.keyStatuses=new Op;this.f=new _.O(Cc)}generateRequest(a,
375
- b){if(this.m)return Promise.reject(fb);this.f.debug("generateRequest");this.h=new _.Xk;try{const c=this.o.createSession(_.Je,_.H(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Ue,d=>{{const e=this.keyStatuses.getStatus();this.f.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.C(sd,{messageType:void 0===e||e===le?kd:jd,message:Gg(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Se,d=>{this.f.debug("onWebkitKeyAdded_",
376
- d);this.g&&(ln(this,"usable"),this.g.resolve(),this.g=null)});this.j.on(c,Te,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===le)this.f.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.f.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),
377
- this.h=null;else if(null!==this.g)this.g.reject(d),this.g=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:ln(this,"output-not-allowed");break;default:ln(this,_.fd)}});ln(this,le)}catch(c){this.h.reject(c)}return this.h}load(){this.f.debug("load");return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.m)return Promise.reject(fb);this.f.debug("update");this.g=new _.Xk;try{this.a.update(_.H(a))}catch(b){this.g.reject(b)}return this.g}close(){if(this.m)return this.closed;
378
- this.f.info(`Closing Key Session ${this.sessionId}`);this.m=!0;try{this.a.close(),this.closed.resolve(),_.Of(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.f.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}};mk(new class{a(){return"APPLE"}aa(){return!!window.WebKitMediaKeys}create(){return new Rp}},1100);var Vp=class{constructor(){this.o=this.h=null;this.w="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.w="webkit")}j(a){this.h=a}g(a){_.If("WebkitEmeManager.setMediaKeys");if(!this.h)return Promise.reject(Na);const b=this.o;b&&b!==a&&on(b,null);(this.o=a)&&on(a,this.h);return Promise.resolve()}m(){return this.o}a(a,b){_.If("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.h)var c=this.h;else{var d=document.getElementsByTagName(_.v);c=d.length?d[0]:document.createElement(_.v)}const e=
379
- new Up(this.w,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Up=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Md&&(this.a=Re,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,
380
- this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.Je,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.be||a||(e=!1);if(e){this.f=g;return}}b=qb;if(c===_.Md||c===_.Kc)b="None of the requested configurations were supported.";c=Error(b);c.name=Ua;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Wp(this.g,this.a))}getConfiguration(){return this.f}},Wp=class{constructor(a,b){this.g=a;this.m=b;this.a=null;this.f=new _.uo;this.h=[];this.j=new Map}createSession(a=
381
- se){if(a!==se&&a!==_.Qd)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ga,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Xp(this.g,this.a,this.m,a);this.h.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Xp=class extends _.ap{constructor(a,b,c,d){super();this.o=a;this.h=b;this.m=!1;this.a=this.f=null;this.g=c;this.j=d;this.sessionId="";this.expiration=NaN;this.closed=new _.Xk;this.keyStatuses=
382
- new Op}generateRequest(a,b){_.If("WebkitEmeManager.MediaKeySession.generateRequest");return qn(this,b,null)}load(a){_.If(ub);return this.j===_.Qd?qn(this,null,a):Promise.reject(Error(Ra))}update(a){_.If(ub);const b=new _.Xk;rn(this,b,a);return b}close(){_.If("WebkitEmeManager.MediaKeySession.close");if(this.j!==_.Qd){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;const a=pn(this,"cancelKeyRequest");try{this.h[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();
383
- return this.closed}remove(){_.If("WebkitEmeManager.MediaKeySession.remove");return this.j!==_.Qd?Promise.reject(Error(Ra)):this.close()}};mk(new class{a(){return"WEBKIT"}aa(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Vp}});var $p=class extends _.gp{constructor(a,b,c,d,e){super(Fa);this.m=a;this.j=b;this.h=c;this.f=d;this.o=e;this.a=new _.O(Bc);_.Ug(this.m)?this.a.warn(_.vb):this.Ea(_.Kc,{licenseUrl:this.m,videoRobustness:[_.eb,void 0],audioRobustness:[_.db,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Fc.bind(this)}});_.Ug(this.j)?this.a.warn(_.Va):this.Ea(_.Jc,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Fc.bind(this)}});
384
- _.Ug(this.h)?this.a.warn(_.Ba):_.Ug(this.f)?this.a.warn(_.Aa):this.Ea(_.Ic,{licenseUrl:this.h,certificateUrl:this.f,modifiers:{licenseRequest:this.Ae.bind(this),licenseResponse:this.Be.bind(this),certificateRequest:this.Fc.bind(this),extractContentId:this.me.bind(this)}})}Fc(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}me(a,b){a=Jj(b);switch(this.o){case Yp:return a;case Zp:return(new _.Kj(a)).a;default:throw Error("Unknown content ID strategy");}}Ae(a,b){b.headers[ra]=
385
- $b;this.Fc(a,b);a={spc:_.dj(b.body)};b.body=_.Og(_.sh(a,!0))}Be(a,b){a=_.Ig(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=_.fj(a).buffer}};_.x(Bc,$p);$p.prototype.onFairPlayLicenseResponse=$p.prototype.Be;$p.prototype.onFairPlayLicenseRequest=$p.prototype.Ae;$p.prototype.extractFairPlayContentId=$p.prototype.me;$p.prototype.onLicenseRequest=$p.prototype.Fc;$p.prototype.constructor=$p.prototype.constructor;$p.NAME=Fa;
386
- var Zp="hostname",Yp="full-skd";$p.FairPlayContentIdStrategy={HOSTNAME:Zp,FULL_SKD:Yp};_.x("clpp.drm.HeaderDrmComponent",class extends _.Lp{constructor(){super();this.l=null}f(a){this.l=a}a(){this.l=null}g(){var a=this.l.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Fa){a=a.drm.customData;if(!a)throw new _.G(_.F,7,7100,_.Lc);a=new $p(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Yp);_.oj(a)}}release(){}id(){return"headerdrm"}});_.Am(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=_.H(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.Am(function(){_.If("mathRound.install")});_.Am(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;ad in document||(Object.defineProperty(document,ad,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
387
- {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",sn);document.addEventListener("webkitfullscreenerror",sn);document.addEventListener("mozfullscreenchange",sn);document.addEventListener("mozfullscreenerror",sn);document.addEventListener("MSFullscreenChange",sn);document.addEventListener("MSFullscreenError",sn)}});_.Am(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.If("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=un,document.exitPictureInPicture=vn,document.addEventListener("webkitpresentationmodechanged",tn,!0))}});_.Am(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=wn)}});_.Am(function(){if(window.VTTCue)_.Hf("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Hf(tb),window.VTTCue=xn;else if(6===a)_.Hf("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=yn;else{try{var b=!!xn(1,2,"")}catch(c){b=!1}b&&(_.Hf(tb),window.VTTCue=xn)}}else _.Jf("VTTCue not available.")});var zn;_.Am(function(){_.If("InputEvent.install");_.Wh("Trident/")&&HTMLInputElement.prototype.addEventListener!==An&&(_.Hf("Patching input event support on IE."),zn=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=An)});_.Am(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.Am(function(){_.If("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 Dn=class{constructor(){this.a=Bn()}};var aq=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.bq=class{constructor(a,b,c){this.f=a;this.h=b;this.g=c||this.f.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.h(a.contentRect.width,a.contentRect.height,this.f.isFullscreen())});this.a.observe(this.g)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var cq;_.dq=class{constructor(){this.a=new Blob([cq],{type:_.Je})}canPlay(a){var b=document.createElement(_.v);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.Xk;b=b.play();const d=(new _.Th(()=>{d.stop();c.resolve(a)})).$(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===Ua?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
388
- cq=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,
369
+ R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.Vb;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;R.prototype.on=R.prototype.on;_.Pl=0;_.Ql=1;_.Kl=2;_.Sl=3;_.Rl=4;_.Hl=5;_.Ol=6;_.xp=7;_.Nl={IDLE:_.Pl,PREPARING:_.Ql,BUFFERING:_.Kl,PLAYING:_.Sl,PAUSED:_.Rl,ENDED:_.Hl,ERROR:_.Ol,UNSET:_.xp};R.State=_.Nl;var Rm=[];var S=class{nb(){}ob(){}tb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}Zb(){}Gb(){}getMediaUrl(){}qb(){}pb(){}eb(){}Qa(){}getPodIndex(){}Hb(){}Ib(){}sb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.z("clpp.ads.IAd",S);S.prototype.getWrapperCreativeIds=S.prototype.getWrapperCreativeIds;S.prototype.getWrapperAdSystems=S.prototype.getWrapperAdSystems;S.prototype.getWrapperAdIds=S.prototype.getWrapperAdIds;
370
+ S.prototype.getSequenceLength=S.prototype.sb;S.prototype.getPositionInSequence=S.prototype.Ib;S.prototype.getPodTimeOffset=S.prototype.Hb;S.prototype.getPodIndex=S.prototype.getPodIndex;S.prototype.getPodType=S.prototype.Qa;S.prototype.getMediaBitrate=S.prototype.eb;S.prototype.getMediaHeight=S.prototype.pb;S.prototype.getMediaWidth=S.prototype.qb;S.prototype.getMediaUrl=S.prototype.getMediaUrl;S.prototype.getClickThroughUrl=S.prototype.Gb;S.prototype.isBumper=S.prototype.Zb;
371
+ S.prototype.getSkipTimeOffset=S.prototype.getSkipTimeOffset;S.prototype.getDuration=S.prototype.getDuration;S.prototype.getTitle=S.prototype.getTitle;S.prototype.getAdvertiserName=S.prototype.getAdvertiserName;S.prototype.getAdSystem=S.prototype.getAdSystem;S.prototype.getApiFramework=S.prototype.getApiFramework;S.prototype.getCreativeId=S.prototype.getCreativeId;S.prototype.getId=S.prototype.getId;S.prototype.getTechnology=S.prototype.tb;S.prototype.getAdManagerVersion=S.prototype.ob;
372
+ S.prototype.getAdManagerName=S.prototype.nb;var Ip=class{name(){}ba(){}create(){}};_.z("clpp.ads.IAdsManagerFactory",Ip);Ip.prototype.create=Ip.prototype.create;Ip.prototype.isSupported=Ip.prototype.ba;Ip.prototype.name=Ip.prototype.name;var Jp=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.z("clpp.ads.IAdsManager",Jp);Jp.prototype.getPosition=Jp.prototype.getPosition;Jp.prototype.setVolume=Jp.prototype.setVolume;Jp.prototype.getVolume=Jp.prototype.getVolume;Jp.prototype.skip=Jp.prototype.skip;Jp.prototype.pause=Jp.prototype.pause;Jp.prototype.resume=Jp.prototype.resume;var Kp=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.y(function*(){})}};Kp.prototype.dispose=Kp.prototype.dispose;Kp.prototype.getPosition=Kp.prototype.getPosition;Kp.prototype.setVolume=Kp.prototype.setVolume;Kp.prototype.getVolume=Kp.prototype.getVolume;Kp.prototype.skip=Kp.prototype.skip;Kp.prototype.pause=Kp.prototype.pause;Kp.prototype.resume=Kp.prototype.resume;
373
+ Kp.prototype.start=Kp.prototype.start;Kp.prototype.load=Kp.prototype.load;var jm=class{name(){return"clpp.ads.NopAdsManagerFactory"}ba(){return!0}create(){return new Kp}};jm.prototype.create=jm.prototype.create;jm.prototype.isSupported=jm.prototype.ba;jm.prototype.name=jm.prototype.name;var Lp=class{getCuePoints(){}Jb(){}fb(){}};_.z("clpp.ads.IAdsTimeline",Lp);Lp.prototype.hasPostroll=Lp.prototype.fb;Lp.prototype.hasPreroll=Lp.prototype.Jb;Lp.prototype.getCuePoints=Lp.prototype.getCuePoints;_.Mp=class{g(){}release(){}};var Np=class{constructor(){this.h=null}j(a){this.h=a}g(a){return this.h?this.h.setMediaKeys(a):Promise.reject(Na)}m(){return this.h&&this.h.mediaKeys}a(a,b){return navigator.requestMediaKeySystemAccess(a,b)}f(){return db}};mk(new class{a(){return db}ba(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Np}},1E3);var Pp=class{constructor(){this.size=0;this.a=void 0;this.f=new _.O("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Op.value())}get(a){if(this.has(a))return this.a}has(a){const b=Op.value();return this.a&&xg(a,b)?!0:!1}entries(){}keys(){}values(){}},Op=new _.wp(()=>Dg(new Uint8Array([0])));var Qp=class{j(){}g(a){_.Hf("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}m(){return null}a(){_.Hf("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};mk(new class{a(){return"NOP"}ba(){return!0}create(){return new Qp}},-1);var Sp=class{constructor(){this.h=this.o=null}j(a){this.o=a}g(a){const b=this.h;b&&b!==a&&kn(b,null);return(this.h=a)?kn(a,this.o):Promise.resolve()}m(){return this.h}a(a,b){_.Hf("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Rp(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Rp=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.Ic))for(var c of b){a:{a=c;if(a.persistentState===_.be){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
374
+ persistentState:_.Id,distinctiveIdentifier:_.Id,initDataTypes:a.initDataTypes,sessionTypes:[se],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),
375
+ e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Ke));a=e?b:null}if(a){this.a=a;return}}c=Error(qb);c.name=Ua;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Tp(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.Hf("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Tp=class{constructor(a){this.g=null;this.h=new WebKitMediaKeys(a);this.f=new _.uo;this.j=0;this.a=new _.O(Cc);this.a.info("Created Media Keys for "+a)}createSession(a){a=
376
+ void 0===a?se:a;this.a.debug("Creating Apple MediaKeys Session");if(a!==se)throw new TypeError("Session type "+a+ba);return new Up(this.h,`__session_${this.j++}`)}setServerCertificate(){this.a.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Up=class extends _.cp{constructor(a,b){super();this.a=null;this.o=a;this.g=this.h=null;this.j=new _.uo;this.sessionId=b;this.expiration=NaN;this.closed=new _.Xk;this.m=!1;this.keyStatuses=new Pp;this.f=new _.O(Cc)}generateRequest(a,
377
+ b){if(this.m)return Promise.reject(gb);this.f.debug("generateRequest");this.h=new _.Xk;try{const c=this.o.createSession(_.Ke,_.I(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Ve,d=>{{const e=this.keyStatuses.getStatus();this.f.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.F(sd,{messageType:void 0===e||e===le?kd:jd,message:Dg(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Te,d=>{this.f.debug("onWebkitKeyAdded_",
378
+ d);this.g&&(ln(this,"usable"),this.g.resolve(),this.g=null)});this.j.on(c,Ue,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===le)this.f.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.f.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),
379
+ this.h=null;else if(null!==this.g)this.g.reject(d),this.g=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:ln(this,"output-not-allowed");break;default:ln(this,_.fd)}});ln(this,le)}catch(c){this.h.reject(c)}return this.h}load(){this.f.debug("load");return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.m)return Promise.reject(gb);this.f.debug("update");this.g=new _.Xk;try{this.a.update(_.I(a))}catch(b){this.g.reject(b)}return this.g}close(){if(this.m)return this.closed;
380
+ this.f.info(`Closing Key Session ${this.sessionId}`);this.m=!0;try{this.a.close(),this.closed.resolve(),_.Nf(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.f.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}};mk(new class{a(){return"APPLE"}ba(){return!!window.WebKitMediaKeys}create(){return new Sp}},1100);var Wp=class{constructor(){this.o=this.h=null;this.w="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.w="webkit")}j(a){this.h=a}g(a){_.Hf("WebkitEmeManager.setMediaKeys");if(!this.h)return Promise.reject(Na);const b=this.o;b&&b!==a&&on(b,null);(this.o=a)&&on(a,this.h);return Promise.resolve()}m(){return this.o}a(a,b){_.Hf("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.h)var c=this.h;else{var d=document.getElementsByTagName(_.w);c=d.length?d[0]:document.createElement(_.w)}const e=
381
+ new Vp(this.w,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Vp=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Kd&&(this.a=Se,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,
382
+ this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.Ke,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.be||a||(e=!1);if(e){this.f=g;return}}b=qb;if(c===_.Kd||c===_.Kc)b="None of the requested configurations were supported.";c=Error(b);c.name=Ua;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Xp(this.g,this.a))}getConfiguration(){return this.f}},Xp=class{constructor(a,b){this.g=a;this.m=b;this.a=null;this.f=new _.uo;this.h=[];this.j=new Map}createSession(a=
383
+ se){if(a!==se&&a!==_.Qd)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ga,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Yp(this.g,this.a,this.m,a);this.h.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Yp=class extends _.cp{constructor(a,b,c,d){super();this.o=a;this.h=b;this.m=!1;this.a=this.f=null;this.g=c;this.j=d;this.sessionId="";this.expiration=NaN;this.closed=new _.Xk;this.keyStatuses=
384
+ new Pp}generateRequest(a,b){_.Hf("WebkitEmeManager.MediaKeySession.generateRequest");return qn(this,b,null)}load(a){_.Hf(ub);return this.j===_.Qd?qn(this,null,a):Promise.reject(Error(Sa))}update(a){_.Hf(ub);const b=new _.Xk;rn(this,b,a);return b}close(){_.Hf("WebkitEmeManager.MediaKeySession.close");if(this.j!==_.Qd){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;const a=pn(this,"cancelKeyRequest");try{this.h[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();
385
+ return this.closed}remove(){_.Hf("WebkitEmeManager.MediaKeySession.remove");return this.j!==_.Qd?Promise.reject(Error(Sa)):this.close()}};mk(new class{a(){return"WEBKIT"}ba(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Wp}});var aq=class extends _.hp{constructor(a,b,c,d,e){super(Fa);this.m=a;this.j=b;this.h=c;this.f=d;this.o=e;this.a=new _.O(Bc);_.Pg(this.m)?this.a.warn(_.vb):this.Ia(_.Kc,{licenseUrl:this.m,videoRobustness:[_.fb,void 0],audioRobustness:[_.eb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Kc.bind(this)}});_.Pg(this.j)?this.a.warn(_.Va):this.Ia(_.Jc,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Kc.bind(this)}});
386
+ _.Pg(this.h)?this.a.warn(_.Ba):_.Pg(this.f)?this.a.warn(_.Aa):this.Ia(_.Ic,{licenseUrl:this.h,certificateUrl:this.f,modifiers:{licenseRequest:this.Fe.bind(this),licenseResponse:this.Ge.bind(this),certificateRequest:this.Kc.bind(this),extractContentId:this.re.bind(this)}})}Kc(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}re(a,b){a=Jj(b);switch(this.o){case Zp:return a;case $p:return(new _.Kj(a)).a;default:throw Error("Unknown content ID strategy");}}Fe(a,b){b.headers[ra]=
387
+ ac;this.Kc(a,b);a={spc:_.Tg(b.body)};b.body=_.Lg(_.Bh(a,!0))}Ge(a,b){a=_.Fg(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=_.Xg(a).buffer}};_.z(Bc,aq);aq.prototype.onFairPlayLicenseResponse=aq.prototype.Ge;aq.prototype.onFairPlayLicenseRequest=aq.prototype.Fe;aq.prototype.extractFairPlayContentId=aq.prototype.re;aq.prototype.onLicenseRequest=aq.prototype.Kc;aq.prototype.constructor=aq.prototype.constructor;aq.NAME=Fa;
388
+ var $p="hostname",Zp="full-skd";aq.FairPlayContentIdStrategy={HOSTNAME:$p,FULL_SKD:Zp};_.z("clpp.drm.HeaderDrmComponent",class extends _.Mp{constructor(){super();this.l=null}f(a){this.l=a}a(){this.l=null}g(){var a=this.l.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Fa){a=a.drm.customData;if(!a)throw new _.H(_.G,7,7100,_.Lc);a=new aq(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Zp);_.nj(a)}}release(){}id(){return"headerdrm"}});_.Am(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.I(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.Am(function(){_.Hf("mathRound.install")});_.Am(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;ad in document||(Object.defineProperty(document,ad,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
389
+ {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",sn);document.addEventListener("webkitfullscreenerror",sn);document.addEventListener("mozfullscreenchange",sn);document.addEventListener("mozfullscreenerror",sn);document.addEventListener("MSFullscreenChange",sn);document.addEventListener("MSFullscreenError",sn)}});_.Am(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.Hf("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=un,document.exitPictureInPicture=vn,document.addEventListener("webkitpresentationmodechanged",tn,!0))}});_.Am(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=wn)}});_.Am(function(){if(window.VTTCue)_.Gf("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Gf(rb),window.VTTCue=xn;else if(6===a)_.Gf("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=yn;else{try{var b=!!xn(1,2,"")}catch(c){b=!1}b&&(_.Gf(rb),window.VTTCue=xn)}}else _.If("VTTCue not available.")});var zn;_.Am(function(){_.Hf("InputEvent.install");_.bi("Trident/")&&HTMLInputElement.prototype.addEventListener!==An&&(_.Gf("Patching input event support on IE."),zn=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=An)});_.Am(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.Am(function(){_.Hf("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 Dn=class{constructor(){this.a=Bn()}};var bq=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.cq=class{constructor(a,b,c){this.f=a;this.h=b;this.g=c||this.f.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.h(a.contentRect.width,a.contentRect.height,this.f.isFullscreen())});this.a.observe(this.g)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var dq;_.eq=class{constructor(){this.a=new Blob([dq],{type:_.Ke})}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 _.Xk;b=b.play();const d=(new _.Zh(()=>{d.stop();c.resolve(a)})).$(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===Ua?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
390
+ dq=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,
389
391
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
390
392
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
391
393
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
392
394
  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,
393
395
  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,
394
- 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]);_.eq=new _.O("clpp.media.TimestampParser");_.In={};_.Kn={};var fo=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new Dn}};var On=window.XMLHttpRequest;var eo=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.h=new aq(a);this.length=a;this.w=b;this.f=this.a=this.g=0;this.j=null;this.m=-1;this.o=new Dn}};var To=class extends _.dm{constructor(a){super(new _.Xk,()=>Promise.resolve());this.A=a;this.g=null;this.o=this.P;this.f=-1;this.h=this.j=this.m=null;Yn(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.m&&clearTimeout(this.m);this.j&&this.j();return a.abort()}).catch(()=>{})}};var co=window.fetch,$n=window.AbortController,Zn=window.Headers;_.io={};_.gq=class{constructor(a){a=a.getConfiguration();a=_.kf(a.textStyle||a.textstyle||{});this.J=typeof a.backgroundColor===_.ne?a.backgroundColor:null;this.S=typeof a.windowColor===_.ne?a.windowColor:null;this.N=typeof a.fontColor===_.ne?a.fontColor:null;this.R=typeof a.fontFamily===_.ne?a.fontFamily:null;this.H=typeof a.fontSize===_.ne?a.fontSize:null;this.B=typeof a.fontSizePercent===_.p?a.fontSizePercent:null;this.G=typeof a.edgeColor===_.ne?a.edgeColor:"rgba(0, 0, 0, 1)";this.o=null;typeof a.edgeType===
395
- _.ne&&(this.o=a.edgeType)}getBackgroundColor(){return this.J}setBackgroundColor(a){this.J=a;this.g()}getWindowColor(){return this.S}setWindowColor(a){this.S=a;this.g()}getFontFamily(){return this.R}setFontFamily(a){this.R=a;this.g()}getFontColor(){return this.N}setFontColor(a){this.N=a;this.g()}getFontSize(){return this.H}setFontSize(a){this.H=a;this.g()}getFontSizePercent(){return null===this.B?fq:this.B}setFontSizePercent(a){this.B=a;this.g()}getEdgeColor(){return this.G}setEdgeColor(a){this.G=
396
- a;this.g()}getEdgeType(){return this.o}setEdgeType(a){this.o=a;this.g()}};_.gq.prototype.setEdgeType=_.gq.prototype.setEdgeType;_.gq.prototype.getEdgeType=_.gq.prototype.getEdgeType;_.gq.prototype.setEdgeColor=_.gq.prototype.setEdgeColor;_.gq.prototype.getEdgeColor=_.gq.prototype.getEdgeColor;_.gq.prototype.setFontSizePercent=_.gq.prototype.setFontSizePercent;_.gq.prototype.getFontSizePercent=_.gq.prototype.getFontSizePercent;_.gq.prototype.setFontSize=_.gq.prototype.setFontSize;
397
- _.gq.prototype.getFontSize=_.gq.prototype.getFontSize;_.gq.prototype.setFontColor=_.gq.prototype.setFontColor;_.gq.prototype.getFontColor=_.gq.prototype.getFontColor;_.gq.prototype.setFontFamily=_.gq.prototype.setFontFamily;_.gq.prototype.getFontFamily=_.gq.prototype.getFontFamily;_.gq.prototype.setWindowColor=_.gq.prototype.setWindowColor;_.gq.prototype.getWindowColor=_.gq.prototype.getWindowColor;_.gq.prototype.setBackgroundColor=_.gq.prototype.setBackgroundColor;
398
- _.gq.prototype.getBackgroundColor=_.gq.prototype.getBackgroundColor;var fq=1/15;var ko="raised",lo="depressed",no="dropshadow",mo="uniform";_.x("clpp.text.EdgeType",{NONE:_.Ad,RAISED:ko,DEPRESSED:lo,DROP_SHADOW:no,UNIFORM:mo});_.io[Vb]=class{constructor(a){this.g=a;this.a=null;this.f=new _.O("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.io[_.Wb]||null;c?(b=new c(this.g),b.parseInit(a)):this.f.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=_.io[_.Xb]||null;c?(b=new c(this.g),b.parseInit(a)):this.f.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=
399
- null}if(b)this.a=b;else throw new _.G(_.F,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.G(_.F,2,2011);return this.a.parseMedia(a,b)}};var hq;
400
- _.iq=class extends _.gq{constructor(a){super(a);this.m=a.getSurface().getMedia();this.f=`clpp-video-${hq++}`;this.h=document.createElement(_.pe);this.j=this.w=!1;_.mm(this.m,this.f);document.head.appendChild(this.h);this.g()}append(){}remove(){return!0}isTextVisible(){return this.w}setTextVisibility(a){this.w=a}g(){if(!this.j){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.oo(this)},b=
401
- Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.h.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.m.classList.remove(this.f);document.head.removeChild(this.h);this.j=!0;return Promise.resolve()}};hq=0;_.wl("native",new class{aa(){return!0}create(a){return new _.iq(a)}});_.jq=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;
396
+ 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]);_.fq=new _.O("clpp.media.TimestampParser");_.In={};_.Kn={};var fo=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new Dn}};var On=window.XMLHttpRequest;var eo=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.h=new bq(a);this.length=a;this.w=b;this.f=this.a=this.g=0;this.j=null;this.m=-1;this.o=new Dn}};var Vo=class extends _.dm{constructor(a){super(new _.Xk,()=>Promise.resolve());this.A=a;this.g=null;this.o=this.P;this.f=-1;this.h=this.j=this.m=null;Yn(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.m&&clearTimeout(this.m);this.j&&this.j();return a.abort()}).catch(()=>{})}};var co=window.fetch,$n=window.AbortController,Zn=window.Headers;_.io={};_.hq=class{constructor(a){a=a.getConfiguration();a=_.lf(a.textStyle||a.textstyle||{});this.J=typeof a.backgroundColor===_.ne?a.backgroundColor:null;this.S=typeof a.windowColor===_.ne?a.windowColor:null;this.O=typeof a.fontColor===_.ne?a.fontColor:null;this.R=typeof a.fontFamily===_.ne?a.fontFamily:null;this.H=typeof a.fontSize===_.ne?a.fontSize:null;this.B=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.G=typeof a.edgeColor===_.ne?a.edgeColor:"rgba(0, 0, 0, 1)";this.o=null;typeof a.edgeType===
397
+ _.ne&&(this.o=a.edgeType)}getBackgroundColor(){return this.J}setBackgroundColor(a){this.J=a;this.g()}getWindowColor(){return this.S}setWindowColor(a){this.S=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.H}setFontSize(a){this.H=a;this.g()}getFontSizePercent(){return null===this.B?gq:this.B}setFontSizePercent(a){this.B=a;this.g()}getEdgeColor(){return this.G}setEdgeColor(a){this.G=
398
+ a;this.g()}getEdgeType(){return this.o}setEdgeType(a){this.o=a;this.g()}};_.hq.prototype.setEdgeType=_.hq.prototype.setEdgeType;_.hq.prototype.getEdgeType=_.hq.prototype.getEdgeType;_.hq.prototype.setEdgeColor=_.hq.prototype.setEdgeColor;_.hq.prototype.getEdgeColor=_.hq.prototype.getEdgeColor;_.hq.prototype.setFontSizePercent=_.hq.prototype.setFontSizePercent;_.hq.prototype.getFontSizePercent=_.hq.prototype.getFontSizePercent;_.hq.prototype.setFontSize=_.hq.prototype.setFontSize;
399
+ _.hq.prototype.getFontSize=_.hq.prototype.getFontSize;_.hq.prototype.setFontColor=_.hq.prototype.setFontColor;_.hq.prototype.getFontColor=_.hq.prototype.getFontColor;_.hq.prototype.setFontFamily=_.hq.prototype.setFontFamily;_.hq.prototype.getFontFamily=_.hq.prototype.getFontFamily;_.hq.prototype.setWindowColor=_.hq.prototype.setWindowColor;_.hq.prototype.getWindowColor=_.hq.prototype.getWindowColor;_.hq.prototype.setBackgroundColor=_.hq.prototype.setBackgroundColor;
400
+ _.hq.prototype.getBackgroundColor=_.hq.prototype.getBackgroundColor;var gq=1/15;var ko="raised",lo="depressed",no="dropshadow",mo="uniform";_.z("clpp.text.EdgeType",{NONE:_.Ad,RAISED:ko,DEPRESSED:lo,DROP_SHADOW:no,UNIFORM:mo});_.io[Wb]=class{constructor(a){this.g=a;this.a=null;this.f=new _.O("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.io[_.Xb]||null;c?(b=new c(this.g),b.parseInit(a)):this.f.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=_.io[_.Yb]||null;c?(b=new c(this.g),b.parseInit(a)):this.f.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=
401
+ null}if(b)this.a=b;else throw new _.H(_.G,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.H(_.G,2,2011);return this.a.parseMedia(a,b)}};var iq;
402
+ _.jq=class extends _.hq{constructor(a){super(a);this.m=a.getSurface().getMedia();this.f=`clpp-video-${iq++}`;this.h=document.createElement(_.pe);this.j=this.w=!1;_.mm(this.m,this.f);document.head.appendChild(this.h);this.g()}append(){}remove(){return!0}isTextVisible(){return this.w}setTextVisibility(a){this.w=a}g(){if(!this.j){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.oo(this)},b=
403
+ Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.h.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.m.classList.remove(this.f);document.head.removeChild(this.h);this.j=!0;return Promise.resolve()}};iq=0;_.wl("native",new class{ba(){return!0}create(a){return new _.jq(a)}});_.kq=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;