if(!_.color_scales){_.color_scales=1;(function($){var kK,nK,oK,pK,sK;$.hK=function(a,b){var c=a.i("fontSize")!=b;null===b?delete a.sd.fontSize:a.sd.fontSize=b;c&&a.u(4)};$.iK=function(a){var b={};$.yc(a.La,function(a,d){if($.p(a)){if("adjustByHeight"==d||"adjustByWidth"==d)d="adjustFontSize";b[d]=this.md(d)}},a);return b};$.jK=function(a,b){return $.ij(pea,a,b||"clip")};kK=function(){$.ex.call(this)};
$.lK=function(){$.gx.call(this);this.Ia("defaultColorRange");$.Qs(this,this,this.cg,this.rg,null,this.cg);this.Ac.wa(this,"mousedown",this.qx);this.qe|=1024;$.R(this.xa,[["length",this.qe,9],["align",this.qe,9],["colorLineSize",this.qe,9]])};$.mK=function(a){a.line&&(a.line.Uk(),a.line.remove(),a.line=null);a.lines&&(a.lines.length=0)};
nK=function(a){if(a.b){var b=a.scale();if(b&&$.K(b,$.wx)){a.N={};for(var c=a.b,d=c.wc();d.advance();){var e=($.p(c.ga)?d.j(c.ga):null)||d.get(c.Le?c.Le.Zk:c.Uq[1]);!(e=b.Zm(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.ka()))}}}};oK=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):$.p(c)?0<c?"outside"==b?0:d:0>c?"inside"==b?0:d:d:d);return d};
pK=function(a){var b=0,c=$.hq(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=$.p(d)?d:0;c=$.p(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};
$.qK=function(a,b){if(a.b){var c=a.scale(),d=$.hq(a,"marker"),e=a.b,f=e.pd()||(e.Xm?e.Xm():void 0),h=d&&d.enabled();e=e.enabled()&&f==c;if(a.enabled()&&h&&c&&e&&(c=a.line.kb(),h=$.Ya(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}$.U(d);d.pa("rotation",m);d.Cc({value:{x:k,y:l}});d.da(!1);d.X();d.Kd().visible(!0)}}};$.rK=function(a){var b=$.hq(a,"marker");a.scale()&&b&&b.Kd().visible(!1)};sK=function(){$.lK.call(this)};$.Vv.prototype.Xm=$.ca(20,function(){return this.Jb});var pea={Kha:"always-show",Dia:"clip",ija:"drop"};$.H(kK,$.ex);
kK.prototype.JY=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.Ra()+d/2,h=a);this.path.moveTo(b,f);this.path.lineTo(b,f+h)};
kK.prototype.zQ=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)};
kK.prototype.uQ=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.Ra()+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)};
kK.prototype.xQ=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($.lK,$.gx);var tK={};$.ep(tK,[[0,"colorLineSize",$.mp],$.Y.cI,$.Y.eI]);$.S($.lK,tK);$.g=$.lK.prototype;$.g.qa=$.gx.prototype.qa|1024;$.g.Gk=function(){return new kK};$.g.aE=function(){this.line||($.K(this.scale(),$.tx)?this.line=$.aj():$.K(this.scale(),$.wx)&&(this.line=$.Zi(),this.lines=[]),this.line.zIndex(this.zIndex()),this.line.parent(this.O()),this.line.cursor("pointer"),$.Ps(this,this.line));return this.line};
$.g.Nq=function(a){this.zl||(this.zl=new $.ww,$.V(this,"marker",this.zl),this.zl.Cc({value:{x:0,y:0}}),$.L(this.zl,this.f7,this));return $.p(a)?(this.zl.K(a),this.u(1024,1),this):this.zl};$.g.f7=function(a){$.W(a,1)&&this.u(1024,1)};$.g.target=function(a){return $.p(a)?(this.b!=a&&(this.b=a,nK(this),$.L(this.b,this.Pga,this)),this):this.b};$.g.Pga=function(a){$.W(a,132)&&nK(this)};
$.g.yp=function(a,b){var c=this.scale(),d={};if($.K(c,$.tx)){var e=(0,window.parseFloat)(b);var f=c.dD(e);var h="number"}else if($.K(c,$.wx)){e=b;f=c.Pa().names()[a];h="string";var k=c.Zm(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:$.p(c.max)?c.max:null,type:"number"};d.min={value:$.p(c.min)?c.min:null,type:"number"};d.scale={value:c,
type:""};return $.Lt(new $.$u(d))};
$.g.wO=function(a,b,c,d,e){c=a.top+a.height+c/2-d;var f=this.scale();if($.K(f,$.tx))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,$.wx)){d=f.Dq();f=f.hl();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 n=this.lines[k]?this.lines[k].clear():this.lines[k]=this.line.path(),q=a.left+b+h*k;n.moveTo(q,c).lineTo(q+h,c).lineTo(q+h,c-e).lineTo(q,c-e).close();
n.stroke(this.i("stroke"));n.fill(m)}}};
$.g.$D=function(a,b,c,d,e){c=a.left-c/2+d;var f=this.scale();if($.K(f,$.tx))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,$.wx)){d=f.Dq();f=f.hl();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 n=this.lines[k]?this.lines[k].clear():this.lines[k]=this.line.path(),q=a.top+b+h*(d.length-1-k-1);n.moveTo(c,q).lineTo(c,q+h).lineTo(c+e,q+h).lineTo(c+e,q).close();
n.stroke(this.i("stroke"));n.fill(m)}}};
$.g.YD=function(a,b,c,d,e){c=a.top-c/2+d;var f=this.scale();if($.K(f,$.tx))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,$.wx)){d=f.Dq();f=f.hl();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 n=this.lines[k]?this.lines[k].clear():this.lines[k]=this.line.path(),q=a.left+b+h*k;n.moveTo(q,c).lineTo(q+h,c).lineTo(q+h,c+e).lineTo(q,c+e).close();n.stroke(this.i("stroke"));
n.fill(m)}}};
$.g.ZD=function(a,b,c,d,e){c=a.left+a.width+c/2-d;var f=this.scale();if($.K(f,$.tx))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,$.wx)){d=f.Dq();f=f.hl();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 n=this.lines[k]?this.lines[k].clear():this.lines[k]=this.line.path(),q=a.top+b+h*(d.length-1-k-1);n.moveTo(c,q).lineTo(c,q+h).lineTo(c-e,q+h).lineTo(c-
e,q).close();n.stroke(this.i("stroke"));n.fill(m)}}};
$.g.qp=function(){var a=this.aE(),b=this.scale();b||this.scale($.ux());if($.K(b,$.tx))a.clear(),a.stroke(this.i("stroke")),b=$.Sb(b.hl()),this.Fb()?b.angle=0:b.angle=90,a.fill(b);else if($.K(b,$.wx))for(a=0,b=this.lines.length;a<b;a++)this.lines[a].clear();switch(this.i("orientation")){case "top":var c=this.wO;break;case "right":c=this.$D;break;case "bottom":c=this.YD;break;case "left":c=this.ZD}a=this.i("stroke");a=$.Ub(a);a=!a||$.Sn(a)?0:a.thickness?(0,window.parseFloat)(a.thickness):1;b=0==a%2?
0:.5;var d=this.sb(),e=pK(this),f=Math.round(this.i("colorLineSize")),h=oK(this,this.Pa(),1),k=oK(this,this.ob(),1);c.call(this,d,b,a,Math.max(h,k,e),f)};
$.g.sb=function(){if(!this.Pp||this.J(4)){var a=this.fa();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.Fb()){var b=a.width;var c=a.height}else b=a.height,c=a.width;var d=this.Ng(b);c=this.width()?$.M(this.width(),c):$.kx(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.Fb()?(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 n=a.top+f;var q=a.left+m;var r=c;var t=d;break;case "right":n=a.top+m;q=a.left+a.width-c-h;r=d;t=c;break;case "bottom":n=a.top+a.height-c-k;q=a.left+m;r=c;t=d;break;case "left":n=a.top+m,q=a.left+e,r=d,t=c}this.Pp=new $.I(Math.round(q),Math.round(n),Math.round(t),Math.round(r))}else this.Pp=
new $.I(0,0,0,0);this.I(4)}return this.Pp};$.g.Ng=function(a){return $.M(this.i("length"),a)};
$.g.RX=function(a,b){var c=this.Pa(),d=this.ob(),e=c.i("position"),f=d.i("position");c=oK(this,c);var h=oK(this,d);d=pK(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||$.Sn(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=$.lK.B.scale.call(this,a))||(this.g||(this.g=$.ux(),this.g.hl("#fff","#000")),a=this.g);return a};$.g.aR=function(){return 48};$.g.Xf=function(a){$.W(a,2)&&$.mK(this);$.lK.B.Xf.call(this,a)};
$.g.X=function(){if(!this.xc())return this;var a=$.hq(this,"marker");this.J(1024)&&(a&&(a.O(this.O()),a.zIndex(this.zIndex()+1),a.X(),a.Kd().visible(!1)),this.I(1024));if(a&&(this.J(2)&&a.O(this.O()),this.J(8))){var b=this.zIndex();a.zIndex(b+1)}return $.lK.B.X.call(this)};
$.g.qx=function(a){if(this.b){var b=this.scale(),c=this.b,d=c&&(c.pd()||(c.Xm?c.Xm():void 0));if(this.enabled()&&b&&c.enabled()&&d==b){d=this.line.kb();if(this.Fb()){var e=a.clientX;var f=d.left+$.Ii(this.O().Ga()).x;d=(e-f)/d.width}else e=a.clientY,f=d.top+$.Ii(this.O().Ga()).y,d=(d.height-(e-f))/d.height;d=b.Kc(d);a.metaKey||a.shiftKey||!c.map||c.map.Pd();if($.K(b,$.wx))d=b.Zm(d),b&&c&&(e=this.N[d.sourceIndex],b=c.sc(),b=b.Zc(),"single"==b.i("hoverMode")?this.Ef={W:c,kd:e}:this.Ef=[{W:c,kd:e,fn:e[e.length-
1],ie:{index:e[e.length-1],Rf:0}}]);else if($.K(b,$.tx)){a=c.wc();e=window.Infinity;for(var h=window.NaN,k=b.kh(),l=b.Ih();a.advance();){f=a.get(c.Le?c.Le.Zk:c.Uq[1]);f=$.Ya(f,k,l);var m=Math.abs(d-f);e>m&&(e=m,h=f)}e=[];a=c.wc();for(d=h;a.advance();)f=a.get(c.Le?c.Le.Zk:c.Uq[1]),f=$.Ya(f,k,l),f==d&&e.push(a.ka());b&&c&&(b=c.sc(),b=b.Zc(),"single"==b.i("hoverMode")?this.Ef={W:c,kd:e}:this.Ef=[{W:c,kd:e,fn:e[e.length-1],ie:{index:e[e.length-1],Rf:0}}])}}}};
$.g.cg=function(a){if(this.b){var b=this.scale(),c=this.b,d=c.pd()||(c.Xm?c.Xm():void 0);if(this.enabled()&&b&&c.enabled()&&d==b){d=this.line.kb();if(this.Fb()){var e=a.clientX;var f=d.left+$.Ii(this.O().Ga()).x;d=(e-f)/d.width}else e=a.clientY,f=d.top+$.Ii(this.O().Ga()).y,d=(d.height-(e-f))/d.height;d=b.Kc(d);if($.K(b,$.wx)){a=b.Zm(d);var h=this.N[a.sourceIndex];b=c.sc();f=b.Zc();"single"==f.i("hoverMode")?this.Ef={W:c,kd:h}:this.Ef=[{W:c,kd:h,fn:h[h.length-1],ie:{index:h[h.length-1],Rf:0}}]}else if($.K(b,
$.tx)&&c){f=c.wc();h=window.Infinity;for(var k=window.NaN,l=b.kh(),m=b.Ih();f.advance();){e=f.get(c.Le?c.Le.Zk:c.Uq[1]);e=$.Ya(e,l,m);var n=Math.abs(d-e);h>n&&(h=n,k=e)}h=[];f=c.wc();for(d=k;f.advance();)e=f.get(c.Le?c.Le.Zk:c.Uq[1]),e=$.Ya(e,l,m),e==d&&h.push(f.ka());b&&c&&(b=c.sc(),f=b.Zc(),"single"==f.i("hoverMode")?(this.Ef&&!(0,$.lB)(h,function(a){return $.ya(this.Ef.kd,a)},this)&&b.dispatchEvent(b.rk("hovered",a,[{W:c,kd:[],ie:{index:this.Ef.kd[this.Ef.kd.length-1],Rf:0}}],!1)),this.Ef={W:c,
kd:h}):this.Ef=[{W:c,kd:h,fn:h[h.length-1],ie:{index:h[h.length-1],Rf:0}}])}$.qK(this,d)}}};$.g.rg=function(){$.rK(this);var a=this.b;a&&(this.Na=a)};$.g.remove=function(){var a=$.hq(this,"marker");a&&a.remove();$.lK.B.remove.call(this)};$.g.F=function(){var a=$.lK.B.F.call(this);$.Bp(this,tK,a);a.marker=this.Nq().F();return a};$.g.Y=function(a,b){$.lK.B.Y.call(this,a,b);$.tp(this,tK,a,b);this.Nq(a.marker)};$.g.R=function(){$.jd(this.zl,this.g);this.g=this.zl=null;$.lK.B.R.call(this)};$.H(sK,$.lK);
$.Vs(sK,$.lK);var uK=$.lK.prototype;uK.marker=uK.Nq;uK=sK.prototype;$.F("anychart.standalones.colorRange",function(){var a=new sK;a.Ia("standalones.colorRange");return a});uK.padding=uK.padding;uK.draw=uK.X;uK.parentBounds=uK.fa;uK.container=uK.O;}).call(this,$)}
