if(!_.color_scales){_.color_scales=1;(function($){var nN,qN,rN,sN,vN;$.kN=function(a,b){var c=a.i("fontSize")!=b;null===b?delete a.zd.fontSize:a.zd.fontSize=b;c&&a.B(4)};$.lN=function(a){var b={};$.Dc(a.Ma,function(a,d){if($.n(a)){if("adjustByHeight"==d||"adjustByWidth"==d)d="adjustFontSize";b[d]=this.dd(d)}},a);return b};$.mN=function(a,b){return $.xk(Hea,a,b||"clip")};nN=function(){$.By.call(this)};
$.oN=function(){$.Dy.call(this);this.Fa("defaultColorRange");$.eu(this,this,this.rg,this.Gg,null,this.rg);this.sc.ra(this,"mousedown",this.Fv);this.xe|=1024;$.T(this.ua,[["length",this.xe,9],["align",this.xe,9],["colorLineSize",this.xe,9]])};$.pN=function(a){a.line&&(a.line.ll(),a.line.remove(),a.line=null);a.lines&&(a.lines.length=0)};
qN=function(a){if(a.b){var b=a.scale();if(b&&$.K(b,$.Uy)){a.N={};for(var c=a.b,d=c.vc();d.advance();){var e=($.n(c.ga)?d.o(c.ga):null)||d.get(c.Se?c.Se.ol:c.nr[1]);!(e=b.pn(e))||(0,window.isNaN)(e.start)||(0,window.isNaN)(e.end)||(a.N[e.sourceIndex]||(a.N[e.sourceIndex]=[]),a.N[e.sourceIndex].push(d.la()))}}}};rN=function(a,b,c){var d=0;b.enabled()&&(d=b.i("length"),b=b.i("position"),d="center"==b?Math.max((d-a.i("colorLineSize"))/2,0):$.n(c)?0<c?"outside"==b?0:d:0>c?"inside"==b?0:d:d:d);return d};
sN=function(a){var b=0,c=$.jr(a,"marker");if(c&&c.enabled()){a=a.i("orientation");b=2*c.i("size");var d=c.i("offsetX");c=c.i("offsetY");d=$.n(d)?d:0;c=$.n(c)?c:0;switch(a){case "top":b+=c;break;case "right":b-=d;break;case "bottom":b-=c;break;case "left":b+=d}}return b};
$.tN=function(a,b){if(a.b){var c=a.scale(),d=$.jr(a,"marker"),e=a.b,f=e.sd()||(e.nn?e.nn():void 0),h=d&&d.enabled();e=e.enabled()&&f==c;if(a.enabled()&&h&&c&&e&&(c=a.line.pb(),h=$.Za(a.scale().transform(b,.5),0,1),!(0,window.isNaN)(h))){e=a.i("orientation");f=d.i("size");switch(e){case "top":var k=c.left+c.width*h;var l=c.top+c.height+f;var m=180;break;case "bottom":k=c.left+c.width*h;l=c.top-f;m=0;break;case "left":k=c.left+c.width+f;l=c.top+c.height-c.height*h;m=90;break;case "right":k=c.left-f,
l=c.top+c.height-c.height*h,m=-90}$.V(d);d.pa("rotation",m);d.uc({value:{x:k,y:l}});d.da(!1);d.$();d.Kd().visible(!0)}}};$.uN=function(a){var b=$.jr(a,"marker");a.scale()&&b&&b.Kd().visible(!1)};vN=function(){$.oN.call(this)};$.nx.prototype.nn=$.ca(26,function(){return this.Kb});var Hea={tja:"always-show",oka:"clip",Uka:"drop"};$.H(nN,$.By);
nN.prototype.L_=function(a,b,c,d,e){b=Math.round(b.left+a*b.width);b=1==a?b+e:b-e;a=this.i("length");e=this.i("position");if("outside"==e){var f=c.top-d/2;var h=-a}else"center"==e?(f=c.top+(c.height-a)/2,h=a):"inside"==e&&(f=c.Ua()+d/2,h=a);this.path.moveTo(b,f);this.path.lineTo(b,f+h)};
nN.prototype.aS=function(a,b,c,d,e){b=Math.round(b.top+b.height-a*b.height);b=1==a?b-e:b+e;a=this.i("length");e=this.i("position");"outside"==e?(c=c.$a()+d/2,d=a):"center"==e?(c=c.left+(c.width-a)/2,d=a):(c=c.left-d/2,d=-a);this.path.moveTo(c,b);this.path.lineTo(c+d,b)};
nN.prototype.VR=function(a,b,c,d,e){b=Math.round(b.left+a*b.width);b=1==a?b+e:b-e;a=this.i("length");e=this.i("position");if("outside"==e){var f=c.Ua()+d/2;var h=a}else"center"==e?(f=c.top+(c.height-a)/2,h=a):"inside"==e&&(f=c.top-d/2,h=-a);this.path.moveTo(b,f);this.path.lineTo(b,f+h)};
nN.prototype.ZR=function(a,b,c,d,e){b=Math.round(b.top+b.height-a*b.height);b=1==a?b-e:b+e;a=this.i("length");e=this.i("position");if("outside"==e){var f=c.left-d/2;var h=-a}else"center"==e?(f=c.left+(c.width-a)/2,h=a):"inside"==e&&(f=c.$a()+d/2,h=a);this.path.moveTo(f,b);this.path.lineTo(f+h,b)};$.H($.oN,$.Dy);var wN={};$.hq(wN,[[0,"colorLineSize",$.qq],$.Z.kJ,$.Z.mJ]);$.U($.oN,wN);$.g=$.oN.prototype;$.g.sa=$.Dy.prototype.sa|1024;$.g.Xk=function(){return new nN};$.g.TE=function(){this.line||($.K(this.scale(),$.Ry)?this.line=$.nk():$.K(this.scale(),$.Uy)&&(this.line=$.lk(),this.lines=[]),this.line.zIndex(this.zIndex()),this.line.parent(this.P()),this.line.cursor("pointer"),$.du(this,this.line));return this.line};
$.g.gr=function(a){this.Jl||(this.Jl=new $.Qx,$.W(this,"marker",this.Jl),this.Jl.uc({value:{x:0,y:0}}),$.L(this.Jl,this.E9,this));return $.n(a)?(this.Jl.K(a),this.B(1024,1),this):this.Jl};$.g.E9=function(a){$.X(a,1)&&this.B(1024,1)};$.g.target=function(a){return $.n(a)?(this.b!=a&&(this.b=a,qN(this),$.L(this.b,this.zia,this)),this):this.b};$.g.zia=function(a){$.X(a,132)&&qN(this)};
$.g.Vp=function(a,b){var c=this.scale(),d={};if($.K(c,$.Ry)){var e=(0,window.parseFloat)(b);var f=c.UD(e);var h="number"}else if($.K(c,$.Uy)){e=b;f=c.Qa().names()[a];h="string";var k=c.pn(b);k&&(d.colorRange={value:{color:k.color,end:k.end,name:k.name,start:k.start,index:k.sourceIndex},type:""})}d.index={value:a,type:"number"};d.value={value:f,type:h};d.tickValue={value:e,type:"number"};d.max={value:$.n(c.max)?c.max:null,type:"number"};d.min={value:$.n(c.min)?c.min:null,type:"number"};d.scale={value:c,
type:""};return $.av(new $.rw(d))};
$.g.ZP=function(a,b,c,d,e){c=a.top+a.height+c/2-d;var f=this.scale();if($.K(f,$.Ry))this.line.moveTo(a.left+b,c).lineTo(a.left-b+a.width,c).lineTo(a.left-b+a.width,c-e).lineTo(a.left+b,c-e).close();else if($.K(f,$.Uy)){d=f.Xq();f=f.sj();for(var h=a.width/(d.length-1),k=0,l=d.length-1;k<l;k++){var m=d[k];m=m.color||f[m.sourceIndex]||f[f.length-1];var p=this.lines[k]?this.lines[k].clear():this.lines[k]=this.line.path(),q=a.left+b+h*k;p.moveTo(q,c).lineTo(q+h,c).lineTo(q+h,c-e).lineTo(q,c-e).close();
p.stroke(this.i("stroke"));p.fill(m)}}};
$.g.SE=function(a,b,c,d,e){c=a.left-c/2+d;var f=this.scale();if($.K(f,$.Ry))this.line.moveTo(c,a.top+b).lineTo(c,a.top-b+a.height).lineTo(c+e,a.top-b+a.height).lineTo(c+e,a.top+b).close();else if($.K(f,$.Uy)){d=f.Xq();f=f.sj();for(var h=a.height/(d.length-1),k=0,l=d.length-1;k<l;k++){var m=d[k];m=m.color||f[m.sourceIndex]||f[f.length-1];var p=this.lines[k]?this.lines[k].clear():this.lines[k]=this.line.path(),q=a.top+b+h*(d.length-1-k-1);p.moveTo(c,q).lineTo(c,q+h).lineTo(c+e,q+h).lineTo(c+e,q).close();
p.stroke(this.i("stroke"));p.fill(m)}}};
$.g.QE=function(a,b,c,d,e){c=a.top-c/2+d;var f=this.scale();if($.K(f,$.Ry))this.line.moveTo(a.left+b,c).lineTo(a.left-b+a.width,c).lineTo(a.left-b+a.width,c+e).lineTo(a.left+b,c+e).close();else if($.K(f,$.Uy)){d=f.Xq();f=f.sj();for(var h=a.width/(d.length-1),k=0,l=d.length-1;k<l;k++){var m=d[k];m=m.color||f[m.sourceIndex]||f[f.length-1];var p=this.lines[k]?this.lines[k].clear():this.lines[k]=this.line.path(),q=a.left+b+h*k;p.moveTo(q,c).lineTo(q+h,c).lineTo(q+h,c+e).lineTo(q,c+e).close();p.stroke(this.i("stroke"));
p.fill(m)}}};
$.g.RE=function(a,b,c,d,e){c=a.left+a.width+c/2-d;var f=this.scale();if($.K(f,$.Ry))this.line.moveTo(c,a.top+b).lineTo(c,a.top-b+a.height).lineTo(c-e,a.top-b+a.height).lineTo(c-e,a.top+b).close();else if($.K(f,$.Uy)){d=f.Xq();f=f.sj();for(var h=a.height/(d.length-1),k=0,l=d.length-1;k<l;k++){var m=d[k];m=m.color||f[m.sourceIndex]||f[f.length-1];var p=this.lines[k]?this.lines[k].clear():this.lines[k]=this.line.path(),q=a.top+b+h*(d.length-1-k-1);p.moveTo(c,q).lineTo(c,q+h).lineTo(c-e,q+h).lineTo(c-
e,q).close();p.stroke(this.i("stroke"));p.fill(m)}}};
$.g.Np=function(){var a=this.TE(),b=this.scale();b||this.scale($.Sy());if($.K(b,$.Ry))a.clear(),a.stroke(this.i("stroke")),b=$.Vb(b.sj()),this.Hb()?b.angle=0:b.angle=90,a.fill(b);else if($.K(b,$.Uy))for(a=0,b=this.lines.length;a<b;a++)this.lines[a].clear();switch(this.i("orientation")){case "top":var c=this.ZP;break;case "right":c=this.SE;break;case "bottom":c=this.QE;break;case "left":c=this.RE}a=this.i("stroke");a=$.Yb(a);a=!a||$.Vo(a)?0:a.thickness?(0,window.parseFloat)(a.thickness):1;b=0==a%2?
0:.5;var d=this.lb(),e=sN(this),f=Math.round(this.i("colorLineSize")),h=rN(this,this.Qa(),1),k=rN(this,this.tb(),1);c.call(this,d,b,a,Math.max(h,k,e),f)};
$.g.lb=function(){if(!this.nq||this.J(4)){var a=this.ja();if(a){a.top=Math.round(a.top);a.left=Math.round(a.left);a.width=Math.round(a.width);a.height=Math.round(a.height);if(this.Hb()){var b=a.width;var c=a.height}else b=a.height,c=a.width;var d=this.Dg(b);c=this.width()?$.M(this.width(),c):$.Hy(this,a,d);var e=this.padding(),f=$.M(e.i("top"),a.height),h=$.M(e.i("right"),a.width),k=$.M(e.i("bottom"),a.height);e=$.M(e.i("left"),a.width);var l=this.i("align"),m;this.Hb()?(d+h+e>b&&(d=b-(h+e)),"left"==
l||"top"==l?m=e:"right"==l||"bottom"==l?m=b-d-h:"center"==l&&(m=(b-d-h-e)/2)):(d+k+f>b&&(d=b-(k+f)),"left"==l||"top"==l?m=f:"right"==l||"bottom"==l?m=b-d-k:"center"==l&&(m=(b-d-k-f)/2));switch(this.i("orientation")){case "top":var p=a.top+f;var q=a.left+m;var r=c;var t=d;break;case "right":p=a.top+m;q=a.left+a.width-c-h;r=d;t=c;break;case "bottom":p=a.top+a.height-c-k;q=a.left+m;r=c;t=d;break;case "left":p=a.top+m,q=a.left+e,r=d,t=c}this.nq=new $.J(Math.round(q),Math.round(p),Math.round(t),Math.round(r))}else this.nq=
new $.J(0,0,0,0);this.I(4)}return this.nq};$.g.Dg=function(a){return $.M(this.i("length"),a)};
$.g.TZ=function(a,b){var c=this.Qa(),d=this.tb(),e=c.i("position"),f=d.i("position");c=rN(this,c);var h=rN(this,d);d=sN(this);"outside"==e?"outside"==f?e=Math.max(a+c,b+h):(e="inside"==f?Math.max(a+c,b):Math.max(a+c,b+h),d=Math.max(h,d)):"inside"==e?"outside"==f?(e=Math.max(a,b+h),d=Math.max(c,d)):(e="inside"==f?Math.max(a,b):Math.max(a,b+h),d=Math.max(c,h,d)):"outside"==e?(e=Math.max(a+c,b+h),d=Math.max(c,d)):(e="inside"==f?Math.max(a+c,b):Math.max(a+c,b+h),d=Math.max(c,h,d));f=this.i("stroke");
f=!f||$.Vo(f)?0:f.thickness?(0,window.parseFloat)(f.thickness):1;f=Math.round(this.i("colorLineSize"))+f;return e+d+f};$.g.scale=function(a){(a=$.oN.u.scale.call(this,a))||(this.g||(this.g=$.Sy(),this.g.sj("#fff","#000")),a=this.g);return a};$.g.IS=function(){return 48};$.g.kg=function(a){$.X(a,2)&&$.pN(this);$.oN.u.kg.call(this,a)};
$.g.$=function(){if(!this.Bc())return this;var a=$.jr(this,"marker");this.J(1024)&&(a&&(a.P(this.P()),a.zIndex(this.zIndex()+1),a.$(),a.Kd().visible(!1)),this.I(1024));if(a&&(this.J(2)&&a.P(this.P()),this.J(8))){var b=this.zIndex();a.zIndex(b+1)}return $.oN.u.$.call(this)};
$.g.Fv=function(a){if(this.b){var b=this.scale(),c=this.b,d=c&&(c.sd()||(c.nn?c.nn():void 0));if(this.enabled()&&b&&c.enabled()&&d==b){d=this.line.pb();if(this.Hb()){var e=a.clientX;var f=d.left+$.Wj(this.P().Ha()).x;d=(e-f)/d.width}else e=a.clientY,f=d.top+$.Wj(this.P().Ha()).y,d=(d.height-(e-f))/d.height;d=b.Fc(d);a.metaKey||a.shiftKey||!c.map||c.map.ae();if($.K(b,$.Uy))d=b.pn(d),b&&c&&(e=this.N[d.sourceIndex],b=c.mc(),b=b.Vc(),"single"==b.i("hoverMode")?this.Jf={W:c,md:e}:this.Jf=[{W:c,md:e,xn:e[e.length-
1],we:{index:e[e.length-1],Yf:0}}]);else if($.K(b,$.Ry)){a=c.vc();e=window.Infinity;for(var h=window.NaN,k=b.uh(),l=b.Rh();a.advance();){f=a.get(c.Se?c.Se.ol:c.nr[1]);f=$.Za(f,k,l);var m=Math.abs(d-f);e>m&&(e=m,h=f)}e=[];a=c.vc();for(d=h;a.advance();)f=a.get(c.Se?c.Se.ol:c.nr[1]),f=$.Za(f,k,l),f==d&&e.push(a.la());b&&c&&(b=c.mc(),b=b.Vc(),"single"==b.i("hoverMode")?this.Jf={W:c,md:e}:this.Jf=[{W:c,md:e,xn:e[e.length-1],we:{index:e[e.length-1],Yf:0}}])}}}};
$.g.rg=function(a){if(this.b){var b=this.scale(),c=this.b,d=c.sd()||(c.nn?c.nn():void 0);if(this.enabled()&&b&&c.enabled()&&d==b){d=this.line.pb();if(this.Hb()){var e=a.clientX;var f=d.left+$.Wj(this.P().Ha()).x;d=(e-f)/d.width}else e=a.clientY,f=d.top+$.Wj(this.P().Ha()).y,d=(d.height-(e-f))/d.height;d=b.Fc(d);if($.K(b,$.Uy)){a=b.pn(d);var h=this.N[a.sourceIndex];b=c.mc();f=b.Vc();"single"==f.i("hoverMode")?this.Jf={W:c,md:h}:this.Jf=[{W:c,md:h,xn:h[h.length-1],we:{index:h[h.length-1],Yf:0}}]}else if($.K(b,
$.Ry)&&c){f=c.vc();h=window.Infinity;for(var k=window.NaN,l=b.uh(),m=b.Rh();f.advance();){e=f.get(c.Se?c.Se.ol:c.nr[1]);e=$.Za(e,l,m);var p=Math.abs(d-e);h>p&&(h=p,k=e)}h=[];f=c.vc();for(d=k;f.advance();)e=f.get(c.Se?c.Se.ol:c.nr[1]),e=$.Za(e,l,m),e==d&&h.push(f.la());b&&c&&(b=c.mc(),f=b.Vc(),"single"==f.i("hoverMode")?(this.Jf&&!(0,$.RC)(h,function(a){return $.Aa(this.Jf.md,a)},this)&&b.dispatchEvent(b.Ik("hovered",a,[{W:c,md:[],we:{index:this.Jf.md[this.Jf.md.length-1],Yf:0}}],!1)),this.Jf={W:c,
md:h}):this.Jf=[{W:c,md:h,xn:h[h.length-1],we:{index:h[h.length-1],Yf:0}}])}$.tN(this,d)}}};$.g.Gg=function(){$.uN(this);var a=this.b;a&&(this.Oa=a)};$.g.remove=function(){var a=$.jr(this,"marker");a&&a.remove();$.oN.u.remove.call(this)};$.g.F=function(){var a=$.oN.u.F.call(this);$.Hq(this,wN,a);a.marker=this.gr().F();return a};$.g.X=function(a,b){$.oN.u.X.call(this,a,b);$.zq(this,wN,a,b);this.gr(a.marker)};$.g.R=function(){$.td(this.Jl,this.g);this.g=this.Jl=null;$.oN.u.R.call(this)};$.H(vN,$.oN);
$.ju(vN,$.oN);var xN=$.oN.prototype;xN.marker=xN.gr;xN=vN.prototype;$.F("anychart.standalones.colorRange",function(){var a=new vN;a.Fa("standalones.colorRange");return a});xN.padding=xN.padding;xN.draw=xN.$;xN.parentBounds=xN.ja;xN.container=xN.P;}).call(this,$)}
