@castlabs/prestoplay 6.14.0 → 6.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +7 -7
  5. package/cjs/cl.cast.js +113 -111
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +550 -529
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +74 -73
  10. package/cjs/cl.externs.js +191 -64
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +69 -68
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -30
  15. package/cjs/cl.ima.js +23 -23
  16. package/cjs/cl.mse.js +290 -275
  17. package/cjs/cl.muxdata.js +15 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +13 -13
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.simid.js +15 -15
  22. package/cjs/cl.smooth.js +72 -71
  23. package/cjs/cl.thumbnails.js +26 -26
  24. package/cjs/cl.tizen.js +70 -70
  25. package/cjs/cl.ttml.js +28 -28
  26. package/cjs/cl.verimatrix.js +5 -5
  27. package/cjs/cl.vimond.js +13 -13
  28. package/cjs/cl.vr.js +19 -19
  29. package/cjs/cl.vtt.js +14 -14
  30. package/cjs/cl.youbora.js +20 -20
  31. package/cl.adobe.js +3 -3
  32. package/cl.airplay.js +3 -3
  33. package/cl.broadpeak.js +5 -5
  34. package/cl.cast.js +89 -88
  35. package/cl.conviva.js +27 -27
  36. package/cl.core.js +457 -438
  37. package/cl.crypto.js +9 -9
  38. package/cl.dash.js +70 -68
  39. package/cl.externs.js +187 -64
  40. package/cl.freewheel.js +19 -19
  41. package/cl.hls.js +71 -69
  42. package/cl.hlssmpte.js +5 -5
  43. package/cl.htmlcue.js +26 -26
  44. package/cl.ima.js +17 -17
  45. package/cl.mse.js +255 -240
  46. package/cl.muxdata.js +13 -13
  47. package/cl.onboard.js +4 -4
  48. package/cl.persistent.js +11 -11
  49. package/cl.playlist.js +5 -5
  50. package/cl.simid.js +13 -13
  51. package/cl.smooth.js +59 -59
  52. package/cl.thumbnails.js +19 -19
  53. package/cl.tizen.js +57 -57
  54. package/cl.ttml.js +22 -22
  55. package/cl.verimatrix.js +4 -4
  56. package/cl.vimond.js +8 -8
  57. package/cl.vr.js +15 -15
  58. package/cl.vtt.js +12 -12
  59. package/cl.youbora.js +15 -15
  60. package/clpp.styles.css +2 -0
  61. package/package.json +1 -1
  62. package/typings.d.ts +387 -90
