/*! * filename: ej2-charts.min.js * version : 19.1.65 * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ this.ej=this.ej||{},this.ej.charts=function(e,t,i,r,o,n,a,s,l){"use strict";function h(e){var t;switch(e){case"Fabric":t=["#4472c4","#ed7d31","#ffc000","#70ad47","#5b9bd5","#c1c1c1","#6f6fe2","#e269ae","#9e480e","#997300"];break;case"Bootstrap4":case"Bootstrap":t=["#a16ee5","#f7ce69","#55a5c2","#7ddf1e","#ff6ea6","#7953ac","#b99b4f","#407c92","#5ea716","#b91c52"];break;case"HighContrastLight":case"Highcontrast":case"HighContrast":t=["#79ECE4","#E98272","#DFE6B6","#C6E773","#BA98FF","#FA83C3","#00C27A","#43ACEF","#D681EF","#D8BC6E"];break;case"MaterialDark":t=["#00bdae","#404041","#357cd2","#e56590","#f8b883","#70ad47","#dd8abd","#7f84e8","#7bb4eb","#ea7a57"];break;case"FabricDark":t=["#4472c4","#ed7d31","#ffc000","#70ad47","#5b9bd5","#c1c1c1","#6f6fe2","#e269ae","#9e480e","#997300"];break;case"BootstrapDark":t=["#a16ee5","#f7ce69","#55a5c2","#7ddf1e","#ff6ea6","#7953ac","#b99b4f","#407c92","#5ea716","#b91c52"];break;default:t=["#00bdae","#404041","#357cd2","#e56590","#f8b883","#70ad47","#dd8abd","#7f84e8","#7bb4eb","#ea7a57"]}return t}function c(e){var t,i="MaterialDark"===e?"#303030":"FabricDark"===e?"#201F1F":"1A1A1A";switch(e){case"HighContrastLight":case"Highcontrast":case"HighContrast":t={axisLabel:"#ffffff",axisTitle:"#ffffff",axisLine:"#ffffff",majorGridLine:"#BFBFBF",minorGridLine:"#969696",majorTickLine:"#BFBFBF",minorTickLine:"#969696",chartTitle:"#ffffff",legendLabel:"#ffffff",background:"#000000",areaBorder:"#ffffff",errorBar:"#ffffff",crosshairLine:"#ffffff",crosshairFill:"#ffffff",crosshairLabel:"#000000",tooltipFill:"#ffffff",tooltipBoldLabel:"#000000",tooltipLightLabel:"#000000",tooltipHeaderLine:"#969696",markerShadow:"#BFBFBF",selectionRectFill:"rgba(255, 217, 57, 0.3)",selectionRectStroke:"#ffffff",selectionCircleStroke:"#FFD939"};break;case"MaterialDark":case"FabricDark":case"BootstrapDark":t={axisLabel:"#DADADA",axisTitle:"#ffffff",axisLine:" #6F6C6C",majorGridLine:"#414040",minorGridLine:"#514F4F",majorTickLine:"#414040",minorTickLine:" #4A4848",chartTitle:"#ffffff",legendLabel:"#DADADA",background:i,areaBorder:" #9A9A9A",errorBar:"#ffffff",crosshairLine:"#F4F4F4",crosshairFill:"#F4F4F4",crosshairLabel:"#282727",tooltipFill:"#F4F4F4",tooltipBoldLabel:"#282727",tooltipLightLabel:"#333232",tooltipHeaderLine:"#9A9A9A",markerShadow:null,selectionRectFill:"rgba(56,169,255, 0.1)",selectionRectStroke:"#38A9FF",selectionCircleStroke:"#282727"};break;case"Bootstrap4":t={axisLabel:"#212529",axisTitle:"#212529",axisLine:"#CED4DA",majorGridLine:"#CED4DA",minorGridLine:"#DEE2E6",majorTickLine:"#ADB5BD",minorTickLine:"#CED4DA",chartTitle:"#212529",legendLabel:"#212529",background:"#FFFFFF",areaBorder:"#DEE2E6",errorBar:"#000000",crosshairLine:"#6C757D",crosshairFill:"#495057",crosshairLabel:"#FFFFFF",tooltipFill:"rgba(0, 0, 0, 0.9)",tooltipBoldLabel:"rgba(255,255,255)",tooltipLightLabel:"rgba(255,255,255, 0.9)",tooltipHeaderLine:"rgba(255,255,255, 0.2)",markerShadow:null,selectionRectFill:"rgba(255,255,255, 0.1)",selectionRectStroke:"rgba(0, 123, 255)",selectionCircleStroke:"#495057"};break;default:t={axisLabel:"#686868",axisTitle:"#424242",axisLine:"#b5b5b5",majorGridLine:"#dbdbdb",minorGridLine:"#eaeaea",majorTickLine:"#b5b5b5",minorTickLine:"#d6d6d6",chartTitle:"#424242",legendLabel:"#353535",background:"#FFFFFF",areaBorder:"Gray",errorBar:"#000000",crosshairLine:"#4f4f4f",crosshairFill:"#4f4f4f",crosshairLabel:"#e5e5e5",tooltipFill:"rgba(0, 8, 22, 0.75)",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff",markerShadow:null,selectionRectFill:"rgba(41, 171, 226, 0.1)",selectionRectStroke:"#29abe2",selectionCircleStroke:"#29abe2"}}return t}function d(e){var t;switch(e){case"HighContrastLight":t={backRect:"#333",thumb:"#bfbfbf",circle:"#fff",circleHover:"#685708",arrow:"#333",grip:"#333",arrowHover:"#fff",backRectBorder:"#969696"};break;case"Bootstrap":t={backRect:"#f5f5f5",thumb:"#e6e6e6",circle:"#fff",circleHover:"#eee",arrow:"#8c8c8c",grip:"#8c8c8c"};break;case"Fabric":t={backRect:"#f8f8f8",thumb:"#eaeaea",circle:"#fff",circleHover:"#eaeaea",arrow:"#a6a6a6",grip:"#a6a6a6"};break;default:t={backRect:"#f5f5f5",thumb:"#e0e0e0",circle:"#fff",circleHover:"#eee",arrow:"#9e9e9e",grip:"#9e9e9e"}}return t}function p(e,i,r){var o=t.extend([],e,null);return o.sort(function(e,t){for(var o=0,n=0,a=0;an?-1:o===n?0:1}),o}function u(e){return-1!==e.indexOf("
")}function g(e){for(var i,r=t.extend([],e.points,null,!0),o=[],n=0,a=0;a"))[0]:r;var y=d.createText(g,a);if(n.delayRedraw||n.redraw||n.element.appendChild(n.svgObject),"string"!=typeof p&&p.length>1)for(var m=1,v=p.length;mn?r-(p+15):r,o=h?o-d.height/2:o+15,c?(c.innerHTML=e,c.style.top=o.toString()+"px",c.style.left=(r+15).toString()+"px"):(c=t.createElement("div",{innerHTML:e,id:a,styles:"top:"+o.toString()+"px;left:"+(r+15).toString()+'px;background-color: rgb(255, 255, 255) !important; color:black !important; position:absolute;border:1px solid rgb(112, 112, 112); padding-left : 3px; padding-right : 2px;padding-bottom : 2px; padding-top : 2px; font-size:12px; font-family: "Segoe UI"'}),s.appendChild(c),parseInt(c.style.left.replace("px",""),10)<0&&(c.style.left="0px")),l&&setTimeout(function(){m(a)},1500)}function b(e,t){return et.min}function x(e,t){return e<=t.max&&e>=t.min}function w(e,t){return"Logarithmic"===t.valueType?v(e,t.logBase):e}function S(e,t,i,r){var o=w(t.xValue,r.xAxis),n=e?w(e.xValue,r.xAxis):o,a=i?w(i.xValue,r.xAxis):o,s=Math.floor(r.xAxis.visibleRange.min),l=Math.ceil(r.xAxis.visibleRange.max);return n>=s&&n<=l||o>=s&&o<=l||a>=s&&a<=l||s>=n&&s<=a}function C(e){for(var t=0,i=0,r=e;io)&&(o=n);for(h=c=void 0,l=0;lc)&&(c=n);if(o1?e:1,i.logBase):e,t="Logarithmic"===r.valueType?v(t>1?t:1,r.logBase):t,e+="Category"===i.valueType&&"BetweenTicks"===i.labelPlacement&&"Radar"!==n.type?.5:0;var a=n.chart.radius*z(t,r),s=B(N(e,i),n.chart.primaryXAxis.startAngle);return{x:n.clipRect.width/2+n.clipRect.x+a*s.x,y:n.clipRect.height/2+n.clipRect.y+a*s.y}}function D(e,t){void 0===t&&(t=!1);var i=["NaN","NaN"];return e.indexOf("_Point_")>-1?i=e.split("_Series_")[1].split("_Point_"):e.indexOf("_shape_")>-1&&(!t||t&&-1===e.indexOf("_legend_"))?(i=e.split("_shape_"))[0]="0":e.indexOf("_text_")>-1&&(!t||t&&-1===e.indexOf("_legend_"))&&((i=e.split("_text_"))[0]="0"),new Jt(parseInt(i[0],10),parseInt(i[1],10))}function B(e,t){t=t<0?t+360:t;var i=Math.PI*(1.5-2*e);return i+=t*Math.PI/180,{x:Math.cos(i),y:Math.sin(i)}}function N(e,t){var i,r,o=t.visibleRange;return"Category"!==t.valueType?(i=o.max-("DateTime"===t.valueType?t.dateTimeInterval:o.interval)-o.min,r=t.visibleLabels.length-1,i=0===i?1:i):(i=1===t.visibleLabels.length?1:t.visibleLabels[t.visibleLabels.length-1].value-t.visibleLabels[0].value,r=t.visibleLabels.length),t.isInversed?(e-o.min)/i*(1-1/r):1-(e-o.min)/i*(1-1/r)}function F(e,i,r,o,n){var a=he(e),s="top:"+r.toString()+"px;left:"+o.toString()+"px;color:black !important; background:#FFFFFF !important; position:absolute;border:1px solid #707070;font-size:"+n+";border-radius:2px; z-index:1";a?(a.setAttribute("innerHTML"," "+i+" "),a.setAttribute("styles",s)):(a=t.createElement("div",{id:e,innerHTML:" "+i+" ",styles:s}),document.body.appendChild(a))}function V(e,t,r,o,n,a){for(var s,l,h,c,d,p=t.opposedPosition,u=n?"start":"auto",g=e.availableSize.width,y=t.scrollbarSettings.enable||t.zoomingScrollBar&&t.zoomingScrollBar.svgObject?t.scrollBarHeight:0,m=0;m<2;m++)s=i.measureText(m?t.endLabel:t.startLabel,t.labelStyle),n?(c=m?new Vi(a.x-y,a.y+3):new Vi(t.rect.x-y,a.y+a.height-3),l=a.x+(p?a.width+5+y:-(s.width+5+5+y)),h=a.y+(m?0:a.height-s.height-5),l+=l<0||g=i.x-r&&e<=i.x+i.width+r&&t>=i.y-o&&t<=i.y+i.height+o}function H(e,t,i){return(i.isInversed?1-e/t:e/t)*i.visibleRange.delta+i.visibleRange.min}function X(e,t,i){return(i.isInversed?e/t:1-e/t)*i.visibleRange.delta+i.visibleRange.min}function Y(e){var t=e.clipRect;e.chart.requireInvertedAxis?(t.x=e.yAxis.rect.x,t.y=e.xAxis.rect.y,t.width=e.yAxis.rect.width,t.height=e.xAxis.rect.height):(t.x=e.xAxis.rect.x,t.y=e.yAxis.rect.y,t.width=e.xAxis.rect.width,t.height=e.yAxis.rect.height)}function G(e){return e.substr(0,1).toLowerCase()+e.substr(1)}function W(e,t,r){var o,n,a,s;return r?(o=t.rect.x,n=e.rect.y,a=t.rect.width,s=e.rect.height):(o=e.rect.x,n=t.rect.y,a=e.rect.width,s=t.rect.height),new i.Rect(o,n,a,s)}function U(e,i){for(var r,o,n,a=Number.MAX_VALUE,s=0;s0&&c&&0!==(o=c-r[h-1])&&(a=Math.min(a,o))}}return a===Number.MAX_VALUE&&(a=1),a}function Z(e){var t;switch(e){case"Linear":t=q}return t}function q(e,t,i,r){return-i*Math.cos(e/r*(Math.PI/2))+i+t}function Q(e,i,r,o,n,a,s){var l=a.x,h=a.y,c=0;e.style.visibility="hidden",new t.Animation({}).animate(e,{duration:r,delay:i,progress:function(t){t.timeStamp>t.delay&&(t.element.style.visibility="visible",c=(t.timeStamp-t.delay)/t.duration,e.setAttribute("transform","translate("+l+" "+h+") scale("+c+") translate("+-l+" "+-h+")"))},end:function(){e.style.visibility="","Scatter"!==o.type&&"Bubble"!==o.type||s||n!==o.points.length-1||o.chart.trigger("animationComplete",{series:o.chart.isBlazor?{}:o})}})}function $(e,r,o,n,a){var s=function(t){e.setAttribute("x",t.x+""),e.setAttribute("y",t.y+""),e.setAttribute("width",t.width+""),e.setAttribute("height",t.height+"")};new t.Animation({}).animate(t.createElement("div"),{duration:o,delay:r,progress:function(e){s(new i.Rect(q(e.timeStamp,a.x,n.x-a.x,e.duration),q(e.timeStamp,a.y,n.y-a.y,e.duration),q(e.timeStamp,a.width,n.width-a.width,e.duration),q(e.timeStamp,a.height,n.height-a.height,e.duration)))},end:function(){s(n)}})}function J(e,i,r,o,n){if(!r||!o&&!e)return null;var a=300;n&&(a=n);var s,l,h,c=o||e.getAttribute("d"),d=c.split(/(?=[LMCZAQ])/),p=i.split(/(?=[LMCZAQ])/),u=[],g=[];e.setAttribute("d",c),new t.Animation({}).animate(t.createElement("div"),{duration:a,progress:function(t){s="",d.map(function(e,i){if(u=e.split(" "),g=p[i]?p[i].split(" "):u,"Z"===u[0]?s+="Z ":s+=u[0]+" "+q(t.timeStamp,+u[1],+g[1]-+u[1],t.duration)+" "+q(t.timeStamp,+u[2],+g[2]-+u[2],t.duration)+" ","C"===u[0]||"Q"===u[0])for(l=3,h="Q"===u[0]?4:6;l"),s=o.enableTrim?a?De(o.maximumLabelWidth,n.text,o.labelStyle):Ie(o.maximumLabelWidth,n.text,o.labelStyle):n.text;o.visibleLabels.push(new ki(s,n.value,n.labelStyle,n.text))}}function te(e){return null!=e.minimum&&null!=e.maximum}function ie(e){return e.zoomFactor<1&&e.zoomPosition>=0}function re(e,i){var r="Horizontal"===i.orientation?e.width:e.height;if(t.isNullOrUndefined(i.desiredIntervals)){var o=("Horizontal"===i.orientation?.533:1)*i.maximumLabels;return o=Math.max(r*(o/100),1)}return i.desiredIntervals}function oe(e,i,r,o,n){new t.Animation({}).animate(e,{duration:r,delay:i,name:o,progress:function(e){e.element.style.visibility="visible"},end:function(e){n?t.remove(e.element):e.element.style.visibility="visible"}})}function ne(e,t,r,o,n,a,s,l,h,c){var d=s||new i.SvgRenderer(""),p=ae(e,r,t,n,o,h,c);return d["draw"+p.functionName](p.renderOption,l?new Int32Array([l.x,l.y]):null)}function ae(e,r,o,n,a,s,l){var h,c,d,p="Path",u=s,g=u&&"Circle"===o?r.width-2:r.width,y=u&&"Circle"===o?r.height-2:r.height,m=u?l.targetWidth:0,v=e.x,f=e.y,b=e.y+-y/2,x=e.x+-g/2;switch(o){case"Bubble":case"Circle":p="Ellipse",t.merge(n,{rx:g/2,ry:y/2,cx:v,cy:f});break;case"Cross":h="M "+x+" "+f+" L "+(v+g/2)+" "+f+" M "+v+" "+(f+y/2)+" L "+v+" "+(f+-y/2),t.merge(n,{d:h,stroke:n.fill});break;case"Multiply":h="M "+(v-m)+" "+(f-m)+" L "+(v+m)+" "+(f+m)+" M "+(v-m)+" "+(f+m)+" L "+(v+m)+" "+(f-m),t.merge(n,{d:h,stroke:n.fill});break;case"HorizontalLine":h="M "+x+" "+f+" L "+(v+g/2)+" "+f,t.merge(n,{d:h});break;case"VerticalLine":h="M "+v+" "+(f+y/2)+" L "+v+" "+(f+-y/2),t.merge(n,{d:h});break;case"Diamond":h="M "+x+" "+f+" L "+v+" "+(f+-y/2)+" L "+(v+g/2)+" "+f+" L "+v+" "+(f+y/2)+" L "+x+" "+f+" z",t.merge(n,{d:h});break;case"ActualRect":h="M "+x+" "+(f+-y/8)+" L "+(v+m)+" "+(f+-y/8)+" L "+(v+m)+" "+(f+y/8)+" L "+x+" "+(f+y/8)+" L "+x+" "+(f+-y/8)+" z",t.merge(n,{d:h});break;case"TargetRect":h="M "+(x+m)+" "+(f+-y/2)+" L "+(v+m/2)+" "+(f+-y/2)+" L "+(v+m/2)+" "+(f+y/2)+" L "+(x+m)+" "+(f+y/2)+" L "+(x+m)+" "+(f+-y/2)+" z",t.merge(n,{d:h});break;case"Rectangle":case"Hilo":case"HiloOpenClose":case"Candle":case"Waterfall":case"BoxAndWhisker":case"StepArea":case"StackingStepArea":case"Square":case"Flag":h="M "+x+" "+(f+-y/2)+" L "+(v+g/2)+" "+(f+-y/2)+" L "+(v+g/2)+" "+(f+y/2)+" L "+x+" "+(f+y/2)+" L "+x+" "+(f+-y/2)+" z",t.merge(n,{d:h});break;case"Pyramid":case"Triangle":h="M "+x+" "+(f+y/2)+" L "+v+" "+(f+-y/2)+" L "+(v+g/2)+" "+(f+y/2)+" L "+x+" "+(f+y/2)+" z",t.merge(n,{d:h});break;case"Funnel":case"InvertedTriangle":h="M "+(v+g/2)+" "+(f-y/2)+" L "+v+" "+(f+y/2)+" L "+(v-g/2)+" "+(f-y/2)+" L "+(v+g/2)+" "+(f-y/2)+" z",t.merge(n,{d:h});break;case"Pentagon":for(var w=0;w<=5;w++)c=g/2*Math.cos(Math.PI/180*(72*w)),d=y/2*Math.sin(Math.PI/180*(72*w)),h=0===w?"M "+(v+c)+" "+(f+d)+" ":h.concat("L "+(v+c)+" "+(f+d)+" ");h=h.concat("Z"),t.merge(n,{d:h});break;case"Image":p="Image",t.merge(n,{href:a,height:y,width:g,x:x,y:b})}return n=ze(e,new i.Size(g,y),o,n).renderOption,{renderOption:n,functionName:p}}function se(e,t,r){var o=t.xr.x+r.width?r.x+r.width:t.x,n=t.yr.y+r.height?r.y+r.height:t.y;return new i.Rect(o>e.x?e.x:o,n>e.y?e.y:n,Math.abs(o-e.x),Math.abs(n-e.y))}function le(e,t,i){return e>i?i:e-1&&(i=e[r]);return i}function ve(e,t,i,r,o){e="Logarithmic"===i.valueType?v(e>0?e:Math.pow(i.logBase,i.visibleRange.min),i.logBase):e,t="Logarithmic"===r.valueType?v(t>0?t:Math.pow(r.logBase,r.visibleRange.min),r.logBase):t,e=z(e,i),t=z(t,r);var n=o?i.rect.height:i.rect.width,a=o?r.rect.width:r.rect.height;return new Vi(o?t*a:e*n,o?(1-e)*n:(1-t)*a)}function fe(e,t,i,r,o,n){if(void 0===i&&(i=!1),void 0===r&&(r=!1),void 0===o&&(o="x"),void 0===n&&(n="y"),!(e&&e.hasChildNodes()&&t))return null;be(!1,t,e,i,r,o,n)}function be(e,t,r,o,n,a,s,l,h,c,d,p,u){if(void 0===n&&(n=!1),void 0===a&&(a="x"),void 0===s&&(s="y"),void 0===c&&(c=!1),void 0===d&&(d=!1),void 0===p&&(p=null),e)return null;var g=t.querySelector("#"+r.id),y=g||he(r.id),m=r,v=u||300;o&&n&&y?(l=l||("DIV"===y.tagName?new Vi(+y.style[a].split("px")[0],+y.style[s].split("px")[0]):new Vi(+y.getAttribute(a),+y.getAttribute(s))),h&&"undefined"!==h?J(r,r.getAttribute("d"),o,h,v):d&&p?$(m,0,v,new i.Rect(+y.getAttribute("x"),+y.getAttribute("y"),+y.getAttribute("width"),+y.getAttribute("height")),p):Fe(m,v,l,"DIV"===m.tagName?new Vi(+m.style[a].split("px")[0],+m.style[s].split("px")[0]):new Vi(+m.getAttribute(a),+m.getAttribute(s)),a,s)):o&&n&&!y&&c&&oe(m,0,600,"FadeIn"),g?t.replaceChild(m,y):t.appendChild(m)}function xe(e,t,r,o,n){var a=Math.abs(e-r),s=Math.abs(t-o),l=Math.max(we(Math.min(e,r),a,n.x,n.width),n.x),h=Math.max(we(Math.min(t,o),s,n.y,n.height),n.y);return new i.Rect(l,h,Math.min(a,n.width),Math.min(s,n.height))}function we(e,t,i,r){return er+i&&(e=r+i-t),e}function Se(e,t,i){var r=t.yAxis.labelFormat,o=[],n=null!==r.match("{value}");switch(t.seriesType){case"XY":"PolarRadar"===t.chart.chartAreaType?-1!==t.drawType.indexOf("Stacking")?("Logarithmic"===t.yAxis.valueType&&w(t.stackedValues.endValues[e.index],t.yAxis)||x(t.stackedValues.endValues[e.index],t.yAxis.visibleRange))&&o.push(e.text||e.yValue.toString()):("Logarithmic"===t.yAxis.valueType&&w(e.yValue,t.yAxis)||x(e.yValue,t.yAxis.visibleRange))&&o.push(e.text||e.yValue.toString()):o.push(e.text||e.yValue.toString());break;case"HighLow":o.push(e.text||Math.max(e.high,e.low).toString()),o.push(e.text||Math.min(e.high,e.low).toString());break;case"HighLowOpenClose":o.push(e.text||Math.max(e.high,e.low).toString()),o.push(e.text||Math.min(e.high,e.low).toString()),o.push(e.text||Math.max(e.open,e.close).toString()),o.push(e.text||Math.min(e.open,e.close).toString());break;case"BoxPlot":o.push(e.text||e.median.toString()),o.push(e.text||e.maximum.toString()),o.push(e.text||e.minimum.toString()),o.push(e.text||e.upperQuartile.toString()),o.push(e.text||e.lowerQuartile.toString());for(var a=0,s=e.outliers;ae.x&&o.ye.y})}function Le(e,t){return e.xt.x&&e.yt.y}function Re(e,t){return e.x<=t.x&&e.x+e.width>=t.x+t.width&&e.y<=t.y&&e.height+e.y>=t.y+t.height}function Me(e,t,r){return new i.Rect(e.x-t.width/2-r.left,e.y-t.height/2-r.top,t.width+r.left+r.right,t.height+r.top+r.bottom)}function Ae(e){return"#"+Te(e.r)+Te(e.g)+Te(e.b)}function Te(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function ke(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?new Xi(parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)):new Xi(255,255,255)}function _e(e){e="transparent"===e?"white":e,document.body.appendChild(t.createElement("text",{id:"chartmeasuretext"}));var i=document.getElementById("chartmeasuretext");i.style.color=e,e=window.getComputedStyle(i).color,t.remove(i);var r=/^(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/.exec(e);return Ae(new Xi(parseInt(r[3],10),parseInt(r[4],10),parseInt(r[5],10)))}function Oe(e,t){(e=(e=_e(e)).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var i,r="#",o=0;o<3;o++)i=parseInt(e.substr(2*o,2),16),r+=("00"+(i=Math.round(Math.min(Math.max(0,i+i*t),255))).toString(16)).substr(i.toString(16).length);return r}function Ee(e){var t=Math.floor(e.length/2);return e.length%2?e[t]:(e[t-1]+e[t])/2}function ze(e,i,r,o){var n="",a=i.height,s=i.width,l=e.x,h=e.y;switch(r){case"MultiColoredLine":case"Line":case"StackingLine":case"StackingLine100":n="M "+(l+-s/2)+" "+h+" L "+(l+s/2)+" "+h,t.merge(o,{d:n});break;case"StepLine":o.fill="transparent",n="M "+(l+-s/2-2.5)+" "+(h+a/2)+" L "+(l+-s/2+s/10)+" "+(h+a/2)+" L "+(l+-s/2+s/10)+" "+h+" L "+(l+-s/10)+" "+h+" L "+(l+-s/10)+" "+(h+a/2)+" L "+(l+s/5)+" "+(h+a/2)+" L "+(l+s/5)+" "+(h+-a/2)+" L "+(l+s/2)+" "+(h+-a/2)+"L "+(l+s/2)+" "+(h+a/2)+" L"+(l+s/2+2.5)+" "+(h+a/2),t.merge(o,{d:n});break;case"UpArrow":o.fill=o.stroke,o.stroke="transparent",n="M "+(l+-s/2)+" "+(h+a/2)+" L "+l+" "+(h-a/2)+" L "+(l+s/2)+" "+(h+a/2)+"L "+(l+s/2-2)+" "+(h+a/2)+" L "+l+" "+(h-a/2+4)+"L"+(l-s/2+2)+" "+(h+a/2)+" Z",t.merge(o,{d:n});break;case"DownArrow":n="M "+(l-s/2)+" "+(h-a/2)+" L "+l+" "+(h+a/2)+" L "+(l+s/2)+" "+(h-a/2)+"L "+(l+s/2-2)+" "+(h-a/2)+" L "+l+" "+(h+a/2-4)+"L"+(l-s/2+2)+" "+(h-a/2)+" Z",t.merge(o,{d:n});break;case"RightArrow":n="M "+(l+-s/2)+" "+(h-a/2)+" L "+(l+s/2)+" "+h+" L "+(l+-s/2)+" "+(h+a/2)+" L "+(l+-s/2)+" "+(h+a/2-2)+" L "+(l+s/2-4)+" "+h+" L"+(l+-s/2)+" "+(h-a/2+2)+" Z",t.merge(o,{d:n});break;case"LeftArrow":o.fill=o.stroke,o.stroke="transparent",n="M "+(l+s/2)+" "+(h-a/2)+" L "+(l+-s/2)+" "+h+" L "+(l+s/2)+" "+(h+a/2)+" L "+(l+s/2)+" "+(h+a/2-2)+" L "+(l+-s/2+4)+" "+h+" L"+(l+s/2)+" "+(h-a/2+2)+" Z",t.merge(o,{d:n});break;case"Column":case"Pareto":case"StackingColumn":case"StackingColumn100":case"RangeColumn":case"Histogram":n="M "+(l-s/5*3)+" "+(h-a/5)+" L "+(l+-s/10*3)+" "+(h-a/5)+" L "+(l+-s/10*3)+" "+(h+a/2)+" L "+(l-s/5*3)+" "+(h+a/2)+" Z M "+(l+-s/10-s/20)+" "+(h-a/4-5)+" L "+(l+s/10+s/20)+" "+(h-a/4-5)+" L "+(l+s/10+s/20)+" "+(h+a/2)+" L "+(l+-s/10-s/20)+" "+(h+a/2)+" Z M "+(l+s/10*3)+" "+h+" L "+(l+s/5*3)+" "+h+" L "+(l+s/5*3)+" "+(h+a/2)+" L "+(l+s/10*3)+" "+(h+a/2)+" Z",t.merge(o,{d:n});break;case"Bar":case"StackingBar":case"StackingBar100":n="M "+(l+-s/2+-2.5)+" "+(h-a/5*3)+" L "+(l+s/10*3)+" "+(h-a/5*3)+" L "+(l+s/10*3)+" "+(h-a/10*3)+" L "+(l-s/2-2.5)+" "+(h-a/10*3)+" Z M "+(l+-s/2+-2.5)+" "+(h-a/5+.5)+" L "+(l+s/2+2.5)+" "+(h-a/5+.5)+" L "+(l+s/2+2.5)+" "+(h+a/10+.5)+" L "+(l-s/2-2.5)+" "+(h+a/10+.5)+" Z M "+(l-s/2-2.5)+" "+(h+a/5+1)+" L "+(l+-s/4)+" "+(h+a/5+1)+" L "+(l+-s/4)+" "+(h+a/2+1)+" L "+(l-s/2-2.5)+" "+(h+a/2+1)+" Z",t.merge(o,{d:n});break;case"Spline":o.fill="transparent",n="M "+(l-s/2)+" "+(h+a/5)+" Q "+l+" "+(h-a)+" "+l+" "+(h+a/5)+" M "+l+" "+(h+a/5)+" Q "+(l+s/2)+" "+(h+a/2)+" "+(l+s/2)+" "+(h-a/2),t.merge(o,{d:n});break;case"Area":case"MultiColoredArea":case"RangeArea":case"StackingArea":case"StackingArea100":n="M "+(l-s/2-2.5)+" "+(h+a/2)+" L "+(l+-s/4+-1.25)+" "+(h-a/2)+" L "+l+" "+(h+a/4)+" L "+(l+s/4+1.25)+" "+(h+-a/2+a/4)+" L "+(l+a/2+2.5)+" "+(h+a/2)+" Z",t.merge(o,{d:n});break;case"SplineArea":n="M "+(l-s/2)+" "+(h+a/5)+" Q "+l+" "+(h-a)+" "+l+" "+(h+a/5)+" Z M "+l+" "+(h+a/5)+" Q "+(l+s/2)+" "+(h+a/2)+" "+(l+s/2)+" "+(h-a/2)+" Z",t.merge(o,{d:n});break;case"Pie":case"Doughnut":o.stroke="transparent",n=_(l,h,Math.min(a,s)/2,a,s,r),t.merge(o,{d:n})}return{renderOption:o}}function Ie(e,t,r){var o=t,n=i.measureText(t,r).width;if(n>e)for(var a=t.length-1;a>=0;--a)if(o=t.substring(0,a)+"...",(n=i.measureText(o,r).width)<=e)return o;return o}function De(e,t,r){for(var o=[],n=t.split("
"),a=0;ae){for(var l=t.length-1;l>=0;--l)if(t=t.substring(0,l)+"...",(s=i.measureText(t,r).width)<=e){o.push(t);break}}else o.push(t)}return o}function Be(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function Ne(e,t,i,r){if(!e)return null;var o=he(t);return o&&i&&r.setElementAttributes(i,"clipPath"===o.tagName?o.childNodes[0]:o),o}function Fe(e,i,r,o,n,a){void 0===n&&(n="x"),void 0===a&&(a="y");var s="DIV"===e.tagName,l=function(t,i){s?(e.style[n]=t+"px",e.style[a]=i+"px"):(e.setAttribute(n,t+""),e.setAttribute(a,i+""))};l(r.x,r.y),new t.Animation({}).animate(t.createElement("div"),{duration:i,progress:function(e){l(q(e.timeStamp,r.x,o.x-r.x,e.duration),q(e.timeStamp,r.y,o.y-r.y,e.duration))},end:function(){l(o.x,o.y)}})}function Ve(e,t,r,o,n,a,s,l,h,c,d,p,u,g){void 0===a&&(a=!1),void 0===h&&(h=!1);var y,m,v,f,b={};b={id:t.id,x:t.x,y:t.y,fill:o||"black","font-size":r.size,"font-style":r.fontStyle,"font-family":r.fontFamily,"font-weight":r.fontWeight,"text-anchor":t.anchor,labelRotation:t.labelRotation,transform:t.transform,opacity:r.opacity,"dominant-baseline":t.baseLine};var x="string"==typeof t.text?t.text:a?t.text[t.text.length-1]:t.text[0],w=d?d.x:0,S=d?d.y:0,C=e.createText(b,x,w,S);if(C.style.fontFamily=r.fontFamily,C.style.fontStyle=r.fontStyle,C.style.fontSize=r.size,C.style.fontWeight=r.fontWeight,C.style.color=r.color,C.style.textAnchor=t.anchor,"string"!=typeof t.text&&t.text.length>1)for(var P=1,L=t.text.length;Pa&&(a=d.marker.height);for(var h=0,c=e.axis.series;h=t&&e.xValue<=i&&r.push({x:e.x,y:e.y})}),r}function nt(e,t){return e.reduce(function(e,i){return Math.abs(i-t)e)for(var n=t.length-1;n>=0;--n)if(r=t.substring(0,n)+"...",(o=ft(r,i).width)<=e||r.length<4)return r.length<4&&(r=" "),r;return r}function pt(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(r){i=t.compile(e)}return i}function ut(e,i,r){for(var o=e[0].outerHTML,n=Object.keys(r),a=0;a=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height}!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.axisTitleFont={size:"14px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.chartTitleFont={size:"15px",fontWeight:"500",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.chartSubTitleFont={size:"11px",fontWeight:"500",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.crosshairLabelFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.tooltipLabelFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.legendLabelFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.legendTitleFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.stripLineLabelFont={size:"12px",fontWeight:"Regular",color:"#353535",fontStyle:"Normal",fontFamily:"Segoe UI"},e.stockEventFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"}}(e.Theme||(e.Theme={}));var Vt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jt=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},Ht=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property("Line")],i.prototype,"type",void 0),jt([t.Property(null)],i.prototype,"color",void 0),jt([t.Property(1)],i.prototype,"width",void 0),jt([t.Property(null)],i.prototype,"length",void 0),jt([t.Property("")],i.prototype,"dashArray",void 0),i}(t.ChildProperty),Xt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property("Normal")],i.prototype,"fontStyle",void 0),jt([t.Property("16px")],i.prototype,"size",void 0),jt([t.Property("Normal")],i.prototype,"fontWeight",void 0),jt([t.Property("")],i.prototype,"color",void 0),jt([t.Property("Center")],i.prototype,"textAlignment",void 0),jt([t.Property("Segoe UI")],i.prototype,"fontFamily",void 0),jt([t.Property(1)],i.prototype,"opacity",void 0),jt([t.Property("Trim")],i.prototype,"textOverflow",void 0),i}(t.ChildProperty),Yt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property("")],i.prototype,"color",void 0),jt([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Gt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(0)],i.prototype,"x",void 0),jt([t.Property(0)],i.prototype,"y",void 0),i}(t.ChildProperty),Wt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Complex({},Yt)],i.prototype,"border",void 0),jt([t.Property("transparent")],i.prototype,"background",void 0),jt([t.Property(1)],i.prototype,"opacity",void 0),jt([t.Property(null)],i.prototype,"backgroundImage",void 0),i}(t.ChildProperty),Ut=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(10)],i.prototype,"left",void 0),jt([t.Property(10)],i.prototype,"right",void 0),jt([t.Property(10)],i.prototype,"top",void 0),jt([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),Zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(0)],i.prototype,"left",void 0),jt([t.Property(0)],i.prototype,"right",void 0),jt([t.Property(0)],i.prototype,"top",void 0),jt([t.Property(0)],i.prototype,"bottom",void 0),i}(t.ChildProperty),qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(!0)],i.prototype,"enable",void 0),jt([t.Property(1e3)],i.prototype,"duration",void 0),jt([t.Property(0)],i.prototype,"delay",void 0),i}(t.ChildProperty),Qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(0)],i.prototype,"series",void 0),jt([t.Property(0)],i.prototype,"point",void 0),i}(t.ChildProperty),$t=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(0)],i.prototype,"topLeft",void 0),jt([t.Property(0)],i.prototype,"topRight",void 0),jt([t.Property(0)],i.prototype,"bottomLeft",void 0),jt([t.Property(0)],i.prototype,"bottomRight",void 0),i}(t.ChildProperty),Jt=function(){function e(e,t){this.series=e,this.point=t}return e}(),Kt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(null)],i.prototype,"fill",void 0),jt([t.Complex({color:"transparent",width:0},Yt)],i.prototype,"border",void 0),jt([t.Property("Gap")],i.prototype,"mode",void 0),i}(t.ChildProperty),ei=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(!1)],i.prototype,"enable",void 0),jt([t.Property(null)],i.prototype,"minY",void 0),jt([t.Property(null)],i.prototype,"maxY",void 0),jt([t.Property(null)],i.prototype,"fill",void 0),i}(t.ChildProperty),ti=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return Vt(r,i),jt([t.Property(!1)],r.prototype,"enable",void 0),jt([t.Property(!0)],r.prototype,"enableMarker",void 0),jt([t.Property(!1)],r.prototype,"shared",void 0),jt([t.Property(null)],r.prototype,"fill",void 0),jt([t.Property(null)],r.prototype,"header",void 0),jt([t.Property(.75)],r.prototype,"opacity",void 0),jt([t.Complex(e.Theme.tooltipLabelFont,Xt)],r.prototype,"textStyle",void 0),jt([t.Property(null)],r.prototype,"format",void 0),jt([t.Property(null)],r.prototype,"template",void 0),jt([t.Property(!0)],r.prototype,"enableAnimation",void 0),jt([t.Property(300)],r.prototype,"duration",void 0),jt([t.Property(1e3)],r.prototype,"fadeOutDuration",void 0),jt([t.Property(!1)],r.prototype,"enableTextWrap",void 0),jt([t.Complex({color:"#cccccc",width:.5},Yt)],r.prototype,"border",void 0),r}(t.ChildProperty),ii=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property("Years")],i.prototype,"intervalType",void 0),jt([t.Property(1)],i.prototype,"interval",void 0),jt([t.Property(null)],i.prototype,"text",void 0),jt([t.Property(!1)],i.prototype,"selected",void 0),i}(t.ChildProperty),ri=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(43)],i.prototype,"height",void 0),jt([t.Property("Bottom")],i.prototype,"position",void 0),jt([t.Collection([],ii)],i.prototype,"periods",void 0),i}(t.ChildProperty),oi=function(){function e(e,t){e0?(e.actualRange.interval=e.interval||this.calculateNumericNiceInterval(e,e.doubleRange.delta,t),e.actualRange.max=e.doubleRange.end+e.actualRange.interval,e.doubleRange.start-e.actualRange.interval<0&&e.doubleRange.start>0?e.actualRange.min=0:e.actualRange.min=e.doubleRange.start-e.actualRange.interval):(e.actualRange.interval=e.interval||this.calculateNumericNiceInterval(e,e.doubleRange.delta,t),e.actualRange.min=e.doubleRange.start,e.actualRange.max=e.doubleRange.end)},e.prototype.initializeDoubleRange=function(e){null!==e.minimum?this.min=e.minimum:null!==this.min&&this.min!==Number.POSITIVE_INFINITY||(this.min=0),null!==e.maximum?this.max=e.maximum:null!==this.max&&this.max!==Number.NEGATIVE_INFINITY||(this.max=5),this.min===this.max&&(this.max=e.valueType.indexOf("Category")>-1?this.max:this.min+1),e.doubleRange=new oi(this.min,this.max),e.actualRange={}},e.prototype.calculateRangeAndInterval=function(e,t){this.calculateRange(t),this.getActualRange(t,e),this.applyRangePadding(t,e),this.calculateVisibleLabels(t,this.chart)},e.prototype.calculateRange=function(e){if(this.min=null,this.max=null,!te(e))for(var t=0,i=e.series;t-1||r.type.indexOf("Histogram")>-1)&&"Horizontal"===e.orientation||r.type.indexOf("Bar")>-1&&"Vertical"===e.orientation)&&("Double"!==r.xAxis.valueType&&"DateTime"!==r.xAxis.valueType||"Auto"!==r.xAxis.rangePadding||(this.paddingInterval=.5*U(r.xAxis,e.series))),"Horizontal"===e.orientation&&(this.chart.requireInvertedAxis?this.yAxisRange(e,r):this.findMinMax(r.xMin-this.paddingInterval,r.xMax+this.paddingInterval)),"Vertical"===e.orientation&&(this.isColumn+="Column"===r.type||"Bar"===r.type||"Column"===r.drawType?1:0,this.chart.requireInvertedAxis?this.findMinMax(r.xMin-this.paddingInterval,r.xMax+this.paddingInterval):this.yAxisRange(e,r)))}},e.prototype.yAxisRange=function(e,t){t.dragSettings.enable&&this.chart.dragY&&(this.chart.dragY>=e.visibleRange.max&&(t.yMax=this.chart.dragY+e.visibleRange.interval),this.chart.dragY<=e.visibleRange.min&&(t.yMin=this.chart.dragY-e.visibleRange.interval)),this.findMinMax(t.yMin,t.yMax)},e.prototype.findMinMax=function(e,t){(null===this.min||this.min>e)&&(this.min=e),(null===this.max||this.max=r+(n=t+.05*t)%r&&(n-=r),n%r<0&&(n=n-r-n%r)):(n=t<5/6*i?0:t-.5*(i-t))%r>0&&(n-=n%r),.365*r>=r-(a=i>0?i+.05*(i-s):i-.05*(i-s))%r&&(a+=r),a%r>0&&(a=a+r-a%r),e.doubleRange=new oi(n,a),0===n&&(r=this.calculateNumericNiceInterval(e,e.doubleRange.delta,o),a=Math.ceil(a/r)*r),this.updateActualRange(e,n,a,r)},e.prototype.calculateVisibleRange=function(e,i){if(i.visibleRange={max:i.actualRange.max,min:i.actualRange.min,delta:i.actualRange.delta,interval:i.actualRange.interval},"Cartesian"===this.chart.chartAreaType){var r=!t.isNullOrUndefined(i.zoomingScrollBar)&&i.zoomingScrollBar.isLazyLoad;(i.zoomFactor<1||i.zoomPosition>0)&&!r&&(i.calculateVisibleRangeOnZooming(this.chart),i.calculateAxisRange(e,this.chart),i.visibleRange.interval=i.enableAutoIntervalOnZooming&&"Category"!==i.valueType?this.calculateNumericNiceInterval(i,i.doubleRange.delta,e):i.visibleRange.interval)}i.triggerRangeRender(this.chart,i.visibleRange.min,i.visibleRange.max,i.visibleRange.interval)},e.prototype.calculateVisibleLabels=function(e,i){e.visibleLabels=[];var r,o=e.visibleRange.min;!("chart"===i.getModuleName()&&"PolarRadar"===i.chartAreaType)&&(e.zoomFactor<1||e.zoomPosition>0||this.paddingInterval)&&(o=e.visibleRange.min-e.visibleRange.min%e.visibleRange.interval);var n=this.getFormat(e),a=null!==n.match("{value}"),s=0,l=0;e.labelFormat&&e.labelFormat.indexOf("n")>-1&&(l=parseInt(e.labelFormat.substring(1,e.labelFormat.length),10)),e.format=i.intl.getNumberFormat({format:a?"":n,useGrouping:i.useGroupingSeparator}),e.startLabel=e.format(e.visibleRange.min),e.endLabel=e.format(e.visibleRange.max),e.visibleRange.interval&&(e.visibleRange.interval+"").indexOf(".")>=0&&(s=(e.visibleRange.interval+"").split(".")[1].length);for(var h;o<=e.visibleRange.max&&h!==o;o+=e.visibleRange.interval)h=o,r=t.extend({},t.getValue("properties",e.labelStyle),null,!0),x(o,e.visibleRange)&&ee(i,o,this.formatValue(e,a,n,o),r,e);o&&(o+"").indexOf(".")>=0&&(o+"").split(".")[1].length>10&&(o=(o+"").split(".")[1].length>(l||s)?+o.toFixed(l||s):o)<=e.visibleRange.max&&ee(i,o,this.formatValue(e,a,n,o),r,e),e.getMaxLabelWidth&&e.getMaxLabelWidth(this.chart)},e.prototype.getFormat=function(e){return e.labelFormat?0===e.labelFormat.indexOf("p")&&-1===e.labelFormat.indexOf("{value}")&&e.isStack100?"{value}%":e.labelFormat:e.isStack100?"{value}%":""},e.prototype.formatValue=function(e,t,i,r){return t?i.replace("{value}",e.format(r)):e.format(r)},e}(),ai="axisLabelRender",si=/~\d+~/g,li=/\^\d+\^/g,hi="onZooming",ci=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),di=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},pi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ci(i,e),di([t.Property("0")],i.prototype,"x",void 0),di([t.Property("0")],i.prototype,"y",void 0),di([t.Property(null)],i.prototype,"content",void 0),di([t.Property("Center")],i.prototype,"horizontalAlignment",void 0),di([t.Property("Pixel")],i.prototype,"coordinateUnits",void 0),di([t.Property("Chart")],i.prototype,"region",void 0),di([t.Property("Middle")],i.prototype,"verticalAlignment",void 0),di([t.Property(null)],i.prototype,"xAxisName",void 0),di([t.Property(null)],i.prototype,"yAxisName",void 0),di([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),ui=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ci(i,e),di([t.Property("")],i.prototype,"color",void 0),di([t.Property(1)],i.prototype,"width",void 0),di([t.Property("Rectangle")],i.prototype,"type",void 0),i}(t.ChildProperty),gi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ci(i,e),di([t.Property(null)],i.prototype,"start",void 0),di([t.Property(null)],i.prototype,"end",void 0),di([t.Property("")],i.prototype,"text",void 0),di([t.Property(null)],i.prototype,"maximumTextWidth",void 0),di([t.Property(null)],i.prototype,"customAttributes",void 0),di([t.Property("")],i.prototype,"type",void 0),i}(t.ChildProperty),yi=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return ci(r,i),di([t.Property(!0)],r.prototype,"visible",void 0),di([t.Property(!1)],r.prototype,"startFromAxis",void 0),di([t.Property(null)],r.prototype,"start",void 0),di([t.Property(null)],r.prototype,"end",void 0),di([t.Property(null)],r.prototype,"size",void 0),di([t.Property("#808080")],r.prototype,"color",void 0),di([t.Property(null)],r.prototype,"dashArray",void 0),di([t.Property("Auto")],r.prototype,"sizeType",void 0),di([t.Property(!1)],r.prototype,"isRepeat",void 0),di([t.Property(null)],r.prototype,"repeatEvery",void 0),di([t.Property(null)],r.prototype,"repeatUntil",void 0),di([t.Property(!1)],r.prototype,"isSegmented",void 0),di([t.Property(null)],r.prototype,"segmentStart",void 0),di([t.Property(null)],r.prototype,"segmentEnd",void 0),di([t.Property(null)],r.prototype,"segmentAxisName",void 0),di([t.Complex({color:"transparent",width:1},Yt)],r.prototype,"border",void 0),di([t.Property("")],r.prototype,"text",void 0),di([t.Property(null)],r.prototype,"rotation",void 0),di([t.Property("Middle")],r.prototype,"horizontalAlignment",void 0),di([t.Property("Middle")],r.prototype,"verticalAlignment",void 0),di([t.Complex(e.Theme.stripLineLabelFont,Xt)],r.prototype,"textStyle",void 0),di([t.Property("Behind")],r.prototype,"zIndex",void 0),di([t.Property(1)],r.prototype,"opacity",void 0),r}(t.ChildProperty),mi=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return ci(r,i),di([t.Property("Center")],r.prototype,"alignment",void 0),di([t.Property("Wrap")],r.prototype,"overflow",void 0),di([t.Complex(e.Theme.axisLabelFont,Xt)],r.prototype,"textStyle",void 0),di([t.Complex({color:null,width:1,type:"Rectangle"},ui)],r.prototype,"border",void 0),di([t.Collection([],gi)],r.prototype,"categories",void 0),r}(t.ChildProperty),vi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ci(i,e),di([t.Property(null)],i.prototype,"minimum",void 0),di([t.Property(null)],i.prototype,"maximum",void 0),i}(t.ChildProperty),fi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ci(i,e),di([t.Property(!1)],i.prototype,"enable",void 0),di([t.Property(null)],i.prototype,"pointsLength",void 0),di([t.Complex({},vi)],i.prototype,"range",void 0),i}(t.ChildProperty),bi=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xi=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},wi=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.axes=[],t.nearSizes=[],t.farSizes=[],t}return bi(i,e),i.prototype.computeSize=function(e,t){var i=0;e.visible&&e.internalVisibility&&(i+=e.findTickSize(e.crossInAxis)+t+e.findLabelSize(e.crossInAxis,5)+.5*e.lineStyle.width),e.opposedPosition?this.farSizes.push(i):this.nearSizes.push(i)},xi([t.Property("100%")],i.prototype,"height",void 0),xi([t.Complex({},Yt)],i.prototype,"border",void 0),i}(t.ChildProperty),Si=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.axes=[],t.nearSizes=[],t.farSizes=[],t.padding=0,t}return bi(i,e),i.prototype.computeSize=function(e,t){var i=0;e.visible&&e.internalVisibility&&(i+=e.findTickSize(e.crossInAxis)+t+e.findLabelSize(e.crossInAxis,5)+.5*e.lineStyle.width),e.opposedPosition?this.farSizes.push(i):this.nearSizes.push(i)},xi([t.Property("100%")],i.prototype,"width",void 0),xi([t.Complex({},Yt)],i.prototype,"border",void 0),i}(t.ChildProperty),Ci=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return bi(i,e),xi([t.Property(1)],i.prototype,"width",void 0),xi([t.Property("")],i.prototype,"dashArray",void 0),xi([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),Pi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return bi(i,e),xi([t.Property(.7)],i.prototype,"width",void 0),xi([t.Property("")],i.prototype,"dashArray",void 0),xi([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),Li=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return bi(i,e),xi([t.Property(1)],i.prototype,"width",void 0),xi([t.Property("")],i.prototype,"dashArray",void 0),xi([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),Ri=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return bi(i,e),xi([t.Property(1)],i.prototype,"width",void 0),xi([t.Property(5)],i.prototype,"height",void 0),xi([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),Mi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return bi(i,e),xi([t.Property(.7)],i.prototype,"width",void 0),xi([t.Property(5)],i.prototype,"height",void 0),xi([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),Ai=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return bi(r,i),xi([t.Property(!1)],r.prototype,"enable",void 0),xi([t.Property(null)],r.prototype,"fill",void 0),xi([t.Complex(e.Theme.crosshairLabelFont,Xt)],r.prototype,"textStyle",void 0),r}(t.ChildProperty),Ti=function(r){function o(e,t,o,n){var a=r.call(this,e,t,o,n)||this;return a.visibleLabels=[],a.series=[],a.rect=new i.Rect(void 0,void 0,0,0),a.axisBottomLine=null,a.intervalDivs=[10,5,2,1],a.isStack100=!1,a.crossAt=null,a.updatedRect=null,a.multiLevelLabelHeight=0,a.isChart=!0,a.isIntervalInDecimal=!0,a.titleCollection=[],a.titleSize=new i.Size(0,0),a.internalVisibility=!0,a.angle=a.labelRotation,a}return bi(o,r),o.prototype.findTickSize=function(e){return"Inside"===this.tickPosition?0:!e||e.visibleRange&&!this.isInside(e.visibleRange)?this.majorTickLines.height:0},o.prototype.isInside=function(e){return b(this.crossAt,e)||!this.opposedPosition&&this.crossAt>=e.max||this.opposedPosition&&this.crossAt<=e.min},o.prototype.findLabelSize=function(e,t){var r=0,o="Horizontal"===this.orientation;if(this.title&&(this.titleSize=i.measureText(this.title,this.titleStyle),r=this.titleSize.height+t,this.rect.width||this.rect.height)){var n=o?this.rect.width:this.rect.height;this.titleCollection=Xe(this.title,this.titleStyle,n),r*=this.titleCollection.length}if("Inside"===this.labelPosition)return r+t;var a,s,l=r+t+this.titlePadding+this.labelPadding+("Vertical"===this.orientation?this.maxLabelSize.width:this.maxLabelSize.height)+this.multiLevelLabelHeight;if(e&&this.placeNextToAxisLine){var h=e.visibleRange,c="Horizontal"===e.orientation?e.rect.width:e.rect.height;if(!h||!c)return 0;this.isInside(h)&&(l=(a=(s=this.findDifference(e))*((c-((a=s*(c/h.delta))i.max&&(e=i.max),this.updatedRect=t.extend({},this.rect,null,!0),"Horizontal"===this.orientation?(e=this.crossInAxis.rect.height-z(e,this.crossInAxis)*this.crossInAxis.rect.height,this.updatedRect.y=this.crossInAxis.rect.y+e):(e=z(e,this.crossInAxis)*this.crossInAxis.rect.width,this.updatedRect.x=this.crossInAxis.rect.x+e)},o.prototype.findDifference=function(e){var t=0;return t=this.opposedPosition?e.isInversed?e.visibleRange.min:e.visibleRange.max:e.isInversed?e.visibleRange.max:e.visibleRange.min,Math.abs(this.crossAt-t)},o.prototype.calculateVisibleRangeOnZooming=function(e){if(ie(this)){var t=this.actualRange,i=void 0,r=void 0;r=!this.isInversed||e.zoomModule?(i=this.actualRange.min+this.zoomPosition*this.actualRange.delta)+this.zoomFactor*this.actualRange.delta:(i=this.actualRange.max-this.zoomPosition*this.actualRange.delta)-this.zoomFactor*this.actualRange.delta,it.max&&(i-=r-t.max,r=t.max),this.doubleRange=new oi(i,r),this.visibleRange={min:this.doubleRange.start,max:this.doubleRange.end,delta:this.doubleRange.delta,interval:this.visibleRange.interval}}},o.prototype.calculateAxisRange=function(e,i){if(i.enableAutoIntervalOnBothAxis){if("Horizontal"===this.orientation&&"X"===i.zoomSettings.mode)for(l=0;lthis.visibleRange.min&&p.xValuethis.visibleRange.min&&p.yValue/g," "),this.labelStyle),s.breakLabelSize=i.measureText(this.enableTrim?s.text.join("
"):s.originalText,this.labelStyle)):s.size=i.measureText(s.text,this.labelStyle);var d=o?s.breakLabelSize.width:s.size.width;d>this.maxLabelSize.width&&(this.maxLabelSize.width=d,this.rotatedLabel=s.text);var p=o?s.breakLabelSize.height:s.size.height;if(p>this.maxLabelSize.height&&(this.maxLabelSize.height=p),o&&(s.text=this.enableTrim?s.text:s.originalText.split("
")),"None"!==l&&"Hide"!==l&&"Trim"!==l&&("None"!==l||this.angle%360==0)&&"Horizontal"===this.orientation&&this.rect.width>0&&!a){var g=o?s.breakLabelSize.width:s.size.width;switch(r=z(s.value,this)*this.rect.width+this.rect.x,r-=g/2,"Shift"===this.edgeLabelPlacement&&(0===h&&rthis.rect.x+this.rect.width&&(r=this.rect.x+this.rect.width-g)),l){case"MultipleRows":h>0&&this.findMultiRows(h,r,s,o);break;case"Rotate45":case"Rotate90":h>0&&(this.isInversed?r+g>=n:r<=n)&&(this.angle="Rotate45"===l?45:90,a=!0);break;default:if(o){for(var m=void 0,v=[],f=void 0,b=0;b1)for(var x=0;xthis.maxLabelSize.height&&(this.maxLabelSize.height=w)}n=this.isInversed?r:r+g}}if(0!==this.angle&&"Horizontal"===this.orientation){this.rotatedLabel=t.isNullOrUndefined(this.rotatedLabel)?"":this.rotatedLabel;var S=-360===this.angle||0===this.angle||-180===this.angle||180===this.angle||360===this.angle;"Outside"===this.labelPosition&&!S&&u(this.rotatedLabel)?this.maxLabelSize=new i.Size(this.maxLabelSize.height,this.maxLabelSize.width):this.maxLabelSize=y(this.labelStyle,this.rotatedLabel,this.angle,e)}e.multiLevelLabelModule&&this.multiLevelLabels.length>0&&e.multiLevelLabelModule.getMultilevelLabelsHeight(this)},o.prototype.findMultiRows=function(e,t,i,r){for(var o,n,a,s=[],l=e-1;l>=0;l--)o=this.visibleLabels[l],a=r?o.breakLabelSize.width:o.size.width,n=z(o.value,this)*this.rect.width+this.rect.x,(this.isInversed?t+i.size.width>n-.5*a:to.index?i.index:o.index+1):i.index=s.indexOf(o.index)>-1?i.index:o.index;var h=(r?i.breakLabelSize.height:i.size.height)*i.index+5*(i.index-1);h>this.maxLabelSize.height&&(this.maxLabelSize.height=h)},o.prototype.getModule=function(e){"Double"===this.valueType?this.baseModule=new ni(e):this.baseModule=e[G(this.valueType)+"Module"]},xi([t.Complex(e.Theme.axisLabelFont,Xt)],o.prototype,"labelStyle",void 0),xi([t.Complex({},Ai)],o.prototype,"crosshairTooltip",void 0),xi([t.Property("")],o.prototype,"title",void 0),xi([t.Complex(e.Theme.axisTitleFont,Xt)],o.prototype,"titleStyle",void 0),xi([t.Property("")],o.prototype,"labelFormat",void 0),xi([t.Property("")],o.prototype,"skeleton",void 0),xi([t.Property("DateTime")],o.prototype,"skeletonType",void 0),xi([t.Property("Center")],o.prototype,"lineBreakAlignment",void 0),xi([t.Property(0)],o.prototype,"plotOffset",void 0),xi([t.Property(null)],o.prototype,"plotOffsetLeft",void 0),xi([t.Property(null)],o.prototype,"plotOffsetTop",void 0),xi([t.Property(null)],o.prototype,"plotOffsetRight",void 0),xi([t.Property(null)],o.prototype,"plotOffsetBottom",void 0),xi([t.Property(!1)],o.prototype,"isIndexed",void 0),xi([t.Property(10)],o.prototype,"logBase",void 0),xi([t.Property(0)],o.prototype,"columnIndex",void 0),xi([t.Property(0)],o.prototype,"rowIndex",void 0),xi([t.Property(1)],o.prototype,"span",void 0),xi([t.Property(null)],o.prototype,"desiredIntervals",void 0),xi([t.Property(3)],o.prototype,"maximumLabels",void 0),xi([t.Property(1)],o.prototype,"zoomFactor",void 0),xi([t.Property(0)],o.prototype,"zoomPosition",void 0),xi([t.Property(!0)],o.prototype,"enableScrollbarOnZooming",void 0),xi([t.Property(!1)],o.prototype,"opposedPosition",void 0),xi([t.Property(!0)],o.prototype,"enableAutoIntervalOnZooming",void 0),xi([t.Property("Auto")],o.prototype,"rangePadding",void 0),xi([t.Property("Double")],o.prototype,"valueType",void 0),xi([t.Property("None")],o.prototype,"edgeLabelPlacement",void 0),xi([t.Property("Auto")],o.prototype,"intervalType",void 0),xi([t.Property("BetweenTicks")],o.prototype,"labelPlacement",void 0),xi([t.Property("Outside")],o.prototype,"tickPosition",void 0),xi([t.Property("Outside")],o.prototype,"labelPosition",void 0),xi([t.Property("")],o.prototype,"name",void 0),xi([t.Property(!0)],o.prototype,"visible",void 0),xi([t.Property(0)],o.prototype,"minorTicksPerInterval",void 0),xi([t.Property(0)],o.prototype,"labelRotation",void 0),xi([t.Property(null)],o.prototype,"crossesAt",void 0),xi([t.Property(!0)],o.prototype,"placeNextToAxisLine",void 0),xi([t.Property(null)],o.prototype,"crossesInAxis",void 0),xi([t.Property(null)],o.prototype,"minimum",void 0),xi([t.Property(null)],o.prototype,"maximum",void 0),xi([t.Property(null)],o.prototype,"interval",void 0),xi([t.Property(34)],o.prototype,"maximumLabelWidth",void 0),xi([t.Property(!1)],o.prototype,"enableTrim",void 0),xi([t.Property(5)],o.prototype,"labelPadding",void 0),xi([t.Property(5)],o.prototype,"titlePadding",void 0),xi([t.Complex({},Ri)],o.prototype,"majorTickLines",void 0),xi([t.Complex({},Mi)],o.prototype,"minorTickLines",void 0),xi([t.Complex({},Ci)],o.prototype,"majorGridLines",void 0),xi([t.Complex({},Pi)],o.prototype,"minorGridLines",void 0),xi([t.Complex({},Li)],o.prototype,"lineStyle",void 0),xi([t.Property("Trim")],o.prototype,"labelIntersectAction",void 0),xi([t.Property(!1)],o.prototype,"isInversed",void 0),xi([t.Property(100)],o.prototype,"coefficient",void 0),xi([t.Property(0)],o.prototype,"startAngle",void 0),xi([t.Property(!0)],o.prototype,"startFromZero",void 0),xi([t.Property(null)],o.prototype,"description",void 0),xi([t.Property(2)],o.prototype,"tabIndex",void 0),xi([t.Collection([],yi)],o.prototype,"stripLines",void 0),xi([t.Collection([],mi)],o.prototype,"multiLevelLabels",void 0),xi([t.Complex({color:null,width:0,type:"Rectangle"},ui)],o.prototype,"border",void 0),xi([t.Complex({},fi)],o.prototype,"scrollbarSettings",void 0),o}(t.ChildProperty),ki=function(){function e(e,t,r,o,n,a,s){void 0===n&&(n=new i.Size(0,0)),void 0===a&&(a=new i.Size(0,0)),void 0===s&&(s=1),this.text=e,this.originalText=o,this.value=t,this.labelStyle=r,this.size=n,this.breakLabelSize=a,this.index=s}return e}(),_i=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Oi=function(){function e(e,t,i,r,o,n){this.verticalStandardMean=e,this.horizontalStandardMean=i,this.verticalSquareRoot=t,this.horizontalSquareRoot=r,this.verticalMean=o,this.horizontalMean=n}return e}(),Ei=function(){function e(e,t,i,r,o){this.startAngle=e,this.endAngle=t,this.innerRadius=i,this.radius=r,this.currentXPosition=o}return e}(),zi=function(){function e(e){this.id=e}return e}(),Ii=function(){function e(e,t){this.startValues=e,this.endValues=t}return e}(),Di=function(e){function t(t,i,r,o,n,a,s,l,h){var c=e.call(this,t,i,r.width,r.color,o,h)||this;return c.y=n.y,c.x=n.x,c.height=n.height,c.width=n.width,c.rx=a||0,c.ry=s||0,c.transform=l||"",c.stroke=0!==r.width&&""!==c.stroke?r.color:"transparent",c}return _i(t,e),t}(i.PathOption),Bi=function(){function e(e,t,i,r,o,n,a,s){this.height=e,this.width=t,this.href=i,this.x=r,this.y=o,this.id=n,this.visibility=a,this.preserveAspectRatio=s}return e}(),Ni=function(e){function t(t,i,r,o,n,a,s){var l=e.call(this,t,i,r.width,r.color,o)||this;return l.cy=a,l.cx=n,l.r=s,l}return _i(t,e),t}(i.PathOption),Fi=function(){function e(e,t,i){this.id=e,this.points=t,this.fill=i}return e}(),Vi=function(){function e(e,t){this.x=e,this.y=t}return e}(),ji=function(){function e(e,t){this.x=0,this.y=0,this.x=e,this.y=t}return e}(),Hi=function(){function e(e,t,i,r){this.left=e,this.right=t,this.top=i,this.bottom=r}return e}(),Xi=function(){function e(e,t,i){this.r=e,this.g=t,this.b=i}return e}(),Yi=function(){function e(e,t,i){void 0===i&&(i=0),this.point=e,this.series=t,this.lierIndex=i}return e}(),Gi=function(){function e(e,t,i){void 0===i&&(i=0),this.point=e,this.series=t,this.index=i}return e}(),Wi=function(){function e(e,t){this.controlPoint1=e,this.controlPoint2=t}return e}(),Ui=function(){function e(e){this.chart=e,this.padding=5}return e.prototype.measureAxis=function(e){var t=this.chart;this.crossAt(t),this.seriesClipRect=new i.Rect(e.x,e.y,e.width,e.height),this.initialClipRect=e,this.leftSize=0,this.rightSize=0,this.topSize=0,this.bottomSize=0,this.measureRowAxis(t,this.initialClipRect),this.initialClipRect=L(this.initialClipRect,new Hi(this.leftSize,this.rightSize,0,0)),this.measureColumnAxis(t,this.initialClipRect),this.initialClipRect=L(this.initialClipRect,new Hi(0,0,this.topSize,this.bottomSize)),this.chart.delayRedraw||this.calculateAxisSize(this.initialClipRect),this.leftSize=0,this.rightSize=0,this.topSize=0,this.bottomSize=0,this.measureRowAxis(t,this.initialClipRect),this.seriesClipRect=L(this.seriesClipRect,new Hi(this.leftSize,this.rightSize,0,0)),this.measureColumnAxis(t,this.initialClipRect),this.seriesClipRect=L(this.seriesClipRect,new Hi(0,0,this.topSize,this.bottomSize)),this.chart.delayRedraw||(t.refreshAxis(),this.calculateAxisSize(this.seriesClipRect))},e.prototype.measureRowAxis=function(e,t){var r;this.calculateRowSize(t);for(var o=0,n=e.rows;o0)?16:0,n.scrollBarHeight=t.scrollBarModule&&(t.zoomModule&&t.zoomSettings.enableScrollbar&&n.enableScrollbarOnZooming&&t.zoomModule.isZoomed&&(n.zoomFactor<1||n.zoomPosition>0)||n.scrollbarSettings.enable)?16:0,n.getModule(t),n.baseModule.calculateRangeAndInterval(i,n),e.computeSize(n,n.scrollBarHeight)}e.farSizes.length>0&&(e.farSizes[e.farSizes.length-1]-=10),e.nearSizes.length>0&&(e.nearSizes[e.nearSizes.length-1]-=10)},e.prototype.calculateAxisSize=function(e){var t,i,r,o,n,a,s,l=this.chart,h=0,c=0,d=0;this.calculateRowSize(e);for(var p=0,u=l.rows.length;p=n?o.rect.x:n,c++):(n=e.x-C(E(t.nearSizes,h)),o.rect.x=o.rect.x<=n?o.rect.x:n,h++)}}this.calculateColumnSize(e);for(var p=0,u=l.columns.length;p=a?o.rect.y:a,h++)}}},e.prototype.measure=function(){for(var e,t,i,r,o,n=this.chart,a=0,s=n.axisCollections;an.rows.length?n.rows.length:r+l.span;for(h=r+1;hn.columns.length?n.columns.length:r+l.span;for(var h=r+1;h=t?t-1:i<0?0:i},e.prototype.getActualRow=function(e){var t=this.chart.rows.length,i=e.rowIndex;return i>=t?t-1:i<0?0:i},e.prototype.calculateRowSize=function(e){for(var t,i=this.chart,r=e.y+e.height,o=0,n=Math.max(0,e.height),a=0,s=i.rows.length;a0&&this.drawAxisLine(e,a,e.plotOffset,0,i?t:this.element,e.updatedRect),(e.majorGridLines.width>0||e.majorTickLines.width>0)&&this.drawXAxisGridLine(e,a,i||"Inside"===e.tickPosition?t:this.element,e.updatedRect),e.visible&&e.internalVisibility&&(this.drawXAxisLabels(e,a,i||"Inside"===e.labelPosition?t:this.element,e.placeNextToAxisLine?e.updatedRect:e.rect),this.drawXAxisBorder(e,a,i||"Inside"===e.labelPosition?t:this.element,e.placeNextToAxisLine?e.updatedRect:e.rect),this.drawXAxisTitle(e,a,i?t:this.element,e.placeNextToAxisLine?e.updatedRect:e.rect))):(e.updateCrossValue(),e.visible&&e.internalVisibility&&e.lineStyle.width>0&&this.drawAxisLine(e,a,0,e.plotOffset,i?t:this.element,e.updatedRect),(e.majorGridLines.width>0||e.majorTickLines.width>0)&&this.drawYAxisGridLine(e,a,i||"Inside"===e.tickPosition?t:this.element,e.updatedRect),e.visible&&e.internalVisibility&&(this.drawYAxisLabels(e,a,i||"Inside"===e.labelPosition?t:this.element,e.placeNextToAxisLine?e.updatedRect:e.rect),this.drawYAxisBorder(e,a,i||"Inside"===e.labelPosition?t:this.element,e.placeNextToAxisLine?e.updatedRect:e.rect),this.drawYAxisTitle(e,a,i?t:this.element,e.placeNextToAxisLine?e.updatedRect:e.rect))),this.chart.enableCanvas||(o.appendChild(this.element),t&&t.childNodes.length>0&&n.appendChild(t)),r.scrollBarModule&&(r.zoomSettings.enableScrollbar&&e.enableScrollbarOnZooming||e.scrollbarSettings.enable)&&this.renderScrollbar(r,e);this.element=r.renderer.createGroup({id:r.element.id+"DefinitionLine"});for(var l=0,s=r.rows.length;l0)||i.scrollbarSettings.enable&&(i.zoomFactor<=1||i.zoomPosition>=0))&&(!i.zoomingScrollBar.isScrollUI||e.visibleSeries[0].type.indexOf("Bar")>=0)?(e.scrollElement||(e.scrollElement=Ne(e.redraw,e.element.id+"_scrollElement")||t.createElement("div",{id:e.element.id+"_scrollElement"})),be(!1,e.scrollElement,i.zoomingScrollBar.render(!0),!0)):1===i.zoomFactor&&0===i.zoomPosition&&i.zoomingScrollBar.svgObject&&!i.scrollbarSettings.enable&&i.zoomingScrollBar.destroy(),i.zoomingScrollBar.isScrollUI&&(i.zoomingScrollBar.isScrollUI=!1)},e.prototype.findAxisPosition=function(e){return null!==e.crossAt&&e.isInside(e.crossInAxis.visibleRange)},e.prototype.drawBottomLine=function(e,t,i){var r,o,n,a,s,l=this.chart,h={};i?(n=a=(e=e).computedTop+e.computedHeight,o=(r=this.seriesClipRect.x)+this.seriesClipRect.width,s="Row"):(r=o=(e=e).computedLeft,a=(n=this.seriesClipRect.y)+this.seriesClipRect.height,s="Column"),h={id:l.element.id+"_AxisBottom_"+s+t,x1:r,y1:n,x2:o,y2:a,"stroke-width":e.border.width,stroke:e.border.color},this.htmlObject=l.renderer.drawLine(h),this.element.appendChild(this.htmlObject)},e.prototype.drawAxisLine=function(e,t,i,r,o,n){var a=this.chart,s={},l=he(a.element.id+"AxisLine_"+t),h=l?l.getAttribute("d"):"";l=null,s={id:a.element.id+"AxisLine_"+t,d:"M "+(n.x-i)+" "+(n.y-r)+" L "+(n.x+n.width+i)+" "+(n.y+n.height+r),"stroke-dasharray":e.lineStyle.dashArray,"stroke-width":e.lineStyle.width,stroke:e.lineStyle.color||a.themeStyle.axisLine},this.htmlObject=a.renderer.drawPath(s),be(a.enableCanvas,o,this.htmlObject,a.redraw,!0,"x","y",null,h)},e.prototype.drawYAxisGridLine=function(e,i,r,o){var n,a,s="Logarithmic"===e.valueType,l=e.valueType.indexOf("Category")>-1,h=0,c="",d="",p=e.opposedPosition?e.majorTickLines.height:-e.majorTickLines.height,u=e.opposedPosition?.5*e.lineStyle.width:.5*-e.lineStyle.width,g="Category"===e.valueType&&"BetweenTicks"===e.labelPlacement?.5:0,y=t.isNullOrUndefined(e.crossesAt)?e.opposedPosition?e.scrollBarHeight:-e.scrollBarHeight:0,m="Inside"===e.tickPosition,v=m?o.x-p-u:o.x+p+u+y,f=e.visibleLabels.length,x=this.chart.themeStyle;e.valueType.indexOf("Category")>-1&&"BetweenTicks"===e.labelPlacement&&f>0&&(f+=1);for(var w=e.minorGridLines,S=e.minorTickLines,C=0;C=o.y&&o.y+o.height>=h&&((b(n,e.visibleRange)||this.isBorder(e,C,h))&&(c="M "+this.seriesClipRect.x+" "+h+" L "+(this.seriesClipRect.x+this.seriesClipRect.width)+" "+h,this.renderGridLine(e,i,c,e.majorGridLines,"_MajorGridLine_",C,this.element,x.majorGridLine,e.majorGridLines.dashArray)),d="M "+(o.x+u+(m?y:0))+" "+h+" L "+v+" "+h,this.renderGridLine(e,i,d,e.majorTickLines,"_MajorTickLine_",C,r,x.majorTickLine),(w.width>0||S.width>0)&&e.minorTicksPerInterval>0&&(0!==C||!ie(e)||s||l||this.renderMinorGridOnZooming(e,n,o,C,i,x,r),a=this.drawAxisMinorLine(e,n,o,C),this.renderGridLine(e,i,a[0],w,"_MinorGridLine_",C,this.element,x.minorGridLine,w.dashArray),this.renderGridLine(e,i,a[1],S,"_MinorTickLine_",C,r,x.minorTickLine),C===f-1&&ie(e)&&s&&!l&&this.renderMinorGridOnZooming(e,n+e.visibleRange.interval,o,C,i,x,r)))},e.prototype.isBorder=function(e,t,i){var r=this.chart.chartArea.border,o=this.seriesClipRect,n=e.orientation,a="Horizontal"===n?o.x:o.y,s="Horizontal"===n?o.width:o.height,l="Horizontal"===n?0:e.visibleLabels.length-1,h="Horizontal"===n?e.visibleLabels.length-1:0;return e.plotOffset>0||((i===a||i===a+s)&&(r.width<=0||"transparent"===r.color)||(i!==a&&t===l||i!==a+s&&t===h))},e.prototype.drawYAxisLabels=function(e,r,o,n){var a,s,l,h=this.chart,c=0,d=0,p=e.labelPadding,g="Inside"===e.labelPosition,y=e.opposedPosition,m=(e.labelPosition===e.tickPosition?e.majorTickLines.height:0)+p+.5*e.lineStyle.width;m=e.opposedPosition?m:-m;var v=y&&g||!y&&!g?"end":"start";v=h.isRtlEnabled?e.opposedPosition?"end":"start":v;for(var f,b,x,w=h.renderer.createGroup({id:h.element.id+"AxisLabels"+r}),S=t.isNullOrUndefined(e.crossesAt)?e.scrollBarHeight*(y?1:-1):0,C=0,P=e.visibleLabels.length;Ce.majorTickLines.width?e.majorGridLines.width:e.majorTickLines.width,"Far"===e.labelStyle.textAlignment?d=d-x-10:"Near"===e.labelStyle.textAlignment?d=d+x+10:"Center"===e.labelStyle.textAlignment&&(d=d),c=l?this.getAxisLabelXvalue(c,e,a.width):c;var L=l?this.getAnchor(e):v;if(s=new i.TextOption(h.element.id+r+"_AxisLabel_"+C,c,d,L,e.visibleLabels[C].text),e.edgeLabelPlacement)switch(e.edgeLabelPlacement){case"None":break;case"Hide":((0===C||e.isInversed&&C===P-1)&&s.y>n.y+n.height||(C===P-1||e.isInversed&&0===C)&&s.y-.5*a.heightn.y+n.height?s.y=d=n.y+n.height:(C===P-1||e.isInversed&&0===C)&&s.y-.5*a.height0){var o=void 0,n=void 0,a="Outside"===e.labelPosition?e.scrollBarHeight:0;a=(e.opposedPosition?1:-1)*a;for(var s=r.height/e.visibleRange.delta*("DateTime"===e.valueType?e.dateTimeInterval:e.visibleRange.interval),l=void 0,h=e.maxLabelSize.width+10+(e.tickPosition===e.labelPosition?e.majorTickLines.height:0),c="",d="Category"===e.valueType&&"BetweenTicks"===e.labelPlacement?-.5:0,p=e.opposedPosition&&"Inside"===e.labelPosition||!e.opposedPosition&&"Outside"===e.labelPosition?r.x-h+a:r.x+h+a,u=0,g=e.visibleLabels.length;ur.y+r.height?c+="M "+p+" "+(r.y+r.height)+" L "+p+" "+l+" ":Math.floor(r.y)>l?c+="M "+(r.x+a)+" "+o+" L "+p+" "+o+" L "+p+" "+r.y+" ":(c+="M "+(r.x+a)+" "+o+" L "+p+" "+o+" L "+p+" "+l+" ",u===e.visibleLabels.length-1&&(c+="M "+(r.x+a)+" "+l+" L "+p+" "+l+" "));break;case"WithoutTopandBottomBorder":o>r.y+r.height||l0&&this.chart.multiLevelLabelModule&&this.chart.multiLevelLabelModule.renderYAxisMultiLevelLabels(e,t,i,r)},e.prototype.drawYAxisTitle=function(e,t,r,o){if(e.title){var n=this.chart,a=e.opposedPosition?90:-90,s=("Inside"===e.tickPosition?0:e.majorTickLines.height+e.titlePadding)+("Inside"===e.labelPosition?0:e.maxLabelSize.width+e.multiLevelLabelHeight+this.padding);s=e.opposedPosition?s+e.scrollBarHeight:-s-e.scrollBarHeight;var l=o.x+s,h=o.y+.5*o.height,c=e.titleSize.height*(e.titleCollection.length-1),d=new i.TextOption(n.element.id+"_AxisTitle_"+t,l,h-e.labelPadding-c,"middle",e.titleCollection,"rotate("+a+","+l+","+h+")",null,a),p=Ve(n.renderer,d,e.titleStyle,e.titleStyle.color||n.themeStyle.axisTitle,r,null,null,null,null,null,null,null,null,n.enableCanvas);p.setAttribute("tabindex",e.tabIndex.toString()),p.setAttribute("aria-label",e.description||e.title)}},e.prototype.drawXAxisGridLine=function(e,i,r,o){var n,a,s="Logarithmic"===e.valueType,l=e.valueType.indexOf("Category")>-1,h=0,c="",d="",p=e.opposedPosition?-e.majorTickLines.height:e.majorTickLines.height,u=e.opposedPosition?.5*-e.lineStyle.width:.5*e.lineStyle.width,g=t.isNullOrUndefined(e.crossesAt)?e.opposedPosition?-e.scrollBarHeight:e.scrollBarHeight:0,y=e.valueType.indexOf("Category")>-1&&"BetweenTicks"===e.labelPlacement?.5:0,m=e.visibleLabels.length,v="Inside"===e.tickPosition,f=v?o.y-p-u:o.y+p+u+g,x=this.chart.themeStyle;e.valueType.indexOf("Category")>-1&&m>0&&"BetweenTicks"===e.labelPlacement&&(m+=1);for(var w=0;w=o.x&&o.x+o.width>=h&&((b(n,e.visibleRange)||this.isBorder(e,w,h))&&(c="M "+h+" "+(this.seriesClipRect.y+this.seriesClipRect.height)+" L "+h+" "+this.seriesClipRect.y,this.renderGridLine(e,i,c,e.majorGridLines,"_MajorGridLine_",w,this.element,x.majorGridLine,e.majorGridLines.dashArray)),d="M "+h+" "+(o.y+u+(v?g:0))+" L "+h+" "+f,this.renderGridLine(e,i,d,e.majorTickLines,"_MajorTickLine_",w,r,x.majorTickLine),e.minorTicksPerInterval>0&&(e.minorGridLines.width>0||e.minorTickLines.width>0)&&(0!==w||!ie(e)||s||l||this.renderMinorGridOnZooming(e,n,o,w,i,x,r),a=this.drawAxisMinorLine(e,n,o,w),this.renderGridLine(e,i,a[0],e.minorGridLines,"_MinorGridLine_",w,this.element,x.minorGridLine,e.minorGridLines.dashArray),this.renderGridLine(e,i,a[1],e.minorTickLines,"_MinorTickLine_",w,r,x.minorTickLine),w===m-1&&ie(e)&&s&&!l&&this.renderMinorGridOnZooming(e,n+e.visibleRange.interval,o,w,i,x,r)))},e.prototype.renderMinorGridOnZooming=function(e,t,i,r,o,n,a){var s=this.drawAxisMinorLine(e,t,i,r,!0);this.renderGridLine(e,o,s[0],e.minorGridLines,"_MinorGridLine_",-1,this.element,n.minorGridLine,e.minorGridLines.dashArray),this.renderGridLine(e,o,s[1],e.minorTickLines,"_MinorTickLine_",-1,a,n.minorTickLine)},e.prototype.drawAxisMinorLine=function(e,t,i,r,o){var n,a=t,s=0,l=0,h=e.visibleRange,c="Inside"===e.tickPosition,d=[],p=e.opposedPosition?-e.minorTickLines.height:e.minorTickLines.height,u=1,g=1,y=c?i.y-p:i.y+p,m=c?i.x+p:i.x-p,v="",f="";if("Logarithmic"===e.valueType&&(g=(n=Math.pow(e.logBase,a-h.interval))+(u=(Math.pow(e.logBase,a)-n)/(e.minorTicksPerInterval+1))),"Horizontal"===e.orientation)for(x=0;x0)?e.scrollBarHeight:0,E=[],I=!1;P+=90===L||270===L||-90===L||-270===L?w?5:-5:0;for(var D=!S&&!w||S&&w,B=D?360>=L&&L>=180||-1>=L&&L>=-180:1<=L&&L<=180||-181>=L&&L>=-360,N=0,F=_;Np?p:d,a=s.height/4,v-=y||0!==L?0:A/2,0!==L&&(v-=y?"Left"===e.lineBreakAlignment?g.breakLabelSize.width/2:"Right"===e.lineBreakAlignment?-g.breakLabelSize.width/2:0:-90===L||270===L?-a:90===L||-270===L?a:0),"Far"===e.labelStyle.textAlignment?v=v+A-10:"Near"===e.labelStyle.textAlignment?v=v-A+10:"Center"===e.labelStyle.textAlignment&&(v=v),y&&"Center"!==e.lineBreakAlignment&&0===L&&(v+="Left"===e.lineBreakAlignment?-A/2:A/2);var V=y?R?s.height:g.breakLabelSize.width/2:0;if(P=y?C+b+.5*e.lineStyle.width:P,w&&L?f=y?S?n.y+P+V:n.y-P-V:S?n.y+P+a:n.y-P-a:(l=y?D?P+O+(L?V:3*a):-(P+O+V):D?P+O+(L?1:3)*a:-(P+O+(L?a:g.index>1?2*a:0)),f=n.y+l*g.index),h=y?this.getAnchor(e):m.isRtlEnabled||B?"end":"",c=new i.TextOption(m.element.id+r+"_AxisLabel_"+N,v,f,h),e.edgeLabelPlacement&&0===L)switch(e.edgeLabelPlacement){case"None":break;case"Hide":if((0===N||e.isInversed&&N===F-1)&&c.xn.x+n.width)continue;break;case"Shift":(0===N||e.isInversed&&N===F-1)&&c.xn.x+n.width&&(s.width>p&&"Trim"===e.labelIntersectAction?p-=c.x+A-(n.x+n.width):p=A,c.x=v=n.x+n.width-p)}c.text=this.getLabelText(g,e,p);var j=void 0,H=void 0;if(y&&0===L?"Right"===e.lineBreakAlignment?(j=c.x-A,H=c.x):"Center"===e.lineBreakAlignment?(j=c.x-A/2,H=c.x+A/2):(j=c.x,H=c.x+A):(j=c.x,H=c.x+A),0!==L||"Hide"!==e.labelIntersectAction||0===N||!(e.isInversed?H>=M:j<=M)){if(M=y?"Right"===e.lineBreakAlignment?e.isInversed?c.x-A:c.x:"Center"===e.lineBreakAlignment?e.isInversed?c.x-A/2:c.x+A/2:e.isInversed?c.x:c.x+A:e.isInversed?c.x:c.x+A,0!==L){var X=void 0,Y=void 0;if(y){var G=0,W=0;X=g.breakLabelSize.height,W=g.breakLabelSize.height-4,"Center"===e.lineBreakAlignment?G=-g.breakLabelSize.width/2:"Right"===e.lineBreakAlignment&&(G=-g.breakLabelSize.width),D&&(W=g.breakLabelSize.height/(c.text.length+1)),Y=new i.Rect(c.x+G,c.y-W,g.breakLabelSize.width,X)}else X=f-(c.y-(g.size.height/2+10)),Y=new i.Rect(c.x,c.y-(g.size.height/2-5),g.size.width,X);var U=this.getRectanglePoints(Y),Z=y?Y.x+Y.width/2:v,q=y?Y.y+Y.height/2:f-X/2;c.transform=y?"rotate("+L+","+Z+","+q+")":"rotate("+L+","+v+","+f+")",E.push(T(U,Z,q,L)),I=!1;for(var Q=N;Q>0;Q--)if(E[N]&&E[Q-1]&&k(E[N],E[Q-1])){I=!0,E[N]=null;break}}Ve(m.renderer,c,g.labelStyle,g.labelStyle.color||m.themeStyle.axisLabel,x,e.opposedPosition!==("Inside"===e.labelPosition),m.redraw,!0,null,null,null,g.size,I,m.enableCanvas)}}this.chart.enableCanvas||(m.delayRedraw?e.visible&&e.internalVisibility&&this.createZoomingLabel(this.chart,x,e,r,n):o.appendChild(x))},e.prototype.getAnchor=function(e){return"Center"===e.lineBreakAlignment?"middle":"Left"===e.lineBreakAlignment?"start":"end"},e.prototype.getRectanglePoints=function(e){return[new Vi(e.x,e.y),new Vi(e.x+e.width,e.y),new Vi(e.x+e.width,e.y+e.height),new Vi(e.x,e.y+e.height)]},e.prototype.getLabelText=function(e,t,i){if(u(e.originalText)){for(var r=[],o=void 0,n=0;n0){for(var o="Outside"===e.labelPosition?e.scrollBarHeight:0,n=void 0,a=r.y+(e.opposedPosition?-1:1)*o,s=void 0,l=r.width/e.visibleRange.delta*("DateTime"===e.valueType?e.dateTimeInterval:e.visibleRange.interval),h=void 0,c=e.maxLabelSize.height+(e.tickPosition===e.labelPosition?e.majorTickLines.height:0),d="",p="Category"===e.valueType&&"BetweenTicks"===e.labelPlacement?-.5:0,u=e.opposedPosition&&"Inside"===e.labelPosition||!e.opposedPosition&&"Outside"===e.labelPosition?r.y+c+10+o:r.y-c-10-o,g=0,y=e.visibleLabels.length;gr.width+r.x&&1!==e.visibleLabels.length?d+="M "+n+" "+a+" L "+n+" "+u+" L "+(r.width+r.x)+" "+u+" ":(d+="M "+n+" "+a+" L "+n+" "+u+" L "+h+" "+u+" ",0===g&&(d+="M "+n+" "+a+" L "+n+" "+u+" M "+n+" "+u+" L "+r.x+" "+u),g===e.visibleLabels.length-1&&(d+="M "+h+" "+a+" L "+h+" "+u+" M "+h+" "+u+" L "+(r.width+r.x)+" "+u));break;case"WithoutTopandBottomBorder":nr.width+r.x||(d+="M "+n+" "+a+" L "+n+" "+u+" M "+h+" "+a+" L "+h+" "+u)}""!==(d+="Rectangle"===e.border.type?"M "+r.x+" "+a+"L "+(r.x+r.width)+" "+a:"")&&this.createAxisBorderElement(e,t,d,i)}this.chart.multiLevelLabelModule&&e.multiLevelLabels.length>0&&this.chart.multiLevelLabelModule.renderXAxisMultiLevelLabels(e,t,i,r)},e.prototype.createAxisBorderElement=function(e,t,r,o){var n=he(this.chart.element.id+"_BorderLine_"+t),a=n?n.getAttribute("d"):"",s=this.chart.renderer.drawPath(new i.PathOption(this.chart.element.id+"_BorderLine_"+t,"transparent",e.border.width,e.border.color||this.chart.themeStyle.axisLine,1,"",r));s.setAttribute("style","pointer-events: none"),be(this.chart.enableCanvas,o,s,this.chart.redraw,!0,"x","y",null,a,!0)},e.prototype.findAxisLabel=function(e,t,i){return"Trim"===e.labelIntersectAction?e.angle%360!=0||e.enableTrim?t:Ie(i,t,e.labelStyle):t},e.prototype.drawXAxisTitle=function(e,r,o,n){if(e.title){var a=this.chart,s=i.measureText(e.title,e.titleStyle),l=t.isNullOrUndefined(e.crossesAt)?e.scrollBarHeight:0,h=("Inside"===e.tickPosition?0:e.majorTickLines.height+e.titlePadding)+("Inside"===e.labelPosition?0:e.maxLabelSize.height+e.multiLevelLabelHeight+e.labelPadding),c=e.titleSize.height*(e.titleCollection.length-1);h=e.opposedPosition?-(h+s.height/4+l+c):h+3*s.height/4+l;var d=new i.TextOption(a.element.id+"_AxisTitle_"+r,n.x+.5*n.width,n.y+h,"middle",e.titleCollection),p=Ve(a.renderer,d,e.titleStyle,e.titleStyle.color||a.themeStyle.axisTitle,o,null,null,null,null,null,null,null,null,a.enableCanvas);p.setAttribute("aria-label",e.description||e.title),p.setAttribute("tabindex",e.tabIndex.toString())}},e.prototype.renderGridLine=function(e,t,r,o,n,a,s,l,h){void 0===h&&(h=null);var c,d,p=this.chart;o.width>0&&e.visible&&e.internalVisibility&&r&&(c=(d=he(p.element.id+n+t+"_"+a))?d.getAttribute("d"):null,d=null,this.htmlObject=p.renderer.drawPath(new i.PathOption(p.element.id+n+t+"_"+a,"transparent",o.width,o.color||l,null,h,r)),be(p.enableCanvas,s,this.htmlObject,p.redraw,!0,"x","y",null,c,!0))},e.prototype.findParentNode=function(e,t,i){return document.getElementById(e+"AxisGroup"+i+"Inside").contains(document.getElementById(t.id))?document.getElementById(e+"AxisGroup"+i+"Inside"):document.getElementById(e+"AxisGroup"+i+"Outside")},e.prototype.createZoomingLabel=function(e,t,i,r,o){var n=this.findParentNode(e.element.id,t,r);t.setAttribute("opacity","0.3");var a=e.renderer.createGroup({id:e.element.id+"AxisLabels_Zoom"+r});a=V(e,i,a,r,"Vertical"===i.orientation,o),n.replaceChild(t,document.getElementById(t.id)),he(e.element.id+"AxisLabels_Zoom"+r)?n.replaceChild(a,document.getElementById(a.id)):n.appendChild(a)},e}(),Zi=function(){function e(e){this.currentPoints=[],this.previousPoints=[],this.insideRegion=!1,this.chart=e,this.lierIndex=0}return e.prototype.getData=function(){for(var e,t,i,r,o=this.chart,n=null,a=null,s=o.visibleSeries.length-1;s>=0;s--){if(a=o.visibleSeries[s],e="Scatter"===a.type||"Scatter"===a.drawType||a.marker.visible?(a.marker.height+5)/2:0,t="Scatter"===a.type||"Scatter"===a.drawType||a.marker.visible?(a.marker.width+5)/2:0,i=o.mouseX,r=o.mouseY,a.dragSettings.enable&&a.isRectSeries)if("Bar"===a.type&&o.isTransposed||!o.isTransposed&&"Bar"!==a.type){var l=a.marker.height/2;r=a.yAxis.isInversed?r-l:r+l}else{var h=a.marker.width/2;i=a.yAxis.isInversed?i+h:i-h}if(a.visible&&j(i,r,a.clipRect,e,t)&&(n=this.getRectPoint(a,a.clipRect,i,r)),n)return new Yi(n,a)}return new Yi(n,a)},e.prototype.isSelected=function(e){return(e.selectionMode.indexOf("Drag")>-1||e.selectionMode.indexOf("Lasso")>-1)&&e.selectionModule&&null!==e.selectionModule.rectPoints},e.prototype.getRectPoint=function(e,t,i,r){var o,n,a,s,l,h,c=0;if(this.chart.isScrolling)return null;for(var d=0,p=e.points;d-1&&(o=i-(e.clipRect.width/2+e.clipRect.x),n=r-(e.clipRect.height/2+e.clipRect.y),c=2*Math.PI*(u.regionData.currentXPosition<0?1+u.regionData.currentXPosition:u.regionData.currentXPosition),a=(Math.atan2(n,o)+.5*Math.PI-c)%(2*Math.PI),a=a<0?2*Math.PI+a:a,a+=2*Math.PI*e.chart.primaryXAxis.startAngle,s=u.regionData.startAngle,s-=c,s=s<0?2*Math.PI+s:s,l=u.regionData.endAngle,l-=c,l=l<0?2*Math.PI+l:l,h=Math.sqrt(Math.pow(Math.abs(o),2)+Math.pow(Math.abs(n),2)),a>=s&&a<=l&&(h>=u.regionData.innerRadius&&h<=u.regionData.radius||h<=u.regionData.innerRadius&&h>=u.regionData.radius)&&h<=e.chart.radius))return u;if((e.dragSettings.enable&&e.isRectSeries||e.isRectSeries&&e.marker.visible)&&this.isPointInThresholdRegion(i,r,u,t,e))return this.insideRegion=!0,u;if(!this.insideRegion&&this.checkRegionContainsPoint(u.regions,t,i,r))return u;if(this.insideRegion&&this.checkRegionContainsPoint(u.regions,t,i,r))return u}}return null},e.prototype.checkRegionContainsPoint=function(e,t,r,o){var n=this;return e.some(function(e,a){return n.lierIndex=a,j(r,o,new i.Rect(("Cartesian"===n.chart.chartAreaType?t.x:0)+e.x,("Cartesian"===n.chart.chartAreaType?t.y:0)+e.y,e.width,e.height))})},e.prototype.isPointInThresholdRegion=function(e,t,r,o,n){var a,s=this,l="Bar"===n.type,h=n.yAxis.isInversed,c=n.chart.isTransposed,d=0,p=0,u=a=20;return h&&c?l?(d=r.regions[0].height-10,a=r.regions[0].width):(p=-10,u=r.regions[0].height):h||r.yValue<0?l?(p=-10,u=r.regions[0].height):(d=r.regions[0].height-10,a=r.regions[0].width):c?l?(d=-10,a=r.regions[0].width):(p=r.regions[0].width-10,u=r.regions[0].height):l?(p=r.regions[0].width-10,u=r.regions[0].height):(d=-10,a=r.regions[0].width),r.regions.some(function(r){return j(e,t,new i.Rect(("Cartesian"===s.chart.chartAreaType?o.x:0)+r.x+p,("Cartesian"===s.chart.chartAreaType?o.y:0)+r.y+d,a,u))})},e.prototype.getClosest=function(e,t,i){var r,o,n=i||e.xData;if(t>=e.xAxis.visibleRange.min&&t<=e.xAxis.visibleRange.max)for(var a=0;a=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},$i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return qi(i,e),Qi([t.Property(!1)],i.prototype,"visible",void 0),Qi([t.Property(!0)],i.prototype,"showZero",void 0),Qi([t.Property(null)],i.prototype,"name",void 0),Qi([t.Property("transparent")],i.prototype,"fill",void 0),Qi([t.Property(1)],i.prototype,"opacity",void 0),Qi([t.Property(0)],i.prototype,"angle",void 0),Qi([t.Property(!1)],i.prototype,"enableRotation",void 0),Qi([t.Property("Auto")],i.prototype,"position",void 0),Qi([t.Property(5)],i.prototype,"rx",void 0),Qi([t.Property(5)],i.prototype,"ry",void 0),Qi([t.Property("Center")],i.prototype,"alignment",void 0),Qi([t.Complex({width:null,color:null},Yt)],i.prototype,"border",void 0),Qi([t.Complex({left:5,right:5,top:5,bottom:5},Ut)],i.prototype,"margin",void 0),Qi([t.Complex({size:"11px",color:"",fontStyle:"Normal",fontWeight:"Normal",fontFamily:"Segoe UI"},Xt)],i.prototype,"font",void 0),Qi([t.Property(null)],i.prototype,"template",void 0),Qi([t.Property("Hide")],i.prototype,"labelIntersectAction",void 0),i}(t.ChildProperty),Ji=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return qi(i,e),Qi([t.Property(!1)],i.prototype,"visible",void 0),Qi([t.Property("Circle")],i.prototype,"shape",void 0),Qi([t.Property("")],i.prototype,"imageUrl",void 0),Qi([t.Property(5)],i.prototype,"height",void 0),Qi([t.Property(5)],i.prototype,"width",void 0),Qi([t.Complex({width:2,color:null},Yt)],i.prototype,"border",void 0),Qi([t.Complex({x:0,y:0},Gt)],i.prototype,"offset",void 0),Qi([t.Property(null)],i.prototype,"fill",void 0),Qi([t.Property(1)],i.prototype,"opacity",void 0),Qi([t.Complex({},$i)],i.prototype,"dataLabel",void 0),i}(t.ChildProperty),Ki=function(){function e(){this.symbolLocations=null,this.regions=null,this.percentage=null,this.regionData=null,this.isSelect=!1,this.marker={visible:!1},this.isPointInRange=!0}return e}(),er=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.clipRect=new i.Rect(0,0,0,0),t}return qi(r,e),r.prototype.setDataSource=function(e,t){e&&(this.points=e.points),t.trendLineModule.initDataSource(this),t.visibleSeriesCount++},Qi([t.Property("")],r.prototype,"name",void 0),Qi([t.Property("0")],r.prototype,"dashArray",void 0),Qi([t.Property(!0)],r.prototype,"visible",void 0),Qi([t.Property("Linear")],r.prototype,"type",void 0),Qi([t.Property(2)],r.prototype,"period",void 0),Qi([t.Property(2)],r.prototype,"polynomialOrder",void 0),Qi([t.Property(0)],r.prototype,"backwardForecast",void 0),Qi([t.Property(0)],r.prototype,"forwardForecast",void 0),Qi([t.Complex({},qt)],r.prototype,"animation",void 0),Qi([t.Complex({},Ji)],r.prototype,"marker",void 0),Qi([t.Property(!0)],r.prototype,"enableTooltip",void 0),Qi([t.Property(null)],r.prototype,"intercept",void 0),Qi([t.Property("")],r.prototype,"fill",void 0),Qi([t.Property(1)],r.prototype,"width",void 0),Qi([t.Property("SeriesType")],r.prototype,"legendShape",void 0),r}(t.ChildProperty),tr=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return qi(i,e),Qi([t.Property(1)],i.prototype,"width",void 0),Qi([t.Property(10)],i.prototype,"length",void 0),Qi([t.Property(null)],i.prototype,"color",void 0),Qi([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),ir=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return qi(i,e),Qi([t.Property(null)],i.prototype,"value",void 0),Qi([t.Property(null)],i.prototype,"color",void 0),Qi([t.Property("0")],i.prototype,"dashArray",void 0),i}(t.ChildProperty),rr=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return qi(i,e),Qi([t.Property(!1)],i.prototype,"visible",void 0),Qi([t.Property("Fixed")],i.prototype,"type",void 0),Qi([t.Property("Both")],i.prototype,"direction",void 0),Qi([t.Property("Vertical")],i.prototype,"mode",void 0),Qi([t.Property(null)],i.prototype,"color",void 0),Qi([t.Property(1)],i.prototype,"verticalError",void 0),Qi([t.Property(1)],i.prototype,"width",void 0),Qi([t.Property(1)],i.prototype,"horizontalError",void 0),Qi([t.Property(3)],i.prototype,"verticalPositiveError",void 0),Qi([t.Property(3)],i.prototype,"verticalNegativeError",void 0),Qi([t.Property(1)],i.prototype,"horizontalPositiveError",void 0),Qi([t.Property(1)],i.prototype,"horizontalNegativeError",void 0),Qi([t.Complex(null,tr)],i.prototype,"errorBarCap",void 0),i}(t.ChildProperty),or=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.currentViewData=[],t.clipRect=new i.Rect(0,0,0,0),t.seriesType="XY",t.isRectTypeSeries=!1,t}return qi(o,e),o.prototype.processJsonData=function(){var e=0,i=new Ki,o=this instanceof nr&&"Histogram"===this.type?"x":this.xName,n=this instanceof nr&&this.marker.dataLabel.name?this.marker.dataLabel.name:"";this instanceof nr&&("Waterfall"!==this.type&&"Histogram"!==this.type||(this.currentViewData=this.chart[G(this.type)+"SeriesModule"].processInternalData(t.extend([],this.currentViewData,null,!0),this)),"Pareto"===this.category&&(this.currentViewData=p(t.extend([],this.currentViewData,null,!0),[this.yName],!0),"Line"===this.type&&(this.currentViewData=this.chart.paretoSeriesModule.performCumulativeCalculation(this.currentViewData,this))),this.isRectTypeSeries=this.type.indexOf("Column")>-1||this.type.indexOf("Bar")>-1||this.type.indexOf("Histogram")>-1);var a=Object.keys(this.currentViewData).length;if(this.points=[],this.xMin=1/0,this.xMax=-1/0,this.yMin=1/0,this.yMax=-1/0,this.sizeMax=-1/0,this.getSeriesType(),"Category"===this.xAxis.valueType)for(;e-1)for(var s={skeleton:"full",type:"dateTime"},l=this.chart.intl.getDateParser(s),h=this.chart.intl.getDateFormat(s);e-1||this.drawType.indexOf("Spline")>-1&&"PolarRadar"===this.chart.chartAreaType){var c=this.type.indexOf("Area")>-1||this.drawType.indexOf("Area")>-1;this.chart["spline"+(c?"Area":"")+"SeriesModule"].findSplinePoint(this)}else this.type.indexOf("Histogram")>-1&&(this.xAxis.maximum||this.xAxis.minimum)&&this.chart.histogramSeriesModule.calculateBinValues(this)},o.prototype.pushData=function(e,t){e.index=t,e.yValue=e.y,this.xMin=Math.min(this.xMin,e.xValue),this.xMax=Math.max(this.xMax,e.xValue),this.xData.push(e.xValue)},o.prototype.dataPoint=function(e,i,r){this.points[e]=new Ki;var o=this.points[e],n=this.currentViewData,a=this.enableComplexProperty?t.getValue:this.getObjectValue;return o.x=a(r,n[e]),o.high=a(this.high,n[e]),o.low=a(this.low,n[e]),o.open=a(this.open,n[e]),o.close=a(this.close,n[e]),o.volume=a(this.volume,n[e]),o.interior=a(this.pointColorMapping,n[e]),this instanceof nr&&(o.y=a(this.yName,n[e]),o.size=a(this.size,n[e]),o.text=a(i,n[e]),o.tooltip=a(this.tooltipMappingName,n[e]),this.chart.rangeColorSettings&&this.chart.rangeColorSettings.length>0&&this.isAdvancedColorSupported()&&(this.colorName&&this.colorName.length>0?o.colorValue=a(this.colorName,n[e]):o.colorValue=a(this.yName,n[e]),o.interior=this.getPointFillColor(o.interior,o.colorValue))),o},o.prototype.isAdvancedColorSupported=function(){return 1===this.chart.visibleSeries.length&&("Column"===this.chart.series[0].type||"Bar"===this.chart.series[0].type||"Scatter"===this.chart.series[0].type||"Bubble"===this.chart.series[0].type)},o.prototype.getPointFillColor=function(e,t){var i=e;if(t&&this.chart.rangeColorSettings&&this.chart.rangeColorSettings.length>0)for(var r=0,o=this.chart.rangeColorSettings;r=n.start&&t<=n.end&&(i=n.colors.length>1?Ze(n,t):n.colors[0])}return i},o.prototype.getObjectValue=function(e,t){return t[e]},o.prototype.setEmptyPoint=function(e,i){if(!this.findVisibility(e))return e.visible=!0,null;switch(e.isEmpty=!0,this instanceof nr&&e.isPointInRange?this.emptyPointSettings.mode:"Drop"){case"Zero":e.visible=!0,this instanceof nr&&this.seriesType.indexOf("HighLow")>-1?(e.high=e.low=0,this.seriesType.indexOf("HighLowOpenClose")>-1&&(e.open=e.close=0)):e.y=e.yValue=this.yData[i]=0;break;case"Average":this instanceof nr&&(this.seriesType.indexOf("HighLow")>-1?(e.high=t.isNullOrUndefined(e.high)||isNaN(+e.high)?this.getAverage(this.high,i):e.high,e.low=t.isNullOrUndefined(e.low)||isNaN(+e.low)?this.getAverage(this.low,i):e.low,this.seriesType.indexOf("HighLowOpenClose")>-1&&(e.open=t.isNullOrUndefined(e.open)||isNaN(+e.open)?this.getAverage(this.open,i):e.open,e.close=t.isNullOrUndefined(e.close)||isNaN(+e.close)?this.getAverage(this.close,i):e.close)):e.y=e.yValue=this.yData[i]=this.getAverage(this.yName,i)),e.visible=!0;break;case"Drop":case"Gap":this.yData[i]=null,e.visible=!1}},o.prototype.findVisibility=function(e){var i,r=this instanceof nr?this.seriesType:"HighLowOpenClose",o=this.yAxis.minimum,n=this.yAxis.maximum;switch(r){case"XY":return"PolarRadar"===this.chart.chartAreaType&&(!t.isNullOrUndefined(o)&&e.yValuen)?(e.isPointInRange=!1,!0):(this.setXYMinMax(e.yValue),this.yData.push(e.yValue),this instanceof nr&&"Bubble"===this.type&&(this.sizeMax=Math.max(this.sizeMax,t.isNullOrUndefined(e.size)||isNaN(+e.size)?this.sizeMax:e.size)),t.isNullOrUndefined(e.x)||t.isNullOrUndefined(e.y)||isNaN(+e.y));case"HighLow":return this.setHiloMinMax(e.high,e.low),t.isNullOrUndefined(e.x)||t.isNullOrUndefined(e.low)||isNaN(+e.low)||t.isNullOrUndefined(e.high)||isNaN(+e.high);case"HighLowOpenClose":return this.setHiloMinMax(e.high,e.low),t.isNullOrUndefined(e.x)||t.isNullOrUndefined(e.low)||isNaN(+e.low)||t.isNullOrUndefined(e.open)||isNaN(+e.open)||t.isNullOrUndefined(e.close)||isNaN(+e.close)||t.isNullOrUndefined(e.high)||isNaN(+e.high);case"BoxPlot":return i=(e.y||[null]).filter(function(e){return!t.isNullOrUndefined(e)&&!isNaN(e)}).sort(function(e,t){return e-t}),e.y=i,this.yMin=Math.min(this.yMin,Math.min.apply(Math,i)),this.yMax=Math.max(this.yMax,Math.max.apply(Math,i)),!i.length}},o.prototype.setXYMinMax=function(e){var i,r="Logarithmic"===this.yAxis.valueType||"Logarithmic"===this.xAxis.valueType,o=e<0;i=this.isRectTypeSeries&&!te(this.yAxis)?r?e:o?e:0:e,this.yMin=r?Math.min(this.yMin,t.isNullOrUndefined(i)||isNaN(i)||0===i?this.yMin:i):Math.min(this.yMin,t.isNullOrUndefined(i)||isNaN(i)?this.yMin:i),this.yMax=Math.max(this.yMax,t.isNullOrUndefined(e)||isNaN(e)?this.yMax:e)},o.prototype.setHiloMinMax=function(e,i){this.yMin=Math.min(this.yMin,Math.min(t.isNullOrUndefined(i)||isNaN(i)?this.yMin:i,t.isNullOrUndefined(e)||isNaN(e)?this.yMin:e)),this.yMax=Math.max(this.yMax,Math.max(t.isNullOrUndefined(i)||isNaN(i)?this.yMax:i,t.isNullOrUndefined(e)||isNaN(e)?this.yMax:e))},o.prototype.getSeriesType=function(){var e;if(this instanceof nr){var t="PolarRadar"===this.chart.chartAreaType?this.drawType:this.type;if(t)switch(t){case"RangeColumn":case"RangeArea":case"Hilo":e="HighLow";break;case"HiloOpenClose":case"Candle":e="HighLowOpenClose";break;case"BoxAndWhisker":e="BoxPlot";break;default:e="XY"}}this.seriesType=e},o.prototype.pushCategoryData=function(e,t,i){if(!this.chart.tooltip.shared&&!this.visible)return null;this.xAxis.isIndexed?(this.xAxis.labels[t]?this.xAxis.labels[t]+=", "+i:this.xAxis.labels.push(i),e.xValue=t):(this.xAxis.labels.indexOf(i)<0&&this.xAxis.labels.push(i),e.xValue=this.xAxis.labels.indexOf(i))},o.prototype.getAverage=function(e,t,i){return void 0===i&&(i=this.currentViewData),((i[t-1]?i[t-1][e]||0:0)+(i[t+1]?i[t+1][e]||0:0))/2},o.prototype.refreshDataManager=function(e){var i=this;this.chart=e;var o;if(!((o=e.isAngular?Object.keys(this.dataSource).length?this.dataSource:e.dataSource:this.dataSource||e.dataSource)instanceof r.DataManager)&&t.isNullOrUndefined(this.query))return void this.dataManagerSuccess({result:o,count:o.length},!1);this.dataModule.getData(this.dataModule.generateQuery().requiresCount()).then(function(e){return i.dataManagerSuccess(e)})},o.prototype.dataManagerSuccess=function(e,t){if(void 0===t&&(t=!0),this.currentViewData=e.count?e.result:[],this.chart.allowServerDataBinding=!1,this instanceof nr){this.chart.stockChart&&(this.chart.stockChart.series[this.index].localData=this.currentViewData);var i={name:"seriesRender",series:this,data:this.currentViewData,fill:this.interior};this.chart.trigger("seriesRender",i),this.interior=i.fill,this.currentViewData=i.data}!this.chart.stockChart||this instanceof nr||(this.currentViewData=this.chart.stockChart.findCurrentData(this.chart.stockChart.series[0].localData,this.chart.stockChart.series[0].xName)),this.processJsonData(),this.recordsCount=e.count,this.refreshChart(t),this.currentViewData=null},o.prototype.refreshChart=function(e){var t=this.chart;if(this instanceof nr&&(t.visibleSeriesCount+=e?1:0),t.refreshTechnicalIndicator(this),this instanceof nr&&"TrendLine"!==this.category)for(var i=0,r=this.trendlines;i=0?(n=l[o][u[f].xValue],l[o][u[f].xValue]+=a):(n=h[o][u[f].xValue],h[o][u[f].xValue]+=a),i.push(n),r.push(a+n),t&&r[f]>100&&(r[f]=100);v.stackedValues=new Ii(i,r);var x="Logarithmic"===v.yAxis.valueType,w=-1!==v.type.indexOf("Column")||-1!==v.type.indexOf("Bar");v.yMin=x&&w&&v.yMin<1?v.yMin:Math.min.apply(0,i),v.yMax=Math.max.apply(0,r),v.yMin>Math.min.apply(0,r)&&(v.yMin=t?-100:x&&w&&v.yMin<1?v.yMin:Math.min.apply(0,r)),v.yMax0?i[t][r[s].xValue]+=a.yData[s]:i[t][r[s].xValue]-=a.yData[s]}}return i},i.prototype.renderSeries=function(e){var t=G(this.type);e[(t=t.replace("100",""))+"SeriesModule"]&&("Indicator"!==this.category&&"TrendLine"!==this.category&&this.createSeriesElements(e),this.visiblePoints=g(this),e[t+"SeriesModule"].render(this,this.xAxis,this.yAxis,e.requireInvertedAxis),"Indicator"!==this.category&&(this.errorBar.visible&&this.chart.errorBarModule.render(this),this.marker.dataLabel.visible&&e.dataLabelModule.render(this,this.chart,this.marker.dataLabel),this.appendSeriesElement(e.seriesElements,e)),this.chart.enableCanvas||this.performAnimation(e,t,this.errorBar,this.marker,this.marker.dataLabel))},i.prototype.createSeriesElements=function(e){if("Indicator"!==this.category){var t=e.element.id,i=this.marker.border.width+8+5,r="Scatter"===this.type||"Bubble"===this.type?e.svgRenderer:e.renderer,o=void 0===this.index?this.category:this.index,n=void 0,a=void 0,s=void 0;if("Scatter"===this.type?(n=e.primaryYAxis.maximum||e.primaryXAxis.maximum?0:(this.marker.height+i)/2,a=e.primaryYAxis.maximum||e.primaryXAxis.maximum?0:(this.marker.width+i)/2):(n=0,a=0),"PolarRadar"===e.chartAreaType){var l="Scatter"===this.drawType?Math.max(this.marker.width,this.marker.height):0;s=new Ni(t+"_ChartSeriesClipRect_"+o,"transparent",{width:1,color:"Gray"},1,this.clipRect.width/2+this.clipRect.x,this.clipRect.height/2+this.clipRect.y,e.radius+l),this.clipRectElement=K(e.redraw,s,r,"drawCircularClipPath")}else s=new Di(t+"_ChartSeriesClipRect_"+o,"transparent",{width:1,color:"Gray"},1,{x:-a,y:-n,width:this.clipRect.width+2*a,height:this.clipRect.height+2*n}),this.clipRectElement=K(e.redraw,s,r);var h="Cartesian"===e.chartAreaType?"translate("+this.clipRect.x+","+this.clipRect.y+")":"";this.symbolElement=null,this.seriesElement=r.createGroup({id:t+"SeriesGroup"+o,transform:h,"clip-path":"url(#"+t+"_ChartSeriesClipRect_"+o+")"}),this.chart.enableCanvas&&"Scatter"!==this.type&&"Bubble"!==this.type||this.seriesElement.appendChild(this.clipRectElement)}},i.prototype.appendSeriesElement=function(e,t){var i=this.marker,r=i.dataLabel,o=t.redraw;"TrendLine"!==this.category&&(be(t.enableCanvas,t.seriesElements,this.seriesElement,o),this.errorBar.visible&&("PolarRadar"===t.chartAreaType?be(t.enableCanvas,t.seriesElements,this.seriesElement,o):be(t.enableCanvas,t.seriesElements,this.errorBarElement,o)),"Scatter"!==this.type&&"Bubble"!==this.type||be(!1,t.seriesElements,this.seriesElement,o)),i.visible&&("Cartesian"===t.chartAreaType||"Scatter"!==this.drawType&&"PolarRadar"===t.chartAreaType)&&"Scatter"!==this.type&&"Bubble"!==this.type&&"Candle"!==this.type&&"Hilo"!==this.type&&"HiloOpenClose"!==this.type&&this.symbolElement&&be(t.enableCanvas,t.seriesElements,this.symbolElement,o),r.visible&&this.textElement&&(be(t.enableCanvas,t.dataLabelElements,this.shapeElement,o),be(t.enableCanvas,t.dataLabelElements,this.textElement,o)),!t.enableCanvas&&t.dataLabelElements.hasChildNodes()&&t.seriesElements.appendChild(t.dataLabelElements)},i.prototype.performAnimation=function(e,i,r,o,n){this.animation.enable&&e.animateSeries&&(e[i+"SeriesModule"].doAnimation(this),r.visible&&e.errorBarModule.doErrorBarAnimation(this),o.visible&&e.markerRender.doMarkerAnimation(this),n.visible&&"edge"!==t.Browser.info.name&&!t.Browser.isIE&&e.dataLabelModule.doDataLabelAnimation(this))},i.prototype.setPointColor=function(e,t){return t=e.interior||t,e.isEmpty?this.emptyPointSettings.fill||t:t},i.prototype.setBorderColor=function(e,t){return t.width=e.isEmpty?this.emptyPointSettings.border.width||t.width:t.width,t.color=e.isEmpty?this.emptyPointSettings.border.color||t.color:t.color,t},Qi([t.Property("")],i.prototype,"name",void 0),Qi([t.Property("")],i.prototype,"yName",void 0),Qi([t.Property("Line")],i.prototype,"drawType",void 0),Qi([t.Property(!0)],i.prototype,"isClosed",void 0),Qi([t.Property("#2ecd71")],i.prototype,"bearFillColor",void 0),Qi([t.Property("#e74c3d")],i.prototype,"bullFillColor",void 0),Qi([t.Property(!1)],i.prototype,"enableSolidCandles",void 0),Qi([t.Property("")],i.prototype,"size",void 0),Qi([t.Property(null)],i.prototype,"binInterval",void 0),Qi([t.Property(!1)],i.prototype,"showNormalDistribution",void 0),Qi([t.Property("")],i.prototype,"stackingGroup",void 0),Qi([t.Complex({color:"transparent",width:0},Yt)],i.prototype,"border",void 0),Qi([t.Property(1)],i.prototype,"opacity",void 0),Qi([t.Property(0)],i.prototype,"zOrder",void 0),Qi([t.Property("Line")],i.prototype,"type",void 0),Qi([t.Complex(null,rr)],i.prototype,"errorBar",void 0),Qi([t.Complex(null,Ji)],i.prototype,"marker",void 0),Qi([t.Complex({},ei)],i.prototype,"dragSettings",void 0),Qi([t.Collection([],er)],i.prototype,"trendlines",void 0),Qi([t.Property(!0)],i.prototype,"enableTooltip",void 0),Qi([t.Property("")],i.prototype,"tooltipFormat",void 0),Qi([t.Property("")],i.prototype,"tooltipMappingName",void 0),Qi([t.Property("SeriesType")],i.prototype,"legendShape",void 0),Qi([t.Property("")],i.prototype,"legendImageUrl",void 0),Qi([t.Property(null)],i.prototype,"selectionStyle",void 0),Qi([t.Property(null)],i.prototype,"unSelectedStyle",void 0),Qi([t.Property(null)],i.prototype,"nonHighlightStyle",void 0),Qi([t.Property(1)],i.prototype,"minRadius",void 0),Qi([t.Property(3)],i.prototype,"maxRadius",void 0),Qi([t.Property("Natural")],i.prototype,"splineType",void 0),Qi([t.Property(.5)],i.prototype,"cardinalSplineTension",void 0),Qi([t.Complex(null,Kt)],i.prototype,"emptyPointSettings",void 0),Qi([t.Property(!0)],i.prototype,"showMean",void 0),Qi([t.Property("Normal")],i.prototype,"boxPlotMode",void 0),Qi([t.Property(null)],i.prototype,"columnWidth",void 0),Qi([t.Property(0)],i.prototype,"columnSpacing",void 0),Qi([t.Property("#C64E4A")],i.prototype,"negativeFillColor",void 0),Qi([t.Property("#4E81BC")],i.prototype,"summaryFillColor",void 0),Qi([t.Property()],i.prototype,"intermediateSumIndexes",void 0),Qi([t.Property()],i.prototype,"sumIndexes",void 0),Qi([t.Complex({color:"black",width:2},Ht)],i.prototype,"connector",void 0),Qi([t.Complex(null,$t)],i.prototype,"cornerRadius",void 0),i}(or),ar=function(){function e(e,t){this.initDataManager(e,t)}return e.prototype.initDataManager=function(e,t){this.dataManager=e instanceof r.DataManager?e:new r.DataManager(e),this.query=t instanceof r.Query?t:new r.Query},e.prototype.generateQuery=function(){return this.query.clone()},e.prototype.getData=function(e){var t=this;if(this.dataManager.ready){var i=new r.Deferred;return this.dataManager.ready.then(function(){t.dataManager.executeQuery(e).then(function(e){i.resolve(e)})}).catch(function(e){i.reject(e)}),i.promise}return this.dataManager.executeQuery(e)},e}(),sr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lr=function(e){function r(t){var i=e.call(this,t)||this;return i.elementId=t.element.id,i}return sr(r,e),r.prototype.addEventListener=function(){this.chart.isDestroyed||(this.chart.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.chart.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},r.prototype.removeEventListener=function(){this.chart.isDestroyed||(this.chart.off(t.Browser.touchMoveEvent,this.mouseMoveHandler),this.chart.off(t.Browser.touchEndEvent,this.mouseUpHandler))},r.prototype.mouseUpHandler=function(){var e=this.chart;!e.isTouch||e.crosshair.enable||this.isSelected(e)||this.markerMove(!0)},r.prototype.mouseMoveHandler=function(){var e=this.chart;e.crosshair.enable&&!e.tooltip.enable||e.isTouch&&!e.startMove||this.isSelected(e)||this.markerMove(!1)},r.prototype.markerMove=function(e){var i=this,r=this.chart;this.currentPoints=[];var o,n,a,s;if(r.tooltip.shared&&r.tooltip.enable){if(!j(r.mouseX,r.mouseY,r.chartAxisLayoutPanel.seriesClipRect))return null;if(r.tooltip.enable)for(var l="PolarRadar"===r.chartAreaType?this.getData():null,h=this.mergeXvalues(this.chart.visibleSeries),c=0,d=r.visibleSeries;c3&&n.lierIndex!==this.lierIndex)&&this.currentPoints.push(o),o.point&&a&&r.isPointMouseDown&&this.currentPoints.push(o);var u=this.previousPoints.length;if(this.currentPoints.length>0&&(0===u||r.isPointMouseDown||u>0&&this.previousPoints[0].point!==this.currentPoints[0].point)){this.previousPoints.length>0&&this.removeHighlightedMarker();for(var g=this,y=0,m=this.currentPoints;y=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},ur=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return dr(i,e),pr([t.Property(0)],i.prototype,"x",void 0),pr([t.Property(0)],i.prototype,"y",void 0),i}(t.ChildProperty),gr=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return dr(r,i),pr([t.Property(!0)],r.prototype,"visible",void 0),pr([t.Property(null)],r.prototype,"height",void 0),pr([t.Property(null)],r.prototype,"width",void 0),pr([t.Complex({x:0,y:0},ur)],r.prototype,"location",void 0),pr([t.Property("Auto")],r.prototype,"position",void 0),pr([t.Property("Series")],r.prototype,"mode",void 0),pr([t.Property(8)],r.prototype,"padding",void 0),pr([t.Property("Center")],r.prototype,"alignment",void 0),pr([t.Complex(e.Theme.legendLabelFont,Xt)],r.prototype,"textStyle",void 0),pr([t.Property(10)],r.prototype,"shapeHeight",void 0),pr([t.Property(10)],r.prototype,"shapeWidth",void 0),pr([t.Complex({},Yt)],r.prototype,"border",void 0),pr([t.Complex({left:0,right:0,top:0,bottom:0},Ut)],r.prototype,"margin",void 0),pr([t.Complex({left:0,right:0,top:0,bottom:0},Zt)],r.prototype,"containerPadding",void 0),pr([t.Property(5)],r.prototype,"shapePadding",void 0),pr([t.Property("transparent")],r.prototype,"background",void 0),pr([t.Property(1)],r.prototype,"opacity",void 0),pr([t.Property(!0)],r.prototype,"toggleVisibility",void 0),pr([t.Property(null)],r.prototype,"description",void 0),pr([t.Property(3)],r.prototype,"tabIndex",void 0),pr([t.Property(null)],r.prototype,"title",void 0),pr([t.Complex(e.Theme.legendTitleFont,Xt)],r.prototype,"titleStyle",void 0),pr([t.Property("Top")],r.prototype,"titlePosition",void 0),pr([t.Property(100)],r.prototype,"maximumTitleWidth",void 0),pr([t.Property(!0)],r.prototype,"enablePages",void 0),pr([t.Property(!1)],r.prototype,"isInversed",void 0),r}(t.ChildProperty),yr=function(){function e(e){this.pageXCollections=[],this.legendTitleCollections=[],this.legendRegions=[],this.pagingRegions=[],this.chart=e,this.legend=e.legendSettings,this.legendID=e.element.id+"_chart_legend",this.isChartControl="chart"===e.getModuleName(),this.isBulletChartControl="bulletChart"===e.getModuleName(),this.bulletChart=this.chart,this.fivePixel=5,this.rowCount=0,this.pageButtonSize=8,this.maxColumns=0,this.maxWidth=0,this.currentPage=1,this.backwardArrowOpacity=0,this.forwardArrowOpacity=1,this.arrowWidth=2*(this.fivePixel+this.pageButtonSize+this.fivePixel),this.arrowHeight=this.arrowWidth,this.isTop=!1,this.isTitle=!1,this.currentPageNumber=1}return e.prototype.calculateLegendBounds=function(e,t,r){var o=this.legend,n=this.isBulletChartControl?"40%":"20%";this.getPosition(o.position,t),this.legendBounds=new i.Rect(e.x,e.y,0,0),this.isVertical="Left"===this.position||"Right"===this.position,this.isVertical?(this.legendBounds.height=Be(o.height,t.height-(e.y-this.chart.margin.top))||e.height,this.legendBounds.width=Be(o.width||n,t.width)):(this.legendBounds.width=Be(o.width,t.width)||e.width,this.legendBounds.height=Be(o.height||n,t.height)),this.library.getLegendBounds(t,this.legendBounds,o),this.isBulletChartControl||(this.legendBounds.width+=this.legend.containerPadding.left+this.legend.containerPadding.right,this.legendBounds.height+=this.legend.containerPadding.top+this.legend.containerPadding.bottom),this.getLocation(this.position,o.alignment,this.legendBounds,e,t,r)},e.prototype.getPosition=function(e,t){var i=this.chart,r=this.chart;this.isChartControl||this.isBulletChartControl?this.position="Auto"!==e?e:"Bottom":("Auto"===e&&((i||r).visibleSeries&&"Funnel"===(i||r).visibleSeries[0].type||"Pyramid"===(i||r).visibleSeries[0].type)&&(e="Top"),this.position="Auto"!==e?e:t.width>t.height?"Right":"Bottom")},e.prototype.setBounds=function(e,t,i,r){var o=i.title&&"Top"===i.titlePosition?this.legendTitleSize.height+this.fivePixel:0;this.isVertical&&this.isPaging&&!i.enablePages&&!this.isBulletChartControl&&(o=i.title&&"Top"===i.titlePosition?this.legendTitleSize.height+this.fivePixel:0,o+=this.pageButtonSize+this.fivePixel),e=Math.min(e,r.width),t=Math.min(t,r.height),"Gradient"===i.mode?(r.width=i.width?r.width:this.isVertical?e:.75*r.width,r.height=i.height?r.height:this.isVertical?.75*r.height:t):(r.width=i.width?r.width:e,r.height=i.height?r.height:t),this.isBulletChartControl||this.isTop&&"None"!==i.titleStyle.textOverflow&&(this.calculateLegendTitle(i,r),r.height+="Wrap"===i.titleStyle.textOverflow&&this.legendTitleCollections.length>1?this.legendTitleSize.height-this.legendTitleSize.height/this.legendTitleCollections.length:0),this.rowCount=Math.max(1,Math.ceil((r.height-i.padding-o)/(this.maxItemHeight+i.padding)))},e.prototype.getLocation=function(e,t,i,r,o,n){var a=this.legend.border.width,s=this.isBulletChartControl,l=this.bulletChart,h="Inside"===l.labelPosition,c="Inside"===l.tickPosition,d="Vertical"===l.orientation,p=s&&""!==l.categoryField?n.width+this.chart.border.width+3*a:0,u=this.chart.margin.bottom,g=i.height+a+this.legend.margin.top+this.legend.margin.bottom,y=i.width+a+this.legend.margin.left+this.legend.margin.right;"Bottom"===e?(i.x=this.alignLegend(i.x,o.width,i.width,t),i.y=r.y+(r.height-g)+a+this.legend.margin.top,i.y+=!s||l.opposedPosition||h||c||d?d&&""!==l.categoryField?n.height+2*a:0:l.majorTickLines.height+u+this.legend.border.width+2*a,L(r,new Hi(0,0,0,g))):"Top"===e?(i.x=this.alignLegend(i.x,o.width,i.width,t),i.y=r.y+a+this.legend.margin.top,i.y-=!s||!l.opposedPosition||h||c||d?0:l.majorTickLines.height+this.chart.margin.top,L(r,new Hi(0,0,g-=s?2*-a:0,0))):"Right"===e?(i.x=r.x+(r.width-i.width)-this.legend.margin.right,i.y=r.y+this.alignLegend(0,o.height-(r.y+u),i.height,t),y+=s&&l.opposedPosition&&!h&&!c&&d?this.chart.margin.left+this.chart.margin.right+l.majorTickLines.height:0,L(r,new Hi(0,y,0,0))):"Left"===e?(i.x=i.x+this.legend.margin.left,i.y=r.y+this.alignLegend(0,o.height-(r.y+u),i.height,t),y+=!s||l.opposedPosition||h||c||!d?"Vertical"!==l.orientation&&""!==l.categoryField?p:0:i.x-this.chart.margin.left+a+l.majorTickLines.height,L(r,new Hi(y,0,0,0))):(i.x=this.legend.location.x,i.y=this.legend.location.y,L(r,new Hi(0,0,0,0)))},e.prototype.alignLegend=function(e,t,i,r){switch(r){case"Far":e=t-i-e;break;case"Center":e=(t-i)/2}return e},e.prototype.renderLegend=function(e,t,r,o){var n=0,a=0,s=(new i.Rect(0,0,0,0),new i.Rect(0,0,0,0)),l=this.findFirstLegendPosition(this.legendCollections),h=t.padding,c=t.enablePages,d=t.titlePosition,p=this.isPaging&&!t.enablePages&&this.isVertical?this.pageButtonSize:0,u=e.renderer.createGroup({id:this.legendID+"_g"}),g=this.createLegendElements(e,r,u,t,this.legendID,o);this.legendRegions=[];for(var y=0,m=0;m1)this.getLinearLegend(r,e,t,g),this.totalPages=1;else if(l!==this.legendCollections.length){var v=void 0,f=0,b=this.legendCollections[l],x=new Vi(this.isBulletChartControl?r.x+a+h+t.shapeWidth/2:r.x+a+h+t.shapeWidth/2+t.containerPadding.left,this.isBulletChartControl?r.y+n+p+h+this.maxItemHeight/2:r.y+n+p+h+this.maxItemHeight/2+t.containerPadding.top),w=e.isRtlEnabled?"end":"start",S=new i.TextOption("",x.x,x.y,w),C=t.shapePadding+h+t.shapeWidth;if(this.totalPages=this.totalPages=this.isChartControl||this.isBulletChartControl?this.totalPages:0,this.pageXCollections=[],this.legendCollections[l].location=x,!t.enablePages&&this.isPaging){var P=x.x-this.fivePixel,L=x.y-this.fivePixel,R=this.isTitle&&!this.isVertical&&"Left"===d?this.legendTitleSize.width+this.fivePixel:0,M=this.isVertical?this.pageButtonSize+Math.abs(L-r.y):0,A=this.isTitle&&!this.isVertical&&"Right"===d?this.legendTitleSize.width+this.fivePixel:0;A+=this.isVertical?0:this.fivePixel+this.pageButtonSize+this.fivePixel,s=new i.Rect(P,L,r.width-A-R,r.height-M)}else s=r;for(var T=0,k=this.legendCollections;T2){var y=g.end-g.start,m=g.colors.length-1;if(y>0){y/=m;for(f=1;f0&&g.colors.length<2&&c.push(g.colors[0])}var S=this.isVertical?"0":"100",C=this.isVertical?"100":"0";h.setAttribute("id",this.generateId(a,"linearGradient",0)),h.setAttribute("x1","0%"),h.setAttribute("y1","0%"),h.setAttribute("x2",S+"%"),h.setAttribute("y2",C+"%");for(var P=d[d.length-1]-d[0],L=0;LI.width?z.width:I.width,B=z.height>I.height?z.height:I.height,N=2*D+4*r.padding,F=e.width,V=e.height,j=e.x+D+2*r.padding,H=e.y+r.padding;if(this.isVertical){if(N=2*B+4*r.padding,F=e.width-2*r.padding,V=e.height-N,j=e.x+r.padding,H=e.y+B+2*r.padding,A=e.y+r.padding+B,T=H+V+B,k=e.x+.5*e.width-.5*D,_=k,F>30){var X=F-30;F=30,j+=X/2}}else if(F=e.width-N,V=e.height-2*r.padding,k=e.x+r.padding+(D-z.width),_=e.x+F+3*r.padding+D,A=e.y+.5*e.height+.25*B,T=A,V>30){var Y=V-30;V=30,H+=Y/2}var G=new i.TextOption("",k,A,"",O);G.id=this.legendID+this.generateId(a,"_text_",1);var W=a.visible?r.textStyle.color||t.themeStyle.legendLabel:"#D3D3D3",U=this.chart.enableCanvas;Ve(t.renderer,G,r.textStyle,W,o,!1,!1,!1,!1,null,this.currentPageNumber&&U?new i.Rect(0,-this.translatePage(null,this.currentPageNumber-1,this.currentPageNumber),0,0):null),(G=new i.TextOption("",_,T,"",E)).id=this.legendID+this.generateId(a,"_text_",2),Ve(t.renderer,G,r.textStyle,W,o,!1,!1,!1,!1,null,this.currentPageNumber&&U?new i.Rect(0,-this.translatePage(null,this.currentPageNumber-1,this.currentPageNumber),0,0):null);var Z=t.renderer.drawRectangle({width:F,height:V,x:j,y:H,fill:"url(#"+this.generateId(a,"linearGradient",0)+")"});l.appendChild(h),o.appendChild(l),o.appendChild(Z)},e.prototype.findFirstLegendPosition=function(e){for(var t=0,i=0,r=e;i-1&&-1===e.type.toLowerCase().indexOf("area"),h="chart"===this.chart.getModuleName()&&("Scatter"===e.type||"Bubble"===e.type),c=this.chart.enableCanvas,d="SeriesType"===e.shape?e.type:e.shape,p=l?"Series"===this.legend.mode?this.chart.visibleSeries[r].width:this.chart.visibleSeries[0].width:this.isBulletChartControl&&"Multiply"===e.shape?4:1;if(d="Scatter"===d?e.markerShape:d,h&&r1?this.translatePage(n,a-2,a-1,i):!t&&a-1){var o=e.target.id.split(this.legendID+"_text_");if(2===o.length){var n=parseInt(o[1],10),a=this.chart.element;isNaN(n)||(this.chart.isTouch&&m(this.chart.element.id+"_EJ2_Legend_Tooltip"),this.isChartControl?f(this.chart.series[n].name,i,r,a.offsetWidth,a.id+"_EJ2_Legend_Tooltip",he(this.chart.element.id+"_Secondary_Element")):f(this.chart.visibleSeries[0].points[n].x.toString(),i+10,r+10,a.offsetWidth,a.id+"_EJ2_Legend_Tooltip",he(this.chart.element.id+"_Secondary_Element")))}}else m(this.chart.element.id+"_EJ2_Legend_Tooltip");this.chart.isTouch&&(clearTimeout(this.clearTooltip),this.clearTooltip=+setTimeout(function(){m(t.chart.element.id+"_EJ2_Legend_Tooltip")},1e3))},e}(),mr=function(){function e(e,t,i,r,o,n,a,s,l,h){this.location={x:0,y:0},this.text=e,this.fill=t,this.shape=i,this.url=n,this.visible=r,this.type=o,this.markerVisibility=s,this.markerShape=a,this.pointIndex=l,this.seriesIndex=h}return e}(),vr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fr=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},br=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.clipRect=new i.Rect(0,0,0,0),t}return vr(r,e),r.prototype.setDataSource=function(e,t){e&&(this.xData=e.xData,this.yData=e.yData,this.points=e.points),t[G(this.type)+"IndicatorModule"].initDataSource(this,t),t.visibleSeriesCount+=this.targetSeries.length},fr([t.Property("Sma")],r.prototype,"type",void 0),fr([t.Property(14)],r.prototype,"period",void 0),fr([t.Property(14)],r.prototype,"kPeriod",void 0),fr([t.Property(3)],r.prototype,"dPeriod",void 0),fr([t.Property(80)],r.prototype,"overBought",void 0),fr([t.Property(20)],r.prototype,"overSold",void 0),fr([t.Property(2)],r.prototype,"standardDeviation",void 0),fr([t.Property("Close")],r.prototype,"field",void 0),fr([t.Property(12)],r.prototype,"slowPeriod",void 0),fr([t.Property(26)],r.prototype,"fastPeriod",void 0),fr([t.Property(!0)],r.prototype,"showZones",void 0),fr([t.Complex({color:"#ff9933",width:2},Ht)],r.prototype,"macdLine",void 0),fr([t.Property("Both")],r.prototype,"macdType",void 0),fr([t.Property("#2ecd71")],r.prototype,"macdPositiveColor",void 0),fr([t.Property("#e74c3d")],r.prototype,"macdNegativeColor",void 0),fr([t.Property("rgba(211,211,211,0.25)")],r.prototype,"bandColor",void 0),fr([t.Complex({color:"#ffb735",width:1},Ht)],r.prototype,"upperLine",void 0),fr([t.Complex({color:"#f2ec2f",width:1},Ht)],r.prototype,"lowerLine",void 0),fr([t.Complex({color:"#f2ec2f",width:1},Ht)],r.prototype,"periodLine",void 0),fr([t.Property("")],r.prototype,"seriesName",void 0),r}(or),xr=function(){function e(e){this.control=e}return e.prototype.print=function(e){this.printWindow=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),this.printWindow.moveTo(0,0),this.printWindow.resizeTo(screen.availWidth,screen.availHeight);var i={cancel:!1,htmlContent:this.getHTMLContent(e),name:"beforePrint"};this.control.trigger("beforePrint",i),i.cancel||t.print(i.htmlContent,this.printWindow)},e.prototype.getHTMLContent=function(e){var i=t.createElement("div");if(e)if(e instanceof Array)for(var r=0;r-1);r=t.isNullOrUndefined(r)?o.PdfPageOrientation.Landscape:r;var f=''+p.svg.outerHTML+"",b=window.URL.createObjectURL(new Blob("SVG"===e?[f]:[(new XMLSerializer).serializeToString(p.svg)],{type:"image/svg+xml"}));if("SVG"===e)if("msie"===t.Browser.info.name){var x=new Blob([(new XMLSerializer).serializeToString(p.svg)],{type:"application/octet-stream"});window.navigator.msSaveOrOpenBlob(x,i+"."+e.toLocaleLowerCase())}else this.triggerDownload(i,e,b,v);else if("msie"===t.Browser.info.name){var w=g;y||(w=this.createCanvas()),u=w.toDataURL(),"PDF"===e?this.exportPdf(w,r,a,s,v,i,h,c):this.doexport(e,u,i)}else{var S=new Image,C=g.getContext("2d");S.onload=function(){C.drawImage(S,0,0),window.URL.revokeObjectURL(b),"PDF"===e?d.exportPdf(g,r,a,s,v,i,h,c):window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(g.toBlob(null),i+"."+e.toLocaleLowerCase()):d.triggerDownload(i,e,g.toDataURL("image/"+e.toLowerCase()),v)},S.src=b}y||m(document.getElementById(this.control.element.id+"_canvas"))},e.prototype.getDataUrl=function(e){var i=this.getControlsValue([e]),r=this.control.svgObject,o=this.control.enableCanvas;o||(r=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:i.width.toString(),height:i.height.toString()}}));var n=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(i.svg)],{type:"image/svg+xml"}));if("msie"===t.Browser.info.name){var a=r;o||(a=this.createCanvas());var s={name:"afterExport",cancel:!1,dataUrl:r.toDataURL("image/png")};return e.trigger("afterExport",s),{element:a,dataUrl:a.toDataURL()}}var l=new Image,h=r.getContext("2d");return l.onload=function(){h.drawImage(l,0,0),window.URL.revokeObjectURL(n);var t={name:"afterExport",cancel:!1,dataUrl:r.toDataURL("image/png")};return e.trigger("afterExport",t),t.dataUrl},l.src=n,{element:r,blobUrl:n}},e.prototype.triggerDownload=function(e,i,r,o){t.createElement("a",{attrs:{download:e+"."+i.toLocaleLowerCase(),href:r}}).dispatchEvent(new MouseEvent(o?"click":"move",{view:window,bubbles:!1,cancelable:!0}))},e.prototype.getControlsValue=function(e,r){var o=0,n=0,a=this.control.enableCanvas,s=new i.SvgRenderer("").createSvg({id:"Svg_Export_Element",width:200,height:200});return e.map(function(e){var i=e.svgObject.cloneNode(!0),l=e.renderer.createGroup({style:t.isNullOrUndefined(r)||r?"transform: translateY("+n+"px)":"transform: translateX("+o+"px)"});a||l.appendChild(i),o=t.isNullOrUndefined(r)||r?Math.max(e.availableSize.width,o):o+e.availableSize.width,n=t.isNullOrUndefined(r)||r?n+e.availableSize.height:Math.max(e.availableSize.height,n),a||s.appendChild(l)}),a||(s.setAttribute("width",o+""),s.setAttribute("height",n+"")),{width:o,height:n,svg:s}},e.prototype.createCanvas=function(){var e=this.control;this.canvasRender(!0,e);var t=e.svgObject;return this.canvasRender(!1,e),t},e.prototype.canvasRender=function(e,t){t.enableCanvas=e,t.preRender(),t.render()},e.prototype.exportPdf=function(e,t,i,r,n,a,s,l){var h=new o.PdfDocument,c=h.pageSettings.margins,d=h.pageSettings.width,p=h.pageSettings.height,u=e.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");h.pageSettings.orientation=t;var g=d=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},Cr=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return wr(i,e),Sr([t.Property()],i.prototype,"start",void 0),Sr([t.Property()],i.prototype,"end",void 0),Sr([t.Property([])],i.prototype,"colors",void 0),Sr([t.Property("")],i.prototype,"label",void 0),i}(t.ChildProperty),Pr=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return wr(i,e),Sr([t.Property(!1)],i.prototype,"enable",void 0),Sr([t.Property("")],i.prototype,"dashArray",void 0),Sr([t.Complex({color:null,width:1},Yt)],i.prototype,"line",void 0),Sr([t.Property("Both")],i.prototype,"lineType",void 0),i}(t.ChildProperty),Lr=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return wr(i,e),Sr([t.Property(!1)],i.prototype,"enableSelectionZooming",void 0),Sr([t.Property(!1)],i.prototype,"enablePinchZooming",void 0),Sr([t.Property(!1)],i.prototype,"enableMouseWheelZooming",void 0),Sr([t.Property(!0)],i.prototype,"enableDeferredZooming",void 0),Sr([t.Property("XY")],i.prototype,"mode",void 0),Sr([t.Property(["Zoom","ZoomIn","ZoomOut","Pan","Reset"])],i.prototype,"toolbarItems",void 0),Sr([t.Property(!1)],i.prototype,"enablePan",void 0),Sr([t.Property(!1)],i.prototype,"enableScrollbar",void 0),i}(t.ChildProperty),Rr=function(r){function o(e,i){var o=r.call(this,e,i)||this;return o.rotatedDataLabelCollections=[],o.animated=!1,o.isPointMouseDown=!1,o.isScrolling=!1,o.checkResize=0,o.visible=0,o.clickCount=0,o.singleClickTimer=0,o.chartAreaType="Cartesian",o.isRtlEnabled=!1,o.chartid=57723,t.setValue("mergePersistData",o.mergePersistChartData,o),o}return wr(o,r),o.prototype.mergePersistChartData=function(){var e=window.localStorage.getItem(this.getModuleName()+this.element.id);if(!t.isNullOrUndefined(e)&&""!==e){var i=JSON.parse(e),r=Object.keys(i);this.isProtectedOnChange=!0;for(var o=0,n=r;o${point.x}"),null===this.stockChart.tooltip.format&&(this.tooltip.format="High : ${point.high}
Low : ${point.low}
Open : ${point.open}
Close : ${point.close}",""!==this.stockChart.series[0].volume&&(this.tooltip.format+="
Volume : ${point.volume}")),this.animateSeries=!1)},o.prototype.initPrivateVariable=function(){if(this.animateSeries=!0,this.delayRedraw=!1,this.horizontalAxes=[],this.verticalAxes=[],this.refreshAxis(),this.refreshDefinition(this.rows),this.refreshDefinition(this.columns),this.tooltipModule&&(this.tooltipModule.previousPoints=[]),""===this.element.id){var e=document.getElementsByClassName("e-chart").length;this.element.id="chart_"+this.chartid+"_"+e}this.svgId=this.stockChart?this.stockChart.element.id+"_stockChart_chart":this.element.id+(this.enableCanvas?"_canvas":"_svg")},o.prototype.render=function(){var e=this;this.svgRenderer=new i.SvgRenderer(this.element.id);var t={chart:this.isBlazor?{}:this,theme:this.theme,name:"load",cancel:!1};this.stockChart?(this.isRtlEnabled="rtl"===window.getComputedStyle(document.querySelector("body")).direction,this.cartesianChartRendering(t)):this.trigger("load",t,function(){t.cancel||e.cartesianChartRendering(t)})},o.prototype.cartesianChartRendering=function(e){this.theme=this.isBlazor?e.theme:this.theme,this.createChartSvg(),this.setTheme(),this.markerRender=new cr(this),this.calculateAreaType(),this.calculateVisibleSeries(),this.initTechnicalIndicators(),this.initTrendLines(),this.calculateVisibleAxis(),this.processData(),this.renderComplete(),this.allowServerDataBinding=!0},o.prototype.getLocalizedLabel=function(e){return this.localeObject.getConstant(e)},o.prototype.animate=function(e){this.redraw=!0,this.animated=!0,this.duration=e||1e3},o.prototype.refreshBound=function(){if(this.rotatedDataLabelCollections=[],this.legendModule&&this.legendSettings.visible&&this.legendModule.getLegendOptions(this.visibleSeries,this),this.tooltip.enable&&this.tooltipModule&&(this.tooltipModule.previousPoints=[]),this.calculateStackValues(),this.calculateBounds(),this.stockChart&&!this.stockChart.rangeFound&&(this.stockChart.enablePeriodSelector||this.stockChart.enableSelector))return null;this.renderElements(),m("chartmeasuretext"),this.removeSelection()},o.prototype.calculateStackValues=function(){for(var e,t=!1,i=0,r=this.visibleSeries.length;i-1,this),t=!0)},o.prototype.removeSelection=function(){for(var e=0,t=this.visibleSeries;e-1&&(this.selectionModule.filterArray=[]),m(this.element.id+"_ej2_drag_multi_group"),this.selectionModule.calculateDragSelectedElements(this,new i.Rect(0,0,0,0),!0)):he(this.element.id+"_ej2_drag_group")&&("Lasso"!==this.selectionMode&&(this.selectionModule.filterArray=[]),m(this.element.id+"_ej2_drag_group"),this.selectionModule.calculateDragSelectedElements(this,new i.Rect(0,0,0,0),!0))},o.prototype.renderElements=function(){this.renderBorder(),this.renderTitle(),this.renderAreaBorder(),this.renderSeriesElements(this.renderAxes()),this.renderLegend(),this.applyZoomkit(),this.performSelection(),this.setSecondaryElementPosition();for(var e=0,i=this.visibleSeries;e0&&this.columns.length>0&&(e=this.chartAxisLayoutPanel.renderAxes()),this.stripLineModule&&this.stripLineModule.renderStripLine(this,"Behind",this.axisCollections),e},o.prototype.renderLegend=function(){if(this.legendModule&&this.legendModule.legendCollections.length&&this.legendSettings.visible){this.legendModule.calTotalPage=!0;var e=this.legendSettings.border.width,t=this.legendModule.legendBounds,r=new i.Rect(t.x,t.y,t.width,t.height);this.enableCanvas&&(r=new i.Rect(r.x-e/2,r.y-e/2,r.width+e,r.height+e),this.renderer.canvasClip(r)),this.legendModule.renderLegend(this,this.legendSettings,t),this.enableCanvas&&this.renderer.canvasRestore()}this.redraw||(this.stockChart?he(this.stockChart.chartObject.id)||this.stockChart.mainObject.appendChild(this.svgObject):this.element.appendChild(this.svgObject))},o.prototype.setSecondaryElementPosition=function(){var e=he(this.element.id+"_Secondary_Element");if(e){var t=this.element.getBoundingClientRect(),i=he(this.svgId).getBoundingClientRect();e.style.left=Math.max(i.left-t.left,0)+"px",e.style.top=Math.max(i.top-t.top,0)+"px"}},o.prototype.initializeModuleElements=function(){this.dataLabelCollections=[];var e=this.element.id;this.series.length&&(this.seriesElements="Scatter"===this.series[0].type||"Bubble"===this.series[0].type?this.svgRenderer.createGroup({id:e+"SeriesCollection"}):this.renderer.createGroup({id:e+"SeriesCollection"})),this.indicators.length&&(this.indicatorElements=this.renderer.createGroup({id:e+"IndicatorCollection"})),this.hasTrendlines()&&(this.trendLineElements=this.renderer.createGroup({id:e+"TrendLineCollection"})),this.dataLabelElements=this.renderer.createGroup({id:e+"DataLabelCollection"})},o.prototype.hasTrendlines=function(){for(var e,t=0,i=this.series;t0&&this.columns.length>0&&(this.initializeIndicator(),this.initializeTrendLine(),this.renderSeries(),this.trendLineElements&&be(this.enableCanvas,this.svgObject,this.trendLineElements,this.redraw),this.appendElementsAfterSeries(e))},o.prototype.renderSeries=function(){for(var e=0,t=this.visibleSeries;e0&&(this.selectionModule.selectedDataIndexes=e,this.selectionModule.redrawSelection(this,this.selectionMode))},o.prototype.processData=function(e){void 0===e&&(e=!0),this.visibleSeriesCount=0;for(var t=!0,i=0,r=this.visibleSeries;is?o:s}this.subTitleCollection=Xe(this.subTitle,this.subTitleStyle,s),r=i.measureText(this.subTitle,this.subTitleStyle).height*this.subTitleCollection.length+15}var d=e.top+r+t+.5*this.chartArea.border.width,p=this.availableSize.height-d-this.border.width-e.bottom;this.initialClipRect=new i.Rect(n,d,a,p),this.legendModule&&this.legendSettings.visible&&this.legendModule.calculateLegendBounds(this.initialClipRect,this.availableSize,null),this.chartAxisLayoutPanel.measureAxis(this.initialClipRect)},o.prototype.print=function(e){new xr(this).print(e)},o.prototype.initTrendLines=function(){this.isProtectedOnChange=!0;for(var e=0,t=this.visibleSeries;e0&&this.columns.length>0&&this.chartAxisLayoutPanel.measure()},o.prototype.initAxis=function(e,t,i){e.xAxisName===t.name||null==e.xAxisName&&"primaryXAxis"===t.name?(t.orientation=this.requireInvertedAxis?"Vertical":"Horizontal",e.xAxis=t,i&&t.series.push(e)):(e.yAxisName===t.name||null==e.yAxisName&&"primaryYAxis"===t.name)&&(t.orientation=this.requireInvertedAxis?"Horizontal":"Vertical",e.yAxis=t,i&&t.series.push(e))},o.prototype.initTechnicalIndicators=function(){for(var e=0,t=0,i=this.indicators;t-1)continue}this.visibleSeries.push(e),r[o]=e}},o.prototype.renderTitle=function(){var e,t=this.margin;if(this.title){var r=this.titleStyle.textAlignment,o="Near"===r?"start":"Far"===r?"end":"middle",n=i.measureText(this.title,this.titleStyle);e=new i.Rect(t.left,0,this.availableSize.width-t.left-t.right,0);var a=new i.TextOption(this.element.id+"_ChartTitle",Ye(e,this.titleStyle),this.margin.top+3*n.height/4,o,this.titleCollection,"","auto"),s=Ne(this.redraw,this.element.id+"_ChartTitle",a,this.renderer)||Ve(this.renderer,a,this.titleStyle,this.titleStyle.color||this.themeStyle.chartTitle,this.svgObject,null,null,null,null,null,null,null,null,this.enableCanvas);s&&(s.setAttribute("aria-label",this.description||this.title),s.setAttribute("tabindex",this.tabIndex.toString())),this.subTitle&&this.renderSubTitle(a)}},o.prototype.renderSubTitle=function(e){for(var t=0,r=0,o=this.titleStyle.textAlignment,n=0,a=this.titleCollection;nt?r:t}var l=i.measureText(this.subTitle,this.subTitleStyle),h=new i.Rect("Center"===o?e.x-.5*t:"Far"===o?e.x-t:e.x,0,t,0),c=new i.TextOption(this.element.id+"_ChartSubTitle",Ye(h,this.subTitleStyle),e.y*e.text.length+3*l.height/4+10,function(e){return"Near"===e?"start":"Far"===e?"end":"middle"}(this.subTitleStyle.textAlignment),this.subTitleCollection,"","auto"),d=Ne(this.redraw,this.element.id+"_ChartSubTitle",c,this.renderer)||Ve(this.renderer,c,this.subTitleStyle,this.subTitleStyle.color||this.themeStyle.chartTitle,this.svgObject,null,null,null,null,null,null,null,null,this.enableCanvas);d&&(d.setAttribute("aria-label",this.description||this.subTitle),d.setAttribute("tabindex",this.tabIndex.toString()))},o.prototype.renderBorder=function(){var e=this.border.width,t=this.backgroundImage,r=t?"transparent":this.background||this.themeStyle.background,o=new Di(this.element.id+"_ChartBorder",r,this.border,1,new i.Rect(.5*e,.5*e,this.availableSize.width-e,this.availableSize.height-e));if(this.htmlObject=Ne(this.redraw,this.element.id+"_ChartBorder",o,this.renderer)||this.renderer.drawRectangle(o),be(this.enableCanvas,this.svgObject,this.htmlObject,this.redraw),t){var n=new Bi(this.availableSize.height-e,this.availableSize.width-e,t,0,0,this.element.id+"_ChartBackground","visible","none");this.htmlObject=Ne(this.redraw,this.element.id+"_ChartBackground",n,this.renderer)||this.renderer.drawImage(n),be(this.enableCanvas,this.svgObject,this.htmlObject,this.redraw)}},o.prototype.renderAreaBorder=function(){if("PolarRadar"===this.chartAreaType)return null;var e=he(this.element.id+"_ChartAreaBorder"),t=e?new i.Rect(+e.getAttribute("x"),+e.getAttribute("y"),+e.getAttribute("width"),+e.getAttribute("height")):null,r=new Di(this.element.id+"_ChartAreaBorder",this.chartArea.background,{width:this.chartArea.border.width,color:this.chartArea.border.color||this.themeStyle.areaBorder},this.chartArea.opacity,this.chartAxisLayoutPanel.seriesClipRect);this.htmlObject=this.renderer.drawRectangle(r),be(this.enableCanvas,this.svgObject,this.htmlObject,this.redraw,!0,"x","y",null,null,!0,!0,t),this.htmlObject=null;var o=this.chartArea.backgroundImage;if(o){var n=this.chartArea.border.width,a=new Bi(this.initialClipRect.height-n,this.initialClipRect.width-n,o,this.initialClipRect.x,this.initialClipRect.y,this.element.id+"_ChartAreaBackground","visible","none");this.htmlObject=this.renderer.drawImage(a),be(this.enableCanvas,this.svgObject,this.htmlObject,this.redraw,!0,"x","y",null,null,!0,!0)}},o.prototype.addSeries=function(e){for(var t=0,i=e;t0?400:0}else r=this.pointDoubleClick?400:0;return 1===this.clickCount&&this.pointClick?this.singleClickTimer=+setTimeout(function(){t.clickCount=0,t.triggerPointEvent("pointClick",e)},r):2===this.clickCount&&this.pointDoubleClick&&(clearTimeout(this.singleClickTimer),this.clickCount=0,this.triggerPointEvent("pointDoubleClick",e)),this.axisLabelClick&&this.triggerAxisLabelClickEvent("axisLabelClick",e),this.notify("click",e),!1},o.prototype.triggerPointEvent=function(e,t){var i=t,r=new Zi(this).getData();r.series&&r.point&&this.trigger(e,{series:this.isBlazor?{}:r.series,point:r.point,seriesIndex:r.series.index,pointIndex:r.point.index,x:this.mouseX,y:this.mouseY,pageX:i.pageX,pageY:i.pageY})},o.prototype.triggerAxisLabelClickEvent=function(e,t){var i=t.target,r=t;if(-1!==i.id.indexOf("_AxisLabel_")){var o=i.id.split("_AxisLabel_"),n=+o[0].slice(-1),a=+o[1],s=this.axisCollections[n];!s.visible||0!==n&&1!==n||this.trigger(e,{chart:this,axis:s,text:s.visibleLabels[a].text,labelID:i.id,index:a,location:new Vi(r.pageX,r.pageY),value:s.visibleLabels[a].value})}},o.prototype.chartOnMouseMove=function(e){var i=e.target;return this.trigger("chartMouseMove",{target:i.id,x:this.mouseX,y:this.mouseY}),this.pointMove&&this.triggerPointEvent("pointMove",e),this.isTouch||(this.titleTooltip(e,this.mouseX,this.mouseY),this.axisTooltip(e,this.mouseX,this.mouseY)),this.dataEditingModule&&this.dataEditingModule.pointMouseMove(e),this.notify(t.Browser.touchMoveEvent,e),this.isTouch=!1,!1},o.prototype.titleTooltip=function(e,t,i,r){var o=e.target.id,n=o===this.element.id+"_ChartTitle"||o===this.element.id+"_ChartSubTitle"||o.indexOf("_AxisTitle")>-1||o.indexOf("_legend_title")>-1,a=0;o.indexOf("_AxisTitle")>-1&&(a=parseInt(o.replace(this.element.id,"").replace("AxisLabel_","").split("_")[2],10)),n&&e.target.textContent.indexOf("...")>-1?f(o===this.element.id+"_ChartTitle"?this.title:o.indexOf("_AxisTitle")>-1?this.axisCollections[a].title:o.indexOf("_ChartSubTitle")>-1?this.subTitle:this.legendSettings.title,t,i,this.element.offsetWidth,this.element.id+"_EJ2_Title_Tooltip",he(this.element.id+"_Secondary_Element"),r):m(this.element.id+"_EJ2_Title_Tooltip")},o.prototype.axisTooltip=function(e,t,i,r){var o=e.target.id;if((o.indexOf("AxisLabel")>-1||o.indexOf("Axis_MultiLevelLabel")>-1)&&e.target.textContent.indexOf("...")>-1){var n=this.legendSettings.visible||""===this.primaryXAxis.title;f(this.findAxisLabel(o),t,i,this.element.offsetWidth,this.element.id+"_EJ2_AxisLabel_Tooltip",he(this.element.id+"_Secondary_Element"),r,n)}else m(this.element.id+"_EJ2_AxisLabel_Tooltip")},o.prototype.findAxisLabel=function(e){var t;return e.indexOf("AxisLabel")>-1?(t=e.replace(this.element.id,"").replace("AxisLabel_","").split("_"),this.axisCollections[parseInt(t[0],10)].visibleLabels[parseInt(t[1],10)].originalText):(t=e.replace(this.element.id,"").replace("Axis_MultiLevelLabel_Level_","").replace("Text_","").split("_"),this.axisCollections[parseInt(t[0],10)].multiLevelLabels[parseInt(t[1],10)].categories[parseInt(t[2],10)].text)},o.prototype.chartOnMouseDown=function(e){var i,r,o,n,a=t.Browser.isDevice?20:30,s=this.element.getBoundingClientRect(),l=e.target;this.trigger("chartMouseDown",{target:l.id,x:this.mouseX,y:this.mouseY}),"touchstart"===e.type?(this.isTouch=!0,i=(n=e).changedTouches[0].clientX,r=n.changedTouches[0].clientY,o=n.target):(this.isTouch="touch"===e.pointerType,i=e.clientX,r=e.clientY,o=e.target);var h=he(this.svgId).getBoundingClientRect();return this.mouseDownX=this.previousMouseMoveX=i-s.left-Math.max(h.left-s.left,0),this.mouseDownY=this.previousMouseMoveY=r-s.top-Math.max(h.top-s.top,0),this.isTouch&&(this.isDoubleTap=(new Date).getTime()=this.mouseX||this.mouseDownX+a>=this.mouseX)&&(this.mouseDownY-a>=this.mouseY||this.mouseDownY+a>=this.mouseY)&&(this.mouseX-a>=this.mouseDownX||this.mouseX+a>=this.mouseDownX)&&(this.mouseY-a>=this.mouseDownY||this.mouseY+a>=this.mouseDownY)),this.dataEditingModule&&this.dataEditingModule.pointMouseDown(),this.notify(t.Browser.touchStartEvent,e),!1},o.prototype.mouseEnd=function(e){var t,i,r;return"touchend"===e.type?(i=(r=e).changedTouches[0].clientX,this.isTouch=!0,t=r.changedTouches[0].clientY):(t=e.clientY,i=e.clientX,this.isTouch="touch"===e.pointerType||"2"===e.pointerType),this.setMouseXY(i,t),this.chartOnMouseUp(e),!1},o.prototype.chartOnMouseUp=function(e){var i=e.target;return this.trigger("chartMouseUp",{target:i.id,x:this.mouseX,y:this.mouseY}),this.isChartDrag=!1,this.isTouch&&(this.titleTooltip(e,this.mouseX,this.mouseY,this.isTouch),this.axisTooltip(e,this.mouseX,this.mouseY,this.isTouch),this.threshold=(new Date).getTime()+300),this.dataEditingModule&&this.dataEditingModule.pointMouseUp(),!this.enableCanvas&&this.seriesElements&&this.seriesElements.removeAttribute("clip-path"),this.notify(t.Browser.touchEndEvent,e),!1},o.prototype.setCulture=function(){this.intl=new t.Internationalization,this.setLocaleConstants(),this.localeObject=new t.L10n(this.getModuleName(),this.defaultLocalConstants,this.locale)},o.prototype.setAnnotationValue=function(e,t){var i,r=he(this.element.id+"_Annotation_Collections"),o=this.annotations[e];null!==t&&(o.content=t,r?(m(this.element.id+"_Annotation_"+e),i=this.createElement("div"),this.annotationModule.processAnnotation(o,e,i),r.appendChild(i.children[0])):this.annotationModule.renderAnnotations(he(this.element.id+"_Secondary_Element")))},o.prototype.setLocaleConstants=function(){this.defaultLocalConstants={ZoomIn:"Zoom in",Zoom:"Zoom",ZoomOut:"Zoom out",Pan:"Pan",Reset:"Reset",ResetZoom:"Reset Zoom"}},o.prototype.setTheme=function(){this.themeStyle=c(this.theme)},o.prototype.requiredModules=function(){var e,t=this,i=[],r=this.series,o=!1,n=!1,a=!1,s=!1,l=this.zoomSettings;return this.chartAreaType=r.length>0&&("Polar"===r[0].type||"Radar"===r[0].type)?"PolarRadar":"Cartesian",this.tooltip.enable&&i.push({member:"Tooltip",args:[this]}),r.map(function(o){t.isLegend=t.legendSettings.visible&&(""!==o.name||!!t.isLegend),e=-1!==o.type.indexOf("100")?o.type.replace("100","")+"Series":o.type+"Series",n=o.errorBar.visible||n,s=o.marker.dataLabel.visible||s,a=o.dragSettings.enable||a,i.some(function(t){return t.member===e})||i.push({member:e,args:[t,r]}),"PolarRadar"===t.chartAreaType&&i.push({member:o.drawType+"Series",args:[t,r]}),"Pareto"===o.type&&(i.push({member:"ColumnSeries",args:[t,r]}),i.push({member:"LineSeries",args:[t,r]}))}),this.findIndicatorModules(i),this.findTrendLineModules(i),i=this.findAxisModule(i),o=this.annotations.some(function(e){return null!==e.content}),n&&i.push({member:"ErrorBar",args:[this,r]}),this.isLegend&&i.push({member:"Legend",args:[this]}),(this.enableExport||this.allowExport)&&i.push({member:"Export",args:[this]}),"PolarRadar"!==this.chartAreaType&&!this.scrollSettingEnabled&&(l.enableSelectionZooming||l.enableMouseWheelZooming||l.enablePinchZooming||l.enablePan||l.enableScrollbar)&&(i.push({member:"Zoom",args:[this,this.zoomSettings]}),l.enableScrollbar&&i.push({member:"ScrollBar",args:[this]})),"None"===this.selectionMode||"PolarRadar"===this.chartAreaType&&this.selectionMode.indexOf("Drag")>-1||i.push({member:"Selection",args:[this]}),"None"!==this.highlightMode&&i.push({member:"Highlight",args:[this]}),s&&i.push({member:"DataLabel",args:[this,r]}),a&&i.push({member:"DataEditing",args:[this]}),o&&i.push({member:"Annotation",args:[this]}),"PolarRadar"!==this.chartAreaType&&this.crosshair.enable&&i.push({member:"Crosshair",args:[this]}),i},o.prototype.findAxisModule=function(e){var t=[];t.push(this.primaryXAxis),t.push(this.primaryYAxis);for(var i=!1,r=!1,o=!1,n=!1,a=!1,s=!1,l=0,h=t=t.concat(this.axes);l0||s,this.scrollSettingEnabled=!!c.scrollbarSettings.enable||this.scrollSettingEnabled}return i&&e.push({member:"DateTime",args:[this]}),r&&e.push({member:"Category",args:[this]}),o&&e.push({member:"Logarithmic",args:[this]}),n&&e.push({member:"StripLine",args:[this]}),s&&e.push({member:"MultiLevelLabel",args:[this]}),a&&e.push({member:"DateTimeCategory",args:[this]}),this.scrollSettingEnabled&&e.push({member:"ScrollBar",args:[this]}),e},o.prototype.findIndicatorModules=function(e){var t,i,r=this.indicators;if(this.indicators.length){e.push({member:"LineSeries",args:[this]}),r.map(function(e){t=t||"Macd"===e.type,i=i||"BollingerBands"===e.type}),t&&e.push({member:"ColumnSeries",args:[this]}),i&&e.push({member:"RangeAreaSeries",args:[this]});for(var o=0,n=this.indicators;oe;)this.svgObject.removeChild(this.svgObject.firstChild);this.svgObject.hasChildNodes()||!this.svgObject.parentNode||this.stockChart||t.remove(this.svgObject)}},o.prototype.refreshDefinition=function(e){for(var t=0,i=e;t1&&(this.selectionModule.currentMode=this.selectionMode,this.selectionModule.styleId=this.element.id+"_ej2_chart_selection",this.selectionModule.redrawSelection(this,i.selectionMode));break;case"highlightMode":case"selectionPattern":case"highlightPattern":this.removeStyles(),r=!0;break;case"theme":this.animateSeries=!0;break;case"locale":case"currencyCode":this.isBlazor?(this.setCulture(),r=!0):this.refresh();break;case"tooltip":this.tooltipModule&&(this.tooltipModule.previousPoints=[])}!o&&r&&(this.removeSvg(),this.renderElements(),this.trigger("loaded",{chart:this.isBlazor?{}:this})),o&&(this.enableCanvas?this.createChartSvg():this.removeSvg(),this.isReact&&this.clearTemplate(),this.refreshAxis(),this.refreshBound(),this.trigger("loaded",{chart:this.isBlazor?{}:this}),this.redraw=!1,this.animated=!1)}},Sr([t.Property(null)],o.prototype,"width",void 0),Sr([t.Property(null)],o.prototype,"height",void 0),Sr([t.Property("")],o.prototype,"title",void 0),Sr([t.Property("")],o.prototype,"dataSource",void 0),Sr([t.Complex(e.Theme.chartTitleFont,Xt)],o.prototype,"titleStyle",void 0),Sr([t.Property("")],o.prototype,"subTitle",void 0),Sr([t.Complex(e.Theme.chartSubTitleFont,Xt)],o.prototype,"subTitleStyle",void 0),Sr([t.Complex({},Ut)],o.prototype,"margin",void 0),Sr([t.Complex({color:"#DDDDDD",width:0},Yt)],o.prototype,"border",void 0),Sr([t.Property(null)],o.prototype,"background",void 0),Sr([t.Complex({border:{color:null,width:.5},background:"transparent"},Wt)],o.prototype,"chartArea",void 0),Sr([t.Complex({name:"primaryXAxis"},Ti)],o.prototype,"primaryXAxis",void 0),Sr([t.Complex({name:"primaryYAxis"},Ti)],o.prototype,"primaryYAxis",void 0),Sr([t.Collection([{}],wi)],o.prototype,"rows",void 0),Sr([t.Collection([{}],Si)],o.prototype,"columns",void 0),Sr([t.Collection([{}],Ti)],o.prototype,"axes",void 0),Sr([t.Collection([{}],nr)],o.prototype,"series",void 0),Sr([t.Collection([{}],pi)],o.prototype,"annotations",void 0),Sr([t.Property([])],o.prototype,"palettes",void 0),Sr([t.Property("Material")],o.prototype,"theme",void 0),Sr([t.Complex({},ti)],o.prototype,"tooltip",void 0),Sr([t.Complex({},Pr)],o.prototype,"crosshair",void 0),Sr([t.Complex({},gr)],o.prototype,"legendSettings",void 0),Sr([t.Collection([{}],Cr)],o.prototype,"rangeColorSettings",void 0),Sr([t.Complex({},Lr)],o.prototype,"zoomSettings",void 0),Sr([t.Property("None")],o.prototype,"selectionMode",void 0),Sr([t.Property("None")],o.prototype,"highlightMode",void 0),Sr([t.Property("None")],o.prototype,"selectionPattern",void 0),Sr([t.Property("None")],o.prototype,"highlightPattern",void 0),Sr([t.Property(!1)],o.prototype,"isMultiSelect",void 0),Sr([t.Property(!1)],o.prototype,"allowMultiSelection",void 0),Sr([t.Property(!0)],o.prototype,"enableExport",void 0),Sr([t.Property(!1)],o.prototype,"allowExport",void 0),Sr([t.Collection([],Qt)],o.prototype,"selectedDataIndexes",void 0),Sr([t.Property(!1)],o.prototype,"useGroupingSeparator",void 0),Sr([t.Property(!1)],o.prototype,"enableAutoIntervalOnBothAxis",void 0),Sr([t.Property(!1)],o.prototype,"isTransposed",void 0),Sr([t.Property(!1)],o.prototype,"enableCanvas",void 0),Sr([t.Property(null)],o.prototype,"backgroundImage",void 0),Sr([t.Collection([],br)],o.prototype,"indicators",void 0),Sr([t.Property(!0)],o.prototype,"enableAnimation",void 0),Sr([t.Property(null)],o.prototype,"description",void 0),Sr([t.Property(1)],o.prototype,"tabIndex",void 0),Sr([t.Property(!0)],o.prototype,"enableSideBySidePlacement",void 0),Sr([t.Event()],o.prototype,"resized",void 0),Sr([t.Event()],o.prototype,"beforeResize",void 0),Sr([t.Event()],o.prototype,"annotationRender",void 0),Sr([t.Event()],o.prototype,"beforePrint",void 0),Sr([t.Event()],o.prototype,"loaded",void 0),Sr([t.Event()],o.prototype,"beforeExport",void 0),Sr([t.Event()],o.prototype,"afterExport",void 0),Sr([t.Event()],o.prototype,"load",void 0),Sr([t.Event()],o.prototype,"animationComplete",void 0),Sr([t.Event()],o.prototype,"legendRender",void 0),Sr([t.Event()],o.prototype,"textRender",void 0),Sr([t.Event()],o.prototype,"pointRender",void 0),Sr([t.Event()],o.prototype,"seriesRender",void 0),Sr([t.Event()],o.prototype,"axisLabelRender",void 0),Sr([t.Event()],o.prototype,"axisLabelClick",void 0),Sr([t.Event()],o.prototype,"axisRangeCalculated",void 0),Sr([t.Event()],o.prototype,"axisMultiLabelRender",void 0),Sr([t.Event()],o.prototype,"legendClick",void 0),Sr([t.Event()],o.prototype,"multiLevelLabelClick",void 0),Sr([t.Event()],o.prototype,"tooltipRender",void 0),Sr([t.Event()],o.prototype,"sharedTooltipRender",void 0),Sr([t.Event()],o.prototype,"chartMouseMove",void 0),Sr([t.Event()],o.prototype,"chartMouseClick",void 0),Sr([t.Event()],o.prototype,"pointClick",void 0),Sr([t.Event()],o.prototype,"pointDoubleClick",void 0),Sr([t.Event()],o.prototype,"pointMove",void 0),Sr([t.Event()],o.prototype,"chartMouseLeave",void 0),Sr([t.Event()],o.prototype,"chartMouseDown",void 0),Sr([t.Event()],o.prototype,"chartMouseUp",void 0),Sr([t.Event()],o.prototype,"dragComplete",void 0),Sr([t.Event()],o.prototype,"selectionComplete",void 0),Sr([t.Event()],o.prototype,"zoomComplete",void 0),Sr([t.Event()],o.prototype,"onZooming",void 0),Sr([t.Event()],o.prototype,"scrollStart",void 0),Sr([t.Event()],o.prototype,"scrollEnd",void 0),Sr([t.Event()],o.prototype,"scrollChanged",void 0),Sr([t.Event()],o.prototype,"dragStart",void 0),Sr([t.Event()],o.prototype,"drag",void 0),Sr([t.Event()],o.prototype,"dragEnd",void 0),Sr([t.Property("USD")],o.prototype,"currencyCode",void 0),o=Sr([t.NotifyPropertyChanges],o)}(t.Component),Mr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ar=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mr(t,e),t.prototype.calculateDateTimeNiceInterval=function(e,t,i,r,o){void 0===o&&(o=!0);var n,a=new Date(i),s=new Date(r),l=Math.abs((a.getTime()-s.getTime())/864e5);switch(e.actualIntervalType=e.intervalType,e.intervalType){case"Years":n=this.calculateNumericNiceInterval(e,l/365,t);break;case"Quarter":n=this.calculateNumericNiceInterval(e,l/365*4,t);break;case"Months":n=this.calculateNumericNiceInterval(e,l/30,t);break;case"Weeks":n=this.calculateNumericNiceInterval(e,l/7,t);break;case"Days":n=this.calculateNumericNiceInterval(e,l,t);break;case"Hours":n=this.calculateNumericNiceInterval(e,24*l,t);break;case"Minutes":n=this.calculateNumericNiceInterval(e,24*l*60,t);break;case"Seconds":n=this.calculateNumericNiceInterval(e,24*l*60*60,t);break;case"Auto":return(n=this.calculateNumericNiceInterval(e,l/365,t))>=1?(e.actualIntervalType="Years",n):(n=this.calculateNumericNiceInterval(e,l/365*4,t))>=1&&!o?(e.actualIntervalType="Quarter",n):(n=this.calculateNumericNiceInterval(e,l/30,t))>=1?(e.actualIntervalType="Months",n):(n=this.calculateNumericNiceInterval(e,l/7,t))>=1&&!o?(e.actualIntervalType="Weeks",n):(n=this.calculateNumericNiceInterval(e,l,t))>=1?(e.actualIntervalType="Days",n):(n=this.calculateNumericNiceInterval(e,24*l,t))>=1?(e.actualIntervalType="Hours",n):(n=this.calculateNumericNiceInterval(e,24*l*60,t))>=1?(e.actualIntervalType="Minutes",n):(n=this.calculateNumericNiceInterval(e,24*l*60*60,t),e.actualIntervalType="Seconds",n)}return n},t.prototype.getSkeleton=function(e,t,i,r){var o,n=e.actualIntervalType;return e.skeleton?e.skeleton:("Years"===n?o=r?e.isChart?(e.valueType,"y"):"y":e.isChart?"DateTime"===e.valueType&&e.isIntervalInDecimal?"y":"yMMM":"y":"Quarter"===n?o=r?"y":"yMMM":"Months"===n?r?(e.isChart,o="m"):o=e.isChart?"MMMd":"MMM":o="Weeks"===n?r?"m":"MEd":"Days"===n?r?"d":e.isChart?this.getDayFormat(e,t,i):"MMMd":"Hours"===n?r?"t":e.isChart?"DateTime"===e.valueType?"Hm":"EHm":"h":"Minutes"===n?r?"T":e.isChart?"Hms":"hm":r?"T":e.isChart?"Hms":"hms",o)},t.prototype.getMonthFormat=function(e,t,i){return new Date(t).getFullYear()===new Date(i).getFullYear()?e.isIntervalInDecimal?"MMM":"MMM d":"y MMM"},t.prototype.getDayFormat=function(e,t,i){return"DateTime"===e.valueType?new Date(t).getMonth()!==new Date(i).getMonth()?"MMMd":e.isIntervalInDecimal?"d":"Ehm":"yMd"},t.prototype.findCustomFormats=function(e,t,i){var r=e.labelFormat?e.labelFormat:"";return!e.isChart||e.skeleton||"Months"!==e.actualIntervalType||r||(r="DateTime"===e.valueType?this.getMonthFormat(e,t,i):"yMMM"),r},t}(ni),Tr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),kr=function(e){function i(t){return e.call(this,t)||this}return Tr(i,e),i.prototype.calculateRangeAndInterval=function(e,t){this.calculateRange(t),this.getActualRange(t,e),this.applyRangePadding(t,e),this.calculateVisibleLabels(t,this.chart)},i.prototype.getActualRange=function(e,t){var i={skeleton:"full",type:"dateTime"},o=this.chart.intl.getDateParser(i),n=this.chart.intl.getDateFormat(i);null!==e.minimum?this.min=this.chart.isBlazor?Date.parse(e.minimum.toString()):Date.parse(o(n(new Date(r.DataUtil.parse.parseJson({val:e.minimum}).val)))):null!==this.min&&this.min!==Number.POSITIVE_INFINITY||(this.min=Date.parse(o(n(new Date(1970,1,1))))),null!==e.maximum?this.max=this.chart.isBlazor?Date.parse(e.maximum.toString()):Date.parse(o(n(new Date(r.DataUtil.parse.parseJson({val:e.maximum}).val)))):null!==this.max&&this.max!==Number.NEGATIVE_INFINITY||(this.max=Date.parse(o(n(new Date(1970,5,1))))),this.min===this.max&&(this.max=this.max+2592e6,this.min=this.min-2592e6),e.actualRange={},e.doubleRange=new oi(this.min,this.max);var a=this.calculateDateTimeNiceInterval(e,t,e.doubleRange.start,e.doubleRange.end);e.interval?e.actualRange.interval=e.interval:e.actualRange.interval=a,e.actualRange.min=e.doubleRange.start,e.actualRange.max=e.doubleRange.end},i.prototype.applyRangePadding=function(e,t){this.min=e.actualRange.min,this.max=e.actualRange.max;var i,r,o=e.actualRange.interval;if(!te(e)){var n=e.getRangePadding(this.chart);i=new Date(this.min),r=new Date(this.max);var a=e.actualIntervalType;if("None"===n)this.min=i.getTime(),this.max=r.getTime();else if("Additional"===n||"Round"===n)switch(a){case"Years":this.getYear(i,r,n,o);break;case"Months":this.getMonth(i,r,n,o);break;case"Days":this.getDay(i,r,n,o);break;case"Hours":this.getHour(i,r,n,o);break;case"Minutes":var s=i.getMinutes()/o*o,l=r.getMinutes()+(i.getMinutes()-s);"Round"===n?(this.min=new Date(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),s,0).getTime(),this.max=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),l,59).getTime()):(this.min=new Date(i.getFullYear(),r.getMonth(),i.getDate(),i.getHours(),s+-o,0).getTime(),this.max=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),l+o,0).getTime());break;case"Seconds":var h=i.getSeconds()/o*o,c=r.getSeconds()+(i.getSeconds()-h);"Round"===n?(this.min=new Date(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),h,0).getTime(),this.max=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),c,0).getTime()):(this.min=new Date(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),h+-o,0).getTime(),this.max=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),c+o,0).getTime())}}e.actualRange.min=(e.minimum,this.min),e.actualRange.max=(e.maximum,this.max),e.actualRange.delta=e.actualRange.max-e.actualRange.min,e.doubleRange=new oi(e.actualRange.min,e.actualRange.max),this.calculateVisibleRange(t,e)},i.prototype.getYear=function(e,t,i,r){var o=e.getFullYear(),n=t.getFullYear();"Additional"===i?(this.min=new Date(o-r,1,1,0,0,0).getTime(),this.max=new Date(n+r,1,1,0,0,0).getTime()):(this.min=new Date(o,0,0,0,0,0).getTime(),this.max=new Date(n,11,30,23,59,59).getTime())},i.prototype.getMonth=function(e,t,i,r){var o=e.getMonth(),n=t.getMonth();"Round"===i?(this.min=new Date(e.getFullYear(),o,0,0,0,0).getTime(),this.max=new Date(t.getFullYear(),n,new Date(t.getFullYear(),t.getMonth(),0).getDate(),23,59,59).getTime()):(this.min=new Date(e.getFullYear(),o+-r,1,0,0,0).getTime(),this.max=new Date(t.getFullYear(),n+r,2===n?28:30,0,0,0).getTime())},i.prototype.getDay=function(e,t,i,r){var o=e.getDate(),n=t.getDate();"Round"===i?(this.min=new Date(e.getFullYear(),e.getMonth(),o,0,0,0).getTime(),this.max=new Date(t.getFullYear(),t.getMonth(),n,23,59,59).getTime()):(this.min=new Date(e.getFullYear(),e.getMonth(),o+-r,0,0,0).getTime(),this.max=new Date(t.getFullYear(),t.getMonth(),n+r,0,0,0).getTime())},i.prototype.getHour=function(e,t,i,r){var o=e.getHours()/r*r,n=t.getHours()+(e.getHours()-o);"Round"===i?(this.min=new Date(e.getFullYear(),e.getMonth(),e.getDate(),o,0,0).getTime(),this.max=new Date(t.getFullYear(),t.getMonth(),t.getDate(),n,59,59).getTime()):(this.min=new Date(e.getFullYear(),e.getMonth(),e.getDate(),o+-r,0,0).getTime(),this.max=new Date(t.getFullYear(),t.getMonth(),t.getDate(),n+r,0,0).getTime())},i.prototype.calculateVisibleRange=function(e,i){i.visibleRange={min:i.actualRange.min,max:i.actualRange.max,interval:i.actualRange.interval,delta:i.actualRange.delta};var r=!t.isNullOrUndefined(i.zoomingScrollBar)&&i.zoomingScrollBar.isLazyLoad;ie(i)&&!r&&(i.calculateVisibleRangeOnZooming(this.chart),i.calculateAxisRange(e,this.chart),i.visibleRange.interval=i.enableAutoIntervalOnZooming?this.calculateDateTimeNiceInterval(i,e,i.visibleRange.min,i.visibleRange.max):i.visibleRange.interval),i.dateTimeInterval=this.increaseDateTimeInterval(i,i.visibleRange.min,i.visibleRange.interval).getTime()-i.visibleRange.min,i.triggerRangeRender(this.chart,i.visibleRange.min,i.visibleRange.max,i.visibleRange.interval)},i.prototype.calculateVisibleLabels=function(e,i){e.visibleLabels=[];var r,o,n=e.visibleRange.min,a=e.visibleLabels;for(te(e)||(n=this.alignRangeStart(e,n,e.visibleRange.interval).getTime());n<=e.visibleRange.max;)r=t.extend({},t.getValue("properties",e.labelStyle),null,!0),o=a.length?e.visibleLabels[a.length-1].value:n,e.format=i.intl.getDateFormat({format:this.findCustomFormats(e,n,o)||this.blazorCustomFormat(e),type:G(e.skeletonType),skeleton:this.getSkeleton(e,n,o,i.isBlazor)}),e.startLabel=e.format(new Date(e.visibleRange.min)),e.endLabel=e.format(new Date(e.visibleRange.max)),x(n,e.visibleRange)&&ee(i,n,e.format(new Date(n)),r,e),n=this.increaseDateTimeInterval(e,n,e.visibleRange.interval).getTime();"Months"!==e.actualIntervalType&&"Days"!==e.actualIntervalType||!e.isChart||(e.format=i.intl.getDateFormat({format:e.labelFormat||("Months"!==e.actualIntervalType||e.skeleton?"":"y MMM"),type:G(e.skeletonType),skeleton:e.skeleton||("Days"===e.actualIntervalType?"MMMd":"")})),e.getMaxLabelWidth&&e.getMaxLabelWidth(this.chart)},i.prototype.blazorCustomFormat=function(e){return this.chart.isBlazor?"Years"===e.actualIntervalType?e.isIntervalInDecimal?"yyyy":"MMM y":"Days"!==e.actualIntervalType||e.isIntervalInDecimal?"":"ddd HH tt":""},i.prototype.increaseDateTimeInterval=function(e,t,i){var r=new Date(t);e.interval?(e.isIntervalInDecimal=i%1==0,e.visibleRange.interval=i):(i=Math.ceil(i),e.visibleRange.interval=i);var o=e.actualIntervalType;if(e.isIntervalInDecimal)switch(o){case"Years":return r.setFullYear(r.getFullYear()+i),r;case"Quarter":return r.setMonth(r.getMonth()+3*i),r;case"Months":return r.setMonth(r.getMonth()+i),r;case"Weeks":return r.setDate(r.getDate()+7*i),r;case"Days":return r.setDate(r.getDate()+i),r;case"Hours":return r.setHours(r.getHours()+i),r;case"Minutes":return r.setMinutes(r.getMinutes()+i),r;case"Seconds":return r.setSeconds(r.getSeconds()+i),r}else r=this.getDecimalInterval(r,i,o);return r},i.prototype.alignRangeStart=function(e,t,i){var r=new Date(t);switch(e.actualIntervalType){case"Years":var o=Math.floor(Math.floor(r.getFullYear()/i)*i);return r=new Date(o,r.getMonth(),r.getDate(),0,0,0);case"Months":var n=Math.floor(Math.floor(r.getMonth()/i)*i);return r=new Date(r.getFullYear(),n,r.getDate(),0,0,0);case"Days":var a=Math.floor(Math.floor(r.getDate()/i)*i);return r=new Date(r.getFullYear(),r.getMonth(),a,0,0,0);case"Hours":var s=Math.floor(Math.floor(r.getHours()/i)*i);return r=new Date(r.getFullYear(),r.getMonth(),r.getDate(),s,0,0);case"Minutes":var l=Math.floor(Math.floor(r.getMinutes()/i)*i);return r=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),l,0,0);case"Seconds":var h=Math.floor(Math.floor(r.getSeconds()/i)*i);return r=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),h,0)}return r},i.prototype.getDecimalInterval=function(e,t,i){var r=Math.floor(t),o=t-r;switch(i){case"Years":var n=Math.round(12*o);return e.setFullYear(e.getFullYear()+r),e.setMonth(e.getMonth()+n),e;case"Quarter":return e.setMonth(e.getMonth()+3*t),e;case"Months":var a=Math.round(30*o);return e.setMonth(e.getMonth()+r),e.setDate(e.getDate()+a),e;case"Weeks":return e.setDate(e.getDate()+7*t),e;case"Days":var s=Math.round(24*o);return e.setDate(e.getDate()+r),e.setHours(e.getHours()+s),e;case"Hours":var l=Math.round(60*o);return e.setHours(e.getHours()+r),e.setMinutes(e.getMinutes()+l),e;case"Minutes":var h=Math.round(60*o);return e.setMinutes(e.getMinutes()+r),e.setSeconds(e.getSeconds()+h),e;case"Seconds":var c=Math.round(1e3*o);return e.setSeconds(e.getSeconds()+r),e.setMilliseconds(e.getMilliseconds()+c),e}return e},i.prototype.getModuleName=function(){return"DateTime"},i.prototype.destroy=function(){},i}(Ar),_r=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Or=function(e){function i(t){return e.call(this,t)||this}return _r(i,e),i.prototype.calculateRangeAndInterval=function(e,t){this.calculateRange(t),this.getActualRange(t,e),this.applyRangePadding(t,e),this.calculateVisibleLabels(t)},i.prototype.getActualRange=function(e,t){this.initializeDoubleRange(e),e.actualRange={},e.interval?e.actualRange.interval=Math.ceil(e.interval):e.actualRange.interval=Math.max(1,Math.floor(e.doubleRange.delta/re(t,e))),e.actualRange.min=e.doubleRange.start,e.actualRange.max=e.doubleRange.end,e.actualRange.delta=e.doubleRange.delta},i.prototype.applyRangePadding=function(e,t){var i="BetweenTicks"===e.labelPlacement&&"PolarRadar"!==this.chart.chartAreaType?.5:0;i>0?(e.actualRange.min-=i,e.actualRange.max+=i):e.actualRange.max+=e.actualRange.max?0:.5,e.doubleRange=new oi(e.actualRange.min,e.actualRange.max),e.actualRange.delta=e.doubleRange.delta,this.calculateVisibleRange(t,e)},i.prototype.calculateVisibleLabels=function(e){e.visibleLabels=[];var i,r=Math.ceil(e.visibleRange.min);(e.zoomFactor<1||e.zoomPosition>0)&&(r=e.visibleRange.min-e.visibleRange.min%e.visibleRange.interval);var o;for(e.startLabel=e.labels[Math.round(e.visibleRange.min)],e.endLabel=e.labels[Math.floor(e.visibleRange.max)];r<=e.visibleRange.max;r+=e.visibleRange.interval)i=t.extend({},t.getValue("properties",e.labelStyle),null,!0),x(r,e.visibleRange)&&e.labels.length>0&&(o=Math.round(r),ee(this.chart,o,e.labels[o]?e.labels[o].toString():o.toString(),i,e));e.getMaxLabelWidth&&e.getMaxLabelWidth(this.chart)},i.prototype.getModuleName=function(){return"Category"},i.prototype.destroy=function(){},i}(Ar),Er=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zr=function(e){function i(t){return e.call(this,t)||this}return Er(i,e),i.prototype.calculateRangeAndInterval=function(e,t){this.calculateRange(t),this.getActualRange(t,e),this.calculateVisibleRange(e,t),this.calculateVisibleLabels(t,this.chart)},i.prototype.getActualRange=function(e,t){this.initializeDoubleRange(e),this.min=this.min<0?0:this.min;var i=v(this.min,e.logBase);i=isFinite(i)?i:this.min;var r=1===this.max?1:v(this.max,e.logBase);r=isFinite(i)?r:this.max,this.min=Math.floor(i/1),e.series&&e.series.some(function(e){return(-1!==e.type.indexOf("Column")||-1!==e.type.indexOf("Bar"))&&-1===e.type.indexOf("Range")})&&(this.min=this.min<=0?+this.min-1:this.min),this.max=Math.ceil(r/1),e.actualRange.interval=e.interval||this.calculateLogNiceInterval(this.max-this.min,t,e),e.actualRange.min=this.min,e.actualRange.max=this.max,e.actualRange.delta=this.max-this.min},i.prototype.calculateVisibleRange=function(e,i){i.visibleRange={interval:i.actualRange.interval,max:i.actualRange.max,min:i.actualRange.min,delta:i.actualRange.delta};var r=!t.isNullOrUndefined(i.zoomingScrollBar)&&i.zoomingScrollBar.isLazyLoad;(i.zoomFactor<1||i.zoomPosition>0)&&!r&&(i.calculateVisibleRangeOnZooming(this.chart),i.visibleRange.interval=i.enableAutoIntervalOnZooming?this.calculateLogNiceInterval(i.doubleRange.delta,e,i):i.visibleRange.interval,i.visibleRange.interval=0===Math.floor(i.visibleRange.interval)?1:Math.floor(i.visibleRange.interval),i.triggerRangeRender(this.chart,i.visibleRange.min,i.visibleRange.max,i.visibleRange.interval))},i.prototype.calculateLogNiceInterval=function(e,t,i){for(var r=re(t,i),o=e,n=Math.pow(i.logBase,Math.floor(v(o,10))),a=0,s=i.intervalDivs.length;a0)&&(r=e.visibleRange.min-e.visibleRange.min%e.visibleRange.interval);var a=this.getFormat(e),s=null!==a.match("{value}"),l=Math.pow(e.logBase,e.visibleRange.min);for(e.format=i.intl.getNumberFormat({format:s?"":a,useGrouping:i.useGroupingSeparator,maximumFractionDigits:l<1?20:3}),e.startLabel=e.format(l<1?+l.toPrecision(1):l),e.endLabel=e.format(Math.pow(e.logBase,e.visibleRange.max));r<=e.visibleRange.max;r+=e.visibleRange.interval)o=t.extend({},t.getValue("properties",e.labelStyle),null,!0),x(r,e.visibleRange)&&(n=Math.pow(e.logBase,r),ee(this.chart,r,this.formatValue(e,s,a,n<1?+n.toPrecision(1):n),o,e));e.getMaxLabelWidth&&e.getMaxLabelWidth(this.chart)},i.prototype.getModuleName=function(){return"Logarithmic"},i.prototype.destroy=function(){},i}(ni),Ir=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Dr=function(e){function i(t){return e.call(this,t)||this}return Ir(i,e),i.prototype.calculateRangeAndInterval=function(e,t){this.axisSize=e,this.calculateRange(t),this.getActualRange(t,e),this.applyRangePadding(t,e),this.calculateVisibleLabels(t)},i.prototype.calculateVisibleLabels=function(e){e.visibleLabels=[];var i,r="BetweenTicks"===e.labelPlacement?.5:0;"Auto"===e.intervalType?this.calculateDateTimeNiceInterval(e,this.axisSize,parseInt(e.labels[0],10),parseInt(e.labels[e.labels.length-1],10)):e.actualIntervalType=e.intervalType,e.format=this.chart.intl.getDateFormat({format:e.labelFormat||this.blazorCustomFormat(e),type:G(e.skeletonType),skeleton:this.getSkeleton(e,null,null,this.chart.isBlazor)});for(var o=0;ot.visibleRange.max&&(e=t.visibleRange.max),e},e.prototype.dateParse=function(e,t){var i=t.intl.getDateParser({skeleton:"full",type:"dateTime"}),o=t.intl.getDateFormat({skeleton:"full",type:"dateTime"});return new Date(Date.parse(i(o(new Date(r.DataUtil.parse.parseJson({val:e}).val)))))},e.prototype.renderStripLine=function(e,t,i){var r,o=e.element.id+"_stripline_"+t+"_",n=e.chartAxisLayoutPanel.seriesClipRect,a=0,s=0,l=null,h=new Di(o+"ClipRect","transparent",{width:1,color:"Gray"},1,{x:e.initialClipRect.x,y:e.initialClipRect.y,width:e.initialClipRect.width,height:e.initialClipRect.height}),c=e.renderer.createGroup({id:o+"collections","clip-path":"url(#"+o+"ClipRect)"});e.enableCanvas||c.appendChild(K(e.redraw,h,e.renderer));for(var d=0,p=i;d=u.visibleRange.min&&sl?0:l,d=a[0]&&a[0].y>h?0:h,p=0,u=0,g=0,y=a;g=l||Math.abs(d-u)>=h)&&(i.push(m),c=p,d=u)}for(var v,f=0;f=e.delay&&(n.style.visibility="visible",r=Math.abs(Math.round((e.timeStamp-e.delay)*s/e.duration)),n.setAttribute("stroke-dasharray",r+","+s))},end:function(){n.setAttribute("stroke-dasharray",a),e.chart.trigger("animationComplete",{series:e.chart.isBlazor?{}:e})}})},e.prototype.storePointLocation=function(e,t,r,o){var n=t.marker&&t.marker.width?t.marker.width:0,a=t.marker&&t.marker.height?t.marker.height:0;e.symbolLocations.push(o(e.xValue,e.yValue,t.xAxis,t.yAxis,r,t)),e.regions.push(new i.Rect(e.symbolLocations[0].x-n,e.symbolLocations[0].y-a,2*n,2*a))},e.prototype.withinYRange=function(e,t){return e.yValue>=t.visibleRange.min&&e.yValue<=t.visibleRange.max},e.prototype.getFirstLastVisiblePoint=function(e){for(var t=null,i=null,r=0,o=e;r=t.delay&&(o.style.visibility="visible",e.chart.requireInvertedAxis?(r=a(t.timeStamp-t.delay,0,s,t.duration),o.setAttribute("transform","translate("+h+" "+c+") scale(1,"+r/s+") translate("+-h+" "+-c+")")):(r=a(t.timeStamp-t.delay,0,l,t.duration),o.setAttribute("transform","translate("+h+" "+c+") scale("+r/l+", 1) translate("+-h+" "+-c+")")))},end:function(){o.setAttribute("transform","translate(0,0)"),e.chart.trigger("animationComplete",{series:e.chart.isBlazor?{}:e})}})},e}(),Fr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Vr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fr(t,e),t.prototype.render=function(e,t,r,o){for(var n,a,s="",l=null,h="M",c=e.chart&&"PolarRadar"===e.chart.chartAreaType,d=e.emptyPointSettings&&"Drop"===e.emptyPointSettings.mode,p=c?I:ve,u="TrendLine"===e.category?e.points:this.enableComplexProperty(e),g=0,y=u;g=0==!i.yAxis.isInversed?t.y:t.y+t.height}),this.getRegion(e,t,i),"RangeColumn"===i.type&&e.symbolLocations.push({x:t.x+t.width/2,y:t.y+t.height})},e.prototype.updateYRegion=function(e,t,i){e.symbolLocations.push({x:"BoxPlot"===i.seriesType||-1!==i.seriesType.indexOf("HighLow")||e.yValue>=0==!i.yAxis.isInversed?t.x+t.width:t.x,y:t.y+t.height/2}),this.getRegion(e,t,i),"RangeColumn"===i.type&&e.symbolLocations.push({x:t.x,y:t.y+t.height/2})},e.prototype.renderMarker=function(e){e.marker&&e.marker.visible&&e.chart.markerRender.render(e)},e.prototype.getRegion=function(e,t,r){if(0===e.y){var o=r.marker&&r.marker.width?r.marker.width:0,n=r.marker&&r.marker.height?r.marker.height:0;e.regions.push(new i.Rect(e.symbolLocations[0].x-o,e.symbolLocations[0].y-n,2*o,2*n))}else e.regions.push(t)},e.prototype.triggerEvent=function(e,t,i,r){var o={cancel:!1,name:"pointRender",series:e,point:t,fill:e.setPointColor(t,i),border:e.setBorderColor(t,r)};return e.chart.trigger("pointRender",o),t.color=o.fill,o},e.prototype.drawRectangle=function(e,t,r,o){var n=e.chart;if((n.requireInvertedAxis?r.height:r.width)<=0)return null;var a;a=0===t.y?this.calculateRoundedRectPath(r,0,0,0,0):this.calculateRoundedRectPath(r,e.cornerRadius.topLeft,e.cornerRadius.topRight,e.cornerRadius.bottomLeft,e.cornerRadius.bottomRight);var s="Indicator"===e.category?n.element.id+"_Indicator_"+e.index+"_"+e.name+"_Point_"+t.index:n.element.id+"_Series_"+e.index+"_Point_"+t.index,l=Ne(n.redraw,s),h=l?l.getAttribute("d"):"",c=new i.PathOption(s,o.fill,o.border.width,o.border.color,e.opacity,e.dashArray,a),d=n.renderer.drawPath(c,new Int32Array([e.clipRect.x,e.clipRect.y]));switch(e.seriesType){case"XY":d.setAttribute("aria-label",t.x.toString()+":"+t.yValue.toString());break;case"HighLow":d.setAttribute("aria-label",t.x.toString()+":"+t.high.toString()+":"+t.low.toString())}be(e.chart.enableCanvas,e.seriesElement,d,n.redraw),e.chart.enableCanvas||J(d,a,n.redraw,h,n.duration)},e.prototype.animate=function(e){for(var t=e.seriesElement.childNodes,i="Indicator"===e.category?0:1,r=0,o=g(e);r-1?(o=z(0,i.yAxis)*i.yAxis.rect.width,a=o,s=n):(o=+r.regions[0].x,s=d?n:n+p,a=-1!==i.seriesType.indexOf("HighLow")||-1!==i.type.indexOf("Waterfall")?o+u/2:d!==i.yAxis.isInversed?o+u:o)):(o=+r.regions[0].x,i.type.indexOf("Stacking")>-1?(n=(1-z(0,i.yAxis))*i.yAxis.rect.height,a=o,s=n):(n=+r.regions[0].y,s=-1!==i.seriesType.indexOf("HighLow")||-1!==i.type.indexOf("Waterfall")?n+p/2:d!==i.yAxis.isInversed?n:n+p,a=d?o:o+u));var g;t.isNullOrUndefined(e)||(e.style.visibility="hidden",new t.Animation({}).animate(e,{duration:h,delay:l.delay,progress:function(t){t.timeStamp>=t.delay&&(e.style.visibility="visible",i.chart.requireInvertedAxis?(u=u||1,g=c(t.timeStamp-t.delay,0,u,t.duration),e.setAttribute("transform","translate("+a+" "+s+") scale("+g/u+", 1) translate("+-a+" "+-s+")")):(p=p||1,g=c(t.timeStamp-t.delay,0,p,t.duration),e.setAttribute("transform","translate("+a+" "+s+") scale(1,"+g/p+") translate("+-a+" "+-s+")")))},end:function(){e.setAttribute("transform","translate(0,0)");var t=i.seriesElement;if((e===t.lastElementChild||r.index===i.points.length-1||"Waterfall"===i.type&&e===t.children[t.childElementCount-2])&&(i.chart.trigger("animationComplete",{series:i.chart.isBlazor?{}:i}),"Waterfall"===i.type))for(var o=t.childNodes,n=0;n-1?o.color||e.interior:e.border.color,"stroke-width":t["stroke-width"],fill:e.type.indexOf("Line")>-1?"none":o.color||e.interior,id:t.id+"_Segment_"+r,d:t.d}).id),c.d,s.redraw),e.seriesElement.appendChild(s.renderer.drawPath(c))})}(u)},t.prototype.includeSegment=function(e,t,i,r){if(r<=0)return e.push({value:t.visibleRange.max,color:i.interior}),null;this.getAxisValue(e[r-1].value,t,i.chart)0&&l.y-s.y>0?(n=new Di(i.chart.element.id+"_ChartSegment"+i.index+"ClipRect_"+r,"transparent",{width:1,color:"Gray"},1,{x:s.x,y:s.y,width:l.x-s.x,height:l.y-s.y}),i.seriesElement.appendChild(K(i.chart.redraw,n,i.chart.renderer)),"url(#"+i.chart.element.id+"_ChartSegment"+i.index+"ClipRect_"+r+")"):null},t.prototype.getAxisValue=function(e,t,i){if(null===e&&(e=t.visibleRange.max),"DateTime"===t.valueType){var o={skeleton:"full",type:"dateTime"};return Date.parse(i.intl.getDateParser(o)(i.intl.getDateFormat(o)(new Date(r.DataUtil.parse.parseJson({val:e}).val))))}if(t.valueType.indexOf("Category")>-1){var n="DateTimeCategory"===t.valueType?e.getTime().toString():e;return t.labels.indexOf(n)<0?+e:t.labels.indexOf(n)}return+e},t}(Nr),Wr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ur=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wr(t,e),t.prototype.render=function(e,t,r,o){var n=null,a="",s=e.chart&&"PolarRadar"===e.chart.chartAreaType,l=Math.max(e.yAxis.visibleRange.min,0);s&&(l=this.getFirstLastVisiblePoint(e.points).first.yValue);for(var h,c,d=e.emptyPointSettings&&"Drop"===e.emptyPointSettings.mode,p=e.border?e.border.width:0,u=e.border?e.border.color:"transparent",g="PolarRadar"===e.chart.chartAreaType?I:ve,y=this.enableComplexProperty(e),m=0;m1&&""!==a?a+this.getAreaPathDirection(e.points[e.points.length-1].xValue,"PolarRadar"===e.chart.chartAreaType?e.points[e.points.length-1].yValue:l,e,o,g,null,"L"):""),e,""),this.renderMarker(e)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"AreaSeries"},t.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},t}(Gr),Zr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),qr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zr(t,e),t.prototype.render=function(e){for(var t,i,r=Math.max(e.yAxis.visibleRange.min,0),o=this.getSideBySideInfo(e),n=0,a=e.points;n0||e.majorTickLines.width>0)&&this.drawXAxisGridLine(e,o),e.visible&&e.internalVisibility&&this.drawXAxisLabels(e,o)):(this.drawYAxisGridLine(e,o),e.lineStyle.width>0&&this.drawYAxisLine(e,o),e.visible&&e.internalVisibility&&this.drawYAxisLabels(e,o)),i.appendChild(this.element);return i.appendChild(this.element),be(t.enableCanvas,t.svgObject,i,t.redraw),r},t.prototype.drawYAxisLine=function(e,t){var i=this.chart,r={},o=B(N(e.visibleLabels[0].value,e),this.startAngle),n="M "+this.centerX+" "+this.centerY+"L "+(this.centerX+i.radius*o.x)+" "+(this.centerY+i.radius*o.y);r={id:i.element.id+"AxisLine_"+t,d:n,"stroke-dasharray":e.lineStyle.dashArray,"stroke-width":e.lineStyle.width,stroke:e.lineStyle.color||i.themeStyle.axisLine};var a=i.renderer.drawPath(r);this.setPointerEventNone(a),i.yAxisElements.appendChild(a)},t.prototype.drawYAxisLabels=function(e,t){var r,o,n,a,s=this.chart,l=0,h=0,c=this.startAngle<0?this.startAngle+360:this.startAngle,d=[],p=[];p[0]=!0;for(var u=e.labelIntersectAction,g=s.renderer.createGroup({id:s.element.id+"AxisLabels"+t}),y=B(N(e.visibleLabels[0].value,e),this.startAngle),m=0,v=e.visibleLabels.length;m=0;f--){if(f=0===f?0:f===m?f-1:f,p[f]&&Le(d[m],d[f])){a=!0,p[m]=!1;break}p[m]=!0}if(a)continue;for(var b=0,x=this.visibleAxisLabelRect;b0)if("Polar"===c.visibleSeries[0].type){for(y=0;y0){n=B(N(e.visibleLabels[0].value,e),this.startAngle);for(var m=0;m0&&(e.minorGridLines.width>0||e.minorTickLines.width>0)&&"Category"!==e.valueType&&"Radar"!==s.visibleSeries[0].type&&(c=(a=this.drawAxisMinorLine(e,i,c,d))[0],d=a[1]),this.renderTickLine(e,t,h,d,y),this.renderGridLine(e,t,l,c,y)},t.prototype.drawAxisMinorLine=function(e,t,i,r){for(var o,n,a,s=t,l=e.visibleRange,h=[],c=0;cthis.centerX&&y?"end":"start"),h=e.visibleLabels[S],a=h.text,e.enableTrim||"Trim"===b)for(var P=e.visibleLabels[S].originalText,L=void 0,R=void 0,M=e.labelPosition,A=d.availableSize.width,T=P.length,k=T-1;k>=0;--k)if(L=P.substring(0,k)+"...",R=i.measureText(L,e.labelStyle).width,p===A/2?p-R/2>=0&&p+R/2<=A:"Outside"===M&&(p>=A/2&&p+R<=A||p<=A/2&&p-R>=0)||"Inside"===M&&(p+R<=A/2||p-R>=A/2)){a=k===T-1?P:L,h.size.width=i.measureText(a,e.labelStyle).width,h.text=a;break}if(v[S]=this.getLabelRegion(p,u,h,m),0===S?s=p:S===e.visibleLabels.length-1&&"Category"!==e.valueType&&(l=i.measureText(a,e.labelStyle).height,a=(l+=p)>s?"":a),0!==S&&"Hide"===b)for(var _=S;_>=0;_--){if(_=0===_?0:_===S?_-1:_,f[_]&&Le(v[S],v[_])){c=!0,f[S]=!1;break}f[S]=!0}if(!c&&r&&(c=Le(v[S],r))){var O=this.getAvailableSpaceToTrim(r,v[S]);O>0&&(a=Ie(O,e.visibleLabels[S].originalText,e.labelStyle),c=!1)}o=new i.TextOption(d.element.id+t+"_AxisLabel_"+S,p,u,m,a,"","central"),c||(this.visibleAxisLabelRect.push(v[S]),Ve(d.renderer,o,h.labelStyle,h.labelStyle.color||d.themeStyle.axisLabel,g,!1,d.redraw,!0,!0,null,null,null,null,d.enableCanvas))}this.element.appendChild(g)},t.prototype.getAvailableSpaceToTrim=function(e,t){var i=e.x,r=i+e.width,o=t.x,n=o+t.width,a=0;return o>i&&or?a=n-r:o>i&&oi&&ni&&n>r&&o0&&(s=(l=he(h.element.id+"_MajorTickLine_"+t+"_"+n))?l.getAttribute("d"):null,a=new i.PathOption(h.element.id+"_MajorTickLine_"+t+"_"+n,"transparent",e.majorTickLines.width,e.majorTickLines.color||h.themeStyle.majorTickLine,null,null,r),l=h.renderer.drawPath(a),this.setPointerEventNone(l),be(h.enableCanvas,h.yAxisElements,l,h.redraw,!0,"x","y",null,s)),e.minorTickLines.width>0&&(s=(l=he(h.element.id+"_MinorTickLine_"+t+"_"+n))?l.getAttribute("d"):null,a=new i.PathOption(h.element.id+"_MinorTickLine_"+t+"_"+n,"transparent",e.minorTickLines.width,e.minorTickLines.color||h.themeStyle.minorTickLine,null,null,o),l=h.renderer.drawPath(a),this.setPointerEventNone(l),be(h.enableCanvas,h.yAxisElements,l,h.redraw,!0,"x","y",null,s))},t.prototype.renderGridLine=function(e,t,r,o,n){var a,s,l,h=this.chart;e.majorGridLines.width>0&&(s=(l=he(h.element.id+"_MajorGridLine_"+t+"_"+n))?l.getAttribute("d"):null,a=new i.PathOption(h.element.id+"_MajorGridLine_"+t+"_"+n,"transparent",e.majorGridLines.width,e.majorGridLines.color||h.themeStyle.majorGridLine,null,e.majorGridLines.dashArray,r),be(h.enableCanvas,this.element,h.renderer.drawPath(a),h.redraw,!0,"x","y",null,s)),e.minorGridLines.width>0&&(s=(l=he(h.element.id+"_MinorGridLine_"+t+"_"+n))?l.getAttribute("d"):null,a=new i.PathOption(h.element.id+"_MinorGridLine_"+t+"_"+n,"transparent",e.minorGridLines.width,e.minorGridLines.color||h.themeStyle.minorGridLine,null,e.minorGridLines.dashArray,o),be(h.enableCanvas,this.element,h.renderer.drawPath(a),h.redraw,!0,"x","y",null,s))},t.prototype.setPointerEventNone=function(e){e&&e.setAttribute("style","pointer-events:none")},t}(Nr),Jr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Kr=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Jr(r,e),r.prototype.render=function(e,i,r,o){for(var n=G(e.drawType),a=r.minimum,s=r.maximum,l=0,h=e.points;ls)}e.points.length&&(e.drawType.indexOf("Column")>-1?this.columnDrawTypeRender(e,i,r):e.chart[n+"SeriesModule"].render(e,i,r,o))},r.prototype.columnDrawTypeRender=function(e,t,r){var o,n,a,s,l,h,c,d,p,u,g,y,m,f,b,x,w,C,P,L,R=t.actualRange.min,M=e.clipRect.width/2+e.clipRect.x,A=e.clipRect.height/2+e.clipRect.y,T="RangeColumn"===e.drawType,k="Polar"===e.type,_="Logarithmic"===r.valueType,O="StackingColumn"===e.drawType,E="",I=0,D=(e.points[1]?e.points[1].xValue:2*e.points[0].xValue)-e.points[0].xValue,B="Category"===t.valueType&&"BetweenTicks"===t.labelPlacement?0:t.isInversed?-D/2:D/2,N="DateTime"===t.valueType?t.dateTimeInterval:1;this.getSeriesPosition(e);var F=t.isInversed?e.rectCount-1-e.position:e.position;do{I+=N,R+=N}while(R<=t.actualRange.max-("Category"===t.valueType?0:1));for(var V=0,j=e.points;Vr.actualRange.max?r.actualRange.max:f):(m=r.visibleRange.min,f=H.yValue>r.actualRange.max?r.actualRange.max:H.yValue),p=M+(h=m===f?0:e.chart.radius*z(f,r))*Math.cos(a),u=M+h*Math.cos(s),g=A+h*Math.sin(a),y=A+h*Math.sin(s),x=M+(b=e.chart.radius*z(0===m&&0!==r.visibleRange.min?r.visibleRange.min:m,r))*Math.cos(a),w=A+b*Math.sin(a),C=M+b*Math.cos(s),P=A+b*Math.sin(s),E=k?"M "+p+" "+g+" A "+h+" "+h+" 0 "+L+" 1 "+u+" "+y+" L "+C+" "+P+" A "+b+" "+b+" 1 0 0 "+x+" "+w+" Z":"M "+p+" "+g+" L "+u+" "+y+" L "+C+" "+P+" L "+x+" "+w+" Z",H.regionData=new Ei(c,d,b,h,l),n=this.triggerEvent(e.chart,e,H),o=new i.PathOption(e.chart.element.id+"_Series_"+e.index+"_Point_"+H.index,n.fill,n.border.width,n.border.color,e.opacity,e.dashArray,E),n.cancel||(this.appendLinePath(o,e,""),k?(H.symbolLocations.push({x:M+h*Math.cos(a+(s-a)/2),y:A+h*Math.sin(a+(s-a)/2)}),T&&H.symbolLocations.push({x:M+b*Math.cos(a+(s-a)/2),y:A+b*Math.sin(a+(s-a)/2)})):(H.symbolLocations.push({x:(p+u)/2,y:(g+y)/2}),T&&H.symbolLocations.push({x:(C+x)/2,y:(P+w)/2}))))}this.renderMarker(e),e.isRectSeries=!0},r.prototype.triggerEvent=function(e,t,i){var r={cancel:!1,name:"pointRender",series:t,point:i,fill:t.setPointColor(i,t.interior),border:t.setBorderColor(i,{width:t.border.width,color:t.border.color})};return e.trigger("pointRender",r),i.color=r.fill,r},r.prototype.getSeriesPosition=function(e){for(var t=[],i=[],r={rectCount:0,position:null},o=0,n=e.chart.visibleSeries;ot.delay&&(t.element.style.visibility="visible",s=(t.timeStamp-t.delay)/t.duration,e.setAttribute("transform","translate("+n+" "+a+") scale("+s+") translate("+-n+" "+-a+")"))},end:function(){e.style.visibility="visible",e.removeAttribute("transform"),o.chart.trigger("animationComplete",{series:o.chart.isBlazor?{}:o})}})},r.prototype.getPolarIsInversedPath=function(e,t){var i,r,o,n=this.chart.radius,a=t,s=e.isInversed?"1 1 ":"1 0 ";return i=B(N(e.visibleLabels[0].value,e),this.startAngle),r=this.centerX+n*i.x,o=this.centerY+n*i.y,a+="L "+r+" "+o+" A "+n+" "+n+" 0 "+s+r+" "+(this.centerY+n)+" A "+n+" "+n+" 0 "+s+r+" "+o+" "},r.prototype.getModuleName=function(){return"PolarSeries"},r.prototype.destroy=function(){},r}($r),eo=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),to=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return eo(i,e),i.prototype.render=function(e,i,r,o){for(var n=G(e.drawType),a=r.minimum,s=r.maximum,l=0,h=e.points;ls)}e.points.length&&(-1===e.drawType.indexOf("Column")?e.chart[n+"SeriesModule"].render(e,i,r,o):this.columnDrawTypeRender(e,i,r))},i.prototype.getRadarIsInversedPath=function(e,t){var i,r,o=this.chart.radius,n=e.visibleLabels.length,a=t;r=B(N(e.visibleLabels[0].value,e),this.startAngle),i=this.centerY+o*r.y,a+=" L "+(this.centerX+o*r.x)+" "+i+" ";for(var s=n-1;s>=0;s--)r=B(N(e.visibleLabels[s].value,e),this.startAngle),i=this.centerY+o*r.y,a+="L "+(this.centerX+o*r.x)+" "+i+" ";return a},i.prototype.getModuleName=function(){return"RadarSeries"},i.prototype.destroy=function(){},i}(Kr),io=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ro=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return io(t,e),t.prototype.render=function(e){for(var t,i,r=this.getSideBySideInfo(e),o=e.stackedValues,n=0,a=e.points;ne.close?t.bullFillColor:t.bearFillColor:e.open>e.close?t.bullFillColor:t.bearFillColor},t.prototype.getPathString=function(e,t,i){var r="",o=i.chart.requireInvertedAxis?e.y+e.height/2:e.x+e.width/2;return r+=i.chart.requireInvertedAxis?"M "+e.x+" "+o+" L "+t.x+" "+o:"M "+o+" "+e.y+" L "+o+" "+t.y,r=r.concat(" M "+t.x+" "+t.y+" L "+(t.x+t.width)+" "+t.y+" L "+(t.x+t.width)+" "+(t.y+t.height)+" L "+t.x+" "+(t.y+t.height)+" Z"),r+=i.chart.requireInvertedAxis?" M "+(t.x+t.width)+" "+o+" L "+(e.x+e.width)+" "+o:" M "+o+" "+(t.y+t.height)+" L "+o+" "+(e.y+e.height)},t.prototype.drawCandle=function(e,t,r,o,n){if((e.chart.requireInvertedAxis?r.height:r.width)<=0)return null;var a=e.enableSolidCandles?o.fill:t.open>t.close?o.fill:"transparent";o.border.color=o.fill;var s=new i.PathOption(e.chart.element.id+"_Series_"+e.index+"_Point_"+t.index,a,o.border.width,o.border.color,e.opacity,e.dashArray,n),l=he(s.id),h=l?l.getAttribute("d"):null,c=e.chart.renderer.drawPath(s,new Int32Array([e.clipRect.x,e.clipRect.y]));c.setAttribute("aria-label",t.x.toString()+":"+t.high.toString()+":"+t.low.toString()+":"+t.close.toString()+":"+t.open.toString()),e.chart.enableCanvas||e.seriesElement.appendChild(c),J(l,n,e.chart.redraw,h)},t.prototype.doAnimation=function(e){this.animate(e)},t.prototype.getModuleName=function(){return"CandleSeries"},t.prototype.destroy=function(){},t}(jr),ao=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),so=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ao(t,e),t.prototype.render=function(e){e.isRectSeries=!0;for(var t,i,r=this.getSideBySideInfo(e),o=e.stackedValues,n=g(e),a=0,s=n;a0&&(a=ve(d[d.length-1].xValue+n,d[d.length-1].yValue,t,r,o),l=l.concat(h+" "+a.x+" "+a.y+" "));var y=new i.PathOption(e.chart.element.id+"_Series_"+e.index,"transparent",e.width,e.interior,e.opacity,e.dashArray,l);this.appendLinePath(y,e,""),this.renderMarker(e)},t.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"StepLineSeries"},t}(Nr),co=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),po=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return co(t,e),t.prototype.render=function(e,t,r,o){var n,a,s,l,h,c=null,d="",p=this.enableComplexProperty(e),u=p.length,g=Math.max(e.yAxis.visibleRange.min,0),y=null;h="Category"===t.valueType&&"BetweenTicks"===t.labelPlacement?.5:0;for(var m=0;m1&&""!==d?(d+="L "+(a=ve((c={x:p[u-1].xValue+h,y:p[u-1].yValue}).x,c.y,t,r,o)).x+" "+a.y+" ",d+="L "+(a=ve((c={x:p[u-1].xValue+h,y:g}).x,c.y,t,r,o)).x+" "+a.y+" "):d="";var v=new i.PathOption(e.chart.element.id+"_Series_"+e.index,e.interior,e.border.width,e.border.color,e.opacity,e.dashArray,d);this.appendLinePath(v,e,""),this.renderMarker(e)},t.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"StepAreaSeries"},t}(Nr),uo=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),go=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uo(t,e),t.prototype.render=function(e,t,r,o){var n,a,s="PolarRadar"===e.chart.chartAreaType,l=s?I:ve,h="",c=this.enableComplexProperty(e),d=c.length,p=e.stackedValues,u=s?Math.max(e.yAxis.visibleRange.min,p.endValues[0]):Math.max(e.yAxis.visibleRange.min,p.startValues[0]),g=0;d>0&&(n=l(c[0].xValue,u,t,r,o,e),h=h.concat("M "+n.x+" "+n.y+" "));for(var y=e.chart&&"PolarRadar"===e.chart.chartAreaType,m=0;m=g;b--)a=l(c[b].xValue,p.startValues[b],t,r,o,e),h=h.concat("L "+a.x+" "+a.y+" ");c[m+1]&&c[m+1].visible&&(!y||y&&this.withinYRange(c[m+1],r))&&(n=l(c[m+1].xValue,p.startValues[m+1],t,r,o,e),h=h.concat("M "+n.x+" "+n.y+" ")),g=m+1}if("PolarRadar"===e.chart.chartAreaType&&c.length>1){var v=this.getFirstLastVisiblePoint(e.points),f=this.chart;h+="L "+(a=l((n={x:v.first.xValue,y:p.endValues[v.first.index]}).x,n.y,t,r,o,e)).x+" "+a.y+" ",1===this.chart.visible&&(t.isInversed||r.isInversed)&&(this.chart.enableAnimation=!1,h="Polar"===e.type?f.polarSeriesModule.getPolarIsInversedPath(t,h):f.radarSeriesModule.getRadarIsInversedPath(t,h))}if(!y||y&&e.index!==this.getFirstSeriesIndex(e.chart.visibleSeries))for(var b=d-1;b>=g;b--)if(!y||c[b].visible){var x=this.getPreviousSeries(e);"Drop"===x.emptyPointSettings.mode&&x.points[b].isEmpty||(a=l(c[b].xValue,p.startValues[b],t,r,o,e),p.startValues[b]===p.endValues[b]&&(a.y=Math.floor(a.y)),h=h.concat((b===d-1&&s?"M":"L")+" "+a.x+" "+a.y+" "))}var w=new i.PathOption(e.chart.element.id+"_Series_"+e.index,e.interior,e.border.width,e.border.color,e.opacity,e.dashArray,h);this.appendLinePath(w,e,""),this.renderMarker(e)},t.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"StackingAreaSeries"},t.prototype.getPreviousSeries=function(e){for(var t=e.chart.visibleSeries,i=0,r=t.length;i=C;R--)g=f[R].index,L=0===R?0:f[R-1].index,0!==R&&(v.startValues[g]v.startValues[L])?(n=ve(f[g].xValue,v.startValues[g],t,r,o),m=m.concat("L "+n.x+" "+n.y+" "),n=ve(f[g].xValue,v.startValues[L],t,r,o)):n=ve(f[g].xValue,v.startValues[g],t,r,o),m=m.concat("L "+n.x+" "+n.y+" ");C=P+1,y=null,w=null}if(""!==m){x>1&&(g=f[x-1].index,m+="L "+(a=ve((y={x:f[x-1].xValue+p,y:v.endValues[g]}).x,y.y,t,r,o)).x+" "+a.y+" ",m+="L "+(a=ve((y={x:f[x-1].xValue+p,y:v.startValues[g]}).x,y.y,t,r,o)).x+" "+a.y+" ");for(R=x-1;R>=C;R--){var M=void 0;f[R].visible&&(g=f[R].index,h=ve(f[R].xValue,v.startValues[g],t,r,o),m=m.concat("L "+h.x+" "+h.y+" ")),0===R||f[R-1].visible||(M=this.getNextVisiblePointIndex(f,R)),0!==R&&(u=M||R-1,g=M?f[M].index:f[R-1].index,c=ve(f[u].xValue,v.startValues[g],t,r,o),m=m.concat("L "+h.x+" "+c.y+" "))}s=new i.PathOption(e.chart.element.id+"_Series_"+e.index,e.interior,e.border.width,e.border.color,e.opacity,e.dashArray,m),this.appendLinePath(s,e,""),this.renderMarker(e)}},t.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"StackingStepAreaSeries"},t.prototype.getNextVisiblePointIndex=function(e,t){var i;for(i=t-1;i>=0;i--)if(e[i].visible)return i;return 0},t}(Nr),vo=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return vo(t,e),t.prototype.render=function(e,t,r,o){for(var n,a,s="PolarRadar"===e.chart.chartAreaType?I:ve,l="",h=this.enableComplexProperty(e),c=h.length,d=e.stackedValues,p=0;p1&&(l+="L "+(a=s((n={y:d.endValues[0],x:e.points[0].xValue}).x,n.y,t,r,o,e)).x+" "+a.y+" ");var u=new i.PathOption(e.chart.element.id+"_Series_"+e.index,"none",e.width,e.interior,e.opacity,e.dashArray,l);this.appendLinePath(u,e,""),this.renderMarker(e)},t.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"StackingLineSeries"},t}(Nr),bo=function(){function e(){}return e.prototype.render=function(e,t,i,r){e.isRectSeries=!1;for(var o,n,a=e.marker,s=this.enableComplexProperty(e),l="PolarRadar"===e.chart.chartAreaType?I:ve,h=e.chart.redraw,c=0,d=s;cl?0:l,d=s[0]&&s[0].x>h?0:h,p=0,u=0,g=0,y=s;g=l||Math.abs(d-u)>=h)&&(r.push(m),c=p,d=u)}for(var v,f=0;f0)for(var a=0;a0)for(var s=0;sh.close?1:2,r=h.open>h.close?2:1;var c={x:h.regions[i].x,y:h.regions[i].y},d={x:h.regions[r].x,y:h.regions[r].y};this.drawHiloOpenClosePath(e,h,c,d,t,o)}this.updateTickRegion(e.chart.requireInvertedAxis,h.regions[1],a),this.updateTickRegion(e.chart.requireInvertedAxis,h.regions[2],a)}}},t.prototype.updateTickRegion=function(e,t,i){e?(t.x-=i/2,t.width=i):(t.y-=i/2,t.height=i)},t.prototype.triggerPointRenderEvent=function(e,t){var i=t.open<=t.close?e.bearFillColor:e.bullFillColor,r={color:e.border.color,width:Math.max(e.border.width,1)};return this.triggerEvent(e,t,i,r)},t.prototype.drawHiloOpenClosePath=function(e,t,r,o,n,a){var s;e.chart.requireInvertedAxis?(s="M "+n.x+" "+(n.y+n.height/2)+" L "+(n.x+n.width)+" "+(n.y+n.height/2)+" ",s+="M "+r.x+" "+(n.y+n.height/2)+" L "+r.x+" "+(n.y+n.height)+" ",s+="M "+o.x+" "+(n.y+n.height/2)+" L "+o.x+" "+n.y+" "):(s="M "+(n.x+n.width/2)+" "+(n.y+n.height)+" L "+(n.x+n.width/2)+" "+n.y+" ",s+="M "+n.x+" "+r.y+" L "+(n.x+n.width/2)+" "+r.y+" ",s+="M "+(n.x+n.width/2)+" "+o.y+" L "+(n.x+n.width)+" "+o.y+" ");var l=new i.PathOption(e.chart.element.id+"_Series_"+e.index+"_Point_"+t.index,a.fill,a.border.width,a.fill,e.opacity,e.dashArray,s);J(he(l.id),s,e.chart.redraw);var h=e.chart.renderer.drawPath(l,new Int32Array([e.clipRect.x,e.clipRect.y]));h.setAttribute("aria-label",t.x.toString()+":"+t.high.toString()+":"+t.low.toString()+":"+t.close.toString()+":"+t.open.toString()),e.chart.enableCanvas||e.seriesElement.appendChild(h)},t.prototype.getModuleName=function(){return"HiloOpenCloseSeries"},t.prototype.doAnimation=function(e){this.animate(e)},t.prototype.destroy=function(){},t}(jr),Ao=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),To=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ao(t,e),t.prototype.render=function(e,t,r,o){for(var n,a="",s="M",l=void 0,h=this.enableComplexProperty(e),c=0,d=h.length;c=0&&(e[n].visible&&e[n].symbolLocations[0]);n--)r+="L "+(t=e[n]).symbolLocations[0].x+" "+t.symbolLocations[0].y+" ";return r},t.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},t.prototype.getModuleName=function(){return"RangeAreaSeries"},t.prototype.destroy=function(){},t}(Nr),ko=function(){function e(){}return e.prototype.render=function(e,t,r,o){var n,a,s,l,h,c,d=e.marker,p=e.points,u=Math.max(e.chart.initialClipRect.height,e.chart.initialClipRect.width),g=u/100,y=e.maxRadius*g,m=e.minRadius*g,v=null,f=e.chart.redraw;if(null===e.maxRadius||null===e.minRadius){for(var b=0,x=e.chart.visibleSeries;bv?w.sizeMax:v)}m=y=1,l=u/5/2*y}else v=e.sizeMax,l=y-m;for(var C=0,P=p;C1){e.drawPoints=[];for(var s=0,l=o;s1&&(e.yMin=Math.min(e.yMin,h.yValue,t.controlPoint1.y,t.controlPoint2.y),e.yMax=Math.ceil(Math.max(e.yMax,h.yValue,t.controlPoint1.y,t.controlPoint2.y)),e.yMin="Logarithmic"!==e.yAxis.valueType?Math.floor(e.yMin):e.yMin)}}"PolarRadar"===e.chart.chartAreaType&&e.isClosed&&(t=this.getControlPoints({xValue:o[o.length-1].xValue,yValue:o[o.length-1].yValue},{xValue:o[o.length-1].xValue+1,yValue:o[0].yValue},this.splinePoints[0],this.splinePoints[o[o.length-1].index],e),e.drawPoints.push(t))}},i.prototype.getPreviousIndex=function(e,i,r){if("Drop"!==r.emptyPointSettings.mode)return i;for(;t.isNullOrUndefined(e[i])&&i>-1;)i-=1;return i},i.prototype.getNextIndex=function(e,i,r){if("Drop"!==r.emptyPointSettings.mode)return i;for(;t.isNullOrUndefined(e[i])&&i1?1:y,t.splineType){case"Monotonic":for(v=0;vm+1&&(g[m]*g[m+1]<=0?c[m+1]=0:(s=p[m]+p[m+1],c[m+1]=3*s/((s+p[m+1])/g[m]+(s+p[m])/g[m+1])));break;case"Cardinal":for(v=0;v2?y*(e[v+2].xValue-e[v].xValue):0:v===h-1?h>2?y*(e[h-1].xValue-e[h-3].xValue):0:y*(e[v+1].xValue-e[v-1].xValue);break;default:"Clamped"===t.splineType?(c[0]=3*(e[1].yValue-e[0].yValue)/(e[1].xValue-e[0].xValue)-3,d[0]=.5,c[e.length-1]=3*(e[e.length-1].yValue-e[e.length-2].yValue)/(e[e.length-1].xValue-e[e.length-2].xValue),c[0]=d[0]=Math.abs(c[0])===1/0?0:c[0],c[e.length-1]=d[e.length-1]=Math.abs(c[e.length-1])===1/0?0:c[e.length-1]):(c[0]=d[0]=0,c[e.length-1]=0);for(var v=1;v=0;b--)c[b]=c[b]*c[b+1]+d[b]}return c},i.prototype.getControlPoints=function(e,t,i,r,o){var n,a,s,l=i,h=r,c=e.xValue,d=e.yValue,p=t.xValue,u=t.yValue;switch(o.splineType){case"Cardinal":"DateTime"===o.xAxis.valueType&&(l=i/this.dateTimeInterval(o),h=r/this.dateTimeInterval(o)),n=new Vi(c+i/3,d+l/3),a=new Vi(p-r/3,u-h/3),s=new Wi(n,a);break;case"Monotonic":var g=(p-c)/3;n=new Vi(c+g,d+i*g),a=new Vi(p-g,u-r*g),s=new Wi(n,a);break;default:var y=p-c,m=1/3*(d+2*u-1/3*(y*=y)*(.5*i+r));n=new Vi((2*c+p)*(1/3),1/3*(2*d+u-1/3*y*(i+.5*r))),a=new Vi((c+2*p)*(1/3),m),s=new Wi(n,a)}return s},i.prototype.dateTimeInterval=function(e){var t=e.xAxis.actualIntervalType;return"Years"===t?31536e6:"Months"===t?2592e6:"Days"===t?864e5:"Hours"===t?36e5:"Minutes"===t?6e4:"Seconds"===t?1e3:2592e6},i.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},i}(Nr),Eo=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Eo(t,e),t.prototype.render=function(e,t,r,o){var n=null,a="",s="M",l=[],h="TrendLine"===e.category?e.points:this.enableComplexProperty(e);l=this.filterEmptyPoints(e,h);for(var c,d="PolarRadar"===e.chart.chartAreaType?I:ve,p=0,u=l;p0&&e.drawPoints.length>0&&"PolarRadar"===e.chart.chartAreaType&&e.isClosed){var y=this.getFirstLastVisiblePoint(l);a=this.getSplineDirection(e.drawPoints[e.drawPoints.length-1],y.last,{xValue:y.first.xValue,yValue:y.first.yValue},t,r,o,e,s,d,a),s="L"}var m="TrendLine"===e.category?e.chart.element.id+"_Series_"+e.sourceIndex+"_TrendLine_"+e.index:e.chart.element.id+"_Series_"+e.index,v=new i.PathOption(m,"transparent",e.width,e.interior,e.opacity,e.dashArray,a);this.appendLinePath(v,e,""),this.renderMarker(e)},t.prototype.getSplineDirection=function(e,t,i,r,o,n,a,s,l,h){var c=e.controlPoint1,d=e.controlPoint2,p=l(t.xValue,t.yValue,r,o,n,a),u=l(i.xValue,i.yValue,r,o,n,a),g=l(c.x,c.y,r,o,n,a),y=l(d.x,d.y,r,o,n,a);return h.concat(s+" "+p.x+" "+p.y+" C "+g.x+" "+g.y+" "+y.x+" "+y.y+" "+u.x+" "+u.y+" ")},t.prototype.getModuleName=function(){return"SplineSeries"},t.prototype.destroy=function(){},t}(Oo),Io=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Do=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Io(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),t.showNormalDistribution&&this.renderNormalDistribution(t)},t.prototype.calculateBinInterval=function(e,t){for(var i=C(e)/e.length,r=0,o=0,n=e;o=l&&e=h}).length),r.push((i={x:l+d/2},i[t.yName]=c,i)),l+=d,p+=c;return r},t.prototype.calculateBinValues=function(e){var t,i,r=e.histogramValues.yValues.length,o=e.histogramValues.binWidth,n=e.histogramValues.mean,a=e.histogramValues.sDValue,s=e.xAxis.minimum?parseInt(e.xAxis.minimum.toString()):e.xMin,l=((e.xAxis.maximum?parseInt(e.xAxis.maximum.toString()):e.xMax)-s)/499;if(e.points.length)for(var h=0;h<500;h++)t=s+h*l,i=Math.exp(-(t-n)*(t-n)/(2*a*a))/(a*Math.sqrt(2*Math.PI))*o*r,e.yMin=e.yMin>i?i:e.yMin,e.yMax=e.yMax=0?a.color=n.macdPositiveColor:a.color=n.macdNegativeColor),a},t.prototype.getRangePoint=function(e,t,i,r,o,n){var a=new Ki;return a.x=e,a.high=t,a.low=i,a.xValue=r.xValue,a.color=o.fill,a.index=n,a.visible=!0,o.xData.push(a.xValue),a},t.prototype.setSeriesRange=function(e,t,i){void 0===i&&(i=null),i?i.points=e:t.targetSeries[0].points=e},t}(Nr),jo=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ho=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jo(t,e),t.prototype.initDataSource=function(e,t){var i=[],r=e.points;if(r&&r.length){var o=r,n=G(e.field),a=e.targetSeries[0];if(o&&o.length&&o.length>=e.period){for(var s=0,l=0,h=0;h=e.period){for(var a=0,s=0,l=2/(e.period+1),h=0;h=e.period){var n=e.targetSeries[0],a=e.points;if(a.length&&a.length>=e.period){for(var s=0,l=[],h=0,c=a.length,d=e.period;c>=d;){s=0;for(u=h=a.length-c;u0&&i.length>e.period&&(t=this.calculateADPoints(e,i)),this.setSeriesRange(t,e)},t.prototype.calculateADPoints=function(e,t){var i=[],r=0,o=0,n=0,a=0,s=0,l=e.targetSeries[0];for(o=0;o0&&i.length>e.period&&this.calculateATRPoints(e,i)},t.prototype.calculateATRPoints=function(e,t){for(var i=0,r=0,o=0,n=0,a=0,s=[],l=[],h=e.period,c=0,d=e.targetSeries[0],p=0;p0&&(o=Math.abs(Number(t[p].high)-Number(t[p-1].close)),n=Math.abs(Number(t[p].low)-Number(t[p-1].close))),c+=a=Math.max(r,o,n),p>=h?(i=(Number(l[p-1].y)*(h-1)+a)/h,s.push(this.getDataPoint(t[p].x,i,t[p],d,s.length))):(i=c/h,p===h-1&&s.push(this.getDataPoint(t[p].x,i,t[p],d,s.length))),l[p]={x:t[p].x,y:i};this.setSeriesRange(s,e)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"AtrIndicator"},t}(Vo),$o=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Jo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.initSeriesCollection=function(t,i){e.prototype.initSeriesCollection.call(this,t,i);var r=new nr(t,"targetSeries",{},!0);e.prototype.setSeriesProperties.call(this,r,t,"UpperLine",t.upperLine.color,t.upperLine.width,i)},t.prototype.initDataSource=function(e,t){var i=[],r=[],o=e.points;if(o&&o.length){var n=e.targetSeries[1],a=e.targetSeries[0],s=e.period;if(o.length>=e.period)for(var l=0;l=e.period){if(e.showZones)for(c=0;cs?l+=d-s:h+=s-d,s=d}l/=e.period,h/=e.period,i.push(this.getDataPoint(a[e.period].x,100-100/(1+l/h),a[e.period],n,i.length));for(var p=e.period+1;ps?(l=(l*(e.period-1)+(u-s))/e.period,h=h*(e.period-1)/e.period):u=e.period){if(e.showZones)for(var l=0;l=e+t){for(var n=e+(t-1),a=[],s=[],l=0;l=n;){for(var d=0,l=e-1;le){for(var h=[],c=[],d=0;d=e.period){for(var u=0,g=0,y=e.standardDeviation,m=p.length,v=Math.round(e.period),f=[],b=[],x=[],w=0;w=v-1&&C=0?(S=(u+=P-Number(p[C-v].close))/e.period,f[C]=S,b[C]=Math.pow(P-S,2),g+=b[C]-b[C-v]):(f[C]=S,b[C]=Math.pow(P-S,2),g+=b[C]);var L=Math.sqrt(g/e.period),R=f[C]-y*L,M=f[C]+y*L;if(C+1===v)for(var A=0;A=v-1){n.push(this.getDataPoint(p[_].x,x[_].ub,p[_],l,n.length)),a.push(this.getDataPoint(p[_].x,x[_].lb,p[_],h,a.length)),o.push(this.getDataPoint(p[_].x,x[_].mb,p[_],c,o.length)),i&&s.push(this.getRangePoint(p[_].x,n[++T].y,a[++k].y,p[_],d,s.length))}}i&&this.setSeriesRange(s,e,e.targetSeries[0]),this.setSeriesRange(o,e,e.targetSeries[r]),this.setSeriesRange(n,e,e.targetSeries[r+1]),this.setSeriesRange(a,e,e.targetSeries[r+2])},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"BollingerBandsIndicator"},t}(Vo),an=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return an(t,e),t.prototype.initSeriesCollection=function(t,i){if(e.prototype.initSeriesCollection.call(this,t,i),"Line"===t.macdType||"Both"===t.macdType){var r=new nr(t,"targetSeries",{},!0);this.setSeriesProperties(r,t,"MacdLine",t.macdLine.color,t.macdLine.width,i)}if("Histogram"===t.macdType||"Both"===t.macdType){var o=new nr(t,"targetSeries",{},!0);o.type="Column",this.setSeriesProperties(o,t,"Histogram",t.macdPositiveColor,t.width,i)}},t.prototype.initDataSource=function(e,t){var i,r,o=[],n=e.fastPeriod,a=e.slowPeriod,s=e.period,l=n+s,h=[],c=[],d=e.points,p=e.targetSeries[0];if("Histogram"===e.macdType?i=e.targetSeries[1]:(r=e.targetSeries[1],"Both"===e.macdType&&(i=e.targetSeries[2])),d&&l0&&l-2>=0){var u=this.calculateEMAValues(a,d,"close"),g=this.calculateEMAValues(n,d,"close"),y=this.getMACDVales(e,u,g);h=this.getMACDPoints(e,y,d,r||p);var m=this.calculateEMAValues(s,h,"y");o=this.getSignalPoints(e,m,d,p),i&&(c=this.getHistogramPoints(e,y,m,d,i))}this.setSeriesRange(o,e,e.targetSeries[0]),i&&this.setSeriesRange(c,e,i),r&&this.setSeriesRange(h,e,r)},t.prototype.calculateEMAValues=function(e,t,i){for(var r=0,o=0,n=[],a=2/(e+1),s=0;s-1?l:0;var h=n.intercept*Math.pow(l,n.slope),c=i[a-1],d=n.intercept*Math.pow(c,n.slope),p=i[i.length-1]+e.forwardForecast,u=n.intercept*Math.pow(p,n.slope);return s.push(this.getDataPoint(l,h,o,s.length)),s.push(this.getDataPoint(c,d,o,s.length)),s.push(this.getDataPoint(p,u,o,s.length)),s},e.prototype.getPolynomialPoints=function(e,t,i,r,o){var n=t.length<=e.polynomialOrder?t.length:e.polynomialOrder;n=Math.max(2,n),n=Math.min(6,n),e.polynomialOrder=n,e.polynomialSlopes=[],e.polynomialSlopes.length=e.polynomialOrder+1;for(var a=0;a=t.length?t.length-1:e.period;a=Math.max(2,a);for(var s,l,h,c,d=0;d=l&&(l=Math.abs(e[d][f]),h=d,c=f),++f;++d}if(++n[c],h!==c){for(var p=0;p=0;){if(o[b]!==r[b])for(var x=0;xa+r.width&&(n.x-=n.x+n.width-(a+r.width)),this.arrowLocation.x+5>n.x+n.width-this.rx&&(this.arrowLocation.x=n.x+n.width-this.rx-5),this.arrowLocation.x-5this.chart.availableSize.width&&(this.arrowLocation.x-=n.x+n.width-this.chart.availableSize.width,n.x-=n.x+n.width-this.chart.availableSize.width)):n.x<0&&(this.arrowLocation.x-=n.x,n.x=0),n.y=s+r.height&&(n.y-=n.y+n.height-(s+r.height)),this.arrowLocation.y+5>n.y+n.height-this.ry&&(this.arrowLocation.y=n.y+n.height-this.ry-5),this.arrowLocation.y-5${point.x}":"${series.name}":this.control.tooltip.header,this.formattedText=[];var t=document.getElementById(this.chart.element.id+"_tooltip"),i=this.chart.element.id.indexOf("stockChart")>-1;return!e&&!t||i?this.createElement():null},r.prototype.createElement=function(){var e=document.createElement("div");return e.id=this.element.id+"_tooltip",e.className="ejSVGTooltip",e.setAttribute("style","pointer-events:none; position:absolute;z-index: 1"),e},r.prototype.pushData=function(e,t,i,r){return!!e.series.enableTooltip&&(this.currentPoints.push(e),this.stopAnimation(),i&&!document.getElementById(i.id)&&(this.chart.stockChart?document.getElementById(this.chart.stockChart.element.id+"_Secondary_Element").appendChild(i):document.getElementById(this.element.id+"_Secondary_Element").appendChild(i)),!0)},r.prototype.removeHighlight=function(){for(var e,t=0,i=this.previousPoints.length;t0);r&&(!n||n&&r.getAttribute("class")&&-1===r.getAttribute("class").indexOf("_ej2_chart_selection_series_")?r.setAttribute("opacity",(i?e.opacity/2:e.opacity).toString()):r.setAttribute("opacity",e.opacity.toString()))},r.prototype.highlightPoints=function(){for(var e=0,t=this.currentPoints;e"!==this.header?i.measureText(this.header,this.textStyle):new i.Size(0,0);v.width=Math.max(v.width,f.width)+(a.length>0?47:0);var b=32+(f.height>0?20:0);v.height=v.height+f.height+b,m=this.getCurrentPosition(g,y),g="Left"===(m=this.getPositionBySize(v,new i.Rect(0,0,l.width,l.height),r,m))||"Bottom"===m,y="Left"===m||"Right"===m}t?this.svgTooltip=new i.Tooltip({opacity:e.tooltip.opacity,header:this.headerText,content:this.text,fill:e.tooltip.fill,border:e.tooltip.border,enableAnimation:e.tooltip.enableAnimation,location:r,shared:e.tooltip.shared,shapes:a,clipBounds:"PolarRadar"===this.chart.chartAreaType?new Vi(0,0):o,areaBounds:l,palette:this.findPalette(),template:d||e.tooltip.template,data:c,theme:e.theme,offset:s,textStyle:e.tooltip.textStyle,isNegative:g,inverted:y,arrowPadding:this.text.length>1||this.chart.stockChart?0:12,availableSize:e.availableSize,duration:this.chart.tooltip.duration,isCanvas:this.chart.enableCanvas,isTextWrap:e.tooltip.enableTextWrap&&"chart"===e.getModuleName(),blazorTemplate:{name:"Template",parent:this.chart.tooltip},controlInstance:this.chart,tooltipPlacement:m,tooltipRender:function(){u.removeHighlight(),u.highlightPoints(),u.updatePreviousPoint(h)},animationComplete:function(e){e.tooltip.fadeOuted&&u.fadeOut(u.previousPoints)}},"#"+this.element.id+"_tooltip"):this.svgTooltip&&(this.svgTooltip.location=r,this.svgTooltip.content=this.text,this.svgTooltip.header=this.headerText,this.svgTooltip.offset=s,this.svgTooltip.palette=this.findPalette(),this.svgTooltip.shapes=a,this.svgTooltip.data=c,this.svgTooltip.template=e.tooltip.template,this.svgTooltip.textStyle=e.tooltip.textStyle,this.svgTooltip.isNegative=g,this.svgTooltip.inverted=y,this.svgTooltip.clipBounds="PolarRadar"===this.chart.chartAreaType?new Vi(0,0):o,this.svgTooltip.arrowPadding=this.text.length>1||this.chart.stockChart?0:12,this.svgTooltip.tooltipPlacement=m,this.svgTooltip.dataBind()),this.chart.isReact&&this.chart.renderReactTemplates()}},r.prototype.getPositionBySize=function(e,t,r,o){var n=this.isTooltipFitPosition("Top",new i.Rect(0,0,t.width,t.height),r,e),a=this.isTooltipFitPosition("Bottom",new i.Rect(0,0,t.width,t.height),r,e),s=this.isTooltipFitPosition("Right",new i.Rect(0,0,t.width,t.height),r,e),l=this.isTooltipFitPosition("Left",new i.Rect(0,0,t.width,t.height),r,e);if(!(n||a||s||l)){var h=[r.x-t.x,t.x+t.width-r.x,r.y-t.y,t.y+t.height-r.y],c=h.indexOf(Math.max.apply(this,h));return o=0===c?"Left":1===c?"Right":2===c?"Top":"Bottom"}return"Top"===o?n?"Top":a?"Bottom":s?"Right":"Left":"Bottom"===o?a?"Bottom":n?"Top":s?"Right":"Left":"Right"===o?s?"Right":l?"Left":n?"Top":"Bottom":l?"Left":s?"Right":n?"Top":"Bottom"},r.prototype.isTooltipFitPosition=function(e,t,i,r){var o=new Vi(0,0),n=new Vi(0,0);switch(e){case"Top":o.x=i.x-r.width/2,o.y=i.y-r.height,n.x=i.x+r.width/2,n.y=i.y;break;case"Bottom":o.x=i.x-r.width/2,o.y=i.y,n.x=i.x+r.width/2,n.y=i.y+r.height;break;case"Right":o.x=i.x,o.y=i.y-r.height/2,n.x=i.x+r.width,n.y=i.y+r.height/2;break;case"Left":o.x=i.x-r.width,o.y=i.y-r.height/2,n.x=i.x,n.y=i.y+r.height/2}return j(o.x,o.y,t)&&j(n.x,n.y,t)},r.prototype.getCurrentPosition=function(e,t){return t?e?"Left":"Right":e?"Bottom":"Top"},r.prototype.findPalette=function(){for(var e=[],t=0,i=this.currentPoints;t0||(this.valueX=null,this.valueY=null,this.currentPoints=[],this.removeHighlight(),this.removeHighlightedMarker(e),this.svgTooltip=null,this.control.trigger("animationComplete",{}))},r.prototype.removeHighlightedMarker=function(e){if(this.chart.markerRender){for(var t=0,i=e;t0)for(;e.lastChild&&1!==e.childNodes.length;)e.removeChild(e.lastChild)},r.prototype.stopAnimation=function(){Ce(this.toolTipInterval)},r.prototype.removeTooltip=function(e){var t=this,i=this.getElement(this.element.id+"_tooltip"),r=i?this.getElement(i.id+"parent_template"):null,o=r&&"
"!==r.innerHTML;this.stopAnimation(),this.chart.isReact&&o&&this.chart.clearTemplate([r.id],[0]),i&&this.previousPoints.length>0&&(this.toolTipInterval=+setTimeout(function(){t.svgTooltip&&t.svgTooltip.fadeOut()},e))},r}(Zi),pn=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),un=function(e){function r(t){var i=e.call(this,t)||this;return i.addEventListener(),i}return pn(r,e),r.prototype.addEventListener=function(){if(!this.chart.isDestroyed){var e=t.Browser.isPointer?"pointerleave":"mouseleave";this.chart.on(e,this.mouseLeaveHandler,this),this.chart.on("tapHold",this.longPress,this),this.chart.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.chart.on(t.Browser.touchEndEvent,this.mouseUpHandler,this)}},r.prototype.mouseUpHandler=function(){var e=this.control;e.isTouch&&!this.isSelected(e)&&(j(e.mouseX,e.mouseY,e.chartAxisLayoutPanel.seriesClipRect)&&e.tooltip.shared||!e.tooltip.shared)&&(e.crosshair.enable?e.startMove&&this.removeTooltip(2e3):(this.tooltip(),this.removeTooltip(2e3)))},r.prototype.mouseLeaveHandler=function(){this.removeTooltip(this.chart.tooltip.fadeOutDuration)},r.prototype.mouseMoveHandler=function(){var e=this.chart;e.disableTrackTooltip||this.isSelected(e)||(e.tooltip.shared||e.isTouch&&!e.startMove||this.tooltip(),j(e.mouseX,e.mouseY,e.chartAxisLayoutPanel.seriesClipRect)?!e.tooltip.shared||e.isTouch&&!e.startMove||this.tooltip():e.tooltip.shared&&this.removeTooltip(this.chart.tooltip.fadeOutDuration))},r.prototype.longPress=function(){var e=this.chart;return e.crosshair.enable&&j(e.mouseX,e.mouseY,e.chartAxisLayoutPanel.seriesClipRect)&&this.tooltip(),!1},r.prototype.tooltip=function(){if(this.chart.stockChart&&this.chart.stockChart.onPanning)return this.removeTooltip(1e3),null;var e=this.chart.enableCanvas?this.element.id+"_tooltip_group":this.element.id+"_tooltip_svg",t=this.getElement(e),i=this.chart.stockChart&&t&&t.firstChild.childNodes.length>1,r=t&&parseInt(t.getAttribute("opacity"),10)>0&&!i,o=this.getTooltipElement(r);this.chart.enableCanvas&&o&&(document.getElementById(this.chart.element.id+"_Secondary_Element").appendChild(o),o.appendChild(document.getElementById(this.chart.element.id+"_tooltip_svg"))),this.chart.tooltip.shared?this.renderGroupedTooltip(this.chart,!r,o):this.renderSeriesTooltip(this.chart,!r,o)},r.prototype.findHeader=function(e){return""===this.header?"":(this.header=this.parseTemplate(e.point,e.series,this.header,e.series.xAxis,e.series.yAxis),""!==this.header.replace(//g,"").replace(/<\/b>/g,"").trim()?this.header:"")},r.prototype.findShapes=function(){if(!this.chart.tooltip.enableMarker)return[];for(var e=[],t=0,i=this.currentPoints;t3&&t.lierIndex!==this.lierIndex||t.point===e.point)},r.prototype.getSymbolLocation=function(e){var t;if("BoxAndWhisker"!==e.series.type){if(!e.point.symbolLocations[0])return null;t=new Vi(e.point.symbolLocations[0].x,e.point.symbolLocations[0].y)}switch(e.series.type){case"BoxAndWhisker":return this.getBoxLocation(e);case"Waterfall":return this.getWaterfallRegion(e,t);case"RangeArea":return this.getRangeArea(e,t);default:return t}},r.prototype.getRangeArea=function(e,t){return e.point.regions[0]&&(this.inverted?t.x=e.point.regions[0].x+e.point.regions[0].width/2:t.y=e.point.regions[0].y+e.point.regions[0].height/2),t},r.prototype.getWaterfallRegion=function(e,t){return this.inverted?t.x=e.point.y<0?t.x+e.point.regions[0].width:t.x:t.y=e.point.y<0?t.y-e.point.regions[0].height:t.y,t},r.prototype.getTooltipText=function(e){var t=e.series;return this.parseTemplate(e.point,t,this.getFormat(this.chart,t),t.xAxis,t.yAxis)},r.prototype.getTemplateText=function(e){if(this.chart.tooltip.template){var i=t.extend({},e.point);return i.x=this.formatPointValue(e.point,e.series.xAxis,"x",!0,!1),"XY"===e.series.seriesType?i.y=this.formatPointValue(e.point,e.series.yAxis,"y",!1,!0):(i.low=this.formatPointValue(e.point,e.series.yAxis,"low",!1,!0),i.high=this.formatPointValue(e.point,e.series.yAxis,"high",!1,!0)),i}return e.point},r.prototype.findMouseValue=function(e,t){t.requireInvertedAxis?(this.valueY=(1-z(e.point.xValue,e.series.xAxis))*e.series.xAxis.rect.height+e.series.xAxis.rect.y,this.valueX=t.mouseX):("PolarRadar"===t.chartAreaType?this.valueX=N(e.point.xValue,e.series.xAxis)*e.series.xAxis.rect.width+e.series.xAxis.rect.x:this.valueX="TrendLine"===e.series.category&&t.tooltip.shared?this.valueX:z(e.point.xValue,e.series.xAxis)*e.series.xAxis.rect.width+e.series.xAxis.rect.x,this.valueY=t.mouseY)},r.prototype.renderGroupedTooltip=function(e,t,r){var o,n,a="PolarRadar"===e.chartAreaType?this.getData():null;this.stopAnimation(),this.removeHighlight(),this.currentPoints=[];var s=[];t&&(e.stockChart?r&&!i.getElement(r.id)&&document.getElementById(e.stockChart.element.id+"_Secondary_Element").appendChild(r):r&&document.getElementById(this.element.id+"_Secondary_Element").appendChild(r)),this.removeText();for(var l={text:[],cancel:!1,name:"sharedTooltipRender",data:[],headerText:"",textStyle:this.textStyle},h=this.mergeXvalues(this.chart.visibleSeries),c=0,d=e.visibleSeries;c0?this.createTooltip(e,t,this.findSharedLocation(),1===this.currentPoints.length?this.currentPoints[0].series.clipRect:null,null,this.findShapes(),this.findMarkerHeight(this.currentPoints[0]),e.chartAxisLayoutPanel.seriesClipRect,s,this.chart.tooltip.template?this.getTemplateText(o):null,this.chart.tooltip.template?l.template:""):this.getElement(this.element.id+"_tooltip_path")&&this.getElement(this.element.id+"_tooltip_path").setAttribute("d","")},r.prototype.triggerBlazorSharedTooltip=function(e,t,i,r,o){var n=this,a={cancel:!1,name:"sharedTooltipRender",text:e.text,headerText:e.headerText,textStyle:e.textStyle,data:e.data},s=function(e){e.cancel?i.push(t):(n.text=e.text,n.headerText=e.headerText,n.findMouseValue(t,n.chart),t=null,n.createTooltip(r,o,n.findSharedLocation(),null,null,n.findShapes(),n.findMarkerHeight(n.currentPoints[0]),r.chartAxisLayoutPanel.seriesClipRect,i))};s.bind(this,t,i),this.chart.trigger("sharedTooltipRender",a,s)},r.prototype.triggerSharedTooltip=function(e,t,i,r,o){var n=this,a={cancel:!1,name:"tooltipRender",text:i,headerText:r,point:e.point,series:this.chart.isBlazor?{}:e.series,textStyle:this.textStyle,data:{pointX:e.point.x,pointY:e.point.y,seriesIndex:e.series.index,seriesName:e.series.name,pointIndex:e.point.index,pointText:e.point.text}},s=function(i){i.cancel?o.push(e):("BoxAndWhisker"===e.series.type&&(n.removeText(),t=!0),n.formattedText=n.formattedText.concat(i.text),n.text=n.formattedText,n.headerText=i.headerText,n.findMouseValue(e,n.chart),n.currentPoints.push(e),e=null)};s.bind(this,e,o),this.chart.trigger("tooltipRender",a,s),a.template&&(this.chart.tooltip.template=a.template)},r.prototype.findSharedLocation=function(){var e=this.chart.stockChart;if(e){1===this.text.length&&this.text.push("");var t=e.enablePeriodSelector?e.toolbarHeight:0,i=document.getElementById(e.element.id+"_ChartTitle"),r=""!==e.title?i.getBoundingClientRect().height+10:0;return new Vi(this.chart.chartAxisLayoutPanel.seriesClipRect.x+5,this.chart.chartAxisLayoutPanel.seriesClipRect.y+t+5+r)}return this.currentPoints.length>1?new Vi(this.valueX,this.valueY):this.getSymbolLocation(this.currentPoints[0])},r.prototype.getBoxLocation=function(e){return this.lierIndex>3?e.point.symbolLocations[this.lierIndex-4]:{x:e.point.regions[0].x+e.point.regions[0].width/2,y:e.point.regions[0].y+e.point.regions[0].height/2}},r.prototype.parseTemplate=function(e,t,i,r,o){for(var n,a,s=0,l=Object.keys(e);s${point.y} Size : ${point.size}":"${point.y}");case"HighLow":return r+"
High : ${point.high}
Low : ${point.low}";case"HighLowOpenClose":return r+"
High : ${point.high}
Low : ${point.low}
Open : ${point.open}
Close : ${point.close}";case"BoxPlot":return r+"
"+(this.lierIndex>3?"Outliers : ${point.outliers}":"Maximum : ${point.maximum}
Q3 : ${point.upperQuartile}
Median : ${point.median}
Q1 : ${point.lowerQuartile}
Minimum : ${point.minimum}");default:return""}},r.prototype.getIndicatorTooltipFormat=function(e,t,i){return"XY"===e.seriesType?e.name+" : ${point.y}":i},r.prototype.removeHighlightedMarker=function(e){for(var t=0,i=e;t-1?this.iconRectSelectionFill:"transparent":this.hoveredID.indexOf("_Zoom_")>-1?this.iconRectSelectionFill:"transparent";he(this.hoveredID).setAttribute("fill",e)}var t=this.hoveredID?he(this.hoveredID.replace("_1","_2")):null,i=this.hoveredID?he(this.hoveredID.replace("_1","_3")):null;if(t){r=this.chart.zoomModule.isPanning?this.hoveredID.indexOf("_Pan_")>-1?this.selectionColor:this.fillColor:this.hoveredID.indexOf("_Zoom_")>-1?this.selectionColor:this.fillColor;t.setAttribute("fill",r)}if(i){var r=this.chart.zoomModule.isPanning?this.fillColor:this.hoveredID.indexOf("_Zoom_")>-1?this.selectionColor:this.fillColor;i.setAttribute("fill",r)}m("EJ2_Chart_ZoomTip")},e.prototype.reset=function(){var e=this,i=this.chart;i.zoomModule.isDevice||t.remove(i.zoomModule.toolkitElements);var r;this.removeTooltip(),i.svgObject.setAttribute("cursor","auto");var o,n=[];this.zoomCompleteEvtCollection=[];for(var a=0,s=i.axisCollections;a1?1-n:o),s.currentZoomFactor=o,s.currentZoomPosition=n,s.cancel||(c.zoomFactor=s.currentZoomFactor,c.zoomPosition=s.currentZoomPosition,this.zoomCompleteEvtCollection.push(s)))}}},e.prototype.applySelection=function(e,t){for(var i=1,r=e.length;i0&&o.height>0&&(this.isZoomed=!0,e.disableTrackTooltip=!0,e.svgObject.setAttribute("cursor","crosshair"),"X"===this.zooming.mode?(o.height=t.height,o.y=t.y):"Y"===this.zooming.mode&&(o.width=t.width,o.x=t.x),(e.enableCanvas?document.getElementById(this.elementId+"_tooltip_svg"):e.svgObject).appendChild(e.svgRenderer.drawRectangle(new Di(this.elementId+"_ZoomArea",e.themeStyle.selectionRectFill,{color:e.themeStyle.selectionRectStroke,width:1},1,o,0,0,"","3"))))},e.prototype.doPan=function(e,t){var i=this;if(e.startMove&&e.crosshair.enable)return null;var r,o;this.isZoomed=!0,this.offset=e.delayRedraw?this.offset:e.chartAxisLayoutPanel.seriesClipRect,e.delayRedraw=!0,this.zoomCompleteEvtCollection=[],e.disableTrackTooltip=!0;for(var n,a=[],s=0,l=t;s0&&t.height>0?(this.performedUI=!0,e.svgObject.setAttribute("cursor","auto"),this.doZoom(e,e.axisCollections,e.chartAxisLayoutPanel.seriesClipRect),e.isDoubleTap=!1):e.disableTrackTooltip&&(e.disableTrackTooltip=!1,e.delayRedraw=!1,e.enableCanvas?e.createChartSvg():e.removeSvg(),e.refreshAxis(),e.refreshBound()))},e.prototype.refreshAxis=function(e,t,r){var o=t.zoomSettings.mode;e.measureAxis(new i.Rect(t.initialClipRect.x,t.initialClipRect.y,t.initialClipRect.width,t.initialClipRect.height)),r.map(function(t,i){"Horizontal"===t.orientation&&"Y"!==o&&e.drawXAxisLabels(t,i,null,t.placeNextToAxisLine?t.updatedRect:t.rect),"Vertical"===t.orientation&&"X"!==o&&e.drawYAxisLabels(t,i,null,t.placeNextToAxisLine?t.updatedRect:t.rect)})},e.prototype.doZoom=function(e,t,r){var o,n=this,a=this.zoomingRect,s=this.zooming.mode;this.isPanning=e.zoomSettings.enablePan||this.isPanning;var l=[];this.zoomCompleteEvtCollection=[];for(var h=0,c=t;h0?1:-1:-e.detail/3>0?1:-1,c=this.zooming.mode,d=.5;this.isZoomed=!0,this.calculateZoomAxesRange(r),r.disableTrackTooltip=!0,this.performedUI=!0,this.isPanning=r.zoomSettings.enablePan||this.isPanning,this.zoomCompleteEvtCollection=[];for(var p,u=[],g=0,y=o;g=1&&(d=(d="Horizontal"===m.orientation?t/m.rect.width:1-i/m.rect.height)>1?1:d<0?0:d,a=1===n?1:le((h>0?.9:1.1)/n,0,1),s=1===n?0:m.zoomPosition+(m.zoomFactor-a)*d,m.zoomPosition===s&&m.zoomFactor===a||(a=s+a>1?1-s:a),p.currentZoomFactor=a,p.currentZoomPosition=s),p.cancel||(m.zoomFactor=p.currentZoomFactor,m.zoomPosition=p.currentZoomPosition,this.zoomCompleteEvtCollection.push(p))),u.push({zoomFactor:m.zoomFactor,zoomPosition:m.zoomFactor,axisName:m.name,axisRange:m.visibleRange})}var v={cancel:!1,axisCollection:u,name:hi};!v.cancel&&this.chart.isBlazor?this.chart.trigger(hi,v,function(){l.performZoomRedraw(r)}):this.redrawOnZooming(r)},e.prototype.performPinchZooming=function(e,t){if(this.zoomingRect.width>0&&this.zoomingRect.height>0||t.startMove&&t.crosshair.enable)return!1;this.calculateZoomAxesRange(t),this.isZoomed=!0,this.isPanning=!0,this.performedUI=!0,this.offset=t.delayRedraw?this.offset:t.chartAxisLayoutPanel.seriesClipRect,t.delayRedraw=!0,t.disableTrackTooltip=!0;var r=t.element.getBoundingClientRect(),o=this.touchStartList,n=this.touchMoveList,a=o[0].pageX-r.left,s=o[0].pageY-r.top,l=n[0].pageX-r.left,h=n[0].pageY-r.top,c=o[1].pageX-r.left,d=o[1].pageY-r.top,p=n[1].pageX-r.left,u=n[1].pageY-r.top,g=Math.abs(l-p)/Math.abs(a-c),y=Math.abs(h-u)/Math.abs(s-d),m=(this.offset.x-l)/g+a,v=(this.offset.y-h)/y+s,f=new i.Rect(m,v,this.offset.width/g,this.offset.height/y),b=l-g*a,x=h-y*s;if(!isNaN(g-g)&&!isNaN(y-y))switch(this.zooming.mode){case"XY":this.setTransform(b,x,g,y,t,!0);break;case"X":this.setTransform(b,0,g,1,t,!0);break;case"Y":this.setTransform(0,x,1,y,t,!0)}return this.calculatePinchZoomFactor(t,f),this.refreshAxis(t.chartAxisLayoutPanel,t,t.axisCollections),this.redrawOnZooming(t,!1),!0},e.prototype.calculatePinchZoomFactor=function(e,t){var i,r,o,n,a,s,l,h,c,d=this.zooming.mode,p=[];this.zoomCompleteEvtCollection=[];for(var u=0;u1?1:h,l.cancel||(g.zoomFactor=l.currentZoomFactor,g.zoomPosition=l.currentZoomPosition,this.zoomCompleteEvtCollection.push(l)),p.push({zoomFactor:g.zoomFactor,zoomPosition:g.zoomFactor,axisName:g.name,axisRange:g.visibleRange}))}var y={cancel:!1,axisCollection:p,name:hi};!y.cancel&&this.chart.isBlazor&&this.chart.trigger(hi,y)},e.prototype.setTransform=function(e,t,i,r,o,n){o.enableCanvas||o.seriesElements.setAttribute("clip-path","url(#"+this.elementId+"_ChartAreaClipRect_)"),o.indicatorElements&&o.indicatorElements.setAttribute("clip-path","url(#"+this.elementId+"_ChartAreaClipRect_)");var a,s,l,h;if(null!==e&&null!==t)for(var c=0,d=o.visibleSeries;c';if(y+='',y+='',0===s||he(this.elementId+"_Zooming_KitCollection"))return!1;var m=a.createDefs();o=this.isDevice?["Reset"]:o,m.innerHTML=y,this.toolkitElements=a.createGroup({id:this.elementId+"_Zooming_KitCollection",transform:"translate("+d+","+p+")"}),this.toolkitElements.appendChild(m),this.toolkitElements.appendChild(a.drawRectangle(new Di(this.elementId+"_Zooming_Rect","#fafafa",{color:"transparent",width:1},1,new i.Rect(0,0,c,h+10),0,0)));var v=a.drawRectangle(new Di(this.elementId+"_Zooming_Rect","#fafafa",{color:"transparent",width:1},.1,new i.Rect(0,0,c,h+10),0,0));v.setAttribute("filter","url(#chart_shadow)"),this.toolkitElements.appendChild(v);for(var f,b=1;b<=s;b++){switch(f=o[b-1],r=a.createGroup({transform:"translate("+u+","+(this.isDevice?5:8)+")"}),f){case"Pan":g.createPanButton(r,this.toolkitElements);break;case"Zoom":g.createZoomButton(r,this.toolkitElements);break;case"ZoomIn":g.createZoomInButton(r,this.toolkitElements,e);break;case"ZoomOut":g.createZoomOutButton(r,this.toolkitElements,e);break;case"Reset":g.createResetButton(r,this.toolkitElements,e,this.isDevice)}u+=l+10}if(this.toolkitElements.setAttribute("opacity",this.isDevice?"1":""+this.zoomkitOpacity),this.toolkitElements.setAttribute("cursor","auto"),e.enableCanvas){var x=document.createElement("div");x.id=e.element.id+"_zoom",x.setAttribute("style","position:absolute; z-index:1");var w=e.availableSize.height/2,S=e.svgRenderer.createSvg({id:e.element.id+"_zoomkit_svg",width:e.availableSize.width,height:w});S.setAttribute("style","position:absolute"),S.appendChild(this.toolkitElements),x.appendChild(S),document.getElementById(this.elementId+"_Secondary_Element").appendChild(x)}else e.svgObject.appendChild(this.toolkitElements);return this.isDevice||(t.EventHandler.add(this.toolkitElements,"mousemove touchstart",this.zoomToolkitMove,this),t.EventHandler.add(this.toolkitElements,"mouseleave touchend",this.zoomToolkitLeave,this),this.isPanning&&g.pan()),!0},e.prototype.applyZoomToolkit=function(e,t){this.isAxisZoomed(t)?(this.showZoomingToolkit(e),this.isZoomed=!0):(this.toolkit.removeTooltip(),this.isPanning=!1,this.isZoomed=!1,e.svgObject.setAttribute("cursor","auto"))},e.prototype.isAxisZoomed=function(e){for(var t=!1,i=0,r=e;i1)&&e.preventDefault(),i=e.touches),t.isChartDrag&&(t.isTouch&&(this.touchMoveList=this.addTouchPointer(this.touchMoveList,e,i),this.zooming.enablePinchZooming&&this.touchMoveList.length>1&&this.touchStartList.length>1&&this.performPinchZooming(e,t)),this.renderZooming(e,t,t.isTouch))},e.prototype.mouseDownHandler=function(e){var t,i=this.chart,r=null;"touchstart"===e.type?(r=e.touches,t=e.target):t=e.target,-1===t.id.indexOf(i.element.id+"_Zooming_")&&j(i.previousMouseMoveX,i.previousMouseMoveY,i.chartAxisLayoutPanel.seriesClipRect)&&(i.isChartDrag=!0),i.isTouch&&(this.touchStartList=this.addTouchPointer(this.touchStartList,e,r))},e.prototype.mouseUpHandler=function(e){var t=this.chart,i=-1===e.target.id.indexOf(t.element.id+"_ZoomOut_")||-1===e.target.id.indexOf(t.element.id+"_ZoomIn_");(t.isChartDrag||i)&&this.redrawOnZooming(t,!0,!0),t.isTouch&&(t.isDoubleTap&&j(t.mouseX,t.mouseY,t.chartAxisLayoutPanel.seriesClipRect)&&1===this.touchStartList.length&&this.isZoomed&&this.toolkit.reset(),this.touchStartList=[],t.isDoubleTap=!1)},e.prototype.mouseCancelHandler=function(){this.isZoomed&&this.performZoomRedraw(this.chart),this.pinchTarget=null,this.touchStartList=[],this.touchMoveList=[]},e.prototype.addTouchPointer=function(e,t,i){if(i){e=[];for(var r=0,o=i.length;r0?a:n;if("Pie"===c.type||"Funnel"===c.type||"Pyramid"===c.type)for(var p=0;p *",o=o.indexOf("None")>-1?"{}":o,r.innerHTML+=h.selectionStyle?"":"."+e+o}r.innerHTML+="."+this.unselected+" { opacity:0.3;} ",document.body.appendChild(r)}},e.prototype.pattern=function(e,t,i,r,o){var n=e.svgObject,a=[],s={id:e.element.id+"_"+r+"_Selection_"+i,patternUnits:"userSpaceOnUse"};switch(r){case"Dots":s.height=s.width=6,s.width=6,a[0]={x:0,y:0,width:7,height:7,transform:"translate(0,0)",fill:"#ffffff",opacity:o,name:"rect"},a[1]={cx:3,cy:3,r:2,"stroke-width":1,fill:t,name:"circle"};break;case"Pacman":s.height="18.384",s.width="17.917",a[0]={name:"rect",x:0,y:0,width:17.917,height:18.384,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M9.081,9.194l5.806-3.08c-0.812-1.496-2.403-3.052-4.291-3.052H8.835C6.138,3.063,3,6.151,3,8.723v1.679 c0,2.572,3.138,5.661,5.835,5.661h1.761c2.085,0,3.835-1.76,4.535-3.514L9.081,9.194z","stroke-width":1,stroke:t,fill:t};break;case"Chessboard":s.height=s.width=10,a[0]={x:0,y:0,width:10,height:10,fill:"#ffffff",opacity:o,name:"rect"},a[1]={x:0,y:0,width:5,height:5,fill:t,opacity:o,name:"rect"},a[2]={x:5,y:5,width:5,height:5,fill:t,opacity:o,name:"rect"};break;case"Crosshatch":s.height=s.width="8",a[0]={x:0,y:0,width:8,height:8,transform:"translate(0,0)",fill:"#ffffff",opacity:o,name:"rect"},a[1]={d:"M0 0L8 8ZM8 0L0 8Z","stroke-width":1,stroke:t,name:"path"};break;case"DiagonalForward":s.height=s.width=6,a[0]={x:0,y:0,width:6,height:6,transform:"translate(0,0)",fill:"#ffffff",opacity:o,name:"rect"},a[1]={d:"M 3 -3 L 9 3 M 6 6 L 0 0 M 3 9 L -3 3","stroke-width":2,stroke:t,name:"path"};break;case"DiagonalBackward":s.height=s.width=6,a[0]={x:0,y:0,width:6,height:6,transform:"translate(0,0)",fill:"#ffffff",opacity:o,name:"rect"},a[1]={d:"M 3 -3 L -3 3 M 0 6 L 6 0 M 9 3 L 3 9","stroke-width":2,stroke:t,name:"path"};break;case"Grid":s.height=s.width=6,a[0]={name:"rect",x:0,y:0,width:6,height:6,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M1 3.5L11 3.5 M0 3.5L11 3.5 M0 7.5L11 7.5 M0 11.5L11 11.5 M5.5 0L5.5 12 M11.5 0L11.5 12Z","stroke-width":1,stroke:t};break;case"Turquoise":s.height=s.width=17,a[0]={name:"rect",x:0,y:0,width:17,height:17,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M0.5739999999999998,2.643a2.123,2.111 0 1,0 4.246,0a2.123,2.111 0 1,0 -4.246,0","stroke-width":1,"stroke-miterlimit":10,stroke:t,fill:t},a[2]={name:"path",d:"M11.805,2.643a2.123,2.111 0 1,0 4.246,0a2.123,2.111 0 1,0 -4.246,0","stroke-width":1,"stroke-miterlimit":10,stroke:t,fill:t},a[3]={name:"path",d:"M6.19,2.643a2.123,2.111 0 1,0 4.246,0a2.123,2.111 0 1,0 -4.246,0","stroke-width":1,"stroke-miterlimit":10,stroke:t,fill:t},a[4]={name:"path",d:"M11.805,8.217a2.123,2.111 0 1,0 4.246,0a2.123,2.111 0 1,0 -4.246,0","stroke-width":1,"stroke-miterlimit":10,stroke:t,fill:t},a[5]={name:"path",d:"M6.19,8.217a2.123,2.111 0 1,0 4.246,0a2.123,2.111 0 1,0 -4.246,0","stroke-width":1,"stroke-miterlimit":10,stroke:t,fill:t},a[6]={name:"path",d:"M11.805,13.899a2.123,2.111 0 1,0 4.246,0a2.123,2.111 0 1,0 -4.246,0","stroke-width":1,"stroke-miterlimit":10,stroke:t,fill:t},a[7]={name:"path",d:"M6.19,13.899a2.123,2.111 0 1,0 4.246,0a2.123,2.111 0 1,0 -4.246,0","stroke-width":1,"stroke-miterlimit":10,stroke:t,fill:t};break;case"Star":s.height=s.width=21,a[0]={name:"rect",x:0,y:0,width:21,height:21,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M15.913,18.59L10.762 12.842 5.613 18.75 8.291 11.422 0.325 9.91 8.154 8.33 5.337 0.91 10.488 6.658 15.637 0.75 12.959 8.078 20.925 9.59 13.096 11.17 z","stroke-width":1,stroke:t,fill:t};break;case"Triangle":s.height=s.width=10,a[0]={name:"rect",x:0,y:0,width:10,height:10,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M4.987,0L7.48 4.847 9.974 9.694 4.987 9.694 0 9.694 2.493 4.847 z","stroke-width":1,stroke:t,fill:t};break;case"Circle":s.height=s.width=9,a[0]={name:"rect",x:0,y:0,width:9,height:9,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"circle",cx:5.125,cy:3.875,r:3.625,"stroke-width":1,fill:t};break;case"Tile":s.height=s.width=18,a[0]={name:"rect",x:0,y:0,width:18,height:18,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M0,9L0 0 9 0 z","stroke-width":1,stroke:t,fill:t},a[2]={name:"path",d:"M9,9L9 0 18 0 z","stroke-width":1,stroke:t,fill:t},a[3]={name:"path",d:"M0,18L0 9 9 9 z","stroke-width":1,stroke:t,fill:t},a[4]={name:"path",d:"M9,18L9 9 18 9 z","stroke-width":1,stroke:t,fill:t};break;case"HorizontalDash":s.height=s.width=12,a[0]={name:"rect",x:0,y:0,width:12,height:12,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M0,1.5 L10 1.5 M0,5.5 L10 5.5 M0,9.5 L10 9.5 z","stroke-width":1,stroke:t,fill:t};break;case"VerticalDash":s.height=s.width=12,a[0]={name:"rect",x:0,y:0,width:12,height:12,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M1.5,0 L1.5 10 M5.5,0 L5.5 10 M9.5,0 L9.5 10 z","stroke-width":1,stroke:t,fill:t};break;case"Rectangle":s.height=s.width=12,a[0]={name:"rect",width:12,height:12,fill:"#ffffff",opacity:o},a[1]={name:"rect",x:1,y:2,width:4,height:9,fill:t,opacity:o},a[2]={name:"rect",x:7,y:2,width:4,height:9,fill:t,opacity:o};break;case"Box":s.height=s.width=10,a[0]={name:"rect",width:13,height:13,fill:"#ffffff",opacity:o},a[1]={name:"rect",x:1.5,y:1.5,width:10,height:9,fill:t,opacity:o};break;case"HorizontalStripe":s.height=12,s.width=10,a[0]={name:"rect",x:0,y:0,width:10,height:12,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M0,0.5 L10 0.5 M0,4.5 L10 4.5 M0,8.5 L10 8.5 z","stroke-width":1,stroke:t,fill:t};break;case"VerticalStripe":s.height=10,s.width=12,a[0]={name:"rect",x:0,y:0,width:12,height:10,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M0.5,0 L0.5 10 M4.5,0 L4.5 10 M8.5,0 L8.5 10 z","stroke-width":1,stroke:t,fill:t};break;case"Bubble":s.height=s.width=20,a[0]={name:"rect",x:0,y:0,width:20,height:20,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"circle",cx:5.217,cy:11.325,r:3.429,"stroke-width":1,fill:"#D0A6D1"},a[2]={name:"circle",cx:13.328,cy:6.24,r:4.884,"stroke-width":1,fill:t},a[3]={name:"circle",cx:13.277,cy:14.66,r:3.018,"stroke-width":1,fill:"#D0A6D1"}}var l=e.svgRenderer||e.renderer,h=l.createPattern(s,"pattern");return this.loadPattern(e,a,h,l),n.appendChild(h),"url(#"+e.element.id+"_"+r+"_Selection_"+i+")"},e.prototype.loadPattern=function(e,t,i,r){var o;for(o=0;o-1&&e.setAttribute("class",i.replace(t,""))},e.prototype.getChildren=function(e){for(var t=[],i=0;i-1,i.addEventListener(),i}return vn(r,e),r.prototype.addEventListener=function(){if(!(this.chart.isDestroyed||this.chart.stockChart&&this.chart.stockChart.onPanning)){var e=t.Browser.isPointer?"pointerleave":"mouseleave";this.chart.on(t.Browser.touchMoveEvent,this.mouseMove,this),this.chart.on(e,this.completeSelection,this),this.chart.on("click",this.calculateSelectedElements,this),this.chart.on(t.Browser.touchStartEvent,this.mousedown,this),this.chart.on(t.Browser.touchEndEvent,this.completeSelection,this)}},r.prototype.mousedown=function(e){var t=this.chart;t.isPointMouseDown||"None"===t.selectionMode||t.isChartDrag||(t.isDoubleTap||!t.isTouch||this.rectPoints)&&this.dragStart(t,t.chartAxisLayoutPanel.seriesClipRect,t.mouseDownX,t.mouseDownY,e)},r.prototype.removeEventListener=function(){this.chart.isDestroyed||(this.chart.off(t.Browser.touchMoveEvent,this.mouseMove),this.chart.off("pointerleave",this.completeSelection),this.chart.off("click",this.calculateSelectedElements),this.chart.off(t.Browser.touchStartEvent,this.mousedown),this.chart.off(t.Browser.touchEndEvent,this.completeSelection))},r.prototype.initPrivateVariables=function(e){this.styleId=e.element.id+"_ej2_chart_selection",this.unselected=e.element.id+"_ej2_deselected",this.closeIconId=e.element.id+"_ej2_drag_close",this.draggedRectGroup=e.element.id+"_ej2_drag_group",this.multiRectGroup=e.element.id+"_ej2_drag_multi_group",this.draggedRect=e.element.id+"_ej2_drag_rect",this.lassoPath=e.element.id+"_ej2_drag_path",this.selectedDataIndexes=[],this.rectPoints=null,this.isSeriesMode="Series"===e.selectionMode},r.prototype.invokeSelection=function(e){this.initPrivateVariables(e),this.series=t.extend({},e.visibleSeries,null,!0),this.seriesStyles(),this.currentMode=e.selectionMode,e.selectionMode.indexOf("Drag")>-1||this.selectDataIndex(e,this.concatIndexes(e.selectedDataIndexes,this.selectedDataIndexes))},r.prototype.generateStyle=function(e){return e?(this.styleId.indexOf("selection")>1&&"None"!==this.chart.selectionMode&&(this.unselected=e.unSelectedStyle||this.unselected),this.styleId.indexOf("highlight")>0&&"None"!==this.chart.highlightMode&&(this.unselected=e.nonHighlightStyle||this.unselected),e.selectionStyle||this.styleId+"_series_"+e.index):"undefined"},r.prototype.selectDataIndex=function(e,t){for(var i=0,r=t;i0&&r[0].id!==o[o.length-1].id&&this.removeSelection(e,t.series,r,i,!0))}return o},r.prototype.findTrackballElements=function(e,i){for(var r,o,n=0;n0){o=[];for(var a=0;a-1&&o.push(r[a]);this.removeStyles(o)}},r.prototype.findElements=function(e,t,i,r){return void 0===r&&(r=""),this.isSeriesMode?this.getSeriesElements(t):"Cluster"===this.currentMode?this.getClusterElements(e,i):this.getElementByIndex(e,i,r)},r.prototype.isAlreadySelected=function(e){var t=e.target;if("click"===e.type?(this.currentMode=this.chart.selectionMode,this.styleId=this.chart.element.id+"_ej2_chart_selection"):"mousemove"===e.type&&(this.currentMode=this.chart.highlightMode,this.highlightDataIndexes=[],this.styleId=this.chart.element.id+"_ej2_chart_highlight"),"None"!==this.chart.highlightMode&&"None"===this.chart.selectionMode&&"click"===e.type)return!1;if("None"!==this.chart.highlightMode&&this.previousSelectedEle&&this.previousSelectedEle[0]){var i=t.parentNode.id,r=void 0;t.parentNode&&(r=i.indexOf("SeriesGroup")>0||i.indexOf("SymbolGroup")>0);for(var o=0;o-1&&(r||"click"===e.type)?(this.previousSelectedEle[o].removeAttribute("class"),this.addOrRemoveIndex(this.highlightDataIndexes,this.indexFinder(this.previousSelectedEle[o].id))):!r&&this.previousSelectedEle[o].getAttribute("class").indexOf("highlight")>-1&&this.performSelection(this.indexFinder(this.previousSelectedEle[o].id),this.chart,this.previousSelectedEle[o]))}return!0},r.prototype.calculateSelectedElements=function(e){if(!t.isNullOrUndefined(e.target)){var i=e.target;if(("None"!==this.chart.selectionMode||"None"!==this.chart.highlightMode)&&-1!==i.id.indexOf(this.chart.element.id+"_")){if("mousemove"===e.type){if(i.hasAttribute("class")&&(i.getAttribute("class").indexOf("highlight")>-1||i.getAttribute("class").indexOf("selection")>-1))return;if(!t.isNullOrUndefined(i.parentNode)&&i.parentNode.hasAttribute("class")&&(i.parentNode.getAttribute("class").indexOf("highlight")>0||i.parentNode.getAttribute("class").indexOf("selection")>0))return}if(this.isAlreadySelected(e),i.id.indexOf("_Series_")>-1){var r=void 0;if(i.id.indexOf("_Trackball_1")>-1)r=he(i.id.split("_Trackball_")[0]+"_Symbol"),r=t.isNullOrUndefined(r)?he(i.id.split("_Trackball_")[0]):r;else if(i.id.indexOf("_Trackball_0")>-1)return null;this.performSelection(this.indexFinder(i.id),this.chart,r||i)}}}},r.prototype.performSelection=function(e,t,i){if(this.isSeriesMode="Series"===this.currentMode,"BoxAndWhisker"===t.series[e.series].type&&i&&i.id===t.element.id+"_Series_"+e.series+"_Point_"+e.point+"_BoxPath"&&(i=i.parentNode),"Area"===t.series[e.series].type&&("Point"===this.currentMode||"Cluster"===this.currentMode)&&i&&i.id===this.chart.element.id+"_Series_"+e.series){var r=this.generateStyle(t.series[e.series]),o=document.querySelectorAll("."+r);this.findTrackballElements(o,r),this.blurEffect(t.element.id,t.visibleSeries)}switch(this.currentMode){case"Series":this.selection(t,e,this.getSeriesElements(t.series[e.series])),this.selectionComplete(t,e,this.currentMode),this.blurEffect(t.element.id,t.visibleSeries);break;case"Point":!isNaN(e.point)&&i&&(this.selection(t,e,[i]),this.selectionComplete(t,e,this.currentMode),this.blurEffect(t.element.id,t.visibleSeries));break;case"Cluster":isNaN(e.point)||(this.clusterSelection(t,e),this.selectionComplete(t,e,this.currentMode),this.blurEffect(t.element.id,t.visibleSeries))}},r.prototype.selectionComplete=function(e,t,i){var r,o,n,a,s,l=[];if("Cluster"===i){for(var h=0,c=e.visibleSeries;h0?this.selectedDataIndexes[0].series:0,l.push({seriesIndex:n});else if("Point"===i)for(var d=0;d-1?this.removeStyles(r):r[0].parentNode&&a.indexOf(this.getSelectionClass(r[0].id))>-1?this.removeStyles([r[0].parentNode]):(this.previousSelectedEle="None"!==e.highlightMode?r:[],this.applyStyles(r),o=!0),this.styleId.indexOf("highlight")>0&&"None"!==e.highlightMode?this.addOrRemoveIndex(this.highlightDataIndexes,i,o):this.addOrRemoveIndex(this.selectedDataIndexes,i,o)}},r.prototype.clusterSelection=function(e,t){this.selection(e,t,this.getClusterElements(e,new Jt(t.series,t.point)))},r.prototype.removeMultiSelectElements=function(e,t,i,r){for(var o,n=0;n0||a.indexOf("highlight")>0?a:t,t=s.indexOf("selection")>0||s.indexOf("highlight")>0?s:t),-1===a.indexOf(t)&&-1===s.indexOf(t)&&i?this.addSvgClass(n[c],this.unselected):(h=n[c],this.removeSvgClass(n[c],this.unselected),this.removeSvgClass(n[c].parentNode,this.unselected)),n[c].id.indexOf("Trackball")>0&&h.classList[0]===t&&(this.removeSvgClass(n[c],this.unselected),this.removeSvgClass(n[c].parentNode,this.unselected),this.addSvgClass(n[c],t));if(e.id.indexOf("Symbol")>-1&&e.querySelectorAll("."+t)[0]&&e.querySelectorAll("."+t)[0].getAttribute("class")===t){var d=he(this.control.element.id+"_Series_"+e.id[e.id.length-1]);(d&&d.hasAttribute("class")?d.getAttribute("class"):"").indexOf(this.unselected)>-1&&this.removeSvgClass(d,this.unselected)}this.control.legendModule&&this.control.legendSettings.visible&&(l=he(this.control.element.id+"_chart_legend_shape_"+o))&&(l.hasAttribute("class")&&this.removeSvgClass(l,l.getAttribute("class")),a=h.getAttribute("class")||"",s=h.parentNode.getAttribute("class")||"",-1===a.indexOf(t)&&-1===s.indexOf(t)&&i?(this.addSvgClass(l,this.unselected),this.removeSvgClass(l,t)):(this.removeSvgClass(l,this.unselected),""===a&&""===s||"EJ2-Trackball"===a.trim()?this.removeSvgClass(l,t):this.addSvgClass(l,t)),r&&s.indexOf(t)>-1&&this.addSvgClass(l,t))},r.prototype.applyStyles=function(e){for(var t=0,i=e;t0&&o.length>0?(this.removeSelectedElements(e,this.highlightDataIndexes,e.series),r=o):this.removeSelectedElements(e,this.selectedDataIndexes,e.series),this.blurEffect(e.element.id,e.visibleSeries),this.selectDataIndex(e,r)},r.prototype.legendSelection=function(e,i,r){var o=r.target;if("mousemove"===r.type){if(r.target.id.indexOf("text")>1&&(o=he(r.target.id.replace("text","shape"))),o.hasAttribute("class")&&(o.getAttribute("class").indexOf("highlight")>-1||o.getAttribute("class").indexOf("selection")>-1))return;this.currentMode=this.chart.highlightMode}if(this.isAlreadySelected(r)){var n=this.generateStyle(e.visibleSeries[i]),a=document.querySelectorAll("."+n);this.isSeriesMode="Series"===this.currentMode;if(a.length>0)this.removeSelection(e,i,a,n,!0);else{for(var s=0,l=e.visibleSeries;s0){for(var n=[],a=0;a0){for(var c=0,d=n;c-1?(t=e.split("SeriesGroup"))[0]=t[1]:e.indexOf("SymbolGroup")>-1?(t=e.split("SymbolGroup"))[0]=t[1]:e.indexOf("_Point_")>-1?t=e.split("_Series_")[1].split("_Point_"):e.indexOf("_Series_")>-1?t[0]=e.split("_Series_")[1]:e.indexOf("_chart_legend_shape_")>-1&&((t=e.split("_chart_legend_shape_"))[0]=t[1]),new Jt(parseInt(t[0],10),parseInt(t[1],10))},r.prototype.calculateDragSelectedElements=function(e,t,r){this.removeSelectedElements(e,this.selectedDataIndexes,e.series);var o="Lasso"===e.selectionMode,n=new i.Rect(t.x,t.y,t.width,t.height),a=new Vi(e.chartAxisLayoutPanel.seriesClipRect.x,e.chartAxisLayoutPanel.seriesClipRect.y);this.removeOffset(n,a);var s,l,h=[],c=[];this.isSeriesMode=!1;var d=e.allowMultiSelection&&(this.rectGrabbing||this.resizing);if(this.rectPoints=this.dragRectArray[d?this.targetIndex:this.count]=new i.Rect(t.x,t.y,t.width,t.height),t.width&&t.height&&!r){var p=new i.Rect(t.x,t.y,t.width,t.height);this.removeOffset(p,a),this.filterArray[d?this.targetIndex:this.count]=p}for(var u=this,g=0,y=e.visibleSeries;g-1||"Lasso"===e.selectionMode;if(e.allowMultiSelection&&c){var d=void 0,p=void 0,u=he(this.multiRectGroup);if(u||(u=e.svgRenderer.createGroup({id:this.multiRectGroup}),e.svgObject.appendChild(u)),this.rectGrabbing||this.resizing){var g=void 0;(g=he(this.draggedRect+this.targetIndex)).nextSibling&&t.remove(g.nextSibling),this.setAttributes(g,r)}else if(!he(this.draggedRectGroup+this.count)){p=e.svgRenderer.createGroup({id:this.draggedRectGroup+this.count});y=document.getElementById(e.element.id+"_series_svg");e.enableCanvas?y.appendChild(p):u.appendChild(p)}"Lasso"!==e.selectionMode?(d=e.svgRenderer.drawRectangle(new Di(this.draggedRect+this.count,s,{color:l,width:1},1,r))).setAttribute("style","cursor:move;"):d=e.svgRenderer.drawPath(new i.PathOption(this.lassoPath+this.count,s,3,l,1,"",this.path)),p||this.rectGrabbing||this.resizing?this.rectGrabbing||this.resizing||p.appendChild(d):he(this.draggedRectGroup+this.count).appendChild(d)}else{d=he(h?this.lassoPath:this.draggedRect);if(this.closeIcon&&m(this.closeIconId),d)h?d.setAttribute("d",this.path):this.setAttributes(d,r);else{var p=e.svgRenderer.createGroup({id:this.draggedRectGroup}),y=document.getElementById(e.element.id+"_series_svg");e.enableCanvas?y.appendChild(p):e.svgObject.appendChild(p),d="Lasso"!==e.selectionMode?e.svgRenderer.drawRectangle(new Di(this.draggedRect,s,{color:l,width:1},1,r)):e.svgRenderer.drawPath(new i.PathOption(this.lassoPath,s,3,l,1,"",this.path)),p.appendChild(d)}}},r.prototype.getIndex=function(e){var t;for(t=e.length-1;t>0;t--){var i=Number(e[t]);if(isNaN(i))break}return+e.substr(t+1,e.length-1)},r.prototype.createCloseButton=function(e,t){var i=this.chart.allowMultiSelection,r=this.chart.themeStyle.selectionCircleStroke,o=this.rectGrabbing||this.resizing,n=this.chart.svgRenderer.createGroup({id:this.closeIconId+(i?o?this.targetIndex:this.count:""),style:"cursor:pointer; visibility: visible;"});n.appendChild(this.chart.svgRenderer.drawCircle(new Ni(this.closeIconId+"_circle"+(i?o?this.targetIndex:this.count:""),"#FFFFFF",{color:r,width:1},1,e,t,10)));var a="M "+(e-4)+" "+(t-4)+" L "+(e+4)+" "+(t+4)+" M "+(e-4)+" "+(t+4)+" L "+(e+4)+" "+(t-4);n.appendChild(this.chart.svgRenderer.drawPath({id:this.closeIconId+"_cross"+(i?o?this.targetIndex:this.count:""),d:a,stroke:r,"stroke-width":2,fill:r})),this.closeIcon=n;var s=he(this.draggedRectGroup+(i?o?this.targetIndex:this.count:""));s&&s.appendChild(n)},r.prototype.removeDraggedElements=function(e,r){if(r.target.id.indexOf(this.closeIconId)>-1&&-1===r.type.indexOf("move")){var o=!0;if(e.allowMultiSelection){var n=this.getIndex(r.target.id),a=he(this.multiRectGroup);if(t.remove(he(this.draggedRectGroup+n)),this.dragRectArray[n]=null,this.filterArray[n]=null,this.totalSelectedPoints[n]=null,a&&0===a.childElementCount&&(m(a),this.dragRectArray=[],this.filterArray=[],this.totalSelectedPoints=[]),"Lasso"===this.currentMode){if(null!=this.multiDataIndexes[n])for(h=0;h-1||this.dragRectArray[this.targetIndex]){o.id.indexOf("_ej2_drag_rect")>-1&&(this.targetIndex=this.getIndex(o.id));var a=this.dragRectArray[this.targetIndex];n=new i.Rect(a.x,a.y,a.width,a.height)}if(e.allowMultiSelection||(n=new i.Rect(this.rectPoints.x,this.rectPoints.y,this.rectPoints.width,this.rectPoints.height)),n){var s=this.findResizeMode(e.svgObject,n,t);this.resizing&&(n=xe(n.x,n.y,n.x+n.width,n.y+n.height,e.chartAxisLayoutPanel.seriesClipRect),this.drawDraggingRect(e,n),this.dragRect=n),r&&(this.resizing=s)}},r.prototype.findResizeMode=function(e,t,r){var o="se-resize",n=!1;if(this.resizing){var a=t.x,s=t.y,l=r.x-a,h=r.y-s;switch(this.resizeMode){case 0:h=Math.abs(t.height+t.y-r.y),t.y=Math.min(t.height+t.y,r.y),t.height=h;break;case 1:l=Math.abs(t.width+t.x-r.x),t.x=Math.min(t.width+t.x,r.x),t.width=l;break;case 2:t.height=Math.abs(h),t.y=Math.min(r.y,s);break;case 3:t.width=Math.abs(l),t.x=Math.min(r.x,a);break;case 4:t.width=Math.abs(l),t.height=Math.abs(h),t.x=Math.min(r.x,a),t.y=Math.min(r.y,s)}}else for(var c=[new i.Rect(t.x,t.y,t.width-5,5),new i.Rect(t.x,t.y,5,t.height),new i.Rect(t.x,t.y+t.height-5,t.width-5,5),new i.Rect(t.x+t.width-5,t.y+5,5,t.height-15),new i.Rect(t.x+t.width-10,t.y+t.height-10,10,10)],d=0;d5&&this.dragRect.height>5?this.calculateDragSelectedElements(t,this.dragRect):!t.allowMultiSelection&&this.rectGrabbing&&this.rectPoints.width&&this.rectPoints.height?this.draggedRectMoved(t,this.dragRect):this.rectGrabbing&&this.dragRectArray[this.targetIndex].width&&this.dragRectArray[this.targetIndex].height&&this.draggedRectMoved(t,this.dragRect),"Lasso"===t.selectionMode&&this.dragging&&this.path&&-1!==this.path.indexOf("L")&&(t.allowMultiSelection?he(this.lassoPath+this.count)&&(he(this.lassoPath+this.count).setAttribute("d",this.path+"Z"),this.pointChecking(he(this.lassoPath+this.count))):(he(this.lassoPath).setAttribute("d",this.path+"Z"),this.pointChecking(he(this.lassoPath))),(this.dragging||this.resizing)&&this.calculateDragSelectedElements(t,this.dragRect)),this.dragging=!1,this.rectGrabbing=!1,this.resizing=!1,this.removeDraggedElements(t,e))},r.prototype.getDragRect=function(e,t){return xe(e.mouseDownX,e.mouseDownY,e.mouseX,e.mouseY,t)},r.prototype.dragStart=function(e,t,r,o,n){var a=e.selectionMode;this.currentMode=e.selectionMode,this.dragging=(a.indexOf("Drag")>-1||"Lasso"===a)&&(e.isDoubleTap||!e.isTouch)&&"PolarRadar"!==e.chartAreaType;var s=n.target;if(this.path=void 0,this.dragging&&(this.count=he(this.multiRectGroup)?this.count+1:0,this.dragRect=new i.Rect(e.mouseDownX,e.mouseDownY,0,0),(e.mouseDownXt.x+t.width||e.mouseDownYt.y+t.height)&&(this.dragging=!1)),"Lasso"===a)for(var l=0,h=e.visibleSeries;l-1},r.prototype.mouseMove=function(e){var i=this.chart,r=e.target;if("None"!==i.highlightMode&&!t.isNullOrUndefined(r)){if(e.target.id.indexOf("text")>1&&(r=he(e.target.id.replace("text","shape"))),r.hasAttribute("class")&&(r.getAttribute("class").indexOf("highlight")>-1||r.getAttribute("class").indexOf("selection")>-1))return;return void this.calculateSelectedElements(e)}"None"!==i.selectionMode&&("touchmove"===e.type&&(t.Browser.isIos||t.Browser.isIos7)&&this.dragging&&e.preventDefault&&e.preventDefault(),j(i.mouseX,i.mouseY,i.chartAxisLayoutPanel.seriesClipRect)?(this.rectGrabbing&&!this.resizing?this.draggedRectMoved(i,this.dragRect,!0,r):this.dragging&&!this.resizing&&("Lasso"===i.selectionMode?(this.getPath(i.mouseDownX,i.mouseDownY,i.mouseX,i.mouseY),this.drawDraggingRect(i,this.dragRect,r)):(this.dragRect=this.getDragRect(i,i.chartAxisLayoutPanel.seriesClipRect),this.drawDraggingRect(i,this.dragRect,r))),this.rectPoints&&!i.allowMultiSelection?this.resizingSelectionRect(i,new Vi(i.mouseX,i.mouseY),null,r):(i.allowMultiSelection&&!this.dragging||this.resizing)&&this.resizingSelectionRect(i,new Vi(i.mouseX,i.mouseY),null,r)):this.completeSelection(e))},r.prototype.getPath=function(e,t,i,r){this.dragging&&(this.path?this.path=this.path+" L"+i+" "+r:this.path="M "+e+" "+t)},r.prototype.pointChecking=function(e){var t,i=this,r=this.chart,o=he(r.svgId).getBoundingClientRect(),n=r.chartAxisLayoutPanel.seriesClipRect.x+Math.max(o.left,0),a=r.chartAxisLayoutPanel.seriesClipRect.y+Math.max(o.top,0);this.multiDataIndexes[this.count]=[];for(var s=0,l=r.visibleSeries;s-1&&i[G(t.type)+"SeriesModule"].findSplinePoint(t),this.pointDragging(this.seriesIndex,this.pointIndex))},e.prototype.getCursorStyle=function(e){var t=this.chart;"Bar"===e.series.type&&t.isTransposed?t.svgObject.setAttribute("style","cursor:ns-resize"):t.isTransposed||"Bar"===e.series.type?t.svgObject.setAttribute("style","cursor:ew-resize"):t.svgObject.setAttribute("style","cursor:ns-resize")},e.prototype.pointDragging=function(e,i){var r,o,n,a=this.chart,s=[],l=a.visibleSeries[e],h=l.dragSettings,c=l.xAxis,d=l.yAxis,p=l.isRectSeries?1:0,u=W(c,d,a.requireInvertedAxis);"Bar"===l.type?(r=a.isTransposed?u.y+u.height-a.mouseY:a.mouseX-u.x,o=a.isTransposed?u.height:u.width):(r=a.isTransposed?a.mouseX-u.x:u.y+u.height-a.mouseY,o=a.isTransposed?u.width:u.height),n=(n=d.isInversed?1-r/o:r/o)*d.visibleRange.delta+d.visibleRange.min;var g=null!==d.minimum?d.visibleRange.min+p:t.isNullOrUndefined(h.minY)?n:h.minY;if((null!==d.maximum?d.visibleRange.max+p:t.isNullOrUndefined(h.maxY)?n:h.maxY)>=n&&g<=n){l.points[i].yValue=l.points[i].y=a.dragY="Logarithmic"===d.valueType?Math.pow(d.logBase,n):parseFloat(n.toFixed(2)),l.points[i].interior=h.fill;for(var y=0;y=0;Y--)if(this.chart.rotatedDataLabelCollections[X]&&this.chart.rotatedDataLabelCollections[Y-1]&&k(this.chart.rotatedDataLabelCollections[X],this.chart.rotatedDataLabelCollections[Y-1])){b=!0,this.chart.rotatedDataLabelCollections[X]=null;break}}}else b=Pe(n,r.dataLabelCollections,z);b&&"None"!==o.labelIntersectAction||!E||(r.dataLabelCollections.push(j),this.isShape&&(I=r.renderer.drawRectangle(new Di(this.commonId+y.index+"_TextShape_"+B,l.color,l.border,o.opacity,n,o.rx,o.ry),new Int32Array([z.x,z.y])),e.shapeElement&&e.shapeElement.appendChild(I)),a=ke(_e(this.fontBackground)),s=Math.round((299*a.r+587*a.g+114*a.b)/1e3),M=n.x+this.margin.left+c.width/2+u.x,A=n.y+this.margin.top+3*c.height/4+u.y,u={x:0,y:0},0!==d&&o.enableRotation?(_=m,O=v,p=d>360?d-360:d<-360?d+360:d):(p=0,_=n.x,O=n.y),Ve(r.renderer,new i.TextOption(this.commonId+y.index+"_Text_"+B,M,A,"middle",l.text,"rotate("+p+","+_+","+O+")","auto",p),l.font,l.font.color||(s>=128||"Hilo"===e.type?"black":"white"),e.textElement,!1,f,!0,!1,e.chart.duration,e.clipRect,null,null,r.enableCanvas))}}}S.childElementCount&&(r.enableCanvas?he(r.element.id+"_Secondary_Element").appendChild(S):be(r.enableCanvas,he(r.element.id+"_Secondary_Element"),S,r.redraw,!1,"x","y",null,"",!1,!1,null,r.duration))},e.prototype.getRectanglePoints=function(e){return[new Vi(e.x,e.y),new Vi(e.x+e.width,e.y),new Vi(e.x+e.width,e.y+e.height),new Vi(e.x,e.y+e.height)]},e.prototype.isDataLabelOverlapWithChartBound=function(e,t,i){for(var r=0;r=128?"black":"white"),t.childElementCount&&!p&&(!Pe(d,this.chart.dataLabelCollections,s)||"None"===n.labelIntersectAction)&&("XY"!==o.seriesType||void 0===r.yValue||x(r.yValue,o.yAxis.visibleRange)||o.type.indexOf("Stacking")>-1||o.type.indexOf("100")>-1&&x(o.stackedValues.endValues[r.index],o.yAxis.visibleRange))&&x(r.xValue,o.xAxis.visibleRange)&&parseFloat(t.style.top)>=g.rect.y&&parseFloat(t.style.left)>=y.rect.x&&parseFloat(t.style.top)<=g.rect.y+g.rect.height&&parseFloat(t.style.left)<=y.rect.x+y.rect.width&&(this.chart.dataLabelCollections.push(new i.Rect(d.x+s.x,d.y+s.y,d.width,d.height)),be(this.chart.enableCanvas,e,t,l,!0,"left","top"),o.animation.enable&&this.chart.animateSeries&&!this.chart.enableCanvas?this.doDataLabelAnimation(o,t):this.chart.enableCanvas&&e.appendChild(t))},e.prototype.calculateTextPosition=function(e,t,i,r,o){var n=o>1&&"Candle"===t.type?e.regions[1]:e.regions[0];o>1&&"HiloOpenClose"===t.type&&(n=2===o?e.regions[1]:e.regions[2]);var a;a=this.getLabelLocation(e,t,i,o);var s=t.clipRect;if(this.chart.requireInvertedAxis&&this.isRectSeries(t)&&"BoxAndWhisker"!==t.type){this.locationY=a.y;l=i.width+this.borderWidth+this.margin.left+this.margin.right-5;a.x="Auto"===r.position?a.x:this.calculateAlignment(l,a.x,r.alignment,e.yValue<0),a.x=this.calculateRectPosition(a.x,n,e.yValue<0!==this.yAxisInversed,r.position,t,i,o,e)}else{this.locationX=a.x;var l=i.height+2*this.borderWidth+this.markerHeight+this.margin.bottom+this.margin.top+5;a.y="Auto"===r.position?a.y:this.calculateAlignment(l,a.y,r.alignment,!!this.isRectSeries(t)&&e.yValue<0),a.y=this.isRectSeries(t)&&"BoxAndWhisker"!==t.type?this.calculateRectPosition(a.y,n,e.yValue<0!==this.yAxisInversed,r.position,t,i,o,e):this.calculatePathPosition(a.y,r.position,t,e,i,o),this.isRectSeries(t)&&"PolarRadar"===this.chart.chartAreaType&&(a=this.calculatePolarRectPosition(a,r.position,t,e,i,o,r.alignment,l))}var h=Me(a,i,this.margin);return!0===r.enableRotation&&0!==r.angle||h.y>s.y+s.height||h.x>s.x+s.width||h.x+h.width<0||h.y+h.height<0||(h.x=h.x<0?5:h.x,h.y=h.y<0&&"None"!==r.labelIntersectAction?5:h.y,h.x-=h.x+h.width>s.x+s.width?h.x+h.width-(s.x+s.width)+5:0,h.y-=h.y+h.height>s.y+s.height?h.y+h.height-(s.y+s.height)+5:0,this.fontBackground="transparent"===this.fontBackground?this.chartBackground:this.fontBackground),h},e.prototype.calculatePolarRectPosition=function(e,t,i,r,o,n,a,s){var l,h=this.chart.availableSize.width,c="Center"===a?0:"Far"===a?1:-1,d=r.regionData.startAngle-.5*Math.PI+(r.regionData.endAngle-r.regionData.startAngle)/2;return l=0===n?r.regionData.radiusr.regionData.innerRadius?r.regionData.innerRadius:r.regionData.radius,this.fontBackground="transparent"===this.fontBackground?this.chartBackground:this.fontBackground,i.drawType.indexOf("Stacking")>-1?t="Outer"===t?"Top":t:i.drawType.indexOf("Range")>-1&&(t="Outer"===t||"Top"===t?t:"Auto"),"Outer"===t?l=0===n?l+10+this.markerHeight:l-10-this.markerHeight:"Middle"===t?(l=l/2+5,"StackingColumn"===i.drawType&&(l=r.regionData.innerRadius+(r.regionData.radius-r.regionData.innerRadius)/2+5-o.height/2)):"Top"===t?l=0===n?l-10-this.markerHeight:l+10+this.markerHeight:"Bottom"===t?(l=10,l+="StackingColumn"===i.drawType?r.regionData.innerRadius+this.markerHeight:0):l=0===n?l>=i.chart.radius?l-5:"StackingColumn"===i.drawType?l-10:l+10:l>=i.chart.radius?l+5:l-10,l+=s*c,e.x=i.clipRect.width/2+i.clipRect.x+l*Math.cos(d),"StackingColumn"===i.drawType?e.x=e.xh/2?e.x-o.width/2:e.x:"Column"===i.drawType&&(e.x=e.xh/2?e.x+o.width/2:e.x),e.y=i.clipRect.height/2+i.clipRect.y+l*Math.sin(d),e},e.prototype.getLabelLocation=function(e,t,i,r){var o=new Vi(0,0),n="Candle"===t.type&&r>1?e.regions[1]:e.regions[0];"HiloOpenClose"===t.type&&(n=2===r?e.regions[1]:e.regions[2]);var a=t.xAxis,s=t.yAxis,l=t.chart.requireInvertedAxis;if("BoxAndWhisker"===t.type){switch(this.markerHeight=0,r){case 0:o=ve(e.xValue,e.median,a,s,l);break;case 1:o=ve(e.xValue,e.maximum,a,s,l);break;case 2:o=ve(e.xValue,e.minimum,a,s,l);break;case 3:o=ve(e.xValue,e.upperQuartile,a,s,l);break;case 4:o=ve(e.xValue,e.lowerQuartile,a,s,l);break;default:o=ve(e.xValue,e.outliers[r-5],a,s,l),this.markerHeight=t.marker.height/2}l?o.y=e.regions[0].y+e.regions[0].height/2:o.x=e.regions[0].x+e.regions[0].width/2}else o=0===r||1===r?new Vi(e.symbolLocations[0].x,e.symbolLocations[0].y):2!==r&&3!==r||"Candle"!==t.type?l?{x:n.x+n.width/2,y:n.y}:{x:n.x+n.width,y:n.y+n.height/2}:new Vi(e.symbolLocations[1].x,e.symbolLocations[1].y);if(r>1&&"HiloOpenClose"===t.type)if(t.chart.requireInvertedAxis){var h=n.height;o.y=n.y+h/2+2*(2===r?1:-1)}else{var c=n.width;o.x=n.x+c/2+2*(2===r?1:-1)}return o},e.prototype.calculateRectPosition=function(e,t,i,r,o,n,a,s){if("PolarRadar"===o.chart.chartAreaType)return null;var l=this.margin,h=this.inverted?n.width:n.height,c=this.borderWidth+h/2+5;switch("StackingColumn100"===o.type||"StackingBar100"===o.type?r="Outer"===r?"Top":r:o.type.indexOf("Range")>-1?r="Outer"===r||"Top"===r?r:"Auto":"Waterfall"===o.type&&(r="Auto"===r?"Middle":r),r){case"Bottom":e=this.inverted?i?e+t.width-c-l.left:e-t.width+c+l.right:i?e-t.height+c+l.top:e+t.height-c-l.bottom;break;case"Middle":e=e=this.inverted?i?e+t.width/2:e-t.width/2:i?e-t.height/2:e+t.height/2;break;case"Auto":e=this.calculateRectActualPosition(e,t,i,o,n,a,s);break;default:c+=this.errorHeight,e=this.calculateTopAndOuterPosition(e,t,r,o,a,c,i)}var d=this.inverted?et.x+t.width:et.y+t.height;this.fontBackground=d?"transparent"===this.fontBackground?this.chartBackground:this.fontBackground:"transparent"===this.fontBackground?s.color||o.interior:this.fontBackground;var p=o.chart.series.length;if("Outer"===r&&o.type.indexOf("Stacking")>-1&&p-1>o.index)for(var u=void 0,g=void 0,y=o.index+1;y-1&&-1===u.type.indexOf("100")){this.fontBackground=g&&(g.yValue<0&&s.yValue<0||g.yValue>0&&s.yValue>0)?g?g.color:u.interior:this.fontBackground;break}return e},e.prototype.calculatePathPosition=function(e,t,i,r,o,n){switch(i.type.indexOf("Area")>-1&&"RangeArea"!==i.type&&this.yAxisInversed&&"Auto"!==i.marker.dataLabel.position&&(t="Top"===t?"Bottom":"Bottom"===t?"Top":t),this.fontBackground="transparent"===this.fontBackground?this.chartBackground:this.fontBackground,t){case"Top":case"Outer":e=e-this.markerHeight-this.borderWidth-o.height/2-this.margin.bottom-5-this.errorHeight;break;case"Bottom":e=e+this.markerHeight+this.borderWidth+o.height/2+this.margin.top+5+this.errorHeight;break;case"Auto":e=this.calculatePathActualPosition(e,this.markerHeight,i,r,o,n)}return e},e.prototype.isDataLabelShape=function(e){this.isShape="transparent"!==e.color||e.border.width>0,this.borderWidth=e.border.width,this.isShape||(this.margin={left:0,right:0,bottom:0,top:0})},e.prototype.calculateRectActualPosition=function(e,t,i,r,o,n,a){for(var s,l,h=!0,c=0,d=this.chart.dataLabelCollections,p=-1!==r.type.indexOf("Range")||"Hilo"===r.type?2:4;h&&c-1&&"Outer"===u&&(u="Top",c++),s=this.calculateRectPosition(e,t,i,u,r,o,n,a),h=this.inverted?(l=Me(new Vi(s,this.locationY),o,this.margin)).x<0||Pe(l,d,r.clipRect)||l.x+l.width>r.clipRect.width:(l=Me(new Vi(this.locationX,s),o,this.margin)).y<0||Pe(l,d,r.clipRect)||l.y>r.clipRect.height,c++}return s},e.prototype.calculateAlignment=function(e,t,i,r){switch(i){case"Far":t=this.inverted?r?t-e:t+e:r?t+e:t-e;break;case"Near":t=this.inverted?r?t+e:t-e:r?t-e:t+e;break;case"Center":t=t}return t},e.prototype.calculateTopAndOuterPosition=function(e,t,i,r,o,n,a){var s,l=this.margin;switch(r.type){case"RangeColumn":case"RangeArea":case"Hilo":s=0===o&&!this.yAxisInversed||1===o&&this.yAxisInversed,e=this.updateLabelLocation(i,e,n,l,t,s);break;case"Candle":s=(0===o||2===o)&&!this.yAxisInversed||(1===o||3===o)&&this.yAxisInversed,e=this.updateLabelLocation(i,e,n,l,t,s,o>1);break;case"HiloOpenClose":o<=1?(s=0===o&&!this.yAxisInversed||1===o&&this.yAxisInversed,e=this.updateLabelLocation(i,e,n,l,t,s)):e=this.yAxisInversed?this.inverted?e-n-l.right:e+n+l.top:this.inverted?e+n+l.left:e-n-l.bottom;break;default:e=a&&"Top"===i||!a&&"Outer"===i?this.inverted?e+n+l.left+this.markerHeight:e-n-l.bottom-this.markerHeight:this.inverted?e-n-l.right-this.markerHeight:e+n+l.top+this.markerHeight}return e},e.prototype.updateLabelLocation=function(e,t,i,r,o,n,a){return void 0===a&&(a=!1),t=this.inverted?n?"Outer"!==e||a?t-i-r.right-this.markerHeight:t+i+r.left+this.markerHeight:"Outer"!==e||a?t-o.width+i+r.left+this.markerHeight:t-o.width-i-r.right-this.markerHeight:n?"Outer"!==e||a?t+i+r.top+this.markerHeight:t-i-r.bottom-this.markerHeight:"Outer"!==e||a?t+o.height-i-r.bottom-this.markerHeight:t+o.height+i+r.top+this.markerHeight},e.prototype.calculatePathActualPosition=function(e,t,i,r,o,n){var a,s,l,h,c,d=i.points,p=r.index,u=d[p].yValue,g=d.length-1>p?d[p+1]:null,y=p>0?d[p-1]:null,m=!0,v=this.chart.dataLabelCollections;if("Bubble"===i.type)a="Top";else if(i.type.indexOf("Step")>-1)a="Top",p&&(a=y&&y.visible&&u>y.yValue===this.yAxisInversed&&u!==y.yValue?"Bottom":"Top");else if("BoxAndWhisker"===i.type)1===n||3===n||n>4?a=i.yAxis.isInversed?"Bottom":"Top":2===n||4===n?a=i.yAxis.isInversed?"Top":"Bottom":(m=!1,a="Middle",s=this.calculatePathPosition(e,a,i,r,o,n));else if(0===p)a=!g||!g.visible||u>g.yValue||uy.yValue||uu||y&&y.yValue>u?"Bottom":"Top";else a="Top";for(h="Bottom"===a,c=["Outer","Top","Bottom","Middle","Auto"].indexOf(a);m&&c<4;)s=this.calculatePathPosition(e,this.getPosition(c),i,r,o,n),m=(l=Me(new Vi(this.locationX,s),o,this.margin)).y<0||Pe(l,v,i.clipRect)||l.y+l.height>i.clipRect.height,c=h?c-1:c+1,h=!1;return s},e.prototype.doDataLabelAnimation=function(e,t){for(var i,r=e.shapeElement.childNodes,o=e.textElement.childNodes,n=e.animation.delay+e.animation.duration,a=e.chart.animated?e.chart.duration:200,s=t?1:o.length,l=0;l-1?t.stackedValues.endValues[e.index]:"HighLow"===t.seriesType||"HighLowOpenClose"===t.seriesType?t.points[e.index].high:e.yValue,h=ve(e.xValue+("Plus"===a||"Both"===a?"Custom"!==n.type||"Horizontal"!==n.mode&&"Both"!==n.mode?r:r=n.horizontalPositiveError:0),l+("Plus"===a||"Both"===a?"Custom"!==n.type||"Vertical"!==n.mode&&"Both"!==n.mode?o:o=n.verticalPositiveError:0),t.xAxis,t.yAxis,i);if(s.push(h),t.isRectSeries){c=e.symbolLocations[0];s.push(c)}else{var c=ve(e.xValue,e.yValue,t.xAxis,t.yAxis,i);s.push(c)}var d=ve(e.xValue-("Minus"===a||"Both"===a?"Custom"!==n.type||"Horizontal"!==n.mode&&"Both"!==n.mode?r:r=n.horizontalNegativeError:0),l-("Minus"===a||"Both"===a?"Custom"!==n.type||"Vertical"!==n.mode&&"Both"!==n.mode?o:o=n.verticalNegativeError:0),t.xAxis,t.yAxis,i);return s.push(d),e.error="Vertical"===n.mode?n.verticalError:n.horizontalError,this.negativeHeight="Vertical"===n.mode||"Both"===n.mode?i?s[1].x-s[2].x:s[2].y-s[1].y:0,this.positiveHeight="Vertical"===n.mode||"Both"===n.mode?i?s[0].x-s[1].x:s[1].y-s[0].y:0,this.getErrorDirection(s[0],s[1],s[2],t,i)},e.prototype.calculateFixedValue=function(e,t,i,r,o,n,a){t.errorBar;return this.findLocation(e,t,i,r,o)},e.prototype.calculatePercentageValue=function(e,t,i,r,o,n,a){return r=r/100*e.xValue,o=o/100*e.yValue,this.findLocation(e,t,i,r,o)},e.prototype.calculateStandardDeviationValue=function(e,t,i,r,o,n,a){var s=this.meanCalculation(t,t.errorBar.mode);return r*=s.horizontalSquareRoot+s.horizontalMean,o*=s.verticalSquareRoot+s.verticalMean,this.findLocation(e,t,i,r,o)},e.prototype.calculateStandardErrorValue=function(e,t,i,r,o,n,a){var s=t.points.length,l=this.meanCalculation(t,t.errorBar.mode);return r=r*l.horizontalSquareRoot/Math.sqrt(s),o=o*l.verticalSquareRoot/Math.sqrt(s),this.findLocation(e,t,i,r,o)},e.prototype.calculateCustomValue=function(e,t,i,r,o,n,a){t.errorBar;return this.findLocation(e,t,i,r,o)},e.prototype.getHorizontalDirection=function(e,t,i,r,o,n){var a="",s="";return a+="M "+e.x+" "+t.y+" L "+i.x+" "+t.y,s+="Plus"===r||"Both"===r?"M "+e.x+" "+(t.y-n)+" L "+e.x+" "+(t.y+n):"",s+="Minus"===r||"Both"===r?"M "+i.x+" "+(t.y-n)+" L "+i.x+" "+(t.y+n):" ",[a,s]},e.prototype.getVerticalDirection=function(e,t,i,r,o,n){var a="",s="";return a+="M "+t.x+" "+e.y+" L "+t.x+" "+i.y,s+="Plus"===r||"Both"===r?"M "+(t.x-n)+" "+e.y+" L "+(t.x+n)+" "+e.y:"",s+="Minus"===r||"Both"===r?"M "+(t.x-n)+" "+i.y+" L "+(t.x+n)+" "+i.y:"",[a,s]},e.prototype.getBothDirection=function(e,t,i,r,o,n){var a="",s="",l=this.getHorizontalDirection(e,t,i,r,o,n),h=this.getVerticalDirection(e,t,i,r,o,n);return s=l[0].concat(h[0]),a=l[1].concat(h[1]),[s,a]},e.prototype.getErrorDirection=function(e,t,i,r,o){var n,a=r.errorBar.direction,s=r.errorBar.mode,l=r.errorBar.errorBarCap.length,h=s;switch(s){case"Both":h=s;break;case"Horizontal":h=o?"Vertical":s;break;case"Vertical":h=o?"Horizontal":s}switch(h){case"Horizontal":n=this.getHorizontalDirection(e,t,i,a,h,l);break;case"Vertical":n=this.getVerticalDirection(e,t,i,a,h,l);break;case"Both":n=this.getBothDirection(e,t,i,a,h,l)}return[n[0],n[1]]},e.prototype.meanCalculation=function(e,t){var i=0,r=0,o=0,n=0,a=e.points.length;switch(t){case"Vertical":o=(r=C(e.yData))/a;break;case"Horizontal":n=(i=C(e.xData))/a;break;case"Both":o=(r=C(e.yData))/a,n=(i=C(e.xData))/a}for(var s=0,l=e.points;s1&&(this.legend.mode="Series");for(var n=0,a=e;n0&&s.points[0].interior?s.points[0].interior:s.interior,this.legendCollections.push(new mr(s.name,r,s.legendShape,"TrendLine"===s.category?this.chart.series[s.sourceIndex].trendlines[s.index].visible:s.visible,i,s.legendImageUrl,s.marker.shape,s.marker.visible)));else if("Point"===this.legend.mode)for(var l=this,h=0,c=s.points;h=1&&1===t.rangeColorSettings[0].colors.length)){for(var y=0,m=t.rangeColorSettings;y0){var f=t.rangeColorSettings[0].start.toString(),b=t.rangeColorSettings[t.rangeColorSettings.length-1].end.toString();this.legendCollections.push(new mr(f,s.interior,"Rectangle",!0,i,"",s.marker.shape,s.marker.visible)),this.legendCollections.push(new mr(b,s.interior,"Rectangle",!0,i,"",s.marker.shape,s.marker.visible))}}},r.prototype.getLegendBounds=function(e,t,r){this.calculateLegendTitle(r,t),this.isTitle=!!r.title;var o=r.padding,n=r.titlePosition,a=0,s=0,l=this.arrowWidth,h=this.arrowHeight,c=this.isVertical&&!r.enablePages?h:0,d=this.isTitle&&"Top"===n?this.legendTitleSize.height+this.fivePixel:0;d=this.isTitle&&this.isVertical&&"Top"!==n?this.legendTitleSize.height+this.fivePixel:d,this.isVertical?s=r.width?0:e.width/100*5:a=r.height?0:e.height/100*5,t.height+=a,t.width+=s;var p,u=r.shapeWidth,g=r.shapePadding,y=0,m=0,v=0,f=0,b=0,x=0;this.maxItemHeight=Math.max(i.measureText("MeasureText",r.textStyle).height,r.shapeHeight);for(var w=!1,S=0,C=this.legendCollections;So.x+o.width+this.legend.shapeWidth/2||this.isVertical?(e.location.x=t.x,e.location.y=n===a?r.location.y:r.location.y+this.maxItemHeight+s):(e.location.x=n===a?r.location.x:l,e.location.y=r.location.y);var h=this.legendBounds.x+this.legendBounds.width-(e.location.x+i-this.legend.shapeWidth/2);e.text=Ie(+h.toFixed(4),e.text,this.legend.textStyle)},r.prototype.LegendClick=function(e,t){var i=this.chart,r="Series"===i.legendSettings.mode?e:0,o=i.visibleSeries[r],n=this.legendCollections[e];if("Series"===i.legendSettings.mode){s={legendText:n.text,legendShape:n.shape,chart:i.isBlazor?{}:i,series:o,points:o.points,name:"legendClick",cancel:!1};this.chart.trigger("legendClick",s),o.legendShape=s.legendShape,null!==o.fill&&(i.visibleSeries[e].interior=o.fill),i.legendSettings.toggleVisibility?("TrendLine"===o.category?i.series[o.sourceIndex].trendlines[o.index].visible?i.series[o.sourceIndex].trendlines[o.index].visible=!1:i.series[o.sourceIndex].trendlines[o.index].visible=!0:(o.chart.isProtectedOnChange=!0,this.changeSeriesVisiblity(o,o.visible)),n.visible="TrendLine"===o.category?i.series[o.sourceIndex].trendlines[o.index].visible:o.visible,this.refreshLegendToggle(i,o)):i.selectionModule?i.selectionModule.legendSelection(i,e,t):i.highlightModule&&i.highlightModule.legendSelection(i,e,t),o.chart.isProtectedOnChange=!1}else if("Point"===i.legendSettings.mode){var a=o.points[e],s={legendText:n.text,legendShape:n.shape,chart:i.isBlazor?{}:i,series:o,points:[a],name:"legendClick",cancel:!1};this.chart.trigger("legendClick",s),i.legendSettings.toggleVisibility&&(a.visible=!a.visible,(h=this.legendCollections[e]).visible=a.visible,this.refreshLegendToggle(i,o))}else if("Range"===i.legendSettings.mode){for(var l=[],h=this.legendCollections[e],c=0,d=o.points;c0&&!e.enableAnimation&&!e.enableCanvas){for(;e.svgObject.lastChild;)e.svgObject.removeChild(e.svgObject.lastChild);t.remove(e.svgObject)}e.animateSeries=!1,e.redraw=e.enableAnimation,e.rotatedDataLabelCollections=[],m(i.getElement(e.element.id+"_Secondary_Element").querySelectorAll(".ejSVGTooltip")[0]),Ue(e),this.redrawSeriesElements(r,e),e.removeSvg(),e.refreshAxis(),r.refreshAxisLabel(),this.refreshSeries(e.visibleSeries),e.markerRender.removeHighlightedMarker(),e.refreshBound(),e.trigger("loaded",{chart:e}),o.length>0&&(e.selectionModule.selectedDataIndexes=o,e.selectionModule.redrawSelection(e,e.selectionMode)),e.highlightModule&&"None"!==e.highlightMode&&e.highlightModule.redrawSelection(e,e.highlightMode),e.redraw=!1},r.prototype.changeSeriesVisiblity=function(e,t){e.visible=!t,this.isSecondaryAxis(e.xAxis)&&(e.xAxis.internalVisibility=e.xAxis.series.some(function(e){return e.visible})),this.isSecondaryAxis(e.yAxis)&&(e.yAxis.internalVisibility=e.yAxis.series.some(function(e){return e.visible}))},r.prototype.isSecondaryAxis=function(e){return this.chart.axes.indexOf(e)>-1},r.prototype.redrawSeriesElements=function(e,t){if(!t.redraw)return null;m(t.element.id+"_Series_"+(void 0===e.index?e.category:e.index)+"_DataLabelCollections")},r.prototype.refreshSeries=function(e){for(var t=0,i=e;t-1){i=parseInt(a.split(h)[1],10),this.LegendClick(i,e);break}}a.indexOf(this.legendID+"_pageup")>-1?this.changePage(e,!0):a.indexOf(this.legendID+"_pagedown")>-1&&this.changePage(e,!1),this.chart.enableCanvas&&this.pagingRegions.length&&this.checkWithinBounds(r,o),(n=this.legendRegions.filter(function(e){return j(r,o+(t.isPaging?(t.currentPageNumber-1)*t.translatePage(null,1,2):0),e.rect)})).length&&this.chart.enableCanvas&&this.LegendClick(n[0].index,e)}},r.prototype.checkWithinBounds=function(e,t){var r=this.chart.renderer,o=this.legendBounds,n=this.chart.legendSettings.border.width,a=new i.Rect(o.x,o.y,o.width,o.height);return a.x=a.x-n/2,a.y=a.y-n/2,a.width=a.width+n,a.height=a.height+n,j(e,t,this.pagingRegions[0])?(--this.currentPageNumber>0?(this.legendRegions=[],r.clearRect(a),r.canvasClip(new Di("legendClipPath","transparent",{width:0,color:""},null,a)),this.renderLegend(this.chart,this.legend,o),r.canvasRestore()):++this.currentPageNumber,null):j(e,t,this.pagingRegions[1])?(++this.currentPageNumber>0&&this.currentPageNumber<=this.totalNoOfPages?(this.legendRegions=[],r.clearRect(a),r.canvasClip(new Di("legendClipPath","transpaent",{width:0,color:""},null,a)),this.renderLegend(this.chart,this.legend,o),r.canvasRestore()):--this.currentPageNumber,null):void 0},r.prototype.getModuleName=function(){return"Legend"},r.prototype.destroy=function(){this.removeEventListener()},r}(yr),Rn=function(){function e(e){this.control=e}return e.prototype.render=function(e,i){return this.isChart="chart"===this.control.getModuleName(),this.annotation=e,ue(t.createElement("div",{id:this.control.element.id+"_Annotation_"+i,styles:"position: absolute; z-index: 1"}),i,e.content,this.control)},e.prototype.setAnnotationPixelValue=function(e){var t="Chart"===this.annotation.region?new i.Rect(0,0,this.control.availableSize.width,this.control.availableSize.height):this.isChart?this.control.chartAxisLayoutPanel.seriesClipRect:this.control.series[0].accumulationBound;return e.x=("string"!=typeof this.annotation.x?"number"==typeof this.annotation.x?this.annotation.x:0:Be(this.annotation.x,t.width))+t.x,e.y=("number"==typeof this.annotation.y?this.annotation.y:Be(this.annotation.y,t.height))+t.y,!0},e.prototype.setAnnotationPointValue=function(e){var t=new Vi(0,0);if(this.isChart){for(var i=this.control,o=this.annotation,n=o.xAxisName,a=o.yAxisName,s=i.requireInvertedAxis,l=this.control.stockChart,h=void 0,c=void 0,d=void 0,p=0,u=i.axisCollections;p-1){var y="DateTimeCategory"===h.valueType?o.x.getTime().toString():o.x;if(h.labels.indexOf(y)<0)return!1;d=h.labels.indexOf(y)}else if("DateTime"===h.valueType){var m={skeleton:"full",type:"dateTime"};d="object"==typeof this.annotation.x||"object"==typeof new Date(this.annotation.x)?Date.parse(i.intl.getDateParser(m)(i.intl.getDateFormat(m)(new Date(r.DataUtil.parse.parseJson({val:o.x}).val)))):0}else d=+o.x;else(a===g.name||null==a&&"primaryYAxis"===g.name)&&(c=g)}return!!(h&&c&&x("Logarithmic"===h.valueType?v(d,h.logBase):d,h.visibleRange)&&x("Logarithmic"===c.valueType?v(+o.y,c.logBase):+o.y,c.visibleRange))&&(t=ve(d,+o.y,h,c,s),e.x=t.x+(s?c.rect.x:h.rect.x),e.y=t.y+(s?h.rect.y:c.rect.y)+(l&&l.enablePeriodSelector?l.toolbarHeight+l.titleSize.height:0),!0)}return this.setAccumulationPointValue(e)},e.prototype.processAnnotation=function(e,i,r){var o=this.control,n=new Vi(0,0),a=this.render(e,i),s=function(){a.style.transform="translate(-50%, -50%)"};s.bind(n,this),this["setAnnotation"+e.coordinateUnits+"Value"](n)?this.setElementStyle(n,a,r):this.control.redraw&&m(a.id),t.updateBlazorTemplate((this.control.element.id+"Annotation"+i).replace(/[^a-zA-Z0-9]/g,""),"ContentTemplate",o.stockChart?o.stockChart.annotations[i]:this.control.annotations[i],void 0,s)},e.prototype.setAccumulationPointValue=function(e){for(var t,i=0,r=this.control.visibleSeries[0].points;it-1?e[t-1]:n*(e[o]-e[o-1])+e[o-1]},r.prototype.getInclusiveQuartileValue=function(e,t,i){if(0===t)return 0;if(1===t)return e[0];var r=i*(t-1),o=Math.floor(Math.abs(r));return(r-o)*(e[o+1]-e[o])+e[o]},r.prototype.getQuartileValues=function(e,t,i){if(1===t)return i.lowerQuartile=e[0],i.upperQuartile=e[0],null;var r=t%2==0,o=t/2,n=e.slice(0,o),a=e.slice(r?o:o+1,t);i.lowerQuartile=Ee(n),i.upperQuartile=Ee(a)},r.prototype.getMinMaxOutlier=function(e,t,i){for(var r=1.5*(i.upperQuartile-i.lowerQuartile),o=0;o=0;o--){if(!(e[o]>i.upperQuartile+r)){i.maximum=e[o];break}i.outliers.push(e[o])}},r.prototype.doAnimation=function(e){this.animate(e)},r.prototype.getModuleName=function(){return"BoxAndWhiskerSeries"},r.prototype.destroy=function(){},r}(jr),_n=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),On=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return _n(r,e),r.prototype.render=function(e,i,r,o){var n,a,s,l,h=this,c=null,d="",p=Math.max(e.yAxis.visibleRange.min,0),u=[],g=this.sortSegments(e,e.segments);e.visiblePoints.map(function(t,y,m){t.symbolLocations=[],t.regions=[],l=!1,t.visible&&S(m[y-1],t,m[y+1],e)&&(d+=h.getAreaPathDirection(t.xValue,p,e,o,ve,c,"M"),c=c||new Vi(t.xValue,p),n=ve(t.xValue,t.yValue,i,r,o),s&&h.setPointColor(t,s,e,"X"===e.segmentAxis,g)?(l=!0,a=ve(c.x,p,i,r,o),d+="L "+n.x+" "+n.y+" ",d+="L "+n.x+" "+a.y+" ",h.generatePathOption(u,e,s,d,"_Point_"+s.index),d="M "+n.x+" "+a.y+" L "+n.x+" "+n.y+" "):(d+="L "+n.x+" "+n.y+" ",h.setPointColor(t,null,e,"X"===e.segmentAxis,g)),m[y+1]&&!m[y+1].visible&&"Drop"!==e.emptyPointSettings.mode&&(d+=h.getAreaEmptyDirection({x:t.xValue,y:p},c,e,o,ve),c=null),s=t,h.storePointLocation(t,e,o,ve))}),t.isNullOrUndefined(l)||l||(d=e.points.length>1?d+this.getAreaPathDirection(s.xValue,p,e,o,ve,null,"L"):"",this.generatePathOption(u,e,s,d,"")),this.applySegmentAxis(e,u,g),this.renderMarker(e)},r.prototype.generatePathOption=function(e,t,r,o,n){e.push(new i.PathOption(t.chart.element.id+"_Series_"+t.index+n,t.setPointColor(r,t.interior),t.border.width,t.border.color,t.opacity,t.dashArray,o))},r.prototype.destroy=function(){},r.prototype.getModuleName=function(){return"MultiColoredAreaSeries"},r.prototype.doAnimation=function(e){this.doLinearAnimation(e,e.animation)},r}(Gr),En=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return En(t,e),t.prototype.render=function(e,t,r,o){for(var n=null,a="M",s=this.enableComplexProperty(e),l=[],h="",c=this.sortSegments(e,e.segments),d=0,p=s;do-10&&o>0&&"Wrap"===c.overflow&&!l&&(r*=Ge(n.text,o-10,c.textStyle).length),a[d]=a[d]?a[d]0&&"WithoutBorder"!==t.border.type&&""!==(b=v.renderXAxisLabelBorder(o,c-l-10,e,l,f,u,R,n,m.alignment,b,x,S,h))&&(v.createBorderElement(o,r,e,b,h),h++),v.chart.enableCanvas||v.multiElements.appendChild(v.labelElement)}})}),this.chart.enableCanvas||o.appendChild(this.multiElements)},e.prototype.renderXAxisLabelBorder=function(e,t,i,r,o,n,a,s,l,h,c,d,p){var u,g,y,m,v=10,f=i.multiLevelLabels[e],b=f.categories[p].type,x=t+v,w=this.xAxisMultiLabelHeight[e]+v,S="Outside"===i.labelPosition?i.scrollBarHeight:0,C=r+s.x,P=!d&&c||d&&!c?o+s.y+this.xAxisPrevHeight[e]+S:s.y-o-this.xAxisPrevHeight[e]-S,L=b||f.border.type;switch(L){case"WithoutTopandBottomBorder":case"Rectangle":case"WithoutTopBorder":h+="M "+C+" "+P+" L "+C+" "+(P+(w=!d&&c||d&&!c?w:-w))+" M "+(C+x)+" "+P+" L "+(C+x)+" "+(P+w),h+="WithoutTopandBottomBorder"!==L?" L "+C+" "+(P+w)+" ":" ",h+="Rectangle"===L?"M "+C+" "+P+" L "+(C+x)+" "+P:" ";break;case"Brace":"Near"===l?(y=a.x,m=a.x+n.width+2):"Center"===l?(y=a.x-n.width/2-2,m=a.x+n.width/2+2):(y=a.x-n.width-2,m=a.x),h+="M "+C+" "+P+" L "+C+" "+(P+(w=!d&&c||d&&!c?w:-w)/2)+" M "+C+" "+(P+w/2)+" L "+(y-2)+" "+(P+w/2)+" M "+m+" "+(P+w/2)+" L "+(C+x)+" "+(P+w/2)+" M "+(C+x)+" "+(P+w/2)+" L "+(C+x)+" "+P;break;case"CurlyBrace":!d&&c||d&&!c?(v=10,u=15,g=5):(v=-10,u=-15,g=-5),h+="Center"===l?"M "+C+" "+P+" C "+C+" "+P+" "+(C+5)+" "+(P+v)+" "+(C+10)+" "+(P+v)+" L "+(C+x/2-5)+" "+(P+v)+" L "+(C+x/2)+" "+(P+u)+" L "+(C+x/2+5)+" "+(P+v)+" L "+(C+x-10)+" "+(P+v)+" C "+(C+x-10)+" "+(P+v)+" "+(C+x)+" "+(P+g)+" "+(C+x)+" "+P:"Near"===l?"M "+C+" "+P+" C "+C+" "+P+" "+(C+5)+" "+(P+v)+" "+(C+10)+" "+(P+v)+" L "+(C+15)+" "+(P+u)+" L "+(C+20)+" "+(P+v)+" L "+(C+x-10)+" "+(P+v)+" C "+(C+x-10)+" "+(P+v)+" "+(C+x)+" "+(P+g)+" "+(C+x)+" "+P:"M "+C+" "+P+" C "+C+" "+P+" "+(C+5)+" "+(P+v)+" "+(C+10)+" "+(P+v)+" L "+(C+x-20)+" "+(P+v)+" L "+(C+x-15)+" "+(P+u)+" L "+(C+x-10)+" "+(P+v)+" L "+(C+x-10)+" "+(P+v)+" C "+(C+x-10)+" "+(P+v)+" "+(C+x)+" "+(P+g)+" "+(C+x)+" "+P}return h},e.prototype.renderYAxisMultiLevelLabels=function(e,r,o,n){var a,s,l,h,c,d,p,u,g,y,m=this,v="Outside"===e.labelPosition,f=(e.tickPosition===e.labelPosition?e.majorTickLines.height:0)+e.maxLabelSize.width+10,b="",x=e.isInversed,w=e.opposedPosition,S=v&&t.isNullOrUndefined(e.crossesAt)?e.scrollBarHeight:0;S*=w?1:-1;var C=w&&!v||!w&&v?n.x-e.multiLevelLabelHeight-f-10:n.x+f;this.createClipRect(C+S,n.y-e.majorTickLines.width,n.height+2*e.majorTickLines.width,e.multiLevelLabelHeight+10,this.chart.element.id+"_YAxis_Clippath_"+r,this.chart.element.id+"YAxisMultiLevelLabel"+r),e.multiLevelLabels.map(function(t,o){m.labelElement=m.chart.renderer.createGroup({id:m.chart.element.id+r+"_MultiLevelLabel"+o}),p=0,t.categories.map(function(C,P){if(b="",g="string"==typeof C.end?Number(new Date(C.end)):C.end,u="string"==typeof C.start?Number(new Date(C.start)):C.start,h=z(u,e)*n.height,c=z(g,e)*n.height,c=x?[h,h=c][0]:c,!(d=m.triggerMultiLabelRender(e,C.text,t.textStyle,t.alignment,C.customAttributes)).cancel){a=i.measureText(d.text,d.textStyle),y=c-h,s=n.x-f-m.yAxisPrevHeight[o]-m.yAxisMultiLabelHeight[o]/2-5,l=n.height+n.y-h-y/2,s=w?v?n.x+f+5+m.yAxisMultiLabelHeight[o]/2+m.yAxisPrevHeight[o]+S:n.x-f-m.yAxisMultiLabelHeight[o]/2-m.yAxisPrevHeight[o]-5:v?s+S:n.x+f+5+m.yAxisMultiLabelHeight[o]/2+m.yAxisPrevHeight[o],"Center"===d.alignment?l+=a.height/4:"Far"===d.alignment?l+=y/2-a.height/2:l=l-y/2+a.height,s="CurlyBrace"===t.border.type?!w&&v||w&&!v?s-10:s+10:s;var L=new i.TextOption(m.chart.element.id+r+"_Axis_MultiLevelLabel_Level_"+o+"_Text_"+P,s,l,"middle",d.text);L.text="Trim"===t.overflow?Ie(null===C.maximumTextWidth?m.yAxisMultiLabelHeight[o]:C.maximumTextWidth,d.text,d.textStyle):L.text,Ve(m.chart.renderer,L,d.textStyle,d.textStyle.color||m.chart.themeStyle.axisLabel,m.labelElement,m.chart.redraw,!0,null,null,null,null,null,null,m.chart.enableCanvas),t.border.width>0&&"WithoutBorder"!==t.border.type&&""!==(b=m.renderYAxisLabelBorder(o,y,e,c,f,h,a,L,n,d.alignment,b,v,w,p))&&(m.createBorderElement(o,r,e,b,p),p++),m.chart.enableCanvas||m.multiElements.appendChild(m.labelElement)}})}),this.chart.enableCanvas||o.appendChild(this.multiElements)},e.prototype.renderYAxisLabelBorder=function(e,i,r,o,n,a,s,l,h,c,d,p,u,g){var y,m,v=o-a,f=10,b=r.multiLevelLabels[e],x=b.categories[g].type,w=h.y+h.height-o,S=p&&t.isNullOrUndefined(r.crossesAt)?r.scrollBarHeight:0;S*=u?1:-1;var C=this.yAxisMultiLabelHeight[e]+f,P=(!u&&p||u&&!p?h.x-n-this.yAxisPrevHeight[e]:h.x+n+this.yAxisPrevHeight[e])+S,L=x||b.border.type;switch(L){case"WithoutTopandBottomBorder":case"Rectangle":case"WithoutTopBorder":d+="M "+P+" "+w+" L "+(P+(C=!u&&p||u&&!p?-C:C))+" "+w+" M "+P+" "+(w+v)+" L "+(P+C)+" "+(w+v),d+="WithoutTopandBottomBorder"!==L?" L "+(P+C)+" "+w+" ":" ",d+="Rectangle"===L?"M "+P+" "+(w+v)+"L "+P+" "+w+" ":" ";break;case"Brace":d+="M "+P+" "+w+" L "+(P-(C=!u&&p||u&&!p?C:-C)/2)+" "+w+" L "+(P-C/2)+" "+(l.y-s.height/2-4)+" M "+(P-C/2)+" "+(l.y+s.height/4+2)+" L "+(P-C/2)+" "+(w+v)+" L "+P+" "+(w+v);break;case"CurlyBrace":!u&&p||u&&!p?(f=-10,y=-15,m=-5):(f=10,y=15,m=5),d+="Center"===c?"M "+P+" "+w+" C "+P+" "+w+" "+(P+f)+" "+w+" "+(P+f)+" "+(w+10)+" L "+(P+f)+" "+(w+(v-10)/2)+" L "+(P+y)+" "+(w+(v-10)/2+5)+" L "+(P+f)+" "+(w+(v-10)/2+10)+" L "+(P+f)+" "+(w+(v-10))+" C "+(P+f)+" "+(w+(v-10))+" "+(P+m)+" "+(w+v)+" "+P+" "+(w+v):"Far"===c?"M "+P+" "+w+" C "+P+" "+w+" "+(P+f)+" "+w+" "+(P+f)+" "+(w+10)+" L "+(P+f)+" "+(w+v-20)+" L "+(P+y)+" "+(w+(v-15))+" L "+(P+f)+" "+(w+(v-10))+" L "+(P+f)+" "+(w+(v-10))+" C "+(P+f)+" "+(w+(v-10))+" "+(P+f)+" "+(w+v)+" "+P+" "+(w+v):"M "+P+" "+w+" C "+P+" "+w+" "+(P+f)+" "+w+" "+(P+f)+" "+(w+10)+" L "+(P+y)+" "+(w+15)+" L "+(P+f)+" "+(w+20)+" L "+(P+f)+" "+(w+(v-10))+" C "+(P+f)+" "+(w+(v-10))+" "+(P+m)+" "+(w+v)+" "+P+" "+(w+v)}return d},e.prototype.createClipRect=function(e,t,i,r,o,n){this.multiElements=this.chart.renderer.createGroup({id:n,"clip-path":"url(#"+o+")"}),this.chart.enableCanvas||this.multiElements.appendChild(K(this.chart.redraw,{id:o,x:e,y:t,width:r,height:i,fill:"white","stroke-width":1,stroke:"Gray"},this.chart.renderer))},e.prototype.createBorderElement=function(e,t,r,o,n){var a=o,s=this.chart.renderer.drawPath(new i.PathOption(this.chart.element.id+t+"_Axis_MultiLevelLabel_Rect_"+e+"_"+n,"Transparent",r.multiLevelLabels[e].border.width,r.multiLevelLabels[e].border.color||this.chart.themeStyle.axisLine,1,"",o));s.setAttribute("style","pointer-events: none"),be(this.chart.enableCanvas,this.labelElement,s,this.chart.redraw,!0,"x","y",null,a)},e.prototype.triggerMultiLabelRender=function(e,t,i,r,o){var n={cancel:!1,name:"axisMultiLabelRender",axis:e,text:t,textStyle:i,alignment:r,customAttributes:o};return this.chart.trigger("axisMultiLabelRender",n),n},e.prototype.MultiLevelLabelClick=function(e,t){var i=parseInt(e.substr(0,1),10),r=parseInt(e.substr(7),10),o=this.chart.axisCollections[t],n=o.multiLevelLabels[i].categories,a=n[r].text,s=n[r].start,l=n[r].end,h={axis:o,level:i,text:a,customAttributes:n[r].customAttributes,start:s,end:l,name:"multiLevelLabelClick",cancel:!1};return this.chart.trigger("multiLevelLabelClick",h),h},e.prototype.click=function(e){var t,i,r,o=e.target.id,n="_Axis_MultiLevelLabel_Level_";o.indexOf(n)>-1&&(t=o.split(n)[1],i=o.split(n)[0],r=parseInt(i.charAt(i.length-1),10),this.MultiLevelLabelClick(t,r))},e.prototype.getModuleName=function(){return"MultiLevelLabel"},e.prototype.destroy=function(){},e}(),Dn=function(){function e(e){this.chartId=e.element.id+"_"}return e.prototype.renderElements=function(e,t){var i=t.createGroup({id:this.chartId+"scrollBar_"+e.axis.name,transform:"translate("+(e.isVertical&&e.axis.isInversed?e.height:e.axis.isInversed?e.width:"0")+","+(e.isVertical&&e.axis.isInversed?"0":e.axis.isInversed?e.height:e.isVertical?e.width:"0")+") rotate("+(e.isVertical&&e.axis.isInversed?"90":e.isVertical?"270":e.axis.isInversed?"180":"0")+")"}),r=t.createGroup({id:this.chartId+"scrollBar_backRect_"+e.axis.name}),o=t.createGroup({id:this.chartId+"scrollBar_thumb_"+e.axis.name,transform:"translate(0,0)"});return this.backRect(e,t,r),this.thumb(e,t,o),this.renderCircle(e,t,o),this.arrows(e,t,o),this.thumbGrip(e,t,o),i.appendChild(r),i.appendChild(o),i},e.prototype.backRect=function(e,t,r){var o=e.scrollbarThemeStyle,n=t.drawRectangle(new Di(this.chartId+"scrollBarBackRect_"+e.axis.name,o.backRect,{width:1,color:o.backRect},1,new i.Rect(0,0,e.width,e.height),0,0));r.appendChild(n)},e.prototype.arrows=function(e,t,r){var o=e.scrollbarThemeStyle,n=new i.PathOption(this.chartId+"scrollBar_leftArrow_"+e.axis.name,o.arrow,1,o.arrow,1,"","");this.leftArrowEle=t.drawPath(n),n.id=this.chartId+"scrollBar_rightArrow_"+e.axis.name,this.rightArrowEle=t.drawPath(n),this.setArrowDirection(this.thumbRectX,this.thumbRectWidth,e.height),r.appendChild(this.leftArrowEle),r.appendChild(this.rightArrowEle)},e.prototype.setArrowDirection=function(e,t,i){var r="M "+(e-4+1)+" "+i/2+" L "+(e-4+6)+" 11 L "+(e-4+6)+" 5 Z",o="M "+(e+t+4-.5)+" "+i/2+" L "+(e+t+4-6)+" 11.5 L "+(e+t+4-6)+" 4.5 Z";this.leftArrowEle.setAttribute("d",r),this.rightArrowEle.setAttribute("d",o)},e.prototype.thumb=function(e,t,r){e.startX=this.thumbRectX;var o=e.scrollbarThemeStyle;this.slider=t.drawRectangle(new Di(this.chartId+"scrollBarThumb_"+e.axis.name,o.thumb,{width:1,color:""},1,new i.Rect(this.thumbRectX,0,this.thumbRectWidth,e.height))),r.appendChild(this.slider)},e.prototype.renderCircle=function(e,t,i){var r=e.scrollbarThemeStyle,o=new Ni(this.chartId+"scrollBar_leftCircle_"+e.axis.name,r.circle,{width:1,color:r.circle},1,this.thumbRectX,e.height/2,8),n=t.createDefs(),a=t.createGroup({id:this.chartId+e.axis.name+"_thumb_shadow"});n.innerHTML='',a.innerHTML='',this.leftCircleEle=t.drawCircle(o),o.id=this.chartId+"scrollBar_rightCircle_"+e.axis.name,o.cx=this.thumbRectX+this.thumbRectWidth,this.rightCircleEle=t.drawCircle(o),i.appendChild(n),i.appendChild(this.leftCircleEle),i.appendChild(this.rightCircleEle),i.appendChild(a)},e.prototype.thumbGrip=function(e,t,i){var r=0,o=0,n=e.scrollbarThemeStyle,a=new Ni(this.chartId+"scrollBar_gripCircle0_"+e.axis.name,n.grip,{width:1,color:n.grip},1,0,0,1);this.gripCircle=t.createGroup({id:this.chartId+"scrollBar_gripCircle_"+e.axis.name,transform:"translate("+(this.thumbRectX+this.thumbRectWidth/2+5*(e.isVertical?1:-1))+","+(e.isVertical?"10":"5")+") rotate("+(e.isVertical?"180":"0")+")"});for(var s=1;s<=6;s++)a.id=this.chartId+"scrollBar_gripCircle"+s+"_"+e.axis.name,a.cx=r,a.cy=o,this.gripCircle.appendChild(t.drawCircle(a)),r=3===s?0:r+5,o=s>=3?5:0;i.appendChild(this.gripCircle)},e}(),Bn=function(){function e(e,i){this.scrollRange={max:null,min:null,interval:null,delta:null},this.component=e,this.elements=[],this.scrollElements=new Dn(e),this.axis=i,this.mouseMoveListener=this.scrollMouseMove.bind(this),this.mouseUpListener=this.scrollMouseUp.bind(this),this.animateDuration=500,this.isPointer=t.Browser.isPointer,this.browserName=t.Browser.info.name}return e.prototype.getMouseXY=function(e){var t,i,r;e.type.indexOf("touch")>-1?(t=(r=e).changedTouches[0].clientX,i=r.changedTouches[0].clientY):(t=e.clientX,i=e.clientY);var o=he(this.component.element.id+"_scrollBar_svg"+this.axis.name).getBoundingClientRect();this.mouseX=t-Math.max(o.left,0),this.mouseY=i-Math.max(o.top,0)},e.prototype.wireEvents=function(e){t.EventHandler.add(e,t.Browser.touchStartEvent,this.scrollMouseDown,this),t.EventHandler.add(e,t.Browser.touchMoveEvent,this.scrollMouseMove,this),t.EventHandler.add(e,t.Browser.touchEndEvent,this.scrollMouseUp,this),t.EventHandler.add(e,"mousewheel",this.scrollMouseWheel,this),window.addEventListener("mousemove",this.mouseMoveListener,!1),window.addEventListener("mouseup",this.mouseUpListener,!1)},e.prototype.unWireEvents=function(e){t.EventHandler.remove(e,t.Browser.touchStartEvent,this.scrollMouseDown),t.EventHandler.remove(e,t.Browser.touchMoveEvent,this.scrollMouseMove),t.EventHandler.remove(e,t.Browser.touchEndEvent,this.scrollMouseUp),t.EventHandler.remove(e,"mousewheel",this.scrollMouseWheel),window.removeEventListener("mousemove",this.mouseMoveListener,!1),window.removeEventListener("mouseup",this.mouseUpListener,!1)},e.prototype.scrollMouseDown=function(e){var t=e.target.id,i=this.scrollElements;if(this.getMouseXY(e),this.isResizeLeft=this.isExist(t,"_leftCircle_")||this.isExist(t,"_leftArrow_"),this.isResizeRight=this.isExist(t,"_rightCircle_")||this.isExist(t,"_rightArrow_"),this.previousXY=this.isVertical&&this.axis.isInversed?this.mouseY:this.isVertical?this.width-this.mouseY:this.axis.isInversed?this.width-this.mouseX:this.mouseX,this.previousWidth=i.thumbRectWidth,this.previousRectX=i.thumbRectX,this.startZoomPosition=this.axis.zoomPosition,this.startZoomFactor=this.axis.zoomFactor,this.startRange=this.axis.visibleRange,this.scrollStarted=!0,this.component.trigger("scrollStart",this.getArgs("scrollStart")),this.isExist(t,"scrollBarThumb_")||this.isExist(t,"gripCircle"))this.isThumbDrag=!0,this.svgObject.style.cursor="-webkit-grabbing";else if(this.isExist(t,"scrollBarBackRect_")){var r=this.moveLength(this.previousXY,this.previousRectX);if(i.thumbRectX=this.isWithIn(r)?r:i.thumbRectX,this.positionThumb(i.thumbRectX,i.thumbRectWidth),this.setZoomFactorPosition(i.thumbRectX,i.thumbRectWidth,!1),this.isLazyLoad){var o=i.thumbRectX>this.previousRectX?"RightMove":"LeftMove",n=this.calculateLazyRange(i.thumbRectX,i.thumbRectWidth,o);n&&this.component.trigger("scrollEnd",n)}}""===this.component.element.style.height&&(this.isCustomHeight=!0,this.component.element.style.height=this.component.availableSize.height+"px")},e.prototype.isExist=function(e,t){return e.indexOf(t)>-1},e.prototype.isWithIn=function(e){return e-8>=0&&e+this.scrollElements.thumbRectWidth+8<=this.width},e.prototype.moveLength=function(e,t,i){void 0===i&&(i=8);var r=.1*(this.width-2*i);return r=ei?r:i):t+(t+this.scrollElements.thumbRectWidth+r=this.width?9:0))/(this.isVertical?r.rect.height:this.width),r.zoomPosition=this.zoomPosition<0?0:this.zoomPosition>.9?1:this.zoomPosition,r.zoomFactor=i?this.zoomFactor:r.zoomFactor},e.prototype.scrollMouseMove=function(e){var t=e.target,i=this.scrollElements;this.getMouseXY(e),this.setCursor(t),this.setTheme(t);var r,o=this.isVertical&&this.axis.isInversed?this.width-this.mouseY:this.isVertical?this.mouseY:this.mouseX,n=this.axis.visibleRange,a=this.zoomPosition,s=this.zoomFactor,l=this.previousRectX-i.thumbRectX<0?"RightMove":"LeftMove";this.isLazyLoad&&(this.isThumbDrag||this.isResizeLeft||this.isResizeRight)&&(r=this.calculateLazyRange(i.thumbRectX,i.thumbRectWidth,l));var h=r?r.currentRange:null;if(this.isThumbDrag){this.component.isScrolling=this.isThumbDrag,o=this.isVertical||this.axis.isInversed?this.width-o:o;var c=i.thumbRectX+(o-this.previousXY);o>=c+i.thumbRectWidth?this.setCursor(t):this.svgObject.style.cursor="-webkit-grabbing",o>=0&&o<=c+i.thumbRectWidth&&(i.thumbRectX=this.isWithIn(c)?c:i.thumbRectX,this.positionThumb(i.thumbRectX,i.thumbRectWidth),this.previousXY=o,this.setZoomFactorPosition(c,i.thumbRectWidth,!1)),this.component.trigger("scrollChanged",this.getArgs("scrollChanged",n,a,s,h))}else(this.isResizeLeft||this.isResizeRight)&&(this.resizeThumb(),this.component.trigger("scrollChanged",this.getArgs("scrollChanged",n,a,s,h)))},e.prototype.scrollMouseWheel=function(e){var t=he(this.component.element.id+"_scrollBar_svg"+this.axis.name).getBoundingClientRect();this.mouseX=e.clientX-Math.max(t.left,0),this.mouseY=e.clientY-Math.max(t.top,0);var i,r=.5,o=this.scrollElements,n=this.axis,a="mozilla"!==this.browserName||this.isPointer?e.wheelDelta/120>0?1:-1:-e.detail/3>0?1:-1,s=Math.max(Math.max(1/le(n.zoomFactor,0,1),1)+.25*a,1),l=this.axis.visibleRange,h=this.zoomPosition,c=this.zoomFactor;s>=1&&(r=(r="Horizontal"===n.orientation?this.mouseX/n.rect.width:1-this.mouseY/n.rect.height)>1?1:r<0?0:r,this.zoomFactor=1===s?1:le(1/s,0,1),this.zoomPosition=1===s?0:n.zoomPosition+(n.zoomFactor-this.zoomFactor)*r),o.thumbRectX=this.isWithIn(this.zoomPosition*this.width)?this.zoomPosition*this.width:o.thumbRectX,this.isScrollUI=!0,this.positionThumb(o.thumbRectX,o.thumbRectWidth),this.isLazyLoad&&this.setZoomFactorPosition(o.thumbRectX,o.thumbRectWidth),n.zoomFactor=this.zoomFactor,n.zoomPosition=this.zoomPosition,this.isLazyLoad&&(i=this.calculateMouseWheelRange(o.thumbRectX,o.thumbRectWidth))&&i.currentRange.minimum!==i.previousAxisRange.minimum&&i.currentRange.maximum!==i.previousAxisRange.maximum&&(this.component.trigger("scrollEnd",i),this.isScrollEnd=!1),this.isLazyLoad||this.component.trigger("scrollChanged",this.getArgs("scrollChanged",l,h,c))},e.prototype.scrollMouseUp=function(){var e;this.startX=this.scrollElements.thumbRectX;var t=this.startX+this.scrollElements.thumbRectWidth+8+1;if(!this.isResizeLeft&&!this.isResizeRight||this.isLazyLoad||(this.axis.zoomFactor=t>=this.width-1&&this.startX-8.5<=0?1:this.zoomFactor),this.isLazyLoad){var i=this.previousRectX-this.startX;if((i>0||i<0)&&this.isThumbDrag){var r=i<0?"RightMove":"LeftMove";this.startX="RightMove"===r?this.startX+Math.abs(i)8?this.startX:8,(e=this.calculateLazyRange(this.startX,this.scrollElements.thumbRectWidth,r))&&(this.component.trigger("scrollEnd",e),this.scrollStarted=!1)}(this.isResizeLeft||this.isResizeRight)&&(e=this.calculateLazyRange(this.startX,this.scrollElements.thumbRectWidth))&&(this.component.trigger("scrollEnd",e),this.scrollStarted=!1)}this.isThumbDrag=!1,this.isResizeLeft=!1,this.isResizeRight=!1,this.isScrollEnd=!1,this.component.isScrolling=!1,this.scrollStarted&&!this.isLazyLoad&&(this.component.trigger("scrollEnd",this.getArgs("scrollChanged",this.startRange,this.startZoomPosition,this.startZoomFactor)),this.scrollStarted=!1),this.isCustomHeight&&(this.component.element.style.height=null)},e.prototype.calculateMouseWheelRange=function(e,t){var i,r,o,n=this.scrollRange,a=this.getStartEnd(this.previousStart,this.previousEnd,!1);e+t+8<=this.width&&(r=(e-8)/this.width,i=t/this.width);var s=n.min+r*n.delta,l=s+i*n.delta;return l&&(o={axis:this.axis,currentRange:this.getStartEnd(s,l,!0),previousAxisRange:a}),o},e.prototype.calculateLazyRange=function(e,t,i){var r,o,n,a,s,l=t,h=this.scrollRange,c=this.getStartEnd(this.previousStart,this.previousEnd,!1);return this.isResizeRight||"RightMove"===i?(r=((l=this.isResizeRight?l+16:l)+8)/this.width,o="RightMove"===i?(e+8)/this.width:this.axis.zoomPosition,a=(n="RightMove"===i?h.min+o*h.delta:this.previousStart)+r*h.delta):this.isResizeLeft||"LeftMove"===i?(o=(e-8)/this.width,r=l/this.width,n=(n=h.min+o*h.delta)>=h.min?n:h.min,a="LeftMove"===i?n+r*h.delta:this.previousEnd):this.isThumbDrag&&(o="RightMove"===i?(e+8)/this.width:(e-8)/this.width,r=this.scrollElements.thumbRectWidth/this.width,a=(n=(n=h.min+o*h.delta)>=h.min?n:h.min)+r*h.delta),a&&(s={axis:this.component.isBlazor?{}:this.axis,currentRange:this.getStartEnd(n,a,!0),previousAxisRange:c}),s},e.prototype.getStartEnd=function(e,t,i){var r=this.valueType;switch("DateTime"!==r&&"DateTimeCategory"!==r||!i?i&&(this.previousStart=Math.round(e),this.previousEnd=Math.ceil(t)):(this.previousStart=e,this.previousEnd=t),r){case"Double":case"Category":case"Logarithmic":e=Math.round(e),t=Math.ceil(t);break;case"DateTime":case"DateTimeCategory":e=new Date(e),t=new Date(t)}return{minimum:e,maximum:t}},e.prototype.render=function(e){return(this.component.zoomModule||e&&this.axis.scrollbarSettings.enable)&&this.getDefaults(),this.getTheme(),this.removeScrollSvg(),Je(this,this.component.svgRenderer),this.wireEvents(this.svgObject),this.svgObject.appendChild(this.scrollElements.renderElements(this,this.component.svgRenderer)),this.svgObject},e.prototype.getTheme=function(){this.scrollbarThemeStyle=d(this.component.theme)},e.prototype.removeScrollSvg=function(){document.getElementById(this.component.element.id+"_scrollBar_svg"+this.axis.name)&&t.remove(document.getElementById(this.component.element.id+"_scrollBar_svg"+this.axis.name))},e.prototype.setCursor=function(e){var t=e.id;this.svgObject.style.cursor=t.indexOf("scrollBarThumb_")>-1||t.indexOf("_gripCircle")>-1?"-webkit-grab":t.indexOf("Circle_")>-1||t.indexOf("Arrow_")>-1?this.isVertical?"ns-resize":"ew-resize":"auto"},e.prototype.setTheme=function(e){var t=e.id,i=t.indexOf("_leftCircle_")>-1||t.indexOf("_leftArrow_")>-1,r=t.indexOf("_rightCircle_")>-1||t.indexOf("_rightArrow_")>-1,o=this.scrollbarThemeStyle,n=this.scrollElements.leftArrowEle,a=this.scrollElements.rightArrowEle,s=this.scrollElements.leftCircleEle,l=this.scrollElements.rightCircleEle,h=this.isCurrentAxis(e,n);s.style.fill=i&&h?o.circleHover:o.circle,l.style.fill=r&&h?o.circleHover:o.circle,s.style.stroke=i&&h?o.circleHover:o.circle,l.style.stroke=r&&h?o.circleHover:o.circle,"HighContrastLight"===this.component.theme&&(n.style.fill=i&&h?o.arrowHover:o.arrow,n.style.stroke=i&&h?o.arrowHover:o.arrow,a.style.fill=r&&h?o.arrowHover:o.arrow,a.style.stroke=r&&h?o.arrowHover:o.arrow,s.style.stroke=i&&h?o.circleHover:o.circle,l.style.stroke=r&&h?o.circleHover:o.circle)},e.prototype.isCurrentAxis=function(e,t){return e.id.split("_")[2]===t.id.split("_")[2]},e.prototype.resizeThumb=function(){var e,t=this.previousRectX,i=this.isVertical&&this.axis.isInversed?this.mouseY:this.isVertical?this.width-this.mouseY:this.axis.isInversed?this.width-this.mouseX:this.mouseX,r=Math.abs(this.previousXY-i);if(this.isResizeLeft&&i>=0){var o=t+(i>this.previousXY?r:-r);e=o-8>=0?this.previousWidth+(i>this.previousXY?-r:r):this.previousWidth,o=o-8>=0?o:t,e>=40&&i=40+this.scrollElements.thumbRectX&&i<=this.width-8?i-this.scrollElements.thumbRectX:this.previousWidth,this.scrollElements.thumbRectWidth=this.previousWidth=e,this.previousXY=i,this.positionThumb(this.startX,e),this.setZoomFactorPosition(this.startX,e),this.isLazyLoad||this.setZoomFactorPosition(this.startX,e))},e.prototype.positionThumb=function(e,t){var i=this.scrollElements;i.slider.setAttribute("x",e.toString()),i.slider.setAttribute("width",t.toString()),i.leftCircleEle.setAttribute("cx",e.toString()),i.rightCircleEle.setAttribute("cx",(e+t).toString()),i.setArrowDirection(e,t,this.height),i.gripCircle.setAttribute("transform","translate("+(e+t/2+5*(this.isVertical?1:-1))+","+(this.isVertical?"10":"5")+") rotate("+(this.isVertical?"180":"0")+")")},e.prototype.getDefaults=function(){var e=this.axis;this.axis.scrollbarSettings.enable&&(this.isLazyLoad=!0,this.getLazyDefaults(e)),this.isVertical="Vertical"===e.orientation,this.zoomFactor=this.isLazyLoad?this.zoomFactor:e.zoomFactor,this.zoomPosition=this.isLazyLoad?this.zoomPosition:e.zoomPosition;var t=this.zoomFactor*(this.isVertical?e.rect.height:e.rect.width);t=t>40?t:40,this.scrollX=e.rect.x,this.scrollY=e.rect.y,this.width=this.isVertical?e.rect.height:e.rect.width,this.height=16;var i=this.zoomPosition*(this.isVertical?e.rect.height:this.width),r=this.width-40-8;this.scrollElements.thumbRectX=i>r?r:i<8?8:i,this.scrollElements.thumbRectWidth=t+this.scrollElements.thumbRectX=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},Xn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return jn(i,e),Hn([t.Property(null)],i.prototype,"content",void 0),Hn([t.Property("0")],i.prototype,"x",void 0),Hn([t.Property("0")],i.prototype,"y",void 0),Hn([t.Property("Pixel")],i.prototype,"coordinateUnits",void 0),Hn([t.Property("Chart")],i.prototype,"region",void 0),Hn([t.Property("Middle")],i.prototype,"verticalAlignment",void 0),Hn([t.Property("Center")],i.prototype,"horizontalAlignment",void 0),Hn([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),Yn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return jn(i,e),Hn([t.Property(!1)],i.prototype,"visible",void 0),Hn([t.Property(!0)],i.prototype,"showZero",void 0),Hn([t.Property(null)],i.prototype,"name",void 0),Hn([t.Property("transparent")],i.prototype,"fill",void 0),Hn([t.Property("Inside")],i.prototype,"position",void 0),Hn([t.Property(5)],i.prototype,"rx",void 0),Hn([t.Property(5)],i.prototype,"ry",void 0),Hn([t.Property(0)],i.prototype,"angle",void 0),Hn([t.Property(!1)],i.prototype,"enableRotation",void 0),Hn([t.Complex({width:null,color:null},Yt)],i.prototype,"border",void 0),Hn([t.Complex({size:"11px",color:"",fontStyle:"Normal",fontWeight:"Normal",fontFamily:"Segoe UI"},Xt)],i.prototype,"font",void 0),Hn([t.Complex({},Ht)],i.prototype,"connectorStyle",void 0),Hn([t.Property(null)],i.prototype,"template",void 0),i}(t.ChildProperty),Gn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return jn(i,e),Hn([t.Property("50%")],i.prototype,"x",void 0),Hn([t.Property("50%")],i.prototype,"y",void 0),i}(t.ChildProperty),Wn=function(){function e(){this.visible=!0,this.symbolLocation=null,this.region=null,this.labelRegion=null,this.labelVisible=!0,this.regions=null,this.isExplode=!1,this.isClubbed=!1,this.isSliced=!1,this.argsData=null,this.isLabelUpdated=null,this.initialLabelRegion=null}return e}(),Un=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.points=[],t.clubbedPoints=[],t.sumOfPoints=0,t.isRectSeries=!0,t.clipRect=new i.Rect(0,0,0,0),t.category="Series",t.rightSidePoints=[],t.leftSidePoints=[],t}return jn(o,e),o.prototype.refreshDataManager=function(e,i){var o=this,n=this.dataSource||e.dataSource;if(!(n instanceof r.DataManager)&&t.isNullOrUndefined(this.query))return void this.dataManagerSuccess({result:n,count:n.length},e,i);this.dataModule.getData(this.dataModule.generateQuery().requiresCount()).then(function(t){return o.dataManagerSuccess(t,e)})},o.prototype.dataManagerSuccess=function(e,t,i){void 0===i&&(i=!0);var r={name:"seriesRender",series:this,data:e.result};t.allowServerDataBinding=!1,t.trigger("seriesRender",r),this.resultData=""!==e.result?e.result:[],t.isBlazor||i||this.getPoints(this.resultData,t),(++t.seriesCounts===t.visibleSeries.length&&i||window.Blazor&&!i&&1===t.seriesCounts)&&(this.getPoints(this.resultData,t),t.refreshChart())},o.prototype.getPoints=function(e,i){var r=Object.keys(e).length;if(this.sumOfPoints=0,0===r)return null;this.findSumOfPoints(e),this.points=[],this.clubbedPoints=[],this.sumOfClub=0;for(var o,n=this.palettes.length?this.palettes:h(i.theme),a=Be(this.groupTo,this.sumOfPoints),s=0;s0){var l=this.generateClubPoint();this.pushPoints(l,n);var c=this.points.length-1;this.clubbedPoints.map(function(e){e.index+=c,e.color=l.color})}this.clubbedPoints.length&&this.explode&&"Pie"===this.type&&(this.explodeAll||this.points[this.points.length-1].index===this.explodeIndex)&&(this.points.splice(this.points.length-1,1),this.points=this.points.concat(this.clubbedPoints))},o.prototype.generateClubPoint=function(){var e=new Wn;return e.isClubbed=!0,e.x="Others",e.y=this.sumOfClub,e.text=e.originalText=e.x+": "+this.sumOfClub,e.sliceRadius="80%",e},o.prototype.pushPoints=function(e,t){e.index=this.points.length,e.isExplode=this.explodeAll||e.index===this.explodeIndex,e.color=e.color||t[e.index%t.length],this.points.push(e)},o.prototype.isClub=function(e,i,r){if(!t.isNullOrUndefined(i)){if("Value"===this.groupMode&&Math.abs(e.y)<=i)return this.sumOfClub+=Math.abs(e.y),!0;if("Point"===this.groupMode&&r>=i)return this.sumOfClub+=Math.abs(e.y),!0}return!1},o.prototype.findSumOfPoints=function(e){for(var i=Object.keys(e).length,r=0;r=90&&h.midAngle<=270?this.leftSidePoints.push(h):h.midAngle>=0&&h.midAngle<=90?a.push(h):n.push(h)}if(n.sort(function(e,t){return e.midAngle-t.midAngle}),a.sort(function(e,t){return e.midAngle-t.midAngle}),this.leftSidePoints.sort(function(e,t){return e.midAngle-t.midAngle}),this.rightSidePoints=n.concat(a),e.accumulationDataLabelModule.drawDataLabels(this,this.dataLabel,i,o,r),null!==this.dataLabel.template&&o.childElementCount){var c=e.accumulationDataLabelModule.drawDataLabels.bind(e.accumulationDataLabelModule,this,this.dataLabel,i,o,r);e.isReact&&e.renderReactTemplates(c),be(!1,he(e.element.id+"_Secondary_Element"),o,r)}be(!1,e.getSeriesElement(),i,r)},o.prototype.findMaxBounds=function(e,t){e.x=t.xe.height?t.y+t.height:e.height,e.width=t.x+t.width>e.width?t.x+t.width:e.width},o.prototype.setAccEmptyPoint=function(e,i,r,o){if(!t.isNullOrUndefined(e.y)&&!isNaN(e.y))return null;switch(e.color=this.emptyPointSettings.fill||e.color,this.emptyPointSettings.mode){case"Zero":e.y=0,e.visible=!0;break;case"Average":var n=r[i-1]?r[i-1][this.yName]||0:0,a=r[i+1]?r[i+1][this.yName]||0:0;e.y=(Math.abs(n)+Math.abs(a))/2,this.sumOfPoints+=e.y,e.visible=!0;break;default:e.visible=!1}},o.prototype.isEmpty=function(e){return e.color===this.emptyPointSettings.fill},Hn([t.Property("")],o.prototype,"dataSource",void 0),Hn([t.Property()],o.prototype,"query",void 0),Hn([t.Property("")],o.prototype,"xName",void 0),Hn([t.Property("")],o.prototype,"name",void 0),Hn([t.Property("")],o.prototype,"tooltipMappingName",void 0),Hn([t.Property("")],o.prototype,"yName",void 0),Hn([t.Property(!0)],o.prototype,"visible",void 0),Hn([t.Complex({color:null,width:0},Yt)],o.prototype,"border",void 0),Hn([t.Complex(null,qt)],o.prototype,"animation",void 0),Hn([t.Property("SeriesType")],o.prototype,"legendShape",void 0),Hn([t.Property("")],o.prototype,"legendImageUrl",void 0),Hn([t.Property("")],o.prototype,"pointColorMapping",void 0),Hn([t.Property(null)],o.prototype,"selectionStyle",void 0),Hn([t.Property(null)],o.prototype,"groupTo",void 0),Hn([t.Property("Value")],o.prototype,"groupMode",void 0),Hn([t.Complex({},Yn)],o.prototype,"dataLabel",void 0),Hn([t.Property([])],o.prototype,"palettes",void 0),Hn([t.Property(0)],o.prototype,"startAngle",void 0),Hn([t.Property(null)],o.prototype,"endAngle",void 0),Hn([t.Property("80%")],o.prototype,"radius",void 0),Hn([t.Property("0")],o.prototype,"innerRadius",void 0),Hn([t.Property("Pie")],o.prototype,"type",void 0),Hn([t.Property(!0)],o.prototype,"enableTooltip",void 0),Hn([t.Property(!1)],o.prototype,"explode",void 0),Hn([t.Property("30%")],o.prototype,"explodeOffset",void 0),Hn([t.Property(!1)],o.prototype,"explodeAll",void 0),Hn([t.Property(null)],o.prototype,"explodeIndex",void 0),Hn([t.Complex({mode:"Drop"},Kt)],o.prototype,"emptyPointSettings",void 0),Hn([t.Property(0)],o.prototype,"gapRatio",void 0),Hn([t.Property("80%")],o.prototype,"width",void 0),Hn([t.Property("80%")],o.prototype,"height",void 0),Hn([t.Property("20%")],o.prototype,"neckWidth",void 0),Hn([t.Property("20%")],o.prototype,"neckHeight",void 0),Hn([t.Property("Linear")],o.prototype,"pyramidMode",void 0),Hn([t.Property(1)],o.prototype,"opacity",void 0),o}(t.ChildProperty),Zn=function(){function e(e){this.accumulation=e}return Object.defineProperty(e.prototype,"center",{get:function(){return this.pieCenter||("Pie"===this.accumulation.visibleSeries[0].type?this.accumulation.pieSeriesModule.center:null)},set:function(e){this.pieCenter=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return void 0!==this.pieRadius?this.pieRadius:this.accumulation.pieSeriesModule.radius},set:function(e){this.pieRadius=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"labelRadius",{get:function(){return void 0!==this.pieLabelRadius?this.pieLabelRadius:this.accumulation.pieSeriesModule.labelRadius},set:function(e){this.pieLabelRadius=e},enumerable:!0,configurable:!0}),e.prototype.isCircular=function(){return"Pie"===this.accumulation.type},e.prototype.isVariousRadius=function(){return this.accumulation.pieSeriesModule.isRadiusMapped},e.prototype.processExplode=function(e){if(e.target.id.indexOf("_Series_")>-1||e.target.id.indexOf("_datalabel_")>-1){var t=D(e.target.id).point;if(isNaN(t)||e.target.id.indexOf("_datalabel_")>-1&&"Outside"===this.accumulation.visibleSeries[0].points[t].labelPosition)return null;this.explodePoints(t,this.accumulation),this.deExplodeAll(t,this.accumulation.enableAnimation?300:0)}},e.prototype.invokeExplode=function(){for(var e=this.accumulation.visibleSeries[0],t=this.accumulation.enableAnimation?300:0,i=0,r=e.points;in?this.innerRadius/2:this.innerRadius}else this.isRadiusMapped=!1,this.radius=Be(t.radius,this.size/2),this.innerRadius=Be(t.innerRadius,this.radius),this.labelRadius="Inside"===t.dataLabel.position?(this.radius-this.innerRadius)/2+this.innerRadius:this.radius+Be(t.dataLabel.connectorStyle.length||"4%",this.size/2);e.explodeDistance=t.explode?Be(t.explodeOffset,this.radius):0,this.findCenter(e,t),this.defaultLabelBound(t,t.dataLabel.visible,t.dataLabel.position),this.totalAngle-=.001},r.prototype.getLabelRadius=function(e,t){return"Inside"===e.dataLabel.position?(Be(t.sliceRadius,this.radius)-this.innerRadius)/2+this.innerRadius:Be(t.sliceRadius,this.seriesRadius)+Be(e.dataLabel.connectorStyle.length||"4%",this.size/2)},r.prototype.findCenter=function(e,t){this.accumulation=e,this.center={x:Be(e.center.x,e.initialClipRect.width)+e.initialClipRect.x,y:Be(e.center.y,e.initialClipRect.height)+e.initialClipRect.y};var i=this.getSeriesBound(t),r=new Vi(i.x+i.width/2,i.y+i.height/2);this.center.x+=this.center.x-r.x,this.center.y+=this.center.y-r.y,this.accumulation.origin=this.center},r.prototype.initAngles=function(e){var i=t.isNullOrUndefined(e.endAngle)?e.startAngle:e.endAngle;this.totalAngle=(i-e.startAngle)%360,this.startAngle=e.startAngle-90,this.totalAngle=this.totalAngle<=0?360+this.totalAngle:this.totalAngle,this.startAngle=(this.startAngle<0?this.startAngle+360:this.startAngle)%360},r.prototype.defaultLabelBound=function(e,t,r){var o=this.getSeriesBound(e);e.accumulationBound=o,e.labelBound=new i.Rect(o.x,o.y,o.width+o.x,o.height+o.y),t&&"Outside"===r&&(e.labelBound=new i.Rect(1/0,1/0,-1/0,-1/0))},r.prototype.getSeriesBound=function(e){var t=new i.Rect(1/0,1/0,-1/0,-1/0);this.initAngles(e);var r=this.startAngle,o=this.totalAngle,n=(this.startAngle+o)%360;n=0===n?360:n,e.findMaxBounds(t,this.getRectFromAngle(r)),e.findMaxBounds(t,this.getRectFromAngle(n)),e.findMaxBounds(t,new i.Rect(this.center.x,this.center.y,0,0));var a=(90*Math.floor(r/90)+90)%360,s=90*Math.floor(n/90)%360;s=0===s?360:s,(o>=90||s===a)&&(e.findMaxBounds(t,this.getRectFromAngle(a)),e.findMaxBounds(t,this.getRectFromAngle(s))),(0===r||r+o>=360)&&e.findMaxBounds(t,this.getRectFromAngle(0));for(var l=a===s?0:Math.floor(o/90),h=1;h=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},ta=function(r){function o(e,t){var i=r.call(this,e,t)||this;return i.animateselected=!1,i.explodeDistance=0,i.chartid=57724,i}return Kn(o,r),o.prototype.animate=function(e){this.duration=e||700,this.animateselected=!0,this.animateSeries=!1;var t=0,i=[],r=[],o=[],n=this.visibleSeries[0],a=[];if(a=n.dataSource,n.sumOfPoints=0,n.points.lengthObject.keys(n.dataSource).length){var s=this.visibleSeries[0];s.points=s.points.filter(function(e){return e.visible=!1,r.push(e.index),i.push(e.color),a.some(function(i){var r=i;return e.x===r.x&&(e.visible=!0,o.push(e.index),e.index=t,t++),e.x===r.x})});for(var l=r.filter(function(e){return o.indexOf(e)<0}),h=r.length-l.length,c=r.length-1;c>=h;c--)m("container_Series_0_Point_"+r[c]);for(c=0;c-1){this.isTouch=!0;var a=e;i=a.changedTouches[0].clientY,t=a.changedTouches[0].clientX}else this.isTouch="touch"===e.pointerType||"2"===e.pointerType,t=e.clientX,i=e.clientY;this.mouseY=i-n.top-Math.max(o.top-n.top,0),this.mouseX=t-n.left-Math.max(o.left-n.left,0)}},o.prototype.accumulationMouseEnd=function(e){return this.setMouseXY(e),this.trigger("chartMouseUp",{target:e.target.id,x:this.mouseX,y:this.mouseY}),this.isTouch&&(this.titleTooltip(e,this.mouseX,this.mouseY,this.isTouch),this.accumulationDataLabelModule&&this.visibleSeries[0].dataLabel.visible&&this.accumulationDataLabelModule.move(e,this.mouseX,this.mouseY,this.isTouch),this.accumulationLegendModule&&this.legendSettings.visible&&this.accumulationLegendModule.move(e)),this.notify(t.Browser.touchEndEvent,e),!1},o.prototype.accumulationMouseStart=function(e){return this.setMouseXY(e),this.trigger("chartMouseDown",{target:e.target.id,x:this.mouseX,y:this.mouseY}),!1},o.prototype.accumulationResize=function(){var e=this;this.animateSeries=!1;var t={accumulation:this.isBlazor?{}:this,previousSize:new i.Size(this.availableSize.width,this.availableSize.height),name:"resized",currentSize:new i.Size(0,0),chart:this.isBlazor?{}:this},r={name:"beforeResize",cancelResizedEvent:!1};return this.resizeTo&&clearTimeout(this.resizeTo),this.trigger("beforeResize",r),r.cancelResizedEvent||(this.resizeTo=+setTimeout(function(){if(e.isDestroyed)return void clearTimeout(e.resizeTo);je(e),t.currentSize=e.availableSize,e.trigger("resized",t),e.refreshSeries(),e.refreshChart()},500)),!1},o.prototype.print=function(e){var t=document.getElementById(this.element.id+"_Series_0").style.clipPath;document.getElementById(this.element.id+"_Series_0").style.clipPath="",new xr(this).print(e),document.getElementById(this.element.id+"_Series_0").style.clipPath=t},o.prototype.export=function(e,t){this.exportModule&&(this.exportModule.export(e,t),this.afterExport&&this.exportModule.getDataUrl(this))},o.prototype.setStyle=function(e){e.style.touchAction="element",e.style.msTouchAction="element",e.style.msContentZooming="none",e.style.msUserSelect="none",e.style.webkitUserSelect="none",e.style.position="relative",e.style.display="block"},o.prototype.setAnnotationValue=function(e,t){var i,r=this.annotations[e],o=he(this.element.id+"_Annotation_Collections");t&&(r.content=t,o?(i=this.createElement("div"),m(this.element.id+"_Annotation_"+e),this.annotationModule.processAnnotation(r,e,i),o.appendChild(i.children[0])):this.annotationModule.renderAnnotations(he(this.element.id+"_Secondary_Element")))},o.prototype.accumulationMouseMove=function(e){return!!he(this.element.id+"_svg")&&(this.setMouseXY(e),this.trigger("chartMouseMove",{target:e.target.id,x:this.mouseX,y:this.mouseY}),this.pointMove&&this.triggerPointEvent("pointMove",e.target,e),this.accumulationLegendModule&&this.legendSettings.visible&&this.accumulationLegendModule.move(e),this.accumulationDataLabelModule&&this.visibleSeries[0]&&this.visibleSeries[0].dataLabel.visible&&this.accumulationDataLabelModule.move(e,this.mouseX,this.mouseY),this.isTouch||this.titleTooltip(e,this.mouseX,this.mouseY),this.enableBorderOnMouseMove&&"Pie"===this.type&&this.pieSeriesModule&&j(this.mouseX,this.mouseY,this.initialClipRect)&&this.pieSeriesModule.findSeries(e),this.notify(t.Browser.touchMoveEvent,e),!1)},o.prototype.titleTooltip=function(e,t,i,r){var o=e.target.id,n=o===this.element.id+"_title"||o===this.element.id+"_subTitle"||o===this.element.id+"_chart_legend_title";e.target.textContent.indexOf("...")>-1&&n?f(o===this.element.id+"_title"?this.title:o===this.element.id+"_subTitle"?this.subTitle:this.legendSettings.title,t,i,this.element.offsetWidth,this.element.id+"_EJ2_Title_Tooltip",he(this.element.id+"_Secondary_Element"),r):m(this.element.id+"_EJ2_Title_Tooltip")},o.prototype.accumulationOnMouseClick=function(e){return this.setMouseXY(e),this.accumulationLegendModule&&this.legendSettings.visible&&this.accumulationLegendModule.click(e),"None"!==this.selectionMode&&this.accumulationSelectionModule&&this.accumulationSelectionModule.calculateSelectedElements(this,e),this.visibleSeries[0].explode&&this.accBaseModule.processExplode(e),this.enableBorderOnMouseMove&&this.pieSeriesModule&&"Pie"===this.type&&this.pieSeriesModule.findSeries(e),this.trigger("chartMouseClick",{target:e.target.id,x:this.mouseX,y:this.mouseY}),this.pointClick&&this.triggerPointEvent("pointClick",e.target,e),!1},o.prototype.triggerPointEvent=function(e,t,i){var r=i,o=D(t.id,!0);o.series>=0&&o.point>=0&&this.trigger(e,{series:this.isBlazor?{}:this.series[o.series],point:this.series[o.series].points[o.point],seriesIndex:o.series,pointIndex:o.point,x:this.mouseX,y:this.mouseY,pageX:r.pageX,pageY:r.pageY})},o.prototype.accumulationRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},o.prototype.accumulationMouseLeave=function(e){this.setMouseXY(e),this.trigger("chartMouseLeave",{target:e.target.id,x:this.mouseX,y:this.mouseY}),this.notify(t.Browser.isPointer?"pointerleave":"mouseleave",e);var i=document.getElementById(this.element.id+"PointHover_Border");return i&&(this.pieSeriesModule.removeBorder(i,1e3),i=null),!1},o.prototype.setCulture=function(){this.intl=new t.Internationalization},o.prototype.createPieSvg=function(){this.removeSvg(),He(this)},o.prototype.removeSvg=function(){if(this.redraw)return null;if(Ue(this),m(this.element.id+"_Secondary_Element"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}m("EJ2_legend_tooltip"),m("EJ2_datalabel_tooltip"),m(this.element.id+"PointHover_Border")},o.prototype.createSecondaryElement=function(){var e=Ne(this.redraw,this.element.id+"_Secondary_Element")||this.createElement("div",{id:this.element.id+"_Secondary_Element",styles:"position: relative"});be(!1,this.element,e,this.redraw)},o.prototype.calculateVisibleSeries=function(){this.visibleSeries=[];for(var e=0,t=this.series.length;er?o:r}this.subTitleCollection=Xe(this.subTitle,this.subTitleStyle,r),t=i.measureText(this.subTitle,this.subTitleStyle).height*this.subTitleCollection.length}R(this.initialClipRect,new i.Rect(0,t+e,this.margin.right+this.margin.left,this.margin.bottom+this.margin.top)),this.calculateLegendBounds()},o.prototype.calculateLegendBounds=function(){if(!this.accumulationLegendModule||!this.legendSettings.visible)return null;this.accumulationLegendModule.getLegendOptions(this,this.visibleSeries),this.accumulationLegendModule.calculateLegendBounds(this.initialClipRect,this.availableSize,null)},o.prototype.renderElements=function(){this.renderBorder(),this.createSecondaryElement(),this.renderSeries(),this.renderTitle(),this.renderLegend(),be(!1,this.element,this.svgObject,this.redraw),this.processSelection(),this.processExplode(),this.renderAnnotation(),this.setSecondaryElementPosition(),t.updateBlazorTemplate(this.element.id+"_DataLabel","Template",this.series[0].dataLabel),this.trigger("loaded",{accumulation:this.isBlazor?{}:this,chart:this.isBlazor?{}:this}),this.animateSeries=!1},o.prototype.setSecondaryElementPosition=function(){var e=he(this.element.id+"_Secondary_Element");if(e){var t=this.element.getBoundingClientRect(),i=he(this.element.id+"_svg").getBoundingClientRect();e.style.left=Math.max(i.left-t.left,0)+"px",e.style.top=Math.max(i.top-t.top,0)+"px"}},o.prototype.renderAnnotation=function(){this.annotationModule&&this.annotationModule.renderAnnotations(he(this.element.id+"_Secondary_Element"))},o.prototype.processExplode=function(){return this.redraw?null:this.visibleSeries[0].explode?void this.accBaseModule.invokeExplode():null},o.prototype.renderSeries=function(){this.redraw||this.svgObject.appendChild(this.renderer.createGroup({id:this.element.id+"_SeriesCollection"}));for(var e=0,t=this.visibleSeries;e0&&(this.accumulationSelectionModule.selectedDataIndexes=e,this.accumulationSelectionModule.redrawSelection(this))},o.prototype.renderTitle=function(){var e=this.margin;if(!this.title)return null;var t=this.titleStyle.textAlignment,r="Near"===t?"start":"Far"===t?"end":"middle",o=i.measureText(this.title,this.titleStyle),n=new i.Rect(e.left,0,this.availableSize.width-e.left-e.right,0),a=new i.TextOption(this.element.id+"_title",Ye(n,this.titleStyle),this.margin.top+3*o.height/4,r,this.titleCollection,"","auto"),s=Ve(this.renderer,a,this.titleStyle,this.titleStyle.color||this.themeStyle.chartTitle,this.svgObject,!1,this.redraw);s&&s.setAttribute("aria-label",this.title),this.subTitle&&this.renderSubTitle(a)},o.prototype.renderSubTitle=function(e){for(var t=0,r=0,o=this.titleStyle.textAlignment,n=i.measureText(this.subTitle,this.subTitleStyle),a=0,s=this.titleCollection;at?r:t}var h=new i.Rect("Center"===o?e.x-t/2:"Far"===o?e.x-t:e.x,0,t,0),c=new i.TextOption(this.element.id+"_subTitle",Ye(h,this.subTitleStyle),e.y*e.text.length+3*n.height/4+10,function(e){return"Near"===e?"start":"Far"===e?"end":"middle"}(this.subTitleStyle.textAlignment),this.subTitleCollection,"","auto");Ve(this.renderer,c,this.subTitleStyle,this.subTitleStyle.color||this.themeStyle.chartTitle,this.svgObject,!1,this.redraw)},o.prototype.getSeriesElement=function(){return this.svgObject.getElementsByTagName("g")[0]},o.prototype.refreshSeries=function(){for(var e=0,t=this.visibleSeries;e=0;l--){var h=i?e.length-1-l:l;if(e[h].visible){var c=n*e[h].y;e[h].yRatio=s,e[h].heightRatio=c,s+=c+a}}},t.prototype.setLabelLocation=function(e,t,r){var o=r.length-1,n="Funnel"===e.type?r.length-2:r.length-1,a=(r[0].x+r[n].x)/2,s=(r[1].x+r[n-1].x)/2;t.region=new i.Rect(a,r[0].y,s-a,r[n].y-r[0].y),t.symbolLocation={x:t.region.x+t.region.width/2,y:t.region.y+t.region.height/2},t.labelOffset={x:t.symbolLocation.x-(r[0].x+r[o].x)/2,y:t.symbolLocation.y-(r[0].y+r[o].y)/2}},t.prototype.findPath=function(e){for(var t="M",i=0;id.height-m.height||d.height===m.height?m.width:m.width+(d.width-m.width)*((d.height-m.height-y)/(d.height-m.height)),s=(n=d.width/2-r/2)+r,g>=d.height-m.height?(o=n=l=d.width/2-m.width/2,a=s=h=d.width/2+m.width/2):y>d.height-m.height&&(h=s=(l=n=d.width/2-r/2)+r,c=d.height-m.height);var v={x:p+0+o,y:g+=u},f={x:p+0+a,y:g},b={x:p+0+s,y:y+=u},x={x:p+0+n,y:y},w={x:p+0+s,y:y},S={x:p+0+n,y:y};(c+=u)&&(w={x:p+0+h,y:c},S={x:p+0+l,y:c});var C=[v,f,w,b,x,S];return this.setLabelLocation(t,e,C),this.findPath(C)},t.prototype.renderPoint=function(e,t,i,r,o,n){if(!e.visible)return m(r.id),null;var a=this.getSegmentData(e,t,i);e.midAngle=0,r.d=a,be(!1,o,i.renderer.drawPath(r),n),e.isExplode&&i.accBaseModule.explodePoints(e.index,i,!0)},t.prototype.getModuleName=function(){return"FunnelSeries"},t.prototype.destroy=function(){},t}(ra),aa=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return aa(t,e),t.prototype.getSegmentData=function(e,t,i){var r=t.triangleSize,o=i.initialClipRect.y+(i.initialClipRect.height-r.height)/2,n=(i.initialClipRect.width-t.triangleSize.width)/2+i.initialClipRect.x,a=e.yRatio,s=e.yRatio+e.heightRatio,l=.5*(1-e.yRatio),h=.5*(1-s);a+=o/r.height,s+=o/r.height;var c=[{x:n+0+l*r.width,y:a*r.height},{x:n+0+(1-l)*r.width,y:a*r.height},{x:n+0+(1-h)*r.width,y:s*r.height},{x:n+0+h*r.width,y:s*r.height}];return this.setLabelLocation(t,e,c),this.findPath(c)},t.prototype.initializeSizeRatio=function(t,i){"Linear"===i.pyramidMode?e.prototype.initializeSizeRatio.call(this,t,i,!0):this.calculateSurfaceSegments(i)},t.prototype.calculateSurfaceSegments=function(e){for(var t=e.points.length,i=e.sumOfPoints,r=[],o=[],n=Math.min(0,Math.max(e.gapRatio,1))/(t-1),a=this.getSurfaceHeight(0,i),s=0,l=0;l=0){var a=Math.sqrt(n);return r=(-t-a)/(2*e),o=(-t+a)/(2*e),Math.max(r,o)}return 0},t.prototype.renderPoint=function(e,t,r,o,n,a){if(!e.visible)return i.removeElement(o.id),null;o.d=this.getSegmentData(e,t,r),e.midAngle=0,be(!1,n,r.renderer.drawPath(o),a),e.isExplode&&r.accBaseModule.explodePoints(e.index,r,!0)},t.prototype.getModuleName=function(){return"PyramidSeries"},t.prototype.destroy=function(){},t}(ra),la=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ha=function(e){function r(t){var r=e.call(this,t)||this;return r.library=r,r.titleRect=new i.Rect(0,t.margin.top,0,0),r}return la(r,e),r.prototype.getLegendOptions=function(e,i){this.legendCollections=[];for(var r=0;r<1;r++){var o=i[r].type;"Pie"!==o&&"Doughnut"!==o||(o="0"!==i[r].innerRadius&&"0%"!==i[r].innerRadius?"Doughnut":"Pie");for(var n=0,a=i[r].points;nt.height&&(v=Math.max(v,y*(this.maxItemHeight+a)+a+c),g+=p,m.push(p),this.totalPages=Math.max(y,this.totalPages||1),p=0,y=1),p=Math.max(f,p)):(r.enablePages||(l=this.isTitle&&"Top"!==s?this.legendTitleSize.width+this.fivePixel:0,l+=h),g+=f,t.width1,m[m.length-1]!==p&&m.push(p)):(this.isPaging=t.heightt){o-=this.maxColumnWidth,this.maxColumns--;break}}return this.isPaging=o1,o===i&&(o=t),this.maxColumns=Math.max(1,this.maxColumns),this.maxWidth=o,o},r.prototype.getAvailWidth=function(e,t){return this.isVertical&&(t=this.maxWidth),t-(2*this.legend.padding+this.legend.shapeWidth+this.legend.shapePadding)},r.prototype.getRenderPoint=function(e,t,i,r,o,n,a){var s=this.legend.padding;if(this.isVertical)n===a||r.location.y+1.5*this.maxItemHeight+2*s>o.y+o.height?(e.location.x=r.location.x+(n===a?0:this.maxColumnWidth),e.location.y=t.y,this.pageXCollections.push(e.location.x-this.legend.shapeWidth/2-s),this.totalPages++):(e.location.x=r.location.x,e.location.y=r.location.y+this.maxItemHeight+s);else{var l=r.location.x+i+r.textSize.width;l+(e.textSize.width+i)>o.x+o.width+this.legend.shapeWidth/2?(e.location.y=n===a?r.location.y:r.location.y+this.maxItemHeight+s,e.location.x=t.x):(e.location.y=r.location.y,e.location.x=n===a?r.location.x:l),this.totalPages=this.totalRowCount}var h=this.getAvailWidth(e.location.x,this.legendBounds.width);e.text=Ie(+h.toFixed(4),e.text,this.legend.textStyle)},r.prototype.getSmartLegendLocation=function(e,t,i){var r;switch(this.position){case"Left":r=(e.x-t.width-i.left)/2,t.x=e.x-t.widththis.chart.availableSize.width-i.right?t.x:e.x+e.width+r;break;case"Top":this.getTitleRect(this.chart),r=(e.y-t.height-(this.titleRect.y+this.titleRect.height))/2,t.y=e.y-t.heightthis.chart.availableSize.height-i.bottom?t.y:e.y+e.height+r}},r.prototype.getTitleRect=function(e){if(!e.title)return null;var t=i.measureText(e.title,e.titleStyle);this.titleRect=new i.Rect(e.availableSize.width/2-t.width/2,e.margin.top,t.width,t.height)},r.prototype.legendByIndex=function(e,t){for(var i=0,r=t;i-1){var l=parseInt(i.split(s)[1],10);if(this.chart.legendSettings.toggleVisibility&&!isNaN(l)){var h=this.chart.visibleSeries[0],c=et(l,h.points),d=this.legendByIndex(l,this.legendCollections);c.visible=!c.visible,d.visible=c.visible,h.sumOfPoints+=c.visible?c.y:-c.y,r.redraw=r.enableAnimation,this.sliceVisibility(l,c.visible),r.removeSvg(),Ue(r),this.chart.refreshPoints(h.points),this.chart.renderElements()}else this.chart.accumulationSelectionModule&&!isNaN(l)&&this.chart.accumulationSelectionModule.legendSelection(this.chart,0,l)}}i.indexOf(this.legendID+"_pageup")>-1?this.changePage(e,!0):i.indexOf(this.legendID+"_pagedown")>-1&&this.changePage(e,!1),r.redraw=!1},r.prototype.sliceVisibility=function(e,t){var i=this.chart.element.id+"_Series_0_Point_";this.chart.visibleSeries[0].dataLabel.visible&&(i=this.chart.element.id+"_datalabel_Series_0_",this.sliceAnimate(he(i+"g_"+e),t))},r.prototype.sliceAnimate=function(e,i){if(!e)return null;new t.Animation({}).animate(e,{duration:300,delay:0,name:i?"FadeIn":"FadeOut",end:function(e){e.element.style.visibility=i?"visible":"hidden"}})},r.prototype.getModuleName=function(){return"AccumulationLegend"},r.prototype.destroy=function(){},r}(yr),ca=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),da=function(e){function r(t){var r=e.call(this,t)||this;if(r.rightSideRenderingPoints=[],r.leftSideRenderingPoints=[],r.id=t.element.id+"_datalabel_Series_",t.title){var o=i.measureText(t.title,t.titleStyle);r.titleRect=new i.Rect(t.availableSize.width/2-o.width/2,t.margin.top,o.width,o.height)}return r}return ca(r,e),r.prototype.getDataLabelPosition=function(e,t,i,r){var o=this.isCircular()?this.isVariousRadius()?this.accumulation.pieSeriesModule.getLabelRadius(this.accumulation.visibleSeries[0],e):this.accumulation.pieSeriesModule.labelRadius:this.getLabelDistance(e,t);this.getLabelRegion(e,t.position,i,o,this.marginValue),e.labelAngle=e.midAngle,e.labelPosition=t.position,this.accumulation.enableSmartLabels&&this.getSmartLabel(e,t,i,r)},r.prototype.getLabelRegion=function(e,t,r,o,n,a){void 0===a&&(a=0);var s=a||e.midAngle,l=M(s,o,this.isCircular()?this.center:this.getLabelLocation(e,t));l.y="Inside"===t?l.y-r.height/2:l.y,l.x="Inside"===t?l.x-r.width/2:l.x,e.labelRegion=new i.Rect(l.x,l.y,r.width+2*n,r.height+2*n),"Outside"===t&&(e.labelRegion.y-=e.labelRegion.height/2,s>=90&&s<=270?e.labelRegion.x-=e.labelRegion.width+10:e.labelRegion.x+=10)},r.prototype.getSmartLabel=function(e,t,r,o){var n=this.isCircular(),a=n?this.radius:this.getLabelDistance(e,t);a+=Be(n?t.connectorStyle.length||"4%":"0px",a);var s=this.findPreviousPoint(o,e.index,e.labelPosition);if("Inside"===t.position?(s&&s.labelRegion&&(Le(e.labelRegion,s.labelRegion)||this.isOverlapping(e,o))||!n&&!Re(e.region,e.labelRegion))&&(e.labelPosition="Outside",n||(a=this.getLabelDistance(e,t)),this.getLabelRegion(e,e.labelPosition,r,a,this.marginValue),(s=this.findPreviousPoint(o,e.index,e.labelPosition))&&(Le(e.labelRegion,s.labelRegion)||this.isConnectorLineOverlapping(e,s))&&this.setOuterSmartLabel(s,e,t.border.width,a,r,this.marginValue)):s&&s.labelRegion&&(Le(e.labelRegion,s.labelRegion)||this.isOverlapping(e,o)||this.isConnectorLineOverlapping(e,s))&&this.setOuterSmartLabel(s,e,t.border.width,a,r,this.marginValue),this.isOverlapping(e,o)&&("Pyramid"===this.accumulation.type||"Funnel"===this.accumulation.type)){var l=e.midAngle||0,h=n?this.radius:this.getLabelDistance(e,t),c=M(l,-h,this.isCircular()?this.center:this.getLabelLocation(e,"OutsideLeft"));e.labelRegion=new i.Rect(c.x,c.y,r.width+2*this.marginValue,r.height+2*this.marginValue),e.labelRegion.y-=e.labelRegion.height/2,e.labelRegion.x=e.labelRegion.x-10-e.labelRegion.width,s&&s.labelRegion&&(Le(e.labelRegion,s.labelRegion)||this.isOverlapping(e,o)||this.isConnectorLineOverlapping(e,s))&&this.setOuterSmartLabel(s,e,t.border.width,h,r,this.marginValue)}},r.prototype.move=function(e,t,i,r){var o=this;if(e.target.textContent.indexOf("...")>-1){var n=e.target.id.split(this.id);if(2===n.length){var a=parseInt(n[1].split("_text_")[0],10),s=parseInt(n[1].split("_text_")[1],10);if(!isNaN(a)&&!isNaN(s)){r&&m(this.accumulation.element.id+"_EJ2_Datalabel_Tooltip");var l=Ke(a,this.accumulation.visibleSeries).points[s];f(l.text||l.y.toString(),t,i,this.areaRect.width,this.accumulation.element.id+"_EJ2_Datalabel_Tooltip",he(this.accumulation.element.id+"_Secondary_Element"))}}}else m(this.accumulation.element.id+"_EJ2_Datalabel_Tooltip");r&&(clearTimeout(this.clearTooltip),this.clearTooltip=+setTimeout(function(){m(o.accumulation.element.id+"_EJ2_Datalabel_Tooltip")},1e3))},r.prototype.findPreviousPoint=function(e,t,i){for(var r=e[0],o=t-1;o>=0;o--)if((r=e[o]).visible&&r.labelVisible&&r.labelRegion&&r.labelPosition===i)return r;return null},r.prototype.isOverlapping=function(e,t){for(var i=e.index-1;i>=0;i--)if(t[i].visible&&t[i].labelVisible&&t[i].labelRegion&&e.labelRegion&&e.labelVisible&&Le(e.labelRegion,t[i].labelRegion))return!0;return!1},r.prototype.textTrimming=function(e,t,i,r){if(Le(e.labelRegion,t)){var o=e.labelRegion.width;"Right"===r?o=t.x-e.labelRegion.x:"Left"===r?(o=e.labelRegion.x-(t.x+t.width))<0&&(o+=e.labelRegion.width,e.labelRegion.x=t.x+t.width):"InsideRight"===r?o=t.x+t.width-e.labelRegion.x:"InsideLeft"===r?(o=e.labelRegion.x+e.labelRegion.width-t.x)-1&&this.setPointVisibileFalse(e))}},r.prototype.setPointVisibileFalse=function(e){e.labelVisible=!1,e.labelRegion=null},r.prototype.setPointVisibleTrue=function(e){e.labelVisible=!0},r.prototype.setOuterSmartLabel=function(e,t,i,r,o,n){if(this.isCircular()){var a=this.getOverlappedAngle(e.labelRegion,t.labelRegion,t.midAngle,2*i);for(this.getLabelRegion(t,"Outside",o,r,n,a),a>t.endAngle&&(a=t.midAngle),t.labelAngle=a;t.labelVisible&&(Le(e.labelRegion,t.labelRegion)||a<=e.labelAngle||this.isConnectorLineOverlapping(t,e))&&!(a>t.endAngle);)t.labelAngle=a,this.getLabelRegion(t,"Outside",o,r,n,a),a+=.1}else this.setSmartLabelForSegments(t,e)},r.prototype.setSmartLabelForSegments=function(e,t){var i=e.labelRegion,r="Funnel"===this.accumulation.type?t.labelRegion.y-(i.y+i.height):e.labelRegion.y-(t.labelRegion.y+t.labelRegion.height);r<0&&(e.labelRegion.y+="Funnel"===this.accumulation.type?r:-r)},r.prototype.isConnectorLineOverlapping=function(e,t){var i;!this.isCircular()&&e.labelRegion.x=90&&i<=270?(t.y=e.y-(r+t.height/2),o=e.x+e.width):t.y=e.y+e.height+r,O(this.center,new Vi(o,t.y))},r.prototype.getConnectorPath=function(e,t,i,r){void 0===r&&(r=0);var o=i.connectorStyle,n=this.isCircular()?this.isVariousRadius()?this.accumulation.pieSeriesModule.getLabelRadius(this.accumulation.visibleSeries[0],t):this.labelRadius:this.getLabelDistance(t,i),a=this.getConnectorStartPoint(t,o),s=this.accumulation.enableSmartLabels?t.midAngle:r||t.midAngle,l=new Vi(0,0),h=this.getEdgeOfLabel(e,s,l,o.width,t);if("Curve"===o.type){if(this.isCircular()){var c=n-(this.isVariousRadius()?Be(t.sliceRadius,this.accumulation.pieSeriesModule.seriesRadius):this.radius);return t.isLabelUpdated?l=this.getPerpendicularDistance(a,t):(l=M(s,n-c/2,this.center),"Outside"===t.labelPosition&&"Inside"===i.position&&(l=M(s,n-1.25*c,this.center))),"M "+a.x+" "+a.y+" Q "+l.x+" "+l.y+" "+h.x+" "+h.y}return this.getPolyLinePath(a,h)}return"M "+a.x+" "+a.y+" L "+l.x+" "+l.y+" L "+h.x+" "+h.y},r.prototype.getPolyLinePath=function(e,t){var i=[e,t];if(e.y===t.y)return"M "+e.x+" "+e.y+" L "+t.x+" "+t.y;for(var r="M",o=0;o<=16;o++){var n=o/16,a=this.getBezierPoint(n,i,0,2);r+=a.x+","+a.y,16!==o&&(r+=" L")}return r},r.prototype.getBezierPoint=function(e,t,i,r){if(1===r)return t[i];var o=this.getBezierPoint(e,t,i,r-1),n=this.getBezierPoint(e,t,i+1,r-1),a=(o.x,o.x),s=(o.y,o.y),l=(1-e)*a+e*(n.x,n.x),h=(1-e)*s+e*(n.y,n.y);return o.x,{x:l,y:h}},r.prototype.getEdgeOfLabel=function(e,t,i,r,o){void 0===r&&(r=1);var n=new Vi(e.x,e.y);return t>=90&&t<=270?(n.x+=e.width+r/2,n.y+=e.height/2,i.x=n.x+10,i.y=n.y):o&&o.region&&o.region.x>o.labelRegion.x?(n.x+=2*r+e.width,n.y+=e.height/2,i.x=n.x+10,i.y=n.y):(n.x-=r/2,n.y+=e.height/2,i.x=n.x-10,i.y=n.y),n},r.prototype.getLabelDistance=function(e,t){if(e.labelPosition&&t.position!==e.labelPosition||t.connectorStyle.length){var i=Be(t.connectorStyle.length||"70px",this.accumulation.initialClipRect.width);if(ie.labelRegion.x&&(i="OutsideLeft"),this.isCircular()?M(e.midAngle,(this.isVariousRadius()?Be(e.sliceRadius,this.accumulation.pieSeriesModule.seriesRadius):this.radius)-t.width,this.center):this.getLabelLocation(e,i)},r.prototype.findAreaRect=function(){this.areaRect=new i.Rect(0,0,this.accumulation.availableSize.width,this.accumulation.availableSize.height);var e=this.accumulation.margin;L(this.areaRect,new Hi(e.left,e.right,e.top,e.bottom))},r.prototype.renderDataLabel=function(e,i,r,o,n,a,s){var l=this.accumulation.element.id+"_datalabel_Series_"+n+"_",h=this.accumulation.renderer.createGroup({id:l+"g_"+e.index});e.label=e.originalText||e.y.toString();var c={width:i.border.width,color:i.border.color},d=t.extend({},t.getValue("properties",i.font),null,!0),p={cancel:!1,name:"textRender",series:this.accumulation.visibleSeries[0],point:e,text:e.label,border:c,color:i.fill,template:i.template,font:d};this.accumulation.trigger("textRender",p),e.argsData=p;var u=null!==p.template;e.labelVisible=!p.cancel,e.text=e.label=p.text,Number(e.label)&&(e.label=this.accumulation.intl.formatNumber(+e.label,{useGrouping:this.accumulation.useGroupingSeparator})),this.marginValue=p.border.width?5+p.border.width:1;var g=t.createElement("div",{id:this.accumulation.element.id+"_Series_0_DataLabel_"+e.index,styles:"position: absolute;background-color:"+p.color+";"+ge(i.font)+";border:"+p.border.width+"px solid "+p.border.color+";"});this.calculateLabelSize(u,g,e,o,p,h,l,i,s)},r.prototype.calculateLabelSize=function(e,t,r,o,n,a,s,l,h,c,d){var p=e?d?{width:c.width,height:c.height}:this.getTemplateSize(t,r,n,h,e,o,a,s,l):i.measureText(r.label,l.font);p.height+=4,p.width+=4,r.textSize=p,r.templateElement=t,this.getDataLabelPosition(r,l,p,o),r.labelRegion&&this.correctLabelRegion(r.labelRegion,r.textSize)},r.prototype.drawDataLabels=function(e,r,o,n,a){var s,l,h=e.leftSidePoints.concat(e.rightSidePoints);h.sort(function(e,t){return e.index-t.index}),"Pie"===e.type&&this.accumulation.enableSmartLabels&&this.extendedLabelsCalculation();for(var c=0,d=h;c=90&&p.midAngle<=270?p.midAngle+180:p.midAngle)+","+(y.x+f/2)+","+(y.y-b/4)+")":"rotate("+(l=s?s>360?s-360:s<-360?s+360:s:0)+","+(y.x+f/2)+","+y.y+")",p.transform=x,Ve(this.accumulation.renderer,new i.TextOption(u+"text_"+p.index,y.x,y.y,"start",p.label,x,"auto",l),p.argsData.font,p.argsData.font.color||this.getSaturatedColor(p,p.argsData.color),g,!1,a,!0,!1,this.accumulation.duration),m=null}if(this.accumulation.accumulationLegendModule&&("Outside"===r.position||this.accumulation.enableSmartLabels)&&this.accumulation.visibleSeries[0].findMaxBounds(this.accumulation.visibleSeries[0].labelBound,p.labelRegion),"Outside"===p.labelPosition){var w=he(u+"connector_"+p.index),S=w?w.getAttribute("d"):"";be(!1,g,this.accumulation.renderer.drawPath(new i.PathOption(u+"connector_"+p.index,"transparent",r.connectorStyle.width,r.connectorStyle.color||p.color,1,r.connectorStyle.dashArray,this.getConnectorPath(t.extend({},p.labelRegion,null,!0),p,r,p.labelAngle))),a,!0,null,null,null,S,!1,!1,null,this.accumulation.duration)}be(!1,o,g,a)}}}},r.prototype.finalizeDatalabels=function(e,t,r){if((this.isOverlapping(e,t)||this.titleRect&&e.labelRegion&&Le(e.labelRegion,this.titleRect))&&this.isCircular()&&"Outside"===e.labelPosition&&this.setPointVisibileFalse(e),this.accumulation.accumulationLegendModule&&e.labelVisible&&e.labelRegion){var o=this.accumulation.accumulationLegendModule.legendBounds,n=this.accumulation.legendSettings.border.width/2;this.textTrimming(e,new i.Rect(o.x-n,o.y-n,o.width+2*n,o.height+2*n),r.font,this.accumulation.accumulationLegendModule.position)}if(e.labelVisible&&e.labelRegion){var a=this.isCircular()?e.labelRegion.x>=this.center.x?"InsideRight":"InsideLeft":e.labelRegion.x>=e.region.x?"InsideRight":"InsideLeft";this.textTrimming(e,this.areaRect,r.font,a)}e.labelVisible&&e.labelRegion&&(e.labelRegion.y+e.labelRegion.height>this.areaRect.y+this.areaRect.height||e.labelRegion.ythis.areaRect.x+this.areaRect.width)&&this.setPointVisibileFalse(e)},r.prototype.getTemplateSize=function(e,t,i,r,o,n,a,s,l){var h=ye(e=ue(e,t.index,i.template,this.accumulation,t,this.accumulation.visibleSeries[0],this.accumulation.element.id+"_DataLabel",0,i,o,n,a,s,l,r),r);return{width:h.width,height:h.height}},r.prototype.setTemplateStyle=function(e,t,i,r,o,n){if(e.style.left=t.labelRegion.x+"px",e.style.top=t.labelRegion.y+"px",e.style.color=r||this.getSaturatedColor(t,o),this.accumulation.isBlazor){var a=this.isCircular()?t.labelRegion.x>=this.center.x?"InsideRight":"InsideLeft":t.labelRegion.x>=t.region.x?"InsideRight":"InsideLeft";e.style.transform="InsideRight"===a?"translate(0%, -50%)":"translate(-100%, -50%)"}e.childElementCount&&(be(!1,i,e,n,!0,"left","top"),this.doTemplateAnimation(this.accumulation,e))},r.prototype.getSaturatedColor=function(e,t){var i,r=ke(_e(i="transparent"===(i=this.marginValue>=1?"transparent"===t?this.getLabelBackground(e):t:this.getLabelBackground(e))?window.getComputedStyle(document.body,null).backgroundColor:i));return Math.round((299*r.r+587*r.g+114*r.b)/1e3)>=128?"black":"white"},r.prototype.doTemplateAnimation=function(e,t){var i=e.visibleSeries[0],r=i.animation.delay+i.animation.duration;i.animation.enable&&e.animateSeries&&(t.style.visibility="hidden",oe(t,r,200,"ZoomIn"))},r.prototype.getLabelBackground=function(e){return"Outside"===e.labelPosition?this.accumulation.background||this.accumulation.themeStyle.background:e.color},r.prototype.correctLabelRegion=function(e,t,i){void 0===i&&(i=4),e.height-=i,e.width-=i,e.x+=i/2,e.y+=i/2,t.height-=i,t.width-=i},r.prototype.getModuleName=function(){return"AccumulationDataLabel"},r.prototype.destroy=function(){},r.prototype.extendedLabelsCalculation=function(){var e=this,t=this.accumulation.series[0];t.rightSidePoints.forEach(function(t,i,r){t.initialLabelRegion=t.labelRegion,t.isLabelUpdated=0,e.skipPoints(t,r,i)}),t.leftSidePoints.forEach(function(t,i,r){t.initialLabelRegion=t.labelRegion,t.isLabelUpdated=0,e.skipPoints(t,r,i)}),this.arrangeLeftSidePoints(t),this.isIncreaseAngle=!1,this.arrangeRightSidePoints(t)},r.prototype.arrangeRightSidePoints=function(e){var t,i,r=e.rightSidePoints.filter(function(e){return e.labelVisible&&"Outside"===e.labelPosition});this.rightSideRenderingPoints=r;var o,n,a,s=r[r.length-1];s&&s.labelAngle>90&&s.labelAngle<270&&(this.isIncreaseAngle=!0,this.changeLabelAngle(s,89));for(var l=r.length-1;l>=0;l--)if(n=r[l],a=r[l+1],this.isOverlapWithNext(n,r,l)&&n.labelVisible||!(n.labelAngle<=90||n.labelAngle>=270))if(o=s.labelAngle+10,i=!0,t?this.isIncreaseAngle=!1:o>90&&o<270&&a.isLabelUpdated&&(this.isIncreaseAngle=!0),this.isIncreaseAngle)for(h=l+1;h>0;h--)this.decreaseAngle(r[h],r[h-1],e,!0);else for(var h=l+1;h0;l--)this.decreaseAngle(i[l],i[l-1],e,!1),i.filter(function(e,r){e.isLabelUpdated&&i[r].labelAngle-10<100&&(t.isIncreaseAngle=!0)});else n&&r&&r.isLabelUpdated&&(a=!0)},r.prototype.decreaseAngle=function(e,i,r,o){if(t.isNullOrUndefined(e)||t.isNullOrUndefined(i))return null;var n=1;if(o)for(;Le(e.labelRegion,i.labelRegion)||!this.isVariousRadius()&&!(i.labelRegion.height+i.labelRegion.y=90){a=270,this.isIncreaseAngle=!0;break}this.changeLabelAngle(i,a),n++}else for(e.labelAngle>270&&(this.changeLabelAngle(e,270),i.labelAngle=270);Le(e.labelRegion,i.labelRegion)||!this.isVariousRadius()&&e.labelRegion.y+e.labelRegion.height>i.labelRegion.y;){var a=i.midAngle-n;if(!(a<=270&&a>=90)){a=90,this.isIncreaseAngle=!0;break}if(this.changeLabelAngle(i,a),Le(e.labelRegion,i.labelRegion)&&!r.leftSidePoints.indexOf(i)&&a-1<90&&a-1>270){this.changeLabelAngle(e,e.labelAngle+1),this.arrangeLeftSidePoints(r);break}n++}},r.prototype.increaseAngle=function(e,i,r,o){if(t.isNullOrUndefined(e)||t.isNullOrUndefined(i))return null;var n=1;if(o)for(;Le(e.labelRegion,i.labelRegion)||!this.isVariousRadius()&&!(e.labelRegion.y+e.labelRegion.height90){a=90,this.isIncreaseAngle=!0;break}if(this.changeLabelAngle(i,a),Le(e.labelRegion,i.labelRegion)&&a+1>90&&a+1<270&&this.rightSideRenderingPoints.indexOf(i)===this.rightSideRenderingPoints.length-1){this.changeLabelAngle(e,e.labelAngle-1),i.labelRegion=i.initialLabelRegion,this.arrangeRightSidePoints(r);break}n++}else for(;Le(e.labelRegion,i.labelRegion)||!this.isVariousRadius()&&e.labelRegion.y90)){a=270,this.isIncreaseAngle=!1;break}this.changeLabelAngle(i,a),n++}},r.prototype.changeLabelAngle=function(e,t){var i,r=this.accumulation.series[0].dataLabel;this.isVariousRadius()&&(i=this.accumulation.pieSeriesModule.getLabelRadius(this.accumulation.visibleSeries[0],e));var o="Outside"===e.labelPosition&&this.accumulation.enableSmartLabels&&"Inside"===r.position?this.radius+Be(r.connectorStyle.length||"4%",this.accumulation.pieSeriesModule.size/2):this.isVariousRadius()?i:this.accumulation.pieSeriesModule.labelRadius+10,n=this.isVariousRadius()?i:o;this.getLabelRegion(e,"Outside",e.textSize,n,this.marginValue,t),e.isLabelUpdated=1,e.labelAngle=t},r.prototype.isOverlapWithPrevious=function(e,t,i){for(var r=0;r0&&(e.midAngle<285&&e.midAngle>255||e.midAngle<105&&e.midAngle>75)){var r=t[i-1],o=e.endAngle%360-e.startAngle%360;(s=r.endAngle%360-r.startAngle%360)<=o&&o<5&&r.labelVisible&&this.setPointVisibleTrue(e)}else if(i>1&&(e.midAngle<300&&e.midAngle>240||e.midAngle<120&&e.midAngle>60)){var n=t[i-1],a=t[i-2],o=e.endAngle%360-e.startAngle%360,s=n.endAngle%360-n.startAngle%360,l=a.endAngle%360-a.startAngle%360;o<3&&s<3&&l<3&&n.labelVisible&&e.labelVisible&&this.setPointVisibleTrue(e)}},r.prototype.getPerpendicularDistance=function(e,t){var i=10+10*Math.sin(t.midAngle*Math.PI/360);return t.midAngle>270&&t.midAngle<360?new Vi(e.x+i*Math.cos((360-t.midAngle)*Math.PI/180),e.y-i*Math.sin((360-t.midAngle)*Math.PI/180)):t.midAngle>0&&t.midAngle<90?new Vi(e.x+i*Math.cos(t.midAngle*Math.PI/180),e.y+i*Math.sin(t.midAngle*Math.PI/180)):t.midAngle>0&&t.midAngle<90?new Vi(e.x-i*Math.cos((t.midAngle-90)*Math.PI/180),e.y+i*Math.sin((t.midAngle-90)*Math.PI/180)):new Vi(e.x-i*Math.cos((t.midAngle-180)*Math.PI/180),e.y-i*Math.sin((t.midAngle-180)*Math.PI/180))},r}(Zn),pa=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ua=function(e){function i(t){var i=e.call(this,t)||this;return i.accumulation=t,i.addEventListener(),i}return pa(i,e),i.prototype.addEventListener=function(){this.accumulation.isDestroyed||(this.accumulation.on(t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeaveHandler,this),this.accumulation.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.accumulation.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},i.prototype.mouseLeaveHandler=function(e){this.removeTooltip(this.accumulation.tooltip.fadeOutDuration)},i.prototype.mouseUpHandler=function(e){var t=this.accumulation;t.tooltip.enable&&t.isTouch&&j(t.mouseX,t.mouseY,t.initialClipRect)&&(this.tooltip(e),this.removeTooltip(2e3))},i.prototype.mouseMoveHandler=function(e){var t=this.accumulation;t.tooltip.enable&&j(t.mouseX,t.mouseY,t.initialClipRect)&&this.tooltip(e)},i.prototype.tooltip=function(e){var t=this.getElement(this.element.id+"_tooltip_svg"),i=t&&parseInt(t.getAttribute("opacity"),10)>0,r=this.getTooltipElement(i);this.renderSeriesTooltip(e,this.accumulation,!i,r)},i.prototype.renderSeriesTooltip=function(e,t,i,r){var o=this.getPieData(e,t,t.mouseX,t.mouseY);t.initialClipRect;if(this.currentPoints=[],!o.point||this.previousPoints[0]&&this.previousPoints[0].point===o.point)!o.point&&this.isRemove&&(this.removeTooltip(this.accumulation.tooltip.fadeOutDuration),this.isRemove=!1);else{if(this.previousPoints[0]&&o.point.index===this.previousPoints[0].point.index&&o.series.index===this.previousPoints[0].series.index)return null;this.pushData(o,i,r,!1)&&this.triggerTooltipRender(o,i,this.getTooltipText(o,t.tooltip),this.findHeader(o))}},i.prototype.triggerTooltipRender=function(e,i,r,o,n){var a=this;void 0===n&&(n=!0);var s={cancel:!1,name:"tooltipRender",text:r,point:e.point,textStyle:this.textStyle,series:this.accumulation.isBlazor?{}:e.series,headerText:o,data:{pointX:e.point.x,pointY:e.point.y,seriesIndex:e.series.index,pointIndex:e.point.index,pointText:e.point.text,seriesName:e.series.name}},l=function(r){r.cancel?(a.removeHighlight(),t.remove(a.getElement(a.element.id+"_tooltip"))):(a.formattedText=a.formattedText.concat(r.text),a.text=a.formattedText,a.headerText=r.headerText,a.createTooltip(a.chart,i,e.point.symbolLocation,e.series.clipRect,e.point,["Circle"],0,a.chart.initialClipRect,null,e.point,a.accumulation.tooltip.template?r.template:"")),a.isRemove=!0};l.bind(this,e),this.chart.trigger("tooltipRender",s,l)},i.prototype.getPieData=function(e,i,r,o){var n=D(e.target.id,!0);if(!isNaN(n.series)){var a=n.series,s=n.point;if(!(t.isNullOrUndefined(a)||isNaN(a)||t.isNullOrUndefined(s)||isNaN(s))){var l=this.getSeriesFromIndex(a,i.visibleSeries);if(l.enableTooltip)return new Gi(l.points[s],l)}}return new Gi(null,null)},i.prototype.getSeriesFromIndex=function(e,t){return t[0]},i.prototype.getTooltipText=function(e,t){var i=e.series,r=this.accumulation.useGroupingSeparator?"${point.x} : ${point.separatorY}":"${point.x} : ${point.y}";return r=t.format?t.format:r,this.parseTemplate(e.point,i,r)},i.prototype.findHeader=function(e){return""===this.header?"":(this.header=this.parseTemplate(e.point,e.series,this.header),""!==this.header.replace(//g,"").replace(/<\/b>/g,"").trim()?this.header:"")},i.prototype.parseTemplate=function(e,t,i){for(var r,o,n=0,a=Object.keys(e);n-1||t.target.id.indexOf("_datalabel_")>-1)&&this.performSelection(D(t.target.id),e,t.target)},i.prototype.performSelection=function(e,t,i){switch(i=i.id.indexOf("datalabel")>-1?t.getSeriesElement().childNodes[e.series].childNodes[e.point]:i,t.selectionMode){case"Point":isNaN(e.point)||(this.selection(t,e,[i]),this.blurEffect(t.element.id,t.visibleSeries))}},i.prototype.selection=function(e,i,r){e.isMultiSelect||this.removeMultiSelectEelments(e,this.selectedDataIndexes,i,e.series);var o=r[0]&&(r[0].getAttribute("class")||"");if(r[0]&&o.indexOf(this.getSelectionClass(r[0].id))>-1){if(this.removeStyles(r,i),this.addOrRemoveIndex(this.selectedDataIndexes,i),e.enableBorderOnMouseMove){n=document.getElementById(r[0].id.split("_")[0]+"PointHover_Border");t.isNullOrUndefined(n)||this.removeSvgClass(n,n.getAttribute("class"))}}else{if(this.applyStyles(r,i),e.enableBorderOnMouseMove){var n=document.getElementById(r[0].id.split("_")[0]+"PointHover_Border");t.isNullOrUndefined(n)||this.addSvgClass(n,r[0].getAttribute("class"))}this.addOrRemoveIndex(this.selectedDataIndexes,i,!0)}},i.prototype.redrawSelection=function(e){var i=t.extend([],this.selectedDataIndexes,null,!0);this.removeSelectedElements(e,this.selectedDataIndexes),this.blurEffect(e.element.id,e.visibleSeries),this.selectDataIndex(i,e)},i.prototype.removeSelectedElements=function(e,t){for(var i=0,r=t;i0&&i.previousPoints[0].point.index!==t.point?i.svgTooltip.opacity:this.series[t.series].opacity;n.setAttribute("opacity",s.toString()),this.addSvgClass(n,this.getSelectionClass(n.id))}}},i.prototype.getSelectionClass=function(e){return this.generateStyle(this.control.series[D(e).series])},i.prototype.removeStyles=function(e,t){for(var i,r=this.control.accumulationTooltipModule,o=0,n=e;o=s.x&&s.x+s.width>=e&&(n=n.concat("M "+e+" "+(t.bounds.y+t.bounds.height)+" L "+e+" "+t.bounds.y+" "),a=a.concat("M "+e+" "+(s.y+s.height)+" L "+e+" "+c+" "));var u=new i.PathOption(t.element.id+"_MajorGridLine","transparent",r.width,t.series.length?h||r.color||t.themeStyle.gridLineColor:"transparent",1,r.dashArray,n);this.gridLines.appendChild(t.renderer.drawPath(u)),u=new i.PathOption(t.element.id+"_MajorTickLine","transparent",o.width,h||o.color||t.themeStyle.gridLineColor,1,r.dashArray,a),this.gridLines.appendChild(t.renderer.drawPath(u))},t.prototype.renderAxisLabels=function(){var e,t=this.rangeNavigator.chartSeries.xAxis,r=this.rangeNavigator,o=r.renderer.createGroup({id:r.element.id+"_AxisLabels"}),n=r.renderer.createGroup({id:r.element.id+"_FirstLevelAxisLabels"}),a=r.renderer.createGroup({id:r.element.id+"_SecondLevelAxisLabels"}),s=t;if(e=this.findLabelY(r,!1),this.placeAxisLabels(t,e,"_AxisLabel_",r,n),s.intervalType=s.actualIntervalType=r.groupBy||this.getSecondaryLabelType(t.actualIntervalType),s.labelFormat="",r.enableGrouping&&"DateTime"===r.valueType&&"Years"!==this.actualIntervalType){s.visibleRange.interval=1,s.visibleLabels=[],this.findAxisLabels(s),this.secondLevelLabels=s.visibleLabels,e=this.findLabelY(r,!0);var l=this.placeAxisLabels(s,e,"_SecondaryLabel_",r,a),h=new i.PathOption(r.element.id+"_SecondaryMajorLines","transparent",r.majorTickLines.width,r.majorTickLines.color||r.themeStyle.gridLineColor,1,r.majorGridLines.dashArray,l);this.gridLines.appendChild(r.renderer.drawPath(h))}r.chartSeries.xAxis.visibleLabels=r.chartSeries.xAxis.visibleLabels.concat(s.visibleLabels),o.appendChild(n),o.appendChild(a),r.svgObject.appendChild(this.gridLines),r.svgObject.appendChild(o)},t.prototype.getSecondaryLabelType=function(e){var t=["Years","Quarter","Months","Weeks","Days","Hours","Minutes","Seconds"];return"Years"===e?"Years":t[t.indexOf(e)-1]},t.prototype.findAxisLabels=function(e){e.visibleLabels=[];var t,i,r=new Date(e.visibleRange.min),o=this.rangeNavigator.interval?this.rangeNavigator.interval:1;switch(e.actualIntervalType){case"Years":r=new Date(r.getFullYear(),0,1);break;case"Quarter":r=r.getMonth()<=2?new Date(r.getFullYear(),0,1):r.getMonth()<=5?new Date(r.getFullYear(),3,1):r.getMonth()<=8?new Date(r.getFullYear(),6,1):new Date(r.getFullYear(),9,1);break;case"Months":r=new Date(r.getFullYear(),r.getMonth());break;case"Weeks":r=new Date(r.getFullYear(),r.getMonth(),r.getDate()-r.getDay());break;case"Days":r=new Date(r.getFullYear(),r.getMonth(),r.getDate());break;case"Hours":r=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours());break;case"Minutes":r=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes());break;case"Seconds":r=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds())}for(t=r.getTime(),this.rangeNavigator.format=this.rangeNavigator.intl.getDateFormat({format:e.labelFormat||this.blazorFormat(e),type:G(e.skeletonType),skeleton:this.getSkeleton(e,null,null,this.rangeNavigator.isBlazor)});t<=e.visibleRange.max;)i=this.dateFormats(this.rangeNavigator.format(new Date(t)),e,e.visibleLabels.length),e.visibleLabels.push(new ki(i,t,this.rangeNavigator.labelStyle,i)),t=this.increaseDateTimeInterval(e,t,o).getTime()},t.prototype.blazorFormat=function(e){return this.rangeNavigator.isBlazor&&"Years"===e.actualIntervalType?"yyyy":""},t.prototype.dateFormats=function(e,t,i){var r=e,o=this.rangeNavigator.isBlazor,n=this.rangeNavigator.enableGrouping&&0===this.firstLevelLabels.length;switch(t.actualIntervalType){case"Quarter":e.indexOf("Jan")>-1?r=n?"Quarter1":e.replace(o?"January":"Jan","Quarter1"):e.indexOf("Apr")>-1?r=n?"Quarter2":e.replace(o?"April":"Apr","Quarter2"):e.indexOf("Jul")>-1?r=n?"Quarter3":e.replace(o?"July":"Jul","Quarter3"):e.indexOf("Oct")>-1&&(r=n?"Quarter4":e.replace(o?"October":"Oct","Quarter4"));break;case"Weeks":r="Week"+ ++i;break;default:r=e}return r},t.prototype.findLabelY=function(e,t){var r,o=e.bounds.y+e.bounds.height,n=e.majorTickLines.height,a=i.measureText("Quarter1 2011",e.labelStyle).height,s=8;return r="Outside"===e.labelPosition&&"Outside"===e.tickPosition||0===e.series.length?o+n+s+.75*a:"Inside"===e.labelPosition&&"Inside"===e.tickPosition?o-n-s:"Inside"===e.labelPosition&&"Outside"===e.tickPosition?o-s:o+s+.75*a,t&&(s=15,"Outside"===e.labelPosition||0===e.series.length?r+=s+.75*a:r="Outside"===e.tickPosition||0===e.series.length?o+n+s+.75*a:o+s+.75*a),r},t.prototype.placeAxisLabels=function(e,t,r,o,n){var a,s,l,h,c=e.visibleLabels.length,d=o.bounds,p="",u=o.disableRangeSelector?"transparent":null,g=o.enableRtl?d.x+d.width:d.x,y=e.actualIntervalType,m="DateTime"===o.valueType?c>1?e.visibleLabels[1].value-e.visibleLabels[0].value:(e.visibleRange.max-e.visibleLabels[0].value)/2:0;"DateTime"!==o.valueType||"Quarter"!==y&&"Weeks"!==y||this.findSuitableFormat(e,o);for(var v=0,f=c;v-1&&(l=this.findAlignment(e,v)),h=z(a.value,e)*d.width+d.x,(0===v||v===e.visibleLabels.length-1&&o.enableRtl)&&ld.x+d.width&&(l=d.x+d.width-a.size.width/2),r.indexOf("_SecondaryLabel_")>-1&&l>=d.x&&d.x+d.width>=l&&(p=p.concat("M "+h+" "+t+" L "+h+" "+(t-a.size.height))),"Hide"!==o.labelIntersectAction||0===v||!this.isIntersect(e,l,a.size.width,g,s.size.width)){"Middle"===o.secondaryLabelAlignment&&1===e.visibleLabels.length&&(l=z(a.value,e)+(d.x+d.width/2));var b=o.labelStyle,x={size:b.size,color:u||b.color||o.themeStyle.labelFontColor,fontFamily:b.fontFamily,fontStyle:b.fontStyle||o.labelStyle.fontStyle,fontWeight:b.fontWeight||o.labelStyle.fontWeight,opacity:b.opacity||o.labelStyle.opacity,textAlignment:b.textAlignment||o.labelStyle.textAlignment,textOverflow:b.textOverflow||o.labelStyle.textOverflow},w={cancel:!1,name:"labelRender",text:a.text,value:a.value,labelStyle:x,region:new i.Rect(l,t,a.size.width,a.size.height)};o.trigger("labelRender",w),w.cancel||(o.labels.push(w),Ve(this.rangeNavigator.renderer,new i.TextOption(this.rangeNavigator.element.id+r+v,l,t,"middle",w.text),w.labelStyle,w.labelStyle.color||o.themeStyle.labelFontColor,n).style.cursor="DateTime"===e.valueType?"cursor: pointer":"cursor: default",g=l,s=a)}return p},t.prototype.isIntersect=function(e,t,i,r,o){return e.isInversed?t+i/2>r-o/2:t-i/21?n[1].value-n[0].value:e.visibleRange.interval:0,h=0;h-1&&this.isIntersect(e,o,n[h].size.width,r,n[h-1].size.width)?(n.every(function(e){return e.text=e.text.toString().replace("Quarter","QTR"),!0}),e.visibleLabels=n,this.findSuitableFormat(e,t)):this.isIntersect(e,o,n[h].size.width,r,n[h-1].size.width)&&(n.every(function(e){return e.text=e.text.toString().replace("QTR","Q"),!0}),e.visibleLabels=n)):"Weeks"===e.actualIntervalType&&0!==h&&n[h].text.indexOf("Week")>-1&&this.isIntersect(e,o,n[h].size.width,r,n[h-1].size.width)&&(n.every(function(e){return e.text=e.text.toString().replace("Week","W"),!0}),e.visibleLabels=n),r=o},t.prototype.findAlignment=function(e,t){var i=e.visibleLabels[t],r=e.visibleLabels[t+1],o=this.rangeNavigator.bounds;return"Near"===this.rangeNavigator.secondaryLabelAlignment?z(i.value,e)*o.width+o.x+i.size.width/2:z(r?r.value:e.visibleRange.max,e)*o.width+o.x-i.size.width},t}(kr);!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.tooltipLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"}}(e.RangeNavigatorTheme||(e.RangeNavigatorTheme={}));var Ca=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Pa=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},La=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.clipRect=new i.Rect(0,0,0,0),t}return Ca(r,e),Pa([t.Property(null)],r.prototype,"dataSource",void 0),Pa([t.Property(null)],r.prototype,"xName",void 0),Pa([t.Property(null)],r.prototype,"yName",void 0),Pa([t.Property()],r.prototype,"query",void 0),Pa([t.Property("Line")],r.prototype,"type",void 0),Pa([t.Complex({enable:!1},qt)],r.prototype,"animation",void 0),Pa([t.Complex({color:"transparent",width:2},Yt)],r.prototype,"border",void 0),Pa([t.Property(null)],r.prototype,"fill",void 0),Pa([t.Property(1)],r.prototype,"width",void 0),Pa([t.Property(1)],r.prototype,"opacity",void 0),Pa([t.Property("0")],r.prototype,"dashArray",void 0),r}(t.ChildProperty),Ra=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ca(i,e),Pa([t.Property(null)],i.prototype,"width",void 0),Pa([t.Property(null)],i.prototype,"height",void 0),Pa([t.Complex({width:1,color:null},Yt)],i.prototype,"border",void 0),Pa([t.Property(null)],i.prototype,"fill",void 0),Pa([t.Property("Circle")],i.prototype,"type",void 0),i}(t.ChildProperty),Ma=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ca(i,e),Pa([t.Complex({},Ra)],i.prototype,"thumb",void 0),Pa([t.Property(null)],i.prototype,"selectedRegionColor",void 0),Pa([t.Property(null)],i.prototype,"unselectedRegionColor",void 0),i}(t.ChildProperty),Aa=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return Ca(r,i),Pa([t.Property(!1)],r.prototype,"enable",void 0),Pa([t.Property(.85)],r.prototype,"opacity",void 0),Pa([t.Property(null)],r.prototype,"fill",void 0),Pa([t.Property(null)],r.prototype,"format",void 0),Pa([t.Complex(e.RangeNavigatorTheme.tooltipLabelFont,Xt)],r.prototype,"textStyle",void 0),Pa([t.Property(null)],r.prototype,"template",void 0),Pa([t.Complex({color:"#cccccc",width:.5},Yt)],r.prototype,"border",void 0),Pa([t.Property("OnDemand")],r.prototype,"displayMode",void 0),r}(t.ChildProperty),Ta=function(){function e(e){this.control=e,this.points=[],this.isIOS=t.Browser.isIos||t.Browser.isIos7;var i=e.navigatorStyleSettings.thumb;this.thumbVisible=0!==e.themeStyle.thumbWidth&&0!==e.themeStyle.thumbHeight,this.elementId=e.element.id,this.thumpPadding=e.themeStyle.thumbWidth/2,this.addEventListener(),this.thumbColor=e.disableRangeSelector?"transparent":i.fill||e.themeStyle.thumbBackground}return e.prototype.render=function(e){var t=e.renderer,i=e.navigatorStyleSettings,r=e.disableRangeSelector?"transparent":null,o=t.createGroup({id:this.elementId+"_sliders",style:e.disableRangeSelector?"pointer-events:none;":""}),n=new Di(this.elementId+"_leftUnSelectedArea",r||i.unselectedRegionColor||e.themeStyle.unselectedRectColor,{width:0},1,{x:e.bounds.x,y:e.bounds.y,width:e.bounds.width/3,height:e.bounds.height});this.leftUnSelectedElement=t.drawRectangle(n),n.id=this.elementId+"_rightUnSelectedArea",this.rightUnSelectedElement=t.drawRectangle(n),n.id=this.elementId+"_SelectedArea",n.fill=r||i.selectedRegionColor||e.themeStyle.selectedRegionColor,this.selectedElement=t.drawRectangle(n),this.selectedElement.setAttribute("style","cursor: -webkit-grab"),this.leftSlider=t.createGroup({id:this.elementId+"_LeftSlider",style:"cursor: ew-resize"}),this.rightSlider=t.createGroup({id:this.elementId+"_RightSlider",style:"cursor: ew-resize"}),this.createThump(t,e.bounds,this.leftSlider,this.elementId+"_LeftSlider",o),this.createThump(t,e.bounds,this.rightSlider,this.elementId+"_RightSlider"),o.appendChild(this.leftUnSelectedElement),o.appendChild(this.rightUnSelectedElement),o.appendChild(this.selectedElement),o.appendChild(this.leftSlider),o.appendChild(this.rightSlider),e.svgObject.appendChild(o)},e.prototype.createThump=function(e,t,r,o,n){var a,s=this.control,l=s.navigatorStyleSettings.thumb,h=s.themeStyle,c=t.y+t.height/2,d=this.thumpPadding,p=s.themeStyle.thumbHeight/2-5,u=s.disableRangeSelector?"transparent":null,g=u||l.border.color||h.thumpLineColor;r.appendChild(e.drawPath(new i.PathOption(o+"_ThumpLine","transparent",l.border.width,s.series.length?g:"transparent",1,null,"M "+d+" "+t.y+" L "+d+" "+(t.y+t.height)+" "))),this.thumpY=c-s.themeStyle.thumbHeight/2,this.sliderY=t.y>this.thumpY?this.thumpY:t.y,n&&!s.disableRangeSelector&&((a=e.createDefs()).innerHTML='',n.appendChild(a)),r.innerHTML+='',"Circle"===l.type?r.appendChild(ne({x:d,y:c},"Circle",{width:s.themeStyle.thumbWidth,height:s.themeStyle.thumbHeight},"",new i.PathOption(o+"_ThumpSymbol",u||this.thumbColor,l.border.width,g,1,null),"Thumb")):r.appendChild(e.drawRectangle(new Di(o+"_ThumpSymbol",u||this.thumbColor,{width:l.border.width,color:g},1,{x:d-s.themeStyle.thumbWidth/2,y:c-s.themeStyle.thumbHeight/2,width:s.themeStyle.thumbWidth,height:s.themeStyle.thumbHeight},2,2))),this.thumbVisible&&r.appendChild(e.drawPath(new i.PathOption(o+"_ThumpGrip","transparent",1,u||s.themeStyle.gripColor,1,null,"M "+(d+2)+" "+(c+p)+" L "+(d+2)+" "+(c-p)+" M "+d+" "+(c+p)+" L "+d+" "+(c-p)+" M "+(d-2)+" "+(c+p)+" L "+(d-2)+" "+(c-p)+" ")))},e.prototype.setSlider=function(e,t,i,r){var o=this.control,n=o.bounds.x,a=o.chartSeries.xAxis.actualRange,s=0===o.series.length;isNaN(e)&&isNaN(t)&&(e=0,t=o.bounds.width),t>=e||(e=[t,t=e][0]),e=t>=e?e:[t,t=e][0],e=Math.max(e,a.min),t=Math.min(t,a.max),this.startX=n+it(e,a,o.bounds.width,o.enableRtl),this.endX=n+it(t,a,o.bounds.width,o.enableRtl);var l=o.enableRtl?this.endX:this.startX,h=o.enableRtl?this.startX:this.endX;this.sliderWidth=Math.abs(this.endX-this.startX),this.selectedElement.setAttribute("x",l+""),this.selectedElement.setAttribute("width",this.sliderWidth+""),this.leftUnSelectedElement.setAttribute("width",l-n+""),this.rightUnSelectedElement.setAttribute("x",h+""),this.rightUnSelectedElement.setAttribute("width",o.bounds.width-(h-n)+""),this.leftSlider.setAttribute("transform","translate("+(this.startX-this.thumpPadding)+", 0)"),this.rightSlider.setAttribute("transform","translate("+(this.endX-this.thumpPadding)+", 0)");var c=this.control.svgObject.getBoundingClientRect().left-this.control.element.getBoundingClientRect().left,d=this.control.enableRtl?this.endX:this.startX,p=this.control.enableRtl?this.startX:this.endX;this.leftRect={x:s?c+n:n,y:s?0:o.bounds.y,width:s?d-n:d,height:s?this.thumpY:o.bounds.height},this.rightRect={x:s?c+p:p,y:s?0:o.bounds.y,width:o.bounds.width-(h-n),height:s?this.thumpY:o.bounds.height},this.midRect={x:s?d+c:0,y:s?0:o.bounds.y,width:s?Math.abs(this.endX-this.startX):p,height:s?this.thumpY:o.bounds.height},this.currentStart=e,this.currentEnd=t,r&&(this.control.rangeTooltipModule.renderLeftTooltip(this),this.control.rangeTooltipModule.renderRightTooltip(this)),i&&this.triggerEvent(a)},e.prototype.triggerEvent=function(e){var t=this.control.chartSeries.xAxis,i=t.valueType,r=this.control.enableDeferredUpdate,o=this.control.tooltip.enable;this.isDrag&&this.control.allowSnapping&&(this.isDrag=!1,this.setAllowSnapping(this.control,this.currentStart,this.currentEnd,r,o));var n={cancel:!1,start:"DateTime"===i?new Date(this.currentStart):"Logarithmic"===i?Math.pow(t.logBase,this.currentStart):this.currentStart,end:"DateTime"===i?new Date(this.currentEnd):"Logarithmic"===i?Math.pow(t.logBase,this.currentEnd):this.currentEnd,name:"changed",selectedData:ot(this.points,this.currentStart,this.currentEnd),zoomPosition:(this.control.enableRtl?e.max-this.currentEnd:this.currentStart-e.min)/e.delta,zoomFactor:(this.currentEnd-this.currentStart)/e.delta};this.control.trigger("changed",n)},e.prototype.addEventListener=function(){this.control.isDestroyed||(this.control.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.control.on(t.Browser.touchStartEvent,this.mouseDownHandler,this),this.control.on(t.Browser.touchEndEvent,this.mouseUpHandler,this),this.control.on(t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseCancelHandler,this))},e.prototype.removeEventListener=function(){this.control.isDestroyed||(this.control.off(t.Browser.touchMoveEvent,this.mouseMoveHandler),this.control.off(t.Browser.touchStartEvent,this.mouseDownHandler),this.control.off(t.Browser.touchEndEvent,this.mouseUpHandler),this.control.off(t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseCancelHandler))},e.prototype.mouseMoveHandler=function(e){var t,i,r=this.control,o=r.chartSeries.xAxis.actualRange,n=r.bounds;if(this.getCurrentSlider(e.target.id),this.isDrag&&r.mouseX>=n.x){switch(this.currentSlider){case"Left":r.startValue=this.getRangeValue(Math.abs(r.mouseX-n.x));break;case"Right":r.endValue=this.getRangeValue(Math.abs(r.mouseX-n.x));break;case"Middle":t=Math.max(this.getRangeValue(Math.abs(this.startX-(this.previousMoveX-r.mouseX)-n.x)),o.min),i=Math.min(this.getRangeValue(Math.abs(this.endX-(this.previousMoveX-r.mouseX)-n.x)),o.max),Math.floor(Math.abs(it(i,o,r.bounds.width,r.enableRtl)-it(t,o,r.bounds.width,r.enableRtl)))===Math.floor(this.sliderWidth)&&(r.startValue=t,r.endValue=i)}e.preventDefault&&this.isIOS&&e.preventDefault(),this.setSlider(r.startValue,r.endValue,!r.enableDeferredUpdate,r.rangeTooltipModule&&r.tooltip.enable),this.previousMoveX=r.mouseX}},e.prototype.getRangeValue=function(e){var t=this.control,i=t.chartSeries.xAxis.actualRange;return rt(e,t.bounds.width,i,t.enableRtl)},e.prototype.mouseDownHandler=function(e){this.currentSlider=this.getCurrentSlider(e.target.id),this.selectedElement.setAttribute("style","cursor: -webkit-grabbing"),this.isDrag=!("UnSelectedArea"===this.currentSlider||!this.currentSlider),this.previousMoveX=this.control.mouseDownX},e.prototype.getCurrentSlider=function(e){var t=this.control.themeStyle.thumbHoverColor;return e.indexOf(this.elementId+"_LeftSlider")>-1?(this.leftSlider.childNodes[2].setAttribute("fill",t),"Left"):e.indexOf(this.elementId+"_RightSlider")>-1?(this.rightSlider.childNodes[2].setAttribute("fill",t),"Right"):e.indexOf(this.elementId+"_SelectedArea")>-1?"Middle":e.indexOf("UnSelectedArea")>-1?(this.leftSlider.childNodes[2].setAttribute("fill",this.thumbColor),this.rightSlider.childNodes[2].setAttribute("fill",this.thumbColor),"UnSelectedArea"):e.indexOf(this.elementId+"_AxisLabel_")>-1&&"DateTime"===this.control.valueType?(this.labelIndex=+e.substring(e.lastIndexOf("_")+1,e.length),"firstLevelLabels"):e.indexOf(this.elementId+"_SecondaryLabel")>-1&&"DateTime"===this.control.valueType?(this.labelIndex=+e.substring(e.lastIndexOf("_")+1,e.length),"secondLevelLabels"):(this.leftSlider.childNodes[2].setAttribute("fill",this.thumbColor),this.rightSlider.childNodes[2].setAttribute("fill",this.thumbColor),this.control.periodSelectorModule&&(this.control.periodSelectorModule.triggerChange=!0),null)},e.prototype.mouseUpHandler=function(){var e=this.control,t=e.chartSeries.xAxis.actualRange,i=e.enableDeferredUpdate,r=e.tooltip.enable;if(e.stockChart&&(e.stockChart.zoomChange=!1),"UnSelectedArea"===this.currentSlider){var o=void 0,n=void 0,a=void 0,s=e.enableRtl,l=e.endValue-e.startValue;e.mouseDownX0&&(this.control.periodSelectorModule.triggerChange=!1,this.control.periodSelectorModule.datePicker.startDate=new Date(this.currentStart),this.control.periodSelectorModule.datePicker.endDate=new Date(this.currentEnd)),this.selectedElement.setAttribute("style","cursor: -webkit-grab"),e.startValue=this.currentStart,e.endValue=this.currentEnd,this.isDrag=!1,this.labelIndex=null,this.currentSlider=null},e.prototype.setAllowSnapping=function(e,t,i,r,o){var n=e.rangeAxis.lowerValues;n.push(e.chartSeries.xAxis.actualRange.max),this.setSlider(nt(n,t),nt(n,i),r,o),e.startValue=this.currentStart,e.endValue=this.currentEnd},e.prototype.performAnimation=function(e,i,r,o){var n=this,a=this.currentStart,s=this.currentEnd,l=r.enableDeferredUpdate,h=r.tooltip.enable;new t.Animation({}).animate(t.createElement("div"),{duration:t.isNullOrUndefined(o)?this.control.animationDuration:o,progress:function(t){n.setSlider(q(t.timeStamp,0,e-a,t.duration)+a,q(t.timeStamp,0,i-s,t.duration)+s,!l,h)},end:function(){r.allowSnapping?n.setAllowSnapping(r,e,i,!0,h):n.setSlider(e,i,!0,h),n.control.startValue=n.currentStart,n.control.endValue=n.currentEnd,n.control.periodSelectorSettings.periods.length>0&&(n.control.periodSelectorModule.triggerChange=!1,n.control.periodSelectorModule.datePicker.startDate=new Date(n.currentStart),n.control.periodSelectorModule.datePicker.endDate=new Date(n.currentEnd))}})},e.prototype.mouseCancelHandler=function(){this.isDrag&&this.control.allowSnapping&&this.setAllowSnapping(this.control,this.currentStart,this.currentEnd,!1,this.control.tooltip.enable),this.isDrag=!1,this.currentSlider=null,this.control.startValue=this.currentStart,this.control.endValue=this.currentEnd},e.prototype.destroy=function(){this.removeEventListener()},e}(),ka=function(){function e(e){this.control={},this.rootControl=e}return e.prototype.setControlValues=function(e){"rangeNavigator"===e.getModuleName()?(this.control.periods=this.rootControl.periodSelectorSettings.periods,this.control.seriesXMax=e.chartSeries.xMax,this.control.seriesXMin=e.chartSeries.xMin,this.control.rangeSlider=e.rangeSlider,this.control.rangeNavigatorControl=e,this.control.endValue=e.endValue,this.control.startValue=e.startValue):(this.control.periods=this.rootControl.periods,this.control.endValue=this.control.seriesXMax=e.seriesXMax,this.control.startValue=this.control.seriesXMin=e.seriesXMin,this.control.rangeNavigatorControl=this.rootControl.rangeNavigator,this.control.rangeNavigatorControl&&(this.control.rangeSlider=this.rootControl.rangeNavigator.rangeSlider)),this.control.element=e.element,this.control.disableRangeSelector=e.disableRangeSelector},e.prototype.appendSelector=function(e,t){void 0===t&&(t=0),this.renderSelectorElement(null,e,t),this.renderSelector()},e.prototype.renderSelectorElement=function(e,r,o){this.periodSelectorSize=e?this.periodSelectorSize:new i.Rect(o,this.rootControl.titleSize.height,r.width,r.height);var n,a;e?(n=e.themeStyle.thumbWidth,a=e.element):(n=r.thumbSize,a=r.element),he(a.id+"_Secondary_Element")&&t.remove(he(a.id+"_Secondary_Element")),this.periodSelectorDiv=t.createElement("div",{id:a.id+"_Secondary_Element",styles:"width: "+(this.periodSelectorSize.width-n)+"px;height: "+this.periodSelectorSize.height+"px;top:"+this.periodSelectorSize.y+"px;left:"+(this.periodSelectorSize.x+n/2)+"px; position: absolute"}),a.appendChild(this.periodSelectorDiv)},e.prototype.renderSelector=function(){var e=this;this.setControlValues(this.rootControl);var i=!0,r=this.control.element.id,o=t.createElement("div",{id:r+"_selector"}),s=this.control.periods,l=this.updateCustomElement(),h="text-transform: none; text-overflow: unset",c=r+"customRange";this.periodSelectorDiv.appendChild(o);for(var d=0;d",align:"Right"}));var p={selector:l,name:"RangeSelector",cancel:!1,enableCustomFormat:!0,content:"Date Range"};"stockChart"===this.rootControl.getModuleName()&&(l.push({template:t.createElement("button",{id:r+"_reset",innerHTML:"Reset",styles:h,className:"e-dropdown-btn e-btn"}),align:"Right"}),this.rootControl.exportType.indexOf("Print")>-1&&l.push({template:t.createElement("button",{id:r+"_print",innerHTML:"Print",styles:h,className:"e-dropdown-btn e-btn"}),align:"Right"}),this.rootControl.exportType.length&&l.push({template:t.createElement("button",{id:r+"_export",innerHTML:"Export",styles:h,className:"e-dropdown-btn e-btn"}),align:"Right"})),this.rootControl.trigger("selectorRender",p),this.toolbar=new n.Toolbar({items:p.selector,height:this.periodSelectorSize.height,clicked:function(t){e.buttonClick(t,e.control)},created:function(){e.nodes=e.toolbar.element.querySelectorAll(".e-toolbar-left")[0],t.isNullOrUndefined(e.selectedIndex)&&s.map(function(t,i){t.selected&&(e.control.startValue=e.changedRange(t.intervalType,e.control.endValue,t.interval).getTime(),e.selectedIndex=e.nodes.childNodes.length-s.length+i)}),e.setSelectedStyle(e.selectedIndex)}}),this.toolbar.isStringTemplate=!0,this.toolbar.appendTo(o),this.triggerChange=!0,i&&(this.datePicker=new a.DateRangePicker({min:new Date(this.control.seriesXMin),max:new Date(this.control.seriesXMax),format:"dd'/'MM'/'yyyy",placeholder:"Select a range",showClearButton:!1,startDate:new Date(this.control.startValue),endDate:new Date(this.control.endValue),created:function(){if(p.enableCustomFormat){for(var i=document.getElementsByClassName("e-date-range-wrapper"),o=void 0,n=0;n=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},Ea=function(r){function o(e,t){var i=r.call(this,e,t)||this;return i.animateSeries=!0,i.chartid=57725,i}return _a(o,r),o.prototype.preRender=function(){if(this.isBlazor=window.Blazor,this.unWireEvents(),this.setCulture(),this.allowServerDataBinding=!1,""===this.element.id){var e=document.getElementsByClassName("e-rangenavigator").length;this.element.id="rangenavigator_"+this.chartid+"_"+e}this.wireEvents()},o.prototype.initPrivateVariables=function(){this.doubleModule=new ni,this.labels=[],this.rangeSlider=new Ta(this),this.chartSeries=new xa(this),this.lineSeriesModule=new Vr,this.rangeAxis=new Sa(this)},o.prototype.setCulture=function(){this.intl=new t.Internationalization},o.prototype.setSliderValue=function(){var e="DateTime"===this.valueType,t=this.chartSeries.xAxis.actualRange;this.startValue=this.startValue?this.startValue:this.value[0]?e?new Date(this.value[0].toString()).getTime():+this.value[0]:t.min,this.endValue=this.endValue?this.endValue:this.value[1]?e?new Date(this.value[1].toString()).getTime():+this.value[1]:t.max},o.prototype.render=function(){var e=this,t={name:"load",rangeNavigator:this.isBlazor?{}:this,theme:this.theme};this.trigger("load",t,function(){e.theme=e.isBlazor?t.theme:e.theme,e.setTheme(),e.initPrivateVariables(),e.createRangeSvg(),e.calculateBounds(),e.chartSeries.renderChart(e),m("chartmeasuretext"),e.renderComplete(),e.allowServerDataBinding=!0})},o.prototype.setTheme=function(){this.themeStyle=at(this.theme,this)},o.prototype.createRangeSvg=function(){this.removeSvg(),He(this),this.renderChartBackground()},o.prototype.calculateBounds=function(){var e=this.enableGrouping?15:8,t=this.navigatorStyleSettings.thumb,r=i.measureText("tempString",this.labelStyle).height,o=this.margin,n=!this.series.length,a=!this.disableRangeSelector&&n&&this.tooltip.enable?35:0;this.isBlazor&&!this.periodSelectorModule&&this.periodSelectorSettings.periods.length&&!this.stockChart&&(this.periodSelectorModule=new ka(this));var s=this.periodSelectorModule;this.periodSelectorModule&&this.periodSelectorSettings.periods.length>0&&(s.periodSelectorSize={x:0,y:0,height:0,width:0},s.periodSelectorSize.width=this.availableSize.width,s.periodSelectorSize.height=this.periodSelectorSettings.height,s.periodSelectorSize.y="Bottom"===this.periodSelectorSettings.position?this.availableSize.height-s.periodSelectorSize.height:0);var l="Top"===this.periodSelectorSettings.position&&s?s.periodSelectorSize.y+s.periodSelectorSize.height:0;this.bounds=new i.Rect(this.themeStyle.thumbWidth/2+t.border.width+o.left,o.top+a+l,this.availableSize.width-this.themeStyle.thumbWidth-2*t.border.width-o.left-o.right,this.availableSize.height-o.top-o.bottom-a-(s?s.periodSelectorSize.height:0));var h=("Outside"===this.labelPosition||n?r+e:0)+("Outside"===this.tickPosition||n?this.majorTickLines.height:0);if(this.bounds.height-=h,n){var c=this.enableGrouping?this.bounds.height-(r+e):this.bounds.height;this.bounds.y+=this.themeStyle.thumbHeight>c?(this.themeStyle.thumbHeight-c)/2:0}this.disableRangeSelector&&(this.bounds.y=0,this.bounds.height=this.periodSelectorSettings.periods.length>0?this.periodSelectorSettings.height:0)},o.prototype.renderChart=function(){this.chartSeries.renderSeries(this),this.rangeAxis.renderGridLines(),this.rangeAxis.renderAxisLabels(),this.chartSeries.appendSeriesElements(this),this.createSecondaryElement(),this.setSliderValue(),this.renderPeriodSelector(),this.renderSlider(),this.stockChart||this.element.appendChild(this.svgObject),this.trigger("loaded",{rangeNavigator:this.isBlazor?{}:this}),this.rangeSlider.setSlider(this.startValue,this.endValue,!1,this.tooltip.enable&&"Always"===this.tooltip.displayMode)},o.prototype.renderPeriodSelector=function(){this.periodSelectorModule&&(this.periodSelectorModule.renderSelectorElement(this),this.periodSelectorModule.renderSelector())},o.prototype.createSecondaryElement=function(){if(this.tooltip.enable){var e=this.createElement("div");e.id=this.element.id+"_Secondary_Element",e.setAttribute("style","position: relative"),this.element.appendChild(e)}},o.prototype.renderSlider=function(){this.rangeSlider.render(this),this.rangeSlider.setSlider(this.startValue,this.endValue,!0,this.tooltip.enable&&"Always"===this.tooltip.displayMode)},o.prototype.removeSvg=function(){he(this.element.id+"_Secondary_Element")&&(t.remove(he(this.element.id+"_Secondary_Element")),this.isReact&&this.clearTemplate());if(this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);this.svgObject.hasChildNodes()||!this.svgObject.parentNode||this.stockChart||t.remove(this.svgObject)}},o.prototype.unWireEvents=function(){var e=t.Browser.touchStartEvent,i=t.Browser.touchMoveEvent,r=t.Browser.touchEndEvent,o=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,e,this.rangeOnMouseDown),t.EventHandler.remove(this.element,i,this.mouseMove),t.EventHandler.remove(this.element,r,this.mouseEnd),t.EventHandler.remove(this.element,"click",this.rangeOnMouseClick),t.EventHandler.remove(this.element,o,this.mouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.rangeResize)},o.prototype.wireEvents=function(){var e=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.rangeOnMouseDown,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMove,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEnd,this),t.EventHandler.add(this.element,"click",this.rangeOnMouseClick,this),t.EventHandler.add(this.element,e,this.mouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.rangeResize.bind(this));var i=this.element;i.style.touchAction="none",i.style.msTouchAction="none",i.style.msContentZooming="none",i.style.msUserSelect="none",i.style.webkitUserSelect="none",i.style.position="relative",i.style.display="block"},o.prototype.rangeResize=function(){var e=this;if(!document.getElementById(this.element.id))return!1;this.animateSeries=!1,this.removeAllTooltip(),this.resizeTo&&clearTimeout(this.resizeTo);var t={rangeNavigator:this,name:"resized",currentSize:new i.Size(0,0),previousSize:new i.Size(this.availableSize.width,this.availableSize.height)};return this.resizeTo=+setTimeout(function(){if(e.isDestroyed)return void clearTimeout(e.resizeTo);e.createRangeSvg(),t.currentSize=e.availableSize,e.trigger("resized",t),e.calculateBounds(),e.chartSeries.renderChart(e)},500),!1},o.prototype.removeAllTooltip=function(){this.tooltip.enable&&"Always"===this.tooltip.displayMode&&(he(this.element.id+"_leftTooltip")&&t.remove(he(this.element.id+"_leftTooltip")),he(this.element.id+"_rightTooltip")&&t.remove(he(this.element.id+"_rightTooltip")))},o.prototype.mouseMove=function(e){return he(this.stockChart?this.element.id:this.element.id+"_svg")&&(this.mouseX=this.setMouseX(e),this.notify(t.Browser.touchMoveEvent,e)),!1},o.prototype.mouseLeave=function(e){var i=this.rangeSlider;i.isDrag&&i.triggerEvent(this.chartSeries.xAxis.actualRange);var r=t.Browser.isPointer?"pointerleave":"mouseleave";return this.mouseX=this.setMouseX(e),this.notify(r,e),!1},o.prototype.rangeOnMouseClick=function(e){return this.notify("click",e),!1},o.prototype.print=function(e){new xr(this).print(e)},o.prototype.export=function(e,t,i,r,o,n,a){r=r||[this],new xr(this).export(e,t,i,r,o,n,a)},o.prototype.renderChartBackground=function(){var e=new Di(this.element.id+"_ChartBorder",this.themeStyle.background,{width:0,color:"transparent"},1,new i.Rect(0,0,this.availableSize.width,this.availableSize.height));this.svgObject.appendChild(this.renderer.drawRectangle(e))},o.prototype.rangeOnMouseDown=function(e){return this.mouseDownX=this.setMouseX(e),this.notify(t.Browser.touchStartEvent,e),!1},o.prototype.mouseEnd=function(e){return this.mouseX=this.setMouseX(e),this.notify(t.Browser.touchEndEvent,e),!1},o.prototype.setMouseX=function(e){var t=e.type.indexOf("touch")>-1?e.changedTouches[0].clientX:e.clientX,i=this.element.getBoundingClientRect(),r=this.stockChart?he(this.element.id).getBoundingClientRect():he(this.element.id+"_svg").getBoundingClientRect();return t-i.left-Math.max(r.left-i.left,0)},o.prototype.getPersistData=function(){var e=["loaded"];return this.addOnPersist(e)},o.prototype.onPropertyChanged=function(e,t){var i=!1,o=!1,n=!1;this.animateSeries=!1;for(var a=0,s=Object.keys(e);a0&&t.push({member:"PeriodSelector",args:[this]}),"Double"!==this.valueType&&t.push({member:this.valueType,args:[this]}),this.tooltip.enable&&t.push({member:"RangeTooltip",args:[this]}),t},o.prototype.getModuleName=function(){return"rangeNavigator"},o.prototype.destroy=function(){this.unWireEvents(),this.isReact&&this.clearTemplate(),this.rangeSlider.destroy(),r.prototype.destroy.call(this),this.element.innerHTML="",this.element.classList.remove("e-rangenavigator")},Oa([t.Property(null)],o.prototype,"width",void 0),Oa([t.Property(null)],o.prototype,"height",void 0),Oa([t.Property(null)],o.prototype,"dataSource",void 0),Oa([t.Property(null)],o.prototype,"xName",void 0),Oa([t.Property(null)],o.prototype,"yName",void 0),Oa([t.Property()],o.prototype,"query",void 0),Oa([t.Collection([],La)],o.prototype,"series",void 0),Oa([t.Complex({},Aa)],o.prototype,"tooltip",void 0),Oa([t.Property(null)],o.prototype,"minimum",void 0),Oa([t.Property(null)],o.prototype,"maximum",void 0),Oa([t.Property(null)],o.prototype,"interval",void 0),Oa([t.Property("Auto")],o.prototype,"intervalType",void 0),Oa([t.Property("Hide")],o.prototype,"labelIntersectAction",void 0),Oa([t.Property(10)],o.prototype,"logBase",void 0),Oa([t.Property("Double")],o.prototype,"valueType",void 0),Oa([t.Property("Outside")],o.prototype,"labelPosition",void 0),Oa([t.Property(500)],o.prototype,"animationDuration",void 0),Oa([t.Property(!1)],o.prototype,"enableGrouping",void 0),Oa([t.Property(!1)],o.prototype,"enableDeferredUpdate",void 0),Oa([t.Property(!1)],o.prototype,"disableRangeSelector",void 0),Oa([t.Property(!1)],o.prototype,"allowSnapping",void 0),Oa([t.Property(!1)],o.prototype,"allowIntervalData",void 0),Oa([t.Property(!1)],o.prototype,"useGroupingSeparator",void 0),Oa([t.Property()],o.prototype,"groupBy",void 0),Oa([t.Property("Outside")],o.prototype,"tickPosition",void 0),Oa([t.Complex(e.RangeNavigatorTheme.axisLabelFont,Xt)],o.prototype,"labelStyle",void 0),Oa([t.Complex({},Ci)],o.prototype,"majorGridLines",void 0),Oa([t.Complex({},Ri)],o.prototype,"majorTickLines",void 0),Oa([t.Complex({},Ma)],o.prototype,"navigatorStyleSettings",void 0),Oa([t.Complex({},ri)],o.prototype,"periodSelectorSettings",void 0),Oa([t.Complex({color:"#DDDDDD",width:1},Yt)],o.prototype,"navigatorBorder",void 0),Oa([t.Property("Material")],o.prototype,"theme",void 0),Oa([t.Property([])],o.prototype,"value",void 0),Oa([t.Property("")],o.prototype,"labelFormat",void 0),Oa([t.Property("")],o.prototype,"skeleton",void 0),Oa([t.Property("DateTime")],o.prototype,"skeletonType",void 0),Oa([t.Property("Middle")],o.prototype,"secondaryLabelAlignment",void 0),Oa([t.Complex({top:5,bottom:5,right:5,left:5},Ut)],o.prototype,"margin",void 0),Oa([t.Event()],o.prototype,"load",void 0),Oa([t.Event()],o.prototype,"loaded",void 0),Oa([t.Event()],o.prototype,"resized",void 0),Oa([t.Event()],o.prototype,"labelRender",void 0),Oa([t.Event()],o.prototype,"changed",void 0),Oa([t.Event()],o.prototype,"tooltipRender",void 0),Oa([t.Event()],o.prototype,"selectorRender",void 0),Oa([t.Event()],o.prototype,"beforePrint",void 0),o=Oa([t.NotifyPropertyChanges],o)}(t.Component),za=function(){function e(e){this.stockChart=e}return e.prototype.initializeChart=function(e){var i=this,r=this.stockChart;if(r.isProtectedOnChange=!0,r.chartObject){for(var o=document.getElementById(r.chartObject.id);o.firstChild;)o.removeChild(o.firstChild);he(r.chartObject+"_tooltip")&&t.remove(he(r.chartObject+"_tooltip"))}else r.chartObject=r.renderer.createGroup({id:r.element.id+"_stockChart_chart"}),r.mainObject.appendChild(r.chartObject);if(this.cartesianChartSize=this.calculateChartSize(),r.chart=new Rr({chartArea:r.chartArea,margin:this.findMargin(r),primaryXAxis:this.copyObject(r.primaryXAxis),primaryYAxis:this.copyObject(r.primaryYAxis),rows:r.rows,indicators:r.indicators,axes:r.axes,tooltipRender:function(e){i.stockChart.trigger("tooltipRender",e)},axisLabelRender:function(e){i.stockChart.trigger("axisLabelRender",e)},seriesRender:function(t){t.data&&i.stockChart.startValue&&i.stockChart.endValue&&(t.data=t.data.filter(function(e){return new Date(Date.parse(e[t.series.xName])).getTime()>=i.stockChart.startValue&&new Date(Date.parse(e[t.series.xName])).getTime()<=i.stockChart.endValue})),t.data=e||t.data,i.stockChart.trigger("seriesRender",t)},onZooming:function(e){i.stockChart.trigger(hi,e)},pointClick:function(e){i.stockChart.trigger("pointClick",e)},pointMove:function(e){i.stockChart.trigger("pointMove",e)},dataSource:r.dataSource,series:this.findSeriesCollection(r.series),zoomSettings:this.copyObject(r.zoomSettings),tooltip:r.tooltip,crosshair:r.crosshair,height:this.cartesianChartSize.height.toString(),selectedDataIndexes:r.selectedDataIndexes,selectionMode:r.selectionMode,isMultiSelect:r.isMultiSelect,annotations:r.annotations,theme:r.theme,legendSettings:{visible:!1},zoomComplete:function(e){if("DateTime"===e.axis.valueType&&r.rangeNavigator){i.stockChart.zoomChange=!0;var t=i.calculateUpdatedRange(e.currentZoomFactor,e.currentZoomPosition,e.axis);r.rangeSelector.sliderChange(t.start,t.end)}}}),0!==r.indicators.length){if(r.isSelect)for(var n=0;n-1?"Candle":e.indexOf("OHLC")>-1?"HiloOpenClose":e,t[i].enableSolidCandles="Candle"===e;for(var r=0;r2&&e.stockChart.rows.splice(2,e.stockChart.rows.length-1),e.stockChart.axes.length>2&&(e.stockChart.axes.splice(1,e.stockChart.axes.length-1),e.stockChart.axes[0].rowIndex=1));for(var i=0;i=0?t.item.text.substr(t.item.text.indexOf(";")+1):t.item.text;var r=t.item.text.replace("   ",""),o=r=(r=r.split(" ")[0].toLocaleLowerCase()+(r.split(" ")[1]?r.split(" ")[1]:"")).substr(0,1).toUpperCase()+r.substr(1);if(e.selectedIndicator=-1===e.selectedIndicator.indexOf(o)?e.selectedIndicator+" "+o:e.selectedIndicator.replace(o,""),"Tma"===o||"BollingerBands"===o||"Sma"===o||"Ema"===o)if(-1===e.indicators.indexOf(o)){t.item.text="✔ "+t.item.text.replace("   ","");var n=e.getIndicator(o,e.stockChart.series[0].yAxisName);e.indicators.push(o),e.stockChart.indicators=e.stockChart.indicators.concat(n),e.stockChart.cartesianChart.initializeChart()}else{t.item.text="   "+t.item.text;for(var a=0;as&&(this.stockChart.axes[l].rowIndex=this.stockChart.axes[l].rowIndex-1);this.stockChart.cartesianChart.initializeChart()}},e.prototype.tickMark=function(e){for(var t,i=e.item.parentObj.items,r=0;r=0?i[r].text.substr(i[r].text.indexOf(";")+1):i[r].text,i[r].text.indexOf("   ")>=0||(i[r].text="   "+i[r].text);return e.item.text.indexOf("   ")>=0?(t=e.item.text.replace("   ",""),e.item.text=e.item.text.replace("   ","✔ ")):t=e.item.text.replace("✔ ",""),t},e.prototype.printButton=function(){var e=this;this.stockChart.exportType.indexOf("Print")>-1&&((new l.Button).appendTo("#"+this.stockChart.element.id+"_print"),document.getElementById(this.stockChart.element.id+"_print").onclick=function(){e.stockChart.chart.print(e.stockChart.element.id)})},e.prototype.exportButton=function(){var e=this;new s.DropDownButton({items:this.getDropDownItems(this.stockChart.exportType),select:function(i){var r,o=i.item.text,n=e.stockChart,a=n.element.id+"_stockChart_",s=n.svgObject.getBoundingClientRect();n.chart.exportModule&&(e.stockChart.svgObject.insertAdjacentElement("afterbegin",e.addExportSettings()),r=n.svgObject.firstElementChild.getBoundingClientRect(),e.stockChart.svgObject.setAttribute("height",(s.height+r.height).toString()),he(a+"chart").style.transform="translateY("+r.height+"px)",n.enableSelector&&he(a+"rangeSelector").setAttribute("transform","translate(0,"+(n.cartesianChart.cartesianChartSize.height+r.height)+")"),n.chart.exportModule.export(o,"StockChart",null,[n],null,n.svgObject.clientHeight),t.remove(he(e.stockChart.element.id+"_additionalExport")),he(a+"chart").style.transform="translateY(0px)",n.enableSelector&&he(a+"rangeSelector").setAttribute("transform","translate(0,"+n.cartesianChart.cartesianChartSize.height+")"),e.stockChart.svgObject.setAttribute("height",s.height.toString()))}}).appendTo("#"+this.stockChart.element.id+"_export")},e.prototype.calculateAutoPeriods=function(){var e=[];return(e=this.findRange(this.stockChart.seriesXMin,this.stockChart.seriesXMax)).push({text:"YTD",selected:!0},{text:"All"}),e},e.prototype.findRange=function(e,t){var i=[];return(t-e)/3154e7>=1?i.push({text:"1M",interval:1,intervalType:"Months"},{text:"3M",interval:3,intervalType:"Months"},{text:"6M",interval:6,intervalType:"Months"},{text:"1Y",interval:1,intervalType:"Years"}):(t-e)/1577e7>=1?i.push({text:"1M",interval:1,intervalType:"Months"},{text:"3M",interval:3,intervalType:"Months"},{text:"6M",interval:6,intervalType:"Months"}):(t-e)/2628e6>=1?i.push({text:"1D",interval:1,intervalType:"Days"},{text:"3W",interval:3,intervalType:"Weeks"},{text:"1M",interval:1,intervalType:"Months"}):(t-e)/864e5>=1&&i.push({text:"1H",interval:1,intervalType:"Hours"},{text:"12H",interval:12,intervalType:"Hours"},{text:"1D",interval:1,intervalType:"Days"}),i},e.prototype.addExportSettings=function(){var e=this.stockChart.renderer.createGroup({id:this.stockChart.element.id+"_additionalExport",width:this.stockChart.availableSize.width}),t=i.measureText(this.stockChart.title,this.stockChart.titleStyle).height,r=new i.TextOption(e.id+"_Title",Ye(new i.Rect(0,0,this.stockChart.availableSize.width,0),this.stockChart.titleStyle),0,"middle",this.stockChart.title,"","text-before-edge");Ve(this.stockChart.renderer,r,this.stockChart.titleStyle,this.stockChart.titleStyle.color,e);var o={size:"15px",fontWeight:"500",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},n=i.measureText("Series: "+this.selectedSeries,o).width/2,a=t;return this.textElementSpan(new i.TextOption(e.id+"_Series",n,a,"start",["Series : ",this.selectedSeries],"","text-before-edge"),o,"black",e),n+=i.measureText("Series: "+this.selectedSeries+" Z",o).width,""!==this.selectedIndicator&&(this.textElementSpan(new i.TextOption(e.id+"_Indicator",n,a,"start",["Indicator :",this.selectedIndicator],"","text-before-edge"),o,"black",e),n+=i.measureText("Indicator: "+this.selectedIndicator+" Z",o).width),""!==this.selectedTrendLine&&this.textElementSpan(new i.TextOption(e.id+"_TrendLine",n,a,"start",["Trendline :",this.selectedTrendLine],"","text-before-edge"),o,"black",e),e},e.prototype.textElementSpan=function(e,t,r,o,n,a,s,l,h){void 0===n&&(n=!1),void 0===l&&(l=!1);var c,d=new i.SvgRenderer(""),p={};p={id:e.id,"font-style":t.fontStyle,"font-family":t.fontFamily,"font-weight":t.fontWeight,"text-anchor":e.anchor,x:e.x,y:e.y,fill:r,"font-size":t.size,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine};var u="string"==typeof e.text?e.text:n?e.text[e.text.length-1]:e.text[0],g=d.createText(p,u);if("string"!=typeof e.text&&e.text.length>1)for(var y=1,m=e.text.length;y=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},Fa=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property("")],i.prototype,"color",void 0),Na([t.Property("16px")],i.prototype,"size",void 0),Na([t.Property("Segoe UI")],i.prototype,"fontFamily",void 0),Na([t.Property("Normal")],i.prototype,"fontStyle",void 0),Na([t.Property("Normal")],i.prototype,"fontWeight",void 0),Na([t.Property(1)],i.prototype,"opacity",void 0),Na([t.Property("Trim")],i.prototype,"textOverflow",void 0),Na([t.Property("Center")],i.prototype,"textAlignment",void 0),i}(t.ChildProperty),Va=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property("")],i.prototype,"color",void 0),Na([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),ja=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Complex({},Va)],i.prototype,"border",void 0),Na([t.Property("transparent")],i.prototype,"background",void 0),Na([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),Ha=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property(10)],i.prototype,"left",void 0),Na([t.Property(10)],i.prototype,"right",void 0),Na([t.Property(10)],i.prototype,"top",void 0),Na([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),Xa=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return Ba(r,i),Na([t.Property(!1)],r.prototype,"startFromAxis",void 0),Na([t.Property(!0)],r.prototype,"visible",void 0),Na([t.Property(null)],r.prototype,"start",void 0),Na([t.Property("#808080")],r.prototype,"color",void 0),Na([t.Property(null)],r.prototype,"end",void 0),Na([t.Property(null)],r.prototype,"size",void 0),Na([t.Property("Auto")],r.prototype,"sizeType",void 0),Na([t.Property(null)],r.prototype,"dashArray",void 0),Na([t.Property(!1)],r.prototype,"isRepeat",void 0),Na([t.Property(null)],r.prototype,"repeatEvery",void 0),Na([t.Property(!1)],r.prototype,"isSegmented",void 0),Na([t.Property(null)],r.prototype,"repeatUntil",void 0),Na([t.Property(null)],r.prototype,"segmentStart",void 0),Na([t.Property(null)],r.prototype,"segmentAxisName",void 0),Na([t.Property(null)],r.prototype,"segmentEnd",void 0),Na([t.Property(1)],r.prototype,"opacity",void 0),Na([t.Property("")],r.prototype,"text",void 0),Na([t.Complex({color:"transparent",width:1},Va)],r.prototype,"border",void 0),Na([t.Property(null)],r.prototype,"rotation",void 0),Na([t.Property("Behind")],r.prototype,"zIndex",void 0),Na([t.Property("Middle")],r.prototype,"horizontalAlignment",void 0),Na([t.Property("Middle")],r.prototype,"verticalAlignment",void 0),Na([t.Complex(e.Theme.stripLineLabelFont,Fa)],r.prototype,"textStyle",void 0),r}(t.ChildProperty),Ya=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property(0)],i.prototype,"delay",void 0),Na([t.Property(!1)],i.prototype,"enable",void 0),Na([t.Property(1e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),Ga=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property(null)],i.prototype,"fill",void 0),Na([t.Property("Gap")],i.prototype,"mode",void 0),Na([t.Complex({color:"transparent",width:0},Va)],i.prototype,"border",void 0),i}(t.ChildProperty),Wa=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property("Line")],i.prototype,"type",void 0),Na([t.Property(null)],i.prototype,"length",void 0),Na([t.Property(null)],i.prototype,"color",void 0),Na([t.Property("")],i.prototype,"dashArray",void 0),Na([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Ua=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.localData=void 0,t}return Ba(i,e),Na([t.Property("date")],i.prototype,"xName",void 0),Na([t.Property("close")],i.prototype,"yName",void 0),Na([t.Property("open")],i.prototype,"open",void 0),Na([t.Property("close")],i.prototype,"close",void 0),Na([t.Property("high")],i.prototype,"high",void 0),Na([t.Property("low")],i.prototype,"low",void 0),Na([t.Property("volume")],i.prototype,"volume",void 0),Na([t.Property("")],i.prototype,"pointColorMapping",void 0),Na([t.Complex(null,Ya)],i.prototype,"animation",void 0),Na([t.Property(null)],i.prototype,"xAxisName",void 0),Na([t.Property(null)],i.prototype,"yAxisName",void 0),Na([t.Property(null)],i.prototype,"fill",void 0),Na([t.Property("0")],i.prototype,"dashArray",void 0),Na([t.Property(1)],i.prototype,"width",void 0),Na([t.Property("")],i.prototype,"name",void 0),Na([t.Property("")],i.prototype,"dataSource",void 0),Na([t.Property()],i.prototype,"query",void 0),Na([t.Property("#e74c3d")],i.prototype,"bullFillColor",void 0),Na([t.Property("#2ecd71")],i.prototype,"bearFillColor",void 0),Na([t.Property(!1)],i.prototype,"enableSolidCandles",void 0),Na([t.Property(!0)],i.prototype,"visible",void 0),Na([t.Complex({color:"transparent",width:0},Va)],i.prototype,"border",void 0),Na([t.Property(1)],i.prototype,"opacity",void 0),Na([t.Property("Candle")],i.prototype,"type",void 0),Na([t.Complex(null,Ji)],i.prototype,"marker",void 0),Na([t.Collection([],er)],i.prototype,"trendlines",void 0),Na([t.Property(!0)],i.prototype,"enableTooltip",void 0),Na([t.Property("")],i.prototype,"tooltipMappingName",void 0),Na([t.Property(null)],i.prototype,"selectionStyle",void 0),Na([t.Property(.5)],i.prototype,"cardinalSplineTension",void 0),Na([t.Complex(null,$t)],i.prototype,"cornerRadius",void 0),Na([t.Complex(null,Ga)],i.prototype,"emptyPointSettings",void 0),Na([t.Property(null)],i.prototype,"columnWidth",void 0),Na([t.Property(0)],i.prototype,"columnSpacing",void 0),i}(t.ChildProperty),Za=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property("Sma")],i.prototype,"type",void 0),Na([t.Property(14)],i.prototype,"period",void 0),Na([t.Property(3)],i.prototype,"dPeriod",void 0),Na([t.Property(14)],i.prototype,"kPeriod",void 0),Na([t.Property(80)],i.prototype,"overBought",void 0),Na([t.Property(20)],i.prototype,"overSold",void 0),Na([t.Property("Close")],i.prototype,"field",void 0),Na([t.Property(2)],i.prototype,"standardDeviation",void 0),Na([t.Property(12)],i.prototype,"slowPeriod",void 0),Na([t.Property(!0)],i.prototype,"showZones",void 0),Na([t.Property(26)],i.prototype,"fastPeriod",void 0),Na([t.Complex({color:"#ff9933",width:2},Wa)],i.prototype,"macdLine",void 0),Na([t.Property("Both")],i.prototype,"macdType",void 0),Na([t.Property("#e74c3d")],i.prototype,"macdNegativeColor",void 0),Na([t.Property("#2ecd71")],i.prototype,"macdPositiveColor",void 0),Na([t.Property("rgba(211,211,211,0.25)")],i.prototype,"bandColor",void 0),Na([t.Complex({color:"#ffb735",width:1},Wa)],i.prototype,"upperLine",void 0),Na([t.Property("")],i.prototype,"seriesName",void 0),Na([t.Complex({color:"#f2ec2f",width:1},Wa)],i.prototype,"periodLine",void 0),Na([t.Complex({color:"#f2ec2f",width:1},Wa)],i.prototype,"lowerLine",void 0),Na([t.Property("")],i.prototype,"high",void 0),Na([t.Property("")],i.prototype,"open",void 0),Na([t.Property("")],i.prototype,"low",void 0),Na([t.Property("")],i.prototype,"xName",void 0),Na([t.Property("")],i.prototype,"close",void 0),Na([t.Property("")],i.prototype,"pointColorMapping",void 0),Na([t.Property("")],i.prototype,"volume",void 0),Na([t.Property(null)],i.prototype,"xAxisName",void 0),Na([t.Property(null)],i.prototype,"yAxisName",void 0),Na([t.Complex(null,Ya)],i.prototype,"animation",void 0),Na([t.Property(null)],i.prototype,"fill",void 0),Na([t.Property("0")],i.prototype,"dashArray",void 0),Na([t.Property(1)],i.prototype,"width",void 0),Na([t.Property()],i.prototype,"query",void 0),Na([t.Property("")],i.prototype,"dataSource",void 0),i}(t.ChildProperty),qa=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return Ba(r,i),Na([t.Complex({},Ai)],r.prototype,"crosshairTooltip",void 0),Na([t.Complex(e.Theme.axisLabelFont,Fa)],r.prototype,"labelStyle",void 0),Na([t.Property("")],r.prototype,"title",void 0),Na([t.Complex(e.Theme.axisTitleFont,Fa)],r.prototype,"titleStyle",void 0),Na([t.Property("")],r.prototype,"labelFormat",void 0),Na([t.Property("DateTime")],r.prototype,"skeletonType",void 0),Na([t.Property("")],r.prototype,"skeleton",void 0),Na([t.Property(0)],r.prototype,"plotOffset",void 0),Na([t.Property(10)],r.prototype,"logBase",void 0),Na([t.Property(0)],r.prototype,"rowIndex",void 0),Na([t.Property(1)],r.prototype,"span",void 0),Na([t.Property(3)],r.prototype,"maximumLabels",void 0),Na([t.Property(null)],r.prototype,"desiredIntervals",void 0),Na([t.Property(1)],r.prototype,"zoomFactor",void 0),Na([t.Property(0)],r.prototype,"zoomPosition",void 0),Na([t.Property(!1)],r.prototype,"opposedPosition",void 0),Na([t.Property(!0)],r.prototype,"enableAutoIntervalOnZooming",void 0),Na([t.Property("Double")],r.prototype,"valueType",void 0),Na([t.Property("Auto")],r.prototype,"rangePadding",void 0),Na([t.Property("None")],r.prototype,"edgeLabelPlacement",void 0),Na([t.Property("BetweenTicks")],r.prototype,"labelPlacement",void 0),Na([t.Property("Auto")],r.prototype,"intervalType",void 0),Na([t.Property("Outside")],r.prototype,"tickPosition",void 0),Na([t.Property("")],r.prototype,"name",void 0),Na([t.Property("Outside")],r.prototype,"labelPosition",void 0),Na([t.Property(!0)],r.prototype,"visible",void 0),Na([t.Property(0)],r.prototype,"labelRotation",void 0),Na([t.Property(0)],r.prototype,"minorTicksPerInterval",void 0),Na([t.Property(null)],r.prototype,"crossesAt",void 0),Na([t.Property(null)],r.prototype,"crossesInAxis",void 0),Na([t.Property(!0)],r.prototype,"placeNextToAxisLine",void 0),Na([t.Property(null)],r.prototype,"minimum",void 0),Na([t.Property(null)],r.prototype,"interval",void 0),Na([t.Property(null)],r.prototype,"maximum",void 0),Na([t.Property(34)],r.prototype,"maximumLabelWidth",void 0),Na([t.Complex({},Ri)],r.prototype,"majorTickLines",void 0),Na([t.Property(!1)],r.prototype,"enableTrim",void 0),Na([t.Complex({},Mi)],r.prototype,"minorTickLines",void 0),Na([t.Complex({},Pi)],r.prototype,"minorGridLines",void 0),Na([t.Complex({},Ci)],r.prototype,"majorGridLines",void 0),Na([t.Complex({},Li)],r.prototype,"lineStyle",void 0),Na([t.Property(!1)],r.prototype,"isInversed",void 0),Na([t.Property("Trim")],r.prototype,"labelIntersectAction",void 0),Na([t.Property(100)],r.prototype,"coefficient",void 0),Na([t.Property(0)],r.prototype,"startAngle",void 0),Na([t.Property(2)],r.prototype,"tabIndex",void 0),Na([t.Collection([],Xa)],r.prototype,"stripLines",void 0),Na([t.Property(null)],r.prototype,"description",void 0),r}(t.ChildProperty),Qa=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property("100%")],i.prototype,"height",void 0),Na([t.Complex({},Va)],i.prototype,"border",void 0),i}(t.ChildProperty),$a=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property(2)],i.prototype,"period",void 0),Na([t.Property("")],i.prototype,"name",void 0),Na([t.Property("Linear")],i.prototype,"type",void 0),Na([t.Property(2)],i.prototype,"polynomialOrder",void 0),Na([t.Property(0)],i.prototype,"forwardForecast",void 0),Na([t.Property(0)],i.prototype,"backwardForecast",void 0),Na([t.Complex({},Ya)],i.prototype,"animation",void 0),Na([t.Property(!0)],i.prototype,"enableTooltip",void 0),Na([t.Complex({},Ji)],i.prototype,"marker",void 0),Na([t.Property(null)],i.prototype,"intercept",void 0),Na([t.Property("")],i.prototype,"fill",void 0),Na([t.Property("SeriesType")],i.prototype,"legendShape",void 0),Na([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Ja=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property("0")],i.prototype,"y",void 0),Na([t.Property("0")],i.prototype,"x",void 0),Na([t.Property(null)],i.prototype,"content",void 0),Na([t.Property("Chart")],i.prototype,"region",void 0),Na([t.Property("Center")],i.prototype,"horizontalAlignment",void 0),Na([t.Property("Pixel")],i.prototype,"coordinateUnits",void 0),Na([t.Property("Middle")],i.prototype,"verticalAlignment",void 0),Na([t.Property(null)],i.prototype,"yAxisName",void 0),Na([t.Property(null)],i.prototype,"description",void 0),Na([t.Property(null)],i.prototype,"xAxisName",void 0),i}(t.ChildProperty),Ka=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property(0)],i.prototype,"point",void 0),Na([t.Property(0)],i.prototype,"series",void 0),i}(t.ChildProperty),es=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return Ba(r,i),Na([t.Property("Circle")],r.prototype,"type",void 0),Na([t.Property("")],r.prototype,"text",void 0),Na([t.Property("")],r.prototype,"description",void 0),Na([t.Property()],r.prototype,"date",void 0),Na([t.Complex({color:"black",width:1},Va)],r.prototype,"border",void 0),Na([t.Property("transparent")],r.prototype,"background",void 0),Na([t.Property(!0)],r.prototype,"showOnSeries",void 0),Na([t.Property("close")],r.prototype,"placeAt",void 0),Na([t.Complex(e.Theme.stockEventFont,Fa)],r.prototype,"textStyle",void 0),Na([t.Property([])],r.prototype,"seriesIndexes",void 0),r}(t.ChildProperty),ts=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),is=function(e){function o(t){var i=e.call(this,t.chart)||this;return i.symbolLocations=[],i.stockChart=t,i.chartId=i.stockChart.element.id,i}return ts(o,e),o.prototype.renderStockEvents=function(){var e,t,r,o=this.stockChart,n=o.renderer.createGroup({id:this.chartId+"_StockEvents"});this.symbolLocations=st(o.series.length,o.stockEvents.length,new Vi(0,0));for(var a=0;a0)for(var d=0;de.points[s-1].xValue&&a20?a.width:20,a.height>20?a.height:20),c=n.x,d=n.y,p=this.chartId+"_Series_"+r.index+"_StockEvents_"+o,u=t.border;switch(t.type){case"Flag":case"Circle":case"Square":e.appendChild(ne(new Vi(c,d),"Circle",new i.Size(2,2),"",new i.PathOption(p+"_Circle","transparent",u.width,u.color),this.dateParse(t.date).toISOString())),e.appendChild(ne(new Vi(c,d-5),"VerticalLine",new i.Size(9,9),"",new i.PathOption(p+"_Path",u.color,u.width,u.color),this.dateParse(t.date).toISOString())),e.appendChild(ne(new Vi("Flag"!==t.type?c:c+h.width/2,d-h.height),t.type,h,"",new i.PathOption(p+"_Shape",t.background,u.width,u.color),this.dateParse(t.date).toISOString())),Ve(this.stockChart.renderer,new i.TextOption(p+"_Text","Flag"!==t.type?n.x:n.x+h.width/2,n.y-h.height,"middle",t.text,"","middle"),t.textStyle,t.textStyle.color,e);break;case"ArrowUp":case"ArrowDown":case"ArrowRight":case"ArrowLeft":s="M "+c+" "+d+" "+this.findArrowpaths(t.type),l=new i.PathOption(p+"_Shape",t.background,u.width,u.color,1,"",s),e.appendChild(this.stockChart.renderer.drawPath(l));break;case"Triangle":case"InvertedTriangle":h.height=3*a.height,h.width=a.width+1.5*a.width,e.appendChild(ne(new Vi(n.x,n.y),t.type,new i.Size(20,20),"",new i.PathOption(p+"_Shape",t.background,u.width,u.color),this.dateParse(t.date).toISOString())),Ve(this.stockChart.renderer,new i.TextOption(p+"_Text",n.x,n.y,"middle",t.text,"","middle"),t.textStyle,t.textStyle.color,e);break;case"Text":a.height+=8,s="M "+c+" "+d+" L "+(c-5)+" "+(d-5)+" L "+(c-a.width/2)+" "+(d-5)+" L "+(c-a.width/2)+" "+(d-a.height)+" L "+(c+a.width/2)+" "+(d-a.height)+" L "+(c+a.width/2)+" "+(d-5)+" L "+(c+5)+" "+(d-5)+" Z",l=new i.PathOption(p+"_Shape",t.background,u.width,u.color,1,"",s),e.appendChild(this.stockChart.renderer.drawPath(l)),Ve(this.stockChart.renderer,new i.TextOption(p+"_Text",c,d-a.height/2,"middle",t.text,"","middle"),t.textStyle,t.textStyle.color,e);break;default:s="M "+c+" "+d+" L "+(c-a.width/2)+" "+(d-a.height/3)+" L "+(c-a.width/2)+" "+(d-a.height)+" L "+(c+a.width/2)+" "+(d-a.height)+" L "+(c+a.width/2)+" "+(d-a.height/3)+" Z",l=new i.PathOption(p+"_Shape",t.background,u.width,u.color,1,"",s),e.appendChild(this.stockChart.renderer.drawPath(l)),Ve(this.stockChart.renderer,new i.TextOption(p+"_Text",c,d-a.height/2,"middle",t.text,"","middle"),t.textStyle,t.textStyle.color,e)}},o.prototype.renderStockEventTooltip=function(e){var r=parseInt(e.split("_StockEvents_")[0].split(this.chartId+"_Series_")[1],10),o=parseInt(e.split("_StockEvents_")[1].replace(/\D+/g,""),10),n=this.symbolLocations[r][o],a=new Vi(n.x,n.y+this.stockChart.toolbarHeight+this.stockChart.titleSize.height);this.applyHighLights(o,r);var s=this.getElement(this.chartId+"_StockEvents_Tooltip_svg");if(s&&parseInt(s.getAttribute("opacity"),10)>0)this.stockEventTooltip.content=[this.stockChart.stockEvents[o].description],this.stockEventTooltip.location=a,this.stockEventTooltip.dataBind();else{he(this.chartId+"_StockEvents_Tooltip_svg")&&t.remove(he(this.chartId+"_StockEvents_Tooltip"));var l=t.createElement("div",{id:this.chartId+"_StockEvents_Tooltip",className:"ejSVGTooltip",attrs:{style:"pointer-events:none; position:absolute;z-index: 1"}});he(this.chartId+"_Secondary_Element").appendChild(l),this.stockEventTooltip=new i.Tooltip({opacity:1,header:"",content:[this.stockChart.stockEvents[o].description],enableAnimation:!0,location:a,theme:this.stockChart.theme,inverted:!0,areaBounds:this.stockChart.chart.chartAxisLayoutPanel.seriesClipRect}),this.stockEventTooltip.areaBounds.y+=this.stockChart.toolbarHeight+this.stockChart.titleSize.height,this.stockEventTooltip.appendTo("#"+l.id)}},o.prototype.removeStockEventTooltip=function(e){var t=this,i=this.getElement(this.chartId+"_StockEvents_Tooltip");this.stopAnimation(),i&&this.stockEventTooltip&&(this.toolTipInterval=+setTimeout(function(){t.stockEventTooltip.fadeOut(),t.removeHighLights()},e))},o.prototype.findArrowpaths=function(e){var t="";switch(e){case"ArrowUp":t="l -10 10 l 5 0 l 0 10 l 10 0 l 0 -10 l 5 0 z";break;case"ArrowDown":t="l -10 -10 l 5 0 l 0 -10 l 10 0 l 0 10 l 5 0 z";break;case"ArrowLeft":t="l -10 -10 l 0 5 l -10 0 l 0 10 l 10 0 l 0 5 z";break;case"ArrowRight":t="l 10 -10 l 0 5 l 10 0 l 0 10 l -10 0 l 0 5 z"}return t},o.prototype.applyHighLights=function(e,t){this.pointIndex===e&&this.seriesIndex===t||this.removeHighLights(),this.pointIndex=e,this.seriesIndex=t;var i=this.chartId+"_Series_"+t+"_StockEvents_"+e;this.setOpacity(i+"_Shape",.5),this.setOpacity(i+"_Text",.5)},o.prototype.removeHighLights=function(){var e=this.chartId+"_Series_"+this.seriesIndex+"_StockEvents_"+this.pointIndex;this.setOpacity(e+"_Shape",1),this.setOpacity(e+"_Text",1)},o.prototype.setOpacity=function(e,t){he(e)&&he(e).setAttribute("opacity",t.toString())},o.prototype.dateParse=function(e){var t=this.chart.intl.getDateParser({skeleton:"full",type:"dateTime"}),i=this.chart.intl.getDateFormat({skeleton:"full",type:"dateTime"});return new Date(Date.parse(t(i(new Date(r.DataUtil.parse.parseJson({val:e}).val)))))},o}(dn),rs=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),os=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},ns=function(e){function o(i,r){var o=e.call(this,i,r)||this;return o.isSingleAxis=!1,o.chartid=57723,o.tempSeriesType=[],o.zoomChange=!1,o.allowPan=!1,o.onPanning=!1,o.trendlinetriggered=!0,o.initialRender=!0,o.rangeFound=!1,o.tempPeriods=[],o.toolbarHeight=o.enablePeriodSelector?t.Browser.isDevice?56:42:0,o}return rs(o,e),o.prototype.onPropertyChanged=function(e,t){for(var i=0,r=Object.keys(e);i=r.startValue&&new Date(Date.parse(e[t])).getTime()<=r.endValue})),i},o.prototype.renderPeriodSelector=function(){this.enablePeriodSelector&&(this.toolbarSelector.initializePeriodSelector(),this.periodSelector.toolbar.refreshOverflow(),this.enableSelector||this.cartesianChart.cartesianChartRefresh(this))},o.prototype.chartRender=function(){this.cartesianChart=new za(this),this.cartesianChart.initializeChart()},o.prototype.renderRangeSelector=function(){this.enableSelector&&(this.rangeSelector=new Ia(this),this.rangeSelector.initializeRangeNavigator())},o.prototype.getModuleName=function(){return"stockChart"},o.prototype.getPersistData=function(){return""},o.prototype.removeSvg=function(){document.getElementById(this.element.id+"_Secondary_Element")&&t.remove(document.getElementById(this.element.id+"_Secondary_Element"));if(this.mainObject){for(;this.mainObject.childNodes.length>0;)this.mainObject.removeChild(this.mainObject.firstChild);!this.mainObject.hasChildNodes()&&this.mainObject.parentNode&&(t.remove(this.mainObject),this.mainObject=null,this.selectorObject=null,this.chartObject=null)}},o.prototype.chartModuleInjection=function(){for(var e,t=0,i=this.getInjectedModules();t-1){var l=he(this.element.id+"_stockChart_chart").getBoundingClientRect();this.mouseDownY=this.previousMouseMoveY=r-a.top-Math.max(l.top-a.top,0),this.mouseDownX=this.previousMouseMoveX=i-a.left-Math.max(l.left-a.left,0),this.setMouseXY(this.mouseDownX,this.mouseDownY),this.referenceXAxis=this.chart.primaryXAxis,he(this.element.id+"_stockChart_chart").setAttribute("cursor","pointer"),this.mouseDownXPoint=rt(this.mouseX-this.referenceXAxis.rect.x,this.referenceXAxis.rect.width,this.referenceXAxis.visibleRange,this.referenceXAxis.isInversed),this.allowPan=!0,this.notify(t.Browser.touchStartEvent,e)}return!1},o.prototype.stockChartMouseEnd=function(e){var t,i,r;return"touchend"===e.type?(i=(r=e).changedTouches[0].clientX,t=r.changedTouches[0].clientY,this.isTouch=!0):(t=e.clientY,i=e.clientX,this.isTouch="touch"===e.pointerType||"2"===e.pointerType),he(this.element.id+"_stockChart_chart").setAttribute("cursor","auto"),this.onPanning=!1,this.setMouseXY(i,t),this.stockChartOnMouseUp(e),!1},o.prototype.stockChartOnMouseUp=function(e){var i=e.target;return this.trigger("stockChartMouseUp",{target:i.id,x:this.mouseX,y:this.mouseY}),this.isChartDrag=!1,this.allowPan=!1,this.isTouch&&(this.threshold=(new Date).getTime()+300),this.notify(t.Browser.touchEndEvent,e),this.stockEvent&&this.stockEvent.removeStockEventTooltip(0),!1},o.prototype.setMouseXY=function(e,t){var i=he(this.element.id+"_stockChart_chart");if(this.element&&i){var r=this.element.getBoundingClientRect(),o=i.getBoundingClientRect();this.mouseX=e-r.left-Math.max(o.left-r.left,0),this.mouseY=t-r.top-Math.max(o.top-r.top,0)}},o.prototype.stockChartOnMouseMove=function(e){var t,i,r;return"touchmove"===e.type?(this.isTouch=!0,r=(i=e).changedTouches[0].clientY,t=i.changedTouches[0].clientX):(this.isTouch="touch"===e.pointerType||"2"===e.pointerType||this.isTouch,t=e.clientX,r=e.clientY),this.trigger("stockChartMouseMove",{target:e.target.id,x:this.mouseX,y:this.mouseY}),he(this.element.id+"_stockChart_chart")&&(this.setMouseXY(t,r),this.chartOnMouseMove(e)),!1},o.prototype.chartOnMouseMove=function(e){if(this.allowPan&&this.mouseDownXPoint&&this.mouseX!==this.previousMouseMoveX&&this.zoomSettings.enablePan){this.onPanning=!0,he(this.element.id+"_stockChart_chart").setAttribute("cursor","pointer"),this.mouseUpXPoint=rt(this.mouseX-this.referenceXAxis.rect.x,this.referenceXAxis.rect.width,this.referenceXAxis.visibleRange,this.referenceXAxis.isInversed);var i=Math.abs(this.mouseUpXPoint-this.mouseDownXPoint);this.mouseDownXPoint=this.referenceXAxis.visibleRange.max+i&&(this.startValue=this.referenceXAxis.visibleRange.min+i,this.endValue=this.referenceXAxis.visibleRange.max+i,this.cartesianChart.cartesianChartRefresh(this),this.rangeSelector.sliderChange(this.referenceXAxis.visibleRange.min+i,this.referenceXAxis.visibleRange.max+i))}if(this.notify(t.Browser.touchMoveEvent,e),""===e.target.id){var r=void 0;(this.chart.tooltip.enable||this.crosshair.enable)&&(r=document.getElementById(this.element.id+"_stockChart_chart_tooltip"))&&t.remove(r),he(this.element.id+"_StockEvents_Tooltip")&&this.stockEvent.removeStockEventTooltip(0)}return-1!==e.target.id.indexOf("StockEvents")?(clearInterval(this.stockEvent.toolTipInterval),this.stockEvent.renderStockEventTooltip(e.target.id)):this.stockEvent&&this.stockEvent.removeStockEventTooltip(1e3),this.isTouch=!1,!1},o.prototype.stockChartOnMouseClick=function(e){var t=e.target;return this.trigger("stockChartMouseClick",{target:t.id,x:this.mouseX,y:this.mouseY}),this.notify("click",e),!1},o.prototype.stockChartRightClick=function(e){return!this.crosshair.enable||2!==e.buttons&&0!==e.which&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},o.prototype.stockChartOnMouseLeave=function(e){var t,i,r;return"touchleave"===e.type?(this.isTouch=!0,i=(t=e).changedTouches[0].clientX,r=t.changedTouches[0].clientY):(i=e.clientX,r=e.clientY,this.isTouch="touch"===e.pointerType||"2"===e.pointerType),this.setMouseXY(i,r),this.allowPan=!1,this.stockChartOnMouseLeaveEvent(e),!1},o.prototype.stockChartOnMouseLeaveEvent=function(e){var i=t.Browser.isPointer?"pointerleave":"mouseleave";return this.isChartDrag=!1,this.notify(i,e),this.stockEvent&&this.stockEvent.removeStockEventTooltip(1e3),!1},o.prototype.destroy=function(){},o.prototype.renderBorder=function(){if(this.border.width){var e=this.createElement("div");e.id=this.element.id+"_stock_border",e.style.width=this.availableSize.width+"px",e.style.height=this.availableSize.height+"px",e.style.position="absolute",e.style.border=this.border.width+"px solid "+this.border.color,e.style.pointerEvents="none",be(!1,he(this.element.id),e)}},o.prototype.renderTitle=function(){var e;if(this.title){be(!1,he(this.element.id+"_Secondary_Element"),this.renderer.createSvg({id:this.element.id+"_stockChart_Title",width:this.availableSize.width,height:this.titleSize.height,fill:this.background||this.stockChartTheme.background}),!1);var t=this.titleStyle.textAlignment,r="Near"===t?"start":"Far"===t?"end":"middle";e=new i.Rect(0,0,this.availableSize.width,0);var o=new i.TextOption(this.element.id+"_ChartTitle",Ye(e,this.titleStyle),this.titleSize.height-10,r,this.title,"","auto");Ve(this.renderer,o,this.titleStyle,this.titleStyle.color||this.findTitleColor(),he(this.element.id+"_stockChart_Title"),!1,!1),this.availableSize.height-=this.titleSize.height+5}},o.prototype.findTitleColor=function(){return this.theme.toLocaleLowerCase().indexOf("highcontrast")>-1||this.theme.indexOf("Dark")>-1?"#ffffff":"#424242"},o.prototype.calculateStockEvents=function(){this.stockEvents.length&&(this.stockEvent=new is(this),be(!1,this.chartObject,this.stockEvent.renderStockEvents()))},os([t.Property(null)],o.prototype,"width",void 0),os([t.Property(null)],o.prototype,"height",void 0),os([t.Property("")],o.prototype,"dataSource",void 0),os([t.Complex({},Ha)],o.prototype,"margin",void 0),os([t.Complex({color:"#DDDDDD",width:1},Va)],o.prototype,"border",void 0),os([t.Property(null)],o.prototype,"background",void 0),os([t.Property("Material")],o.prototype,"theme",void 0),os([t.Complex({name:"primaryXAxis",valueType:"DateTime"},qa)],o.prototype,"primaryXAxis",void 0),os([t.Complex({border:{color:null,width:.5},background:"transparent"},ja)],o.prototype,"chartArea",void 0),os([t.Complex({name:"primaryYAxis",opposedPosition:!0,labelPosition:"Inside"},qa)],o.prototype,"primaryYAxis",void 0),os([t.Collection([{}],Qa)],o.prototype,"rows",void 0),os([t.Collection([{opposedPosition:!0}],qa)],o.prototype,"axes",void 0),os([t.Collection([],Ua)],o.prototype,"series",void 0),os([t.Collection([],es)],o.prototype,"stockEvents",void 0),os([t.Property(!1)],o.prototype,"isTransposed",void 0),os([t.Property("")],o.prototype,"title",void 0),os([t.Complex({size:"15px",fontWeight:"500",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},Fa)],o.prototype,"titleStyle",void 0),os([t.Collection([],Za)],o.prototype,"indicators",void 0),os([t.Complex({shared:!0,enableMarker:!1},ti)],o.prototype,"tooltip",void 0),os([t.Complex({dashArray:"5"},Pr)],o.prototype,"crosshair",void 0),os([t.Complex({},Lr)],o.prototype,"zoomSettings",void 0),os([t.Property(!0)],o.prototype,"enablePeriodSelector",void 0),os([t.Property(!0)],o.prototype,"enableCustomRange",void 0),os([t.Property(!1)],o.prototype,"isSelect",void 0),os([t.Property(!0)],o.prototype,"enableSelector",void 0),os([t.Collection([],ii)],o.prototype,"periods",void 0),os([t.Collection([{}],Ja)],o.prototype,"annotations",void 0),os([t.Event()],o.prototype,"selectorRender",void 0),os([t.Event()],o.prototype,"stockChartMouseMove",void 0),os([t.Event()],o.prototype,"stockChartMouseLeave",void 0),os([t.Event()],o.prototype,"stockChartMouseDown",void 0),os([t.Event()],o.prototype,"stockChartMouseUp",void 0),os([t.Event()],o.prototype,"stockChartMouseClick",void 0),os([t.Event()],o.prototype,"pointClick",void 0),os([t.Event()],o.prototype,"pointMove",void 0),os([t.Event()],o.prototype,"onZooming",void 0),os([t.Property("None")],o.prototype,"selectionMode",void 0),os([t.Property(!1)],o.prototype,"isMultiSelect",void 0),os([t.Event()],o.prototype,"load",void 0),os([t.Event()],o.prototype,"loaded",void 0),os([t.Event()],o.prototype,"rangeChange",void 0),os([t.Event()],o.prototype,"axisLabelRender",void 0),os([t.Event()],o.prototype,"tooltipRender",void 0),os([t.Event()],o.prototype,"seriesRender",void 0),os([t.Event()],o.prototype,"stockEventRender",void 0),os([t.Collection([],Ka)],o.prototype,"selectedDataIndexes",void 0),os([t.Property(["Line","Hilo","OHLC","Hollow Candle","Spline","Candle"])],o.prototype,"seriesType",void 0),os([t.Property(["EMA","TMA","SMA","Momentum","ATR","Accumulation Distribution","Bollinger Bands","MACD","Stochastic","RSI"])],o.prototype,"indicatorType",void 0),os([t.Property(["PNG","JPEG","SVG","PDF","Print"])],o.prototype,"exportType",void 0),os([t.Property(["Linear","Exponential","Polynomial","Logarithmic","Moving Average"])],o.prototype,"trendlineType",void 0),o}(t.Component),as=function(){function e(e){this.control=e,this.elementId=e.element.id}return e.prototype.renderLeftTooltip=function(e){this.fadeOutTooltip();var t=this.getTooltipContent(e.currentStart),i=this.getContentSize(t),r=this.control.enableRtl?e.rightRect:e.leftRect;i>r.width&&(r=e.midRect),this.leftTooltip=this.renderTooltip(r,this.createElement("_leftTooltip"),e.startX,t)},e.prototype.getContentSize=function(e){var r=this.control.tooltip.textStyle;return this.control.tooltip.template?ue(t.createElement("div",{id:"measureElement",styles:"position: absolute;"}),0,this.control.tooltip.template,this.control).getBoundingClientRect().width:i.measureText(e[0],r).width+20},e.prototype.renderRightTooltip=function(e){this.fadeOutTooltip();var t=this.getTooltipContent(e.currentEnd),i=this.getContentSize(t),r=this.control.enableRtl?e.leftRect:e.rightRect;i>r.width&&((r=e.midRect).x=this.control.series.length?0:r.x),this.rightTooltip=this.renderTooltip(r,this.createElement("_rightTooltip"),e.endX,t)},e.prototype.createElement=function(e){if(he(this.elementId+e))return he(this.elementId+e);var t=document.createElement("div");if(t.id=this.elementId+e,t.className="ejSVGTooltip",t.setAttribute("style","pointer-events:none; position:absolute;z-index: 1"),this.control.stockChart){var i=this.control.stockChart;he(i.element.id+"_Secondary_Element").appendChild(t),t.style.transform="translateY("+(i.availableSize.height-i.toolbarHeight-80+i.toolbarHeight+i.titleSize.height)+"px)"}else he(this.elementId+"_Secondary_Element").appendChild(t);return t},e.prototype.renderTooltip=function(e,t,r,o){var n=this.control,a=n.tooltip,s={cancel:!1,name:"tooltipRender",text:o,textStyle:a.textStyle};this.control.trigger("tooltipRender",s);var l=n.svgObject.getBoundingClientRect().left-n.element.getBoundingClientRect().left;return s.cancel?null:new i.Tooltip({location:{x:r,y:n.rangeSlider.sliderY},content:s.text,marginX:2,enableShadow:!1,marginY:2,arrowPadding:8,rx:0,ry:0,inverted:n.series.length>0,areaBounds:e,fill:a.fill,theme:this.control.theme,clipBounds:{x:l},border:a.border,opacity:a.opacity,template:a.template,textStyle:s.textStyle,availableSize:n.availableSize,data:{start:this.getTooltipContent(this.control.startValue)[0],end:this.getTooltipContent(this.control.endValue)[0],value:o[0]}},t)},e.prototype.getTooltipContent=function(e){var t,i=this.control,r=i.tooltip,o=i.chartSeries.xAxis,n=r.format||o.labelFormat,a=null!==n.match("{value}"),s=o.valueType;return"DateTime"===s?t=i.intl.getDateFormat({format:n||"MM/dd/yyyy",type:G(i.skeletonType),skeleton:i.dateTimeModule.getSkeleton(o,null,null,i.isBlazor)})(new Date(e)):(o.format=i.intl.getNumberFormat({format:a?"":n,useGrouping:i.useGroupingSeparator}),t=i.doubleModule.formatValue(o,a,n,"Logarithmic"===s?Math.pow(o.logBase,e):e)),[t]},e.prototype.fadeOutTooltip=function(){var e=this;"OnDemand"===this.control.tooltip.displayMode&&(Ce(this.toolTipInterval),this.rightTooltip&&(this.toolTipInterval=+setTimeout(function(){e.leftTooltip.fadeOut(),e.rightTooltip.fadeOut()},1e3)))},e.prototype.getModuleName=function(){return"RangeTooltip"},e.prototype.destroy=function(){},e}(),ss=function(){function e(e){this.bulletChart=e,this.isVertical="Vertical"===e.orientation,this.isLabelsInside="Inside"===e.labelPosition,this.isHorizontal="Horizontal"===e.orientation,this.isLeft="Left"===e.titlePosition,this.isRight="Right"===e.titlePosition,this.isTop="Top"===e.titlePosition,this.majorTickSize=e.majorTickLines.height,this.location=10,this.labelOffset=15,this.labelSize=parseFloat(e.labelStyle.size),this.isLabelBelow=!this.bulletChart.opposedPosition}return e.prototype.renderMajorTickLines=function(e,t){"Horizontal"===this.bulletChart.orientation?this.renderXMajorTickLines(e,t):this.renderYMajorTickLines(e,t)},e.prototype.renderMinorTickLines=function(e,t){"Horizontal"===this.bulletChart.orientation?this.renderXMinorTickLines(e,t):this.renderYMinorTickLines(e,t)},e.prototype.renderAxisLabels=function(e,t){"Horizontal"===this.bulletChart.orientation?this.renderXAxisLabels(e,t):this.renderYAxisLabels(e,t)},e.prototype.renderXMajorTickLines=function(e,t){for(var i,r,o=this.bulletChart,n=o.renderer.createGroup({id:o.svgObject.id+"_majorTickGroup"}),a=o.minimum,s=o.maximum,l=o.interval,h=o.enableRtl,c=o.initialClipRect.y+(o.opposedPosition?0:o.initialClipRect.height),d=c+(o.opposedPosition?"Inside"!==o.tickPosition?-this.majorTickSize:this.majorTickSize:"Inside"!==o.tickPosition?this.majorTickSize:-this.majorTickSize),p=o.majorTickLines,u=p.color||o.themeStyle.majorTickLineColor,g=o.initialClipRect.x+(o.enableRtl?o.initialClipRect.width:0),y=o.initialClipRect.x+p.width/2+(h?o.initialClipRect.width:0),m=a;m<=s;m+=l){(r=o.enableRtl?m===a:m===s)&&(y-=p.width/2),r=o.enableRtl?m===a:m===s,o.majorTickLines.useRangeColor&&(u=this.bindingRangeStrokes(y-(r?this.bulletChart.majorTickLines.width/2:0),g,this.bulletChart.orientation,o.enableRtl)),i=this.majorTicks(y,y,c,d,u,m);var v=o.renderer.drawLine(i);y+=h?-e:e,n.appendChild(v),t.appendChild(n)}},e.prototype.renderYMajorTickLines=function(e,t){for(var i,r,o=this.bulletChart,n=o.renderer.createGroup({id:o.svgObject.id+"_majorTickGroup"}),a=o.minimum,s=o.maximum,l=o.interval,h=o.enableRtl,c=o.initialClipRect,d=c.x+(o.opposedPosition?c.width:0),p=d-(o.opposedPosition?"Inside"!==o.tickPosition?-this.majorTickSize:this.majorTickSize:"Inside"!==o.tickPosition?this.majorTickSize:-this.majorTickSize),u=o.majorTickLines,g=u.color||o.themeStyle.majorTickLineColor,y=c.y+(o.enableRtl?0:c.height),m=c.y+u.width/2+(h?0:c.height),v=a;v<=s;v+=l){(i=o.enableRtl?v===s:v===a)&&(m-=u.width/2),i=o.enableRtl?v===a:v===s,o.majorTickLines.useRangeColor&&(g=this.bindingRangeStrokes(m-(i?this.bulletChart.majorTickLines.width/2:0),y,this.bulletChart.orientation,o.enableRtl)),r=this.majorTicks(d,p,m,m,g,v);var f=o.renderer.drawLine(r);m+=h?e:-e,n.appendChild(f),t.appendChild(n)}},e.prototype.majorTicks=function(e,t,i,r,o,n){return{id:this.bulletChart.svgObject.id+"_MajorTickLine_"+n,x1:e,y1:i,x2:t,y2:r,"stroke-width":this.bulletChart.majorTickLines.width,stroke:this.bulletChart.majorTickLines.useRangeColor&&o?o:this.bulletChart.majorTickLines.color||o}},e.prototype.bindingRangeStrokes=function(e,t,i,r){return"Vertical"===i&&!r||r&&"Horizontal"===i?this.backwardStrokeBinding(e,t):this.forwardStrokeBinding(e,t)},e.prototype.renderXMinorTickLines=function(e,t){for(var i,r,o,n,a=this.bulletChart.renderer.createGroup({id:this.bulletChart.svgObject.id+"_minorTickGroup"}),s=this.bulletChart,l=s.maximum,h=s.minimum,c=s.interval,d=s.minorTickLines.height,p=this.bulletChart.minorTicksPerInterval,u=s.initialClipRect.x,g=s.initialClipRect.y+(s.opposedPosition?0:s.initialClipRect.height),y=g+(s.opposedPosition?"Inside"!==s.tickPosition?-d:d:"Inside"!==s.tickPosition?d:-d),m=s.minorTickLines.color||s.themeStyle.minorTickLineColor,v=s.initialClipRect.x+(s.enableRtl?s.initialClipRect.width:0),f=h;f=r&&e=Math.round(r-i.rangeCollection[o])&&e<=r)return i.ranges[o].color;return null},e.prototype.renderXAxisLabels=function(e,t){var r,o,n=this.bulletChart.renderer.createGroup({id:this.bulletChart.svgObject.id+"_axisLabelGroup"}),a=this.bulletChart,s=this.bulletChart.locale,l=a.enableRtl,h=(a.tickPosition===a.labelPosition?a.majorTickLines.height:0)+10,c=a.initialClipRect.y+(a.opposedPosition?"Inside"===a.labelPosition?h:-h:a.initialClipRect.height+("Inside"===a.labelPosition?-h:h)),d=a.initialClipRect.x+(l?a.initialClipRect.width:0),p=a.minimum,u=a.maximum,g=a.interval,y=s&&this.bulletChart.enableGroupSeparator,m=this.getFormat(this.bulletChart),v=a.labelStyle.color||a.themeStyle.labelFontColor,f=null!==m.match("{value}");this.format=this.bulletChart.intl.getNumberFormat({format:f?"":m,useGrouping:this.bulletChart.enableGroupSeparator});var b=a.initialClipRect.x+(a.enableRtl?a.initialClipRect.width:0);c+=i.measureText(this.formatValue(this,f,m,this.bulletChart.maximum),a.labelStyle).height/3;for(var x=p;x<=u;x+=g){o=a.enableRtl?x===p:x===u,a.labelStyle.useRangeColor&&(v=this.bindingRangeStrokes(d-(o?this.bulletChart.majorTickLines.width/2:0),b,this.bulletChart.orientation,a.enableRtl)),r=y?x.toLocaleString(s):this.formatValue(this,f,m,x);var w=this.labelXOptions(d,c,r,x),S=i.textElement(w,this.bulletChart.labelStyle,v,t);n.appendChild(S),d+=l?-e:e}t.appendChild(n)},e.prototype.labelXOptions=function(e,t,i,r){return{id:this.bulletChart.svgObject.id+"_AxisLabel_"+r,anchor:"middle",text:i,transform:"",x:e,y:t,baseLine:"",labelRotation:0}},e.prototype.renderYAxisLabels=function(e,t){var r,o,n=this.bulletChart.renderer.createGroup({id:this.bulletChart.svgObject.id+"_axisLabelGroup"}),a=this.bulletChart,s=a.locale,l=a.enableRtl,h=(a.tickPosition===a.labelPosition?a.majorTickLines.height:0)+10,c=a.initialClipRect.y+(l?0:a.initialClipRect.height),d=a.initialClipRect.x+(a.opposedPosition?a.initialClipRect.width+("Inside"===a.labelPosition?-(h+10):h):"Inside"===a.labelPosition?h+10:-h),p=a.minimum,u=a.maximum,g=a.interval,y=s&&this.bulletChart.enableGroupSeparator,m=a.labelStyle.color||a.themeStyle.labelFontColor,v=this.getFormat(this.bulletChart),f=null!==v.match("{value}");this.format=this.bulletChart.intl.getNumberFormat({format:f?"":v,useGrouping:this.bulletChart.enableGroupSeparator});var b=a.initialClipRect.y+(a.enableRtl?0:a.initialClipRect.height),x=i.measureText(this.formatValue(this,f,v,this.bulletChart.maximum),a.labelStyle).width/2,w=i.measureText(this.formatValue(this,f,v,this.bulletChart.maximum),a.labelStyle).height/3;c+=w;for(var S=p;S<=u;S+=g){o=a.enableRtl?S===u:S===p,a.labelStyle.useRangeColor&&(m=this.bindingRangeStrokes(c-w-(o?this.bulletChart.majorTickLines.width/2:0),b,this.bulletChart.orientation,a.enableRtl)),r=y?S.toLocaleString(s):this.formatValue(this,f,v,S);var C=this.labelXOptions(d-(this.bulletChart.opposedPosition?-x:x),c,r,S),P=i.textElement(C,this.bulletChart.labelStyle,m,t);n.appendChild(P),c+=l?e:-e}t.appendChild(n)},e.prototype.getFormat=function(e){return e.labelFormat?e.labelFormat:""},e.prototype.formatValue=function(e,t,i,r){return t?i.replace("{value}",e.format(r)):e.format(r)},e}();!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto-Regular"},e.tooltipLabelFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.legendLabelFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.dataLabelFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.titleFont={size:"15px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto-Regular"},e.subTitleFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto-Regular"}}(e.BulletChartTheme||(e.BulletChartTheme={}));var ls,hs=function(){function e(e){this.comparative=[],this.dataSource=e.dataSource,this.isVertical="Vertical"===e.orientation,this.isTicksInside="Inside"===e.tickPosition,this.isLabelsInside="Inside"===e.labelPosition,this.isHorizontal="Horizontal"===e.orientation,this.isLeft="Left"===e.titlePosition,this.isRight="Right"===e.titlePosition,this.isTop="Top"===e.titlePosition,this.location=10,this.featureBarBounds=[],this.majorTickSize=e.majorTickLines.height,this.labelOffset=15,this.labelSize=12,this.bulletChart=e,this.isLabelBelow=!this.bulletChart.opposedPosition,this.scaleOrientation=this.bulletChart.orientation,this.rangeColor=[]}return e.prototype.drawScaleGroup=function(e){var t=this.bulletChart.renderer.createGroup({id:this.bulletChart.svgObject.id+"_rangeGroup"}),r=this.bulletChart.maximum,o=this.bulletChart.ranges;this.scaleSettingsGroup=e;var n,a=this.bulletChart,s=a.enableRtl,l=a.initialClipRect,h=l.x+(s&&"Horizontal"===a.orientation?l.width:0),c=l.y+(s||"Vertical"!==a.orientation?0:l.height),d=0;a.rangeCollection=[];for(var p=0,u="Horizontal"===a.orientation?l.width:l.height,g="Horizontal"===a.orientation?l.height:l.width,y=0;y0&&!l.enableRtl||u<0&&l.enableRtl?s.width:0)-3:s.pointX+(u>0&&l.enableRtl||u<0&&!l.enableRtl?s.width:0)-3,s.width=6}if(s){var g=r?this.featureBar(s.pointX,n,s.width,p):this.verticalFeatureBar(n,s.pointX,s.width,p);if(c.appendChild(g),this.feature=g,this.scaleSettingsGroup.appendChild(c),this.featureBarBounds[p]={x:s.pointX,y:n,width:s.width,height:l.valueHeight},!t.isNullOrUndefined(o)){var y=i.measureText(o,l.categoryLabelStyle),m=r?y.width:y.height,v=l.initialClipRect,f=void 0,b=void 0;r?(f=l.enableRtl?v.x+v.width+5+m/2:v.x-5-m/2,b=this.drawcategory(f,n,o)):(f=l.enableRtl?v.y-5-m/2:v.y+v.height+5+m/2,b=this.drawcategory(n+l.valueHeight/2,f,o)),i.textElement(b,l.categoryLabelStyle,l.categoryLabelStyle.color||l.themeStyle.categoryFontColor,this.scaleSettingsGroup)}}l.animation.enable&&this.doValueBarAnimation()}},e.prototype.featureBar=function(e,t,r,o){var n=new Di(this.bulletChart.svgObject.id+"_FeatureMeasure_"+o,this.bulletChart.valueFill,this.bulletChart.valueBorder,1,new i.Rect(e,t,r,this.bulletChart.valueHeight)),a=this.bulletChart.renderer.drawRectangle(n);return a.setAttribute("class",this.bulletChart.svgObject.id+"_FeatureMeasure"),a.id=this.bulletChart.svgObject.id+"_FeatureMeasure_"+o,a},e.prototype.verticalFeatureBar=function(e,t,r,o){var n=new Di(this.bulletChart.svgObject.id+"_FeatureMeasure_"+o,this.bulletChart.valueFill,this.bulletChart.valueBorder,1,new i.Rect(e,t,this.bulletChart.valueHeight,r)),a=this.bulletChart.renderer.drawRectangle(n);return a.setAttribute("class",this.bulletChart.svgObject.id+"_FeatureMeasure"),a.id=this.bulletChart.svgObject.id+"_FeatureMeasure_"+o,a},e.prototype.drawcategory=function(e,t,i){return{id:"",anchor:"middle",x:e,y:t+this.bulletChart.valueHeight,transform:"",text:i,baseLine:"",labelRotation:0}},e.prototype.renderComparativeSymbol=function(e){0!==e&&this.renderCommonComparativeSymbol(e,this.isHorizontal)},e.prototype.renderCommonComparativeSymbol=function(e,t){for(var i,r,o,n,a,s,l=this.bulletChart,h=l.initialClipRect,c=t?h.width:h.height,d=t?h.y+h.height:h.x,p=l.renderer.createGroup({id:l.svgObject.id+"_comparativeGroup"}),u=l.minimum,g=l.maximum,y=g-u,m=l.targetWidth,v=t?h.x-m/2:h.y+h.height,f=[],b=l.targetTypes,x="Rect",w=b.length,S=(t?h.height:h.width)/e,C=0;C=u&&f[P]<=g&&(r=(a=t?d-S*C-S/2:d+S*C+S/2)-1.5*m,o=a+1.5*m,a=c/(y/(y-(g-f[P]))),n=t?v+(l.enableRtl?c-a:a):v-(l.enableRtl?c-a:a),s=this.getTargetElement(x,t,n,r,o,f[P],C),this.comparative.push(s),p.appendChild(s),r=0,o=0),this.scaleSettingsGroup.appendChild(p);f=[],l.animation.enable&&this.doTargetBarAnimation(0)}},e.prototype.getTargetElement=function(e,t,r,o,n,a,s){var l,h,c=this.bulletChart,d="Cross"===e?c.targetWidth-1:1,p="Circle"===e?c.targetWidth-1:c.targetWidth,u=t?r+p/2:o+(n-o)/2,g=t?o+(n-o)/2:r,y=c.svgObject.id+"_ComparativeMeasure_"+s,m=c.svgObject.id+"_ComparativeMeasure";if("Rect"===e)l=t?this.compareMeasure(r,o,n,s,a):this.compareVMeasure(o,n,r,s),h=c.renderer.drawLine(l);else if("Circle"===e)l=new Ni(y,c.targetColor,{width:1,color:c.targetColor||"black"},1,u,g,p),h=c.renderer.drawCircle(l);else{var v="M "+(u-p)+" "+(g-p)+" L "+(u+p)+" "+(g+p)+" M "+(u-p)+" "+(g+p)+" L "+(u+p)+" "+(g-p);l=new i.PathOption(y,"transparent",d,c.targetColor,1,"",v),h=c.renderer.drawPath(l)}return h.setAttribute("class",m),h},e.prototype.compareMeasure=function(e,t,i,r,o){var n=this.bulletChart;return{class:n.svgObject.id+"_ComparativeMeasure",id:n.svgObject.id+"_ComparativeMeasure_"+r,x1:o===n.maximum?e-n.targetWidth/2:o===n.minimum?e+n.targetWidth/2:e,y1:t,x2:o===n.maximum?e-n.targetWidth/2:o===n.minimum?e+n.targetWidth/2:e,y2:i,"stroke-width":n.targetWidth,stroke:n.targetColor||"black"}},e.prototype.compareVMeasure=function(e,t,i,r){var o=this.bulletChart;return{class:o.svgObject.id+"_ComparativeMeasure",id:o.svgObject.id+"_ComparativeMeasure_"+r,x1:e,y1:i,x2:t,y2:i,"stroke-width":o.targetWidth,stroke:o.targetColor||"black"}},e.prototype.calculateFeatureMeasureBounds=function(e,r,o){var n=this.bulletChart,a=n.minimum;if((e=e=a){var s=void 0,l=void 0,h=void 0,c=o?n.initialClipRect.x:n.initialClipRect.y,d=o?n.initialClipRect.width:n.initialClipRect.height,p=n.maximum-n.minimum,u=n.maximum-e,g=(n.enableRtl?"backward":"forward")+this.scaleOrientation.toLowerCase();r=t.isNullOrUndefined(r)?"":r;var y=i.measureText(r.toString(),n.labelStyle).width;switch(g){case"forwardhorizontal":case"backwardvertical":s=c+(a>0?0:d/p*Math.abs(a)),h=d/(p/(a>0?p-u:e)),e<0&&(s-=h=Math.abs(h)),h=s+h0?d/(p/(p-u)):d/(p/e),e<0&&(s-=h=Math.abs(h)),s=t.delay&&(e.style.visibility="visible",p=p||1,a=h(t.timeStamp-t.delay,0,p,t.duration),e.setAttribute("transform","translate("+o+" "+n+") scale("+a/p+", 1) translate("+-o+" "+-n+")"))},end:function(){e.setAttribute("transform","translate(0,0)"),e.style.visibility="visible"}})},e.prototype.doTargetBarAnimation=function(e){var t,i,r=this.comparative[e];if(!r)return null;"Horizontal"===this.bulletChart.orientation&&r&&(i=parseFloat(r.getAttribute("y1"))+parseFloat(r.getAttribute("y2")),t=parseFloat(r.getAttribute("x1"))),r.style.visibility="hidden",this.animateRect(r,t,i,e+1)},e.prototype.animateRect=function(e,i,r,o){var n,a=this,s=Z("Linear"),l=this.bulletChart.animation,h=this.comparative.length,c=this.bulletChart.animateSeries?this.bulletChart.animation.duration:l.duration;new t.Animation({}).animate(e,{duration:c,delay:l.delay,progress:function(t){t.timeStamp>=t.delay&&(e.style.visibility="visible",n=s(t.timeStamp-t.delay,0,1,t.duration),e.setAttribute("transform","translate("+i+" "+r/2+") scale(1,"+n+") translate("+-i+" "+-r/2+")"))},end:function(){e.setAttribute("transform","translate(0,0)"),o=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},ps=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return cs(i,e),ds([t.Property(null)],i.prototype,"end",void 0),ds([t.Property(1)],i.prototype,"opacity",void 0),ds([t.Property(null)],i.prototype,"color",void 0),ds([t.Property(null)],i.prototype,"index",void 0),ds([t.Property(null)],i.prototype,"name",void 0),ds([t.Property("Rectangle")],i.prototype,"shape",void 0),ds([t.Property("")],i.prototype,"legendImageUrl",void 0),i}(t.ChildProperty),us=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return cs(i,e),ds([t.Property(12)],i.prototype,"height",void 0),ds([t.Property(1)],i.prototype,"width",void 0),ds([t.Property(null)],i.prototype,"color",void 0),ds([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),gs=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return cs(i,e),ds([t.Property(8)],i.prototype,"height",void 0),ds([t.Property(1)],i.prototype,"width",void 0),ds([t.Property(null)],i.prototype,"color",void 0),ds([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),ys=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return cs(i,e),ds([t.Property("Normal")],i.prototype,"fontStyle",void 0),ds([t.Property("16px")],i.prototype,"size",void 0),ds([t.Property("")],i.prototype,"color",void 0),ds([t.Property("Normal")],i.prototype,"fontWeight",void 0),ds([t.Property("Segoe UI")],i.prototype,"fontFamily",void 0),ds([t.Property("Center")],i.prototype,"textAlignment",void 0),ds([t.Property("None")],i.prototype,"textOverflow",void 0),ds([t.Property(1)],i.prototype,"opacity",void 0),ds([t.Property(!0)],i.prototype,"enableTrim",void 0),ds([t.Property(null)],i.prototype,"maximumTitleWidth",void 0),ds([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),ms=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return cs(r,i),ds([t.Property(!1)],r.prototype,"enable",void 0),ds([t.Property(null)],r.prototype,"fill",void 0),ds([t.Complex(e.BulletChartTheme.tooltipLabelFont,ys)],r.prototype,"textStyle",void 0),ds([t.Complex({color:"#cccccc",width:.5},Yt)],r.prototype,"border",void 0),ds([t.Property(null)],r.prototype,"template",void 0),r}(t.ChildProperty),vs=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return cs(r,i),ds([t.Property(!1)],r.prototype,"enable",void 0),ds([t.Complex(e.BulletChartTheme.dataLabelFont,ys)],r.prototype,"labelStyle",void 0),r}(t.ChildProperty),fs=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return cs(r,i),ds([t.Property(!1)],r.prototype,"visible",void 0),ds([t.Complex({x:0,y:0},ur)],r.prototype,"location",void 0),ds([t.Property(8)],r.prototype,"padding",void 0),ds([t.Property("Center")],r.prototype,"alignment",void 0),ds([t.Property(10)],r.prototype,"shapeHeight",void 0),ds([t.Property(10)],r.prototype,"shapeWidth",void 0),ds([t.Complex(e.BulletChartTheme.legendLabelFont,ys)],r.prototype,"textStyle",void 0),ds([t.Property("Auto")],r.prototype,"position",void 0),ds([t.Complex({left:0,right:0,top:0,bottom:0},Ut)],r.prototype,"margin",void 0),ds([t.Complex({},Yt)],r.prototype,"border",void 0),ds([t.Property(5)],r.prototype,"shapePadding",void 0),ds([t.Property("transparent")],r.prototype,"background",void 0),ds([t.Property(1)],r.prototype,"opacity",void 0),ds([t.Property(3)],r.prototype,"tabIndex",void 0),r}(t.ChildProperty),bs=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xs=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},ws=function(r){function o(e,t){var o=r.call(this,e,t)||this;return o.bulletid=57726,o.animateSeries=!0,o.padding=5,o.leftSize=0,o.rightSize=0,o.topSize=0,o.bottomSize=0,o.maxLabelSize=new i.Size(0,0),o.maxTitleSize=new i.Size(0,0),o.intervalDivs=[10,5,2,1],o}return bs(o,r),o.prototype.preRender=function(){this.isBlazor=window.Blazor,this.allowServerDataBinding=!1,this.unWireEvents(),this.initPrivateValues(),this.setCulture(),this.wireEvents()},o.prototype.initPrivateValues=function(){if(this.delayRedraw=!1,this.scale=new hs(this),this.bulletAxis=new ss(this),""===this.element.id){var e=document.getElementsByClassName("e-BulletChart").length;this.element.id="BulletChart_"+this.bulletid+"_"+e}},o.prototype.setCulture=function(){this.intl=new t.Internationalization},o.prototype.render=function(){var e=this,t={bulletChart:this.isBlazor?{}:this,theme:this.theme,name:"load"};this.trigger("load",t,function(){e.theme=e.isBlazor?t.theme:e.theme,e.setTheme(),e.createSvg(e),e.findRange(),e.bulletChartLegendModule&&e.legendSettings.visible&&(e.calculateVisibleElements(),e.bulletChartLegendModule.getLegendOptions(e.visibleRanges)),e.calculatePosition(),e.renderBulletElements();e.trigger("loaded",{bulletChart:window.Blazor?{}:e}),e.allowServerDataBinding=!0,e.renderComplete()})},o.prototype.setTheme=function(){this.themeStyle=lt(this.theme)},o.prototype.findRange=function(){if(this.minimum||(this.minimum=0),!this.maximum){this.maximum=0;for(e=0;ethis.ranges[e].end?this.maximum:this.ranges[e].end}if(null===this.maximum)if(t.isNullOrUndefined(this.dataSource))this.maximum=10;else for(var e=0;ethis.dataSource[e][this.valueField]?this.maximum=this.maximum>this.dataSource[e][this.targetField]?this.maximum+this.interval:this.dataSource[e][this.targetField]+this.interval:this.maximum=this.maximum>this.dataSource[e][this.valueField]?this.maximum+this.interval:this.dataSource[e][this.valueField]+this.interval;this.interval||(this.interval=this.calculateNumericNiceInterval(this.maximum-this.minimum))},o.prototype.getActualDesiredIntervalsCount=function(e){var t="Horizontal"===this.orientation?e.width:e.height,i=3*("Horizontal"===this.orientation?.533:1);return i=Math.max(t*(i/100),1)},o.prototype.calculateNumericNiceInterval=function(e){for(var t=this.getActualDesiredIntervalsCount(this.availableSize),i=e/t,r=Math.pow(10,Math.floor(v(i,10))),o=0,n=this.intervalDivs;on?o.width:n,a=o.height>a?o.height:a}if(s+=a,this.subTitleCollections=Xe(this.subtitle,this.subtitleStyle,this.titleStyle.maximumTitleWidth),this.subtitle){for(var d=0,p=this.subTitleCollections;dn?o.width:n,a=o.height>a?o.height:a}r=i.measureText(this.subtitle,this.subtitleStyle).height*this.subTitleCollections.length+5,s+=a}}this.maxTitleSize=new i.Size(n,"Vertical"===this.orientation?s:a),this.maxLabelSize=this.getMaxLabelWidth(),this.initialClipRect=this.getBulletBounds("Vertical"===this.orientation?s:n,t,r,e),this.bulletChartRect=new i.Rect(this.initialClipRect.x,this.initialClipRect.y,this.initialClipRect.width,this.initialClipRect.height),this.bulletChartLegendModule&&this.bulletChartLegendModule.calculateLegendBounds(this.initialClipRect,this.availableSize,this.maxLabelSize)},o.prototype.getBulletBounds=function(e,t,r,o){var n=new i.Rect(0,0,0,0),a=this.enableRtl,s=this.labelPosition===this.tickPosition?5:0,l="Inside"===this.tickPosition?0:this.majorTickLines.height,h="Inside"===this.labelPosition?0:5+("Outside"===this.tickPosition?0:i.measureText(this.maximum.toString(),this.labelStyle).height),c=0,d=0,p=0,u=0,g=0,y=0,m=0,v=0,f=e,b=this.bulletAxis.getFormat(this),x=null!==b.match("{value}");this.bulletAxis.format=this.intl.getNumberFormat({format:x?"":b,useGrouping:this.enableGroupSeparator});var w,S=i.measureText(this.bulletAxis.formatValue(this.bulletAxis,x,b,this.maximum),this.labelStyle).width;switch("Horizontal"===this.orientation?(w=this.maxLabelSize.width,c=this.opposedPosition?l+h+s:0,d=this.opposedPosition?0:l+h+s,m=w&&!a?w:0,m+=f&&"Left"===this.titlePosition?15:0,v=w&&a?w:0,v+=f&&"Right"===this.titlePosition?5:0):(w=this.maxLabelSize.height,u=this.opposedPosition?l+s:0,u+=this.opposedPosition&&"Inside"!==this.labelPosition?S:0,p=this.opposedPosition?0:l+s,p+=this.opposedPosition||"Inside"===this.labelPosition?0:S,g=w&&a?w+5:0,y=w&&!a?w+5:0),this.titlePosition){case"Left":n.x=o.left+f+m+p,n.width=this.availableSize.width-o.right-n.x-v-u,n.y=o.top+c+g,n.height=this.availableSize.height-n.y-o.bottom-d-y;break;case"Right":n.x=o.left+m+p,n.width=this.availableSize.width-u-o.right-n.x-(f+5)-v,n.y=o.top+c+g,n.height=this.availableSize.height-n.y-o.bottom-d-y;break;case"Top":n.x=o.left+p+m,n.width=this.availableSize.width-o.right-n.x-v-u,n.y=o.top+(t+r)+c+g,n.height=this.availableSize.height-n.y-o.bottom-d-y;break;case"Bottom":n.x=o.left+p+m,n.y=o.top+c+g,n.width=this.availableSize.width-o.right-n.x-v-u,n.height=this.availableSize.height-n.y-y-o.bottom-d-(t+r)}return n},o.prototype.getMaxLabelWidth=function(){if(this.maxLabelSize=new i.Size(0,0),!this.categoryField)return this.maxLabelSize;for(var e,t=0,r=Object.keys(this.dataSource).length;tthis.maxLabelSize.width&&(this.maxLabelSize.width=e.width),e.height>this.maxLabelSize.height&&(this.maxLabelSize.height=e.height);return this.maxLabelSize},o.prototype.calculateVisibleElements=function(){var e,t=this.ranges;this.visibleRanges=[];for(var i=0,r=t.length;i-1},o.prototype.bulletMouseDown=function(e){if(this.isTouchEvent(e)){this.isReact&&this.clearTemplate(),t.remove(document.getElementById("tooltipDiv"+this.element.id));var i=e.target.id,r=e.target.className.baseVal;this.bulletTooltipModule&&(this.bulletTooltipModule._elementTooltip(e,r,i,this.mouseX),this.bulletTooltipModule._displayTooltip(e,r,i,this.mouseX,this.mouseY))}},o.prototype.bulletChartOnMouseClick=function(e){var t=e.target;return this.trigger("chartMouseClick",{target:t.id,x:this.mouseX,y:this.mouseY}),this.notify("click",e),!1},o.prototype.print=function(e){new xr(this).print(e)},o.prototype.export=function(e,t,i,r,o,n,a){r=r||[this],new xr(this).export(e,t,i,r,o,n,a)},o.prototype.onPropertyChanged=function(e,t){var i=!1,o=!1;if(this.animateSeries=!1,!this.delayRedraw){for(var n=0,a=Object.keys(e);n0;)t.isBlazor()||1===C.length?(S.appendChild(C[0]),C=null):S.appendChild(C[0]);w.template=S.innerHTML,this.control.trigger("tooltipRender",w),S.innerHTML=w.template,u.appendChild(S)}else{for(var P="Value : "+w.value,L=0;L Target"+(0===L?"":"_"+L)+" : "+w.target[L];w.text=P,this.control.trigger("tooltipRender",w),u.innerHTML=w.text,u.style.font=this.control.tooltip.textStyle.fontStyle?this.control.tooltip.textStyle.fontStyle:e.BulletChartTheme.tooltipLabelFont.fontStyle,u.style.color=e.BulletChartTheme.tooltipLabelFont.color||this.control.themeStyle.tooltipBoldLabel,u.style.fontSize=e.BulletChartTheme.titleFont.size}var R=this.control.tooltip.fill?this.control.tooltip.fill:this.control.themeStyle.tooltipFill,M=this.control.tooltip.border.width?this.control.tooltip.border.width:1,A=this.control.tooltip.border.color?this.control.tooltip.border.color:"Black",T=n,k=a;if(T=T+Be(u.getAttribute("width"),this.control.containerWidth)o.x+o.width+this.legend.shapeWidth/2||this.isVertical?(e.location.x=t.x,e.location.y=n===a?r.location.y:r.location.y+this.maxItemHeight+l):(e.location.x=n===a?r.location.x:s,e.location.y=r.location.y);var h=this.legendBounds.x+this.legendBounds.width-(e.location.x+i-this.legend.shapeWidth/2);e.text=Ie(+h.toFixed(4),e.text,this.legend.textStyle)},r.prototype.click=function(e){var t=e.target.id;t.indexOf(this.legendID+"_pagedown")>-1?this.changePage(e,!1):t.indexOf(this.legendID+"_pageup")>-1&&this.changePage(e,!0)},r.prototype.getModuleName=function(){return"BulletChartLegend"},r.prototype.destroy=function(){this.removeEventListener()},r}(yr),Ls=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Rs=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},Ms=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ls(i,e),Rs([t.Property("Segoe UI")],i.prototype,"fontFamily",void 0),Rs([t.Property("Normal")],i.prototype,"fontStyle",void 0),Rs([t.Property("Regular")],i.prototype,"fontWeight",void 0),Rs([t.Property("")],i.prototype,"color",void 0),Rs([t.Property("12px")],i.prototype,"size",void 0),Rs([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),As=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ls(i,e),Rs([t.Property(10)],i.prototype,"top",void 0),Rs([t.Property(10)],i.prototype,"bottom",void 0),Rs([t.Property(10)],i.prototype,"right",void 0),Rs([t.Property(10)],i.prototype,"left",void 0),i}(t.ChildProperty),Ts=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ls(i,e),Rs([t.Property(0)],i.prototype,"width",void 0),Rs([t.Property(1)],i.prototype,"opacity",void 0),Rs([t.Property("transparent")],i.prototype,"color",void 0),i}(t.ChildProperty),ks=function(){function e(e,t,i,r){this.x=e,this.y=t,this.width=i,this.height=r}return e}(),_s=function(){function e(){}return e}(),Os=function(){function e(){}return e}(),Es=function(){function e(){}return e}(),zs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ls(t,e),t}(_s),Is=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ls(t,e),t}(zs),Ds=function(){function e(){}return e}(),Bs=function(){function e(){}return e}(),Ns=function(){function e(){}return e}(),Fs=function(){function e(){}return e}(),Vs=function(){function e(e,t,i,r,o){this.id=e,this.fill=t,this.borderColor=i,this.borderWidth=r,this.opacity=o}return e}(),js=function(){function e(){}return e}(),Hs=function(){function e(){this.counterclockwise=0,this.clockwise=1}return e}(),Xs=function(){function e(){}return e}(),Ys=function(){function e(){}return e}(),Gs=function(){function e(e,t){this.width=e,this.height=t}return e}(),Ws=function(){function e(){}return e}(),Us=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Zs=function(){function e(e,t,i,r,o,n,a){this.id=e,this.opacity=o,this.fill=t,this.stroke=r,this["stroke-width"]=i,this["stroke-dasharray"]=n,this.d=a}return e}(),qs=function(e){function t(t,i,r,o,n){var a=e.call(this,t,i,r.width,r.color,o)||this;return a.y=n.y,a.x=n.x,a.height=n.height,a.width=n.width,a}return Us(t,e),t}(Zs),Qs=function(e){function t(t,i,r,o,n,a,s,l){var h=e.call(this,t,i,r.width,r.color,o)||this;return h.cy=a,h.cx=n,h.r=s,h["stroke-dasharray"]=l,h}return Us(t,e),t}(Zs),$s=function(){function e(e,t,i,r,o){this.id=e,this.x=t,this.y=i,this.anchor=r,this.text=o}return e}();!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto, Segoe UI, Noto, Sans-serif"},e.smithchartTitleFont={size:"15px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto, Segoe UI, Noto, Sans-serif"},e.smithchartSubtitleFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto, Segoe UI, Noto, Sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto, Segoe UI, Noto, Sans-serif"},e.legendLabelFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto, Segoe UI, Noto, Sans-serif"}}(ls||(ls={}));var Js=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ks=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},el=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Js(i,e),Ks([t.Property(!0)],i.prototype,"visible",void 0),Ks([t.Property("")],i.prototype,"text",void 0),Ks([t.Property("")],i.prototype,"description",void 0),Ks([t.Property("Center")],i.prototype,"textAlignment",void 0),Ks([t.Complex(ls.legendLabelFont,Ms)],i.prototype,"textStyle",void 0),i}(t.ChildProperty),tl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Js(i,e),Ks([t.Property(0)],i.prototype,"x",void 0),Ks([t.Property(0)],i.prototype,"y",void 0),i}(t.ChildProperty),il=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Js(i,e),Ks([t.Property(1)],i.prototype,"width",void 0),Ks([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),rl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Js(i,e),Ks([t.Property(10)],i.prototype,"width",void 0),Ks([t.Property(10)],i.prototype,"height",void 0),Ks([t.Complex({},il)],i.prototype,"border",void 0),i}(t.ChildProperty),ol=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Js(i,e),Ks([t.Property(1)],i.prototype,"width",void 0),Ks([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),nl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Js(i,e),Ks([t.Property(!1)],i.prototype,"visible",void 0),Ks([t.Property("bottom")],i.prototype,"position",void 0),Ks([t.Property("Center")],i.prototype,"alignment",void 0),Ks([t.Property(null)],i.prototype,"width",void 0),Ks([t.Property(null)],i.prototype,"height",void 0),Ks([t.Property("circle")],i.prototype,"shape",void 0),Ks([t.Property(null)],i.prototype,"rowCount",void 0),Ks([t.Property(null)],i.prototype,"columnCount",void 0),Ks([t.Property(8)],i.prototype,"itemPadding",void 0),Ks([t.Property(5)],i.prototype,"shapePadding",void 0),Ks([t.Property("")],i.prototype,"description",void 0),Ks([t.Property(!0)],i.prototype,"toggleVisibility",void 0),Ks([t.Complex({},el)],i.prototype,"title",void 0),Ks([t.Complex({},tl)],i.prototype,"location",void 0),Ks([t.Complex({},rl)],i.prototype,"itemStyle",void 0),Ks([t.Complex({},ol)],i.prototype,"border",void 0),Ks([t.Complex(ls.legendLabelFont,Ms)],i.prototype,"textStyle",void 0),i}(t.ChildProperty),al=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sl=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},ll=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return al(i,e),sl([t.Property(1)],i.prototype,"width",void 0),sl([t.Property("")],i.prototype,"dashArray",void 0),sl([t.Property(!0)],i.prototype,"visible",void 0),sl([t.Property(null)],i.prototype,"color",void 0),sl([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),hl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return al(i,e),sl([t.Property(1)],i.prototype,"width",void 0),sl([t.Property("")],i.prototype,"dashArray",void 0),sl([t.Property(!1)],i.prototype,"visible",void 0),sl([t.Property(null)],i.prototype,"color",void 0),sl([t.Property(8)],i.prototype,"count",void 0),i}(t.ChildProperty),cl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return al(i,e),sl([t.Property(!0)],i.prototype,"visible",void 0),sl([t.Property(1)],i.prototype,"width",void 0),sl([t.Property(null)],i.prototype,"color",void 0),sl([t.Property("")],i.prototype,"dashArray",void 0),i}(t.ChildProperty),dl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return al(i,e),sl([t.Property(!0)],i.prototype,"visible",void 0),sl([t.Property("Outside")],i.prototype,"labelPosition",void 0),sl([t.Property("Hide")],i.prototype,"labelIntersectAction",void 0),sl([t.Complex({},ll)],i.prototype,"majorGridLines",void 0),sl([t.Complex({},hl)],i.prototype,"minorGridLines",void 0),sl([t.Complex({},cl)],i.prototype,"axisLine",void 0),sl([t.Complex(ls.axisLabelFont,Ms)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),pl=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ul=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},gl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return pl(i,e),ul([t.Property(!0)],i.prototype,"visible",void 0),ul([t.Property("")],i.prototype,"text",void 0),ul([t.Property("")],i.prototype,"description",void 0),ul([t.Property("Far")],i.prototype,"textAlignment",void 0),ul([t.Property(!0)],i.prototype,"enableTrim",void 0),ul([t.Property(null)],i.prototype,"maximumWidth",void 0),ul([t.Complex(ls.smithchartSubtitleFont,Ms)],i.prototype,"textStyle",void 0),i}(t.ChildProperty),yl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return pl(i,e),ul([t.Property(!0)],i.prototype,"visible",void 0),ul([t.Property("")],i.prototype,"text",void 0),ul([t.Property("")],i.prototype,"description",void 0),ul([t.Property("Center")],i.prototype,"textAlignment",void 0),ul([t.Property(!0)],i.prototype,"enableTrim",void 0),ul([t.Property(null)],i.prototype,"maximumWidth",void 0),ul([t.Complex({},gl)],i.prototype,"subtitle",void 0),ul([t.Complex(ls.smithchartTitleFont,Ms)],i.prototype,"font",void 0),ul([t.Complex(ls.smithchartTitleFont,Ms)],i.prototype,"textStyle",void 0),i}(t.ChildProperty),ml=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),vl=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},fl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property(1)],i.prototype,"width",void 0),vl([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),bl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property(!1)],i.prototype,"visible",void 0),vl([t.Property(null)],i.prototype,"fill",void 0),vl([t.Property(.95)],i.prototype,"opacity",void 0),vl([t.Property("")],i.prototype,"template",void 0),vl([t.Complex({},fl)],i.prototype,"border",void 0),i}(t.ChildProperty),xl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property(3)],i.prototype,"width",void 0),vl([t.Property("white")],i.prototype,"color",void 0),i}(t.ChildProperty),wl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property(.1)],i.prototype,"width",void 0),vl([t.Property("white")],i.prototype,"color",void 0),i}(t.ChildProperty),Sl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property(1)],i.prototype,"width",void 0),vl([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),Cl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property(!1)],i.prototype,"visible",void 0),vl([t.Property("")],i.prototype,"template",void 0),vl([t.Property(null)],i.prototype,"fill",void 0),vl([t.Property(1)],i.prototype,"opacity",void 0),vl([t.Complex({},wl)],i.prototype,"border",void 0),vl([t.Complex({},Sl)],i.prototype,"connectorLine",void 0),vl([t.Complex(ls.dataLabelFont,Ms)],i.prototype,"textStyle",void 0),i}(t.ChildProperty),Pl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property(!1)],i.prototype,"visible",void 0),vl([t.Property("circle")],i.prototype,"shape",void 0),vl([t.Property(6)],i.prototype,"width",void 0),vl([t.Property(6)],i.prototype,"height",void 0),vl([t.Property("")],i.prototype,"imageUrl",void 0),vl([t.Property("")],i.prototype,"fill",void 0),vl([t.Property(1)],i.prototype,"opacity",void 0),vl([t.Complex({},xl)],i.prototype,"border",void 0),vl([t.Complex({},Cl)],i.prototype,"dataLabel",void 0),i}(t.ChildProperty),Ll=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property("visible")],i.prototype,"visibility",void 0),vl([t.Property([])],i.prototype,"points",void 0),vl([t.Property("")],i.prototype,"resistance",void 0),vl([t.Property("")],i.prototype,"reactance",void 0),vl([t.Property("")],i.prototype,"tooltipMappingName",void 0),vl([t.Property(null)],i.prototype,"dataSource",void 0),vl([t.Property("")],i.prototype,"name",void 0),vl([t.Property(null)],i.prototype,"fill",void 0),vl([t.Property(!1)],i.prototype,"enableAnimation",void 0),vl([t.Property("2000ms")],i.prototype,"animationDuration",void 0),vl([t.Property(!1)],i.prototype,"enableSmartLabels",void 0),vl([t.Property(1)],i.prototype,"width",void 0),vl([t.Property(1)],i.prototype,"opacity",void 0),vl([t.Complex({},Pl)],i.prototype,"marker",void 0),vl([t.Complex({},bl)],i.prototype,"tooltip",void 0),i}(t.ChildProperty),Rl=function(){function e(){}return e.prototype.calculateAreaBounds=function(e,t,i){var r=e.margin,o=e.border,n=this.getLegendSpace(e,i),a=n.leftLegendWidth+r.left+o.width,s=n.rightLegendWidth+r.left+r.right+2*o.width,l=e.availableSize.width-(a+s);return{x:a,y:r.top+2*e.elementSpacing+n.modelTitleHeight+n.modelsubTitleHeight+n.topLegendHeight+o.width,width:l,height:e.availableSize.height-(n.modelTitleHeight+2*e.elementSpacing+n.modelsubTitleHeight+r.top+n.topLegendHeight+n.bottomLegendHeight)}},e.prototype.getLegendSpace=function(e,t){var i,r=e.title,o=e.legendSettings,n=o.position.toLowerCase(),a=0,s=0,l=e.font,h=0,c=o.border.width,d=0,p=0,u=0,g=0,y=0;return o.visible&&(i=t.width+5+e.elementSpacing+2*c,d="left"===n?i:0,p="right"===n?i:0,y=o.title.visible?ft(o.title.text,l).height:0,u="top"===n?e.elementSpacing+t.height+y:0,g="bottom"===n?e.elementSpacing+t.height+y:0),a=ft(r.subtitle.text,l).height,""!==r.text&&r.visible,h=0,s=""!==r.subtitle.text&&r.subtitle.visible?a:0,{leftLegendWidth:d,rightLegendWidth:p,topLegendHeight:u,bottomLegendHeight:g,modelTitleHeight:h,modelsubTitleHeight:s}},e}(),Ml=function(){function e(){this.radialLabels=[-50,-20,-10,-5,-4,-3,-2,-1.5,-1,-.8,-.6,-.4,-.2,0,.2,.4,.6,.8,1,1.5,2,3,4,5,10,20,50],this.radialLabelCollections=[],this.horizontalLabelCollections=[],this.labelCollections=[],this.direction=new Hs}return e.prototype.renderArea=function(e,t){this.calculateChartArea(e,t),this.calculateCircleMargin(e,t),this.calculateXAxisRange(e),this.calculateRAxisRange(e),this.measureHorizontalAxis(e),this.measureRadialAxis(e),e.horizontalAxis.visible&&this.updateHAxis(e),e.radialAxis.visible&&this.updateRAxis(e),e.horizontalAxis.visible&&this.drawHAxisLabels(e),e.radialAxis.visible&&this.drawRAxisLabels(e)},e.prototype.updateHAxis=function(e){var t=e.horizontalAxis.majorGridLines,i=e.horizontalAxis.minorGridLines,r=e.horizontalAxis.axisLine;t.visible&&this.updateHMajorGridLines(e),i.visible&&this.updateHMinorGridLines(e),r.visible&&this.updateHAxisLine(e)},e.prototype.updateRAxis=function(e){var t=e.radialAxis.majorGridLines,i=e.radialAxis.minorGridLines,r=e.radialAxis.axisLine;t.visible&&this.updateRMajorGridLines(e),i.visible&&this.updateRMinorGridLines(e),r.visible&&this.updateRAxisLine(e)},e.prototype.measureHorizontalAxis=function(e){var t=e.horizontalAxis.minorGridLines;this.measureHMajorGridLines(e),t.visible&&this.measureHMinorGridLines(e)},e.prototype.measureRadialAxis=function(e){var t=e.radialAxis.minorGridLines;this.measureRMajorGridLines(e),t.visible&&this.measureRMinorGridLines(e)},e.prototype.calculateChartArea=function(e,t){var i=e.availableSize.width,r=e.availableSize.height;i=t.width,r=t.height;var o=Math.min(i,r),n=Math.min(i,r),a=t.x+(t.width/2-o/2),s=t.y+((r-n)/2>0?(r-n)/2:0);e.chartArea={x:a,y:s,width:o,height:n}},e.prototype.calculateCircleMargin=function(e,t){var i=0,r=e.chartArea.width,o=e.radius;i=this.maximumLabelLength(e);var n="Outside"===e.radialAxis.labelPosition?i+10:10,a=(r-2*n>0?r-2*n:0)/2,s=o>1?1:o<.1?.1:o;this.areaRadius=a*s,this.circleLeftX=e.chartArea.x+n+a*(1-s),this.circleTopY=e.chartArea.y+n+a*(1-s),this.circleCenterX=this.circleLeftX+this.areaRadius,this.circleCenterY=t.y+t.height/2},e.prototype.maximumLabelLength=function(e){for(var t,i=0,r=e.horizontalAxis.labelStyle,o=0;o1&&(a=this.isOverlap(2,r,s,30)),n||a||e-s>=30&&(i[t]=o,t++,e=s)):(e=s,i[t]=o,t++)}for(var l=[2,3,4,5,10,20,50],h=0;h0?n.y-i:n.y+i:r<0?n.y-i:n.y+i,this.radialLabelCollections.push({centerX:n.x,centerY:t,radius:i,value:r})},e.prototype.measureHMajorGridLines=function(e){var t,i,r,o,n,a=[];this.majorHGridArcPoints=[];for(var s=0;s0?this.direction.clockwise:this.direction.counterclockwise,this.majorRGridArcPoints.push({startPoint:a,endPoint:s,size:l,rotationAngle:2*Math.PI,isLargeArc:!1,sweepDirection:h}),this.labelCollections.push({centerX:o.x,centerY:o.y,angle:n,value:i,radius:this.areaRadius,region:null})):(a={x:this.circleLeftX,y:this.circleCenterY},s={x:this.circleCenterX+this.areaRadius,y:this.circleCenterY},this.majorRGridArcPoints.push({startPoint:a,endPoint:s,size:null,rotationAngle:null,isLargeArc:null,sweepDirection:null}),this.labelCollections.push({centerX:"Impedance"===e.renderType?this.circleCenterX-this.areaRadius:this.circleCenterX+this.areaRadius,centerY:this.circleCenterY,angle:"Impedance"===e.renderType?180:360,value:i,radius:this.areaRadius,region:null})))},e.prototype.circleXYRadianValue=function(e,t,i,r){var o;return o=Math.atan2(r-t,i-e),o=o<0?o+360*Math.PI/180:o},e.prototype.calculateMajorArcStartEndPoints=function(e,t,i){var r=[],o=[],n=this.circleCenterX,a=this.circleCenterY;return t>=10?r[0]="Impedance"===i.renderType?{x:n+this.areaRadius,y:a}:{x:n-this.areaRadius,y:a}:o=t>=3?this.horizontalLabelCollections.filter(function(e){return 10===e.value}):t>=1?this.horizontalLabelCollections.filter(function(e){return 5===e.value}):this.horizontalLabelCollections.filter(function(e){return 3===e.value}),o.length>0&&(r[0]=this.intersectingCirclePoints(e.centerX,e.centerY,e.radius,o[0].centerX,o[0].centerY,o[0].radius,i.renderType)),r[1]=this.intersectingCirclePoints(e.centerX,e.centerY,e.radius,n,a,this.areaRadius,i.renderType),r},e.prototype.calculateHMajorArcStartEndPoints=function(e){var t,i,r=[];return e<=.3?(t=2,i=-2):e<=1?(t=3,i=-3):e<=2?(t=5,i=-5):e<=5?(t=10,i=-10):(t=50,i=-50),r[0]=this.radialLabelCollections.filter(function(e){return e.value===t}),r[1]=this.radialLabelCollections.filter(function(e){return e.value===i}),r},e.prototype.calculateMinorArcStartEndPoints=function(e){var t,i,r=[];return e<=.1?(t=1,i=-1):e<=.2?(t=.8,i=-.8):e<=.3?(t=.4,i=-.4):e<=.6?(t=1,i=-1):e<=1?(t=1.5,i=-1.5):e<=1.5?(t=2,i=-2):e<=2?(t=1,i=-1):e<=5?(t=3,i=-3):(t=10,i=-10),r[0]=this.radialLabelCollections.filter(function(e){return e.value===t}),r[1]=this.radialLabelCollections.filter(function(e){return e.value===i}),r},e.prototype.intersectingCirclePoints=function(e,t,i,r,o,n,a){var s={x:0,y:0},l=e-r,h=t-o,c=Math.sqrt(l*l+h*h),d=c*c,p=(i*i-n*n)/(2*d),u=i*i-n*n,g=Math.sqrt(2*(i*i+n*n)/d-u*u/(d*d)-1),y=(e+r)/2+p*(r-e),m=g*(o-t)/2,v=y+m,f=y-m,b=(t+o)/2+p*(o-t),x=g*(e-r)/2,w=b+x,S=b-x;return"Impedance"===a?ff?(s.x=v,s.y=w):(s.x=f,s.y=S),{x:s.x,y:s.y}},e.prototype.updateHMajorGridLines=function(e){var t=e.horizontalAxis.majorGridLines,i=e.renderer.createGroup({id:e.element.id+"_svg_horizontalAxisMajorGridLines"}),r=this.calculateGridLinesPath(this.majorHGridArcPoints),o=new Zs(e.element.id+"_horizontalAxisMajorGridLines","none",t.width,t.color?t.color:e.themeStyle.majorGridLine,t.opacity,t.dashArray,r),n=e.renderer.drawPath(o);i.appendChild(n),e.svgObject.appendChild(i)},e.prototype.updateRMajorGridLines=function(e){var t=e.radialAxis.majorGridLines,i=e.renderer.createGroup({id:e.element.id+"_svg_radialAxisMajorGridLines"}),r=this.calculateGridLinesPath(this.majorRGridArcPoints),o=new Zs(e.element.id+"_radialAxisMajorGridLines","none",t.width,t.color?t.color:e.themeStyle.majorGridLine,t.opacity,t.dashArray,r),n=e.renderer.drawPath(o);i.appendChild(n),e.svgObject.appendChild(i)},e.prototype.updateHAxisLine=function(e){var t=this.areaRadius,i=e.horizontalAxis.axisLine,r=e.renderer.createGroup({id:e.element.id+"_svg_hAxisLine"}),o={x:this.circleCenterX+t,y:this.circleCenterY},n={x:this.circleCenterX+t,y:this.circleCenterY-.05},a={width:t,height:t},s=this.direction.clockwise,l=2*Math.PI,h="M"+o.x+" "+o.y+" A "+a.width+" "+a.height+" "+l+" 1 "+s+" "+n.x+" "+n.y,c=new Zs(e.element.id+"_horizontalAxisLine","none",i.width,i.color?i.color:e.themeStyle.axisLine,1,i.dashArray,h),d=e.renderer.drawPath(c);r.appendChild(d),e.svgObject.appendChild(r)},e.prototype.updateRAxisLine=function(e){var t=this.areaRadius,i=e.radialAxis.axisLine,r={x:this.circleCenterX-t,y:this.circleCenterY},o={x:this.circleCenterX+t,y:this.circleCenterY},n={width:0,height:0},a=this.direction.counterclockwise,s="M "+r.x+" "+r.y+" A "+n.width+" "+n.height+" 0 0 "+a+" "+o.x+" "+o.y,l=new Zs(e.element.id+"_radialAxisLine","none",i.width,i.color?i.color:e.themeStyle.axisLine,1,i.dashArray,s),h=e.renderer.createGroup({id:e.element.id+"_svg_rAxisLine"}),c=e.renderer.drawPath(l);h.appendChild(c),e.svgObject.appendChild(h)},e.prototype.drawHAxisLabels=function(e){var t=e.horizontalAxis;e.radialAxis.labelStyle.fontFamily=e.themeStyle.fontFamily||e.radialAxis.labelStyle.fontFamily;for(var i,r,o,n,a,s,l,h,c,d,p,u,g,y=e.horizontalAxis.labelStyle,m=e.renderer.createGroup({id:e.element.id+"_HAxisLabels"}),v=this,f=0;fc&&(r=""),"Admittance"===e.renderType&&g5,g=this.calculateMinorArcStartEndPoints(h.value),"Impedance"===e.renderType?(t=g[0],i=g[1]):(t=g[1],i=g[0]),o=this.intersectingCirclePoints(t[0].centerX,t[0].centerY,t[0].radius,s,l.centerY,u,e.renderType),n=this.intersectingCirclePoints(i[0].centerX,i[0].centerY,i[0].radius,s,l.centerY,u,e.renderType),a={width:u,height:u},this.minorHGridArcPoints.push({startPoint:o,endPoint:n,rotationAngle:2*Math.PI,sweepDirection:"Impedance"===e.renderType?this.direction.counterclockwise:this.direction.clockwise,isLargeArc:r,size:a})}},e.prototype.measureRMinorGridLines=function(e){var t,i,r,o,n,a,s,l,h,c,d,p=e.radialAxis.minorGridLines.count,u=Math.PI*(2*this.areaRadius),g=t="Impedance"===e.renderType?this.circleCenterX+this.areaRadius:this.circleCenterX-this.areaRadius,y=this.circleCenterY;this.minorGridArcPoints=[];for(var m={x:g,y:y},v=2;v0?a.value:n.value,o=this.minorGridLineArcIntersectCircle(Math.abs(d));for(var f=1;f180?this.circleCenterY-w:this.circleCenterY+w,C=this.intersectingCirclePoints(t,S,w,o[0].centerX,o[0].centerY,o[0].radius,e.renderType),P={x:C.x,y:C.y},L={x:x.x,y:x.y};s={width:w,height:w};var R=n.value>=0?this.direction.clockwise:this.direction.counterclockwise;this.minorGridArcPoints.push({startPoint:P,endPoint:L,rotationAngle:2*Math.PI,sweepDirection:R,isLargeArc:!1,size:s})}}},e.prototype.minorGridLineArcIntersectCircle=function(e){var t;return t=e>=3?20:e>=1.5?10:e>=.6?3:2,this.horizontalLabelCollections.filter(function(e){return e.value===t})},e.prototype.circlePointPosition=function(e,t,i,r){var o=i*(Math.PI/180);return{x:e+r*Math.cos(o),y:t+r*Math.sin(o)}},e.prototype.setLabelsInsidePosition=function(e,t,i,r){var o=t,n=i;return 0===e||360===e?(o-=r.width,n-=r.height/2):90===e?(o-=r.width,n+=r.height/8):180===e?n+=r.height:270===e?n+=r.height/2:e>0&&e<=20?o-=r.width:e>20&&e<=60?(o-=r.width+r.width/2,n+=r.height/2):e>60&&e<90?(o-=r.width+r.width/4,n+=r.height/4):e>90&&e<=135?(o-=r.width/2,n+=r.height/16):e>135&&e<=150?(o+=r.width/2,n+=r.height/2):e>150&&e<180?(o+=r.width/2,n+=r.height):e>180&&e<=210?(o+=r.width/6,n+=r.height/6):e>210&&e<240?n+=r.height/4:e>225&&e<270?n+=r.height/3:e>270&&e<=300?(o-=r.width+r.width/4,n+=r.height/4):e>300&&e<=330?(o-=r.width+r.width/3,n+=r.height/4):e>330&&e<=340?(o-=r.width+r.width/2,n+=r.height/4):e>340&&(o-=r.width,n+=r.height/8),{x:o,y:n}},e.prototype.setLabelsOutsidePosition=function(e,t,i,r){var o=t,n=i;return 90===e?(o-=r.width/2,n+=r.height):180===e?(o-=r.width+5,n-=r.height/4):270===e?(o-=r.width/2,n-=r.height/4):360===e?(o+=5,n-=r.height/2):e>0&&e<=30?(o+=r.width/4,n+=r.height/8):e>30&&e<=60?(o+=r.width/2,n+=r.height/4):e>60&&e<=90?(o-=r.width/2,n+=r.height):e>90&&e<=135?(o-=r.width,n+=r.height):e>135&&e<=180?(o-=r.width+r.width/4,n+=r.height/4):e>180&&e<=210?(o-=r.width+r.width/4,n-=r.height/4):e>210&&e<=270?(o-=r.width,n-=r.height/4):e>270&&e<=340?n-=r.height/4:e>340&&(n+=r.height/4,o+=r.width/6),{x:o,y:n}},e.prototype.arcRadius=function(e,t,i){var r=i>180?90*Math.PI/180:270*Math.PI/180,o=(t.x-e.x)/2,n=(t.y-e.y)/2,a=(n-o*((Math.cos(r)*n-Math.sin(r)*o)/(Math.cos(r)*o+Math.sin(r)*n)))/Math.sin(r),s=e.y+Math.sin(r)*a;return Math.abs(e.y-s)},e}(),Al=function(){function e(){}return e.prototype.drawMarker=function(e,t,i,r){if(e.series[t].marker.visible){var o=e.series[t].marker,n=e.series[t].points.length-1,a=o.width,s=o.height,l=o.shape,h=e.renderer.createGroup({id:e.element.id+"_svg_series"+t+"_Marker"});i.appendChild(h);for(var c=o.border.width,d=o.border.color,p=o.opacity,u=o.fill?o.fill:e.series[t].fill||e.seriesColors[t%e.seriesColors.length],g=0;gt.y+t.height||e.x+e.width/2t.x+t.width/2)),i},e.prototype.resetValues=function(e){e.xPosition=e.labelOptions.x,e.yPosition=e.labelOptions.y,e.x=e.labelOptions.textX,e.y=e.labelOptions.textY},e.prototype.drawConnectorLines=function(e,t,i,r,o){var n,a=r.location;n=a.y>r.y?r.y:r.y-r.height/2;var s="M "+a.x+" "+a.y+" L "+r.x+" "+n,l=e.series[t].marker.dataLabel.connectorLine,h=l.color?l.color:e.series[t].fill||e.seriesColors[t%e.seriesColors.length],c=new Zs(e.element.id+"_dataLabelConnectorLine_series"+t+"_point"+i,"none",l.width,h,1,"none",s),d=e.renderer.drawPath(c);o.appendChild(d)},e.prototype.drawDatalabelSymbol=function(e,i,r,o,n,a){for(var s=0;s0?g-S:g+S,r=t.circleLeftX+y-x):(o=w<0?g-S:g+S,r=t.circleLeftX+x),n=t.intersectingCirclePoints(v,o,S,r,m,x,e.renderType);var C=gt();Math.abs(w)e.chartArea.x+e.chartArea.width||L.xPositione.chartArea.y+e.chartArea.height)&&(this.dataLabel.labelOptions[M].textOptions[f].connectorFlag=!1,this.dataLabel.labelOptions[M].textOptions[f].visible=!1),L.connectorFlag&&this.dataLabel.drawConnectorLines(e,M,f,L,P)}}for(var R=this,M=0;M-1);r=t.isNullOrUndefined(r)?o.PdfPageOrientation.Landscape:r;var l=''+this.control.svgObject.outerHTML+"",h=window.URL.createObjectURL(new Blob("SVG"===e?[l]:[(new XMLSerializer).serializeToString(this.control.svgObject)],{type:"image/svg+xml"}));if("SVG"===e)this.triggerDownload(i,e,h,s);else{var c=new Image,d=a.getContext("2d");c.onload=function(){if(d.drawImage(c,0,0),window.URL.revokeObjectURL(h),"PDF"===e){var t=new o.PdfDocument,l=a.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");t.pageSettings.orientation=r,l=l.slice(l.indexOf(",")+1),t.pages.add().graphics.drawImage(new o.PdfBitmap(l),0,0,n.control.availableSize.width-60,n.control.availableSize.height),s&&(t.save(i+".pdf"),t.destroy())}else n.triggerDownload(i,e,a.toDataURL("image/png").replace("image/png","image/octet-stream"),s)},c.src=h}},e.prototype.triggerDownload=function(e,i,r,o){t.createElement("a",{attrs:{download:e+"."+i.toLocaleLowerCase(),href:r}}).dispatchEvent(new MouseEvent(o?"click":"move",{view:window,bubbles:!1,cancelable:!0}))},e}(),Ol=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),El=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},zl=function(e){function i(t,i){return e.call(this,t,i)||this}return Ol(i,e),i.prototype.getModuleName=function(){return"smithchart"},i.prototype.getPersistData=function(){return""},i.prototype.createChartSvg=function(){this.removeSvg(),ht(this)},i.prototype.renderTitle=function(e,i,r){var o,n=this,a=e.font?e.font:e.textStyle,s=ft(e.text,a),l=e.textAlignment,h=e.text,c=t.isNullOrUndefined(e.maximumWidth)?Math.abs(this.margin.left+this.margin.right-this.availableSize.width):e.maximumWidth,d=s.width>c;o=s.width>this.availableSize.width?this.margin.left+this.border.width:"Center"===l?this.availableSize.width/2-s.width/2:"Near"===l?this.margin.left+this.elementSpacing+this.border.width:this.availableSize.width-s.width-(this.margin.right+this.elementSpacing+this.border.width);var p=this.margin.top+s.height/2+this.elementSpacing;e.enableTrim&&d&&(h=dt(c,e.text,a),s=ft(h,a)),r=this.renderer.createGroup({id:this.element.id+"_Title_Group"});var u,g={text:h,x:o,y:p,name:"titleRender",cancel:!1},y=function(t){if(!t.cancel){u=new $s(n.element.id+"_Smithchart_"+i,t.x,t.y,"start",t.text),a.fontFamily=n.themeStyle.fontFamily||e.textStyle.fontFamily,a.size=n.themeStyle.fontSize||e.textStyle.size,Ct(u,a,n.themeStyle.chartTitle,r).setAttribute("aria-label",e.description||t.text);var o={x:t.x,y:t.y,textSize:s};n.svgObject.appendChild(r),""!==e.subtitle.text&&e.subtitle.visible&&n.renderSubtitle(e,i,s,n.availableSize,o,r)}};y.bind(this),this.trigger("titleRender",g,y)},i.prototype.renderSubtitle=function(e,i,r,o,n,a){var s=this,l=e.subtitle.textStyle,h=e.subtitle,c=ft(h.text,l),d=h.text,p=t.isNullOrUndefined(h.maximumWidth)?.75*this.bounds.width:h.maximumWidth;h.enableTrim&&c.width>p&&(d=dt(p,h.text,l));var u="Far"===e.subtitle.textAlignment?n.x+n.textSize.width:"Near"===e.subtitle.textAlignment?n.x:n.x+n.textSize.width/2,g=n.y+2*this.elementSpacing,y="Far"===e.subtitle.textAlignment?"end":"Near"===e.subtitle.textAlignment?"start":"middle",m={text:d,x:u,y:g,name:"subtitleRender",cancel:!1},v=function(e){if(!e.cancel){var t=Ct(new $s(s.element.id+"_Smithchart_"+i,e.x,e.y,y,e.text),l,s.themeStyle.chartTitle,a);t.setAttribute("aria-label",h.description||e.text),a.appendChild(t)}};v.bind(this),this.trigger("subtitleRender",m,v)},i.prototype.renderBorder=function(){var e=this.border;this.background=this.background?this.background:this.themeStyle.background;var t=new qs(this.element.id+"_SmithchartBorder",this.background,e,1,new ks(e.width/2,e.width/2,this.availableSize.width-e.width,this.availableSize.height-e.width));this.svgObject.appendChild(this.renderer.drawRectangle(t))},i.prototype.onPropertyChanged=function(e,t){for(var i=!1,r=0,o=Object.keys(e);r0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}},El([t.Property("Impedance")],i.prototype,"renderType",void 0),El([t.Property("")],i.prototype,"width",void 0),El([t.Property("")],i.prototype,"height",void 0),El([t.Property("Material")],i.prototype,"theme",void 0),El([t.Complex({},As)],i.prototype,"margin",void 0),El([t.Complex({},Ms)],i.prototype,"font",void 0),El([t.Complex({},Ts)],i.prototype,"border",void 0),El([t.Complex({},yl)],i.prototype,"title",void 0),El([t.Collection([{}],Ll)],i.prototype,"series",void 0),El([t.Complex({},nl)],i.prototype,"legendSettings",void 0),El([t.Complex({},dl)],i.prototype,"horizontalAxis",void 0),El([t.Complex({},dl)],i.prototype,"radialAxis",void 0),El([t.Property(null)],i.prototype,"background",void 0),El([t.Property(10)],i.prototype,"elementSpacing",void 0),El([t.Property(1)],i.prototype,"radius",void 0),El([t.Event()],i.prototype,"beforePrint",void 0),El([t.Event()],i.prototype,"animationComplete",void 0),El([t.Event()],i.prototype,"load",void 0),El([t.Event()],i.prototype,"loaded",void 0),El([t.Event()],i.prototype,"legendRender",void 0),El([t.Event()],i.prototype,"titleRender",void 0),El([t.Event()],i.prototype,"subtitleRender",void 0),El([t.Event()],i.prototype,"textRender",void 0),El([t.Event()],i.prototype,"axisLabelRender",void 0),El([t.Event()],i.prototype,"seriesRender",void 0),El([t.Event()],i.prototype,"tooltipRender",void 0),i=El([t.NotifyPropertyChanges],i)}(t.Component),Il=function(){function e(){}return e.prototype.smithchartMouseMove=function(e,t){var i,r,o;"touchend"===t.type||"touchmove"===t.type?(r=(i=t).changedTouches[0].clientX,o=i.changedTouches[0].clientY,this.tooltipElement=void 0):(o=t.clientY,r=t.clientX),this.setMouseXY(e,r,o);for(var n=0;n"+l.reactance+""],c={cancel:!1,name:"tooltipRender",text:(l.tooltip?[l.tooltip]:null)||h,headerText:""+a.name+"",template:a.tooltip.template,point:l},d=function(r){var o=e.series[n].marker.height/2,h=document.getElementById(e.element.id+"_smithchart_tooltip_div");t.isNullOrUndefined(h)&&(h=t.createElement("div",{id:e.element.id+"_smithchart_tooltip_div",styles:"pointer-events: none; position: absolute;z-index:1;"}),document.getElementById(e.element.id+"_Secondary_Element").appendChild(h)),s.tooltipElement=new i.Tooltip({enable:!0,header:r.headerText,content:r.text,border:a.tooltip.border,fill:e.themeStyle.tooltipFill,data:l,template:r.template,location:{x:s.locationX+e.element.offsetLeft,y:s.locationY-o+e.element.offsetTop},shared:!1,areaBounds:new ks(e.bounds.x,e.bounds.y,e.bounds.width,e.bounds.height),palette:[a.fill||e.seriesColors[n%e.seriesColors.length]],shapes:["Circle"],availableSize:e.availableSize,theme:e.theme,blazorTemplate:{name:"TooltipTemplate",parent:e.series[n].tooltip}}),s.tooltipElement.opacity=e.themeStyle.tooltipFillOpacity||s.tooltipElement.opacity,s.tooltipElement.textStyle.fontFamily=e.themeStyle.fontFamily||"Roboto, Segoe UI, Noto, Sans-serif",s.tooltipElement.textStyle.opacity=e.themeStyle.tooltipTextOpacity||s.tooltipElement.textStyle.opacity,s.tooltipElement.appendTo(h)};d.bind(this,e),e.trigger("tooltipRender",c,d)},e.prototype.closestPointXY=function(e,t,i,r,o){for(var n,a,s,l=0;l0?r.itemPadding:0,s=r.position.toLowerCase(),l=r.title.textStyle,h=0,c=0,d=0,p=e.availableSize.width-(4*e.elementSpacing-2*r.border.width+2*e.border.width),u=r.rowCount,g=r.columnCount,y=ft(e.legendSettings.title.text,l),m=0,v=0,f=0,b=0,x=0,w=e.series.length;if(e.legendSettings.visible&&0!==w){"bottom"===s||"top"===s||"custom"===s?(u&&g&&u<=g?u=w/g:null==u&&null!=g?u=w/g:null==u&&null==g&&(u=1),u&&(t=Math.ceil(w/u))):(u&&g&&u<=g?g=w/u:null!=u&&null==g?g=w/u:null==u&&null==g&&(g=1),g&&(t=g));for(var S=0;Sp&&(f-=C.width+a,m=Math.max(m,f),f=C.width+a,v=v+b+a),x!==t&&S!==w-1||(m=Math.max(m,f),d=v=v+b+a,x=0,b=0,f=0)}i={x:0,y:0,width:y.width>m-a?y.width+20+a:m+20-2*e.border.width,height:d+e.elementSpacing}}this.legendActualBounds=i,null!=n&&(this.legendActualBounds.width=n),null!=o&&(this.legendActualBounds.height=o)},e.prototype._getLegendSize=function(e,t){var i=e.legendSettings,r=i.itemStyle.width,o=i.itemStyle.height,n=ft(t.text,i.textStyle);return{width:r+n.width+i.shapePadding,height:Math.max(o,n.height)}},e.prototype._drawLegend=function(e){var t,i,r=e.legendSettings,o=r.position.toLowerCase(),n=r.alignment,a=this.legendActualBounds,s=0,l=e.title.font?e.title.font:e.title.textStyle,h=ft(e.title.text,l).height,c=ft(e.title.subtitle.text,e.title.subtitle.textStyle).height,d=e.elementSpacing,p=h+c+d+e.margin.top,u=r.itemPadding>0?r.itemPadding:0,g=e.availableSize.width,y=e.availableSize.height,m=r.border.width,v=0,f=ft(r.title.text,r.title.textStyle).height,b=e.border.width,x=g-2*b,w=y-2*b;if(a.height+=f,"custom"!==o){switch(o){case"bottom":a.y=w-(a.height+m+d);break;case"top":a.y=b+p;break;case"right":a.x=x-a.width-2*d;break;case"left":a.x=b+2*d}if("left"===o||"right"===o)switch(n){case"Center":a.y=w/2-(a.height+2*m)/2+d/2;break;case"Near":a.y=b+2*d+p;break;case"Far":a.y=w-(a.height+m)-2*d}else switch(n){case"Center":a.x=x/2-(a.width+2*m)/2+d/2;break;case"Near":a.x=b+2*d;break;case"Far":a.x=x-(a.width+m)-2*d}}else a.y=r.location.yx){a.x=x/2-(a.width+2*m)/2+d/2;break}var C=e.renderer.createGroup({id:e.element.id+"_legend_group"});e.svgObject.appendChild(C),this.legendItemGroup=e.renderer.createGroup({id:e.element.id+"legendItem_Group"});var P=t=d,L=i=d;""!==r.title.text&&r.title.visible&&(C.appendChild(this.drawLegendTitle(e,r,a,C)),L=i=d+f);for(var R=0;Ra.height+i&&(L=i,P+=s+u),this.legendGroup=this.drawLegendItem(e,r,this.legendSeries[R],R,P,L,a),C.appendChild(this.legendGroup),L+=this.legendSeries[R].bounds.height+u,s=Math.max(s,this.legendSeries[R].bounds.width)):(P+this.legendSeries[R].bounds.width>a.width+t&&(P=d,L+=this.legendSeries[R].bounds.height+u),this.legendGroup=this.drawLegendItem(e,r,this.legendSeries[R],R,P,L,a),C.appendChild(this.legendGroup),P+=this.legendSeries[R].bounds.width+u);C.setAttribute("transform","translate("+a.x.toString()+","+a.y.toString()+")"),this.drawLegendBorder(C,e,r,a)},e.prototype.drawLegendBorder=function(e,t,i,r){var o=new qs(t.element.id+"_svg_legendRect","none",i.border,1,new ks(0,0,r.width,r.height));e.appendChild(t.renderer.drawRectangle(o))},e.prototype.drawLegendTitle=function(e,t,i,r){var o=e.elementSpacing,n=ft(t.title.text,t.title.textStyle),a=n.width,s=n.height,l=t.title.textAlignment,h=0,c=i.width,d=o+s/2;switch(l){case"Far":h=c-a-h;break;case"Center":h=c/2-a/2}h<0&&(h=0,c=a),cc.height?l:c.height)/2};var d=e.renderer.createGroup({id:e.element.id+"_svg_Legend"+r.toString()});d.style.cursor=t.toggleVisibility?"pointer":"default";var p={text:i.text,fill:i.fill,shape:i.shape,name:"legendRender",cancel:!1},u=function(o){if(!o.cancel){var n=h.drawLegendShape(e,i,s.x,s.y,r,t,o);d.appendChild(n);var a=new $s(e.element.id+"_LegendItemText"+r.toString(),s.x+c.width/2+t.shapePadding,s.y+l/4,"start",o.text);t.textStyle.fontFamily=e.themeStyle.fontFamily||t.textStyle.fontFamily,t.textStyle.size=e.themeStyle.fontSize||t.textStyle.size;var p=Ct(a,t.textStyle,e.themeStyle.legendLabel,d);p.setAttribute("aria-label",t.description||"Click to show or hide the "+a.text+" series"),d.appendChild(p),h.legendItemGroup.appendChild(d)}};return u.bind(this),e.trigger("legendRender",p,u),this.legendItemGroup},e.prototype.drawLegendShape=function(e,t,i,r,o,n,a){var s,l,h,c,d=n.itemStyle,p=d.width,u=d.height,g=i+-p/2,y={color:d.border.color,width:d.border.width},m="visible"===e.series[o].visibility?a.fill:"grey",v=a.shape.toLowerCase(),f=Math.sqrt(u*u+p*p)/2;switch(v){case"circle":l=new Qs(e.element.id+"_svg_LegendItemShape"+o.toString(),m,y,1,i,r,f,null),s=e.renderer.drawCircle(l);break;case"rectangle":c="M "+g+" "+(r+-u/2)+" L "+(p/2+i)+" "+(r+-u/2)+" L "+(i+p/2)+" "+(r+u/2)+" L "+g+" "+(r+u/2)+" L "+g+" "+(r+-u/2)+" z",h=new Zs(e.element.id+"_svg_LegendItemShape"+o.toString(),m,y.width,y.color,1,"",c),s=e.renderer.drawPath(h);break;case"diamond":c="M "+g+" "+r+" L "+i+" "+(r+-u/2)+" L "+(p/2+i)+" "+r+" L "+i+" "+(r+u/2)+" L "+g+" "+r+" z",h=new Zs(e.element.id+"_svg_LegendItemShape"+o.toString(),m,y.width,y.color,1,"",c),s=e.renderer.drawPath(h);break;case"pentagon":for(var b=0;b<=5;b++){var x=f*Math.cos(Math.PI/180*(72*b)),w=f*Math.sin(Math.PI/180*(72*b));c=0===b?"M "+(x+i)+" "+(r+w)+" ":c.concat("L "+(i+x)+" "+(r+w)+" ")}c=c.concat("Z"),h=new Zs(e.element.id+"_svg_LegendItemShape"+o.toString(),m,y.width,y.color,1,"",c),s=e.renderer.drawPath(h);break;case"triangle":c="M "+g+" "+(u/2+r)+" L "+i+" "+(r+-u/2)+" L "+(i+p/2)+" "+(r+u/2)+" L "+g+" "+(r+u/2)+" Z",h=new Zs(e.element.id+"_svg_LegendItemShape"+o.toString(),m,y.width,y.color,1,"",c),s=e.renderer.drawPath(h)}return s},e.prototype.getModuleName=function(){return"SmithchartLegend"},e.prototype.destroy=function(e){},e}(),Bl=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Nl=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},Fl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property("")],i.prototype,"color",void 0),Nl([t.Property(0)],i.prototype,"width",void 0),i}(t.ChildProperty),Vl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(null)],i.prototype,"size",void 0),Nl([t.Property(null)],i.prototype,"color",void 0),Nl([t.Property("Roboto, Segoe UI, Noto, Sans-serif")],i.prototype,"fontFamily",void 0),Nl([t.Property(null)],i.prototype,"fontWeight",void 0),Nl([t.Property(null)],i.prototype,"fontStyle",void 0),Nl([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),jl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(!1)],i.prototype,"visible",void 0),Nl([t.Property(null)],i.prototype,"color",void 0),Nl([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Hl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(!1)],i.prototype,"visible",void 0),Nl([t.Property("")],i.prototype,"fill",void 0),Nl([t.Property("")],i.prototype,"template",void 0),Nl([t.Property("")],i.prototype,"format",void 0),Nl([t.Complex({color:"#cccccc",width:.5},Fl)],i.prototype,"border",void 0),Nl([t.Complex({size:"13px",fontWeight:"Normal",fontStyle:"Normal",fontFamily:"Roboto, Segoe UI, Noto, Sans-serif"},Vl)],i.prototype,"textStyle",void 0),Nl([t.Complex({},jl)],i.prototype,"trackLineSettings",void 0),i}(t.ChildProperty),Xl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property("transparent")],i.prototype,"background",void 0),Nl([t.Complex({},Fl)],i.prototype,"border",void 0),i}(t.ChildProperty),Yl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(!1)],i.prototype,"visible",void 0),Nl([t.Property(null)],i.prototype,"color",void 0),Nl([t.Property("")],i.prototype,"dashArray",void 0),Nl([t.Property(1)],i.prototype,"width",void 0),Nl([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),Gl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(null)],i.prototype,"startRange",void 0),Nl([t.Property(null)],i.prototype,"endRange",void 0),Nl([t.Property(null)],i.prototype,"color",void 0),Nl([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),Wl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(null)],i.prototype,"minX",void 0),Nl([t.Property(null)],i.prototype,"maxX",void 0),Nl([t.Property(null)],i.prototype,"minY",void 0),Nl([t.Property(null)],i.prototype,"maxY",void 0),Nl([t.Property(0)],i.prototype,"value",void 0),Nl([t.Complex({},Yl)],i.prototype,"lineSettings",void 0),i}(t.ChildProperty),Ul=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(5)],i.prototype,"left",void 0),Nl([t.Property(5)],i.prototype,"right",void 0),Nl([t.Property(5)],i.prototype,"bottom",void 0),Nl([t.Property(5)],i.prototype,"top",void 0),i}(t.ChildProperty),Zl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property([])],i.prototype,"visible",void 0),Nl([t.Property(1)],i.prototype,"opacity",void 0),Nl([t.Property(5)],i.prototype,"size",void 0),Nl([t.Property("#00bdae")],i.prototype,"fill",void 0),Nl([t.Complex({width:1},Fl)],i.prototype,"border",void 0),i}(t.ChildProperty),ql=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(0)],i.prototype,"x",void 0),Nl([t.Property(0)],i.prototype,"y",void 0),i}(t.ChildProperty),Ql=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property([])],i.prototype,"visible",void 0),Nl([t.Property(1)],i.prototype,"opacity",void 0),Nl([t.Property("transparent")],i.prototype,"fill",void 0),Nl([t.Property("")],i.prototype,"format",void 0),Nl([t.Complex({color:"transparent",width:0},Fl)],i.prototype,"border",void 0),Nl([t.Complex({size:"14px",fontWeight:"Medium",fontStyle:"Medium",fontFamily:"Roboto, Segoe UI, Noto, Sans-serif"},Vl)],i.prototype,"textStyle",void 0),Nl([t.Complex({},ql)],i.prototype,"offset",void 0),Nl([t.Property("None")],i.prototype,"edgeLabelMode",void 0),i}(t.ChildProperty),$l=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Jl=function(){function e(e,t){this.width=e,this.height=t}return e}(),Kl=function(){function e(e,t,i,r){this.x=e,this.y=t,this.width=i,this.height=r}return e}(),eh=function(){function e(e,t,i,r,o,n,a){this.id=e,this.fill=t,this.opacity=o,this["stroke-width"]=i,this.stroke=r,this.d=a,this["stroke-dasharray"]=n}return e}(),th=function(e){function t(t,i,r,o,n,a,s,l,h){void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=0),void 0===h&&(h=0);var c=e.call(this,t,i,r.width,r.color,o)||this;return c.rect=n,c.topLeft=a,c.topRight=s,c.bottomLeft=l,c.bottomRight=h,c}return $l(t,e),t}(eh),ih=function(e){function t(t,i,r,o,n,a,s,l){var h=e.call(this,t,i,r.width,r.color,o)||this;return h.cy=a,h.cx=n,h.r=s,h["stroke-dasharray"]=l,h}return $l(t,e),t}(eh),rh=function(){function e(e,t,i,r,o,n,a){void 0===a&&(a=""),this.transform="",this.baseLine="auto",this.id=e,this.x=t,this.y=i,this.anchor=r,this.text=o,this.transform=a,this.baseLine=n}return e}(),oh=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o=t.rangeBandSettings[o].endRange)&&e.rangeBand(t.rangeBandSettings[o],r,o);e.sparkline.svgObject.appendChild(r)}e["render"+t.type](e.visiblePoints,i),e.renderMarker(e.visiblePoints),e.renderLabel(e.visiblePoints)}};r.bind(this),t.trigger("seriesRendering",i,r)},e.prototype.rangeBand=function(e,t,i){var r=this.sparkline,o=r.availableSize.height-2*r.padding.top,n=r.availableSize.width-2*r.padding.left,a=e.startRange,s=e.endRange,l=o-o/this.unitY*(a-this.min)+r.padding.top,h=o-o/this.unitY*(s-this.min)+r.padding.top,c=e.color||this.sparkline.sparkTheme.rangeBandColor;h>o+r.padding.top?h=o+r.padding.top:h<0+r.padding.top&&(h=0+r.padding.top),l>o+r.padding.top?l=o+r.padding.top:l<0+r.padding.top&&(l=0+r.padding.top);var d="M "+r.padding.left+" "+l+" L "+(n+r.padding.left)+" "+l+" L "+(n+r.padding.left)+" "+h+" L "+r.padding.left+" "+h+" Z ",p={id:r.element.id+"_rangeBand_"+i,fill:c,opacity:e.opacity,stroke:"transparent","stroke-width":r.lineWidth,d:d,"stroke-dasharray":""};zt(this.sparkline,p,t)},e.prototype.renderLine=function(e,t){var i=this.sparkline,r=this.sparkline.renderer.createGroup({id:i.element.id+"_sparkline_g","clip-path":"url(#"+this.clipId+")"}),o=this.sparkline.fill;o="#00bdae"===this.sparkline.fill&&"Bootstrap4"===this.sparkline.theme?this.sparkline.sparkTheme.axisLineColor:o;for(var n=new eh(i.element.id+"_sparkline_line","transparent",t.lineWidth,o,i.opacity),a="",s=0,l=e.length;sthis.axisValue?t.fill:r.negativePointColor||"#e20f07",a.stroke=t.border.color?t.border.color:a.fill,a.rect=new Kl(i.x,i.y,i.width,i.height),i.location.x=i.x+i.width/2,i.location.y=i.yVal>=this.axisValue?i.y:i.y+i.height;var c=this.triggerPointRender("pointRendering",h,a.fill,{color:a.stroke,width:t.border.width});a.fill=c.fill,a.stroke=c.border.color,a["stroke-width"]=c.border.width,c.cancel||Et(r,a,o).setAttribute("aria-label",r.dataSource[h][r.xName]+" : "+e[h].yVal)}this.sparkline.svgObject.appendChild(o)},e.prototype.renderMarker=function(e){var i=this.sparkline,r=i.markerSettings;if("Pie"!==i.type&&"WinLoss"!==i.type&&r.visible.length){var o,n,a,s=t.extend([],[],e),l=this.sparkline.renderer.createGroup({id:i.element.id+"_sparkline_marker_g","clip-path":"url(#"+this.clipId+")"}),h=i.element.id+"_sparkline_marker_",c=new ih("",r.fill,r.border,r.opacity,0,0,r.size/2,""),d=r.visible.join();if(d.toLowerCase().indexOf("high")>-1||d.toLowerCase().indexOf("low")>-1){var p=s.map(function(e){return e.markerPosition});n=Math.min.apply(null,p),a=Math.max.apply(null,p)}this.negativePointIndexes=[];for(var u=this,g=0,y=e.length;g-1;p=u.getSpecialPoint(p,o,i,c,t,n,a,s,d.toLowerCase()),c.stroke=r.border.color||c.fill;var g={name:"markerRendering",cancel:!1,border:{color:c.stroke,width:r.border.width},fill:c.fill,pointIndex:t,sparkline:u.sparkline.isBlazor?null:u.sparkline,x:c.cx,y:c.cy,size:r.size};if(u.sparkline.isBlazor){var y=oh(g,[]);g=y}u.sparkline.trigger("markerRendering",g,function(){if(p&&!g.cancel){c.id=h+t,c.cx=g.x,c.cy=g.y,c.fill=g.fill,c.stroke=g.border.color,c["stroke-width"]=g.border.width,c.r=g.size/2;var r=_t(i,c,l);r.setAttribute("aria-label",i.dataSource[t][i.xName]+" : "+e[t].yVal),l.appendChild(r)}})}(g,y);this.sparkline.svgObject.appendChild(l)}},e.prototype.getSpecialPoint=function(e,t,i,r,o,n,a,s,l){return void 0===l&&(l=""),t.markerPosition>this.axisHeight&&(r.fill=i.negativePointColor||r.fill,this.negativePointIndexes.push(o),e=e||l.indexOf("negative")>-1),0===o?(r.fill=i.startPointColor||r.fill,this.startPointIndex=o,e=e||l.indexOf("start")>-1):o===s-1&&(r.fill=i.endPointColor||r.fill,this.endPointIndex=o,e=e||l.indexOf("end")>-1),t.markerPosition===n?(r.fill=i.highPointColor||r.fill,this.highPointIndex=o,e=e||l.indexOf("high")>-1):t.markerPosition===a&&(r.fill=i.lowPointColor||r.fill,this.lowPointIndex=o,e=e||l.indexOf("low")>-1),l.indexOf("none")>-1&&(e=!1),e},e.prototype.renderLabel=function(e){var i=this,r=this.sparkline,o=r.dataLabelSettings,n=o.textStyle.color||r.sparkTheme.dataLabelColor;if("WinLoss"!==r.type&&o.visible.length){var a,s,l,h=t.extend([],[],e),c=r.element.id+"_sparkline_label_",d=this.sparkline.renderer.createGroup({id:r.element.id+"_sparkline_label_g",style:"pointer-events: none;"}),p=c+"text_",u=c+"rect_",g=new rh("",0,0,"middle","","middle"),y=o.textStyle,m=h.map(function(e){return e.markerPosition}),v=Math.min.apply(null,m),f=Math.max.apply(null,m),b="transparent"!==o.fill||o.border.width?2:0,x=It("sparkline_measure_text",y),w=new th("",o.fill,o.border,o.opacity,null);y.fontFamily=r.sparkTheme.labelFontFamily||y.fontFamily;for(var S=this,C=0,P=e.length;CS.axisHeight?s.location.y+x.height/2+1+2+b:s.location.y-x.height/2-1-b)+o.offset.y,g.text=""!==o.format?S.formatter(o.format,S.sparkline.dataSource[t]):s.yVal.toString();var m={name:"dataLabelRendering",cancel:!1,border:o.border,fill:o.fill,pointIndex:t,sparkline:S.sparkline.isBlazor?null:S.sparkline,x:g.x,y:g.y,text:g.text,color:n};if(S.sparkline.isBlazor){var C=oh(m,[]);m=C}S.sparkline.trigger("dataLabelRendering",m,function(){x=It(m.text,y),g.text=m.text;var e=o.visible.join().toLowerCase().indexOf("all")>-1;e=i.getLabelVisible(e,s,t,o,h,v,f),l=i.arrangeLabelPosition(o.edgeLabelMode,e,m.x,t,h,x,b),e&&!m.cancel&&l.render&&(w.id=u+t,w.fill=m.fill,w.stroke=m.border.color,w["stroke-width"]=m.border.width,g.y=m.y,g.x=l.x,w.rect=new Kl(g.x-(x.width/2+b),g.y-b-x.height/1.75,x.width+2*b,x.height+2*b),a=i.sparkline.renderer.createGroup({id:c+"g"+t}),Et(r,w,a),Dt(g,y,m.color,a),d.appendChild(a))})}(C,P);this.sparkline.svgObject.appendChild(d)}},e.prototype.arrangeLabelPosition=function(e,t,i,r,o,n,a){return"None"===e?{x:i,render:t}:(0===r&&i-n.width/2-a<=0?"Hide"===e?t=!1:i=this.sparkline.padding.left+a+n.width/2:r===o-1&&i+n.width/2+a>=this.sparkline.availableSize.width&&("Hide"===e?t=!1:i-=n.width/2+a),{x:i,render:t})},e.prototype.getLabelVisible=function(e,t,i,r,o,n,a){var s=r.visible.join().toLowerCase();return t.markerPosition>this.axisHeight&&(e=e||s.indexOf("negative")>-1),0===i?e=e||s.indexOf("start")>-1:i===o-1&&(e=e||s.indexOf("end")>-1),t.markerPosition===n?e=e||s.indexOf("high")>-1:t.markerPosition===a&&(e=e||s.indexOf("low")>-1),r.visible.join().toLowerCase().indexOf("none")>-1&&(e=!1),e},e.prototype.formatter=function(e,i){if(t.isNullOrUndefined(e))return null;for(var r=0,o=Object.keys(i);r0?y:u,x>=r&&x<=i&&(y=u-Math.round(u*((x-r)/this.unitY))),this.axisHeight=y+f.top;for(var L,R,M=[],A=i-r,T=this.getInterval(e,s.xName),k=this.getPaddingInterval(e,s.xName,s.valueType,A),_=0;_x?u/4:Ry?y+Math.abs(p-y):p}}else{0===_&&"None"!==s.rangePadding&&(r-="Additional"===s.rangePadding?k+f.top:k,P=(i+="Additional"===s.rangePadding?k+f.top:k)-r,C=0===(C=n-o)?1:C,P=0===P?1:P,this.unitX=C,this.unitY=P,this.min=r);var E=u/this.unitY*(R-r),z=R===r&&R>x?1!==l&&1!==this.unitY?u/this.unitY*(r/2):1|E:R===i&&Ry?y:p,height:Math.abs(p-y),width:O,markerPosition:p>y?y+Math.abs(p-y):p}}}else"Pie"===s.type&&(m={percent:Math.abs(R)/h*100,degree:Math.abs(R)/h*360});"Pie"!==s.type&&(m.x+=f.left,m.y+=f.top),"WinLoss"!==s.type&&(m.markerPosition+=f.top),m.location={x:m.x,y:m.y},m.xVal=L,m.yVal=R,M.push(m)}M.sort(function(e,t){return e.x-t.x}),this.visiblePoints=M},e.prototype.drawAxis=function(){var e=this.sparkline,t=this.axisHeight;if("WinLoss"!==e.type&&"Pie"!==e.type&&e.axisSettings.lineSettings.visible){var i={id:e.element.id+"_Sparkline_XAxis",x1:e.padding.left,y1:t,x2:e.availableSize.width-e.padding.right,y2:t,stroke:this.axisColor,opacity:e.axisSettings.lineSettings.opacity,"stroke-dasharray":e.axisSettings.lineSettings.dashArray,"stroke-width":this.axisWidth,"clip-path":"url(#"+this.clipId+")"};e.svgObject.appendChild(e.renderer.drawLine(i))}},e.prototype.triggerPointRender=function(e,t,i,r){var o={name:e,cancel:!1,border:r,fill:i,sparkline:this.sparkline.isBlazor?null:this.sparkline,pointIndex:t};return this.sparkline.trigger(e,o),o},e}(),ah=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sh=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},lh=function(e){function i(i,r){var o=e.call(this,i,r)||this;return o.isDevice=t.Browser.isDevice,o.intervalDivs=[10,5,2,1],o}return ah(i,e),i.prototype.preRender=function(){this.isBlazor=t.isBlazor(),this.allowServerDataBinding=!1,this.unWireEvents(),this.trigger("load",{sparkline:this.isBlazor?null:this}),this.sparkTheme=Rt(this.theme),this.sparklineRenderer=new nh(this),this.createSVG(),this.wireEvents(),this.setCulture()},i.prototype.render=function(){this.sparklineRenderer.processDataManager(),this.renderComplete(),this.allowServerDataBinding=!0},i.prototype.processSparklineData=function(){this.sparklineRenderer.processData(),this.renderSparkline(),this.element.appendChild(this.svgObject),this.setSecondaryElementPosition(),this.trigger("loaded",{sparkline:this.isBlazor?null:this})},i.prototype.renderSparkline=function(){this.renderBorder(),this.createDiv(),this.sparklineRenderer.renderSeries()},i.prototype.createDiv=function(){var e=document.createElement("div");e.id=this.element.id+"_Secondary_Element",e.setAttribute("style","position: relative"),this.element.appendChild(e),this.element.style.display="block",this.element.style.position="relative"},i.prototype.setSecondaryElementPosition=function(){var e=Nt(this.element.id+"_Secondary_Element");if(e){var t=this.element.getBoundingClientRect(),i=Nt(this.element.id+"_svg").getBoundingClientRect();e.style.left=Math.max(i.left-t.left,0)+"px",e.style.top=Math.max(i.top-t.top,0)+"px"}},i.prototype.renderBorder=function(){var e,t=this.containerArea.border.width;(t>0||"transparent"!==this.containerArea.background)&&(e=new th(this.element.id+"_SparklineBorder",this.sparkTheme.background,this.containerArea.border,1,new Kl(t/2,t/2,this.availableSize.width-t,this.availableSize.height-t)),this.svgObject.appendChild(Et(this,e)));var i=this.padding;this.markerSettings.visible.length&&(i.left=0,i.right=0,i.bottom=0,i.top=0),e=new th(this.element.id+"_sparkline_clip_rect","transparent",{color:"transparent",width:0},1,new Kl(i.left,i.top,this.availableSize.width-(i.left+i.right),this.availableSize.height-(i.top+i.bottom)));var r=this.renderer.createClipPath({id:this.element.id+"_sparkline_clip_path"});Et(this,e,r),this.svgObject.appendChild(r)},i.prototype.createSVG=function(){this.removeSvg(),Tt(this)},i.prototype.removeSvg=function(){if(this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}Bt(this.element.id+"_Secondary_Element"),this.sparklineTooltipModule&&this.sparklineTooltipModule.removeTooltipElements()},i.prototype.setCulture=function(){this.intl=new t.Internationalization,this.localeObject=new t.L10n(this.getModuleName(),this.defaultLocalConstants,this.locale)},i.prototype.requiredModules=function(){var e=[];return(this.tooltipSettings.visible||this.tooltipSettings.trackLineSettings.visible)&&e.push({member:"SparklineTooltip",args:[this]}),e},i.prototype.unWireEvents=function(){t.Browser.touchMoveEvent;var e=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.sparklineMove),t.EventHandler.remove(this.element,e,this.sparklineMouseLeave),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.sparklineMouseEnd),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.sparklineResize)},i.prototype.wireEvents=function(){var e=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.sparklineMove,this),t.EventHandler.add(this.element,"click",this.sparklineClick,this),t.EventHandler.add(this.element,e,this.sparklineMouseLeave,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.sparklineMouseEnd,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.sparklineResize.bind(this)),new t.Touch(this.element)},i.prototype.sparklineResize=function(e){var t=this,i={name:"resize",previousSize:this.availableSize,sparkline:this.isBlazor?null:this,currentSize:new Jl(0,0)};return this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=+setTimeout(function(){if(t.isDestroyed)return void clearTimeout(t.resizeTo);t.unWireEvents(),t.createSVG(),t.refreshing=!0,t.wireEvents(),i.currentSize=t.availableSize,t.trigger("resize",i),t.render()},500),!1},i.prototype.sparklineMove=function(e){this.setSparklineMouseXY(e),this.notify(t.Browser.touchMoveEvent,e);var i={name:"sparklineMouseMove",cancel:!1,sparkline:this.isBlazor?null:this,event:e};this.trigger(i.name,i);var r=this.isPointRegion(e);if(r.isPointRegion){var o={name:"pointRegionMouseMove",cancel:!1,event:e,sparkline:this.isBlazor?null:this,pointIndex:r.pointIndex};this.trigger(o.name,o)}return!1},i.prototype.sparklineClick=function(e){this.setSparklineMouseXY(e);var t={name:"sparklineMouseClick",cancel:!1,sparkline:this.isBlazor?null:this,event:e};this.trigger(t.name,t);var i=this.isPointRegion(e);if(i.isPointRegion){var r={name:"pointRegionMouseClick",cancel:!1,event:e,sparkline:this.isBlazor?null:this,pointIndex:i.pointIndex};this.trigger(r.name,r)}return!1},i.prototype.isPointRegion=function(e){var i=this,r=this.element.id+"_",o=e.target.id.replace(r,"").split("_");if(o[1]===this.type.toLowerCase()){var n=parseInt(o[2],10);return!t.isNullOrUndefined(n)&&!isNaN(n)||"Line"!==this.type&&"Area"!==this.type||this.sparklineRenderer.visiblePoints.forEach(function(e,t){if(Ft(i.mouseX,i.mouseY,new Kl(e.x-5,e.y-5,10,10)))return void(n=t)}),{isPointRegion:!0,pointIndex:n}}return{isPointRegion:!1,pointIndex:null}},i.prototype.sparklineMouseEnd=function(e){return this.setSparklineMouseXY(e),this.notify(t.Browser.touchEndEvent,e),!1},i.prototype.sparklineMouseLeave=function(e){return this.setSparklineMouseXY(e),this.notify(t.Browser.isPointer?"pointerleave":"mouseleave",e),!1},i.prototype.setSparklineMouseXY=function(e){var t,i;if(e.type.indexOf("touch")>-1){this.isTouch=!0;var r=e;i=r.changedTouches[0].clientX,t=r.changedTouches[0].clientY}else this.isTouch="touch"===e.pointerType||"2"===e.pointerType,t=e.clientY,i=e.clientX;var o=this.element.getBoundingClientRect(),n=Nt(this.element.id+"_svg").getBoundingClientRect();this.mouseY=t-o.top-Math.max(n.top-o.top,0),this.mouseX=i-o.left-Math.max(n.left-o.left,0)},i.prototype.onPropertyChanged=function(e,t){for(var i=!1,r=!1,o=0,n=Object.keys(e);o(c=Math.abs(n-s[h]))&&(l=c,i=h);else{var p=e.target.id;i=parseInt(p.split("_pie_")[1],10)}if(isNaN(i)||!Ft(n,a,new Kl(0,0,r.availableSize.width,r.availableSize.height)))return this.removeTracker(),void this.removeTooltip();this.pointIndex!==i&&(this.pointIndex=i,this.renderTrackerLine(o[i]),this.renderTooltip(o[i]))},e.prototype.renderTrackerLine=function(e){var i=this.sparkline,r=(i.theme.toLowerCase(),i.tooltipSettings.trackLineSettings),o=i.sparkTheme.trackerLineColor?i.sparkTheme.trackerLineColor:r.color;if(r.visible&&"Pie"!==i.type){var n=Nt(i.element.id+"_sparkline_tracker_g");t.isNullOrUndefined(n)&&(n=i.renderer.createGroup({id:i.element.id+"_sparkline_tracker_g"}),i.svgObject.appendChild(n));var a=Nt(i.element.id+"_sparkline_tracker"),s="M "+e.location.x+" "+i.padding.top+" L "+e.location.x+" "+(i.availableSize.height-i.padding.bottom);if(t.isNullOrUndefined(a)){var l=new eh(i.element.id+"_sparkline_tracker","transparent",r.width,o,1);l.d=s,zt(i,l,n)}else a.setAttribute("d",s),a.setAttribute("stroke-width",r.width.toString()),a.setAttribute("stroke",o)}},e.prototype.renderTooltip=function(e){var i=this,r=this.sparkline,o=r.tooltipSettings;if(o.visible){var n=Nt(r.element.id+"_sparkline_tooltip_div");t.isNullOrUndefined(n)&&(n=t.createElement("div",{id:r.element.id+"_sparkline_tooltip_div",styles:"pointer-events: none; position: absolute;z-index:1;"}),Nt(r.element.id+"_Secondary_Element").appendChild(n));var a=e.xVal.toString();"Category"===r.valueType?a=r.dataSource[e.xVal][r.xName]:"DateTime"===r.valueType&&(a=new Date(e.xVal).toDateString());var s=this.getFormat(r.tooltipSettings.format,r,a,this.formatValue(e.yVal,r).toString()),l={x:e.location.x,y:e.location.y};l="Pie"===r.type?{x:e.location.x,y:e.location.y}:l;var h=o.textStyle.color||r.sparkTheme.tooltipFontColor,c=""===o.fill?r.sparkTheme.tooltipFill:o.fill,d={name:"tooltipInitialize",cancel:!1,text:s,textStyle:{size:o.textStyle.size,opacity:r.sparkTheme.tooltipTextOpacity||o.textStyle.opacity,fontWeight:o.textStyle.fontWeight,fontStyle:o.textStyle.fontStyle,fontFamily:r.sparkTheme.fontFamily||o.textStyle.fontFamily,color:h}};if(r.isBlazor){var p=hh(d,[]);d=p}r.trigger("tooltipInitialize",d,function(){i.addTooltip(d,r,c,o,l,n)})}},e.prototype.addTooltip=function(e,r,o,n,a,s,l){var h;if(t.isNullOrUndefined(e))l.cancel,h=l;else{var c=e.cancel;hh(e,["cancel"]);c,h=e}if(!e.cancel){var d=new i.Tooltip({content:h.text,border:n.border,template:n.template,data:r.dataSource[this.pointIndex],fill:o,textStyle:h.textStyle,enableAnimation:!1,location:{x:a.x,y:a.y},shared:!1,availableSize:this.sparkline.availableSize,areaBounds:new Kl(0,0,r.availableSize.width,r.availableSize.height),theme:r.theme,blazorTemplate:{name:"TooltipTemplate",parent:r.tooltipSettings}});d.opacity=r.sparkTheme.tooltipFillOpacity||d.opacity,d.appendTo(s)}},e.prototype.getFormat=function(e,i,r,o){if(t.isNullOrUndefined(e)||""===e)return[o];var n=e;return n=n.split("${"+i.xName+"}").join(r).split("${"+i.yName+"}").join(o),[n]},e.prototype.formatValue=function(e,t){return t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(e):e},e.prototype.removeTracker=function(){var e=this.sparkline.element.querySelector("#"+this.sparkline.element.id+"_sparkline_tracker_g");return e?t.remove(e):null},e.prototype.removeTooltip=function(){this.pointIndex=null;var e=this.sparkline.element.querySelector("#"+this.sparkline.element.id+"_sparkline_tooltip_div");return e?t.remove(e):null},e.prototype.getModuleName=function(){return"SparklineTooltip"},e.prototype.destroy=function(e){},e}();return Rr.Inject(Vr,bo,Xr,zo,No,Br,Ur,Bn,ho,po,so,fo,go,mo,qr,ro,wo,ko,un,hn,Or,kr,zr,Ln,yn,Sn,fn,An,Lo,Mo,Co,To,no,Kr,to,Ho,Wo,Yo,Zo,sn,Qo,en,Jo,rn,nn,kn,Do,Cn,ln,Dr,zn,On,In,Fn,Vn,bn,wn),ta.Inject(Jn,na,sa,ua,ha,ya,da,va,Vn),Ea.Inject(as,ka,Ur,ho,kr,zr,Vn),lh.Inject(ch),zl.Inject(Dl,Il),ns.Inject(Vr,Xr,zo,No,Br,Ur,un,hn,kr,yn,Sn,fn,An,Lo,Mo,no,Ho,Wo,Yo,Zo,sn,Qo,en,Jo,rn,nn,ln,as,Vn),ws.Inject(Ss,Ps),e.RangeColorSetting=Cr,e.CrosshairSettings=Pr,e.ZoomSettings=Lr,e.Chart=Rr,e.Row=wi,e.Column=Si,e.MajorGridLines=Ci,e.MinorGridLines=Pi,e.AxisLine=Li,e.MajorTickLines=Ri,e.MinorTickLines=Mi,e.CrosshairTooltip=Ai,e.Axis=Ti,e.VisibleLabels=ki,e.Double=ni,e.DateTime=kr,e.Category=Or,e.Logarithmic=zr,e.DateTimeCategory=Dr,e.NiceInterval=Ar,e.StripLine=Br,e.Connector=Ht,e.Font=Xt,e.Border=Yt,e.Offset=Gt,e.ChartArea=Wt,e.Margin=Ut,e.ContainerPadding=Zt,e.Animation=qt,e.Indexes=Qt,e.CornerRadius=$t,e.Index=Jt,e.EmptyPointSettings=Kt,e.DragSettings=ei,e.TooltipSettings=ti,e.Periods=ii,e.PeriodSelectorSettings=ri,e.LineSeries=Vr,e.ColumnSeries=Xr,e.AreaSeries=Ur,e.BarSeries=qr,e.PolarSeries=Kr,e.RadarSeries=to,e.StackingBarSeries=ro,e.CandleSeries=no,e.StackingColumnSeries=so,e.StepLineSeries=ho,e.StepAreaSeries=po,e.StackingAreaSeries=go,e.StackingStepAreaSeries=mo,e.StackingLineSeries=fo,e.ScatterSeries=bo,e.RangeColumnSeries=wo,e.WaterfallSeries=Co,e.HiloSeries=Lo,e.HiloOpenCloseSeries=Mo,e.RangeAreaSeries=To,e.BubbleSeries=ko,e.SplineSeries=zo,e.HistogramSeries=Do,e.SplineAreaSeries=No,e.TechnicalIndicator=br,e.SmaIndicator=Ho,e.EmaIndicator=Yo,e.TmaIndicator=Wo,e.AccumulationDistributionIndicator=Zo,e.AtrIndicator=Qo,e.MomentumIndicator=Jo,e.RsiIndicator=en,e.StochasticIndicator=rn,e.BollingerBands=nn,e.MacdIndicator=sn,e.Trendlines=ln,e.sort=p,e.isBreakLabel=u,e.getVisiblePoints=g,e.rotateTextSize=y,e.removeElement=m,e.logBase=v,e.showTooltip=f,e.inside=b,e.withIn=x,e.logWithIn=w,e.withInRange=S,e.sum=C,e.subArraySum=P,e.subtractThickness=L,e.subtractRect=R,e.degreeToLocation=M,e.degreeToRadian=A,e.getRotatedRectangleCoordinates=T,e.isRotatedRectIntersect=k,e.getAngle=O,e.subArray=E,e.valueToCoefficient=z,e.TransformToVisible=I,e.indexFinder=D,e.CoefficientToVector=B,e.valueToPolarCoefficient=N,e.Mean=Oi,e.PolarArc=Ei,e.createTooltip=F,e.createZoomingLabels=V,e.withInBounds=j,e.getValueXByPoint=H,e.getValueYByPoint=X,e.findClipRect=Y,e.firstToLowerCase=G,e.getTransform=W,e.getMinPointsDelta=U,e.getAnimationFunction=Z,e.linear=q,e.markerAnimate=Q,e.animateRectElement=$,e.pathAnimation=J,e.appendClipElement=K,e.triggerLabelRender=ee,e.setRange=te,e.isZoomSet=ie,e.getActualDesiredIntervalsCount=re,e.templateAnimate=oe,e.drawSymbol=ne,e.calculateShapes=ae,e.getRectLocation=se,e.minMax=le,e.getElement=he,e.getTemplateFunction=ce,e.accReactTemplate=de,e.chartReactTemplate=pe,e.createTemplate=ue,e.getFontStyle=ge,e.measureElementRect=ye,e.findlElement=me,e.getPoint=ve,e.appendElement=fe,e.appendChildElement=be,e.getDraggedRectLocation=xe,e.checkBounds=we,e.getLabelText=Se,e.stopTimer=Ce,e.isCollide=Pe,e.isOverlap=Le,e.containsRect=Re,e.calculateRect=Me,e.convertToHexCode=Ae,e.componentToHex=Te,e.convertHexToColor=ke,e.colorNameToHex=_e,e.getSaturationColor=Oe,e.getMedian=Ee,e.calculateLegendShapes=ze,e.textTrim=Ie,e.lineBreakLabelTrim=De,e.stringToNumber=Be,e.redrawElement=Ne,e.animateRedrawElement=Fe,e.textElement=Ve,e.calculateSize=je,e.createSvg=He,e.getTitle=Xe,e.titlePositionX=Ye,e.textWrap=Ge,e.getUnicodeText=We,e.blazorTemplatesReset=Ue,e.CustomizeOption=zi,e.StackValues=Ii,e.RectOption=Di,e.ImageOption=Bi,e.CircleOption=Ni,e.PolygonOption=Fi,e.ChartLocation=Vi,e.LabelLocation=ji,e.Thickness=Hi,e.ColorValue=Xi,e.PointData=Yi,e.AccPointData=Gi,e.ControlPoints=Wi,e.getColorByValue=Ze,e.getGradientColor=qe,e.getPercentageColor=Qe,e.getPercentage=$e,e.Crosshair=hn,e.Tooltip=un,e.Zoom=yn,e.Selection=fn,e.DataEditing=bn,e.Highlight=wn,e.DataLabel=Sn,e.ErrorBar=Cn,e.DataLabelSettings=$i,e.MarkerSettings=Ji,e.Points=Ki,e.Trendline=er,e.ErrorBarCapSettings=tr,e.ChartSegment=ir,e.ErrorBarSettings=rr,e.SeriesBase=or,e.Series=nr,e.Legend=Ln,e.ChartAnnotation=An,e.ChartAnnotationSettings=pi,e.LabelBorder=ui,e.MultiLevelCategories=gi,e.StripLineSettings=yi,e.MultiLevelLabels=mi,e.ScrollbarSettingsRange=vi,e.ScrollbarSettings=fi,e.BoxAndWhiskerSeries=kn,e.MultiColoredAreaSeries=On,e.MultiColoredLineSeries=zn,e.MultiColoredSeries=Gr,e.MultiLevelLabel=In,e.ScrollBar=Bn,e.ParetoSeries=Fn,e.Export=Vn,e.AccumulationChart=ta,e.AccumulationAnnotationSettings=Xn,e.AccumulationDataLabelSettings=Yn,e.PieCenter=Gn,e.AccPoints=Wn,e.AccumulationSeries=Un,e.getSeriesFromIndex=Ke,e.pointByIndex=et,e.PieSeries=Jn,e.FunnelSeries=na,e.PyramidSeries=sa,e.AccumulationLegend=ha,e.AccumulationDataLabel=da,e.AccumulationTooltip=ua,e.AccumulationSelection=ya,e.AccumulationAnnotation=va,e.StockChart=ns,e.StockChartFont=Fa,e.StockChartBorder=Va,e.StockChartArea=ja,e.StockMargin=Ha,e.StockChartStripLineSettings=Xa,e.StockEmptyPointSettings=Ga,e.StockChartConnector=Wa,e.StockSeries=Ua,e.StockChartIndicator=Za,e.StockChartAxis=qa,e.StockChartRow=Qa,e.StockChartTrendline=$a,e.StockChartAnnotationSettings=Ja,e.StockChartIndexes=Ka,e.StockEventsSettings=es,e.loaded="loaded",e.legendClick="legendClick",e.load="load",e.animationComplete="animationComplete",e.legendRender="legendRender",e.textRender="textRender",e.pointRender="pointRender",e.sharedTooltipRender="sharedTooltipRender",e.seriesRender="seriesRender",e.axisLabelRender=ai,e.axisLabelClick="axisLabelClick",e.axisRangeCalculated="axisRangeCalculated",e.axisMultiLabelRender="axisMultiLabelRender",e.tooltipRender="tooltipRender",e.chartMouseMove="chartMouseMove",e.chartMouseClick="chartMouseClick",e.pointClick="pointClick",e.pointDoubleClick="pointDoubleClick",e.pointMove="pointMove",e.chartMouseLeave="chartMouseLeave",e.chartMouseDown="chartMouseDown",e.chartMouseUp="chartMouseUp",e.zoomComplete="zoomComplete",e.dragComplete="dragComplete",e.selectionComplete="selectionComplete",e.resized="resized",e.beforeResize="beforeResize",e.beforePrint="beforePrint",e.annotationRender="annotationRender",e.scrollStart="scrollStart",e.scrollEnd="scrollEnd",e.scrollChanged="scrollChanged",e.stockEventRender="stockEventRender",e.multiLevelLabelClick="multiLevelLabelClick",e.dragStart="dragStart",e.drag="drag",e.dragEnd="dragEnd",e.regSub=si,e.regSup=li,e.beforeExport="beforeExport",e.afterExport="afterExport",e.bulletChartMouseClick="chartMouseClick",e.onZooming=hi,e.getSeriesColor=h,e.getThemeColor=c,e.getScrollbarThemeColor=d,e.PeriodSelector=ka,e.RangeNavigator=Ea,e.rangeValueToCoefficient=tt,e.getXLocation=it,e.getRangeValueXByPoint=rt,e.getExactData=ot,e.getNearestValue=nt,e.DataPoint=fa,e.getRangeThemeColor=at,e.RangeNavigatorAxis=Sa,e.RangeSeries=xa,e.RangeSlider=Ta,e.RangeNavigatorSeries=La,e.ThumbSettings=Ra,e.StyleSettings=Ma,e.RangeTooltipSettings=Aa,e.RangeTooltip=as,e.BulletChart=ws,e.Range=ps,e.MajorTickLinesSettings=us,e.MinorTickLinesSettings=gs,e.BulletLabelStyle=ys,e.BulletTooltipSettings=ms,e.BulletDataLabel=vs,e.BulletChartLegendSettings=fs,e.getBulletThemeColor=lt,e.BulletTooltip=Ss,e.BulletChartLegend=Ps,e.Smithchart=zl,e.SmithchartMajorGridLines=ll,e.SmithchartMinorGridLines=hl,e.SmithchartAxisLine=cl,e.SmithchartAxis=dl,e.LegendTitle=el,e.LegendLocation=tl,e.LegendItemStyleBorder=il,e.LegendItemStyle=rl,e.LegendBorder=ol,e.SmithchartLegendSettings=nl,e.SeriesTooltipBorder=fl,e.SeriesTooltip=bl,e.SeriesMarkerBorder=xl,e.SeriesMarkerDataLabelBorder=wl,e.SeriesMarkerDataLabelConnectorLine=Sl,e.SeriesMarkerDataLabel=Cl,e.SeriesMarker=Pl,e.SmithchartSeries=Ll,e.TooltipRender=Il,e.Subtitle=gl,e.Title=yl,e.SmithchartFont=Ms,e.SmithchartMargin=As,e.SmithchartBorder=Ts,e.SmithchartRect=ks,e.LabelCollection=_s,e.LegendSeries=Os,e.LabelRegion=Es,e.HorizontalLabelCollection=zs,e.RadialLabelCollections=Is,e.LineSegment=Ds,e.PointRegion=Bs,e.Point=Ns,e.ClosestPoint=Fs,e.MarkerOptions=Vs,e.SmithchartLabelPosition=js,e.Direction=Hs,e.DataLabelTextOptions=Xs,e.LabelOption=Ys,e.SmithchartSize=Gs,e.GridArcPoints=Ws,e.smithchartBeforePrint="beforePrint",e.SmithchartLegend=Dl,e.Sparkline=lh,e.SparklineTooltip=ch,e.SparklineBorder=Fl,e.SparklineFont=Vl,e.TrackLineSettings=jl,e.SparklineTooltipSettings=Hl,e.ContainerArea=Xl,e.LineSettings=Yl,e.RangeBandSettings=Gl,e.AxisSettings=Wl,e.Padding=Ul,e.SparklineMarkerSettings=Zl,e.LabelOffset=ql,e.SparklineDataLabelSettings=Ql,e}({},ej.base,ej.svgbase,ej.data,ej.pdfexport,ej.navigations,ej.calendars,ej.splitbuttons,ej.buttons),this.ejs=ej;