import {J,mS as Gh,a5 as fh,fL as x,mY as Xp,nQ as Yp,fz as Im,mW as Wp,c as tS,H as ul,b3 as w$1,a7 as si,fA as rs,ag as lp,fM as F,aJ as hf,aq as Sr,mT as Gt,bE as ff,ah as ot,mX as yn,fB as ka,m$ as Yo,nR as In,aa as ye,N as Sr$1,bd as K,ac as Dr,fC as is,am as Dh,ad as ce}from'./main-WUGO6e7n.js';var w,E=J(()=>{Gh();fh();x();Xp();Yp();Im();Wp();tS();ul();w$1();si();rs();lp();w=(()=>{class n extends F{constructor(e,i,r,s,t){super(e,i,r),this.dataSourceSettingsService=s,this.assetServices=t;}getPasswordConfigurations(e=!1){return this.getCache(e,this.getPasswordConfigurationsInternal())}savePasswordConfiguration(e){return this.assetServices.SavePasswordConfiguration(e)}updatePasswordConfiguration(e){return this.assetServices.UpdatePasswordConfiguration(e)}deletePasswordConfiguration(e){return this.assetServices.DeletePasswordConfiguration(e)}getConnectionPasswordConfiguration(e,i){return this.assetServices.GetConnectionPasswordConfiguration(e,i).pipe(hf(r=>this.handleGetApiResult(r)),Sr(r=>!!r))}defaultPasswordConfiguration(){return new Gt({upperCaseMin:1,digitsMin:1,underlineMin:1,specialCharMin:1,highAnsiMin:1,lowerCaseMin:1,minusMin:1,spaceMin:1,bracketsMin:1,customCharactersMin:1})}getFromPasswordValidationViewModel$(e){return this.getPasswordConfigurations().pipe(ff(this.destroyed$),ot(i=>{if(e.templateType===yn.List&&ka.isGuid(e.templateId))return i.find(t=>t.id===e.templateId);let r=this.dataSourceSettingsService.dataSourceSettingsSnapshot.defaultPasswordTemplate;if(e.templateType===yn.DataSourceSettings&&ka.isGuid(r))return i.find(t=>t.id===r);let s=new Yo({id:e.templateId,minimumLengthCount:e.minimumLength,minimumLowerCaseCount:e.minimumLowercase,minimumUpperCaseCount:e.minimumUppercase,minimumNumericCount:e.minimumNumeric,minimumSymbolCount:e.minimumSymbol});return new Gt({id:e.templateId,complexity:s,mode:In.Default,length:e.minimumLength,includeLowerCase:e.isMinimumLowercase,lowerCaseMin:e.minimumLowercase,includeUpperCase:e.isMinimumUppercase,upperCaseMin:e.minimumUppercase,includeDigits:e.isMinimumNumeric,digitsMin:e.minimumNumeric,includeSpecialChar:e.isMinimumSymbol,specialCharMin:e.minimumSymbol})}))}fillPasswordValidationViewModelFromTemplate(e){let i=null;e.templateType===yn.List&&ka.isGuid(e.templateId)&&(i=e.templateId);let r=this.dataSourceSettingsService.dataSourceSettingsSnapshot.defaultPasswordTemplate;e.templateType===yn.DataSourceSettings&&ka.isGuid(r)&&(i=r),i&&this.getPasswordConfigurations().pipe(ff(this.destroyed$)).subscribe(s=>{let t=s?.find(l=>l.id===i);t&&(e.isMinimumLength=t.length>0,e.minimumLength=t.length,e.isMinimumLowercase=t.lowerCaseMin>0,e.minimumLowercase=t.lowerCaseMin,e.isMinimumUppercase=t.upperCaseMin>0,e.minimumUppercase=t.upperCaseMin,e.isMinimumNumeric=t.digitsMin>0,e.minimumNumeric=t.digitsMin,e.isMinimumSymbol=t.specialCharMin>0,e.minimumSymbol=t.specialCharMin);});}getPasswordConfigurationsInternal(){return this.assetServices.GetPasswordConfigurations().pipe(hf(e=>this.handleGetApiResult(e)),ot(e=>this.returnWhenSuccessful(e,()=>e.data.map(i=>new Gt(i)))))}static{this.\u0275fac=function(i){return new(i||n)(ye(Sr$1),ye(K),ye(Dr),ye(is),ye(Dh))};}static{this.\u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"});}}return n})();});export{E,w};