@castlabs/prestoplay 6.9.0 → 6.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +6 -6
  5. package/cjs/cl.cast.js +112 -111
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +467 -432
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +72 -72
  10. package/cjs/cl.externs.js +143 -45
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +78 -73
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -31
  15. package/cjs/cl.ima.js +24 -24
  16. package/cjs/cl.mse.js +276 -275
  17. package/cjs/cl.muxdata.js +14 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +14 -14
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.smooth.js +71 -71
  22. package/cjs/cl.thumbnails.js +24 -24
  23. package/cjs/cl.tizen.js +71 -71
  24. package/cjs/cl.ttml.js +29 -27
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +13 -13
  27. package/cjs/cl.vr.js +19 -19
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.youbora.js +20 -20
  30. package/cl.adobe.js +3 -3
  31. package/cl.airplay.js +3 -3
  32. package/cl.broadpeak.js +5 -5
  33. package/cl.cast.js +88 -88
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +396 -365
  36. package/cl.crypto.js +9 -9
  37. package/cl.dash.js +68 -67
  38. package/cl.externs.js +139 -45
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +64 -61
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +26 -25
  43. package/cl.ima.js +17 -17
  44. package/cl.mse.js +240 -242
  45. package/cl.muxdata.js +12 -12
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +11 -11
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +59 -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 +15 -15
  58. package/clpp.styles.css +15 -0
  59. package/package.json +1 -1
  60. package/typings.d.ts +249 -21
