import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var aB=function(a,b){let c=b.baseUrl;_.bj(c,"/")||(c+="/");const d=g=>g&&(_.aj(g,"https://")||_.aj(g,"http://")||_.aj(g,"//"))?g:`${c}${g}`,e=d(b.widevineUrl||"widevine"),f=d(b.playreadyUrl||"playready");b=d(b.fairplayUrl||"fairplay");a=new _.yu(a);a.$a(_.td,{licenseUrl:e,videoRobustness:[_.nb,void 0],audioRobustness:[_.mb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:_.Bm,licenseResponse:_.Cm}});a.$a(_.pd,{licenseUrl:b,
certificateUrl:b,modifiers:{licenseRequest:_.Em,licenseResponse:_.Fm,extractContentId:_.Gm,certificateRequest:_.Hm}});a.$a(_.rd,{licenseUrl:f,modifiers:{licenseRequest:_.Bm}});_.Rl(a)};
_.z("clpp.onboard.OnboardComponent",class extends _.Av{constructor(){super();this.g=new _.S("clpp.onboard");this.j=new Set}a(){for(const a of this.j)delete _.Ql[a];this.j.clear()}h(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='${b}'`),aB(b,a),this.j.add(b))}id(){return"onboard"}});
_.z("clpp.onboard.register",aB);};f.call(g, window);