@castlabs/prestoplay 6.8.0 → 6.9.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 +27 -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 +109 -109
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +407 -407
  8. package/cjs/cl.crypto.js +8 -8
  9. package/cjs/cl.dash.js +72 -72
  10. package/cjs/cl.externs.js +25 -25
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +72 -67
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +31 -31
  15. package/cjs/cl.ima.js +23 -23
  16. package/cjs/cl.mse.js +272 -272
  17. package/cjs/cl.muxdata.js +15 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +13 -13
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.smooth.js +71 -71
  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 +19 -19
  28. package/cjs/cl.vtt.js +14 -14
  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 +26 -26
  35. package/cl.core.js +259 -259
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +67 -67
  38. package/cl.externs.js +25 -25
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +61 -58
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +25 -25
  43. package/cl.ima.js +17 -17
  44. package/cl.mse.js +199 -199
  45. package/cl.muxdata.js +11 -11
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +9 -9
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +58 -58
  50. package/cl.thumbnails.js +16 -16
  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 +7 -7
  55. package/cl.vr.js +14 -14
  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 +27 -0
package/cl.core.js CHANGED
@@ -1,43 +1,43 @@
1
- let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,na,oa,sa,ta,ua,va,xa,Ca,Da,Ea,Fa,Ga,La,Na,Oa,Pa,Ra,Sa,Ta,ab,fb,gb,hb,kb,mb,qb,rb,tb,vb,Vb,$b,nc,oc,uc,vc,wc,yc,Ac,Bc,Cc,Dc,Lc,Sc,Vc,Wc,Xc,ad,gd,id,jd,pd,sd,Hd,Od,Yd,$d,he,ke,re,ye,Ne,Re,Se,Te,Ue,Ve,Xe,Ye,Ze,$e,af,bf,ef,ff,lf,hf,sf,tf,xf,zf,Lf,Vf,Wf,Pf,Sf,Xf,Zf,ag,dg,eg,ig,kg,mg,jg,gg,og,ug,wg,vg,xg,yg,zg,Cg,Dg,hh,lh,mh,nh,oh,ph,rh,sh,vh,yh,Bh,Ch,Dh,Hh,Jh,Eh,Gh,Ih,Kh,Lh,Mh,Oh,Ph,Vh,Zh,di,fi,ci,pi,ii,hi,Ci,Di,Fi,Gi,Hi,Ii,Ji,Ki,Mi,Li,Ni,Oi,Ri,Si,Ti,Ei,Vi,Xi,Zi,aj,hj,ij,jj,kj,qj,
1
+ let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,na,oa,qa,ra,ta,ua,wa,Ca,Da,Ea,Fa,Ga,Ma,Oa,Pa,Qa,Ra,Sa,Ta,bb,eb,fb,gb,jb,lb,ob,pb,rb,tb,Tb,Yb,mc,nc,tc,uc,vc,xc,zc,Ac,Bc,Cc,Kc,Qc,Tc,Uc,Vc,Zc,ed,hd,kd,pd,sd,Hd,Od,Yd,$d,he,ke,re,ye,Ne,Re,Se,Te,Ue,Ve,Xe,Ye,Ze,$e,af,bf,ef,ff,lf,hf,sf,tf,xf,zf,Lf,Vf,Wf,Pf,Sf,Xf,Zf,ag,dg,eg,ig,kg,mg,jg,gg,og,ug,wg,vg,xg,yg,zg,Cg,Dg,hh,lh,mh,nh,oh,ph,rh,sh,vh,yh,Bh,Ch,Dh,Hh,Jh,Eh,Gh,Ih,Kh,Lh,Mh,Oh,Ph,Vh,Zh,di,fi,ci,pi,ii,hi,Ci,Di,Fi,Gi,Hi,Ii,Ji,Ki,Mi,Li,Ni,Oi,Ri,Si,Ti,Ei,Vi,Xi,Zi,aj,hj,ij,jj,kj,qj,
2
2
  rj,zj,Cj,Ij,Mj,Oj,Vj,ek,Rj,Zj,jk,lk,mk,sk,vk,wk,xk,yk,tk,zk,Ak,Bk,Ck,Dk,Ek,Nk,Sk,Uk,Wk,Vk,Yk,Qk,fl,bl,el,dl,Tk,gl,hl,il,ol,pl,ql,tl,xl,yl,Al,vl,ul,Il,Jl,Nl,Ml,Pl,Rl,Sl,Ol,Ul,Vl,$l,em,fm,gm,km,lm,jm,mm,im,hm,om,qm,sm,tm,um,vm,wm,xm,ym,zm,Am,Bm,Fm,Jm,Km,Mm,Om,Rm,Sm,Tm,Wm,Ym,Zm,$m,cn,an,bn,dn,en,fn,gn,hn,jn,kn,ln,mn,nn,pn,qn,rn,tn,vn,An,Bn,Cn,En,Fn,Gn,In,Jn,Hn,Kn,Nn,Mn,Ln,Rn,Qn,Wn,cf,df;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";
3
- _.da="6.8.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="CODECS";_.la="Cannot retrieve buffer information due to platform limitations";_.ma="CastlabsPlayer";na="Content-Length";oa="Content-Type";_.ra="Could not find configured DRM environment.";sa="DRM licenses loaded";ta="DRMtoday";ua="DRMtodayOnboard";va="Destroying player";_.wa="Disable track type ";xa="Error while decoding string!";
4
- _.ya="Error while fetching license!";_.za="FairPlay Certificate URL is not defined";_.Aa="FairPlay License URL is not defined";_.Ba="GROUP-ID";Ca="HW_SECURE_CRYPTO";Da="HW_SECURE_DECODE";Ea="HeaderDrm";Fa="InvalidStateError";Ga="License verification failed: ";_.Ha="Loading player with configuration";_.Ja="MaxHeight";_.Ka="MaxWidth";La="Missing media element";Na="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Oa="No event provided!";Pa="No track data attached to the event, unable to add track!";
5
- Ra="Not a persistent session.";Sa="NotAllowedError";Ta="NotSupportedError";_.Ua="PlayReady License URL is not defined";_.Va="Player sources";_.Wa="Please make sure ";_.Xa="QualityLevel";_.Ya="RESOLUTION";_.Za="Releasing player with source";_.$a="Representation";ab="STANDARD";_.db="SW_SECURE_CRYPTO";_.eb="SW_SECURE_DECODE";fb="Session is closed";gb="Signature Verification failed";hb="Skipping Session creation. License for init data was already requested in ";_.ib="SmoothStreamingMedia";kb="The index is not in the allowed range.";
6
- _.lb="URI";mb="Unable to translate ";_.nb="Unhandled/ignored event";_.ob="Unregistering listeners";qb="Unsupported keySystem";rb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.sb="VIDEO";tb="WebkitEmeManager.MediaKeySession.load";_.ub="Widevine License URL is not defined";vb="Will create EME Manager: ";_.wb="ad-break-started";_.xb="ad-break-stopped";_.yb="ad-buffering";_.zb="ad-clicked";_.Ab="ad-completed";_.Bb="ad-first-quartile";_.Cb="ad-impression";_.Db="ad-loaded";_.Eb="ad-midpoint";
7
- _.Fb="ad-paused";_.Gb="ad-progress";_.Hb="ad-resumed";_.Ib="ad-skipped";_.Jb="ad-started";_.Kb="ad-stopped";_.Lb="ad-third-quartile";_.Mb="addtrack";_.Nb="ads-timeline-changed";_.Ob="airplay-casting-ended";_.Pb="airplay-casting-started";_.Rb="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
- _.p="audio";_.ac="audio/aac";_.bc="audio/ac3";_.cc="audio/eac3";_.dc="audio/mp4";_.ec="audiobufferchanged";_.fc="autoplaynotallowed";_.gc="bitratechanged";_.hc="boolean";_.ic="bufferingended";_.jc="bufferingstarted";nc="canplay";oc="canplaythrough";_.pc="castingstarted";_.qc="caststatuschanged";_.rc="cdn-switch-success";_.sc="cenc";_.tc="center";uc="certificate-request";vc="change";wc="chrome";_.xc="clpp-fill";yc="clpp-hidden";_.zc="clpp.cast.CastSender";Ac="clpp.drm.HeaderDrm";Bc="clpp.drm.eme.AppleEmeManager";
9
- Cc="clpp.native.Player";Dc="clpp.utils.Platform";_.Ec="codecs";_.Fc="column-reverse";_.Gc="com.adobe.primetime";_.Hc="com.apple.fps";_.Ic="com.microsoft.playready";_.Jc="com.widevine.alpha";_.Kc="config.drm.customData is not defined";Lc="controls";_.Mc="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";gd="keystatuseschange";_.hd="left";id="license-renewal";jd="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";
3
+ _.da="6.9.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="CODECS";_.la="Cannot retrieve buffer information due to platform limitations";_.ma="CastlabsPlayer";na="Content-Length";oa="Content-Type";_.pa="Could not find configured DRM environment.";qa="DRM licenses loaded";ra="DRMtoday";ta="DRMtodayOnboard";ua="Destroying player";_.va="Disable track type ";wa="Error while decoding string!";
4
+ _.xa="Error while fetching license!";_.za="FairPlay Certificate URL is not defined";_.Aa="FairPlay License URL is not defined";_.Ba="GROUP-ID";Ca="HW_SECURE_CRYPTO";Da="HW_SECURE_DECODE";Ea="HeaderDrm";Fa="InvalidStateError";Ga="License verification failed: ";_.Ia="Loading player with configuration";_.Ka="MaxHeight";_.La="MaxWidth";Ma="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";Ta="NotSupportedError";_.Ua="PlayReady License URL is not defined";_.Va="Player sources";_.Wa="Please make sure ";_.Xa="QualityLevel";_.Ya="RESOLUTION";_.Za="Releasing player with source";_.$a="Representation";bb="STANDARD";_.cb="SW_SECURE_CRYPTO";_.db="SW_SECURE_DECODE";eb="Session is closed";fb="Signature Verification failed";gb="Skipping Session creation. License for init data was already requested in ";_.ib="SmoothStreamingMedia";jb="The index is not in the allowed range.";
6
+ _.kb="URI";lb="Unable to translate ";_.mb="Unhandled/ignored event";_.nb="Unregistering listeners";ob="Unsupported keySystem";pb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.qb="VIDEO";rb="WebkitEmeManager.MediaKeySession.load";_.sb="Widevine License URL is not defined";tb="Will create EME Manager: ";_.ub="ad-break-started";_.vb="ad-break-stopped";_.wb="ad-buffering";_.xb="ad-clicked";_.yb="ad-completed";_.zb="ad-first-quartile";_.Ab="ad-impression";_.Bb="ad-loaded";_.Cb="ad-midpoint";
7
+ _.Db="ad-paused";_.Eb="ad-progress";_.Fb="ad-resumed";_.Gb="ad-skipped";_.Hb="ad-started";_.Ib="ad-stopped";_.Jb="ad-third-quartile";_.Kb="addtrack";_.Lb="ads-timeline-changed";_.Mb="airplay-casting-ended";_.Ob="airplay-casting-started";_.Qb="airplay-status-changed";_.Rb="application/cea-608";_.Sb="application/dash+xml";Tb="application/mp4";_.Ub='application/mp4; codecs\x3d"stpp"';_.Vb='application/mp4; codecs\x3d"wvtt"';_.Wb="application/ttml+xml";_.Xb="application/vnd.ms-sstr+xml";Yb="application/x-www-form-urlencoded";
8
+ _.p="audio";_.Zb="audio/aac";_.$b="audio/ac3";_.ac="audio/eac3";_.bc="audio/mp4";_.cc="audiobufferchanged";_.dc="autoplaynotallowed";_.ec="bitratechanged";_.fc="boolean";_.hc="bufferingended";_.ic="bufferingstarted";mc="canplay";nc="canplaythrough";_.oc="castingstarted";_.pc="caststatuschanged";_.qc="cdn-switch-success";_.rc="cenc";_.sc="center";tc="certificate-request";uc="change";vc="chrome";_.wc="clpp-fill";xc="clpp-hidden";_.yc="clpp.cast.CastSender";zc="clpp.drm.HeaderDrm";Ac="clpp.drm.eme.AppleEmeManager";
9
+ Bc="clpp.native.Player";Cc="clpp.utils.Platform";_.Dc="codecs";_.Ec="column-reverse";_.Fc="com.adobe.primetime";_.Gc="com.apple.fps";_.Hc="com.microsoft.playready";_.Ic="com.widevine.alpha";_.Jc="config.drm.customData is not defined";Kc="controls";_.Lc="cuechange";_.Mc="destroy()";_.Nc="disabled";_.Oc="div";_.Pc="drmexpirationupdate";Qc="drmrenewalstarted";_.Rc="drmsessionpersisted";_.Sc="drmsessionupdate";Tc="drmtoday";Uc="durationchange";Vc="encrypted";_.Wc="end";_.Xc="ended";_.Yc="error";Zc="fullscreenElement";
10
+ _.$c="function";_.ad="height";_.bd="hidden";_.cd="image";_.dd="internal-error";ed="keystatuseschange";_.fd="left";hd="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
11
  _.Fd="onPlayerWillRelease";_.Gd="onStateChanged()";Hd="online-status-changed";_.Id="optional";_.Jd="org.w3.clearkey";_.Kd="output-restricted";_.Ld="pause";_.Md="persistent";_.Nd="persistent-license";Od="picture-in-picture";_.Rd="play";_.Sd="playing";_.Td="playlist-item-changed";_.Ud="playlist-modified";_.Vd="progress";_.Wd="px";_.Xd="ratechange";Yd="released";_.Zd="releasing";$d="removetrack";_.ae="required";_.be="resize";_.ce="right";_.de="seeked";_.ee="seeking";_.fe="showing";_.ge="sinf";he="stalled";
12
12
  _.ie="start";_.je="statechanged";ke="status-pending";_.le="stbl";_.me="string";_.ne="stsd";_.oe="style";_.pe="subtitles-htmlcue";_.qe="subtitles-ttml";re="temporary";_.v="text";_.se="text/vtt";_.te="text/xml";_.ue="timeupdate";_.ve="trak";_.we="ttml-xml";_.xe="und";ye="unknown";_.ze="urn:scte:scte35";_.Ae="urn:scte:scte35:2014";_.Be="user-seeked";_.Ce="user-seeking";_.De="value";_.Ee="vertical-lr";_.Fe="vertical-rl";_.w="video";_.He="video/mp2t";_.Je="video/mp4";_.Ke="videobufferchanged";_.Le="videotrackchanged";
13
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
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())})};_.y=function(a){return ff(a())};
15
- _.A=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 _.B(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(_.B(a)||!_.mf(a))a={};for(const e in b)c=b[e],hf(c)||_.B(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):!_.B(c)&&_.of(c)&&20>d&&(a[e]=lf(a[e],c,d));return a};hf=function(a){a=typeof a;return a===_.me||a===_.r||a===_.hc};_.B=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===_.me};_.qf=function(a){return typeof a===_.r};_.of=function(a){if(_.B(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(_.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
- 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};_.uf=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};xf=function(a){return a&&0<=vf[a]?vf[a]:wf};zf=function(a){if(!a)return _.C("clpp.log",mb+a+ca),-1;const b=yf[a.toUpperCase()];return void 0===b?(_.C("clpp.log",mb+a+ca),-1):b};_.Ff=function(a){Af.info.apply(Af,arguments)};_.Gf=function(a){Af.debug.apply(Af,arguments)};
20
- _.C=function(a){Af.warn.apply(Af,arguments)};_.Hf=function(a){Af.error.apply(Af,arguments)};_.Kf=function(a){if(a){var b=a.a();b in _.If?_.Jf.warn("Player-Factory '"+b+"' already registered"):(_.If[b]=a,_.Jf.info("Registered Player-Factory: '"+b+"'"))}};_.Mf=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)Lf(b[c]);a.a.clear()};_.Nf=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)};
15
+ _.z=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 _.C(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(_.C(a)||!_.mf(a))a={};for(const e in b)c=b[e],hf(c)||_.C(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):!_.C(c)&&_.of(c)&&20>d&&(a[e]=lf(a[e],c,d));return a};hf=function(a){a=typeof a;return a===_.me||a===_.r||a===_.fc};_.C=function(a){return null===a||"undefined"===typeof a};_.mf=function(a){return typeof a===_.Bd};
17
+ _.nf=function(a){return typeof a===_.$c};_.pf=function(a){return typeof a===_.me};_.qf=function(a){return typeof a===_.r};_.of=function(a){if(_.C(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(_.C(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.C(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.C(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};_.uf=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};xf=function(a){return a&&0<=vf[a]?vf[a]:wf};zf=function(a){if(!a)return _.D("clpp.log",lb+a+ca),-1;const b=yf[a.toUpperCase()];return void 0===b?(_.D("clpp.log",lb+a+ca),-1):b};_.Bf=function(a){Af.info.apply(Af,arguments)};_.Gf=function(a){Af.debug.apply(Af,arguments)};
20
+ _.D=function(a){Af.warn.apply(Af,arguments)};_.Hf=function(a){Af.error.apply(Af,arguments)};_.Kf=function(a){if(a){var b=a.a();b in _.If?_.Jf.warn("Player-Factory '"+b+"' already registered"):(_.If[b]=a,_.Jf.info("Registered Player-Factory: '"+b+"'"))}};_.Mf=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)Lf(b[c]);a.a.clear()};_.Nf=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
21
  Lf=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
22
- Vf=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:_.Of,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(Pf(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
23
- _.Ae;g.type=_.Qf;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.l.trigger(new _.F(_.Rf,{detail:f}));Array.prototype.push.apply(a.g,c);Sf(a,c,b);a.f.off(b,_.Mc);a.f.on(b,_.Mc,f=>{f=f.target.activeCues;f=f.length?Pf(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(_.Tf,{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(_.Uf,{detail:f})))}})}};
24
- Wf=function(a,b){a.h=b;a.j=a.h.textTracks;a.f.on(a.j,_.Mb,c=>{c=c.track;c.kind===_.td&&Vf(a,c)})};Pf=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};Sf=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
- Xf=function(a,b){b=b.track;b.kind!==_.td&&(b.mode===_.fe&&(b.mode=_.dd),a.a.on(b,_.Mc,c=>{c=c.target||c.srcElement;c.mode=_.dd;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.j.append(c,[]))}))};_.Yf=function(a){return Array.isArray(a)?a:[a]};Zf=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};_.$f=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};
26
- ag=function(a,b){const c=b||Zf;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)}};_.bg=function(a){return null!=a};_.cg=function(a){var b;a instanceof _.cg?(dg(this,a.Sa),this.dc=a.dc,this.La=a.La,eg(this,a.vc),this.wa=a.wa,_.fg(this,gg(a.a)),this.Tb=a.Tb):a&&(b=String(a).match(hg))?(dg(this,b[1]||"",!0),this.dc=ig(b[2]||""),this.La=ig(b[3]||"",!0),eg(this,b[4]),this.wa=ig(b[5]||"",!0),_.fg(this,b[6]||"",!0),this.Tb=ig(b[7]||"")):this.a=new jg(null)};
27
- dg=function(a,b,c){a.Sa=c?ig(b,!0):b;a.Sa&&(a.Sa=a.Sa.replace(/:$/,""))};eg=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};_.fg=function(a,b,c){b instanceof jg?a.a=b:(c||(b=kg(b,lg)),a.a=new jg(b))};ig=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};kg=function(a,b,c){return typeof a===_.me?(a=encodeURI(a).replace(b,mg),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};
22
+ Vf=function(a,b){a.o.debug("onMetadata_()");b.mode=_.bd;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:_.Of,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(Pf(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
23
+ _.Ae;g.type=_.Qf;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.l.trigger(new _.F(_.Rf,{detail:f}));Array.prototype.push.apply(a.g,c);Sf(a,c,b);a.f.off(b,_.Lc);a.f.on(b,_.Lc,f=>{f=f.target.activeCues;f=f.length?Pf(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(_.Tf,{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(_.Uf,{detail:f})))}})}};
24
+ Wf=function(a,b){a.h=b;a.j=a.h.textTracks;a.f.on(a.j,_.Kb,c=>{c=c.track;c.kind===_.td&&Vf(a,c)})};Pf=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};Sf=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
+ Xf=function(a,b){b=b.track;b.kind!==_.td&&(b.mode===_.fe&&(b.mode=_.bd),a.a.on(b,_.Lc,c=>{c=c.target||c.srcElement;c.mode=_.bd;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.j.append(c,[]))}))};_.Yf=function(a){return Array.isArray(a)?a:[a]};Zf=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};_.$f=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};
26
+ ag=function(a,b){const c=b||Zf;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)}};_.bg=function(a){return null!=a};_.cg=function(a){var b;a instanceof _.cg?(dg(this,a.Ua),this.ec=a.ec,this.Ma=a.Ma,eg(this,a.xc),this.ya=a.ya,_.fg(this,gg(a.a)),this.Vb=a.Vb):a&&(b=String(a).match(hg))?(dg(this,b[1]||"",!0),this.ec=ig(b[2]||""),this.Ma=ig(b[3]||"",!0),eg(this,b[4]),this.ya=ig(b[5]||"",!0),_.fg(this,b[6]||"",!0),this.Vb=ig(b[7]||"")):this.a=new jg(null)};
27
+ dg=function(a,b,c){a.Ua=c?ig(b,!0):b;a.Ua&&(a.Ua=a.Ua.replace(/:$/,""))};eg=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.xc=b}else a.xc=null};_.fg=function(a,b,c){b instanceof jg?a.a=b:(c||(b=kg(b,lg)),a.a=new jg(b))};ig=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};kg=function(a,b,c){return typeof a===_.me?(a=encodeURI(a).replace(b,mg),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};
28
28
  mg=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};jg=function(a){this.f=a||null};_.ng=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
29
  gg=function(a){var b=new jg;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};og=function(a,b,c,d){a=`${a===_.G?"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;else try{a+=": "+JSON.stringify(d)}catch(e){}return a};
30
30
  _.pg=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};_.rg=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=qg.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.sg=function(a,b){a=_.rg(a);b=_.rg(b);return a.split("-")[0]==b.split("-")[0]};_.tg=function(a,b){for(const c of a)if(!b(c))return!1;return!0};ug=function*(a){for(let b=0;b<a;b++)yield b};
31
31
  wg=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(vg(a)==vg(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;const c=_.I(a);b=_.I(b);for(const d of ug(a.byteLength))if(c[d]!=b[d])return!1;return!0};vg=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.I=function(a,b=0,c=Infinity){return xg(a,b,c,Uint8Array)};
32
32
  xg=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=vg(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)};yg=function(a,b=0,c=Infinity){return xg(a,b,c,Uint16Array)};zg=function(a,b=0,c=Infinity){return xg(a,b,c,Uint32Array)};_.Ag=function(a,b=0,c=Infinity){return xg(a,b,c,Int32Array)};_.Bg=function(a,b=0,c=Infinity){return xg(a,b,c,DataView)};
33
33
  Cg=function(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};Dg=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
- _.Eg=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(xa);return a}a=escape(Dg(a));try{return decodeURIComponent(a)}catch(b){throw Error(xa);}};
34
+ _.Eg=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(wa);return a}a=escape(Dg(a));try{return decodeURIComponent(a)}catch(b){throw Error(wa);}};
35
35
  _.Gg=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Fg.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 Dg(c)};
36
36
  _.Hg=function(a,b){if(_.pf(a))return a;let c="";b=!!b;const d=_.I(a);239==d[0]&&187==d[1]&&191==d[2]?c=_.Eg(d):254==d[0]&&255==d[1]?c=_.Gg(d.subarray(2),!1):255==d[0]&&254==d[1]&&(c=_.Gg(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Fg.debug("Unable to find byte-order-mark, making an educated guess.");0==d[0]&&0==d[2]?c=_.Gg(a,!1):0==d[1]&&0==d[3]?c=_.Gg(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Eg(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
37
37
  };_.Ig=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};_.Jg=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
38
  _.Kg=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=zg(d):2===c?e=yg(d):e=_.I(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Lg=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Mg=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};_.Ng=function(a){return!!(a&&0<a.length)};_.Og=function(a){return!a||0===a.length};
39
39
  _.Pg=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""}};_.Rg=function(a){a=a.replace(/<[^>]+>/gi,"");Qg.innerHTML=a;a=Qg.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.Tg=function(a,b){b=void 0==b?!0:b;a=_.Sg(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};
40
- _.Sg=function(a){a=Dg(_.I(a));return btoa(a)};_.Ug=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};_.Vg=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};_.Wg=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};
40
+ _.Sg=function(a){a=Dg(_.I(a));return btoa(a)};_.Ug=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};_.Vg=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};_.Yg=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
41
  _.Zg=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};_.$g=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
42
  _.ah=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
43
  _.eh=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 _.bh(d);var f;(f=_.ah(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.ah(d,g);)c.push(new _.ch(f[1],f[2]||f[3]))}return new _.dh(a,b,c,e)};_.gh=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...fh]}};
@@ -51,165 +51,165 @@ sh=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.y(function*(){if(!navigator.
51
51
  vh=function(a){if(!a)throw new _.H(_.G,3,3101,`Invalid track type: ${a}`);if(!_.pf(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 uh:return uh}throw new _.H(_.G,3,3101,`Unknown track type: ${a}.`);};yh=function(a,b){a=vh(a);const c=_.th(b.kind);let d=b.id;d||(d=String(_.wh++));a=new _.xh(d,c===_.td?uh:a);a.kind=c;a.label=_.th(b.label);a.language=_.th(b.language);return a};
52
52
  _.zh=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.g}${a.f}`};_.Ah=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
53
  Bh=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};Ch=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};Dh=function(a,b){return _.y(function*(){const c=_.jh(b);return yield rh(a.g,c)})};
