@castlabs/prestoplay 6.9.0 → 6.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +39 -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 +105 -104
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +420 -417
  8. package/cjs/cl.crypto.js +10 -9
  9. package/cjs/cl.dash.js +71 -71
  10. package/cjs/cl.externs.js +11 -12
  11. package/cjs/cl.freewheel.js +21 -21
  12. package/cjs/cl.hls.js +72 -71
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -31
  15. package/cjs/cl.ima.js +22 -22
  16. package/cjs/cl.mse.js +273 -272
  17. package/cjs/cl.muxdata.js +14 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +13 -13
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.smooth.js +71 -71
  22. package/cjs/cl.thumbnails.js +24 -24
  23. package/cjs/cl.tizen.js +68 -68
  24. package/cjs/cl.ttml.js +27 -27
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +13 -13
  27. package/cjs/cl.vr.js +19 -19
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.youbora.js +16 -16
  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 +87 -87
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +363 -359
  36. package/cl.crypto.js +9 -9
  37. package/cl.dash.js +67 -67
  38. package/cl.externs.js +11 -12
  39. package/cl.freewheel.js +17 -17
  40. package/cl.hls.js +61 -61
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +26 -25
  43. package/cl.ima.js +17 -17
  44. package/cl.mse.js +235 -236
  45. package/cl.muxdata.js +12 -12
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +9 -9
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +59 -58
  50. package/cl.thumbnails.js +17 -17
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +22 -22
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +14 -14
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +13 -13
  58. package/package.json +1 -1
  59. package/typings.d.ts +47 -2
