import{a as G,b as E}from"./chunk-K4WD4A63.js";import{L as b,M as R,P as y,Q as B}from"./chunk-FYLDFXYJ.js";import{Aj as L,Bj as M,Kb as c,Lb as l,a as v,b as k,k as I,l as F,o as f,p as $}from"./chunk-EAIMSMGJ.js";import{g as P,h as A}from"./chunk-AIHAZUSZ.js";import{b as p,c as D}from"./chunk-IOINCEV4.js";import{Gd as x,J as S,ia as a,ka as g,na as j,sa as h,x as o,xa as m}from"./chunk-JSJB5BKT.js";import{e as C}from"./chunk-SZAW6ZBW.js";var s,U=C(()=>{s=function(i){return i[i.Custom=0]="Custom",i[i.Inherited=1]="Inherited",i[i.None=2]="None",i[i.Default=3]="Default",i[i.List=4]="List",i[i.SystemSettings=5]="SystemSettings",i}(s||{})});var V,H=C(()=>{$();j();E();F();k();l();U();x();D();A();B();R();M();V=(()=>{class i extends G{constructor(t,r,n,u,e){super(t,r,n),this.dataSourceSettingsService=u,this.assetServices=e}getPasswordConfigurations(t=!1){return this.getCache(t,this.getPasswordConfigurationsInternal())}savePasswordConfiguration(t){return this.assetServices.SavePasswordConfiguration(t)}updatePasswordConfiguration(t){return this.assetServices.UpdatePasswordConfiguration(t)}deletePasswordConfiguration(t){return this.assetServices.DeletePasswordConfiguration(t)}getConnectionPasswordConfiguration(t,r){return this.assetServices.GetConnectionPasswordConfiguration(t,r).pipe(g(n=>this.handleGetApiResult(n)),S(n=>!!n))}defaultPasswordConfiguration(){return new f({upperCaseMin:1,digitsMin:1,underlineMin:1,specialCharMin:1,highAnsiMin:1,lowerCaseMin:1,minusMin:1,spaceMin:1,bracketsMin:1,customCharactersMin:1})}getFromPasswordValidationViewModel$(t){return this.getPasswordConfigurations().pipe(a(this.destroyed$),o(r=>{if(t.templateType===s.List&&c.isGuid(t.templateId))return r.find(e=>e.id===t.templateId);let n=this.dataSourceSettingsService.dataSourceSettingsSnapshot.defaultPasswordTemplate;if(t.templateType===s.SystemSettings&&c.isGuid(n))return r.find(e=>e.id===n);let u=new I({id:t.templateId,minimumLengthCount:t.minimumLength,minimumLowerCaseCount:t.minimumLowercase,minimumUpperCaseCount:t.minimumUppercase,minimumNumericCount:t.minimumNumeric,minimumSymbolCount:t.minimumSymbol});return new f({id:t.templateId,complexity:u,mode:v.Default,length:t.minimumLength,includeLowerCase:t.isMinimumLowercase,lowerCaseMin:t.minimumLowercase,includeUpperCase:t.isMinimumUppercase,upperCaseMin:t.minimumUppercase,includeDigits:t.isMinimumNumeric,digitsMin:t.minimumNumeric,includeSpecialChar:t.isMinimumSymbol,specialCharMin:t.minimumSymbol})}))}fillPasswordValidationViewModelFromTemplate(t){let r=null;t.templateType===s.List&&c.isGuid(t.templateId)&&(r=t.templateId);let n=this.dataSourceSettingsService.dataSourceSettingsSnapshot.defaultPasswordTemplate;t.templateType===s.SystemSettings&&c.isGuid(n)&&(r=n),r&&this.getPasswordConfigurations().pipe(a(this.destroyed$)).subscribe(u=>{let e=u?.find(N=>N.id===r);e&&(t.isMinimumLength=e.length>0,t.minimumLength=e.length,t.isMinimumLowercase=e.lowerCaseMin>0,t.minimumLowercase=e.lowerCaseMin,t.isMinimumUppercase=e.upperCaseMin>0,t.minimumUppercase=e.upperCaseMin,t.isMinimumNumeric=e.digitsMin>0,t.minimumNumeric=e.digitsMin,t.isMinimumSymbol=e.specialCharMin>0,t.minimumSymbol=e.specialCharMin)})}getPasswordConfigurationsInternal(){return this.assetServices.GetPasswordConfigurations().pipe(g(t=>this.handleGetApiResult(t)),o(t=>this.returnWhenSuccessful(t,()=>t.data.map(r=>new f(r)))))}static{this.\u0275fac=function(r){return new(r||i)(m(p),m(P),m(y),m(b),m(L))}}static{this.\u0275prov=h({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})()});export{s as a,U as b,V as c,H as d};