54
- Hh=function(a,b,c){return _.y(function*(){const {mimeType:d,renditions:e}=yield Eh(a,b,c),f=new _.xh("dummy",_.L),g=e.map((h,k)=>{k=new _.Fh(`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});Gh(g);return{renditions:g,mimeType:d||void 0}})};
54
+ Hh=function(a,b,c){return _.y(function*(){const {mimeType:d,renditions:e}=yield Eh(a,b,c),f=new _.xh("dummy",_.L),g=e.map((h,k)=>{k=new _.Fh(`R${k}`,f);k.bandwidth=h.bandwidth;k.Ac=h.Ac;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});Gh(g);return{renditions:g,mimeType:d||void 0}})};
55
55
  Jh=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Ih(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};Eh=function(a,b,c){return _.y(function*(){const d=Kh(b),e=Lh(b,c);return{mimeType:yield Mh(a,e,d[0]?d[0].codec:null),renditions:d}})};
56
- Gh=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.");};Ih=function(a){const b=_.eh(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(_.Ba),name:a("NAME"),language:a("LANGUAGE"),yg:a("AUTOSELECT"),default:a("DEFAULT"),Fg:a("FORCED"),pe:a("CHARACTERISTICS"),uri:a(_.lb)}};
57
- Kh=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.eh(0,b);if(c.getAttribute(_.sb))throw Error("Playlist contains alternative video streams.");var d=_.pg(c,_.Ya);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.pg(c,_.ja);e=e?Number(e):null;var f=_.pg(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.pg(c,_.ka);c=_.Nh(_.w,c?c.split(","):[]);return b={bandwidth:e,yc:f,codec:c,width:b,height:d,mimeType:null}})};
58
- Lh=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?Ch(a,b):null};Mh=function(a,b,c){return _.y(function*(){if(!b||!c)return null;var d=yield Dh(a,b);d=[Oh(d,b),Ph(d,b)].filter(Boolean);return _.Qh(d,_.w,c)})};Oh=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?Ch(a,b):null};Ph=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.pg(_.eh(0,a),_.lb))?Ch(a,b):null:null};
56
+ Gh=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.");};Ih=function(a){const b=_.eh(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(_.Ba),name:a("NAME"),language:a("LANGUAGE"),Cg:a("AUTOSELECT"),default:a("DEFAULT"),Jg:a("FORCED"),ue:a("CHARACTERISTICS"),uri:a(_.kb)}};
57
+ Kh=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.eh(0,b);if(c.getAttribute(_.qb))throw Error("Playlist contains alternative video streams.");var d=_.pg(c,_.Ya);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.pg(c,_.ja);e=e?Number(e):null;var f=_.pg(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.pg(c,_.ka);c=_.Nh(_.w,c?c.split(","):[]);return b={bandwidth:e,Ac:f,codec:c,width:b,height:d,mimeType:null}})};
58
+ Lh=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?Ch(a,b):null};Mh=function(a,b,c){return _.y(function*(){if(!b||!c)return null;var d=yield Dh(a,b);d=[Oh(d,b),Ph(d,b)].filter(Boolean);return _.Qh(d,_.w,c)})};Oh=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?Ch(a,b):null};Ph=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.pg(_.eh(0,a),_.kb))?Ch(a,b):null:null};
59
59
  _.Sh=function(a,b,c){for(const d of _.Rh)if(d.probe(b,c))return d.create(a);return null};_.Th=function(a){a=_.Rh.indexOf(a);0<=a&&_.Rh.splice(a,1)};_.Uh=function(a,b){b&&(a+='; codecs\x3d"'+b+'"');return a};Vh=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
- Zh=function(){if(Wh)return Wh;Xh||(Xh=new _.Yh(()=>{Wh=null}));(Wh=document.querySelector(_.w)||document.querySelector(_.p))||(Wh=document.createElement(_.w));Xh.ca(1);return Wh};_.$h=function(){return!!navigator.userAgent.match(/Edge?\//)};_.ai=function(a){return(navigator.userAgent||"").includes(a)};_.bi=function(a){return _.ai("Tizen"+(a?" "+String(a):""))};
60
+ Zh=function(){if(Wh)return Wh;Xh||(Xh=new _.Yh(()=>{Wh=null}));(Wh=document.querySelector(_.w)||document.querySelector(_.p))||(Wh=document.createElement(_.w));Xh.da(1);return Wh};_.$h=function(){return!!navigator.userAgent.match(/Edge?\//)};_.ai=function(a){return(navigator.userAgent||"").includes(a)};_.bi=function(a){return _.ai("Tizen"+(a?" "+String(a):""))};
61
61
  di=function(a){const b={major:-1,name:ye};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=ci(a,c[0]));2<=c.length&&(b.minor=ci(a,c[1]));3<=c.length&&(b.patch=ci(a,c[2]));4<=c.length&&(b.build=ci(a,c[3]));return b};_.ei=function(){return _.ai("Web0S")};_.gi=function(){return _.ei()&&79===fi().major};
62
- fi=function(){const a=hi();const b=["ie","edge","opera","firefox","safari",wc];var c=ii();const d=ji[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return di(c[1]);return di("")};_.ki=function(){return _.ai("CrKey")};_.li=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.bi()};_.mi=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.li()&&1<navigator.maxTouchPoints};_.ni=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
62
+ fi=function(){const a=hi();const b=["ie","edge","opera","firefox","safari",vc];var c=ii();const d=ji[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return di(c[1]);return di("")};_.ki=function(){return _.ai("CrKey")};_.li=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.bi()};_.mi=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.li()&&1<navigator.maxTouchPoints};_.ni=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
63
63
  ci=function(a,b){try{return parseInt(b,10)}catch(c){oi.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};pi=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
64
  ii=function(){const a=hi();if(!a)return qi;var b=a.match(/^.+?(?=\))/);if(!b)return qi;b=b[0];if(pi(b,["iphone","ipad"]))return ri;if(pi(b,["android"]))return si;if(pi(b,["macintosh"]))return ti;if(pi(b,["windows nt"]))return wi;if(pi(b,["tizen"]))return xi;if(pi(b,["web0s"]))return yi;if(pi(b,["linux"]))return zi;oi.warn("Unable to identify OS from user agent: "+a);return qi};hi=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
65
- _.Bi=function(){var a=ii();var b=ii();var c=ji[b];if(c){c=hi().match(c.os_version)[1];c=di(c);if(b===wi)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=di("");a:{c=hi();const e=["ie","edge","opera","firefox","safari",wc];var d=ii();d=ji[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=Ai}return{os:a,osVersion:b,browser:c,browserVersion:fi()}};
66
- Ci=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:_.th(b.kind),language:_.th(b.language),label:_.th(b.label)},["kind","language","label"])};Di=function(a){return a.enabled||a.selected||a.mode===_.fe||a.mode===_.dd};Fi=function(a,b,c){return Ei(a)&&b===_.L&&!!c.enableHlsVideoTrackInfo};
65
+ _.Bi=function(){var a=ii();var b=ii();var c=ji[b];if(c){c=hi().match(c.os_version)[1];c=di(c);if(b===wi)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=di("");a:{c=hi();const e=["ie","edge","opera","firefox","safari",vc];var d=ii();d=ji[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=Ai}return{os:a,osVersion:b,browser:c,browserVersion:fi()}};
66
+ Ci=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:_.th(b.kind),language:_.th(b.language),label:_.th(b.label)},["kind","language","label"])};Di=function(a){return a.enabled||a.selected||a.mode===_.fe||a.mode===_.bd};Fi=function(a,b,c){return Ei(a)&&b===_.L&&!!c.enableHlsVideoTrackInfo};
67
67
  Gi=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})))})};Hi=function(a,b,c){return Ei(a)&&(b===_.K||b===_.J)&&!!c.enableMetadata};
68
- Ii=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.pe&&(b.accessibility=d.pe.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Ji=function(a,b){return a.h.filter(c=>c.type===b)};Ki=function(a){(a=a.l.getTextDisplayer())&&a.remove(0,Infinity)};Mi=function(a,b){if(a=Li(a,b))a=Array.from(a),b===_.J&&(a=a.filter(c=>c.kind!==_.td));return a};
68
+ Ii=function(a,b,c){return _.y(function*(){var d=a.l.getLoadedSource();d&&a.j&&(d=yield a.j.f(d.url,c),d.uc&&(d=d.uc.get(`${b.type}:${b.label}`))&&d.ue&&(b.accessibility=d.ue.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Ji=function(a,b){return a.h.filter(c=>c.type===b)};Ki=function(a){(a=a.l.getTextDisplayer())&&a.remove(0,Infinity)};Mi=function(a,b){if(a=Li(a,b))a=Array.from(a),b===_.J&&(a=a.filter(c=>c.kind!==_.td));return a};
69
69
  Li=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}};Ni=function(a,b){return(a=a.f.get(b)||null)&&a.renditions[0]};Oi=function(a,b){return(a=a.m.get(b))&&a.renditions[0]};
70
- Ri=function(a,b,c){const d=Mi(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=_.fe;g=_.Pc;break;case _.K:f="enabled";break;case _.L:f="selected"}if(f)for(const h of d)h[f]=Ci(c,h,c.type)?e:g}}else if(a.a.debug(_.wa+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(_.Pi)):b===_.J&&a.l.trigger(new _.F(_.Qi))};Si=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=_.Og(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
70
+ Ri=function(a,b,c){const d=Mi(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=_.fe;g=_.Nc;break;case _.K:f="enabled";break;case _.L:f="selected"}if(f)for(const h of d)h[f]=Ci(c,h,c.type)?e:g}}else if(a.a.debug(_.va+b),a.f.get(b)&&d&&b===_.J){for(e of d)e.mode=
71
+ _.Nc;a.f.set(b,null)}b===_.K?a.l.trigger(new _.F(_.Pi)):b===_.J&&a.l.trigger(new _.F(_.Qi))};Si=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=_.Og(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
72
72
  Ti=function(a,b){return _.y(function*(){var c=a.l.getConfiguration(),d=_.Sh(c,b.mimeType,_.se);if(d){c=_.jh(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:_.se},Si(a,d,c))}else a.a.warn("Track mimetype is not supported",b)})};Ei=function(a){a=a.l.getLoadedSource();return!(!a||a.type!==_.Ui&&!a.url.endsWith(".m3u8"))&&_.li()};
73
73
  Vi=function(a,b,c){c=_.Yf(c).filter(e=>e);a.a.info("Find preferred tracks for",b,c);const d=Ji(a,b);c.some(e=>{const f=_.rg(e);return(e=d.find(g=>{g=_.rg(g.language||"");return _.sg(f,g)}))?(a.a.info("Will select track with id",e.id),Ri(a,b,e),!0):!1})};Xi=function(a){return a.name===Sa&&Wi.some(b=>a.message.startsWith(b))};
74
74
  _.$i=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.mi()&&(a=360);const b=_.gh();b.maxAttempts=3;a={source:"",license:Yi,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.gh(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,
75
75
  restrictions:Zi(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,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1},restrictions:Zi(),
77
- tizen:{sideStreamText:_.bi(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!0}};if(_.ai("Edge/")||_.bi())a.streaming.gapDetectionThreshold=.5;_.ei()&&(a.streaming.stallEnabled=!1);_.gi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.bi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,
76
+ gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},
77
+ restrictions:Zi(),tizen:{sideStreamText:_.bi(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1}};if(_.ai("Edge/")||_.bi())a.streaming.gapDetectionThreshold=.5;_.ei()&&(a.streaming.stallEnabled=!1);_.gi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.bi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,
78
78
  invertVerticalControl:!1};return a};Zi=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
79
  _.bj=function(...a){if(!a)return _.$i();var b=[_.$i()];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));
80
- if(!_.B(a.volume)&&(!_.qf(a.volume)||sf(a.volume)))throw new _.H(_.G,7,7100,"config.volume is not a number");if(!_.B(a.preferredTextLanguage)&&!_.pf(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)&&!_.pf(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
- !_.pf(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)&&!_.pf(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&&!_.pf(a.drm.env))throw new _.H(_.G,7,7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.pf(a.drm.offlineId))throw new _.H(_.G,
80
+ if(!_.C(a.volume)&&(!_.qf(a.volume)||sf(a.volume)))throw new _.H(_.G,7,7100,"config.volume is not a number");if(!_.C(a.preferredTextLanguage)&&!_.pf(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.G,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.C(a.preferredAudioLanguage)&&!_.pf(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.G,7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.C(a.preferredAudioCodec)&&
81
+ !_.pf(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.G,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.C(a.preferredVideoCodec)&&!_.pf(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.G,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.C(a.drm)){if(a.drm.env&&!_.pf(a.drm.env))throw new _.H(_.G,7,7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.pf(a.drm.offlineId))throw new _.H(_.G,
82
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(!_.qf(b.bufferingGoal)||sf(b.bufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.qf(b.rebufferingGoal)||sf(b.rebufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal is not a number");
83
83
  if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.qf(b.bufferBehind)||sf(b.bufferBehind))throw new _.H(_.G,7,7100,"config.streaming.bufferBehind is not a number");if(!_.qf(b.smallGapLimit)||sf(b.smallGapLimit))throw new _.H(_.G,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.qf(b.durationBackoff)||sf(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|");aj(a.restrictions);aj(a.abr.restrictions);a.abr.initialRestrictions&&aj(a.abr.initialRestrictions)}return a};
85
- aj=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);
84
+ if(_.C(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.r)throw new _.H(_.G,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");aj(a.restrictions);aj(a.abr.restrictions);a.abr.initialRestrictions&&aj(a.abr.initialRestrictions)}return a};
85
+ aj=function(a){_.C(a.maxPixels)&&(a.maxPixels=Infinity);_.C(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.C(a.maxHeight)&&(a.maxHeight=Infinity);_.C(a.maxWidth)&&(a.maxWidth=Infinity);_.C(a.minPixels)&&(a.minPixels=0);_.C(a.minBandwidth)&&(a.minBandwidth=0);_.C(a.minHeight)&&(a.minHeight=0);_.C(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
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");};_.cj=function(a){return typeof a===_.Bd&&!Array.isArray(a)&&"source"in a};_.ej=function(a){return _.dj.get(a)||null};
87
- _.gj=function(a){_.dj.get(a.id())?fj.warn("Component already in use."):_.dj.set(a.id(),a)};hj=function(a){for(const b of _.dj.values())a(b)};ij=function(a){return _.Lg(a,_.Hc)||_.Lg(a,_.Ic)};jj=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))};
88
- kj=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(_.Eg(_.Ug(b))),{delay:a.renewalPeriod,vg:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.mj=function(a){_.lj[a.I]=a};
89
- _.oj=function(a){const b={attemptParameters:_.gh(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,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,void 0!==a.ignoreUnrecognizedInitData&&
90
- (b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),a.env)){const c=_.lj[a.env]||null;if(!c)throw _.Gf(_.ra,_.Wa+a.env+_.aa),new _.H(_.G,6,6015,`DRM environment '${a.env}' is missing.`);b.Na=_.nj(c,a.customData)||{};_.Lg(a.env.toLowerCase(),Vc)&&(b.enforceSingleSession=!0)}return b};qj=function(a){a=pj[a];if(!a)return null;const b=_.Bi();return b.os===si&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
91
- _.nj=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[_.Jc];if(g){var h=g.licenseUrl;d=rj(d,g.videoRobustness);e=rj(e,g.audioRobustness);var k=g.modifiers,l=g.distinctiveIdentifierRequired,m=g.persistentStateRequired;g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.me?qj(f):f;c[_.Jc]={licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,
92
- serverCertificate:g}}(g=a.g[_.Hc])&&(c[_.Hc]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.g[_.Ic])&&(c[_.Ic]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});return c};
93
- rj=function(a,b){const c=_.Bi();if(c.os!==si||c.browser!==wc)return a||b};_.sj=function(){throw new _.H(_.G,3,3E3);};_.tj=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){_.sj()}};_.M=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.sj()}};_.uj=function(a){return a.a<a.f.byteLength};_.vj=function(){throw new _.H(_.G,3,3E3,"Buffer read out of bounds.");};_.wj=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.vj()}};
87
+ _.gj=function(a){_.dj.get(a.id())?fj.warn("Component already in use."):_.dj.set(a.id(),a)};hj=function(a){for(const b of _.dj.values())a(b)};ij=function(a){return _.Lg(a,_.Gc)||_.Lg(a,_.Hc)};jj=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))};
88
+ kj=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(_.Eg(_.Ug(b))),{delay:a.renewalPeriod,zg:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.mj=function(a){_.lj[a.I]=a};
89
+ _.oj=function(a){const b={attemptParameters:_.gh(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Pa:{}};if(a&&(b.enforceSingleSession=!!a.enforceSingleSession,b.delayLicenseRequestUntilPlayed=!!a.delayLicenseRequestUntilPlayed,b.preferredDrmSystem=a.preferredDrmSystem,b.emeApi=a.emeApi,a.attemptParameters&&(b.attemptParameters=a.attemptParameters),b.enableSessionCacheForSkd=!!a.enableSessionCacheForSkd,void 0!==a.ignoreUnrecognizedInitData&&
90
+ (b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),a.env)){const c=_.lj[a.env]||null;if(!c)throw _.Gf(_.pa,_.Wa+a.env+_.aa),new _.H(_.G,6,6015,`DRM environment '${a.env}' is missing.`);b.Pa=_.nj(c,a.customData)||{};_.Lg(a.env.toLowerCase(),Tc)&&(b.enforceSingleSession=!0)}return b};qj=function(a){a=pj[a];if(!a)return null;const b=_.Bi();return b.os===si&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
91
+ _.nj=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[_.Ic];if(g){var h=g.licenseUrl;d=rj(d,g.videoRobustness);e=rj(e,g.audioRobustness);var k=g.modifiers,l=g.distinctiveIdentifierRequired,m=g.persistentStateRequired;g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.me?qj(f):f;c[_.Ic]={licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,
92
+ serverCertificate:g}}(g=a.g[_.Gc])&&(c[_.Gc]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.g[_.Hc])&&(c[_.Hc]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});return c};
93
+ rj=function(a,b){const c=_.Bi();if(c.os!==si||c.browser!==vc)return a||b};_.sj=function(){throw new _.H(_.G,3,3E3);};_.tj=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){_.sj()}};_.M=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.sj()}};_.uj=function(a){return a.a<a.f.byteLength};_.vj=function(){throw new _.H(_.G,3,3E3,"Buffer read out of bounds.");};_.wj=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.vj()}};
94
94
  _.xj=function(a){try{const b=a.f.getUint16(a.a,a.g);a.a+=2;return b}catch(b){_.vj()}};_.N=function(a){try{const b=a.f.getUint32(a.a,a.g);a.a+=4;return b}catch(b){_.vj()}};_.yj=function(a){try{const b=a.f.getInt32(a.a,a.g);a.a+=4;return b}catch(b){_.vj()}};zj=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.wj(a);return c};
95
- _.Aj=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){_.vj()}if(2097151<c)throw new _.H(_.G,3,3001);a.a+=8;return c*Math.pow(2,32)+b};_.Bj=function(a,b){a.a+b>a.f.byteLength&&_.vj();const c=a.f.buffer.slice(a.a,a.a+b);a.a+=b;return _.I(c)};Cj=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Dj=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};
96
- _.Ej=function(a){for(;_.uj(a.reader)&&!a.parser.a;)a.parser.fd(a.start+a.headerSize,a.reader,a.partialOkay)};_.Fj=function(a){for(let b=_.N(a.reader);0<b&&!a.parser.a;--b)a.parser.fd(a.start+a.headerSize,a.reader,a.partialOkay)};_.Gj=function(a){return b=>{const c=b.reader.za()-b.reader.getPosition();a(_.Bj(b.reader,c))}};_.Hj=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};Ij=function(a){let b="";try{b=_.Hg(a)}catch(c){}return b};
97
- _.Kj=function(a){a=Ij(a);let b="";a.length&&(b=(new _.Jj(a)).a);return b};Mj=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Eg(a)),d=_.Ug(c.sinf[0]);(new _.Lj).M(_.ge,_.Ej).M("schi",_.Ej).M("tenc",e=>{e.reader.skip(6);_.wj(e.reader)&&(e.reader.skip(1),b=_.Wg(_.Bj(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
98
- Oj=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.G,6,6102);let d;typeof b===_.me?d=_.Jg(b,!0):d=b;a=_.Jg(Ij(a),!0);b=new _.Nj(12+a.byteLength+d.byteLength+c.byteLength,!0);_.M(b,a.byteLength);_.tj(b,_.I(a));_.M(b,d.byteLength);_.tj(b,_.I(d));_.M(b,c.byteLength);_.tj(b,_.I(c));return _.I(b.buffer)};_.Pj=function(a){var b=_.I(a.body);b=_.Tg(b);a.headers[oa]=$b;a.body=_.Ig("spc\x3d"+b).buffer};
99
- _.Qj=function(a){let b;try{b=_.Eg(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=Cg(_.Ug(b))};Vj=function(a,b){b=Rj(b);if(a==_.Jc)return b+Sj;if(a==_.Ic)return b+Tj;if(a==_.Hc)return b+Uj;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
100
- _.Xj=function(a,b,c,d){d=void 0===d?!0:d;a=a.drm;a&&a.env.startsWith(ta)?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]=
101
- c)):Wj.warn(Na)};_.Yj=function(a,b){try{const c=_.I(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Wj.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){Wj.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
102
- _.ak=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Xj(a,b,c,!1);b.headers[oa]=$b;c={spc:_.Sg(b.body)};if((a=a.drm)&&a.env.startsWith(ua)&&d){a={};var e=Bh((new _.Jj(Zj(d))).f);d=e.keyId;if(e=e.assetId)Wj.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Wj.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Wj.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Wj.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
95
+ _.Aj=function(a){let b=0,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){_.vj()}if(2097151<c)throw new _.H(_.G,3,3001);a.a+=8;return c*Math.pow(2,32)+b};_.Bj=function(a,b){a.a+b>a.f.byteLength&&_.vj();const c=a.f.buffer.slice(a.a,a.a+b);a.a+=b;return _.I(c)};Cj=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Dj=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};
96
+ _.Ej=function(a){for(;_.uj(a.reader)&&!a.parser.a;)a.parser.hd(a.start+a.headerSize,a.reader,a.partialOkay)};_.Fj=function(a){for(let b=_.N(a.reader);0<b&&!a.parser.a;--b)a.parser.hd(a.start+a.headerSize,a.reader,a.partialOkay)};_.Gj=function(a){return b=>{const c=b.reader.Ba()-b.reader.getPosition();a(_.Bj(b.reader,c))}};_.Hj=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};Ij=function(a){let b="";try{b=_.Hg(a)}catch(c){}return b};
97
+ _.Kj=function(a){a=Ij(a);let b="";a.length&&(b=(new _.Jj(a)).a);return b};Mj=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Eg(a)),d=_.Ug(c.sinf[0]);(new _.Lj).L(_.ge,_.Ej).L("schi",_.Ej).L("tenc",e=>{e.reader.skip(6);_.wj(e.reader)&&(e.reader.skip(1),b=_.Yg(_.Bj(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
98
+ Oj=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.G,6,6102);let d;typeof b===_.me?d=_.Jg(b,!0):d=b;a=_.Jg(Ij(a),!0);b=new _.Nj(12+a.byteLength+d.byteLength+c.byteLength,!0);_.M(b,a.byteLength);_.tj(b,_.I(a));_.M(b,d.byteLength);_.tj(b,_.I(d));_.M(b,c.byteLength);_.tj(b,_.I(c));return _.I(b.buffer)};_.Pj=function(a){var b=_.I(a.body);b=_.Tg(b);a.headers[oa]=Yb;a.body=_.Ig("spc\x3d"+b).buffer};
99
+ _.Qj=function(a){let b;try{b=_.Eg(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=Cg(_.Ug(b))};Vj=function(a,b){b=Rj(b);if(a==_.Ic)return b+Sj;if(a==_.Hc)return b+Tj;if(a==_.Gc)return b+Uj;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
100
+ _.Xj=function(a,b,c,d){d=void 0===d?!0:d;a=a.drm;a&&a.env.startsWith(ra)?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]=
101
+ c)):Wj.warn(Oa)};_.Yj=function(a,b){try{const c=_.I(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Wj.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){Wj.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
102
+ _.ak=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Xj(a,b,c,!1);b.headers[oa]=Yb;c={spc:_.Sg(b.body)};if((a=a.drm)&&a.env.startsWith(ta)&&d){a={};var e=Bh((new _.Jj(Zj(d))).f);d=e.keyId;if(e=e.assetId)Wj.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Wj.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Wj.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Wj.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
103
103
  _.Kg(_.Ah(c,!0))};_.bk=function(a,b){Wj.debug("Clearing response data");200===b.status&&(a=_.Eg(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.Ug(a).buffer)};
104
104
  _.ck=function(a,b,c){b=Ij(b);c=c&&c.customData?c.customData:{};b=new _.Jj(Zj(b));const d=Bh(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.Ng(`${a}`)&&(d.assetId=a,Wj.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.Ng(`${e}`)&&(d.variantId=e,Wj.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Wj.debug("KeyId found in FPS SKD. Removing other parameters")):
105
- a=["assetId","variantId"];b.f=_.Ah(d,!1,a);"/"!==b.path||b.h.includes(`${b.a}/`)||(b.path="");b=_.zh(b);return c.fpsContentId=b};_.dk=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ta))Wj.warn(Na);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(ua)){const c=new _.cg(b.uris[0]);let d=c.wa;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.wa=d;b.uris[0]=c.toString()}};ek=function(a,b,c){_.Xj(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.cg(b.uris[0]);c.a.add(_.Md,a);b.uris[0]=c.toString()};
105
+ a=["assetId","variantId"];b.f=_.Ah(d,!1,a);"/"!==b.path||b.h.includes(`${b.a}/`)||(b.path="");b=_.zh(b);return c.fpsContentId=b};_.dk=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ra))Wj.warn(Oa);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(ta)){const c=new _.cg(b.uris[0]);let d=c.ya;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.ya=d;b.uris[0]=c.toString()}};ek=function(a,b,c){_.Xj(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.cg(b.uris[0]);c.a.add(_.Md,a);b.uris[0]=c.toString()};
106
106
  Rj=function(a){if(a===fk)return"https://lic.drmtoday.com";if(a===gk)return"https://lic.staging.drmtoday.com";if(a===hk)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Zj=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};jk=function(a){const b={},c=a?a[Ze]:void 0;a=ik[a?a[Ze]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
107
- lk=function(a,b=0){_.Ff("Registering EME Factory: "+a.a());a={priority:b,Eb:a};for(let c=0;c<kk.length;++c)if(kk[c].priority<b){kk.splice(c,0,a);return}kk.push(a)};mk=function(a){if(a){const {Eb:b}=kk.find(({Eb:c})=>c.a()===a);if(b&&b.da())return _.Ff(vb+b.a()),b.create();_.Ff("Cannot create selected EME manager. Choosing by priority list.")}for(const {Eb:b}of kk)if(b.da())return _.Ff(vb+b.a()),b.create();throw Error("Missing EME managers");};
107
+ lk=function(a,b=0){_.Bf("Registering EME Factory: "+a.a());a={priority:b,Gb:a};for(let c=0;c<kk.length;++c)if(kk[c].priority<b){kk.splice(c,0,a);return}kk.push(a)};mk=function(a){if(a){const {Gb:b}=kk.find(({Gb:c})=>c.a()===a);if(b&&b.ea())return _.Bf(tb+b.a()),b.create();_.Bf("Cannot create selected EME manager. Choosing by priority list.")}for(const {Gb:b}of kk)if(b.ea())return _.Bf(tb+b.a()),b.create();throw Error("Missing EME managers");};
108
108
  _.pk=function(a){var b=_.Vg(a);b=parseInt(b.byteLength,10).toString(16);b=_.Vg("12"+b+a);return new nk(ok,a,b)};
109
- _.rk=function(a){const b=new _.qk(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.N(b);var c=_.N(b);c=_.Dj(c);var d=_.N(b);const e=d>>>24;d&=16777215;var f=_.Bj(b,16);f=_.Wg(f);if(0<e){var g=_.N(b);b.skip(16*g)}g=_.N(b);const h=()=>{let t=_.wj(b),u=(t&127)>>>0,x=7;for(;128<=t&&28>=x;)t=_.wj(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(!_.uj(b))throw Error("not enough data to skip!");while(_.wj(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
110
- 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(;_.uj(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=zj(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.Gf("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Sg(m):"","keyIds",l.map(t=>_.Wg(t)));return 0<l.length?_.pk(_.Wg(l[0])):null};
111
- sk=function(a){return _.y(function*(){const b=new Promise(c=>{(new _.Yh(c)).ca(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};_.uk=function(a){return tk(a)?_.Ic:a};vk=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};
109
+ _.rk=function(a){const b=new _.qk(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.N(b);var c=_.N(b);c=_.Dj(c);var d=_.N(b);const e=d>>>24;d&=16777215;var f=_.Bj(b,16);f=_.Yg(f);if(0<e){var g=_.N(b);b.skip(16*g)}g=_.N(b);const h=()=>{let t=_.wj(b),u=(t&127)>>>0,x=7;for(;128<=t&&28>=x;)t=_.wj(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(!_.uj(b))throw Error("not enough data to skip!");while(_.wj(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
110
+ 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(;_.uj(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=zj(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.Gf("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Sg(m):"","keyIds",l.map(t=>_.Yg(t)));return 0<l.length?_.pk(_.Yg(l[0])):null};
111
+ sk=function(a){return _.y(function*(){const b=new Promise(c=>{(new _.Yh(c)).da(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.D("Timeout waiting for session close")})};_.uk=function(a){return tk(a)?_.Hc:a};vk=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};
112
112
  wk=function(a,b){if(a.keySystem){var c=_.uk(a.keySystem);b=b[c];c===_.Jd&&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=
113
113
  b.serverCertificate||null)))}};xk=function(a,b){a=_.Kj(b);_.Gf("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
114
114
  yk=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=xk);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=Oj(c,l,a)}return c};tk=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
115
115
  zk=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.Zg(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])}};
116
- Ak=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.Pd(_.uf(c));a.o||a.a.info(sa);a.o=!0;a.B=!1};Bk=function(a){a.g.forEach((b,c)=>{const d=b.Ld;let e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Ld=e)})};
117
- Ck=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.Y.stop();a.Y=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 sk(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",
118
- 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})};_.Gk=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=tf(a.h.Na);vk(b,d)}if(d=Dk(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)wk(f,a.h.Na);b=Ek(a,b);if(!b.size)return a.R=!0,Promise.resolve();a=_.Fk(a,b);return c?a:a.catch(()=>{})};
119
- _.Lk=function(a,b,c){a.H=Kk;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 _.Gk(a,b)};
120
- _.Fk=function(a,b){if(1==b.size&&b.has(""))return Promise.reject(new _.H(_.G,6,6E3));null===a.m&&(a.m=mk(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 _.Mk;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===_.Ic){const n=
121
- a.D.getConfiguration();if(!_.$h()||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=_.Bi();if(h.os===wi&&10<=h.osVersion.major&&"edge"===h.browser)g=_.Ic;else if("safari"===h.browser)g=_.Hc;else if(h.browser===wc||"firefox"===h.browser)g=_.Jc}g&&(h=b.get(g))&&(f(!0,h,g),f(!1,h,g));for(const k of[!0,!1])b.forEach((l,
122
- 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(_.uk(k.keySystem));q=[];l=[];const t=[],u=[];zk(n.drmInfos,q,l,t,u);1<l.length&&_.C("Multiple unique server certificates found! Only the first will be used.");
123
- 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==_.ae,persistentStateRequired:n.persistentState==_.ae,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);
116
+ Ak=function(a){var b=a.j;const c=a.W;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"==d)&&a.U(new _.H(_.G,6,6014));a.D.Ud(_.uf(c));a.o||a.a.info(qa);a.o=!0;a.B=!1};Bk=function(a){a.g.forEach((b,c)=>{const d=b.Qd;let e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Qd=e)})};
117
+ Ck=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.Y.stop();a.Y=null;a.T.stop();a.T=null;const b=Array.from(a.g.keys());for(const c of a.g.values())c.jc&&c.jc.stop();a.g.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.y(function*(){a.a.debug("Closing session",c.sessionId);try{yield sk(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",
118
+ c)}a.A=null}a.m=null;a.f=null;a.J.clear();a.G=null;a.I=[];a.h=null;a.U=null;a.D=null;a.N=0;a.M=null})};_.Gk=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=tf(a.h.Pa);vk(b,d)}if(d=Dk(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)wk(f,a.h.Pa);b=Ek(a,b);if(!b.size)return a.R=!0,Promise.resolve();a=_.Fk(a,b);return c?a:a.catch(()=>{})};
119
+ _.Ik=function(a,b,c){a.H=Hk;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 _.Gk(a,b)};
120
+ _.Fk=function(a,b){if(1==b.size&&b.has(""))return Promise.reject(new _.H(_.G,6,6E3));null===a.m&&(a.m=mk(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 _.Mk;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===_.Hc){const n=
121
+ a.D.getConfiguration();if(!_.$h()||n.streaming.patchEdgeWhenMixedContent||a.h.Pa[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=_.Bi();if(h.os===wi&&10<=h.osVersion.major&&"edge"===h.browser)g=_.Hc;else if("safari"===h.browser)g=_.Gc;else if(h.browser===vc||"firefox"===h.browser)g=_.Ic}g&&(h=b.get(g))&&(f(!0,h,g),f(!1,h,g));for(const k of[!0,!1])b.forEach((l,
122
+ 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(_.uk(k.keySystem));q=[];l=[];const t=[],u=[];zk(n.drmInfos,q,l,t,u);1<l.length&&_.D("Multiple unique server certificates found! Only the first will be used.");
123
+ 1<q.length&&_.D("Multiple unique license server URIs found! Only the first will be used.");m={keySystem:m,licenseServerUri:q[0],distinctiveIdentifierRequired:n.distinctiveIdentifier==_.ae,persistentStateRequired:n.persistentState==_.ae,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);
124
124
  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};
125
- Dk=function(a){a=tf(a.h.Na[_.Jd]||{});if(0==a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Vg(f);e=_.Vg(e);e={kty:"oct",kid:_.Tg(f,!1),k:_.Tg(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Ig(d),initDataType:"keyids"}];return{keySystem:_.Jd,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
125
+ Dk=function(a){a=tf(a.h.Pa[_.Jd]||{});if(0==a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Vg(f);e=_.Vg(e);e={kty:"oct",kid:_.Tg(f,!1),k:_.Tg(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Ig(d),initDataType:"keyids"}];return{keySystem:_.Jd,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
126
126
  keyIds:[],periodId:null}};
127
- Ek=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)wk(f,a.h.Na);d=a.C?_.ae:_.Id;e=a.C?[_.Nd]:[re];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.sc],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?_.Uh(b.mimeType,b.codecs):"",h=c?_.Uh(c.mimeType,c.codecs):"";for(const k of f.drmInfos){const l=a.get(k.keySystem);
127
+ Ek=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)wk(f,a.h.Pa);d=a.C?_.ae:_.Id;e=a.C?[_.Nd]:[re];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.rc],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?_.Uh(b.mimeType,b.codecs):"",h=c?_.Uh(c.mimeType,c.codecs):"";for(const k of f.drmInfos){const l=a.get(k.keySystem);
128
128
  l.drmInfos.push(k);k.initData&&k.initData.length&&(l.initDataTypes=[...new Set(k.initData.map(m=>m.initDataType))]);k.distinctiveIdentifierRequired&&(l.distinctiveIdentifier=_.ae);k.persistentStateRequired&&(l.persistentState=_.ae);b&&_.Yf(k.audioRobustness).forEach(m=>{l.audioCapabilities.push({robustness:m||"",contentType:g})});c&&_.Yf(k.videoRobustness).forEach(m=>{l.videoCapabilities.push({robustness:m||"",contentType:h})})}}return a};
129
- Nk=function(a){return _.y(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.pa||a.T(new _.H(_.G,6,6003,b.message,b))}})};
130
- _.Rk=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.H!==Kk)){var e=a.keySystem();if(!e.startsWith(_.Hc)&&b===_.sc){const f=new Ok(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||
131
- _.bi(2)||a.keySystem().startsWith(_.Hc)||!_.Pk(a,d,c,!0))&&Qk(a,d,null,b,c)}};Sk=function(a,b){return _.y(function*(){a.a.info(`Handle encrypted event for type ${b.initDataType}`);yield Nk(a);b.initData&&_.Rk(a,b.initDataType,_.I(b.initData))})};Uk=function(a){return _.y(function*(){const b=a.U.map(c=>Tk(a,c));a.ba=!0;a.U=[];yield Promise.all(b)})};
132
- Wk=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 Vk(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.jh([d],a.h.attemptParameters);f.type=3;f.licenseRequestType=uc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.a.debug("Fetching certificate");return a.D.vb.fetch(f).P}).then(f=>{a.f.serverCertificate=_.I(f.data)}).catch(f=>{var g=
129
+ Nk=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.U(new _.H(_.G,6,6003,b.message,b))}})};
130
+ _.Rk=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.H!==Hk)){var e=a.keySystem();if(!e.startsWith(_.Gc)&&b===_.rc){const f=new Ok(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||
131
+ _.bi(2)||a.keySystem().startsWith(_.Gc)||!_.Pk(a,d,c,!0))&&Qk(a,d,null,b,c)}};Sk=function(a,b){return _.y(function*(){a.a.info(`Handle encrypted event for type ${b.initDataType}`);yield Nk(a);b.initData&&_.Rk(a,b.initDataType,_.I(b.initData))})};Uk=function(a){return _.y(function*(){const b=a.V.map(c=>Tk(a,c));a.ba=!0;a.V=[];yield Promise.all(b)})};
132
+ Wk=function(a){const b=a.keySystem(),c=a.h.Pa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return Vk(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.jh([d],a.h.attemptParameters);f.type=3;f.licenseRequestType=tc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.a.debug("Fetching certificate");return a.D.xb.fetch(f).P}).then(f=>{a.f.serverCertificate=_.I(f.data)}).catch(f=>{var g=
133
133
  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}:{},jk(g));throw new _.H(_.G,6,6100,g,f);})};
134
134
  _.Xk=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});}})};
135
- _.$k=function(a){const b=a.f?a.f.initData||[]:[];for(const c of b){let d=!_.bi(2);if(a.h.enforceSingleSession&&!a.keySystem().startsWith(_.Hc)){const e=a.g.values();for(const f of e)_.Zg(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}.`),Yk(c.initData,f)||(f.Wc.push(c.initData),c.keyId&&!f.$a.includes(c.keyId)&&
136
- f.$a.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,ke)),d=!1)}!d||a.C&&a.H===Kk||(_.Pk(a,c.keyId,c.initData)&&(d=!1),d&&(a.a.info("Request new media key session on create"),Qk(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.I)_.Zk(a,c);b.length||a.I.length||(a.o||a.a.info(sa),a.o=!0,a.B=!1,a.F.resolve());return a.F};
137
- _.al=function(a,b){if(!a.G)return _.Nf(a.w,b,[Xc,"msneedkey",Ve,"needkey"],()=>{a.T(new _.H(_.G,6,6010))}),Promise.resolve();a.A=b;a.m.j(b);a.w.one(a.A,_.Rd,()=>Uk(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()!==ab||a.I.length)d=Nk(a);c=Promise.resolve();_.ei()&&38===fi().major||(a.f&&a.f.keySystem!==_.Jd&&!a.f.serverCertificate&&(c=Wk(a)),
138
- c=c.then(()=>_.Xk(a)));return Promise.all([d,c]).then(()=>{a.pa||(_.$k(a),a.w.on(a.A,Xc,e=>Sk(a,e)))}).catch(e=>{if(!a.pa){if(6004===e.code&&a.f&&a.f.keySystem===_.Jc&&1>a.N&&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.N++,_.al(a,b);1<=a.N&&a.a.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
139
- Vk=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))}})};
140
- _.Zk=function(a,b){let c;try{a.a.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Nd)}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,Ld:Infinity,kb:null,Aa:new _.Mk,periodId:null,Wc:[],keyId:null,$a:[],initDataType:null,Sb:null,sessionContext:{ldlDelay:0,customData:{}}};d.Aa.catch(()=>{});a.g.set(c,d);return c.load(b).then(e=>{if(a.pa)return null;
141
- 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;bl(a)&&(a.o||a.a.info(sa),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})))})};Yk=function(a,b){if(!a)return!1;for(let c=0;c<b.Wc.length;c++)if(_.Zg(a,b.Wc[c]))return!0;return!1};
142
- _.Pk=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(_.Zg(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,ke),d&&a.a.info(hb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.a.info(hb+`Session: '${e.sessionId}'`),!0;if(Yk(c,f))return d&&a.a.info("Skipping Session creation. License for init data was already requested [extra]"),
135
+ _.$k=function(a){const b=a.f?a.f.initData||[]:[];for(const c of b){let d=!_.bi(2);if(a.h.enforceSingleSession&&!a.keySystem().startsWith(_.Gc)){const e=a.g.values();for(const f of e)_.Zg(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}.`),Yk(c.initData,f)||(f.Yc.push(c.initData),c.keyId&&!f.bb.includes(c.keyId)&&
136
+ f.bb.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,ke)),d=!1)}!d||a.C&&a.H===Hk||(_.Pk(a,c.keyId,c.initData)&&(d=!1),d&&(a.a.info("Request new media key session on create"),Qk(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.I)_.Zk(a,c);b.length||a.I.length||(a.o||a.a.info(qa),a.o=!0,a.B=!1,a.F.resolve());return a.F};
137
+ _.al=function(a,b){if(!a.G)return _.Nf(a.w,b,[Vc,"msneedkey",Ve,"needkey"],()=>{a.U(new _.H(_.G,6,6010))}),Promise.resolve();a.A=b;a.m.j(b);a.w.one(a.A,_.Rd,()=>Uk(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()!==bb||a.I.length)d=Nk(a);c=Promise.resolve();_.ei()&&38===fi().major||(a.f&&a.f.keySystem!==_.Jd&&!a.f.serverCertificate&&(c=Wk(a)),
138
+ c=c.then(()=>_.Xk(a)));return Promise.all([d,c]).then(()=>{a.pa||(_.$k(a),a.w.on(a.A,Vc,e=>Sk(a,e)))}).catch(e=>{if(!a.pa){if(6004===e.code&&a.f&&a.f.keySystem===_.Ic&&1>a.N&&a.f.serverCertificate&&a.f.serverCertificate.length)return a.a.warn("Detected invalid widevine server certificate!. Retrying"),a.U(new _.H(1,6,6004)),a.f.serverCertificate=null,a.N++,_.al(a,b);1<=a.N&&a.a.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
139
+ Vk=function(a,b){return _.y(function*(){const c=a.D.sc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
140
+ _.Zk=function(a,b){let c;try{a.a.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Nd)}catch(e){const f=new _.H(_.G,6,6005,{browserError:e.message});a.U(f);return Promise.reject(f)}a.w.on(c,sd,a.ma.bind(a));a.w.on(c,ed,a.ga.bind(a));const d={initData:null,loaded:!1,Qd:Infinity,mb:null,Ca:new _.Mk,periodId:null,Yc:[],keyId:null,bb:[],initDataType:null,Ub:null,sessionContext:{ldlDelay:0,customData:{}}};d.Ca.catch(()=>{});a.g.set(c,d);return c.load(b).then(e=>{if(a.pa)return null;
141
+ a.a.debug("Loaded offline session",b,e);if(!e)return a.g.delete(c),a.U(new _.H(_.G,6,6013)),null;d.loaded=!0;bl(a)&&(a.o||a.a.info(qa),a.o=!0,a.B=!1,a.F.resolve());return c},e=>{a.pa||(a.g.delete(c),a.U(new _.H(_.G,6,6005,{browserError:e.message})))})};Yk=function(a,b){if(!a)return!1;for(let c=0;c<b.Yc.length;c++)if(_.Zg(a,b.Yc[c]))return!0;return!1};
142
+ _.Pk=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(_.Zg(c,f.initData))return b?f.bb.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.bb.push(b),a.j.get(b)||a.j.set(b,ke),d&&a.a.info(gb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.a.info(gb+`Session: '${e.sessionId}'`),!0;if(Yk(c,f))return d&&a.a.info("Skipping Session creation. License for init data was already requested [extra]"),
143
143
  !0}return!1};
144
144
  Qk=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;if(!h)try{h=dl(a,d,e,f)}catch(t){if(a.a.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:t,initDataType:d,initData:e}),a.h.ignoreUnrecognizedInitData)return}if(!g&&el(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);
145
- 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?_.Nd:re;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,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={Sb:f,Wc:[],initData:e,initDataType:d,keyId:h,$a:h?
146
- [h]:[],loaded:!1,Ld:Infinity,periodId:c,kb:null,Aa:new _.Mk,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,ke);if(e)for(l=0;l<a.f.initData.length;l++)m=a.f.initData[l],m.keyId&&!k.$a.includes(m.keyId)&&_.Zg(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.$a.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,ke));l=a.D.getConfiguration();m=a.keySystem();m=a.h.Na[m];n=(n=m.modifiers)&&n.transformInitData;
147
- _.nf(n)||(n=yk);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;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,
145
+ 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?_.Nd:re;var q=a.G.createSession(n);a.a.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(t){a.U(new _.H(_.G,6,6005,{browserError:t.message}));return}a.w.on(q,sd,a.ma.bind(a));a.w.on(q,ed,a.ga.bind(a));k={Ub:f,Yc:[],initData:e,initDataType:d,keyId:h,bb:h?
146
+ [h]:[],loaded:!1,Qd:Infinity,periodId:c,mb:null,Ca:new _.Mk,sessionContext:{ldlDelay:0,customData:{}}};k.Ca.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,ke);if(e)for(l=0;l<a.f.initData.length;l++)m=a.f.initData[l],m.keyId&&!k.bb.includes(m.keyId)&&_.Zg(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.bb.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,ke));l=a.D.getConfiguration();m=a.keySystem();m=a.h.Pa[m];n=(n=m.modifiers)&&n.transformInitData;
147
+ _.nf(n)||(n=yk);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.Ca&&k.Ca.reject(t);a.U(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;t.errorCode&&t.errorCode.systemCode&&(u=t.errorCode.systemCode,0>u&&(u+=Math.pow(2,32)),u="0x"+u.toString(16));a.U(new _.H(_.G,6,6006,{browserError:t.message,
148
148
  error:t,extended:u},t))}})}else a.a.warn("Empty init data")})};fl=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};bl=function(a){a=a.g.values();return _.tg(a,b=>b.loaded)};el=function(a,b,c,d){if(!b&&c!==_.ge)return!1;d=b||Mj(d);for(const e of a.g.values())if(b&&e.keyId===b||c===_.ge&&(e.keyId||Mj(e.initData))===d)return!0;return!1};
149
- dl=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;b=a.keySystem();d=a.h.Na[b];b=a.D.getConfiguration();d=d&&d.modifiers&&d.modifiers.extractContentId;_.nf(d)||(d=xk);try{let g={ldlDelay:0,customData:{}};e&&(g=a.g.get(e).sessionContext);const h=d(b,c,g);a.a.debug(`Extracted Content ID '${h}' from SKD`);var f=h;break a}catch(g){a.a.warn("Unable to extract Content ID from SKD",g)}f=""}return f}if(b===_.ge)return Mj(c)||"";if(b===_.sc){f=a.keySystem();try{if(f.match(/^com\.widevine\.alpha/)&&
149
+ dl=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;b=a.keySystem();d=a.h.Pa[b];b=a.D.getConfiguration();d=d&&d.modifiers&&d.modifiers.extractContentId;_.nf(d)||(d=xk);try{let g={ldlDelay:0,customData:{}};e&&(g=a.g.get(e).sessionContext);const h=d(b,c,g);a.a.debug(`Extracted Content ID '${h}' from SKD`);var f=h;break a}catch(g){a.a.warn("Unable to extract Content ID from SKD",g)}f=""}return f}if(b===_.ge)return Mj(c)||"";if(b===_.rc){f=a.keySystem();try{if(f.match(/^com\.widevine\.alpha/)&&
150
150
  (e=_.rk(c)))return e.a}catch(g){throw a.a.warn("Unable to extract Key ID from PSSH data.",{error:g,keySystem:f}),g;}}return""};
151
- Tk=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);
152
- const h=_.jh([g],a.h.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===jd&&d.Sb?id:f?uc:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===id)a.D.onEvent(new _.F(Sc));tk(a.f.keySystem)&&gl(a,h);jj(a.K,h);const k=Date.now();return hl(a,h,d.sessionContext).then(()=>{a.a.debug("Sending DRM license request to",g,h);return a.D.vb.fetch(h).P}).then(l=>{if(a.pa)return Promise.reject();const m=Date.now()-k;var n=il(a,l);let q="";n&&(q=` RID:${n}`);
153
- 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=kj(a.K,l);return c.update(l.data).then(()=>{if(!f){var u=fl(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.Sb&&(u=d.Sb,a.a.info(`Closing expired session '${u.sessionId}'`),
154
- sk(u).catch(()=>{a.a.warn("Unable to close expired session in time")}),(u=a.g.get(d.Sb))&&u.ic&&u.ic.stop(),a.g.delete(d.Sb),d.Sb=null),(new _.Yh(()=>{a.pa||(d.loaded=!0,d.Aa&&d.Aa.resolve(),bl(a)&&(a.o||a.a.info(sa),a.o=!0,a.B=!1,a.F.resolve()))})).ca(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||t&&ij(a.keySystem()))&&(u=new _.Yh(()=>{!a.pa&&a.K&&(a.a.info("Updating CSL Sessions"),tk(a.keySystem())?Qk(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.Hc)&&c.update(_.Ig("renew")))}),
155
- d.ic=u,u.ca(t?t.delay:d.sessionContext.ldlDelay)))}})},l=>_.y(function*(){if(!a.pa){var m=l.data.headers;m=Object.assign({message:_.ya,url:l.data.url,status:l.data.status,response:l.data.response},m?{headers:m}:{},jk(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===fb?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)))})};
151
+ Tk=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.Pa[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
152
+ const h=_.jh([g],a.h.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===kd&&d.Ub?hd:f?tc:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===hd)a.D.onEvent(new _.F(Qc));tk(a.f.keySystem)&&gl(a,h);jj(a.K,h);const k=Date.now();return hl(a,h,d.sessionContext).then(()=>{a.a.debug("Sending DRM license request to",g,h);return a.D.xb.fetch(h).P}).then(l=>{if(a.pa)return Promise.reject();const m=Date.now()-k;var n=il(a,l);let q="";n&&(q=` RID:${n}`);
153
+ 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=kj(a.K,l);return c.update(l.data).then(()=>{if(!f){var u=fl(a),x=t?Date.now()+1E3*t.delay:Number.NaN;u=new _.F(_.Sc,{keySystem:a.keySystem(),expirationTime:u,expectedRenewalTime:x});a.D.onEvent(u);d&&(d.mb&&d.mb.resolve(),d.Ub&&(u=d.Ub,a.a.info(`Closing expired session '${u.sessionId}'`),
154
+ sk(u).catch(()=>{a.a.warn("Unable to close expired session in time")}),(u=a.g.get(d.Ub))&&u.jc&&u.jc.stop(),a.g.delete(d.Ub),d.Ub=null),(new _.Yh(()=>{a.pa||(d.loaded=!0,d.Ca&&d.Ca.resolve(),bl(a)&&(a.o||a.a.info(qa),a.o=!0,a.B=!1,a.F.resolve()))})).da(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||t&&ij(a.keySystem()))&&(u=new _.Yh(()=>{!a.pa&&a.K&&(a.a.info("Updating CSL Sessions"),tk(a.keySystem())?Qk(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.Gc)&&c.update(_.Ig("renew")))}),
155
+ d.jc=u,u.da(t?t.delay:d.sessionContext.ldlDelay)))}})},l=>_.y(function*(){if(!a.pa){var m=l.data.headers;m=Object.assign({message:_.xa,url:l.data.url,status:l.data.status,response:l.data.response},m?{headers:m}:{},jk(m));m=new _.H(_.G,6,6007,m,l);a.U(m);d&&d.mb&&d.mb.reject(m);d&&d.Ca&&d.Ca.reject(m)}})).catch(l=>{a.pa||(l===eb?a.a.info("Ignore update for closed sessions"):(l=new _.H(_.G,6,6008,{browserError:l.message}),a.U(l),d&&d.mb&&d.mb.reject(l),d&&d.Ca&&d.Ca.reject(l)))})};
156
156
  gl=function(a,b){var c=_.Gg(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(_.De).textContent;b.body=_.Ug(a.querySelector("Challenge").textContent).buffer}else a.a.debug("PlayReady request is already unwrapped."),b.headers[oa]="text/xml; charset\x3dutf-8"};
157
- hl=function(a,b,c){return _.y(function*(){const d=a.D.getConfiguration();yield Vk(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(_.Hc)&&b.requestModifiers.push(k=>_.Pj(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.Hc)&&b.responseModifiers.push(k=>_.Qj(k))})};
158
- il=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.Eg(_.Ug(b))).ti}catch(c){a.a.warn("Unable to parse DRMtoday Request ID",c)}return""};_.ll=function(a,b){a&&b&&(jl.set(a,b),kl.info(`Registered TextDisplayerFactory: '${a}'`))};_.ml=function(a,b){b=b.find(c=>(c=jl.get(c))?c.da(a):!1);if(null==b)return kl.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;kl.info(`Chosen the text displayer: ${b}`);return jl.get(b)};
157
+ hl=function(a,b,c){return _.y(function*(){const d=a.D.getConfiguration();yield Vk(a,d);const e=a.keySystem();var f=a.h.Pa[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.Gc)&&b.requestModifiers.push(k=>_.Pj(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.Gc)&&b.responseModifiers.push(k=>_.Qj(k))})};
158
+ il=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.Eg(_.Ug(b))).ti}catch(c){a.a.warn("Unable to parse DRMtoday Request ID",c)}return""};_.ll=function(a,b){a&&b&&(jl.set(a,b),kl.info(`Registered TextDisplayerFactory: '${a}'`))};_.ml=function(a,b){b=b.find(c=>(c=jl.get(c))?c.ea(a):!1);if(null==b)return kl.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;kl.info(`Chosen the text displayer: ${b}`);return jl.get(b)};
159
159
  _.nl=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})}}};ol=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};pl=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};
160
160
  ql=function(a){return a.a.map(b=>_.kf(b))};_.rl=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:[]}};tl=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=sl.value().get(b),c.one(a,b,d))};
161
- xl=function(a){a.g.debug("Start watching for video events for "+a.l.namespace());const b=a.l,c=d=>ul(a,d.type);a.a.on(b,_.Zc,()=>{a.j=!1;vl(a,_.wl)});a.a.on(b,nc,c);a.a.on(b,_.Sd,()=>{a.F=!0;a.j=!1;ul(a,_.Sd)});a.a.on(b,_.Ld,()=>{a.F=!1;a.j=!1;ul(a,_.Ld)});a.a.on(b,_.ue,c);a.a.on(b,_.Xd,c);a.a.on(b,_.de,d=>{a.m=!1;a.j=!1;ul(a,d.type)});a.a.on(b,_.ee,d=>{a.m=!0;ul(a,d.type)});a.a.on(b,he,c);a.a.on(b,_.Pe,()=>{a.j=!0;ul(a,_.Pe)});a.a.on(b,_.$c,d=>a.T(d));a.a.on(b,_.od,c);a.a.on(b,oc,()=>{a.C=!0;ul(a,
162
- oc)});a.a.on(b,_.Ce,d=>{a.m=!0;ul(a,d.type)});a.a.on(b,_.Be,d=>{a.m=!1;a.j=!1;ul(a,d.type)})};yl=function(a,b){return Object.keys(b)[a]};Al=function(a,b){const c={type:_.je};b===_.jc||b===_.ic?(c.reason=a.w,b===_.jc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.zl&&(c.reason=a.w),a.A===_.zl&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
163
- vl=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.zl;a.A=a.f;a.f=b;a.A===_.wl&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.zl?(a.K=a.o,a.w=a.m?1:2,a.g.info("Buffering started. Reason: "+yl(a.w-1,_.Bl)),b=Al(a,_.jc),a.Nb(_.jc,b)):d&&(a.B=a.o-a.K,a.g.info("Buffering finished. Reason: "+yl(a.w-1,_.Bl)+". Buffering time: "+a.B+" ms"),b=Al(a,_.ic),a.Nb(_.ic,b));b=yl(a.A,_.Cl);c=yl(a.f,_.Cl);a.g.info(`Player state change: ${b} -> ${c}`);a.Nb(_.je,Al(a,""));return!0};
164
- ul=function(a,b){if(a.f===_.Dl)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===_.wl&&1>=Math.abs(d-e)||c&&d>=e)vl(a,_.wl)&&a.g.debug("Player claims to be in ended state, not checking more");else if(b!==_.ue){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;
165
- e=typeof a.h===_.r&&2>a.h&&2===e.networkState;var f=typeof a.h===_.r&&0>=a.G&&a.f===_.El,g=typeof a.h===_.r&&2>=a.h&&a.j;e=a.m||f||e||g;!a.L||a.l.isLive()||a.f!==_.zl||e||(f=b===_.de&&4===a.h,(g=a.A===_.Fl)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=vl(a,_.zl):c?f=vl(a,_.Gl):a.F&&(f=vl(a,_.Hl));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: "+
166
- f+", Current state: "+yl(a.f,_.Cl))}}};Il=function(a){a=(new _.cg(a)).wa;if(!a)return null;a=a.toUpperCase();return _.Mg(a,".MPD")?_.Ub:_.Mg(a,".M3U8")?_.Ui:_.Mg(a,".MP4")?_.Je:_.Mg(a,"MANIFEST")||_.Mg(a,".ISM")?_.Zb:null};_.Kl=function(a){let b;_.cj(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.me||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Jl(b[c]);d&&a.push(d)}return a};
167
- Jl=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},_.B(a.drmProtected)||typeof a.drmProtected!==_.hc||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.hc||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.me||(b.name=a.name),_.B(a.zb)||typeof a.zb!==_.me||(b.zb=a.zb),_.B(a.audioMimeType)||typeof a.audioMimeType!==_.me||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Il(a.url),b.type?Ll.debug("Detect media type "+
168
- b.type+" for "+a.url):Ll.warn("Unable to detect media type for "+a.url));return b};Nl=function(a){return a.w?Ml():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.$c);a.g.off(c,_.be);a.a=null}b()})};Ml=function(){return Promise.reject(new _.H(_.G,7,7E3))};
169
- Pl=function(a,b){return a.w?Ml():new Promise(c=>{a.a||(a.g.on(b,_.$c,()=>{{const d=Ol(a);if(d)a.onError(d)}}),a.g.on(b,_.be,()=>{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(_.gc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
170
- Rl=function(a){return _.y(function*(){if(a.w)return Ml();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=_.oj(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.m=new _.Ql({vb:c,onError:d=>a.onError(d),Pd:()=>{},onExpirationUpdated:(d,e)=>{a.trigger(new _.F(_.Rc,{expirationTime:e}))},onEvent:d=>{d instanceof _.F?a.dispatchEvent(d):
171
- a.log.debug(_.nb,d.type)},getConfiguration:()=>a.getConfiguration(),rc:()=>a.rc()});a.m.h=b;yield _.Lk(a.m,[{id:0,language:_.xe,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:_.Je,codecs:"",encrypted:!0,keyId:null,language:_.xe,label:null,type:_.w,primary:!1,frameRate:void 0,Jg:void 0,trickModeVideo:null,
172
- emsgSchemeIdUris:null,roles:[],channelsCount:null,wg:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}],[]);yield _.al(a.m,a.a);return Promise.resolve()})};Sl=function(a,b){tl(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.Dl&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
173
- Ol=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})};
161
+ xl=function(a){a.g.debug("Start watching for video events for "+a.l.namespace());const b=a.l,c=d=>ul(a,d.type);a.a.on(b,_.Xc,()=>{a.j=!1;vl(a,_.wl)});a.a.on(b,mc,c);a.a.on(b,_.Sd,()=>{a.F=!0;a.j=!1;ul(a,_.Sd)});a.a.on(b,_.Ld,()=>{a.F=!1;a.j=!1;ul(a,_.Ld)});a.a.on(b,_.ue,c);a.a.on(b,_.Xd,c);a.a.on(b,_.de,d=>{a.m=!1;a.j=!1;ul(a,d.type)});a.a.on(b,_.ee,d=>{a.m=!0;ul(a,d.type)});a.a.on(b,he,c);a.a.on(b,_.Pe,()=>{a.j=!0;ul(a,_.Pe)});a.a.on(b,_.Yc,d=>a.U(d));a.a.on(b,_.od,c);a.a.on(b,nc,()=>{a.C=!0;ul(a,
162
+ nc)});a.a.on(b,_.Ce,d=>{a.m=!0;ul(a,d.type)});a.a.on(b,_.Be,d=>{a.m=!1;a.j=!1;ul(a,d.type)})};yl=function(a,b){return Object.keys(b)[a]};Al=function(a,b){const c={type:_.je};b===_.ic||b===_.hc?(c.reason=a.w,b===_.ic?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.zl&&(c.reason=a.w),a.A===_.zl&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
163
+ vl=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.zl;a.A=a.f;a.f=b;a.A===_.wl&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.zl?(a.K=a.o,a.w=a.m?1:2,a.g.info("Buffering started. Reason: "+yl(a.w-1,_.Bl)),b=Al(a,_.ic),a.Pb(_.ic,b)):d&&(a.B=a.o-a.K,a.g.info("Buffering finished. Reason: "+yl(a.w-1,_.Bl)+". Buffering time: "+a.B+" ms"),b=Al(a,_.hc),a.Pb(_.hc,b));b=yl(a.A,_.Cl);c=yl(a.f,_.Cl);a.g.info(`Player state change: ${b} -> ${c}`);a.Pb(_.je,Al(a,""));return!0};
164
+ ul=function(a,b){if(a.f===_.Dl)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===_.wl&&1>=Math.abs(d-e)||c&&d>=e)vl(a,_.wl)&&a.g.debug("Player claims to be in ended state, not checking more");else if(b!==_.ue){e=a.l.getPosition();e=null!==e&&void 0!==e&&0<=e?a.l.getBufferInfo().Ea(e,!0):-1;a.G=e;e=a.l.getSurface().getMedia();a.h=e?e.readyState:null;a.J=a.l.getPlaybackRate()||1;
165
+ e=typeof a.h===_.r&&2>a.h&&2===e.networkState;var f=typeof a.h===_.r&&0>=a.G&&a.f===_.El,g=typeof a.h===_.r&&2>=a.h&&a.j;e=a.m||f||e||g;!a.M||a.l.isLive()||a.f!==_.zl||e||(f=b===_.de&&4===a.h,(g=a.A===_.Fl)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=vl(a,_.zl):c?f=vl(a,_.Gl):a.F&&(f=vl(a,_.Hl));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: "+
166
+ f+", Current state: "+yl(a.f,_.Cl))}}};Il=function(a){a=(new _.cg(a)).ya;if(!a)return null;a=a.toUpperCase();return _.Mg(a,".MPD")?_.Sb:_.Mg(a,".M3U8")?_.Ui:_.Mg(a,".MP4")?_.Je:_.Mg(a,"MANIFEST")||_.Mg(a,".ISM")?_.Xb:null};_.Kl=function(a){let b;_.cj(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.me||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Jl(b[c]);d&&a.push(d)}return a};
167
+ Jl=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},_.C(a.drmProtected)||typeof a.drmProtected!==_.fc||(b.drmProtected=a.drmProtected),_.C(a.isLive)||typeof a.isLive!==_.fc||(b.isLive=a.isLive),_.C(a.name)||typeof a.name!==_.me||(b.name=a.name),_.C(a.Bb)||typeof a.Bb!==_.me||(b.Bb=a.Bb),_.C(a.audioMimeType)||typeof a.audioMimeType!==_.me||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Il(a.url),b.type?Ll.debug("Detect media type "+
168
+ b.type+" for "+a.url):Ll.warn("Unable to detect media type for "+a.url));return b};Nl=function(a){return a.w?Ml():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.Yc);a.g.off(c,_.be);a.a=null}b()})};Ml=function(){return Promise.reject(new _.H(_.G,7,7E3))};
169
+ Pl=function(a,b){return a.w?Ml():new Promise(c=>{a.a||(a.g.on(b,_.Yc,()=>{{const d=Ol(a);if(d)a.onError(d)}}),a.g.on(b,_.be,()=>{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(_.ec,{detail:{width:d,height:e}}))}),a.a=b);c()})};
170
+ Rl=function(a){return _.y(function*(){if(a.w)return Ml();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=_.oj(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.m=new _.Ql({xb:c,onError:d=>a.onError(d),Ud:()=>{},onExpirationUpdated:(d,e)=>{a.trigger(new _.F(_.Pc,{expirationTime:e}))},onEvent:d=>{d instanceof _.F?a.dispatchEvent(d):
171
+ a.log.debug(_.mb,d.type)},getConfiguration:()=>a.getConfiguration(),sc:()=>a.sc()});a.m.h=b;yield _.Ik(a.m,[{id:0,language:_.xe,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,sa:0,mimeType:_.Je,codecs:"",encrypted:!0,keyId:null,language:_.xe,label:null,type:_.w,primary:!1,frameRate:void 0,Ng:void 0,trickModeVideo:null,
172
+ emsgSchemeIdUris:null,roles:[],channelsCount:null,Ag:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}],[]);yield _.al(a.m,a.a);return Promise.resolve()})};Sl=function(a,b){tl(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.Dl&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
173
+ Ol=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,Ig:c,message:a.a.error.message})};
174
174
  Ul=function(a){if(a.w)return new _.Tl(Ml(),()=>{});const b=a.o[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&Sl(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;(_.bi()||_.ei())&&d.load();const f=new _.Mk;a.g.one(d,he,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.C||(a.C=(new _.Yh(()=>{f.reject(new _.H(_.G,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
175
- uri:b.url},d.error))})).ca(g))});tl(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject(Ol(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(Ol(a))});return new _.Tl(f,
175
+ uri:b.url},d.error))})).da(g))});tl(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject(Ol(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,_.Yc,()=>{f.reject(Ol(a))});return new _.Tl(f,
176
176
  ()=>{const g=new _.H(_.G,7,7001);f.reject(g);return Promise.resolve()})};Vl=function(a,b){tl(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{if(a.isLive()&&a.getState()!==_.Dl){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)}))}})};
177
- _.Yl=function(a){a&&(0<=Wl.indexOf(a)?Xl.warn(`Factory '${a.name()}' is already registered`):(Wl.push(a),Xl.info(`Factory ${a.name()}' has been registered.`)))};$l=function(a,b){let c=Wl.find(d=>d.da(a,b));c||(c=new Zl);Xl.info(`Chosen ads: ${c.name()}`);return c};_.am=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};_.bm=function(a,b){a.classList.add(b)};
177
+ _.Yl=function(a){a&&(0<=Wl.indexOf(a)?Xl.warn(`Factory '${a.name()}' is already registered`):(Wl.push(a),Xl.info(`Factory ${a.name()}' has been registered.`)))};$l=function(a,b){let c=Wl.find(d=>d.ea(a,b));c||(c=new Zl);Xl.info(`Chosen ads: ${c.name()}`);return c};_.am=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};_.bm=function(a,b){a.classList.add(b)};
178
178
  _.cm=function(a,b){if(a&&typeof b===_.Bd)for(const c in b)a.style[c]=b[c]};_.dm=function(a){return document.createElement(a)};em=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.g.values());_.$f(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};fm=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.g.add(b))};
179
- gm=function(a,b,c){(_.ei()&&53===fi().major||_.ei()&&68===fi().major||_.gi())&&!b.hasAttribute(Lc)&&(b.style.opacity="0",b.setAttribute(Lc,""),a.j.one(b,Wc,()=>{b.removeAttribute(Lc);b.style.opacity="1";c&&(c.style.opacity="1")}))};
179
+ gm=function(a,b,c){(_.ei()&&53===fi().major||_.ei()&&68===fi().major||_.gi())&&!b.hasAttribute(Kc)&&(b.style.opacity="0",b.setAttribute(Kc,""),a.j.one(b,Uc,()=>{b.removeAttribute(Kc);b.style.opacity="1";c&&(c.style.opacity="1")}))};
180
180
  km=function(a){a.a.on(window,"offline",()=>{hm(a,!1)});a.a.on(window,"online",()=>{a.f||im(a)});a.a.on(a.l,he,()=>jm(a));a.a.on(a.l,"suspend",()=>jm(a));a.a.on(a.l,_.Pe,()=>jm(a));a.a.on(a.l,_.Sd,()=>{a.f||im(a)});a.a.on(a.l,_.Vd,()=>{a.f||im(a)});a.a.on(a.l,_.je,()=>{switch(a.l.getState()){case _.zl:jm(a);break;default:jm(a)}})};lm=function(a){a.g&&(a.g.stop(),a.g=null)};jm=function(a){a.f&&im(a)};
181
- mm=function(a){return _.y(function*(){var b=a.l.getConfiguration().connectivityCheck;b&&a.l&&(b=yield sh(a.h,b.url,b.attemptParameters,b.method),hm(a,b))})};im=function(a){a.l.getConfiguration().connectivityCheck&&(lm(a),a.g=(new _.Yh(()=>mm(a))).ca(5))};hm=function(a,b){lm(a);a.f!==b&&(a.f=b,a.l&&a.l.getConfiguration().connectivityCheck&&a.l.trigger(new _.F(Hd,{online:a.f})))};om=function(){for(let a=0;a<nm.length;++a)nm[a].hc()};
182
- _.pm=function(a,b){b=b||0;a={priority:b,hc:a};for(let c=0;c<nm.length;c++)if(nm[c].priority<b){nm.splice(c,0,a);return}nm.push(a)};qm=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};sm=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 rm(b[0],b[1],b[2]);a.a=b}return a.a};
183
- tm=function(a){switch((a.Yc()[0]||{src:"",type:""}).type){case _.Ub:a="dash";break;case _.Zb:a="ss";break;case _.Ui:a="hls";break;case _.Je:a=_.xd;break;default:a=""}return a};um=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};vm=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
184
- wm=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};xm=function(a){a=a.getDrmInfo();return(new _.cg(a&&a.licenseServerUri||"")).La};ym=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)||xm(a).endsWith("drmtoday.com"))&&(c=Vc);return c};
185
- zm=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.keySystem){case _.Jc:b="wv";break;case _.Ic:b="pr";break;case _.Hc:b="fps"}return b};Am=function(a){a=a.getDrmInfo();let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Bm=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.videoRobustness){case Da:case "HW_SECURE_ALL":b="L1";break;case Ca:b="L2";break;case _.eb:case _.db:b="L3"}return b};
186
- Fm=function(a,b){const c="ie"===_.Bi().browser;var d=b.getConfiguration();const e=[...Array.from(_.dj.keys()),...b.Ff()];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":um(d),"CL-ASSET-ID":vm(d),"CL-SESSION-ID":wm(d),"CL-PLAYBACK-TYPE":b.isLive()?Cm:Dm,"CL-CONTENT-TYPE":tm(b),"CL-PLUGINS":e.join(" "),"CL-DRM":ym(b),"CL-DRM-CDM":zm(b),"CL-DRM-SEC-LEVEL":Bm(b),"CL-DRM-OFFLINE":Am(b),"CL-DRM-IP":xm(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=
181
+ mm=function(a){return _.y(function*(){var b=a.l.getConfiguration().connectivityCheck;b&&a.l&&(b=yield sh(a.h,b.url,b.attemptParameters,b.method),hm(a,b))})};im=function(a){a.l.getConfiguration().connectivityCheck&&(lm(a),a.g=(new _.Yh(()=>mm(a))).da(5))};hm=function(a,b){lm(a);a.f!==b&&(a.f=b,a.l&&a.l.getConfiguration().connectivityCheck&&a.l.trigger(new _.F(Hd,{online:a.f})))};om=function(){for(let a=0;a<nm.length;++a)nm[a].ic()};
182
+ _.pm=function(a,b){b=b||0;a={priority:b,ic:a};for(let c=0;c<nm.length;c++)if(nm[c].priority<b){nm.splice(c,0,a);return}nm.push(a)};qm=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};sm=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 rm(b[0],b[1],b[2]);a.a=b}return a.a};
183
+ tm=function(a){switch((a.$c()[0]||{src:"",type:""}).type){case _.Sb:a="dash";break;case _.Xb:a="ss";break;case _.Ui:a="hls";break;case _.Je:a=_.xd;break;default:a=""}return a};um=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};vm=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
184
+ wm=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};xm=function(a){a=a.getDrmInfo();return(new _.cg(a&&a.licenseServerUri||"")).Ma};ym=function(a){const b=a.getConfiguration();let c="no";b.drm&&!_.rf(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Tc)||xm(a).endsWith("drmtoday.com"))&&(c=Tc);return c};
185
+ zm=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.keySystem){case _.Ic:b="wv";break;case _.Hc:b="pr";break;case _.Gc:b="fps"}return b};Am=function(a){a=a.getDrmInfo();let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Bm=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.videoRobustness){case Da:case "HW_SECURE_ALL":b="L1";break;case Ca:b="L2";break;case _.db:case _.cb:b="L3"}return b};
186
+ Fm=function(a,b){const c="ie"===_.Bi().browser;var d=b.getConfiguration();const e=[...Array.from(_.dj.keys()),...b.Kf()];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":um(d),"CL-ASSET-ID":vm(d),"CL-SESSION-ID":wm(d),"CL-PLAYBACK-TYPE":b.isLive()?Cm:Dm,"CL-CONTENT-TYPE":tm(b),"CL-PLUGINS":e.join(" "),"CL-DRM":ym(b),"CL-DRM-CDM":zm(b),"CL-DRM-SEC-LEVEL":Bm(b),"CL-DRM-OFFLINE":Am(b),"CL-DRM-IP":xm(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=
187
187
  d);d=_.jh(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Em).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=sm(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=
188
188
  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(Ga+k);g=Promise.reject(new _.H(_.G,7,g,k))}}return g})};_.Hm=function(a){a&&(0<=Gm.indexOf(a)||Gm.push(a))};
