{"size": 1936, "ext": "js", "max_stars_repo_path": "ngtagcloud.min.js", "max_stars_repo_name": "BaptisteBellot/ngtagcloud", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "ngtagcloud.min.js", "max_issues_repo_name": "BaptisteBellot/ngtagcloud", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "ngtagcloud.min.js", "max_forks_repo_name": "BaptisteBellot/ngtagcloud", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 101.8947368421, "max_line_length": 671, "alphanum_fraction": 0.6678719008}
/**
 * Angular Tag cloud
 * Author : Damian Hamill
 * Repo: https://github.com/damianham/ngtagcloud
 * 
 * See Also: https://github.com/zeeshanhyder, https://github.com/lucaong/jQCloud
 */
setTimeout(function(){angular.module("ngTagCloud",[]).directive("ngTagCloud",["$timeout","$log","$http",function(t,a,e){function n(n,i,g,o){var l,r=function(t,a){return void 0===t?a:t.replace("__tag__",a)},c=function(t){if(!(t.length<1)){for(var a=0,e=0,i=0;i<t.length;i++)t[i].weight=parseFloat(t[i].weight,10),t[i].weight>a?a=t[i].weight:e>0&&e>t[i].weight&&(e=t[i].weight)
var g,o=l.find("div")
o.empty(),angular.forEach(t,function(t){g=a>e?Math.round((t.weight-e)/(a-e)*9)+1:5
var i=document.createElement("span")
if(void 0!==n.tagClick&&""!==n.tagClick&&"function"==typeof n.tagClick)i.onclick=function(){n.tagClick({text:t.text})},i.append(t.text)
else if(void 0!==t.link&&""!==t.link&&"string"==typeof t.link||void 0!==n.tagLink&&""!==n.tagLink&&"string"==typeof n.tagLink){var l
l=void 0!==t.link&&""!==t.link&&"string"==typeof t.link?encodeURI(t.link).replace(/'/g,"%27"):r(n.tagLink,t.text)
var c=document.createElement("a")
c.href=l,c.appendChild(document.createTextNode(t.text)),i.append(c)}else i.append(t.text)
i.classList.add("w"+g),o.append(i)}),n.$apply()}}
!1!==function(n){return void 0!==n.tagData&&""!==n.tagData||void 0!==n.tagUrl&&""!==n.tagUrl?(void 0!==n.tagData&&""!==n.tagData?n.$watchCollection("tagData",function(a,e){t(function(){c(a)},100)}):e.get(n.tagUrl).then(function(a){t(function(){c(a.data)},100)},function(t){a.error(t)}),!0):(a.error("ngTagCloud: either tag-data or tag-url attribute must be present. Usage <ng-tag-cloud tag-data='expression' tag-url='url'></ng-tag-cloud>\nSee: https://github.com/damianham/ngtagcloud"),!1)}(n)&&(l=angular.element(i))}return{restrict:"EA",scope:{tagUrl:"@",tagData:"=",tagLink:"@",tagClick:"&"},template:"<div id='ng-tag-cloud' class='ng-tag-cloud'></div>",link:n}}])},1)
