import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var px="VerimatrixVCAS",qx="clpp.verimatrix.Vcas",rx="clpp.verimatrix.VcasComponent",tx=function(a,b){return a.C===sx?(a=Object.assign({},{deviceId:_.Il(_.$i(a.A))},a.a&&{authenticator:_.Il(_.$i(a.a))}),b+_.Lj(a)):b},zx=class extends _.yu{constructor(a){super(px);const b={};b[ux]=ux;b[vx]=vx;const {deviceId:c,authenticator:d,licenseRequestVuidLocation:e=sx,httpHeaderNames:f=b,widevineLicenseUrl:g,playReadyLicenseUrl:h,fairPlayLicenseUrl:k,fairPlayCertificateUrl:l,fairPlaySiteId:m,fairPlayAssetIdStrategy:n=
wx}=a;this.A=c;this.a=d;this.C=e;this.B=f;this.w=tx(this,g);this.o=tx(this,h);this.l=tx(this,k);this.j=l;this.G=m;this.F=n;this.g=new _.S(qx);_.dj(this.w)?this.g.warn(_.Fb):this.$a(_.td,{licenseUrl:this.w,videoRobustness:[_.nb,void 0],audioRobustness:[_.mb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.h.bind(this)}});_.dj(this.o)?this.g.warn(_.db):this.$a(_.rd,{licenseUrl:this.o,videoRobustness:["3000"],audioRobustness:["2000"],
modifiers:{licenseRequest:this.h.bind(this)}});_.dj(this.l)?this.g.warn(_.Da):_.dj(this.j)?this.g.warn(_.Ca):this.$a(_.pd,{licenseUrl:this.l,certificateUrl:this.j,modifiers:{licenseRequest:this.J.bind(this),licenseResponse:this.K.bind(this),extractContentId:this.H.bind(this)}})}h(a,b){if(this.C===xx){a=this.B[vx];const c={};c[this.B[ux]]=this.A;this.a&&(c[a]=this.a);Object.keys(c).forEach(d=>{b.headers[d]=c[d]})}}H(a,b){a=_.nm(b);switch(this.F){case yx:a=_.Lj({r:a,jj:this.G},!0)}return a}J(a,b){this.h(a,
b);_.sm(b)}K(a,b){_.tm(b)}};_.z(qx,zx);zx.prototype.constructor=zx.prototype.constructor;zx.NAME=px;var sx="query-string",xx="http-header";zx.LicenseRequestVuidLocation={QUERY_STRING:sx,HTTP_HEADER:xx};var ux="DeviceId",vx="Authenticator";zx.LicenseRequestHttpHeader={DEVICE_ID_HEADER:ux,AUTHENTICATOR_HEADER:vx};var wx="keyid",yx="contentid-siteid";zx.FairPlayAssetIdStrategy={KEYID:wx,CONTENTID_SITEID:yx};_.z(rx,class extends _.Av{constructor(){super();this.g=new _.S(rx)}a(){delete _.Ql.VerimatrixVCAS}h(a){a=a.getConfiguration();if(a.drm&&a.drm.env===px){({customData:a}=a.drm);if(!a)throw new _.I(_.G,7,7100,_.ud);a=new zx(a);this.g.info("Registering the Verimatrix VCAS Ultra environment");_.Rl(a)}}id(){return"verimatrix-vcas"}});};f.call(g, window);