189
- Jm=function(a){if(!a.L){a.L=!0;a.h.getMedia()||a.h.getCastElement();a.w||(a.w=new Im(a.f.license));var b=Object.keys(a.K);Fm(a.w,{getConfiguration:a.getConfiguration.bind(a),Yc:a.Yc.bind(a),getDrmInfo:a.getDrmInfo.bind(a),Ff:()=>b,isLive:a.isLive.bind(a)}).then(()=>{a.g.debug("License verified remotely")}).catch(c=>{setTimeout(qm,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)})}};
190
- Km=function(a,b){a.w=new Im(b);a.w.verify().catch(c=>{setTimeout(()=>{a.g.error(Ga+c);a.trigger(new _.F(_.$c,{detail:new _.H(_.G,7,7101)}));a.destroy()},1E3)})};Mm=function(a,b){a.J=b;for(const c of a.J)(b=c.id())&&(a.K[b]=c);_.Lm(a,"onPlayerCreated")};_.Nm=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)))};
189
+ Jm=function(a){if(!a.M){a.M=!0;a.h.getMedia()||a.h.getCastElement();a.w||(a.w=new Im(a.f.license));var b=Object.keys(a.K);Fm(a.w,{getConfiguration:a.getConfiguration.bind(a),$c:a.$c.bind(a),getDrmInfo:a.getDrmInfo.bind(a),Kf:()=>b,isLive:a.isLive.bind(a)}).then(()=>{a.g.debug("License verified remotely")}).catch(c=>{setTimeout(qm,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)})}};
190
+ Km=function(a,b){a.w=new Im(b);a.w.verify().catch(c=>{setTimeout(()=>{a.g.error(Ga+c);a.trigger(new _.F(_.Yc,{detail:new _.H(_.G,7,7101)}));a.destroy()},1E3)})};Mm=function(a,b){a.J=b;for(const c of a.J)(b=c.id())&&(a.K[b]=c);_.Lm(a,"onPlayerCreated")};_.Nm=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)))};
191
191
  _.Lm=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)};
