burnchart/build/app.min.js

1 line
17 KiB
JavaScript
Raw Normal View History

!function(){var a=function(b,c,d){var e=a.resolve(b);if(null===e){d=d||b,c=c||"root";var f=new Error('Failed to require "'+d+'" from "'+c+'"');throw f.path=d,f.parent=c,f.require=!0,f}var g=a.modules[e];if(!g._resolving&&!g.exports){var h={};h.exports={},h.client=h.component=!0,g._resolving=!0,g.call(this,h.exports,a.relative(e),h),delete g._resolving,g.exports=h.exports}return g.exports};a.modules={},a.aliases={},a.resolve=function(b){"/"===b.charAt(0)&&(b=b.slice(1));for(var c=[b,b+".js",b+".json",b+"/index.js",b+"/index.json"],d=0;d<c.length;d++){if(b=c[d],a.modules.hasOwnProperty(b))return b;if(a.aliases.hasOwnProperty(b))return a.aliases[b]}},a.normalize=function(a,b){var c=[];if("."!=b.charAt(0))return b;a=a.split("/"),b=b.split("/");for(var d=0;d<b.length;++d)".."==b[d]?a.pop():"."!==b[d]&&""!==b[d]&&c.push(b[d]);return a.concat(c).join("/")},a.register=function(b,c){a.modules[b]=c},a.alias=function(b,c){if(!a.modules.hasOwnProperty(b))throw new Error('Failed to alias "'+b+'", it does not exist');a.aliases[c]=b},a.relative=function(b){function c(a,b){for(var c=a.length;c--;)if(a[c]===b)return c;return-1}var d=a.normalize(b,".."),e=function(c){var d=e.resolve(c);return a(d,b,c)};return e.resolve=function(e){var f=e.charAt(0);if("/"==f)return e.slice(1);if("."==f)return a.normalize(d,e);var g=b.split("/"),h=c(g,"deps")+1;return h||(h=0),e=g.slice(0,h+1).join("/")+"/deps/"+e},e.exists=function(b){return a.modules.hasOwnProperty(e.resolve(b))},e};var b=this;b.require="undefined"!=typeof b.require?b.require:a,function(){b.require.register("ghbc/src/app.js",function(a,b,c){var d,e,f,g,h;d=b("./modules/config"),e=b("./modules/regex"),f=b("./modules/render"),g=b("./modules/repo"),h=function(){var a,b,c,h,i,j,k;return(b=window.location.hash.match(e.location))?(h=b[1].slice(1),f("body","loading",{path:h}),k=h.split("/"),j=k[0],i=k[1],a=k[2],c=a?{path:""+j+"/"+i,milestone:a}:{path:h},async.waterfall([d,function(a,b){return g(_.extend(c,a),b)}],function(a){return a?f("body","error",{text:a.toString()}):void 0})):f("body","info")},c.exports=function(){return"onhashchange"in window&&"hash"in window.location?(window.addEventListener("hashchange",h,!1),h()):f("body","error",{text:"URL fragment identifier not supported"})}}),b.require.register("ghbc/src/modules/config.js",function(a,b,c){var d,e,f,g,h,i,j,k,l=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};k=b("./require")._,h=b("./request"),g=b("./regex"),d=null,j=!1,f=[],e={host:"api.github.com",protocol:"https"},i={host:function(a){return k.isString(a)},protocol:function(a){return k.isString(a)&&a.match(/^http(s?)$/)},token:function(a){return k.isString(a)},off_days:function(a){var b,c,d;if(!k.isArray(a))return!1;for(c=0,d=a.length;d>c;c++)if(b=a[c],l.call([1,2,3,4,5,6,7],b)<0)return!1;return!0}},c.exports=function(a){return"undefined"==typeof window&&(d=null),d?a(null,d):(f.push(a),j?void 0:(j=!0,h.config(function(b,c){var h,l,m;j=!1,d=k.defaults(c||{},e),d.size_label=d.size_label?new RegExp(d.size_label):g.size_label;for(h in i)if(l=i[h],d[h]&&!l(d[h]))return a("Config field `"+h+"` misconfigured");for(m=[];f.length;)m.push(f.pop()(null,d));return m})))}}),b.require.register("ghbc/src/modules/graph.js",function(a,b,c){var d,e,f,g,h=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};g=b("./require"),f=g._,d=g.d3,e=b("./regex"),c.exports={actual:function(a,b,c,e){var g,h,i,j,k;return g=[{date:new Date(b),points:c}],i=+1/0,h=-1/0,k=f.map(a,function(a){var b,d;return d=a.size,b=a.closed_at,i>d&&(i=d),d>h&&(h=d),f.extend({},a,{date:new Date(b),points:c-=d})}),j=d.scale.linear().domain([i,h]).range([5,8]),k=f.map(k,function(a){return a.radius=j(a.size),a}),e(null,[].concat(g,k))},ideal:function(a,b,c,d,g){var i,j,k,l,m,n,o,p,q,r,s;return a>b&&(r=[a,b],b=r[0],a=r[1]),s=f.map(a.match(e.datetime)[1].split("-"),function(a){return parseInt(a)}),q=s[0],m=s[1],j=s[2],i=new Date(b),k=[],l=0,(o=function(a){var b,d;return b=new Date(q,m-1,j+a),(d=b.getDay())||(d=7),h.call(c,d)>=0?k.pus