(()=>{function e(e,d){var a={IP:e("IP"),IPv6:e("IPv6"),DomainName:e("Name")};return{require:"ngModel",scope:{identifiedType:"&"},link:function(i,e,t,n){n.$validators.c8yHostAddress=function(e){return _.isEmpty(e)||((e,i)=>(i=(/^((\d|[OI]){1,3}[.,]){0,4}(\d|[OI]){0,3}$/.test(i)?(e.identifiedType({type:a.IP}),d.validation.ip):/^(([\w]{0,6}[:;]){1,7})[\w]{0,6}$/.test(i)?(e.identifiedType({type:a.IPv6}),d.validation.ipV6):(e.identifiedType({type:a.DomainName}),d.validation.hostname)).pattern,new RegExp(i,"i")))(i,e).test(e)}}}}e.$inject=["gettext","c8yConfig"],angular.module("c8y.ui").directive("c8yHostAddress",e)})();