package/cl.core.js CHANGED
@@ -1,314 +1,335 @@
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,
76
- gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},
77
- restrictions:Zi(),tizen:{sideStreamText:_.bi(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1}};if(_.ai("Edge/")||_.bi())a.streaming.gapDetectionThreshold=.5;_.ei()&&(a.streaming.stallEnabled=!1);_.gi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.bi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,
78
- 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);
124
- return k.createMediaKeys()}).then(k=>{a.pa||(a.a.info("Created MediaKeys for key system",a.f.keySystem),a.G=k,a.R=!0)}).catch(k=>{if(!a.pa){a.f=null;a.J.clear();if(k instanceof _.H)throw k;throw new _.H(_.G,6,6002,{browserError:k.message});}});c.reject();return d};
125
- Dk=function(a){a=tf(a.h.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,
1
+ let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ka,oa,pa,ra,ta,ua,va,xa,Ca,Da,Ea,Fa,Ga,Ia,Oa,Pa,Qa,Ra,Ta,Ua,Va,Wa,Ya,ab,hb,kb,mb,nb,qb,tb,wb,xb,zb,Bb,ac,fc,tc,uc,Ac,Bc,Cc,Ec,Fc,Hc,Ic,Jc,Kc,Lc,Rc,Uc,Zc,$c,ad,bd,dd,gd,hd,id,md,ud,wd,xd,Cd,Fd,Ud,de,fe,ge,he,ie,je,ke,oe,pe,qe,ue,we,Ee,He,Pe,We,Xe,kf,of,pf,qf,rf,sf,uf,vf,wf,xf,yf,zf,Cf,Df,If,Ff,Uf,Vf,Zf,ag,ig,sg,tg,mg,pg,vg,xg,wg,zg,Ag,Bg,Eg,Fg,Hg,Ig,Mg,Og,Qg,Kg,Vg,Xg,Wg,Yg,Zg,$g,eh,fh,ih,Ih,Mh,Nh,Oh,Ph,Qh,Sh,Th,Uh,Xh,$h,di,ei,ii,ki,fi,hi,ji,li,mi,ni,pi,qi,wi,Ci,Hi,Ji,Gi,Ti,Mi,
2
+ Li,dj,ej,gj,hj,ij,jj,kj,lj,nj,mj,oj,pj,sj,tj,uj,fj,wj,yj,Aj,Cj,Jj,Kj,Lj,Mj,Nj,Oj,Pj,Qj,Rj,Sj,Tj,Zj,ik,kk,qk,uk,wk,Dk,Nk,zk,Ik,Sk,Uk,Vk,jl,kl,pl,sl,tl,ul,wl,xl,yl,ql,vl,zl,Al,Bl,Cl,Dl,El,Kl,Pl,Rl,Tl,Sl,Vl,Nl,bm,Zl,am,$l,Ql,cm,dm,em,km,lm,mm,pm,tm,um,wm,rm,qm,Em,Fm,Jm,Im,Lm,Nm,Om,Km,Qm,Rm,Wm,an,bn,cn,gn,hn,fn,jn,en,dn,ln,nn,pn,qn,rn,sn,tn,un,vn,wn,xn,yn,Cn,Gn,Hn,Jn,Ln,On,Vn,Pn,Qn,Tn,Wn,Xn,Zn,co,eo,go,io,jo,ho,bo,$n,ao,ko,lo,mo,po,no,oo,qo,ro,so,to,uo,vo,wo,xo,yo,zo,Bo,Co,Do,Fo,Ho,Mo,No,Oo,Qo,Ro,So,
3
+ Uo,Vo,To,Wo,Zo,Yo,Xo,$o,dp,cp,ip,Af,Bf;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="6.11.0";_.ea="AdaptationSet";_.fa="Already destroyed. No-op";_.ha="Already released. No-op";_.ia="Autoplay is not allowed due to browser policy.";_.ja="BANDWIDTH";ka="CHECKSUM";_.la="CODECS";_.ma="Cannot retrieve buffer information due to platform limitations";_.na="CastlabsPlayer";oa="Content-Length";pa="Content-Type";_.qa="Could not find configured DRM environment.";
4
+ ra="DRM licenses loaded";ta="DRMtoday";ua="DRMtodayOnboard";va="Destroying player";_.wa="Disable track type ";xa="Error while decoding string!";_.ya="Error while fetching license!";_.za="FairPlay Certificate URL is not defined";_.Aa="FairPlay License URL is not defined";_.Ba="GROUP-ID";Ca="HW_SECURE_ALL";Da="HW_SECURE_CRYPTO";Ea="HW_SECURE_DECODE";Fa="HeaderDrm";Ga="InvalidStateError";_.Ha="LANGUAGE";Ia="License verification failed: ";_.Ka="Loading player with configuration";_.La="MaxHeight";
5
+ _.Ma="MaxWidth";Oa="Missing media element";Pa="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Qa="No event provided!";Ra="No items in the playlist";Ta="No track data attached to the event, unable to add track!";Ua="Not a persistent session.";Va="NotAllowedError";Wa="NotSupportedError";_.Xa="PlayReady License URL is not defined";Ya="Player not ready yet.";_.Za="Player sources";_.$a="Please make sure ";ab="Preloading is not supported by this player.";
6
+ _.bb="QualityLevel";_.cb="RESOLUTION";_.fb="Releasing player with source";_.gb="Representation";hb="STANDARD";_.ib="SW_SECURE_CRYPTO";_.jb="SW_SECURE_DECODE";kb="Session is closed";mb="Signature Verification failed";nb="Skipping Session creation. License for init data was already requested in ";_.ob="SmoothStreamingMedia";_.pb="TYPE";qb="The index is not in the allowed range.";_.rb="URI";tb="Unable to translate ";_.ub="Unhandled/ignored event";_.vb="Unregistering listeners";wb="Unsupported keySystem";
7
+ xb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.yb="VIDEO";zb="WebkitEmeManager.MediaKeySession.load";_.Ab="Widevine License URL is not defined";Bb="Will create EME Manager: ";_.Cb="ad-break-started";_.Db="ad-break-stopped";_.Eb="ad-buffering";_.Fb="ad-clicked";_.Gb="ad-completed";_.Hb="ad-first-quartile";_.Ib="ad-impression";_.Jb="ad-loaded";_.Kb="ad-midpoint";_.Lb="ad-paused";_.Mb="ad-progress";_.Nb="ad-resumed";_.Ob="ad-skipped";_.Pb="ad-started";_.Qb="ad-stopped";_.Rb="ad-third-quartile";
8
+ _.Tb="addtrack";_.Vb="ads-timeline-changed";_.Wb="airplay-casting-ended";_.Xb="airplay-casting-started";_.Yb="airplay-status-changed";_.Zb="application/cea-608";_.$b="application/dash+xml";ac="application/mp4";_.bc='application/mp4; codecs\x3d"stpp"';_.cc='application/mp4; codecs\x3d"wvtt"';_.dc="application/ttml+xml";_.ec="application/vnd.ms-sstr+xml";fc="application/x-www-form-urlencoded";_.p="audio";_.gc="audio/aac";_.hc="audio/ac3";_.ic="audio/eac3";_.jc="audio/mp4";_.kc="audiobufferchanged";
9
+ _.lc="autoplaynotallowed";_.mc="bitratechanged";_.nc="boolean";_.oc="bufferingended";_.sc="bufferingstarted";tc="canplay";uc="canplaythrough";_.vc="castingstarted";_.wc="caststatuschanged";_.xc="cdn-switch-success";_.yc="cenc";_.zc="center";Ac="certificate-request";Bc="change";Cc="chrome";_.Dc="clpp-fill";Ec="clpp-hidden";Fc="clpp-mc-playlist";_.Gc="clpp.cast.CastSender";Hc="clpp.drm.HeaderDrm";Ic="clpp.drm.eme.AppleEmeManager";Jc="clpp.native.Player";Kc="clpp.plist.McPlaylist";Lc="clpp.utils.Platform";
10
+ _.Mc="codecs";_.Nc="column-reverse";_.Oc="com.adobe.primetime";_.Pc="com.apple.fps";_.Qc="com.microsoft.playready";Rc="com.microsoft.playready.recommendation";_.Sc="com.widevine.alpha";_.Tc="config.drm.customData is not defined";Uc="controls";_.Vc="cuechange";_.Wc="destroy()";_.Xc="disabled";_.Yc="div";Zc="drm.mediaKeys.end";$c="drm.mediaKeys.start";ad="drm.onPlay.end";bd="drm.onPlay.start";_.cd="drmexpirationupdate";dd="drmrenewalstarted";_.ed="drmsessionpersisted";_.fd="drmsessionupdate";gd="drmtoday";
11
+ hd="durationchange";id="encrypted";_.jd="end";_.kd="ended";_.ld="error";md="fullscreenElement";_.od="function";_.pd="height";_.qd="hidden";_.rd="html";_.sd="image";_.td="internal-error";ud="keystatuseschange";_.vd="left";wd="license-renewal";xd="license-request";_.yd="line-left";_.zd="line-right";_.Ad="loadeddata";_.Bd="loadedmetadata";Cd="loadstart";_.Dd="mdat";_.Ed="mdia";Fd="message";_.Gd="metadata";_.Hd="mimeType";_.Id="minf";_.Jd="moov";_.Kd="mp4";_.Ld="mpd-type-changed";_.Md="mpeg-dash-callback-event";
12
+ _.Nd="none";_.r="number";_.Od="object";_.Pd="onBitrateChanged()";_.Qd="onPlayerError()";_.Rd="onPlayerWillDestroy";_.Sd="onPlayerWillRelease";_.Td="onStateChanged()";Ud="online-status-changed";_.Yd="optional";_.Zd="org.w3.clearkey";_.$d="output-restricted";_.ae="pause";_.be="persistent";_.ce="persistent-license";de="picture-in-picture";_.ee="play";fe="player.afterLoad.end";ge="player.afterLoad.start";he="player.beforeLoad.end";ie="player.beforeLoad.start";je="player.load.end";ke="player.load.start";
13
+ _.le="playing";_.me="playlist-item-changed";_.ne="playlist-modified";oe="playlist.next.end";pe="playlist.next.start";qe="preload-failed";_.re="progress";_.se="px";_.te="ratechange";ue="released";_.ve="releasing";we="removetrack";_.xe="required";_.ye="resize";_.ze="right";_.Ae="seeked";_.Be="seeking";_.Ce="showing";_.De="sinf";Ee="stalled";_.Fe="start";_.Ge="statechanged";He="status-pending";_.Ie="stbl";_.Je="string";_.Ke="stsd";_.Le="style";_.Oe="subtitles-htmlcue";Pe="temporary";_.t="text";
14
+ _.Qe="text/vtt";_.Re="text/xml";_.Se="timeupdate";_.Te="trak";_.Ue="ttml-xml";_.Ve="und";We="unknown";Xe="update";_.Ye="urn:scte:scte35";_.Ze="urn:scte:scte35:2014";_.$e="user-seeked";_.af="user-seeking";_.bf="value";_.cf="vertical-lr";_.df="vertical-rl";_.w="video";_.ef="video/mp2t";_.ff="video/mp4";_.gf="videobufferchanged";_.hf="videotrackchanged";_.jf="vimond-response";kf="visibilitychange";_.lf="vtt-xml";_.mf="waiting";_.nf="waitingforkey";of="webkit-org.w3.clearkey";pf="webkitkeyadded";qf="webkitkeyerror";
15
+ rf="webkitkeymessage";sf="webkitneedkey";_.tf="width";uf="x-dt-csl-tracking-token";vf="x-dt-follow-up-token";wf="x-dt-resp-code";yf=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};zf=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:yf(a)}};
16
+ Cf=function(a,b){if(b){var c=Af;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&Bf(c,a,{configurable:!0,writable:!0,value:b})}};Df=function(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})};_.x=function(a){return Df(a())};
17
+ _.z=function(a,b){a=a.split(".");var c=Ef;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};_.Hf=function(a){return _.B(a)||Ff(a)?a:_.Gf(a)};_.Gf=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=If(b,{merging:a[c]},1));return b.merging||null};
18
+ If=function(a,b,c){const d=c+1;if(_.B(a)||!_.Kf(a))a={};for(const e in b)c=b[e],Ff(c)||_.B(c)||_.Lf(c)||c instanceof Element?a[e]=c:_.Kf(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.Lf(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=If([],c,d):!_.B(c)&&_.Mf(c)&&20>d&&(a[e]=If(a[e],c,d));return a};Ff=function(a){a=typeof a;return a===_.Je||a===_.r||a===_.nc};_.B=function(a){return null===a||"undefined"===typeof a};_.Kf=function(a){return typeof a===_.Od};
19
+ _.Lf=function(a){return typeof a===_.od};_.Rf=function(a){return typeof a===_.Je};_.Sf=function(a){return typeof a===_.r};_.Mf=function(a){if(_.B(a)||!_.Kf(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
20
+ _.Tf=function(a,b,c,d){if(a===b||null===a&&null===b||void 0===a&&void 0===b)return!0;if(null===a&&null!==b||null!==a&&null===b||void 0!==a&&void 0===b||void 0===a&&void 0!==b||!_.Kf(a)||!_.Kf(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.B(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.B(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.B(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
21
+ Uf=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};Vf=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.Wf=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};Zf=function(a){return a&&0<=Xf[a]?Xf[a]:Yf};ag=function(a){if(!a)return _.C("clpp.log",tb+a+ca),-1;const b=$f[a.toUpperCase()];return void 0===b?(_.C("clpp.log",tb+a+ca),-1):b};_.cg=function(a){bg.info.apply(bg,arguments)};_.dg=function(a){bg.debug.apply(bg,arguments)};
22
+ _.C=function(a){bg.warn.apply(bg,arguments)};_.eg=function(a){bg.error.apply(bg,arguments)};_.hg=function(a){if(a){var b=a.a();b in _.fg?_.gg.warn("Player-Factory '"+b+"' already registered"):(_.fg[b]=a,_.gg.info("Registered Player-Factory: '"+b+"'"))}};_.jg=function(a){var b=a.a;var c=[];for(const d in b.a)c.push.apply(c,b.a[d]);b=c;for(c=0;c<b.length;++c)ig(b[c]);a.a.clear()};_.kg=function(a,b,c,d){const e=f=>{for(const g of c)a.off(b,g,e);d(f)};for(const f of c)a.on(b,f,e)};
23
+ ig=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
24
+ sg=function(a,b){a.h.debug("onMetadata_()");b.mode=_.qd;const c=[];let d=!0;const e=f=>{for(var g of c)if(f.startTime===g.startTime&&f.endTime===g.endTime)return g;g={schemeIdUri:"",value:"",startTime:0,endTime:0,id:"",type:_.lg,eventElement:null};a.o&&d&&"SCTE35-IN"===f.value.key&&0<f.startTime?(g.startTime=0,g.endTime=f.startTime):(g.startTime=f.startTime,g.endTime=f.endTime);d=!1;c.push(g);return c[c.length-1]};if(b.cues){for(const f of b.cues){if(mg(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
25
+ _.Ze;g.type=_.ng;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.m.trigger(new _.F(_.og,{detail:f}));Array.prototype.push.apply(a.g,c);pg(a,c,b);a.f.off(b,_.Vc);a.f.on(b,_.Vc,f=>{f=f.target.activeCues;f=f.length?mg(a,f[0]):a.a;var g;if(g=f){{g=f;const h=a.m.getPosition();g=g.startTime<=h&&h<g.endTime}}if(g)a.a=f,a.m.trigger(new _.F(_.qg,{detail:f}));else{if(f=a.a)f=a.a,g=a.m.getPosition(),f=f.endTime<=g;f&&(f=a.a,a.a=null,a.m.trigger(new _.F(_.rg,{detail:f})))}})}};
26
+ tg=function(a,b){a.j=b;a.l=a.j.textTracks;a.f.on(a.l,_.Tb,c=>{c=c.track;c.kind===_.Gd&&sg(a,c)})};mg=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};pg=function(a,b,c){if(a.o){for(;0<c.cues.length;)c.removeCue(c.cues[0]);b.forEach(function(d){c.addCue(new DataCue(d.startTime,d.endTime,{key:"SCTE35-OUT",data:null}))})}};_.ug=function(a){return Array.isArray(a)?a:[a]};
27
+ vg=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};xg=function(a,b,c){if(null==a&&null==b)return!0;if(null==a||null==b)return!1;a=c?a.map(c):a;b=c?b.map(c):b;return wg(a,b)&&wg(b,a)};wg=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.yg=function(a,b={}){if(b.De){const c=[];for(const d of a)c.some(e=>b.De(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};
28
+ zg=function(a,b){b=b.track;b.kind!==_.Gd&&(b.mode===_.Ce&&(b.mode=_.qd),a.a.on(b,_.Vc,c=>{c=c.target||c.srcElement;c.mode=_.qd;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};Ag=function(a,b,c,d){a=`${a===_.G?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.Rf(d))a+=": "+d;else if(null!=d&&void 0!=d)if(null!=d.message&&void 0!=d.message)a+=": "+d.message,delete d.message;else try{a+=": "+JSON.stringify(d)}catch(e){}return a};
29
+ Bg=function(a,b){const c=b||vg;let d=null,e=null,f=!1;return function(...g){if(f&&c(g,d))return e;f=!0;d=g;return e=a(...g)}};_.Cg=function(a){return null!=a};Eg=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new Dg("No non-null, non-undefined value found");};Fg=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
30
+ _.Gg=function(a){var b;a instanceof _.Gg?(Hg(this,a.Va),this.fc=a.fc,this.Ga=a.Ga,Ig(this,a.wc),this.xa=a.xa,_.Jg(this,Kg(a.a)),this.Wb=a.Wb):a&&(b=String(a).match(Lg))?(Hg(this,b[1]||"",!0),this.fc=Mg(b[2]||""),this.Ga=Mg(b[3]||"",!0),Ig(this,b[4]),this.xa=Mg(b[5]||"",!0),_.Jg(this,b[6]||"",!0),this.Wb=Mg(b[7]||"")):this.a=new _.Ng(null)};Hg=function(a,b,c){a.Va=c?Mg(b,!0):b;a.Va&&(a.Va=a.Va.replace(/:$/,""))};
31
+ Ig=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.wc=b}else a.wc=null};_.Jg=function(a,b,c){b instanceof _.Ng?a.a=b:(c||(b=Og(b,Pg)),a.a=new _.Ng(b))};Mg=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};Og=function(a,b,c){return typeof a===_.Je?(a=encodeURI(a).replace(b,Qg),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};Qg=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.Ng=function(a){this.f=a||null};
32
+ Kg=function(a){var b=new _.Ng;b.f=a.f;if(a.a){var c={},d;for(d in a.a)c[d]=a.a[d].concat();b.a=c;b.g=a.g}return b};_.I=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.H(_.G,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};_.Sg=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Rg.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Tg=function(a,b){a=_.Sg(a);b=_.Sg(b);return a.split("-")[0]==b.split("-")[0]};
33
+ _.Ug=function(a,b){for(const c of a)if(!b(c))return!1;return!0};Vg=function*(a){for(let b=0;b<a;b++)yield b};Xg=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Wg(a)==Wg(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;const c=_.J(a);b=_.J(b);for(const d of Vg(a.byteLength))if(c[d]!=b[d])return!1;return!0};Wg=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.J=function(a,b=0,c=Infinity){return Yg(a,b,c,Uint8Array)};
34
+ Yg=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=Wg(a),g=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b*e,g));c=Math.min(a+Math.max(c*e,0),g);a/=e;return new d(f,a,c/e-a)};Zg=function(a,b=0,c=Infinity){return Yg(a,b,c,Uint16Array)};$g=function(a,b=0,c=Infinity){return Yg(a,b,c,Uint32Array)};_.ah=function(a,b=0,c=Infinity){return Yg(a,b,c,Int32Array)};_.bh=function(a,b=0,c=Infinity){return Yg(a,b,c,DataView)};
35
+ eh=function(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};fh=function(a){let b="";for(let c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};
36
+ _.gh=function(a){if(!a)return"";a=_.J(a);239===a[0]&&187===a[1]&&191===a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(xa);return a}a=escape(fh(a));try{return decodeURIComponent(a)}catch(b){throw Error(xa);}};
37
+ ih=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw hh.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.J(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(_.J(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return fh(c)};
38
+ _.jh=function(a,b){if(_.Rf(a))return a;let c="";b=!!b;const d=_.J(a);239==d[0]&&187==d[1]&&191==d[2]?c=_.gh(d):254==d[0]&&255==d[1]?c=ih(d.subarray(2),!1):255==d[0]&&254==d[1]&&(c=ih(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);hh.debug("Unable to find byte-order-mark, making an educated guess.");0==d[0]&&0==d[2]?c=ih(a,!1):0==d[1]&&0==d[3]?c=ih(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.gh(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
39
+ };_.kh=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.lh=function(a,b){const c=new Uint8Array(2*a.length),d=new DataView(c.buffer);for(let e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
40
+ _.mh=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=$g(d):2===c?e=Zg(d):e=_.J(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.nh=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.oh=function(a,b){if(String.prototype.endsWith)return a.endsWith(b);const c=a.length-b.length;a=a.lastIndexOf(b,c);return-1!==a&&a===c};_.ph=function(a){return!!(a&&0<a.length)};_.qh=function(a){return!a||0===a.length};
41
+ _.rh=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(Uf(b))return"";a="bps";1E3<=Math.abs(b)&&(a="Kbps",b/=1E3);1E3<=Math.abs(b)&&(a="Mbps",b/=1E3);return`${b.toFixed(2).replace(/[.,]00$/,"")}${a}`}catch(b){return""}};_.th=function(a){a=a.replace(/<[^>]+>/gi,"");sh.innerHTML=a;a=sh.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.vh=function(a,b){b=void 0==b?!0:b;a=_.uh(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};
42
+ _.uh=function(a){a=fh(_.J(a));return btoa(a)};_.wh=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.xh=function(a){const b=new Uint8Array(a.length/2);for(let c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b};_.yh=function(a){let b="";for(let c=0;c<a.length;++c){let d=a[c].toString(16);1==d.length&&(d="0"+d);b+=d}return b};
43
+ _.zh=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!=b.length)return!1;for(let c=0;c<a.length;++c)if(a[c]!=b[c])return!1;return!0};_.Ah=function(a){var b=0;for(var c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);c=0;for(let d=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};
44
+ _.Bh=function(a,b){b.lastIndex=a.a;b=b.exec(a.f);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.a==a.f.length||null==b||b.position!=a.a)return null;a.a+=b.length;return b.results};
45
+ _.Fh=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.H(_.G,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.Ch(d);var f;(f=_.Bh(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.Bh(d,g);)c.push(new _.Dh(f[1],f[2]||f[3]))}return new _.Eh(a,b,c,e)};_.Hh=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...Gh]}};
46
+ Ih=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts;a.fatalStatusCodes=b.fatalStatusCodes||[...Gh]};
47
+ _.Kh=function(a,b){_.Rf(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.Jh,uriIndex:0,method:a.method||"GET",body:a.body||null,headers:Object.assign({},a.headers),allowCrossSiteCredentials:a.allowCrossSiteCredentials||!1,onProgress:a.onProgress||null,onFragment:a.onFragment||null,maxAttempts:a.maxAttempts||1,currentAttempt:0,baseDelay:a.baseDelay||1E3,backoffFactor:a.backoffFactor||2,fuzzFactor:a.fuzzFactor||.5,timeout:a.timeout||0,requestModifiers:a.requestModifiers||
48
+ [],responseModifiers:a.responseModifiers||[],startTime:a.startTime||null,endTime:a.endTime||null,contentType:a.contentType||null,licenseRequestType:a.licenseRequestType||null,sessionId:null,bytesRemaining:-1,bytesLoaded:-1,bytesTotal:-1,timescale:a.timescale||null,rateLimitBps:a.rateLimitBps||null,disableFragmentSupport:a.disableFragmentSupport||!1,disableMergedFragments:a.disableMergedFragments||!1,fatalStatusCodes:[...Gh],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&Ih(c,b);return c};
49
+ _.Lh=function(a,b,c,d,e,f,g,h){e&&(d=e);e={uri:d,data:b||new ArrayBuffer(0),headers:a,status:c,fromCache:!!a["x-shaka-from-cache"],timeMs:g,responseStartMs:h,request:f};if(200<=c&&299>=c&&202!==c)return e;g=null;try{g=_.jh(b,!0)}catch(k){}_.dg("HTTP error text:",g);throw new _.H(0<=(f.fatalStatusCodes||[]).indexOf(c)?_.G:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};
50
+ Mh=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};Nh=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};Oh=function(a,b,c){if(0>=a)return Promise.resolve();const d=8*c/a-b/1E3;return 0<d?new Promise(e=>{setTimeout(e,1E3*d)}):Promise.resolve()};
51
+ Ph=function(a,b,c){try{const d=a(b);if(d&&d.P&&d.abort)return c.resolve(d.P),()=>d.abort();c.resolve(d);return()=>Promise.resolve(d).then(()=>{}).catch(()=>{})}catch(d){return c.reject(d),()=>Promise.resolve()}};Qh=function(a,b){a.P.then(()=>b(!0),()=>b(!1));return a};_.Rh=function(a,b){a.a.push(Qh(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};Sh=function(a,b){return _.x(function*(){const c=yield a.fetch(b);return _.gh(c.data)})};
52
+ Th=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.x(function*(){if(!navigator.onLine)return!1;if(b){const e=_.Kh(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).P}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};Uh=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.Vh=function(a){return a&&a!==_.Ve?a:null};
53
+ Xh=function(a){if(!a)throw new _.H(_.G,3,3101,`Invalid track type: ${a}`);if(!_.Rf(a))throw new _.H(_.G,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.K:return _.K;case _.L:return _.L;case _.M:return _.M;case Wh:return Wh}throw new _.H(_.G,3,3101,`Unknown track type: ${a}.`);};
54
+ $h=function(a,b){a=Xh(a);const c=_.Vh(b.kind);let d=b.id;d||(d=String(_.Yh++));a=new _.Zh(d,c===_.Gd?Wh:a);a.kind=c;a.label=_.Vh(b.label);a.language=_.Vh(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.ai=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.g}${a.f}`};
55
+ _.bi=function(a,b,c){return a?(c||Object.keys(a).sort()).reduce(function(d,e){if(!(e in a))return d;const f=a[e];let g="\x26";""===d&&(g=b?"":"?");d=d+g+encodeURIComponent(e);return d=d+"\x3d"+encodeURIComponent(void 0===f?"":f)},""):""};_.ci=function(a){const b={};a=a||"";a=a.substring(a.indexOf("?")+1);for(const d of a.split("\x26")){var c=d.split("\x3d");a=decodeURIComponent(c[0]);c=decodeURIComponent(c[1]||"");a&&(b[a]=c)}return b};
56
+ di=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};ei=function(a,b){return _.x(function*(){const c=_.Kh(b);return yield Sh(a.f,c)})};ii=function(a,b,c){return _.x(function*(){const {mimeType:d,renditions:e}=yield fi(a,b,c),f=new _.Zh("dummy",_.M),g=e.map((h,k)=>{k=new _.gi(`R${k}`,f);k.bandwidth=h.bandwidth;k.Ac=h.Ac;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});hi(g);return{renditions:g,mimeType:d||void 0}})};
57
+ ki=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>ji(c));const b=new Map;a.forEach(c=>{if(c.type&&c.name){const d=`${c.type}:${c.name}`;if(b.has(d))throw Error("#EXT-X-MEDIA:NAME attributes are not unique. It is impossible to map HLS metadata to Safari data structures.");b.set(d,c)}});return b};fi=function(a,b,c){return _.x(function*(){const d=li(b),e=mi(b,c);return{mimeType:yield ni(a,e,d[0]?d[0].codec:null),renditions:d}})};
58
+ hi=function(a){const b=new Set;a.forEach(c=>{b.add(`${c.width}x${c.height}`)});if(b.size<a.length)throw Error("Playlist contains multiple renditions with the same resolution.");};ji=function(a){const b=_.Fh(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.pb);c=null!=c?{AUDIO:_.L,VIDEO:_.M,SUBTITLES:_.K}[c]:void 0;return{type:c,groupId:a(_.Ba),name:a("NAME"),language:a(_.Ha),Xg:a("AUTOSELECT"),default:a("DEFAULT"),eh:a("FORCED"),Ce:a("CHARACTERISTICS"),uri:a(_.rb)}};
59
+ li=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.Fh(0,b);if(c.getAttribute(_.yb))throw Error("Playlist contains alternative video streams.");var d=_.I(c,_.cb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.I(c,_.ja);e=e?Number(e):null;var f=_.I(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.I(c,_.la);c=_.oi(_.w,c?c.split(","):[]);return b={bandwidth:e,Ac:f,codec:c,width:b,height:d,mimeType:null}})};
60
+ mi=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?di(a,b):null};ni=function(a,b,c){return _.x(function*(){if(!b||!c)return null;var d=yield ei(a,b);d=[pi(d,b),qi(d,b)].filter(Boolean);return _.ri(d,_.w,c)})};pi=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?di(a,b):null};qi=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.I(_.Fh(0,a),_.rb))?di(a,b):null:null};
61
+ _.ti=function(a,b,c){for(const d of _.si)if(d.probe(b,c))return d.create(a);return null};_.ui=function(a){a=_.si.indexOf(a);0<=a&&_.si.splice(a,1)};_.vi=function(a,b){b&&(a+='; codecs\x3d"'+b+'"');return a};wi=function(a,b,c){a.stop();let d=!0,e=null;a.a=()=>{c?clearInterval(e):clearTimeout(e);d=!1};const f=()=>{d&&a.f()};e=c?setInterval(f,1E3*b):setTimeout(f,1E3*b);return a};
62
+ Ci=function(){if(xi)return xi;yi||(yi=new _.zi(()=>{xi=null}));(xi=document.querySelector(_.w)||document.querySelector(_.p))||(xi=document.createElement(_.w));yi.ca(1);return xi};_.Di=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Ei=function(a){return(navigator.userAgent||"").includes(a)};_.Fi=function(a){return _.Ei("Tizen"+(a?" "+String(a):""))};
63
+ Hi=function(a){const b={major:-1,name:We};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Gi(a,c[0]));2<=c.length&&(b.minor=Gi(a,c[1]));3<=c.length&&(b.patch=Gi(a,c[2]));4<=c.length&&(b.build=Gi(a,c[3]));return b};_.Ii=function(){return _.Ei("Web0S")};_.Ki=function(){return _.Ii()&&79===Ji().major};
64
+ Ji=function(){const a=Li();const b=["ie","edge","opera","firefox","safari",Cc];var c=Mi();const d=Ni[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Hi(c[1]);return Hi("")};_.Oi=function(){return _.Ei("CrKey")};_.Pi=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Fi()};_.Qi=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Pi()&&1<navigator.maxTouchPoints};_.Ri=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
65
+ Gi=function(a,b){try{return parseInt(b,10)}catch(c){Si.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};Ti=function(a,b){if(!a||!b||0===b.length)return!1;for(let c=0;c<b.length;c++)if(0<=a.indexOf(b[c]))return!0;return!1};
66
+ Mi=function(){const a=Li();if(!a)return Ui;var b=a.match(/^.+?(?=\))/);if(!b)return Ui;b=b[0];if(Ti(b,["iphone","ipad"]))return Vi;if(Ti(b,["android"]))return Wi;if(Ti(b,["macintosh"]))return Xi;if(Ti(b,["windows nt"]))return Yi;if(Ti(b,["tizen"]))return Zi;if(Ti(b,["web0s"]))return $i;if(Ti(b,["linux"]))return aj;Si.warn("Unable to identify OS from user agent: "+a);return Ui};Li=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
67
+ _.cj=function(){var a=Mi();var b=Mi();var c=Ni[b];if(c){c=Li().match(c.os_version)[1];c=Hi(c);if(b===Yi)if("5.1"===c.name)c.name="xp";else if("6.1"===c.name)c.name="7";else if("6.2"===c.name||"6.3"===c.name)c.name="8";b=c}else b=Hi("");a:{c=Li();const e=["ie","edge","opera","firefox","safari",Cc];var d=Mi();d=Ni[d];for(let f=0,g=e.length;f<g;f++)if(d[e[f]]&&c.match(d[e[f]])){c=e[f];break a}c=bj}return{os:a,osVersion:b,browser:c,browserVersion:Ji()}};
68
+ dj=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.Tf(a,{kind:_.Vh(b.kind),language:_.Vh(b.language),label:_.Vh(b.label)},["kind","language","label"])};ej=function(a){return a.enabled||a.selected||a.mode===_.Ce||a.mode===_.qd};gj=function(a,b,c){return fj(a)&&b===_.M&&!!c.enableHlsVideoTrackInfo};
69
+ hj=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.mimeType&&(b.mimeType=d.mimeType),d.renditions&&0<d.renditions.length&&(b.renditions=d.renditions,b.renditions.forEach(e=>{e.track=b})))})};ij=function(a,b,c){return fj(a)&&(b===_.L||b===_.K)&&!!c.enableMetadata};
70
+ jj=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.tc&&(d=d.tc.get(`${b.type}:${b.label}`))&&d.Ce&&(b.accessibility=d.Ce.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};kj=function(a,b){return a.g.filter(c=>c.type===b)};lj=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};nj=function(a,b){if(a=mj(a,b))a=Array.from(a),b===_.K&&(a=a.filter(c=>c.kind!==_.Gd));return a};
71
+ mj=function(a,b){if(!a.m)return null;a=a.m.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.L:return a.audioTracks;case _.M:return a.videoTracks;case _.K:return a.textTracks;default:return null}};oj=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};pj=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
72
+ sj=function(a,b,c){const d=nj(a,b);if(c){if(void 0===a.g.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.h.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.l.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.K:f="mode";e=_.Ce;g=_.Xc;break;case _.L:f="enabled";break;case _.M:f="selected"}if(f)for(const h of d)h[f]=dj(c,h,c.type)?e:g}}else if(a.h.debug(_.wa+b),a.a.get(b)&&d&&b===_.K){for(e of d)e.mode=
73
+ _.Xc;a.a.set(b,null)}b===_.L?a.m.trigger(new _.F(_.qj)):b===_.K&&a.m.trigger(new _.F(_.rj))};tj=function(a,b,c){if(a.m){var d=a.m.getSurface().getMedia();if(d){var e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);e.src=_.qh(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
74
+ uj=function(a,b){return _.x(function*(){var c=a.m.getConfiguration(),d=_.ti(c,b.mimeType,_.Qe);if(d){c=_.Kh(b.url);var e=yield a.m.getNetworkEngine().fetch(c).P;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.J(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Qe},tj(a,d,c))}else a.h.warn("Track mimetype is not supported",b)})};fj=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.vj&&!a.url.endsWith(".m3u8"))&&_.Pi()};
75
+ wj=function(a,b,c){c=_.ug(c).filter(e=>e);a.h.info("Find preferred tracks for",b,c);const d=kj(a,b);c.some(e=>{const f=_.Sg(e);return(e=d.find(g=>{g=_.Sg(g.language||"");return _.Tg(f,g)}))?(a.h.info("Will select track with id",e.id),sj(a,b,e),!0):!1})};yj=function(a){return a.name===Va&&xj.some(b=>a.message.startsWith(b))};
76
+ _.Bj=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Qi()&&(a=360);const b=_.Hh();b.maxAttempts=3;a={source:"",license:zj,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.Hh(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,
77
+ restrictions:Aj(a),useCmsd:!1},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:"main",preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,relativeTextTimestamp:!1,
78
+ startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,
79
+ ignoreManagedMediaSourceStreamingHints:!1},restrictions:Aj(),tizen:{sideStreamText:_.Fi(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1}};if(_.Ei("Edge/")||_.Fi())a.streaming.gapDetectionThreshold=.5;_.Ii()&&(a.streaming.stallEnabled=!1);_.Ki()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Fi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,
80
+ fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};Aj=function(a){a=void 0===a?Infinity:a;return{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}};
81
+ _.Dj=function(...a){if(!a)return _.Bj();var b=[_.Bj()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.Rf(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({suggestedPresentationDelay:0,streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{hlsLowLatency:!0}}),c=!0),b.push(d));a=_.Gf.apply(null,b);_.Rf(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));
82
+ if(!_.B(a.volume)&&(!_.Sf(a.volume)||Uf(a.volume)))throw new _.H(_.G,7,7100,"config.volume is not a number");if(!_.B(a.preferredTextLanguage)&&!_.Rf(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.G,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.B(a.preferredAudioLanguage)&&!_.Rf(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.G,7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.B(a.preferredAudioCodec)&&
83
+ !_.Rf(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.G,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.B(a.preferredVideoCodec)&&!_.Rf(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.G,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.B(a.drm)){if(a.drm.env&&!_.Rf(a.drm.env))throw new _.H(_.G,7,7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.Rf(a.drm.offlineId))throw new _.H(_.G,
84
+ 7,7100,"config.drm.offlineId is not a string");}if(b=a.streaming){b.bufferingGoal=Number(b.bufferingGoal);b.rebufferingGoal=Number(b.rebufferingGoal);b.bufferBehind=Number(b.bufferBehind);b.smallGapLimit=Number(b.smallGapLimit);b.durationBackoff=Number(b.durationBackoff);if(!_.Sf(b.bufferingGoal)||Uf(b.bufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.Sf(b.rebufferingGoal)||Uf(b.rebufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal is not a number");
85
+ if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.Sf(b.bufferBehind)||Uf(b.bufferBehind))throw new _.H(_.G,7,7100,"config.streaming.bufferBehind is not a number");if(!_.Sf(b.smallGapLimit)||Uf(b.smallGapLimit))throw new _.H(_.G,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.Sf(b.durationBackoff)||Uf(b.durationBackoff))throw new _.H(_.G,7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;
86
+ if(_.B(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.r)throw new _.H(_.G,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Cj(a.restrictions);Cj(a.abr.restrictions);a.abr.initialRestrictions&&Cj(a.abr.initialRestrictions)}return a};
87
+ Cj=function(a){_.B(a.maxPixels)&&(a.maxPixels=Infinity);_.B(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.B(a.maxHeight)&&(a.maxHeight=Infinity);_.B(a.maxWidth)&&(a.maxWidth=Infinity);_.B(a.minPixels)&&(a.minPixels=0);_.B(a.minBandwidth)&&(a.minBandwidth=0);_.B(a.minHeight)&&(a.minHeight=0);_.B(a.minWidth)&&(a.minWidth=0);a.minWidth=Number(a.minWidth);a.maxWidth=Number(a.maxWidth);a.minHeight=Number(a.minHeight);a.maxHeight=Number(a.maxHeight);a.minBandwidth=Number(a.minBandwidth);a.maxBandwidth=Number(a.maxBandwidth);
88
+ a.minPixels=Number(a.minPixels);a.maxPixels=Number(a.maxPixels);if(Number.isNaN(a.minWidth)||Number.isNaN(a.maxWidth)||Number.isNaN(a.minHeight)||Number.isNaN(a.maxHeight)||Number.isNaN(a.minBandwidth)||Number.isNaN(a.maxBandwidth)||Number.isNaN(a.minPixels)||Number.isNaN(a.maxPixels))throw new _.H(_.G,7,7100,"Restrictions contain NaN");};_.Ej=function(a){return typeof a===_.Od&&!Array.isArray(a)&&"source"in a};_.Gj=function(a){return _.Fj.get(a)||null};
89
+ _.Ij=function(a){_.Fj.get(a.id())?Hj.warn("Component already in use."):_.Fj.set(a.id(),a)};Jj=function(a){return Array.from(_.Fj.values()).find(b=>b instanceof a)||null};Kj=function(a){for(const b of _.Fj.values())a(b)};Lj=function(a){Kj(b=>{b.o(a)})};Mj=function(a){Kj(b=>{b.g(a)})};Nj=function(){Kj(()=>{})};Oj=function(){Kj(()=>{})};Pj=function(a){if(null!==Jj(a))return null;a=new a;a.f();_.Ij(a);Hj.info("Installed component:",a.id());return a};
90
+ Qj=function(a){if(a=Jj(a))a.a(),_.Fj.delete(a.id()),Hj.info("Uninstalled component:",a.id())};Rj=function(a){return _.nh(a,_.Pc)||_.nh(a,_.Qc)};Sj=function(a,b){3===b.type&&(a.f&&(a.h.debug("Attaching tracking token"),b.headers[uf]=a.f),a.a&&(b.headers[vf]=a.a))};
91
+ Tj=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[uf],a.a=b.headers[vf],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.h.debug("Loaded tracking token "+a.f),a.a&&a.h.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.gh(_.wh(b))),{delay:a.renewalPeriod,Ug:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.Vj=function(a){_.Uj[a.I]=a};
92
+ _.Xj=function(a){const b={attemptParameters:_.Hh(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Pa:{}};if(a&&(b.enforceSingleSession=!!a.enforceSingleSession,b.delayLicenseRequestUntilPlayed=!!a.delayLicenseRequestUntilPlayed,b.preferredDrmSystem=a.preferredDrmSystem,b.emeApi=a.emeApi,a.attemptParameters&&(b.attemptParameters=a.attemptParameters),b.enableSessionCacheForSkd=!!a.enableSessionCacheForSkd,void 0!==a.ignoreUnrecognizedInitData&&
93
+ (b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),a.env)){const c=_.Uj[a.env]||null;if(!c)throw _.dg(_.qa,_.$a+a.env+_.aa),new _.H(_.G,6,6015,`DRM environment '${a.env}' is missing.`);b.Pa=_.Wj(c,a.customData)||{};_.nh(a.env.toLowerCase(),gd)&&(b.enforceSingleSession=!0)}return b};Zj=function(a){a=Yj[a];if(!a)return null;const b=_.cj();return b.os===Wi&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
94
+ _.Wj=function(a,b){const c={};var d=b?b.widevineVideoRobustness:void 0,e=b?b.widevineAudioRobustness:void 0;const f=b?b.serverCertificate:void 0;var g=a.f[_.Sc];if(g){var h=g.licenseUrl;d=Fg(d,g.videoRobustness);e=Fg(e,g.audioRobustness);var k=g.modifiers,l=Eg(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=Eg(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.Je?Zj(f):f;c[_.Sc]=
95
+ {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.Pc])&&(c[_.Pc]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.Qc])&&(c[_.Qc]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
96
+ modifiers:g.modifiers});return c};_.ak=function(){throw new _.H(_.G,3,3E3);};_.bk=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.J(a.f.buffer);b=_.J(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.ak()}};_.O=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.ak()}};_.ck=function(a){return a.a<a.f.byteLength};_.dk=function(){throw new _.H(_.G,3,3E3,"Buffer read out of bounds.");};_.ek=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.dk()}};
97
+ _.fk=function(a){try{const b=a.f.getUint16(a.a,a.g);a.a+=2;return b}catch(b){_.dk()}};_.P=function(a){try{const b=a.f.getUint32(a.a,a.g);a.a+=4;return b}catch(b){_.dk()}};_.gk=function(a){try{const b=a.f.getInt32(a.a,a.g);a.a+=4;return b}catch(b){_.dk()}};_.hk=function(a){let b=0,c=0;try{!0===a.g?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.dk()}if(2097151<c)throw new _.H(_.G,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
98
+ ik=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.ek(a);return c};_.jk=function(a,b){a.a+b>a.f.byteLength&&_.dk();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.J(c)};kk=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.lk=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.mk=function(a){for(;_.ck(a.reader)&&!a.parser.a;)a.parser.pd(a.start+a.headerSize,a.reader,a.partialOkay)};
99
+ _.nk=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.pd(a.start+a.headerSize,a.reader,a.partialOkay)};_.ok=function(a){return b=>{const c=b.reader.Ba()-b.reader.getPosition();a(_.jk(b.reader,c))}};_.pk=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};qk=function(a){let b="";try{b=_.jh(a)}catch(c){}return b};_.sk=function(a){a=qk(a);let b="";a.length&&(b=(new _.rk(a)).a);return b};
100
+ uk=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.gh(a)),d=_.wh(c.sinf[0]);(new _.tk).L(_.De,_.mk).L("schi",_.mk).L("tenc",e=>{e.reader.skip(6);_.ek(e.reader)&&(e.reader.skip(1),b=_.yh(_.jk(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
101
+ wk=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.G,6,6102);let d;typeof b===_.Je?d=_.lh(b,!0):d=b;a=_.lh(qk(a),!0);b=new _.vk(12+a.byteLength+d.byteLength+c.byteLength,!0);_.O(b,a.byteLength);_.bk(b,_.J(a));_.O(b,d.byteLength);_.bk(b,_.J(d));_.O(b,c.byteLength);_.bk(b,_.J(c));return _.J(b.buffer)};_.xk=function(a){var b=_.J(a.body);b=_.vh(b);a.headers[pa]=fc;a.body=_.kh("spc\x3d"+b).buffer};
102
+ _.yk=function(a){let b;try{b=_.gh(a.data)}catch(c){return}b=b.trim();"\x3cckc\x3e"===b.substr(0,5)&&"\x3c/ckc\x3e"===b.substr(-6)&&(b=b.slice(5,-6));try{const c=JSON.parse(b);c.ckc&&(b=c.ckc);c.CkcMessage&&(b=c.CkcMessage);c.License&&(b=c.License)}catch(c){}a.data=eh(_.wh(b))};Dk=function(a,b){b=zk(b);if(a==_.Sc)return b+Ak;if(a==_.Qc)return b+Bk;if(a==_.Pc)return b+Ck;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
103
+ _.Gk=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(ta)?c.customData&&(_.Fk(b,a),a=b.uris[0],d&&c.customData.assetId&&(a+="?assetId\x3d"+encodeURI(`${c.customData.assetId}`),c.customData.variantId&&(a+="\x26variantId\x3d"+encodeURI(`${c.customData.variantId}`)),b.uris[0]=a)):Ek.warn(Pa)};
104
+ _.Hk=function(a,b){try{const c=_.J(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Ek.debug("Widevine License response",d);const e=atob(d.license),f=new Uint8Array(e.length);for(a=0;a<e.length;++a)f[a]=e.charCodeAt(a);b.data=f.buffer}catch(c){Ek.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
105
+ _.Jk=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Gk(a,b,c,!1);b.headers[pa]=fc;c={spc:_.uh(b.body)};if((a=a.drm)&&a.env.startsWith(ua)&&d){a={};var e=_.ci((new _.rk(Ik(d))).f);d=e.keyId;if(e=e.assetId)Ek.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Ek.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Ek.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Ek.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
106
+ _.mh(_.bi(c,!0))};_.Kk=function(a,b){Ek.debug("Clearing response data");200===b.status&&(a=_.gh(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.wh(a).buffer)};
107
+ _.Lk=function(a,b,c){b=qk(b);c=c&&c.customData?c.customData:{};b=new _.rk(Ik(b));const d=_.ci(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.ph(`${a}`)&&(d.assetId=a,Ek.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.ph(`${e}`)&&(d.variantId=e,Ek.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Ek.debug("KeyId found in FPS SKD. Removing other parameters")):
108
+ a=["assetId","variantId"];b.f=_.bi(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.ai(b);return c.fpsContentId=b};_.Mk=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ta))Ek.warn(Pa);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(ua)){const c=new _.Gg(b.uris[0]);let d=c.xa;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.xa=d;b.uris[0]=c.toString()}};Nk=function(a,b,c){_.Gk(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.Gg(b.uris[0]);c.a.add(_.be,a);b.uris[0]=c.toString()};
109
+ zk=function(a){if(a===Ok)return"https://lic.drmtoday.com";if(a===Pk)return"https://lic.staging.drmtoday.com";if(a===Qk)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Ik=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
110
+ _.Fk=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};a:{for(d in c)if(void 0!==c[d]){var d=!0;break a}d=!1}d&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};Sk=function(a){const b={},c=a?a[wf]:void 0;a=Rk[a?a[wf]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
111
+ Uk=function(a,b=0){_.cg("Registering EME Factory: "+a.a());a={priority:b,Hb:a};for(let c=0;c<Tk.length;++c)if(Tk[c].priority<b){Tk.splice(c,0,a);return}Tk.push(a)};Vk=function(a){if(a){const {Hb:b}=Tk.find(({Hb:c})=>c.a()===a);if(b&&b.da())return _.cg(Bb+b.a()),b.create();_.cg("Cannot create selected EME manager. Choosing by priority list.")}for(const {Hb:b}of Tk)if(b.da())return _.cg(Bb+b.a()),b.create();throw Error("Missing EME managers");};
112
+ _.Xk=function(a,b){a=_.Wk(a,b);return 1!=a.length?null:a[0]};_.Wk=function(a,b){return Array.prototype.filter.call(a.childNodes,c=>c instanceof Element&&c.tagName==b)};_.Yk=function(a){return Array.prototype.every.call(a.childNodes,b=>b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE)?a.textContent.trim():null};
113
+ _.Zk=function(a,b){const c=new DOMParser;let d=null,e=null;try{e=c.parseFromString(a,_.Re)}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d};_.fl=function(a){var b=_.xh(a);b=parseInt(b.byteLength,10).toString(16);b=_.xh("12"+b+a);return new dl(el,a,b)};
114
+ _.hl=function(a){const b=new _.gl(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.lk(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.jk(b,16);f=_.yh(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let u=_.ek(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.ek(b),v=(v|(u&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:v},k=u=>{switch(u){case 0:do if(!_.ck(b))throw Error("not enough data to skip!");while(_.ek(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
115
+ break;case 3:for(;4!==(u=h()&7);)k(u);break;case 5:b.skip(4);break;default:throw Error("invalid wire type "+u);}},l=[];let m=null;for(;_.ck(b);){var n=h(),q=n&7;n>>>=3;if(2===q){q=h();if(0>q)throw Error(`unable to read length of field ${n}`);q=ik(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.dg("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.uh(m):"","keyIds",l.map(u=>_.yh(u)));return 0<l.length?_.fl(_.yh(l[0])):null};
116
+ _.il=function(a){const b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);b.push(a[5]);b.push(a[4]);b.push(a[7]);b.push(a[6]);a=_.J(a);a.set(b,0);return a};
117
+ _.nl=function(a){a:{var b=new _.gl(new DataView(a.buffer),!0);_.P(b);for(_.fk(b);_.ck(b);)if(1===_.fk(b)){var c=_.fk(b);b=_.jk(b,c);break a}b=null}b||(b=a);a=ih(b,!0);c=_.Zk(a,"WRMHEADER");a=c.getAttribute("version");var d=_.Xk(c,"DATA");c=(c=_.Xk(d,"LA_URL"))?_.Yk(c):"";var e;if(e=_.Xk(d,"KID"))if(e=_.Yk(e)){var f=_.Xk(d,ka);e={value:e,zd:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=jl(d))?[e]:(d=kl(d))?d:null;const {value:g="",zd:h}=d&&d[0]||{};d=_.wh(g);d=_.il(d);d=_.yh(d);return new _.ll(_.ml,
118
+ d,c,b,a,h)};jl=function(a){a=_.Xk(a,"PROTECTINFO");if(!a)return null;var b=_.Xk(a,"KID");if(!b)return null;a=b.getAttribute("VALUE");if(!a)return null;const c=b.getAttribute(ka);b=b.getAttribute("ALGID");return{value:a,zd:c,Af:b}};
119
+ kl=function(a){a=_.Xk(a,"PROTECTINFO");if(!a)return null;a=_.Xk(a,"KIDS");if(!a)return null;var b=_.Wk(a,"KID");if(!b.length)return null;a=[];for(const c of b)if(b=c.getAttribute("VALUE")){const d=c.getAttribute(ka),e=c.getAttribute("ALGID");a.push({value:b,zd:d,Af:e})}return a.length?a:null};_.ol=function(a){performance.mark(a)};pl=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.zi(c)).ca(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};
120
+ _.rl=function(a){return ql(a)?_.Qc:a};sl=function(a,b){const c=[];b.forEach((d,e)=>{c.push({keySystem:e,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(const d of a)d.drmInfos=c};
121
+ tl=function(a,b){if(a.keySystem){var c=_.rl(a.keySystem);b=b[c];c===_.Zd&&a.licenseServerUri||(b&&(a.licenseServerUri=b.licenseUrl||""),a.keyIds||(a.keyIds=[]),b&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=b.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=b.persistentStateRequired),a.videoRobustness||(a.videoRobustness=b.videoRobustness||""),a.audioRobustness||(a.audioRobustness=b.audioRobustness||""),a.serverCertificate||(a.serverCertificate=
122
+ b.serverCertificate||null)))}};ul=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};wl=function(a){return(a.audioCapabilities||[]).some(vl)||(a.videoCapabilities||[]).some(vl)};xl=function(a,b){a=_.sk(b);_.dg("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
123
+ yl=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&"APPLE"===h){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.Lf(k)||(k=xl);let l="";try{l=k(b,c,g)}catch(m){throw new _.H(_.G,6,6103);}if(!l.length)throw new _.H(_.G,6,6101,"Content ID is an empty string");c=wk(c,l,a)}return c};ql=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
124
+ vl=function(a){return null!=a.robustness&&""!==a.robustness};zl=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.zh(g,f.serverCertificate))||c.push(f.serverCertificate));if(f.initData){for(const g of f.initData)g.periodId=f.periodId;for(const g of f.initData)d.some(h=>h.keyId&&h.keyId==g.keyId&&h.periodId===g.periodId?!0:!1)||d.push(g)}if(f.keyIds)for(a=0;a<f.keyIds.length;++a)e.includes(f.keyIds[a])||e.push(f.keyIds[a])}};
125
+ Al=function(a){var b=a.j;const c=a.W;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"==d)&&a.U(new _.H(_.G,6,6014));a.D.ae(_.Wf(c));a.o||a.h.info(ra);a.o=!0;a.B=!1};Bl=function(a){a.f.forEach((b,c)=>{const d=b.Xd;let e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Xd=e)})};
126
+ Cl=function(a){return _.x(function*(){a.w.release();a.w=null;a.K.release();a.K=null;a.o=!1;a.B=!1;a.F.reject();a.Y.stop();a.Y=null;a.S.stop();a.S=null;const b=Array.from(a.f.keys());for(const c of a.f.values())c.jc&&c.jc.stop();a.f.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.x(function*(){a.h.debug("Closing session",c.sessionId);try{yield pl(c)}catch(d){a.h.warn("Error while closing session",d)}}))));if(a.A){try{yield a.l.g(null)}catch(c){a.h.warn("Error while resetting media keys",
127
+ c)}a.A=null}a.l=null;a.a=null;a.J.clear();a.G=null;a.I=[];a.g=null;a.U=null;a.D=null;a.N=0;a.M=null})};_.Gl=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=Vf(a.g.Pa);sl(b,d)}if(d=Dl(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)tl(f,a.g.Pa);b=El(a,b);if(!b.size)return a.R=!0,Promise.resolve();_.ol($c);a=_.Fl(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.ol(Zc);performance.measure("DRM queryMediaKeys_()",$c,Zc)})};
128
+ _.Il=function(a,b,c){a.H=Hl;a.I=c;a.C=0<c.length;a.h.debug("Using Persisted Licenses: "+a.C);a.g&&a.g.enableSessionCacheForSkd&&a.h.info("Enabled session cache for SKD license requests");return _.Gl(a,b)};
129
+ _.Fl=function(a,b){if(1==b.size&&b.has(""))return Promise.reject(new _.H(_.G,6,6E3));null===a.l&&(a.l=Vk(a.g.emeApi));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.Jl;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)==h&&(d=d.catch(()=>{if(a.qa)return null;if(l===_.Qc){if(_.Di()&&!a.g.Pa[l].useLegacySystem)return k.label=Rc,a.l.a(Rc,[k]).catch(()=>{a.h.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
130
+ k.label=_.Qc;ul(k);return a.l.a(l,[k])});ul(k)}return a.l.a(l,[k]).catch(m=>{a:{if(l===_.Sc&&wl(k)){const n=_.cj();if(wl(k)&&n.os===Wi&&n.browser===Cc){a.h.warn("requestMediaKeySystemAccess() failed",m);a.h.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");ul(k);m=a.l.a(l,[k]);break a}}throw m;}return m})}))};let f=a.g.preferredDrmSystem;if(!f){var g=_.cj();if(g.os===Yi&&10<=g.osVersion.major&&"edge"===g.browser)f=_.Qc;else if("safari"===
131
+ g.browser)f=_.Pc;else if(g.browser===Cc||"firefox"===g.browser)f=_.Sc}f&&(g=b.get(f))&&(e(!0,g,f),e(!1,g,f));for(const h of[!0,!1])b.forEach((k,l)=>{l!==f&&e(h,k,l)});d=d.catch(h=>{throw new _.H(_.G,6,6001,null,h);});d=d.then(h=>{if(a.qa)return null;a.J.clear();var k=h.getConfiguration();a.h.info("Got MediaKeySystemAccess with configuration",k);var l=k.audioCapabilities||[];k=k.videoCapabilities||[];for(var m of l)a.J.add(m.contentType);for(var n of k)a.J.add(n.contentType);{l=h.keySystem;m=b.get(_.rl(h.keySystem));
132
+ n=[];k=[];const q=[],u=[];zl(m.drmInfos,n,k,q,u);1<k.length&&_.C("Multiple unique server certificates found! Only the first will be used.");1<n.length&&_.C("Multiple unique license server URIs found! Only the first will be used.");l={keySystem:l,licenseServerUri:n[0],distinctiveIdentifierRequired:m.distinctiveIdentifier==_.xe,persistentStateRequired:m.persistentState==_.xe,audioRobustness:m.audioCapabilities?m.audioCapabilities[0].robustness:"",videoRobustness:m.videoCapabilities?m.videoCapabilities[0].robustness:
133
+ "",serverCertificate:k[0],initData:q,keyIds:u,periodId:null}}a.a=l;if(!a.a.licenseServerUri)throw new _.H(_.G,6,6012,a.a.keySystem);return h.createMediaKeys()}).then(h=>{a.qa||(a.h.info("Created MediaKeys for key system",a.a.keySystem),a.G=h,a.R=!0)}).catch(h=>{if(!a.qa){a.a=null;a.J.clear();if(h instanceof _.H)throw h;throw new _.H(_.G,6,6002,{browserError:h.message});}});c.reject();return d};
134
+ Dl=function(a){a=Vf(a.g.Pa[_.Zd]||{});if(0==a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.xh(f);e=_.xh(e);e={kty:"oct",kid:_.vh(f,!1),k:_.vh(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.kh(d),initDataType:"keyids"}];return{keySystem:_.Zd,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
126
135
  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]"),
136
+ El=function(a,b){var c=new Set;for(var d of b)for(var e of d.drmInfos)tl(e,a.g.Pa),c.add(e);d=a.C?_.xe:_.Yd;e=a.C?[_.ce]:[Pe];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.yc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Yd,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.vi(b.mimeType,b.codecs):"",h=c?_.vi(c.mimeType,c.codecs):"";for(const k of f.drmInfos){const l=a.get(k.keySystem);l.drmInfos.push(k);
137
+ k.initData&&k.initData.length&&(l.initDataTypes=[...new Set(k.initData.map(m=>m.initDataType))]);k.distinctiveIdentifierRequired&&(l.distinctiveIdentifier=_.xe);k.persistentStateRequired&&(l.persistentState=_.xe);b&&_.ug(k.audioRobustness).forEach(m=>{const n={robustness:m||"",contentType:g};l.audioCapabilities.find(q=>q.robustness===n.robustness&&q.contentType===n.contentType)||l.audioCapabilities.push(n)});c&&_.ug(k.videoRobustness).forEach(m=>{const n={robustness:m||"",contentType:h};l.videoCapabilities.find(q=>
138
+ q.robustness===n.robustness&&q.contentType===n.contentType)||l.videoCapabilities.push(n)})}}return a};Kl=function(a){return _.x(function*(){if(!a.l.o())if(a.M)yield a.M;else try{a.M=a.l.g(a.G),yield a.M}catch(b){a.qa||a.U(new _.H(_.G,6,6003,b.message,b))}})};
139
+ _.Ol=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.H!==Hl)){var e=a.keySystem();if(!e.startsWith(_.Pc)&&b===_.yc){const f=new Ll(c);if(1<f.a.length&&(e={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[e]))for(let g=0;g<f.f.length;g++)if(e===f.f[g]){c=c.subarray(f.a[g].start,f.a[g].end+1);break}}(a.A.webkitCurrentPlaybackTargetIsWireless||
140
+ _.Fi(2)||a.keySystem().startsWith(_.Pc)||!_.Ml(a,d,c,!0))&&Nl(a,d,null,b,c)}};Pl=function(a,b){return _.x(function*(){a.h.info(`Handle encrypted event for type ${b.initDataType}`);yield Kl(a);b.initData&&_.Ol(a,b.initDataType,_.J(b.initData))})};Rl=function(a){return _.x(function*(){_.ol(bd);const b=a.V.map(c=>Ql(a,c));a.ba=!0;a.V=[];yield Promise.all(b);_.ol(ad);performance.measure("drm.onPlay",bd,ad)})};
141
+ Tl=function(a){const b=a.keySystem(),c=a.g.Pa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return Sl(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.Kh([d],a.g.attemptParameters);f.type=3;f.licenseRequestType=Ac;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.h.debug("Fetching certificate");return a.D.xb.fetch(f).P}).then(f=>{a.a.serverCertificate=_.J(f.data)}).catch(f=>{var g=
142
+ f.data.headers;g=Object.assign({message:"Error while fetching certificate!",url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},Sk(g));throw new _.H(_.G,6,6100,g,f);})};
143
+ _.Ul=function(a){return _.x(function*(){if(a.G&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.G.setServerCertificate(a.a.serverCertificate);void 0===b||b||a.h.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.H(_.G,6,6004,{browserError:b.message});}})};
144
+ _.Xl=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Fi(2);if(a.g.enforceSingleSession&&!a.keySystem().startsWith(_.Pc)){const e=a.f.values();for(const f of e)_.zh(c.initData,f.initData)?(a.h.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.h.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),Vl(c.initData,f)||(f.cd.push(c.initData),c.keyId&&!f.Qa.includes(c.keyId)&&
145
+ f.Qa.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,He)),d=!1)}!d||a.C&&a.H===Hl||(_.Ml(a,c.keyId,c.initData)&&(d=!1),d&&(a.h.info("Request new media key session on create"),Nl(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.I)_.Wl(a,c);b.length||a.I.length||(a.o||a.h.info(ra),a.o=!0,a.B=!1,a.F.resolve());return a.F};
146
+ _.Yl=function(a,b){if(!a.G)return _.kg(a.w,b,[id,"msneedkey",sf,"needkey"],()=>{a.U(new _.H(_.G,6,6010))}),Promise.resolve();a.A=b;a.l.l(b);a.w.one(a.A,_.ee,()=>Rl(a));a.w.on(a.A,_.nf,e=>{const f=a.B;a.B=!a.o;!f&&a.B&&(a.h.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.a.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.l.f()!==hb||a.I.length)d=Kl(a);c=Promise.resolve();_.Ii()&&38===Ji().major||(a.a&&a.a.keySystem!==_.Zd&&!a.a.serverCertificate&&(c=Tl(a)),
147
+ c=c.then(()=>_.Ul(a)));return Promise.all([d,c]).then(()=>{a.qa||(_.Xl(a),a.w.on(a.A,id,e=>Pl(a,e)))}).catch(e=>{if(!a.qa){if(6004===e.code&&a.a&&a.a.keySystem===_.Sc&&1>a.N&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.h.warn("Detected invalid widevine server certificate!. Retrying"),a.U(new _.H(1,6,6004)),a.a.serverCertificate=null,a.N++,_.Yl(a,b);1<=a.N&&a.h.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
148
+ Sl=function(a,b){return _.x(function*(){const c=a.D.qc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
149
+ _.Wl=function(a,b){let c;try{a.h.debug("Attempting to load an offline session",b),c=a.G.createSession(_.ce)}catch(e){const f=new _.H(_.G,6,6005,{browserError:e.message});a.U(f);return Promise.reject(f)}a.w.on(c,Fd,a.na.bind(a));a.w.on(c,ud,a.fa.bind(a));const d={initData:null,loaded:!1,Xd:Infinity,mb:null,Ca:new _.Jl,periodId:null,cd:[],keyId:null,Qa:[],initDataType:null,Vb:null,sessionContext:{ldlDelay:0,customData:{}}};d.Ca.catch(()=>{});a.f.set(c,d);return c.load(b).then(e=>{if(a.qa)return null;
150
+ a.h.debug("Loaded offline session",b,e);if(!e)return a.f.delete(c),a.U(new _.H(_.G,6,6013)),null;d.loaded=!0;Zl(a)&&(a.o||a.h.info(ra),a.o=!0,a.B=!1,a.F.resolve());return c},e=>{a.qa||(a.f.delete(c),a.U(new _.H(_.G,6,6005,{browserError:e.message})))})};Vl=function(a,b){if(!a)return!1;for(let c=0;c<b.cd.length;c++)if(_.zh(a,b.cd[c]))return!0;return!1};
151
+ _.Ml=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.f.keys()){const f=a.f.get(e);if(_.zh(c,f.initData))return b?f.Qa.includes(b)?d&&a.h.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.Qa.push(b),a.j.get(b)||a.j.set(b,He),d&&a.h.info(nb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.h.info(nb+`Session: '${e.sessionId}'`),!0;if(Vl(c,f))return d&&a.h.info("Skipping Session creation. License for init data was already requested [extra]"),
143
152
  !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)}}};
153
+ Nl=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.x(function*(){if(e.length){var h=b;if(!h)try{h=$l(a,d,e,f)}catch(u){if(a.h.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:u,initDataType:d,initData:e}),a.g.ignoreUnrecognizedInitData)return}if(!g&&am(a,h,d,e)){var k=!0;if("skd"===d&&!a.g.enableSessionCacheForSkd)for(var l of a.f.keys()){var m=a.f.get(l);
154
+ if(h&&m.keyId===h){a.h.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.h.warn("Unable to close session",u)}k=!1}}if(k){a.h.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.C?_.ce:Pe;var q=a.G.createSession(n);a.h.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.U(new _.H(_.G,6,6005,{browserError:u.message}));return}a.w.on(q,Fd,a.na.bind(a));a.w.on(q,ud,a.fa.bind(a));k={Vb:f,cd:[],initData:e,initDataType:d,keyId:h,Qa:h?
155
+ [h]:[],loaded:!1,Xd:Infinity,periodId:c,mb:null,Ca:new _.Jl,sessionContext:{ldlDelay:0,customData:{}}};k.Ca.catch(()=>{});f&&(l=a.f.get(f),k.sessionContext=l.sessionContext);a.f.set(q,k);h&&!a.j.get(h)&&a.j.set(h,He);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.Qa.includes(m.keyId)&&_.zh(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.Qa.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,He));l=a.D.getConfiguration();m=a.keySystem();m=a.g.Pa[m];n=(n=m.modifiers)&&n.transformInitData;
156
+ _.Lf(n)||(n=yl);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.l.f()})}catch(u){h=u;u instanceof _.H||(h=new _.H(_.G,6,6016,u));k.Ca&&k.Ca.reject(u);a.U(h);return}a.h.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(u=>{if(!a.qa){var v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));a.U(new _.H(_.G,6,6006,{browserError:u.message,
157
+ error:u,extended:v},u))}})}else a.h.warn("Empty init data")})};bm=function(a){let b=Infinity;a=a.f.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};Zl=function(a){a=a.f.values();return _.Ug(a,b=>b.loaded)};am=function(a,b,c,d){if(!b&&c!==_.De)return!1;d=b||uk(d);for(const e of a.f.values())if(b&&e.keyId===b||b&&e.Qa.includes(b)||c===_.De&&(e.keyId||uk(e.initData))===d)return!0;return!1};
158
+ $l=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;var f=a.keySystem(),g=a.g.Pa[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.Lf(g)||(g=xl);try{var h={ldlDelay:0,customData:{}};e&&(h=a.f.get(e).sessionContext);var k=g(f,c,h);a.h.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.h.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.De)return uk(c)||"";if(b===_.yc){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
159
+ _.hl(c);if(m)return m.a}else if(ql(l)){{f=new _.gl(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.lk(m);const n=_.P(f);c=n>>>24;k=n&16777215;const q=_.jk(f,16),u=_.yh(q);if(0<c){const D=_.P(f);f.skip(16*D)}const v=_.P(f),y=_.jk(f,v),A=_.nl(y);_.dg("Parsed PR PSSH Box","size",g,"name",h,"version",c,"flags",k,"size",v,"systemId",u,"keyId",A.a);e=A}if(e)return e.a}}catch(m){throw a.h.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
160
+ Ql=function(a,b){const c=b.target,d=a.f.get(c);var e=a.keySystem();let f=!1;e.match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength?(f=!0,a.h.info("WV Server certificate request for "+`SID:'${c.sessionId} `+`from msg '${b.messageType}'`)):a.h.info("License request for "+`SID:'${c.sessionId}'/KID:'${d.keyId}' `+`from msg '${b.messageType}'`);let g=a.a.licenseServerUri;e=a.g.Pa[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
161
+ const h=_.Kh([g],a.g.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===xd&&d.Vb?wd:f?Ac:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===wd)a.D.onEvent(new _.F(dd));ql(a.a.keySystem)&&cm(a,h);Sj(a.K,h);const k=Math.floor(b.timeStamp),l=Date.now();return dm(a,h,d.sessionContext).then(()=>{_.ol(`drm.license.req.${k}.start`);a.h.debug("Sending DRM license request to",g,h);return a.D.xb.fetch(h).P}).then(m=>{_.ol(`drm.license.req.${k}.end`);
162
+ performance.measure(`drm.license.req.${k}`,`drm.license.req.${k}.start`,`drm.license.req.${k}.end`);if(a.qa)return Promise.reject();const n=Date.now()-l;var q=em(a,m);let u="";q&&(u=` RID:${q}`);q=m&&m.data?m.data.byteLength:-1;f?a.h.info("WV Server certificate response for "+`SID:'${c.sessionId}' `+`${q} bytes `+`in ${n}ms${u}`):a.h.info("License response for "+`SID:'${c.sessionId}'/`+`KID:'${d.keyId}' `+`${q} bytes `+`in ${n}ms${u}`);const v=Tj(a.K,m);_.ol(`drm.sess.update.${k}.start`);return c.update(m.data).then(()=>
163
+ {_.ol(`drm.sess.update.${k}.end`);performance.measure(`drm.sess.update.${k}`,`drm.sess.update.${k}.start`,`drm.sess.update.${k}.end`);if(!f){var y=bm(a),A=v?Date.now()+1E3*v.delay:Number.NaN;y=new _.F(_.fd,{keySystem:a.keySystem(),expirationTime:y,expectedRenewalTime:A});a.D.onEvent(y);d&&(d.mb&&d.mb.resolve(),d.Vb&&(y=d.Vb,a.h.info(`Closing expired session '${y.sessionId}'`),pl(y).catch(()=>{a.h.warn("Unable to close expired session in time")}),(y=a.f.get(d.Vb))&&y.jc&&y.jc.stop(),a.f.delete(d.Vb),
164
+ d.Vb=null),(new _.zi(()=>{a.qa||(d.loaded=!0,d.Ca&&d.Ca.resolve(),Zl(a)&&(a.o||a.h.info(ra),a.o=!0,a.B=!1,a.F.resolve()))})).ca(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||v&&Rj(a.keySystem()))&&(y=new _.zi(()=>{!a.qa&&a.K&&(a.h.info("Updating CSL Sessions"),ql(a.keySystem())?Nl(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.Pc)&&c.update(_.kh("renew")))}),d.jc=y,y.ca(v?v.delay:d.sessionContext.ldlDelay)))}})},m=>_.x(function*(){if(!a.qa){var n=m.data.headers;
165
+ n=Object.assign({message:_.ya,url:m.data.url,status:m.data.status,response:m.data.response},n?{headers:n}:{},Sk(n));n=new _.H(_.G,6,6007,n,m);a.U(n);d&&d.mb&&d.mb.reject(n);d&&d.Ca&&d.Ca.reject(n)}})).catch(m=>{a.qa||(m===kb?a.h.info("Ignore update for closed sessions"):(m=new _.H(_.G,6,6008,{browserError:m.message}),a.U(m),d&&d.mb&&d.mb.reject(m),d&&d.Ca&&d.Ca.reject(m)))})};
166
+ cm=function(a,b){var c=ih(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.h.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.bf).textContent;b.body=_.wh(a.querySelector("Challenge").textContent).buffer}else a.h.debug("PlayReady request is already unwrapped."),b.headers[pa]="text/xml; charset\x3dutf-8"};
167
+ dm=function(a,b,c){return _.x(function*(){const d=a.D.getConfiguration();yield Sl(a,d);const e=a.keySystem();var f=a.g.Pa[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.Pc)&&b.requestModifiers.push(k=>_.xk(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.Pc)&&b.responseModifiers.push(k=>_.yk(k))})};
168
+ em=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.gh(_.wh(b))).ti}catch(c){a.h.warn("Unable to parse DRMtoday Request ID",c)}return""};_.hm=function(a,b){a&&b&&(_.fm.set(a,b),_.gm.info(`Registered TextDisplayerFactory: '${a}'`))};
169
+ _.im=function(a,b){b=b.find(c=>(c=_.fm.get(c))?c.da(a):!1);if(null==b)return _.gm.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.gm.info(`Chosen the text displayer: ${b}`);return _.fm.get(b)};_.jm=function(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{{const c=Date.now()/1E3;a.a.duration=c-a.a.timestamp;a.a.state!=b&&(a.f.push(a.a),a.a={timestamp:c,state:b,duration:0})}}};
170
+ km=function(a,b){let c=0;a.a&&a.a.state==b&&(c+=a.a.duration);for(const d of a.f)c+=d.state==b?d.duration:0;return c};lm=function(a){const b=d=>({timestamp:d.timestamp,state:d.state,duration:d.duration}),c=[];for(const d of a.f)c.push(b(d));a.a&&c.push(b(a.a));return c};mm=function(a){return a.a.map(b=>_.Hf(b))};
171
+ _.nm=function(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]}};pm=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=om.value().get(b),c.one(a,b,d))};
172
+ tm=function(a){a.h.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>qm(a,d.type);a.a.on(b,_.kd,()=>{a.j=!1;rm(a,_.sm)});a.a.on(b,tc,c);a.a.on(b,_.le,()=>{a.F=!0;a.j=!1;qm(a,_.le)});a.a.on(b,_.ae,()=>{a.F=!1;a.j=!1;qm(a,_.ae)});a.a.on(b,_.Se,c);a.a.on(b,_.te,c);a.a.on(b,_.Ae,d=>{a.l=!1;a.j=!1;qm(a,d.type)});a.a.on(b,_.Be,d=>{a.l=!0;qm(a,d.type)});a.a.on(b,Ee,c);a.a.on(b,_.mf,()=>{a.j=!0;qm(a,_.mf)});a.a.on(b,_.ld,d=>a.U(d));a.a.on(b,_.Bd,c);a.a.on(b,uc,()=>{a.C=!0;qm(a,
173
+ uc)});a.a.on(b,_.af,d=>{a.l=!0;qm(a,d.type)});a.a.on(b,_.$e,d=>{a.l=!1;a.j=!1;qm(a,d.type)})};um=function(a,b){return Object.keys(b)[a]};wm=function(a,b){const c={type:_.Ge};b===_.sc||b===_.oc?(c.reason=a.w,b===_.sc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.vm&&(c.reason=a.w),a.A===_.vm&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
174
+ rm=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.vm;a.A=a.f;a.f=b;a.A===_.sm&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.vm?(a.K=a.o,a.w=a.l?1:2,a.h.info("Buffering started. Reason: "+um(a.w-1,_.xm)),b=wm(a,_.sc),a.Qb(_.sc,b)):d&&(a.B=a.o-a.K,a.h.info("Buffering finished. Reason: "+um(a.w-1,_.xm)+". Buffering time: "+a.B+" ms"),b=wm(a,_.oc),a.Qb(_.oc,b));b=um(a.A,_.ym);c=um(a.f,_.ym);a.h.info(`Player state change: ${b} -> ${c}`);a.Qb(_.Ge,wm(a,""));return!0};
175
+ qm=function(a,b){if(a.f===_.zm)a.h.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused();var d=a.m.getPosition();var e=a.m.getDuration();if(d=a.m.isEnded()||a.f===_.sm&&1>=Math.abs(d-e)||c&&d>=e)rm(a,_.sm)&&a.h.debug("Player claims to be in ended state, not checking more");else if(b!==_.Se){e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Fa(e,!0):-1;a.G=e;e=a.m.getSurface().getMedia();a.g=e?e.readyState:null;a.J=a.m.getPlaybackRate()||1;
176
+ e=typeof a.g===_.r&&2>a.g&&2===e.networkState;var f=typeof a.g===_.r&&0>=a.G&&a.f===_.Am,g=typeof a.g===_.r&&2>=a.g&&a.j;e=a.l||f||e||g;!a.M||a.m.isLive()||a.f!==_.vm||e||(f=b===_.Ae&&4===a.g,(g=a.A===_.Bm)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=rm(a,_.vm):c?f=rm(a,_.Cm):a.F&&(f=rm(a,_.Dm));f&&(a.C=!1);a.h.debug("Video state check for event "+b+":: seeking: "+a.l+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.g+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+
177
+ f+", Current state: "+um(a.f,_.ym))}}};Em=function(a){a=(new _.Gg(a)).xa;if(!a)return null;a=a.toUpperCase();return _.oh(a,".MPD")?_.$b:_.oh(a,".M3U8")?_.vj:_.oh(a,".MP4")?_.ff:_.oh(a,"MANIFEST")||_.oh(a,".ISM")?_.ec:null};_.Gm=function(a){let b;_.Ej(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Je||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Fm(b[c]);d&&a.push(d)}return a};
178
+ Fm=function(a){let b=null;_.Rf(a)&&(a={url:a});typeof a===_.Od&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.B(a.drmProtected)||typeof a.drmProtected!==_.nc||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.nc||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.Je||(b.name=a.name),_.B(a.Bb)||typeof a.Bb!==_.Je||(b.Bb=a.Bb),_.B(a.audioMimeType)||typeof a.audioMimeType!==_.Je||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Em(a.url),b.type?Hm.debug("Detect media type "+
179
+ b.type+" for "+a.url):Hm.warn("Unable to detect media type for "+a.url));return b};Jm=function(a){return a.A?Im():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.ld);a.g.off(c,_.ye);a.a=null}b()})};Im=function(){return Promise.reject(new _.H(_.G,7,7E3))};
180
+ Lm=function(a,b){return a.A?Im():new Promise(c=>{a.a||(a.g.on(b,_.ld,()=>{{const d=Km(a);if(d)a.onError(d)}}),a.g.on(b,_.ye,()=>{const d=b.videoWidth,e=b.videoHeight,f=a.getTrackManager();f&&0<d&&0<e&&(f.w={width:d,height:e});a.trigger(new _.F(_.mc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
181
+ Nm=function(a){return _.x(function*(){if(a.A)return Im();var b=a.w[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.Xj(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=new _.Mm({xb:c,onError:d=>a.onError(d),ae:()=>{},onExpirationUpdated:(d,e)=>{a.trigger(new _.F(_.cd,{expirationTime:e}))},onEvent:d=>{d instanceof _.F?a.dispatchEvent(d):
182
+ a.log.debug(_.ub,d.type)},getConfiguration:()=>a.getConfiguration(),qc:()=>a.qc()});a.o.g=b;yield _.Il(a.o,[{id:0,language:_.Ve,primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:()=>null,getSegmentReference:()=>null,adjustSegmentDurations:()=>{},getDuration:a.getDuration.bind(a),initSegmentReference:null,ya:0,mimeType:_.ff,codecs:"",encrypted:!0,keyId:null,language:_.Ve,originalLanguage:_.Ve,label:null,type:_.w,primary:!1,frameRate:void 0,
183
+ ih:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,Vg:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}],[]);yield _.Yl(a.o,a.a);return Promise.resolve()})};Om=function(a,b){pm(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.zm&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
184
+ Km=function(a){if(null===a.w||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.H(_.G,3,3016,{code:b,dh:c,message:a.a.error.message})};
185
+ Qm=function(a){if(a.A)return new _.Pm(Im(),()=>{});const b=a.w[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.I;c&&Om(a,c);if(d.preload!==_.Nd)a.g.one(d,_.Bd,()=>{const g=Date.now()/1E3-e;a.f.A=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Fi()||_.Ii())&&d.load();const f=new _.Jl;a.g.one(d,Ee,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.F||(a.F=(new _.zi(()=>{f.reject(new _.H(_.G,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
186
+ uri:b.url},d.error))})).ca(g))});pm(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject(Km(a)):d.preload===_.Nd&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.g.one(d,_.ld,()=>{f.reject(Km(a))});return new _.Pm(f,
187
+ ()=>{const g=new _.H(_.G,7,7001);f.reject(g);return Promise.resolve()})};Rm=function(a,b){pm(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{if(a.isLive()&&a.getState()!==_.zm){var c=a.getSeekRange().end,d=a.getPosition();Infinity===c||20>c-d||(a.log.warn("Detected that HLS live stream was not started from close to the live edge. Auto-fixing, seeking to seek range end."+`(position: ${d}, seek range end: ${c})`),a.seek(c).catch(e=>{a.log.warn("Error while seeking to seek range edge.",e)}))}})};
188
+ _.Um=function(a){a&&(0<=Sm.indexOf(a)?Tm.warn(`Factory '${a.name()}' is already registered`):(Sm.push(a),Tm.info(`Factory ${a.name()}' has been registered.`)))};Wm=function(a,b){let c=Sm.find(d=>d.da(a,b));c||(c=new Vm);Tm.info(`Chosen ads: ${c.name()}`);return c};_.Xm=function(a,b){a=document.createElement(a);for(const c in b){const d=b[c];null===d||void 0===d?a.setAttribute(c,""):a.setAttribute(c,d)}return a};_.Ym=function(a,b){a.classList.add(b)};
189
+ _.Zm=function(a,b){if(a&&typeof b===_.Od)for(const c in b)a.style[c]=b[c]};_.$m=function(a){return document.createElement(a)};an=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.g.values());wg(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};bn=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.g.add(b))};
190
+ cn=function(a,b,c){(_.Ii()&&53===Ji().major||_.Ii()&&68===Ji().major||_.Ki())&&!b.hasAttribute(Uc)&&(b.style.opacity="0",b.setAttribute(Uc,""),a.j.one(b,hd,()=>{b.removeAttribute(Uc);b.style.opacity="1";c&&(c.style.opacity="1")}))};
191
+ gn=function(a){a.a.on(window,"offline",()=>{dn(a,!1)});a.a.on(window,"online",()=>{a.f||en(a)});a.a.on(a.m,Ee,()=>fn(a));a.a.on(a.m,"suspend",()=>fn(a));a.a.on(a.m,_.mf,()=>fn(a));a.a.on(a.m,_.le,()=>{a.f||en(a)});a.a.on(a.m,_.re,()=>{a.f||en(a)});a.a.on(a.m,_.Ge,()=>{switch(a.m.getState()){case _.vm:fn(a);break;default:fn(a)}})};hn=function(a){a.g&&(a.g.stop(),a.g=null)};fn=function(a){a.f&&en(a)};
192
+ jn=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Th(a.j,b.url,b.attemptParameters,b.method),dn(a,b))})};en=function(a){a.m.getConfiguration().connectivityCheck&&(hn(a),a.g=(new _.zi(()=>jn(a))).ca(5))};dn=function(a,b){hn(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.F(Ud,{online:a.f})))};ln=function(){for(let a=0;a<kn.length;++a)kn[a].ic()};
193
+ _.mn=function(a,b){b=b||0;a={priority:b,ic:a};for(let c=0;c<kn.length;c++)if(kn[c].priority<b){kn.splice(c,0,a);return}kn.push(a)};nn=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};pn=function(a){if(!a.a){var b=a.license.split(".");if(3!==b.length)throw Error("Expected to find 3 data sections in JWT raw data");b=new on(b[0],b[1],b[2]);a.a=b}return a.a};
194
+ qn=function(a){switch((a.fd()[0]||{src:"",type:""}).type){case _.$b:a="dash";break;case _.ec:a="ss";break;case _.vj:a="hls";break;case _.ff:a=_.Kd;break;default:a=""}return a};rn=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};sn=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
195
+ tn=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};un=function(a){a=a.getDrmInfo();return(new _.Gg(a&&a.licenseServerUri||"")).Ga};vn=function(a){const b=a.getConfiguration();let c="no";b.drm&&!_.Tf(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(gd)||un(a).endsWith("drmtoday.com"))&&(c=gd);return c};
196
+ wn=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.keySystem){case _.Sc:b="wv";break;case _.Qc:b="pr";break;case _.Pc:b="fps"}return b};xn=function(a){a=a.getDrmInfo();let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};yn=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.videoRobustness){case Ea:case Ca:b="L1";break;case Da:b="L2";break;case _.jb:case _.ib:b="L3"}return b};
197
+ Cn=function(a,b){const c="ie"===_.cj().browser;var d=b.getConfiguration();const e=[...Array.from(_.Fj.keys()),...b.$f()];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":rn(d),"CL-ASSET-ID":sn(d),"CL-SESSION-ID":tn(d),"CL-PLAYBACK-TYPE":b.isLive()?zn:An,"CL-CONTENT-TYPE":qn(b),"CL-PLUGINS":e.join(" "),"CL-DRM":vn(b),"CL-DRM-CDM":wn(b),"CL-DRM-SEC-LEVEL":yn(b),"CL-DRM-OFFLINE":xn(b),"CL-DRM-IP":un(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=
198
+ d);d=_.Kh(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Bn).fetch(d).P.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=pn(a);f=f.data;var h=f.status;if(g.a&&g.a.ilv)g=Promise.resolve();else{switch(h){case 403:case 404:g=7101;var k="castLabs Player license is invalid";if(403===h){h=k;k="";try{k=JSON.parse(decodeURIComponent(f.responseText)).message}catch(l){}f=k;f=h+(": "+f)}else f=
199
+ k+"!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:g=Promise.resolve();break a}a.h.error(Ia+k);g=Promise.reject(new _.H(_.G,7,g,k))}}return g})};_.En=function(a){a&&(0<=Dn.indexOf(a)||Dn.push(a))};
200
+ Gn=function(a){if(!a.M){a.M=!0;a.g.getMedia()||a.g.getCastElement();a.w||(a.w=new Fn(a.f.license));var b=Object.keys(a.K);Cn(a.w,{getConfiguration:a.getConfiguration.bind(a),fd:a.fd.bind(a),getDrmInfo:a.getDrmInfo.bind(a),$f:()=>b,isLive:a.isLive.bind(a)}).then(()=>{a.h.debug("License verified remotely")}).catch(c=>{setTimeout(nn,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)})}};
201
+ Hn=function(a,b){a.w=new Fn(b);a.w.verify().catch(c=>{setTimeout(()=>{a.h.error(Ia+c);a.trigger(new _.F(_.ld,{detail:new _.H(_.G,7,7101)}));a.destroy()},1E3)})};Jn=function(a,b){a.J=b;for(const c of a.J)(b=c.id())&&(a.K[b]=c);_.In(a,"onPlayerCreated")};_.Kn=function(a,b){b!==a.a&&(a.a&&(a.a.removeDelegate(a),a.a.destroy()),a.a=b,a.a&&(a.a.init(a.g,a.f),a.a.setNetworkEngine(a.getNetworkEngine()),a.a.addDelegate(a)))};
202
+ _.In=function(a,b,...c){const d=a.J.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
203
+ Ln=function(a){return _.x(function*(){if(a.H)return a.h.debug("The player is already released. No-op"),new Promise(b=>b());a.off(_.Ge,a.C);a.A.off(a,_.Ge,a.C);a.A.off(document,kf);a.trigger(new _.F(_.ve));a.M=!1;a.g&&a.g.release();a.j&&(yield a.j.dispose(),a.j=null);if(a.a){let b=null;const c=a.a.on(_.Ge,d=>{b=d});return _.In(a,_.Sd).then(()=>{a.a.removeDelegate(a);return Promise.all([a.a.release(),a.B.release()])}).then(()=>{a.h.debug("Releasing player completed");b&&(a.h.debug("Re-post state change event after release"),
204
+ a.trigger(b))}).finally(()=>{a.a.off(_.Ge,c);a.trigger(new _.F(ue))})}a.trigger(new _.F(ue));return new Promise(b=>b())})};
205
+ On=function(a,b,c){return new Promise((d,e)=>{var f;if(b){var g=f=null;for(var h=0;h<b.length;h++);h=Object.values(_.fg);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Hb:h[l],confidence:h[l].canPlay(b[k],c)};if(null===f||f.confidence<m.confidence)f=m,g=k}f&&typeof g===_.r&&0<f.confidence?(_.gg.debug("Player Factory '"+f.Hb.a()+"' can play",b[g]),f=new Mn(f.Hb,g)):(_.gg.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Hb.create(),d(new Nn(e,f.a))):
206
+ (d=new _.F(_.ld,{detail:new _.H(_.G,7,7003)}),a.trigger(d),e(d))})};
207
+ _.Rn=function(a,b){return _.x(function*(){_.ol(ie);if(a.G)throw Error("Player is already destroyed.");if(!a.g)throw Error("No surface associated with this player!");yield a.release();a.o=_.Gm(b);a.f=_.Dj(a.N,_.Ej(b)?b:{},{source:a.o});if(0===a.o.length)throw Error("Invalid request to load: could not find source to load");a.H=!1;let c;var d=0;if(a.I||2!==a.canPlay(a.o[0],a.f))d=yield On(a,a.o,a.f),c=d.player,d=d.a,a.I=!1;c?_.Kn(a,c):a.a.addDelegate(a);Pn(a);a.a&&a.a.setCdnErrorCallback(a.F);Qn(a,a.f);
208
+ a.setSourceIndex(d);if(a.f.pauseWhenInBackground)a.A.on(document,kf,()=>{document.hidden?(a.h.debug("Player is hidden: pausing..."),a.pause()):(a.h.debug("Player is visible: resuming..."),a.play())});Mj(a);yield _.In(a,"onContentWillLoad",a.f.source[d]);_.ol(he);performance.measure("player.beforeLoad",ie,he)})};_.Sn=function(a){return _.x(function*(){a.g.getMedia()||a.g.getCastElement();a.A.on(a,_.Ge,a.C);a.trigger(new _.F(Cd));yield Promise.all([a.a.load(a.f),a.j.load()])})};
209
+ _.Un=function(a){return _.x(function*(){_.ol(ge);const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);Tn(a);Nj();yield _.In(a,"onContentLoaded");a.f.autoplay&&(yield a.play());_.ol(fe);performance.measure("player.afterLoad",ge,fe)})};Vn=function(a){return _.x(function*(){if(a.a){var b=a.a;b.af?(a.trigger(new _.F(Cd)),yield b.af(),yield _.Un(a)):a.h.warn(ab)}else a.h.warn(Ya)})};
210
+ Pn=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.lc&&a.Cd&&(a.Cd=!1,yield a.lc(b))}))};Qn=function(a,b){a.j=Wm(a,b).create(a)};Tn=function(a){const b=_.ug(a.f.preferredTextLanguage).filter(d=>d),c=a.getTrackManager().ja();b.some(d=>{const e=_.Sg(d);return(d=c.find(f=>{f=_.Sg(f.language||"");return _.Tg(f,e)}))?(a.getTrackManager().Ea(d),!0):!1})};
211
+ Wn=function(a){const b=document.getElementById(a);if(!b)throw Error("Anchor element not found");b.classList.add(Fc);return Array.from({length:3}).map(()=>{const c=document.createElement(_.w);c.classList.add("clpp-mc-playlist-video-el");const d=document.createElement(_.Yc);d.classList.add("clpp-mc-playlist-item");d.appendChild(c);b.appendChild(d);return new Q(c)})};
212
+ Xn=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.h.info(`Show video element .${b}`),d.classList.add("clpp-visible")):(a.h.info(`Hide video element .${b}`),d.classList.remove("clpp-visible")),a.A&&a.A(d,c))};Zn=function(a,b){return _.x(function*(){const c=yield a.o.get();a.g=b;b.role=Yn;a.g.player=c;a.g.videoEl=c.getSurface().getMedia();Xn(a,c,!0);yield c.load(b.config)})};
213
+ co=function(a){_.x(function*(){if(0===a.a)yield $n(a);else if(a.a===a.f.length-1)yield ao(a);else{const b=[a.a-1,a.a+1];a.h.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>bo(a,c)))}})};
214
+ eo=function(a,b){return _.x(function*(){if(b.player){if("preloading"===b.state){a.h.info("Wait for preloading to finish");try{yield b.preloadPromise}catch(c){}}a.g=b;b.role=Yn;Xn(a,b.player,!0);"preloaded"===b.state?(_.ol(pe),yield Vn(b.player),_.ol(oe),performance.measure("playlist.next",pe,oe)):b.state===qe&&(yield b.player.load(b.config))}})};
215
+ go=function(a,b){return _.x(function*(){a.h.info(`Stop current playback (index: ${b.index})`);const c=b.player;b.player=null;b.videoEl=null;b.role=fo;c.pause();yield a.o.release(c);Xn(a,c,!1)})};io=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>ho(a,b)))};jo=function(a){return _.x(function*(){yield a.o.destroy();const b=document.getElementById(a.w.anchorId);b&&(b.classList.remove(Fc),b.innerHTML="")})};
216
+ ho=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.h.info(`Stop preloading item (index: ${b})`),c.player&&(yield a.o.release(c.player)),a.l.delete(b))})};
217
+ bo=function(a,b){return _.x(function*(){const c=yield a.o.get(),d=a.f[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=fo;d.state="preloading";a.trigger(new _.F(Xe));try{a.l.set(b,d),d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state="preloaded",a.trigger(new _.F(Xe))}catch(e){7001===e.code?(a.h.info(`Preload aborted (index: ${b})`),d.state="preload-aborted"):(a.h.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.F(_.ld,{detail:e})),d.state=qe),a.trigger(new _.F(Xe))}})};
218
+ $n=function(a){return _.x(function*(){const b=a.a+1;a.h.info(`Preload following item (index: ${b})`);yield bo(a,b)})};ao=function(a){return _.x(function*(){const b=a.a-1;a.h.info(`Preload preceding item (index: ${b})`);yield bo(a,b)})};ko=function(a,b){a.size=void 0===b?0:1;a.h.debug("Setting key status to",b);a.a=b};
219
+ lo=function(a,b){a.f=b;_.jg(a.a);if(!b)return Promise.resolve();a.a.on(b,id,c=>{_.dg("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.h.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,sf,c=>{{a.h.debug("Handle webkitNeedKey event");c=_.J(c.initData);if(_.bh(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=ih(c.subarray(4),
220
+ !0);c=_.kh(c);const d=new Event(id);d.initDataType="skd";d.initData=eh(c);a.f.dispatchEvent(d)}});pm(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.g));return Promise.resolve()};mo=function(a,b){ko(a.keyStatuses,b);b=new _.F(ud);a.dispatchEvent(b)};
221
+ po=function(a,b){a.a=b;_.jg(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(id);d.initDataType=_.yc;d.initData=eh(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=no(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.F(Fd,{messageType:d?xd:wd,message:c.message});d=e;_.dg("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.eg("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{(c=no(a,
222
+ c.sessionId))&&c.ready()}),a.f.on(b,a.g+"keyerror",c=>{var d=no(a,c.sessionId);if(d){{var e=Error("EME v0.1b key error");const f=c.errorCode;f.systemCode=c.systemCode;e.errorCode=f;!c.sessionId&&d.f?(45===c.systemCode&&(e.message="Unsupported session type."),d.f.reject(e),d.f=null):c.sessionId&&d.a?(d.a.reject(e),d.a=null):(e=c.systemCode,c.errorCode.code===MediaKeyError.MEDIA_KEYERR_OUTPUT?oo(d,_.$d):1===e?oo(d,"expired"):oo(d,_.td))}}}))};
223
+ no=function(a,b){let c=a.l.get(b);return c?c:(c=a.j.shift())?(c.sessionId=b,a.l.set(b,c),c):null};oo=function(a,b){ko(a.keyStatuses,b);b=new _.F(ud);a.dispatchEvent(b)};qo=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
224
+ ro=function(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;let d;try{if(a.l===_.ce)if(c)d=_.J(_.kh("LOAD_SESSION|"+c));else{const f=_.kh("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.J(b),f.byteLength);d=g}else d=_.J(b)}catch(f){return Promise.reject(f)}a.f=new _.Jl;const e=qo(a,"generateKeyRequest");try{a.j[e](a.g,d)}catch(f){if(f.name!==Ga)return a.f=null,Promise.reject(f);(new _.zi(()=>{try{a.j[e](a.g,d)}catch(g){a.f.reject(g),
225
+ a.f=null}})).ca(.01)}return a.f};so=function(a,b,c){if(a.a)a.a.then(()=>so(a,b,c)).catch(()=>so(a,b,c));else{a.a=b;if(a.g===of){var d=_.gh(c);var e=JSON.parse(d);"oct"!==e.keys[0].kty&&(a.a.reject(Error("Response is not a valid JSON Web Key Set.")),a.a=null);d=_.wh(e.keys[0].k);e=_.wh(e.keys[0].kid)}else d=_.J(c),e=null;var f=qo(a,"addKey");try{a.j[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
226
+ to=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.od?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};uo=function(a){a=a.target;if(a.webkitPresentationMode===de){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement===a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)};
227
+ vo=function(){return this.webkitSupportsPresentationMode(de)?(this.webkitSetPresentationMode(de),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};wo=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
228
+ xo=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};yo=function(a,b,c){return new window.TextTrackCue(a,b,c)};zo=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};Bo=function(a,b,c){if("input"===a)switch(this.type){case "range":a=Bc}Ao.call(this,a,b,c)};Co=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
229
+ Do=function(a){return Co()-a.a};Fo=function(a){const b=new Eo;b.a=a.a;return b};_.Go=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.Io=function(a,b,c,d){return _.x(function*(){try{return new (yield Ho(a,b,c,d))}catch(e){throw e.a(_.G),e;}})};
230
+ Ho=function(a,b,c,d){return _.x(function*(){if(d){var e=_.Jo[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.Ko(a)){const f=_.Lo[e];if(f)return f;_.C("Could not determine manifest type for extension ",e)}else _.C("Could not find extension for ",a);if(!d&&(d=yield Mo(a,b,c))){if(e=_.Jo[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.H(_.G,4,4E3,{url:a});})};
231
+ _.Ko=function(a){a=(new _.Gg(a)).xa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};Mo=function(a,b,c){return _.x(function*(){var d=_.Kh(a);Ih(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).P).headers["content-type"])?d.toLowerCase():""})};No=function(a,b){var c=a.f+b.byteLength;if(a.a.byteLength<c){let d=a.a.byteLength;for(;d<c;)d*=2;c=new Uint8Array(d);c.set(a.a);a.a=c}a.a.set(b,a.f);a.f+=b.byteLength};
232
+ Oo=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(No(a,e),Nh(c,e.byteLength,Do(a.g)),a.g.a=Co());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>Oo(a,b,c))})};
233
+ Qo=function(a){const b=a.uris[a.uriIndex],c=new Po,d=new Eo,e=Fo(d);let f=0,g;const h=new _.Jl;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;let k=!1,l=!1;c.onreadystatechange=function(m){m=m.target;m.readyState>=XMLHttpRequest.LOADING&&0===f&&(g=Do(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(oa),Mh(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
234
+ const q={};for(const u of n)n=u.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=Do(e);l||Nh(a,m.response?m.response.length:0,u);const v=_.Lh(q,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?Oh(a.rateLimitBps,Do(e),a.bytesLoaded).then(()=>{h.resolve(v)}):h.resolve(v)}catch(u){h.reject(u)}};c.onerror=function(m){m=m.target;if(0>=m.status)h.reject(new _.H(1,1,1002,{url:b,request:a,status:m.status}));else{var n=m.getAllResponseHeaders();const u={};if(n){n=n.trim().split("\r\n");
235
+ for(var q of n)n=q.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.Lh(u,m.response,m.status,b,m.responseURL,a,Do(e),g);h.resolve(q)}};c.ontimeout=function(){h.reject(new _.H(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=Do(d);d.a=Co();if(100<n||m.lengthComputable&&m.loaded===m.total)Nh(a,m.loaded-f,n),f=m.loaded,l=!0};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);c.send(a.body);return{P:h,request:a,abort:()=>{c.abort();h.reject(new _.H(1,1,
236
+ 7001,{url:b,request:a}));return Promise.resolve()}}};Ro=function(a){let b=null;a.g!==a.f&&(b={start:a.g,end:a.f,length:a.f-a.g,data:new DataView(a.j.a.buffer,a.g,a.f-a.g),count:-1});return b};So=function(a,b){{var c=a.j;const d=c.f+b.byteLength;if(d>c.a.byteLength){const e=c.a;c.a=new Uint8Array(Math.max(Math.ceil(c.a.buffer.byteLength*c.g),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.g;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f)};
237
+ Uo=function(a){if(0<=a.o&&a.f<a.o)return null;let b=To(a);for(;null!==b;){if(b.name===_.Dd){const c={start:a.g,end:b.end,length:b.end-a.g,data:new DataView(a.j.a.buffer,a.g,b.end-a.g),count:1};a.g=b.end;return c}b=To(a)}return null};
238
+ Vo=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,Do(a.w)),a.w.a=Co());if(f)return e=Ro(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){So(a,g);var k=Uo(a);for(e=[];k;)e.push(k),k=Uo(a);if(!a.A)e.forEach(l=>{h=h.then(()=>c(!1,l))});else if(0<e.length){k=e[0];if(1<e.length){k=e[0];const l=e[e.length-1],m=l.end-k.start;k={start:k.start,end:l.end,length:m,data:new DataView(a.j.a.buffer,k.start,m),count:e.length}}(e=
239
+ c(!1,k))&&(h=e)}}return h.then(()=>Vo(a,b,c,d))})};
240
+ To=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Wo(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Wo(a);d=String.fromCharCode(d>>24&255,d>>16&255,d>>8&255,d&255);switch(c){case 0:c=a.f-b;break;case 1:if(a.a+8>=a.f)return a.a=a.f,null;{let e,f;try{f=a.l.getUint32(a.a,!1),e=a.l.getUint32(a.a+4,!1)}catch(g){throw new _.H(_.G,3,3E3);}if(2097151<f)throw new _.H(_.G,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.o=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
241
+ Wo=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
242
+ Zo=function(a){a.g=a.B.then(e=>{a.j=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=Xo(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Xo(e.request.fuzzFactor,.5));a.f*=Xo(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;Yo(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.H(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
243
+ let b=0,c=0,d=0;return a.g.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.P}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.H){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return Zo(a);g&&e.a(_.G);a.w.reject(e)}else a.w.reject(e)})};Yo=function(a,b,c){a.o=setTimeout(b,c)};Xo=function(a,b){return null===a||void 0===a?b:a};
244
+ $o=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new Dg("Parsing CMSD, missing parameter or wrong format");if(c&&!b)return{key:c,value:!0};const d=b[0];if('"'===d&&'"'===b[b.length-1])return{key:c,value:b.replaceAll(/(^")|("$)/g,"")};if(/^[-0-9]/.test(d))return{key:c,value:parseInt(b,10)};if(/^[a-zA-Z*]/.test(d))return{key:c,value:b};throw new Dg(`Parsing CMSD, not recognized value type of ${a}`);};
245
+ dp=function(a){var b=new ap;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new bp,d={Bc:!1,kf:!1};b={P:cp(a.uris[a.uriIndex],a,{body:a.body||void 0,headers:b,method:a.method,signal:c.signal,credentials:a.allowCrossSiteCredentials?"include":void 0},d),request:a,abort:()=>{d.Bc||(d.Bc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.kf=!0;c.abort()},a);b.P=b.P.finally(()=>{window.clearTimeout(e)})}return b};
246
+ cp=function(a,b,c,d){return _.x(function*(){let e,f,g;const h=new Eo,k=Fo(h);try{e=yield ep(a,c);g=Do(h);const m=e.headers.get(oa);Mh(b,m);const n=m?parseInt(m,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const q=e.body.getReader();f=yield Vo(new fp(n,!b.disableMergedFragments),q,(u,v)=>{if(d.Bc)return null;v&&v.data&&(Nh(b,v.data.byteLength,Do(h)),h.a=Co());return b.onFragment&&v?b.rateLimitBps?Oh(b.rateLimitBps,Do(k),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},
247
+ b.onProgress)}else{const q=e.body.getReader();f=yield Oo(new gp(n),q,b);b.rateLimitBps&&(yield Oh(b.rateLimitBps,Do(k),f.byteLength))}}catch(m){if(d.Bc)throw new _.H(1,1,7001,{url:a,request:b});if(d.kf)throw new _.H(1,1,1003,{url:a,request:b});_.eg("Error while fetching data:",m);throw new _.H(1,1,1002,{url:a,error:m,request:b,status:-1},m);}const l={};e.headers.forEach((m,n)=>{l[n.trim()]=m});if(d.Bc)throw new _.H(1,1,7001,{url:a,request:b});return _.Lh(l,f,e.status,a,e.url,b,Do(k),g)})};
248
+ ip=function(a){try{const b=a.uris[a.uriIndex],c=_.hp(b);return{P:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{P:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
249
+ _.hp=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.eg("Bad data URI, failed to parse scheme"),new _.H(_.G,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.eg("Bad data URI, failed to extract encoding and MIME type"),new _.H(_.G,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];let d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.wh(a).buffer:_.kh(a).buffer,contentType:c}};_.kp=function(a){delete _.jp[a]};
250
+ _.pp=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case lp:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case mp:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case np:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case op:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Nd}};Af="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
251
+ Bf=typeof Object.defineProperties==_.od?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
252
+ Cf("Promise",function(a){function b(g){this.f=0;this.l=void 0;this.a=[];var h=this.g();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.f=function(g){if(null==this.a){this.a=[];var h=this;this.g(function(){h.l()})}this.a.push(g)};var e=Af.setTimeout;c.prototype.g=function(g){e(g,0)};c.prototype.l=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
253
+ g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.g(function(){throw g;})};b.prototype.g=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.C),reject:g(this.j)}};b.prototype.C=function(g){if(g===this)this.j(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.Od:var h=null!=g;break a;case _.od:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
254
+ b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.j(k);return}typeof h==_.od?this.G(h,g):this.o(g)};b.prototype.j=function(g){this.w(2,g)};b.prototype.o=function(g){this.w(1,g)};b.prototype.w=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.l=h;this.A()};b.prototype.A=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.f(this.a[g]);this.a=null}};var f=new c;b.prototype.F=function(g){var h=this.g();
255
+ g.Vc(h.resolve,h.reject)};b.prototype.G=function(g,h){var k=this.g();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,u){return typeof q==_.od?function(v){try{l(q(v))}catch(y){m(y)}}:u}var l,m,n=new b(function(q,u){l=q;m=u});this.Vc(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Vc=function(g,h){function k(){switch(l.f){case 1:g(l.l);break;case 2:h(l.l);break;default:throw Error("Unexpected state: "+
256
+ l.f);}}var l=this;null==this.a?f.f(k):this.a.push(k)};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=zf(g),m=l.next();!m.done;m=l.next())d(m.value).Vc(h,k)})};b.all=function(g){var h=zf(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){q[v]=y;u--;0==u&&l(q)}}var q=[],u=0;do q.push(void 0),u++,d(k.value).Vc(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var Ef=this||self;
257
+ Ef.a=!0;_.z("clpp.utils.obj.cloneItem",_.Hf);_.z("clpp.utils.obj.merge",_.Gf);var $f={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",$f);var Yf=3,Xf={},qp=[];_.z("clpp.log.getLoggers",function(){return _.Hf(Xf)});_.z("clpp.log.addInterceptor",function(a){a&&qp.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=qp.indexOf(a),0<=a&&qp.splice(a,1))});_.z("clpp.log.getTagLevel",Zf);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=Xf[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.Rf(b)&&(b=ag(b)),Xf[a]=b)});
258
+ _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.Rf(a)&&(a=ag(a));Yf=a});_.z("clpp.log.getLogLevel",function(){return Yf});
259
+ _.R=class{constructor(a){(this.tag=a)&&void 0===Xf[a]&&(Xf[a]=-1)}log(a,b){if(window.console){if(1<arguments.length){var c=arguments[0];Array.prototype.shift.call(arguments)}else c=3;var d=Zf(this.tag);if(0<=d){if(d<c)return}else if(Yf<c)return;this.tag&&Array.prototype.unshift.call(arguments,"["+this.tag+"]");d=new Date;d.toISOString&&(d=d.toISOString().substring(11).replace("Z",""),Array.prototype.unshift.call(arguments,d));4===c?console.log.apply(console,arguments):3===c?console.info.apply(console,
260
+ arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of qp)e.call(e,c,arguments)}}info(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)}debug(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)}warn(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)}error(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)}Kf(a){return a?
261
+ this.tag?new _.R(this.tag+"."+a):new _.R(a):this}};_.z("clpp.log.Logger",_.R);_.R.prototype.createChild=_.R.prototype.Kf;_.R.prototype.error=_.R.prototype.error;_.R.prototype.warn=_.R.prototype.warn;_.R.prototype.debug=_.R.prototype.debug;_.R.prototype.info=_.R.prototype.info;_.R.prototype.log=_.R.prototype.log;var bg=new _.R("clpp");_.z("clpp.log.info",_.cg);_.z("clpp.log.debug",_.dg);_.z("clpp.log.warn",_.C);_.z("clpp.log.error",_.eg);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Mn,Nn;Mn=class{constructor(a,b){this.Hb=a;this.a=b}};Nn=class{constructor(a,b){this.player=a;this.a=b}};_.gg=new _.R("clpp.players");_.fg={};_.rp=class{constructor(){this.a={}}push(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]}get(a){return(a=this.a[a])?a.slice():[]}remove(a,b){a=this.a[a];if(!a)return!1;let c=!1;for(let d=0;d<a.length;++d)a[d]==b&&(a.splice(d,1),--d,c=!0);return c}clear(){this.a={}}forEach(a){for(const b in this.a)a(b,this.a[b])}};var sp,tp;sp=class{constructor(a,b,c,d){this.f=a;this.ic=b;this.a=c;this.Ag=!!d}Qb(a){try{this.ic.handleEvent?this.ic.handleEvent(a):this.ic.call(this.a,a)}catch(b){_.eg("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
242
262
  _.F=class{constructor(a,b){if(b)for(const c in b)this[c]=b[c];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.f=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.f=!0}stopPropagation(){}};
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};
263
+ tp=class{constructor(a){this.a=new _.rp;this.f=a}trigger(a){const b=this.a.get(a.type);if(b)for(let c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].Qb(a),b[c].Ag&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new sp(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new sp(a,b,c||this.f,!0));return b}off(a,b){const c=this.a.get(a);let d=!1;if(c)for(let e=0;e<c.length;e++)c[e].ic===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var up;_.vp=class{constructor(){this.a=new _.rp}release(){_.jg(this)}on(a,b,c,d=!1){a=new up(a,b,c,d);this.a.push(b,a)}one(a,b,c){const d=e=>{this.off(a,b,d);return c(e)};this.on(a,b,d)}off(a,b,c){const d=this.a.get(b)||[];for(let e=0;e<d.length;++e){const f=d[e];f.target!=a||c!=f.a&&c||(ig(f),this.a.remove(b,f))}}};up=class{constructor(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)}};var wp=class{constructor(a){this.m=a;this.o=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=null;this.f=new _.vp;this.a=this.l=null;this.g=[];this.h=new _.R("clpp.native.Metadata")}release(){this.f.release();this.g=[];this.a=null}destroy(){const a=this;return _.x(function*(){a.release();a.l=null;a.j=null})}getTimelineCues(){return this.g}};_.Dp=class{constructor(a,b,c,d){d=void 0===d?_.xp:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.yp;this.writingMode=_.zp;this.lineInterpretation=_.Ap;this.line=null;this.lineAlign=_.Bp;this.direction=Cp;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}bd(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
264
+ a.payloadType}};_.z("clpp.text.Cue",_.Dp);_.Dp.positionAlign={LEFT:_.yd,RIGHT:_.zd,CENTER:_.zc,AUTO:"auto"};_.xp=_.t;_.Dp.payloadType={TEXT:_.xp,VTT_XML:_.lf,TTML_XML:_.Ue};_.yp=_.zc;_.Ep={LEFT:_.vd,RIGHT:_.ze,CENTER:_.yp,START:_.vd,END:_.ze};_.Dp.textAlign=_.Ep;var Cp="ltr";_.Dp.direction={HORIZONTAL_LEFT_TO_RIGHT:Cp,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.zp="horizontal-tb";_.Dp.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.zp,VERTICAL_LEFT_TO_RIGHT:_.cf,VERTICAL_RIGHT_TO_LEFT:_.df};_.Ap=0;
265
+ _.Dp.lineInterpretation={LINE_NUMBER:_.Ap,PERCENTAGE:1};_.Bp=_.Fe;_.Fp={CENTER:_.zc,START:_.Bp,END:_.jd};_.Dp.lineAlign=_.Fp;_.Ip=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.Gp;this.scroll=Hp;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.Ip);_.Gp=1;_.Ip.units={PX:0,PERCENTAGE:_.Gp,LINES:2};var Hp="";
266
+ _.Ip.scrollMode={NONE:Hp,UP:"up"};_.Ip.displayAlign={BEFORE:"flex-end",CENTER:_.zc,AFTER:"flex-start"};_.Ip.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Nc,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var Jp=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.g=null;this.a=new _.vp;this.j=!1;this.h=new _.R("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.g=this.f=null;return Promise.resolve()}start(a){this.j?this.h.warn("Already started. Ignoring request..."):(this.j=!0,this.g=a,this.f=this.g.textTracks,this.a.on(this.f,_.Tb,b=>zg(this,b)),this.a.on(this.f,Bc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Ce&&(d.mode=
267
+ _.qd)}}}))}o(a){const b=new _.Dp(a.startTime,a.endTime,a.text,_.lf);if(_.Rf(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.cf;break;case "rl":b.writingMode=_.df}_.Sf(a.size)&&(b.size=a.size);if(_.Rf(a.align))switch(a.align){case _.vd:case _.Fe:b.textAlign=_.vd;break;case _.zc:b.textAlign=_.yp;break;case _.ze:case _.jd:b.textAlign=_.ze}_.Sf(a.position)&&(b.position=a.position);if(_.Rf(a.positionAlign))switch(a.positionAlign){case _.yd:b.positionAlign=_.yd;break;case _.zc:b.positionAlign=
268
+ _.zc;break;case _.zd:b.positionAlign=_.zd}_.Sf(a.line)&&(b.line=a.line);if(_.Rf(a.lineAlign))switch(a.lineAlign){case _.Fe:b.lineAlign=_.Bp;break;case _.zc:b.lineAlign=_.zc;break;case _.jd:b.lineAlign=_.jd}typeof a.snapToLines===_.nc&&(b.lineInterpretation=a.snapToLines?_.Ap:1);return b}};_.H=class extends Error{constructor(a,b,c,d,e){super(Ag(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.Rf(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.H)}a(a){this.severity!==a&&(this.severity=a,this.message=Ag(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.z("clpp.Error",_.H);_.G=2;_.H.Severity={RECOVERABLE:1,FATAL:_.G};
253
269
  _.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
254
270
  _.H.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,FETCH_OR_APPEND_ERROR:2010,INVALID_MP4:2011,
255
271
  TEXT_PARSER_MISSING:2012,THUMBNAILS_FAILED_TO_LOAD:2013,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,
256
272
  MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,MP4_PARSER_ERROR:3019,MEDIA_LOAD_ERROR:3100,INVALID_TRACK_TYPE:3101,UNKNOWN_TRACK:3102,MEDIA_DECRYPTION_ERROR:3103,PLAY_NOT_ALLOWED:3200,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,
257
273
  DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,
258
274
  DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,SMOOTH_INVALID_MANIFEST_XML:4033,SMOOTH_EMPTY_PRESENTATION:4034,SMOOTH_MEDIA_PROCESSING_ERROR:4035,SMOOTH_INVALID_VERSION:4036,SMOOTH_INVALID_FRAGMENT_METADATA:4037,SMOOTH_REQUIRED_ATTRIBUTE_MISSING:4038,SMOOTH_TRUNCATED_MEDIA_FILE:4039,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4040,HLS_MSE_ENCRYPTED_TS_NOT_SUPPORTED:4041,HLS_PLAYLIST_NOT_UTF8:4042,HLS_PLAYLIST_EMPTY:4043,HLS_INVALID_VALUE:4044,
259
- 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
- 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
- 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",
275
+ HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEATURE:4046,HLS_INCOMPATIBLE_PLAYLIST_UPDATE:4047,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,
276
+ EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,NO_CONTENT_ID:6101,SERVER_CERTIFICATE_REQUIRED:6102,EXTRACT_CONTENT_ID_MODIFIER_ERROR:6103,FAILED_TO_PERSIST_SESSION:6200,FAILED_TO_REMOVE_SESSION:6201,INVALID_SESSION_STORAGE_IMPLEMENTATION:6202,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CANNOT_LOAD_SOURCE:7003,MEDIA_ELEMENT_NOT_FOUND:7004,INVALID_MEDIA_ELEMENT:7005,INVALID_CONTAINER_ELEMENT:7006,INVALID_CONFIGURATION:7100,
277
+ INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,KEY_LOAD_ERROR:7104,TIZEN_INTERNAL_ERROR:7200,CAF_INTERNAL_ERROR:7300,INTERNAL_CAST_ERROR:8E3,CAST_API_NOT_READY:8001,NO_RECEIVERS_AVAILABLE:8002,ALREADY_CASTING:8003,NO_CAST_SESSION:8004,CONVIVA_SDK_NOT_LOADED:9E3,CONVIVA_INVALID_CONFIGURATION:9001,CONVIVA_RUNTIME_ERROR:9002,GL_CONTEXT_ERROR:9003,GL_SHADER_ERROR:9004,YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,YOUBORA_SDK_VERSION_NOT_SUPPORTED:9102,VIMOND_INVALID_CONFIGURATION:9200,
278
+ VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3};var Dg=class extends Error{constructor(a,b){super(a);this.code=b}};var Lg=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;xf=_.Gg.prototype;xf.Va="";xf.fc="";xf.Ga="";xf.wc=null;xf.xa="";xf.Wb="";xf.toString=function(){var a=[],b=this.Va;b&&a.push(Og(b,Kp,!0),":");if(b=this.Ga){a.push("//");var c=this.fc;c&&a.push(Og(c,Kp,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.wc;null!=b&&a.push(":",String(b))}if(b=this.xa)this.Ga&&"/"!=b.charAt(0)&&a.push("/"),a.push(Og(b,"/"==b.charAt(0)?Lp:Mp,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Wb)&&a.push("#",Og(b,Np));return a.join("")};
279
+ xf.resolve=function(a){var b=new _.Gg(this);"data"===b.Va&&(b=new _.Gg);var c=!!a.Va;c?Hg(b,a.Va):c=!!a.fc;c?b.fc=a.fc:c=!!a.Ga;c?b.Ga=a.Ga:c=null!=a.wc;var d=a.xa;if(c)Ig(b,a.wc);else if(c=!!a.xa){if("/"!=d.charAt(0))if(this.Ga&&!this.xa)d="/"+d;else{var e=b.xa.lastIndexOf("/");-1!=e&&(d=b.xa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):
280
+ ".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.xa=d:c=""!==a.a.toString();c?_.Jg(b,Kg(a.a)):c=!!a.Wb;c&&(b.Wb=a.Wb);return b};var Kp=/[#\/\?@]/g,Mp=/[#\?:]/g,Lp=/[#\?]/g,Pg=/[#\?@]/g,Np=/#/g;_.Ng.prototype.a=null;_.Ng.prototype.g=null;
281
+ _.Ng.prototype.add=function(a,b){if(!this.a&&(this.a={},this.g=0,this.f))for(var c=this.f.split("\x26"),d=0;d<c.length;d++){var e=c[d].indexOf("\x3d"),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.f=null;(c=this.a.hasOwnProperty(a)&&this.a[a])||(this.a[a]=c=[]);c.push(b);null!==this.g&&this.g++;return this};
282
+ _.Ng.prototype.toString=function(){if(this.f)return this.f;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="\x3d"+encodeURIComponent(d[e]));a.push(f)}return this.f=a.join("\x26")};_.Op=1/15;var Pp;Pp={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.oi=(a,b)=>{const c=Pp[a];for(let d=0;d<c.length;d++)for(let e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return a===_.t?"":null};_.Qp={text:{mp4:ac,m4s:ac,m4i:ac,cmft:ac,vtt:_.Qe,ttml:_.dc},video:{mp4:_.ff,m4s:_.ff,m4i:_.ff,m4v:_.ff,cmfv:_.ff,ts:_.ef},audio:{mp4:_.jc,m4s:_.jc,m4i:_.jc,m4a:_.jc,cmfa:_.jc,ts:_.ef,aac:_.gc,ec3:_.ic,ac3:_.hc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.ri=(a,b,c)=>a.map(d=>{d=_.Rp(d)||"";return d=(d=_.Qp[b][d])?d:b===_.t?c&&"vtt"!==c?ac:_.Qe:null}).filter(Boolean)[0]||null;
283
+ _.Rp=a=>{a=(new _.Gg(a)).xa.split(".");return 1>=a.length?null:a.pop()};_.Eh=class{constructor(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}toString(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}let b="#"+this.name;const c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b}getAttribute(a){const b=this.attributes.filter(c=>c.name==a);return b.length?b[0]:null}};_.Dh=class{constructor(a,b){this.name=a;this.value=b}};var Rg=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
284
+ "cs"],["dan","da"],["deu","de"],[_.Yc,"dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
264
285
  "is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
265
286
  "mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
266
287
  "sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
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);
288
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var Sp=class{};_.z("clpp.utils.BufferUtils",Sp);Sp.toArrayBuffer=eh;Sp.toDataView=_.bh;Sp.toInt32Array=_.ah;Sp.toUint32Array=$g;Sp.toUint16Array=Zg;Sp.toUint8Array=_.J;Sp.equal=Xg;var hh=new _.R("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.gh);_.z("clpp.utils.strings.fromBytesAutoDetect",_.jh);_.z("clpp.utils.strings.toUtf8",_.kh);_.z("clpp.utils.strings.toUtf16",_.lh);_.z("clpp.utils.strings.toByteArray",_.mh);_.z("clpp.utils.strings.startsWith",_.nh);_.z("clpp.utils.strings.endsWith",_.oh);_.z("clpp.utils.strings.bitrateToString",_.rh);
268
289
  _.z("clpp.utils.strings.durationToString",function(a,b="%h:%mm:%ss"){if(null===a||void 0===a)a=0;if(null===b||void 0===b)b="%h:%mm:%ss";const c=Math.floor(a/3600),d=Math.floor((a-3600*c)/60);a=Math.floor(a-3600*c-60*d);const e=(g,h)=>g.length<h?e("0"+g,h):g,f=g=>(h,k)=>e(g,k.length-1);return b.replace(/(%h+)/,f(String(c))).replace(/(%m+)/,f(String(d))).replace(/(%s+)/,f(String(a)))});
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,
290
+ _.z("clpp.utils.strings.hashCode",function(a){let b=0;if(0===a.length)return b;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b});var sh=document.createElement("span");var Tp=class{};_.z("clpp.utils.Uint8ArrayUtils",Tp);Tp.toStandardBase64=_.uh;Tp.concat=_.Ah;Tp.equal=_.zh;Tp.toHex=_.yh;Tp.fromHex=_.xh;Tp.fromBase64=_.wh;Tp.toBase64Url=_.vh;_.Ch=class{constructor(a){this.f=a;this.a=0}};var Gh=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",Gh);_.z("clpp.net.makeRequest",_.Kh);_.Jh=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.Jh});_.Jl=class{constructor(){let a,b;const c=new Promise((d,e)=>{a=d;b=e});c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.Pm=class{constructor(a,b){this.P=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}Xc(a,b){const c=new _.Jl;let d=()=>{c.reject(new _.H(_.G,7,7001));return this.abort()};this.P.then(e=>{this.a?c.reject(new _.H(_.G,7,7001)):a?d=Ph(a,e,c):c.resolve(e)},e=>{b?d=Ph(b,e,c):c.reject(e)});return new _.Pm(c,()=>d())}};_.Pm.aborted=function(){const a=Promise.reject(new _.H(_.G,7,7001));a.catch(()=>{});return new _.Pm(a,()=>Promise.resolve())};_.Pm.prototype.chain=_.Pm.prototype.Xc;_.Up=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.P.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.Bn=class{constructor(){this.f=[];this.g=[];this.o=!1;this.l=new _.Up;this.a={};this.j=0;this.a.data=ip;!window.fetch||!window.AbortController||_.Fi(6)||_.Ii()&&68<_.cj().browserVersion.major?(this.a.http=Qo,this.a.https=Qo):(this.a.http=dp,this.a.https=dp)}Hg(a){0<a?_.C("Rate limit set to "+a+"bps"):_.C("Rate limit disabled");this.j=a}release(){return this.l.destroy()}destroy(){this.o=!0;this.f=[];this.g=[];return this.l.destroy()}te(a){this.f.push(a)}zc(a){this.g.push(a)}bf(a){this.f=this.f.filter(b=>
291
+ b!==a)}qd(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.o)return new Vp(Promise.reject(new _.H(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.j&&0<this.j&&(a.rateLimitBps=this.j);var b=[];for(const f of this.f)b.push(f);if(a.requestModifiers)for(const f of a.requestModifiers)b.push(f);a.requestModifiers=b;b=[];for(var c of this.g)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.Jl;try{for(const f of a.requestModifiers)d=d.then(g=>
292
+ {if(e.a)throw new _.H(_.G,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.G,1,1006,null,g);});d=d.then(f=>{var g=new _.Gg(f.uris[f.uriIndex]);var h=g.Va;h||(h=location.protocol,h=h.slice(0,-1),Hg(g,h),f.uris[f.uriIndex]=g.toString());h=this.a[h];if(!h)throw new _.H(_.G,1,1E3,{url:g.toString()});g=h;return{request:f,plugin:g}});e=new Vp(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.G,1,7001,
293
+ g?{url:g.request.uris[g.request.uriIndex],request:g.request}:null);};h();const k=f(g)||g;h();return k}).catch(g=>{if(g instanceof _.H&&g.data&&g.data.response){const h=f(g.data.response);if(h)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.G,1,1007,null,g);});_.Rh(this.l,e);c.resolve(a);return e}catch(f){return new Vp(Promise.reject(f))}}};_.z("clpp.net.NetworkEngine",_.Bn);_.Bn.prototype.fetch=_.Bn.prototype.fetch;
294
+ _.Bn.prototype.removeResponseModifier=_.Bn.prototype.qd;_.Bn.prototype.removeRequestModifier=_.Bn.prototype.bf;_.Bn.prototype.addResponseModifier=_.Bn.prototype.zc;_.Bn.prototype.addRequestModifier=_.Bn.prototype.te;_.Bn.prototype.setRateLimit=_.Bn.prototype.Hg;var Wh;_.Zh=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.channelsCount=this.src=this.mimeType=this.frameRate=this.label=this.originalLanguage=this.language=this.kind=null;this.renditions=[];this.accessibility=[]}bd(a){return this.type===a.type&&this.channelsCount===a.channelsCount&&this.frameRate===a.frameRate&&this.kind===a.kind&&this.label===a.label&&this.language===a.language&&this.mimeType===a.mimeType&&xg(this.roles,a.roles)&&xg(this.accessibility,a.accessibility,Uh)}toString(){return`Track type: ${this.type} id: ${this.id}
295
+ renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.Zh);_.Zh.prototype.toString=_.Zh.prototype.toString;_.gi=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.drm=this.drmInfo=this.codec=this.Ac=this.bandwidth=this.height=this.width=null}};_.z("clpp.Rendition",_.gi);_.Yh=1;_.M=_.w;_.L=_.p;_.K=_.t;Wh=_.Gd;_.Wp={VIDEO:_.M,AUDIO:_.L,TEXT:_.K,METADATA:Wh};_.Zh.Type=_.Wp;_.rk=class{constructor(a){this.j=a;this.scheme=null;const b=document.createElement("a"),c=a.match(/^(.*:)(\/\/(.*))$/);let d=!1;if(c){if(this.scheme=c[1],b.href=c[2],":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+c[3],d=!0}else{b.href=a;if(":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+a.match(/\/?\/?(.*)/)[1],d=!0;this.scheme=b.protocol}""===this.scheme&&(this.scheme=window.location.protocol);this.a=d?"":b.hostname;this.port=b.port;this.path=b.pathname;
296
+ _.nh(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.g=b.hash}};_.z("clpp.utils.url.queryString",_.bi);var Xp=class{constructor(a){this.f=a;this.h=new _.R("clpp.native.hls.HlsMetadataParser");this.a=Bg(this.g.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}g(a,b){const c=this;return _.x(function*(){let d=null;try{d=yield ei(c,a)}catch(f){return c.h.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield ii(c,d,
297
+ a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.h.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield ki(d);e.tc=f}catch(f){c.h.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.si=[];_.S=class{yd(){return!0}Sf(a){return this.getVideoTracks().find(b=>_.Tf(b,a,a&&Object.keys(a)))}Of(a){return this.getAudioTracks().find(b=>_.Tf(b,a,a&&Object.keys(a)))}Qf(a){return this.ja().find(b=>_.Tf(b,a,a&&Object.keys(a)))}Rf(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.Tf(b,a,a&&Object.keys(a)))}Nf(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.Tf(b,a,a&&Object.keys(a)))}Pf(a){return this.ja().flatMap(b=>b.renditions).find(b=>_.Tf(b,a,a&&Object.keys(a)))}};
298
+ _.z("clpp.TrackManager",_.S);_.S.prototype.isAbrEnabled=_.S.prototype.la;_.S.prototype.addTextTrack=_.S.prototype.addTextTrack;_.S.prototype.findTextRendition=_.S.prototype.Pf;_.S.prototype.findAudioRendition=_.S.prototype.Nf;_.S.prototype.findVideoRendition=_.S.prototype.Rf;_.S.prototype.findTextTrack=_.S.prototype.Qf;_.S.prototype.findAudioTrack=_.S.prototype.Of;_.S.prototype.findVideoTrack=_.S.prototype.Sf;_.S.prototype.setTextRendition=_.S.prototype.lb;_.S.prototype.setAudioRendition=_.S.prototype.kb;
299
+ _.S.prototype.setVideoRendition=_.S.prototype.Wa;_.S.prototype.setTextTrack=_.S.prototype.Ea;_.S.prototype.setAudioTrack=_.S.prototype.sa;_.S.prototype.setVideoTrack=_.S.prototype.Xa;_.S.prototype.getTextTrack=_.S.prototype.pa;_.S.prototype.getAudioTrack=_.S.prototype.oa;_.S.prototype.getVideoTrack=_.S.prototype.Ka;_.S.prototype.getLoadingTextRendition=_.S.prototype.fb;_.S.prototype.getLoadingAudioRendition=_.S.prototype.eb;_.S.prototype.getLoadingVideoRendition=_.S.prototype.Sa;
300
+ _.S.prototype.getTextRendition=_.S.prototype.Ia;_.S.prototype.getAudioRendition=_.S.prototype.Ha;_.S.prototype.getVideoRendition=_.S.prototype.ia;_.S.prototype.getTextTracks=_.S.prototype.ja;_.S.prototype.getAudioTracks=_.S.prototype.getAudioTracks;_.S.prototype.getVideoTracks=_.S.prototype.getVideoTracks;_.S.prototype.canSelectVideoTracks=_.S.prototype.yd;_.Yp=new Map;_.Zp=(new Map).set(_.Mc,_.Mc).set("frameRate","framerate").set("bandwidth","bitrate").set(_.tf,_.tf).set(_.pd,_.pd).set("channelsCount","channels");_.$p=class{constructor(a){this.f=a;this.a=null}ca(a){return wi(this,a,!1)}Ya(a){return wi(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.zi=class{constructor(a){this.f=a;this.a=null}ne(){this.stop();this.f();return this}ca(a){this.stop();this.a=(new _.$p(()=>{this.f()})).ca(a);return this}Ya(a){this.stop();this.a=(new _.$p(()=>{this.f()})).Ya(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.zi);_.zi.prototype.stop=_.zi.prototype.stop;_.zi.prototype.tickEvery=_.zi.prototype.Ya;_.zi.prototype.tickAfter=_.zi.prototype.ca;_.zi.prototype.tickNow=_.zi.prototype.ne;var aq=class{};_.z(Lc,aq);aq.getInfo=_.cj;
301
+ var yi=null,xi=null,Si=new _.R(Lc),Wi="android",Vi="ios",aj="linux",Xi="osx",Yi="windows",Zi="tizen",$i="webos",Ui=We,bj=We,Ni={windows:{os_version:/windows\s+?nt\s([\d.]+)/i,ie:/windows\s+?nt.+?trident\/[\d.]+.*rv:([\d.]+)/i,edge:/windows\s+?nt.+?edge?\/([\d.]+)/i,chrome:/windows\s+?nt.+?chrome\/([\d.]+)/i,firefox:/windows\s+?nt.+?firefox\/([\d.]+)/i,opera:/windows\s+?nt.+?opr\/([\d.]+)/i},osx:{os_version:/macintosh.+?([\d._]+)/i,safari:/macintosh.+?version\/([\d._]+).+?safari/i,edge:/macintosh.+?edge?\/([\d._]+)/i,
281
302
  chrome:/macintosh.+?chrome\/([\d._]+)/i,firefox:/macintosh.+?firefox\/([\d._]+)/i,opera:/macintosh.+?opr\/([\d._]+)/i},unknown:{ie:/.+?trident\/([\d.]+)/i,edge:/.+?edge?\/([\d.]+)/i,safari:/.+?version\/([\d._]+).+?safari/i,chrome:/.+?chrome\/([\d._]+)/i,firefox:/.+?firefox\/([\d._]+)/i,opera:/.+?opr\/([\d._]+)/i},android:{os_version:/android.+?([\d._]+)/i,chrome:/android.+?chrome\/([\d._]+)/i,firefox:/android.+?firefox\/([\d._]+)/i,opera:/android.+?opr\/([\d._]+)/i},ios:{os_version:/(?:iPad|iPhone).+?([\d._]+)/i,
282
303
  chrome:/.+?CriOS\/([\d._]+)/i,firefox:/.+?FxiOS\/([\d._]+)/i,safari:/.+?version\/([\d._]+).+?safari/i,opera:/.+?opr\/([\d._]+)/i},linux:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i},tizen:{os_version:/tizen.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i},
283
- webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var Q=class extends _.P{constructor(){super();this.a=new _.O("clpp.native.TrackManager");this.l=null;this.g=new _.jo;this.h=[];this.G=0;this.o={};this.I=[];this.f=new Map;this.w=null;this.m=new Map;this.A=!0;this.N=this.B.bind(this,_.J);this.T=this.F.bind(this,_.J);this.R=this.C.bind(this,_.J);this.V=this.B.bind(this,_.L);this.Y=this.F.bind(this,_.L);this.W=this.C.bind(this,_.L);this.J=this.B.bind(this,_.K);this.M=this.F.bind(this,_.K);this.K=this.C.bind(this,_.K);this.j=null}rd(){return!_.li()}B(a,
284
- b){const c=this;return _.y(function*(){if(b){var d=b.track;if(d){var e=b.target,f=c.h.find(l=>Ci(l,d,a));if(f)c.a.warn("Track from event already exists",d,f);else{var g=yh(a,d),h=Di(d);if(a===_.J){if(d.kind===_.td)return;var k;void 0!==d.id?k=c.o[d.id]:k=Object.values(c.o).find(l=>Ci(g,l,a));g.kind&&"captions"===g.kind&&(g.mimeType=_.Rb);k&&(g.src=k.url,g.mimeType=k.mimeType)}else if(f=c.h.find(l=>l.type===a&&_.rf(l,g,["kind","label","language"]))){f.id=d.id;h&&(c.a.debug(`Setting native ${a} track active`),
285
- c.f.set(a,f));c.a.debug("Track from event seems to already exists, flipped native track to",d);return}try{g.renditions.push(new _.Fh(g.id,g));c.h.push(g);const l=c.l.getConfiguration().safari;Fi(c,a,l)?yield Gi(c,g,l):Hi(c,a,l)&&(yield Ii(c,g,l));c.a.debug(a+" Track added",g);c.l.trigger(new _.F(_.Qo));const m=Ji(c,a).length;f=a===_.L;k=a===_.K||f;const n=!(!e||!e.length),q=e&&e.length||0;e=()=>{c.a.debug(`Setting native ${a} track active. `+`Native track active: ${h}. `+`Number of tracks: ${m}`,
286
- d);c.f.set(a,g)};h?e():1===m&&k&&(f?e():n&&1!==q||e())}catch(l){c.a.error("Error while converting track data",l)}}}else c.a.warn(Qa)}else c.a.warn(Pa)})}F(a,b){if(b){var c=b.track;c?a===_.J&&c.kind!==_.td&&(b=this.h.find(d=>Ci(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.f.get(a)||null)===b&&(this.f.set(a,null),Ki(this)),this.a.debug(a+" Track removed, id: ",b.id)):this.a.warn(Qa)}else this.a.warn(Pa)}C(a,b){this.a.debug(a+" Track changed",b);a===_.J&&Ki(this);const c=Mi(this,a);if(c)for(let d=
287
- 0;d<c.length;++d)if(Di(c[d])){if(b=this.h.find(e=>Ci(e,c[d],a)))this.f.set(a,b),this.a.debug("Track change detected, id:",b.id),b===this.m.get(a)&&this.m.set(a,null),a===_.K?this.l.trigger(new _.F(_.Pi)):a===_.J&&this.l.trigger(new _.F(_.Qi));break}}initialize(a){this.l=a;this.j=new Lo(a.getNetworkEngine())}load(){this.A=!1;var a=Li(this,_.J);a&&(this.g.on(a,_.Kb,this.N),this.g.on(a,$d,this.T),this.g.on(a,uc,this.R));if(a=Li(this,_.K))this.g.on(a,_.Kb,this.J),this.g.on(a,$d,this.M),this.g.on(a,uc,
288
- this.K);if(a=Li(this,_.L))this.g.on(a,_.Kb,this.V),this.g.on(a,$d,this.Y),this.g.on(a,uc,this.W);this.g.one(this.l,nc,this.H.bind(this))}release(){this.A=!0;this.h=[];this.o={};this.f.clear();this.m.clear();this.g.release()}destroy(){this.release();this.l=null}getVideoTracks(){return Ji(this,_.L)}getAudioTracks(){return Ji(this,_.K)}ja(){return Ji(this,_.J)}ia(){const a=this.f.get(_.L)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);
289
- if(b)return b}return a.renditions[0]||null}Fa(){return Ni(this,_.K)}Ga(){return Ni(this,_.J)}Ra(){return Oi(this,_.L)}eb(){return Oi(this,_.K)}fb(){return Oi(this,_.J)}Ia(){return this.f.get(_.L)||null}na(){return this.f.get(_.K)||null}oa(){return this.f.get(_.J)||null}Wa(a){Ri(this,_.L,a)}ta(a){Ri(this,_.K,a)}Da(a){Ri(this,_.J,a)}Va(a){Ri(this,_.L,a&&a.track)}kb(a){Ri(this,_.K,a&&a.track)}lb(a){Ri(this,_.J,a&&a.track)}addTextTrack(a){const b=this;return _.y(function*(){if(a.mimeType.match(/text\/vtt/)){const c=
290
- "External_"+`${b.G++}`;b.o[c]=a;Si(b,a,c)}else yield Ti(b,a)})}la(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.y(function*(){const b=a.l.getConfiguration();Vi(a,_.K,b.preferredAudioLanguage);if(!Mi(a,_.J).some(c=>Di(c))){const c=Li(a,_.J);yield new Promise(d=>{a.g.one(c,uc,d);(new _.Yh(d)).da(1)})}a.A||Vi(a,_.J,b.preferredTextLanguage)})}};Q.prototype.isAbrEnabled=Q.prototype.la;Q.prototype.addTextTrack=Q.prototype.addTextTrack;
291
- Q.prototype.setTextRendition=Q.prototype.lb;Q.prototype.setAudioRendition=Q.prototype.kb;Q.prototype.setVideoRendition=Q.prototype.Va;Q.prototype.setTextTrack=Q.prototype.Da;Q.prototype.setAudioTrack=Q.prototype.ta;Q.prototype.setVideoTrack=Q.prototype.Wa;Q.prototype.getTextTrack=Q.prototype.oa;Q.prototype.getAudioTrack=Q.prototype.na;Q.prototype.getVideoTrack=Q.prototype.Ia;Q.prototype.getLoadingTextRendition=Q.prototype.fb;Q.prototype.getLoadingAudioRendition=Q.prototype.eb;
292
- Q.prototype.getLoadingVideoRendition=Q.prototype.Ra;Q.prototype.getTextRendition=Q.prototype.Ga;Q.prototype.getAudioRendition=Q.prototype.Fa;Q.prototype.getVideoRendition=Q.prototype.ia;Q.prototype.getTextTracks=Q.prototype.ja;Q.prototype.getAudioTracks=Q.prototype.getAudioTracks;Q.prototype.getVideoTracks=Q.prototype.getVideoTracks;Q.prototype.canSelectVideoTracks=Q.prototype.rd;_.Ro=class{constructor(a,b="total"){this.length=(this.f=a)?a.length:0;this.a=[];this.type=b}start(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(jb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(jb);}ob(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:1===this.length&&0>this.start(0)?0:this.start(0)}Aa(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
293
- 1)}Zb(a,b=!0,c=0){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)||a>this.end(this.length-1))return!1;if(b)return c+a>=this.start(0)&&a<=this.end(this.length-1);for(b=0;b<this.length;b++)if(c+a>=this.start(b)&&a<=this.end(b))return!0;return!1}Ea(a,b=!1){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0))return 0;let c=0;if(b)b=this.Aa(),null!=b&&(c=Math.max(0,b-a));else for(b=this.length-1;0<=b&&this.end(b)>a;--b)c+=this.end(b)-Math.max(this.start(b),a);return c}toString(){let a=
294
- "";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.z("clpp.BufferInfo",_.Ro);_.Ro.prototype.bufferedAheadOf=_.Ro.prototype.Ea;_.Ro.prototype.isBuffered=_.Ro.prototype.Zb;_.Ro.prototype.bufferEnd=_.Ro.prototype.Aa;_.Ro.prototype.bufferStart=_.Ro.prototype.ob;_.Ro.prototype.end=_.Ro.prototype.end;_.Ro.prototype.start=_.Ro.prototype.start;_.So=class{constructor(){this.Fc=new ho(this);this.Dc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Fc.on(a,b,c)}one(a,b,c){return this.Fc.one(a,b,c)}off(a,b){return this.Fc.off(a,b)}addDelegate(a){a&&(0<=this.Dc.indexOf(a)||this.Dc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}removeDelegate(a){a&&(a=this.Dc.indexOf(a),0<=a&&this.Dc.splice(a,1))}trigger(a){this.Fc.trigger(a);for(const b of this.Dc)b.dispatchEvent(a)}};
295
- _.So.prototype.off=_.So.prototype.off;_.So.prototype.one=_.So.prototype.one;_.So.prototype.on=_.So.prototype.on;_.So.prototype.removeEventListener=_.So.prototype.removeEventListener;_.So.prototype.addEventListener=_.So.prototype.addEventListener;_.z("clpp.events.ERROR",_.Yc);_.z("clpp.events.LOADEDMETADATA",_.od);_.z("clpp.events.BUFFERING_ENDED",_.hc);_.z("clpp.events.BUFFERING_STARTED",_.ic);_.z("clpp.events.STATE_CHANGED",_.je);_.Pi="audiotrackchanged";_.z("clpp.events.AUDIO_TRACK_CHANGED",_.Pi);_.Qi="texttrackchanged";_.z("clpp.events.TEXT_TRACK_CHANGED",_.Qi);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.Le);_.z("clpp.events.BITRATE_CHANGED",_.ec);_.Qo="tracksadded";_.z("clpp.events.TRACKS_ADDED",_.Qo);_.z("clpp.events.LOAD_START",pd);
296
- _.z("clpp.events.RELEASING",_.Zd);_.z("clpp.events.RELEASED",Yd);_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.Ke);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.cc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_UPDATE",_.Sc);_.z("clpp.events.DRM_SESSION_PERSISTED",_.Rc);_.z("clpp.events.DRM_RENEWAL_STARTED",Qc);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Pc);
297
- _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.dc);_.z("clpp.events.PLAY",_.Rd);_.z("clpp.events.SEEKING",_.ee);_.z("clpp.events.SEEKED",_.de);_.z("clpp.events.USER_SEEKING",_.Ce);_.z("clpp.events.USER_SEEKED",_.Be);_.Bl={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.Bl);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.Lb);_.z("clpp.events.AD_LOADED",_.Bb);_.z("clpp.events.AD_BREAK_STARTED",_.ub);_.z("clpp.events.AD_STARTED",_.Hb);_.z("clpp.events.AD_BUFFERING",_.wb);_.z("clpp.events.AD_PROGRESS",_.Eb);
298
- _.z("clpp.events.AD_FIRST_QUARTILE",_.zb);_.z("clpp.events.AD_MIDPOINT",_.Cb);_.z("clpp.events.AD_THIRD_QUARTILE",_.Jb);_.z("clpp.events.AD_PAUSED",_.Db);_.z("clpp.events.AD_RESUMED",_.Fb);_.z("clpp.events.AD_SKIPPED",_.Gb);_.z("clpp.events.AD_CLICKED",_.xb);_.z("clpp.events.AD_IMPRESSION",_.Ab);_.z("clpp.events.AD_COMPLETED",_.yb);_.z("clpp.events.AD_STOPPED",_.Ib);_.z("clpp.events.AD_BREAK_STOPPED",_.vb);_.z("clpp.events.CASTING_STARTED",_.oc);_.z("clpp.events.CASTING_ENDED","castingended");
299
- _.z("clpp.events.CAST_STATUS_CHANGED",_.pc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.Qb);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.Ob);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.Mb);_.Rf="timeline-cue-added";_.z("clpp.events.TIMELINE_CUE_ADDED",_.Rf);_.Tf="timeline-cue-enter";_.z("clpp.events.TIMELINE_CUE_ENTER",_.Tf);_.Uf="timeline-cue-exit";_.z("clpp.events.TIMELINE_CUE_EXIT",_.Uf);_.z("clpp.events.MPD_TYPE_CHANGED",_.yd);_.z("clpp.events.VIMOND_RESPONSE",_.Me);
300
- _.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.Td);_.z("clpp.events.PLAYLIST_MODIFIED",_.Ud);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.qc);_.z("clpp.events.ONLINE_STATUS_CHANGED",Hd);var Wi=["play() failed because the user didn't interact","The play method is not allowed by the user agent","The request is not allowed by the user agent or the platform"];var To=class{};_.z("clpp.utils.PlayerConfiguration",To);To.create=_.bj;var Uo=["abort",mc,nc,Uc,"emptied",Vc,_.Xc,_.Yc,"interruptbegin","interruptend",_.nd,_.od,pd,"mozaudioavailable",_.Ld,_.Rd,_.Sd,_.Vd,_.Xd,_.de,_.ee,he,"suspend",_.ue,"volumechange",_.Pe,_.Qe,_.be,Ve,Ue,Se,Te];_.Vo=class extends _.So{constructor(a){super();this.log=new _.O(a);this.configuration=this.kc=_.$i();this.o=this.B=null;this.cd=this.Ed=!1;this.df=new _.O("clpp.video.events");this.Qb=null;this.oc=-1;this.jf=this.gf.bind(this);this.He=new _.Em;this.J=new _.jo;this.ga=this.mc=this.I=null}init(a,b){this.configuration=this.kc=b;this.B=a;this.log.info("Initializing Player surface");a=this.B.getMedia();this.log.info("Attaching media element listeners");for(const c of Uo)this.J.on(a,c,this.jf,c!==_.Yc);
301
- this.Qb||(this.Qb=this.Oe());this.Qb.initialize(this);this.B.showMediaElement()}release(){this.I&&(this.I.destroy(),this.I=null);return Promise.resolve()}destroy(){this.J.release();return Promise.resolve()}canPlay(a,b){return _.If[this.namespace()].canPlay(a,b)}play(){if(!this.o)return Promise.reject("No sources specified yet. You need to load content before calling play.");const a=this.B.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c=
302
- {name:b.name||"",message:b.message||"",stack:b.stack||""};Xi(c)?(this.trigger(new _.F(_.dc)),this.log.warn(_.ia)):c.name===Sa&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.o?new Promise((a,b)=>{const c=this.getState();if(c!==_.zl&&c!==_.wl&&c!==_.Hl&&c!==_.Gl)b();else if(this.B.getMedia().pause(),this.getState()===_.Hl)this.J.one(this,_.je,()=>{a()});else a()}):Promise.reject("No sources specified yet. You need to load content before calling pause.")}isPaused(){return this.B.getMedia().paused}isEnded(){return this.B.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.mc=
303
- a}setCdnErrorCallback(a){this.ga=a}sc(){return this.mc}getSurface(){return this.B}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.Ro(b?b.buffered:void 0,a)}getPosition(){const a=this.B.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this.getPosition();if(void 0===a||null===a||typeof a!==_.r||a===b)return Promise.resolve();const c=this.B.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),
304
- Promise.reject();const d=a-b;return.1>=Math.abs(d)?(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.F(_.Ce));this.J.on(c,_.de,h);this.J.on(c,_.ue,h);this.J.on(c,_.Vd,h);this.log.info("Seeking to "+a+". Delta "+d);this.cd=this.Ed=!0;c.currentTime=a},h=l=>{const m=this.getPosition(),n=.1>=Math.abs(a-m);var q=.25<m-a;const t=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,u=l.type===_.de,x=l.type===_.Vd,A=l.type===_.ue,
305
- E=x&&t;q=u||n&&E||A&&q;this.log.debug("Checking seeking state after "+l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",u,"Time reached",n,"Timeupdate:",A,"Progress:",x,"ReadyState:",t,"Progress Ready:",E);q?(this.cd=this.Ed=!1,this.J.off(c,_.de,h),this.J.off(c,_.ue,h),this.J.off(c,_.Vd,h),this.bf(),this.trigger(new _.F(_.Be)),e()):x&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();
306
- 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,
304
+ webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var T=class extends _.S{constructor(){super();this.h=new _.R("clpp.native.TrackManager");this.m=null;this.f=new _.vp;this.g=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.N=this.B.bind(this,_.K);this.S=this.F.bind(this,_.K);this.R=this.C.bind(this,_.K);this.V=this.B.bind(this,_.M);this.Y=this.F.bind(this,_.M);this.W=this.C.bind(this,_.M);this.J=this.B.bind(this,_.L);this.M=this.F.bind(this,_.L);this.K=this.C.bind(this,_.L);this.j=null}yd(){return!_.Pi()}B(a,
305
+ b){const c=this;return _.x(function*(){if(b){var d=b.track;if(d){var e=a===_.M,f=a===_.K,g=a===_.L||e,h=b.target,k=c.g.find(n=>dj(n,d,a));if(k)c.h.warn("Track from event already exists",d,k);else{var l=$h(a,d),m=ej(d);if(f){if(d.kind===_.Gd)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(q=>dj(l,q,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.Zb);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.g.find(n=>n.type===a&&_.Tf(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.h.debug(`Setting native ${a} track active`),
306
+ c.a.set(a,k));c.h.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.gi(l.id,l));c.g.push(l);const n=c.m.getConfiguration().safari;gj(c,a,n)?yield hj(c,l,n):ij(c,a,n)&&(yield jj(c,l,n));c.h.debug(a+" Track added",l);c.m.trigger(new _.F(_.bq));const q=kj(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.h.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${q}`,d);c.a.set(a,l)};m?f():1===q&&
307
+ g&&(e?f():u&&1!==v||f())}catch(n){c.h.error("Error while converting track data",n)}}}else c.h.warn(Ta)}else c.h.warn(Qa)})}F(a,b){if(b){var c=b.track;c?a===_.K&&c.kind!==_.Gd&&(b=this.g.find(d=>dj(d,c,a)))&&(this.g.splice(this.g.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),lj(this)),this.h.debug(a+" Track removed, id: ",b.id)):this.h.warn(Ta)}else this.h.warn(Qa)}C(a,b){this.h.debug(a+" Track changed",b);a===_.K&&lj(this);const c=nj(this,a);if(c)for(let d=0;d<c.length;++d)if(ej(c[d])){if(b=
308
+ this.g.find(e=>dj(e,c[d],a)))this.a.set(a,b),this.h.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.L?this.m.trigger(new _.F(_.qj)):a===_.K&&this.m.trigger(new _.F(_.rj));break}}initialize(a){this.m=a;this.j=new Xp(a.getNetworkEngine())}load(){this.A=!1;var a=mj(this,_.K);a&&(this.f.on(a,_.Tb,this.N),this.f.on(a,we,this.S),this.f.on(a,Bc,this.R));if(a=mj(this,_.L))this.f.on(a,_.Tb,this.J),this.f.on(a,we,this.M),this.f.on(a,Bc,this.K);if(a=mj(this,_.M))this.f.on(a,
309
+ _.Tb,this.V),this.f.on(a,we,this.Y),this.f.on(a,Bc,this.W);this.f.one(this.m,uc,this.H.bind(this))}release(){this.A=!0;this.g=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return kj(this,_.M)}getAudioTracks(){return kj(this,_.L)}ja(){return kj(this,_.K)}ia(){const a=this.a.get(_.M)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);if(b)return b}return a.renditions[0]||
310
+ null}Ha(){return oj(this,_.L)}Ia(){return oj(this,_.K)}Sa(){return pj(this,_.M)}eb(){return pj(this,_.L)}fb(){return pj(this,_.K)}Ka(){return this.a.get(_.M)||null}oa(){return this.a.get(_.L)||null}pa(){return this.a.get(_.K)||null}Xa(a){sj(this,_.M,a)}sa(a){sj(this,_.L,a)}Ea(a){sj(this,_.K,a)}Wa(a){sj(this,_.M,a&&a.track)}kb(a){sj(this,_.L,a&&a.track)}lb(a){sj(this,_.K,a&&a.track)}addTextTrack(a){const b=this;return _.x(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
311
+ b.o[c]=a;tj(b,a,c)}else yield uj(b,a)})}la(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();wj(a,_.L,b.preferredAudioLanguage);if(!nj(a,_.K).some(c=>ej(c))){const c=mj(a,_.K);yield new Promise(d=>{a.f.one(c,Bc,d);(new _.zi(d)).ca(1)})}a.A||wj(a,_.K,b.preferredTextLanguage)})}};T.prototype.isAbrEnabled=T.prototype.la;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.setTextRendition=T.prototype.lb;
312
+ T.prototype.setAudioRendition=T.prototype.kb;T.prototype.setVideoRendition=T.prototype.Wa;T.prototype.setTextTrack=T.prototype.Ea;T.prototype.setAudioTrack=T.prototype.sa;T.prototype.setVideoTrack=T.prototype.Xa;T.prototype.getTextTrack=T.prototype.pa;T.prototype.getAudioTrack=T.prototype.oa;T.prototype.getVideoTrack=T.prototype.Ka;T.prototype.getLoadingTextRendition=T.prototype.fb;T.prototype.getLoadingAudioRendition=T.prototype.eb;T.prototype.getLoadingVideoRendition=T.prototype.Sa;
313
+ T.prototype.getTextRendition=T.prototype.Ia;T.prototype.getAudioRendition=T.prototype.Ha;T.prototype.getVideoRendition=T.prototype.ia;T.prototype.getTextTracks=T.prototype.ja;T.prototype.getAudioTracks=T.prototype.getAudioTracks;T.prototype.getVideoTracks=T.prototype.getVideoTracks;T.prototype.canSelectVideoTracks=T.prototype.yd;_.cq=class{constructor(a,b="total"){this.length=(this.f=a)?a.length:0;this.a=[];this.type=b}start(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(qb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(qb);}ob(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:1===this.length&&0>this.start(0)?0:this.start(0)}Aa(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
314
+ 1)}$b(a,b=!0,c=0){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)||a>this.end(this.length-1))return!1;if(b)return c+a>=this.start(0)&&a<=this.end(this.length-1);for(b=0;b<this.length;b++)if(c+a>=this.start(b)&&a<=this.end(b))return!0;return!1}Fa(a,b=!1){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0))return 0;let c=0;if(b)b=this.Aa(),null!=b&&(c=Math.max(0,b-a));else for(b=this.length-1;0<=b&&this.end(b)>a;--b)c+=this.end(b)-Math.max(this.start(b),a);return c}toString(){let a=
315
+ "";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.z("clpp.BufferInfo",_.cq);_.cq.prototype.bufferedAheadOf=_.cq.prototype.Fa;_.cq.prototype.isBuffered=_.cq.prototype.$b;_.cq.prototype.bufferEnd=_.cq.prototype.Aa;_.cq.prototype.bufferStart=_.cq.prototype.ob;_.cq.prototype.end=_.cq.prototype.end;_.cq.prototype.start=_.cq.prototype.start;_.dq=class{constructor(){this.Fc=new tp(this);this.Dc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Fc.on(a,b,c)}one(a,b,c){return this.Fc.one(a,b,c)}off(a,b){return this.Fc.off(a,b)}addDelegate(a){a&&(0<=this.Dc.indexOf(a)||this.Dc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}removeDelegate(a){a&&(a=this.Dc.indexOf(a),0<=a&&this.Dc.splice(a,1))}trigger(a){this.Fc.trigger(a);for(const b of this.Dc)b.dispatchEvent(a)}};
316
+ _.dq.prototype.off=_.dq.prototype.off;_.dq.prototype.one=_.dq.prototype.one;_.dq.prototype.on=_.dq.prototype.on;_.dq.prototype.removeEventListener=_.dq.prototype.removeEventListener;_.dq.prototype.addEventListener=_.dq.prototype.addEventListener;_.z("clpp.events.ERROR",_.ld);_.z("clpp.events.LOADEDMETADATA",_.Bd);_.z("clpp.events.BUFFERING_ENDED",_.oc);_.z("clpp.events.BUFFERING_STARTED",_.sc);_.z("clpp.events.STATE_CHANGED",_.Ge);_.qj="audiotrackchanged";_.z("clpp.events.AUDIO_TRACK_CHANGED",_.qj);_.rj="texttrackchanged";_.z("clpp.events.TEXT_TRACK_CHANGED",_.rj);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.hf);_.z("clpp.events.BITRATE_CHANGED",_.mc);_.bq="tracksadded";_.z("clpp.events.TRACKS_ADDED",_.bq);_.z("clpp.events.LOAD_START",Cd);
317
+ _.z("clpp.events.RELEASING",_.ve);_.z("clpp.events.RELEASED",ue);_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.gf);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.kc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_UPDATE",_.fd);_.z("clpp.events.DRM_SESSION_PERSISTED",_.ed);_.z("clpp.events.DRM_RENEWAL_STARTED",dd);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.cd);
318
+ _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.lc);_.z("clpp.events.PLAY",_.ee);_.z("clpp.events.SEEKING",_.Be);_.z("clpp.events.SEEKED",_.Ae);_.z("clpp.events.USER_SEEKING",_.af);_.z("clpp.events.USER_SEEKED",_.$e);_.xm={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.xm);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.Vb);_.z("clpp.events.AD_LOADED",_.Jb);_.z("clpp.events.AD_BREAK_STARTED",_.Cb);_.z("clpp.events.AD_STARTED",_.Pb);_.z("clpp.events.AD_BUFFERING",_.Eb);_.z("clpp.events.AD_PROGRESS",_.Mb);
319
+ _.z("clpp.events.AD_FIRST_QUARTILE",_.Hb);_.z("clpp.events.AD_MIDPOINT",_.Kb);_.z("clpp.events.AD_THIRD_QUARTILE",_.Rb);_.z("clpp.events.AD_PAUSED",_.Lb);_.z("clpp.events.AD_RESUMED",_.Nb);_.z("clpp.events.AD_SKIPPED",_.Ob);_.z("clpp.events.AD_CLICKED",_.Fb);_.z("clpp.events.AD_IMPRESSION",_.Ib);_.z("clpp.events.AD_COMPLETED",_.Gb);_.z("clpp.events.AD_STOPPED",_.Qb);_.z("clpp.events.AD_BREAK_STOPPED",_.Db);_.z("clpp.events.CASTING_STARTED",_.vc);_.z("clpp.events.CASTING_ENDED","castingended");
320
+ _.z("clpp.events.CAST_STATUS_CHANGED",_.wc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.Yb);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.Xb);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.Wb);_.og="timeline-cue-added";_.z("clpp.events.TIMELINE_CUE_ADDED",_.og);_.qg="timeline-cue-enter";_.z("clpp.events.TIMELINE_CUE_ENTER",_.qg);_.rg="timeline-cue-exit";_.z("clpp.events.TIMELINE_CUE_EXIT",_.rg);_.z("clpp.events.MPD_TYPE_CHANGED",_.Ld);_.z("clpp.events.VIMOND_RESPONSE",_.jf);
321
+ _.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.me);_.z("clpp.events.PLAYLIST_MODIFIED",_.ne);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.xc);_.z("clpp.events.ONLINE_STATUS_CHANGED",Ud);var xj=["play() failed because the user didn't interact","The play method is not allowed by the user agent","The request is not allowed by the user agent or the platform"];var eq=class{};_.z("clpp.utils.PlayerConfiguration",eq);eq.create=_.Dj;var fq=["abort",tc,uc,hd,"emptied",id,_.kd,_.ld,"interruptbegin","interruptend",_.Ad,_.Bd,Cd,"mozaudioavailable",_.ae,_.ee,_.le,_.re,_.te,_.Ae,_.Be,Ee,"suspend",_.Se,"volumechange",_.mf,_.nf,_.ye,sf,rf,pf,qf];_.gq=class extends _.dq{constructor(a){super();this.log=new _.R(a);this.configuration=this.nc=_.Bj();this.w=this.C=null;this.md=this.Pd=!1;this.rf=new _.R("clpp.video.events");this.Rb=null;this.oc=-1;this.zf=this.xf.bind(this);this.Od=new _.Bn;this.M=new _.vp;this.Na=this.lc=this.K=null}init(a,b){this.configuration=this.nc=b;this.C=a;this.log.info("Initializing Player surface");a=this.C.getMedia();this.log.info("Attaching media element listeners");for(const c of fq)this.M.on(a,c,this.zf,c!==_.ld);
322
+ this.Rb||(this.Rb=this.ef());this.Rb.initialize(this);this.C.showMediaElement()}release(){this.K&&(this.K.destroy(),this.K=null);return Promise.resolve()}destroy(){this.M.release();return this.Od.release()}canPlay(a,b){return _.fg[this.namespace()].canPlay(a,b)}play(){if(!this.w)return Promise.reject("No sources specified yet. You need to load content before calling play.");const a=this.C.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c=
323
+ {name:b.name||"",message:b.message||"",stack:b.stack||""};yj(c)?(this.trigger(new _.F(_.lc)),this.log.warn(_.ia)):c.name===Va&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.w?new Promise((a,b)=>{const c=this.getState();if(c!==_.vm&&c!==_.sm&&c!==_.Dm&&c!==_.Cm)b();else if(this.C.getMedia().pause(),this.getState()===_.Dm)this.M.one(this,_.Ge,()=>{a()});else a()}):Promise.reject("No sources specified yet. You need to load content before calling pause.")}isPaused(){return this.C.getMedia().paused}isEnded(){return this.C.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.lc=
324
+ a}setCdnErrorCallback(a){this.Na=a}qc(){return this.lc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.cq(b?b.buffered:void 0,a)}getPosition(){const a=this.C.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this.getPosition();if(void 0===a||null===a||typeof a!==_.r||a===b)return Promise.resolve();const c=this.C.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),
325
+ Promise.reject();const d=a-b;return.1>=Math.abs(d)?(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.F(_.af));this.M.on(c,_.Ae,h);this.M.on(c,_.Se,h);this.M.on(c,_.re,h);this.log.info("Seeking to "+a+". Delta "+d);this.md=this.Pd=!0;c.currentTime=a},h=l=>{const m=this.getPosition(),n=.1>=Math.abs(a-m);var q=.25<m-a;const u=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,v=l.type===_.Ae,y=l.type===_.re,A=l.type===_.Se,
326
+ D=y&&u;q=v||n&&D||A&&q;this.log.debug("Checking seeking state after "+l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",v,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",u,"Progress Ready:",D);q?(this.md=this.Pd=!1,this.M.off(c,_.Ae,h),this.M.off(c,_.Se,h),this.M.off(c,_.re,h),this.qf(),this.trigger(new _.F(_.$e)),e()):y&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();
327
+ else this.M.one(c,_.Bd,g)};this.getState()===_.Am?(this.log.debug("Player is in IDLE state. Postpone seek."),this.M.one(this,_.Ge,()=>{switch(this.getState()){case _.vm:case _.Dm:case _.Cm:this.log.debug("Valid seek state reached.");k();break;default:this.log.warn("Invalid seek target state. Aborting seek"),f()}})):k()})}getVolume(){const a=this.C.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.C.getMedia();
328
+ b?_.Sf(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
329
+ Value must be between 0 and 1.`):b.volume=a:this.log.warn("Can not set volume to "+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")}isMuted(){return this.C.getMedia().muted}setMuted(a){const b=this.C.getMedia();typeof a===_.nc&&(b.muted=a)}getDuration(){return this.w?this.C.getMedia().duration:-1}getTrackManager(){return this.Rb}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||1}setPlaybackRate(a){const b=this.C.getMedia();
330
+ void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.oc=a}getSourceIndex(){return this.oc}getLoadedSource(){return this.w&&-1!==this.oc?this.w[this.oc]:null}getPeriods(){return[]}getNetworkEngine(){return this.Od}setNetworkEngine(a){this.Od=a}getTextDisplayer(){return this.K}getTimelineCues(){return[]}resetAbr(){}xf(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.Se||a.type===_.re)this.rf.debug(d);
331
+ else{let e="";switch(a.type){case _.te:e=`Rate: ${this.getPlaybackRate()}`;break;case hd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.ee:case _.le:case "suspend":case _.mf:case Ee:case _.Be:case _.Ae:case _.Se:case _.re:case tc:case uc:b=this.getBufferInfo().Fa(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.ye:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+
332
+ e);this.rf.info(d)}a.type!==_.ld&&this.trigger(new _.F(a.type,{detail:a}))}qf(){}};_.gq.prototype.getTextDisplayer=_.gq.prototype.getTextDisplayer;_.gq.prototype.setNetworkEngine=_.gq.prototype.setNetworkEngine;_.gq.prototype.getNetworkEngine=_.gq.prototype.getNetworkEngine;var Hj;Hj=new _.R("clpp.Components");_.Fj=new Map;_.z("clpp.install",function(a){Pj(a)});_.z("clpp.uninstall",function(a){Qj(a)});var hq=class{constructor(){this.a=this.f=null;this.h=new _.R("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.ib,SW_SECURE_DECODE:_.jb,HW_SECURE_CRYPTO:Da,HW_SECURE_DECODE:Ea,HW_SECURE_ALL:Ca});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.Nd,CLEAR_KEY:_.Zd,WIDEVINE:_.Sc,PLAYREADY:_.Qc,FAIRPLAY:_.Pc,PRIMETIME:_.Oc});_.Uj={};_.z("clpp.drm.registerDrmEnvironment",_.Vj);var Yj={V1_STAGING:[10,191,2,8,3,18,16,40,112,52,84,192,8,246,54,24,173,231,68,61,182,196,200,24,139,231,249,144,5,34,142,2,48,130,1,10,2,130,1,1,0,181,33,18,184,208,93,2,63,204,93,149,226,194,81,193,198,73,180,23,124,216,210,190,239,53,91,176,103,67,222,102,30,61,42,188,49,130,183,153,70,213,95,220,8,223,233,84,7,129,94,154,98,116,179,34,162,199,245,224,103,187,95,10,192,122,137,212,90,234,148,178,81,111,7,91,102,239,129,29,13,38,225,185,166,184,148,242,185,133,121,98,170,23,28,79,102,99,13,62,76,
312
333
  96,39,24,137,127,94,30,249,182,170,245,173,77,186,42,126,20,23,109,241,52,161,211,24,91,90,33,138,192,90,76,65,240,129,239,255,128,163,160,64,197,11,9,187,199,64,238,220,216,241,77,103,90,145,152,15,146,202,125,220,100,106,6,173,173,81,1,247,74,14,73,140,192,31,0,83,43,172,33,120,80,189,144,94,144,146,54,86,183,223,239,239,66,72,103,103,243,62,246,40,61,79,66,84,171,114,88,147,144,190,229,88,8,241,214,104,8,13,69,216,147,194,188,162,247,77,96,160,192,208,160,153,60,239,1,96,71,3,51,76,54,56,19,148,
313
334
  134,188,157,175,36,253,103,160,127,154,217,67,2,3,1,0,1,58,18,115,116,97,103,105,110,103,46,103,111,111,103,108,101,46,99,111,109,18,128,3,152,62,48,53,38,117,244,11,167,21,252,36,155,218,229,212,172,114,73,162,102,101,33,228,54,85,115,149,41,114,31,248,128,224,170,239,197,226,123,201,128,218,234,218,191,63,195,134,208,132,160,44,130,83,120,72,204,117,63,244,151,176,17,167,218,151,120,138,0,226,170,107,132,205,125,113,192,122,72,235,246,22,2,204,165,163,243,32,48,167,41,92,48,218,145,91,145,220,24,
314
335
  185,188,149,147,184,222,139,181,15,13,237,193,41,56,184,233,224,57,205,222,24,250,130,232,27,176,50,99,15,233,85,216,90,86,108,225,84,48,11,246,212,193,189,18,105,102,53,107,40,125,101,123,24,206,99,208,239,212,95,197,38,158,151,234,177,28,181,99,229,86,67,178,111,244,159,16,156,33,1,175,202,243,91,131,47,40,143,13,157,69,150,14,37,158,133,251,93,36,219,210,207,130,118,76,93,217,191,114,126,251,233,200,97,248,105,50,31,106,222,24,144,95,77,146,249,166,218,101,54,219,132,117,135,29,22,142,135,11,178,
@@ -322,77 +343,87 @@ e);this.df.info(d)}a.type!==_.Yc&&this.trigger(new _.F(a.type,{detail:a}))}bf(){
322
343
  21,58,231,13,118,215,58,166,74,44,51,103,50,120,198,197,213,64,34,105,66,115,72,235,88,51,28,238,54,93,147,140,187,28,173,50,109,5,234,155,141,29,52,234,135,38,55,103,111,116,98,171,210,13,211,129,249,70,57,64,155,151,38,8,225,188,229,3,247,234,26,46,91,211,250,252,38,87,111,205,37,108,74,168,112,74,116,191,73,170,243,167,54,36,20,23,72,67,35,181,159,241,102,250,221,22,18,92,161,54,236,172,183,214,18,160,199,92,46,171,180,211,90,64,62,144,121,201,77,74,211,17,244,49,124,244,120,116,148,234,184,79,
323
344
  136,12,176,34,231,39,149,87,28,219,2,3,1,0,1,58,12,99,97,115,116,108,97,98,115,46,99,111,109,64,1,18,128,3,50,97,151,165,120,63,210,172,84,187,10,36,166,202,149,32,118,107,37,251,186,217,170,254,4,95,20,85,66,157,43,154,24,66,136,147,101,223,78,204,173,228,175,111,100,168,97,164,222,84,160,51,79,233,227,223,105,252,85,11,242,129,199,206,11,9,236,118,163,118,204,179,159,69,108,223,229,114,176,8,26,36,9,23,103,233,62,55,162,154,209,96,98,102,80,173,114,233,213,36,56,135,65,188,245,176,95,70,189,199,
324
345
  143,81,72,182,124,207,225,238,28,172,144,110,89,44,12,137,51,52,239,130,117,119,15,207,200,229,142,166,8,80,79,111,255,191,70,47,189,108,75,234,184,241,119,21,255,98,167,124,132,30,239,102,113,7,132,96,39,134,123,220,209,255,110,222,35,147,0,77,125,253,129,139,66,158,126,221,13,117,113,163,143,235,9,130,180,3,133,94,152,45,199,69,168,182,95,122,82,25,203,10,99,191,186,193,238,225,224,140,156,142,171,110,26,214,32,240,6,218,138,10,47,114,133,17,1,151,43,213,223,198,210,186,81,18,50,221,84,177,180,
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,
346
+ 26,58,164,235,113,177,235,207,22,230,8,119,76,167,166,176,173,209,214,53,116,116,231,227,221,238,174,87,249,19,166,195,81,47,210,172,15,75,251,202,192,80,85,213,23,17,178,104,181,193,115,239,91,72,230,167,55,143,10,250,26,54,8,60,13,213,206,235,3,215,179,205,232,1,144,158,35,48,196,149,117,219,63,196,130,117,40,165,193,65,215,122,44,201,218,67,216,6,131,178,5,168,229,21,137,112,215,254,127,48,160,181,68,49,255,64,46,247,236,85,155,146,208,5,219,252,37,174,31,218,136,135,55,119,112]};_.iq=class{constructor(a){this.I=a;this.f={}}La(a,b){this.f[a]=b}};_.z("clpp.drm.DrmEnvironment",_.iq);_.iq.prototype.setDrmSystem=_.iq.prototype.La;_.vk=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.Sf(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.g=b;this.buffer=this.f.buffer}getPosition(){return this.a}Ba(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.ak();this.a=a}};_.gl=class{constructor(a,b){this.f=a;this.g=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Ba(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.dk();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.dk();this.a=a}};
347
+ _.z("clpp.utils.dataview.DataViewReader",_.gl);_.tk=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.R("clpp.mp4")}L(a,b){a=kk(a);this.g[a]=jq;this.f[a]=b;return this}Z(a,b){a=kk(a);this.g[a]=mq;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.J(a);a=new _.gl(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.ck(a)&&!this.a;)this.pd(0,a,b)}pd(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.h.debug("Parsing MP4 box",_.lk(f));switch(e){case 0:e=b.Ba()-d;break;case 1:e=_.hk(b),g=!0}const h=
348
+ this.f[f];if(h){let m=null;var k=null;this.g[f]==mq&&(k=_.P(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Ba()&&(l=b.Ba());l-=b.getPosition();b=0<l?_.jk(b,l):new Uint8Array(0);b=new _.gl(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({parser:this,partialOkay:c||!1,version:m,flags:k,reader:b,size:e,start:d+a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.Ba()-b.getPosition()),b.skip(a)}};_.z("clpp.utils.Mp4Parser",_.tk);_.tk.typeToString=_.lk;
349
+ _.tk.allData=_.ok;_.tk.sampleDescription=_.nk;_.tk.children=_.mk;_.tk.prototype.parseNext=_.tk.prototype.pd;_.tk.prototype.parse=_.tk.prototype.parse;_.tk.prototype.stop=_.tk.prototype.stop;_.tk.prototype.fullBox=_.tk.prototype.Z;_.tk.prototype.box=_.tk.prototype.L;_.tk.headerSize=_.pk;var jq=0,mq=1;var nq=class{};_.z("clpp.utils.FairplayUtils",nq);nq.parseFairPlayResponse=_.yk;nq.formatFairPlayRequest=_.xk;nq.createFairplayPayload=wk;nq.extractContentId=_.sk;nq.extractExtXKeyUri=qk;var Ek=new _.R("clpp.drm.DrmToday"),Ok="PRODUCTION",Pk="STAGING",Qk="TEST",oq={PRODUCTION:Ok,STAGING:Pk,TEST:Qk};_.z("clpp.drm.DrmToday.Environment",oq);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
350
+ var Ak="/license-proxy-widevine/cenc/",Bk="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Ck="/license-server-fairplay/",Rk={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",3E4:"General DRM error",4E4:"General Widevine Modular error",40001:"Widevine Device Certificate Revocation (wv 127)",40002:"Widevine Device Certificate Revocation - Permanently (wv 175)",41E3:"General Widevine Classic error",42E3:"General Playready error",
351
+ 43E3:"General Fairplay error",44E3:"General OMA error",44001:"OMA Device registration failed",45E3:"General CDRM error",45001:"CDRM Device registration failed",6E4:"CSL",60001:"CSL - INVALID",60100:"CSL - Denied by Stream Limiting",7E4:"General Output Protection",70001:"All keys filtered by EOP settings",8E4:"TAKE DOWN",80001:"TAKE DOWN - Denied by Take Down",9E4:"General GBL error",90001:"License delivery prohibited in your region"},pq=[Ca,Ea,Da,_.jb,_.ib],qq=[_.jb,_.ib],rq=["3000","2000","150"],
352
+ sq=["2000","150"];
353
+ for(const a of Object.keys(oq)){let b=ta;a!==Ok&&(b+=`_${a}`);const c=new _.iq(b);let d=null;switch(a){case Ok:d=Zj("V1_PROD");break;case Pk:d=Zj("V2");break;case Qk:d=null}c.La(_.Sc,{licenseUrl:Dk(_.Sc,a),videoRobustness:pq,audioRobustness:qq,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Gk,licenseResponse:_.Hk}});c.La(_.Pc,{licenseUrl:Dk(_.Pc,a),certificateUrl:zk(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Jk,licenseResponse:_.Kk,
354
+ extractContentId:_.Lk,certificateRequest:_.Mk}});c.La(_.Qc,{licenseUrl:Dk(_.Qc,a),videoRobustness:rq,audioRobustness:sq,modifiers:{licenseRequest:Nk}});_.Vj(c)};var tq=class{};_.z("clpp.drm.eme.EmeFactory",tq);var Tk=[];tq.Apis={STANDARD:hb,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var el,uq,dl;_.ml=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];el=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];uq=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};dl=class extends uq{};_.ll=class extends uq{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.g=c;this.l=f}};var Ll=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.tk).Z("pssh",this.j.bind(this)).parse(a.buffer);0==this.a.length&&_.C("No pssh box found!")}j(a){if(1<a.version)_.C("Unrecognized PSSH version found!");else{var b=_.yh(_.jk(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.yh(_.jk(a.reader,16));c.push(f)}}d=_.P(a.reader);a.reader.skip(d);this.g.push.apply(this.g,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});a.reader.getPosition()!=
355
+ a.reader.Ba()&&_.C("Mismatch between box size and data size!")}}};var Hl,vq;
356
+ _.Mm=class{constructor(a){this.D=a;this.J=new Set;this.A=this.G=this.l=null;this.R=!1;this.a=null;this.H=vq;this.w=new _.vp;this.K=new hq;this.f=new Map;this.I=[];this.F=new _.Jl;this.g=null;this.U=b=>{this.o=!0;this.B=!1;this.F.reject(b);a.onError(b)};this.j=new Map;this.W=new Map;this.S=new _.zi(()=>Al(this));this.qa=!1;this.aa=new _.Jl;this.C=!1;this.V=[];this.ba=!1;this.N=0;this.h=new _.R("clpp.drm.DrmEngine");this.Y=(new _.zi(()=>{Bl(this)})).Ya(1);this.F.catch(()=>{});this.o=this.B=!1;this.M=
357
+ null}destroy(){const a=this;return _.x(function*(){a.qa?yield a.aa:(a.qa=!0,yield Cl(a),a.aa.resolve())})}keySystem(){return this.a?_.rl(this.a.keySystem):""}getDrmInfo(){return this.a}na(a){const b=this;return _.x(function*(){if(!b.C||b.H!==Hl){var c=Math.floor(a.timeStamp),d=`drm.msg.${c}.start`,e=`drm.msg.${c}.end`;_.ol(d);!b.g.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.ba?yield Ql(b,a):b.V.push(a);_.ol(e);performance.measure(`drm.sess.msg.${c}`,d,e)}})}fa(a){const b=a.target;this.h.info("Key status changed for session",
358
+ b.sessionId);const c=this.f.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f==_.Je){var g=f;f=e;e=g}if(ql(this.a.keySystem)&&16===f.byteLength&&_.Di()){g=_.bh(f);const k=g.getUint32(0,!0),l=g.getUint16(4,!0),m=g.getUint16(6,!0);g.setUint32(0,k,!1);g.setUint16(4,l,!1);g.setUint16(6,m,!1)}c&&e!==He&&(c.loaded=!0);c&&c.Ca&&c.Ca.resolve();"expired"===e&&(d=!0);f=_.J(f);let h=_.yh(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.Pc)&&16!==f.byteLength&&(h=fh(f));(f=h||"")?this.h.info(`Key status for Key ID '${h}': ${e}`):
359
+ this.h.info(`Key status global keys: ${e}`);this.j.set(f,e);c&&!c.keyId&&this.f.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.Qa.forEach(e=>{this.j.get(e)===He&&(this.h.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.$d))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.j.get(e.keyId)===He&&_.zh(e.initData,c.initData)&&(this.h.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,
360
+ _.$d))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.mb&&(this.h.debug("Session has expired",b.sessionId),(a=this.f.get(b))&&a.jc&&a.jc.stop(),this.f.delete(b),b.close().catch(()=>{}));Zl(this)&&(this.F.resolve(),1!==this.f.size||d?this.S.ca(.5):Al(this))}};Hl=0;vq=3;_.fm=new Map;_.gm=new _.R("clpp.text");var wq=class{constructor(){this.a=null;this.f=[]}};var xq=class{constructor(){this.g=this.f=this.j=null;this.a=[]}};_.yq=class{constructor(){this.f=this.o=this.A=this.C=this.j=this.l=this.g=this.w=NaN;this.a=new wq;this.B=new xq}getStats(){return{width:this.w,height:this.g,streamBandwidth:this.o,decodedFrames:this.j,droppedFrames:this.l,corruptedFrames:this.C,estimatedBandwidth:this.f,loadLatency:this.A,playTime:km(this.a,_.Dm),pauseTime:km(this.a,_.Cm),bufferingTime:km(this.a,_.vm),stateHistory:lm(this.a),switchHistory:mm(this.B)}}};_.zq=class{constructor(a){this.f=a;this.a=void 0}value(){void 0==this.a&&(this.a=this.f());return this.a}};var om=new _.zq(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.Bd],[HTMLMediaElement.HAVE_CURRENT_DATA,_.Ad],[HTMLMediaElement.HAVE_FUTURE_DATA,tc],[HTMLMediaElement.HAVE_ENOUGH_DATA,uc]]));var Bq=class{constructor(a){this.h=new _.R("clpp.StateManager");this.m=a;this.a=new _.vp;this.f=_.Am;this.A=_.Aq;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.l=this.F=!1;this.G=0;this.g=null;this.J=0;this.M=_.Pi();this.C=!1;this.I=Date.now();tm(this)}Qb(a,b){this.m&&this.m.trigger(new _.F(a,{detail:b}))}getState(){return wm(this,"")}U(a){(a=a&&a.detail)&&a.severity&&a.severity===_.G&&rm(this,_.zm)}destroy(){this.h.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.z("clpp.version",_.da);_.z("clpp.name",_.na);_.vj="application/x-mpegurl";_.z("clpp.Type",{DASH:_.$b,HLS:_.vj,SMOOTH_STREAMING:_.ec,MP4:_.ff});_.ng="scte35";_.lg=We;_.z("clpp.TimelineCueType",{SCTE35:_.ng,DASH_CALLBACK:_.Md,UNKNOWN:_.lg});_.z("clpp.utils.media.detectType",Em);var Hm=new _.R("clpp.sources");var Cq=class extends _.gq{constructor(){super(Jc);this.A=this.H=!1;this.l=this.B=this.o=this.a=this.j=null;this.g=new _.vp;this.G=this.F=this.f=this.I=null}init(a,b){super.init(a,b);this.j=new Bq(this);rm(this.j,_.Am)}namespace(){return Jc}unload(){const a=this;return _.x(function*(){if(a.w){a.log.debug(_.fb,a.w);a.F&&(a.F.stop(),a.F=null);const b=a.getTrackManager();b&&b.release();a.B&&(a.B.destroy(),a.B=null);a.K&&(a.K.destroy(),a.K=null);a.l&&a.l.release();a.o&&(a.o.destroy(),a.o=null);_.jg(a.g);
361
+ a.f&&(a.f=new _.yq);a.G=null;a.w=null;a.H=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Jm(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&rm(this.j,_.Am)})}destroy(){if(this.A)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.A=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(va);const a=this.getTrackManager();a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
362
+ b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}detach(){}getTrackManager(){return this.Rb}load(a){const b=this;return _.x(function*(){if(b.A)return Im();if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.C.getMedia();b.I=Date.now()/1E3;b.f=new _.yq;b.g.on(b,_.Ge,()=>{b.f&&_.jm(b.f.a,b.getState())});rm(b.j,_.Bm);b.w=_.Gm(a);_.Ej(a)&&(b.configuration=_.Dj(b.nc,
363
+ a));b.log.debug(_.Ka,b.configuration);b.log.debug(_.Za,b.w);const d=_.im(b.configuration,[_.rd,"native"]);b.K=d.create(b);b.K.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Gj(_.Oe)&&!_.Ri()&&(b.B=new Jp(b),b.B.start(c));b.l?b.l.release():b.l=new wp(b);tg(b.l,c);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.B(b.configuration.volume)||b.setVolume(b.configuration.volume);_.B(b.configuration.muted)||b.setMuted(b.configuration.muted);b.g.one(c,tc,()=>{b.trigger(new _.F(_.bq))});null==
364
+ b.configuration.startTime&&Rm(b,c);try{yield Lm(b,c),yield Nm(b),yield Qm(b).P}catch(e){b.H=!1,b.onError(e)}})}onError(a){this.H||(a.severity===_.G&&null!==this.j&&rm(this.j,_.zm),this.trigger(new _.F(_.ld,{detail:a})))}ef(){return new T}getState(){return null!==this.j?this.j.getState().currentState:_.Aq}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?(this.log.warn("EXT-X-PROGRAM-DATETIME required to get presentation start time as Date!"),
365
+ null):a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.G=a={start:a.start(0),end:a.end(a.length-1)};if(this.G)return this.G}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.nm();this.f&&_.jm(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.w=a.videoWidth;b.g=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,
366
+ b=Number(c.totalVideoFrames),a.l=Number(c.droppedVideoFrames),a.j=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ia())a.bandwidth&&(this.f.o=a.bandwidth),a.Ac&&(this.f.f=a.Ac);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}};
367
+ _.hg(new class{a(){return Jc}canPlay(a,b){a=a.type||"";const c=a===_.$b,d=a===_.ec,e=a===_.vj;var f;_.Oi()||c||d||e&&!_.Pi()?f=0:f=""!==Ci().canPlayType(a)?e&&_.Pi()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}create(){return new Cq}});_.z("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.z("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1});_.z("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var Tm=new _.R("clpp.ads"),Sm=[];_.z("clpp.utils.dom.createHTMLElement",_.$m);var Dq=class{constructor(a){this.a=null;this.g=new Set;this.f=null;this.set(a||null)}set(a){this.g.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=an(this,a)}get(){return this.a}};var Gq=class{constructor(a,b){this.h=new _.R("clpp.PlayerSurface");this.w=_.Gf(Eq,b);this.f=new Dq;this.g=null;this.a=new Dq;this.l=Fq;Fq+=1;this.o=`clpp-video-${this.l}`;this.j=new _.vp;if(null==a)throw new _.H(_.G,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.H(_.G,7,7004,"Media element not found");b=this.w;this.h.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.g=a;else{if(!(a instanceof
368
+ HTMLMediaElement))throw new _.H(_.G,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.h.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.f.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.H(_.G,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Yc);a.parentNode?a.parentNode.replaceChild(c,
369
+ a):this.h.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.Ym(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Le);for(d of[_.tf,_.pd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Fi()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),bn(this.a,"clpp-container"),
370
+ bn(this.a,this.o),bn(this.f,_.Dc),bn(this.f,"clpp-video"));b.webOSStartupPatch&&cn(this,a,d)}}getMedia(){return this.f.get()}getContainer(){return this.a.get()}getSafeContainer(){return this.a}getId(){return this.l}getUniqueCssClass(){return this.o}getCastElement(){return this.g}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.Ym(a,Ec):this.h.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(Ec):
371
+ this.h.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.Ym(a,_.Dc);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)}removeElementFromContainer(a){const b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)}hide(a){_.Ym(a,Ec)}show(a){a.classList.remove(Ec)}release(){this.j.release()}};
372
+ Gq.prototype.removeElementFromContainer=Gq.prototype.removeElementFromContainer;Gq.prototype.addElementToContainer=Gq.prototype.addElementToContainer;Gq.prototype.getCastElement=Gq.prototype.getCastElement;Gq.prototype.getContainer=Gq.prototype.getContainer;Gq.prototype.getMedia=Gq.prototype.getMedia;var Eq={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},Fq=1;var Hq=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.vp;this.g=null;this.f=!0;gn(this)}release(){this.a.release();hn(this);this.m=null}};_.z("clpp.polyfill.installAll",ln);var kn=[];_.z("clpp.polyfill.register",_.mn);var on=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.gh(_.wh(a)));this.a=JSON.parse(_.gh(_.wh(b)));this.j=c}verify(a,b){const c={kty:"RSA",n:a.n,e:a.e},d=this.g+"."+this.f,e=this.j;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.kh(d),n=_.wh(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(mb)}).catch(g)}else b?
373
+ g("Web Crypto API is not supported"):f()})}};var Iq={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},zj="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Fn=class{constructor(a){this.license=a;this.a=null;this.h=new _.R("clpp.utils.LicenseKey")}verify(){return(new Promise((a,b)=>{try{const c=pn(this);a(c)}catch(c){b()}})).then(a=>a.verify(Iq)).catch(a=>{if(a&&a!==mb){{var b=window.location.href;const c=new _.Gg(b);b=c.Va||c.Ga?c:new _.Gg("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Ga))return Promise.resolve()}throw a;})}},An="vod",zn="live";var Q=class extends _.dq{constructor(a,b,c){super();ln();this.h=new _.R("clpp.Player");if(!a)throw new _.H(_.G,7,7102);this.A=new _.vp;this.f=this.N=b||_.Bj();this.l=null;void 0===this.f.license&&(this.f.license=zj,this.h.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.h.error("You provided null or empty string as your license. Please check your license configuration."),new _.H(_.G,7,7101,"No license provided in configuration!");this.g=new Gq(a,c);this.a=this.w=null;
374
+ this.B=new _.Bn;this.j=null;this.J=[];this.K={};this.o=null;this.H=!0;this.I=this.G=!1;this.F=this.lc=null;this.Cd=!1;this.S=new Hq(this);this.M=!1;this.C=d=>{(d=d.detail)&&d.currentState===_.Dm&&(this.off(_.Ge,this.C),Gn(this))};this.on(_.Ge,()=>{this.getState()===_.zm&&this.unload()});this.on(_.Xb,this.R.bind(this));this.on(_.Wb,this.R.bind(this));Hn(this,this.f.license);this.g.getMedia()&&(a=this.g.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.h.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
375
+ void 0===this.f.autoplay&&(this.f.autoplay=!0,this.h.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of Dn)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.h.error("Error while creating player plugin",e)}Jn(this,a);Lj(this)}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,b)}init(){}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.F(_.ld,{detail:a}),this.trigger(a)}Xb(a){a=this.K[a];
376
+ void 0===a&&(a=null);return a}getSurface(){return this.g}getConfiguration(){return _.Hf(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}unload(){return this.a?this.a.unload():Promise.resolve()}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.h.info("Player release already in progress"),this.l;this.h.debug("Releasing player");this.l=Ln(this);return this.l.finally(()=>{this.h.debug("Player released");this.l=null})}destroy(){if(this.G)return this.h.debug("The player is already destroyed. No-op"),
377
+ new Promise(a=>a());this.G=!0;return this.release().then(()=>{this.h.debug(va);this.trigger(new _.F("destroying"));return _.In(this,_.Rd)}).then(()=>{this.a&&this.a.removeDelegate(this);this.Fc.clear();this.S.release();if(this.a)return this.a.destroy()}).then(()=>this.B.destroy()).then(()=>{Oj();this.a=null;this.trigger(new _.F("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.ol(ke),yield _.Rn(b,a),yield _.Sn(b),yield _.Un(b),_.ol(je),performance.measure("player.load",ke,je)}catch(c){if(b.l)throw b.h.info("Load interrupted while a player release is pending"),
378
+ new _.H(_.G,7,7E3);throw c;}})}preload(a){const b=this;return _.x(function*(){yield _.Rn(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.h.warn(ab)}else b.h.warn(Ya)})}use(a){(a=Pj(a))&&a.o(this)}remove(a){return(this.getState()<=_.Am||this.H)&&null!==Jj(a)?(Qj(a),this.I=!0):!1}play(){return this.a?this.j&&this.a.namespace()!==_.Gc?this.j.start(this.a):this.a.play():Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?this.a.pause():
379
+ Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.cq}getState(){return this.a?this.a.getState():_.Am}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&this.a.isEnded()||!1}isPaused(){return this.a&&this.a.isPaused()||!1}getPosition(){return this.a?this.a.getPosition():0}seek(a){return this.getState()===_.zm?Promise.reject("Cannot seek in current state."):
380
+ this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}rc(){const a=this.a;return a&&a.rc?a.rc():null}getVolume(){return this.a?this.a.getVolume():null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.j}namespace(){return this.a&&this.a.namespace()||"Undefined"}canPlay(a,b){return this.a?
381
+ this.a.canPlay(a,b):0}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a){this.a&&this.a.setPlaybackRate(a)}isMuted(){return this.a&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.B}setNetworkEngine(a){this.B=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}fd(){return Object.freeze(this.o)}setSourceIndex(a){this.a&&this.a.setSourceIndex(a)}getSourceIndex(){return this.a?
382
+ this.a.getSourceIndex():-1}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.lc=a;Pn(this)}setCdnErrorCallback(a){this.F=a;this.a&&this.a.setCdnErrorCallback(this.F)}R(){this.Cd=!0}};_.z("clpp.Player",Q);Q.registerPlugin=_.En;Q.prototype.setCdnErrorCallback=Q.prototype.setCdnErrorCallback;Q.prototype.setDrmCustomDataModifier=Q.prototype.setDrmCustomDataModifier;
383
+ Q.prototype.resetAbr=Q.prototype.resetAbr;Q.prototype.getTimelineCues=Q.prototype.getTimelineCues;Q.prototype.getLoadedSource=Q.prototype.getLoadedSource;Q.prototype.getSources=Q.prototype.fd;Q.prototype.getStats=Q.prototype.getStats;Q.prototype.isLive=Q.prototype.isLive;Q.prototype.getTextDisplayer=Q.prototype.getTextDisplayer;Q.prototype.setNetworkEngine=Q.prototype.setNetworkEngine;Q.prototype.getNetworkEngine=Q.prototype.getNetworkEngine;Q.prototype.setMuted=Q.prototype.setMuted;
384
+ Q.prototype.isMuted=Q.prototype.isMuted;Q.prototype.setPlaybackRate=Q.prototype.setPlaybackRate;Q.prototype.getPlaybackRate=Q.prototype.getPlaybackRate;Q.prototype.namespace=Q.prototype.namespace;Q.prototype.getAdsManager=Q.prototype.getAdsManager;Q.prototype.getDuration=Q.prototype.getDuration;Q.prototype.setVolume=Q.prototype.setVolume;Q.prototype.getVolume=Q.prototype.getVolume;Q.prototype.getTimelineOffset=Q.prototype.rc;Q.prototype.getSeekRange=Q.prototype.getSeekRange;
385
+ Q.prototype.getPresentationStartTime=Q.prototype.getPresentationStartTime;Q.prototype.seek=Q.prototype.seek;Q.prototype.getPosition=Q.prototype.getPosition;Q.prototype.isPaused=Q.prototype.isPaused;Q.prototype.isEnded=Q.prototype.isEnded;Q.prototype.getState=Q.prototype.getState;Q.prototype.getBufferInfo=Q.prototype.getBufferInfo;Q.prototype.getTrackManager=Q.prototype.getTrackManager;Q.prototype.pause=Q.prototype.pause;Q.prototype.play=Q.prototype.play;Q.prototype.remove=Q.prototype.remove;
386
+ Q.prototype.use=Q.prototype.use;Q.prototype.load=Q.prototype.load;Q.prototype.destroy=Q.prototype.destroy;Q.prototype.release=Q.prototype.release;Q.prototype.getDrmInfo=Q.prototype.getDrmInfo;Q.prototype.getConfiguration=Q.prototype.getConfiguration;Q.prototype.getSurface=Q.prototype.getSurface;Q.prototype.getPlugin=Q.prototype.Xb;Q.prototype.off=Q.prototype.off;Q.prototype.one=Q.prototype.one;Q.prototype.on=Q.prototype.on;_.Am=0;_.Bm=1;_.vm=2;_.Dm=3;_.Cm=4;_.sm=5;_.zm=6;_.Aq=7;
387
+ _.ym={IDLE:_.Am,PREPARING:_.Bm,BUFFERING:_.vm,PLAYING:_.Dm,PAUSED:_.Cm,ENDED:_.sm,ERROR:_.zm,UNSET:_.Aq};Q.State=_.ym;var Dn=[];var Jq=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,Uc:!0,ready:Promise.resolve()}));this.h=new _.R("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.Uc)}get(){const a=this;return _.x(function*(){const b=a.a.find(c=>c.Uc);if(!b)throw Error("No available players in the pool");b.Uc=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.Uc=!0;b.ready=new Promise(c=>{a.unload().catch(d=>{this.h.error("Failed to unload player",
388
+ d)}).then(c)});return b.ready}destroy(){const a=this;return _.x(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};var Kq=class extends _.dq{constructor(a){super();this.w=_.Gf({transition:_.ae},a);this.f=[];this.a=0;const b=Wn(a.anchorId);this.o=new Jq(b);this.g=null;this.j=!1;this.l=new Map;this.A=a.toggleVisible;this.h=new _.R(Kc);this.o.a.forEach(c=>Xn(this,c.player,!1))}Gc(){return this.g}Yf(){return this.g?this.g.player:null}Le(){return this.l.get(this.a+1)||null}Me(){return this.l.get(this.a-1)||null}ag(){return[this.Me(),this.Le()].filter(Boolean)}Fg(a){if(0<this.f.length)throw Error("Cannot re-set items in the playlist");
389
+ this.h.info("Set items",a);this.f=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve()}))}Eg(a){if(0===this.f.length)throw Error(Ra);if(0>a||a>this.f.length-1)throw Error("Index out of bounds");this.a=a}jd(){return this.a<this.f.length-1}Oe(){return 0<this.a}tg(){const a=this;return _.x(function*(){if(a.j)a.h.warn("Cannot play first item while busy");else if(0===a.f.length)a.h.warn(Ra);else{a.j=!0;a.h.info(`First (index: ${a.a})`);var b=a.f[a.a];try{a.h.info(`First loading (index: ${a.a})`),
390
+ yield Zn(a,b),a.h.info(`First playing (index: ${a.a})`)}catch(c){throw a.h.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,co(a)}}})}ug(){const a=this;return _.x(function*(){if(a.j)a.h.warn("Cannot play next item while busy");else if(a.jd()){a.j=!0;a.a+=1;a.h.info(`Next (index: ${a.a})`);var b=a.g;a.w.transition===_.ae&&b.player.pause();ho(a,a.a+-2);a.l.delete(a.a);var c=a.f[a.a];try{a.h.info(`Next loading (index: ${a.a})`),yield eo(a,c),a.h.info(`Next playing (index: ${a.a})`)}catch(d){throw a.h.error(`Next failed (index: ${a.a})`),
391
+ d;}finally{a.j=!1,b&&go(a,b),co(a)}}else a.h.warn("There are no more items in the playlist")})}vg(){const a=this;return _.x(function*(){if(a.j)a.h.warn("Cannot play previous item while busy");else if(a.Oe()){a.j=!0;--a.a;a.h.info(`Previous (index: ${a.a})`);var b=a.g;a.w.transition===_.ae&&b.player.pause();ho(a,a.a+2);a.l.delete(a.a);var c=a.f[a.a];try{a.h.info(`Previous loading (index: ${a.a})`),yield eo(a,c),a.h.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.h.error(`Previous failed (index: ${a.a})`),
392
+ d;}finally{a.j=!1,b&&go(a,b),co(a)}}else a.h.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.x(function*(){a.h.info("Destroy");yield Promise.all([io(a),a.g?go(a,a.g):Promise.resolve()]);yield jo(a)})}};_.z(Kc,Kq);Kq.prototype.destroy=Kq.prototype.destroy;Kq.prototype.playPrev=Kq.prototype.vg;Kq.prototype.playNext=Kq.prototype.ug;Kq.prototype.playFirst=Kq.prototype.tg;Kq.prototype.hasPrev=Kq.prototype.Oe;Kq.prototype.hasNext=Kq.prototype.jd;
393
+ Kq.prototype.setIndex=Kq.prototype.Eg;Kq.prototype.setItems=Kq.prototype.Fg;Kq.prototype.getPreloading=Kq.prototype.ag;Kq.prototype.getPrev=Kq.prototype.Me;Kq.prototype.getNext=Kq.prototype.Le;Kq.prototype.getCurrentPlayer=Kq.prototype.Yf;Kq.prototype.getCurrent=Kq.prototype.Gc;var fo="preload",Yn="main";var U=class{pb(){}qb(){}vb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}ac(){}Ib(){}getMediaUrl(){}sb(){}rb(){}gb(){}Ta(){}getPodIndex(){}Jb(){}Kb(){}ub(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.z("clpp.ads.IAd",U);U.prototype.getWrapperCreativeIds=U.prototype.getWrapperCreativeIds;U.prototype.getWrapperAdSystems=U.prototype.getWrapperAdSystems;U.prototype.getWrapperAdIds=U.prototype.getWrapperAdIds;
394
+ U.prototype.getSequenceLength=U.prototype.ub;U.prototype.getPositionInSequence=U.prototype.Kb;U.prototype.getPodTimeOffset=U.prototype.Jb;U.prototype.getPodIndex=U.prototype.getPodIndex;U.prototype.getPodType=U.prototype.Ta;U.prototype.getMediaBitrate=U.prototype.gb;U.prototype.getMediaHeight=U.prototype.rb;U.prototype.getMediaWidth=U.prototype.sb;U.prototype.getMediaUrl=U.prototype.getMediaUrl;U.prototype.getClickThroughUrl=U.prototype.Ib;U.prototype.isBumper=U.prototype.ac;
395
+ U.prototype.getSkipTimeOffset=U.prototype.getSkipTimeOffset;U.prototype.getDuration=U.prototype.getDuration;U.prototype.getTitle=U.prototype.getTitle;U.prototype.getAdvertiserName=U.prototype.getAdvertiserName;U.prototype.getAdSystem=U.prototype.getAdSystem;U.prototype.getApiFramework=U.prototype.getApiFramework;U.prototype.getCreativeId=U.prototype.getCreativeId;U.prototype.getId=U.prototype.getId;U.prototype.getTechnology=U.prototype.vb;U.prototype.getAdManagerVersion=U.prototype.qb;
396
+ U.prototype.getAdManagerName=U.prototype.pb;var Lq=class{name(){}da(){}create(){}};_.z("clpp.ads.IAdsManagerFactory",Lq);Lq.prototype.create=Lq.prototype.create;Lq.prototype.isSupported=Lq.prototype.da;Lq.prototype.name=Lq.prototype.name;var Mq=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.z("clpp.ads.IAdsManager",Mq);Mq.prototype.getPosition=Mq.prototype.getPosition;Mq.prototype.setVolume=Mq.prototype.setVolume;Mq.prototype.getVolume=Mq.prototype.getVolume;Mq.prototype.skip=Mq.prototype.skip;Mq.prototype.pause=Mq.prototype.pause;Mq.prototype.resume=Mq.prototype.resume;var Nq=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.x(function*(){})}};Nq.prototype.dispose=Nq.prototype.dispose;Nq.prototype.getPosition=Nq.prototype.getPosition;Nq.prototype.setVolume=Nq.prototype.setVolume;Nq.prototype.getVolume=Nq.prototype.getVolume;Nq.prototype.skip=Nq.prototype.skip;Nq.prototype.pause=Nq.prototype.pause;Nq.prototype.resume=Nq.prototype.resume;
397
+ Nq.prototype.start=Nq.prototype.start;Nq.prototype.load=Nq.prototype.load;var Vm=class{name(){return"clpp.ads.NopAdsManagerFactory"}da(){return!0}create(){return new Nq}};Vm.prototype.create=Vm.prototype.create;Vm.prototype.isSupported=Vm.prototype.da;Vm.prototype.name=Vm.prototype.name;var Oq=class{getCuePoints(){}Lb(){}hb(){}};_.z("clpp.ads.IAdsTimeline",Oq);Oq.prototype.hasPostroll=Oq.prototype.hb;Oq.prototype.hasPreroll=Oq.prototype.Lb;Oq.prototype.getCuePoints=Oq.prototype.getCuePoints;_.Pq=class{f(){}a(){}g(){}o(){}};var Qq=class{constructor(){this.j=null;this.h=new _.R("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}g(a){return this.j?this.j.setMediaKeys(a):Promise.reject(Oa)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.h.debug("Requesting media key system access for",a,b.map(c=>Object.assign({},c,{drmInfos:c.drmInfos.map(()=>"_anonymous_")})));return navigator.requestMediaKeySystemAccess(a,b).catch(c=>{c.message&&(c=Error(`${c.message} (keySystem: ${a})`));return Promise.reject(c)})}f(){return hb}};
398
+ Uk(new class{a(){return hb}da(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Qq}},1E3);var Sq=class{constructor(){this.size=0;this.a=void 0;this.h=new _.R("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Rq.value())}get(a){if(this.has(a))return this.a}has(a){const b=Rq.value();return this.a&&Xg(a,b)?!0:!1}entries(){}keys(){}values(){}},Rq=new _.zq(()=>eh(new Uint8Array([0])));var Tq=class{l(){}g(a){_.dg("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.dg("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};Uk(new class{a(){return"NOP"}da(){return!0}create(){return new Tq}},-1);var Vq=class{constructor(){this.j=this.w=null}l(a){this.w=a}g(a){const b=this.j;b&&b!==a&&lo(b,null);return(this.j=a)?lo(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.dg("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Uq(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Uq=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.Pc))for(var c of b){a:{a=c;if(a.persistentState===_.xe){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
399
+ persistentState:_.Yd,distinctiveIdentifier:_.Yd,initDataTypes:a.initDataTypes,sessionTypes:[Pe],label:a.label};let d=!1,e=!1;if(a.audioCapabilities)for(const f of a.audioCapabilities)f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.audioCapabilities.push(f),e=!0));if(a.videoCapabilities)for(const f of a.videoCapabilities)f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),
400
+ e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.ff));a=e?b:null}if(a){this.a=a;return}}c=Error(wb);c.name=Wa;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Wq(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.dg("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Wq=class{constructor(a){this.f=null;this.g=new WebKitMediaKeys(a);this.a=new _.vp;this.j=0;this.h=new _.R(Ic);this.h.info("Created Media Keys for "+a)}createSession(a){a=
401
+ void 0===a?Pe:a;this.h.debug("Creating Apple MediaKeys Session");if(a!==Pe)throw new TypeError("Session type "+a+ba);return new Xq(this.g,`__session_${this.j++}`)}setServerCertificate(){this.h.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Xq=class extends _.dq{constructor(a,b){super();this.a=null;this.o=a;this.f=this.g=null;this.j=new _.vp;this.sessionId=b;this.expiration=NaN;this.closed=new _.Jl;this.l=!1;this.keyStatuses=new Sq;this.h=new _.R(Ic)}generateRequest(a,
402
+ b){if(this.l)return Promise.reject(kb);this.h.debug("generateRequest");this.g=new _.Jl;try{const c=this.o.createSession(_.ff,_.J(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,rf,d=>{{const e=this.keyStatuses.getStatus();this.h.debug(`Received Key Message in ${this.sessionId}`);this.g&&(this.g.resolve(),this.g=null);d=new _.F(Fd,{messageType:void 0===e||e===He?xd:wd,message:eh(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,pf,d=>{this.h.debug("onWebkitKeyAdded_",
403
+ d);this.f&&(mo(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,qf,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===He)this.h.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.h.error(`Received key error in session ${this.sessionId} `+`with code ${this.a.error.code}. `+`Session Status ${d}.`),d=Error("EME AppleEmeManager key error"),d.errorCode=this.a.error,null!==this.g)this.g.reject(d),
404
+ this.g=null;else if(null!==this.f)this.f.reject(d),this.f=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:mo(this,"output-not-allowed");break;default:mo(this,_.td)}});mo(this,He)}catch(c){this.g.reject(c)}return this.g}load(){this.h.debug("load");return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(kb);this.h.debug(Xe);this.f=new _.Jl;try{this.a.update(_.J(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
405
+ this.h.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.jg(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.h.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}};Uk(new class{a(){return"APPLE"}da(){return!!window.WebKitMediaKeys}create(){return new Vq}},1100);var Zq=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}g(a){_.dg("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(Oa);const b=this.w;b&&b!==a&&po(b,null);(this.w=a)&&po(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.dg("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.j)var c=this.j;else{var d=document.getElementsByTagName(_.w);c=d.length?d[0]:document.createElement(_.w)}const e=
406
+ new Yq(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Yq=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Zd&&(this.a=of,a=!1);let e=!1;for(const g of d){d=[];var f=[];let h=!1;if(g.audioCapabilities)for(const k of g.audioCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType.split(";")[0],this.a)&&(d.push(k),e=!0));if(g.videoCapabilities)for(const k of g.videoCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType,
407
+ this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.ff,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.xe||a||(e=!1);if(e){this.f=g;return}}b=wb;if(c===_.Zd||c===_.Sc)b="None of the requested configurations were supported.";c=Error(b);c.name=Wa;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new $q(this.g,this.a))}getConfiguration(){return this.f}},$q=class{constructor(a,b){this.g=a;this.o=b;this.a=null;this.f=new _.vp;this.j=[];this.l=new Map}createSession(a=
408
+ Pe){if(a!==Pe&&a!==_.ce)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ga,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new ar(this.g,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},ar=class extends _.dq{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.g=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.Jl;this.keyStatuses=
409
+ new Sq}ready(){_.dg("WebkitEmeManager.MediaKeySession.ready");oo(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.dg("WebkitEmeManager.MediaKeySession.generateRequest");return ro(this,b,null)}load(a){_.dg(zb);return this.l===_.ce?ro(this,null,a):Promise.reject(Error(Ua))}update(a){_.dg(zb);const b=new _.Jl;so(this,b,a);return b}close(){_.dg("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.ce){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
410
+ this.closed;const a=qo(this,"cancelKeyRequest");try{this.j[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.dg("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.ce?Promise.reject(Error(Ua)):this.close()}};Uk(new class{a(){return"WEBKIT"}da(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Zq}});var dr=class extends _.iq{constructor(a,b,c,d,e){super(Fa);this.l=a;this.j=b;this.g=c;this.a=d;this.o=e;this.h=new _.R(Hc);_.qh(this.l)?this.h.warn(_.Ab):this.La(_.Sc,{licenseUrl:this.l,videoRobustness:[_.jb,void 0],audioRobustness:[_.ib,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Oc.bind(this)}});_.qh(this.j)?this.h.warn(_.Xa):this.La(_.Qc,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Oc.bind(this)}});
411
+ _.qh(this.g)?this.h.warn(_.Aa):_.qh(this.a)?this.h.warn(_.za):this.La(_.Pc,{licenseUrl:this.g,certificateUrl:this.a,modifiers:{licenseRequest:this.We.bind(this),licenseResponse:this.Xe.bind(this),certificateRequest:this.Oc.bind(this),extractContentId:this.Ge.bind(this)}})}Oc(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Ge(a,b){a=qk(b);switch(this.o){case br:return a;case cr:return(new _.rk(a)).a;default:throw Error("Unknown content ID strategy");}}We(a,b){b.headers[pa]=
412
+ fc;this.Oc(a,b);a={spc:_.uh(b.body)};b.body=_.mh(_.bi(a,!0))}Xe(a,b){a=_.gh(b.data).trim();const c="\x3c/ckc\x3e"===a.substr(-6);"\x3cckc\x3e"===a.substr(0,5)&&c&&(a=a.slice(5,-6));b.data=_.wh(a).buffer}};_.z(Hc,dr);dr.prototype.onFairPlayLicenseResponse=dr.prototype.Xe;dr.prototype.onFairPlayLicenseRequest=dr.prototype.We;dr.prototype.extractFairPlayContentId=dr.prototype.Ge;dr.prototype.onLicenseRequest=dr.prototype.Oc;dr.prototype.constructor=dr.prototype.constructor;dr.NAME=Fa;
413
+ var cr="hostname",br="full-skd";dr.FairPlayContentIdStrategy={HOSTNAME:cr,FULL_SKD:br};_.z("clpp.drm.HeaderDrmComponent",class extends _.Pq{g(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Fa){a=a.drm.customData;if(!a)throw new _.H(_.G,7,7100,_.Tc);a=new dr(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||br);_.Vj(a)}}a(){delete _.Uj.HeaderDrm}id(){return"headerdrm"}});_.mn(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.J(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.mn(function(){_.dg("mathRound.install")});_.mn(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;md in document||(Object.defineProperty(document,md,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
414
+ {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",to);document.addEventListener("webkitfullscreenerror",to);document.addEventListener("mozfullscreenchange",to);document.addEventListener("mozfullscreenerror",to);document.addEventListener("MSFullscreenChange",to);document.addEventListener("MSFullscreenError",to)}});_.mn(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.dg("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=vo,document.exitPictureInPicture=wo,document.addEventListener("webkitpresentationmodechanged",uo,!0))}});_.mn(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=xo)}});_.mn(function(){if(window.VTTCue)_.cg("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.cg(xb),window.VTTCue=yo;else if(6===a)_.cg("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=zo;else{try{var b=!!yo(1,2,"")}catch(c){b=!1}b&&(_.cg(xb),window.VTTCue=yo)}}else _.eg("VTTCue not available.")});var Ao;_.mn(function(){_.dg("InputEvent.install");_.Ei("Trident/")&&HTMLInputElement.prototype.addEventListener!==Bo&&(_.cg("Patching input event support on IE."),Ao=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Bo)});_.mn(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.mn(function(){_.dg("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});var Eo=class{constructor(){this.a=Co()}};var er=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.fr=class{constructor(a,b,c){this.f=a;this.j=b;this.g=c||this.f.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.f.isFullscreen())});this.a.observe(this.g)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var gr;_.hr=class{constructor(){this.a=new Blob([gr],{type:_.ff})}canPlay(a){var b=document.createElement(_.w);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.Jl;b=b.play();const d=(new _.zi(()=>{d.stop();c.resolve(a)})).ca(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===Wa?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
415
+ gr=new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
386
416
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
387
417
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,
388
418
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,
389
419
  0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,
390
420
  0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,
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;
421
+ 116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49]);_.ir=new _.R("clpp.media.TimestampParser");_.Jo={};_.Lo={};var gp=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new Eo}};var Po=window.XMLHttpRequest;var fp=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new er(a);this.length=a;this.A=b;this.f=this.a=this.g=0;this.l=null;this.o=-1;this.w=new Eo}};var Vp=class extends _.Pm{constructor(a){super(new _.Jl,()=>Promise.resolve());this.B=a;this.g=null;this.w=this.P;this.f=-1;this.j=this.l=this.o=null;Zo(this)}then(a,b){this.P=this.P.then(a,b);return this}catch(a){this.P=this.P.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.g.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};_.mr=class{constructor(a){this.a=!1;this.g=a;this.j=this.l.bind(this);this.g.zc(this.j);this.f=null}enabled(){return this.a}Ke(){return this.a&&this.f&&this.f.has(jr)?1E3*this.f.get(jr):null}release(){this.f=null;this.a=!1;this.g.qd(this.j)}l(a){if(this.a){var b=a.headers["cmsd-dynamic"];if(b){try{const d=new Map,e=b.split(";");for(b=0;b<e.length;b++){const {key:f,value:g}=$o(e[b]);Object.values(kr).includes(f)&&d.set(f,g)}var c=d}catch(d){lr.error("CmsdManager parseCmsdDynamicHeader_ failed:",d),
422
+ c=null}this.f=c}}return a}};_.mr.prototype.getEstimatedThroughput=_.mr.prototype.Ke;var jr="etp",kr={Sg:jr},lr=new _.R("clpp.net.CmsdManager");var ep=window.fetch,bp=window.AbortController,ap=window.Headers;_.jp={};_.or=class{constructor(a){a=a.getConfiguration();a=_.Hf(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Je?a.backgroundColor:null;this.S=typeof a.windowColor===_.Je?a.windowColor:null;this.N=typeof a.fontColor===_.Je?a.fontColor:null;this.R=typeof a.fontFamily===_.Je?a.fontFamily:null;this.I=typeof a.fontSize===_.Je?a.fontSize:null;this.C=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Je?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
423
+ _.Je&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.g()}getWindowColor(){return this.S}setWindowColor(a){this.S=a;this.g()}getFontFamily(){return this.R}setFontFamily(a){this.R=a;this.g()}getFontColor(){return this.N}setFontColor(a){this.N=a;this.g()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.g()}getFontSizePercent(){return null===this.C?nr:this.C}setFontSizePercent(a){this.C=a;this.g()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
424
+ a;this.g()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.g()}};_.or.prototype.setEdgeType=_.or.prototype.setEdgeType;_.or.prototype.getEdgeType=_.or.prototype.getEdgeType;_.or.prototype.setEdgeColor=_.or.prototype.setEdgeColor;_.or.prototype.getEdgeColor=_.or.prototype.getEdgeColor;_.or.prototype.setFontSizePercent=_.or.prototype.setFontSizePercent;_.or.prototype.getFontSizePercent=_.or.prototype.getFontSizePercent;_.or.prototype.setFontSize=_.or.prototype.setFontSize;
425
+ _.or.prototype.getFontSize=_.or.prototype.getFontSize;_.or.prototype.setFontColor=_.or.prototype.setFontColor;_.or.prototype.getFontColor=_.or.prototype.getFontColor;_.or.prototype.setFontFamily=_.or.prototype.setFontFamily;_.or.prototype.getFontFamily=_.or.prototype.getFontFamily;_.or.prototype.setWindowColor=_.or.prototype.setWindowColor;_.or.prototype.getWindowColor=_.or.prototype.getWindowColor;_.or.prototype.setBackgroundColor=_.or.prototype.setBackgroundColor;
426
+ _.or.prototype.getBackgroundColor=_.or.prototype.getBackgroundColor;var nr=1/15;var lp="raised",mp="depressed",op="dropshadow",np="uniform";_.z("clpp.text.EdgeType",{NONE:_.Nd,RAISED:lp,DEPRESSED:mp,DROP_SHADOW:op,UNIFORM:np});_.jp[ac]=class{constructor(a){this.f=a;this.a=null;this.h=new _.R("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.jp[_.bc]||null;c?(b=new c(this.f),b.parseInit(a)):this.h.warn("The clpp.ttml.Mp4TtmlParser class is not available. Please register the ttml component first.")}catch(c){b=null}if(b)this.a=b;else{try{const c=_.jp[_.cc]||null;c?(b=new c(this.f),b.parseInit(a)):this.h.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=
427
+ null}if(b)this.a=b;else throw new _.H(_.G,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.H(_.G,2,2011);return this.a.parseMedia(a,b)}};var pr;
428
+ _.qr=class extends _.or{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${pr++}`;this.j=document.createElement(_.Le);this.l=this.A=!1;_.Ym(this.o,this.f);document.head.appendChild(this.j);this.g()}append(){}remove(){return!0}isTextVisible(){return this.A}setTextVisibility(a){this.A=a}g(){if(!this.l){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.pp(this)},b=
429
+ Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.j.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.o.classList.remove(this.f);document.head.removeChild(this.j);this.l=!0;return Promise.resolve()}};pr=0;_.hm("native",new class{da(){return!0}create(a){return new _.qr(a)}});_.rr=class{onContentWillLoad(){return Promise.resolve()}onContentLoaded(){return Promise.resolve()}onPlayerWillDestroy(){}onPlayerWillRelease(){}};};f.call(g,window);g.clpp._ = _;delete window.clpp; export let clpp = g.clpp; export default clpp;