@castlabs/prestoplay 6.2.7 → 6.2.8

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 (58) hide show
  1. package/CHANGELOG.md +31 -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 +101 -101
  6. package/cjs/cl.conviva.js +31 -31
  7. package/cjs/cl.core.js +367 -366
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +68 -67
  10. package/cjs/cl.externs.js +30 -30
  11. package/cjs/cl.freewheel.js +23 -23
  12. package/cjs/cl.hls.js +44 -43
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -29
  15. package/cjs/cl.ima.js +21 -21
  16. package/cjs/cl.mse.js +249 -249
  17. package/cjs/cl.muxdata.js +11 -11
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +13 -13
  20. package/cjs/cl.playlist.js +5 -5
  21. package/cjs/cl.smooth.js +68 -68
  22. package/cjs/cl.thumbnails.js +22 -22
  23. package/cjs/cl.tizen.js +68 -68
  24. package/cjs/cl.ttml.js +26 -26
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +11 -11
  27. package/cjs/cl.vr.js +18 -18
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.youbora.js +15 -15
  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 +81 -81
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +326 -323
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +64 -62
  38. package/cl.externs.js +30 -30
  39. package/cl.freewheel.js +17 -17
  40. package/cl.hls.js +37 -36
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +24 -24
  43. package/cl.ima.js +14 -14
  44. package/cl.mse.js +218 -218
  45. package/cl.muxdata.js +9 -9
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +9 -9
  48. package/cl.playlist.js +4 -4
  49. package/cl.smooth.js +57 -57
  50. package/cl.thumbnails.js +17 -17
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +21 -21
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +14 -14
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +13 -13
  58. package/package.json +1 -1
