import {J,c as tS,a6 as pi,a5 as fh,U as RN,H as ul,ag as lp,au as pe,jx as np,jy as Ud,L as w,ab as LN,N as Sr,am as Dh,aE as je,aP as N,aR as Xv,a9 as zt,ah as ot,ay as df,ak as Jd,al as Kv,jC as Qe,jz as rt,ad as ce}from'./main-WUGO6e7n.js';var W,k=J(()=>{tS();pi();fh();RN();ul();lp();pe();np();Ud();tS();W=(()=>{class r{constructor(){this.dvlConfirmationService=w(LN),this.translatorService=w(Sr),this.assetServices=w(Dh),this.repositoryService=w(je);}isHighSecurity(e){return this.settingsAreHighSecurity(e)}confirmRaiseToHigh(e){return N(this,null,function*(){let t=`${this.translatorService.translate("lblSecurityLevel")}: ${this.translatorService.translate("lblHigh")}`,d=e?`${this.translatorService.translate("lblVault")}: ${e}`:"";return (yield this.dvlConfirmationService.confirmAsync({intent:"warning",title:this.translatorService.translate("lblSecurityLevel"),message:[d,t].filter(H=>!!H).join(" - "),description:`${this.translatorService.translate("HighSecurityLevelDisallowsOfflineMode")}. ${this.translatorService.translate("DoYouWantToContinue")}`,requireAcknowledgment:!0,acknowledgmentLabel:this.translatorService.translate("lblIUnderstandTheImpactOfThisChange"),disableAcceptUntilAcknowledged:!0,acceptLabel:this.translatorService.translate("lblContinue"),rejectLabel:this.translatorService.translate("lblCancel")}))==="accept"})}ensureHighSecurity(e){return e?Xv(this.assetServices.GetRepository(e).pipe(zt(1),ot(t=>t?.data),df(t=>N(this,null,function*(){return t?this.settingsAreHighSecurity(t)?!0:(yield this.confirmRaiseToHigh(t.name))?Xv(this.raiseToHigh(t)):!1:!1})),Jd(()=>Kv(!1)))):Promise.resolve(!1)}applyHighSecurity(e){e.repositorySettings.vaultType=Qe.SecureVault,e.repositorySettings.vaultSecurityLevel=rt.High,e.isAllowedOffline=!1;}raiseToHigh(e){return this.applyHighSecurity(e),this.repositoryService.saveRepository(e).pipe(zt(1),Jd(()=>Kv(!1)))}settingsAreHighSecurity(e){let t=e?.repositorySettings;return t?t.vaultType===Qe.SecureVault||t.vaultType===Qe.PamVault||t.vaultSecurityLevel===rt.High:!1}static{this.\u0275fac=function(t){return new(t||r)};}static{this.\u0275prov=ce({token:r,factory:r.\u0275fac,providedIn:"root"});}}return r})();});export{W,k};