package/cjs/cl.muxdata.js CHANGED
@@ -1,19 +1,19 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var yy=function(a){switch(a.type){case 1:return vy;case 2:return wy;case 3:return xy}},Ay=function(a){var b=Object.keys(a).find(function(c){return zy.includes(c.toLowerCase())});return void 0!==b?a[b]:void 0},By=function(a,b){this.m=a;this.o=this.f=null;this.B=("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6);this.a=new _.Eh;this.g=b;this.A=this.l=this.h=!1;this.w=null;this.j=a.getNetworkEngine();this.G=this.ij.bind(this);this.C=this.dm.bind(this)},Dy=function(a){var b={debug:!0,
3
- data:Cy(a)};a.f&&a.f.muxOptionsOverride&&_.N.Wc(a.f.muxOptionsOverride)&&(b=_.N.oa(b,a.f.muxOptionsOverride));b=_.N.oa(b,{getPlayheadTime:function(){return 1E3*a.m.getPosition()},getStateData:function(){a.g.debug("getStateData()");var c=a.m.getLoadedSource(),d=a.m.getTrackManager(),e=a.m.getSurface(),f={player_is_paused:a.m.isPaused(),player_is_fullscreen:e.isFullscreen(),video_source_duration:1E3*a.m.getDuration(),player_autoplay_on:!!a.m.getConfiguration().autoplay};if(c){var g=new _.Xj(c.url);
4
- f.video_source_url=_.Yj(g);f.video_source_mime_type=c.type;c.name&&(f.video_title=c.name)}if(c=e.getContainer())f.player_width=c.offsetWidth,f.player_height=c.offsetHeight;(c=a.m.getSurface().getMedia())?c={videoWidth:c.videoWidth,videoHeight:c.videoHeight}:(c=a.m.getTrackManager().ka(),c={videoWidth:c.width,videoHeight:c.height});e=c;c=e.videoWidth;e=e.videoHeight;a.g.debug("Video dimensions: "+c+"x"+e);c&&e&&(f.video_source_height=c,f.video_source_width=e);(d=d.ja())&&d.language&&(f.player_language_code=
5
- d.language);return f}});a.g.debug("Mux SDK options",b);return b},Cy=function(a){var b={env_key:a.f.envKey,video_title:a.o&&a.o.name||"",player_name:_.wa,player_software_name:_.wa,player_software_version:_.ja,player_mux_plugin_name:"CastlabsPlayer built-in Mux Plugin",player_mux_plugin_version:_.ja};(a=a.m.getConfiguration().viewerId)&&(b.viewer_user_id=a);return b},Ey=function(a){a.a.on(a.m,_.eg,function(){var b={player_playhead_time:1E3*a.m.getPosition()};a.emit(_.eg,b)});a.a.on(a.m,_.gf,function(){return a.emit(_.gf)});
6
- a.a.on(a.m,_.gd,a.fj.bind(a));a.a.on(a.m,_.Tf,a.hj.bind(a));a.a.on(a.m,_.og,function(){return a.emit(_.Mf)});a.a.on(a.m,_.mg,function(){return a.emit(_.Lf)});a.a.on(a.m,_.ne,a.gj.bind(a));a.a.on(a.m,_.uc,function(){return a.emit("adbreakstart")});a.a.on(a.m,_.vc,function(){return a.emit("adbreakend")});a.a.on(a.m,_.Hc,function(){a.emit("adplay");a.emit("adplaying")});a.a.on(a.m,_.Dc,function(){return a.emit("adpause")});a.a.on(a.m,_.Fc,function(){a.emit("adplay");a.emit("adplaying")});a.a.on(a.m,
7
- _.Ic,function(){return a.emit("adended")});a.a.on(a.m,_.zc,function(){return a.emit("adfirstquartile")});a.a.on(a.m,_.Cc,function(){return a.emit("admidpoint")});a.a.on(a.m,_.Jc,function(){return a.emit("adthirdquartile")});a.j.hd(a.G);a.j.Xf(a.C);a.a.on(a.m,_.ne,function(b){var c=b.detail;if(c&&1===c.category&&(b=(b=c.data)&&b.request,void 0!==b&&!0===(1===b.type||2===b.type||3===b.type)))if(7001===c.code){c=b.requestStartTimestamp;var d=new _.Xj(b.uris[b.uriIndex]);b={request_start:c,request_type:yy(b),
8
- request_hostname:d.a};a.g.debug("onRequestCanceled()","Track event: requestcanceled",b);a.emit("requestcanceled",b)}else{d=b.requestStartTimestamp;var e=new _.Xj(b.uris[b.uriIndex]),f=c.data;b={request_start:d,request_type:yy(b),request_hostname:e.a,request_error:""+yy(b)+"LoadError",request_error_code:void 0===f?-1:void 0!==f.response?f.response.status:void 0!==f.status?f.status:-1,request_error_text:c.toString()};a.g.debug("onRequestFailed()","Track event: requestfailed",b);a.emit("requestfailed",
9
- b)}})},Fy=function(a){_.Hh(a.a);a.j.ze(a.G);a.j.Fh(a.C)},Gy=function(){this.f=this.m=null;this.a=!1;this.g=new _.K("clpp.muxdata")},Hy=function(a){return!_.N.R(a)&&typeof a.init===_.qe&&typeof a.emit===_.qe},Iy=function(){},vy="manifest",wy="media",xy="encryption",zy=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"];_.r=By.prototype;_.r.initialize=function(a,b,c){this.f=a;this.o=b;this.w=c;if(!this.h){try{this.h=!0,this.w.init(this.B,Dy(this))}catch(d){throw this.h=!1,Fy(this),new _.P(1,9,9302,null,d);}this.emit("playerready")}this.l&&!this.A&&(a=Cy(this),this.emit("videochange",a),this.l=!1);Ey(this)};_.r.release=function(){this.g.debug("release()");this.l?this.g.debug(_.ma):(Fy(this),this.l=!0,this.o=this.f=null)};_.r.destroy=function(){this.g.debug(_.Wd);this.A?this.g.debug(_.la):(this.A=!0,this.emit("destroy"))};
10
- _.r.emit=function(a,b){if(null===this.w)throw new _.P(1,9,9301);this.w.emit(this.B,a,b)};_.r.fj=function(a){this.g.debug(_.Ue);var b=a.detail;a=this.m.getTrackManager();b&&b.bandwidth&&(b=b.bandwidth,(a=a.Qa())&&a.bandwidth&&(b+=a.bandwidth),this.emit("renditionchange",{video_source_bitrate:b}))};_.r.hj=function(a){this.g.debug(_.Ye);switch(a.detail.currentState){case _.To:this.m.getConfiguration().autoplay&&this.emit(_.gf);break;case _.Vo:this.emit(_.of);break;case _.Uo:this.emit(_.cf);break;case _.Oo:this.emit(_.me)}};
11
- _.r.gj=function(a){this.g.debug(_.Ve);if(this.h&&(a=a.detail||null))if(10003===a.code)this.emit("aderror");else if(a.severity===_.Q){var b=a.message||"Player error";if(1===a.category||6100===a.code||6007===a.code)b="Download error",6100===a.code?b="Certificate request error":6007===a.code&&(b="License request error"),b=b+" castlabs-error-data:"+JSON.stringify(a.data);this.emit(_.ne,{player_error_code:a.code,player_error_message:b})}};
12
- _.r.ij=function(a){var b=a.request;if(b=void 0!==b&&!0===(1===b.type||2===b.type||3===b.type))b=a.status,b=void 0!==b&&200<=b&&299>=b;if(b){b=a.request;var c=a.headers,d=b.bytesLoaded,e=b.requestStartTimestamp,f=b.startTime,g=b.endTime,h=e+a.responseStartMs;a=e+a.timeMs;f=f&&g?g-f:void 0;g=new _.Xj(b.uris[b.uriIndex]);a={request_start:e,request_type:yy(b),request_hostname:g.a,request_id:Ay(c),request_bytes_loaded:d,request_response_start:h,request_response_end:a,request_response_headers:c,request_media_duration:f,
13
- request_url:_.Yj(g)};this.g.debug("onRequestCompleted()","Track event: requestcompleted",a);this.emit("requestcompleted",a)}};_.r.dm=function(a){a.requestStartTimestamp=Date.now()};_.w(Gy,_.rt);_.r=Gy.prototype;_.r.onPlayerCreated=function(a){this.m=a;this.f=new By(a,this.g)};
14
- _.r.onContentWillLoad=function(a,b){var c=a.getConfiguration();c=_.N.Oa(c.muxdata);try{var d=[];typeof c===_.Te&&(c.envKey||d.push("envKey"));if(0<d.length)throw new _.P(1,9,9300,{missingKeys:d});var e=a.getConfiguration();d=null;if(this.a=!_.N.R(e.muxdata)&&typeof e.muxdata===_.Te){var f=e.muxdata;d=Hy(f.muxLib)?f.muxLib:window.mux;if(!Hy(d)){this.g.warn("Mux SDK is not loaded. Will do nothing.");this.a=!1;var g=new _.P(1,9,9301);this.U(a,g)}}else this.g.warn("Mux plugin is loaded but not configured. Will do nothing.");
15
- var h=d;null!==h&&this.f.initialize(c,b,h)}catch(l){this.a=!1,this.U(a,l)}};_.r.onContentLoaded=function(){};_.r.onPlayerWillDestroy=function(){this.a&&(this.f.destroy(),this.m=this.f=null)};_.r.onPlayerWillRelease=function(){this.a&&this.f.release()};_.r.id=function(){return"mux"};_.r.emit=function(a,b){try{this.f.emit(a,b)}catch(c){throw null!==this.m&&this.U(this.m,c),c;}};_.r.U=function(a,b){a.trigger(new _.L(_.ne,{detail:b}))};_.H("clpp.muxdata.MuxDataPlugin",Gy);Gy.prototype.emit=Gy.prototype.emit;
16
- Gy.Id="mux";Iy.prototype.create=function(){return new Gy};_.nq(new Iy);};
2
+ var f=function(window){var wz=function(a){switch(a.type){case 1:return tz;case 2:return uz;case 3:return vz}},yz=function(a){var b=Object.keys(a).find(function(c){return xz.includes(c.toLowerCase())});return void 0!==b?a[b]:void 0},zz=function(a,b){this.m=a;this.o=this.f=null;this.B=("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6);this.a=new _.Sh;this.g=b;this.A=this.l=this.h=!1;this.w=null;this.j=a.getNetworkEngine();this.G=this.Bj.bind(this);this.D=this.Am.bind(this)},Bz=function(a){var b={debug:!0,
3
+ data:Az(a)};a.f&&a.f.muxOptionsOverride&&_.O.Yc(a.f.muxOptionsOverride)&&(b=_.O.na(b,a.f.muxOptionsOverride));b=_.O.na(b,{getPlayheadTime:function(){return 1E3*a.m.getPosition()},getStateData:function(){a.g.debug("getStateData()");var c=a.m.getLoadedSource(),d=a.m.getTrackManager(),e=a.m.getSurface(),f={player_is_paused:a.m.isPaused(),player_is_fullscreen:e.isFullscreen(),video_source_duration:1E3*a.m.getDuration(),player_autoplay_on:!!a.m.getConfiguration().autoplay};if(c){var g=new _.qk(c.url);
4
+ f.video_source_url=_.rk(g);f.video_source_mime_type=c.type;c.name&&(f.video_title=c.name)}if(c=e.getContainer())f.player_width=c.offsetWidth,f.player_height=c.offsetHeight;(c=a.m.getSurface().getMedia())?c={videoWidth:c.videoWidth,videoHeight:c.videoHeight}:(c=a.m.getTrackManager().ma(),c={videoWidth:c.width,videoHeight:c.height});e=c;c=e.videoWidth;e=e.videoHeight;a.g.debug("Video dimensions: "+c+"x"+e);c&&e&&(f.video_source_height=c,f.video_source_width=e);(d=d.la())&&d.language&&(f.player_language_code=
5
+ d.language);return f}});a.g.debug("Mux SDK options",b);return b},Az=function(a){var b={env_key:a.f.envKey,video_title:a.o&&a.o.name||"",player_name:_.va,player_software_name:_.va,player_software_version:_.ia,player_mux_plugin_name:"CastlabsPlayer built-in Mux Plugin",player_mux_plugin_version:_.ia};(a=a.m.getConfiguration().viewerId)&&(b.viewer_user_id=a);return b},Cz=function(a){a.a.on(a.m,_.rg,function(){var b={player_playhead_time:1E3*a.m.getPosition()};a.emit(_.rg,b)});a.a.on(a.m,_.lf,function(){return a.emit(_.lf)});
6
+ a.a.on(a.m,_.jd,a.yj.bind(a));a.a.on(a.m,_.eg,a.Aj.bind(a));a.a.on(a.m,_.Bg,function(){return a.emit(_.Yf)});a.a.on(a.m,_.Ag,function(){return a.emit(_.Xf)});a.a.on(a.m,_.re,a.zj.bind(a));a.a.on(a.m,_.xc,function(){return a.emit("adbreakstart")});a.a.on(a.m,_.yc,function(){return a.emit("adbreakend")});a.a.on(a.m,_.Kc,function(){a.emit("adplay");a.emit("adplaying")});a.a.on(a.m,_.Gc,function(){return a.emit("adpause")});a.a.on(a.m,_.Ic,function(){a.emit("adplay");a.emit("adplaying")});a.a.on(a.m,
7
+ _.Lc,function(){return a.emit("adended")});a.a.on(a.m,_.Cc,function(){return a.emit("adfirstquartile")});a.a.on(a.m,_.Fc,function(){return a.emit("admidpoint")});a.a.on(a.m,_.Mc,function(){return a.emit("adthirdquartile")});a.j.ld(a.G);a.j.lg(a.D);a.a.on(a.m,_.re,function(b){var c=b.detail;if(c&&1===c.category&&(b=(b=c.data)&&b.request,void 0!==b&&!0===(1===b.type||2===b.type||3===b.type)))if(7001===c.code){c=b.requestStartTimestamp;var d=new _.qk(b.uris[b.uriIndex]);b={request_start:c,request_type:wz(b),
8
+ request_hostname:d.a};a.g.debug("onRequestCanceled()","Track event: requestcanceled",b);a.emit("requestcanceled",b)}else{d=b.requestStartTimestamp;var e=new _.qk(b.uris[b.uriIndex]),f=c.data;b={request_start:d,request_type:wz(b),request_hostname:e.a,request_error:""+wz(b)+"LoadError",request_error_code:void 0===f?-1:void 0!==f.response?f.response.status:void 0!==f.status?f.status:-1,request_error_text:c.toString()};a.g.debug("onRequestFailed()","Track event: requestfailed",b);a.emit("requestfailed",
9
+ b)}})},Dz=function(a){_.Vh(a.a);a.j.Ie(a.G);a.j.Yh(a.D)},Ez=function(){this.f=this.m=null;this.a=!1;this.g=new _.K("clpp.muxdata")},Fz=function(a){return!_.O.R(a)&&typeof a.init===_.ue&&typeof a.emit===_.ue},Gz=function(){},tz="manifest",uz="media",vz="encryption",xz=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"];_.r=zz.prototype;_.r.initialize=function(a,b,c){this.f=a;this.o=b;this.w=c;if(!this.h){try{this.h=!0,this.w.init(this.B,Bz(this))}catch(d){throw this.h=!1,Dz(this),new _.P(1,9,9302,null,d);}this.emit("playerready")}this.l&&!this.A&&(a=Az(this),this.emit("videochange",a),this.l=!1);Cz(this)};_.r.release=function(){this.g.debug("release()");this.l?this.g.debug(_.la):(Dz(this),this.l=!0,this.o=this.f=null)};_.r.destroy=function(){this.g.debug(_.Zd);this.A?this.g.debug(_.ka):(this.A=!0,this.emit("destroy"))};
10
+ _.r.emit=function(a,b){if(null===this.w)throw new _.P(1,9,9301);this.w.emit(this.B,a,b)};_.r.yj=function(a){this.g.debug(_.Ye);var b=a.detail;a=this.m.getTrackManager();b&&b.bandwidth&&(b=b.bandwidth,(a=a.Oa())&&a.bandwidth&&(b+=a.bandwidth),this.emit("renditionchange",{video_source_bitrate:b}))};_.r.Aj=function(a){this.g.debug(_.bf);switch(a.detail.currentState){case _.vp:this.m.getConfiguration().autoplay&&this.emit(_.lf);break;case _.xp:this.emit(_.zf);break;case _.wp:this.emit(_.gf);break;case _.qp:this.emit(_.qe)}};
11
+ _.r.zj=function(a){this.g.debug(_.Ze);if(this.h&&(a=a.detail||null))if(10003===a.code)this.emit("aderror");else if(a.severity===_.Q){var b=a.message||"Player error";if(1===a.category||6100===a.code||6007===a.code)b="Download error",6100===a.code?b="Certificate request error":6007===a.code&&(b="License request error"),b=b+" castlabs-error-data:"+JSON.stringify(a.data);this.emit(_.re,{player_error_code:a.code,player_error_message:b})}};
12
+ _.r.Bj=function(a){var b=a.request;if(b=void 0!==b&&!0===(1===b.type||2===b.type||3===b.type))b=a.status,b=void 0!==b&&200<=b&&299>=b;if(b){b=a.request;var c=a.headers,d=b.bytesLoaded,e=b.requestStartTimestamp,f=b.startTime,g=b.endTime,h=e+a.responseStartMs;a=e+a.timeMs;f=f&&g?g-f:void 0;g=new _.qk(b.uris[b.uriIndex]);a={request_start:e,request_type:wz(b),request_hostname:g.a,request_id:yz(c),request_bytes_loaded:d,request_response_start:h,request_response_end:a,request_response_headers:c,request_media_duration:f,
13
+ request_url:_.rk(g)};this.g.debug("onRequestCompleted()","Track event: requestcompleted",a);this.emit("requestcompleted",a)}};_.r.Am=function(a){a.requestStartTimestamp=Date.now()};_.w(Ez,_.Eu);_.r=Ez.prototype;_.r.onPlayerCreated=function(a){this.m=a;this.f=new zz(a,this.g)};
14
+ _.r.onContentWillLoad=function(a,b){var c=a.getConfiguration();c=_.O.Ma(c.muxdata);try{var d=[];typeof c===_.Xe&&(c.envKey||d.push("envKey"));if(0<d.length)throw new _.P(1,9,9300,{missingKeys:d});var e=a.getConfiguration();d=null;if(this.a=!_.O.R(e.muxdata)&&typeof e.muxdata===_.Xe){var f=e.muxdata;d=Fz(f.muxLib)?f.muxLib:window.mux;if(!Fz(d)){this.g.warn("Mux SDK is not loaded. Will do nothing.");this.a=!1;var g=new _.P(1,9,9301);this.U(a,g)}}else this.g.warn("Mux plugin is loaded but not configured. Will do nothing.");
15
+ var h=d;null!==h&&this.f.initialize(c,b,h)}catch(l){this.a=!1,this.U(a,l)}};_.r.onContentLoaded=function(){};_.r.onPlayerWillDestroy=function(){this.a&&(this.f.destroy(),this.m=this.f=null)};_.r.onPlayerWillRelease=function(){this.a&&this.f.release()};_.r.id=function(){return"mux"};_.r.emit=function(a,b){try{this.f.emit(a,b)}catch(c){throw null!==this.m&&this.U(this.m,c),c;}};_.r.U=function(a,b){a.trigger(new _.L(_.re,{detail:b}))};_.H("clpp.muxdata.MuxDataPlugin",Ez);Ez.prototype.emit=Ez.prototype.emit;
16
+ Ez.Id="mux";Gz.prototype.create=function(){return new Ez};_.Vq(new Gz);};
17
17
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
18
18
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
19
19
  else{_=this.clpp._;(f.call(g,this));}
