@castlabs/prestoplay 6.10.0 → 6.11.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 (60) 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 +112 -112
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +467 -435
  8. package/cjs/cl.crypto.js +9 -10
  9. package/cjs/cl.dash.js +72 -72
  10. package/cjs/cl.externs.js +132 -33
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +78 -74
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -29
  15. package/cjs/cl.ima.js +24 -24
  16. package/cjs/cl.mse.js +274 -274
  17. package/cjs/cl.muxdata.js +14 -14
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +14 -14
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.smooth.js +71 -71
  22. package/cjs/cl.thumbnails.js +24 -24
  23. package/cjs/cl.tizen.js +71 -71
  24. package/cjs/cl.ttml.js +29 -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 +20 -20
  30. package/cl.adobe.js +3 -3
  31. package/cl.airplay.js +3 -3
  32. package/cl.broadpeak.js +5 -5
  33. package/cl.cast.js +88 -88
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +395 -368
  36. package/cl.crypto.js +9 -9
  37. package/cl.dash.js +67 -66
  38. package/cl.externs.js +128 -33
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +64 -61
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +26 -26
  43. package/cl.ima.js +17 -17
  44. package/cl.mse.js +238 -239
  45. package/cl.muxdata.js +12 -12
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +11 -11
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +59 -59
  50. package/cl.thumbnails.js +17 -17
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +22 -22
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +14 -14
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +15 -15
  58. package/clpp.styles.css +15 -0
  59. package/package.json +1 -1
  60. package/typings.d.ts +202 -19
package/cl.core.js CHANGED
@@ -1,316 +1,335 @@
1
- let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,oa,pa,ra,sa,ta,ua,wa,Ca,Da,Ea,Fa,Ha,Na,Oa,Pa,Qa,Ra,Sa,Ua,cb,fb,gb,ib,kb,mb,pb,qb,tb,vb,Vb,$b,pc,qc,wc,xc,yc,Ac,Cc,Dc,Ec,Fc,Nc,Tc,Wc,Xc,Yc,bd,hd,kd,md,rd,ud,Jd,Qd,ae,ce,ke,ne,ue,Be,Oe,Se,Te,Ue,Ve,We,Ye,Ze,$e,af,bf,cf,ff,gf,mf,jf,tf,uf,yf,Af,Mf,Wf,Xf,Qf,Tf,Zf,ag,$f,cg,dg,eg,hg,jg,kg,og,qg,sg,pg,mg,yg,Ag,zg,Bg,Cg,Dg,Gg,Hg,lh,ph,qh,rh,sh,th,vh,wh,xh,Ah,Dh,Gh,Hh,Ih,Mh,Oh,Jh,Lh,Nh,Ph,Qh,Rh,Th,Uh,$h,di,ii,ki,hi,wi,ni,mi,Hi,Ii,Ki,Li,Mi,Ni,Oi,Pi,Ri,Qi,Si,Ti,Wi,Xi,Yi,Ji,$i,bj,dj,fj,mj,
2
- nj,oj,pj,vj,wj,Fj,Hj,Nj,Rj,Tj,ak,kk,Wj,fk,pk,rk,sk,yk,Bk,Ck,Dk,Ek,zk,Fk,Gk,Hk,Ik,Jk,Nk,Tk,Yk,$k,bl,al,el,Wk,ll,il,kl,jl,Zk,ml,nl,ol,ul,vl,wl,zl,Dl,El,Gl,Bl,Al,Ol,Pl,Tl,Sl,Vl,Xl,Yl,Ul,$l,am,fm,km,lm,mm,qm,rm,pm,sm,om,nm,um,wm,ym,zm,Am,Bm,Cm,Dm,Em,Fm,Gm,Hm,Lm,Pm,Qm,Sm,Um,Xm,Ym,Zm,bn,dn,en,fn,jn,gn,hn,kn,ln,mn,nn,on,pn,qn,rn,sn,tn,vn,wn,xn,zn,Bn,Gn,Hn,In,Kn,Ln,Mn,On,Pn,Nn,Qn,Tn,Sn,Rn,Xn,Wn,bo,df,ef;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";
3
- _.da="6.10.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";oa="Content-Length";pa="Content-Type";_.qa="Could not find configured DRM environment.";ra="DRM licenses loaded";sa="DRMtoday";ta="DRMtodayOnboard";ua="Destroying player";_.va="Disable track type ";wa="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="LANGUAGE";Ha="License verification failed: ";_.Ja="Loading player with configuration";_.Ka="MaxHeight";_.La="MaxWidth";Na="Missing media element";Oa="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Pa="No event provided!";
5
- Qa="No track data attached to the event, unable to add track!";Ra="Not a persistent session.";Sa="NotAllowedError";Ua="NotSupportedError";_.Va="PlayReady License URL is not defined";_.Wa="Player sources";_.Xa="Please make sure ";_.Ya="QualityLevel";_.Za="RESOLUTION";_.$a="Releasing player with source";_.ab="Representation";cb="STANDARD";_.db="SW_SECURE_CRYPTO";_.eb="SW_SECURE_DECODE";fb="Session is closed";gb="Signature Verification failed";ib="Skipping Session creation. License for init data was already requested in ";
6
- _.jb="SmoothStreamingMedia";kb="The index is not in the allowed range.";_.lb="URI";mb="Unable to translate ";_.nb="Unhandled/ignored event";_.ob="Unregistering listeners";pb="Unsupported keySystem";qb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.rb="VIDEO";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";
7
- _.Cb="ad-impression";_.Db="ad-loaded";_.Eb="ad-midpoint";_.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";_.Pb="airplay-casting-ended";_.Rb="airplay-casting-started";_.Sb="airplay-status-changed";_.Tb="application/cea-608";_.Ub="application/dash+xml";Vb="application/mp4";_.Wb='application/mp4; codecs\x3d"stpp"';_.Xb='application/mp4; codecs\x3d"wvtt"';_.Yb="application/ttml+xml";
8
- _.Zb="application/vnd.ms-sstr+xml";$b="application/x-www-form-urlencoded";_.p="audio";_.ac="audio/aac";_.bc="audio/ac3";_.cc="audio/eac3";_.dc="audio/mp4";_.ec="audiobufferchanged";_.fc="autoplaynotallowed";_.gc="bitratechanged";_.jc="boolean";_.kc="bufferingended";_.oc="bufferingstarted";pc="canplay";qc="canplaythrough";_.rc="castingstarted";_.sc="caststatuschanged";_.tc="cdn-switch-success";_.uc="cenc";_.vc="center";wc="certificate-request";xc="change";yc="chrome";_.zc="clpp-fill";Ac="clpp-hidden";
9
- _.Bc="clpp.cast.CastSender";Cc="clpp.drm.HeaderDrm";Dc="clpp.drm.eme.AppleEmeManager";Ec="clpp.native.Player";Fc="clpp.utils.Platform";_.Gc="codecs";_.Hc="column-reverse";_.Ic="com.adobe.primetime";_.Jc="com.apple.fps";_.Kc="com.microsoft.playready";_.Lc="com.widevine.alpha";_.Mc="config.drm.customData is not defined";Nc="controls";_.Oc="cuechange";_.Pc="destroy()";_.Qc="disabled";_.Rc="div";_.Sc="drmexpirationupdate";Tc="drmrenewalstarted";_.Uc="drmsessionpersisted";_.Vc="drmsessionupdate";Wc="drmtoday";
10
- Xc="durationchange";Yc="encrypted";_.Zc="end";_.$c="ended";_.ad="error";bd="fullscreenElement";_.cd="function";_.dd="height";_.ed="hidden";_.fd="image";_.gd="internal-error";hd="keystatuseschange";_.id="left";kd="license-renewal";md="license-request";_.nd="line-left";_.od="line-right";_.pd="loadeddata";_.qd="loadedmetadata";rd="loadstart";_.sd="mdat";_.td="mdia";ud="message";_.vd="metadata";_.wd="mimeType";_.xd="minf";_.yd="moov";_.zd="mp4";_.Ad="mpd-type-changed";_.Bd="mpeg-dash-callback-event";
11
- _.Cd="none";_.r="number";_.Dd="object";_.Ed="onBitrateChanged()";_.Fd="onPlayerError()";_.Gd="onPlayerWillDestroy";_.Hd="onPlayerWillRelease";_.Id="onStateChanged()";Jd="online-status-changed";_.Kd="optional";_.Ld="org.w3.clearkey";_.Md="output-restricted";_.Nd="pause";_.Od="persistent";_.Pd="persistent-license";Qd="picture-in-picture";_.Ud="play";_.Vd="playing";_.Wd="playlist-item-changed";_.Xd="playlist-modified";_.Yd="progress";_.Zd="px";_.$d="ratechange";ae="released";_.be="releasing";ce="removetrack";
12
- _.de="required";_.ee="resize";_.fe="right";_.ge="seeked";_.he="seeking";_.ie="showing";_.je="sinf";ke="stalled";_.le="start";_.me="statechanged";ne="status-pending";_.oe="stbl";_.pe="string";_.qe="stsd";_.re="style";_.se="subtitles-htmlcue";_.te="subtitles-ttml";ue="temporary";_.u="text";_.ve="text/vtt";_.we="text/xml";_.xe="timeupdate";_.ye="trak";_.ze="ttml-xml";_.Ae="und";Be="unknown";_.Ce="urn:scte:scte35";_.De="urn:scte:scte35:2014";_.Ee="user-seeked";_.Fe="user-seeking";_.Ge="value";_.He="vertical-lr";
13
- _.Ie="vertical-rl";_.w="video";_.Je="video/mp2t";_.Ke="video/mp4";_.Le="videobufferchanged";_.Me="videotrackchanged";_.Ne="vimond-response";Oe="visibilitychange";_.Pe="vtt-xml";_.Qe="waiting";_.Re="waitingforkey";Se="webkit-org.w3.clearkey";Te="webkitkeyadded";Ue="webkitkeyerror";Ve="webkitkeymessage";We="webkitneedkey";_.Xe="width";Ye="x-dt-csl-tracking-token";Ze="x-dt-follow-up-token";$e="x-dt-resp-code";bf=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};
14
- cf=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:bf(a)}};ff=function(a,b){if(b){var c=df;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ef(c,a,{configurable:!0,writable:!0,value:b})}};
15
- gf=function(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})};_.y=function(a){return gf(a())};_.z=function(a,b){a=a.split(".");var c=hf;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};
16
- _.lf=function(a){return _.B(a)||jf(a)?a:_.kf(a)};_.kf=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=mf(b,{merging:a[c]},1));return b.merging||null};mf=function(a,b,c){const d=c+1;if(_.B(a)||!_.nf(a))a={};for(const e in b)c=b[e],jf(c)||_.B(c)||_.of(c)||c instanceof Element?a[e]=c:_.nf(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.of(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=mf([],c,d):!_.B(c)&&_.pf(c)&&20>d&&(a[e]=mf(a[e],c,d));return a};
17
- jf=function(a){a=typeof a;return a===_.pe||a===_.r||a===_.jc};_.B=function(a){return null===a||"undefined"===typeof a};_.nf=function(a){return typeof a===_.Dd};_.of=function(a){return typeof a===_.cd};_.qf=function(a){return typeof a===_.pe};_.rf=function(a){return typeof a===_.r};_.pf=function(a){if(_.B(a)||!_.nf(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
18
- _.sf=function(a,b,c,d){if(a===b||null===a&&null===b||void 0===a&&void 0===b)return!0;if(null===a&&null!==b||null!==a&&null===b||void 0!==a&&void 0===b||void 0===a&&void 0!==b||!_.nf(a)||!_.nf(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.B(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.B(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.B(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
19
- tf=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};uf=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.vf=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};yf=function(a){return a&&0<=wf[a]?wf[a]:xf};Af=function(a){if(!a)return _.C("clpp.log",mb+a+ca),-1;const b=zf[a.toUpperCase()];return void 0===b?(_.C("clpp.log",mb+a+ca),-1):b};_.Cf=function(a){Bf.info.apply(Bf,arguments)};_.Hf=function(a){Bf.debug.apply(Bf,arguments)};
20
- _.C=function(a){Bf.warn.apply(Bf,arguments)};_.If=function(a){Bf.error.apply(Bf,arguments)};_.Lf=function(a){if(a){var b=a.a();b in _.Jf?_.Kf.warn("Player-Factory '"+b+"' already registered"):(_.Jf[b]=a,_.Kf.info("Registered Player-Factory: '"+b+"'"))}};_.Nf=function(a){var b=a.a;var c=[];for(const d in b.a)c.push.apply(c,b.a[d]);b=c;for(c=0;c<b.length;++c)Mf(b[c]);a.a.clear()};_.Of=function(a,b,c,d){const e=f=>{for(const g of c)a.off(b,g,e);d(f)};for(const f of c)a.on(b,f,e)};
21
- Mf=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
22
- Wf=function(a,b){a.o.debug("onMetadata_()");b.mode=_.ed;const c=[];let d=!0;const e=f=>{for(var g of c)if(f.startTime===g.startTime&&f.endTime===g.endTime)return g;g={schemeIdUri:"",value:"",startTime:0,endTime:0,id:"",type:_.Pf,eventElement:null};a.m&&d&&"SCTE35-IN"===f.value.key&&0<f.startTime?(g.startTime=0,g.endTime=f.startTime):(g.startTime=f.startTime,g.endTime=f.endTime);d=!1;c.push(g);return c[c.length-1]};if(b.cues){for(const f of b.cues){if(Qf(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
23
- _.De;g.type=_.Rf;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.l.trigger(new _.F(_.Sf,{detail:f}));Array.prototype.push.apply(a.g,c);Tf(a,c,b);a.f.off(b,_.Oc);a.f.on(b,_.Oc,f=>{f=f.target.activeCues;f=f.length?Qf(a,f[0]):a.a;var g;if(g=f){{g=f;const h=a.l.getPosition();g=g.startTime<=h&&h<g.endTime}}if(g)a.a=f,a.l.trigger(new _.F(_.Uf,{detail:f}));else{if(f=a.a)f=a.a,g=a.l.getPosition(),f=f.endTime<=g;f&&(f=a.a,a.a=null,a.l.trigger(new _.F(_.Vf,{detail:f})))}})}};
24
- Xf=function(a,b){a.h=b;a.j=a.h.textTracks;a.f.on(a.j,_.Mb,c=>{c=c.track;c.kind===_.vd&&Wf(a,c)})};Qf=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};Tf=function(a,b,c){if(a.m){for(;0<c.cues.length;)c.removeCue(c.cues[0]);b.forEach(function(d){c.addCue(new DataCue(d.startTime,d.endTime,{key:"SCTE35-OUT",data:null}))})}};_.Yf=function(a){return Array.isArray(a)?a:[a]};
25
- Zf=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};ag=function(a,b,c){if(null==a&&null==b)return!0;if(null==a||null==b)return!1;a=c?a.map(c):a;b=c?b.map(c):b;return $f(a,b)&&$f(b,a)};$f=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.bg=function(a,b={}){if(b.ze){const c=[];for(const d of a)c.some(e=>b.ze(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};
26
- cg=function(a,b){b=b.track;b.kind!==_.vd&&(b.mode===_.ie&&(b.mode=_.ed),a.a.on(b,_.Oc,c=>{c=c.target||c.srcElement;c.mode=_.ed;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.j.append(c,[]))}))};dg=function(a,b,c,d){a=`${a===_.G?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.qf(d))a+=": "+d;else if(null!=d&&void 0!=d)if(null!=d.message&&void 0!=d.message)a+=": "+d.message,delete d.message;else try{a+=": "+JSON.stringify(d)}catch(e){}return a};
27
- eg=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)}};_.fg=function(a){return null!=a};hg=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new gg("No non-null, non-undefined value found");};
28
- _.ig=function(a){var b;a instanceof _.ig?(jg(this,a.Ua),this.ec=a.ec,this.Fa=a.Fa,kg(this,a.yc),this.ya=a.ya,_.lg(this,mg(a.a)),this.Vb=a.Vb):a&&(b=String(a).match(ng))?(jg(this,b[1]||"",!0),this.ec=og(b[2]||""),this.Fa=og(b[3]||"",!0),kg(this,b[4]),this.ya=og(b[5]||"",!0),_.lg(this,b[6]||"",!0),this.Vb=og(b[7]||"")):this.a=new pg(null)};jg=function(a,b,c){a.Ua=c?og(b,!0):b;a.Ua&&(a.Ua=a.Ua.replace(/:$/,""))};
29
- kg=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.yc=b}else a.yc=null};_.lg=function(a,b,c){b instanceof pg?a.a=b:(c||(b=qg(b,rg)),a.a=new pg(b))};og=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};qg=function(a,b,c){return typeof a===_.pe?(a=encodeURI(a).replace(b,sg),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};sg=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};pg=function(a){this.f=a||null};
30
- _.tg=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," ")))}};mg=function(a){var b=new pg;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};
31
- _.J=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};_.vg=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=ug.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.wg=function(a,b){a=_.vg(a);b=_.vg(b);return a.split("-")[0]==b.split("-")[0]};_.xg=function(a,b){for(const c of a)if(!b(c))return!1;return!0};yg=function*(a){for(let b=0;b<a;b++)yield b};
32
- Ag=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(zg(a)==zg(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;const c=_.K(a);b=_.K(b);for(const d of yg(a.byteLength))if(c[d]!=b[d])return!1;return!0};zg=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.K=function(a,b=0,c=Infinity){return Bg(a,b,c,Uint8Array)};
33
- Bg=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=zg(a),g=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b*e,g));c=Math.min(a+Math.max(c*e,0),g);a/=e;return new d(f,a,c/e-a)};Cg=function(a,b=0,c=Infinity){return Bg(a,b,c,Uint16Array)};Dg=function(a,b=0,c=Infinity){return Bg(a,b,c,Uint32Array)};_.Eg=function(a,b=0,c=Infinity){return Bg(a,b,c,Int32Array)};_.Fg=function(a,b=0,c=Infinity){return Bg(a,b,c,DataView)};
34
- Gg=function(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};Hg=function(a){let b="";for(let c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};
35
- _.Ig=function(a){if(!a)return"";a=_.K(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(Hg(a));try{return decodeURIComponent(a)}catch(b){throw Error(wa);}};
36
- _.Kg=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Jg.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.K(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(_.K(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return Hg(c)};
37
- _.Lg=function(a,b){if(_.qf(a))return a;let c="";b=!!b;const d=_.K(a);239==d[0]&&187==d[1]&&191==d[2]?c=_.Ig(d):254==d[0]&&255==d[1]?c=_.Kg(d.subarray(2),!1):255==d[0]&&254==d[1]&&(c=_.Kg(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Jg.debug("Unable to find byte-order-mark, making an educated guess.");0==d[0]&&0==d[2]?c=_.Kg(a,!1):0==d[1]&&0==d[3]?c=_.Kg(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Ig(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
38
- };_.Mg=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.Ng=function(a,b){const c=new Uint8Array(2*a.length),d=new DataView(c.buffer);for(let e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
39
- _.Og=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=Dg(d):2===c?e=Cg(d):e=_.K(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Pg=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Qg=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};_.Rg=function(a){return!!(a&&0<a.length)};_.Sg=function(a){return!a||0===a.length};
40
- _.Tg=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(tf(b))return"";a="bps";1E3<=Math.abs(b)&&(a="Kbps",b/=1E3);1E3<=Math.abs(b)&&(a="Mbps",b/=1E3);return`${b.toFixed(2).replace(/[.,]00$/,"")}${a}`}catch(b){return""}};_.Xg=function(a){a=a.replace(/<[^>]+>/gi,"");Ug.innerHTML=a;a=Ug.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.Zg=function(a,b){b=void 0==b?!0:b;a=_.Yg(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};
41
- _.Yg=function(a){a=Hg(_.K(a));return btoa(a)};_.$g=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};_.ah=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};_.bh=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};
42
- _.ch=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};_.dh=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};
43
- _.eh=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};
44
- _.ih=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 _.fh(d);var f;(f=_.eh(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.eh(d,g);)c.push(new _.gh(f[1],f[2]||f[3]))}return new _.hh(a,b,c,e)};_.kh=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...jh]}};
45
- lh=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts;a.fatalStatusCodes=b.fatalStatusCodes||[...jh]};
46
- _.nh=function(a,b){_.qf(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.mh,uriIndex:0,method:a.method||"GET",body:a.body||null,headers:Object.assign({},a.headers),allowCrossSiteCredentials:a.allowCrossSiteCredentials||!1,onProgress:a.onProgress||null,onFragment:a.onFragment||null,maxAttempts:a.maxAttempts||1,currentAttempt:0,baseDelay:a.baseDelay||1E3,backoffFactor:a.backoffFactor||2,fuzzFactor:a.fuzzFactor||.5,timeout:a.timeout||0,requestModifiers:a.requestModifiers||
47
- [],responseModifiers:a.responseModifiers||[],startTime:a.startTime||null,endTime:a.endTime||null,contentType:a.contentType||null,licenseRequestType:a.licenseRequestType||null,sessionId:null,bytesRemaining:-1,bytesLoaded:-1,bytesTotal:-1,timescale:a.timescale||null,rateLimitBps:a.rateLimitBps||null,disableFragmentSupport:a.disableFragmentSupport||!1,disableMergedFragments:a.disableMergedFragments||!1,fatalStatusCodes:[...jh],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&lh(c,b);return c};
48
- _.oh=function(a,b,c,d,e,f,g,h){e&&(d=e);e={uri:d,data:b||new ArrayBuffer(0),headers:a,status:c,fromCache:!!a["x-shaka-from-cache"],timeMs:g,responseStartMs:h,request:f};if(200<=c&&299>=c&&202!==c)return e;g=null;try{g=_.Lg(b,!0)}catch(k){}_.Hf("HTTP error text:",g);throw new _.H(0<=(f.fatalStatusCodes||[]).indexOf(c)?_.G:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};
49
- ph=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};qh=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};rh=function(a,b,c){if(0>=a)return Promise.resolve();const d=8*c/a-b/1E3;return 0<d?new Promise(e=>{setTimeout(e,1E3*d)}):Promise.resolve()};
50
- sh=function(a,b,c){try{const d=a(b);if(d&&d.P&&d.abort)return c.resolve(d.P),()=>d.abort();c.resolve(d);return()=>Promise.resolve(d).then(()=>{}).catch(()=>{})}catch(d){return c.reject(d),()=>Promise.resolve()}};th=function(a,b){a.P.then(()=>b(!0),()=>b(!1));return a};_.uh=function(a,b){a.a.push(th(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};vh=function(a,b){return _.y(function*(){const c=yield a.fetch(b);return _.Ig(c.data)})};
51
- wh=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.y(function*(){if(!navigator.onLine)return!1;if(b){const e=_.nh(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).P}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};xh=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.yh=function(a){return a&&a!==_.Ae?a:null};
52
- Ah=function(a){if(!a)throw new _.H(_.G,3,3101,`Invalid track type: ${a}`);if(!_.qf(a))throw new _.H(_.G,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.L:return _.L;case _.M:return _.M;case _.N:return _.N;case zh:return zh}throw new _.H(_.G,3,3101,`Unknown track type: ${a}.`);};
53
- Dh=function(a,b){a=Ah(a);const c=_.yh(b.kind);let d=b.id;d||(d=String(_.Bh++));a=new _.Ch(d,c===_.vd?zh:a);a.kind=c;a.label=_.yh(b.label);a.language=_.yh(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.Eh=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.g}${a.f}`};
54
- _.Fh=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)},""):""};Gh=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};
55
- Hh=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};Ih=function(a,b){return _.y(function*(){const c=_.nh(b);return yield vh(a.g,c)})};Mh=function(a,b,c){return _.y(function*(){const {mimeType:d,renditions:e}=yield Jh(a,b,c),f=new _.Ch("dummy",_.N),g=e.map((h,k)=>{k=new _.Kh(`R${k}`,f);k.bandwidth=h.bandwidth;k.Bc=h.Bc;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});Lh(g);return{renditions:g,mimeType:d||void 0}})};
56
- Oh=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Nh(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};Jh=function(a,b,c){return _.y(function*(){const d=Ph(b),e=Qh(b,c);return{mimeType:yield Rh(a,e,d[0]?d[0].codec:null),renditions:d}})};
57
- Lh=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.");};Nh=function(a){const b=_.ih(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a("TYPE");c=null!=c?{AUDIO:_.M,VIDEO:_.N,SUBTITLES:_.L}[c]:void 0;return{type:c,groupId:a(_.Ba),name:a("NAME"),language:a(_.Ga),Gg:a("AUTOSELECT"),default:a("DEFAULT"),Ng:a("FORCED"),ye:a("CHARACTERISTICS"),uri:a(_.lb)}};
58
- Ph=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.ih(0,b);if(c.getAttribute(_.rb))throw Error("Playlist contains alternative video streams.");var d=_.J(c,_.Za);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.J(c,_.ja);e=e?Number(e):null;var f=_.J(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.J(c,_.ka);c=_.Sh(_.w,c?c.split(","):[]);return b={bandwidth:e,Bc:f,codec:c,width:b,height:d,mimeType:null}})};
59
- Qh=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?Hh(a,b):null};Rh=function(a,b,c){return _.y(function*(){if(!b||!c)return null;var d=yield Ih(a,b);d=[Th(d,b),Uh(d,b)].filter(Boolean);return _.Vh(d,_.w,c)})};Th=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?Hh(a,b):null};Uh=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.J(_.ih(0,a),_.lb))?Hh(a,b):null:null};
60
- _.Xh=function(a,b,c){for(const d of _.Wh)if(d.probe(b,c))return d.create(a);return null};_.Yh=function(a){a=_.Wh.indexOf(a);0<=a&&_.Wh.splice(a,1)};_.Zh=function(a,b){b&&(a+='; codecs\x3d"'+b+'"');return a};$h=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};
61
- di=function(){if(ai)return ai;bi||(bi=new _.ci(()=>{ai=null}));(ai=document.querySelector(_.w)||document.querySelector(_.p))||(ai=document.createElement(_.w));bi.da(1);return ai};_.ei=function(){return!!navigator.userAgent.match(/Edge?\//)};_.fi=function(a){return(navigator.userAgent||"").includes(a)};_.gi=function(a){return _.fi("Tizen"+(a?" "+String(a):""))};
62
- ii=function(a){const b={major:-1,name:Be};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=hi(a,c[0]));2<=c.length&&(b.minor=hi(a,c[1]));3<=c.length&&(b.patch=hi(a,c[2]));4<=c.length&&(b.build=hi(a,c[3]));return b};_.ji=function(){return _.fi("Web0S")};_.li=function(){return _.ji()&&79===ki().major};
63
- ki=function(){const a=mi();const b=["ie","edge","opera","firefox","safari",yc];var c=ni();const d=oi[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return ii(c[1]);return ii("")};_.pi=function(){return _.fi("CrKey")};_.qi=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.gi()};_.ri=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.qi()&&1<navigator.maxTouchPoints};_.si=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
64
- hi=function(a,b){try{return parseInt(b,10)}catch(c){vi.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};wi=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};
65
- ni=function(){const a=mi();if(!a)return xi;var b=a.match(/^.+?(?=\))/);if(!b)return xi;b=b[0];if(wi(b,["iphone","ipad"]))return yi;if(wi(b,["android"]))return zi;if(wi(b,["macintosh"]))return Ai;if(wi(b,["windows nt"]))return Bi;if(wi(b,["tizen"]))return Ci;if(wi(b,["web0s"]))return Di;if(wi(b,["linux"]))return Ei;vi.warn("Unable to identify OS from user agent: "+a);return xi};mi=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
66
- _.Gi=function(){var a=ni();var b=ni();var c=oi[b];if(c){c=mi().match(c.os_version)[1];c=ii(c);if(b===Bi)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=ii("");a:{c=mi();const e=["ie","edge","opera","firefox","safari",yc];var d=ni();d=oi[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=Fi}return{os:a,osVersion:b,browser:c,browserVersion:ki()}};
67
- Hi=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.sf(a,{kind:_.yh(b.kind),language:_.yh(b.language),label:_.yh(b.label)},["kind","language","label"])};Ii=function(a){return a.enabled||a.selected||a.mode===_.ie||a.mode===_.ed};Ki=function(a,b,c){return Ji(a)&&b===_.N&&!!c.enableHlsVideoTrackInfo};
68
- Li=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})))})};Mi=function(a,b,c){return Ji(a)&&(b===_.M||b===_.L)&&!!c.enableMetadata};
69
- Ni=function(a,b,c){return _.y(function*(){var d=a.l.getLoadedSource();d&&a.j&&(d=yield a.j.f(d.url,c),d.vc&&(d=d.vc.get(`${b.type}:${b.label}`))&&d.ye&&(b.accessibility=d.ye.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Oi=function(a,b){return a.h.filter(c=>c.type===b)};Pi=function(a){(a=a.l.getTextDisplayer())&&a.remove(0,Infinity)};Ri=function(a,b){if(a=Qi(a,b))a=Array.from(a),b===_.L&&(a=a.filter(c=>c.kind!==_.vd));return a};
70
- Qi=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 _.M:return a.audioTracks;case _.N:return a.videoTracks;case _.L:return a.textTracks;default:return null}};Si=function(a,b){return(a=a.f.get(b)||null)&&a.renditions[0]};Ti=function(a,b){return(a=a.m.get(b))&&a.renditions[0]};
71
- Wi=function(a,b,c){const d=Ri(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 _.L:f="mode";e=_.ie;g=_.Qc;break;case _.M:f="enabled";break;case _.N:f="selected"}if(f)for(const h of d)h[f]=Hi(c,h,c.type)?e:g}}else if(a.a.debug(_.va+b),a.f.get(b)&&d&&b===_.L){for(e of d)e.mode=
72
- _.Qc;a.f.set(b,null)}b===_.M?a.l.trigger(new _.F(_.Ui)):b===_.L&&a.l.trigger(new _.F(_.Vi))};Xi=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=_.Sg(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
73
- Yi=function(a,b){return _.y(function*(){var c=a.l.getConfiguration(),d=_.Xh(c,b.mimeType,_.ve);if(d){c=_.nh(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(_.K(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.ve},Xi(a,d,c))}else a.a.warn("Track mimetype is not supported",b)})};Ji=function(a){a=a.l.getLoadedSource();return!(!a||a.type!==_.Zi&&!a.url.endsWith(".m3u8"))&&_.qi()};
74
- $i=function(a,b,c){c=_.Yf(c).filter(e=>e);a.a.info("Find preferred tracks for",b,c);const d=Oi(a,b);c.some(e=>{const f=_.vg(e);return(e=d.find(g=>{g=_.vg(g.language||"");return _.wg(f,g)}))?(a.a.info("Will select track with id",e.id),Wi(a,b,e),!0):!1})};bj=function(a){return a.name===Sa&&aj.some(b=>a.message.startsWith(b))};
75
- _.ej=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.ri()&&(a=360);const b=_.kh();b.maxAttempts=3;a={source:"",license:cj,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.kh(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,
76
- restrictions:dj(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,
77
- 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},
78
- restrictions:dj(),tizen:{sideStreamText:_.gi(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1}};if(_.fi("Edge/")||_.gi())a.streaming.gapDetectionThreshold=.5;_.ji()&&(a.streaming.stallEnabled=!1);_.li()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.gi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,
79
- invertVerticalControl:!1};return a};dj=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}};
80
- _.gj=function(...a){if(!a)return _.ej();var b=[_.ej()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.qf(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({suggestedPresentationDelay:0,streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{hlsLowLatency:!0}}),c=!0),b.push(d));a=_.kf.apply(null,b);_.qf(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));
81
- if(!_.B(a.volume)&&(!_.rf(a.volume)||tf(a.volume)))throw new _.H(_.G,7,7100,"config.volume is not a number");if(!_.B(a.preferredTextLanguage)&&!_.qf(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.G,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.B(a.preferredAudioLanguage)&&!_.qf(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.G,7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.B(a.preferredAudioCodec)&&
82
- !_.qf(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.G,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.B(a.preferredVideoCodec)&&!_.qf(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.G,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.B(a.drm)){if(a.drm.env&&!_.qf(a.drm.env))throw new _.H(_.G,7,7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.qf(a.drm.offlineId))throw new _.H(_.G,
83
- 7,7100,"config.drm.offlineId is not a string");}if(b=a.streaming){b.bufferingGoal=Number(b.bufferingGoal);b.rebufferingGoal=Number(b.rebufferingGoal);b.bufferBehind=Number(b.bufferBehind);b.smallGapLimit=Number(b.smallGapLimit);b.durationBackoff=Number(b.durationBackoff);if(!_.rf(b.bufferingGoal)||tf(b.bufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.rf(b.rebufferingGoal)||tf(b.rebufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal is not a number");
84
- if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.rf(b.bufferBehind)||tf(b.bufferBehind))throw new _.H(_.G,7,7100,"config.streaming.bufferBehind is not a number");if(!_.rf(b.smallGapLimit)||tf(b.smallGapLimit))throw new _.H(_.G,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.rf(b.durationBackoff)||tf(b.durationBackoff))throw new _.H(_.G,7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;
85
- if(_.B(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.r)throw new _.H(_.G,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");fj(a.restrictions);fj(a.abr.restrictions);a.abr.initialRestrictions&&fj(a.abr.initialRestrictions)}return a};
86
- fj=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);
87
- 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");};_.hj=function(a){return typeof a===_.Dd&&!Array.isArray(a)&&"source"in a};_.jj=function(a){return _.ij.get(a)||null};
88
- _.lj=function(a){_.ij.get(a.id())?kj.warn("Component already in use."):_.ij.set(a.id(),a)};mj=function(a){for(const b of _.ij.values())a(b)};nj=function(a){return _.Pg(a,_.Jc)||_.Pg(a,_.Kc)};oj=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Ye]=a.f),a.a&&(b.headers[Ze]=a.a))};
89
- pj=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Ye],a.a=b.headers[Ze],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.g.debug("Loaded tracking token "+a.f),a.a&&a.g.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.Ig(_.$g(b))),{delay:a.renewalPeriod,Dg:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.rj=function(a){_.qj[a.I]=a};
90
- _.tj=function(a){const b={attemptParameters:_.kh(),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&&
91
- (b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),a.env)){const c=_.qj[a.env]||null;if(!c)throw _.Hf(_.qa,_.Xa+a.env+_.aa),new _.H(_.G,6,6015,`DRM environment '${a.env}' is missing.`);b.Pa=_.sj(c,a.customData)||{};_.Pg(a.env.toLowerCase(),Wc)&&(b.enforceSingleSession=!0)}return b};vj=function(a){a=uj[a];if(!a)return null;const b=_.Gi();return b.os===zi&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
92
- _.sj=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[_.Lc];if(g){var h=g.licenseUrl;d=wj(d,g.videoRobustness);e=wj(e,g.audioRobustness);var k=g.modifiers,l=hg(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=hg(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.pe?vj(f):f;c[_.Lc]=
93
- {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.g[_.Jc])&&(c[_.Jc]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.g[_.Kc])&&(c[_.Kc]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
94
- modifiers:g.modifiers});return c};wj=function(a,b){const c=_.Gi();if(c.os!==zi||c.browser!==yc)return a||b};_.xj=function(){throw new _.H(_.G,3,3E3);};_.yj=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.K(a.f.buffer);b=_.K(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.xj()}};_.O=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.xj()}};_.zj=function(a){return a.a<a.f.byteLength};_.Aj=function(){throw new _.H(_.G,3,3E3,"Buffer read out of bounds.");};
95
- _.Bj=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.Aj()}};_.Cj=function(a){try{const b=a.f.getUint16(a.a,a.g);a.a+=2;return b}catch(b){_.Aj()}};_.P=function(a){try{const b=a.f.getUint32(a.a,a.g);a.a+=4;return b}catch(b){_.Aj()}};_.Dj=function(a){try{const b=a.f.getInt32(a.a,a.g);a.a+=4;return b}catch(b){_.Aj()}};
96
- _.Ej=function(a){let b=0,c=0;try{!0===a.g?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.Aj()}if(2097151<c)throw new _.H(_.G,3,3001);a.a+=8;return c*Math.pow(2,32)+b};Fj=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.Bj(a);return c};_.Gj=function(a,b){a.a+b>a.f.byteLength&&_.Aj();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.K(c)};
97
- Hj=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Ij=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.Jj=function(a){for(;_.zj(a.reader)&&!a.parser.a;)a.parser.ld(a.start+a.headerSize,a.reader,a.partialOkay)};_.Kj=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.ld(a.start+a.headerSize,a.reader,a.partialOkay)};_.Lj=function(a){return b=>{const c=b.reader.Ba()-b.reader.getPosition();a(_.Gj(b.reader,c))}};
98
- _.Mj=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};Nj=function(a){let b="";try{b=_.Lg(a)}catch(c){}return b};_.Pj=function(a){a=Nj(a);let b="";a.length&&(b=(new _.Oj(a)).a);return b};Rj=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Ig(a)),d=_.$g(c.sinf[0]);(new _.Qj).L(_.je,_.Jj).L("schi",_.Jj).L("tenc",e=>{e.reader.skip(6);_.Bj(e.reader)&&(e.reader.skip(1),b=_.bh(_.Gj(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
99
- Tj=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.G,6,6102);let d;typeof b===_.pe?d=_.Ng(b,!0):d=b;a=_.Ng(Nj(a),!0);b=new _.Sj(12+a.byteLength+d.byteLength+c.byteLength,!0);_.O(b,a.byteLength);_.yj(b,_.K(a));_.O(b,d.byteLength);_.yj(b,_.K(d));_.O(b,c.byteLength);_.yj(b,_.K(c));return _.K(b.buffer)};_.Uj=function(a){var b=_.K(a.body);b=_.Zg(b);a.headers[pa]=$b;a.body=_.Mg("spc\x3d"+b).buffer};
100
- _.Vj=function(a){let b;try{b=_.Ig(a.data)}catch(c){return}b=b.trim();"\x3cckc\x3e"===b.substr(0,5)&&"\x3c/ckc\x3e"===b.substr(-6)&&(b=b.slice(5,-6));try{const c=JSON.parse(b);c.ckc&&(b=c.ckc);c.CkcMessage&&(b=c.CkcMessage);c.License&&(b=c.License)}catch(c){}a.data=Gg(_.$g(b))};ak=function(a,b){b=Wj(b);if(a==_.Lc)return b+Xj;if(a==_.Kc)return b+Yj;if(a==_.Jc)return b+Zj;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
101
- _.dk=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(sa)?c.customData&&(_.ck(b,a),a=b.uris[0],d&&c.customData.assetId&&(a+="?assetId\x3d"+encodeURI(`${c.customData.assetId}`),c.customData.variantId&&(a+="\x26variantId\x3d"+encodeURI(`${c.customData.variantId}`)),b.uris[0]=a)):bk.warn(Oa)};
102
- _.ek=function(a,b){try{const c=_.K(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));bk.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){bk.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
103
- _.gk=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.dk(a,b,c,!1);b.headers[pa]=$b;c={spc:_.Yg(b.body)};if((a=a.drm)&&a.env.startsWith(ta)&&d){a={};var e=Gh((new _.Oj(fk(d))).f);d=e.keyId;if(e=e.assetId)bk.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(bk.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(bk.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(bk.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
104
- _.Og(_.Fh(c,!0))};_.hk=function(a,b){bk.debug("Clearing response data");200===b.status&&(a=_.Ig(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.$g(a).buffer)};
105
- _.ik=function(a,b,c){b=Nj(b);c=c&&c.customData?c.customData:{};b=new _.Oj(fk(b));const d=Gh(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.Rg(`${a}`)&&(d.assetId=a,bk.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.Rg(`${e}`)&&(d.variantId=e,bk.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],bk.debug("KeyId found in FPS SKD. Removing other parameters")):
106
- a=["assetId","variantId"];b.f=_.Fh(d,!1,a);"/"!==b.path||b.h.includes(`${b.a}/`)||(b.path="");b=_.Eh(b);return c.fpsContentId=b};_.jk=function(a,b){a=a.drm;if(!a||!a.env.startsWith(sa))bk.warn(Oa);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(ta)){const c=new _.ig(b.uris[0]);let d=c.ya;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.ya=d;b.uris[0]=c.toString()}};kk=function(a,b,c){_.dk(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.ig(b.uris[0]);c.a.add(_.Od,a);b.uris[0]=c.toString()};
107
- Wj=function(a){if(a===lk)return"https://lic.drmtoday.com";if(a===mk)return"https://lic.staging.drmtoday.com";if(a===nk)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};fk=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
108
- _.ck=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};a:{for(d in c)if(void 0!==c[d]){var d=!0;break a}d=!1}d&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};pk=function(a){const b={},c=a?a[$e]:void 0;a=ok[a?a[$e]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
109
- rk=function(a,b=0){_.Cf("Registering EME Factory: "+a.a());a={priority:b,Gb:a};for(let c=0;c<qk.length;++c)if(qk[c].priority<b){qk.splice(c,0,a);return}qk.push(a)};sk=function(a){if(a){const {Gb:b}=qk.find(({Gb:c})=>c.a()===a);if(b&&b.ea())return _.Cf(vb+b.a()),b.create();_.Cf("Cannot create selected EME manager. Choosing by priority list.")}for(const {Gb:b}of qk)if(b.ea())return _.Cf(vb+b.a()),b.create();throw Error("Missing EME managers");};
110
- _.vk=function(a){var b=_.ah(a);b=parseInt(b.byteLength,10).toString(16);b=_.ah("12"+b+a);return new tk(uk,a,b)};
111
- _.xk=function(a){const b=new _.wk(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.Ij(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.Gj(b,16);f=_.bh(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let t=_.Bj(b),v=(t&127)>>>0,x=7;for(;128<=t&&28>=x;)t=_.Bj(b),v=(v|(t&(28>x?127:15))<<x)>>>0,x+=7;return 28<x?-1:v},k=t=>{switch(t){case 0:do if(!_.zj(b))throw Error("not enough data to skip!");while(_.Bj(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
112
- 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(;_.zj(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=Fj(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.Hf("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Yg(m):"","keyIds",l.map(t=>_.bh(t)));return 0<l.length?_.vk(_.bh(l[0])):null};
113
- yk=function(a){return _.y(function*(){const b=new Promise(c=>{(new _.ci(c)).da(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};_.Ak=function(a){return zk(a)?_.Kc:a};Bk=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};
114
- Ck=function(a,b){if(a.keySystem){var c=_.Ak(a.keySystem);b=b[c];c===_.Ld&&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=
115
- b.serverCertificate||null)))}};Dk=function(a,b){a=_.Pj(b);_.Hf("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
116
- Ek=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&"APPLE"===h){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.of(k)||(k=Dk);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=Tj(c,l,a)}return c};zk=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
117
- Fk=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.ch(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])}};
118
- Gk=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.Xd(_.vf(c));a.o||a.a.info(ra);a.o=!0;a.B=!1};Hk=function(a){a.g.forEach((b,c)=>{const d=b.Td;let e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Td=e)})};
119
- Ik=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 yk(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",
120
- 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})};_.Pk=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=uf(a.h.Pa);Bk(b,d)}if(d=Jk(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)Ck(f,a.h.Pa);b=Nk(a,b);if(!b.size)return a.R=!0,Promise.resolve();a=_.Ok(a,b);return c?a:a.catch(()=>{})};
121
- _.Rk=function(a,b,c){a.H=Qk;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 _.Pk(a,b)};
122
- _.Ok=function(a,b){if(1==b.size&&b.has(""))return Promise.reject(new _.H(_.G,6,6E3));null===a.m&&(a.m=sk(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 _.Sk;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===_.Kc){const n=
123
- a.D.getConfiguration();if(!_.ei()||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=_.Gi();if(h.os===Bi&&10<=h.osVersion.major&&"edge"===h.browser)g=_.Kc;else if("safari"===h.browser)g=_.Jc;else if(h.browser===yc||"firefox"===h.browser)g=_.Lc}g&&(h=b.get(g))&&(f(!0,h,g),f(!1,h,g));for(const k of[!0,!1])b.forEach((l,
124
- 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(_.Ak(k.keySystem));q=[];l=[];const t=[],v=[];Fk(n.drmInfos,q,l,t,v);1<l.length&&_.C("Multiple unique server certificates found! Only the first will be used.");
125
- 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==_.de,persistentStateRequired:n.persistentState==_.de,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:"",serverCertificate:l[0],initData:t,keyIds:v,periodId:null}}a.f=m;if(!a.f.licenseServerUri)throw new _.H(_.G,6,6012,a.f.keySystem);
126
- 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};
127
- Jk=function(a){a=uf(a.h.Pa[_.Ld]||{});if(0==a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.ah(f);e=_.ah(e);e={kty:"oct",kid:_.Zg(f,!1),k:_.Zg(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Mg(d),initDataType:"keyids"}];return{keySystem:_.Ld,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
1
+ let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ka,oa,pa,ra,ta,ua,va,xa,Ca,Da,Ea,Fa,Ga,Ia,Oa,Pa,Qa,Ra,Ta,Ua,Va,Wa,Ya,ab,hb,kb,mb,nb,qb,tb,wb,xb,zb,Bb,ac,fc,tc,uc,Ac,Bc,Cc,Ec,Fc,Hc,Ic,Jc,Kc,Lc,Rc,Uc,Zc,$c,ad,bd,dd,gd,hd,id,md,ud,wd,xd,Cd,Fd,Ud,de,fe,ge,he,ie,je,ke,oe,pe,qe,ue,we,Ee,He,Pe,We,Xe,kf,of,pf,qf,rf,sf,uf,vf,wf,xf,yf,zf,Cf,Df,If,Ff,Uf,Vf,Zf,ag,ig,sg,tg,mg,pg,vg,xg,wg,zg,Ag,Bg,Eg,Fg,Hg,Ig,Mg,Og,Qg,Kg,Vg,Xg,Wg,Yg,Zg,$g,eh,fh,ih,Ih,Mh,Nh,Oh,Ph,Qh,Sh,Th,Uh,Xh,$h,di,ei,ii,ki,fi,hi,ji,li,mi,ni,pi,qi,wi,Ci,Hi,Ji,Gi,Ti,Mi,
2
+ Li,dj,ej,gj,hj,ij,jj,kj,lj,nj,mj,oj,pj,sj,tj,uj,fj,wj,yj,Aj,Cj,Jj,Kj,Lj,Mj,Nj,Oj,Pj,Qj,Rj,Sj,Tj,Zj,ik,kk,qk,uk,wk,Dk,Nk,zk,Ik,Sk,Uk,Vk,jl,kl,pl,sl,tl,ul,wl,xl,yl,ql,vl,zl,Al,Bl,Cl,Dl,El,Kl,Pl,Rl,Tl,Sl,Vl,Nl,bm,Zl,am,$l,Ql,cm,dm,em,km,lm,mm,pm,tm,um,wm,rm,qm,Em,Fm,Jm,Im,Lm,Nm,Om,Km,Qm,Rm,Wm,an,bn,cn,gn,hn,fn,jn,en,dn,ln,nn,pn,qn,rn,sn,tn,un,vn,wn,xn,yn,Cn,Gn,Hn,Jn,Ln,On,Vn,Pn,Qn,Tn,Wn,Xn,Zn,co,eo,go,io,jo,ho,bo,$n,ao,ko,lo,mo,po,no,oo,qo,ro,so,to,uo,vo,wo,xo,yo,zo,Bo,Co,Do,Fo,Ho,Mo,No,Oo,Qo,Ro,So,
3
+ Uo,Vo,To,Wo,Zo,Yo,Xo,$o,dp,cp,ip,Af,Bf;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="6.11.0";_.ea="AdaptationSet";_.fa="Already destroyed. No-op";_.ha="Already released. No-op";_.ia="Autoplay is not allowed due to browser policy.";_.ja="BANDWIDTH";ka="CHECKSUM";_.la="CODECS";_.ma="Cannot retrieve buffer information due to platform limitations";_.na="CastlabsPlayer";oa="Content-Length";pa="Content-Type";_.qa="Could not find configured DRM environment.";
4
+ ra="DRM licenses loaded";ta="DRMtoday";ua="DRMtodayOnboard";va="Destroying player";_.wa="Disable track type ";xa="Error while decoding string!";_.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_ALL";Da="HW_SECURE_CRYPTO";Ea="HW_SECURE_DECODE";Fa="HeaderDrm";Ga="InvalidStateError";_.Ha="LANGUAGE";Ia="License verification failed: ";_.Ka="Loading player with configuration";_.La="MaxHeight";
5
+ _.Ma="MaxWidth";Oa="Missing media element";Pa="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Qa="No event provided!";Ra="No items in the playlist";Ta="No track data attached to the event, unable to add track!";Ua="Not a persistent session.";Va="NotAllowedError";Wa="NotSupportedError";_.Xa="PlayReady License URL is not defined";Ya="Player not ready yet.";_.Za="Player sources";_.$a="Please make sure ";ab="Preloading is not supported by this player.";
6
+ _.bb="QualityLevel";_.cb="RESOLUTION";_.fb="Releasing player with source";_.gb="Representation";hb="STANDARD";_.ib="SW_SECURE_CRYPTO";_.jb="SW_SECURE_DECODE";kb="Session is closed";mb="Signature Verification failed";nb="Skipping Session creation. License for init data was already requested in ";_.ob="SmoothStreamingMedia";_.pb="TYPE";qb="The index is not in the allowed range.";_.rb="URI";tb="Unable to translate ";_.ub="Unhandled/ignored event";_.vb="Unregistering listeners";wb="Unsupported keySystem";
7
+ xb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.yb="VIDEO";zb="WebkitEmeManager.MediaKeySession.load";_.Ab="Widevine License URL is not defined";Bb="Will create EME Manager: ";_.Cb="ad-break-started";_.Db="ad-break-stopped";_.Eb="ad-buffering";_.Fb="ad-clicked";_.Gb="ad-completed";_.Hb="ad-first-quartile";_.Ib="ad-impression";_.Jb="ad-loaded";_.Kb="ad-midpoint";_.Lb="ad-paused";_.Mb="ad-progress";_.Nb="ad-resumed";_.Ob="ad-skipped";_.Pb="ad-started";_.Qb="ad-stopped";_.Rb="ad-third-quartile";
8
+ _.Tb="addtrack";_.Vb="ads-timeline-changed";_.Wb="airplay-casting-ended";_.Xb="airplay-casting-started";_.Yb="airplay-status-changed";_.Zb="application/cea-608";_.$b="application/dash+xml";ac="application/mp4";_.bc='application/mp4; codecs\x3d"stpp"';_.cc='application/mp4; codecs\x3d"wvtt"';_.dc="application/ttml+xml";_.ec="application/vnd.ms-sstr+xml";fc="application/x-www-form-urlencoded";_.p="audio";_.gc="audio/aac";_.hc="audio/ac3";_.ic="audio/eac3";_.jc="audio/mp4";_.kc="audiobufferchanged";
9
+ _.lc="autoplaynotallowed";_.mc="bitratechanged";_.nc="boolean";_.oc="bufferingended";_.sc="bufferingstarted";tc="canplay";uc="canplaythrough";_.vc="castingstarted";_.wc="caststatuschanged";_.xc="cdn-switch-success";_.yc="cenc";_.zc="center";Ac="certificate-request";Bc="change";Cc="chrome";_.Dc="clpp-fill";Ec="clpp-hidden";Fc="clpp-mc-playlist";_.Gc="clpp.cast.CastSender";Hc="clpp.drm.HeaderDrm";Ic="clpp.drm.eme.AppleEmeManager";Jc="clpp.native.Player";Kc="clpp.plist.McPlaylist";Lc="clpp.utils.Platform";
10
+ _.Mc="codecs";_.Nc="column-reverse";_.Oc="com.adobe.primetime";_.Pc="com.apple.fps";_.Qc="com.microsoft.playready";Rc="com.microsoft.playready.recommendation";_.Sc="com.widevine.alpha";_.Tc="config.drm.customData is not defined";Uc="controls";_.Vc="cuechange";_.Wc="destroy()";_.Xc="disabled";_.Yc="div";Zc="drm.mediaKeys.end";$c="drm.mediaKeys.start";ad="drm.onPlay.end";bd="drm.onPlay.start";_.cd="drmexpirationupdate";dd="drmrenewalstarted";_.ed="drmsessionpersisted";_.fd="drmsessionupdate";gd="drmtoday";
11
+ hd="durationchange";id="encrypted";_.jd="end";_.kd="ended";_.ld="error";md="fullscreenElement";_.od="function";_.pd="height";_.qd="hidden";_.rd="html";_.sd="image";_.td="internal-error";ud="keystatuseschange";_.vd="left";wd="license-renewal";xd="license-request";_.yd="line-left";_.zd="line-right";_.Ad="loadeddata";_.Bd="loadedmetadata";Cd="loadstart";_.Dd="mdat";_.Ed="mdia";Fd="message";_.Gd="metadata";_.Hd="mimeType";_.Id="minf";_.Jd="moov";_.Kd="mp4";_.Ld="mpd-type-changed";_.Md="mpeg-dash-callback-event";
12
+ _.Nd="none";_.r="number";_.Od="object";_.Pd="onBitrateChanged()";_.Qd="onPlayerError()";_.Rd="onPlayerWillDestroy";_.Sd="onPlayerWillRelease";_.Td="onStateChanged()";Ud="online-status-changed";_.Yd="optional";_.Zd="org.w3.clearkey";_.$d="output-restricted";_.ae="pause";_.be="persistent";_.ce="persistent-license";de="picture-in-picture";_.ee="play";fe="player.afterLoad.end";ge="player.afterLoad.start";he="player.beforeLoad.end";ie="player.beforeLoad.start";je="player.load.end";ke="player.load.start";
13
+ _.le="playing";_.me="playlist-item-changed";_.ne="playlist-modified";oe="playlist.next.end";pe="playlist.next.start";qe="preload-failed";_.re="progress";_.se="px";_.te="ratechange";ue="released";_.ve="releasing";we="removetrack";_.xe="required";_.ye="resize";_.ze="right";_.Ae="seeked";_.Be="seeking";_.Ce="showing";_.De="sinf";Ee="stalled";_.Fe="start";_.Ge="statechanged";He="status-pending";_.Ie="stbl";_.Je="string";_.Ke="stsd";_.Le="style";_.Oe="subtitles-htmlcue";Pe="temporary";_.t="text";
14
+ _.Qe="text/vtt";_.Re="text/xml";_.Se="timeupdate";_.Te="trak";_.Ue="ttml-xml";_.Ve="und";We="unknown";Xe="update";_.Ye="urn:scte:scte35";_.Ze="urn:scte:scte35:2014";_.$e="user-seeked";_.af="user-seeking";_.bf="value";_.cf="vertical-lr";_.df="vertical-rl";_.w="video";_.ef="video/mp2t";_.ff="video/mp4";_.gf="videobufferchanged";_.hf="videotrackchanged";_.jf="vimond-response";kf="visibilitychange";_.lf="vtt-xml";_.mf="waiting";_.nf="waitingforkey";of="webkit-org.w3.clearkey";pf="webkitkeyadded";qf="webkitkeyerror";
15
+ rf="webkitkeymessage";sf="webkitneedkey";_.tf="width";uf="x-dt-csl-tracking-token";vf="x-dt-follow-up-token";wf="x-dt-resp-code";yf=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};zf=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:yf(a)}};
16
+ Cf=function(a,b){if(b){var c=Af;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&&Bf(c,a,{configurable:!0,writable:!0,value:b})}};Df=function(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})};_.x=function(a){return Df(a())};
17
+ _.z=function(a,b){a=a.split(".");var c=Ef;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};_.Hf=function(a){return _.B(a)||Ff(a)?a:_.Gf(a)};_.Gf=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=If(b,{merging:a[c]},1));return b.merging||null};
18
+ If=function(a,b,c){const d=c+1;if(_.B(a)||!_.Kf(a))a={};for(const e in b)c=b[e],Ff(c)||_.B(c)||_.Lf(c)||c instanceof Element?a[e]=c:_.Kf(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.Lf(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=If([],c,d):!_.B(c)&&_.Mf(c)&&20>d&&(a[e]=If(a[e],c,d));return a};Ff=function(a){a=typeof a;return a===_.Je||a===_.r||a===_.nc};_.B=function(a){return null===a||"undefined"===typeof a};_.Kf=function(a){return typeof a===_.Od};
19
+ _.Lf=function(a){return typeof a===_.od};_.Rf=function(a){return typeof a===_.Je};_.Sf=function(a){return typeof a===_.r};_.Mf=function(a){if(_.B(a)||!_.Kf(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
20
+ _.Tf=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||!_.Kf(a)||!_.Kf(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};
21
+ Uf=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};Vf=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.Wf=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};Zf=function(a){return a&&0<=Xf[a]?Xf[a]:Yf};ag=function(a){if(!a)return _.C("clpp.log",tb+a+ca),-1;const b=$f[a.toUpperCase()];return void 0===b?(_.C("clpp.log",tb+a+ca),-1):b};_.cg=function(a){bg.info.apply(bg,arguments)};_.dg=function(a){bg.debug.apply(bg,arguments)};
22
+ _.C=function(a){bg.warn.apply(bg,arguments)};_.eg=function(a){bg.error.apply(bg,arguments)};_.hg=function(a){if(a){var b=a.a();b in _.fg?_.gg.warn("Player-Factory '"+b+"' already registered"):(_.fg[b]=a,_.gg.info("Registered Player-Factory: '"+b+"'"))}};_.jg=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)ig(b[c]);a.a.clear()};_.kg=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)};
23
+ ig=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
24
+ sg=function(a,b){a.h.debug("onMetadata_()");b.mode=_.qd;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:_.lg,eventElement:null};a.o&&d&&"SCTE35-IN"===f.value.key&&0<f.startTime?(g.startTime=0,g.endTime=f.startTime):(g.startTime=f.startTime,g.endTime=f.endTime);d=!1;c.push(g);return c[c.length-1]};if(b.cues){for(const f of b.cues){if(mg(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
25
+ _.Ze;g.type=_.ng;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.m.trigger(new _.F(_.og,{detail:f}));Array.prototype.push.apply(a.g,c);pg(a,c,b);a.f.off(b,_.Vc);a.f.on(b,_.Vc,f=>{f=f.target.activeCues;f=f.length?mg(a,f[0]):a.a;var g;if(g=f){{g=f;const h=a.m.getPosition();g=g.startTime<=h&&h<g.endTime}}if(g)a.a=f,a.m.trigger(new _.F(_.qg,{detail:f}));else{if(f=a.a)f=a.a,g=a.m.getPosition(),f=f.endTime<=g;f&&(f=a.a,a.a=null,a.m.trigger(new _.F(_.rg,{detail:f})))}})}};
26
+ tg=function(a,b){a.j=b;a.l=a.j.textTracks;a.f.on(a.l,_.Tb,c=>{c=c.track;c.kind===_.Gd&&sg(a,c)})};mg=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};pg=function(a,b,c){if(a.o){for(;0<c.cues.length;)c.removeCue(c.cues[0]);b.forEach(function(d){c.addCue(new DataCue(d.startTime,d.endTime,{key:"SCTE35-OUT",data:null}))})}};_.ug=function(a){return Array.isArray(a)?a:[a]};
27
+ vg=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};xg=function(a,b,c){if(null==a&&null==b)return!0;if(null==a||null==b)return!1;a=c?a.map(c):a;b=c?b.map(c):b;return wg(a,b)&&wg(b,a)};wg=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.yg=function(a,b={}){if(b.De){const c=[];for(const d of a)c.some(e=>b.De(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};
28
+ zg=function(a,b){b=b.track;b.kind!==_.Gd&&(b.mode===_.Ce&&(b.mode=_.qd),a.a.on(b,_.Vc,c=>{c=c.target||c.srcElement;c.mode=_.qd;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};Ag=function(a,b,c,d){a=`${a===_.G?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.Rf(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};
29
+ Bg=function(a,b){const c=b||vg;let d=null,e=null,f=!1;return function(...g){if(f&&c(g,d))return e;f=!0;d=g;return e=a(...g)}};_.Cg=function(a){return null!=a};Eg=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new Dg("No non-null, non-undefined value found");};Fg=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
30
+ _.Gg=function(a){var b;a instanceof _.Gg?(Hg(this,a.Va),this.fc=a.fc,this.Ga=a.Ga,Ig(this,a.wc),this.xa=a.xa,_.Jg(this,Kg(a.a)),this.Wb=a.Wb):a&&(b=String(a).match(Lg))?(Hg(this,b[1]||"",!0),this.fc=Mg(b[2]||""),this.Ga=Mg(b[3]||"",!0),Ig(this,b[4]),this.xa=Mg(b[5]||"",!0),_.Jg(this,b[6]||"",!0),this.Wb=Mg(b[7]||"")):this.a=new _.Ng(null)};Hg=function(a,b,c){a.Va=c?Mg(b,!0):b;a.Va&&(a.Va=a.Va.replace(/:$/,""))};
31
+ Ig=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.wc=b}else a.wc=null};_.Jg=function(a,b,c){b instanceof _.Ng?a.a=b:(c||(b=Og(b,Pg)),a.a=new _.Ng(b))};Mg=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};Og=function(a,b,c){return typeof a===_.Je?(a=encodeURI(a).replace(b,Qg),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};Qg=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.Ng=function(a){this.f=a||null};
32
+ Kg=function(a){var b=new _.Ng;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};_.I=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.H(_.G,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};_.Sg=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Rg.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Tg=function(a,b){a=_.Sg(a);b=_.Sg(b);return a.split("-")[0]==b.split("-")[0]};
33
+ _.Ug=function(a,b){for(const c of a)if(!b(c))return!1;return!0};Vg=function*(a){for(let b=0;b<a;b++)yield b};Xg=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Wg(a)==Wg(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;const c=_.J(a);b=_.J(b);for(const d of Vg(a.byteLength))if(c[d]!=b[d])return!1;return!0};Wg=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.J=function(a,b=0,c=Infinity){return Yg(a,b,c,Uint8Array)};
34
+ Yg=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=Wg(a),g=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b*e,g));c=Math.min(a+Math.max(c*e,0),g);a/=e;return new d(f,a,c/e-a)};Zg=function(a,b=0,c=Infinity){return Yg(a,b,c,Uint16Array)};$g=function(a,b=0,c=Infinity){return Yg(a,b,c,Uint32Array)};_.ah=function(a,b=0,c=Infinity){return Yg(a,b,c,Int32Array)};_.bh=function(a,b=0,c=Infinity){return Yg(a,b,c,DataView)};
35
+ eh=function(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};fh=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};
36
+ _.gh=function(a){if(!a)return"";a=_.J(a);239===a[0]&&187===a[1]&&191===a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(xa);return a}a=escape(fh(a));try{return decodeURIComponent(a)}catch(b){throw Error(xa);}};
37
+ ih=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw hh.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.J(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(_.J(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return fh(c)};
38
+ _.jh=function(a,b){if(_.Rf(a))return a;let c="";b=!!b;const d=_.J(a);239==d[0]&&187==d[1]&&191==d[2]?c=_.gh(d):254==d[0]&&255==d[1]?c=ih(d.subarray(2),!1):255==d[0]&&254==d[1]&&(c=ih(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);hh.debug("Unable to find byte-order-mark, making an educated guess.");0==d[0]&&0==d[2]?c=ih(a,!1):0==d[1]&&0==d[3]?c=ih(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.gh(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
39
+ };_.kh=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};_.lh=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};
40
+ _.mh=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=$g(d):2===c?e=Zg(d):e=_.J(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.nh=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.oh=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};_.ph=function(a){return!!(a&&0<a.length)};_.qh=function(a){return!a||0===a.length};
41
+ _.rh=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(Uf(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""}};_.th=function(a){a=a.replace(/<[^>]+>/gi,"");sh.innerHTML=a;a=sh.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.vh=function(a,b){b=void 0==b?!0:b;a=_.uh(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};
42
+ _.uh=function(a){a=fh(_.J(a));return btoa(a)};_.wh=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};_.xh=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};_.yh=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};
43
+ _.zh=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!=b.length)return!1;for(let c=0;c<a.length;++c)if(a[c]!=b[c])return!1;return!0};_.Ah=function(a){var b=0;for(var c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);c=0;for(let d=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};
44
+ _.Bh=function(a,b){b.lastIndex=a.a;b=b.exec(a.f);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.a==a.f.length||null==b||b.position!=a.a)return null;a.a+=b.length;return b.results};
45
+ _.Fh=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.H(_.G,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.Ch(d);var f;(f=_.Bh(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.Bh(d,g);)c.push(new _.Dh(f[1],f[2]||f[3]))}return new _.Eh(a,b,c,e)};_.Hh=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...Gh]}};
46
+ Ih=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts;a.fatalStatusCodes=b.fatalStatusCodes||[...Gh]};
47
+ _.Kh=function(a,b){_.Rf(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.Jh,uriIndex:0,method:a.method||"GET",body:a.body||null,headers:Object.assign({},a.headers),allowCrossSiteCredentials:a.allowCrossSiteCredentials||!1,onProgress:a.onProgress||null,onFragment:a.onFragment||null,maxAttempts:a.maxAttempts||1,currentAttempt:0,baseDelay:a.baseDelay||1E3,backoffFactor:a.backoffFactor||2,fuzzFactor:a.fuzzFactor||.5,timeout:a.timeout||0,requestModifiers:a.requestModifiers||
48
+ [],responseModifiers:a.responseModifiers||[],startTime:a.startTime||null,endTime:a.endTime||null,contentType:a.contentType||null,licenseRequestType:a.licenseRequestType||null,sessionId:null,bytesRemaining:-1,bytesLoaded:-1,bytesTotal:-1,timescale:a.timescale||null,rateLimitBps:a.rateLimitBps||null,disableFragmentSupport:a.disableFragmentSupport||!1,disableMergedFragments:a.disableMergedFragments||!1,fatalStatusCodes:[...Gh],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&Ih(c,b);return c};
49
+ _.Lh=function(a,b,c,d,e,f,g,h){e&&(d=e);e={uri:d,data:b||new ArrayBuffer(0),headers:a,status:c,fromCache:!!a["x-shaka-from-cache"],timeMs:g,responseStartMs:h,request:f};if(200<=c&&299>=c&&202!==c)return e;g=null;try{g=_.jh(b,!0)}catch(k){}_.dg("HTTP error text:",g);throw new _.H(0<=(f.fatalStatusCodes||[]).indexOf(c)?_.G:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};
50
+ Mh=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};Nh=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};Oh=function(a,b,c){if(0>=a)return Promise.resolve();const d=8*c/a-b/1E3;return 0<d?new Promise(e=>{setTimeout(e,1E3*d)}):Promise.resolve()};
51
+ Ph=function(a,b,c){try{const d=a(b);if(d&&d.P&&d.abort)return c.resolve(d.P),()=>d.abort();c.resolve(d);return()=>Promise.resolve(d).then(()=>{}).catch(()=>{})}catch(d){return c.reject(d),()=>Promise.resolve()}};Qh=function(a,b){a.P.then(()=>b(!0),()=>b(!1));return a};_.Rh=function(a,b){a.a.push(Qh(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};Sh=function(a,b){return _.x(function*(){const c=yield a.fetch(b);return _.gh(c.data)})};
52
+ Th=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.x(function*(){if(!navigator.onLine)return!1;if(b){const e=_.Kh(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).P}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};Uh=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.Vh=function(a){return a&&a!==_.Ve?a:null};
53
+ Xh=function(a){if(!a)throw new _.H(_.G,3,3101,`Invalid track type: ${a}`);if(!_.Rf(a))throw new _.H(_.G,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.K:return _.K;case _.L:return _.L;case _.M:return _.M;case Wh:return Wh}throw new _.H(_.G,3,3101,`Unknown track type: ${a}.`);};
54
+ $h=function(a,b){a=Xh(a);const c=_.Vh(b.kind);let d=b.id;d||(d=String(_.Yh++));a=new _.Zh(d,c===_.Gd?Wh:a);a.kind=c;a.label=_.Vh(b.label);a.language=_.Vh(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.ai=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.g}${a.f}`};
55
+ _.bi=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)},""):""};_.ci=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};
56
+ di=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};ei=function(a,b){return _.x(function*(){const c=_.Kh(b);return yield Sh(a.f,c)})};ii=function(a,b,c){return _.x(function*(){const {mimeType:d,renditions:e}=yield fi(a,b,c),f=new _.Zh("dummy",_.M),g=e.map((h,k)=>{k=new _.gi(`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});hi(g);return{renditions:g,mimeType:d||void 0}})};
57
+ ki=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>ji(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};fi=function(a,b,c){return _.x(function*(){const d=li(b),e=mi(b,c);return{mimeType:yield ni(a,e,d[0]?d[0].codec:null),renditions:d}})};
58
+ hi=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.");};ji=function(a){const b=_.Fh(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.pb);c=null!=c?{AUDIO:_.L,VIDEO:_.M,SUBTITLES:_.K}[c]:void 0;return{type:c,groupId:a(_.Ba),name:a("NAME"),language:a(_.Ha),Xg:a("AUTOSELECT"),default:a("DEFAULT"),eh:a("FORCED"),Ce:a("CHARACTERISTICS"),uri:a(_.rb)}};
59
+ li=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.Fh(0,b);if(c.getAttribute(_.yb))throw Error("Playlist contains alternative video streams.");var d=_.I(c,_.cb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.I(c,_.ja);e=e?Number(e):null;var f=_.I(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.I(c,_.la);c=_.oi(_.w,c?c.split(","):[]);return b={bandwidth:e,Ac:f,codec:c,width:b,height:d,mimeType:null}})};
60
+ mi=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?di(a,b):null};ni=function(a,b,c){return _.x(function*(){if(!b||!c)return null;var d=yield ei(a,b);d=[pi(d,b),qi(d,b)].filter(Boolean);return _.ri(d,_.w,c)})};pi=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?di(a,b):null};qi=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.I(_.Fh(0,a),_.rb))?di(a,b):null:null};
61
+ _.ti=function(a,b,c){for(const d of _.si)if(d.probe(b,c))return d.create(a);return null};_.ui=function(a){a=_.si.indexOf(a);0<=a&&_.si.splice(a,1)};_.vi=function(a,b){b&&(a+='; codecs\x3d"'+b+'"');return a};wi=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};
62
+ Ci=function(){if(xi)return xi;yi||(yi=new _.zi(()=>{xi=null}));(xi=document.querySelector(_.w)||document.querySelector(_.p))||(xi=document.createElement(_.w));yi.ca(1);return xi};_.Di=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Ei=function(a){return(navigator.userAgent||"").includes(a)};_.Fi=function(a){return _.Ei("Tizen"+(a?" "+String(a):""))};
63
+ Hi=function(a){const b={major:-1,name:We};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Gi(a,c[0]));2<=c.length&&(b.minor=Gi(a,c[1]));3<=c.length&&(b.patch=Gi(a,c[2]));4<=c.length&&(b.build=Gi(a,c[3]));return b};_.Ii=function(){return _.Ei("Web0S")};_.Ki=function(){return _.Ii()&&79===Ji().major};
64
+ Ji=function(){const a=Li();const b=["ie","edge","opera","firefox","safari",Cc];var c=Mi();const d=Ni[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Hi(c[1]);return Hi("")};_.Oi=function(){return _.Ei("CrKey")};_.Pi=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Fi()};_.Qi=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Pi()&&1<navigator.maxTouchPoints};_.Ri=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
65
+ Gi=function(a,b){try{return parseInt(b,10)}catch(c){Si.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};Ti=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};
66
+ Mi=function(){const a=Li();if(!a)return Ui;var b=a.match(/^.+?(?=\))/);if(!b)return Ui;b=b[0];if(Ti(b,["iphone","ipad"]))return Vi;if(Ti(b,["android"]))return Wi;if(Ti(b,["macintosh"]))return Xi;if(Ti(b,["windows nt"]))return Yi;if(Ti(b,["tizen"]))return Zi;if(Ti(b,["web0s"]))return $i;if(Ti(b,["linux"]))return aj;Si.warn("Unable to identify OS from user agent: "+a);return Ui};Li=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
67
+ _.cj=function(){var a=Mi();var b=Mi();var c=Ni[b];if(c){c=Li().match(c.os_version)[1];c=Hi(c);if(b===Yi)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=Hi("");a:{c=Li();const e=["ie","edge","opera","firefox","safari",Cc];var d=Mi();d=Ni[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=bj}return{os:a,osVersion:b,browser:c,browserVersion:Ji()}};
68
+ dj=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.Tf(a,{kind:_.Vh(b.kind),language:_.Vh(b.language),label:_.Vh(b.label)},["kind","language","label"])};ej=function(a){return a.enabled||a.selected||a.mode===_.Ce||a.mode===_.qd};gj=function(a,b,c){return fj(a)&&b===_.M&&!!c.enableHlsVideoTrackInfo};
69
+ hj=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.mimeType&&(b.mimeType=d.mimeType),d.renditions&&0<d.renditions.length&&(b.renditions=d.renditions,b.renditions.forEach(e=>{e.track=b})))})};ij=function(a,b,c){return fj(a)&&(b===_.L||b===_.K)&&!!c.enableMetadata};
70
+ jj=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.tc&&(d=d.tc.get(`${b.type}:${b.label}`))&&d.Ce&&(b.accessibility=d.Ce.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};kj=function(a,b){return a.g.filter(c=>c.type===b)};lj=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};nj=function(a,b){if(a=mj(a,b))a=Array.from(a),b===_.K&&(a=a.filter(c=>c.kind!==_.Gd));return a};
71
+ mj=function(a,b){if(!a.m)return null;a=a.m.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.L:return a.audioTracks;case _.M:return a.videoTracks;case _.K:return a.textTracks;default:return null}};oj=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};pj=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
72
+ sj=function(a,b,c){const d=nj(a,b);if(c){if(void 0===a.g.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.h.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.l.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.K:f="mode";e=_.Ce;g=_.Xc;break;case _.L:f="enabled";break;case _.M:f="selected"}if(f)for(const h of d)h[f]=dj(c,h,c.type)?e:g}}else if(a.h.debug(_.wa+b),a.a.get(b)&&d&&b===_.K){for(e of d)e.mode=
73
+ _.Xc;a.a.set(b,null)}b===_.L?a.m.trigger(new _.F(_.qj)):b===_.K&&a.m.trigger(new _.F(_.rj))};tj=function(a,b,c){if(a.m){var d=a.m.getSurface().getMedia();if(d){var e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);e.src=_.qh(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
74
+ uj=function(a,b){return _.x(function*(){var c=a.m.getConfiguration(),d=_.ti(c,b.mimeType,_.Qe);if(d){c=_.Kh(b.url);var e=yield a.m.getNetworkEngine().fetch(c).P;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.J(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Qe},tj(a,d,c))}else a.h.warn("Track mimetype is not supported",b)})};fj=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.vj&&!a.url.endsWith(".m3u8"))&&_.Pi()};
75
+ wj=function(a,b,c){c=_.ug(c).filter(e=>e);a.h.info("Find preferred tracks for",b,c);const d=kj(a,b);c.some(e=>{const f=_.Sg(e);return(e=d.find(g=>{g=_.Sg(g.language||"");return _.Tg(f,g)}))?(a.h.info("Will select track with id",e.id),sj(a,b,e),!0):!1})};yj=function(a){return a.name===Va&&xj.some(b=>a.message.startsWith(b))};
76
+ _.Bj=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Qi()&&(a=360);const b=_.Hh();b.maxAttempts=3;a={source:"",license:zj,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.Hh(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,
77
+ restrictions:Aj(a),useCmsd:!1},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,
78
+ startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,
79
+ ignoreManagedMediaSourceStreamingHints:!1},restrictions:Aj(),tizen:{sideStreamText:_.Fi(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1}};if(_.Ei("Edge/")||_.Fi())a.streaming.gapDetectionThreshold=.5;_.Ii()&&(a.streaming.stallEnabled=!1);_.Ki()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Fi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,
80
+ fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};Aj=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}};
81
+ _.Dj=function(...a){if(!a)return _.Bj();var b=[_.Bj()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.Rf(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=_.Gf.apply(null,b);_.Rf(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));
82
+ if(!_.B(a.volume)&&(!_.Sf(a.volume)||Uf(a.volume)))throw new _.H(_.G,7,7100,"config.volume is not a number");if(!_.B(a.preferredTextLanguage)&&!_.Rf(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)&&!_.Rf(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)&&
83
+ !_.Rf(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)&&!_.Rf(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&&!_.Rf(a.drm.env))throw new _.H(_.G,7,7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.Rf(a.drm.offlineId))throw new _.H(_.G,
84
+ 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(!_.Sf(b.bufferingGoal)||Uf(b.bufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.Sf(b.rebufferingGoal)||Uf(b.rebufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal is not a number");
85
+ if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.Sf(b.bufferBehind)||Uf(b.bufferBehind))throw new _.H(_.G,7,7100,"config.streaming.bufferBehind is not a number");if(!_.Sf(b.smallGapLimit)||Uf(b.smallGapLimit))throw new _.H(_.G,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.Sf(b.durationBackoff)||Uf(b.durationBackoff))throw new _.H(_.G,7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;
86
+ if(_.B(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.r)throw new _.H(_.G,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Cj(a.restrictions);Cj(a.abr.restrictions);a.abr.initialRestrictions&&Cj(a.abr.initialRestrictions)}return a};
87
+ Cj=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);
88
+ 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");};_.Ej=function(a){return typeof a===_.Od&&!Array.isArray(a)&&"source"in a};_.Gj=function(a){return _.Fj.get(a)||null};
89
+ _.Ij=function(a){_.Fj.get(a.id())?Hj.warn("Component already in use."):_.Fj.set(a.id(),a)};Jj=function(a){return Array.from(_.Fj.values()).find(b=>b instanceof a)||null};Kj=function(a){for(const b of _.Fj.values())a(b)};Lj=function(a){Kj(b=>{b.o(a)})};Mj=function(a){Kj(b=>{b.g(a)})};Nj=function(){Kj(()=>{})};Oj=function(){Kj(()=>{})};Pj=function(a){if(null!==Jj(a))return null;a=new a;a.f();_.Ij(a);Hj.info("Installed component:",a.id());return a};
90
+ Qj=function(a){if(a=Jj(a))a.a(),_.Fj.delete(a.id()),Hj.info("Uninstalled component:",a.id())};Rj=function(a){return _.nh(a,_.Pc)||_.nh(a,_.Qc)};Sj=function(a,b){3===b.type&&(a.f&&(a.h.debug("Attaching tracking token"),b.headers[uf]=a.f),a.a&&(b.headers[vf]=a.a))};
91
+ Tj=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[uf],a.a=b.headers[vf],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.h.debug("Loaded tracking token "+a.f),a.a&&a.h.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.gh(_.wh(b))),{delay:a.renewalPeriod,Ug:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.Vj=function(a){_.Uj[a.I]=a};
92
+ _.Xj=function(a){const b={attemptParameters:_.Hh(),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&&
93
+ (b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),a.env)){const c=_.Uj[a.env]||null;if(!c)throw _.dg(_.qa,_.$a+a.env+_.aa),new _.H(_.G,6,6015,`DRM environment '${a.env}' is missing.`);b.Pa=_.Wj(c,a.customData)||{};_.nh(a.env.toLowerCase(),gd)&&(b.enforceSingleSession=!0)}return b};Zj=function(a){a=Yj[a];if(!a)return null;const b=_.cj();return b.os===Wi&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
94
+ _.Wj=function(a,b){const c={};var d=b?b.widevineVideoRobustness:void 0,e=b?b.widevineAudioRobustness:void 0;const f=b?b.serverCertificate:void 0;var g=a.f[_.Sc];if(g){var h=g.licenseUrl;d=Fg(d,g.videoRobustness);e=Fg(e,g.audioRobustness);var k=g.modifiers,l=Eg(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=Eg(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.Je?Zj(f):f;c[_.Sc]=
95
+ {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.Pc])&&(c[_.Pc]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.Qc])&&(c[_.Qc]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
96
+ modifiers:g.modifiers});return c};_.ak=function(){throw new _.H(_.G,3,3E3);};_.bk=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.J(a.f.buffer);b=_.J(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.ak()}};_.O=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.ak()}};_.ck=function(a){return a.a<a.f.byteLength};_.dk=function(){throw new _.H(_.G,3,3E3,"Buffer read out of bounds.");};_.ek=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.dk()}};
97
+ _.fk=function(a){try{const b=a.f.getUint16(a.a,a.g);a.a+=2;return b}catch(b){_.dk()}};_.P=function(a){try{const b=a.f.getUint32(a.a,a.g);a.a+=4;return b}catch(b){_.dk()}};_.gk=function(a){try{const b=a.f.getInt32(a.a,a.g);a.a+=4;return b}catch(b){_.dk()}};_.hk=function(a){let b=0,c=0;try{!0===a.g?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.dk()}if(2097151<c)throw new _.H(_.G,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
98
+ ik=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.ek(a);return c};_.jk=function(a,b){a.a+b>a.f.byteLength&&_.dk();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.J(c)};kk=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.lk=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.mk=function(a){for(;_.ck(a.reader)&&!a.parser.a;)a.parser.pd(a.start+a.headerSize,a.reader,a.partialOkay)};
99
+ _.nk=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.pd(a.start+a.headerSize,a.reader,a.partialOkay)};_.ok=function(a){return b=>{const c=b.reader.Ba()-b.reader.getPosition();a(_.jk(b.reader,c))}};_.pk=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};qk=function(a){let b="";try{b=_.jh(a)}catch(c){}return b};_.sk=function(a){a=qk(a);let b="";a.length&&(b=(new _.rk(a)).a);return b};
100
+ uk=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.gh(a)),d=_.wh(c.sinf[0]);(new _.tk).L(_.De,_.mk).L("schi",_.mk).L("tenc",e=>{e.reader.skip(6);_.ek(e.reader)&&(e.reader.skip(1),b=_.yh(_.jk(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
101
+ wk=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.G,6,6102);let d;typeof b===_.Je?d=_.lh(b,!0):d=b;a=_.lh(qk(a),!0);b=new _.vk(12+a.byteLength+d.byteLength+c.byteLength,!0);_.O(b,a.byteLength);_.bk(b,_.J(a));_.O(b,d.byteLength);_.bk(b,_.J(d));_.O(b,c.byteLength);_.bk(b,_.J(c));return _.J(b.buffer)};_.xk=function(a){var b=_.J(a.body);b=_.vh(b);a.headers[pa]=fc;a.body=_.kh("spc\x3d"+b).buffer};
102
+ _.yk=function(a){let b;try{b=_.gh(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=eh(_.wh(b))};Dk=function(a,b){b=zk(b);if(a==_.Sc)return b+Ak;if(a==_.Qc)return b+Bk;if(a==_.Pc)return b+Ck;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
103
+ _.Gk=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(ta)?c.customData&&(_.Fk(b,a),a=b.uris[0],d&&c.customData.assetId&&(a+="?assetId\x3d"+encodeURI(`${c.customData.assetId}`),c.customData.variantId&&(a+="\x26variantId\x3d"+encodeURI(`${c.customData.variantId}`)),b.uris[0]=a)):Ek.warn(Pa)};
104
+ _.Hk=function(a,b){try{const c=_.J(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Ek.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){Ek.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
105
+ _.Jk=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Gk(a,b,c,!1);b.headers[pa]=fc;c={spc:_.uh(b.body)};if((a=a.drm)&&a.env.startsWith(ua)&&d){a={};var e=_.ci((new _.rk(Ik(d))).f);d=e.keyId;if(e=e.assetId)Ek.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Ek.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Ek.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Ek.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
106
+ _.mh(_.bi(c,!0))};_.Kk=function(a,b){Ek.debug("Clearing response data");200===b.status&&(a=_.gh(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.wh(a).buffer)};
107
+ _.Lk=function(a,b,c){b=qk(b);c=c&&c.customData?c.customData:{};b=new _.rk(Ik(b));const d=_.ci(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.ph(`${a}`)&&(d.assetId=a,Ek.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.ph(`${e}`)&&(d.variantId=e,Ek.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Ek.debug("KeyId found in FPS SKD. Removing other parameters")):
108
+ a=["assetId","variantId"];b.f=_.bi(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.ai(b);return c.fpsContentId=b};_.Mk=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ta))Ek.warn(Pa);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(ua)){const c=new _.Gg(b.uris[0]);let d=c.xa;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.xa=d;b.uris[0]=c.toString()}};Nk=function(a,b,c){_.Gk(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.Gg(b.uris[0]);c.a.add(_.be,a);b.uris[0]=c.toString()};
109
+ zk=function(a){if(a===Ok)return"https://lic.drmtoday.com";if(a===Pk)return"https://lic.staging.drmtoday.com";if(a===Qk)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Ik=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
110
+ _.Fk=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};a:{for(d in c)if(void 0!==c[d]){var d=!0;break a}d=!1}d&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};Sk=function(a){const b={},c=a?a[wf]:void 0;a=Rk[a?a[wf]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
111
+ Uk=function(a,b=0){_.cg("Registering EME Factory: "+a.a());a={priority:b,Hb:a};for(let c=0;c<Tk.length;++c)if(Tk[c].priority<b){Tk.splice(c,0,a);return}Tk.push(a)};Vk=function(a){if(a){const {Hb:b}=Tk.find(({Hb:c})=>c.a()===a);if(b&&b.da())return _.cg(Bb+b.a()),b.create();_.cg("Cannot create selected EME manager. Choosing by priority list.")}for(const {Hb:b}of Tk)if(b.da())return _.cg(Bb+b.a()),b.create();throw Error("Missing EME managers");};
112
+ _.Xk=function(a,b){a=_.Wk(a,b);return 1!=a.length?null:a[0]};_.Wk=function(a,b){return Array.prototype.filter.call(a.childNodes,c=>c instanceof Element&&c.tagName==b)};_.Yk=function(a){return Array.prototype.every.call(a.childNodes,b=>b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE)?a.textContent.trim():null};
113
+ _.Zk=function(a,b){const c=new DOMParser;let d=null,e=null;try{e=c.parseFromString(a,_.Re)}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d};_.fl=function(a){var b=_.xh(a);b=parseInt(b.byteLength,10).toString(16);b=_.xh("12"+b+a);return new dl(el,a,b)};
114
+ _.hl=function(a){const b=new _.gl(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.lk(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.jk(b,16);f=_.yh(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let u=_.ek(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.ek(b),v=(v|(u&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:v},k=u=>{switch(u){case 0:do if(!_.ck(b))throw Error("not enough data to skip!");while(_.ek(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
115
+ break;case 3:for(;4!==(u=h()&7);)k(u);break;case 5:b.skip(4);break;default:throw Error("invalid wire type "+u);}},l=[];let m=null;for(;_.ck(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=ik(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.dg("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.uh(m):"","keyIds",l.map(u=>_.yh(u)));return 0<l.length?_.fl(_.yh(l[0])):null};
116
+ _.il=function(a){const b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);b.push(a[5]);b.push(a[4]);b.push(a[7]);b.push(a[6]);a=_.J(a);a.set(b,0);return a};
117
+ _.nl=function(a){a:{var b=new _.gl(new DataView(a.buffer),!0);_.P(b);for(_.fk(b);_.ck(b);)if(1===_.fk(b)){var c=_.fk(b);b=_.jk(b,c);break a}b=null}b||(b=a);a=ih(b,!0);c=_.Zk(a,"WRMHEADER");a=c.getAttribute("version");var d=_.Xk(c,"DATA");c=(c=_.Xk(d,"LA_URL"))?_.Yk(c):"";var e;if(e=_.Xk(d,"KID"))if(e=_.Yk(e)){var f=_.Xk(d,ka);e={value:e,zd:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=jl(d))?[e]:(d=kl(d))?d:null;const {value:g="",zd:h}=d&&d[0]||{};d=_.wh(g);d=_.il(d);d=_.yh(d);return new _.ll(_.ml,
118
+ d,c,b,a,h)};jl=function(a){a=_.Xk(a,"PROTECTINFO");if(!a)return null;var b=_.Xk(a,"KID");if(!b)return null;a=b.getAttribute("VALUE");if(!a)return null;const c=b.getAttribute(ka);b=b.getAttribute("ALGID");return{value:a,zd:c,Af:b}};
119
+ kl=function(a){a=_.Xk(a,"PROTECTINFO");if(!a)return null;a=_.Xk(a,"KIDS");if(!a)return null;var b=_.Wk(a,"KID");if(!b.length)return null;a=[];for(const c of b)if(b=c.getAttribute("VALUE")){const d=c.getAttribute(ka),e=c.getAttribute("ALGID");a.push({value:b,zd:d,Af:e})}return a.length?a:null};_.ol=function(a){performance.mark(a)};pl=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.zi(c)).ca(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};
120
+ _.rl=function(a){return ql(a)?_.Qc:a};sl=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};
121
+ tl=function(a,b){if(a.keySystem){var c=_.rl(a.keySystem);b=b[c];c===_.Zd&&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=
122
+ b.serverCertificate||null)))}};ul=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};wl=function(a){return(a.audioCapabilities||[]).some(vl)||(a.videoCapabilities||[]).some(vl)};xl=function(a,b){a=_.sk(b);_.dg("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
123
+ yl=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;_.Lf(k)||(k=xl);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=wk(c,l,a)}return c};ql=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
124
+ vl=function(a){return null!=a.robustness&&""!==a.robustness};zl=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.zh(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])}};
125
+ Al=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.ae(_.Wf(c));a.o||a.h.info(ra);a.o=!0;a.B=!1};Bl=function(a){a.f.forEach((b,c)=>{const d=b.Xd;let e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Xd=e)})};
126
+ Cl=function(a){return _.x(function*(){a.w.release();a.w=null;a.K.release();a.K=null;a.o=!1;a.B=!1;a.F.reject();a.Y.stop();a.Y=null;a.S.stop();a.S=null;const b=Array.from(a.f.keys());for(const c of a.f.values())c.jc&&c.jc.stop();a.f.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.x(function*(){a.h.debug("Closing session",c.sessionId);try{yield pl(c)}catch(d){a.h.warn("Error while closing session",d)}}))));if(a.A){try{yield a.l.g(null)}catch(c){a.h.warn("Error while resetting media keys",
127
+ c)}a.A=null}a.l=null;a.a=null;a.J.clear();a.G=null;a.I=[];a.g=null;a.U=null;a.D=null;a.N=0;a.M=null})};_.Gl=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=Vf(a.g.Pa);sl(b,d)}if(d=Dl(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)tl(f,a.g.Pa);b=El(a,b);if(!b.size)return a.R=!0,Promise.resolve();_.ol($c);a=_.Fl(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.ol(Zc);performance.measure("DRM queryMediaKeys_()",$c,Zc)})};
128
+ _.Il=function(a,b,c){a.H=Hl;a.I=c;a.C=0<c.length;a.h.debug("Using Persisted Licenses: "+a.C);a.g&&a.g.enableSessionCacheForSkd&&a.h.info("Enabled session cache for SKD license requests");return _.Gl(a,b)};
129
+ _.Fl=function(a,b){if(1==b.size&&b.has(""))return Promise.reject(new _.H(_.G,6,6E3));null===a.l&&(a.l=Vk(a.g.emeApi));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.Jl;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)==h&&(d=d.catch(()=>{if(a.qa)return null;if(l===_.Qc){if(_.Di()&&!a.g.Pa[l].useLegacySystem)return k.label=Rc,a.l.a(Rc,[k]).catch(()=>{a.h.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
130
+ k.label=_.Qc;ul(k);return a.l.a(l,[k])});ul(k)}return a.l.a(l,[k]).catch(m=>{a:{if(l===_.Sc&&wl(k)){const n=_.cj();if(wl(k)&&n.os===Wi&&n.browser===Cc){a.h.warn("requestMediaKeySystemAccess() failed",m);a.h.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");ul(k);m=a.l.a(l,[k]);break a}}throw m;}return m})}))};let f=a.g.preferredDrmSystem;if(!f){var g=_.cj();if(g.os===Yi&&10<=g.osVersion.major&&"edge"===g.browser)f=_.Qc;else if("safari"===
131
+ g.browser)f=_.Pc;else if(g.browser===Cc||"firefox"===g.browser)f=_.Sc}f&&(g=b.get(f))&&(e(!0,g,f),e(!1,g,f));for(const h of[!0,!1])b.forEach((k,l)=>{l!==f&&e(h,k,l)});d=d.catch(h=>{throw new _.H(_.G,6,6001,null,h);});d=d.then(h=>{if(a.qa)return null;a.J.clear();var k=h.getConfiguration();a.h.info("Got MediaKeySystemAccess with configuration",k);var l=k.audioCapabilities||[];k=k.videoCapabilities||[];for(var m of l)a.J.add(m.contentType);for(var n of k)a.J.add(n.contentType);{l=h.keySystem;m=b.get(_.rl(h.keySystem));
132
+ n=[];k=[];const q=[],u=[];zl(m.drmInfos,n,k,q,u);1<k.length&&_.C("Multiple unique server certificates found! Only the first will be used.");1<n.length&&_.C("Multiple unique license server URIs found! Only the first will be used.");l={keySystem:l,licenseServerUri:n[0],distinctiveIdentifierRequired:m.distinctiveIdentifier==_.xe,persistentStateRequired:m.persistentState==_.xe,audioRobustness:m.audioCapabilities?m.audioCapabilities[0].robustness:"",videoRobustness:m.videoCapabilities?m.videoCapabilities[0].robustness:
133
+ "",serverCertificate:k[0],initData:q,keyIds:u,periodId:null}}a.a=l;if(!a.a.licenseServerUri)throw new _.H(_.G,6,6012,a.a.keySystem);return h.createMediaKeys()}).then(h=>{a.qa||(a.h.info("Created MediaKeys for key system",a.a.keySystem),a.G=h,a.R=!0)}).catch(h=>{if(!a.qa){a.a=null;a.J.clear();if(h instanceof _.H)throw h;throw new _.H(_.G,6,6002,{browserError:h.message});}});c.reject();return d};
134
+ Dl=function(a){a=Vf(a.g.Pa[_.Zd]||{});if(0==a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.xh(f);e=_.xh(e);e={kty:"oct",kid:_.vh(f,!1),k:_.vh(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.kh(d),initDataType:"keyids"}];return{keySystem:_.Zd,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
128
135
  keyIds:[],periodId:null}};
129
- Nk=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)Ck(f,a.h.Pa);d=a.C?_.de:_.Kd;e=a.C?[_.Pd]:[ue];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.uc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Kd,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Zh(b.mimeType,b.codecs):"",h=c?_.Zh(c.mimeType,c.codecs):"";for(const k of f.drmInfos){const l=a.get(k.keySystem);
130
- l.drmInfos.push(k);k.initData&&k.initData.length&&(l.initDataTypes=[...new Set(k.initData.map(m=>m.initDataType))]);k.distinctiveIdentifierRequired&&(l.distinctiveIdentifier=_.de);k.persistentStateRequired&&(l.persistentState=_.de);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};
131
- Tk=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))}})};
132
- _.Xk=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.H!==Qk)){var e=a.keySystem();if(!e.startsWith(_.Jc)&&b===_.uc){const f=new Uk(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||
133
- _.gi(2)||a.keySystem().startsWith(_.Jc)||!_.Vk(a,d,c,!0))&&Wk(a,d,null,b,c)}};Yk=function(a,b){return _.y(function*(){a.a.info(`Handle encrypted event for type ${b.initDataType}`);yield Tk(a);b.initData&&_.Xk(a,b.initDataType,_.K(b.initData))})};$k=function(a){return _.y(function*(){const b=a.V.map(c=>Zk(a,c));a.ba=!0;a.V=[];yield Promise.all(b)})};
134
- bl=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 al(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.nh([d],a.h.attemptParameters);f.type=3;f.licenseRequestType=wc;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=_.K(f.data)}).catch(f=>{var g=
135
- 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}:{},pk(g));throw new _.H(_.G,6,6100,g,f);})};
136
- _.dl=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});}})};
137
- _.gl=function(a){const b=a.f?a.f.initData||[]:[];for(const c of b){let d=!_.gi(2);if(a.h.enforceSingleSession&&!a.keySystem().startsWith(_.Jc)){const e=a.g.values();for(const f of e)_.ch(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}.`),el(c.initData,f)||(f.cd.push(c.initData),c.keyId&&!f.bb.includes(c.keyId)&&
138
- f.bb.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,ne)),d=!1)}!d||a.C&&a.H===Qk||(_.Vk(a,c.keyId,c.initData)&&(d=!1),d&&(a.a.info("Request new media key session on create"),Wk(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.I)_.fl(a,c);b.length||a.I.length||(a.o||a.a.info(ra),a.o=!0,a.B=!1,a.F.resolve());return a.F};
139
- _.hl=function(a,b){if(!a.G)return _.Of(a.w,b,[Yc,"msneedkey",We,"needkey"],()=>{a.U(new _.H(_.G,6,6010))}),Promise.resolve();a.A=b;a.m.j(b);a.w.one(a.A,_.Ud,()=>$k(a));a.w.on(a.A,_.Re,e=>{const f=a.B;a.B=!a.o;!f&&a.B&&(a.a.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.f.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.m.f()!==cb||a.I.length)d=Tk(a);c=Promise.resolve();_.ji()&&38===ki().major||(a.f&&a.f.keySystem!==_.Ld&&!a.f.serverCertificate&&(c=bl(a)),
140
- c=c.then(()=>_.dl(a)));return Promise.all([d,c]).then(()=>{a.pa||(_.gl(a),a.w.on(a.A,Yc,e=>Yk(a,e)))}).catch(e=>{if(!a.pa){if(6004===e.code&&a.f&&a.f.keySystem===_.Lc&&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++,_.hl(a,b);1<=a.N&&a.a.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
141
- al=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))}})};
142
- _.fl=function(a,b){let c;try{a.a.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Pd)}catch(e){const f=new _.H(_.G,6,6005,{browserError:e.message});a.U(f);return Promise.reject(f)}a.w.on(c,ud,a.ma.bind(a));a.w.on(c,hd,a.ga.bind(a));const d={initData:null,loaded:!1,Td:Infinity,mb:null,Ca:new _.Sk,periodId:null,cd:[],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;
143
- 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;il(a)&&(a.o||a.a.info(ra),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})))})};el=function(a,b){if(!a)return!1;for(let c=0;c<b.cd.length;c++)if(_.ch(a,b.cd[c]))return!0;return!1};
144
- _.Vk=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(_.ch(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,ne),d&&a.a.info(ib+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.a.info(ib+`Session: '${e.sessionId}'`),!0;if(el(c,f))return d&&a.a.info("Skipping Session creation. License for init data was already requested [extra]"),
136
+ El=function(a,b){var c=new Set;for(var d of b)for(var e of d.drmInfos)tl(e,a.g.Pa),c.add(e);d=a.C?_.xe:_.Yd;e=a.C?[_.ce]:[Pe];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.yc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Yd,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.vi(b.mimeType,b.codecs):"",h=c?_.vi(c.mimeType,c.codecs):"";for(const k of f.drmInfos){const l=a.get(k.keySystem);l.drmInfos.push(k);
137
+ k.initData&&k.initData.length&&(l.initDataTypes=[...new Set(k.initData.map(m=>m.initDataType))]);k.distinctiveIdentifierRequired&&(l.distinctiveIdentifier=_.xe);k.persistentStateRequired&&(l.persistentState=_.xe);b&&_.ug(k.audioRobustness).forEach(m=>{const n={robustness:m||"",contentType:g};l.audioCapabilities.find(q=>q.robustness===n.robustness&&q.contentType===n.contentType)||l.audioCapabilities.push(n)});c&&_.ug(k.videoRobustness).forEach(m=>{const n={robustness:m||"",contentType:h};l.videoCapabilities.find(q=>
138
+ q.robustness===n.robustness&&q.contentType===n.contentType)||l.videoCapabilities.push(n)})}}return a};Kl=function(a){return _.x(function*(){if(!a.l.o())if(a.M)yield a.M;else try{a.M=a.l.g(a.G),yield a.M}catch(b){a.qa||a.U(new _.H(_.G,6,6003,b.message,b))}})};
139
+ _.Ol=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.H!==Hl)){var e=a.keySystem();if(!e.startsWith(_.Pc)&&b===_.yc){const f=new Ll(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||
140
+ _.Fi(2)||a.keySystem().startsWith(_.Pc)||!_.Ml(a,d,c,!0))&&Nl(a,d,null,b,c)}};Pl=function(a,b){return _.x(function*(){a.h.info(`Handle encrypted event for type ${b.initDataType}`);yield Kl(a);b.initData&&_.Ol(a,b.initDataType,_.J(b.initData))})};Rl=function(a){return _.x(function*(){_.ol(bd);const b=a.V.map(c=>Ql(a,c));a.ba=!0;a.V=[];yield Promise.all(b);_.ol(ad);performance.measure("drm.onPlay",bd,ad)})};
141
+ Tl=function(a){const b=a.keySystem(),c=a.g.Pa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return Sl(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.Kh([d],a.g.attemptParameters);f.type=3;f.licenseRequestType=Ac;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.h.debug("Fetching certificate");return a.D.xb.fetch(f).P}).then(f=>{a.a.serverCertificate=_.J(f.data)}).catch(f=>{var g=
142
+ 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}:{},Sk(g));throw new _.H(_.G,6,6100,g,f);})};
143
+ _.Ul=function(a){return _.x(function*(){if(a.G&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.G.setServerCertificate(a.a.serverCertificate);void 0===b||b||a.h.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});}})};
144
+ _.Xl=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Fi(2);if(a.g.enforceSingleSession&&!a.keySystem().startsWith(_.Pc)){const e=a.f.values();for(const f of e)_.zh(c.initData,f.initData)?(a.h.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.h.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),Vl(c.initData,f)||(f.cd.push(c.initData),c.keyId&&!f.Qa.includes(c.keyId)&&
145
+ f.Qa.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,He)),d=!1)}!d||a.C&&a.H===Hl||(_.Ml(a,c.keyId,c.initData)&&(d=!1),d&&(a.h.info("Request new media key session on create"),Nl(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.I)_.Wl(a,c);b.length||a.I.length||(a.o||a.h.info(ra),a.o=!0,a.B=!1,a.F.resolve());return a.F};
146
+ _.Yl=function(a,b){if(!a.G)return _.kg(a.w,b,[id,"msneedkey",sf,"needkey"],()=>{a.U(new _.H(_.G,6,6010))}),Promise.resolve();a.A=b;a.l.l(b);a.w.one(a.A,_.ee,()=>Rl(a));a.w.on(a.A,_.nf,e=>{const f=a.B;a.B=!a.o;!f&&a.B&&(a.h.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.a.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.l.f()!==hb||a.I.length)d=Kl(a);c=Promise.resolve();_.Ii()&&38===Ji().major||(a.a&&a.a.keySystem!==_.Zd&&!a.a.serverCertificate&&(c=Tl(a)),
147
+ c=c.then(()=>_.Ul(a)));return Promise.all([d,c]).then(()=>{a.qa||(_.Xl(a),a.w.on(a.A,id,e=>Pl(a,e)))}).catch(e=>{if(!a.qa){if(6004===e.code&&a.a&&a.a.keySystem===_.Sc&&1>a.N&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.h.warn("Detected invalid widevine server certificate!. Retrying"),a.U(new _.H(1,6,6004)),a.a.serverCertificate=null,a.N++,_.Yl(a,b);1<=a.N&&a.h.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
148
+ Sl=function(a,b){return _.x(function*(){const c=a.D.qc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
149
+ _.Wl=function(a,b){let c;try{a.h.debug("Attempting to load an offline session",b),c=a.G.createSession(_.ce)}catch(e){const f=new _.H(_.G,6,6005,{browserError:e.message});a.U(f);return Promise.reject(f)}a.w.on(c,Fd,a.na.bind(a));a.w.on(c,ud,a.fa.bind(a));const d={initData:null,loaded:!1,Xd:Infinity,mb:null,Ca:new _.Jl,periodId:null,cd:[],keyId:null,Qa:[],initDataType:null,Vb:null,sessionContext:{ldlDelay:0,customData:{}}};d.Ca.catch(()=>{});a.f.set(c,d);return c.load(b).then(e=>{if(a.qa)return null;
150
+ a.h.debug("Loaded offline session",b,e);if(!e)return a.f.delete(c),a.U(new _.H(_.G,6,6013)),null;d.loaded=!0;Zl(a)&&(a.o||a.h.info(ra),a.o=!0,a.B=!1,a.F.resolve());return c},e=>{a.qa||(a.f.delete(c),a.U(new _.H(_.G,6,6005,{browserError:e.message})))})};Vl=function(a,b){if(!a)return!1;for(let c=0;c<b.cd.length;c++)if(_.zh(a,b.cd[c]))return!0;return!1};
151
+ _.Ml=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.f.keys()){const f=a.f.get(e);if(_.zh(c,f.initData))return b?f.Qa.includes(b)?d&&a.h.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.Qa.push(b),a.j.get(b)||a.j.set(b,He),d&&a.h.info(nb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.h.info(nb+`Session: '${e.sessionId}'`),!0;if(Vl(c,f))return d&&a.h.info("Skipping Session creation. License for init data was already requested [extra]"),
145
152
  !0}return!1};
146
- Wk=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=jl(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&&kl(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);
147
- 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?_.Pd:ue;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,ud,a.ma.bind(a));a.w.on(q,hd,a.ga.bind(a));k={Ub:f,cd:[],initData:e,initDataType:d,keyId:h,bb:h?
148
- [h]:[],loaded:!1,Td:Infinity,periodId:c,mb:null,Ca:new _.Sk,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,ne);if(e)for(l=0;l<a.f.initData.length;l++)m=a.f.initData[l],m.keyId&&!k.bb.includes(m.keyId)&&_.ch(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.bb.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,ne));l=a.D.getConfiguration();m=a.keySystem();m=a.h.Pa[m];n=(n=m.modifiers)&&n.transformInitData;
149
- _.of(n)||(n=Ek);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 v=null;t.errorCode&&t.errorCode.systemCode&&(v=t.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));a.U(new _.H(_.G,6,6006,{browserError:t.message,
150
- error:t,extended:v},t))}})}else a.a.warn("Empty init data")})};ll=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};il=function(a){a=a.g.values();return _.xg(a,b=>b.loaded)};kl=function(a,b,c,d){if(!b&&c!==_.je)return!1;d=b||Rj(d);for(const e of a.g.values())if(b&&e.keyId===b||c===_.je&&(e.keyId||Rj(e.initData))===d)return!0;return!1};
151
- jl=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;_.of(d)||(d=Dk);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===_.je)return Rj(c)||"";if(b===_.uc){f=a.keySystem();try{if(f.match(/^com\.widevine\.alpha/)&&
152
- (e=_.xk(c)))return e.a}catch(g){throw a.a.warn("Unable to extract Key ID from PSSH data.",{error:g,keySystem:f}),g;}}return""};
153
- Zk=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);
154
- const h=_.nh([g],a.h.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===md&&d.Ub?kd:f?wc:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===kd)a.D.onEvent(new _.F(Tc));zk(a.f.keySystem)&&ml(a,h);oj(a.K,h);const k=Date.now();return nl(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=ol(a,l);let q="";n&&(q=` RID:${n}`);
155
- 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=pj(a.K,l);return c.update(l.data).then(()=>{if(!f){var v=ll(a),x=t?Date.now()+1E3*t.delay:Number.NaN;v=new _.F(_.Vc,{keySystem:a.keySystem(),expirationTime:v,expectedRenewalTime:x});a.D.onEvent(v);d&&(d.mb&&d.mb.resolve(),d.Ub&&(v=d.Ub,a.a.info(`Closing expired session '${v.sessionId}'`),
156
- yk(v).catch(()=>{a.a.warn("Unable to close expired session in time")}),(v=a.g.get(d.Ub))&&v.jc&&v.jc.stop(),a.g.delete(d.Ub),d.Ub=null),(new _.ci(()=>{a.pa||(d.loaded=!0,d.Ca&&d.Ca.resolve(),il(a)&&(a.o||a.a.info(ra),a.o=!0,a.B=!1,a.F.resolve()))})).da(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||t&&nj(a.keySystem()))&&(v=new _.ci(()=>{!a.pa&&a.K&&(a.a.info("Updating CSL Sessions"),zk(a.keySystem())?Wk(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.Jc)&&c.update(_.Mg("renew")))}),
157
- d.jc=v,v.da(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}:{},pk(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===fb?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)))})};
158
- ml=function(a,b){var c=_.Kg(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.a.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.Ge).textContent;b.body=_.$g(a.querySelector("Challenge").textContent).buffer}else a.a.debug("PlayReady request is already unwrapped."),b.headers[pa]="text/xml; charset\x3dutf-8"};
159
- nl=function(a,b,c){return _.y(function*(){const d=a.D.getConfiguration();yield al(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(_.Jc)&&b.requestModifiers.push(k=>_.Uj(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.Jc)&&b.responseModifiers.push(k=>_.Vj(k))})};
160
- ol=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.Ig(_.$g(b))).ti}catch(c){a.a.warn("Unable to parse DRMtoday Request ID",c)}return""};_.rl=function(a,b){a&&b&&(pl.set(a,b),ql.info(`Registered TextDisplayerFactory: '${a}'`))};_.sl=function(a,b){b=b.find(c=>(c=pl.get(c))?c.ea(a):!1);if(null==b)return ql.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;ql.info(`Chosen the text displayer: ${b}`);return pl.get(b)};
161
- _.tl=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})}}};ul=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};vl=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};
162
- wl=function(a){return a.a.map(b=>_.lf(b))};_.xl=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:[]}};zl=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=yl.value().get(b),c.one(a,b,d))};
163
- Dl=function(a){a.g.debug("Start watching for video events for "+a.l.namespace());const b=a.l,c=d=>Al(a,d.type);a.a.on(b,_.$c,()=>{a.j=!1;Bl(a,_.Cl)});a.a.on(b,pc,c);a.a.on(b,_.Vd,()=>{a.F=!0;a.j=!1;Al(a,_.Vd)});a.a.on(b,_.Nd,()=>{a.F=!1;a.j=!1;Al(a,_.Nd)});a.a.on(b,_.xe,c);a.a.on(b,_.$d,c);a.a.on(b,_.ge,d=>{a.m=!1;a.j=!1;Al(a,d.type)});a.a.on(b,_.he,d=>{a.m=!0;Al(a,d.type)});a.a.on(b,ke,c);a.a.on(b,_.Qe,()=>{a.j=!0;Al(a,_.Qe)});a.a.on(b,_.ad,d=>a.U(d));a.a.on(b,_.qd,c);a.a.on(b,qc,()=>{a.C=!0;Al(a,
164
- qc)});a.a.on(b,_.Fe,d=>{a.m=!0;Al(a,d.type)});a.a.on(b,_.Ee,d=>{a.m=!1;a.j=!1;Al(a,d.type)})};El=function(a,b){return Object.keys(b)[a]};Gl=function(a,b){const c={type:_.me};b===_.oc||b===_.kc?(c.reason=a.w,b===_.oc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.Fl&&(c.reason=a.w),a.A===_.Fl&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
165
- Bl=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.Fl;a.A=a.f;a.f=b;a.A===_.Cl&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.Fl?(a.K=a.o,a.w=a.m?1:2,a.g.info("Buffering started. Reason: "+El(a.w-1,_.Hl)),b=Gl(a,_.oc),a.Pb(_.oc,b)):d&&(a.B=a.o-a.K,a.g.info("Buffering finished. Reason: "+El(a.w-1,_.Hl)+". Buffering time: "+a.B+" ms"),b=Gl(a,_.kc),a.Pb(_.kc,b));b=El(a.A,_.Il);c=El(a.f,_.Il);a.g.info(`Player state change: ${b} -> ${c}`);a.Pb(_.me,Gl(a,""));return!0};
166
- Al=function(a,b){if(a.f===_.Jl)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===_.Cl&&1>=Math.abs(d-e)||c&&d>=e)Bl(a,_.Cl)&&a.g.debug("Player claims to be in ended state, not checking more");else if(b!==_.xe){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;
167
- e=typeof a.h===_.r&&2>a.h&&2===e.networkState;var f=typeof a.h===_.r&&0>=a.G&&a.f===_.Kl,g=typeof a.h===_.r&&2>=a.h&&a.j;e=a.m||f||e||g;!a.M||a.l.isLive()||a.f!==_.Fl||e||(f=b===_.ge&&4===a.h,(g=a.A===_.Ll)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=Bl(a,_.Fl):c?f=Bl(a,_.Ml):a.F&&(f=Bl(a,_.Nl));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: "+
168
- f+", Current state: "+El(a.f,_.Il))}}};Ol=function(a){a=(new _.ig(a)).ya;if(!a)return null;a=a.toUpperCase();return _.Qg(a,".MPD")?_.Ub:_.Qg(a,".M3U8")?_.Zi:_.Qg(a,".MP4")?_.Ke:_.Qg(a,"MANIFEST")||_.Qg(a,".ISM")?_.Zb:null};_.Ql=function(a){let b;_.hj(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.pe||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Pl(b[c]);d&&a.push(d)}return a};
169
- Pl=function(a){let b=null;_.qf(a)&&(a={url:a});typeof a===_.Dd&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.B(a.drmProtected)||typeof a.drmProtected!==_.jc||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.jc||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.pe||(b.name=a.name),_.B(a.Bb)||typeof a.Bb!==_.pe||(b.Bb=a.Bb),_.B(a.audioMimeType)||typeof a.audioMimeType!==_.pe||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Ol(a.url),b.type?Rl.debug("Detect media type "+
170
- b.type+" for "+a.url):Rl.warn("Unable to detect media type for "+a.url));return b};Tl=function(a){return a.w?Sl():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.ad);a.g.off(c,_.ee);a.a=null}b()})};Sl=function(){return Promise.reject(new _.H(_.G,7,7E3))};
171
- Vl=function(a,b){return a.w?Sl():new Promise(c=>{a.a||(a.g.on(b,_.ad,()=>{{const d=Ul(a);if(d)a.onError(d)}}),a.g.on(b,_.ee,()=>{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()})};
172
- Xl=function(a){return _.y(function*(){if(a.w)return Sl();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=_.tj(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.m=new _.Wl({xb:c,onError:d=>a.onError(d),Xd:()=>{},onExpirationUpdated:(d,e)=>{a.trigger(new _.F(_.Sc,{expirationTime:e}))},onEvent:d=>{d instanceof _.F?a.dispatchEvent(d):
173
- a.log.debug(_.nb,d.type)},getConfiguration:()=>a.getConfiguration(),sc:()=>a.sc()});a.m.h=b;yield _.Rk(a.m,[{id:0,language:_.Ae,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:_.Ke,codecs:"",encrypted:!0,keyId:null,language:_.Ae,originalLanguage:_.Ae,label:null,type:_.w,primary:!1,frameRate:void 0,
174
- Rg:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,Eg:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}],[]);yield _.hl(a.m,a.a);return Promise.resolve()})};Yl=function(a,b){zl(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.Jl&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
175
- Ul=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,Mg:c,message:a.a.error.message})};
176
- $l=function(a){if(a.w)return new _.Zl(Sl(),()=>{});const b=a.o[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&Yl(a,c);if(d.preload!==_.Cd)a.g.one(d,_.qd,()=>{const g=Date.now()/1E3-e;a.f.w=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.gi()||_.ji())&&d.load();const f=new _.Sk;a.g.one(d,ke,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.C||(a.C=(new _.ci(()=>{f.reject(new _.H(_.G,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
177
- uri:b.url},d.error))})).da(g))});zl(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject(Ul(a)):d.preload===_.Cd&&(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,_.ad,()=>{f.reject(Ul(a))});return new _.Zl(f,
178
- ()=>{const g=new _.H(_.G,7,7001);f.reject(g);return Promise.resolve()})};am=function(a,b){zl(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{if(a.isLive()&&a.getState()!==_.Jl){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)}))}})};
179
- _.dm=function(a){a&&(0<=bm.indexOf(a)?cm.warn(`Factory '${a.name()}' is already registered`):(bm.push(a),cm.info(`Factory ${a.name()}' has been registered.`)))};fm=function(a,b){let c=bm.find(d=>d.ea(a,b));c||(c=new em);cm.info(`Chosen ads: ${c.name()}`);return c};_.gm=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};_.hm=function(a,b){a.classList.add(b)};
180
- _.im=function(a,b){if(a&&typeof b===_.Dd)for(const c in b)a.style[c]=b[c]};_.jm=function(a){return document.createElement(a)};km=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};lm=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.g.add(b))};
181
- mm=function(a,b,c){(_.ji()&&53===ki().major||_.ji()&&68===ki().major||_.li())&&!b.hasAttribute(Nc)&&(b.style.opacity="0",b.setAttribute(Nc,""),a.j.one(b,Xc,()=>{b.removeAttribute(Nc);b.style.opacity="1";c&&(c.style.opacity="1")}))};
182
- qm=function(a){a.a.on(window,"offline",()=>{nm(a,!1)});a.a.on(window,"online",()=>{a.f||om(a)});a.a.on(a.l,ke,()=>pm(a));a.a.on(a.l,"suspend",()=>pm(a));a.a.on(a.l,_.Qe,()=>pm(a));a.a.on(a.l,_.Vd,()=>{a.f||om(a)});a.a.on(a.l,_.Yd,()=>{a.f||om(a)});a.a.on(a.l,_.me,()=>{switch(a.l.getState()){case _.Fl:pm(a);break;default:pm(a)}})};rm=function(a){a.g&&(a.g.stop(),a.g=null)};pm=function(a){a.f&&om(a)};
183
- sm=function(a){return _.y(function*(){var b=a.l.getConfiguration().connectivityCheck;b&&a.l&&(b=yield wh(a.h,b.url,b.attemptParameters,b.method),nm(a,b))})};om=function(a){a.l.getConfiguration().connectivityCheck&&(rm(a),a.g=(new _.ci(()=>sm(a))).da(5))};nm=function(a,b){rm(a);a.f!==b&&(a.f=b,a.l&&a.l.getConfiguration().connectivityCheck&&a.l.trigger(new _.F(Jd,{online:a.f})))};um=function(){for(let a=0;a<tm.length;++a)tm[a].ic()};
184
- _.vm=function(a,b){b=b||0;a={priority:b,ic:a};for(let c=0;c<tm.length;c++)if(tm[c].priority<b){tm.splice(c,0,a);return}tm.push(a)};wm=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};ym=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 xm(b[0],b[1],b[2]);a.a=b}return a.a};
185
- zm=function(a){switch((a.ed()[0]||{src:"",type:""}).type){case _.Ub:a="dash";break;case _.Zb:a="ss";break;case _.Zi:a="hls";break;case _.Ke:a=_.zd;break;default:a=""}return a};Am=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};Bm=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
186
- Cm=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Dm=function(a){a=a.getDrmInfo();return(new _.ig(a&&a.licenseServerUri||"")).Fa};Em=function(a){const b=a.getConfiguration();let c="no";b.drm&&!_.sf(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Wc)||Dm(a).endsWith("drmtoday.com"))&&(c=Wc);return c};
187
- Fm=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.keySystem){case _.Lc:b="wv";break;case _.Kc:b="pr";break;case _.Jc:b="fps"}return b};Gm=function(a){a=a.getDrmInfo();let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Hm=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};
188
- Lm=function(a,b){const c="ie"===_.Gi().browser;var d=b.getConfiguration();const e=[...Array.from(_.ij.keys()),...b.Of()];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":Am(d),"CL-ASSET-ID":Bm(d),"CL-SESSION-ID":Cm(d),"CL-PLAYBACK-TYPE":b.isLive()?Im:Jm,"CL-CONTENT-TYPE":zm(b),"CL-PLUGINS":e.join(" "),"CL-DRM":Em(b),"CL-DRM-CDM":Fm(b),"CL-DRM-SEC-LEVEL":Hm(b),"CL-DRM-OFFLINE":Gm(b),"CL-DRM-IP":Dm(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=
189
- d);d=_.nh(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Km).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=ym(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=
190
- k+"!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:g=Promise.resolve();break a}a.f.error(Ha+k);g=Promise.reject(new _.H(_.G,7,g,k))}}return g})};_.Nm=function(a){a&&(0<=Mm.indexOf(a)||Mm.push(a))};
191
- Pm=function(a){if(!a.M){a.M=!0;a.h.getMedia()||a.h.getCastElement();a.w||(a.w=new Om(a.f.license));var b=Object.keys(a.K);Lm(a.w,{getConfiguration:a.getConfiguration.bind(a),ed:a.ed.bind(a),getDrmInfo:a.getDrmInfo.bind(a),Of:()=>b,isLive:a.isLive.bind(a)}).then(()=>{a.g.debug("License verified remotely")}).catch(c=>{setTimeout(wm,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)})}};
192
- Qm=function(a,b){a.w=new Om(b);a.w.verify().catch(c=>{setTimeout(()=>{a.g.error(Ha+c);a.trigger(new _.F(_.ad,{detail:new _.H(_.G,7,7101)}));a.destroy()},1E3)})};Sm=function(a,b){a.J=b;for(const c of a.J)(b=c.id())&&(a.K[b]=c);_.Rm(a,"onPlayerCreated")};_.Tm=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)))};
193
- _.Rm=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)};
194
- Um=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(_.me,a.B);a.A.off(a,_.me,a.B);a.A.off(document,Oe);a.trigger(new _.F(_.be));a.M=!1;a.h&&a.h.release();a.j&&(yield a.j.dispose(),a.j=null);mj(b=>{b.release()});if(a.a){let b=null;const c=a.a.on(_.me,d=>{b=d});return _.Rm(a,_.Hd).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"),
195
- a.trigger(b))}).finally(()=>{a.a.off(_.me,c);a.trigger(new _.F(ae))})}a.trigger(new _.F(ae));return new Promise(b=>b())})};
196
- Xm=function(a,b,c){return new Promise((d,e)=>{var f;if(b){var g=f=null;for(var h=0;h<b.length;h++);h=Object.values(_.Jf);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={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?(_.Kf.debug("Player Factory '"+f.Gb.a()+"' can play",b[g]),f=new Vm(f.Gb,g)):(_.Kf.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Gb.create(),d(new Wm(e,f.a))):
197
- (d=new _.F(_.ad,{detail:new _.H(_.G,7,7003)}),a.trigger(d),e(d))})};
198
- _.$m=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=_.Ql(b);a.f=_.gj(a.N,_.hj(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 Xm(a,a.o,a.f),c=d.a,d=d.f,a.I=!1;c?_.Tm(a,c):a.a.addDelegate(a);Ym(a);a.a&&a.a.setCdnErrorCallback(a.C);Zm(a,a.f);a.setSourceIndex(d);
199
- if(a.f.pauseWhenInBackground)a.A.on(document,Oe,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});mj(e=>{e.g()});yield _.Rm(a,"onContentWillLoad",a.f.source[d])})};_.an=function(a){return _.y(function*(){a.h.getMedia()||a.h.getCastElement();a.A.on(a,_.me,a.B);a.trigger(new _.F(rd));yield Promise.all([a.a.load(a.f),a.j.load()])})};
200
- _.cn=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);bn(a);mj(()=>{});yield _.Rm(a,"onContentLoaded");a.f.autoplay&&(yield a.play())})};Ym=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.y(function*(){a.mc&&a.wd&&(a.wd=!1,yield a.mc(b))}))};Zm=function(a,b){a.j=fm(a,b).create(a)};
201
- bn=function(a){const b=_.Yf(a.f.preferredTextLanguage).filter(d=>d),c=a.getTrackManager().ja();b.some(d=>{const e=_.vg(d);return(d=c.find(f=>{f=_.vg(f.language||"");return _.wg(f,e)}))?(a.getTrackManager().Da(d),!0):!1})};dn=function(a,b){a.size=void 0===b?0:1;a.f.debug("Setting key status to",b);a.a=b};
202
- en=function(a,b){a.g=b;_.Nf(a.f);if(!b)return Promise.resolve();a.f.on(b,Yc,c=>{_.Hf("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.a.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.f.on(b,We,c=>{{a.a.debug("Handle webkitNeedKey event");c=_.K(c.initData);if(_.Fg(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=_.Kg(c.subarray(4),
203
- !0);c=_.Mg(c);const d=new Event(Yc);d.initDataType="skd";d.initData=Gg(c);a.g.dispatchEvent(d)}});zl(b,HTMLMediaElement.HAVE_METADATA,a.f,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};fn=function(a,b){dn(a.keyStatuses,b);b=new _.F(hd);a.dispatchEvent(b)};
204
- jn=function(a,b){a.a=b;_.Nf(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(Yc);d.initDataType=_.uc;d.initData=Gg(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=gn(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.F(ud,{messageType:d?md:kd,message:c.message});d=e;_.Hf("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.If("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{if(c=gn(a,
205
- c.sessionId))_.Hf("WebkitEmeManager.MediaKeySession.ready"),hn(c,"usable"),c.a&&c.a.resolve(),c.a=null}),a.f.on(b,a.g+"keyerror",c=>{var d=gn(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?hn(d,_.Md):1===e?hn(d,"expired"):
206
- hn(d,_.gd))}}}))};gn=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};hn=function(a,b){dn(a.keyStatuses,b);b=new _.F(hd);a.dispatchEvent(b)};kn=function(a,b){return a.o?a.o+b.charAt(0).toUpperCase()+b.slice(1):b};
207
- ln=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===_.Pd)if(c)d=_.K(_.Mg("LOAD_SESSION|"+c));else{const f=_.Mg("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.K(b),f.byteLength);d=g}else d=_.K(b)}catch(f){return Promise.reject(f)}a.f=new _.Sk;const e=kn(a,"generateKeyRequest");try{a.h[e](a.g,d)}catch(f){if(f.name!==Fa)return a.f=null,Promise.reject(f);(new _.ci(()=>{try{a.h[e](a.g,d)}catch(g){a.f.reject(g),
208
- a.f=null}})).da(.01)}return a.f};mn=function(a,b,c){if(a.a)a.a.then(()=>mn(a,b,c)).catch(()=>mn(a,b,c));else{a.a=b;if(a.g===Se){var d=_.Ig(c);var e=JSON.parse(d);"oct"!==e.keys[0].kty&&(a.a.reject(Error("Response is not a valid JSON Web Key Set.")),a.a=null);d=_.$g(e.keys[0].k);e=_.$g(e.keys[0].kid)}else d=_.K(c),e=null;var f=kn(a,"addKey");try{a.h[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
209
- nn=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.cd?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};on=function(a){a=a.target;if(a.webkitPresentationMode===Qd){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)};
210
- pn=function(){return this.webkitSupportsPresentationMode(Qd)?(this.webkitSetPresentationMode(Qd),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};qn=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
211
- rn=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};sn=function(a,b,c){return new window.TextTrackCue(a,b,c)};tn=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};vn=function(a,b,c){if("input"===a)switch(this.type){case "range":a=xc}un.call(this,a,b,c)};wn=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
212
- xn=function(a){return wn()-a.a};zn=function(a){const b=new yn;b.a=a.a;return b};_.An=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.Cn=function(a,b,c,d){return _.y(function*(){try{return new (yield Bn(a,b,c,d))}catch(e){throw e.a(_.G),e;}})};
213
- Bn=function(a,b,c,d){return _.y(function*(){if(d){var e=_.Dn[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.En(a)){const f=_.Fn[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 Gn(a,b,c))){if(e=_.Dn[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.H(_.G,4,4E3,{url:a});})};
214
- _.En=function(a){a=(new _.ig(a)).ya.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};Gn=function(a,b,c){return _.y(function*(){var d=_.nh(a);lh(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).P).headers["content-type"])?d.toLowerCase():""})};Hn=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};
215
- In=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(Hn(a,e),qh(c,e.byteLength,xn(a.g)),a.g.a=wn());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>In(a,b,c))})};
216
- Kn=function(a){const b=a.uris[a.uriIndex],c=new Jn,d=new yn,e=zn(d);let f=0,g;const h=new _.Sk;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=xn(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(oa),ph(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
217
- const q={};for(const t of n)n=t.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const t=xn(e);l||qh(a,m.response?m.response.length:0,t);const v=_.oh(q,m.response,m.status,b,m.responseURL,a,t,g);a.rateLimitBps?rh(a.rateLimitBps,xn(e),a.bytesLoaded).then(()=>{h.resolve(v)}):h.resolve(v)}catch(t){h.reject(t)}};c.onerror=function(m){m=m.target;if(0>=m.status)h.reject(new _.H(1,1,1002,{url:b,request:a,status:m.status}));else{var n=m.getAllResponseHeaders();const t={};if(n){n=n.trim().split("\r\n");
218
- for(var q of n)n=q.split(": "),t[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.oh(t,m.response,m.status,b,m.responseURL,a,xn(e),g);h.resolve(q)}};c.ontimeout=function(){h.reject(new _.H(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=xn(d);d.a=wn();if(100<n||m.lengthComputable&&m.loaded===m.total)qh(a,m.loaded-f,n),f=m.loaded,l=!0};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);c.send(a.body);return{P:h,request:a,abort:()=>{c.abort();h.reject(new _.H(1,1,
219
- 7001,{url:b,request:a}));return Promise.resolve()}}};Ln=function(a){let b=null;a.g!==a.f&&(b={start:a.g,end:a.f,length:a.f-a.g,data:new DataView(a.h.a.buffer,a.g,a.f-a.g),count:-1});return b};Mn=function(a,b){{var c=a.h;const d=c.f+b.byteLength;if(d>c.a.byteLength){const e=c.a;c.a=new Uint8Array(Math.max(Math.ceil(c.a.buffer.byteLength*c.g),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.g;a.f=a.h.f;a.j=new DataView(a.h.a.buffer,0,a.h.f)};
220
- On=function(a){if(0<=a.m&&a.f<a.m)return null;let b=Nn(a);for(;null!==b;){if(b.name===_.sd){const c={start:a.g,end:b.end,length:b.end-a.g,data:new DataView(a.h.a.buffer,a.g,b.end-a.g),count:1};a.g=b.end;return c}b=Nn(a)}return null};
221
- Pn=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,xn(a.o)),a.o.a=wn());if(f)return e=Ln(a),(e=c(!0,e))?e.then(()=>a.h.a.buffer):Promise.resolve(a.h.a.buffer);let h=Promise.resolve();if(null!=g){Mn(a,g);var k=On(a);for(e=[];k;)e.push(k),k=On(a);if(!a.w)e.forEach(l=>{h=h.then(()=>c(!1,l))});else if(0<e.length){k=e[0];if(1<e.length){k=e[0];const l=e[e.length-1],m=l.end-k.start;k={start:k.start,end:l.end,length:m,data:new DataView(a.h.a.buffer,k.start,m),count:e.length}}(e=
222
- c(!1,k))&&(h=e)}}return h.then(()=>Pn(a,b,c,d))})};
223
- Nn=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Qn(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Qn(a);d=String.fromCharCode(d>>24&255,d>>16&255,d>>8&255,d&255);switch(c){case 0:c=a.f-b;break;case 1:if(a.a+8>=a.f)return a.a=a.f,null;{let e,f;try{f=a.j.getUint32(a.a,!1),e=a.j.getUint32(a.a+4,!1)}catch(g){throw new _.H(_.G,3,3E3);}if(2097151<f)throw new _.H(_.G,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.m=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
224
- Qn=function(a){const b=a.j.getUint32(a.a,!1);a.a+=4;return b};
225
- Tn=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=Rn(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Rn(e.request.fuzzFactor,.5));a.f*=Rn(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.j=h;Sn(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)});
226
- 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 Tn(a);g&&e.a(_.G);a.o.reject(e)}else a.o.reject(e)})};Sn=function(a,b,c){a.m=setTimeout(b,c)};Rn=function(a,b){return null===a||void 0===a?b:a};
227
- Xn=function(a){var b=new Un;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Vn,d={Cc:!1,ff:!1};b={P:Wn(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.Cc||(d.Cc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.ff=!0;c.abort()},a);b.P=b.P.finally(()=>{window.clearTimeout(e)})}return b};
228
- Wn=function(a,b,c,d){return _.y(function*(){let e,f,g;const h=new yn,k=zn(h);try{e=yield Yn(a,c);g=xn(h);const m=e.headers.get(oa);ph(b,m);const n=m?parseInt(m,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const q=e.body.getReader();f=yield Pn(new Zn(n,!b.disableMergedFragments),q,(t,v)=>{if(d.Cc)return null;v&&v.data&&(qh(b,v.data.byteLength,xn(h)),h.a=wn());return b.onFragment&&v?b.rateLimitBps?rh(b.rateLimitBps,xn(k),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},
229
- b.onProgress)}else{const q=e.body.getReader();f=yield In(new $n(n),q,b);b.rateLimitBps&&(yield rh(b.rateLimitBps,xn(k),f.byteLength))}}catch(m){if(d.Cc)throw new _.H(1,1,7001,{url:a,request:b});if(d.ff)throw new _.H(1,1,1003,{url:a,request:b});_.If("Error while fetching data:",m);throw new _.H(1,1,1002,{url:a,error:m,request:b,status:-1},m);}const l={};e.headers.forEach((m,n)=>{l[n.trim()]=m});if(d.Cc)throw new _.H(1,1,7001,{url:a,request:b});return _.oh(l,f,e.status,a,e.url,b,xn(k),g)})};
230
- bo=function(a){try{const b=a.uris[a.uriIndex],c=_.ao(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()}}};
231
- _.ao=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.If("Bad data URI, failed to parse scheme"),new _.H(_.G,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.If("Bad data URI, failed to extract encoding and MIME type"),new _.H(_.G,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];let d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.$g(a).buffer:_.Mg(a).buffer,contentType:c}};_.eo=function(a){delete _.co[a]};
232
- _.jo=function(a){if(!a.o)return null;const b=a.G;switch(a.o){case fo:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case go:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case ho:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case io:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Cd}};df="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
233
- ef=typeof Object.defineProperties==_.cd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
234
- ff("Promise",function(a){function b(g){this.f=0;this.j=void 0;this.a=[];var h=this.g();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.f=function(g){if(null==this.a){this.a=[];var h=this;this.g(function(){h.j()})}this.a.push(g)};var e=df.setTimeout;c.prototype.g=function(g){e(g,0)};c.prototype.j=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
235
- 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 _.Dd:var h=null!=g;break a;case _.cd:h=!0;break a;default:h=!1}h?this.A(g):this.m(g)}};
236
- b.prototype.A=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.cd?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();
237
- g.Vc(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==_.cd?function(v){try{l(q(v))}catch(x){m(x)}}:t}var l,m,n=new b(function(q,t){l=q;m=t});this.Vc(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Vc=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: "+
238
- l.f);}}var l=this;null==this.a?f.f(k):this.a.push(k)};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=cf(g),m=l.next();!m.done;m=l.next())d(m.value).Vc(h,k)})};b.all=function(g){var h=cf(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(x){q[v]=x;t--;0==t&&l(q)}}var q=[],t=0;do q.push(void 0),t++,d(k.value).Vc(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var hf=this||self;
239
- hf.a=!0;_.z("clpp.utils.obj.cloneItem",_.lf);_.z("clpp.utils.obj.merge",_.kf);var zf={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",zf);var xf=3,wf={},ko=[];_.z("clpp.log.getLoggers",function(){return _.lf(wf)});_.z("clpp.log.addInterceptor",function(a){a&&ko.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=ko.indexOf(a),0<=a&&ko.splice(a,1))});_.z("clpp.log.getTagLevel",yf);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=wf[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.qf(b)&&(b=Af(b)),wf[a]=b)});
240
- _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.qf(a)&&(a=Af(a));xf=a});_.z("clpp.log.getLogLevel",function(){return xf});
241
- _.Q=class{constructor(a){(this.tag=a)&&void 0===wf[a]&&(wf[a]=-1)}log(a,b){if(window.console){if(1<arguments.length){var c=arguments[0];Array.prototype.shift.call(arguments)}else c=3;var d=yf(this.tag);if(0<=d){if(d<c)return}else if(xf<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,
242
- arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of ko)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)}zf(a){return a?
243
- this.tag?new _.Q(this.tag+"."+a):new _.Q(a):this}};_.z("clpp.log.Logger",_.Q);_.Q.prototype.createChild=_.Q.prototype.zf;_.Q.prototype.error=_.Q.prototype.error;_.Q.prototype.warn=_.Q.prototype.warn;_.Q.prototype.debug=_.Q.prototype.debug;_.Q.prototype.info=_.Q.prototype.info;_.Q.prototype.log=_.Q.prototype.log;var Bf=new _.Q("clpp");_.z("clpp.log.info",_.Cf);_.z("clpp.log.debug",_.Hf);_.z("clpp.log.warn",_.C);_.z("clpp.log.error",_.If);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Vm,Wm;Vm=class{constructor(a,b){this.Gb=a;this.a=b}};Wm=class{constructor(a,b){this.a=a;this.f=b}};_.Kf=new _.Q("clpp.players");_.Jf={};_.lo=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 mo,no;mo=class{constructor(a,b,c,d){this.f=a;this.ic=b;this.a=c;this.jg=!!d}Pb(a){try{this.ic.handleEvent?this.ic.handleEvent(a):this.ic.call(this.a,a)}catch(b){_.If("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
153
+ Nl=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.x(function*(){if(e.length){var h=b;if(!h)try{h=$l(a,d,e,f)}catch(u){if(a.h.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:u,initDataType:d,initData:e}),a.g.ignoreUnrecognizedInitData)return}if(!g&&am(a,h,d,e)){var k=!0;if("skd"===d&&!a.g.enableSessionCacheForSkd)for(var l of a.f.keys()){var m=a.f.get(l);
154
+ if(h&&m.keyId===h){a.h.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.h.warn("Unable to close session",u)}k=!1}}if(k){a.h.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.C?_.ce:Pe;var q=a.G.createSession(n);a.h.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.U(new _.H(_.G,6,6005,{browserError:u.message}));return}a.w.on(q,Fd,a.na.bind(a));a.w.on(q,ud,a.fa.bind(a));k={Vb:f,cd:[],initData:e,initDataType:d,keyId:h,Qa:h?
155
+ [h]:[],loaded:!1,Xd:Infinity,periodId:c,mb:null,Ca:new _.Jl,sessionContext:{ldlDelay:0,customData:{}}};k.Ca.catch(()=>{});f&&(l=a.f.get(f),k.sessionContext=l.sessionContext);a.f.set(q,k);h&&!a.j.get(h)&&a.j.set(h,He);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.Qa.includes(m.keyId)&&_.zh(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.Qa.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,He));l=a.D.getConfiguration();m=a.keySystem();m=a.g.Pa[m];n=(n=m.modifiers)&&n.transformInitData;
156
+ _.Lf(n)||(n=yl);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.l.f()})}catch(u){h=u;u instanceof _.H||(h=new _.H(_.G,6,6016,u));k.Ca&&k.Ca.reject(u);a.U(h);return}a.h.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(u=>{if(!a.qa){var v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));a.U(new _.H(_.G,6,6006,{browserError:u.message,
157
+ error:u,extended:v},u))}})}else a.h.warn("Empty init data")})};bm=function(a){let b=Infinity;a=a.f.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};Zl=function(a){a=a.f.values();return _.Ug(a,b=>b.loaded)};am=function(a,b,c,d){if(!b&&c!==_.De)return!1;d=b||uk(d);for(const e of a.f.values())if(b&&e.keyId===b||b&&e.Qa.includes(b)||c===_.De&&(e.keyId||uk(e.initData))===d)return!0;return!1};
158
+ $l=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;var f=a.keySystem(),g=a.g.Pa[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.Lf(g)||(g=xl);try{var h={ldlDelay:0,customData:{}};e&&(h=a.f.get(e).sessionContext);var k=g(f,c,h);a.h.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.h.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.De)return uk(c)||"";if(b===_.yc){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
159
+ _.hl(c);if(m)return m.a}else if(ql(l)){{f=new _.gl(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.lk(m);const n=_.P(f);c=n>>>24;k=n&16777215;const q=_.jk(f,16),u=_.yh(q);if(0<c){const D=_.P(f);f.skip(16*D)}const v=_.P(f),y=_.jk(f,v),A=_.nl(y);_.dg("Parsed PR PSSH Box","size",g,"name",h,"version",c,"flags",k,"size",v,"systemId",u,"keyId",A.a);e=A}if(e)return e.a}}catch(m){throw a.h.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
160
+ Ql=function(a,b){const c=b.target,d=a.f.get(c);var e=a.keySystem();let f=!1;e.match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength?(f=!0,a.h.info("WV Server certificate request for "+`SID:'${c.sessionId} `+`from msg '${b.messageType}'`)):a.h.info("License request for "+`SID:'${c.sessionId}'/KID:'${d.keyId}' `+`from msg '${b.messageType}'`);let g=a.a.licenseServerUri;e=a.g.Pa[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
161
+ const h=_.Kh([g],a.g.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===xd&&d.Vb?wd:f?Ac:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===wd)a.D.onEvent(new _.F(dd));ql(a.a.keySystem)&&cm(a,h);Sj(a.K,h);const k=Math.floor(b.timeStamp),l=Date.now();return dm(a,h,d.sessionContext).then(()=>{_.ol(`drm.license.req.${k}.start`);a.h.debug("Sending DRM license request to",g,h);return a.D.xb.fetch(h).P}).then(m=>{_.ol(`drm.license.req.${k}.end`);
162
+ performance.measure(`drm.license.req.${k}`,`drm.license.req.${k}.start`,`drm.license.req.${k}.end`);if(a.qa)return Promise.reject();const n=Date.now()-l;var q=em(a,m);let u="";q&&(u=` RID:${q}`);q=m&&m.data?m.data.byteLength:-1;f?a.h.info("WV Server certificate response for "+`SID:'${c.sessionId}' `+`${q} bytes `+`in ${n}ms${u}`):a.h.info("License response for "+`SID:'${c.sessionId}'/`+`KID:'${d.keyId}' `+`${q} bytes `+`in ${n}ms${u}`);const v=Tj(a.K,m);_.ol(`drm.sess.update.${k}.start`);return c.update(m.data).then(()=>
163
+ {_.ol(`drm.sess.update.${k}.end`);performance.measure(`drm.sess.update.${k}`,`drm.sess.update.${k}.start`,`drm.sess.update.${k}.end`);if(!f){var y=bm(a),A=v?Date.now()+1E3*v.delay:Number.NaN;y=new _.F(_.fd,{keySystem:a.keySystem(),expirationTime:y,expectedRenewalTime:A});a.D.onEvent(y);d&&(d.mb&&d.mb.resolve(),d.Vb&&(y=d.Vb,a.h.info(`Closing expired session '${y.sessionId}'`),pl(y).catch(()=>{a.h.warn("Unable to close expired session in time")}),(y=a.f.get(d.Vb))&&y.jc&&y.jc.stop(),a.f.delete(d.Vb),
164
+ d.Vb=null),(new _.zi(()=>{a.qa||(d.loaded=!0,d.Ca&&d.Ca.resolve(),Zl(a)&&(a.o||a.h.info(ra),a.o=!0,a.B=!1,a.F.resolve()))})).ca(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||v&&Rj(a.keySystem()))&&(y=new _.zi(()=>{!a.qa&&a.K&&(a.h.info("Updating CSL Sessions"),ql(a.keySystem())?Nl(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.Pc)&&c.update(_.kh("renew")))}),d.jc=y,y.ca(v?v.delay:d.sessionContext.ldlDelay)))}})},m=>_.x(function*(){if(!a.qa){var n=m.data.headers;
165
+ n=Object.assign({message:_.ya,url:m.data.url,status:m.data.status,response:m.data.response},n?{headers:n}:{},Sk(n));n=new _.H(_.G,6,6007,n,m);a.U(n);d&&d.mb&&d.mb.reject(n);d&&d.Ca&&d.Ca.reject(n)}})).catch(m=>{a.qa||(m===kb?a.h.info("Ignore update for closed sessions"):(m=new _.H(_.G,6,6008,{browserError:m.message}),a.U(m),d&&d.mb&&d.mb.reject(m),d&&d.Ca&&d.Ca.reject(m)))})};
166
+ cm=function(a,b){var c=ih(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.h.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.bf).textContent;b.body=_.wh(a.querySelector("Challenge").textContent).buffer}else a.h.debug("PlayReady request is already unwrapped."),b.headers[pa]="text/xml; charset\x3dutf-8"};
167
+ dm=function(a,b,c){return _.x(function*(){const d=a.D.getConfiguration();yield Sl(a,d);const e=a.keySystem();var f=a.g.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(_.Pc)&&b.requestModifiers.push(k=>_.xk(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.Pc)&&b.responseModifiers.push(k=>_.yk(k))})};
168
+ em=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.gh(_.wh(b))).ti}catch(c){a.h.warn("Unable to parse DRMtoday Request ID",c)}return""};_.hm=function(a,b){a&&b&&(_.fm.set(a,b),_.gm.info(`Registered TextDisplayerFactory: '${a}'`))};
169
+ _.im=function(a,b){b=b.find(c=>(c=_.fm.get(c))?c.da(a):!1);if(null==b)return _.gm.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.gm.info(`Chosen the text displayer: ${b}`);return _.fm.get(b)};_.jm=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})}}};
170
+ km=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};lm=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};mm=function(a){return a.a.map(b=>_.Hf(b))};
171
+ _.nm=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:[]}};pm=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=om.value().get(b),c.one(a,b,d))};
172
+ tm=function(a){a.h.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>qm(a,d.type);a.a.on(b,_.kd,()=>{a.j=!1;rm(a,_.sm)});a.a.on(b,tc,c);a.a.on(b,_.le,()=>{a.F=!0;a.j=!1;qm(a,_.le)});a.a.on(b,_.ae,()=>{a.F=!1;a.j=!1;qm(a,_.ae)});a.a.on(b,_.Se,c);a.a.on(b,_.te,c);a.a.on(b,_.Ae,d=>{a.l=!1;a.j=!1;qm(a,d.type)});a.a.on(b,_.Be,d=>{a.l=!0;qm(a,d.type)});a.a.on(b,Ee,c);a.a.on(b,_.mf,()=>{a.j=!0;qm(a,_.mf)});a.a.on(b,_.ld,d=>a.U(d));a.a.on(b,_.Bd,c);a.a.on(b,uc,()=>{a.C=!0;qm(a,
173
+ uc)});a.a.on(b,_.af,d=>{a.l=!0;qm(a,d.type)});a.a.on(b,_.$e,d=>{a.l=!1;a.j=!1;qm(a,d.type)})};um=function(a,b){return Object.keys(b)[a]};wm=function(a,b){const c={type:_.Ge};b===_.sc||b===_.oc?(c.reason=a.w,b===_.sc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.vm&&(c.reason=a.w),a.A===_.vm&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
174
+ rm=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.vm;a.A=a.f;a.f=b;a.A===_.sm&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.vm?(a.K=a.o,a.w=a.l?1:2,a.h.info("Buffering started. Reason: "+um(a.w-1,_.xm)),b=wm(a,_.sc),a.Qb(_.sc,b)):d&&(a.B=a.o-a.K,a.h.info("Buffering finished. Reason: "+um(a.w-1,_.xm)+". Buffering time: "+a.B+" ms"),b=wm(a,_.oc),a.Qb(_.oc,b));b=um(a.A,_.ym);c=um(a.f,_.ym);a.h.info(`Player state change: ${b} -> ${c}`);a.Qb(_.Ge,wm(a,""));return!0};
175
+ qm=function(a,b){if(a.f===_.zm)a.h.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused();var d=a.m.getPosition();var e=a.m.getDuration();if(d=a.m.isEnded()||a.f===_.sm&&1>=Math.abs(d-e)||c&&d>=e)rm(a,_.sm)&&a.h.debug("Player claims to be in ended state, not checking more");else if(b!==_.Se){e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Fa(e,!0):-1;a.G=e;e=a.m.getSurface().getMedia();a.g=e?e.readyState:null;a.J=a.m.getPlaybackRate()||1;
176
+ e=typeof a.g===_.r&&2>a.g&&2===e.networkState;var f=typeof a.g===_.r&&0>=a.G&&a.f===_.Am,g=typeof a.g===_.r&&2>=a.g&&a.j;e=a.l||f||e||g;!a.M||a.m.isLive()||a.f!==_.vm||e||(f=b===_.Ae&&4===a.g,(g=a.A===_.Bm)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=rm(a,_.vm):c?f=rm(a,_.Cm):a.F&&(f=rm(a,_.Dm));f&&(a.C=!1);a.h.debug("Video state check for event "+b+":: seeking: "+a.l+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.g+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+
177
+ f+", Current state: "+um(a.f,_.ym))}}};Em=function(a){a=(new _.Gg(a)).xa;if(!a)return null;a=a.toUpperCase();return _.oh(a,".MPD")?_.$b:_.oh(a,".M3U8")?_.vj:_.oh(a,".MP4")?_.ff:_.oh(a,"MANIFEST")||_.oh(a,".ISM")?_.ec:null};_.Gm=function(a){let b;_.Ej(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Je||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Fm(b[c]);d&&a.push(d)}return a};
178
+ Fm=function(a){let b=null;_.Rf(a)&&(a={url:a});typeof a===_.Od&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.B(a.drmProtected)||typeof a.drmProtected!==_.nc||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.nc||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.Je||(b.name=a.name),_.B(a.Bb)||typeof a.Bb!==_.Je||(b.Bb=a.Bb),_.B(a.audioMimeType)||typeof a.audioMimeType!==_.Je||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Em(a.url),b.type?Hm.debug("Detect media type "+
179
+ b.type+" for "+a.url):Hm.warn("Unable to detect media type for "+a.url));return b};Jm=function(a){return a.A?Im():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.ld);a.g.off(c,_.ye);a.a=null}b()})};Im=function(){return Promise.reject(new _.H(_.G,7,7E3))};
180
+ Lm=function(a,b){return a.A?Im():new Promise(c=>{a.a||(a.g.on(b,_.ld,()=>{{const d=Km(a);if(d)a.onError(d)}}),a.g.on(b,_.ye,()=>{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(_.mc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
181
+ Nm=function(a){return _.x(function*(){if(a.A)return Im();var b=a.w[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.Xj(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=new _.Mm({xb:c,onError:d=>a.onError(d),ae:()=>{},onExpirationUpdated:(d,e)=>{a.trigger(new _.F(_.cd,{expirationTime:e}))},onEvent:d=>{d instanceof _.F?a.dispatchEvent(d):
182
+ a.log.debug(_.ub,d.type)},getConfiguration:()=>a.getConfiguration(),qc:()=>a.qc()});a.o.g=b;yield _.Il(a.o,[{id:0,language:_.Ve,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,ya:0,mimeType:_.ff,codecs:"",encrypted:!0,keyId:null,language:_.Ve,originalLanguage:_.Ve,label:null,type:_.w,primary:!1,frameRate:void 0,
183
+ ih:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,Vg:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}],[]);yield _.Yl(a.o,a.a);return Promise.resolve()})};Om=function(a,b){pm(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.zm&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
184
+ Km=function(a){if(null===a.w||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.H(_.G,3,3016,{code:b,dh:c,message:a.a.error.message})};
185
+ Qm=function(a){if(a.A)return new _.Pm(Im(),()=>{});const b=a.w[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.I;c&&Om(a,c);if(d.preload!==_.Nd)a.g.one(d,_.Bd,()=>{const g=Date.now()/1E3-e;a.f.A=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Fi()||_.Ii())&&d.load();const f=new _.Jl;a.g.one(d,Ee,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.F||(a.F=(new _.zi(()=>{f.reject(new _.H(_.G,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
186
+ uri:b.url},d.error))})).ca(g))});pm(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject(Km(a)):d.preload===_.Nd&&(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,_.ld,()=>{f.reject(Km(a))});return new _.Pm(f,
187
+ ()=>{const g=new _.H(_.G,7,7001);f.reject(g);return Promise.resolve()})};Rm=function(a,b){pm(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{if(a.isLive()&&a.getState()!==_.zm){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)}))}})};
188
+ _.Um=function(a){a&&(0<=Sm.indexOf(a)?Tm.warn(`Factory '${a.name()}' is already registered`):(Sm.push(a),Tm.info(`Factory ${a.name()}' has been registered.`)))};Wm=function(a,b){let c=Sm.find(d=>d.da(a,b));c||(c=new Vm);Tm.info(`Chosen ads: ${c.name()}`);return c};_.Xm=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};_.Ym=function(a,b){a.classList.add(b)};
189
+ _.Zm=function(a,b){if(a&&typeof b===_.Od)for(const c in b)a.style[c]=b[c]};_.$m=function(a){return document.createElement(a)};an=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.g.values());wg(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};bn=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.g.add(b))};
190
+ cn=function(a,b,c){(_.Ii()&&53===Ji().major||_.Ii()&&68===Ji().major||_.Ki())&&!b.hasAttribute(Uc)&&(b.style.opacity="0",b.setAttribute(Uc,""),a.j.one(b,hd,()=>{b.removeAttribute(Uc);b.style.opacity="1";c&&(c.style.opacity="1")}))};
191
+ gn=function(a){a.a.on(window,"offline",()=>{dn(a,!1)});a.a.on(window,"online",()=>{a.f||en(a)});a.a.on(a.m,Ee,()=>fn(a));a.a.on(a.m,"suspend",()=>fn(a));a.a.on(a.m,_.mf,()=>fn(a));a.a.on(a.m,_.le,()=>{a.f||en(a)});a.a.on(a.m,_.re,()=>{a.f||en(a)});a.a.on(a.m,_.Ge,()=>{switch(a.m.getState()){case _.vm:fn(a);break;default:fn(a)}})};hn=function(a){a.g&&(a.g.stop(),a.g=null)};fn=function(a){a.f&&en(a)};
192
+ jn=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Th(a.j,b.url,b.attemptParameters,b.method),dn(a,b))})};en=function(a){a.m.getConfiguration().connectivityCheck&&(hn(a),a.g=(new _.zi(()=>jn(a))).ca(5))};dn=function(a,b){hn(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.F(Ud,{online:a.f})))};ln=function(){for(let a=0;a<kn.length;++a)kn[a].ic()};
193
+ _.mn=function(a,b){b=b||0;a={priority:b,ic:a};for(let c=0;c<kn.length;c++)if(kn[c].priority<b){kn.splice(c,0,a);return}kn.push(a)};nn=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};pn=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 on(b[0],b[1],b[2]);a.a=b}return a.a};
194
+ qn=function(a){switch((a.fd()[0]||{src:"",type:""}).type){case _.$b:a="dash";break;case _.ec:a="ss";break;case _.vj:a="hls";break;case _.ff:a=_.Kd;break;default:a=""}return a};rn=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};sn=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
195
+ tn=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};un=function(a){a=a.getDrmInfo();return(new _.Gg(a&&a.licenseServerUri||"")).Ga};vn=function(a){const b=a.getConfiguration();let c="no";b.drm&&!_.Tf(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(gd)||un(a).endsWith("drmtoday.com"))&&(c=gd);return c};
196
+ wn=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.keySystem){case _.Sc:b="wv";break;case _.Qc:b="pr";break;case _.Pc:b="fps"}return b};xn=function(a){a=a.getDrmInfo();let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};yn=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.videoRobustness){case Ea:case Ca:b="L1";break;case Da:b="L2";break;case _.jb:case _.ib:b="L3"}return b};
197
+ Cn=function(a,b){const c="ie"===_.cj().browser;var d=b.getConfiguration();const e=[...Array.from(_.Fj.keys()),...b.$f()];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":rn(d),"CL-ASSET-ID":sn(d),"CL-SESSION-ID":tn(d),"CL-PLAYBACK-TYPE":b.isLive()?zn:An,"CL-CONTENT-TYPE":qn(b),"CL-PLUGINS":e.join(" "),"CL-DRM":vn(b),"CL-DRM-CDM":wn(b),"CL-DRM-SEC-LEVEL":yn(b),"CL-DRM-OFFLINE":xn(b),"CL-DRM-IP":un(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=
198
+ d);d=_.Kh(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Bn).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=pn(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=
199
+ 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.h.error(Ia+k);g=Promise.reject(new _.H(_.G,7,g,k))}}return g})};_.En=function(a){a&&(0<=Dn.indexOf(a)||Dn.push(a))};
200
+ Gn=function(a){if(!a.M){a.M=!0;a.g.getMedia()||a.g.getCastElement();a.w||(a.w=new Fn(a.f.license));var b=Object.keys(a.K);Cn(a.w,{getConfiguration:a.getConfiguration.bind(a),fd:a.fd.bind(a),getDrmInfo:a.getDrmInfo.bind(a),$f:()=>b,isLive:a.isLive.bind(a)}).then(()=>{a.h.debug("License verified remotely")}).catch(c=>{setTimeout(nn,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)})}};
201
+ Hn=function(a,b){a.w=new Fn(b);a.w.verify().catch(c=>{setTimeout(()=>{a.h.error(Ia+c);a.trigger(new _.F(_.ld,{detail:new _.H(_.G,7,7101)}));a.destroy()},1E3)})};Jn=function(a,b){a.J=b;for(const c of a.J)(b=c.id())&&(a.K[b]=c);_.In(a,"onPlayerCreated")};_.Kn=function(a,b){b!==a.a&&(a.a&&(a.a.removeDelegate(a),a.a.destroy()),a.a=b,a.a&&(a.a.init(a.g,a.f),a.a.setNetworkEngine(a.getNetworkEngine()),a.a.addDelegate(a)))};
202
+ _.In=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)};
203
+ Ln=function(a){return _.x(function*(){if(a.H)return a.h.debug("The player is already released. No-op"),new Promise(b=>b());a.off(_.Ge,a.C);a.A.off(a,_.Ge,a.C);a.A.off(document,kf);a.trigger(new _.F(_.ve));a.M=!1;a.g&&a.g.release();a.j&&(yield a.j.dispose(),a.j=null);if(a.a){let b=null;const c=a.a.on(_.Ge,d=>{b=d});return _.In(a,_.Sd).then(()=>{a.a.removeDelegate(a);return Promise.all([a.a.release(),a.B.release()])}).then(()=>{a.h.debug("Releasing player completed");b&&(a.h.debug("Re-post state change event after release"),
204
+ a.trigger(b))}).finally(()=>{a.a.off(_.Ge,c);a.trigger(new _.F(ue))})}a.trigger(new _.F(ue));return new Promise(b=>b())})};
205
+ On=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(_.fg);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Hb:h[l],confidence:h[l].canPlay(b[k],c)};if(null===f||f.confidence<m.confidence)f=m,g=k}f&&typeof g===_.r&&0<f.confidence?(_.gg.debug("Player Factory '"+f.Hb.a()+"' can play",b[g]),f=new Mn(f.Hb,g)):(_.gg.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Hb.create(),d(new Nn(e,f.a))):
206
+ (d=new _.F(_.ld,{detail:new _.H(_.G,7,7003)}),a.trigger(d),e(d))})};
207
+ _.Rn=function(a,b){return _.x(function*(){_.ol(ie);if(a.G)throw Error("Player is already destroyed.");if(!a.g)throw Error("No surface associated with this player!");yield a.release();a.o=_.Gm(b);a.f=_.Dj(a.N,_.Ej(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 On(a,a.o,a.f),c=d.player,d=d.a,a.I=!1;c?_.Kn(a,c):a.a.addDelegate(a);Pn(a);a.a&&a.a.setCdnErrorCallback(a.F);Qn(a,a.f);
208
+ a.setSourceIndex(d);if(a.f.pauseWhenInBackground)a.A.on(document,kf,()=>{document.hidden?(a.h.debug("Player is hidden: pausing..."),a.pause()):(a.h.debug("Player is visible: resuming..."),a.play())});Mj(a);yield _.In(a,"onContentWillLoad",a.f.source[d]);_.ol(he);performance.measure("player.beforeLoad",ie,he)})};_.Sn=function(a){return _.x(function*(){a.g.getMedia()||a.g.getCastElement();a.A.on(a,_.Ge,a.C);a.trigger(new _.F(Cd));yield Promise.all([a.a.load(a.f),a.j.load()])})};
209
+ _.Un=function(a){return _.x(function*(){_.ol(ge);const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);Tn(a);Nj();yield _.In(a,"onContentLoaded");a.f.autoplay&&(yield a.play());_.ol(fe);performance.measure("player.afterLoad",ge,fe)})};Vn=function(a){return _.x(function*(){if(a.a){var b=a.a;b.af?(a.trigger(new _.F(Cd)),yield b.af(),yield _.Un(a)):a.h.warn(ab)}else a.h.warn(Ya)})};
210
+ Pn=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.lc&&a.Cd&&(a.Cd=!1,yield a.lc(b))}))};Qn=function(a,b){a.j=Wm(a,b).create(a)};Tn=function(a){const b=_.ug(a.f.preferredTextLanguage).filter(d=>d),c=a.getTrackManager().ja();b.some(d=>{const e=_.Sg(d);return(d=c.find(f=>{f=_.Sg(f.language||"");return _.Tg(f,e)}))?(a.getTrackManager().Ea(d),!0):!1})};
211
+ Wn=function(a){const b=document.getElementById(a);if(!b)throw Error("Anchor element not found");b.classList.add(Fc);return Array.from({length:3}).map(()=>{const c=document.createElement(_.w);c.classList.add("clpp-mc-playlist-video-el");const d=document.createElement(_.Yc);d.classList.add("clpp-mc-playlist-item");d.appendChild(c);b.appendChild(d);return new Q(c)})};
212
+ Xn=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.h.info(`Show video element .${b}`),d.classList.add("clpp-visible")):(a.h.info(`Hide video element .${b}`),d.classList.remove("clpp-visible")),a.A&&a.A(d,c))};Zn=function(a,b){return _.x(function*(){const c=yield a.o.get();a.g=b;b.role=Yn;a.g.player=c;a.g.videoEl=c.getSurface().getMedia();Xn(a,c,!0);yield c.load(b.config)})};
213
+ co=function(a){_.x(function*(){if(0===a.a)yield $n(a);else if(a.a===a.f.length-1)yield ao(a);else{const b=[a.a-1,a.a+1];a.h.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>bo(a,c)))}})};
214
+ eo=function(a,b){return _.x(function*(){if(b.player){if("preloading"===b.state){a.h.info("Wait for preloading to finish");try{yield b.preloadPromise}catch(c){}}a.g=b;b.role=Yn;Xn(a,b.player,!0);"preloaded"===b.state?(_.ol(pe),yield Vn(b.player),_.ol(oe),performance.measure("playlist.next",pe,oe)):b.state===qe&&(yield b.player.load(b.config))}})};
215
+ go=function(a,b){return _.x(function*(){a.h.info(`Stop current playback (index: ${b.index})`);const c=b.player;b.player=null;b.videoEl=null;b.role=fo;c.pause();yield a.o.release(c);Xn(a,c,!1)})};io=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>ho(a,b)))};jo=function(a){return _.x(function*(){yield a.o.destroy();const b=document.getElementById(a.w.anchorId);b&&(b.classList.remove(Fc),b.innerHTML="")})};
216
+ ho=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.h.info(`Stop preloading item (index: ${b})`),c.player&&(yield a.o.release(c.player)),a.l.delete(b))})};
217
+ bo=function(a,b){return _.x(function*(){const c=yield a.o.get(),d=a.f[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=fo;d.state="preloading";a.trigger(new _.F(Xe));try{a.l.set(b,d),d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state="preloaded",a.trigger(new _.F(Xe))}catch(e){7001===e.code?(a.h.info(`Preload aborted (index: ${b})`),d.state="preload-aborted"):(a.h.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.F(_.ld,{detail:e})),d.state=qe),a.trigger(new _.F(Xe))}})};
218
+ $n=function(a){return _.x(function*(){const b=a.a+1;a.h.info(`Preload following item (index: ${b})`);yield bo(a,b)})};ao=function(a){return _.x(function*(){const b=a.a-1;a.h.info(`Preload preceding item (index: ${b})`);yield bo(a,b)})};ko=function(a,b){a.size=void 0===b?0:1;a.h.debug("Setting key status to",b);a.a=b};
219
+ lo=function(a,b){a.f=b;_.jg(a.a);if(!b)return Promise.resolve();a.a.on(b,id,c=>{_.dg("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.h.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,sf,c=>{{a.h.debug("Handle webkitNeedKey event");c=_.J(c.initData);if(_.bh(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=ih(c.subarray(4),
220
+ !0);c=_.kh(c);const d=new Event(id);d.initDataType="skd";d.initData=eh(c);a.f.dispatchEvent(d)}});pm(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.g));return Promise.resolve()};mo=function(a,b){ko(a.keyStatuses,b);b=new _.F(ud);a.dispatchEvent(b)};
221
+ po=function(a,b){a.a=b;_.jg(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(id);d.initDataType=_.yc;d.initData=eh(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=no(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.F(Fd,{messageType:d?xd:wd,message:c.message});d=e;_.dg("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.eg("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{(c=no(a,
222
+ c.sessionId))&&c.ready()}),a.f.on(b,a.g+"keyerror",c=>{var d=no(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?oo(d,_.$d):1===e?oo(d,"expired"):oo(d,_.td))}}}))};
223
+ no=function(a,b){let c=a.l.get(b);return c?c:(c=a.j.shift())?(c.sessionId=b,a.l.set(b,c),c):null};oo=function(a,b){ko(a.keyStatuses,b);b=new _.F(ud);a.dispatchEvent(b)};qo=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
224
+ ro=function(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;let d;try{if(a.l===_.ce)if(c)d=_.J(_.kh("LOAD_SESSION|"+c));else{const f=_.kh("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.J(b),f.byteLength);d=g}else d=_.J(b)}catch(f){return Promise.reject(f)}a.f=new _.Jl;const e=qo(a,"generateKeyRequest");try{a.j[e](a.g,d)}catch(f){if(f.name!==Ga)return a.f=null,Promise.reject(f);(new _.zi(()=>{try{a.j[e](a.g,d)}catch(g){a.f.reject(g),
225
+ a.f=null}})).ca(.01)}return a.f};so=function(a,b,c){if(a.a)a.a.then(()=>so(a,b,c)).catch(()=>so(a,b,c));else{a.a=b;if(a.g===of){var d=_.gh(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=_.wh(e.keys[0].k);e=_.wh(e.keys[0].kid)}else d=_.J(c),e=null;var f=qo(a,"addKey");try{a.j[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
226
+ to=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.od?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};uo=function(a){a=a.target;if(a.webkitPresentationMode===de){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)};
227
+ vo=function(){return this.webkitSupportsPresentationMode(de)?(this.webkitSetPresentationMode(de),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};wo=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
228
+ xo=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};yo=function(a,b,c){return new window.TextTrackCue(a,b,c)};zo=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};Bo=function(a,b,c){if("input"===a)switch(this.type){case "range":a=Bc}Ao.call(this,a,b,c)};Co=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
229
+ Do=function(a){return Co()-a.a};Fo=function(a){const b=new Eo;b.a=a.a;return b};_.Go=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.Io=function(a,b,c,d){return _.x(function*(){try{return new (yield Ho(a,b,c,d))}catch(e){throw e.a(_.G),e;}})};
230
+ Ho=function(a,b,c,d){return _.x(function*(){if(d){var e=_.Jo[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.Ko(a)){const f=_.Lo[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 Mo(a,b,c))){if(e=_.Jo[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.H(_.G,4,4E3,{url:a});})};
231
+ _.Ko=function(a){a=(new _.Gg(a)).xa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};Mo=function(a,b,c){return _.x(function*(){var d=_.Kh(a);Ih(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).P).headers["content-type"])?d.toLowerCase():""})};No=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};
232
+ Oo=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(No(a,e),Nh(c,e.byteLength,Do(a.g)),a.g.a=Co());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>Oo(a,b,c))})};
233
+ Qo=function(a){const b=a.uris[a.uriIndex],c=new Po,d=new Eo,e=Fo(d);let f=0,g;const h=new _.Jl;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=Do(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(oa),Mh(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
234
+ const q={};for(const u of n)n=u.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=Do(e);l||Nh(a,m.response?m.response.length:0,u);const v=_.Lh(q,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?Oh(a.rateLimitBps,Do(e),a.bytesLoaded).then(()=>{h.resolve(v)}):h.resolve(v)}catch(u){h.reject(u)}};c.onerror=function(m){m=m.target;if(0>=m.status)h.reject(new _.H(1,1,1002,{url:b,request:a,status:m.status}));else{var n=m.getAllResponseHeaders();const u={};if(n){n=n.trim().split("\r\n");
235
+ for(var q of n)n=q.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.Lh(u,m.response,m.status,b,m.responseURL,a,Do(e),g);h.resolve(q)}};c.ontimeout=function(){h.reject(new _.H(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=Do(d);d.a=Co();if(100<n||m.lengthComputable&&m.loaded===m.total)Nh(a,m.loaded-f,n),f=m.loaded,l=!0};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);c.send(a.body);return{P:h,request:a,abort:()=>{c.abort();h.reject(new _.H(1,1,
236
+ 7001,{url:b,request:a}));return Promise.resolve()}}};Ro=function(a){let b=null;a.g!==a.f&&(b={start:a.g,end:a.f,length:a.f-a.g,data:new DataView(a.j.a.buffer,a.g,a.f-a.g),count:-1});return b};So=function(a,b){{var c=a.j;const d=c.f+b.byteLength;if(d>c.a.byteLength){const e=c.a;c.a=new Uint8Array(Math.max(Math.ceil(c.a.buffer.byteLength*c.g),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.g;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f)};
237
+ Uo=function(a){if(0<=a.o&&a.f<a.o)return null;let b=To(a);for(;null!==b;){if(b.name===_.Dd){const c={start:a.g,end:b.end,length:b.end-a.g,data:new DataView(a.j.a.buffer,a.g,b.end-a.g),count:1};a.g=b.end;return c}b=To(a)}return null};
238
+ Vo=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,Do(a.w)),a.w.a=Co());if(f)return e=Ro(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){So(a,g);var k=Uo(a);for(e=[];k;)e.push(k),k=Uo(a);if(!a.A)e.forEach(l=>{h=h.then(()=>c(!1,l))});else if(0<e.length){k=e[0];if(1<e.length){k=e[0];const l=e[e.length-1],m=l.end-k.start;k={start:k.start,end:l.end,length:m,data:new DataView(a.j.a.buffer,k.start,m),count:e.length}}(e=
239
+ c(!1,k))&&(h=e)}}return h.then(()=>Vo(a,b,c,d))})};
240
+ To=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Wo(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Wo(a);d=String.fromCharCode(d>>24&255,d>>16&255,d>>8&255,d&255);switch(c){case 0:c=a.f-b;break;case 1:if(a.a+8>=a.f)return a.a=a.f,null;{let e,f;try{f=a.l.getUint32(a.a,!1),e=a.l.getUint32(a.a+4,!1)}catch(g){throw new _.H(_.G,3,3E3);}if(2097151<f)throw new _.H(_.G,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.o=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
241
+ Wo=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
242
+ Zo=function(a){a.g=a.B.then(e=>{a.j=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=Xo(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Xo(e.request.fuzzFactor,.5));a.f*=Xo(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;Yo(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)});
243
+ let b=0,c=0,d=0;return a.g.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.P}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.H){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return Zo(a);g&&e.a(_.G);a.w.reject(e)}else a.w.reject(e)})};Yo=function(a,b,c){a.o=setTimeout(b,c)};Xo=function(a,b){return null===a||void 0===a?b:a};
244
+ $o=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new Dg("Parsing CMSD, missing parameter or wrong format");if(c&&!b)return{key:c,value:!0};const d=b[0];if('"'===d&&'"'===b[b.length-1])return{key:c,value:b.replaceAll(/(^")|("$)/g,"")};if(/^[-0-9]/.test(d))return{key:c,value:parseInt(b,10)};if(/^[a-zA-Z*]/.test(d))return{key:c,value:b};throw new Dg(`Parsing CMSD, not recognized value type of ${a}`);};
245
+ dp=function(a){var b=new ap;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new bp,d={Bc:!1,kf:!1};b={P:cp(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.kf=!0;c.abort()},a);b.P=b.P.finally(()=>{window.clearTimeout(e)})}return b};
246
+ cp=function(a,b,c,d){return _.x(function*(){let e,f,g;const h=new Eo,k=Fo(h);try{e=yield ep(a,c);g=Do(h);const m=e.headers.get(oa);Mh(b,m);const n=m?parseInt(m,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const q=e.body.getReader();f=yield Vo(new fp(n,!b.disableMergedFragments),q,(u,v)=>{if(d.Bc)return null;v&&v.data&&(Nh(b,v.data.byteLength,Do(h)),h.a=Co());return b.onFragment&&v?b.rateLimitBps?Oh(b.rateLimitBps,Do(k),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},
247
+ b.onProgress)}else{const q=e.body.getReader();f=yield Oo(new gp(n),q,b);b.rateLimitBps&&(yield Oh(b.rateLimitBps,Do(k),f.byteLength))}}catch(m){if(d.Bc)throw new _.H(1,1,7001,{url:a,request:b});if(d.kf)throw new _.H(1,1,1003,{url:a,request:b});_.eg("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 _.Lh(l,f,e.status,a,e.url,b,Do(k),g)})};
248
+ ip=function(a){try{const b=a.uris[a.uriIndex],c=_.hp(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()}}};
249
+ _.hp=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.eg("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 _.eg("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?_.wh(a).buffer:_.kh(a).buffer,contentType:c}};_.kp=function(a){delete _.jp[a]};
250
+ _.pp=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case lp:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case mp:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case np:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case op:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Nd}};Af="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
251
+ Bf=typeof Object.defineProperties==_.od?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
252
+ Cf("Promise",function(a){function b(g){this.f=0;this.l=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.l()})}this.a.push(g)};var e=Af.setTimeout;c.prototype.g=function(g){e(g,0)};c.prototype.l=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
253
+ g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.g(function(){throw g;})};b.prototype.g=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.C),reject:g(this.j)}};b.prototype.C=function(g){if(g===this)this.j(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.Od:var h=null!=g;break a;case _.od:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
254
+ b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.j(k);return}typeof h==_.od?this.G(h,g):this.o(g)};b.prototype.j=function(g){this.w(2,g)};b.prototype.o=function(g){this.w(1,g)};b.prototype.w=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.l=h;this.A()};b.prototype.A=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.f(this.a[g]);this.a=null}};var f=new c;b.prototype.F=function(g){var h=this.g();
255
+ g.Vc(h.resolve,h.reject)};b.prototype.G=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,u){return typeof q==_.od?function(v){try{l(q(v))}catch(y){m(y)}}:u}var l,m,n=new b(function(q,u){l=q;m=u});this.Vc(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Vc=function(g,h){function k(){switch(l.f){case 1:g(l.l);break;case 2:h(l.l);break;default:throw Error("Unexpected state: "+
256
+ 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=zf(g),m=l.next();!m.done;m=l.next())d(m.value).Vc(h,k)})};b.all=function(g){var h=zf(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){q[v]=y;u--;0==u&&l(q)}}var q=[],u=0;do q.push(void 0),u++,d(k.value).Vc(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var Ef=this||self;
257
+ Ef.a=!0;_.z("clpp.utils.obj.cloneItem",_.Hf);_.z("clpp.utils.obj.merge",_.Gf);var $f={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",$f);var Yf=3,Xf={},qp=[];_.z("clpp.log.getLoggers",function(){return _.Hf(Xf)});_.z("clpp.log.addInterceptor",function(a){a&&qp.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=qp.indexOf(a),0<=a&&qp.splice(a,1))});_.z("clpp.log.getTagLevel",Zf);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=Xf[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.Rf(b)&&(b=ag(b)),Xf[a]=b)});
258
+ _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.Rf(a)&&(a=ag(a));Yf=a});_.z("clpp.log.getLogLevel",function(){return Yf});
259
+ _.R=class{constructor(a){(this.tag=a)&&void 0===Xf[a]&&(Xf[a]=-1)}log(a,b){if(window.console){if(1<arguments.length){var c=arguments[0];Array.prototype.shift.call(arguments)}else c=3;var d=Zf(this.tag);if(0<=d){if(d<c)return}else if(Yf<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,
260
+ arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of qp)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)}Kf(a){return a?
261
+ this.tag?new _.R(this.tag+"."+a):new _.R(a):this}};_.z("clpp.log.Logger",_.R);_.R.prototype.createChild=_.R.prototype.Kf;_.R.prototype.error=_.R.prototype.error;_.R.prototype.warn=_.R.prototype.warn;_.R.prototype.debug=_.R.prototype.debug;_.R.prototype.info=_.R.prototype.info;_.R.prototype.log=_.R.prototype.log;var bg=new _.R("clpp");_.z("clpp.log.info",_.cg);_.z("clpp.log.debug",_.dg);_.z("clpp.log.warn",_.C);_.z("clpp.log.error",_.eg);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Mn,Nn;Mn=class{constructor(a,b){this.Hb=a;this.a=b}};Nn=class{constructor(a,b){this.player=a;this.a=b}};_.gg=new _.R("clpp.players");_.fg={};_.rp=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 sp,tp;sp=class{constructor(a,b,c,d){this.f=a;this.ic=b;this.a=c;this.Ag=!!d}Qb(a){try{this.ic.handleEvent?this.ic.handleEvent(a):this.ic.call(this.a,a)}catch(b){_.eg("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
244
262
  _.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(){}};
245
- no=class{constructor(a){this.a=new _.lo;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].jg&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new mo(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new mo(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 oo;_.po=class{constructor(){this.a=new _.lo}release(){_.Nf(this)}on(a,b,c,d=!1){a=new oo(a,b,c,d);this.a.push(b,a)}one(a,b,c){const d=e=>{this.off(a,b,d);return c(e)};this.on(a,b,d)}off(a,b,c){const d=this.a.get(b)||[];for(let e=0;e<d.length;++e){const f=d[e];f.target!=a||c!=f.a&&c||(Mf(f),this.a.remove(b,f))}}};oo=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 qo=class{constructor(a){this.l=a;this.m=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.h=null;this.f=new _.po;this.a=this.j=null;this.g=[];this.o=new _.Q("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}};_.xo=class{constructor(a,b,c,d){d=void 0===d?_.ro:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.so;this.writingMode=_.to;this.lineInterpretation=_.uo;this.line=null;this.lineAlign=_.vo;this.direction=wo;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}bd(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
246
- a.payloadType}};_.z("clpp.text.Cue",_.xo);_.xo.positionAlign={LEFT:_.nd,RIGHT:_.od,CENTER:_.vc,AUTO:"auto"};_.ro=_.u;_.xo.payloadType={TEXT:_.ro,VTT_XML:_.Pe,TTML_XML:_.ze};_.so=_.vc;_.yo={LEFT:_.id,RIGHT:_.fe,CENTER:_.so,START:_.id,END:_.fe};_.xo.textAlign=_.yo;var wo="ltr";_.xo.direction={HORIZONTAL_LEFT_TO_RIGHT:wo,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.to="horizontal-tb";_.xo.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.to,VERTICAL_LEFT_TO_RIGHT:_.He,VERTICAL_RIGHT_TO_LEFT:_.Ie};_.uo=0;
247
- _.xo.lineInterpretation={LINE_NUMBER:_.uo,PERCENTAGE:1};_.vo=_.le;_.zo={CENTER:_.vc,START:_.vo,END:_.Zc};_.xo.lineAlign=_.zo;_.Co=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.Ao;this.scroll=Bo;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.Co);_.Ao=1;_.Co.units={PX:0,PERCENTAGE:_.Ao,LINES:2};var Bo="";
248
- _.Co.scrollMode={NONE:Bo,UP:"up"};_.Co.displayAlign={BEFORE:"flex-end",CENTER:_.vc,AFTER:"flex-start"};_.Co.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Hc,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var Do=class{constructor(a){this.l=a;this.j=a.getTextDisplayer();this.f=this.g=null;this.a=new _.po;this.h=!1;this.m=new _.Q("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=>cg(this,b)),this.a.on(this.f,xc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.ie&&(d.mode=
249
- _.ed)}}}))}o(a){const b=new _.xo(a.startTime,a.endTime,a.text,_.Pe);if(_.qf(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.He;break;case "rl":b.writingMode=_.Ie}_.rf(a.size)&&(b.size=a.size);if(_.qf(a.align))switch(a.align){case _.id:case _.le:b.textAlign=_.id;break;case _.vc:b.textAlign=_.so;break;case _.fe:case _.Zc:b.textAlign=_.fe}_.rf(a.position)&&(b.position=a.position);if(_.qf(a.positionAlign))switch(a.positionAlign){case _.nd:b.positionAlign=_.nd;break;case _.vc:b.positionAlign=
250
- _.vc;break;case _.od:b.positionAlign=_.od}_.rf(a.line)&&(b.line=a.line);if(_.qf(a.lineAlign))switch(a.lineAlign){case _.le:b.lineAlign=_.vo;break;case _.vc:b.lineAlign=_.vc;break;case _.Zc:b.lineAlign=_.Zc}typeof a.snapToLines===_.jc&&(b.lineInterpretation=a.snapToLines?_.uo:1);return b}};_.H=class extends Error{constructor(a,b,c,d,e){super(dg(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.qf(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.H)}a(a){this.severity!==a&&(this.severity=a,this.message=dg(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};
263
+ tp=class{constructor(a){this.a=new _.rp;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].Qb(a),b[c].Ag&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new sp(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new sp(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 up;_.vp=class{constructor(){this.a=new _.rp}release(){_.jg(this)}on(a,b,c,d=!1){a=new up(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||(ig(f),this.a.remove(b,f))}}};up=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 wp=class{constructor(a){this.m=a;this.o=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=null;this.f=new _.vp;this.a=this.l=null;this.g=[];this.h=new _.R("clpp.native.Metadata")}release(){this.f.release();this.g=[];this.a=null}destroy(){const a=this;return _.x(function*(){a.release();a.l=null;a.j=null})}getTimelineCues(){return this.g}};_.Dp=class{constructor(a,b,c,d){d=void 0===d?_.xp:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.yp;this.writingMode=_.zp;this.lineInterpretation=_.Ap;this.line=null;this.lineAlign=_.Bp;this.direction=Cp;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}bd(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
264
+ a.payloadType}};_.z("clpp.text.Cue",_.Dp);_.Dp.positionAlign={LEFT:_.yd,RIGHT:_.zd,CENTER:_.zc,AUTO:"auto"};_.xp=_.t;_.Dp.payloadType={TEXT:_.xp,VTT_XML:_.lf,TTML_XML:_.Ue};_.yp=_.zc;_.Ep={LEFT:_.vd,RIGHT:_.ze,CENTER:_.yp,START:_.vd,END:_.ze};_.Dp.textAlign=_.Ep;var Cp="ltr";_.Dp.direction={HORIZONTAL_LEFT_TO_RIGHT:Cp,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.zp="horizontal-tb";_.Dp.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.zp,VERTICAL_LEFT_TO_RIGHT:_.cf,VERTICAL_RIGHT_TO_LEFT:_.df};_.Ap=0;
265
+ _.Dp.lineInterpretation={LINE_NUMBER:_.Ap,PERCENTAGE:1};_.Bp=_.Fe;_.Fp={CENTER:_.zc,START:_.Bp,END:_.jd};_.Dp.lineAlign=_.Fp;_.Ip=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.Gp;this.scroll=Hp;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.Ip);_.Gp=1;_.Ip.units={PX:0,PERCENTAGE:_.Gp,LINES:2};var Hp="";
266
+ _.Ip.scrollMode={NONE:Hp,UP:"up"};_.Ip.displayAlign={BEFORE:"flex-end",CENTER:_.zc,AFTER:"flex-start"};_.Ip.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Nc,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var Jp=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.g=null;this.a=new _.vp;this.j=!1;this.h=new _.R("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.g=this.f=null;return Promise.resolve()}start(a){this.j?this.h.warn("Already started. Ignoring request..."):(this.j=!0,this.g=a,this.f=this.g.textTracks,this.a.on(this.f,_.Tb,b=>zg(this,b)),this.a.on(this.f,Bc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Ce&&(d.mode=
267
+ _.qd)}}}))}o(a){const b=new _.Dp(a.startTime,a.endTime,a.text,_.lf);if(_.Rf(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.cf;break;case "rl":b.writingMode=_.df}_.Sf(a.size)&&(b.size=a.size);if(_.Rf(a.align))switch(a.align){case _.vd:case _.Fe:b.textAlign=_.vd;break;case _.zc:b.textAlign=_.yp;break;case _.ze:case _.jd:b.textAlign=_.ze}_.Sf(a.position)&&(b.position=a.position);if(_.Rf(a.positionAlign))switch(a.positionAlign){case _.yd:b.positionAlign=_.yd;break;case _.zc:b.positionAlign=
268
+ _.zc;break;case _.zd:b.positionAlign=_.zd}_.Sf(a.line)&&(b.line=a.line);if(_.Rf(a.lineAlign))switch(a.lineAlign){case _.Fe:b.lineAlign=_.Bp;break;case _.zc:b.lineAlign=_.zc;break;case _.jd:b.lineAlign=_.jd}typeof a.snapToLines===_.nc&&(b.lineInterpretation=a.snapToLines?_.Ap:1);return b}};_.H=class extends Error{constructor(a,b,c,d,e){super(Ag(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.Rf(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=Ag(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};
251
269
  _.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
252
270
  _.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,
253
271
  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,
254
272
  MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,MP4_PARSER_ERROR:3019,MEDIA_LOAD_ERROR:3100,INVALID_TRACK_TYPE:3101,UNKNOWN_TRACK:3102,MEDIA_DECRYPTION_ERROR:3103,PLAY_NOT_ALLOWED:3200,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,
255
273
  DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,
256
274
  DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,SMOOTH_INVALID_MANIFEST_XML:4033,SMOOTH_EMPTY_PRESENTATION:4034,SMOOTH_MEDIA_PROCESSING_ERROR:4035,SMOOTH_INVALID_VERSION:4036,SMOOTH_INVALID_FRAGMENT_METADATA:4037,SMOOTH_REQUIRED_ATTRIBUTE_MISSING:4038,SMOOTH_TRUNCATED_MEDIA_FILE:4039,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4040,HLS_MSE_ENCRYPTED_TS_NOT_SUPPORTED:4041,HLS_PLAYLIST_NOT_UTF8:4042,HLS_PLAYLIST_EMPTY:4043,HLS_INVALID_VALUE:4044,
257
- HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEATURE:4046,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,
258
- 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,
259
- 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,
260
- 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};var gg=class extends Error{constructor(a,b){super(a);this.code=b}};var ng=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;af=_.ig.prototype;af.Ua="";af.ec="";af.Fa="";af.yc=null;af.ya="";af.Vb="";af.toString=function(){var a=[],b=this.Ua;b&&a.push(qg(b,Eo,!0),":");if(b=this.Fa){a.push("//");var c=this.ec;c&&a.push(qg(c,Eo,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.yc;null!=b&&a.push(":",String(b))}if(b=this.ya)this.Fa&&"/"!=b.charAt(0)&&a.push("/"),a.push(qg(b,"/"==b.charAt(0)?Fo:Go,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Vb)&&a.push("#",qg(b,Ho));return a.join("")};
261
- af.resolve=function(a){var b=new _.ig(this);"data"===b.Ua&&(b=new _.ig);var c=!!a.Ua;c?jg(b,a.Ua):c=!!a.ec;c?b.ec=a.ec:c=!!a.Fa;c?b.Fa=a.Fa:c=null!=a.yc;var d=a.ya;if(c)kg(b,a.yc);else if(c=!!a.ya){if("/"!=d.charAt(0))if(this.Fa&&!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(""):
262
- ".."==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?_.lg(b,mg(a.a)):c=!!a.Vb;c&&(b.Vb=a.Vb);return b};var Eo=/[#\/\?@]/g,Go=/[#\?:]/g,Fo=/[#\?]/g,rg=/[#\?@]/g,Ho=/#/g;pg.prototype.a=null;pg.prototype.g=null;pg.prototype.add=function(a,b){_.tg(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};
263
- pg.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")};_.Io=1/15;var Jo;Jo={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Sh=(a,b)=>{const c=Jo[a];for(let d=0;d<c.length;d++)for(let e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return a===_.u?"":null};_.Ko={text:{mp4:Vb,m4s:Vb,m4i:Vb,cmft:Vb,vtt:_.ve,ttml:_.Yb},video:{mp4:_.Ke,m4s:_.Ke,m4i:_.Ke,m4v:_.Ke,cmfv:_.Ke,ts:_.Je},audio:{mp4:_.dc,m4s:_.dc,m4i:_.dc,m4a:_.dc,cmfa:_.dc,ts:_.Je,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"}};_.Vh=(a,b,c)=>a.map(d=>{d=_.Lo(d)||"";return d=(d=_.Ko[b][d])?d:b===_.u?c&&"vtt"!==c?Vb:_.ve:null}).filter(Boolean)[0]||null;
264
- _.Lo=a=>{a=(new _.ig(a)).ya.split(".");return 1>=a.length?null:a.pop()};_.hh=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}};_.gh=class{constructor(a,b){this.name=a;this.value=b}};var ug=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",
265
- "cs"],["dan","da"],["deu","de"],[_.Rc,"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",
275
+ HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEATURE:4046,HLS_INCOMPATIBLE_PLAYLIST_UPDATE:4047,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,
276
+ EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,NO_CONTENT_ID:6101,SERVER_CERTIFICATE_REQUIRED:6102,EXTRACT_CONTENT_ID_MODIFIER_ERROR:6103,FAILED_TO_PERSIST_SESSION:6200,FAILED_TO_REMOVE_SESSION:6201,INVALID_SESSION_STORAGE_IMPLEMENTATION:6202,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CANNOT_LOAD_SOURCE:7003,MEDIA_ELEMENT_NOT_FOUND:7004,INVALID_MEDIA_ELEMENT:7005,INVALID_CONTAINER_ELEMENT:7006,INVALID_CONFIGURATION:7100,
277
+ INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,KEY_LOAD_ERROR:7104,TIZEN_INTERNAL_ERROR:7200,CAF_INTERNAL_ERROR:7300,INTERNAL_CAST_ERROR:8E3,CAST_API_NOT_READY:8001,NO_RECEIVERS_AVAILABLE:8002,ALREADY_CASTING:8003,NO_CAST_SESSION:8004,CONVIVA_SDK_NOT_LOADED:9E3,CONVIVA_INVALID_CONFIGURATION:9001,CONVIVA_RUNTIME_ERROR:9002,GL_CONTEXT_ERROR:9003,GL_SHADER_ERROR:9004,YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,YOUBORA_SDK_VERSION_NOT_SUPPORTED:9102,VIMOND_INVALID_CONFIGURATION:9200,
278
+ VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3};var Dg=class extends Error{constructor(a,b){super(a);this.code=b}};var Lg=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;xf=_.Gg.prototype;xf.Va="";xf.fc="";xf.Ga="";xf.wc=null;xf.xa="";xf.Wb="";xf.toString=function(){var a=[],b=this.Va;b&&a.push(Og(b,Kp,!0),":");if(b=this.Ga){a.push("//");var c=this.fc;c&&a.push(Og(c,Kp,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.wc;null!=b&&a.push(":",String(b))}if(b=this.xa)this.Ga&&"/"!=b.charAt(0)&&a.push("/"),a.push(Og(b,"/"==b.charAt(0)?Lp:Mp,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Wb)&&a.push("#",Og(b,Np));return a.join("")};
279
+ xf.resolve=function(a){var b=new _.Gg(this);"data"===b.Va&&(b=new _.Gg);var c=!!a.Va;c?Hg(b,a.Va):c=!!a.fc;c?b.fc=a.fc:c=!!a.Ga;c?b.Ga=a.Ga:c=null!=a.wc;var d=a.xa;if(c)Ig(b,a.wc);else if(c=!!a.xa){if("/"!=d.charAt(0))if(this.Ga&&!this.xa)d="/"+d;else{var e=b.xa.lastIndexOf("/");-1!=e&&(d=b.xa.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(""):
280
+ ".."==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.xa=d:c=""!==a.a.toString();c?_.Jg(b,Kg(a.a)):c=!!a.Wb;c&&(b.Wb=a.Wb);return b};var Kp=/[#\/\?@]/g,Mp=/[#\?:]/g,Lp=/[#\?]/g,Pg=/[#\?@]/g,Np=/#/g;_.Ng.prototype.a=null;_.Ng.prototype.g=null;
281
+ _.Ng.prototype.add=function(a,b){if(!this.a&&(this.a={},this.g=0,this.f))for(var c=this.f.split("\x26"),d=0;d<c.length;d++){var e=c[d].indexOf("\x3d"),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.f=null;(c=this.a.hasOwnProperty(a)&&this.a[a])||(this.a[a]=c=[]);c.push(b);null!==this.g&&this.g++;return this};
282
+ _.Ng.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")};_.Op=1/15;var Pp;Pp={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.oi=(a,b)=>{const c=Pp[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===_.t?"":null};_.Qp={text:{mp4:ac,m4s:ac,m4i:ac,cmft:ac,vtt:_.Qe,ttml:_.dc},video:{mp4:_.ff,m4s:_.ff,m4i:_.ff,m4v:_.ff,cmfv:_.ff,ts:_.ef},audio:{mp4:_.jc,m4s:_.jc,m4i:_.jc,m4a:_.jc,cmfa:_.jc,ts:_.ef,aac:_.gc,ec3:_.ic,ac3:_.hc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.ri=(a,b,c)=>a.map(d=>{d=_.Rp(d)||"";return d=(d=_.Qp[b][d])?d:b===_.t?c&&"vtt"!==c?ac:_.Qe:null}).filter(Boolean)[0]||null;
283
+ _.Rp=a=>{a=(new _.Gg(a)).xa.split(".");return 1>=a.length?null:a.pop()};_.Eh=class{constructor(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}toString(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}let b="#"+this.name;const c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b}getAttribute(a){const b=this.attributes.filter(c=>c.name==a);return b.length?b[0]:null}};_.Dh=class{constructor(a,b){this.name=a;this.value=b}};var Rg=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
284
+ "cs"],["dan","da"],["deu","de"],[_.Yc,"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",
266
285
  "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",
267
286
  "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",
268
287
  "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",
269
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var Mo=class{};_.z("clpp.utils.BufferUtils",Mo);Mo.toArrayBuffer=Gg;Mo.toDataView=_.Fg;Mo.toInt32Array=_.Eg;Mo.toUint32Array=Dg;Mo.toUint16Array=Cg;Mo.toUint8Array=_.K;Mo.equal=Ag;var Jg=new _.Q("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.Ig);_.z("clpp.utils.strings.fromBytesAutoDetect",_.Lg);_.z("clpp.utils.strings.toUtf8",_.Mg);_.z("clpp.utils.strings.toUtf16",_.Ng);_.z("clpp.utils.strings.toByteArray",_.Og);_.z("clpp.utils.strings.startsWith",_.Pg);_.z("clpp.utils.strings.endsWith",_.Qg);_.z("clpp.utils.strings.bitrateToString",_.Tg);
288
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var Sp=class{};_.z("clpp.utils.BufferUtils",Sp);Sp.toArrayBuffer=eh;Sp.toDataView=_.bh;Sp.toInt32Array=_.ah;Sp.toUint32Array=$g;Sp.toUint16Array=Zg;Sp.toUint8Array=_.J;Sp.equal=Xg;var hh=new _.R("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.gh);_.z("clpp.utils.strings.fromBytesAutoDetect",_.jh);_.z("clpp.utils.strings.toUtf8",_.kh);_.z("clpp.utils.strings.toUtf16",_.lh);_.z("clpp.utils.strings.toByteArray",_.mh);_.z("clpp.utils.strings.startsWith",_.nh);_.z("clpp.utils.strings.endsWith",_.oh);_.z("clpp.utils.strings.bitrateToString",_.rh);
270
289
  _.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)))});
271
- _.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 Ug=document.createElement("span");var No=class{};_.z("clpp.utils.Uint8ArrayUtils",No);No.toStandardBase64=_.Yg;No.concat=_.dh;No.equal=_.ch;No.toHex=_.bh;No.fromHex=_.ah;No.fromBase64=_.$g;No.toBase64Url=_.Zg;_.fh=class{constructor(a){this.f=a;this.a=0}};var jh=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",jh);_.z("clpp.net.makeRequest",_.nh);_.mh=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.mh});_.Sk=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(){}};_.Zl=class{constructor(a,b){this.P=a;this.w=b;this.a=!1}abort(){this.a=!0;return this.w()}Xc(a,b){const c=new _.Sk;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=sh(a,e,c):c.resolve(e)},e=>{b?d=sh(b,e,c):c.reject(e)});return new _.Zl(c,()=>d())}};_.Zl.aborted=function(){const a=Promise.reject(new _.H(_.G,7,7001));a.catch(()=>{});return new _.Zl(a,()=>Promise.resolve())};_.Zl.prototype.chain=_.Zl.prototype.Xc;_.Oo=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)}};_.Km=class{constructor(){this.f=[];this.g=[];this.m=!1;this.j=new _.Oo;this.a={};this.h=0;this.a.data=bo;!window.fetch||!window.AbortController||_.gi(6)||_.ji()&&68<_.Gi().browserVersion.major?(this.a.http=Kn,this.a.https=Kn):(this.a.http=Xn,this.a.https=Xn)}og(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()}pe(a){this.f.push(a)}Uc(a){this.g.push(a)}Ye(a){this.f=this.f.filter(b=>
272
- b!==a)}md(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.m)return new Po(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 _.Sk;try{for(const f of a.requestModifiers)d=d.then(g=>
273
- {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 _.ig(f.uris[f.uriIndex]);var h=g.Ua;h||(h=location.protocol,h=h.slice(0,-1),jg(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 Po(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.G,1,7001,
274
- 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);});_.uh(this.j,e);c.resolve(a);return e}catch(f){return new Po(Promise.reject(f))}}};_.z("clpp.net.NetworkEngine",_.Km);_.Km.prototype.fetch=_.Km.prototype.fetch;
275
- _.Km.prototype.removeResponseModifier=_.Km.prototype.md;_.Km.prototype.removeRequestModifier=_.Km.prototype.Ye;_.Km.prototype.addResponseModifier=_.Km.prototype.Uc;_.Km.prototype.addRequestModifier=_.Km.prototype.pe;_.Km.prototype.setRateLimit=_.Km.prototype.og;var zh;_.Ch=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.channelsCount=this.src=this.mimeType=this.frameRate=this.label=this.originalLanguage=this.language=this.kind=null;this.renditions=[];this.accessibility=[]}bd(a){return this.type===a.type&&this.channelsCount===a.channelsCount&&this.frameRate===a.frameRate&&this.kind===a.kind&&this.label===a.label&&this.language===a.language&&this.mimeType===a.mimeType&&ag(this.roles,a.roles)&&ag(this.accessibility,a.accessibility,xh)}toString(){return`Track type: ${this.type} id: ${this.id}
276
- renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.Ch);_.Ch.prototype.toString=_.Ch.prototype.toString;_.Kh=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.drm=this.drmInfo=this.codec=this.Bc=this.bandwidth=this.height=this.width=null}};_.z("clpp.Rendition",_.Kh);_.Bh=1;_.N=_.w;_.M=_.p;_.L=_.u;zh=_.vd;_.Qo={VIDEO:_.N,AUDIO:_.M,TEXT:_.L,METADATA:zh};_.Ch.Type=_.Qo;_.Oj=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;
277
- _.Pg(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.g=b.hash}};_.z("clpp.utils.url.queryString",_.Fh);var Ro=class{constructor(a){this.g=a;this.a=new _.Q("clpp.native.hls.HlsMetadataParser");this.f=eg(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 Ih(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 Mh(c,d,
278
- 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 Oh(d);e.vc=f}catch(f){c.a.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.Wh=[];_.R=class{td(){return!0}Hf(a){return this.getVideoTracks().find(b=>_.sf(b,a,a&&Object.keys(a)))}Df(a){return this.getAudioTracks().find(b=>_.sf(b,a,a&&Object.keys(a)))}Ff(a){return this.ja().find(b=>_.sf(b,a,a&&Object.keys(a)))}Gf(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.sf(b,a,a&&Object.keys(a)))}Cf(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.sf(b,a,a&&Object.keys(a)))}Ef(a){return this.ja().flatMap(b=>b.renditions).find(b=>_.sf(b,a,a&&Object.keys(a)))}};
279
- _.z("clpp.TrackManager",_.R);_.R.prototype.isAbrEnabled=_.R.prototype.la;_.R.prototype.addTextTrack=_.R.prototype.addTextTrack;_.R.prototype.findTextRendition=_.R.prototype.Ef;_.R.prototype.findAudioRendition=_.R.prototype.Cf;_.R.prototype.findVideoRendition=_.R.prototype.Gf;_.R.prototype.findTextTrack=_.R.prototype.Ff;_.R.prototype.findAudioTrack=_.R.prototype.Df;_.R.prototype.findVideoTrack=_.R.prototype.Hf;_.R.prototype.setTextRendition=_.R.prototype.lb;_.R.prototype.setAudioRendition=_.R.prototype.kb;
280
- _.R.prototype.setVideoRendition=_.R.prototype.Va;_.R.prototype.setTextTrack=_.R.prototype.Da;_.R.prototype.setAudioTrack=_.R.prototype.ta;_.R.prototype.setVideoTrack=_.R.prototype.Wa;_.R.prototype.getTextTrack=_.R.prototype.oa;_.R.prototype.getAudioTrack=_.R.prototype.na;_.R.prototype.getVideoTrack=_.R.prototype.Ja;_.R.prototype.getLoadingTextRendition=_.R.prototype.fb;_.R.prototype.getLoadingAudioRendition=_.R.prototype.eb;_.R.prototype.getLoadingVideoRendition=_.R.prototype.Ra;
281
- _.R.prototype.getTextRendition=_.R.prototype.Ha;_.R.prototype.getAudioRendition=_.R.prototype.Ga;_.R.prototype.getVideoRendition=_.R.prototype.ia;_.R.prototype.getTextTracks=_.R.prototype.ja;_.R.prototype.getAudioTracks=_.R.prototype.getAudioTracks;_.R.prototype.getVideoTracks=_.R.prototype.getVideoTracks;_.R.prototype.canSelectVideoTracks=_.R.prototype.td;_.So=new Map;_.To=(new Map).set(_.Gc,_.Gc).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Xe,_.Xe).set(_.dd,_.dd).set("channelsCount","channels");_.Uo=class{constructor(a){this.f=a;this.a=null}da(a){return $h(this,a,!1)}Xa(a){return $h(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.ci=class{constructor(a){this.f=a;this.a=null}he(){this.stop();this.f();return this}da(a){this.stop();this.a=(new _.Uo(()=>{this.f()})).da(a);return this}Xa(a){this.stop();this.a=(new _.Uo(()=>{this.f()})).Xa(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.ci);_.ci.prototype.stop=_.ci.prototype.stop;_.ci.prototype.tickEvery=_.ci.prototype.Xa;_.ci.prototype.tickAfter=_.ci.prototype.da;_.ci.prototype.tickNow=_.ci.prototype.he;var Vo=class{};_.z(Fc,Vo);Vo.getInfo=_.Gi;
282
- var bi=null,ai=null,vi=new _.Q(Fc),zi="android",yi="ios",Ei="linux",Ai="osx",Bi="windows",Ci="tizen",Di="webos",xi=Be,Fi=Be,oi={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,
290
+ _.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 sh=document.createElement("span");var Tp=class{};_.z("clpp.utils.Uint8ArrayUtils",Tp);Tp.toStandardBase64=_.uh;Tp.concat=_.Ah;Tp.equal=_.zh;Tp.toHex=_.yh;Tp.fromHex=_.xh;Tp.fromBase64=_.wh;Tp.toBase64Url=_.vh;_.Ch=class{constructor(a){this.f=a;this.a=0}};var Gh=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",Gh);_.z("clpp.net.makeRequest",_.Kh);_.Jh=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.Jh});_.Jl=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(){}};_.Pm=class{constructor(a,b){this.P=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}Xc(a,b){const c=new _.Jl;let d=()=>{c.reject(new _.H(_.G,7,7001));return this.abort()};this.P.then(e=>{this.a?c.reject(new _.H(_.G,7,7001)):a?d=Ph(a,e,c):c.resolve(e)},e=>{b?d=Ph(b,e,c):c.reject(e)});return new _.Pm(c,()=>d())}};_.Pm.aborted=function(){const a=Promise.reject(new _.H(_.G,7,7001));a.catch(()=>{});return new _.Pm(a,()=>Promise.resolve())};_.Pm.prototype.chain=_.Pm.prototype.Xc;_.Up=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)}};_.Bn=class{constructor(){this.f=[];this.g=[];this.o=!1;this.l=new _.Up;this.a={};this.j=0;this.a.data=ip;!window.fetch||!window.AbortController||_.Fi(6)||_.Ii()&&68<_.cj().browserVersion.major?(this.a.http=Qo,this.a.https=Qo):(this.a.http=dp,this.a.https=dp)}Hg(a){0<a?_.C("Rate limit set to "+a+"bps"):_.C("Rate limit disabled");this.j=a}release(){return this.l.destroy()}destroy(){this.o=!0;this.f=[];this.g=[];return this.l.destroy()}te(a){this.f.push(a)}zc(a){this.g.push(a)}bf(a){this.f=this.f.filter(b=>
291
+ b!==a)}qd(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.o)return new Vp(Promise.reject(new _.H(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.j&&0<this.j&&(a.rateLimitBps=this.j);var b=[];for(const f of this.f)b.push(f);if(a.requestModifiers)for(const f of a.requestModifiers)b.push(f);a.requestModifiers=b;b=[];for(var c of this.g)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.Jl;try{for(const f of a.requestModifiers)d=d.then(g=>
292
+ {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 _.Gg(f.uris[f.uriIndex]);var h=g.Va;h||(h=location.protocol,h=h.slice(0,-1),Hg(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 Vp(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.G,1,7001,
293
+ g?{url:g.request.uris[g.request.uriIndex],request:g.request}:null);};h();const k=f(g)||g;h();return k}).catch(g=>{if(g instanceof _.H&&g.data&&g.data.response){const h=f(g.data.response);if(h)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.G,1,1007,null,g);});_.Rh(this.l,e);c.resolve(a);return e}catch(f){return new Vp(Promise.reject(f))}}};_.z("clpp.net.NetworkEngine",_.Bn);_.Bn.prototype.fetch=_.Bn.prototype.fetch;
294
+ _.Bn.prototype.removeResponseModifier=_.Bn.prototype.qd;_.Bn.prototype.removeRequestModifier=_.Bn.prototype.bf;_.Bn.prototype.addResponseModifier=_.Bn.prototype.zc;_.Bn.prototype.addRequestModifier=_.Bn.prototype.te;_.Bn.prototype.setRateLimit=_.Bn.prototype.Hg;var Wh;_.Zh=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.channelsCount=this.src=this.mimeType=this.frameRate=this.label=this.originalLanguage=this.language=this.kind=null;this.renditions=[];this.accessibility=[]}bd(a){return this.type===a.type&&this.channelsCount===a.channelsCount&&this.frameRate===a.frameRate&&this.kind===a.kind&&this.label===a.label&&this.language===a.language&&this.mimeType===a.mimeType&&xg(this.roles,a.roles)&&xg(this.accessibility,a.accessibility,Uh)}toString(){return`Track type: ${this.type} id: ${this.id}
295
+ renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.Zh);_.Zh.prototype.toString=_.Zh.prototype.toString;_.gi=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",_.gi);_.Yh=1;_.M=_.w;_.L=_.p;_.K=_.t;Wh=_.Gd;_.Wp={VIDEO:_.M,AUDIO:_.L,TEXT:_.K,METADATA:Wh};_.Zh.Type=_.Wp;_.rk=class{constructor(a){this.j=a;this.scheme=null;const b=document.createElement("a"),c=a.match(/^(.*:)(\/\/(.*))$/);let d=!1;if(c){if(this.scheme=c[1],b.href=c[2],":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+c[3],d=!0}else{b.href=a;if(":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+a.match(/\/?\/?(.*)/)[1],d=!0;this.scheme=b.protocol}""===this.scheme&&(this.scheme=window.location.protocol);this.a=d?"":b.hostname;this.port=b.port;this.path=b.pathname;
296
+ _.nh(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.g=b.hash}};_.z("clpp.utils.url.queryString",_.bi);var Xp=class{constructor(a){this.f=a;this.h=new _.R("clpp.native.hls.HlsMetadataParser");this.a=Bg(this.g.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}g(a,b){const c=this;return _.x(function*(){let d=null;try{d=yield ei(c,a)}catch(f){return c.h.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield ii(c,d,
297
+ a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.h.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield ki(d);e.tc=f}catch(f){c.h.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.si=[];_.S=class{yd(){return!0}Sf(a){return this.getVideoTracks().find(b=>_.Tf(b,a,a&&Object.keys(a)))}Of(a){return this.getAudioTracks().find(b=>_.Tf(b,a,a&&Object.keys(a)))}Qf(a){return this.ja().find(b=>_.Tf(b,a,a&&Object.keys(a)))}Rf(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.Tf(b,a,a&&Object.keys(a)))}Nf(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.Tf(b,a,a&&Object.keys(a)))}Pf(a){return this.ja().flatMap(b=>b.renditions).find(b=>_.Tf(b,a,a&&Object.keys(a)))}};
298
+ _.z("clpp.TrackManager",_.S);_.S.prototype.isAbrEnabled=_.S.prototype.la;_.S.prototype.addTextTrack=_.S.prototype.addTextTrack;_.S.prototype.findTextRendition=_.S.prototype.Pf;_.S.prototype.findAudioRendition=_.S.prototype.Nf;_.S.prototype.findVideoRendition=_.S.prototype.Rf;_.S.prototype.findTextTrack=_.S.prototype.Qf;_.S.prototype.findAudioTrack=_.S.prototype.Of;_.S.prototype.findVideoTrack=_.S.prototype.Sf;_.S.prototype.setTextRendition=_.S.prototype.lb;_.S.prototype.setAudioRendition=_.S.prototype.kb;
299
+ _.S.prototype.setVideoRendition=_.S.prototype.Wa;_.S.prototype.setTextTrack=_.S.prototype.Ea;_.S.prototype.setAudioTrack=_.S.prototype.sa;_.S.prototype.setVideoTrack=_.S.prototype.Xa;_.S.prototype.getTextTrack=_.S.prototype.pa;_.S.prototype.getAudioTrack=_.S.prototype.oa;_.S.prototype.getVideoTrack=_.S.prototype.Ka;_.S.prototype.getLoadingTextRendition=_.S.prototype.fb;_.S.prototype.getLoadingAudioRendition=_.S.prototype.eb;_.S.prototype.getLoadingVideoRendition=_.S.prototype.Sa;
300
+ _.S.prototype.getTextRendition=_.S.prototype.Ia;_.S.prototype.getAudioRendition=_.S.prototype.Ha;_.S.prototype.getVideoRendition=_.S.prototype.ia;_.S.prototype.getTextTracks=_.S.prototype.ja;_.S.prototype.getAudioTracks=_.S.prototype.getAudioTracks;_.S.prototype.getVideoTracks=_.S.prototype.getVideoTracks;_.S.prototype.canSelectVideoTracks=_.S.prototype.yd;_.Yp=new Map;_.Zp=(new Map).set(_.Mc,_.Mc).set("frameRate","framerate").set("bandwidth","bitrate").set(_.tf,_.tf).set(_.pd,_.pd).set("channelsCount","channels");_.$p=class{constructor(a){this.f=a;this.a=null}ca(a){return wi(this,a,!1)}Ya(a){return wi(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.zi=class{constructor(a){this.f=a;this.a=null}ne(){this.stop();this.f();return this}ca(a){this.stop();this.a=(new _.$p(()=>{this.f()})).ca(a);return this}Ya(a){this.stop();this.a=(new _.$p(()=>{this.f()})).Ya(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.zi);_.zi.prototype.stop=_.zi.prototype.stop;_.zi.prototype.tickEvery=_.zi.prototype.Ya;_.zi.prototype.tickAfter=_.zi.prototype.ca;_.zi.prototype.tickNow=_.zi.prototype.ne;var aq=class{};_.z(Lc,aq);aq.getInfo=_.cj;
301
+ var yi=null,xi=null,Si=new _.R(Lc),Wi="android",Vi="ios",aj="linux",Xi="osx",Yi="windows",Zi="tizen",$i="webos",Ui=We,bj=We,Ni={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,
283
302
  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,
284
303
  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},
285
- webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var S=class extends _.R{constructor(){super();this.a=new _.Q("clpp.native.TrackManager");this.l=null;this.g=new _.po;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,_.L);this.T=this.F.bind(this,_.L);this.R=this.C.bind(this,_.L);this.V=this.B.bind(this,_.N);this.Y=this.F.bind(this,_.N);this.W=this.C.bind(this,_.N);this.J=this.B.bind(this,_.M);this.M=this.F.bind(this,_.M);this.K=this.C.bind(this,_.M);this.j=null}td(){return!_.qi()}B(a,
286
- b){const c=this;return _.y(function*(){if(b){var d=b.track;if(d){var e=a===_.N,f=a===_.L,g=a===_.M||e,h=b.target,k=c.h.find(n=>Hi(n,d,a));if(k)c.a.warn("Track from event already exists",d,k);else{var l=Dh(a,d),m=Ii(d);if(f){if(d.kind===_.vd)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(q=>Hi(l,q,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.Tb);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.h.find(n=>n.type===a&&_.sf(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.a.debug(`Setting native ${a} track active`),
287
- c.f.set(a,k));c.a.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.Kh(l.id,l));c.h.push(l);const n=c.l.getConfiguration().safari;Ki(c,a,n)?yield Li(c,l,n):Mi(c,a,n)&&(yield Ni(c,l,n));c.a.debug(a+" Track added",l);c.l.trigger(new _.F(_.Wo));const q=Oi(c,a).length,t=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.a.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${q}`,d);c.f.set(a,l)};m?f():1===q&&
288
- g&&(e?f():t&&1!==v||f())}catch(n){c.a.error("Error while converting track data",n)}}}else c.a.warn(Qa)}else c.a.warn(Pa)})}F(a,b){if(b){var c=b.track;c?a===_.L&&c.kind!==_.vd&&(b=this.h.find(d=>Hi(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.f.get(a)||null)===b&&(this.f.set(a,null),Pi(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===_.L&&Pi(this);const c=Ri(this,a);if(c)for(let d=0;d<c.length;++d)if(Ii(c[d])){if(b=
289
- this.h.find(e=>Hi(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===_.M?this.l.trigger(new _.F(_.Ui)):a===_.L&&this.l.trigger(new _.F(_.Vi));break}}initialize(a){this.l=a;this.j=new Ro(a.getNetworkEngine())}load(){this.A=!1;var a=Qi(this,_.L);a&&(this.g.on(a,_.Mb,this.N),this.g.on(a,ce,this.T),this.g.on(a,xc,this.R));if(a=Qi(this,_.M))this.g.on(a,_.Mb,this.J),this.g.on(a,ce,this.M),this.g.on(a,xc,this.K);if(a=Qi(this,_.N))this.g.on(a,
290
- _.Mb,this.V),this.g.on(a,ce,this.Y),this.g.on(a,xc,this.W);this.g.one(this.l,qc,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 Oi(this,_.N)}getAudioTracks(){return Oi(this,_.M)}ja(){return Oi(this,_.L)}ia(){const a=this.f.get(_.N)||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]||
291
- null}Ga(){return Si(this,_.M)}Ha(){return Si(this,_.L)}Ra(){return Ti(this,_.N)}eb(){return Ti(this,_.M)}fb(){return Ti(this,_.L)}Ja(){return this.f.get(_.N)||null}na(){return this.f.get(_.M)||null}oa(){return this.f.get(_.L)||null}Wa(a){Wi(this,_.N,a)}ta(a){Wi(this,_.M,a)}Da(a){Wi(this,_.L,a)}Va(a){Wi(this,_.N,a&&a.track)}kb(a){Wi(this,_.M,a&&a.track)}lb(a){Wi(this,_.L,a&&a.track)}addTextTrack(a){const b=this;return _.y(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
292
- b.o[c]=a;Xi(b,a,c)}else yield Yi(b,a)})}la(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.y(function*(){const b=a.l.getConfiguration();$i(a,_.M,b.preferredAudioLanguage);if(!Ri(a,_.L).some(c=>Ii(c))){const c=Qi(a,_.L);yield new Promise(d=>{a.g.one(c,xc,d);(new _.ci(d)).da(1)})}a.A||$i(a,_.L,b.preferredTextLanguage)})}};S.prototype.isAbrEnabled=S.prototype.la;S.prototype.addTextTrack=S.prototype.addTextTrack;S.prototype.setTextRendition=S.prototype.lb;
293
- S.prototype.setAudioRendition=S.prototype.kb;S.prototype.setVideoRendition=S.prototype.Va;S.prototype.setTextTrack=S.prototype.Da;S.prototype.setAudioTrack=S.prototype.ta;S.prototype.setVideoTrack=S.prototype.Wa;S.prototype.getTextTrack=S.prototype.oa;S.prototype.getAudioTrack=S.prototype.na;S.prototype.getVideoTrack=S.prototype.Ja;S.prototype.getLoadingTextRendition=S.prototype.fb;S.prototype.getLoadingAudioRendition=S.prototype.eb;S.prototype.getLoadingVideoRendition=S.prototype.Ra;
294
- S.prototype.getTextRendition=S.prototype.Ha;S.prototype.getAudioRendition=S.prototype.Ga;S.prototype.getVideoRendition=S.prototype.ia;S.prototype.getTextTracks=S.prototype.ja;S.prototype.getAudioTracks=S.prototype.getAudioTracks;S.prototype.getVideoTracks=S.prototype.getVideoTracks;S.prototype.canSelectVideoTracks=S.prototype.td;_.Xo=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);}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-
295
- 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=
296
- "";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",_.Xo);_.Xo.prototype.bufferedAheadOf=_.Xo.prototype.Ea;_.Xo.prototype.isBuffered=_.Xo.prototype.Zb;_.Xo.prototype.bufferEnd=_.Xo.prototype.Aa;_.Xo.prototype.bufferStart=_.Xo.prototype.ob;_.Xo.prototype.end=_.Xo.prototype.end;_.Xo.prototype.start=_.Xo.prototype.start;_.Yo=class{constructor(){this.Gc=new no(this);this.Ec=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Gc.on(a,b,c)}one(a,b,c){return this.Gc.one(a,b,c)}off(a,b){return this.Gc.off(a,b)}addDelegate(a){a&&(0<=this.Ec.indexOf(a)||this.Ec.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}removeDelegate(a){a&&(a=this.Ec.indexOf(a),0<=a&&this.Ec.splice(a,1))}trigger(a){this.Gc.trigger(a);for(const b of this.Ec)b.dispatchEvent(a)}};
297
- _.Yo.prototype.off=_.Yo.prototype.off;_.Yo.prototype.one=_.Yo.prototype.one;_.Yo.prototype.on=_.Yo.prototype.on;_.Yo.prototype.removeEventListener=_.Yo.prototype.removeEventListener;_.Yo.prototype.addEventListener=_.Yo.prototype.addEventListener;_.z("clpp.events.ERROR",_.ad);_.z("clpp.events.LOADEDMETADATA",_.qd);_.z("clpp.events.BUFFERING_ENDED",_.kc);_.z("clpp.events.BUFFERING_STARTED",_.oc);_.z("clpp.events.STATE_CHANGED",_.me);_.Ui="audiotrackchanged";_.z("clpp.events.AUDIO_TRACK_CHANGED",_.Ui);_.Vi="texttrackchanged";_.z("clpp.events.TEXT_TRACK_CHANGED",_.Vi);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.Me);_.z("clpp.events.BITRATE_CHANGED",_.gc);_.Wo="tracksadded";_.z("clpp.events.TRACKS_ADDED",_.Wo);_.z("clpp.events.LOAD_START",rd);
298
- _.z("clpp.events.RELEASING",_.be);_.z("clpp.events.RELEASED",ae);_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.Le);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.ec);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_UPDATE",_.Vc);_.z("clpp.events.DRM_SESSION_PERSISTED",_.Uc);_.z("clpp.events.DRM_RENEWAL_STARTED",Tc);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Sc);
299
- _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.fc);_.z("clpp.events.PLAY",_.Ud);_.z("clpp.events.SEEKING",_.he);_.z("clpp.events.SEEKED",_.ge);_.z("clpp.events.USER_SEEKING",_.Fe);_.z("clpp.events.USER_SEEKED",_.Ee);_.Hl={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.Hl);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.Nb);_.z("clpp.events.AD_LOADED",_.Db);_.z("clpp.events.AD_BREAK_STARTED",_.wb);_.z("clpp.events.AD_STARTED",_.Jb);_.z("clpp.events.AD_BUFFERING",_.yb);_.z("clpp.events.AD_PROGRESS",_.Gb);
300
- _.z("clpp.events.AD_FIRST_QUARTILE",_.Bb);_.z("clpp.events.AD_MIDPOINT",_.Eb);_.z("clpp.events.AD_THIRD_QUARTILE",_.Lb);_.z("clpp.events.AD_PAUSED",_.Fb);_.z("clpp.events.AD_RESUMED",_.Hb);_.z("clpp.events.AD_SKIPPED",_.Ib);_.z("clpp.events.AD_CLICKED",_.zb);_.z("clpp.events.AD_IMPRESSION",_.Cb);_.z("clpp.events.AD_COMPLETED",_.Ab);_.z("clpp.events.AD_STOPPED",_.Kb);_.z("clpp.events.AD_BREAK_STOPPED",_.xb);_.z("clpp.events.CASTING_STARTED",_.rc);_.z("clpp.events.CASTING_ENDED","castingended");
301
- _.z("clpp.events.CAST_STATUS_CHANGED",_.sc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.Sb);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.Rb);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.Pb);_.Sf="timeline-cue-added";_.z("clpp.events.TIMELINE_CUE_ADDED",_.Sf);_.Uf="timeline-cue-enter";_.z("clpp.events.TIMELINE_CUE_ENTER",_.Uf);_.Vf="timeline-cue-exit";_.z("clpp.events.TIMELINE_CUE_EXIT",_.Vf);_.z("clpp.events.MPD_TYPE_CHANGED",_.Ad);_.z("clpp.events.VIMOND_RESPONSE",_.Ne);
302
- _.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.Wd);_.z("clpp.events.PLAYLIST_MODIFIED",_.Xd);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.tc);_.z("clpp.events.ONLINE_STATUS_CHANGED",Jd);var aj=["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 Zo=class{};_.z("clpp.utils.PlayerConfiguration",Zo);Zo.create=_.gj;var $o=["abort",pc,qc,Xc,"emptied",Yc,_.$c,_.ad,"interruptbegin","interruptend",_.pd,_.qd,rd,"mozaudioavailable",_.Nd,_.Ud,_.Vd,_.Yd,_.$d,_.ge,_.he,ke,"suspend",_.xe,"volumechange",_.Qe,_.Re,_.ee,We,Ve,Te,Ue];_.ap=class extends _.Yo{constructor(a){super();this.log=new _.Q(a);this.configuration=this.kc=_.ej();this.o=this.B=null;this.gd=this.Gd=!1;this.jf=new _.Q("clpp.video.events");this.Qb=null;this.oc=-1;this.pf=this.mf.bind(this);this.Me=new _.Km;this.J=new _.po;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 $o)this.J.on(a,c,this.pf,c!==_.ad);
303
- this.Qb||(this.Qb=this.Te());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 _.Jf[this.namespace()].canPlay(a,b)}play(){if(!this.o)return Promise.reject("No sources specified yet. You need to load content before calling play.");const a=this.B.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c=
304
- {name:b.name||"",message:b.message||"",stack:b.stack||""};bj(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!==_.Fl&&c!==_.Cl&&c!==_.Nl&&c!==_.Ml)b();else if(this.B.getMedia().pause(),this.getState()===_.Nl)this.J.one(this,_.me,()=>{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=
305
- a}setCdnErrorCallback(a){this.ga=a}sc(){return this.mc}getSurface(){return this.B}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.Xo(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!"),
306
- 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(_.Fe));this.J.on(c,_.ge,h);this.J.on(c,_.xe,h);this.J.on(c,_.Yd,h);this.log.info("Seeking to "+a+". Delta "+d);this.gd=this.Gd=!0;c.currentTime=a},h=l=>{const m=this.getPosition(),n=.1>=Math.abs(a-m);var q=.25<m-a;const t=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,v=l.type===_.ge,x=l.type===_.Yd,A=l.type===_.xe,
307
- D=x&&t;q=v||n&&D||A&&q;this.log.debug("Checking seeking state after "+l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",v,"Time reached",n,"Timeupdate:",A,"Progress:",x,"ReadyState:",t,"Progress Ready:",D);q?(this.gd=this.Gd=!1,this.J.off(c,_.ge,h),this.J.off(c,_.xe,h),this.J.off(c,_.Yd,h),this.gf(),this.trigger(new _.F(_.Ee)),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();
308
- else this.J.one(c,_.qd,g)};this.getState()===_.Kl?(this.log.debug("Player is in IDLE state. Postpone seek."),this.J.one(this,_.me,()=>{switch(this.getState()){case _.Fl:case _.Nl:case _.Ml: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();
309
- b?_.rf(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
310
- 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===_.jc&&(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();
311
- 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.Me}setNetworkEngine(a){this.Me=a}getTextDisplayer(){return this.I}getTimelineCues(){return[]}resetAbr(){}mf(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===_.xe||a.type===_.Yd)this.jf.debug(d);
312
- else{let e="";switch(a.type){case _.$d:e=`Rate: ${this.getPlaybackRate()}`;break;case Xc:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Ud:case _.Vd:case "suspend":case _.Qe:case ke:case _.he:case _.ge:case _.xe:case _.Yd:case pc:case qc:b=this.getBufferInfo().Ea(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.ee:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+
313
- e);this.jf.info(d)}a.type!==_.ad&&this.trigger(new _.F(a.type,{detail:a}))}gf(){}};_.ap.prototype.getTextDisplayer=_.ap.prototype.getTextDisplayer;_.ap.prototype.setNetworkEngine=_.ap.prototype.setNetworkEngine;_.ap.prototype.getNetworkEngine=_.ap.prototype.getNetworkEngine;var kj;kj=new _.Q("clpp.Components");_.ij=new Map;var bp=class{constructor(){this.a=this.f=null;this.g=new _.Q("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("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"});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.Cd,CLEAR_KEY:_.Ld,WIDEVINE:_.Lc,PLAYREADY:_.Kc,FAIRPLAY:_.Jc,PRIMETIME:_.Ic});_.qj={};_.z("clpp.drm.registerDrmEnvironment",_.rj);var uj={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,
304
+ webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var T=class extends _.S{constructor(){super();this.h=new _.R("clpp.native.TrackManager");this.m=null;this.f=new _.vp;this.g=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.N=this.B.bind(this,_.K);this.S=this.F.bind(this,_.K);this.R=this.C.bind(this,_.K);this.V=this.B.bind(this,_.M);this.Y=this.F.bind(this,_.M);this.W=this.C.bind(this,_.M);this.J=this.B.bind(this,_.L);this.M=this.F.bind(this,_.L);this.K=this.C.bind(this,_.L);this.j=null}yd(){return!_.Pi()}B(a,
305
+ b){const c=this;return _.x(function*(){if(b){var d=b.track;if(d){var e=a===_.M,f=a===_.K,g=a===_.L||e,h=b.target,k=c.g.find(n=>dj(n,d,a));if(k)c.h.warn("Track from event already exists",d,k);else{var l=$h(a,d),m=ej(d);if(f){if(d.kind===_.Gd)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(q=>dj(l,q,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.Zb);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.g.find(n=>n.type===a&&_.Tf(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.h.debug(`Setting native ${a} track active`),
306
+ c.a.set(a,k));c.h.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.gi(l.id,l));c.g.push(l);const n=c.m.getConfiguration().safari;gj(c,a,n)?yield hj(c,l,n):ij(c,a,n)&&(yield jj(c,l,n));c.h.debug(a+" Track added",l);c.m.trigger(new _.F(_.bq));const q=kj(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.h.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${q}`,d);c.a.set(a,l)};m?f():1===q&&
307
+ g&&(e?f():u&&1!==v||f())}catch(n){c.h.error("Error while converting track data",n)}}}else c.h.warn(Ta)}else c.h.warn(Qa)})}F(a,b){if(b){var c=b.track;c?a===_.K&&c.kind!==_.Gd&&(b=this.g.find(d=>dj(d,c,a)))&&(this.g.splice(this.g.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),lj(this)),this.h.debug(a+" Track removed, id: ",b.id)):this.h.warn(Ta)}else this.h.warn(Qa)}C(a,b){this.h.debug(a+" Track changed",b);a===_.K&&lj(this);const c=nj(this,a);if(c)for(let d=0;d<c.length;++d)if(ej(c[d])){if(b=
308
+ this.g.find(e=>dj(e,c[d],a)))this.a.set(a,b),this.h.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.L?this.m.trigger(new _.F(_.qj)):a===_.K&&this.m.trigger(new _.F(_.rj));break}}initialize(a){this.m=a;this.j=new Xp(a.getNetworkEngine())}load(){this.A=!1;var a=mj(this,_.K);a&&(this.f.on(a,_.Tb,this.N),this.f.on(a,we,this.S),this.f.on(a,Bc,this.R));if(a=mj(this,_.L))this.f.on(a,_.Tb,this.J),this.f.on(a,we,this.M),this.f.on(a,Bc,this.K);if(a=mj(this,_.M))this.f.on(a,
309
+ _.Tb,this.V),this.f.on(a,we,this.Y),this.f.on(a,Bc,this.W);this.f.one(this.m,uc,this.H.bind(this))}release(){this.A=!0;this.g=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return kj(this,_.M)}getAudioTracks(){return kj(this,_.L)}ja(){return kj(this,_.K)}ia(){const a=this.a.get(_.M)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);if(b)return b}return a.renditions[0]||
310
+ null}Ha(){return oj(this,_.L)}Ia(){return oj(this,_.K)}Sa(){return pj(this,_.M)}eb(){return pj(this,_.L)}fb(){return pj(this,_.K)}Ka(){return this.a.get(_.M)||null}oa(){return this.a.get(_.L)||null}pa(){return this.a.get(_.K)||null}Xa(a){sj(this,_.M,a)}sa(a){sj(this,_.L,a)}Ea(a){sj(this,_.K,a)}Wa(a){sj(this,_.M,a&&a.track)}kb(a){sj(this,_.L,a&&a.track)}lb(a){sj(this,_.K,a&&a.track)}addTextTrack(a){const b=this;return _.x(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
311
+ b.o[c]=a;tj(b,a,c)}else yield uj(b,a)})}la(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();wj(a,_.L,b.preferredAudioLanguage);if(!nj(a,_.K).some(c=>ej(c))){const c=mj(a,_.K);yield new Promise(d=>{a.f.one(c,Bc,d);(new _.zi(d)).ca(1)})}a.A||wj(a,_.K,b.preferredTextLanguage)})}};T.prototype.isAbrEnabled=T.prototype.la;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.setTextRendition=T.prototype.lb;
312
+ T.prototype.setAudioRendition=T.prototype.kb;T.prototype.setVideoRendition=T.prototype.Wa;T.prototype.setTextTrack=T.prototype.Ea;T.prototype.setAudioTrack=T.prototype.sa;T.prototype.setVideoTrack=T.prototype.Xa;T.prototype.getTextTrack=T.prototype.pa;T.prototype.getAudioTrack=T.prototype.oa;T.prototype.getVideoTrack=T.prototype.Ka;T.prototype.getLoadingTextRendition=T.prototype.fb;T.prototype.getLoadingAudioRendition=T.prototype.eb;T.prototype.getLoadingVideoRendition=T.prototype.Sa;
313
+ T.prototype.getTextRendition=T.prototype.Ia;T.prototype.getAudioRendition=T.prototype.Ha;T.prototype.getVideoRendition=T.prototype.ia;T.prototype.getTextTracks=T.prototype.ja;T.prototype.getAudioTracks=T.prototype.getAudioTracks;T.prototype.getVideoTracks=T.prototype.getVideoTracks;T.prototype.canSelectVideoTracks=T.prototype.yd;_.cq=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(qb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(qb);}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-
314
+ 1)}$b(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}Fa(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=
315
+ "";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",_.cq);_.cq.prototype.bufferedAheadOf=_.cq.prototype.Fa;_.cq.prototype.isBuffered=_.cq.prototype.$b;_.cq.prototype.bufferEnd=_.cq.prototype.Aa;_.cq.prototype.bufferStart=_.cq.prototype.ob;_.cq.prototype.end=_.cq.prototype.end;_.cq.prototype.start=_.cq.prototype.start;_.dq=class{constructor(){this.Fc=new tp(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)}};
316
+ _.dq.prototype.off=_.dq.prototype.off;_.dq.prototype.one=_.dq.prototype.one;_.dq.prototype.on=_.dq.prototype.on;_.dq.prototype.removeEventListener=_.dq.prototype.removeEventListener;_.dq.prototype.addEventListener=_.dq.prototype.addEventListener;_.z("clpp.events.ERROR",_.ld);_.z("clpp.events.LOADEDMETADATA",_.Bd);_.z("clpp.events.BUFFERING_ENDED",_.oc);_.z("clpp.events.BUFFERING_STARTED",_.sc);_.z("clpp.events.STATE_CHANGED",_.Ge);_.qj="audiotrackchanged";_.z("clpp.events.AUDIO_TRACK_CHANGED",_.qj);_.rj="texttrackchanged";_.z("clpp.events.TEXT_TRACK_CHANGED",_.rj);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.hf);_.z("clpp.events.BITRATE_CHANGED",_.mc);_.bq="tracksadded";_.z("clpp.events.TRACKS_ADDED",_.bq);_.z("clpp.events.LOAD_START",Cd);
317
+ _.z("clpp.events.RELEASING",_.ve);_.z("clpp.events.RELEASED",ue);_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.gf);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.kc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_UPDATE",_.fd);_.z("clpp.events.DRM_SESSION_PERSISTED",_.ed);_.z("clpp.events.DRM_RENEWAL_STARTED",dd);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.cd);
318
+ _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.lc);_.z("clpp.events.PLAY",_.ee);_.z("clpp.events.SEEKING",_.Be);_.z("clpp.events.SEEKED",_.Ae);_.z("clpp.events.USER_SEEKING",_.af);_.z("clpp.events.USER_SEEKED",_.$e);_.xm={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.xm);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.Vb);_.z("clpp.events.AD_LOADED",_.Jb);_.z("clpp.events.AD_BREAK_STARTED",_.Cb);_.z("clpp.events.AD_STARTED",_.Pb);_.z("clpp.events.AD_BUFFERING",_.Eb);_.z("clpp.events.AD_PROGRESS",_.Mb);
319
+ _.z("clpp.events.AD_FIRST_QUARTILE",_.Hb);_.z("clpp.events.AD_MIDPOINT",_.Kb);_.z("clpp.events.AD_THIRD_QUARTILE",_.Rb);_.z("clpp.events.AD_PAUSED",_.Lb);_.z("clpp.events.AD_RESUMED",_.Nb);_.z("clpp.events.AD_SKIPPED",_.Ob);_.z("clpp.events.AD_CLICKED",_.Fb);_.z("clpp.events.AD_IMPRESSION",_.Ib);_.z("clpp.events.AD_COMPLETED",_.Gb);_.z("clpp.events.AD_STOPPED",_.Qb);_.z("clpp.events.AD_BREAK_STOPPED",_.Db);_.z("clpp.events.CASTING_STARTED",_.vc);_.z("clpp.events.CASTING_ENDED","castingended");
320
+ _.z("clpp.events.CAST_STATUS_CHANGED",_.wc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.Yb);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.Xb);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.Wb);_.og="timeline-cue-added";_.z("clpp.events.TIMELINE_CUE_ADDED",_.og);_.qg="timeline-cue-enter";_.z("clpp.events.TIMELINE_CUE_ENTER",_.qg);_.rg="timeline-cue-exit";_.z("clpp.events.TIMELINE_CUE_EXIT",_.rg);_.z("clpp.events.MPD_TYPE_CHANGED",_.Ld);_.z("clpp.events.VIMOND_RESPONSE",_.jf);
321
+ _.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.me);_.z("clpp.events.PLAYLIST_MODIFIED",_.ne);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.xc);_.z("clpp.events.ONLINE_STATUS_CHANGED",Ud);var xj=["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 eq=class{};_.z("clpp.utils.PlayerConfiguration",eq);eq.create=_.Dj;var fq=["abort",tc,uc,hd,"emptied",id,_.kd,_.ld,"interruptbegin","interruptend",_.Ad,_.Bd,Cd,"mozaudioavailable",_.ae,_.ee,_.le,_.re,_.te,_.Ae,_.Be,Ee,"suspend",_.Se,"volumechange",_.mf,_.nf,_.ye,sf,rf,pf,qf];_.gq=class extends _.dq{constructor(a){super();this.log=new _.R(a);this.configuration=this.nc=_.Bj();this.w=this.C=null;this.md=this.Pd=!1;this.rf=new _.R("clpp.video.events");this.Rb=null;this.oc=-1;this.zf=this.xf.bind(this);this.Od=new _.Bn;this.M=new _.vp;this.Na=this.lc=this.K=null}init(a,b){this.configuration=this.nc=b;this.C=a;this.log.info("Initializing Player surface");a=this.C.getMedia();this.log.info("Attaching media element listeners");for(const c of fq)this.M.on(a,c,this.zf,c!==_.ld);
322
+ this.Rb||(this.Rb=this.ef());this.Rb.initialize(this);this.C.showMediaElement()}release(){this.K&&(this.K.destroy(),this.K=null);return Promise.resolve()}destroy(){this.M.release();return this.Od.release()}canPlay(a,b){return _.fg[this.namespace()].canPlay(a,b)}play(){if(!this.w)return Promise.reject("No sources specified yet. You need to load content before calling play.");const a=this.C.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c=
323
+ {name:b.name||"",message:b.message||"",stack:b.stack||""};yj(c)?(this.trigger(new _.F(_.lc)),this.log.warn(_.ia)):c.name===Va&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.w?new Promise((a,b)=>{const c=this.getState();if(c!==_.vm&&c!==_.sm&&c!==_.Dm&&c!==_.Cm)b();else if(this.C.getMedia().pause(),this.getState()===_.Dm)this.M.one(this,_.Ge,()=>{a()});else a()}):Promise.reject("No sources specified yet. You need to load content before calling pause.")}isPaused(){return this.C.getMedia().paused}isEnded(){return this.C.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.lc=
324
+ a}setCdnErrorCallback(a){this.Na=a}qc(){return this.lc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.cq(b?b.buffered:void 0,a)}getPosition(){const a=this.C.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this.getPosition();if(void 0===a||null===a||typeof a!==_.r||a===b)return Promise.resolve();const c=this.C.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),
325
+ 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(_.af));this.M.on(c,_.Ae,h);this.M.on(c,_.Se,h);this.M.on(c,_.re,h);this.log.info("Seeking to "+a+". Delta "+d);this.md=this.Pd=!0;c.currentTime=a},h=l=>{const m=this.getPosition(),n=.1>=Math.abs(a-m);var q=.25<m-a;const u=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,v=l.type===_.Ae,y=l.type===_.re,A=l.type===_.Se,
326
+ D=y&&u;q=v||n&&D||A&&q;this.log.debug("Checking seeking state after "+l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",v,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",u,"Progress Ready:",D);q?(this.md=this.Pd=!1,this.M.off(c,_.Ae,h),this.M.off(c,_.Se,h),this.M.off(c,_.re,h),this.qf(),this.trigger(new _.F(_.$e)),e()):y&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();
327
+ else this.M.one(c,_.Bd,g)};this.getState()===_.Am?(this.log.debug("Player is in IDLE state. Postpone seek."),this.M.one(this,_.Ge,()=>{switch(this.getState()){case _.vm:case _.Dm:case _.Cm:this.log.debug("Valid seek state reached.");k();break;default:this.log.warn("Invalid seek target state. Aborting seek"),f()}})):k()})}getVolume(){const a=this.C.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.C.getMedia();
328
+ b?_.Sf(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
329
+ Value must be between 0 and 1.`):b.volume=a:this.log.warn("Can not set volume to "+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")}isMuted(){return this.C.getMedia().muted}setMuted(a){const b=this.C.getMedia();typeof a===_.nc&&(b.muted=a)}getDuration(){return this.w?this.C.getMedia().duration:-1}getTrackManager(){return this.Rb}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||1}setPlaybackRate(a){const b=this.C.getMedia();
330
+ void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.oc=a}getSourceIndex(){return this.oc}getLoadedSource(){return this.w&&-1!==this.oc?this.w[this.oc]:null}getPeriods(){return[]}getNetworkEngine(){return this.Od}setNetworkEngine(a){this.Od=a}getTextDisplayer(){return this.K}getTimelineCues(){return[]}resetAbr(){}xf(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===_.Se||a.type===_.re)this.rf.debug(d);
331
+ else{let e="";switch(a.type){case _.te:e=`Rate: ${this.getPlaybackRate()}`;break;case hd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.ee:case _.le:case "suspend":case _.mf:case Ee:case _.Be:case _.Ae:case _.Se:case _.re:case tc:case uc:b=this.getBufferInfo().Fa(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.ye:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+
332
+ e);this.rf.info(d)}a.type!==_.ld&&this.trigger(new _.F(a.type,{detail:a}))}qf(){}};_.gq.prototype.getTextDisplayer=_.gq.prototype.getTextDisplayer;_.gq.prototype.setNetworkEngine=_.gq.prototype.setNetworkEngine;_.gq.prototype.getNetworkEngine=_.gq.prototype.getNetworkEngine;var Hj;Hj=new _.R("clpp.Components");_.Fj=new Map;_.z("clpp.install",function(a){Pj(a)});_.z("clpp.uninstall",function(a){Qj(a)});var hq=class{constructor(){this.a=this.f=null;this.h=new _.R("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.ib,SW_SECURE_DECODE:_.jb,HW_SECURE_CRYPTO:Da,HW_SECURE_DECODE:Ea,HW_SECURE_ALL:Ca});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.Nd,CLEAR_KEY:_.Zd,WIDEVINE:_.Sc,PLAYREADY:_.Qc,FAIRPLAY:_.Pc,PRIMETIME:_.Oc});_.Uj={};_.z("clpp.drm.registerDrmEnvironment",_.Vj);var Yj={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,
314
333
  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,
315
334
  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,
316
335
  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,
@@ -324,79 +343,87 @@ e);this.jf.info(d)}a.type!==_.ad&&this.trigger(new _.F(a.type,{detail:a}))}gf(){
324
343
  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,
325
344
  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,
326
345
  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,
327
- 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]};_.cp=class{constructor(a){this.I=a;this.g={}}La(a,b){this.g[a]=b}};_.z("clpp.drm.DrmEnvironment",_.cp);_.cp.prototype.setDrmSystem=_.cp.prototype.La;_.Sj=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.rf(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.g=b;this.buffer=this.f.buffer}getPosition(){return this.a}Ba(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.xj();this.a=a}};_.wk=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&&_.Aj();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.Aj();this.a=a}};
328
- _.z("clpp.utils.dataview.DataViewReader",_.wk);_.Qj=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.Q("clpp.mp4")}L(a,b){a=Hj(a);this.g[a]=dp;this.f[a]=b;return this}Z(a,b){a=Hj(a);this.g[a]=ep;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.K(a);a=new _.wk(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.zj(a)&&!this.a;)this.ld(0,a,b)}ld(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.h.debug("Parsing MP4 box",_.Ij(f));switch(e){case 0:e=b.Ba()-d;break;case 1:e=_.Ej(b),g=!0}const h=
329
- this.f[f];if(h){let m=null;var k=null;this.g[f]==ep&&(k=_.P(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?_.Gj(b,l):new Uint8Array(0);b=new _.wk(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",_.Qj);_.Qj.typeToString=_.Ij;
330
- _.Qj.allData=_.Lj;_.Qj.sampleDescription=_.Kj;_.Qj.children=_.Jj;_.Qj.prototype.parseNext=_.Qj.prototype.ld;_.Qj.prototype.parse=_.Qj.prototype.parse;_.Qj.prototype.stop=_.Qj.prototype.stop;_.Qj.prototype.fullBox=_.Qj.prototype.Z;_.Qj.prototype.box=_.Qj.prototype.L;_.Qj.headerSize=_.Mj;var dp=0,ep=1;var fp=class{};_.z("clpp.utils.FairplayUtils",fp);fp.parseFairPlayResponse=_.Vj;fp.formatFairPlayRequest=_.Uj;fp.createFairplayPayload=Tj;fp.extractContentId=_.Pj;fp.extractExtXKeyUri=Nj;var bk=new _.Q("clpp.drm.DrmToday"),lk="PRODUCTION",mk="STAGING",nk="TEST",gp={PRODUCTION:lk,STAGING:mk,TEST:nk};_.z("clpp.drm.DrmToday.Environment",gp);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
331
- var Xj="/license-proxy-widevine/cenc/",Yj="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Zj="/license-server-fairplay/",ok={"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",
332
- 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"},hp=[_.eb,void 0],ip=[_.db,void 0],jp=["3000"],kp=["2000"];
333
- for(const a of Object.keys(gp)){let b=sa;a!==lk&&(b+=`_${a}`);const c=new _.cp(b);let d=null;switch(a){case lk:d=vj("V1_PROD");break;case mk:d=vj("V2");break;case nk:d=null}c.La(_.Lc,{licenseUrl:ak(_.Lc,a),videoRobustness:hp,audioRobustness:ip,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.dk,licenseResponse:_.ek}});c.La(_.Jc,{licenseUrl:ak(_.Jc,a),certificateUrl:Wj(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.gk,licenseResponse:_.hk,
334
- extractContentId:_.ik,certificateRequest:_.jk}});c.La(_.Kc,{licenseUrl:ak(_.Kc,a),videoRobustness:jp,audioRobustness:kp,modifiers:{licenseRequest:kk}});_.rj(c)};var lp=class{};_.z("clpp.drm.eme.EmeFactory",lp);var qk=[];lp.Apis={STANDARD:cb,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var uk,tk;uk=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];_.mp=class{constructor(a,b,c){this.h=new Uint8Array(a);this.a=b;this.f=c}};tk=class extends _.mp{};var Uk=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.Qj).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=_.bh(_.Gj(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.bh(_.Gj(a.reader,16));c.push(f)}}d=_.P(a.reader);a.reader.skip(d);this.g.push.apply(this.g,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});a.reader.getPosition()!=
335
- a.reader.Ba()&&_.C("Mismatch between box size and data size!")}}};var Qk,np;
336
- _.Wl=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=np;this.w=new _.po;this.K=new bp;this.g=new Map;this.I=[];this.F=new _.Sk;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 _.ci(()=>Gk(this));this.pa=!1;this.aa=new _.Sk;this.C=!1;this.V=[];this.ba=!1;this.N=0;this.a=new _.Q("clpp.drm.DrmEngine");this.Y=(new _.ci(()=>{Hk(this)})).Xa(1);this.F.catch(()=>{});this.o=this.B=!1;this.M=
337
- null}destroy(){const a=this;return _.y(function*(){a.pa?yield a.aa:(a.pa=!0,yield Ik(a),a.aa.resolve())})}keySystem(){return this.f?_.Ak(this.f.keySystem):""}getDrmInfo(){return this.f}ma(a){const b=this;return _.y(function*(){b.C&&b.H===Qk||(!b.h.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.ba?yield Zk(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==_.pe){var g=f;
338
- f=e;e=g}if(zk(this.f.keySystem)&&16===f.byteLength&&_.ei()){g=_.Fg(f);const k=g.getUint32(0,!0),l=g.getUint16(4,!0),m=g.getUint16(6,!0);g.setUint32(0,k,!1);g.setUint16(4,l,!1);g.setUint16(6,m,!1)}c&&e!==ne&&(c.loaded=!0);c&&c.Ca&&c.Ca.resolve();"expired"===e&&(d=!0);f=_.K(f);let h=_.bh(f);"00"===h&&c&&c.keyId?h=c.keyId:this.f.keySystem.startsWith(_.Jc)&&16!==f.byteLength&&(h=Hg(f));(f=h||"")?this.a.info(`Key status for Key ID '${h}': ${e}`):this.a.info(`Key status global keys: ${e}`);this.j.set(f,
339
- 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)===ne&&(this.a.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.Md))});for(a=0;a<this.f.initData.length;a++){const e=this.f.initData[a];e.keyId&&this.j.get(e.keyId)===ne&&_.ch(e.initData,c.initData)&&(this.a.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,_.Md))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.mb&&
340
- (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(()=>{}));il(this)&&(this.F.resolve(),1!==this.g.size||d?this.T.da(.5):Gk(this))}};Qk=0;np=3;var pl=new Map,ql=new _.Q("clpp.text");var op=class{constructor(){this.a=null;this.f=[]}};var pp=class{constructor(){this.g=this.f=this.h=null;this.a=[]}};_.qp=class{constructor(){this.f=this.m=this.w=this.B=this.h=this.j=this.g=this.o=NaN;this.a=new op;this.A=new pp}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:ul(this.a,_.Nl),pauseTime:ul(this.a,_.Ml),bufferingTime:ul(this.a,_.Fl),stateHistory:vl(this.a),switchHistory:wl(this.A)}}};_.rp=class{constructor(a){this.f=a;this.a=void 0}value(){void 0==this.a&&(this.a=this.f());return this.a}};var yl=new _.rp(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.qd],[HTMLMediaElement.HAVE_CURRENT_DATA,_.pd],[HTMLMediaElement.HAVE_FUTURE_DATA,pc],[HTMLMediaElement.HAVE_ENOUGH_DATA,qc]]));var tp=class{constructor(a){this.g=new _.Q("clpp.StateManager");this.l=a;this.a=new _.po;this.f=_.Kl;this.A=_.sp;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=_.qi();this.C=!1;this.I=Date.now();Dl(this)}Pb(a,b){this.l&&this.l.trigger(new _.F(a,{detail:b}))}getState(){return Gl(this,"")}U(a){(a=a&&a.detail)&&a.severity&&a.severity===_.G&&Bl(this,_.Jl)}destroy(){this.g.debug("Stop watching for video events for "+this.l.namespace());this.a.release()}};_.z("clpp.version",_.da);_.z("clpp.name",_.ma);_.Zi="application/x-mpegurl";_.z("clpp.Type",{DASH:_.Ub,HLS:_.Zi,SMOOTH_STREAMING:_.Zb,MP4:_.Ke});_.Rf="scte35";_.Pf=Be;_.z("clpp.TimelineCueType",{SCTE35:_.Rf,DASH_CALLBACK:_.Bd,UNKNOWN:_.Pf});_.z("clpp.utils.media.detectType",Ol);var Rl=new _.Q("clpp.sources");var up=class extends _.ap{constructor(){super(Ec);this.w=this.G=!1;this.j=this.A=this.m=this.a=this.h=null;this.g=new _.po;this.F=this.C=this.f=this.H=null}init(a,b){super.init(a,b);this.h=new tp(this);Bl(this.h,_.Kl)}namespace(){return Ec}unload(){const a=this;return _.y(function*(){if(a.o){a.log.debug(_.$a,a.o);a.C&&(a.C.stop(),a.C=null);const b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.I&&(a.I.destroy(),a.I=null);a.j&&a.j.release();a.m&&(a.m.destroy(),a.m=null);_.Nf(a.g);
341
- a.f&&(a.f=new _.qp);a.F=null;a.o=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Tl(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.h&&Bl(this.h,_.Kl)})}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",
342
- 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 Sl();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 _.qp;b.g.on(b,_.me,()=>{b.f&&_.tl(b.f.a,b.getState())});Bl(b.h,_.Ll);b.o=_.Ql(a);_.hj(a)&&(b.configuration=_.gj(b.kc,
343
- a));b.log.debug(_.Ja,b.configuration);b.log.debug(_.Wa,b.o);const d=_.sl(b.configuration,["html","native"]);b.I=d.create(b);b.I.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.jj(_.se)&&!_.si()&&(b.A=new Do(b),b.A.start(c));b.j?b.j.release():b.j=new qo(b);Xf(b.j,c);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.B(b.configuration.volume)||b.setVolume(b.configuration.volume);_.B(b.configuration.muted)||b.setMuted(b.configuration.muted);b.g.one(c,pc,()=>{b.trigger(new _.F(_.Wo))});
344
- null==b.configuration.startTime&&am(b,c);try{yield Vl(b,c),yield Xl(b),yield $l(b).P}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.G&&null!==this.h&&Bl(this.h,_.Jl),this.trigger(new _.F(_.ad,{detail:a})))}Te(){return new S}getState(){return null!==this.h?this.h.getState().currentState:_.sp}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!"),
345
- 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 _.xl();this.f&&_.tl(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,
346
- 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.Bc&&(this.f.f=a.Bc);return this.f.getStats()}getTimelineCues(){return this.j?this.j.getTimelineCues():[]}};
347
- _.Lf(new class{a(){return Ec}canPlay(a,b){a=a.type||"";const c=a===_.Ub,d=a===_.Zb,e=a===_.Zi;var f;_.pi()||c||d||e&&!_.qi()?f=0:f=""!==di().canPlayType(a)?e&&_.qi()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}create(){return new up}});_.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 cm=new _.Q("clpp.ads"),bm=[];_.z("clpp.utils.dom.createHTMLElement",_.jm);var vp=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=km(this,a)}get(){return this.a}};var yp=class{constructor(a,b){this.a=new _.Q("clpp.PlayerSurface");this.w=_.kf(wp,b);this.g=new vp;this.h=null;this.f=new vp;this.m=xp;xp+=1;this.o=`clpp-video-${this.m}`;this.j=new _.po;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
348
- 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{c=document.createElement(_.Rc);a.parentNode?a.parentNode.replaceChild(c,
349
- a):this.a.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.hm(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.re);for(d of[_.Xe,_.dd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.gi()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.f.set(d),lm(this.f,"clpp-container"),
350
- lm(this.f,this.o),lm(this.g,_.zc),lm(this.g,"clpp-video"));b.webOSStartupPatch&&mm(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?_.hm(a,Ac):this.a.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(Ac):
351
- this.a.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.hm(a,_.zc);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)}removeElementFromContainer(a){const b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)}hide(a){_.hm(a,Ac)}show(a){a.classList.remove(Ac)}release(){this.j.release()}};
352
- yp.prototype.removeElementFromContainer=yp.prototype.removeElementFromContainer;yp.prototype.addElementToContainer=yp.prototype.addElementToContainer;yp.prototype.getCastElement=yp.prototype.getCastElement;yp.prototype.getContainer=yp.prototype.getContainer;yp.prototype.getMedia=yp.prototype.getMedia;var wp={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},xp=1;var zp=class{constructor(a){this.l=a;this.h=this.l.getNetworkEngine();this.a=new _.po;this.g=null;this.f=!0;qm(this)}release(){this.a.release();rm(this);this.l=null}};_.z("clpp.polyfill.installAll",um);var tm=[];_.z("clpp.polyfill.register",_.vm);var xm=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.Ig(_.$g(a)));this.a=JSON.parse(_.Ig(_.$g(b)));this.h=c}verify(a,b){const c={kty:"RSA",n:a.n,e:a.e},d=this.g+"."+this.f,e=this.h;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.Mg(d),n=_.$g(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(gb)}).catch(g)}else b?
353
- g("Web Crypto API is not supported"):f()})}};var Ap={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},cj="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Om=class{constructor(a){this.license=a;this.a=null;this.f=new _.Q("clpp.utils.LicenseKey")}verify(){return(new Promise((a,b)=>{try{const c=ym(this);a(c)}catch(c){b()}})).then(a=>a.verify(Ap)).catch(a=>{if(a&&a!==gb){{var b=window.location.href;const c=new _.ig(b);b=c.Ua||c.Fa?c:new _.ig("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Fa))return Promise.resolve()}throw a;})}},Jm="vod",Im="live";var T=class extends _.Yo{constructor(a,b,c){super();um();this.g=new _.Q("clpp.Player");if(!a)throw new _.H(_.G,7,7102);this.A=new _.po;this.f=this.N=b||_.ej();this.m=null;void 0===this.f.license&&(this.f.license=cj,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 yp(a,c);this.a=this.w=null;
354
- this.G=new _.Km;this.j=null;this.J=[];this.K={};this.o=null;this.H=!0;this.I=this.F=!1;this.C=this.mc=null;this.wd=!1;this.T=new zp(this);this.M=!1;this.B=d=>{(d=d.detail)&&d.currentState===_.Nl&&(this.off(_.me,this.B),Pm(this))};this.on(_.me,()=>{this.getState()===_.Jl&&this.unload()});this.on(_.Rb,this.R.bind(this));this.on(_.Pb,this.R.bind(this));Qm(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."),
355
- 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 Mm)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Sm(this,a);_.ij.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(_.ad,{detail:a}),this.trigger(a)}Wb(a){a=
356
- this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.h}getConfiguration(){return _.lf(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}unload(){return this.a?this.a.unload():Promise.resolve()}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.m)return this.g.info("Player release already in progress"),this.m;this.g.debug("Releasing player");this.m=Um(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"),
357
- new Promise(a=>a());this.F=!0;return this.release().then(()=>{this.g.debug(ua);this.trigger(new _.F("destroying"));return _.Rm(this,_.Gd)}).then(()=>{this.a&&this.a.removeDelegate(this);this.Gc.clear();this.T.release();if(this.a)return this.a.destroy()}).then(()=>{mj(a=>{a.a()});_.ij.clear();this.a=null;this.trigger(new _.F("destroyed"))})}load(a){const b=this;return _.y(function*(){try{yield _.$m(b,a),yield _.an(b),yield _.cn(b)}catch(c){if(b.m)throw b.g.info("Load interrupted while a player release is pending"),
358
- new _.H(_.G,7,7E3);throw c;}})}use(a){a=new a;a.f(this);_.lj(a)}remove(a){if(this.getState()<=_.Kl||this.H){let b="";mj(c=>{c instanceof a&&(b=c.id(),c.a())});if(b)return _.ij.delete(b),this.I=!0}return!1}play(){return this.a?this.j&&this.a.namespace()!==_.Bc?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&&
359
- this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.Xo}getState(){return this.a?this.a.getState():_.Kl}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()===_.Jl?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?
360
- this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}tc(){const a=this.a;return a&&a.tc?a.tc():null}getVolume(){return this.a?this.a.getVolume():null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.j}namespace(){return this.a&&this.a.namespace()||"Undefined"}canPlay(a,b){return this.a?this.a.canPlay(a,b):0}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a){this.a&&
361
- this.a.setPlaybackRate(a)}isMuted(){return this.a&&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}ed(){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?
362
- this.a.getTimelineCues():[]}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.mc=a;Ym(this)}setCdnErrorCallback(a){this.C=a;this.a&&this.a.setCdnErrorCallback(this.C)}R(){this.wd=!0}};_.z("clpp.Player",T);T.registerPlugin=_.Nm;T.prototype.setCdnErrorCallback=T.prototype.setCdnErrorCallback;T.prototype.setDrmCustomDataModifier=T.prototype.setDrmCustomDataModifier;T.prototype.resetAbr=T.prototype.resetAbr;T.prototype.getTimelineCues=T.prototype.getTimelineCues;
363
- T.prototype.getLoadedSource=T.prototype.getLoadedSource;T.prototype.getSources=T.prototype.ed;T.prototype.getStats=T.prototype.getStats;T.prototype.isLive=T.prototype.isLive;T.prototype.getTextDisplayer=T.prototype.getTextDisplayer;T.prototype.setNetworkEngine=T.prototype.setNetworkEngine;T.prototype.getNetworkEngine=T.prototype.getNetworkEngine;T.prototype.setMuted=T.prototype.setMuted;T.prototype.isMuted=T.prototype.isMuted;T.prototype.setPlaybackRate=T.prototype.setPlaybackRate;
364
- T.prototype.getPlaybackRate=T.prototype.getPlaybackRate;T.prototype.namespace=T.prototype.namespace;T.prototype.getAdsManager=T.prototype.getAdsManager;T.prototype.getDuration=T.prototype.getDuration;T.prototype.setVolume=T.prototype.setVolume;T.prototype.getVolume=T.prototype.getVolume;T.prototype.getTimelineOffset=T.prototype.tc;T.prototype.getSeekRange=T.prototype.getSeekRange;T.prototype.getPresentationStartTime=T.prototype.getPresentationStartTime;T.prototype.seek=T.prototype.seek;
365
- T.prototype.getPosition=T.prototype.getPosition;T.prototype.isPaused=T.prototype.isPaused;T.prototype.isEnded=T.prototype.isEnded;T.prototype.getState=T.prototype.getState;T.prototype.getBufferInfo=T.prototype.getBufferInfo;T.prototype.getTrackManager=T.prototype.getTrackManager;T.prototype.pause=T.prototype.pause;T.prototype.play=T.prototype.play;T.prototype.remove=T.prototype.remove;T.prototype.use=T.prototype.use;T.prototype.load=T.prototype.load;T.prototype.destroy=T.prototype.destroy;
366
- T.prototype.release=T.prototype.release;T.prototype.getDrmInfo=T.prototype.getDrmInfo;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.getSurface=T.prototype.getSurface;T.prototype.getPlugin=T.prototype.Wb;T.prototype.off=T.prototype.off;T.prototype.one=T.prototype.one;T.prototype.on=T.prototype.on;_.Kl=0;_.Ll=1;_.Fl=2;_.Nl=3;_.Ml=4;_.Cl=5;_.Jl=6;_.sp=7;_.Il={IDLE:_.Kl,PREPARING:_.Ll,BUFFERING:_.Fl,PLAYING:_.Nl,PAUSED:_.Ml,ENDED:_.Cl,ERROR:_.Jl,UNSET:_.sp};T.State=_.Il;
367
- var Mm=[];var U=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",U);U.prototype.getWrapperCreativeIds=U.prototype.getWrapperCreativeIds;U.prototype.getWrapperAdSystems=U.prototype.getWrapperAdSystems;U.prototype.getWrapperAdIds=U.prototype.getWrapperAdIds;
368
- U.prototype.getSequenceLength=U.prototype.ub;U.prototype.getPositionInSequence=U.prototype.Jb;U.prototype.getPodTimeOffset=U.prototype.Ib;U.prototype.getPodIndex=U.prototype.getPodIndex;U.prototype.getPodType=U.prototype.Sa;U.prototype.getMediaBitrate=U.prototype.gb;U.prototype.getMediaHeight=U.prototype.rb;U.prototype.getMediaWidth=U.prototype.sb;U.prototype.getMediaUrl=U.prototype.getMediaUrl;U.prototype.getClickThroughUrl=U.prototype.Hb;U.prototype.isBumper=U.prototype.$b;
346
+ 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]};_.iq=class{constructor(a){this.I=a;this.f={}}La(a,b){this.f[a]=b}};_.z("clpp.drm.DrmEnvironment",_.iq);_.iq.prototype.setDrmSystem=_.iq.prototype.La;_.vk=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.Sf(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)&&_.ak();this.a=a}};_.gl=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&&_.dk();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.dk();this.a=a}};
347
+ _.z("clpp.utils.dataview.DataViewReader",_.gl);_.tk=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.R("clpp.mp4")}L(a,b){a=kk(a);this.g[a]=jq;this.f[a]=b;return this}Z(a,b){a=kk(a);this.g[a]=mq;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.J(a);a=new _.gl(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.ck(a)&&!this.a;)this.pd(0,a,b)}pd(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.h.debug("Parsing MP4 box",_.lk(f));switch(e){case 0:e=b.Ba()-d;break;case 1:e=_.hk(b),g=!0}const h=
348
+ this.f[f];if(h){let m=null;var k=null;this.g[f]==mq&&(k=_.P(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?_.jk(b,l):new Uint8Array(0);b=new _.gl(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",_.tk);_.tk.typeToString=_.lk;
349
+ _.tk.allData=_.ok;_.tk.sampleDescription=_.nk;_.tk.children=_.mk;_.tk.prototype.parseNext=_.tk.prototype.pd;_.tk.prototype.parse=_.tk.prototype.parse;_.tk.prototype.stop=_.tk.prototype.stop;_.tk.prototype.fullBox=_.tk.prototype.Z;_.tk.prototype.box=_.tk.prototype.L;_.tk.headerSize=_.pk;var jq=0,mq=1;var nq=class{};_.z("clpp.utils.FairplayUtils",nq);nq.parseFairPlayResponse=_.yk;nq.formatFairPlayRequest=_.xk;nq.createFairplayPayload=wk;nq.extractContentId=_.sk;nq.extractExtXKeyUri=qk;var Ek=new _.R("clpp.drm.DrmToday"),Ok="PRODUCTION",Pk="STAGING",Qk="TEST",oq={PRODUCTION:Ok,STAGING:Pk,TEST:Qk};_.z("clpp.drm.DrmToday.Environment",oq);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
350
+ var Ak="/license-proxy-widevine/cenc/",Bk="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Ck="/license-server-fairplay/",Rk={"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",
351
+ 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"},pq=[Ca,Ea,Da,_.jb,_.ib],qq=[_.jb,_.ib],rq=["3000","2000","150"],
352
+ sq=["2000","150"];
353
+ for(const a of Object.keys(oq)){let b=ta;a!==Ok&&(b+=`_${a}`);const c=new _.iq(b);let d=null;switch(a){case Ok:d=Zj("V1_PROD");break;case Pk:d=Zj("V2");break;case Qk:d=null}c.La(_.Sc,{licenseUrl:Dk(_.Sc,a),videoRobustness:pq,audioRobustness:qq,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Gk,licenseResponse:_.Hk}});c.La(_.Pc,{licenseUrl:Dk(_.Pc,a),certificateUrl:zk(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Jk,licenseResponse:_.Kk,
354
+ extractContentId:_.Lk,certificateRequest:_.Mk}});c.La(_.Qc,{licenseUrl:Dk(_.Qc,a),videoRobustness:rq,audioRobustness:sq,modifiers:{licenseRequest:Nk}});_.Vj(c)};var tq=class{};_.z("clpp.drm.eme.EmeFactory",tq);var Tk=[];tq.Apis={STANDARD:hb,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var el,uq,dl;_.ml=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];el=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];uq=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};dl=class extends uq{};_.ll=class extends uq{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.g=c;this.l=f}};var Ll=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.tk).Z("pssh",this.j.bind(this)).parse(a.buffer);0==this.a.length&&_.C("No pssh box found!")}j(a){if(1<a.version)_.C("Unrecognized PSSH version found!");else{var b=_.yh(_.jk(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.yh(_.jk(a.reader,16));c.push(f)}}d=_.P(a.reader);a.reader.skip(d);this.g.push.apply(this.g,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});a.reader.getPosition()!=
355
+ a.reader.Ba()&&_.C("Mismatch between box size and data size!")}}};var Hl,vq;
356
+ _.Mm=class{constructor(a){this.D=a;this.J=new Set;this.A=this.G=this.l=null;this.R=!1;this.a=null;this.H=vq;this.w=new _.vp;this.K=new hq;this.f=new Map;this.I=[];this.F=new _.Jl;this.g=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.S=new _.zi(()=>Al(this));this.qa=!1;this.aa=new _.Jl;this.C=!1;this.V=[];this.ba=!1;this.N=0;this.h=new _.R("clpp.drm.DrmEngine");this.Y=(new _.zi(()=>{Bl(this)})).Ya(1);this.F.catch(()=>{});this.o=this.B=!1;this.M=
357
+ null}destroy(){const a=this;return _.x(function*(){a.qa?yield a.aa:(a.qa=!0,yield Cl(a),a.aa.resolve())})}keySystem(){return this.a?_.rl(this.a.keySystem):""}getDrmInfo(){return this.a}na(a){const b=this;return _.x(function*(){if(!b.C||b.H!==Hl){var c=Math.floor(a.timeStamp),d=`drm.msg.${c}.start`,e=`drm.msg.${c}.end`;_.ol(d);!b.g.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.ba?yield Ql(b,a):b.V.push(a);_.ol(e);performance.measure(`drm.sess.msg.${c}`,d,e)}})}fa(a){const b=a.target;this.h.info("Key status changed for session",
358
+ b.sessionId);const c=this.f.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f==_.Je){var g=f;f=e;e=g}if(ql(this.a.keySystem)&&16===f.byteLength&&_.Di()){g=_.bh(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!==He&&(c.loaded=!0);c&&c.Ca&&c.Ca.resolve();"expired"===e&&(d=!0);f=_.J(f);let h=_.yh(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.Pc)&&16!==f.byteLength&&(h=fh(f));(f=h||"")?this.h.info(`Key status for Key ID '${h}': ${e}`):
359
+ this.h.info(`Key status global keys: ${e}`);this.j.set(f,e);c&&!c.keyId&&this.f.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.Qa.forEach(e=>{this.j.get(e)===He&&(this.h.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.$d))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.j.get(e.keyId)===He&&_.zh(e.initData,c.initData)&&(this.h.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,
360
+ _.$d))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.mb&&(this.h.debug("Session has expired",b.sessionId),(a=this.f.get(b))&&a.jc&&a.jc.stop(),this.f.delete(b),b.close().catch(()=>{}));Zl(this)&&(this.F.resolve(),1!==this.f.size||d?this.S.ca(.5):Al(this))}};Hl=0;vq=3;_.fm=new Map;_.gm=new _.R("clpp.text");var wq=class{constructor(){this.a=null;this.f=[]}};var xq=class{constructor(){this.g=this.f=this.j=null;this.a=[]}};_.yq=class{constructor(){this.f=this.o=this.A=this.C=this.j=this.l=this.g=this.w=NaN;this.a=new wq;this.B=new xq}getStats(){return{width:this.w,height:this.g,streamBandwidth:this.o,decodedFrames:this.j,droppedFrames:this.l,corruptedFrames:this.C,estimatedBandwidth:this.f,loadLatency:this.A,playTime:km(this.a,_.Dm),pauseTime:km(this.a,_.Cm),bufferingTime:km(this.a,_.vm),stateHistory:lm(this.a),switchHistory:mm(this.B)}}};_.zq=class{constructor(a){this.f=a;this.a=void 0}value(){void 0==this.a&&(this.a=this.f());return this.a}};var om=new _.zq(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.Bd],[HTMLMediaElement.HAVE_CURRENT_DATA,_.Ad],[HTMLMediaElement.HAVE_FUTURE_DATA,tc],[HTMLMediaElement.HAVE_ENOUGH_DATA,uc]]));var Bq=class{constructor(a){this.h=new _.R("clpp.StateManager");this.m=a;this.a=new _.vp;this.f=_.Am;this.A=_.Aq;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.l=this.F=!1;this.G=0;this.g=null;this.J=0;this.M=_.Pi();this.C=!1;this.I=Date.now();tm(this)}Qb(a,b){this.m&&this.m.trigger(new _.F(a,{detail:b}))}getState(){return wm(this,"")}U(a){(a=a&&a.detail)&&a.severity&&a.severity===_.G&&rm(this,_.zm)}destroy(){this.h.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.z("clpp.version",_.da);_.z("clpp.name",_.na);_.vj="application/x-mpegurl";_.z("clpp.Type",{DASH:_.$b,HLS:_.vj,SMOOTH_STREAMING:_.ec,MP4:_.ff});_.ng="scte35";_.lg=We;_.z("clpp.TimelineCueType",{SCTE35:_.ng,DASH_CALLBACK:_.Md,UNKNOWN:_.lg});_.z("clpp.utils.media.detectType",Em);var Hm=new _.R("clpp.sources");var Cq=class extends _.gq{constructor(){super(Jc);this.A=this.H=!1;this.l=this.B=this.o=this.a=this.j=null;this.g=new _.vp;this.G=this.F=this.f=this.I=null}init(a,b){super.init(a,b);this.j=new Bq(this);rm(this.j,_.Am)}namespace(){return Jc}unload(){const a=this;return _.x(function*(){if(a.w){a.log.debug(_.fb,a.w);a.F&&(a.F.stop(),a.F=null);const b=a.getTrackManager();b&&b.release();a.B&&(a.B.destroy(),a.B=null);a.K&&(a.K.destroy(),a.K=null);a.l&&a.l.release();a.o&&(a.o.destroy(),a.o=null);_.jg(a.g);
361
+ a.f&&(a.f=new _.yq);a.G=null;a.w=null;a.H=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Jm(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&rm(this.j,_.Am)})}destroy(){if(this.A)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.A=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(va);const a=this.getTrackManager();a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
362
+ b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}detach(){}getTrackManager(){return this.Rb}load(a){const b=this;return _.x(function*(){if(b.A)return Im();if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.C.getMedia();b.I=Date.now()/1E3;b.f=new _.yq;b.g.on(b,_.Ge,()=>{b.f&&_.jm(b.f.a,b.getState())});rm(b.j,_.Bm);b.w=_.Gm(a);_.Ej(a)&&(b.configuration=_.Dj(b.nc,
363
+ a));b.log.debug(_.Ka,b.configuration);b.log.debug(_.Za,b.w);const d=_.im(b.configuration,[_.rd,"native"]);b.K=d.create(b);b.K.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Gj(_.Oe)&&!_.Ri()&&(b.B=new Jp(b),b.B.start(c));b.l?b.l.release():b.l=new wp(b);tg(b.l,c);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.B(b.configuration.volume)||b.setVolume(b.configuration.volume);_.B(b.configuration.muted)||b.setMuted(b.configuration.muted);b.g.one(c,tc,()=>{b.trigger(new _.F(_.bq))});null==
364
+ b.configuration.startTime&&Rm(b,c);try{yield Lm(b,c),yield Nm(b),yield Qm(b).P}catch(e){b.H=!1,b.onError(e)}})}onError(a){this.H||(a.severity===_.G&&null!==this.j&&rm(this.j,_.zm),this.trigger(new _.F(_.ld,{detail:a})))}ef(){return new T}getState(){return null!==this.j?this.j.getState().currentState:_.Aq}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!"),
365
+ null):a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.G=a={start:a.start(0),end:a.end(a.length-1)};if(this.G)return this.G}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.nm();this.f&&_.jm(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.w=a.videoWidth;b.g=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,
366
+ b=Number(c.totalVideoFrames),a.l=Number(c.droppedVideoFrames),a.j=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ia())a.bandwidth&&(this.f.o=a.bandwidth),a.Ac&&(this.f.f=a.Ac);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}};
367
+ _.hg(new class{a(){return Jc}canPlay(a,b){a=a.type||"";const c=a===_.$b,d=a===_.ec,e=a===_.vj;var f;_.Oi()||c||d||e&&!_.Pi()?f=0:f=""!==Ci().canPlayType(a)?e&&_.Pi()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}create(){return new Cq}});_.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 Tm=new _.R("clpp.ads"),Sm=[];_.z("clpp.utils.dom.createHTMLElement",_.$m);var Dq=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=an(this,a)}get(){return this.a}};var Gq=class{constructor(a,b){this.h=new _.R("clpp.PlayerSurface");this.w=_.Gf(Eq,b);this.f=new Dq;this.g=null;this.a=new Dq;this.l=Fq;Fq+=1;this.o=`clpp-video-${this.l}`;this.j=new _.vp;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.h.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.g=a;else{if(!(a instanceof
368
+ HTMLMediaElement))throw new _.H(_.G,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.h.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.f.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.H(_.G,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Yc);a.parentNode?a.parentNode.replaceChild(c,
369
+ a):this.h.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.Ym(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Le);for(d of[_.tf,_.pd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Fi()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),bn(this.a,"clpp-container"),
370
+ bn(this.a,this.o),bn(this.f,_.Dc),bn(this.f,"clpp-video"));b.webOSStartupPatch&&cn(this,a,d)}}getMedia(){return this.f.get()}getContainer(){return this.a.get()}getSafeContainer(){return this.a}getId(){return this.l}getUniqueCssClass(){return this.o}getCastElement(){return this.g}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.Ym(a,Ec):this.h.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(Ec):
371
+ this.h.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.Ym(a,_.Dc);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){_.Ym(a,Ec)}show(a){a.classList.remove(Ec)}release(){this.j.release()}};
372
+ Gq.prototype.removeElementFromContainer=Gq.prototype.removeElementFromContainer;Gq.prototype.addElementToContainer=Gq.prototype.addElementToContainer;Gq.prototype.getCastElement=Gq.prototype.getCastElement;Gq.prototype.getContainer=Gq.prototype.getContainer;Gq.prototype.getMedia=Gq.prototype.getMedia;var Eq={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},Fq=1;var Hq=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.vp;this.g=null;this.f=!0;gn(this)}release(){this.a.release();hn(this);this.m=null}};_.z("clpp.polyfill.installAll",ln);var kn=[];_.z("clpp.polyfill.register",_.mn);var on=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.gh(_.wh(a)));this.a=JSON.parse(_.gh(_.wh(b)));this.j=c}verify(a,b){const c={kty:"RSA",n:a.n,e:a.e},d=this.g+"."+this.f,e=this.j;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.kh(d),n=_.wh(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(mb)}).catch(g)}else b?
373
+ g("Web Crypto API is not supported"):f()})}};var Iq={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},zj="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Fn=class{constructor(a){this.license=a;this.a=null;this.h=new _.R("clpp.utils.LicenseKey")}verify(){return(new Promise((a,b)=>{try{const c=pn(this);a(c)}catch(c){b()}})).then(a=>a.verify(Iq)).catch(a=>{if(a&&a!==mb){{var b=window.location.href;const c=new _.Gg(b);b=c.Va||c.Ga?c:new _.Gg("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Ga))return Promise.resolve()}throw a;})}},An="vod",zn="live";var Q=class extends _.dq{constructor(a,b,c){super();ln();this.h=new _.R("clpp.Player");if(!a)throw new _.H(_.G,7,7102);this.A=new _.vp;this.f=this.N=b||_.Bj();this.l=null;void 0===this.f.license&&(this.f.license=zj,this.h.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.h.error("You provided null or empty string as your license. Please check your license configuration."),new _.H(_.G,7,7101,"No license provided in configuration!");this.g=new Gq(a,c);this.a=this.w=null;
374
+ this.B=new _.Bn;this.j=null;this.J=[];this.K={};this.o=null;this.H=!0;this.I=this.G=!1;this.F=this.lc=null;this.Cd=!1;this.S=new Hq(this);this.M=!1;this.C=d=>{(d=d.detail)&&d.currentState===_.Dm&&(this.off(_.Ge,this.C),Gn(this))};this.on(_.Ge,()=>{this.getState()===_.zm&&this.unload()});this.on(_.Xb,this.R.bind(this));this.on(_.Wb,this.R.bind(this));Hn(this,this.f.license);this.g.getMedia()&&(a=this.g.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.h.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
375
+ void 0===this.f.autoplay&&(this.f.autoplay=!0,this.h.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of Dn)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.h.error("Error while creating player plugin",e)}Jn(this,a);Lj(this)}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,b)}init(){}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.F(_.ld,{detail:a}),this.trigger(a)}Xb(a){a=this.K[a];
376
+ void 0===a&&(a=null);return a}getSurface(){return this.g}getConfiguration(){return _.Hf(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}unload(){return this.a?this.a.unload():Promise.resolve()}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.h.info("Player release already in progress"),this.l;this.h.debug("Releasing player");this.l=Ln(this);return this.l.finally(()=>{this.h.debug("Player released");this.l=null})}destroy(){if(this.G)return this.h.debug("The player is already destroyed. No-op"),
377
+ new Promise(a=>a());this.G=!0;return this.release().then(()=>{this.h.debug(va);this.trigger(new _.F("destroying"));return _.In(this,_.Rd)}).then(()=>{this.a&&this.a.removeDelegate(this);this.Fc.clear();this.S.release();if(this.a)return this.a.destroy()}).then(()=>this.B.destroy()).then(()=>{Oj();this.a=null;this.trigger(new _.F("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.ol(ke),yield _.Rn(b,a),yield _.Sn(b),yield _.Un(b),_.ol(je),performance.measure("player.load",ke,je)}catch(c){if(b.l)throw b.h.info("Load interrupted while a player release is pending"),
378
+ new _.H(_.G,7,7E3);throw c;}})}preload(a){const b=this;return _.x(function*(){yield _.Rn(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.h.warn(ab)}else b.h.warn(Ya)})}use(a){(a=Pj(a))&&a.o(this)}remove(a){return(this.getState()<=_.Am||this.H)&&null!==Jj(a)?(Qj(a),this.I=!0):!1}play(){return this.a?this.j&&this.a.namespace()!==_.Gc?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():
379
+ Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.cq}getState(){return this.a?this.a.getState():_.Am}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()===_.zm?Promise.reject("Cannot seek in current state."):
380
+ this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}rc(){const a=this.a;return a&&a.rc?a.rc():null}getVolume(){return this.a?this.a.getVolume():null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.j}namespace(){return this.a&&this.a.namespace()||"Undefined"}canPlay(a,b){return this.a?
381
+ 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&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.B}setNetworkEngine(a){this.B=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}fd(){return Object.freeze(this.o)}setSourceIndex(a){this.a&&this.a.setSourceIndex(a)}getSourceIndex(){return this.a?
382
+ this.a.getSourceIndex():-1}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.lc=a;Pn(this)}setCdnErrorCallback(a){this.F=a;this.a&&this.a.setCdnErrorCallback(this.F)}R(){this.Cd=!0}};_.z("clpp.Player",Q);Q.registerPlugin=_.En;Q.prototype.setCdnErrorCallback=Q.prototype.setCdnErrorCallback;Q.prototype.setDrmCustomDataModifier=Q.prototype.setDrmCustomDataModifier;
383
+ Q.prototype.resetAbr=Q.prototype.resetAbr;Q.prototype.getTimelineCues=Q.prototype.getTimelineCues;Q.prototype.getLoadedSource=Q.prototype.getLoadedSource;Q.prototype.getSources=Q.prototype.fd;Q.prototype.getStats=Q.prototype.getStats;Q.prototype.isLive=Q.prototype.isLive;Q.prototype.getTextDisplayer=Q.prototype.getTextDisplayer;Q.prototype.setNetworkEngine=Q.prototype.setNetworkEngine;Q.prototype.getNetworkEngine=Q.prototype.getNetworkEngine;Q.prototype.setMuted=Q.prototype.setMuted;
384
+ Q.prototype.isMuted=Q.prototype.isMuted;Q.prototype.setPlaybackRate=Q.prototype.setPlaybackRate;Q.prototype.getPlaybackRate=Q.prototype.getPlaybackRate;Q.prototype.namespace=Q.prototype.namespace;Q.prototype.getAdsManager=Q.prototype.getAdsManager;Q.prototype.getDuration=Q.prototype.getDuration;Q.prototype.setVolume=Q.prototype.setVolume;Q.prototype.getVolume=Q.prototype.getVolume;Q.prototype.getTimelineOffset=Q.prototype.rc;Q.prototype.getSeekRange=Q.prototype.getSeekRange;
385
+ Q.prototype.getPresentationStartTime=Q.prototype.getPresentationStartTime;Q.prototype.seek=Q.prototype.seek;Q.prototype.getPosition=Q.prototype.getPosition;Q.prototype.isPaused=Q.prototype.isPaused;Q.prototype.isEnded=Q.prototype.isEnded;Q.prototype.getState=Q.prototype.getState;Q.prototype.getBufferInfo=Q.prototype.getBufferInfo;Q.prototype.getTrackManager=Q.prototype.getTrackManager;Q.prototype.pause=Q.prototype.pause;Q.prototype.play=Q.prototype.play;Q.prototype.remove=Q.prototype.remove;
386
+ Q.prototype.use=Q.prototype.use;Q.prototype.load=Q.prototype.load;Q.prototype.destroy=Q.prototype.destroy;Q.prototype.release=Q.prototype.release;Q.prototype.getDrmInfo=Q.prototype.getDrmInfo;Q.prototype.getConfiguration=Q.prototype.getConfiguration;Q.prototype.getSurface=Q.prototype.getSurface;Q.prototype.getPlugin=Q.prototype.Xb;Q.prototype.off=Q.prototype.off;Q.prototype.one=Q.prototype.one;Q.prototype.on=Q.prototype.on;_.Am=0;_.Bm=1;_.vm=2;_.Dm=3;_.Cm=4;_.sm=5;_.zm=6;_.Aq=7;
387
+ _.ym={IDLE:_.Am,PREPARING:_.Bm,BUFFERING:_.vm,PLAYING:_.Dm,PAUSED:_.Cm,ENDED:_.sm,ERROR:_.zm,UNSET:_.Aq};Q.State=_.ym;var Dn=[];var Jq=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,Uc:!0,ready:Promise.resolve()}));this.h=new _.R("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.Uc)}get(){const a=this;return _.x(function*(){const b=a.a.find(c=>c.Uc);if(!b)throw Error("No available players in the pool");b.Uc=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.Uc=!0;b.ready=new Promise(c=>{a.unload().catch(d=>{this.h.error("Failed to unload player",
388
+ d)}).then(c)});return b.ready}destroy(){const a=this;return _.x(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};var Kq=class extends _.dq{constructor(a){super();this.w=_.Gf({transition:_.ae},a);this.f=[];this.a=0;const b=Wn(a.anchorId);this.o=new Jq(b);this.g=null;this.j=!1;this.l=new Map;this.A=a.toggleVisible;this.h=new _.R(Kc);this.o.a.forEach(c=>Xn(this,c.player,!1))}Gc(){return this.g}Yf(){return this.g?this.g.player:null}Le(){return this.l.get(this.a+1)||null}Me(){return this.l.get(this.a-1)||null}ag(){return[this.Me(),this.Le()].filter(Boolean)}Fg(a){if(0<this.f.length)throw Error("Cannot re-set items in the playlist");
389
+ this.h.info("Set items",a);this.f=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve()}))}Eg(a){if(0===this.f.length)throw Error(Ra);if(0>a||a>this.f.length-1)throw Error("Index out of bounds");this.a=a}jd(){return this.a<this.f.length-1}Oe(){return 0<this.a}tg(){const a=this;return _.x(function*(){if(a.j)a.h.warn("Cannot play first item while busy");else if(0===a.f.length)a.h.warn(Ra);else{a.j=!0;a.h.info(`First (index: ${a.a})`);var b=a.f[a.a];try{a.h.info(`First loading (index: ${a.a})`),
390
+ yield Zn(a,b),a.h.info(`First playing (index: ${a.a})`)}catch(c){throw a.h.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,co(a)}}})}ug(){const a=this;return _.x(function*(){if(a.j)a.h.warn("Cannot play next item while busy");else if(a.jd()){a.j=!0;a.a+=1;a.h.info(`Next (index: ${a.a})`);var b=a.g;a.w.transition===_.ae&&b.player.pause();ho(a,a.a+-2);a.l.delete(a.a);var c=a.f[a.a];try{a.h.info(`Next loading (index: ${a.a})`),yield eo(a,c),a.h.info(`Next playing (index: ${a.a})`)}catch(d){throw a.h.error(`Next failed (index: ${a.a})`),
391
+ d;}finally{a.j=!1,b&&go(a,b),co(a)}}else a.h.warn("There are no more items in the playlist")})}vg(){const a=this;return _.x(function*(){if(a.j)a.h.warn("Cannot play previous item while busy");else if(a.Oe()){a.j=!0;--a.a;a.h.info(`Previous (index: ${a.a})`);var b=a.g;a.w.transition===_.ae&&b.player.pause();ho(a,a.a+2);a.l.delete(a.a);var c=a.f[a.a];try{a.h.info(`Previous loading (index: ${a.a})`),yield eo(a,c),a.h.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.h.error(`Previous failed (index: ${a.a})`),
392
+ d;}finally{a.j=!1,b&&go(a,b),co(a)}}else a.h.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.x(function*(){a.h.info("Destroy");yield Promise.all([io(a),a.g?go(a,a.g):Promise.resolve()]);yield jo(a)})}};_.z(Kc,Kq);Kq.prototype.destroy=Kq.prototype.destroy;Kq.prototype.playPrev=Kq.prototype.vg;Kq.prototype.playNext=Kq.prototype.ug;Kq.prototype.playFirst=Kq.prototype.tg;Kq.prototype.hasPrev=Kq.prototype.Oe;Kq.prototype.hasNext=Kq.prototype.jd;
393
+ Kq.prototype.setIndex=Kq.prototype.Eg;Kq.prototype.setItems=Kq.prototype.Fg;Kq.prototype.getPreloading=Kq.prototype.ag;Kq.prototype.getPrev=Kq.prototype.Me;Kq.prototype.getNext=Kq.prototype.Le;Kq.prototype.getCurrentPlayer=Kq.prototype.Yf;Kq.prototype.getCurrent=Kq.prototype.Gc;var fo="preload",Yn="main";var U=class{pb(){}qb(){}vb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}ac(){}Ib(){}getMediaUrl(){}sb(){}rb(){}gb(){}Ta(){}getPodIndex(){}Jb(){}Kb(){}ub(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.z("clpp.ads.IAd",U);U.prototype.getWrapperCreativeIds=U.prototype.getWrapperCreativeIds;U.prototype.getWrapperAdSystems=U.prototype.getWrapperAdSystems;U.prototype.getWrapperAdIds=U.prototype.getWrapperAdIds;
394
+ U.prototype.getSequenceLength=U.prototype.ub;U.prototype.getPositionInSequence=U.prototype.Kb;U.prototype.getPodTimeOffset=U.prototype.Jb;U.prototype.getPodIndex=U.prototype.getPodIndex;U.prototype.getPodType=U.prototype.Ta;U.prototype.getMediaBitrate=U.prototype.gb;U.prototype.getMediaHeight=U.prototype.rb;U.prototype.getMediaWidth=U.prototype.sb;U.prototype.getMediaUrl=U.prototype.getMediaUrl;U.prototype.getClickThroughUrl=U.prototype.Ib;U.prototype.isBumper=U.prototype.ac;
369
395
  U.prototype.getSkipTimeOffset=U.prototype.getSkipTimeOffset;U.prototype.getDuration=U.prototype.getDuration;U.prototype.getTitle=U.prototype.getTitle;U.prototype.getAdvertiserName=U.prototype.getAdvertiserName;U.prototype.getAdSystem=U.prototype.getAdSystem;U.prototype.getApiFramework=U.prototype.getApiFramework;U.prototype.getCreativeId=U.prototype.getCreativeId;U.prototype.getId=U.prototype.getId;U.prototype.getTechnology=U.prototype.vb;U.prototype.getAdManagerVersion=U.prototype.qb;
370
- U.prototype.getAdManagerName=U.prototype.pb;var Bp=class{name(){}ea(){}create(){}};_.z("clpp.ads.IAdsManagerFactory",Bp);Bp.prototype.create=Bp.prototype.create;Bp.prototype.isSupported=Bp.prototype.ea;Bp.prototype.name=Bp.prototype.name;var Cp=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.z("clpp.ads.IAdsManager",Cp);Cp.prototype.getPosition=Cp.prototype.getPosition;Cp.prototype.setVolume=Cp.prototype.setVolume;Cp.prototype.getVolume=Cp.prototype.getVolume;Cp.prototype.skip=Cp.prototype.skip;Cp.prototype.pause=Cp.prototype.pause;Cp.prototype.resume=Cp.prototype.resume;var Dp=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.y(function*(){})}};Dp.prototype.dispose=Dp.prototype.dispose;Dp.prototype.getPosition=Dp.prototype.getPosition;Dp.prototype.setVolume=Dp.prototype.setVolume;Dp.prototype.getVolume=Dp.prototype.getVolume;Dp.prototype.skip=Dp.prototype.skip;Dp.prototype.pause=Dp.prototype.pause;Dp.prototype.resume=Dp.prototype.resume;
371
- Dp.prototype.start=Dp.prototype.start;Dp.prototype.load=Dp.prototype.load;var em=class{name(){return"clpp.ads.NopAdsManagerFactory"}ea(){return!0}create(){return new Dp}};em.prototype.create=em.prototype.create;em.prototype.isSupported=em.prototype.ea;em.prototype.name=em.prototype.name;var Ep=class{getCuePoints(){}Kb(){}hb(){}};_.z("clpp.ads.IAdsTimeline",Ep);Ep.prototype.hasPostroll=Ep.prototype.hb;Ep.prototype.hasPreroll=Ep.prototype.Kb;Ep.prototype.getCuePoints=Ep.prototype.getCuePoints;_.Fp=class{g(){}release(){}};var Gp=class{constructor(){this.h=null;this.o=new _.Q("clpp.drm.eme.StandardEmeManager")}j(a){this.h=a}g(a){return this.h?this.h.setMediaKeys(a):Promise.reject(Na)}m(){return this.h&&this.h.mediaKeys}a(a,b){this.o.debug("Requesting media key system access for",a,b.map(c=>Object.assign({},c,{drmInfos:c.drmInfos.map(()=>"_anonymous_")})));return navigator.requestMediaKeySystemAccess(a,b).catch(c=>{c.message&&(c=Error(`${c.message} (keySystem: ${a})`));return Promise.reject(c)})}f(){return cb}};
372
- rk(new class{a(){return cb}ea(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Gp}},1E3);var Ip=class{constructor(){this.size=0;this.a=void 0;this.f=new _.Q("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Hp.value())}get(a){if(this.has(a))return this.a}has(a){const b=Hp.value();return this.a&&Ag(a,b)?!0:!1}entries(){}keys(){}values(){}},Hp=new _.rp(()=>Gg(new Uint8Array([0])));var Jp=class{j(){}g(a){_.Hf("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}m(){return null}a(){_.Hf("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};rk(new class{a(){return"NOP"}ea(){return!0}create(){return new Jp}},-1);var Np=class{constructor(){this.h=this.o=null}j(a){this.o=a}g(a){const b=this.h;b&&b!==a&&en(b,null);return(this.h=a)?en(a,this.o):Promise.resolve()}m(){return this.h}a(a,b){_.Hf("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Mp(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Mp=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.Jc))for(var c of b){a:{a=c;if(a.persistentState===_.de){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
373
- persistentState:_.Kd,distinctiveIdentifier:_.Kd,initDataTypes:a.initDataTypes,sessionTypes:[ue],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),
374
- e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Ke));a=e?b:null}if(a){this.a=a;return}}c=Error(pb);c.name=Ua;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Op(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.Hf("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Op=class{constructor(a){this.g=null;this.h=new WebKitMediaKeys(a);this.f=new _.po;this.j=0;this.a=new _.Q(Dc);this.a.info("Created Media Keys for "+a)}createSession(a){a=
375
- void 0===a?ue:a;this.a.debug("Creating Apple MediaKeys Session");if(a!==ue)throw new TypeError("Session type "+a+ba);return new Pp(this.h,`__session_${this.j++}`)}setServerCertificate(){this.a.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Pp=class extends _.Yo{constructor(a,b){super();this.a=null;this.o=a;this.g=this.h=null;this.j=new _.po;this.sessionId=b;this.expiration=NaN;this.closed=new _.Sk;this.m=!1;this.keyStatuses=new Ip;this.f=new _.Q(Dc)}generateRequest(a,
376
- b){if(this.m)return Promise.reject(fb);this.f.debug("generateRequest");this.h=new _.Sk;try{const c=this.o.createSession(_.Ke,_.K(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Ve,d=>{{const e=this.keyStatuses.getStatus();this.f.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.F(ud,{messageType:void 0===e||e===ne?md:kd,message:Gg(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Te,d=>{this.f.debug("onWebkitKeyAdded_",
377
- d);this.g&&(fn(this,"usable"),this.g.resolve(),this.g=null)});this.j.on(c,Ue,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===ne)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),
378
- 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:fn(this,"output-not-allowed");break;default:fn(this,_.gd)}});fn(this,ne)}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 _.Sk;try{this.a.update(_.K(a))}catch(b){this.g.reject(b)}return this.g}close(){if(this.m)return this.closed;
379
- this.f.info(`Closing Key Session ${this.sessionId}`);this.m=!0;try{this.a.close(),this.closed.resolve(),_.Nf(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.f.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}};rk(new class{a(){return"APPLE"}ea(){return!!window.WebKitMediaKeys}create(){return new Np}},1100);var Rp=class{constructor(){this.o=this.h=null;this.w="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.w="webkit")}j(a){this.h=a}g(a){_.Hf("WebkitEmeManager.setMediaKeys");if(!this.h)return Promise.reject(Na);const b=this.o;b&&b!==a&&jn(b,null);(this.o=a)&&jn(a,this.h);return Promise.resolve()}m(){return this.o}a(a,b){_.Hf("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.h)var c=this.h;else{var d=document.getElementsByTagName(_.w);c=d.length?d[0]:document.createElement(_.w)}const e=
380
- new Qp(this.w,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Qp=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Ld&&(this.a=Se,a=!1);let e=!1;for(const g of d){d=[];var f=[];let h=!1;if(g.audioCapabilities)for(const k of g.audioCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType.split(";")[0],this.a)&&(d.push(k),e=!0));if(g.videoCapabilities)for(const k of g.videoCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType,
381
- this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.Ke,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.de||a||(e=!1);if(e){this.f=g;return}}b=pb;if(c===_.Ld||c===_.Lc)b="None of the requested configurations were supported.";c=Error(b);c.name=Ua;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Sp(this.g,this.a))}getConfiguration(){return this.f}},Sp=class{constructor(a,b){this.g=a;this.m=b;this.a=null;this.f=new _.po;this.h=[];this.j=new Map}createSession(a=
382
- ue){if(a!==ue&&a!==_.Pd)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 Tp(this.g,this.a,this.m,a);this.h.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Tp=class extends _.Yo{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 _.Sk;this.keyStatuses=
383
- new Ip}generateRequest(a,b){_.Hf("WebkitEmeManager.MediaKeySession.generateRequest");return ln(this,b,null)}load(a){_.Hf(tb);return this.j===_.Pd?ln(this,null,a):Promise.reject(Error(Ra))}update(a){_.Hf(tb);const b=new _.Sk;mn(this,b,a);return b}close(){_.Hf("WebkitEmeManager.MediaKeySession.close");if(this.j!==_.Pd){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;const a=kn(this,"cancelKeyRequest");try{this.h[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();
384
- return this.closed}remove(){_.Hf("WebkitEmeManager.MediaKeySession.remove");return this.j!==_.Pd?Promise.reject(Error(Ra)):this.close()}};rk(new class{a(){return"WEBKIT"}ea(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Rp}});var Wp=class extends _.cp{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 _.Q(Cc);_.Sg(this.m)?this.a.warn(_.ub):this.La(_.Lc,{licenseUrl:this.m,videoRobustness:[_.eb,void 0],audioRobustness:[_.db,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Oc.bind(this)}});_.Sg(this.j)?this.a.warn(_.Va):this.La(_.Kc,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Oc.bind(this)}});
385
- _.Sg(this.h)?this.a.warn(_.Aa):_.Sg(this.f)?this.a.warn(_.za):this.La(_.Jc,{licenseUrl:this.h,certificateUrl:this.f,modifiers:{licenseRequest:this.Qe.bind(this),licenseResponse:this.Re.bind(this),certificateRequest:this.Oc.bind(this),extractContentId:this.Ce.bind(this)}})}Oc(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Ce(a,b){a=Nj(b);switch(this.o){case Up:return a;case Vp:return(new _.Oj(a)).a;default:throw Error("Unknown content ID strategy");}}Qe(a,b){b.headers[pa]=
386
- $b;this.Oc(a,b);a={spc:_.Yg(b.body)};b.body=_.Og(_.Fh(a,!0))}Re(a,b){a=_.Ig(b.data).trim();const c="\x3c/ckc\x3e"===a.substr(-6);"\x3cckc\x3e"===a.substr(0,5)&&c&&(a=a.slice(5,-6));b.data=_.$g(a).buffer}};_.z(Cc,Wp);Wp.prototype.onFairPlayLicenseResponse=Wp.prototype.Re;Wp.prototype.onFairPlayLicenseRequest=Wp.prototype.Qe;Wp.prototype.extractFairPlayContentId=Wp.prototype.Ce;Wp.prototype.onLicenseRequest=Wp.prototype.Oc;Wp.prototype.constructor=Wp.prototype.constructor;Wp.NAME=Ea;
387
- var Vp="hostname",Up="full-skd";Wp.FairPlayContentIdStrategy={HOSTNAME:Vp,FULL_SKD:Up};_.z("clpp.drm.HeaderDrmComponent",class extends _.Fp{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,_.Mc);a=new Wp(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Up);_.rj(a)}}release(){}id(){return"headerdrm"}});_.vm(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=_.K(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.vm(function(){_.Hf("mathRound.install")});_.vm(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;bd in document||(Object.defineProperty(document,bd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
388
- {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",nn);document.addEventListener("webkitfullscreenerror",nn);document.addEventListener("mozfullscreenchange",nn);document.addEventListener("mozfullscreenerror",nn);document.addEventListener("MSFullscreenChange",nn);document.addEventListener("MSFullscreenError",nn)}});_.vm(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.Hf("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=pn,document.exitPictureInPicture=qn,document.addEventListener("webkitpresentationmodechanged",on,!0))}});_.vm(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=rn)}});_.vm(function(){if(window.VTTCue)_.Cf("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Cf(qb),window.VTTCue=sn;else if(6===a)_.Cf("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=tn;else{try{var b=!!sn(1,2,"")}catch(c){b=!1}b&&(_.Cf(qb),window.VTTCue=sn)}}else _.If("VTTCue not available.")});var un;_.vm(function(){_.Hf("InputEvent.install");_.fi("Trident/")&&HTMLInputElement.prototype.addEventListener!==vn&&(_.Cf("Patching input event support on IE."),un=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=vn)});_.vm(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.vm(function(){_.Hf("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});var yn=class{constructor(){this.a=wn()}};var Xp=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.Yp=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 Zp;_.$p=class{constructor(){this.a=new Blob([Zp],{type:_.Ke})}canPlay(a){var b=document.createElement(_.w);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.Sk;b=b.play();const d=(new _.ci(()=>{d.stop();c.resolve(a)})).da(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===Ua?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
389
- Zp=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,
396
+ U.prototype.getAdManagerName=U.prototype.pb;var Lq=class{name(){}da(){}create(){}};_.z("clpp.ads.IAdsManagerFactory",Lq);Lq.prototype.create=Lq.prototype.create;Lq.prototype.isSupported=Lq.prototype.da;Lq.prototype.name=Lq.prototype.name;var Mq=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.z("clpp.ads.IAdsManager",Mq);Mq.prototype.getPosition=Mq.prototype.getPosition;Mq.prototype.setVolume=Mq.prototype.setVolume;Mq.prototype.getVolume=Mq.prototype.getVolume;Mq.prototype.skip=Mq.prototype.skip;Mq.prototype.pause=Mq.prototype.pause;Mq.prototype.resume=Mq.prototype.resume;var Nq=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.x(function*(){})}};Nq.prototype.dispose=Nq.prototype.dispose;Nq.prototype.getPosition=Nq.prototype.getPosition;Nq.prototype.setVolume=Nq.prototype.setVolume;Nq.prototype.getVolume=Nq.prototype.getVolume;Nq.prototype.skip=Nq.prototype.skip;Nq.prototype.pause=Nq.prototype.pause;Nq.prototype.resume=Nq.prototype.resume;
397
+ Nq.prototype.start=Nq.prototype.start;Nq.prototype.load=Nq.prototype.load;var Vm=class{name(){return"clpp.ads.NopAdsManagerFactory"}da(){return!0}create(){return new Nq}};Vm.prototype.create=Vm.prototype.create;Vm.prototype.isSupported=Vm.prototype.da;Vm.prototype.name=Vm.prototype.name;var Oq=class{getCuePoints(){}Lb(){}hb(){}};_.z("clpp.ads.IAdsTimeline",Oq);Oq.prototype.hasPostroll=Oq.prototype.hb;Oq.prototype.hasPreroll=Oq.prototype.Lb;Oq.prototype.getCuePoints=Oq.prototype.getCuePoints;_.Pq=class{f(){}a(){}g(){}o(){}};var Qq=class{constructor(){this.j=null;this.h=new _.R("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}g(a){return this.j?this.j.setMediaKeys(a):Promise.reject(Oa)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.h.debug("Requesting media key system access for",a,b.map(c=>Object.assign({},c,{drmInfos:c.drmInfos.map(()=>"_anonymous_")})));return navigator.requestMediaKeySystemAccess(a,b).catch(c=>{c.message&&(c=Error(`${c.message} (keySystem: ${a})`));return Promise.reject(c)})}f(){return hb}};
398
+ Uk(new class{a(){return hb}da(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Qq}},1E3);var Sq=class{constructor(){this.size=0;this.a=void 0;this.h=new _.R("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Rq.value())}get(a){if(this.has(a))return this.a}has(a){const b=Rq.value();return this.a&&Xg(a,b)?!0:!1}entries(){}keys(){}values(){}},Rq=new _.zq(()=>eh(new Uint8Array([0])));var Tq=class{l(){}g(a){_.dg("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.dg("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};Uk(new class{a(){return"NOP"}da(){return!0}create(){return new Tq}},-1);var Vq=class{constructor(){this.j=this.w=null}l(a){this.w=a}g(a){const b=this.j;b&&b!==a&&lo(b,null);return(this.j=a)?lo(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.dg("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Uq(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Uq=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.Pc))for(var c of b){a:{a=c;if(a.persistentState===_.xe){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
399
+ persistentState:_.Yd,distinctiveIdentifier:_.Yd,initDataTypes:a.initDataTypes,sessionTypes:[Pe],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),
400
+ e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.ff));a=e?b:null}if(a){this.a=a;return}}c=Error(wb);c.name=Wa;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Wq(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.dg("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Wq=class{constructor(a){this.f=null;this.g=new WebKitMediaKeys(a);this.a=new _.vp;this.j=0;this.h=new _.R(Ic);this.h.info("Created Media Keys for "+a)}createSession(a){a=
401
+ void 0===a?Pe:a;this.h.debug("Creating Apple MediaKeys Session");if(a!==Pe)throw new TypeError("Session type "+a+ba);return new Xq(this.g,`__session_${this.j++}`)}setServerCertificate(){this.h.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Xq=class extends _.dq{constructor(a,b){super();this.a=null;this.o=a;this.f=this.g=null;this.j=new _.vp;this.sessionId=b;this.expiration=NaN;this.closed=new _.Jl;this.l=!1;this.keyStatuses=new Sq;this.h=new _.R(Ic)}generateRequest(a,
402
+ b){if(this.l)return Promise.reject(kb);this.h.debug("generateRequest");this.g=new _.Jl;try{const c=this.o.createSession(_.ff,_.J(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,rf,d=>{{const e=this.keyStatuses.getStatus();this.h.debug(`Received Key Message in ${this.sessionId}`);this.g&&(this.g.resolve(),this.g=null);d=new _.F(Fd,{messageType:void 0===e||e===He?xd:wd,message:eh(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,pf,d=>{this.h.debug("onWebkitKeyAdded_",
403
+ d);this.f&&(mo(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,qf,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===He)this.h.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.h.error(`Received key error in session ${this.sessionId} `+`with code ${this.a.error.code}. `+`Session Status ${d}.`),d=Error("EME AppleEmeManager key error"),d.errorCode=this.a.error,null!==this.g)this.g.reject(d),
404
+ this.g=null;else if(null!==this.f)this.f.reject(d),this.f=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:mo(this,"output-not-allowed");break;default:mo(this,_.td)}});mo(this,He)}catch(c){this.g.reject(c)}return this.g}load(){this.h.debug("load");return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(kb);this.h.debug(Xe);this.f=new _.Jl;try{this.a.update(_.J(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
405
+ this.h.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.jg(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.h.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}};Uk(new class{a(){return"APPLE"}da(){return!!window.WebKitMediaKeys}create(){return new Vq}},1100);var Zq=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}g(a){_.dg("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(Oa);const b=this.w;b&&b!==a&&po(b,null);(this.w=a)&&po(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.dg("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.j)var c=this.j;else{var d=document.getElementsByTagName(_.w);c=d.length?d[0]:document.createElement(_.w)}const e=
406
+ new Yq(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Yq=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Zd&&(this.a=of,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,
407
+ this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.ff,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.xe||a||(e=!1);if(e){this.f=g;return}}b=wb;if(c===_.Zd||c===_.Sc)b="None of the requested configurations were supported.";c=Error(b);c.name=Wa;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new $q(this.g,this.a))}getConfiguration(){return this.f}},$q=class{constructor(a,b){this.g=a;this.o=b;this.a=null;this.f=new _.vp;this.j=[];this.l=new Map}createSession(a=
408
+ Pe){if(a!==Pe&&a!==_.ce)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ga,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new ar(this.g,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},ar=class extends _.dq{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.g=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.Jl;this.keyStatuses=
409
+ new Sq}ready(){_.dg("WebkitEmeManager.MediaKeySession.ready");oo(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.dg("WebkitEmeManager.MediaKeySession.generateRequest");return ro(this,b,null)}load(a){_.dg(zb);return this.l===_.ce?ro(this,null,a):Promise.reject(Error(Ua))}update(a){_.dg(zb);const b=new _.Jl;so(this,b,a);return b}close(){_.dg("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.ce){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
410
+ this.closed;const a=qo(this,"cancelKeyRequest");try{this.j[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.dg("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.ce?Promise.reject(Error(Ua)):this.close()}};Uk(new class{a(){return"WEBKIT"}da(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Zq}});var dr=class extends _.iq{constructor(a,b,c,d,e){super(Fa);this.l=a;this.j=b;this.g=c;this.a=d;this.o=e;this.h=new _.R(Hc);_.qh(this.l)?this.h.warn(_.Ab):this.La(_.Sc,{licenseUrl:this.l,videoRobustness:[_.jb,void 0],audioRobustness:[_.ib,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Oc.bind(this)}});_.qh(this.j)?this.h.warn(_.Xa):this.La(_.Qc,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Oc.bind(this)}});
411
+ _.qh(this.g)?this.h.warn(_.Aa):_.qh(this.a)?this.h.warn(_.za):this.La(_.Pc,{licenseUrl:this.g,certificateUrl:this.a,modifiers:{licenseRequest:this.We.bind(this),licenseResponse:this.Xe.bind(this),certificateRequest:this.Oc.bind(this),extractContentId:this.Ge.bind(this)}})}Oc(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Ge(a,b){a=qk(b);switch(this.o){case br:return a;case cr:return(new _.rk(a)).a;default:throw Error("Unknown content ID strategy");}}We(a,b){b.headers[pa]=
412
+ fc;this.Oc(a,b);a={spc:_.uh(b.body)};b.body=_.mh(_.bi(a,!0))}Xe(a,b){a=_.gh(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=_.wh(a).buffer}};_.z(Hc,dr);dr.prototype.onFairPlayLicenseResponse=dr.prototype.Xe;dr.prototype.onFairPlayLicenseRequest=dr.prototype.We;dr.prototype.extractFairPlayContentId=dr.prototype.Ge;dr.prototype.onLicenseRequest=dr.prototype.Oc;dr.prototype.constructor=dr.prototype.constructor;dr.NAME=Fa;
413
+ var cr="hostname",br="full-skd";dr.FairPlayContentIdStrategy={HOSTNAME:cr,FULL_SKD:br};_.z("clpp.drm.HeaderDrmComponent",class extends _.Pq{g(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Fa){a=a.drm.customData;if(!a)throw new _.H(_.G,7,7100,_.Tc);a=new dr(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||br);_.Vj(a)}}a(){delete _.Uj.HeaderDrm}id(){return"headerdrm"}});_.mn(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.J(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.mn(function(){_.dg("mathRound.install")});_.mn(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;md in document||(Object.defineProperty(document,md,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
414
+ {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",to);document.addEventListener("webkitfullscreenerror",to);document.addEventListener("mozfullscreenchange",to);document.addEventListener("mozfullscreenerror",to);document.addEventListener("MSFullscreenChange",to);document.addEventListener("MSFullscreenError",to)}});_.mn(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.dg("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=vo,document.exitPictureInPicture=wo,document.addEventListener("webkitpresentationmodechanged",uo,!0))}});_.mn(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=xo)}});_.mn(function(){if(window.VTTCue)_.cg("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.cg(xb),window.VTTCue=yo;else if(6===a)_.cg("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=zo;else{try{var b=!!yo(1,2,"")}catch(c){b=!1}b&&(_.cg(xb),window.VTTCue=yo)}}else _.eg("VTTCue not available.")});var Ao;_.mn(function(){_.dg("InputEvent.install");_.Ei("Trident/")&&HTMLInputElement.prototype.addEventListener!==Bo&&(_.cg("Patching input event support on IE."),Ao=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Bo)});_.mn(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.mn(function(){_.dg("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 Eo=class{constructor(){this.a=Co()}};var er=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.fr=class{constructor(a,b,c){this.f=a;this.j=b;this.g=c||this.f.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.f.isFullscreen())});this.a.observe(this.g)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var gr;_.hr=class{constructor(){this.a=new Blob([gr],{type:_.ff})}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 _.Jl;b=b.play();const d=(new _.zi(()=>{d.stop();c.resolve(a)})).ca(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===Wa?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
415
+ gr=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,
390
416
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
391
417
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
392
418
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
393
419
  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,
394
420
  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,
395
- 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]);_.aq=new _.Q("clpp.media.TimestampParser");_.Dn={};_.Fn={};var $n=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new yn}};var Jn=window.XMLHttpRequest;var Zn=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.h=new Xp(a);this.length=a;this.w=b;this.f=this.a=this.g=0;this.j=null;this.m=-1;this.o=new yn}};var Po=class extends _.Zl{constructor(a){super(new _.Sk,()=>Promise.resolve());this.A=a;this.g=null;this.o=this.P;this.f=-1;this.h=this.j=this.m=null;Tn(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 Yn=window.fetch,Vn=window.AbortController,Un=window.Headers;_.co={};_.cq=class{constructor(a){a=a.getConfiguration();a=_.lf(a.textStyle||a.textstyle||{});this.J=typeof a.backgroundColor===_.pe?a.backgroundColor:null;this.T=typeof a.windowColor===_.pe?a.windowColor:null;this.N=typeof a.fontColor===_.pe?a.fontColor:null;this.R=typeof a.fontFamily===_.pe?a.fontFamily:null;this.H=typeof a.fontSize===_.pe?a.fontSize:null;this.B=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.G=typeof a.edgeColor===_.pe?a.edgeColor:"rgba(0, 0, 0, 1)";this.o=null;typeof a.edgeType===
396
- _.pe&&(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?bq:this.B}setFontSizePercent(a){this.B=a;this.g()}getEdgeColor(){return this.G}setEdgeColor(a){this.G=
397
- a;this.g()}getEdgeType(){return this.o}setEdgeType(a){this.o=a;this.g()}};_.cq.prototype.setEdgeType=_.cq.prototype.setEdgeType;_.cq.prototype.getEdgeType=_.cq.prototype.getEdgeType;_.cq.prototype.setEdgeColor=_.cq.prototype.setEdgeColor;_.cq.prototype.getEdgeColor=_.cq.prototype.getEdgeColor;_.cq.prototype.setFontSizePercent=_.cq.prototype.setFontSizePercent;_.cq.prototype.getFontSizePercent=_.cq.prototype.getFontSizePercent;_.cq.prototype.setFontSize=_.cq.prototype.setFontSize;
398
- _.cq.prototype.getFontSize=_.cq.prototype.getFontSize;_.cq.prototype.setFontColor=_.cq.prototype.setFontColor;_.cq.prototype.getFontColor=_.cq.prototype.getFontColor;_.cq.prototype.setFontFamily=_.cq.prototype.setFontFamily;_.cq.prototype.getFontFamily=_.cq.prototype.getFontFamily;_.cq.prototype.setWindowColor=_.cq.prototype.setWindowColor;_.cq.prototype.getWindowColor=_.cq.prototype.getWindowColor;_.cq.prototype.setBackgroundColor=_.cq.prototype.setBackgroundColor;
399
- _.cq.prototype.getBackgroundColor=_.cq.prototype.getBackgroundColor;var bq=1/15;var fo="raised",go="depressed",io="dropshadow",ho="uniform";_.z("clpp.text.EdgeType",{NONE:_.Cd,RAISED:fo,DEPRESSED:go,DROP_SHADOW:io,UNIFORM:ho});_.co[Vb]=class{constructor(a){this.g=a;this.a=null;this.f=new _.Q("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.co[_.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=_.co[_.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=
400
- 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 dq;
401
- _.eq=class extends _.cq{constructor(a){super(a);this.m=a.getSurface().getMedia();this.f=`clpp-video-${dq++}`;this.h=document.createElement(_.re);this.j=this.w=!1;_.hm(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":_.jo(this)},b=
402
- 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()}};dq=0;_.rl("native",new class{ea(){return!0}create(a){return new _.eq(a)}});_.fq=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;
421
+ 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]);_.ir=new _.R("clpp.media.TimestampParser");_.Jo={};_.Lo={};var gp=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new Eo}};var Po=window.XMLHttpRequest;var fp=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new er(a);this.length=a;this.A=b;this.f=this.a=this.g=0;this.l=null;this.o=-1;this.w=new Eo}};var Vp=class extends _.Pm{constructor(a){super(new _.Jl,()=>Promise.resolve());this.B=a;this.g=null;this.w=this.P;this.f=-1;this.j=this.l=this.o=null;Zo(this)}then(a,b){this.P=this.P.then(a,b);return this}catch(a){this.P=this.P.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.g.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};_.mr=class{constructor(a){this.a=!1;this.g=a;this.j=this.l.bind(this);this.g.zc(this.j);this.f=null}enabled(){return this.a}Ke(){return this.a&&this.f&&this.f.has(jr)?1E3*this.f.get(jr):null}release(){this.f=null;this.a=!1;this.g.qd(this.j)}l(a){if(this.a){var b=a.headers["cmsd-dynamic"];if(b){try{const d=new Map,e=b.split(";");for(b=0;b<e.length;b++){const {key:f,value:g}=$o(e[b]);Object.values(kr).includes(f)&&d.set(f,g)}var c=d}catch(d){lr.error("CmsdManager parseCmsdDynamicHeader_ failed:",d),
422
+ c=null}this.f=c}}return a}};_.mr.prototype.getEstimatedThroughput=_.mr.prototype.Ke;var jr="etp",kr={Sg:jr},lr=new _.R("clpp.net.CmsdManager");var ep=window.fetch,bp=window.AbortController,ap=window.Headers;_.jp={};_.or=class{constructor(a){a=a.getConfiguration();a=_.Hf(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Je?a.backgroundColor:null;this.S=typeof a.windowColor===_.Je?a.windowColor:null;this.N=typeof a.fontColor===_.Je?a.fontColor:null;this.R=typeof a.fontFamily===_.Je?a.fontFamily:null;this.I=typeof a.fontSize===_.Je?a.fontSize:null;this.C=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Je?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
423
+ _.Je&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=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.I}setFontSize(a){this.I=a;this.g()}getFontSizePercent(){return null===this.C?nr:this.C}setFontSizePercent(a){this.C=a;this.g()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
424
+ a;this.g()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.g()}};_.or.prototype.setEdgeType=_.or.prototype.setEdgeType;_.or.prototype.getEdgeType=_.or.prototype.getEdgeType;_.or.prototype.setEdgeColor=_.or.prototype.setEdgeColor;_.or.prototype.getEdgeColor=_.or.prototype.getEdgeColor;_.or.prototype.setFontSizePercent=_.or.prototype.setFontSizePercent;_.or.prototype.getFontSizePercent=_.or.prototype.getFontSizePercent;_.or.prototype.setFontSize=_.or.prototype.setFontSize;
425
+ _.or.prototype.getFontSize=_.or.prototype.getFontSize;_.or.prototype.setFontColor=_.or.prototype.setFontColor;_.or.prototype.getFontColor=_.or.prototype.getFontColor;_.or.prototype.setFontFamily=_.or.prototype.setFontFamily;_.or.prototype.getFontFamily=_.or.prototype.getFontFamily;_.or.prototype.setWindowColor=_.or.prototype.setWindowColor;_.or.prototype.getWindowColor=_.or.prototype.getWindowColor;_.or.prototype.setBackgroundColor=_.or.prototype.setBackgroundColor;
426
+ _.or.prototype.getBackgroundColor=_.or.prototype.getBackgroundColor;var nr=1/15;var lp="raised",mp="depressed",op="dropshadow",np="uniform";_.z("clpp.text.EdgeType",{NONE:_.Nd,RAISED:lp,DEPRESSED:mp,DROP_SHADOW:op,UNIFORM:np});_.jp[ac]=class{constructor(a){this.f=a;this.a=null;this.h=new _.R("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.jp[_.bc]||null;c?(b=new c(this.f),b.parseInit(a)):this.h.warn("The clpp.ttml.Mp4TtmlParser class is not available. Please register the ttml component first.")}catch(c){b=null}if(b)this.a=b;else{try{const c=_.jp[_.cc]||null;c?(b=new c(this.f),b.parseInit(a)):this.h.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=
427
+ 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 pr;
428
+ _.qr=class extends _.or{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${pr++}`;this.j=document.createElement(_.Le);this.l=this.A=!1;_.Ym(this.o,this.f);document.head.appendChild(this.j);this.g()}append(){}remove(){return!0}isTextVisible(){return this.A}setTextVisibility(a){this.A=a}g(){if(!this.l){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.pp(this)},b=
429
+ Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.j.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.o.classList.remove(this.f);document.head.removeChild(this.j);this.l=!0;return Promise.resolve()}};pr=0;_.hm("native",new class{da(){return!0}create(a){return new _.qr(a)}});_.rr=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;