package/cl.core.js CHANGED
@@ -1,255 +1,253 @@
1
- let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,na,oa,qa,ra,ta,ua,wa,Ca,Da,Ea,Fa,Ga,Ma,Oa,Pa,Qa,Ra,Sa,Ta,bb,eb,fb,gb,jb,lb,ob,pb,rb,tb,Tb,Yb,mc,nc,tc,uc,vc,xc,zc,Ac,Bc,Cc,Kc,Qc,Tc,Uc,Vc,Zc,ed,hd,kd,pd,sd,Hd,Od,Yd,$d,he,ke,re,ye,Ne,Re,Se,Te,Ue,Ve,Xe,Ye,Ze,$e,af,bf,ef,ff,lf,hf,sf,tf,xf,zf,Lf,Vf,Wf,Pf,Sf,Xf,Zf,ag,dg,eg,ig,kg,mg,jg,gg,og,ug,wg,vg,xg,yg,zg,Cg,Dg,hh,lh,mh,nh,oh,ph,rh,sh,vh,yh,Bh,Ch,Dh,Hh,Jh,Eh,Gh,Ih,Kh,Lh,Mh,Oh,Ph,Vh,Zh,di,fi,ci,pi,ii,hi,Ci,Di,Fi,Gi,Hi,Ii,Ji,Ki,Mi,Li,Ni,Oi,Ri,Si,Ti,Ei,Vi,Xi,Zi,aj,hj,ij,jj,kj,qj,
2
- rj,zj,Cj,Ij,Mj,Oj,Vj,ek,Rj,Zj,jk,lk,mk,sk,vk,wk,xk,yk,tk,zk,Ak,Bk,Ck,Dk,Ek,Nk,Sk,Uk,Wk,Vk,Yk,Qk,fl,bl,el,dl,Tk,gl,hl,il,ol,pl,ql,tl,xl,yl,Al,vl,ul,Il,Jl,Nl,Ml,Pl,Rl,Sl,Ol,Ul,Vl,$l,em,fm,gm,km,lm,jm,mm,im,hm,om,qm,sm,tm,um,vm,wm,xm,ym,zm,Am,Bm,Fm,Jm,Km,Mm,Om,Rm,Sm,Tm,Wm,Ym,Zm,$m,cn,an,bn,dn,en,fn,gn,hn,jn,kn,ln,mn,nn,pn,qn,rn,tn,vn,An,Bn,Cn,En,Fn,Gn,In,Jn,Hn,Kn,Nn,Mn,Ln,Rn,Qn,Wn,cf,df;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";
3
- _.da="6.9.0";_.ea="AdaptationSet";_.fa="Already destroyed. No-op";_.ha="Already released. No-op";_.ia="Autoplay is not allowed due to browser policy.";_.ja="BANDWIDTH";_.ka="CODECS";_.la="Cannot retrieve buffer information due to platform limitations";_.ma="CastlabsPlayer";na="Content-Length";oa="Content-Type";_.pa="Could not find configured DRM environment.";qa="DRM licenses loaded";ra="DRMtoday";ta="DRMtodayOnboard";ua="Destroying player";_.va="Disable track type ";wa="Error while decoding string!";
4
- _.xa="Error while fetching license!";_.za="FairPlay Certificate URL is not defined";_.Aa="FairPlay License URL is not defined";_.Ba="GROUP-ID";Ca="HW_SECURE_CRYPTO";Da="HW_SECURE_DECODE";Ea="HeaderDrm";Fa="InvalidStateError";Ga="License verification failed: ";_.Ia="Loading player with configuration";_.Ka="MaxHeight";_.La="MaxWidth";Ma="Missing media element";Oa="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Pa="No event provided!";Qa="No track data attached to the event, unable to add track!";
5
- Ra="Not a persistent session.";Sa="NotAllowedError";Ta="NotSupportedError";_.Ua="PlayReady License URL is not defined";_.Va="Player sources";_.Wa="Please make sure ";_.Xa="QualityLevel";_.Ya="RESOLUTION";_.Za="Releasing player with source";_.$a="Representation";bb="STANDARD";_.cb="SW_SECURE_CRYPTO";_.db="SW_SECURE_DECODE";eb="Session is closed";fb="Signature Verification failed";gb="Skipping Session creation. License for init data was already requested in ";_.ib="SmoothStreamingMedia";jb="The index is not in the allowed range.";
6
- _.kb="URI";lb="Unable to translate ";_.mb="Unhandled/ignored event";_.nb="Unregistering listeners";ob="Unsupported keySystem";pb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.qb="VIDEO";rb="WebkitEmeManager.MediaKeySession.load";_.sb="Widevine License URL is not defined";tb="Will create EME Manager: ";_.ub="ad-break-started";_.vb="ad-break-stopped";_.wb="ad-buffering";_.xb="ad-clicked";_.yb="ad-completed";_.zb="ad-first-quartile";_.Ab="ad-impression";_.Bb="ad-loaded";_.Cb="ad-midpoint";
7
- _.Db="ad-paused";_.Eb="ad-progress";_.Fb="ad-resumed";_.Gb="ad-skipped";_.Hb="ad-started";_.Ib="ad-stopped";_.Jb="ad-third-quartile";_.Kb="addtrack";_.Lb="ads-timeline-changed";_.Mb="airplay-casting-ended";_.Ob="airplay-casting-started";_.Qb="airplay-status-changed";_.Rb="application/cea-608";_.Sb="application/dash+xml";Tb="application/mp4";_.Ub='application/mp4; codecs\x3d"stpp"';_.Vb='application/mp4; codecs\x3d"wvtt"';_.Wb="application/ttml+xml";_.Xb="application/vnd.ms-sstr+xml";Yb="application/x-www-form-urlencoded";
8
- _.p="audio";_.Zb="audio/aac";_.$b="audio/ac3";_.ac="audio/eac3";_.bc="audio/mp4";_.cc="audiobufferchanged";_.dc="autoplaynotallowed";_.ec="bitratechanged";_.fc="boolean";_.hc="bufferingended";_.ic="bufferingstarted";mc="canplay";nc="canplaythrough";_.oc="castingstarted";_.pc="caststatuschanged";_.qc="cdn-switch-success";_.rc="cenc";_.sc="center";tc="certificate-request";uc="change";vc="chrome";_.wc="clpp-fill";xc="clpp-hidden";_.yc="clpp.cast.CastSender";zc="clpp.drm.HeaderDrm";Ac="clpp.drm.eme.AppleEmeManager";
9
- Bc="clpp.native.Player";Cc="clpp.utils.Platform";_.Dc="codecs";_.Ec="column-reverse";_.Fc="com.adobe.primetime";_.Gc="com.apple.fps";_.Hc="com.microsoft.playready";_.Ic="com.widevine.alpha";_.Jc="config.drm.customData is not defined";Kc="controls";_.Lc="cuechange";_.Mc="destroy()";_.Nc="disabled";_.Oc="div";_.Pc="drmexpirationupdate";Qc="drmrenewalstarted";_.Rc="drmsessionpersisted";_.Sc="drmsessionupdate";Tc="drmtoday";Uc="durationchange";Vc="encrypted";_.Wc="end";_.Xc="ended";_.Yc="error";Zc="fullscreenElement";
10
- _.$c="function";_.ad="height";_.bd="hidden";_.cd="image";_.dd="internal-error";ed="keystatuseschange";_.fd="left";hd="license-renewal";kd="license-request";_.ld="line-left";_.md="line-right";_.nd="loadeddata";_.od="loadedmetadata";pd="loadstart";_.qd="mdat";_.rd="mdia";sd="message";_.td="metadata";_.ud="mimeType";_.vd="minf";_.wd="moov";_.xd="mp4";_.yd="mpd-type-changed";_.zd="mpeg-dash-callback-event";_.Ad="none";_.r="number";_.Bd="object";_.Cd="onBitrateChanged()";_.Dd="onPlayerError()";_.Ed="onPlayerWillDestroy";
11
- _.Fd="onPlayerWillRelease";_.Gd="onStateChanged()";Hd="online-status-changed";_.Id="optional";_.Jd="org.w3.clearkey";_.Kd="output-restricted";_.Ld="pause";_.Md="persistent";_.Nd="persistent-license";Od="picture-in-picture";_.Rd="play";_.Sd="playing";_.Td="playlist-item-changed";_.Ud="playlist-modified";_.Vd="progress";_.Wd="px";_.Xd="ratechange";Yd="released";_.Zd="releasing";$d="removetrack";_.ae="required";_.be="resize";_.ce="right";_.de="seeked";_.ee="seeking";_.fe="showing";_.ge="sinf";he="stalled";
12
- _.ie="start";_.je="statechanged";ke="status-pending";_.le="stbl";_.me="string";_.ne="stsd";_.oe="style";_.pe="subtitles-htmlcue";_.qe="subtitles-ttml";re="temporary";_.v="text";_.se="text/vtt";_.te="text/xml";_.ue="timeupdate";_.ve="trak";_.we="ttml-xml";_.xe="und";ye="unknown";_.ze="urn:scte:scte35";_.Ae="urn:scte:scte35:2014";_.Be="user-seeked";_.Ce="user-seeking";_.De="value";_.Ee="vertical-lr";_.Fe="vertical-rl";_.w="video";_.He="video/mp2t";_.Je="video/mp4";_.Ke="videobufferchanged";_.Le="videotrackchanged";
13
- _.Me="vimond-response";Ne="visibilitychange";_.Oe="vtt-xml";_.Pe="waiting";_.Qe="waitingforkey";Re="webkit-org.w3.clearkey";Se="webkitkeyadded";Te="webkitkeyerror";Ue="webkitkeymessage";Ve="webkitneedkey";_.We="width";Xe="x-dt-csl-tracking-token";Ye="x-dt-follow-up-token";Ze="x-dt-resp-code";af=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};bf=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:af(a)}};
14
- ef=function(a,b){if(b){var c=cf;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&df(c,a,{configurable:!0,writable:!0,value:b})}};ff=function(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})};_.y=function(a){return ff(a())};
15
- _.z=function(a,b){a=a.split(".");var c=gf;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};_.kf=function(a){return _.C(a)||hf(a)?a:_.jf(a)};_.jf=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=lf(b,{merging:a[c]},1));return b.merging||null};
16
- lf=function(a,b,c){const d=c+1;if(_.C(a)||!_.mf(a))a={};for(const e in b)c=b[e],hf(c)||_.C(c)||_.nf(c)||c instanceof Element?a[e]=c:_.mf(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.nf(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=lf([],c,d):!_.C(c)&&_.of(c)&&20>d&&(a[e]=lf(a[e],c,d));return a};hf=function(a){a=typeof a;return a===_.me||a===_.r||a===_.fc};_.C=function(a){return null===a||"undefined"===typeof a};_.mf=function(a){return typeof a===_.Bd};
17
- _.nf=function(a){return typeof a===_.$c};_.pf=function(a){return typeof a===_.me};_.qf=function(a){return typeof a===_.r};_.of=function(a){if(_.C(a)||!_.mf(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
18
- _.rf=function(a,b,c,d){if(a===b||null===a&&null===b||void 0===a&&void 0===b)return!0;if(null===a&&null!==b||null!==a&&null===b||void 0!==a&&void 0===b||void 0===a&&void 0!==b||!_.mf(a)||!_.mf(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.C(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.C(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.C(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
19
- sf=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};tf=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.uf=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};xf=function(a){return a&&0<=vf[a]?vf[a]:wf};zf=function(a){if(!a)return _.D("clpp.log",lb+a+ca),-1;const b=yf[a.toUpperCase()];return void 0===b?(_.D("clpp.log",lb+a+ca),-1):b};_.Bf=function(a){Af.info.apply(Af,arguments)};_.Gf=function(a){Af.debug.apply(Af,arguments)};
20
- _.D=function(a){Af.warn.apply(Af,arguments)};_.Hf=function(a){Af.error.apply(Af,arguments)};_.Kf=function(a){if(a){var b=a.a();b in _.If?_.Jf.warn("Player-Factory '"+b+"' already registered"):(_.If[b]=a,_.Jf.info("Registered Player-Factory: '"+b+"'"))}};_.Mf=function(a){var b=a.a;var c=[];for(const d in b.a)c.push.apply(c,b.a[d]);b=c;for(c=0;c<b.length;++c)Lf(b[c]);a.a.clear()};_.Nf=function(a,b,c,d){const e=f=>{for(const g of c)a.off(b,g,e);d(f)};for(const f of c)a.on(b,f,e)};
21
- Lf=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
22
- Vf=function(a,b){a.o.debug("onMetadata_()");b.mode=_.bd;const c=[];let d=!0;const e=f=>{for(var g of c)if(f.startTime===g.startTime&&f.endTime===g.endTime)return g;g={schemeIdUri:"",value:"",startTime:0,endTime:0,id:"",type:_.Of,eventElement:null};a.m&&d&&"SCTE35-IN"===f.value.key&&0<f.startTime?(g.startTime=0,g.endTime=f.startTime):(g.startTime=f.startTime,g.endTime=f.endTime);d=!1;c.push(g);return c[c.length-1]};if(b.cues){for(const f of b.cues){if(Pf(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
23
- _.Ae;g.type=_.Qf;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.l.trigger(new _.F(_.Rf,{detail:f}));Array.prototype.push.apply(a.g,c);Sf(a,c,b);a.f.off(b,_.Lc);a.f.on(b,_.Lc,f=>{f=f.target.activeCues;f=f.length?Pf(a,f[0]):a.a;var g;if(g=f){{g=f;const h=a.l.getPosition();g=g.startTime<=h&&h<g.endTime}}if(g)a.a=f,a.l.trigger(new _.F(_.Tf,{detail:f}));else{if(f=a.a)f=a.a,g=a.l.getPosition(),f=f.endTime<=g;f&&(f=a.a,a.a=null,a.l.trigger(new _.F(_.Uf,{detail:f})))}})}};
24
- Wf=function(a,b){a.h=b;a.j=a.h.textTracks;a.f.on(a.j,_.Kb,c=>{c=c.track;c.kind===_.td&&Vf(a,c)})};Pf=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};Sf=function(a,b,c){if(a.m){for(;0<c.cues.length;)c.removeCue(c.cues[0]);b.forEach(function(d){c.addCue(new DataCue(d.startTime,d.endTime,{key:"SCTE35-OUT",data:null}))})}};
25
- Xf=function(a,b){b=b.track;b.kind!==_.td&&(b.mode===_.fe&&(b.mode=_.bd),a.a.on(b,_.Lc,c=>{c=c.target||c.srcElement;c.mode=_.bd;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.j.append(c,[]))}))};_.Yf=function(a){return Array.isArray(a)?a:[a]};Zf=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};_.$f=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};
26
- ag=function(a,b){const c=b||Zf;let d=null,e=null,f=!1;return function(...g){if(f&&c(g,d))return e;f=!0;d=g;return e=a(...g)}};_.bg=function(a){return null!=a};_.cg=function(a){var b;a instanceof _.cg?(dg(this,a.Ua),this.ec=a.ec,this.Ma=a.Ma,eg(this,a.xc),this.ya=a.ya,_.fg(this,gg(a.a)),this.Vb=a.Vb):a&&(b=String(a).match(hg))?(dg(this,b[1]||"",!0),this.ec=ig(b[2]||""),this.Ma=ig(b[3]||"",!0),eg(this,b[4]),this.ya=ig(b[5]||"",!0),_.fg(this,b[6]||"",!0),this.Vb=ig(b[7]||"")):this.a=new jg(null)};
27
- dg=function(a,b,c){a.Ua=c?ig(b,!0):b;a.Ua&&(a.Ua=a.Ua.replace(/:$/,""))};eg=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.xc=b}else a.xc=null};_.fg=function(a,b,c){b instanceof jg?a.a=b:(c||(b=kg(b,lg)),a.a=new jg(b))};ig=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};kg=function(a,b,c){return typeof a===_.me?(a=encodeURI(a).replace(b,mg),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};
28
- mg=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};jg=function(a){this.f=a||null};_.ng=function(a){if(!a.a&&(a.a={},a.g=0,a.f))for(var b=a.f.split("\x26"),c=0;c<b.length;c++){var d=b[c].indexOf("\x3d"),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}};
29
- gg=function(a){var b=new jg;b.f=a.f;if(a.a){var c={},d;for(d in a.a)c[d]=a.a[d].concat();b.a=c;b.g=a.g}return b};og=function(a,b,c,d){a=`${a===_.G?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.pf(d))a+=": "+d;else if(null!=d&&void 0!=d)if(null!=d.message&&void 0!=d.message)a+=": "+d.message,delete d.message;else try{a+=": "+JSON.stringify(d)}catch(e){}return a};
30
- _.pg=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.H(_.G,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};_.rg=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=qg.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.sg=function(a,b){a=_.rg(a);b=_.rg(b);return a.split("-")[0]==b.split("-")[0]};_.tg=function(a,b){for(const c of a)if(!b(c))return!1;return!0};ug=function*(a){for(let b=0;b<a;b++)yield b};
31
- wg=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(vg(a)==vg(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;const c=_.I(a);b=_.I(b);for(const d of ug(a.byteLength))if(c[d]!=b[d])return!1;return!0};vg=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.I=function(a,b=0,c=Infinity){return xg(a,b,c,Uint8Array)};
32
- xg=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=vg(a),g=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b*e,g));c=Math.min(a+Math.max(c*e,0),g);a/=e;return new d(f,a,c/e-a)};yg=function(a,b=0,c=Infinity){return xg(a,b,c,Uint16Array)};zg=function(a,b=0,c=Infinity){return xg(a,b,c,Uint32Array)};_.Ag=function(a,b=0,c=Infinity){return xg(a,b,c,Int32Array)};_.Bg=function(a,b=0,c=Infinity){return xg(a,b,c,DataView)};
33
- Cg=function(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};Dg=function(a){let b="";for(let c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};
34
- _.Eg=function(a){if(!a)return"";a=_.I(a);239===a[0]&&187===a[1]&&191===a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(wa);return a}a=escape(Dg(a));try{return decodeURIComponent(a)}catch(b){throw Error(wa);}};
35
- _.Gg=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Fg.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.I(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(_.I(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return Dg(c)};
36
- _.Hg=function(a,b){if(_.pf(a))return a;let c="";b=!!b;const d=_.I(a);239==d[0]&&187==d[1]&&191==d[2]?c=_.Eg(d):254==d[0]&&255==d[1]?c=_.Gg(d.subarray(2),!1):255==d[0]&&254==d[1]&&(c=_.Gg(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Fg.debug("Unable to find byte-order-mark, making an educated guess.");0==d[0]&&0==d[2]?c=_.Gg(a,!1):0==d[1]&&0==d[3]?c=_.Gg(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Eg(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
37
- };_.Ig=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.Jg=function(a,b){const c=new Uint8Array(2*a.length),d=new DataView(c.buffer);for(let e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
38
- _.Kg=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=zg(d):2===c?e=yg(d):e=_.I(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Lg=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Mg=function(a,b){if(String.prototype.endsWith)return a.endsWith(b);const c=a.length-b.length;a=a.lastIndexOf(b,c);return-1!==a&&a===c};_.Ng=function(a){return!!(a&&0<a.length)};_.Og=function(a){return!a||0===a.length};
39
- _.Pg=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(sf(b))return"";a="bps";1E3<=Math.abs(b)&&(a="Kbps",b/=1E3);1E3<=Math.abs(b)&&(a="Mbps",b/=1E3);return`${b.toFixed(2).replace(/[.,]00$/,"")}${a}`}catch(b){return""}};_.Rg=function(a){a=a.replace(/<[^>]+>/gi,"");Qg.innerHTML=a;a=Qg.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.Tg=function(a,b){b=void 0==b?!0:b;a=_.Sg(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};
40
- _.Sg=function(a){a=Dg(_.I(a));return btoa(a)};_.Ug=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.Vg=function(a){const b=new Uint8Array(a.length/2);for(let c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b};_.Yg=function(a){let b="";for(let c=0;c<a.length;++c){let d=a[c].toString(16);1==d.length&&(d="0"+d);b+=d}return b};
41
- _.Zg=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!=b.length)return!1;for(let c=0;c<a.length;++c)if(a[c]!=b[c])return!1;return!0};_.$g=function(a){var b=0;for(var c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);c=0;for(let d=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};
42
- _.ah=function(a,b){b.lastIndex=a.a;b=b.exec(a.f);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.a==a.f.length||null==b||b.position!=a.a)return null;a.a+=b.length;return b.results};
43
- _.eh=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.H(_.G,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.bh(d);var f;(f=_.ah(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.ah(d,g);)c.push(new _.ch(f[1],f[2]||f[3]))}return new _.dh(a,b,c,e)};_.gh=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...fh]}};
44
- hh=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||[...fh]};
45
- _.jh=function(a,b){_.pf(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.ih,uriIndex:0,method:a.method||"GET",body:a.body||null,headers:Object.assign({},a.headers),allowCrossSiteCredentials:a.allowCrossSiteCredentials||!1,onProgress:a.onProgress||null,onFragment:a.onFragment||null,maxAttempts:a.maxAttempts||1,currentAttempt:0,baseDelay:a.baseDelay||1E3,backoffFactor:a.backoffFactor||2,fuzzFactor:a.fuzzFactor||.5,timeout:a.timeout||0,requestModifiers:a.requestModifiers||
46
- [],responseModifiers:a.responseModifiers||[],startTime:a.startTime||null,endTime:a.endTime||null,contentType:a.contentType||null,licenseRequestType:a.licenseRequestType||null,sessionId:null,bytesRemaining:-1,bytesLoaded:-1,bytesTotal:-1,timescale:a.timescale||null,rateLimitBps:a.rateLimitBps||null,disableFragmentSupport:a.disableFragmentSupport||!1,disableMergedFragments:a.disableMergedFragments||!1,fatalStatusCodes:[...fh],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&hh(c,b);return c};
47
- _.kh=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=_.Hg(b,!0)}catch(k){}_.Gf("HTTP error text:",g);throw new _.H(0<=(f.fatalStatusCodes||[]).indexOf(c)?_.G:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};
48
- lh=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};mh=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};nh=function(a,b,c){if(0>=a)return Promise.resolve();const d=8*c/a-b/1E3;return 0<d?new Promise(e=>{setTimeout(e,1E3*d)}):Promise.resolve()};
49
- oh=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()}};ph=function(a,b){a.P.then(()=>b(!0),()=>b(!1));return a};_.qh=function(a,b){a.a.push(ph(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};rh=function(a,b){return _.y(function*(){const c=yield a.fetch(b);return _.Eg(c.data)})};
50
- sh=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.y(function*(){if(!navigator.onLine)return!1;if(b){const e=_.jh(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})};_.th=function(a){return a&&a!==_.xe?a:null};
51
- vh=function(a){if(!a)throw new _.H(_.G,3,3101,`Invalid track type: ${a}`);if(!_.pf(a))throw new _.H(_.G,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.J:return _.J;case _.K:return _.K;case _.L:return _.L;case uh:return uh}throw new _.H(_.G,3,3101,`Unknown track type: ${a}.`);};yh=function(a,b){a=vh(a);const c=_.th(b.kind);let d=b.id;d||(d=String(_.wh++));a=new _.xh(d,c===_.td?uh:a);a.kind=c;a.label=_.th(b.label);a.language=_.th(b.language);return a};
52
- _.zh=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.g}${a.f}`};_.Ah=function(a,b,c){return a?(c||Object.keys(a).sort()).reduce(function(d,e){if(!(e in a))return d;const f=a[e];let g="\x26";""===d&&(g=b?"":"?");d=d+g+encodeURIComponent(e);return d=d+"\x3d"+encodeURIComponent(void 0===f?"":f)},""):""};
53
- Bh=function(a){const b={};a=a||"";a=a.substring(a.indexOf("?")+1);for(const d of a.split("\x26")){var c=d.split("\x3d");a=decodeURIComponent(c[0]);c=decodeURIComponent(c[1]||"");a&&(b[a]=c)}return b};Ch=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};Dh=function(a,b){return _.y(function*(){const c=_.jh(b);return yield rh(a.g,c)})};
54
- Hh=function(a,b,c){return _.y(function*(){const {mimeType:d,renditions:e}=yield Eh(a,b,c),f=new _.xh("dummy",_.L),g=e.map((h,k)=>{k=new _.Fh(`R${k}`,f);k.bandwidth=h.bandwidth;k.Ac=h.Ac;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});Gh(g);return{renditions:g,mimeType:d||void 0}})};
55
- Jh=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Ih(c));const b=new Map;a.forEach(c=>{if(c.type&&c.name){const d=`${c.type}:${c.name}`;if(b.has(d))throw Error("#EXT-X-MEDIA:NAME attributes are not unique. It is impossible to map HLS metadata to Safari data structures.");b.set(d,c)}});return b};Eh=function(a,b,c){return _.y(function*(){const d=Kh(b),e=Lh(b,c);return{mimeType:yield Mh(a,e,d[0]?d[0].codec:null),renditions:d}})};
56
- Gh=function(a){const b=new Set;a.forEach(c=>{b.add(`${c.width}x${c.height}`)});if(b.size<a.length)throw Error("Playlist contains multiple renditions with the same resolution.");};Ih=function(a){const b=_.eh(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a("TYPE");c=null!=c?{AUDIO:_.K,VIDEO:_.L,SUBTITLES:_.J}[c]:void 0;return{type:c,groupId:a(_.Ba),name:a("NAME"),language:a("LANGUAGE"),Cg:a("AUTOSELECT"),default:a("DEFAULT"),Jg:a("FORCED"),ue:a("CHARACTERISTICS"),uri:a(_.kb)}};
57
- Kh=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.eh(0,b);if(c.getAttribute(_.qb))throw Error("Playlist contains alternative video streams.");var d=_.pg(c,_.Ya);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.pg(c,_.ja);e=e?Number(e):null;var f=_.pg(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.pg(c,_.ka);c=_.Nh(_.w,c?c.split(","):[]);return b={bandwidth:e,Ac:f,codec:c,width:b,height:d,mimeType:null}})};
58
- Lh=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?Ch(a,b):null};Mh=function(a,b,c){return _.y(function*(){if(!b||!c)return null;var d=yield Dh(a,b);d=[Oh(d,b),Ph(d,b)].filter(Boolean);return _.Qh(d,_.w,c)})};Oh=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?Ch(a,b):null};Ph=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.pg(_.eh(0,a),_.kb))?Ch(a,b):null:null};
59
- _.Sh=function(a,b,c){for(const d of _.Rh)if(d.probe(b,c))return d.create(a);return null};_.Th=function(a){a=_.Rh.indexOf(a);0<=a&&_.Rh.splice(a,1)};_.Uh=function(a,b){b&&(a+='; codecs\x3d"'+b+'"');return a};Vh=function(a,b,c){a.stop();let d=!0,e=null;a.a=()=>{c?clearInterval(e):clearTimeout(e);d=!1};const f=()=>{d&&a.f()};e=c?setInterval(f,1E3*b):setTimeout(f,1E3*b);return a};
60
- Zh=function(){if(Wh)return Wh;Xh||(Xh=new _.Yh(()=>{Wh=null}));(Wh=document.querySelector(_.w)||document.querySelector(_.p))||(Wh=document.createElement(_.w));Xh.da(1);return Wh};_.$h=function(){return!!navigator.userAgent.match(/Edge?\//)};_.ai=function(a){return(navigator.userAgent||"").includes(a)};_.bi=function(a){return _.ai("Tizen"+(a?" "+String(a):""))};
61
- di=function(a){const b={major:-1,name:ye};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=ci(a,c[0]));2<=c.length&&(b.minor=ci(a,c[1]));3<=c.length&&(b.patch=ci(a,c[2]));4<=c.length&&(b.build=ci(a,c[3]));return b};_.ei=function(){return _.ai("Web0S")};_.gi=function(){return _.ei()&&79===fi().major};
62
- fi=function(){const a=hi();const b=["ie","edge","opera","firefox","safari",vc];var c=ii();const d=ji[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return di(c[1]);return di("")};_.ki=function(){return _.ai("CrKey")};_.li=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.bi()};_.mi=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.li()&&1<navigator.maxTouchPoints};_.ni=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
63
- ci=function(a,b){try{return parseInt(b,10)}catch(c){oi.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};pi=function(a,b){if(!a||!b||0===b.length)return!1;for(let c=0;c<b.length;c++)if(0<=a.indexOf(b[c]))return!0;return!1};
64
- ii=function(){const a=hi();if(!a)return qi;var b=a.match(/^.+?(?=\))/);if(!b)return qi;b=b[0];if(pi(b,["iphone","ipad"]))return ri;if(pi(b,["android"]))return si;if(pi(b,["macintosh"]))return ti;if(pi(b,["windows nt"]))return wi;if(pi(b,["tizen"]))return xi;if(pi(b,["web0s"]))return yi;if(pi(b,["linux"]))return zi;oi.warn("Unable to identify OS from user agent: "+a);return qi};hi=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
65
- _.Bi=function(){var a=ii();var b=ii();var c=ji[b];if(c){c=hi().match(c.os_version)[1];c=di(c);if(b===wi)if("5.1"===c.name)c.name="xp";else if("6.1"===c.name)c.name="7";else if("6.2"===c.name||"6.3"===c.name)c.name="8";b=c}else b=di("");a:{c=hi();const e=["ie","edge","opera","firefox","safari",vc];var d=ii();d=ji[d];for(let f=0,g=e.length;f<g;f++)if(d[e[f]]&&c.match(d[e[f]])){c=e[f];break a}c=Ai}return{os:a,osVersion:b,browser:c,browserVersion:fi()}};
66
- Ci=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.rf(a,{kind:_.th(b.kind),language:_.th(b.language),label:_.th(b.label)},["kind","language","label"])};Di=function(a){return a.enabled||a.selected||a.mode===_.fe||a.mode===_.bd};Fi=function(a,b,c){return Ei(a)&&b===_.L&&!!c.enableHlsVideoTrackInfo};
67
- Gi=function(a,b,c){return _.y(function*(){var d=a.l.getLoadedSource();d&&a.j&&(d=yield a.j.f(d.url,c),d.mimeType&&(b.mimeType=d.mimeType),d.renditions&&0<d.renditions.length&&(b.renditions=d.renditions,b.renditions.forEach(e=>{e.track=b})))})};Hi=function(a,b,c){return Ei(a)&&(b===_.K||b===_.J)&&!!c.enableMetadata};
68
- Ii=function(a,b,c){return _.y(function*(){var d=a.l.getLoadedSource();d&&a.j&&(d=yield a.j.f(d.url,c),d.uc&&(d=d.uc.get(`${b.type}:${b.label}`))&&d.ue&&(b.accessibility=d.ue.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Ji=function(a,b){return a.h.filter(c=>c.type===b)};Ki=function(a){(a=a.l.getTextDisplayer())&&a.remove(0,Infinity)};Mi=function(a,b){if(a=Li(a,b))a=Array.from(a),b===_.J&&(a=a.filter(c=>c.kind!==_.td));return a};
69
- Li=function(a,b){if(!a.l)return null;a=a.l.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.K:return a.audioTracks;case _.L:return a.videoTracks;case _.J:return a.textTracks;default:return null}};Ni=function(a,b){return(a=a.f.get(b)||null)&&a.renditions[0]};Oi=function(a,b){return(a=a.m.get(b))&&a.renditions[0]};
70
- Ri=function(a,b,c){const d=Mi(a,b);if(c){if(void 0===a.h.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.a.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.m.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.J:f="mode";e=_.fe;g=_.Nc;break;case _.K:f="enabled";break;case _.L:f="selected"}if(f)for(const h of d)h[f]=Ci(c,h,c.type)?e:g}}else if(a.a.debug(_.va+b),a.f.get(b)&&d&&b===_.J){for(e of d)e.mode=
71
- _.Nc;a.f.set(b,null)}b===_.K?a.l.trigger(new _.F(_.Pi)):b===_.J&&a.l.trigger(new _.F(_.Qi))};Si=function(a,b,c){if(a.l){var d=a.l.getSurface().getMedia();if(d){var e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);e.src=_.Og(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
72
- Ti=function(a,b){return _.y(function*(){var c=a.l.getConfiguration(),d=_.Sh(c,b.mimeType,_.se);if(d){c=_.jh(b.url);var e=yield a.l.getNetworkEngine().fetch(c).P;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.I(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.se},Si(a,d,c))}else a.a.warn("Track mimetype is not supported",b)})};Ei=function(a){a=a.l.getLoadedSource();return!(!a||a.type!==_.Ui&&!a.url.endsWith(".m3u8"))&&_.li()};
73
- Vi=function(a,b,c){c=_.Yf(c).filter(e=>e);a.a.info("Find preferred tracks for",b,c);const d=Ji(a,b);c.some(e=>{const f=_.rg(e);return(e=d.find(g=>{g=_.rg(g.language||"");return _.sg(f,g)}))?(a.a.info("Will select track with id",e.id),Ri(a,b,e),!0):!1})};Xi=function(a){return a.name===Sa&&Wi.some(b=>a.message.startsWith(b))};
74
- _.$i=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.mi()&&(a=360);const b=_.gh();b.maxAttempts=3;a={source:"",license:Yi,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.gh(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,
75
- restrictions:Zi(a)},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:"main",preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,
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,
76
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},
77
- restrictions:Zi(),tizen:{sideStreamText:_.bi(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1}};if(_.ai("Edge/")||_.bi())a.streaming.gapDetectionThreshold=.5;_.ei()&&(a.streaming.stallEnabled=!1);_.gi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.bi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,
78
- invertVerticalControl:!1};return a};Zi=function(a){a=void 0===a?Infinity:a;return{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}};
79
- _.bj=function(...a){if(!a)return _.$i();var b=[_.$i()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.pf(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({suggestedPresentationDelay:0,streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{hlsLowLatency:!0}}),c=!0),b.push(d));a=_.jf.apply(null,b);_.pf(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));
80
- if(!_.C(a.volume)&&(!_.qf(a.volume)||sf(a.volume)))throw new _.H(_.G,7,7100,"config.volume is not a number");if(!_.C(a.preferredTextLanguage)&&!_.pf(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.G,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.C(a.preferredAudioLanguage)&&!_.pf(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.G,7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.C(a.preferredAudioCodec)&&
81
- !_.pf(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.G,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.C(a.preferredVideoCodec)&&!_.pf(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.G,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.C(a.drm)){if(a.drm.env&&!_.pf(a.drm.env))throw new _.H(_.G,7,7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.pf(a.drm.offlineId))throw new _.H(_.G,
82
- 7,7100,"config.drm.offlineId is not a string");}if(b=a.streaming){b.bufferingGoal=Number(b.bufferingGoal);b.rebufferingGoal=Number(b.rebufferingGoal);b.bufferBehind=Number(b.bufferBehind);b.smallGapLimit=Number(b.smallGapLimit);b.durationBackoff=Number(b.durationBackoff);if(!_.qf(b.bufferingGoal)||sf(b.bufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.qf(b.rebufferingGoal)||sf(b.rebufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal is not a number");
83
- if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.qf(b.bufferBehind)||sf(b.bufferBehind))throw new _.H(_.G,7,7100,"config.streaming.bufferBehind is not a number");if(!_.qf(b.smallGapLimit)||sf(b.smallGapLimit))throw new _.H(_.G,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.qf(b.durationBackoff)||sf(b.durationBackoff))throw new _.H(_.G,7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;
84
- if(_.C(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.r)throw new _.H(_.G,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");aj(a.restrictions);aj(a.abr.restrictions);a.abr.initialRestrictions&&aj(a.abr.initialRestrictions)}return a};
85
- aj=function(a){_.C(a.maxPixels)&&(a.maxPixels=Infinity);_.C(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.C(a.maxHeight)&&(a.maxHeight=Infinity);_.C(a.maxWidth)&&(a.maxWidth=Infinity);_.C(a.minPixels)&&(a.minPixels=0);_.C(a.minBandwidth)&&(a.minBandwidth=0);_.C(a.minHeight)&&(a.minHeight=0);_.C(a.minWidth)&&(a.minWidth=0);a.minWidth=Number(a.minWidth);a.maxWidth=Number(a.maxWidth);a.minHeight=Number(a.minHeight);a.maxHeight=Number(a.maxHeight);a.minBandwidth=Number(a.minBandwidth);a.maxBandwidth=Number(a.maxBandwidth);
86
- a.minPixels=Number(a.minPixels);a.maxPixels=Number(a.maxPixels);if(Number.isNaN(a.minWidth)||Number.isNaN(a.maxWidth)||Number.isNaN(a.minHeight)||Number.isNaN(a.maxHeight)||Number.isNaN(a.minBandwidth)||Number.isNaN(a.maxBandwidth)||Number.isNaN(a.minPixels)||Number.isNaN(a.maxPixels))throw new _.H(_.G,7,7100,"Restrictions contain NaN");};_.cj=function(a){return typeof a===_.Bd&&!Array.isArray(a)&&"source"in a};_.ej=function(a){return _.dj.get(a)||null};
87
- _.gj=function(a){_.dj.get(a.id())?fj.warn("Component already in use."):_.dj.set(a.id(),a)};hj=function(a){for(const b of _.dj.values())a(b)};ij=function(a){return _.Lg(a,_.Gc)||_.Lg(a,_.Hc)};jj=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Xe]=a.f),a.a&&(b.headers[Ye]=a.a))};
88
- kj=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Xe],a.a=b.headers[Ye],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.g.debug("Loaded tracking token "+a.f),a.a&&a.g.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.Eg(_.Ug(b))),{delay:a.renewalPeriod,zg:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.mj=function(a){_.lj[a.I]=a};
89
- _.oj=function(a){const b={attemptParameters:_.gh(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Pa:{}};if(a&&(b.enforceSingleSession=!!a.enforceSingleSession,b.delayLicenseRequestUntilPlayed=!!a.delayLicenseRequestUntilPlayed,b.preferredDrmSystem=a.preferredDrmSystem,b.emeApi=a.emeApi,a.attemptParameters&&(b.attemptParameters=a.attemptParameters),b.enableSessionCacheForSkd=!!a.enableSessionCacheForSkd,void 0!==a.ignoreUnrecognizedInitData&&
90
- (b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),a.env)){const c=_.lj[a.env]||null;if(!c)throw _.Gf(_.pa,_.Wa+a.env+_.aa),new _.H(_.G,6,6015,`DRM environment '${a.env}' is missing.`);b.Pa=_.nj(c,a.customData)||{};_.Lg(a.env.toLowerCase(),Tc)&&(b.enforceSingleSession=!0)}return b};qj=function(a){a=pj[a];if(!a)return null;const b=_.Bi();return b.os===si&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
91
- _.nj=function(a,b){const c={};var d=b?b.widevineVideoRobustness:void 0,e=b?b.widevineAudioRobustness:void 0;const f=b?b.serverCertificate:void 0;var g=a.g[_.Ic];if(g){var h=g.licenseUrl;d=rj(d,g.videoRobustness);e=rj(e,g.audioRobustness);var k=g.modifiers,l=g.distinctiveIdentifierRequired,m=g.persistentStateRequired;g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.me?qj(f):f;c[_.Ic]={licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,
92
- serverCertificate:g}}(g=a.g[_.Gc])&&(c[_.Gc]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.g[_.Hc])&&(c[_.Hc]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});return c};
93
- rj=function(a,b){const c=_.Bi();if(c.os!==si||c.browser!==vc)return a||b};_.sj=function(){throw new _.H(_.G,3,3E3);};_.tj=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.I(a.f.buffer);b=_.I(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.sj()}};_.M=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.sj()}};_.uj=function(a){return a.a<a.f.byteLength};_.vj=function(){throw new _.H(_.G,3,3E3,"Buffer read out of bounds.");};_.wj=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.vj()}};
94
- _.xj=function(a){try{const b=a.f.getUint16(a.a,a.g);a.a+=2;return b}catch(b){_.vj()}};_.N=function(a){try{const b=a.f.getUint32(a.a,a.g);a.a+=4;return b}catch(b){_.vj()}};_.yj=function(a){try{const b=a.f.getInt32(a.a,a.g);a.a+=4;return b}catch(b){_.vj()}};zj=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.wj(a);return c};
95
- _.Aj=function(a){let b=0,c=0;try{a.g?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.vj()}if(2097151<c)throw new _.H(_.G,3,3001);a.a+=8;return c*Math.pow(2,32)+b};_.Bj=function(a,b){a.a+b>a.f.byteLength&&_.vj();const c=a.f.buffer.slice(a.a,a.a+b);a.a+=b;return _.I(c)};Cj=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Dj=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};
96
- _.Ej=function(a){for(;_.uj(a.reader)&&!a.parser.a;)a.parser.hd(a.start+a.headerSize,a.reader,a.partialOkay)};_.Fj=function(a){for(let b=_.N(a.reader);0<b&&!a.parser.a;--b)a.parser.hd(a.start+a.headerSize,a.reader,a.partialOkay)};_.Gj=function(a){return b=>{const c=b.reader.Ba()-b.reader.getPosition();a(_.Bj(b.reader,c))}};_.Hj=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};Ij=function(a){let b="";try{b=_.Hg(a)}catch(c){}return b};
97
- _.Kj=function(a){a=Ij(a);let b="";a.length&&(b=(new _.Jj(a)).a);return b};Mj=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Eg(a)),d=_.Ug(c.sinf[0]);(new _.Lj).L(_.ge,_.Ej).L("schi",_.Ej).L("tenc",e=>{e.reader.skip(6);_.wj(e.reader)&&(e.reader.skip(1),b=_.Yg(_.Bj(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
98
- Oj=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.G,6,6102);let d;typeof b===_.me?d=_.Jg(b,!0):d=b;a=_.Jg(Ij(a),!0);b=new _.Nj(12+a.byteLength+d.byteLength+c.byteLength,!0);_.M(b,a.byteLength);_.tj(b,_.I(a));_.M(b,d.byteLength);_.tj(b,_.I(d));_.M(b,c.byteLength);_.tj(b,_.I(c));return _.I(b.buffer)};_.Pj=function(a){var b=_.I(a.body);b=_.Tg(b);a.headers[oa]=Yb;a.body=_.Ig("spc\x3d"+b).buffer};
99
- _.Qj=function(a){let b;try{b=_.Eg(a.data)}catch(c){return}b=b.trim();"\x3cckc\x3e"===b.substr(0,5)&&"\x3c/ckc\x3e"===b.substr(-6)&&(b=b.slice(5,-6));try{const c=JSON.parse(b);c.ckc&&(b=c.ckc);c.CkcMessage&&(b=c.CkcMessage);c.License&&(b=c.License)}catch(c){}a.data=Cg(_.Ug(b))};Vj=function(a,b){b=Rj(b);if(a==_.Ic)return b+Sj;if(a==_.Hc)return b+Tj;if(a==_.Gc)return b+Uj;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
100
- _.Xj=function(a,b,c,d){d=void 0===d?!0:d;a=a.drm;a&&a.env.startsWith(ra)?a.customData&&(c=btoa(JSON.stringify({userId:a.customData.userId,sessionId:a.customData.sessionId,merchant:a.customData.merchant})),b.headers["dt-custom-data"]=c,a.customData.authToken&&(b.headers["x-dt-auth-token"]=`${a.customData.authToken}`),c=b.uris[0],d&&a.customData.assetId&&(c+="?assetId\x3d"+encodeURI(`${a.customData.assetId}`),a.customData.variantId&&(c+="\x26variantId\x3d"+encodeURI(`${a.customData.variantId}`)),b.uris[0]=
101
- c)):Wj.warn(Oa)};_.Yj=function(a,b){try{const c=_.I(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Wj.debug("Widevine License response",d);const e=atob(d.license),f=new Uint8Array(e.length);for(a=0;a<e.length;++a)f[a]=e.charCodeAt(a);b.data=f.buffer}catch(c){Wj.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
102
- _.ak=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Xj(a,b,c,!1);b.headers[oa]=Yb;c={spc:_.Sg(b.body)};if((a=a.drm)&&a.env.startsWith(ta)&&d){a={};var e=Bh((new _.Jj(Zj(d))).f);d=e.keyId;if(e=e.assetId)Wj.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Wj.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Wj.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Wj.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
103
- _.Kg(_.Ah(c,!0))};_.bk=function(a,b){Wj.debug("Clearing response data");200===b.status&&(a=_.Eg(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.Ug(a).buffer)};
104
- _.ck=function(a,b,c){b=Ij(b);c=c&&c.customData?c.customData:{};b=new _.Jj(Zj(b));const d=Bh(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.Ng(`${a}`)&&(d.assetId=a,Wj.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.Ng(`${e}`)&&(d.variantId=e,Wj.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Wj.debug("KeyId found in FPS SKD. Removing other parameters")):
105
- a=["assetId","variantId"];b.f=_.Ah(d,!1,a);"/"!==b.path||b.h.includes(`${b.a}/`)||(b.path="");b=_.zh(b);return c.fpsContentId=b};_.dk=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ra))Wj.warn(Oa);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(ta)){const c=new _.cg(b.uris[0]);let d=c.ya;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.ya=d;b.uris[0]=c.toString()}};ek=function(a,b,c){_.Xj(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.cg(b.uris[0]);c.a.add(_.Md,a);b.uris[0]=c.toString()};
106
- Rj=function(a){if(a===fk)return"https://lic.drmtoday.com";if(a===gk)return"https://lic.staging.drmtoday.com";if(a===hk)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Zj=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};jk=function(a){const b={},c=a?a[Ze]:void 0;a=ik[a?a[Ze]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
107
- lk=function(a,b=0){_.Bf("Registering EME Factory: "+a.a());a={priority:b,Gb:a};for(let c=0;c<kk.length;++c)if(kk[c].priority<b){kk.splice(c,0,a);return}kk.push(a)};mk=function(a){if(a){const {Gb:b}=kk.find(({Gb:c})=>c.a()===a);if(b&&b.ea())return _.Bf(tb+b.a()),b.create();_.Bf("Cannot create selected EME manager. Choosing by priority list.")}for(const {Gb:b}of kk)if(b.ea())return _.Bf(tb+b.a()),b.create();throw Error("Missing EME managers");};
108
- _.pk=function(a){var b=_.Vg(a);b=parseInt(b.byteLength,10).toString(16);b=_.Vg("12"+b+a);return new nk(ok,a,b)};
109
- _.rk=function(a){const b=new _.qk(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.N(b);var c=_.N(b);c=_.Dj(c);var d=_.N(b);const e=d>>>24;d&=16777215;var f=_.Bj(b,16);f=_.Yg(f);if(0<e){var g=_.N(b);b.skip(16*g)}g=_.N(b);const h=()=>{let t=_.wj(b),u=(t&127)>>>0,x=7;for(;128<=t&&28>=x;)t=_.wj(b),u=(u|(t&(28>x?127:15))<<x)>>>0,x+=7;return 28<x?-1:u},k=t=>{switch(t){case 0:do if(!_.uj(b))throw Error("not enough data to skip!");while(_.wj(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
110
- break;case 3:for(;4!==(t=h()&7);)k(t);break;case 5:b.skip(4);break;default:throw Error("invalid wire type "+t);}},l=[];let m=null;for(;_.uj(b);){var n=h(),q=n&7;n>>>=3;if(2===q){q=h();if(0>q)throw Error(`unable to read length of field ${n}`);q=zj(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.Gf("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Sg(m):"","keyIds",l.map(t=>_.Yg(t)));return 0<l.length?_.pk(_.Yg(l[0])):null};
111
- sk=function(a){return _.y(function*(){const b=new Promise(c=>{(new _.Yh(c)).da(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.D("Timeout waiting for session close")})};_.uk=function(a){return tk(a)?_.Hc:a};vk=function(a,b){const c=[];b.forEach((d,e)=>{c.push({keySystem:e,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(const d of a)d.drmInfos=c};
112
- wk=function(a,b){if(a.keySystem){var c=_.uk(a.keySystem);b=b[c];c===_.Jd&&a.licenseServerUri||(b&&(a.licenseServerUri=b.licenseUrl||""),a.keyIds||(a.keyIds=[]),b&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=b.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=b.persistentStateRequired),a.videoRobustness||(a.videoRobustness=b.videoRobustness||""),a.audioRobustness||(a.audioRobustness=b.audioRobustness||""),a.serverCertificate||(a.serverCertificate=
113
- b.serverCertificate||null)))}};xk=function(a,b){a=_.Kj(b);_.Gf("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
114
- yk=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&"APPLE"===h){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.nf(k)||(k=xk);let l="";try{l=k(b,c,g)}catch(m){throw new _.H(_.G,6,6103);}if(!l.length)throw new _.H(_.G,6,6101,"Content ID is an empty string");c=Oj(c,l,a)}return c};tk=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
115
- zk=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.Zg(g,f.serverCertificate))||c.push(f.serverCertificate));if(f.initData){for(const g of f.initData)g.periodId=f.periodId;for(const g of f.initData)d.some(h=>h.keyId&&h.keyId==g.keyId&&h.periodId===g.periodId?!0:!1)||d.push(g)}if(f.keyIds)for(a=0;a<f.keyIds.length;++a)e.includes(f.keyIds[a])||e.push(f.keyIds[a])}};
116
- Ak=function(a){var b=a.j;const c=a.W;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"==d)&&a.U(new _.H(_.G,6,6014));a.D.Ud(_.uf(c));a.o||a.a.info(qa);a.o=!0;a.B=!1};Bk=function(a){a.g.forEach((b,c)=>{const d=b.Qd;let e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Qd=e)})};
117
- Ck=function(a){return _.y(function*(){a.w.release();a.w=null;a.K.release();a.K=null;a.o=!1;a.B=!1;a.F.reject();a.Y.stop();a.Y=null;a.T.stop();a.T=null;const b=Array.from(a.g.keys());for(const c of a.g.values())c.jc&&c.jc.stop();a.g.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.y(function*(){a.a.debug("Closing session",c.sessionId);try{yield sk(c)}catch(d){a.a.warn("Error while closing session",d)}}))));if(a.A){try{yield a.m.g(null)}catch(c){a.a.warn("Error while resetting media keys",
118
- c)}a.A=null}a.m=null;a.f=null;a.J.clear();a.G=null;a.I=[];a.h=null;a.U=null;a.D=null;a.N=0;a.M=null})};_.Gk=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=tf(a.h.Pa);vk(b,d)}if(d=Dk(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)wk(f,a.h.Pa);b=Ek(a,b);if(!b.size)return a.R=!0,Promise.resolve();a=_.Fk(a,b);return c?a:a.catch(()=>{})};
119
- _.Ik=function(a,b,c){a.H=Hk;a.I=c;a.C=0<c.length;a.a.debug("Using Persisted Licenses: "+a.C);a.h&&a.h.enableSessionCacheForSkd&&a.a.info("Enabled session cache for SKD license requests");return _.Gk(a,b)};
120
- _.Fk=function(a,b){if(1==b.size&&b.has(""))return Promise.reject(new _.H(_.G,6,6E3));null===a.m&&(a.m=mk(a.h.emeApi));for(var c of b.values())0==c.audioCapabilities.length&&delete c.audioCapabilities,0==c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.Mk;const e=k=>{for(const l of k.audioCapabilities)delete l.robustness;for(const l of k.videoCapabilities)delete l.robustness},f=(k,l,m)=>{l.drmInfos.some(n=>!!n.licenseServerUri)==k&&(d=d.catch(()=>{if(a.pa)return null;if(m===_.Hc){const n=
121
- a.D.getConfiguration();if(!_.$h()||n.streaming.patchEdgeWhenMixedContent||a.h.Pa[m].useLegacySystem)e(l);else return a.m.a("com.microsoft.playready.recommendation",[l]).catch(()=>{e(l);return a.m.a(m,[l])})}return a.m.a(m,[l])}))};let g=a.h.preferredDrmSystem;if(!g){var h=_.Bi();if(h.os===wi&&10<=h.osVersion.major&&"edge"===h.browser)g=_.Hc;else if("safari"===h.browser)g=_.Gc;else if(h.browser===vc||"firefox"===h.browser)g=_.Ic}g&&(h=b.get(g))&&(f(!0,h,g),f(!1,h,g));for(const k of[!0,!1])b.forEach((l,
122
- m)=>{m!==g&&f(k,l,m)});d=d.catch(k=>{throw new _.H(_.G,6,6001,null,k);});d=d.then(k=>{if(a.pa)return null;a.J.clear();var l=k.getConfiguration();a.a.debug("Got MediaKeySystemAccess with configuration",l);var m=l.audioCapabilities||[];l=l.videoCapabilities||[];for(var n of m)a.J.add(n.contentType);for(var q of l)a.J.add(q.contentType);{m=k.keySystem;n=b.get(_.uk(k.keySystem));q=[];l=[];const t=[],u=[];zk(n.drmInfos,q,l,t,u);1<l.length&&_.D("Multiple unique server certificates found! Only the first will be used.");
123
- 1<q.length&&_.D("Multiple unique license server URIs found! Only the first will be used.");m={keySystem:m,licenseServerUri:q[0],distinctiveIdentifierRequired:n.distinctiveIdentifier==_.ae,persistentStateRequired:n.persistentState==_.ae,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:"",serverCertificate:l[0],initData:t,keyIds:u,periodId:null}}a.f=m;if(!a.f.licenseServerUri)throw new _.H(_.G,6,6012,a.f.keySystem);
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);
124
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};
125
- Dk=function(a){a=tf(a.h.Pa[_.Jd]||{});if(0==a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Vg(f);e=_.Vg(e);e={kty:"oct",kid:_.Tg(f,!1),k:_.Tg(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Ig(d),initDataType:"keyids"}];return{keySystem:_.Jd,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
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,
126
128
  keyIds:[],periodId:null}};
127
- Ek=function(a,b){var c=new Set;for(var d of b)for(var e of d.drmInfos)c.add(e);for(const f of c)wk(f,a.h.Pa);d=a.C?_.ae:_.Id;e=a.C?[_.Nd]:[re];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.rc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Id,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Uh(b.mimeType,b.codecs):"",h=c?_.Uh(c.mimeType,c.codecs):"";for(const k of f.drmInfos){const l=a.get(k.keySystem);
128
- l.drmInfos.push(k);k.initData&&k.initData.length&&(l.initDataTypes=[...new Set(k.initData.map(m=>m.initDataType))]);k.distinctiveIdentifierRequired&&(l.distinctiveIdentifier=_.ae);k.persistentStateRequired&&(l.persistentState=_.ae);b&&_.Yf(k.audioRobustness).forEach(m=>{l.audioCapabilities.push({robustness:m||"",contentType:g})});c&&_.Yf(k.videoRobustness).forEach(m=>{l.videoCapabilities.push({robustness:m||"",contentType:h})})}}return a};
129
- Nk=function(a){return _.y(function*(){if(!a.m.m())if(a.M)yield a.M;else try{a.M=a.m.g(a.G),yield a.M}catch(b){a.pa||a.U(new _.H(_.G,6,6003,b.message,b))}})};
130
- _.Rk=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.H!==Hk)){var e=a.keySystem();if(!e.startsWith(_.Gc)&&b===_.rc){const f=new Ok(c);if(1<f.a.length&&(e={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[e]))for(let g=0;g<f.f.length;g++)if(e===f.f[g]){c=c.subarray(f.a[g].start,f.a[g].end+1);break}}(a.A.webkitCurrentPlaybackTargetIsWireless||
131
- _.bi(2)||a.keySystem().startsWith(_.Gc)||!_.Pk(a,d,c,!0))&&Qk(a,d,null,b,c)}};Sk=function(a,b){return _.y(function*(){a.a.info(`Handle encrypted event for type ${b.initDataType}`);yield Nk(a);b.initData&&_.Rk(a,b.initDataType,_.I(b.initData))})};Uk=function(a){return _.y(function*(){const b=a.V.map(c=>Tk(a,c));a.ba=!0;a.V=[];yield Promise.all(b)})};
132
- Wk=function(a){const b=a.keySystem(),c=a.h.Pa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return Vk(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.jh([d],a.h.attemptParameters);f.type=3;f.licenseRequestType=tc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.a.debug("Fetching certificate");return a.D.xb.fetch(f).P}).then(f=>{a.f.serverCertificate=_.I(f.data)}).catch(f=>{var g=
133
- f.data.headers;g=Object.assign({message:"Error while fetching certificate!",url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},jk(g));throw new _.H(_.G,6,6100,g,f);})};
134
- _.Xk=function(a){return _.y(function*(){if(a.G&&a.f&&a.f.serverCertificate&&a.f.serverCertificate.length)try{const b=yield a.G.setServerCertificate(a.f.serverCertificate);void 0===b||b||a.a.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.H(_.G,6,6004,{browserError:b.message});}})};
135
- _.$k=function(a){const b=a.f?a.f.initData||[]:[];for(const c of b){let d=!_.bi(2);if(a.h.enforceSingleSession&&!a.keySystem().startsWith(_.Gc)){const e=a.g.values();for(const f of e)_.Zg(c.initData,f.initData)?(a.a.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.a.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),Yk(c.initData,f)||(f.Yc.push(c.initData),c.keyId&&!f.bb.includes(c.keyId)&&
136
- f.bb.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,ke)),d=!1)}!d||a.C&&a.H===Hk||(_.Pk(a,c.keyId,c.initData)&&(d=!1),d&&(a.a.info("Request new media key session on create"),Qk(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.I)_.Zk(a,c);b.length||a.I.length||(a.o||a.a.info(qa),a.o=!0,a.B=!1,a.F.resolve());return a.F};
137
- _.al=function(a,b){if(!a.G)return _.Nf(a.w,b,[Vc,"msneedkey",Ve,"needkey"],()=>{a.U(new _.H(_.G,6,6010))}),Promise.resolve();a.A=b;a.m.j(b);a.w.one(a.A,_.Rd,()=>Uk(a));a.w.on(a.A,_.Qe,e=>{const f=a.B;a.B=!a.o;!f&&a.B&&(a.a.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.f.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.m.f()!==bb||a.I.length)d=Nk(a);c=Promise.resolve();_.ei()&&38===fi().major||(a.f&&a.f.keySystem!==_.Jd&&!a.f.serverCertificate&&(c=Wk(a)),
138
- c=c.then(()=>_.Xk(a)));return Promise.all([d,c]).then(()=>{a.pa||(_.$k(a),a.w.on(a.A,Vc,e=>Sk(a,e)))}).catch(e=>{if(!a.pa){if(6004===e.code&&a.f&&a.f.keySystem===_.Ic&&1>a.N&&a.f.serverCertificate&&a.f.serverCertificate.length)return a.a.warn("Detected invalid widevine server certificate!. Retrying"),a.U(new _.H(1,6,6004)),a.f.serverCertificate=null,a.N++,_.al(a,b);1<=a.N&&a.a.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
139
- Vk=function(a,b){return _.y(function*(){const c=a.D.sc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
140
- _.Zk=function(a,b){let c;try{a.a.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Nd)}catch(e){const f=new _.H(_.G,6,6005,{browserError:e.message});a.U(f);return Promise.reject(f)}a.w.on(c,sd,a.ma.bind(a));a.w.on(c,ed,a.ga.bind(a));const d={initData:null,loaded:!1,Qd:Infinity,mb:null,Ca:new _.Mk,periodId:null,Yc:[],keyId:null,bb:[],initDataType:null,Ub:null,sessionContext:{ldlDelay:0,customData:{}}};d.Ca.catch(()=>{});a.g.set(c,d);return c.load(b).then(e=>{if(a.pa)return null;
141
- a.a.debug("Loaded offline session",b,e);if(!e)return a.g.delete(c),a.U(new _.H(_.G,6,6013)),null;d.loaded=!0;bl(a)&&(a.o||a.a.info(qa),a.o=!0,a.B=!1,a.F.resolve());return c},e=>{a.pa||(a.g.delete(c),a.U(new _.H(_.G,6,6005,{browserError:e.message})))})};Yk=function(a,b){if(!a)return!1;for(let c=0;c<b.Yc.length;c++)if(_.Zg(a,b.Yc[c]))return!0;return!1};
142
- _.Pk=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.g.keys()){const f=a.g.get(e);if(_.Zg(c,f.initData))return b?f.bb.includes(b)?d&&a.a.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.bb.push(b),a.j.get(b)||a.j.set(b,ke),d&&a.a.info(gb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.a.info(gb+`Session: '${e.sessionId}'`),!0;if(Yk(c,f))return d&&a.a.info("Skipping Session creation. License for init data was already requested [extra]"),
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]"),
143
145
  !0}return!1};
144
- Qk=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.y(function*(){if(e.length){var h=b;if(!h)try{h=dl(a,d,e,f)}catch(t){if(a.a.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:t,initDataType:d,initData:e}),a.h.ignoreUnrecognizedInitData)return}if(!g&&el(a,h,d,e)){var k=!0;if("skd"===d&&!a.h.enableSessionCacheForSkd)for(var l of a.g.keys()){var m=a.g.get(l);
145
- if(h&&m.keyId===h){a.a.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(t){a.a.warn("Unable to close session",t)}k=!1}}if(k){a.a.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.C?_.Nd:re;var q=a.G.createSession(n);a.a.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(t){a.U(new _.H(_.G,6,6005,{browserError:t.message}));return}a.w.on(q,sd,a.ma.bind(a));a.w.on(q,ed,a.ga.bind(a));k={Ub:f,Yc:[],initData:e,initDataType:d,keyId:h,bb:h?
146
- [h]:[],loaded:!1,Qd:Infinity,periodId:c,mb:null,Ca:new _.Mk,sessionContext:{ldlDelay:0,customData:{}}};k.Ca.catch(()=>{});f&&(l=a.g.get(f),k.sessionContext=l.sessionContext);a.g.set(q,k);h&&!a.j.get(h)&&a.j.set(h,ke);if(e)for(l=0;l<a.f.initData.length;l++)m=a.f.initData[l],m.keyId&&!k.bb.includes(m.keyId)&&_.Zg(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.bb.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,ke));l=a.D.getConfiguration();m=a.keySystem();m=a.h.Pa[m];n=(n=m.modifiers)&&n.transformInitData;
147
- _.nf(n)||(n=yk);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.f,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.m.f()})}catch(t){h=t;t instanceof _.H||(h=new _.H(_.G,6,6016,t));k.Ca&&k.Ca.reject(t);a.U(h);return}a.a.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(t=>{if(!a.pa){var u=null;t.errorCode&&t.errorCode.systemCode&&(u=t.errorCode.systemCode,0>u&&(u+=Math.pow(2,32)),u="0x"+u.toString(16));a.U(new _.H(_.G,6,6006,{browserError:t.message,
148
- error:t,extended:u},t))}})}else a.a.warn("Empty init data")})};fl=function(a){let b=Infinity;a=a.g.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};bl=function(a){a=a.g.values();return _.tg(a,b=>b.loaded)};el=function(a,b,c,d){if(!b&&c!==_.ge)return!1;d=b||Mj(d);for(const e of a.g.values())if(b&&e.keyId===b||c===_.ge&&(e.keyId||Mj(e.initData))===d)return!0;return!1};
149
- dl=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;b=a.keySystem();d=a.h.Pa[b];b=a.D.getConfiguration();d=d&&d.modifiers&&d.modifiers.extractContentId;_.nf(d)||(d=xk);try{let g={ldlDelay:0,customData:{}};e&&(g=a.g.get(e).sessionContext);const h=d(b,c,g);a.a.debug(`Extracted Content ID '${h}' from SKD`);var f=h;break a}catch(g){a.a.warn("Unable to extract Content ID from SKD",g)}f=""}return f}if(b===_.ge)return Mj(c)||"";if(b===_.rc){f=a.keySystem();try{if(f.match(/^com\.widevine\.alpha/)&&
150
- (e=_.rk(c)))return e.a}catch(g){throw a.a.warn("Unable to extract Key ID from PSSH data.",{error:g,keySystem:f}),g;}}return""};
151
- Tk=function(a,b){const c=b.target,d=a.g.get(c);var e=a.keySystem();let f=!1;e.match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength?(f=!0,a.a.info("WV Server certificate request for "+`SID:'${c.sessionId} `+`from msg '${b.messageType}'`)):a.a.info("License request for "+`SID:'${c.sessionId}'/KID:'${d.keyId}' `+`from msg '${b.messageType}'`);let g=a.f.licenseServerUri;e=a.h.Pa[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
152
- const h=_.jh([g],a.h.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===kd&&d.Ub?hd:f?tc:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===hd)a.D.onEvent(new _.F(Qc));tk(a.f.keySystem)&&gl(a,h);jj(a.K,h);const k=Date.now();return hl(a,h,d.sessionContext).then(()=>{a.a.debug("Sending DRM license request to",g,h);return a.D.xb.fetch(h).P}).then(l=>{if(a.pa)return Promise.reject();const m=Date.now()-k;var n=il(a,l);let q="";n&&(q=` RID:${n}`);
153
- n=l&&l.data?l.data.byteLength:-1;f?a.a.info("WV Server certificate response for "+`SID:'${c.sessionId}' `+`${n} bytes `+`in ${m}ms${q}`):a.a.info("License response for "+`SID:'${c.sessionId}'/`+`KID:'${d.keyId}' `+`${n} bytes `+`in ${m}ms${q}`);const t=kj(a.K,l);return c.update(l.data).then(()=>{if(!f){var u=fl(a),x=t?Date.now()+1E3*t.delay:Number.NaN;u=new _.F(_.Sc,{keySystem:a.keySystem(),expirationTime:u,expectedRenewalTime:x});a.D.onEvent(u);d&&(d.mb&&d.mb.resolve(),d.Ub&&(u=d.Ub,a.a.info(`Closing expired session '${u.sessionId}'`),
154
- sk(u).catch(()=>{a.a.warn("Unable to close expired session in time")}),(u=a.g.get(d.Ub))&&u.jc&&u.jc.stop(),a.g.delete(d.Ub),d.Ub=null),(new _.Yh(()=>{a.pa||(d.loaded=!0,d.Ca&&d.Ca.resolve(),bl(a)&&(a.o||a.a.info(qa),a.o=!0,a.B=!1,a.F.resolve()))})).da(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||t&&ij(a.keySystem()))&&(u=new _.Yh(()=>{!a.pa&&a.K&&(a.a.info("Updating CSL Sessions"),tk(a.keySystem())?Qk(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.Gc)&&c.update(_.Ig("renew")))}),
155
- d.jc=u,u.da(t?t.delay:d.sessionContext.ldlDelay)))}})},l=>_.y(function*(){if(!a.pa){var m=l.data.headers;m=Object.assign({message:_.xa,url:l.data.url,status:l.data.status,response:l.data.response},m?{headers:m}:{},jk(m));m=new _.H(_.G,6,6007,m,l);a.U(m);d&&d.mb&&d.mb.reject(m);d&&d.Ca&&d.Ca.reject(m)}})).catch(l=>{a.pa||(l===eb?a.a.info("Ignore update for closed sessions"):(l=new _.H(_.G,6,6008,{browserError:l.message}),a.U(l),d&&d.mb&&d.mb.reject(l),d&&d.Ca&&d.Ca.reject(l)))})};
156
- gl=function(a,b){var c=_.Gg(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.a.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.De).textContent;b.body=_.Ug(a.querySelector("Challenge").textContent).buffer}else a.a.debug("PlayReady request is already unwrapped."),b.headers[oa]="text/xml; charset\x3dutf-8"};
157
- hl=function(a,b,c){return _.y(function*(){const d=a.D.getConfiguration();yield Vk(a,d);const e=a.keySystem();var f=a.h.Pa[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.Gc)&&b.requestModifiers.push(k=>_.Pj(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.Gc)&&b.responseModifiers.push(k=>_.Qj(k))})};
158
- il=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.Eg(_.Ug(b))).ti}catch(c){a.a.warn("Unable to parse DRMtoday Request ID",c)}return""};_.ll=function(a,b){a&&b&&(jl.set(a,b),kl.info(`Registered TextDisplayerFactory: '${a}'`))};_.ml=function(a,b){b=b.find(c=>(c=jl.get(c))?c.ea(a):!1);if(null==b)return kl.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;kl.info(`Chosen the text displayer: ${b}`);return jl.get(b)};
159
- _.nl=function(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{{const c=Date.now()/1E3;a.a.duration=c-a.a.timestamp;a.a.state!=b&&(a.f.push(a.a),a.a={timestamp:c,state:b,duration:0})}}};ol=function(a,b){let c=0;a.a&&a.a.state==b&&(c+=a.a.duration);for(const d of a.f)c+=d.state==b?d.duration:0;return c};pl=function(a){const b=d=>({timestamp:d.timestamp,state:d.state,duration:d.duration}),c=[];for(const d of a.f)c.push(b(d));a.a&&c.push(b(a.a));return c};
160
- ql=function(a){return a.a.map(b=>_.kf(b))};_.rl=function(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]}};tl=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=sl.value().get(b),c.one(a,b,d))};
161
- xl=function(a){a.g.debug("Start watching for video events for "+a.l.namespace());const b=a.l,c=d=>ul(a,d.type);a.a.on(b,_.Xc,()=>{a.j=!1;vl(a,_.wl)});a.a.on(b,mc,c);a.a.on(b,_.Sd,()=>{a.F=!0;a.j=!1;ul(a,_.Sd)});a.a.on(b,_.Ld,()=>{a.F=!1;a.j=!1;ul(a,_.Ld)});a.a.on(b,_.ue,c);a.a.on(b,_.Xd,c);a.a.on(b,_.de,d=>{a.m=!1;a.j=!1;ul(a,d.type)});a.a.on(b,_.ee,d=>{a.m=!0;ul(a,d.type)});a.a.on(b,he,c);a.a.on(b,_.Pe,()=>{a.j=!0;ul(a,_.Pe)});a.a.on(b,_.Yc,d=>a.U(d));a.a.on(b,_.od,c);a.a.on(b,nc,()=>{a.C=!0;ul(a,
162
- nc)});a.a.on(b,_.Ce,d=>{a.m=!0;ul(a,d.type)});a.a.on(b,_.Be,d=>{a.m=!1;a.j=!1;ul(a,d.type)})};yl=function(a,b){return Object.keys(b)[a]};Al=function(a,b){const c={type:_.je};b===_.ic||b===_.hc?(c.reason=a.w,b===_.ic?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.zl&&(c.reason=a.w),a.A===_.zl&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
163
- vl=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.zl;a.A=a.f;a.f=b;a.A===_.wl&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.zl?(a.K=a.o,a.w=a.m?1:2,a.g.info("Buffering started. Reason: "+yl(a.w-1,_.Bl)),b=Al(a,_.ic),a.Pb(_.ic,b)):d&&(a.B=a.o-a.K,a.g.info("Buffering finished. Reason: "+yl(a.w-1,_.Bl)+". Buffering time: "+a.B+" ms"),b=Al(a,_.hc),a.Pb(_.hc,b));b=yl(a.A,_.Cl);c=yl(a.f,_.Cl);a.g.info(`Player state change: ${b} -> ${c}`);a.Pb(_.je,Al(a,""));return!0};
164
- ul=function(a,b){if(a.f===_.Dl)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.l.isPaused();var d=a.l.getPosition();var e=a.l.getDuration();if(d=a.l.isEnded()||a.f===_.wl&&1>=Math.abs(d-e)||c&&d>=e)vl(a,_.wl)&&a.g.debug("Player claims to be in ended state, not checking more");else if(b!==_.ue){e=a.l.getPosition();e=null!==e&&void 0!==e&&0<=e?a.l.getBufferInfo().Ea(e,!0):-1;a.G=e;e=a.l.getSurface().getMedia();a.h=e?e.readyState:null;a.J=a.l.getPlaybackRate()||1;
165
- e=typeof a.h===_.r&&2>a.h&&2===e.networkState;var f=typeof a.h===_.r&&0>=a.G&&a.f===_.El,g=typeof a.h===_.r&&2>=a.h&&a.j;e=a.m||f||e||g;!a.M||a.l.isLive()||a.f!==_.zl||e||(f=b===_.de&&4===a.h,(g=a.A===_.Fl)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=vl(a,_.zl):c?f=vl(a,_.Gl):a.F&&(f=vl(a,_.Hl));f&&(a.C=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.m+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.h+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+
166
- f+", Current state: "+yl(a.f,_.Cl))}}};Il=function(a){a=(new _.cg(a)).ya;if(!a)return null;a=a.toUpperCase();return _.Mg(a,".MPD")?_.Sb:_.Mg(a,".M3U8")?_.Ui:_.Mg(a,".MP4")?_.Je:_.Mg(a,"MANIFEST")||_.Mg(a,".ISM")?_.Xb:null};_.Kl=function(a){let b;_.cj(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.me||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Jl(b[c]);d&&a.push(d)}return a};
167
- Jl=function(a){let b=null;_.pf(a)&&(a={url:a});typeof a===_.Bd&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.C(a.drmProtected)||typeof a.drmProtected!==_.fc||(b.drmProtected=a.drmProtected),_.C(a.isLive)||typeof a.isLive!==_.fc||(b.isLive=a.isLive),_.C(a.name)||typeof a.name!==_.me||(b.name=a.name),_.C(a.Bb)||typeof a.Bb!==_.me||(b.Bb=a.Bb),_.C(a.audioMimeType)||typeof a.audioMimeType!==_.me||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Il(a.url),b.type?Ll.debug("Detect media type "+
168
- b.type+" for "+a.url):Ll.warn("Unable to detect media type for "+a.url));return b};Nl=function(a){return a.w?Ml():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.Yc);a.g.off(c,_.be);a.a=null}b()})};Ml=function(){return Promise.reject(new _.H(_.G,7,7E3))};
169
- Pl=function(a,b){return a.w?Ml():new Promise(c=>{a.a||(a.g.on(b,_.Yc,()=>{{const d=Ol(a);if(d)a.onError(d)}}),a.g.on(b,_.be,()=>{const d=b.videoWidth,e=b.videoHeight,f=a.getTrackManager();f&&0<d&&0<e&&(f.w={width:d,height:e});a.trigger(new _.F(_.ec,{detail:{width:d,height:e}}))}),a.a=b);c()})};
170
- Rl=function(a){return _.y(function*(){if(a.w)return Ml();var b=a.o[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.oj(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.m=new _.Ql({xb:c,onError:d=>a.onError(d),Ud:()=>{},onExpirationUpdated:(d,e)=>{a.trigger(new _.F(_.Pc,{expirationTime:e}))},onEvent:d=>{d instanceof _.F?a.dispatchEvent(d):
171
- a.log.debug(_.mb,d.type)},getConfiguration:()=>a.getConfiguration(),sc:()=>a.sc()});a.m.h=b;yield _.Ik(a.m,[{id:0,language:_.xe,primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:()=>null,getSegmentReference:()=>null,adjustSegmentDurations:()=>{},getDuration:a.getDuration.bind(a),initSegmentReference:null,sa:0,mimeType:_.Je,codecs:"",encrypted:!0,keyId:null,language:_.xe,label:null,type:_.w,primary:!1,frameRate:void 0,Ng:void 0,trickModeVideo:null,
172
- emsgSchemeIdUris:null,roles:[],channelsCount:null,Ag:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}],[]);yield _.al(a.m,a.a);return Promise.resolve()})};Sl=function(a,b){tl(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.Dl&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
173
- Ol=function(a){if(null===a.o||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.H(_.G,3,3016,{code:b,Ig:c,message:a.a.error.message})};
174
- Ul=function(a){if(a.w)return new _.Tl(Ml(),()=>{});const b=a.o[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&Sl(a,c);if(d.preload!==_.Ad)a.g.one(d,_.od,()=>{const g=Date.now()/1E3-e;a.f.w=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.bi()||_.ei())&&d.load();const f=new _.Mk;a.g.one(d,he,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.C||(a.C=(new _.Yh(()=>{f.reject(new _.H(_.G,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
175
- uri:b.url},d.error))})).da(g))});tl(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject(Ol(a)):d.preload===_.Ad&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.g.one(d,_.Yc,()=>{f.reject(Ol(a))});return new _.Tl(f,
176
- ()=>{const g=new _.H(_.G,7,7001);f.reject(g);return Promise.resolve()})};Vl=function(a,b){tl(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{if(a.isLive()&&a.getState()!==_.Dl){var c=a.getSeekRange().end,d=a.getPosition();Infinity===c||20>c-d||(a.log.warn("Detected that HLS live stream was not started from close to the live edge. Auto-fixing, seeking to seek range end."+`(position: ${d}, seek range end: ${c})`),a.seek(c).catch(e=>{a.log.warn("Error while seeking to seek range edge.",e)}))}})};
177
- _.Yl=function(a){a&&(0<=Wl.indexOf(a)?Xl.warn(`Factory '${a.name()}' is already registered`):(Wl.push(a),Xl.info(`Factory ${a.name()}' has been registered.`)))};$l=function(a,b){let c=Wl.find(d=>d.ea(a,b));c||(c=new Zl);Xl.info(`Chosen ads: ${c.name()}`);return c};_.am=function(a,b){a=document.createElement(a);for(const c in b){const d=b[c];null===d||void 0===d?a.setAttribute(c,""):a.setAttribute(c,d)}return a};_.bm=function(a,b){a.classList.add(b)};
178
- _.cm=function(a,b){if(a&&typeof b===_.Bd)for(const c in b)a.style[c]=b[c]};_.dm=function(a){return document.createElement(a)};em=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.g.values());_.$f(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};fm=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.g.add(b))};
179
- gm=function(a,b,c){(_.ei()&&53===fi().major||_.ei()&&68===fi().major||_.gi())&&!b.hasAttribute(Kc)&&(b.style.opacity="0",b.setAttribute(Kc,""),a.j.one(b,Uc,()=>{b.removeAttribute(Kc);b.style.opacity="1";c&&(c.style.opacity="1")}))};
180
- km=function(a){a.a.on(window,"offline",()=>{hm(a,!1)});a.a.on(window,"online",()=>{a.f||im(a)});a.a.on(a.l,he,()=>jm(a));a.a.on(a.l,"suspend",()=>jm(a));a.a.on(a.l,_.Pe,()=>jm(a));a.a.on(a.l,_.Sd,()=>{a.f||im(a)});a.a.on(a.l,_.Vd,()=>{a.f||im(a)});a.a.on(a.l,_.je,()=>{switch(a.l.getState()){case _.zl:jm(a);break;default:jm(a)}})};lm=function(a){a.g&&(a.g.stop(),a.g=null)};jm=function(a){a.f&&im(a)};
181
- mm=function(a){return _.y(function*(){var b=a.l.getConfiguration().connectivityCheck;b&&a.l&&(b=yield sh(a.h,b.url,b.attemptParameters,b.method),hm(a,b))})};im=function(a){a.l.getConfiguration().connectivityCheck&&(lm(a),a.g=(new _.Yh(()=>mm(a))).da(5))};hm=function(a,b){lm(a);a.f!==b&&(a.f=b,a.l&&a.l.getConfiguration().connectivityCheck&&a.l.trigger(new _.F(Hd,{online:a.f})))};om=function(){for(let a=0;a<nm.length;++a)nm[a].ic()};
182
- _.pm=function(a,b){b=b||0;a={priority:b,ic:a};for(let c=0;c<nm.length;c++)if(nm[c].priority<b){nm.splice(c,0,a);return}nm.push(a)};qm=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};sm=function(a){if(!a.a){var b=a.license.split(".");if(3!==b.length)throw Error("Expected to find 3 data sections in JWT raw data");b=new rm(b[0],b[1],b[2]);a.a=b}return a.a};
183
- tm=function(a){switch((a.$c()[0]||{src:"",type:""}).type){case _.Sb:a="dash";break;case _.Xb:a="ss";break;case _.Ui:a="hls";break;case _.Je:a=_.xd;break;default:a=""}return a};um=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};vm=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
184
- wm=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};xm=function(a){a=a.getDrmInfo();return(new _.cg(a&&a.licenseServerUri||"")).Ma};ym=function(a){const b=a.getConfiguration();let c="no";b.drm&&!_.rf(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Tc)||xm(a).endsWith("drmtoday.com"))&&(c=Tc);return c};
185
- zm=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.keySystem){case _.Ic:b="wv";break;case _.Hc:b="pr";break;case _.Gc:b="fps"}return b};Am=function(a){a=a.getDrmInfo();let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Bm=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.videoRobustness){case Da:case "HW_SECURE_ALL":b="L1";break;case Ca:b="L2";break;case _.db:case _.cb:b="L3"}return b};
186
- Fm=function(a,b){const c="ie"===_.Bi().browser;var d=b.getConfiguration();const e=[...Array.from(_.dj.keys()),...b.Kf()];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":um(d),"CL-ASSET-ID":vm(d),"CL-SESSION-ID":wm(d),"CL-PLAYBACK-TYPE":b.isLive()?Cm:Dm,"CL-CONTENT-TYPE":tm(b),"CL-PLUGINS":e.join(" "),"CL-DRM":ym(b),"CL-DRM-CDM":zm(b),"CL-DRM-SEC-LEVEL":Bm(b),"CL-DRM-OFFLINE":Am(b),"CL-DRM-IP":xm(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=
187
- d);d=_.jh(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Em).fetch(d).P.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=sm(a);f=f.data;var h=f.status;if(g.a&&g.a.ilv)g=Promise.resolve();else{switch(h){case 403:case 404:g=7101;var k="castLabs Player license is invalid";if(403===h){h=k;k="";try{k=JSON.parse(decodeURIComponent(f.responseText)).message}catch(l){}f=k;f=h+(": "+f)}else f=
188
- k+"!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:g=Promise.resolve();break a}a.f.error(Ga+k);g=Promise.reject(new _.H(_.G,7,g,k))}}return g})};_.Hm=function(a){a&&(0<=Gm.indexOf(a)||Gm.push(a))};
189
- Jm=function(a){if(!a.M){a.M=!0;a.h.getMedia()||a.h.getCastElement();a.w||(a.w=new Im(a.f.license));var b=Object.keys(a.K);Fm(a.w,{getConfiguration:a.getConfiguration.bind(a),$c:a.$c.bind(a),getDrmInfo:a.getDrmInfo.bind(a),Kf:()=>b,isLive:a.isLive.bind(a)}).then(()=>{a.g.debug("License verified remotely")}).catch(c=>{setTimeout(qm,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)})}};
190
- Km=function(a,b){a.w=new Im(b);a.w.verify().catch(c=>{setTimeout(()=>{a.g.error(Ga+c);a.trigger(new _.F(_.Yc,{detail:new _.H(_.G,7,7101)}));a.destroy()},1E3)})};Mm=function(a,b){a.J=b;for(const c of a.J)(b=c.id())&&(a.K[b]=c);_.Lm(a,"onPlayerCreated")};_.Nm=function(a,b){b!==a.a&&(a.a&&(a.a.removeDelegate(a),a.a.destroy()),a.a=b,a.a&&(a.a.init(a.h,a.f),a.a.setNetworkEngine(a.getNetworkEngine()),a.a.addDelegate(a)))};
191
- _.Lm=function(a,b,...c){const d=a.J.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
192
- Om=function(a){return _.y(function*(){if(a.H)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.off(_.je,a.B);a.A.off(a,_.je,a.B);a.A.off(document,Ne);a.trigger(new _.F(_.Zd));a.M=!1;a.h&&a.h.release();a.j&&(yield a.j.dispose(),a.j=null);hj(b=>{b.release()});if(a.a){let b=null;const c=a.a.on(_.je,d=>{b=d});return _.Lm(a,_.Fd).then(()=>{a.a.removeDelegate(a);return Promise.all([a.a.release(),a.G.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
193
- a.trigger(b))}).finally(()=>{a.a.off(_.je,c);a.trigger(new _.F(Yd))})}a.trigger(new _.F(Yd));return new Promise(b=>b())})};
194
- Rm=function(a,b,c){return new Promise((d,e)=>{var f;if(b){var g=f=null;for(var h=0;h<b.length;h++);h=Object.values(_.If);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Gb:h[l],confidence:h[l].canPlay(b[k],c)};if(null===f||f.confidence<m.confidence)f=m,g=k}f&&typeof g===_.r&&0<f.confidence?(_.Jf.debug("Player Factory '"+f.Gb.a()+"' can play",b[g]),f=new Pm(f.Gb,g)):(_.Jf.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Gb.create(),d(new Qm(e,f.a))):
195
- (d=new _.F(_.Yc,{detail:new _.H(_.G,7,7003)}),a.trigger(d),e(d))})};
196
- _.Um=function(a,b){return _.y(function*(){if(a.F)throw Error("Player is already destroyed.");if(!a.h)throw Error("No surface associated with this player!");yield a.release();a.o=_.Kl(b);a.f=_.bj(a.N,_.cj(b)?b:{},{source:a.o});if(0===a.o.length)throw Error("Invalid request to load: could not find source to load");a.H=!1;let c;var d=0;if(a.I||2!==a.canPlay(a.o[0],a.f))d=yield Rm(a,a.o,a.f),c=d.a,d=d.f,a.I=!1;c?_.Nm(a,c):a.a.addDelegate(a);Sm(a);a.a&&a.a.setCdnErrorCallback(a.C);Tm(a,a.f);a.setSourceIndex(d);
197
- if(a.f.pauseWhenInBackground)a.A.on(document,Ne,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});hj(e=>{e.g()});yield _.Lm(a,"onContentWillLoad",a.f.source[d])})};_.Vm=function(a){return _.y(function*(){a.h.getMedia()||a.h.getCastElement();a.A.on(a,_.je,a.B);a.trigger(new _.F(pd));yield Promise.all([a.a.load(a.f),a.j.load()])})};
198
- _.Xm=function(a){return _.y(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);Wm(a);hj(()=>{});yield _.Lm(a,"onContentLoaded");a.f.autoplay&&(yield a.play())})};Sm=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.y(function*(){a.mc&&a.ud&&(a.ud=!1,yield a.mc(b))}))};Tm=function(a,b){a.j=$l(a,b).create(a)};
199
- Wm=function(a){const b=_.Yf(a.f.preferredTextLanguage).filter(d=>d),c=a.getTrackManager().ja();b.some(d=>{const e=_.rg(d);return(d=c.find(f=>{f=_.rg(f.language||"");return _.sg(f,e)}))?(a.getTrackManager().Da(d),!0):!1})};Ym=function(a,b){a.size=void 0===b?0:1;a.f.debug("Setting key status to",b);a.a=b};
200
- Zm=function(a,b){a.g=b;_.Mf(a.f);if(!b)return Promise.resolve();a.f.on(b,Vc,c=>{_.Gf("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.a.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.f.on(b,Ve,c=>{{a.a.debug("Handle webkitNeedKey event");c=_.I(c.initData);if(_.Bg(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=_.Gg(c.subarray(4),
201
- !0);c=_.Ig(c);const d=new Event(Vc);d.initDataType="skd";d.initData=Cg(c);a.g.dispatchEvent(d)}});tl(b,HTMLMediaElement.HAVE_METADATA,a.f,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};$m=function(a,b){Ym(a.keyStatuses,b);b=new _.F(ed);a.dispatchEvent(b)};
202
- cn=function(a,b){a.a=b;_.Mf(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(Vc);d.initDataType=_.rc;d.initData=Cg(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=an(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.F(sd,{messageType:d?kd:hd,message:c.message});d=e;_.Gf("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.Hf("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{if(c=an(a,
203
- c.sessionId))_.Gf("WebkitEmeManager.MediaKeySession.ready"),bn(c,"usable"),c.a&&c.a.resolve(),c.a=null}),a.f.on(b,a.g+"keyerror",c=>{var d=an(a,c.sessionId);if(d){{var e=Error("EME v0.1b key error");const f=c.errorCode;f.systemCode=c.systemCode;e.errorCode=f;!c.sessionId&&d.f?(45===c.systemCode&&(e.message="Unsupported session type."),d.f.reject(e),d.f=null):c.sessionId&&d.a?(d.a.reject(e),d.a=null):(e=c.systemCode,c.errorCode.code===MediaKeyError.MEDIA_KEYERR_OUTPUT?bn(d,_.Kd):1===e?bn(d,"expired"):
204
- bn(d,_.dd))}}}))};an=function(a,b){let c=a.j.get(b);return c?c:(c=a.h.shift())?(c.sessionId=b,a.j.set(b,c),c):null};bn=function(a,b){Ym(a.keyStatuses,b);b=new _.F(ed);a.dispatchEvent(b)};dn=function(a,b){return a.o?a.o+b.charAt(0).toUpperCase()+b.slice(1):b};
205
- en=function(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;let d;try{if(a.j===_.Nd)if(c)d=_.I(_.Ig("LOAD_SESSION|"+c));else{const f=_.Ig("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.I(b),f.byteLength);d=g}else d=_.I(b)}catch(f){return Promise.reject(f)}a.f=new _.Mk;const e=dn(a,"generateKeyRequest");try{a.h[e](a.g,d)}catch(f){if(f.name!==Fa)return a.f=null,Promise.reject(f);(new _.Yh(()=>{try{a.h[e](a.g,d)}catch(g){a.f.reject(g),
206
- a.f=null}})).da(.01)}return a.f};fn=function(a,b,c){if(a.a)a.a.then(()=>fn(a,b,c)).catch(()=>fn(a,b,c));else{a.a=b;if(a.g===Re){var d=_.Eg(c);var e=JSON.parse(d);"oct"!==e.keys[0].kty&&(a.a.reject(Error("Response is not a valid JSON Web Key Set.")),a.a=null);d=_.Ug(e.keys[0].k);e=_.Ug(e.keys[0].kid)}else d=_.I(c),e=null;var f=dn(a,"addKey");try{a.h[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
207
- gn=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.$c?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};hn=function(a){a=a.target;if(a.webkitPresentationMode===Od){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement===a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)};
208
- jn=function(){return this.webkitSupportsPresentationMode(Od)?(this.webkitSetPresentationMode(Od),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};kn=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
209
- ln=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};mn=function(a,b,c){return new window.TextTrackCue(a,b,c)};nn=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};pn=function(a,b,c){if("input"===a)switch(this.type){case "range":a=uc}on.call(this,a,b,c)};qn=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
210
- rn=function(a){return qn()-a.a};tn=function(a){const b=new sn;b.a=a.a;return b};_.un=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.wn=function(a,b,c,d){return _.y(function*(){try{return new (yield vn(a,b,c,d))}catch(e){throw e.a(_.G),e;}})};
211
- vn=function(a,b,c,d){return _.y(function*(){if(d){var e=_.xn[d.toLowerCase()];if(e)return e;_.D("Could not determine manifest type using MIME type ",d)}if(e=_.yn(a)){const f=_.zn[e];if(f)return f;_.D("Could not determine manifest type for extension ",e)}else _.D("Could not find extension for ",a);if(!d&&(d=yield An(a,b,c))){if(e=_.xn[d])return e;_.D("Could not determine manifest type using MIME type",d)}throw new _.H(_.G,4,4E3,{url:a});})};
212
- _.yn=function(a){a=(new _.cg(a)).ya.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};An=function(a,b,c){return _.y(function*(){var d=_.jh(a);hh(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).P).headers["content-type"])?d.toLowerCase():""})};Bn=function(a,b){var c=a.f+b.byteLength;if(a.a.byteLength<c){let d=a.a.byteLength;for(;d<c;)d*=2;c=new Uint8Array(d);c.set(a.a);a.a=c}a.a.set(b,a.f);a.f+=b.byteLength};
213
- Cn=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(Bn(a,e),mh(c,e.byteLength,rn(a.g)),a.g.a=qn());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>Cn(a,b,c))})};
214
- En=function(a){const b=a.uris[a.uriIndex],c=new Dn,d=new sn,e=tn(d);let f=0,g;const h=new _.Mk;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;let k=!1,l=!1;c.onreadystatechange=function(m){m=m.target;m.readyState>=XMLHttpRequest.LOADING&&0===f&&(g=rn(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(na),lh(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
215
- const q={};for(const t of n)n=t.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const t=rn(e);l||mh(a,m.response?m.response.length:0,t);const u=_.kh(q,m.response,m.status,b,m.responseURL,a,t,g);a.rateLimitBps?nh(a.rateLimitBps,rn(e),a.bytesLoaded).then(()=>{h.resolve(u)}):h.resolve(u)}catch(t){h.reject(t)}};c.onerror=function(m){m=m.target;if(0>=m.status)h.reject(new _.H(1,1,1002,{url:b,request:a,status:m.status}));else{var n=m.getAllResponseHeaders();const t={};if(n){n=n.trim().split("\r\n");
216
- for(var q of n)n=q.split(": "),t[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.kh(t,m.response,m.status,b,m.responseURL,a,rn(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=rn(d);d.a=qn();if(100<n||m.lengthComputable&&m.loaded===m.total)mh(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,
217
- 7001,{url:b,request:a}));return Promise.resolve()}}};Fn=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};Gn=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)};
218
- In=function(a){if(0<=a.m&&a.f<a.m)return null;let b=Hn(a);for(;null!==b;){if(b.name===_.qd){const c={start:a.g,end:b.end,length:b.end-a.g,data:new DataView(a.h.a.buffer,a.g,b.end-a.g),count:1};a.g=b.end;return c}b=Hn(a)}return null};
219
- Jn=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,rn(a.o)),a.o.a=qn());if(f)return e=Fn(a),(e=c(!0,e))?e.then(()=>a.h.a.buffer):Promise.resolve(a.h.a.buffer);let h=Promise.resolve();if(null!=g){Gn(a,g);var k=In(a);for(e=[];k;)e.push(k),k=In(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=
220
- c(!1,k))&&(h=e)}}return h.then(()=>Jn(a,b,c,d))})};
221
- Hn=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Kn(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Kn(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};
222
- Kn=function(a){const b=a.j.getUint32(a.a,!1);a.a+=4;return b};
223
- Nn=function(a){a.g=a.A.then(e=>{a.h=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=Ln(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Ln(e.request.fuzzFactor,.5));a.f*=Ln(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.j=h;Mn(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.H(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
224
- let b=0,c=0,d=0;return a.g.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.P}).then(e=>{a.o.resolve(e)}).catch(e=>{if(e instanceof _.H){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return Nn(a);g&&e.a(_.G);a.o.reject(e)}else a.o.reject(e)})};Mn=function(a,b,c){a.m=setTimeout(b,c)};Ln=function(a,b){return null===a||void 0===a?b:a};
225
- Rn=function(a){var b=new On;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Pn,d={Bc:!1,af:!1};b={P:Qn(a.uris[a.uriIndex],a,{body:a.body||void 0,headers:b,method:a.method,signal:c.signal,credentials:a.allowCrossSiteCredentials?"include":void 0},d),request:a,abort:()=>{d.Bc||(d.Bc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.af=!0;c.abort()},a);b.P=b.P.finally(()=>{window.clearTimeout(e)})}return b};
226
- Qn=function(a,b,c,d){return _.y(function*(){let e,f,g;const h=new sn,k=tn(h);try{e=yield Sn(a,c);g=rn(h);const m=e.headers.get(na);lh(b,m);const n=m?parseInt(m,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const q=e.body.getReader();f=yield Jn(new Tn(n,!b.disableMergedFragments),q,(t,u)=>{if(d.Bc)return null;u&&u.data&&(mh(b,u.data.byteLength,rn(h)),h.a=qn());return b.onFragment&&u?b.rateLimitBps?nh(b.rateLimitBps,rn(k),b.bytesLoaded).then(()=>b.onFragment(u)):b.onFragment(u):null},
227
- b.onProgress)}else{const q=e.body.getReader();f=yield Cn(new Un(n),q,b);b.rateLimitBps&&(yield nh(b.rateLimitBps,rn(k),f.byteLength))}}catch(m){if(d.Bc)throw new _.H(1,1,7001,{url:a,request:b});if(d.af)throw new _.H(1,1,1003,{url:a,request:b});_.Hf("Error while fetching data:",m);throw new _.H(1,1,1002,{url:a,error:m,request:b,status:-1},m);}const l={};e.headers.forEach((m,n)=>{l[n.trim()]=m});if(d.Bc)throw new _.H(1,1,7001,{url:a,request:b});return _.kh(l,f,e.status,a,e.url,b,rn(k),g)})};
228
- Wn=function(a){try{const b=a.uris[a.uriIndex],c=_.Vn(b);return{P:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{P:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
229
- _.Vn=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.Hf("Bad data URI, failed to parse scheme"),new _.H(_.G,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.Hf("Bad data URI, failed to extract encoding and MIME type"),new _.H(_.G,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];let d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.Ug(a).buffer:_.Ig(a).buffer,contentType:c}};_.Yn=function(a){delete _.Xn[a]};
230
- _.co=function(a){if(!a.o)return null;const b=a.G;switch(a.o){case Zn:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case $n:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case ao:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case bo:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Ad}};cf="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
231
- df=typeof Object.defineProperties==_.$c?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
232
- ef("Promise",function(a){function b(g){this.f=0;this.j=void 0;this.a=[];var h=this.g();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.f=function(g){if(null==this.a){this.a=[];var h=this;this.g(function(){h.j()})}this.a.push(g)};var e=cf.setTimeout;c.prototype.g=function(g){e(g,0)};c.prototype.j=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
233
- g[h];g[h]=null;try{k()}catch(l){this.h(l)}}}this.a=null};c.prototype.h=function(g){this.g(function(){throw g;})};b.prototype.g=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.B),reject:g(this.h)}};b.prototype.B=function(g){if(g===this)this.h(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.C(g);else{a:switch(typeof g){case _.Bd:var h=null!=g;break a;case _.$c:h=!0;break a;default:h=!1}h?this.A(g):this.m(g)}};
234
- b.prototype.A=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.$c?this.F(h,g):this.m(g)};b.prototype.h=function(g){this.o(2,g)};b.prototype.m=function(g){this.o(1,g)};b.prototype.o=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.j=h;this.w()};b.prototype.w=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.f(this.a[g]);this.a=null}};var f=new c;b.prototype.C=function(g){var h=this.g();
235
- g.Sc(h.resolve,h.reject)};b.prototype.F=function(g,h){var k=this.g();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,t){return typeof q==_.$c?function(u){try{l(q(u))}catch(x){m(x)}}:t}var l,m,n=new b(function(q,t){l=q;m=t});this.Sc(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Sc=function(g,h){function k(){switch(l.f){case 1:g(l.j);break;case 2:h(l.j);break;default:throw Error("Unexpected state: "+
236
- l.f);}}var l=this;null==this.a?f.f(k):this.a.push(k)};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=bf(g),m=l.next();!m.done;m=l.next())d(m.value).Sc(h,k)})};b.all=function(g){var h=bf(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(x){q[u]=x;t--;0==t&&l(q)}}var q=[],t=0;do q.push(void 0),t++,d(k.value).Sc(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var gf=this||self;
237
- gf.a=!0;_.z("clpp.utils.obj.cloneItem",_.kf);_.z("clpp.utils.obj.merge",_.jf);var yf={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",yf);var wf=3,vf={},eo=[];_.z("clpp.log.getLoggers",function(){return _.kf(vf)});_.z("clpp.log.addInterceptor",function(a){a&&eo.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=eo.indexOf(a),0<=a&&eo.splice(a,1))});_.z("clpp.log.getTagLevel",xf);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=vf[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.pf(b)&&(b=zf(b)),vf[a]=b)});
238
- _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.pf(a)&&(a=zf(a));wf=a});_.z("clpp.log.getLogLevel",function(){return wf});
239
- _.O=class{constructor(a){(this.tag=a)&&void 0===vf[a]&&(vf[a]=-1)}log(a,b){if(window.console){if(1<arguments.length){var c=arguments[0];Array.prototype.shift.call(arguments)}else c=3;var d=xf(this.tag);if(0<=d){if(d<c)return}else if(wf<c)return;this.tag&&Array.prototype.unshift.call(arguments,"["+this.tag+"]");d=new Date;d.toISOString&&(d=d.toISOString().substring(11).replace("Z",""),Array.prototype.unshift.call(arguments,d));4===c?console.log.apply(console,arguments):3===c?console.info.apply(console,
240
- arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of eo)e.call(e,c,arguments)}}info(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)}debug(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)}warn(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)}error(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)}vf(a){return a?
241
- this.tag?new _.O(this.tag+"."+a):new _.O(a):this}};_.z("clpp.log.Logger",_.O);_.O.prototype.createChild=_.O.prototype.vf;_.O.prototype.error=_.O.prototype.error;_.O.prototype.warn=_.O.prototype.warn;_.O.prototype.debug=_.O.prototype.debug;_.O.prototype.info=_.O.prototype.info;_.O.prototype.log=_.O.prototype.log;var Af=new _.O("clpp");_.z("clpp.log.info",_.Bf);_.z("clpp.log.debug",_.Gf);_.z("clpp.log.warn",_.D);_.z("clpp.log.error",_.Hf);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Pm,Qm;Pm=class{constructor(a,b){this.Gb=a;this.a=b}};Qm=class{constructor(a,b){this.a=a;this.f=b}};_.Jf=new _.O("clpp.players");_.If={};_.fo=class{constructor(){this.a={}}push(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]}get(a){return(a=this.a[a])?a.slice():[]}remove(a,b){a=this.a[a];if(!a)return!1;let c=!1;for(let d=0;d<a.length;++d)a[d]==b&&(a.splice(d,1),--d,c=!0);return c}clear(){this.a={}}forEach(a){for(const b in this.a)a(b,this.a[b])}};var go,ho;go=class{constructor(a,b,c,d){this.f=a;this.ic=b;this.a=c;this.fg=!!d}Pb(a){try{this.ic.handleEvent?this.ic.handleEvent(a):this.ic.call(this.a,a)}catch(b){_.Hf("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
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)}}};
242
244
  _.F=class{constructor(a,b){if(b)for(const c in b)this[c]=b[c];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.f=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.f=!0}stopPropagation(){}};
