if(!_.mekko){_.mekko=1;(function($){var iP=function(a,b){a.LQ&&$.Dt(a,b)},jP=function(a,b,c,d,e,f){$.gB.call(this,a,b,c,d,e);this.Lu=f},kP=function(a,b){$.nA.call(this,!0);this.Fa("mekko");this.Uv=this.pv=null;this.Yia=!!a;this.Lu=!!b;this.pa("defaultSeriesType","mekko");$.T(this.ua,[["pointsPadding",4294967295,1]])},lP=function(a,b,c,d,e,f){a.data.length&&(a.data[0].o.missing||(c.push(a.W.name()),d.push(a.data[0].data.value)),a.data[b].o.missing||(e.push(a.W.name()),f.push(a.data[b].data.value)))},Oea=function(a){if(a.$j.length){var b=
[],c=[],d=[],e=[],f=a.$j[0].data.length-1,h;if("direct"==a.bb().Iw())for(h=a.$j.length;h--;)lP(a.$j[h],f,b,d,c,e);else for(h=0;h<a.$j.length;h++)lP(a.$j[h],f,b,d,c,e);f=a.sS();f.tg();f.Uc.apply(f,b);f.Cg();iP(f,d);f=a.CU();f.tg();f.Uc.apply(f,c);f.Cg();iP(f,e)}},mP=function(a){$.xA.call(this,a)},nP=function(a,b,c,d){if(0!=b.get("value")&&c){var e=b.o("x"),f=b.o("zero"),h=b.o("value"),k=d?b.o("pointWidth"):a.j;b.o("pointWidth",k);d=Math.abs($.Qm($.M(a.W.Aa.i("pointsPadding"),k)));k-=2*d;e-=k/2;k=e+
k;b=b.o("stroke")?b.o("stroke"):c.path.stroke();b=$.bc(b);var l=b/2;a.za?(e=$.R(e,1),k=$.R(k,1)):(h=$.R(h,1),f=$.R(f,1));e=$.R(e+l,b);k=$.R(k-l,b);h+=a.za?-l:l;f-=a.za?-l:l;h=$.R(h,b);f=$.R(f,b);d&&(b=Math.abs(f-h),d=b>2*d?d:b/2-1,f-=d,h+=d);d=c.path;$.vA(d,a.za,e,h);$.wA(d,a.za,k,h,k,f,e,f);d.close();d=c.hatchFill;$.vA(d,a.za,e,h);$.wA(d,a.za,k,h,k,f,e,f);d.close()}},oP=function(a){var b=new kP(!1);b.je="mekko";b.Kg();b.ld();for(var c=0,d=arguments.length;c<d;c++)b.mekko(arguments[c]);return b},
pP=function(a){var b=new kP(!0);b.Fa("mosaic");b.je="mosaic";b.Kg();b.ld();for(var c=0,d=arguments.length;c<d;c++)b.mekko(arguments[c]);return b},qP=function(a){var b=new kP(!1,!0);b.Fa("barmekko");b.je="barmekko";b.Kg();b.ld();for(var c=0,d=arguments.length;c<d;c++)b.mekko(arguments[c]);return b};$.H(jP,$.gB);jP.prototype.L2=function(a){return!this.Lu&&0>a?0:a};jP.prototype.Op=function(a,b,c){(this.Lu||0<a.get("value"))&&jP.u.Op.call(this,a,b,c)};
jP.prototype.yf=function(a,b,c){(this.Lu||0<a.get("value"))&&jP.u.yf.call(this,a,b,c)};$.H(kP,$.nA);var rP={};rP.mekko={Ab:29,Fb:2,Jb:[$.tH,$.TG],Ib:null,Cb:null,zb:$.tG|5767168,yb:"value",wb:"zero"};kP.prototype.Oi=rP;$.yz(kP,kP.prototype.Oi);$.g=kP.prototype;$.g.sa=$.nA.prototype.sa|268435456;$.g.XD=function(a){kP.u.XD.call(this,a);$.X(a,64)&&this.B(268435456,1)};
$.g.sS=function(){if($.n(void 0)){var a=$.Xs(this.pv,void 0,"ordinal",$.Ps,null,this.hK,this);if(a){var b=this.pv==a;this.pv=a;this.pv.da(b);if(!b){a=458752;if(this.Cu()&&"categories"==this.Gf().i("itemsSourceMode")||this.Lu)a|=512;this.B(a,268435457)}}return this}this.pv||(a=this.Et(),b=this.mf("firstCategoriesScale"),this.pv=$.Xs(this.pv,a[b],null,void 0,null,this.hK,this),this.pv.da(!1));return this.pv};
$.g.CU=function(){if($.n(void 0)){var a=$.Xs(this.Uv,void 0,"ordinal",$.Ps,null,this.hK,this);if(a){var b=this.Uv==a;this.Uv=a;this.Uv.da(b);b||this.B(458752,268435457)}return this}this.Uv||(a=this.Et(),b=this.mf("lastCategoriesScale"),this.Uv=$.Xs(this.Uv,a[b],null,void 0,null,this.hK,this),this.Uv.da(!1));return this.Uv};$.g.hK=function(a){$.V(this);if($.X(a,4)){a=458752;if(this.Cu()&&"categories"==this.Gf().i("itemsSourceMode")||this.Lu)a|=512;this.B(a,268435456)}this.da(!0)};$.g.Zz=function(){return $.Ps};
$.g.RC=function(){return["Mekko chart X scale","ordinal"]};$.g.FG=function(){return"linear"};$.g.EG=function(){return 15};$.g.TL=function(){return["Chart scale","ordinal, linear, log, date-time"]};$.g.Cu=function(){return!0};
$.g.bm=function(a,b){if(this.Lu&&1==this.Mj()&&$.K(this.Va(),$.Ct)){this.ob();var c=[],d,e=this.Va().names(),f=this.Va().values(),h=this.Nh(0);for(d=0;d<f.length;d++){var k=null;$.E(b)&&(k={value:f[d],name:e[d]},k=b.call(k,k));$.z(k)||(k=String(e[d]));var l=this.cc().nc(d);c.push({text:k,iconType:"square",iconStroke:$.Ol(l,1),iconFill:l,iconHatchFill:h.hatchFill()})}return c}return kP.u.bm.call(this,a,b)};
$.g.s4=function(a){if(this.Yia){var b=!this.Va().Uf(),c="left"==a.i("orientation")||"bottom"==a.i("orientation");a.scale(c==b?this.sS():this.CU())}else a.scale(this.bb())};
$.g.ob=function(){var a=this.J(196608);this.J(458752)&&this.B(268435456);kP.u.ob.call(this);if(a){var b,c=[],d=[],e=this.$j.length;for(a=0;a<this.$j.length;a++){var f=this.$j[a].data;for(b=0;b<f.length;b++){$.n(d[b])||(d[b]=0);if(f[b].o.missing){d[b]++;var h=0}else h=$.N(f[b].data.value),h=this.Lu?Math.abs(h):0>h?0:h;void 0==c[b]?c.push(h):c[b]+=h}}for(a=0;a<this.$j.length;a++)for(f=this.$j[a].data,b=h=0;b<f.length;b++)f[b].o.category=d[b]<e?h++:h;c=(0,$.Ye)(c,function(a,b){return d[b]<e});iP(this.Va(),
c)}this.J(268435456)&&(Oea(this),this.I(268435456))};var sP={};$.gq(sP,0,"pointsPadding",$.tq);$.U(kP,sP);$.g=kP.prototype;$.g.kt=function(a,b){return new jP(this,this,a,b,!1,this.Lu)};$.g.zs=function(){return"mekko"};$.g.PK=function(){return 3};$.g.F=function(){var a=kP.u.F.call(this);$.Hq(this,sP,a);return{chart:a}};$.g.Ms=function(a,b,c){kP.u.Ms.call(this,a,b,c)};
$.g.lW=function(a,b,c,d){var e=a.F();(a.scale()==this.sS()&&"left"!=a.i("orientation")||a.scale()==this.CU()&&"right"!=a.i("orientation"))&&$.Qz(e,"scale",a.scale(),b,c);d.push($.oa(a));return e};$.g.X=function(a,b){kP.u.X.call(this,a,b);$.zq(this,sP,a)};var tP=kP.prototype;tP.xScale=tP.Va;tP.yScale=tP.bb;tP.crosshair=tP.$g;tP.xAxis=tP.lh;tP.getXAxesCount=tP.QC;tP.yAxis=tP.ti;tP.getYAxesCount=tP.SC;tP.getSeries=tP.Ue;tP.palette=tP.cc;tP.markerPalette=tP.sf;tP.hatchFillPalette=tP.oe;tP.getType=tP.Na;
tP.addSeries=tP.Rk;tP.getSeriesAt=tP.Nh;tP.getSeriesCount=tP.Mj;tP.removeSeries=tP.mo;tP.removeSeriesAt=tP.Cn;tP.removeAllSeries=tP.kp;tP.getPlotBounds=tP.Rf;tP.annotations=tP.tk;tP.lineMarker=tP.Jm;tP.rangeMarker=tP.Sm;tP.textMarker=tP.Xm;$.H(mP,$.xA);$.sG[29]=mP;$.g=mP.prototype;$.g.type=29;$.g.flags=263905;$.g.vh={path:"path",hatchFill:"path"};$.g.fg=function(a,b){if(!a.o("missing")){var c=this.Wc.Xc(b);nP(this,a,c)}};$.g.bt=function(a){var b=a.o("shapes"),c;for(c in b)b[c].clear();nP(this,a,b,!0)};$.g.mB=function(a){if(!a.o("missing")){var b=a.o("shapes"),c;for(c in b)b[c].clear();nP(this,a,b,!0)}};$.Jp.mekko=oP;$.Jp.mosaic=pP;$.Jp.barmekko=qP;$.F("anychart.mekko",oP);$.F("anychart.mosaic",pP);$.F("anychart.barmekko",qP);}).call(this,$)}
