(()=>{function t(o,l){return{require:"form",restrict:"A",transclude:!1,link:function(t,i,a,n){var e=["active","color","label","unit","min","max","target","yellowRangeMin","yellowRangeMax","redRangeMin","redRangeMax"],r=_.partial(l(a.c8yDataPointValidator),t);function c(){(r()||{}).__active?_(e).filter(function(t){return n[t]}).forEach(function(t){t=n[t];_.reduce(t.$parsers,function(t,i){return i(t)},t.$viewValue)}):_.forEach(e,function(t){t=n[t];t&&t.$invalid&&(t.$setValidity("c8yMin",!0),t.$setValidity("c8yMax",!0),t.$setValidity("required",!0))})}o(function(){t.$watch(r,c,!0),t.$watch(function(){return n.$valid},c)},500)}}}t.$inject=["$timeout","$parse"],angular.module("c8y.cockpit.dataPointExplorer").directive("c8yDataPointValidator",t)})();