243
- ho=class{constructor(a){this.a=new _.fo;this.f=a}trigger(a){const b=this.a.get(a.type);if(b)for(let c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].Pb(a),b[c].fg&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new go(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new go(a,b,c||this.f,!0));return b}off(a,b){const c=this.a.get(a);let d=!1;if(c)for(let e=0;e<c.length;e++)c[e].ic===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var io;_.jo=class{constructor(){this.a=new _.fo}release(){_.Mf(this)}on(a,b,c,d=!1){a=new io(a,b,c,d);this.a.push(b,a)}one(a,b,c){const d=e=>{this.off(a,b,d);return c(e)};this.on(a,b,d)}off(a,b,c){const d=this.a.get(b)||[];for(let e=0;e<d.length;++e){const f=d[e];f.target!=a||c!=f.a&&c||(Lf(f),this.a.remove(b,f))}}};io=class{constructor(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)}};var ko=class{constructor(a){this.l=a;this.m=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.h=null;this.f=new _.jo;this.a=this.j=null;this.g=[];this.o=new _.O("clpp.native.Metadata")}release(){this.f.release();this.g=[];this.a=null}destroy(){const a=this;return _.y(function*(){a.release();a.j=null;a.h=null})}getTimelineCues(){return this.g}};_.ro=class{constructor(a,b,c,d){d=void 0===d?_.lo:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.mo;this.writingMode=_.no;this.lineInterpretation=_.oo;this.line=null;this.lineAlign=_.po;this.direction=qo;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}};_.z("clpp.text.Cue",_.ro);_.ro.positionAlign={LEFT:_.ld,RIGHT:_.md,CENTER:_.sc,AUTO:"auto"};_.lo=_.v;
244
- _.ro.payloadType={TEXT:_.lo,VTT_XML:_.Oe,TTML_XML:_.we};_.mo=_.sc;_.so={LEFT:_.fd,RIGHT:_.ce,CENTER:_.mo,START:_.fd,END:_.ce};_.ro.textAlign=_.so;var qo="ltr";_.ro.direction={HORIZONTAL_LEFT_TO_RIGHT:qo,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.no="horizontal-tb";_.ro.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.no,VERTICAL_LEFT_TO_RIGHT:_.Ee,VERTICAL_RIGHT_TO_LEFT:_.Fe};_.oo=0;_.ro.lineInterpretation={LINE_NUMBER:_.oo,PERCENTAGE:1};_.po=_.ie;_.to={CENTER:_.sc,START:_.po,END:_.Wc};_.ro.lineAlign=_.to;
245
- _.wo=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.uo;this.scroll=vo;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.wo);_.uo=1;_.wo.units={PX:0,PERCENTAGE:_.uo,LINES:2};var vo="";_.wo.scrollMode={NONE:vo,UP:"up"};_.wo.displayAlign={BEFORE:"flex-end",CENTER:_.sc,AFTER:"flex-start"};
246
- _.wo.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Ec,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var xo=class{constructor(a){this.l=a;this.j=a.getTextDisplayer();this.f=this.g=null;this.a=new _.jo;this.h=!1;this.m=new _.O("clpp.native.CueHandler")}destroy(){this.a.release();this.h=!1;this.j=this.a=this.g=this.f=null;return Promise.resolve()}start(a){this.h?this.m.warn("Already started. Ignoring request..."):(this.h=!0,this.g=a,this.f=this.g.textTracks,this.a.on(this.f,_.Kb,b=>Xf(this,b)),this.a.on(this.f,uc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.fe&&(d.mode=
247
- _.bd)}}}))}o(a){const b=new _.ro(a.startTime,a.endTime,a.text,_.Oe);if(_.pf(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Ee;break;case "rl":b.writingMode=_.Fe}_.qf(a.size)&&(b.size=a.size);if(_.pf(a.align))switch(a.align){case _.fd:case _.ie:b.textAlign=_.fd;break;case _.sc:b.textAlign=_.mo;break;case _.ce:case _.Wc:b.textAlign=_.ce}_.qf(a.position)&&(b.position=a.position);if(_.pf(a.positionAlign))switch(a.positionAlign){case _.ld:b.positionAlign=_.ld;break;case _.sc:b.positionAlign=
248
- _.sc;break;case _.md:b.positionAlign=_.md}_.qf(a.line)&&(b.line=a.line);if(_.pf(a.lineAlign))switch(a.lineAlign){case _.ie:b.lineAlign=_.po;break;case _.sc:b.lineAlign=_.sc;break;case _.Wc:b.lineAlign=_.Wc}typeof a.snapToLines===_.fc&&(b.lineInterpretation=a.snapToLines?_.oo:1);return b}};var hg=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;$e=_.cg.prototype;$e.Ua="";$e.ec="";$e.Ma="";$e.xc=null;$e.ya="";$e.Vb="";$e.toString=function(){var a=[],b=this.Ua;b&&a.push(kg(b,yo,!0),":");if(b=this.Ma){a.push("//");var c=this.ec;c&&a.push(kg(c,yo,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.xc;null!=b&&a.push(":",String(b))}if(b=this.ya)this.Ma&&"/"!=b.charAt(0)&&a.push("/"),a.push(kg(b,"/"==b.charAt(0)?zo:Ao,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Vb)&&a.push("#",kg(b,Bo));return a.join("")};
249
- $e.resolve=function(a){var b=new _.cg(this);"data"===b.Ua&&(b=new _.cg);var c=!!a.Ua;c?dg(b,a.Ua):c=!!a.ec;c?b.ec=a.ec:c=!!a.Ma;c?b.Ma=a.Ma:c=null!=a.xc;var d=a.ya;if(c)eg(b,a.xc);else if(c=!!a.ya){if("/"!=d.charAt(0))if(this.Ma&&!this.ya)d="/"+d;else{var e=b.ya.lastIndexOf("/");-1!=e&&(d=b.ya.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):
250
- ".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.ya=d:c=""!==a.a.toString();c?_.fg(b,gg(a.a)):c=!!a.Vb;c&&(b.Vb=a.Vb);return b};var yo=/[#\/\?@]/g,Ao=/[#\?:]/g,zo=/[#\?]/g,lg=/[#\?@]/g,Bo=/#/g;jg.prototype.a=null;jg.prototype.g=null;jg.prototype.add=function(a,b){_.ng(this);this.f=null;var c=this.a.hasOwnProperty(a)&&this.a[a];c||(this.a[a]=c=[]);c.push(b);null!==this.g&&this.g++;return this};
251
- jg.prototype.toString=function(){if(this.f)return this.f;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="\x3d"+encodeURIComponent(d[e]));a.push(f)}return this.f=a.join("\x26")};_.Co=1/15;var Do;Do={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Nh=(a,b)=>{const c=Do[a];for(let d=0;d<c.length;d++)for(let e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return a===_.v?"":null};_.Eo={text:{mp4:Tb,m4s:Tb,m4i:Tb,cmft:Tb,vtt:_.se,ttml:_.Wb},video:{mp4:_.Je,m4s:_.Je,m4i:_.Je,m4v:_.Je,cmfv:_.Je,ts:_.He},audio:{mp4:_.bc,m4s:_.bc,m4i:_.bc,m4a:_.bc,cmfa:_.bc,ts:_.He,aac:_.Zb,ec3:_.ac,ac3:_.$b},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.Qh=(a,b,c)=>a.map(d=>{d=_.Fo(d)||"";return d=(d=_.Eo[b][d])?d:b===_.v?c&&"vtt"!==c?Tb:_.se:null}).filter(Boolean)[0]||null;
252
- _.Fo=a=>{a=(new _.cg(a)).ya.split(".");return 1>=a.length?null:a.pop()};_.H=class extends Error{constructor(a,b,c,d,e){super(og(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.pf(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.H)}a(a){this.severity!==a&&(this.severity=a,this.message=og(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.z("clpp.Error",_.H);_.G=2;_.H.Severity={RECOVERABLE:1,FATAL:_.G};
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};
253
251
  _.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
254
252
  _.H.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,FETCH_OR_APPEND_ERROR:2010,INVALID_MP4:2011,
255
253
  TEXT_PARSER_MISSING:2012,THUMBNAILS_FAILED_TO_LOAD:2013,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,
@@ -259,56 +257,60 @@ DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_
259
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,
260
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,
261
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,
262
- MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3};_.dh=class{constructor(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}toString(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}let b="#"+this.name;const c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b}getAttribute(a){const b=this.attributes.filter(c=>c.name==a);return b.length?b[0]:null}};_.ch=class{constructor(a,b){this.name=a;this.value=b}};var qg=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
263
- "cs"],["dan","da"],["deu","de"],[_.Oc,"dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
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",
264
266
  "is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
265
267
  "mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
266
268
  "sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
267
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var Go=class{};_.z("clpp.utils.BufferUtils",Go);Go.toArrayBuffer=Cg;Go.toDataView=_.Bg;Go.toInt32Array=_.Ag;Go.toUint32Array=zg;Go.toUint16Array=yg;Go.toUint8Array=_.I;Go.equal=wg;var Fg=new _.O("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.Eg);_.z("clpp.utils.strings.fromBytesAutoDetect",_.Hg);_.z("clpp.utils.strings.toUtf8",_.Ig);_.z("clpp.utils.strings.toUtf16",_.Jg);_.z("clpp.utils.strings.toByteArray",_.Kg);_.z("clpp.utils.strings.startsWith",_.Lg);_.z("clpp.utils.strings.endsWith",_.Mg);_.z("clpp.utils.strings.bitrateToString",_.Pg);
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);
268
270
  _.z("clpp.utils.strings.durationToString",function(a,b="%h:%mm:%ss"){if(null===a||void 0===a)a=0;if(null===b||void 0===b)b="%h:%mm:%ss";const c=Math.floor(a/3600),d=Math.floor((a-3600*c)/60);a=Math.floor(a-3600*c-60*d);const e=(g,h)=>g.length<h?e("0"+g,h):g,f=g=>(h,k)=>e(g,k.length-1);return b.replace(/(%h+)/,f(String(c))).replace(/(%m+)/,f(String(d))).replace(/(%s+)/,f(String(a)))});
269
- _.z("clpp.utils.strings.hashCode",function(a){let b=0;if(0===a.length)return b;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b});var Qg=document.createElement("span");var Ho=class{};_.z("clpp.utils.Uint8ArrayUtils",Ho);Ho.toStandardBase64=_.Sg;Ho.concat=_.$g;Ho.equal=_.Zg;Ho.toHex=_.Yg;Ho.fromHex=_.Vg;Ho.fromBase64=_.Ug;Ho.toBase64Url=_.Tg;_.bh=class{constructor(a){this.f=a;this.a=0}};var fh=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",fh);_.z("clpp.net.makeRequest",_.jh);_.ih=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.ih});_.Mk=class{constructor(){let a,b;const c=new Promise((d,e)=>{a=d;b=e});c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.Tl=class{constructor(a,b){this.P=a;this.w=b;this.a=!1}abort(){this.a=!0;return this.w()}Uc(a,b){const c=new _.Mk;let d=()=>{c.reject(new _.H(_.G,7,7001));return this.abort()};this.P.then(e=>{this.a?c.reject(new _.H(_.G,7,7001)):a?d=oh(a,e,c):c.resolve(e)},e=>{b?d=oh(b,e,c):c.reject(e)});return new _.Tl(c,()=>d())}};_.Tl.aborted=function(){const a=Promise.reject(new _.H(_.G,7,7001));a.catch(()=>{});return new _.Tl(a,()=>Promise.resolve())};_.Tl.prototype.chain=_.Tl.prototype.Uc;_.Io=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.P.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.Em=class{constructor(){this.f=[];this.g=[];this.m=!1;this.j=new _.Io;this.a={};this.h=0;this.a.data=Wn;!window.fetch||!window.AbortController||_.bi(6)||_.ei()&&68<_.Bi().browserVersion.major?(this.a.http=En,this.a.https=En):(this.a.http=Rn,this.a.https=Rn)}kg(a){0<a?_.D("Rate limit set to "+a+"bps"):_.D("Rate limit disabled");this.h=a}release(){return this.j.destroy()}destroy(){this.m=!0;this.f=[];this.g=[];return this.j.destroy()}me(a){this.f.push(a)}Rc(a){this.g.push(a)}Te(a){this.f=this.f.filter(b=>
270
- b!==a)}jd(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.m)return new Jo(Promise.reject(new _.H(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.h&&0<this.h&&(a.rateLimitBps=this.h);var b=[];for(const f of this.f)b.push(f);if(a.requestModifiers)for(const f of a.requestModifiers)b.push(f);a.requestModifiers=b;b=[];for(var c of this.g)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.Mk;try{for(const f of a.requestModifiers)d=d.then(g=>
271
- {if(e.a)throw new _.H(_.G,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.G,1,1006,null,g);});d=d.then(f=>{var g=new _.cg(f.uris[f.uriIndex]);var h=g.Ua;h||(h=location.protocol,h=h.slice(0,-1),dg(g,h),f.uris[f.uriIndex]=g.toString());h=this.a[h];if(!h)throw new _.H(_.G,1,1E3,{url:g.toString()});g=h;return{request:f,plugin:g}});e=new Jo(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.G,1,7001,
272
- g?{url:g.request.uris[g.request.uriIndex],request:g.request}:null);};h();const k=f(g)||g;h();return k}).catch(g=>{if(g instanceof _.H&&g.data&&g.data.response){const h=f(g.data.response);if(h)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.G,1,1007,null,g);});_.qh(this.j,e);c.resolve(a);return e}catch(f){return new Jo(Promise.reject(f))}}};_.z("clpp.net.NetworkEngine",_.Em);_.Em.prototype.fetch=_.Em.prototype.fetch;
273
- _.Em.prototype.removeResponseModifier=_.Em.prototype.jd;_.Em.prototype.removeRequestModifier=_.Em.prototype.Te;_.Em.prototype.addResponseModifier=_.Em.prototype.Rc;_.Em.prototype.addRequestModifier=_.Em.prototype.me;_.Em.prototype.setRateLimit=_.Em.prototype.kg;var uh;_.xh=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.channelsCount=this.src=this.mimeType=this.frameRate=this.label=this.language=this.kind=null;this.renditions=[];this.accessibility=[]}toString(){return`Track type: ${this.type} id: ${this.id}
274
- renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.xh);_.xh.prototype.toString=_.xh.prototype.toString;_.Fh=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.drm=this.drmInfo=this.codec=this.Ac=this.bandwidth=this.height=this.width=null}};_.z("clpp.Rendition",_.Fh);_.wh=1;_.L=_.w;_.K=_.p;_.J=_.v;uh=_.td;_.Ko={VIDEO:_.L,AUDIO:_.K,TEXT:_.J,METADATA:uh};_.xh.Type=_.Ko;_.Jj=class{constructor(a){this.h=a;this.scheme=null;const b=document.createElement("a"),c=a.match(/^(.*:)(\/\/(.*))$/);let d=!1;if(c){if(this.scheme=c[1],b.href=c[2],":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+c[3],d=!0}else{b.href=a;if(":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+a.match(/\/?\/?(.*)/)[1],d=!0;this.scheme=b.protocol}""===this.scheme&&(this.scheme=window.location.protocol);this.a=d?"":b.hostname;this.port=b.port;this.path=b.pathname;
275
- _.Lg(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.g=b.hash}};_.z("clpp.utils.url.queryString",_.Ah);var Lo=class{constructor(a){this.g=a;this.a=new _.O("clpp.native.hls.HlsMetadataParser");this.f=ag(this.h.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}h(a,b){const c=this;return _.y(function*(){let d=null;try{d=yield Dh(c,a)}catch(f){return c.a.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield Hh(c,d,
276
- a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.a.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield Jh(d);e.uc=f}catch(f){c.a.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.Rh=[];_.P=class{rd(){return!0}Df(a){return this.getVideoTracks().find(b=>_.rf(b,a,a&&Object.keys(a)))}zf(a){return this.getAudioTracks().find(b=>_.rf(b,a,a&&Object.keys(a)))}Bf(a){return this.ja().find(b=>_.rf(b,a,a&&Object.keys(a)))}Cf(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.rf(b,a,a&&Object.keys(a)))}yf(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.rf(b,a,a&&Object.keys(a)))}Af(a){return this.ja().flatMap(b=>b.renditions).find(b=>_.rf(b,a,a&&Object.keys(a)))}};
277
- _.z("clpp.TrackManager",_.P);_.P.prototype.isAbrEnabled=_.P.prototype.la;_.P.prototype.addTextTrack=_.P.prototype.addTextTrack;_.P.prototype.findTextRendition=_.P.prototype.Af;_.P.prototype.findAudioRendition=_.P.prototype.yf;_.P.prototype.findVideoRendition=_.P.prototype.Cf;_.P.prototype.findTextTrack=_.P.prototype.Bf;_.P.prototype.findAudioTrack=_.P.prototype.zf;_.P.prototype.findVideoTrack=_.P.prototype.Df;_.P.prototype.setTextRendition=_.P.prototype.lb;_.P.prototype.setAudioRendition=_.P.prototype.kb;
278
- _.P.prototype.setVideoRendition=_.P.prototype.Va;_.P.prototype.setTextTrack=_.P.prototype.Da;_.P.prototype.setAudioTrack=_.P.prototype.ta;_.P.prototype.setVideoTrack=_.P.prototype.Wa;_.P.prototype.getTextTrack=_.P.prototype.oa;_.P.prototype.getAudioTrack=_.P.prototype.na;_.P.prototype.getVideoTrack=_.P.prototype.Ia;_.P.prototype.getLoadingTextRendition=_.P.prototype.fb;_.P.prototype.getLoadingAudioRendition=_.P.prototype.eb;_.P.prototype.getLoadingVideoRendition=_.P.prototype.Ra;
279
- _.P.prototype.getTextRendition=_.P.prototype.Ga;_.P.prototype.getAudioRendition=_.P.prototype.Fa;_.P.prototype.getVideoRendition=_.P.prototype.ia;_.P.prototype.getTextTracks=_.P.prototype.ja;_.P.prototype.getAudioTracks=_.P.prototype.getAudioTracks;_.P.prototype.getVideoTracks=_.P.prototype.getVideoTracks;_.P.prototype.canSelectVideoTracks=_.P.prototype.rd;_.Mo=new Map;_.No=(new Map).set(_.Dc,_.Dc).set("frameRate","framerate").set("bandwidth","bitrate").set(_.We,_.We).set(_.ad,_.ad).set("channelsCount","channels");_.Oo=class{constructor(a){this.f=a;this.a=null}da(a){return Vh(this,a,!1)}Xa(a){return Vh(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Yh=class{constructor(a){this.f=a;this.a=null}ee(){this.stop();this.f();return this}da(a){this.stop();this.a=(new _.Oo(()=>{this.f()})).da(a);return this}Xa(a){this.stop();this.a=(new _.Oo(()=>{this.f()})).Xa(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.Yh);_.Yh.prototype.stop=_.Yh.prototype.stop;_.Yh.prototype.tickEvery=_.Yh.prototype.Xa;_.Yh.prototype.tickAfter=_.Yh.prototype.da;_.Yh.prototype.tickNow=_.Yh.prototype.ee;var Po=class{};_.z(Cc,Po);Po.getInfo=_.Bi;
280
- var Xh=null,Wh=null,oi=new _.O(Cc),si="android",ri="ios",zi="linux",ti="osx",wi="windows",xi="tizen",yi="webos",qi=ye,Ai=ye,ji={windows:{os_version:/windows\s+?nt\s([\d.]+)/i,ie:/windows\s+?nt.+?trident\/[\d.]+.*rv:([\d.]+)/i,edge:/windows\s+?nt.+?edge?\/([\d.]+)/i,chrome:/windows\s+?nt.+?chrome\/([\d.]+)/i,firefox:/windows\s+?nt.+?firefox\/([\d.]+)/i,opera:/windows\s+?nt.+?opr\/([\d.]+)/i},osx:{os_version:/macintosh.+?([\d._]+)/i,safari:/macintosh.+?version\/([\d._]+).+?safari/i,edge:/macintosh.+?edge?\/([\d._]+)/i,
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,
281
283
  chrome:/macintosh.+?chrome\/([\d._]+)/i,firefox:/macintosh.+?firefox\/([\d._]+)/i,opera:/macintosh.+?opr\/([\d._]+)/i},unknown:{ie:/.+?trident\/([\d.]+)/i,edge:/.+?edge?\/([\d.]+)/i,safari:/.+?version\/([\d._]+).+?safari/i,chrome:/.+?chrome\/([\d._]+)/i,firefox:/.+?firefox\/([\d._]+)/i,opera:/.+?opr\/([\d._]+)/i},android:{os_version:/android.+?([\d._]+)/i,chrome:/android.+?chrome\/([\d._]+)/i,firefox:/android.+?firefox\/([\d._]+)/i,opera:/android.+?opr\/([\d._]+)/i},ios:{os_version:/(?:iPad|iPhone).+?([\d._]+)/i,
282
284
  chrome:/.+?CriOS\/([\d._]+)/i,firefox:/.+?FxiOS\/([\d._]+)/i,safari:/.+?version\/([\d._]+).+?safari/i,opera:/.+?opr\/([\d._]+)/i},linux:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i},tizen:{os_version:/tizen.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i},
283
- webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var Q=class extends _.P{constructor(){super();this.a=new _.O("clpp.native.TrackManager");this.l=null;this.g=new _.jo;this.h=[];this.G=0;this.o={};this.I=[];this.f=new Map;this.w=null;this.m=new Map;this.A=!0;this.N=this.B.bind(this,_.J);this.T=this.F.bind(this,_.J);this.R=this.C.bind(this,_.J);this.V=this.B.bind(this,_.L);this.Y=this.F.bind(this,_.L);this.W=this.C.bind(this,_.L);this.J=this.B.bind(this,_.K);this.M=this.F.bind(this,_.K);this.K=this.C.bind(this,_.K);this.j=null}rd(){return!_.li()}B(a,
284
- b){const c=this;return _.y(function*(){if(b){var d=b.track;if(d){var e=b.target,f=c.h.find(l=>Ci(l,d,a));if(f)c.a.warn("Track from event already exists",d,f);else{var g=yh(a,d),h=Di(d);if(a===_.J){if(d.kind===_.td)return;var k;void 0!==d.id?k=c.o[d.id]:k=Object.values(c.o).find(l=>Ci(g,l,a));g.kind&&"captions"===g.kind&&(g.mimeType=_.Rb);k&&(g.src=k.url,g.mimeType=k.mimeType)}else if(f=c.h.find(l=>l.type===a&&_.rf(l,g,["kind","label","language"]))){f.id=d.id;h&&(c.a.debug(`Setting native ${a} track active`),
285
- c.f.set(a,f));c.a.debug("Track from event seems to already exists, flipped native track to",d);return}try{g.renditions.push(new _.Fh(g.id,g));c.h.push(g);const l=c.l.getConfiguration().safari;Fi(c,a,l)?yield Gi(c,g,l):Hi(c,a,l)&&(yield Ii(c,g,l));c.a.debug(a+" Track added",g);c.l.trigger(new _.F(_.Qo));const m=Ji(c,a).length;f=a===_.L;k=a===_.K||f;const n=!(!e||!e.length),q=e&&e.length||0;e=()=>{c.a.debug(`Setting native ${a} track active. `+`Native track active: ${h}. `+`Number of tracks: ${m}`,
286
- d);c.f.set(a,g)};h?e():1===m&&k&&(f?e():n&&1!==q||e())}catch(l){c.a.error("Error while converting track data",l)}}}else c.a.warn(Qa)}else c.a.warn(Pa)})}F(a,b){if(b){var c=b.track;c?a===_.J&&c.kind!==_.td&&(b=this.h.find(d=>Ci(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.f.get(a)||null)===b&&(this.f.set(a,null),Ki(this)),this.a.debug(a+" Track removed, id: ",b.id)):this.a.warn(Qa)}else this.a.warn(Pa)}C(a,b){this.a.debug(a+" Track changed",b);a===_.J&&Ki(this);const c=Mi(this,a);if(c)for(let d=
287
- 0;d<c.length;++d)if(Di(c[d])){if(b=this.h.find(e=>Ci(e,c[d],a)))this.f.set(a,b),this.a.debug("Track change detected, id:",b.id),b===this.m.get(a)&&this.m.set(a,null),a===_.K?this.l.trigger(new _.F(_.Pi)):a===_.J&&this.l.trigger(new _.F(_.Qi));break}}initialize(a){this.l=a;this.j=new Lo(a.getNetworkEngine())}load(){this.A=!1;var a=Li(this,_.J);a&&(this.g.on(a,_.Kb,this.N),this.g.on(a,$d,this.T),this.g.on(a,uc,this.R));if(a=Li(this,_.K))this.g.on(a,_.Kb,this.J),this.g.on(a,$d,this.M),this.g.on(a,uc,
288
- this.K);if(a=Li(this,_.L))this.g.on(a,_.Kb,this.V),this.g.on(a,$d,this.Y),this.g.on(a,uc,this.W);this.g.one(this.l,nc,this.H.bind(this))}release(){this.A=!0;this.h=[];this.o={};this.f.clear();this.m.clear();this.g.release()}destroy(){this.release();this.l=null}getVideoTracks(){return Ji(this,_.L)}getAudioTracks(){return Ji(this,_.K)}ja(){return Ji(this,_.J)}ia(){const a=this.f.get(_.L)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);
289
- if(b)return b}return a.renditions[0]||null}Fa(){return Ni(this,_.K)}Ga(){return Ni(this,_.J)}Ra(){return Oi(this,_.L)}eb(){return Oi(this,_.K)}fb(){return Oi(this,_.J)}Ia(){return this.f.get(_.L)||null}na(){return this.f.get(_.K)||null}oa(){return this.f.get(_.J)||null}Wa(a){Ri(this,_.L,a)}ta(a){Ri(this,_.K,a)}Da(a){Ri(this,_.J,a)}Va(a){Ri(this,_.L,a&&a.track)}kb(a){Ri(this,_.K,a&&a.track)}lb(a){Ri(this,_.J,a&&a.track)}addTextTrack(a){const b=this;return _.y(function*(){if(a.mimeType.match(/text\/vtt/)){const c=
290
- "External_"+`${b.G++}`;b.o[c]=a;Si(b,a,c)}else yield Ti(b,a)})}la(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.y(function*(){const b=a.l.getConfiguration();Vi(a,_.K,b.preferredAudioLanguage);if(!Mi(a,_.J).some(c=>Di(c))){const c=Li(a,_.J);yield new Promise(d=>{a.g.one(c,uc,d);(new _.Yh(d)).da(1)})}a.A||Vi(a,_.J,b.preferredTextLanguage)})}};Q.prototype.isAbrEnabled=Q.prototype.la;Q.prototype.addTextTrack=Q.prototype.addTextTrack;
291
- Q.prototype.setTextRendition=Q.prototype.lb;Q.prototype.setAudioRendition=Q.prototype.kb;Q.prototype.setVideoRendition=Q.prototype.Va;Q.prototype.setTextTrack=Q.prototype.Da;Q.prototype.setAudioTrack=Q.prototype.ta;Q.prototype.setVideoTrack=Q.prototype.Wa;Q.prototype.getTextTrack=Q.prototype.oa;Q.prototype.getAudioTrack=Q.prototype.na;Q.prototype.getVideoTrack=Q.prototype.Ia;Q.prototype.getLoadingTextRendition=Q.prototype.fb;Q.prototype.getLoadingAudioRendition=Q.prototype.eb;
292
- Q.prototype.getLoadingVideoRendition=Q.prototype.Ra;Q.prototype.getTextRendition=Q.prototype.Ga;Q.prototype.getAudioRendition=Q.prototype.Fa;Q.prototype.getVideoRendition=Q.prototype.ia;Q.prototype.getTextTracks=Q.prototype.ja;Q.prototype.getAudioTracks=Q.prototype.getAudioTracks;Q.prototype.getVideoTracks=Q.prototype.getVideoTracks;Q.prototype.canSelectVideoTracks=Q.prototype.rd;_.Ro=class{constructor(a,b="total"){this.length=(this.f=a)?a.length:0;this.a=[];this.type=b}start(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(jb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(jb);}ob(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:1===this.length&&0>this.start(0)?0:this.start(0)}Aa(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
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-
293
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=
294
- "";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.z("clpp.BufferInfo",_.Ro);_.Ro.prototype.bufferedAheadOf=_.Ro.prototype.Ea;_.Ro.prototype.isBuffered=_.Ro.prototype.Zb;_.Ro.prototype.bufferEnd=_.Ro.prototype.Aa;_.Ro.prototype.bufferStart=_.Ro.prototype.ob;_.Ro.prototype.end=_.Ro.prototype.end;_.Ro.prototype.start=_.Ro.prototype.start;_.So=class{constructor(){this.Fc=new ho(this);this.Dc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Fc.on(a,b,c)}one(a,b,c){return this.Fc.one(a,b,c)}off(a,b){return this.Fc.off(a,b)}addDelegate(a){a&&(0<=this.Dc.indexOf(a)||this.Dc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}removeDelegate(a){a&&(a=this.Dc.indexOf(a),0<=a&&this.Dc.splice(a,1))}trigger(a){this.Fc.trigger(a);for(const b of this.Dc)b.dispatchEvent(a)}};
295
- _.So.prototype.off=_.So.prototype.off;_.So.prototype.one=_.So.prototype.one;_.So.prototype.on=_.So.prototype.on;_.So.prototype.removeEventListener=_.So.prototype.removeEventListener;_.So.prototype.addEventListener=_.So.prototype.addEventListener;_.z("clpp.events.ERROR",_.Yc);_.z("clpp.events.LOADEDMETADATA",_.od);_.z("clpp.events.BUFFERING_ENDED",_.hc);_.z("clpp.events.BUFFERING_STARTED",_.ic);_.z("clpp.events.STATE_CHANGED",_.je);_.Pi="audiotrackchanged";_.z("clpp.events.AUDIO_TRACK_CHANGED",_.Pi);_.Qi="texttrackchanged";_.z("clpp.events.TEXT_TRACK_CHANGED",_.Qi);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.Le);_.z("clpp.events.BITRATE_CHANGED",_.ec);_.Qo="tracksadded";_.z("clpp.events.TRACKS_ADDED",_.Qo);_.z("clpp.events.LOAD_START",pd);
296
- _.z("clpp.events.RELEASING",_.Zd);_.z("clpp.events.RELEASED",Yd);_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.Ke);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.cc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_UPDATE",_.Sc);_.z("clpp.events.DRM_SESSION_PERSISTED",_.Rc);_.z("clpp.events.DRM_RENEWAL_STARTED",Qc);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Pc);
297
- _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.dc);_.z("clpp.events.PLAY",_.Rd);_.z("clpp.events.SEEKING",_.ee);_.z("clpp.events.SEEKED",_.de);_.z("clpp.events.USER_SEEKING",_.Ce);_.z("clpp.events.USER_SEEKED",_.Be);_.Bl={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.Bl);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.Lb);_.z("clpp.events.AD_LOADED",_.Bb);_.z("clpp.events.AD_BREAK_STARTED",_.ub);_.z("clpp.events.AD_STARTED",_.Hb);_.z("clpp.events.AD_BUFFERING",_.wb);_.z("clpp.events.AD_PROGRESS",_.Eb);
298
- _.z("clpp.events.AD_FIRST_QUARTILE",_.zb);_.z("clpp.events.AD_MIDPOINT",_.Cb);_.z("clpp.events.AD_THIRD_QUARTILE",_.Jb);_.z("clpp.events.AD_PAUSED",_.Db);_.z("clpp.events.AD_RESUMED",_.Fb);_.z("clpp.events.AD_SKIPPED",_.Gb);_.z("clpp.events.AD_CLICKED",_.xb);_.z("clpp.events.AD_IMPRESSION",_.Ab);_.z("clpp.events.AD_COMPLETED",_.yb);_.z("clpp.events.AD_STOPPED",_.Ib);_.z("clpp.events.AD_BREAK_STOPPED",_.vb);_.z("clpp.events.CASTING_STARTED",_.oc);_.z("clpp.events.CASTING_ENDED","castingended");
299
- _.z("clpp.events.CAST_STATUS_CHANGED",_.pc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.Qb);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.Ob);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.Mb);_.Rf="timeline-cue-added";_.z("clpp.events.TIMELINE_CUE_ADDED",_.Rf);_.Tf="timeline-cue-enter";_.z("clpp.events.TIMELINE_CUE_ENTER",_.Tf);_.Uf="timeline-cue-exit";_.z("clpp.events.TIMELINE_CUE_EXIT",_.Uf);_.z("clpp.events.MPD_TYPE_CHANGED",_.yd);_.z("clpp.events.VIMOND_RESPONSE",_.Me);
300
- _.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.Td);_.z("clpp.events.PLAYLIST_MODIFIED",_.Ud);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.qc);_.z("clpp.events.ONLINE_STATUS_CHANGED",Hd);var Wi=["play() failed because the user didn't interact","The play method is not allowed by the user agent","The request is not allowed by the user agent or the platform"];var To=class{};_.z("clpp.utils.PlayerConfiguration",To);To.create=_.bj;var Uo=["abort",mc,nc,Uc,"emptied",Vc,_.Xc,_.Yc,"interruptbegin","interruptend",_.nd,_.od,pd,"mozaudioavailable",_.Ld,_.Rd,_.Sd,_.Vd,_.Xd,_.de,_.ee,he,"suspend",_.ue,"volumechange",_.Pe,_.Qe,_.be,Ve,Ue,Se,Te];_.Vo=class extends _.So{constructor(a){super();this.log=new _.O(a);this.configuration=this.kc=_.$i();this.o=this.B=null;this.cd=this.Ed=!1;this.df=new _.O("clpp.video.events");this.Qb=null;this.oc=-1;this.jf=this.gf.bind(this);this.He=new _.Em;this.J=new _.jo;this.ga=this.mc=this.I=null}init(a,b){this.configuration=this.kc=b;this.B=a;this.log.info("Initializing Player surface");a=this.B.getMedia();this.log.info("Attaching media element listeners");for(const c of Uo)this.J.on(a,c,this.jf,c!==_.Yc);
301
- this.Qb||(this.Qb=this.Oe());this.Qb.initialize(this);this.B.showMediaElement()}release(){this.I&&(this.I.destroy(),this.I=null);return Promise.resolve()}destroy(){this.J.release();return Promise.resolve()}canPlay(a,b){return _.If[this.namespace()].canPlay(a,b)}play(){if(!this.o)return Promise.reject("No sources specified yet. You need to load content before calling play.");const a=this.B.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c=
302
- {name:b.name||"",message:b.message||"",stack:b.stack||""};Xi(c)?(this.trigger(new _.F(_.dc)),this.log.warn(_.ia)):c.name===Sa&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.o?new Promise((a,b)=>{const c=this.getState();if(c!==_.zl&&c!==_.wl&&c!==_.Hl&&c!==_.Gl)b();else if(this.B.getMedia().pause(),this.getState()===_.Hl)this.J.one(this,_.je,()=>{a()});else a()}):Promise.reject("No sources specified yet. You need to load content before calling pause.")}isPaused(){return this.B.getMedia().paused}isEnded(){return this.B.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.mc=
303
- a}setCdnErrorCallback(a){this.ga=a}sc(){return this.mc}getSurface(){return this.B}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.Ro(b?b.buffered:void 0,a)}getPosition(){const a=this.B.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this.getPosition();if(void 0===a||null===a||typeof a!==_.r||a===b)return Promise.resolve();const c=this.B.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),
304
- Promise.reject();const d=a-b;return.1>=Math.abs(d)?(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.F(_.Ce));this.J.on(c,_.de,h);this.J.on(c,_.ue,h);this.J.on(c,_.Vd,h);this.log.info("Seeking to "+a+". Delta "+d);this.cd=this.Ed=!0;c.currentTime=a},h=l=>{const m=this.getPosition(),n=.1>=Math.abs(a-m);var q=.25<m-a;const t=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,u=l.type===_.de,x=l.type===_.Vd,A=l.type===_.ue,
305
- E=x&&t;q=u||n&&E||A&&q;this.log.debug("Checking seeking state after "+l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",u,"Time reached",n,"Timeupdate:",A,"Progress:",x,"ReadyState:",t,"Progress Ready:",E);q?(this.cd=this.Ed=!1,this.J.off(c,_.de,h),this.J.off(c,_.ue,h),this.J.off(c,_.Vd,h),this.bf(),this.trigger(new _.F(_.Be)),e()):x&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();
306
- else this.J.one(c,_.od,g)};this.getState()===_.El?(this.log.debug("Player is in IDLE state. Postpone seek."),this.J.one(this,_.je,()=>{switch(this.getState()){case _.zl:case _.Hl:case _.Gl:this.log.debug("Valid seek state reached.");k();break;default:this.log.warn("Invalid seek target state. Aborting seek"),f()}})):k()})}getVolume(){const a=this.B.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.B.getMedia();
307
- b?_.qf(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
308
- Value must be between 0 and 1.`):b.volume=a:this.log.warn("Can not set volume to "+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")}isMuted(){return this.B.getMedia().muted}setMuted(a){const b=this.B.getMedia();typeof a===_.fc&&(b.muted=a)}getDuration(){return this.o?this.B.getMedia().duration:-1}getTrackManager(){return this.Qb}getPlaybackRate(){const a=this.B.getMedia();return a&&a.playbackRate||1}setPlaybackRate(a){const b=this.B.getMedia();
309
- void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.oc=a}getSourceIndex(){return this.oc}getLoadedSource(){return this.o&&-1!==this.oc?this.o[this.oc]:null}getPeriods(){return[]}getNetworkEngine(){return this.He}setNetworkEngine(a){this.He=a}getTextDisplayer(){return this.I}getTimelineCues(){return[]}resetAbr(){}gf(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.ue||a.type===_.Vd)this.df.debug(d);
310
- else{let e="";switch(a.type){case _.Xd:e=`Rate: ${this.getPlaybackRate()}`;break;case Uc:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Rd:case _.Sd:case "suspend":case _.Pe:case he:case _.ee:case _.de:case _.ue:case _.Vd:case mc:case nc:b=this.getBufferInfo().Ea(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.be:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+
311
- e);this.df.info(d)}a.type!==_.Yc&&this.trigger(new _.F(a.type,{detail:a}))}bf(){}};_.Vo.prototype.getTextDisplayer=_.Vo.prototype.getTextDisplayer;_.Vo.prototype.setNetworkEngine=_.Vo.prototype.setNetworkEngine;_.Vo.prototype.getNetworkEngine=_.Vo.prototype.getNetworkEngine;var fj;fj=new _.O("clpp.Components");_.dj=new Map;var Wo=class{constructor(){this.a=this.f=null;this.g=new _.O("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.cb,SW_SECURE_DECODE:_.db,HW_SECURE_CRYPTO:Ca,HW_SECURE_DECODE:Da,HW_SECURE_ALL:"HW_SECURE_ALL"});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.Ad,CLEAR_KEY:_.Jd,WIDEVINE:_.Ic,PLAYREADY:_.Hc,FAIRPLAY:_.Gc,PRIMETIME:_.Fc});_.lj={};_.z("clpp.drm.registerDrmEnvironment",_.mj);var pj={V1_STAGING:[10,191,2,8,3,18,16,40,112,52,84,192,8,246,54,24,173,231,68,61,182,196,200,24,139,231,249,144,5,34,142,2,48,130,1,10,2,130,1,1,0,181,33,18,184,208,93,2,63,204,93,149,226,194,81,193,198,73,180,23,124,216,210,190,239,53,91,176,103,67,222,102,30,61,42,188,49,130,183,153,70,213,95,220,8,223,233,84,7,129,94,154,98,116,179,34,162,199,245,224,103,187,95,10,192,122,137,212,90,234,148,178,81,111,7,91,102,239,129,29,13,38,225,185,166,184,148,242,185,133,121,98,170,23,28,79,102,99,13,62,76,
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,
312
314
  96,39,24,137,127,94,30,249,182,170,245,173,77,186,42,126,20,23,109,241,52,161,211,24,91,90,33,138,192,90,76,65,240,129,239,255,128,163,160,64,197,11,9,187,199,64,238,220,216,241,77,103,90,145,152,15,146,202,125,220,100,106,6,173,173,81,1,247,74,14,73,140,192,31,0,83,43,172,33,120,80,189,144,94,144,146,54,86,183,223,239,239,66,72,103,103,243,62,246,40,61,79,66,84,171,114,88,147,144,190,229,88,8,241,214,104,8,13,69,216,147,194,188,162,247,77,96,160,192,208,160,153,60,239,1,96,71,3,51,76,54,56,19,148,
313
315
  134,188,157,175,36,253,103,160,127,154,217,67,2,3,1,0,1,58,18,115,116,97,103,105,110,103,46,103,111,111,103,108,101,46,99,111,109,18,128,3,152,62,48,53,38,117,244,11,167,21,252,36,155,218,229,212,172,114,73,162,102,101,33,228,54,85,115,149,41,114,31,248,128,224,170,239,197,226,123,201,128,218,234,218,191,63,195,134,208,132,160,44,130,83,120,72,204,117,63,244,151,176,17,167,218,151,120,138,0,226,170,107,132,205,125,113,192,122,72,235,246,22,2,204,165,163,243,32,48,167,41,92,48,218,145,91,145,220,24,
314
316
  185,188,149,147,184,222,139,181,15,13,237,193,41,56,184,233,224,57,205,222,24,250,130,232,27,176,50,99,15,233,85,216,90,86,108,225,84,48,11,246,212,193,189,18,105,102,53,107,40,125,101,123,24,206,99,208,239,212,95,197,38,158,151,234,177,28,181,99,229,86,67,178,111,244,159,16,156,33,1,175,202,243,91,131,47,40,143,13,157,69,150,14,37,158,133,251,93,36,219,210,207,130,118,76,93,217,191,114,126,251,233,200,97,248,105,50,31,106,222,24,144,95,77,146,249,166,218,101,54,219,132,117,135,29,22,142,135,11,178,
@@ -322,77 +324,79 @@ e);this.df.info(d)}a.type!==_.Yc&&this.trigger(new _.F(a.type,{detail:a}))}bf(){
322
324
  21,58,231,13,118,215,58,166,74,44,51,103,50,120,198,197,213,64,34,105,66,115,72,235,88,51,28,238,54,93,147,140,187,28,173,50,109,5,234,155,141,29,52,234,135,38,55,103,111,116,98,171,210,13,211,129,249,70,57,64,155,151,38,8,225,188,229,3,247,234,26,46,91,211,250,252,38,87,111,205,37,108,74,168,112,74,116,191,73,170,243,167,54,36,20,23,72,67,35,181,159,241,102,250,221,22,18,92,161,54,236,172,183,214,18,160,199,92,46,171,180,211,90,64,62,144,121,201,77,74,211,17,244,49,124,244,120,116,148,234,184,79,
323
325
  136,12,176,34,231,39,149,87,28,219,2,3,1,0,1,58,12,99,97,115,116,108,97,98,115,46,99,111,109,64,1,18,128,3,50,97,151,165,120,63,210,172,84,187,10,36,166,202,149,32,118,107,37,251,186,217,170,254,4,95,20,85,66,157,43,154,24,66,136,147,101,223,78,204,173,228,175,111,100,168,97,164,222,84,160,51,79,233,227,223,105,252,85,11,242,129,199,206,11,9,236,118,163,118,204,179,159,69,108,223,229,114,176,8,26,36,9,23,103,233,62,55,162,154,209,96,98,102,80,173,114,233,213,36,56,135,65,188,245,176,95,70,189,199,
324
326
  143,81,72,182,124,207,225,238,28,172,144,110,89,44,12,137,51,52,239,130,117,119,15,207,200,229,142,166,8,80,79,111,255,191,70,47,189,108,75,234,184,241,119,21,255,98,167,124,132,30,239,102,113,7,132,96,39,134,123,220,209,255,110,222,35,147,0,77,125,253,129,139,66,158,126,221,13,117,113,163,143,235,9,130,180,3,133,94,152,45,199,69,168,182,95,122,82,25,203,10,99,191,186,193,238,225,224,140,156,142,171,110,26,214,32,240,6,218,138,10,47,114,133,17,1,151,43,213,223,198,210,186,81,18,50,221,84,177,180,
325
- 26,58,164,235,113,177,235,207,22,230,8,119,76,167,166,176,173,209,214,53,116,116,231,227,221,238,174,87,249,19,166,195,81,47,210,172,15,75,251,202,192,80,85,213,23,17,178,104,181,193,115,239,91,72,230,167,55,143,10,250,26,54,8,60,13,213,206,235,3,215,179,205,232,1,144,158,35,48,196,149,117,219,63,196,130,117,40,165,193,65,215,122,44,201,218,67,216,6,131,178,5,168,229,21,137,112,215,254,127,48,160,181,68,49,255,64,46,247,236,85,155,146,208,5,219,252,37,174,31,218,136,135,55,119,112]};_.Xo=class{constructor(a){this.I=a;this.g={}}Ja(a,b){this.g[a]=b}};_.z("clpp.drm.DrmEnvironment",_.Xo);_.Xo.prototype.setDrmSystem=_.Xo.prototype.Ja;_.Nj=class{constructor(a,b){this.f=_.qf(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.g=!!b;this.buffer=this.f.buffer}getPosition(){return this.a}Ba(){return this.f.byteLength}seek(a){(0>a||a>this.f.byteLength)&&_.sj();this.a=a}};_.Nj.prototype.seek=_.Nj.prototype.seek;
326
- _.qk=class{constructor(a,b){this.f=a;this.g=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Ba(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.vj();this.a+=a}seek(a){if(0>a||a>this.f.byteLength)throw _.vj();this.a=a}};_.z("clpp.utils.dataview.DataViewReader",_.qk);_.Lj=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.O("clpp.mp4")}L(a,b){a=Cj(a);this.g[a]=Yo;this.f[a]=b;return this}Z(a,b){a=Cj(a);this.g[a]=Zo;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.I(a);a=new _.qk(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.uj(a)&&!this.a;)this.hd(0,a,b)}hd(a,b,c){const d=b.getPosition();let e=_.N(b);var f=_.N(b);let g=!1;this.h.debug("Parsing MP4 box",_.Dj(f));switch(e){case 0:e=b.Ba()-d;break;case 1:e=_.Aj(b),g=!0}const h=
327
- this.f[f];if(h){let m=null;var k=null;this.g[f]==Zo&&(k=_.N(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Ba()&&(l=b.Ba());l-=b.getPosition();b=0<l?_.Bj(b,l):new Uint8Array(0);b=new _.qk(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({parser:this,partialOkay:c||!1,version:m,flags:k,reader:b,size:e,start:d+a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.Ba()-b.getPosition()),b.skip(a)}};_.z("clpp.utils.Mp4Parser",_.Lj);_.Lj.typeToString=_.Dj;
328
- _.Lj.allData=_.Gj;_.Lj.sampleDescription=_.Fj;_.Lj.children=_.Ej;_.Lj.prototype.parseNext=_.Lj.prototype.hd;_.Lj.prototype.parse=_.Lj.prototype.parse;_.Lj.prototype.stop=_.Lj.prototype.stop;_.Lj.prototype.fullBox=_.Lj.prototype.Z;_.Lj.prototype.box=_.Lj.prototype.L;_.Lj.headerSize=_.Hj;var Yo=0,Zo=1;var $o=class{};_.z("clpp.utils.FairplayUtils",$o);$o.parseFairPlayResponse=_.Qj;$o.formatFairPlayRequest=_.Pj;$o.createFairplayPayload=Oj;$o.extractContentId=_.Kj;$o.extractExtXKeyUri=Ij;var Wj=new _.O("clpp.drm.DrmToday"),fk="PRODUCTION",gk="STAGING",hk="TEST",ap={PRODUCTION:fk,STAGING:gk,TEST:hk};_.z("clpp.drm.DrmToday.Environment",ap);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
329
- var Sj="/license-proxy-widevine/cenc/",Tj="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Uj="/license-server-fairplay/",ik={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",3E4:"General DRM error",4E4:"General Widevine Modular error",40001:"Widevine Device Certificate Revocation (wv 127)",40002:"Widevine Device Certificate Revocation - Permanently (wv 175)",41E3:"General Widevine Classic error",42E3:"General Playready error",
330
- 43E3:"General Fairplay error",44E3:"General OMA error",44001:"OMA Device registration failed",45E3:"General CDRM error",45001:"CDRM Device registration failed",6E4:"CSL",60001:"CSL - INVALID",60100:"CSL - Denied by Stream Limiting",7E4:"General Output Protection",70001:"All keys filtered by EOP settings",8E4:"TAKE DOWN",80001:"TAKE DOWN - Denied by Take Down",9E4:"General GBL error",90001:"License delivery prohibited in your region"},bp=[_.db,void 0],cp=[_.cb,void 0],dp=["3000"],ep=["2000"];
331
- for(const a of Object.keys(ap)){let b=ra;a!==fk&&(b+=`_${a}`);const c=new _.Xo(b);let d=null;switch(a){case fk:d=qj("V1_PROD");break;case gk:d=qj("V2");break;case hk:d=null}c.Ja(_.Ic,{licenseUrl:Vj(_.Ic,a),videoRobustness:bp,audioRobustness:cp,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Xj,licenseResponse:_.Yj}});c.Ja(_.Gc,{licenseUrl:Vj(_.Gc,a),certificateUrl:Rj(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.ak,licenseResponse:_.bk,
332
- extractContentId:_.ck,certificateRequest:_.dk}});c.Ja(_.Hc,{licenseUrl:Vj(_.Hc,a),videoRobustness:dp,audioRobustness:ep,modifiers:{licenseRequest:ek}});_.mj(c)};var fp=class{};_.z("clpp.drm.eme.EmeFactory",fp);var kk=[];fp.Apis={STANDARD:bb,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var ok,nk;ok=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];_.gp=class{constructor(a,b,c){this.h=new Uint8Array(a);this.a=b;this.f=c}};nk=class extends _.gp{};var Ok=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.Lj).Z("pssh",this.h.bind(this)).parse(a.buffer);0==this.a.length&&_.D("No pssh box found!")}h(a){if(1<a.version)_.D("Unrecognized PSSH version found!");else{var b=_.Yg(_.Bj(a.reader,16)),c=[];if(0<a.version){var d=_.N(a.reader);for(let e=0;e<d;++e){const f=_.Yg(_.Bj(a.reader,16));c.push(f)}}d=_.N(a.reader);a.reader.skip(d);this.g.push.apply(this.g,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});a.reader.getPosition()!=
333
- a.reader.Ba()&&_.D("Mismatch between box size and data size!")}}};var Hk,hp;
334
- _.Ql=class{constructor(a){this.D=a;this.J=new Set;this.A=this.G=this.m=null;this.R=!1;this.f=null;this.H=hp;this.w=new _.jo;this.K=new Wo;this.g=new Map;this.I=[];this.F=new _.Mk;this.h=null;this.U=b=>{this.o=!0;this.B=!1;this.F.reject(b);a.onError(b)};this.j=new Map;this.W=new Map;this.T=new _.Yh(()=>Ak(this));this.pa=!1;this.aa=new _.Mk;this.C=!1;this.V=[];this.ba=!1;this.N=0;this.a=new _.O("clpp.drm.DrmEngine");this.Y=(new _.Yh(()=>{Bk(this)})).Xa(1);this.F.catch(()=>{});this.o=this.B=!1;this.M=
335
- null}destroy(){const a=this;return _.y(function*(){a.pa?yield a.aa:(a.pa=!0,yield Ck(a),a.aa.resolve())})}keySystem(){return this.f?_.uk(this.f.keySystem):""}getDrmInfo(){return this.f}ma(a){const b=this;return _.y(function*(){b.C&&b.H===Hk||(!b.h.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.ba?yield Tk(b,a):b.V.push(a))})}ga(a){const b=a.target;this.a.info("Key status changed for session",b.sessionId);const c=this.g.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f==_.me){var g=f;
336
- f=e;e=g}if(tk(this.f.keySystem)&&16===f.byteLength&&_.$h()){g=_.Bg(f);const k=g.getUint32(0,!0),l=g.getUint16(4,!0),m=g.getUint16(6,!0);g.setUint32(0,k,!1);g.setUint16(4,l,!1);g.setUint16(6,m,!1)}c&&e!==ke&&(c.loaded=!0);c&&c.Ca&&c.Ca.resolve();"expired"===e&&(d=!0);f=_.I(f);let h=_.Yg(f);"00"===h&&c&&c.keyId?h=c.keyId:this.f.keySystem.startsWith(_.Gc)&&16!==f.byteLength&&(h=Dg(f));(f=h||"")?this.a.info(`Key status for Key ID '${h}': ${e}`):this.a.info(`Key status global keys: ${e}`);this.j.set(f,
337
- e);c&&!c.keyId&&this.g.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.bb.forEach(e=>{this.j.get(e)===ke&&(this.a.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.Kd))});for(a=0;a<this.f.initData.length;a++){const e=this.f.initData[a];e.keyId&&this.j.get(e.keyId)===ke&&_.Zg(e.initData,c.initData)&&(this.a.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,_.Kd))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.mb&&
338
- (this.a.debug("Session has expired",b.sessionId),(a=this.g.get(b))&&a.jc&&a.jc.stop(),this.g.delete(b),b.close().catch(()=>{}));bl(this)&&(this.F.resolve(),1!==this.g.size||d?this.T.da(.5):Ak(this))}};Hk=0;hp=3;var jl=new Map,kl=new _.O("clpp.text");var ip=class{constructor(){this.a=null;this.f=[]}};var jp=class{constructor(){this.g=this.f=this.h=null;this.a=[]}};_.kp=class{constructor(){this.f=this.m=this.w=this.B=this.h=this.j=this.g=this.o=NaN;this.a=new ip;this.A=new jp}getStats(){return{width:this.o,height:this.g,streamBandwidth:this.m,decodedFrames:this.h,droppedFrames:this.j,corruptedFrames:this.B,estimatedBandwidth:this.f,loadLatency:this.w,playTime:ol(this.a,_.Hl),pauseTime:ol(this.a,_.Gl),bufferingTime:ol(this.a,_.zl),stateHistory:pl(this.a),switchHistory:ql(this.A)}}};_.lp=class{constructor(a){this.f=a;this.a=void 0}value(){void 0==this.a&&(this.a=this.f());return this.a}};var sl=new _.lp(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.od],[HTMLMediaElement.HAVE_CURRENT_DATA,_.nd],[HTMLMediaElement.HAVE_FUTURE_DATA,mc],[HTMLMediaElement.HAVE_ENOUGH_DATA,nc]]));var np=class{constructor(a){this.g=new _.O("clpp.StateManager");this.l=a;this.a=new _.jo;this.f=_.El;this.A=_.mp;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.m=this.F=!1;this.G=0;this.h=null;this.J=0;this.M=_.li();this.C=!1;this.I=Date.now();xl(this)}Pb(a,b){this.l&&this.l.trigger(new _.F(a,{detail:b}))}getState(){return Al(this,"")}U(a){(a=a&&a.detail)&&a.severity&&a.severity===_.G&&vl(this,_.Dl)}destroy(){this.g.debug("Stop watching for video events for "+this.l.namespace());this.a.release()}};_.z("clpp.version",_.da);_.z("clpp.name",_.ma);_.Ui="application/x-mpegurl";_.z("clpp.Type",{DASH:_.Sb,HLS:_.Ui,SMOOTH_STREAMING:_.Xb,MP4:_.Je});_.Qf="scte35";_.Of=ye;_.z("clpp.TimelineCueType",{SCTE35:_.Qf,DASH_CALLBACK:_.zd,UNKNOWN:_.Of});_.z("clpp.utils.media.detectType",Il);var Ll=new _.O("clpp.sources");var op=class extends _.Vo{constructor(){super(Bc);this.w=this.G=!1;this.j=this.A=this.m=this.a=this.h=null;this.g=new _.jo;this.F=this.C=this.f=this.H=null}init(a,b){super.init(a,b);this.h=new np(this);vl(this.h,_.El)}namespace(){return Bc}unload(){const a=this;return _.y(function*(){if(a.o){a.log.debug(_.Za,a.o);a.C&&(a.C.stop(),a.C=null);const b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.I&&(a.I.destroy(),a.I=null);a.j&&a.j.release();a.m&&(a.m.destroy(),a.m=null);_.Mf(a.g);
339
- a.f&&(a.f=new _.kp);a.F=null;a.o=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Nl(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.h&&vl(this.h,_.El)})}destroy(){if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(ua);const a=this.getTrackManager();a&&a.destroy();this.j&&(this.j.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
340
- b)}),this.j=null);this.h&&(this.h.destroy(),this.h=null);this.f=null})}getDrmInfo(){return this.m?this.m.getDrmInfo():null}detach(){}getTrackManager(){return this.Qb}load(a){const b=this;return _.y(function*(){if(b.w)return Ml();if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.B.getMedia();b.H=Date.now()/1E3;b.f=new _.kp;b.g.on(b,_.je,()=>{b.f&&_.nl(b.f.a,b.getState())});vl(b.h,_.Fl);b.o=_.Kl(a);_.cj(a)&&(b.configuration=_.bj(b.kc,
341
- a));b.log.debug(_.Ia,b.configuration);b.log.debug(_.Va,b.o);const d=_.ml(b.configuration,["html","native"]);b.I=d.create(b);b.I.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.ej(_.pe)&&!_.ni()&&(b.A=new xo(b),b.A.start(c));b.j?b.j.release():b.j=new ko(b);Wf(b.j,c);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.C(b.configuration.volume)||b.setVolume(b.configuration.volume);_.C(b.configuration.muted)||b.setMuted(b.configuration.muted);b.g.one(c,mc,()=>{b.trigger(new _.F(_.Qo))});
342
- null==b.configuration.startTime&&Vl(b,c);try{yield Pl(b,c),yield Rl(b),yield Ul(b).P}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.G&&null!==this.h&&vl(this.h,_.Dl),this.trigger(new _.F(_.Yc,{detail:a})))}Oe(){return new Q}getState(){return null!==this.h?this.h.getState().currentState:_.mp}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?(this.log.warn("EXT-X-PROGRAM-DATETIME required to get presentation start time as Date!"),
343
- null):a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.F=a={start:a.start(0),end:a.end(a.length-1)};if(this.F)return this.F}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.rl();this.f&&_.nl(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.o=a.videoWidth;b.g=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,
344
- b=Number(c.totalVideoFrames),a.j=Number(c.droppedVideoFrames),a.h=b,this.f.B=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ia())a.bandwidth&&(this.f.m=a.bandwidth),a.Ac&&(this.f.f=a.Ac);return this.f.getStats()}getTimelineCues(){return this.j?this.j.getTimelineCues():[]}};
345
- _.Kf(new class{a(){return Bc}canPlay(a,b){a=a.type||"";const c=a===_.Sb,d=a===_.Xb,e=a===_.Ui;var f;_.ki()||c||d||e&&!_.li()?f=0:f=""!==Zh().canPlayType(a)?e&&_.li()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}create(){return new op}});_.z("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.z("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1});_.z("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var Xl=new _.O("clpp.ads"),Wl=[];_.z("clpp.utils.dom.createHTMLElement",_.dm);var pp=class{constructor(a){this.a=null;this.g=new Set;this.f=null;this.set(a||null)}set(a){this.g.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=em(this,a)}get(){return this.a}};var sp=class{constructor(a,b){this.a=new _.O("clpp.PlayerSurface");this.w=_.jf(qp,b);this.g=new pp;this.h=null;this.f=new pp;this.m=rp;rp+=1;this.o=`clpp-video-${this.m}`;this.j=new _.jo;if(null==a)throw new _.H(_.G,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.H(_.G,7,7004,"Media element not found");b=this.w;this.a.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.h=a;else{if(!(a instanceof
346
- HTMLMediaElement))throw new _.H(_.G,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.a.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.g.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.H(_.G,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{b=document.createElement(_.Oc);a.parentNode?a.parentNode.replaceChild(b,
347
- a):this.a.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");c=[];for(let f=0;f<a.classList.length;f++)c.push(a.classList[f]);for(var e of c)a.classList.remove(e),_.bm(b,e);b.style.cssText=a.style.cssText;a.removeAttribute(_.oe);for(d of[_.We,_.ad])e=a.getAttribute(d),e=parseInt(e,10),isNaN(e)||(b.style[d]=`${e}px`),_.bi()||a.removeAttribute(d);b.appendChild(a);d=b}d&&(this.f.set(d),fm(this.f,"clpp-container"),
348
- fm(this.f,this.o),fm(this.g,_.wc),fm(this.g,"clpp-video"));gm(this,a,d)}}getMedia(){return this.g.get()}getContainer(){return this.f.get()}getSafeContainer(){return this.f}getId(){return this.m}getUniqueCssClass(){return this.o}getCastElement(){return this.h}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.bm(a,xc):this.a.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(xc):this.a.debug("No media element available that could be shown")}addElementToContainer(a,
349
- b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.bm(a,_.wc);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)}removeElementFromContainer(a){const b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)}hide(a){_.bm(a,xc)}show(a){a.classList.remove(xc)}release(){this.j.release()}};sp.prototype.removeElementFromContainer=sp.prototype.removeElementFromContainer;
350
- sp.prototype.addElementToContainer=sp.prototype.addElementToContainer;sp.prototype.getCastElement=sp.prototype.getCastElement;sp.prototype.getContainer=sp.prototype.getContainer;sp.prototype.getMedia=sp.prototype.getMedia;var qp={disableContainer:!1,crossorigin:"anonymous",containerEl:null},rp=1;var tp=class{constructor(a){this.l=a;this.h=this.l.getNetworkEngine();this.a=new _.jo;this.g=null;this.f=!0;km(this)}release(){this.a.release();lm(this);this.l=null}};_.z("clpp.polyfill.installAll",om);var nm=[];_.z("clpp.polyfill.register",_.pm);var rm=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.Eg(_.Ug(a)));this.a=JSON.parse(_.Eg(_.Ug(b)));this.h=c}verify(a,b){const c={kty:"RSA",n:a.n,e:a.e},d=this.g+"."+this.f,e=this.h;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.Ig(d),n=_.Ug(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(fb)}).catch(g)}else b?
351
- g("Web Crypto API is not supported"):f()})}};var up={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Yi="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Im=class{constructor(a){this.license=a;this.a=null;this.f=new _.O("clpp.utils.LicenseKey")}verify(){return(new Promise((a,b)=>{try{const c=sm(this);a(c)}catch(c){b()}})).then(a=>a.verify(up)).catch(a=>{if(a&&a!==fb){{var b=window.location.href;const c=new _.cg(b);b=c.Ua||c.Ma?c:new _.cg("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Ma))return Promise.resolve()}throw a;})}},Dm="vod",Cm="live";var R=class extends _.So{constructor(a,b,c){super();om();this.g=new _.O("clpp.Player");if(!a)throw new _.H(_.G,7,7102);this.A=new _.jo;this.f=this.N=b||_.$i();this.m=null;void 0===this.f.license&&(this.f.license=Yi,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.H(_.G,7,7101,"No license provided in configuration!");this.h=new sp(a,c);this.a=this.w=null;
352
- this.G=new _.Em;this.j=null;this.J=[];this.K={};this.o=null;this.H=!0;this.I=this.F=!1;this.C=this.mc=null;this.ud=!1;this.T=new tp(this);this.M=!1;this.B=d=>{(d=d.detail)&&d.currentState===_.Hl&&(this.off(_.je,this.B),Jm(this))};this.on(_.je,()=>{this.getState()===_.Dl&&this.unload()});this.on(_.Ob,this.R.bind(this));this.on(_.Mb,this.R.bind(this));Km(this,this.f.license);this.h.getMedia()&&(a=this.h.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
353
- void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of Gm)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Mm(this,a);_.dj.clear()}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,b)}init(){}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.F(_.Yc,{detail:a}),this.trigger(a)}Wb(a){a=
354
- this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.h}getConfiguration(){return _.kf(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}unload(){return this.a?this.a.unload():Promise.resolve()}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.m)return this.g.info("Player release already in progress"),this.m;this.g.debug("Releasing player");this.m=Om(this);return this.m.finally(()=>{this.g.debug("Player released");this.m=null})}destroy(){if(this.F)return this.g.debug("The player is already destroyed. No-op"),
355
- new Promise(a=>a());this.F=!0;return this.release().then(()=>{this.g.debug(ua);this.trigger(new _.F("destroying"));return _.Lm(this,_.Ed)}).then(()=>{this.a&&this.a.removeDelegate(this);this.Fc.clear();this.T.release();if(this.a)return this.a.destroy()}).then(()=>{hj(a=>{a.a()});_.dj.clear();this.a=null;this.trigger(new _.F("destroyed"))})}load(a){const b=this;return _.y(function*(){try{yield _.Um(b,a),yield _.Vm(b),yield _.Xm(b)}catch(c){if(b.m)throw b.g.info("Load interrupted while a player release is pending"),
356
- new _.H(_.G,7,7E3);throw c;}})}use(a){a=new a;a.f(this);_.gj(a)}remove(a){if(this.getState()<=_.El||this.H){let b="";hj(c=>{c instanceof a&&(b=c.id(),c.a())});if(b)return _.dj.delete(b),this.I=!0}return!1}play(){return this.a?this.j&&this.a.namespace()!==_.yc?this.j.start(this.a):this.a.play():Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&
357
- this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.Ro}getState(){return this.a?this.a.getState():_.El}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&this.a.isEnded()||!1}isPaused(){return this.a&&this.a.isPaused()||!1}getPosition(){return this.a?this.a.getPosition():0}seek(a){return this.getState()===_.Dl?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?
358
- this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}getVolume(){return this.a?this.a.getVolume():null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.j}namespace(){return this.a&&this.a.namespace()||"Undefined"}canPlay(a,b){return this.a?this.a.canPlay(a,b):0}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a){this.a&&this.a.setPlaybackRate(a)}isMuted(){return this.a&&
359
- this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.G}setNetworkEngine(a){this.G=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}$c(){return Object.freeze(this.o)}setSourceIndex(a){this.a&&this.a.setSourceIndex(a)}getSourceIndex(){return this.a?this.a.getSourceIndex():-1}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?
360
- this.a.getTimelineCues():[]}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.mc=a;Sm(this)}setCdnErrorCallback(a){this.C=a;this.a&&this.a.setCdnErrorCallback(this.C)}R(){this.ud=!0}};_.z("clpp.Player",R);R.registerPlugin=_.Hm;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;
361
- R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.$c;R.prototype.getStats=R.prototype.getStats;R.prototype.isLive=R.prototype.isLive;R.prototype.getTextDisplayer=R.prototype.getTextDisplayer;R.prototype.setNetworkEngine=R.prototype.setNetworkEngine;R.prototype.getNetworkEngine=R.prototype.getNetworkEngine;R.prototype.setMuted=R.prototype.setMuted;R.prototype.isMuted=R.prototype.isMuted;R.prototype.setPlaybackRate=R.prototype.setPlaybackRate;
362
- R.prototype.getPlaybackRate=R.prototype.getPlaybackRate;R.prototype.namespace=R.prototype.namespace;R.prototype.getAdsManager=R.prototype.getAdsManager;R.prototype.getDuration=R.prototype.getDuration;R.prototype.setVolume=R.prototype.setVolume;R.prototype.getVolume=R.prototype.getVolume;R.prototype.getSeekRange=R.prototype.getSeekRange;R.prototype.getPresentationStartTime=R.prototype.getPresentationStartTime;R.prototype.seek=R.prototype.seek;R.prototype.getPosition=R.prototype.getPosition;
363
- R.prototype.isPaused=R.prototype.isPaused;R.prototype.isEnded=R.prototype.isEnded;R.prototype.getState=R.prototype.getState;R.prototype.getBufferInfo=R.prototype.getBufferInfo;R.prototype.getTrackManager=R.prototype.getTrackManager;R.prototype.pause=R.prototype.pause;R.prototype.play=R.prototype.play;R.prototype.remove=R.prototype.remove;R.prototype.use=R.prototype.use;R.prototype.load=R.prototype.load;R.prototype.destroy=R.prototype.destroy;R.prototype.release=R.prototype.release;
364
- R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.Wb;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;R.prototype.on=R.prototype.on;_.El=0;_.Fl=1;_.zl=2;_.Hl=3;_.Gl=4;_.wl=5;_.Dl=6;_.mp=7;_.Cl={IDLE:_.El,PREPARING:_.Fl,BUFFERING:_.zl,PLAYING:_.Hl,PAUSED:_.Gl,ENDED:_.wl,ERROR:_.Dl,UNSET:_.mp};R.State=_.Cl;var Gm=[];var S=class{pb(){}qb(){}vb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}$b(){}Hb(){}getMediaUrl(){}sb(){}rb(){}gb(){}Sa(){}getPodIndex(){}Ib(){}Jb(){}ub(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.z("clpp.ads.IAd",S);S.prototype.getWrapperCreativeIds=S.prototype.getWrapperCreativeIds;S.prototype.getWrapperAdSystems=S.prototype.getWrapperAdSystems;S.prototype.getWrapperAdIds=S.prototype.getWrapperAdIds;
365
- S.prototype.getSequenceLength=S.prototype.ub;S.prototype.getPositionInSequence=S.prototype.Jb;S.prototype.getPodTimeOffset=S.prototype.Ib;S.prototype.getPodIndex=S.prototype.getPodIndex;S.prototype.getPodType=S.prototype.Sa;S.prototype.getMediaBitrate=S.prototype.gb;S.prototype.getMediaHeight=S.prototype.rb;S.prototype.getMediaWidth=S.prototype.sb;S.prototype.getMediaUrl=S.prototype.getMediaUrl;S.prototype.getClickThroughUrl=S.prototype.Hb;S.prototype.isBumper=S.prototype.$b;
366
- S.prototype.getSkipTimeOffset=S.prototype.getSkipTimeOffset;S.prototype.getDuration=S.prototype.getDuration;S.prototype.getTitle=S.prototype.getTitle;S.prototype.getAdvertiserName=S.prototype.getAdvertiserName;S.prototype.getAdSystem=S.prototype.getAdSystem;S.prototype.getApiFramework=S.prototype.getApiFramework;S.prototype.getCreativeId=S.prototype.getCreativeId;S.prototype.getId=S.prototype.getId;S.prototype.getTechnology=S.prototype.vb;S.prototype.getAdManagerVersion=S.prototype.qb;
367
- S.prototype.getAdManagerName=S.prototype.pb;var vp=class{name(){}ea(){}create(){}};_.z("clpp.ads.IAdsManagerFactory",vp);vp.prototype.create=vp.prototype.create;vp.prototype.isSupported=vp.prototype.ea;vp.prototype.name=vp.prototype.name;var wp=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.z("clpp.ads.IAdsManager",wp);wp.prototype.getPosition=wp.prototype.getPosition;wp.prototype.setVolume=wp.prototype.setVolume;wp.prototype.getVolume=wp.prototype.getVolume;wp.prototype.skip=wp.prototype.skip;wp.prototype.pause=wp.prototype.pause;wp.prototype.resume=wp.prototype.resume;var xp=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.y(function*(){})}};xp.prototype.dispose=xp.prototype.dispose;xp.prototype.getPosition=xp.prototype.getPosition;xp.prototype.setVolume=xp.prototype.setVolume;xp.prototype.getVolume=xp.prototype.getVolume;xp.prototype.skip=xp.prototype.skip;xp.prototype.pause=xp.prototype.pause;xp.prototype.resume=xp.prototype.resume;
368
- xp.prototype.start=xp.prototype.start;xp.prototype.load=xp.prototype.load;var Zl=class{name(){return"clpp.ads.NopAdsManagerFactory"}ea(){return!0}create(){return new xp}};Zl.prototype.create=Zl.prototype.create;Zl.prototype.isSupported=Zl.prototype.ea;Zl.prototype.name=Zl.prototype.name;var yp=class{getCuePoints(){}Kb(){}hb(){}};_.z("clpp.ads.IAdsTimeline",yp);yp.prototype.hasPostroll=yp.prototype.hb;yp.prototype.hasPreroll=yp.prototype.Kb;yp.prototype.getCuePoints=yp.prototype.getCuePoints;_.zp=class{g(){}release(){}};var Ap=class{constructor(){this.h=null}j(a){this.h=a}g(a){return this.h?this.h.setMediaKeys(a):Promise.reject(Ma)}m(){return this.h&&this.h.mediaKeys}a(a,b){return navigator.requestMediaKeySystemAccess(a,b)}f(){return bb}};lk(new class{a(){return bb}ea(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Ap}},1E3);var Cp=class{constructor(){this.size=0;this.a=void 0;this.f=new _.O("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Bp.value())}get(a){if(this.has(a))return this.a}has(a){const b=Bp.value();return this.a&&wg(a,b)?!0:!1}entries(){}keys(){}values(){}},Bp=new _.lp(()=>Cg(new Uint8Array([0])));var Dp=class{j(){}g(a){_.Gf("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}m(){return null}a(){_.Gf("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};lk(new class{a(){return"NOP"}ea(){return!0}create(){return new Dp}},-1);var Fp=class{constructor(){this.h=this.o=null}j(a){this.o=a}g(a){const b=this.h;b&&b!==a&&Zm(b,null);return(this.h=a)?Zm(a,this.o):Promise.resolve()}m(){return this.h}a(a,b){_.Gf("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Ep(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Ep=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.Gc))for(var c of b){a:{a=c;if(a.persistentState===_.ae){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
369
- persistentState:_.Id,distinctiveIdentifier:_.Id,initDataTypes:a.initDataTypes,sessionTypes:[re],label:a.label};let d=!1,e=!1;if(a.audioCapabilities)for(const f of a.audioCapabilities)f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.audioCapabilities.push(f),e=!0));if(a.videoCapabilities)for(const f of a.videoCapabilities)f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),
370
- e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Je));a=e?b:null}if(a){this.a=a;return}}c=Error(ob);c.name=Ta;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Gp(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.Gf("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Gp=class{constructor(a){this.g=null;this.h=new WebKitMediaKeys(a);this.f=new _.jo;this.j=0;this.a=new _.O(Ac);this.a.info("Created Media Keys for "+a)}createSession(a){a=
371
- void 0===a?re:a;this.a.debug("Creating Apple MediaKeys Session");if(a!==re)throw new TypeError("Session type "+a+ba);return new Hp(this.h,`__session_${this.j++}`)}setServerCertificate(){this.a.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Hp=class extends _.So{constructor(a,b){super();this.a=null;this.o=a;this.g=this.h=null;this.j=new _.jo;this.sessionId=b;this.expiration=NaN;this.closed=new _.Mk;this.m=!1;this.keyStatuses=new Cp;this.f=new _.O(Ac)}generateRequest(a,
372
- b){if(this.m)return Promise.reject(eb);this.f.debug("generateRequest");this.h=new _.Mk;try{const c=this.o.createSession(_.Je,_.I(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Ue,d=>{{const e=this.keyStatuses.getStatus();this.f.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.F(sd,{messageType:void 0===e||e===ke?kd:hd,message:Cg(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Se,d=>{this.f.debug("onWebkitKeyAdded_",
373
- d);this.g&&($m(this,"usable"),this.g.resolve(),this.g=null)});this.j.on(c,Te,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===ke)this.f.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.f.error(`Received key error in session ${this.sessionId} `+`with code ${this.a.error.code}. `+`Session Status ${d}.`),d=Error("EME AppleEmeManager key error"),d.errorCode=this.a.error,null!==this.h)this.h.reject(d),
374
- this.h=null;else if(null!==this.g)this.g.reject(d),this.g=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:$m(this,"output-not-allowed");break;default:$m(this,_.dd)}});$m(this,ke)}catch(c){this.h.reject(c)}return this.h}load(){this.f.debug("load");return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.m)return Promise.reject(eb);this.f.debug("update");this.g=new _.Mk;try{this.a.update(_.I(a))}catch(b){this.g.reject(b)}return this.g}close(){if(this.m)return this.closed;
375
- this.f.info(`Closing Key Session ${this.sessionId}`);this.m=!0;try{this.a.close(),this.closed.resolve(),_.Mf(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.f.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}};lk(new class{a(){return"APPLE"}ea(){return!!window.WebKitMediaKeys}create(){return new Fp}},1100);var Jp=class{constructor(){this.o=this.h=null;this.w="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.w="webkit")}j(a){this.h=a}g(a){_.Gf("WebkitEmeManager.setMediaKeys");if(!this.h)return Promise.reject(Ma);const b=this.o;b&&b!==a&&cn(b,null);(this.o=a)&&cn(a,this.h);return Promise.resolve()}m(){return this.o}a(a,b){_.Gf("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.h)var c=this.h;else{var d=document.getElementsByTagName(_.w);c=d.length?d[0]:document.createElement(_.w)}const e=
376
- new Ip(this.w,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Ip=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Jd&&(this.a=Re,a=!1);let e=!1;for(const g of d){d=[];var f=[];let h=!1;if(g.audioCapabilities)for(const k of g.audioCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType.split(";")[0],this.a)&&(d.push(k),e=!0));if(g.videoCapabilities)for(const k of g.videoCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType,
377
- this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.Je,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.ae||a||(e=!1);if(e){this.f=g;return}}b=ob;if(c===_.Jd||c===_.Ic)b="None of the requested configurations were supported.";c=Error(b);c.name=Ta;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Mp(this.g,this.a))}getConfiguration(){return this.f}},Mp=class{constructor(a,b){this.g=a;this.m=b;this.a=null;this.f=new _.jo;this.h=[];this.j=new Map}createSession(a=
378
- re){if(a!==re&&a!==_.Nd)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Fa,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Np(this.g,this.a,this.m,a);this.h.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Np=class extends _.So{constructor(a,b,c,d){super();this.o=a;this.h=b;this.m=!1;this.a=this.f=null;this.g=c;this.j=d;this.sessionId="";this.expiration=NaN;this.closed=new _.Mk;this.keyStatuses=
379
- new Cp}generateRequest(a,b){_.Gf("WebkitEmeManager.MediaKeySession.generateRequest");return en(this,b,null)}load(a){_.Gf(rb);return this.j===_.Nd?en(this,null,a):Promise.reject(Error(Ra))}update(a){_.Gf(rb);const b=new _.Mk;fn(this,b,a);return b}close(){_.Gf("WebkitEmeManager.MediaKeySession.close");if(this.j!==_.Nd){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;const a=dn(this,"cancelKeyRequest");try{this.h[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();
380
- return this.closed}remove(){_.Gf("WebkitEmeManager.MediaKeySession.remove");return this.j!==_.Nd?Promise.reject(Error(Ra)):this.close()}};lk(new class{a(){return"WEBKIT"}ea(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Jp}});var Qp=class extends _.Xo{constructor(a,b,c,d,e){super(Ea);this.m=a;this.j=b;this.h=c;this.f=d;this.o=e;this.a=new _.O(zc);_.Og(this.m)?this.a.warn(_.sb):this.Ja(_.Ic,{licenseUrl:this.m,videoRobustness:[_.db,void 0],audioRobustness:[_.cb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Mc.bind(this)}});_.Og(this.j)?this.a.warn(_.Ua):this.Ja(_.Hc,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Mc.bind(this)}});
381
- _.Og(this.h)?this.a.warn(_.Aa):_.Og(this.f)?this.a.warn(_.za):this.Ja(_.Gc,{licenseUrl:this.h,certificateUrl:this.f,modifiers:{licenseRequest:this.Le.bind(this),licenseResponse:this.Me.bind(this),certificateRequest:this.Mc.bind(this),extractContentId:this.xe.bind(this)}})}Mc(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}xe(a,b){a=Ij(b);switch(this.o){case Op:return a;case Pp:return(new _.Jj(a)).a;default:throw Error("Unknown content ID strategy");}}Le(a,b){b.headers[oa]=
382
- Yb;this.Mc(a,b);a={spc:_.Sg(b.body)};b.body=_.Kg(_.Ah(a,!0))}Me(a,b){a=_.Eg(b.data).trim();const c="\x3c/ckc\x3e"===a.substr(-6);"\x3cckc\x3e"===a.substr(0,5)&&c&&(a=a.slice(5,-6));b.data=_.Ug(a).buffer}};_.z(zc,Qp);Qp.prototype.onFairPlayLicenseResponse=Qp.prototype.Me;Qp.prototype.onFairPlayLicenseRequest=Qp.prototype.Le;Qp.prototype.extractFairPlayContentId=Qp.prototype.xe;Qp.prototype.onLicenseRequest=Qp.prototype.Mc;Qp.prototype.constructor=Qp.prototype.constructor;Qp.NAME=Ea;
383
- var Pp="hostname",Op="full-skd";Qp.FairPlayContentIdStrategy={HOSTNAME:Pp,FULL_SKD:Op};_.z("clpp.drm.HeaderDrmComponent",class extends _.zp{constructor(){super();this.l=null}f(a){this.l=a}a(){this.l=null}g(){var a=this.l.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Ea){a=a.drm.customData;if(!a)throw new _.H(_.G,7,7100,_.Jc);a=new Qp(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Op);_.mj(a)}}release(){}id(){return"headerdrm"}});_.pm(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.I(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.pm(function(){_.Gf("mathRound.install")});_.pm(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;Zc in document||(Object.defineProperty(document,Zc,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
384
- {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",gn);document.addEventListener("webkitfullscreenerror",gn);document.addEventListener("mozfullscreenchange",gn);document.addEventListener("mozfullscreenerror",gn);document.addEventListener("MSFullscreenChange",gn);document.addEventListener("MSFullscreenError",gn)}});_.pm(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.Gf("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=jn,document.exitPictureInPicture=kn,document.addEventListener("webkitpresentationmodechanged",hn,!0))}});_.pm(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=ln)}});_.pm(function(){if(window.VTTCue)_.Bf("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Bf(pb),window.VTTCue=mn;else if(6===a)_.Bf("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=nn;else{try{var b=!!mn(1,2,"")}catch(c){b=!1}b&&(_.Bf(pb),window.VTTCue=mn)}}else _.Hf("VTTCue not available.")});var on;_.pm(function(){_.Gf("InputEvent.install");_.ai("Trident/")&&HTMLInputElement.prototype.addEventListener!==pn&&(_.Bf("Patching input event support on IE."),on=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=pn)});_.pm(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.pm(function(){_.Gf("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});var sn=class{constructor(){this.a=qn()}};var Rp=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.Sp=class{constructor(a,b,c){this.f=a;this.h=b;this.g=c||this.f.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.h(a.contentRect.width,a.contentRect.height,this.f.isFullscreen())});this.a.observe(this.g)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var Tp;_.Up=class{constructor(){this.a=new Blob([Tp],{type:_.Je})}canPlay(a){var b=document.createElement(_.w);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.Mk;b=b.play();const d=(new _.Yh(()=>{d.stop();c.resolve(a)})).da(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===Ta?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
385
- Tp=new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
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;
369
+ 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,
386
390
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
387
391
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,
388
392
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,
389
393
  0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,
390
394
  0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,
391
- 116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49]);_.Vp=new _.O("clpp.media.TimestampParser");_.xn={};_.zn={};var Un=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new sn}};var Dn=window.XMLHttpRequest;var Tn=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.h=new Rp(a);this.length=a;this.w=b;this.f=this.a=this.g=0;this.j=null;this.m=-1;this.o=new sn}};var Jo=class extends _.Tl{constructor(a){super(new _.Mk,()=>Promise.resolve());this.A=a;this.g=null;this.o=this.P;this.f=-1;this.h=this.j=this.m=null;Nn(this)}then(a,b){this.P=this.P.then(a,b);return this}catch(a){this.P=this.P.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.g.then(a=>{this.m&&clearTimeout(this.m);this.j&&this.j();return a.abort()}).catch(()=>{})}};var Sn=window.fetch,Pn=window.AbortController,On=window.Headers;_.Xn={};_.Xp=class{constructor(a){a=a.getConfiguration();a=_.kf(a.textStyle||a.textstyle||{});this.J=typeof a.backgroundColor===_.me?a.backgroundColor:null;this.T=typeof a.windowColor===_.me?a.windowColor:null;this.N=typeof a.fontColor===_.me?a.fontColor:null;this.R=typeof a.fontFamily===_.me?a.fontFamily:null;this.H=typeof a.fontSize===_.me?a.fontSize:null;this.B=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.G=typeof a.edgeColor===_.me?a.edgeColor:"rgba(0, 0, 0, 1)";this.o=null;typeof a.edgeType===
392
- _.me&&(this.o=a.edgeType)}getBackgroundColor(){return this.J}setBackgroundColor(a){this.J=a;this.g()}getWindowColor(){return this.T}setWindowColor(a){this.T=a;this.g()}getFontFamily(){return this.R}setFontFamily(a){this.R=a;this.g()}getFontColor(){return this.N}setFontColor(a){this.N=a;this.g()}getFontSize(){return this.H}setFontSize(a){this.H=a;this.g()}getFontSizePercent(){return null===this.B?Wp:this.B}setFontSizePercent(a){this.B=a;this.g()}getEdgeColor(){return this.G}setEdgeColor(a){this.G=
393
- a;this.g()}getEdgeType(){return this.o}setEdgeType(a){this.o=a;this.g()}};_.Xp.prototype.setEdgeType=_.Xp.prototype.setEdgeType;_.Xp.prototype.getEdgeType=_.Xp.prototype.getEdgeType;_.Xp.prototype.setEdgeColor=_.Xp.prototype.setEdgeColor;_.Xp.prototype.getEdgeColor=_.Xp.prototype.getEdgeColor;_.Xp.prototype.setFontSizePercent=_.Xp.prototype.setFontSizePercent;_.Xp.prototype.getFontSizePercent=_.Xp.prototype.getFontSizePercent;_.Xp.prototype.setFontSize=_.Xp.prototype.setFontSize;
394
- _.Xp.prototype.getFontSize=_.Xp.prototype.getFontSize;_.Xp.prototype.setFontColor=_.Xp.prototype.setFontColor;_.Xp.prototype.getFontColor=_.Xp.prototype.getFontColor;_.Xp.prototype.setFontFamily=_.Xp.prototype.setFontFamily;_.Xp.prototype.getFontFamily=_.Xp.prototype.getFontFamily;_.Xp.prototype.setWindowColor=_.Xp.prototype.setWindowColor;_.Xp.prototype.getWindowColor=_.Xp.prototype.getWindowColor;_.Xp.prototype.setBackgroundColor=_.Xp.prototype.setBackgroundColor;
395
- _.Xp.prototype.getBackgroundColor=_.Xp.prototype.getBackgroundColor;var Wp=1/15;var Zn="raised",$n="depressed",bo="dropshadow",ao="uniform";_.z("clpp.text.EdgeType",{NONE:_.Ad,RAISED:Zn,DEPRESSED:$n,DROP_SHADOW:bo,UNIFORM:ao});_.Xn[Tb]=class{constructor(a){this.g=a;this.a=null;this.f=new _.O("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Xn[_.Ub]||null;c?(b=new c(this.g),b.parseInit(a)):this.f.warn("The clpp.ttml.Mp4TtmlParser class is not available. Please register the ttml component first.")}catch(c){b=null}if(b)this.a=b;else{try{const c=_.Xn[_.Vb]||null;c?(b=new c(this.g),b.parseInit(a)):this.f.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=
396
- null}if(b)this.a=b;else throw new _.H(_.G,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.H(_.G,2,2011);return this.a.parseMedia(a,b)}};var Yp;
397
- _.Zp=class extends _.Xp{constructor(a){super(a);this.m=a.getSurface().getMedia();this.f=`clpp-video-${Yp++}`;this.h=document.createElement(_.oe);this.j=this.w=!1;_.bm(this.m,this.f);document.head.appendChild(this.h);this.g()}append(){}remove(){return!0}isTextVisible(){return this.w}setTextVisibility(a){this.w=a}g(){if(!this.j){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.co(this)},b=
398
- Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.h.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.m.classList.remove(this.f);document.head.removeChild(this.h);this.j=!0;return Promise.resolve()}};Yp=0;_.ll("native",new class{ea(){return!0}create(a){return new _.Zp(a)}});_.$p=class{onContentWillLoad(){return Promise.resolve()}onContentLoaded(){return Promise.resolve()}onPlayerWillDestroy(){}onPlayerWillRelease(){}};};f.call(g,window);g.clpp._ = _;delete window.clpp; export let clpp = g.clpp; export default clpp;
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;