1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};t.SENTRY_RELEASE={id:"qs3-webapp@61baa86f"};var n=(new t.Error).stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="ac5f027d-897c-4234-ba88-29eb06197453",t._sentryDebugIdIdentifier="sentry-dbid-ac5f027d-897c-4234-ba88-29eb06197453")}catch(t){}}(),(globalThis.webpackChunkqs3_webapp=globalThis.webpackChunkqs3_webapp||[]).push([[4773],{4773(t,n,e){e(5724),t.exports="nvd3"},5724(t,n,e){!function(t){"use strict";var n=t.nv;n=e(49956),angular.module("nvd3",[]).directive("nvd3",["nvd3Utils",function(t){return{restrict:"AE",scope:{data:"=",options:"=",api:"=?",events:"=?",config:"=?",onReady:"&?"},link:function(e,r,i){var o={extended:!1,visible:!0,disabled:!1,refreshDataOnly:!0,deepWatchOptions:!0,deepWatchData:!0,deepWatchDataDepth:2,debounce:10,debounceImmediate:!0};function a(t,n,r){t&&n&&angular.forEach(t,function(i,o){"_"===o[0]||("dispatch"===o?(void 0!==n[o]&&null!==n[o]||e._config.extended&&(n[o]={}),u(i,n[o])):"tooltip"===o?(void 0!==n[o]&&null!==n[o]||e._config.extended&&(n[o]={}),a(t[o],n[o],r)):"contentGenerator"===o?n[o]&&t[o](n[o]):-1===["axis","clearHighlights","defined","highlightPoint","nvPointerEventsClass","options","rangeBand","rangeBands","scatter","open","close","node"].indexOf(o)&&(void 0===n[o]||null===n[o]?e._config.extended&&(n[o]=i()):t[o](n[o])))})}function u(t,n){t&&n&&angular.forEach(t,function(r,i){void 0===n[i]||null===n[i]?e._config.extended&&(n[i]=r.on):t.on(i+"._",n[i])})}function l(n){var i=t.deepExtend(function(t){switch(t){case"title":return{enable:!1,text:"Write Your Title",className:"h4",css:{width:e.options.chart.width+"px",textAlign:"center"}};case"subtitle":return{enable:!1,text:"Write Your Subtitle",css:{width:e.options.chart.width+"px",textAlign:"center"}};case"caption":return{enable:!1,text:"Figure 1. Write Your Caption text.",css:{width:e.options.chart.width+"px",textAlign:"center"}}}}(n),e.options[n]||{});e._config.extended&&(e.options[n]=i);var o=angular.element("<div></div>").html(i.html||"").addClass(n).addClass(i.className).removeAttr("style").css(i.css);i.html||o.text(i.text),i.enable&&("title"===n?r.prepend(o):"subtitle"===n?angular.element(r[0].querySelector(".title")).after(o):"caption"===n&&r.append(o))}function s(t,n){t!==n&&(e._config.disabled||(e._config.refreshDataOnly?e.api.update():e.api.refresh()))}
1e.isReady=!1,e._config=angular.extend(o,e.config),e.api={refresh:function(){e.api.updateWithOptions(),e.isReady=!0},refreshWithTimeout:function(t){setTimeout(function(){e.api.refresh()},t)},update:function(){e.chart&&e.svg?"sunburstChart"===e.options.chart.type?e.svg.datum(angular.copy(e.data)).call(e.chart):e.svg.datum(e.data).call(e.chart):e.api.refresh()},updateWithTimeout:function(t){setTimeout(function(){e.api.update()},t)},updateWithOptions:function(i){if(arguments.length){if(e.options=i,e._config.deepWatchOptions&&!e._config.disabled)return}else i=e.options;e.api.clearElement(),!1!==angular.isDefined(i)&&e._config.visible&&(e.chart=n.models[i.chart.type](),e.chart.id=Math.random().toString(36).substr(2,15),angular.forEach(e.chart,function(t,n){"_"===n[0]||["clearHighlights","highlightPoint","id","options","resizeHandler","state","open","close","tooltipContent"].indexOf(n)>=0||("dispatch"===n?(void 0!==i.chart[n]&&null!==i.chart[n]||e._config.extended&&(i.chart[n]={}),u(e.chart[n],i.chart[n])):["bars","bars1","bars2","boxplot","bullet","controls","discretebar","distX","distY","focus","interactiveLayer","legend","lines","lines1","lines2","multibar","pie","scatter","scatters1","scatters2","sparkline","stack1","stack2","sunburst","tooltip","x2Axis","xAxis","y1Axis","y2Axis","y3Axis","y4Axis","yAxis","yAxis1","yAxis2"].indexOf(n)>=0||"stacked"===n&&"stackedAreaChart"===i.chart.type?(void 0!==i.chart[n]&&null!==i.chart[n]||e._config.extended&&(i.chart[n]={}),a(e.chart[n],i.chart[n],i.chart.type)):"focusHeight"===n&&"lineChart"===i.chart.type||"focusHeight"===n&&"lineWithFocusChart"===i.chart.type||("xTickFormat"!==n&&"yTickFormat"!==n||"lineWithFocusChart"!==i.chart.type)&&("tooltips"===n&&"boxPlotChart"===i.chart.type||("tooltipXContent"!==n&&"tooltipYContent"!==n||"scatterChart"!==i.chart.type)&&("x"!==n&&"y"!==n||"forceDirectedGraph"!==i.chart.type)&&(void 0===i.chart[n]||null===i.chart[n]?e._config.extended&&(i.chart[n]="barColor"===n?t()():t()):e.chart[n](i.chart[n]))))}),e.api.updateWithData(),(i.title||e._config.extended)&&l("title"),(i.subtitle||e._config.extended)&&l("subtitle"),(i.caption||e._config.extended)&&l("caption"),(i.styles||e._config.extended)&&function(){var n=t.deepExtend({classes:{"with-3d-shadow":!0,"with-transitions":!0,gallery:!1},css:{}},e.options.styles||{});e._config.extended&&(e.options.styles=n);angular.forEach(n.classes,function(t,n){t?r.addClass(n):r.removeClass(n)}),r.removeAttr("style").css(n.css)}(),n.addGraph(function(){if(e.chart)return e.chart.resizeHandler&&e.chart.resizeHandler.clear(),e.chart.resizeHandler=n.utils.windowResize(function(){e.chart&&e.chart.update&&e.chart.update()}),void 0!==i.chart.zoom&&["scatterChart","lineChart","candlestickBarChart","cumulativeLineChart","historicalBarChart","ohlcBarChart","stackedAreaChart"].indexOf(i.chart.type)>-1&&t.zoom(e,i),e.chart},i.chart.callback))},updateWithData:function(t){if(arguments.length){if(e.data=t,e._config.deepWatchData&&!e._config.disabled)return}else t="sunburstChart"===e.options.chart.type?angular.copy(e.data):e.data;var n,i;t&&(d3.select(r[0]).select("svg").remove(),e.svg=d3.select(r[0]).insert("svg",".caption"),(n=e.options.chart.height)&&(isNaN(+n)||(n+="px"),e.svg.attr("height",n).style({height:n})),(i=e.options.chart.width)?(isNaN(+i)||(i+="px"),e.svg.attr("width",i).style({width:i})):e.svg.attr("width","100%").style({width:"100%"}),e.svg.datum(t).call(e.chart),e.chart&&e.chart.zoomRender&&e.chart.zoomRender())},clearElement:function(){if(r.find(".title").remove(),r.find(".subtitle").remove(),r.find(".caption").remove(),r.empty(),e.chart&&e.chart.tooltip&&e.chart.tooltip.id&&d3.select("#"+e.chart.tooltip.id()).remove(),n.graphs&&e.chart)for(var t=n.graphs.length-1;t>=0;t--)n.graphs[t]&&n.graphs[t].id===e.chart.id&&n.graphs.splice(t,1);n.tooltip&&n.tooltip.cleanup&&n.tooltip.cleanup(),e.chart&&e.chart.resizeHandler&&e.chart.resizeHandler.clear(),e.chart=null},getScope:function(){return e},getElement:function(){return r}},e._config.deepWatchOptions&&e.$watch("options",t.debounce(function(t){e._config.disabled||e.api.refresh()},e._config.debounce,e._config.debounceImmediate),!0),e._config.deepWatchData&&(1===e._config.deepWatchDataDepth?e.$watchCollection("data",s):e.$watch("data",s,2===e._config.deepWatchDataDepth)),e.$watch("config",function(t,n){t!==n&&(e._config=angular.extend(o,t),e.api.refresh())},!0),e._config.deepWatchOptions||e._config.deepWatchData||e.api.refresh(),angular.forEach(e.events,function(t,n){e.$on(n,function(n,r){return t(n,e,r)})}),r.on("$destroy",function(){e.api.clearElement()}),e.$watch("isReady",function(t){t&&e.onReady&&"function"==typeof e.onReady()&&e.onReady()(e,r)})}}}]).factory("nvd3Utils",function(){return{debounce:function(t,n,e){var r;return function(){var i=this,o=arguments,a=e&&!r;clearTimeout(r),r=setTimeout(function(){r=null,e||t.apply(i,o)},n),a&&t.apply(i,o)}},deepExtend:function(t){var n=this;return angular.forEach(arguments,function(e){e!==t&&angular.forEach(e,function(e,r){t[r]&&t[r].constructor&&t[r].constructor===Object?n.deepExtend(t[r],e):t[r]=e})}),t},zoom:function(t,n){var e=n.chart.zoom;if(void 0===e.enabled||null===e.enabled||e.enabled){var r,i,o,a,u,l=t.chart.xAxis.scale(),s=t.chart.yAxis.scale(),c=t.chart.xDomain||l.domain,f=t.chart.yDomain||s.domain,d=l.domain().slice(),h=s.domain().slice(),p=e.scale||1,g=e.translate||[0,0],v=e.scaleExtent||[1,10],m=e.useFixedDomain||!1,y=e.useNiceScale||!1,x=e.horizontalOff||!1,b=e.verticalOff||!1,k=e.unzoomEventType||"dblclick.zoom";y&&(l.nice(),s.nice()),r=function(t,n){return t[0]=Math.min(Math.max(t[0],n[0]),n[1]-n[1]/v[1]),t[1]=Math.max(n[0]+n[1]/v[1],Math.min(t[1],n[1])),t},o=function(){if(void 0!==e.zoomed){var n=e.zoomed(l.domain(),s.domain());x||c([n.x1,n.x2]),b||f([n.y1,n.y2])}else x||c(m?r(l.domain(),d):l.domain()),b||f(m?r(s.domain(),h):s.domain());
1t.chart&&t.chart.update()},a=function(){if(void 0!==e.unzoomed){var n=e.unzoomed(l.domain(),s.domain());x||c([n.x1,n.x2]),b||f([n.y1,n.y2])}else x||c(d),b||f(h);i.scale(p).translate(g),t.chart&&t.chart.update()},u=function(){void 0!==e.zoomend&&e.zoomend()},i=d3.behavior.zoom().x(l).y(s).scaleExtent(v).on("zoom",o).on("zoomend",u),t.svg&&(t.svg.call(i),i.scale(p).translate(g).event(t.svg),"none"!==k&&t.svg.on(k,a)),t.chart&&(t.chart.zoomRender=function(){i.scale(p).translate(g),l=t.chart.xAxis.scale(),s=t.chart.yAxis.scale(),c=t.chart.xDomain||l.domain,f=t.chart.yDomain||s.domain,d=l.domain().slice(),h=s.domain().slice(),i.x(l).y(s),t.svg.call(i),"none"!==k&&t.svg.on(k,a)})}}}})}(window)},49956(t,n,e){var r;(r={dev:!1}).tooltip=r.tooltip||{},r.utils=r.utils||{},r.models=r.models||{},r.charts={},r.logs={},r.dom={},"undefined"==typeof d3&&(d3=e(55442)),r.dispatch=d3.dispatch("render_start","render_end"),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var n=Array.prototype.slice.call(arguments,1),e=this,r=function(){},i=function(){return e.apply(this instanceof r&&t?this:t,n.concat(Array.prototype.slice.call(arguments)))};return r.prototype=this.prototype,i.prototype=new r,i}),r.dev&&(r.dispatch.on("render_start",function(t){r.logs.startTime=+new Date}),r.dispatch.on("render_end",function(t){r.logs.endTime=+new Date,r.logs.totalTime=r.logs.endTime-r.logs.startTime,r.log("total",r.logs.totalTime)})),r.log=function(){return r.dev&&window.console&&console.log&&console.log.apply?console.log.apply(console,arguments):r.dev&&window.console&&"function"==typeof console.log&&Function.prototype.bind&&Function.prototype.bind.call(console.log,console).apply(console,arguments),arguments[arguments.length-1]},r.deprecated=function(t,n){console&&console.warn&&console.warn("nvd3 warning: `"+t+"` has been deprecated. ",n||"")},r.render=function(t){t=t||1,r.render.active=!0,r.dispatch.render_start();var n=function(){for(var e,i,o=0;t>o&&(i=r.render.queue[o]);o++)e=i.generate(),typeof i.callback==typeof Function&&i.callback(e);r.render.queue.splice(0,o),r.render.queue.length?setTimeout(n):(r.dispatch.render_end(),r.render.active=!1)};setTimeout(n)},r.render.active=!1,r.render.queue=[],r.addGraph=function(t){typeof arguments[0]==typeof Function&&(t={generate:arguments[0],callback:arguments[1]}),r.render.queue.push(t),r.render.active||r.render()},t.exports=r,"undefined"!=typeof window&&(window.nv=r),r.dom.write=function(t){return void 0!==window.fastdom?fastdom.mutate(t):t()},r.dom.read=function(t){return void 0!==window.fastdom?fastdom.measure(t):t()},r.interactiveGuideline=function(){"use strict";function t(f){f.each(function(f){function d(){var e=d3.event.clientX-this.getBoundingClientRect().left,r=d3.event.clientY-this.getBoundingClientRect().top,i=!0,u=!1;if(c&&(e=d3.event.offsetX,r=d3.event.offsetY,"svg"!==d3.event.target.tagName&&(i=!1),d3.event.target.className.baseVal.match("nv-legend")&&(u=!0)),i&&(e-=n.left,r-=n.top),"mouseout"===d3.event.type||0>e||0>r||e>p||r>g||d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement||u){if(c&&d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement&&(void 0===d3.event.relatedTarget.className||d3.event.relatedTarget.className.match(s.nvPointerEventsClass)))return;return a.elementMouseout({mouseX:e,mouseY:r}),t.renderGuideLine(null),void s.hidden(!0)}s.hidden(!1);var l=void 0;if("function"==typeof o.rangeBands){var f=d3.bisect(o.range(),e)-1;if(!(o.range()[f]+o.rangeBand()>=e))return a.elementMouseout({mouseX:e,mouseY:r}),t.renderGuideLine(null),void s.hidden(!0);l=o.domain()[d3.bisect(o.range(),e)-1]}else l=o.invert(e);a.elementMousemove({mouseX:e,mouseY:r,pointXValue:l}),"dblclick"===d3.event.type&&a.elementDblclick({mouseX:e,mouseY:r,pointXValue:l}),"click"===d3.event.type&&a.elementClick({mouseX:e,mouseY:r,pointXValue:l}),"mousedown"===d3.event.type&&a.elementMouseDown({mouseX:e,mouseY:r,pointXValue:l}),"mouseup"===d3.event.type&&a.elementMouseUp({mouseX:e,mouseY:r,pointXValue:l})}var h=d3.select(this),p=e||960,g=i||400,v=h.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([f]);v.enter().append("g").attr("class"," nv-wrap nv-interactiveLineLayer").append("g").attr("class","nv-interactiveGuideLine"),l&&(l.on("touchmove",d).on("mousemove",d,!0).on("mouseout",d,!0).on("mousedown",d,!0).on("mouseup",d,!0).on("dblclick",d).on("click",d),t.guideLine=null,t.renderGuideLine=function(n){u&&(t.guideLine&&t.guideLine.attr("x1")===n||r.dom.write(function(){var t=v.select(".nv-interactiveGuideLine").selectAll("line").data(null!=n?[r.utils.NaNtoZero(n)]:[],String);t.enter().append("line").attr("class","nv-guideline").attr("x1",function(t){return t}).attr("x2",function(t){return t}).attr("y1",g).attr("y2",0),t.exit().remove()}))})})}var n={left:0,top:0},e=null,i=null,o=d3.scale.linear(),a=d3.dispatch("elementMousemove","elementMouseout","elementClick","elementDblclick","elementMouseDown","elementMouseUp"),u=!0,l=null,s=r.models.tooltip(),c=window.ActiveXObject;return s.duration(0).hideDelay(0).hidden(!1),t.dispatch=a,t.tooltip=s,t.margin=function(e){return arguments.length?(n.top=void 0!==e.top?e.top:n.top,n.left=void 0!==e.left?e.left:n.left,t):n},t.width=function(n){return arguments.length?(e=n,t):e},t.height=function(n){return arguments.length?(i=n,t):i},t.xScale=function(n){return arguments.length?(o=n,t):o},t.showGuideLine=function(n){return arguments.length?(u=n,t):u},t.svgContainer=function(n){return arguments.length?(l=n,t):l},t},r.interactiveBisect=function(t,n,e){"use strict";if(!(t instanceof Array))return null;var r;r="function"!=typeof e?function(t){return t.x}:e;var i=d3.bisector(function(t,n){return r(t)-n}).left,o=d3.max([0,i(t,n)-1]),a=r(t[o]);if(void 0===a&&(a=o),a===n)return o;var u=d3.min([o+1,t.length-1]),l=r(t[u]);return void 0===l&&(l=u),Math.abs(l-n)>=Math.abs(a-n)?o:u},r.nearestValueIndex=function(t,n,e){"use strict";var r=1/0,i=null;return t.forEach(function(t,o){var a=Math.abs(n-t);null!=t&&r>=a&&e>a&&(r=a,i=o)}),i},r.models.tooltip=function(){"use strict";function t(){return d&&k(e)?(r.dom.write(function(){c&&c.node()||((c=d3.select(document.body).select("#"+n).data([1])).enter().append("div").attr("class","nvtooltip "+(u||"xy-tooltip")).attr("id",n).style("top",0).style("left",0).style("opacity",0).style("position","fixed").selectAll("div, table, td, tr").classed(g,!0).classed(g,!0),c.exit(
1).remove());var t=x(e,c.node());t&&(c.node().innerHTML=t),w()}),t):void 0}var n="nvtooltip-"+Math.floor(1e5*Math.random()),e=null,i="w",o=25,a=0,u=null,l=!0,s=200,c=null,f={left:null,top:null},d=!0,h=100,p=!0,g="nv-pointer-events-none",v=function(t,n,e){return t},m=function(t){return t},y=function(t,n){return t},x=function(t,n){if(null===t)return"";var e=d3.select(document.createElement("table"));p&&e.selectAll("thead").data([t]).enter().append("thead").append("tr").append("td").attr("colspan",3).append("strong").classed("x-value",!0).html(m(t.value));var r=e.selectAll("tbody").data([t]).enter().append("tbody").selectAll("tr").data(function(t){return t.series}).enter().append("tr").classed("highlight",function(t){return t.highlight});r.append("td").classed("legend-color-guide",!0).append("div").style("background-color",function(t){return t.color}),r.append("td").classed("key",!0).classed("total",function(t){return!!t.total}).html(function(t,n){return y(t.key,n)}),r.append("td").classed("value",!0).html(function(t,n){return v(t.value,n,t)}),r.filter(function(t,n){return void 0!==t.percent}).append("td").classed("percent",!0).html(function(t,n){return"("+d3.format("%")(t.percent)+")"}),r.selectAll("td").each(function(t){if(t.highlight){var n=d3.scale.linear().domain([0,1]).range(["#fff",t.color]);d3.select(this).style("border-bottom-color",n(.6)).style("border-top-color",n(.6))}});var i=e.node().outerHTML;return void 0!==t.footer&&(i+="<div class='footer'>"+t.footer+"</div>"),i},b=function(){var t={left:null!==d3.event?d3.event.clientX:0,top:null!==d3.event?d3.event.clientY:0};if("none"!=getComputedStyle(document.body).transform){var n=document.body.getBoundingClientRect();t.left-=n.left,t.top-=n.top}return t},k=function(t){if(t&&t.series){if(r.utils.isArray(t.series))return!0;if(r.utils.isObject(t.series))return t.series=[t.series],!0}return!1},M=function(t){var n,e,r,a=c.node().offsetHeight,u=c.node().offsetWidth,l=document.documentElement.clientWidth,s=document.documentElement.clientHeight;switch(i){case"e":n=-u-o,e=-a/2,t.left+n<0&&(n=o),(r=t.top+e)<0&&(e-=r),(r=t.top+e+a)>s&&(e-=r-s);break;case"w":n=o,e=-a/2,t.left+n+u>l&&(n=-u-o),(r=t.top+e)<0&&(e-=r),(r=t.top+e+a)>s&&(e-=r-s);break;case"n":n=-u/2-5,e=o,t.top+e+a>s&&(e=-a-o),(r=t.left+n)<0&&(n-=r),(r=t.left+n+u)>l&&(n-=r-l);break;case"s":n=-u/2,e=-a-o,t.top+e<0&&(e=o),(r=t.left+n)<0&&(n-=r),(r=t.left+n+u)>l&&(n-=r-l);break;case"center":n=-u/2,e=-a/2;break;default:n=0,e=0}return{left:n,top:e}},w=function(){r.dom.read(function(){var t=b(),n=M(t),e=t.left+n.left,r=t.top+n.top;if(l)c.interrupt().transition().delay(s).duration(0).style("opacity",0);else{var i="translate("+f.left+"px, "+f.top+"px)",o="translate("+Math.round(e)+"px, "+Math.round(r)+"px)",a=d3.interpolateString(i,o),u=c.style("opacity")<.1;c.interrupt().transition().duration(u?0:h).styleTween("transform",function(t){return a},"important").styleTween("-webkit-transform",function(t){return a}).style("-ms-transform",o).style("opacity",1)}f.left=e,f.top=r})};return t.nvPointerEventsClass=g,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{duration:{get:function(){return h},set:function(t){h=t}},gravity:{get:function(){return i},set:function(t){i=t}},distance:{get:function(){return o},set:function(t){o=t}},snapDistance:{get:function(){return a}
vendor: 63,690 bytes, line 1
1,set:function(t){a=t}},classes:{get:function(){return u},set:function(t){u=t}},enabled:{get:function(){return d},set:function(t){d=t}},hideDelay:{get:function(){return s},set:function(t){s=t}},contentGenerator:{get:function(){return x},set:function(t){x=t}},valueFormatter:{get:function(){return v},set:function(t){v=t}},headerFormatter:{get:function(){return m},set:function(t){m=t}},keyFormatter:{get:function(){return y},set:function(t){y=t}},headerEnabled:{get:function(){return p},set:function(t){p=t}},position:{get:function(){return b},set:function(t){b=t}},chartContainer:{get:function(){return document.body},set:function(t){r.deprecated("chartContainer","feature removed after 1.8.3")}},fixedTop:{get:function(){return null},set:function(t){r.deprecated("fixedTop","feature removed after 1.8.1")}},offset:{get:function(){return{left:0,top:0}},set:function(t){r.deprecated("offset","use chart.tooltip.distance() instead")}},hidden:{get:function(){return l},set:function(n){l!=n&&(l=!!n,t())}},data:{get:function(){return e},set:function(t){t.point&&(t.value=t.point.x,t.series=t.series||{},t.series.value=t.point.y,t.series.color=t.point.color||t.series.color),e=t}},node:{get:function(){return c.node()},set:function(t){}},id:{get:function(){return n},set:function(t){}}}),r.utils.initOptions(t),t},r.utils.windowSize=function(){var t={width:640,height:480};return window.innerWidth&&window.innerHeight?(t.width=window.innerWidth,t.height=window.innerHeight,t):"CSS1Compat"==document.compatMode&&document.documentElement&&document.documentElement.offsetWidth?(t.width=document.documentElement.offsetWidth,t.height=document.documentElement.offsetHeight,t):document.body&&document.body.offsetWidth?(t.width=document.body.offsetWidth,t.height=document.body.offsetHeight,t):t},r.utils.isArray=Array.isArray,r.utils.isObject=function(t){return null!==t&&"object"==typeof t},r.utils.isFunction=function(t){return"function"==typeof t},r.utils.isDate=function(t){return"[object Date]"===toString.call(t)},r.utils.isNumber=function(t){return!isNaN(t)&&"number"==typeof t},r.utils.windowResize=function(t){return window.addEventListener?window.addEventListener("resize",t):r.log("ERROR: Failed to bind to window.resize with: ",t),{callback:t,clear:function(){window.removeEventListener("resize",t)}}},r.utils.getColor=function(t){if(void 0===t)return r.utils.defaultColor();if(r.utils.isArray(t)){var n=d3.scale.ordinal().range(t);return function(t,e){var r=void 0===e?t:e;return t.color||n(r)}}return t},r.utils.defaultColor=function(){return r.utils.getColor(d3.scale.category20().range())},r.utils.customTheme=function(t,n,e){n=n||function(t){return t.key};var i=(e=e||d3.scale.category20().range()).length;return function(o,a){var u=n(o);return r.utils.isFunction(t[u])?t[u]():void 0!==t[u]?t[u]:(i||(i=e.length),e[i-=1])}},r.utils.pjax=function(t,n){var e=function(e){d3.html(e,function(e){var i=d3.select(n).node();i.parentNode.replaceChild(d3.select(e).select(n).node(),i),r.utils.pjax(t,n)})};d3.selectAll(t).on("click",function(){history.pushState(this.href,this.textContent,this.href),e(this.href),d3.event.preventDefault()}),d3.select(window).on("popstate",function(){d3.event.state&&e(d3.event.state)})},r.utils.calcApproxTextWidth=function(t){if(r.utils.isFunction(t.style)&&r.utils.isFunction(t.text)){var n=parseInt(t.style("font-size").replace("px",""),10),e=t.text().length;return r.utils.NaNtoZero(e*n*.5)}return 0},r.utils.NaNtoZero=function(t){return!r.utils.isNumber(t)||isNaN(t)||null===t||t===1/0||t===-1/0?0:t},d3.selection.prototype.watchTransition=function(t){var n=[this].concat([].slice.call(arguments,1));return t.transition.apply(t,n)},r.utils.renderWatch=function(t,n){if(!(this instanceof r.utils.renderWatch))return new r.utils.renderWatch(t,n);var e=void 0!==n?n:250,i=[],o=this;this.models=function(t){return(t=[].slice.call(arguments,0)).forEach(function(t){t.__rendered=!1,function(t){t.dispatch.on("renderEnd",function(n){t.__rendered=!0,o.renderEnd("model")})}(t),i.indexOf(t)<0&&i.push(t)}),this},this.reset=function(t){void 0!==t&&(e=t),i=[]},this.transition=function(t,n,r){if(r=(n=arguments.length>1?[].slice.call(arguments,1):[]).length>1?n.pop():void 0!==e?e:250,t.__rendered=!1,i.indexOf(t)<0&&i.push(t),0===r)return t.__rendered=!0,t.delay=function(){return this},t.duration=function(){return this},t;0===t.length||t.every(function(t){return!t.length})?t.__rendered=!0:t.__rendered=!1;var a=0;return t.transition().duration(r).each(function(){++a}).each("end",function(e,r){0===--a&&(t.__rendered=!0,o.renderEnd.apply(this,n))})},this.renderEnd=function(){i.every(function(t){return t.__rendered})&&(i.forEach(function(t){t.__rendered=!1}),t.renderEnd.apply(this,arguments))}},r.utils.deepExtend=function(t){(arguments.length>1?[].slice.call(arguments,1):[]).forEach(function(n){for(var e in n){var i=r.utils.isArray(t[e]),o=r.utils.isObject(t[e]),a=r.utils.isObject(n[e]);o&&!i&&a?r.utils.deepExtend(t[e],n[e]):t[e]=n[e]}})},r.utils.state=function(){if(!(this instanceof r.utils.state))return new r.utils.state;var t={},n=function(){},e=function(){return{}},i=null;this.dispatch=d3.dispatch("change","set"),this.dispatch.on("set",function(t){n(t,!0)}),this.getter=function(t){return e=t,this},this.setter=function(t,e){return e||(e=function(){}),n=function(n,r){t(n),r&&e()},this},this.init=function(t){i=i||{},r.utils.deepExtend(i,t)};var o=function(){var n=e();if(JSON.stringify(n)===JSON.stringify(t))return!1;for(var r in n)void 0===t[r]&&(t[r]={}),t[r]=n[r];return!0};this.update=function(){i&&(n(i,!1),i=null),o.call(this)&&this.dispatch.change(t)}},r.utils.optionsFunc=function(t){return t&&d3.map(t).forEach(function(t,n){r.utils.isFunction(this[t])&&this[t](n)}.bind(this)),this},r.utils.calcTicksX=function(t,n){for(var e=1,i=0;i<n.length;i+=1){var o=n[i]&&n[i].values?n[i].values.length:0;e=o>e?o:e}return r.log("Requested number of ticks: ",t),r.log("Calculated max values to be: ",e),t=1>(t=t>e?t=e-1:t)?1:t,t=Math.floor(t),r.log("Calculating tick count as: ",t),t},r.utils.calcTicksY=function(t,n){return r.utils.calcTicksX(t,n)},r.utils.initOption=function(t,n){t._calls&&t._calls[n]?t[n]=t._calls[n]:(t[n]=function(e){return arguments.length?(t._overrides[n]=!0,t._options[n]=e,t):t._options[n]},t["_"+n]=function(e){return arguments.length?(t._overrides[n]||(t._options[n]=e),t):t._options[n]})},r.utils.initOptions=function(t){t._overrides=t._overrides||{};var n=Object.getOwnPropertyNames(t._options||{}),e=Object.getOwnPropertyNames(t._calls||{});for(var i in n=n.concat(e))r.utils.initOption(t,n[i])},r.utils.inheritOptionsD3=function(t,n,e){t._d3options=e.concat(t._d3options||[]),t._d3options=(t._d3options||[]).filter(function(t,n,e){return e.indexOf(t)===n}),e.unshift(n),e.unshift(t),d3.rebind.apply(this,e)},r.utils.arrayUnique=function(t){return t.sort().filter(function(n,e){return!e||n!=t[e-1]})},r.utils.symbolMap=d3.map(),r.utils.symbol=function(){function t(t,i){var o=n.call(this,t,i),a=e.call(this,t,i);return-1!==d3.svg.symbolTypes.indexOf(o)?d3.svg.symbol().type(o).size(a)():r.utils.symbolMap.get(o)(a)}var n,e=64;return t.type=function(e){return arguments.length?(n=d3.functor(e),t):n},t.size=function(n){return arguments.length?(e=d3.functor(n),t):e},t},r.utils.inheritOptions=function(t,n){var e=Object.getOwnPropertyNames(n._options||{}),i=Object.getOwnPropertyNames(n._calls||{}),o=n._inherited||[],a=n._d3options||[],u=e.concat(i).concat(o).concat(a);u.unshift(n),u.unshift(t),d3.rebind.apply(this,u),t._inherited=r.utils.arrayUnique(e.concat(i).concat(o).concat(e).concat(t._inherited||[])),t._d3options=r.utils.arrayUnique(a.concat(t._d3options||[]))},r.utils.initSVG=function(t){t.classed({"nvd3-svg":!0})},r.utils.sanitizeHeight=function(t,n){return t||parseInt(n.style("height"),10)||400},r.utils.sanitizeWidth=function(t,n){return t||parseInt(n.style("width"),10)||960},r.utils.availableHeight=function(t,n,e){return Math.max(0,r.utils.sanitizeHeight(t,n)-e.top-e.bottom)},r.utils.availableWidth=function(t,n,e){return Math.max(0,r.utils.sanitizeWidth(t,n)-e.left-e.right)},r.utils.noData=function(t,n){var e=t.options(),i=e.margin(),o=e.noData(),a=null==o?["No Data Available."]:[o],u=r.utils.availableHeight(null,n,i),l=r.utils.availableWidth(null,n,i),s=i.left+l/2,c=i.top+u/2;n.selectAll("g").remove();var f=n.selectAll(".nv-noData").data(a);f.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),f.attr("x",s).attr("y",c).text(function(t){return t})},r.utils.wrapTicks=function(t,n){t.each(function(){for(var t,e=d3.select(this),r=e.text().split(/\s+/).reverse(),i=[],o=0,a=e.attr("y"),u=parseFloat(e.attr("dy")),l=e.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",u+"em");t=r.pop();)i.push(t),l.text(i.join(" ")),l.node().getComputedTextLength()>n&&(i.pop(),l.text(i.join(" ")),i=[t],l=e.append("tspan").attr("x",0).attr("y",a).attr("dy",1.1*++o+u+"em").text(t))})},r.utils.arrayEquals=function(t,n){if(t===n)return!0;if(!t||!n)return!1;if(t.length!=n.length)return!1;for(var e=0,i=t.length;i>e;e++)if(t[e]instanceof Array&&n[e]instanceof Array){if(!r.arrayEquals(t[e],n[e]))return!1}else if(t[e]!=n[e])return!1;return!0},r.utils.pointIsInArc=function(t,n,e){var r=e.innerRadius()(n),i=e.outerRadius()(n),o=e.startAngle()(n),a=e.endAngle()(n),u=t.x*t.x+t.y*t.y,l=Math.atan2(t.x,-t.y);return l=0>l?l+2*Math.PI:l,u>=r*r&&i*i>=u&&l>=o&&a>=l},r.models.axis=function(){"use strict";function t(u){return b.reset(),u.each(function(t){var u=d3.select(this);r.utils.initSVG(u);var m=u.selectAll("g.nv-wrap.nv-axis").data([t]),y=(m.enter().append("g").attr("class","nvd3 nv-wrap nv-axis").append("g"),m.select("g"));null!==p?e.ticks(p):("top"==e.orient()||"bottom"==e.orient())&&e.ticks(Math.abs(i.range()[1]-i.range()[0])/100),y.watchTransition(b,"axis").call(e),x=x||e.scale();var k=e.tickFormat();null==k&&(k=x.tickFormat());var M,w,A,_=y.selectAll("text.nv-axislabel").data([l||null]);switch(_.exit().remove(),void 0!==v&&y.selectAll("g").select("text").style("font-size",v),e.orient()){case"top":_.enter().append("text").attr("class","nv-axislabel"),A=0,1===i.range().length?A=h?2*i.range()[0]+i.rangeBand():0:2===i.range().length?A=h?i.range()[0]+i.range()[1]+i.rangeBand():i.range()[1]:i.range().length>2&&(A=i.range()[i.range().length-1]+(i.range()[1]-i.range()[0])),_.attr("text-anchor","middle").attr("y",0).attr("x",A/2),s&&((w=m.selectAll("g.nv-axisMaxMin").data(i.domain())).enter().append("g").attr("class",function(t,n){return["nv-axisMaxMin","nv-axisMaxMin-x",0==n?"nv-axisMin-x":"nv-axisMax-x"].join(" ")}).append("text"),w.exit().remove(),w.attr("transform",function(t,n){return"translate("+r.utils.NaNtoZero(i(t))+",0)"}).select("text").attr("dy","-0.5em").attr("y",-e.tickPadding()).attr("text-anchor","middle").text(function(t,e){var r=(n||k)(t);return(""+r).match("NaN")?"":r}),w.watchTransition(b,"min-max top").attr("transform",function(t,n){return"translate("+r.utils.NaNtoZero(i.range()[n])+",0)"}));break;case"bottom":M=g+36;var C=30,S=0,E=y.selectAll("g").select("text"),N="";if(c%360){E.attr("transform",""),E.each(function(t,n){var e=this.getBoundingClientRect(),r=e.width;S=e.height,r>C&&(C=r)}),N="rotate("+c+" 0,"+(S/2+e.tickPadding())+")";var D=Math.abs(Math.sin(c*Math.PI/180));M=(D?D*C:C)+30,E.attr("transform",N).style("text-anchor",c%360>0?"start":"end")}else d?E.attr("transform",function(t,n){return"translate(0,"+(n%2==0?"0":"12")+")"}):E.attr("transform","translate(0,0)");_.enter().append("text").attr("class","nv-axislabel"),A=0,1===i.range().length?A=h?2*i.range()[0]+i.rangeBand():0:2===i.range().length?A=h?i.range()[0]+i.range()[1]+i.rangeBand():i.range()[1]:i.range().length>2&&(A=i.range()[i.range().length-1]+(i.range()[1]-i.range()[0])),_.attr("text-anchor","middle").attr("y",M).attr("x",A/2),s&&((w=m.selectAll("g.nv-axisMaxMin").data([i.domain()[0],i.domain()[i.domain().length-1]])).enter().append("g").attr("class",function(t,n){return["nv-axisMaxMin","nv-axisMaxMin-x",0==n?"nv-axisMin-x":"nv-axisMax-x"].join(" ")}).append("text"),w.exit().remove(),w.attr("transform",function(t,n){return"translate("+r.utils.NaNtoZero(i(t)+(h?i.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",e.tickPadding()).attr("transform",N).style("text-anchor",c?c%360>0?"start":"end":"middle").text(function(t,e){var r=(n||k)(t);return(""+r).match("NaN")?"":r}),w.watchTransition(b,"min-max bottom").attr("transform",function(t,n){return"translate("+r.utils.NaNtoZero(i(t)+(h?i.rangeBand()/2:0))+",0)"}));break;case"right":_.enter().append("text").attr("class","nv-axislabel"),_.style("text-anchor",f?"middle":"begin").attr("transform",f?"rotate(90)":"").attr("y",f?12-Math.max(o.right,a)-(g||0):-10).attr("x",f?d3.max(i.range())/2:e.tickPadding()),s&&((w=m.selectAll("g.nv-axisMaxMin").data(i.domain())).enter().append("g").attr("class",function(t,n){return["nv-axisMaxMin","nv-axisMaxMin-y",0==n?"nv-axisMin-y":"nv-axisMax-y"].join(" ")}).append("text").style("opacity",0),w.exit().remove(),w.attr("transform",function(t,n){return"translate(0,"+r.utils.NaNtoZero(i(t))+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",e.tickPadding()).style("text-anchor","start").text(function(t,e){var r=(n||k)(t);return(""+r).match("NaN")?"":r}),w.watchTransition(b,"min-max right").attr("transform",function(t,n){return"translate(0,"+r.utils.NaNtoZero(i.range()[n])+")"}).select("text").style("opacity",1));break;case"left":_.enter().append("text").attr("class","nv-axislabel"),_.style("text-anchor",f?"middle":"end").attr("transform",f?"rotate(-90)":"").attr("y",f?25-Math.max(o.left,a)-(g||0):-10).attr("x",f?-d3.max(i.range())/2:-e.tickPadding()),s&&((w=m.selectAll("g.nv-axisMaxMin").data(i.domain())).enter().append("g").attr("class",function(t,n){return["nv-axisMaxMin","nv-axisMaxMin-y",0==n?"nv-axisMin-y":"nv-axisMax-y"].join(" ")}).append("text").style("opacity",0),w.exit().remove(),w.attr("transform",function(t,n){return"translate(0,"+r.utils.NaNtoZero(x(t))+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-e.tickPadding()).attr("text-anchor","end").text(function(t,e){var r=(n||k)(t);return(""+r).match("NaN")?"":r}),w.watchTransition(b,"min-max right").attr("transform",function(t,n){return"translate(0,"+r.utils.NaNtoZero(i.range()[n])+")"}).select("text").style("opacity",1))}if(_.text(function(t){return t}),!s||"left"!==e.orient()&&"right"!==e.orient()||(y.selectAll("g").each(function(t,n){d3.select(this).select("text").attr("opacity",1),(i(t)<i.range()[1]+10||i(t)>i.range()[0]-10)&&((t>1e-10||-1e-10>t)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0))}),i.domain()[0]==i.domain()[1]&&0==i.domain()[0]&&m.selectAll("g.nv-axisMaxMin").style("opacity",function(t,n){return n?0:1})),s&&("top"===e.orient()||"bottom"===e.orient())){var F=[];m.selectAll("g.nv-axisMaxMin").each(function(t,n){try{n?F.push(i(t)-this.getBoundingClientRect().width-4):F.push(i(t)+this.getBoundingClientRect().width+4)}catch(e){n?F.push(i(t)-4):F.push(i(t)+4)}}),y.selectAll("g").each(function(t,n){(i(t)<F[0]||i(t)>F[1])&&(t>1e-10||-1e-10>t?d3.select(this).remove():d3.select(this).select("text").remove())})}y.selectAll(".tick").filter(function(t){return!parseFloat(Math.round(1e5*t)/1e6)&&void 0!==t}).classed("zero",!0),x=i.copy()}),b.renderEnd("axis immediate"),t}var n,e=d3.svg.axis(),i=d3.scale.linear(),o={top:0,right:0,bottom:0,left:0},a=75,u=60,l=null,s=!0,c=0,f=!0,d=!1,h=!1,p=null,g=0,v=void 0,m=250,y=d3.dispatch("renderEnd");e.scale(i).orient("bottom").tickFormat(function(t){return t});var x,b=r.utils.renderWatch(y,m);return t.axis=e,t.dispatch=y,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{axisLabelDistance:{get:function(){return g},set:function(t){g=t}},staggerLabels:{get:function(){return d},set:function(t){d=t}},rotateLabels:{get:function(){return c},set:function(t){c=t}},rotateYLabel:{get:function(){return f},set:function(t){f=t}},showMaxMin:{get:function(){return s},set:function(t){s=t}},axisLabel:{get:function(){return l},set:function(t){l=t}},height:{get:function(){return u},set:function(t){u=t}},ticks:{get:function(){return p},set:function(t){p=t}},width:{get:function(){return a},set:function(t){a=t}},fontSize:{get:function(){return v},set:function(t){v=t}},tickFormatMaxMin:{get:function(){return n},set:function(t){n=t}},margin:{get:function(){return o},set:function(t){o.top=void 0!==t.top?t.top:o.top,o.right=void 0!==t.right?t.right:o.right,o.bottom=void 0!==t.bottom?t.bottom:o.bottom,o.left=void 0!==t.left?t.left:o.left}},duration:{get:function(){return m},set:function(t){m=t,b.reset(m)}},scale:{get:function(){return i},set:function(n){i=n,e.scale(i),h="function"==typeof i.rangeBands,r.utils.inheritOptionsD3(t,i,["domain","range","rangeBand","rangeBands"])}}}),r.utils.initOptions(t),r.utils.inheritOptionsD3(t,e,["orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"]),r.utils.inheritOptionsD3(t,i,["domain","range","rangeBand","rangeBands"]),t},r.models.boxPlot=function(){"use strict";function t(f){return D.reset(),f.each(function(t){var f=s-l.left-l.right,F=c-l.top-l.bottom;C=d3.select(this),r.utils.initSVG(C),d.domain(n||t.map(function(t,n){return p(t,n)})).rangeBands(e||[0,f],.1);var W=[];if(!i){var L=[];t.forEach(function(t,n){var e=g(t),r=m(t),i=y(t),o=x(t),a=k(t);a&&a.forEach(function(t,n){L.push(M(t,n,void 0))}),i&&L.push(i),e&&L.push(e),r&&L.push(r),o&&L.push(o)}),W=[d3.min(L),d3.max(L)]}h.domain(i||W),h.range(o||[F,0]),a=a||d,u=u||h.copy().range([h(0),h(0)]);var T=C.selectAll("g.nv-wrap").data([t]);T.enter().append("g").attr("class","nvd3 nv-wrap"),T.attr("transform","translate("+l.left+","+l.top+")");var z=T.selectAll(".nv-boxplot").data(function(t){return t}),O=z.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);z.attr("class","nv-boxplot").attr("transform",function(t,n,e){return"translate("+(d(p(t,n))+.05*d.rangeBand())+", 0)"}).classed("hover",function(t){return t.hover}),z.watchTransition(D,"nv-boxplot: boxplots").style("stroke-opacity",1).style("fill-opacity",.75).delay(function(n,e){return e*E/t.length}).attr("transform",function(t,n){return"translate("+(d(p(t,n))+.05*d.rangeBand())+", 0)"}),z.exit().remove(),O.each(function(t,n){var e=d3.select(this);[y,x].forEach(function(r){if(void 0!==r(t)&&null!==r(t)){var i=r===y?"low":"high";e.append("line").style("stroke",b(t)||_(t,n)).attr("class","nv-boxplot-whisker nv-boxplot-"+i),e.append("line").style("stroke",b(t)||_(t,n)).attr("class","nv-boxplot-tick nv-boxplot-"+i)}})});var P=function(){return null===N?.9*d.rangeBand():Math.min(75,.9*d.rangeBand())},B=function(){return.45*d.rangeBand()-P()/2},I=function(){return.45*d.rangeBand()+P()/2};[y,x].forEach(function(t){var n=t===y?"low":"high",e=t===y?g:m;z.select("line.nv-boxplot-whisker.nv-boxplot-"+n).watchTransition(D,"nv-boxplot: boxplots").attr("x1",.45*d.rangeBand()).attr("y1",function(n,e){return h(t(n))}).attr("x2",.45*d.rangeBand()).attr("y2",function(t,n){return h(e(t))}),z.select("line.nv-boxplot-tick.nv-boxplot-"+n).watchTransition(D,"nv-boxplot: boxplots").attr("x1",B).attr("y1",function(n,e){return h(t(n))}).attr("x2",I).attr("y2",function(n,e){return h(t(n))})}),[y,x].forEach(function(t){var n=t===y?"low":"high";O.selectAll(".nv-boxplot-"+n).on("mouseover",function(n,e,r){d3.select(this).classed("hover",!0),S.elementMouseover({series:{key:t(n),color:b(n)||_(n,r)},e:d3.event})}).on("mouseout",function(n,e,r){d3.select(this).classed("hover",!1),S.elementMouseout({series:{key:t(n),color:b(n)||_(n,r)},e:d3.event})}).on("mousemove",function(t,n){S.elementMousemove({e:d3.event})})}),O.append("rect").attr("class","nv-boxplot-box").on("mouseover",function(t,n){d3.select(this).classed("hover",!0),S.elementMouseover({key:p(t),value:p(t),series:[{key:"Q3",value:m(t),color:b(t)||_(t,n)},{key:"Q2",value:v(t),color:b(t)||_(t,n)},{key:"Q1",value:g(t),color:b(t)||_(t,n)}],data:t,index:n,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",!1),S.elementMouseout({key:p(t),value:p(t),series:[{key:"Q3",value:m(t),color:b(t)||_(t,n)},{key:"Q2",value:v(t),color:b(t)||_(t,n)},{key:"Q1",value:g(t),color:b(t)||_(t,n)}],data:t,index:n,e:d3.event})}).on("mousemove",function(t,n){S.elementMousemove({e:d3.event})}),z.select("rect.nv-boxplot-box").watchTransition(D,"nv-boxplot: boxes").attr("y",function(t,n){return h(m(t))}).attr("width",P).attr("x",B).attr("height",function(t,n){return Math.abs(h(m(t))-h(g(t)))||1}).style("fill",function(t,n){return b(t)||_(t,n)}).style("stroke",function(t,n){return b(t)||_(t,n)}),O.append("line").attr("class","nv-boxplot-median"),z.select("line.nv-boxplot-median").watchTransition(D,"nv-boxplot: boxplots line").attr("x1",B).attr("y1",function(t,n){return h(v(t))}).attr("x2",I).attr("y2",function(t,n){return h(v(t))});var R=z.selectAll(".nv-boxplot-outlier").data(function(t){return k(t)||[]});R.enter().append("circle").style("fill",function(t,n,e){return A(t,n,e)||_(t,e)}).style("stroke",function(t,n,e){return A(t,n,e)||_(t,e)}).style("z-index",9e3).on("mouseover",function(t,n,e){d3.select(this).classed("hover",!0),S.elementMouseover({series:{key:w(t,n,e),color:A(t,n,e)||_(t,e)},e:d3.event})}).on("mouseout",function(t,n,e){d3.select(this).classed("hover",!1),S.elementMouseout({series:{key:w(t,n,e),color:A(t,n,e)||_(t,e)},e:d3.event})}).on("mousemove",function(t,n){S.elementMousemove({e:d3.event})}),R.attr("class","nv-boxplot-outlier"),R.watchTransition(D,"nv-boxplot: nv-boxplot-outlier").attr("cx",.45*d.rangeBand()).attr("cy",function(t,n,e){return h(M(t,n,e))}).attr("r","3"),R.exit().remove(),a=d.copy(),u=h.copy()}),D.renderEnd("nv-boxplot immediate"),t}var n,e,i,o,a,u,l={top:0,right:0,bottom:0,left:0},s=960,c=500,f=Math.floor(1e4*Math.random()),d=d3.scale.ordinal(),h=d3.scale.linear(),p=function(t){return t.label},g=function(t){return t.values.Q1},v=function(t){return t.values.Q2},m=function(t){return t.values.Q3},y=function(t){return t.values.whisker_low},x=function(t){return t.values.whisker_high},b=function(t){return t.color},k=function(t){return t.values.outliers},M=function(t,n,e){return t},w=function(t,n,e){return t},A=function(t,n,e){},_=r.utils.defaultColor(),C=null,S=d3.dispatch("elementMouseover","elementMouseout","elementMousemove","renderEnd"),E=250,N=null,D=r.utils.renderWatch(S,E);return t.dispatch=S,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return s},set:function(t){s=t}},height:{get:function(){return c},set:function(t){c=t}},maxBoxWidth:{get:function(){return N},set:function(t){N=t}},x:{get:function(){return p},set:function(t){p=t}},q1:{get:function(){return g},set:function(t){g=t}},q2:{get:function(){return v},set:function(t){v=t}},q3:{get:function(){return m},set:function(t){m=t}},wl:{get:function(){return y},set:function(t){y=t}},wh:{get:function(){return x},set:function(t){x=t}},itemColor:{get:function(){return b},set:function(t){b=t}},outliers:{get:function(){return k},set:function(t){k=t}},outlierValue:{get:function(){return M},set:function(t){M=t}},outlierLabel:{get:function(){return w},set:function(t){w=t}},outlierColor:{get:function(){return A},set:function(t){A=t}},xScale:{get:function(){return d},set:function(t){d=t}},yScale:{get:function(){return h},set:function(t){h=t}},xDomain:{get:function(){return n},set:function(t){n=t}},yDomain:{get:function(){return i},set:function(t){i=t}},xRange:{get:function(){return e},set:function(t){e=t}},yRange:{get:function(){return o},set:function(t){o=t}},id:{get:function(){return f},set:function(t){f=t}},y:{get:function(){return console.warn("BoxPlot 'y' chart option is deprecated. Please use model overrides instead."),{}},set:function(t){console.warn("BoxPlot 'y' chart option is deprecated. Please use model overrides instead.")}},margin:{get:function(){return l},set:function(t){l.top=void 0!==t.top?t.top:l.top,l.right=void 0!==t.right?t.right:l.right,l.bottom=void 0!==t.bottom?t.bottom:l.bottom,l.left=void 0!==t.left?t.left:l.left}},color:{get:function(){return _},set:function(t){_=r.utils.getColor(t)}},duration:{get:function(){return E},set:function(t){E=t,D.reset(E)}}}),r.utils.initOptions(t),t},r.models.boxPlotChart=function(){"use strict";function t(c){return x.reset(),x.models(i),f&&x.models(o),d&&x.models(a),c.each(function(c){var g=d3.select(this);r.utils.initSVG(g);var x=(l||parseInt(g.style("width"))||960)-u.left-u.right,b=(s||parseInt(g.style("height"))||400)-u.top-u.bottom;if(t.update=function(){m.beforeUpdate(),g.transition().duration(y).call(t)},t.container=this,!c||!c.length){var k=g.selectAll(".nv-noData").data([v]);return k.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),k.attr("x",u.left+x/2).attr("y",u.top+b/2).text(function(t){return t}),t}g.selectAll(".nv-noData").remove(),n=i.xScale(),e=i.yScale().clamp(!0);var M=g.selectAll("g.nv-wrap.nv-boxPlotWithAxes").data([c]),w=M.enter().append("g").attr("class","nvd3 nv-wrap nv-boxPlotWithAxes").append("g"),A=w.append("defs"),_=M.select("g");w.append("g").attr("class","nv-x nv-axis"),w.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),w.append("g").attr("class","nv-barsWrap"),_.attr("transform","translate("+u.left+","+u.top+")"),h&&_.select(".nv-y.nv-axis").attr("transform","translate("+x+",0)"),i.width(x).height(b);var C=_.select(".nv-barsWrap").datum(c.filter(function(t){return!t.disabled}));if(C.transition().call(i),A.append("clipPath").attr("id","nv-x-label-clip-"+i.id()).append("rect"),_.select("#nv-x-label-clip-"+i.id()+" rect").attr("width",n.rangeBand()*(p?2:1)).attr("height",16).attr("x",-n.rangeBand()/(p?1:2)),f){o.scale(n).ticks(r.utils.calcTicksX(x/100,c)).tickSize(-b,0),_.select(".nv-x.nv-axis").attr("transform","translate(0,"+e.range()[0]+")"),_.select(".nv-x.nv-axis").call(o);var S=_.select(".nv-x.nv-axis").selectAll("g");p&&S.selectAll("text").attr("transform",function(t,n,e){return"translate(0,"+(e%2==0?"5":"17")+")"})}d&&(a.scale(e).ticks(Math.floor(b/36)).tickSize(-x,0),_.select(".nv-y.nv-axis").call(a)),_.select(".nv-zeroLine line").attr("x1",0).attr("x2",x).attr("y1",e(0)).attr("y2",e(0))}),x.renderEnd("nv-boxplot chart immediate"),t}var n,e,i=r.models.boxPlot(),o=r.models.axis(),a=r.models.axis(),u={top:15,right:10,bottom:50,left:60},l=null,s=null,c=r.utils.getColor(),f=!0,d=!0,h=!1,p=!1,g=r.models.tooltip(),v="No Data Available.",m=d3.dispatch("beforeUpdate","renderEnd"),y=250;o.orient("bottom").showMaxMin(!1).tickFormat(function(t){return t}),a.orient(h?"right":"left").tickFormat(d3.format(",.1f")),g.duration(0);var x=r.utils.renderWatch(m,y);return i.dispatch.on("elementMouseover.tooltip",function(t){g.data(t).hidden(!1)}),i.dispatch.on("elementMouseout.tooltip",function(t){g.data(t).hidden(!0)}),i.dispatch.on("elementMousemove.tooltip",function(t){g()}),t.dispatch=m,t.boxplot=i,t.xAxis=o,t.yAxis=a,t.tooltip=g,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return l},set:function(t){l=t}},height:{get:function(){return s},set:function(t){s=t}},staggerLabels:{get:function(){return p},set:function(t){p=t}},showXAxis:{get:function(){return f},set:function(t){f=t}},showYAxis:{get:function(){return d},set:function(t){d=t}},tooltipContent:{get:function(){return g},set:function(t){g=t}},noData:{get:function(){return v},set:function(t){v=t}},margin:{get:function(){return u},set:function(t){u.top=void 0!==t.top?t.top:u.top,u.right=void 0!==t.right?t.right:u.right,u.bottom=void 0!==t.bottom?t.bottom:u.bottom,u.left=void 0!==t.left?t.left:u.left}},duration:{get:function(){return y},set:function(t){y=t,x.reset(y),i.duration(y),o.duration(y),a.duration(y)}},color:{get:function(){return c},set:function(t){c=r.utils.getColor(t),i.color(c)}},rightAlignYAxis:{get:function(){return h},set:function(t){h=t,a.orient(t?"right":"left")}}}),r.utils.inheritOptions(t,i),r.utils.initOptions(t),t},r.models.bullet=function(){"use strict";function t(t,n){var e=t.slice();t.sort(function(t,r){var i=e.indexOf(t),o=e.indexOf(r);return d3.descending(n[i],n[o])})}function n(i){return i.each(function(n,i){var y=g-e.left-e.right,A=v-e.top-e.bottom;m=d3.select(this),r.utils.initSVG(m);var _=a.call(this,n,i).slice(),C=u.call(this,n,i).slice(),S=l.call(this,n,i).slice(),E=s.call(this,n,i).slice(),N=c.call(this,n,i).slice(),D=f.call(this,n,i).slice(),F=d.call(this,n,i).slice(),W=h.call(this,n,i).slice();t(N,_),t(D,C),t(F,S),t(W,E),_.sort(d3.descending),C.sort(d3.descending),S.sort(d3.descending),E.sort(d3.descending);var L=d3.scale.linear().domain(d3.extent(d3.merge([p,_]))).range(o?[y,0]:[0,y]);this.__chart__||d3.scale.linear().domain([0,1/0]).range(L.range()),this.__chart__=L;for(var T=(d3.min(_),d3.max(_),_[1],m.selectAll("g.nv-wrap.nv-bullet").data([n])),z=T.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet").append("g"),O=T.select("g"),P=(i=0,_.length);P>i;i++){var B="nv-range nv-range"+i;2>=i&&(B=B+" nv-range"+M[i]),z.append("rect").attr("class",B)}z.append("rect").attr("class","nv-measure"),T.attr("transform","translate("+e.left+","+e.top+")");var I=function(t){return Math.abs(L(t)-L(0))},R=function(t){return L(0>t?t:0)};for(i=0,P=_.length;P>i;i++){var H=_[i];O.select("rect.nv-range"+i).datum(H).attr("height",A).transition().duration(w).attr("width",I(H)).attr("x",R(H))}O.select("rect.nv-measure").style("fill",x).attr("height",A/3).attr("y",A/3).on("mouseover",function(){b.elementMouseover({value:E[0],label:W[0]||"Current",color:d3.select(this).style("fill")})}).on("mousemove",function(){b.elementMousemove({value:E[0],label:W[0]||"Current",color:d3.select(this).style("fill")})}).on("mouseout",function(){b.elementMouseout({value:E[0],label:W[0]||"Current",color:d3.select(this).style("fill")})}).transition().duration(w).attr("width",0>E?L(0)-L(E[0]):L(E[0])-L(0)).attr("x",R(E));var V=A/6,j=C.map(function(t,n){return{value:t,label:D[n]}});z.selectAll("path.nv-markerTriangle").data(j).enter().append("path").attr("class","nv-markerTriangle").attr("d","M0,"+V+"L"+V+","+-V+" "+-V+","+-V+"Z").on("mouseover",function(t){b.elementMouseover({value:t.value,label:t.label||"Previous",color:d3.select(this).style("fill"),pos:[L(t.value),A/2]})}).on("mousemove",function(t){b.elementMousemove({value:t.value,label:t.label||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(t,n){b.elementMouseout({value:t.value,label:t.label||"Previous",color:d3.select(this).style("fill")})}),O.selectAll("path.nv-markerTriangle").data(j).transition().duration(w).attr("transform",function(t){return"translate("+L(t.value)+","+A/2+")"});var q=S.map(function(t,n){return{value:t,label:F[n]}});z.selectAll("line.nv-markerLine").data(q).enter().append("line").attr("cursor","").attr("class","nv-markerLine").attr("x1",function(t){return L(t.value)}).attr("y1","2").attr("x2",function(t){return L(t.value)}).attr("y2",A-2).on("mouseover",function(t){b.elementMouseover({value:t.value,label:t.label||"Previous",color:d3.select(this).style("fill"),pos:[L(t.value),A/2]})}).on("mousemove",function(t){b.elementMousemove({value:t.value,label:t.label||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(t,n){b.elementMouseout({value:t.value,label:t.label||"Previous",color:d3.select(this).style("fill")})}),O.selectAll("line.nv-markerLine").data(q).transition().duration(w).attr("x1",function(t){return L(t.value)}).attr("x2",function(t){return L(t.value)}),T.selectAll(".nv-range").on("mouseover",function(t,n){var e=N[n]||k[n];b.elementMouseover({value:t,label:e,color:d3.select(this).style("fill")})}).on("mousemove",function(){b.elementMousemove({value:E[0],label:W[0]||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(t,n){var e=N[n]||k[n];b.elementMouseout({value:t,label:e,color:d3.select(this).style("fill")})})}),n}var e={top:0,right:0,bottom:0,left:0},i="left",o=!1,a=function(t){return t.ranges},u=function(t){return t.markers?t.markers:[]},l=function(t){return t.markerLines?t.markerLines:[0]},s=function(t){return t.measures},c=function(t){return t.rangeLabels?t.rangeLabels:[]},f=function(t){return t.markerLabels?t.markerLabels:[]},d=function(t){return t.markerLineLabels?t.markerLineLabels:[]},h=function(t){return t.measureLabels?t.measureLabels:[]},p=[0],g=380,v=30,m=null,y=null,x=r.utils.getColor(["#1f77b4"]),b=d3.dispatch("elementMouseover","elementMouseout","elementMousemove"),k=["Maximum","Mean","Minimum"],M=["Max","Avg","Min"],w=1e3;return n.dispatch=b,n.options=r.utils.optionsFunc.bind(n),n._options=Object.create({},{ranges:{get:function(){return a},set:function(t){a=t}},markers:{get:function(){return u},set:function(t){u=t}},measures:{get:function(){return s},set:function(t){s=t}},forceX:{get:function(){return p},set:function(t){p=t}},width:{get:function(){return g},set:function(t){g=t}},height:{get:function(){return v},set:function(t){v=t}},tickFormat:{get:function(){return y},set:function(t){y=t}},duration:{get:function(){return w},set:function(t){w=t}},margin:{get:function(){return e},set:function(t){e.top=void 0!==t.top?t.top:e.top,e.right=void 0!==t.right?t.right:e.right,e.bottom=void 0!==t.bottom?t.bottom:e.bottom,e.left=void 0!==t.left?t.left:e.left}},orient:{get:function(){return i},set:function(t){o="right"==(i=t)||"bottom"==i}},color:{get:function(){return x},set:function(t){x=r.utils.getColor(t)}}}),r.utils.initOptions(n),n},r.models.bulletChart=function(){"use strict";function t(e){return e.each(function(i,p){var g=d3.select(this);r.utils.initSVG(g);var v=r.utils.availableWidth(c,g,a),m=f-a.top-a.bottom;if(t.update=function(){t(e)},t.container=this,!i||!u.call(this,i,p))return r.utils.noData(t,g),t;g.selectAll(".nv-noData").remove();var y=u.call(this,i,p).slice().sort(d3.descending),x=l.call(this,i,p).slice().sort(d3.descending),b=s.call(this,i,p).slice().sort(d3.descending),k=g.selectAll("g.nv-wrap.nv-bulletChart").data([i]),M=k.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart").append("g"),w=k.select("g");M.append("g").attr("class","nv-bulletWrap"),M.append("g").attr("class","nv-titles"),k.attr("transform","translate("+a.left+","+a.top+")");var A=d3.scale.linear().domain([0,Math.max(y[0],x[0]||0,b[0])]).range(o?[v,0]:[0,v]),_=this.__chart__||d3.scale.linear().domain([0,1/0]).range(A.range());this.__chart__=A;var C=M.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(f-a.top-a.bottom)/2+")");C.append("text").attr("class","nv-title").text(function(t){return t.title}),C.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(t){return t.subtitle}),n.width(v).height(m);var S=w.select(".nv-bulletWrap");d3.transition(S).call(n);var E=d||A.tickFormat(v/100),N=w.selectAll("g.nv-tick").data(A.ticks(h||v/50),function(t){return this.textContent||E(t)}),D=N.enter().append("g").attr("class","nv-tick").attr("transform",function(t){return"translate("+_(t)+",0)"}).style("opacity",1e-6);D.append("line").attr("y1",m).attr("y2",7*m/6),D.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",7*m/6).text(E);var F=d3.transition(N).transition().duration(n.duration()).attr("transform",function(t){return"translate("+A(t)+",0)"}).style("opacity",1);F.select("line").attr("y1",m).attr("y2",7*m/6),F.select("text").attr("y",7*m/6),d3.transition(N.exit()).transition().duration(n.duration()).attr("transform",function(t){return"translate("+A(t)+",0)"}).style("opacity",1e-6).remove()}),d3.timer.flush(),t}var n=r.models.bullet(),e=r.models.tooltip(),i="left",o=!1,a={top:5,right:40,bottom:20,left:120},u=function(t){return t.ranges},l=function(t){return t.markers?t.markers:[]},s=function(t){return t.measures},c=null,f=55,d=null,h=null,p=null,g=d3.dispatch();return e.duration(0).headerEnabled(!1),n.dispatch.on("elementMouseover.tooltip",function(t){t.series={key:t.label,value:t.value,color:t.color},e.data(t).hidden(!1)}),n.dispatch.on("elementMouseout.tooltip",function(t){e.hidden(!0)}),n.dispatch.on("elementMousemove.tooltip",function(t){e()}),t.bullet=n,t.dispatch=g,t.tooltip=e,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{ranges:{get:function(){return u},set:function(t){u=t}},markers:{get:function(){return l},set:function(t){l=t}},measures:{get:function(){return s},set:function(t){s=t}},width:{get:function(){return c},set:function(t){c=t}},height:{get:function(){return f},set:function(t){f=t}},tickFormat:{get:function(){return d},set:function(t){d=t}},ticks:{get:function(){return h},set:function(t){h=t}},noData:{get:function(){return p},set:function(t){p=t}},margin:{get:function(){return a},set:function(t){a.top=void 0!==t.top?t.top:a.top,a.right=void 0!==t.right?t.right:a.right,a.bottom=void 0!==t.bottom?t.bottom:a.bottom,a.left=void 0!==t.left?t.left:a.left}},orient:{get:function(){return i},set:function(t){o="right"==(i=t)||"bottom"==i}}}),r.utils.inheritOptions(t,n),r.utils.initOptions(t),t},r.models.candlestickBar=function(){"use strict";function t(w){return w.each(function(t){n=d3.select(this);var w=r.utils.availableWidth(l,n,u),A=r.utils.availableHeight(s,n,u);r.utils.initSVG(n);var C=w/t[0].values.length*.45;f.domain(e||d3.extent(t[0].values.map(h).concat(x))),k?f.range(o||[.5*w/t[0].values.length,w*(t[0].values.length-.5)/t[0].values.length]):f.range(o||[5+C/2,w-C/2-5]),d.domain(i||[d3.min(t[0].values.map(y).concat(b)),d3.max(t[0].values.map(m).concat(b))]).range(a||[A,0]),f.domain()[0]===f.domain()[1]&&(f.domain()[0]?f.domain([f.domain()[0]-.01*f.domain()[0],f.domain()[1]+.01*f.domain()[1]]):f.domain([-1,1])),d.domain()[0]===d.domain()[1]&&(d.domain()[0]?d.domain([d.domain()[0]+.01*d.domain()[0],d.domain()[1]-.01*d.domain()[1]]):d.domain([-1,1]));var S=d3.select(this).selectAll("g.nv-wrap.nv-candlestickBar").data([t[0].values]),E=S.enter().append("g").attr("class","nvd3 nv-wrap nv-candlestickBar"),N=E.append("defs"),D=E.append("g"),F=S.select("g");D.append("g").attr("class","nv-ticks"),S.attr("transform","translate("+u.left+","+u.top+")"),n.on("click",function(t,n){_.chartClick({data:t,index:n,pos:d3.event,id:c})}),N.append("clipPath").attr("id","nv-chart-clip-path-"+c).append("rect"),S.select("#nv-chart-clip-path-"+c+" rect").attr("width",w).attr("height",A),F.attr("clip-path",M?"url(#nv-chart-clip-path-"+c+")":"");var W=S.select(".nv-ticks").selectAll(".nv-tick").data(function(t){return t});W.exit().remove();var L=W.enter().append("g");W.attr("class",function(t,n,e){return(g(t,n)>v(t,n)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+e+"-"+n}),L.append("line").attr("class","nv-candlestick-lines").attr("transform",function(t,n){return"translate("+f(h(t,n))+",0)"}).attr("x1",0).attr("y1",function(t,n){return d(m(t,n))}).attr("x2",0).attr("y2",function(t,n){return d(y(t,n))}),L.append("rect").attr("class","nv-candlestick-rects nv-bars").attr("transform",function(t,n){return"translate("+(f(h(t,n))-C/2)+","+(d(p(t,n))-(g(t,n)>v(t,n)?d(v(t,n))-d(g(t,n)):0))+")"}).attr("x",0).attr("y",0).attr("width",C).attr("height",function(t,n){var e=g(t,n),r=v(t,n);return e>r?d(r)-d(e):d(e)-d(r)}),W.select(".nv-candlestick-lines").transition().attr("transform",function(t,n){return"translate("+f(h(t,n))+",0)"}).attr("x1",0).attr("y1",function(t,n){return d(m(t,n))}).attr("x2",0).attr("y2",function(t,n){return d(y(t,n))}),W.select(".nv-candlestick-rects").transition().attr("transform",function(t,n){return"translate("+(f(h(t,n))-C/2)+","+(d(p(t,n))-(g(t,n)>v(t,n)?d(v(t,n))-d(g(t,n)):0))+")"}).attr("x",0).attr("y",0).attr("width",C).attr("height",function(t,n){var e=g(t,n),r=v(t,n);return e>r?d(r)-d(e):d(e)-d(r)})}),t}var n,e,i,o,a,u={top:0,right:0,bottom:0,left:0},l=null,s=null,c=Math.floor(1e4*Math.random()),f=d3.scale.linear(),d=d3.scale.linear(),h=function(t){return t.x},p=function(t){return t.y},g=function(t){return t.open},v=function(t){return t.close},m=function(t){return t.high},y=function(t){return t.low},x=[],b=[],k=!1,M=!0,w=r.utils.defaultColor(),A=!1,_=d3.dispatch("stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");return t.highlightPoint=function(e,r){t.clearHighlights(),n.select(".nv-candlestickBar .nv-tick-0-"+e).classed("hover",r)},t.clearHighlights=function(){n.select(".nv-candlestickBar .nv-tick.hover").classed("hover",!1)},t.dispatch=_,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return l},set:function(t){l=t}},height:{get:function(){return s},set:function(t){s=t}},xScale:{get:function(){return f},set:function(t){f=t}},yScale:{get:function(){return d},set:function(t){d=t}},xDomain:{get:function(){return e},set:function(t){e=t}},yDomain:{get:function(){return i},set:function(t){i=t}},xRange:{get:function(){return o},set:function(t){o=t}},yRange:{get:function(){return a},set:function(t){a=t}},forceX:{get:function(){return x},set:function(t){x=t}},forceY:{get:function(){return b},set:function(t){b=t}},padData:{get:function(){return k},set:function(t){k=t}},clipEdge:{get:function(){return M},set:function(t){M=t}},id:{get:function(){return c},set:function(t){c=t}},interactive:{get:function(){return A},set:function(t){A=t}},x:{get:function(){return h},set:function(t){h=t}},y:{get:function(){return p},set:function(t){p=t}},open:{get:function(){return g()},set:function(t){g=t}},close:{get:function(){return v()},set:function(t){v=t}},high:{get:function(){return m},set:function(t){m=t}},low:{get:function(){return y},set:function(t){y=t}},margin:{get:function(){return u},set:function(t){u.top=null!=t.top?t.top:u.top,u.right=null!=t.right?t.right:u.right,u.bottom=null!=t.bottom?t.bottom:u.bottom,u.left=null!=t.left?t.left:u.left}},color:{get:function(){return w},set:function(t){w=r.utils.getColor(t)}}}),r.utils.initOptions(t),t},r.models.cumulativeLineChart=function(){"use strict";function t(d){return O.reset(),O.models(a),x&&O.models(u),b&&O.models(l),d.each(function(d){function E(){Q.data([z]);var n=t.duration();t.duration(0),t.update(),t.duration(n)}var W=d3.select(this);r.utils.initSVG(W),W.classed("nv-chart-"+_,!0);var O,I=r.utils.availableWidth(v,W,h),R=r.utils.availableHeight(m,W,h);if(t.update=function(){0===F?W.call(t):W.transition().duration(F).call(t)},t.container=this,C.setter(B(d),t.update).getter(P(d)).update(),C.disabled=d.map(function(t){return!!t.disabled}),!S)for(O in S={},C)C[O]instanceof Array?S[O]=C[O].slice(0):S[O]=C[O];var H=d3.behavior.drag().on("dragstart",function(n,e){d3.select(t.container).style("cursor","ew-resize")}).on("drag",function(t,n){z.x=d3.event.x,z.i=Math.round(T.invert(z.x)),E()}).on("dragend",function(n,e){d3.select(t.container).style("cursor","auto"),C.index=z.i,D.stateChange(C)});if(!(d&&d.length&&d.filter(function(t){return t.values.length}).length))return r.utils.noData(t,W),t;W.selectAll(".nv-noData").remove(),i=a.xScale(),o=a.yScale(),T.domain([0,d[0].values.length-1]).range([0,I]).clamp(!0),d=n(z.i,d),void 0===L&&(L=e(d)),A?a.yDomain(null):(a.yDomain(L),a.clipEdge(!0));var V=w?"none":"all",j=W.selectAll("g.nv-wrap.nv-cumulativeLine").data([d]),q=j.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g"),Y=j.select("g");if(q.append("g").attr("class","nv-interactive"),q.append("g").attr("class","nv-x nv-axis").style("pointer-events","none"),q.append("g").attr("class","nv-y nv-axis"),q.append("g").attr("class","nv-background"),q.append("g").attr("class","nv-linesWrap").style("pointer-events",V),q.append("g").attr("class","nv-avgLinesWrap").style("pointer-events","none"),q.append("g").attr("class","nv-legendWrap"),q.append("g").attr("class","nv-controlsWrap"),y?(s.width(I),Y.select(".nv-legendWrap").datum(d).call(s),p||s.height()===h.top||(h.top=s.height(),R=r.utils.availableHeight(m,W,h)),Y.select(".nv-legendWrap").attr("transform","translate(0,"+-h.top+")")):Y.select(".nv-legendWrap").selectAll("*").remove(),M){var X=[{key:"Re-scale y-axis",disabled:!A}];c.width(140).color(["#444","#444","#444"]).rightAlign(!1).margin({top:5,right:0,bottom:5,left:20}),Y.select(".nv-controlsWrap").datum(X).attr("transform","translate(0,"+-h.top+")").call(c)}else Y.select(".nv-controlsWrap").selectAll("*").remove();j.attr("transform","translate("+h.left+","+h.top+")"),k&&Y.select(".nv-y.nv-axis").attr("transform","translate("+I+",0)");var G=d.filter(function(t){return t.tempDisabled});j.select(".tempDisabled").remove(),G.length&&j.append("text").attr("class","tempDisabled").attr("x",I/2).attr("y","-.71em").style("text-anchor","end").text(G.map(function(t){return t.key}).join(", ")+" values cannot be calculated for this time period."),w&&(f.width(I).height(R).margin({left:h.left,top:h.top}).svgContainer(W).xScale(i),j.select(".nv-interactive").call(f)),q.select(".nv-background").append("rect"),Y.select(".nv-background rect").attr("width",I).attr("height",R),a.y(function(t){return t.display.y}).width(I).height(R).color(d.map(function(t,n){return t.color||g(t,n)}).filter(function(t,n){return!d[n].disabled&&!d[n].tempDisabled}));var U=Y.select(".nv-linesWrap").datum(d.filter(function(t){return!t.disabled&&!t.tempDisabled}));U.call(a),d.forEach(function(t,n){t.seriesIndex=n});var Z=d.filter(function(t){return!t.disabled&&!!N(t)}),$=Y.select(".nv-avgLinesWrap").selectAll("line").data(Z,function(t){return t.key}),K=function(t){var n=o(N(t));return 0>n?0:n>R?R:n};$.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(t,n){return a.color()(t,t.seriesIndex)}).attr("x1",0).attr("x2",I).attr("y1",K).attr("y2",K),$.style("stroke-opacity",function(t){var n=o(N(t));return 0>n||n>R?0:1}).attr("x1",0).attr("x2",I).attr("y1",K).attr("y2",K),$.exit().remove();var Q=U.selectAll(".nv-indexLine").data([z]);Q.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).style("pointer-events","all").call(H),Q.attr("transform",function(t){return"translate("+T(t.i)+",0)"}).attr("height",R),x&&(u.scale(i)._ticks(r.utils.calcTicksX(I/70,d)).tickSize(-R,0),Y.select(".nv-x.nv-axis").attr("transform","translate(0,"+o.range()[0]+")"),Y.select(".nv-x.nv-axis").call(u)),b&&(l.scale(o)._ticks(r.utils.calcTicksY(R/36,d)).tickSize(-I,0),Y.select(".nv-y.nv-axis").call(l)),Y.select(".nv-background rect").on("click",function(){z.x=d3.mouse(this)[0],z.i=Math.round(T.invert(z.x)),C.index=z.i,D.stateChange(C),E()}),a.dispatch.on("elementClick",function(t){z.i=t.pointIndex,z.x=T(z.i),C.index=z.i,D.stateChange(C),E()}),c.dispatch.on("legendClick",function(n,r){n.disabled=!n.disabled,A=!n.disabled,C.rescaleY=A,A||(L=e(d)),D.stateChange(C),t.update()}),s.dispatch.on("stateChange",function(n){for(var e in n)C[e]=n[e];D.stateChange(C),t.update()}),f.dispatch.on("elementMousemove",function(n){a.clearHighlights();var e,i,o,s=[];if(d.filter(function(t,n){return t.seriesIndex=n,!(t.disabled||t.tempDisabled)}).forEach(function(u,l){i=r.interactiveBisect(u.values,n.pointXValue,t.x()),a.highlightPoint(l,i,!0);var c=u.values[i];void 0!==c&&(void 0===e&&(e=c),void 0===o&&(o=t.xScale()(t.x()(c,i))),s.push({key:u.key,value:t.y()(c,i),color:g(u,u.seriesIndex)}))}),s.length>2){var c=t.yScale().invert(n.mouseY),h=.03*Math.abs(t.yScale().domain()[0]-t.yScale().domain()[1]),p=r.nearestValueIndex(s.map(function(t){return t.value}),c,h);null!==p&&(s[p].highlight=!0)}var v=u.tickFormat()(t.x()(e,i),i);f.tooltip.valueFormatter(function(t,n){return l.tickFormat()(t)}).data({value:v,series:s})(),f.renderGuideLine(o)}),f.dispatch.on("elementMouseout",function(t){a.clearHighlights()}),D.on("changeState",function(n){void 0!==n.disabled&&(d.forEach(function(t,e){t.disabled=n.disabled[e]}),C.disabled=n.disabled),void 0!==n.index&&(z.i=n.index,z.x=T(z.i),C.index=n.index,Q.data([z])),void 0!==n.rescaleY&&(A=n.rescaleY),t.update()})}),O.renderEnd("cumulativeLineChart immediate"),t}function n(t,n){return I||(I=a.y()),n.map(function(n,e){if(!n.values)return n;var r=n.values[t];if(null==r)return n;var i=I(r,t);return Math.abs(i)<1e-5&&!W?(n.tempDisabled=!0,n):(n.tempDisabled=!1,n.values=n.values.map(function(t,n){return t.display={y:(I(t,n)-i)/i},t}),n)})}function e(t){var n=t.filter(function(t){return!(t.disabled||t.tempDisabled)}).map(function(t,n){return d3.extent(t.values,function(t){return t.display.y})});return[d3.min(n,function(t){return t[0]}),d3.max(n,function(t){return t[1]})]}var i,o,a=r.models.line(),u=r.models.axis(),l=r.models.axis(),s=r.models.legend(),c=r.models.legend(),f=r.interactiveGuideline(),d=r.models.tooltip(),h={top:30,right:30,bottom:50,left:60},p=null,g=r.utils.defaultColor(),v=null,m=null,y=!0,x=!0,b=!0,k=!1,M=!0,w=!1,A=!0,_=a.id(),C=r.utils.state(),S=null,E=null,N=function(t){return t.average},D=d3.dispatch("stateChange","changeState","renderEnd"),F=250,W=!1;C.index=0,C.rescaleY=A,u.orient("bottom").tickPadding(7),l.orient(k?"right":"left"),d.valueFormatter(function(t,n){return l.tickFormat()(t,n)}).headerFormatter(function(t,n){return u.tickFormat()(t,n)}),c.updateState(!1);var L,T=d3.scale.linear(),z={i:0,x:0},O=r.utils.renderWatch(D,F),P=function(t){return function(){return{active:t.map(function(t){return!t.disabled}),index:z.i,rescaleY:A}}},B=function(t){return function(n){void 0!==n.index&&(z.i=n.index),void 0!==n.rescaleY&&(A=n.rescaleY),void 0!==n.active&&t.forEach(function(t,e){t.disabled=!n.active[e]})}};a.dispatch.on("elementMouseover.tooltip",function(n){var e={x:t.x()(n.point),y:t.y()(n.point),color:n.point.color};n.point=e,d.data(n).hidden(!1)}),a.dispatch.on("elementMouseout.tooltip",function(t){d.hidden(!0)});var I=null;return t.dispatch=D,t.lines=a,t.legend=s,t.controls=c,t.xAxis=u,t.yAxis=l,t.interactiveLayer=f,t.state=C,t.tooltip=d,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return v},set:function(t){v=t}},height:{get:function(){return m},set:function(t){m=t}},showControls:{get:function(){return M},set:function(t){M=t}},showLegend:{get:function(){return y},set:function(t){y=t}},average:{get:function(){return N},set:function(t){N=t}},defaultState:{get:function(){return S},set:function(t){S=t}},noData:{get:function(){return E},set:function(t){E=t}},showXAxis:{get:function(){return x},set:function(t){x=t}},showYAxis:{get:function(){return b},set:function(t){b=t}},noErrorCheck:{get:function(){return W},set:function(t){W=t}},rescaleY:{get:function(){return A},set:function(n){A=n,t.state.rescaleY=n}},margin:{get:function(){return h},set:function(t){void 0!==t.top&&(h.top=t.top,p=t.top),h.right=void 0!==t.right?t.right:h.right,h.bottom=void 0!==t.bottom?t.bottom:h.bottom,h.left=void 0!==t.left?t.left:h.left}},color:{get:function(){return g},set:function(t){g=r.utils.getColor(t),s.color(g)}},useInteractiveGuideline:{get:function(){return w},set:function(n){w=n,!0===n&&(t.interactive(!1),t.useVoronoi(!1))}},rightAlignYAxis:{get:function(){return k},set:function(t){k=t,l.orient(t?"right":"left")}},duration:{get:function(){return F},set:function(t){F=t,a.duration(F),u.duration(F),l.duration(F),O.reset(F)}}}),r.utils.inheritOptions(t,a),r.utils.initOptions(t),t},r.models.discreteBar=function(){"use strict";function t(d){return A.reset(),d.each(function(t){var d=c-s.left-s.right,w=f-s.top-s.bottom;n=d3.select(this),r.utils.initSVG(n),t.forEach(function(t,n){t.values.forEach(function(t){t.series=n})});var _=e&&i?[]:t.map(function(t){return t.values.map(function(t,n){return{x:g(t,n),y:v(t,n),y0:t.y0}})});h.domain(e||d3.merge(_).map(function(t){return t.x})).rangeBands(o||[0,d],.1),p.domain(i||d3.extent(d3.merge(_).map(function(t){return t.y}).concat(m))),x?p.range(a||[w-(p.domain()[0]<0?12:0),p.domain()[1]>0?12:0]):p.range(a||[w,0]),u=u||h,l=l||p.copy().range([p(0),p(0)]);var C=n.selectAll("g.nv-wrap.nv-discretebar").data([t]),S=C.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar").append("g");C.select("g"),S.append("g").attr("class","nv-groups"),C.attr("transform","translate("+s.left+","+s.top+")");var E=C.select(".nv-groups").selectAll(".nv-group").data(function(t){return t},function(t){return t.key});E.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),E.exit().watchTransition(A,"discreteBar: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),E.attr("class",function(t,n){return"nv-group nv-series-"+n}).classed("hover",function(t){return t.hover}),E.watchTransition(A,"discreteBar: groups").style("stroke-opacity",1).style("fill-opacity",.75);var N=E.selectAll("g.nv-bar").data(function(t){return t.values});N.exit().remove();var D=N.enter().append("g").attr("transform",function(t,n,e){return"translate("+(h(g(t,n))+.05*h.rangeBand())+", "+p(0)+")"}).on("mouseover",function(t,n){d3.select(this).classed("hover",!0),k.elementMouseover({data:t,index:n,color:d3.select(this).style("fill")})}).on("mouseout",function(t,n){d3.select(this).classed("hover",!1),k.elementMouseout({data:t,index:n,color:d3.select(this).style("fill")})}).on("mousemove",function(t,n){k.elementMousemove({data:t,index:n,color:d3.select(this).style("fill")})}).on("click",function(t,n){k.elementClick({data:t,index:n,color:d3.select(this).style("fill"),event:d3.event,element:this}),d3.event.stopPropagation()}).on("dblclick",function(t,n){k.elementDblClick({data:t,index:n,color:d3.select(this).style("fill")}),d3.event.stopPropagation()});D.append("rect").attr("height",0).attr("width",.9*h.rangeBand()/t.length),x?(D.append("text").attr("text-anchor","middle"),N.select("text").text(function(t,n){return b(v(t,n))}).watchTransition(A,"discreteBar: bars text").attr("x",.9*h.rangeBand()/2).attr("y",function(t,n){return v(t,n)<0?p(v(t,n))-p(0)+12:-4})):N.selectAll("text").remove(),N.attr("class",function(t,n){return v(t,n)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(t,n){return t.color||y(t,n)}).style("stroke",function(t,n){return t.color||y(t,n)}).select("rect").attr("class",M).watchTransition(A,"discreteBar: bars rect").attr("width",.9*h.rangeBand()/t.length),N.watchTransition(A,"discreteBar: bars").attr("transform",function(t,n){return"translate("+(h(g(t,n))+.05*h.rangeBand())+", "+(v(t,n)<0?p(0):p(0)-p(v(t,n))<1?p(0)-1:p(v(t,n)))+")"}).select("rect").attr("height",function(t,n){return Math.max(Math.abs(p(v(t,n))-p(0)),1)}),u=h.copy(),l=p.copy()}),A.renderEnd("discreteBar immediate"),t}var n,e,i,o,a,u,l,s={top:0,right:0,bottom:0,left:0},c=960,f=500,d=Math.floor(1e4*Math.random()),h=d3.scale.ordinal(),p=d3.scale.linear(),g=function(t){return t.x},v=function(t){return t.y},m=[0],y=r.utils.defaultColor(),x=!1,b=d3.format(",.2f"),k=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),M="discreteBar",w=250,A=r.utils.renderWatch(k,w);return t.dispatch=k,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return c},set:function(t){c=t}},height:{get:function(){return f},set:function(t){f=t}},forceY:{get:function(){return m},set:function(t){m=t}},showValues:{get:function(){return x},set:function(t){x=t}},x:{get:function(){return g},set:function(t){g=t}},y:{get:function(){return v},set:function(t){v=t}},xScale:{get:function(){return h},set:function(t){h=t}},yScale:{get:function(){return p},set:function(t){p=t}},xDomain:{get:function(){return e},set:function(t){e=t}},yDomain:{get:function(){return i},set:function(t){i=t}},xRange:{get:function(){return o},set:function(t){o=t}},yRange:{get:function(){return a},set:function(t){a=t}},valueFormat:{get:function(){return b},set:function(t){b=t}},id:{get:function(){return d},set:function(t){d=t}},rectClass:{get:function(){return M},set:function(t){M=t}},margin:{get:function(){return s},set:function(t){s.top=void 0!==t.top?t.top:s.top,s.right=void 0!==t.right?t.right:s.right,s.bottom=void 0!==t.bottom?t.bottom:s.bottom,s.left=void 0!==t.left?t.left:s.left}},color:{get:function(){return y},set:function(t){y=r.utils.getColor(t)}},duration:{get:function(){return w},set:function(t){w=t,A.reset(w)}}}),r.utils.initOptions(t),t},r.models.discreteBarChart=function(){"use strict";function t(l){return A.reset(),A.models(i),g&&A.models(o),v&&A.models(a),l.each(function(l){var h=d3.select(this);r.utils.initSVG(h);var k=r.utils.availableWidth(f,h,s),A=r.utils.availableHeight(d,h,s);if(t.update=function(){M.beforeUpdate(),h.transition().duration(w).call(t)},t.container=this,!(l&&l.length&&l.filter(function(t){return t.values.length}).length))return r.utils.noData(t,h),t;h.selectAll(".nv-noData").remove(),n=i.xScale(),e=i.yScale().clamp(!0);var _=h.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([l]),C=_.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),S=C.append("defs"),E=_.select("g");C.append("g").attr("class","nv-x nv-axis"),C.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),C.append("g").attr("class","nv-barsWrap"),C.append("g").attr("class","nv-legendWrap"),E.attr("transform","translate("+s.left+","+s.top+")"),p?(u.width(k),E.select(".nv-legendWrap").datum(l).call(u),c||u.height()===s.top||(s.top=u.height(),A=r.utils.availableHeight(d,h,s)),_.select(".nv-legendWrap").attr("transform","translate(0,"+-s.top+")")):E.select(".nv-legendWrap").selectAll("*").remove(),m&&E.select(".nv-y.nv-axis").attr("transform","translate("+k+",0)"),i.width(k).height(A);var N=E.select(".nv-barsWrap").datum(l.filter(function(t){return!t.disabled}));if(N.transition().call(i),S.append("clipPath").attr("id","nv-x-label-clip-"+i.id()).append("rect"),E.select("#nv-x-label-clip-"+i.id()+" rect").attr("width",n.rangeBand()*(y?2:1)).attr("height",16).attr("x",-n.rangeBand()/(y?1:2)),g){o.scale(n)._ticks(r.utils.calcTicksX(k/100,l)).tickSize(-A,0),E.select(".nv-x.nv-axis").attr("transform","translate(0,"+(e.range()[0]+(i.showValues()&&e.domain()[0]<0?16:0))+")"),E.select(".nv-x.nv-axis").call(o);var D=E.select(".nv-x.nv-axis").selectAll("g");y&&D.selectAll("text").attr("transform",function(t,n,e){return"translate(0,"+(e%2==0?"5":"17")+")"}),b&&D.selectAll(".tick text").attr("transform","rotate("+b+" 0,0)").style("text-anchor",b>0?"start":"end"),x&&E.selectAll(".tick text").call(r.utils.wrapTicks,t.xAxis.rangeBand())}v&&(a.scale(e)._ticks(r.utils.calcTicksY(A/36,l)).tickSize(-k,0),E.select(".nv-y.nv-axis").call(a)),E.select(".nv-zeroLine line").attr("x1",0).attr("x2",m?-k:k).attr("y1",e(0)).attr("y2",e(0))}),A.renderEnd("discreteBar chart immediate"),t}var n,e,i=r.models.discreteBar(),o=r.models.axis(),a=r.models.axis(),u=r.models.legend(),l=r.models.tooltip(),s={top:15,right:10,bottom:50,left:60},c=null,f=null,d=null,h=r.utils.getColor(),p=!1,g=!0,v=!0,m=!1,y=!1,x=!1,b=0,k=null,M=d3.dispatch("beforeUpdate","renderEnd"),w=250;o.orient("bottom").showMaxMin(!1).tickFormat(function(t){return t}),a.orient(m?"right":"left").tickFormat(d3.format(",.1f")),l.duration(0).headerEnabled(!1).valueFormatter(function(t,n){return a.tickFormat()(t,n)}).keyFormatter(function(t,n){return o.tickFormat()(t,n)});var A=r.utils.renderWatch(M,w);return i.dispatch.on("elementMouseover.tooltip",function(n){n.series={key:t.x()(n.data),value:t.y()(n.data),color:n.color},l.data(n).hidden(!1)}),i.dispatch.on("elementMouseout.tooltip",function(t){l.hidden(!0)}),i.dispatch.on("elementMousemove.tooltip",function(t){l()}),t.dispatch=M,t.discretebar=i,t.legend=u,t.xAxis=o,t.yAxis=a,t.tooltip=l,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return f},set:function(t){f=t}},height:{get:function(){return d},set:function(t){d=t}},showLegend:{get:function(){return p},set:function(t){p=t}},staggerLabels:{get:function(){return y},set:function(t){y=t}},rotateLabels:{get:function(){return b},set:function(t){b=t}},wrapLabels:{get:function(){return x},set:function(t){x=!!t}},showXAxis:{get:function(){return g},set:function(t){g=t}},showYAxis:{get:function(){return v},set:function(t){v=t}},noData:{get:function(){return k},set:function(t){k=t}},margin:{get:function(){return s},set:function(t){void 0!==t.top&&(s.top=t.top,c=t.top),s.right=void 0!==t.right?t.right:s.right,s.bottom=void 0!==t.bottom?t.bottom:s.bottom,s.left=void 0!==t.left?t.left:s.left}},duration:{get:function(){return w},set:function(t){w=t,A.reset(w),i.duration(w),o.duration(w),a.duration(w)}},color:{get:function(){return h},set:function(t){h=r.utils.getColor(t),i.color(h),u.color(h)}},rightAlignYAxis:{get:function(){return m},set:function(t){m=t,a.orient(t?"right":"left")}}}),r.utils.inheritOptions(t,i),r.utils.initOptions(t),t},r.models.distribution=function(){"use strict";function t(i){return d.reset(),i.each(function(t){var i=("x"===a?(e.left,e.right):(e.top,e.bottom),"x"==a?"y":"x"),c=d3.select(this);r.utils.initSVG(c),n=n||s;var f=c.selectAll("g.nv-distribution").data([t]),h=(f.enter().append("g").attr("class","nvd3 nv-distribution").append("g"),f.select("g"));f.attr("transform","translate("+e.left+","+e.top+")");var p=h.selectAll("g.nv-dist").data(function(t){return t},function(t){return t.key});p.enter().append("g"),p.attr("class",function(t,n){return"nv-dist nv-series-"+n}).style("stroke",function(t,n){return l(t,n)});var g=p.selectAll("line.nv-dist"+a).data(function(t){return t.values});g.enter().append("line").attr(a+"1",function(t,e){return n(u(t,e))}).attr(a+"2",function(t,e){return n(u(t,e))}),d.transition(p.exit().selectAll("line.nv-dist"+a),"dist exit").attr(a+"1",function(t,n){return s(u(t,n))}).attr(a+"2",function(t,n){return s(u(t,n))}).style("stroke-opacity",0).remove(),g.attr("class",function(t,n){return"nv-dist"+a+" nv-dist"+a+"-"+n}).attr(i+"1",0).attr(i+"2",o),d.transition(g,"dist").attr(a+"1",function(t,n){return s(u(t,n))}).attr(a+"2",function(t,n){return s(u(t,n))}),n=s.copy()}),d.renderEnd("distribution immediate"),t}var n,e={top:0,right:0,bottom:0,left:0},i=400,o=8,a="x",u=function(t){return t[a]},l=r.utils.defaultColor(),s=d3.scale.linear(),c=250,f=d3.dispatch("renderEnd"),d=r.utils.renderWatch(f,c);return t.options=r.utils.optionsFunc.bind(t),t.dispatch=f,t.margin=function(n){return arguments.length?(e.top=void 0!==n.top?n.top:e.top,e.right=void 0!==n.right?n.right:e.right,e.bottom=void 0!==n.bottom?n.bottom:e.bottom,e.left=void 0!==n.left?n.left:e.left,t):e},t.width=function(n){return arguments.length?(i=n,t):i},t.axis=function(n){return arguments.length?(a=n,t):a},t.size=function(n){return arguments.length?(o=n,t):o},t.getData=function(n){return arguments.length?(u=d3.functor(n),t):u},t.scale=function(n){return arguments.length?(s=n,t):s},t.color=function(n){return arguments.length?(l=r.utils.getColor(n),t):l},t.duration=function(n){return arguments.length?(c=n,d.reset(c),t):c},t},r.models.focus=function(t){"use strict";function n(b){return x.reset(),x.models(t),d&&x.models(o),h&&x.models(a),b.each(function(x){function b(t){g=u.empty()?null:u.extent();var n=u.empty()?e.domain():u.extent();m.brush({extent:n,brush:u}),u.empty()||u.extent(g),E.data([u.empty()?e.domain():g]).each(function(t,n){var r=e(t[0])-e.range()[0],i=M-e(t[1]);d3.select(this).select(".left").attr("width",0>r?0:r),d3.select(this).select(".right").attr("x",e(t[1])).attr("width",0>i?0:i)}),t&&m.onBrush(n)}var k=d3.select(this);r.utils.initSVG(k);var M=r.utils.availableWidth(c,k,l),w=f-l.top-l.bottom;n.update=function(){0===v?k.call(n):k.transition().duration(v).call(n)},n.container=this,e=t.xScale(),i=t.yScale();var A=k.selectAll("g.nv-focus").data([x]),_=A.enter().append("g").attr("class","nvd3 nv-focus").append("g"),C=A.select("g");A.attr("transform","translate("+l.left+","+l.top+")"),_.append("g").attr("class","nv-background").append("rect"),_.append("g").attr("class","nv-x nv-axis"),_.append("g").attr("class","nv-y nv-axis"),_.append("g").attr("class","nv-contentWrap"),_.a
1ppend("g").attr("class","nv-brushBackground"),_.append("g").attr("class","nv-x nv-brush"),p&&C.select(".nv-y.nv-axis").attr("transform","translate("+M+",0)"),C.select(".nv-background rect").attr("width",M).attr("height",w),t.width(M).height(w).color(x.map(function(t,n){return t.color||s(t,n)}).filter(function(t,n){return!x[n].disabled}));var S=C.select(".nv-contentWrap").datum(x.filter(function(t){return!t.disabled}));d3.transition(S).call(t),u.x(e).on("brush",function(){b(y)}),u.on("brushend",function(){y||m.onBrush(u.empty()?e.domain():u.extent())}),g&&u.extent(g);var E=C.select(".nv-brushBackground").selectAll("g").data([g||u.extent()]),N=E.enter().append("g");N.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",w),N.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",w);var D=C.select(".nv-x.nv-brush").call(u);D.selectAll("rect").attr("height",w),D.selectAll(".resize").append("path").attr("d",function(t){var n=+("e"==t),e=n?1:-1,r=w/3;return"M"+.5*e+","+r+"A6,6 0 0 "+n+" "+6.5*e+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+n+" "+.5*e+","+2*r+"ZM"+2.5*e+","+(r+8)+"V"+(2*r-8)+"M"+4.5*e+","+(r+8)+"V"+(2*r-8)}),b(!0),C.select(".nv-background rect").attr("width",M).attr("height",w),d&&(o.scale(e)._ticks(r.utils.calcTicksX(M/100,x)).tickSize(-w,0),C.select(".nv-x.nv-axis").attr("transform","translate(0,"+i.range()[0]+")"),d3.transition(C.select(".nv-x.nv-axis")).call(o)),h&&(a.scale(i)._ticks(r.utils.calcTicksY(w/36,x)).tickSize(-M,0),d3.transition(C.select(".nv-y.nv-axis")).call(a)),C.select(".nv-x.nv-axis").attr("transform","translate(0,"+i.range()[0]+")")}),x.renderEnd("focus immediate"),n}t=t||r.models.line();var e,i,o=r.models.axis(),a=r.models.axis(),u=d3.svg.brush(),l={top:10,right:0,bottom:30,left:0},s=r.utils.defaultColor(),c=null,f=70,d=!0,h=!1,p=!1,g=null,v=250,m=d3.dis
vendor: 4,591 bytes, line 1
1patch("brush","onBrush","renderEnd"),y=!0;t.interactive(!1),t.pointActive(function(t){return!1});var x=r.utils.renderWatch(m,v);return n.dispatch=m,n.content=t,n.brush=u,n.xAxis=o,n.yAxis=a,n.options=r.utils.optionsFunc.bind(n),n._options=Object.create({},{width:{get:function(){return c},set:function(t){c=t}},height:{get:function(){return f},set:function(t){f=t}},showXAxis:{get:function(){return d},set:function(t){d=t}},showYAxis:{get:function(){return h},set:function(t){h=t}},brushExtent:{get:function(){return g},set:function(t){g=t}},syncBrushing:{get:function(){return y},set:function(t){y=t}},margin:{get:function(){return l},set:function(t){l.top=void 0!==t.top?t.top:l.top,l.right=void 0!==t.right?t.right:l.right,l.bottom=void 0!==t.bottom?t.bottom:l.bottom,l.left=void 0!==t.left?t.left:l.left}},duration:{get:function(){return v},set:function(n){v=n,x.reset(v),t.duration(v),o.duration(v),a.duration(v)}},color:{get:function(){return s},set:function(n){s=r.utils.getColor(n),t.color(s)}},interpolate:{get:function(){return t.interpolate()},set:function(n){t.interpolate(n)}},xTickFormat:{get:function(){return o.tickFormat()},set:function(t){o.tickFormat(t)}},yTickFormat:{get:function(){return a.tickFormat()},set:function(t){a.tickFormat(t)}},x:{get:function(){return t.x()},set:function(n){t.x(n)}},y:{get:function(){return t.y()},set:function(n){t.y(n)}},rightAlignYAxis:{get:function(){return p},set:function(t){p=t,a.orient(p?"right":"left")}}}),r.utils.inheritOptions(n,t),r.utils.initOptions(n),n},r.models.forceDirectedGraph=function(){"use strict";function t(a){return M.reset(),a.each(function(a){o=d3.select(this),r.utils.initSVG(o);var s=r.utils.availableWidth(e,o,n),b=r.utils.availableHeight(i,o,n);if(o.attr("width",s).attr("height",b),!(a&&a.links&&a.nodes))return r.utils.noData(t,o),t;o.selectAll(".nv-noData").remove(),o.selectAll("*").remove();var k=new Set;a.nodes.forEach(function(t){Object.keys(t).forEach(function(t){k.add(t)})});var M=d3.layout.force().nodes(a.nodes).links(a.links).size([s,b]).linkStrength(c).friction(f).linkDistance(d).charge(h).gravity(p).theta(g).alpha(v).start(),w=o.selectAll(".link").data(a.links).enter().append("line").attr("class","nv-force-link").style("stroke-width",function(t){return Math.sqrt(t.value)}),A=o.selectAll(".node").data(a.nodes).enter().append("g").attr("class","nv-force-node").call(M.drag);A.append("circle").attr("r",m).style("fill",function(t){return u(t)}).on("mouseover",function(t){o.select(".nv-series-"+t.seriesIndex+" .nv-distx-"+t.pointIndex).attr("y1",t.py),o.select(".nv-series-"+t.seriesIndex+" .nv-disty-"+t.pointIndex).attr("x2",t.px);var n=u(t);t.series=[],k.forEach(function(e){t.series.push({color:n,key:e,value:t[e]})}),l.data(t).hidden(!1)}).on("mouseout",function(t){l.hidden(!0)}),l.headerFormatter(function(t){return"Node"}),x(w),y(A),M.on("tick",function(){w.attr("x1",function(t){return t.source.x}).attr("y1",function(t){return t.source.y}).attr("x2",function(t){return t.target.x}).attr("y2",function(t){return t.target.y}),A.attr("transform",function(t){return"translate("+t.x+", "+t.y+")"})})}),t}var n={top:2,right:0,bottom:2,left:0},e=400,i=32,o=null,a=d3.dispatch("renderEnd"),u=r.utils.getColor(["#000"]),l=r.models.tooltip(),s=null,c=.1,f=.9,d=30,h=-120,p=.1,g=.8,v=.1,m=5,y=function(t){},x=function(t){},b=d3.functor(0),k=d3.functor(0),M=r.utils.renderWatch(a);return t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return e},set:function(t){e=t}},height:{get:function(){return i},set:function(t){i=t}},linkStrength:{get:function(){return c},set:function(t){c=t}},friction:{get:function(){return f},set:function(t){f=t}},linkDist:{get:function(){return d},set:function(t){d=t}},charge:{get:function(){return h},set:function(t){h=t}},gravity:{get:function(){return p},set:function(t){p=t}},theta:{get:function(){return g},set:function(t){g=t}},alpha:{get:function(){return v},set:function(t){v=t}},radius:{get:function(){return m},set:function(t){m=t}},x:{get:function(){return b},set:function(t){b=d3.functor(t)}},y:{get:function(){return k},set:function(t){k=d3.functor(t)}},margin:{get:function(){return n},set:function(t){n.top=void 0!==t.top?t.top:n.top,n.right=void 0!==t.right?t.right:n.right,n.bottom=void 0!==t.bottom?t.bottom:n.bottom,n.left=void 0!==t.left?t.left:n.left}},color:{get:function(){return u},set:function(t){u=r.utils.getColor(t)}},noData:{get:function(){return s},set:function(t){s=t}},nodeExtras:{get:function(){return y},set:function(t){y=t}},linkExtras:{get:function(){return x},set:function(t){x=t}}}
1),t.dispatch=a,t.tooltip=l,r.utils.initOptions(t),t},r.models.furiousLegend=function(){"use strict";function t(m){function y(t,n){return"furious"!=v?"#000":p?t.disengaged?u(t,n):"#fff":p?void 0:t.disabled?u(t,n):"#fff"}function x(t,n){return p&&"furious"==v?t.disengaged?"#fff":u(t,n):t.disabled?"#fff":u(t,n)}return m.each(function(t){var m=e-n.left-n.right,b=d3.select(this);r.utils.initSVG(b);var k=b.selectAll("g.nv-legend").data([t]),M=(k.enter().append("g").attr("class","nvd3 nv-legend").append("g"),k.select("g"));k.attr("transform","translate("+n.left+","+n.top+")");var w,A=M.selectAll(".nv-series").data(function(t){return"furious"!=v?t:t.filter(function(t){return!!p||!t.disengaged})}),_=A.enter().append("g").attr("class","nv-series");"classic"==v?(_.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),w=A.select("circle")):"furious"==v&&(_.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),w=A.select("rect"),_.append("g").attr("class","nv-check-box").property("innerHTML",'<path d="M0.5,5 L22.5,5 L22.5,26.5 L0.5,26.5 L0.5,5 Z" class="nv-box"></path><path d="M5.5,12.8618467 L11.9185089,19.2803556 L31,0.198864511" class="nv-check"></path>').attr("transform","translate(-10,-8)scale(0.5)"),A.select(".nv-check-box").each(function(t,n){d3.select(this).selectAll("path").attr("stroke",y(t,n))})),_.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var C,S=A.select("text.nv-legend-text");switch(A.on("mouseover",function(t,n){g.legendMouseover(t,n)}).on("mouseout",function(t,n){g.legendMouseout(t,n)}).on("click",function(t,n){g.legendClick(t,n);var e=A.data();if(d){if("classic"==v)h?(e.forEach(function(t){t.disabled=!0}),t.disabled=!1):(t.disabled=!t.disabled,e.every(function(t){return t.disabled})&&e.forEach(function(t){t.disabled=!1}));else if("furious"==v)if(p)t.disengaged=!t.disengaged,t.userDisabled=null==t.userDisabled?!!t.disabled:t.userDisabled,t.disabled=t.disengaged||t.userDisabled;else if(!p){t.disabled=!t.disabled,t.userDisabled=t.disabled;var r=e.filter(function(t){return!t.disengaged});r.every(function(t){return t.userDisabled})&&e.forEach(function(t){t.disabled=t.userDisabled=!1})}g.stateChange({disabled:e.map(function(t){return!!t.disabled}),disengaged:e.map(function(t){return!!t.disengaged})})}}).on("dblclick",function(t,n){if(("furious"!=v||!p)&&(g.legendDblclick(t,n),d)){var e=A.data();e.forEach(function(t){t.disabled=!0,"furious"==v&&(t.userDisabled=t.disabled)}),t.disabled=!1,"furious"==v&&(t.userDisabled=t.disabled),g.stateChange({disabled:e.map(function(t){return!!t.disabled})})}}),A.classed("nv-disabled",function(t){return t.userDisabled}),A.exit().remove(),S.attr("fill",y).text(function(t){return a(o(t))}),v){case"furious":C=23;break;case"classic":C=20}if(s){var E=[];A.each(function(t,n){var e,i;if(a(o(t))&&a(o(t)).length>l){var u=a(o(t)).substring(0,l);e=d3.select(this).select("text").text(u+"..."),d3.select(this).append("svg:title").text(a(o(t)))}else e=d3.select(this).select("text");try{if(0>=(i=e.node().getComputedTextLength()))throw Error()}catch(t){i=r.utils.calcApproxTextWidth(e)}E.push(i+c)});for(var N=0,D=0,F=[];m>D&&N<E.length;)F[N]=E[N],D+=E[N++];for(0===N&&(N=1);D>m&&N>1;){F=[],N--;for(var W=0;W<E.length;W++)E[W]>(F[W%N]||0)&&(F[W%N]=E[W]);D=F.reduce(function(t,n,e,r){return t+n})}for(var L=[],T=0,z=0;N>T;T++)L[T]=z,z+=F[T];A.attr("transform",function(t,n){return"translate("+L[n%N]+","+(5+Math.floor(n/N)*C)+")"}),f?M.attr("transform","translate("+(e-n.right-D)+","+n.top+")"):M.attr("transform","translate(0,"+n.top+")"),i=n.top+n.bottom+Math.ceil(E.length/N)*C}else{var O,P=5,B=5,I=0;A.attr("transform",function(t,r){var i=d3.select(this).select("text").node().getComputedTextLength()+c;return O=B,e<n.left+n.right+O+i&&(B=O=5,P+=C),(B+=i)>I&&(I=B),"translate("+O+","+P+")"}),M.attr("transform","translate("+(e-n.right-I)+","+n.top+")"),i=n.top+n.bottom+P+15}"furious"==v&&w.attr("width",function(t,n){return S[0][n].getComputedTextLength()+27}).attr("height",18).attr("y",-9).attr("x",-15),w.style("fill",x).style("stroke",function(t,n){return t.color||u(t,n)})}),t}var n={top:5,right:0,bottom:5,left:0},e=400,i=20,o=function(t){return t.key},a=function(t){return t},u=r.utils.getColor(),l=20,s=!0,c=28,f=!0,d=!0,h=!1,p=!1,g=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),v="classic";return t.dispatch=g,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return e},set:function(t){e=t}},height:{get:function(){return i},set:function(t){i=t}},key:{get:function(){return o}
vendor: 12,481 bytes, line 1
1,set:function(t){o=t}},keyFormatter:{get:function(){return a},set:function(t){a=t}},align:{get:function(){return s},set:function(t){s=t}},rightAlign:{get:function(){return f},set:function(t){f=t}},maxKeyLength:{get:function(){return l},set:function(t){l=t}},padding:{get:function(){return c},set:function(t){c=t}},updateState:{get:function(){return d},set:function(t){d=t}},radioButtonMode:{get:function(){return h},set:function(t){h=t}},expanded:{get:function(){return p},set:function(t){p=t}},vers:{get:function(){return v},set:function(t){v=t}},margin:{get:function(){return n},set:function(t){n.top=void 0!==t.top?t.top:n.top,n.right=void 0!==t.right?t.right:n.right,n.bottom=void 0!==t.bottom?t.bottom:n.bottom,n.left=void 0!==t.left?t.left:n.left}},color:{get:function(){return u},set:function(t){u=r.utils.getColor(t)}}}),r.utils.initOptions(t),t},r.models.historicalBar=function(){"use strict";function t(w){return w.each(function(t){M.reset(),c=d3.select(this);var w=r.utils.availableWidth(u,c,a),A=r.utils.availableHeight(l,c,a);r.utils.initSVG(c),f.domain(n||d3.extent(t[0].values.map(h).concat(g))),m?f.range(i||[.5*w/t[0].values.length,w*(t[0].values.length-.5)/t[0].values.length]):f.range(i||[0,w]),d.domain(e||d3.extent(t[0].values.map(p).concat(v))).range(o||[A,0]),f.domain()[0]===f.domain()[1]&&(f.domain()[0]?f.domain([f.domain()[0]-.01*f.domain()[0],f.domain()[1]+.01*f.domain()[1]]):f.domain([-1,1])),d.domain()[0]===d.domain()[1]&&(d.domain()[0]?d.domain([d.domain()[0]+.01*d.domain()[0],d.domain()[1]-.01*d.domain()[1]]):d.domain([-1,1]));var _=c.selectAll("g.nv-wrap.nv-historicalBar-"+s).data([t[0].values]),C=_.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBar-"+s),S=C.append("defs"),E=C.append("g"),N=_.select("g");E.append("g").attr("class","nv-bars"),_.attr("transform","translate("+a.left+","+a.top+")"),c.on("click",function(t,n){b.chartClick({data:t,index:n,pos:d3.event,id:s})}),S.append("clipPath").attr("id","nv-chart-clip-path-"+s).append("rect"),_.select("#nv-chart-clip-path-"+s+" rect").attr("width",w).attr("height",A),N.attr("clip-path",y?"url(#nv-chart-clip-path-"+s+")":"");var D=_.select(".nv-bars").selectAll(".nv-bar").data(function(t){return t},function(t,n){return h(t,n)});D.exit().remove(),D.enter().append("rect").attr("x",0).attr("y",function(t,n){return r.utils.NaNtoZero(d(Math.max(0,p(t,n))))}).attr("height",function(t,n){return r.utils.NaNtoZero(Math.abs(d(p(t,n))-d(0)))}).attr("transform",function(n,e){return"translate("+(f(h(n,e))-w/t[0].values.length*.45)+",0)"}).on("mouseover",function(t,n){k&&(d3.select(this).classed("hover",!0),b.elementMouseover({data:t,index:n,color:d3.select(this).style("fill")}))}).on("mouseout",function(t,n){k&&(d3.select(this).classed("hover",!1),b.elementMouseout({data:t,index:n,color:d3.select(this).style("fill")}))}).on("mousemove",function(t,n){k&&b.elementMousemove({data:t,index:n,color:d3.select(this).style("fill")})}).on("click",function(t,n){k&&(b.elementClick({data:t,index:n,color:d3.select(this).style("fill"),event:d3.event,element:this}),d3.event.stopPropagation())}).on("dblclick",function(t,n){k&&(b.elementDblClick({data:t,index:n,color:d3.select(this).style("fill")}),d3.event.stopPropagation())}),D.attr("fill",function(t,n){return x(t,n)}).attr("class",function(t,n,e){return(p(t,n)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+e+"-"+n}).watchTransition(M,"bars").attr("transform",function(n,e){return"translate("+(f(h(n,e))-w/t[0].values.length*.45)+",0)"}).attr("width",w/t[0].values.length*.9),D.watchTransition(M,"bars").attr("y",function(t,n){var e=p(t,n)<0?d(0):d(0)-d(p(t,n))<1?d(0)-1:d(p(t,n));return r.utils.NaNtoZero(e)}).attr("height",function(t,n){return r.utils.NaNtoZero(Math.max(Math.abs(d(p(t,n))-d(0)),1))})}),M.renderEnd("historicalBar immediate"),t}var n,e,i,o,a={top:0,right:0,bottom:0,left:0},u=null,l=null,s=Math.floor(1e4*Math.random()),c=null,f=d3.scale.linear(),d=d3.scale.linear(),h=function(t){return t.x},p=function(t){return t.y},g=[],v=[0],m=!1,y=!0,x=r.utils.defaultColor(),b=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),k=!0,M=r.utils.renderWatch(b,0);return t.highlightPoint=function(t,n){c.select(".nv-bars .nv-bar-0-"+t).classed("hover",n)},t.clearHighlights=function(){c.select(".nv-bars .nv-bar.hover").classed("hover",!1)},t.dispatch=b,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return u},set:function(t){u=t}},height:{get:function(){return l},set:function(t){l=t}},forceX:{get:function(){return g},set:function(t){g=t}},forceY:{get:function(){return v},set:function(t){v=t}},padData:{get:function(){return m},set:function(t){m=t}},x:{get:function(){return h},set:function(t){h=t}},y:{get:function(){return p},set:function(t){p=t}},xScale:{get:function(){return f},set:function(t){f=t}},yScale:{get:function(){return d},set:function(t){d=t}},xDomain:{get:function(){return n},set:function(t){n=t}},yDomain:{get:function(){return e},set:function(t){e=t}},xRange:{get:function(){return i},set:function(t){i=t}},yRange:{get:function(){return o},set:function(t){o=t}},clipEdge:{get:function(){return y},set:function(t){y=t}},id:{get:function(){return s},set:function(t){s=t}},interactive:{get:function(){return k},set:function(t){k=t}},margin:{get:function(){return a},set:function(t){a.top=void 0!==t.top?t.top:a.top,a.right=void 0!==t.right?t.right:a.right,a.bottom=void 0!==t.bottom?t.bottom:a.bottom,a.left=void 0!==t.left?t.left:a.left}},color:{get:function(){return x},set:function(t){x=r.utils.getColor(t)}}}),r.utils.initOptions(t),t},r.models.historicalBarChart=function(t){"use strict";function n(t){return t.each(function(c){C.reset(),C.models(o),m&&C.models(a),y&&C.models(u);var w=d3.select(this);r.utils.initSVG(w);var S,E=r.utils.availableWidth(p,w,f),N=r.utils.availableHeight(g,w,f);if(n.update=function(){w.transition().duration(_).call(n)},n.container=this,k.disabled=c.map(function(t){return!!t.disabled}),!M)for(S in M={},k)k[S]instanceof Array?M[S]=k[S].slice(0):M[S]=k[S];if(!(c&&c.length&&c.filter(function(t){return t.values.length}).length))return r.utils.noData(n,w),n;w.selectAll(".nv-noData").remove(),e=o.xScale(),i=o.yScale();var D=w.selectAll("g.nv-wrap.nv-historicalBarChart").data([c]),F=D.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBarChart").append("g"),W=D.select("g");F.append("g").attr("class","nv-x nv-axis"),F.append("g").attr("class","nv-y nv-axis"),F.append("g").attr("class","nv-barsWrap"),F.append("g").attr("class","nv-legendWrap"),F.append("g").attr("class","nv-interactive"),v?(l.width(E),W.select(".nv-legendWrap").datum(c).call(l),d||l.height()===f.top||(f.top=l.height(),N=r.utils.availableHeight(g,w,f)),D.select(".nv-legendWrap").attr("transform","translate(0,"+-f.top+")")):W.select(".nv-legendWrap").selectAll("*").remove(),D.attr("transform","translate("+f.left+","+f.top+")"),x&&W.select(".nv-y.nv-axis").attr("transform","translate("+E+",0)"),b&&(s.width(E).height(N).margin({left:f.left,top:f.top}).svgContainer(w).xScale(e),D.select(".nv-interactive").call(s)),o.width(E).height(N).color(c.map(function(t,n){return t.color||h(t,n)}).filter(function(t,n){return!c[n].disabled}));var L=W.select(".nv-barsWrap").datum(c.filter(function(t){return!t.disabled}));L.transition().call(o),m&&(a.scale(e)._ticks(r.utils.calcTicksX(E/100,c)).tickSize(-N,0),W.select(".nv-x.nv-axis").attr("transform","translate(0,"+i.range()[0]+")"),W.select(".nv-x.nv-axis").transition().call(a)),y&&(u.scale(i)._ticks(r.utils.calcTicksY(N/36,c)).tickSize(-E,0),W.select(".nv-y.nv-axis").transition().call(u)),s.dispatch.on("elementMousemove",function(t){o.clearHighlights();var e,i,l,f=[];c.filter(function(t,n){return t.seriesIndex=n,!t.disabled}).forEach(function(a,u){i=r.interactiveBisect(a.values,t.pointXValue,n.x()),o.highlightPoint(i,!0);var s=a.values[i];void 0!==s&&(void 0===e&&(e=s),void 0===l&&(l=n.xScale()(n.x()(s,i))),f.push({key:a.key,value:n.y()(s,i),color:h(a,a.seriesIndex),data:a.values[i]}))});var d=a.tickFormat()(n.x()(e,i));s.tooltip.valueFormatter(function(t,n){return u.tickFormat()(t)}).data({value:d,index:i,series:f})(),s.renderGuideLine(l)}),s.dispatch.on("elementMouseout",function(t){A.tooltipHide(),o.clearHighlights()}),l.dispatch.on("legendClick",function(e,r){e.disabled=!e.disabled,c.filter(function(t){return!t.disabled}).length||c.map(function(t){return t.disabled=!1,D.selectAll(".nv-series").classed("disabled",!1),t}),k.disabled=c.map(function(t){return!!t.disabled}),A.stateChange(k),t.transition().call(n)}),l.dispatch.on("legendDblclick",function(t){c.forEach(function(t){t.disabled=!0}),t.disabled=!1,k.disabled=c.map(function(t){return!!t.disabled}),A.stateChange(k),n.update()}),A.on("changeState",function(t){void 0!==t.disabled&&(c.forEach(function(n,e){n.disabled=t.disabled[e]}),k.disabled=t.disabled),n.update()})}),C.renderEnd("historicalBarChart immediate"),n}var e,i,o=t||r.models.historicalBar(),a=r.models.axis(),u=r.models.axis(),l=r.models.legend(),s=r.interactiveGuideline(),c=r.models.tooltip(),f={top:30,right:90,bottom:50,left:90},d=null,h=r.utils.defaultColor(),p=null,g=null,v=!1,m=!0,y=!0,x=!1,b=!1,k={},M=null,w=null,A=d3.dispatch("tooltipHide","stateChange","changeState","renderEnd"),_=250;a.orient("bottom").tickPadding(7),u.orient(x?"right":"left"),c.duration(0).headerEnabled(!1).valueFormatter(function(t,n){return u.tickFormat()(t,n)}).headerFormatter(function(t,n){return a.tickFormat()(t,n)});var C=r.utils.renderWatch(A,0);return o.dispatch.on("elementMouseover.tooltip",function(t){t.series={key:n.x()(t.data),value:n.y()(t.data),color:t.color},c.data(t).hidden(!1)}),o.dispatch.on("elementMouseout.tooltip",function(t){c.hidden(!0)}),o.dispatch.on("elementMousemove.tooltip",function(t){c()}),n.dispatch=A,n.bars=o,n.legend=l,n.xAxis=a,n.yAxis=u,n.interactiveLayer=s,n.tooltip=c,n.options=r.utils.optionsFunc.bind(n),n._options=Object.create({},{width:{get:function(){return p},set:function(t){p=t}},height:{get:function(){return g},set:function(t){g=t}},showLegend:{get:function(){return v},set:function(t){v=t}},showXAxis:{get:function(){return m},set:function(t){m=t}},showYAxis:{get:function(){return y},set:function(t){y=t}},defaultState:{get:function(){return M},set:function(t){M=t}},noData:{get:function(){return w},set:function(t){w=t}},margin:{get:function(){return f},set:function(t){void 0!==t.top&&(f.top=t.top,d=t.top),f.right=void 0!==t.right?t.right:f.right,f.bottom=void 0!==t.bottom?t.bottom:f.bottom,f.left=void 0!==t.left?t.left:f.left}},color:{get:function(){return h},set:function(t){h=r.utils.getColor(t),l.color(h),o.color(h)}},duration:{get:function(){return _},set:function(t){_=t,C.reset(_),u.duration(_),a.duration(_)}},rightAlignYAxis:{get:function(){return x},set:function(t){x=t,u.orient(t?"right":"left")}},useInteractiveGuideline:{get:function(){return b},set:function(t){b=t,!0===t&&n.interactive(!1)}}}),r.utils.inheritOptions(n,o),r.utils.initOptions(n),n},r.models.ohlcBarChart=function(){var t=r.models.historicalBarChart(r.models.ohlcBar());return t.useInteractiveGuideline(!0),t.interactiveLayer.tooltip.contentGenerator(function(n){var e=n.series[0].data;return'<h3 style="color: #'+(e.open<e.close?"2ca02c":"d62728")+'">'+n.value+"</h3><table><tr><td>open:</td><td>"+t.yAxis.tickFormat()(e.open)+"</td></tr><tr><td>close:</td><td>"+t.yAxis.tickFormat()(e.close)+"</td></tr><tr><td>high</td><td>"+t.yAxis.tickFormat()(e.high)+"</td></tr><tr><td>low:</td><td>"+t.yAxis.tickFormat()(e.low)+"</td></tr></table>"}),t},r.models.candlestickBarChart=function(){var t=r.models.historicalBarChart(r.models.candlestickBar());return t.useInteractiveGuideline(!0),t.interactiveLayer.tooltip.contentGenerator(function(n){var e=n.series[0].data;return'<h3 style="color: #'+(e.open<e.close?"2ca02c":"d62728")+'">'+n.value+"</h3><table><tr><td>open:</td><td>"+t.yAxis.tickFormat()(e.open)+"</td></tr><tr><td>close:</td><td>"+t.yAxis.tickFormat()(e.close)+"</td></tr><tr><td>high</td><td>"+t.yAxis.tickFormat()(e.high)+"</td></tr><tr><td>low:</td><td>"+t.yAxis.tickFormat()(e.low)+"</td></tr></table>"}),t},r.models.legend=function(){"use strict";function t(y){function x(t,n){return"furious"!=m?"#000":g?t.disengaged?"#000":"#fff":g?void 0:(t.color||(t.color=u(t,n)),t.disabled?t.color:"#fff")}function b(t,n){return g&&"furious"==m&&t.disengaged?"#eee":t.color||u(t,n)}function k(t,n){return g&&"furious"==m?1:t.disabled?0:1}
1return y.each(function(t){var u=e-n.left-n.right,y=d3.select(this);r.utils.initSVG(y);var M=y.selectAll("g.nv-legend").data([t]),w=M.enter().append("g").attr("class","nvd3 nv-legend").append("g"),A=M.select("g");f?M.attr("transform","translate("+-n.right+","+n.top+")"):M.attr("transform","translate("+n.left+","+n.top+")");var _,C,S=A.selectAll(".nv-series").data(function(t){return"furious"!=m?t:t.filter(function(t){return!!g||!t.disengaged})}),E=S.enter().append("g").attr("class","nv-series");switch(m){case"furious":C=23;break;case"classic":C=20}"classic"==m?(E.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),_=S.select(".nv-legend-symbol")):"furious"==m&&(E.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),_=S.select(".nv-legend-symbol"),E.append("g").attr("class","nv-check-box").property("innerHTML",'<path d="M0.5,5 L22.5,5 L22.5,26.5 L0.5,26.5 L0.5,5 Z" class="nv-box"></path><path d="M5.5,12.8618467 L11.9185089,19.2803556 L31,0.198864511" class="nv-check"></path>').attr("transform","translate(-10,-8)scale(0.5)"),S.select(".nv-check-box").each(function(t,n){d3.select(this).selectAll("path").attr("stroke",x(t,n))})),E.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var N=S.select("text.nv-legend-text");S.on("mouseover",function(t,n){v.legendMouseover(t,n)}).on("mouseout",function(t,n){v.legendMouseout(t,n)}).on("click",function(t,n){v.legendClick(t,n);var e=S.data();if(d){if("classic"==m)p?(e.forEach(function(t){t.disabled=!0}),t.disabled=!1):(t.disabled=!t.disabled,e.every(function(t){return t.disabled})&&e.forEach(function(t){t.disabled=!1}));else if("furious"==m)if(g)t.disengaged=!t.disengaged,t.userDisabled=null==t.userDisabled?!!t.disabled:t.userDisabled,t.disabled=t.disengaged||t.userDisabled;else if(!g){t.disabled=!t.disabled,t.userDisabled=t.disabled;var r=e.filter(function(t){return!t.disengaged});r.every(function(t){return t.userDisabled})&&e.forEach(function(t){t.disabled=t.userDisabled=!1})}v.stateChange({disabled:e.map(function(t){return!!t.disabled}),disengaged:e.map(function(t){return!!t.disengaged})})}}).on("dblclick",function(t,n){if(h){if("furious"==m&&g)return;if(v.legendDblclick(t,n),d){var e=S.data();e.forEach(function(t){t.disabled=!0,"furious"==m&&(t.userDisabled=t.disabled)}),t.disabled=!1,"furious"==m&&(t.userDisabled=t.disabled),v.stateChange({disabled:e.map(function(t){return!!t.disabled})})}}}),S.classed("nv-disabled",function(t){return t.userDisabled}),S.exit().remove(),N.attr("fill",x).text(function(t){return a(o(t))});var D=0;if(s){var F=[];S.each(function(t,n){var e,i;if(a(o(t))&&a(o(t)).length>l){var u=a(o(t)).substring(0,l);e=d3.select(this).select("text").text(u+"..."),d3.select(this).append("svg:title").text(a(o(t)))}else e=d3.select(this).select("text");try{if(0>=(i=e.node().getComputedTextLength()))throw Error()}catch(t){i=r.utils.calcApproxTextWidth(e)}F.push(i+c)});var W=0,L=[];for(D=0;u>D&&W<F.length;)L[W]=F[W],D+=F[W++];for(0===W&&(W=1);D>u&&W>1;){L=[],W--;for(var T=0;T<F.length;T++)F[T]>(L[T%W]||0)&&(L[T%W]=F[T]);D=L.reduce(function(t,n,e,r){return t+n})}for(var z=[],O=0,P=0;W>O;O++)z[O]=P,P+=L[O];S.attr("transform",function(t,n){return"translate("+z[n%W]+","+(5+Math.floor(n/W)*C)+")"}),f?A.attr("transform","translate("+(e-n.right-D)+","+n.top+")"):A.attr("transform","translate(0,"+n.top+")"),i=n.top+n.bottom+Math.ceil(F.length/W)*C}else{var B,I=5,R=5,H=0;S.attr("transform",function(t,r){var i=d3.select(this).select("text").node().getComputedTextLength()+c;return B=R,e<n.left+n.right+B+i&&(R=B=5,I+=C),(R+=i)>H&&(H=R),B+H>D&&(D=B+H),"translate("+B+","+I+")"}),A.attr("transform","translate("+(e-n.right-H)+","+n.top+")"),i=n.top+n.bottom+I+15}"furious"==m&&(_.attr("width",function(t,n){return N[0][n].getComputedTextLength()+27}).attr("height",18).attr("y",-9).attr("x",-15),w.insert("rect",":first-child").attr("class","nv-legend-bg").attr("fill","#eee").attr("opacity",0),A.select(".nv-legend-bg").transition().duration(300).attr("x",-C).attr("width",D+C-12).attr("height",i+10).attr("y",-n.top-10).attr("opacity",g?1:0)),_.style("fill",b).style("fill-opacity",k).style("stroke",b)}),t}var n={top:5,right:0,bottom:5,left:0},e=400,i=20,o=function(t){return t.key},a=function(t){return t},u=r.utils.getColor(),l=20,s=!0,c=32,f=!0,d=!0,h=!0,p=!1,g=!1,v=d3.dis
vendor: 8,931 bytes, line 1
1patch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),m="classic";return t.dispatch=v,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return e},set:function(t){e=t}},height:{get:function(){return i},set:function(t){i=t}},key:{get:function(){return o},set:function(t){o=t}},keyFormatter:{get:function(){return a},set:function(t){a=t}},align:{get:function(){return s},set:function(t){s=t}},maxKeyLength:{get:function(){return l},set:function(t){l=t}},rightAlign:{get:function(){return f},set:function(t){f=t}},padding:{get:function(){return c},set:function(t){c=t}},updateState:{get:function(){return d},set:function(t){d=t}},enableDoubleClick:{get:function(){return h},set:function(t){h=t}},radioButtonMode:{get:function(){return p},set:function(t){p=t}},expanded:{get:function(){return g},set:function(t){g=t}},vers:{get:function(){return m},set:function(t){m=t}},margin:{get:function(){return n},set:function(t){n.top=void 0!==t.top?t.top:n.top,n.right=void 0!==t.right?t.right:n.right,n.bottom=void 0!==t.bottom?t.bottom:n.bottom,n.left=void 0!==t.left?t.left:n.left}},color:{get:function(){return u},set:function(t){u=r.utils.getColor(t)}}}),r.utils.initOptions(t),t},r.models.line=function(){"use strict";function t(m){return k.reset(),k.models(i),m.each(function(t){l=d3.select(this);var m=r.utils.availableWidth(a,l,o),y=r.utils.availableHeight(u,l,o);r.utils.initSVG(l),n=i.xScale(),e=i.yScale(),x=x||n,b=b||e;var M=l.selectAll("g.nv-wrap.nv-line").data([t]),w=M.enter().append("g").attr("class","nvd3 nv-wrap nv-line"),A=w.append("defs"),_=w.append("g"),C=M.select("g");_.append("g").attr("class","nv-groups"),_.append("g").attr("class","nv-scatterWrap"),M.attr("transform","translate("+o.left+","+o.top+")"),i.width(m).height(y);var S=M.select(".nv-scatterWrap");S.call(i),A.append("clipPath").attr("id","nv-edge-clip-"+i.id()).append("rect"),M.select("#nv-edge-clip-"+i.id()+" rect").attr("width",m).attr("height",y>0?y:0),C.attr("clip-path",g?"url(#nv-edge-clip-"+i.id()+")":""),S.attr("clip-path",g?"url(#nv-edge-clip-"+i.id()+")":"");var E=M.select(".nv-groups").selectAll(".nv-group").data(function(t){return t},function(t){return t.key});E.enter().append("g").style("stroke-opacity",1e-6).style("stroke-width",function(t){return t.strokeWidth||s}).style("fill-opacity",1e-6),E.exit().remove(),E.attr("class",function(t,n){return(t.classed||"")+" nv-group nv-series-"+n}).classed("hover",function(t){return t.hover}).style("fill",function(t,n){return c(t,n)}).style("stroke",function(t,n){return c(t,n)}),E.watchTransition(k,"line: groups").style("stroke-opacity",1).style("fill-opacity",function(t){return t.fillOpacity||.5});var N=E.selectAll("path.nv-area").data(function(t){return p(t)?[t]:[]});N.enter().append("path").attr("class","nv-area").attr("d",function(t){return d3.svg.area().interpolate(v).defined(h).x(function(t,n){return r.utils.NaNtoZero(x(f(t,n)))}).y0(function(t,n){return r.utils.NaNtoZero(b(d(t,n)))}).y1(function(t,n){return b(e.domain()[0]<=0?e.domain()[1]>=0?0:e.domain()[1]:e.domain()[0])}).apply(this,[t.values])}),E.exit().selectAll("path.nv-area").remove(),N.watchTransition(k,"line: areaPaths").attr("d",function(t){return d3.svg.area().interpolate(v).defined(h).x(function(t,e){return r.utils.NaNtoZero(n(f(t,e)))}).y0(function(t,n){return r.utils.NaNtoZero(e(d(t,n)))}).y1(function(t,n){return e(e.domain()[0]<=0?e.domain()[1]>=0?0:e.domain()[1]:e.domain()[0])}).apply(this,[t.values])});var D=E.selectAll("path.nv-line").data(function(t){return[t.values]});D.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(v).defined(h).x(function(t,n){return r.utils.NaNtoZero(x(f(t,n)))}).y(function(t,n){return r.utils.NaNtoZero(b(d(t,n)))})),D.watchTransition(k,"line: linePaths").attr("d",d3.svg.line().interpolate(v).defined(h).x(function(t,e){return r.utils.NaNtoZero(n(f(t,e)))}).y(function(t,n){return r.utils.NaNtoZero(e(d(t,n)))})),x=n.copy(),b=e.copy()}),k.renderEnd("line immediate"),t}var n,e,i=r.models.scatter(),o={top:0,right:0,bottom:0,left:0},a=960,u=500,l=null,s=1.5,c=r.utils.defaultColor(),f=function(t){return t.x},d=function(t){return t.y},h=function(t,n){return!isNaN(d(t,n))&&null!==d(t,n)},p=function(t){return t.area},g=!1,v="linear",m=250,y=d3.dispatch("elementClick","elementMouseover","elementMouseout","renderEnd");i.pointSize(16).pointDomain([16,256]);var x,b,k=r.utils.renderWatch(y,m);return t.dispatch=y,t.scatter=i,i.dispatch.on("elementClick",function(){y.elementClick.apply(this,arguments)}),i.dispatch.on("elementMouseover",function(){y.elementMouseover.apply(this,arguments)}),i.dispatch.on("elementMouseout",function(){y.elementMouseout.apply(this,arguments)}),t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return a},set:function(t){a=t}},height:{get:function(){return u},set:function(t){u=t}},defined:{get:function(){return h},set:function(t){h=t}},interpolate:{get:function(){return v},set:function(t){v=t}},clipEdge:{get:function(){return g},set:function(t){g=t}},margin:{get:function(){return o},set:function(t){o.top=void 0!==t.top?t.top:o.top,o.right=void 0!==t.right?t.right:o.right,o.bottom=void 0!==t.bottom?t.bottom:o.bottom,o.left=void 0!==t.left?t.left:o.left}},duration:{get:function(){return m},set:function(t){m=t,k.reset(m),i.duration(m)}},isArea:{get:function(){return p},set:function(t){p=d3.functor(t)}},x:{get:function(){return f},set:function(t){f=t,i.x(t)}},y:{get:function(){return d},set:function(t){d=t,i.y(t)}},color:{get:function(){return c},set:function(t){c=r.utils.getColor(t),i.color(c)}}}),r.utils.inheritOptions(t,i),r.utils.initOptions(t),t},r.models.lineChart=function(){"use strict";function t(s){return E.reset(),E.models(i),y&&E.models(o),x&&E.models(a),s.each(function(s){function _(){y&&B.select(".nv-focus .nv-x.nv-axis").transition().duration(S).call(o)}function E(){x&&B.select(".nv-focus .nv-y.nv-axis").transition().duration(S).call(a)}function F(t){var n=B.select(".nv-focus .nv-linesWrap").datum(s.filter(function(t){return!t.disabled}).map(function(n,e){return{key:n.key,area:n.area,classed:n.classed,values:n.values.filter(function(n,e){return i.x()(n,e)>=t[0]&&i.x()(n,e)<=t[1]}),disableTooltip:n.disableTooltip}}));n.transition().duration(S).call(i),_(),E()}var W=d3.select(this);r.utils.initSVG(W);var L,T=r.utils.availableWidth(p,W,f),z=r.utils.availableHeight(g,W,f)-(M?c.height():0);if(t.update=function(){0===S?W.call(t):W.transition().duration(S).call(t)},t.container=this,w.setter(D(s),t.update).getter(N(s)).update(),w.disabled=s.map(function(t){return!!t.disabled}),!A)for(L in A={},w)w[L]instanceof Array?A[L]=w[L].slice(0):A[L]=w[L];if(!(s&&s.length&&s.filter(function(t){return t.values.length}).length))return r.utils.noData(t,W),t;W.selectAll(".nv-noData").remove(),c.dispatch.on("onBrush",function(t){F(t)}),n=i.xScale(),e=i.yScale();var O=W.selectAll("g.nv-wrap.nv-lineChart").data([s]),P=O.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),B=O.select("g");P.append("g").attr("class","nv-legendWrap");var I=P.append("g").attr("class","nv-focus");I.append("g").attr("class","nv-background").append("rect"),I.append("g").attr("class","nv-x nv-axis"),I.append("g").attr("class","nv-y nv-axis"),I.append("g").attr("class","nv-linesWrap"),I.append("g").attr("class","nv-interactive"),P.append("g").attr("class","nv-focusWrap"),v?(u.width(T),B.select(".nv-legendWrap").datum(s).call(u),"bottom"===m?(f.bottom=o.height()+u.height(),z=r.utils.availableHeight(g,W,f),B.select(".nv-legendWrap").attr("transform","translate(0,"+(z+o.height())+")")):"top"===m&&(d||u.height()===f.top||(f.top=u.height(),z=r.utils.availableHeight(g,W,f)-(M?c.height():0)),O.select(".nv-legendWrap").attr("transform","translate(0,"+-f.top+")"))):B.select(".nv-legendWrap").selectAll("*").remove(),O.attr("transform","translate("+f.left+","+f.top+")"),b&&B.select(".nv-y.nv-axis").attr("transform","translate("+T+",0)"),k&&(l.width(T).height(z).margin({left:f.left,top:f.top}).svgContainer(W).xScale(n),O.select(".nv-interactive").call(l)),B.select(".nv-focus .nv-background rect").attr("width",T).attr("height",z),i.width(T).height(z).color(s.map(function(t,n){return t.color||h(t,n)}).filter(function(t,n){return!s[n].disabled}));var R=B.select(".nv-linesWrap").datum(s.filter(function(t){return!t.disabled}));if(y&&o.scale(n)._ticks(r.utils.calcTicksX(T/100,s)).tickSize(-z,0),x&&a.scale(e)._ticks(r.utils.calcTicksY(z/36,s)).tickSize(-T,0),B.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+z+")"),M||null!==c.brush.extent()){c.width(T),B.select(".nv-focusWrap").style("display",M?"initial":"none").attr("transform","translate(0,"+(z+f.bottom+c.margin().top)+")").call(c);var H=c.brush.empty()?c.xDomain():c.brush.extent();null!==H&&F(H)}else R.call(i),_(),E();u.dispatch.on("stateChange",function(n){for(var e in n)w[e]=n[e];
1C.stateChange(w),t.update()}),l.dispatch.on("elementMousemove",function(e){i.clearHighlights();var o,u,f,d=[];if(s.filter(function(t,n){return t.seriesIndex=n,!t.disabled&&!t.disableTooltip}).forEach(function(a,l){var s=null!==c.brush.extent()?c.brush.empty()?c.xScale().domain():c.brush.extent():n.domain(),p=a.values.filter(function(t,n){return s[0]<=s[1]?i.x()(t,n)>=s[0]&&i.x()(t,n)<=s[1]:i.x()(t,n)>=s[1]&&i.x()(t,n)<=s[0]}),g=p[u=r.interactiveBisect(p,e.pointXValue,i.x())],v=t.y()(g,u);null!==v&&i.highlightPoint(l,u,!0),void 0!==g&&(void 0===o&&(o=g),void 0===f&&(f=t.xScale()(t.x()(g,u))),d.push({key:a.key,value:v,color:h(a,a.seriesIndex),data:g}))}),d.length>2){var p=t.yScale().invert(e.mouseY),g=.03*Math.abs(t.yScale().domain()[0]-t.yScale().domain()[1]),v=r.nearestValueIndex(d.map(function(t){return t.value}),p,g);null!==v&&(d[v].highlight=!0)}l.tooltip.valueFormatter(l.tooltip.valueFormatter()||function(t,n){return null==t?"N/A":a.tickFormat()(t)}).data({value:t.x()(o,u),index:u,series:d})(),l.renderGuideLine(f)}),l.dispatch.on("elementClick",function(n){var e,o=[];s.filter(function(t,n){return t.seriesIndex=n,!t.disabled}).forEach(function(i){var a=r.interactiveBisect(i.values,n.pointXValue,t.x()),u=i.values[a];if(void 0!==u){void 0===e&&(e=t.xScale()(t.x()(u,a)));var l=t.yScale()(t.y()(u,a));o.push({point:u,pointIndex:a,pos:[e,l],seriesIndex:i.seriesIndex,series:i})}}),i.dispatch.elementClick(o)}),l.dispatch.on("elementMouseout",function(t){i.clearHighlights()}),C.on("changeState",function(n){void 0!==n.disabled&&s.length===n.disabled.length&&(s.forEach(function(t,e){t.disabled=n.disabled[e]}),w.disabled=n.disabled),t.update()})}),E.renderEnd("lineChart immediate"),t}var n,e,i=r.models.line(),o=r.models.axis(),a=r.models.axis(),u=r.models.legend(),l=r.interactiveGuideline(),s=r.models.tooltip(),c=r.models.focus(r.models.line()),f={top:30,right:20,bottom:50,left:60},d=null,h=r.utils.defaultColor(),p=null,g=null,v=!0,m="top",y=!0,x=!0,b=!1,k=!1,M=!1,w=r.utils.state(),A=null,_=null,C=d3.dispatch("stateChange","changeState","renderEnd"),S=250;o.orient("bottom").tickPadding(7),a.orient(b?"right":"left"),i.clipEdge(!0).duration(0),s.valueFormatter(function(t,n){return a.tickFormat()(t,n)}).headerFormatter(function(t,n){return o.tickFormat()(t,n)}),l.tooltip.valueFormatter(function(t,n){return a.tickFormat()(t,n)}).headerFormatter(function(t,n){return o.tickFormat()(t,n)});var E=r.utils.renderWatch(C,S),N=function(t){return function(){return{active:t.map(function(t){return!t.disabled})}}},D=function(t){return function(n){void 0!==n.active&&t.forEach(function(t,e){t.disabled=!n.active[e]})}};return i.dispatch.on("elementMouseover.tooltip",function(t){t.series.disableTooltip||s.data(t).hidden(!1)}),i.dispatch.on("elementMouseout.tooltip",function(t){s.hidden(!0)}),t.dispatch=C,t.lines=i,t.legend=u,t.focus=c,t.xAxis=o,t.x2Axis=c.xAxis,t.yAxis=a,t.y2Axis=c.yAxis,t.interactiveLayer=l,t.tooltip=s,t.state=w,t.dispatch=C,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return p},set:function(t){p=t}},height:{get:function(){return g},set:function(t){g=t}},showLegend:{get:function(){return v},set:function(t){v=t}},legendPosition:{get:function(){return m},set:function(t){m=t}},showXAxis:{get:function(){return y},set:function(t){y=t}},showYAxis:{get:function(){return x},set:function(t){x=t}},defaultState:{get:function(){return A},set:function(t){A=t}},noData:{get:function(){return _},set:function(t){_=t}},focusEnable:{get:function(){return M},set:function(t){M=t}},focusHeight:{get:function(){return c.height()},set:function(t){c.height(t)}},focusShowAxisX:{get:function(){return c.showXAxis()},set:function(t){c.showXAxis(t)}},focusShowAxisY:{get:function(){return c.showYAxis()},set:function(t){c.showYAxis(t)}},brushExtent:{get:function(){return c.brushExtent()},set:function(t){c.brushExtent(t)}},focusMargin:{get:function(){return c.margin},set:function(t){void 0!==t.top&&(f.top=t.top,d=t.top),c.margin.right=void 0!==t.right?t.right:c.margin.right,c.margin.bottom=void 0!==t.bottom?t.bottom:c.margin.bottom,c.margin.left
vendor: 5,284 bytes, line 1
1=void 0!==t.left?t.left:c.margin.left}},margin:{get:function(){return f},set:function(t){f.top=void 0!==t.top?t.top:f.top,f.right=void 0!==t.right?t.right:f.right,f.bottom=void 0!==t.bottom?t.bottom:f.bottom,f.left=void 0!==t.left?t.left:f.left}},duration:{get:function(){return S},set:function(t){S=t,E.reset(S),i.duration(S),c.duration(S),o.duration(S),a.duration(S)}},color:{get:function(){return h},set:function(t){h=r.utils.getColor(t),u.color(h),i.color(h),c.color(h)}},interpolate:{get:function(){return i.interpolate()},set:function(t){i.interpolate(t),c.interpolate(t)}},xTickFormat:{get:function(){return o.tickFormat()},set:function(t){o.tickFormat(t),c.xTickFormat(t)}},yTickFormat:{get:function(){return a.tickFormat()},set:function(t){a.tickFormat(t),c.yTickFormat(t)}},x:{get:function(){return i.x()},set:function(t){i.x(t),c.x(t)}},y:{get:function(){return i.y()},set:function(t){i.y(t),c.y(t)}},rightAlignYAxis:{get:function(){return b},set:function(t){b=t,a.orient(b?"right":"left")}},useInteractiveGuideline:{get:function(){return k},set:function(t){(k=t)&&(i.interactive(!1),i.useVoronoi(!1))}}}),r.utils.inheritOptions(t,i),r.utils.initOptions(t),t},r.models.lineWithFocusChart=function(){return r.models.lineChart().margin({bottom:30}).focusEnable(!0)},r.models.linePlusBarChart=function(){"use strict";function t(k){return k.each(function(k){function O(){z=b.empty()?null:b.extent(),n=b.empty()?i.domain():b.extent(),P.brush({extent:n,brush:b}),b.empty()||b.extent(z),ft.data([b.empty()?i.domain():z]).each(function(t,n){var e=i(t[0])-i.range()[0],r=i.range()[1]-i(t[1]);d3.select(this).select(".left").attr("width",0>e?0:e),d3.select(this).select(".right").attr("x",i(t[1])).attr("width",0>r?0:r)}),f.width(Z).height($).color(k.map(function(t,n){return t.color||N(t,n)}).filter(function(t,n){return!k[n].disabled&&k[n].bar})),s.width(Z).height($).color(k.map(function(t,n){return t.color||N(t,n)}).filter(function(t,n){return!k[n].disabled&&!k[n].bar}));var t=it.select(".nv-focus .nv-barsWrap").datum(Q.length?Q.map(function(t,e){return{key:t.key,values:t.values.filter(function(t,e){return f.x()(t,e)>=n[0]&&f.x()(t,e)<=n[1]})}}):[{values:[]}]),u=it.select(".nv-focus .nv-linesWrap").datum(X(J)?[{values:[]}]:J.filter(function(t){return!t.disabled}).map(function(t,e){return{area:t.area,fillOpacity:t.fillOpacity,strokeWidth:t.strokeWidth,key:t.key,values:t.values.filter(function(t,e){return s.x()(t,e)>=n[0]&&s.x()(t,e)<=n[1]})}}));e=Q.length&&!j?f.xScale():s.xScale(),h.scale(e)._ticks(r.utils.calcTicksX(Z/100,k)).tickSize(-$,0),h.domain([Math.ceil(n[0]),Math.floor(n[1])]),it.select(".nv-x.nv-axis").transition().duration(B).call(h),t.transition().duration(B).call(f),u.transition().duration(B).call(s),it.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+o.range()[0]+")"),g.scale(o)._ticks(r.utils.calcTicksY($/36,k)).tickSize(-Z,0),v.scale(a)._ticks(r.utils.calcTicksY($/36,k)),j?v.tickSize(J.length?0:-Z,0):v.tickSize(Q.length?0:-Z,0);var l=Q.length?1:0,c=J.length&&!X(J)?1:0,d=j?c:l,p=j?l:c;it.select(".nv-focus .nv-y1.nv-axis").style("opacity",d),it.select(".nv-focus .nv-y2.nv-axis").style("opacity",p).attr("transform","translate("+e.range()[1]+",0)"),it.select(".nv-focus .nv-y1.nv-axis").transition().duration(B).call(g),it.select(".nv-focus .nv-y2.nv-axis").transition().duration(B).call(v)}var G=d3.select(this);r.utils.initSVG(G);var U,Z=r.utils.availableWidth(_,G,M),$=r.utils.availableHeight(C,G,M)-(F?T:0),K=T-A.top-A.bottom;if(t.update=function(){G.transition().duration(B).call(t)},t.container=this,I.setter(Y(k),t.update).getter(q(k)).update(),I.disabled=k.map(function(t){return!!t.disabled}),!R)for(U in R={},I)I[U]instanceof Array?R[U]=I[U].slice(0):R[U]=I[U];if(!(k&&k.length&&k.filter(function(t){return t.values.length}).length))return r.utils.noData(t,G),t;G.selectAll(".nv-noData").remove();var Q=k.filter(function(t){return!t.disabled&&t.bar}),J=k.filter(function(t){return!t.bar});e=Q.length&&!j?f.xScale():s.xScale(),i=p.scale(),o=j?s.yScale():f.yScale(),a=j?f.yScale():s.yScale(),u=j?c.yScale():d.yScale(),l=j?d.yScale():c.yScale();var tt=k.filter(function(t){return!t.disabled&&(j?!t.bar:t.bar)}).map(function(t){return t.values.map(function(t,n){return{x:S(t,n),y:E(t,n)}})}),nt=k.filter(function(t){return!t.disabled&&(j?t.bar:!t.bar)}).map(function(t){return t.values.map(function(t,n){return{x:S(t,n),y:E(t,n)}})});e.range([0,Z]),i.domain(d3.extent(d3.merge(tt.concat(nt)),function(t){return t.x})).range([0,Z]);var et=G.selectAll("g.nv-wrap.nv-linePlusBar").data([k]),rt=et.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),it=et.select("g");rt.append("g").attr("class","nv-legendWrap");var ot=rt.append("g").attr("class","nv-focus");ot.append("g").attr("class","nv-x nv-axis"),ot.append("g").attr("class","nv-y1 nv-axis"),ot.append("g").attr("class","nv-y2 nv-axis"),ot.append("g").attr("class","nv-barsWrap"),ot.append("g").attr("class","nv-linesWrap");var at=rt.append("g").attr("class","nv-context");if(at.append("g").attr("class","nv-x nv-axis"),at.append("g").attr("class","nv-y1 nv-axis"),at.append("g").attr("class","nv-y2 nv-axis"),at.append("g").attr("class","nv-barsWrap"),at.append("g").attr("class","nv-linesWrap"),at.append("g").attr("class","nv-brushBackgroun
1d"),at.append("g").attr("class","nv-x nv-brush"),D){var ut=x.align()?Z/2:Z,lt=x.align()?ut:0;x.width(ut),it.select(".nv-legendWrap").datum(k.map(function(t){return t.originalKey=void 0===t.originalKey?t.key:t.originalKey,t.key=j?t.originalKey+(t.bar?V:H):t.originalKey+(t.bar?H:V),t})).call(x),w||x.height()===M.top||(M.top=x.height(),$=r.utils.availableHeight(C,G,M)-T),it.select(".nv-legendWrap").attr("transform","translate("+lt+","+-M.top+")")}else it.select(".nv-legendWrap").selectAll("*").remove();et.attr("transform","translate("+M.left+","+M.top+")"),it.select(".nv-context").style("display",F?"initial":"none"),d.width(Z).height(K).color(k.map(function(t,n){return t.color||N(t,n)}).filter(function(t,n){return!k[n].disabled&&k[n].bar})),c.width(Z).height(K).color(k.map(function(t,n){return t.color||N(t,n)}).filter(function(t,n){return!k[n].disabled&&!k[n].bar}));var st=it.select(".nv-context .nv-barsWrap").datum(Q.length?Q:[{values:[]}]),ct=it.select(".nv-context .nv-linesWrap").datum(X(J)?[{values:[]}]:J.filter(function(t){return!t.disabled}));it.select(".nv-context").attr("transform","translate(0,"+($+M.bottom+A.top)+")"),st.transition().call(d),ct.transition().call(c),L&&(p._ticks(r.utils.calcTicksX(Z/100,k)).tickSize(-K,0),it.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+u.range()[0]+")"),it.select(".nv-context .nv-x.nv-axis").transition().call(p)),W&&(m.scale(u)._ticks(K/36).tickSize(-Z,0),y.scale(l)._ticks(K/36).tickSize(Q.length?0:-Z,0),it.select(".nv-context .nv-y3.nv-axis").style("opacity",Q.length?1:0).attr("transform","translate(0,"+i.range()[0]+")"),it.select(".nv-context .nv-y2.nv-axis").style("opacity",J.length?1:0).attr("transform","translate("+i.range()[1]+",0)"),it.select(".nv-context .nv-y1.nv-axis").transition().call(m),it.select(".nv-context .nv-y2.nv-axis").transition().call(y)),b.x(i).on("brush",O),z&&b.extent(z);var ft=it.select(".nv-brushBackground").selectAll("g").data([z||b.extent()]),dt=ft.enter().append("g");dt.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",K),dt.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",K);var ht=it.select(".nv-x.nv-brush").call(b);ht.selectAll("rect").attr("height",K),ht.selectAll(".resize").append("path").attr("d",function(t){var n=+("e"==t),e=n?1:-1,r=K/3;return"M"+.5*e+","+r+"A6,6 0 0 "+n+" "+6.5*e+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+n+" "+.5*e+","+2*r+"ZM"+2.5*e+","+(r+8)+"V"+(2*r-8)+"M"+4.5*e+","+(r+8)+"V"+(2*r-8)}),x.dispatch.on("stateChange",function(n){for(var e in n)I[e]=n[e];P.stateChange(I),t.update()}),P.on("changeState",function(n){void 0!==n.disabled&&(k.forEach(function(t,e){t.disabled=n.disabled[e]}),I.disabled=n.disabled),t.update()}),O()}),t}var n,e,i,o,a,u,l,s=r.models.line(),c=r.models.line(),f=r.models.historicalBar(),d=r.models.historicalBar(),h=r.models.axis(),p=r.models.axis(),g=r.models.axis(),v=r.models.axis(),m=r.models.axis(),y=r.models.axis(),x=r.models.legend(),b=d3.svg.brush(),k=r.models.tooltip(),M={top:30,right:30,bottom:30,left:60},w=null,A={top:0,right:30,bottom:20,left:60},_=null,C=null,S=function(t){return t.x},E=function(t){return t.y},N=r.utils.defaultColor(),D=!0,F=!0,W=!1,L=!0,T=50,z=null,O=null,P=d3.dispatch("brush","stateChange","changeState"),B=0,I=r.utils.state(),R=null,H=" (left axis)",V=" (right axis)",j=!1;s.clipEdge(!0),c.interactive(!1),c.pointActive(function(t){return!1}),h.orient("bottom").tickPadding(5),g.orient("left"),v.orient("right"),p.orient("bottom").tickPadding(5),m.orient("left"),y.orient("right"),k.headerEnabled(!0).headerFormatter(function(t,n){return h.tickFormat()(t,n)});var q=function(t){return function(){return{active:t.map(function(t){return!t.disabled})}}},Y=function(t){return function(n){void 0!==n.active&&t.forEach(function(t,e){t.disabled=!n.active[e]})}},X=function(t){return t.every(function(t){return t.disabled})};return s.dispatch.on("elementMouseover.tooltip",function(t){k.duration(100).valueFormatter(function(t,n){return(j?{main:g,focus:m}:{main:v,focus:y}).main.tickFormat()(t,n)}).data(t).hidden(!1)}),s.dispatch.on("elementMouseout.tooltip",function(t){k.hidden(!0)}),f.dispatch.on("elementMouseover.tooltip",function(n){n.value=t.x()(n.data),n.series={value:t.y()(n.data),color:n.color},k.duration(0).valueFormatter(function(t,n){return(j?{main:v,focu
vendor: 38,112 bytes, line 1
1s:y}:{main:g,focus:m}).main.tickFormat()(t,n)}).data(n).hidden(!1)}),f.dispatch.on("elementMouseout.tooltip",function(t){k.hidden(!0)}),f.dispatch.on("elementMousemove.tooltip",function(t){k()}),t.dispatch=P,t.legend=x,t.lines=s,t.lines2=c,t.bars=f,t.bars2=d,t.xAxis=h,t.x2Axis=p,t.y1Axis=g,t.y2Axis=v,t.y3Axis=m,t.y4Axis=y,t.tooltip=k,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return _},set:function(t){_=t}},height:{get:function(){return C},set:function(t){C=t}},showLegend:{get:function(){return D},set:function(t){D=t}},brushExtent:{get:function(){return z},set:function(t){z=t}},noData:{get:function(){return O},set:function(t){O=t}},focusEnable:{get:function(){return F},set:function(t){F=t}},focusHeight:{get:function(){return T},set:function(t){T=t}},focusShowAxisX:{get:function(){return L},set:function(t){L=t}},focusShowAxisY:{get:function(){return W},set:function(t){W=t}},legendLeftAxisHint:{get:function(){return H},set:function(t){H=t}},legendRightAxisHint:{get:function(){return V},set:function(t){V=t}},margin:{get:function(){return M},set:function(t){void 0!==t.top&&(M.top=t.top,w=t.top),M.right=void 0!==t.right?t.right:M.right,M.bottom=void 0!==t.bottom?t.bottom:M.bottom,M.left=void 0!==t.left?t.left:M.left}},focusMargin:{get:function(){return A},set:function(t){A.top=void 0!==t.top?t.top:A.top,A.right=void 0!==t.right?t.right:A.right,A.bottom=void 0!==t.bottom?t.bottom:A.bottom,A.left=void 0!==t.left?t.left:A.left}},duration:{get:function(){return B},set:function(t){B=t}},color:{get:function(){return N},set:function(t){N=r.utils.getColor(t),x.color(N)}},x:{get:function(){return S},set:function(t){S=t,s.x(t),c.x(t),f.x(t),d.x(t)}},y:{get:function(){return E},set:function(t){E=t,s.y(t),c.y(t),f.y(t),d.y(t)}},switchYAxisOrder:{get:function(){return j},set:function(t){if(j!==t){var n=g;g=v,v=n;var e=m;m=y,y=e}j=t,g.orient("left"),v.orient("right"),m.orient("left"),y.orient("right")}}}),r.utils.inheritOptions(t,s),r.utils.initOptions(t),t},r.models.multiBar=function(){"use strict";function t(F){return N.reset(),F.each(function(t){var F=c-s.left-s.right,W=f-s.top-s.bottom;g=d3.select(this),r.utils.initSVG(g);var L=0;if(w&&t.length&&(w=[{values:t[0].values.map(function(t){return{x:t.x,y:0,series:t.series,size:.01}})}]),b){var T=d3.layout.stack().offset(k).values(function(t){return t.values}).y(m)(!t.length&&w?w:t);T.forEach(function(n,e){n.nonStackable?(t[e].nonStackableSeries=L++,T[e]=t[e]):e>0&&T[e-1].nonStackable&&T[e].values.map(function(t,n){t.y0-=T[e-1].values[n].y,t.y1=t.y0+t.y})}),t=T}t.forEach(function(t,n){t.values.forEach(function(e){e.series=n,e.key=t.key})}),b&&t.length>0&&t[0].values.map(function(n,e){var r=0,i=0;t.map(function(n,o){if(!t[o].nonStackable){var a=n.values[e];a.size=Math.abs(a.y),a.y<0?(a.y1=i,i-=a.size):(a.y1=a.size+r,r+=a.size)}})});var z=e&&i?[]:t.map(function(t,n){return t.values.map(function(t,e){return{x:v(t,e),y:m(t,e),y0:t.y0,y1:t.y1,idx:n}})});d.domain(e||d3.merge(z).map(function(t){return t.x})).rangeBands(o||[0,F],C),h.domain(i||d3.extent(d3.merge(z).map(function(n){var e=n.y;return b&&!t[n.idx].nonStackable&&(e=n.y>0?n.y1:n.y1+n.y),e}).concat(y))).range(a||[W,0]),d.domain()[0]===d.domain()[1]&&(d.domain()[0]?d.domain([d.domain()[0]-.01*d.domain()[0],d.domain()[1]+.01*d.domain()[1]]):d.domain([-1,1])),h.domain()[0]===h.domain()[1]&&(h.domain()[0]?h.domain([h.domain()[0]+.01*h.domain()[0],h.domain()[1]-.01*h.domain()[1]]):h.domain([-1,1])),u=u||d,l=l||h;var O=g.selectAll("g.nv-wrap.nv-multibar").data([t]),P=O.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar"),B=P.append("defs"),I=P.append("g"),R=O.select("g");I.append("g").attr("class","nv-groups"),O.attr("transform","translate("+s.left+","+s.top+")"),B.append("clipPath").attr("id","nv-edge-clip-"+p).append("rect"),O.select("#nv-edge-clip-"+p+" rect").attr("width",F).attr("height",W),R.attr("clip-path",x?"url(#nv-edge-clip-"+p+")":"");var H=O.select(".nv-groups").selectAll(".nv-group").data(function(t){return t},function(t,n){return n});H.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);var V=N.transition(H.exit().selectAll("rect.nv-bar"),"multibarExit",Math.min(100,_)).attr("y",function(n,e,r){var i=l(0)||0;return b&&t[n.series]&&!t[n.series].nonStackable&&(i=l(n.y0)),i}).attr("height",0).remove();V.delay&&V.delay(function(t,n){return n*(_/(D+1))-n}),H.attr("class",function(t,n){return"nv-group nv-series-"+n}).classed("hover",function(t){return t.hover}).style("fill",function(t,n){return M(t,n)}).style("stroke",function(t,n){return M(t,n)}),H.style("stroke-opacity",1).style("fill-opacity",S);var j=H.selectAll("rect.nv-bar").data(function(n){return w&&!t.length?w.values:n.values});j.exit().remove(),j.enter().append("rect").attr("class",function(t,n){return m(t,n)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(n,e,r){return b&&!t[r].nonStackable?0:r*d.rangeBand()/t.length}).attr("y",function(n,e,r){return l(b&&!t[r].nonStackable?n.y0:0)||0}).attr("height",0).attr("width",function(n,e,r){return d.rangeBand()/(b&&!t[r].nonStackable?1:t.length)}).attr("transform",function(t,n){return"translate("+d(v(t,n))+",0)"}),j.style("fill",function(t,n,e){return M(t,e,n)}).style("stroke",function(t,n,e){return M(t,e,n)}).on("mouseover",function(n,e,r){d3.select(this).classed("hover",!0),E.elementMouseover({data:n,index:e,series:t[r],color:d3.select(this).style("fill")})}).on("mouseout",function(n,e,r){d3.select(this).classed("hover",!1),E.elementMouseout({data:n,index:e,series:t[r],color:d3.select(this).style("fill")})}).on("mousemove",function(n,e,r){E.elementMousemove({data:n,index:e,series:t[r],color:d3.select(this).style("fill")})}).on("click",function(n,e,r){E.elementClick({data:n,index:e,series:t[r],color:d3.select(this).style("fill"),event:d3.event,element:this}),d3.event.stopPropagation()}).on("dblclick",function(n,e,r){E.elementDblClick({data:n,index:e,series:t[r],color:d3.select(this).style("fill")}),d3.event.stopPropagation()}),j.attr("class",function(t,n){return m(t,n)<0?"nv-bar negative":"nv-bar positive"}).attr("transform",function(t,n){return"translate("+d(v(t,n))+",0)"}),A&&(n||(n=t.map(function(){return!0})),j.style("fill",function(t,e,r){return d3.rgb(A(t,e)).darker(n.map(function(t,n){return n}).filter(function(t,e){return!n[e]})[r]).toString()}).style("stroke",function(t,e,r){return d3.rgb(A(t,e)).darker(n.map(function(t,n){return n}).filter(function(t,e){return!n[e]})[r]).toString()}));var q=j.watchTransition(N,"multibar",Math.min(250,_)).delay(function(n,e){return e*_/t[0].values.length});b?q.attr("y",function(n,e,r){return t[r].nonStackable?m(n,e)<0?h(0):h(0)-h(m(n,e))<-1?h(0)-1:h(m(n,e))||0:h(n.y1)}).attr("height",function(n,e,r){return t[r].nonStackable?Math.max(Math.abs(h(m(n,e))-h(0)),0)||0:Math.max(Math.abs(h(n.y+n.y0)-h(n.y0)),0)}).attr("x",function(n,e,r){var i=0;return t[r].nonStackable&&(i=n.series*d.rangeBand()/t.length,t.length!==L&&(i=t[r].nonStackableSeries*d.rangeBand()/(2*L))),i}).attr("width",function(n,e,r){if(t[r].nonStackable){var i=d.rangeBand()/L;return t.length!==L&&(i=d.rangeBand()/(2*L)),i}return d.rangeBand()}):q.attr("x",function(n,e){return n.series*d.rangeBand()/t.length}).attr("width",d.rangeBand()/t.length).attr("y",function(t,n){return m(t,n)<0?h(0):h(0)-h(m(t,n))<1?h(0)-1:h(m(t,n))||0}).attr("height",function(t,n){return Math.max(Math.abs(h(m(t,n))-h(0)),1)||0}),u=d.copy(),l=h.copy(),t[0]&&t[0].values&&(D=t[0].values.length)}),N.renderEnd("multibar immediate"),t}var n,e,i,o,a,u,l,s={top:0,right:0,bottom:0,left:0},c=960,f=500,d=d3.scale.ordinal(),h=d3.scale.linear(),p=Math.floor(1e4*Math.random()),g=null,v=function(t){return t.x},m=function(t){return t.y},y=[0],x=!0,b=!1,k="zero",M=r.utils.defaultColor(),w=!1,A=null,_=500,C=.1,S=.75,E=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),N=r.utils.renderWatch(E,_),D=0;return t.dispatch=E,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return c},set:function(t){c=t}},height:{get:function(){return f},set:function(t){f=t}},x:{get:function(){return v},set:function(t){v=t}},y:{get:function(){return m},set:function(t){m=t}},xScale:{get:function(){return d},set:function(t){d=t}},yScale:{get:function(){return h},set:function(t){h=t}},xDomain:{get:function(){return e},set:function(t){e=t}},yDomain:{get:function(){return i},set:function(t){i=t}},xRange:{get:function(){return o},set:function(t){o=t}},yRange:{get:function(){return a},set:function(t){a=t}},forceY:{get:function(){return y},set:function(t){y=t}},stacked:{get:function(){return b},set:function(t){b=t}},stackOffset:{get:function(){return k},set:function(t){k=t}},clipEdge:{get:function(){return x},set:function(t){x=t}},disabled:{get:function(){return n},set:function(t){n=t}},id:{get:function(){return p},set:function(t){p=t}},hideable:{get:function(){return w},set:function(t){w=t}},groupSpacing:{get:function(){return C},set:function(t){C=t}},fillOpacity:{get:function(){return S},set:function(t){S=t}},margin:{get:function(){return s},set:function(t){s.top=void 0!==t.top?t.top:s.top,s.right=void 0!==t.right?t.right:s.right,s.bottom=void 0!==t.bottom?t.bottom:s.bottom,s.left=void 0!==t.left?t.left:s.left}},duration:{get:function(){return _},set:function(t){_=t,N.reset(_)}},color:{get:function(){return M},set:function(t){M=r.utils.getColor(t)}},barColor:{get:function(){return A},set:function(t){A=t?r.utils.getColor(t):null}}}),r.utils.initOptions(t),t},r.models.multiBarChart=function(){"use strict";function t(N){return T.reset(),T.models(i),b&&T.models(o),k&&T.models(a),N.each(function(N){var T=d3.select(this);r.utils.initSVG(T);var B,I=r.utils.availableWidth(h,T,f),R=r.utils.availableHeight(p,T,f);if(t.update=function(){0===W?T.call(t):T.transition().duration(W).call(t)},t.container=this,S.setter(P(N),t.update).getter(O(N)).update(),S.disabled=N.map(function(t){return!!t.disabled}),!E)for(B in E={},S)S[B]instanceof Array?E[B]=S[B].slice(0):E[B]=S[B];if(!(N&&N.length&&N.filter(function(t){return t.values.length}).length))return r.utils.noData(t,T),t;T.selectAll(".nv-noData").remove(),n=i.xScale(),e=i.yScale();var H=T.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([N]),V=H.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g"),j=H.select("g");if(V.append("g").attr("class","nv-x nv-axis"),V.append("g").attr("class","nv-y nv-axis"),V.append("g").attr("class","nv-barsWrap"),V.append("g").attr("class","nv-legendWrap"),V.append("g").attr("class","nv-controlsWrap"),V.append("g").attr("class","nv-interactive"),y?"bottom"===x?(l.width(I-f.right),j.select(".nv-legendWrap").datum(N).call(l),f.bottom=o.height()+l.height(),R=r.utils.availableHeight(p,T,f),j.select(".nv-legendWrap").attr("transform","translate(0,"+(R+o.height())+")")):(l.width(I-F()),j.select(".nv-legendWrap").datum(N).call(l),d||l.height()===f.top||(f.top=l.height(),R=r.utils.availableHeight(p,T,f)),j.select(".nv-legendWrap").attr("transform","translate("+F()+","+-f.top+")")):j.select(".nv-legendWrap").selectAll("*").remove(),v){var q=[{key:m.grouped||"Grouped",disabled:i.stacked()},{key:m.stacked||"Stacked",disabled:!i.stacked()}];s.width(F()).color(["#444","#444","#444"]),j.select(".nv-controlsWrap").datum(q).attr("transform","translate(0,"+-f.top+")").call(s)}else j.select(".nv-controlsWrap").selectAll("*").remove();H.attr("transform","translate("+f.left+","+f.top+")"),M&&j.select(".nv-y.nv-axis").attr("transform","translate("+I+",0)"),i.disabled(N.map(function(t){return t.disabled})).width(I).height(R).color(N.map(function(t,n){return t.color||g(t,n)}).filter(function(t,n){return!N[n].disabled}));var Y=j.select(".nv-barsWrap").datum(N.filter(function(t){return!t.disabled}));if(Y.call(i),b){o.scale(n)._ticks(r.utils.calcTicksX(I/100,N)).tickSize(-R,0),j.select(".nv-x.nv-axis").attr("transform","translate(0,"+e.range()[0]+")"),j.select(".nv-x.nv-axis").call(o);var X=j.select(".nv-x.nv-axis > g").selectAll("g");if(X.selectAll("line, text").style("opacity",1),A){var G=function(t,n){return"translate("+t+","+n+")"};X.selectAll("text").attr("transform",function(t,n,e){return G(0,e%2==0?5:17)});var U=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;j.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(t,n){return G(0,0===n||U%2!=0?17:5)})}_&&j.selectAll(".tick text").call(r.utils.wrapTicks,t.xAxis.rangeBand()),w&&X.filter(function(t,n){return n%Math.ceil(N[0].values.length/(I/100))!==0}).selectAll("text, line").style("opacity",0),C&&X.selectAll(".tick text").attr("transform","rotate("+C+" 0,0)").style("text-anchor",C>0?"start":"end"),j.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}k&&(a.scale(e)._ticks(r.utils.calcTicksY(R/36,N)).tickSize(-I,0),j.select(".nv-y.nv-axis").call(a)),L&&(u.width(I).height(R).margin({left:f.left,top:f.top}).svgContainer(T).xScale(n),H.select(".nv-interactive").call(u)),l.dispatch.on("stateChange",function(n){for(var e in n)S[e]=n[e];D.stateChange(S),t.update()}),s.dispatch.on("legendClick",function(n,e){if(n.disabled){switch(q=q.map(function(t){return t.disabled=!0,t}),n.disabled=!1,n.key){case"Grouped":case m.grouped:i.stacked(!1);break;case"Stacked":case m.stacked:i.stacked(!0)}S.stacked=i.stacked(),D.stateChange(S),t.update()}}),D.on("changeState",function(n){void 0!==n.disabled&&(N.forEach(function(t,e){t.disabled=n.disabled[e]}),S.disabled=n.disabled),void 0!==n.stacked&&(i.stacked(n.stacked),S.stacked=n.stacked,z=n.stacked),t.update()}),L?(u.dispatch.on("elementMousemove",function(e){if(null!=e.pointXValue){var r,i,o,a,l=[];N.filter(function(t,n){return t.seriesIndex=n,!t.disabled}).forEach(function(u,s){i=n.domain().indexOf(e.pointXValue);var c=u.values[i];void 0!==c&&(a=c.x,void 0===r&&(r=c),void 0===o&&(o=e.mouseX),l.push({key:u.key,value:t.y()(c,i),color:g(u,u.seriesIndex),data:u.values[i]}))}),u.tooltip.data({value:a,index:i,series:l})(),u.renderGuideLine(o)}}),u.dispatch.on("elementMouseout",function(t){u.tooltip.hidden(!0)})):(i.dispatch.on("elementMouseover.tooltip",function(n){n.value=t.x()(n.data),n.series={key:n.data.key,value:t.y()(n.data),color:n.color},c.data(n).hidden(!1)}),i.dispatch.on("elementMouseout.tooltip",function(t){c.hidden(!0)}),i.dispatch.on("elementMousemove.tooltip",function(t){c()}))}),T.renderEnd("multibarchart immediate"),t}var n,e,i=r.models.multiBar(),o=r.models.axis(),a=r.models.axis(),u=r.interactiveGuideline(),l=r.models.legend(),s=r.models.legend(),c=r.models.tooltip(),f={top:30,right:20,bottom:50,left:60},d=null,h=null,p=null,g=r.utils.defaultColor(),v=!0,m={},y=!0,x=null,b=!0,k=!0,M=!1,w=!0,A=!1,_=!1,C=0,S=r.utils.state(),E=null,N=null,D=d3.dispatch("stateChange","changeState","renderEnd"),F=function(){return v?180:0},W=250,L=!1;S.stacked=!1,i.stacked(!1),o.orient("bottom").tickPadding(7).showMaxMin(!1).tickFormat(function(t){return t}),a.orient(M?"right":"left").tickFormat(d3.format(",.1f")),c.duration(0).valueFormatter(function(t,n){return a.tickFormat()(t,n)}).headerFormatter(function(t,n){return o.tickFormat()(t,n)}),u.tooltip.valueFormatter(function(t,n){return null==t?"N/A":a.tickFormat()(t,n)}).headerFormatter(function(t,n){return o.tickFormat()(t,n)}),u.tooltip.valueFormatter(function(t,n){return null==t?"N/A":a.tickFormat()(t,n)}).headerFormatter(function(t,n){return o.tickFormat()(t,n)}),u.tooltip.duration(0).valueFormatter(function(t,n){return a.tickFormat()(t,n)}).headerFormatter(function(t,n){return o.tickFormat()(t,n)}),s.updateState(!1);var T=r.utils.renderWatch(D),z=!1,O=function(t){return function(){return{active:t.map(function(t){return!t.disabled}),stacked:z}}},P=function(t){return function(n){void 0!==n.stacked&&(z=n.stacked),void 0!==n.active&&t.forEach(function(t,e){t.disabled=!n.active[e]})}};return t.dispatch=D,t.multibar=i,t.legend=l,t.controls=s,t.xAxis=o,t.yAxis=a,t.state=S,t.tooltip=c,t.interactiveLayer=u,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return h},set:function(t){h=t}},height:{get:function(){return p},set:function(t){p=t}},showLegend:{get:function(){return y},set:function(t){y=t}},legendPosition:{get:function(){return x},set:function(t){x=t}},showControls:{get:function(){return v},set:function(t){v=t}},controlLabels:{get:function(){return m},set:function(t){m=t}},showXAxis:{get:function(){return b},set:function(t){b=t}},showYAxis:{get:function(){return k},set:function(t){k=t}},defaultState:{get:function(){return E},set:function(t){E=t}},noData:{get:function(){return N},set:function(t){N=t}},reduceXTicks:{get:function(){return w},set:function(t){w=t}},rotateLabels:{get:function(){return C},set:function(t){C=t}},staggerLabels:{get:function(){return A},set:function(t){A=t}},wrapLabels:{get:function(){return _},set:function(t){_=!!t}},margin:{get:function(){return f},set:function(t){void 0!==t.top&&(f.top=t.top,d=t.top),f.right=void 0!==t.right?t.right:f.right,f.bottom=void 0!==t.bottom?t.bottom:f.bottom,f.left=void 0!==t.left?t.left:f.left}},duration:{get:function(){return W},set:function(t){W=t,i.duration(W),o.duration(W),a.duration(W),T.reset(W)}},color:{get:function(){return g},set:function(t){g=r.utils.getColor(t),l.color(g)}},rightAlignYAxis:{get:function(){return M},set:function(t){M=t,a.orient(M?"right":"left")}},useInteractiveGuideline:{get:function(){return L},set:function(t){L=t}},barColor:{get:function(){return i.barColor},set:function(t){i.barColor(t),l.color(function(t,n){return d3.rgb("#ccc").darker(1.5*n).toString()})}}}),r.utils.inheritOptions(t,i),r.utils.initOptions(t),t},r.models.multiBarHorizontal=function(){"use strict";function t(d){return F.reset(),d.each(function(t){var d=c-s.left-s.right,N=f-s.top-s.bottom;h=d3.select(this),r.utils.initSVG(h),M&&(t=d3.layout.stack().offset("zero").values(function(t){return t.values}).y(m)(t)),t.forEach(function(t,n){t.values.forEach(function(e){e.series=n,e.key=t.key})}),M&&t[0].values.map(function(n,e){var r=0,i=0;t.map(function(t){var n=t.values[e];n.size=Math.abs(n.y),n.y<0?(n.y1=i-n.size,i-=n.size):(n.y1=r,r+=n.size)})});var W=e&&i?[]:t.map(function(t){return t.values.map(function(t,n){return{x:v(t,n),y:m(t,n),y0:t.y0,y1:t.y1}})});p.domain(e||d3.merge(W).map(function(t){return t.x})).rangeBands(o||[0,N],C),g.domain(i||d3.extent(d3.merge(W).map(function(t){return M?t.y>0?t.y1+t.y:t.y1:t.y}).concat(x))),w&&!M?g.range(a||[g.domain()[0]<0?_:0,d-(g.domain()[1]>0?_:0)]):g.range(a||[0,d]),u=u||p,l=l||d3.scale.linear().domain(g.domain()).range([g(0),g(0)]);var L=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([t]),T=L.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal"),z=(T.append("defs"),T.append("g"));L.select("g"),z.append("g").attr("class","nv-groups"),L.attr("transform","translate("+s.left+","+s.top+")");var O=L.select(".nv-groups").selectAll(".nv-group").data(function(t){return t},function(t,n){return n});O.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),O.exit().watchTransition(F,"multibarhorizontal: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),O.attr("class",function(t,n){return"nv-group nv-series-"+n}).classed("hover",function(t){return t.hover}).style("fill",function(t,n){return b(t,n)}).style("stroke",function(t,n){return b(t,n)}),O.watchTransition(F,"multibarhorizontal: groups").style("stroke-opacity",1).style("fill-opacity",S);var P=O.selectAll("g.nv-bar").data(function(t){return t.values});P.exit().remove();var B=P.enter().append("g").attr("transform",function(n,e,r){return"translate("+l(M?n.y0:0)+","+(M?0:r*p.rangeBand()/t.length+p(v(n,e)))+")"});B.append("rect").attr("width",0).attr("height",p.rangeBand()/(M?1:t.length)),P.on("mouseover",function(t,n){d3.select(this).classed("hover",!0),D.elementMouseover({data:t,index:n,color:d3.select(this).style("fill")})}).on("mouseout",function(t,n){d3.select(this).classed("hover",!1),D.elementMouseout({data:t,index:n,color:d3.select(this).style("fill")})}).on("mouseout",function(t,n){D.elementMouseout({data:t,index:n,color:d3.select(this).style("fill")})}).on("mousemove",function(t,n){D.elementMousemove({data:t,index:n,color:d3.select(this).style("fill")})}).on("click",function(t,n){D.elementClick({data:t,index:n,color:d3.select(this).style("fill"),event:d3.event,element:this}),d3.event.stopPropagation()}).on("dblclick",function(t,n){D.elementDblClick({data:t,index:n,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}),y(t[0],0)&&(B.append("polyline"),P.select("polyline").attr("fill","none").attr("points",function(n,e){var r=y(n,e),i=.8*p.rangeBand()/(2*(M?1:t.length));return r=(r=r.length?r:[-Math.abs(r),Math.abs(r)]).map(function(t){return g(t+(m(n,e)<0?0:m(n,e)))-g(0)}),[[r[0],-i],[r[0],i],[r[0],0],[r[1],0],[r[1],-i],[r[1],i]].map(function(t){return t.join(",")}).join(" ")}).attr("transform",function(n,e){return"translate(0, "+p.rangeBand()/(2*(M?1:t.length))+")"})),B.append("text"),w&&!M?(P.select("text").attr("text-anchor",function(t,n){return m(t,n)<0?"end":"start"}).attr("y",p.rangeBand()/(2*t.length)).attr("dy",".32em").text(function(t,n){var e=E(m(t,n)),r=y(t,n);return void 0===r?e:r.length?e+"+"+E(Math.abs(r[1]))+"-"+E(Math.abs(r[0])):e+"±"+E(Math.abs(r))}),P.watchTransition(F,"multibarhorizontal: bars").select("text").attr("x",function(t,n){return m(t,n)<0?-4:g(m(t,n))-g(0)+4})):P.selectAll("text").text(""),A&&!M?(B.append("text").classed("nv-bar-label",!0),P.select("text.nv-bar-label").attr("text-anchor",function(t,n){return m(t,n)<0?"start":"end"}).attr("y",p.rangeBand()/(2*t.length)).attr("dy",".32em").text(function(t,n){return v(t,n)}),P.watchTransition(F,"multibarhorizontal: bars").select("text.nv-bar-label").attr("x",function(t,n){return m(t,n)<0?g(0)-g(m(t,n))+4:-4})):P.selectAll("text.nv-bar-label").text(""),P.attr("class",function(t,n){return m(t,n)<0?"nv-bar negative":"nv-bar positive"}),k&&(n||(n=t.map(function(){return!0})),P.style("fill",function(t,e,r){return d3.rgb(k(t,e)).darker(n.map(function(t,n){return n}).filter(function(t,e){return!n[e]})[r]).toString()}).style("stroke",function(t,e,r){return d3.rgb(k(t,e)).darker(n.map(function(t,n){return n}).filter(function(t,e){return!n[e]})[r]).toString()})),M?P.watchTransition(F,"multibarhorizontal: bars").attr("transform",function(t,n){return"translate("+g(t.y1)+","+p(v(t,n))+")"}).select("rect").attr("width",function(t,n){return Math.abs(g(m(t,n)+t.y0)-g(t.y0))||0}).attr("height",p.rangeBand()):P.watchTransition(F,"multibarhorizontal: bars").attr("transform",function(n,e){return"translate("+g(m(n,e)<0?m(n,e):0)+","+(n.series*p.rangeBand()/t.length+p(v(n,e)))+")"}).select("rect").attr("height",p.rangeBand()/t.length).attr("width",function(t,n){return Math.max(Math.abs(g(m(t,n))-g(0)),1)||0}),u=p.copy(),l=g.copy()}),F.renderEnd("multibarHorizontal immediate"),t}var n,e,i,o,a,u,l,s={top:0,right:0,bottom:0,left:0},c=960,f=500,d=Math.floor(1e4*Math.random()),h=null,p=d3.scale.ordinal(),g=d3.scale.linear(),v=function(t){return t.x},m=function(t){return t.y},y=function(t){return t.yErr},x=[0],b=r.utils.defaultColor(),k=null,M=!1,w=!1,A=!1,_=60,C=.1,S=.75,E=d3.format(",.2f"),N=250,D=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),F=r.utils.renderWatch(D,N);return t.dispatch=D,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return c},set:function(t){c=t}},height:{get:function(){return f},set:function(t){f=t}},x:{get:function(){return v},set:function(t){v=t}},y:{get:function(){return m},set:function(t){m=t}},yErr:{get:function(){return y},set:function(t){y=t}},xScale:{get:function(){return p},set:function(t){p=t}},yScale:{get:function(){return g},set:function(t){g=t}},xDomain:{get:function(){return e},set:function(t){e=t}},yDomain:{get:function(){return i},set:function(t){i=t}},xRange:{get:function(){return o},set:function(t){o=t}},yRange:{get:function(){return a},set:function(t){a=t}},forceY:{get:function(){return x},set:function(t){x=t}},stacked:{get:function(){return M},set:function(t){M=t}},showValues:{get:function(){return w},set:function(t){w=t}},disabled:{get:function(){return n},set:function(t){n=t}},id:{get:function(){return d},set:function(t){d=t}},valueFormat:{get:function(){return E},set:function(t){E=t}},valuePadding:{get:function(){return _},set:function(t){_=t}},groupSpacing:{get:function(){return C},set:function(t){C=t}},fillOpacity:{get:function(){return S},set:function(t){S=t}},margin:{get:function(){return s},set:function(t){s.top=void 0!==t.top?t.top:s.top,s.right=void 0!==t.right?t.right:s.right,s.bottom=void 0!==t.bottom?t.bottom:s.bottom,s.left=void 0!==t.left?t.left:s.left}},duration:{get:function(){return N},set:function(t){N=t,F.reset(N)}},color:{get:function(){return b},set:function(t){b=r.utils.getColor(t)}},barColor:{get:function(){return k},set:function(t){k=t?r.utils.getColor(t):null}}}),r.utils.initOptions(t),t},r.models.multiBarHorizontalChart=function(){"use strict";function t(s){return F.reset(),F.models(i),b&&F.models(o),k&&F.models(a),s.each(function(s){var _=d3.select(this);r.utils.initSVG(_);var F,W=r.utils.availableWidth(d,_,c),L=r.utils.availableHeight(h,_,c);if(t.update=function(){_.transition().duration(E).call(t)},t.container=this,M=i.stacked(),w.setter(D(s),t.update).getter(N(s)).update(),w.disabled=s.map(function(t){return!!t.disabled}),!A)for(F in A={},w)w[F]instanceof Array?A[F]=w[F].slice(0):A[F]=w[F];if(!(s&&s.length&&s.filter(function(t){return t.values.length}).length))return r.utils.noData(t,_),t;_.selectAll(".nv-noData").remove(),n=i.xScale(),e=i.yScale().clamp(!0);var T=_.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([s]),z=T.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g"),O=T.select("g");if(z.append("g").attr("class","nv-x nv-axis"),z.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),z.append("g").attr("class","nv-barsWrap"),z.append("g").attr("class","nv-legendWrap"),z.append("g").attr("class","nv-controlsWrap"),y?(u.width(W-S()),O.select(".nv-legendWrap").datum(s).call(u),"bottom"===x?(c.bottom=o.height()+u.height(),L=r.utils.availableHeight(h,_,c),O.select(".nv-legendWrap").attr("transform","translate("+S()+","+(L+o.height())+")")):"top"===x&&(f||u.height()===c.top||(c.top=u.height(),L=r.utils.availableHeight(h,_,c)),O.select(".nv-legendWrap").attr("transform","translate("+S()+","+-c.top+")"))):O.select(".nv-legendWrap").selectAll("*").remove(),g){var P=[{key:m.grouped||"Grouped",disabled:i.stacked()},{key:m.stacked||"Stacked",disabled:!i.stacked()}];l.width(S()).color(["#444","#444","#444"]),"bottom"===v?(c.bottom=o.height()+u.height(),L=r.utils.availableHeight(h,_,c),O.select(".nv-controlsWrap").datum(P).attr("transform","translate(0,"+(L+o.height())+")").call(l)):"top"===v&&O.select(".nv-controlsWrap").datum(P).attr("transform","translate(0,"+-c.top+")").call(l)}else O.select(".nv-controlsWrap").selectAll("*").remove();T.attr("transform","translate("+c.left+","+c.top+")"),i.disabled(s.map(function(t){return t.disabled})).width(W).height(L).color(s.map(function(t,n){return t.color||p(t,n)}).filter(function(t,n){return!s[n].disabled}));var B=O.select(".nv-barsWrap").datum(s.filter(function(t){return!t.disabled}));B.transition().call(i),b&&(o.scale(n)._ticks(r.utils.calcTicksY(L/24,s)).tickSize(-W,0),O.select(".nv-x.nv-axis").call(o),O.select(".nv-x.nv-axis").selectAll("g").selectAll("line, text")),k&&(a.scale(e)._ticks(r.utils.calcTicksX(W/100,s)).tickSize(-L,0),O.select(".nv-y.nv-axis").attr("transform","translate(0,"+L+")"),O.select(".nv-y.nv-axis").call(a)),O.select(".nv-zeroLine line").attr("x1",e(0)).attr("x2",e(0)).attr("y1",0).attr("y2",-L),u.dispatch.on("stateChange",function(n){for(var e in n)w[e]=n[e];C.stateChange(w),t.update()}),l.dispatch.on("legendClick",function(n,e){if(n.disabled){switch(P=P.map(function(t){return t.disabled=!0,t}),n.disabled=!1,n.key){case"Grouped":case m.grouped:i.stacked(!1);break;case"Stacked":case m.stacked:i.stacked(!0)}w.stacked=i.stacked(),C.stateChange(w),M=i.stacked(),t.update()}}),C.on("changeState",function(n){void 0!==n.disabled&&(s.forEach(function(t,e){t.disabled=n.disabled[e]}),w.disabled=n.disabled),void 0!==n.stacked&&(i.stacked(n.stacked),w.stacked=n.stacked,M=n.stacked),t.update()})}),F.renderEnd("multibar horizontal chart immediate"),t}var n,e,i=r.models.multiBarHorizontal(),o=r.models.axis(),a=r.models.axis(),u=r.models.legend().height(30),l=r.models.legend().height(30),s=r.models.tooltip(),c={top:30,right:20,bottom:50,left:60},f=null,d=null,h=null,p=r.utils.defaultColor(),g=!0,v="top",m={},y=!0,x="top",b=!0,k=!0,M=!1,w=r.utils.state(),A=null,_=null,C=d3.dispatch("stateChange","changeState","renderEnd"),S=function(){return g?180:0},E=250;w.stacked=!1,i.stacked(M),o.orient("left").tickPadding(5).showMaxMin(!1).tickFormat(function(t){return t}),a.orient("bottom").tickFormat(d3.format(",.1f")),s.duration(0).valueFormatter(function(t,n){return a.tickFormat()(t,n)}).headerFormatter(function(t,n){return o.tickFormat()(t,n)}),l.updateState(!1);var N=function(t){return function(){return{active:t.map(function(t){return!t.disabled}),stacked:M}}},D=function(t){return function(n){void 0!==n.stacked&&(M=n.stacked),void 0!==n.active&&t.forEach(function(t,e){t.disabled=!n.active[e]})}},F=r.utils.renderWatch(C,E);return i.dispatch.on("elementMouseover.tooltip",function(n){n.value=t.x()(n.data),n.series={key:n.data.key,value:t.y()(n.data),color:n.color},s.data(n).hidden(!1)}),i.dispatch.on("elementMouseout.tooltip",function(t){s.hidden(!0)}),i.dispatch.on("elementMousemove.tooltip",function(t){s()}),t.dispatch=C,t.multibar=i,t.legend=u,t.controls=l,t.xAxis=o,t.yAxis=a,t.state=w,t.tooltip=s,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return d},set:function(t){d=t}},height:{get:function(){return h},set:function(t){h=t}},showLegend:{get:function(){return y},set:function(t){y=t}},legendPosition:{get:function(){return x},set:function(t){x=t}},controlsPosition:{get:function(){return v},set:function(t){v=t}},showControls:{get:function(){return g},set:function(t){g=t}},controlLabels:{get:function(){return m},set:function(t){m=t}},showXAxis:{get:function(){return b},set:function(t){b=t}},showYAxis:{get:function(){return k},set:function(t){k=t}},defaultState:{get:function(){return A},set:function(t){A=t}},noData:{get:function(){return _},set:function(t){_=t}},margin:{get:function(){return c},set:function(t){void 0!==t.top&&(c.top=t.top,f=t.top),c.right=void 0!==t.right?t.right:c.right,c.bottom=void 0!==t.bottom?t.bottom:c.bottom,c.left=void 0!==t.left?t.left:c.left}},duration:{get:function(){return E},set:function(t){E=t,F.reset(E),i.duration(E),o.duration(E),a.duration(E)}},color:{get:function(){return p},set:function(t){p=r.utils.getColor(t),u.color(p)}},barColor:{get:function(){return i.barColor},set:function(t){i.barColor(t),u.color(function(t,n){return d3.rgb("#ccc").darker(1.5*n).toString()})}}}),r.utils.inheritOptions(t,i),r.utils.initOptions(t),t},r.models.multiChart=function(){"use strict";function t(c){return c.each(function(c){function p(t){var n=2===t.series.yAxis?W:F;t.value=t.point.x,t.series={value:t.point.y,color:t.point.color,key:t.series.key},T.duration(0).headerFormatter(function(t,n){return D.tickFormat()(t,n)}).valueFormatter(function(t,e){return n.tickFormat()(t,e)}).data(t).hidden(!1)}function y(t){var n=2===t.series.yAxis?W:F;t.value=t.point.x,t.series={value:t.point.y,color:t.point.color,key:t.series.key},T.duration(100).headerFormatter(function(t,n){return D.tickFormat()(t,n)}).valueFormatter(function(t,e){return n.tickFormat()(t,e)}).data(t).hidden(!1)}function z(t){var n=2===t.series.yAxis?W:F;t.point.x=E.x()(t.point),t.point.y=E.y()(t.point),T.duration(0).headerFormatter(function(t,n){return D.tickFormat()(t,n)}).valueFormatter(function(t,e){return n.tickFormat()(t,e)}).data(t).hidden(!1)}function P(t){var n=2===t.series.yAxis?W:F;t.value=C.x()(t.data),t.series={value:C.y()(t.data),color:t.color,key:t.data.key},T.duration(0).headerFormatter(function(t,n){return D.tickFormat()(t,n)}).valueFormatter(function(t,e){return n.tickFormat()(t,e)}).data(t).hidden(!1)}function B(){for(var t=0,n=O.length;n>t;t++){var e=O[t];try{e.clearHighlights()}catch(t){}}}var I=d3.select(this);r.utils.initSVG(I),t.update=function(){I.transition().call(t)},t.container=this;var R=r.utils.availableWidth(u,I,i),H=r.utils.availableHeight(l,I,i),V=c.filter(function(t){return"line"==t.type&&1==t.yAxis}),j=c.filter(function(t){return"line"==t.type&&2==t.yAxis}),q=c.filter(function(t){return"scatter"==t.type&&1==t.yAxis}),Y=c.filter(function(t){return"scatter"==t.type&&2==t.yAxis}),X=c.filter(function(t){return"bar"==t.type&&1==t.yAxis}),G=c.filter(function(t){return"bar"==t.type&&2==t.yAxis}),U=c.filter(function(t){return"area"==t.type&&1==t.yAxis}),Z=c.filter(function(t){return"area"==t.type&&2==t.yAxis});if(!(c&&c.length&&c.filter(function(t){return t.values.length}).length))return r.utils.noData(t,I),t;I.selectAll(".nv-noData").remove();var $=c.filter(function(t){return!t.disabled&&1==t.yAxis}).map(function(t){return t.values.map(function(t,n){return{x:f(t),y:d(t)}})}),K=c.filter(function(t){return!t.disabled&&2==t.yAxis}).map(function(t){return t.values.map(function(t,n){return{x:f(t),y:d(t)}})});x.domain(d3.extent(d3.merge($.concat(K)),function(t){return t.x})).range([0,R]);var Q=I.selectAll("g.wrap.multiChart").data([c]),J=Q.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");J.append("g").attr("class","nv-x nv-axis"),J.append("g").attr("class","nv-y1 nv-axis"),J.append("g").attr("class","nv-y2 nv-axis"),J.append("g").attr("class","stack1Wrap"),J.append("g").attr("class","stack2Wrap"),J.append("g").attr("class","bars1Wrap"),J.append("g").attr("class","bars2Wrap"),J.append("g").attr("class","scatters1Wrap"),J.append("g").attr("class","scatters2Wrap"),J.append("g").attr("class","lines1Wrap"),J.append("g").attr("class","lines2Wrap"),J.append("g").attr("class","legendWrap"),J.append("g").attr("class","nv-interactive");var tt=Q.select("g"),nt=c.map(function(t,n){return c[n].color||a(t,n)});if(s){var et=L.align()?R/2:R,rt=L.align()?et:0;L.width(et),L.color(nt),tt.select(".legendWrap").datum(c.map(function(t){return t.originalKey=void 0===t.originalKey?t.key:t.originalKey,t.key=t.originalKey+(1==t.yAxis?"":m),t})).call(L),o||L.height()===i.top||(i.top=L.height(),H=r.utils.availableHeight(l,I,i)),tt.select(".legendWrap").attr("transform","translate("+rt+","+-i.top+")")}else tt.select(".legendWrap").selectAll("*").remove();M.width(R).height(H).interpolate(h).color(nt.filter(function(t,n){return!c[n].disabled&&1==c[n].yAxis&&"line"==c[n].type})),w.width(R).height(H).interpolate(h).color(nt.filter(function(t,n){return!c[n].disabled&&2==c[n].yAxis&&"line"==c[n].type})),A.width(R).height(H).color(nt.filter(function(t,n){return!c[n].disabled&&1==c[n].yAxis&&"scatter"==c[n].type})),_.width(R).height(H).color(nt.filter(function(t,n){return!c[n].disabled&&2==c[n].yAxis&&"scatter"==c[n].type})),C.width(R).height(H).color(nt.filter(function(t,n){return!c[n].disabled&&1==c[n].yAxis&&"bar"==c[n].type})),S.width(R).height(H).color(nt.filter(function(t,n){return!c[n].disabled&&2==c[n].yAxis&&"bar"==c[n].type})),E.width(R).height(H).interpolate(h).color(nt.filter(function(t,n){return!c[n].disabled&&1==c[n].yAxis&&"area"==c[n].type})),N.width(R).height(H).interpolate(h).color(nt.filter(function(t,n){return!c[n].disabled&&2==c[n].yAxis&&"area"==c[n].type})),tt.attr("transform","translate("+i.left+","+i.top+")");var it=tt.select(".lines1Wrap").datum(V.filter(function(t){return!t.disabled})),ot=tt.select(".scatters1Wrap").datum(q.filter(function(t){return!t.disabled})),at=tt.select(".bars1Wrap").datum(X.filter(function(t){return!t.disabled})),ut=tt.select(".stack1Wrap").datum(U.filter(function(t){return!t.disabled})),lt=tt.select(".lines2Wrap").datum(j.filter(function(t){return!t.disabled})),st=tt.select(".scatters2Wrap").datum(Y.filter(function(t){return!t.disabled})),ct=tt.select(".bars2Wrap").datum(G.filter(function(t){return!t.disabled})),ft=tt.select(".stack2Wrap").datum(Z.filter(function(t){return!t.disabled})),dt=[];C.stacked()&&X.length&&(dt=X.filter(function(t){return!t.disabled}).map(function(t){return t.values}),dt.length>0&&(dt=dt.reduce(function(t,n){return t.map(function(t,e){return{x:t.x,y:t.y+n[e].y}})}))),X.length&&dt.push({x:0,y:0});var ht=[];S.stacked()&&G.length&&(ht=G.filter(function(t){return!t.disabled}).map(function(t){return t.values}),ht.length>0&&(ht=ht.reduce(function(t,n){return t.map(function(t,e){return{x:t.x,y:t.y+n[e].y}})}))),G.length&&ht.push({x:0,y:0}),b.domain(n||d3.extent(d3.merge($).concat(dt),function(t){return t.y})).range([0,H]),k.domain(e||d3.extent(d3.merge(K).concat(ht),function(t){return t.y})).range([0,H]),M.yDomain(b.domain()),A.yDomain(b.domain()),C.yDomain(b.domain()),E.yDomain(b.domain()),w.yDomain(k.domain()),_.yDomain(k.domain()),S.yDomain(k.domain()),N.yDomain(k.domain()),U.length&&d3.transition(ut).call(E),Z.length&&d3.transition(ft).call(N),X.length&&d3.transition(at).call(C),G.length&&d3.transition(ct).call(S),V.length&&d3.transition(it).call(M),j.length&&d3.transition(lt).call(w),q.length&&d3.transition(ot).call(A),Y.length&&d3.transition(st).call(_),D._ticks(r.utils.calcTicksX(R/100,c)).tickSize(-H,0),tt.select(".nv-x.nv-axis").attr("transform","translate(0,"+H+")"),d3.transition(tt.select(".nv-x.nv-axis")).call(D),F._ticks(r.utils.calcTicksY(H/36,c)).tickSize(-R,0),d3.transition(tt.select(".nv-y1.nv-axis")).call(F),W._ticks(r.utils.calcTicksY(H/36,c)).tickSize(-R,0),d3.transition(tt.select(".nv-y2.nv-axis")).call(W),tt.select(".nv-y1.nv-axis").classed("nv-disabled",!$.length).attr("transform","translate("+x.range()[0]+",0)"),tt.select(".nv-y2.nv-axis").classed("nv-disabled",!K.length).attr("transform","translate("+x.range()[1]+",0)"),L.dispatch.on("stateChange",function(n){t.update(
1)}),v&&(g.width(R).height(H).margin({left:i.left,top:i.top}).svgContainer(I).xScale(x),Q.select(".nv-interactive").call(g)),v?(g.dispatch.on("elementMousemove",function(n){B();var e,i,o,u=[];c.filter(function(t,n){return t.seriesIndex=n,!t.disabled}).forEach(function(l,s){var c=x.domain(),f=l.values.filter(function(n,e){return t.x()(n,e)>=c[0]&&t.x()(n,e)<=c[1]}),d=f[i=r.interactiveBisect(f,n.pointXValue,t.x())],h=t.y()(d,i);null!==h&&function(t,n,e){for(var r=0,i=O.length;i>r;r++){var o=O[r];try{o.highlightPoint(t,n,e)}catch(t){}}}(s,i,!0),void 0!==d&&(void 0===e&&(e=d),void 0===o&&(o=x(t.x()(d,i))),u.push({key:l.key,value:h,color:a(l,l.seriesIndex),data:d,yAxis:2==l.yAxis?W:F}))}),g.tooltip.headerFormatter(function(t,n){return D.tickFormat()(t,n)}).valueFormatter(g.tooltip.valueFormatter()||function(t,n){var e=u[n].yAxis;return null==t?"N/A":e.tickFormat()(t)}).data({value:t.x()(e,i),index:i,series:u})(),g.renderGuideLine(o)}),g.dispatch.on("elementMouseout",function(t){B()})):(M.dispatch.on("elementMouseover.tooltip",p),w.dispatch.on("elementMouseover.tooltip",p),M.dispatch.on("elementMouseout.tooltip",function(t){T.hidden(!0)}),w.dispatch.on("elementMouseout.tooltip",function(t){T.hidden(!0)}),A.dispatch.on("elementMouseover.tooltip",y),_.dispatch.on("elementMouseover.tooltip",y),A.dispatch.on("elementMouseout.tooltip",function(t){T.hidden(!0)}),_.dispatch.on("elementMouseout.tooltip",function(t){T.hidden(!0)}),E.dispatch.on("elementMouseover.tooltip",z),N.dispatch.on("elementMouseover.tooltip",z),E.dispatch.on("elementMouseout.tooltip",function(t){T.hidden(!0)}),N.dispatch.on("elementMouseout.tooltip",function(t){T.hidden(!0)}),C.dispatch.on("elementMouseover.tooltip",P),S.dispatch.on("elementMouseover.tooltip",P),C.dispatch.on("elementMouseout.tooltip",function(t){T.hidden(!0)}),S.dispatch.on("elementMouseout.tooltip",function(t){T.hidden(!0)}),C.dispatch.on("elementMousemove.tooltip",function(t){T()}),S.dispatch.on("elementMousemove.tooltip",function(t){T()}))}),t}var n,e,i={top:30,right:20,bottom:50,left:60},o=null,a=r.utils.defaultColor(),u=null,l=null,s=!0,c=null,f=function(t){return t.x},d=function(t){return t.y},h="linear",p=!0,g=r.interactiveGuideline(),v=!1,m=" (right axis)",y=250,x=d3.scale.linear(),b=d3.scale.linear(),k=d3.scale.linear(),M=r.models.line().yScale(b).duration(y),w=r.models.line().yScale(k).duration(y),A=r.models.scatter().yScale(b).duration(y),_=r.models.scatter().yScale(k).duration(y),C=r.models.multiBar().stacked(!1).yScale(b).duration(y),S=r.models.multiBar().stacked(!1).yScale(k).duration(y),E=r.models.stackedArea().yScale(b).duration(y),N=r.models.stackedArea().yScale(k).duration(y),D=r.models.axis().scale(x).orient("bottom").tickPadding(5).duration(y),F=r.models.axis().scale(b).orient("left").duration(y),W=r.models.axis().scale(k).orient("right").duration(y),L=r.models.legend().height(30),T=r.models.tooltip(),z=d3.dispatch(),O=[M,w,A,_,C,S,E,N];return t.dispatch=z,t.legend=L,t.lines1=M,t.lines2=w,t.scatters1=A,t.scatters2=_,t.bars1=C,t.bars2=S,t.stack1=E,t.stack2=N,t.xAxis=D,t.yAxis1=F,t.yAxis2=W,t.tooltip=T,t.interactiveLayer=g,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return u},set:function(t){u=t}},height:{get:function(){return l},set:function(t){l=t}},showLegend:{get:function(){return s},set:function(t){s=t}},yDomain1:{get:function(){return n},set:function(t){n=t}},yDomain2:{get:function(){return e},set:function(t){e=t}},noData:{get:function(){return c},set:function(t){c=t}},interpolate:{get:function(){return h},set:function(t){h=t}},legendRightAxisHint:{get:function(){return m},set:function(t){m=t}},margin:{get:function(){return i},set:function(t){void 0!==t.top&&(i.top=t.top,o=t.top),i.right=void 0!==t.right?t.right:i.right,i.bottom=void 0!==t.bottom?t.bottom:i.bottom,i.left=void 0!==t.left?t.left:i.left}},color:{get:function(){return a}
vendor: 6,610 bytes, line 1
1,set:function(t){a=r.utils.getColor(t)}},x:{get:function(){return f},set:function(t){f=t,M.x(t),w.x(t),A.x(t),_.x(t),C.x(t),S.x(t),E.x(t),N.x(t)}},y:{get:function(){return d},set:function(t){d=t,M.y(t),w.y(t),A.y(t),_.y(t),E.y(t),N.y(t),C.y(t),S.y(t)}},useVoronoi:{get:function(){return p},set:function(t){p=t,M.useVoronoi(t),w.useVoronoi(t),E.useVoronoi(t),N.useVoronoi(t)}},useInteractiveGuideline:{get:function(){return v},set:function(t){(v=t)&&(M.interactive(!1),M.useVoronoi(!1),w.interactive(!1),w.useVoronoi(!1),E.interactive(!1),E.useVoronoi(!1),N.interactive(!1),N.useVoronoi(!1),A.interactive(!1),_.interactive(!1))}},duration:{get:function(){return y},set:function(t){y=t,[M,w,E,N,A,_,D,F,W].forEach(function(t){t.duration(y)})}}}),r.utils.initOptions(t),t},r.models.ohlcBar=function(){"use strict";function t(A){return A.each(function(t){c=d3.select(this);var A=r.utils.availableWidth(u,c,a),C=r.utils.availableHeight(l,c,a);r.utils.initSVG(c);var S=A/t[0].values.length*.9;f.domain(n||d3.extent(t[0].values.map(h).concat(x))),k?f.range(i||[.5*A/t[0].values.length,A*(t[0].values.length-.5)/t[0].values.length]):f.range(i||[5+S/2,A-S/2-5]),d.domain(e||[d3.min(t[0].values.map(y).concat(b)),d3.max(t[0].values.map(m).concat(b))]).range(o||[C,0]),f.domain()[0]===f.domain()[1]&&(f.domain()[0]?f.domain([f.domain()[0]-.01*f.domain()[0],f.domain()[1]+.01*f.domain()[1]]):f.domain([-1,1])),d.domain()[0]===d.domain()[1]&&(d.domain()[0]?d.domain([d.domain()[0]+.01*d.domain()[0],d.domain()[1]-.01*d.domain()[1]]):d.domain([-1,1]));var E=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([t[0].values]),N=E.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar"),D=N.append("defs"),F=N.append("g"),W=E.select("g");F.append("g").attr("class","nv-ticks"),E.attr("transform","translate("+a.left+","+a.top+")"),c.on("click",function(t,n){_.chartClick({data:t,index:n,pos:d3.event,id:s})}),D.append("clipPath").attr("id","nv-chart-clip-path-"+s).append("rect"),E.select("#nv-chart-clip-path-"+s+" rect").attr("width",A).attr("height",C),W.attr("clip-path",M?"url(#nv-chart-clip-path-"+s+")":"");var L=E.select(".nv-ticks").selectAll(".nv-tick").data(function(t){return t});L.exit().remove(),L.enter().append("path").attr("class",function(t,n,e){return(g(t,n)>v(t,n)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+e+"-"+n}).attr("d",function(t,n){return"m0,0l0,"+(d(g(t,n))-d(m(t,n)))+"l"+-S/2+",0l"+S/2+",0l0,"+(d(y(t,n))-d(g(t,n)))+"l0,"+(d(v(t,n))-d(y(t,n)))+"l"+S/2+",0l"+-S/2+",0z"}).attr("transform",function(t,n){return"translate("+f(h(t,n))+","+d(m(t,n))+")"}).attr("fill",function(t,n){return w[0]}).attr("stroke",function(t,n){return w[0]}).attr("x",0).attr("y",function(t,n){return d(Math.max(0,p(t,n)))}).attr("height",function(t,n){return Math.abs(d(p(t,n))-d(0))}),L.attr("class",function(t,n,e){return(g(t,n)>v(t,n)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+e+"-"+n}),d3.transition(L).attr("transform",function(t,n){return"translate("+f(h(t,n))+","+d(m(t,n))+")"}).attr("d",function(n,e){var r=A/t[0].values.length*.9;return"m0,0l0,"+(d(g(n,e))-d(m(n,e)))+"l"+-r/2+",0l"+r/2+",0l0,"+(d(y(n,e))-d(g(n,e)))+"l0,"+(d(v(n,e))-d(y(n,e)))+"l"+r/2+",0l"+-r/2+",0z"})}),t}var n,e,i,o,a={top:0,right:0,bottom:0,left:0},u=null,l=null,s=Math.floor(1e4*Math.random()),c=null,f=d3.scale.linear(),d=d3.scale.linear(),h=function(t){return t.x},p=function(t){return t.y},g=function(t){return t.open},v=function(t){return t.close},m=function(t){return t.high},y=function(t){return t.low},x=[],b=[],k=!1,M=!0,w=r.utils.defaultColor(),A=!1,_=d3.dispatch("stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");return t.highlightPoint=function(n,e){t.clearHighlights(),c.select(".nv-ohlcBar .nv-tick-0-"+n).classed("hover",e)},t.clearHighlights=function(){c.select(".nv-ohlcBar .nv-tick.hover").classed("hover",!1)},t.dispatch=_,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return u},set:function(t){u=t}},height:{get:function(){return l},set:function(t){l=t}},xScale:{get:function(){return f},set:function(t){f=t}},yScale:{get:function(){return d},set:function(t){d=t}},xDomain:{get:function(){return n},set:function(t){n=t}},yDomain:{get:function(){return e},set:function(t){e=t}},xRange:{get:function(){return i},set:function(t){i=t}},yRange:{get:function(){return o},set:function(t){o=t}},forceX:{get:function(){return x},set:function(t){x=t}},forceY:{get:function(){return b},set:function(t){b=t}},padData:{get:function(){return k},set:function(t){k=t}},clipEdge:{get:function(){return M},set:function(t){M=t}},id:{get:function(){return s},set:function(t){s=t}},interactive:{get:function(){return A},set:function(t){A=t}},x:{get:function(){return h},set:function(t){h=t}},y:{get:function(){return p},set:function(t){p=t}},open:{get:function(){return g()},set:function(t){g=t}},close:{get:function(){return v()},set:function(t){v=t}},high:{get:function(){return m},set:function(t){m=t}},low:{get:function(){return y},set:function(t){y=t}},margin:{get:function(){return a},set:function(t){a.top=null!=t.top?t.top:a.top,a.right=null!=t.right?t.right:a.right,a.bottom=null!=t.bottom?t.bottom:a.bottom,a.left=null!=t.left?t.left:a.left}},color:{get:function(){return w},set:function(t){w=r.utils.getColor(t)}}}),r.utils.initOptions(t),t},r.models.parallelCoordinates=function(){"use strict";function t(S){return C.reset(),S.each(function(t){function C(t){return w(p.map(function(n){if(isNaN(t.values[n.key])||isNaN(parseFloat(t.values[n.key]))||P){var e=f[n.key].domain(),r=f[n.key].range(),i=e[0]-(e[1]-e[0])/9;if(k.indexOf(n.key)<0){var o=d3.scale.linear().domain([i,e[1]]).range([s-12,r[1]]);f[n.key].brush.y(o),k.push(n.key)}if(isNaN(t.values[n.key])||isNaN(parseFloat(t.values[n.key])))return[c(n.key),f[n.key](i)]}return void 0!==V&&(k.length>0||P?(V.style("display","inline"),j.style("display","inline")):(V.style("display","none"),j.style("display","none"))),[c(n.key),f[n.key](t.values[n.key])]}))}function S(t){y.forEach(function(n){var e=f[n.dimension].brush.y().domain();n.hasOnlyNaN&&(n.extent[1]=(f[n.dimension].domain()[1]-e[0])*(n.extent[1]-n.extent[0])/(O[n.dimension]-n.extent[0])+e[0]),n.hasNaN&&(n.extent[0]=e[0]),t&&f[n.dimension].brush.extent(n.extent)}),i.select(".nv-brushBackground").each(function(t){d3.select(this).call(f[t.key].brush)}).selectAll("rect").attr("x",-8).attr("width",16),F()}function E(){!1===v&&(v=!0,S(!0))}function N(){U=g.filter(function(t){return!f[t].brush.empty()}),Z=U.map(function(t){return f[t].brush.extent()}
1),y=[],U.forEach(function(t,n){y[n]={dimension:t,extent:Z[n],hasNaN:!1,hasOnlyNaN:!1}}),x=[],n.style("display",function(t){var n=U.every(function(n,e){return!(!isNaN(t.values[n])&&!isNaN(parseFloat(t.values[n]))||Z[e][0]!=f[n].brush.y().domain()[0])||Z[e][0]<=t.values[n]&&t.values[n]<=Z[e][1]&&!isNaN(parseFloat(t.values[n]))});return n&&x.push(t),n?null:"none"}),F(),_.brush({filters:y,active:x})}function D(){var t=U.length>0;y.forEach(function(t){t.extent[0]===f[t.dimension].brush.y().domain()[0]&&k.indexOf(t.dimension)>=0&&(t.hasNaN=!0),t.extent[1]<f[t.dimension].domain()[0]&&(t.hasOnlyNaN=!0)}),_.brushEnd(x,t)}function F(){i.select(".nv-axis").each(function(t,n){var e=y.filter(function(n){return n.dimension==t.key});B[t.key]=f[t.key].domain(),0!=e.length&&v&&(B[t.key]=[],e[0].extent[1]>f[t.key].domain()[0]&&(B[t.key]=[e[0].extent[1]]),e[0].extent[0]>=f[t.key].domain()[0]&&B[t.key].push(e[0].extent[0])),d3.select(this).call(A.scale(f[t.key]).tickFormat(t.format).tickValues(B[t.key]))})}function W(t){var n=b[t];return null==n?c(t):n}var L=d3.select(this);if(l=r.utils.availableWidth(a,L,o),s=r.utils.availableHeight(u,L,o),r.utils.initSVG(L),void 0===t[0].values){var T=[];t.forEach(function(t){var n={};Object.keys(t).forEach(function(e){"name"!==e&&(n[e]=t[e])}),T.push({key:t.name,values:n})}),t=T}var z=t.map(function(t){return t.values});0===x.length&&(x=t),g=h.sort(function(t,n){return t.currentPosition-n.currentPosition}).map(function(t){return t.key}),p=h.filter(function(t){return!t.disabled}),c.rangePoints([0,l],1).domain(p.map(function(t){return t.key}));var O={},P=!1,B=[];g.forEach(function(t){var n=d3.extent(z,function(n){return+n[t]}),e=n[0],r=n[1],i=!1;(isNaN(e)||isNaN(r))&&(i=!0,e=0,r=0),e===r&&(e-=1,r+=1);var o=y.filter(function(n){return n.dimension==t});0!==o.length&&(i?(e=f[t].domain()[0],r=f[t].domain()[1]):!o[0].hasOnlyNaN&&v?(e=e>o[0].extent[0]?o[0].extent[0]:e,r=r<o[0].extent[1]?o[0].extent[1]:r):o[0].hasNaN&&(r=r<o[0].extent[1]?o[0].extent[1]:r,O[t]=f[t].domain()[1],P=!0)),f[t]=d3.scale.linear().domain([e,r]).range([.9*(s-12),0]),k=[],f[t].brush=d3.svg.brush().y(f[t]).on("brushstart",E).on("brush",N).on("brushend",D)});var I=L.selectAll("g.nv-wrap.nv-parallelCoordinates").data([t]),R=I.enter().append("g").attr("class","nvd3 nv-wrap nv-parallelCoordinates").append("g"),H=I.select("g");R.append("g").attr("class","nv-parallelCoordinates background"),R.append("g").attr("class","nv-parallelCoordinates foreground"),R.append("g").attr("class","nv-parallelCoordinates missingValuesline"),I.attr("transform","translate("+o.left+","+o.top+")"),w.interpolate("cardinal").tension(M),A.orient("left");var V,j,q=d3.behavior.drag().on("dragstart",function(t){b[t.key]=this.parentNode.__origin__=c(t.key),e.attr("visibility","hidden")}).on("drag",function(t){b[t.key]=Math.min(l,Math.max(0,this.parentNode.__origin__+=d3.event.x)),n.attr("d",C),p.sort(function(t,n){return W(t.key)-W(n.key)}),p.forEach(function(t,n){return t.currentPosition=n}),c.domain(p.map(function(t){return t.key})),i.attr("transform",function(t){return"translate("+W(t.key)+")"})}).on("dragend",function(t,r){delete this.parentNode.__origin__,delete b[t.key],d3.select(this.parentNode).attr("transform","translate("+c(t.key)+")"),n.attr("d",C),e.attr("d",C).attr("visibility",null),_.dimensionsOrder(p)}),Y=c.range()[1]-c.range()[0];if(Y=isNaN(Y)?c.range()[0]:Y,!isNaN(Y)){var X=[0+Y/2,s-12,l-Y/2,s-12];(V=I.select(".missingValuesline").selectAll("line").data([X])).enter().append("line"),V.exit().remove(),V.attr("x1",function(t){return t[0]}).attr("y1",function(t){return t[1]}).attr("x2",function(t){return t[2]}).attr("y2",function(t){return t[3]}),(j=I.select(".missingValuesline").selectAll("text").data([d])).append("text").data([d]),j.enter().append("text"),j.exit().remove(),j.attr("y",s).attr("x",l-92-Y/2).text(function(t){return t})}(e=I.select(".background").selectAll("path").data(t)).enter().append("path"),e.exit().remove(),e.attr("d",C),(n=I.select(".foreground").selectAll("path").data(t)).enter().append("path"),n.exit().remove(),n.attr("d",C).style("stroke-width",function(t,n){return isNaN(t.strokeWidth)&&(t.strokeWidth=1),t.strokeWidth}).attr("stroke",function(t,n){return t.color||m(t,n)}),n.on("mouseover",function(t,n){d3.select(this).classed("hover",!0).style("stroke-width",t.strokeWidth+2+"px").style("stroke-opacity",1),_.elementMouseover({label:t.name,color:t.color||m(t,n),values:t.values,dimensions:p})}),n.on("mouseout",function(t,n){d3.select(this).classed("hover",!1).style("stroke-width",t.strokeWidth+"px").style("stroke-opacity",.7),_.elementMouseout({label:t.name,index:n})}),n.on("mousemove",function(t,n){_.elementMousemove()}),n.on("click",function(t){_.elementClick({id:t.id})});var G=(i=H.selectAll(".dimension").data(p)).enter().append("g").attr("class","nv-parallelCoordinates dimension");i.attr("transform",function(t){return"translate("+c(t.key)+",0)"}),G.append("g").attr("class","nv-axis"),G.append("text").attr("class","nv-label").style("cursor","move").attr("dy","-1em").attr("text-anchor","middle").on("mouseover",function(t,n){_.elementMouseover({label:t.tooltip||t.key,color:t.color})}).on("mouseout",function(t,n){_.elementMouseout({label:t.tooltip})}).on("mousemove",function(t,n){_.elementMousemove()}
1).call(q),G.append("g").attr("class","nv-brushBackground"),i.exit().remove(),i.select(".nv-label").text(function(t){return t.key}),S(v);var U=g.filter(function(t){return!f[t].brush.empty()}),Z=U.map(function(t){return f[t].brush.extent()}),$=x.slice(0);x=[],n.style("display",function(t){var n=U.every(function(n,e){return!(!isNaN(t.values[n])&&!isNaN(parseFloat(t.values[n]))||Z[e][0]!=f[n].brush.y().domain()[0])||Z[e][0]<=t.values[n]&&t.values[n]<=Z[e][1]&&!isNaN(parseFloat(t.values[n]))});return n&&x.push(t),n?null:"none"}),(y.length>0||!r.utils.arrayEquals(x,$))&&_.activeChanged(x)}),t}var n,e,i,o={top:30,right:0,bottom:10,left:0},a=null,u=null,l=null,s=null,c=d3.scale.ordinal(),f={},d="undefined values",h=[],p=[],g=[],v=!0,m=r.utils.defaultColor(),y=[],x=[],b=[],k=[],M=1,w=d3.svg.line(),A=d3.svg.axis(),_=d3.dispatch("brushstart","brush","brushEnd","dimensionsOrder","stateChange","elementClick","elementMouseover","elementMouseout","elementMousemove","renderEnd","activeChanged"),C=r.utils.renderWatch(_);return t.dispatch=_,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return a}
vendor: 12,683 bytes, line 1
1,set:function(t){a=t}},height:{get:function(){return u},set:function(t){u=t}},dimensionData:{get:function(){return h},set:function(t){h=t}},displayBrush:{get:function(){return v},set:function(t){v=t}},filters:{get:function(){return y},set:function(t){y=t}},active:{get:function(){return x},set:function(t){x=t}},lineTension:{get:function(){return M},set:function(t){M=t}},undefinedValuesLabel:{get:function(){return d},set:function(t){d=t}},dimensions:{get:function(){return h.map(function(t){return t.key})},set:function(t){r.deprecated("dimensions","use dimensionData instead"),0===h.length?t.forEach(function(t){h.push({key:t})}):t.forEach(function(t,n){h[n].key=t})}},dimensionNames:{get:function(){return h.map(function(t){return t.key})},set:function(t){r.deprecated("dimensionNames","use dimensionData instead"),g=[],0===h.length?t.forEach(function(t){h.push({key:t})}):t.forEach(function(t,n){h[n].key=t})}},dimensionFormats:{get:function(){return h.map(function(t){return t.format})},set:function(t){r.deprecated("dimensionFormats","use dimensionData instead"),0===h.length?t.forEach(function(t){h.push({format:t})}):t.forEach(function(t,n){h[n].format=t})}},margin:{get:function(){return o},set:function(t){o.top=void 0!==t.top?t.top:o.top,o.right=void 0!==t.right?t.right:o.right,o.bottom=void 0!==t.bottom?t.bottom:o.bottom,o.left=void 0!==t.left?t.left:o.left}},color:{get:function(){return m},set:function(t){m=r.utils.getColor(t)}}}),r.utils.initOptions(t),t},r.models.parallelCoordinatesChart=function(){"use strict";function t(i){return y.reset(),y.models(n),i.each(function(i){var c=d3.select(this);r.utils.initSVG(c);var g,v=r.utils.availableWidth(u,c,o),y=r.utils.availableHeight(l,c,o);if(t.update=function(){c.call(t)},t.container=this,f.setter(b(d),t.update).getter(x(d)).update(),f.disabled=d.map(function(t){return!!t.disabled}),d=d.map(function(t){return t.disabled=!!t.disabled,t}),d.forEach(function(t,n){t.originalPosition=isNaN(t.originalPosition)?n:t.originalPosition,t.currentPosition=isNaN(t.currentPosition)?n:t.currentPosition}),!p)for(g in p={},f)f[g]instanceof Array?p[g]=f[g].slice(0):p[g]=f[g];if(!i||!i.length)return r.utils.noData(t,c),t;c.selectAll(".nv-noData").remove();var k=c.selectAll("g.nv-wrap.nv-parallelCoordinatesChart").data([i]),M=k.enter().append("g").attr("class","nvd3 nv-wrap nv-parallelCoordinatesChart").append("g"),w=k.select("g");M.append("g").attr("class","nv-parallelCoordinatesWrap"),M.append("g").attr("class","nv-legendWrap"),w.select("rect").attr("width",v).attr("height",y>0?y:0),s?(e.width(v).color(function(t){return"rgb(188,190,192)"}),w.select(".nv-legendWrap").datum(d.sort(function(t,n){return t.originalPosition-n.originalPosition})).call(e),a||e.height()===o.top||(o.top=e.height(),y=r.utils.availableHeight(l,c,o)),k.select(".nv-legendWrap").attr("transform","translate( 0 ,"+-o.top+")")):w.select(".nv-legendWrap").selectAll("*").remove(),k.attr("transform","translate("+o.left+","+o.top+")"),n.width(v).height(y).dimensionData(d).displayBrush(h),w.select(".nv-parallelCoordinatesWrap ").datum(i).transition().call(n),n.dispatch.on("brushEnd",function(t,n){n?(h=!0,m.brushEnd(t)):h=!1}),e.dispatch.on("stateChange",function(n){for(var e in n)f[e]=n[e];m.stateChange(f),t.update()}),n.dispatch.on("dimensionsOrder",function(t){d.sort(function(t,n){return t.currentPosition-n.currentPosition});var n=!1;d.forEach(function(t,e){t.currentPosition=e,t.currentPosition!==t.originalPosition&&(n=!0)}),m.dimensionsOrder(d,n)}),m.on("changeState",function(n){void 0!==n.disabled&&(d.forEach(function(t,e){t.disabled=n.disabled[e]}),f.disabled=n.disabled),t.update()})}),y.renderEnd("parraleleCoordinateChart immediate"),t}var n=r.models.parallelCoordinates(),e=r.models.legend(),i=r.models.tooltip(),o=(r.models.tooltip(),{top:0,right:0,bottom:0,left:0}),a=null,u=null,l=null,s=!0,c=r.utils.defaultColor(),f=r.utils.state(),d=[],h=!0,p=null,g=null,v="undefined",m=d3.dispatch("dimensionsOrder","brushEnd","stateChange","changeState","renderEnd"),y=r.utils.renderWatch(m),x=function(t){return function(){return{active:t.map(function(t){return!t.disabled})}}},b=function(t){return function(n){void 0!==n.active&&t.forEach(function(t,e){t.disabled=!n.active[e]})}};return i.contentGenerator(function(t){var n='<table><thead><tr><td class="legend-color-guide"><div style="background-color:'+t.color+'"></div></td><td><strong>'+t.key+"</strong></td></tr></thead>";return 0!==t.series.length&&(n+='<tbody><tr><td height ="10px"></td></tr>',t.series.forEach(function(t){n=n+'<tr><td class="legend-color-guide"><div style="background-color:'+t.color+'"></div></td><td class="key">'+t.key+'</td><td class="value">'+t.value+"</td></tr>"}),n+="</tbody>"),n+="</table>"}),n.dispatch.on("elementMouseover.tooltip",function(t){var n={key:t.label,color:t.color,series:[]};t.values&&(Object.keys(t.values).forEach(function(e){var r,i=t.dimensions.filter(function(t){return t.key===e})[0];i&&(r=isNaN(t.values[e])||isNaN(parseFloat(t.values[e]))?v:i.format(t.values[e]),n.series.push({idx:i.currentPosition,key:e,value:r,color:i.color}))}),n.series.sort(function(t,n){return t.idx-n.idx})),i.data(n).hidden(!1)}),n.dispatch.on("elementMouseout.tooltip",function(t){i.hidden(!0)}),n.dispatch.on("elementMousemove.tooltip",function(){i()}),t.dispatch=m,t.parallelCoordinates=n,t.legend=e,t.tooltip=i,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return u},set:function(t){u=t}},height:{get:function(){return l},set:function(t){l=t}},showLegend:{get:function(){return s},set:function(t){s=t}},defaultState:{get:function(){return p},set:function(t){p=t}},dimensionData:{get:function(){return d},set:function(t){d=t}},displayBrush:{get:function(){return h},set:function(t){h=t}},noData:{get:function(){return g},set:function(t){g=t}},nanValue:{get:function(){return v},set:function(t){v=t}},margin:{get:function(){return o},set:function(t){void 0!==t.top&&(o.top=t.top,a=t.top),o.right=void 0!==t.right?t.right:o.right,o.bottom=void 0!==t.bottom?t.bottom:o.bottom,o.left=void 0!==t.left?t.left:o.left}},color:{get:function(){return c},set:function(t){c=r.utils.getColor(t),e.color(c),n.color(c)}}}),r.utils.inheritOptions(t,n),r.utils.initOptions(t),t},r.models.pie=function(){"use strict";function t(W){return F.reset(),W.each(function(t){var W=e-n.left-n.right,L=i-n.top-n.bottom,T=Math.min(W,L)/2,z=[],O=[];if(l=d3.select(this),0===S.length)for(var P=T-T/10,B=_*T,I=0;I<t[0].length;I++)z.push(P),O.push(B);else y?(z=S.map(function(t){return(t.outer-t.outer/10)*T}),O=S.map(function(t){return(t.inner-t.inner/10)*T}),_=d3.min(S.map(function(t){return t.inner-t.inner/10}))):(z=S.map(function(t){return t.outer*T}),O=S.map(function(t){return t.inner*T}),_=d3.min(S.map(function(t){return t.inner})));r.utils.initSVG(l);var R=l.selectAll(".nv-wrap.nv-pie").data(t),H=R.enter().append("g").attr("class","nvd3 nv-wrap nv-pie nv-chart-"+u).append("g"),V=R.select("g"),j=H.append("g").attr("class","nv-pie");for(H.append("g").attr("class","nv-pieLabels"),R.attr("transform","translate("+n.left+","+n.top+")"),V.select(".nv-pie").attr("transform","translate("+W/2+","+L/2+")"),V.select(".nv-pieLabels").attr("transform","translate("+W/2+","+L/2+")"),l.on("click",function(t,n){E.chartClick({data:t,index:n,pos:d3.event,id:u})}),N=[],D=[],I=0;I<t[0].length;I++){var q=d3.svg.arc().outerRadius(z[I]),Y=d3.svg.arc().outerRadius(z[I]+5);!1!==k&&(q.startAngle(k),Y.startAngle(k)),!1!==w&&(q.endAngle(w),Y.endAngle(w)),v&&(q.innerRadius(O[I]),Y.innerRadius(O[I])),q.cornerRadius&&A&&(q.cornerRadius(A),Y.cornerRadius(A)),N.push(q),D.push(Y)}var X=d3.layout.pie().sort(null).value(function(t){return t.disabled?0:a(t)});X.padAngle&&M&&X.padAngle(M),v&&m&&(j.append("text").attr("class","nv-pie-title"),R.select(".nv-pie-title").style("text-anchor","middle").text(function(t){return m}).style("font-size",Math.min(W,L)*_*2/(m.length+2)+"px").attr("dy","0.35em").attr("transform",function(t,n){return"translate(0, "+x+")"}));var G=R.select(".nv-pie").selectAll(".nv-slice").data(X),U=R.select(".nv-pieLabels").selectAll(".nv-label").data(X);G.exit().remove(),U.exit().remove();var Z=G.enter().append("g");if(Z.attr("class","nv-slice"),Z.on("mouseover",function(t,n){d3.select(this).classed("hover",!0),y&&d3.select(this).select("path").transition().duration(70).attr("d",D[n]),E.elementMouseover({data:t.data,index:n,color:d3.select(this).style("fill"),percent:(t.endAngle-t.startAngle)/(2*Math.PI)})}),Z.on("mouseout",function(t,n){d3.select(this).classed("hover",!1),y&&d3.select(this).select("path").transition().duration(50).attr("d",N[n]),E.elementMouseout({data:t.data,index:n})}),Z.on("mousemove",function(t,n){E.elementMousemove({data:t.data,index:n})}),Z.on("click",function(t,n){E.elementClick({data:t.data,index:n,color:d3.select(this).style("fill"),event:d3.event,element:this})}),Z.on("dblclick",function(t,n){E.elementDblClick({data:t.data,index:n,color:d3.select(this).style("fill")})}),G.attr("fill",function(t,n){return s(t.data,n)}),G.attr("stroke",function(t,n){return s(t.data,n)}),Z.append("path").each(function(t){this._current=t}),G.select("path").transition().duration(C).attr("d",function(t,n){return N[n](t)}).attrTween("d",function(t,n){t.endAngle=isNaN(t.endAngle)?0:t.endAngle,t.startAngle=isNaN(t.startAngle)?0:t.startAngle,v||(t.innerRadius=0);var e=d3.interpolate(this._current,t);return this._current=e(0),function(t){return N[n](e(t))}}),f){var $=[];for(I=0;I<t[0].length;I++)$.push(N[I]),d?v&&($[I]=d3.svg.arc().outerRadius(N[I].outerRadius()),!1!==k&&$[I].startAngle(k),!1!==w&&$[I].endAngle(w)):v||$[I].innerRadius(0);U.enter().append("g").classed("nv-label",!0).each(function(t,n){var e=d3.select(this);e.attr("transform",function(t,n){if(b){t.outerRadius=z[n]+10,t.innerRadius=z[n]+15;var e=(t.startAngle+t.endAngle)/2*(180/Math.PI);return(t.startAngle+t.endAngle)/2<Math.PI?e-=90:e+=90,"translate("+$[n].centroid(t)+") rotate("+e+")"}return t.outerRadius=T+10,t.innerRadius=T+15,"translate("+$[n].centroid(t)+")"}),e.append("rect").style("stroke","#fff").style("fill","#fff").attr("rx",3).attr("ry",3),e.append("text").style("text-anchor",b?(t.startAngle+t.endAngle)/2<Math.PI?"start":"end":"middle").style("fill","#000")});var K={},Q=function(t){return 140*Math.floor(t[0]/140)+","+14*Math.floor(t[1]/14)},J=function(t){return(t.endAngle-t.startAngle)/(2*Math.PI)};U.watchTransition(F,"pie labels").attr("transform",function(t,n){if(b){t.outerRadius=z[n]+10,t.innerRadius=z[n]+15;var e=(t.startAngle+t.endAngle)/2*(180/Math.PI);return(t.startAngle+t.endAngle)/2<Math.PI?e-=90:e+=90,"translate("+$[n].centroid(t)+") rotate("+e+")"}t.outerRadius=T+10,t.innerRadius=T+15;var r=$[n].centroid(t),i=J(t);if(t.value&&i>=p){var o=Q(r);K[o]&&(r[1]-=14),K[Q(r)]=!0}return"translate("+r+")"}),U.select(".nv-label text").style("text-anchor",function(t,n){return b?(t.startAngle+t.endAngle)/2<Math.PI?"start":"end":"middle"}).text(function(t,n){var e=J(t),r="";if(!t.value||p>e)return"";if("function"==typeof h)r=h(t,n,{key:o(t.data),value:a(t.data),percent:c(e)});else switch(h){case"key":r=o(t.data);break;case"value":r=c(a(t.data));break;case"percent":r=d3.format("%")(e)}return r}),g&&U.each(function(t,n){if(this.getBBox){var e=this.getBBox(),i=$[n].centroid(t),o={x:i[0]+e.x,y:i[1]+e.y},a={x:o.x+e.width,y:o.y},u={x:o.x,y:o.y+e.height},l={x:o.x+e.width,y:o.y+e.height};t.visible=r.utils.pointIsInArc(o,t,q)&&r.utils.pointIsInArc(a,t,q)&&r.utils.pointIsInArc(u,t,q)&&r.utils.pointIsInArc(l,t,q)}}).style("display",function(t){return t.visible?null:"none"})}}),F.renderEnd("pie immediate"),t}var n={top:0,right:0,bottom:0,left:0},e=500,i=500,o=function(t){return t.x},a=function(t){return t.y},u=Math.floor(1e4*Math.random()),l=null,s=r.utils.defaultColor(),c=d3.format(",.2f"),f=!0,d=!1,h="key",p=.02,g=!1,v=!1,m=!1,y=!0,x=0,b=!1,k=!1,M=!1,w=!1,A=0,_=.5,C=250,S=[],E=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),N=[],D=[],F=r.utils.renderWatch(E);return t.dispatch=E,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{arcsRadius:{get:function(){return S},set:function(t){S=t}},width:{get:function(){return e},set:function(t){e=t}},height:{get:function(){return i},set:function(t){i=t}},showLabels:{get:function(){return f},set:function(t){f=t}},title:{get:function(){return m},set:function(t){m=t}},titleOffset:{get:function(){return x},set:function(t){x=t}},labelThreshold:{get:function(){return p},set:function(t){p=t}},hideOverlapLabels:{get:function(){return g},set:function(t){g=t}},valueFormat:{get:function(){return c},set:function(t){c=t}},x:{get:function(){return o}
1,set:function(t){o=t}},id:{get:function(){return u},set:function(t){u=t}},endAngle:{get:function(){return w},set:function(t){w=t}},startAngle:{get:function(){return k},set:function(t){k=t}},padAngle:{get:function(){return M},set:function(t){M=t}},cornerRadius:{get:function(){return A},set:function(t){A=t}},donutRatio:{get:function(){return _},set:function(t){_=t}},labelsOutside:{get:function(){return d},set:function(t){d=t}},labelSunbeamLayout:{get:function(){return b},set:function(t){b=t}},donut:{get:function(){return v},set:function(t){v=t}},growOnHover:{get:function(){return y},set:function(t){y=t}},pieLabelsOutside:{get:function(){return d},set:function(t){d=t,r.deprecated("pieLabelsOutside","use labelsOutside instead")}},donutLabelsOutside:{get:function(){return d},set:function(t){d=t,r.deprecated("donutLabelsOutside","use labelsOutside instead")}},labelFormat:{get:function(){return c},set:function(t){c=t,r.deprecated("labelFormat","use valueFormat instead")}},margin:{get:function(){return n},set:function(t){n.top=void 0!==t.top?t.top:n.top,n.right=void 0!==t.right?t.right:n.right,n.bottom=void 0!==t.bottom?t.bottom:n.bottom,n.left=void 0!==t.left?t.left:n.left}},duration:{get:function(){return C},set:function(t){C=t,F.reset(C)}},y:{get:function(){return a}
1,set:function(t){a=d3.functor(t)}},color:{get:function(){return s},set:function(t){s=r.utils.getColor(t)}},labelType:{get:function(){return h},set:function(t){h=t||"key"}}}),r.utils.initOptions(t),t},r.models.pieChart=function(){"use strict";function t(i){return y.reset(),y.models(n),i.each(function(i){var s=d3.select(this);r.utils.initSVG(s);var d,g=r.utils.availableWidth(u,s,o),v=r.utils.availableHeight(l,s,o);if(t.update=function(){s.transition().call(t)},t.container=this,h.setter(b(i),t.update).getter(x(i)).update(),h.disabled=i.map(function(t){return!!t.disabled}),!p)for(d in p={},h)h[d]instanceof Array?p[d]=h[d].slice(0):p[d]=h[d];if(!i||!i.length)return r.utils.noData(t,s),t;s.selectAll(".nv-noData").remove();var y=s.selectAll("g.nv-wrap.nv-pieChart").data([i]),k=y.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g"),M=y.select("g");if(k.append("g").attr("class","nv-pieWrap"),k.append("g").attr("class","nv-legendWrap"),c)if("top"===f)e.width(g).key(n.x()),y.select(".nv-legendWrap").datum(i).call(e),a||e.height()===o.top||(o.top=e.height(),v=r.utils.availableHeight(l,s,o)),y.select(".nv-legendWrap").attr("transform","translate(0,"+-o.top+")");else if("right"===f){var w=r.models.legend().width();w>g/2&&(w=g/2),e.height(v).key(n.x()),e.width(w),g-=e.width(),y.select(".nv-legendWrap").datum(i).call(e).attr("transform","translate("+g+",0)")}else"bottom"===f&&(e.width(g).key(n.x()),y.select(".nv-legendWrap").datum(i).call(e),o.bottom=e.height(),v=r.utils.availableHeight(l,s,o),y.select(".nv-legendWrap").attr("transform","translate(0,"+v+")"));else M.select(".nv-legendWrap").selectAll("*").remove();y.attr("transform","translate("+o.left+","+o.top+")"),n.width(g).height(v);var A=M.select(".nv-pieWrap").datum([i]);d3.transition(A).call(n),e.dispatch.on("stateChange",function(n){for(var e in n)h[e]=n[e];m.stateChange(h),t.update()}),m.on("changeState",function(n){void 0!==n.disabled&&(i.forEach(function(t,e){t.disabled=n.disabled[e]}),h.disabled=n.disabled),t.update()})}),y.renderEnd("pieChart immediate"),t}var n=r.models.pie(),e=r.models.legend(),i=r.models.tooltip(),o={top:30,right:20,bottom:20,left:20},a=null,u=null,l=null,s=!1,c=!0,f="top",d=r.utils.defaultColor(),h=r.utils.state(),p=null,g=null,v=250,m=d3.dis
1patch("stateChange","changeState","renderEnd");i.duration(0).headerEnabled(!1).valueFormatter(function(t,e){return n.valueFormat()(t,e)});var y=r.utils.renderWatch(m),x=function(t){return function(){return{active:t.map(function(t){return!t.disabled})}}},b=function(t){return function(n){void 0!==n.active&&t.forEach(function(t,e){t.disabled=!n.active[e]})}};return n.dispatch.on("elementMouseover.tooltip",function(n){n.series={key:t.x()(n.data),value:t.y()(n.data),color:n.color,percent:n.percent},s||(delete n.percent,delete n.series.percent),i.data(n).hidden(!1)}),n.dispatch.on("elementMouseout.tooltip",function(t){i.hidden(!0)}),n.dispatch.on("elementMousemove.tooltip",function(t){i()}),t.legend=e,t.dispatch=m,t.pie=n,t.tooltip=i,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return u},set:function(t){u=t}},height:{get:function(){return l},set:function(t){l=t}},noData:{get:function(){return g},set:function(t){g=t}},showTooltipPercent:{get:function(){return s},set:function(t){s=t}},showLegend:{get:function(){return c},set:function(t){c=t}},legendPosition:{get:function(){return f},set:function(t){f=t}},defaultState:{get:function(){return p},set:function(t){p=t}},color:{get:function(){return d},set:function(t){d=t,e.color(d),n.color(d)}},duration:{get:function(){return v},set:function(t){v=t,y.reset(v),n.duration(v)}},margin:{get:function(){return o},set:function(t){void 0!==t.top&&(o.top=t.top,a=t.top),o.right=void 0!==t.right?t.right:o.right,o.bottom=void 0!==t.bottom?t.bottom:o.bottom,o.left=void 0!==t.left?t.left:o.left}}}),r.utils.inheritOptions(t,n),r.utils.initOptions(t),t},r.models.sankey=function(){"use strict";function t(){for(var t,n=l,e=0;n.length&&e<l.length;)t=[],n.forEach(function(n){n.x=e,n.dx=o,n.sourceLinks.forEach(function(n){t.indexOf(n.target)<0&&t.push(n.target)})}),n=t,++e;c&&function(t){l.forEach(function(n){n.sourceLinks.length||(n.x=t-1)})}(e),function(t){l.forEach(function(n){n.x*=t})}((u[0]-o)/(e-1))}function n(){function t(t,n){return t.source.y-n.source.y}function n(t,n){return t.target.y-n.target.y}l.forEach(function(e){e.sourceLinks.sort(n),e.targetLinks.sort(t)}),l.forEach(function(t){var n=0,e=0;t.sourceLinks.forEach(function(t){t.sy=n,n+=t.dy}),t.targetLinks.forEach(function(t){t.ty=e,e+=t.dy})})}function e(t){return t.value}var i={},o=24,a=8,u=[1,1],l=[],s=[],c=!0,f=function(r){l.forEach(function(t){t.sourceLinks=[],t.targetLinks=[]}),s.forEach(function(t){var n=t.source,e=t.target;"number"==typeof n&&(n=t.source=l[t.source]),"number"==typeof e&&(e=t.target=l[t.target]),n.sourceLinks.push(t),e.targetLinks.push(t)}),l.forEach(function(t){t.value=Math.max(d3.sum(t.sourceLinks,e),d3.sum(t.targetLinks,e))}),t(),function(t){function r(t){function n(t){return(t.source.y+t.sy+t.dy/2)*t.value}f.forEach(function(r,i){r.forEach(function(r){if(r.targetLinks.length){var i=d3.sum(r.targetLinks,n)/d3.sum(r.targetLinks,e);r.y+=(i-h(r))*t}})})}function i(t){function n(t){return(t.target.y+t.ty+t.dy/2)*t.value}f.slice().reverse().forEach(function(r){r.forEach(function(r){if(r.sourceLinks.length){var i=d3.sum(r.sourceLinks,n)/d3.sum(r.sourceLinks,e);r.y+=(i-h(r))*t}})})}function o(){f.forEach(function(t){var n,e,r,i=0,o=t.length;for(t.sort(c),r=0;o>r;++r)(e=i-(n=t[r]).y)>0&&(n.y+=e),i=n.y+n.dy+a;if((e=i-a-u[1])>0)for(i=n.y-=e,r=o-2;r>=0;--r)(e=(n=t[r]).y+n.dy+a-i)>0&&(n.y-=e),i=n.y})}function c(t,n){return t.y-n.y}var f=d3.nest().key(function(t){return t.x}).sortKeys(d3.ascending).entries(l).map(function(t){return t.values});(function(){var t=d3.min(f,function(t){return(u[1]-(t.length-1)*a)/d3.sum(t,e)});f.forEach(function(n){n.forEach(function(n,e){n.y=e,n.dy=n.value*t})}),s.forEach(function(n){n.dy=n.value*t})})(),o(),n();for(var d=1;t>0;--t)i(d*=.99),o(),n(),r(d),o(),n()}(r)},d=function(){function t(t){var e=t.source.x+t.source.dx,r=t.target.x,i=d3.interpolateNumber(e,r),o=i(n),a=i(1-n),u=t.source.y+t.sy+t.dy/2,l=t.target.y+t.ty+t.dy/2;return"M"+e+","+u+"C"+o+","+u+" "+a+","+l+" "+r+","+l}var n=.5;return t.curvature=function(e){return arguments.length?(n=+e,t):n},t},h=function(t){return t.y+t.dy/2};return i.options=r.utils.optionsFunc.bind(i),i._options=Object.create({},{nodeWidth:{get:function(){return o}
vendor: 38,167 bytes, line 1
1,set:function(t){o=+t}},nodePadding:{get:function(){return a},set:function(t){a=t}},nodes:{get:function(){return l},set:function(t){l=t}},links:{get:function(){return s},set:function(t){s=t}},size:{get:function(){return u},set:function(t){u=t}},sinksRight:{get:function(){return c},set:function(t){c=t}},layout:{get:function(){f(32)},set:function(t){f(t)}},relayout:{get:function(){n()},set:function(t){}},center:{get:function(){return h()},set:function(t){"function"==typeof t&&(h=t)}},link:{get:function(){return d()},set:function(t){return"function"==typeof t&&(d=t),d()}}}),r.utils.initOptions(i),i},r.models.sankeyChart=function(){"use strict";function t(n){return n.each(function(t){var r={nodes:[{node:1,name:"Test 1"},{node:2,name:"Test 2"},{node:3,name:"Test 3"},{node:4,name:"Test 4"},{node:5,name:"Test 5"},{node:6,name:"Test 6"}],links:[{source:0,target:1,value:2295},{source:0,target:5,value:1199},{source:1,target:2,value:1119},{source:1,target:5,value:1176},{source:2,target:3,value:487},{source:2,target:5,value:632},{source:3,target:4,value:301},{source:3,target:5,value:186}]},l=!1,c=!1;if(("object"==typeof t.nodes&&t.nodes.length)>=0&&("object"==typeof t.links&&t.links.length)>=0&&(l=!0),t.nodes&&t.nodes.length>0&&t.links&&t.links.length>0&&(c=!0),!l)return console.error("NVD3 Sankey chart error:","invalid data format for",t),console.info("Valid data format is: ",r,JSON.stringify(r)),m(n,"Error loading chart, data is invalid"),!1;if(!c)return m(n,"No data available"),!1;var f=n.append("svg").attr("width",i).attr("height",o).append("g").attr("class","nvd3 nv-wrap nv-sankeyChart");e.nodeWidth(a).nodePadding(u).size([i,o]);var d=e.link();e.nodes(t.nodes).links(t.links).layout(32).center(s);var y=f.append("g").selectAll(".link").data(t.links).enter().append("path").attr("class","link").attr("d",d).style("stroke-width",function(t){return Math.max(1,t.dy)}).sort(function(t,n){return n.dy-t.dy});y.append("title").text(h);var x=f.append("g").selectAll(".node").data(t.nodes).enter().append("g").attr("class","node").attr("transform",function(t){return"translate("+t.x+","+t.y+")"}).call(d3.behavior.drag().origin(function(t){return t}).on("dragstart",function(){this.parentNode.appendChild(this)}).on("drag",function(t){d3.select(this).attr("transform","translate("+t.x+","+(t.y=Math.max(0,Math.min(o-t.dy,d3.event.y)))+")"),e.relayout(),y.attr("d",d)}));x.append("rect").attr("height",function(t){return t.dy}).attr("width",e.nodeWidth()).style("fill",p).style("stroke",g).append("title").text(v),x.append("text").attr("x",-6).attr("y",function(t){return t.dy/2}).attr("dy",".35em").attr("text-anchor","end").attr("transform",null).text(function(t){return t.name}).filter(function(t){return t.x<i/2}).attr("x",6+e.nodeWidth()).attr("text-anchor","start")}),t}var n={top:5,right:0,bottom:5,left:0},e=r.models.sankey(),i=600,o=400,a=36,u=40,l="units",s=void 0,c=d3.format(",.0f"),f=function(t){return c(t)+" "+l},d=d3.scale.category20(),h=function(t){return t.source.name+" → "+t.target.name+"\n"+f(t.value)},p=function(t){return t.color=d(t.name.replace(/ .*/,""))},g=function(t){return d3.rgb(t.color).darker(2)},v=function(t){return t.name+"\n"+f(t.value)},m=function(t,n){t.append("text").attr("x",0).attr("y",0).attr("class","nvd3-sankey-chart-error").attr("text-anchor","middle").text(n)};return t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{units:{get:function(){return l},set:function(t){l=t}},width:{get:function(){return i},set:function(t){i=t}},height:{get:function(){return o},set:function(t){o=t}},format:{get:function(){return f},set:function(t){f=t}},linkTitle:{get:function(){return h},set:function(t){h=t}},nodeWidth:{get:function(){return a},set:function(t){a=t}},nodePadding:{get:function(){return u},set:function(t){u=t}},center:{get:function(){return s},set:function(t){s=t}},margin:{get:function(){return n},set:function(t){n.top=void 0!==t.top?t.top:n.top,n.right=void 0!==t.right?t.right:n.right,n.bottom=void 0!==t.bottom?t.bottom:n.bottom,n.left=void 0!==t.left?t.left:n.left}},nodeStyle:{get:function(){return{}},set:function(t){p=void 0!==t.fillColor?t.fillColor:p,g=void 0!==t.strokeColor?t.strokeColor:g,v=void 0!==t.title?t.title:v}}}),r.utils.initOptions(t),t},r.models.scatter=function(){"use strict";function t(t){var n;n=t[0].series+":"+t[1],delete Q[n]}function n(t){var n,e,r,i=function(t){var n;return n=t[0].series+":"+t[1],Q[n]=Q[n]||{}}(t),o=!1;for(n=1;n<arguments.length;n+=2)e=arguments[n],r=arguments[n+1](t[0],t[1]),i[e]===r&&i.hasOwnProperty(e)||(i[e]=r,o=!0);return o}function e(X){return $.reset(),X.each(function(X){function Q(){if(Z=!1,!N)return!1;if(!0===Y){ut.select(".nv-point-paths").selectAll("path").remove();var t=d3.merge(X.map(function(t,n){return t.values.map(function(t,e){var i=M(t,e),o=w(t,e);return[r.utils.NaNtoZero(x(i))+1e-4*Math.random(),r.utils.NaNtoZero(b(o))+1e-4*Math.random(),n,e,t]}).filter(function(t,n){return D(t[4],n)})}));if(0==t.length)return!1;t.length<3&&(t.push([x.range()[0]-20,b.range()[0]-20,null,null]),t.push([x.range()[1]+20,b.range()[1]+20,null,null]),t.push([x.range()[0]-20,b.range()[0]+20,null,null]),t.push([x.range()[1]+20,b.range()[1]-20,null,null]));var n=d3.geom.polygon([[-10,-10],[-10,p+10],[h+10,p+10],[h+10,-10]]),e=1e-4;t=t.sort(function(t,n){return t[0]-n[0]||t[1]-n[1]});for(var i=0;i<t.length-1;)Math.abs(t[i][0]-t[i+1][0])<e&&Math.abs(t[i][1]-t[i+1][1])<e?t.splice(i+1,1):i++;var o=d3.geom.voronoi(t).map(function(e,r){return{data:n.clip(e),series:t[r][2],point:t[r][3]}}),a=ut.select(".nv-point-paths").selectAll("path").data(o),u=a.enter().append("svg:path").attr("d",function(t){return t&&t.data&&0!==t.data.length?"M"+t.data.join(",")+"Z":"M 0 0"}).attr("id",function(t,n){return"nv-path-"+n}).attr("clip-path",function(t,n){return"url(#nv-clip-"+m+"-"+n+")"});z&&u.style("fill",d3.rgb(230,230,230)).style("fill-opacity",.4).style("stroke-opacity",1).style("stroke",d3.rgb(200,200,200)),T&&(ut.select(".nv-point-clips").selectAll("*").remove(),ut.select(".nv-point-clips").selectAll("clipPath").data(t).enter().append("svg:clipPath").attr("id",function(t,n){return"nv-clip-"+m+"-"+n}).append("svg:circle").attr("cx",function(t){return t[0]}).attr("cy",function(t){return t[1]}).attr("r",O));var l=function(t,n,e){if(Z)return 0;var r=X[n.series];if(void 0!==r){var i=r.values[n.point];i.color=g(r,n.series),i.x=M(i),i.y=w(i);var o=y.node().getBoundingClientRect(),a=window.pageYOffset||document.documentElement.scrollTop,u=window.pageXOffset||document.documentElement.scrollLeft;e({point:i,series:r,pos:{left:x(M(i,n.point))+o.left+u+d.left+10,top:b(w(i,n.point))+o.top+a+d.top+10},relativePos:[x(M(i,n.point))+d.left,b(w(i,n.point))+d.top],seriesIndex:n.series,pointIndex:n.point,event:d3.event,element:t})}};a.on("click",function(t){l(this,t,q.elementClick)}).on("dblclick",function(t){l(this,t,q.elementDblClick)}).on("mouseover",function(t){l(this,t,q.elementMouseover)}).on("mouseout",function(t,n){l(this,t,q.elementMouseout)})}else ut.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(t,n){if(Z||!X[t.series])return 0;var e=X[t.series],r=e.values[n];q.elementClick({point:r,series:e,pos:[x(M(r,n))+d.left,b(w(r,n))+d.top],relativePos:[x(M(r,n))+d.left,b(w(r,n))+d.top],seriesIndex:t.series,pointIndex:n,event:d3.event,element:this})}).on("dblclick",function(t,n){if(Z||!X[t.series])return 0;var e=X[t.series],r=e.values[n];q.elementDblClick({point:r,series:e,pos:[x(M(r,n))+d.left,b(w(r,n))+d.top],relativePos:[x(M(r,n))+d.left,b(w(r,n))+d.top],seriesIndex:t.series,pointIndex:n})}).on("mouseover",function(t,n){if(Z||!X[t.series])return 0;var e=X[t.series],r=e.values[n];q.elementMouseover({point:r,series:e,pos:[x(M(r,n))+d.left,b(w(r,n))+d.top],relativePos:[x(M(r,n))+d.left,b(w(r,n))+d.top],seriesIndex:t.series,pointIndex:n,color:g(t,n)})}).on("mouseout",function(t,n){if(Z||!X[t.series])return 0;var e=X[t.series],r=e.values[n];q.elementMouseout({point:r,series:e,pos:[x(M(r,n))+d.left,b(w(r,n))+d.top],relativePos:[x(M(r,n))+d.left,b(w(r,n))+d.top],seriesIndex:t.series,pointIndex:n,color:g(t,n)})})}y=d3.select(this);var J=r.utils.availableWidth(h,y,d),tt=r.utils.availableHeight(p,y,d);r.utils.initSVG(y),X.forEach(function(t,n){t.values.forEach(function(t){t.series=n})});var nt="function"==typeof e.yScale().base,et=P&&B&&H?[]:d3.merge(X.map(function(t){return t.values.map(function(t,n){return{x:M(t,n),y:w(t,n),size:A(t,n)}})}));if(x.domain(P||d3.extent(et.map(function(t){return t.x}).concat(C))),F&&X[0]?x.range(I||[(J*W+J)/(2*X[0].values.length),J-J*(1+W)/(2*X[0].values.length)]):x.range(I||[0,J]),nt){var rt=d3.min(et.map(function(t){return 0!==t.y?t.y:void 0}));b.clamp(!0).domain(B||d3.extent(et.map(function(t){return 0!==t.y?t.y:.1*rt}).concat(S))).range(R||[tt,0])}else b.domain(B||d3.extent(et.map(function(t){return t.y}).concat(S))).range(R||[tt,0]);k.domain(H||d3.extent(et.map(function(t){return t.size}).concat(E))).range(V||K),j=x.domain()[0]===x.domain()[1]||b.domain()[0]===b.domain()[1],x.domain()[0]===x.domain()[1]&&(x.domain()[0]?x.domain([x.domain()[0]-.01*x.domain()[0],x.domain()[1]+.01*x.domain()[1]]):x.domain([-1,1])),b.domain()[0]===b.domain()[1]&&(b.domain()[0]?b.domain([b.domain()[0]-.01*b.domain()[0],b.domain()[1]+.01*b.domain()[1]]):b.domain([-1,1])),isNaN(x.domain()[0])&&x.domain([-1,1]),isNaN(b.domain()[0])&&b.domain([-1,1]),i=i||x,o=o||b,a=a||k;var it=x(1)!==i(1)||b(1)!==o(1)||k(1)!==a(1);c=c||p;var ot=(s=s||h)!==h||c!==p,at=(u=u||[])[0]!==x.domain()[0]||u[1]!==x.domain()[1];u=x.domain(),l=l||[],at=at||l[0]!==b.domain()[0]||l[1]!==b.domain()[1],l=b.domain();var ut=y.selectAll("g.nv-wrap.nv-scatter").data([X]),lt=ut.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+m),st=lt.append("defs"),ct=lt.append("g"),ft=ut.select("g");ut.classed("nv-single-point",j),ct.append("g").attr("class","nv-groups"),ct.append("g").attr("class","nv-point-paths"),lt.append("g").attr("class","nv-point-clips"),ut.attr("transform","translate("+d.left+","+d.top+")"),st.append("clipPath").attr("id","nv-edge-clip-"+m).append("rect").attr("transform","translate( -10, -10)"),ut.select("#nv-edge-clip-"+m+" rect").attr("width",J+20).attr("height",tt>0?tt+20:0),ft.attr("clip-path",L?"url(#nv-edge-clip-"+m+")":""),Z=!0;var dt=ut.select(".nv-groups").selectAll(".nv-group").data(function(t){return t},function(t){return t.key});dt.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),dt.exit().remove(),dt.attr("class",function(t,n){return(t.classed||"")+" nv-group nv-series-"+n}).classed("nv-noninteractive",!N).classed("hover",function(t){return t.hover}),dt.watchTransition($,"scatter: groups").style("fill",function(t,n){return g(t,n)}).style("stroke",function(t,n){return t.pointBorderColor||v||g(t,n)}).style("stroke-opacity",1).style("fill-opacity",.5);var ht=dt.selectAll("path.nv-point").data(function(t){return t.values.map(function(t,n){return[t,n]}).filter(function(t,n){return D(t[0],n)})});if(ht.enter().append("path").attr("class",function(t){return"nv-point nv-point-"+t[1]}).style("fill",function(t){return t.color}).style("stroke",function(t){return t.color}).attr("transform",function(t){return"translate("+r.utils.NaNtoZero(i(M(t[0],t[1])))+","+r.utils.NaNtoZero(o(w(t[0],t[1])))+")"}).attr("d",r.utils.symbol().type(function(t){return _(t[0])}).size(function(t){return k(A(t[0],t[1]))})),ht.exit().each(t).remove(),dt.exit().selectAll("path.nv-point").watchTransition($,"scatter exit").attr("transform",function(t){return"translate("+r.utils.NaNtoZero(x(M(t[0],t[1])))+","+r.utils.NaNtoZero(b(w(t[0],t[1])))+")"}).remove(),ht.filter(function(t){return n(t,"x",M,"y",w)||it||ot||at}).watchTransition($,"scatter points").attr("transform",function(t){return"translate("+r.utils.NaNtoZero(x(M(t[0],t[1])))+","+r.utils.NaNtoZero(b(w(t[0],t[1])))+")"}),ht.filter(function(t){return n(t,"shape",_,"size",A)||it||ot||at}).watchTransition($,"scatter points").attr("d",r.utils.symbol().type(function(t){return _(t[0])}).size(function(t){return k(A(t[0],t[1]))})),U){var pt=dt.selectAll(".nv-label").data(function(t){return t.values.map(function(t,n){return[t,n]}).filter(function(t,n){return D(t[0],n)})});pt.enter().append("text").style("fill",function(t,n){return t.color}).style("stroke-opacity",0).style("fill-opacity",1).attr("transform",function(t){return"translate("+(r.utils.NaNtoZero(i(M(t[0],t[1])))+Math.sqrt(k(A(t[0],t[1]))/Math.PI)+2)+","+r.utils.NaNtoZero(o(w(t[0],t[1])))+")"}).text(function(t,n){return t[0].label}),pt.exit().remove(),dt.exit().selectAll("path.nv-label").watchTransition($,"scatter exit").attr("transform",function(t){return"translate("+(r.utils.NaNtoZero(x(M(t[0],t[1])))+Math.sqrt(k(A(t[0],t[1]))/Math.PI)+2)+","+r.utils.NaNtoZero(b(w(t[0],t[1])))+")"}).remove(),pt.each(function(t){d3.select(this).classed("nv-label",!0).classed("nv-label-"+t[1],!1).classed("hover",!1)}),pt.watchTransition($,"scatter labels").attr("transform",function(t){return"translate("+(r.utils.NaNtoZero(x(M(t[0],t[1])))+Math.sqrt(k(A(t[0],t[1]))/Math.PI)+2)+","+r.utils.NaNtoZero(b(w(t[0],t[1])))+")"})}G?(clearTimeout(f),f=setTimeout(Q,G)):Q(),i=x.copy(),o=b.copy(),a=k.copy(),s=h,c=p}),$.renderEnd("scatter immediate"),e}var i,o,a,u,l,s,c,f,d={top:0,right:0,bottom:0,left:0},h=null,p=null,g=r.utils.defaultColor(),v=null,m=Math.floor(1e5*Math.random()),y=null,x=d3.scale.linear(),b=d3.scale.linear(),k=d3.scale.linear(),M=function(t){return t.x},w=function(t){return t.y},A=function(t){return t.size||1},_=function(t){return t.shape||"circle"},C=[],S=[],E=[],N=!0,D=function(t){return!t.notActive},F=!1,W=.1,L=!1,T=!0,z=!1,O=function(){return 25},P=null,B=null,I=null,R=null,H=null,V=null,j=!1,q=d3.dispatch("elementClick","elementDblClick","elementMouseover","elementMouseout","renderEnd"),Y=!0,X=250,G=300,U=!1,Z=!1,$=r.utils.renderWatch(q,X),K=[16,256],Q={};return e.dispatch=q,e.options=r.utils.optionsFunc.bind(e),e._calls=new function(){this.clearHighlights=function(){return r.dom.write(function(){y.selectAll(".nv-point.hover").classed("hover",!1)}),null},this.highlightPoint=function(t,n,e){r.dom.write(function(){y.select(".nv-groups").selectAll(".nv-series-"+t).selectAll(".nv-point-"+n).classed("hover",e)})}},q.on("elementMouseover.point",function(t){N&&e._calls.highlightPoint(t.seriesIndex,t.pointIndex,!0)}),q.on("elementMouseout.point",function(t){N&&e._calls.highlightPoint(t.seriesIndex,t.pointIndex,!1)}),e._options=Object.create({},{width:{get:function(){return h},set:function(t){h=t}},height:{get:function(){return p},set:function(t){p=t}},xScale:{get:function(){return x},set:function(t){x=t}},yScale:{get:function(){return b},set:function(t){b=t}},pointScale:{get:function(){return k},set:function(t){k=t}},xDomain:{get:function(){return P},set:function(t){P=t}},yDomain:{get:function(){return B},set:function(t){B=t}},pointDomain:{get:function(){return H},set:function(t){H=t}},xRange:{get:function(){return I},set:function(t){I=t}},yRange:{get:function(){return R},set:function(t){R=t}},pointRange:{get:function(){return V},set:function(t){V=t}},forceX:{get:function(){return C},set:function(t){C=t}},forceY:{get:function(){return S},set:function(t){S=t}},forcePoint:{get:function(){return E},set:function(t){E=t}},interactive:{get:function(){return N},set:function(t){N=t}},pointActive:{get:function(){return D},set:function(t){D=t}},padDataOuter:{get:function(){return W},set:function(t){W=t}},padData:{get:function(){return F},set:function(t){F=t}},clipEdge:{get:function(){return L},set:function(t){L=t}},clipVoronoi:{get:function(){return T},set:function(t){T=t}},clipRadius:{get:function(){return O},set:function(t){O=t}},showVoronoi:{get:function(){return z},set:function(t){z=t}},id:{get:function(){return m},set:function(t){m=t}},interactiveUpdateDelay:{get:function(){return G},set:function(t){G=t}},showLabels:{get:function(){return U},set:function(t){U=t}},pointBorderColor:{get:function(){return v},set:function(t){v=t}},x:{get:function(){return M},set:function(t){M=d3.functor(t)}},y:{get:function(){return w},set:function(t){w=d3.functor(t)}},pointSize:{get:function(){return A},set:function(t){A=d3.functor(t)}},pointShape:{get:function(){return _},set:function(t){_=d3.functor(t)}},margin:{get:function(){return d},set:function(t){d.top=void 0!==t.top?t.top:d.top,d.right=void 0!==t.right?t.right:d.right,d.bottom=void 0!==t.bottom?t.bottom:d.bottom,d.left=void 0!==t.left?t.left:d.left}},duration:{get:function(){return X},set:function(t){X=t,$.reset(X)}},color:{get:function(){return g},set:function(t){g=r.utils.getColor(t)}},useVoronoi:{get:function(){return Y},set:function(t){!1===(Y=t)&&(T=!1)}}}),r.utils.initOptions(e),e},r.models.scatterChart=function(){"use strict";function t(C){return N.reset(),N.models(n),b&&N.models(e),k&&N.models(i),m&&N.models(a),y&&N.models(u),C.each(function(C){h=d3.select(this),r.utils.initSVG(h);var W,L=r.utils.availableWidth(f,h,s),T=r.utils.availableHeight(d,h,s);if(t.update=function(){0===S?h.call(t):h.transition().duration(S).call(t)},t.container=this,w.setter(F(C),t.update).getter(D(C)).update(),w.disabled=C.map(function(t){return!!t.disabled}),!A)for(W in A={},w)w[W]instanceof Array?A[W]=w[W].slice(0):A[W]=w[W];if(!(C&&C.length&&C.filter(function(t){return t.values.length}).length))return r.utils.noData(t,h),N.renderEnd("scatter immediate"),t;h.selectAll(".nv-noData").remove(),g=n.xScale(),v=n.yScale();var z=h.selectAll("g.nv-wrap.nv-scatterChart").data([C]),O=z.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+n.id()).append("g"),P=z.select("g");if(O.append("rect").attr("class","nvd3 nv-background").style("pointer-events","none"),O.append("g").attr("class","nv-x nv-axis"),O.append("g").attr("class","nv-y nv-axis"),O.append("g").attr("class","nv-scatterWrap"),O.append("g").attr("class","nv-regressionLinesWrap"),O.append("g").attr("class","nv-distWrap"),O.append("g").attr("class","nv-legendWrap"),M&&P.select(".nv-y.nv-axis").attr("transform","translate("+L+",0)"),x){var B=L;o.width(B),z.select(".nv-legendWrap").datum(C).call(o),c||o.height()===s.top||(s.top=o.height(),T=r.utils.availableHeight(d,h,s)),z.select(".nv-legendWrap").attr("transform","translate(0,"+-s.top+")")}else P.select(".nv-legendWrap").selectAll("*").remove();z.attr("transform","translate("+s.left+","+s.top+")"),n.width(L).height(T).color(C.map(function(t,n){return t.color=t.color||p(t,n),t.color}).filter(function(t,n){return!C[n].disabled})).showLabels(E),z.select(".nv-scatterWrap").datum(C.filter(function(t){return!t.disabled})).call(n),z.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+n.id()+")");var I=z.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(t){return t});I.enter().append("g").attr("class","nv-regLines");var R=I.selectAll(".nv-regLine").data(function(t){return[t]});R.enter().append("line").attr("class","nv-regLine").style("stroke-opacity",0),R.filter(function(t){return t.intercept&&t.slope}).watchTransition(N,"scatterPlusLineChart: regline").attr("x1",g.range()[0]).attr("x2",g.range()[1]).attr("y1",function(t,n){return v(g.domain()[0]*t.slope+t.intercept)}).attr("y2",function(t,n){return v(g.domain()[1]*t.slope+t.intercept)}).style("stroke",function(t,n,e){return p(t,e)}).style("stroke-opacity",function(t,n){return t.disabled||void 0===t.slope||void 0===t.intercept?0:1}),b&&(e.scale(g)._ticks(r.utils.calcTicksX(L/100,C)).tickSize(-T,0),P.select(".nv-x.nv-axis").attr("transform","translate(0,"+v.range()[0]+")").call(e)),k&&(i.scale(v)._ticks(r.utils.calcTicksY(T/36,C)).tickSize(-L,0),P.select(".nv-y.nv-axis").call(i)),m&&(a.getData(n.x()).scale(g).width(L).color(C.map(function(t,n){return t.color||p(t,n)}).filter(function(t,n){return!C[n].disabled})),O.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),P.select(".nv-distributionX").attr("transform","translate(0,"+v.range()[0]+")").datum(C.filter(function(t){return!t.disabled})).call(a)),y&&(u.getData(n.y()).scale(v).width(T).color(C.map(function(t,n){return t.color||p(t,n)}).filter(function(t,n){return!C[n].disabled})),O.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),P.select(".nv-distributionY").attr("transform","translate("+(M?L:-u.size())+",0)").datum(C.filter(function(t){return!t.disabled})).call(u)),o.dispatch.on("stateChange",function(n){for(var e in n)w[e]=n[e];_.stateChange(w),t.update()}),_.on("changeState",function(n){void 0!==n.disabled&&(C.forEach(function(t,e){t.disabled=n.disabled[e]}),w.disabled=n.disabled),t.update()}),n.dispatch.on("elementMouseout.tooltip",function(t){l.hidden(!0),h.select(".nv-chart-"+n.id()+" .nv-series-"+t.seriesIndex+" .nv-distx-"+t.pointIndex).attr("y1",0),h.select(".nv-chart-"+n.id()+" .nv-series-"+t.seriesIndex+" .nv-disty-"+t.pointIndex).attr("x2",u.size())}),n.dispatch.on("elementMouseover.tooltip",function(t){h.select(".nv-series-"+t.seriesIndex+" .nv-distx-"+t.pointIndex).attr("y1",t.relativePos[1]-T),h.select(".nv-series-"+t.seriesIndex+" .nv-disty-"+t.pointIndex).attr("x2",t.relativePos[0]+a.size()),l.data(t).hidden(!1)}),g.copy(),v.copy()}),N.renderEnd("scatter with line immediate"),t}var n=r.models.scatter(),e=r.models.axis(),i=r.models.axis(),o=r.models.legend(),a=r.models.distribution(),u=r.models.distribution(),l=r.models.tooltip(),s={top:30,right:20,bottom:50,left:75},c=null,f=null,d=null,h=null,p=r.utils.defaultColor(),g=n.xScale(),v=n.yScale(),m=!1,y=!1,x=!0,b=!0,k=!0,M=!1,w=r.utils.state(),A=null,_=d3.dispatch("stateChange","changeState","renderEnd"),C=null,S=250,E=!1;n.xScale(g).yScale(v),e.orient("bottom").tickPadding(10),i.orient(M?"right":"left").tickPadding(10),a.axis("x"),u.axis("y"),l.headerFormatter(function(t,n){return e.tickFormat()(t,n)}).valueFormatter(function(t,n){return i.tickFormat()(t,n)});var N=r.utils.renderWatch(_,S),D=function(t){return function(){return{active:t.map(function(t){return!t.disabled})}}},F=function(t){return function(n){void 0!==n.active&&t.forEach(function(t,e){t.disabled=!n.active[e]})}};return t.dispatch=_,t.scatter=n,t.legend=o,t.xAxis=e,t.yAxis=i,t.distX=a,t.distY=u,t.tooltip=l,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return f},set:function(t){f=t}},height:{get:function(){return d},set:function(t){d=t}},container:{get:function(){return h},set:function(t){h=t}},showDistX:{get:function(){return m},set:function(t){m=t}},showDistY:{get:function(){return y},set:function(t){y=t}},showLegend:{get:function(){return x},set:function(t){x=t}},showXAxis:{get:function(){return b},set:function(t){b=t}},showYAxis:{get:function(){return k},set:function(t){k=t}},defaultState:{get:function(){return A},set:function(t){A=t}},noData:{get:function(){return C},set:function(t){C=t}},duration:{get:function(){return S},set:function(t){S=t}},showLabels:{get:function(){return E},set:function(t){E=t}},margin:{get:function(){return s},set:function(t){void 0!==t.top&&(s.top=t.top,c=t.top),s.right=void 0!==t.right?t.right:s.right,s.bottom=void 0!==t.bottom?t.bottom:s.bottom,s.left=void 0!==t.left?t.left:s.left}},rightAlignYAxis:{get:function(){return M},set:function(t){M=t,i.orient(t?"right":"left")}},color:{get:function(){return p},set:function(t){p=r.utils.getColor(t),o.color(p),a.color(p),u.color(p)}}}),r.utils.inheritOptions(t,n),r.utils.initOptions(t),t},r.models.sparkline=function(){"use strict";function t(c){return x.reset(),c.each(function(t){var c=u-a.left-a.right,y=l-a.top-a.bottom;s=d3.select(this),r.utils.initSVG(s),f.domain(n||d3.extent(t,h)).range(i||[0,c]),d.domain(e||d3.extent(t,p)).range(o||[y,0]);var x=s.selectAll("g.nv-wrap.nv-sparkline").data([t]);x.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline").append("g"),x.select("g"),x.attr("transform","translate("+a.left+","+a.top+")");var b=x.selectAll("path").data(function(t){return[t]});b.enter().append("path"),b.exit().remove(),b.style("stroke",function(t,n){return t.color||g(t,n)}).attr("d",d3.svg.line().x(function(t,n){return f(h(t,n))}).y(function(t,n){return d(p(t,n))}));var k=x.selectAll("circle.nv-point").data(function(t){function n(n){if(-1!=n){var e=t[n];return e.pointIndex=n,e}return null}var e=t.map(function(t,n){return p(t,n)}),r=n(e.lastIndexOf(d.domain()[1])),i=n(e.indexOf(d.domain()[0])),o=n(e.length-1);return[v?i:null,v?r:null,m?o:null].filter(function(t){return null!=t})});k.enter().append("circle"),k.exit().remove(),k.attr("cx",function(t,n){return f(h(t,t.pointIndex))}).attr("cy",function(t,n){return d(p(t,t.pointIndex))}).attr("r",2).attr("class",function(t,n){return h(t,t.pointIndex)==f.domain()[1]?"nv-point nv-currentValue":p(t,t.pointIndex)==d.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})}),x.renderEnd("sparkline immediate"),t}var n,e,i,o,a={top:2,right:0,bottom:2,left:0},u=400,l=32,s=null,c=!0,f=d3.scale.linear(),d=d3.scale.linear(),h=function(t){return t.x},p=function(t){return t.y},g=r.utils.getColor(["#000"]),v=!0,m=!0,y=d3.dispatch("renderEnd"),x=r.utils.renderWatch(y);return t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return u},set:function(t){u=t}},height:{get:function(){return l},set:function(t){l=t}},xDomain:{get:function(){return n},set:function(t){n=t}},yDomain:{get:function(){return e},set:function(t){e=t}},xRange:{get:function(){return i},set:function(t){i=t}},yRange:{get:function(){return o},set:function(t){o=t}},xScale:{get:function(){return f},set:function(t){f=t}},yScale:{get:function(){return d},set:function(t){d=t}},animate:{get:function(){return c},set:function(t){c=t}},showMinMaxPoints:{get:function(){return v},set:function(t){v=t}},showCurrentPoint:{get:function(){return m},set:function(t){m=t}},x:{get:function(){return h},set:function(t){h=d3.functor(t)}},y:{get:function(){return p},set:function(t){p=d3.functor(t)}},margin:{get:function(){return a},set:function(t){a.top=void 0!==t.top?t.top:a.top,a.right=void 0!==t.right?t.right:a.right,a.bottom=void 0!==t.bottom?t.bottom:a.bottom,a.left=void 0!==t.left?t.left:a.left}},color:{get:function(){return g},set:function(t){g=r.utils.getColor(t)}}}),t.dispatch=y,r.utils.initOptions(t),t},r.models.sparklinePlus=function(){"use strict";function t(g){return m.reset(),m.models(i),g.each(function(g){function v(){if(!s){var t=w.selectAll(".nv-hoverValue").data(l),e=t.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);t.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove(),t.attr("transform",function(t){return"translate("+n(i.x()(g[t],t))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1),l.length&&(e.append("line").attr("x1",0).attr("y1",-o.top).attr("x2",0).attr("y2",x),e.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-o.top).attr("text-anchor","end").attr("dy",".9em"),w.select(".nv-hoverValue .nv-xValue").text(c(i.x()(g[l[0]],l[0]))),e.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-o.top).attr("text-anchor","start").attr("dy",".9em"),w.select(".nv-hoverValue .nv-yValue").text(f(i.y()(g[l[0]],l[0]))))}}var m=d3.select(this);r.utils.initSVG(m);var y=r.utils.availableWidth(a,m,o),x=r.utils.availableHeight(u,m,o);if(t.update=function(){m.call(t)},t.container=this,!g||!g.length)return r.utils.noData(t,m),t;m.selectAll(".nv-noData").remove();var b=i.y()(g[g.length-1],g.length-1);n=i.xScale(),e=i.yScale();var k=m.selectAll("g.nv-wrap.nv-sparklineplus").data([g]),M=k.enter().append("g").attr("class","nvd3 nv-wrap nv-sparklineplus").append("g"),w=k.select("g");M.append("g").attr("class","nv-sparklineWrap"),M.append("g").attr("class","nv-valueWrap"),M.append("g").attr("class","nv-hoverArea"),k.attr("transform","translate("+o.left+","+o.top+")");var A=w.select(".nv-sparklineWrap");if(i.width(y).height(x),A.call(i),d){var _=w.select(".nv-valueWrap").selectAll(".nv-currentValue").data([b]);_.enter().append("text").attr("class","nv-currentValue").attr("dx",p?-8:8).attr("dy",".9em").style("text-anchor",p?"end":"start"),_.attr("x",y+(p?o.right:0)).attr("y",h?function(t){return e(t)}:0).style("fill",i.color()(g[g.length-1],g.length-1)).text(f(b))}M.select(".nv-hoverArea").append("rect").on("mousemove",function(){if(!s){var t=d3.mouse(this)[0]-o.left;l=[function(t,n){for(var e=Math.abs(i.x()(t[0],0)-n),r=0,o=0;o<t.length;o++)Math.abs(i.x()(t[o],o)-n)<e&&(e=Math.abs(i.x()(t[o],o)-n),r=o);return r}(g,Math.round(n.invert(t)))],v()}}).on("click",function(){s=!s}).on("mouseout",function(){l=[],v()}),w.select(".nv-hoverArea rect").attr("transform",function(t){return"translate("+-o.left+","+-o.top+")"}).attr("width",y+o.left+o.right).attr("height",x+o.top)}),m.renderEnd("sparklinePlus immediate"),t}var n,e,i=r.models.sparkline(),o={top:15,right:100,bottom:10,left:50},a=null,u=null,l=[],s=!1,c=d3.format(",r"),f=d3.format(",.2f"),d=!0,h=!0,p=!1,g=null,v=d3.dispatch("renderEnd"),m=r.utils.renderWatch(v);return t.dispatch=v,t.sparkline=i,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return a},set:function(t){a=t}},height:{get:function(){return u},set:function(t){u=t}},xTickFormat:{get:function(){return c},set:function(t){c=t}},yTickFormat:{get:function(){return f},set:function(t){f=t}},showLastValue:{get:function(){return d},set:function(t){d=t}},alignValue:{get:function(){return h},set:function(t){h=t}},rightAlignValue:{get:function(){return p},set:function(t){p=t}},noData:{get:function(){return g},set:function(t){g=t}},margin:{get:function(){return o},set:function(t){o.top=void 0!==t.top?t.top:o.top,o.right=void 0!==t.right?t.right:o.right,o.bottom=void 0!==t.bottom?t.bottom:o.bottom,o.left=void 0!==t.left?t.left:o.left}}}),r.utils.inheritOptions(t,i),r.utils.initOptions(t),t},r.models.stackedArea=function(){"use strict";function t(h){return k.reset(),k.models(y),h.each(function(h){var x=o-i.left-i.right,M=a-i.top-i.bottom;s=d3.select(this),r.utils.initSVG(s),n=y.xScale(),e=y.yScale();var w=h;h.forEach(function(t,n){t.seriesIndex=n,t.values=t.values.map(function(t,e){return t.index=e,t.seriesIndex=n,t})});var A=h.filter(function(t){return!t.disabled});h=d3.layout.stack().order(g).offset(p).values(function(t){return t.values}).x(c).y(f).out(function(t,n,e){t.display={y:e,y0:n}})(A);var _=s.selectAll("g.nv-wrap.nv-stackedarea").data([h]),C=_.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedarea"),S=C.append("defs"),E=C.append("g"),N=_.select("g");E.append("g").attr("class","nv-areaWrap"),E.append("g").attr("class","nv-scatterWrap"),_.attr("transform","translate("+i.left+","+i.top+")"),0==y.forceY().length&&y.forceY().push(0),y.width(x).height(M).x(c).y(function(t){return void 0!==t.display?t.display.y+t.display.y0:void 0}).color(h.map(function(t,n){return t.color=t.color||u(t,t.seriesIndex),t.color})),N.select(".nv-scatterWrap").datum(h).call(y),S.append("clipPath").attr("id","nv-edge-clip-"+l).append("rect"),_.select("#nv-edge-clip-"+l+" rect").attr("width",x).attr("height",M),N.attr("clip-path",m?"url(#nv-edge-clip-"+l+")":"");var D=d3.svg.area().defined(d).x(function(t,e){return n(c(t,e))}).y0(function(t){return e(t.display.y0)}).y1(function(t){return e(t.display.y+t.display.y0)}).interpolate(v),F=d3.svg.area().defined(d).x(function(t,e){return n(c(t,e))}).y0(function(t){return e(t.display.y0)}).y1(function(t){return e(t.display.y0)}),W=N.select(".nv-areaWrap").selectAll("path.nv-area").data(function(t){return t});W.enter().append("path").attr("class",function(t,n){return"nv-area nv-area-"+n}).attr("d",function(t,n){return F(t.values,t.seriesIndex)}).on("mouseover",function(t,n){d3.select(this).classed("hover",!0),b.areaMouseover({point:t,series:t.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t.seriesIndex})}).on("mouseout",function(t,n){d3.select(this).classed("hover",!1),b.areaMouseout({point:t,series:t.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t.seriesIndex})}).on("click",function(t,n){d3.select(this).classed("hover",!1),b.areaClick({point:t,series:t.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t.seriesIndex})}),W.exit().remove(),W.style("fill",function(t,n){return t.color||u(t,t.seriesIndex)}).style("stroke",function(t,n){return t.color||u(t,t.seriesIndex)}),W.watchTransition(k,"stackedArea path").attr("d",function(t,n){return D(t.values,n)}),y.dispatch.on("elementMouseover.area",function(t){N.select(".nv-chart-"+l+" .nv-area-"+t.seriesIndex).classed("hover",!0)}),y.dispatch.on("elementMouseout.area",function(t){N.select(".nv-chart-"+l+" .nv-area-"+t.seriesIndex).classed("hover",!1)}),t.d3_stackedOffset_stackPercent=function(t){var n,e,r,i=t.length,o=t[0].length,a=[];for(e=0;o>e;++e){for(n=0,r=0;n<w.length;n++)r+=f(w[n].values[e]);if(r)for(n=0;i>n;n++)t[n][e][1]/=r;else for(n=0;i>n;n++)t[n][e][1]=0}for(e=0;o>e;++e)a[e]=0;return a}}),k.renderEnd("stackedArea immediate"),t}var n,e,i={top:0,right:0,bottom:0,left:0},o=960,a=500,u=r.utils.defaultColor(),l=Math.floor(1e5*Math.random()),s=null,c=function(t){return t.x},f=function(t){return t.y},d=function(t,n){return!isNaN(f(t,n))&&null!==f(t,n)},h="stack",p="zero",g="default",v="linear",m=!1,y=r.models.scatter(),x=250,b=d3.dispatch("areaClick","areaMouseover","areaMouseout","renderEnd","elementClick","elementMouseover","elementMouseout");y.pointSize(2.2).pointDomain([2.2,2.2]);var k=r.utils.renderWatch(b,x);return t.dispatch=b,t.scatter=y,y.dispatch.on("elementClick",function(){b.elementClick.apply(this,arguments)}),y.dispatch.on("elementMouseover",function(){b.elementMouseover.apply(this,arguments)}),y.dispatch.on("elementMouseout",function(){b.elementMouseout.apply(this,arguments)}),t.interpolate=function(n){return arguments.length?(v=n,t):v},t.duration=function(n){return arguments.length?(x=n,k.reset(x),y.duration(x),t):x},t.dispatch=b,t.scatter=y,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return o},set:function(t){o=t}},height:{get:function(){return a},set:function(t){a=t}},defined:{get:function(){return d},set:function(t){d=t}},clipEdge:{get:function(){return m},set:function(t){m=t}},offset:{get:function(){return p},set:function(t){p=t}},order:{get:function(){return g},set:function(t){g=t}},interpolate:{get:function(){return v},set:function(t){v=t}},x:{get:function(){return c},set:function(t){c=d3.functor(t)}},y:{get:function(){return f},set:function(t){f=d3.functor(t)}},margin:{get:function(){return i},set:function(t){i.top=void 0!==t.top?t.top:i.top,i.right=void 0!==t.right?t.right:i.right,i.bottom=void 0!==t.bottom?t.bottom:i.bottom,i.left=void 0!==t.left?t.left:i.left}},color:{get:function(){return u},set:function(t){u=r.utils.getColor(t)}},style:{get:function(){return h},set:function(n){switch(h=n){case"stack":t.offset("zero"),t.order("default");break;case"stream":t.offset("wiggle"),t.order("inside-out");break;case"stream-center":t.offset("silhouette"),t.order("inside-out");break;case"expand":t.offset("expand"),t.order("default");break;case"stack_percent":t.offset(t.d3_stackedOffset_stackPercent),t.order("default")}}},duration:{get:function(){return x},set:function(t){x=t,k.reset(x),y.duration(x)}}}),r.utils.inheritOptions(t,y),r.utils.initOptions(t),t},r.models.stackedAreaChart=function(){"use strict";function t(c){return P.reset(),P.models(i),b&&P.models(o),k&&P.models(a),c.each(function(c){function N(){b&&U.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+Y+")").transition().duration(T).call(o)}function P(){if(k){if("expand"===i.style()||"stack_percent"===i.style()){var t=a.tickFormat();z&&t===R||(z=t),a.tickFormat(R)}else z&&(a.tickFormat(z),z=null);U.select(".nv-focus .nv-y.nv-axis").transition().duration(0).call(a)}}function H(t){var n=U.select(".nv-focus .nv-stackedWrap").datum(c.filter(function(t){return!t.disabled}).map(function(n,e){return{key:n.key,area:n.area,classed:n.classed,values:n.values.filter(function(n,e){return i.x()(n,e)>=t[0]&&i.x()(n,e)<=t[1]}),disableTooltip:n.disableTooltip}}));n.transition().duration(T).call(i),N(),P()}var V=d3.select(this);r.utils.initSVG(V);var j,q=r.utils.availableWidth(p,V,d),Y=r.utils.availableHeight(g,V,d)-(w?f.height():0);if(t.update=function(){V.transition().duration(T).call(t)},t.container=this,S.setter(I(c),t.update).getter(B(c)).update(),S.disabled=c.map(function(t){return!!t.disabled}),!E)for(j in E={},S)S[j]instanceof Array?E[j]=S[j].slice(0):E[j]=S[j];if(!(c&&c.length&&c.filter(function(t){return t.values.length}).length))return r.utils.noData(t,V),t;V.selectAll(".nv-noData").remove(),n=i.xScale(),e=i.yScale();var X=V.selectAll("g.nv-wrap.nv-stackedAreaChart").data([c]),G=X.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g"),U=X.select("g");G.append("g").attr("class","nv-legendWrap"),G.append("g").attr("class","nv-controlsWrap");var Z=G.append("g").attr("class","nv-focus");if(Z.append("g").attr("class","nv-background").append("rect"),Z.append("g").attr("class","nv-x nv-axis"),Z.append("g").attr("class","nv-y nv-axis"),Z.append("g").attr("class","nv-stackedWrap"),Z.append("g").attr("class","nv-interactive"),G.append("g").attr("class","nv-focusWrap"),y){var $=m&&"top"===x?q-F:q;if(u.width($),U.select(".nv-legendWrap").datum(c).call(u),"bottom"===x){var K=10+(b?12:0);d.bottom=Math.max(u.height()+K,d.bottom);var Q=(Y=r.utils.availableHeight(g,V,d)-(w?f.height():0))+K;U.select(".nv-legendWrap").attr("transform","translate(0,"+Q+")")}else"top"===x&&(h||d.top==u.height()||(d.top=u.height(),Y=r.utils.availableHeight(g,V,d)-(w?f.height():0)),U.select(".nv-legendWrap").attr("transform","translate("+(q-$)+","+-d.top+")"))}else U.select(".nv-legendWrap").selectAll("*").remove();if(m){var J=[{key:L.stacked||"Stacked",metaKey:"Stacked",disabled:"stack"!=i.style(),style:"stack"},{key:L.stream||"Stream",metaKey:"Stream",disabled:"stream"!=i.style(),style:"stream"},{key:L.expanded||"Expanded",metaKey:"Expanded",disabled:"expand"!=i.style(),style:"expand"},{key:L.stack_percent||"Stack %",metaKey:"Stack_Percent",disabled:"stack_percent"!=i.style(),style:"stack_percent"}];F=W.length/3*260,J=J.filter(function(t){return-1!==W.indexOf(t.metaKey)}),l.width(F).color(["#444","#444","#444"]),U.select(".nv-control
1sWrap").datum(J).call(l);var tt=Math.max(l.height(),y&&"top"===x?u.height():0);d.top!=tt&&(d.top=tt,Y=r.utils.availableHeight(g,V,d)-(w?f.height():0)),U.select(".nv-controlsWrap").attr("transform","translate(0,"+-d.top+")")}else U.select(".nv-controlsWrap").selectAll("*").remove();X.attr("transform","translate("+d.left+","+d.top+")"),M&&U.select(".nv-y.nv-axis").attr("transform","translate("+q+",0)"),A&&(s.width(q).height(Y).margin({left:d.left,top:d.top}).svgContainer(V).xScale(n),X.select(".nv-interactive").call(s)),U.select(".nv-focus .nv-background rect").attr("width",q).attr("height",Y),i.width(q).height(Y).color(c.map(function(t,n){return t.color||v(t,n)}).filter(function(t,n){return!c[n].disabled}));var nt,et=U.select(".nv-focus .nv-stackedWrap").datum(c.filter(function(t){return!t.disabled}));if(b&&o.scale(n)._ticks(r.utils.calcTicksX(q/100,c)).tickSize(-Y,0),k&&(nt="wiggle"===i.offset()?0:r.utils.calcTicksY(Y/36,c),a.scale(e)._ticks(nt).tickSize(-q,0)),w){f.width(q),U.select(".nv-focusWrap").attr("transform","translate(0,"+(Y+d.bottom+f.margin().top)+")").datum(c.filter(function(t){return!t.disabled})).call(f);var rt=f.brush.empty()?f.xDomain():f.brush.extent();null!==rt&&H(rt)}else et.transition().call(i),N(),P();i.dispatch.on("areaClick.toggle",function(n){1===c.filter(function(t){return!t.disabled}
vendor: 4,095 bytes, line 1
1).length?c.forEach(function(t){t.disabled=!1}):c.forEach(function(t,e){t.disabled=e!=n.seriesIndex}),S.disabled=c.map(function(t){return!!t.disabled}),D.stateChange(S),t.update()}),u.dispatch.on("stateChange",function(n){for(var e in n)S[e]=n[e];D.stateChange(S),t.update()}),l.dispatch.on("legendClick",function(n,e){n.disabled&&(J=J.map(function(t){return t.disabled=!0,t}),n.disabled=!1,i.style(n.style),S.style=i.style(),D.stateChange(S),t.update())}),s.dispatch.on("elementMousemove",function(n){i.clearHighlights();var e,o,a,u=[],l=0,f=!0,d=!1;if(c.filter(function(t,n){return t.seriesIndex=n,!t.disabled}).forEach(function(s,h){o=r.interactiveBisect(s.values,n.pointXValue,t.x());var p=s.values[o],g=t.y()(p,o);if(null!=g&&g>0&&(i.highlightPoint(h,o,!0),d=!0),h!==c.length-1||d||i.highlightPoint(h,o,!0),void 0!==p){void 0===e&&(e=p),void 0===a&&(a=t.xScale()(t.x()(p,o)));var m="expand"==i.style()?p.display.y:t.y()(p,o);u.push({key:s.key,value:m,color:v(s,s.seriesIndex),point:p}),_&&"expand"!=i.style()&&null!=m&&(l+=m,f=!1)}}),u.reverse(),u.length>2){var h=t.yScale().invert(n.mouseY),p=null;u.forEach(function(t,n){h=Math.abs(h);var e=Math.abs(t.point.display.y0),r=Math.abs(t.point.display.y);return h>=e&&r+e>=h?void(p=n):void 0}),null!=p&&(u[p].highlight=!0)}_&&"expand"!=i.style()&&u.length>=2&&!f&&u.push({key:C,value:l,total:!0});var g=t.x()(e,o),m=s.tooltip.valueFormatter();"expand"===i.style()||"stack_percent"===i.style()?(O||(O=m),m=d3.format(".1%")):O&&(m=O,O=null),s.tooltip.valueFormatter(m).data({value:g,series:u})(),s.renderGuideLine(a)}),s.dispatch.on("elementMouseout",function(t){i.clearHighlights()}),f.dispatch.on("onBrush",function(t){H(t)}),D.on("changeState",function(n){void 0!==n.disabled&&c.length===n.disabled.length&&(c.forEach(function(t,e){t.disabled=n.disabled[e]}),S.disabled=n.disabled),void 0!==n.style&&(i.style(n.style),n.style),t.update()})}),P.renderEnd("stacked Area chart immediate"),t}var n,e,i=r.models.stackedArea(),o=r.models.axis(),a=r.models.axis(),u=r.models.legend(),l=r.models.legend(),s=r.interactiveGuideline(),c=r.models.tooltip(),f=r.models.focus(r.models.stackedArea()),d={top:10,right:25,bottom:50,left:60},h=null,p=null,g=null,v=r.utils.defaultColor(),m=!0,y=!0,x="top",b=!0,k=!0,M=!1,w=!1,A=!1,_=!0,C="TOTAL",S=r.utils.state(),E=null,N=null,D=d3.dispatch("stateChange","changeState","renderEnd"),F=250,W=["Stacked","Stream","Expanded"],L={},T=250;S.style=i.style(),o.orient("bottom").tickPadding(7),a.orient(M?"right":"left"),c.headerFormatter(function(t,n){return o.tickFormat()(t,n)}).valueFormatter(function(t,n){return a.tickFormat()(t,n)}),s.tooltip.headerFormatter(function(t,n){return o.tickFormat()(t,n)}).valueFormatter(function(t,n){return null==t?"N/A":a.tickFormat()(t,n)});var z=null,O=null;l.updateState(!1);var P=r.utils.renderWatch(D),B=(i.style(),function(t){return function(){return{active:t.map(function(t){return!t.disabled}),style:i.style()}}}),I=function(t){return function(n){void 0!==n.style&&n.style,void 0!==n.active&&t.forEach(function(t,e){t.disabled=!n.active[e]})}},R=d3.format("%");return i.dispatch.on("elementMouseover.tooltip",function(t){t.point.x=i.x()(t.point),t.point.y=i.y()(t.point),c.data(t).hidden(!1)}),i.dispatch.on("elementMouseout.tooltip",function(t){c.hidden(!0)}),t.dispatch=D,t.stacked=i,t.legend=u,t.controls=l,t.xAxis=o,t.x2Axis=f.xAxis,t.yAxis=a,t.y2Axis=f.yAxis,t.interactiveLayer=s,t.tooltip=c,t.focus=f,t.dispatch=D,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{width:{get:function(){return p},set:function(t){p=t}},height:{get:function(){return g},set:function(t){g=t}},showLegend:{get:function(){return y},set:function(t){y=t}},legendPosition:{get:function(){return x},set:function(t){x=t}},showXAxis:{get:function(){return b},set:function(t){b=t}},showYAxis:{get:function(){return k},set:function(t){k=t}},defaultState:{get:function(){return E},set:function(t){E=t}},noData:{get:function(){return N},set:function(t){N=t}},showControls:{get:function(){return m},set:function(t){m=t}},controlLabels:{get:function(){return L},set:function(t){L=t}}
1,controlOptions:{get:function(){return W},set:function(t){W=t}},showTotalInTooltip:{get:function(){return _},set:function(t){_=t}},totalLabel:{get:function(){return C},set:function(t){C=t}},focusEnable:{get:function(){return w},set:function(t){w=t}},focusHeight:{get:function(){return f.height()},set:function(t){f.height(t)}},brushExtent:{get:function(){return f.brushExtent()},set:function(t){f.brushExtent(t)}},margin:{get:function(){return d},set:function(t){void 0!==t.top&&(d.top=t.top,h=t.top),d.right=void 0!==t.right?t.right:d.right,d.bottom=void 0!==t.bottom?t.bottom:d.bottom,d.left=void 0!==t.left?t.left:d.left}},focusMargin:{get:function(){return f.margin},set:function(t){f.margin.top=void 0!==t.top?t.top:f.margin.top,f.margin.right=void 0!==t.right?t.right:f.margin.right,f.margin.bottom=void 0!==t.bottom?t.bottom:f.margin.bottom,f.margin.left=void 0!==t.left?t.left:f.margin.left}},duration:{get:function(){return T},set:function(t){T=t,P.reset(T),i.duration(T),o.duration(T),a.duration(T)}},color:{get:function(){return v},set:function(t){v=r.utils.getColor(t),u.color(v),i.color(v),f.color(v)}},x:{get:function(){return i.x()},set:function(t){i.x(t),f.x(t)}},y:{get:function(){return i.y()},set:function(t){i.y(t),f.y(t)}},rightAlignYAxis:{get:function(){return M},set:function(t){M=t,a.orient(M?"right":"left")}},useInteractiveGuideline:{get:function(){return A},set:function(n){A=!!n,t.interactive(!n),t.useVoronoi(!n),i.scatter.interactive(!n)}}}),r.utils.inheritOptions(t,i),r.utils.initOptions(t),t},r.models.stackedAreaWithFocusChart=function(){return r.models.stackedAreaChart().margin({bottom:30}).focusEnable(!0)},r.models.sunburst=function(){"use strict";function t(t){return n(t)>90?180:0}function n(t){return(Math.max(0,Math.min(2*Math.PI,D(t.x)))+Math.max(0,Math.min(2*Math.PI,D(t.x+t.dx))))/2*(180/Math.PI)-90}function e(t){var n=Math.max(0,Math.min(2*Math.PI,D(t.x)));return(Math.max(0,Math.min(2*Math.PI,D(t.x+t.dx)))-n)/(2*Math.PI)}function i(t){var n=Math.max(0,Math.min(2*Math.PI,D(t.x)));return Math.max(0,Math.min(2*Math.PI,D(t.x+t.dx)))-n>A}function o(t,n){var e=d3.interpolate(D.domain(),[c.x,c.x+c.dx]),r=d3.interpolate(F.domain(),[c.y,1]),i=d3.interpolate(F.range(),[c.y?20:0,h]);return 0===n?function(){return T(t)}:function(n){return D.domain(e(n)),F.domain(r(n)).range(i(n)),T(t)}}function a(t){var n=d3.interpolate({x:t.x0,dx:t.dx0,y:t.y0,dy:t.dy0},t);return function(e){var r=n(e);return t.x0=r.x,t.dx0=r.dx,t.y0=r.y,t.dy0=r.dy,T(r)}}function u(t){t.forEach(function(t){var n=C(t),e=L[n];e?(t.dx0=e.dx,t.x0=e.x,t.dy0=e.dy,t.y0=e.y):(t.dx0=t.dx,t.x0=t.x,t.dy0=t.dy,t.y0=t.y),function(t){var n=C(t);L[n]||(L[n]={});var e=L[n];e.dx=t.dx,e.x=t.x,e.dy=t.dy,e.y=t.y}(t)})}function l(e){var r=b.selectAll("text"),a=b.selectAll("path");r.transition().attr("opacity",0),c=e,a.transition().duration(E).attrTween("d",o).each("end",function(r){r.x>=e.x&&r.x<e.x+e.dx&&r.depth>=e.depth&&d3.select(this.parentNode).select("text").transition().duration(E).text(function(t){return w(t)}).attr("opacity",function(t){return i(t)?1:0}).attr("transform",function(){var i=this.getBBox().width;if(0===r.depth)return"translate("+i/2*-1+",0)";if(r.depth===e.depth)return"translate("+(F(r.y)+5)+",0)";var o=n(r),a=t(r);return 0===a?"rotate("+o+")translate("+(F(r.y)+5)+",0)":"rotate("+o+")translate("+(F(r.y)+i+5)+",0)rotate("+a+")"})})}function s(o){return z.reset(),o.each(function(o){b=d3.select(this),f=r.utils.availableWidth(g,b,p),d=r.utils.availableHeight(v,b,p),h=Math.min(f,d)/2,F.range([0,h]);var s=b.select("g.nvd3.nv-wrap.nv-sunburst");s[0][0]?s.attr("transform","translate("+(f/2+p.left+p.right)+","+(d/2+p.top+p.bottom)+")"):s=b.append("g").attr("class","nvd3 nv-wrap nv-sunburst nv-chart-"+x).attr("transform","translate("+(f/2+p.left+p.right)+","+(d/2+p.top+p.bottom)+")"),b.on("click",function(t,n){N.chartClick({data:t,index:n,pos:d3.event,id:x})}),W.value(y[m]||y.count);var c=W.nodes(o[0]).reverse();u(c);var A=s.selectAll(".arc-container").data(c,C);A.enter().append("g").attr("class","arc-container").append("path").attr("d",T).style("fill",function(t){return t.color?t.color:k(S?(t.children?t:t.parent).name:t.name)}).style("stroke","#FFF").on("click",function(t,n){l(t),N.elementClick({data:t,index:n})}).on("mouseover",function(t,n){d3.select(this).classed("hover",!0).style("opacity",.8),N.elementMouseover({data:t,color:d3.select(this).style("fill"),percent:e(t)})}).on("mouseout",function(t,n){d3.select(this).classed("hover",!1).style("opacity",1),N.elementMouseout({data:t})}).on("mousemove",function(t,n){N.elementMousemove({data:t})}),A.each(function(t){d3.select(this).select("path").transition().duration(E).attrTween("d",a)}),M&&(A.selectAll("text").remove(),A.append("text").text(function(t){return w(t)}).transition().duration(E).attr("opacity",function(t){return i(t)?1:0}).attr("transform",function(e){var r=this.getBBox().width;if(0===e.depth)return"rotate(0)translate("+r/2*-1+",0)";var i=n(e),o=t(e);return 0===o?"rotate("+i+")translate("+(F(e.y)+5)+",0)":"rotate("+i+")translate("+(F(e.y)+r+5)+",0)rotate("+o+")"})),l(c[c.length-1]),A.exit().transition().duration(E).attr("opacity",0).each("end",function(t){var n=C(t);L[n]=void 0}).remove()}),z.renderEnd("sunburst immediate"),s}var c,f,d,h,p={top:0,right:0,bottom:0,left:0},g=600,v=600,m="count",y={count:function(t){return 1},value:function(t){return t.value||t.size},size:function(t){return t.value||t.size}},x=Math.floor(1e4*Math.random()),b=null,k=r.utils.defaultColor(),M=!1,w=function(t){return"count"===m?t.n
1ame+" #"+t.value:t.name+" "+(t.value||t.size)},A=.02,_=function(t,n){return t.name>n.name},C=function(t,n){return void 0!==t.parent?t.name+"-"+t.parent.name+"-"+n:t.name},S=!0,E=500,N=d3.dispatch("chartClick","elementClick","elementDblClick","elementMousemove","elementMouseover","elementMouseout","renderEnd"),D=d3.scale.linear().range([0,2*Math.PI]),F=d3.scale.sqrt(),W=d3.layout.partition().sort(_),L={},T=d3.svg.arc().startAngle(function(t){return Math.max(0,Math.min(2*Math.PI,D(t.x)))}).endAngle(function(t){return Math.max(0,Math.min(2*Math.PI,D(t.x+t.dx)))}).innerRadius(function(t){return Math.max(0,F(t.y))}).outerRadius(function(t){return Math.max(0,F(t.y+t.dy))}),z=r.utils.renderWatch(N);return s.dispatch=N,s.options=r.utils.optionsFunc.bind(s),s._options=Object.create({},{width:{get:function(){return g},set:function(t){g=t}},height:{get:function(){return v},set:function(t){v=t}},mode:{get:function(){return m},set:function(t){m=t}},id:{get:function(){return x},set:function(t){x=t}},duration:{get:function(){return E},set:function(t){E=t}},groupColorByParent:{get:function(){return S},set:function(t){S=!!t}},showLabels:{get:function(){return M},set:function(t){M=!!t}},labelFormat:{get:function(){return w},set:function(t){w=t}},labelThreshold:{get:function(){return A},set:function(t){A=t}},sort:{get:function(){return _},set:function(t){_=t}},key:{get:function(){return C},set:function(t){C=t}},margin:{get:function(){return p},set:function(t){p.top=null!=t.top?t.top:p.top,p.right=null!=t.right?t.right:p.right,p.bottom=null!=t.bottom?t.bottom:p.bottom,p.left=null!=t.left?t.left:p.left}},color:{get:function(){return k},set:function(t){k=r.utils.getColor(t)}}}),r.utils.initOptions(s),s},r.models.sunburstChart=function(){"use strict";function t(e){return h.reset(),h.models(n),e.each(function(e){var u=d3.select(this);r.utils.initSVG(u);var l=r.utils.availableWidth(o,u,i),s=r.utils.availableHeight(a,u,i);return t.update=function(){0===f?u.call(t):u.transition().duration(f).call(t)},t.container=u,e&&e.length?(u.selectAll(".nv-noData").remove(),n.width(l).height(s).margin(i),void u.call(n)):(r.utils.noData(t,u),t)}),h.renderEnd("sunburstChart immediate"),t}var n=r.models.sunburst(),e=r.models.tooltip(),i={top:30,right:20,bottom:20,left:20},o=null,a=null,u=r.utils.defaultColor(),l=!1,s=(Math.round(1e5*Math.random()),null),c=null,f=250,d=d3.dispatch("stateChange","changeState","renderEnd"),h=r.utils.renderWatch(d);return e.duration(0).headerEnabled(!1).valueFormatter(function(t){return t}),n.dispatch.on("elementMouseover.tooltip",function(t){t.series={key:t.data.name,value:t.data.value||t.data.size,color:t.color,percent:t.percent},l||(delete t.percent,delete t.series.percent),e.data(t).hidden(!1)}),n.dispatch.on("elementMouseout.tooltip",function(t){e.hidden(!0)}),n.dispatch.on("elementMousemove.tooltip",function(t){e()}),t.dispatch=d,t.sunburst=n,t.tooltip=e,t.options=r.utils.optionsFunc.bind(t),t._options=Object.create({},{noData:{get:function(){return c},set:function(t){c=t}},defaultState:{get:function(){return s},set:function(t){s=t}},showTooltipPercent:{get:function(){return l},set:function(t){l=t}},color:{get:function(){return u},set:function(t){u=t,n.color(u)}},duration:{get:function(){return f},set:function(t){f=t,h.reset(f),n.duration(f)}},margin:{get:function(){return i},set:function(t){i.top=void 0!==t.top?t.top:i.top,i.right=void 0!==t.right?t.right:i.right,i.bottom=void 0!==t.bottom?t.bottom:i.bottom,i.left=void 0!==t.left?t.left:i.left,n.margin(i)}}}),r.utils.inheritOptions(t,n),r.utils.initOptions(t),t},r.version="1.8.6"},55442(t,n,e){var r,i;!function(){var o={version:"3.5.17"},a=[].slice,u=function(t){return a.call(t)},l=this.document;function s(t){return t&&(t.ownerDocument||t.document||t).documentElement}function c(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(l)try{u(l.documentElement.childNodes)[0].nodeType}catch(t){u=function(t){for(var n=t.length,e=new Array(n);n--;)e[n]=t[n];return e}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var f=this.Element.prototype,d=f.setAttribute,h=f.setAttributeNS,p=this.CSSStyleDeclaration.prototype,g=p.setProperty;f.setAttribute=function(t,n){d.call(this,t,n+"")},f.setAttributeNS=function(t,n,e){h.call(this,t,n,e+"")},p.setProperty=function(t,n,e){g.call(this,t,n+"",e)}}function v(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function m(t){return null===t?NaN:+t}function y(t){return!isNaN(t)}function x(t){return{left:function(n,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)>0?i=o:r=o+1}return r}}}o.ascending=v,o.descending=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},o.min=function(t,n){var e,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){e=r;break}for(;++i<o;)null!=(r=t[i])&&e>r&&(e=r)}else{for(;++i<o;)if(null!=(r=n.call(t,t[i],i))&&r>=r){e=r;break}for(;++i<o;)null!=(r=n.call(t,t[i],i))&&e>r&&(e=r)}return e},o.max=function(t,n){var e,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){e=r;break}for(;++i<o;)null!=(r=t[i])&&r>e&&(e=r)}else{for(;++i<o;)if(null!=(r=n.call(t,t[i],i))&&r>=r){e=r;break}for(;++i<o;)null!=(r=n.call(t,t[i],i))&&r>e&&(e=r)}return e},o.extent=function(t,n){var e,r,i,o=-1,a=t.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=t[o])&&r>=r){e=i=r;break}for(;++o<a;)null!=(r=t[o])&&(e>r&&(e=r),i<r&&(i=r))}else{for(;++o<a;)if(null!=(r=n.call(t,t[o],o))&&r>=r){e=i=r;break}for(;++o<a;)null!=(r=n.call(t,t[o],o))&&(e>r&&(e=r),i<r&&(i=r))}return[e,i]},o.sum=function(t,n){var e,r=0,i=t.length,o=-1;if(1===arguments.length)for(;++o<i;
1)y(e=+t[o])&&(r+=e);else for(;++o<i;)y(e=+n.call(t,t[o],o))&&(r+=e);return r},o.mean=function(t,n){var e,r=0,i=t.length,o=-1,a=i;if(1===arguments.length)for(;++o<i;)y(e=m(t[o]))?r+=e:--a;else for(;++o<i;)y(e=m(n.call(t,t[o],o)))?r+=e:--a;if(a)return r/a},o.quantile=function(t,n){var e=(t.length-1)*n+1,r=Math.floor(e),i=+t[r-1],o=e-r;return o?i+o*(t[r]-i):i},o.median=function(t,n){var e,r=[],i=t.length,a=-1;if(1===arguments.length)for(;++a<i;)y(e=m(t[a]))&&r.push(e);else for(;++a<i;)y(e=m(n.call(t,t[a],a)))&&r.push(e);if(r.length)return o.quantile(r.sort(v),.5)},o.variance=function(t,n){var e,r,i=t.length,o=0,a=0,u=-1,l=0;if(1===arguments.length)for(;++u<i;)y(e=m(t[u]))&&(a+=(r=e-o)*(e-(o+=r/++l)));else for(;++u<i;)y(e=m(n.call(t,t[u],u)))&&(a+=(r=e-o)*(e-(o+=r/++l)));if(l>1)return a/(l-1)},o.deviation=function(){var t=o.variance.apply(this,arguments);return t?Math.sqrt(t):t};var b=x(v);function k(t){return t.length}o.bisectLeft=b.left,o.bisect=o.bisectRight=b.right,o.bisector=function(t){return x(1===t.length?function(n,e){return v(t(n),e)}:t)},o.shuffle=function(t,n,e){(o=arguments.length)<3&&(e=t.length,o<2&&(n=0));for(var r,i,o=e-n;o;)i=Math.random()*o--|0,r=t[o+n],t[o+n]=t[i+n],t[i+n]=r;return t},o.permute=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},o.pairs=function(t){for(var n=0,e=t.length-1,r=t[0],i=new Array(e<0?0:e);n<e;)i[n]=[r,r=t[++n]];return i},o.transpose=function(t){if(!(i=t.length))return[];for(var n=-1,e=o.min(t,k),r=new Array(e);++n<e;)for(var i,a=-1,u=r[n]=new Array(i);++a<i;)u[a]=t[a][n];return r},o.zip=function(){return o.transpose(arguments)},o.keys=function(t){var n=[];for(var e in t)n.push(e);return n},o.values=function(t){var n=[];for(var e in t)n.push(t[e]);return n},o.entries=function(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n},o.merge=function(t){for(var n,e,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(e=new Array(a);--i>=0;)for(n=(r=t[i]).length;--n>=0;)e[--a]=r[n];return e};var M=Math.abs;function w(t,n){for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}function A(){this._=Object.create(null)}o.range=function(t,n,e){if(arguments.length<3&&(e=1,arguments.length<2&&(n=t,t=0)),(n-t)/e===1/0)throw new Error("infinite range");var r,i=[],o=function(t){var n=1;for(;t*n%1;)n*=10;return n}(M(e)),a=-1;if(t*=o,n*=o,(e*=o)<0)for(;(r=t+e*++a)>n;)i.push(r/o);else for(;(r=t+e*++a)<n;)i.push(r/o);return i},o.map=function(t,n){var e=new A;if(t instanceof A)t.forEach(function(t,n){e.set(t,n)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(1===arguments.length)for(;++i<o;)e.set(i,t[i]);else for(;++i<o;)e.set(n.call(t,r=t[i],i),r)}else for(var a in t)e.set(a,t[a]);return e};function _(t){return"__proto__"==(t+="")||"\0"===t[0]?"\0"+t:t}function C(t){return"\0"===(t+="")[0]?t.slice(1):t}function S(t){return _(t)in this._}function E(t){return(t=_(t))in this._&&delete this._[t]}function N(){var t=[];for(var n in this._)t.push(C(n));return t}function D(){var t=0;for(var n in this._)++t;return t}function F(){for(var t in this._)return!1;return!0}function W(){this._=Object.create(null)}function L(t){return t}function T(t,n,e){return function(){var r=e.apply(n,arguments);return r===n?t:r}}function z(t,n){if(n in t)return n;n=n.charAt(0).toUpperCase()+n.slice(1);for(var e=0,r=O.length;e<r;++e){var i=O[e]+n;if(i in t)return i}}w(A,{has:S,get:function(t){return this._[_(t)]},set:function(t,n){return this._[_(t)]=n},remove:E,keys:N,values:function(){var t=[];for(var n in this._)t.push(this._[n]);return t},entries:function(){var t=[];for(var n in this._)t.push({key:C(n),value:this._[n]});return t},size:D,empty:F,forEach:function(t){for(var n in this._)t.call(this,C(n),this._[n])}}),o.nest=function(){var t,n,e={},r=[],i=[];function a(i,o,u){if(u>=r.length)return n?n.call(e,o):t?o.sort(t):o;for(var l,s,c,f,d=-1,h=o.length,p=r[u++],g=new A;++d<h;)(f=g.get(l=p(s=o[d])))?f.push(s):g.set(l,[s]);return i?(s=i(),c=function(t,n){s.set(t,a(i,n,u))}):(s={},c=function(t,n){s[t]=a(i,n,u)}),g.forEach(c),s}function u(t,n){if(n>=r.length)return t;var e=[],o=i[n++];return t.forEach(function(t,r){e.push({key:t,values:u(r,n)})}),o?e.sort(function(t,n){return o(t.key,n.key)}):e}return e.map=function(t,n){return a(n,t,0)},e.entries=function(t){return u(a(o.map,t,0),0)},e.key=function(t){return r.push(t),e},e.sortKeys=function(t){return i[r.length-1]=t,e},e.sortValues=function(n){return t=n,e},e.rollup=function(t){return n=t,e},e},o.set=function(t){var n=new W;if(t)for(var e=0,r=t.length;e<r;++e)n.add(t[e]);return n},w(W,{has:S,add:function(t){return this._[_(t+="")]=!0,t}
1,remove:E,values:N,size:D,empty:F,forEach:function(t){for(var n in this._)t.call(this,C(n))}}),o.behavior={},o.rebind=function(t,n){for(var e,r=1,i=arguments.length;++r<i;)t[e=arguments[r]]=T(t,n,n[e]);return t};var O=["webkit","ms","moz","Moz","o","O"];function P(){}function B(){}function I(t){var n=[],e=new A;function r(){for(var e,r=n,i=-1,o=r.length;++i<o;)(e=r[i].on)&&e.apply(this,arguments);return t}return r.on=function(r,i){var o,a=e.get(r);return arguments.length<2?a&&a.on:(a&&(a.on=null,n=n.slice(0,o=n.indexOf(a)).concat(n.slice(o+1)),e.remove(r)),i&&n.push(e.set(r,{on:i})),t)},r}function R(){o.event.preventDefault()}function H(){for(var t,n=o.event;t=n.sourceEvent;)n=t;return n}function V(t){for(var n=new B,e=0,r=arguments.length;++e<r;)n[arguments[e]]=I(n);return n.of=function(e,r){return function(i){try{var a=i.sourceEvent=o.event;i.target=t,o.event=i,n[i.type].apply(e,r)}finally{o.event=a}}},n}o.dispatch=function(){for(var t=new B,n=-1,e=arguments.length;++n<e;)t[arguments[n]]=I(t);return t},B.prototype.on=function(t,n){var e=t.indexOf("."),r="";if(e>=0&&(r=t.slice(e+1),t=t.slice(0,e)),t)return arguments.length<2?this[t].on(r):this[t].on(r,n);if(2===arguments.length){if(null==n)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},o.event=null,o.requote=function(t){return t.replace(j,"\\$&")};var j=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,q={}.__proto__?function(t,n){t.__proto__=n}:function(t,n){for(var e in n)t[e]=n[e]};function Y(t){return q(t,Z),t}var X=function(t,n){return n.querySelector(t)},G=function(t,n){return n.querySelectorAll(t)},U=function(t,n){var e=t.matches||t[z(t,"matchesSelector")];return U=function(t,n){return e.call(t,n)},U(t,n)};"function"==typeof Sizzle&&(X=function(t,n){return Sizzle(t,n)[0]||null},G=Sizzle,U=Sizzle.matchesSelector),o.selection=function(){return o.select(l.documentElement)};var Z=o.selection.prototype=[];function $(t){return"function"==typeof t?t:function(){return X(t,this)}}function K(t){return"function"==typeof t?t:function(){return G(t,this)}}Z.select=function(t){var n,e,r,i,o=[];t=$(t);for(var a=-1,u=this.length;++a<u;){o.push(n=[]),n.parentNode=(r=this[a]).parentNode;for(var l=-1,s=r.length;++l<s;)(i=r[l])?(n.push(e=t.call(i,i.__data__,l,a)),e&&"__data__"in i&&(e.__data__=i.__data__)):n.push(null)}return Y(o)},Z.selectAll=function(t){var n,e,r=[];t=K(t);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],l=-1,s=a.length;++l<s;)(e=a[l])&&(r.push(n=u(t.call(e,e.__data__,l,i))),n.parentNode=e);return Y(r)};var Q="http://www.w3.org/1999/xhtml",J={svg:"http://www.w3.org/2000/svg",xhtml:Q,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function tt(t,n){return t=o.ns.qualify(t),null==n?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof n?t.local?function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}:function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}:t.local?function(){this.setAttributeNS(t.space,t.local,n)}:function(){this.setAttribute(t,n)}}function nt(t){return t.trim().replace(/\s+/g," ")}function et(t){return new RegExp("(?:^|\\s+)"+o.requote(t)+"(?:\\s+|$)","g")}function rt(t){return(t+"").trim().split(/^|\s+/)}function it(t,n){var e=(t=rt(t).map(ot)).length;return"function"==typeof n?function(){for(var r=-1,i=n.apply(this,arguments);++r<e;)t[r](this,i)}:function(){for(var r=-1;++r<e;)t[r](this,n)}}function ot(t){var n=et(t);return function(e,r){if(i=e.classList)return r?i.add(t):i.remove(t);var i=e.getAttribute("class")||"";r?(n.lastIndex=0,n.test(i)||e.setAttribute("class",nt(i+" "+t))):e.setAttribute("class",nt(i.replace(n," ")))}}function at(t,n,e){return null==n?function(){this.style.removeProperty(t)}:"function"==typeof n?function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}:function(){this.style.setProperty(t,n,e)}}function ut(t,n){return null==n?function(){delete this[t]}:"function"==typeof n?function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}:function(){this[t]=n}}function lt(t){return"function"==typeof t?t:(t=o.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Q&&n.documentElement.namespaceURI===Q?n.createElement(t):n.createElementNS(e,t)}}function st(){var t=this.parentNode;t&&t.removeChild(this)}function ct(t){return{__data__:t}}function ft(t){return function(){return U(this,t)}}function dt(t){return arguments.length||(t=v),function(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}}function ht(t,n){for(var e=0,r=t.length;e<r;e++)for(var i,o=t[e],a=0,u=o.length;a<u;a++)(i=o[a])&&n(i,a,e);return t}function pt(t){return q(t,gt),t}o.ns={prefix:J,qualify:function(t){var n=t.indexOf(":"),e=t;return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),J.hasOwnProperty(e)?{space:J[e],local:t}:t}},Z.attr=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node();return(t=o.ns.qualify(t)).local?e.getAttributeNS(t.space,t.local):e.getAttribute(t)}for(n in t)this.each(tt(n,t[n]));return this}return this.each(tt(t,n))},Z.classed=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node(),r=(t=rt(t)).length,i=-1;
1if(n=e.classList){for(;++i<r;)if(!n.contains(t[i]))return!1}else for(n=e.getAttribute("class");++i<r;)if(!et(t[i]).test(n))return!1;return!0}for(n in t)this.each(it(n,t[n]));return this}return this.each(it(t,n))},Z.style=function(t,n,e){var r=arguments.length;if(r<3){if("string"!=typeof t){for(e in r<2&&(n=""),t)this.each(at(e,t[e],n));return this}if(r<2){var i=this.node();return c(i).getComputedStyle(i,null).getPropertyValue(t)}e=""}return this.each(at(t,n,e))},Z.property=function(t,n){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(n in t)this.each(ut(n,t[n]));return this}return this.each(ut(t,n))},Z.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},Z.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},Z.append=function(t){return t=lt(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},Z.insert=function(t,n){return t=lt(t),n=$(n),this.select(function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)})},Z.remove=function(){return this.each(st)},Z.data=function(t,n){var e,r,i=-1,o=this.length;if(!arguments.length){for(t=new Array(o=(e=this[0]).length);++i<o;)(r=e[i])&&(t[i]=r.__data__);return t}function a(t,e){var r,i,o,a=t.length,c=e.length,f=Math.min(a,c),d=new Array(c),h=new Array(c),p=new Array(a);if(n){var g,v=new A,m=new Array(a);for(r=-1;++r<a;)(i=t[r])&&(v.has(g=n.call(i,i.__data__,r))?p[r]=i:v.set(g,i),m[r]=g);for(r=-1;++r<c;)(i=v.get(g=n.call(e,o=e[r],r)))?!0!==i&&(d[r]=i,i.__data__=o):h[r]=ct(o),v.set(g,!0);for(r=-1;++r<a;)r in m&&!0!==v.get(m[r])&&(p[r]=t[r])}else{for(r=-1;++r<f;)i=t[r],o=e[r],i?(i.__data__=o,d[r]=i):h[r]=ct(o);for(;r<c;++r)h[r]=ct(e[r]);for(;r<a;++r)p[r]=t[r]}h.update=d,h.parentNode=d.parentNode=p.parentNode=t.parentNode,u.push(h),l.push(d),s.push(p)}var u=pt([]),l=Y([]),s=Y([]);if("function"==typeof t)for(;++i<o;)a(e=this[i],t.call(e,e.parentNode.__data__,i));else for(;++i<o;)a(e=this[i],t);return l.enter=function(){return u},l.exit=function(){return s},l},Z.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},Z.filter=function(t){var n,e,r,i=[];"function"!=typeof t&&(t=ft(t));for(var o=0,a=this.length;o<a;o++){i.push(n=[]),n.parentNode=(e=this[o]).parentNode;for(var u=0,l=e.length;u<l;u++)(r=e[u])&&t.call(r,r.__data__,u,o)&&n.push(r)}return Y(i)},Z.order=function(){for(var t=-1,n=this.length;++t<n;)for(var e,r=this[t],i=r.length-1,o=r[i];--i>=0;)(e=r[i])&&(o&&o!==e.nextSibling&&o.parentNode.insertBefore(e,o),o=e);return this},Z.sort=function(t){t=dt.apply(this,arguments);for(var n=-1,e=this.length;++n<e;)this[n].sort(t);return this.order()},Z.each=function(t){return ht(this,function(n,e,r){t.call(n,n.__data__,e,r)})},Z.call=function(t){var n=u(arguments);return t.apply(n[0]=this,n),this},Z.empty=function(){return!this.node()},Z.node=function(){for(var t=0,n=this.length;t<n;t++)for(var e=this[t],r=0,i=e.length;r<i;r++){var o=e[r];if(o)return o}return null},Z.size=function(){var t=0;return ht(this,function(){++t}),t};var gt=[];function vt(t,n,e){var r="__on"+t,i=t.indexOf("."),a=yt;i>0&&(t=t.slice(0,i));var l=mt.get(t);function s(){var n=this[r];n&&(this.removeEventListener(t,n,n.$),delete this[r])}return l&&(t=l,a=xt),i?n?function(){var i=a(n,u(arguments));s.call(this),this.addEventListener(t,this[r]=i,i.$=e),i._=n}:s:n?P:function(){var n,e=new RegExp("^__on([^.]+)"+o.requote(t)+"$");for(var r in this)if(n=r.match(e)){var i=this[r];this.removeEventListener(n[1],i,i.$),delete this[r]}}}o.selection.enter=pt,o.selection.enter.prototype=gt,gt.append=Z.append,gt.empty=Z.empty,gt.node=Z.node,gt.call=Z.call,gt.size=Z.size,gt.select=function(t){for(var n,e,r,i,o,a=[],u=-1,l=this.length;++u<l;){r=(i=this[u]).update,a.push(n=[]),n.parentNode=i.parentNode;for(var s=-1,c=i.length;++s<c;)(o=i[s])?(n.push(r[s]=e=t.call(i.parentNode,o.__data__,s,u)),e.__data__=o.__data__):n.push(null)}return Y(a)},gt.insert=function(t,n){var e,r,i;return arguments.length<2&&(e=this,n=function(t,n,o){var a,u=e[o].update,l=u.length;for(o!=i&&(i=o,r=0),n>=r&&(r=n+1);!(a=u[r])&&++r<l;);return a}),Z.insert.call(this,t,n)},o.select=function(t){var n;return"string"==typeof t?(n=[X(t,l)]).parentNode=l.documentElement:(n=[t]).parentNode=s(t),Y([n])},o.selectAll=function(t){var n;return"string"==typeof t?(n=u(G(t,l))).parentNode=l.documentElement:(n=u(t)).parentNode=null,Y([n])},Z.on=function(t,n,e){var r=arguments.length;if(r<3){if("string"!=typeof t){for(e in r<2&&(n=!1),t)this.each(vt(e,t[e],n));return this}if(r<2)return(r=this.node()["__on"+t])&&r._;e=!1}return this.each(vt(t,n,e))};
1var mt=o.map({mouseenter:"mouseover",mouseleave:"mouseout"});function yt(t,n){return function(e){var r=o.event;o.event=e,n[0]=this.__data__;try{t.apply(this,n)}finally{o.event=r}}}function xt(t,n){var e=yt(t,n);return function(t){var n=this,r=t.relatedTarget;r&&(r===n||8&r.compareDocumentPosition(n))||e.call(n,t)}}l&&mt.forEach(function(t){"on"+t in l&&mt.remove(t)});var bt,kt=0;function Mt(t){var n=".dragsuppress-"+ ++kt,e="click"+n,r=o.select(c(t)).on("touchmove"+n,R).on("dragstart"+n,R).on("selectstart"+n,R);if(null==bt&&(bt=!("onselectstart"in t)&&z(t.style,"userSelect")),bt){var i=s(t).style,a=i[bt];i[bt]="none"}return function(t){if(r.on(n,null),bt&&(i[bt]=a),t){var o=function(){r.on(e,null)};r.on(e,function(){R(),o()},!0),setTimeout(o,0)}}}o.mouse=function(t){return At(t,H())};var wt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function At(t,n){n.changedTouches&&(n=n.changedTouches[0]);var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();if(wt<0){var i=c(t);if(i.scrollX||i.scrollY){var a=(e=o.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();wt=!(a.f||a.e),e.remove()}}return wt?(r.x=n.pageX,r.y=n.pageY):(r.x=n.clientX,r.y=n.clientY),[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var u=t.getBoundingClientRect();return[n.clientX-u.left-t.clientLeft,n.clientY-u.top-t.clientTop]}function _t(){return o.event.changedTouches[0].identifier}o.touch=function(t,n,e){if(arguments.length<3&&(e=n,n=H().changedTouches),n)for(var r,i=0,o=n.length;i<o;++i)if((r=n[i]).identifier===e)return At(t,r)},o.behavior.drag=function(){var t=V(i,"drag","dragstart","dragend"),n=null,e=a(P,o.mouse,c,"mousemove","mouseup"),r=a(_t,o.touch,L,"touchmove","touchend");function i(){this.on("mousedown.drag",e).on("touchstart.drag",r)}function a(e,r,i,a,u){return function(){var l,s=this,c=o.event.target.correspondingElement||o.event.target,f=s.parentNode,d=t.of(s,arguments),h=0,p=e(),g=".drag"+(null==p?"":"-"+p),v=o.select(i(c)).on(a+g,function(){var t,n,e=r(f,p);if(!e)return;t=e[0]-y[0],n=e[1]-y[1],h|=t|n,y=e,d({type:"drag",x:e[0]+l[0],y:e[1]+l[1],dx:t,dy:n})}).on(u+g,function(){if(!r(f,p))return;v.on(a+g,null).on(u+g,null),m(h),d({type:"dragend"})}),m=Mt(c),y=r(f,p);l=n?[(l=n.apply(s,arguments)).x-y[0],l.y-y[1]]:[0,0],d({type:"dragstart"})}}return i.origin=function(t){return arguments.length?(n=t,i):n},o.rebind(i,t,"on")},o.touches=function(t,n){return arguments.length<2&&(n=H().touches),n?u(n).map(function(n){var e=At(t,n);return e.identifier=n.identifier,e}):[]};var Ct=1e-6,St=Ct*Ct,Et=Math.PI,Nt=2*Et,Dt=Nt-Ct,Ft=Et/2,Wt=Et/180,Lt=180/Et;function Tt(t){return t>0?1:t<0?-1:0}function zt(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function Ot(t){return t>1?0:t<-1?Et:Math.acos(t)}function Pt(t){return t>1?Ft:t<-1?-Ft:Math.asin(t)}function Bt(t){return((t=Math.exp(t))+1/t)/2}function It(t){return(t=Math.sin(t/2))*t}var Rt=Math.SQRT2;o.interpolateZoom=function(t,n){var e,r,i=t[0],o=t[1],a=t[2],u=n[0],l=n[1],s=n[2],c=u-i,f=l-o,d=c*c+f*f;if(d<St)r=Math.log(s/a)/Rt,e=function(t){return[i+t*c,o+t*f,a*Math.exp(Rt*t*r)]};else{var h=Math.sqrt(d),p=(s*s-a*a+4*d)/(2*a*2*h),g=(s*s-a*a-4*d)/(2*s*2*h),v=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(g*g+1)-g);r=(m-v)/Rt,e=function(t){var n,e=t*r,u=Bt(v),l=a/(2*h)*(u*(n=Rt*e+v,((n=Math.exp(2*n))-1)/(n+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[i+l*c,o+l*f,a*u/Bt(Rt*e+v)]}}return e.duration=1e3*r,e},o.behavior.zoom=function(){var t,n,e,r,i,a,u,s,f,d={x:0,y:0,k:1},h=[960,500],p=jt,g=250,v=0,m="mousedown.zoom",y="mousemove.zoom",x="mouseup.zoom",b="touchstart.zoom",k=V(M,"zoomstart","zoom","zoomend");function M(t){t.on(m,F).on(Vt+".zoom",L).on("dblclick.zoom",T).on(b,W)}function w(t){return[(t[0]-d.x)/d.k,(t[1]-d.y)/d.k]}function A(t){d.k=Math.max(p[0],Math.min(p[1],t))}function _(t,n){n=function(t){return[t[0]*d.k+d.x,t[1]*d.k+d.y]}(n),d.x+=t[0]-n[0],d.y+=t[1]-n[1]}function C(t,e,r,i){t.__chart__={x:d.x,y:d.y,k:d.k},A(Math.pow(2,i)),_(n=e,r),t=o.select(t),g>0&&(t=t.transition().duration(g)),t.call(M.event)}function S(){u&&u.domain(a.range().map(function(t){return(t-d.x)/d.k}).map(a.invert)),f&&f.domain(s.range().map(function(t){return(t-d.y)/d.k}).map(s.invert))}function E(t){v++||t({type:"zoomstart"})}function N(t){S(),t({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function D(t){--v||(t({type:"zoomend"}),n=null)}function F(){var t=this,n=k.of(t,arguments),e=0,r=o.select(c(t)).on(y,function(){e=1,_(o.mouse(t),i),N(n)}).on(x,function(){r.on(y,null).on(x,null),a(e),D(n)}),i=w(o.mouse(t)),a=Mt(t);Fu.call(t),E(n)}function W(){var t,n=this,e=k.of(n,arguments),r={},a=0,u=".zoom-"+o.event.changedTouches[0].identifier,l="touchmove"+u,s="touchend"+u,c=[],f=o.select(n),h=Mt(n);function p(){var e=o.touches(n);return t=d.k,e.forEach(function(t){t.identifier in r&&(r[t.identifier]=w(t))}),e}function g(){var t=o.event.target;o.select(t).on(l,v).on(s,y),c.push(t);for(var e=o.event.changedTouches,u=0,f=e.length;u<f;++u)r[e[u].identifier]=null;var h=p(),g=Date.now();if(1===h.length){if(g-i<500){var m=h[0];
1C(n,m,r[m.identifier],Math.floor(Math.log(d.k)/Math.LN2)+1),R()}i=g}else if(h.length>1){m=h[0];var x=h[1],b=m[0]-x[0],k=m[1]-x[1];a=b*b+k*k}}function v(){var u,l,s,c,f=o.touches(n);Fu.call(n);for(var d=0,h=f.length;d<h;++d,c=null)if(s=f[d],c=r[s.identifier]){if(l)break;u=s,l=c}if(c){var p=(p=s[0]-u[0])*p+(p=s[1]-u[1])*p,g=a&&Math.sqrt(p/a);u=[(u[0]+s[0])/2,(u[1]+s[1])/2],l=[(l[0]+c[0])/2,(l[1]+c[1])/2],A(g*t)}i=null,_(u,l),N(e)}function y(){if(o.event.touches.length){for(var t=o.event.changedTouches,n=0,i=t.length;n<i;++n)delete r[t[n].identifier];for(var a in r)return void p()}o.selectAll(c).on(u,null),f.on(m,F).on(b,W),h(),D(e)}g(),E(e),f.on(m,null).on(b,g)}function L(){var i=k.of(this,arguments);r?clearTimeout(r):(Fu.call(this),t=w(n=e||o.mouse(this)),E(i)),r=setTimeout(function(){r=null,D(i)},50),R(),A(Math.pow(2,.002*Ht())*d.k),_(n,t),N(i)}function T(){var t=o.mouse(this),n=Math.log(d.k)/Math.LN2;C(this,t,w(t),o.event.shiftKey?Math.ceil(n)-1:Math.floor(n)+1)}return Vt||(Vt="onwheel"in l?(Ht=function(){return-o.event.deltaY*(o.event.deltaMode?120:1)},"wheel"):"onmousewheel"in l?(Ht=function(){return o.event.wheelDelta},"mousewheel"):(Ht=function(){return-o.event.detail},"MozMousePixelScroll")),M.event=function(t){t.each(function(){var t=k.of(this,arguments),e=d;Tu?o.select(this).transition().each("start.zoom",function(){d=this.__chart__||{x:0,y:0,k:1},E(t)}).tween("zoom:zoom",function(){var r=h[0],i=h[1],a=n?n[0]:r/2,u=n?n[1]:i/2,l=o.interpolateZoom([(a-d.x)/d.k,(u-d.y)/d.k,r/d.k],[(a-e.x)/e.k,(u-e.y)/e.k,r/e.k]);return function(n){var e=l(n),i=r/e[2];this.__chart__=d={x:a-e[0]*i,y:u-e[1]*i,k:i},N(t)}}).each("interrupt.zoom",function(){D(t)}).each("end.zoom",function(){D(t)}):(this.__chart__=d,E(t),N(t),D(t))})},M.translate=function(t){return arguments.length?(d={x:+t[0],y:+t[1],k:d.k},S(),M):[d.x,d.y]},M.scale=function(t){return arguments.length?(d={x:d.x,y:d.y,k:null},A(+t),S(),M):d.k},M.scaleExtent=function(t){return arguments.length?(p=null==t?jt:[+t[0],+t[1]],M):p},M.center=function(t){return arguments.length?(e=t&&[+t[0],+t[1]],M):e},M.size=function(t){return arguments.length?(h=t&&[+t[0],+t[1]],M):h},M.duration=function(t){return arguments.length?(g=+t,M):g},M.x=function(t){return arguments.length?(u=t,a=t.copy(),d={x:0,y:0,k:1},M):u},M.y=function(t){return arguments.length?(f=t,s=t.copy(),d={x:0,y:0,k:1},M):f},o.rebind(M,k,"on")};var Ht,Vt,jt=[0,1/0];function qt(){}function Yt(t,n,e){return this instanceof Yt?(this.h=+t,this.s=+n,void(this.l=+e)):arguments.length<2?t instanceof Yt?new Yt(t.h,t.s,t.l):pn(""+t,gn,Yt):new Yt(t,n,e)}o.color=qt,qt.prototype.toString=function(){return this.rgb()+""},o.hsl=Yt;var Xt=Yt.prototype=new qt;function Gt(t,n,e){var r,i;function o(t){return Math.round(255*function(t){return t>360?t-=360:t<0&&(t+=360),t<60?r+(i-r)*t/60:t<180?i:t<240?r+(i-r)*(240-t)/60:r}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,n=isNaN(n)||n<0?0:n>1?1:n,r=2*(e=e<0?0:e>1?1:e)-(i=e<=.5?e*(1+n):e+n-e*n),new sn(o(t+120),o(t),o(t-120))}function Ut(t,n,e){return this instanceof Ut?(this.h=+t,this.c=+n,void(this.l=+e)):arguments.length<2?t instanceof Ut?new Ut(t.h,t.c,t.l):on(t instanceof Kt?t.l:(t=vn((t=o.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Ut(t,n,e)}Xt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Yt(this.h,this.s,this.l/t)},Xt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Yt(this.h,this.s,t*this.l)},Xt.rgb=function(){return Gt(this.h,this.s,this.l)},o.hcl=Ut;var Zt=Ut.prototype=new qt;function $t(t,n,e){return isNaN(t)&&(t=0),isNaN(n)&&(n=0),new Kt(e,Math.cos(t*=Wt)*n,Math.sin(t)*n)}function Kt(t,n,e){return this instanceof Kt?(this.l=+t,this.a=+n,void(this.b=+e)):arguments.length<2?t instanceof Kt?new Kt(t.l,t.a,t.b):t instanceof Ut?$t(t.h,t.c,t.l):vn((t=sn(t)).r,t.g,t.b):new Kt(t,n,e)}Zt.brighter=function(t){return new Ut(this.h,this.c,Math.min(100,this.l+Qt*(arguments.length?t:1)))},Zt.darker=function(t){return new Ut(this.h,this.c,Math.max(0,this.l-Qt*(arguments.length?t:1)))},Zt.rgb=function(){return $t(this.h,this.c,this.l).rgb()},o.lab=Kt;var Qt=18,Jt=.95047,tn=1,nn=1.08883,en=Kt.prototype=new qt;function rn(t,n,e){var r=(t+16)/116,i=r+n/500,o=r-e/200;return new sn(ln(3.2404542*(i=an(i)*Jt)-1.5371385*(r=an(r)*tn)-.4985314*(o=an(o)*nn)),ln(-.969266*i+1.8760108*r+.041556*o),ln(.0556434*i-.2040259*r+1.0572252*o))}function on(t,n,e){return t>0?new Ut(Math.atan2(e,n)*Lt,Math.sqrt(n*n+e*e),t):new Ut(NaN,NaN,t)}function an(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function un(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}
1function ln(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function sn(t,n,e){return this instanceof sn?(this.r=~~t,this.g=~~n,void(this.b=~~e)):arguments.length<2?t instanceof sn?new sn(t.r,t.g,t.b):pn(""+t,sn,Gt):new sn(t,n,e)}function cn(t){return new sn(t>>16,t>>8&255,255&t)}function fn(t){return cn(t)+""}en.brighter=function(t){return new Kt(Math.min(100,this.l+Qt*(arguments.length?t:1)),this.a,this.b)},en.darker=function(t){return new Kt(Math.max(0,this.l-Qt*(arguments.length?t:1)),this.a,this.b)},en.rgb=function(){return rn(this.l,this.a,this.b)},o.rgb=sn;var dn=sn.prototype=new qt;function hn(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function pn(t,n,e){var r,i,o,a=0,u=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return n(yn(i[0]),yn(i[1]),yn(i[2]))}return(o=xn.get(t))?n(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a|=a>>4,u=240&o,u|=u>>4,l=15&o,l|=l<<4):7===t.length&&(a=(16711680&o)>>16,u=(65280&o)>>8,l=255&o)),n(a,u,l))}function gn(t,n,e){var r,i,o=Math.min(t/=255,n/=255,e/=255),a=Math.max(t,n,e),u=a-o,l=(a+o)/2;return u?(i=l<.5?u/(a+o):u/(2-a-o),r=t==a?(n-e)/u+(n<e?6:0):n==a?(e-t)/u+2:(t-n)/u+4,r*=60):(r=NaN,i=l>0&&l<1?0:r),new Yt(r,i,l)}function vn(t,n,e){var r=un((.4124564*(t=mn(t))+.3575761*(n=mn(n))+.1804375*(e=mn(e)))/Jt),i=un((.2126729*t+.7151522*n+.072175*e)/tn);return Kt(116*i-16,500*(r-i),200*(i-un((.0193339*t+.119192*n+.9503041*e)/nn)))}function mn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yn(t){var n=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*n):n}dn.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var n=this.r,e=this.g,r=this.b,i=30;return n||e||r?(n&&n<i&&(n=i),e&&e<i&&(e=i),r&&r<i&&(r=i),new sn(Math.min(255,n/t),Math.min(255,e/t),Math.min(255,r/t))):new sn(i,i,i)},dn.darker=function(t){return new sn((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},dn.hsl=function(){return gn(this.r,this.g,this.b)},dn.toString=function(){return"#"+hn(this.r)+hn(this.g)+hn(this.b)};var xn=o.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function bn(t){return"function"==typeof t?t:function(){return t}}function kn(t){return function(n,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Mn(n,e,t,r)}}function Mn(t,n,e,r){var i={},a=o.dispatch("beforesend","progress","load","error"),l={},s=new XMLHttpRequest,c=null;function f(){var t,n=s.status;if(!n&&function(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}(s)||n>=200&&n<300||304===n){try{t=e.call(i,s)}catch(t){return void a.error.call(i,t)}a.load.call(i,t)}else a.error.call(i,s)}return this.XDomainRequest&&!("withCredentials"in s)&&/^(http(s)?:)?\/\//.test(t)&&(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=f:s.onreadystatechange=function(){s.readyState>3&&f()},s.onprogress=function(t){var n=o.event;o.event=t;try{a.progress.call(i,s)}finally{o.event=n}},i.header=function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==n?delete l[t]:l[t]=n+"",i)},i.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",i):n},i.responseType=function(t){return arguments.length?(c=t,i):c},i.response=function(t){return e=t,i},["get","post"].forEach(function(t){i[t]=function(){return i.send.apply(i,[t].concat(u(arguments)))}}),i.send=function(e,r,o){if(2===arguments.length&&"function"==typeof r&&(o=r,r=null),s.open(e,t,!0),null==n||"accept"in l||(l.accept=n+",*/*"),s.setRequestHeader)for(var u in l)s.setRequestHeader(u,l[u]);return null!=n&&s.overrideMimeType&&s.overrideMimeType(n),null!=c&&(s.responseType=c),null!=o&&i.on("error",o).on("load",function(t){o(null,t)}),a.beforesend.call(i,s),s.send(null==r?null:r),i},i.abort=function(){return s.abort(),i},o.rebind(i,a,"on"),null==r?i:i.get(function(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}(r))}xn.forEach(function(t,n){xn.set(t,cn(n))}),o.functor=bn,o.xhr=kn(L),o.dsv=function(t,n){var e=new RegExp('["'+t+"\n]"),r=t.charCodeAt(0);function i(t,e,r){arguments.length<3&&(r=e,e=null);var i=Mn(t,n,null==e?o:a(e),r);return i.row=function(t){return arguments.length?i.response(null==(e=t)?o:a(t)):e},i}function o(t){return i.parse(t.responseText)}function a(t){return function(n){return i.parse(n.responseText,t)}}function u(n){return n.map(l).join(t)}function l(t){return e.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,n){var e;return i.parseRows(t,function(t,r){if(e)return e(t,r-1);var i=new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}");e=n?function(t,e){return n(i(t),e)}:i})},i.parseRows=function(t,n){var e,i,o={},a={},u=[],l=t.length,s=0,c=0;function f(){if(s>=l)return a;
1if(i)return i=!1,o;var n=s;if(34===t.charCodeAt(n)){for(var e=n;e++<l;)if(34===t.charCodeAt(e)){if(34!==t.charCodeAt(e+1))break;++e}return s=e+2,13===(u=t.charCodeAt(e+1))?(i=!0,10===t.charCodeAt(e+2)&&++s):10===u&&(i=!0),t.slice(n+1,e).replace(/""/g,'"')}for(;s<l;){var u,c=1;if(10===(u=t.charCodeAt(s++)))i=!0;else if(13===u)i=!0,10===t.charCodeAt(s)&&(++s,++c);else if(u!==r)continue;return t.slice(n,s-c)}return t.slice(n)}for(;(e=f())!==a;){for(var d=[];e!==o&&e!==a;)d.push(e),e=f();n&&null==(d=n(d,c++))||u.push(d)}return u},i.format=function(n){if(Array.isArray(n[0]))return i.formatRows(n);var e=new W,r=[];return n.forEach(function(t){for(var n in t)e.has(n)||r.push(e.add(n))}),[r.map(l).join(t)].concat(n.map(function(n){return r.map(function(t){return l(n[t])}).join(t)})).join("\n")},i.formatRows=function(t){return t.map(u).join("\n")},i},o.csv=o.dsv(",","text/csv"),o.tsv=o.dsv("\t","text/tab-separated-values");var wn,An,_n,Cn,Sn=this[z(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};function En(t,n,e){var r=arguments.length;r<2&&(n=0),r<3&&(e=Date.now());var i={c:t,t:e+n,n:null};return An?An.n=i:wn=i,An=i,_n||(Cn=clearTimeout(Cn),_n=1,Sn(Nn)),i}function Nn(){var t=Dn(),n=Fn()-t;n>24?(isFinite(n)&&(clearTimeout(Cn),Cn=setTimeout(Nn,n)),_n=0):(_n=1,Sn(Nn))}function Dn(){for(var t=Date.now(),n=wn;n;)t>=n.t&&n.c(t-n.t)&&(n.c=null),n=n.n;return t}function Fn(){for(var t,n=wn,e=1/0;n;)n.c?(n.t<e&&(e=n.t),n=(t=n).n):n=t?t.n=n.n:wn=n.n;return An=t,e}function Wn(t,n){return n-(t?Math.ceil(Math.log(t)/Math.LN10):1)}o.timer=function(){En.apply(this,arguments)},o.timer.flush=function(){Dn(),Fn()},o.round=function(t,n){return n?Math.round(t*(n=Math.pow(10,n)))/n:Math.round(t)};var Ln=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(function(t,n){var e=Math.pow(10,3*M(8-n));return{scale:n>8?function(t){return t/e}:function(t){return t*e},symbol:t}});function Tn(t){var n=t.decimal,e=t.thousands,r=t.grouping,i=t.currency,a=r&&e?function(t,n){for(var i=t.length,o=[],a=0,u=r[0],l=0;i>0&&u>0&&(l+u+1>n&&(u=Math.max(1,n-l)),o.push(t.substring(i-=u,i+u)),!((l+=u+1)>n));)u=r[a=(a+1)%r.length];return o.reverse().join(e)}:L;return function(t){var e=zn.exec(t),r=e[1]||" ",u=e[2]||">",l=e[3]||"-",s=e[4]||"",c=e[5],f=+e[6],d=e[7],h=e[8],p=e[9],g=1,v="",m="",y=!1,x=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===u)&&(c=r="0",u="="),p){case"n":d=!0,p="g";break;case"%":g=100,m="%",p="f";break;case"p":g=100,m="%",p="r";break;case"b":case"o":case"x":case"X":"#"===s&&(v="0"+p.toLowerCase());case"c":x=!1;case"d":y=!0,h=0;break;case"s":g=-1,p="r"}"$"===s&&(v=i[0],m=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=On.get(p)||Pn;var b=c&&d;return function(t){var e=m;if(y&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===l?"":l;if(g<0){var s=o.formatPrefix(t,h);t=s.scale(t),e=s.symbol+m}else t*=g;var k,M,w=(t=p(t,h)).lastIndexOf(".");if(w<0){var A=x?t.lastIndexOf("e"):-1;A<0?(k=t,M=""):(k=t.substring(0,A),M=t.substring(A))}else k=t.substring(0,w),M=n+t.substring(w+1);!c&&d&&(k=a(k,1/0));var _=v.length+k.length+M.length+(b?0:i.length),C=_<f?new Array(_=f-_+1).join(r):"";return b&&(k=a(C+k,C.length?f-M.length:1/0)),i+=v,t=k+M,("<"===u?i+t+C:">"===u?C+i+t:"^"===u?C.substring(0,_>>=1)+i+t+C.substring(_):i+(b?t:C+t))+e}}}o.formatPrefix=function(t,n){var e=0;return(t=+t)&&(t<0&&(t*=-1),n&&(t=o.round(t,Wn(t,n))),e=1+Math.floor(1e-12+Math.log(t)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),Ln[8+e/3]};var zn=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,On=o.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,n){return t.toPrecision(n)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},r:function(t,n){return(t=o.round(t,Wn(t,n))).toFixed(Math.max(0,Math.min(20,Wn(t*(1+1e-15),n))))}});function Pn(t){return t+""}var Bn=o.time={},In=Date;function Rn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}Rn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0}
1,valueOf:function(){return this._.valueOf()},setDate:function(){Hn.setUTCDate.apply(this._,arguments)},setDay:function(){Hn.setUTCDay.apply(this._,arguments)},setFullYear:function(){Hn.setUTCFullYear.apply(this._,arguments)},setHours:function(){Hn.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Hn.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Hn.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Hn.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Hn.setUTCSeconds.apply(this._,arguments)},setTime:function(){Hn.setTime.apply(this._,arguments)}};var Hn=Date.prototype;function Vn(t,n,e){function r(n){var e=t(n),r=o(e,1);return n-e<r-n?e:r}function i(e){return n(e=t(new In(e-1)),1),e}function o(t,e){return n(t=new In(+t),e),t}function a(t,r,o){var a=i(t),u=[];if(o>1)for(;a<r;)e(a)%o||u.push(new Date(+a)),n(a,1);else for(;a<r;)u.push(new Date(+a)),n(a,1);return u}t.floor=t,t.round=r,t.ceil=i,t.offset=o,t.range=a;var u=t.utc=jn(t);return u.floor=u,u.round=jn(r),u.ceil=jn(i),u.offset=jn(o),u.range=function(t,n,e){try{In=Rn;var r=new Rn;return r._=t,a(r,n,e)}finally{In=Date}},t}function jn(t){return function(n,e){try{In=Rn;var r=new Rn;return r._=n,t(r,e)._}finally{In=Date}}}function qn(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,a=t.days,u=t.shortDays,l=t.months,s=t.shortMonths;function c(t){var n=t.length;function e(e){for(var r,i,o,a=[],u=-1,l=0;++u<n;)37===t.charCodeAt(u)&&(a.push(t.slice(l,u)),null!=(i=Yn[r=t.charAt(++u)])&&(r=t.charAt(++u)),(o=k[r])&&(r=o(e,null==i?"e"===r?" ":"0":i)),a.push(r),l=u+1);return a.push(t.slice(l,u)),a.join("")}return e.parse=function(n){var e={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(f(e,t,n,0)!=n.length)return null;"p"in e&&(e.H=e.H%12+12*e.p);var r=null!=e.Z&&In!==Rn,i=new(r?Rn:In);return"j"in e?i.setFullYear(e.y,0,e.j):"W"in e||"U"in e?("w"in e||(e.w="W"in e?1:0),i.setFullYear(e.y,0,1),i.setFullYear(e.y,0,"W"in e?(e.w+6)%7+7*e.W-(i.getDay()+5)%7:e.w+7*e.U-(i.getDay()+6)%7)):i.setFullYear(e.y,e.m,e.d),i.setHours(e.H+(e.Z/100|0),e.M+e.Z%100,e.S,e.L),r?i._:i},e.toString=function(){return t},e}function f(t,n,e,r){for(var i,o,a,u=0,l=n.length,s=e.length;u<l;){if(r>=s)return-1;if(37===(i=n.charCodeAt(u++))){if(a=n.charAt(u++),!(o=M[a in Yn?n.charAt(u++):a])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}c.utc=function(t){var n=c(t);function e(t){try{var e=new(In=Rn);return e._=t,n(e)}finally{In=Date}}return e.parse=function(t){try{In=Rn;var e=n.parse(t);return e&&e._}finally{In=Date}},e.toString=n.toString,e},c.multi=c.utc.multi=de;var d=o.map(),h=Zn(a),p=$n(a),g=Zn(u),v=$n(u),m=Zn(l),y=$n(l),x=Zn(s),b=$n(s);i.forEach(function(t,n){d.set(t.toLowerCase(),n)});var k={a:function(t){return u[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return s[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:c(n),d:function(t,n){return Un(t.getDate(),n,2)},e:function(t,n){return Un(t.getDate(),n,2)},H:function(t,n){return Un(t.getHours(),n,2)},I:function(t,n){return Un(t.getHours()%12||12,n,2)},j:function(t,n){return Un(1+Bn.dayOfYear(t),n,3)},L:function(t,n){return Un(t.getMilliseconds(),n,3)},m:function(t,n){return Un(t.getMonth()+1,n,2)},M:function(t,n){return Un(t.getMinutes(),n,2)},p:function(t){return i[+(t.getHours()>=12)]},S:function(t,n){return Un(t.getSeconds(),n,2)},U:function(t,n){return Un(Bn.sundayOfYear(t),n,2)},w:function(t){return t.getDay()},W:function(t,n){return Un(Bn.mondayOfYear(t),n,2)},x:c(e),X:c(r),y:function(t,n){return Un(t.getFullYear()%100,n,2)},Y:function(t,n){return Un(t.getFullYear()%1e4,n,4)},Z:ce,"%":function(){return"%"}},M={a:function(t,n,e){g.lastIndex=0;var r=g.exec(n.slice(e));return r?(t.w=v.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(t,n,e){h.lastIndex=0;var r=h.exec(n.slice(e));return r?(t.w=p.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(t,n,e){x.lastIndex=0;var r=x.exec(n.slice(e));return r?(t.m=b.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(t,n,e){m.lastIndex=0;var r=m.exec(n.slice(e));return r?(t.m=y.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(t,n,e){return f(t,k.c.toString(),n,e)},d:ie,e:ie,H:ae,I:ae,j:oe,L:se,m:re,M:ue,p:function(t,n,e){var r=d.get(n.slice(e,e+=2).toLowerCase());return null==r?-1:(t.p=r,e)}
1,S:le,U:Qn,w:Kn,W:Jn,x:function(t,n,e){return f(t,k.x.toString(),n,e)},X:function(t,n,e){return f(t,k.X.toString(),n,e)},y:ne,Y:te,Z:ee,"%":fe};return c}Bn.year=Vn(function(t){return(t=Bn.day(t)).setMonth(0,1),t},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t){return t.getFullYear()}),Bn.years=Bn.year.range,Bn.years.utc=Bn.year.utc.range,Bn.day=Vn(function(t){var n=new In(2e3,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n},function(t,n){t.setDate(t.getDate()+n)},function(t){return t.getDate()-1}),Bn.days=Bn.day.range,Bn.days.utc=Bn.day.utc.range,Bn.dayOfYear=function(t){var n=Bn.year(t);return Math.floor((t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,n){n=7-n;var e=Bn[t]=Vn(function(t){return(t=Bn.day(t)).setDate(t.getDate()-(t.getDay()+n)%7),t},function(t,n){t.setDate(t.getDate()+7*Math.floor(n))},function(t){var e=Bn.year(t).getDay();return Math.floor((Bn.dayOfYear(t)+(e+n)%7)/7)-(e!==n)});Bn[t+"s"]=e.range,Bn[t+"s"].utc=e.utc.range,Bn[t+"OfYear"]=function(t){var e=Bn.year(t).getDay();return Math.floor((Bn.dayOfYear(t)+(e+n)%7)/7)}}),Bn.week=Bn.sunday,Bn.weeks=Bn.sunday.range,Bn.weeks.utc=Bn.sunday.utc.range,Bn.weekOfYear=Bn.sundayOfYear;var Yn={"-":"",_:" ",0:"0"},Xn=/^\s*\d+/,Gn=/^%/;function Un(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<e?new Array(e-o+1).join(n)+i:i)}function Zn(t){return new RegExp("^(?:"+t.map(o.requote).join("|")+")","i")}function $n(t){for(var n=new A,e=-1,r=t.length;++e<r;)n.set(t[e].toLowerCase(),e);return n}function Kn(t,n,e){Xn.lastIndex=0;var r=Xn.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function Qn(t,n,e){Xn.lastIndex=0;var r=Xn.exec(n.slice(e));return r?(t.U=+r[0],e+r[0].length):-1}function Jn(t,n,e){Xn.lastIndex=0;var r=Xn.exec(n.slice(e));return r?(t.W=+r[0],e+r[0].length):-1}function te(t,n,e){Xn.lastIndex=0;var r=Xn.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function ne(t,n,e){Xn.lastIndex=0;var r,i=Xn.exec(n.slice(e,e+2));return i?(t.y=(r=+i[0])+(r>68?1900:2e3),e+i[0].length):-1}function ee(t,n,e){return/^[+-]\d{4}$/.test(n=n.slice(e,e+5))?(t.Z=-n,e+5):-1}function re(t,n,e){Xn.lastIndex=0;var r=Xn.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function ie(t,n,e){Xn.lastIndex=0;var r=Xn.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function oe(t,n,e){Xn.lastIndex=0;var r=Xn.exec(n.slice(e,e+3));return r?(t.j=+r[0],e+r[0].length):-1}function ae(t,n,e){Xn.lastIndex=0;var r=Xn.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function ue(t,n,e){Xn.lastIndex=0;var r=Xn.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function le(t,n,e){Xn.lastIndex=0;var r=Xn.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function se(t,n,e){Xn.lastIndex=0;var r=Xn.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function ce(t){var n=t.getTimezoneOffset(),e=n>0?"-":"+",r=M(n)/60|0,i=M(n)%60;return e+Un(r,"0",2)+Un(i,"0",2)}function fe(t,n,e){Gn.lastIndex=0;var r=Gn.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function de(t){for(var n=t.length,e=-1;++e<n;)t[e][0]=this(t[e][0]);return function(n){for(var e=0,r=t[e];!r[1](n);)r=t[++e];return r[0](n)}}o.locale=function(t){return{numberFormat:Tn(t),timeFormat:qn(t)}};var he=o.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function pe(){}o.format=he.numberFormat,o.geo={},pe.prototype={s:0,t:0,add:function(t){ve(t,this.t,ge),ve(ge.s,this.s,this),this.s?this.t+=ge.t:this.s=ge.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ge=new pe;function ve(t,n,e){var r=e.s=t+n,i=r-t,o=r-i;e.t=t-o+(n-i)}function me(t,n){t&&xe.hasOwnProperty(t.type)&&xe[t.type](t,n)}o.geo.stream=function(t,n){t&&ye.hasOwnProperty(t.type)?ye[t.type](t,n):me(t,n)};var ye={Feature:function(t,n){me(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)me(e[r].geometry,n)}},xe={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)t=e[r],n.point(t[0],t[1],t[2])}
1,LineString:function(t,n){be(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)be(e[r],n,0)},Polygon:function(t,n){ke(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)ke(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)me(e[r],n)}};function be(t,n,e){var r,i=-1,o=t.length-e;for(n.lineStart();++i<o;)r=t[i],n.point(r[0],r[1],r[2]);n.lineEnd()}function ke(t,n){var e=-1,r=t.length;for(n.polygonStart();++e<r;)be(t[e],n,1);n.polygonEnd()}o.geo.area=function(t){return Me=0,o.geo.stream(t,ze),Me};var Me,we,Ae,_e,Ce,Se,Ee,Ne,De,Fe,We,Le,Te=new pe,ze={sphere:function(){Me+=4*Et},point:P,lineStart:P,lineEnd:P,polygonStart:function(){Te.reset(),ze.lineStart=Oe},polygonEnd:function(){var t=2*Te;Me+=t<0?4*Et+t:t,ze.lineStart=ze.lineEnd=ze.point=P}};function Oe(){var t,n,e,r,i;function o(t,n){n=n*Wt/2+Et/4;var o=(t*=Wt)-e,a=o>=0?1:-1,u=a*o,l=Math.cos(n),s=Math.sin(n),c=i*s,f=r*l+c*Math.cos(u),d=c*a*Math.sin(u);Te.add(Math.atan2(d,f)),e=t,r=l,i=s}ze.point=function(a,u){ze.point=o,e=(t=a)*Wt,r=Math.cos(u=(n=u)*Wt/2+Et/4),i=Math.sin(u)},ze.lineEnd=function(){o(t,n)}}function Pe(t){var n=t[0],e=t[1],r=Math.cos(e);return[r*Math.cos(n),r*Math.sin(n),Math.sin(e)]}function Be(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Ie(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Re(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function He(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Ve(t){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function je(t){return[Math.atan2(t[1],t[0]),Pt(t[2])]}function qe(t,n){return M(t[0]-n[0])<Ct&&M(t[1]-n[1])<Ct}o.geo.bounds=function(){var t,n,e,r,i,a,u,l,s,c,f,d={point:h,lineStart:g,lineEnd:v,polygonStart:function(){d.point=m,d.lineStart=y,d.lineEnd=x,s=0,ze.polygonStart()},polygonEnd:function(){ze.polygonEnd(),d.point=h,d.lineStart=g,d.lineEnd=v,Te<0?(t=-(e=180),n=-(r=90)):s>Ct?r=90:s<-Ct&&(n=-90),f[0]=t,f[1]=e}};function h(i,o){c.push(f=[t=i,e=i]),o<n&&(n=o),o>r&&(r=o)}function p(o,a){var u=Pe([o*Wt,a*Wt]);if(l){var s=Ie(l,u),c=Ie([s[1],-s[0],0],s);Ve(c),c=je(c);var f=o-i,d=f>0?1:-1,p=c[0]*Lt*d,g=M(f)>180;if(g^(d*i<p&&p<d*o))(v=c[1]*Lt)>r&&(r=v);else if(g^(d*i<(p=(p+360)%360-180)&&p<d*o)){var v;(v=-c[1]*Lt)<n&&(n=v)}else a<n&&(n=a),a>r&&(r=a);g?o<i?b(t,o)>b(t,e)&&(e=o):b(o,e)>b(t,e)&&(t=o):e>=t?(o<t&&(t=o),o>e&&(e=o)):o>i?b(t,o)>b(t,e)&&(e=o):b(o,e)>b(t,e)&&(t=o)}else h(o,a);l=u,i=o}function g(){d.point=p}function v(){f[0]=t,f[1]=e,d.point=h,l=null}function m(t,n){if(l){var e=t-i;s+=M(e)>180?e+(e>0?360:-360):e}else a=t,u=n;ze.point(t,n),p(t,n)}function y(){ze.lineStart()}function x(){m(a,u),ze.lineEnd(),M(s)>Ct&&(t=-(e=180)),f[0]=t,f[1]=e,l=null}function b(t,n){return(n-=t)<0?n+360:n}function k(t,n){return t[0]-n[0]}function w(t,n){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:t<n[0]||n[1]<t}return function(i){if(r=e=-(t=n=1/0),c=[],o.geo.stream(i,d),s=c.length){c.sort(k);for(var a=1,u=[g=c[0]];a<s;++a)w((h=c[a])[0],g)||w(h[1],g)?(b(g[0],h[1])>b(g[0],g[1])&&(g[1]=h[1]),b(h[0],g[1])>b(g[0],g[1])&&(g[0]=h[0])):u.push(g=h);for(var l,s,h,p=-1/0,g=(a=0,u[s=u.length-1]);a<=s;g=h,++a)h=u[a],(l=b(g[1],h[0]))>p&&(p=l,t=h[0],e=g[1])}return c=f=null,t===1/0||n===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,n],[e,r]]}}(),o.geo.centroid=function(t){we=Ae=_e=Ce=Se=Ee=Ne=De=Fe=We=Le=0,o.geo.stream(t,Ye);var n=Fe,e=We,r=Le,i=n*n+e*e+r*r;return i<St&&(n=Ee,e=Ne,r=De,Ae<Ct&&(n=_e,e=Ce,r=Se),(i=n*n+e*e+r*r)<St)?[NaN,NaN]:[Math.atan2(e,n)*Lt,Pt(r/Math.sqrt(i))*Lt]};var Ye={sphere:P,point:Xe,lineStart:Ue,lineEnd:Ze,polygonStart:function(){Ye.lineStart=$e},polygonEnd:function(){Ye.lineStart=Ue}};function Xe(t,n){t*=Wt;var e=Math.cos(n*=Wt);Ge(e*Math.cos(t),e*Math.sin(t),Math.sin(n))}function Ge(t,n,e){++we,_e+=(t-_e)/we,Ce+=(n-Ce)/we,Se+=(e-Se)/we}function Ue(){var t,n,e;function r(r,i){r*=Wt;var o=Math.cos(i*=Wt),a=o*Math.cos(r),u=o*Math.sin(r),l=Math.sin(i),s=Math.atan2(Math.sqrt((s=n*l-e*u)*s+(s=e*a-t*l)*s+(s=t*u-n*a)*s),t*a+n*u+e*l);Ae+=s,Ee+=s*(t+(t=a)),Ne+=s*(n+(n=u)),De+=s*(e+(e=l)),Ge(t,n,e)}Ye.point=function(i,o){i*=Wt;var a=Math.cos(o*=Wt);
1t=a*Math.cos(i),n=a*Math.sin(i),e=Math.sin(o),Ye.point=r,Ge(t,n,e)}}function Ze(){Ye.point=Xe}function $e(){var t,n,e,r,i;function o(t,n){t*=Wt;var o=Math.cos(n*=Wt),a=o*Math.cos(t),u=o*Math.sin(t),l=Math.sin(n),s=r*l-i*u,c=i*a-e*l,f=e*u-r*a,d=Math.sqrt(s*s+c*c+f*f),h=e*a+r*u+i*l,p=d&&-Ot(h)/d,g=Math.atan2(d,h);Fe+=p*s,We+=p*c,Le+=p*f,Ae+=g,Ee+=g*(e+(e=a)),Ne+=g*(r+(r=u)),De+=g*(i+(i=l)),Ge(e,r,i)}Ye.point=function(a,u){t=a,n=u,Ye.point=o,a*=Wt;var l=Math.cos(u*=Wt);e=l*Math.cos(a),r=l*Math.sin(a),i=Math.sin(u),Ge(e,r,i)},Ye.lineEnd=function(){o(t,n),Ye.lineEnd=Ze,Ye.point=Xe}}function Ke(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return(e=n.invert(e,r))&&t.invert(e[0],e[1])}),e}function Qe(){return!0}function Je(t,n,e,r,i){var o=[],a=[];if(t.forEach(function(t){if(!((n=t.length-1)<=0)){var n,e=t[0],r=t[n];if(qe(e,r)){i.lineStart();for(var u=0;u<n;++u)i.point((e=t[u])[0],e[1]);i.lineEnd()}else{var l=new nr(e,t,null,!0),s=new nr(e,null,l,!1);l.o=s,o.push(l),a.push(s),l=new nr(r,t,null,!1),s=new nr(r,null,l,!0),l.o=s,o.push(l),a.push(s)}}}),a.sort(n),tr(o),tr(a),o.length){for(var u=0,l=e,s=a.length;u<s;++u)a[u].e=l=!l;for(var c,f,d=o[0];;){for(var h=d,p=!0;h.v;)if((h=h.n)===d)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(u=0,s=c.length;u<s;++u)i.point((f=c[u])[0],f[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(u=(c=h.p.z).length-1;u>=0;--u)i.point((f=c[u])[0],f[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function tr(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r<n;)i.n=e=t[r],e.p=i,i=e;i.n=e=t[0],e.p=i}}function nr(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function er(t,n,e,r){return function(i,a){var u,l=n(a),s=i.invert(r[0],r[1]),c={point:f,lineStart:h,lineEnd:p,polygonStart:function(){c.point=b,c.lineStart=k,c.lineEnd=M,u=[],g=[]},polygonEnd:function(){c.point=f,c.lineStart=h,c.lineEnd=p,u=o.merge(u);var t=function(t,n){var e=t[0],r=t[1],i=[Math.sin(e),-Math.cos(e),0],o=0,a=0;Te.reset();for(var u=0,l=n.length;u<l;++u){var s=n[u],c=s.length;if(c)for(var f=s[0],d=f[0],h=f[1]/2+Et/4,p=Math.sin(h),g=Math.cos(h),v=1;;){v===c&&(v=0);var m=(t=s[v])[0],y=t[1]/2+Et/4,x=Math.sin(y),b=Math.cos(y),k=m-d,M=k>=0?1:-1,w=M*k,A=w>Et,_=p*x;
1if(Te.add(Math.atan2(_*M*Math.sin(w),g*b+_*Math.cos(w))),o+=A?k+M*Nt:k,A^d>=e^m>=e){var C=Ie(Pe(f),Pe(t));Ve(C);var S=Ie(i,C);Ve(S);var E=(A^k>=0?-1:1)*Pt(S[2]);(r>E||r===E&&(C[0]||C[1]))&&(a+=A^k>=0?1:-1)}if(!v++)break;d=m,p=x,g=b,f=t}}return(o<-Ct||o<Ct&&Te<-Ct)^1&a}(s,g);u.length?(x||(a.polygonStart(),x=!0),Je(u,or,t,e,a)):t&&(x||(a.polygonStart(),x=!0),a.lineStart(),e(null,null,1,a),a.lineEnd()),x&&(a.polygonEnd(),x=!1),u=g=null},sphere:function(){a.polygonStart(),a.lineStart(),e(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function f(n,e){var r=i(n,e);t(n=r[0],e=r[1])&&a.point(n,e)}function d(t,n){var e=i(t,n);l.point(e[0],e[1])}function h(){c.point=d,l.lineStart()}function p(){c.point=f,l.lineEnd()}var g,v,m=ir(),y=n(m),x=!1;function b(t,n){v.push([t,n]);var e=i(t,n);y.point(e[0],e[1])}function k(){y.lineStart(),v=[]}function M(){b(v[0][0],v[0][1]),y.lineEnd();var t,n=y.clean(),e=m.buffer(),r=e.length;if(v.pop(),g.push(v),v=null,r)if(1&n){var i,o=-1;if((r=(t=e[0]).length-1)>0){for(x||(a.polygonStart(),x=!0),a.lineStart();++o<r;)a.point((i=t[o])[0],i[1]);a.lineEnd()}}else r>1&&2&n&&e.push(e.pop().concat(e.shift())),u.push(e.filter(rr))}return c}}function rr(t){return t.length>1}function ir(){var t,n=[];return{lineStart:function(){n.push(t=[])},point:function(n,e){t.push([n,e])},lineEnd:P,buffer:function(){var e=n;return n=[],t=null,e},rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))}}}function or(t,n){return((t=t.x)[0]<0?t[1]-Ft-Ct:Ft-t[1])-((n=n.x)[0]<0?n[1]-Ft-Ct:Ft-n[1])}var ar=er(Qe,function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var u=o>0?Et:-Et,l=M(o-e);M(l-Et)<Ct?(t.point(e,r=(r+a)/2>0?Ft:-Ft),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),n=0):i!==u&&l>=Et&&(M(e-i)<Ct&&(e-=i*Ct),M(o-u)<Ct&&(o-=u*Ct),r=function(t,n,e,r){var i,o,a=Math.sin(t-e);return M(a)>Ct?Math.atan((Math.sin(n)*(o=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(n))*Math.sin(t))/(i*o*a)):(n+r)/2}(e,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=o,r=a),i=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}},function(t,n,e,r){var i;if(null==t)i=e*Ft,r.point(-Et,i),r.point(0,i),r.point(Et,i),r.point(Et,0),r.point(Et,-i),r.point(0,-i),r.point(-Et,-i),r.point(-Et,0),r.point(-Et,i);else if(M(t[0]-n[0])>Ct){var o=t[0]<n[0]?Et:-Et;i=e*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(n[0],n[1])},[-Et,-Et/2]);function ur(t,n,e,r){return function(i){var o,a=i.a,u=i.b,l=a.x,s=a.y,c=0,f=1,d=u.x-l,h=u.y-s;if(o=t-l,d||!(o>0)){if(o/=d,d<0){if(o<c)return;o<f&&(f=o)}else if(d>0){if(o>f)return;o>c&&(c=o)}if(o=e-l,d||!(o<0)){if(o/=d,d<0){if(o>f)return;o>c&&(c=o)}else if(d>0){if(o<c)return;o<f&&(f=o)}if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<f&&(f=o)}else if(h>0){if(o>f)return;o>c&&(c=o)}if(o=r-s,h||!(o<0)){if(o/=h,h<0){if(o>f)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<f&&(f=o)}return c>0&&(i.a={x:l+c*d,y:s+c*h}),f<1&&(i.b={x:l+f*d,y:s+f*h}),i}}}}}}var lr=1e9;function sr(t,n,e,r){return function(l){var s,c,f,d,h,p,g,v,m,y,x,b=l,k=ir(),M=ur(t,n,e,r),w={point:C,lineStart:function(){w.point=S,c&&c.push(f=[]);y=!0,m=!1,g=v=NaN},lineEnd:function(){s&&(S(d,h),p&&m&&k.rejoin(),s.push(k.buffer()));w.point=C,m&&l.lineEnd()},polygonStart:function(){l=k,s=[],c=[],x=!0},polygonEnd:function(){l=b,s=o.merge(s);var n=function(t){for(var n=0,e=c.length,r=t[1],i=0;i<e;++i)for(var o,a=1,u=c[i],l=u.length,s=u[0];a<l;++a)o=u[a],s[1]<=r?o[1]>r&&zt(s,o,t)>0&&++n:o[1]<=r&&zt(s,o,t)<0&&--n,s=o;return 0!==n}([t,r]),e=x&&n,i=s.length;(e||i)&&(l.polygonStart(),e&&(l.lineStart(),A(null,null,1,l),l.lineEnd()),i&&Je(s,a,n,A,l),l.polygonEnd()),s=c=f=null}};function A(o,a,l,s){var c=0,f=0;if(null==o||(c=i(o,l))!==(f=i(a,l))||u(o,a)<0^l>0)do{s.point(0===c||3===c?t:e,c>1?r:n)}while((c=(c+l+4)%4)!==f);else s.point(a[0],a[1])}function _(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function C(t,n){_(t,n)&&l.point(t,n)}function S(t,n){var e=_(t=Math.max(-1e9,Math.min(lr,t)),n=Math.max(-1e9,Math.min(lr,n)));if(c&&f.push([t,n]),y)d=t,h=n,p=e,y=!1,e&&(l.lineStart(),l.point(t,n));else if(e&&m)l.point(t,n);else{var r={a:{x:g,y:v},b:{x:t,y:n}};
1M(r)?(m||(l.lineStart(),l.point(r.a.x,r.a.y)),l.point(r.b.x,r.b.y),e||l.lineEnd(),x=!1):e&&(l.lineStart(),l.point(t,n),x=!1)}g=t,v=n,m=e}return w};function i(r,i){return M(r[0]-t)<Ct?i>0?0:3:M(r[0]-e)<Ct?i>0?2:1:M(r[1]-n)<Ct?i>0?1:0:i>0?3:2}function a(t,n){return u(t.x,n.x)}function u(t,n){var e=i(t,1),r=i(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}}function cr(t){var n=0,e=Et/3,r=Tr(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*Et/180,e=t[1]*Et/180):[n/Et*180,e/Et*180]},i}function fr(t,n){var e=Math.sin(t),r=(e+Math.sin(n))/2,i=1+e*(2*r-e),o=Math.sqrt(i)/r;function a(t,n){var e=Math.sqrt(i-2*r*Math.sin(n))/r;return[e*Math.sin(t*=r),o-e*Math.cos(t)]}return a.invert=function(t,n){var e=o-n;return[Math.atan2(t,e)/r,Pt((i-(t*t+e*e)*r*r)/(2*r))]},a}o.geo.clipExtent=function(){var t,n,e,r,i,o,a={stream:function(t){return i&&(i.valid=!1),(i=o(t)).valid=!0,i},extent:function(u){return arguments.length?(o=sr(t=+u[0][0],n=+u[0][1],e=+u[1][0],r=+u[1][1]),i&&(i.valid=!1,i=null),a):[[t,n],[e,r]]}};return a.extent([[0,0],[960,500]])},(o.geo.conicEqualArea=function(){return cr(fr)}).raw=fr,o.geo.albers=function(){return o.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},o.geo.albersUsa=function(){var t,n,e,r,i=o.geo.albers(),a=o.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=o.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};function s(i){var o=i[0],a=i[1];return t=null,n(o,a),t||(e(o,a),t)||r(o,a),t}return s.invert=function(t){var n=i.scale(),e=i.translate(),r=(t[0]-e[0])/n,o=(t[1]-e[1])/n;return(o>=.12&&o<.234&&r>=-.425&&r<-.214?a:o>=.166&&o<.234&&r>=-.214&&r<-.115?u:i).invert(t)},s.stream=function(t){var n=i.stream(t),e=a.stream(t),r=u.stream(t);return{point:function(t,i){n.point(t,i),e.point(t,i),r.point(t,i)},sphere:function(){n.sphere(),e.sphere(),r.sphere()},lineStart:function(){n.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){n.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){n.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){n.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},s.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),u.precision(t),s):i.precision()},s.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),u.scale(t),s.translate(i.translate())):i.scale()},s.translate=function(t){if(!arguments.length)return i.translate();var o=i.scale(),c=+t[0],f=+t[1];return n=i.translate(t).clipExtent([[c-.455*o,f-.238*o],[c+.455*o,f+.238*o]]).stream(l).point,e=a.translate([c-.307*o,f+.201*o]).clipExtent([[c-.425*o+Ct,f+.12*o+Ct],[c-.214*o-Ct,f+.234*o-Ct]]).stream(l).point,r=u.translate([c-.205*o,f+.212*o]).clipExtent([[c-.214*o+Ct,f+.166*o+Ct],[c-.115*o-Ct,f+.234*o-Ct]]).stream(l).point,s},s.scale(1070)};var dr,hr,pr,gr,vr,mr,yr={point:P,lineStart:P,lineEnd:P,polygonStart:function(){hr=0,yr.lineStart=xr},polygonEnd:function(){yr.lineStart=yr.lineEnd=yr.point=P,dr+=M(hr/2)}};function xr(){var t,n,e,r;function i(t,n){hr+=r*t-e*n,e=t,r=n}yr.point=function(o,a){yr.point=i,t=e=o,n=r=a},yr.lineEnd=function(){i(t,n)}}var br={point:function(t,n){t<pr&&(pr=t);t>vr&&(vr=t);n<gr&&(gr=n);n>mr&&(mr=n)},lineStart:P,lineEnd:P,polygonStart:P,polygonEnd:P};function kr(){var t=Mr(4.5),n=[],e={point:r,lineStart:function(){e.point=i},lineEnd:a,polygonStart:function(){e.lineEnd=u},polygonEnd:function(){e.lineEnd=a,e.point=r},pointRadius:function(n){return t=Mr(n),e},result:function(){if(n.length){var t=n.join("");return n=[],t}}};function r(e,r){n.push("M",e,",",r,t)}function i(t,r){n.push("M",t,",",r),e.point=o}function o(t,e){n.push("L",t,",",e)}function a(){e.point=r}function u(){n.push("Z")}return e}function Mr(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var wr,Ar={point:_r,lineStart:Cr,lineEnd:Sr,polygonStart:function(){Ar.lineStart=Er},polygonEnd:function(){Ar.point=_r,Ar.lineStart=Cr,Ar.lineEnd=Sr}};function _r(t,n){_e+=t,Ce+=n,++Se}function Cr(){var t,n;function e(e,r){var i=e-t,o=r-n,a=Math.sqrt(i*i+o*o);Ee+=a*(t+e)/2,Ne+=a*(n+r)/2,De+=a,_r(t=e,n=r)}Ar.point=function(r,i){Ar.point=e,_r(t=r,n=i)}}function Sr(){Ar.point=_r}function Er(){var t,n,e,r;function i(t,n){var i=t-e,o=n-r,a=Math.sqrt(i*i+o*o);Ee+=a*(e+t)/2,Ne+=a*(r+n)/2,De+=a,Fe+=(a=r*t-e*n)*(e+t),We+=a*(r+n),Le+=3*a,_r(e=t,r=n)}Ar.point=function(o,a){Ar.point=i,_r(t=e=o,n=r=a)},Ar.lineEnd=function(){i(t,n)}}function Nr(t){var n=4.5,e={point:r,lineStart:function(){e.point=i}
1,lineEnd:a,polygonStart:function(){e.lineEnd=u},polygonEnd:function(){e.lineEnd=a,e.point=r},pointRadius:function(t){return n=t,e},result:P};function r(e,r){t.moveTo(e+n,r),t.arc(e,r,n,0,Nt)}function i(n,r){t.moveTo(n,r),e.point=o}function o(n,e){t.lineTo(n,e)}function a(){e.point=r}function u(){t.closePath()}return e}function Dr(t){var n=.5,e=Math.cos(30*Wt),r=16;function i(t){return(r?a:o)(t)}function o(n){return Wr(n,function(e,r){e=t(e,r),n.point(e[0],e[1])})}function a(n){var e,i,o,a,l,s,c,f,d,h,p,g,v={point:m,lineStart:y,lineEnd:b,polygonStart:function(){n.polygonStart(),v.lineStart=k},polygonEnd:function(){n.polygonEnd(),v.lineStart=y}};function m(e,r){e=t(e,r),n.point(e[0],e[1])}function y(){f=NaN,v.point=x,n.lineStart()}function x(e,i){var o=Pe([e,i]),a=t(e,i);u(f,d,c,h,p,g,f=a[0],d=a[1],c=e,h=o[0],p=o[1],g=o[2],r,n),n.point(f,d)}function b(){v.point=m,n.lineEnd()}function k(){y(),v.point=M,v.lineEnd=w}function M(t,n){x(e=t,n),i=f,o=d,a=h,l=p,s=g,v.point=x}function w(){u(f,d,c,h,p,g,i,o,e,a,l,s,r,n),v.lineEnd=b,b()}return v}function u(r,i,o,a,l,s,c,f,d,h,p,g,v,m){var y=c-r,x=f-i,b=y*y+x*x;if(b>4*n&&v--){var k=a+h,w=l+p,A=s+g,_=Math.sqrt(k*k+w*w+A*A),C=Math.asin(A/=_),S=M(M(A)-1)<Ct||M(o-d)<Ct?(o+d)/2:Math.atan2(w,k),E=t(S,C),N=E[0],D=E[1],F=N-r,W=D-i,L=x*F-y*W;(L*L/b>n||M((y*F+x*W)/b-.5)>.3||a*h+l*p+s*g<e)&&(u(r,i,o,a,l,s,N,D,S,k/=_,w/=_,A,v,m),m.point(N,D),u(N,D,S,k,w,A,c,f,d,h,p,g,v,m))}}return i.precision=function(t){return arguments.length?(r=(n=t*t)>0&&16,i):Math.sqrt(n)},i}function Fr(t){this.stream=t}function Wr(t,n){return{point:n,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Lr(t){return Tr(function(){return t})()}function Tr(t){var n,e,r,i,a,u,l=Dr(function(t,e){return[(t=n(t,e))[0]*s+i,a-t[1]*s]}),s=150,c=480,f=250,d=0,h=0,p=0,g=0,v=0,m=ar,y=L,x=null,b=null;function k(t){return[(t=r(t[0]*Wt,t[1]*Wt))[0]*s+i,a-t[1]*s]}function w(t){return(t=r.invert((t[0]-i)/s,(a-t[1])/s))&&[t[0]*Lt,t[1]*Lt]}function A(){r=Ke(e=Br(p,g,v),n);var t=n(d,h);return i=c-t[0]*s,a=f+t[1]*s,_()}function _(){return u&&(u.valid=!1,u=null),k}return k.stream=function(t){return u&&(u.valid=!1),(u=zr(m(e,l(y(t))))).valid=!0,u},k.clipAngle=function(t){return arguments.length?(m=null==t?(x=t,ar):function(t){var n=Math.cos(t),e=n>0,r=M(n)>Ct;return er(i,function(t){var n,u,l,s,c;return{lineStart:function(){s=l=!1,c=1},point:function(f,d){var h,p=[f,d],g=i(f,d),v=e?g?0:a(f,d):g?a(f+(f<0?Et:-Et),d):0;if(!n&&(s=l=g)&&t.lineStart(),g!==l&&(h=o(n,p),(qe(n,h)||qe(p,h))&&(p[0]+=Ct,p[1]+=Ct,g=i(p[0],p[1]))),g!==l)c=0,g?(t.lineStart(),h=o(p,n),t.point(h[0],h[1])):(h=o(n,p),t.point(h[0],h[1]),t.lineEnd()),n=h;else if(r&&n&&e^g){var m;v&u||!(m=o(p,n,!0))||(c=0,e?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||n&&qe(n,p)||t.point(p[0],p[1]),n=p,l=g,u=v},lineEnd:function(){l&&t.lineEnd(),n=null},clean:function(){return c|(s&&l)<<1}}},Vr(t,6*Wt),e?[0,-t]:[-Et,t-Et]);function i(t,e){return Math.cos(t)*Math.cos(e)>n}function o(t,e,r){var i=[1,0,0],o=Ie(Pe(t),Pe(e)),a=Be(o,o),u=o[0],l=a-u*u;if(!l)return!r&&t;var s=n*a/l,c=-n*u/l,f=Ie(i,o),d=He(i,s);Re(d,He(o,c));var h=f,p=Be(d,h),g=Be(h,h),v=p*p-g*(Be(d,d)-1);if(!(v<0)){var m=Math.sqrt(v),y=He(h,(-p-m)/g);if(Re(y,d),y=je(y),!r)return y;var x,b=t[0],k=e[0],w=t[1],A=e[1];k<b&&(x=b,b=k,k=x);var _=k-b,C=M(_-Et)<Ct;if(!C&&A<w&&(x=w,w=A,A=x),C||_<Ct?C?w+A>0^y[1]<(M(y[0]-b)<Ct?w:A):w<=y[1]&&y[1]<=A:_>Et^(b<=y[0]&&y[0]<=k)){var S=He(h,(-p+m)/g);return Re(S,d),[y,je(S)]}}}function a(n,r){var i=e?t:Et-t,o=0;return n<-i?o|=1:n>i&&(o|=2),r<-i?o|=4:r>i&&(o|=8),o}}((x=+t)*Wt),_()):x},k.clipExtent=function(t){return arguments.length?(b=t,y=t?sr(t[0][0],t[0][1],t[1][0],t[1][1]):L,_()):b},k.scale=function(t){return arguments.length?(s=+t,A()):s},k.translate=function(t){return arguments.length?(c=+t[0],f=+t[1],A()):[c,f]},k.center=function(t){return arguments.length?(d=t[0]%360*Wt,h=t[1]%360*Wt,A()):[d*Lt,h*Lt]},k.rotate=function(t){return arguments.length?(p=t[0]%360*Wt,g=t[1]%360*Wt,v=t.length>2?t[2]%360*Wt:0,A()):[p*Lt,g*Lt,v*Lt]},o.rebind(k,l,"precision"),function(){return n=t.apply(this,arguments),k.invert=n.invert&&w,A()}}function zr(t){return Wr(t,function(n,e){t.point(n*Wt,e*Wt)})}function Or(t,n){return[t,n]}function Pr(t,n){return[t>Et?t-Nt:t<-Et?t+Nt:t,n]}function Br(t,n,e){return t?n||e?Ke(Rr(t),Hr(n,e)):Rr(t):n||e?Hr(n,e):Pr}function Ir(t){return function(n,e){return[(n+=t)>Et?n-Nt:n<-Et?n+Nt:n,e]}}function Rr(t){var n=Ir(t);return n.invert=Ir(-t),n}function Hr(t,n){var e=Math.cos(t),r=Math.sin(t),i=Math.cos(n),o=Math.sin(n);function a(t,n){var a=Math.cos(n),u=Math.cos(t)*a,l=Math.sin(t)*a,s=Math.sin(n),c=s*e+u*r;return[Math.atan2(l*i-c*o,u*e-s*r),Pt(c*i+l*o)]}return a.invert=function(t,n){var a=Math.cos(n),u=Math.cos(t)*a,l=Math.sin(t)*a,s=Math.sin(n),c=s*i-l*o;return[Math.atan2(l*i+s*o,u*e+c*r),Pt(c*e-u*r)]},a}function Vr(t,n){var e=Math.cos(t),r=Math.sin(t);return function(i,o,a,u){var l=a*n;null!=i?(i=jr(e,i),o=jr(e,o),(a>0?i<o:i>o)&&(i+=a*Nt)):(i=t+a*Nt,o=t-.5*l);for(var s,c=i;a>0?c>o:c<o;c-=l)u.point((s=je([e,-r*Math.cos(c),-r*Math.sin(c)]))[0],s[1])}}function jr(t,n){var e=Pe(n);e[0]-=t,Ve(e);var r=Ot(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ct)%(2*Math.PI)}function qr(t,n,e){var r=o.range(t,n-Ct,e).concat(n);return function(t){return r.map(function(n){return[t,n]})}}function Yr(t,n,e){var r=o.range(t,n-Ct,e).concat(n);return function(t){return r.map(function(n){return[n,t]})}}function Xr(t){return t.source}function Gr(t){return t.target}o.geo.path=function(){var t,n,e,r,i,a=4.5;function u(t){return t&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),i&&i.valid||(i=e(r)),o.geo.stream(t,i)),r.result()}function l(){return i=null,u}return u.area=function(t){return dr=0,o.geo.stream(t,e(yr)),dr},u.centroid=function(t){return _e=Ce=Se=Ee=Ne=De=Fe=We=Le=0,o.geo.stream(t,e(Ar)),Le?[Fe/Le,We/Le]:De?[Ee/De,Ne/De]:Se?[_e/Se,Ce/Se]:[NaN,NaN]},u.bounds=function(t){return vr=mr=-(pr=gr=1/0),o.geo.stream(t,e(br)),[[pr,gr],[vr,mr]]},u.projection=function(n){return arguments.length?(e=(t=n)?n.stream||(r=n,i=Dr(function(t,n){return r([t*Lt,n*Lt])}),function(t){return zr(i(t))}):L,l()):t;var r,i},u.context=function(t){return arguments.length?(r=null==(n=t)?new kr:new Nr(t),"function"!=typeof a&&r.pointRadius(a),l()):n},u.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(r.pointRadius(+t),+t),u):a},u.projection(o.geo.albersUsa()).context(null)}
1,o.geo.transform=function(t){return{stream:function(n){var e=new Fr(n);for(var r in t)e[r]=t[r];return e}}},Fr.prototype={point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},o.geo.projection=Lr,o.geo.projectionMutator=Tr,(o.geo.equirectangular=function(){return Lr(Or)}).raw=Or.invert=Or,o.geo.rotation=function(t){function n(n){return(n=t(n[0]*Wt,n[1]*Wt))[0]*=Lt,n[1]*=Lt,n}return t=Br(t[0]%360*Wt,t[1]*Wt,t.length>2?t[2]*Wt:0),n.invert=function(n){return(n=t.invert(n[0]*Wt,n[1]*Wt))[0]*=Lt,n[1]*=Lt,n},n},Pr.invert=Or,o.geo.circle=function(){var t,n,e=[0,0],r=6;function i(){var t="function"==typeof e?e.apply(this,arguments):e,r=Br(-t[0]*Wt,-t[1]*Wt,0).invert,i=[];return n(null,null,1,{point:function(t,n){i.push(t=r(t,n)),t[0]*=Lt,t[1]*=Lt}}),{type:"Polygon",coordinates:[i]}}return i.origin=function(t){return arguments.length?(e=t,i):e},i.angle=function(e){return arguments.length?(n=Vr((t=+e)*Wt,r*Wt),i):t},i.precision=function(e){return arguments.length?(n=Vr(t*Wt,(r=+e)*Wt),i):r},i.angle(90)},o.geo.distance=function(t,n){var e,r=(n[0]-t[0])*Wt,i=t[1]*Wt,o=n[1]*Wt,a=Math.sin(r),u=Math.cos(r),l=Math.sin(i),s=Math.cos(i),c=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((e=f*a)*e+(e=s*c-l*f*u)*e),l*c+s*f*u)},o.geo.graticule=function(){var t,n,e,r,i,a,u,l,s,c,f,d,h=10,p=h,g=90,v=360,m=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return o.range(Math.ceil(r/g)*g,e,g).map(f).concat(o.range(Math.ceil(l/v)*v,u,v).map(d)).concat(o.range(Math.ceil(n/h)*h,t,h).filter(function(t){return M(t%g)>Ct}).map(s)).concat(o.range(Math.ceil(a/p)*p,i,p).filter(function(t){return M(t%v)>Ct}).map(c))}return y.lines=function(){return x().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[f(r).concat(d(u).slice(1),f(e).reverse().slice(1),d(l).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.majorExtent(t).minorExtent(t):y.minorExtent()},y.majorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],l=+t[0][1],u=+t[1][1],r>e&&(t=r,r=e,e=t),l>u&&(t=l,l=u,u=t),y.precision(m)):[[r,l],[e,u]]},y.minorExtent=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],a=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),a>i&&(e=a,a=i,i=e),y.precision(m)):[[n,a],[t,i]]},y.step=function(t){return arguments.length?y.majorStep(t).minorStep(t):y.minorStep()},y.majorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],y):[g,v]},y.minorStep=function(t){return arguments.length?(h=+t[0],p=+t[1],y):[h,p]},y.precision=function(o){return arguments.length?(m=+o,s=qr(a,i,90),c=Yr(n,t,m),f=qr(l,u,90),d=Yr(r,e,m),y):m},y.majorExtent([[-180,-90+Ct],[180,90-Ct]]).minorExtent([[-180,-80-Ct],[180,80+Ct]])},o.geo.greatArc=function(){var t,n,e=Xr,r=Gr;function i(){return{type:"LineString",coordinates:[t||e.apply(this,arguments),n||r.apply(this,arguments)]}}return i.distance=function(){return o.geo.distance(t||e.apply(this,arguments),n||r.apply(this,arguments))},i.source=function(n){return arguments.length?(e=n,t="function"==typeof n?null:n,i):e},i.target=function(t){return arguments.length?(r=t,n="function"==typeof t?null:t,i):r},i.precision=function(){return arguments.length?i:0},i},o.geo.interpolate=function(t,n){return e=t[0]*Wt,r=t[1]*Wt,i=n[0]*Wt,o=n[1]*Wt,a=Math.cos(r),u=Math.sin(r),l=Math.cos(o),s=Math.sin(o),c=a*Math.cos(e),f=a*Math.sin(e),d=l*Math.cos(i),h=l*Math.sin(i),p=2*Math.asin(Math.sqrt(It(o-r)+a*l*It(i-e))),g=1/Math.sin(p),(v=p?function(t){var n=Math.sin(t*=p)*g,e=Math.sin(p-t)*g,r=e*c+n*d,i=e*f+n*h,o=e*u+n*s;return[Math.atan2(i,r)*Lt,Math.atan2(o,Math.sqrt(r*r+i*i))*Lt]}:function(){return[e*Lt,r*Lt]}).distance=p,v;var e,r,i,o,a,u,l,s,c,f,d,h,p,g,v},o.geo.length=function(t){return wr=0,o.geo.stream(t,Ur),wr};var Ur={sphere:P,point:P,lineStart:function(){var t,n,e;function r(r,i){var o=Math.sin(i*=Wt),a=Math.cos(i),u=M((r*=Wt)-t),l=Math.cos(u);wr+=Math.atan2(Math.sqrt((u=a*Math.sin(u))*u+(u=e*o-n*a*l)*u),n*o+e*a*l),t=r,n=o,e=a}Ur.point=function(i,o){t=i*Wt,n=Math.sin(o*=Wt),e=Math.cos(o),Ur.point=r},Ur.lineEnd=function(){Ur.point=Ur.lineEnd=P}},lineEnd:P,polygonStart:P,polygonEnd:P};function Zr(t,n){function e(n,e){var r=Math.cos(n),i=Math.cos(e),o=t(r*i);return[o*i*Math.sin(n),o*Math.sin(e)]}return e.invert=function(t,e){var r=Math.sqrt(t*t+e*e),i=n(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(t*o,r*a),Math.asin(r&&e*o/r)]},e}var $r=Zr(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(o.geo.azimuthalEqualArea=function(){return Lr($r)}).raw=$r;var Kr=Zr(function(t){var n=Math.acos(t);return n&&n/Math.sin(n)},L);function Qr(t,n){var e=Math.cos(t),r=function(t){return Math.tan(Et/4+t/2)},i=t===n?Math.sin(t):Math.log(e/Math.cos(n))/Math.log(r(n)/r(t)),o=e*Math.pow(r(t),i)/i;if(!i)return ni;function a(t,n){o>0?n<-Ft+Ct&&(n=-Ft+Ct):n>Ft-Ct&&(n=Ft-Ct);var e=o/Math.pow(r(n),i);return[e*Math.sin(i*t),o-e*Math.cos(i*t)]}return a.invert=function(t,n){var e=o-n,r=Tt(i)*Math.sqrt(t*t+e*e);return[Math.atan2(t,e)/i,2*Math.atan(Math.pow(o/r,1/i))-Ft]},a}function Jr(t,n){var e=Math.cos(t),r=t===n?Math.sin(t):(e-Math.cos(n))/(n-t),i=e/r+t;if(M(r)<Ct)return Or;function o(t,n){var e=i-n;return[e*Math.sin(r*t),i-e*Math.cos(r*t)]}return o.invert=function(t,n){var e=i-n;return[Math.atan2(t,e)/r,i-Tt(r)*Math.sqrt(t*t+e*e)]},o}(o.geo.azimuthalEquidistant=function(){return Lr(Kr)}).raw=Kr,(o.geo.conicConformal=function(){return cr(Qr)}).raw=Qr,(o.geo.conicEquidistant=function(){return cr(Jr)}).raw=Jr;var ti=Zr(function(t){return 1/t},Math.atan);function ni(t,n){return[t,Math.log(Math.tan(Et/4+n/2))]}function ei(t){var n,e=Lr(t),r=e.scale,i=e.translate,o=e.clipExtent;return e.scale=function(){var t=r.apply(e,arguments);return t===e?n?e.clipExtent(null):e:t},e.translate=function(){var t=i.apply(e,arguments);return t===e?n?e.clipExtent(null):e:t},e.clipExtent=function(t){var a=o.apply(e,arguments);if(a===e){if(n=null==t){var u=Et*r(),l=i();o([[l[0]-u,l[1]-u],[l[0]+u,l[1]+u]])}}else n&&(a=null);return a},e.clipExtent(null)}(o.geo.gnomonic=function(){return Lr(ti)}).raw=ti,ni.invert=function(t,n){return[t,2*Math.atan(Math.exp(n))-Ft]},(o.geo.mercator=function(){return ei(ni)}).raw=ni;var ri=Zr(function(){return 1},Math.asin);(o.geo.orthographic=function(){return Lr(ri)}).raw=ri;var ii=Zr(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});function oi(t,n){return[Math.log(Math.tan(Et/4+n/2)),-t]}function ai(t){return t[0]}function ui(t){return t[1]}function li(t){for(var n=t.length,e=[0,1],r=2,i=2;i<n;i++){for(;r>1&&zt(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function si(t,n){return t[0]-n[0]||t[1]-n[1]}(o.geo.stereographic=function(){return Lr(ii)}).raw=ii,oi.invert=function(t,n){return[-n,2*Math.atan(Math.exp(t))-Ft]},(o.geo.transverseMercator=function(){var t=ei(oi),n=t.center,e=t.rotate;return t.center=function(t){return t?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return t?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90])}).raw=oi,o.geom={},o.geom.hull=function(t){var n=ai,e=ui;if(arguments.length)return r(t);function r(t){if(t.length<3)return[];var r,i=bn(n),o=bn(e),a=t.length,u=[],l=[];for(r=0;r<a;r++)u.push([+i.call(this,t[r],r),+o.call(this,t[r],r),r]);for(u.sort(si),r=0;r<a;r++)l.push([u[r][0],-u[r][1]]);var s=li(u),c=li(l),f=c[0]===s[0],d=c[c.length-1]===s[s.length-1],h=[];for(r=s.length-1;r>=0;--r)h.push(t[u[s[r]][2]]);for(r=+f;r<c.length-d;++r)h.push(t[u[c[r]][2]]);return h}return r.x=function(t){return arguments.length?(n=t,r):n},r.y=function(t){return arguments.length?(e=t,r):e},r},o.geom.polygon=function(t){return q(t,ci),t};var ci=o.geom.polygon.prototype=[];function fi(t,n,e){return(e[0]-n[0])*(t[1]-n[1])<(e[1]-n[1])*(t[0]-n[0])}function di(t,n,e,r){var i=t[0],o=e[0],a=n[0]-i,u=r[0]-o,l=t[1],s=e[1],c=n[1]-l,f=r[1]-s,d=(u*(l-s)-f*(i-o))/(f*a-u*c);return[i+d*a,l+d*c]}function hi(t){var n=t[0],e=t[t.length-1];return!(n[0]-e[0]||n[1]-e[1])}ci.area=function(){for(var t,n=-1,e=this.length,r=this[e-1],i=0;++n<e;)t=r,r=this[n],i+=t[1]*r[0]-t[0]*r[1];return.5*i},ci.centroid=function(t){var n,e,r=-1,i=this.length,o=0,a=0,u=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++r<i;)n=u,u=this[r],e=n[0]*u[1]-u[0]*n[1],o+=(n[0]+u[0])*e,a+=(n[1]+u[1])*e;return[o*t,a*t]},ci.clip=function(t){for(var n,e,r,i,o,a,u=hi(t),l=-1,s=this.length-hi(this),c=this[s-1];++l<s;){for(n=t.slice(),t.length=0,i=this[l],o=n[(r=n.length-u)-1],e=-1;++e<r;
1)fi(a=n[e],c,i)?(fi(o,c,i)||t.push(di(o,a,c,i)),t.push(a)):fi(o,c,i)&&t.push(di(o,a,c,i)),o=a;u&&t.push(t[0]),c=i}return t};var pi,gi,vi,mi,yi,xi=[],bi=[];function ki(){Ri(this),this.edge=this.site=this.circle=null}function Mi(t){var n=xi.pop()||new ki;return n.site=t,n}function wi(t){Wi(t),vi.remove(t),xi.push(t),Ri(t)}function Ai(t){var n=t.circle,e=n.x,r=n.cy,i={x:e,y:r},o=t.P,a=t.N,u=[t];wi(t);for(var l=o;l.circle&&M(e-l.circle.x)<Ct&&M(r-l.circle.cy)<Ct;)o=l.P,u.unshift(l),wi(l),l=o;u.unshift(l),Wi(l);for(var s=a;s.circle&&M(e-s.circle.x)<Ct&&M(r-s.circle.cy)<Ct;)a=s.N,u.push(s),wi(s),s=a;u.push(s),Wi(s);var c,f=u.length;for(c=1;c<f;++c)s=u[c],l=u[c-1],Pi(s.edge,l.site,s.site,i);l=u[0],(s=u[f-1]).edge=zi(l.site,s.site,null,i),Fi(l),Fi(s)}function _i(t){for(var n,e,r,i,o=t.x,a=t.y,u=vi._;u;)if((r=Ci(u,a)-o)>Ct)u=u.L;else{if(!((i=o-Si(u,a))>Ct)){r>-Ct?(n=u.P,e=u):i>-Ct?(n=u,e=u.N):n=e=u;break}if(!u.R){n=u;break}u=u.R}var l=Mi(t);if(vi.insert(n,l),n||e){if(n===e)return Wi(n),e=Mi(n.site),vi.insert(l,e),l.edge=e.edge=zi(n.site,l.site),Fi(n),void Fi(e);if(e){Wi(n),Wi(e);var s=n.site,c=s.x,f=s.y,d=t.x-c,h=t.y-f,p=e.site,g=p.x-c,v=p.y-f,m=2*(d*v-h*g),y=d*d+h*h,x=g*g+v*v,b={x:(v*y-h*x)/m+c,y:(d*x-g*y)/m+f};Pi(e.edge,s,p,b),l.edge=zi(s,t,null,b),e.edge=zi(t,p,null,b),Fi(n),Fi(e)}else l.edge=zi(n.site,l.site)}}function Ci(t,n){var e=t.site,r=e.x,i=e.y,o=i-n;if(!o)return r;var a=t.P;if(!a)return-1/0;var u=(e=a.site).x,l=e.y,s=l-n;if(!s)return u;var c=u-r,f=1/o-1/s,d=c/s;return f?(-d+Math.sqrt(d*d-2*f*(c*c/(-2*s)-l+s/2+i-o/2)))/f+r:(r+u)/2}function Si(t,n){var e=t.N;if(e)return Ci(e,n);var r=t.site;return r.y===n?r.x:1/0}function Ei(t){this.site=t,this.edges=[]}function Ni(t,n){return n.angle-t.angle}function Di(){Ri(this),this.x=this.y=this.arc=this.site=this.cy=null}function Fi(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,i=t.site,o=e.site;if(r!==o){var a=i.x,u=i.y,l=r.x-a,s=r.y-u,c=o.x-a,f=2*(l*(v=o.y-u)-s*c);if(!(f>=-St)){var d=l*l+s*s,h=c*c+v*v,p=(v*d-s*h)/f,g=(l*h-c*d)/f,v=g+u,m=bi.pop()||new Di;m.arc=t,m.site=i,m.x=p+a,m.y=v+Math.sqrt(p*p+g*g),m.cy=v,t.circle=m;for(var y=null,x=yi._;x;)if(m.y<x.y||m.y===x.y&&m.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}yi.insert(y,m),y||(mi=m)}}}}function Wi(t){var n=t.circle;n&&(n.P||(mi=n.N),yi.remove(n),bi.push(n),Ri(n),t.circle=null)}function Li(t,n){var e=t.b;if(e)return!0;var r,i,o=t.a,a=n[0][0],u=n[1][0],l=n[0][1],s=n[1][1],c=t.l,f=t.r,d=c.x,h=c.y,p=f.x,g=f.y,v=(d+p)/2,m=(h+g)/2;if(g===h){if(v<a||v>=u)return;if(d>p){if(o){if(o.y>=s)return}else o={x:v,y:l};e={x:v,y:s}}else{if(o){if(o.y<l)return}else o={x:v,y:s};e={x:v,y:l}}}else if(i=m-(r=(d-p)/(g-h))*v,r<-1||r>1)if(d>p){if(o){if(o.y>=s)return}else o={x:(l-i)/r,y:l};e={x:(s-i)/r,y:s}}else{if(o){if(o.y<l)return}else o={x:(s-i)/r,y:s};e={x:(l-i)/r,y:l}}else if(h<g){if(o){if(o.x>=u)return}else o={x:a,y:r*a+i};e={x:u,y:r*u+i}}else{if(o){if(o.x<a)return}else o={x:u,y:r*u+i};e={x:a,y:r*a+i}}return t.a=o,t.b=e,!0}function Ti(t,n){this.l=t,this.r=n,this.a=this.b=null}function zi(t,n,e,r){var i=new Ti(t,n);return pi.push(i),e&&Pi(i,t,n,e),r&&Pi(i,n,t,r),gi[t.i].edges.push(new Bi(i,t,n)),gi[n.i].edges.push(new Bi(i,n,t)),i}function Oi(t,n,e){var r=new Ti(t,null);return r.a=n,r.b=e,pi.push(r),r}function Pi(t,n,e,r){t.a||t.b?t.l===e?t.b=r:t.a=r:(t.a=r,t.l=n,t.r=e)}function Bi(t,n,e){var r=t.a,i=t.b;this.edge=t,this.site=n,this.angle=e?Math.atan2(e.y-n.y,e.x-n.x):t.l===n?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function Ii(){this._=null}function Ri(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Hi(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function Vi(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ji(t){for(;t.L;)t=t.L;return t}function qi(t,n){var e,r,i,o=t.sort(Yi).pop();for(pi=[],gi=new Array(t.length),vi=new Ii,yi=new Ii;;)if(i=mi,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===e&&o.y===r||(gi[o.i]=new Ei(o),_i(o),e=o.x,r=o.y),o=t.pop();else{if(!i)break;Ai(i.arc)}n&&(function(t){for(var n,e=pi,r=ur(t[0][0],t[0][1],t[1][0],t[1][1]),i=e.length;i--;)(!Li(n=e[i],t)||!r(n)||M(n.a.x-n.b.x)<Ct&&M(n.a.y-n.b.y)<Ct)&&(n.a=n.b=null,e.splice(i,1))}(n),function(t){for(var n,e,r,i,o,a,u,l,s,c,f=t[0][0],d=t[1][0],h=t[0][1],p=t[1][1],g=gi,v=g.length;v--;)if((o=g[v])&&o.prepare())for(l=(u=o.edges).length,a=0;a<l;)r=(c=u[a].end()).x,i=c.y,n=(s=u[++a%l].start()).x,e=s.y,(M(r-n)>Ct||M(i-e)>Ct)&&(u.splice(a,0,new Bi(Oi(o.site,c,M(r-f)<Ct&&p-i>Ct?{x:f,y:M(n-f)<Ct?e:p}:M(i-p)<Ct&&d-r>Ct?{x:M(e-p)<Ct?n:d,y:p}:M(r-d)<Ct&&i-h>Ct?{x:d,y:M(n-d)<Ct?e:h}:M(i-h)<Ct&&r-f>Ct?{x:M(e-h)<Ct?n:f,y:h}:null),o.site,null)),++l)}(n));var a={cells:gi,edges:pi};return vi=yi=pi=gi=null,a}function Yi(t,n){return n.y-t.y||n.x-t.x}Ei.prototype.prepare=function(){for(var t,n=this.edges,e=n.length;e--;)(t=n[e].edge).b&&t.a||n.splice(e,1);return n.sort(Ni),n.length},Bi.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Ii.prototype={insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=ji(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)e===(r=e.U).L?(i=r.R)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(Hi(this,e),e=(t=e).U),e.C=!1,r.C=!0,Vi(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(Vi(this,e),e=(t=e).U),e.C=!1,r.C=!0,Hi(this,r)),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,o=t.L,a=t.R;if(e=o?a?ji(a):o:a,i?i.L===t?i.L=e:i.R=e:this._=e,o&&a?(r=e.C,e.C=t.C,e.L=o,o.U=e,e!==a?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=a,a.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;
1if(t===i.L){if((n=i.R).C&&(n.C=!1,i.C=!0,Hi(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,Vi(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,Hi(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,Vi(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,Hi(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,Vi(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},o.geom.voronoi=function(t){var n=ai,e=ui,r=n,i=e,o=Xi;if(t)return a(t);function a(t){var n=new Array(t.length),e=o[0][0],r=o[0][1],i=o[1][0],a=o[1][1];return qi(u(t),o).cells.forEach(function(o,u){var l=o.edges,s=o.site;(n[u]=l.length?l.map(function(t){var n=t.start();return[n.x,n.y]}):s.x>=e&&s.x<=i&&s.y>=r&&s.y<=a?[[e,a],[i,a],[i,r],[e,r]]:[]).point=t[u]}),n}function u(t){return t.map(function(t,n){return{x:Math.round(r(t,n)/Ct)*Ct,y:Math.round(i(t,n)/Ct)*Ct,i:n}})}return a.links=function(t){return qi(u(t)).edges.filter(function(t){return t.l&&t.r}).map(function(n){return{source:t[n.l.i],target:t[n.r.i]}})},a.triangles=function(t){var n=[];return qi(u(t)).cells.forEach(function(e,r){for(var i,o=e.site,a=e.edges.sort(Ni),u=-1,l=a.length,s=a[l-1].edge,c=s.l===o?s.r:s.l;++u<l;)i=c,c=(s=a[u].edge).l===o?s.r:s.l,r<i.i&&r<c.i&&Gi(o,i,c)<0&&n.push([t[r],t[i.i],t[c.i]])}),n},a.x=function(t){return arguments.length?(r=bn(n=t),a):n},a.y=function(t){return arguments.length?(i=bn(e=t),a):e},a.clipExtent=function(t){return arguments.length?(o=null==t?Xi:t,a):o===Xi?null:o},a.size=function(t){return arguments.length?a.clipExtent(t&&[[0,0],t]):o===Xi?null:o&&o[1]},a};var Xi=[[-1e6,-1e6],[1e6,1e6]];function Gi(t,n,e){return(t.x-e.x)*(n.y-t.y)-(t.x-n.x)*(e.y-t.y)}function Ui(t){return t.x}function Zi(t){return t.y}function $i(t,n,e,r,i,o){if(!t(n,e,r,i,o)){var a=.5*(e+i),u=.5*(r+o),l=n.nodes;l[0]&&$i(t,l[0],e,r,a,u),l[1]&&$i(t,l[1],a,r,i,u),l[2]&&$i(t,l[2],e,u,a,o),l[3]&&$i(t,l[3],a,u,i,o)}}function Ki(t,n){t=o.rgb(t),n=o.rgb(n);var e=t.r,r=t.g,i=t.b,a=n.r-e,u=n.g-r,l=n.b-i;return function(t){return"#"+hn(Math.round(e+a*t))+hn(Math.round(r+u*t))+hn(Math.round(i+l*t))}}function Qi(t,n){var e,r={},i={};for(e in t)e in n?r[e]=ro(t[e],n[e]):i[e]=t[e];for(e in n)e in t||(i[e]=n[e]);return function(t){for(e in r)i[e]=r[e](t);return i}}function Ji(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function to(t,n){var e,r,i,o=no.lastIndex=eo.lastIndex=0,a=-1,u=[],l=[];for(t+="",n+="";(e=no.exec(t))&&(r=eo.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,l.push({i:a,x:Ji(e,r)})),o=eo.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?l[0]?(n=l[0].x,function(t){return n(t)+""}):function(){return n}:(n=l.length,function(t){for(var e,r=0;r<n;++r)u[(e=l[r]).i]=e.x(t);return u.join("")})}o.geom.delaunay=function(t){return o.geom.voronoi().triangles(t)},o.geom.quadtree=function(t,n,e,r,i){var o,a=ai,u=ui;if(o=arguments.length)return a=Ui,u=Zi,3===o&&(i=e,r=n,e=n=0),l(t);function l(t){var l,s,c,f,d,h,p,g,v,m=bn(a),y=bn(u);if(null!=n)h=n,p=e,g=r,v=i;else if(g=v=-(h=p=1/0),s=[],c=[],d=t.length,o)for(f=0;f<d;++f)(l=t[f]).x<h&&(h=l.x),l.y<p&&(p=l.y),l.x>g&&(g=l.x),l.y>v&&(v=l.y),s.push(l.x),c.push(l.y);else for(f=0;f<d;++f){var x=+m(l=t[f],f),b=+y(l,f);x<h&&(h=x),b<p&&(p=b),x>g&&(g=x),b>v&&(v=b),s.push(x),c.push(b)}var k=g-h,w=v-p;function A(t,n,e,r,i,o,a,u){if(!isNaN(e)&&!isNaN(r))if(t.leaf){var l=t.x,s=t.y;if(null!=l)if(M(l-e)+M(s-r)<.01)_(t,n,e,r,i,o,a,u);else{var c=t.point;t.x=t.y=t.point=null,_(t,c,l,s,i,o,a,u),_(t,n,e,r,i,o,a,u)}else t.x=e,t.y=r,t.point=n}else _(t,n,e,r,i,o,a,u)}function _(t,n,e,r,i,o,a,u){var l=.5*(i+a),s=.5*(o+u),c=e>=l,f=r>=s,d=f<<1|c;t.leaf=!1,c?i=l:a=l,f?o=s:u=s,A(t=t.nodes[d]||(t.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),n,e,r,i,o,a,u)}k>w?v=p+k:g=h+w;var C={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){A(C,t,+m(t,++f),+y(t,f),h,p,g,v)}};if(C.visit=function(t){$i(t,C,h,p,g,v)},C.find=function(t){return function(t,n,e,r,i,o,a){var u,l=1/0;return function t(s,c,f,d,h){if(!(c>o||f>a||d<r||h<i)){if(p=s.point){var p,g=n-s.x,v=e-s.y,m=g*g+v*v;if(m<l){var y=Math.sqrt(l=m);r=n-y,i=e-y,o=n+y,a=e+y,u=p}}for(var x=s.nodes,b=.5*(c+d),k=.5*(f+h),M=(e>=k)<<1|n>=b,w=M+4;M<w;++M)if(s=x[3&M])switch(3&M){case 0:t(s,c,f,b,k);break;
1case 1:t(s,b,f,d,k);break;case 2:t(s,c,k,b,h);break;case 3:t(s,b,k,d,h)}}}(t,r,i,o,a),u}(C,t[0],t[1],h,p,g,v)},f=-1,null==n){for(;++f<d;)A(C,t[f],s[f],c[f],h,p,g,v);--f}else t.forEach(C.add);return s=c=t=l=null,C}return l.x=function(t){return arguments.length?(a=t,l):a},l.y=function(t){return arguments.length?(u=t,l):u},l.extent=function(t){return arguments.length?(null==t?n=e=r=i=null:(n=+t[0][0],e=+t[0][1],r=+t[1][0],i=+t[1][1]),l):null==n?null:[[n,e],[r,i]]},l.size=function(t){return arguments.length?(null==t?n=e=r=i=null:(n=e=0,r=+t[0],i=+t[1]),l):null==n?null:[r-n,i-e]},l},o.interpolateRgb=Ki,o.interpolateObject=Qi,o.interpolateNumber=Ji,o.interpolateString=to;var no=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,eo=new RegExp(no.source,"g");function ro(t,n){for(var e,r=o.interpolators.length;--r>=0&&!(e=o.interpolators[r](t,n)););return e}function io(t,n){var e,r=[],i=[],o=t.length,a=n.length,u=Math.min(t.length,n.length);for(e=0;e<u;++e)r.push(ro(t[e],n[e]));for(;e<o;++e)i[e]=t[e];for(;e<a;++e)i[e]=n[e];return function(t){for(e=0;e<u;++e)i[e]=r[e](t);return i}}o.interpolate=ro,o.interpolators=[function(t,n){var e=typeof n;return("string"===e?xn.has(n.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(n)?Ki:to:n instanceof qt?Ki:Array.isArray(n)?io:"object"===e&&isNaN(n)?Qi:Ji)(t,n)}],o.interpolateArray=io;var oo=function(){return L},ao=o.map({linear:oo,poly:function(t){return function(n){return Math.pow(n,t)}},quad:function(){return co},cubic:function(){return fo},sin:function(){return po},exp:function(){return go},circle:function(){return vo},elastic:function(t,n){var e;arguments.length<2&&(n=.45);arguments.length?e=n/Nt*Math.asin(1/t):(t=1,e=n/4);return function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-e)*Nt/n)}},back:function(t){t||(t=1.70158);return function(n){return n*n*((t+1)*n-t)}},bounce:function(){return mo}}),uo=o.map({in:L,out:lo,"in-out":so,"out-in":function(t){return so(lo(t))}});function lo(t){return function(n){return 1-t(1-n)}}function so(t){return function(n){return.5*(n<.5?t(2*n):2-t(2-2*n))}}function co(t){return t*t}function fo(t){return t*t*t}function ho(t){if(t<=0)return 0;if(t>=1)return 1;var n=t*t,e=n*t;return 4*(t<.5?e:3*(t-n)+e-.75)}function po(t){return 1-Math.cos(t*Ft)}function go(t){return Math.pow(2,10*(t-1))}function vo(t){return 1-Math.sqrt(1-t*t)}function mo(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function yo(t,n){return n-=t,function(e){return Math.round(t+n*e)}}function xo(t){var n,e,r,i=[t.a,t.b],o=[t.c,t.d],a=ko(i),u=bo(i,o),l=ko(((n=o)[0]+=(r=-u)*(e=i)[0],n[1]+=r*e[1],n))||0;i[0]*o[1]<o[0]*i[1]&&(i[0]*=-1,i[1]*=-1,a*=-1,u*=-1),this.rotate=(a?Math.atan2(i[1],i[0]):Math.atan2(-o[0],o[1]))*Lt,this.translate=[t.e,t.f],this.scale=[a,l],this.skew=l?Math.atan2(u,l)*Lt:0}function bo(t,n){return t[0]*n[0]+t[1]*n[1]}function ko(t){var n=Math.sqrt(bo(t,t));return n&&(t[0]/=n,t[1]/=n),n}o.ease=function(t){var n,e=t.indexOf("-"),r=e>=0?t.slice(0,e):t,i=e>=0?t.slice(e+1):"in";return r=ao.get(r)||oo,i=uo.get(i)||L,n=i(r.apply(null,a.call(arguments,1))),function(t){return t<=0?0:t>=1?1:n(t)}},o.interpolateHcl=function(t,n){t=o.hcl(t),n=o.hcl(n);var e=t.h,r=t.c,i=t.l,a=n.h-e,u=n.c-r,l=n.l-i;isNaN(u)&&(u=0,r=isNaN(r)?n.c:r);isNaN(a)?(a=0,e=isNaN(e)?n.h:e):a>180?a-=360:a<-180&&(a+=360);return function(t){return $t(e+a*t,r+u*t,i+l*t)+""}},o.interpolateHsl=function(t,n){t=o.hsl(t),n=o.hsl(n);var e=t.h,r=t.s,i=t.l,a=n.h-e,u=n.s-r,l=n.l-i;isNaN(u)&&(u=0,r=isNaN(r)?n.s:r);isNaN(a)?(a=0,e=isNaN(e)?n.h:e):a>180?a-=360:a<-180&&(a+=360);return function(t){return Gt(e+a*t,r+u*t,i+l*t)+""}},o.interpolateLab=function(t,n){t=o.lab(t),n=o.lab(n);var e=t.l,r=t.a,i=t.b,a=n.l-e,u=n.a-r,l=n.b-i;return function(t){return rn(e+a*t,r+u*t,i+l*t)+""}},o.interpolateRound=yo,o.transform=function(t){var n=l.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(t){if(null!=t){n.setAttribute("transform",t);var e=n.transform.baseVal.consolidate()}return new xo(e?e.matrix:Mo)})(t)},xo.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Mo={a:1,b:0,c:0,d:1,e:0,f:0};function wo(t){return t.length?t.pop()+",":""}function Ao(t,n){var e=[],r=[];return t=o.transform(t),n=o.transform(n),function(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var i=e.push("translate(",null,",",null,")");r.push({i:i-4,x:Ji(t[0],n[0])},{i:i-2,x:Ji(t[1],n[1])})}else(n[0]||n[1])&&e.push("translate("+n+")")}(t.translate,n.translate,e,r),function(t,n,e,r){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),r.push({i:e.push(wo(e)+"rotate(",null,")")-2,x:Ji(t,n)})):n&&e.push(wo(e)+"rotate("+n+")")}(t.rotate,n.rotate,e,r),function(t,n,e,r){t!==n?r.push({i:e.push(wo(e)+"skewX(",
1null,")")-2,x:Ji(t,n)}):n&&e.push(wo(e)+"skewX("+n+")")}(t.skew,n.skew,e,r),function(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var i=e.push(wo(e)+"scale(",null,",",null,")");r.push({i:i-4,x:Ji(t[0],n[0])},{i:i-2,x:Ji(t[1],n[1])})}else 1===n[0]&&1===n[1]||e.push(wo(e)+"scale("+n+")")}(t.scale,n.scale,e,r),t=n=null,function(t){for(var n,i=-1,o=r.length;++i<o;)e[(n=r[i]).i]=n.x(t);return e.join("")}}function _o(t,n){return n=(n-=t=+t)||1/n,function(e){return(e-t)/n}}function Co(t,n){return n=(n-=t=+t)||1/n,function(e){return Math.max(0,Math.min(1,(e-t)/n))}}function So(t){for(var n=t.source,e=t.target,r=function(t,n){if(t===n)return t;var e=Eo(t),r=Eo(n),i=e.pop(),o=r.pop(),a=null;for(;i===o;)a=i,i=e.pop(),o=r.pop();return a}(n,e),i=[n];n!==r;)n=n.parent,i.push(n);for(var o=i.length;e!==r;)i.splice(o,0,e),e=e.parent;return i}function Eo(t){for(var n=[],e=t.parent;null!=e;)n.push(t),t=e,e=e.parent;return n.push(t),n}function No(t){t.fixed|=2}function Do(t){t.fixed&=-7}function Fo(t){t.fixed|=4,t.px=t.x,t.py=t.y}function Wo(t){t.fixed&=-5}function Lo(t,n,e){var r=0,i=0;if(t.charge=0,!t.leaf)for(var o,a=t.nodes,u=a.length,l=-1;++l<u;)null!=(o=a[l])&&(Lo(o,n,e),t.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var s=n*e[t.point.index];t.charge+=t.pointCharge=s,r+=s*t.point.x,i+=s*t.point.y}t.cx=r/t.charge,t.cy=i/t.charge}o.interpolateTransform=Ao,o.layout={},o.layout.bundle=function(){return function(t){for(var n=[],e=-1,r=t.length;++e<r;)n.push(So(t[e]));return n}},o.layout.chord=function(){var t,n,e,r,i,a,u,l={},s=0;function c(){var l,c,d,h,p,g={},v=[],m=o.range(r),y=[];for(t=[],n=[],l=0,h=-1;++h<r;){for(c=0,p=-1;++p<r;)c+=e[h][p];v.push(c),y.push(o.range(r)),l+=c}for(i&&m.sort(function(t,n){return i(v[t],v[n])}
1),a&&y.forEach(function(t,n){t.sort(function(t,r){return a(e[n][t],e[n][r])})}),l=(Nt-s*r)/l,c=0,h=-1;++h<r;){for(d=c,p=-1;++p<r;){var x=m[h],b=y[x][p],k=e[x][b],M=c,w=c+=k*l;g[x+"-"+b]={index:x,subindex:b,startAngle:M,endAngle:w,value:k}}n[x]={index:x,startAngle:d,endAngle:c,value:v[x]},c+=s}for(h=-1;++h<r;)for(p=h-1;++p<r;){var A=g[h+"-"+p],_=g[p+"-"+h];(A.value||_.value)&&t.push(A.value<_.value?{source:_,target:A}:{source:A,target:_})}u&&f()}function f(){t.sort(function(t,n){return u((t.source.value+t.target.value)/2,(n.source.value+n.target.value)/2)})}return l.matrix=function(i){return arguments.length?(r=(e=i)&&e.length,t=n=null,l):e},l.padding=function(e){return arguments.length?(s=e,t=n=null,l):s},l.sortGroups=function(e){return arguments.length?(i=e,t=n=null,l):i},l.sortSubgroups=function(n){return arguments.length?(a=n,t=null,l):a},l.sortChords=function(n){return arguments.length?(u=n,t&&f(),l):u},l.chords=function(){return t||c(),t},l.groups=function(){return n||c(),n},l},o.layout.force=function(){var t,n,e,r,i,a,u={},l=o.dispatch("start","tick","end"),s=[1,1],c=.9,f=To,d=zo,h=-30,p=Oo,g=.1,v=.64,m=[],y=[];function x(t){return function(n,e,r,i){if(n.point!==t){var o=n.cx-t.x,a=n.cy-t.y,u=i-e,l=o*o+a*a;if(u*u/v<l){if(l<p){var s=n.charge/l;t.px-=o*s,t.py-=a*s}return!0}if(n.point&&l&&l<p){s=n.pointCharge/l;t.px-=o*s,t.py-=a*s}}return!n.charge}}function b(t){t.px=o.event.x,t.py=o.event.y,u.resume()}return u.tick=function(){if((e*=.99)<.005)return t=null,l.end({type:"end",alpha:e=0}),!0;var n,u,f,d,p,v,b,k,M,w=m.length,A=y.length;for(u=0;u<A;++u)d=(f=y[u]).source,(v=(k=(p=f.target).x-d.x)*k+(M=p.y-d.y)*M)&&(k*=v=e*i[u]*((v=Math.sqrt(v))-r[u])/v,M*=v,p.x-=k*(b=d.weight+p.weight?d.weight/(d.weight+p.weight):.5),p.y-=M*b,d.x+=k*(b=1-b),d.y+=M*b);if((b=e*g)&&(k=s[0]/2,M=s[1]/2,u=-1,b))for(;++u<w;)(f=m[u]).x+=(k-f.x)*b,f.y+=(M-f.y)*b;if(h)for(Lo(n=o.geom.quadtree(m),e,a),u=-1;++u<w;)(f=m[u]).fixed||n.visit(x(f));for(u=-1;++u<w;)(f=m[u]).fixed?(f.x=f.px,f.y=f.py):(f.x-=(f.px-(f.px=f.x))*c,f.y-=(f.py-(f.py=f.y))*c);l.tick({type:"tick",alpha:e})},u.nodes=function(t){return arguments.length?(m=t,u):m},u.links=function(t){return arguments.length?(y=t,u):y},u.size=function(t){return arguments.length?(s=t,u):s},u.linkDistance=function(t){return arguments.length?(f="function"==typeof t?t:+t,u):f},u.distance=u.linkDistance,u.linkStrength=function(t){return arguments.length?(d="function"==typeof t?t:+t,u):d},u.friction=function(t){return arguments.length?(c=+t,u):c},u.charge=function(t){return arguments.length?(h="function"==typeof t?t:+t,u):h},u.chargeDistance=function(t){return arguments.length?(p=t*t,u):Math.sqrt(p)},u.gravity=function(t){return arguments.length?(g=+t,u):g},u.theta=function(t){return arguments.length?(v=t*t,u):Math.sqrt(v)},u.alpha=function(n){return arguments.length?(n=+n,e?n>0?e=n:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:e=0})):n>0&&(l.start({type:"start",alpha:e=n}),t=En(u.tick)),u):e},u.start=function(){var t,n,e,o=m.length,l=y.length,c=s[0],p=s[1];for(t=0;t<o;++t)(e=m[t]).index=t,e.weight=0;for(t=0;t<l;++t)"number"==typeof(e=y[t]).source&&(e.source=m[e.source]),"number"==typeof e.target&&(e.target=m[e.target]),++e.source.weight,++e.target.weight;for(t=0;t<o;++t)e=m[t],isNaN(e.x)&&(e.x=g("x",c)),isNaN(e.y)&&(e.y=g("y",p)),isNaN(e.px)&&(e.px=e.x),isNaN(e.py)&&(e.py=e.y);if(r=[],"function"==typeof f)for(t=0;t<l;++t)r[t]=+f.call(this,y[t],t);else for(t=0;t<l;++t)r[t]=f;if(i=[],"function"==typeof d)for(t=0;t<l;++t)i[t]=+d.call(this,y[t],t);else for(t=0;t<l;++t)i[t]=d;if(a=[],"function"==typeof h)for(t=0;t<o;++t)a[t]=+h.call(this,m[t],t);else for(t=0;t<o;++t)a[t]=h;function g(e,r){if(!n){for(n=new Array(o),s=0;s<o;++s)n[s]=[];for(s=0;s<l;++s){var i=y[s];n[i.source.index].push(i.target),n[i.target.index].push(i.source)}}for(var a,u=n[t],s=-1,c=u.length;++s<c;)if(!isNaN(a=u[s][e]))return a;return Math.random()*r}return u.resume()},u.resume=function(){return u.alpha(.1)},u.stop=function(){return u.alpha(0)},u.drag=function(){if(n||(n=o.behavior.drag().origin(L).on("dragstart.force",No).on("drag.force",b).on("dragend.force",Do)),!arguments.length)return n;this.on("mouseover.force",Fo).on("mouseout.force",Wo).call(n)},o.rebind(u,l,"on")};var To=20,zo=1,Oo=1/0;function Po(t,n){return o.rebind(t,n,"sort","children","value"),t.nodes=t,t.links=jo,t}function Bo(t,n){for(var e=[t];null!=(t=e.pop());)if(n(t),(i=t.children)&&(r=i.length))for(var r,i;--r>=0;)e.push(i[r])}function Io(t,n){for(var e=[t],r=[];null!=(t=e.pop());)if(r.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)e.push(o[a]);for(;null!=(t=r.pop());)n(t)}function Ro(t){return t.children}function Ho(t){return t.value}function Vo(t,n){return n.value-t.value}
1function jo(t){return o.merge(t.map(function(t){return(t.children||[]).map(function(n){return{source:t,target:n}})}))}o.layout.hierarchy=function(){var t=Vo,n=Ro,e=Ho;function r(i){var o,a=[i],u=[];for(i.depth=0;null!=(o=a.pop());)if(u.push(o),(s=n.call(r,o,o.depth))&&(l=s.length)){for(var l,s,c;--l>=0;)a.push(c=s[l]),c.parent=o,c.depth=o.depth+1;e&&(o.value=0),o.children=s}else e&&(o.value=+e.call(r,o,o.depth)||0),delete o.children;return Io(i,function(n){var r,i;t&&(r=n.children)&&r.sort(t),e&&(i=n.parent)&&(i.value+=n.value)}),u}return r.sort=function(n){return arguments.length?(t=n,r):t},r.children=function(t){return arguments.length?(n=t,r):n},r.value=function(t){return arguments.length?(e=t,r):e},r.revalue=function(t){return e&&(Bo(t,function(t){t.children&&(t.value=0)}),Io(t,function(t){var n;t.children||(t.value=+e.call(r,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)})),t},r},o.layout.partition=function(){var t=o.layout.hierarchy(),n=[1,1];function e(t,n,r,i){var o=t.children;if(t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i,o&&(a=o.length)){var a,u,l,s=-1;for(r=t.value?r/t.value:0;++s<a;)e(u=o[s],n,l=u.value*r,i),n+=l}}function r(t){var n=t.children,e=0;if(n&&(i=n.length))for(var i,o=-1;++o<i;)e=Math.max(e,r(n[o]));return 1+e}function i(i,o){var a=t.call(this,i,o);return e(a[0],0,n[0],n[1]/r(a[0])),a}return i.size=function(t){return arguments.length?(n=t,i):n},Po(i,t)},o.layout.pie=function(){var t=Number,n=qo,e=0,r=Nt,i=0;function a(u){var l,s=u.length,c=u.map(function(n,e){return+t.call(a,n,e)}),f=+("function"==typeof e?e.apply(this,arguments):e),d=("function"==typeof r?r.apply(this,arguments):r)-f,h=Math.min(Math.abs(d)/s,+("function"==typeof i?i.apply(this,arguments):i)),p=h*(d<0?-1:1),g=o.sum(c),v=g?(d-s*p)/g:0,m=o.range(s),y=[];return null!=n&&m.sort(n===qo?function(t,n){return c[n]-c[t]}:function(t,e){return n(u[t],u[e])}),m.forEach(function(t){y[t]={data:u[t],value:l=c[t],startAngle:f,endAngle:f+=l*v+p,padAngle:h}}),y}return a.value=function(n){return arguments.length?(t=n,a):t},a.sort=function(t){return arguments.length?(n=t,a):n},a.startAngle=function(t){return arguments.length?(e=t,a):e},a.endAngle=function(t){return arguments.length?(r=t,a):r},a.padAngle=function(t){return arguments.length?(i=t,a):i},a};var qo={};function Yo(t){return t.x}function Xo(t){return t.y}function Go(t,n,e){t.y0=n,t.y=e}o.layout.stack=function(){var t=L,n=$o,e=Ko,r=Go,i=Yo,a=Xo;function u(l,s){if(!(h=l.length))return l;var c=l.map(function(n,e){return t.call(u,n,e)}),f=c.map(function(t){return t.map(function(t,n){return[i.call(u,t,n),a.call(u,t,n)]})}),d=n.call(u,f,s);c=o.permute(c,d),f=o.permute(f,d);var h,p,g,v,m=e.call(u,f,s),y=c[0].length;for(g=0;g<y;++g)for(r.call(u,c[0][g],v=m[g],f[0][g][1]),p=1;p<h;++p)r.call(u,c[p][g],v+=f[p-1][g][1],f[p][g][1]);return l}return u.values=function(n){return arguments.length?(t=n,u):t},u.order=function(t){return arguments.length?(n="function"==typeof t?t:Uo.get(t)||$o,u):n},u.offset=function(t){return arguments.length?(e="function"==typeof t?t:Zo.get(t)||Ko,u):e},u.x=function(t){return arguments.length?(i=t,u):i},u.y=function(t){return arguments.length?(a=t,u):a},u.out=function(t){return arguments.length?(r=t,u):r},u};var Uo=o.map({"inside-out":function(t){var n,e,r=t.length,i=t.map(Qo),a=t.map(Jo),u=o.range(r).sort(function(t,n){return i[t]-i[n]}),l=0,s=0,c=[],f=[];for(n=0;n<r;++n)e=u[n],l<s?(l+=a[e],c.push(e)):(s+=a[e],f.push(e));return f.reverse().concat(c)},reverse:function(t){return o.range(t.length).reverse()},default:$o}),Zo=o.map({silhouette:function(t){var n,e,r,i=t.length,o=t[0].length,a=[],u=0,l=[];for(e=0;e<o;++e){for(n=0,r=0;n<i;n++)r+=t[n][e][1];r>u&&(u=r),a.push(r)}for(e=0;e<o;++e)l[e]=(u-a[e])/2;return l},wiggle:function(t){var n,e,r,i,o,a,u,l,s,c=t.length,f=t[0],d=f.length,h=[];for(h[0]=l=s=0,e=1;e<d;++e){for(n=0,i=0;n<c;++n)i+=t[n][e][1];for(n=0,o=0,u=f[e][0]-f[e-1][0];n<c;++n){for(r=0,a=(t[n][e][1]-t[n][e-1][1])/(2*u);r<n;++r)a+=(t[r][e][1]-t[r][e-1][1])/u;o+=a*t[n][e][1]}h[e]=l-=i?o/i*u:0,l<s&&(s=l)}for(e=0;e<d;++e)h[e]-=s;return h},expand:function(t){var n,e,r,i=t.length,o=t[0].length,a=1/i,u=[];for(e=0;e<o;++e){for(n=0,r=0;n<i;n++)r+=t[n][e][1];if(r)for(n=0;n<i;n++)t[n][e][1]/=r;else for(n=0;n<i;n++)t[n][e][1]=a}for(e=0;e<o;++e)u[e]=0;return u},zero:Ko});function $o(t){return o.range(t.length)}function Ko(t){for(var n=-1,e=t[0].length,r=[];++n<e;)r[n]=0;return r}function Qo(t){for(var n,e=1,r=0,i=t[0][1],o=t.length;e<o;++e)(n=t[e][1])>i&&(r=e,i=n);return r}function Jo(t){return t.reduce(ta,0)}function ta(t,n){return t+n[1]}function na(t,n){return ea(t,Math.ceil(Math.log(n.length)/Math.LN2+1))}function ea(t,n){for(var e=-1,r=+t[0],i=(t[1]-r)/n,o=[];++e<=n;)o[e]=i*e+r;return o}function ra(t){return[o.min(t),o.max(t)]}function ia(t,n){return t.value-n.value}
1function oa(t,n){var e=t._pack_next;t._pack_next=n,n._pack_prev=t,n._pack_next=e,e._pack_prev=n}function aa(t,n){t._pack_next=n,n._pack_prev=t}function ua(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return.999*i*i>e*e+r*r}function la(t){if((n=t.children)&&(l=n.length)){var n,e,r,i,o,a,u,l,s=1/0,c=-1/0,f=1/0,d=-1/0;if(n.forEach(sa),(e=n[0]).x=-e.r,e.y=0,x(e),l>1&&((r=n[1]).x=r.r,r.y=0,x(r),l>2))for(da(e,r,i=n[2]),x(i),oa(e,i),e._pack_prev=i,oa(i,r),r=e._pack_next,o=3;o<l;o++){da(e,r,i=n[o]);var h=0,p=1,g=1;for(a=r._pack_next;a!==r;a=a._pack_next,p++)if(ua(a,i)){h=1;break}if(1==h)for(u=e._pack_prev;u!==a._pack_prev&&!ua(u,i);u=u._pack_prev,g++);h?(p<g||p==g&&r.r<e.r?aa(e,r=a):aa(e=u,r),o--):(oa(e,i),r=i,x(i))}var v=(s+c)/2,m=(f+d)/2,y=0;for(o=0;o<l;o++)(i=n[o]).x-=v,i.y-=m,y=Math.max(y,i.r+Math.sqrt(i.x*i.x+i.y*i.y));t.r=y,n.forEach(ca)}function x(t){s=Math.min(t.x-t.r,s),c=Math.max(t.x+t.r,c),f=Math.min(t.y-t.r,f),d=Math.max(t.y+t.r,d)}}function sa(t){t._pack_next=t._pack_prev=t}function ca(t){delete t._pack_next,delete t._pack_prev}function fa(t,n,e,r){var i=t.children;if(t.x=n+=r*t.x,t.y=e+=r*t.y,t.r*=r,i)for(var o=-1,a=i.length;++o<a;)fa(i[o],n,e,r)}function da(t,n,e){var r=t.r+e.r,i=n.x-t.x,o=n.y-t.y;if(r&&(i||o)){var a=n.r+e.r,u=i*i+o*o,l=.5+((r*=r)-(a*=a))/(2*u),s=Math.sqrt(Math.max(0,2*a*(r+u)-(r-=u)*r-a*a))/(2*u);e.x=t.x+l*i+s*o,e.y=t.y+l*o-s*i}else e.x=t.x+r,e.y=t.y}function ha(t,n){return t.parent==n.parent?1:2}function pa(t){var n=t.children;return n.length?n[0]:t.t}function ga(t){var n,e=t.children;return(n=e.length)?e[n-1]:t.t}function va(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function ma(t,n,e){return t.a.parent===n.parent?t.a:e}function ya(t){var n=t.children;return n&&n.length?ya(n[0]):t}function xa(t){var n,e=t.children;return e&&(n=e.length)?xa(e[n-1]):t}function ba(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function ka(t,n){var e=t.x+n[3],r=t.y+n[0],i=t.dx-n[1]-n[3],o=t.dy-n[0]-n[2];return i<0&&(e+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:e,y:r,dx:i,dy:o}}function Ma(t){var n=t[0],e=t[t.length-1];return n<e?[n,e]:[e,n]}function wa(t){return t.rangeExtent?t.rangeExtent():Ma(t.range())}function Aa(t,n,e,r){var i=e(t[0],t[1]),o=r(n[0],n[1]);return function(t){return o(i(t))}}function _a(t,n){var e,r=0,i=t.length-1,o=t[r],a=t[i];return a<o&&(e=r,r=i,i=e,e=o,o=a,a=e),t[r]=n.floor(o),t[i]=n.ceil(a),t}function Ca(t){return t?{floor:function(n){return Math.floor(n/t)*t},ceil:function(n){return Math.ceil(n/t)*t}}:Sa}o.layout.histogram=function(){var t=!0,n=Number,e=ra,r=na;function i(i,a){for(var u,l,s=[],c=i.map(n,this),f=e.call(this,c,a),d=r.call(this,f,c,a),h=(a=-1,c.length),p=d.length-1,g=t?1:1/h;++a<p;)(u=s[a]=[]).dx=d[a+1]-(u.x=d[a]),u.y=0;if(p>0)for(a=-1;++a<h;)(l=c[a])>=f[0]&&l<=f[1]&&((u=s[o.bisect(d,l,1,p)-1]).y+=g,u.push(i[a]));return s}return i.value=function(t){return arguments.length?(n=t,i):n},i.range=function(t){return arguments.length?(e=bn(t),i):e},i.bins=function(t){return arguments.length?(r="number"==typeof t?function(n){return ea(n,t)}:bn(t),i):r},i.frequency=function(n){return arguments.length?(t=!!n,i):t},i},o.layout.pack=function(){var t,n=o.layout.hierarchy().sort(ia),e=0,r=[1,1];function i(i,o){var a=n.call(this,i,o),u=a[0],l=r[0],s=r[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(u.x=u.y=0,Io(u,function(t){t.r=+c(t.value)}),Io(u,la),e){var f=e*(t?1:Math.max(2*u.r/l,2*u.r/s))/2;Io(u,function(t){t.r+=f}),Io(u,la),Io(u,function(t){t.r-=f})}return fa(u,l/2,s/2,t?1:1/Math.max(2*u.r/l,2*u.r/s)),a}return i.size=function(t){return arguments.length?(r=t,i):r},i.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,i):t},i.padding=function(t){return arguments.length?(e=+t,i):e},Po(i,n)},o.layout.tree=function(){var t=o.layout.hierarchy().sort(null).value(null),n=ha,e=[1,1],r=null;function i(i,o){var s=t.call(this,i,o),c=s[0],f=function(t){var n,e={A:null,children:[t]},r=[e];for(;null!=(n=r.pop());)for(var i,o=n.children,a=0,u=o.length;a<u;++a)r.push((o[a]=i={_:o[a],parent:n,children:(i=o[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return e.children[0]}(c);if(Io(f,a),f.parent.m=-f.z,Bo(f,u),r)Bo(c,l);else{var d=c,h=c,p=c;Bo(c,function(t){t.x<d.x&&(d=t),t.x>h.x&&(h=t),t.depth>p.depth&&(p=t)});var g=n(d,h)/2-d.x,v=e[0]/(h.x+n(h,d)/2+g),m=e[1]/(p.depth||1);Bo(c,function(t){t.x=(t.x+g)*v,t.y=t.depth*m})}return s}function a(t){var e=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(e.length){!function(t){var n,e=0,r=0,i=t.children,o=i.length;for(;--o>=0;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(t);var o=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+n(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+n(t._,i._));t.parent.A=function(t,e,r){if(e){for(var i,o=t,a=t,u=e,l=o.parent.children[0],s=o.m,c=a.m,f=u.m,d=l.m;u=ga(u),o=pa(o),u&&o;)l=pa(l),(a=ga(a)).a=t,(i=u.z+f-o.z-s+n(u._,o._))>0&&(va(ma(u,t,r),t,i),s+=i,c+=i),f+=u.m,s+=o.m,d+=l.m,c+=a.m;u&&!ga(a)&&(a.t=u,a.m+=f-c),o&&!pa(l)&&(l.t=o,l.m+=s-d,r=t)}return r}(t,i,t.parent.A||r[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=e[0],t.y=t.depth*e[1]}return i.separation=function(t){return arguments.length?(n=t,i):n},i.size=function(t){return arguments.length?(r=null==(e=t)?l:null,i):r?null:e},i.nodeSize=function(t){return arguments.length?(r=null==(e=t)?null:l,i):r?e:null},Po(i,t)}
vendor: 9,375 bytes, line 1
1,o.layout.cluster=function(){var t=o.layout.hierarchy().sort(null).value(null),n=ha,e=[1,1],r=!1;function i(i,a){var u,l=t.call(this,i,a),s=l[0],c=0;Io(s,function(t){var e=t.children;e&&e.length?(t.x=function(t){return t.reduce(function(t,n){return t+n.x},0)/t.length}(e),t.y=function(t){return 1+o.max(t,function(t){return t.y})}(e)):(t.x=u?c+=n(t,u):0,t.y=0,u=t)});var f=ya(s),d=xa(s),h=f.x-n(f,d)/2,p=d.x+n(d,f)/2;return Io(s,r?function(t){t.x=(t.x-s.x)*e[0],t.y=(s.y-t.y)*e[1]}:function(t){t.x=(t.x-h)/(p-h)*e[0],t.y=(1-(s.y?t.y/s.y:1))*e[1]}),l}return i.separation=function(t){return arguments.length?(n=t,i):n},i.size=function(t){return arguments.length?(r=null==(e=t),i):r?null:e},i.nodeSize=function(t){return arguments.length?(r=null!=(e=t),i):r?e:null},Po(i,t)},o.layout.treemap=function(){var t,n=o.layout.hierarchy(),e=Math.round,r=[1,1],i=null,a=ba,u=!1,l="squarify",s=.5*(1+Math.sqrt(5));function c(t,n){for(var e,r,i=-1,o=t.length;++i<o;)r=(e=t[i]).value*(n<0?0:n),e.area=isNaN(r)||r<=0?0:r}function f(t){var n=t.children;if(n&&n.length){var e,r,i,o=a(t),u=[],s=n.slice(),d=1/0,g="slice"===l?o.dx:"dice"===l?o.dy:"slice-dice"===l?1&t.depth?o.dy:o.dx:Math.min(o.dx,o.dy);for(c(s,o.dx*o.dy/t.value),u.area=0;(i=s.length)>0;)u.push(e=s[i-1]),u.area+=e.area,"squarify"!==l||(r=h(u,g))<=d?(s.pop(),d=r):(u.area-=u.pop().area,p(u,g,o,!1),g=Math.min(o.dx,o.dy),u.length=u.area=0,d=1/0);u.length&&(p(u,g,o,!0),u.length=u.area=0),n.forEach(f)}}function d(t){var n=t.children;if(n&&n.length){var e,r=a(t),i=n.slice(),o=[];for(c(i,r.dx*r.dy/t.value),o.area=0;e=i.pop();)o.push(e),o.area+=e.area,null!=e.z&&(p(o,e.z?r.dx:r.dy,r,!i.length),o.length=o.area=0);n.forEach(d)}}function h(t,n){for(var e,r=t.area,i=0,o=1/0,a=-1,u=t.length;++a<u;)(e=t[a].area)&&(e<o&&(o=e),e>i&&(i=e));return n*=n,(r*=r)?Math.max(n*i*s/r,r/(n*o*s)):1/0}function p(t,n,r,i){var o,a=-1,u=t.length,l=r.x,s=r.y,c=n?e(t.area/n):0;if(n==r.dx){for((i||c>r.dy)&&(c=r.dy);++a<u;)(o=t[a]).x=l,o.y=s,o.dy=c,l+=o.dx=Math.min(r.x+r.dx-l,c?e(o.area/c):0);o.z=!0,o.dx+=r.x+r.dx-l,r.y+=c,r.dy-=c}else{for((i||c>r.dx)&&(c=r.dx);++a<u;)(o=t[a]).x=l,o.y=s,o.dx=c,s+=o.dy=Math.min(r.y+r.dy-s,c?e(o.area/c):0);o.z=!1,o.dy+=r.y+r.dy-s,r.x+=c,r.dx-=c}}function g(e){var i=t||n(e),o=i[0];return o.x=o.y=0,o.value?(o.dx=r[0],o.dy=r[1]):o.dx=o.dy=0,t&&n.revalue(o),c([o],o.dx*o.dy/o.value),(t?d:f)(o),u&&(t=i),i}return g.size=function(t){return arguments.length?(r=t,g):r},g.padding=function(t){if(!arguments.length)return i;function n(n){return ka(n,t)}var e;return a=null==(i=t)?ba:"function"==(e=typeof t)?function(n){var e=t.call(g,n,n.depth);return null==e?ba(n):ka(n,"number"==typeof e?[e,e,e,e]:e)}:"number"===e?(t=[t,t,t,t],n):n,g},g.round=function(t){return arguments.length?(e=t?Math.round:Number,g):e!=Number},g.sticky=function(n){return arguments.length?(u=n,t=null,g):u},g.ratio=function(t){return arguments.length?(s=t,g):s},g.mode=function(t){return arguments.length?(l=t+"",g):l},Po(g,n)},o.random={normal:function(t,n){var e=arguments.length;return e<2&&(n=1),e<1&&(t=0),function(){var e,r,i;do{i=(e=2*Math.random()-1)*e+(r=2*Math.random()-1)*r}while(!i||i>1);return t+n*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=o.random.normal.apply(o,arguments);return function(){return Math.exp(t())}},bates:function(t){var n=o.random.irwinHall(t);return function(){return n()/t}},irwinHall:function(t){return function(){for(var n=0,e=0;e<t;e++)n+=Math.random();return n}}},o.scale={};var Sa={floor:L,ceil:L};function Ea(t,n,e,r){var i=[],a=[],u=0,l=Math.min(t.length,n.length)-1;for(t[l]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<=l;)i.push(e(t[u-1],t[u])),a.push(r(n[u-1],n[u]));return function(n){var e=o.bisect(t,n,1,l)-1;return a[e](i[e](n))}}function Na(t,n,e,r){var i,o;function a(){var a=Math.min(t.length,n.length)>2?Ea:Aa,l=r?Co:_o;return i=a(t,n,l,e),o=a(n,t,l,ro),u}function u(t){return i(t)}return u.invert=function(t){return o(t)},u.domain=function(n){return arguments.length?(t=n.map(Number),a()):t},u.range=function(t){return arguments.length?(n=t,a()):n},u.rangeRound=function(t){return u.range(t).interpolate(yo)},u.clamp=function(t){return arguments.length?(r=t,a()):r},u.interpolate=function(t){return arguments.length?(e=t,a()):e},u.ticks=function(n){return La(t,n)},u.tickFormat=function(n,e){return Ta(t,n,e)},u.nice=function(n){return Fa(t,n),a()},u.copy=function(){return Na(t,n,e,r)},a()}function Da(t,n){return o.rebind(t,n,"range","rangeRound","interpolate","clamp")}function Fa(t,n){return _a(t,Ca(Wa(t,n)[2])),_a(t,Ca(Wa(t,n)[2])),t}function Wa(t,n){null==n&&(n=10);var e=Ma(t),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/n)/Math.LN10)),o=n/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function La(t,n){return o.range.apply(o,Wa(t,n))}function Ta(t,n,e){var r=Wa(t,n);if(e){var i=zn.exec(e);if(i.shift(),"s"===i[8]){var a=o.formatPrefix(Math.max(M(r[0]),M(r[1])));return i[7]||(i[7]="."+Oa(a.scale(r[2]))),i[8]="f",e=o.format(i.join("")),function(t){return e(a.scale(t))+a.symbol}}i[7]||(i[7]="."+function(t,n){var e=Oa(n[2]);return t in za?Math.abs(e-Oa(Math.max(M(n[0]),M(n[1]))))+ +("e"!==t):e-2*("%"===t)}(i[8],r)),e=i.join("")}else e=",."+Oa(r[2])+"f";return o.format(e)}o.scale.linear=function(){return Na([0,1],[0,1],ro,!1)};var za={s:1,g:1,p:1,r:1,e:1};function Oa(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function Pa(t,n,e,r){function i(t){return(e?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function a(t){return e?Math.pow(n,t):-Math.pow(n,-t)}function u(n){return t(i(n))}return u.invert=function(n){return a(t.invert(n))},u.domain=function(n){return arguments.length?(e=n[0]>=0,t.domain((r=n.map(Number)).map(i)),u):r},u.base=function(e){return arguments.length?(n=+e,t.domain(r.map(i)),u):n},u.nice=function(){var n=_a(r.map(i),e?Math:Ia);return t.domain(n),r=n.map(a),u},u.ticks=function(){var t=Ma(r),o=[],u=t[0],l=t[1],s=Math.floor(i(u)),c=Math.ceil(i(l)),f=n%1?2:n;if(isFinite(c-s)){if(e){for(;s<c;s++)for(var d=1;d<f;d++)o.push(a(s)*d);o.push(a(s))}else for(o.push(a(s));s++<c;)for(d=f-1;d>0;d--)o.push(a(s)*d);for(s=0;o[s]<u;s++);for(c=o.length;o[c-1]>l;c--);o=o.slice(s,c)}return o},u.tickFormat=function(t,e){if(!arguments.length)return Ba;arguments.length<2?e=Ba:"function"!=typeof e&&(e=o.format(e));var r=Math.max(1,n*t/u.ticks().length);return function(t){var o=t/a(Math.round(i(t)));return o*n<n-.5&&(o*=n),o<=r?e(t):""}},u.copy=function(){return Pa(t.copy(),n,e,r)},Da(u,t)}o.scale.log=function(){return Pa(o.scale.linear().domain([0,1]),10,!0,[1,10])};var Ba=o.format(".0e"),Ia={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function Ra(t,n,e){var r=Ha(n),i=Ha(1/n);function o(n){return t(r(n))}return o.invert=function(n){return i(t.invert(n))},o.domain=function(n){return arguments.length?(t.domain((e=n.map(Number)).map(r)),o):e},o.ticks=function(t){return La(e,t)},o.tickFormat=function(t,n){return Ta(e,t,n)},o.nice=function(t){return o.domain(Fa(e,t))},o.exponent=function(a){return arguments.length?(r=Ha(n=a),i=Ha(1/n),t.domain(e.map(r)),o):n},o.copy=function(){return Ra(t.copy(),n,e)},Da(o,t)}function Ha(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function Va(t,n){var e,r,i;function a(i){return r[((e.get(i)||("range"===n.t?e.set(i,t.push(i)):NaN))-1)%r.length]}function u(n,e){return o.range(t.length).map(function(t){return n+e*t})}return a.domain=function(r){if(!arguments.length)return t;t=[],e=new A;for(var i,o=-1,u=r.length;++o<u;)e.has(i=r[o])||e.set(i,t.push(i));return a[n.t].apply(a,n.a)},a.range=function(t){return arguments.length?(r=t,i=0,n={t:"range",a:arguments},a):r},a.rangePoints=function(e,o){arguments.length<2&&(o=0);var l=e[0],s=e[1],c=t.length<2?(l=(l+s)/2,0):(s-l)/(t.length-1+o);return r=u(l+c*o/2,c),i=0,n={t:"rangePoints",a:arguments},a},a.rangeRoundPoints=function(e,o){arguments.length<2&&(o=0);var l=e[0],s=e[1],c=t.length<2?(l=s=Math.round((l+s)/2),0):(s-l)/(t.length-1+o)|0;return r=u(l+Math.round(c*o/2+(s-l-(t.length-1+o)*c)/2),c),i=0,n={t:"rangeRoundPoints",a:arguments},a},a.rangeBands=function(e,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var s=e[1]<e[0],c=e[s-0],f=(e[1-s]-c)/(t.length-o+2*l);return r=u(c+f*l,f),s&&r.reverse(),i=f*(1-o),n={t:"rangeBands",a:arguments},a},a.rangeRoundBands=function(e,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var s=e[1]<e[0],c=e[s-0],f=e[1-s],d=Math.floor((f-c)/(t.length-o+2*l));return r=u(c+Math.round((f-c-(t.length-o)*d)/2),d),s&&r.reverse(),i=Math.round(d*(1-o)),n={t:"rangeRoundBands",a:arguments},a},a.rangeBand=function(){return i},a.rangeExtent=function(){return Ma(n.a[0])},a.copy=function(){return Va(t,n)},a.domain(t)}o.scale.pow=function(){return Ra(o.scale.linear(),1,[0,1])},o.scale.sqrt=function(){return o.scale.pow().exponent(.5)},o.scale.ordinal=function(){return Va([],{t:"range",a:[[]]})},o.scale.category10=function(){return o.scale.ordinal().range(ja)},o.scale.category20=function(){return o.scale.ordinal().range(qa)},o.scale.category20b=function(){return o.scale.ordinal().range(Ya)},o.scale.category20c=function(){return o.scale.ordinal().range(Xa)};var ja=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(fn),qa=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9
1197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(fn),Ya=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(fn),Xa=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(fn);function Ga(t,n){var e;function r(){var r=0,a=n.length;for(e=[];++r<a;)e[r-1]=o.quantile(t,r/a);return i}function i(t){if(!isNaN(t=+t))return n[o.bisect(e,t)]}return i.domain=function(n){return arguments.length?(t=n.map(m).filter(y).sort(v),r()):t},i.range=function(t){return arguments.length?(n=t,r()):n},i.quantiles=function(){return e},i.invertExtent=function(r){return(r=n.indexOf(r))<0?[NaN,NaN]:[r>0?e[r-1]:t[0],r<e.length?e[r]:t[t.length-1]]},i.copy=function(){return Ga(t,n)},r()}function Ua(t,n,e){var r,i;function o(n){return e[Math.max(0,Math.min(i,Math.floor(r*(n-t))))]}function a(){return r=e.length/(n-t),i=e.length-1,o}return o.domain=function(e){return arguments.length?(t=+e[0],n=+e[e.length-1],a()):[t,n]},o.range=function(t){return arguments.length?(e=t,a()):e},o.invertExtent=function(n){return[n=(n=e.indexOf(n))<0?NaN:n/r+t,n+1/r]},o.copy=function(){return Ua(t,n,e)},a()}function Za(t,n){function e(e){if(e<=e)return n[o.bisect(t,e)]}return e.domain=function(n){return arguments.length?(t=n,e):t},e.range=function(t){return arguments.length?(n=t,e):n},e.invertExtent=function(e){return e=n.indexOf(e),[t[e-1],t[e]]},e.copy=function(){return Za(t,n)},e}function $a(t){function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=e.map(n),n):t},n.ticks=function(n){return La(t,n)},n.tickFormat=function(n,e){return Ta(t,n,e)},n.copy=function(){return $a(t)},n}function Ka(){return 0}o.scale.quantile=function(){return Ga([],[])}
vendor: 4,446 bytes, line 1
1,o.scale.quantize=function(){return Ua(0,1,[0,1])},o.scale.threshold=function(){return Za([.5],[0,1])},o.scale.identity=function(){return $a([0,1])},o.svg={},o.svg.arc=function(){var t=Ja,n=tu,e=Ka,r=Qa,i=nu,o=eu,a=ru;function u(){var u=Math.max(0,+t.apply(this,arguments)),s=Math.max(0,+n.apply(this,arguments)),c=i.apply(this,arguments)-Ft,f=o.apply(this,arguments)-Ft,d=Math.abs(f-c),h=c>f?0:1;if(s<u&&(p=s,s=u,u=p),d>=Dt)return l(s,h)+(u?l(u,1-h):"")+"Z";var p,g,v,m,y,x,b,k,M,w,A,_,C=0,S=0,E=[];if((m=(+a.apply(this,arguments)||0)/2)&&(v=r===Qa?Math.sqrt(u*u+s*s):+r.apply(this,arguments),h||(S*=-1),s&&(S=Pt(v/s*Math.sin(m))),u&&(C=Pt(v/u*Math.sin(m)))),s){y=s*Math.cos(c+S),x=s*Math.sin(c+S),b=s*Math.cos(f-S),k=s*Math.sin(f-S);var N=Math.abs(f-c-2*S)<=Et?0:1;if(S&&iu(y,x,b,k)===h^N){var D=(c+f)/2;y=s*Math.cos(D),x=s*Math.sin(D),b=k=null}}else y=x=0;if(u){M=u*Math.cos(f-C),w=u*Math.sin(f-C),A=u*Math.cos(c+C),_=u*Math.sin(c+C);var F=Math.abs(c-f+2*C)<=Et?0:1;if(C&&iu(M,w,A,_)===1-h^F){var W=(c+f)/2;M=u*Math.cos(W),w=u*Math.sin(W),A=_=null}}else M=w=0;if(d>Ct&&(p=Math.min(Math.abs(s-u)/2,+e.apply(this,arguments)))>.001){g=u<s^h?0:1;var L=p,T=p;if(d<Et){var z=null==A?[M,w]:null==b?[y,x]:di([y,x],[A,_],[b,k],[M,w]),O=y-z[0],P=x-z[1],B=b-z[0],I=k-z[1],R=1/Math.sin(Math.acos((O*B+P*I)/(Math.sqrt(O*O+P*P)*Math.sqrt(B*B+I*I)))/2),H=Math.sqrt(z[0]*z[0]+z[1]*z[1]);T=Math.min(p,(u-H)/(R-1)),L=Math.min(p,(s-H)/(R+1))}if(null!=b){var V=ou(null==A?[M,w]:[A,_],[y,x],s,L,h),j=ou([b,k],[M,w],s,L,h);p===L?E.push("M",V[0],"A",L,",",L," 0 0,",g," ",V[1],"A",s,",",s," 0 ",1-h^iu(V[1][0],V[1][1],j[1][0],j[1][1]),",",h," ",j[1],"A",L,",",L," 0 0,",g," ",j[0]):E.push("M",V[0],"A",L,",",L," 0 1,",g," ",j[0])}else E.push("M",y,",",x);if(null!=A){var q=ou([y,x],[A,_],u,-T,h),Y=ou([M,w],null==b?[y,x]:[b,k],u,-T,h);p===T?E.push("L",Y[0],"A",T,",",T," 0 0,",g," ",Y[1],"A",u,",",u," 0 ",h^iu(Y[1][0],Y[1][1],q[1][0],q[1][1]),",",1-h," ",q[1],"A",T,",",T," 0 0,",g," ",q[0]):E.push("L",Y[0],"A",T,",",T," 0 0,",g," ",q[0])}else E.push("L",M,",",w)}else E.push("M",y,",",x),null!=b&&E.push("A",s,",",s," 0 ",N,",",h," ",b,",",k),E.push("L",M,",",w),null!=A&&E.push("A",u,",",u," 0 ",F,",",1-h," ",A,",",_);return E.push("Z"),E.join("")}function l(t,n){return"M0,"+t+"A"+t+","+t+" 0 1,"+n+" 0,"+-t+"A"+t+","+t+" 0 1,"+n+" 0,"+t}return u.innerRadius=function(n){return arguments.length?(t=bn(n),u):t},u.outerRadius=function(t){return arguments.length?(n=bn(t),u):n},u.cornerRadius=function(t){return arguments.length?(e=bn(t),u):e},u.padRadius=function(t){return arguments.length?(r=t==Qa?Qa:bn(t),u):r},u.startAngle=function(t){return arguments.length?(i=bn(t),u):i},u.endAngle=function(t){return arguments.length?(o=bn(t),u):o},u.padAngle=function(t){return arguments.length?(a=bn(t),u):a},u.centroid=function(){var e=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Ft;return[Math.cos(r)*e,Math.sin(r)*e]},u};var Qa="auto";function Ja(t){return t.innerRadius}function tu(t){return t.outerRadius}function nu(t){return t.startAngle}function eu(t){return t.endAngle}function ru(t){return t&&t.padAngle}function iu(t,n,e,r){return(t-e)*n-(n-r)*t>0?0:1}function ou(t,n,e,r,i){var o=t[0]-n[0],a=t[1]-n[1],u=(i?r:-r)/Math.sqrt(o*o+a*a),l=u*a,s=-u*o,c=t[0]+l,f=t[1]+s,d=n[0]+l,h=n[1]+s,p=(c+d)/2,g=(f+h)/2,v=d-c,m=h-f,y=v*v+m*m,x=e-r,b=c*h-d*f,k=(m<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),M=(b*m-v*k)/y,w=(-b*v-m*k)/y,A=(b*m+v*k)/y,_=(-b*v+m*k)/y,C=M-p,S=w-g,E=A-p,N=_-g;return C*C+S*S>E*E+N*N&&(M=A,w=_),[[M-l,w-s],[M*e/x,w*e/x]]}function au(t){var n=ai,e=ui,r=Qe,i=lu,o=i.key,a=.7;function u(o){var u,l=[],s=[],c=-1,f=o.length,d=bn(n),h=bn(e);function p(){l.push("M",i(t(s),a))}for(;++c<f;)r.call(this,u=o[c],c)?s.push([+d.call(this,u,c),+h.call(this,u,c)]):s.length&&(p(),s=[]);return s.length&&p(),l.length?l.join(""):null}return u.x=function(t){return arguments.length?(n=t,u):n},u.y=function(t){return arguments.length?(e=t,u):e},u.defined=function(t){return arguments.length?(r=t,u):r},u.interpolate=function(t){return arguments.length?(o="function"==typeof t?i=t:(i=uu.get(t)||lu).key,u):o},u.tension=function(t){return arguments.length?(a=t,u):a},u}o.svg.line=function(){return au(L)};var uu=o.map({linear:lu,"linear-closed":su,step:function(t){var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];for(;++n<e;)i.push("H",(r[0]+(r=t[n])[0])/2,"V",r[1]);e>1&&i.push("H",r[0]);return i.join("")}
1,"step-before":cu,"step-after":fu,basis:pu,"basis-open":function(t){if(t.length<4)return lu(t);var n,e=[],r=-1,i=t.length,o=[0],a=[0];for(;++r<3;)n=t[r],o.push(n[0]),a.push(n[1]);e.push(gu(yu,o)+","+gu(yu,a)),--r;for(;++r<i;)n=t[r],o.shift(),o.push(n[0]),a.shift(),a.push(n[1]),xu(e,o,a);return e.join("")},"basis-closed":function(t){var n,e,r=-1,i=t.length,o=i+4,a=[],u=[];for(;++r<4;)e=t[r%i],a.push(e[0]),u.push(e[1]);n=[gu(yu,a),",",gu(yu,u)],--r;for(;++r<o;)e=t[r%i],a.shift(),a.push(e[0]),u.shift(),u.push(e[1]),xu(n,a,u);return n.join("")},bundle:function(t,n){var e=t.length-1;if(e)for(var r,i,o=t[0][0],a=t[0][1],u=t[e][0]-o,l=t[e][1]-a,s=-1;++s<=e;)i=s/e,(r=t[s])[0]=n*r[0]+(1-n)*(o+i*u),r[1]=n*r[1]+(1-n)*(a+i*l);return pu(t)},cardinal:function(t,n){return t.length<3?lu(t):t[0]+du(t,hu(t,n))},"cardinal-open":function(t,n){return t.length<4?lu(t):t[1]+du(t.slice(1,-1),hu(t,n))},"cardinal-closed":function(t,n){return t.length<3?su(t):t[0]+du((t.push(t[0]),t),hu([t[t.length-2]].concat(t,[t[1]]),n))},monotone:function(t){return t.length<3?lu(t):t[0]+du(t,function(t){var n,e,r,i,o=[],a=function(t){var n=0,e=t.length-1,r=[],i=t[0],o=t[1],a=r[0]=bu(i,o);for(;++n<e;)r[n]=(a+(a=bu(i=o,o=t[n+1])))/2;return r[n]=a,r}(t),u=-1,l=t.length-1;for(;++u<l;)n=bu(t[u],t[u+1]),M(n)<Ct?a[u]=a[u+1]=0:(i=(e=a[u]/n)*e+(r=a[u+1]/n)*r)>9&&(i=3*n/Math.sqrt(i),a[u]=i*e,a[u+1]=i*r);u=-1;for(;++u<=l;)i=(t[Math.min(l,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+a[u]*a[u])),o.push([i||0,a[u]*i||0]);return o}(t))}});function lu(t){return t.length>1?t.join("L"):t+"Z"}function su(t){return t.join("L")+"Z"}function cu(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];++n<e;)i.push("V",(r=t[n])[1],"H",r[0]);return i.join("")}function fu(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];++n<e;)i.push("H",(r=t[n])[0],"V",r[1]);return i.join("")}function du(t,n){if(n.length<1||t.length!=n.length&&t.length!=n.length+2)return lu(t);var e=t.length!=n.length,r="",i=t[0],o=t[1],a=n[0],u=a,l=1;if(e&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=t[1],l=2),n.length>1){u=n[1],o=t[l],l++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-u[0])+","+(o[1]-u[1])+","+o[0]+","+o[1];for(var s=2;s<n.length;s++,l++)o=t[l],u=n[s],r+="S"+(o[0]-u[0])+","+(o[1]-u[1])+","+o[0]+","+o[1]}if(e){var c=t[l];r+="Q"+(o[0]+2*u[0]/3)+","+(o[1]+2*u[1]/3)+","+c[0]+","+c[1]}return r}function hu(t,n){for(var e,r=[],i=(1-n)/2,o=t[0],a=t[1],u=1,l=t.length;++u<l;)e=o,o=a,a=t[u],r.push([i*(a[0]-e[0]),i*(a[1]-e[1])]);return r}function pu(t){if(t.length<3)return lu(t);var n=1,e=t.length,r=t[0],i=r[0],o=r[1],a=[i,i,i,(r=t[1])[0]],u=[o,o,o,r[1]],l=[i,",",o,"L",gu(yu,a),",",gu(yu,u)];for(t.push(t[e-1]);++n<=e;)r=t[n],a.shift(),a.push(r[0]),u.shift(),u.push(r[1]),xu(l,a,u);return t.pop(),l.push("L",r),l.join("")}function gu(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}uu.forEach(function(t,n){n.key=t,n.closed=/-closed$/.test(t)});var vu=[0,2/3,1/3,0],mu=[0,1/3,2/3,0],yu=[0,1/6,2/3,1/6];function xu(t,n,e){t.push("C",gu(vu,n),",",gu(vu,e),",",gu(mu,n),",",gu(mu,e),",",gu(yu,n),",",gu(yu,e))}function bu(t,n){return(n[1]-t[1])/(n[0]-t[0])}function ku(t){for(var n,e,r,i=-1,o=t.length;++i<o;)e=(n=t[i])[0],r=n[1]-Ft,n[0]=e*Math.cos(r),n[1]=e*Math.sin(r);return t}function Mu(t){var n=ai,e=ai,r=0,i=ui,o=Qe,a=lu,u=a.key,l=a,s="L",c=.7;function f(u){var f,d,h,p=[],g=[],v=[],m=-1,y=u.length,x=bn(n),b=bn(r),k=n===e?function(){return d}:bn(e),M=r===i?function(){return h}:bn(i);function w(){p.push("M",a(t(v),c),s,l(t(g.reverse()),c),"Z")}for(;++m<y;)o.call(this,f=u[m],m)?(g.push([d=+x.call(this,f,m),h=+b.call(this,f,m)]),v.push([+k.call(this,f,m),+M.call(this,f,m)])):g.length&&(w(),g=[],v=[]);return g.length&&w(),p.length?p.join(""):null}return f.x=function(t){return arguments.length?(n=e=t,f):e},f.x0=function(t){return arguments.length?(n=t,f):n},f.x1=function(t){return arguments.length?(e=t,f):e},f.y=function(t){return arguments.length?(r=i=t,f):i},f.y0=function(t){return arguments.length?(r=t,f):r},f.y1=function(t){return arguments.length?(i=t,f):i},f.defined=function(t){return arguments.length?(o=t,f):o},f.interpolate=function(t){return arguments.length?(u="function"==typeof t?a=t:(a=uu.get(t)||lu).key,l=a.reverse||a,s=a.closed?"M":"L",f):u},f.tension=function(t){return arguments.length?(c=t,f):c},f}function wu(t){return t.radius}function Au(t){return[t.x,t.y]}function _u(){return 64}function Cu(){return"circle"}function Su(t){var n=Math.sqrt(t/Et);return"M0,"+n+"A"+n+","+n+" 0 1,1 0,"+-n+"A"+n+","+n+" 0 1,1 0,"+n+"Z"}o.svg.line.radial=function(){var t=au(ku);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},cu.reverse=fu,fu.reverse=cu,o.svg.area=function(){return Mu(L)},o.svg.area.radial=function(){var t=Mu(ku);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},o.svg.chord=function(){var t=Xr,n=Gr,e=wu,r=nu,i=eu;function o(e,r){var i,o,s=a(this,t,e,r),c=a(this,n,e,r);return"M"+s.p0+u(s.r,s.p1,s.a1-s.a0)+(o=c,((i=s).a0==o.a0&&i.a1==o.a1?l(s.r,s.p1,s.r,s.p0):l(s.r,s.p1,c.r,c.p0)+u(c.r,c.p1,c.a1-c.a0)+l(c.r,c.p1,s.r,s.p0))+"Z")}function a(t,n,o,a){var u=n.call(t,o,a),l=e.call(t,u,a),s=r.call(t,u,a)-Ft,c=i.call(t,u,a)-Ft;return{r:l,a0:s,a1:c,p0:[l*Math.cos(s),l*Math.sin(s)],p1:[l*Math.cos(c),l*Math.sin(c)]}}function u(t,n,e){return"A"+t+","+t+" 0 "+ +(e>Et)+",1 "+n}function l(t,n,e,r){return"Q 0,0 "+r}return o.radius=function(t){return arguments.length?(e=bn(t),o):e},o.source=function(n){return arguments.length?(t=bn(n),o):t},o.target=function(t){return arguments.length?(n=bn(t),o):n},o.startAngle=function(t){return arguments.length?(r=bn(t),o):r},o.endAngle=function(t){return arguments.length?(i=bn(t),o):i},o},o.svg.diagonal=function(){var t=Xr,n=Gr,e=Au;function r(r,i){var o=t.call(this,r,i),a=n.call(this,r,i),u=(o.y+a.y)/2,l=[o,{x:o.x,y:u},{x:a.x,y:u},a];return"M"+(l=l.map(e))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return r.source=function(n){return arguments.length?(t=bn(n),r):t},r.target=function(t){return arguments.length?(n=bn(t),r):n},r.projection=function(t){return arguments.length?(e=t,r):e},r},o.svg.diagonal.radial=function(){var t=o.svg.diagonal(),n=Au,e=t.projection;return t.projection=function(t){return arguments.length?e(function(t){return function(){var n=t.apply(this,arguments),e=n[0],r=n[1]-Ft;return[e*Math.cos(r),e*Math.sin(r)]}}(n=t)):n},t},o.svg.symbol=function(){var t=Cu,n=_u;function e(e,r){return(Eu.get(t.call(this,e,r))||Su)(n.call(this,e,r))}return e.type=function(n){return arguments.length?(t=bn(n),e):t},e.size=function(t){return arguments.length?(n=bn(t),e):n},e};var Eu=o.map({circle:Su,cross:function(t){var n=Math.sqrt(t/5)/2;return"M"+-3*n+","+-n+"H"+-n+"V"+-3*n+"H"+n+"V"+-n+"H"+3*n+"V"+n+"H"+n+"V"+3*n+"H"+-n+"V"+n+"H"+-3*n+"Z"},diamond:function(t){var n=Math.sqrt(t/(2*Du)),e=n*Du;return"M0,"+-n+"L"+e+",0 0,"+n+" "+-e+",0Z"},square:function(t){var n=Math.sqrt(t)/2;return"M"+-n+","+-n+"L"+n+","+-n+" "+n+","+n+" "+-n+","+n+"Z"},"triangle-down":function(t){var n=Math.sqrt(t/Nu),e=n*Nu/2;return"M0,"+e+"L"+n+","+-e+" "+-n+","+-e+"Z"},"triangle-up":function(t){var n=Math.sqrt(t/Nu),e=n*Nu/2;return"M0,"+-e+"L"+n+","+e+" "+-n+","+e+"Z"}}
1);o.svg.symbolTypes=Eu.keys();var Nu=Math.sqrt(3),Du=Math.tan(30*Wt);Z.transition=function(t){for(var n,e,r=Tu||++Pu,i=Ru(t),o=[],a=zu||{time:Date.now(),ease:ho,delay:0,duration:250},u=-1,l=this.length;++u<l;){o.push(n=[]);for(var s=this[u],c=-1,f=s.length;++c<f;)(e=s[c])&&Hu(e,c,i,r,a),n.push(e)}return Lu(o,i,r)},Z.interrupt=function(t){return this.each(null==t?Fu:Wu(Ru(t)))};var Fu=Wu(Ru());function Wu(t){return function(){var n,e,r;(n=this[t])&&(r=n[e=n.active])&&(r.timer.c=null,r.timer.t=NaN,--n.count?delete n[e]:delete this[t],n.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Lu(t,n,e){return q(t,Ou),t.namespace=n,t.id=e,t}var Tu,zu,Ou=[],Pu=0;function Bu(t,n,e,r){var i=t.id,o=t.namespace;return ht(t,"function"==typeof e?function(t,a,u){t[o][i].tween.set(n,r(e.call(t,t.__data__,a,u)))}:(e=r(e),function(t){t[o][i].tween.set(n,e)}))}function Iu(t){return null==t&&(t=""),function(){this.textContent=t}}function Ru(t){return null==t?"__transition__":"__transition_"+t+"__"}function Hu(t,n,e,r,i){var o,a,u,l,s,c=t[e]||(t[e]={active:0,count:0}),f=c[r];function d(e){var i=c.active,d=c[i];for(var p in d&&(d.timer.c=null,d.timer.t=NaN,--c.count,delete c[i],d.event&&d.event.interrupt.call(t,t.__data__,d.index)),c)if(+p<r){var g=c[p];g.timer.c=null,g.timer.t=NaN,--c.count,delete c[p]}a.c=h,En(function(){return a.c&&h(e||1)&&(a.c=null,a.t=NaN),1},0,o),c.active=r,f.event&&f.event.start.call(t,t.__data__,n),s=[],f.tween.forEach(function(e,r){(r=r.call(t,t.__data__,n))&&s.push(r)}),l=f.ease,u=f.duration}function h(i){for(var o=i/u,a=l(o),d=s.length;d>0;)s[--d].call(t,a);if(o>=1)return f.event&&f.event.end.call(t,t.__data__,n),--c.count?delete c[r]:delete t[e],1}f||(o=i.time,a=En(function(t){var n=f.delay;if(a.t=n+o,n<=t)return d(t-n);a.c=d},0,o),f=c[r]={tween:new A,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:n},i=null,++c.count)}Ou.call=Z.call,Ou.empty=Z.empty,Ou.node=Z.node,Ou.size=Z.size,o.transition=function(t,n){return t&&t.transition?Tu?t.transition(n):t:o.selection().transition(t)},o.transition.prototype=Ou,Ou.select=function(t){var n,e,r,i=this.id,o=this.namespace,a=[];t=$(t);for(var u=-1,l=this.length;++u<l;){a.push(n=[]);for(var s=this[u],c=-1,f=s.length;++c<f;)(r=s[c])&&(e=t.call(r,r.__data__,c,u))?("__data__"in r&&(e.__data__=r.__data__),Hu(e,c,o,i,r[o][i]),n.push(e)):n.push(null)}return Lu(a,o,i)},Ou.selectAll=function(t){var n,e,r,i,o,a=this.id,u=this.namespace,l=[];t=K(t);for(var s=-1,c=this.length;++s<c;)for(var f=this[s],d=-1,h=f.length;++d<h;)if(r=f[d]){o=r[u][a],e=t.call(r,r.__data__,d,s),l.push(n=[]);for(var p=-1,g=e.length;++p<g;)(i=e[p])&&Hu(i,p,u,a,o),n.push(i)}return Lu(l,u,a)},Ou.filter=function(t){var n,e,r=[];"function"!=typeof t&&(t=ft(t));for(var i=0,o=this.length;i<o;i++){r.push(n=[]);for(var a,u=0,l=(a=this[i]).length;u<l;u++)(e=a[u])&&t.call(e,e.__data__,u,i)&&n.push(e)}return Lu(r,this.namespace,this.id)},Ou.tween=function(t,n){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(t):ht(this,null==n?function(n){n[r][e].tween.remove(t)}:function(i){i[r][e].tween.set(t,n)})},Ou.attr=function(t,n){if(arguments.length<2){for(n in t)this.attr(n,t[n]);return this}var e="transform"==t?Ao:ro,r=o.ns.qualify(t);function i(){this.removeAttribute(r)}function a(){this.removeAttributeNS(r.space,r.local)}return Bu(this,"attr."+t,n,r.local?function(t){return null==t?a:(t+="",function(){var n,i=this.getAttributeNS(r.space,r.local);return i!==t&&(n=e(i,t),function(t){this.setAttributeNS(r.space,r.local,n(t))})})}:function(t){return null==t?i:(t+="",function(){var n,i=this.getAttribute(r);return i!==t&&(n=e(i,t),function(t){this.setAttribute(r,n(t))})})})},Ou.attrTween=function(t,n){var e=o.ns.qualify(t);return this.tween("attr."+t,e.local?function(t,r){var i=n.call(this,t,r,this.getAttributeNS(e.space,e.local));return i&&function(t){this.setAttributeNS(e.space,e.local,i(t))}}:function(t,r){var i=n.call(this,t,r,this.getAttribute(e));return i&&function(t){this.setAttribute(e,i(t))}})},Ou.style=function(t,n,e){var r=arguments.length;if(r<3){if("string"!=typeof t){for(e in r<2&&(n=""),t)this.style(e,t[e],n);return this}e=""}function i(){this.style.removeProperty(t)}return Bu(this,"style."+t,n,function(n){return null==n?i:(n+="",function(){var r,i=c(this).getComputedStyle(this,null).getPropertyValue(t);return i!==n&&(r=ro(i,n),function(n){this.style.setProperty(t,r(n),e)})})})},Ou.styleTween=function(t,n,e){return arguments.length<3&&(e=""),this.tween("style."+t,function(r,i){var o=n.call(this,r,i,c(this).getComputedStyle(this,null).getPropertyValue(t));return o&&function(n){this.style.setProperty(t,o(n),e)}})},Ou.text=function(t){return Bu(this,"text",t,Iu)},Ou.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var n;this[t].count<2&&(n=this.parentNode)&&n.removeChild(this)})},Ou.ease=function(t){var n=this.id,e=this.namespace;return arguments.length<1?this.node()[e][n].ease:("function"!=typeof t&&(t=o.ease.apply(o,arguments)),ht(this,function(r){r[e][n].ease=t}))},Ou.delay=function(t){var n=this.id,e=this.namespace;
vendor: 5,412 bytes, line 1
1return arguments.length<1?this.node()[e][n].delay:ht(this,"function"==typeof t?function(r,i,o){r[e][n].delay=+t.call(r,r.__data__,i,o)}:(t=+t,function(r){r[e][n].delay=t}))},Ou.duration=function(t){var n=this.id,e=this.namespace;return arguments.length<1?this.node()[e][n].duration:ht(this,"function"==typeof t?function(r,i,o){r[e][n].duration=Math.max(1,t.call(r,r.__data__,i,o))}:(t=Math.max(1,t),function(r){r[e][n].duration=t}))},Ou.each=function(t,n){var e=this.id,r=this.namespace;if(arguments.length<2){var i=zu,a=Tu;try{Tu=e,ht(this,function(n,i,o){zu=n[r][e],t.call(n,n.__data__,i,o)})}finally{zu=i,Tu=a}}else ht(this,function(i){var a=i[r][e];(a.event||(a.event=o.dispatch("start","end","interrupt"))).on(t,n)});return this},Ou.transition=function(){for(var t,n,e,r=this.id,i=++Pu,o=this.namespace,a=[],u=0,l=this.length;u<l;u++){a.push(t=[]);for(var s,c=0,f=(s=this[u]).length;c<f;c++)(n=s[c])&&Hu(n,c,o,i,{time:(e=n[o][r]).time,ease:e.ease,delay:e.delay+e.duration,duration:e.duration}),t.push(n)}return Lu(a,o,i)},o.svg.axis=function(){var t,n=o.scale.linear(),e=Vu,r=6,i=6,a=3,l=[10],s=null;function c(u){u.each(function(){var u,c=o.select(this),f=this.__chart__||n,d=this.__chart__=n.copy(),h=null==s?d.ticks?d.ticks.apply(d,l):d.domain():s,p=null==t?d.tickFormat?d.tickFormat.apply(d,l):L:t,g=c.selectAll(".tick").data(h,d),v=g.enter().insert("g",".domain").attr("class","tick").style("opacity",Ct),m=o.transition(g.exit()).style("opacity",Ct).remove(),y=o.transition(g.order()).style("opacity",1),x=Math.max(r,0)+a,b=wa(d),k=c.selectAll(".domain").data([0]),M=(k.enter().append("path").attr("class","domain"),o.transition(k));v.append("line"),v.append("text");var w,A,_,C,S=v.select("line"),E=y.select("line"),N=g.select("text").text(p),D=v.select("text"),F=y.select("text"),W="top"===e||"left"===e?-1:1;if("bottom"===e||"top"===e?(u=qu,w="x",_="y",A="x2",C="y2",N.attr("dy",W<0?"0em":".71em").style("text-anchor","middle"),M.attr("d","M"+b[0]+","+W*i+"V0H"+b[1]+"V"+W*i)):(u=Yu,w="y",_="x",A="y2",C="x2",N.attr("dy",".32em").style("text-anchor",W<0?"end":"start"),M.attr("d","M"+W*i+","+b[0]+"H0V"+b[1]+"H"+W*i)),S.attr(C,W*r),D.attr(_,W*x),E.attr(A,0).attr(C,W*r),F.attr(w,0).attr(_,W*x),d.rangeBand){var T=d,z=T.rangeBand()/2;f=d=function(t){return T(t)+z}}else f.rangeBand?f=d:m.call(u,d,f);v.call(u,f,d),y.call(u,d,d)})}return c.scale=function(t){return arguments.length?(n=t,c):n},c.orient=function(t){return arguments.length?(e=t in ju?t+"":Vu,c):e},c.ticks=function(){return arguments.length?(l=u(arguments),c):l},c.tickValues=function(t){return arguments.length?(s=t,c):s},c.tickFormat=function(n){return arguments.length?(t=n,c):t},c.tickSize=function(t){var n=arguments.length;return n?(r=+t,i=+arguments[n-1],c):r},c.innerTickSize=function(t){return arguments.length?(r=+t,c):r},c.outerTickSize=function(t){return arguments.length?(i=+t,c):i},c.tickPadding=function(t){return arguments.length?(a=+t,c):a},c.tickSubdivide=function(){return arguments.length&&c},c};var Vu="bottom",ju={top:1,right:1,bottom:1,left:1};function qu(t,n,e){t.attr("transform",function(t){var r=n(t);return"translate("+(isFinite(r)?r:e(t))+",0)"})}function Yu(t,n,e){t.attr("transform",function(t){var r=n(t);return"translate(0,"+(isFinite(r)?r:e(t))+")"})}o.svg.brush=function(){var t,n,e=V(d,"brushstart","brush","brushend"),r=null,i=null,a=[0,0],u=[0,0],l=!0,s=!0,f=Gu[0];function d(t){t.each(function(){var t=o.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",v).on("touchstart.brush",v),n=t.selectAll(".background").data([0]);n.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var e=t.selectAll(".resize").data(f,L);e.exit().remove(),e.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Xu[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),e.style("display",d.empty()?"none":null);var a,u=o.transition(t),l=o.transition(n);r&&(a=wa(r),l.attr("x",a[0]).attr("width",a[1]-a[0]),p(u)),i&&(a=wa(i),l.attr("y",a[0]).attr("height",a[1]-a[0]),g(u)),h(u)})}function h(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+a[+/e$/.test(t)]+","+u[+/^s/.test(t)]+")"})}function p(t){t.select(".extent").attr("x",a[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",a[1]-a[0])}function g(t){t.select(".extent").attr("y",u[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",u[1]-u[0])}function v(){var f,v,m=this,y=o.select(o.event.target),x=e.of(m,arguments),b=o.select(m),k=y.datum(),M=!/^(n|s)$/.test(k)&&r,w=!/^(e|w)$/.test(k)&&i,A=y.classed("extent"),_=Mt(m),C=o.mouse(m),S=o.select(c(m)).on("keydown.brush",function(){32==o.event.keyCode&&(A||(f=null,C[0]-=a[1],C[1]-=u[1],A=2),R())}).on("keyup.brush",function(){32==o.event.keyCode&&2==A&&(C[0]+=a[1],C[1]+=u[1],A=0,R())});if(o.event.changedTouches?S.on("touchmove.brush",D).on("touchend.brush",W):S.on("mousemove.brush",D).on("mouseup.brush",W),b.interrupt().selectAll("*").interrupt(),A)C[0]=a[0]-C[0],C[1]=u[0]-C[1];else if(k){var E=+/w$/.test(k),N=+/^n/.test(k);v=[a[1-E]-C[0],u[1-N]-C[1]],C[0]=a[E],C[1]=u[N]}
1else o.event.altKey&&(f=C.slice());function D(){var t=o.mouse(m),n=!1;v&&(t[0]+=v[0],t[1]+=v[1]),A||(o.event.altKey?(f||(f=[(a[0]+a[1])/2,(u[0]+u[1])/2]),C[0]=a[+(t[0]<f[0])],C[1]=u[+(t[1]<f[1])]):f=null),M&&F(t,r,0)&&(p(b),n=!0),w&&F(t,i,1)&&(g(b),n=!0),n&&(h(b),x({type:"brush",mode:A?"move":"resize"}))}function F(e,r,i){var o,c,d=wa(r),h=d[0],p=d[1],g=C[i],v=i?u:a,m=v[1]-v[0];if(A&&(h-=g,p-=m+g),o=(i?s:l)?Math.max(h,Math.min(p,e[i])):e[i],A?c=(o+=g)+m:(f&&(g=Math.max(h,Math.min(p,2*f[i]-o))),g<o?(c=o,o=g):c=g),v[0]!=o||v[1]!=c)return i?n=null:t=null,v[0]=o,v[1]=c,!0}function W(){D(),b.style("pointer-events","all").selectAll(".resize").style("display",d.empty()?"none":null),o.select("body").style("cursor",null),S.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),_(),x({type:"brushend"})}b.style("pointer-events","none").selectAll(".resize").style("display",null),o.select("body").style("cursor",y.style("cursor")),x({type:"brushstart"}),D()}return d.event=function(r){r.each(function(){var r=e.of(this,arguments),i={x:a,y:u,i:t,j:n},l=this.__chart__||i;this.__chart__=i,Tu?o.select(this).transition().each("start.brush",function(){t=l.i,n=l.j,a=l.x,u=l.y,r({type:"brushstart"})}).tween("brush:brush",function(){var e=io(a,i.x),o=io(u,i.y);return t=n=null,function(t){a=i.x=e(t),u=i.y=o(t),r({type:"brush",mode:"resize"})}}).each("end.brush",function(){t=i.i,n=i.j,r({type:"brush",mode:"resize"}),r({type:"brushend"})}):(r({type:"brushstart"}),r({type:"brush",mode:"resize"}),r({type:"brushend"}))})},d.x=function(t){return arguments.length?(f=Gu[!(r=t)<<1|!i],d):r},d.y=function(t){return arguments.length?(f=Gu[!r<<1|!(i=t)],d):i},d.clamp=function(t){return arguments.length?(r&&i?(l=!!t[0],s=!!t[1]):r?l=!!t:i&&(s=!!t),d):r&&i?[l,s]:r?l:i?s:null},d.extent=function(e){var o,l,s,c,f;return arguments.length?(r&&(o=e[0],l=e[1],i&&(o=o[0],l=l[0]),t=[o,l],r.invert&&(o=r(o),l=r(l)),l<o&&(f=o,o=l,l=f),o==a[0]&&l==a[1]||(a=[o,l])),i&&(s=e[0],c=e[1],r&&(s=s[1],c=c[1]),n=[s,c],i.invert&&(s=i(s),c=i(c)),c<s&&(f=s,s=c,c=f),s==u[0]&&c==u[1]||(u=[s,c])),d):(r&&(t?(o=t[0],l=t[1]):(o=a[0],l=a[1],r.invert&&(o=r.invert(o),l=r.invert(l)),l<o&&(f=o,o=l,l=f))),i&&(n?(s=n[0],c=n[1]):(s=u[0],c=u[1],i.invert&&(s=i.invert(s),c=i.invert(c)),c<s&&(f=s,s=c,c=f))),r&&i?[[o,s],[l,c]]:r?[o,l]:i&&[s,c])},d.clear=function(){return d.empty()||(a=[0,0],u=[0,0],t=n=null),d},d.empty=function(){return!!r&&a[0]==a[1]||!!i&&u[0]==u[1]},o.rebind(d,e,"on")};var Xu={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Gu=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Uu=Bn.format=he.timeFormat,Zu=Uu.utc,$u=Zu("%Y-%m-%dT%H:%M:%S.%LZ");function Ku(t){return t.toISOString()}function Qu(t,n,e){function r(n){return t(n)}function i(t,e){var r=(t[1]-t[0])/e,i=o.bisect(tl,r);return i==tl.length?[n.year,Wa(t.map(function(t){return t/31536e6}),e)[2]]:i?n[r/tl[i-1]<tl[i]/r?i-1:i]:[rl,Wa(t,e)[2]]}return r.invert=function(n){return Ju(t.invert(n))},r.domain=function(n){return arguments.length?(t.domain(n),r):t.domain().map(Ju)},r.nice=function(t,n){var e=r.domain(),o=Ma(e),a=null==t?i(o,10):"number"==typeof t&&i(o,t);function u(e){return!isNaN(e)&&!t.range(e,Ju(+e+1),n).length}return a&&(t=a[0],n=a[1]),r.domain(_a(e,n>1?{floor:function(n){for(;u(n=t.floor(n));)n=Ju(n-1);return n},ceil:function(n){for(;u(n=t.ceil(n));)n=Ju(+n+1);return n}}:t))},r.ticks=function(t,n){var e=Ma(r.domain()),o=null==t?i(e,10):"number"==typeof t?i(e,t):!t.range&&[{range:t},n];return o&&(t=o[0],n=o[1]),t.range(e[0],Ju(+e[1]+1),n<1?1:n)},r.tickFormat=function(){return e},r.copy=function(){return Qu(t.copy(),n,e)},Da(r,t)}function Ju(t){return new Date(t)}Uu.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ku:$u,Ku.parse=function(t){var n=new Date(t);return isNaN(n)?null:n},Ku.toString=$u.toString,Bn.second=Vn(function(t){return new In(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(t.getTime()+1e3*Math.floor(n))},function(t){return t.getSeconds()}),Bn.seconds=Bn.second.range,Bn.seconds.utc=Bn.second.utc.range,Bn.minute=Vn(function(t){return new In(6e4*Math.floor(t/6e4))},function(t,n){t.setTime(t.getTime()+6e4*Math.floor(n))},function(t){return t.getMinutes()}),Bn.minutes=Bn.minute.range,Bn.minutes.utc=Bn.minute.utc.range,Bn.hour=Vn(function(t){var n=t.getTimezoneOffset()/60;return new In(36e5*(Math.floor(t/36e5-n)+n))},function(t,n){t.setTime(t.getTime()+36e5*Math.floor(n))},function(t){return t.getHours()}),Bn.hours=Bn.hour.range,Bn.hours.utc=Bn.hour.utc.range,Bn.month=Vn(function(t){return(t=Bn.day(t)).setDate(1),t},function(t,n){t.setMonth(t.getMonth()+n)},function(t){return t.getMonth()}),Bn.months=Bn.month.range,Bn.months.utc=Bn.month.utc.range;var tl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],nl=[[Bn.second,1],[Bn.second,5],[Bn.second,15],[Bn.second,30],[Bn.minute,1],[Bn.minute,5],[Bn.minute,15],[Bn.minute,30],[Bn.hour,1],[Bn.hour,3],[Bn.hour,6],[Bn.hour,12],[Bn.day,1],[Bn.day,2],[Bn.week,1],[Bn.month,1],[Bn.month,3],[Bn.year,1]],el=Uu.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Qe]]),rl={range:function(t,n,e){return o.range(Math.ceil(t/e)*e,+n,e).map(Ju)},floor:L,ceil:L};nl.year=Bn.year,Bn.scale=function(){return Qu(o.scale.linear(),nl,el)};var il=nl.map(function(t){return[t[0].utc,t[1]]}),ol=Zu.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Qe]]);function al(t){return JSON.parse(t.responseText)}function ul(t){var n=l.createRange();return n.selectNode(l.body),n.createContextualFragment(t.responseText)}il.year=Bn.year.utc,Bn.scale.utc=function(){return Qu(o.scale.linear(),il,ol)},o.text=kn(function(t){return t.responseText}),o.json=function(t,n){return Mn(t,"application/json",al,n)},o.html=function(t,n){return Mn(t,"text/html",ul,n)},o.xml=kn(function(t){return t.responseXML}),this.d3=o,void 0===(i="function"==typeof(r=o)?r.call(n,e,n,t):r)||(t.exports=i)}()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.