package/cl.core.js CHANGED
@@ -1,225 +1,228 @@
1
- let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ma,oa,qa,ra,sa,va,za,Aa,Ba,Ca,Da,Ea,Ka,La,Ma,Na,Oa,Pa,Wa,bb,db,eb,gb,ib,jb,lb,Qb,bc,cc,lc,mc,oc,qc,rc,sc,Ac,Gc,Jc,Kc,Lc,Pc,Xc,Zc,$c,ed,hd,yd,Id,Qd,Sd,$d,ce,je,qe,Fe,Je,Ke,Le,Me,Ne,Pe,Qe,Re,Se,Te,Ue,Xe,Ye,cf,$e,jf,kf,of,qf,Cf,Mf,Nf,Gf,Jf,Of,Pf,Sf,Vf,Xf,Zf,Yf,$f,ag,bg,eg,fg,ug,yg,zg,Ag,Bg,Kg,Lg,Mg,Ng,Sg,Og,Tg,Ug,Xg,Yg,Zg,$g,ah,bh,eh,fh,gh,jh,lh,nh,kh,hh,oh,sh,xh,zh,wh,Jh,Ch,Bh,Vh,Xh,di,ni,oi,pi,vi,wi,Hi,Ii,Mi,Ti,bj,Pi,Xi,gj,ij,jj,kj,qj,tj,uj,wj,vj,rj,xj,yj,zj,Aj,Bj,Cj,Ij,Nj,Pj,
2
- Rj,Qj,Kj,Lj,Xj,Wj,Oj,Yj,Zj,gk,hk,ik,lk,sk,tk,vk,nk,mk,Dk,Ek,Ik,Hk,Kk,Mk,Nk,Jk,Pk,Uk,al,Zk,$k,fl,gl,el,hl,dl,bl,jl,ll,nl,ol,pl,ql,rl,sl,tl,ul,vl,wl,Al,El,Fl,Hl,Jl,Ml,Nl,Ol,Rl,Tl,Ul,Xl,Vl,Wl,Yl,Zl,$l,am,bm,cm,dm,em,fm,gm,im,jm,km,mm,pm,um,vm,wm,ym,zm,Am,Cm,Dm,Bm,Em,Hm,Gm,Fm,Lm,Km,Qm,Ve,We;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="6.2.7";_.ea="AdaptationSet";_.fa="Already destroyed. No-op";_.ha="Already released. No-op";_.ia="Autoplay is not allowed due to browser policy.";
3
- _.ja="CODECS";_.ka="Cannot retrieve buffer information due to platform limitations";_.la="CastlabsPlayer";ma="Content-Length";oa="Content-Type";_.pa="Could not find configured DRM environment.";qa="DRM licenses loaded";ra="DRMtoday";sa="Destroying player";_.ua="Disable track type ";va="Error while decoding string!";_.wa="Error while fetching license!";_.xa="FairPlay Certificate URL is not defined";_.ya="FairPlay License URL is not defined";za="HW_SECURE_CRYPTO";Aa="HW_SECURE_DECODE";Ba="HeaderDrm";
4
- Ca="Ignoring duplicate init data.";Da="InvalidStateError";Ea="License verification failed: ";_.Fa="Loading player with configuration";_.Ha="MaxHeight";_.Ja="MaxWidth";Ka="Missing media element";La="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Ma="No event provided!";Na="No track data attached to the event, unable to add track!";Oa="Not a persistent session.";Pa="NotSupportedError";_.Qa="PlayReady License URL is not defined";_.Ra="Player sources";
5
- _.Sa="Please make sure ";_.Ta="QualityLevel";_.Ua="Releasing player with source";_.Va="Representation";Wa="STANDARD";_.Xa="SW_SECURE_CRYPTO";_.Ya="SW_SECURE_DECODE";bb="Signature Verification failed";_.cb="SmoothStreamingMedia";db="The index is not in the allowed range.";eb="Unable to translate ";_.fb="Unregistering listeners";gb="Unsupported keySystem";ib="Using VTTCue polyfill from 3 argument TextTrackCue.";jb="WebkitEmeManager.MediaKeySession.load";_.kb="Widevine License URL is not defined";
6
- lb="Will create EME Manager: ";_.mb="ad-break-started";_.nb="ad-break-stopped";_.ob="ad-buffering";_.pb="ad-clicked";_.qb="ad-completed";_.rb="ad-first-quartile";_.sb="ad-impression";_.tb="ad-loaded";_.ub="ad-midpoint";_.vb="ad-paused";_.wb="ad-progress";_.xb="ad-resumed";_.yb="ad-skipped";_.zb="ad-started";_.Ab="ad-stopped";_.Bb="ad-third-quartile";_.Cb="addtrack";_.Db="ads-timeline-changed";_.Eb="airplay-casting-ended";_.Fb="airplay-casting-started";_.Gb="airplay-status-changed";_.Hb="application/cea-608";
7
- _.Ib="application/dash+xml";_.Kb="application/mp4";_.Lb='application/mp4; codecs\x3d"stpp"';_.Mb='application/mp4; codecs\x3d"wvtt"';_.Nb="application/ttml+xml";_.Ob="application/vnd.ms-sstr+xml";_.Pb="application/x-mpegurl";Qb="application/x-www-form-urlencoded";_.Rb="audio";_.Sb="audio/aac";_.Tb="audio/ac3";_.Ub="audio/eac3";_.Vb="audio/mp4";_.Wb="audiobufferchanged";_.Xb="autoplaynotallowed";_.Yb="bitratechanged";_.Zb="boolean";_.$b="bufferingended";_.ac="bufferingstarted";bc="canplay";cc="canplaythrough";
8
- _.gc="castingstarted";_.hc="caststatuschanged";_.ic="cdn-switch-success";_.jc="cenc";_.kc="center";lc="change";mc="clpp-container";_.nc="clpp-fill";oc="clpp-hidden";_.pc="clpp.cast.CastSender";qc="clpp.drm.HeaderDrm";rc="clpp.native.Player";sc="clpp.utils.Platform";_.tc="codecs";_.uc="column-reverse";_.vc="com.adobe.primetime";_.wc="com.apple.fps";_.xc="com.microsoft.playready";_.yc="com.widevine.alpha";_.zc="config.drm.customData is not defined";Ac="controls";_.Bc="cuechange";_.Cc="destroy()";
9
- _.Dc="disabled";_.Ec="div";_.Fc="drmexpirationupdate";Gc="drmrenewalstarted";_.Hc="drmsessionpersisted";_.Ic="drmsessionupdate";Jc="drmtoday";Kc="durationchange";Lc="encrypted";_.Mc="end";_.Nc="ended";_.Oc="error";Pc="fullscreenElement";_.Qc="function";_.Rc="height";_.Sc="hidden";_.Tc="image";_.Uc="internal-error";Xc="keystatuseschange";_.Yc="left";Zc="license-renewal";$c="license-request";_.ad="line-left";_.bd="line-right";_.cd="loadeddata";_.dd="loadedmetadata";ed="loadstart";_.fd="mdat";_.gd="mdia";
10
- hd="message";_.id="metadata";_.jd="mimeType";_.kd="minf";_.ld="moov";_.md="mp4";_.nd="mpd-type-changed";_.od="mpeg-dash-callback-event";_.pd="native";_.qd="none";_.p="number";_.rd="object";_.sd="onBitrateChanged()";_.td="onContentLoaded";_.ud="onPlayerError()";_.vd="onPlayerWillDestroy";_.wd="onPlayerWillRelease";_.xd="onStateChanged()";yd="online-status-changed";_.zd="optional";_.Bd="org.w3.clearkey";_.Cd="output-restricted";_.Dd="pause";_.Gd="persistent";_.Hd="persistent-license";Id="picture-in-picture";
11
- _.Jd="play";_.Kd="playing";_.Ld="playlist-item-changed";_.Md="playlist-modified";_.Nd="progress";_.Od="px";_.Pd="ratechange";Qd="released";_.Rd="releasing";Sd="removetrack";_.Td="required";_.Ud="resize";_.Vd="right";_.Wd="seeked";_.Xd="seeking";_.Yd="showing";_.Zd="single-native";$d="stalled";_.ae="start";_.be="statechanged";ce="status-pending";_.de="stbl";_.ee="string";_.fe="stsd";_.ge="style";_.he="subtitles-htmlcue";_.ie="subtitles-ttml";je="temporary";_.r="text";_.ke="text/vtt";_.le="text/xml";
12
- _.me="timeupdate";_.ne="trak";_.oe="ttml-xml";_.pe="und";qe="unknown";_.re="urn:scte:scte35";_.se="urn:scte:scte35:2014";_.te="user-seeked";_.ue="user-seeking";_.ve="value";_.xe="vertical-lr";_.ze="vertical-rl";_.u="video";_.Ae="video/mp2t";_.Be="video/mp4";_.Ce="videobufferchanged";_.De="videotrackchanged";_.Ee="vimond-response";Fe="visibilitychange";_.Ge="vtt-xml";_.He="waiting";_.Ie="waitingforkey";Je="webkit-org.w3.clearkey";Ke="webkitkeyadded";Le="webkitkeyerror";Me="webkitkeymessage";Ne="webkitneedkey";
13
- _.Oe="width";Pe="x-dt-csl-tracking-token";Qe="x-dt-follow-up-token";Re="x-dt-resp-code";Te=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Ue=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Te(a)}};Xe=function(a,b){if(b){var c=Ve;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&&We(c,a,{configurable:!0,writable:!0,value:b})}};
14
- Ye=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())})};_.v=function(a){return Ye(a())};_.x=function(a,b){a=a.split(".");var c=Ze;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};
15
- _.bf=function(a){return _.y(a)||$e(a)?a:_.af(a)};_.af=function(a){let b={};for(let c=0;c<arguments.length;c++)null!==arguments[c]&&void 0!==arguments[c]&&(b=cf(b,{merging:arguments[c]}));return b.merging};
16
- cf=function(a,b,c){const d=c+1||1;if(_.y(a)||!_.df(a))a={};for(const e in b)c=b[e],$e(c)||_.y(c)||_.ef(c)?a[e]=c:_.df(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.ef(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=cf([],c):!_.y(c)&&!_.y(c)&&_.df(c)&&c.constructor===Object&&20>d&&(a[e]=cf(a[e],c,d));return a};$e=function(a){a=typeof a;return a===_.ee||a===_.p||a===_.Zb};_.y=function(a){return null===a||"undefined"===typeof a};_.df=function(a){return typeof a===_.rd};
17
- _.ef=function(a){return typeof a===_.Qc};_.ff=function(a){return typeof a===_.ee};_.gf=function(a){return typeof a===_.p};
18
- _.hf=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||!_.df(a)||!_.df(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.y(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.y(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.y(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
19
- jf=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};kf=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.lf=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};of=function(a){return a&&0<=mf[a]?mf[a]:nf};qf=function(a){if(!a)return _.z("clpp.log",eb+a+ca),-1;const b=pf[a.toUpperCase()];return void 0===b?(_.z("clpp.log",eb+a+ca),-1):b};_.tf=function(a){sf.info.apply(sf,arguments)};_.D=function(a){sf.debug.apply(sf,arguments)};
20
- _.z=function(a){sf.warn.apply(sf,arguments)};_.uf=function(a){sf.error.apply(sf,arguments)};_.Bf=function(a){if(a){var b=a.a();b in _.zf?_.Af.warn("Player-Factory '"+b+"' already registered"):(_.zf[b]=a,_.Af.info("Registered Player-Factory: '"+b+"'"))}};_.Df=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)Cf(b[c]);a.a.clear()};_.Ef=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
- Cf=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
22
- Mf=function(a,b){a.o.debug("onMetadata_()");b.mode=_.Sc;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:_.Ff,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(Gf(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
23
- _.se;g.type=_.Hf;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.l.trigger(new _.F(_.If,{detail:f}));Array.prototype.push.apply(a.g,c);Jf(a,c,b);a.f.off(b,_.Bc);a.f.on(b,_.Bc,f=>{f=f.target.activeCues;f=f.length?Gf(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(_.Kf,{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(_.Lf,{detail:f})))}})}};
24
- Nf=function(a,b){a.h=b;a.j=a.h.textTracks;a.f.on(a.j,_.Cb,c=>{c=c.track;c.kind===_.id&&Mf(a,c)})};Gf=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};Jf=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
- Of=function(a,b){b=b.track;b.kind!==_.id&&(b.mode===_.Yd&&(b.mode=_.Sc),a.a.on(b,_.Bc,c=>{c=c.target||c.srcElement;c.mode=_.Sc;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.j.append(c,[]))}))};Pf=function(a,b,c,d){a=`${a===_.G?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.ff(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};
26
- _.Qf=function(a){return a&&a!==_.pe?a:null};Sf=function(a){if(!a)throw new _.H(_.G,3,3101,`Invalid track type: ${a}`);if(!_.ff(a))throw new _.H(_.G,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.I:return _.I;case _.J:return _.J;case _.K:return _.K;case Rf:return Rf}throw new _.H(_.G,3,3101,`Unknown track type: ${a}.`);};
27
- Vf=function(a,b){a=Sf(a);const c=_.Qf(b.kind);let d=b.id;d||(d=String(_.Tf++));a=new _.Uf(d,c===_.id?Rf:a);a.kind=c;a.label=_.Qf(b.label);a.language=_.Qf(b.language);return a};_.Wf=function(a,b){for(const c of a)if(!b(c))return!1;return!0};Xf=function*(a){for(let b=0;b<a;b++)yield b};
28
- Zf=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Yf(a)==Yf(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;const c=_.L(a);b=_.L(b);for(const d of Xf(a.byteLength))if(c[d]!=b[d])return!1;return!0};Yf=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.L=function(a,b=0,c=Infinity){return $f(a,b,c,Uint8Array)};
29
- $f=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=Yf(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)};ag=function(a,b=0,c=Infinity){return $f(a,b,c,Uint16Array)};bg=function(a,b=0,c=Infinity){return $f(a,b,c,Uint32Array)};_.cg=function(a,b=0,c=Infinity){return $f(a,b,c,Int32Array)};_.dg=function(a,b=0,c=Infinity){return $f(a,b,c,DataView)};
30
- eg=function(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};fg=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};
31
- _.gg=function(a){if(!a)return"";a=_.L(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(va);return a}a=escape(fg(a));try{return decodeURIComponent(a)}catch(b){throw Error(va);}};
32
- _.ig=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw hg.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.L(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(_.L(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 fg(c)};
33
- _.jg=function(a,b){if(_.ff(a))return a;let c="";b=!!b;const d=_.L(a);239==d[0]&&187==d[1]&&191==d[2]?c=_.gg(d):254==d[0]&&255==d[1]?c=_.ig(d.subarray(2),!1):255==d[0]&&254==d[1]&&(c=_.ig(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);hg.debug("Unable to find byte-order-mark, making an educated guess.");0==d[0]&&0==d[2]?c=_.ig(a,!1):0==d[1]&&0==d[3]?c=_.ig(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.gg(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
34
- };_.kg=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};_.lg=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};
35
- _.mg=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=bg(d):2===c?e=ag(d):e=_.L(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.ng=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.og=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};_.pg=function(a){return!!(a&&0<a.length)};_.qg=function(a){return!a||0===a.length};
36
- _.sg=function(a){a=a.replace(/<[^>]+>/gi,"");rg.innerHTML=a;a=rg.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.tg=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};ug=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts};
37
- _.wg=function(a,b){_.ff(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.vg,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||
38
- [],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};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&ug(c,b);return c};
39
- _.xg=function(a,b,c,d,e,f,g){e&&(d=e);e={uri:d,data:b||new ArrayBuffer(0),headers:a,status:c,fromCache:!!a["x-shaka-from-cache"],timeMs:g,request:f};if(200<=c&&299>=c&&202!==c)return e;g=null;try{g=_.jg(b,!0)}catch(h){}_.D("HTTP error text:",g);throw new _.H(401===c||403===c?_.G:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};yg=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};
40
- zg=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};Ag=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()};Bg=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};
41
- _.Dg=function(a,b,c){for(const d of _.Cg)if(d.probe(b,c))return d.create(a);return null};_.Eg=function(a){a=_.Cg.indexOf(a);0<=a&&_.Cg.splice(a,1)};_.Gg=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Fg.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Hg=function(a,b){a=_.Gg(a);b=_.Gg(b);return a.split("-")[0]==b.split("-")[0]};_.Ig=function(a,b){b&&(a+='; codecs\x3d"'+b+'"');return a};_.Jg=function(a){return Array.isArray(a)?a:[a]};
42
- Kg=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.hf(a,{kind:_.Qf(b.kind),language:_.Qf(b.language),label:_.Qf(b.label)},["kind","language","label"])};Lg=function(a){return a.enabled||a.selected||a.mode===_.Yd||a.mode===_.Sc};Mg=function(a,b){return a.h.filter(c=>c.type===b)};Ng=function(a){(a=a.l.getTextDisplayer())&&a.remove(0,Infinity)};Sg=function(a,b){if(a=Og(a,b))a=Array.from(a),b===_.I&&(a=a.filter(c=>c.kind!==_.id));return a};
43
- Og=function(a,b){if(!a.l)return null;a=a.l.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.J:return a.audioTracks;case _.K:return a.videoTracks;case _.I:return a.textTracks;default:return null}};Tg=function(a,b){return(a=a.f.get(b)||null)&&a.renditions[0]};Ug=function(a,b){return(a=a.m.get(b))&&a.renditions[0]};
44
- Xg=function(a,b,c){const d=Sg(a,b);if(c){if(void 0===a.h.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.a.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.m.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.I:f="mode";e=_.Yd;g=_.Dc;break;case _.J:f="enabled";break;case _.K:f="selected"}if(f)for(const h of d)h[f]=Kg(c,h,c.type)?e:g}}else if(a.a.debug(_.ua+b),a.f.get(b)&&d&&b===_.I){for(e of d)e.mode=
45
- _.Dc;a.f.set(b,null)}b===_.J?a.l.trigger(new _.F(_.Vg)):b===_.I&&a.l.trigger(new _.F(_.Wg))};Yg=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=_.qg(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.H.push(e)}}};
46
- Zg=function(a,b){return _.v(function*(){var c=a.l.getConfiguration(),d=_.Dg(c,b.mimeType,_.ke);if(d){c=_.wg(b.url);var e=yield a.l.getNetworkEngine().fetch(c).O;e&&e.data&&(c="External_"+`${a.D++}`,a.o[c]=b,d=d.a(_.L(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.ke},Yg(a,d,c))}else a.a.warn("Track mimetype is not supported",b)})};
47
- $g=function(a,b,c){c=_.Jg(c).filter(e=>e);a.a.info("Find preferred tracks for",b,c);const d=Mg(a,b);c.some(e=>{const f=_.Gg(e);return(e=d.find(g=>{g=_.Gg(g.language||"");return _.Hg(f,g)}))?(a.a.info("Will select track with id",e.id),Xg(a,b,e),!0):!1})};ah=function(a,b,c){try{const d=a(b);if(d&&d.O&&d.abort)return c.resolve(d.O),()=>d.abort();c.resolve(d);return()=>Promise.resolve(d).then(()=>{}).catch(()=>{})}catch(d){return c.reject(d),()=>Promise.resolve()}};
48
- bh=function(a,b){a.O.then(()=>b(!0),()=>b(!1));return a};_.ch=function(a,b){a.a.push(bh(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};_.dh=function(a){var b;a instanceof _.dh?(eh(this,a.La),this.$b=a.$b,this.Da=a.Da,fh(this,a.mc),this.ma=a.ma,gh(this,hh(a.a)),this.Ob=a.Ob):a&&(b=String(a).match(ih))?(eh(this,b[1]||"",!0),this.$b=jh(b[2]||""),this.Da=jh(b[3]||"",!0),fh(this,b[4]),this.ma=jh(b[5]||"",!0),gh(this,b[6]||"",!0),this.Ob=jh(b[7]||"")):this.a=new kh(null)};
49
- eh=function(a,b,c){a.La=c?jh(b,!0):b;a.La&&(a.La=a.La.replace(/:$/,""))};fh=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.mc=b}else a.mc=null};gh=function(a,b,c){b instanceof kh?a.a=b:(c||(b=lh(b,mh)),a.a=new kh(b))};jh=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};lh=function(a,b,c){return typeof a===_.ee?(a=encodeURI(a).replace(b,nh),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};
50
- nh=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};kh=function(a){this.f=a||null};hh=function(a){var b=new kh;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};oh=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.v(function*(){if(!navigator.onLine)return!1;if(b){const e=_.wg(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).O}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
51
- sh=function(){if(ph)return ph;qh||(qh=new _.rh(()=>{ph=null}));(ph=document.querySelector(_.u)||document.querySelector(_.Rb))||(ph=document.createElement(_.u));qh.$(1);return ph};_.th=function(){return!!navigator.userAgent.match(/Edge?\//)};_.uh=function(a){return(navigator.userAgent||"").includes(a)};_.vh=function(a){return _.uh("Tizen"+(a?" "+String(a):""))};
52
- xh=function(a){const b={major:-1,name:qe};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=wh(a,c[0]));2<=c.length&&(b.minor=wh(a,c[1]));3<=c.length&&(b.patch=wh(a,c[2]));4<=c.length&&(b.build=wh(a,c[3]));return b};_.yh=function(){return _.uh("Web0S")};_.Ah=function(){return _.yh()&&79===zh().major};
53
- zh=function(){const a=Bh();const b="ie edge opera firefox safari chrome".split(" ");var c=Ch();const d=Dh[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return xh(c[1]);return xh("")};_.Eh=function(){return _.uh("CrKey")};_.Fh=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.vh()};_.Gh=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Fh()&&1<navigator.maxTouchPoints};_.Hh=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
54
- wh=function(a,b){try{return parseInt(b,10)}catch(c){Ih.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};Jh=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};
55
- Ch=function(){const a=Bh();if(!a)return Kh;var b=a.match(/^.+?(?=\))/);if(!b)return Kh;b=b[0];if(Jh(b,["iphone","ipad"]))return Lh;if(Jh(b,["android"]))return Mh;if(Jh(b,["macintosh"]))return Nh;if(Jh(b,["windows nt"]))return Oh;if(Jh(b,["tizen"]))return Ph;if(Jh(b,["web0s"]))return Qh;if(Jh(b,["linux"]))return Rh;Ih.warn("Unable to identify OS from user agent: "+a);return Kh};Bh=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
56
- _.Th=function(){var a=Ch();var b=Ch();var c=Dh[b];if(c){c=Bh().match(c.os_version)[1];c=xh(c);if(b===Oh)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=xh("");a:{c=Bh();const e="ie edge opera firefox safari chrome".split(" ");var d=Ch();d=Dh[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=Sh}return{os:a,osVersion:b,browser:c,browserVersion:zh()}};
57
- _.Wh=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Gh()&&(a=360);const b=_.tg();b.maxAttempts=3;a={source:"",license:Uh,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.tg(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,
58
- restrictions:Vh(a)},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:"",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,
59
- gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!0,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1},restrictions:Vh(),tizen:{sideStreamText:_.vh(2)}};if(_.uh("Edge/")||
60
- _.vh())a.streaming.gapDetectionThreshold=.5;_.yh()&&(a.streaming.stallEnabled=!1);_.Ah()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.vh()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70};return a};
61
- Vh=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}};
62
- _.Yh=function(...a){if(!a)return _.Wh();var b=[_.Wh()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.ff(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:{Rf:{clockSyncUri:"//time.akamai.com"}}}),c=!0),b.push(d));a=_.af.apply(null,b);_.ff(a.volume)&&(""===""+a.volume?a.volume=
63
- null:a.volume=Number(a.volume));if(!_.y(a.volume)&&(!_.gf(a.volume)||jf(a.volume)))throw new _.H(_.G,7,7100,"config.volume is not a number");if(!_.y(a.preferredTextLanguage)&&!_.ff(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.G,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.y(a.preferredAudioLanguage)&&!_.ff(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.G,7,7100,"config.preferredAudioLanguage is not a string or an array");
64
- if(!_.y(a.preferredAudioCodec)&&!_.ff(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.G,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.y(a.preferredVideoCodec)&&!_.ff(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.G,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.y(a.drm)){if(a.drm.env&&!_.ff(a.drm.env))throw new _.H(_.G,7,7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.ff(a.drm.offlineId))throw new _.H(_.G,
65
- 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(!_.gf(b.bufferingGoal)||jf(b.bufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.gf(b.rebufferingGoal)||jf(b.rebufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal is not a number");
66
- if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.gf(b.bufferBehind)||jf(b.bufferBehind))throw new _.H(_.G,7,7100,"config.streaming.bufferBehind is not a number");if(!_.gf(b.smallGapLimit)||jf(b.smallGapLimit))throw new _.H(_.G,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.gf(b.durationBackoff)||jf(b.durationBackoff))throw new _.H(_.G,7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;
67
- if(_.y(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.p)throw new _.H(_.G,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Xh(a.restrictions);Xh(a.abr.restrictions);a.abr.initialRestrictions&&Xh(a.abr.initialRestrictions)}return a};
68
- Xh=function(a){_.y(a.maxPixels)&&(a.maxPixels=Infinity);_.y(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.y(a.maxHeight)&&(a.maxHeight=Infinity);_.y(a.maxWidth)&&(a.maxWidth=Infinity);_.y(a.minPixels)&&(a.minPixels=0);_.y(a.minBandwidth)&&(a.minBandwidth=0);_.y(a.minHeight)&&(a.minHeight=0);_.y(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);
69
- 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");};_.Zh=function(a){return typeof a===_.rd&&!Array.isArray(a)&&"source"in a};_.ai=function(a){return _.$h.get(a)||null};
70
- _.ci=function(a){_.$h.get(a.id())?bi.warn("Component already in use."):_.$h.set(a.id(),a)};di=function(a){for(const b of _.$h.values())a(b)};_.fi=function(a,b){b=void 0==b?!0:b;a=_.ei(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.ei=function(a){a=fg(_.L(a));return btoa(a)};_.ii=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};
71
- _.ji=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};_.ki=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};_.li=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};
72
- _.mi=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};ni=function(a){return _.ng(a,_.wc)||_.ng(a,_.xc)};oi=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Pe]=a.f),a.a&&(b.headers[Qe]=a.a))};
73
- pi=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Pe],a.a=b.headers[Qe],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(_.gg(_.ii(b))),{delay:a.renewalPeriod,Mf:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.ri=function(a){_.qi[a.I]=a};
74
- _.ti=function(a){const b={attemptParameters:_.tg(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,Oa:{}};if(a&&(b.enforceSingleSession=!!a.enforceSingleSession,b.delayLicenseRequestUntilPlayed=!!a.delayLicenseRequestUntilPlayed,b.preferredDrmSystem=a.preferredDrmSystem,b.emeApi=a.emeApi,a.attemptParameters&&(b.attemptParameters=a.attemptParameters),a.env)){const c=_.qi[a.env]||null;if(!c)throw _.D(_.pa,_.Sa+a.env+_.aa),new _.H(_.G,6,6015,`DRM environment '${a.env}' is missing.`);b.Oa=_.si(c,
75
- a.customData)||{};_.ng(a.env.toLowerCase(),Jc)&&(b.enforceSingleSession=!0)}return b};vi=function(a){a=ui[a];if(!a)return null;const b=_.Th();return b.os===Mh&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
76
- _.si=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[_.yc];if(g){var h=g.licenseUrl;d=wi(d,g.videoRobustness);e=wi(e,g.audioRobustness);var k=g.modifiers,l=g.distinctiveIdentifierRequired,m=g.persistentStateRequired;g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.ee?vi(f):f;c[_.yc]={licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,
77
- serverCertificate:g}}(g=a.g[_.wc])&&(c[_.wc]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.g[_.xc])&&(c[_.xc]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});return c};
78
- wi=function(a,b){const c=_.Th();if(c.os!==Mh||"chrome"!==c.browser)return a||b};_.xi=function(){throw new _.H(_.G,3,3E3);};_.yi=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.L(a.f.buffer);b=_.L(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.xi()}};_.M=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.xi()}};_.zi=function(a){return a.a<a.f.byteLength};_.Ai=function(){throw new _.H(_.G,3,3E3);};_.Bi=function(a){try{const b=a.f.getUint16(a.a,a.g);a.a+=2;return b}catch(b){_.Ai()}};
79
- _.N=function(a){try{const b=a.f.getUint32(a.a,a.g);a.a+=4;return b}catch(b){_.Ai()}};_.Ci=function(a){try{const b=a.f.getInt32(a.a,a.g);a.a+=4;return b}catch(b){_.Ai()}};_.Di=function(a){let b,c=0;try{a.g?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.Ai()}if(2097151<c)throw new _.H(_.G,3,3001);a.a+=8;return c*Math.pow(2,32)+b};_.Ei=function(a,b){a.a+b>a.f.byteLength&&_.Ai();const c=a.f.buffer.slice(a.a,a.a+b);a.a+=b;return _.L(c)};
80
- _.Fi=function(a){return`${a.scheme}//`+`${a.f}${a.port?":"+a.port:""}${a.path}${a.g}${a.a}`};_.Gi=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)},""):""};
81
- Hi=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};Ii=function(a){let b="";try{b=_.jg(a)}catch(c){}return b};_.Ki=function(a){a=Ii(a);let b="";a.length&&(b=(new _.Ji(a)).f);return b};
82
- Mi=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.G,6,6102);let d;typeof b===_.ee?d=_.lg(b,!0):d=b;a=_.lg(Ii(a),!0);b=new _.Li(12+a.byteLength+d.byteLength+c.byteLength,!0);_.M(b,a.byteLength);_.yi(b,_.L(a));_.M(b,d.byteLength);_.yi(b,_.L(d));_.M(b,c.byteLength);_.yi(b,_.L(c));return _.L(b.buffer)};_.Ni=function(a){var b=_.L(a.body);b=_.fi(b);a.headers[oa]=Qb;a.body=_.kg("spc\x3d"+b).buffer};
83
- _.Oi=function(a){let b;try{b=_.gg(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=eg(_.ii(b))};Ti=function(a,b){b=Pi(b);if(a==_.yc)return b+Qi;if(a==_.xc)return b+Ri;if(a==_.wc)return b+Si;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
84
- _.Vi=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]=
85
- c)):Ui.warn(La)};_.Wi=function(a,b){try{const c=_.L(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Ui.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){Ui.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
86
- _.Yi=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Vi(a,b,c,!1);b.headers[oa]=Qb;c={spc:_.ei(b.body)};if((a=a.drm)&&a.env.startsWith("DRMtodayOnboard")&&d){a={};var e=Hi((new _.Ji(Xi(d))).a);d=e.keyId;if(e=e.assetId)Ui.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Ui.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Ui.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Ui.info("Adding assetID to FPS payload:",d.assetId),c.assetId=
87
- d.assetId)}b.body=_.mg(_.Gi(c,!0))};_.Zi=function(a,b){Ui.debug("Clearing response data");200===b.status&&(a=_.gg(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.ii(a).buffer)};
88
- _.$i=function(a,b,c){b=Ii(b);c=c&&c.customData?c.customData:{};b=new _.Ji(Xi(b));const d=Hi(b.a);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.pg(`${a}`)&&(d.assetId=a,Ui.info("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.pg(`${e}`)&&(d.variantId=e,Ui.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Ui.info("KeyId found in FPS SKD. Removing other parameters")):
89
- a=["assetId","variantId"];b.a=_.Gi(d,!1,a);b=_.Fi(b);return c.fpsContentId=b};_.aj=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ra))Ui.warn(La);else if(a.customData&&a.customData.merchant){const c=new _.dh(b.uris[0]);let d=c.ma;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.ma=d;b.uris[0]=c.toString()}};bj=function(a,b,c){_.Vi(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.dh(b.uris[0]);c.a.add(_.Gd,a);b.uris[0]=c.toString()};
90
- Pi=function(a){if(a===cj)return"https://lic.drmtoday.com";if(a===dj)return"https://lic.staging.drmtoday.com";if(a===ej)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Xi=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};gj=function(a){const b={},c=a?a[Re]:void 0;a=fj[a?a[Re]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
91
- ij=function(a,b=0){_.tf("Registering EME Factory: "+a.a());a={priority:b,yb:a};for(let c=0;c<hj.length;++c)if(hj[c].priority<b){hj.splice(c,0,a);return}hj.push(a)};jj=function(a){if(a){const {yb:b}=hj.find(({yb:c})=>c.a()===a);if(b&&b.Y())return _.tf(lb+b.a()),b.create();_.tf("Cannot create selected EME manager. Choosing by priority list.")}for(const {yb:b}of hj)if(b.Y())return _.tf(lb+b.a()),b.create();throw Error("Missing EME managers");};
92
- kj=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.lj=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.mj=function(a){for(;_.zi(a.G)&&!a.Za.a;)a.Za.Qc(a.start+a.kd,a.G,a.se)};_.nj=function(a){for(let b=_.N(a.G);0<b&&!a.Za.a;--b)a.Za.Qc(a.start+a.kd,a.G,a.se)};_.oj=function(a){return b=>{const c=b.G.ya()-b.G.getPosition();a(_.Ei(b.G,c))}};_.pj=function(a){return 8+(a.hf?8:0)+(null!=a.flags?4:0)};
93
- qj=function(a){return _.v(function*(){const b=new Promise(c=>{(new _.rh(c)).$(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.z("Timeout waiting for session close")})};_.sj=function(a){return rj(a)?_.xc:a};tj=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};
94
- uj=function(a,b){if(a.keySystem){var c=_.sj(a.keySystem);b=b[c];c===_.Bd&&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=
95
- b.serverCertificate||null)))}};wj=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;_.ef(k)||(k=vj);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=Mi(c,l,a)}return c};
96
- vj=function(a,b){a=_.Ki(b);_.D("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};rj=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
97
- xj=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.li(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:h.initDataType==g.initDataType&&_.li(h.initData,g.initData)&&h.periodId===g.periodId)||d.push(g)}if(f.keyIds)for(a=0;a<f.keyIds.length;++a)e.includes(f.keyIds[a])||
98
- e.push(f.keyIds[a])}};yj=function(a){var b=a.ga;const c=a.V;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"==d)&&a.U(new _.H(_.G,6,6014));a.j.Cd(_.lf(c));a.m||a.a.info(qa);a.m=!0;a.B=!1};zj=function(a){a.g.forEach((b,c)=>{const d=b.xd;let e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.j.onExpirationUpdated(c.sessionId,e),b.xd=e)})};
99
- Aj=function(a){return _.v(function*(){a.w.release();a.w=null;a.K.release();a.K=null;a.m=!1;a.B=!1;a.D.reject();a.W.stop();a.W=null;a.S.stop();a.S=null;const b=Array.from(a.g.keys());for(const c of a.g.values())c.dc&&c.dc.stop();a.g.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.v(function*(){a.a.debug("Closing session",c.sessionId);try{yield qj(c)}catch(d){}}))));if(a.A){try{yield a.o.g(null)}catch(c){}a.A=null}a.o=null;a.f=null;a.J.clear();a.F=null;a.H=[];a.h=null;a.U=null;a.j=null;
100
- a.N=0;a.L=null})};_.Ej=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=kf(a.h.Oa);tj(b,d)}if(d=Bj(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)uj(f,a.h.Oa);b=Cj(a,b);if(!b.size)return a.R=!0,Promise.resolve();a.o=jj(a.h.emeApi);a=_.Dj(a,b);return c?a:a.catch(()=>{})};_.Gj=function(a,b,c){a.I=Fj;a.H=c;a.C=0<c.length;a.a.debug("Using Persisted Licenses: "+a.C);return _.Ej(a,b)};
101
- _.Dj=function(a,b){if(1==b.size&&b.has(""))return Promise.reject(new _.H(_.G,6,6E3));for(var c of b.values())0==c.audioCapabilities.length&&delete c.audioCapabilities,0==c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.Hj;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.ka)return null;if(m===_.xc){const n=a.j.getConfiguration();
102
- if(!_.th()||n.streaming.patchEdgeWhenMixedContent||a.h.Oa[m].useLegacySystem)e(l);else return a.o.a("com.microsoft.playready.recommendation",[l]).catch(()=>{e(l);return a.o.a(m,[l])})}return a.o.a(m,[l])}))};let g=a.h.preferredDrmSystem;if(!g){var h=_.Th();h.os===Oh&&10<=h.osVersion.major&&"edge"===h.browser&&(g=_.xc)}g&&(h=b.get(g))&&(f(!0,h,g),f(!1,h,g));for(const k of[!0,!1])b.forEach((l,m)=>{m!==g&&f(k,l,m)});d=d.catch(()=>{throw new _.H(_.G,6,6001);});d=d.then(k=>{if(a.ka)return null;a.J.clear();
103
- 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(_.sj(k.keySystem));q=[];l=[];const t=[],w=[];xj(n.drmInfos,q,l,t,w);1<l.length&&_.z("Multiple unique server certificates found! Only the first will be used.");1<q.length&&_.z("Multiple unique license server URIs found! Only the first will be used.");m={keySystem:m,
104
- licenseServerUri:q[0],distinctiveIdentifierRequired:n.distinctiveIdentifier==_.Td,persistentStateRequired:n.persistentState==_.Td,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:"",serverCertificate:l[0],initData:t,keyIds:w,periodId:null}}a.f=m;if(!a.f.licenseServerUri)throw new _.H(_.G,6,6012,a.f.keySystem);return k.createMediaKeys()}).then(k=>{a.ka||(a.a.info("Created MediaKeys object for key system",
1
+ let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ma,na,qa,ra,sa,ua,wa,Aa,Ba,Ca,Da,Ea,Fa,La,Ma,Na,Oa,Pa,Qa,Ra,Ya,db,fb,gb,jb,kb,lb,nb,Sb,gc,hc,nc,oc,qc,sc,tc,uc,Cc,Ic,Lc,Mc,Nc,Rc,Zc,ad,bd,gd,jd,Ad,Kd,Sd,Ud,ce,fe,me,te,Ie,Me,Ne,Oe,Pe,Qe,Se,Te,Ue,Ve,We,Xe,$e,af,ff,cf,mf,nf,sf,uf,Ff,Pf,Qf,Jf,Mf,Rf,Sf,Vf,Yf,$f,bg,ag,cg,dg,eg,hg,ig,xg,Bg,Cg,Dg,Eg,Ng,Og,Pg,Tg,Vg,Ug,Wg,Xg,$g,ah,bh,ch,dh,eh,hh,ih,jh,mh,oh,qh,nh,kh,rh,th,xh,Ch,Eh,Bh,Oh,Hh,Gh,$h,bi,ki,si,ti,ui,Ai,Bi,Li,Ti,Ui,Yi,$i,gj,pj,cj,kj,uj,wj,xj,yj,Bj,Cj,Ej,Dj,zj,Fj,Gj,Hj,Ij,Jj,
2
+ Kj,Qj,Vj,Xj,Zj,Yj,Sj,Tj,gk,ek,fk,Wj,hk,ik,sk,tk,uk,xk,Bk,Ck,Ek,zk,yk,Mk,Nk,Rk,Qk,Tk,Vk,Wk,Sk,Yk,dl,kl,il,jl,ol,pl,nl,ql,ml,ll,sl,ul,wl,xl,yl,zl,Al,Bl,Cl,Dl,El,Fl,Jl,Nl,Ol,Ql,Sl,Vl,Wl,Xl,$l,bm,cm,fm,dm,em,gm,hm,im,jm,km,lm,mm,nm,om,pm,rm,sm,tm,vm,ym,Dm,Em,Fm,Hm,Im,Jm,Lm,Mm,Km,Nm,Qm,Pm,Om,Um,Tm,Zm,Ye,Ze;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="6.2.8";_.ea="AdaptationSet";_.fa="Already destroyed. No-op";_.ha="Already released. No-op";
3
+ _.ia="Autoplay is not allowed due to browser policy.";_.ja="CODECS";_.ka="Cannot retrieve buffer information due to platform limitations";_.la="CastlabsPlayer";ma="Content-Length";na="Content-Type";_.pa="Could not find configured DRM environment.";qa="DRM licenses loaded";ra="DRMtoday";sa="DRMtodayOnboard";ua="Destroying player";_.va="Disable track type ";wa="Error while decoding string!";_.xa="Error while fetching license!";_.ya="FairPlay Certificate URL is not defined";_.za="FairPlay License URL is not defined";
4
+ Aa="HW_SECURE_CRYPTO";Ba="HW_SECURE_DECODE";Ca="HeaderDrm";Da="Ignoring duplicate init data.";Ea="InvalidStateError";Fa="License verification failed: ";_.Ha="Loading player with configuration";_.Ja="MaxHeight";_.Ka="MaxWidth";La="Missing media element";Ma="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Na="No event provided!";Oa="No track data attached to the event, unable to add track!";Pa="Not a persistent session.";Qa="NotAllowedError";Ra="NotSupportedError";
5
+ _.Sa="PlayReady License URL is not defined";_.Ta="Player sources";_.Ua="Please make sure ";_.Va="QualityLevel";_.Wa="Releasing player with source";_.Xa="Representation";Ya="STANDARD";_.Za="SW_SECURE_CRYPTO";_.cb="SW_SECURE_DECODE";db="Signature Verification failed";_.eb="SmoothStreamingMedia";fb="The index is not in the allowed range.";gb="Unable to translate ";_.ib="Unregistering listeners";jb="Unsupported keySystem";kb="Using VTTCue polyfill from 3 argument TextTrackCue.";lb="WebkitEmeManager.MediaKeySession.load";
6
+ _.mb="Widevine License URL is not defined";nb="Will create EME Manager: ";_.ob="ad-break-started";_.pb="ad-break-stopped";_.qb="ad-buffering";_.rb="ad-clicked";_.sb="ad-completed";_.tb="ad-first-quartile";_.ub="ad-impression";_.vb="ad-loaded";_.wb="ad-midpoint";_.xb="ad-paused";_.yb="ad-progress";_.zb="ad-resumed";_.Ab="ad-skipped";_.Bb="ad-started";_.Cb="ad-stopped";_.Db="ad-third-quartile";_.Eb="addtrack";_.Fb="ads-timeline-changed";_.Gb="airplay-casting-ended";_.Hb="airplay-casting-started";
7
+ _.Ib="airplay-status-changed";_.Jb="application/cea-608";_.Lb="application/dash+xml";_.Mb="application/mp4";_.Nb='application/mp4; codecs\x3d"stpp"';_.Ob='application/mp4; codecs\x3d"wvtt"';_.Pb="application/ttml+xml";_.Qb="application/vnd.ms-sstr+xml";_.Rb="application/x-mpegurl";Sb="application/x-www-form-urlencoded";_.Tb="audio";_.Ub="audio/aac";_.Vb="audio/ac3";_.Wb="audio/eac3";_.Xb="audio/mp4";_.Yb="audiobufferchanged";_.Zb="autoplaynotallowed";_.$b="bitratechanged";_.ac="boolean";_.bc="bufferingended";
8
+ _.cc="bufferingstarted";gc="canplay";hc="canplaythrough";_.ic="castingstarted";_.jc="caststatuschanged";_.kc="cdn-switch-success";_.lc="cenc";_.mc="center";nc="change";oc="clpp-container";_.pc="clpp-fill";qc="clpp-hidden";_.rc="clpp.cast.CastSender";sc="clpp.drm.HeaderDrm";tc="clpp.native.Player";uc="clpp.utils.Platform";_.vc="codecs";_.wc="column-reverse";_.xc="com.adobe.primetime";_.yc="com.apple.fps";_.zc="com.microsoft.playready";_.Ac="com.widevine.alpha";_.Bc="config.drm.customData is not defined";
9
+ Cc="controls";_.Dc="cuechange";_.Ec="destroy()";_.Fc="disabled";_.Gc="div";_.Hc="drmexpirationupdate";Ic="drmrenewalstarted";_.Jc="drmsessionpersisted";_.Kc="drmsessionupdate";Lc="drmtoday";Mc="durationchange";Nc="encrypted";_.Oc="end";_.Pc="ended";_.Qc="error";Rc="fullscreenElement";_.Sc="function";_.Tc="height";_.Uc="hidden";_.Xc="image";_.Yc="internal-error";Zc="keystatuseschange";_.$c="left";ad="license-renewal";bd="license-request";_.cd="line-left";_.dd="line-right";_.ed="loadeddata";_.fd="loadedmetadata";
10
+ gd="loadstart";_.hd="mdat";_.id="mdia";jd="message";_.kd="metadata";_.ld="mimeType";_.md="minf";_.nd="moov";_.od="mp4";_.pd="mpd-type-changed";_.qd="mpeg-dash-callback-event";_.rd="native";_.sd="none";_.p="number";_.td="object";_.ud="onBitrateChanged()";_.vd="onContentLoaded";_.wd="onPlayerError()";_.xd="onPlayerWillDestroy";_.yd="onPlayerWillRelease";_.zd="onStateChanged()";Ad="online-status-changed";_.Cd="optional";_.Dd="org.w3.clearkey";_.Ed="output-restricted";_.Hd="pause";_.Id="persistent";
11
+ _.Jd="persistent-license";Kd="picture-in-picture";_.Ld="play";_.Md="playing";_.Nd="playlist-item-changed";_.Od="playlist-modified";_.Pd="progress";_.Qd="px";_.Rd="ratechange";Sd="released";_.Td="releasing";Ud="removetrack";_.Vd="required";_.Wd="resize";_.Xd="right";_.Yd="seeked";_.Zd="seeking";_.$d="showing";_.ae="sinf";_.be="single-native";ce="stalled";_.de="start";_.ee="statechanged";fe="status-pending";_.ge="stbl";_.he="string";_.ie="stsd";_.je="style";_.ke="subtitles-htmlcue";_.le="subtitles-ttml";
12
+ me="temporary";_.r="text";_.ne="text/vtt";_.oe="text/xml";_.pe="timeupdate";_.qe="trak";_.re="ttml-xml";_.se="und";te="unknown";_.ue="urn:scte:scte35";_.ve="urn:scte:scte35:2014";_.xe="user-seeked";_.ze="user-seeking";_.Ae="value";_.Be="vertical-lr";_.Ce="vertical-rl";_.u="video";_.De="video/mp2t";_.Ee="video/mp4";_.Fe="videobufferchanged";_.Ge="videotrackchanged";_.He="vimond-response";Ie="visibilitychange";_.Je="vtt-xml";_.Ke="waiting";_.Le="waitingforkey";Me="webkit-org.w3.clearkey";Ne="webkitkeyadded";
13
+ Oe="webkitkeyerror";Pe="webkitkeymessage";Qe="webkitneedkey";_.Re="width";Se="x-dt-csl-tracking-token";Te="x-dt-follow-up-token";Ue="x-dt-resp-code";We=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Xe=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:We(a)}};
14
+ $e=function(a,b){if(b){var c=Ye;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&&Ze(c,a,{configurable:!0,writable:!0,value:b})}};af=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())})};_.v=function(a){return af(a())};
15
+ _.x=function(a,b){a=a.split(".");var c=bf;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};_.ef=function(a){return _.y(a)||cf(a)?a:_.df(a)};_.df=function(a){let b={};for(let c=0;c<arguments.length;c++)null!==arguments[c]&&void 0!==arguments[c]&&(b=ff(b,{merging:arguments[c]}));return b.merging};
16
+ ff=function(a,b,c){const d=c+1||1;if(_.y(a)||!_.gf(a))a={};for(const e in b)c=b[e],cf(c)||_.y(c)||_.hf(c)?a[e]=c:_.gf(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.hf(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=ff([],c):!_.y(c)&&!_.y(c)&&_.gf(c)&&c.constructor===Object&&20>d&&(a[e]=ff(a[e],c,d));return a};cf=function(a){a=typeof a;return a===_.he||a===_.p||a===_.ac};_.y=function(a){return null===a||"undefined"===typeof a};_.gf=function(a){return typeof a===_.td};
17
+ _.hf=function(a){return typeof a===_.Sc};_.jf=function(a){return typeof a===_.he};_.kf=function(a){return typeof a===_.p};
18
+ _.lf=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||!_.gf(a)||!_.gf(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.y(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.y(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.y(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
19
+ mf=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};nf=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.of=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};sf=function(a){return a&&0<=pf[a]?pf[a]:qf};uf=function(a){if(!a)return _.z("clpp.log",gb+a+ca),-1;const b=tf[a.toUpperCase()];return void 0===b?(_.z("clpp.log",gb+a+ca),-1):b};_.Af=function(a){zf.info.apply(zf,arguments)};_.D=function(a){zf.debug.apply(zf,arguments)};
20
+ _.z=function(a){zf.warn.apply(zf,arguments)};_.Bf=function(a){zf.error.apply(zf,arguments)};_.Ef=function(a){if(a){var b=a.a();b in _.Cf?_.Df.warn("Player-Factory '"+b+"' already registered"):(_.Cf[b]=a,_.Df.info("Registered Player-Factory: '"+b+"'"))}};_.Gf=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)Ff(b[c]);a.a.clear()};_.Hf=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
+ Ff=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
22
+ Pf=function(a,b){a.o.debug("onMetadata_()");b.mode=_.Uc;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:_.If,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(Jf(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
23
+ _.ve;g.type=_.Kf;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.l.trigger(new _.F(_.Lf,{detail:f}));Array.prototype.push.apply(a.g,c);Mf(a,c,b);a.f.off(b,_.Dc);a.f.on(b,_.Dc,f=>{f=f.target.activeCues;f=f.length?Jf(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(_.Nf,{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(_.Of,{detail:f})))}})}};
24
+ Qf=function(a,b){a.h=b;a.j=a.h.textTracks;a.f.on(a.j,_.Eb,c=>{c=c.track;c.kind===_.kd&&Pf(a,c)})};Jf=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};Mf=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
+ Rf=function(a,b){b=b.track;b.kind!==_.kd&&(b.mode===_.$d&&(b.mode=_.Uc),a.a.on(b,_.Dc,c=>{c=c.target||c.srcElement;c.mode=_.Uc;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.j.append(c,[]))}))};Sf=function(a,b,c,d){a=`${a===_.G?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.jf(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};
26
+ _.Tf=function(a){return a&&a!==_.se?a:null};Vf=function(a){if(!a)throw new _.H(_.G,3,3101,`Invalid track type: ${a}`);if(!_.jf(a))throw new _.H(_.G,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.I:return _.I;case _.J:return _.J;case _.K:return _.K;case Uf:return Uf}throw new _.H(_.G,3,3101,`Unknown track type: ${a}.`);};
27
+ Yf=function(a,b){a=Vf(a);const c=_.Tf(b.kind);let d=b.id;d||(d=String(_.Wf++));a=new _.Xf(d,c===_.kd?Uf:a);a.kind=c;a.label=_.Tf(b.label);a.language=_.Tf(b.language);return a};_.Zf=function(a,b){for(const c of a)if(!b(c))return!1;return!0};$f=function*(a){for(let b=0;b<a;b++)yield b};
28
+ bg=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(ag(a)==ag(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;const c=_.L(a);b=_.L(b);for(const d of $f(a.byteLength))if(c[d]!=b[d])return!1;return!0};ag=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.L=function(a,b=0,c=Infinity){return cg(a,b,c,Uint8Array)};
29
+ cg=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=ag(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)};dg=function(a,b=0,c=Infinity){return cg(a,b,c,Uint16Array)};eg=function(a,b=0,c=Infinity){return cg(a,b,c,Uint32Array)};_.fg=function(a,b=0,c=Infinity){return cg(a,b,c,Int32Array)};_.gg=function(a,b=0,c=Infinity){return cg(a,b,c,DataView)};
30
+ hg=function(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};ig=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};
31
+ _.jg=function(a){if(!a)return"";a=_.L(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(ig(a));try{return decodeURIComponent(a)}catch(b){throw Error(wa);}};
32
+ _.lg=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw kg.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.L(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(_.L(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 ig(c)};
33
+ _.mg=function(a,b){if(_.jf(a))return a;let c="";b=!!b;const d=_.L(a);239==d[0]&&187==d[1]&&191==d[2]?c=_.jg(d):254==d[0]&&255==d[1]?c=_.lg(d.subarray(2),!1):255==d[0]&&254==d[1]&&(c=_.lg(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);kg.debug("Unable to find byte-order-mark, making an educated guess.");0==d[0]&&0==d[2]?c=_.lg(a,!1):0==d[1]&&0==d[3]?c=_.lg(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.jg(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
34
+ };_.ng=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};_.og=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};
35
+ _.pg=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=eg(d):2===c?e=dg(d):e=_.L(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.qg=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.rg=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};_.sg=function(a){return!!(a&&0<a.length)};_.tg=function(a){return!a||0===a.length};
36
+ _.vg=function(a){a=a.replace(/<[^>]+>/gi,"");ug.innerHTML=a;a=ug.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.wg=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};xg=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts};
37
+ _.zg=function(a,b){_.jf(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.yg,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||
38
+ [],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};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&xg(c,b);return c};
39
+ _.Ag=function(a,b,c,d,e,f,g){e&&(d=e);e={uri:d,data:b||new ArrayBuffer(0),headers:a,status:c,fromCache:!!a["x-shaka-from-cache"],timeMs:g,request:f};if(200<=c&&299>=c&&202!==c)return e;g=null;try{g=_.mg(b,!0)}catch(h){}_.D("HTTP error text:",g);throw new _.H(401===c||403===c?_.G:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};Bg=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};
40
+ Cg=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};Dg=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()};Eg=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};
41
+ _.Gg=function(a,b,c){for(const d of _.Fg)if(d.probe(b,c))return d.create(a);return null};_.Hg=function(a){a=_.Fg.indexOf(a);0<=a&&_.Fg.splice(a,1)};_.Jg=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Ig.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Kg=function(a,b){a=_.Jg(a);b=_.Jg(b);return a.split("-")[0]==b.split("-")[0]};_.Lg=function(a,b){b&&(a+='; codecs\x3d"'+b+'"');return a};_.Mg=function(a){return Array.isArray(a)?a:[a]};
42
+ Ng=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.lf(a,{kind:_.Tf(b.kind),language:_.Tf(b.language),label:_.Tf(b.label)},["kind","language","label"])};Og=function(a){return a.enabled||a.selected||a.mode===_.$d||a.mode===_.Uc};Pg=function(a,b){return a.h.filter(c=>c.type===b)};Tg=function(a){(a=a.l.getTextDisplayer())&&a.remove(0,Infinity)};Vg=function(a,b){if(a=Ug(a,b))a=Array.from(a),b===_.I&&(a=a.filter(c=>c.kind!==_.kd));return a};
43
+ Ug=function(a,b){if(!a.l)return null;a=a.l.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.J:return a.audioTracks;case _.K:return a.videoTracks;case _.I:return a.textTracks;default:return null}};Wg=function(a,b){return(a=a.f.get(b)||null)&&a.renditions[0]};Xg=function(a,b){return(a=a.m.get(b))&&a.renditions[0]};
44
+ $g=function(a,b,c){const d=Vg(a,b);if(c){if(void 0===a.h.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.a.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.m.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.I:f="mode";e=_.$d;g=_.Fc;break;case _.J:f="enabled";break;case _.K:f="selected"}if(f)for(const h of d)h[f]=Ng(c,h,c.type)?e:g}}else if(a.a.debug(_.va+b),a.f.get(b)&&d&&b===_.I){for(e of d)e.mode=
45
+ _.Fc;a.f.set(b,null)}b===_.J?a.l.trigger(new _.F(_.Yg)):b===_.I&&a.l.trigger(new _.F(_.Zg))};ah=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=_.tg(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.H.push(e)}}};
46
+ bh=function(a,b){return _.v(function*(){var c=a.l.getConfiguration(),d=_.Gg(c,b.mimeType,_.ne);if(d){c=_.zg(b.url);var e=yield a.l.getNetworkEngine().fetch(c).O;e&&e.data&&(c="External_"+`${a.D++}`,a.o[c]=b,d=d.a(_.L(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.ne},ah(a,d,c))}else a.a.warn("Track mimetype is not supported",b)})};
47
+ ch=function(a,b,c){c=_.Mg(c).filter(e=>e);a.a.info("Find preferred tracks for",b,c);const d=Pg(a,b);c.some(e=>{const f=_.Jg(e);return(e=d.find(g=>{g=_.Jg(g.language||"");return _.Kg(f,g)}))?(a.a.info("Will select track with id",e.id),$g(a,b,e),!0):!1})};dh=function(a,b,c){try{const d=a(b);if(d&&d.O&&d.abort)return c.resolve(d.O),()=>d.abort();c.resolve(d);return()=>Promise.resolve(d).then(()=>{}).catch(()=>{})}catch(d){return c.reject(d),()=>Promise.resolve()}};
48
+ eh=function(a,b){a.O.then(()=>b(!0),()=>b(!1));return a};_.fh=function(a,b){a.a.push(eh(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};_.gh=function(a){var b;a instanceof _.gh?(hh(this,a.Ma),this.$b=a.$b,this.Da=a.Da,ih(this,a.mc),this.ma=a.ma,jh(this,kh(a.a)),this.Ob=a.Ob):a&&(b=String(a).match(lh))?(hh(this,b[1]||"",!0),this.$b=mh(b[2]||""),this.Da=mh(b[3]||"",!0),ih(this,b[4]),this.ma=mh(b[5]||"",!0),jh(this,b[6]||"",!0),this.Ob=mh(b[7]||"")):this.a=new nh(null)};
49
+ hh=function(a,b,c){a.Ma=c?mh(b,!0):b;a.Ma&&(a.Ma=a.Ma.replace(/:$/,""))};ih=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.mc=b}else a.mc=null};jh=function(a,b,c){b instanceof nh?a.a=b:(c||(b=oh(b,ph)),a.a=new nh(b))};mh=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};oh=function(a,b,c){return typeof a===_.he?(a=encodeURI(a).replace(b,qh),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};
50
+ qh=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};nh=function(a){this.f=a||null};kh=function(a){var b=new nh;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};rh=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.v(function*(){if(!navigator.onLine)return!1;if(b){const e=_.zg(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).O}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
51
+ th=function(a){return a.name===Qa&&sh.some(b=>a.message.startsWith(b))};xh=function(){if(uh)return uh;vh||(vh=new _.wh(()=>{uh=null}));(uh=document.querySelector(_.u)||document.querySelector(_.Tb))||(uh=document.createElement(_.u));vh.$(1);return uh};_.yh=function(){return!!navigator.userAgent.match(/Edge?\//)};_.zh=function(a){return(navigator.userAgent||"").includes(a)};_.Ah=function(a){return _.zh("Tizen"+(a?" "+String(a):""))};
52
+ Ch=function(a){const b={major:-1,name:te};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Bh(a,c[0]));2<=c.length&&(b.minor=Bh(a,c[1]));3<=c.length&&(b.patch=Bh(a,c[2]));4<=c.length&&(b.build=Bh(a,c[3]));return b};_.Dh=function(){return _.zh("Web0S")};_.Fh=function(){return _.Dh()&&79===Eh().major};
53
+ Eh=function(){const a=Gh();const b="ie edge opera firefox safari chrome".split(" ");var c=Hh();const d=Ih[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Ch(c[1]);return Ch("")};_.Jh=function(){return _.zh("CrKey")};_.Kh=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Ah()};_.Lh=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Kh()&&1<navigator.maxTouchPoints};_.Mh=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
54
+ Bh=function(a,b){try{return parseInt(b,10)}catch(c){Nh.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};Oh=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};
55
+ Hh=function(){const a=Gh();if(!a)return Ph;var b=a.match(/^.+?(?=\))/);if(!b)return Ph;b=b[0];if(Oh(b,["iphone","ipad"]))return Qh;if(Oh(b,["android"]))return Rh;if(Oh(b,["macintosh"]))return Sh;if(Oh(b,["windows nt"]))return Th;if(Oh(b,["tizen"]))return Uh;if(Oh(b,["web0s"]))return Vh;if(Oh(b,["linux"]))return Wh;Nh.warn("Unable to identify OS from user agent: "+a);return Ph};Gh=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
56
+ _.Yh=function(){var a=Hh();var b=Hh();var c=Ih[b];if(c){c=Gh().match(c.os_version)[1];c=Ch(c);if(b===Th)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=Ch("");a:{c=Gh();const e="ie edge opera firefox safari chrome".split(" ");var d=Hh();d=Ih[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=Xh}return{os:a,osVersion:b,browser:c,browserVersion:Eh()}};
57
+ _.ai=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Lh()&&(a=360);const b=_.wg();b.maxAttempts=3;a={source:"",license:Zh,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.wg(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,
58
+ restrictions:$h(a)},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:"",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,
59
+ gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!0,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1},restrictions:$h(),tizen:{sideStreamText:_.Ah(2)}};if(_.zh("Edge/")||
60
+ _.Ah())a.streaming.gapDetectionThreshold=.5;_.Dh()&&(a.streaming.stallEnabled=!1);_.Fh()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Ah()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70};return a};
61
+ $h=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}};
62
+ _.ci=function(...a){if(!a)return _.ai();var b=[_.ai()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.jf(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:{Sf:{clockSyncUri:"//time.akamai.com"}}}),c=!0),b.push(d));a=_.df.apply(null,b);_.jf(a.volume)&&(""===""+a.volume?a.volume=
63
+ null:a.volume=Number(a.volume));if(!_.y(a.volume)&&(!_.kf(a.volume)||mf(a.volume)))throw new _.H(_.G,7,7100,"config.volume is not a number");if(!_.y(a.preferredTextLanguage)&&!_.jf(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.G,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.y(a.preferredAudioLanguage)&&!_.jf(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.G,7,7100,"config.preferredAudioLanguage is not a string or an array");
64
+ if(!_.y(a.preferredAudioCodec)&&!_.jf(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.G,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.y(a.preferredVideoCodec)&&!_.jf(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.G,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.y(a.drm)){if(a.drm.env&&!_.jf(a.drm.env))throw new _.H(_.G,7,7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.jf(a.drm.offlineId))throw new _.H(_.G,
65
+ 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(!_.kf(b.bufferingGoal)||mf(b.bufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.kf(b.rebufferingGoal)||mf(b.rebufferingGoal))throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal is not a number");
66
+ if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.G,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.kf(b.bufferBehind)||mf(b.bufferBehind))throw new _.H(_.G,7,7100,"config.streaming.bufferBehind is not a number");if(!_.kf(b.smallGapLimit)||mf(b.smallGapLimit))throw new _.H(_.G,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.kf(b.durationBackoff)||mf(b.durationBackoff))throw new _.H(_.G,7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;
67
+ if(_.y(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.p)throw new _.H(_.G,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");bi(a.restrictions);bi(a.abr.restrictions);a.abr.initialRestrictions&&bi(a.abr.initialRestrictions)}return a};
68
+ bi=function(a){_.y(a.maxPixels)&&(a.maxPixels=Infinity);_.y(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.y(a.maxHeight)&&(a.maxHeight=Infinity);_.y(a.maxWidth)&&(a.maxWidth=Infinity);_.y(a.minPixels)&&(a.minPixels=0);_.y(a.minBandwidth)&&(a.minBandwidth=0);_.y(a.minHeight)&&(a.minHeight=0);_.y(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);
69
+ 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");};_.di=function(a){return typeof a===_.td&&!Array.isArray(a)&&"source"in a};_.fi=function(a){return _.ei.get(a)||null};
70
+ _.ji=function(a){_.ei.get(a.id())?gi.warn("Component already in use."):_.ei.set(a.id(),a)};ki=function(a){for(const b of _.ei.values())a(b)};_.mi=function(a,b){b=void 0==b?!0:b;a=_.li(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.li=function(a){a=ig(_.L(a));return btoa(a)};_.ni=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};
71
+ _.oi=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};_.pi=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};_.qi=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};
72
+ _.ri=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};si=function(a){return _.qg(a,_.yc)||_.qg(a,_.zc)};ti=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Se]=a.f),a.a&&(b.headers[Te]=a.a))};
73
+ ui=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Se],a.a=b.headers[Te],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(_.jg(_.ni(b))),{delay:a.renewalPeriod,Mf:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.wi=function(a){_.vi[a.I]=a};
74
+ _.yi=function(a){const b={attemptParameters:_.wg(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,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),a.env)){const c=_.vi[a.env]||null;if(!c)throw _.D(_.pa,_.Ua+a.env+_.aa),new _.H(_.G,6,6015,`DRM environment '${a.env}' is missing.`);b.Pa=_.xi(c,
75
+ a.customData)||{};_.qg(a.env.toLowerCase(),Lc)&&(b.enforceSingleSession=!0)}return b};Ai=function(a){a=zi[a];if(!a)return null;const b=_.Yh();return b.os===Rh&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
76
+ _.xi=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[_.Ac];if(g){var h=g.licenseUrl;d=Bi(d,g.videoRobustness);e=Bi(e,g.audioRobustness);var k=g.modifiers,l=g.distinctiveIdentifierRequired,m=g.persistentStateRequired;g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.he?Ai(f):f;c[_.Ac]={licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,
77
+ serverCertificate:g}}(g=a.g[_.yc])&&(c[_.yc]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.g[_.zc])&&(c[_.zc]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});return c};
78
+ Bi=function(a,b){const c=_.Yh();if(c.os!==Rh||"chrome"!==c.browser)return a||b};_.Ci=function(){throw new _.H(_.G,3,3E3);};_.Di=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.L(a.f.buffer);b=_.L(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.Ci()}};_.M=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.Ci()}};_.Ei=function(a){return a.a<a.f.byteLength};_.Fi=function(){throw new _.H(_.G,3,3E3);};_.Gi=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.Fi()}};
79
+ _.Hi=function(a){try{const b=a.f.getUint16(a.a,a.g);a.a+=2;return b}catch(b){_.Fi()}};_.N=function(a){try{const b=a.f.getUint32(a.a,a.g);a.a+=4;return b}catch(b){_.Fi()}};_.Ii=function(a){try{const b=a.f.getInt32(a.a,a.g);a.a+=4;return b}catch(b){_.Fi()}};_.Ji=function(a){let b,c=0;try{a.g?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.Fi()}if(2097151<c)throw new _.H(_.G,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
80
+ _.Ki=function(a,b){a.a+b>a.f.byteLength&&_.Fi();const c=a.f.buffer.slice(a.a,a.a+b);a.a+=b;return _.L(c)};Li=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Mi=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.Ni=function(a){for(;_.Ei(a.G)&&!a.La.a;)a.La.Qc(a.start+a.kd,a.G,a.se)};_.Oi=function(a){for(let b=_.N(a.G);0<b&&!a.La.a;--b)a.La.Qc(a.start+a.kd,a.G,a.se)};
81
+ _.Pi=function(a){return b=>{const c=b.G.ya()-b.G.getPosition();a(_.Ki(b.G,c))}};_.Qi=function(a){return 8+(a.hf?8:0)+(null!=a.flags?4:0)};_.Ri=function(a){return`${a.scheme}//`+`${a.f}${a.port?":"+a.port:""}${a.path}${a.g}${a.a}`};_.Si=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)},""):""};
82
+ Ti=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};Ui=function(a){let b="";try{b=_.mg(a)}catch(c){}return b};_.Wi=function(a){a=Ui(a);let b="";a.length&&(b=(new _.Vi(a)).f);return b};
83
+ Yi=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.jg(a)),d=_.ni(c.sinf[0]);(new _.Xi).M(_.ae,_.Ni).M("schi",_.Ni).M("tenc",e=>{e.G.skip(6);_.Gi(e.G)&&(e.G.skip(1),b=_.pi(_.Ki(e.G,16)));e.La.stop()}).parse(d)}catch(c){}return b};
84
+ $i=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.G,6,6102);let d;typeof b===_.he?d=_.og(b,!0):d=b;a=_.og(Ui(a),!0);b=new _.Zi(12+a.byteLength+d.byteLength+c.byteLength,!0);_.M(b,a.byteLength);_.Di(b,_.L(a));_.M(b,d.byteLength);_.Di(b,_.L(d));_.M(b,c.byteLength);_.Di(b,_.L(c));return _.L(b.buffer)};_.aj=function(a){var b=_.L(a.body);b=_.mi(b);a.headers[na]=Sb;a.body=_.ng("spc\x3d"+b).buffer};
85
+ _.bj=function(a){let b;try{b=_.jg(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=hg(_.ni(b))};gj=function(a,b){b=cj(b);if(a==_.Ac)return b+dj;if(a==_.zc)return b+ej;if(a==_.yc)return b+fj;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
86
+ _.ij=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]=
87
+ c)):hj.warn(Ma)};_.jj=function(a,b){try{const c=_.L(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));hj.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){hj.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
88
+ _.lj=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.ij(a,b,c,!1);b.headers[na]=Sb;c={spc:_.li(b.body)};if((a=a.drm)&&a.env.startsWith(sa)&&d){a={};var e=Ti((new _.Vi(kj(d))).a);d=e.keyId;if(e=e.assetId)hj.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(hj.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(hj.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(hj.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
89
+ _.pg(_.Si(c,!0))};_.mj=function(a,b){hj.debug("Clearing response data");200===b.status&&(a=_.jg(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.ni(a).buffer)};
90
+ _.nj=function(a,b,c){b=Ui(b);c=c&&c.customData?c.customData:{};b=new _.Vi(kj(b));const d=Ti(b.a);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.sg(`${a}`)&&(d.assetId=a,hj.info("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.sg(`${e}`)&&(d.variantId=e,hj.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],hj.info("KeyId found in FPS SKD. Removing other parameters")):
91
+ a=["assetId","variantId"];b.a=_.Si(d,!1,a);b=_.Ri(b);return c.fpsContentId=b};_.oj=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ra))hj.warn(Ma);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(sa)){const c=new _.gh(b.uris[0]);let d=c.ma;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.ma=d;b.uris[0]=c.toString()}};pj=function(a,b,c){_.ij(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.gh(b.uris[0]);c.a.add(_.Id,a);b.uris[0]=c.toString()};
92
+ cj=function(a){if(a===qj)return"https://lic.drmtoday.com";if(a===rj)return"https://lic.staging.drmtoday.com";if(a===sj)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};kj=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};uj=function(a){const b={},c=a?a[Ue]:void 0;a=tj[a?a[Ue]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
93
+ wj=function(a,b=0){_.Af("Registering EME Factory: "+a.a());a={priority:b,yb:a};for(let c=0;c<vj.length;++c)if(vj[c].priority<b){vj.splice(c,0,a);return}vj.push(a)};xj=function(a){if(a){const {yb:b}=vj.find(({yb:c})=>c.a()===a);if(b&&b.Y())return _.Af(nb+b.a()),b.create();_.Af("Cannot create selected EME manager. Choosing by priority list.")}for(const {yb:b}of vj)if(b.Y())return _.Af(nb+b.a()),b.create();throw Error("Missing EME managers");};
94
+ yj=function(a){return _.v(function*(){const b=new Promise(c=>{(new _.wh(c)).$(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.z("Timeout waiting for session close")})};_.Aj=function(a){return zj(a)?_.zc:a};Bj=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};
95
+ Cj=function(a,b){if(a.keySystem){var c=_.Aj(a.keySystem);b=b[c];c===_.Dd&&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=
96
+ b.serverCertificate||null)))}};Ej=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;_.hf(k)||(k=Dj);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=$i(c,l,a)}return c};
97
+ Dj=function(a,b){a=_.Wi(b);_.D("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};zj=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
98
+ Fj=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.qi(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:h.initDataType==g.initDataType&&_.qi(h.initData,g.initData)&&h.periodId===g.periodId)||d.push(g)}if(f.keyIds)for(a=0;a<f.keyIds.length;++a)e.includes(f.keyIds[a])||
99
+ e.push(f.keyIds[a])}};Gj=function(a){var b=a.ga;const c=a.V;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"==d)&&a.U(new _.H(_.G,6,6014));a.j.Cd(_.of(c));a.m||a.a.info(qa);a.m=!0;a.B=!1};Hj=function(a){a.g.forEach((b,c)=>{const d=b.xd;let e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.j.onExpirationUpdated(c.sessionId,e),b.xd=e)})};
100
+ Ij=function(a){return _.v(function*(){a.w.release();a.w=null;a.K.release();a.K=null;a.m=!1;a.B=!1;a.D.reject();a.W.stop();a.W=null;a.S.stop();a.S=null;const b=Array.from(a.g.keys());for(const c of a.g.values())c.dc&&c.dc.stop();a.g.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.v(function*(){a.a.debug("Closing session",c.sessionId);try{yield yj(c)}catch(d){}}))));if(a.A){try{yield a.o.g(null)}catch(c){}a.A=null}a.o=null;a.f=null;a.J.clear();a.F=null;a.H=[];a.h=null;a.U=null;a.j=null;
101
+ a.N=0;a.L=null})};_.Mj=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=nf(a.h.Pa);Bj(b,d)}if(d=Jj(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)Cj(f,a.h.Pa);b=Kj(a,b);if(!b.size)return a.R=!0,Promise.resolve();a.o=xj(a.h.emeApi);a=_.Lj(a,b);return c?a:a.catch(()=>{})};_.Oj=function(a,b,c){a.I=Nj;a.H=c;a.C=0<c.length;a.a.debug("Using Persisted Licenses: "+a.C);return _.Mj(a,b)};
102
+ _.Lj=function(a,b){if(1==b.size&&b.has(""))return Promise.reject(new _.H(_.G,6,6E3));for(var c of b.values())0==c.audioCapabilities.length&&delete c.audioCapabilities,0==c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.Pj;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.ka)return null;if(m===_.zc){const n=a.j.getConfiguration();
103
+ if(!_.yh()||n.streaming.patchEdgeWhenMixedContent||a.h.Pa[m].useLegacySystem)e(l);else return a.o.a("com.microsoft.playready.recommendation",[l]).catch(()=>{e(l);return a.o.a(m,[l])})}return a.o.a(m,[l])}))};let g=a.h.preferredDrmSystem;if(!g){var h=_.Yh();h.os===Th&&10<=h.osVersion.major&&"edge"===h.browser&&(g=_.zc)}g&&(h=b.get(g))&&(f(!0,h,g),f(!1,h,g));for(const k of[!0,!1])b.forEach((l,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.ka)return null;a.J.clear();
104
+ 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(_.Aj(k.keySystem));q=[];l=[];const t=[],w=[];Fj(n.drmInfos,q,l,t,w);1<l.length&&_.z("Multiple unique server certificates found! Only the first will be used.");1<q.length&&_.z("Multiple unique license server URIs found! Only the first will be used.");m={keySystem:m,
105
+ licenseServerUri:q[0],distinctiveIdentifierRequired:n.distinctiveIdentifier==_.Vd,persistentStateRequired:n.persistentState==_.Vd,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:"",serverCertificate:l[0],initData:t,keyIds:w,periodId:null}}a.f=m;if(!a.f.licenseServerUri)throw new _.H(_.G,6,6012,a.f.keySystem);return k.createMediaKeys()}).then(k=>{a.ka||(a.a.info("Created MediaKeys object for key system",
105
106
  a.f.keySystem),a.F=k,a.R=!0)}).catch(k=>{if(!a.ka){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};
106
- Bj=function(a){a=kf(a.h.Oa[_.Bd]||{});if(0==a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.ji(f);e=_.ji(e);e={kty:"oct",kid:_.fi(f,!1),k:_.fi(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.kg(d),initDataType:"keyids"}];return{keySystem:_.Bd,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
107
+ Jj=function(a){a=nf(a.h.Pa[_.Dd]||{});if(0==a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.oi(f);e=_.oi(e);e={kty:"oct",kid:_.mi(f,!1),k:_.mi(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.ng(d),initDataType:"keyids"}];return{keySystem:_.Dd,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
107
108
  keyIds:[],periodId:null}};
108
- Cj=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)uj(f,a.h.Oa);d=a.C?_.Td:_.zd;e=a.C?[_.Hd]:[je];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.jc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.zd,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Ig(b.mimeType,b.codecs):"",h=c?_.Ig(c.mimeType,c.codecs):"";for(const k of f.drmInfos){const l=a.get(k.keySystem);
109
- l.drmInfos.push(k);k.initData&&k.initData.length&&(l.initDataTypes=[...new Set(k.initData.map(m=>m.initDataType))]);k.distinctiveIdentifierRequired&&(l.distinctiveIdentifier=_.Td);k.persistentStateRequired&&(l.persistentState=_.Td);b&&_.Jg(k.audioRobustness).forEach(m=>{l.audioCapabilities.push({robustness:m||"",contentType:g})});c&&_.Jg(k.videoRobustness).forEach(m=>{l.videoCapabilities.push({robustness:m||"",contentType:h})})}}return a};
110
- Ij=function(a){return _.v(function*(){if(!a.o.m())if(a.L)yield a.L;else try{a.L=a.o.g(a.F),yield a.L}catch(b){a.ka||a.U(new _.H(_.G,6,6003,b.message,b))}})};
111
- _.Mj=function(a,b,c){if(c.length&&(!a.C||a.I!==Fj)){var d=a.keySystem();if(!d.startsWith(_.wc)){var e=new Jj(c);if(1<e.a.length&&(d={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[d]))for(let f=0;f<e.f.length;f++)if(d===e.f[f]){c=c.subarray(e.a[f].start,e.a[f].end+1);break}}e=a.g.values();if(!a.A.webkitCurrentPlaybackTargetIsWireless&&
112
- !_.vh(2)&&!a.keySystem().startsWith(_.wc))for(const f of e){if(_.li(c,f.initData)){a.a.debug(Ca);return}if(Kj(c,f)){a.a.debug("Ignoring duplicate init data (extra).");return}}Lj(a,"",null,b,c)}};Nj=function(a,b){return _.v(function*(){yield Ij(a);b.initData&&_.Mj(a,b.initDataType,_.L(b.initData))})};Pj=function(a){return _.v(function*(){const b=a.T.map(c=>Oj(a,c));a.ca=!0;a.T=[];yield Promise.all(b)})};
113
- Rj=function(a){const b=a.keySystem(),c=a.h.Oa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.j.getConfiguration();return Qj(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.wg([d],a.h.attemptParameters);f.type=3;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.a.debug("Fetching certificate");return a.j.pb.fetch(f).O}).then(f=>{a.f.serverCertificate=_.L(f.data)}).catch(f=>{var g=f.data.headers;g=Object.assign({message:"Error while fetching certificate!",
114
- url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},gj(g));throw new _.H(_.G,6,6100,g,f);})};_.Sj=function(a){return _.v(function*(){if(a.F&&a.f&&a.f.serverCertificate&&a.f.serverCertificate.length)try{const b=yield a.F.setServerCertificate(a.f.serverCertificate);void 0===b||b||a.a.warn("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});}})};
115
- _.Uj=function(a){const b=a.f?a.f.initData||[]:[];for(const c of b){let d=!_.vh(2);if(a.h.enforceSingleSession&&!a.keySystem().startsWith(_.wc)){const e=a.g.values();for(const f of e)_.li(c.initData,f.initData)?(a.a.debug(Ca),d=!1):f.periodId===c.periodId&&(a.a.debug("Ignore duplicated init data with same period id"),Kj(c.initData,f)||f.Gc.push(c.initData),d=!1)}!d||a.C&&a.I===Fj||Lj(a,c.keyId,c.periodId,c.initDataType,c.initData)}for(const c of a.H)_.Tj(a,c);b.length||a.H.length||(a.m||a.a.info(qa),
109
+ Kj=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)Cj(f,a.h.Pa);d=a.C?_.Vd:_.Cd;e=a.C?[_.Jd]:[me];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.lc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Cd,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Lg(b.mimeType,b.codecs):"",h=c?_.Lg(c.mimeType,c.codecs):"";for(const k of f.drmInfos){const l=a.get(k.keySystem);
110
+ l.drmInfos.push(k);k.initData&&k.initData.length&&(l.initDataTypes=[...new Set(k.initData.map(m=>m.initDataType))]);k.distinctiveIdentifierRequired&&(l.distinctiveIdentifier=_.Vd);k.persistentStateRequired&&(l.persistentState=_.Vd);b&&_.Mg(k.audioRobustness).forEach(m=>{l.audioCapabilities.push({robustness:m||"",contentType:g})});c&&_.Mg(k.videoRobustness).forEach(m=>{l.videoCapabilities.push({robustness:m||"",contentType:h})})}}return a};
111
+ Qj=function(a){return _.v(function*(){if(!a.o.m())if(a.L)yield a.L;else try{a.L=a.o.g(a.F),yield a.L}catch(b){a.ka||a.U(new _.H(_.G,6,6003,b.message,b))}})};
112
+ _.Uj=function(a,b,c){if(c.length&&(!a.C||a.I!==Nj)){var d=a.keySystem();if(!d.startsWith(_.yc)){var e=new Rj(c);if(1<e.a.length&&(d={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[d]))for(let f=0;f<e.f.length;f++)if(d===e.f[f]){c=c.subarray(e.a[f].start,e.a[f].end+1);break}}e=a.g.values();if(!a.A.webkitCurrentPlaybackTargetIsWireless&&
113
+ !_.Ah(2)&&!a.keySystem().startsWith(_.yc))for(const f of e){if(_.qi(c,f.initData)){a.a.debug(Da);return}if(Sj(c,f)){a.a.debug("Ignoring duplicate init data (extra).");return}}Tj(a,"",null,b,c)}};Vj=function(a,b){return _.v(function*(){yield Qj(a);b.initData&&_.Uj(a,b.initDataType,_.L(b.initData))})};Xj=function(a){return _.v(function*(){const b=a.T.map(c=>Wj(a,c));a.ca=!0;a.T=[];yield Promise.all(b)})};
114
+ Zj=function(a){const b=a.keySystem(),c=a.h.Pa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.j.getConfiguration();return Yj(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.zg([d],a.h.attemptParameters);f.type=3;f.licenseRequestType="certificate-request";g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.a.debug("Fetching certificate");return a.j.pb.fetch(f).O}).then(f=>{a.f.serverCertificate=_.L(f.data)}).catch(f=>
115
+ {var g=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}:{},uj(g));throw new _.H(_.G,6,6100,g,f);})};
116
+ _.ak=function(a){return _.v(function*(){if(a.F&&a.f&&a.f.serverCertificate&&a.f.serverCertificate.length)try{const b=yield a.F.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});}})};
117
+ _.ck=function(a){const b=a.f?a.f.initData||[]:[];for(const c of b){let d=!_.Ah(2);if(a.h.enforceSingleSession&&!a.keySystem().startsWith(_.yc)){const e=a.g.values();for(const f of e)_.qi(c.initData,f.initData)?(a.a.debug(Da),d=!1):f.periodId===c.periodId&&(a.a.debug("Ignore duplicated init data with same period id"),Sj(c.initData,f)||f.Gc.push(c.initData),d=!1)}!d||a.C&&a.I===Nj||Tj(a,c.keyId,c.periodId,c.initDataType,c.initData)}for(const c of a.H)_.bk(a,c);b.length||a.H.length||(a.m||a.a.info(qa),
116
118
  a.m=!0,a.B=!1,a.D.resolve());return a.D};
117
- _.Vj=function(a,b){if(!a.F)return _.Ef(a.w,b,[Lc,"msneedkey",Ne,"needkey"],()=>{a.U(new _.H(_.G,6,6010))}),Promise.resolve();a.A=b;a.o.j(b);a.w.one(a.A,_.Jd,()=>Pj(a));a.w.on(a.A,_.Ie,f=>{const g=a.B;a.B=!a.m;!g&&a.B&&(a.a.info("Waiting for DRM license key delivery"),a.j.onEvent(f))});const c=a.f.initData.find(f=>0<f.initData.length);let d=Promise.resolve();if(c||a.o.f()!==Wa||a.H.length)d=Ij(a);let e=Promise.resolve();_.yh()&&38===zh().major||(a.f&&a.f.keySystem!==_.Bd&&!a.f.serverCertificate&&(e=
118
- Rj(a)),e=e.then(()=>_.Sj(a)));return Promise.all([d,e]).then(()=>{if(!a.ka&&(_.Uj(a),_.vh(2)||!c&&!a.H.length))a.w.on(a.A,Lc,f=>Nj(a,f))}).catch(f=>{if(!a.ka){if(6004===f.code&&a.f&&a.f.keySystem===_.yc&&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++,_.Vj(a,b);1<=a.N&&a.a.info("Could not get valid widevine server certificate. Giving up");throw f;}})};
119
- Qj=function(a,b){return _.v(function*(){const c=a.j.jc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
120
- _.Tj=function(a,b){let c;try{a.a.debug("Attempting to load an offline session",b),c=a.F.createSession(_.Hd)}catch(e){const f=new _.H(_.G,6,6005,{browserError:e.message});a.U(f);return Promise.reject(f)}a.w.on(c,hd,a.ua.bind(a));a.w.on(c,Xc,a.na.bind(a));const d={initData:null,loaded:!1,xd:Infinity,eb:null,periodId:null,Gc:[],keyId:null,initDataType:null,Nb:null,sessionContext:{ldlDelay:0,customData:{}}};a.g.set(c,d);return c.load(b).then(e=>{if(a.ka)return null;a.a.debug("Loaded offline session",
121
- b,e);if(!e)return a.g.delete(c),a.U(new _.H(_.G,6,6013)),null;d.loaded=!0;Wj(a)&&(a.m||a.a.info(qa),a.m=!0,a.B=!1,a.D.resolve());return c},e=>{a.ka||(a.g.delete(c),a.U(new _.H(_.G,6,6005,{browserError:e.message})))})};Kj=function(a,b){for(let c=0;c<b.Gc.length;c++)if(_.li(a,b.Gc[c]))return!0;return!1};
122
- Lj=function(a,b,c,d,e,f){f=void 0===f?null:f;if(e.length){try{var g=a.C?_.Hd:je;a.a.debug(`Creating new ${g} session.`);var h=a.F.createSession(g)}catch(k){a.U(new _.H(_.G,6,6005,{browserError:k.message}));return}a.w.on(h,hd,a.ua.bind(a));a.w.on(h,Xc,a.na.bind(a));b={Nb:f,Gc:[],initData:e,initDataType:d,keyId:b,loaded:!1,xd:Infinity,periodId:c,eb:null,sessionContext:{ldlDelay:0,customData:{}}};f&&(f=a.g.get(f),b.sessionContext=f.sessionContext);a.g.set(h,b);f=a.j.getConfiguration();c=a.keySystem();
123
- c=a.h.Oa[c];g=(g=c.modifiers)&&g.transformInitData;_.ef(g)||(g=wj);try{e=g({playerConfig:f,initData:e,initDataType:d,drmInfo:a.f,drmSystemConfig:c,sessionContext:b.sessionContext,emeApi:a.o.f()})}catch(k){d=k;k instanceof _.H||(d=new _.H(_.G,6,6016,k));a.U(d);return}h.generateRequest(d,e.buffer).catch(k=>{if(!a.ka){a.g.delete(h);var l=null;k.errorCode&&k.errorCode.systemCode&&(l=k.errorCode.systemCode,0>l&&(l+=Math.pow(2,32)),l="0x"+l.toString(16));a.U(new _.H(_.G,6,6006,{browserError:k.message,error:k,
124
- extended:l},k))}})}};Xj=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};Wj=function(a){a=a.g.values();return _.Wf(a,b=>b.loaded)};
125
- Oj=function(a,b){const c=b.target;a.a.debug("Sending license request for session",c.sessionId);const d=a.g.get(c);let e=a.f.licenseServerUri;var f=a.keySystem();f=a.h.Oa[f];"individualization-request"===b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);const g=_.wg([e],a.h.attemptParameters);g.type=3;g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType===$c&&d.Nb?Zc:b.messageType;g.sessionId=c.sessionId;if(g.licenseRequestType===Zc)a.j.onEvent(new _.F(Gc));
126
- rj(a.f.keySystem)&&Yj(a,g);oi(a.K,g);const h=Date.now();return Zj(a,g,d.sessionContext).then(()=>{a.a.debug("Sending DRM license request to",e,g);return a.j.pb.fetch(g).O}).then(k=>{if(a.ka)return Promise.reject();a.a.info(`Received license response in ${Date.now()-h}ms`);const l=pi(a.K,k);return c.update(k.data).then(()=>{var m=Xj(a);const n=l?Date.now()+1E3*l.delay:Number.NaN;m=new _.F(_.Ic,{keySystem:a.keySystem(),expirationTime:m,expectedRenewalTime:n});a.j.onEvent(m);d&&(d.eb&&d.eb.resolve(),
127
- d.Nb&&(qj(d.Nb).catch(()=>{a.a.warn("Unable to close expired session in time")}),(m=a.g.get(d.Nb))&&m.dc&&m.dc.stop(),a.g.delete(d.Nb),d.Nb=null),(new _.rh(()=>{a.ka||(d.loaded=!0,Wj(a)&&(a.m||a.a.info("DRM licenses loaded!!!"),a.m=!0,a.B=!1,a.D.resolve()))})).$(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||l&&ni(a.keySystem()))&&(m=new _.rh(()=>{!a.ka&&a.K&&(a.a.info("Updating CSL Sessions"),rj(a.keySystem())?Lj(a,d.keyId,d.periodId,d.initDataType,d.initData,c):a.keySystem().startsWith(_.wc)&&
128
- c.update(_.kg("renew")))}),d.dc=m,m.$(l?l.delay:d.sessionContext.ldlDelay)))})},k=>_.v(function*(){if(!a.ka){var l=k.data.headers;l=Object.assign({message:_.wa,url:k.data.url,status:k.data.status,response:k.data.response},l?{headers:l}:{},gj(l));l=new _.H(_.G,6,6007,l,k);a.U(l);d&&d.eb&&d.eb.reject(l)}})).catch(k=>{a.ka||(k=new _.H(_.G,6,6008,{browserError:k.message}),a.U(k),d&&d.eb&&d.eb.reject(k))})};
129
- Yj=function(a,b){var c=_.ig(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(_.ve).textContent;b.body=_.ii(a.querySelector("Challenge").textContent).buffer}else a.a.debug("PlayReady request is already unwrapped."),b.headers[oa]="text/xml; charset\x3dutf-8"};
130
- Zj=function(a,b,c){return _.v(function*(){const d=a.j.getConfiguration();yield Qj(a,d);const e=a.keySystem();var f=a.h.Oa[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.wc)&&b.requestModifiers.push(k=>_.Ni(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.wc)&&b.responseModifiers.push(k=>_.Oi(k))})};_.ck=function(a,b){a&&b&&(ak.set(a,b),bk.info(`Registered TextDisplayerFactory: '${a}'`))};
131
- _.dk=function(a,b){b=b.find(c=>(c=ak.get(c))?c.Y(a):!1);bk.info(`Chosen the text displayer: ${b}`);return b?ak.get(b):null};_.ek=function(a){return null!=a};_.fk=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})}}};gk=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};
132
- hk=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};ik=function(a){return a.a.map(b=>_.bf(b))};_.jk=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:[]}};
133
- lk=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=kk.value().get(b),c.one(a,b,d))};
134
- sk=function(a){a.g.debug("Start watching for video events for "+a.l.namespace());const b=a.l,c=d=>mk(a,d.type);a.a.on(b,_.Nc,()=>{a.j=!1;nk(a,_.rk)});a.a.on(b,bc,c);a.a.on(b,_.Kd,()=>{a.D=!0;a.j=!1;mk(a,_.Kd)});a.a.on(b,_.Dd,()=>{a.D=!1;a.j=!1;mk(a,_.Dd)});a.a.on(b,_.me,c);a.a.on(b,_.Pd,c);a.a.on(b,_.Wd,d=>{a.m=!1;a.j=!1;mk(a,d.type)});a.a.on(b,_.Xd,d=>{a.m=!0;mk(a,d.type)});a.a.on(b,$d,c);a.a.on(b,_.He,()=>{a.j=!0;mk(a,_.He)});a.a.on(b,_.Oc,d=>a.U(d));a.a.on(b,_.dd,c);a.a.on(b,cc,()=>{a.C=!0;mk(a,
135
- cc)});a.a.on(b,_.ue,d=>{a.m=!0;mk(a,d.type)});a.a.on(b,_.te,d=>{a.m=!1;a.j=!1;mk(a,d.type)})};tk=function(a,b){return Object.keys(b)[a]};vk=function(a,b){const c={type:_.be};b===_.ac||b===_.$b?(c.reason=a.w,b===_.ac?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.uk&&(c.reason=a.w),a.A===_.uk&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
136
- nk=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.uk;a.A=a.f;a.f=b;a.A===_.rk&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.uk?(a.K=a.o,a.w=a.m?1:2,a.g.info("Buffering started. Reason: "+tk(a.w-1,_.wk)),b=vk(a,_.ac),a.Ib(_.ac,b)):d&&(a.B=a.o-a.K,a.g.info("Buffering finished. Reason: "+tk(a.w-1,_.wk)+". Buffering time: "+a.B+" ms"),b=vk(a,_.$b),a.Ib(_.$b,b));b=tk(a.A,_.xk);c=tk(a.f,_.xk);a.g.info(`Player state change: ${b} -> ${c}`);a.Ib(_.be,vk(a,""));return!0};
137
- mk=function(a,b){if(a.f===_.yk)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===_.rk&&1>=Math.abs(d-e)||c&&d>=e)nk(a,_.rk)&&a.g.debug("Player claims to be in ended state, not checking more");else if(b!==_.me){e=a.l.getPosition();e=null!==e&&void 0!==e&&0<=e?a.l.getBufferInfo().va(e,!0):-1;a.F=e;e=a.l.getSurface().getMedia();a.h=e?e.readyState:null;a.J=a.l.getPlaybackRate()||1;
138
- e=typeof a.h===_.p&&2>a.h&&2===e.networkState;var f=typeof a.h===_.p&&0>=a.F&&a.f===_.zk,g=typeof a.h===_.p&&2>=a.h&&a.j;e=a.m||f||e||g;!a.L||a.l.isLive()||a.f!==_.uk||e||(f=b===_.Wd&&4===a.h,(g=a.A===_.Ak)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=nk(a,_.uk):c?f=nk(a,_.Bk):a.D&&(f=nk(a,_.Ck));f&&(a.C=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.m+", waiting: "+a.j+", playing: "+a.D+", paused: "+c+", readyState: "+a.h+", rate: "+a.J+", buffer: "+a.F+", ended: "+d+". Changed state: "+
139
- f+", Current state: "+tk(a.f,_.xk))}}};Dk=function(a){a=(new _.dh(a)).ma;if(!a)return null;a=a.toUpperCase();return _.og(a,".MPD")?_.Ib:_.og(a,".M3U8")?_.Pb:_.og(a,".MP4")?_.Be:_.og(a,"MANIFEST")||_.og(a,".ISM")?_.Ob:null};_.Fk=function(a){let b;_.Zh(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.ee||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Ek(b[c]);d&&a.push(d)}return a};
140
- Ek=function(a){let b=null;_.ff(a)&&(a={url:a});typeof a===_.rd&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.y(a.drmProtected)||typeof a.drmProtected!==_.Zb||(b.drmProtected=a.drmProtected),_.y(a.isLive)||typeof a.isLive!==_.Zb||(b.isLive=a.isLive),_.y(a.name)||typeof a.name!==_.ee||(b.name=a.name),_.y(a.tb)||typeof a.tb!==_.ee||(b.tb=a.tb),_.y(a.audioMimeType)||typeof a.audioMimeType!==_.ee||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Dk(a.url),b.type?Gk.debug("Detect media type "+
141
- b.type+" for "+a.url):Gk.warn("Unable to detect media type for "+a.url));return b};Ik=function(a){return a.w?Hk():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.Oc);a.g.off(c,_.Ud);a.a=null}b()})};Hk=function(){return Promise.reject(new _.H(_.G,7,7E3))};Kk=function(a,b){return a.w?Hk():new Promise(c=>{a.a||(a.g.on(b,_.Oc,()=>{{const d=Jk(a);if(d)a.onError(d)}}),a.g.on(b,_.Ud,()=>{a.trigger(new _.F(_.Yb,{detail:{width:b.videoWidth,height:b.videoHeight}}))}),a.a=b);c()})};
142
- Mk=function(a){return _.v(function*(){if(a.w)return Hk();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=_.ti(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.m=new _.Lk({pb:c,onError:d=>a.onError(d),Cd:()=>{},onExpirationUpdated:(d,e)=>{a.trigger(new _.F(_.Fc,{expirationTime:e}))},onEvent:d=>a.trigger(d),getConfiguration:()=>
143
- a.getConfiguration(),jc:()=>a.jc()});a.m.h=b;yield _.Gj(a.m,[{id:0,language:_.pe,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,qb:0,mimeType:_.Be,codecs:"",encrypted:!0,keyId:null,language:_.pe,label:null,type:_.u,primary:!1,frameRate:void 0,Zf:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],
144
- channelsCount:null,Nf:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}],[]);yield _.Vj(a.m,a.a);return Promise.resolve()})};Nk=function(a,b){lk(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.yk&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
145
- Jk=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,Uf:c,message:a.a.error.message})};
146
- Pk=function(a){if(a.w)return new _.Ok(Hk(),()=>{});const b=a.o[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&Nk(a,c);if(d.preload!==_.qd)a.g.one(d,_.dd,()=>{const g=Date.now()/1E3-e;a.f.o=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.vh()||_.yh())&&d.load();const f=new _.Hj;a.g.one(d,$d,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.C||(a.C=(new _.rh(()=>{f.reject(new _.H(_.G,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
147
- uri:b.url},d.error))})).$(g))});lk(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject(Jk(a)):d.preload===_.qd&&(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,_.Oc,()=>{f.reject(Jk(a))});return new _.Ok(f,
148
- ()=>{const g=new _.H(_.G,7,7001);f.reject(g);return Promise.resolve()})};_.Sk=function(a){a&&(0<=Qk.indexOf(a)?Rk.warn(`Factory '${a.name()}' is already registered`):(Qk.push(a),Rk.info(`Factory ${a.name()}' has been registered.`)))};Uk=function(a,b){let c=Qk.find(d=>d.Y(a,b));c||(c=new Tk);Rk.info(`Chosen ads: ${c.name()}`);return c};_.Vk=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};
149
- _.Wk=function(a,b){a.classList.add(b)};_.Xk=function(a,b){if(a&&typeof b===_.rd)for(const c in b)a.style[c]=b[c]};_.Yk=function(a){return document.createElement(a)};
150
- al=function(a,b){a.h.debug("Initializing Player Surface on ",a.g);a.g instanceof Element&&(a.g instanceof HTMLMediaElement?(a.a=a.g,(_.yh()&&53===zh().major||_.yh()&&68===zh().major||_.Ah())&&!a.a.hasAttribute(Ac)&&(a.a.style.opacity="0",a.a.setAttribute(Ac,""),a.m.one(a.a,Kc,()=>{a.a.removeAttribute(Ac);a.a.style.opacity="1";a.f&&(a.f.style.opacity="1")}))):"cast-media-player"===a.g.tagName.toLowerCase()&&(a.j=a.g));b.containerEl?(a.f=b.containerEl,_.Wk(a.f,mc)):b.disableContainer||a.j||(a.f=Zk(),
151
- a.g.parentNode?a.g.parentNode.replaceChild(a.f,a.g):a.g.parentNode||a.h.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!"),a.a&&a.f.appendChild(a.a));if(a.a){if(!a.a.hasAttribute("crossorigin")){const c=b.crossorigin;a.h.info("Setting media elements crossorigin to "+c);a.a.setAttribute("crossorigin",c)}a.f&&(b.containerEl||$k(a),_.Wk(a.a,_.nc))}};Zk=function(){const a=document.createElement(_.Ec);_.Wk(a,mc);return a};
152
- $k=function(a){if(a.a&&a.f){{var b=a.a;const d=[];for(let e=0;e<b.classList.length;e++)d.push(b.classList[e]);b=d}for(var c of b)a.a.classList.remove(c),_.Wk(a.f,c);a.f.style.cssText=a.a.style.cssText;a.a.removeAttribute(_.ge);for(const d of[_.Oe,_.Rc])c=a.a.getAttribute(d),c=parseInt(c,10),isNaN(c)||(a.f.style[d]=`${c}px`),_.vh()||a.a.removeAttribute(d)}};
153
- fl=function(a){a.a.on(window,"offline",()=>{bl(a,!1)});a.a.on(window,"online",()=>{a.f||dl(a)});a.a.on(a.l,$d,()=>el(a));a.a.on(a.l,"suspend",()=>el(a));a.a.on(a.l,_.He,()=>el(a));a.a.on(a.l,_.Kd,()=>{a.f||dl(a)});a.a.on(a.l,_.Nd,()=>{a.f||dl(a)});a.a.on(a.l,_.be,()=>{switch(a.l.getState()){case _.uk:el(a);break;default:el(a)}})};gl=function(a){a.g&&(a.g.stop(),a.g=null)};el=function(a){a.f&&dl(a)};
154
- hl=function(a){return _.v(function*(){var b=a.l.getConfiguration().connectivityCheck;b&&a.l&&(b=yield oh(a.h,b.url,b.attemptParameters,b.method),bl(a,b))})};dl=function(a){a.l.getConfiguration().connectivityCheck&&(gl(a),a.g=(new _.rh(()=>hl(a))).$(5))};bl=function(a,b){gl(a);a.f!==b&&(a.f=b,a.l&&a.l.getConfiguration().connectivityCheck&&a.l.trigger(new _.F(yd,{online:a.f})))};jl=function(){for(let a=0;a<il.length;++a)il[a].cc()};
155
- _.kl=function(a,b){b=b||0;a={priority:b,cc:a};for(let c=0;c<il.length;c++)if(il[c].priority<b){il.splice(c,0,a);return}il.push(a)};ll=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};nl=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 ml(b[0],b[1],b[2]);a.a=b}return a.a};
156
- ol=function(a){switch((a.Jc()[0]||{src:"",type:""}).type){case _.Ib:a="dash";break;case _.Ob:a="ss";break;case _.Pb:a="hls";break;case _.Be:a=_.md;break;default:a=""}return a};pl=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};ql=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
157
- rl=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};sl=function(a){a=a.getDrmInfo();return(new _.dh(a&&a.licenseServerUri||"")).Da};tl=function(a){const b=a.getConfiguration();let c="no";b.drm&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Jc)||sl(a).endsWith("drmtoday.com"))&&(c=Jc);return c};ul=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.keySystem){case _.yc:b="wv";break;case _.xc:b="pr";break;case _.wc:b="fps"}return b};
158
- vl=function(a){a=a.getDrmInfo();let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};wl=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.videoRobustness){case Aa:case "HW_SECURE_ALL":b="L1";break;case za:b="L2";break;case _.Ya:case _.Xa:b="L3"}return b};
159
- Al=function(a,b){if(!window.location.protocol.startsWith("http"))return a.f.debug("Registration protocol check",location.protocol,location.protocol.startsWith("http")),Promise.resolve();const c="ie"===_.Th().browser;var d=b.getConfiguration();const e=[...Array.from(_.$h.keys()),...b.ef()];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":pl(d),"CL-ASSET-ID":ql(d),"CL-SESSION-ID":rl(d),"CL-PLAYBACK-TYPE":b.isLive()?xl:yl,"CL-CONTENT-TYPE":ol(b),"CL-PLUGINS":e.join(" "),
160
- "CL-DRM":tl(b),"CL-DRM-CDM":ul(b),"CL-DRM-SEC-LEVEL":wl(b),"CL-DRM-OFFLINE":vl(b),"CL-DRM-IP":sl(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=_.wg(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.zl).fetch(d).O.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=nl(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;
161
- 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=k+"!";k=f;break;case 412:g=7103;k="userID is required for playback!";break;default:g=Promise.resolve();break a}a.f.error(Ea+k);g=Promise.reject(new _.H(_.G,7,g,k))}}return g})};_.Cl=function(a){a&&(0<=Bl.indexOf(a)||Bl.push(a))};
162
- El=function(a){if(!a.L){a.L=!0;a.h.getMedia()||a.h.getCastElement();a.w||(a.w=new Dl(a.f.license));var b=Object.keys(a.K);Al(a.w,{getConfiguration:a.getConfiguration.bind(a),Jc:a.Jc.bind(a),getDrmInfo:a.getDrmInfo.bind(a),ef:()=>b,isLive:a.isLive.bind(a)}).then(()=>{a.g.debug("License verified remotely")}).catch(c=>{setTimeout(ll,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)})}};
163
- Fl=function(a,b){a.w=new Dl(b);a.w.verify().catch(c=>{setTimeout(()=>{a.g.error(Ea+c);a.trigger(new _.F(_.Oc,{detail:new _.H(_.G,7,7101)}));a.destroy()},1E3)})};Hl=function(a,b){a.J=b;for(const c of a.J)(b=c.id())&&(a.K[b]=c);_.Gl(a,"onPlayerCreated")};_.Il=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)))};
164
- _.Gl=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)};
165
- Jl=function(a){return _.v(function*(){if(a.H)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.off(_.be,a.B);a.A.off(a,_.be,a.B);a.A.off(document,Fe);a.trigger(new _.F(_.Rd));a.L=!1;a.h&&a.h.release();a.j&&(yield a.j.dispose(),a.j=null);di(b=>{b.release()});if(a.a){let b=null;const c=a.a.on(_.be,d=>{b=d});return _.Gl(a,_.wd).then(()=>{a.a.removeDelegate(a);return Promise.all([a.a.release(),a.F.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
166
- a.trigger(b))}).finally(()=>{a.a.off(_.be,c);a.trigger(new _.F(Qd))})}a.trigger(new _.F(Qd));return new Promise(b=>b())})};
167
- Ml=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(_.zf);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={yb:h[l],confidence:h[l].canPlay(b[k],c)};if(null===f||f.confidence<m.confidence)f=m,g=k}f&&typeof g===_.p&&0<f.confidence?(_.Af.debug("Player Factory '"+f.yb.a()+"' can play",b[g]),f=new Kl(f.yb,g)):(_.Af.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.yb.create(),d(new Ll(e,f.a))):
168
- (d=new _.F(_.Oc,{detail:new _.H(_.G,7,7003)}),a.trigger(d),e(d))})};
169
- _.Pl=function(a,b){return _.v(function*(){if(a.D)throw Error("Player is already destroyed.");if(!a.h)throw Error("No surface associated with this player!");yield a.release();a.o=_.Fk(b);a.f=_.Yh(a.N,_.Zh(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 Ml(a,a.o,a.f),c=d.a,d=d.f,a.I=!1;c?_.Il(a,c):a.a.addDelegate(a);Nl(a);a.a&&a.a.setCdnErrorCallback(a.C);Ol(a,a.f);a.setSourceIndex(d);
170
- if(a.f.pauseWhenInBackground)a.A.on(document,Fe,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});di(e=>{e.g()});yield _.Gl(a,"onContentWillLoad",a.f.source[d])})};_.Ql=function(a){return _.v(function*(){a.h.getMedia()||a.h.getCastElement();a.A.on(a,_.be,a.B);a.trigger(new _.F(ed));yield Promise.all([a.a.load(a.f),a.j.load()])})};
171
- _.Sl=function(a){return _.v(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);Rl(a);di(()=>{});yield _.Gl(a,_.td);a.f.autoplay&&(yield a.play())})};Nl=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.v(function*(){a.fc&&a.$c&&(a.$c=!1,yield a.fc(b))}))};Ol=function(a,b){a.j=Uk(a,b).create(a)};
172
- Rl=function(a){const b=_.Jg(a.f.preferredTextLanguage).filter(d=>d),c=a.getTrackManager().ea();b.some(d=>{const e=_.Gg(d);return(d=c.find(f=>{f=_.Gg(f.language||"");return _.Hg(f,e)}))?(a.getTrackManager().ta(d),!0):!1})};
173
- Tl=function(a,b){a.f=b;_.Df(a.a);if(!b)return Promise.resolve();a.a.on(b,Lc,c=>{_.D("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);c instanceof MediaEncryptedEvent&&(_.tf("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,Ne,c=>{{_.D("AppleEmeManager.onWebkitNeedKey_",c);c=_.L(c.initData);if(_.dg(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=_.ig(c.subarray(4),!0);c=_.kg(c);const d=new Event(Lc);
174
- d.initDataType="skd";d.initData=eg(c);a.f.dispatchEvent(d)}});lk(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.g));return Promise.resolve()};Ul=function(a,b){var c=a.keyStatuses;c.size=void 0===b?0:1;c.a=b;b=new _.F(Xc);a.dispatchEvent(b)};
175
- Xl=function(a,b){a.a=b;_.Df(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(Lc);d.initDataType=_.jc;d.initData=eg(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=Vl(a,c.sessionId);if(e){c=new _.F(hd,{messageType:void 0===e.keyStatuses.a?$c:Zc,message:c.message});var d=e;_.D("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.uf("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{if(c=Vl(a,c.sessionId))_.D("WebkitEmeManager.MediaKeySession.ready"),
176
- Wl(c,"usable"),c.a&&c.a.resolve(),c.a=null}),a.f.on(b,a.g+"keyerror",c=>{var d=Vl(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?Wl(d,_.Cd):1===e?Wl(d,"expired"):Wl(d,_.Uc))}}}))};
177
- Vl=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};Wl=function(a,b){var c=a.keyStatuses;c.size=void 0===b?0:1;c.a=b;b=new _.F(Xc);a.dispatchEvent(b)};Yl=function(a,b){return a.o?a.o+b.charAt(0).toUpperCase()+b.slice(1):b};
178
- Zl=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===_.Hd)if(c)d=_.L(_.kg("LOAD_SESSION|"+c));else{const f=_.kg("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.L(b),f.byteLength);d=g}else d=_.L(b)}catch(f){return Promise.reject(f)}a.f=new _.Hj;const e=Yl(a,"generateKeyRequest");try{a.h[e](a.g,d)}catch(f){if(f.name!==Da)return a.f=null,Promise.reject(f);(new _.rh(()=>{try{a.h[e](a.g,d)}catch(g){a.f.reject(g),
179
- a.f=null}})).$(.01)}return a.f};$l=function(a,b,c){if(a.a)a.a.then(()=>$l(a,b,c)).catch(()=>$l(a,b,c));else{a.a=b;if(a.g===Je){var d=_.gg(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=_.ii(e.keys[0].k);e=_.ii(e.keys[0].kid)}else d=_.L(c),e=null;var f=Yl(a,"addKey");try{a.h[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
180
- am=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.Qc?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};bm=function(a){a=a.target;if(a.webkitPresentationMode===Id){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)};
181
- cm=function(){return this.webkitSupportsPresentationMode(Id)?(this.webkitSetPresentationMode(Id),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};dm=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
182
- em=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};fm=function(a,b,c){return new window.TextTrackCue(a,b,c)};gm=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};im=function(a,b,c){if("input"===a)switch(this.type){case "range":a=lc}hm.call(this,a,b,c)};jm=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
183
- km=function(a){return jm()-a.a};mm=function(a){const b=new lm;b.a=a.a;return b};_.nm=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};_.om=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.qm=function(a,b,c,d){return _.v(function*(){try{return new (yield pm(a,b,c,d))}catch(e){throw e.a(_.G),e;}})};
184
- pm=function(a,b,c,d){return _.v(function*(){if(d){var e=_.rm[d.toLowerCase()];if(e)return e;_.z("Could not determine manifest type using MIME type ",d)}if(e=_.sm(a)){const f=_.tm[e];if(f)return f;_.z("Could not determine manifest type for extension ",e)}else _.z("Could not find extension for ",a);if(!d&&(d=yield um(a,b,c))){if(e=_.rm[d])return e;_.z("Could not determine manifest type using MIME type",d)}throw new _.H(_.G,4,4E3,{url:a});})};
185
- _.sm=function(a){a=(new _.dh(a)).ma.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};um=function(a,b,c){return _.v(function*(){var d=_.wg(a);ug(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).O).headers["content-type"])?d.toLowerCase():""})};vm=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};
186
- wm=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(vm(a,e),zg(c,e.byteLength,km(a.g)),a.g.a=jm());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>wm(a,b,c))})};
187
- ym=function(a){const b=a.uris[a.uriIndex],c=new xm,d=new lm,e=mm(d);let f=0;const g=new _.Hj;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;let h=!1,k=!1;c.onreadystatechange=function(l){l=l.target;l.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!h&&(l=l.getResponseHeader(ma),yg(a,l),h=!0)};c.onload=function(l){l=l.target;var m=(l.getAllResponseHeaders()||"").trim().split("\r\n");const n={};for(const q of m)m=q.split(": "),n[m[0].toLowerCase()]=
188
- m.slice(1).join(": ");try{const q=km(e);k||zg(a,l.response?l.response.length:0,q);const t=_.xg(n,l.response,l.status,b,l.responseURL,a,q);a.rateLimitBps?Ag(a.rateLimitBps,km(e),a.bytesLoaded).then(()=>{g.resolve(t)}):g.resolve(t)}catch(q){g.reject(q)}};c.onerror=function(l){l=l.target;if(0>=l.status)g.reject(new _.H(1,1,1002,{url:b,request:a,status:l.status}));else{var m=l.getAllResponseHeaders();const q={};if(m){m=m.trim().split("\r\n");for(var n of m)m=n.split(": "),q[m[0].toLowerCase()]=m.slice(1).join(": ")}n=
189
- _.xg(q,l.response,l.status,b,l.responseURL,a,km(e));g.resolve(n)}};c.ontimeout=function(){g.reject(new _.H(1,1,1003,{url:b,request:a}))};c.onprogress=function(l){const m=km(d);d.a=jm();if(100<m||l.lengthComputable&&l.loaded===l.total)zg(a,l.loaded-f,m),f=l.loaded,k=!0};for(const l in a.headers)c.setRequestHeader(l.toLowerCase(),a.headers[l]);c.send(a.body);return{O:g,request:a,abort:()=>{c.abort();g.reject(new _.H(1,1,7001,{url:b,request:a}));return Promise.resolve()}}};
190
- zm=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};Am=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)};
191
- Cm=function(a){if(0<=a.m&&a.f<a.m)return null;let b=Bm(a);for(;null!==b;){if(b.name===_.fd){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=Bm(a)}return null};
192
- Dm=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,km(a.o)),a.o.a=jm());if(f)return e=zm(a),(e=c(!0,e))?e.then(()=>a.h.a.buffer):Promise.resolve(a.h.a.buffer);let h=Promise.resolve();if(null!=g){Am(a,g);var k=Cm(a);for(e=[];k;)e.push(k),k=Cm(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=
193
- c(!1,k))&&(h=e)}}return h.then(()=>Dm(a,b,c,d))})};
194
- Bm=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Em(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Em(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};
195
- Em=function(a){const b=a.j.getUint32(a.a,!1);a.a+=4;return b};
196
- Hm=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=Fm(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Fm(e.request.fuzzFactor,.5));a.f*=Fm(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.j=h;Gm(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)});
197
- 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.O}).then(e=>{a.o.resolve(e)}).catch(e=>{if(e instanceof _.H){if((1===e.severity||b<d)&&7001!==e.code&&b<c)return Hm(a);7001!==e.code&&e.a(_.G);a.o.reject(e)}else a.o.reject(e)})};Gm=function(a,b,c){a.m=setTimeout(b,c)};Fm=function(a,b){return null===a||void 0===a?b:a};
198
- Lm=function(a){var b=new Im;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Jm,d={pc:!1,Be:!1};b={O:Km(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.pc||(d.pc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Be=!0;c.abort()},a);b.O=b.O.finally(()=>{window.clearTimeout(e)})}return b};
199
- Km=function(a,b,c,d){return _.v(function*(){let e,f;const g=new lm,h=mm(g);try{e=yield Mm(a,c);const l=e.headers.get(ma);yg(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=e.body.getReader();f=yield Dm(new Nm(m,!b.disableMergedFragments),n,(q,t)=>{if(d.pc)return null;t&&t.data&&(zg(b,t.data.byteLength,km(g)),g.a=jm());return b.onFragment&&t?b.rateLimitBps?Ag(b.rateLimitBps,km(h),b.bytesLoaded).then(()=>b.onFragment(t)):b.onFragment(t):null},b.onProgress)}else{const n=
200
- e.body.getReader();f=yield wm(new Om(m),n,b);b.rateLimitBps&&(yield Ag(b.rateLimitBps,km(h),f.byteLength))}}catch(l){if(d.pc)throw new _.H(1,1,7001,{url:a,request:b});if(d.Be)throw new _.H(1,1,1003,{url:a,request:b});_.uf("Error while fetching data:",l);throw new _.H(1,1,1002,{url:a,error:l,request:b,status:-1},l);}const k={};e.headers.forEach((l,m)=>{k[m.trim()]=l});if(d.pc)throw new _.H(1,1,7001,{url:a,request:b});return _.xg(k,f,e.status,a,e.url,b,km(h))})};
201
- Qm=function(a){try{const b=a.uris[a.uriIndex],c=_.Pm(b);return{O:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{O:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
202
- _.Pm=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.uf("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 _.uf("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?_.ii(a).buffer:_.kg(a).buffer,contentType:c}};_.Sm=function(a){delete _.Rm[a]};
203
- _.Xm=function(a){let b=_.qd;const c=a.H;switch(a.C){case Tm:b=`-2px -2px 0 ${c}, -1px -1px 0 ${c}`;break;case Um:b=`2px 2px 0 ${c}, 1px 1px 0 ${c}`;break;case Vm:b=`-1px 0 ${c}, 0 1px ${c}, 1px 0 ${c}, `+`0 -1px ${c}`;break;case Wm:b=`2px 2px 3px ${c}, 2px 2px 4px ${c}, `+`2px 2px 5px ${c}`}return b};Ve="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
204
- We=typeof Object.defineProperties==_.Qc?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
205
- Xe("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=Ve.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=
206
- 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 _.rd:var h=null!=g;break a;case _.Qc:h=!0;break a;default:h=!1}h?this.A(g):this.m(g)}};
207
- b.prototype.A=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.Qc?this.D(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();
208
- g.Bc(h.resolve,h.reject)};b.prototype.D=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==_.Qc?function(w){try{l(q(w))}catch(A){m(A)}}:t}var l,m,n=new b(function(q,t){l=q;m=t});this.Bc(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Bc=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: "+
209
- 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=Ue(g),m=l.next();!m.done;m=l.next())d(m.value).Bc(h,k)})};b.all=function(g){var h=Ue(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(w){return function(A){q[w]=A;t--;0==t&&l(q)}}var q=[],t=0;do q.push(void 0),t++,d(k.value).Bc(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var Ze=this||self;
210
- Ze.a=!0;_.x("clpp.utils.obj.cloneItem",_.bf);_.x("clpp.utils.obj.merge",_.af);var pf={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.x("clpp.log.Level",pf);var nf=3,mf={},Ym=[];_.x("clpp.log.getLoggers",function(){return _.bf(mf)});_.x("clpp.log.addInterceptor",function(a){a&&Ym.push(a)});_.x("clpp.log.removeInterceptor",function(a){a&&(a=Ym.indexOf(a),0<=a&&Ym.splice(a,1))});_.x("clpp.log.getTagLevel",of);_.x("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=mf[a]});_.x("clpp.log.setTagLevel",function(a,b){a&&(_.ff(b)&&(b=qf(b)),mf[a]=b)});
211
- _.x("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.ff(a)&&(a=qf(a));nf=a});_.x("clpp.log.getLogLevel",function(){return nf});
212
- _.O=class{constructor(a){(this.a=a)&&void 0===mf[a]&&(mf[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=of(this.a);if(0<=d){if(d<c)return}else if(nf<c)return;this.a&&Array.prototype.unshift.call(arguments,"["+this.a+"]");d=new Date;d.toISOString&&(d=d.toISOString().substring(11).replace("Z",""),Array.prototype.unshift.call(arguments,d));4===c?console.log.apply(console,arguments):3===c?console.info.apply(console,arguments):
213
- 2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Ym)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)}Pe(a){return a?
214
- this.a?new _.O(this.a+"."+a):new _.O(a):this}};_.x("clpp.log.Logger",_.O);_.O.prototype.createChild=_.O.prototype.Pe;_.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 sf=new _.O("clpp");_.x("clpp.log.info",_.tf);_.x("clpp.log.debug",_.D);_.x("clpp.log.warn",_.z);_.x("clpp.log.error",_.uf);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Kl,Ll;Kl=class{constructor(a,b){this.yb=a;this.a=b}};Ll=class{constructor(a,b){this.a=a;this.f=b}};_.Af=new _.O("clpp.players");_.zf={};_.Zm=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 $m,an;$m=class{constructor(a,b,c,d){this.f=a;this.cc=b;this.a=c;this.uf=!!d}Ib(a){try{this.cc.handleEvent?this.cc.handleEvent(a):this.cc.call(this.a,a)}catch(b){_.uf("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
119
+ _.dk=function(a,b){if(!a.F)return _.Hf(a.w,b,[Nc,"msneedkey",Qe,"needkey"],()=>{a.U(new _.H(_.G,6,6010))}),Promise.resolve();a.A=b;a.o.j(b);a.w.one(a.A,_.Ld,()=>Xj(a));a.w.on(a.A,_.Le,f=>{const g=a.B;a.B=!a.m;!g&&a.B&&(a.a.info("Waiting for DRM license key delivery"),a.j.onEvent(f))});const c=a.f.initData.find(f=>0<f.initData.length);let d=Promise.resolve();if(c||a.o.f()!==Ya||a.H.length)d=Qj(a);let e=Promise.resolve();_.Dh()&&38===Eh().major||(a.f&&a.f.keySystem!==_.Dd&&!a.f.serverCertificate&&(e=
120
+ Zj(a)),e=e.then(()=>_.ak(a)));return Promise.all([d,e]).then(()=>{if(!a.ka&&(_.ck(a),_.Ah(2)||!c&&!a.H.length))a.w.on(a.A,Nc,f=>Vj(a,f))}).catch(f=>{if(!a.ka){if(6004===f.code&&a.f&&a.f.keySystem===_.Ac&&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++,_.dk(a,b);1<=a.N&&a.a.info("Could not get valid widevine server certificate. Giving up");throw f;}})};
121
+ Yj=function(a,b){return _.v(function*(){const c=a.j.jc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
122
+ _.bk=function(a,b){let c;try{a.a.debug("Attempting to load an offline session",b),c=a.F.createSession(_.Jd)}catch(e){const f=new _.H(_.G,6,6005,{browserError:e.message});a.U(f);return Promise.reject(f)}a.w.on(c,jd,a.ua.bind(a));a.w.on(c,Zc,a.na.bind(a));const d={initData:null,loaded:!1,xd:Infinity,eb:null,periodId:null,Gc:[],keyId:null,initDataType:null,Nb:null,sessionContext:{ldlDelay:0,customData:{}}};a.g.set(c,d);return c.load(b).then(e=>{if(a.ka)return null;a.a.debug("Loaded offline session",
123
+ b,e);if(!e)return a.g.delete(c),a.U(new _.H(_.G,6,6013)),null;d.loaded=!0;ek(a)&&(a.m||a.a.info(qa),a.m=!0,a.B=!1,a.D.resolve());return c},e=>{a.ka||(a.g.delete(c),a.U(new _.H(_.G,6,6005,{browserError:e.message})))})};Sj=function(a,b){for(let c=0;c<b.Gc.length;c++)if(_.qi(a,b.Gc[c]))return!0;return!1};
124
+ Tj=function(a,b,c,d,e,f,g){f=void 0===f?null:f;if(e.length&&((void 0===g?0:g)||!fk(a,b,d,e))){try{const k=a.C?_.Jd:me;a.a.debug(`Creating new ${k} session.`);var h=a.F.createSession(k)}catch(k){a.U(new _.H(_.G,6,6005,{browserError:k.message}));return}a.w.on(h,jd,a.ua.bind(a));a.w.on(h,Zc,a.na.bind(a));b={Nb:f,Gc:[],initData:e,initDataType:d,keyId:b,loaded:!1,xd:Infinity,periodId:c,eb:null,sessionContext:{ldlDelay:0,customData:{}}};f&&(f=a.g.get(f),b.sessionContext=f.sessionContext);a.g.set(h,b);f=
125
+ a.j.getConfiguration();c=a.keySystem();c=a.h.Pa[c];g=(g=c.modifiers)&&g.transformInitData;_.hf(g)||(g=Ej);try{e=g({playerConfig:f,initData:e,initDataType:d,drmInfo:a.f,drmSystemConfig:c,sessionContext:b.sessionContext,emeApi:a.o.f()})}catch(k){d=k;k instanceof _.H||(d=new _.H(_.G,6,6016,k));a.U(d);return}h.generateRequest(d,e.buffer).catch(k=>{if(!a.ka){a.g.delete(h);var l=null;k.errorCode&&k.errorCode.systemCode&&(l=k.errorCode.systemCode,0>l&&(l+=Math.pow(2,32)),l="0x"+l.toString(16));a.U(new _.H(_.G,
126
+ 6,6006,{browserError:k.message,error:k,extended:l},k))}})}};gk=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};ek=function(a){a=a.g.values();return _.Zf(a,b=>b.loaded)};
127
+ fk=function(a,b,c,d){if(!b&&c!==_.ae)return!1;d=b||Yi(d);for(const e of a.g.values()){if(b&&e.keyId===b)return a.a.info(`Skip creating a new session for ${b}`),!0;if(c===_.ae&&(e.keyId||Yi(e.initData))===d)return a.a.info("Skip creating a new session for matching init data"),!0}return!1};
128
+ Wj=function(a,b){const c=b.target;a.a.debug("Sending license request for session",c.sessionId);const d=a.g.get(c);let e=a.f.licenseServerUri;var f=a.keySystem();f=a.h.Pa[f];"individualization-request"===b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);const g=_.zg([e],a.h.attemptParameters);g.type=3;g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType===bd&&d.Nb?ad:b.messageType;g.sessionId=c.sessionId;if(g.licenseRequestType===ad)a.j.onEvent(new _.F(Ic));
129
+ zj(a.f.keySystem)&&hk(a,g);ti(a.K,g);const h=Date.now();return ik(a,g,d.sessionContext).then(()=>{a.a.debug("Sending DRM license request to",e,g);return a.j.pb.fetch(g).O}).then(k=>{if(a.ka)return Promise.reject();a.a.info(`Received license response in ${Date.now()-h}ms`);const l=ui(a.K,k);return c.update(k.data).then(()=>{var m=gk(a);const n=l?Date.now()+1E3*l.delay:Number.NaN;m=new _.F(_.Kc,{keySystem:a.keySystem(),expirationTime:m,expectedRenewalTime:n});a.j.onEvent(m);d&&(d.eb&&d.eb.resolve(),
130
+ d.Nb&&(yj(d.Nb).catch(()=>{a.a.warn("Unable to close expired session in time")}),(m=a.g.get(d.Nb))&&m.dc&&m.dc.stop(),a.g.delete(d.Nb),d.Nb=null),(new _.wh(()=>{a.ka||(d.loaded=!0,ek(a)&&(a.m||a.a.info("DRM licenses loaded!!!"),a.m=!0,a.B=!1,a.D.resolve()))})).$(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||l&&si(a.keySystem()))&&(m=new _.wh(()=>{!a.ka&&a.K&&(a.a.info("Updating CSL Sessions"),zj(a.keySystem())?Tj(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.yc)&&
131
+ c.update(_.ng("renew")))}),d.dc=m,m.$(l?l.delay:d.sessionContext.ldlDelay)))})},k=>_.v(function*(){if(!a.ka){var l=k.data.headers;l=Object.assign({message:_.xa,url:k.data.url,status:k.data.status,response:k.data.response},l?{headers:l}:{},uj(l));l=new _.H(_.G,6,6007,l,k);a.U(l);d&&d.eb&&d.eb.reject(l)}})).catch(k=>{a.ka||(k=new _.H(_.G,6,6008,{browserError:k.message}),a.U(k),d&&d.eb&&d.eb.reject(k))})};
132
+ hk=function(a,b){var c=_.lg(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(_.Ae).textContent;b.body=_.ni(a.querySelector("Challenge").textContent).buffer}else a.a.debug("PlayReady request is already unwrapped."),b.headers[na]="text/xml; charset\x3dutf-8"};
133
+ ik=function(a,b,c){return _.v(function*(){const d=a.j.getConfiguration();yield Yj(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(_.yc)&&b.requestModifiers.push(k=>_.aj(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.yc)&&b.responseModifiers.push(k=>_.bj(k))})};_.lk=function(a,b){a&&b&&(jk.set(a,b),kk.info(`Registered TextDisplayerFactory: '${a}'`))};
134
+ _.mk=function(a,b){b=b.find(c=>(c=jk.get(c))?c.Y(a):!1);kk.info(`Chosen the text displayer: ${b}`);return b?jk.get(b):null};_.nk=function(a){return null!=a};_.ok=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})}}};sk=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};
135
+ tk=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};uk=function(a){return a.a.map(b=>_.ef(b))};_.vk=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:[]}};
136
+ xk=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=wk.value().get(b),c.one(a,b,d))};
137
+ Bk=function(a){a.g.debug("Start watching for video events for "+a.l.namespace());const b=a.l,c=d=>yk(a,d.type);a.a.on(b,_.Pc,()=>{a.j=!1;zk(a,_.Ak)});a.a.on(b,gc,c);a.a.on(b,_.Md,()=>{a.D=!0;a.j=!1;yk(a,_.Md)});a.a.on(b,_.Hd,()=>{a.D=!1;a.j=!1;yk(a,_.Hd)});a.a.on(b,_.pe,c);a.a.on(b,_.Rd,c);a.a.on(b,_.Yd,d=>{a.m=!1;a.j=!1;yk(a,d.type)});a.a.on(b,_.Zd,d=>{a.m=!0;yk(a,d.type)});a.a.on(b,ce,c);a.a.on(b,_.Ke,()=>{a.j=!0;yk(a,_.Ke)});a.a.on(b,_.Qc,d=>a.U(d));a.a.on(b,_.fd,c);a.a.on(b,hc,()=>{a.C=!0;yk(a,
138
+ hc)});a.a.on(b,_.ze,d=>{a.m=!0;yk(a,d.type)});a.a.on(b,_.xe,d=>{a.m=!1;a.j=!1;yk(a,d.type)})};Ck=function(a,b){return Object.keys(b)[a]};Ek=function(a,b){const c={type:_.ee};b===_.cc||b===_.bc?(c.reason=a.w,b===_.cc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.Dk&&(c.reason=a.w),a.A===_.Dk&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
139
+ zk=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.Dk;a.A=a.f;a.f=b;a.A===_.Ak&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.Dk?(a.K=a.o,a.w=a.m?1:2,a.g.info("Buffering started. Reason: "+Ck(a.w-1,_.Fk)),b=Ek(a,_.cc),a.Ib(_.cc,b)):d&&(a.B=a.o-a.K,a.g.info("Buffering finished. Reason: "+Ck(a.w-1,_.Fk)+". Buffering time: "+a.B+" ms"),b=Ek(a,_.bc),a.Ib(_.bc,b));b=Ck(a.A,_.Gk);c=Ck(a.f,_.Gk);a.g.info(`Player state change: ${b} -> ${c}`);a.Ib(_.ee,Ek(a,""));return!0};
140
+ yk=function(a,b){if(a.f===_.Hk)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===_.Ak&&1>=Math.abs(d-e)||c&&d>=e)zk(a,_.Ak)&&a.g.debug("Player claims to be in ended state, not checking more");else if(b!==_.pe){e=a.l.getPosition();e=null!==e&&void 0!==e&&0<=e?a.l.getBufferInfo().va(e,!0):-1;a.F=e;e=a.l.getSurface().getMedia();a.h=e?e.readyState:null;a.J=a.l.getPlaybackRate()||1;
141
+ e=typeof a.h===_.p&&2>a.h&&2===e.networkState;var f=typeof a.h===_.p&&0>=a.F&&a.f===_.Ik,g=typeof a.h===_.p&&2>=a.h&&a.j;e=a.m||f||e||g;!a.L||a.l.isLive()||a.f!==_.Dk||e||(f=b===_.Yd&&4===a.h,(g=a.A===_.Jk)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=zk(a,_.Dk):c?f=zk(a,_.Kk):a.D&&(f=zk(a,_.Lk));f&&(a.C=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.m+", waiting: "+a.j+", playing: "+a.D+", paused: "+c+", readyState: "+a.h+", rate: "+a.J+", buffer: "+a.F+", ended: "+d+". Changed state: "+
142
+ f+", Current state: "+Ck(a.f,_.Gk))}}};Mk=function(a){a=(new _.gh(a)).ma;if(!a)return null;a=a.toUpperCase();return _.rg(a,".MPD")?_.Lb:_.rg(a,".M3U8")?_.Rb:_.rg(a,".MP4")?_.Ee:_.rg(a,"MANIFEST")||_.rg(a,".ISM")?_.Qb:null};_.Ok=function(a){let b;_.di(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.he||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Nk(b[c]);d&&a.push(d)}return a};
143
+ Nk=function(a){let b=null;_.jf(a)&&(a={url:a});typeof a===_.td&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.y(a.drmProtected)||typeof a.drmProtected!==_.ac||(b.drmProtected=a.drmProtected),_.y(a.isLive)||typeof a.isLive!==_.ac||(b.isLive=a.isLive),_.y(a.name)||typeof a.name!==_.he||(b.name=a.name),_.y(a.tb)||typeof a.tb!==_.he||(b.tb=a.tb),_.y(a.audioMimeType)||typeof a.audioMimeType!==_.he||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Mk(a.url),b.type?Pk.debug("Detect media type "+
144
+ b.type+" for "+a.url):Pk.warn("Unable to detect media type for "+a.url));return b};Rk=function(a){return a.w?Qk():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.Qc);a.g.off(c,_.Wd);a.a=null}b()})};Qk=function(){return Promise.reject(new _.H(_.G,7,7E3))};Tk=function(a,b){return a.w?Qk():new Promise(c=>{a.a||(a.g.on(b,_.Qc,()=>{{const d=Sk(a);if(d)a.onError(d)}}),a.g.on(b,_.Wd,()=>{a.trigger(new _.F(_.$b,{detail:{width:b.videoWidth,height:b.videoHeight}}))}),a.a=b);c()})};
145
+ Vk=function(a){return _.v(function*(){if(a.w)return Qk();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=_.yi(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.m=new _.Uk({pb:c,onError:d=>a.onError(d),Cd:()=>{},onExpirationUpdated:(d,e)=>{a.trigger(new _.F(_.Hc,{expirationTime:e}))},onEvent:d=>a.trigger(d),getConfiguration:()=>
146
+ a.getConfiguration(),jc:()=>a.jc()});a.m.h=b;yield _.Oj(a.m,[{id:0,language:_.se,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,qb:0,mimeType:_.Ee,codecs:"",encrypted:!0,keyId:null,language:_.se,label:null,type:_.u,primary:!1,frameRate:void 0,$f:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],
147
+ channelsCount:null,Nf:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}],[]);yield _.dk(a.m,a.a);return Promise.resolve()})};Wk=function(a,b){xk(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.Hk&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
148
+ Sk=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,Vf:c,message:a.a.error.message})};
149
+ Yk=function(a){if(a.w)return new _.Xk(Qk(),()=>{});const b=a.o[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&Wk(a,c);if(d.preload!==_.sd)a.g.one(d,_.fd,()=>{const g=Date.now()/1E3-e;a.f.o=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Ah()||_.Dh())&&d.load();const f=new _.Pj;a.g.one(d,ce,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.C||(a.C=(new _.wh(()=>{f.reject(new _.H(_.G,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
150
+ uri:b.url},d.error))})).$(g))});xk(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject(Sk(a)):d.preload===_.sd&&(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,_.Qc,()=>{f.reject(Sk(a))});return new _.Xk(f,
151
+ ()=>{const g=new _.H(_.G,7,7001);f.reject(g);return Promise.resolve()})};_.al=function(a){a&&(0<=Zk.indexOf(a)?$k.warn(`Factory '${a.name()}' is already registered`):(Zk.push(a),$k.info(`Factory ${a.name()}' has been registered.`)))};dl=function(a,b){let c=Zk.find(d=>d.Y(a,b));c||(c=new bl);$k.info(`Chosen ads: ${c.name()}`);return c};_.el=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};
152
+ _.fl=function(a,b){a.classList.add(b)};_.gl=function(a,b){if(a&&typeof b===_.td)for(const c in b)a.style[c]=b[c]};_.hl=function(a){return document.createElement(a)};
153
+ kl=function(a,b){a.h.debug("Initializing Player Surface on ",a.g);a.g instanceof Element&&(a.g instanceof HTMLMediaElement?(a.a=a.g,(_.Dh()&&53===Eh().major||_.Dh()&&68===Eh().major||_.Fh())&&!a.a.hasAttribute(Cc)&&(a.a.style.opacity="0",a.a.setAttribute(Cc,""),a.m.one(a.a,Mc,()=>{a.a.removeAttribute(Cc);a.a.style.opacity="1";a.f&&(a.f.style.opacity="1")}))):"cast-media-player"===a.g.tagName.toLowerCase()&&(a.j=a.g));b.containerEl?(a.f=b.containerEl,_.fl(a.f,oc)):b.disableContainer||a.j||(a.f=il(),
154
+ a.g.parentNode?a.g.parentNode.replaceChild(a.f,a.g):a.g.parentNode||a.h.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!"),a.a&&a.f.appendChild(a.a));if(a.a){if(!a.a.hasAttribute("crossorigin")){const c=b.crossorigin;a.h.info("Setting media elements crossorigin to "+c);a.a.setAttribute("crossorigin",c)}a.f&&(b.containerEl||jl(a),_.fl(a.a,_.pc))}};il=function(){const a=document.createElement(_.Gc);_.fl(a,oc);return a};
155
+ jl=function(a){if(a.a&&a.f){{var b=a.a;const d=[];for(let e=0;e<b.classList.length;e++)d.push(b.classList[e]);b=d}for(var c of b)a.a.classList.remove(c),_.fl(a.f,c);a.f.style.cssText=a.a.style.cssText;a.a.removeAttribute(_.je);for(const d of[_.Re,_.Tc])c=a.a.getAttribute(d),c=parseInt(c,10),isNaN(c)||(a.f.style[d]=`${c}px`),_.Ah()||a.a.removeAttribute(d)}};
156
+ ol=function(a){a.a.on(window,"offline",()=>{ll(a,!1)});a.a.on(window,"online",()=>{a.f||ml(a)});a.a.on(a.l,ce,()=>nl(a));a.a.on(a.l,"suspend",()=>nl(a));a.a.on(a.l,_.Ke,()=>nl(a));a.a.on(a.l,_.Md,()=>{a.f||ml(a)});a.a.on(a.l,_.Pd,()=>{a.f||ml(a)});a.a.on(a.l,_.ee,()=>{switch(a.l.getState()){case _.Dk:nl(a);break;default:nl(a)}})};pl=function(a){a.g&&(a.g.stop(),a.g=null)};nl=function(a){a.f&&ml(a)};
157
+ ql=function(a){return _.v(function*(){var b=a.l.getConfiguration().connectivityCheck;b&&a.l&&(b=yield rh(a.h,b.url,b.attemptParameters,b.method),ll(a,b))})};ml=function(a){a.l.getConfiguration().connectivityCheck&&(pl(a),a.g=(new _.wh(()=>ql(a))).$(5))};ll=function(a,b){pl(a);a.f!==b&&(a.f=b,a.l&&a.l.getConfiguration().connectivityCheck&&a.l.trigger(new _.F(Ad,{online:a.f})))};sl=function(){for(let a=0;a<rl.length;++a)rl[a].cc()};
158
+ _.tl=function(a,b){b=b||0;a={priority:b,cc:a};for(let c=0;c<rl.length;c++)if(rl[c].priority<b){rl.splice(c,0,a);return}rl.push(a)};ul=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};wl=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 vl(b[0],b[1],b[2]);a.a=b}return a.a};
159
+ xl=function(a){switch((a.Jc()[0]||{src:"",type:""}).type){case _.Lb:a="dash";break;case _.Qb:a="ss";break;case _.Rb:a="hls";break;case _.Ee:a=_.od;break;default:a=""}return a};yl=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};zl=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
160
+ Al=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Bl=function(a){a=a.getDrmInfo();return(new _.gh(a&&a.licenseServerUri||"")).Da};Cl=function(a){const b=a.getConfiguration();let c="no";b.drm&&!_.lf(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Lc)||Bl(a).endsWith("drmtoday.com"))&&(c=Lc);return c};
161
+ Dl=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.keySystem){case _.Ac:b="wv";break;case _.zc:b="pr";break;case _.yc:b="fps"}return b};El=function(a){a=a.getDrmInfo();let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Fl=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.videoRobustness){case Ba:case "HW_SECURE_ALL":b="L1";break;case Aa:b="L2";break;case _.cb:case _.Za:b="L3"}return b};
162
+ Jl=function(a,b){const c="ie"===_.Yh().browser;var d=b.getConfiguration();const e=[...Array.from(_.ei.keys()),...b.ef()];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":yl(d),"CL-ASSET-ID":zl(d),"CL-SESSION-ID":Al(d),"CL-PLAYBACK-TYPE":b.isLive()?Gl:Hl,"CL-CONTENT-TYPE":xl(b),"CL-PLUGINS":e.join(" "),"CL-DRM":Cl(b),"CL-DRM-CDM":Dl(b),"CL-DRM-SEC-LEVEL":Fl(b),"CL-DRM-OFFLINE":El(b),"CL-DRM-IP":Bl(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=
163
+ d);d=_.zg(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Il).fetch(d).O.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=wl(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=
164
+ k+"!";k=f;break;case 412:g=7103;k="userID is required for playback!";break;default:g=Promise.resolve();break a}a.f.error(Fa+k);g=Promise.reject(new _.H(_.G,7,g,k))}}return g})};_.Ll=function(a){a&&(0<=Kl.indexOf(a)||Kl.push(a))};
165
+ Nl=function(a){if(!a.L){a.L=!0;a.h.getMedia()||a.h.getCastElement();a.w||(a.w=new Ml(a.f.license));var b=Object.keys(a.K);Jl(a.w,{getConfiguration:a.getConfiguration.bind(a),Jc:a.Jc.bind(a),getDrmInfo:a.getDrmInfo.bind(a),ef:()=>b,isLive:a.isLive.bind(a)}).then(()=>{a.g.debug("License verified remotely")}).catch(c=>{setTimeout(ul,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)})}};
166
+ Ol=function(a,b){a.w=new Ml(b);a.w.verify().catch(c=>{setTimeout(()=>{a.g.error(Fa+c);a.trigger(new _.F(_.Qc,{detail:new _.H(_.G,7,7101)}));a.destroy()},1E3)})};Ql=function(a,b){a.J=b;for(const c of a.J)(b=c.id())&&(a.K[b]=c);_.Pl(a,"onPlayerCreated")};_.Rl=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)))};
167
+ _.Pl=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)};
168
+ Sl=function(a){return _.v(function*(){if(a.H)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.off(_.ee,a.B);a.A.off(a,_.ee,a.B);a.A.off(document,Ie);a.trigger(new _.F(_.Td));a.L=!1;a.h&&a.h.release();a.j&&(yield a.j.dispose(),a.j=null);ki(b=>{b.release()});if(a.a){let b=null;const c=a.a.on(_.ee,d=>{b=d});return _.Pl(a,_.yd).then(()=>{a.a.removeDelegate(a);return Promise.all([a.a.release(),a.F.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
169
+ a.trigger(b))}).finally(()=>{a.a.off(_.ee,c);a.trigger(new _.F(Sd))})}a.trigger(new _.F(Sd));return new Promise(b=>b())})};
170
+ Vl=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(_.Cf);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={yb:h[l],confidence:h[l].canPlay(b[k],c)};if(null===f||f.confidence<m.confidence)f=m,g=k}f&&typeof g===_.p&&0<f.confidence?(_.Df.debug("Player Factory '"+f.yb.a()+"' can play",b[g]),f=new Tl(f.yb,g)):(_.Df.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.yb.create(),d(new Ul(e,f.a))):
171
+ (d=new _.F(_.Qc,{detail:new _.H(_.G,7,7003)}),a.trigger(d),e(d))})};
172
+ _.Yl=function(a,b){return _.v(function*(){if(a.D)throw Error("Player is already destroyed.");if(!a.h)throw Error("No surface associated with this player!");yield a.release();a.o=_.Ok(b);a.f=_.ci(a.N,_.di(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 Vl(a,a.o,a.f),c=d.a,d=d.f,a.I=!1;c?_.Rl(a,c):a.a.addDelegate(a);Wl(a);a.a&&a.a.setCdnErrorCallback(a.C);Xl(a,a.f);a.setSourceIndex(d);
173
+ if(a.f.pauseWhenInBackground)a.A.on(document,Ie,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});ki(e=>{e.g()});yield _.Pl(a,"onContentWillLoad",a.f.source[d])})};_.Zl=function(a){return _.v(function*(){a.h.getMedia()||a.h.getCastElement();a.A.on(a,_.ee,a.B);a.trigger(new _.F(gd));yield Promise.all([a.a.load(a.f),a.j.load()])})};
174
+ _.am=function(a){return _.v(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);$l(a);ki(()=>{});yield _.Pl(a,_.vd);a.f.autoplay&&(yield a.play())})};Wl=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.v(function*(){a.fc&&a.$c&&(a.$c=!1,yield a.fc(b))}))};Xl=function(a,b){a.j=dl(a,b).create(a)};
175
+ $l=function(a){const b=_.Mg(a.f.preferredTextLanguage).filter(d=>d),c=a.getTrackManager().ea();b.some(d=>{const e=_.Jg(d);return(d=c.find(f=>{f=_.Jg(f.language||"");return _.Kg(f,e)}))?(a.getTrackManager().ta(d),!0):!1})};
176
+ bm=function(a,b){a.f=b;_.Gf(a.a);if(!b)return Promise.resolve();a.a.on(b,Nc,c=>{_.D("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);c instanceof MediaEncryptedEvent&&(_.Af("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,Qe,c=>{{_.D("AppleEmeManager.onWebkitNeedKey_",c);c=_.L(c.initData);if(_.gg(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=_.lg(c.subarray(4),!0);c=_.ng(c);const d=new Event(Nc);
177
+ d.initDataType="skd";d.initData=hg(c);a.f.dispatchEvent(d)}});xk(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.g));return Promise.resolve()};cm=function(a,b){var c=a.keyStatuses;c.size=void 0===b?0:1;c.a=b;b=new _.F(Zc);a.dispatchEvent(b)};
178
+ fm=function(a,b){a.a=b;_.Gf(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(Nc);d.initDataType=_.lc;d.initData=hg(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=dm(a,c.sessionId);if(e){c=new _.F(jd,{messageType:void 0===e.keyStatuses.a?bd:ad,message:c.message});var d=e;_.D("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.Bf("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{if(c=dm(a,c.sessionId))_.D("WebkitEmeManager.MediaKeySession.ready"),
179
+ em(c,"usable"),c.a&&c.a.resolve(),c.a=null}),a.f.on(b,a.g+"keyerror",c=>{var d=dm(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?em(d,_.Ed):1===e?em(d,"expired"):em(d,_.Yc))}}}))};
180
+ dm=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};em=function(a,b){var c=a.keyStatuses;c.size=void 0===b?0:1;c.a=b;b=new _.F(Zc);a.dispatchEvent(b)};gm=function(a,b){return a.o?a.o+b.charAt(0).toUpperCase()+b.slice(1):b};
181
+ hm=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===_.Jd)if(c)d=_.L(_.ng("LOAD_SESSION|"+c));else{const f=_.ng("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.L(b),f.byteLength);d=g}else d=_.L(b)}catch(f){return Promise.reject(f)}a.f=new _.Pj;const e=gm(a,"generateKeyRequest");try{a.h[e](a.g,d)}catch(f){if(f.name!==Ea)return a.f=null,Promise.reject(f);(new _.wh(()=>{try{a.h[e](a.g,d)}catch(g){a.f.reject(g),
182
+ a.f=null}})).$(.01)}return a.f};im=function(a,b,c){if(a.a)a.a.then(()=>im(a,b,c)).catch(()=>im(a,b,c));else{a.a=b;if(a.g===Me){var d=_.jg(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=_.ni(e.keys[0].k);e=_.ni(e.keys[0].kid)}else d=_.L(c),e=null;var f=gm(a,"addKey");try{a.h[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
183
+ jm=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.Sc?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};km=function(a){a=a.target;if(a.webkitPresentationMode===Kd){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)};
184
+ lm=function(){return this.webkitSupportsPresentationMode(Kd)?(this.webkitSetPresentationMode(Kd),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};mm=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
185
+ nm=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};om=function(a,b,c){return new window.TextTrackCue(a,b,c)};pm=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};rm=function(a,b,c){if("input"===a)switch(this.type){case "range":a=nc}qm.call(this,a,b,c)};sm=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
186
+ tm=function(a){return sm()-a.a};vm=function(a){const b=new um;b.a=a.a;return b};_.wm=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};_.xm=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.zm=function(a,b,c,d){return _.v(function*(){try{return new (yield ym(a,b,c,d))}catch(e){throw e.a(_.G),e;}})};
187
+ ym=function(a,b,c,d){return _.v(function*(){if(d){var e=_.Am[d.toLowerCase()];if(e)return e;_.z("Could not determine manifest type using MIME type ",d)}if(e=_.Bm(a)){const f=_.Cm[e];if(f)return f;_.z("Could not determine manifest type for extension ",e)}else _.z("Could not find extension for ",a);if(!d&&(d=yield Dm(a,b,c))){if(e=_.Am[d])return e;_.z("Could not determine manifest type using MIME type",d)}throw new _.H(_.G,4,4E3,{url:a});})};
188
+ _.Bm=function(a){a=(new _.gh(a)).ma.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};Dm=function(a,b,c){return _.v(function*(){var d=_.zg(a);xg(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).O).headers["content-type"])?d.toLowerCase():""})};Em=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};
189
+ Fm=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(Em(a,e),Cg(c,e.byteLength,tm(a.g)),a.g.a=sm());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>Fm(a,b,c))})};
190
+ Hm=function(a){const b=a.uris[a.uriIndex],c=new Gm,d=new um,e=vm(d);let f=0;const g=new _.Pj;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;let h=!1,k=!1;c.onreadystatechange=function(l){l=l.target;l.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!h&&(l=l.getResponseHeader(ma),Bg(a,l),h=!0)};c.onload=function(l){l=l.target;var m=(l.getAllResponseHeaders()||"").trim().split("\r\n");const n={};for(const q of m)m=q.split(": "),n[m[0].toLowerCase()]=
191
+ m.slice(1).join(": ");try{const q=tm(e);k||Cg(a,l.response?l.response.length:0,q);const t=_.Ag(n,l.response,l.status,b,l.responseURL,a,q);a.rateLimitBps?Dg(a.rateLimitBps,tm(e),a.bytesLoaded).then(()=>{g.resolve(t)}):g.resolve(t)}catch(q){g.reject(q)}};c.onerror=function(l){l=l.target;if(0>=l.status)g.reject(new _.H(1,1,1002,{url:b,request:a,status:l.status}));else{var m=l.getAllResponseHeaders();const q={};if(m){m=m.trim().split("\r\n");for(var n of m)m=n.split(": "),q[m[0].toLowerCase()]=m.slice(1).join(": ")}n=
192
+ _.Ag(q,l.response,l.status,b,l.responseURL,a,tm(e));g.resolve(n)}};c.ontimeout=function(){g.reject(new _.H(1,1,1003,{url:b,request:a}))};c.onprogress=function(l){const m=tm(d);d.a=sm();if(100<m||l.lengthComputable&&l.loaded===l.total)Cg(a,l.loaded-f,m),f=l.loaded,k=!0};for(const l in a.headers)c.setRequestHeader(l.toLowerCase(),a.headers[l]);c.send(a.body);return{O:g,request:a,abort:()=>{c.abort();g.reject(new _.H(1,1,7001,{url:b,request:a}));return Promise.resolve()}}};
193
+ Im=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};Jm=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)};
194
+ Lm=function(a){if(0<=a.m&&a.f<a.m)return null;let b=Km(a);for(;null!==b;){if(b.name===_.hd){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=Km(a)}return null};
195
+ Mm=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,tm(a.o)),a.o.a=sm());if(f)return e=Im(a),(e=c(!0,e))?e.then(()=>a.h.a.buffer):Promise.resolve(a.h.a.buffer);let h=Promise.resolve();if(null!=g){Jm(a,g);var k=Lm(a);for(e=[];k;)e.push(k),k=Lm(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=
196
+ c(!1,k))&&(h=e)}}return h.then(()=>Mm(a,b,c,d))})};
197
+ Km=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Nm(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Nm(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};
198
+ Nm=function(a){const b=a.j.getUint32(a.a,!1);a.a+=4;return b};
199
+ Qm=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=Om(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Om(e.request.fuzzFactor,.5));a.f*=Om(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.j=h;Pm(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)});
200
+ 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.O}).then(e=>{a.o.resolve(e)}).catch(e=>{if(e instanceof _.H){if((1===e.severity||b<d)&&7001!==e.code&&b<c)return Qm(a);7001!==e.code&&e.a(_.G);a.o.reject(e)}else a.o.reject(e)})};Pm=function(a,b,c){a.m=setTimeout(b,c)};Om=function(a,b){return null===a||void 0===a?b:a};
201
+ Um=function(a){var b=new Rm;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Sm,d={pc:!1,Be:!1};b={O:Tm(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.pc||(d.pc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Be=!0;c.abort()},a);b.O=b.O.finally(()=>{window.clearTimeout(e)})}return b};
202
+ Tm=function(a,b,c,d){return _.v(function*(){let e,f;const g=new um,h=vm(g);try{e=yield Vm(a,c);const l=e.headers.get(ma);Bg(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=e.body.getReader();f=yield Mm(new Wm(m,!b.disableMergedFragments),n,(q,t)=>{if(d.pc)return null;t&&t.data&&(Cg(b,t.data.byteLength,tm(g)),g.a=sm());return b.onFragment&&t?b.rateLimitBps?Dg(b.rateLimitBps,tm(h),b.bytesLoaded).then(()=>b.onFragment(t)):b.onFragment(t):null},b.onProgress)}else{const n=
203
+ e.body.getReader();f=yield Fm(new Xm(m),n,b);b.rateLimitBps&&(yield Dg(b.rateLimitBps,tm(h),f.byteLength))}}catch(l){if(d.pc)throw new _.H(1,1,7001,{url:a,request:b});if(d.Be)throw new _.H(1,1,1003,{url:a,request:b});_.Bf("Error while fetching data:",l);throw new _.H(1,1,1002,{url:a,error:l,request:b,status:-1},l);}const k={};e.headers.forEach((l,m)=>{k[m.trim()]=l});if(d.pc)throw new _.H(1,1,7001,{url:a,request:b});return _.Ag(k,f,e.status,a,e.url,b,tm(h))})};
204
+ Zm=function(a){try{const b=a.uris[a.uriIndex],c=_.Ym(b);return{O:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{O:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
205
+ _.Ym=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.Bf("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 _.Bf("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?_.ni(a).buffer:_.ng(a).buffer,contentType:c}};_.an=function(a){delete _.$m[a]};
206
+ _.fn=function(a){let b=_.sd;const c=a.H;switch(a.C){case bn:b=`-2px -2px 0 ${c}, -1px -1px 0 ${c}`;break;case cn:b=`2px 2px 0 ${c}, 1px 1px 0 ${c}`;break;case dn:b=`-1px 0 ${c}, 0 1px ${c}, 1px 0 ${c}, `+`0 -1px ${c}`;break;case en:b=`2px 2px 3px ${c}, 2px 2px 4px ${c}, `+`2px 2px 5px ${c}`}return b};Ye="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
207
+ Ze=typeof Object.defineProperties==_.Sc?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
208
+ $e("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=Ye.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=
209
+ 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 _.td:var h=null!=g;break a;case _.Sc:h=!0;break a;default:h=!1}h?this.A(g):this.m(g)}};
210
+ b.prototype.A=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.Sc?this.D(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();
211
+ g.Bc(h.resolve,h.reject)};b.prototype.D=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==_.Sc?function(w){try{l(q(w))}catch(B){m(B)}}:t}var l,m,n=new b(function(q,t){l=q;m=t});this.Bc(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Bc=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: "+
212
+ 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=Xe(g),m=l.next();!m.done;m=l.next())d(m.value).Bc(h,k)})};b.all=function(g){var h=Xe(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(w){return function(B){q[w]=B;t--;0==t&&l(q)}}var q=[],t=0;do q.push(void 0),t++,d(k.value).Bc(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var bf=this||self;
213
+ bf.a=!0;_.x("clpp.utils.obj.cloneItem",_.ef);_.x("clpp.utils.obj.merge",_.df);var tf={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.x("clpp.log.Level",tf);var qf=3,pf={},gn=[];_.x("clpp.log.getLoggers",function(){return _.ef(pf)});_.x("clpp.log.addInterceptor",function(a){a&&gn.push(a)});_.x("clpp.log.removeInterceptor",function(a){a&&(a=gn.indexOf(a),0<=a&&gn.splice(a,1))});_.x("clpp.log.getTagLevel",sf);_.x("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=pf[a]});_.x("clpp.log.setTagLevel",function(a,b){a&&(_.jf(b)&&(b=uf(b)),pf[a]=b)});
214
+ _.x("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.jf(a)&&(a=uf(a));qf=a});_.x("clpp.log.getLogLevel",function(){return qf});
215
+ _.O=class{constructor(a){(this.a=a)&&void 0===pf[a]&&(pf[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=sf(this.a);if(0<=d){if(d<c)return}else if(qf<c)return;this.a&&Array.prototype.unshift.call(arguments,"["+this.a+"]");d=new Date;d.toISOString&&(d=d.toISOString().substring(11).replace("Z",""),Array.prototype.unshift.call(arguments,d));4===c?console.log.apply(console,arguments):3===c?console.info.apply(console,arguments):
216
+ 2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of gn)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)}Pe(a){return a?
217
+ this.a?new _.O(this.a+"."+a):new _.O(a):this}};_.x("clpp.log.Logger",_.O);_.O.prototype.createChild=_.O.prototype.Pe;_.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 zf=new _.O("clpp");_.x("clpp.log.info",_.Af);_.x("clpp.log.debug",_.D);_.x("clpp.log.warn",_.z);_.x("clpp.log.error",_.Bf);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Tl,Ul;Tl=class{constructor(a,b){this.yb=a;this.a=b}};Ul=class{constructor(a,b){this.a=a;this.f=b}};_.Df=new _.O("clpp.players");_.Cf={};_.hn=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 jn,kn;jn=class{constructor(a,b,c,d){this.f=a;this.cc=b;this.a=c;this.uf=!!d}Ib(a){try{this.cc.handleEvent?this.cc.handleEvent(a):this.cc.call(this.a,a)}catch(b){_.Bf("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
215
218
  _.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(){}};
216
- an=class{constructor(a){this.a=new _.Zm;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].Ib(a),b[c].uf&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new $m(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new $m(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].cc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};
217
- _.x("clpp.EventBus",an);an.prototype.clear=an.prototype.clear;an.prototype.off=an.prototype.off;an.prototype.one=an.prototype.one;an.prototype.on=an.prototype.on;an.prototype.trigger=an.prototype.trigger;var bn;_.cn=class{constructor(){this.a=new _.Zm}release(){_.Df(this)}on(a,b,c,d=!1){a=new bn(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||(Cf(f),this.a.remove(b,f))}}};bn=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 dn=class{constructor(a){this.l=a;this.m=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.h=null;this.f=new _.cn;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 _.v(function*(){a.release();a.j=null;a.h=null})}getTimelineCues(){return this.g}};_.ln=class{constructor(a,b,c,d){d=void 0===d?_.en:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.fn;this.writingMode=_.gn;this.lineInterpretation=_.hn;this.line=null;this.lineAlign=_.jn;this.direction=kn;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}};_.x("clpp.text.Cue",_.ln);_.ln.positionAlign={LEFT:_.ad,RIGHT:_.bd,CENTER:_.kc,AUTO:"auto"};_.en=_.r;
218
- _.ln.payloadType={TEXT:_.en,VTT_XML:_.Ge,TTML_XML:_.oe};_.fn=_.kc;_.mn={LEFT:_.Yc,RIGHT:_.Vd,CENTER:_.fn,START:_.Yc,END:_.Vd};_.ln.textAlign=_.mn;var kn="ltr";_.ln.direction={HORIZONTAL_LEFT_TO_RIGHT:kn,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.gn="horizontal-tb";_.ln.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.gn,VERTICAL_LEFT_TO_RIGHT:_.xe,VERTICAL_RIGHT_TO_LEFT:_.ze};_.hn=0;_.ln.lineInterpretation={LINE_NUMBER:_.hn,PERCENTAGE:1};_.jn=_.ae;_.nn={CENTER:_.kc,START:_.jn,END:_.Mc};_.ln.lineAlign=_.nn;
219
- _.qn=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.on;this.scroll=pn;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.x("clpp.text.CueRegion",_.qn);_.on=1;_.qn.units={PX:0,PERCENTAGE:_.on,LINES:2};var pn="";_.qn.scrollMode={NONE:pn,UP:"up"};_.qn.displayAlign={BEFORE:"flex-end",CENTER:_.kc,AFTER:"flex-start"};
220
- _.qn.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.uc,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var rn=class{constructor(a){this.l=a;this.j=a.getTextDisplayer();this.f=this.g=null;this.a=new _.cn;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,_.Cb,b=>Of(this,b)),this.a.on(this.f,lc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Yd&&(d.mode=
221
- _.Sc)}}}))}o(a){const b=new _.ln(a.startTime,a.endTime,a.text,_.Ge);if(_.ff(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.xe;break;case "rl":b.writingMode=_.ze}_.gf(a.size)&&(b.size=a.size);if(_.ff(a.align))switch(a.align){case _.Yc:case _.ae:b.textAlign=_.Yc;break;case _.kc:b.textAlign=_.fn;break;case _.Vd:case _.Mc:b.textAlign=_.Vd}_.gf(a.position)&&(b.position=a.position);if(_.ff(a.positionAlign))switch(a.positionAlign){case _.ad:b.positionAlign=_.ad;break;case _.kc:b.positionAlign=
222
- _.kc;break;case _.bd:b.positionAlign=_.bd}_.gf(a.line)&&(b.line=a.line);if(_.ff(a.lineAlign))switch(a.lineAlign){case _.ae:b.lineAlign=_.jn;break;case _.kc:b.lineAlign=_.kc;break;case _.Mc:b.lineAlign=_.Mc}typeof a.snapToLines===_.Zb&&(b.lineInterpretation=a.snapToLines?_.hn:1);return b}};_.H=class extends Error{constructor(a,b,c,d,e){super(Pf(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.ff(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=Pf(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.x("clpp.Error",_.H);_.G=2;_.H.Severity={RECOVERABLE:1,FATAL:_.G};
219
+ kn=class{constructor(a){this.a=new _.hn;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].Ib(a),b[c].uf&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new jn(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new jn(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].cc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};
220
+ _.x("clpp.EventBus",kn);kn.prototype.clear=kn.prototype.clear;kn.prototype.off=kn.prototype.off;kn.prototype.one=kn.prototype.one;kn.prototype.on=kn.prototype.on;kn.prototype.trigger=kn.prototype.trigger;var ln;_.mn=class{constructor(){this.a=new _.hn}release(){_.Gf(this)}on(a,b,c,d=!1){a=new ln(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||(Ff(f),this.a.remove(b,f))}}};ln=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 nn=class{constructor(a){this.l=a;this.m=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.h=null;this.f=new _.mn;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 _.v(function*(){a.release();a.j=null;a.h=null})}getTimelineCues(){return this.g}};_.un=class{constructor(a,b,c,d){d=void 0===d?_.on:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.pn;this.writingMode=_.qn;this.lineInterpretation=_.rn;this.line=null;this.lineAlign=_.sn;this.direction=tn;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}};_.x("clpp.text.Cue",_.un);_.un.positionAlign={LEFT:_.cd,RIGHT:_.dd,CENTER:_.mc,AUTO:"auto"};_.on=_.r;
221
+ _.un.payloadType={TEXT:_.on,VTT_XML:_.Je,TTML_XML:_.re};_.pn=_.mc;_.vn={LEFT:_.$c,RIGHT:_.Xd,CENTER:_.pn,START:_.$c,END:_.Xd};_.un.textAlign=_.vn;var tn="ltr";_.un.direction={HORIZONTAL_LEFT_TO_RIGHT:tn,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.qn="horizontal-tb";_.un.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.qn,VERTICAL_LEFT_TO_RIGHT:_.Be,VERTICAL_RIGHT_TO_LEFT:_.Ce};_.rn=0;_.un.lineInterpretation={LINE_NUMBER:_.rn,PERCENTAGE:1};_.sn=_.de;_.wn={CENTER:_.mc,START:_.sn,END:_.Oc};_.un.lineAlign=_.wn;
222
+ _.zn=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.xn;this.scroll=yn;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.x("clpp.text.CueRegion",_.zn);_.xn=1;_.zn.units={PX:0,PERCENTAGE:_.xn,LINES:2};var yn="";_.zn.scrollMode={NONE:yn,UP:"up"};_.zn.displayAlign={BEFORE:"flex-end",CENTER:_.mc,AFTER:"flex-start"};
223
+ _.zn.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.wc,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var An=class{constructor(a){this.l=a;this.j=a.getTextDisplayer();this.f=this.g=null;this.a=new _.mn;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,_.Eb,b=>Rf(this,b)),this.a.on(this.f,nc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.$d&&(d.mode=
224
+ _.Uc)}}}))}o(a){const b=new _.un(a.startTime,a.endTime,a.text,_.Je);if(_.jf(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Be;break;case "rl":b.writingMode=_.Ce}_.kf(a.size)&&(b.size=a.size);if(_.jf(a.align))switch(a.align){case _.$c:case _.de:b.textAlign=_.$c;break;case _.mc:b.textAlign=_.pn;break;case _.Xd:case _.Oc:b.textAlign=_.Xd}_.kf(a.position)&&(b.position=a.position);if(_.jf(a.positionAlign))switch(a.positionAlign){case _.cd:b.positionAlign=_.cd;break;case _.mc:b.positionAlign=
225
+ _.mc;break;case _.dd:b.positionAlign=_.dd}_.kf(a.line)&&(b.line=a.line);if(_.jf(a.lineAlign))switch(a.lineAlign){case _.de:b.lineAlign=_.sn;break;case _.mc:b.lineAlign=_.mc;break;case _.Oc:b.lineAlign=_.Oc}typeof a.snapToLines===_.ac&&(b.lineInterpretation=a.snapToLines?_.rn:1);return b}};_.H=class extends Error{constructor(a,b,c,d,e){super(Sf(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.jf(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=Sf(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.x("clpp.Error",_.H);_.G=2;_.H.Severity={RECOVERABLE:1,FATAL:_.G};
223
226
  _.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
224
227
  _.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,
225
228
  TEXT_PARSER_MISSING:2012,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,MEDIA_SOURCE_OPERATION_FAILED:3014,
@@ -228,58 +231,58 @@ DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:
228
231
  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,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,
229
232
  FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,NO_CONTENT_ID:6101,SERVER_CERTIFICATE_REQUIRED:6102,EXTRACT_CONTENT_ID_MODIFIER_ERROR:6103,
230
233
  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,INVALID_CONFIGURATION:7100,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,
231
- CONVIVA_RUNTIME_ERROR:9002,GL_CONTEXT_ERROR:9003,GL_SHADER_ERROR:9004,YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,VIMOND_INVALID_CONFIGURATION:9200,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 Rf;_.Uf=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=[]}toString(){return`Track type: ${this.type} id: ${this.id}
232
- renditions size: ${this.renditions.length}`}};_.x("clpp.Track",_.Uf);_.Uf.prototype.toString=_.Uf.prototype.toString;_.sn=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.drmInfo=this.codec=this.bandwidth=this.height=this.width=null}};_.x("clpp.Rendition",_.sn);_.Tf=1;_.K=_.u;_.J=_.Rb;_.I=_.r;Rf=_.id;_.tn={VIDEO:_.K,AUDIO:_.J,TEXT:_.I,Kf:Rf};_.Uf.Type=_.tn;_.P=class{Xe(a){return this.getVideoTracks().find(b=>_.hf(b,a,a&&Object.keys(a)))}Te(a){return this.getAudioTracks().find(b=>_.hf(b,a,a&&Object.keys(a)))}Ve(a){return this.ea().find(b=>_.hf(b,a,a&&Object.keys(a)))}We(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.hf(b,a,a&&Object.keys(a)))}Se(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.hf(b,a,a&&Object.keys(a)))}Ue(a){return this.ea().flatMap(b=>b.renditions).find(b=>_.hf(b,a,a&&Object.keys(a)))}};
234
+ CONVIVA_RUNTIME_ERROR:9002,GL_CONTEXT_ERROR:9003,GL_SHADER_ERROR:9004,YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,VIMOND_INVALID_CONFIGURATION:9200,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 Uf;_.Xf=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=[]}toString(){return`Track type: ${this.type} id: ${this.id}
235
+ renditions size: ${this.renditions.length}`}};_.x("clpp.Track",_.Xf);_.Xf.prototype.toString=_.Xf.prototype.toString;_.Bn=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.drmInfo=this.codec=this.bandwidth=this.height=this.width=null}};_.x("clpp.Rendition",_.Bn);_.Wf=1;_.K=_.u;_.J=_.Tb;_.I=_.r;Uf=_.kd;_.Cn={VIDEO:_.K,AUDIO:_.J,TEXT:_.I,Kf:Uf};_.Xf.Type=_.Cn;_.P=class{Xe(a){return this.getVideoTracks().find(b=>_.lf(b,a,a&&Object.keys(a)))}Te(a){return this.getAudioTracks().find(b=>_.lf(b,a,a&&Object.keys(a)))}Ve(a){return this.ea().find(b=>_.lf(b,a,a&&Object.keys(a)))}We(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.lf(b,a,a&&Object.keys(a)))}Se(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.lf(b,a,a&&Object.keys(a)))}Ue(a){return this.ea().flatMap(b=>b.renditions).find(b=>_.lf(b,a,a&&Object.keys(a)))}};
233
236
  _.x("clpp.TrackManager",_.P);_.P.prototype.isAbrEnabled=_.P.prototype.ja;_.P.prototype.addTextTrack=_.P.prototype.addTextTrack;_.P.prototype.findTextRendition=_.P.prototype.Ue;_.P.prototype.findAudioRendition=_.P.prototype.Se;_.P.prototype.findVideoRendition=_.P.prototype.We;_.P.prototype.findTextTrack=_.P.prototype.Ve;_.P.prototype.findAudioTrack=_.P.prototype.Te;_.P.prototype.findVideoTrack=_.P.prototype.Xe;_.P.prototype.setTextRendition=_.P.prototype.cb;_.P.prototype.setAudioRendition=_.P.prototype.bb;
234
- _.P.prototype.setVideoRendition=_.P.prototype.Ma;_.P.prototype.setTextTrack=_.P.prototype.ta;_.P.prototype.setAudioTrack=_.P.prototype.la;_.P.prototype.setVideoTrack=_.P.prototype.Na;_.P.prototype.getTextTrack=_.P.prototype.ia;_.P.prototype.getAudioTrack=_.P.prototype.ha;_.P.prototype.getVideoTrack=_.P.prototype.Aa;_.P.prototype.getLoadingTextRendition=_.P.prototype.Va;_.P.prototype.getLoadingAudioRendition=_.P.prototype.Ua;_.P.prototype.getLoadingVideoRendition=_.P.prototype.Ia;
235
- _.P.prototype.getTextRendition=_.P.prototype.za;_.P.prototype.getAudioRendition=_.P.prototype.xa;_.P.prototype.getVideoRendition=_.P.prototype.fa;_.P.prototype.getTextTracks=_.P.prototype.ea;_.P.prototype.getAudioTracks=_.P.prototype.getAudioTracks;_.P.prototype.getVideoTracks=_.P.prototype.getVideoTracks;var un=class{};_.x("clpp.utils.BufferUtils",un);un.toArrayBuffer=eg;un.toDataView=_.dg;un.toInt32Array=_.cg;un.toUint32Array=bg;un.toUint16Array=ag;un.toUint8Array=_.L;un.equal=Zf;var hg=new _.O("clpp.utils.strings");_.x("clpp.utils.strings.fromUtf8",_.gg);_.x("clpp.utils.strings.fromBytesAutoDetect",_.jg);_.x("clpp.utils.strings.toUtf8",_.kg);_.x("clpp.utils.strings.toUtf16",_.lg);_.x("clpp.utils.strings.toByteArray",_.mg);_.x("clpp.utils.strings.startsWith",_.ng);_.x("clpp.utils.strings.endsWith",_.og);
236
- _.x("clpp.utils.strings.bitrateToString",function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(jf(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""}});
237
+ _.P.prototype.setVideoRendition=_.P.prototype.Na;_.P.prototype.setTextTrack=_.P.prototype.ta;_.P.prototype.setAudioTrack=_.P.prototype.la;_.P.prototype.setVideoTrack=_.P.prototype.Oa;_.P.prototype.getTextTrack=_.P.prototype.ia;_.P.prototype.getAudioTrack=_.P.prototype.ha;_.P.prototype.getVideoTrack=_.P.prototype.Aa;_.P.prototype.getLoadingTextRendition=_.P.prototype.Wa;_.P.prototype.getLoadingAudioRendition=_.P.prototype.Va;_.P.prototype.getLoadingVideoRendition=_.P.prototype.Ia;
238
+ _.P.prototype.getTextRendition=_.P.prototype.za;_.P.prototype.getAudioRendition=_.P.prototype.xa;_.P.prototype.getVideoRendition=_.P.prototype.fa;_.P.prototype.getTextTracks=_.P.prototype.ea;_.P.prototype.getAudioTracks=_.P.prototype.getAudioTracks;_.P.prototype.getVideoTracks=_.P.prototype.getVideoTracks;var Dn=class{};_.x("clpp.utils.BufferUtils",Dn);Dn.toArrayBuffer=hg;Dn.toDataView=_.gg;Dn.toInt32Array=_.fg;Dn.toUint32Array=eg;Dn.toUint16Array=dg;Dn.toUint8Array=_.L;Dn.equal=bg;var kg=new _.O("clpp.utils.strings");_.x("clpp.utils.strings.fromUtf8",_.jg);_.x("clpp.utils.strings.fromBytesAutoDetect",_.mg);_.x("clpp.utils.strings.toUtf8",_.ng);_.x("clpp.utils.strings.toUtf16",_.og);_.x("clpp.utils.strings.toByteArray",_.pg);_.x("clpp.utils.strings.startsWith",_.qg);_.x("clpp.utils.strings.endsWith",_.rg);
239
+ _.x("clpp.utils.strings.bitrateToString",function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(mf(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""}});
237
240
  _.x("clpp.utils.strings.durationToString",function(a,b="%h:%mm:%ss"){if(null===a||void 0===a)a=0;if(null===b||void 0===b)b="%h:%mm:%ss";const c=Math.floor(a/3600),d=Math.floor((a-3600*c)/60);a=Math.floor(a-3600*c-60*d);const e=(g,h)=>g.length<h?e("0"+g,h):g,f=g=>(h,k)=>e(g,k.length-1);return b.replace(/(%h+)/,f(String(c))).replace(/(%m+)/,f(String(d))).replace(/(%s+)/,f(String(a)))});
238
- _.x("clpp.utils.strings.hashCode",function(a){let b=0;if(0===a.length)return b;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b});var rg=document.createElement("span");_.x("clpp.net.makeRequest",_.wg);_.vg=6;_.x("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.vg});_.vn=class{constructor(a){this.f=a;this.a=null}$(a){return Bg(this,a,!1)}Pa(a){return Bg(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.rh=class{constructor(a){this.f=a;this.a=null}Od(){this.stop();this.f();return this}$(a){this.stop();this.a=(new _.vn(()=>{this.f()})).$(a);return this}Pa(a){this.stop();this.a=(new _.vn(()=>{this.f()})).Pa(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.x("clpp.utils.Timer",_.rh);_.rh.prototype.stop=_.rh.prototype.stop;_.rh.prototype.tickEvery=_.rh.prototype.Pa;_.rh.prototype.tickAfter=_.rh.prototype.$;_.rh.prototype.tickNow=_.rh.prototype.Od;_.Cg=[];var Fg=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",
239
- "cs"],["dan","da"],["deu","de"],[_.Ec,"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",
241
+ _.x("clpp.utils.strings.hashCode",function(a){let b=0;if(0===a.length)return b;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b});var ug=document.createElement("span");_.x("clpp.net.makeRequest",_.zg);_.yg=6;_.x("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.yg});_.En=class{constructor(a){this.f=a;this.a=null}$(a){return Eg(this,a,!1)}Qa(a){return Eg(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.wh=class{constructor(a){this.f=a;this.a=null}Od(){this.stop();this.f();return this}$(a){this.stop();this.a=(new _.En(()=>{this.f()})).$(a);return this}Qa(a){this.stop();this.a=(new _.En(()=>{this.f()})).Qa(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.x("clpp.utils.Timer",_.wh);_.wh.prototype.stop=_.wh.prototype.stop;_.wh.prototype.tickEvery=_.wh.prototype.Qa;_.wh.prototype.tickAfter=_.wh.prototype.$;_.wh.prototype.tickNow=_.wh.prototype.Od;_.Fg=[];var Ig=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",
242
+ "cs"],["dan","da"],["deu","de"],[_.Gc,"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",
240
243
  "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",
241
244
  "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",
242
245
  "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",
243
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);_.wn=(new Map).set(_.tc,_.tc).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Oe,_.Oe).set(_.Rc,_.Rc).set("channelsCount","channels");var Q=class extends _.P{constructor(){super();this.a=new _.O("clpp.native.TrackManager");this.l=null;this.g=new _.cn;this.h=[];this.D=0;this.o={};this.H=[];this.f=new Map;this.m=new Map;this.w=!0;this.L=this.A.bind(this,_.I);this.R=this.C.bind(this,_.I);this.N=this.B.bind(this,_.I);this.S=this.A.bind(this,_.K);this.V=this.C.bind(this,_.K);this.T=this.B.bind(this,_.K);this.I=this.A.bind(this,_.J);this.K=this.C.bind(this,_.J);this.J=this.B.bind(this,_.J)}A(a,b){if(b){var c=b.track;if(c){var d=this.h.find(g=>
244
- Kg(g,c,a));if(d)this.a.warn("Track from event already exists",c,d);else{var e=Vf(a,c);b=Lg(c);if(a===_.I){if(c.kind===_.id)return;var f;void 0!==c.id?f=this.o[c.id]:f=Object.values(this.o).find(g=>Kg(e,g,a));e.kind&&"captions"===e.kind&&(e.mimeType=_.Hb);f&&(e.src=f.url,e.mimeType=f.mimeType)}else if(d=this.h.find(g=>g.type===a&&_.hf(g,e,["kind","label","language"]))){d.id=c.id;b&&(this.a.debug(`Setting native ${a} track active`),this.f.set(a,d));this.a.debug("Track from event seems to already exists, flipped native track to",
245
- c);return}try{e.renditions.push(new _.sn(e.id,e));this.h.push(e);this.a.debug(a+" Track added",e);this.l.trigger(new _.F(_.xn));const g=Mg(this,a).length;f=a===_.K||a===_.J;if(b||1===g&&f)this.a.debug(`Setting native ${a} track active. `+`Native track active: ${b}. `+`Number of tracks: ${g}`,c),this.f.set(a,e)}catch(g){this.a.error("Error while converting track data",g)}}}else this.a.warn(Na)}else this.a.warn(Ma)}C(a,b){if(b){var c=b.track;c?a===_.I&&c.kind!==_.id&&(b=this.h.find(d=>Kg(d,c,a)))&&
246
- (this.h.splice(this.h.indexOf(b),1),(this.f.get(a)||null)===b&&(this.f.set(a,null),Ng(this)),this.a.debug(a+" Track removed, id: ",b.id)):this.a.warn(Na)}else this.a.warn(Ma)}B(a,b){this.a.debug(a+" Track changed",b);a===_.I&&Ng(this);const c=Sg(this,a);if(c)for(let d=0;d<c.length;++d)if(Lg(c[d])){if(b=this.h.find(e=>Kg(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===_.J?this.l.trigger(new _.F(_.Vg)):a===_.I&&this.l.trigger(new _.F(_.Wg));
247
- break}}j(a){this.l=a}load(){this.w=!1;var a=Og(this,_.I);a&&(this.g.on(a,_.Cb,this.L),this.g.on(a,Sd,this.R),this.g.on(a,lc,this.N));if(a=Og(this,_.J))this.g.on(a,_.Cb,this.I),this.g.on(a,Sd,this.K),this.g.on(a,lc,this.J);if(a=Og(this,_.K))this.g.on(a,_.Cb,this.S),this.g.on(a,Sd,this.V),this.g.on(a,lc,this.T);this.g.one(this.l,cc,this.F.bind(this))}release(){this.w=!0;this.h=[];this.o={};this.f.clear();this.m.clear();this.g.release()}destroy(){this.release();this.l=null}getVideoTracks(){return Mg(this,
248
- _.K)}getAudioTracks(){return Mg(this,_.J)}ea(){return Mg(this,_.I)}fa(){return Tg(this,_.K)}xa(){return Tg(this,_.J)}za(){return Tg(this,_.I)}Ia(){return Ug(this,_.K)}Ua(){return Ug(this,_.J)}Va(){return Ug(this,_.I)}Aa(){return this.f.get(_.K)||null}ha(){return this.f.get(_.J)||null}ia(){return this.f.get(_.I)||null}Na(a){Xg(this,_.K,a)}la(a){Xg(this,_.J,a)}ta(a){Xg(this,_.I,a)}Ma(a){Xg(this,_.K,a&&a.track)}bb(a){Xg(this,_.J,a&&a.track)}cb(a){Xg(this,_.I,a&&a.track)}addTextTrack(a){const b=this;
249
- return _.v(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.D++}`;b.o[c]=a;Yg(b,a,c)}else yield Zg(b,a)})}F(){const a=this;return _.v(function*(){const b=a.l.getConfiguration();$g(a,_.J,b.preferredAudioLanguage);if(!Sg(a,_.I).some(c=>Lg(c))){const c=Og(a,_.I);yield new Promise(d=>{a.g.one(c,lc,d);(new _.rh(d)).$(1)})}a.w||$g(a,_.I,b.preferredTextLanguage)})}ja(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}};Q.prototype.isAbrEnabled=Q.prototype.ja;
250
- Q.prototype.addTextTrack=Q.prototype.addTextTrack;Q.prototype.setTextRendition=Q.prototype.cb;Q.prototype.setAudioRendition=Q.prototype.bb;Q.prototype.setVideoRendition=Q.prototype.Ma;Q.prototype.setTextTrack=Q.prototype.ta;Q.prototype.setAudioTrack=Q.prototype.la;Q.prototype.setVideoTrack=Q.prototype.Na;Q.prototype.getTextTrack=Q.prototype.ia;Q.prototype.getAudioTrack=Q.prototype.ha;Q.prototype.getVideoTrack=Q.prototype.Aa;Q.prototype.getLoadingTextRendition=Q.prototype.Va;
251
- Q.prototype.getLoadingAudioRendition=Q.prototype.Ua;Q.prototype.getLoadingVideoRendition=Q.prototype.Ia;Q.prototype.getTextRendition=Q.prototype.za;Q.prototype.getAudioRendition=Q.prototype.xa;Q.prototype.getVideoRendition=Q.prototype.fa;Q.prototype.getTextTracks=Q.prototype.ea;Q.prototype.getAudioTracks=Q.prototype.getAudioTracks;Q.prototype.getVideoTracks=Q.prototype.getVideoTracks;_.yn=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(db);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(db);}fb(){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)}qa(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
246
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);_.Fn=(new Map).set(_.vc,_.vc).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Re,_.Re).set(_.Tc,_.Tc).set("channelsCount","channels");var Q=class extends _.P{constructor(){super();this.a=new _.O("clpp.native.TrackManager");this.l=null;this.g=new _.mn;this.h=[];this.D=0;this.o={};this.H=[];this.f=new Map;this.m=new Map;this.w=!0;this.L=this.A.bind(this,_.I);this.R=this.C.bind(this,_.I);this.N=this.B.bind(this,_.I);this.S=this.A.bind(this,_.K);this.V=this.C.bind(this,_.K);this.T=this.B.bind(this,_.K);this.I=this.A.bind(this,_.J);this.K=this.C.bind(this,_.J);this.J=this.B.bind(this,_.J)}A(a,b){if(b){var c=b.track;if(c){var d=this.h.find(g=>
247
+ Ng(g,c,a));if(d)this.a.warn("Track from event already exists",c,d);else{var e=Yf(a,c);b=Og(c);if(a===_.I){if(c.kind===_.kd)return;var f;void 0!==c.id?f=this.o[c.id]:f=Object.values(this.o).find(g=>Ng(e,g,a));e.kind&&"captions"===e.kind&&(e.mimeType=_.Jb);f&&(e.src=f.url,e.mimeType=f.mimeType)}else if(d=this.h.find(g=>g.type===a&&_.lf(g,e,["kind","label","language"]))){d.id=c.id;b&&(this.a.debug(`Setting native ${a} track active`),this.f.set(a,d));this.a.debug("Track from event seems to already exists, flipped native track to",
248
+ c);return}try{e.renditions.push(new _.Bn(e.id,e));this.h.push(e);this.a.debug(a+" Track added",e);this.l.trigger(new _.F(_.Gn));const g=Pg(this,a).length;f=a===_.K||a===_.J;if(b||1===g&&f)this.a.debug(`Setting native ${a} track active. `+`Native track active: ${b}. `+`Number of tracks: ${g}`,c),this.f.set(a,e)}catch(g){this.a.error("Error while converting track data",g)}}}else this.a.warn(Oa)}else this.a.warn(Na)}C(a,b){if(b){var c=b.track;c?a===_.I&&c.kind!==_.kd&&(b=this.h.find(d=>Ng(d,c,a)))&&
249
+ (this.h.splice(this.h.indexOf(b),1),(this.f.get(a)||null)===b&&(this.f.set(a,null),Tg(this)),this.a.debug(a+" Track removed, id: ",b.id)):this.a.warn(Oa)}else this.a.warn(Na)}B(a,b){this.a.debug(a+" Track changed",b);a===_.I&&Tg(this);const c=Vg(this,a);if(c)for(let d=0;d<c.length;++d)if(Og(c[d])){if(b=this.h.find(e=>Ng(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===_.J?this.l.trigger(new _.F(_.Yg)):a===_.I&&this.l.trigger(new _.F(_.Zg));
250
+ break}}j(a){this.l=a}load(){this.w=!1;var a=Ug(this,_.I);a&&(this.g.on(a,_.Eb,this.L),this.g.on(a,Ud,this.R),this.g.on(a,nc,this.N));if(a=Ug(this,_.J))this.g.on(a,_.Eb,this.I),this.g.on(a,Ud,this.K),this.g.on(a,nc,this.J);if(a=Ug(this,_.K))this.g.on(a,_.Eb,this.S),this.g.on(a,Ud,this.V),this.g.on(a,nc,this.T);this.g.one(this.l,hc,this.F.bind(this))}release(){this.w=!0;this.h=[];this.o={};this.f.clear();this.m.clear();this.g.release()}destroy(){this.release();this.l=null}getVideoTracks(){return Pg(this,
251
+ _.K)}getAudioTracks(){return Pg(this,_.J)}ea(){return Pg(this,_.I)}fa(){return Wg(this,_.K)}xa(){return Wg(this,_.J)}za(){return Wg(this,_.I)}Ia(){return Xg(this,_.K)}Va(){return Xg(this,_.J)}Wa(){return Xg(this,_.I)}Aa(){return this.f.get(_.K)||null}ha(){return this.f.get(_.J)||null}ia(){return this.f.get(_.I)||null}Oa(a){$g(this,_.K,a)}la(a){$g(this,_.J,a)}ta(a){$g(this,_.I,a)}Na(a){$g(this,_.K,a&&a.track)}bb(a){$g(this,_.J,a&&a.track)}cb(a){$g(this,_.I,a&&a.track)}addTextTrack(a){const b=this;
252
+ return _.v(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.D++}`;b.o[c]=a;ah(b,a,c)}else yield bh(b,a)})}F(){const a=this;return _.v(function*(){const b=a.l.getConfiguration();ch(a,_.J,b.preferredAudioLanguage);if(!Vg(a,_.I).some(c=>Og(c))){const c=Ug(a,_.I);yield new Promise(d=>{a.g.one(c,nc,d);(new _.wh(d)).$(1)})}a.w||ch(a,_.I,b.preferredTextLanguage)})}ja(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}};Q.prototype.isAbrEnabled=Q.prototype.ja;
253
+ Q.prototype.addTextTrack=Q.prototype.addTextTrack;Q.prototype.setTextRendition=Q.prototype.cb;Q.prototype.setAudioRendition=Q.prototype.bb;Q.prototype.setVideoRendition=Q.prototype.Na;Q.prototype.setTextTrack=Q.prototype.ta;Q.prototype.setAudioTrack=Q.prototype.la;Q.prototype.setVideoTrack=Q.prototype.Oa;Q.prototype.getTextTrack=Q.prototype.ia;Q.prototype.getAudioTrack=Q.prototype.ha;Q.prototype.getVideoTrack=Q.prototype.Aa;Q.prototype.getLoadingTextRendition=Q.prototype.Wa;
254
+ Q.prototype.getLoadingAudioRendition=Q.prototype.Va;Q.prototype.getLoadingVideoRendition=Q.prototype.Ia;Q.prototype.getTextRendition=Q.prototype.za;Q.prototype.getAudioRendition=Q.prototype.xa;Q.prototype.getVideoRendition=Q.prototype.fa;Q.prototype.getTextTracks=Q.prototype.ea;Q.prototype.getAudioTracks=Q.prototype.getAudioTracks;Q.prototype.getVideoTracks=Q.prototype.getVideoTracks;_.Hn=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(fb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(fb);}fb(){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)}qa(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
252
255
  1)}Sb(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}va(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.qa(),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}};