package/cjs/cl.onboard.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var ty=function(){this.g=new _.K("clpp.onboard");this.j=new Set},uy=function(a,b){function c(l){return l&&(_.R.startsWith(l,"https://")||_.R.startsWith(l,"http://")||_.R.startsWith(l,"//"))?l:d+l}var d=b.baseUrl;_.R.endsWith(d,"/")||(d+="/");var e=c(b.widevineUrl||"widevine"),f=c(b.playreadyUrl||"playready"),g=c(b.fairplayUrl||"fairplay"),h=new _.$l(a);h.Ta(_.Rd,{licenseUrl:e,videoRobustness:[_.Vb,void 0],audioRobustness:[_.Ub,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,
3
- modifiers:{licenseRequest:_.Pm,licenseResponse:_.Um}});h.Ta(_.Md,{licenseUrl:g,certificateUrl:g,modifiers:{licenseRequest:_.Rm,licenseResponse:_.Sm,extractContentId:_.Nm,certificateRequest:_.Tm}});h.Ta(_.Pd,{licenseUrl:f,modifiers:{licenseRequest:_.Pm}});_.Vl(h)};_.w(ty,_.Ir);ty.prototype.a=function(){for(var a=_.u(this.j),b=a.next();!b.done;b=a.next())delete _.Ul[b.value];this.j.clear()};
4
- ty.prototype.h=function(a){a=a.getConfiguration().drm;var b;if(b=!(!a||!a.env))b=a&&a.customData,b=!(!b||!b.baseUrl);b&&(b=a.env,a=a.customData,a={baseUrl:a.baseUrl,widevineUrl:a.widevineUrl,playreadyUrl:a.playreadyUrl,fairplayUrl:a.fairplayUrl},this.g.info("Registering the DRMtoday Onboard environment, name\x3d'"+b+"'"),uy(b,a),this.j.add(b))};ty.prototype.id=function(){return"onboard"};_.H("clpp.onboard.OnboardComponent",ty);_.H("clpp.onboard.register",uy);};
2
+ var f=function(window){var rz=function(){this.g=new _.K("clpp.onboard");this.j=new Set},sz=function(a,b){function c(l){return l&&(_.R.startsWith(l,"https://")||_.R.startsWith(l,"http://")||_.R.startsWith(l,"//"))?l:d+l}var d=b.baseUrl;_.R.endsWith(d,"/")||(d+="/");var e=c(b.widevineUrl||"widevine"),f=c(b.playreadyUrl||"playready"),g=c(b.fairplayUrl||"fairplay"),h=new _.Am(a);h.Sa(_.Td,{licenseUrl:e,videoRobustness:[_.Xb,void 0],audioRobustness:[_.Wb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,
3
+ modifiers:{licenseRequest:_.qn,licenseResponse:_.vn}});h.Sa(_.Pd,{licenseUrl:g,certificateUrl:g,modifiers:{licenseRequest:_.sn,licenseResponse:_.tn,extractContentId:_.on,certificateRequest:_.un}});h.Sa(_.Rd,{licenseUrl:f,modifiers:{licenseRequest:_.qn}});_.vm(h)};_.w(rz,_.Cs);rz.prototype.a=function(){for(var a=_.t(this.j),b=a.next();!b.done;b=a.next())delete _.um[b.value];this.j.clear()};
4
+ rz.prototype.h=function(a){a=a.getConfiguration().drm;var b;if(b=!(!a||!a.env))b=a&&a.customData,b=!(!b||!b.baseUrl);b&&(b=a.env,a=a.customData,a={baseUrl:a.baseUrl,widevineUrl:a.widevineUrl,playreadyUrl:a.playreadyUrl,fairplayUrl:a.fairplayUrl},this.g.info("Registering the DRMtoday Onboard environment, name\x3d'"+b+"'"),sz(b,a),this.j.add(b))};rz.prototype.id=function(){return"onboard"};_.H("clpp.onboard.OnboardComponent",rz);_.H("clpp.onboard.register",sz);};
5
5
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
6
6
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
7
7
  else{_=this.clpp._;(f.call(g,this));}
@@ -1,18 +1,18 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var by="A persistent DRM session already exists for: ",cy="No DRM configuration.",dy="clpp.persistent",ey="clpp.persistent.SimpleSessionStorage",fy=function(a,b){for(var c=[],d=_.u(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c},gy=function(a){a=a.f.keys();a=fy(a,function(b){return b.sessionId});return Array.from(a)},hy=function(a,b){var c,d,e;return _.E(function(f){if(1==f.a)return _.x(f,_.Zn(a,b),2);c=f.f;if(!c)return a.g.debug("Ignoring attempt to remove missing session",b),f["return"]();
3
- d=[];(e=a.f.get(c))&&a.B&&(e.tb=new _.wj,d.push(e.tb));a.g.debug("Attempting to remove session",b);d.push(c.remove());return f["return"](Promise.all(d))})},jy=function(a,b){a.J=iy;a.K=[];a.G=!0;return _.Gn(a,b)},ly=function(a,b,c,d,e,f){a.J=ky;var g=new Map,h=_.co(b);g.set(h,{audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:_.$e,persistentState:_.If,sessionTypes:[_.ef],label:h,drmInfos:[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",
4
- videoRobustness:"",serverCertificate:d,initData:null,keyIds:null}]});return _.Mn(a,g)},my=function(){this.g=new _.K(ey)},ny=function(a){a=JSON.parse(a);var b=JSON.parse(a.sessionIds),c=a.audioCapabilities||[],d=a.videoCapabilities||[],e=a.serverCertificate||[],f=a.drmConfig||{};return{sessionIds:b,keySystem:a.keySystem,licenseServerUri:decodeURIComponent(a.licenseServerUri||""),serverCertificate:e?new Uint8Array(e):null,audioCapabilities:c,videoCapabilities:d,drmConfig:f}},oy=function(a,b){var c=
5
- _.Xl(a),d=_.Bl({drm:a});d.drm=a;var e=new _.xn({Gb:b,onError:function(){},yf:function(){},onExpirationUpdated:function(){},onEvent:function(){},getConfiguration:function(){return d},Sc:function(){return null}});e.h=c;return e},ry=function(a,b,c){var d,e,f,g,h,l,m,n,p;return _.E(function(q){switch(q.a){case 1:d=py;e=qy;if(!a)return e.debug(cy),q["return"]();f=a.offlineId;return 0===f.length?q["return"]():_.x(q,d.get(f),2);case 2:if(g=q.f)return e.debug(by,f),q["return"]();h=oy(a,c);_.A(q,3,4);return _.x(q,
6
- jy(h,b),6);case 6:return _.x(q,_.Sn(h),7);case 7:return _.x(q,_.Tn(h),8);case 8:return l=h.getDrmInfo(),m=b.map(function(t){return{contentType:_.rk(t.video.mimeType,t.video.codecs),robustness:l.videoRobustness}}),n=gy(h),g={sessionIds:n,keySystem:l.keySystem,licenseServerUri:l.licenseServerUri,serverCertificate:l.serverCertificate,audioCapabilities:[],videoCapabilities:m,drmConfig:a},_.x(q,d.store(f,g),4);case 4:return _.bh(q),_.x(q,h.destroy(),10);case 10:_.ch(q,0);break;case 3:throw p=_.C(q),e.error("Error while persisting DRM session "+
7
- f),new _.P(1,6,6200,null,p);}})},sy=function(){this.g=new _.K(dy)},iy=1,ky=2;_.r=my.prototype;
2
+ var f=function(window){var $y="A persistent DRM session already exists for: ",az="No DRM configuration.",bz="clpp.persistent",cz="clpp.persistent.SimpleSessionStorage",dz=function(a,b){for(var c=[],d=_.t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c},ez=function(a){a=a.f.keys();a=dz(a,function(b){return b.sessionId});return Array.from(a)},fz=function(a,b){var c,d,e;return _.E(function(f){if(1==f.a)return _.x(f,_.Bo(a,b),2);c=f.f;if(!c)return a.g.debug("Ignoring attempt to remove missing session",b),f["return"]();
3
+ d=[];(e=a.f.get(c))&&a.B&&(e.vb=new _.Oj,d.push(e.vb));a.g.debug("Attempting to remove session",b);d.push(c.remove());return f["return"](Promise.all(d))})},hz=function(a,b){a.K=gz;a.L=[];a.G=!0;return _.io(a,b)},jz=function(a,b,c,d,e,f){a.K=iz;var g=new Map,h=_.Go(b);g.set(h,{audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:_.df,persistentState:_.Qf,sessionTypes:[_.jf],label:h,drmInfos:[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",
4
+ videoRobustness:"",serverCertificate:d,initData:null,keyIds:null}]});return _.oo(a,g)},kz=function(){this.g=new _.K(cz)},lz=function(a){a=JSON.parse(a);var b=JSON.parse(a.sessionIds),c=a.audioCapabilities||[],d=a.videoCapabilities||[],e=a.serverCertificate||[],f=a.drmConfig||{};return{sessionIds:b,keySystem:a.keySystem,licenseServerUri:decodeURIComponent(a.licenseServerUri||""),serverCertificate:e?new Uint8Array(e):null,audioCapabilities:c,videoCapabilities:d,drmConfig:f}},mz=function(a,b){var c=
5
+ _.xm(a),d=_.bm({drm:a});d.drm=a;var e=new _.eo({tb:b,onError:function(){},Kf:function(){},Jf:function(){},onEvent:function(){},getConfiguration:function(){return d},Vc:function(){return null}});e.h=c;return e},pz=function(a,b,c){var d,e,f,g,h,l,m,n,p;return _.E(function(q){switch(q.a){case 1:d=nz;e=oz;if(!a)return e.debug(az),q["return"]();f=a.offlineId;return 0===f.length?q["return"]():_.x(q,d.get(f),2);case 2:if(g=q.f)return e.debug($y,f),q["return"]();h=mz(a,c);_.A(q,3,4);return _.x(q,hz(h,b),
6
+ 6);case 6:return _.x(q,_.uo(h),7);case 7:return _.x(q,_.vo(h),8);case 8:return l=h.getDrmInfo(),m=b.map(function(u){return{contentType:_.Rk(u.video.mimeType,u.video.codecs),robustness:l.videoRobustness}}),n=ez(h),g={sessionIds:n,keySystem:l.keySystem,licenseServerUri:l.licenseServerUri,serverCertificate:l.serverCertificate,audioCapabilities:[],videoCapabilities:m,drmConfig:a},_.x(q,d.store(f,g),4);case 4:return _.ph(q),_.x(q,h.destroy(),10);case 10:_.qh(q,0);break;case 3:throw p=_.C(q),e.error("Error while persisting DRM session "+
7
+ f),new _.P(1,6,6200,null,p);}})},qz=function(){this.g=new _.K(bz)},gz=1,iz=2;_.r=kz.prototype;
8
8
  _.r.store=function(a,b){var c;return _.E(function(d){var e=JSON.stringify(b.sessionIds),f=b.serverCertificate?Array.from(b.serverCertificate):null;f=JSON.stringify(f);var g=JSON.stringify(b.audioCapabilities),h=JSON.stringify(b.videoCapabilities);c=JSON.stringify({sessionIds:e,keySystem:b.keySystem,licenseServerUri:encodeURIComponent(b.licenseServerUri),serverCertificate:f,audioCapabilities:g,videoCapabilities:h,drmConfig:JSON.stringify(b.drmConfig)});window.localStorage.setItem(encodeURIComponent(a),
9
- btoa(c));_.y(d)})};_.r.get=function(a){var b=this,c;return _.E(function(d){if(c=window.localStorage.getItem(encodeURIComponent(a)))try{return d["return"](ny(atob(c)))}catch(e){b.g.warn("Error while loading offline items for "+a+" from storage: ",e)}return d["return"](null)})};_.r["delete"]=function(a){return _.E(function(b){window.localStorage.removeItem(encodeURIComponent(a));_.y(b)})};_.r.clear=function(){return _.E(function(a){window.localStorage.clear();_.y(a)})};_.r.getName=function(){return ey};_.H("clpp.persistent.useStorage",function(a){var b=["store","get","delete","clear","getName"];var c=[];_.N.R(a)||(_.N.rb(a.store)||c.push("store"),_.N.rb(a.get)||c.push("get"),_.N.rb(a["delete"])||c.push("delete"),_.N.rb(a.clear)||c.push("clear"),_.N.rb(a.getName)||c.push("getName"),b=c);if(0<b.length)throw qy.warn("Invalid session storage implementation"),new _.P(1,6,6202,{missingMethods:b});py=a});
10
- _.H("clpp.persistent.fetchLicense",function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];var f,g,h,l,m,n,p,q,t,v,z,D,G,F,B,I,O,M,ba;return _.E(function(ha){switch(ha.a){case 1:f=py;g=qy;h=function(qa,Ta){return new _.P(1,6,6200,qa,Ta)};l=_.Zo(a).shift();if(!l)throw h("No source specified.");if(!b)throw h(cy);m=b.offlineId;if(typeof m!==_.Wf||!m.length)throw h("Missing offline id.");return _.x(ha,f.get(m),2);case 2:if(n=ha.f)return g.debug(by,m),ha["return"]();p=_.Bl();q=new _.Kj;
11
- t=[];v=_.u(d);for(z=v.next();!z.done;z=v.next())D=z.value,G=new D,_.Fl(G.id())||(G.f(),_.Hl(G),t.push(G));F=null;_.A(ha,3,4);return _.x(ha,_.Cs(l.url,q,p.manifest.attemptParameters,l.type||null),6);case 6:return F=ha.f,F.configure(p.manifest),_.x(ha,F.start(l.url,{networkingEngine:q,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineCueAdded:function(){},onEvent:function(){},onError:function(){}}),7);case 7:B=ha.f;if(!B.periods.length)throw h(null,new _.P(_.Q,4,4014));I=_.vs(B.periods);
12
- return _.x(ha,ry(b,I,q),4);case 4:for(_.bh(ha);t.length;)O=t.shift(),O.a(),_.El["delete"](O.id());M=[];F&&M.push(F.stop());M.push(q.destroy());return _.x(ha,Promise.all(M),9);case 9:_.ch(ha,0);break;case 3:ba=_.C(ha);if(ba instanceof _.P&&6200===ba.code)throw ba;throw h(null,ba);}})});
13
- _.H("clpp.persistent.removeLicense",function(a){var b,c,d,e,f,g,h;return _.E(function(l){switch(l.a){case 1:b=py;c=qy;if(!_.N.$(a)||0===a.length)return c.warn("Invalid offlineId"),l["return"]();e=d=null;_.A(l,2,3);return _.x(l,b.get(a),5);case 5:f=l.f;if(!f)return c.debug("No persistent DRM session found"),l["return"]();f.drmConfig.delayLicenseRequestUntilPlayed=!0;e=new _.Kj;d=oy(f.drmConfig,e);return _.x(l,ly(d,f.keySystem,f.licenseServerUri,f.serverCertificate,f.audioCapabilities,f.videoCapabilities),
14
- 6);case 6:return _.x(l,_.Sn(d),7);case 7:return _.x(l,Promise.all(f.sessionIds.map(function(m){return _.E(function(n){if(1==n.a)return _.x(n,hy(d,m),2);c.debug("successfully removed session with id",m);_.y(n)})})),8);case 8:return _.x(l,b["delete"](a),3);case 3:return _.bh(l),g=[],d&&g.push(d.destroy()),e&&g.push(e.destroy()),_.x(l,Promise.all(g),10);case 10:_.ch(l,0);break;case 2:throw h=_.C(l),c.error("Failed to remove session"),new _.P(1,6,6201,null,h);}})});var py=new my,qy=new _.K(dy);_.w(sy,_.Ir);sy.prototype.id=function(){return _.df};sy.prototype.l=function(a,b){var c=this,d,e,f;return _.E(function(g){if(1==g.a){d=a.getConfiguration().drm;if(!d)return c.g.debug("No DRM configuration found for loaded source."),g["return"]();c.g.debug("Persisting DRM session ID: "+d.offlineId);e=a.getNetworkEngine();_.A(g,2);return _.x(g,ry(d,b,e),4)}if(2!=g.a)return a.trigger(new _.L(_.ge,{offlineId:d.offlineId})),_.ah(g,0);f=_.C(g);a.onError(f);_.y(g)})};
15
- sy.prototype.j=function(a){var b=this,c,d;return _.E(function(e){if(1==e.a)return b.g.debug("Getting EME session IDs for "+a),c=py,_.A(e,2),_.x(e,c.get(a),4);if(2!=e.a){if(d=e.f)return e["return"](d.sessionIds||[]);b.g.debug("No offline session found for "+a);return e["return"]([])}_.C(e);b.g.warn("Error while loading session info from storage");return e["return"]([])})};_.H("clpp.persistent.PersistentLicenseComponent",sy);};
9
+ btoa(c));_.y(d)})};_.r.get=function(a){var b=this,c;return _.E(function(d){if(c=window.localStorage.getItem(encodeURIComponent(a)))try{return d["return"](lz(atob(c)))}catch(e){b.g.warn("Error while loading offline items for "+a+" from storage: ",e)}return d["return"](null)})};_.r["delete"]=function(a){return _.E(function(b){window.localStorage.removeItem(encodeURIComponent(a));_.y(b)})};_.r.clear=function(){return _.E(function(a){window.localStorage.clear();_.y(a)})};_.r.getName=function(){return cz};_.H("clpp.persistent.useStorage",function(a){var b=["store","get","delete","clear","getName"];var c=[];_.O.R(a)||(_.O.sb(a.store)||c.push("store"),_.O.sb(a.get)||c.push("get"),_.O.sb(a["delete"])||c.push("delete"),_.O.sb(a.clear)||c.push("clear"),_.O.sb(a.getName)||c.push("getName"),b=c);if(0<b.length)throw oz.warn("Invalid session storage implementation"),new _.P(1,6,6202,{missingMethods:b});nz=a});
10
+ _.H("clpp.persistent.fetchLicense",function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];var f,g,h,l,m,n,p,q,u,v,z,B,I,F,D,G,M,N,S;return _.E(function(oa){switch(oa.a){case 1:f=nz;g=oz;h=function(Ba,$a){return new _.P(1,6,6200,Ba,$a)};l=_.Bp(a).shift();if(!l)throw h("No source specified.");if(!b)throw h(az);m=b.offlineId;if(typeof m!==_.hg||!m.length)throw h("Missing offline id.");return _.x(oa,f.get(m),2);case 2:if(n=oa.f)return g.debug($y,m),oa["return"]();p=_.bm();q=new _.ck;
11
+ u=[];v=_.t(d);for(z=v.next();!z.done;z=v.next())B=z.value,I=new B,_.fm(I.id())||(I.f(),_.hm(I),u.push(I));F=null;_.A(oa,3,4);return _.x(oa,_.zt(l.url,q,p.manifest.attemptParameters,l.type||null),6);case 6:return F=oa.f,F.configure(p.manifest),_.x(oa,F.start(l.url,{configurationId:"",networkingEngine:q,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineCueAdded:function(){},onEvent:function(){},onError:function(){}}),7);case 7:D=oa.f;if(!D.periods.length)throw h(null,new _.P(_.Q,
12
+ 4,4014));G=_.qt(D.periods);return _.x(oa,pz(b,G,q),4);case 4:for(_.ph(oa);u.length;)M=u.shift(),M.a(),_.em["delete"](M.id());N=[];F&&N.push(F.stop());N.push(q.destroy());return _.x(oa,Promise.all(N),9);case 9:_.qh(oa,0);break;case 3:S=_.C(oa);if(S instanceof _.P&&6200===S.code)throw S;throw h(null,S);}})});
13
+ _.H("clpp.persistent.removeLicense",function(a){var b,c,d,e,f,g,h;return _.E(function(l){switch(l.a){case 1:b=nz;c=oz;if(!_.O.ca(a)||0===a.length)return c.warn("Invalid offlineId"),l["return"]();e=d=null;_.A(l,2,3);return _.x(l,b.get(a),5);case 5:f=l.f;if(!f)return c.debug("No persistent DRM session found"),l["return"]();f.drmConfig.delayLicenseRequestUntilPlayed=!0;e=new _.ck;d=mz(f.drmConfig,e);return _.x(l,jz(d,f.keySystem,f.licenseServerUri,f.serverCertificate,f.audioCapabilities,f.videoCapabilities),
14
+ 6);case 6:return _.x(l,_.uo(d),7);case 7:return _.x(l,Promise.all(f.sessionIds.map(function(m){return _.E(function(n){if(1==n.a)return _.x(n,fz(d,m),2);c.debug("successfully removed session with id",m);_.y(n)})})),8);case 8:return _.x(l,b["delete"](a),3);case 3:return _.ph(l),g=[],d&&g.push(d.destroy()),e&&g.push(e.destroy()),_.x(l,Promise.all(g),10);case 10:_.qh(l,0);break;case 2:throw h=_.C(l),c.error("Failed to remove session"),new _.P(1,6,6201,null,h);}})});var nz=new kz,oz=new _.K(bz);_.w(qz,_.Cs);qz.prototype.id=function(){return _.hf};qz.prototype.l=function(a,b){var c=this,d,e,f;return _.E(function(g){if(1==g.a){d=a.getConfiguration().drm;if(!d)return c.g.debug("No DRM configuration found for loaded source."),g["return"]();c.g.debug("Persisting DRM session ID: "+d.offlineId);e=a.getNetworkEngine();_.A(g,2);return _.x(g,pz(d,b,e),4)}if(2!=g.a)return a.trigger(new _.L(_.je,{offlineId:d.offlineId})),_.oh(g,0);f=_.C(g);a.onError(f);_.y(g)})};
15
+ qz.prototype.j=function(a){var b=this,c,d;return _.E(function(e){if(1==e.a)return b.g.debug("Getting EME session IDs for "+a),c=nz,_.A(e,2),_.x(e,c.get(a),4);if(2!=e.a){if(d=e.f)return e["return"](d.sessionIds||[]);b.g.debug("No offline session found for "+a);return e["return"]([])}_.C(e);b.g.warn("Error while loading session info from storage");return e["return"]([])})};_.H("clpp.persistent.PersistentLicenseComponent",qz);};
16
16
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
17
17
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
18
18
  else{_=this.clpp._;(f.call(g,this));}