192
- Om=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(_.je,a.B);a.A.off(a,_.je,a.B);a.A.off(document,Ne);a.trigger(new _.F(_.Zd));a.L=!1;a.h&&a.h.release();a.j&&(yield a.j.dispose(),a.j=null);hj(b=>{b.release()});if(a.a){let b=null;const c=a.a.on(_.je,d=>{b=d});return _.Lm(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"),
192
+ Om=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(_.je,a.B);a.A.off(a,_.je,a.B);a.A.off(document,Ne);a.trigger(new _.F(_.Zd));a.M=!1;a.h&&a.h.release();a.j&&(yield a.j.dispose(),a.j=null);hj(b=>{b.release()});if(a.a){let b=null;const c=a.a.on(_.je,d=>{b=d});return _.Lm(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"),
193
193
  a.trigger(b))}).finally(()=>{a.a.off(_.je,c);a.trigger(new _.F(Yd))})}a.trigger(new _.F(Yd));return new Promise(b=>b())})};
194
- Rm=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(_.If);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Eb: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?(_.Jf.debug("Player Factory '"+f.Eb.a()+"' can play",b[g]),f=new Pm(f.Eb,g)):(_.Jf.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Eb.create(),d(new Qm(e,f.a))):
195
- (d=new _.F(_.$c,{detail:new _.H(_.G,7,7003)}),a.trigger(d),e(d))})};
194
+ Rm=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(_.If);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Gb: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?(_.Jf.debug("Player Factory '"+f.Gb.a()+"' can play",b[g]),f=new Pm(f.Gb,g)):(_.Jf.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Gb.create(),d(new Qm(e,f.a))):
195
+ (d=new _.F(_.Yc,{detail:new _.H(_.G,7,7003)}),a.trigger(d),e(d))})};
196
196
  _.Um=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=_.Kl(b);a.f=_.bj(a.N,_.cj(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 Rm(a,a.o,a.f),c=d.a,d=d.f,a.I=!1;c?_.Nm(a,c):a.a.addDelegate(a);Sm(a);a.a&&a.a.setCdnErrorCallback(a.C);Tm(a,a.f);a.setSourceIndex(d);
197
197
  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())});hj(e=>{e.g()});yield _.Lm(a,"onContentWillLoad",a.f.source[d])})};_.Vm=function(a){return _.y(function*(){a.h.getMedia()||a.h.getCastElement();a.A.on(a,_.je,a.B);a.trigger(new _.F(pd));yield Promise.all([a.a.load(a.f),a.j.load()])})};
198
- _.Xm=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);Wm(a);hj(()=>{});yield _.Lm(a,"onContentLoaded");a.f.autoplay&&(yield a.play())})};Sm=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.y(function*(){a.lc&&a.qd&&(a.qd=!1,yield a.lc(b))}))};Tm=function(a,b){a.j=$l(a,b).create(a)};
199
- Wm=function(a){const b=_.Yf(a.f.preferredTextLanguage).filter(d=>d),c=a.getTrackManager().ja();b.some(d=>{const e=_.rg(d);return(d=c.find(f=>{f=_.rg(f.language||"");return _.sg(f,e)}))?(a.getTrackManager().Ba(d),!0):!1})};Ym=function(a,b){a.size=void 0===b?0:1;a.f.debug("Setting key status to",b);a.a=b};
200
- Zm=function(a,b){a.g=b;_.Mf(a.f);if(!b)return Promise.resolve();a.f.on(b,Xc,c=>{_.Gf("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=_.I(c.initData);if(_.Bg(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=_.Gg(c.subarray(4),
201
- !0);c=_.Ig(c);const d=new Event(Xc);d.initDataType="skd";d.initData=Cg(c);a.g.dispatchEvent(d)}});tl(b,HTMLMediaElement.HAVE_METADATA,a.f,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};$m=function(a,b){Ym(a.keyStatuses,b);b=new _.F(gd);a.dispatchEvent(b)};
202
- cn=function(a,b){a.a=b;_.Mf(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(Xc);d.initDataType=_.sc;d.initData=Cg(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=an(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.F(sd,{messageType:d?jd:id,message:c.message});d=e;_.Gf("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.Hf("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{if(c=an(a,
198
+ _.Xm=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);Wm(a);hj(()=>{});yield _.Lm(a,"onContentLoaded");a.f.autoplay&&(yield a.play())})};Sm=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.y(function*(){a.mc&&a.ud&&(a.ud=!1,yield a.mc(b))}))};Tm=function(a,b){a.j=$l(a,b).create(a)};
199
+ Wm=function(a){const b=_.Yf(a.f.preferredTextLanguage).filter(d=>d),c=a.getTrackManager().ja();b.some(d=>{const e=_.rg(d);return(d=c.find(f=>{f=_.rg(f.language||"");return _.sg(f,e)}))?(a.getTrackManager().Da(d),!0):!1})};Ym=function(a,b){a.size=void 0===b?0:1;a.f.debug("Setting key status to",b);a.a=b};
200
+ Zm=function(a,b){a.g=b;_.Mf(a.f);if(!b)return Promise.resolve();a.f.on(b,Vc,c=>{_.Gf("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=_.I(c.initData);if(_.Bg(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=_.Gg(c.subarray(4),
201
+ !0);c=_.Ig(c);const d=new Event(Vc);d.initDataType="skd";d.initData=Cg(c);a.g.dispatchEvent(d)}});tl(b,HTMLMediaElement.HAVE_METADATA,a.f,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};$m=function(a,b){Ym(a.keyStatuses,b);b=new _.F(ed);a.dispatchEvent(b)};
202
+ cn=function(a,b){a.a=b;_.Mf(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(Vc);d.initDataType=_.rc;d.initData=Cg(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=an(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.F(sd,{messageType:d?kd:hd,message:c.message});d=e;_.Gf("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.Hf("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{if(c=an(a,
203
203
  c.sessionId))_.Gf("WebkitEmeManager.MediaKeySession.ready"),bn(c,"usable"),c.a&&c.a.resolve(),c.a=null}),a.f.on(b,a.g+"keyerror",c=>{var d=an(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?bn(d,_.Kd):1===e?bn(d,"expired"):
204
- bn(d,_.fd))}}}))};an=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};bn=function(a,b){Ym(a.keyStatuses,b);b=new _.F(gd);a.dispatchEvent(b)};dn=function(a,b){return a.o?a.o+b.charAt(0).toUpperCase()+b.slice(1):b};
204
+ bn(d,_.dd))}}}))};an=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};bn=function(a,b){Ym(a.keyStatuses,b);b=new _.F(ed);a.dispatchEvent(b)};dn=function(a,b){return a.o?a.o+b.charAt(0).toUpperCase()+b.slice(1):b};
205
205
  en=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===_.Nd)if(c)d=_.I(_.Ig("LOAD_SESSION|"+c));else{const f=_.Ig("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 _.Mk;const e=dn(a,"generateKeyRequest");try{a.h[e](a.g,d)}catch(f){if(f.name!==Fa)return a.f=null,Promise.reject(f);(new _.Yh(()=>{try{a.h[e](a.g,d)}catch(g){a.f.reject(g),
206
- a.f=null}})).ca(.01)}return a.f};fn=function(a,b,c){if(a.a)a.a.then(()=>fn(a,b,c)).catch(()=>fn(a,b,c));else{a.a=b;if(a.g===Re){var d=_.Eg(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=_.Ug(e.keys[0].k);e=_.Ug(e.keys[0].kid)}else d=_.I(c),e=null;var f=dn(a,"addKey");try{a.h[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
207
- gn=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)};hn=function(a){a=a.target;if(a.webkitPresentationMode===Od){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)};
206
+ a.f=null}})).da(.01)}return a.f};fn=function(a,b,c){if(a.a)a.a.then(()=>fn(a,b,c)).catch(()=>fn(a,b,c));else{a.a=b;if(a.g===Re){var d=_.Eg(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=_.Ug(e.keys[0].k);e=_.Ug(e.keys[0].kid)}else d=_.I(c),e=null;var f=dn(a,"addKey");try{a.h[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
207
+ gn=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.$c?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};hn=function(a){a=a.target;if(a.webkitPresentationMode===Od){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)};
208
208
  jn=function(){return this.webkitSupportsPresentationMode(Od)?(this.webkitSetPresentationMode(Od),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};kn=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
209
- ln=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};mn=function(a,b,c){return new window.TextTrackCue(a,b,c)};nn=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};pn=function(a,b,c){if("input"===a)switch(this.type){case "range":a=vc}on.call(this,a,b,c)};qn=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
209
+ ln=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};mn=function(a,b,c){return new window.TextTrackCue(a,b,c)};nn=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};pn=function(a,b,c){if("input"===a)switch(this.type){case "range":a=uc}on.call(this,a,b,c)};qn=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
210
210
  rn=function(a){return qn()-a.a};tn=function(a){const b=new sn;b.a=a.a;return b};_.un=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.wn=function(a,b,c,d){return _.y(function*(){try{return new (yield vn(a,b,c,d))}catch(e){throw e.a(_.G),e;}})};
211
- vn=function(a,b,c,d){return _.y(function*(){if(d){var e=_.xn[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.yn(a)){const f=_.zn[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 An(a,b,c))){if(e=_.xn[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.H(_.G,4,4E3,{url:a});})};
212
- _.yn=function(a){a=(new _.cg(a)).wa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};An=function(a,b,c){return _.y(function*(){var d=_.jh(a);hh(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).P).headers["content-type"])?d.toLowerCase():""})};Bn=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};
211
+ vn=function(a,b,c,d){return _.y(function*(){if(d){var e=_.xn[d.toLowerCase()];if(e)return e;_.D("Could not determine manifest type using MIME type ",d)}if(e=_.yn(a)){const f=_.zn[e];if(f)return f;_.D("Could not determine manifest type for extension ",e)}else _.D("Could not find extension for ",a);if(!d&&(d=yield An(a,b,c))){if(e=_.xn[d])return e;_.D("Could not determine manifest type using MIME type",d)}throw new _.H(_.G,4,4E3,{url:a});})};
212
+ _.yn=function(a){a=(new _.cg(a)).ya.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};An=function(a,b,c){return _.y(function*(){var d=_.jh(a);hh(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).P).headers["content-type"])?d.toLowerCase():""})};Bn=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};
213
213
  Cn=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(Bn(a,e),mh(c,e.byteLength,rn(a.g)),a.g.a=qn());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>Cn(a,b,c))})};
