if(!_.waterfall){_.waterfall=1;(function($){var K5=function(a,b,c,d,e){$.Hz.call(this,a,b,c,d,e)},L5=function(){$.cA.call(this);this.Ia("waterfall");this.Zd="waterfall";$.R(this.xa,[["dataMode",0,1],["connectorStroke",0,1]])},M5=function(a,b){var c=a.bb().transform(b),d=a.xb;if(a.sa()){var e=d.left;d=d.width}else e=d.Ra(),d=-d.height;return e+c*d},yia=function(a,b){for(var c=a.length;c--;){var d=a[c].data;if(d.length&&!d[b].j.missing)return c}return window.NaN},N5=function(a){$.sA.call(this,a);this.D=!1},zia=function(a){var b=new L5;b.ug();
b.pe();for(var c=0,d=arguments.length;c<d;c++)b.waterfall(arguments[c]);return b},Aia={Eha:"absolute",bja:"diff"};$.H(K5,$.Hz);$.g=K5.prototype;$.g.ND={"%BubbleSize":"size","%RangeStart":"low","%RangeEnd":"high","%XValue":"x","%Diff":"diff","%Absolute":"absolute","%IsTotal":"isTotal"};$.g.pm=function(a,b){var c=K5.B.pm.call(this,a,b);c.diff={value:b.j("diff"),type:"number"};c.absolute={value:b.j("absolute"),type:"number"};c.isTotal={value:b.j("isTotal"),type:""};return c};
$.g.s_=function(){return{prevValue:0,WZ:!1,Xda:"absolute"==this.za.i("dataMode")}};$.g.L0=function(a,b,c){var d=-1<(0,$.xa)(this.mm||[],b.j.rawIndex);a=a.get("isTotal");d=!!b.j.missing||d;var e=!(c.WZ||d);a=e||($.p(a)?!!a:d);!d||!e&&a?(d=c.Xda?d?c.prevValue:+b.data.value:c.prevValue+(d?0:+b.data.value),b.j.absolute=d,b.j.diff=d-c.prevValue,b.j.isTotal=a,b.j.missing=0,c.WZ=!0,c.prevValue=d):b.j.missing=1};$.g.yP=function(a){return"value"==a?0<=(Number(this.aa().j("diff"))||0):K5.B.yP.call(this,a)};$.H(L5,$.cA);var Bia={};Bia.waterfall={zb:32,Db:2,Ib:[$.XE,$.aF,$.bF,$.fF,$.nF,$.NE],Hb:null,Bb:null,vb:$.nE|5767168,Cb:"value",wb:"zero"};L5.prototype.Bi=Bia;$.ay(L5,L5.prototype.Bi);$.g=L5.prototype;$.g.ds=function(){return"waterfall"};$.g.OF=function(){return"value"};$.g.zr=function(){};$.g.KZ=function(a){return+a.j[a.j.isTotal?"absolute":"diff"]};
$.g.M0=function(a,b,c,d){var e=0,f;if(b)for(f=0;f<a.length;f++){var h=a[f].data[b-1];e+=Number(h.j.diff)||0}this.Ma=[];for(f=b;f<=c;f++){for(var k=b=0;k<a.length;k++)h=a[k].data[f],h.j.isTotal||(h.j.stackedZero+=e,h.j.stackedValue+=e,h.j.stackedZeroPrev+=e,h.j.stackedValuePrev+=e,h.j.stackedZeroNext+=e,h.j.stackedValueNext+=e),d.Oc(h.j.stackedValue),d.Oc(h.j.stackedValuePrev),d.Oc(h.j.stackedValueNext),b+=h.j.missing?0:Number(h.j.diff)||0;e+=b;this.Ma.push(e)}};
$.g.mO=function(){L5.B.mO.call(this);this.g?this.g.clear():this.g=$.aj();var a=this.Wa(),b=this.vo[String($.oa(a))];if(b&&b.length){var c=this.i("connectorStroke");this.g.stroke(c);c=$.Xb(c);this.g.parent(this.O());this.g.zIndex(1E3);this.g.clip(this.ag());var d=this.sa();a=a.Au();var e=b[0].mi,f=b[0].lastIndex,h;var k=yia(b,e);if((0,window.isNaN)(k))var l=h=window.NaN;else{var m=b[k];k=m.data[e].j;var n=a?m.W.Dr($.p(k.category)?k.category:e):m.W.ks;h=$.O(M5(this,this.Ma[0]),c);l=k.valueX+n/2}for(var q=
e+1;q<=f;q++){a:{for(k=0;k<b.length;k++)if(!b[k].data[q].j.missing)break a;k=window.NaN}(0,window.isNaN)(k)?k=m=window.NaN:(m=b[k],k=m.data[q].j,n=a?m.W.Dr($.p(k.category)?k.category:e):m.W.ks,m=$.O(M5(this,this.Ma[q-e-1]),c),k=k.valueX-n/2);if(!(0,window.isNaN)(l)&&!(0,window.isNaN)(h))if((0,window.isNaN)(k)||(0,window.isNaN)(m))continue;else $.Yy(this.g,d,l,h),$.Zy(this.g,d,k,m);k=yia(b,q);(0,window.isNaN)(k)?l=h=window.NaN:(m=b[k],k=m.data[q].j,n=a?m.W.Dr($.p(k.category)?k.category:e):m.W.ks,h=
$.O(M5(this,this.Ma[q-e]),c),l=k.valueX+n/2)}}};$.g.Os=function(a,b){return new K5(this,this,a,b,!0)};var O5={};$.dp(O5,0,"dataMode",function(a,b){return $.ij(Aia,a,b||"absolute")});$.dp(O5,1,"connectorStroke",$.xp);$.S(L5,O5);$.g=L5.prototype;$.g.Vr=function(){return!0};
$.g.Nl=function(a,b){var c=[];if("categories"==a){this.U={};for(var d=this.Ne(),e,f,h,k={},l=0,m=0;m<d.length;m++)e=d[m],f=$.Sk("risingFill",1,!1),f=f(e,$.Wk,!0,!0),h=$.fn(f),h in k?this.U[k[h]].W.push(e):(k[h]=l,this.U[l]={W:[e],type:"rising"},c.push({text:"Increase",iconEnabled:!0,iconFill:f,sourceUid:$.oa(this),sourceKey:l++})),f=$.Sk("fallingFill",1,!1),f=f(e,$.Wk,!0,!0),h=$.fn(f),h in k?this.U[k[h]].W.push(e):(k[h]=l,this.U[l]={W:[e],type:"falling"},c.push({text:"Decrease",iconEnabled:!0,iconFill:f,
sourceUid:$.oa(this),sourceKey:l++})),f=$.Sk("fill",1,!1),f=f(e,$.Wk,!0,!0),h=$.fn(f),h in k?this.U[k[h]].W.push(e):(k[h]=l,this.U[l]={W:[e],type:"total"},c.push({text:"Total",iconEnabled:!0,iconFill:f,sourceUid:$.oa(this),sourceKey:l++}))}else c=L5.B.Nl.call(this,a,b);return c};
$.g.Ep=function(a,b){if("categories"==this.Af().i("itemsSourceMode")){var c=a.ei(),d=this.U[c];c=d.W;d=d.type;for(var e,f,h,k,l,m,n=0;n<c.length;n++){e=c[n];f=e.If();for(m=[];f.advance();){var q=f.ka();f.j("missing")||(h=f.j("isTotal"),k=0<=f.j("diff")&&!h,l=0>f.j("diff")&&!h,(h=h&&"total"==d||k&&"rising"==d||l&&"falling"==d)&&m.push(q))}e.xj(m)}}else return L5.B.Ep.call(this,a,b)};$.g.Dp=function(a,b){if("categories"==this.Af().i("itemsSourceMode"))this.Cd();else return L5.B.Dp.call(this,a,b)};
$.g.Lq=function(a,b){if("default"==this.Af().i("itemsSourceMode"))return L5.B.Lq.call(this,a,b)};$.g.F=function(){var a=L5.B.F.call(this);$.Bp(this,O5,a.chart);return a};$.g.Y=function(a,b){L5.B.Y.call(this,a,b);$.tp(this,O5,a)};$.g.R=function(){$.hd(this.g);L5.B.R.call(this)};var P5=L5.prototype;P5.xScale=P5.Wa;P5.yScale=P5.bb;P5.crosshair=P5.Mg;P5.xGrid=P5.Im;P5.yGrid=P5.Jm;P5.xMinorGrid=P5.dr;P5.yMinorGrid=P5.gr;P5.xAxis=P5.ah;P5.getXAxesCount=P5.dC;P5.yAxis=P5.fi;P5.getYAxesCount=P5.fC;
P5.getSeries=P5.Oe;P5.lineMarker=P5.um;P5.rangeMarker=P5.Cm;P5.textMarker=P5.Gm;P5.palette=P5.Yb;P5.markerPalette=P5.lf;P5.hatchFillPalette=P5.be;P5.getType=P5.Qa;P5.addSeries=P5.Ak;P5.getSeriesAt=P5.Zh;P5.getSeriesCount=P5.jk;P5.removeSeries=P5.Vn;P5.removeSeriesAt=P5.nn;P5.removeAllSeries=P5.Ro;P5.getPlotBounds=P5.ag;P5.xZoom=P5.fq;P5.yZoom=P5.gq;P5.xScroller=P5.Zo;P5.yScroller=P5.ir;P5.getStat=P5.pg;P5.annotations=P5.bk;P5.getXScales=P5.lx;P5.getYScales=P5.nx;P5.data=P5.data;$.H(N5,$.sA);$.mE[32]=N5;$.g=N5.prototype;$.g.type=32;$.g.flags=263713;$.g.lh={rising:"path",risingHatchFill:"path",falling:"path",fallingHatchFill:"path",path:"path",hatchFill:"path"};$.g.Gs=function(a){var b=a.j("shapes");for(c in b)b[c].clear();var c=0<=a.j("diff");if(a.j("isTotal")){c="path";var d="hatchFill"}else c?(c="rising",d="risingHatchFill"):(c="falling",d="fallingHatchFill");this.dE(a,b[c],b[d])};
$.g.Pf=function(a,b){var c=0<=a.j("diff");if(a.j("isTotal")){c="path";var d="hatchFill"}else c?(c="rising",d="risingHatchFill"):(c="falling",d="fallingHatchFill");var e={};e[c]=e[d]=!0;e=this.Pc.Sc(b,e);this.dE(a,e[c],e[d])};$.Fo.waterfall=zia;$.F("anychart.waterfall",zia);}).call(this,$)}