253
- _.x("clpp.BufferInfo",_.yn);_.yn.prototype.bufferedAheadOf=_.yn.prototype.va;_.yn.prototype.isBuffered=_.yn.prototype.Sb;_.yn.prototype.bufferEnd=_.yn.prototype.qa;_.yn.prototype.bufferStart=_.yn.prototype.fb;_.yn.prototype.end=_.yn.prototype.end;_.yn.prototype.start=_.yn.prototype.start;_.zn=class{constructor(){this.rc=new an(this);this.qc=[]}trigger(a){this.rc.trigger(a);for(const b of this.qc)b.dispatchEvent(a)}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}on(a,b,c){return this.rc.on(a,b,c)}one(a,b,c){return this.rc.one(a,b,c)}off(a,b){return this.rc.off(a,b)}addDelegate(a){a&&(0<=this.qc.indexOf(a)||this.qc.push(a))}removeDelegate(a){a&&(a=this.qc.indexOf(a),0<=a&&this.qc.splice(a,1))}};
254
- _.zn.prototype.off=_.zn.prototype.off;_.zn.prototype.one=_.zn.prototype.one;_.zn.prototype.on=_.zn.prototype.on;_.zn.prototype.removeEventListener=_.zn.prototype.removeEventListener;_.zn.prototype.addEventListener=_.zn.prototype.addEventListener;_.x("clpp.events.ERROR",_.Oc);_.x("clpp.events.LOADEDMETADATA",_.dd);_.x("clpp.events.BUFFERING_ENDED",_.$b);_.x("clpp.events.BUFFERING_STARTED",_.ac);_.x("clpp.events.STATE_CHANGED",_.be);_.Vg="audiotrackchanged";_.x("clpp.events.AUDIO_TRACK_CHANGED",_.Vg);_.Wg="texttrackchanged";_.x("clpp.events.TEXT_TRACK_CHANGED",_.Wg);_.x("clpp.events.VIDEO_TRACK_CHANGED",_.De);_.x("clpp.events.BITRATE_CHANGED",_.Yb);_.xn="tracksadded";_.x("clpp.events.TRACKS_ADDED",_.xn);_.x("clpp.events.LOAD_START",ed);
255
- _.x("clpp.events.RELEASING",_.Rd);_.x("clpp.events.RELEASED",Qd);_.x("clpp.events.DESTROYING","destroying");_.x("clpp.events.DESTROYED","destroyed");_.x("clpp.events.VIDEO_BUFFER_CHANGED",_.Ce);_.x("clpp.events.AUDIO_BUFFER_CHANGED",_.Wb);_.x("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.x("clpp.events.DRM_SESSION_UPDATE",_.Ic);_.x("clpp.events.DRM_SESSION_PERSISTED",_.Hc);_.x("clpp.events.DRM_RENEWAL_STARTED",Gc);_.x("clpp.events.DRM_EXPIRATION_UPDATE",_.Fc);
256
- _.x("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Xb);_.x("clpp.events.PLAY",_.Jd);_.x("clpp.events.SEEKING",_.Xd);_.x("clpp.events.SEEKED",_.Wd);_.x("clpp.events.USER_SEEKING",_.ue);_.x("clpp.events.USER_SEEKED",_.te);_.wk={SEEKING:1,NO_DATA:2};_.x("clpp.events.BufferingReasons",_.wk);_.x("clpp.events.ADS_TIMELINE_CHANGED",_.Db);_.x("clpp.events.AD_LOADED",_.tb);_.x("clpp.events.AD_BREAK_STARTED",_.mb);_.x("clpp.events.AD_STARTED",_.zb);_.x("clpp.events.AD_BUFFERING",_.ob);_.x("clpp.events.AD_PROGRESS",_.wb);
257
- _.x("clpp.events.AD_FIRST_QUARTILE",_.rb);_.x("clpp.events.AD_MIDPOINT",_.ub);_.x("clpp.events.AD_THIRD_QUARTILE",_.Bb);_.x("clpp.events.AD_PAUSED",_.vb);_.x("clpp.events.AD_RESUMED",_.xb);_.x("clpp.events.AD_SKIPPED",_.yb);_.x("clpp.events.AD_CLICKED",_.pb);_.x("clpp.events.AD_IMPRESSION",_.sb);_.x("clpp.events.AD_COMPLETED",_.qb);_.x("clpp.events.AD_STOPPED",_.Ab);_.x("clpp.events.AD_BREAK_STOPPED",_.nb);_.x("clpp.events.CASTING_STARTED",_.gc);_.x("clpp.events.CASTING_ENDED","castingended");
258
- _.x("clpp.events.CAST_STATUS_CHANGED",_.hc);_.x("clpp.events.AIRPLAY_STATUS_CHANGED",_.Gb);_.x("clpp.events.AIRPLAY_CASTING_STARTED",_.Fb);_.x("clpp.events.AIRPLAY_CASTING_ENDED",_.Eb);_.If="timeline-cue-added";_.x("clpp.events.TIMELINE_CUE_ADDED",_.If);_.Kf="timeline-cue-enter";_.x("clpp.events.TIMELINE_CUE_ENTER",_.Kf);_.Lf="timeline-cue-exit";_.x("clpp.events.TIMELINE_CUE_EXIT",_.Lf);_.x("clpp.events.MPD_TYPE_CHANGED",_.nd);_.x("clpp.events.VIMOND_RESPONSE",_.Ee);
259
- _.x("clpp.events.PLAYLIST_ITEM_CHANGED",_.Ld);_.x("clpp.events.PLAYLIST_MODIFIED",_.Md);_.x("clpp.events.CDN_SWITCH_SUCCESS",_.ic);_.x("clpp.events.ONLINE_STATUS_CHANGED",yd);_.Hj=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(){}};_.Ok=class{constructor(a,b){this.O=a;this.w=b;this.a=!1}abort(){this.a=!0;return this.w()}Cc(a,b){const c=new _.Hj;let d=()=>{c.reject(new _.H(_.G,7,7001));return this.abort()};this.O.then(e=>{this.a?c.reject(new _.H(_.G,7,7001)):a?d=ah(a,e,c):c.resolve(e)},e=>{b?d=ah(b,e,c):c.reject(e)});return new _.Ok(c,()=>d())}};_.Ok.aborted=function(){const a=Promise.reject(new _.H(_.G,7,7001));a.catch(()=>{});return new _.Ok(a,()=>Promise.resolve())};_.Ok.prototype.chain=_.Ok.prototype.Cc;_.An=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.O.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};var ih=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;Se=_.dh.prototype;Se.La="";Se.$b="";Se.Da="";Se.mc=null;Se.ma="";Se.Ob="";Se.toString=function(){var a=[],b=this.La;b&&a.push(lh(b,Bn,!0),":");if(b=this.Da){a.push("//");var c=this.$b;c&&a.push(lh(c,Bn,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.mc;null!=b&&a.push(":",String(b))}if(b=this.ma)this.Da&&"/"!=b.charAt(0)&&a.push("/"),a.push(lh(b,"/"==b.charAt(0)?Cn:Dn,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Ob)&&a.push("#",lh(b,En));return a.join("")};
260
- Se.resolve=function(a){var b=new _.dh(this);"data"===b.La&&(b=new _.dh);var c=!!a.La;c?eh(b,a.La):c=!!a.$b;c?b.$b=a.$b:c=!!a.Da;c?b.Da=a.Da:c=null!=a.mc;var d=a.ma;if(c)fh(b,a.mc);else if(c=!!a.ma){if("/"!=d.charAt(0))if(this.Da&&!this.ma)d="/"+d;else{var e=b.ma.lastIndexOf("/");-1!=e&&(d=b.ma.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(""):
261
- ".."==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.ma=d:c=""!==a.a.toString();c?gh(b,hh(a.a)):c=!!a.Ob;c&&(b.Ob=a.Ob);return b};var Bn=/[#\/\?@]/g,Dn=/[#\?:]/g,Cn=/[#\?]/g,mh=/[#\?@]/g,En=/#/g;kh.prototype.a=null;kh.prototype.g=null;
262
- kh.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};
263
- kh.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")};_.zl=class{constructor(){this.f=[];this.g=[];this.m=!1;this.j=new _.An;this.a={};this.h=0;this.a.data=Qm;!window.fetch||!window.AbortController||_.vh(6)||_.yh()&&68<_.Th().browserVersion.major?(this.a.http=ym,this.a.https=ym):(this.a.http=Lm,this.a.https=Lm)}zf(a){0<a?_.z("Rate limit set to "+a+"bps"):_.z("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)}Vc(a){this.g.push(a)}vf(a){this.f=this.f.filter(b=>
264
- b!==a)}Gd(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.m)return new Fn(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 _.Hj;try{for(const f of a.requestModifiers)d=d.then(g=>
265
- {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 _.dh(f.uris[f.uriIndex]);var h=g.La;h||(h=location.protocol,h=h.slice(0,-1),eh(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 Fn(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.G,1,7001,
266
- 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);});_.ch(this.j,e);c.resolve(a);return e}catch(f){return new Fn(Promise.reject(f))}}};_.zl.prototype.fetch=_.zl.prototype.fetch;_.zl.prototype.removeResponseModifier=_.zl.prototype.Gd;
267
- _.zl.prototype.removeRequestModifier=_.zl.prototype.vf;_.zl.prototype.addResponseModifier=_.zl.prototype.Vc;_.zl.prototype.addRequestModifier=_.zl.prototype.Me;_.zl.prototype.setRateLimit=_.zl.prototype.zf;var Gn=class{};_.x(sc,Gn);Gn.getInfo=_.Th;
268
- var qh=null,ph=null,Ih=new _.O(sc),Mh="android",Lh="ios",Rh="linux",Nh="osx",Oh="windows",Ph="tizen",Qh="webos",Kh=qe,Sh=qe,Dh={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,
256
+ _.x("clpp.BufferInfo",_.Hn);_.Hn.prototype.bufferedAheadOf=_.Hn.prototype.va;_.Hn.prototype.isBuffered=_.Hn.prototype.Sb;_.Hn.prototype.bufferEnd=_.Hn.prototype.qa;_.Hn.prototype.bufferStart=_.Hn.prototype.fb;_.Hn.prototype.end=_.Hn.prototype.end;_.Hn.prototype.start=_.Hn.prototype.start;_.In=class{constructor(){this.rc=new kn(this);this.qc=[]}trigger(a){this.rc.trigger(a);for(const b of this.qc)b.dispatchEvent(a)}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}on(a,b,c){return this.rc.on(a,b,c)}one(a,b,c){return this.rc.one(a,b,c)}off(a,b){return this.rc.off(a,b)}addDelegate(a){a&&(0<=this.qc.indexOf(a)||this.qc.push(a))}removeDelegate(a){a&&(a=this.qc.indexOf(a),0<=a&&this.qc.splice(a,1))}};
257
+ _.In.prototype.off=_.In.prototype.off;_.In.prototype.one=_.In.prototype.one;_.In.prototype.on=_.In.prototype.on;_.In.prototype.removeEventListener=_.In.prototype.removeEventListener;_.In.prototype.addEventListener=_.In.prototype.addEventListener;_.x("clpp.events.ERROR",_.Qc);_.x("clpp.events.LOADEDMETADATA",_.fd);_.x("clpp.events.BUFFERING_ENDED",_.bc);_.x("clpp.events.BUFFERING_STARTED",_.cc);_.x("clpp.events.STATE_CHANGED",_.ee);_.Yg="audiotrackchanged";_.x("clpp.events.AUDIO_TRACK_CHANGED",_.Yg);_.Zg="texttrackchanged";_.x("clpp.events.TEXT_TRACK_CHANGED",_.Zg);_.x("clpp.events.VIDEO_TRACK_CHANGED",_.Ge);_.x("clpp.events.BITRATE_CHANGED",_.$b);_.Gn="tracksadded";_.x("clpp.events.TRACKS_ADDED",_.Gn);_.x("clpp.events.LOAD_START",gd);
258
+ _.x("clpp.events.RELEASING",_.Td);_.x("clpp.events.RELEASED",Sd);_.x("clpp.events.DESTROYING","destroying");_.x("clpp.events.DESTROYED","destroyed");_.x("clpp.events.VIDEO_BUFFER_CHANGED",_.Fe);_.x("clpp.events.AUDIO_BUFFER_CHANGED",_.Yb);_.x("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.x("clpp.events.DRM_SESSION_UPDATE",_.Kc);_.x("clpp.events.DRM_SESSION_PERSISTED",_.Jc);_.x("clpp.events.DRM_RENEWAL_STARTED",Ic);_.x("clpp.events.DRM_EXPIRATION_UPDATE",_.Hc);
259
+ _.x("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Zb);_.x("clpp.events.PLAY",_.Ld);_.x("clpp.events.SEEKING",_.Zd);_.x("clpp.events.SEEKED",_.Yd);_.x("clpp.events.USER_SEEKING",_.ze);_.x("clpp.events.USER_SEEKED",_.xe);_.Fk={SEEKING:1,NO_DATA:2};_.x("clpp.events.BufferingReasons",_.Fk);_.x("clpp.events.ADS_TIMELINE_CHANGED",_.Fb);_.x("clpp.events.AD_LOADED",_.vb);_.x("clpp.events.AD_BREAK_STARTED",_.ob);_.x("clpp.events.AD_STARTED",_.Bb);_.x("clpp.events.AD_BUFFERING",_.qb);_.x("clpp.events.AD_PROGRESS",_.yb);
260
+ _.x("clpp.events.AD_FIRST_QUARTILE",_.tb);_.x("clpp.events.AD_MIDPOINT",_.wb);_.x("clpp.events.AD_THIRD_QUARTILE",_.Db);_.x("clpp.events.AD_PAUSED",_.xb);_.x("clpp.events.AD_RESUMED",_.zb);_.x("clpp.events.AD_SKIPPED",_.Ab);_.x("clpp.events.AD_CLICKED",_.rb);_.x("clpp.events.AD_IMPRESSION",_.ub);_.x("clpp.events.AD_COMPLETED",_.sb);_.x("clpp.events.AD_STOPPED",_.Cb);_.x("clpp.events.AD_BREAK_STOPPED",_.pb);_.x("clpp.events.CASTING_STARTED",_.ic);_.x("clpp.events.CASTING_ENDED","castingended");
261
+ _.x("clpp.events.CAST_STATUS_CHANGED",_.jc);_.x("clpp.events.AIRPLAY_STATUS_CHANGED",_.Ib);_.x("clpp.events.AIRPLAY_CASTING_STARTED",_.Hb);_.x("clpp.events.AIRPLAY_CASTING_ENDED",_.Gb);_.Lf="timeline-cue-added";_.x("clpp.events.TIMELINE_CUE_ADDED",_.Lf);_.Nf="timeline-cue-enter";_.x("clpp.events.TIMELINE_CUE_ENTER",_.Nf);_.Of="timeline-cue-exit";_.x("clpp.events.TIMELINE_CUE_EXIT",_.Of);_.x("clpp.events.MPD_TYPE_CHANGED",_.pd);_.x("clpp.events.VIMOND_RESPONSE",_.He);
262
+ _.x("clpp.events.PLAYLIST_ITEM_CHANGED",_.Nd);_.x("clpp.events.PLAYLIST_MODIFIED",_.Od);_.x("clpp.events.CDN_SWITCH_SUCCESS",_.kc);_.x("clpp.events.ONLINE_STATUS_CHANGED",Ad);_.Pj=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(){}};_.Xk=class{constructor(a,b){this.O=a;this.w=b;this.a=!1}abort(){this.a=!0;return this.w()}Cc(a,b){const c=new _.Pj;let d=()=>{c.reject(new _.H(_.G,7,7001));return this.abort()};this.O.then(e=>{this.a?c.reject(new _.H(_.G,7,7001)):a?d=dh(a,e,c):c.resolve(e)},e=>{b?d=dh(b,e,c):c.reject(e)});return new _.Xk(c,()=>d())}};_.Xk.aborted=function(){const a=Promise.reject(new _.H(_.G,7,7001));a.catch(()=>{});return new _.Xk(a,()=>Promise.resolve())};_.Xk.prototype.chain=_.Xk.prototype.Cc;_.Jn=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.O.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};var lh=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;Ve=_.gh.prototype;Ve.Ma="";Ve.$b="";Ve.Da="";Ve.mc=null;Ve.ma="";Ve.Ob="";Ve.toString=function(){var a=[],b=this.Ma;b&&a.push(oh(b,Kn,!0),":");if(b=this.Da){a.push("//");var c=this.$b;c&&a.push(oh(c,Kn,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.mc;null!=b&&a.push(":",String(b))}if(b=this.ma)this.Da&&"/"!=b.charAt(0)&&a.push("/"),a.push(oh(b,"/"==b.charAt(0)?Ln:Mn,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Ob)&&a.push("#",oh(b,Nn));return a.join("")};
263
+ Ve.resolve=function(a){var b=new _.gh(this);"data"===b.Ma&&(b=new _.gh);var c=!!a.Ma;c?hh(b,a.Ma):c=!!a.$b;c?b.$b=a.$b:c=!!a.Da;c?b.Da=a.Da:c=null!=a.mc;var d=a.ma;if(c)ih(b,a.mc);else if(c=!!a.ma){if("/"!=d.charAt(0))if(this.Da&&!this.ma)d="/"+d;else{var e=b.ma.lastIndexOf("/");-1!=e&&(d=b.ma.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(""):
264
+ ".."==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.ma=d:c=""!==a.a.toString();c?jh(b,kh(a.a)):c=!!a.Ob;c&&(b.Ob=a.Ob);return b};var Kn=/[#\/\?@]/g,Mn=/[#\?:]/g,Ln=/[#\?]/g,ph=/[#\?@]/g,Nn=/#/g;nh.prototype.a=null;nh.prototype.g=null;
265
+ nh.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};
266
+ nh.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")};_.Il=class{constructor(){this.f=[];this.g=[];this.m=!1;this.j=new _.Jn;this.a={};this.h=0;this.a.data=Zm;!window.fetch||!window.AbortController||_.Ah(6)||_.Dh()&&68<_.Yh().browserVersion.major?(this.a.http=Hm,this.a.https=Hm):(this.a.http=Um,this.a.https=Um)}zf(a){0<a?_.z("Rate limit set to "+a+"bps"):_.z("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)}Vc(a){this.g.push(a)}vf(a){this.f=this.f.filter(b=>
267
+ b!==a)}Gd(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.m)return new On(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 _.Pj;try{for(const f of a.requestModifiers)d=d.then(g=>
268
+ {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 _.gh(f.uris[f.uriIndex]);var h=g.Ma;h||(h=location.protocol,h=h.slice(0,-1),hh(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 On(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.G,1,7001,
269
+ 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);});_.fh(this.j,e);c.resolve(a);return e}catch(f){return new On(Promise.reject(f))}}};_.Il.prototype.fetch=_.Il.prototype.fetch;_.Il.prototype.removeResponseModifier=_.Il.prototype.Gd;
270
+ _.Il.prototype.removeRequestModifier=_.Il.prototype.vf;_.Il.prototype.addResponseModifier=_.Il.prototype.Vc;_.Il.prototype.addRequestModifier=_.Il.prototype.Me;_.Il.prototype.setRateLimit=_.Il.prototype.zf;var sh=["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 Pn=class{};_.x(uc,Pn);Pn.getInfo=_.Yh;
271
+ var vh=null,uh=null,Nh=new _.O(uc),Rh="android",Qh="ios",Wh="linux",Sh="osx",Th="windows",Uh="tizen",Vh="webos",Ph=te,Xh=te,Ih={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,
269
272
  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,
270
273
  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},
271
- 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 Hn=class{};_.x("clpp.utils.PlayerConfiguration",Hn);Hn.create=_.Yh;var In=["abort",bc,cc,Kc,"emptied",Lc,_.Nc,_.Oc,"interruptbegin","interruptend",_.cd,_.dd,ed,"mozaudioavailable",_.Dd,_.Jd,_.Kd,_.Nd,_.Pd,_.Wd,_.Xd,$d,"suspend",_.me,"volumechange",_.He,_.Ie,_.Ud,Ne,Me,Ke,Le];_.Jn=class extends _.zn{constructor(a){super();this.log=new _.O(a);this.configuration=this.ec=_.Wh();this.o=this.A=null;this.Mc=this.od=!1;this.Ee=new _.O("clpp.video.events");this.Hc=null;this.hc=-1;this.Ke=this.Ie.bind(this);this.le=new _.zl;this.K=new _.cn;this.na=this.fc=this.J=null}init(a,b){this.configuration=this.ec=b;this.A=a;this.log.info("Initializing Player surface");a=this.A.getMedia();this.log.info("Attaching media element listeners");for(const c of In)this.K.on(a,c,this.Ke,c!==_.Oc);
272
- this.Hc||(this.Hc=this.te());this.Hc.j(this);this.A.showMediaElement()}release(){this.J&&(this.J.destroy(),this.J=null);return Promise.resolve()}destroy(){this.K.release();return Promise.resolve()}canPlay(a,b){return _.zf[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.A.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);var c=b.message||
273
- "",d=b.stack||"";"NotAllowedError"===(b.name||"")&&(0===d.indexOf(_.Jd)||0<=c.indexOf(_.Jd))&&(this.trigger(new _.F(_.Xb)),this.log.warn(_.ia));throw b;})}pause(){return this.o?new Promise((a,b)=>{const c=this.getState();if(c!==_.uk&&c!==_.rk&&c!==_.Ck&&c!==_.Bk)b();else if(this.A.getMedia().pause(),this.getState()===_.Ck)this.K.one(this,_.be,()=>{a()});else a()}):Promise.reject("No sources specified yet. You need to load content before calling pause.")}isPaused(){return this.A.getMedia().paused}isEnded(){return this.A.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.fc=
274
- a}setCdnErrorCallback(a){this.na=a}jc(){return this.fc}getSurface(){return this.A}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.yn(b?b.buffered:void 0,a)}getPosition(){const a=this.A.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this.getPosition();if(void 0===a||null===a||typeof a!==_.p||a===b)return Promise.resolve();const c=this.A.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),
275
- 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(_.ue));this.K.on(c,_.Wd,h);this.K.on(c,_.me,h);this.K.on(c,_.Nd,h);this.log.info("Seeking to "+a+". Delta "+d);this.Mc=this.od=!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,w=l.type===_.Wd,A=l.type===_.Nd,B=l.type===_.me,
276
- E=A&&t;q=w||n&&E||B&&q;this.log.debug("Checking seeking state after "+l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",w,"Time reached",n,"Timeupdate:",B,"Progress:",A,"ReadyState:",t,"Progress Ready:",E);q?(this.Mc=this.od=!1,this.K.off(c,_.Wd,h),this.K.off(c,_.me,h),this.K.off(c,_.Nd,h),this.De(),this.trigger(new _.F(_.te)),e()):A&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();
277
- else this.K.one(c,_.dd,g)};this.getState()===_.zk?(this.log.debug("Player is in IDLE state. Postpone seek."),this.K.one(this,_.be,()=>{switch(this.getState()){case _.uk:case _.Ck:case _.Bk: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.A.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.A.getMedia();
278
- b?_.gf(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
279
- 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.A.getMedia().muted}setMuted(a){const b=this.A.getMedia();typeof a===_.Zb&&(b.muted=a)}getDuration(){return this.o?this.A.getMedia().duration:-1}getTrackManager(){return this.Hc}getPlaybackRate(){const a=this.A.getMedia();return a&&a.playbackRate||1}setPlaybackRate(a){const b=this.A.getMedia();
280
- void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.hc=a}getSourceIndex(){return this.hc}getLoadedSource(){return this.o&&-1!==this.hc?this.o[this.hc]:null}getPeriods(){return[]}getNetworkEngine(){return this.le}setNetworkEngine(a){this.le=a}getTextDisplayer(){return this.J}getTimelineCues(){return[]}resetAbr(){}Ie(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===_.me||a.type===_.Nd)this.Ee.debug(d);
281
- else{let e="";switch(a.type){case _.Pd:e=`Rate: ${this.getPlaybackRate()}`;break;case Kc:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Jd:case _.Kd:case "suspend":case _.He:case $d:case _.Xd:case _.Wd:case _.me:case _.Nd:case bc:case cc:b=this.getBufferInfo().va(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.Ud:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+
282
- e);this.Ee.info(d)}a.type!==_.Oc&&this.trigger(new _.F(a.type,{detail:a}))}De(){}};_.Jn.prototype.getTextDisplayer=_.Jn.prototype.getTextDisplayer;_.Jn.prototype.setNetworkEngine=_.Jn.prototype.setNetworkEngine;_.Jn.prototype.getNetworkEngine=_.Jn.prototype.getNetworkEngine;var bi;bi=new _.O("clpp.Components");_.$h=new Map;var Kn=class{};_.x("clpp.utils.Uint8ArrayUtils",Kn);Kn.toStandardBase64=_.ei;Kn.concat=_.mi;Kn.equal=_.li;Kn.toHex=_.ki;Kn.fromHex=_.ji;Kn.fromBase64=_.ii;Kn.toBase64Url=_.fi;var Ln=class{constructor(){this.a=this.f=null;this.g=new _.O("clpp.drm.csl")}release(){this.a=this.f=null}};var Mn={SW_SECURE_CRYPTO:_.Xa,SW_SECURE_DECODE:_.Ya,HW_SECURE_CRYPTO:za,HW_SECURE_DECODE:Aa,HW_SECURE_ALL:"HW_SECURE_ALL"};_.x("clpp.drm.WidevineRobustnessLevel",Mn);_.x("clpp.drm.RobustnessLevel",Mn);_.x("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.x("clpp.drm.KeySystem",{NONE:_.qd,CLEAR_KEY:_.Bd,WIDEVINE:_.yc,PLAYREADY:_.xc,FAIRPLAY:_.wc,PRIMETIME:_.vc});_.qi={};_.x("clpp.drm.registerDrmEnvironment",_.ri);var ui={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,
274
+ 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 Qn=class{};_.x("clpp.utils.PlayerConfiguration",Qn);Qn.create=_.ci;var Rn=["abort",gc,hc,Mc,"emptied",Nc,_.Pc,_.Qc,"interruptbegin","interruptend",_.ed,_.fd,gd,"mozaudioavailable",_.Hd,_.Ld,_.Md,_.Pd,_.Rd,_.Yd,_.Zd,ce,"suspend",_.pe,"volumechange",_.Ke,_.Le,_.Wd,Qe,Pe,Ne,Oe];_.Sn=class extends _.In{constructor(a){super();this.log=new _.O(a);this.configuration=this.ec=_.ai();this.o=this.A=null;this.Mc=this.od=!1;this.Ee=new _.O("clpp.video.events");this.Hc=null;this.hc=-1;this.Ke=this.Ie.bind(this);this.le=new _.Il;this.K=new _.mn;this.na=this.fc=this.J=null}init(a,b){this.configuration=this.ec=b;this.A=a;this.log.info("Initializing Player surface");a=this.A.getMedia();this.log.info("Attaching media element listeners");for(const c of Rn)this.K.on(a,c,this.Ke,c!==_.Qc);
275
+ this.Hc||(this.Hc=this.te());this.Hc.j(this);this.A.showMediaElement()}release(){this.J&&(this.J.destroy(),this.J=null);return Promise.resolve()}destroy(){this.K.release();return Promise.resolve()}canPlay(a,b){return _.Cf[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.A.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c={name:b.name||
276
+ "",message:b.message||"",stack:b.stack||""};th(c)?(this.trigger(new _.F(_.Zb)),this.log.warn(_.ia)):c.name===Qa&&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!==_.Dk&&c!==_.Ak&&c!==_.Lk&&c!==_.Kk)b();else if(this.A.getMedia().pause(),this.getState()===_.Lk)this.K.one(this,_.ee,()=>{a()});else a()}):Promise.reject("No sources specified yet. You need to load content before calling pause.")}isPaused(){return this.A.getMedia().paused}isEnded(){return this.A.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.fc=
277
+ a}setCdnErrorCallback(a){this.na=a}jc(){return this.fc}getSurface(){return this.A}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.Hn(b?b.buffered:void 0,a)}getPosition(){const a=this.A.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this.getPosition();if(void 0===a||null===a||typeof a!==_.p||a===b)return Promise.resolve();const c=this.A.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),
278
+ 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(_.ze));this.K.on(c,_.Yd,h);this.K.on(c,_.pe,h);this.K.on(c,_.Pd,h);this.log.info("Seeking to "+a+". Delta "+d);this.Mc=this.od=!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,w=l.type===_.Yd,B=l.type===_.Pd,A=l.type===_.pe,
279
+ E=B&&t;q=w||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:",w,"Time reached",n,"Timeupdate:",A,"Progress:",B,"ReadyState:",t,"Progress Ready:",E);q?(this.Mc=this.od=!1,this.K.off(c,_.Yd,h),this.K.off(c,_.pe,h),this.K.off(c,_.Pd,h),this.De(),this.trigger(new _.F(_.xe)),e()):B&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();
280
+ else this.K.one(c,_.fd,g)};this.getState()===_.Ik?(this.log.debug("Player is in IDLE state. Postpone seek."),this.K.one(this,_.ee,()=>{switch(this.getState()){case _.Dk:case _.Lk:case _.Kk: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.A.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.A.getMedia();
281
+ b?_.kf(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
282
+ 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.A.getMedia().muted}setMuted(a){const b=this.A.getMedia();typeof a===_.ac&&(b.muted=a)}getDuration(){return this.o?this.A.getMedia().duration:-1}getTrackManager(){return this.Hc}getPlaybackRate(){const a=this.A.getMedia();return a&&a.playbackRate||1}setPlaybackRate(a){const b=this.A.getMedia();
283
+ void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.hc=a}getSourceIndex(){return this.hc}getLoadedSource(){return this.o&&-1!==this.hc?this.o[this.hc]:null}getPeriods(){return[]}getNetworkEngine(){return this.le}setNetworkEngine(a){this.le=a}getTextDisplayer(){return this.J}getTimelineCues(){return[]}resetAbr(){}Ie(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===_.pe||a.type===_.Pd)this.Ee.debug(d);
284
+ else{let e="";switch(a.type){case _.Rd:e=`Rate: ${this.getPlaybackRate()}`;break;case Mc:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Ld:case _.Md:case "suspend":case _.Ke:case ce:case _.Zd:case _.Yd:case _.pe:case _.Pd:case gc:case hc:b=this.getBufferInfo().va(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.Wd:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+
285
+ e);this.Ee.info(d)}a.type!==_.Qc&&this.trigger(new _.F(a.type,{detail:a}))}De(){}};_.Sn.prototype.getTextDisplayer=_.Sn.prototype.getTextDisplayer;_.Sn.prototype.setNetworkEngine=_.Sn.prototype.setNetworkEngine;_.Sn.prototype.getNetworkEngine=_.Sn.prototype.getNetworkEngine;var gi;gi=new _.O("clpp.Components");_.ei=new Map;var Tn=class{};_.x("clpp.utils.Uint8ArrayUtils",Tn);Tn.toStandardBase64=_.li;Tn.concat=_.ri;Tn.equal=_.qi;Tn.toHex=_.pi;Tn.fromHex=_.oi;Tn.fromBase64=_.ni;Tn.toBase64Url=_.mi;var Un=class{constructor(){this.a=this.f=null;this.g=new _.O("clpp.drm.csl")}release(){this.a=this.f=null}};var Vn={SW_SECURE_CRYPTO:_.Za,SW_SECURE_DECODE:_.cb,HW_SECURE_CRYPTO:Aa,HW_SECURE_DECODE:Ba,HW_SECURE_ALL:"HW_SECURE_ALL"};_.x("clpp.drm.WidevineRobustnessLevel",Vn);_.x("clpp.drm.RobustnessLevel",Vn);_.x("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.x("clpp.drm.KeySystem",{NONE:_.sd,CLEAR_KEY:_.Dd,WIDEVINE:_.Ac,PLAYREADY:_.zc,FAIRPLAY:_.yc,PRIMETIME:_.xc});_.vi={};_.x("clpp.drm.registerDrmEnvironment",_.wi);var zi={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,
283
286
  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,
284
287
  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,
285
288
  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,
@@ -293,73 +296,73 @@ e);this.Ee.info(d)}a.type!==_.Oc&&this.trigger(new _.F(a.type,{detail:a}))}De(){
293
296
  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,
294
297
  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,
295
298
  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,
296
- 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]};_.Nn=class{constructor(a){this.I=a;this.g={}}Ba(a,b){this.g[a]=b}};_.x("clpp.drm.DrmEnvironment",_.Nn);_.Nn.prototype.setDrmSystem=_.Nn.prototype.Ba;_.Li=class{constructor(a,b){this.f=_.gf(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.g=!!b;this.buffer=this.f.buffer}getPosition(){return this.a}ya(){return this.f.byteLength}seek(a){(0>a||a>this.f.byteLength)&&_.xi();this.a=a}};_.Li.prototype.seek=_.Li.prototype.seek;
297
- _.On=class{constructor(a,b=!0){this.f=a;this.g=b;this.a=0}getPosition(){return this.a}ya(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.Ai();this.a+=a}seek(a){if(0>a||a>this.f.byteLength)throw _.Ai();this.a=a}};_.Ji=class{constructor(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.f=d?"":b.hostname;this.port=b.port;this.path=b.pathname;_.ng(this.path,
298
- "/")||(this.path="/"+this.path);this.a=b.search;this.g=b.hash}};_.x("clpp.utils.url.queryString",_.Gi);var Pn=class{};_.x("clpp.utils.FairplayUtils",Pn);Pn.parseFairPlayResponse=_.Oi;Pn.formatFairPlayRequest=_.Ni;Pn.createFairplayPayload=Mi;Pn.extractContentId=_.Ki;Pn.extractExtXKeyUri=Ii;var Ui=new _.O("clpp.drm.DrmToday"),cj="PRODUCTION",dj="STAGING",ej="TEST",Qn={PRODUCTION:cj,STAGING:dj,TEST:ej};_.x("clpp.drm.DrmToday.Environment",Qn);_.x("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
299
- var Qi="/license-proxy-widevine/cenc/",Ri="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Si="/license-server-fairplay/",fj={"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",
300
- 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"},Rn=[_.Ya,void 0],Sn=[_.Xa,void 0],Tn=["3000"],Un=["2000"];
301
- for(const a of Object.keys(Qn)){let b=ra;a!==cj&&(b+=`_${a}`);const c=new _.Nn(b);let d=null;switch(a){case cj:d=vi("V1_PROD");break;case dj:d=vi("V2");break;case ej:d=null}c.Ba(_.yc,{licenseUrl:Ti(_.yc,a),videoRobustness:Rn,audioRobustness:Sn,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Vi,licenseResponse:_.Wi}});c.Ba(_.wc,{licenseUrl:Ti(_.wc,a),certificateUrl:Pi(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Yi,licenseResponse:_.Zi,
302
- extractContentId:_.$i,certificateRequest:_.aj}});c.Ba(_.xc,{licenseUrl:Ti(_.xc,a),videoRobustness:Tn,audioRobustness:Un,modifiers:{licenseRequest:bj}});_.ri(c)};var Vn=class{};_.x("clpp.drm.eme.EmeFactory",Vn);var hj=[];Vn.Apis={STANDARD:Wa,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};_.Yn=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.O("clpp.mp4")}M(a,b){a=kj(a);this.g[a]=Wn;this.f[a]=b;return this}X(a,b){a=kj(a);this.g[a]=Xn;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.L(a);a=new _.On(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.zi(a)&&!this.a;)this.Qc(0,a,b)}Qc(a,b,c){const d=b.getPosition();let e=_.N(b);var f=_.N(b);let g=!1;this.h.debug("Parsing MP4 box",_.lj(f));switch(e){case 0:e=b.ya()-d;break;case 1:e=_.Di(b),g=!0}const h=
303
- this.f[f];if(h){let m=null;var k=null;this.g[f]==Xn&&(k=_.N(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.ya()&&(l=b.ya());l-=b.getPosition();b=0<l?_.Ei(b,l):new Uint8Array(0);b=new _.On(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({Za:this,se:c||!1,version:m,flags:k,G:b,size:e,start:d+a,kd:f,hf:g})}else a=Math.min(d+e-b.getPosition(),b.ya()-b.getPosition()),b.skip(a)}};_.x("clpp.utils.Mp4Parser",_.Yn);_.Yn.typeToString=_.lj;_.Yn.allData=_.oj;_.Yn.sampleDescription=_.nj;
304
- _.Yn.children=_.mj;_.Yn.prototype.parseNext=_.Yn.prototype.Qc;_.Yn.prototype.parse=_.Yn.prototype.parse;_.Yn.prototype.stop=_.Yn.prototype.stop;_.Yn.prototype.fullBox=_.Yn.prototype.X;_.Yn.prototype.box=_.Yn.prototype.M;_.Yn.headerSize=_.pj;var Wn=0,Xn=1;var Jj=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.Yn).X("pssh",this.h.bind(this)).parse(a.buffer);0==this.a.length&&_.z("No pssh box found!")}h(a){if(1<a.version)_.z("Unrecognized PSSH version found!");else{var b=_.ki(_.Ei(a.G,16)),c=[];if(0<a.version){var d=_.N(a.G);for(let e=0;e<d;++e){const f=_.ki(_.Ei(a.G,16));c.push(f)}}d=_.N(a.G);a.G.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.G.getPosition()!=a.G.ya()&&
305
- _.z("Mismatch between box size and data size!")}}};var Fj,Zn;
306
- _.Lk=class{constructor(a){this.j=a;this.J=new Set;this.A=this.F=this.o=null;this.R=!1;this.f=null;this.I=Zn;this.w=new _.cn;this.K=new Ln;this.g=new Map;this.H=[];this.D=new _.Hj;this.h=null;this.U=b=>{this.m=!0;this.B=!1;this.D.reject(b);a.onError(b)};this.ga=new Map;this.V=new Map;this.S=new _.rh(()=>yj(this));this.ka=!1;this.aa=new _.Hj;this.C=!1;this.T=[];this.ca=!1;this.N=0;this.a=new _.O("clpp.drm.DrmEngine");this.W=(new _.rh(()=>{zj(this)})).Pa(1);this.D.catch(()=>{});this.m=this.B=!1;this.L=
307
- null}destroy(){const a=this;return _.v(function*(){a.ka?yield a.aa:(a.ka=!0,yield Aj(a),a.aa.resolve())})}keySystem(){return this.f?_.sj(this.f.keySystem):""}getDrmInfo(){return this.f}ua(a){const b=this;return _.v(function*(){b.C&&b.I===Fj||(!b.h.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.ca?yield Oj(b,a):b.T.push(a))})}na(a){const b=a.target;this.a.debug("Key status changed for session",b.sessionId);const c=this.g.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f==_.ee){var g=f;
308
- f=e;e=g}if(rj(this.f.keySystem)&&16===f.byteLength&&_.th()){g=_.dg(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)}e!=ce&&(c.loaded=!0);"expired"==e&&(d=!0);const h=_.ki(_.L(f));this.a.debug("Key status for",h,e);this.ga.set(h,e);c&&!c.keyId&&this.g.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.eb&&(this.a.debug("Session has expired",b.sessionId),(a=this.g.get(b))&&
309
- a.dc&&a.dc.stop(),this.g.delete(b),b.close().catch(()=>{}));Wj(this)&&(this.D.resolve(),1!==this.g.size||d?this.S.$(.5):yj(this))}};Fj=0;Zn=3;var $n=class{Y(){}create(){}};_.x("clpp.text.TextDisplayerFactory",$n);$n.prototype.create=$n.prototype.create;$n.prototype.isSupported=$n.prototype.Y;var ak=new Map,bk=new _.O("clpp.text");$n.Type={HTML:"html",NATIVE:_.pd,SINGLE_NATIVE:_.Zd};_.ao=1/15;var bo=class{constructor(){this.a=null;this.f=[]}};var co=class{constructor(){this.g=this.f=this.h=null;this.a=[]}};_.eo=class{constructor(){this.m=this.A=this.o=this.B=this.g=this.h=this.f=this.j=NaN;this.a=new bo;this.w=new co}getStats(){return{width:this.j,height:this.f,streamBandwidth:this.A,decodedFrames:this.g,droppedFrames:this.h,corruptedFrames:this.B,estimatedBandwidth:this.m,loadLatency:this.o,playTime:gk(this.a,_.Ck),pauseTime:gk(this.a,_.Bk),bufferingTime:gk(this.a,_.uk),stateHistory:hk(this.a),switchHistory:ik(this.w)}}};_.fo=class{constructor(a){this.f=a;this.a=void 0}value(){void 0==this.a&&(this.a=this.f());return this.a}};var kk=new _.fo(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.dd],[HTMLMediaElement.HAVE_CURRENT_DATA,_.cd],[HTMLMediaElement.HAVE_FUTURE_DATA,bc],[HTMLMediaElement.HAVE_ENOUGH_DATA,cc]]));var ho=class{constructor(a){this.g=new _.O("clpp.StateManager");this.l=a;this.a=new _.cn;this.f=_.zk;this.A=_.go;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.m=this.D=!1;this.F=0;this.h=null;this.J=0;this.L=_.Fh();this.C=!1;this.I=Date.now();sk(this)}Ib(a,b){this.l&&this.l.trigger(new _.F(a,{detail:b}))}getState(){return vk(this,"")}U(a){(a=a&&a.detail)&&a.severity&&a.severity===_.G&&nk(this,_.yk)}destroy(){this.g.debug("Stop watching for video events for "+this.l.namespace());this.a.release()}};_.x("clpp.version",_.da);_.x("clpp.name",_.la);_.x("clpp.Type",{DASH:_.Ib,HLS:_.Pb,SMOOTH_STREAMING:_.Ob,MP4:_.Be});_.Hf="scte35";_.Ff=qe;_.x("clpp.TimelineCueType",{SCTE35:_.Hf,DASH_CALLBACK:_.od,UNKNOWN:_.Ff});_.x("clpp.utils.media.detectType",Dk);var Gk=new _.O("clpp.sources");var io=class extends _.Jn{constructor(){super(rc);this.w=this.F=!1;this.j=this.B=this.m=this.a=this.h=null;this.g=new _.cn;this.D=this.C=this.f=this.H=null}init(a,b){super.init(a,b);this.h=new ho(this);nk(this.h,_.zk)}namespace(){return rc}unload(){const a=this;return _.v(function*(){if(a.o){a.log.debug(_.Ua,a.o);a.C&&(a.C.stop(),a.C=null);const b=a.getTrackManager();b&&b.release();a.B&&(a.B.destroy(),a.B=null);a.J&&(a.J.destroy(),a.J=null);a.j&&a.j.release();a.m&&(a.m.destroy(),a.m=null);_.Df(a.g);
310
- a.f&&(a.f=new _.eo);a.D=null;a.o=null;a.F=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Ik(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.h&&nk(this.h,_.zk)})}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(sa);const a=this.getTrackManager();a&&a.destroy();this.j&&(this.j.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
311
- b)}),this.j=null);this.h&&(this.h.destroy(),this.h=null);this.f=null})}getDrmInfo(){return this.m?this.m.getDrmInfo():null}load(a){const b=this;return _.v(function*(){if(b.w)return Hk();if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.A.getMedia();b.H=Date.now()/1E3;b.f=new _.eo;b.g.on(b,_.be,()=>{b.f&&_.fk(b.f.a,b.getState())});nk(b.h,_.Ak);b.o=_.Fk(a);_.Zh(a)&&(b.configuration=_.Yh(b.ec,a));b.log.debug(_.Fa,b.configuration);
312
- b.log.debug(_.Ra,b.o);const d=_.dk(b.configuration,["html",_.pd]);b.J=d.create(b);b.J.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.ai(_.he)&&!_.Hh()&&(b.B=new rn(b),b.B.start(c));b.j?b.j.release():b.j=new dn(b);Nf(b.j,c);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.y(b.configuration.volume)||b.setVolume(b.configuration.volume);_.y(b.configuration.muted)||b.setMuted(b.configuration.muted);b.g.one(c,bc,()=>{b.trigger(new _.F(_.xn))});try{yield Kk(b,c),yield Mk(b),yield Pk(b).O}catch(e){b.F=
313
- !1,b.onError(e)}})}onError(a){this.F||(a.severity===_.G&&null!==this.h&&nk(this.h,_.yk),this.trigger(new _.F(_.Oc,{detail:a})))}te(){return new Q}getState(){return null!==this.h?this.h.getState().currentState:_.go}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!"),0):a.getTime()/1E3}return 0}getSeekRange(){var a=this.getSurface().getMedia();
314
- if(a&&a.src){a=a.seekable;if(a.length)return this.D=a={start:a.start(0),end:a.end(a.length-1)};if(this.D)return this.D}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.jk();this.f&&_.fk(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.j=a.videoWidth;b.f=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),a.h=Number(c.droppedVideoFrames),a.g=b,this.f.B=Number(c.corruptedVideoFrames));
315
- return this.f.getStats()}getTimelineCues(){return this.j?this.j.getTimelineCues():[]}};_.Bf(new class{a(){return rc}canPlay(a,b){a=a.type||"";const c=a===_.Ib,d=a===_.Ob,e=a===_.Pb;var f;_.Eh()||c||d||e&&!_.Fh()?f=0:f=""!==sh().canPlayType(a)?e&&_.Fh()&&window.MediaSource&&MediaSource.isTypeSupported&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}create(){return new io}});_.x("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.x("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1});_.x("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var Rk=new _.O("clpp.ads"),Qk=[];_.x("clpp.utils.dom.createHTMLElement",_.Yk);var ko=class{constructor(a,b){this.h=new _.O("clpp.PlayerSurface");const c=_.af({},jo,b);c.containerEl=(b||null)&&b.containerEl;this.g=typeof a===_.ee?document.getElementById(a):a;this.f=this.j=this.a=null;this.m=new _.cn;al(this,c)}getMedia(){return this.a}getContainer(){return this.f}getCastElement(){return this.j}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.Wk(a,oc):this.h.debug("No media element available that could be hidden")}showMediaElement(){const a=
316
- this.getMedia();a?a.classList.remove(oc):this.h.debug("No media element available that could be shown")}addElementToContainer(a,b=!1,c=!1){const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.Wk(a,_.nc);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){_.Wk(a,oc)}show(a){a.classList.remove(oc)}release(){this.m.release()}};
317
- ko.prototype.removeElementFromContainer=ko.prototype.removeElementFromContainer;ko.prototype.addElementToContainer=ko.prototype.addElementToContainer;ko.prototype.getCastElement=ko.prototype.getCastElement;ko.prototype.getContainer=ko.prototype.getContainer;ko.prototype.getMedia=ko.prototype.getMedia;var jo={disableContainer:!1,crossorigin:"anonymous",containerEl:null};var lo=class{constructor(a){this.l=a;this.h=this.l.getNetworkEngine();this.a=new _.cn;this.g=null;this.f=!0;fl(this)}release(){this.a.release();gl(this);this.l=null}};_.x("clpp.polyfill.installAll",jl);var il=[];_.x("clpp.polyfill.register",_.kl);var ml=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.gg(_.ii(a)));this.a=JSON.parse(_.gg(_.ii(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=_.kg(d),n=_.ii(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(bb)}).catch(g)}else b?
318
- g("Web Crypto API is not supported"):f()})}};var mo={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Uh="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Dl=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=nl(this);a(c)}catch(c){b()}})).then(a=>a.verify(mo)).catch(a=>{if(a&&a!==bb){{var b=window.location.href;const c=new _.dh(b);b=c.La||c.Da?c:new _.dh("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Da))return Promise.resolve()}throw a;})}},yl="vod",xl="live";var R=class extends _.zn{constructor(a,b,c){super();jl();this.g=new _.O("clpp.Player");if(!a)throw new _.H(_.G,7,7102);this.A=new _.cn;this.f=this.N=b||_.Wh();this.m=null;void 0===this.f.license&&(this.f.license=Uh,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 ko(a,c);this.a=this.w=null;
319
- this.F=new _.zl;this.j=null;this.J=[];this.K={};this.o=null;this.H=!0;this.I=this.D=!1;this.C=this.fc=null;this.$c=!1;this.S=new lo(this);this.L=!1;this.B=d=>{(d=d.detail)&&d.currentState===_.Ck&&(this.off(_.be,this.B),El(this))};this.on(_.be,()=>{this.getState()===_.yk&&this.unload()});this.on(_.Fb,this.R.bind(this));this.on(_.Eb,this.R.bind(this));Fl(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."),
320
- 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 Bl)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Hl(this,a);_.$h.clear()}init(){}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.F(_.Oc,{detail:a}),this.trigger(a)}Pb(a){a=this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.h}getConfiguration(){return _.bf(this.f)}getDrmInfo(){return this.a?
321
- this.a.getDrmInfo():null}unload(){return this.a?this.a.unload():Promise.resolve()}release(){if(null!=this.m)return this.g.info("Player release already in progress"),this.m;this.g.debug("Releasing player");this.m=Jl(this);return this.m.finally(()=>{this.g.debug("Player released");this.m=null})}destroy(){if(this.D)return this.g.debug("The player is already destroyed. No-op"),new Promise(a=>a());this.D=!0;return this.release().then(()=>{this.g.debug(sa);this.trigger(new _.F("destroying"));return _.Gl(this,
322
- _.vd)}).then(()=>{this.a&&this.a.removeDelegate(this);this.rc.clear();this.S.release();if(this.a)return this.a.destroy()}).then(()=>{di(a=>{a.a()});_.$h.clear();this.a=null;this.trigger(new _.F("destroyed"))})}load(a){const b=this;return _.v(function*(){try{yield _.Pl(b,a),yield _.Ql(b),yield _.Sl(b)}catch(c){if(b.m)throw b.g.info("Load interrupted while a player release is pending"),new _.H(_.G,7,7E3);throw c;}})}use(a){a=new a;a.f(this);_.ci(a)}remove(a){if(this.getState()<=_.zk||this.H){let b=
323
- "";di(c=>{c instanceof a&&(b=c.id(),c.a())});if(b)return _.$h.delete(b),this.I=!0}return!1}play(){return this.a?this.j&&this.a.namespace()!==_.pc?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&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):
324
- new _.yn}getState(){return this.a?this.a.getState():_.zk}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()===_.yk?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():0}getSeekRange(){return this.a?
299
+ 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]};_.Wn=class{constructor(a){this.I=a;this.g={}}Ba(a,b){this.g[a]=b}};_.x("clpp.drm.DrmEnvironment",_.Wn);_.Wn.prototype.setDrmSystem=_.Wn.prototype.Ba;_.Zi=class{constructor(a,b){this.f=_.kf(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.g=!!b;this.buffer=this.f.buffer}getPosition(){return this.a}ya(){return this.f.byteLength}seek(a){(0>a||a>this.f.byteLength)&&_.Ci();this.a=a}};_.Zi.prototype.seek=_.Zi.prototype.seek;
300
+ _.Xn=class{constructor(a,b=!0){this.f=a;this.g=b;this.a=0}getPosition(){return this.a}ya(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.Fi();this.a+=a}seek(a){if(0>a||a>this.f.byteLength)throw _.Fi();this.a=a}};_.Xi=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.O("clpp.mp4")}M(a,b){a=Li(a);this.g[a]=Yn;this.f[a]=b;return this}X(a,b){a=Li(a);this.g[a]=Zn;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.L(a);a=new _.Xn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.Ei(a)&&!this.a;)this.Qc(0,a,b)}Qc(a,b,c){const d=b.getPosition();let e=_.N(b);var f=_.N(b);let g=!1;this.h.debug("Parsing MP4 box",_.Mi(f));switch(e){case 0:e=b.ya()-d;break;case 1:e=_.Ji(b),g=!0}const h=
301
+ this.f[f];if(h){let m=null;var k=null;this.g[f]==Zn&&(k=_.N(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.ya()&&(l=b.ya());l-=b.getPosition();b=0<l?_.Ki(b,l):new Uint8Array(0);b=new _.Xn(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({La:this,se:c||!1,version:m,flags:k,G:b,size:e,start:d+a,kd:f,hf:g})}else a=Math.min(d+e-b.getPosition(),b.ya()-b.getPosition()),b.skip(a)}};_.x("clpp.utils.Mp4Parser",_.Xi);_.Xi.typeToString=_.Mi;_.Xi.allData=_.Pi;_.Xi.sampleDescription=_.Oi;
302
+ _.Xi.children=_.Ni;_.Xi.prototype.parseNext=_.Xi.prototype.Qc;_.Xi.prototype.parse=_.Xi.prototype.parse;_.Xi.prototype.stop=_.Xi.prototype.stop;_.Xi.prototype.fullBox=_.Xi.prototype.X;_.Xi.prototype.box=_.Xi.prototype.M;_.Xi.headerSize=_.Qi;var Yn=0,Zn=1;_.Vi=class{constructor(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.f=d?"":b.hostname;this.port=b.port;this.path=b.pathname;_.qg(this.path,
303
+ "/")||(this.path="/"+this.path);this.a=b.search;this.g=b.hash}};_.x("clpp.utils.url.queryString",_.Si);var $n=class{};_.x("clpp.utils.FairplayUtils",$n);$n.parseFairPlayResponse=_.bj;$n.formatFairPlayRequest=_.aj;$n.createFairplayPayload=$i;$n.extractContentId=_.Wi;$n.extractExtXKeyUri=Ui;var hj=new _.O("clpp.drm.DrmToday"),qj="PRODUCTION",rj="STAGING",sj="TEST",ao={PRODUCTION:qj,STAGING:rj,TEST:sj};_.x("clpp.drm.DrmToday.Environment",ao);_.x("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
304
+ var dj="/license-proxy-widevine/cenc/",ej="/license-proxy-headerauth/drmtoday/RightsManager.asmx",fj="/license-server-fairplay/",tj={"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",
305
+ 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"},bo=[_.cb,void 0],co=[_.Za,void 0],eo=["3000"],fo=["2000"];
306
+ for(const a of Object.keys(ao)){let b=ra;a!==qj&&(b+=`_${a}`);const c=new _.Wn(b);let d=null;switch(a){case qj:d=Ai("V1_PROD");break;case rj:d=Ai("V2");break;case sj:d=null}c.Ba(_.Ac,{licenseUrl:gj(_.Ac,a),videoRobustness:bo,audioRobustness:co,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.ij,licenseResponse:_.jj}});c.Ba(_.yc,{licenseUrl:gj(_.yc,a),certificateUrl:cj(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.lj,licenseResponse:_.mj,
307
+ extractContentId:_.nj,certificateRequest:_.oj}});c.Ba(_.zc,{licenseUrl:gj(_.zc,a),videoRobustness:eo,audioRobustness:fo,modifiers:{licenseRequest:pj}});_.wi(c)};var go=class{};_.x("clpp.drm.eme.EmeFactory",go);var vj=[];go.Apis={STANDARD:Ya,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var Rj=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.Xi).X("pssh",this.h.bind(this)).parse(a.buffer);0==this.a.length&&_.z("No pssh box found!")}h(a){if(1<a.version)_.z("Unrecognized PSSH version found!");else{var b=_.pi(_.Ki(a.G,16)),c=[];if(0<a.version){var d=_.N(a.G);for(let e=0;e<d;++e){const f=_.pi(_.Ki(a.G,16));c.push(f)}}d=_.N(a.G);a.G.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.G.getPosition()!=a.G.ya()&&
308
+ _.z("Mismatch between box size and data size!")}}};var Nj,ho;
309
+ _.Uk=class{constructor(a){this.j=a;this.J=new Set;this.A=this.F=this.o=null;this.R=!1;this.f=null;this.I=ho;this.w=new _.mn;this.K=new Un;this.g=new Map;this.H=[];this.D=new _.Pj;this.h=null;this.U=b=>{this.m=!0;this.B=!1;this.D.reject(b);a.onError(b)};this.ga=new Map;this.V=new Map;this.S=new _.wh(()=>Gj(this));this.ka=!1;this.aa=new _.Pj;this.C=!1;this.T=[];this.ca=!1;this.N=0;this.a=new _.O("clpp.drm.DrmEngine");this.W=(new _.wh(()=>{Hj(this)})).Qa(1);this.D.catch(()=>{});this.m=this.B=!1;this.L=
310
+ null}destroy(){const a=this;return _.v(function*(){a.ka?yield a.aa:(a.ka=!0,yield Ij(a),a.aa.resolve())})}keySystem(){return this.f?_.Aj(this.f.keySystem):""}getDrmInfo(){return this.f}ua(a){const b=this;return _.v(function*(){b.C&&b.I===Nj||(!b.h.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.ca?yield Wj(b,a):b.T.push(a))})}na(a){const b=a.target;this.a.debug("Key status changed for session",b.sessionId);const c=this.g.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f==_.he){var g=f;
311
+ f=e;e=g}if(zj(this.f.keySystem)&&16===f.byteLength&&_.yh()){g=_.gg(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)}e!=fe&&(c.loaded=!0);"expired"==e&&(d=!0);const h=_.pi(_.L(f));this.a.debug("Key status for",h,e);this.ga.set(h,e);c&&!c.keyId&&this.g.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.eb&&(this.a.debug("Session has expired",b.sessionId),(a=this.g.get(b))&&
312
+ a.dc&&a.dc.stop(),this.g.delete(b),b.close().catch(()=>{}));ek(this)&&(this.D.resolve(),1!==this.g.size||d?this.S.$(.5):Gj(this))}};Nj=0;ho=3;var io=class{Y(){}create(){}};_.x("clpp.text.TextDisplayerFactory",io);io.prototype.create=io.prototype.create;io.prototype.isSupported=io.prototype.Y;var jk=new Map,kk=new _.O("clpp.text");io.Type={HTML:"html",NATIVE:_.rd,SINGLE_NATIVE:_.be};_.jo=1/15;var ko=class{constructor(){this.a=null;this.f=[]}};var lo=class{constructor(){this.g=this.f=this.h=null;this.a=[]}};_.mo=class{constructor(){this.m=this.A=this.o=this.B=this.g=this.h=this.f=this.j=NaN;this.a=new ko;this.w=new lo}getStats(){return{width:this.j,height:this.f,streamBandwidth:this.A,decodedFrames:this.g,droppedFrames:this.h,corruptedFrames:this.B,estimatedBandwidth:this.m,loadLatency:this.o,playTime:sk(this.a,_.Lk),pauseTime:sk(this.a,_.Kk),bufferingTime:sk(this.a,_.Dk),stateHistory:tk(this.a),switchHistory:uk(this.w)}}};_.no=class{constructor(a){this.f=a;this.a=void 0}value(){void 0==this.a&&(this.a=this.f());return this.a}};var wk=new _.no(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.fd],[HTMLMediaElement.HAVE_CURRENT_DATA,_.ed],[HTMLMediaElement.HAVE_FUTURE_DATA,gc],[HTMLMediaElement.HAVE_ENOUGH_DATA,hc]]));var po=class{constructor(a){this.g=new _.O("clpp.StateManager");this.l=a;this.a=new _.mn;this.f=_.Ik;this.A=_.oo;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.m=this.D=!1;this.F=0;this.h=null;this.J=0;this.L=_.Kh();this.C=!1;this.I=Date.now();Bk(this)}Ib(a,b){this.l&&this.l.trigger(new _.F(a,{detail:b}))}getState(){return Ek(this,"")}U(a){(a=a&&a.detail)&&a.severity&&a.severity===_.G&&zk(this,_.Hk)}destroy(){this.g.debug("Stop watching for video events for "+this.l.namespace());this.a.release()}};_.x("clpp.version",_.da);_.x("clpp.name",_.la);_.x("clpp.Type",{DASH:_.Lb,HLS:_.Rb,SMOOTH_STREAMING:_.Qb,MP4:_.Ee});_.Kf="scte35";_.If=te;_.x("clpp.TimelineCueType",{SCTE35:_.Kf,DASH_CALLBACK:_.qd,UNKNOWN:_.If});_.x("clpp.utils.media.detectType",Mk);var Pk=new _.O("clpp.sources");var qo=class extends _.Sn{constructor(){super(tc);this.w=this.F=!1;this.j=this.B=this.m=this.a=this.h=null;this.g=new _.mn;this.D=this.C=this.f=this.H=null}init(a,b){super.init(a,b);this.h=new po(this);zk(this.h,_.Ik)}namespace(){return tc}unload(){const a=this;return _.v(function*(){if(a.o){a.log.debug(_.Wa,a.o);a.C&&(a.C.stop(),a.C=null);const b=a.getTrackManager();b&&b.release();a.B&&(a.B.destroy(),a.B=null);a.J&&(a.J.destroy(),a.J=null);a.j&&a.j.release();a.m&&(a.m.destroy(),a.m=null);_.Gf(a.g);
313
+ a.f&&(a.f=new _.mo);a.D=null;a.o=null;a.F=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Rk(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.h&&zk(this.h,_.Ik)})}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",
314
+ b)}),this.j=null);this.h&&(this.h.destroy(),this.h=null);this.f=null})}getDrmInfo(){return this.m?this.m.getDrmInfo():null}load(a){const b=this;return _.v(function*(){if(b.w)return Qk();if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.A.getMedia();b.H=Date.now()/1E3;b.f=new _.mo;b.g.on(b,_.ee,()=>{b.f&&_.ok(b.f.a,b.getState())});zk(b.h,_.Jk);b.o=_.Ok(a);_.di(a)&&(b.configuration=_.ci(b.ec,a));b.log.debug(_.Ha,b.configuration);
315
+ b.log.debug(_.Ta,b.o);const d=_.mk(b.configuration,["html",_.rd]);b.J=d.create(b);b.J.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.fi(_.ke)&&!_.Mh()&&(b.B=new An(b),b.B.start(c));b.j?b.j.release():b.j=new nn(b);Qf(b.j,c);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.y(b.configuration.volume)||b.setVolume(b.configuration.volume);_.y(b.configuration.muted)||b.setMuted(b.configuration.muted);b.g.one(c,gc,()=>{b.trigger(new _.F(_.Gn))});try{yield Tk(b,c),yield Vk(b),yield Yk(b).O}catch(e){b.F=
316
+ !1,b.onError(e)}})}onError(a){this.F||(a.severity===_.G&&null!==this.h&&zk(this.h,_.Hk),this.trigger(new _.F(_.Qc,{detail:a})))}te(){return new Q}getState(){return null!==this.h?this.h.getState().currentState:_.oo}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!"),0):a.getTime()/1E3}return 0}getSeekRange(){var a=this.getSurface().getMedia();
317
+ if(a&&a.src){a=a.seekable;if(a.length)return this.D=a={start:a.start(0),end:a.end(a.length-1)};if(this.D)return this.D}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.vk();this.f&&_.ok(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.j=a.videoWidth;b.f=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),a.h=Number(c.droppedVideoFrames),a.g=b,this.f.B=Number(c.corruptedVideoFrames));
318
+ return this.f.getStats()}getTimelineCues(){return this.j?this.j.getTimelineCues():[]}};_.Ef(new class{a(){return tc}canPlay(a,b){a=a.type||"";const c=a===_.Lb,d=a===_.Qb,e=a===_.Rb;var f;_.Jh()||c||d||e&&!_.Kh()?f=0:f=""!==xh().canPlayType(a)?e&&_.Kh()&&window.MediaSource&&MediaSource.isTypeSupported&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}create(){return new qo}});_.x("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.x("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1});_.x("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var $k=new _.O("clpp.ads"),Zk=[];_.x("clpp.utils.dom.createHTMLElement",_.hl);var so=class{constructor(a,b){this.h=new _.O("clpp.PlayerSurface");const c=_.df({},ro,b);c.containerEl=(b||null)&&b.containerEl;this.g=typeof a===_.he?document.getElementById(a):a;this.f=this.j=this.a=null;this.m=new _.mn;kl(this,c)}getMedia(){return this.a}getContainer(){return this.f}getCastElement(){return this.j}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.fl(a,qc):this.h.debug("No media element available that could be hidden")}showMediaElement(){const a=
319
+ this.getMedia();a?a.classList.remove(qc):this.h.debug("No media element available that could be shown")}addElementToContainer(a,b=!1,c=!1){const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.fl(a,_.pc);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){_.fl(a,qc)}show(a){a.classList.remove(qc)}release(){this.m.release()}};
320
+ so.prototype.removeElementFromContainer=so.prototype.removeElementFromContainer;so.prototype.addElementToContainer=so.prototype.addElementToContainer;so.prototype.getCastElement=so.prototype.getCastElement;so.prototype.getContainer=so.prototype.getContainer;so.prototype.getMedia=so.prototype.getMedia;var ro={disableContainer:!1,crossorigin:"anonymous",containerEl:null};var to=class{constructor(a){this.l=a;this.h=this.l.getNetworkEngine();this.a=new _.mn;this.g=null;this.f=!0;ol(this)}release(){this.a.release();pl(this);this.l=null}};_.x("clpp.polyfill.installAll",sl);var rl=[];_.x("clpp.polyfill.register",_.tl);var vl=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.jg(_.ni(a)));this.a=JSON.parse(_.jg(_.ni(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=_.ng(d),n=_.ni(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(db)}).catch(g)}else b?
321
+ g("Web Crypto API is not supported"):f()})}};var uo={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Zh="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Ml=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=wl(this);a(c)}catch(c){b()}})).then(a=>a.verify(uo)).catch(a=>{if(a&&a!==db){{var b=window.location.href;const c=new _.gh(b);b=c.Ma||c.Da?c:new _.gh("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Da))return Promise.resolve()}throw a;})}},Hl="vod",Gl="live";var R=class extends _.In{constructor(a,b,c){super();sl();this.g=new _.O("clpp.Player");if(!a)throw new _.H(_.G,7,7102);this.A=new _.mn;this.f=this.N=b||_.ai();this.m=null;void 0===this.f.license&&(this.f.license=Zh,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 so(a,c);this.a=this.w=null;
322
+ this.F=new _.Il;this.j=null;this.J=[];this.K={};this.o=null;this.H=!0;this.I=this.D=!1;this.C=this.fc=null;this.$c=!1;this.S=new to(this);this.L=!1;this.B=d=>{(d=d.detail)&&d.currentState===_.Lk&&(this.off(_.ee,this.B),Nl(this))};this.on(_.ee,()=>{this.getState()===_.Hk&&this.unload()});this.on(_.Hb,this.R.bind(this));this.on(_.Gb,this.R.bind(this));Ol(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."),
323
+ 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 Kl)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Ql(this,a);_.ei.clear()}init(){}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.F(_.Qc,{detail:a}),this.trigger(a)}Pb(a){a=this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.h}getConfiguration(){return _.ef(this.f)}getDrmInfo(){return this.a?
324
+ this.a.getDrmInfo():null}unload(){return this.a?this.a.unload():Promise.resolve()}release(){if(null!=this.m)return this.g.info("Player release already in progress"),this.m;this.g.debug("Releasing player");this.m=Sl(this);return this.m.finally(()=>{this.g.debug("Player released");this.m=null})}destroy(){if(this.D)return this.g.debug("The player is already destroyed. No-op"),new Promise(a=>a());this.D=!0;return this.release().then(()=>{this.g.debug(ua);this.trigger(new _.F("destroying"));return _.Pl(this,
325
+ _.xd)}).then(()=>{this.a&&this.a.removeDelegate(this);this.rc.clear();this.S.release();if(this.a)return this.a.destroy()}).then(()=>{ki(a=>{a.a()});_.ei.clear();this.a=null;this.trigger(new _.F("destroyed"))})}load(a){const b=this;return _.v(function*(){try{yield _.Yl(b,a),yield _.Zl(b),yield _.am(b)}catch(c){if(b.m)throw b.g.info("Load interrupted while a player release is pending"),new _.H(_.G,7,7E3);throw c;}})}use(a){a=new a;a.f(this);_.ji(a)}remove(a){if(this.getState()<=_.Ik||this.H){let b=
326
+ "";ki(c=>{c instanceof a&&(b=c.id(),c.a())});if(b)return _.ei.delete(b),this.I=!0}return!1}play(){return this.a?this.j&&this.a.namespace()!==_.rc?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&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):
327
+ new _.Hn}getState(){return this.a?this.a.getState():_.Ik}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()===_.Hk?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():0}getSeekRange(){return this.a?
325
328
  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&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.F}setNetworkEngine(a){this.F=
326
- a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}Jc(){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?this.a.getTimelineCues():[]}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.fc=a;Nl(this)}setCdnErrorCallback(a){this.C=
327
- a;this.a&&this.a.setCdnErrorCallback(this.C)}R(){this.$c=!0}};_.x("clpp.Player",R);R.registerPlugin=_.Cl;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.Jc;R.prototype.getStats=R.prototype.getStats;R.prototype.isLive=R.prototype.isLive;
329
+ a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}Jc(){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?this.a.getTimelineCues():[]}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.fc=a;Wl(this)}setCdnErrorCallback(a){this.C=
330
+ a;this.a&&this.a.setCdnErrorCallback(this.C)}R(){this.$c=!0}};_.x("clpp.Player",R);R.registerPlugin=_.Ll;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.Jc;R.prototype.getStats=R.prototype.getStats;R.prototype.isLive=R.prototype.isLive;
328
331
  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;R.prototype.getPlaybackRate=R.prototype.getPlaybackRate;R.prototype.namespace=R.prototype.namespace;R.prototype.getAdsManager=R.prototype.getAdsManager;R.prototype.getDuration=R.prototype.getDuration;