@@ -1,10 +1,10 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var Zx=function(a,b){b=void 0===b?function(){return Promise.resolve()}:b;_.tl.call(this);this.m=a;this.l=b;this.f=0;this.a=[];this.h=!1;this.j=this.tc.bind(this)},$x=function(a){a.trigger(new _.L(_.tf))},ay=function(a,b){return 0<=b&&b<a.a.length};_.w(Zx,_.tl);_.r=Zx.prototype;_.r.on=function(a,b,c){return _.tl.prototype.on.call(this,a,b,c)};_.r.one=function(a,b,c){return _.tl.prototype.one.call(this,a,b,c)};_.r.off=function(a,b){return _.tl.prototype.off.call(this,a,b)};_.r.getPosition=function(){return this.f};
3
- _.r.mk=function(){return this.a};_.r.Bd=function(){return 0<this.a.length&&ay(this,this.f)?this.a[this.f]:null};_.r.pk=function(){var a=this.f+1;return 0<this.a.length&&ay(this,a)?this.a[a]:null};_.r.Bk=function(){return this.h};_.r.start=function(){this.h||(this.h=!0,this.m.on(_.me,this.j),this.me(this.f,!0))};_.r.stop=function(){this.h=!1;this.m.off(_.me,this.j)};_.r.tc=function(){this.next()};
4
- _.r.next=function(){var a=this,b;return _.E(function(c){b=Math.min(a.a.length-1,a.f+1);return _.x(c,a.me(b),0)})};_.r.Zl=function(){var a=this,b;return _.E(function(c){b=Math.max(0,a.f-1);return _.x(c,a.me(b),0)})};_.r.me=function(a,b){b=void 0===b?!1:b;var c=this,d;return _.E(function(e){if(1==e.a){if(!(0<c.a.length&&ay(c,a))||!b&&c.f===a)return e["return"]();c.f=a;return(d=c.Bd())?_.x(e,c.l(d),3):e.F(0)}if(4!=e.a)return _.x(e,c.m.load(d.configuration),4);c.trigger(new _.L(_.pf,{item:d}));_.y(e)})};
5
- _.r.append=function(a){this.a.push(a);$x(this)};_.r.xk=function(a,b){if(0<=b&&b<=this.a.length){var c=this.Bd();this.a.splice(b,0,a);c&&(this.f=this.a.indexOf(c));$x(this)}};_.r.remove=function(a){if(0<this.a.length&&ay(this,a)){if(this.f===a)throw Error("Can't remove the current item");this.a.splice(a,1);$x(this)}};_.r.clear=function(){this.stop();this.f=0;this.a=[];this.h=!1;$x(this)};_.H("clpp.Playlist",Zx);Zx.prototype.clear=Zx.prototype.clear;Zx.prototype.remove=Zx.prototype.remove;
6
- Zx.prototype.insert=Zx.prototype.xk;Zx.prototype.append=Zx.prototype.append;Zx.prototype.goTo=Zx.prototype.me;Zx.prototype.previous=Zx.prototype.Zl;Zx.prototype.next=Zx.prototype.next;Zx.prototype.onEnded=Zx.prototype.tc;Zx.prototype.stop=Zx.prototype.stop;Zx.prototype.start=Zx.prototype.start;Zx.prototype.isStarted=Zx.prototype.Bk;Zx.prototype.getUpcoming=Zx.prototype.pk;Zx.prototype.getCurrent=Zx.prototype.Bd;Zx.prototype.getQueue=Zx.prototype.mk;Zx.prototype.getPosition=Zx.prototype.getPosition;
7
- Zx.prototype.off=Zx.prototype.off;Zx.prototype.one=Zx.prototype.one;Zx.prototype.on=Zx.prototype.on;};
2
+ var f=function(window){var Xy=function(a,b){b=void 0===b?function(){return Promise.resolve()}:b;_.Ul.call(this);this.m=a;this.l=b;this.f=0;this.a=[];this.h=!1;this.j=this.tc.bind(this)},Yy=function(a){a.trigger(new _.L(_.Bf))},Zy=function(a,b){return 0<=b&&b<a.a.length};_.w(Xy,_.Ul);_.r=Xy.prototype;_.r.on=function(a,b,c){return _.Ul.prototype.on.call(this,a,b,c)};_.r.one=function(a,b,c){return _.Ul.prototype.one.call(this,a,b,c)};_.r.off=function(a,b){return _.Ul.prototype.off.call(this,a,b)};_.r.getPosition=function(){return this.f};
3
+ _.r.Hk=function(){return this.a};_.r.Dd=function(){return 0<this.a.length&&Zy(this,this.f)?this.a[this.f]:null};_.r.Jk=function(){var a=this.f+1;return 0<this.a.length&&Zy(this,a)?this.a[a]:null};_.r.Yk=function(){return this.h};_.r.start=function(){this.h||(this.h=!0,this.m.on(_.qe,this.j),this.ue(this.f,!0))};_.r.stop=function(){this.h=!1;this.m.off(_.qe,this.j)};_.r.tc=function(){this.next()};
4
+ _.r.next=function(){var a=this,b;return _.E(function(c){b=Math.min(a.a.length-1,a.f+1);return _.x(c,a.ue(b),0)})};_.r.vm=function(){var a=this,b;return _.E(function(c){b=Math.max(0,a.f-1);return _.x(c,a.ue(b),0)})};_.r.ue=function(a,b){b=void 0===b?!1:b;var c=this,d;return _.E(function(e){if(1==e.a){if(!(0<c.a.length&&Zy(c,a))||!b&&c.f===a)return e["return"]();c.f=a;return(d=c.Dd())?_.x(e,c.l(d),3):e.F(0)}if(4!=e.a)return _.x(e,c.m.load(d.configuration),4);c.trigger(new _.L(_.Af,{item:d}));_.y(e)})};
5
+ _.r.append=function(a){this.a.push(a);Yy(this)};_.r.Uk=function(a,b){if(0<=b&&b<=this.a.length){var c=this.Dd();this.a.splice(b,0,a);c&&(this.f=this.a.indexOf(c));Yy(this)}};_.r.remove=function(a){if(0<this.a.length&&Zy(this,a)){if(this.f===a)throw Error("Can't remove the current item");this.a.splice(a,1);Yy(this)}};_.r.clear=function(){this.stop();this.f=0;this.a=[];this.h=!1;Yy(this)};_.H("clpp.Playlist",Xy);Xy.prototype.clear=Xy.prototype.clear;Xy.prototype.remove=Xy.prototype.remove;
6
+ Xy.prototype.insert=Xy.prototype.Uk;Xy.prototype.append=Xy.prototype.append;Xy.prototype.goTo=Xy.prototype.ue;Xy.prototype.previous=Xy.prototype.vm;Xy.prototype.next=Xy.prototype.next;Xy.prototype.onEnded=Xy.prototype.tc;Xy.prototype.stop=Xy.prototype.stop;Xy.prototype.start=Xy.prototype.start;Xy.prototype.isStarted=Xy.prototype.Yk;Xy.prototype.getUpcoming=Xy.prototype.Jk;Xy.prototype.getCurrent=Xy.prototype.Dd;Xy.prototype.getQueue=Xy.prototype.Hk;Xy.prototype.getPosition=Xy.prototype.getPosition;
7
+ Xy.prototype.off=Xy.prototype.off;Xy.prototype.one=Xy.prototype.one;Xy.prototype.on=Xy.prototype.on;};
8
8
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
9
9
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
10
10
  else{_=this.clpp._;(f.call(g,this));}
