(window.webpackJsonp=window.webpackJsonp||[]).push([[96],{141:function(e,t){function i(e){return{restrict:"A",scope:{min:"=",max:"="},link:function(t,i,n){const o={debounce:_.debounce,delay:100,loadDelay:10,compressor:1,min:n.fitTextMin||"inherit",max:n.fitTextMax||"inherit",calcSize:10,lines:1},a=i.parent(),c=i[0],l=c.style,f=window.getComputedStyle(i[0],null),r=i.children().length||o.lines,s="inherit"===o.min?f["font-size"]:o.min,d="inherit"===o.max?f["font-size"]:o.max,p=f["line-height"],u=f.display;let h;function m(){const e=o.calcSize*r/c.offsetWidth/r;return Math.max(Math.min(function(e){const t=parseFloat(getComputedStyle(a[0]).paddingLeft),i=parseFloat(getComputedStyle(a[0]).paddingRight);return(a[0].offsetWidth-(t+i))*e*o.compressor}(e),parseFloat(d)),parseFloat(s))}function w(){h&&e.cancel(h),h=e((function(){c.offsetHeight*c.offsetWidth!=0&&(l.fontSize=o.calcSize+"px",l.lineHeight="1",l.display="inline-block",l.fontSize=m()+"px",l.lineHeight=p,l.display=u)}),o.loadDelay)}t.$watch((function(){return[a[0].offsetWidth,i[0].offsetWidth].join("_")}),(function(){w()})),$(window).on("resize",o.debounce((function(){t.$apply(w)}),o.delay)),t.$on("$destroy",(function(){h&&e.cancel(h),$(window).off("resize")}))}}}angular.module("graphdb.framework.core.directives.fittext",[]).directive("fitText",i),i.$inject=["$timeout"]}}]);