329
332
  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;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;
330
- 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;R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.Pb;_.zk=0;_.Ak=1;_.uk=2;_.Ck=3;_.Bk=4;_.rk=5;_.yk=6;_.go=7;
331
- _.xk={IDLE:_.zk,PREPARING:_.Ak,BUFFERING:_.uk,PLAYING:_.Ck,PAUSED:_.Bk,ENDED:_.rk,ERROR:_.yk,UNSET:_.go};R.State=_.xk;var Bl=[];var S=class{gb(){}hb(){}mb(){}ba(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}Tb(){}zb(){}getMediaUrl(){}jb(){}ib(){}Wa(){}Ja(){}getPodIndex(){}Ab(){}Bb(){}lb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.x("clpp.ads.IAd",S);S.prototype.getWrapperCreativeIds=S.prototype.getWrapperCreativeIds;S.prototype.getWrapperAdSystems=S.prototype.getWrapperAdSystems;S.prototype.getWrapperAdIds=S.prototype.getWrapperAdIds;
332
- S.prototype.getSequenceLength=S.prototype.lb;S.prototype.getPositionInSequence=S.prototype.Bb;S.prototype.getPodTimeOffset=S.prototype.Ab;S.prototype.getPodIndex=S.prototype.getPodIndex;S.prototype.getPodType=S.prototype.Ja;S.prototype.getMediaBitrate=S.prototype.Wa;S.prototype.getMediaHeight=S.prototype.ib;S.prototype.getMediaWidth=S.prototype.jb;S.prototype.getMediaUrl=S.prototype.getMediaUrl;S.prototype.getClickThroughUrl=S.prototype.zb;S.prototype.isBumper=S.prototype.Tb;
333
+ 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;R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.Pb;_.Ik=0;_.Jk=1;_.Dk=2;_.Lk=3;_.Kk=4;_.Ak=5;_.Hk=6;_.oo=7;
334
+ _.Gk={IDLE:_.Ik,PREPARING:_.Jk,BUFFERING:_.Dk,PLAYING:_.Lk,PAUSED:_.Kk,ENDED:_.Ak,ERROR:_.Hk,UNSET:_.oo};R.State=_.Gk;var Kl=[];var S=class{gb(){}hb(){}mb(){}ba(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}Tb(){}zb(){}getMediaUrl(){}jb(){}ib(){}Xa(){}Ja(){}getPodIndex(){}Ab(){}Bb(){}lb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.x("clpp.ads.IAd",S);S.prototype.getWrapperCreativeIds=S.prototype.getWrapperCreativeIds;S.prototype.getWrapperAdSystems=S.prototype.getWrapperAdSystems;S.prototype.getWrapperAdIds=S.prototype.getWrapperAdIds;
335
+ S.prototype.getSequenceLength=S.prototype.lb;S.prototype.getPositionInSequence=S.prototype.Bb;S.prototype.getPodTimeOffset=S.prototype.Ab;S.prototype.getPodIndex=S.prototype.getPodIndex;S.prototype.getPodType=S.prototype.Ja;S.prototype.getMediaBitrate=S.prototype.Xa;S.prototype.getMediaHeight=S.prototype.ib;S.prototype.getMediaWidth=S.prototype.jb;S.prototype.getMediaUrl=S.prototype.getMediaUrl;S.prototype.getClickThroughUrl=S.prototype.zb;S.prototype.isBumper=S.prototype.Tb;
333
336
  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.ba;S.prototype.getTechnology=S.prototype.mb;S.prototype.getAdManagerVersion=S.prototype.hb;
334
- S.prototype.getAdManagerName=S.prototype.gb;var no=class{name(){}Y(){}create(){}};_.x("clpp.ads.IAdsManagerFactory",no);no.prototype.create=no.prototype.create;no.prototype.isSupported=no.prototype.Y;no.prototype.name=no.prototype.name;var oo=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.x("clpp.ads.IAdsManager",oo);oo.prototype.getPosition=oo.prototype.getPosition;oo.prototype.setVolume=oo.prototype.setVolume;oo.prototype.getVolume=oo.prototype.getVolume;oo.prototype.skip=oo.prototype.skip;oo.prototype.pause=oo.prototype.pause;oo.prototype.resume=oo.prototype.resume;var po=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.v(function*(){})}};po.prototype.dispose=po.prototype.dispose;po.prototype.getPosition=po.prototype.getPosition;po.prototype.setVolume=po.prototype.setVolume;po.prototype.getVolume=po.prototype.getVolume;po.prototype.skip=po.prototype.skip;po.prototype.pause=po.prototype.pause;po.prototype.resume=po.prototype.resume;
335
- po.prototype.start=po.prototype.start;po.prototype.load=po.prototype.load;var Tk=class{name(){return"clpp.ads.NopAdsManagerFactory"}Y(){return!0}create(){return new po}};Tk.prototype.create=Tk.prototype.create;Tk.prototype.isSupported=Tk.prototype.Y;Tk.prototype.name=Tk.prototype.name;var qo=class{getCuePoints(){}Cb(){}Xa(){}};_.x("clpp.ads.IAdsTimeline",qo);qo.prototype.hasPostroll=qo.prototype.Xa;qo.prototype.hasPreroll=qo.prototype.Cb;qo.prototype.getCuePoints=qo.prototype.getCuePoints;_.ro=class{g(){}release(){}};var so=class{constructor(){this.h=null}j(a){this.h=a}g(a){return this.h?this.h.setMediaKeys(a):Promise.reject(Ka)}m(){return this.h&&this.h.mediaKeys}a(a,b){return navigator.requestMediaKeySystemAccess(a,b)}f(){return Wa}};ij(new class{a(){return Wa}Y(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new so}},1E3);var uo=class{constructor(){this.size=0;this.a=void 0}forEach(a){this.a&&a(this.a,to.value())}get(a){if(this.has(a))return this.a}has(a){const b=to.value();return this.a&&Zf(a,b)?!0:!1}entries(){}keys(){}values(){}},to=new _.fo(()=>eg(new Uint8Array([0])));var vo=class{j(){}g(a){_.D("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}m(){return null}a(){_.D("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};ij(new class{a(){return"NOP"}Y(){return!0}create(){return new vo}},-1);var xo=class{constructor(){this.h=this.o=null}j(a){this.o=a}g(a){const b=this.h;b&&b!==a&&Tl(b,null);return(this.h=a)?Tl(a,this.o):Promise.resolve()}m(){return this.h}a(a,b){_.D("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new wo(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},wo=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.wc))for(var c of b){a:{a=c;if(a.persistentState===_.Td){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
336
- persistentState:_.zd,distinctiveIdentifier:_.zd,initDataTypes:a.initDataTypes,sessionTypes:[je],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),
337
- e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Be));a=e?b:null}if(a){this.a=a;return}}c=Error(gb);c.name=Pa;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new yo(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.D("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},yo=class{constructor(a){_.D("AppleEmeManager.MediaKeys");this.f=null;this.g=new WebKitMediaKeys(a);this.a=new _.cn}createSession(a){a=void 0===a?je:a;_.D("AppleEmeManager.MediaKeys.createSession");
338
- if(a!==je)throw new TypeError("Session type "+a+ba);return new zo(this.g)}setServerCertificate(){_.D("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},zo=class extends _.zn{constructor(a){_.D("AppleEmeManager.MediaKeySession");super();this.g=null;this.j=a;this.a=this.f=null;this.h=new _.cn;this.sessionId="";this.expiration=NaN;this.closed=new _.Hj;this.keyStatuses=new uo}generateRequest(a,b){_.D("AppleEmeManager.MediaKeySession.generateRequest");this.f=new _.Hj;try{const c=
339
- this.j.createSession(_.Be,_.L(b));this.g=c;this.sessionId=c.sessionId||"";this.h.on(c,Me,d=>{_.D("AppleEmeManager.onWebkitKeyMessage_",d);this.f&&(this.f.resolve(),this.f=null);d=new _.F(hd,{messageType:void 0===this.keyStatuses.a?$c:Zc,message:eg(d.message.buffer)});this.dispatchEvent(d)});this.h.on(c,Ke,d=>{_.D("AppleEmeManager.onWebkitKeyAdded_",d);this.a&&(Ul(this,"usable"),this.a.resolve(),this.a=null)});this.h.on(c,Le,d=>{_.D("AppleEmeManager.onWebkitKeyError_",d);d=Error("EME AppleEmeManager key error");
340
- d.errorCode=this.g.error;if(null!==this.f)this.f.reject(d),this.f=null;else if(null!==this.a)this.a.reject(d),this.a=null;else switch(this.g.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Ul(this,"output-not-allowed");break;default:Ul(this,_.Uc)}});Ul(this,ce)}catch(c){this.f.reject(c)}return this.f}load(){_.D("AppleEmeManager.MediaKeySession.load");return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){_.D("AppleEmeManager.MediaKeySession.update");
341
- this.a=new _.Hj;try{this.g.update(_.L(a))}catch(b){this.a.reject(b)}return this.a}close(){_.D("AppleEmeManager.MediaKeySession.close");try{this.g.close(),this.closed.resolve(),_.Df(this.h)}catch(a){this.closed.reject(a)}return this.closed}remove(){_.D("AppleEmeManager.MediaKeySession.remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}};
342
- ij(new class{a(){return"APPLE"}Y(){return!!window.WebKitMediaKeys}create(){return new xo}},1100);var Bo=class{constructor(){this.o=this.h=null;this.w="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.w="webkit")}j(a){this.h=a}g(a){_.D("WebkitEmeManager.setMediaKeys");if(!this.h)return Promise.reject(Ka);const b=this.o;b&&b!==a&&Xl(b,null);(this.o=a)&&Xl(a,this.h);return Promise.resolve()}m(){return this.o}a(a,b){_.D("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.h)var c=this.h;else{var d=document.getElementsByTagName(_.u);c=d.length?d[0]:document.createElement(_.u)}const e=
343
- new Ao(this.w,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Ao=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Bd&&(this.a=Je,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,
344
- this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.Be,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.Td||a||(e=!1);if(e){this.f=g;return}}b=gb;if(c===_.Bd||c===_.yc)b="None of the requested configurations were supported.";c=Error(b);c.name=Pa;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Co(this.g,this.a))}getConfiguration(){return this.f}},Co=class{constructor(a,b){this.g=a;this.m=b;this.a=null;this.f=new _.cn;this.h=[];this.j=new Map}createSession(a=
345
- je){if(a!==je&&a!==_.Hd)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Da,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Do(this.g,this.a,this.m,a);this.h.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Do=class extends _.zn{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 _.Hj;this.keyStatuses=
346
- new uo}generateRequest(a,b){_.D("WebkitEmeManager.MediaKeySession.generateRequest");return Zl(this,b,null)}load(a){_.D(jb);return this.j===_.Hd?Zl(this,null,a):Promise.reject(Error(Oa))}update(a){_.D(jb);const b=new _.Hj;$l(this,b,a);return b}close(){_.D("WebkitEmeManager.MediaKeySession.close");if(this.j!==_.Hd){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;const a=Yl(this,"cancelKeyRequest");try{this.h[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();
347
- return this.closed}remove(){_.D("WebkitEmeManager.MediaKeySession.remove");return this.j!==_.Hd?Promise.reject(Error(Oa)):this.close()}};ij(new class{a(){return"WEBKIT"}Y(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Bo}});var Go=class extends _.Nn{constructor(a,b,c,d,e){super(Ba);this.m=a;this.j=b;this.h=c;this.f=d;this.o=e;this.a=new _.O(qc);_.qg(this.m)?this.a.warn(_.kb):this.Ba(_.yc,{licenseUrl:this.m,videoRobustness:[_.Ya,void 0],audioRobustness:[_.Xa,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.xc.bind(this)}});_.qg(this.j)?this.a.warn(_.Qa):this.Ba(_.xc,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.xc.bind(this)}});
348
- _.qg(this.h)?this.a.warn(_.ya):_.qg(this.f)?this.a.warn(_.xa):this.Ba(_.wc,{licenseUrl:this.h,certificateUrl:this.f,modifiers:{licenseRequest:this.oe.bind(this),licenseResponse:this.pe.bind(this),certificateRequest:this.xc.bind(this),extractContentId:this.ce.bind(this)}})}xc(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}ce(a,b){a=Ii(b);switch(this.o){case Eo:return a;case Fo:return(new _.Ji(a)).f;default:throw Error("Unknown content ID strategy");}}oe(a,b){b.headers[oa]=
349
- Qb;this.xc(a,b);a={spc:_.ei(b.body)};b.body=_.mg(_.Gi(a,!0))}pe(a,b){a=_.gg(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=_.ii(a).buffer}};_.x(qc,Go);Go.prototype.onFairPlayLicenseResponse=Go.prototype.pe;Go.prototype.onFairPlayLicenseRequest=Go.prototype.oe;Go.prototype.extractFairPlayContentId=Go.prototype.ce;Go.prototype.onLicenseRequest=Go.prototype.xc;Go.prototype.constructor=Go.prototype.constructor;Go.NAME=Ba;
350
- var Fo="hostname",Eo="full-skd";Go.FairPlayContentIdStrategy={HOSTNAME:Fo,FULL_SKD:Eo};_.x("clpp.drm.HeaderDrmComponent",class extends _.ro{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===Ba){a=a.drm.customData;if(!a)throw new _.H(_.G,7,7100,_.zc);a=new Go(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Eo);_.ri(a)}}release(){}id(){return"headerdrm"}});_.kl(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=_.L(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.kl(function(){_.D("mathRound.install")});_.kl(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;Pc in document||(Object.defineProperty(document,Pc,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
351
- {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",am);document.addEventListener("webkitfullscreenerror",am);document.addEventListener("mozfullscreenchange",am);document.addEventListener("mozfullscreenerror",am);document.addEventListener("MSFullscreenChange",am);document.addEventListener("MSFullscreenError",am)}});_.kl(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.D("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=cm,document.exitPictureInPicture=dm,document.addEventListener("webkitpresentationmodechanged",bm,!0))}});_.kl(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=em)}});_.kl(function(){if(window.VTTCue)_.tf("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.tf(ib),window.VTTCue=fm;else if(6===a)_.tf("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=gm;else{try{var b=!!fm(1,2,"")}catch(c){b=!1}b&&(_.tf(ib),window.VTTCue=fm)}}else _.uf("VTTCue not available.")});var hm;_.kl(function(){_.D("InputEvent.install");_.uh("Trident/")&&HTMLInputElement.prototype.addEventListener!==im&&(_.tf("Patching input event support on IE."),hm=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=im)});_.kl(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.kl(function(){_.D("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 lm=class{constructor(){this.a=jm()}};_.Ho=class{constructor(a){this.f=a;this.a=0}};var Io=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.Jo=class{constructor(a,b,c){this.f=a;this.g=b;this.h=c||this.f.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.g(a.contentRect.width,a.contentRect.height,this.f.isFullscreen())});this.a.observe(this.h)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var Ko;_.Lo=class{constructor(){this.a=new Blob([Ko],{type:_.Be})}canPlay(a){var b=document.createElement(_.u);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.Hj;b=b.play();const d=(new _.rh(()=>{d.stop();c.resolve(a)})).$(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===Pa?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
352
- Ko=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,
337
+ S.prototype.getAdManagerName=S.prototype.gb;var vo=class{name(){}Y(){}create(){}};_.x("clpp.ads.IAdsManagerFactory",vo);vo.prototype.create=vo.prototype.create;vo.prototype.isSupported=vo.prototype.Y;vo.prototype.name=vo.prototype.name;var wo=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.x("clpp.ads.IAdsManager",wo);wo.prototype.getPosition=wo.prototype.getPosition;wo.prototype.setVolume=wo.prototype.setVolume;wo.prototype.getVolume=wo.prototype.getVolume;wo.prototype.skip=wo.prototype.skip;wo.prototype.pause=wo.prototype.pause;wo.prototype.resume=wo.prototype.resume;var xo=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.v(function*(){})}};xo.prototype.dispose=xo.prototype.dispose;xo.prototype.getPosition=xo.prototype.getPosition;xo.prototype.setVolume=xo.prototype.setVolume;xo.prototype.getVolume=xo.prototype.getVolume;xo.prototype.skip=xo.prototype.skip;xo.prototype.pause=xo.prototype.pause;xo.prototype.resume=xo.prototype.resume;
338
+ xo.prototype.start=xo.prototype.start;xo.prototype.load=xo.prototype.load;var bl=class{name(){return"clpp.ads.NopAdsManagerFactory"}Y(){return!0}create(){return new xo}};bl.prototype.create=bl.prototype.create;bl.prototype.isSupported=bl.prototype.Y;bl.prototype.name=bl.prototype.name;var yo=class{getCuePoints(){}Cb(){}Ya(){}};_.x("clpp.ads.IAdsTimeline",yo);yo.prototype.hasPostroll=yo.prototype.Ya;yo.prototype.hasPreroll=yo.prototype.Cb;yo.prototype.getCuePoints=yo.prototype.getCuePoints;_.zo=class{g(){}release(){}};var Ao=class{constructor(){this.h=null}j(a){this.h=a}g(a){return this.h?this.h.setMediaKeys(a):Promise.reject(La)}m(){return this.h&&this.h.mediaKeys}a(a,b){return navigator.requestMediaKeySystemAccess(a,b)}f(){return Ya}};wj(new class{a(){return Ya}Y(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Ao}},1E3);var Co=class{constructor(){this.size=0;this.a=void 0}forEach(a){this.a&&a(this.a,Bo.value())}get(a){if(this.has(a))return this.a}has(a){const b=Bo.value();return this.a&&bg(a,b)?!0:!1}entries(){}keys(){}values(){}},Bo=new _.no(()=>hg(new Uint8Array([0])));var Do=class{j(){}g(a){_.D("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}m(){return null}a(){_.D("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};wj(new class{a(){return"NOP"}Y(){return!0}create(){return new Do}},-1);var Fo=class{constructor(){this.h=this.o=null}j(a){this.o=a}g(a){const b=this.h;b&&b!==a&&bm(b,null);return(this.h=a)?bm(a,this.o):Promise.resolve()}m(){return this.h}a(a,b){_.D("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Eo(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Eo=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.yc))for(var c of b){a:{a=c;if(a.persistentState===_.Vd){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
339
+ persistentState:_.Cd,distinctiveIdentifier:_.Cd,initDataTypes:a.initDataTypes,sessionTypes:[me],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),
340
+ e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Ee));a=e?b:null}if(a){this.a=a;return}}c=Error(jb);c.name=Ra;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Go(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.D("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Go=class{constructor(a){_.D("AppleEmeManager.MediaKeys");this.f=null;this.g=new WebKitMediaKeys(a);this.a=new _.mn}createSession(a){a=void 0===a?me:a;_.D("AppleEmeManager.MediaKeys.createSession");
341
+ if(a!==me)throw new TypeError("Session type "+a+ba);return new Ho(this.g)}setServerCertificate(){_.D("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Ho=class extends _.In{constructor(a){_.D("AppleEmeManager.MediaKeySession");super();this.g=null;this.j=a;this.a=this.f=null;this.h=new _.mn;this.sessionId="";this.expiration=NaN;this.closed=new _.Pj;this.keyStatuses=new Co}generateRequest(a,b){_.D("AppleEmeManager.MediaKeySession.generateRequest");this.f=new _.Pj;try{const c=
342
+ this.j.createSession(_.Ee,_.L(b));this.g=c;this.sessionId=c.sessionId||"";this.h.on(c,Pe,d=>{_.D("AppleEmeManager.onWebkitKeyMessage_",d);this.f&&(this.f.resolve(),this.f=null);d=new _.F(jd,{messageType:void 0===this.keyStatuses.a?bd:ad,message:hg(d.message.buffer)});this.dispatchEvent(d)});this.h.on(c,Ne,d=>{_.D("AppleEmeManager.onWebkitKeyAdded_",d);this.a&&(cm(this,"usable"),this.a.resolve(),this.a=null)});this.h.on(c,Oe,d=>{_.D("AppleEmeManager.onWebkitKeyError_",d);d=Error("EME AppleEmeManager key error");
343
+ d.errorCode=this.g.error;if(null!==this.f)this.f.reject(d),this.f=null;else if(null!==this.a)this.a.reject(d),this.a=null;else switch(this.g.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:cm(this,"output-not-allowed");break;default:cm(this,_.Yc)}});cm(this,fe)}catch(c){this.f.reject(c)}return this.f}load(){_.D("AppleEmeManager.MediaKeySession.load");return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){_.D("AppleEmeManager.MediaKeySession.update");
344
+ this.a=new _.Pj;try{this.g.update(_.L(a))}catch(b){this.a.reject(b)}return this.a}close(){_.D("AppleEmeManager.MediaKeySession.close");try{this.g.close(),this.closed.resolve(),_.Gf(this.h)}catch(a){this.closed.reject(a)}return this.closed}remove(){_.D("AppleEmeManager.MediaKeySession.remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}};
345
+ wj(new class{a(){return"APPLE"}Y(){return!!window.WebKitMediaKeys}create(){return new Fo}},1100);var Jo=class{constructor(){this.o=this.h=null;this.w="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.w="webkit")}j(a){this.h=a}g(a){_.D("WebkitEmeManager.setMediaKeys");if(!this.h)return Promise.reject(La);const b=this.o;b&&b!==a&&fm(b,null);(this.o=a)&&fm(a,this.h);return Promise.resolve()}m(){return this.o}a(a,b){_.D("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.h)var c=this.h;else{var d=document.getElementsByTagName(_.u);c=d.length?d[0]:document.createElement(_.u)}const e=
346
+ new Io(this.w,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Io=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Dd&&(this.a=Me,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,
347
+ this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.Ee,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.Vd||a||(e=!1);if(e){this.f=g;return}}b=jb;if(c===_.Dd||c===_.Ac)b="None of the requested configurations were supported.";c=Error(b);c.name=Ra;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Ko(this.g,this.a))}getConfiguration(){return this.f}},Ko=class{constructor(a,b){this.g=a;this.m=b;this.a=null;this.f=new _.mn;this.h=[];this.j=new Map}createSession(a=
348
+ me){if(a!==me&&a!==_.Jd)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ea,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Lo(this.g,this.a,this.m,a);this.h.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Lo=class extends _.In{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 _.Pj;this.keyStatuses=
349
+ new Co}generateRequest(a,b){_.D("WebkitEmeManager.MediaKeySession.generateRequest");return hm(this,b,null)}load(a){_.D(lb);return this.j===_.Jd?hm(this,null,a):Promise.reject(Error(Pa))}update(a){_.D(lb);const b=new _.Pj;im(this,b,a);return b}close(){_.D("WebkitEmeManager.MediaKeySession.close");if(this.j!==_.Jd){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;const a=gm(this,"cancelKeyRequest");try{this.h[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();
350
+ return this.closed}remove(){_.D("WebkitEmeManager.MediaKeySession.remove");return this.j!==_.Jd?Promise.reject(Error(Pa)):this.close()}};wj(new class{a(){return"WEBKIT"}Y(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Jo}});var Oo=class extends _.Wn{constructor(a,b,c,d,e){super(Ca);this.m=a;this.j=b;this.h=c;this.f=d;this.o=e;this.a=new _.O(sc);_.tg(this.m)?this.a.warn(_.mb):this.Ba(_.Ac,{licenseUrl:this.m,videoRobustness:[_.cb,void 0],audioRobustness:[_.Za,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.xc.bind(this)}});_.tg(this.j)?this.a.warn(_.Sa):this.Ba(_.zc,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.xc.bind(this)}});
351
+ _.tg(this.h)?this.a.warn(_.za):_.tg(this.f)?this.a.warn(_.ya):this.Ba(_.yc,{licenseUrl:this.h,certificateUrl:this.f,modifiers:{licenseRequest:this.oe.bind(this),licenseResponse:this.pe.bind(this),certificateRequest:this.xc.bind(this),extractContentId:this.ce.bind(this)}})}xc(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}ce(a,b){a=Ui(b);switch(this.o){case Mo:return a;case No:return(new _.Vi(a)).f;default:throw Error("Unknown content ID strategy");}}oe(a,b){b.headers[na]=
352
+ Sb;this.xc(a,b);a={spc:_.li(b.body)};b.body=_.pg(_.Si(a,!0))}pe(a,b){a=_.jg(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=_.ni(a).buffer}};_.x(sc,Oo);Oo.prototype.onFairPlayLicenseResponse=Oo.prototype.pe;Oo.prototype.onFairPlayLicenseRequest=Oo.prototype.oe;Oo.prototype.extractFairPlayContentId=Oo.prototype.ce;Oo.prototype.onLicenseRequest=Oo.prototype.xc;Oo.prototype.constructor=Oo.prototype.constructor;Oo.NAME=Ca;
353
+ var No="hostname",Mo="full-skd";Oo.FairPlayContentIdStrategy={HOSTNAME:No,FULL_SKD:Mo};_.x("clpp.drm.HeaderDrmComponent",class extends _.zo{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===Ca){a=a.drm.customData;if(!a)throw new _.H(_.G,7,7100,_.Bc);a=new Oo(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Mo);_.wi(a)}}release(){}id(){return"headerdrm"}});_.tl(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=_.L(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.tl(function(){_.D("mathRound.install")});_.tl(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;Rc in document||(Object.defineProperty(document,Rc,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
354
+ {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",jm);document.addEventListener("webkitfullscreenerror",jm);document.addEventListener("mozfullscreenchange",jm);document.addEventListener("mozfullscreenerror",jm);document.addEventListener("MSFullscreenChange",jm);document.addEventListener("MSFullscreenError",jm)}});_.tl(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.D("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=lm,document.exitPictureInPicture=mm,document.addEventListener("webkitpresentationmodechanged",km,!0))}});_.tl(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=nm)}});_.tl(function(){if(window.VTTCue)_.Af("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Af(kb),window.VTTCue=om;else if(6===a)_.Af("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=pm;else{try{var b=!!om(1,2,"")}catch(c){b=!1}b&&(_.Af(kb),window.VTTCue=om)}}else _.Bf("VTTCue not available.")});var qm;_.tl(function(){_.D("InputEvent.install");_.zh("Trident/")&&HTMLInputElement.prototype.addEventListener!==rm&&(_.Af("Patching input event support on IE."),qm=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=rm)});_.tl(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.tl(function(){_.D("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 um=class{constructor(){this.a=sm()}};_.Po=class{constructor(a){this.f=a;this.a=0}};var Qo=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.Ro=class{constructor(a,b,c){this.f=a;this.g=b;this.h=c||this.f.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.g(a.contentRect.width,a.contentRect.height,this.f.isFullscreen())});this.a.observe(this.h)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var So;_.To=class{constructor(){this.a=new Blob([So],{type:_.Ee})}canPlay(a){var b=document.createElement(_.u);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.Pj;b=b.play();const d=(new _.wh(()=>{d.stop();c.resolve(a)})).$(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===Ra?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
355
+ So=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,
353
356
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
354
357
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
355
358
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
356
359
  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,
357
360
  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,
358
- 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]);_.rm={};_.tm={};var Om=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new lm}};var xm=window.XMLHttpRequest;var Nm=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.h=new Io(a);this.length=a;this.w=b;this.f=this.a=this.g=0;this.j=null;this.m=-1;this.o=new lm}};var Fn=class extends _.Ok{constructor(a){super(new _.Hj,()=>Promise.resolve());this.A=a;this.g=null;this.o=this.O;this.f=-1;this.h=this.j=this.m=null;Hm(this)}then(a,b){this.O=this.O.then(a,b);return this}catch(a){this.O=this.O.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 Mm=window.fetch,Jm=window.AbortController,Im=window.Headers;_.Rm={};_.Oo=class{constructor(a){a=a.getConfiguration();a=_.bf(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.ee?a.backgroundColor:null;this.T=typeof a.windowColor===_.ee?a.windowColor:null;this.R=typeof a.fontColor===_.ee?a.fontColor:null;this.S=typeof a.fontFamily===_.ee?a.fontFamily:null;this.I=typeof a.fontSize===_.ee?a.fontSize:null;this.F=typeof a.fontSizePercent===_.p?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.ee?a.edgeColor:"rgba(0, 0, 0, 1)";this.C=_.Mo;typeof a.edgeType===
359
- _.ee&&(this.C=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.g()}getWindowColor(){return this.T}setWindowColor(a){this.T=a;this.g()}getFontFamily(){return this.S}setFontFamily(a){this.S=a;this.g()}getFontColor(){return this.R}setFontColor(a){this.R=a;this.g()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.g()}getFontSizePercent(){return null===this.F?No:this.F}setFontSizePercent(a){this.F=a;this.g()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
360
- a;this.g()}getEdgeType(){return this.C}setEdgeType(a){this.C=a;this.g()}};_.Oo.prototype.setEdgeType=_.Oo.prototype.setEdgeType;_.Oo.prototype.getEdgeType=_.Oo.prototype.getEdgeType;_.Oo.prototype.setEdgeColor=_.Oo.prototype.setEdgeColor;_.Oo.prototype.getEdgeColor=_.Oo.prototype.getEdgeColor;_.Oo.prototype.setFontSizePercent=_.Oo.prototype.setFontSizePercent;_.Oo.prototype.getFontSizePercent=_.Oo.prototype.getFontSizePercent;_.Oo.prototype.setFontSize=_.Oo.prototype.setFontSize;
361
- _.Oo.prototype.getFontSize=_.Oo.prototype.getFontSize;_.Oo.prototype.setFontColor=_.Oo.prototype.setFontColor;_.Oo.prototype.getFontColor=_.Oo.prototype.getFontColor;_.Oo.prototype.setFontFamily=_.Oo.prototype.setFontFamily;_.Oo.prototype.getFontFamily=_.Oo.prototype.getFontFamily;_.Oo.prototype.setWindowColor=_.Oo.prototype.setWindowColor;_.Oo.prototype.getWindowColor=_.Oo.prototype.getWindowColor;_.Oo.prototype.setBackgroundColor=_.Oo.prototype.setBackgroundColor;
362
- _.Oo.prototype.getBackgroundColor=_.Oo.prototype.getBackgroundColor;var No=1/15;var Tm,Um,Wm,Vm;_.Mo=_.qd;Tm="raised";Um="depressed";Wm="dropshadow";Vm="uniform";_.x("clpp.text.EdgeType",{NONE:_.Mo,RAISED:Tm,DEPRESSED:Um,DROP_SHADOW:Wm,UNIFORM:Vm});_.Rm[_.Kb]=class{constructor(a){this.g=a;this.a=null;this.f=new _.O("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Rm[_.Lb]||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=_.Rm[_.Mb]||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=
363
- 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 Po;
364
- _.Qo=class extends _.Oo{constructor(a){super(a);this.m=a.getSurface().getMedia();this.f=`clpp-video-${Po++}`;this.h=document.createElement(_.ge);this.j=this.o=!1;_.Wk(this.m,this.f);document.head.appendChild(this.h);this.g()}append(){}remove(){return!0}isTextVisible(){return this.o}setTextVisibility(a){this.o=a}g(){if(!this.j){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.Xm(this)},b=
365
- 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()}};Po=0;var Ro=class{Y(){return!0}create(a){return new _.Qo(a)}};Ro.prototype.create=Ro.prototype.create;Ro.prototype.isSupported=Ro.prototype.Y;_.ck(_.pd,new Ro);_.So=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;
361
+ 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]);_.Am={};_.Cm={};var Xm=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new um}};var Gm=window.XMLHttpRequest;var Wm=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.h=new Qo(a);this.length=a;this.w=b;this.f=this.a=this.g=0;this.j=null;this.m=-1;this.o=new um}};var On=class extends _.Xk{constructor(a){super(new _.Pj,()=>Promise.resolve());this.A=a;this.g=null;this.o=this.O;this.f=-1;this.h=this.j=this.m=null;Qm(this)}then(a,b){this.O=this.O.then(a,b);return this}catch(a){this.O=this.O.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 Vm=window.fetch,Sm=window.AbortController,Rm=window.Headers;_.$m={};_.Wo=class{constructor(a){a=a.getConfiguration();a=_.ef(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.he?a.backgroundColor:null;this.T=typeof a.windowColor===_.he?a.windowColor:null;this.R=typeof a.fontColor===_.he?a.fontColor:null;this.S=typeof a.fontFamily===_.he?a.fontFamily:null;this.I=typeof a.fontSize===_.he?a.fontSize:null;this.F=typeof a.fontSizePercent===_.p?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.he?a.edgeColor:"rgba(0, 0, 0, 1)";this.C=_.Uo;typeof a.edgeType===
362
+ _.he&&(this.C=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.g()}getWindowColor(){return this.T}setWindowColor(a){this.T=a;this.g()}getFontFamily(){return this.S}setFontFamily(a){this.S=a;this.g()}getFontColor(){return this.R}setFontColor(a){this.R=a;this.g()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.g()}getFontSizePercent(){return null===this.F?Vo:this.F}setFontSizePercent(a){this.F=a;this.g()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
363
+ a;this.g()}getEdgeType(){return this.C}setEdgeType(a){this.C=a;this.g()}};_.Wo.prototype.setEdgeType=_.Wo.prototype.setEdgeType;_.Wo.prototype.getEdgeType=_.Wo.prototype.getEdgeType;_.Wo.prototype.setEdgeColor=_.Wo.prototype.setEdgeColor;_.Wo.prototype.getEdgeColor=_.Wo.prototype.getEdgeColor;_.Wo.prototype.setFontSizePercent=_.Wo.prototype.setFontSizePercent;_.Wo.prototype.getFontSizePercent=_.Wo.prototype.getFontSizePercent;_.Wo.prototype.setFontSize=_.Wo.prototype.setFontSize;
364
+ _.Wo.prototype.getFontSize=_.Wo.prototype.getFontSize;_.Wo.prototype.setFontColor=_.Wo.prototype.setFontColor;_.Wo.prototype.getFontColor=_.Wo.prototype.getFontColor;_.Wo.prototype.setFontFamily=_.Wo.prototype.setFontFamily;_.Wo.prototype.getFontFamily=_.Wo.prototype.getFontFamily;_.Wo.prototype.setWindowColor=_.Wo.prototype.setWindowColor;_.Wo.prototype.getWindowColor=_.Wo.prototype.getWindowColor;_.Wo.prototype.setBackgroundColor=_.Wo.prototype.setBackgroundColor;
365
+ _.Wo.prototype.getBackgroundColor=_.Wo.prototype.getBackgroundColor;var Vo=1/15;var bn,cn,en,dn;_.Uo=_.sd;bn="raised";cn="depressed";en="dropshadow";dn="uniform";_.x("clpp.text.EdgeType",{NONE:_.Uo,RAISED:bn,DEPRESSED:cn,DROP_SHADOW:en,UNIFORM:dn});_.$m[_.Mb]=class{constructor(a){this.g=a;this.a=null;this.f=new _.O("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.$m[_.Nb]||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=_.$m[_.Ob]||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=
366
+ 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 Zo;
367
+ _.$o=class extends _.Wo{constructor(a){super(a);this.m=a.getSurface().getMedia();this.f=`clpp-video-${Zo++}`;this.h=document.createElement(_.je);this.j=this.o=!1;_.fl(this.m,this.f);document.head.appendChild(this.h);this.g()}append(){}remove(){return!0}isTextVisible(){return this.o}setTextVisibility(a){this.o=a}g(){if(!this.j){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.fn(this)},b=
368
+ 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()}};Zo=0;var ap=class{Y(){return!0}create(a){return new _.$o(a)}};ap.prototype.create=ap.prototype.create;ap.prototype.isSupported=ap.prototype.Y;_.lk(_.rd,new ap);_.bp=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;