214
214
  En=function(a){const b=a.uris[a.uriIndex],c=new Dn,d=new sn,e=tn(d);let f=0,g;const h=new _.Mk;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=rn(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(na),lh(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
215
215
  const q={};for(const t of n)n=t.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const t=rn(e);l||mh(a,m.response?m.response.length:0,t);const u=_.kh(q,m.response,m.status,b,m.responseURL,a,t,g);a.rateLimitBps?nh(a.rateLimitBps,rn(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");
@@ -222,34 +222,34 @@ Hn=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Kn(a);if(a.a+
222
222
  Kn=function(a){const b=a.j.getUint32(a.a,!1);a.a+=4;return b};
223
223
  Nn=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=Ln(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Ln(e.request.fuzzFactor,.5));a.f*=Ln(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.j=h;Mn(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)});
224
224
  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 Nn(a);g&&e.a(_.G);a.o.reject(e)}else a.o.reject(e)})};Mn=function(a,b,c){a.m=setTimeout(b,c)};Ln=function(a,b){return null===a||void 0===a?b:a};
225
- Rn=function(a){var b=new On;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Pn,d={zc:!1,Ve:!1};b={P:Qn(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.Ve=!0;c.abort()},a);b.P=b.P.finally(()=>{window.clearTimeout(e)})}return b};
226
- Qn=function(a,b,c,d){return _.y(function*(){let e,f,g;const h=new sn,k=tn(h);try{e=yield Sn(a,c);g=rn(h);const m=e.headers.get(na);lh(b,m);const n=m?parseInt(m,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const q=e.body.getReader();f=yield Jn(new Tn(n,!b.disableMergedFragments),q,(t,u)=>{if(d.zc)return null;u&&u.data&&(mh(b,u.data.byteLength,rn(h)),h.a=qn());return b.onFragment&&u?b.rateLimitBps?nh(b.rateLimitBps,rn(k),b.bytesLoaded).then(()=>b.onFragment(u)):b.onFragment(u):null},
227
- b.onProgress)}else{const q=e.body.getReader();f=yield Cn(new Un(n),q,b);b.rateLimitBps&&(yield nh(b.rateLimitBps,rn(k),f.byteLength))}}catch(m){if(d.zc)throw new _.H(1,1,7001,{url:a,request:b});if(d.Ve)throw new _.H(1,1,1003,{url:a,request:b});_.Hf("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 _.kh(l,f,e.status,a,e.url,b,rn(k),g)})};
225
+ Rn=function(a){var b=new On;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Pn,d={Bc:!1,af:!1};b={P:Qn(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.Bc||(d.Bc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.af=!0;c.abort()},a);b.P=b.P.finally(()=>{window.clearTimeout(e)})}return b};
226
+ Qn=function(a,b,c,d){return _.y(function*(){let e,f,g;const h=new sn,k=tn(h);try{e=yield Sn(a,c);g=rn(h);const m=e.headers.get(na);lh(b,m);const n=m?parseInt(m,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const q=e.body.getReader();f=yield Jn(new Tn(n,!b.disableMergedFragments),q,(t,u)=>{if(d.Bc)return null;u&&u.data&&(mh(b,u.data.byteLength,rn(h)),h.a=qn());return b.onFragment&&u?b.rateLimitBps?nh(b.rateLimitBps,rn(k),b.bytesLoaded).then(()=>b.onFragment(u)):b.onFragment(u):null},
227
+ b.onProgress)}else{const q=e.body.getReader();f=yield Cn(new Un(n),q,b);b.rateLimitBps&&(yield nh(b.rateLimitBps,rn(k),f.byteLength))}}catch(m){if(d.Bc)throw new _.H(1,1,7001,{url:a,request:b});if(d.af)throw new _.H(1,1,1003,{url:a,request:b});_.Hf("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.Bc)throw new _.H(1,1,7001,{url:a,request:b});return _.kh(l,f,e.status,a,e.url,b,rn(k),g)})};
228
228
  Wn=function(a){try{const b=a.uris[a.uriIndex],c=_.Vn(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()}}};
229
229
  _.Vn=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.Hf("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 _.Hf("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?_.Ug(a).buffer:_.Ig(a).buffer,contentType:c}};_.Yn=function(a){delete _.Xn[a]};
230
230
  _.co=function(a){if(!a.o)return null;const b=a.G;switch(a.o){case Zn:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case $n:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case ao:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case bo: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;
231
- df=typeof Object.defineProperties==_.bd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
231
+ df=typeof Object.defineProperties==_.$c?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
232
232
  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=
233
- 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)}};
234
- 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();
235
- g.Qc(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.Qc(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Qc=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: "+
236
- 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).Qc(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(x){q[u]=x;t--;0==t&&l(q)}}var q=[],t=0;do q.push(void 0),t++,d(k.value).Qc(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var gf=this||self;
237
- gf.a=!0;_.A("clpp.utils.obj.cloneItem",_.kf);_.A("clpp.utils.obj.merge",_.jf);var yf={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.A("clpp.log.Level",yf);var wf=3,vf={},eo=[];_.A("clpp.log.getLoggers",function(){return _.kf(vf)});_.A("clpp.log.addInterceptor",function(a){a&&eo.push(a)});_.A("clpp.log.removeInterceptor",function(a){a&&(a=eo.indexOf(a),0<=a&&eo.splice(a,1))});_.A("clpp.log.getTagLevel",xf);_.A("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=vf[a]});_.A("clpp.log.setTagLevel",function(a,b){a&&(_.pf(b)&&(b=zf(b)),vf[a]=b)});
238
- _.A("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.pf(a)&&(a=zf(a));wf=a});_.A("clpp.log.getLogLevel",function(){return wf});
239
- _.P=class{constructor(a){(this.a=a)&&void 0===vf[a]&&(vf[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=xf(this.a);if(0<=d){if(d<c)return}else if(wf<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):
240
- 2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of eo)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)}qf(a){return a?
241
- this.a?new _.P(this.a+"."+a):new _.P(a):this}};_.A("clpp.log.Logger",_.P);_.P.prototype.createChild=_.P.prototype.qf;_.P.prototype.error=_.P.prototype.error;_.P.prototype.warn=_.P.prototype.warn;_.P.prototype.debug=_.P.prototype.debug;_.P.prototype.info=_.P.prototype.info;_.P.prototype.log=_.P.prototype.log;var Af=new _.P("clpp");_.A("clpp.log.info",_.Ff);_.A("clpp.log.debug",_.Gf);_.A("clpp.log.warn",_.C);_.A("clpp.log.error",_.Hf);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Pm,Qm;Pm=class{constructor(a,b){this.Eb=a;this.a=b}};Qm=class{constructor(a,b){this.a=a;this.f=b}};_.Jf=new _.P("clpp.players");_.If={};_.fo=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 go,ho;go=class{constructor(a,b,c,d){this.f=a;this.hc=b;this.a=c;this.cg=!!d}Nb(a){try{this.hc.handleEvent?this.hc.handleEvent(a):this.hc.call(this.a,a)}catch(b){_.Hf("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
233
+ 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 _.$c:h=!0;break a;default:h=!1}h?this.A(g):this.m(g)}};
234
+ b.prototype.A=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.$c?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();
235
+ g.Sc(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==_.$c?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.Sc(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Sc=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: "+
236
+ 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).Sc(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(x){q[u]=x;t--;0==t&&l(q)}}var q=[],t=0;do q.push(void 0),t++,d(k.value).Sc(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var gf=this||self;
237
+ gf.a=!0;_.z("clpp.utils.obj.cloneItem",_.kf);_.z("clpp.utils.obj.merge",_.jf);var yf={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",yf);var wf=3,vf={},eo=[];_.z("clpp.log.getLoggers",function(){return _.kf(vf)});_.z("clpp.log.addInterceptor",function(a){a&&eo.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=eo.indexOf(a),0<=a&&eo.splice(a,1))});_.z("clpp.log.getTagLevel",xf);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=vf[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.pf(b)&&(b=zf(b)),vf[a]=b)});
238
+ _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.pf(a)&&(a=zf(a));wf=a});_.z("clpp.log.getLogLevel",function(){return wf});
239
+ _.O=class{constructor(a){(this.tag=a)&&void 0===vf[a]&&(vf[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=xf(this.tag);if(0<=d){if(d<c)return}else if(wf<c)return;this.tag&&Array.prototype.unshift.call(arguments,"["+this.tag+"]");d=new Date;d.toISOString&&(d=d.toISOString().substring(11).replace("Z",""),Array.prototype.unshift.call(arguments,d));4===c?console.log.apply(console,arguments):3===c?console.info.apply(console,
240
+ arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of eo)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)}vf(a){return a?
241
+ this.tag?new _.O(this.tag+"."+a):new _.O(a):this}};_.z("clpp.log.Logger",_.O);_.O.prototype.createChild=_.O.prototype.vf;_.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 Af=new _.O("clpp");_.z("clpp.log.info",_.Bf);_.z("clpp.log.debug",_.Gf);_.z("clpp.log.warn",_.D);_.z("clpp.log.error",_.Hf);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Pm,Qm;Pm=class{constructor(a,b){this.Gb=a;this.a=b}};Qm=class{constructor(a,b){this.a=a;this.f=b}};_.Jf=new _.O("clpp.players");_.If={};_.fo=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 go,ho;go=class{constructor(a,b,c,d){this.f=a;this.ic=b;this.a=c;this.fg=!!d}Pb(a){try{this.ic.handleEvent?this.ic.handleEvent(a):this.ic.call(this.a,a)}catch(b){_.Hf("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
242
242
  _.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(){}};
243
- ho=class{constructor(a){this.a=new _.fo;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].Nb(a),b[c].cg&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new go(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new go(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 io;_.jo=class{constructor(){this.a=new _.fo}release(){_.Mf(this)}on(a,b,c,d=!1){a=new io(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||(Lf(f),this.a.remove(b,f))}}};io=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 ko=class{constructor(a){this.l=a;this.m=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.h=null;this.f=new _.jo;this.a=this.j=null;this.g=[];this.o=new _.P("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}};_.ro=class{constructor(a,b,c,d){d=void 0===d?_.lo:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.mo;this.writingMode=_.no;this.lineInterpretation=_.oo;this.line=null;this.lineAlign=_.po;this.direction=qo;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}};_.A("clpp.text.Cue",_.ro);_.ro.positionAlign={LEFT:_.ld,RIGHT:_.md,CENTER:_.tc,AUTO:"auto"};_.lo=_.v;
244
- _.ro.payloadType={TEXT:_.lo,VTT_XML:_.Oe,TTML_XML:_.we};_.mo=_.tc;_.so={LEFT:_.hd,RIGHT:_.ce,CENTER:_.mo,START:_.hd,END:_.ce};_.ro.textAlign=_.so;var qo="ltr";_.ro.direction={HORIZONTAL_LEFT_TO_RIGHT:qo,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.no="horizontal-tb";_.ro.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.no,VERTICAL_LEFT_TO_RIGHT:_.Ee,VERTICAL_RIGHT_TO_LEFT:_.Fe};_.oo=0;_.ro.lineInterpretation={LINE_NUMBER:_.oo,PERCENTAGE:1};_.po=_.ie;_.to={CENTER:_.tc,START:_.po,END:_.Yc};_.ro.lineAlign=_.to;
245
- _.wo=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.uo;this.scroll=vo;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.A("clpp.text.CueRegion",_.wo);_.uo=1;_.wo.units={PX:0,PERCENTAGE:_.uo,LINES:2};var vo="";_.wo.scrollMode={NONE:vo,UP:"up"};_.wo.displayAlign={BEFORE:"flex-end",CENTER:_.tc,AFTER:"flex-start"};
246
- _.wo.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Fc,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var xo=class{constructor(a){this.l=a;this.j=a.getTextDisplayer();this.f=this.g=null;this.a=new _.jo;this.h=!1;this.m=new _.P("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,_.Mb,b=>Xf(this,b)),this.a.on(this.f,vc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.fe&&(d.mode=
247
- _.dd)}}}))}o(a){const b=new _.ro(a.startTime,a.endTime,a.text,_.Oe);if(_.pf(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Ee;break;case "rl":b.writingMode=_.Fe}_.qf(a.size)&&(b.size=a.size);if(_.pf(a.align))switch(a.align){case _.hd:case _.ie:b.textAlign=_.hd;break;case _.tc:b.textAlign=_.mo;break;case _.ce:case _.Yc:b.textAlign=_.ce}_.qf(a.position)&&(b.position=a.position);if(_.pf(a.positionAlign))switch(a.positionAlign){case _.ld:b.positionAlign=_.ld;break;case _.tc:b.positionAlign=
248
- _.tc;break;case _.md:b.positionAlign=_.md}_.qf(a.line)&&(b.line=a.line);if(_.pf(a.lineAlign))switch(a.lineAlign){case _.ie:b.lineAlign=_.po;break;case _.tc:b.lineAlign=_.tc;break;case _.Yc:b.lineAlign=_.Yc}typeof a.snapToLines===_.hc&&(b.lineInterpretation=a.snapToLines?_.oo:1);return b}};var hg=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;$e=_.cg.prototype;$e.Sa="";$e.dc="";$e.La="";$e.vc=null;$e.wa="";$e.Tb="";$e.toString=function(){var a=[],b=this.Sa;b&&a.push(kg(b,yo,!0),":");if(b=this.La){a.push("//");var c=this.dc;c&&a.push(kg(c,yo,!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(kg(b,"/"==b.charAt(0)?zo:Ao,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Tb)&&a.push("#",kg(b,Bo));return a.join("")};
249
- $e.resolve=function(a){var b=new _.cg(this);"data"===b.Sa&&(b=new _.cg);var c=!!a.Sa;c?dg(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)eg(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(""):
250
- ".."==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?_.fg(b,gg(a.a)):c=!!a.Tb;c&&(b.Tb=a.Tb);return b};var yo=/[#\/\?@]/g,Ao=/[#\?:]/g,zo=/[#\?]/g,lg=/[#\?@]/g,Bo=/#/g;jg.prototype.a=null;jg.prototype.g=null;jg.prototype.add=function(a,b){_.ng(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};
251
- jg.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")};_.Co=1/15;var Do;Do={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Nh=(a,b)=>{const c=Do[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};_.Eo={text:{mp4:Vb,m4s:Vb,m4i:Vb,cmft:Vb,vtt:_.se,ttml:_.Yb},video:{mp4:_.Je,m4s:_.Je,m4i:_.Je,m4v:_.Je,cmfv:_.Je,ts:_.He},audio:{mp4:_.dc,m4s:_.dc,m4i:_.dc,m4a:_.dc,cmfa:_.dc,ts:_.He,aac:_.ac,ec3:_.cc,ac3:_.bc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.Go=(a,b,c)=>{a=_.Fo(a)||"";return(a=_.Eo[b][a])?a:b===_.v?c&&"vtt"!==c?Vb:_.se:null};_.Qh=(a,b,c)=>a.map(d=>_.Go(d,b,c)).filter(Boolean)[0]||null;
252
- _.Fo=a=>{a=(new _.cg(a)).wa.split(".");return 1>=a.length?null:a.pop()};_.H=class extends Error{constructor(a,b,c,d,e){super(og(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,_.H)}a(a){this.severity!==a&&(this.severity=a,this.message=og(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.A("clpp.Error",_.H);_.G=2;_.H.Severity={RECOVERABLE:1,FATAL:_.G};
243
+ ho=class{constructor(a){this.a=new _.fo;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].Pb(a),b[c].fg&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new go(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new go(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].ic===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var io;_.jo=class{constructor(){this.a=new _.fo}release(){_.Mf(this)}on(a,b,c,d=!1){a=new io(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||(Lf(f),this.a.remove(b,f))}}};io=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 ko=class{constructor(a){this.l=a;this.m=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.h=null;this.f=new _.jo;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}};_.ro=class{constructor(a,b,c,d){d=void 0===d?_.lo:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.mo;this.writingMode=_.no;this.lineInterpretation=_.oo;this.line=null;this.lineAlign=_.po;this.direction=qo;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}};_.z("clpp.text.Cue",_.ro);_.ro.positionAlign={LEFT:_.ld,RIGHT:_.md,CENTER:_.sc,AUTO:"auto"};_.lo=_.v;
244
+ _.ro.payloadType={TEXT:_.lo,VTT_XML:_.Oe,TTML_XML:_.we};_.mo=_.sc;_.so={LEFT:_.fd,RIGHT:_.ce,CENTER:_.mo,START:_.fd,END:_.ce};_.ro.textAlign=_.so;var qo="ltr";_.ro.direction={HORIZONTAL_LEFT_TO_RIGHT:qo,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.no="horizontal-tb";_.ro.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.no,VERTICAL_LEFT_TO_RIGHT:_.Ee,VERTICAL_RIGHT_TO_LEFT:_.Fe};_.oo=0;_.ro.lineInterpretation={LINE_NUMBER:_.oo,PERCENTAGE:1};_.po=_.ie;_.to={CENTER:_.sc,START:_.po,END:_.Wc};_.ro.lineAlign=_.to;
245
+ _.wo=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.uo;this.scroll=vo;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.wo);_.uo=1;_.wo.units={PX:0,PERCENTAGE:_.uo,LINES:2};var vo="";_.wo.scrollMode={NONE:vo,UP:"up"};_.wo.displayAlign={BEFORE:"flex-end",CENTER:_.sc,AFTER:"flex-start"};
246
+ _.wo.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Ec,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var xo=class{constructor(a){this.l=a;this.j=a.getTextDisplayer();this.f=this.g=null;this.a=new _.jo;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,_.Kb,b=>Xf(this,b)),this.a.on(this.f,uc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.fe&&(d.mode=
247
+ _.bd)}}}))}o(a){const b=new _.ro(a.startTime,a.endTime,a.text,_.Oe);if(_.pf(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Ee;break;case "rl":b.writingMode=_.Fe}_.qf(a.size)&&(b.size=a.size);if(_.pf(a.align))switch(a.align){case _.fd:case _.ie:b.textAlign=_.fd;break;case _.sc:b.textAlign=_.mo;break;case _.ce:case _.Wc:b.textAlign=_.ce}_.qf(a.position)&&(b.position=a.position);if(_.pf(a.positionAlign))switch(a.positionAlign){case _.ld:b.positionAlign=_.ld;break;case _.sc:b.positionAlign=
248
+ _.sc;break;case _.md:b.positionAlign=_.md}_.qf(a.line)&&(b.line=a.line);if(_.pf(a.lineAlign))switch(a.lineAlign){case _.ie:b.lineAlign=_.po;break;case _.sc:b.lineAlign=_.sc;break;case _.Wc:b.lineAlign=_.Wc}typeof a.snapToLines===_.fc&&(b.lineInterpretation=a.snapToLines?_.oo:1);return b}};var hg=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;$e=_.cg.prototype;$e.Ua="";$e.ec="";$e.Ma="";$e.xc=null;$e.ya="";$e.Vb="";$e.toString=function(){var a=[],b=this.Ua;b&&a.push(kg(b,yo,!0),":");if(b=this.Ma){a.push("//");var c=this.ec;c&&a.push(kg(c,yo,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.xc;null!=b&&a.push(":",String(b))}if(b=this.ya)this.Ma&&"/"!=b.charAt(0)&&a.push("/"),a.push(kg(b,"/"==b.charAt(0)?zo:Ao,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Vb)&&a.push("#",kg(b,Bo));return a.join("")};
249
+ $e.resolve=function(a){var b=new _.cg(this);"data"===b.Ua&&(b=new _.cg);var c=!!a.Ua;c?dg(b,a.Ua):c=!!a.ec;c?b.ec=a.ec:c=!!a.Ma;c?b.Ma=a.Ma:c=null!=a.xc;var d=a.ya;if(c)eg(b,a.xc);else if(c=!!a.ya){if("/"!=d.charAt(0))if(this.Ma&&!this.ya)d="/"+d;else{var e=b.ya.lastIndexOf("/");-1!=e&&(d=b.ya.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):
250
+ ".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.ya=d:c=""!==a.a.toString();c?_.fg(b,gg(a.a)):c=!!a.Vb;c&&(b.Vb=a.Vb);return b};var yo=/[#\/\?@]/g,Ao=/[#\?:]/g,zo=/[#\?]/g,lg=/[#\?@]/g,Bo=/#/g;jg.prototype.a=null;jg.prototype.g=null;jg.prototype.add=function(a,b){_.ng(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};
251
+ jg.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")};_.Co=1/15;var Do;Do={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Nh=(a,b)=>{const c=Do[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};_.Eo={text:{mp4:Tb,m4s:Tb,m4i:Tb,cmft:Tb,vtt:_.se,ttml:_.Wb},video:{mp4:_.Je,m4s:_.Je,m4i:_.Je,m4v:_.Je,cmfv:_.Je,ts:_.He},audio:{mp4:_.bc,m4s:_.bc,m4i:_.bc,m4a:_.bc,cmfa:_.bc,ts:_.He,aac:_.Zb,ec3:_.ac,ac3:_.$b},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.Qh=(a,b,c)=>a.map(d=>{d=_.Fo(d)||"";return d=(d=_.Eo[b][d])?d:b===_.v?c&&"vtt"!==c?Tb:_.se:null}).filter(Boolean)[0]||null;
252
+ _.Fo=a=>{a=(new _.cg(a)).ya.split(".");return 1>=a.length?null:a.pop()};_.H=class extends Error{constructor(a,b,c,d,e){super(og(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,_.H)}a(a){this.severity!==a&&(this.severity=a,this.message=og(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};
253
253
  _.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
254
254
  _.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,
255
255
  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,
@@ -260,55 +260,55 @@ HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEATURE:4046,INVALID_STREAM
260
260
  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,
261
261
  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,
262
262
  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};_.dh=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}};_.ch=class{constructor(a,b){this.name=a;this.value=b}};var qg=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
- "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",
263
+ "cs"],["dan","da"],["deu","de"],[_.Oc,"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",
264
264
  "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",
265
265
  "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",
266
266
  "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",
267
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var Ho=class{};_.A("clpp.utils.BufferUtils",Ho);Ho.toArrayBuffer=Cg;Ho.toDataView=_.Bg;Ho.toInt32Array=_.Ag;Ho.toUint32Array=zg;Ho.toUint16Array=yg;Ho.toUint8Array=_.I;Ho.equal=wg;var Fg=new _.P("clpp.utils.strings");_.A("clpp.utils.strings.fromUtf8",_.Eg);_.A("clpp.utils.strings.fromBytesAutoDetect",_.Hg);_.A("clpp.utils.strings.toUtf8",_.Ig);_.A("clpp.utils.strings.toUtf16",_.Jg);_.A("clpp.utils.strings.toByteArray",_.Kg);_.A("clpp.utils.strings.startsWith",_.Lg);_.A("clpp.utils.strings.endsWith",_.Mg);_.A("clpp.utils.strings.bitrateToString",_.Pg);
268
- _.A("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)))});
269
- _.A("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 Qg=document.createElement("span");var Io=class{};_.A("clpp.utils.Uint8ArrayUtils",Io);Io.toStandardBase64=_.Sg;Io.concat=_.$g;Io.equal=_.Zg;Io.toHex=_.Wg;Io.fromHex=_.Vg;Io.fromBase64=_.Ug;Io.toBase64Url=_.Tg;_.bh=class{constructor(a){this.f=a;this.a=0}};var fh=[403,401];_.A("clpp.net.DEFAULT_FATAL_STATUS_CODES",fh);_.A("clpp.net.makeRequest",_.jh);_.ih=6;_.A("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.ih});_.Mk=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(){}};_.Tl=class{constructor(a,b){this.P=a;this.w=b;this.a=!1}abort(){this.a=!0;return this.w()}Sc(a,b){const c=new _.Mk;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=oh(a,e,c):c.resolve(e)},e=>{b?d=oh(b,e,c):c.reject(e)});return new _.Tl(c,()=>d())}};_.Tl.aborted=function(){const a=Promise.reject(new _.H(_.G,7,7001));a.catch(()=>{});return new _.Tl(a,()=>Promise.resolve())};_.Tl.prototype.chain=_.Tl.prototype.Sc;_.Jo=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)}};_.Em=class{constructor(){this.f=[];this.g=[];this.m=!1;this.j=new _.Jo;this.a={};this.h=0;this.a.data=Wn;!window.fetch||!window.AbortController||_.bi(6)||_.ei()&&68<_.Bi().browserVersion.major?(this.a.http=En,this.a.https=En):(this.a.http=Rn,this.a.https=Rn)}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()}ge(a){this.f.push(a)}Pc(a){this.g.push(a)}Ne(a){this.f=this.f.filter(b=>
270
- b!==a)}gd(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.m)return new Ko(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 _.Mk;try{for(const f of a.requestModifiers)d=d.then(g=>
271
- {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 _.cg(f.uris[f.uriIndex]);var h=g.Sa;h||(h=location.protocol,h=h.slice(0,-1),dg(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 Ko(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.G,1,7001,
272
- 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);});_.qh(this.j,e);c.resolve(a);return e}catch(f){return new Ko(Promise.reject(f))}}};_.A("clpp.net.NetworkEngine",_.Em);_.Em.prototype.fetch=_.Em.prototype.fetch;
273
- _.Em.prototype.removeResponseModifier=_.Em.prototype.gd;_.Em.prototype.removeRequestModifier=_.Em.prototype.Ne;_.Em.prototype.addResponseModifier=_.Em.prototype.Pc;_.Em.prototype.addRequestModifier=_.Em.prototype.ge;_.Em.prototype.setRateLimit=_.Em.prototype.hg;var uh;_.xh=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}
274
- renditions size: ${this.renditions.length}`}};_.A("clpp.Track",_.xh);_.xh.prototype.toString=_.xh.prototype.toString;_.Fh=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}};_.A("clpp.Rendition",_.Fh);_.wh=1;_.L=_.w;_.K=_.p;_.J=_.v;uh=_.td;_.Lo={VIDEO:_.L,AUDIO:_.K,TEXT:_.J,METADATA:uh};_.xh.Type=_.Lo;_.Jj=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;
275
- _.Lg(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.g=b.hash}};_.A("clpp.utils.url.queryString",_.Ah);var Mo=class{constructor(a){this.g=a;this.a=new _.P("clpp.native.hls.HlsMetadataParser");this.f=ag(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 Dh(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 Hh(c,d,
276
- 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 Jh(d);e.tc=f}catch(f){c.a.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.Rh=[];_.Q=class{nd(){return!0}yf(a){return this.getVideoTracks().find(b=>_.rf(b,a,a&&Object.keys(a)))}uf(a){return this.getAudioTracks().find(b=>_.rf(b,a,a&&Object.keys(a)))}wf(a){return this.ja().find(b=>_.rf(b,a,a&&Object.keys(a)))}xf(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.rf(b,a,a&&Object.keys(a)))}tf(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.rf(b,a,a&&Object.keys(a)))}vf(a){return this.ja().flatMap(b=>b.renditions).find(b=>_.rf(b,a,a&&Object.keys(a)))}};
277
- _.A("clpp.TrackManager",_.Q);_.Q.prototype.isAbrEnabled=_.Q.prototype.la;_.Q.prototype.addTextTrack=_.Q.prototype.addTextTrack;_.Q.prototype.findTextRendition=_.Q.prototype.vf;_.Q.prototype.findAudioRendition=_.Q.prototype.tf;_.Q.prototype.findVideoRendition=_.Q.prototype.xf;_.Q.prototype.findTextTrack=_.Q.prototype.wf;_.Q.prototype.findAudioTrack=_.Q.prototype.uf;_.Q.prototype.findVideoTrack=_.Q.prototype.yf;_.Q.prototype.setTextRendition=_.Q.prototype.jb;_.Q.prototype.setAudioRendition=_.Q.prototype.ib;
278
- _.Q.prototype.setVideoRendition=_.Q.prototype.Ta;_.Q.prototype.setTextTrack=_.Q.prototype.Ba;_.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;
279
- _.Q.prototype.getTextRendition=_.Q.prototype.Ea;_.Q.prototype.getAudioRendition=_.Q.prototype.Da;_.Q.prototype.getVideoRendition=_.Q.prototype.ia;_.Q.prototype.getTextTracks=_.Q.prototype.ja;_.Q.prototype.getAudioTracks=_.Q.prototype.getAudioTracks;_.Q.prototype.getVideoTracks=_.Q.prototype.getVideoTracks;_.Q.prototype.canSelectVideoTracks=_.Q.prototype.nd;_.No=new Map;_.Oo=(new Map).set(_.Ec,_.Ec).set("frameRate","framerate").set("bandwidth","bitrate").set(_.We,_.We).set(_.cd,_.cd).set("channelsCount","channels");_.Po=class{constructor(a){this.f=a;this.a=null}ca(a){return Vh(this,a,!1)}Va(a){return Vh(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Yh=class{constructor(a){this.f=a;this.a=null}$d(){this.stop();this.f();return this}ca(a){this.stop();this.a=(new _.Po(()=>{this.f()})).ca(a);return this}Va(a){this.stop();this.a=(new _.Po(()=>{this.f()})).Va(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.A("clpp.utils.Timer",_.Yh);_.Yh.prototype.stop=_.Yh.prototype.stop;_.Yh.prototype.tickEvery=_.Yh.prototype.Va;_.Yh.prototype.tickAfter=_.Yh.prototype.ca;_.Yh.prototype.tickNow=_.Yh.prototype.$d;var Qo=class{};_.A(Dc,Qo);Qo.getInfo=_.Bi;
280
- var Xh=null,Wh=null,oi=new _.P(Dc),si="android",ri="ios",zi="linux",ti="osx",wi="windows",xi="tizen",yi="webos",qi=ye,Ai=ye,ji={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,
267
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var Go=class{};_.z("clpp.utils.BufferUtils",Go);Go.toArrayBuffer=Cg;Go.toDataView=_.Bg;Go.toInt32Array=_.Ag;Go.toUint32Array=zg;Go.toUint16Array=yg;Go.toUint8Array=_.I;Go.equal=wg;var Fg=new _.O("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.Eg);_.z("clpp.utils.strings.fromBytesAutoDetect",_.Hg);_.z("clpp.utils.strings.toUtf8",_.Ig);_.z("clpp.utils.strings.toUtf16",_.Jg);_.z("clpp.utils.strings.toByteArray",_.Kg);_.z("clpp.utils.strings.startsWith",_.Lg);_.z("clpp.utils.strings.endsWith",_.Mg);_.z("clpp.utils.strings.bitrateToString",_.Pg);
268
+ _.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)))});
269
+ _.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 Qg=document.createElement("span");var Ho=class{};_.z("clpp.utils.Uint8ArrayUtils",Ho);Ho.toStandardBase64=_.Sg;Ho.concat=_.$g;Ho.equal=_.Zg;Ho.toHex=_.Yg;Ho.fromHex=_.Vg;Ho.fromBase64=_.Ug;Ho.toBase64Url=_.Tg;_.bh=class{constructor(a){this.f=a;this.a=0}};var fh=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",fh);_.z("clpp.net.makeRequest",_.jh);_.ih=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.ih});_.Mk=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(){}};_.Tl=class{constructor(a,b){this.P=a;this.w=b;this.a=!1}abort(){this.a=!0;return this.w()}Uc(a,b){const c=new _.Mk;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=oh(a,e,c):c.resolve(e)},e=>{b?d=oh(b,e,c):c.reject(e)});return new _.Tl(c,()=>d())}};_.Tl.aborted=function(){const a=Promise.reject(new _.H(_.G,7,7001));a.catch(()=>{});return new _.Tl(a,()=>Promise.resolve())};_.Tl.prototype.chain=_.Tl.prototype.Uc;_.Io=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)}};_.Em=class{constructor(){this.f=[];this.g=[];this.m=!1;this.j=new _.Io;this.a={};this.h=0;this.a.data=Wn;!window.fetch||!window.AbortController||_.bi(6)||_.ei()&&68<_.Bi().browserVersion.major?(this.a.http=En,this.a.https=En):(this.a.http=Rn,this.a.https=Rn)}kg(a){0<a?_.D("Rate limit set to "+a+"bps"):_.D("Rate limit disabled");this.h=a}release(){return this.j.destroy()}destroy(){this.m=!0;this.f=[];this.g=[];return this.j.destroy()}me(a){this.f.push(a)}Rc(a){this.g.push(a)}Te(a){this.f=this.f.filter(b=>
270
+ b!==a)}jd(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.m)return new Jo(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 _.Mk;try{for(const f of a.requestModifiers)d=d.then(g=>
271
+ {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 _.cg(f.uris[f.uriIndex]);var h=g.Ua;h||(h=location.protocol,h=h.slice(0,-1),dg(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 Jo(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.G,1,7001,
272
+ 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);});_.qh(this.j,e);c.resolve(a);return e}catch(f){return new Jo(Promise.reject(f))}}};_.z("clpp.net.NetworkEngine",_.Em);_.Em.prototype.fetch=_.Em.prototype.fetch;
273
+ _.Em.prototype.removeResponseModifier=_.Em.prototype.jd;_.Em.prototype.removeRequestModifier=_.Em.prototype.Te;_.Em.prototype.addResponseModifier=_.Em.prototype.Rc;_.Em.prototype.addRequestModifier=_.Em.prototype.me;_.Em.prototype.setRateLimit=_.Em.prototype.kg;var uh;_.xh=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}
274
+ renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.xh);_.xh.prototype.toString=_.xh.prototype.toString;_.Fh=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.drm=this.drmInfo=this.codec=this.Ac=this.bandwidth=this.height=this.width=null}};_.z("clpp.Rendition",_.Fh);_.wh=1;_.L=_.w;_.K=_.p;_.J=_.v;uh=_.td;_.Ko={VIDEO:_.L,AUDIO:_.K,TEXT:_.J,METADATA:uh};_.xh.Type=_.Ko;_.Jj=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;
275
+ _.Lg(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.g=b.hash}};_.z("clpp.utils.url.queryString",_.Ah);var Lo=class{constructor(a){this.g=a;this.a=new _.O("clpp.native.hls.HlsMetadataParser");this.f=ag(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 Dh(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 Hh(c,d,
276
+ 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 Jh(d);e.uc=f}catch(f){c.a.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.Rh=[];_.P=class{rd(){return!0}Df(a){return this.getVideoTracks().find(b=>_.rf(b,a,a&&Object.keys(a)))}zf(a){return this.getAudioTracks().find(b=>_.rf(b,a,a&&Object.keys(a)))}Bf(a){return this.ja().find(b=>_.rf(b,a,a&&Object.keys(a)))}Cf(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.rf(b,a,a&&Object.keys(a)))}yf(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.rf(b,a,a&&Object.keys(a)))}Af(a){return this.ja().flatMap(b=>b.renditions).find(b=>_.rf(b,a,a&&Object.keys(a)))}};
277
+ _.z("clpp.TrackManager",_.P);_.P.prototype.isAbrEnabled=_.P.prototype.la;_.P.prototype.addTextTrack=_.P.prototype.addTextTrack;_.P.prototype.findTextRendition=_.P.prototype.Af;_.P.prototype.findAudioRendition=_.P.prototype.yf;_.P.prototype.findVideoRendition=_.P.prototype.Cf;_.P.prototype.findTextTrack=_.P.prototype.Bf;_.P.prototype.findAudioTrack=_.P.prototype.zf;_.P.prototype.findVideoTrack=_.P.prototype.Df;_.P.prototype.setTextRendition=_.P.prototype.lb;_.P.prototype.setAudioRendition=_.P.prototype.kb;
278
+ _.P.prototype.setVideoRendition=_.P.prototype.Va;_.P.prototype.setTextTrack=_.P.prototype.Da;_.P.prototype.setAudioTrack=_.P.prototype.ta;_.P.prototype.setVideoTrack=_.P.prototype.Wa;_.P.prototype.getTextTrack=_.P.prototype.oa;_.P.prototype.getAudioTrack=_.P.prototype.na;_.P.prototype.getVideoTrack=_.P.prototype.Ia;_.P.prototype.getLoadingTextRendition=_.P.prototype.fb;_.P.prototype.getLoadingAudioRendition=_.P.prototype.eb;_.P.prototype.getLoadingVideoRendition=_.P.prototype.Ra;
279
+ _.P.prototype.getTextRendition=_.P.prototype.Ga;_.P.prototype.getAudioRendition=_.P.prototype.Fa;_.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.rd;_.Mo=new Map;_.No=(new Map).set(_.Dc,_.Dc).set("frameRate","framerate").set("bandwidth","bitrate").set(_.We,_.We).set(_.ad,_.ad).set("channelsCount","channels");_.Oo=class{constructor(a){this.f=a;this.a=null}da(a){return Vh(this,a,!1)}Xa(a){return Vh(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Yh=class{constructor(a){this.f=a;this.a=null}ee(){this.stop();this.f();return this}da(a){this.stop();this.a=(new _.Oo(()=>{this.f()})).da(a);return this}Xa(a){this.stop();this.a=(new _.Oo(()=>{this.f()})).Xa(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.Yh);_.Yh.prototype.stop=_.Yh.prototype.stop;_.Yh.prototype.tickEvery=_.Yh.prototype.Xa;_.Yh.prototype.tickAfter=_.Yh.prototype.da;_.Yh.prototype.tickNow=_.Yh.prototype.ee;var Po=class{};_.z(Cc,Po);Po.getInfo=_.Bi;
280
+ var Xh=null,Wh=null,oi=new _.O(Cc),si="android",ri="ios",zi="linux",ti="osx",wi="windows",xi="tizen",yi="webos",qi=ye,Ai=ye,ji={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,
281
281
  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,
282
282
  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},
283
- 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 R=class extends _.Q{constructor(){super();this.a=new _.P("clpp.native.TrackManager");this.l=null;this.g=new _.jo;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,_.J);this.S=this.F.bind(this,_.J);this.R=this.C.bind(this,_.J);this.U=this.B.bind(this,_.L);this.Y=this.F.bind(this,_.L);this.W=this.C.bind(this,_.L);this.J=this.B.bind(this,_.K);this.L=this.F.bind(this,_.K);this.K=this.C.bind(this,_.K);this.j=null}nd(){return!_.li()}B(a,
284
- b){const c=this;return _.y(function*(){if(b){var d=b.track;if(d){var e=c.h.find(h=>Ci(h,d,a));if(e)c.a.warn("Track from event already exists",d,e);else{var f=yh(a,d),g=Di(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=>Ci(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`),
285
- 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 _.Fh(f.id,f));c.h.push(f);const h=c.l.getConfiguration().safari;Fi(c,a,h)?yield Gi(c,f,h):Hi(c,a,h)&&(yield Ii(c,f,h));c.a.debug(a+" Track added",f);c.l.trigger(new _.F(_.Ro));const k=Ji(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",
286
- h)}}}else c.a.warn(Pa)}else c.a.warn(Oa)})}F(a,b){if(b){var c=b.track;c?a===_.J&&c.kind!==_.td&&(b=this.h.find(d=>Ci(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.f.get(a)||null)===b&&(this.f.set(a,null),Ki(this)),this.a.debug(a+" Track removed, id: ",b.id)):this.a.warn(Pa)}else this.a.warn(Oa)}C(a,b){this.a.debug(a+" Track changed",b);a===_.J&&Ki(this);const c=Mi(this,a);if(c)for(let d=0;d<c.length;++d)if(Di(c[d])){if(b=this.h.find(e=>Ci(e,c[d],a)))this.f.set(a,b),this.a.debug("Track change detected, id:",
287
- b.id),b===this.m.get(a)&&this.m.set(a,null),a===_.K?this.l.trigger(new _.F(_.Pi)):a===_.J&&this.l.trigger(new _.F(_.Qi));break}}initialize(a){this.l=a;this.j=new Mo(a.getNetworkEngine())}load(){this.A=!1;var a=Li(this,_.J);a&&(this.g.on(a,_.Mb,this.N),this.g.on(a,$d,this.S),this.g.on(a,vc,this.R));if(a=Li(this,_.K))this.g.on(a,_.Mb,this.J),this.g.on(a,$d,this.L),this.g.on(a,vc,this.K);if(a=Li(this,_.L))this.g.on(a,_.Mb,this.U),this.g.on(a,$d,this.Y),this.g.on(a,vc,this.W);this.g.one(this.l,oc,this.H.bind(this))}release(){this.A=
288
- !0;this.h=[];this.o={};this.f.clear();this.m.clear();this.g.release()}destroy(){this.release();this.l=null}getVideoTracks(){return Ji(this,_.L)}getAudioTracks(){return Ji(this,_.K)}ja(){return Ji(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 Ni(this,_.K)}Ea(){return Ni(this,_.J)}Pa(){return Oi(this,_.L)}bb(){return Oi(this,_.K)}cb(){return Oi(this,
289
- _.J)}Ga(){return this.f.get(_.L)||null}na(){return this.f.get(_.K)||null}oa(){return this.f.get(_.J)||null}Ua(a){Ri(this,_.L,a)}sa(a){Ri(this,_.K,a)}Ba(a){Ri(this,_.J,a)}Ta(a){Ri(this,_.L,a&&a.track)}ib(a){Ri(this,_.K,a&&a.track)}jb(a){Ri(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;Si(b,a,c)}else yield Ti(b,a)})}la(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;
290
- return _.y(function*(){const b=a.l.getConfiguration();Vi(a,_.K,b.preferredAudioLanguage);if(!Mi(a,_.J).some(c=>Di(c))){const c=Li(a,_.J);yield new Promise(d=>{a.g.one(c,vc,d);(new _.Yh(d)).ca(1)})}a.A||Vi(a,_.J,b.preferredTextLanguage)})}};R.prototype.isAbrEnabled=R.prototype.la;R.prototype.addTextTrack=R.prototype.addTextTrack;R.prototype.setTextRendition=R.prototype.jb;R.prototype.setAudioRendition=R.prototype.ib;R.prototype.setVideoRendition=R.prototype.Ta;R.prototype.setTextTrack=R.prototype.Ba;
291
- R.prototype.setAudioTrack=R.prototype.sa;R.prototype.setVideoTrack=R.prototype.Ua;R.prototype.getTextTrack=R.prototype.oa;R.prototype.getAudioTrack=R.prototype.na;R.prototype.getVideoTrack=R.prototype.Ga;R.prototype.getLoadingTextRendition=R.prototype.cb;R.prototype.getLoadingAudioRendition=R.prototype.bb;R.prototype.getLoadingVideoRendition=R.prototype.Pa;R.prototype.getTextRendition=R.prototype.Ea;R.prototype.getAudioRendition=R.prototype.Da;R.prototype.getVideoRendition=R.prototype.ia;
292
- R.prototype.getTextTracks=R.prototype.ja;R.prototype.getAudioTracks=R.prototype.getAudioTracks;R.prototype.getVideoTracks=R.prototype.getVideoTracks;R.prototype.canSelectVideoTracks=R.prototype.nd;_.So=class{constructor(a,b="total"){this.length=(this.f=a)?a.length:0;this.a=[];this.type=b}start(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(kb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(kb);}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-
293
- 1)}Xb(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=
294
- "";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.A("clpp.BufferInfo",_.So);_.So.prototype.bufferedAheadOf=_.So.prototype.Ca;_.So.prototype.isBuffered=_.So.prototype.Xb;_.So.prototype.bufferEnd=_.So.prototype.ya;_.So.prototype.bufferStart=_.So.prototype.mb;_.So.prototype.end=_.So.prototype.end;_.So.prototype.start=_.So.prototype.start;_.To=class{constructor(){this.Dc=new ho(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)}};
295
- _.To.prototype.off=_.To.prototype.off;_.To.prototype.one=_.To.prototype.one;_.To.prototype.on=_.To.prototype.on;_.To.prototype.removeEventListener=_.To.prototype.removeEventListener;_.To.prototype.addEventListener=_.To.prototype.addEventListener;_.A("clpp.events.ERROR",_.$c);_.A("clpp.events.LOADEDMETADATA",_.od);_.A("clpp.events.BUFFERING_ENDED",_.ic);_.A("clpp.events.BUFFERING_STARTED",_.jc);_.A("clpp.events.STATE_CHANGED",_.je);_.Pi="audiotrackchanged";_.A("clpp.events.AUDIO_TRACK_CHANGED",_.Pi);_.Qi="texttrackchanged";_.A("clpp.events.TEXT_TRACK_CHANGED",_.Qi);_.A("clpp.events.VIDEO_TRACK_CHANGED",_.Le);_.A("clpp.events.BITRATE_CHANGED",_.gc);_.Ro="tracksadded";_.A("clpp.events.TRACKS_ADDED",_.Ro);_.A("clpp.events.LOAD_START",pd);
296
- _.A("clpp.events.RELEASING",_.Zd);_.A("clpp.events.RELEASED",Yd);_.A("clpp.events.DESTROYING","destroying");_.A("clpp.events.DESTROYED","destroyed");_.A("clpp.events.VIDEO_BUFFER_CHANGED",_.Ke);_.A("clpp.events.AUDIO_BUFFER_CHANGED",_.ec);_.A("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.A("clpp.events.DRM_SESSION_UPDATE",_.Uc);_.A("clpp.events.DRM_SESSION_PERSISTED",_.Tc);_.A("clpp.events.DRM_RENEWAL_STARTED",Sc);_.A("clpp.events.DRM_EXPIRATION_UPDATE",_.Rc);
297
- _.A("clpp.events.AUTOPLAY_NOT_ALLOWED",_.fc);_.A("clpp.events.PLAY",_.Rd);_.A("clpp.events.SEEKING",_.ee);_.A("clpp.events.SEEKED",_.de);_.A("clpp.events.USER_SEEKING",_.Ce);_.A("clpp.events.USER_SEEKED",_.Be);_.Bl={SEEKING:1,NO_DATA:2};_.A("clpp.events.BufferingReasons",_.Bl);_.A("clpp.events.ADS_TIMELINE_CHANGED",_.Nb);_.A("clpp.events.AD_LOADED",_.Db);_.A("clpp.events.AD_BREAK_STARTED",_.wb);_.A("clpp.events.AD_STARTED",_.Jb);_.A("clpp.events.AD_BUFFERING",_.yb);_.A("clpp.events.AD_PROGRESS",_.Gb);
298
- _.A("clpp.events.AD_FIRST_QUARTILE",_.Bb);_.A("clpp.events.AD_MIDPOINT",_.Eb);_.A("clpp.events.AD_THIRD_QUARTILE",_.Lb);_.A("clpp.events.AD_PAUSED",_.Fb);_.A("clpp.events.AD_RESUMED",_.Hb);_.A("clpp.events.AD_SKIPPED",_.Ib);_.A("clpp.events.AD_CLICKED",_.zb);_.A("clpp.events.AD_IMPRESSION",_.Cb);_.A("clpp.events.AD_COMPLETED",_.Ab);_.A("clpp.events.AD_STOPPED",_.Kb);_.A("clpp.events.AD_BREAK_STOPPED",_.xb);_.A("clpp.events.CASTING_STARTED",_.pc);_.A("clpp.events.CASTING_ENDED","castingended");
299
- _.A("clpp.events.CAST_STATUS_CHANGED",_.qc);_.A("clpp.events.AIRPLAY_STATUS_CHANGED",_.Rb);_.A("clpp.events.AIRPLAY_CASTING_STARTED",_.Pb);_.A("clpp.events.AIRPLAY_CASTING_ENDED",_.Ob);_.Rf="timeline-cue-added";_.A("clpp.events.TIMELINE_CUE_ADDED",_.Rf);_.Tf="timeline-cue-enter";_.A("clpp.events.TIMELINE_CUE_ENTER",_.Tf);_.Uf="timeline-cue-exit";_.A("clpp.events.TIMELINE_CUE_EXIT",_.Uf);_.A("clpp.events.MPD_TYPE_CHANGED",_.yd);_.A("clpp.events.VIMOND_RESPONSE",_.Me);
300
- _.A("clpp.events.PLAYLIST_ITEM_CHANGED",_.Td);_.A("clpp.events.PLAYLIST_MODIFIED",_.Ud);_.A("clpp.events.CDN_SWITCH_SUCCESS",_.rc);_.A("clpp.events.ONLINE_STATUS_CHANGED",Hd);var Wi=["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 Uo=class{};_.A("clpp.utils.PlayerConfiguration",Uo);Uo.create=_.bj;var Vo=["abort",nc,oc,Wc,"emptied",Xc,_.Zc,_.$c,"interruptbegin","interruptend",_.nd,_.od,pd,"mozaudioavailable",_.Ld,_.Rd,_.Sd,_.Vd,_.Xd,_.de,_.ee,he,"suspend",_.ue,"volumechange",_.Pe,_.Qe,_.be,Ve,Ue,Se,Te];_.Wo=class extends _.To{constructor(a){super();this.log=new _.P(a);this.configuration=this.jc=_.$i();this.o=this.B=null;this.$c=this.zd=!1;this.Ye=new _.P("clpp.video.events");this.Ob=null;this.nc=-1;this.df=this.bf.bind(this);this.Ce=new _.Em;this.J=new _.jo;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 Vo)this.J.on(a,c,this.df,c!==_.$c);
301
- this.Ob||(this.Ob=this.Je());this.Ob.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 _.If[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=
302
- {name:b.name||"",message:b.message||"",stack:b.stack||""};Xi(c)?(this.trigger(new _.F(_.fc)),this.log.warn(_.ia)):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!==_.zl&&c!==_.wl&&c!==_.Hl&&c!==_.Gl)b();else if(this.B.getMedia().pause(),this.getState()===_.Hl)this.J.one(this,_.je,()=>{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=
303
- a}setCdnErrorCallback(a){this.ga=a}rc(){return this.lc}getSurface(){return this.B}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.So(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!"),
304
- 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(_.Ce));this.J.on(c,_.de,h);this.J.on(c,_.ue,h);this.J.on(c,_.Vd,h);this.log.info("Seeking to "+a+". Delta "+d);this.$c=this.zd=!0;c.currentTime=a},h=l=>{const m=this.getPosition(),n=.1>=Math.abs(a-m);var q=.25<m-a;const t=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,u=l.type===_.de,x=l.type===_.Vd,z=l.type===_.ue,
305
- E=x&&t;q=u||n&&E||z&&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:",z,"Progress:",x,"ReadyState:",t,"Progress Ready:",E);q?(this.$c=this.zd=!1,this.J.off(c,_.de,h),this.J.off(c,_.ue,h),this.J.off(c,_.Vd,h),this.We(),this.trigger(new _.F(_.Be)),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();
283
+ 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 _.jo;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,_.J);this.T=this.F.bind(this,_.J);this.R=this.C.bind(this,_.J);this.V=this.B.bind(this,_.L);this.Y=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}rd(){return!_.li()}B(a,
284
+ b){const c=this;return _.y(function*(){if(b){var d=b.track;if(d){var e=b.target,f=c.h.find(l=>Ci(l,d,a));if(f)c.a.warn("Track from event already exists",d,f);else{var g=yh(a,d),h=Di(d);if(a===_.J){if(d.kind===_.td)return;var k;void 0!==d.id?k=c.o[d.id]:k=Object.values(c.o).find(l=>Ci(g,l,a));g.kind&&"captions"===g.kind&&(g.mimeType=_.Rb);k&&(g.src=k.url,g.mimeType=k.mimeType)}else if(f=c.h.find(l=>l.type===a&&_.rf(l,g,["kind","label","language"]))){f.id=d.id;h&&(c.a.debug(`Setting native ${a} track active`),
285
+ c.f.set(a,f));c.a.debug("Track from event seems to already exists, flipped native track to",d);return}try{g.renditions.push(new _.Fh(g.id,g));c.h.push(g);const l=c.l.getConfiguration().safari;Fi(c,a,l)?yield Gi(c,g,l):Hi(c,a,l)&&(yield Ii(c,g,l));c.a.debug(a+" Track added",g);c.l.trigger(new _.F(_.Qo));const m=Ji(c,a).length;f=a===_.L;k=a===_.K||f;const n=!(!e||!e.length),q=e&&e.length||0;e=()=>{c.a.debug(`Setting native ${a} track active. `+`Native track active: ${h}. `+`Number of tracks: ${m}`,
286
+ d);c.f.set(a,g)};h?e():1===m&&k&&(f?e():n&&1!==q||e())}catch(l){c.a.error("Error while converting track data",l)}}}else c.a.warn(Qa)}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=>Ci(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.f.get(a)||null)===b&&(this.f.set(a,null),Ki(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===_.J&&Ki(this);const c=Mi(this,a);if(c)for(let d=
287
+ 0;d<c.length;++d)if(Di(c[d])){if(b=this.h.find(e=>Ci(e,c[d],a)))this.f.set(a,b),this.a.debug("Track change detected, id:",b.id),b===this.m.get(a)&&this.m.set(a,null),a===_.K?this.l.trigger(new _.F(_.Pi)):a===_.J&&this.l.trigger(new _.F(_.Qi));break}}initialize(a){this.l=a;this.j=new Lo(a.getNetworkEngine())}load(){this.A=!1;var a=Li(this,_.J);a&&(this.g.on(a,_.Kb,this.N),this.g.on(a,$d,this.T),this.g.on(a,uc,this.R));if(a=Li(this,_.K))this.g.on(a,_.Kb,this.J),this.g.on(a,$d,this.M),this.g.on(a,uc,
288
+ this.K);if(a=Li(this,_.L))this.g.on(a,_.Kb,this.V),this.g.on(a,$d,this.Y),this.g.on(a,uc,this.W);this.g.one(this.l,nc,this.H.bind(this))}release(){this.A=!0;this.h=[];this.o={};this.f.clear();this.m.clear();this.g.release()}destroy(){this.release();this.l=null}getVideoTracks(){return Ji(this,_.L)}getAudioTracks(){return Ji(this,_.K)}ja(){return Ji(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);
289
+ if(b)return b}return a.renditions[0]||null}Fa(){return Ni(this,_.K)}Ga(){return Ni(this,_.J)}Ra(){return Oi(this,_.L)}eb(){return Oi(this,_.K)}fb(){return Oi(this,_.J)}Ia(){return this.f.get(_.L)||null}na(){return this.f.get(_.K)||null}oa(){return this.f.get(_.J)||null}Wa(a){Ri(this,_.L,a)}ta(a){Ri(this,_.K,a)}Da(a){Ri(this,_.J,a)}Va(a){Ri(this,_.L,a&&a.track)}kb(a){Ri(this,_.K,a&&a.track)}lb(a){Ri(this,_.J,a&&a.track)}addTextTrack(a){const b=this;return _.y(function*(){if(a.mimeType.match(/text\/vtt/)){const c=
290
+ "External_"+`${b.G++}`;b.o[c]=a;Si(b,a,c)}else yield Ti(b,a)})}la(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.y(function*(){const b=a.l.getConfiguration();Vi(a,_.K,b.preferredAudioLanguage);if(!Mi(a,_.J).some(c=>Di(c))){const c=Li(a,_.J);yield new Promise(d=>{a.g.one(c,uc,d);(new _.Yh(d)).da(1)})}a.A||Vi(a,_.J,b.preferredTextLanguage)})}};Q.prototype.isAbrEnabled=Q.prototype.la;Q.prototype.addTextTrack=Q.prototype.addTextTrack;
291
+ Q.prototype.setTextRendition=Q.prototype.lb;Q.prototype.setAudioRendition=Q.prototype.kb;Q.prototype.setVideoRendition=Q.prototype.Va;Q.prototype.setTextTrack=Q.prototype.Da;Q.prototype.setAudioTrack=Q.prototype.ta;Q.prototype.setVideoTrack=Q.prototype.Wa;Q.prototype.getTextTrack=Q.prototype.oa;Q.prototype.getAudioTrack=Q.prototype.na;Q.prototype.getVideoTrack=Q.prototype.Ia;Q.prototype.getLoadingTextRendition=Q.prototype.fb;Q.prototype.getLoadingAudioRendition=Q.prototype.eb;
292
+ Q.prototype.getLoadingVideoRendition=Q.prototype.Ra;Q.prototype.getTextRendition=Q.prototype.Ga;Q.prototype.getAudioRendition=Q.prototype.Fa;Q.prototype.getVideoRendition=Q.prototype.ia;Q.prototype.getTextTracks=Q.prototype.ja;Q.prototype.getAudioTracks=Q.prototype.getAudioTracks;Q.prototype.getVideoTracks=Q.prototype.getVideoTracks;Q.prototype.canSelectVideoTracks=Q.prototype.rd;_.Ro=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(jb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(jb);}ob(){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)}Aa(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
293
+ 1)}Zb(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}Ea(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.Aa(),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=
294
+ "";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",_.Ro);_.Ro.prototype.bufferedAheadOf=_.Ro.prototype.Ea;_.Ro.prototype.isBuffered=_.Ro.prototype.Zb;_.Ro.prototype.bufferEnd=_.Ro.prototype.Aa;_.Ro.prototype.bufferStart=_.Ro.prototype.ob;_.Ro.prototype.end=_.Ro.prototype.end;_.Ro.prototype.start=_.Ro.prototype.start;_.So=class{constructor(){this.Fc=new ho(this);this.Dc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Fc.on(a,b,c)}one(a,b,c){return this.Fc.one(a,b,c)}off(a,b){return this.Fc.off(a,b)}addDelegate(a){a&&(0<=this.Dc.indexOf(a)||this.Dc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}removeDelegate(a){a&&(a=this.Dc.indexOf(a),0<=a&&this.Dc.splice(a,1))}trigger(a){this.Fc.trigger(a);for(const b of this.Dc)b.dispatchEvent(a)}};
295
+ _.So.prototype.off=_.So.prototype.off;_.So.prototype.one=_.So.prototype.one;_.So.prototype.on=_.So.prototype.on;_.So.prototype.removeEventListener=_.So.prototype.removeEventListener;_.So.prototype.addEventListener=_.So.prototype.addEventListener;_.z("clpp.events.ERROR",_.Yc);_.z("clpp.events.LOADEDMETADATA",_.od);_.z("clpp.events.BUFFERING_ENDED",_.hc);_.z("clpp.events.BUFFERING_STARTED",_.ic);_.z("clpp.events.STATE_CHANGED",_.je);_.Pi="audiotrackchanged";_.z("clpp.events.AUDIO_TRACK_CHANGED",_.Pi);_.Qi="texttrackchanged";_.z("clpp.events.TEXT_TRACK_CHANGED",_.Qi);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.Le);_.z("clpp.events.BITRATE_CHANGED",_.ec);_.Qo="tracksadded";_.z("clpp.events.TRACKS_ADDED",_.Qo);_.z("clpp.events.LOAD_START",pd);
296
+ _.z("clpp.events.RELEASING",_.Zd);_.z("clpp.events.RELEASED",Yd);_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.Ke);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.cc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_UPDATE",_.Sc);_.z("clpp.events.DRM_SESSION_PERSISTED",_.Rc);_.z("clpp.events.DRM_RENEWAL_STARTED",Qc);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Pc);
297
+ _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.dc);_.z("clpp.events.PLAY",_.Rd);_.z("clpp.events.SEEKING",_.ee);_.z("clpp.events.SEEKED",_.de);_.z("clpp.events.USER_SEEKING",_.Ce);_.z("clpp.events.USER_SEEKED",_.Be);_.Bl={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.Bl);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.Lb);_.z("clpp.events.AD_LOADED",_.Bb);_.z("clpp.events.AD_BREAK_STARTED",_.ub);_.z("clpp.events.AD_STARTED",_.Hb);_.z("clpp.events.AD_BUFFERING",_.wb);_.z("clpp.events.AD_PROGRESS",_.Eb);
298
+ _.z("clpp.events.AD_FIRST_QUARTILE",_.zb);_.z("clpp.events.AD_MIDPOINT",_.Cb);_.z("clpp.events.AD_THIRD_QUARTILE",_.Jb);_.z("clpp.events.AD_PAUSED",_.Db);_.z("clpp.events.AD_RESUMED",_.Fb);_.z("clpp.events.AD_SKIPPED",_.Gb);_.z("clpp.events.AD_CLICKED",_.xb);_.z("clpp.events.AD_IMPRESSION",_.Ab);_.z("clpp.events.AD_COMPLETED",_.yb);_.z("clpp.events.AD_STOPPED",_.Ib);_.z("clpp.events.AD_BREAK_STOPPED",_.vb);_.z("clpp.events.CASTING_STARTED",_.oc);_.z("clpp.events.CASTING_ENDED","castingended");
299
+ _.z("clpp.events.CAST_STATUS_CHANGED",_.pc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.Qb);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.Ob);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.Mb);_.Rf="timeline-cue-added";_.z("clpp.events.TIMELINE_CUE_ADDED",_.Rf);_.Tf="timeline-cue-enter";_.z("clpp.events.TIMELINE_CUE_ENTER",_.Tf);_.Uf="timeline-cue-exit";_.z("clpp.events.TIMELINE_CUE_EXIT",_.Uf);_.z("clpp.events.MPD_TYPE_CHANGED",_.yd);_.z("clpp.events.VIMOND_RESPONSE",_.Me);
300
+ _.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.Td);_.z("clpp.events.PLAYLIST_MODIFIED",_.Ud);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.qc);_.z("clpp.events.ONLINE_STATUS_CHANGED",Hd);var Wi=["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 To=class{};_.z("clpp.utils.PlayerConfiguration",To);To.create=_.bj;var Uo=["abort",mc,nc,Uc,"emptied",Vc,_.Xc,_.Yc,"interruptbegin","interruptend",_.nd,_.od,pd,"mozaudioavailable",_.Ld,_.Rd,_.Sd,_.Vd,_.Xd,_.de,_.ee,he,"suspend",_.ue,"volumechange",_.Pe,_.Qe,_.be,Ve,Ue,Se,Te];_.Vo=class extends _.So{constructor(a){super();this.log=new _.O(a);this.configuration=this.kc=_.$i();this.o=this.B=null;this.cd=this.Ed=!1;this.df=new _.O("clpp.video.events");this.Qb=null;this.oc=-1;this.jf=this.gf.bind(this);this.He=new _.Em;this.J=new _.jo;this.ga=this.mc=this.I=null}init(a,b){this.configuration=this.kc=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 Uo)this.J.on(a,c,this.jf,c!==_.Yc);
301
+ this.Qb||(this.Qb=this.Oe());this.Qb.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 _.If[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=
302
+ {name:b.name||"",message:b.message||"",stack:b.stack||""};Xi(c)?(this.trigger(new _.F(_.dc)),this.log.warn(_.ia)):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!==_.zl&&c!==_.wl&&c!==_.Hl&&c!==_.Gl)b();else if(this.B.getMedia().pause(),this.getState()===_.Hl)this.J.one(this,_.je,()=>{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.mc=
303
+ a}setCdnErrorCallback(a){this.ga=a}sc(){return this.mc}getSurface(){return this.B}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.Ro(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!"),
304
+ 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(_.Ce));this.J.on(c,_.de,h);this.J.on(c,_.ue,h);this.J.on(c,_.Vd,h);this.log.info("Seeking to "+a+". Delta "+d);this.cd=this.Ed=!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===_.de,x=l.type===_.Vd,A=l.type===_.ue,
305
+ 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.cd=this.Ed=!1,this.J.off(c,_.de,h),this.J.off(c,_.ue,h),this.J.off(c,_.Vd,h),this.bf(),this.trigger(new _.F(_.Be)),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();
306
306
  else this.J.one(c,_.od,g)};this.getState()===_.El?(this.log.debug("Player is in IDLE state. Postpone seek."),this.J.one(this,_.je,()=>{switch(this.getState()){case _.zl:case _.Hl:case _.Gl: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();
307
307
  b?_.qf(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
308
- 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===_.hc&&(b.muted=a)}getDuration(){return this.o?this.B.getMedia().duration:-1}getTrackManager(){return this.Ob}getPlaybackRate(){const a=this.B.getMedia();return a&&a.playbackRate||1}setPlaybackRate(a){const b=this.B.getMedia();
309
- 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.Ce}setNetworkEngine(a){this.Ce=a}getTextDisplayer(){return this.I}getTimelineCues(){return[]}resetAbr(){}bf(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===_.ue||a.type===_.Vd)this.Ye.debug(d);
310
- else{let e="";switch(a.type){case _.Xd:e=`Rate: ${this.getPlaybackRate()}`;break;case Wc:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Rd:case _.Sd:case "suspend":case _.Pe:case he:case _.ee:case _.de:case _.ue:case _.Vd:case nc:case oc:b=this.getBufferInfo().Ca(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.be:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+
311
- e);this.Ye.info(d)}a.type!==_.$c&&this.trigger(new _.F(a.type,{detail:a}))}We(){}};_.Wo.prototype.getTextDisplayer=_.Wo.prototype.getTextDisplayer;_.Wo.prototype.setNetworkEngine=_.Wo.prototype.setNetworkEngine;_.Wo.prototype.getNetworkEngine=_.Wo.prototype.getNetworkEngine;var fj;fj=new _.P("clpp.Components");_.dj=new Map;var Xo=class{constructor(){this.a=this.f=null;this.g=new _.P("clpp.drm.csl")}release(){this.a=this.f=null}};_.A("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.db,SW_SECURE_DECODE:_.eb,HW_SECURE_CRYPTO:Ca,HW_SECURE_DECODE:Da,HW_SECURE_ALL:"HW_SECURE_ALL"});_.A("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.A("clpp.drm.KeySystem",{NONE:_.Ad,CLEAR_KEY:_.Jd,WIDEVINE:_.Jc,PLAYREADY:_.Ic,FAIRPLAY:_.Hc,PRIMETIME:_.Gc});_.lj={};_.A("clpp.drm.registerDrmEnvironment",_.mj);var pj={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,
308
+ 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===_.fc&&(b.muted=a)}getDuration(){return this.o?this.B.getMedia().duration:-1}getTrackManager(){return this.Qb}getPlaybackRate(){const a=this.B.getMedia();return a&&a.playbackRate||1}setPlaybackRate(a){const b=this.B.getMedia();
309
+ void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.oc=a}getSourceIndex(){return this.oc}getLoadedSource(){return this.o&&-1!==this.oc?this.o[this.oc]:null}getPeriods(){return[]}getNetworkEngine(){return this.He}setNetworkEngine(a){this.He=a}getTextDisplayer(){return this.I}getTimelineCues(){return[]}resetAbr(){}gf(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===_.ue||a.type===_.Vd)this.df.debug(d);
310
+ else{let e="";switch(a.type){case _.Xd:e=`Rate: ${this.getPlaybackRate()}`;break;case Uc:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Rd:case _.Sd:case "suspend":case _.Pe:case he:case _.ee:case _.de:case _.ue:case _.Vd:case mc:case nc:b=this.getBufferInfo().Ea(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.be:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+
311
+ e);this.df.info(d)}a.type!==_.Yc&&this.trigger(new _.F(a.type,{detail:a}))}bf(){}};_.Vo.prototype.getTextDisplayer=_.Vo.prototype.getTextDisplayer;_.Vo.prototype.setNetworkEngine=_.Vo.prototype.setNetworkEngine;_.Vo.prototype.getNetworkEngine=_.Vo.prototype.getNetworkEngine;var fj;fj=new _.O("clpp.Components");_.dj=new Map;var Wo=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:_.cb,SW_SECURE_DECODE:_.db,HW_SECURE_CRYPTO:Ca,HW_SECURE_DECODE:Da,HW_SECURE_ALL:"HW_SECURE_ALL"});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.Ad,CLEAR_KEY:_.Jd,WIDEVINE:_.Ic,PLAYREADY:_.Hc,FAIRPLAY:_.Gc,PRIMETIME:_.Fc});_.lj={};_.z("clpp.drm.registerDrmEnvironment",_.mj);var pj={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
312
  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,
313
313
  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,
314
314
  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,
@@ -322,77 +322,77 @@ e);this.Ye.info(d)}a.type!==_.$c&&this.trigger(new _.F(a.type,{detail:a}))}We(){
322
322
  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,
323
323
  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,
324
324
  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,
325
- 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]};_.Yo=class{constructor(a){this.I=a;this.g={}}Ia(a,b){this.g[a]=b}};_.A("clpp.drm.DrmEnvironment",_.Yo);_.Yo.prototype.setDrmSystem=_.Yo.prototype.Ia;_.Nj=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}za(){return this.f.byteLength}seek(a){(0>a||a>this.f.byteLength)&&_.sj();this.a=a}};_.Nj.prototype.seek=_.Nj.prototype.seek;
326
- _.qk=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&&_.vj();this.a+=a}seek(a){if(0>a||a>this.f.byteLength)throw _.vj();this.a=a}};_.A("clpp.utils.dataview.DataViewReader",_.qk);_.Lj=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.P("clpp.mp4")}M(a,b){a=Cj(a);this.g[a]=Zo;this.f[a]=b;return this}Z(a,b){a=Cj(a);this.g[a]=$o;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.I(a);a=new _.qk(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.uj(a)&&!this.a;)this.fd(0,a,b)}fd(a,b,c){const d=b.getPosition();let e=_.N(b);var f=_.N(b);let g=!1;this.h.debug("Parsing MP4 box",_.Dj(f));switch(e){case 0:e=b.za()-d;break;case 1:e=_.Aj(b),g=!0}const h=
327
- this.f[f];if(h){let m=null;var k=null;this.g[f]==$o&&(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?_.Bj(b,l):new Uint8Array(0);b=new _.qk(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)}};_.A("clpp.utils.Mp4Parser",_.Lj);_.Lj.typeToString=_.Dj;
328
- _.Lj.allData=_.Gj;_.Lj.sampleDescription=_.Fj;_.Lj.children=_.Ej;_.Lj.prototype.parseNext=_.Lj.prototype.fd;_.Lj.prototype.parse=_.Lj.prototype.parse;_.Lj.prototype.stop=_.Lj.prototype.stop;_.Lj.prototype.fullBox=_.Lj.prototype.Z;_.Lj.prototype.box=_.Lj.prototype.M;_.Lj.headerSize=_.Hj;var Zo=0,$o=1;var ap=class{};_.A("clpp.utils.FairplayUtils",ap);ap.parseFairPlayResponse=_.Qj;ap.formatFairPlayRequest=_.Pj;ap.createFairplayPayload=Oj;ap.extractContentId=_.Kj;ap.extractExtXKeyUri=Ij;var Wj=new _.P("clpp.drm.DrmToday"),fk="PRODUCTION",gk="STAGING",hk="TEST",bp={PRODUCTION:fk,STAGING:gk,TEST:hk};_.A("clpp.drm.DrmToday.Environment",bp);_.A("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
325
+ 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]};_.Xo=class{constructor(a){this.I=a;this.g={}}Ja(a,b){this.g[a]=b}};_.z("clpp.drm.DrmEnvironment",_.Xo);_.Xo.prototype.setDrmSystem=_.Xo.prototype.Ja;_.Nj=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}Ba(){return this.f.byteLength}seek(a){(0>a||a>this.f.byteLength)&&_.sj();this.a=a}};_.Nj.prototype.seek=_.Nj.prototype.seek;
326
+ _.qk=class{constructor(a,b){this.f=a;this.g=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Ba(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.vj();this.a+=a}seek(a){if(0>a||a>this.f.byteLength)throw _.vj();this.a=a}};_.z("clpp.utils.dataview.DataViewReader",_.qk);_.Lj=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.O("clpp.mp4")}L(a,b){a=Cj(a);this.g[a]=Yo;this.f[a]=b;return this}Z(a,b){a=Cj(a);this.g[a]=Zo;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.I(a);a=new _.qk(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.uj(a)&&!this.a;)this.hd(0,a,b)}hd(a,b,c){const d=b.getPosition();let e=_.N(b);var f=_.N(b);let g=!1;this.h.debug("Parsing MP4 box",_.Dj(f));switch(e){case 0:e=b.Ba()-d;break;case 1:e=_.Aj(b),g=!0}const h=
327
+ this.f[f];if(h){let m=null;var k=null;this.g[f]==Zo&&(k=_.N(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Ba()&&(l=b.Ba());l-=b.getPosition();b=0<l?_.Bj(b,l):new Uint8Array(0);b=new _.qk(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.Ba()-b.getPosition()),b.skip(a)}};_.z("clpp.utils.Mp4Parser",_.Lj);_.Lj.typeToString=_.Dj;
328
+ _.Lj.allData=_.Gj;_.Lj.sampleDescription=_.Fj;_.Lj.children=_.Ej;_.Lj.prototype.parseNext=_.Lj.prototype.hd;_.Lj.prototype.parse=_.Lj.prototype.parse;_.Lj.prototype.stop=_.Lj.prototype.stop;_.Lj.prototype.fullBox=_.Lj.prototype.Z;_.Lj.prototype.box=_.Lj.prototype.L;_.Lj.headerSize=_.Hj;var Yo=0,Zo=1;var $o=class{};_.z("clpp.utils.FairplayUtils",$o);$o.parseFairPlayResponse=_.Qj;$o.formatFairPlayRequest=_.Pj;$o.createFairplayPayload=Oj;$o.extractContentId=_.Kj;$o.extractExtXKeyUri=Ij;var Wj=new _.O("clpp.drm.DrmToday"),fk="PRODUCTION",gk="STAGING",hk="TEST",ap={PRODUCTION:fk,STAGING:gk,TEST:hk};_.z("clpp.drm.DrmToday.Environment",ap);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
329
329
  var Sj="/license-proxy-widevine/cenc/",Tj="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Uj="/license-server-fairplay/",ik={"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",
330
- 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"},cp=[_.eb,void 0],dp=[_.db,void 0],ep=["3000"],fp=["2000"];
331
- for(const a of Object.keys(bp)){let b=ta;a!==fk&&(b+=`_${a}`);const c=new _.Yo(b);let d=null;switch(a){case fk:d=qj("V1_PROD");break;case gk:d=qj("V2");break;case hk:d=null}c.Ia(_.Jc,{licenseUrl:Vj(_.Jc,a),videoRobustness:cp,audioRobustness:dp,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Xj,licenseResponse:_.Yj}});c.Ia(_.Hc,{licenseUrl:Vj(_.Hc,a),certificateUrl:Rj(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.ak,licenseResponse:_.bk,
332
- extractContentId:_.ck,certificateRequest:_.dk}});c.Ia(_.Ic,{licenseUrl:Vj(_.Ic,a),videoRobustness:ep,audioRobustness:fp,modifiers:{licenseRequest:ek}});_.mj(c)};var gp=class{};_.A("clpp.drm.eme.EmeFactory",gp);var kk=[];gp.Apis={STANDARD:ab,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var ok,nk;ok=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];_.hp=class{constructor(a,b,c){this.h=new Uint8Array(a);this.a=b;this.f=c}};nk=class extends _.hp{};var Ok=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.Lj).Z("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=_.Wg(_.Bj(a.reader,16)),c=[];if(0<a.version){var d=_.N(a.reader);for(let e=0;e<d;++e){const f=_.Wg(_.Bj(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()!=
333
- a.reader.za()&&_.C("Mismatch between box size and data size!")}}};var Kk,ip;
334
- _.Ql=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=ip;this.w=new _.jo;this.K=new Xo;this.g=new Map;this.I=[];this.F=new _.Mk;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 _.Yh(()=>Ak(this));this.pa=!1;this.aa=new _.Mk;this.C=!1;this.U=[];this.ba=!1;this.N=0;this.a=new _.P("clpp.drm.DrmEngine");this.Y=(new _.Yh(()=>{Bk(this)})).Va(1);this.F.catch(()=>{});this.o=this.B=!1;this.L=
335
- null}destroy(){const a=this;return _.y(function*(){a.pa?yield a.aa:(a.pa=!0,yield Ck(a),a.aa.resolve())})}keySystem(){return this.f?_.uk(this.f.keySystem):""}getDrmInfo(){return this.f}ma(a){const b=this;return _.y(function*(){b.C&&b.H===Kk||(!b.h.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.ba?yield Tk(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==_.me){var g=f;
336
- f=e;e=g}if(tk(this.f.keySystem)&&16===f.byteLength&&_.$h()){g=_.Bg(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!==ke&&(c.loaded=!0);c&&c.Aa&&c.Aa.resolve();"expired"===e&&(d=!0);f=_.I(f);let h=_.Wg(f);"00"===h&&c&&c.keyId?h=c.keyId:this.f.keySystem.startsWith(_.Hc)&&16!==f.byteLength&&(h=Dg(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,
337
- 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)===ke&&(this.a.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.Kd))});for(a=0;a<this.f.initData.length;a++){const e=this.f.initData[a];e.keyId&&this.j.get(e.keyId)===ke&&_.Zg(e.initData,c.initData)&&(this.a.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,_.Kd))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.kb&&
338
- (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(()=>{}));bl(this)&&(this.F.resolve(),1!==this.g.size||d?this.S.ca(.5):Ak(this))}};Kk=0;ip=3;var jl=new Map,kl=new _.P("clpp.text");var jp=class{constructor(){this.a=null;this.f=[]}};var kp=class{constructor(){this.g=this.f=this.h=null;this.a=[]}};_.lp=class{constructor(){this.f=this.m=this.w=this.B=this.h=this.j=this.g=this.o=NaN;this.a=new jp;this.A=new kp}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:ol(this.a,_.Hl),pauseTime:ol(this.a,_.Gl),bufferingTime:ol(this.a,_.zl),stateHistory:pl(this.a),switchHistory:ql(this.A)}}};_.mp=class{constructor(a){this.f=a;this.a=void 0}value(){void 0==this.a&&(this.a=this.f());return this.a}};var sl=new _.mp(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.od],[HTMLMediaElement.HAVE_CURRENT_DATA,_.nd],[HTMLMediaElement.HAVE_FUTURE_DATA,nc],[HTMLMediaElement.HAVE_ENOUGH_DATA,oc]]));var op=class{constructor(a){this.g=new _.P("clpp.StateManager");this.l=a;this.a=new _.jo;this.f=_.El;this.A=_.np;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=_.li();this.C=!1;this.I=Date.now();xl(this)}Nb(a,b){this.l&&this.l.trigger(new _.F(a,{detail:b}))}getState(){return Al(this,"")}T(a){(a=a&&a.detail)&&a.severity&&a.severity===_.G&&vl(this,_.Dl)}destroy(){this.g.debug("Stop watching for video events for "+this.l.namespace());this.a.release()}};_.A("clpp.version",_.da);_.A("clpp.name",_.ma);_.Ui="application/x-mpegurl";_.A("clpp.Type",{DASH:_.Ub,HLS:_.Ui,SMOOTH_STREAMING:_.Zb,MP4:_.Je});_.Qf="scte35";_.Of=ye;_.A("clpp.TimelineCueType",{SCTE35:_.Qf,DASH_CALLBACK:_.zd,UNKNOWN:_.Of});_.A("clpp.utils.media.detectType",Il);var Ll=new _.P("clpp.sources");var pp=class extends _.Wo{constructor(){super(Cc);this.w=this.G=!1;this.j=this.A=this.m=this.a=this.h=null;this.g=new _.jo;this.F=this.C=this.f=this.H=null}init(a,b){super.init(a,b);this.h=new op(this);vl(this.h,_.El)}namespace(){return Cc}unload(){const a=this;return _.y(function*(){if(a.o){a.log.debug(_.Za,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);_.Mf(a.g);
339
- a.f&&(a.f=new _.lp);a.F=null;a.o=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Nl(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.h&&vl(this.h,_.El)})}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(va);const a=this.getTrackManager();a&&a.destroy();this.j&&(this.j.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
340
- 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.Ob}load(a){const b=this;return _.y(function*(){if(b.w)return Ml();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 _.lp;b.g.on(b,_.je,()=>{b.f&&_.nl(b.f.a,b.getState())});vl(b.h,_.Fl);b.o=_.Kl(a);_.cj(a)&&(b.configuration=_.bj(b.jc,
341
- a));b.log.debug(_.Ha,b.configuration);b.log.debug(_.Va,b.o);const d=_.ml(b.configuration,["html","native"]);b.I=d.create(b);b.I.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.ej(_.pe)&&!_.ni()&&(b.A=new xo(b),b.A.start(c));b.j?b.j.release():b.j=new ko(b);Wf(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,nc,()=>{b.trigger(new _.F(_.Ro))});
342
- null==b.configuration.startTime&&Vl(b,c);try{yield Pl(b,c),yield Rl(b),yield Ul(b).P}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.G&&null!==this.h&&vl(this.h,_.Dl),this.trigger(new _.F(_.$c,{detail:a})))}Je(){return new R}getState(){return null!==this.h?this.h.getState().currentState:_.np}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!"),
330
+ 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"},bp=[_.db,void 0],cp=[_.cb,void 0],dp=["3000"],ep=["2000"];
331
+ for(const a of Object.keys(ap)){let b=ra;a!==fk&&(b+=`_${a}`);const c=new _.Xo(b);let d=null;switch(a){case fk:d=qj("V1_PROD");break;case gk:d=qj("V2");break;case hk:d=null}c.Ja(_.Ic,{licenseUrl:Vj(_.Ic,a),videoRobustness:bp,audioRobustness:cp,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Xj,licenseResponse:_.Yj}});c.Ja(_.Gc,{licenseUrl:Vj(_.Gc,a),certificateUrl:Rj(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.ak,licenseResponse:_.bk,
332
+ extractContentId:_.ck,certificateRequest:_.dk}});c.Ja(_.Hc,{licenseUrl:Vj(_.Hc,a),videoRobustness:dp,audioRobustness:ep,modifiers:{licenseRequest:ek}});_.mj(c)};var fp=class{};_.z("clpp.drm.eme.EmeFactory",fp);var kk=[];fp.Apis={STANDARD:bb,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var ok,nk;ok=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];_.gp=class{constructor(a,b,c){this.h=new Uint8Array(a);this.a=b;this.f=c}};nk=class extends _.gp{};var Ok=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.Lj).Z("pssh",this.h.bind(this)).parse(a.buffer);0==this.a.length&&_.D("No pssh box found!")}h(a){if(1<a.version)_.D("Unrecognized PSSH version found!");else{var b=_.Yg(_.Bj(a.reader,16)),c=[];if(0<a.version){var d=_.N(a.reader);for(let e=0;e<d;++e){const f=_.Yg(_.Bj(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()!=
333
+ a.reader.Ba()&&_.D("Mismatch between box size and data size!")}}};var Hk,hp;
334
+ _.Ql=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=hp;this.w=new _.jo;this.K=new Wo;this.g=new Map;this.I=[];this.F=new _.Mk;this.h=null;this.U=b=>{this.o=!0;this.B=!1;this.F.reject(b);a.onError(b)};this.j=new Map;this.W=new Map;this.T=new _.Yh(()=>Ak(this));this.pa=!1;this.aa=new _.Mk;this.C=!1;this.V=[];this.ba=!1;this.N=0;this.a=new _.O("clpp.drm.DrmEngine");this.Y=(new _.Yh(()=>{Bk(this)})).Xa(1);this.F.catch(()=>{});this.o=this.B=!1;this.M=
335
+ null}destroy(){const a=this;return _.y(function*(){a.pa?yield a.aa:(a.pa=!0,yield Ck(a),a.aa.resolve())})}keySystem(){return this.f?_.uk(this.f.keySystem):""}getDrmInfo(){return this.f}ma(a){const b=this;return _.y(function*(){b.C&&b.H===Hk||(!b.h.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.ba?yield Tk(b,a):b.V.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==_.me){var g=f;
336
+ f=e;e=g}if(tk(this.f.keySystem)&&16===f.byteLength&&_.$h()){g=_.Bg(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!==ke&&(c.loaded=!0);c&&c.Ca&&c.Ca.resolve();"expired"===e&&(d=!0);f=_.I(f);let h=_.Yg(f);"00"===h&&c&&c.keyId?h=c.keyId:this.f.keySystem.startsWith(_.Gc)&&16!==f.byteLength&&(h=Dg(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,
337
+ e);c&&!c.keyId&&this.g.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.bb.forEach(e=>{this.j.get(e)===ke&&(this.a.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.Kd))});for(a=0;a<this.f.initData.length;a++){const e=this.f.initData[a];e.keyId&&this.j.get(e.keyId)===ke&&_.Zg(e.initData,c.initData)&&(this.a.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,_.Kd))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.mb&&
338
+ (this.a.debug("Session has expired",b.sessionId),(a=this.g.get(b))&&a.jc&&a.jc.stop(),this.g.delete(b),b.close().catch(()=>{}));bl(this)&&(this.F.resolve(),1!==this.g.size||d?this.T.da(.5):Ak(this))}};Hk=0;hp=3;var jl=new Map,kl=new _.O("clpp.text");var ip=class{constructor(){this.a=null;this.f=[]}};var jp=class{constructor(){this.g=this.f=this.h=null;this.a=[]}};_.kp=class{constructor(){this.f=this.m=this.w=this.B=this.h=this.j=this.g=this.o=NaN;this.a=new ip;this.A=new jp}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:ol(this.a,_.Hl),pauseTime:ol(this.a,_.Gl),bufferingTime:ol(this.a,_.zl),stateHistory:pl(this.a),switchHistory:ql(this.A)}}};_.lp=class{constructor(a){this.f=a;this.a=void 0}value(){void 0==this.a&&(this.a=this.f());return this.a}};var sl=new _.lp(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.od],[HTMLMediaElement.HAVE_CURRENT_DATA,_.nd],[HTMLMediaElement.HAVE_FUTURE_DATA,mc],[HTMLMediaElement.HAVE_ENOUGH_DATA,nc]]));var np=class{constructor(a){this.g=new _.O("clpp.StateManager");this.l=a;this.a=new _.jo;this.f=_.El;this.A=_.mp;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=_.li();this.C=!1;this.I=Date.now();xl(this)}Pb(a,b){this.l&&this.l.trigger(new _.F(a,{detail:b}))}getState(){return Al(this,"")}U(a){(a=a&&a.detail)&&a.severity&&a.severity===_.G&&vl(this,_.Dl)}destroy(){this.g.debug("Stop watching for video events for "+this.l.namespace());this.a.release()}};_.z("clpp.version",_.da);_.z("clpp.name",_.ma);_.Ui="application/x-mpegurl";_.z("clpp.Type",{DASH:_.Sb,HLS:_.Ui,SMOOTH_STREAMING:_.Xb,MP4:_.Je});_.Qf="scte35";_.Of=ye;_.z("clpp.TimelineCueType",{SCTE35:_.Qf,DASH_CALLBACK:_.zd,UNKNOWN:_.Of});_.z("clpp.utils.media.detectType",Il);var Ll=new _.O("clpp.sources");var op=class extends _.Vo{constructor(){super(Bc);this.w=this.G=!1;this.j=this.A=this.m=this.a=this.h=null;this.g=new _.jo;this.F=this.C=this.f=this.H=null}init(a,b){super.init(a,b);this.h=new np(this);vl(this.h,_.El)}namespace(){return Bc}unload(){const a=this;return _.y(function*(){if(a.o){a.log.debug(_.Za,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);_.Mf(a.g);
339
+ a.f&&(a.f=new _.kp);a.F=null;a.o=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Nl(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.h&&vl(this.h,_.El)})}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(ua);const a=this.getTrackManager();a&&a.destroy();this.j&&(this.j.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
340
+ 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.Qb}load(a){const b=this;return _.y(function*(){if(b.w)return Ml();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 _.kp;b.g.on(b,_.je,()=>{b.f&&_.nl(b.f.a,b.getState())});vl(b.h,_.Fl);b.o=_.Kl(a);_.cj(a)&&(b.configuration=_.bj(b.kc,
341
+ a));b.log.debug(_.Ia,b.configuration);b.log.debug(_.Va,b.o);const d=_.ml(b.configuration,["html","native"]);b.I=d.create(b);b.I.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.ej(_.pe)&&!_.ni()&&(b.A=new xo(b),b.A.start(c));b.j?b.j.release():b.j=new ko(b);Wf(b.j,c);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.C(b.configuration.volume)||b.setVolume(b.configuration.volume);_.C(b.configuration.muted)||b.setMuted(b.configuration.muted);b.g.one(c,mc,()=>{b.trigger(new _.F(_.Qo))});
342
+ null==b.configuration.startTime&&Vl(b,c);try{yield Pl(b,c),yield Rl(b),yield Ul(b).P}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.G&&null!==this.h&&vl(this.h,_.Dl),this.trigger(new _.F(_.Yc,{detail:a})))}Oe(){return new Q}getState(){return null!==this.h?this.h.getState().currentState:_.mp}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!"),
343
343
  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 _.rl();this.f&&_.nl(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,
344
- 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():[]}};
345
- _.Kf(new class{a(){return Cc}canPlay(a,b){a=a.type||"";const c=a===_.Ub,d=a===_.Zb,e=a===_.Ui;var f;_.ki()||c||d||e&&!_.li()?f=0:f=""!==Zh().canPlayType(a)?e&&_.li()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}create(){return new pp}});_.A("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.A("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1});_.A("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var Xl=new _.P("clpp.ads"),Wl=[];_.A("clpp.utils.dom.createHTMLElement",_.dm);var qp=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=em(this,a)}get(){return this.a}};var tp=class{constructor(a,b){this.a=new _.P("clpp.PlayerSurface");this.w=_.jf(rp,b);this.g=new qp;this.h=null;this.f=new qp;this.m=sp;sp+=1;this.o=`clpp-video-${this.m}`;this.j=new _.jo;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
346
- 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,
347
- 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),_.bm(b,e);b.style.cssText=a.style.cssText;a.removeAttribute(_.oe);for(d of[_.We,_.cd])e=a.getAttribute(d),e=parseInt(e,10),isNaN(e)||(b.style[d]=`${e}px`),_.bi()||a.removeAttribute(d);b.appendChild(a);d=b}d&&(this.f.set(d),fm(this.f,"clpp-container"),
348
- fm(this.f,this.o),fm(this.g,_.xc),fm(this.g,"clpp-video"));gm(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?_.bm(a,yc):this.a.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(yc):this.a.debug("No media element available that could be shown")}addElementToContainer(a,
349
- 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&&_.bm(a,_.xc);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)}removeElementFromContainer(a){const b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)}hide(a){_.bm(a,yc)}show(a){a.classList.remove(yc)}release(){this.j.release()}};tp.prototype.removeElementFromContainer=tp.prototype.removeElementFromContainer;
350
- tp.prototype.addElementToContainer=tp.prototype.addElementToContainer;tp.prototype.getCastElement=tp.prototype.getCastElement;tp.prototype.getContainer=tp.prototype.getContainer;tp.prototype.getMedia=tp.prototype.getMedia;var rp={disableContainer:!1,crossorigin:"anonymous",containerEl:null},sp=1;var up=class{constructor(a){this.l=a;this.h=this.l.getNetworkEngine();this.a=new _.jo;this.g=null;this.f=!0;km(this)}release(){this.a.release();lm(this);this.l=null}};_.A("clpp.polyfill.installAll",om);var nm=[];_.A("clpp.polyfill.register",_.pm);var rm=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.Eg(_.Ug(a)));this.a=JSON.parse(_.Eg(_.Ug(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=_.Ig(d),n=_.Ug(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(gb)}).catch(g)}else b?
351
- g("Web Crypto API is not supported"):f()})}};var vp={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Yi="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Im=class{constructor(a){this.license=a;this.a=null;this.f=new _.P("clpp.utils.LicenseKey")}verify(){return(new Promise((a,b)=>{try{const c=sm(this);a(c)}catch(c){b()}})).then(a=>a.verify(vp)).catch(a=>{if(a&&a!==gb){{var b=window.location.href;const c=new _.cg(b);b=c.Sa||c.La?c:new _.cg("//"+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;})}},Dm="vod",Cm="live";var S=class extends _.To{constructor(a,b,c){super();om();this.g=new _.P("clpp.Player");if(!a)throw new _.H(_.G,7,7102);this.A=new _.jo;this.f=this.N=b||_.$i();this.m=null;void 0===this.f.license&&(this.f.license=Yi,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 tp(a,c);this.a=this.w=null;
352
- this.G=new _.Em;this.j=null;this.J=[];this.K={};this.o=null;this.H=!0;this.I=this.F=!1;this.C=this.lc=null;this.qd=!1;this.S=new up(this);this.L=!1;this.B=d=>{(d=d.detail)&&d.currentState===_.Hl&&(this.off(_.je,this.B),Jm(this))};this.on(_.je,()=>{this.getState()===_.Dl&&this.unload()});this.on(_.Pb,this.R.bind(this));this.on(_.Ob,this.R.bind(this));Km(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."),
353
- 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 Gm)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Mm(this,a);_.dj.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)}Ub(a){a=
344
+ 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.Ac&&(this.f.f=a.Ac);return this.f.getStats()}getTimelineCues(){return this.j?this.j.getTimelineCues():[]}};
345
+ _.Kf(new class{a(){return Bc}canPlay(a,b){a=a.type||"";const c=a===_.Sb,d=a===_.Xb,e=a===_.Ui;var f;_.ki()||c||d||e&&!_.li()?f=0:f=""!==Zh().canPlayType(a)?e&&_.li()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}create(){return new op}});_.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 Xl=new _.O("clpp.ads"),Wl=[];_.z("clpp.utils.dom.createHTMLElement",_.dm);var pp=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=em(this,a)}get(){return this.a}};var sp=class{constructor(a,b){this.a=new _.O("clpp.PlayerSurface");this.w=_.jf(qp,b);this.g=new pp;this.h=null;this.f=new pp;this.m=rp;rp+=1;this.o=`clpp-video-${this.m}`;this.j=new _.jo;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
346
+ 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(_.Oc);a.parentNode?a.parentNode.replaceChild(b,
347
+ 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),_.bm(b,e);b.style.cssText=a.style.cssText;a.removeAttribute(_.oe);for(d of[_.We,_.ad])e=a.getAttribute(d),e=parseInt(e,10),isNaN(e)||(b.style[d]=`${e}px`),_.bi()||a.removeAttribute(d);b.appendChild(a);d=b}d&&(this.f.set(d),fm(this.f,"clpp-container"),
348
+ fm(this.f,this.o),fm(this.g,_.wc),fm(this.g,"clpp-video"));gm(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?_.bm(a,xc):this.a.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(xc):this.a.debug("No media element available that could be shown")}addElementToContainer(a,
349
+ 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&&_.bm(a,_.wc);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){_.bm(a,xc)}show(a){a.classList.remove(xc)}release(){this.j.release()}};sp.prototype.removeElementFromContainer=sp.prototype.removeElementFromContainer;
350
+ sp.prototype.addElementToContainer=sp.prototype.addElementToContainer;sp.prototype.getCastElement=sp.prototype.getCastElement;sp.prototype.getContainer=sp.prototype.getContainer;sp.prototype.getMedia=sp.prototype.getMedia;var qp={disableContainer:!1,crossorigin:"anonymous",containerEl:null},rp=1;var tp=class{constructor(a){this.l=a;this.h=this.l.getNetworkEngine();this.a=new _.jo;this.g=null;this.f=!0;km(this)}release(){this.a.release();lm(this);this.l=null}};_.z("clpp.polyfill.installAll",om);var nm=[];_.z("clpp.polyfill.register",_.pm);var rm=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.Eg(_.Ug(a)));this.a=JSON.parse(_.Eg(_.Ug(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=_.Ig(d),n=_.Ug(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(fb)}).catch(g)}else b?
351
+ g("Web Crypto API is not supported"):f()})}};var up={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Yi="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Im=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=sm(this);a(c)}catch(c){b()}})).then(a=>a.verify(up)).catch(a=>{if(a&&a!==fb){{var b=window.location.href;const c=new _.cg(b);b=c.Ua||c.Ma?c:new _.cg("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Ma))return Promise.resolve()}throw a;})}},Dm="vod",Cm="live";var R=class extends _.So{constructor(a,b,c){super();om();this.g=new _.O("clpp.Player");if(!a)throw new _.H(_.G,7,7102);this.A=new _.jo;this.f=this.N=b||_.$i();this.m=null;void 0===this.f.license&&(this.f.license=Yi,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 sp(a,c);this.a=this.w=null;
352
+ this.G=new _.Em;this.j=null;this.J=[];this.K={};this.o=null;this.H=!0;this.I=this.F=!1;this.C=this.mc=null;this.ud=!1;this.T=new tp(this);this.M=!1;this.B=d=>{(d=d.detail)&&d.currentState===_.Hl&&(this.off(_.je,this.B),Jm(this))};this.on(_.je,()=>{this.getState()===_.Dl&&this.unload()});this.on(_.Ob,this.R.bind(this));this.on(_.Mb,this.R.bind(this));Km(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."),
353
+ 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 Gm)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Mm(this,a);_.dj.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(_.Yc,{detail:a}),this.trigger(a)}Wb(a){a=
354
354
  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()}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=Om(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"),
355
- new Promise(a=>a());this.F=!0;return this.release().then(()=>{this.g.debug(va);this.trigger(new _.F("destroying"));return _.Lm(this,_.Ed)}).then(()=>{this.a&&this.a.removeDelegate(this);this.Dc.clear();this.S.release();if(this.a)return this.a.destroy()}).then(()=>{hj(a=>{a.a()});_.dj.clear();this.a=null;this.trigger(new _.F("destroyed"))})}load(a){const b=this;return _.y(function*(){try{yield _.Um(b,a),yield _.Vm(b),yield _.Xm(b)}catch(c){if(b.m)throw b.g.info("Load interrupted while a player release is pending"),
356
- new _.H(_.G,7,7E3);throw c;}})}use(a){a=new a;a.f(this);_.gj(a)}remove(a){if(this.getState()<=_.El||this.H){let b="";hj(c=>{c instanceof a&&(b=c.id(),c.a())});if(b)return _.dj.delete(b),this.I=!0}return!1}play(){return this.a?this.j&&this.a.namespace()!==_.zc?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&&
357
- this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.So}getState(){return this.a?this.a.getState():_.El}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()===_.Dl?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?
355
+ new Promise(a=>a());this.F=!0;return this.release().then(()=>{this.g.debug(ua);this.trigger(new _.F("destroying"));return _.Lm(this,_.Ed)}).then(()=>{this.a&&this.a.removeDelegate(this);this.Fc.clear();this.T.release();if(this.a)return this.a.destroy()}).then(()=>{hj(a=>{a.a()});_.dj.clear();this.a=null;this.trigger(new _.F("destroyed"))})}load(a){const b=this;return _.y(function*(){try{yield _.Um(b,a),yield _.Vm(b),yield _.Xm(b)}catch(c){if(b.m)throw b.g.info("Load interrupted while a player release is pending"),
356
+ new _.H(_.G,7,7E3);throw c;}})}use(a){a=new a;a.f(this);_.gj(a)}remove(a){if(this.getState()<=_.El||this.H){let b="";hj(c=>{c instanceof a&&(b=c.id(),c.a())});if(b)return _.dj.delete(b),this.I=!0}return!1}play(){return this.a?this.j&&this.a.namespace()!==_.yc?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&&
357
+ this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.Ro}getState(){return this.a?this.a.getState():_.El}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()===_.Dl?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?
358
358
  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&&
359
- 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}Yc(){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?
360
- this.a.getTimelineCues():[]}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.lc=a;Sm(this)}setCdnErrorCallback(a){this.C=a;this.a&&this.a.setCdnErrorCallback(this.C)}R(){this.qd=!0}};_.A("clpp.Player",S);S.registerPlugin=_.Hm;S.prototype.setCdnErrorCallback=S.prototype.setCdnErrorCallback;S.prototype.setDrmCustomDataModifier=S.prototype.setDrmCustomDataModifier;S.prototype.resetAbr=S.prototype.resetAbr;S.prototype.getTimelineCues=S.prototype.getTimelineCues;
361
- S.prototype.getLoadedSource=S.prototype.getLoadedSource;S.prototype.getSources=S.prototype.Yc;S.prototype.getStats=S.prototype.getStats;S.prototype.isLive=S.prototype.isLive;S.prototype.getTextDisplayer=S.prototype.getTextDisplayer;S.prototype.setNetworkEngine=S.prototype.setNetworkEngine;S.prototype.getNetworkEngine=S.prototype.getNetworkEngine;S.prototype.setMuted=S.prototype.setMuted;S.prototype.isMuted=S.prototype.isMuted;S.prototype.setPlaybackRate=S.prototype.setPlaybackRate;
362
- S.prototype.getPlaybackRate=S.prototype.getPlaybackRate;S.prototype.namespace=S.prototype.namespace;S.prototype.getAdsManager=S.prototype.getAdsManager;S.prototype.getDuration=S.prototype.getDuration;S.prototype.setVolume=S.prototype.setVolume;S.prototype.getVolume=S.prototype.getVolume;S.prototype.getSeekRange=S.prototype.getSeekRange;S.prototype.getPresentationStartTime=S.prototype.getPresentationStartTime;S.prototype.seek=S.prototype.seek;S.prototype.getPosition=S.prototype.getPosition;
363
- S.prototype.isPaused=S.prototype.isPaused;S.prototype.isEnded=S.prototype.isEnded;S.prototype.getState=S.prototype.getState;S.prototype.getBufferInfo=S.prototype.getBufferInfo;S.prototype.getTrackManager=S.prototype.getTrackManager;S.prototype.pause=S.prototype.pause;S.prototype.play=S.prototype.play;S.prototype.remove=S.prototype.remove;S.prototype.use=S.prototype.use;S.prototype.load=S.prototype.load;S.prototype.destroy=S.prototype.destroy;S.prototype.release=S.prototype.release;
364
- S.prototype.getDrmInfo=S.prototype.getDrmInfo;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.getSurface=S.prototype.getSurface;S.prototype.getPlugin=S.prototype.Ub;S.prototype.off=S.prototype.off;S.prototype.one=S.prototype.one;S.prototype.on=S.prototype.on;_.El=0;_.Fl=1;_.zl=2;_.Hl=3;_.Gl=4;_.wl=5;_.Dl=6;_.np=7;_.Cl={IDLE:_.El,PREPARING:_.Fl,BUFFERING:_.zl,PLAYING:_.Hl,PAUSED:_.Gl,ENDED:_.wl,ERROR:_.Dl,UNSET:_.np};S.State=_.Cl;var Gm=[];var T=class{nb(){}ob(){}tb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}Yb(){}Fb(){}getMediaUrl(){}qb(){}pb(){}eb(){}Qa(){}getPodIndex(){}Gb(){}Hb(){}sb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.A("clpp.ads.IAd",T);T.prototype.getWrapperCreativeIds=T.prototype.getWrapperCreativeIds;T.prototype.getWrapperAdSystems=T.prototype.getWrapperAdSystems;T.prototype.getWrapperAdIds=T.prototype.getWrapperAdIds;
365
- T.prototype.getSequenceLength=T.prototype.sb;T.prototype.getPositionInSequence=T.prototype.Hb;T.prototype.getPodTimeOffset=T.prototype.Gb;T.prototype.getPodIndex=T.prototype.getPodIndex;T.prototype.getPodType=T.prototype.Qa;T.prototype.getMediaBitrate=T.prototype.eb;T.prototype.getMediaHeight=T.prototype.pb;T.prototype.getMediaWidth=T.prototype.qb;T.prototype.getMediaUrl=T.prototype.getMediaUrl;T.prototype.getClickThroughUrl=T.prototype.Fb;T.prototype.isBumper=T.prototype.Yb;
366
- T.prototype.getSkipTimeOffset=T.prototype.getSkipTimeOffset;T.prototype.getDuration=T.prototype.getDuration;T.prototype.getTitle=T.prototype.getTitle;T.prototype.getAdvertiserName=T.prototype.getAdvertiserName;T.prototype.getAdSystem=T.prototype.getAdSystem;T.prototype.getApiFramework=T.prototype.getApiFramework;T.prototype.getCreativeId=T.prototype.getCreativeId;T.prototype.getId=T.prototype.getId;T.prototype.getTechnology=T.prototype.tb;T.prototype.getAdManagerVersion=T.prototype.ob;
367
- T.prototype.getAdManagerName=T.prototype.nb;var wp=class{name(){}da(){}create(){}};_.A("clpp.ads.IAdsManagerFactory",wp);wp.prototype.create=wp.prototype.create;wp.prototype.isSupported=wp.prototype.da;wp.prototype.name=wp.prototype.name;var xp=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.A("clpp.ads.IAdsManager",xp);xp.prototype.getPosition=xp.prototype.getPosition;xp.prototype.setVolume=xp.prototype.setVolume;xp.prototype.getVolume=xp.prototype.getVolume;xp.prototype.skip=xp.prototype.skip;xp.prototype.pause=xp.prototype.pause;xp.prototype.resume=xp.prototype.resume;var yp=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.y(function*(){})}};yp.prototype.dispose=yp.prototype.dispose;yp.prototype.getPosition=yp.prototype.getPosition;yp.prototype.setVolume=yp.prototype.setVolume;yp.prototype.getVolume=yp.prototype.getVolume;yp.prototype.skip=yp.prototype.skip;yp.prototype.pause=yp.prototype.pause;yp.prototype.resume=yp.prototype.resume;
368
- yp.prototype.start=yp.prototype.start;yp.prototype.load=yp.prototype.load;var Zl=class{name(){return"clpp.ads.NopAdsManagerFactory"}da(){return!0}create(){return new yp}};Zl.prototype.create=Zl.prototype.create;Zl.prototype.isSupported=Zl.prototype.da;Zl.prototype.name=Zl.prototype.name;var zp=class{getCuePoints(){}Ib(){}fb(){}};_.A("clpp.ads.IAdsTimeline",zp);zp.prototype.hasPostroll=zp.prototype.fb;zp.prototype.hasPreroll=zp.prototype.Ib;zp.prototype.getCuePoints=zp.prototype.getCuePoints;_.Ap=class{g(){}release(){}};var Bp=class{constructor(){this.h=null}j(a){this.h=a}g(a){return this.h?this.h.setMediaKeys(a):Promise.reject(La)}m(){return this.h&&this.h.mediaKeys}a(a,b){return navigator.requestMediaKeySystemAccess(a,b)}f(){return ab}};lk(new class{a(){return ab}da(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Bp}},1E3);var Dp=class{constructor(){this.size=0;this.a=void 0;this.f=new _.P("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Cp.value())}get(a){if(this.has(a))return this.a}has(a){const b=Cp.value();return this.a&&wg(a,b)?!0:!1}entries(){}keys(){}values(){}},Cp=new _.mp(()=>Cg(new Uint8Array([0])));var Ep=class{j(){}g(a){_.Gf("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}m(){return null}a(){_.Gf("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};lk(new class{a(){return"NOP"}da(){return!0}create(){return new Ep}},-1);var Gp=class{constructor(){this.h=this.o=null}j(a){this.o=a}g(a){const b=this.h;b&&b!==a&&Zm(b,null);return(this.h=a)?Zm(a,this.o):Promise.resolve()}m(){return this.h}a(a,b){_.Gf("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Fp(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Fp=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.Hc))for(var c of b){a:{a=c;if(a.persistentState===_.ae){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
359
+ 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}$c(){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?
360
+ this.a.getTimelineCues():[]}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.mc=a;Sm(this)}setCdnErrorCallback(a){this.C=a;this.a&&this.a.setCdnErrorCallback(this.C)}R(){this.ud=!0}};_.z("clpp.Player",R);R.registerPlugin=_.Hm;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;
361
+ R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.$c;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;
362
+ 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;
363
+ 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;
364
+ R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.Wb;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;R.prototype.on=R.prototype.on;_.El=0;_.Fl=1;_.zl=2;_.Hl=3;_.Gl=4;_.wl=5;_.Dl=6;_.mp=7;_.Cl={IDLE:_.El,PREPARING:_.Fl,BUFFERING:_.zl,PLAYING:_.Hl,PAUSED:_.Gl,ENDED:_.wl,ERROR:_.Dl,UNSET:_.mp};R.State=_.Cl;var Gm=[];var S=class{pb(){}qb(){}vb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}$b(){}Hb(){}getMediaUrl(){}sb(){}rb(){}gb(){}Sa(){}getPodIndex(){}Ib(){}Jb(){}ub(){}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;
365
+ S.prototype.getSequenceLength=S.prototype.ub;S.prototype.getPositionInSequence=S.prototype.Jb;S.prototype.getPodTimeOffset=S.prototype.Ib;S.prototype.getPodIndex=S.prototype.getPodIndex;S.prototype.getPodType=S.prototype.Sa;S.prototype.getMediaBitrate=S.prototype.gb;S.prototype.getMediaHeight=S.prototype.rb;S.prototype.getMediaWidth=S.prototype.sb;S.prototype.getMediaUrl=S.prototype.getMediaUrl;S.prototype.getClickThroughUrl=S.prototype.Hb;S.prototype.isBumper=S.prototype.$b;
366
+ 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.vb;S.prototype.getAdManagerVersion=S.prototype.qb;
367
+ S.prototype.getAdManagerName=S.prototype.pb;var vp=class{name(){}ea(){}create(){}};_.z("clpp.ads.IAdsManagerFactory",vp);vp.prototype.create=vp.prototype.create;vp.prototype.isSupported=vp.prototype.ea;vp.prototype.name=vp.prototype.name;var wp=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.z("clpp.ads.IAdsManager",wp);wp.prototype.getPosition=wp.prototype.getPosition;wp.prototype.setVolume=wp.prototype.setVolume;wp.prototype.getVolume=wp.prototype.getVolume;wp.prototype.skip=wp.prototype.skip;wp.prototype.pause=wp.prototype.pause;wp.prototype.resume=wp.prototype.resume;var xp=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.y(function*(){})}};xp.prototype.dispose=xp.prototype.dispose;xp.prototype.getPosition=xp.prototype.getPosition;xp.prototype.setVolume=xp.prototype.setVolume;xp.prototype.getVolume=xp.prototype.getVolume;xp.prototype.skip=xp.prototype.skip;xp.prototype.pause=xp.prototype.pause;xp.prototype.resume=xp.prototype.resume;
368
+ xp.prototype.start=xp.prototype.start;xp.prototype.load=xp.prototype.load;var Zl=class{name(){return"clpp.ads.NopAdsManagerFactory"}ea(){return!0}create(){return new xp}};Zl.prototype.create=Zl.prototype.create;Zl.prototype.isSupported=Zl.prototype.ea;Zl.prototype.name=Zl.prototype.name;var yp=class{getCuePoints(){}Kb(){}hb(){}};_.z("clpp.ads.IAdsTimeline",yp);yp.prototype.hasPostroll=yp.prototype.hb;yp.prototype.hasPreroll=yp.prototype.Kb;yp.prototype.getCuePoints=yp.prototype.getCuePoints;_.zp=class{g(){}release(){}};var Ap=class{constructor(){this.h=null}j(a){this.h=a}g(a){return this.h?this.h.setMediaKeys(a):Promise.reject(Ma)}m(){return this.h&&this.h.mediaKeys}a(a,b){return navigator.requestMediaKeySystemAccess(a,b)}f(){return bb}};lk(new class{a(){return bb}ea(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Ap}},1E3);var Cp=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,Bp.value())}get(a){if(this.has(a))return this.a}has(a){const b=Bp.value();return this.a&&wg(a,b)?!0:!1}entries(){}keys(){}values(){}},Bp=new _.lp(()=>Cg(new Uint8Array([0])));var Dp=class{j(){}g(a){_.Gf("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}m(){return null}a(){_.Gf("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};lk(new class{a(){return"NOP"}ea(){return!0}create(){return new Dp}},-1);var Fp=class{constructor(){this.h=this.o=null}j(a){this.o=a}g(a){const b=this.h;b&&b!==a&&Zm(b,null);return(this.h=a)?Zm(a,this.o):Promise.resolve()}m(){return this.h}a(a,b){_.Gf("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Ep(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Ep=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.Gc))for(var c of b){a:{a=c;if(a.persistentState===_.ae){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
369
369
  persistentState:_.Id,distinctiveIdentifier:_.Id,initDataTypes:a.initDataTypes,sessionTypes:[re],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),
370
- e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Je));a=e?b:null}if(a){this.a=a;return}}c=Error(qb);c.name=Ta;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Hp(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.Gf("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Hp=class{constructor(a){this.g=null;this.h=new WebKitMediaKeys(a);this.f=new _.jo;this.j=0;this.a=new _.P(Bc);this.a.info("Created Media Keys for "+a)}createSession(a){a=
371
- void 0===a?re:a;this.a.debug("Creating Apple MediaKeys Session");if(a!==re)throw new TypeError("Session type "+a+ba);return new Kp(this.h,`__session_${this.j++}`)}setServerCertificate(){this.a.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Kp=class extends _.To{constructor(a,b){super();this.a=null;this.o=a;this.g=this.h=null;this.j=new _.jo;this.sessionId=b;this.expiration=NaN;this.closed=new _.Mk;this.m=!1;this.keyStatuses=new Dp;this.f=new _.P(Bc)}generateRequest(a,
372
- b){if(this.m)return Promise.reject(fb);this.f.debug("generateRequest");this.h=new _.Mk;try{const c=this.o.createSession(_.Je,_.I(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 _.F(sd,{messageType:void 0===e||e===ke?jd:id,message:Cg(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Se,d=>{this.f.debug("onWebkitKeyAdded_",
370
+ e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Je));a=e?b:null}if(a){this.a=a;return}}c=Error(ob);c.name=Ta;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Gp(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.Gf("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Gp=class{constructor(a){this.g=null;this.h=new WebKitMediaKeys(a);this.f=new _.jo;this.j=0;this.a=new _.O(Ac);this.a.info("Created Media Keys for "+a)}createSession(a){a=
371
+ void 0===a?re:a;this.a.debug("Creating Apple MediaKeys Session");if(a!==re)throw new TypeError("Session type "+a+ba);return new Hp(this.h,`__session_${this.j++}`)}setServerCertificate(){this.a.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Hp=class extends _.So{constructor(a,b){super();this.a=null;this.o=a;this.g=this.h=null;this.j=new _.jo;this.sessionId=b;this.expiration=NaN;this.closed=new _.Mk;this.m=!1;this.keyStatuses=new Cp;this.f=new _.O(Ac)}generateRequest(a,
372
+ b){if(this.m)return Promise.reject(eb);this.f.debug("generateRequest");this.h=new _.Mk;try{const c=this.o.createSession(_.Je,_.I(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 _.F(sd,{messageType:void 0===e||e===ke?kd:hd,message:Cg(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Se,d=>{this.f.debug("onWebkitKeyAdded_",
373
373
  d);this.g&&($m(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===ke)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),
374
- 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:$m(this,"output-not-allowed");break;default:$m(this,_.fd)}});$m(this,ke)}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 _.Mk;try{this.a.update(_.I(a))}catch(b){this.g.reject(b)}return this.g}close(){if(this.m)return this.closed;
375
- this.f.info(`Closing Key Session ${this.sessionId}`);this.m=!0;try{this.a.close(),this.closed.resolve(),_.Mf(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"))}};lk(new class{a(){return"APPLE"}da(){return!!window.WebKitMediaKeys}create(){return new Gp}},1100);var Mp=class{constructor(){this.o=this.h=null;this.w="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.w="webkit")}j(a){this.h=a}g(a){_.Gf("WebkitEmeManager.setMediaKeys");if(!this.h)return Promise.reject(La);const b=this.o;b&&b!==a&&cn(b,null);(this.o=a)&&cn(a,this.h);return Promise.resolve()}m(){return this.o}a(a,b){_.Gf("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=
376
- new Lp(this.w,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Lp=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Jd&&(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,
377
- this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.Je,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.ae||a||(e=!1);if(e){this.f=g;return}}b=qb;if(c===_.Jd||c===_.Jc)b="None of the requested configurations were supported.";c=Error(b);c.name=Ta;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Np(this.g,this.a))}getConfiguration(){return this.f}},Np=class{constructor(a,b){this.g=a;this.m=b;this.a=null;this.f=new _.jo;this.h=[];this.j=new Map}createSession(a=
378
- re){if(a!==re&&a!==_.Nd)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Fa,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Op(this.g,this.a,this.m,a);this.h.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Op=class extends _.To{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 _.Mk;this.keyStatuses=
379
- new Dp}generateRequest(a,b){_.Gf("WebkitEmeManager.MediaKeySession.generateRequest");return en(this,b,null)}load(a){_.Gf(tb);return this.j===_.Nd?en(this,null,a):Promise.reject(Error(Ra))}update(a){_.Gf(tb);const b=new _.Mk;fn(this,b,a);return b}close(){_.Gf("WebkitEmeManager.MediaKeySession.close");if(this.j!==_.Nd){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;const a=dn(this,"cancelKeyRequest");try{this.h[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();
380
- return this.closed}remove(){_.Gf("WebkitEmeManager.MediaKeySession.remove");return this.j!==_.Nd?Promise.reject(Error(Ra)):this.close()}};lk(new class{a(){return"WEBKIT"}da(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Mp}});var Rp=class extends _.Yo{constructor(a,b,c,d,e){super(Ea);this.m=a;this.j=b;this.h=c;this.f=d;this.o=e;this.a=new _.P(Ac);_.Og(this.m)?this.a.warn(_.ub):this.Ia(_.Jc,{licenseUrl:this.m,videoRobustness:[_.eb,void 0],audioRobustness:[_.db,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Kc.bind(this)}});_.Og(this.j)?this.a.warn(_.Ua):this.Ia(_.Ic,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Kc.bind(this)}});
381
- _.Og(this.h)?this.a.warn(_.Aa):_.Og(this.f)?this.a.warn(_.za):this.Ia(_.Hc,{licenseUrl:this.h,certificateUrl:this.f,modifiers:{licenseRequest:this.Ge.bind(this),licenseResponse:this.He.bind(this),certificateRequest:this.Kc.bind(this),extractContentId:this.se.bind(this)}})}Kc(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}se(a,b){a=Ij(b);switch(this.o){case Pp:return a;case Qp:return(new _.Jj(a)).a;default:throw Error("Unknown content ID strategy");}}Ge(a,b){b.headers[oa]=
382
- $b;this.Kc(a,b);a={spc:_.Sg(b.body)};b.body=_.Kg(_.Ah(a,!0))}He(a,b){a=_.Eg(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=_.Ug(a).buffer}};_.A(Ac,Rp);Rp.prototype.onFairPlayLicenseResponse=Rp.prototype.He;Rp.prototype.onFairPlayLicenseRequest=Rp.prototype.Ge;Rp.prototype.extractFairPlayContentId=Rp.prototype.se;Rp.prototype.onLicenseRequest=Rp.prototype.Kc;Rp.prototype.constructor=Rp.prototype.constructor;Rp.NAME=Ea;
383
- var Qp="hostname",Pp="full-skd";Rp.FairPlayContentIdStrategy={HOSTNAME:Qp,FULL_SKD:Pp};_.A("clpp.drm.HeaderDrmComponent",class extends _.Ap{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===Ea){a=a.drm.customData;if(!a)throw new _.H(_.G,7,7100,_.Kc);a=new Rp(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Pp);_.mj(a)}}release(){}id(){return"headerdrm"}});_.pm(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})});_.pm(function(){_.Gf("mathRound.install")});_.pm(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",
384
- {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",gn);document.addEventListener("webkitfullscreenerror",gn);document.addEventListener("mozfullscreenchange",gn);document.addEventListener("mozfullscreenerror",gn);document.addEventListener("MSFullscreenChange",gn);document.addEventListener("MSFullscreenError",gn)}});_.pm(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.Gf("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=jn,document.exitPictureInPicture=kn,document.addEventListener("webkitpresentationmodechanged",hn,!0))}});_.pm(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=ln)}});_.pm(function(){if(window.VTTCue)_.Ff("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Ff(rb),window.VTTCue=mn;else if(6===a)_.Ff("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=nn;else{try{var b=!!mn(1,2,"")}catch(c){b=!1}b&&(_.Ff(rb),window.VTTCue=mn)}}else _.Hf("VTTCue not available.")});var on;_.pm(function(){_.Gf("InputEvent.install");_.ai("Trident/")&&HTMLInputElement.prototype.addEventListener!==pn&&(_.Ff("Patching input event support on IE."),on=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=pn)});_.pm(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.pm(function(){_.Gf("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 sn=class{constructor(){this.a=qn()}};var Sp=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.Tp=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 Up;_.Vp=class{constructor(){this.a=new Blob([Up],{type:_.Je})}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 _.Mk;b=b.play();const d=(new _.Yh(()=>{d.stop();c.resolve(a)})).ca(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===Ta?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
385
- Up=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,
374
+ 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:$m(this,"output-not-allowed");break;default:$m(this,_.dd)}});$m(this,ke)}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(eb);this.f.debug("update");this.g=new _.Mk;try{this.a.update(_.I(a))}catch(b){this.g.reject(b)}return this.g}close(){if(this.m)return this.closed;
375
+ this.f.info(`Closing Key Session ${this.sessionId}`);this.m=!0;try{this.a.close(),this.closed.resolve(),_.Mf(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"))}};lk(new class{a(){return"APPLE"}ea(){return!!window.WebKitMediaKeys}create(){return new Fp}},1100);var Jp=class{constructor(){this.o=this.h=null;this.w="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.w="webkit")}j(a){this.h=a}g(a){_.Gf("WebkitEmeManager.setMediaKeys");if(!this.h)return Promise.reject(Ma);const b=this.o;b&&b!==a&&cn(b,null);(this.o=a)&&cn(a,this.h);return Promise.resolve()}m(){return this.o}a(a,b){_.Gf("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=
376
+ new Ip(this.w,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Ip=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Jd&&(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,
377
+ this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.Je,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.ae||a||(e=!1);if(e){this.f=g;return}}b=ob;if(c===_.Jd||c===_.Ic)b="None of the requested configurations were supported.";c=Error(b);c.name=Ta;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Mp(this.g,this.a))}getConfiguration(){return this.f}},Mp=class{constructor(a,b){this.g=a;this.m=b;this.a=null;this.f=new _.jo;this.h=[];this.j=new Map}createSession(a=
378
+ re){if(a!==re&&a!==_.Nd)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Fa,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Np(this.g,this.a,this.m,a);this.h.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Np=class extends _.So{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 _.Mk;this.keyStatuses=
379
+ new Cp}generateRequest(a,b){_.Gf("WebkitEmeManager.MediaKeySession.generateRequest");return en(this,b,null)}load(a){_.Gf(rb);return this.j===_.Nd?en(this,null,a):Promise.reject(Error(Ra))}update(a){_.Gf(rb);const b=new _.Mk;fn(this,b,a);return b}close(){_.Gf("WebkitEmeManager.MediaKeySession.close");if(this.j!==_.Nd){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;const a=dn(this,"cancelKeyRequest");try{this.h[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();
380
+ return this.closed}remove(){_.Gf("WebkitEmeManager.MediaKeySession.remove");return this.j!==_.Nd?Promise.reject(Error(Ra)):this.close()}};lk(new class{a(){return"WEBKIT"}ea(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Jp}});var Qp=class extends _.Xo{constructor(a,b,c,d,e){super(Ea);this.m=a;this.j=b;this.h=c;this.f=d;this.o=e;this.a=new _.O(zc);_.Og(this.m)?this.a.warn(_.sb):this.Ja(_.Ic,{licenseUrl:this.m,videoRobustness:[_.db,void 0],audioRobustness:[_.cb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Mc.bind(this)}});_.Og(this.j)?this.a.warn(_.Ua):this.Ja(_.Hc,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Mc.bind(this)}});
381
+ _.Og(this.h)?this.a.warn(_.Aa):_.Og(this.f)?this.a.warn(_.za):this.Ja(_.Gc,{licenseUrl:this.h,certificateUrl:this.f,modifiers:{licenseRequest:this.Le.bind(this),licenseResponse:this.Me.bind(this),certificateRequest:this.Mc.bind(this),extractContentId:this.xe.bind(this)}})}Mc(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}xe(a,b){a=Ij(b);switch(this.o){case Op:return a;case Pp:return(new _.Jj(a)).a;default:throw Error("Unknown content ID strategy");}}Le(a,b){b.headers[oa]=
382
+ Yb;this.Mc(a,b);a={spc:_.Sg(b.body)};b.body=_.Kg(_.Ah(a,!0))}Me(a,b){a=_.Eg(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=_.Ug(a).buffer}};_.z(zc,Qp);Qp.prototype.onFairPlayLicenseResponse=Qp.prototype.Me;Qp.prototype.onFairPlayLicenseRequest=Qp.prototype.Le;Qp.prototype.extractFairPlayContentId=Qp.prototype.xe;Qp.prototype.onLicenseRequest=Qp.prototype.Mc;Qp.prototype.constructor=Qp.prototype.constructor;Qp.NAME=Ea;
383
+ var Pp="hostname",Op="full-skd";Qp.FairPlayContentIdStrategy={HOSTNAME:Pp,FULL_SKD:Op};_.z("clpp.drm.HeaderDrmComponent",class extends _.zp{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===Ea){a=a.drm.customData;if(!a)throw new _.H(_.G,7,7100,_.Jc);a=new Qp(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Op);_.mj(a)}}release(){}id(){return"headerdrm"}});_.pm(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})});_.pm(function(){_.Gf("mathRound.install")});_.pm(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;Zc in document||(Object.defineProperty(document,Zc,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
384
+ {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",gn);document.addEventListener("webkitfullscreenerror",gn);document.addEventListener("mozfullscreenchange",gn);document.addEventListener("mozfullscreenerror",gn);document.addEventListener("MSFullscreenChange",gn);document.addEventListener("MSFullscreenError",gn)}});_.pm(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.Gf("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=jn,document.exitPictureInPicture=kn,document.addEventListener("webkitpresentationmodechanged",hn,!0))}});_.pm(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=ln)}});_.pm(function(){if(window.VTTCue)_.Bf("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Bf(pb),window.VTTCue=mn;else if(6===a)_.Bf("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=nn;else{try{var b=!!mn(1,2,"")}catch(c){b=!1}b&&(_.Bf(pb),window.VTTCue=mn)}}else _.Hf("VTTCue not available.")});var on;_.pm(function(){_.Gf("InputEvent.install");_.ai("Trident/")&&HTMLInputElement.prototype.addEventListener!==pn&&(_.Bf("Patching input event support on IE."),on=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=pn)});_.pm(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.pm(function(){_.Gf("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 sn=class{constructor(){this.a=qn()}};var Rp=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.Sp=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 Tp;_.Up=class{constructor(){this.a=new Blob([Tp],{type:_.Je})}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 _.Mk;b=b.play();const d=(new _.Yh(()=>{d.stop();c.resolve(a)})).da(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===Ta?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
385
+ Tp=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,
386
386
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
387
387
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
388
388
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
389
389
  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,
390
390
  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,
391
- 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]);_.Wp=new _.P("clpp.media.TimestampParser");_.xn={};_.zn={};var Un=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new sn}};var Dn=window.XMLHttpRequest;var Tn=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.h=new Sp(a);this.length=a;this.w=b;this.f=this.a=this.g=0;this.j=null;this.m=-1;this.o=new sn}};var Ko=class extends _.Tl{constructor(a){super(new _.Mk,()=>Promise.resolve());this.A=a;this.g=null;this.o=this.P;this.f=-1;this.h=this.j=this.m=null;Nn(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 Sn=window.fetch,Pn=window.AbortController,On=window.Headers;_.Xn={};_.Yp=class{constructor(a){a=a.getConfiguration();a=_.kf(a.textStyle||a.textstyle||{});this.J=typeof a.backgroundColor===_.me?a.backgroundColor:null;this.S=typeof a.windowColor===_.me?a.windowColor:null;this.N=typeof a.fontColor===_.me?a.fontColor:null;this.R=typeof a.fontFamily===_.me?a.fontFamily:null;this.H=typeof a.fontSize===_.me?a.fontSize:null;this.B=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.G=typeof a.edgeColor===_.me?a.edgeColor:"rgba(0, 0, 0, 1)";this.o=null;typeof a.edgeType===
392
- _.me&&(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?Xp:this.B}setFontSizePercent(a){this.B=a;this.g()}getEdgeColor(){return this.G}setEdgeColor(a){this.G=
393
- a;this.g()}getEdgeType(){return this.o}setEdgeType(a){this.o=a;this.g()}};_.Yp.prototype.setEdgeType=_.Yp.prototype.setEdgeType;_.Yp.prototype.getEdgeType=_.Yp.prototype.getEdgeType;_.Yp.prototype.setEdgeColor=_.Yp.prototype.setEdgeColor;_.Yp.prototype.getEdgeColor=_.Yp.prototype.getEdgeColor;_.Yp.prototype.setFontSizePercent=_.Yp.prototype.setFontSizePercent;_.Yp.prototype.getFontSizePercent=_.Yp.prototype.getFontSizePercent;_.Yp.prototype.setFontSize=_.Yp.prototype.setFontSize;
394
- _.Yp.prototype.getFontSize=_.Yp.prototype.getFontSize;_.Yp.prototype.setFontColor=_.Yp.prototype.setFontColor;_.Yp.prototype.getFontColor=_.Yp.prototype.getFontColor;_.Yp.prototype.setFontFamily=_.Yp.prototype.setFontFamily;_.Yp.prototype.getFontFamily=_.Yp.prototype.getFontFamily;_.Yp.prototype.setWindowColor=_.Yp.prototype.setWindowColor;_.Yp.prototype.getWindowColor=_.Yp.prototype.getWindowColor;_.Yp.prototype.setBackgroundColor=_.Yp.prototype.setBackgroundColor;
395
- _.Yp.prototype.getBackgroundColor=_.Yp.prototype.getBackgroundColor;var Xp=1/15;var Zn="raised",$n="depressed",bo="dropshadow",ao="uniform";_.A("clpp.text.EdgeType",{NONE:_.Ad,RAISED:Zn,DEPRESSED:$n,DROP_SHADOW:bo,UNIFORM:ao});_.Xn[Vb]=class{constructor(a){this.g=a;this.a=null;this.f=new _.P("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Xn[_.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=_.Xn[_.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=
396
- 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 Zp;
397
- _.$p=class extends _.Yp{constructor(a){super(a);this.m=a.getSurface().getMedia();this.f=`clpp-video-${Zp++}`;this.h=document.createElement(_.oe);this.j=this.w=!1;_.bm(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":_.co(this)},b=
398
- 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()}};Zp=0;_.ll("native",new class{da(){return!0}create(a){return new _.$p(a)}});_.aq=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;
391
+ 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]);_.Vp=new _.O("clpp.media.TimestampParser");_.xn={};_.zn={};var Un=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new sn}};var Dn=window.XMLHttpRequest;var Tn=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.h=new Rp(a);this.length=a;this.w=b;this.f=this.a=this.g=0;this.j=null;this.m=-1;this.o=new sn}};var Jo=class extends _.Tl{constructor(a){super(new _.Mk,()=>Promise.resolve());this.A=a;this.g=null;this.o=this.P;this.f=-1;this.h=this.j=this.m=null;Nn(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 Sn=window.fetch,Pn=window.AbortController,On=window.Headers;_.Xn={};_.Xp=class{constructor(a){a=a.getConfiguration();a=_.kf(a.textStyle||a.textstyle||{});this.J=typeof a.backgroundColor===_.me?a.backgroundColor:null;this.T=typeof a.windowColor===_.me?a.windowColor:null;this.N=typeof a.fontColor===_.me?a.fontColor:null;this.R=typeof a.fontFamily===_.me?a.fontFamily:null;this.H=typeof a.fontSize===_.me?a.fontSize:null;this.B=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.G=typeof a.edgeColor===_.me?a.edgeColor:"rgba(0, 0, 0, 1)";this.o=null;typeof a.edgeType===
392
+ _.me&&(this.o=a.edgeType)}getBackgroundColor(){return this.J}setBackgroundColor(a){this.J=a;this.g()}getWindowColor(){return this.T}setWindowColor(a){this.T=a;this.g()}getFontFamily(){return this.R}setFontFamily(a){this.R=a;this.g()}getFontColor(){return this.N}setFontColor(a){this.N=a;this.g()}getFontSize(){return this.H}setFontSize(a){this.H=a;this.g()}getFontSizePercent(){return null===this.B?Wp:this.B}setFontSizePercent(a){this.B=a;this.g()}getEdgeColor(){return this.G}setEdgeColor(a){this.G=
393
+ a;this.g()}getEdgeType(){return this.o}setEdgeType(a){this.o=a;this.g()}};_.Xp.prototype.setEdgeType=_.Xp.prototype.setEdgeType;_.Xp.prototype.getEdgeType=_.Xp.prototype.getEdgeType;_.Xp.prototype.setEdgeColor=_.Xp.prototype.setEdgeColor;_.Xp.prototype.getEdgeColor=_.Xp.prototype.getEdgeColor;_.Xp.prototype.setFontSizePercent=_.Xp.prototype.setFontSizePercent;_.Xp.prototype.getFontSizePercent=_.Xp.prototype.getFontSizePercent;_.Xp.prototype.setFontSize=_.Xp.prototype.setFontSize;
394
+ _.Xp.prototype.getFontSize=_.Xp.prototype.getFontSize;_.Xp.prototype.setFontColor=_.Xp.prototype.setFontColor;_.Xp.prototype.getFontColor=_.Xp.prototype.getFontColor;_.Xp.prototype.setFontFamily=_.Xp.prototype.setFontFamily;_.Xp.prototype.getFontFamily=_.Xp.prototype.getFontFamily;_.Xp.prototype.setWindowColor=_.Xp.prototype.setWindowColor;_.Xp.prototype.getWindowColor=_.Xp.prototype.getWindowColor;_.Xp.prototype.setBackgroundColor=_.Xp.prototype.setBackgroundColor;
395
+ _.Xp.prototype.getBackgroundColor=_.Xp.prototype.getBackgroundColor;var Wp=1/15;var Zn="raised",$n="depressed",bo="dropshadow",ao="uniform";_.z("clpp.text.EdgeType",{NONE:_.Ad,RAISED:Zn,DEPRESSED:$n,DROP_SHADOW:bo,UNIFORM:ao});_.Xn[Tb]=class{constructor(a){this.g=a;this.a=null;this.f=new _.O("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Xn[_.Ub]||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=_.Xn[_.Vb]||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=
396
+ 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 Yp;
397
+ _.Zp=class extends _.Xp{constructor(a){super(a);this.m=a.getSurface().getMedia();this.f=`clpp-video-${Yp++}`;this.h=document.createElement(_.oe);this.j=this.w=!1;_.bm(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":_.co(this)},b=
398
+ 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()}};Yp=0;_.ll("native",new class{ea(){return!0}create(a){return new _.Zp(a)}});_.$p=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;