!function(){Ember.TEMPLATES.chart=Ember.Handlebars.template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),i=i||{};var n,s,o,u,l="",h=r.helperMissing,c=this.escapeExpression;return i.buffer.push("\n"),l})}(),function(){Ember.Charts=Ember.Namespace.create(),Ember.Charts.VERSION="0.1.0",null!=(_ref=Ember.libraries)&&_ref.register("Ember Charts",Ember.Charts.VERSION)}(),function(){Ember.Charts.Helpers=Ember.Namespace.create({groupBy:function(e,t){var r,a,i,n,s,o,u;for(n={},a=o=0,u=e.length;u>=0?u>o:o>u;a=u>=0?++o:--o)s=e[a],i=t(s,a),r=n[i]||(n[i]=[]),r.push(s);return n},LabelTrimmer:Ember.Object.extend({getLabelSize:function(){return 100},getLabelText:function(e){return e.label},trim:Ember.computed(function(){var e,t;return e=this.get("getLabelSize"),t=this.get("getLabelText"),function(r){return r.text(function(a){var i,n,s,o,u;return i=this.getBBox().width,(s=t(a,r))?(n=i/s.length,u=e(a,r)-4*n,o=Math.floor(u/n),0>=o-3?"...":i>u?s.slice(0,o-3)+"...":s):""})}}).property("getLabelSize","getLabelText")})})}(),function(){Ember.Charts.Colorable=Ember.Mixin.create({selectedSeedColor:"rgb(65, 65, 65)",tint:.8,minimumTint:0,maximumTint:.66,colorScaleType:d3.scale.linear,renderVars:["colorScale"],colorRange:Ember.computed(function(){var e;return e=this.get("selectedSeedColor"),this.get("getColorRange")(e)}).property("selectedSeedColor","getColorRange"),getColorRange:Ember.computed(function(){var e=this;return function(t){var r,a,i;return r=d3.interpolateRgb(t,"rgb(255,255,255)"),i=r(e.get("minimumTint")),a=r(e.get("maximumTint")),[d3.rgb(i),d3.rgb(a)]}}).property("minimumTint","maximumTint"),colorScale:Ember.computed(function(){var e;return e=this.get("selectedSeedColor"),this.get("getColorScale")(e)}).property("selectedSeedColor","getColorScale"),getColorScale:Ember.computed(function(){var e=this;return function(t){var r;return r=e.get("getColorRange")(t),e.get("colorScaleType")().range(r)}}).property("getColorRange","colorScaleType"),secondaryMinimumTint:.4,secondaryMaximumTint:.85,secondaryColorScaleType:d3.scale.linear,secondaryColorRange:Ember.computed(function(){var e,t,r,a;return a=this.get("selectedSeedColor"),e=d3.interpolateRgb(a,"rgb(255,255,255)"),r=e(this.get("secondaryMinimumTint")),t=e(this.get("secondaryMaximumTint")),[d3.rgb(r),d3.rgb(t)]}).property("selectedSeedColor","secondaryMinimumTint","secondaryMaximumTint"),secondaryColorScale:Ember.computed(function(){return this.get("secondaryColorScaleType")().range(this.get("secondaryColorRange"))}).property("secondaryColorRange","secondaryColorScaleType"),leastTintedColor:Ember.computed(function(){return this.get("colorRange")[0]}).property("colorRange.@each"),mostTintedColor:Ember.computed(function(){return this.get("colorRange")[1]}).property("colorRange.@each"),numColorSeries:1,getSeriesColor:Ember.computed(function(){var e,t,r=this;return e=this.get("numColorSeries"),t=this.get("selectedSeedColor"),function(a,i){var n,s,o;return o=a.color||t,n=r.get("getColorRange")(o),s=r.get("getColorScale")(o),1===e?n[0]:s(i/(e-1))}}).property("numColorSeries","getColorRange","getColorScale")},"selectedSeedColor",{numSecondaryColorSeries:1,getSecondarySeriesColor:Ember.computed(function(){var e,t=this;return e=this.get("numSecondaryColorSeries"),function(r,a){return 1===e?t.get("secondaryColorRange")[0]:t.get("secondaryColorScale")(a/(e-1))}}).property("numSecondaryColorSeries","secondaryColorRange","secondaryColorScale")})}(),function(){Ember.Charts.AxesMixin=Ember.Mixin.create({minXTicks:3,minYTicks:3,tickSpacing:50,numXTicks:Ember.computed(function(){var e;return e=Math.floor(this.get("graphicWidth")/this.get("tickSpacing")),Math.max(e,this.get("minXTicks"))}).property("graphicWidth","tickSpacing","minXTicks"),numYTicks:Ember.computed(function(){var e;return e=Math.floor(this.get("graphicHeight")/this.get("tickSpacing")),Math.max(e,this.get("minYTicks"))}).property("graphicHeight","tickSpacing","minYTicks")})}(),function(){Ember.Charts.FloatingTooltipMixin=Ember.Mixin.create({tooltipId:Ember.computed(function(){return this.get("elementId")+"_tooltip"}),tooltipWidth:40,tooltipValueDisplayName:"Value",showTooltip:function(e,t){var r;return r=this.get("$tooltip"),r.html(e),r.show(),this.updatePosition(t)},hideTooltip:function(){return this.get("$tooltip").hide()},updatePosition:function(e){var t,r,a,i,n,s,o,u,l,h,c,d,g;return t=this.get("$tooltip"),d=10,g=10,l=t.width(),i=t.height(),c=$(window).scrollTop(),h=$(window).scrollLeft(),r=e.clientX+h,a=e.clientY+c,o=r+(r-h+2*d+l>$(window).width()?-(l+2*d):d),u=a+(a-c+2*g+i>$(window).height()?-(i+2*g):g),n=h+d,s=c+g,n>o&&(o=n),c+g>u&&(u=s),t.css("top",u+"px").css("left",o+"px")},didInsertElement:function(){return this._super(),$("body").append("
"),this.hideTooltip()},willDestroyElement:function(){return this._super(),this.get("$tooltip").remove()},widthDidChange:function(){return this.get("$tooltip").css("width",this.get("tooltipWidth"))}},"tooltipWidth",{$tooltip:Ember.computed(function(){return $("#"+this.get("tooltipId"))}).volatile()})}(),function(){Ember.Charts.HasTimeSeriesRule=Ember.Mixin.create({lineMarkerTolerance:6e4,mousePosition:Ember.computed(function(){return d3.event?d3.mouse(this.get("$viewport")):null}).volatile(),isEventWithinValidRange:Ember.computed(function(){var e,t,r,a,i,n,s;return a=this.get("xRange"),n=this.get("yRange"),s=this.get("mousePosition"),r=s[0],i=s[1],e=d3.min(a)r&&o>++s;)nthis.get("maxNumberOfLabels")?(r=Math.ceil(a.length/this.get("maxNumberOfLabels")),d3.time.years(e,t,r)):a},labelledQuarters:function(e,t){var r;return r=d3.time.months(e,t,3),r.length>this.get("maxNumberOfLabels")?this.labelledYears(e,t):r},monthsBetween:function(e,t,r){return null==r&&(r=1),d3.time.months(e,t).filter(function(e,t){return!(t%r)})},labelledMonths:function(e,t){var r,a;return r=this.monthsBetween(e,t),r.length>this.get("maxNumberOfLabels")?(a=Math.ceil(r.length/this.get("maxNumberOfLabels")),this.monthsBetween(e,t,a)):r},weeksBetween:function(e,t,r){return null==r&&(r=1),d3.time.weeks(e,t).filter(function(e,t){return!(t%r)})},secondsBetween:function(e,t,r){return null==r&&(r=1),d3.time.seconds(e,t).filter(function(e,t){return!(t%r)})},labelledWeeks:function(e,t){var r,a;return a=this.weeksBetween(e,t),a.length>this.get("maxNumberOfLabels")?(r=Math.ceil(a.length/this.get("maxNumberOfLabels")),this.weeksBetween(e,t,r)):a},getLabelledTicks:Ember.computed(function(){var e=this;switch(this.get("selectedInterval")){case"years":case"Y":return function(t,r){return e.labelledYears(t,r)};case"quarters":case"Q":return function(t,r){return e.labelledQuarters(t,r)};case"months":case"M":return function(t,r){return e.labelledMonths(t,r)};case"weeks":case"W":return function(t,r){return e.labelledWeeks(t,r)};case"days":case"D":return d3.time.days;case"seconds":case"S":return function(t,r){return e.labelledSeconds(t,r)};default:return d3.time.years}}).property("maxNumberOfLabels","selectedInterval"),quarterFormat:function(e){var t,r;return t=function(){switch(e.getMonth()%12){case 0:return"Q1";case 3:return"Q2";case 6:return"Q3";case 9:return"Q4"}}(),r=d3.time.format("%Y")(e),t+" "+r},formattedTime:Ember.computed(function(){switch(this.get("selectedInterval")){case"years":case"Y":return d3.time.format("%Y");case"quarters":case"Q":return this.quarterFormat;case"months":case"M":return d3.time.format("%b '%y");case"weeks":case"W":return d3.time.format("%-m/%-d/%y");case"days":case"D":return d3.time.format("%a");case"seconds":case"S":return d3.time.format("%M : %S");default:return d3.time.format("%Y")}}).property("selectedInterval")})}(),function(){Ember.Charts.Legend=Ember.Mixin.create({legendTopPadding:10,legendItemHeight:18,minLegendItemWidth:120,maxLegendItemWidth:160,legendIconRadius:9,legendLabelPadding:10,legendWidth:Ember.computed.alias("width"),legendHeight:Ember.computed(function(){return this.get("numLegendRows")*this.get("legendItemHeight")}).property("numLegendRows","legendItemHeight"),legendItemWidth:Ember.computed(function(){var e;return e=this.get("legendWidth")/this.get("legendItems.length"),ethis.get("maxLegendItemWidth")?this.get("maxLegendItemWidth"):e}).property("legendWidth","minLegendItemWidth","maxLegendItemWidth","legendItems.length"),numLegendItemsPerRow:Ember.computed(function(){return Math.floor(this.get("legendWidth")/this.get("legendItemWidth"))}).property("legendWidth","legendItemWidth"),numLegendRows:Ember.computed(function(){return Math.ceil(this.get("legendItems.length")/this.get("numLegendItemsPerRow"))}).property("legendItems.length","numLegendItemsPerRow"),legendLabelWidth:Ember.computed(function(){return this.get("legendItemWidth")-this.get("legendIconRadius")-2*this.get("legendLabelPadding")}).property("legendItemWidth","legendIconRadius","legendLabelPadding"),legendChartPadding:0,legendAttrs:Ember.computed(function(){var e,t,r;return e=this.get("outerWidth")/2,r=this.get("legendChartPadding")+this.get("legendTopPadding"),t=this.get("graphicBottom")+r,{transform:"translate("+e+", "+t+")"}}).property("outerWidth","graphicBottom","legendTopPadding","legendChartPadding"),legendItemAttrs:Ember.computed(function(){var e,t,r,a,i;return r=this.get("legendItemWidth"),t=this.get("legendItemHeight"),i=this.get("numLegendItemsPerRow"),a=this.get("legendItems.length"),e=1===this.get("numLegendRows"),{"class":"legend-item",width:r,"stroke-width":0,transform:function(n,s){var o,u,l,h,c;return o=s%i,c=Math.floor(s/i),h=e?a:i,u=o*r-h/2*r+.5,l=c*t+t/2,"translate("+u+", "+l+")"}}}).property("legendItemWidth","legendItemHeight","numLegendItemsPerRow","legendItems.length","numLegendRows"),legendIconAttrs:Ember.computed(function(){var e,t;return e=this.get("legendIconRadius"),t=this.get("legendItemHeight"),{d:function(t,r){return"line"===t.icon(t)?"M "+-e+" 0 L "+e+" 0":d3.svg.symbol().type(t.icon(t,r)).size(Math.pow(e,2))(t,r)},fill:function(e,t){return _.isFunction(e.fill)?e.fill(e,t):e.fill},stroke:function(e,t){return _.isFunction(e.stroke)?e.stroke(e,t):e.stroke},"stroke-width":function(e){return e.width?_.isFunction(e.width)?e.width(e,i):e.width:1.5},"stroke-dasharray":function(e){return e.dotted?"2,2":void 0}}}).property("legendIconRadius","legendItemHeight"),legendLabelAttrs:Ember.computed(function(){return{x:this.get("legendIconRadius")/2+this.get("legendLabelPadding"),y:".35em"}}).property("legendIconRadius","legendLabelPadding","legendItemHeight"),showLegendDetails:Ember.computed(function(){var e=this;return this.get("isInteractive")?function(t,r,a){var i,n,s;return d3.select(a).classed("hovered",!0),t.selector&&e.get("viewport").selectAll(t.selector).classed("hovered",!0),i=''+t.label+"",null!=t.xValue&&(n=e.get("formatXValue"),s=e.get("formatYValue"),i+=''+e.get("tooltipXValueDisplayName")+": ",i+=''+n(t.xValue)+"
",i+=''+e.get("tooltipYValueDisplayName")+": ",i+=''+s(t.yValue)+""),e.showTooltip(i,d3.event)}:Ember.K}).property("isInteractive"),hideLegendDetails:Ember.computed(function(){var e=this;return this.get("isInteractive")?function(t,r,a){return d3.select(a).classed("hovered",!1),t.selector&&e.get("viewport").selectAll(t.selector).classed("hovered",!1),e.hideTooltip()}:Ember.K}).property("isInteractive"),clearLegend:function(){return this.get("viewport").select(".legend-container").remove()},legend:Ember.computed(function(){var e;return e=this.get("viewport").select(".legend-container"),e.empty()?this.get("viewport").append("g").attr("class","legend-container"):e}).volatile(),drawLegend:function(){var e,t,r,a,i,n,s,o,u,l;return this.clearLegend(),i=this.get("legend"),i.attr(this.get("legendAttrs")),u=this.get("showLegendDetails"),e=this.get("hideLegendDetails"),s=i.selectAll(".legend-item").data(this.get("legendItems")).enter().append("g").attr(this.get("legendItemAttrs")).on("mouseover",function(e,t){return u(e,t,this)}).on("mouseout",function(t,r){return e(t,r,this)}),n=this.get("legendIconAttrs"),t=this.get("isShowingTotal"),l=this.get("totalPointShape"),s.each(function(e,r){var a;return a=d3.select(this),0===r&&t?a.append("g").attr("class","icon").call(l):d3.select(this).append("path").attr("class","icon").attr(n)}),o=this.get("legendLabelWidth"),r=Ember.Charts.Helpers.LabelTrimmer.create({getLabelSize:function(){return o},getLabelText:function(e){return e.label}}),a=s.append("text").style("text-anchor","start").text(function(e){return e.label}).attr(this.get("legendLabelAttrs")).call(r.get("trim"))}})}(),function(){Ember.Charts.PieLegend=Ember.Mixin.create({legendVerticalPadding:30,legendHorizontalPadding:Ember.computed(function(){return.2*this.get("outerWidth")}).property("outerWidth"),maxLabelHeight:Ember.computed(function(){return.05*this.get("outerHeight")}).property("outerWidth","outerHeight"),legendWidth:Ember.computed(function(){return this.get("outerWidth")-this.get("legendHorizontalPadding")}).property("outerWidth","legendHorizontalPadding"),legendHeight:Ember.computed(function(){return this.get("maxLabelHeight")+2*this.get("legendVerticalPadding")}).property("maxLabelHeight","legendVerticalPadding"),legendAttrs:Ember.computed(function(){var e,t,r;return e=0,r=.15*this.get("marginBottom")-this.get("marginTop")/2,t=this.get("outerHeight")/2+r,{transform:"translate("+e+", "+t+")"}}).property("outerHeight","marginTop","marginBottom"),legendLabelAttrs:Ember.computed(function(){return{style:"text-anchor:middle;",y:"-.35em"}}),legend:Ember.computed(function(){var e;return e=this.get("viewport").select(".legend"),e.empty()?this.get("viewport").append("g").attr("class","legend"):e}).volatile(),clearLegend:function(){return this.get("viewport").select(".legend .labels").remove()},drawLegend:function(){var e,t,r,a,i,n,s,o,u,l,h,c;for(this.clearLegend(),i=this.get("legend").attr(this.get("legendAttrs")),s=this.get("viewport").select(".other-slice"),this.get("isInteractive")&&!s.empty()&&i.on("mouseover",function(){return s.classed("hovered",!0),i.classed("hovered",!0)}).on("mouseout",function(){return s.classed("hovered",!1),i.classed("hovered",!1)}),a=i.append("g").attr("class","labels"),t=this.get("legendItems").map(function(e){return null!=e.percent?""+e.label+" ("+e.percent+"%)":e.label}),o=a.append("text").text("Other: "+t[0]).attr(this.get("legendLabelAttrs")),r=0,c=t.slice(1),l=0,h=c.length;h>l;l++)if(n=c[l],e=o.text(),o.text(""+e+", "+n),u=o.node(),u.getBBox().width>this.get("legendWidth")){if(r+u.getBBox().height>this.get("maxLabelHeight")){o.text(""+e+", ...");break}o.text(""+e+","),r+=u.getBBox().height,o=a.append("text").text(n).attr(this.get("legendLabelAttrs")).attr("dy",r)}return a.attr("transform","translate(0, "+-r+")")}})}(),function(){Ember.Charts.ChartComponent=Ember.Component.extend(Ember.Charts.Colorable,Ember.AddeparMixins.ResizeHandlerMixin,{layoutName:"chart",classNames:["chart-frame","scroll-y"],isInteractive:!0,horizontalMargin:30,verticalMargin:30,marginRight:Ember.computed.alias("horizontalMargin"),marginLeft:Ember.computed.alias("horizontalMargin"),marginTop:Ember.computed.alias("verticalMargin"),marginBottom:Ember.computed.alias("verticalMargin"),defaultOuterHeight:500,defaultOuterWidth:700,outerHeight:Ember.computed.alias("defaultOuterHeight"),outerWidth:Ember.computed.alias("defaultOuterWidth"),width:Ember.computed(function(){return this.get("outerWidth")-this.get("marginLeft")-this.get("marginRight")}).property("outerWidth","marginLeft","marginRight"),height:Ember.computed(function(){return Math.max(1,this.get("outerHeight")-this.get("marginBottom")-this.get("marginTop"))}).property("outerHeight","marginBottom","marginTop"),$viewport:Ember.computed(function(){return this.$(".chart-viewport")[0]}),viewport:Ember.computed(function(){return d3.select(this.get("$viewport"))}),transformViewport:Ember.computed(function(){return"translate("+this.get("marginLeft")+","+this.get("marginTop")+")"}).property("marginLeft","marginTop"),labelPadding:10,labelWidth:30,labelHeight:15,labelWidthOffset:Ember.computed(function(){return this.get("labelWidth")+this.get("labelPadding")}).property("labelWidth","labelPadding"),labelHeightOffset:Ember.computed(function(){return this.get("labelHeight")+this.get("labelPadding")}).property("labelHeight","labelPadding"),graphicTop:0,graphicLeft:0,graphicWidth:Ember.computed.alias("width"),graphicHeight:Ember.computed.alias("height"),graphicBottom:Ember.computed(function(){return this.get("graphicTop")+this.get("graphicHeight")}).property("graphicTop","graphicHeight"),graphicRight:Ember.computed(function(){return this.get("graphicLeft")+this.get("graphicWidth")}).property("graphicLeft","graphicWidth"),hasNoData:Ember.computed(function(){return Ember.isEmpty(this.get("finishedData"))}).property("finishedData"),concatenatedProperties:["renderVars"],renderVars:["finishedData","width","height","margin","isInteractive"],init:function(){var e,t,r,a,i,n=this;for(this._super(),a=this.get("renderVars").uniq(),i=[],t=0,r=a.length;r>t;t++)e=a[t],i.push(this.addObserver(e,function(){return Ember.run.once(n,n.get("draw"))}));return i},didInsertElement:function(){return this._super(),this._updateDimensions(),Ember.run.once(this,this.get("draw"))},onResizeEnd:function(){return this._updateDimensions()},_updateDimensions:function(){return this.set("defaultOuterHeight",this.$().height()),this.set("defaultOuterWidth",this.$().width())},clearChart:function(){return this.$(".chart-viewport").children().remove()},draw:function(){return"inDOM"===this.get("state")?this.get("hasNoData")?this.clearChart():this.drawChart():void 0}})}(),function(){Ember.Charts.HorizontalBarComponent=Ember.Charts.ChartComponent.extend(Ember.Charts.FloatingTooltipMixin,{classNames:["chart-horizontal-bar"],formatValue:d3.format(".2s"),formatValueLong:d3.format(",.r"),selectedSortType:"value",defaultOuterHeight:500,labelWidth:Ember.computed(function(){return.25*this.get("outerWidth")}).property("outerWidth"),labelPadding:20,barPadding:.2,maxBarThickness:60,minBarThickness:20,sortedData:Ember.computed(function(){var e,t,r,a;return t=this.get("data"),Ember.isEmpty(t)?[]:(a=this.get("selectedSortType"),r=function(){switch(a){case"value":return function(e){return-e.value};case"label":return function(e){return e.label}}}.call(this),e=function(e,t){return r(e)r(t)?1:0},t.sort(e))}).property("data.@each","selectedSortType"),finishedData:Ember.computed.alias("sortedData"),minOuterHeight:Ember.computed(function(){var e;return e=this.get("numBars")*this.get("minBarThickness"),e+this.get("marginTop")+this.get("marginBottom")}).property("numBars","minBarThickness","marginTop","marginBottom"),maxOuterHeight:Ember.computed(function(){var e;return e=this.get("numBars")*this.get("maxBarThickness"),e+this.get("marginTop")+this.get("marginBottom")}).property("numBars","maxBarThickness","marginTop","marginBottom"),outerHeight:Ember.computed(function(){var e;return e=d3.max([this.get("defaultOuterHeight"),this.get("minOuterHeight")]),d3.min([e,this.get("maxOuterHeight")])}).property("minOuterHeight","maxOuterHeight","defaultOuterHeight"),marginTop:Ember.computed.alias("labelPadding"),marginBottom:Ember.computed.alias("labelPadding"),horizontalMargin:Ember.computed(function(){return this.get("labelWidth")+2*this.get("labelPadding")}).property("labelWidth","labelPadding"),numBars:Ember.computed.alias("finishedData.length"),xDomain:Ember.computed(function(){var e,t,r,a;return a=this.get("finishedData").map(function(e){return e.value}),r=d3.min(a),t=d3.max(a),0>r?(e=Math.max(-r,t),[-e,e]):[0,t]}).property("finishedData","xDomainPadding"),xScale:Ember.computed(function(){return d3.scale.linear().domain(this.get("xDomain")).range([0,this.get("width")]).nice()}).property("width","xDomain"),yScale:Ember.computed(function(){return d3.scale.ordinal().domain(d3.range(this.get("numBars"))).rangeRoundBands([0,this.get("height")],this.get("barPadding"))}).property("height","barPadding"),barThickness:Ember.computed(function(){return this.get("yScale").rangeBand()}).property("yScale"),showDetails:Ember.computed(function(){var e=this;return this.get("isInteractive")?function(t,r,a){var i,n;return d3.select(a).classed("hovered",!0),n=e.get("formatValue"),i=''+t.label+"",i+=''+e.get("tooltipValueDisplayName")+": ",i+=''+n(t.value)+"",e.showTooltip(i,d3.event)}:Ember.K}).property("isInteractive"),hideDetails:Ember.computed(function(){var e=this;return this.get("isInteractive")?function(t,r,a){return d3.select(a).classed("hovered",!1),e.hideTooltip()}:Ember.K}).property("isInteractive"),groupAttrs:Ember.computed(function(){var e,t;return e=this.get("xScale"),t=this.get("yScale"),{transform:function(r,a){var i;return i=Math.min(0,r.value),"translate("+e(i)+", "+t(a)+")"}}}).property("xScale","yScale"),barAttrs:Ember.computed(function(){var e,t=this;return e=this.get("xScale"),{width:function(t){return Math.abs(e(t.value)-e(0))},height:this.get("barThickness"),"stroke-width":0,style:function(e){var r;return e.color?"fill:"+e.color:(r=t.get(e.value<0?"mostTintedColor":"leastTintedColor"),"fill:"+r)}}}).property("xScale","mostTintedColor","leastTintedColor","barThickness"),valueLabelAttrs:Ember.computed(function(){var e,t=this;return e=this.get("xScale"),{x:function(r){return r.value<0?-t.get("labelPadding"):e(r.value)-e(0)+t.get("labelPadding")},y:this.get("barThickness")/2,dy:".35em","text-anchor":function(e){return e.value<0?"end":"start"},"stroke-width":0}}).property("xScale","barThickness","labelPadding"),groupLabelAttrs:Ember.computed(function(){var e,t=this;return e=this.get("xScale"),{x:function(r){return r.value<0?e(0)-e(r.value)+t.get("labelPadding"):-t.get("labelPadding")},y:this.get("barThickness")/2,dy:".35em","text-anchor":function(e){return e.value<0?"start":"end"},"stroke-width":0}}).property("xScale","barThickness","labelPadding"),axisAttrs:Ember.computed(function(){var e;return e=this.get("xScale"),{x1:e(0),x2:e(0),y1:0,y2:this.get("height")}}).property("xScale","height"),groups:Ember.computed(function(){return this.get("viewport").selectAll(".bar").data(this.get("finishedData"))}).volatile(),yAxis:Ember.computed(function(){var e;return e=this.get("viewport").select(".y.axis line"),e.empty()?this.get("viewport").insert("g",":first-child").attr("class","y axis").append("line"):e}).volatile(),renderVars:["barThickness","yScale","finishedData","colorRange"],drawChart:function(){return this.updateData(),this.updateAxes(),this.updateGraphic()},updateData:function(){var e,t,r,a,i;return r=this.get("groups"),i=this.get("showDetails"),a=this.get("hideDetails"),e=r.enter().append("g").attr("class","bar").on("mouseover",function(e,t){return i(e,t,this)}).on("mouseout",function(e,t){return a(e,t,this)}),e.append("rect"),e.append("text").attr("class","value"),e.append("text").attr("class","group"),t=r.exit().remove()},updateAxes:function(){return this.get("yAxis").attr(this.get("axisAttrs"))},updateGraphic:function(){var e,t,r,a,i,n=this;return t=this.get("groups").attr(this.get("groupAttrs")),t.select("rect").attr(this.get("barAttrs")),i=t.select("text.value").text(function(e){return n.get("formatValue")(e.value)}).attr(this.get("valueLabelAttrs")),a=this.get("labelWidth"),r=Ember.Charts.Helpers.LabelTrimmer.create({getLabelSize:function(){return a},getLabelText:function(e){return e.label}}),e=t.select("text.group").text(function(e){return e.label}).attr(this.get("groupLabelAttrs")).call(r.get("trim"))}}),Ember.Handlebars.helper("horizontal-bar-chart",Ember.Charts.HorizontalBarComponent)}(),function(){Ember.Charts.PieComponent=Ember.Charts.ChartComponent.extend(Ember.Charts.PieLegend,Ember.Charts.FloatingTooltipMixin,{classNames:["chart-pie"],formatValue:d3.format(".2s"),formatValueLong:d3.format(",.r"),minSlicePercent:5,maxNumberOfSlices:8,labelWidth:Ember.computed(function(){return.25*this.get("outerWidth")}).property("outerWidth"),maxRadius:2e3,sortFunction:Ember.computed(function(){switch(this.get("selectedSortType")){case"value":return function(e){return e.percent};case"label":return function(e){return e.label};default:return function(e){return e.percent}}}).property("selectedSortType"),filteredData:Ember.computed(function(){var e;return e=this.get("data"),Ember.isEmpty(e)?[]:e.filter(function(e){return e.value>=0})}).property("data.@each"),rejectedData:Ember.computed(function(){var e;return e=this.get("data"),Ember.isEmpty(e)?[]:e.filter(function(e){return e.value<0})}).property("data.@each"),sortedData:Ember.computed(function(){var e,t;return e=this.get("filteredData"),t=e.reduce(function(e,t){return t.value+e},0),0===t?[]:(e=e.map(function(e){return{color:e.color,label:e.label,value:e.value,percent:d3.round(100*e.value/t)}}),_.sortBy(e,this.get("sortFunction")))}).property("filteredData","sortFunc"),sortedDataWithOther:Ember.computed(function(){var e,t,r,a,i,n,s,o,u,l;return e=_.cloneDeep(this.get("sortedData")).reverse(),a=this.get("maxNumberOfSlices"),i=this.get("minNumberOfSlices"),n=this.get("minSlicePercent"),s=[],o={label:"Other",percent:0,_otherItems:s},r=_.indexOf(e,_.find(e,function(e){return e.percentr?r=e.length:(_.rest(e,r).forEach(function(e){return s.push(e),o.percent+=e.percent}),o.percent0&&(a-=1),l=_.first(e,r),u=_.rest(l,a),u.length>0&&(u.forEach(function(e){return s.push(e),o.percent+=e.percent}),l=_.first(l,a)),1===s.length?l.push(s[0]):o.percent>0&&l.push(o),l.reverse()}).property("sortedData","maxNumberOfSlices","minSlicePercent"),otherData:Ember.computed(function(){var e,t,r;return t=_.find(this.get("sortedDataWithOther"),function(e){return e._otherItems}),e=null!=(r=null!=t?t._otherItems:void 0)?r:[],_.sortBy(e,this.get("sortFunction")).reverse()}).property("sortedDataWithOther","sortFunction"),finishedData:Ember.computed.alias("sortedDataWithOther"),horizontalMargin:Ember.computed(function(){return this.get("labelPadding")+this.get("labelWidth")}).property("labelPadding","labelWidth"),marginBottom:Ember.computed(function(){return this.get("legendHeight")}).property("legendHeight"),marginTop:Ember.computed(function(){var e,t;return t=this.get("finishedData"),e=t.length,t.length>2&&t[e-3].percent+t[e-2].percent<15?this.get("marginBottom"):.3*this.get("marginBottom")}).property("marginBottom","finishedData"),numSlices:Ember.computed.alias("finishedData.length"),startOffset:Ember.computed(function(){var e,t;return e=this.get("finishedData"),t=e.reduce(function(e,t){return t.percent+e},0),_.last(e).percent/t*2*Math.PI}).property("finishedData"),radius:Ember.computed(function(){return d3.min([this.get("maxRadius"),this.get("width")/2,this.get("height")/2])}).property("maxRadius","width","height"),labelRadius:Ember.computed(function(){return this.get("radius")+this.get("labelPadding")}).property("radius","labelPadding"),getSliceColor:Ember.computed(function(){var e=this;return function(t,r){var a,i,n;return(null!=(n=t.data)?n.color:void 0)?t.data.color:(i=e.get("numSlices"),a=i-r-1,1!==i&&(a/=i-1),e.get("colorScale")(a))}}).property("numSlices","colorScale"),legendItems:Ember.computed(function(){return this.get("otherData").concat(this.get("rejectedData"))}).property("otherData","rejectedData"),hasLegend:Ember.computed(function(){return this.get("legendItems.length")>0}).property("legendItems.length"),showDetails:Ember.computed(function(){var e=this;return this.get("isInteractive")?function(t,r,a){var i,n,s;return d3.select(a).classed("hovered",!0),n=t.data,n._otherItems?e.get("viewport").select(".legend").classed("hovered",!0):(s=e.get("formatValue"),i=''+n.label+"",i+=''+e.get("tooltipValueDisplayName")+": ",i+=''+s(n.value)+"",e.showTooltip(i,d3.event))}:Ember.K}).property("isInteractive"),hideDetails:Ember.computed(function(){var e=this;return this.get("isInteractive")?function(t,r,a){var i;return d3.select(a).classed("hovered",!1),i=t.data,i._otherItems?e.get("viewport").select(".legend").classed("hovered",!1):e.hideTooltip()
}:Ember.K}).property("isInteractive"),transformViewport:Ember.computed(function(){var e,t;return e=this.get("marginLeft")+this.get("width")/2,t=this.get("marginTop")+this.get("height")/2,"translate("+e+","+t+")"}).property("marginLeft","marginTop","width","height"),arc:Ember.computed(function(){var e;return e=d3.svg.arc().outerRadius(this.get("radius")).innerRadius(0)}).property("radius"),pie:Ember.computed(function(){return d3.layout.pie().startAngle(this.get("startOffset")).endAngle(this.get("startOffset")+2*Math.PI).sort(null).value(function(e){return e.percent})}).property("startOffset"),groupAttrs:Ember.computed(function(){return{"class":function(e){return e.data._otherItems?"arc other-slice":"arc"}}}),sliceAttrs:Ember.computed(function(){return{d:this.get("arc"),fill:this.get("getSliceColor"),stroke:this.get("getSliceColor")}}).property("arc","getSliceColor"),labelAttrs:Ember.computed(function(){var e,t,r,a,i;return e=this.get("arc"),t=this.get("labelRadius"),r=0,a=0,this.get("numSlices")>1?{dy:".35em",style:null,"stroke-width":0,"text-anchor":function(e){var t;return t=.5*(e.endAngle-e.startAngle)+e.startAngle,Math.PI0&&0>u||0>r&&u>0,h=Math.abs(l-a)l?a-o:a+o),r=u,a=l,"translate("+u+","+l+")"}}:(i=this.get("mostTintedColor"),{dy:".71em","stroke-width":0,"text-anchor":"middle",transform:null,style:"fill:"+i+";"})}).property("arc","labelRadius","numSlices","mostTintedColor"),groups:Ember.computed(function(){var e;return e=this.get("pie")(this.get("finishedData")),this.get("viewport").selectAll(".arc").data(e)}).volatile(),renderVars:["radius","labelWidth","finishedData"],drawChart:function(){return this.updateData(),this.updateGraphic(),this.get("hasLegend")?this.drawLegend():this.clearLegend()},updateData:function(){var e,t,r,a;return t=this.get("groups"),a=this.get("showDetails"),r=this.get("hideDetails"),e=t.enter().append("g").attr({"class":"arc"}).on("mouseover",function(e,t){return a(e,t,this)}).on("mouseout",function(e,t){return r(e,t,this)}),e.append("path").attr("class","slice"),e.append("text").attr("class","data"),t.exit().remove()},updateGraphic:function(){var e,t,r;return e=this.get("groups").attr(this.get("groupAttrs")),e.select("path").attr(this.get("sliceAttrs")),r=this.get("labelWidth"),t=Ember.Charts.Helpers.LabelTrimmer.create({getLabelSize:function(){return r},getLabelText:function(e){return e.data.label}}),e.select("text.data").text(function(e){return e.data.label}).attr(this.get("labelAttrs")).call(t.get("trim")).text(function(e){return""+this.textContent+", "+e.data.percent+"%"})}}),Ember.Handlebars.helper("pie-chart",Ember.Charts.PieComponent)}(),function(){Ember.Charts.VerticalBarComponent=Ember.Charts.ChartComponent.extend(Ember.Charts.Legend,Ember.Charts.FloatingTooltipMixin,Ember.Charts.AxesMixin,{classNames:["chart-vertical-bar"],formatValue:d3.format(".2s"),formatValueLong:d3.format(",.r"),ungroupedSeriesName:"Other",stackBars:!1,withinGroupPadding:0,betweenGroupPadding:Ember.computed(function(){var e;return(e=d3.scale.linear().domain([1,8]).range([1.25,.25]).clamp(!0))(this.get("numBars"))}).property("numBars"),numBars:Ember.computed(function(){return this.get("xBetweenGroupDomain.length")*this.get("xWithinGroupDomain.length")||0}).property("xBetweenGroupDomain","xWithinGroupDomain"),maxLabelHeight:50,groupedData:Ember.computed(function(){var e,t=this;return e=this.get("data"),Ember.isEmpty(e)?[]:Ember.Charts.Helpers.groupBy(e,function(e){var r;return null!=(r=e.group)?r:t.get("ungroupedSeriesName")})}).property("data.@each","ungroupedSeriesName"),groupNames:Ember.computed(function(){var e,t,r,a;r=this.get("groupedData"),a=[];for(e in r)t=r[e],a.push(e);return a}).property("groupedData"),isGrouped:Ember.computed(function(){return this.get("groupNames.length")>1}).property("groupNames.length"),finishedData:Ember.computed(function(){var e,t,r,a,i,n,s,o,u,l,h;if(this.get("isGrouped")){if(Ember.isEmpty(this.get("groupedData")))return[];o=this.get("groupedData"),l=[];for(t in o)a=o[t],i=0,r=function(){var t,r,n;for(n=[],t=0,r=a.length;r>t;t++)e=a[t],n.push({y0:i,y1:i+=Math.max(e.value,0),value:e.value,group:e.group,label:e.label,color:e.color});return n}(),l.push({group:t,values:a,stackedValues:r,totalValue:i});return l}if(this.get("stackBars"))return Ember.isEmpty(this.get("data"))?[]:(i=0,r=function(){var t,r,a,n;for(a=this.get("data"),n=[],t=0,r=a.length;r>t;t++)e=a[t],n.push({y0:i,y1:i+=Math.max(e.value,0)});return n}.call(this),[{group:this.get("data.firstObject.group"),values:this.get("data"),stackedValues:r,totalValue:i}]);if(Ember.isEmpty(this.get("data")))return[];for(u=this.get("data"),h=[],n=0,s=u.length;s>n;n++)e=u[n],h.push({group:e.label,values:[e]});return h}).property("groupedData","isGrouped","stackBars"),labelHeightOffset:Ember.computed(function(){var e;return e=this.get(this.get("_shouldRotateLabels")?"maxLabelHeight":"labelHeight"),e+this.get("labelPadding")}).property("_shouldRotateLabels","maxLabelHeight","labelHeight","labelPadding"),legendChartPadding:Ember.computed.alias("labelHeightOffset"),graphicLeft:Ember.computed.alias("labelWidthOffset"),graphicWidth:Ember.computed(function(){return this.get("width")-this.get("labelWidthOffset")}).property("width","labelWidthOffset"),graphicHeight:Ember.computed(function(){return this.get("height")-this.get("legendHeight")-this.get("legendChartPadding")}).property("height","legendHeight","legendChartPadding"),yDomain:Ember.computed(function(){var e,t,r,a,i,n,s;return e=this.get("finishedData"),n=d3.min(e,function(e){return _.min(e.values.map(function(e){return e.value}))}),r=d3.max(e,function(e){return _.max(e.values.map(function(e){return e.value}))}),a=d3.max(e,function(e){return e.totalValue}),s=d3.min(e,function(){return 0}),this.get("stackBars")?(i=s,t=a):(i=n,t=r),i>0?[0,t]:0>t?[i,0]:i===t&&0===t?[0,1]:[i,t]}).property("finishedData","stackBars"),yScale:Ember.computed(function(){return d3.scale.linear().domain(this.get("yDomain")).range([this.get("graphicTop")+this.get("graphicHeight"),this.get("graphicTop")]).nice(this.get("numYTicks"))}).property("graphicTop","graphicHeight","yDomain","numYTicks"),individualBarLabels:Ember.computed(function(){var e;return e=_.values(this.get("groupedData")).map(function(e){return _.pluck(e,"label")}),_.uniq(_.flatten(e))}).property("groupedData.@each"),xBetweenGroupDomain:Ember.computed.alias("groupNames"),xWithinGroupDomain:Ember.computed.alias("individualBarLabels"),groupWidth:Ember.computed(function(){return this.get("xBetweenGroupScale").rangeBand()}).property("xBetweenGroupScale"),barWidth:Ember.computed(function(){return this.get("xWithinGroupScale").rangeBand()}).property("xWithinGroupScale"),xWithinGroupScale:Ember.computed(function(){return this.get("isGrouped")||this.get("stackBars")?d3.scale.ordinal().domain(this.get("xWithinGroupDomain")).rangeRoundBands([0,this.get("groupWidth")],this.get("withinGroupPadding")/2,0):d3.scale.ordinal().domain(this.get("xWithinGroupDomain")).rangeRoundBands([0,this.get("groupWidth")],this.get("betweenGroupPadding")/2,this.get("betweenGroupPadding")/2)}).property("isGrouped","stackBars","xWithinGroupDomain","groupWidth","withinGroupPadding","betweenGroupPadding"),xBetweenGroupScale:Ember.computed(function(){var e,t;return t=this.get("labelWidth"),e=this.get("isGrouped")||this.get("stackBars")?this.get("betweenGroupPadding"):0,d3.scale.ordinal().domain(this.get("xBetweenGroupDomain")).rangeRoundBands([0,this.get("graphicWidth")],e/2,e/2)}).property("isGrouped","stackBars","graphicWidth","labelWidth","xBetweenGroupDomain","betweenGroupPadding"),numColorSeries:Ember.computed.alias("individualBarLabels.length"),hasLegend:Ember.computed(function(){return this.get("stackBars")||this.get("isGrouped")&&this.get("legendItems.length")>1}).property("stackBars","isGrouped","legendItems.length"),legendItems:Ember.computed(function(){var e;return e=this.get("getSeriesColor"),this.get("individualBarLabels").map(function(t,r){var a;return a=e(t,r),{label:t,fill:a,stroke:a,icon:function(){return"square"},selector:".grouping-"+r}})}).property("individualBarLabels","getSeriesColor"),showDetails:Ember.computed(function(){var e=this;return this.get("isInteractive")?function(t,r,a){var i,n,s,o;return o=Ember.isArray(t.values),a=o?a.parentNode.parentNode:a,d3.select(a).classed("hovered",!0),n=''+t.group+"",s=e.get("formatValue"),i=function(e){return n+=''+e.label+": ",n+=''+s(e.value)+"
"},o?t.values.forEach(i):i(t),e.showTooltip(n,d3.event)}:Ember.K}).property("isInteractive"),hideDetails:Ember.computed(function(){var e=this;return this.get("isInteractive")?function(t,r,a){return Ember.isArray(t.values)&&(a=a.parentNode.parentNode),d3.select(a).classed("hovered",!1),e.hideTooltip()}:Ember.K}).property("isInteractive"),groupAttrs:Ember.computed(function(){var e,t=this;return e=this.get("xBetweenGroupScale"),{transform:function(r){var a,i;return a=t.get("graphicLeft")+e(r.group),i=t.get("graphicTop"),"translate("+a+", "+i+")"}}}).property("graphicLeft","graphicTop","xBetweenGroupScale"),stackedBarAttrs:Ember.computed(function(){var e,t,r=this;return t=1,e=this.get("yScale"),{"class":function(e,t){return"grouping-"+t},"stroke-width":0,width:function(){return r.get("groupWidth")},x:null,y:function(r){return e(r.y1)+t},height:function(t){return e(t.y0)-e(t.y1)}}}).property("yScale","groupWidth"),groupedBarAttrs:Ember.computed(function(){var e,t,r=this;return t=1,e=this.get("yScale"),{"class":function(e,t){return"grouping-"+t},"stroke-width":0,width:function(){return r.get("barWidth")},x:function(e){return r.get("xWithinGroupScale")(e.label)},height:function(r){return Math.max(0,Math.abs(e(r.value)-e(0))-t)},y:function(r){return r.value>0?e(r.value):e(0)+t}}}).property("yScale","getSeriesColor","barWidth","xWithinGroupScale"),labelAttrs:Ember.computed(function(){var e=this;return{"stroke-width":0,transform:function(t){var r,a;return r=e.get("barWidth")/2,r+=e.get("isGrouped")||e.get("stackBars")?e.get("groupWidth")/2-e.get("barWidth")/2:e.get("xWithinGroupScale")(t.group),a=e.get("graphicTop")+e.get("graphicHeight")+e.get("labelPadding"),"translate("+r+", "+a+")"}}}).property("barWidth","isGrouped","stackBars","groupWidth","xWithinGroupScale","graphicTop","graphicHeight","labelPadding"),groups:Ember.computed(function(){return this.get("viewport").selectAll(".bars").data(this.get("finishedData"))}).volatile(),yAxis:Ember.computed(function(){var e;return e=this.get("viewport").select(".y.axis"),e.empty()?this.get("viewport").insert("g",":first-child").attr("class","y axis"):e}).volatile(),maxLabelWidth:Ember.computed(function(){var e;return e=this.get(this.get("isGrouped")||this.get("stackBars")?"groupWidth":"barWidth")}).property("isGrouped","stackBars","groupWidth","barWidth"),_shouldRotateLabels:!1,setRotateLabels:function(){var e,t,r;return e=this.get("groups").select(".groupLabel text"),t=this.get("maxLabelWidth"),r=!1,this.get("rotatedLabelLength")>t&&e.each(function(){return this.getBBox().width>t?r=!0:void 0}),this.set("_shouldRotateLabels",r)},rotateLabelDegrees:Ember.computed(function(){var e,t;return t=Math.atan(this.get("labelHeight")/this.get("maxLabelWidth")),e=180*t/Math.PI,Math.max(e,20)}).property("labelHeight","maxLabelWidth"),rotatedLabelLength:Ember.computed(function(){var e;return e=Math.PI/180*this.get("rotateLabelDegrees"),Math.abs(this.get("maxLabelHeight")/Math.sin(e))}).property("maxLabelHeight","rotateLabelDegrees"),renderVars:["xWithinGroupScale","xBetweenGroupScale","yScale","finishedData","getSeriesColor"],drawChart:function(){return this.updateData(),this.updateLayout(),this.updateAxes(),this.updateGraphic(),this.get("hasLegend")?this.drawLegend():this.clearLegend()},updateData:function(){var e,t,r,a,i,n,s;return a=this.get("groups"),n=this.get("showDetails"),i=this.get("hideDetails"),t=a.enter().append("g").attr("class","bars"),t.append("g").attr("class","groupLabel").append("text").on("mouseover",function(e,t){return n(e,t,this)}).on("mouseout",function(e,t){return i(e,t,this)}),r=a.exit().remove(),s=this.get("stackBars")?function(e){return e.stackedValues}:function(e){return e.values},e=a.selectAll("rect").data(s),e.enter().append("rect").on("mouseover",function(e,t){return n(e,t,this)}).on("mouseout",function(e,t){return i(e,t,this)}),e.exit().remove()},updateLayout:function(){var e,t,r,a,i,n=this;return e=this.get("groups"),r=e.select(".groupLabel text").attr("transform",null).text(function(e){return e.group}),this.setRotateLabels(),this.get("_shouldRotateLabels")?(i=this.get("rotateLabelDegrees"),t=Ember.Charts.Helpers.LabelTrimmer.create({getLabelSize:function(){return n.get("rotatedLabelLength")},getLabelText:function(e){return e.group}}),r.call(t.get("trim")).attr({"text-anchor":"end",transform:"rotate("+-i+")",dy:function(){return this.getBBox().height}})):(a=this.get("maxLabelWidth"),t=Ember.Charts.Helpers.LabelTrimmer.create({getLabelSize:function(){return a},getLabelText:function(e){var t;return null!=(t=e.group)?t:""}}),r.call(t.get("trim")).attr({"text-anchor":"middle",dy:this.get("labelPadding")}))},updateAxes:function(){var e,t,r,a;return a=d3.svg.axis().scale(this.get("yScale")).orient("right").ticks(this.get("numYTicks")).tickSize(this.get("graphicWidth")).tickFormat(this.get("formatValue")),r=this.get("graphicTop"),t=this.get("graphicLeft"),e=this.get("yAxis").attr({transform:"translate("+t+","+r+")"}).call(a),e.selectAll("g").filter(function(e){return 0!==e}).classed("major",!1).classed("minor",!0),e.selectAll("text").style("text-anchor","end").attr({x:-this.get("labelPadding")})},updateGraphic:function(){var e,t,r;return t=this.get("groups"),e=this.get(this.get("stackBars")?"stackedBarAttrs":"groupedBarAttrs"),t.attr(this.get("groupAttrs")),t.selectAll("rect").style("fill",this.get("getSeriesColor")).attr(e),r=t.select("g.groupLabel").attr(this.get("labelAttrs"))}}),Ember.Handlebars.helper("vertical-bar-chart",Ember.Charts.VerticalBarComponent)}(),function(){Ember.Charts.ScatterComponent=Ember.Charts.ChartComponent.extend(Ember.Charts.Legend,Ember.Charts.FloatingTooltipMixin,Ember.Charts.AxesMixin,{classNames:["chart-scatter"],formatXValue:d3.format(".2s"),formatYValue:d3.format(".2s"),formatXValueLong:d3.format(",.r"),formatYValueLong:d3.format(",.r"),dotRadius:7,dotShapeArea:Ember.computed(function(){return Math.pow(this.get("dotRadius"),2)}).property("dotRadius"),graphPadding:.05,tickSpacing:80,isShowingTotal:!1,totalPointData:null,filteredData:Ember.computed(function(){var e;return e=this.get("data"),Ember.isEmpty(e)?[]:e.filter(function(e){return null!=e.xValue&&null!=e.yValue&&isFinite(e.xValue)&&isFinite(e.yValue)})}).property("data.@each"),groupedData:Ember.computed(function(){var e,t,r,a,i,n=this;if(e=this.get("filteredData"),Ember.isEmpty(e))return[];t=Ember.Charts.Helpers.groupBy(e,function(e){var t;return null!=(t=e.group)?t:n.get("ungroupedSeriesName")}),i=[];for(r in t)a=t[r],i.push(a);return i}).property("filteredData.@each"),groupNames:Ember.computed(function(){var e,t,r,a,i;for(a=this.get("groupedData"),i=[],t=0,r=a.length;r>t;t++)e=a[t],i.push(e.get(0).group);return i}).property("groupedData"),numGroups:Ember.computed.alias("groupedData.length"),isGrouped:Ember.computed(function(){return this.get("numGroups")>1}).property("numGroups"),finishedData:Ember.computed.alias("groupedData"),axisTitleHeightOffset:Ember.computed(function(){return this.get("axisTitleHeight")+this.get("labelPadding")}).property("axisTitleHeight","labelPadding"),legendChartPadding:Ember.computed(function(){return this.get("axisTitleHeightOffset")+this.get("labelHeightOffset")}).property("labelHeightOffset","axisTitleHeightOffset"),graphicTop:Ember.computed.alias("axisTitleHeight"),graphicLeft:Ember.computed.alias("labelWidthOffset"),graphicHeight:Ember.computed(function(){return this.get("height")-this.get("legendHeight")-this.get("legendChartPadding")}).property("height","legendHeight","legendChartPadding"),graphicWidth:Ember.computed(function(){return this.get("width")-this.get("labelWidthOffset")}).property("width","labelWidthOffset"),axisTitleHeight:18,xDomain:Ember.computed(function(){var e,t,r,a;return e=this.get("isShowingTotal")?[this.get("totalPointData")]:[],a=d3.extent(e.concat(this.get("filteredData")),function(e){return e.xValue}),r=a[0],t=a[1],r===t&&0===t?[-1,1]:r===t?[r*(1-this.get("graphPadding")),r*(1+this.get("graphPadding"))]:[r,t]}).property("filteredData.@each","isShowingTotal","totalPointData"),yDomain:Ember.computed(function(){var e,t,r,a;return e=this.get("isShowingTotal")?[this.get("totalPointData")]:[],a=d3.extent(e.concat(this.get("filteredData")),function(e){return e.yValue}),r=a[0],t=a[1],r===t&&0===t?[-1,1]:r===t?[r*(1-this.get("graphPadding")),r*(1+this.get("graphPadding"))]:[r,t]}).property("filteredData.@each","isShowingTotal","totalPointData","graphPadding"),xScale:Ember.computed(function(){var e,t,r,a;return a=this.get("xDomain"),e=this.get("graphicLeft"),t=this.get("graphicWidth"),r=(a[1]-a[0])*this.get("graphPadding"),d3.scale.linear().domain([a[0]-r,a[1]+r]).range([e,e+t]).nice(this.get("numXTicks"))}).property("xDomain","graphPadding","graphicLeft","graphicWidth","numXTicks"),yScale:Ember.computed(function(){var e,t,r,a;return a=this.get("yDomain"),t=this.get("graphicTop"),e=this.get("graphicHeight"),r=(a[1]-a[0])*this.get("graphPadding"),d3.scale.linear().domain([a[0]-r,a[1]+r]).range([t+e,t]).nice(this.get("numYTicks"))}).property("yDomain","graphPadding","graphicTop","graphicHeight","numYTicks"),groupShapes:Ember.computed(function(){return["circle","square","triangle-up","cross","diamond"]}),numGroupShapes:Ember.computed.alias("groupShapes.length"),numGroupColors:2,maxNumGroups:Ember.computed(function(){return this.get("numGroupColors")*this.get("numGroupShapes")}).property("numGroupColors","numGroupShapes"),displayGroups:Ember.computed(function(){return this.get("isGrouped")&&this.get("numGroups")<=this.get("maxNumGroups")}).property("isGrouped","numGroups","numGroupShapes"),getGroupShape:Ember.computed(function(){var e=this;return function(t,r){return r=e.get("groupNames").indexOf(t.group),e.get("displayGroups")?e.get("groupShapes")[r%e.get("numGroupShapes")]:"circle"}}),getGroupColor:Ember.computed(function(){var e=this;return function(t,r){var a;return a=0,e.get("displayGroups")&&(r=e.get("groupNames").indexOf(t.group),a=Math.floor(r/e.get("numGroupShapes"))),e.get("colorScale")(a/e.get("numGroupColors"))}}),hasLegend:Ember.computed.alias("isGrouped"),legendIconRadius:Ember.computed.alias("dotRadius"),legendItems:Ember.computed(function(){var e,t,r,a,i;return this.get("hasNoData")?[]:(r=this.get("getGroupShape"),t=this.get("getGroupColor"),e=this.get("displayGroups"),a=this.get("groupedData").map(function(a,i){var n,s;return n=a.get(0).group,s=1===a.get("length")?a.get(0):null,{label:n,group:n,stroke:t,fill:e?t:"transparent",icon:r,selector:".group-"+i,xValue:null!=s?s.xValue:void 0,yValue:null!=s?s.yValue:void 0}}),this.get("isShowingTotal")&&(i=this.get("totalPointData"),a.unshift({label:i.group,group:i.group,stroke:t,selector:".totalgroup",xValue:i.xValue,yValue:i.yValue})),a)}).property("hasNoData","groupedData","getGroupShape","getGroupColor","displayGroups","isShowingTotal","totalPointData"),xValueDisplayName:"X Factor",yValueDisplayName:"Y Factor",showDetails:Ember.computed(function(){var e=this;return this.get("isInteractive")?function(t,r,a){var i,n,s;return d3.select(a).classed("hovered",!0),n=e.get("formatXValue"),s=e.get("formatYValue"),i=''+t.group+"",i+=''+e.get("xValueDisplayName")+": ",i+=''+n(t.xValue)+"
",i+=''+e.get("yValueDisplayName")+": ",i+=''+s(t.yValue)+"",e.showTooltip(i,d3.event)}:Ember.K}).property("isInteractive"),hideDetails:Ember.computed(function(){var e=this;return this.get("isInteractive")?function(t,r,a){return d3.select(a).classed("hovered",!1),e.hideTooltip()}:Ember.K}).property("isInteractive"),groupAttrs:Ember.computed(function(){return{"class":function(e,t){return"group group-"+t}}}),pointAttrs:Ember.computed(function(){var e=this;return{d:d3.svg.symbol().size(this.get("dotShapeArea")).type(this.get("getGroupShape")),fill:this.get("displayGroups")?this.get("getGroupColor"):"transparent",stroke:this.get("getGroupColor"),"stroke-width":1.5,transform:function(t){var r,a;return r=e.get("xScale")(t.xValue),a=e.get("yScale")(t.yValue),"translate("+r+", "+a+")"}}}).property("dotShapeArea","getGroupShape","xScale","yScale","displayGroups","getGroupColor"),groups:Ember.computed(function(){return this.get("viewport").selectAll(".group").data(this.get("finishedData"))}).volatile(),selectOrCreateAxis:function(e){var t;return t=this.get("viewport").select(e),t.empty()?this.get("viewport").insert("g",":first-child"):t},selectOrCreateAxisTitle:function(e){var t;return t=this.get("viewport").select(e),t.empty()?this.get("viewport").append("text"):t},xAxis:Ember.computed(function(){return this.selectOrCreateAxis(".x.axis").attr("class","x axis")}).volatile(),yAxis:Ember.computed(function(){return this.selectOrCreateAxis(".y.axis").attr("class","y axis")}).volatile(),xAxisTitle:Ember.computed(function(){return this.selectOrCreateAxisTitle(".x.axis-title").attr("class","x axis-title")}).volatile(),yAxisTitle:Ember.computed(function(){return this.selectOrCreateAxisTitle(".y.axis-title").attr("class","y axis-title")}).volatile(),renderVars:["xScale","yScale","dotShapeArea","finishedData","xValueDisplayName","yValueDisplayName"],drawChart:function(){return this.updateTotalPointData(),this.updateData(),this.updateAxes(),this.updateGraphic(),this.get("hasLegend")?this.drawLegend():this.clearLegend()},totalPointShape:Ember.computed(function(){var e,t=this;return e=this.get("dotShapeArea"),function(r){return r.append("path").attr({"class":"totaldot",d:d3.svg.symbol().size(e).type("circle"),fill:t.get("getGroupColor")}),r.append("path").attr({"class":"totaloutline",d:d3.svg.symbol().size(3*e).type("circle"),fill:"transparent",stroke:t.get("getGroupColor"),"stroke-width":2})}}),updateTotalPointData:function(){var e,t;return e=this.get("isShowingTotal")?[this.get("totalPointData")]:[],t=this.get("viewport").selectAll(".totalgroup").data(e),t.exit().remove(),t.enter().append("g").attr("class","totalgroup").call(this.get("totalPointShape"))},updateData:function(){var e,t;return e=this.get("groups"),e.enter().append("g").attr("class","group").attr(this.get("groupAttrs")),e.exit().remove(),t=e.selectAll(".dot").data(function(e){return e}),t.enter().append("path").attr("class","dot"),t.exit().remove()},updateAxes:function(){var e,t,r,a,i,n,s,o,u;return s=d3.svg.axis().scale(this.get("xScale")).orient("top").ticks(this.get("numXTicks")).tickSize(this.get("graphicHeight")).tickFormat(this.get("formatXValue")),u=d3.svg.axis().scale(this.get("yScale")).orient("right").ticks(this.get("numYTicks")).tickSize(this.get("graphicWidth")).tickFormat(this.get("formatYValue")),i=this.get("graphicTop"),r=this.get("graphicHeight"),e=this.get("xAxis").attr("transform","translate(0,"+(i+r)+")").call(s),e.selectAll("g").filter(function(e){return 0!==e}).classed("major",!1).classed("minor",!0),n=this.get("labelPadding"),e.selectAll("text").style("text-anchor","middle").attr({y:function(){return this.getBBox().height+n/2}}),a=this.get("graphicLeft"),t=this.get("yAxis").attr("transform","translate("+a+",0)").call(u),t.selectAll("g").filter(function(e){return 0!==e}).classed("major",!1).classed("minor",!0),t.selectAll("text").style("text-anchor","end").attr({x:-this.get("labelPadding")}),o=this.get("labelHeightOffset")+this.get("labelPadding"),this.get("xAxisTitle").text(this.get("xValueDisplayName")).style("text-anchor","middle").attr({x:this.get("graphicWidth")/2+this.get("labelWidthOffset"),y:this.get("graphicBottom")+o}),this.get("yAxisTitle").text(this.get("yValueDisplayName")).style("text-anchor","start").attr({y:0,x:-this.get("labelPadding")})},updateGraphic:function(){var e,t,r=this;return t=this.get("showDetails"),e=this.get("hideDetails"),this.get("groups").selectAll(".dot").attr(this.get("pointAttrs")).on("mouseover",function(e,r){return t(e,r,this)}).on("mouseout",function(t,r){return e(t,r,this)}),this.get("viewport").select(".totalgroup").on("mouseover",function(e,r){return t(e,r,this)}).on("mouseout",function(t,r){return e(t,r,this)}).attr({transform:function(e){var t,a;return t=r.get("xScale")(e.xValue),a=r.get("yScale")(e.yValue),"translate("+t+", "+a+")"}})}}),Ember.Handlebars.helper("scatter-chart",Ember.Charts.ScatterComponent)}(),function(){Ember.Charts.TimeSeriesComponent=Ember.Charts.ChartComponent.extend(Ember.Charts.Legend,Ember.Charts.TimeSeriesLabeler,Ember.Charts.FloatingTooltipMixin,Ember.Charts.HasTimeSeriesRule,Ember.Charts.AxesMixin,{classNames:["chart-time-series"],formatTime:d3.time.format("%Y-%m-%d"),formatTimeLong:d3.time.format("%a %b %-d, %Y"),formatValue:d3.format(".2s"),formatValueLong:d3.format(",.r"),ungroupedSeriesName:"Other",stackBars:!1,interpolate:!1,yAxisFromZero:!1,barPadding:0,barGroupPadding:.25,groupedLineData:Ember.computed(function(){var e,t,r,a,i,n=this;if(r=this.get("lineData"),Ember.isEmpty(r))return[];t=Ember.Charts.Helpers.groupBy(r,function(e){var t;return null!=(t=e.label)?t:n.get("ungroupedSeriesName")}),i=[];for(e in t)a=t[e],i.push({group:e,values:a});return i}).property("lineData.@each","ungroupedSeriesName"),groupedBarData:Ember.computed(function(){var e,t,r,a,i,n,s,o;return e=this.get("barData"),Ember.isEmpty(e)?[]:(r=Ember.Charts.Helpers.groupBy(e,function(e){return+e.time}),t=function(){var e,t=this;e=[];for(s in r)i=r[s],n=Ember.Charts.Helpers.groupBy(i,function(e){var r;return null!=(r=e.label)?r:t.get("ungroupedSeriesName")}),e.push(function(){var e;e=[];for(a in n)o=n[a],e.push({group:a,time:o[0].time,value:o[0].value,label:o[0].label});return e}());return e}.call(this))}).property("barData.@each","ungroupedSeriesName"),barGroups:Ember.computed(function(){var e,t,r,a,i,n=this;if(e=this.get("barData"),Ember.isEmpty(e))return[];t=Ember.Charts.Helpers.groupBy(e,function(e){var t;return null!=(t=e.label)?t:n.get("ungroupedSeriesName")}),i=[];for(r in t)a=t[r],i.push(r);return i}).property("barData.@each","ungroupedSeriesName"),stackedBarData:Ember.computed(function(){var e,t,r,a,i,n,s,o,u,l,h,c,d,g,p;if(e=this.get("barData"),Ember.isEmpty(e))return[];for(r=Ember.Charts.Helpers.groupBy(e,function(e){return+e.time}),t=function(){var e,t=this;e=[];for(l in r)s=r[l],e.push(Ember.Charts.Helpers.groupBy(s,function(e){var r;return null!=(r=e.label)?r:t.get("ungroupedSeriesName")}));return e}.call(this),p=[],d=0,g=t.length;g>d;d++)i=t[d],c=0,o=function(){var e,t,r;r=[];for(n in i)a=i[n],u=null!=a&&null!=(e=a[0])?e.time:void 0,h=null!=a&&null!=(t=a[0])?t.value:void 0,r.push({group:n,x:u,y0:c,y1:c+=Math.max(h,0)});return r}(),p.push({stackedValues:o,totalValue:c});return p}).property("barData","ungroupedSeriesName"),finishedData:Ember.computed(function(){return{lineData:this.get("groupedLineData"),groupedBarData:this.get("groupedBarData"),stackedBarData:this.get("stackedBarData")}}).property("groupedLineData.@each.values","groupedBarData.@each","stackedBarData.@each"),hasNoData:Ember.computed(function(){return!(this.get("hasBarData")||this.get("hasLineData"))}).property("hasBarData","hasLineData"),hasLineData:Ember.computed(function(){return!Ember.isEmpty(this.get("lineData"))}).property("lineData"),hasBarData:Ember.computed(function(){return!Ember.isEmpty(this.get("barData"))}).property("barData"),legendChartPadding:Ember.computed.alias("labelHeightOffset"),graphicLeft:Ember.computed.alias("labelWidthOffset"),graphicWidth:Ember.computed(function(){return this.get("width")-this.get("labelWidthOffset")}).property("width","labelWidthOffset"),graphicHeight:Ember.computed(function(){return this.get("height")-this.get("legendHeight")-this.get("legendChartPadding")}).property("height","legendHeight","legendChartPadding"),timeDelta:Ember.computed(function(){var e,t,r,a;return r=this.get("groupedBarData"),Ember.isEmpty(r)||r.get("length")<2?"month":(a=r[0][0].time,t=r[1][0].time,e=(t-a)/864e5,e>351?"year":e>33?"quarter":e>9?"month":e>3?"week":"day")}).property("groupedBarData"),barDataExtent:Ember.computed(function(){var e,t,r,a,i,n,s,o;return o=this.get("timeDelta"),r=this.get("groupedBarData"),Ember.isEmpty(r)?[new Date,new Date]:(s=r[0],n=s[0].time,t=r[r.length-1],e=t[0].time,i="quarter"===o?+n/2+d3.time.month.offset(n,-3)/2:+n/2+d3.time[o].offset(n,-1)/2,a="quarter"===o?+e/2+d3.time.month.offset(e,3)/2:+e/2+d3.time[o].offset(e,1)/2,[new Date(i),new Date(a)])}).property("timeDelta","groupedBarData.@each"),individualBarLabels:Ember.computed.alias("barGroups"),xBetweenGroupDomain:Ember.computed.alias("barDataExtent"),xWithinGroupDomain:Ember.computed.alias("individualBarLabels"),barWidth:Ember.computed(function(){return this.get("xGroupScale").rangeBand()}).property("xGroupScale"),stackWidth:Ember.computed(function(){return this.get("paddedStackWidth")*(1-this.get("barGroupPadding"))}).property("paddedStackWidth","barGroupPadding"),paddedStackWidth:Ember.computed(function(){var e,t,r;return r=this.get("xGroupScale").rangeExtent(),t=r[0],e=r[1],e-t}).property("xGroupScale"),paddedGroupWidth:Ember.computed(function(){var e,t,r,a;return a=this.get("timeDelta"),e=this.get("xTimeScale"),t=this.get("xBetweenGroupDomain")[0],r="quarter"===a?d3.time.month.offset(t,3):d3.time[a].offset(t,1),e(r)-e(t)}).property("timeDelta","xTimeScale","xBetweenGroupDomain"),lineSeriesNames:Ember.computed(function(){var e;return e=this.get("groupedLineData"),Ember.isEmpty(e)?[]:e.map(function(e){return e.group})}).property("groupedLineData"),lineDataExtent:Ember.computed(function(){var e,t;return e=this.get("groupedLineData"),Ember.isEmpty(e)?[new Date,new Date]:(t=e.getEach("values").map(function(e){return d3.extent(e.map(function(e){return e.time}))}),[d3.min(t,function(e){return e[0]}),d3.max(t,function(e){return e[1]})])}).property("groupedLineData.@each.values"),xBetweenSeriesDomain:Ember.computed.alias("lineSeriesNames"),xWithinSeriesDomain:Ember.computed.alias("lineDataExtent"),maxNumberOfLabels:Ember.computed.alias("numXTicks"),xDomain:Ember.computed(function(){var e,t,r,a,i,n;return this.get("hasBarData")?this.get("hasLineData")?(i=this.get("xBetweenGroupDomain"),r=i[0],e=i[1],n=this.get("xWithinSeriesDomain"),a=n[0],t=n[1],[Math.min(r,a),Math.max(e,t)]):this.get("xBetweenGroupDomain"):this.get("xWithinSeriesDomain")}).property("xBetweenGroupDomain","xWithinSeriesDomain","hasBarData","hasLineData"),yDomain:Ember.computed(function(){var e,t,r,a,i,n,s,o,u,l,h,c,d,g;if(a=this.get("groupedLineData"),g=this.get("stackedBarData"),e=this.get("groupedBarData"),s=d3.max(a,function(e){return d3.max(e.values,function(e){return e.value})}),h=d3.min(a,function(e){return d3.min(e.values,function(e){return e.value})}),c=d3.min(g,function(e){return e.totalValue}),o=d3.max(g,function(e){return e.totalValue}),n=d3.max(e,function(e){return d3.max(e,function(e){return e.value})}),l=d3.min(e,function(e){return d3.min(e,function(e){return e.value})}),t=this.get("hasBarData"),r=this.get("hasLineData"),d=this.get("stackBars"),t?r?d?(u=Math.min(h,c),i=Math.max(s,o)):(u=Math.min(l,h),i=Math.max(n,s)):(u=d?c:l,i=d?o:n):(u=h,i=s),d||this.get("yAxisFromZero")||u===i){if(0>i)return[u,0];if(u>0)return[0,i];if(u===i&&0===i)return[-1,1]}return[u,i]}).property("groupedLineData","stackedBarData","groupedBarData","hasBarData","hasLineData","stackBars","yAxisFromZero"),yRange:Ember.computed(function(){return[this.get("graphicTop")+this.get("graphicHeight"),this.get("graphicTop")]}).property("graphicTop","graphicHeight"),yScale:Ember.computed(function(){return d3.scale.linear().domain(this.get("yDomain")).range(this.get("yRange")).nice(this.get("numYTicks"))
}).property("yDomain","yRange","numYTicks"),xRange:Ember.computed(function(){return[this.get("graphicLeft"),this.get("graphicLeft")+this.get("graphicWidth")]}).property("graphicLeft","graphicWidth"),xTimeScale:Ember.computed(function(){var e;return e=this.get("xDomain"),d3.time.scale().domain(this.get("xDomain")).range(this.get("xRange"))}).property("xDomain","xRange"),xGroupScale:Ember.computed(function(){return d3.scale.ordinal().domain(this.get("xWithinGroupDomain")).rangeRoundBands([0,this.get("paddedGroupWidth")],this.get("barPadding")/2,this.get("barGroupPadding")/2)}).property("xWithinGroupDomain","paddedGroupWidth","barPadding","barGroupPadding"),showDetails:Ember.computed(function(){var e=this;return this.get("isInteractive")?function(t,r,a){var i,n,s;return d3.select(a).classed("hovered",!0),n=''+e.get("formatTime")(t.time)+"",s=e.get("formatValue"),i=function(e){return n+=''+e.group+": ",n+=''+s(e.value)+"
"},Ember.isArray(t.values)?t.values.forEach(i):i(t),e.showTooltip(n,d3.event)}:Ember.K}).property("isInteractive"),hideDetails:Ember.computed(function(){var e=this;return this.get("isInteractive")?function(t,r,a){return d3.select(a).classed("hovered",!1),e.hideTooltip()}:Ember.K}).property("isInteractive"),zeroDisplacement:1,groupAttrs:Ember.computed(function(){var e=this;return{transform:function(){var t,r;return t=e.get("stackBars")?-e.get("stackWidth")/2:-e.get("paddedGroupWidth")/2,r=0,"translate("+t+","+r+")"}}}).property("stackBars","stackWidth","paddedGroupWidth"),stackedBarAttrs:Ember.computed(function(){var e,t,r=this;return e=this.get("xTimeScale"),t=this.get("yScale"),{"class":function(e,t){return"grouping-"+t},"stroke-width":0,width:this.get("stackWidth"),x:function(t){return e(t.x)},y:function(e){return t(e.y1)+r.get("zeroDisplacement")},height:function(e){return t(e.y0)-t(e.y1)}}}).property("xTimeScale","yScale","stackWidth","zeroDisplacement"),groupedBarAttrs:Ember.computed(function(){var e,t,r,a;return t=this.get("xTimeScale"),e=this.get("xGroupScale"),r=this.get("yScale"),a=this.get("zeroDisplacement"),{"class":function(e,t){return"grouping-"+t},"stroke-width":0,width:this.get("barWidth"),x:function(r){return e(r.label)+t(r.time)},y:function(e){return e.value>0?r(e.value):r(0)+a},height:function(e){var t;return t=Math.max(0,r.domain()[0]),Math.max(0,e.value>t?Math.abs(r(t)-r(e.value))-a:Math.abs(r(e.value)-r(t))-a)}}}).property("xTimeScale","xGroupScale","barWidth","yScale","zeroDisplacement"),line:Ember.computed(function(){var e=this;return d3.svg.line().x(function(t){return e.get("xTimeScale")(t.time)}).y(function(t){return e.get("yScale")(t.value)}).interpolate(this.get("interpolate")?"basis":"linear")}).property("xTimeScale","yScale","interpolate"),getLineColor:Ember.computed(function(){var e=this;return function(t,r){var a;switch(a=e.get("getSeriesColor"),r){case 0:return a(t,0);case 1:return a(t,2);case 2:return a(t,0);case 3:return a(t,2);case 4:return a(t,0);case 5:return a(t,1);default:return a(t,r)}}}),lineAttrs:Ember.computed(function(){var e,t;return e=this.get("getSeriesColor"),t=this.get("line"),{"class":function(e,t){return"line series-"+t},d:function(e){return t(e.values)},stroke:this.get("getLineColor"),"stroke-width":function(e,t){switch(t){case 0:return 2;case 1:return 1.5;case 2:return 2;case 3:return 1.5;case 4:return 2.5;case 5:return 2.5;default:return 2}},"stroke-dasharray":function(e,t){switch(t){case 2:case 3:case 5:return"2,2";default:return""}}}}).property("line","getSeriesColor"),numLines:Ember.computed.alias("xBetweenSeriesDomain.length"),numBarsPerGroup:Ember.computed.alias("xWithinGroupDomain.length"),numColorSeries:6,numSecondaryColorSeries:Ember.computed.alias("numBarsPerGroup"),secondaryMinimumTint:Ember.computed(function(){return 0===this.get("numLines")?0:.4}).property("numLines"),secondaryMaximumTint:Ember.computed(function(){return 0===this.get("numLines")?.8:.85}).property("numLines"),hasLegend:Ember.computed(function(){return this.get("legendItems.length")>1}).property("legendItems.length"),legendItems:Ember.computed(function(){var e,t,r=this;return e=this.get("getSeriesColor"),t=this.get("lineAttrs"),this.get("xBetweenSeriesDomain").map(function(e,r){return{label:e,stroke:t.stroke(e,r),width:t["stroke-width"](e,r),dotted:t["stroke-dasharray"](e,r),icon:function(){return"line"},selector:".series-"+r}}).concat(this.get("xWithinGroupDomain").map(function(e,t){var a;return a=r.get("getSecondarySeriesColor")(e,t),{stroke:a,fill:a,label:e,icon:function(){return"square"},selector:".grouping-"+t}}))}).property("xBetweenSeriesDomain","xWithinGroupDomain","getSeriesColor","getSecondarySeriesColor"),removeAllGroups:function(){return this.get("viewport").selectAll(".bars").remove()},groups:Ember.computed(function(){var e;return e=this.get(this.get("stackBars")?"stackedBarData":"groupedBarData"),this.get("viewport").selectAll(".bars").data(e)}).volatile(),removeAllSeries:function(){return this.get("viewport").selectAll(".series").remove()},series:Ember.computed(function(){return this.get("viewport").selectAll(".series").data(this.get("groupedLineData"))}).volatile(),xAxis:Ember.computed(function(){var e;return e=this.get("viewport").select(".x.axis"),e.empty()?this.get("viewport").insert("g",":first-child").attr("class","x axis"):e}).volatile(),yAxis:Ember.computed(function(){var e;return e=this.get("viewport").select(".y.axis"),e.empty()?this.get("viewport").insert("g",":first-child").attr("class","y axis"):e}).volatile(),renderVars:["getLabelledTicks","xGroupScale","xTimeScale","yScale"],drawChart:function(){return this.updateRule(),this.updateBarData(),this.updateLineData(),this.updateLineMarkers(),this.updateAxes(),this.updateBarGraphic(),this.updateLineGraphic(),this.get("hasLegend")?this.drawLegend():this.clearLegend()},updateAxes:function(){var e,t,r,a,i,n,s;return n=d3.svg.axis().scale(this.get("xTimeScale")).orient("bottom").ticks(this.get("getLabelledTicks")).tickSubdivide(this.get("numberOfMinorTicks")).tickFormat(this.get("formattedTime")).tickSize(6,3,0),s=d3.svg.axis().scale(this.get("yScale")).orient("right").ticks(this.get("numYTicks")).tickSize(this.get("graphicWidth")).tickFormat(this.get("formatValue")),i=this.get("graphicTop"),r=this.get("graphicHeight"),e=this.get("xAxis").attr({transform:"translate(0,"+(i+r)+")"}).call(n),a=this.get("graphicLeft"),t=this.get("yAxis").attr("transform","translate("+a+",0)").call(s),t.selectAll("g").filter(function(e){return e}).classed("major",!1).classed("minor",!0),t.selectAll("text").style("text-anchor","end").attr({x:-this.get("labelPadding")})},updateBarData:function(){var e,t,r,a,i;return this.removeAllGroups(),t=this.get("groups"),a=this.get("showDetails"),r=this.get("hideDetails"),t.enter().insert("g",".series").attr("class","bars"),t.exit().remove(),i=this.get("stackBars")?function(e){return e.stackedValues}:function(e){return e},e=t.selectAll("rect").data(i),e.enter().append("rect").on("mouseover",function(e,t){return a(e,t,this)}).on("mouseout",function(e,t){return r(e,t,this)}),e.exit().remove()},updateBarGraphic:function(){var e,t;return e=this.get(this.get("stackBars")?"stackedBarAttrs":"groupedBarAttrs"),t=this.get("groups"),t.attr(this.get("groupAttrs")),t.selectAll("rect").style("fill",this.get("getSecondarySeriesColor")).attr(e)},updateLineData:function(){var e;return this.removeAllSeries(),e=this.get("series"),e.enter().append("g").attr("class","series").append("path").attr("class","line"),e.exit().remove()},updateLineGraphic:function(){var e,t;return t=this.get("series"),e=this.get("graphicTop"),t.attr("transform","translate(0, "+e+")"),t.select("path.line").attr(this.get("lineAttrs"))}}),Ember.Handlebars.helper("time-series-chart",Ember.Charts.TimeSeriesComponent)}(),function(){Ember.Charts.BubbleComponent=Ember.Charts.ChartComponent.extend(Ember.Charts.FloatingTooltipMixin,{classNames:["chart-bubble"],layoutGravity:-.01,damper:.1,charge:Ember.computed(function(){return function(e){return-Math.pow(e.radius,2)/8}}),formatValue:d3.format(".2s"),formatValueLong:d3.format(",.r"),showDetails:Ember.computed(function(){var e=this;return this.get("isInteractive")?function(t,r,a){var i,n;return d3.select(a).classed("hovered",!0),n=e.get("formatValue"),i=''+t.label+"",i+=''+e.get("tooltipValueDisplayName")+": ",i+=''+n(t.value)+"",e.showTooltip(i,d3.event)}:Ember.K}).property("isInteractive"),hideDetails:Ember.computed(function(){var e=this;return this.get("isInteractive")?function(t,r,a){return d3.select(a).classed("hovered",!1),e.hideTooltip()}:Ember.K}).property("isInteractive"),renderVars:["selectedSeedColor"],radiusScale:Ember.computed(function(){var e,t;return e=d3.max(this.data,function(e){return e.value}),t=d3.min([this.get("width"),this.get("height")])/7,d3.scale.pow().exponent(.5).domain([0,e]).range([2,t])}).property("data","width","height"),nodeData:Ember.computed(function(){var e,t,r,a=this;return e=this.get("data"),Ember.isEmpty(e)?[]:(r=this.get("radiusScale"),t=e.map(function(e){return{radius:r(e.value),value:e.value,label:e.label,id:e.label,x:Math.random()*a.get("width")/2,y:Math.random()*a.get("height")/2}}),t.sort(function(e,t){return t.value-e.value}),t)}).property("radiusScale"),finishedData:Ember.computed.alias("nodeData"),numColorSeries:Ember.computed.alias("finishedData.length"),drawChart:function(){return this.updateVis()},updateVis:function(){var e,t,r,a,i,n,s,o,u=this;return o=this.get("viewport"),n=this.get("nodeData"),s=this.get("showDetails"),a=this.get("hideDetails"),t=this.get("getSeriesColor"),e=o.selectAll("circle").data(n,function(e){return e.id}),e.enter().append("circle").attr("r",0).attr("id",function(e){return"bubble_"+e.id}).on("mouseover",function(e,t){return s(e,t,this)}).on("mouseout",function(e,t){return a(e,t,this)}),e.transition().duration(2e3).attr("r",function(e){return e.radius}),e.attr("fill",t).attr("stroke-width",2).attr("stroke",function(e,r){return d3.rgb(t(e,r)).darker()}),e.exit().remove(),i=function(e){var t;return t={x:u.get("width")/2,y:u.get("height")/2},function(r){return r.x=r.x+(t.x-r.x)*(u.get("damper")+.02)*e,r.y=r.y+(t.y-r.y)*(u.get("damper")+.02)*e}},r=d3.layout.force().nodes(n).size([this.get("width"),this.get("height")]),r.gravity(this.get("layoutGravity")).charge(this.get("charge")).friction(.9).on("tick",function(t){return e.each(i(t.alpha)).attr("cx",function(e){return e.x}).attr("cy",function(e){return e.y})}),r.start(),o.selectAll(".years").remove()}}),Ember.Handlebars.helper("bubble-chart",Ember.Charts.BubbleComponent)}();