Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
cts.eemo.co.kr
/
public_html
/
src
/
web
/
assets
/
vendor
/
libs
/
c3
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/cts.eemo.co.kr/public_html/src/web/assets/vendor/libs/c3/c3.js
!function(t,e){var i=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=349)}({349:function(t,e,i){"use strict";i.r(e);var n=i(42);i.n(n),i.d(e,"c3",function(){return n})},350:function(t,e){t.exports=window.d3},42:function(t,e,i){ /* @license C3.js v0.6.8 | (c) C3 Team and other contributors | http://c3js.org/ */ t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t){var e=this;e.d3=window.d3?window.d3:i(350),e.api=t,e.config=e.getDefaultConfig(),e.data={},e.cache={},e.axes={}}function n(t){var i=this.internal=new e(this);i.loadConfig(t),i.beforeInit(t),i.init(),i.afterInit(t),function t(e,i,n){Object.keys(e).forEach(function(r){i[r]=e[r].bind(n),Object.keys(e[r]).length>0&&t(e[r],i[r],n)})}(n.prototype,this,this)}function r(t,e){this.component=t,this.params=e||{},this.d3=t.d3,this.scale=this.d3.scaleLinear(),this.range,this.orient="bottom",this.innerTickSize=6,this.outerTickSize=this.params.withOuterTick?6:0,this.tickPadding=3,this.tickValues=null,this.tickFormat,this.tickArguments,this.tickOffset=0,this.tickCulling=!0,this.tickCentered,this.tickTextCharSize,this.tickTextRotate=this.params.tickTextRotate,this.tickLength,this.axis=this.generateAxis()}r.prototype.axisX=function(t,e,i){t.attr("transform",function(t){return"translate("+Math.ceil(e(t)+i)+", 0)"})},r.prototype.axisY=function(t,e){t.attr("transform",function(t){return"translate(0,"+Math.ceil(e(t))+")"})},r.prototype.scaleExtent=function(t){var e=t[0],i=t[t.length-1];return e<i?[e,i]:[i,e]},r.prototype.generateTicks=function(t){var e,i,n=[];if(t.ticks)return t.ticks.apply(t,this.tickArguments);for(i=t.domain(),e=Math.ceil(i[0]);e<i[1];e++)n.push(e);return n.length>0&&n[0]>0&&n.unshift(n[0]-(n[1]-n[0])),n},r.prototype.copyScale=function(){var t,e=this.scale.copy();return this.params.isCategory&&(t=this.scale.domain(),e.domain([t[0],t[1]-1])),e},r.prototype.textFormatted=function(t){var e=this.tickFormat?this.tickFormat(t):t;return void 0!==e?e:""},r.prototype.updateRange=function(){return this.range=this.scale.rangeExtent?this.scale.rangeExtent():this.scaleExtent(this.scale.range()),this.range},r.prototype.updateTickTextCharSize=function(t){var e=this;if(e.tickTextCharSize)return e.tickTextCharSize;var i={h:11.5,w:5.5};return t.select("text").text(function(t){return e.textFormatted(t)}).each(function(t){var n=this.getBoundingClientRect(),r=e.textFormatted(t),a=n.height,o=r?n.width/r.length:void 0;a&&o&&(i.h=a,i.w=o)}).text(""),e.tickTextCharSize=i,i},r.prototype.isVertical=function(){return"left"===this.orient||"right"===this.orient},r.prototype.tspanData=function(t,e,i){var n=this.params.tickMultiline?this.splitTickText(t,i):[].concat(this.textFormatted(t));return this.params.tickMultiline&&this.params.tickMultilineMax>0&&(n=this.ellipsify(n,this.params.tickMultilineMax)),n.map(function(t){return{index:e,splitted:t,length:n.length}})},r.prototype.splitTickText=function(t,e){var i,n,r,a=this,o=a.textFormatted(t),s=a.params.tickWidth;return"[object Array]"===Object.prototype.toString.call(o)?o:((!s||s<=0)&&(s=a.isVertical()?95:a.params.isCategory?Math.ceil(e(1)-e(0))-12:110),function t(e,o){n=void 0;for(var c=1;c<o.length;c++)if(" "===o.charAt(c)&&(n=c),i=o.substr(0,c+1),r=a.tickTextCharSize.w*i.length,s<r)return t(e.concat(o.substr(0,n||c)),o.slice(n?n+1:c));return e.concat(o)}([],o+""))},r.prototype.ellipsify=function(t,e){if(t.length<=e)return t;for(var i=t.slice(0,e),n=3,r=e-1;r>=0;r--){var a=i[r].length;if(i[r]=i[r].substr(0,a-n).padEnd(a,"."),(n-=a)<=0)break}return i},r.prototype.updateTickLength=function(){this.tickLength=Math.max(this.innerTickSize,0)+this.tickPadding},r.prototype.lineY2=function(t){var e=this.scale(t)+(this.tickCentered?0:this.tickOffset);return this.range[0]<e&&e<this.range[1]?this.innerTickSize:0},r.prototype.textY=function(){var t=this.tickTextRotate;return t?11.5-t/15*2.5*(t>0?1:-1):this.tickLength},r.prototype.textTransform=function(){var t=this.tickTextRotate;return t?"rotate("+t+")":""},r.prototype.textTextAnchor=function(){var t=this.tickTextRotate;return t?t>0?"start":"end":"middle"},r.prototype.tspanDx=function(){var t=this.tickTextRotate;return t?8*Math.sin(Math.PI*(t/180)):0},r.prototype.tspanDy=function(t,e){var i=this.tickTextCharSize.h;return 0===e&&(i=this.isVertical()?-((t.length-1)*(this.tickTextCharSize.h/2)-3):".71em"),i},r.prototype.generateAxis=function(){var t=this,e=t.d3,i=t.params;function n(r,a){var o;return r.each(function(){var r,s,c,d=n.g=e.select(this),l=this.__chart__||t.scale,u=this.__chart__=t.copyScale(),h=t.tickValues?t.tickValues:t.generateTicks(u),g=d.selectAll(".tick").data(h,u),p=g.enter().insert("g",".domain").attr("class","tick").style("opacity",1e-6),f=g.exit().remove(),_=g.merge(p);i.isCategory?(t.tickOffset=Math.ceil((u(1)-u(0))/2),s=t.tickCentered?0:t.tickOffset,c=t.tickCentered?t.tickOffset:0):t.tickOffset=s=0,t.updateRange(),t.updateTickLength(),t.updateTickTextCharSize(d.select(".tick"));var x=_.select("line").merge(p.append("line")),y=_.select("text").merge(p.append("text")),m=_.selectAll("text").selectAll("tspan").data(function(e,i){return t.tspanData(e,i,u)}),S=m.enter().append("tspan"),w=S.merge(m).text(function(t){return t.splitted});m.exit().remove();var v=d.selectAll(".domain").data([0]),b=v.enter().append("path").merge(v).attr("class","domain");switch(t.orient){case"bottom":r=t.axisX,x.attr("x1",s).attr("x2",s).attr("y2",function(e,i){return t.lineY2(e,i)}),y.attr("x",0).attr("y",function(e,i){return t.textY(e,i)}).attr("transform",function(e,i){return t.textTransform(e,i)}).style("text-anchor",function(e,i){return t.textTextAnchor(e,i)}),w.attr("x",0).attr("dy",function(e,i){return t.tspanDy(e,i)}).attr("dx",function(e,i){return t.tspanDx(e,i)}),b.attr("d","M"+t.range[0]+","+t.outerTickSize+"V0H"+t.range[1]+"V"+t.outerTickSize);break;case"top":r=t.axisX,x.attr("x1",s).attr("x2",s).attr("y2",function(e,i){return-1*t.lineY2(e,i)}),y.attr("x",0).attr("y",function(e,n){return-1*t.textY(e,n)-(i.isCategory?2:t.tickLength-2)}).attr("transform",function(e,i){return t.textTransform(e,i)}).style("text-anchor",function(e,i){return t.textTextAnchor(e,i)}),w.attr("x",0).attr("dy",function(e,i){return t.tspanDy(e,i)}).attr("dx",function(e,i){return t.tspanDx(e,i)}),b.attr("d","M"+t.range[0]+","+-t.outerTickSize+"V0H"+t.range[1]+"V"+-t.outerTickSize);break;case"left":r=t.axisY,x.attr("x2",-t.innerTickSize).attr("y1",c).attr("y2",c),y.attr("x",-t.tickLength).attr("y",t.tickOffset).style("text-anchor","end"),w.attr("x",-t.tickLength).attr("dy",function(e,i){return t.tspanDy(e,i)}),b.attr("d","M"+-t.outerTickSize+","+t.range[0]+"H0V"+t.range[1]+"H"+-t.outerTickSize);break;case"right":r=t.axisY,x.attr("x2",t.innerTickSize).attr("y1",c).attr("y2",c),y.attr("x",t.tickLength).attr("y",t.tickOffset).style("text-anchor","start"),w.attr("x",t.tickLength).attr("dy",function(e,i){return t.tspanDy(e,i)}),b.attr("d","M"+t.outerTickSize+","+t.range[0]+"H0V"+t.range[1]+"H"+t.outerTickSize)}if(u.rangeBand){var T=u,A=T.rangeBand()/2;l=u=function(t){return T(t)+A}}else l.rangeBand?l=u:f.call(r,u,t.tickOffset);p.call(r,l,t.tickOffset),o=(a?_.transition(a):_).style("opacity",1).call(r,u,t.tickOffset)}),o}return n.scale=function(e){return arguments.length?(t.scale=e,n):t.scale},n.orient=function(e){return arguments.length?(t.orient=e in{top:1,right:1,bottom:1,left:1}?e+"":"bottom",n):t.orient},n.tickFormat=function(e){return arguments.length?(t.tickFormat=e,n):t.tickFormat},n.tickCentered=function(e){return arguments.length?(t.tickCentered=e,n):t.tickCentered},n.tickOffset=function(){return t.tickOffset},n.tickInterval=function(){var e,r;return i.isCategory?e=2*t.tickOffset:(r=n.g.select("path.domain").node().getTotalLength()-2*t.outerTickSize,e=r/n.g.selectAll("line").size()),e===1/0?0:e},n.ticks=function(){return arguments.length?(t.tickArguments=arguments,n):t.tickArguments},n.tickCulling=function(e){return arguments.length?(t.tickCulling=e,n):t.tickCulling},n.tickValues=function(e){if("function"==typeof e)t.tickValues=function(){return e(t.scale.domain())};else{if(!arguments.length)return t.tickValues;t.tickValues=e}return n},n};var a={target:"c3-target",chart:"c3-chart",chartLine:"c3-chart-line",chartLines:"c3-chart-lines",chartBar:"c3-chart-bar",chartBars:"c3-chart-bars",chartText:"c3-chart-text",chartTexts:"c3-chart-texts",chartArc:"c3-chart-arc",chartArcs:"c3-chart-arcs",chartArcsTitle:"c3-chart-arcs-title",chartArcsBackground:"c3-chart-arcs-background",chartArcsGaugeUnit:"c3-chart-arcs-gauge-unit",chartArcsGaugeMax:"c3-chart-arcs-gauge-max",chartArcsGaugeMin:"c3-chart-arcs-gauge-min",selectedCircle:"c3-selected-circle",selectedCircles:"c3-selected-circles",eventRect:"c3-event-rect",eventRects:"c3-event-rects",eventRectsSingle:"c3-event-rects-single",eventRectsMultiple:"c3-event-rects-multiple",zoomRect:"c3-zoom-rect",brush:"c3-brush",dragZoom:"c3-drag-zoom",focused:"c3-focused",defocused:"c3-defocused",region:"c3-region",regions:"c3-regions",title:"c3-title",tooltipContainer:"c3-tooltip-container",tooltip:"c3-tooltip",tooltipName:"c3-tooltip-name",shape:"c3-shape",shapes:"c3-shapes",line:"c3-line",lines:"c3-lines",bar:"c3-bar",bars:"c3-bars",circle:"c3-circle",circles:"c3-circles",arc:"c3-arc",arcLabelLine:"c3-arc-label-line",arcs:"c3-arcs",area:"c3-area",areas:"c3-areas",empty:"c3-empty",text:"c3-text",texts:"c3-texts",gaugeValue:"c3-gauge-value",grid:"c3-grid",gridLines:"c3-grid-lines",xgrid:"c3-xgrid",xgrids:"c3-xgrids",xgridLine:"c3-xgrid-line",xgridLines:"c3-xgrid-lines",xgridFocus:"c3-xgrid-focus",ygrid:"c3-ygrid",ygrids:"c3-ygrids",ygridLine:"c3-ygrid-line",ygridLines:"c3-ygrid-lines",axis:"c3-axis",axisX:"c3-axis-x",axisXLabel:"c3-axis-x-label",axisY:"c3-axis-y",axisYLabel:"c3-axis-y-label",axisY2:"c3-axis-y2",axisY2Label:"c3-axis-y2-label",legendBackground:"c3-legend-background",legendItem:"c3-legend-item",legendItemEvent:"c3-legend-item-event",legendItemTile:"c3-legend-item-tile",legendItemHidden:"c3-legend-item-hidden",legendItemFocused:"c3-legend-item-focused",dragarea:"c3-dragarea",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"},o=function(t){return Math.ceil(t)+.5},s=function(t){return 10*Math.ceil(t/10)},c=function(t){return t[1]-t[0]},d=function(t,e,i){return h(t[e])?t[e]:i},l=function(t){var e=t.getBoundingClientRect(),i=[t.pathSegList.getItem(0),t.pathSegList.getItem(1)],n=i[0].x,r=Math.min(i[0].y,i[1].y);return{x:n,y:r,width:e.width,height:e.height}},u=function(t){return Array.isArray(t)},h=function(t){return void 0!==t},g=function(e){return void 0===e||null===e||f(e)&&0===e.length||"object"===t(e)&&0===Object.keys(e).length},p=function(t){return"function"==typeof t},f=function(t){return"string"==typeof t},_=function(t){return void 0===t},x=function(t){return t||0===t},y=function(t){return!g(t)},m=function(t){return"string"==typeof t?t.replace(/</g,"<").replace(/>/g,">"):t},S=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.owner=e,this.d3=e.d3,this.internal=r};S.prototype.init=function(){var t=this.owner,e=t.config,i=t.main;t.axes.x=i.append("g").attr("class",a.axis+" "+a.axisX).attr("clip-path",e.axis_x_inner?"":t.clipPathForXAxis).attr("transform",t.getTranslate("x")).style("visibility",e.axis_x_show?"visible":"hidden"),t.axes.x.append("text").attr("class",a.axisXLabel).attr("transform",e.axis_rotated?"rotate(-90)":"").style("text-anchor",this.textAnchorForXAxisLabel.bind(this)),t.axes.y=i.append("g").attr("class",a.axis+" "+a.axisY).attr("clip-path",e.axis_y_inner?"":t.clipPathForYAxis).attr("transform",t.getTranslate("y")).style("visibility",e.axis_y_show?"visible":"hidden"),t.axes.y.append("text").attr("class",a.axisYLabel).attr("transform",e.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForYAxisLabel.bind(this)),t.axes.y2=i.append("g").attr("class",a.axis+" "+a.axisY2).attr("transform",t.getTranslate("y2")).style("visibility",e.axis_y2_show?"visible":"hidden"),t.axes.y2.append("text").attr("class",a.axisY2Label).attr("transform",e.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForY2AxisLabel.bind(this))},S.prototype.getXAxis=function(t,e,i,n,r,a,o){var s=this.owner,c=s.config,d={isCategory:s.isCategorized(),withOuterTick:r,tickMultiline:c.axis_x_tick_multiline,tickMultilineMax:c.axis_x_tick_multiline?Number(c.axis_x_tick_multilineMax):0,tickWidth:c.axis_x_tick_width,tickTextRotate:o?0:c.axis_x_tick_rotate,withoutTransition:a},l=new this.internal(this,d).axis.scale(t).orient(e);return s.isTimeSeries()&&n&&"function"!=typeof n&&(n=n.map(function(t){return s.parseDate(t)})),l.tickFormat(i).tickValues(n),s.isCategorized()&&(l.tickCentered(c.axis_x_tick_centered),g(c.axis_x_tick_culling)&&(c.axis_x_tick_culling=!1)),l},S.prototype.updateXAxisTickValues=function(t,e){var i,n=this.owner,r=n.config;return(r.axis_x_tick_fit||r.axis_x_tick_count)&&(i=this.generateTickValues(n.mapTargetsToUniqueXs(t),r.axis_x_tick_count,n.isTimeSeries())),e?e.tickValues(i):(n.xAxis.tickValues(i),n.subXAxis.tickValues(i)),i},S.prototype.getYAxis=function(t,e,i,n,r,a,o){var s=this.owner,c=s.config,d={withOuterTick:r,withoutTransition:a,tickTextRotate:o?0:c.axis_y_tick_rotate},l=new this.internal(this,d).axis.scale(t).orient(e).tickFormat(i);return s.isTimeSeriesY()?l.ticks(c.axis_y_tick_time_type,c.axis_y_tick_time_interval):l.tickValues(n),l},S.prototype.getId=function(t){var e=this.owner.config;return t in e.data_axes?e.data_axes[t]:"y"},S.prototype.getXAxisTickFormat=function(){var t=this.owner,e=t.config,i=t.isTimeSeries()?t.defaultAxisTimeFormat:t.isCategorized()?t.categoryName:function(t){return t};return e.axis_x_tick_format&&(p(e.axis_x_tick_format)?i=e.axis_x_tick_format:t.isTimeSeries()&&(i=function(i){return i?t.axisTimeFormat(e.axis_x_tick_format)(i):""})),p(i)?function(e){return i.call(t,e)}:i},S.prototype.getTickValues=function(t,e){return t||(e?e.tickValues():void 0)},S.prototype.getXAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_x_tick_values,this.owner.xAxis)},S.prototype.getYAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y_tick_values,this.owner.yAxis)},S.prototype.getY2AxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y2_tick_values,this.owner.y2Axis)},S.prototype.getLabelOptionByAxisId=function(t){var e,i=this.owner,n=i.config;return"y"===t?e=n.axis_y_label:"y2"===t?e=n.axis_y2_label:"x"===t&&(e=n.axis_x_label),e},S.prototype.getLabelText=function(t){var e=this.getLabelOptionByAxisId(t);return f(e)?e:e?e.text:null},S.prototype.setLabelText=function(t,e){var i=this.owner,n=i.config,r=this.getLabelOptionByAxisId(t);f(r)?"y"===t?n.axis_y_label=e:"y2"===t?n.axis_y2_label=e:"x"===t&&(n.axis_x_label=e):r&&(r.text=e)},S.prototype.getLabelPosition=function(e,i){var n=this.getLabelOptionByAxisId(e),r=n&&"object"===t(n)&&n.position?n.position:i;return{isInner:r.indexOf("inner")>=0,isOuter:r.indexOf("outer")>=0,isLeft:r.indexOf("left")>=0,isCenter:r.indexOf("center")>=0,isRight:r.indexOf("right")>=0,isTop:r.indexOf("top")>=0,isMiddle:r.indexOf("middle")>=0,isBottom:r.indexOf("bottom")>=0}},S.prototype.getXAxisLabelPosition=function(){return this.getLabelPosition("x",this.owner.config.axis_rotated?"inner-top":"inner-right")},S.prototype.getYAxisLabelPosition=function(){return this.getLabelPosition("y",this.owner.config.axis_rotated?"inner-right":"inner-top")},S.prototype.getY2AxisLabelPosition=function(){return this.getLabelPosition("y2",this.owner.config.axis_rotated?"inner-right":"inner-top")},S.prototype.getLabelPositionById=function(t){return"y2"===t?this.getY2AxisLabelPosition():"y"===t?this.getYAxisLabelPosition():this.getXAxisLabelPosition()},S.prototype.textForXAxisLabel=function(){return this.getLabelText("x")},S.prototype.textForYAxisLabel=function(){return this.getLabelText("y")},S.prototype.textForY2AxisLabel=function(){return this.getLabelText("y2")},S.prototype.xForAxisLabel=function(t,e){var i=this.owner;return t?e.isLeft?0:e.isCenter?i.width/2:i.width:e.isBottom?-i.height:e.isMiddle?-i.height/2:0},S.prototype.dxForAxisLabel=function(t,e){return t?e.isLeft?"0.5em":e.isRight?"-0.5em":"0":e.isTop?"-0.5em":e.isBottom?"0.5em":"0"},S.prototype.textAnchorForAxisLabel=function(t,e){return t?e.isLeft?"start":e.isCenter?"middle":"end":e.isBottom?"start":e.isMiddle?"middle":"end"},S.prototype.xForXAxisLabel=function(){return this.xForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},S.prototype.xForYAxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},S.prototype.xForY2AxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},S.prototype.dxForXAxisLabel=function(){return this.dxForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},S.prototype.dxForYAxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},S.prototype.dxForY2AxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},S.prototype.dyForXAxisLabel=function(){var t=this.owner,e=t.config,i=this.getXAxisLabelPosition();return e.axis_rotated?i.isInner?"1.2em":-25-(t.config.axis_x_inner?0:this.getMaxTickWidth("x")):i.isInner?"-0.5em":e.axis_x_height?e.axis_x_height-10:"3em"},S.prototype.dyForYAxisLabel=function(){var t=this.owner,e=this.getYAxisLabelPosition();return t.config.axis_rotated?e.isInner?"-0.5em":"3em":e.isInner?"1.2em":-10-(t.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)},S.prototype.dyForY2AxisLabel=function(){var t=this.owner,e=this.getY2AxisLabelPosition();return t.config.axis_rotated?e.isInner?"1.2em":"-2.2em":e.isInner?"-0.5em":15+(t.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)},S.prototype.textAnchorForXAxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(!t.config.axis_rotated,this.getXAxisLabelPosition())},S.prototype.textAnchorForYAxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(t.config.axis_rotated,this.getYAxisLabelPosition())},S.prototype.textAnchorForY2AxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(t.config.axis_rotated,this.getY2AxisLabelPosition())},S.prototype.getMaxTickWidth=function(t,e){var i,n,r,a,o=this.owner,s=o.config,c=0;return e&&o.currentMaxTickWidths[t]?o.currentMaxTickWidths[t]:(o.svg&&(i=o.filterTargetsToShow(o.data.targets),"y"===t?(n=o.y.copy().domain(o.getYDomain(i,"y")),r=this.getYAxis(n,o.yOrient,s.axis_y_tick_format,o.yAxisTickValues,!1,!0,!0)):"y2"===t?(n=o.y2.copy().domain(o.getYDomain(i,"y2")),r=this.getYAxis(n,o.y2Orient,s.axis_y2_tick_format,o.y2AxisTickValues,!1,!0,!0)):(n=o.x.copy().domain(o.getXDomain(i)),r=this.getXAxis(n,o.xOrient,o.xAxisTickFormat,o.xAxisTickValues,!1,!0,!0),this.updateXAxisTickValues(i,r)),(a=o.d3.select("body").append("div").classed("c3",!0)).append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0).append("g").call(r).each(function(){o.d3.select(this).selectAll("text").each(function(){var t=this.getBoundingClientRect();c<t.width&&(c=t.width)}),a.remove()})),o.currentMaxTickWidths[t]=c<=0?o.currentMaxTickWidths[t]:c,o.currentMaxTickWidths[t])},S.prototype.updateLabels=function(t){var e=this.owner,i=e.main.select("."+a.axisX+" ."+a.axisXLabel),n=e.main.select("."+a.axisY+" ."+a.axisYLabel),r=e.main.select("."+a.axisY2+" ."+a.axisY2Label);(t?i.transition():i).attr("x",this.xForXAxisLabel.bind(this)).attr("dx",this.dxForXAxisLabel.bind(this)).attr("dy",this.dyForXAxisLabel.bind(this)).text(this.textForXAxisLabel.bind(this)),(t?n.transition():n).attr("x",this.xForYAxisLabel.bind(this)).attr("dx",this.dxForYAxisLabel.bind(this)).attr("dy",this.dyForYAxisLabel.bind(this)).text(this.textForYAxisLabel.bind(this)),(t?r.transition():r).attr("x",this.xForY2AxisLabel.bind(this)).attr("dx",this.dxForY2AxisLabel.bind(this)).attr("dy",this.dyForY2AxisLabel.bind(this)).text(this.textForY2AxisLabel.bind(this))},S.prototype.getPadding=function(t,e,i,n){var r="number"==typeof t?t:t[e];return x(r)?"ratio"===t.unit?t[e]*n:this.convertPixelsToAxisPadding(r,n):i},S.prototype.convertPixelsToAxisPadding=function(t,e){var i=this.owner,n=i.config.axis_rotated?i.width:i.height;return e*(t/n)},S.prototype.generateTickValues=function(t,e,i){var n,r,a,o,s,c,d,l=t;if(e)if(1===(n=p(e)?e():e))l=[t[0]];else if(2===n)l=[t[0],t[t.length-1]];else if(n>2){for(o=n-2,r=t[0],a=t[t.length-1],s=(a-r)/(o+1),l=[r],c=0;c<o;c++)d=+r+s*(c+1),l.push(i?new Date(d):d);l.push(a)}return i||(l=l.sort(function(t,e){return t-e})),l},S.prototype.generateTransitions=function(t){var e=this.owner,i=e.axes;return{axisX:t?i.x.transition().duration(t):i.x,axisY:t?i.y.transition().duration(t):i.y,axisY2:t?i.y2.transition().duration(t):i.y2,axisSubX:t?i.subx.transition().duration(t):i.subx}},S.prototype.redraw=function(t,e){var i=this.owner,n=t?i.d3.transition().duration(t):null;i.axes.x.style("opacity",e?0:1).call(i.xAxis,n),i.axes.y.style("opacity",e?0:1).call(i.yAxis,n),i.axes.y2.style("opacity",e?0:1).call(i.y2Axis,n),i.axes.subx.style("opacity",e?0:1).call(i.subXAxis,n)};var w={version:"0.6.8",chart:{fn:n.prototype,internal:{fn:e.prototype,axis:{fn:S.prototype,internal:{fn:r.prototype}}}},generate:function(t){return new n(t)}};return e.prototype.beforeInit=function(){},e.prototype.afterInit=function(){},e.prototype.init=function(){var t=this,e=t.config;if(t.initParams(),e.data_url)t.convertUrlToData(e.data_url,e.data_mimeType,e.data_headers,e.data_keys,t.initWithData);else if(e.data_json)t.initWithData(t.convertJsonToData(e.data_json,e.data_keys));else if(e.data_rows)t.initWithData(t.convertRowsToData(e.data_rows));else{if(!e.data_columns)throw Error("url or json or rows or columns is required.");t.initWithData(t.convertColumnsToData(e.data_columns))}},e.prototype.initParams=function(){var t=this,e=t.d3,i=t.config;t.clipId="c3-"+ +new Date+"-clip",t.clipIdForXAxis=t.clipId+"-xaxis",t.clipIdForYAxis=t.clipId+"-yaxis",t.clipIdForGrid=t.clipId+"-grid",t.clipIdForSubchart=t.clipId+"-subchart",t.clipPath=t.getClipPath(t.clipId),t.clipPathForXAxis=t.getClipPath(t.clipIdForXAxis),t.clipPathForYAxis=t.getClipPath(t.clipIdForYAxis),t.clipPathForGrid=t.getClipPath(t.clipIdForGrid),t.clipPathForSubchart=t.getClipPath(t.clipIdForSubchart),t.dragStart=null,t.dragging=!1,t.flowing=!1,t.cancelClick=!1,t.mouseover=!1,t.transiting=!1,t.color=t.generateColor(),t.levelColor=t.generateLevelColor(),t.dataTimeParse=(i.data_xLocaltime?e.timeParse:e.utcParse)(t.config.data_xFormat),t.axisTimeFormat=i.axis_x_localtime?e.timeFormat:e.utcFormat,t.defaultAxisTimeFormat=function(t){return t.getMilliseconds()?e.timeFormat(".%L")(t):t.getSeconds()?e.timeFormat(":%S")(t):t.getMinutes()?e.timeFormat("%I:%M")(t):t.getHours()?e.timeFormat("%I %p")(t):t.getDay()&&1!==t.getDate()?e.timeFormat("%-m/%-d")(t):1!==t.getDate()?e.timeFormat("%-m/%-d")(t):t.getMonth()?e.timeFormat("%-m/%-d")(t):e.timeFormat("%Y/%-m/%-d")(t)},t.hiddenTargetIds=[],t.hiddenLegendIds=[],t.focusedTargetIds=[],t.defocusedTargetIds=[],t.xOrient=i.axis_rotated?i.axis_x_inner?"right":"left":i.axis_x_inner?"top":"bottom",t.yOrient=i.axis_rotated?i.axis_y_inner?"top":"bottom":i.axis_y_inner?"right":"left",t.y2Orient=i.axis_rotated?i.axis_y2_inner?"bottom":"top":i.axis_y2_inner?"left":"right",t.subXOrient=i.axis_rotated?"left":"bottom",t.isLegendRight="right"===i.legend_position,t.isLegendInset="inset"===i.legend_position,t.isLegendTop="top-left"===i.legend_inset_anchor||"top-right"===i.legend_inset_anchor,t.isLegendLeft="top-left"===i.legend_inset_anchor||"bottom-left"===i.legend_inset_anchor,t.legendStep=0,t.legendItemWidth=0,t.legendItemHeight=0,t.currentMaxTickWidths={x:0,y:0,y2:0},t.rotated_padding_left=30,t.rotated_padding_right=i.axis_rotated&&!i.axis_x_show?0:30,t.rotated_padding_top=5,t.withoutFadeIn={},t.intervalForObserveInserted=void 0,t.axes.subx=e.selectAll([])},e.prototype.initChartElements=function(){this.initBar&&this.initBar(),this.initLine&&this.initLine(),this.initArc&&this.initArc(),this.initGauge&&this.initGauge(),this.initText&&this.initText()},e.prototype.initWithData=function(t){var e,i,n=this,r=n.d3,o=n.config,s=!0;n.axis=new S(n),o.bindto?"function"==typeof o.bindto.node?n.selectChart=o.bindto:n.selectChart=r.select(o.bindto):n.selectChart=r.selectAll([]),n.selectChart.empty()&&(n.selectChart=r.select(document.createElement("div")).style("opacity",0),n.observeInserted(n.selectChart),s=!1),n.selectChart.html("").classed("c3",!0),n.data.xs={},n.data.targets=n.convertDataToTargets(t),o.data_filter&&(n.data.targets=n.data.targets.filter(o.data_filter)),o.data_hide&&n.addHiddenTargetIds(!0===o.data_hide?n.mapToIds(n.data.targets):o.data_hide),o.legend_hide&&n.addHiddenLegendIds(!0===o.legend_hide?n.mapToIds(n.data.targets):o.legend_hide),n.updateSizes(),n.updateScales(),n.x.domain(r.extent(n.getXDomain(n.data.targets))),n.y.domain(n.getYDomain(n.data.targets,"y")),n.y2.domain(n.getYDomain(n.data.targets,"y2")),n.subX.domain(n.x.domain()),n.subY.domain(n.y.domain()),n.subY2.domain(n.y2.domain()),n.orgXDomain=n.x.domain(),n.svg=n.selectChart.append("svg").style("overflow","hidden").on("mouseenter",function(){return o.onmouseover.call(n)}).on("mouseleave",function(){return o.onmouseout.call(n)}),n.config.svg_classname&&n.svg.attr("class",n.config.svg_classname),e=n.svg.append("defs"),n.clipChart=n.appendClip(e,n.clipId),n.clipXAxis=n.appendClip(e,n.clipIdForXAxis),n.clipYAxis=n.appendClip(e,n.clipIdForYAxis),n.clipGrid=n.appendClip(e,n.clipIdForGrid),n.clipSubchart=n.appendClip(e,n.clipIdForSubchart),n.updateSvgSize(),i=n.main=n.svg.append("g").attr("transform",n.getTranslate("main")),n.initPie&&n.initPie(),n.initDragZoom&&n.initDragZoom(),n.initSubchart&&n.initSubchart(),n.initTooltip&&n.initTooltip(),n.initLegend&&n.initLegend(),n.initTitle&&n.initTitle(),n.initZoom&&n.initZoom(),n.initSubchartBrush&&n.initSubchartBrush(),i.append("text").attr("class",a.text+" "+a.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),n.initRegion(),n.initGrid(),i.append("g").attr("clip-path",n.clipPath).attr("class",a.chart),o.grid_lines_front&&n.initGridLines(),n.initEventRect(),n.initChartElements(),n.axis.init(),n.updateTargets(n.data.targets),o.axis_x_selection&&n.brush.selectionAsValue(n.getDefaultSelection()),s&&(n.updateDimension(),n.config.oninit.call(n),n.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1})),n.bindResize(),n.api.element=n.selectChart.node()},e.prototype.smoothLines=function(t,e){var i=this;"grid"===e&&t.each(function(){var t=i.d3.select(this),e=t.attr("x1"),n=t.attr("x2"),r=t.attr("y1"),a=t.attr("y2");t.attr({x1:Math.ceil(e),x2:Math.ceil(n),y1:Math.ceil(r),y2:Math.ceil(a)})})},e.prototype.updateSizes=function(){var t=this,e=t.config,i=t.legend?t.getLegendHeight():0,n=t.legend?t.getLegendWidth():0,r=t.isLegendRight||t.isLegendInset?0:i,a=t.hasArcType(),o=e.axis_rotated||a?0:t.getHorizontalAxisHeight("x"),s=e.subchart_show&&!a?e.subchart_size_height+o:0;t.currentWidth=t.getCurrentWidth(),t.currentHeight=t.getCurrentHeight(),t.margin=e.axis_rotated?{top:t.getHorizontalAxisHeight("y2")+t.getCurrentPaddingTop(),right:a?0:t.getCurrentPaddingRight(),bottom:t.getHorizontalAxisHeight("y")+r+t.getCurrentPaddingBottom(),left:s+(a?0:t.getCurrentPaddingLeft())}:{top:4+t.getCurrentPaddingTop(),right:a?0:t.getCurrentPaddingRight(),bottom:o+s+r+t.getCurrentPaddingBottom(),left:a?0:t.getCurrentPaddingLeft()},t.margin2=e.axis_rotated?{top:t.margin.top,right:NaN,bottom:20+r,left:t.rotated_padding_left}:{top:t.currentHeight-s-r,right:NaN,bottom:o+r,left:t.margin.left},t.margin3={top:0,right:NaN,bottom:0,left:0},t.updateSizeForLegend&&t.updateSizeForLegend(i,n),t.width=t.currentWidth-t.margin.left-t.margin.right,t.height=t.currentHeight-t.margin.top-t.margin.bottom,t.width<0&&(t.width=0),t.height<0&&(t.height=0),t.width2=e.axis_rotated?t.margin.left-t.rotated_padding_left-t.rotated_padding_right:t.width,t.height2=e.axis_rotated?t.height:t.currentHeight-t.margin2.top-t.margin2.bottom,t.width2<0&&(t.width2=0),t.height2<0&&(t.height2=0),t.arcWidth=t.width-(t.isLegendRight?n+10:0),t.arcHeight=t.height-(t.isLegendRight?0:10),t.hasType("gauge")&&!e.gauge_fullCircle&&(t.arcHeight+=t.height-t.getGaugeLabelHeight()),t.updateRadius&&t.updateRadius(),t.isLegendRight&&a&&(t.margin3.left=t.arcWidth/2+1.1*t.radiusExpanded)},e.prototype.updateTargets=function(t){var e=this;e.updateTargetsForText(t),e.updateTargetsForBar(t),e.updateTargetsForLine(t),e.hasArcType()&&e.updateTargetsForArc&&e.updateTargetsForArc(t),e.updateTargetsForSubchart&&e.updateTargetsForSubchart(t),e.showTargets()},e.prototype.showTargets=function(){var t=this;t.svg.selectAll("."+a.target).filter(function(e){return t.isTargetToShow(e.id)}).transition().duration(t.config.transition_duration).style("opacity",1)},e.prototype.redraw=function(t,e){var i,n,r,o,s,c,l,u,h,g,p,f,_,x,y,m,S,w,v,b,T,A,P,C,L,V,G,E,O,I,R,k=this,D=k.main,F=k.d3,X=k.config,M=k.getShapeIndices(k.isAreaType),z=k.getShapeIndices(k.isBarType),H=k.getShapeIndices(k.isLineType),B=k.hasArcType(),Y=k.filterTargetsToShow(k.data.targets),N=k.xv.bind(k);if(i=d(t=t||{},"withY",!0),n=d(t,"withSubchart",!0),r=d(t,"withTransition",!0),c=d(t,"withTransform",!1),l=d(t,"withUpdateXDomain",!1),u=d(t,"withUpdateOrgXDomain",!1),h=d(t,"withTrimXDomain",!0),_=d(t,"withUpdateXAxis",l),g=d(t,"withLegend",!1),p=d(t,"withEventRect",!0),f=d(t,"withDimension",!0),o=d(t,"withTransitionForExit",r),s=d(t,"withTransitionForAxis",r),v=r?X.transition_duration:0,b=o?v:0,T=s?v:0,e=e||k.axis.generateTransitions(T),g&&X.legend_show?k.updateLegend(k.mapToIds(k.data.targets),t,e):f&&k.updateDimension(!0),k.isCategorized()&&0===Y.length&&k.x.domain([0,k.axes.x.selectAll(".tick").size()]),Y.length?(k.updateXDomain(Y,l,u,h),X.axis_x_tick_values||(V=k.axis.updateXAxisTickValues(Y))):(k.xAxis.tickValues([]),k.subXAxis.tickValues([])),X.zoom_rescale&&!t.flow&&(O=k.x.orgDomain()),k.y.domain(k.getYDomain(Y,"y",O)),k.y2.domain(k.getYDomain(Y,"y2",O)),!X.axis_y_tick_values&&X.axis_y_tick_count&&k.yAxis.tickValues(k.axis.generateTickValues(k.y.domain(),X.axis_y_tick_count)),!X.axis_y2_tick_values&&X.axis_y2_tick_count&&k.y2Axis.tickValues(k.axis.generateTickValues(k.y2.domain(),X.axis_y2_tick_count)),k.axis.redraw(T,B),k.axis.updateLabels(r),(l||_)&&Y.length)if(X.axis_x_tick_culling&&V){for(G=1;G<V.length;G++)if(V.length/G<X.axis_x_tick_culling_max){E=G;break}k.svg.selectAll("."+a.axisX+" .tick text").each(function(t){var e=V.indexOf(t);e>=0&&F.select(this).style("display",e%E?"none":"block")})}else k.svg.selectAll("."+a.axisX+" .tick text").style("display","block");x=k.generateDrawArea?k.generateDrawArea(M,!1):void 0,y=k.generateDrawBar?k.generateDrawBar(z):void 0,m=k.generateDrawLine?k.generateDrawLine(H,!1):void 0,S=k.generateXYForText(M,z,H,!0),w=k.generateXYForText(M,z,H,!1),k.updateCircleY(),I=(k.config.axis_rotated?k.circleY:k.circleX).bind(k),R=(k.config.axis_rotated?k.circleX:k.circleY).bind(k),i&&(k.subY.domain(k.getYDomain(Y,"y")),k.subY2.domain(k.getYDomain(Y,"y2"))),k.updateXgridFocus(),D.select("text."+a.text+"."+a.empty).attr("x",k.width/2).attr("y",k.height/2).text(X.data_empty_label_text).transition().style("opacity",Y.length?0:1),p&&k.redrawEventRect(),k.updateGrid(v),k.updateRegion(v),k.updateBar(b),k.updateLine(b),k.updateArea(b),k.updateCircle(I,R),k.hasDataLabel()&&k.updateText(S,w,b),k.redrawTitle&&k.redrawTitle(),k.redrawArc&&k.redrawArc(v,b,c),k.redrawSubchart&&k.redrawSubchart(n,e,v,b,M,z,H),D.selectAll("."+a.selectedCircles).filter(k.isBarType.bind(k)).selectAll("circle").remove(),t.flow&&(C=k.generateFlow({targets:Y,flow:t.flow,duration:t.flow.duration,drawBar:y,drawLine:m,drawArea:x,cx:I,cy:R,xv:N,xForText:S,yForText:w})),k.isTabVisible()&&(v?(L=F.transition().duration(v),A=[],[k.redrawBar(y,!0,L),k.redrawLine(m,!0,L),k.redrawArea(x,!0,L),k.redrawCircle(I,R,!0,L),k.redrawText(S,w,t.flow,!0,L),k.redrawRegion(!0,L),k.redrawGrid(!0,L)].forEach(function(t){t.forEach(function(t){A.push(t)})}),P=k.generateWait(),A.forEach(function(t){P.add(t)}),P(function(){C&&C(),X.onrendered&&X.onrendered.call(k)})):(k.redrawBar(y),k.redrawLine(m),k.redrawArea(x),k.redrawCircle(I,R),k.redrawText(S,w,t.flow),k.redrawRegion(),k.redrawGrid(),C&&C(),X.onrendered&&X.onrendered.call(k))),k.mapToIds(k.data.targets).forEach(function(t){k.withoutFadeIn[t]=!0})},e.prototype.updateAndRedraw=function(t){var e,i=this,n=i.config;(t=t||{}).withTransition=d(t,"withTransition",!0),t.withTransform=d(t,"withTransform",!1),t.withLegend=d(t,"withLegend",!1),t.withUpdateXDomain=d(t,"withUpdateXDomain",!0),t.withUpdateOrgXDomain=d(t,"withUpdateOrgXDomain",!0),t.withTransitionForExit=!1,t.withTransitionForTransform=d(t,"withTransitionForTransform",t.withTransition),i.updateSizes(),t.withLegend&&n.legend_show||(e=i.axis.generateTransitions(t.withTransitionForAxis?n.transition_duration:0),i.updateScales(),i.updateSvgSize(),i.transformAll(t.withTransitionForTransform,e)),i.redraw(t,e)},e.prototype.redrawWithoutRescale=function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},e.prototype.isTimeSeries=function(){return"timeseries"===this.config.axis_x_type},e.prototype.isCategorized=function(){return this.config.axis_x_type.indexOf("categor")>=0},e.prototype.isCustomX=function(){var t=this.config;return!this.isTimeSeries()&&(t.data_x||y(t.data_xs))},e.prototype.isTimeSeriesY=function(){return"timeseries"===this.config.axis_y_type},e.prototype.getTranslate=function(t){var e,i,n=this,r=n.config;return"main"===t?(e=o(n.margin.left),i=o(n.margin.top)):"context"===t?(e=o(n.margin2.left),i=o(n.margin2.top)):"legend"===t?(e=n.margin3.left,i=n.margin3.top):"x"===t?(e=0,i=r.axis_rotated?0:n.height):"y"===t?(e=0,i=r.axis_rotated?n.height:0):"y2"===t?(e=r.axis_rotated?0:n.width,i=r.axis_rotated?1:0):"subx"===t?(e=0,i=r.axis_rotated?0:n.height2):"arc"===t&&(e=n.arcWidth/2,i=n.arcHeight/2-(n.hasType("gauge")?6:0)),"translate("+e+","+i+")"},e.prototype.initialOpacity=function(t){return null!==t.value&&this.withoutFadeIn[t.id]?1:0},e.prototype.initialOpacityForCircle=function(t){return null!==t.value&&this.withoutFadeIn[t.id]?this.opacityForCircle(t):0},e.prototype.opacityForCircle=function(t){var e=(p(this.config.point_show)?this.config.point_show(t):this.config.point_show)?1:0;return x(t.value)?this.isScatterType(t)?.5:e:0},e.prototype.opacityForText=function(){return this.hasDataLabel()?1:0},e.prototype.xx=function(t){return t?this.x(t.x):null},e.prototype.xv=function(t){var e=this,i=t.value;return e.isTimeSeries()?i=e.parseDate(t.value):e.isCategorized()&&"string"==typeof t.value&&(i=e.config.axis_x_categories.indexOf(t.value)),Math.ceil(e.x(i))},e.prototype.yv=function(t){var e=t.axis&&"y2"===t.axis?this.y2:this.y;return Math.ceil(e(t.value))},e.prototype.subxx=function(t){return t?this.subX(t.x):null},e.prototype.transformMain=function(t,e){var i,n,r,o=this;e&&e.axisX?i=e.axisX:(i=o.main.select("."+a.axisX),t&&(i=i.transition())),e&&e.axisY?n=e.axisY:(n=o.main.select("."+a.axisY),t&&(n=n.transition())),e&&e.axisY2?r=e.axisY2:(r=o.main.select("."+a.axisY2),t&&(r=r.transition())),(t?o.main.transition():o.main).attr("transform",o.getTranslate("main")),i.attr("transform",o.getTranslate("x")),n.attr("transform",o.getTranslate("y")),r.attr("transform",o.getTranslate("y2")),o.main.select("."+a.chartArcs).attr("transform",o.getTranslate("arc"))},e.prototype.transformAll=function(t,e){var i=this;i.transformMain(t,e),i.config.subchart_show&&i.transformContext(t,e),i.legend&&i.transformLegend(t)},e.prototype.updateSvgSize=function(){var t=this,e=t.svg.select(".c3-brush .overlay");t.svg.attr("width",t.currentWidth).attr("height",t.currentHeight),t.svg.selectAll(["#"+t.clipId,"#"+t.clipIdForGrid]).select("rect").attr("width",t.width).attr("height",t.height),t.svg.select("#"+t.clipIdForXAxis).select("rect").attr("x",t.getXAxisClipX.bind(t)).attr("y",t.getXAxisClipY.bind(t)).attr("width",t.getXAxisClipWidth.bind(t)).attr("height",t.getXAxisClipHeight.bind(t)),t.svg.select("#"+t.clipIdForYAxis).select("rect").attr("x",t.getYAxisClipX.bind(t)).attr("y",t.getYAxisClipY.bind(t)).attr("width",t.getYAxisClipWidth.bind(t)).attr("height",t.getYAxisClipHeight.bind(t)),t.svg.select("#"+t.clipIdForSubchart).select("rect").attr("width",t.width).attr("height",e.size()?e.attr("height"):0),t.selectChart.style("max-height",t.currentHeight+"px")},e.prototype.updateDimension=function(t){var e=this;t||(e.config.axis_rotated?(e.axes.x.call(e.xAxis),e.axes.subx.call(e.subXAxis)):(e.axes.y.call(e.yAxis),e.axes.y2.call(e.y2Axis))),e.updateSizes(),e.updateScales(),e.updateSvgSize(),e.transformAll(!1)},e.prototype.observeInserted=function(t){var e,i=this;"undefined"!=typeof MutationObserver?(e=new MutationObserver(function(n){n.forEach(function(n){"childList"===n.type&&n.previousSibling&&(e.disconnect(),i.intervalForObserveInserted=window.setInterval(function(){t.node().parentNode&&(window.clearInterval(i.intervalForObserveInserted),i.updateDimension(),i.brush&&i.brush.update(),i.config.oninit.call(i),i.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),t.transition().style("opacity",1))},10))})})).observe(t.node(),{attributes:!0,childList:!0,characterData:!0}):window.console.error("MutationObserver not defined.")},e.prototype.bindResize=function(){var t=this,e=t.config;if(t.resizeFunction=t.generateResize(),t.resizeFunction.add(function(){e.onresize.call(t)}),e.resize_auto&&t.resizeFunction.add(function(){void 0!==t.resizeTimeout&&window.clearTimeout(t.resizeTimeout),t.resizeTimeout=window.setTimeout(function(){delete t.resizeTimeout,t.updateAndRedraw({withUpdateXDomain:!1,withUpdateOrgXDomain:!1,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),t.brush&&t.brush.update()},100)}),t.resizeFunction.add(function(){e.onresized.call(t)}),t.resizeIfElementDisplayed=function(){null!=t.api&&t.api.element.offsetParent&&t.resizeFunction()},window.attachEvent)window.attachEvent("onresize",t.resizeIfElementDisplayed);else if(window.addEventListener)window.addEventListener("resize",t.resizeIfElementDisplayed,!1);else{var i=window.onresize;i?i.add&&i.remove||(i=t.generateResize()).add(window.onresize):i=t.generateResize(),i.add(t.resizeFunction),window.onresize=function(){t.api.element.offsetParent&&i()}}},e.prototype.generateResize=function(){var t=[];function e(){t.forEach(function(t){t()})}return e.add=function(e){t.push(e)},e.remove=function(e){for(var i=0;i<t.length;i++)if(t[i]===e){t.splice(i,1);break}},e},e.prototype.endall=function(t,e){var i=0;t.each(function(){++i}).on("end",function(){--i||e.apply(this,arguments)})},e.prototype.generateWait=function(){var t=[],e=function(e){var i=setInterval(function(){var n=0;t.forEach(function(t){if(t.empty())n+=1;else try{t.transition()}catch(t){n+=1}}),n===t.length&&(clearInterval(i),e&&e())},50)};return e.add=function(e){t.push(e)},e},e.prototype.parseDate=function(e){var i;return e instanceof Date?i=e:"string"==typeof e?i=this.dataTimeParse(e):"object"===t(e)?i=new Date(+e):"number"!=typeof e||isNaN(e)||(i=new Date(+e)),i&&!isNaN(+i)||window.console.error("Failed to parse x '"+e+"' to Date object"),i},e.prototype.isTabVisible=function(){var t;return void 0!==document.hidden?t="hidden":void 0!==document.mozHidden?t="mozHidden":void 0!==document.msHidden?t="msHidden":void 0!==document.webkitHidden&&(t="webkitHidden"),!document[t]},e.prototype.getPathBox=l,e.prototype.CLASS=a,"SVGPathSeg"in window||(window.SVGPathSeg=function(t,e,i){this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=i},window.SVGPathSeg.prototype.classname="SVGPathSeg",window.SVGPathSeg.PATHSEG_UNKNOWN=0,window.SVGPathSeg.PATHSEG_CLOSEPATH=1,window.SVGPathSeg.PATHSEG_MOVETO_ABS=2,window.SVGPathSeg.PATHSEG_MOVETO_REL=3,window.SVGPathSeg.PATHSEG_LINETO_ABS=4,window.SVGPathSeg.PATHSEG_LINETO_REL=5,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,window.SVGPathSeg.PATHSEG_ARC_ABS=10,window.SVGPathSeg.PATHSEG_ARC_REL=11,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,window.SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},window.SVGPathSegClosePath=function(t){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CLOSEPATH,"z",t)},window.SVGPathSegClosePath.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},window.SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},window.SVGPathSegClosePath.prototype.clone=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathSegMovetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_ABS,"M",t),this._x=e,this._y=i},window.SVGPathSegMovetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},window.SVGPathSegMovetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegMovetoAbs.prototype.clone=function(){return new window.SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegMovetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_REL,"m",t),this._x=e,this._y=i},window.SVGPathSegMovetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},window.SVGPathSegMovetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegMovetoRel.prototype.clone=function(){return new window.SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_ABS,"L",t),this._x=e,this._y=i},window.SVGPathSegLinetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},window.SVGPathSegLinetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegLinetoAbs.prototype.clone=function(){return new window.SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_REL,"l",t),this._x=e,this._y=i},window.SVGPathSegLinetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},window.SVGPathSegLinetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegLinetoRel.prototype.clone=function(){return new window.SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicAbs=function(t,e,i,n,r,a,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=i,this._x1=n,this._y1=r,this._x2=a,this._y2=o},window.SVGPathSegCurvetoCubicAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},window.SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicRel=function(t,e,i,n,r,a,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=i,this._x1=n,this._y1=r,this._x2=a,this._y2=o},window.SVGPathSegCurvetoCubicRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},window.SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticAbs=function(t,e,i,n,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=i,this._x1=n,this._y1=r},window.SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticRel=function(t,e,i,n,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=i,this._x1=n,this._y1=r},window.SVGPathSegCurvetoQuadraticRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcAbs=function(t,e,i,n,r,a,o,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=i,this._r1=n,this._r2=r,this._angle=a,this._largeArcFlag=o,this._sweepFlag=s},window.SVGPathSegArcAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},window.SVGPathSegArcAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},window.SVGPathSegArcAbs.prototype.clone=function(){return new window.SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcRel=function(t,e,i,n,r,a,o,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=i,this._r1=n,this._r2=r,this._angle=a,this._largeArcFlag=o,this._sweepFlag=s},window.SVGPathSegArcRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},window.SVGPathSegArcRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},window.SVGPathSegArcRel.prototype.clone=function(){return new window.SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",t),this._x=e},window.SVGPathSegLinetoHorizontalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},window.SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",t),this._x=e},window.SVGPathSegLinetoHorizontalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},window.SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},window.SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",t),this._y=e},window.SVGPathSegLinetoVerticalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},window.SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},window.SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",t),this._y=e},window.SVGPathSegLinetoVerticalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},window.SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},window.SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,n,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=i,this._x2=n,this._y2=r},window.SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothRel=function(t,e,i,n,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=i,this._x2=n,this._y2=r},window.SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new window.SVGPathSegMovetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new window.SVGPathSegMovetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new window.SVGPathSegLinetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new window.SVGPathSegLinetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,i,n,r,a){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,i,n,r,a)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,i,n,r,a){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,i,n,r,a)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,i,n){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,i,n){return new window.SVGPathSegCurvetoQuadraticRel(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,i,n,r,a,o){return new window.SVGPathSegArcAbs(void 0,t,e,i,n,r,a,o)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,i,n,r,a,o){return new window.SVGPathSegArcRel(void 0,t,e,i,n,r,a,o)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(t){return new window.SVGPathSegLinetoHorizontalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(t){return new window.SVGPathSegLinetoHorizontalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(t){return new window.SVGPathSegLinetoVerticalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(t){return new window.SVGPathSegLinetoVerticalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,n){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,i,n){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,t,e)},"getPathSegAtLength"in window.SVGPathElement.prototype||(window.SVGPathElement.prototype.getPathSegAtLength=function(t){if(void 0===t||!isFinite(t))throw"Invalid arguments.";var e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",this.getAttribute("d"));var i=e.pathSegList.numberOfItems-1;if(i<=0)return 0;do{if(e.pathSegList.removeItem(i),t>e.getTotalLength())break;i--}while(i>0);return i})),"SVGPathSegList"in window||(window.SVGPathSegList=function(t){this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(t){if(this._pathElement){var e=!1;t.forEach(function(t){"d"==t.attributeName&&(e=!0)}),e&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))}},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(t){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach(function(t){t._owningPathSegList=null}),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(t){return this._checkPathSynchronizedToList(),this._list=[t],t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype._checkValidIndex=function(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]},window.SVGPathSegList.prototype.insertItemBefore=function(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.replaceItem=function(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),this._list[e]=t,t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.removeItem=function(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);var e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e},window.SVGPathSegList.prototype.appendItem=function(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList._pathSegArrayAsString=function(t){var e="",i=!0;return t.forEach(function(t){i?(i=!1,e+=t._asPathString()):e+=" "+t._asPathString()}),e},window.SVGPathSegList.prototype._parsePath=function(t){if(!t||0==t.length)return[];var e=this,i=function(){this.pathSegList=[]};i.prototype.appendSegment=function(t){this.pathSegList.push(t)};var n=function(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};n.prototype._isCurrentSpace=function(){var t=this._string[this._currentIndex];return t<=" "&&(" "==t||"\n"==t||"\t"==t||"\r"==t||"\f"==t)},n.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},n.prototype._skipOptionalSpacesOrDelimiter=function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex))&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},n.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},n.prototype.peekSegmentType=function(){var t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)},n.prototype._pathSegTypeFromChar=function(t){switch(t){case"Z":case"z":return window.SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return window.SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return window.SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return window.SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return window.SVGPathSeg.PATHSEG_LINETO_REL;case"C":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return window.SVGPathSeg.PATHSEG_ARC_ABS;case"a":return window.SVGPathSeg.PATHSEG_ARC_REL;case"H":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return window.SVGPathSeg.PATHSEG_UNKNOWN}},n.prototype._nextCommandHelper=function(t,e){return("+"==t||"-"==t||"."==t||t>="0"&&t<="9")&&e!=window.SVGPathSeg.PATHSEG_CLOSEPATH?e==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:e==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:e:window.SVGPathSeg.PATHSEG_UNKNOWN},n.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;var t=this.peekSegmentType();return t==window.SVGPathSeg.PATHSEG_MOVETO_ABS||t==window.SVGPathSeg.PATHSEG_MOVETO_REL},n.prototype._parseNumber=function(){var t=0,e=0,i=1,n=0,r=1,a=1,o=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,r=-1),!(this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))){for(var s=this._currentIndex;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=s)for(var c=this._currentIndex-1,d=1;c>=s;)e+=d*(this._string.charAt(c--)-"0"),d*=10;if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)i*=10,n+=(this._string.charAt(this._currentIndex)-"0")/i,this._currentIndex+=1}if(this._currentIndex!=o&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,a=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)t*=10,t+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}var l=e+n;if(l*=r,t&&(l*=Math.pow(10,a*t)),o!=this._currentIndex)return this._skipOptionalSpacesOrDelimiter(),l}},n.prototype._parseArcFlag=function(){if(!(this._currentIndex>=this._endIndex)){var t=!1,e=this._string.charAt(this._currentIndex++);if("0"==e)t=!1;else{if("1"!=e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t}},n.prototype.parseSegment=function(){var t=this._string[this._currentIndex],i=this._pathSegTypeFromChar(t);if(i==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if((i=this._nextCommandHelper(t,this._previousCommand))==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=i,i){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(e);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:var n={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicRel(e,n.x,n.y,n.x1,n.y1,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(e,n.x,n.y,n.x1,n.y1,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return n={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(e,n.x,n.y,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return n={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(e,n.x,n.y,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(e,n.x,n.y,n.x1,n.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(e,n.x,n.y,n.x1,n.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(e,n.x,n.y,n.x1,n.y1,n.arcAngle,n.arcLarge,n.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(e,n.x,n.y,n.x1,n.y1,n.arcAngle,n.arcLarge,n.arcSweep);default:throw"Unknown path seg type."}};var r=new i,a=new n(t);if(!a.initialCommandIsMoveTo())return[];for(;a.hasMoreData();){var o=a.parseSegment();if(!o)return[];r.appendSegment(o)}return r.pathSegList}),String.prototype.padEnd||(String.prototype.padEnd=function(t,e){return t>>=0,e=String(void 0!==e?e:" "),this.length>t?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),String(this)+e.slice(0,t))}),n.prototype.axis=function(){},n.prototype.axis.labels=function(t){var e=this.internal;arguments.length&&(Object.keys(t).forEach(function(i){e.axis.setLabelText(i,t[i])}),e.axis.updateLabels())},n.prototype.axis.max=function(e){var i=this.internal,n=i.config;if(!arguments.length)return{x:n.axis_x_max,y:n.axis_y_max,y2:n.axis_y2_max};"object"===t(e)?(x(e.x)&&(n.axis_x_max=e.x),x(e.y)&&(n.axis_y_max=e.y),x(e.y2)&&(n.axis_y2_max=e.y2)):n.axis_y_max=n.axis_y2_max=e,i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})},n.prototype.axis.min=function(e){var i=this.internal,n=i.config;if(!arguments.length)return{x:n.axis_x_min,y:n.axis_y_min,y2:n.axis_y2_min};"object"===t(e)?(x(e.x)&&(n.axis_x_min=e.x),x(e.y)&&(n.axis_y_min=e.y),x(e.y2)&&(n.axis_y2_min=e.y2)):n.axis_y_min=n.axis_y2_min=e,i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})},n.prototype.axis.range=function(t){if(!arguments.length)return{max:this.axis.max(),min:this.axis.min()};h(t.max)&&this.axis.max(t.max),h(t.min)&&this.axis.min(t.min)},n.prototype.category=function(t,e){var i=this.internal,n=i.config;return arguments.length>1&&(n.axis_x_categories[t]=e,i.redraw()),n.axis_x_categories[t]},n.prototype.categories=function(t){var e=this.internal,i=e.config;return arguments.length?(i.axis_x_categories=t,e.redraw(),i.axis_x_categories):i.axis_x_categories},n.prototype.resize=function(t){var e=this.internal.config;e.size_width=t?t.width:null,e.size_height=t?t.height:null,this.flush()},n.prototype.flush=function(){this.internal.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},n.prototype.destroy=function(){var t=this.internal;if(window.clearInterval(t.intervalForObserveInserted),void 0!==t.resizeTimeout&&window.clearTimeout(t.resizeTimeout),window.detachEvent)window.detachEvent("onresize",t.resizeIfElementDisplayed);else if(window.removeEventListener)window.removeEventListener("resize",t.resizeIfElementDisplayed);else{var e=window.onresize;e&&e.add&&e.remove&&e.remove(t.resizeFunction)}return t.resizeFunction.remove(),t.selectChart.classed("c3",!1).html(""),Object.keys(t).forEach(function(e){t[e]=null}),null},n.prototype.color=function(t){return this.internal.color(t)},n.prototype.data=function(t){var e=this.internal.data.targets;return void 0===t?e:e.filter(function(e){return[].concat(t).indexOf(e.id)>=0})},n.prototype.data.shown=function(t){return this.internal.filterTargetsToShow(this.data(t))},n.prototype.data.values=function(t){var e,i=null;return t&&(i=(e=this.data(t))[0]?e[0].values.map(function(t){return t.value}):null),i},n.prototype.data.names=function(t){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",t)},n.prototype.data.colors=function(t){return this.internal.updateDataAttributes("colors",t)},n.prototype.data.axes=function(t){return this.internal.updateDataAttributes("axes",t)},n.prototype.flow=function(t){var e,i,n,r,a,o,s,c=this.internal,d=[],l=c.getMaxDataCount(),u=0,g=0;if(t.json)i=c.convertJsonToData(t.json,t.keys);else if(t.rows)i=c.convertRowsToData(t.rows);else{if(!t.columns)return;i=c.convertColumnsToData(t.columns)}e=c.convertDataToTargets(i,!0),c.data.targets.forEach(function(t){var i,n,r=!1;for(i=0;i<e.length;i++)if(t.id===e[i].id){for(r=!0,t.values[t.values.length-1]&&(g=t.values[t.values.length-1].index+1),u=e[i].values.length,n=0;n<u;n++)e[i].values[n].index=g+n,c.isTimeSeries()||(e[i].values[n].x=g+n);t.values=t.values.concat(e[i].values),e.splice(i,1);break}r||d.push(t.id)}),c.data.targets.forEach(function(t){var e,i;for(e=0;e<d.length;e++)if(t.id===d[e])for(g=t.values[t.values.length-1].index+1,i=0;i<u;i++)t.values.push({id:t.id,index:g+i,x:c.isTimeSeries()?c.getOtherTargetX(g+i):g+i,value:null})}),c.data.targets.length&&e.forEach(function(t){var e,i=[];for(e=c.data.targets[0].values[0].index;e<g;e++)i.push({id:t.id,index:e,x:c.isTimeSeries()?c.getOtherTargetX(e):e,value:null});t.values.forEach(function(t){t.index+=g,c.isTimeSeries()||(t.x+=g)}),t.values=i.concat(t.values)}),c.data.targets=c.data.targets.concat(e),c.getMaxDataCount(),a=(r=c.data.targets[0]).values[0],h(t.to)?(u=0,s=c.isTimeSeries()?c.parseDate(t.to):t.to,r.values.forEach(function(t){t.x<s&&u++})):h(t.length)&&(u=t.length),l?1===l&&c.isTimeSeries()&&(o=(r.values[r.values.length-1].x-a.x)/2,n=[new Date(+a.x-o),new Date(+a.x+o)],c.updateXDomain(null,!0,!0,!1,n)):(o=c.isTimeSeries()?r.values.length>1?r.values[r.values.length-1].x-a.x:a.x-c.getXDomain(c.data.targets)[0]:1,n=[a.x-o,a.x],c.updateXDomain(null,!0,!0,!1,n)),c.updateTargets(c.data.targets),c.redraw({flow:{index:a.index,length:u,duration:x(t.duration)?t.duration:c.config.transition_duration,done:t.done,orgDataCount:l},withLegend:!0,withTransition:l>1,withTrimXDomain:!1,withUpdateXAxis:!0})},e.prototype.generateFlow=function(t){var e=this,i=e.config,n=e.d3;return function(){var r,o,s,d,l,u,h,g,p,f,_,x=t.targets,y=t.flow,m=t.drawBar,S=t.drawLine,w=t.drawArea,v=t.cx,b=t.cy,T=t.xv,A=t.xForText,P=t.yForText,C=t.duration,L=y.index,V=y.length,G=e.getValueOnIndex(e.data.targets[0].values,L),E=e.getValueOnIndex(e.data.targets[0].values,L+V),O=e.x.domain(),I=y.duration||C,R=y.done||function(){},k=e.generateWait();e.flowing=!0,e.data.targets.forEach(function(t){t.values.splice(0,V)}),s=e.updateXDomain(x,!0,!0),e.updateXGrid&&e.updateXGrid(!0),d=e.xgrid||n.selectAll([]),l=e.xgridLines||n.selectAll([]),u=e.mainRegion||n.selectAll([]),h=e.mainText||n.selectAll([]),g=e.mainBar||n.selectAll([]),p=e.mainLine||n.selectAll([]),f=e.mainArea||n.selectAll([]),_=e.mainCircle||n.selectAll([]),y.orgDataCount?r=1===y.orgDataCount||(G&&G.x)===(E&&E.x)?e.x(O[0])-e.x(s[0]):e.isTimeSeries()?e.x(O[0])-e.x(s[0]):e.x(G.x)-e.x(E.x):1!==e.data.targets[0].values.length?r=e.x(O[0])-e.x(s[0]):e.isTimeSeries()?(G=e.getValueOnIndex(e.data.targets[0].values,0),E=e.getValueOnIndex(e.data.targets[0].values,e.data.targets[0].values.length-1),r=e.x(G.x)-e.x(E.x)):r=c(s)/2,o="translate("+r+",0) scale("+c(O)/c(s)+",1)",e.hideXGridFocus();var D=n.transition().ease(n.easeLinear).duration(I);k.add(e.xAxis(e.axes.x,D)),k.add(g.transition(D).attr("transform",o)),k.add(p.transition(D).attr("transform",o)),k.add(f.transition(D).attr("transform",o)),k.add(_.transition(D).attr("transform",o)),k.add(h.transition(D).attr("transform",o)),k.add(u.filter(e.isRegionOnX).transition(D).attr("transform",o)),k.add(d.transition(D).attr("transform",o)),k.add(l.transition(D).attr("transform",o)),k(function(){var t,n=[],r=[];if(V){for(t=0;t<V;t++)n.push("."+a.shape+"-"+(L+t)),r.push("."+a.text+"-"+(L+t));e.svg.selectAll("."+a.shapes).selectAll(n).remove(),e.svg.selectAll("."+a.texts).selectAll(r).remove(),e.svg.select("."+a.xgrid).remove()}d.attr("transform",null).attr("x1",e.xgridAttr.x1).attr("x2",e.xgridAttr.x2).attr("y1",e.xgridAttr.y1).attr("y2",e.xgridAttr.y2).style("opacity",e.xgridAttr.opacity),l.attr("transform",null),l.select("line").attr("x1",i.axis_rotated?0:T).attr("x2",i.axis_rotated?e.width:T),l.select("text").attr("x",i.axis_rotated?e.width:0).attr("y",T),g.attr("transform",null).attr("d",m),p.attr("transform",null).attr("d",S),f.attr("transform",null).attr("d",w),_.attr("transform",null).attr("cx",v).attr("cy",b),h.attr("transform",null).attr("x",A).attr("y",P).style("fill-opacity",e.opacityForText.bind(e)),u.attr("transform",null),u.filter(e.isRegionOnX).attr("x",e.regionX.bind(e)).attr("width",e.regionWidth.bind(e)),R(),e.flowing=!1})}},n.prototype.focus=function(t){var e,i=this.internal;t=i.mapToTargetIds(t),e=i.svg.selectAll(i.selectorTargets(t.filter(i.isTargetToShow,i))),this.revert(),this.defocus(),e.classed(a.focused,!0).classed(a.defocused,!1),i.hasArcType()&&i.expandArc(t),i.toggleFocusLegend(t,!0),i.focusedTargetIds=t,i.defocusedTargetIds=i.defocusedTargetIds.filter(function(e){return t.indexOf(e)<0})},n.prototype.defocus=function(t){var e=this.internal;t=e.mapToTargetIds(t),e.svg.selectAll(e.selectorTargets(t.filter(e.isTargetToShow,e))).classed(a.focused,!1).classed(a.defocused,!0),e.hasArcType()&&e.unexpandArc(t),e.toggleFocusLegend(t,!1),e.focusedTargetIds=e.focusedTargetIds.filter(function(e){return t.indexOf(e)<0}),e.defocusedTargetIds=t},n.prototype.revert=function(t){var e=this.internal;t=e.mapToTargetIds(t),e.svg.selectAll(e.selectorTargets(t)).classed(a.focused,!1).classed(a.defocused,!1),e.hasArcType()&&e.unexpandArc(t),e.config.legend_show&&(e.showLegend(t.filter(e.isLegendToShow.bind(e))),e.legend.selectAll(e.selectorLegends(t)).filter(function(){return e.d3.select(this).classed(a.legendItemFocused)}).classed(a.legendItemFocused,!1)),e.focusedTargetIds=[],e.defocusedTargetIds=[]},n.prototype.xgrids=function(t){var e=this.internal,i=e.config;return t?(i.grid_x_lines=t,e.redrawWithoutRescale(),i.grid_x_lines):i.grid_x_lines},n.prototype.xgrids.add=function(t){var e=this.internal;return this.xgrids(e.config.grid_x_lines.concat(t||[]))},n.prototype.xgrids.remove=function(t){this.internal.removeGridLines(t,!0)},n.prototype.ygrids=function(t){var e=this.internal,i=e.config;return t?(i.grid_y_lines=t,e.redrawWithoutRescale(),i.grid_y_lines):i.grid_y_lines},n.prototype.ygrids.add=function(t){var e=this.internal;return this.ygrids(e.config.grid_y_lines.concat(t||[]))},n.prototype.ygrids.remove=function(t){this.internal.removeGridLines(t,!1)},n.prototype.groups=function(t){var e=this.internal,i=e.config;return _(t)?i.data_groups:(i.data_groups=t,e.redraw(),i.data_groups)},n.prototype.legend=function(){},n.prototype.legend.show=function(t){var e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},n.prototype.legend.hide=function(t){var e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!1})},n.prototype.load=function(t){var e=this.internal,i=e.config;t.xs&&e.addXs(t.xs),"names"in t&&n.prototype.data.names.bind(this)(t.names),"classes"in t&&Object.keys(t.classes).forEach(function(e){i.data_classes[e]=t.classes[e]}),"categories"in t&&e.isCategorized()&&(i.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(function(e){i.data_axes[e]=t.axes[e]}),"colors"in t&&Object.keys(t.colors).forEach(function(e){i.data_colors[e]=t.colors[e]}),"cacheIds"in t&&e.hasCaches(t.cacheIds)?e.load(e.getCaches(t.cacheIds),t.done):"unload"in t?e.unload(e.mapToTargetIds("boolean"==typeof t.unload&&t.unload?null:t.unload),function(){e.loadFromArgs(t)}):e.loadFromArgs(t)},n.prototype.unload=function(t){var e=this.internal;(t=t||{})instanceof Array?t={ids:t}:"string"==typeof t&&(t={ids:[t]}),e.unload(e.mapToTargetIds(t.ids),function(){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),t.done&&t.done()})},n.prototype.regions=function(t){var e=this.internal,i=e.config;return t?(i.regions=t,e.redrawWithoutRescale(),i.regions):i.regions},n.prototype.regions.add=function(t){var e=this.internal,i=e.config;return t?(i.regions=i.regions.concat(t),e.redrawWithoutRescale(),i.regions):i.regions},n.prototype.regions.remove=function(t){var e,i,n,r=this.internal,o=r.config;return t=t||{},e=r.getOption(t,"duration",o.transition_duration),i=r.getOption(t,"classes",[a.region]),n=r.main.select("."+a.regions).selectAll(i.map(function(t){return"."+t})),(e?n.transition().duration(e):n).style("opacity",0).remove(),o.regions=o.regions.filter(function(t){var e=!1;return!t.class||(t.class.split(" ").forEach(function(t){i.indexOf(t)>=0&&(e=!0)}),!e)}),o.regions},n.prototype.selected=function(t){var e=this.internal,i=e.d3;return i.merge(e.main.selectAll("."+a.shapes+e.getTargetSelectorSuffix(t)).selectAll("."+a.shape).filter(function(){return i.select(this).classed(a.SELECTED)}).map(function(t){return t.map(function(t){var e=t.__data__;return e.data?e.data:e})}))},n.prototype.select=function(t,e,i){var n=this.internal,r=n.d3,o=n.config;o.data_selection_enabled&&n.main.selectAll("."+a.shapes).selectAll("."+a.shape).each(function(s,c){var d=r.select(this),l=s.data?s.data.id:s.id,u=n.getToggle(this,s).bind(n),g=o.data_selection_grouped||!t||t.indexOf(l)>=0,p=!e||e.indexOf(c)>=0,f=d.classed(a.SELECTED);d.classed(a.line)||d.classed(a.area)||(g&&p?o.data_selection_isselectable(s)&&!f&&u(!0,d.classed(a.SELECTED,!0),s,c):h(i)&&i&&f&&u(!1,d.classed(a.SELECTED,!1),s,c))})},n.prototype.unselect=function(t,e){var i=this.internal,n=i.d3,r=i.config;r.data_selection_enabled&&i.main.selectAll("."+a.shapes).selectAll("."+a.shape).each(function(o,s){var c=n.select(this),d=o.data?o.data.id:o.id,l=i.getToggle(this,o).bind(i),u=r.data_selection_grouped||!t||t.indexOf(d)>=0,h=!e||e.indexOf(s)>=0,g=c.classed(a.SELECTED);c.classed(a.line)||c.classed(a.area)||u&&h&&r.data_selection_isselectable(o)&&g&&l(!1,c.classed(a.SELECTED,!1),o,s)})},n.prototype.show=function(t,e){var i,n=this.internal;t=n.mapToTargetIds(t),e=e||{},n.removeHiddenTargetIds(t),(i=n.svg.selectAll(n.selectorTargets(t))).transition().style("display","initial","important").style("opacity",1,"important").call(n.endall,function(){i.style("opacity",null).style("opacity",1)}),e.withLegend&&n.showLegend(t),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},n.prototype.hide=function(t,e){var i,n=this.internal;t=n.mapToTargetIds(t),e=e||{},n.addHiddenTargetIds(t),(i=n.svg.selectAll(n.selectorTargets(t))).transition().style("opacity",0,"important").call(n.endall,function(){i.style("opacity",null).style("opacity",0),i.style("display","none")}),e.withLegend&&n.hideLegend(t),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},n.prototype.toggle=function(t,e){var i=this,n=this.internal;n.mapToTargetIds(t).forEach(function(t){n.isTargetToShow(t)?i.hide(t,e):i.show(t,e)})},n.prototype.tooltip=function(){},n.prototype.tooltip.show=function(t){var e,i,n=this.internal,r={};t.mouse?r=t.mouse:(t.data?i=t.data:void 0!==t.x&&(e=t.id?n.data.targets.filter(function(e){return e.id===t.id}):n.data.targets,i=n.filterByX(e,t.x).slice(0,1)[0]),r=i?n.getMousePosition(i):null),n.dispatchEvent("mousemove",r),n.config.tooltip_onshow.call(n,i)},n.prototype.tooltip.hide=function(){this.internal.dispatchEvent("mouseout",0),this.internal.config.tooltip_onhide.call(this)},n.prototype.transform=function(t,e){var i=this.internal,n=["pie","donut"].indexOf(t)>=0?{withTransform:!0}:null;i.transformTo(e,t,n)},e.prototype.transformTo=function(t,e,i){var n=this,r=!n.hasArcType(),a=i||{withTransitionForAxis:r};a.withTransitionForTransform=!1,n.transiting=!1,n.setTargetType(t,e),n.updateTargets(n.data.targets),n.updateAndRedraw(a)},n.prototype.x=function(t){var e=this.internal;return arguments.length&&(e.updateTargetX(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs},n.prototype.xs=function(t){var e=this.internal;return arguments.length&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs},n.prototype.zoom=function(t){var e=this.internal;return t?(e.isTimeSeries()&&(t=t.map(function(t){return e.parseDate(t)})),e.config.subchart_show?e.brush.selectionAsValue(t,!0):(e.updateXDomain(null,!0,!1,!1,t),e.redraw({withY:e.config.zoom_rescale,withSubchart:!1})),e.config.zoom_onzoom.call(this,e.x.orgDomain()),t):e.x.domain()},n.prototype.zoom.enable=function(t){var e=this.internal;e.config.zoom_enabled=t,e.updateAndRedraw()},n.prototype.unzoom=function(){var t=this.internal;t.config.subchart_show?t.brush.clear():(t.updateXDomain(null,!0,!1,!1,t.subX.domain()),t.redraw({withY:t.config.zoom_rescale,withSubchart:!1}))},n.prototype.zoom.max=function(t){var e=this.internal,i=e.config,n=e.d3;if(0!==t&&!t)return i.zoom_x_max;i.zoom_x_max=n.max([e.orgXDomain[1],t])},n.prototype.zoom.min=function(t){var e=this.internal,i=e.config,n=e.d3;if(0!==t&&!t)return i.zoom_x_min;i.zoom_x_min=n.min([e.orgXDomain[0],t])},n.prototype.zoom.range=function(t){if(!arguments.length)return{max:this.domain.max(),min:this.domain.min()};h(t.max)&&this.domain.max(t.max),h(t.min)&&this.domain.min(t.min)},e.prototype.initPie=function(){var t=this,e=t.d3;t.pie=e.pie().value(function(t){return t.values.reduce(function(t,e){return t+e.value},0)});var i=t.getOrderFunction();if(i&&(t.isOrderAsc()||t.isOrderDesc())){var n=i;i=function(t,e){return-1*n(t,e)}}t.pie.sort(i||null)},e.prototype.updateRadius=function(){var t=this,e=t.config,i=e.gauge_width||e.donut_width,n=t.filterTargetsToShow(t.data.targets).length*t.config.gauge_arcs_minWidth;t.radiusExpanded=Math.min(t.arcWidth,t.arcHeight)/2*(t.hasType("gauge")?.85:1),t.radius=.95*t.radiusExpanded,t.innerRadiusRatio=i?(t.radius-i)/t.radius:.6,t.innerRadius=t.hasType("donut")||t.hasType("gauge")?t.radius*t.innerRadiusRatio:0,t.gaugeArcWidth=i||(n<=t.radius-t.innerRadius?t.radius-t.innerRadius:n<=t.radius?n:t.radius)},e.prototype.updateArc=function(){var t=this;t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded(),t.svgArcExpandedSub=t.getSvgArcExpanded(.98)},e.prototype.updateAngle=function(t){var e,i,n,r,a=this,o=a.config,s=!1,c=0;return o?(a.pie(a.filterTargetsToShow(a.data.targets)).forEach(function(e){s||e.data.id!==t.data.id||(s=!0,(t=e).index=c),c++}),isNaN(t.startAngle)&&(t.startAngle=0),isNaN(t.endAngle)&&(t.endAngle=t.startAngle),a.isGaugeType(t.data)&&(e=o.gauge_min,i=o.gauge_max,n=Math.PI*(o.gauge_fullCircle?2:1)/(i-e),r=t.value<e?0:t.value<i?t.value-e:i-e,t.startAngle=o.gauge_startingAngle,t.endAngle=t.startAngle+n*r),s?t:null):null},e.prototype.getSvgArc=function(){var t=this,e=t.hasType("gauge"),i=t.gaugeArcWidth/t.filterTargetsToShow(t.data.targets).length,n=t.d3.arc().outerRadius(function(n){return e?t.radius-i*n.index:t.radius}).innerRadius(function(n){return e?t.radius-i*(n.index+1):t.innerRadius}),r=function(e,i){var r;return i?n(e):(r=t.updateAngle(e))?n(r):"M 0 0"};return r.centroid=n.centroid,r},e.prototype.getSvgArcExpanded=function(t){t=t||1;var e=this,i=e.hasType("gauge"),n=e.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length,r=Math.min(e.radiusExpanded*t-e.radius,.8*n-100*(1-t)),a=e.d3.arc().outerRadius(function(a){return i?e.radius-n*a.index+r:e.radiusExpanded*t}).innerRadius(function(t){return i?e.radius-n*(t.index+1):e.innerRadius});return function(t){var i=e.updateAngle(t);return i?a(i):"M 0 0"}},e.prototype.getArc=function(t,e,i){return i||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},e.prototype.transformForArcLabel=function(t){var e,i,n,r,a,o=this,s=o.config,c=o.updateAngle(t),d="",l=o.hasType("gauge");if(c&&!l)e=this.svgArc.centroid(c),i=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1],r=Math.sqrt(i*i+n*n),d="translate("+i*(a=o.hasType("donut")&&s.donut_label_ratio?p(s.donut_label_ratio)?s.donut_label_ratio(t,o.radius,r):s.donut_label_ratio:o.hasType("pie")&&s.pie_label_ratio?p(s.pie_label_ratio)?s.pie_label_ratio(t,o.radius,r):s.pie_label_ratio:o.radius&&r?(36/o.radius>.375?1.175-36/o.radius:.8)*o.radius/r:0)+","+n*a+")";else if(c&&l&&o.filterTargetsToShow(o.data.targets).length>1){var u=Math.sin(c.endAngle-Math.PI/2);d="translate("+(i=Math.cos(c.endAngle-Math.PI/2)*(o.radiusExpanded+25))+","+(n=u*(o.radiusExpanded+15-Math.abs(10*u))+3)+")"}return d},e.prototype.getArcRatio=function(t){var e=this.config,i=Math.PI*(this.hasType("gauge")&&!e.gauge_fullCircle?1:2);return t?(t.endAngle-t.startAngle)/i:null},e.prototype.convertToArcData=function(t){return this.addName({id:t.data.id,value:t.value,ratio:this.getArcRatio(t),index:t.index})},e.prototype.textForArcLabel=function(t){var e,i,n,r,a,o=this;return o.shouldShowArcLabel()?(i=(e=o.updateAngle(t))?e.value:null,n=o.getArcRatio(e),r=t.data.id,o.hasType("gauge")||o.meetsArcLabelThreshold(n)?(a=o.getArcLabelFormat())?a(i,n,r):o.defaultArcValueFormat(i,n):""):""},e.prototype.textForGaugeMinMax=function(t,e){var i=this.getGaugeLabelExtents();return i?i(t,e):t},e.prototype.expandArc=function(t){var e,i=this;i.transiting?e=window.setInterval(function(){i.transiting||(window.clearInterval(e),i.legend.selectAll(".c3-legend-item-focused").size()>0&&i.expandArc(t))},10):(t=i.mapToTargetIds(t),i.svg.selectAll(i.selectorTargets(t,"."+a.chartArc)).each(function(t){i.shouldExpand(t.data.id)&&i.d3.select(this).selectAll("path").transition().duration(i.expandDuration(t.data.id)).attr("d",i.svgArcExpanded).transition().duration(2*i.expandDuration(t.data.id)).attr("d",i.svgArcExpandedSub).each(function(t){i.isDonutType(t.data)})}))},e.prototype.unexpandArc=function(t){var e=this;e.transiting||(t=e.mapToTargetIds(t),e.svg.selectAll(e.selectorTargets(t,"."+a.chartArc)).selectAll("path").transition().duration(function(t){return e.expandDuration(t.data.id)}).attr("d",e.svgArc),e.svg.selectAll("."+a.arc))},e.prototype.expandDuration=function(t){var e=this.config;return this.isDonutType(t)?e.donut_expand_duration:this.isGaugeType(t)?e.gauge_expand_duration:this.isPieType(t)?e.pie_expand_duration:50},e.prototype.shouldExpand=function(t){var e=this.config;return this.isDonutType(t)&&e.donut_expand||this.isGaugeType(t)&&e.gauge_expand||this.isPieType(t)&&e.pie_expand},e.prototype.shouldShowArcLabel=function(){var t=this.config,e=!0;return this.hasType("donut")?e=t.donut_label_show:this.hasType("pie")&&(e=t.pie_label_show),e},e.prototype.meetsArcLabelThreshold=function(t){var e=this.config;return t>=(this.hasType("donut")?e.donut_label_threshold:e.pie_label_threshold)},e.prototype.getArcLabelFormat=function(){var t=this.config,e=t.pie_label_format;return this.hasType("gauge")?e=t.gauge_label_format:this.hasType("donut")&&(e=t.donut_label_format),e},e.prototype.getGaugeLabelExtents=function(){return this.config.gauge_label_extents},e.prototype.getArcTitle=function(){return this.hasType("donut")?this.config.donut_title:""},e.prototype.updateTargetsForArc=function(t){var e,i=this,n=i.main,r=i.classChartArc.bind(i),o=i.classArcs.bind(i),s=i.classFocus.bind(i);(e=n.select("."+a.chartArcs).selectAll("."+a.chartArc).data(i.pie(t)).attr("class",function(t){return r(t)+s(t.data)}).enter().append("g").attr("class",r)).append("g").attr("class",o),e.append("text").attr("dy",i.hasType("gauge")?"-.1em":".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none")},e.prototype.initArc=function(){var t=this;t.arcs=t.main.select("."+a.chart).append("g").attr("class",a.chartArcs).attr("transform",t.getTranslate("arc")),t.arcs.append("text").attr("class",a.chartArcsTitle).style("text-anchor","middle").text(t.getArcTitle())},e.prototype.redrawArc=function(t,e,i){var n,r,o,s,c=this,d=c.d3,l=c.config,u=c.main,h=c.hasType("gauge");if(r=(n=u.selectAll("."+a.arcs).selectAll("."+a.arc).data(c.arcData.bind(c))).enter().append("path").attr("class",c.classArc.bind(c)).style("fill",function(t){return c.color(t.data)}).style("cursor",function(t){return l.interaction_enabled&&l.data_selection_isselectable(t)?"pointer":null}).each(function(t){c.isGaugeType(t.data)&&(t.startAngle=t.endAngle=l.gauge_startingAngle),this._current=t}).merge(n),h&&(s=(o=u.selectAll("."+a.arcs).selectAll("."+a.arcLabelLine).data(c.arcData.bind(c))).enter().append("rect").attr("class",function(t){return a.arcLabelLine+" "+a.target+" "+a.target+"-"+t.data.id}).merge(o),1===c.filterTargetsToShow(c.data.targets).length?s.style("display","none"):s.style("fill",function(t){return l.color_pattern.length>0?c.levelColor(t.data.values[0].value):c.color(t.data)}).style("display",l.gauge_labelLine_show?"":"none").each(function(t){var e=0,i=0,n=0,r="";if(c.hiddenTargetIds.indexOf(t.data.id)<0){var a=c.updateAngle(t),o=c.gaugeArcWidth/c.filterTargetsToShow(c.data.targets).length*(a.index+1),s=a.endAngle-Math.PI/2,l=c.radius-o,u=s-(0===l?0:1/l);e=c.radiusExpanded-c.radius+o,i=Math.cos(u)*l,n=Math.sin(u)*l,r="rotate("+180*s/Math.PI+", "+i+", "+n+")"}d.select(this).attr("x",i).attr("y",n).attr("width",e).attr("height",2).attr("transform",r).style("stroke-dasharray","0, "+(e+2)+", 0")})),r.attr("transform",function(t){return!c.isGaugeType(t.data)&&i?"scale(0)":""}).on("mouseover",l.interaction_enabled?function(t){var e,i;c.transiting||(e=c.updateAngle(t))&&(i=c.convertToArcData(e),c.expandArc(e.data.id),c.api.focus(e.data.id),c.toggleFocusLegend(e.data.id,!0),c.config.data_onmouseover(i,this))}:null).on("mousemove",l.interaction_enabled?function(t){var e,i=c.updateAngle(t);i&&(e=[c.convertToArcData(i)],c.showTooltip(e,this))}:null).on("mouseout",l.interaction_enabled?function(t){var e,i;c.transiting||(e=c.updateAngle(t))&&(i=c.convertToArcData(e),c.unexpandArc(e.data.id),c.api.revert(),c.revertLegend(),c.hideTooltip(),c.config.data_onmouseout(i,this))}:null).on("click",l.interaction_enabled?function(t,e){var i,n=c.updateAngle(t);n&&(i=c.convertToArcData(n),c.toggleShape&&c.toggleShape(this,i,e),c.config.data_onclick.call(c.api,i,this))}:null).each(function(){c.transiting=!0}).transition().duration(t).attrTween("d",function(t){var e,i=c.updateAngle(t);return i?(isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle),e=d.interpolate(this._current,i),this._current=e(0),function(i){var n=e(i);return n.data=t.data,c.getArc(n,!0)}):function(){return"M 0 0"}}).attr("transform",i?"scale(1)":"").style("fill",function(t){return c.levelColor?c.levelColor(t.data.values[0].value):c.color(t.data.id)}).call(c.endall,function(){c.transiting=!1}),n.exit().transition().duration(e).style("opacity",0).remove(),u.selectAll("."+a.chartArc).select("text").style("opacity",0).attr("class",function(t){return c.isGaugeType(t.data)?a.gaugeValue:""}).text(c.textForArcLabel.bind(c)).attr("transform",c.transformForArcLabel.bind(c)).style("font-size",function(t){return c.isGaugeType(t.data)&&1===c.filterTargetsToShow(c.data.targets).length?Math.round(c.radius/5)+"px":""}).transition().duration(t).style("opacity",function(t){return c.isTargetToShow(t.data.id)&&c.isArcType(t.data)?1:0}),u.select("."+a.chartArcsTitle).style("opacity",c.hasType("donut")||h?1:0),h){var g=0,p=c.arcs.select("g."+a.chartArcsBackground).selectAll("path."+a.chartArcsBackground).data(c.data.targets);p.enter().append("path").attr("class",function(t,e){return a.chartArcsBackground+" "+a.chartArcsBackground+"-"+e}).merge(p).attr("d",function(t){if(c.hiddenTargetIds.indexOf(t.id)>=0)return"M 0 0";var e={data:[{value:l.gauge_max}],startAngle:l.gauge_startingAngle,endAngle:-1*l.gauge_startingAngle*(l.gauge_fullCircle?Math.PI:1),index:g++};return c.getArc(e,!0,!0)}),p.exit().remove(),c.arcs.select("."+a.chartArcsGaugeUnit).attr("dy",".75em").text(l.gauge_label_show?l.gauge_units:""),c.arcs.select("."+a.chartArcsGaugeMin).attr("dx",-1*(c.innerRadius+(c.radius-c.innerRadius)/(l.gauge_fullCircle?1:2))+"px").attr("dy","1.2em").text(l.gauge_label_show?c.textForGaugeMinMax(l.gauge_min,!1):""),c.arcs.select("."+a.chartArcsGaugeMax).attr("dx",c.innerRadius+(c.radius-c.innerRadius)/(l.gauge_fullCircle?1:2)+"px").attr("dy","1.2em").text(l.gauge_label_show?c.textForGaugeMinMax(l.gauge_max,!0):"")}},e.prototype.initGauge=function(){var t=this.arcs;this.hasType("gauge")&&(t.append("g").attr("class",a.chartArcsBackground),t.append("text").attr("class",a.chartArcsGaugeUnit).style("text-anchor","middle").style("pointer-events","none"),t.append("text").attr("class",a.chartArcsGaugeMin).style("text-anchor","middle").style("pointer-events","none"),t.append("text").attr("class",a.chartArcsGaugeMax).style("text-anchor","middle").style("pointer-events","none"))},e.prototype.getGaugeLabelHeight=function(){return this.config.gauge_label_show?20:0},e.prototype.hasCaches=function(t){for(var e=0;e<t.length;e++)if(!(t[e]in this.cache))return!1;return!0},e.prototype.addCache=function(t,e){this.cache[t]=this.cloneTarget(e)},e.prototype.getCaches=function(t){var e,i=[];for(e=0;e<t.length;e++)t[e]in this.cache&&i.push(this.cloneTarget(this.cache[t[e]]));return i},e.prototype.categoryName=function(t){var e=this.config;return t<e.axis_x_categories.length?e.axis_x_categories[t]:t},e.prototype.generateTargetClass=function(t){return t||0===t?("-"+t).replace(/\s/g,"-"):""},e.prototype.generateClass=function(t,e){return" "+t+" "+t+this.generateTargetClass(e)},e.prototype.classText=function(t){return this.generateClass(a.text,t.index)},e.prototype.classTexts=function(t){return this.generateClass(a.texts,t.id)},e.prototype.classShape=function(t){return this.generateClass(a.shape,t.index)},e.prototype.classShapes=function(t){return this.generateClass(a.shapes,t.id)},e.prototype.classLine=function(t){return this.classShape(t)+this.generateClass(a.line,t.id)},e.prototype.classLines=function(t){return this.classShapes(t)+this.generateClass(a.lines,t.id)},e.prototype.classCircle=function(t){return this.classShape(t)+this.generateClass(a.circle,t.index)},e.prototype.classCircles=function(t){return this.classShapes(t)+this.generateClass(a.circles,t.id)},e.prototype.classBar=function(t){return this.classShape(t)+this.generateClass(a.bar,t.index)},e.prototype.classBars=function(t){return this.classShapes(t)+this.generateClass(a.bars,t.id)},e.prototype.classArc=function(t){return this.classShape(t.data)+this.generateClass(a.arc,t.data.id)},e.prototype.classArcs=function(t){return this.classShapes(t.data)+this.generateClass(a.arcs,t.data.id)},e.prototype.classArea=function(t){return this.classShape(t)+this.generateClass(a.area,t.id)},e.prototype.classAreas=function(t){return this.classShapes(t)+this.generateClass(a.areas,t.id)},e.prototype.classRegion=function(t,e){return this.generateClass(a.region,e)+" "+("class"in t?t.class:"")},e.prototype.classEvent=function(t){return this.generateClass(a.eventRect,t.index)},e.prototype.classTarget=function(t){var e=this.config.data_classes[t],i="";return e&&(i=" "+a.target+"-"+e),this.generateClass(a.target,t)+i},e.prototype.classFocus=function(t){return this.classFocused(t)+this.classDefocused(t)},e.prototype.classFocused=function(t){return" "+(this.focusedTargetIds.indexOf(t.id)>=0?a.focused:"")},e.prototype.classDefocused=function(t){return" "+(this.defocusedTargetIds.indexOf(t.id)>=0?a.defocused:"")},e.prototype.classChartText=function(t){return a.chartText+this.classTarget(t.id)},e.prototype.classChartLine=function(t){return a.chartLine+this.classTarget(t.id)},e.prototype.classChartBar=function(t){return a.chartBar+this.classTarget(t.id)},e.prototype.classChartArc=function(t){return a.chartArc+this.classTarget(t.data.id)},e.prototype.getTargetSelectorSuffix=function(t){return this.generateTargetClass(t).replace(/([?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\])/g,"\\$1")},e.prototype.selectorTarget=function(t,e){return(e||"")+"."+a.target+this.getTargetSelectorSuffix(t)},e.prototype.selectorTargets=function(t,e){var i=this;return(t=t||[]).length?t.map(function(t){return i.selectorTarget(t,e)}):null},e.prototype.selectorLegend=function(t){return"."+a.legendItem+this.getTargetSelectorSuffix(t)},e.prototype.selectorLegends=function(t){var e=this;return t&&t.length?t.map(function(t){return e.selectorLegend(t)}):null},e.prototype.getClipPath=function(t){return"url("+(window.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0?"":document.URL.split("#")[0])+"#"+t+")"},e.prototype.appendClip=function(t,e){return t.append("clipPath").attr("id",e).append("rect")},e.prototype.getAxisClipX=function(t){var e=Math.max(30,this.margin.left);return t?-(1+e):-(e-1)},e.prototype.getAxisClipY=function(t){return t?-20:-this.margin.top},e.prototype.getXAxisClipX=function(){return this.getAxisClipX(!this.config.axis_rotated)},e.prototype.getXAxisClipY=function(){return this.getAxisClipY(!this.config.axis_rotated)},e.prototype.getYAxisClipX=function(){return this.config.axis_y_inner?-1:this.getAxisClipX(this.config.axis_rotated)},e.prototype.getYAxisClipY=function(){return this.getAxisClipY(this.config.axis_rotated)},e.prototype.getAxisClipWidth=function(t){var e=Math.max(30,this.margin.left),i=Math.max(30,this.margin.right);return t?this.width+2+e+i:this.margin.left+20},e.prototype.getAxisClipHeight=function(t){return(t?this.margin.bottom:this.margin.top+this.height)+20},e.prototype.getXAxisClipWidth=function(){return this.getAxisClipWidth(!this.config.axis_rotated)},e.prototype.getXAxisClipHeight=function(){return this.getAxisClipHeight(!this.config.axis_rotated)},e.prototype.getYAxisClipWidth=function(){return this.getAxisClipWidth(this.config.axis_rotated)+(this.config.axis_y_inner?20:0)},e.prototype.getYAxisClipHeight=function(){return this.getAxisClipHeight(this.config.axis_rotated)},e.prototype.generateColor=function(){var t=this.config,e=this.d3,i=t.data_colors,n=y(t.color_pattern)?t.color_pattern:e.schemeCategory10,r=t.data_color,a=[];return function(t){var e,o=t.id||t.data&&t.data.id||t;return i[o]instanceof Function?e=i[o](t):i[o]?e=i[o]:(a.indexOf(o)<0&&a.push(o),e=n[a.indexOf(o)%n.length],i[o]=e),r instanceof Function?r(e,t):e}},e.prototype.generateLevelColor=function(){var t=this.config,e=t.color_pattern,i=t.color_threshold,n="value"===i.unit,r=i.values&&i.values.length?i.values:[],a=i.max||100;return y(t.color_threshold)?function(t){var i,o=e[e.length-1];for(i=0;i<r.length;i++)if((n?t:100*t/a)<r[i]){o=e[i];break}return o}:null},e.prototype.getDefaultConfig=function(){var t={bindto:"#chart",svg_classname:void 0,size_width:void 0,size_height:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,zoom_enabled:!1,zoom_initialRange:void 0,zoom_type:"scroll",zoom_disableDefaultBehavior:!1,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:function(){},zoom_onzoomstart:function(){},zoom_onzoomend:function(){},zoom_x_min:void 0,zoom_x_max:void 0,interaction_brighten:!0,interaction_enabled:!0,onmouseover:function(){},onmouseout:function(){},onresize:function(){},onresized:function(){},oninit:function(){},onrendered:function(){},transition_duration:350,data_x:void 0,data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_idConverter:function(t){return t},data_names:{},data_classes:{},data_groups:[],data_axes:{},data_type:void 0,data_types:{},data_labels:{},data_order:"desc",data_regions:{},data_color:void 0,data_colors:{},data_hide:!1,data_filter:void 0,data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onclick:function(){},data_onmouseover:function(){},data_onmouseout:function(){},data_onselected:function(){},data_onunselected:function(){},data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:void 0,data_keys:void 0,data_empty_label_text:"",subchart_show:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_onbrush:function(){},color_pattern:[],color_threshold:{},legend_show:!0,legend_hide:!1,legend_position:"bottom",legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_onclick:void 0,legend_item_onmouseover:void 0,legend_item_onmouseout:void 0,legend_equally:!1,legend_padding:0,legend_item_tile_width:10,legend_item_tile_height:10,axis_rotated:!1,axis_x_show:!0,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_count:void 0,axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_multilineMax:0,axis_x_tick_width:null,axis_x_max:void 0,axis_x_min:void 0,axis_x_padding:{},axis_x_height:void 0,axis_x_selection:void 0,axis_x_label:{},axis_x_inner:void 0,axis_y_show:!0,axis_y_type:void 0,axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:void 0,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_time_type:void 0,axis_y_tick_time_interval:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y2_show:!1,axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:void 0,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_count:void 0,axis_y2_padding:{},axis_y2_default:void 0,grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:10,grid_focus_show:!0,grid_lines_front:!0,point_show:!0,point_r:2.5,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_select_r:void 0,line_connectNull:!1,line_step_type:"step",bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0,bar_space:0,area_zerobased:!0,area_above:!1,pie_label_show:!0,pie_label_format:void 0,pie_label_threshold:.05,pie_label_ratio:void 0,pie_expand:{},pie_expand_duration:50,gauge_fullCircle:!1,gauge_label_show:!0,gauge_labelLine_show:!0,gauge_label_format:void 0,gauge_min:0,gauge_max:100,gauge_startingAngle:-1*Math.PI/2,gauge_label_extents:void 0,gauge_units:void 0,gauge_width:void 0,gauge_arcs_minWidth:5,gauge_expand:{},gauge_expand_duration:50,donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_duration:50,spline_interpolation_type:"cardinal",regions:[],tooltip_show:!0,tooltip_grouped:!0,tooltip_order:void 0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:function(t,e,i,n){return this.getTooltipContent?this.getTooltipContent(t,e,i,n):""},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_onshow:function(){},tooltip_onhide:function(){},title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"top-center"};return Object.keys(this.additionalConfig).forEach(function(e){t[e]=this.additionalConfig[e]},this),t},e.prototype.additionalConfig={},e.prototype.loadConfig=function(e){var i,n,r,a=this.config;Object.keys(a).forEach(function(o){i=e,n=o.split("_"),r=function e(){var r=n.shift();return r&&i&&"object"===t(i)&&r in i?(i=i[r],e()):r?void 0:i}(),h(r)&&(a[o]=r)})},e.prototype.convertUrlToData=function(t,e,i,n,r){var a,o,s=this,c=e||"csv";"json"===c?(a=s.d3.json,o=s.convertJsonToData):"tsv"===c?(a=s.d3.tsv,o=s.convertXsvToData):(a=s.d3.csv,o=s.convertXsvToData),a(t,i).then(function(t){r.call(s,o.call(s,t,n))}).catch(function(t){throw t})},e.prototype.convertXsvToData=function(t){var e=t.columns;return 0===t.length?{keys:e,rows:[e.reduce(function(t,e){return Object.assign(t,function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}({},e,null))},{})]}:{keys:e,rows:[].concat(t)}},e.prototype.convertJsonToData=function(t,e){var i,n,r=this,a=[];return e?(e.x?(i=e.value.concat(e.x),r.config.data_x=e.x):i=e.value,a.push(i),t.forEach(function(t){var e=[];i.forEach(function(i){var n=r.findValueInJson(t,i);_(n)&&(n=null),e.push(n)}),a.push(e)}),n=r.convertRowsToData(a)):(Object.keys(t).forEach(function(e){a.push([e].concat(t[e]))}),n=r.convertColumnsToData(a)),n},e.prototype.findValueInJson=function(t,e){for(var i=(e=(e=e.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),n=0;n<i.length;++n){var r=i[n];if(!(r in t))return;t=t[r]}return t},e.prototype.convertRowsToData=function(t){for(var e=[],i=t[0],n=1;n<t.length;n++){for(var r={},a=0;a<t[n].length;a++){if(_(t[n][a]))throw new Error("Source data is missing a component at ("+n+","+a+")!");r[i[a]]=t[n][a]}e.push(r)}return{keys:i,rows:e}},e.prototype.convertColumnsToData=function(t){for(var e=[],i=[],n=0;n<t.length;n++){for(var r=t[n][0],a=1;a<t[n].length;a++){if(_(e[a-1])&&(e[a-1]={}),_(t[n][a]))throw new Error("Source data is missing a component at ("+n+","+a+")!");e[a-1][r]=t[n][a]}i.push(r)}return{keys:i,rows:e}},e.prototype.convertDataToTargets=function(t,e){var i,n,r,a,o=this,s=o.config;return u(t)?a=Object.keys(t[0]):(a=t.keys,t=t.rows),n=a.filter(o.isNotX,o),r=a.filter(o.isX,o),n.forEach(function(i){var n=o.getXKey(i);o.isCustomX()||o.isTimeSeries()?r.indexOf(n)>=0?o.data.xs[i]=(e&&o.data.xs[i]?o.data.xs[i]:[]).concat(t.map(function(t){return t[n]}).filter(x).map(function(t,e){return o.generateTargetX(t,i,e)})):s.data_x?o.data.xs[i]=o.getOtherTargetXs():y(s.data_xs)&&(o.data.xs[i]=o.getXValuesOfXKey(n,o.data.targets)):o.data.xs[i]=t.map(function(t,e){return e})}),n.forEach(function(t){if(!o.data.xs[t])throw new Error('x is not defined for id = "'+t+'".')}),(i=n.map(function(e,i){var n=s.data_idConverter(e);return{id:n,id_org:e,values:t.map(function(t,r){var a,c=t[o.getXKey(e)],d=null===t[e]||isNaN(t[e])?null:+t[e];return o.isCustomX()&&o.isCategorized()&&!_(c)?(0===i&&0===r&&(s.axis_x_categories=[]),-1===(a=s.axis_x_categories.indexOf(c))&&(a=s.axis_x_categories.length,s.axis_x_categories.push(c))):a=o.generateTargetX(c,e,r),(_(t[e])||o.data.xs[e].length<=r)&&(a=void 0),{x:a,value:d,id:n}}).filter(function(t){return h(t.x)})}})).forEach(function(t){var e;s.data_xSort&&(t.values=t.values.sort(function(t,e){return(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)})),e=0,t.values.forEach(function(t){t.index=e++}),o.data.xs[t.id].sort(function(t,e){return t-e})}),o.hasNegativeValue=o.hasNegativeValueInTargets(i),o.hasPositiveValue=o.hasPositiveValueInTargets(i),s.data_type&&o.setTargetType(o.mapToIds(i).filter(function(t){return!(t in s.data_types)}),s.data_type),i.forEach(function(t){o.addCache(t.id_org,t)}),i},e.prototype.isX=function(t){var e=this.config;return e.data_x&&t===e.data_x||y(e.data_xs)&&function(t,e){var i=!1;return Object.keys(t).forEach(function(n){t[n]===e&&(i=!0)}),i}(e.data_xs,t)},e.prototype.isNotX=function(t){return!this.isX(t)},e.prototype.getXKey=function(t){var e=this.config;return e.data_x?e.data_x:y(e.data_xs)?e.data_xs[t]:null},e.prototype.getXValuesOfXKey=function(t,e){var i,n=this;return(e&&y(e)?n.mapToIds(e):[]).forEach(function(e){n.getXKey(e)===t&&(i=n.data.xs[e])}),i},e.prototype.getXValue=function(t,e){return t in this.data.xs&&this.data.xs[t]&&x(this.data.xs[t][e])?this.data.xs[t][e]:e},e.prototype.getOtherTargetXs=function(){var t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},e.prototype.getOtherTargetX=function(t){var e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},e.prototype.addXs=function(t){var e=this;Object.keys(t).forEach(function(i){e.config.data_xs[i]=t[i]})},e.prototype.addName=function(t){var e;return t&&(e=this.config.data_names[t.id],t.name=void 0!==e?e:t.id),t},e.prototype.getValueOnIndex=function(t,e){var i=t.filter(function(t){return t.index===e});return i.length?i[0]:null},e.prototype.updateTargetX=function(t,e){var i=this;t.forEach(function(t){t.values.forEach(function(n,r){n.x=i.generateTargetX(e[r],t.id,r)}),i.data.xs[t.id]=e})},e.prototype.updateTargetXs=function(t,e){var i=this;t.forEach(function(t){e[t.id]&&i.updateTargetX([t],e[t.id])})},e.prototype.generateTargetX=function(t,e,i){var n=this;return n.isTimeSeries()?t?n.parseDate(t):n.parseDate(n.getXValue(e,i)):n.isCustomX()&&!n.isCategorized()?x(t)?+t:n.getXValue(e,i):i},e.prototype.cloneTarget=function(t){return{id:t.id,id_org:t.id_org,values:t.values.map(function(t){return{x:t.x,value:t.value,id:t.id}})}},e.prototype.getMaxDataCount=function(){return this.d3.max(this.data.targets,function(t){return t.values.length})},e.prototype.mapToIds=function(t){return t.map(function(t){return t.id})},e.prototype.mapToTargetIds=function(t){return t?[].concat(t):this.mapToIds(this.data.targets)},e.prototype.hasTarget=function(t,e){var i,n=this.mapToIds(t);for(i=0;i<n.length;i++)if(n[i]===e)return!0;return!1},e.prototype.isTargetToShow=function(t){return this.hiddenTargetIds.indexOf(t)<0},e.prototype.isLegendToShow=function(t){return this.hiddenLegendIds.indexOf(t)<0},e.prototype.filterTargetsToShow=function(t){var e=this;return t.filter(function(t){return e.isTargetToShow(t.id)})},e.prototype.mapTargetsToUniqueXs=function(t){var e=this.d3.set(this.d3.merge(t.map(function(t){return t.values.map(function(t){return+t.x})}))).values();return(e=this.isTimeSeries()?e.map(function(t){return new Date(+t)}):e.map(function(t){return+t})).sort(function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN})},e.prototype.addHiddenTargetIds=function(t){t=t instanceof Array?t:new Array(t);for(var e=0;e<t.length;e++)this.hiddenTargetIds.indexOf(t[e])<0&&(this.hiddenTargetIds=this.hiddenTargetIds.concat(t[e]))},e.prototype.removeHiddenTargetIds=function(t){this.hiddenTargetIds=this.hiddenTargetIds.filter(function(e){return t.indexOf(e)<0})},e.prototype.addHiddenLegendIds=function(t){t=t instanceof Array?t:new Array(t);for(var e=0;e<t.length;e++)this.hiddenLegendIds.indexOf(t[e])<0&&(this.hiddenLegendIds=this.hiddenLegendIds.concat(t[e]))},e.prototype.removeHiddenLegendIds=function(t){this.hiddenLegendIds=this.hiddenLegendIds.filter(function(e){return t.indexOf(e)<0})},e.prototype.getValuesAsIdKeyed=function(t){var e={};return t.forEach(function(t){e[t.id]=[],t.values.forEach(function(i){e[t.id].push(i.value)})}),e},e.prototype.checkValueInTargets=function(t,e){var i,n,r,a=Object.keys(t);for(i=0;i<a.length;i++)for(r=t[a[i]].values,n=0;n<r.length;n++)if(e(r[n].value))return!0;return!1},e.prototype.hasNegativeValueInTargets=function(t){return this.checkValueInTargets(t,function(t){return t<0})},e.prototype.hasPositiveValueInTargets=function(t){return this.checkValueInTargets(t,function(t){return t>0})},e.prototype.isOrderDesc=function(){var t=this.config;return"string"==typeof t.data_order&&"desc"===t.data_order.toLowerCase()},e.prototype.isOrderAsc=function(){var t=this.config;return"string"==typeof t.data_order&&"asc"===t.data_order.toLowerCase()},e.prototype.getOrderFunction=function(){var t=this.config,e=this.isOrderAsc(),i=this.isOrderDesc();if(e||i){var n=function(t,e){return t+Math.abs(e.value)};return function(t,i){var r=t.values.reduce(n,0),a=i.values.reduce(n,0);return e?a-r:r-a}}if(p(t.data_order))return t.data_order;if(u(t.data_order)){var r=t.data_order;return function(t,e){return r.indexOf(t.id)-r.indexOf(e.id)}}},e.prototype.orderTargets=function(t){var e=this.getOrderFunction();return e&&t.sort(e),t},e.prototype.filterByX=function(t,e){return this.d3.merge(t.map(function(t){return t.values})).filter(function(t){return t.x-e==0})},e.prototype.filterRemoveNull=function(t){return t.filter(function(t){return x(t.value)})},e.prototype.filterByXDomain=function(t,e){return t.map(function(t){return{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return e[0]<=t.x&&t.x<=e[1]})}})},e.prototype.hasDataLabel=function(){var e=this.config;return!("boolean"!=typeof e.data_labels||!e.data_labels)||!("object"!==t(e.data_labels)||!y(e.data_labels))},e.prototype.getDataLabelLength=function(t,e,i){var n=this,r=[0,0];return n.selectChart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(t){return n.dataLabelFormat(t.id)(t)}).each(function(t,e){r[e]=1.3*this.getBoundingClientRect()[i]}).remove(),r},e.prototype.isNoneArc=function(t){return this.hasTarget(this.data.targets,t.id)},e.prototype.isArc=function(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},e.prototype.findClosestFromTargets=function(t,e){var i,n=this;return i=t.map(function(t){return n.findClosest(t.values,e)}),n.findClosest(i,e)},e.prototype.findClosest=function(t,e){var i,n=this,r=n.config.point_sensitivity;return t.filter(function(t){return t&&n.isBarType(t.id)}).forEach(function(t){var e=n.main.select("."+a.bars+n.getTargetSelectorSuffix(t.id)+" ."+a.bar+"-"+t.index).node();!i&&n.isWithinBar(n.d3.mouse(e),e)&&(i=t)}),t.filter(function(t){return t&&!n.isBarType(t.id)}).forEach(function(t){var a=n.dist(t,e);a<r&&(r=a,i=t)}),i},e.prototype.dist=function(t,e){var i=this.config,n=i.axis_rotated?1:0,r=i.axis_rotated?0:1,a=this.circleY(t,t.index),o=this.x(t.x);return Math.sqrt(Math.pow(o-e[n],2)+Math.pow(a-e[r],2))},e.prototype.convertValuesToStep=function(t){var e,i=[].concat(t);if(!this.isCategorized())return t;for(e=t.length+1;0<e;e--)i[e]=i[e-1];return i[0]={x:i[0].x-1,value:i[0].value,id:i[0].id},i[t.length+1]={x:i[t.length].x+1,value:i[t.length].value,id:i[t.length].id},i},e.prototype.updateDataAttributes=function(t,e){var i=this.config["data_"+t];return void 0===e?i:(Object.keys(e).forEach(function(t){i[t]=e[t]}),this.redraw({withLegend:!0}),i)},e.prototype.load=function(t,e){var i=this;t&&(e.filter&&(t=t.filter(e.filter)),(e.type||e.types)&&t.forEach(function(t){var n=e.types&&e.types[t.id]?e.types[t.id]:e.type;i.setTargetType(t.id,n)}),i.data.targets.forEach(function(e){for(var i=0;i<t.length;i++)if(e.id===t[i].id){e.values=t[i].values,t.splice(i,1);break}}),i.data.targets=i.data.targets.concat(t)),i.updateTargets(i.data.targets),i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.done&&e.done()},e.prototype.loadFromArgs=function(t){var e=this;t.data?e.load(e.convertDataToTargets(t.data),t):t.url?e.convertUrlToData(t.url,t.mimeType,t.headers,t.keys,function(i){e.load(e.convertDataToTargets(i),t)}):t.json?e.load(e.convertDataToTargets(e.convertJsonToData(t.json,t.keys)),t):t.rows?e.load(e.convertDataToTargets(e.convertRowsToData(t.rows)),t):t.columns?e.load(e.convertDataToTargets(e.convertColumnsToData(t.columns)),t):e.load(null,t)},e.prototype.unload=function(t,e){var i=this;e||(e=function(){}),(t=t.filter(function(t){return i.hasTarget(i.data.targets,t)}))&&0!==t.length?(i.svg.selectAll(t.map(function(t){return i.selectorTarget(t)})).transition().style("opacity",0).remove().call(i.endall,e),t.forEach(function(t){i.withoutFadeIn[t]=!1,i.legend&&i.legend.selectAll("."+a.legendItem+i.getTargetSelectorSuffix(t)).remove(),i.data.targets=i.data.targets.filter(function(e){return e.id!==t})})):e()},e.prototype.getYDomainMin=function(t){var e,i,n,r,a,o,s=this,c=s.config,d=s.mapToIds(t),l=s.getValuesAsIdKeyed(t);if(c.data_groups.length>0)for(o=s.hasNegativeValueInTargets(t),e=0;e<c.data_groups.length;e++)if(0!==(r=c.data_groups[e].filter(function(t){return d.indexOf(t)>=0})).length)for(n=r[0],o&&l[n]&&l[n].forEach(function(t,e){l[n][e]=t<0?t:0}),i=1;i<r.length;i++)a=r[i],l[a]&&l[a].forEach(function(t,e){s.axis.getId(a)!==s.axis.getId(n)||!l[n]||o&&+t>0||(l[n][e]+=+t)});return s.d3.min(Object.keys(l).map(function(t){return s.d3.min(l[t])}))},e.prototype.getYDomainMax=function(t){var e,i,n,r,a,o,s=this,c=s.config,d=s.mapToIds(t),l=s.getValuesAsIdKeyed(t);if(c.data_groups.length>0)for(o=s.hasPositiveValueInTargets(t),e=0;e<c.data_groups.length;e++)if(0!==(r=c.data_groups[e].filter(function(t){return d.indexOf(t)>=0})).length)for(n=r[0],o&&l[n]&&l[n].forEach(function(t,e){l[n][e]=t>0?t:0}),i=1;i<r.length;i++)a=r[i],l[a]&&l[a].forEach(function(t,e){s.axis.getId(a)!==s.axis.getId(n)||!l[n]||o&&+t<0||(l[n][e]+=+t)});return s.d3.max(Object.keys(l).map(function(t){return s.d3.max(l[t])}))},e.prototype.getYDomain=function(t,e,i){var n,r,a,o,s,d,l,u,h,g,p=this,f=p.config,_=t.filter(function(t){return p.axis.getId(t.id)===e}),m=i?p.filterByXDomain(_,i):_,S="y2"===e?f.axis_y2_min:f.axis_y_min,w="y2"===e?f.axis_y2_max:f.axis_y_max,v=p.getYDomainMin(m),b=p.getYDomainMax(m),T="y2"===e?f.axis_y2_center:f.axis_y_center,A=p.hasType("bar",m)&&f.bar_zerobased||p.hasType("area",m)&&f.area_zerobased,P="y2"===e?f.axis_y2_inverted:f.axis_y_inverted,C=p.hasDataLabel()&&f.axis_rotated,L=p.hasDataLabel()&&!f.axis_rotated;return v=x(S)?S:x(w)?v<w?v:w-10:v,b=x(w)?w:x(S)?S<b?b:S+10:b,0===m.length?"y2"===e?p.y2.domain():p.y.domain():(isNaN(v)&&(v=0),isNaN(b)&&(b=v),v===b&&(v<0?b=0:v=0),h=v>=0&&b>=0,g=v<=0&&b<=0,(x(S)&&h||x(w)&&g)&&(A=!1),A&&(h&&(v=0),g&&(b=0)),a=o=.1*(r=Math.abs(b-v)),void 0!==T&&(b=T+(s=Math.max(Math.abs(v),Math.abs(b))),v=T-s),C?(d=p.getDataLabelLength(v,b,"width"),l=c(p.y.range()),a+=r*((u=[d[0]/l,d[1]/l])[1]/(1-u[0]-u[1])),o+=r*(u[0]/(1-u[0]-u[1]))):L&&(d=p.getDataLabelLength(v,b,"height"),a+=p.axis.convertPixelsToAxisPadding(d[1],r),o+=p.axis.convertPixelsToAxisPadding(d[0],r)),"y"===e&&y(f.axis_y_padding)&&(a=p.axis.getPadding(f.axis_y_padding,"top",a,r),o=p.axis.getPadding(f.axis_y_padding,"bottom",o,r)),"y2"===e&&y(f.axis_y2_padding)&&(a=p.axis.getPadding(f.axis_y2_padding,"top",a,r),o=p.axis.getPadding(f.axis_y2_padding,"bottom",o,r)),A&&(h&&(o=v),g&&(a=-b)),n=[v-o,b+a],P?n.reverse():n)},e.prototype.getXDomainMin=function(t){var e=this,i=e.config;return h(i.axis_x_min)?e.isTimeSeries()?this.parseDate(i.axis_x_min):i.axis_x_min:e.d3.min(t,function(t){return e.d3.min(t.values,function(t){return t.x})})},e.prototype.getXDomainMax=function(t){var e=this,i=e.config;return h(i.axis_x_max)?e.isTimeSeries()?this.parseDate(i.axis_x_max):i.axis_x_max:e.d3.max(t,function(t){return e.d3.max(t.values,function(t){return t.x})})},e.prototype.getXDomainPadding=function(e){var i,n,r,a,o=this.config,s=e[1]-e[0];return n=this.isCategorized()?0:this.hasType("bar")?(i=this.getMaxDataCount())>1?s/(i-1)/2:.5:.01*s,"object"===t(o.axis_x_padding)&&y(o.axis_x_padding)?(r=x(o.axis_x_padding.left)?o.axis_x_padding.left:n,a=x(o.axis_x_padding.right)?o.axis_x_padding.right:n):r=a="number"==typeof o.axis_x_padding?o.axis_x_padding:n,{left:r,right:a}},e.prototype.getXDomain=function(t){var e=this,i=[e.getXDomainMin(t),e.getXDomainMax(t)],n=i[0],r=i[1],a=e.getXDomainPadding(i),o=0,s=0;return n-r!=0||e.isCategorized()||(e.isTimeSeries()?(n=new Date(.5*n.getTime()),r=new Date(1.5*r.getTime())):(n=0===n?1:.5*n,r=0===r?-1:1.5*r)),(n||0===n)&&(o=e.isTimeSeries()?new Date(n.getTime()-a.left):n-a.left),(r||0===r)&&(s=e.isTimeSeries()?new Date(r.getTime()+a.right):r+a.right),[o,s]},e.prototype.updateXDomain=function(t,e,i,n,r){var a=this,o=a.config;return i&&(a.x.domain(r||a.d3.extent(a.getXDomain(t))),a.orgXDomain=a.x.domain(),o.zoom_enabled&&a.zoom.update(),a.subX.domain(a.x.domain()),a.brush&&a.brush.updateScale(a.subX)),e&&a.x.domain(r||(!a.brush||a.brush.empty()?a.orgXDomain:a.brush.selectionAsValue())),n&&a.x.domain(a.trimXDomain(a.x.orgDomain())),a.x.domain()},e.prototype.trimXDomain=function(t){var e=this.getZoomDomain(),i=e[0],n=e[1];return t[0]<=i&&(t[1]=+t[1]+(i-t[0]),t[0]=i),n<=t[1]&&(t[0]=+t[0]-(t[1]-n),t[1]=n),t},e.prototype.drag=function(t){var e,i,n,r,o,s,c,d,u=this,h=u.config,g=u.main,p=u.d3;u.hasArcType()||h.data_selection_enabled&&h.data_selection_multiple&&(e=u.dragStart[0],i=u.dragStart[1],n=t[0],r=t[1],o=Math.min(e,n),s=Math.max(e,n),c=h.data_selection_grouped?u.margin.top:Math.min(i,r),d=h.data_selection_grouped?u.height:Math.max(i,r),g.select("."+a.dragarea).attr("x",o).attr("y",c).attr("width",s-o).attr("height",d-c),g.selectAll("."+a.shapes).selectAll("."+a.shape).filter(function(t){return h.data_selection_isselectable(t)}).each(function(t,e){var i,n,r,h,g,f,_=p.select(this),x=_.classed(a.SELECTED),y=_.classed(a.INCLUDED),m=!1;if(_.classed(a.circle))i=1*_.attr("cx"),n=1*_.attr("cy"),g=u.togglePoint,m=o<i&&i<s&&c<n&&n<d;else{if(!_.classed(a.bar))return;i=(f=l(this)).x,n=f.y,r=f.width,h=f.height,g=u.togglePath,m=!(s<i||i+r<o||d<n||n+h<c)}m^y&&(_.classed(a.INCLUDED,!y),_.classed(a.SELECTED,!x),g.call(u,!x,_,t,e))}))},e.prototype.dragstart=function(t){var e=this,i=e.config;e.hasArcType()||i.data_selection_enabled&&(e.dragStart=t,e.main.select("."+a.chart).append("rect").attr("class",a.dragarea).style("opacity",.1),e.dragging=!0)},e.prototype.dragend=function(){var t=this,e=t.config;t.hasArcType()||e.data_selection_enabled&&(t.main.select("."+a.dragarea).transition().duration(100).style("opacity",0).remove(),t.main.selectAll("."+a.shape).classed(a.INCLUDED,!1),t.dragging=!1)},e.prototype.getYFormat=function(t){var e=this,i=t&&!e.hasType("gauge")?e.defaultArcValueFormat:e.yFormat,n=t&&!e.hasType("gauge")?e.defaultArcValueFormat:e.y2Format;return function(t,r,a){return("y2"===e.axis.getId(a)?n:i).call(e,t,r)}},e.prototype.yFormat=function(t){var e=this.config;return(e.axis_y_tick_format?e.axis_y_tick_format:this.defaultValueFormat)(t)},e.prototype.y2Format=function(t){var e=this.config;return(e.axis_y2_tick_format?e.axis_y2_tick_format:this.defaultValueFormat)(t)},e.prototype.defaultValueFormat=function(t){return x(t)?+t:""},e.prototype.defaultArcValueFormat=function(t,e){return(100*e).toFixed(1)+"%"},e.prototype.dataLabelFormat=function(e){var i=this.config.data_labels,n=function(t){return x(t)?+t:""};return"function"==typeof i.format?i.format:"object"===t(i.format)?i.format[e]?!0===i.format[e]?n:i.format[e]:function(){return""}:n},e.prototype.initGrid=function(){var t=this,e=t.config,i=t.d3;t.grid=t.main.append("g").attr("clip-path",t.clipPathForGrid).attr("class",a.grid),e.grid_x_show&&t.grid.append("g").attr("class",a.xgrids),e.grid_y_show&&t.grid.append("g").attr("class",a.ygrids),e.grid_focus_show&&t.grid.append("g").attr("class",a.xgridFocus).append("line").attr("class",a.xgridFocus),t.xgrid=i.selectAll([]),e.grid_lines_front||t.initGridLines()},e.prototype.initGridLines=function(){var t=this,e=t.d3;t.gridLines=t.main.append("g").attr("clip-path",t.clipPathForGrid).attr("class",a.grid+" "+a.gridLines),t.gridLines.append("g").attr("class",a.xgridLines),t.gridLines.append("g").attr("class",a.ygridLines),t.xgridLines=e.selectAll([])},e.prototype.updateXGrid=function(t){var e=this,i=e.config,n=e.d3,r=e.generateGridData(i.grid_x_type,e.x),o=e.isCategorized()?e.xAxis.tickOffset():0;e.xgridAttr=i.axis_rotated?{x1:0,x2:e.width,y1:function(t){return e.x(t)-o},y2:function(t){return e.x(t)-o}}:{x1:function(t){return e.x(t)+o},x2:function(t){return e.x(t)+o},y1:0,y2:e.height},e.xgridAttr.opacity=function(){return+n.select(this).attr(i.axis_rotated?"y1":"x1")===(i.axis_rotated?e.height:0)?0:1};var s=e.main.select("."+a.xgrids).selectAll("."+a.xgrid).data(r),c=s.enter().append("line").attr("class",a.xgrid).attr("x1",e.xgridAttr.x1).attr("x2",e.xgridAttr.x2).attr("y1",e.xgridAttr.y1).attr("y2",e.xgridAttr.y2).style("opacity",0);e.xgrid=c.merge(s),t||e.xgrid.attr("x1",e.xgridAttr.x1).attr("x2",e.xgridAttr.x2).attr("y1",e.xgridAttr.y1).attr("y2",e.xgridAttr.y2).style("opacity",e.xgridAttr.opacity),s.exit().remove()},e.prototype.updateYGrid=function(){var t=this,e=t.config,i=t.yAxis.tickValues()||t.y.ticks(e.grid_y_ticks),n=t.main.select("."+a.ygrids).selectAll("."+a.ygrid).data(i),r=n.enter().append("line").attr("class",a.ygrid);t.ygrid=r.merge(n),t.ygrid.attr("x1",e.axis_rotated?t.y:0).attr("x2",e.axis_rotated?t.y:t.width).attr("y1",e.axis_rotated?0:t.y).attr("y2",e.axis_rotated?t.height:t.y),n.exit().remove(),t.smoothLines(t.ygrid,"grid")},e.prototype.gridTextAnchor=function(t){return t.position?t.position:"end"},e.prototype.gridTextDx=function(t){return"start"===t.position?4:"middle"===t.position?0:-4},e.prototype.xGridTextX=function(t){return"start"===t.position?-this.height:"middle"===t.position?-this.height/2:0},e.prototype.yGridTextX=function(t){return"start"===t.position?0:"middle"===t.position?this.width/2:this.width},e.prototype.updateGrid=function(t){var e,i,n,r,o=this,s=o.main,c=o.config,d=o.xv.bind(o),l=o.yv.bind(o),u=o.xGridTextX.bind(o),h=o.yGridTextX.bind(o);o.grid.style("visibility",o.hasArcType()?"hidden":"visible"),s.select("line."+a.xgridFocus).style("visibility","hidden"),c.grid_x_show&&o.updateXGrid(),(i=(e=s.select("."+a.xgridLines).selectAll("."+a.xgridLine).data(c.grid_x_lines)).enter().append("g").attr("class",function(t){return a.xgridLine+(t.class?" "+t.class:"")})).append("line").attr("x1",c.axis_rotated?0:d).attr("x2",c.axis_rotated?o.width:d).attr("y1",c.axis_rotated?d:0).attr("y2",c.axis_rotated?d:o.height).style("opacity",0),i.append("text").attr("text-anchor",o.gridTextAnchor).attr("transform",c.axis_rotated?"":"rotate(-90)").attr("x",c.axis_rotated?h:u).attr("y",d).attr("dx",o.gridTextDx).attr("dy",-5).style("opacity",0),o.xgridLines=i.merge(e),e.exit().transition().duration(t).style("opacity",0).remove(),c.grid_y_show&&o.updateYGrid(),(r=(n=s.select("."+a.ygridLines).selectAll("."+a.ygridLine).data(c.grid_y_lines)).enter().append("g").attr("class",function(t){return a.ygridLine+(t.class?" "+t.class:"")})).append("line").attr("x1",c.axis_rotated?l:0).attr("x2",c.axis_rotated?l:o.width).attr("y1",c.axis_rotated?0:l).attr("y2",c.axis_rotated?o.height:l).style("opacity",0),r.append("text").attr("text-anchor",o.gridTextAnchor).attr("transform",c.axis_rotated?"rotate(-90)":"").attr("x",c.axis_rotated?u:h).attr("y",l).attr("dx",o.gridTextDx).attr("dy",-5).style("opacity",0),o.ygridLines=r.merge(n),o.ygridLines.select("line").transition().duration(t).attr("x1",c.axis_rotated?l:0).attr("x2",c.axis_rotated?l:o.width).attr("y1",c.axis_rotated?0:l).attr("y2",c.axis_rotated?o.height:l).style("opacity",1),o.ygridLines.select("text").transition().duration(t).attr("x",c.axis_rotated?o.xGridTextX.bind(o):o.yGridTextX.bind(o)).attr("y",l).text(function(t){return t.text}).style("opacity",1),n.exit().transition().duration(t).style("opacity",0).remove()},e.prototype.redrawGrid=function(t,e){var i=this,n=i.config,r=i.xv.bind(i),a=i.xgridLines.select("line"),o=i.xgridLines.select("text");return[(t?a.transition(e):a).attr("x1",n.axis_rotated?0:r).attr("x2",n.axis_rotated?i.width:r).attr("y1",n.axis_rotated?r:0).attr("y2",n.axis_rotated?r:i.height).style("opacity",1),(t?o.transition(e):o).attr("x",n.axis_rotated?i.yGridTextX.bind(i):i.xGridTextX.bind(i)).attr("y",r).text(function(t){return t.text}).style("opacity",1)]},e.prototype.showXGridFocus=function(t){var e=this,i=e.config,n=t.filter(function(t){return t&&x(t.value)}),r=e.main.selectAll("line."+a.xgridFocus),o=e.xx.bind(e);i.tooltip_show&&(e.hasType("scatter")||e.hasArcType()||(r.style("visibility","visible").data([n[0]]).attr(i.axis_rotated?"y1":"x1",o).attr(i.axis_rotated?"y2":"x2",o),e.smoothLines(r,"grid")))},e.prototype.hideXGridFocus=function(){this.main.select("line."+a.xgridFocus).style("visibility","hidden")},e.prototype.updateXgridFocus=function(){var t=this.config;this.main.select("line."+a.xgridFocus).attr("x1",t.axis_rotated?0:-10).attr("x2",t.axis_rotated?this.width:-10).attr("y1",t.axis_rotated?-10:0).attr("y2",t.axis_rotated?-10:this.height)},e.prototype.generateGridData=function(t,e){var i,n,r,o,s=[],c=this.main.select("."+a.axisX).selectAll(".tick").size();if("year"===t)for(n=(i=this.getXDomain())[0].getFullYear(),r=i[1].getFullYear(),o=n;o<=r;o++)s.push(new Date(o+"-01-01 00:00:00"));else(s=e.ticks(10)).length>c&&(s=s.filter(function(t){return(""+t).indexOf(".")<0}));return s},e.prototype.getGridFilterToRemove=function(t){return t?function(e){var i=!1;return[].concat(t).forEach(function(t){("value"in t&&e.value===t.value||"class"in t&&e.class===t.class)&&(i=!0)}),i}:function(){return!0}},e.prototype.removeGridLines=function(t,e){var i=this.config,n=this.getGridFilterToRemove(t),r=function(t){return!n(t)},o=e?a.xgridLines:a.ygridLines,s=e?a.xgridLine:a.ygridLine;this.main.select("."+o).selectAll("."+s).filter(n).transition().duration(i.transition_duration).style("opacity",0).remove(),e?i.grid_x_lines=i.grid_x_lines.filter(r):i.grid_y_lines=i.grid_y_lines.filter(r)},e.prototype.initEventRect=function(){var t=this,e=t.config;t.main.select("."+a.chart).append("g").attr("class",a.eventRects).style("fill-opacity",0),t.eventRect=t.main.select("."+a.eventRects).append("rect").attr("class",a.eventRect),e.zoom_enabled&&t.zoom&&(t.eventRect.call(t.zoom).on("dblclick.zoom",null),e.zoom_initialRange&&t.eventRect.transition().duration(0).call(t.zoom.transform,t.zoomTransform(e.zoom_initialRange)))},e.prototype.redrawEventRect=function(){var t,e,i=this,n=i.d3,r=i.config;function o(){i.svg.select("."+a.eventRect).style("cursor",null),i.hideXGridFocus(),i.hideTooltip(),i.unexpandCircles(),i.unexpandBars()}t=i.width,e=i.height,i.main.select("."+a.eventRects).style("cursor",r.zoom_enabled?r.axis_rotated?"ns-resize":"ew-resize":null),i.eventRect.attr("x",0).attr("y",0).attr("width",t).attr("height",e).on("mouseout",r.interaction_enabled?function(){r&&(i.hasArcType()||o())}:null).on("mousemove",r.interaction_enabled?function(){var t,e,s,c;i.dragging||i.hasArcType(t)||(t=i.filterTargetsToShow(i.data.targets),e=n.mouse(this),s=i.findClosestFromTargets(t,e),!i.mouseover||s&&s.id===i.mouseover.id||(r.data_onmouseout.call(i.api,i.mouseover),i.mouseover=void 0),s?(c=(i.isScatterType(s)||!r.tooltip_grouped?[s]:i.filterByX(t,s.x)).map(function(t){return i.addName(t)}),i.showTooltip(c,this),r.point_focus_expand_enabled&&(i.unexpandCircles(),c.forEach(function(t){i.expandCircles(t.index,t.id,!1)})),i.expandBars(s.index,s.id,!0),i.showXGridFocus(c),(i.isBarType(s.id)||i.dist(s,e)<r.point_sensitivity)&&(i.svg.select("."+a.eventRect).style("cursor","pointer"),i.mouseover||(r.data_onmouseover.call(i.api,s),i.mouseover=s))):o())}:null).on("click",r.interaction_enabled?function(){var t,e,o;i.hasArcType(t)||(t=i.filterTargetsToShow(i.data.targets),e=n.mouse(this),(o=i.findClosestFromTargets(t,e))&&(i.isBarType(o.id)||i.dist(o,e)<r.point_sensitivity)&&(i.isScatterType(o)||!r.data_selection_grouped?[o]:i.filterByX(t,o.x)).forEach(function(t){i.main.selectAll("."+a.shapes+i.getTargetSelectorSuffix(t.id)).selectAll("."+a.shape+"-"+t.index).each(function(){(r.data_selection_grouped||i.isWithinShape(this,t))&&(i.toggleShape(this,t,t.index),r.data_onclick.call(i.api,t,this))})}))}:null).call(r.interaction_enabled&&r.data_selection_draggable&&i.drag?n.drag().on("drag",function(){i.drag(n.mouse(this))}).on("start",function(){i.dragstart(n.mouse(this))}).on("end",function(){i.dragend()}):function(){})},e.prototype.getMousePosition=function(t){return[this.x(t.x),this.getYScale(t.id)(t.value)]},e.prototype.dispatchEvent=function(t,e){var i="."+a.eventRect,n=this.main.select(i).node(),r=n.getBoundingClientRect(),o=r.left+(e?e[0]:0),s=r.top+(e?e[1]:0),c=document.createEvent("MouseEvents");c.initMouseEvent(t,!0,!0,window,0,o,s,o,s,!1,!1,!1,!1,0,null),n.dispatchEvent(c)},e.prototype.initLegend=function(){var t=this;if(t.legendItemTextBox={},t.legendHasRendered=!1,t.legend=t.svg.append("g").attr("transform",t.getTranslate("legend")),!t.config.legend_show)return t.legend.style("visibility","hidden"),void(t.hiddenLegendIds=t.mapToIds(t.data.targets));t.updateLegendWithDefaults()},e.prototype.updateLegendWithDefaults=function(){this.updateLegend(this.mapToIds(this.data.targets),{withTransform:!1,withTransitionForTransform:!1,withTransition:!1})},e.prototype.updateSizeForLegend=function(t,e){var i=this,n=i.config,r={top:i.isLegendTop?i.getCurrentPaddingTop()+n.legend_inset_y+5.5:i.currentHeight-t-i.getCurrentPaddingBottom()-n.legend_inset_y,left:i.isLegendLeft?i.getCurrentPaddingLeft()+n.legend_inset_x+.5:i.currentWidth-e-i.getCurrentPaddingRight()-n.legend_inset_x+.5};i.margin3={top:i.isLegendRight?0:i.isLegendInset?r.top:i.currentHeight-t,right:NaN,bottom:0,left:i.isLegendRight?i.currentWidth-e:i.isLegendInset?r.left:0}},e.prototype.transformLegend=function(t){(t?this.legend.transition():this.legend).attr("transform",this.getTranslate("legend"))},e.prototype.updateLegendStep=function(t){this.legendStep=t},e.prototype.updateLegendItemWidth=function(t){this.legendItemWidth=t},e.prototype.updateLegendItemHeight=function(t){this.legendItemHeight=t},e.prototype.getLegendWidth=function(){var t=this;return t.config.legend_show?t.isLegendRight||t.isLegendInset?t.legendItemWidth*(t.legendStep+1):t.currentWidth:0},e.prototype.getLegendHeight=function(){var t=this,e=0;return t.config.legend_show&&(e=t.isLegendRight?t.currentHeight:Math.max(20,t.legendItemHeight)*(t.legendStep+1)),e},e.prototype.opacityForLegend=function(t){return t.classed(a.legendItemHidden)?null:1},e.prototype.opacityForUnfocusedLegend=function(t){return t.classed(a.legendItemHidden)?null:.3},e.prototype.toggleFocusLegend=function(t,e){var i=this;t=i.mapToTargetIds(t),i.legend.selectAll("."+a.legendItem).filter(function(e){return t.indexOf(e)>=0}).classed(a.legendItemFocused,e).transition().duration(100).style("opacity",function(){return(e?i.opacityForLegend:i.opacityForUnfocusedLegend).call(i,i.d3.select(this))})},e.prototype.revertLegend=function(){var t=this,e=t.d3;t.legend.selectAll("."+a.legendItem).classed(a.legendItemFocused,!1).transition().duration(100).style("opacity",function(){return t.opacityForLegend(e.select(this))})},e.prototype.showLegend=function(t){var e=this,i=e.config;i.legend_show||(i.legend_show=!0,e.legend.style("visibility","visible"),e.legendHasRendered||e.updateLegendWithDefaults()),e.removeHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("visibility","visible").transition().style("opacity",function(){return e.opacityForLegend(e.d3.select(this))})},e.prototype.hideLegend=function(t){var e=this,i=e.config;i.legend_show&&g(t)&&(i.legend_show=!1,e.legend.style("visibility","hidden")),e.addHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("opacity",0).style("visibility","hidden")},e.prototype.clearLegendItemTextBoxCache=function(){this.legendItemTextBox={}},e.prototype.updateLegend=function(t,e,i){var n,r,o,s,c,l,u,g,p,f,_,x,y,m,S,w,v=this,b=v.config,T=4,A=10,P=0,C=0,L=10,V=b.legend_item_tile_width+5,G=0,E={},O={},I={},R=[0],k={},D=0;function F(e,i,n){var r,o,s=0===n,c=n===t.length-1,d=function(t,e){return v.legendItemTextBox[e]||(v.legendItemTextBox[e]=v.getTextRect(t.textContent,a.legendItem,t)),v.legendItemTextBox[e]}(e,i),l=d.width+V+(!c||v.isLegendRight||v.isLegendInset?A:0)+b.legend_padding,u=d.height+T,h=v.isLegendRight||v.isLegendInset?u:l,g=v.isLegendRight||v.isLegendInset?v.getLegendHeight():v.getLegendWidth();function p(t,e){e||(r=(g-G-h)/2)<L&&(r=(g-h)/2,G=0,D++),k[t]=D,R[D]=v.isLegendInset?10:r,E[t]=G,G+=h}s&&(G=0,D=0,P=0,C=0),!b.legend_show||v.isLegendToShow(i)?(O[i]=l,I[i]=u,(!P||l>=P)&&(P=l),(!C||u>=C)&&(C=u),o=v.isLegendRight||v.isLegendInset?C:P,b.legend_equally?(Object.keys(O).forEach(function(t){O[t]=P}),Object.keys(I).forEach(function(t){I[t]=C}),(r=(g-o*t.length)/2)<L?(G=0,D=0,t.forEach(function(t){p(t)})):p(i,!0)):p(i)):O[i]=I[i]=k[i]=E[i]=0}t=t.filter(function(t){return!h(b.data_names[t])||null!==b.data_names[t]}),_=d(e=e||{},"withTransition",!0),x=d(e,"withTransitionForTransform",!0),v.isLegendInset&&(D=b.legend_inset_step?b.legend_inset_step:t.length,v.updateLegendStep(D)),v.isLegendRight?(n=function(t){return P*k[t]},s=function(t){return R[k[t]]+E[t]}):v.isLegendInset?(n=function(t){return P*k[t]+10},s=function(t){return R[k[t]]+E[t]}):(n=function(t){return R[k[t]]+E[t]},s=function(t){return C*k[t]}),r=function(t,e){return n(t,e)+4+b.legend_item_tile_width},c=function(t,e){return s(t,e)+9},o=function(t,e){return n(t,e)},l=function(t,e){return s(t,e)-5},u=function(t,e){return n(t,e)-2},g=function(t,e){return n(t,e)-2+b.legend_item_tile_width},p=function(t,e){return s(t,e)+4},(f=v.legend.selectAll("."+a.legendItem).data(t).enter().append("g").attr("class",function(t){return v.generateClass(a.legendItem,t)}).style("visibility",function(t){return v.isLegendToShow(t)?"visible":"hidden"}).style("cursor","pointer").on("click",function(t){b.legend_item_onclick?b.legend_item_onclick.call(v,t):v.d3.event.altKey?(v.api.hide(),v.api.show(t)):(v.api.toggle(t),v.isTargetToShow(t)?v.api.focus(t):v.api.revert())}).on("mouseover",function(t){b.legend_item_onmouseover?b.legend_item_onmouseover.call(v,t):(v.d3.select(this).classed(a.legendItemFocused,!0),!v.transiting&&v.isTargetToShow(t)&&v.api.focus(t))}).on("mouseout",function(t){b.legend_item_onmouseout?b.legend_item_onmouseout.call(v,t):(v.d3.select(this).classed(a.legendItemFocused,!1),v.api.revert())})).append("text").text(function(t){return h(b.data_names[t])?b.data_names[t]:t}).each(function(t,e){F(this,t,e)}).style("pointer-events","none").attr("x",v.isLegendRight||v.isLegendInset?r:-200).attr("y",v.isLegendRight||v.isLegendInset?-200:c),f.append("rect").attr("class",a.legendItemEvent).style("fill-opacity",0).attr("x",v.isLegendRight||v.isLegendInset?o:-200).attr("y",v.isLegendRight||v.isLegendInset?-200:l),f.append("line").attr("class",a.legendItemTile).style("stroke",v.color).style("pointer-events","none").attr("x1",v.isLegendRight||v.isLegendInset?u:-200).attr("y1",v.isLegendRight||v.isLegendInset?-200:p).attr("x2",v.isLegendRight||v.isLegendInset?g:-200).attr("y2",v.isLegendRight||v.isLegendInset?-200:p).attr("stroke-width",b.legend_item_tile_height),w=v.legend.select("."+a.legendBackground+" rect"),v.isLegendInset&&P>0&&0===w.size()&&(w=v.legend.insert("g","."+a.legendItem).attr("class",a.legendBackground).append("rect")),y=v.legend.selectAll("text").data(t).text(function(t){return h(b.data_names[t])?b.data_names[t]:t}).each(function(t,e){F(this,t,e)}),(_?y.transition():y).attr("x",r).attr("y",c),m=v.legend.selectAll("rect."+a.legendItemEvent).data(t),(_?m.transition():m).attr("width",function(t){return O[t]}).attr("height",function(t){return I[t]}).attr("x",o).attr("y",l),S=v.legend.selectAll("line."+a.legendItemTile).data(t),(_?S.transition():S).style("stroke",v.levelColor?function(t){return v.levelColor(v.cache[t].values[0].value)}:v.color).attr("x1",u).attr("y1",p).attr("x2",g).attr("y2",p),w&&(_?w.transition():w).attr("height",v.getLegendHeight()-12).attr("width",P*(D+1)+10),v.legend.selectAll("."+a.legendItem).classed(a.legendItemHidden,function(t){return!v.isTargetToShow(t)}),v.updateLegendItemWidth(P),v.updateLegendItemHeight(C),v.updateLegendStep(D),v.updateSizes(),v.updateScales(),v.updateSvgSize(),v.transformAll(x,i),v.legendHasRendered=!0},e.prototype.initRegion=function(){this.region=this.main.append("g").attr("clip-path",this.clipPath).attr("class",a.regions)},e.prototype.updateRegion=function(t){var e=this,i=e.config;e.region.style("visibility",e.hasArcType()?"hidden":"visible");var n=e.main.select("."+a.regions).selectAll("."+a.region).data(i.regions),r=n.enter().append("rect").attr("x",e.regionX.bind(e)).attr("y",e.regionY.bind(e)).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)).style("fill-opacity",0);e.mainRegion=r.merge(n).attr("class",e.classRegion.bind(e)),n.exit().transition().duration(t).style("opacity",0).remove()},e.prototype.redrawRegion=function(t,e){var i=this,n=i.mainRegion;return[(t?n.transition(e):n).attr("x",i.regionX.bind(i)).attr("y",i.regionY.bind(i)).attr("width",i.regionWidth.bind(i)).attr("height",i.regionHeight.bind(i)).style("fill-opacity",function(t){return x(t.opacity)?t.opacity:.1})]},e.prototype.regionX=function(t){var e=this,i=e.config,n="y"===t.axis?e.y:e.y2;return"y"===t.axis||"y2"===t.axis?i.axis_rotated&&"start"in t?n(t.start):0:i.axis_rotated?0:"start"in t?e.x(e.isTimeSeries()?e.parseDate(t.start):t.start):0},e.prototype.regionY=function(t){var e=this,i=e.config,n="y"===t.axis?e.y:e.y2;return"y"===t.axis||"y2"===t.axis?i.axis_rotated?0:"end"in t?n(t.end):0:i.axis_rotated&&"start"in t?e.x(e.isTimeSeries()?e.parseDate(t.start):t.start):0},e.prototype.regionWidth=function(t){var e,i=this,n=i.config,r=i.regionX(t),a="y"===t.axis?i.y:i.y2;return(e="y"===t.axis||"y2"===t.axis?n.axis_rotated&&"end"in t?a(t.end):i.width:n.axis_rotated?i.width:"end"in t?i.x(i.isTimeSeries()?i.parseDate(t.end):t.end):i.width)<r?0:e-r},e.prototype.regionHeight=function(t){var e,i=this,n=i.config,r=this.regionY(t),a="y"===t.axis?i.y:i.y2;return(e="y"===t.axis||"y2"===t.axis?n.axis_rotated?i.height:"start"in t?a(t.start):i.height:n.axis_rotated&&"end"in t?i.x(i.isTimeSeries()?i.parseDate(t.end):t.end):i.height)<r?0:e-r},e.prototype.isRegionOnX=function(t){return!t.axis||"x"===t.axis},e.prototype.getScale=function(t,e,i){return(i?this.d3.scaleTime():this.d3.scaleLinear()).range([t,e])},e.prototype.getX=function(t,e,i,n){var r,a=this.getScale(t,e,this.isTimeSeries()),o=i?a.domain(i):a;for(r in this.isCategorized()?(n=n||function(){return 0},a=function(t,e){var i=o(t)+n(t);return e?i:Math.ceil(i)}):a=function(t,e){var i=o(t);return e?i:Math.ceil(i)},o)a[r]=o[r];return a.orgDomain=function(){return o.domain()},this.isCategorized()&&(a.domain=function(t){return arguments.length?(o.domain(t),a):[(t=this.orgDomain())[0],t[1]+1]}),a},e.prototype.getY=function(t,e,i){var n=this.getScale(t,e,this.isTimeSeriesY());return i&&n.domain(i),n},e.prototype.getYScale=function(t){return"y2"===this.axis.getId(t)?this.y2:this.y},e.prototype.getSubYScale=function(t){return"y2"===this.axis.getId(t)?this.subY2:this.subY},e.prototype.updateScales=function(){var t=this,e=t.config,i=!t.x;t.xMin=e.axis_rotated?1:0,t.xMax=e.axis_rotated?t.height:t.width,t.yMin=e.axis_rotated?0:t.height,t.yMax=e.axis_rotated?t.width:1,t.subXMin=t.xMin,t.subXMax=t.xMax,t.subYMin=e.axis_rotated?0:t.height2,t.subYMax=e.axis_rotated?t.width2:1,t.x=t.getX(t.xMin,t.xMax,i?void 0:t.x.orgDomain(),function(){return t.xAxis.tickOffset()}),t.y=t.getY(t.yMin,t.yMax,i?e.axis_y_default:t.y.domain()),t.y2=t.getY(t.yMin,t.yMax,i?e.axis_y2_default:t.y2.domain()),t.subX=t.getX(t.xMin,t.xMax,t.orgXDomain,function(e){return e%1?0:t.subXAxis.tickOffset()}),t.subY=t.getY(t.subYMin,t.subYMax,i?e.axis_y_default:t.subY.domain()),t.subY2=t.getY(t.subYMin,t.subYMax,i?e.axis_y2_default:t.subY2.domain()),t.xAxisTickFormat=t.axis.getXAxisTickFormat(),t.xAxisTickValues=t.axis.getXAxisTickValues(),t.yAxisTickValues=t.axis.getYAxisTickValues(),t.y2AxisTickValues=t.axis.getY2AxisTickValues(),t.xAxis=t.axis.getXAxis(t.x,t.xOrient,t.xAxisTickFormat,t.xAxisTickValues,e.axis_x_tick_outer),t.subXAxis=t.axis.getXAxis(t.subX,t.subXOrient,t.xAxisTickFormat,t.xAxisTickValues,e.axis_x_tick_outer),t.yAxis=t.axis.getYAxis(t.y,t.yOrient,e.axis_y_tick_format,t.yAxisTickValues,e.axis_y_tick_outer),t.y2Axis=t.axis.getYAxis(t.y2,t.y2Orient,e.axis_y2_tick_format,t.y2AxisTickValues,e.axis_y2_tick_outer),i||t.brush&&t.brush.updateScale(t.subX),t.updateArc&&t.updateArc()},e.prototype.selectPoint=function(t,e,i){var n=this,r=n.config,o=(r.axis_rotated?n.circleY:n.circleX).bind(n),s=(r.axis_rotated?n.circleX:n.circleY).bind(n),c=n.pointSelectR.bind(n);r.data_onselected.call(n.api,e,t.node()),n.main.select("."+a.selectedCircles+n.getTargetSelectorSuffix(e.id)).selectAll("."+a.selectedCircle+"-"+i).data([e]).enter().append("circle").attr("class",function(){return n.generateClass(a.selectedCircle,i)}).attr("cx",o).attr("cy",s).attr("stroke",function(){return n.color(e)}).attr("r",function(t){return 1.4*n.pointSelectR(t)}).transition().duration(100).attr("r",c)},e.prototype.unselectPoint=function(t,e,i){this.config.data_onunselected.call(this.api,e,t.node()),this.main.select("."+a.selectedCircles+this.getTargetSelectorSuffix(e.id)).selectAll("."+a.selectedCircle+"-"+i).transition().duration(100).attr("r",0).remove()},e.prototype.togglePoint=function(t,e,i,n){t?this.selectPoint(e,i,n):this.unselectPoint(e,i,n)},e.prototype.selectPath=function(t,e){var i=this;i.config.data_onselected.call(i,e,t.node()),i.config.interaction_brighten&&t.transition().duration(100).style("fill",function(){return i.d3.rgb(i.color(e)).brighter(.75)})},e.prototype.unselectPath=function(t,e){var i=this;i.config.data_onunselected.call(i,e,t.node()),i.config.interaction_brighten&&t.transition().duration(100).style("fill",function(){return i.color(e)})},e.prototype.togglePath=function(t,e,i,n){t?this.selectPath(e,i,n):this.unselectPath(e,i,n)},e.prototype.getToggle=function(t,e){var i;return"circle"===t.nodeName?i=this.isStepType(e)?function(){}:this.togglePoint:"path"===t.nodeName&&(i=this.togglePath),i},e.prototype.toggleShape=function(t,e,i){var n=this,r=n.d3,o=n.config,s=r.select(t),c=s.classed(a.SELECTED),d=n.getToggle(t,e).bind(n);o.data_selection_enabled&&o.data_selection_isselectable(e)&&(o.data_selection_multiple||n.main.selectAll("."+a.shapes+(o.data_selection_grouped?n.getTargetSelectorSuffix(e.id):"")).selectAll("."+a.shape).each(function(t,e){var i=r.select(this);i.classed(a.SELECTED)&&d(!1,i.classed(a.SELECTED,!1),t,e)}),s.classed(a.SELECTED,!c),d(!c,s,e,i))},e.prototype.initBar=function(){this.main.select("."+a.chart).append("g").attr("class",a.chartBars)},e.prototype.updateTargetsForBar=function(t){var e=this,i=e.config,n=e.classChartBar.bind(e),r=e.classBars.bind(e),o=e.classFocus.bind(e);e.main.select("."+a.chartBars).selectAll("."+a.chartBar).data(t).attr("class",function(t){return n(t)+o(t)}).enter().append("g").attr("class",n).style("pointer-events","none").append("g").attr("class",r).style("cursor",function(t){return i.data_selection_isselectable(t)?"pointer":null})},e.prototype.updateBar=function(t){var e=this,i=e.barData.bind(e),n=e.classBar.bind(e),r=e.initialOpacity.bind(e),o=function(t){return e.color(t.id)},s=e.main.selectAll("."+a.bars).selectAll("."+a.bar).data(i),c=s.enter().append("path").attr("class",n).style("stroke",o).style("fill",o);e.mainBar=c.merge(s).style("opacity",r),s.exit().transition().duration(t).style("opacity",0)},e.prototype.redrawBar=function(t,e,i){return[(e?this.mainBar.transition(i):this.mainBar).attr("d",t).style("stroke",this.color).style("fill",this.color).style("opacity",1)]},e.prototype.getBarW=function(t,e){var i=this.config,n="number"==typeof i.bar_width?i.bar_width:e?t.tickInterval()*i.bar_width_ratio/e:0;return i.bar_width_max&&n>i.bar_width_max?i.bar_width_max:n},e.prototype.getBars=function(t,e){return(e?this.main.selectAll("."+a.bars+this.getTargetSelectorSuffix(e)):this.main).selectAll("."+a.bar+(x(t)?"-"+t:""))},e.prototype.expandBars=function(t,e,i){i&&this.unexpandBars(),this.getBars(t,e).classed(a.EXPANDED,!0)},e.prototype.unexpandBars=function(t){this.getBars(t).classed(a.EXPANDED,!1)},e.prototype.generateDrawBar=function(t,e){var i=this.config,n=this.generateGetBarPoints(t,e);return function(t,e){var r=n(t,e),a=i.axis_rotated?1:0,o=i.axis_rotated?0:1;return"M "+r[0][a]+","+r[0][o]+" L"+r[1][a]+","+r[1][o]+" L"+r[2][a]+","+r[2][o]+" L"+r[3][a]+","+r[3][o]+" z"}},e.prototype.generateGetBarPoints=function(t,e){var i=this,n=e?i.subXAxis:i.xAxis,r=t.__max__+1,a=i.getBarW(n,r),o=i.getShapeX(a,r,t,!!e),s=i.getShapeY(!!e),c=i.getShapeOffset(i.isBarType,t,!!e),d=a*(i.config.bar_space/2),l=e?i.getSubYScale:i.getYScale;return function(t,e){var n=l.call(i,t.id)(0),r=c(t,e)||n,u=o(t),h=s(t);return i.config.axis_rotated&&(0<t.value&&h<n||t.value<0&&n<h)&&(h=n),[[u+d,r],[u+d,h-(n-r)],[u+a-d,h-(n-r)],[u+a-d,r]]}},e.prototype.isWithinBar=function(t,e){var i=e.getBoundingClientRect(),n=e.pathSegList.getItem(0),r=e.pathSegList.getItem(1),a=Math.min(n.x,r.x),o=Math.min(n.y,r.y),s=a+i.width+2,c=o+i.height+2,d=o-2;return a-2<t[0]&&t[0]<s&&d<t[1]&&t[1]<c},e.prototype.getShapeIndices=function(t){var e,i,n=this.config,r={},a=0;return this.filterTargetsToShow(this.data.targets.filter(t,this)).forEach(function(t){for(e=0;e<n.data_groups.length;e++)if(!(n.data_groups[e].indexOf(t.id)<0))for(i=0;i<n.data_groups[e].length;i++)if(n.data_groups[e][i]in r){r[t.id]=r[n.data_groups[e][i]];break}_(r[t.id])&&(r[t.id]=a++)}),r.__max__=a-1,r},e.prototype.getShapeX=function(t,e,i,n){var r=n?this.subX:this.x;return function(n){var a=n.id in i?i[n.id]:0;return n.x||0===n.x?r(n.x)-t*(e/2-a):0}},e.prototype.getShapeY=function(t){var e=this;return function(i){return(t?e.getSubYScale(i.id):e.getYScale(i.id))(i.value)}},e.prototype.getShapeOffset=function(t,e,i){var n=this,r=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),a=r.map(function(t){return t.id});return function(t,o){var s=i?n.getSubYScale(t.id):n.getYScale(t.id),c=s(0),d=c;return r.forEach(function(i){var r=n.isStepType(t)?n.convertValuesToStep(i.values):i.values;i.id!==t.id&&e[i.id]===e[t.id]&&a.indexOf(i.id)<a.indexOf(t.id)&&(void 0!==r[o]&&+r[o].x==+t.x||(o=-1,r.forEach(function(e,i){e.x===t.x&&(o=i)})),o in r&&r[o].value*t.value>=0&&(d+=s(r[o].value)-c))}),d}},e.prototype.isWithinShape=function(t,e){var i,n=this,r=n.d3.select(t);return n.isTargetToShow(e.id)?"circle"===t.nodeName?i=n.isStepType(e)?n.isWithinStep(t,n.getYScale(e.id)(e.value)):n.isWithinCircle(t,1.5*n.pointSelectR(e)):"path"===t.nodeName&&(i=!r.classed(a.bar)||n.isWithinBar(n.d3.mouse(t),t)):i=!1,i},e.prototype.getInterpolate=function(t){var e=this,i=e.d3,n={linear:i.curveLinear,"linear-closed":i.curveLinearClosed,basis:i.curveBasis,"basis-open":i.curveBasisOpen,"basis-closed":i.curveBasisClosed,bundle:i.curveBundle,cardinal:i.curveCardinal,"cardinal-open":i.curveCardinalOpen,"cardinal-closed":i.curveCardinalClosed,monotone:i.curveMonotoneX,step:i.curveStep,"step-before":i.curveStepBefore,"step-after":i.curveStepAfter};return e.isSplineType(t)?n[e.config.spline_interpolation_type]||n.cardinal:e.isStepType(t)?n[e.config.line_step_type]:n.linear},e.prototype.initLine=function(){this.main.select("."+a.chart).append("g").attr("class",a.chartLines)},e.prototype.updateTargetsForLine=function(t){var e,i=this,n=i.config,r=i.classChartLine.bind(i),o=i.classLines.bind(i),s=i.classAreas.bind(i),c=i.classCircles.bind(i),d=i.classFocus.bind(i);(e=i.main.select("."+a.chartLines).selectAll("."+a.chartLine).data(t).attr("class",function(t){return r(t)+d(t)}).enter().append("g").attr("class",r).style("opacity",0).style("pointer-events","none")).append("g").attr("class",o),e.append("g").attr("class",s),e.append("g").attr("class",function(t){return i.generateClass(a.selectedCircles,t.id)}),e.append("g").attr("class",c).style("cursor",function(t){return n.data_selection_isselectable(t)?"pointer":null}),t.forEach(function(t){i.main.selectAll("."+a.selectedCircles+i.getTargetSelectorSuffix(t.id)).selectAll("."+a.selectedCircle).each(function(e){e.value=t.values[e.index].value})})},e.prototype.updateLine=function(t){var e=this,i=e.main.selectAll("."+a.lines).selectAll("."+a.line).data(e.lineData.bind(e)),n=i.enter().append("path").attr("class",e.classLine.bind(e)).style("stroke",e.color);e.mainLine=n.merge(i).style("opacity",e.initialOpacity.bind(e)).style("shape-rendering",function(t){return e.isStepType(t)?"crispEdges":""}).attr("transform",null),i.exit().transition().duration(t).style("opacity",0)},e.prototype.redrawLine=function(t,e,i){return[(e?this.mainLine.transition(i):this.mainLine).attr("d",t).style("stroke",this.color).style("opacity",1)]},e.prototype.generateDrawLine=function(t,e){var i=this,n=i.config,r=i.d3.line(),a=i.generateGetLinePoints(t,e),o=e?i.getSubYScale:i.getYScale,s=function(t){return(e?i.subxx:i.xx).call(i,t)},c=function(t,e){return n.data_groups.length>0?a(t,e)[0][1]:o.call(i,t.id)(t.value)};return r=n.axis_rotated?r.x(c).y(s):r.x(s).y(c),n.line_connectNull||(r=r.defined(function(t){return null!=t.value})),function(t){var a,s=n.line_connectNull?i.filterRemoveNull(t.values):t.values,c=e?i.subX:i.x,d=o.call(i,t.id),l=0,u=0;return i.isLineType(t)?n.data_regions[t.id]?a=i.lineWithRegions(s,c,d,n.data_regions[t.id]):(i.isStepType(t)&&(s=i.convertValuesToStep(s)),a=r.curve(i.getInterpolate(t))(s)):(s[0]&&(l=c(s[0].x),u=d(s[0].value)),a=n.axis_rotated?"M "+u+" "+l:"M "+l+" "+u),a||"M 0 0"}},e.prototype.generateGetLinePoints=function(t,e){var i=this,n=i.config,r=t.__max__+1,a=i.getShapeX(0,r,t,!!e),o=i.getShapeY(!!e),s=i.getShapeOffset(i.isLineType,t,!!e),c=e?i.getSubYScale:i.getYScale;return function(t,e){var r=c.call(i,t.id)(0),d=s(t,e)||r,l=a(t),u=o(t);return n.axis_rotated&&(0<t.value&&u<r||t.value<0&&r<u)&&(u=r),[[l,u-(r-d)],[l,u-(r-d)],[l,u-(r-d)],[l,u-(r-d)]]}},e.prototype.lineWithRegions=function(t,e,i,n){var r,a,o,s,c,d,l,u,g,p,f,x=this,y=x.config,m="M",S=x.isCategorized()?.5:0,w=[];function v(t,e){var i;for(i=0;i<e.length;i++)if(e[i].start<t&&t<=e[i].end)return!0;return!1}if(h(n))for(r=0;r<n.length;r++)w[r]={},_(n[r].start)?w[r].start=t[0].x:w[r].start=x.isTimeSeries()?x.parseDate(n[r].start):n[r].start,_(n[r].end)?w[r].end=t[t.length-1].x:w[r].end=x.isTimeSeries()?x.parseDate(n[r].end):n[r].end;function b(t){return"M"+t[0][0]+" "+t[0][1]+" "+t[1][0]+" "+t[1][1]}for(p=y.axis_rotated?function(t){return i(t.value)}:function(t){return e(t.x)},f=y.axis_rotated?function(t){return e(t.x)}:function(t){return i(t.value)},o=x.isTimeSeries()?function(t,n,r,a){var o=t.x.getTime(),s=n.x-t.x,d=new Date(o+s*r),l=new Date(o+s*(r+a));return b(y.axis_rotated?[[i(c(r)),e(d)],[i(c(r+a)),e(l)]]:[[e(d),i(c(r))],[e(l),i(c(r+a))]])}:function(t,n,r,a){return b(y.axis_rotated?[[i(c(r),!0),e(s(r))],[i(c(r+a),!0),e(s(r+a))]]:[[e(s(r),!0),i(c(r))],[e(s(r+a),!0),i(c(r+a))]])},r=0;r<t.length;r++){if(_(w)||!v(t[r].x,w))m+=" "+p(t[r])+" "+f(t[r]);else for(s=x.getScale(t[r-1].x+S,t[r].x+S,x.isTimeSeries()),c=x.getScale(t[r-1].value,t[r].value),d=e(t[r].x)-e(t[r-1].x),l=i(t[r].value)-i(t[r-1].value),g=2*(u=2/Math.sqrt(Math.pow(d,2)+Math.pow(l,2))),a=u;a<=1;a+=g)m+=o(t[r-1],t[r],a,u);t[r].x}return m},e.prototype.updateArea=function(t){var e=this,i=e.d3,n=e.main.selectAll("."+a.areas).selectAll("."+a.area).data(e.lineData.bind(e)),r=n.enter().append("path").attr("class",e.classArea.bind(e)).style("fill",e.color).style("opacity",function(){return e.orgAreaOpacity=+i.select(this).style("opacity"),0});e.mainArea=r.merge(n).style("opacity",e.orgAreaOpacity),n.exit().transition().duration(t).style("opacity",0)},e.prototype.redrawArea=function(t,e,i){return[(e?this.mainArea.transition(i):this.mainArea).attr("d",t).style("fill",this.color).style("opacity",this.orgAreaOpacity)]},e.prototype.generateDrawArea=function(t,e){var i=this,n=i.config,r=i.d3.area(),a=i.generateGetAreaPoints(t,e),o=e?i.getSubYScale:i.getYScale,s=function(t){return(e?i.subxx:i.xx).call(i,t)},c=function(t,e){return n.data_groups.length>0?a(t,e)[0][1]:o.call(i,t.id)(i.getAreaBaseValue(t.id))},d=function(t,e){return n.data_groups.length>0?a(t,e)[1][1]:o.call(i,t.id)(t.value)};return r=n.axis_rotated?r.x0(c).x1(d).y(s):r.x(s).y0(n.area_above?0:c).y1(d),n.line_connectNull||(r=r.defined(function(t){return null!==t.value})),function(t){var e,a=n.line_connectNull?i.filterRemoveNull(t.values):t.values,o=0,s=0;return i.isAreaType(t)?(i.isStepType(t)&&(a=i.convertValuesToStep(a)),e=r.curve(i.getInterpolate(t))(a)):(a[0]&&(o=i.x(a[0].x),s=i.getYScale(t.id)(a[0].value)),e=n.axis_rotated?"M "+s+" "+o:"M "+o+" "+s),e||"M 0 0"}},e.prototype.getAreaBaseValue=function(){return 0},e.prototype.generateGetAreaPoints=function(t,e){var i=this,n=i.config,r=t.__max__+1,a=i.getShapeX(0,r,t,!!e),o=i.getShapeY(!!e),s=i.getShapeOffset(i.isAreaType,t,!!e),c=e?i.getSubYScale:i.getYScale;return function(t,e){var r=c.call(i,t.id)(0),d=s(t,e)||r,l=a(t),u=o(t);return n.axis_rotated&&(0<t.value&&u<r||t.value<0&&r<u)&&(u=r),[[l,d],[l,u-(r-d)],[l,u-(r-d)],[l,d]]}},e.prototype.updateCircle=function(t,e){var i=this,n=i.main.selectAll("."+a.circles).selectAll("."+a.circle).data(i.lineOrScatterData.bind(i)),r=n.enter().append("circle").attr("class",i.classCircle.bind(i)).attr("cx",t).attr("cy",e).attr("r",i.pointR.bind(i)).style("fill",i.color);i.mainCircle=r.merge(n).style("opacity",i.initialOpacityForCircle.bind(i)),n.exit().style("opacity",0)},e.prototype.redrawCircle=function(t,e,i,n){var r=this,o=r.main.selectAll("."+a.selectedCircle);return[(i?r.mainCircle.transition(n):r.mainCircle).style("opacity",this.opacityForCircle.bind(r)).style("fill",r.color).attr("cx",t).attr("cy",e),(i?o.transition(n):o).attr("cx",t).attr("cy",e)]},e.prototype.circleX=function(t){return t.x||0===t.x?this.x(t.x):null},e.prototype.updateCircleY=function(){var t,e,i=this;i.config.data_groups.length>0?(t=i.getShapeIndices(i.isLineType),e=i.generateGetLinePoints(t),i.circleY=function(t,i){return e(t,i)[0][1]}):i.circleY=function(t){return i.getYScale(t.id)(t.value)}},e.prototype.getCircles=function(t,e){return(e?this.main.selectAll("."+a.circles+this.getTargetSelectorSuffix(e)):this.main).selectAll("."+a.circle+(x(t)?"-"+t:""))},e.prototype.expandCircles=function(t,e,i){var n=this.pointExpandedR.bind(this);i&&this.unexpandCircles(),this.getCircles(t,e).classed(a.EXPANDED,!0).attr("r",n)},e.prototype.unexpandCircles=function(t){var e=this,i=e.pointR.bind(e);e.getCircles(t).filter(function(){return e.d3.select(this).classed(a.EXPANDED)}).classed(a.EXPANDED,!1).attr("r",i)},e.prototype.pointR=function(t){var e=this.config;return this.isStepType(t)?0:p(e.point_r)?e.point_r(t):e.point_r},e.prototype.pointExpandedR=function(t){var e=this.config;return e.point_focus_expand_enabled?p(e.point_focus_expand_r)?e.point_focus_expand_r(t):e.point_focus_expand_r?e.point_focus_expand_r:1.75*this.pointR(t):this.pointR(t)},e.prototype.pointSelectR=function(t){var e=this.config;return p(e.point_select_r)?e.point_select_r(t):e.point_select_r?e.point_select_r:4*this.pointR(t)},e.prototype.isWithinCircle=function(t,e){var i=this.d3,n=i.mouse(t),r=i.select(t),a=+r.attr("cx"),o=+r.attr("cy");return Math.sqrt(Math.pow(a-n[0],2)+Math.pow(o-n[1],2))<e},e.prototype.isWithinStep=function(t,e){return Math.abs(e-this.d3.mouse(t)[1])<30},e.prototype.getCurrentWidth=function(){var t=this.config;return t.size_width?t.size_width:this.getParentWidth()},e.prototype.getCurrentHeight=function(){var t=this.config,e=t.size_height?t.size_height:this.getParentHeight();return e>0?e:320/(this.hasType("gauge")&&!t.gauge_fullCircle?2:1)},e.prototype.getCurrentPaddingTop=function(){var t=this.config,e=x(t.padding_top)?t.padding_top:0;return this.title&&this.title.node()&&(e+=this.getTitlePadding()),e},e.prototype.getCurrentPaddingBottom=function(){var t=this.config;return x(t.padding_bottom)?t.padding_bottom:0},e.prototype.getCurrentPaddingLeft=function(t){var e=this.config;return x(e.padding_left)?e.padding_left:e.axis_rotated?!e.axis_x_show||e.axis_x_inner?1:Math.max(s(this.getAxisWidthByAxisId("x",t)),40):!e.axis_y_show||e.axis_y_inner?this.axis.getYAxisLabelPosition().isOuter?30:1:s(this.getAxisWidthByAxisId("y",t))},e.prototype.getCurrentPaddingRight=function(){var t=this,e=t.config,i=t.isLegendRight?t.getLegendWidth()+20:0;return x(e.padding_right)?e.padding_right+1:e.axis_rotated?10+i:!e.axis_y2_show||e.axis_y2_inner?2+i+(t.axis.getY2AxisLabelPosition().isOuter?20:0):s(t.getAxisWidthByAxisId("y2"))+i},e.prototype.getParentRectValue=function(t){for(var e,i=this.selectChart.node();i&&"BODY"!==i.tagName;){try{e=i.getBoundingClientRect()[t]}catch(n){"width"===t&&(e=i.offsetWidth)}if(e)break;i=i.parentNode}return e},e.prototype.getParentWidth=function(){return this.getParentRectValue("width")},e.prototype.getParentHeight=function(){var t=this.selectChart.style("height");return t.indexOf("px")>0?+t.replace("px",""):0},e.prototype.getSvgLeft=function(t){var e=this,i=e.config,n=i.axis_rotated||!i.axis_rotated&&!i.axis_y_inner,r=i.axis_rotated?a.axisX:a.axisY,o=e.main.select("."+r).node(),s=o&&n?o.getBoundingClientRect():{right:0},c=e.selectChart.node().getBoundingClientRect(),d=e.hasArcType(),l=s.right-c.left-(d?0:e.getCurrentPaddingLeft(t));return l>0?l:0},e.prototype.getAxisWidthByAxisId=function(t,e){var i=this.axis.getLabelPositionById(t);return this.axis.getMaxTickWidth(t,e)+(i.isInner?20:40)},e.prototype.getHorizontalAxisHeight=function(t){var e=this,i=e.config,n=30;return"x"!==t||i.axis_x_show?"x"===t&&i.axis_x_height?i.axis_x_height:"y"!==t||i.axis_y_show?"y2"!==t||i.axis_y2_show?("x"===t&&!i.axis_rotated&&i.axis_x_tick_rotate&&(n=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-Math.abs(i.axis_x_tick_rotate))/180)),"y"===t&&i.axis_rotated&&i.axis_y_tick_rotate&&(n=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-Math.abs(i.axis_y_tick_rotate))/180)),n+(e.axis.getLabelPositionById(t).isInner?0:10)+("y2"===t?-10:0)):e.rotated_padding_top:!i.legend_show||e.isLegendRight||e.isLegendInset?1:10:8},e.prototype.initBrush=function(t){var e=this,i=e.d3;return e.brush=(e.config.axis_rotated?i.brushY():i.brushX()).on("brush",function(){var t=i.event.sourceEvent;t&&"zoom"===t.type||e.redrawForBrush()}).on("end",function(){var t=i.event.sourceEvent;t&&"zoom"===t.type||e.brush.empty()&&t&&"end"!==t.type&&e.brush.clear()}),e.brush.updateExtent=function(){var t,i=this.scale.range();return t=e.config.axis_rotated?[[0,i[0]],[e.width2,i[1]]]:[[i[0],0],[i[1],e.height2]],this.extent(t),this},e.brush.updateScale=function(t){return this.scale=t,this},e.brush.update=function(t){this.updateScale(t||e.subX).updateExtent(),e.context.select("."+a.brush).call(this)},e.brush.clear=function(){e.context.select("."+a.brush).call(e.brush.move,null)},e.brush.selection=function(){return i.brushSelection(e.context.select("."+a.brush).node())},e.brush.selectionAsValue=function(t,i){var n,r;return t?(e.context&&(n=[this.scale(t[0]),this.scale(t[1])],r=e.context.select("."+a.brush),i&&(r=r.transition()),e.brush.move(r,n)),[]):(n=e.brush.selection()||[0,0],[this.scale.invert(n[0]),this.scale.invert(n[1])])},e.brush.empty=function(){var t=e.brush.selection();return!t||t[0]===t[1]},e.brush.updateScale(t)},e.prototype.initSubchart=function(){var t=this,e=t.config,i=t.context=t.svg.append("g").attr("transform",t.getTranslate("context")),n=e.subchart_show?"visible":"hidden";i.style("visibility",n),i.append("g").attr("clip-path",t.clipPathForSubchart).attr("class",a.chart),i.select("."+a.chart).append("g").attr("class",a.chartBars),i.select("."+a.chart).append("g").attr("class",a.chartLines),i.append("g").attr("clip-path",t.clipPath).attr("class",a.brush),t.axes.subx=i.append("g").attr("class",a.axisX).attr("transform",t.getTranslate("subx")).attr("clip-path",e.axis_rotated?"":t.clipPathForXAxis)},e.prototype.initSubchartBrush=function(){this.initBrush(this.subX).updateExtent(),this.context.select("."+a.brush).call(this.brush)},e.prototype.updateTargetsForSubchart=function(t){var e,i,n,r,o=this,s=o.context,c=o.config,d=o.classChartBar.bind(o),l=o.classBars.bind(o),u=o.classChartLine.bind(o),h=o.classLines.bind(o),g=o.classAreas.bind(o);c.subchart_show&&((n=(r=s.select("."+a.chartBars).selectAll("."+a.chartBar).data(t)).enter().append("g").style("opacity",0)).merge(r).attr("class",d),n.append("g").attr("class",l),(e=(i=s.select("."+a.chartLines).selectAll("."+a.chartLine).data(t)).enter().append("g").style("opacity",0)).merge(i).attr("class",u),e.append("g").attr("class",h),e.append("g").attr("class",g),s.selectAll("."+a.brush+" rect").attr(c.axis_rotated?"width":"height",c.axis_rotated?o.width2:o.height2))},e.prototype.updateBarForSubchart=function(t){var e=this,i=e.context.selectAll("."+a.bars).selectAll("."+a.bar).data(e.barData.bind(e)),n=i.enter().append("path").attr("class",e.classBar.bind(e)).style("stroke","none").style("fill",e.color);i.exit().transition().duration(t).style("opacity",0).remove(),e.contextBar=n.merge(i).style("opacity",e.initialOpacity.bind(e))},e.prototype.redrawBarForSubchart=function(t,e,i){(e?this.contextBar.transition(Math.random().toString()).duration(i):this.contextBar).attr("d",t).style("opacity",1)},e.prototype.updateLineForSubchart=function(t){var e=this,i=e.context.selectAll("."+a.lines).selectAll("."+a.line).data(e.lineData.bind(e)),n=i.enter().append("path").attr("class",e.classLine.bind(e)).style("stroke",e.color);i.exit().transition().duration(t).style("opacity",0).remove(),e.contextLine=n.merge(i).style("opacity",e.initialOpacity.bind(e))},e.prototype.redrawLineForSubchart=function(t,e,i){(e?this.contextLine.transition(Math.random().toString()).duration(i):this.contextLine).attr("d",t).style("opacity",1)},e.prototype.updateAreaForSubchart=function(t){var e=this,i=e.d3,n=e.context.selectAll("."+a.areas).selectAll("."+a.area).data(e.lineData.bind(e)),r=n.enter().append("path").attr("class",e.classArea.bind(e)).style("fill",e.color).style("opacity",function(){return e.orgAreaOpacity=+i.select(this).style("opacity"),0});n.exit().transition().duration(t).style("opacity",0).remove(),e.contextArea=r.merge(n).style("opacity",0)},e.prototype.redrawAreaForSubchart=function(t,e,i){(e?this.contextArea.transition(Math.random().toString()).duration(i):this.contextArea).attr("d",t).style("fill",this.color).style("opacity",this.orgAreaOpacity)},e.prototype.redrawSubchart=function(t,e,i,n,r,a,o){var s,c,d,l=this,u=l.d3,h=l.config;l.context.style("visibility",h.subchart_show?"visible":"hidden"),h.subchart_show&&(u.event&&"zoom"===u.event.type&&l.brush.selectionAsValue(l.x.orgDomain()),t&&(l.brush.empty()||l.brush.selectionAsValue(l.x.orgDomain()),s=l.generateDrawArea(r,!0),c=l.generateDrawBar(a,!0),d=l.generateDrawLine(o,!0),l.updateBarForSubchart(i),l.updateLineForSubchart(i),l.updateAreaForSubchart(i),l.redrawBarForSubchart(c,i,i),l.redrawLineForSubchart(d,i,i),l.redrawAreaForSubchart(s,i,i)))},e.prototype.redrawForBrush=function(){var t,e=this,i=e.x,n=e.d3;e.redraw({withTransition:!1,withY:e.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withEventRect:!1,withDimension:!1}),t=n.event.selection||e.brush.scale.range(),e.main.select("."+a.eventRect).call(e.zoom.transform,n.zoomIdentity.scale(e.width/(t[1]-t[0])).translate(-t[0],0)),e.config.subchart_onbrush.call(e.api,i.orgDomain())},e.prototype.transformContext=function(t,e){var i;e&&e.axisSubX?i=e.axisSubX:(i=this.context.select("."+a.axisX),t&&(i=i.transition())),this.context.attr("transform",this.getTranslate("context")),i.attr("transform",this.getTranslate("subx"))},e.prototype.getDefaultSelection=function(){var t=this,e=t.config,i=p(e.axis_x_selection)?e.axis_x_selection(t.getXDomain(t.data.targets)):e.axis_x_selection;return t.isTimeSeries()&&(i=[t.parseDate(i[0]),t.parseDate(i[1])]),i},e.prototype.initText=function(){this.main.select("."+a.chart).append("g").attr("class",a.chartTexts),this.mainText=this.d3.selectAll([])},e.prototype.updateTargetsForText=function(t){var e=this,i=e.classChartText.bind(e),n=e.classTexts.bind(e),r=e.classFocus.bind(e),o=e.main.select("."+a.chartTexts).selectAll("."+a.chartText).data(t),s=o.enter().append("g").attr("class",i).style("opacity",0).style("pointer-events","none");s.append("g").attr("class",n),s.merge(o).attr("class",function(t){return i(t)+r(t)})},e.prototype.updateText=function(t,e,i){var n=this,r=n.config,o=n.barOrLineData.bind(n),s=n.classText.bind(n),c=n.main.selectAll("."+a.texts).selectAll("."+a.text).data(o),d=c.enter().append("text").attr("class",s).attr("text-anchor",function(t){return r.axis_rotated?t.value<0?"end":"start":"middle"}).style("stroke","none").attr("x",t).attr("y",e).style("fill",function(t){return n.color(t)}).style("fill-opacity",0);n.mainText=d.merge(c).text(function(t,e,i){return n.dataLabelFormat(t.id)(t.value,t.id,e,i)}),c.exit().transition().duration(i).style("fill-opacity",0).remove()},e.prototype.redrawText=function(t,e,i,n,r){return[(n?this.mainText.transition(r):this.mainText).attr("x",t).attr("y",e).style("fill",this.color).style("fill-opacity",i?0:this.opacityForText.bind(this))]},e.prototype.getTextRect=function(t,e,i){var n,r=this.d3.select("body").append("div").classed("c3",!0),a=r.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),o=this.d3.select(i).style("font");return a.selectAll(".dummy").data([t]).enter().append("text").classed(e||"",!0).style("font",o).text(t).each(function(){n=this.getBoundingClientRect()}),r.remove(),n},e.prototype.generateXYForText=function(t,e,i,n){var r=this,a=r.generateGetAreaPoints(t,!1),o=r.generateGetBarPoints(e,!1),s=r.generateGetLinePoints(i,!1),c=n?r.getXForText:r.getYForText;return function(t,e){var i=r.isAreaType(t)?a:r.isBarType(t)?o:s;return c.call(r,i(t,e),t,this)}},e.prototype.getXForText=function(t,e,i){var n,r,a=this,o=i.getBoundingClientRect();return a.config.axis_rotated?(r=a.isBarType(e)?4:6,n=t[2][1]+r*(e.value<0?-1:1)):n=a.hasType("bar")?(t[2][0]+t[0][0])/2:t[0][0],null===e.value&&(n>a.width?n=a.width-o.width:n<0&&(n=4)),n},e.prototype.getYForText=function(t,e,i){var n,r=this,a=i.getBoundingClientRect();return r.config.axis_rotated?n=(t[0][0]+t[2][0]+.6*a.height)/2:(n=t[2][1],e.value<0||0===e.value&&!r.hasPositiveValue?(n+=a.height,r.isBarType(e)&&r.isSafari()?n-=3:!r.isBarType(e)&&r.isChrome()&&(n+=3)):n+=r.isBarType(e)?-3:-6),null!==e.value||r.config.axis_rotated||(n<a.height?n=a.height:n>this.height&&(n=this.height-4)),n},e.prototype.initTitle=function(){this.title=this.svg.append("text").text(this.config.title_text).attr("class",this.CLASS.title)},e.prototype.redrawTitle=function(){var t=this;t.title.attr("x",t.xForTitle.bind(t)).attr("y",t.yForTitle.bind(t))},e.prototype.xForTitle=function(){var t=this,e=t.config,i=e.title_position||"left";return i.indexOf("right")>=0?t.currentWidth-t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node()).width-e.title_padding.right:i.indexOf("center")>=0?(t.currentWidth-t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node()).width)/2:e.title_padding.left},e.prototype.yForTitle=function(){var t=this;return t.config.title_padding.top+t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node()).height},e.prototype.getTitlePadding=function(){return this.yForTitle()+this.config.title_padding.bottom},e.prototype.initTooltip=function(){var t,e=this,i=e.config;if(e.tooltip=e.selectChart.style("position","relative").append("div").attr("class",a.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none"),i.tooltip_init_show){if(e.isTimeSeries()&&f(i.tooltip_init_x)){for(i.tooltip_init_x=e.parseDate(i.tooltip_init_x),t=0;t<e.data.targets[0].values.length&&e.data.targets[0].values[t].x-i.tooltip_init_x!=0;t++);i.tooltip_init_x=t}e.tooltip.html(i.tooltip_contents.call(e,e.data.targets.map(function(t){return e.addName(t.values[i.tooltip_init_x])}),e.axis.getXAxisTickFormat(),e.getYFormat(e.hasArcType()),e.color)),e.tooltip.style("top",i.tooltip_init_position.top).style("left",i.tooltip_init_position.left).style("display","block")}},e.prototype.getTooltipSortFunction=function(){var t=this,e=t.config;if(0!==e.data_groups.length&&void 0===e.tooltip_order){var i=t.orderTargets(t.data.targets).map(function(t){return t.id});return(t.isOrderAsc()||t.isOrderDesc())&&(i=i.reverse()),function(t,e){return i.indexOf(t.id)-i.indexOf(e.id)}}var n=e.tooltip_order;void 0===n&&(n=e.data_order);var r=function(t){return t?t.value:null};if(f(n)&&"asc"===n.toLowerCase())return function(t,e){return r(t)-r(e)};if(f(n)&&"desc"===n.toLowerCase())return function(t,e){return r(e)-r(t)};if(p(n)){var a=n;return void 0===e.tooltip_order&&(a=function(t,e){return n(t?{id:t.id,values:[t]}:null,e?{id:e.id,values:[e]}:null)}),a}return u(n)?function(t,e){return n.indexOf(t.id)-n.indexOf(e.id)}:void 0},e.prototype.getTooltipContent=function(t,e,i,n){var r,a,o,s,c,d,l=this,u=l.config,h=u.tooltip_format_title||e,g=u.tooltip_format_name||function(t){return t},p=u.tooltip_format_value||i,f=this.getTooltipSortFunction();for(f&&t.sort(f),a=0;a<t.length;a++)if(t[a]&&(t[a].value||0===t[a].value)&&(r||(o=m(h?h(t[a].x):t[a].x),r="<table class='"+l.CLASS.tooltip+"'>"+(o||0===o?"<tr><th colspan='2'>"+o+"</th></tr>":"")),void 0!==(s=m(p(t[a].value,t[a].ratio,t[a].id,t[a].index,t))))){if(null===t[a].name)continue;c=m(g(t[a].name,t[a].ratio,t[a].id,t[a].index)),d=l.levelColor?l.levelColor(t[a].value):n(t[a].id),r+="<tr class='"+l.CLASS.tooltipName+"-"+l.getTargetSelectorSuffix(t[a].id)+"'>",r+="<td class='name'><span style='background-color:"+d+"'></span>"+c+"</td>",r+="<td class='value'>"+s+"</td>",r+="</tr>"}return r+"</table>"},e.prototype.tooltipPosition=function(t,e,i,n){var r,a,o,s,c,d=this,l=d.config,u=d.d3,h=d.hasArcType(),g=u.mouse(n);return h?(a=(d.width-(d.isLegendRight?d.getLegendWidth():0))/2+g[0],s=(d.hasType("gauge")?d.height:d.height/2)+g[1]+20):(r=d.getSvgLeft(!0),l.axis_rotated?(o=(a=r+g[0]+100)+e,c=d.currentWidth-d.getCurrentPaddingRight(),s=d.x(t[0].x)+20):(o=(a=r+d.getCurrentPaddingLeft(!0)+d.x(t[0].x)+20)+e,c=r+d.currentWidth-d.getCurrentPaddingRight(),s=g[1]+15),o>c&&(a-=o-c+20),s+i>d.currentHeight&&(s-=i+30)),s<0&&(s=0),{top:s,left:a}},e.prototype.showTooltip=function(t,i){var n,r,a,o=this,s=o.config,c=o.hasArcType(),d=t.filter(function(t){return t&&x(t.value)}),l=s.tooltip_position||e.prototype.tooltipPosition;0!==d.length&&s.tooltip_show&&(o.tooltip.html(s.tooltip_contents.call(o,t,o.axis.getXAxisTickFormat(),o.getYFormat(c),o.color)).style("display","block"),n=o.tooltip.property("offsetWidth"),r=o.tooltip.property("offsetHeight"),a=l.call(this,d,n,r,i),o.tooltip.style("top",a.top+"px").style("left",a.left+"px"))},e.prototype.hideTooltip=function(){this.tooltip.style("display","none")},e.prototype.setTargetType=function(t,e){var i=this,n=i.config;i.mapToTargetIds(t).forEach(function(t){i.withoutFadeIn[t]=e===n.data_types[t],n.data_types[t]=e}),t||(n.data_type=e)},e.prototype.hasType=function(t,e){var i=this.config.data_types,n=!1;return(e=e||this.data.targets)&&e.length?e.forEach(function(e){var r=i[e.id];(r&&r.indexOf(t)>=0||!r&&"line"===t)&&(n=!0)}):Object.keys(i).length?Object.keys(i).forEach(function(e){i[e]===t&&(n=!0)}):n=this.config.data_type===t,n},e.prototype.hasArcType=function(t){return this.hasType("pie",t)||this.hasType("donut",t)||this.hasType("gauge",t)},e.prototype.isLineType=function(t){var e=this.config,i=f(t)?t:t.id;return!e.data_types[i]||["line","spline","area","area-spline","step","area-step"].indexOf(e.data_types[i])>=0},e.prototype.isStepType=function(t){var e=f(t)?t:t.id;return["step","area-step"].indexOf(this.config.data_types[e])>=0},e.prototype.isSplineType=function(t){var e=f(t)?t:t.id;return["spline","area-spline"].indexOf(this.config.data_types[e])>=0},e.prototype.isAreaType=function(t){var e=f(t)?t:t.id;return["area","area-spline","area-step"].indexOf(this.config.data_types[e])>=0},e.prototype.isBarType=function(t){var e=f(t)?t:t.id;return"bar"===this.config.data_types[e]},e.prototype.isScatterType=function(t){var e=f(t)?t:t.id;return"scatter"===this.config.data_types[e]},e.prototype.isPieType=function(t){var e=f(t)?t:t.id;return"pie"===this.config.data_types[e]},e.prototype.isGaugeType=function(t){var e=f(t)?t:t.id;return"gauge"===this.config.data_types[e]},e.prototype.isDonutType=function(t){var e=f(t)?t:t.id;return"donut"===this.config.data_types[e]},e.prototype.isArcType=function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)},e.prototype.lineData=function(t){return this.isLineType(t)?[t]:[]},e.prototype.arcData=function(t){return this.isArcType(t.data)?[t]:[]},e.prototype.barData=function(t){return this.isBarType(t)?t.values:[]},e.prototype.lineOrScatterData=function(t){return this.isLineType(t)||this.isScatterType(t)?t.values:[]},e.prototype.barOrLineData=function(t){return this.isBarType(t)||this.isLineType(t)?t.values:[]},e.prototype.isSafari=function(){var t=window.navigator.userAgent;return t.indexOf("Safari")>=0&&t.indexOf("Chrome")<0},e.prototype.isChrome=function(){return window.navigator.userAgent.indexOf("Chrome")>=0},e.prototype.initZoom=function(){var t,e=this,i=e.d3,n=e.config;return e.zoom=i.zoom().on("start",function(){if("scroll"===n.zoom_type){var r=i.event.sourceEvent;r&&"brush"===r.type||(t=r,n.zoom_onzoomstart.call(e.api,r))}}).on("zoom",function(){if("scroll"===n.zoom_type){var t=i.event.sourceEvent;t&&"brush"===t.type||(e.redrawForZoom(),n.zoom_onzoom.call(e.api,e.x.orgDomain()))}}).on("end",function(){if("scroll"===n.zoom_type){var r=i.event.sourceEvent;r&&"brush"===r.type||r&&t.clientX===r.clientX&&t.clientY===r.clientY||n.zoom_onzoomend.call(e.api,e.x.orgDomain())}}),e.zoom.updateDomain=function(){return i.event&&i.event.transform&&e.x.domain(i.event.transform.rescaleX(e.subX).domain()),this},e.zoom.updateExtent=function(){return this.scaleExtent([1,1/0]).translateExtent([[0,0],[e.width,e.height]]).extent([[0,0],[e.width,e.height]]),this},e.zoom.update=function(){return this.updateExtent().updateDomain()},e.zoom.updateExtent()},e.prototype.zoomTransform=function(t){var e=[this.x(t[0]),this.x(t[1])];return this.d3.zoomIdentity.scale(this.width/(e[1]-e[0])).translate(-e[0],0)},e.prototype.initDragZoom=function(){var t=this,e=t.d3,i=t.config,n=t.context=t.svg,r=t.margin.left+20.5,o=t.margin.top+.5;if("drag"===i.zoom_type&&i.zoom_enabled){var s=function(e){return e&&e.map(function(e){return t.x.invert(e)})},c=t.dragZoomBrush=e.brushX().on("start",function(){t.api.unzoom(),t.svg.select("."+a.dragZoom).classed("disabled",!1),i.zoom_onzoomstart.call(t.api,e.event.sourceEvent)}).on("brush",function(){i.zoom_onzoom.call(t.api,s(e.event.selection))}).on("end",function(){if(null!=e.event.selection){var n=s(e.event.selection);i.zoom_disableDefaultBehavior||t.api.zoom(n),t.svg.select("."+a.dragZoom).classed("disabled",!0),i.zoom_onzoomend.call(t.api,n)}});n.append("g").classed(a.dragZoom,!0).attr("clip-path",t.clipPath).attr("transform","translate("+r+","+o+")").call(c)}},e.prototype.getZoomDomain=function(){var t=this.config,e=this.d3;return[e.min([this.orgXDomain[0],t.zoom_x_min]),e.max([this.orgXDomain[1],t.zoom_x_max])]},e.prototype.redrawForZoom=function(){var t=this,e=t.d3,i=t.config,n=t.zoom,r=t.x;i.zoom_enabled&&0!==t.filterTargetsToShow(t.data.targets).length&&(n.update(),i.zoom_disableDefaultBehavior||(t.isCategorized()&&r.orgDomain()[0]===t.orgXDomain[0]&&r.domain([t.orgXDomain[0]-1e-10,r.orgDomain()[1]]),t.redraw({withTransition:!1,withY:i.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e.event.sourceEvent&&"mousemove"===e.event.sourceEvent.type&&(t.cancelClick=!0)))},w}()}});if("object"==typeof i){var n=["object"==typeof module&&"object"==typeof module.exports?module.exports:null,"undefined"!=typeof window?window:null,t&&t!==window?t:null];for(var r in i)n[0]&&(n[0][r]=i[r]),n[1]&&"__esModule"!==r&&(n[1][r]=i[r]),n[2]&&(n[2][r]=i[r])}}(this);