}):sf(a))},Gf.unload=function(a,b){tf(Dc(a),function(){kf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),"function"==typeofb&&b()})},Gf.selected=function(a){returnFf.merge(oj.selectAll("."+f.shapes+od(a)).selectAll("."+f.shape).filter(function(){returnFf.select(this).classed(f.SELECTED)}).map(function(a){returna.map(function(a){varb=a.__data__;returnb.data?b.data:b})}))},Gf.select=function(a,b,c){Rg&&oj.selectAll("."+f.shapes).selectAll("."+f.shape).each(function(e,g){varh=Ff.select(this),i=e.data?e.data.id:e.id,j=Me(this),k=Sg||!a||a.indexOf(i)>=0,l=!b||b.indexOf(g)>=0,m=h.classed(f.SELECTED);k&&l?Tg(e)&&!m&&j(!0,h.classed(f.SELECTED,!0),e,g):d(c)&&c&&m&&j(!1,h.classed(f.SELECTED,!1),e,g)})},Gf.unselect=function(a,b){Rg&&oj.selectAll("."+f.shapes).selectAll("."+f.shape).each(function(c,d){vare=Ff.select(this),g=c.data?c.data.id:c.id,h=Me(this),i=Sg||!a||a.indexOf(g)>=0,j=!b||b.indexOf(d)>=0,k=e.classed(f.SELECTED);i&&j&&Tg(c)&&k&&h(!1,e.classed(f.SELECTED,!1),c,d)})},Gf.toLine=function(a){Ef(a,"line")},Gf.toSpline=function(a){Ef(a,"spline")},Gf.toBar=function(a){Ef(a,"bar")},Gf.toScatter=function(a){Ef(a,"scatter")},Gf.toArea=function(a){Ef(a,"area")},Gf.toAreaSpline=function(a){Ef(a,"area-spline")},Gf.toPie=function(a){Ef(a,"pie",{withTransform:!0})},Gf.toDonut=function(a){Ef(a,"donut",{withTransform:!0})},Gf.groups=function(a){returnc(a)?Hg:(Hg=a,kf(),Hg)},Gf.xgrids=function(a){returna?(Wh=a,kf(),Wh):Wh},Gf.xgrids.add=function(a){returna?Gf.xgrids(Wh.concat(a)):void0},Gf.xgrids.remove=function(a){varb=Df(a);returnGf.xgrids(Wh.filter(b))},Gf.ygrids=function(a){returna?(Yh=a,kf(),Yh):Yh},Gf.ygrids.add=function(a){returna?Gf.ygrids(Yh.concat(a)):void0},Gf.ygrids.remove=function(a){varb=Df(a);returnGf.ygrids(Yh.filter(b))},Gf.regions=function(a){returnc(a)?ui:(ui=a,kf(),ui)},Gf.regions.add=function(a){returnc(a)?ui:(ui=ui.concat(a),kf(),ui)},Gf.regions.remove=function(a,c){vare=[].concat(a);returnc=d(c)?c:{},e.forEach(function(a){vard=b(c.duration)?c.duration:0;mj.selectAll("."+a).transition().duration(d).style("fill-opacity",0).remove(),ui=ui.filter(function(b){returnb.classes.indexOf(a)<0})}),ui},Gf.data.get=function(a){varb=Gf.data.getAsTarget(a);returnd(b)?b.values.map(function(a){returna.value}):void0},Gf.data.getAsTarget=function(a){varb=Fc(function(b){returnb.id===a});returnb.length>0?b[0]:void0},Gf.data.names=function(a){returnarguments.length?(Object.keys(a).forEach(function(b){Fg[b]=a[b]}),Af(Cc(Gf.data.targets),{withTransition:!0}),Fg):Fg},Gf.x=function(a){returnarguments.length&&(qc(Gf.data.targets,a),kf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),Gf.data.xs},Gf.xs=function(a){returnarguments.length&&(rc(Gf.data.targets,a),kf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),Gf.data.xs},Gf.axis.labels=function(a){arguments.length&&(Object.keys(a).forEach(function(b){bb(b,a[b])}),Db())},Gf.axis.max=function(a){arguments.length&&("object"==typeofa?(b(a.y)&&(Dh=+a.y),b(a.y2)&&(Mh=+a.y2)):Dh=Mh=+a,kf())},Gf.axis.min=function(a){arguments.length&&("object"==typeofa?(b(a.y)&&(Eh=+a.y),b(a.y2)&&(Nh=+a.y2)):Eh=Nh=+a,kf())},Gf.axis.range=function(a){arguments.length&&("undefined"!=typeofa.max&&Gf.axis.max(a.max),"undefined"!=typeofa.min&&Gf.axis.min(a.min))},Gf.legend.show=function(a){yf(Dc(a)),kf({withLegend:!0})},Gf.legend.hide=function(a){zf(Dc(a)),kf({withLegend:!0})},Gf.resize=function(a){Jf=a?a.width:null,Kf=a?a.height:null,pf({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},Gf.destroy=function(){Gf.data.targets=void0,Gf.data.xs={},sj.html(""),a.onresize=null},"url"ine.data)Ff.xhr(e.data.url,function(a,b){varc,d=Ff.csv.parseRows(b.response);1===d.length?(c=[{}],d[0].forEach(function(a){c[0][a]=null})):c=Ff.csv.parse(b.response),bf(c)});elseif("rows"ine.data)bf(tc(e.data.rows));else{if(!("columns"ine.data))throwError("url or rows or columns is required.");bf(uc(e.data.columns))}returnGf},"function"==typeofa.define&&a.define.amd?a.define("c3",["d3"],e):a.c3=e}(window);