HEX
Server: nginx/1.24.0
System: Linux DGT-WORDPRESS-VM-SERVER 6.14.0-1014-azure #14~24.04.1-Ubuntu SMP Fri Oct 3 20:52:11 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: /mnt/data/smarthr-co-in/demo/angular/template/chunk-DBCTKIAG.js
import{a as L}from"./chunk-ILLDEPHH.js";import{Gc as g,Hd as y,Jc as f,Sb as n,Tb as i,Ub as p,Vb as c,cc as w,fb as t,tc as m,ud as C,yb as u}from"./chunk-AQ27DSQO.js";var E=(o,s,r,e)=>({"poor-active":o,"avg-active":s,"strong-active":r,"heavy-active":e}),d=o=>({active:o}),_=class o{routes=L;password=[!1,!1];togglePassword(s){this.password[s]=!this.password[s]}passwordValue="";strengthLevel="";passwordInfoMessage=null;passwordInfoColor="";poorRegExp=/[a-z]/;weakRegExp=/(?=.*?[0-9])/;strongRegExp=/(?=.*?[#?!@$%^&*-])/;whitespaceRegExp=/^$|\s+/;checkPasswordStrength(s){let e=s.target.value;this.passwordValue=e;let a=e.length,l=this.poorRegExp.test(e),h=this.weakRegExp.test(e),v=this.strongRegExp.test(e),k=this.whitespaceRegExp.test(e);if(e===""){this.resetStrength();return}if(k){this.passwordInfoMessage="Whitespaces are not allowed",this.passwordInfoColor="red",this.strengthLevel="";return}a<8?(this.strengthLevel="poor",this.passwordInfoMessage="Weak. Must contain at least 8 characters.",this.passwordInfoColor="red"):(l||h||v)&&(this.strengthLevel="weak",this.passwordInfoMessage="Average. Must contain at least 1 letter or number.",this.passwordInfoColor="#FFB54A"),a>=8&&l&&(h||v)&&(this.strengthLevel="strong",this.passwordInfoMessage="Almost strong. Must contain a special symbol.",this.passwordInfoColor="#1D9CFD"),a>=8&&l&&h&&v&&(this.strengthLevel="heavy",this.passwordInfoMessage="Awesome! You have a secure password.",this.passwordInfoColor="#159F46")}resetStrength(){this.strengthLevel="",this.passwordInfoMessage=null}static \u0275fac=function(r){return new(r||o)};static \u0275cmp=u({type:o,selectors:[["app-password-strength"]],decls:14,vars:20,consts:[[1,"mb-3"],["for","password"],["id","passwordInput",1,"form-group"],[1,"pass-group","mb-3"],["id","password",1,"pass-input","form-control",3,"input","type"],["tabindex","0",1,"ti","toggle-password",3,"click","keydown.enter","ngClass"],["id","passwordStrength",1,"strength-meter",3,"ngClass"],["id","poor",3,"ngClass"],["id","weak",3,"ngClass"],["id","strong",3,"ngClass"],["id","heavy",3,"ngClass"],["id","passwordInfo",1,"fs-12"]],template:function(r,e){r&1&&(i(0,"div",0)(1,"label",1),m(2,"Password"),p(),i(3,"div",2)(4,"div",3)(5,"input",4),w("input",function(l){return e.checkPasswordStrength(l)}),p(),i(6,"span",5),w("click",function(){return e.togglePassword(1)})("keydown.enter",function(){return e.togglePassword(1)}),p()(),i(7,"div",6),c(8,"span",7)(9,"span",8)(10,"span",9)(11,"span",10),p()()(),i(12,"p",11),m(13,` Use 8 or more characters with a mix of letters, numbers & symbols.
`),p()),r&2&&(t(5),n("type",e.password[1]?"text":"password"),t(),n("ngClass",e.password[1]?"ti-eye":"ti-eye-off"),t(),n("ngClass",f(7,E,e.strengthLevel==="poor",e.strengthLevel==="weak",e.strengthLevel==="strong",e.strengthLevel==="heavy")),t(),n("ngClass",g(12,d,e.strengthLevel==="poor"||e.strengthLevel==="weak"||e.strengthLevel==="strong"||e.strengthLevel==="heavy")),t(),n("ngClass",g(14,d,e.strengthLevel==="weak"||e.strengthLevel==="strong"||e.strengthLevel==="heavy")),t(),n("ngClass",g(16,d,e.strengthLevel==="strong"||e.strengthLevel==="heavy")),t(),n("ngClass",g(18,d,e.strengthLevel==="heavy")))},dependencies:[y,C],encapsulation:2})};export{_ as a};