package/cjs/cl.simid.js CHANGED
@@ -1,20 +1,20 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var Hx="No surface found. Can not attach frame!",Ix="SIMID:Media:timeupdate",Jx="Starting creative",Ox=function(a){var b=this;this.f=a;this.h="";this.l=0;this.j=new Map;this.a=document.createElement("iframe");this.a.style.opacity="0";this.a.style.border=_.Se;this.a.style.backgroundColor="transparent";this.a.style.transition="opacity .5s";this.a.style.transitionDelay=".5s";this.a.style.pointerEvents=_.Se;this.a.style.overflow=_.se;this.a.classList.add(_.wd);this.o=function(c){if(c.source===b.a.contentWindow&&
3
- (c=(c=c.data)?typeof c===_.Wf?JSON.parse(c):c:null))if(c.type)switch(b.g.info("Received message ["+c.messageId+"] '"+c.type+"':",c.args),c.type){case "createSession":Kx(b,c);break;case "resolve":c=c.args;var d=b.j.get(c.messageId);d&&d.resolve(c);break;case "reject":c=c.args;(d=b.j.get(c.messageId))&&d.reject(c);break;case "SIMID:Creative:requestResize":d=b.f;var e=c.args;d.g.info("Creative requested resize",e);if(d.m&&d.m.getSurface()&&d.m.getSurface().getMedia()&&e.mediaDimensions){d.h?d.m.getSurface().getMedia().style.transition=
4
- "":(d.m.getSurface().getMedia().style.transition="left .5s, top .5s,width .5s, height .5s",d.h=!0);var f=Lx(d,e.mediaDimensions);d.m.getSurface().getMedia().style.left=f.left;d.m.getSurface().getMedia().style.top=f.top;d.m.getSurface().getMedia().style.width=f.width;d.m.getSurface().getMedia().style.height=f.height}e.creativeDimensions&&(e=Lx(d,e.creativeDimensions),d.a.a.style.left=e.left,d.a.a.style.top=e.top,d.a.a.style.width=e.width,d.a.a.style.height=e.height);Mx(b,c)}else b.g.warn("WARNING: received message without 'type' property")};
5
- this.g=new _.K("clpp.simid.SimidPlayer");Nx(this.f,this)},Rx=function(a){var b=Px(a,"SIMID:Player:startCreative",void 0);Qx(a,b).then(function(){var c=a.f;c.g.info(Jx);c.m.trigger(new _.L(_.Of));a.a.style.opacity="1"})["catch"](function(c){a.unload();a.f.g.error("Error while starting creative",c)})},Kx=function(a,b){var c;_.E(function(d){if(1==d.a){a.h=b.sessionId;Mx(a,b);_.A(d,2);var e=a.f;var f=e.getSurface(),g=e.getContainer();e={environmentData:{videoDimensions:{x:0,y:0,height:g.clientHeight,
2
+ var f=function(window){var Fy="No surface found. Can not attach frame!",Gy="SIMID:Media:timeupdate",Hy="Starting creative",My=function(a){var b=this;this.f=a;this.h="";this.l=0;this.j=new Map;this.a=document.createElement("iframe");this.a.style.opacity="0";this.a.style.border=_.We;this.a.style.backgroundColor="transparent";this.a.style.transition="opacity .5s";this.a.style.transitionDelay=".5s";this.a.style.pointerEvents=_.We;this.a.style.overflow=_.we;this.a.classList.add(_.yd);this.o=function(c){if(c.source===b.a.contentWindow&&
3
+ (c=(c=c.data)?typeof c===_.hg?JSON.parse(c):c:null))if(c.type)switch(b.g.info("Received message ["+c.messageId+"] '"+c.type+"':",c.args),c.type){case "createSession":Iy(b,c);break;case "resolve":c=c.args;var d=b.j.get(c.messageId);d&&d.resolve(c);break;case "reject":c=c.args;(d=b.j.get(c.messageId))&&d.reject(c);break;case "SIMID:Creative:requestResize":d=b.f;var e=c.args;d.g.info("Creative requested resize",e);if(d.m&&d.m.getSurface()&&d.m.getSurface().getMedia()&&e.mediaDimensions){d.h?d.m.getSurface().getMedia().style.transition=
4
+ "":(d.m.getSurface().getMedia().style.transition="left .5s, top .5s,width .5s, height .5s",d.h=!0);var f=Jy(d,e.mediaDimensions);d.m.getSurface().getMedia().style.left=f.left;d.m.getSurface().getMedia().style.top=f.top;d.m.getSurface().getMedia().style.width=f.width;d.m.getSurface().getMedia().style.height=f.height}e.creativeDimensions&&(e=Jy(d,e.creativeDimensions),d.a.a.style.left=e.left,d.a.a.style.top=e.top,d.a.a.style.width=e.width,d.a.a.style.height=e.height);Ky(b,c)}else b.g.warn("WARNING: received message without 'type' property")};
5
+ this.g=new _.K("clpp.simid.SimidPlayer");Ly(this.f,this)},Py=function(a){var b=Ny(a,"SIMID:Player:startCreative",void 0);Oy(a,b).then(function(){var c=a.f;c.g.info(Hy);c.m.trigger(new _.L(_.$f));a.a.style.opacity="1"})["catch"](function(c){a.unload();a.f.g.error("Error while starting creative",c)})},Iy=function(a,b){var c;_.E(function(d){if(1==d.a){a.h=b.sessionId;Ky(a,b);_.A(d,2);var e=a.f;var f=e.getSurface(),g=e.getContainer();e={environmentData:{videoDimensions:{x:0,y:0,height:g.clientHeight,
6
6
  width:g.clientWidth},creativeDimensions:{x:0,y:0,height:g.clientHeight,width:g.clientWidth},fullscreen:f.isFullscreen(),fullscreenAllowed:!0,variableDurationAllowed:!1,skippableState:"notSkippable",version:"1.1",skipoffset:"",siteUrl:window.location.toString(),appId:"",useragent:"",deviceId:"",muted:e.m.isMuted()||!1,volume:e.m.getVolume()||0,navigationSupport:"adHandles",closeButtonSupport:"adHandles",nonlinearDuration:e.f.duration},creativeData:{adParameters:e.f.adParameters||"",clickThruUri:"",
7
- clickThruUrl:""}};e=Px(a,"SIMID:Player:init",e);e=Qx(a,e);return _.x(d,e,4)}if(2!=d.a)return a.g.info("Player Init acknowledged"),a.f.g.info("SIMID Player initialized"),_.ah(d,0);c=_.C(d);a.g.error("Error while initializing",c);a.f.g.error("Error while initializing SIMID player: ",c);a.unload();_.y(d)})},Px=function(a,b,c){return{type:b,sessionId:a.h,messageId:a.l++,timestamp:Date.now(),args:c}},Sx=function(a,b){a.h?(b.type!==Ix&&a.g.info("Posting message ["+b.messageId+"] '"+b.type+"':",b.args),
8
- a.a.contentWindow&&a.a.contentWindow.postMessage(JSON.stringify(b),"*")):a.g.warn("WARNING: no session available to send message '"+b.type+"'")},Mx=function(a,b){Sx(a,Px(a,"resolve",{messageId:b.messageId,value:void 0}))},Qx=function(a,b){return new Promise(function(c,d){new Tx(a.j,c,d,b);Sx(a,b)})},Tx=function(a,b,c,d){var e=this;var f=void 0===f?-1:f;this.f=a;this.l=b;this.j=c;this.h=d;this.a=null;this.f.set(d.messageId,this);0<=f&&(this.a=setTimeout(function(){e.resolve()},f))},Ux=function(){this.g=
9
- new _.K("clpp.simid.Plugin");this.h=this.a=this.m=null;this.l=[];this.j=null;this.w=this.kj.bind(this);this.f=null;this.o=!1},Vx=function(a,b,c){return new ResizeObserver(function(){if(a.a.h){var d=a.a,e={videoDimensions:{x:0,y:0,height:b.clientHeight,width:b.clientWidth},creativeDimensions:{x:0,y:0,height:b.clientHeight,width:b.clientWidth},fullscreen:c.isFullscreen()};e=Px(d,"SIMID:Player:resize",e);Sx(d,e)}})},Wx=function(a){this.m=a;this.a=null;this.g=new _.K("clpp.simid.Loader");this.h=!1;this.f=
10
- null},Lx=function(a,b){var c=a.getContainer(),d=c.clientWidth;c=c.clientHeight;return{top:b.y/c*100+"%",left:b.x/d*100+"%",width:b.width/d*100+"%",height:b.height/c*100+"%"}},Nx=function(a,b){a.g.info("SIMID Session created");a.a=b},Xx=function(a){a.g.info("Stopping creative");a.m.getSurface().getMedia().style.transition=".5s";setTimeout(function(){a.m.getSurface().getMedia().style.transition=""},500);a.m.getSurface().getMedia().style.left="";a.m.getSurface().getMedia().style.top="";a.m.getSurface().getMedia().style.width=
11
- "";a.m.getSurface().getMedia().style.height="";a.a.a.style.left="";a.a.a.style.top="";a.a.a.style.width="";a.a.a.style.height="";a.h=!1;a.m.trigger(new _.L(_.Pf))},Yx=function(){};Ox.prototype.load=function(a){window.addEventListener(_.Ke,this.o);this.h="";this.l=0;var b=this.f.url();this.g.info('Loading "'+b+'" as src of iFrame');this.a.src=b;this.g.info("Attaching iFrame");a.appendChild(this.a)};
12
- Ox.prototype.unload=function(){Xx(this.f);this.h=this.a.src="";this.l=0;this.a.style.opacity="0";window.removeEventListener(_.Ke,this.o);this.a.parentElement&&this.a.parentElement.removeChild(this.a)};Tx.prototype.resolve=function(a){null!==this.a&&(clearTimeout(this.a),this.a=null);this.f["delete"](this.h.messageId);this.l(a)};Tx.prototype.reject=function(a){null!==this.a&&(clearTimeout(this.a),this.a=null);this.f["delete"](this.h.messageId);this.j(a)};_.w(Ux,_.rt);_.r=Ux.prototype;_.r.id=function(){return"simid"};_.r.onPlayerCreated=function(a){this.g.info("New player created");this.a&&(this.a.unload(),this.a=null);this.m=a;this.h&&this.h.release();this.h=new Wx(a)};
13
- _.r.onContentWillLoad=function(a){var b=a.getConfiguration();if(b.simid&&b.simid.creatives&&0!==b.simid.creatives.length)if(this.l=b.simid.creatives,this.g.info("Setting up SIMID plugin for "+this.l.length+" creatives"),b=this.m.getSurface()){this.g.info("Creating new session");this.a=new Ox(this.h);var c=b.getContainer();this.j=Vx(this,c,b);this.j.observe(c);a.on(_.eg,this.w)}else this.g.warn(Hx)};
14
- _.r.kj=function(){var a=this.m.getPosition();a:if(this.f&&a<this.f.startTime+this.f.duration)var b=this.f;else{for(b=0;b<this.l.length;b++){var c=this.l[b],d=c.startTime+c.duration;if(a>=c.startTime-(c.preload||5)&&a<d){b=c;break a}}b=null}b?b===this.f?(b=b.startTime,this.a&&(c=a>=b,!this.o&&c&&(Rx(this.a),this.o=!0,this.g.info(Jx)),c&&(c=this.a,Sx(c,Px(c,Ix,{currentTime:a-b}))))):((a=this.m.getSurface())||this.g.warn(Hx),a=a.getContainer(),this.f=b,this.o=!1,this.g.info("Loading session"),this.h.f=
15
- b,this.a.load(a)):this.f&&(this.a.unload(),this.f=null,this.o=!1)};_.r.onPlayerWillRelease=function(a){_.rt.prototype.onPlayerWillRelease.call(this,a);this.m.getSurface()&&(this.j&&(this.j.disconnect(),this.j=null),a.off(_.eg,this.w),this.f&&(this.a.unload(),this.f=this.h.f=null))};Wx.prototype.release=function(){this.g.info("Releasing loader")};
16
- Wx.prototype.getContainer=function(){var a=this.getSurface().getContainer();if(!a)throw this.g.error("No player container found. Can not create SIMID init data"),new _.P(1,10,10100,"No player container found");return a};Wx.prototype.getSurface=function(){var a=this.m.getSurface();if(!a)throw this.g.error("No player surface found. Can not create SIMID init data"),new _.P(1,10,10100,"No surface");return a};Wx.prototype.url=function(){return this.f?this.f.url:""};Yx.prototype.create=function(){return new Ux};
17
- _.nq(new Yx);};
7
+ clickThruUrl:""}};e=Ny(a,"SIMID:Player:init",e);e=Oy(a,e);return _.x(d,e,4)}if(2!=d.a)return a.g.info("Player Init acknowledged"),a.f.g.info("SIMID Player initialized"),_.oh(d,0);c=_.C(d);a.g.error("Error while initializing",c);a.f.g.error("Error while initializing SIMID player: ",c);a.unload();_.y(d)})},Ny=function(a,b,c){return{type:b,sessionId:a.h,messageId:a.l++,timestamp:Date.now(),args:c}},Qy=function(a,b){a.h?(b.type!==Gy&&a.g.info("Posting message ["+b.messageId+"] '"+b.type+"':",b.args),
8
+ a.a.contentWindow&&a.a.contentWindow.postMessage(JSON.stringify(b),"*")):a.g.warn("WARNING: no session available to send message '"+b.type+"'")},Ky=function(a,b){Qy(a,Ny(a,"resolve",{messageId:b.messageId,value:void 0}))},Oy=function(a,b){return new Promise(function(c,d){new Ry(a.j,c,d,b);Qy(a,b)})},Ry=function(a,b,c,d){var e=this;var f=void 0===f?-1:f;this.f=a;this.l=b;this.j=c;this.h=d;this.a=null;this.f.set(d.messageId,this);0<=f&&(this.a=setTimeout(function(){e.resolve()},f))},Sy=function(){this.g=
9
+ new _.K("clpp.simid.Plugin");this.h=this.a=this.m=null;this.l=[];this.j=null;this.w=this.Dj.bind(this);this.f=null;this.o=!1},Ty=function(a,b,c){return new ResizeObserver(function(){if(a.a.h){var d=a.a,e={videoDimensions:{x:0,y:0,height:b.clientHeight,width:b.clientWidth},creativeDimensions:{x:0,y:0,height:b.clientHeight,width:b.clientWidth},fullscreen:c.isFullscreen()};e=Ny(d,"SIMID:Player:resize",e);Qy(d,e)}})},Uy=function(a){this.m=a;this.a=null;this.g=new _.K("clpp.simid.Loader");this.h=!1;this.f=
10
+ null},Jy=function(a,b){var c=a.getContainer(),d=c.clientWidth;c=c.clientHeight;return{top:b.y/c*100+"%",left:b.x/d*100+"%",width:b.width/d*100+"%",height:b.height/c*100+"%"}},Ly=function(a,b){a.g.info("SIMID Session created");a.a=b},Vy=function(a){a.g.info("Stopping creative");a.m.getSurface().getMedia().style.transition=".5s";setTimeout(function(){a.m.getSurface().getMedia().style.transition=""},500);a.m.getSurface().getMedia().style.left="";a.m.getSurface().getMedia().style.top="";a.m.getSurface().getMedia().style.width=
11
+ "";a.m.getSurface().getMedia().style.height="";a.a.a.style.left="";a.a.a.style.top="";a.a.a.style.width="";a.a.a.style.height="";a.h=!1;a.m.trigger(new _.L(_.ag))},Wy=function(){};My.prototype.load=function(a){window.addEventListener(_.Pe,this.o);this.h="";this.l=0;var b=this.f.url();this.g.info('Loading "'+b+'" as src of iFrame');this.a.src=b;this.g.info("Attaching iFrame");a.appendChild(this.a)};
12
+ My.prototype.unload=function(){Vy(this.f);this.h=this.a.src="";this.l=0;this.a.style.opacity="0";window.removeEventListener(_.Pe,this.o);this.a.parentElement&&this.a.parentElement.removeChild(this.a)};Ry.prototype.resolve=function(a){null!==this.a&&(clearTimeout(this.a),this.a=null);this.f["delete"](this.h.messageId);this.l(a)};Ry.prototype.reject=function(a){null!==this.a&&(clearTimeout(this.a),this.a=null);this.f["delete"](this.h.messageId);this.j(a)};_.w(Sy,_.Eu);_.r=Sy.prototype;_.r.id=function(){return"simid"};_.r.onPlayerCreated=function(a){this.g.info("New player created");this.a&&(this.a.unload(),this.a=null);this.m=a;this.h&&this.h.release();this.h=new Uy(a)};
13
+ _.r.onContentWillLoad=function(a){var b=a.getConfiguration();if(b.simid&&b.simid.creatives&&0!==b.simid.creatives.length)if(this.l=b.simid.creatives,this.g.info("Setting up SIMID plugin for "+this.l.length+" creatives"),b=this.m.getSurface()){this.g.info("Creating new session");this.a=new My(this.h);var c=b.getContainer();this.j=Ty(this,c,b);this.j.observe(c);a.on(_.rg,this.w)}else this.g.warn(Fy)};
14
+ _.r.Dj=function(){var a=this.m.getPosition();a:if(this.f&&a<this.f.startTime+this.f.duration)var b=this.f;else{for(b=0;b<this.l.length;b++){var c=this.l[b],d=c.startTime+c.duration;if(a>=c.startTime-(c.preload||5)&&a<d){b=c;break a}}b=null}b?b===this.f?(b=b.startTime,this.a&&(c=a>=b,!this.o&&c&&(Py(this.a),this.o=!0,this.g.info(Hy)),c&&(c=this.a,Qy(c,Ny(c,Gy,{currentTime:a-b}))))):((a=this.m.getSurface())||this.g.warn(Fy),a=a.getContainer(),this.f=b,this.o=!1,this.g.info("Loading session"),this.h.f=
15
+ b,this.a.load(a)):this.f&&(this.a.unload(),this.f=null,this.o=!1)};_.r.onPlayerWillRelease=function(a){_.Eu.prototype.onPlayerWillRelease.call(this,a);this.m.getSurface()&&(this.j&&(this.j.disconnect(),this.j=null),a.off(_.rg,this.w),this.f&&(this.a.unload(),this.f=this.h.f=null))};Uy.prototype.release=function(){this.g.info("Releasing loader")};
16
+ Uy.prototype.getContainer=function(){var a=this.getSurface().getContainer();if(!a)throw this.g.error("No player container found. Can not create SIMID init data"),new _.P(1,10,10100,"No player container found");return a};Uy.prototype.getSurface=function(){var a=this.m.getSurface();if(!a)throw this.g.error("No player surface found. Can not create SIMID init data"),new _.P(1,10,10100,"No surface");return a};Uy.prototype.url=function(){return this.f?this.f.url:""};Wy.prototype.create=function(){return new Sy};
17
+ _.Vq(new Wy);};
18
18
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
19
19
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
20
20
  else{_=this.clpp._;(f.call(g,this));}