text: /*
  Project: angular-gantt v1.2.7 - Gantt chart component for AngularJS
  Authors: Marco Schweighauser, Rémi Alvergnat
  License: MIT
  Homepage: https://www.angular-gantt.com
  Github: https://github.com/angular-gantt/angular-gantt.git
  */
  
  !function(){"use strict";angular.module("gantt.tooltips",["gantt","gantt.tooltips.templates"]).directive("ganttTooltips",["$compile","$document",function(a,b){return{restrict:"E",require:"^gantt",scope:{enabled:"=?",dateFormat:"=?",content:"=?"},link:function(c,d,e,f){var g=f.gantt.api;if(c.options&&"object"==typeof c.options.tooltips)for(var h in c.options.tooltips)c[h]=c.options[h];void 0===c.enabled&&(c.enabled=!0),void 0===c.dateFormat&&(c.dateFormat="MMM DD, HH:mm"),void 0===c.content&&(c.content="{{task.model.name}}</br><small>{{task.isMilestone() === true && getFromLabel() || getFromLabel() + ' - ' + getToLabel()}}</small>"),c.api=g,g.directives.on["new"](c,function(d,f,g){if("ganttTask"===d){var h=f.$new();h.pluginScope=c;var i=b[0].createElement("div");angular.element(i).attr("data-ng-if","pluginScope.enabled");var j=b[0].createElement("gantt-tooltip");void 0!==e.templateUrl&&angular.element(j).attr("data-template-url",e.templateUrl),void 0!==e.template&&angular.element(j).attr("data-template",e.template),angular.element(i).append(j),g.append(a(i)(h))}})}}}])}(),function(){"use strict";angular.module("gantt.tooltips").directive("ganttTooltip",["$log","$timeout","$compile","$document","$templateCache","ganttDebounce","ganttSmartEvent",function(a,b,c,d,e,f,g){return{restrict:"E",templateUrl:function(a,b){var c;return c=void 0===b.templateUrl?"plugins/tooltips/tooltip.tmpl.html":b.templateUrl,void 0!==b.template&&e.put(c,b.template),c},scope:!0,replace:!0,controller:["$scope","$element","ganttUtils",function(a,c,e){var h,i,j=angular.element(d[0].body),k=a.task.$element,l=!1;a.getFromLabel=function(){var b=a.task.model.tooltips,c=a.task.row.model.tooltips;"boolean"==typeof b&&(b={enabled:b}),"boolean"==typeof c&&(c={enabled:c});var d=e.firstProperty([b,c],"dateFormat",a.pluginScope.dateFormat);return a.task.model.from.format(d)},a.getToLabel=function(){var b=a.task.model.tooltips,c=a.task.row.model.tooltips;"boolean"==typeof b&&(b={enabled:b}),"boolean"==typeof c&&(c={enabled:c});var d=e.firstProperty([b,c],"dateFormat",a.pluginScope.dateFormat);return a.task.model.to.format(d)};var m=g(a,j,"mousemove",f(function(b){l?((!a.taskRect||b.clientX<a.taskRect.left||b.clientX>a.taskRect.right||b.clientY>a.taskRect.bottom||b.clientY<a.taskRect.top)&&n(!1,!1),q(b.clientX)):(i=b.clientX,n(!0,!1))},5,!1));a.task.getContentElement().bind("mousemove",function(a){i=a.clientX}),a.task.getContentElement().bind("mouseenter",function(a){i=a.clientX,n(!0,!0)}),a.task.getContentElement().bind("mouseleave",function(){n(!1)}),a.pluginScope.api.tasks.on.moveBegin&&(a.pluginScope.api.tasks.on.moveBegin(a,function(b){b===a.task&&n(!0)}),a.pluginScope.api.tasks.on.moveEnd(a,function(b){b===a.task&&n(!1)}),a.pluginScope.api.tasks.on.resizeBegin(a,function(b){b===a.task&&n(!0)}),a.pluginScope.api.tasks.on.resizeEnd(a,function(b){b===a.task&&n(!1)}));var n=function(c,d){h&&b.cancel(h);var f=a.task.model.tooltips,g=a.task.row.model.tooltips;"boolean"==typeof f&&(f={enabled:f}),"boolean"==typeof g&&(g={enabled:g});var j=e.firstProperty([f,g],"enabled",a.pluginScope.enabled);j&&!l&&void 0!==i&&c?d?h=b(function(){o(i)},500,!1):o(i):c||a.task.active||r()},o=function(b){l=!0,m.bind(),a.displayed=!0,a.$evalAsync(function(){var d;c.hasClass("ng-hide")&&(c.removeClass("ng-hide"),d=!0),a.elementHeight=c[0].offsetHeight,d&&c.addClass("ng-hide"),a.taskRect=k[0].getBoundingClientRect(),q(b)})},p=function(){var a=d[0];return a.documentElement.clientWidth||a.documentElement.getElementById("body")[0].clientWidth},q=function(b){b+c[0].offsetWidth>p()?(c.css("left",b+20-c[0].offsetWidth+"px"),a.isRightAligned=!0):(c.css("left",b-20+"px"),a.isRightAligned=!1)},r=function(){l=!1,m.unbind(),a.$evalAsync(function(){a.displayed=!1})};a.task.isMoving&&n(!0,!1),a.gantt.api.directives.raise["new"]("ganttTooltip",a,c),a.$on("$destroy",function(){a.gantt.api.directives.raise.destroy("ganttTooltip",a,c)})}]}}])}(),angular.module("gantt.tooltips.templates",[]).run(["$templateCache",function(a){a.put("plugins/tooltips/tooltip.tmpl.html",'<div ng-cloak\n     class="gantt-task-info"\n     ng-show="displayed"\n     ng-class="isRightAligned ? \'gantt-task-infoArrowR\' : \'gantt-task-infoArrow\'"\n     ng-style="{top: taskRect.top + \'px\', marginTop: -elementHeight - 8 + \'px\'}">\n    <div class="gantt-task-info-content">\n        <div gantt-bind-compile-html="pluginScope.content"></div>\n    </div>\n</div>\n')}]);
  //# sourceMappingURL=angular-gantt-tooltips-plugin.min.js.map