if(!_.mekko){_.mekko=1;(function($){var hM=function(a,b){a.nP&&$.os(a,b)},iM=function(a,b,c,d,e,f){$.Hz.call(this,a,b,c,d,e);this.uu=f},jM=function(a,b){$.Qy.call(this,!0);this.Ia("mekko");this.xv=this.Yu=null;this.pha=!!a;this.uu=!!b;this.pa("defaultSeriesType","mekko");$.R(this.xa,[["pointsPadding",4294967295,1]])},kM=function(a,b,c,d,e,f){a.data.length&&(a.data[0].j.missing||(c.push(a.W.name()),d.push(a.data[0].data.value)),a.data[b].j.missing||(e.push(a.W.name()),f.push(a.data[b].data.value)))},wea=function(a){if(a.Ol.length){var b=
[],c=[],d=[],e=[],f=a.Ol[0].data.length-1,h;if("direct"==a.bb().hw())for(h=a.Ol.length;h--;)kM(a.Ol[h],f,b,d,c,e);else for(h=0;h<a.Ol.length;h++)kM(a.Ol[h],f,b,d,c,e);f=a.NQ();f.fg();f.Oc.apply(f,b);f.ng();hM(f,d);f=a.TS();f.fg();f.Oc.apply(f,c);f.ng();hM(f,e)}},lM=function(a){$.$y.call(this,a)},mM=function(a,b,c,d){if(0!=b.get("value")&&c){var e=b.j("x"),f=b.j("zero"),h=b.j("value"),k=d?b.j("pointWidth"):a.o;b.j("pointWidth",k);d=Math.abs($.Kl($.M(a.W.za.i("pointsPadding"),k)));k-=2*d;e-=k/2;k=e+
k;b=b.j("stroke")?b.j("stroke"):c.path.stroke();b=$.Xb(b);var l=b/2;a.sa?(e=$.O(e,1),k=$.O(k,1)):(h=$.O(h,1),f=$.O(f,1));e=$.O(e+l,b);k=$.O(k-l,b);h+=a.sa?-l:l;f-=a.sa?-l:l;h=$.O(h,b);f=$.O(f,b);d&&(b=Math.abs(f-h),d=b>2*d?d:b/2-1,f-=d,h+=d);d=c.path;$.Yy(d,a.sa,e,h);$.Zy(d,a.sa,k,h,k,f,e,f);d.close();d=c.hatchFill;$.Yy(d,a.sa,e,h);$.Zy(d,a.sa,k,h,k,f,e,f);d.close()}},nM=function(a){var b=new jM(!1);b.Zd="mekko";b.ug();b.pe();for(var c=0,d=arguments.length;c<d;c++)b.mekko(arguments[c]);return b},
oM=function(a){var b=new jM(!0);b.Ia("mosaic");b.Zd="mosaic";b.ug();b.pe();for(var c=0,d=arguments.length;c<d;c++)b.mekko(arguments[c]);return b},pM=function(a){var b=new jM(!1,!0);b.Ia("barmekko");b.Zd="barmekko";b.ug();b.pe();for(var c=0,d=arguments.length;c<d;c++)b.mekko(arguments[c]);return b};$.H(iM,$.Hz);iM.prototype.q0=function(a){return!this.uu&&0>a?0:a};iM.prototype.rp=function(a,b,c){(this.uu||0<a.get("value"))&&iM.B.rp.call(this,a,b,c)};
iM.prototype.pf=function(a,b,c){(this.uu||0<a.get("value"))&&iM.B.pf.call(this,a,b,c)};$.H(jM,$.Qy);var qM={};qM.mekko={zb:29,Db:2,Ib:[$.nF,$.NE],Hb:null,Bb:null,vb:$.nE|5767168,Cb:"value",wb:"zero"};jM.prototype.Bi=qM;$.ay(jM,jM.prototype.Bi);$.g=jM.prototype;$.g.qa=$.Qy.prototype.qa|268435456;$.g.DM=function(a){jM.B.DM.call(this,a);$.W(a,64)&&this.u(268435456,1)};
$.g.NQ=function(){if($.p(void 0)){var a=$.Vr(this.Yu,void 0,"ordinal",$.Nr,null,this.ZI,this);if(a){var b=this.Yu==a;this.Yu=a;this.Yu.da(b);if(!b){a=458752;if(this.ju()&&"categories"==this.Af().i("itemsSourceMode")||this.uu)a|=512;this.u(a,268435457)}}return this}this.Yu||(a=this.jt(),b=this.ef("firstCategoriesScale"),this.Yu=$.Vr(this.Yu,a[b],null,void 0,null,this.ZI,this),this.Yu.da(!1));return this.Yu};
$.g.TS=function(){if($.p(void 0)){var a=$.Vr(this.xv,void 0,"ordinal",$.Nr,null,this.ZI,this);if(a){var b=this.xv==a;this.xv=a;this.xv.da(b);b||this.u(458752,268435457)}return this}this.xv||(a=this.jt(),b=this.ef("lastCategoriesScale"),this.xv=$.Vr(this.xv,a[b],null,void 0,null,this.ZI,this),this.xv.da(!1));return this.xv};$.g.ZI=function(a){$.U(this);if($.W(a,4)){a=458752;if(this.ju()&&"categories"==this.Af().i("itemsSourceMode")||this.uu)a|=512;this.u(a,268435456)}this.da(!0)};$.g.wz=function(){return $.Nr};
$.g.eC=function(){return["Mekko chart X scale","ordinal"]};$.g.NF=function(){return"linear"};$.g.MF=function(){return 15};$.g.BK=function(){return["Chart scale","ordinal, linear, log, date-time"]};$.g.ju=function(){return!0};
$.g.Nl=function(a,b){if(this.uu&&1==this.jk()&&$.K(this.Wa(),$.ns)){this.mb();var c=[],d,e=this.Wa().names(),f=this.Wa().values(),h=this.Zh(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.Yb().ic(d);c.push({text:k,iconType:"square",iconStroke:$.Lk(l,1),iconFill:l,iconHatchFill:h.hatchFill()})}return c}return jM.B.Nl.call(this,a,b)};
$.g.T1=function(a){if(this.pha){var b=!this.Wa().Kf(),c="left"==a.i("orientation")||"bottom"==a.i("orientation");a.scale(c==b?this.NQ():this.TS())}else a.scale(this.bb())};
$.g.mb=function(){var a=this.J(196608);this.J(458752)&&this.u(268435456);jM.B.mb.call(this);if(a){var b,c=[],d=[],e=this.Ol.length;for(a=0;a<this.Ol.length;a++){var f=this.Ol[a].data;for(b=0;b<f.length;b++){$.p(d[b])||(d[b]=0);if(f[b].j.missing){d[b]++;var h=0}else h=$.N(f[b].data.value),h=this.uu?Math.abs(h):0>h?0:h;void 0==c[b]?c.push(h):c[b]+=h}}for(a=0;a<this.Ol.length;a++)for(f=this.Ol[a].data,b=h=0;b<f.length;b++)f[b].j.category=d[b]<e?h++:h;c=(0,$.Be)(c,function(a,b){return d[b]<e});hM(this.Wa(),
c)}this.J(268435456)&&(wea(this),this.I(268435456))};var rM={};$.dp(rM,0,"pointsPadding",$.np);$.S(jM,rM);$.g=jM.prototype;$.g.Os=function(a,b){return new iM(this,this,a,b,!1,this.uu)};$.g.ds=function(){return"mekko"};$.g.AJ=function(){return 3};$.g.F=function(){var a=jM.B.F.call(this);$.Bp(this,rM,a);return{chart:a}};$.g.ps=function(a,b,c){jM.B.ps.call(this,a,b,c)};
$.g.AU=function(a,b,c,d){var e=a.F();(a.scale()==this.NQ()&&"left"!=a.i("orientation")||a.scale()==this.TS()&&"right"!=a.i("orientation"))&&$.sy(e,"scale",a.scale(),b,c);d.push($.oa(a));return e};$.g.Y=function(a,b){jM.B.Y.call(this,a,b);$.tp(this,rM,a)};var sM=jM.prototype;sM.xScale=sM.Wa;sM.yScale=sM.bb;sM.crosshair=sM.Mg;sM.xAxis=sM.ah;sM.getXAxesCount=sM.dC;sM.yAxis=sM.fi;sM.getYAxesCount=sM.fC;sM.getSeries=sM.Oe;sM.palette=sM.Yb;sM.markerPalette=sM.lf;sM.hatchFillPalette=sM.be;sM.getType=sM.Qa;
sM.addSeries=sM.Ak;sM.getSeriesAt=sM.Zh;sM.getSeriesCount=sM.jk;sM.removeSeries=sM.Vn;sM.removeSeriesAt=sM.nn;sM.removeAllSeries=sM.Ro;sM.getPlotBounds=sM.ag;sM.annotations=sM.bk;sM.lineMarker=sM.um;sM.rangeMarker=sM.Cm;sM.textMarker=sM.Gm;$.H(lM,$.$y);$.mE[29]=lM;$.g=lM.prototype;$.g.type=29;$.g.flags=263905;$.g.lh={path:"path",hatchFill:"path"};$.g.Pf=function(a,b){if(!a.j("missing")){var c=this.Pc.Sc(b);mM(this,a,c)}};$.g.Gs=function(a){var b=a.j("shapes"),c;for(c in b)b[c].clear();mM(this,a,b,!0)};$.g.EA=function(a){if(!a.j("missing")){var b=a.j("shapes"),c;for(c in b)b[c].clear();mM(this,a,b,!0)}};$.Fo.mekko=nM;$.Fo.mosaic=oM;$.Fo.barmekko=pM;$.F("anychart.mekko",nM);$.F("anychart.mosaic",oM);$.F("anychart.barmekko",pM);}).call(this,$)}
