(()=>{function e(n,e,t,s){var l={red:{strength:e("weak"),hexColor:"var(--c8y-palette-status-danger)",icon:"exclamation-circle"},yellow:{strength:e("medium"),hexColor:"var(--c8y-palette-status-warning)",icon:"warning"},green:{strength:e("strong"),hexColor:"var(--c8y-palette-status-success)",icon:"check-circle"}};function g(){return g._calling||(g._calling=t.getStrongPasswordSettings(),g._calling.finally(function(){g._calling=void 0})),g._calling}return function(){var t,r=n.defer();return g().then(function(e){var n=e.enforceStrength,t=e.greenMinLength,e=e.strengthValidity;_.isNumber(t)&&(n||e)&&o(t),r.resolve()}),{getDefaultMinGreenLength:function(){return 8},setMinGreenLength:o,getMinGreenLength:function(){return e().then(function(){return _.isUndefined(t)?8:t})},getStrengthColor:function(r){return(n=>e().then(function(){var e=!0;return e=_.isUndefined(t)?e:n.length>=t}))(r).then(function(e){n=r;var n=_.filter([i(n),c(n),a(n),u(n)]).length,t="red";return 3<n&&e?t="green":3<=n&&(t="yellow"),t})},hasLowerCase:i,hasUpperCase:c,hasNumbers:a,hasSpecialChars:u,getStrengthForColor:function(e){return l[_.toLower(e)].strength},getHexColorForColor:function(e){return l[_.toLower(e)].hexColor},getIconForColor:function(e){return l[_.toLower(e)].icon}};function o(e){t=e,s.setUserPasswordValidationParams(t)}function e(){return _.isUndefined(t)||r.resolve(),r.promise}function i(e){return-1!==e.search(/[a-z]/)}function c(e){return-1!==e.search(/[A-Z]/)}function a(e){return-1!==e.search(/[0-9]/)}function u(e){return-1!==e.search(/[^0-9a-zA-Z]+/)}}}e.$inject=["$q","gettext","c8yLoginOptions","c8ySettings"],angular.module("c8y.ui").factory("passwordStrengthCheckerFactory",e)})();