Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@syncfusion/ej2-circulargauge

Package Overview
Dependencies
Maintainers
2
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-circulargauge - npm Package Compare versions

Comparing version 16.3.34 to 16.4.40-beta

9

CHANGELOG.md

@@ -9,2 +9,11 @@ <!-- markdownlint-disable MD004 -->

#### New Features
- Support has been added to set gap between the ranges.
- Support has been added to calculate the radius of the gauge based on the start and end angles.
## 16.3.33 (2018-11-20)
### CircularGauge
#### Bug Fixes

@@ -11,0 +20,0 @@

4

dist/ej2-circulargauge.umd.min.js
/*!
* filename: ej2-circulargauge.umd.min.js
* version : 16.3.34
* version : 16.4.40-beta
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base"],t):t(e.ej={},e.ej2Base,e.ej2SvgBase)}(this,function(e,t,i){"use strict";function o(e,i){var o=document.getElementById("gauge-measuretext");null===o&&(o=t.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(o));var n="position: absolute; visibility: hidden;;left: 0; top: -100; white-space: nowrap;"+r(i);return o.innerHTML=e,o.setAttribute("style",n),new V(o.clientWidth,o.clientHeight)}function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function r(e){return"font-size:"+e.size+"; font-style:"+e.fontStyle+"; font-weight:"+e.fontWeight+"; font-family:"+e.fontFamily+";opacity:"+e.opacity+"; color:"+e.color+";"}function a(e,i,o){t.setStyleAttribute(e,{stroke:o.color,"stroke-width":o.width,fill:i})}function s(e){var t;return document.body.appendChild(e),t=e.getBoundingClientRect(),E(e.id),t}function l(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function u(e,i,o,n,r){var a,s={},l=new t.SvgRenderer(""),u=r+" font-size:"+i.size+"; font-style:"+i.fontStyle+" ; font-weight:"+i.fontWeight+"; font-family:"+i.fontFamily+";";return s={id:e.id,x:e.x,y:e.y,fill:o,"text-anchor":e.anchor,transform:e.transform,opacity:i.opacity,"dominant-baseline":e.baseLine,style:u},a=l.createText(s,e.text),n.appendChild(a),a}function h(e,t,i,o){o=o||"Path";var n=i.renderer["draw"+o](e);return n.setAttribute("transform",e.transform),n.setAttribute("style",e.style),t.appendChild(n),n}function d(e,t,i){for(var o=0,n=i.length;e<n;e++)o+=i[e];return o}function p(e,t,i,o){return-i*Math.cos(e/o*(Math.PI/2))+i+t}function c(e,t,i,o,n,r){var a;return n-=m(o,n)?1e-4:0,o-=90,n-=90,a=r?(e-i)*(g(o,n)/(t-i))+o:(a=n-(e-i)*(g(o,n)/(t-i)))<0?360+a:a,a=Math.round(a)>=360?a-360:Math.round(a)<0?360+a:a}function g(e,t){var i=t-e;return i<0?i+360:i}function y(e,t,i,o,n,r){return n-=m(o,n)?1e-4:0,e=e<o?e+360:e,r?(e-o)/g(o,n)*(t-i)+i:t-((e-o)/g(o,n)*(t-i)+i)}function m(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function v(e,t){var i=Math.atan2(t.y-e.y,t.x-e.x);return i=Math.round((i<0?6.283+i:i)*(180/Math.PI))-270,i+=i<0?360:0}function f(e,t,i){var o=e*Math.PI/180;return new N(Math.cos(o)*t+i.x,Math.sin(o)*t+i.y)}function x(e,t,i,o,n,r){var a=g(t,i-=m(t,i)?1e-4:0),s=o-n,l=o-r,u=o-(n+r)/2;return void 0!==n&&void 0!==r?b(f(t,o,e),f(i,o,e),f(t,s,e),f(i,l,e),o,u,u,a<180?0:1):A(f(t,o,e),f(i,o,e),o,a<180?0:1)}function b(e,t,i,o,n,r,a,s){return"M "+e.x+" "+e.y+" A "+n+" "+n+" 0 "+s+" 1 "+t.x+" "+t.y+" L "+o.x+" "+o.y+" A "+a+" "+r+" 0 "+s+" 0 "+i.x+" "+i.y+" Z"}function P(e,t,i,o,n,r,a,s){var l=g(t,i-=m(t,i)?1e-4:0),u=r-a,h=r-s,d=r-(a+s)/2;return R(f(t,r,e),f(i,r,e),f(n,r,e),f(n,h,e),f(o,r,e),f(o,u,e),f(t,u,e),f(i,h,e),r,d,d,l<180?0:1)}function R(e,t,i,o,n,r,a,s,l,u,h,d){return"M "+e.x+" "+e.y+" A "+l+" "+l+" 0 "+d+" 1 "+t.x+" "+t.y+" C "+i.x+" "+i.y+" "+o.x+" "+o.y+" "+s.x+" "+s.y+" A "+h+" "+u+" 0 "+d+" 0 "+a.x+" "+a.y+" C "+r.x+" "+r.y+" "+n.x+" "+n.y+" "+e.x+" "+e.y+" Z"}function w(e,t,i,o,n){var r=g(t,i-=m(t,i)?1e-4:0);return M(e,f(t,o,e),f(i,o,e),o,f(t,n,e),f(i,n,e),n,r<180?0:1)}function A(e,t,i,o){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+o+" 1 "+t.x+" "+t.y}function M(e,t,i,o,n,r,a,s){return"M "+t.x+" "+t.y+" A "+o+" "+o+" 0 "+s+" 1 "+i.x+" "+i.y+" L "+r.x+" "+r.y+" A "+a+" "+a+" 0 "+s+",0 "+n.x+" "+n.y+" Z"}function _(e){return document.getElementById(e)}function C(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(o){i=t.compile(e)}return i}function S(e,i,o){var n,r,a=C(e);if(a&&a(i).length){r=i.createElement("div",{id:i.element.id+"_Measure_Element"}),i.element.appendChild(r);for(var s=a(i);s.length>0;)r.appendChild(s[0]);o.appendChild(r),n=new V(o.getBoundingClientRect().width,o.getBoundingClientRect().height),t.remove(r)}return n}function E(e){var i=_(e);i&&t.remove(i)}function L(e,t){var i;return i=e.split(t.element.id+"_Axis_")[1],{axisIndex:+i[0],pointerIndex:+i[i.length-1]}}function T(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,r=i.ownerDocument.defaultView.pageYOffset,a=i.ownerDocument.documentElement.clientTop,s=i.ownerDocument.documentElement.clientLeft,l=o.left+n-s,u=o.top+r-a;return new N(e-l,t-u)}function k(e){return e&&null!==e.match("{value}")?"":e}function z(e,i,o,n,r){var a,s=o.width,l=o.height,u=e.x,h=e.y,d=e.x+-s/2,p=e.y+-l/2;switch(i){case"Circle":t.merge(r,{rx:s/2,ry:l/2,cx:u,cy:h});break;case"Diamond":a="M "+d+" "+h+" L "+u+" "+(h+-l/2)+" L "+(u+s/2)+" "+h+" L "+u+" "+(h+l/2)+" L "+d+" "+h+" Z",t.merge(r,{d:a});break;case"Rectangle":a="M "+d+" "+(h+-l/2)+" L "+(u+s/2)+" "+(h+-l/2)+" L "+(u+s/2)+" "+(h+l/2)+" L "+d+" "+(h+l/2)+" L "+d+" "+(h+-l/2)+" Z",t.merge(r,{d:a});break;case"Triangle":a="M "+u+" "+h+" L "+(u-l)+" "+(h-s/2)+"L "+(u-l)+" "+(h+s/2)+" Z",t.merge(r,{d:a});break;case"InvertedTriangle":a="M "+u+" "+h+" L "+(u+l)+" "+(h-s/2)+"L "+(u+l)+" "+(h+s/2)+" Z",t.merge(r,{d:a});break;case"Image":t.merge(r,{href:n,height:l,width:s,x:d,y:p})}return r}function O(e,t,i){var o=0,n=0,r=t.filter(function(t){return o=Math.min(t.start,t.end),n=Math.max(t.start,t.end),e>=o&&n>=e});return r.length?r[0].rangeColor:i}var I,j=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),B=function(){return function(e){this.id=e}}(),F=function(e){function t(t,i,o,n,r,a,s,l,u){void 0===l&&(l=""),void 0===u&&(u="");var h=e.call(this,t)||this;return h.opacity=r,h.fill=i,h.stroke=n,h["stroke-width"]=o,h["stroke-dasharray"]=a,h.d=s,h.transform=l,h.style=u,h}return j(t,e),t}(B),W=function(e){function t(t,i,o,n,r){var a=e.call(this,t)||this;return a.y=r.y,a.x=r.x,a.height=r.height,a.width=r.width,a.opacity=n,a.fill=i,a.stroke=o.color,a["stroke-width"]=o.width,a}return j(t,e),t}(B),V=function(){return function(e,t){this.width=e,this.height=t}}(),N=function(){return function(e,t){this.x=e,this.y=t}}(),D=function(){return function(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}}(),G=function(e){function t(t,i,o,n,r,a,s){void 0===a&&(a="");var l=e.call(this,t)||this;return l.transform="",l.baseLine="auto",l.x=i,l.y=o,l.anchor=n,l.text=r,l.transform=a,l.baseLine=s,l}return j(t,e),t}(B),H=function(){return function(e,t,i){this.text=e,this.value=t,this.size=i}}(),U=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),X=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Y=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property("")],i.prototype,"color",void 0),X([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property("16px")],i.prototype,"size",void 0),X([t.Property("")],i.prototype,"color",void 0),X([t.Property("segoe UI")],i.prototype,"fontFamily",void 0),X([t.Property("Normal")],i.prototype,"fontWeight",void 0),X([t.Property("Normal")],i.prototype,"fontStyle",void 0),X([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property(10)],i.prototype,"left",void 0),X([t.Property(10)],i.prototype,"right",void 0),X([t.Property(10)],i.prototype,"top",void 0),X([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property(!1)],i.prototype,"enable",void 0),X([t.Property("#000000")],i.prototype,"fill",void 0),X([t.Complex({color:"#ffffff",size:"13px"},Z)],i.prototype,"textStyle",void 0),X([t.Property(null)],i.prototype,"format",void 0),X([t.Property(null)],i.prototype,"template",void 0),X([t.Property(!0)],i.prototype,"enableAnimation",void 0),X([t.Complex({},Y)],i.prototype,"border",void 0),X([t.Property(!1)],i.prototype,"showAtMousePosition",void 0),i}(t.ChildProperty);!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.axisLineColor=null,e.tickLineColor=null,e.pointerColor=null}(I||(I={}));var K=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Q=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},$=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(2)],i.prototype,"width",void 0),Q([t.Property("")],i.prototype,"dashArray",void 0),Q([t.Property(I.axisLineColor)],i.prototype,"color",void 0),i}(t.ChildProperty),ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Complex(I.axisLabelFont,Z)],i.prototype,"font",void 0),Q([t.Property("")],i.prototype,"format",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property("None")],i.prototype,"hiddenLabel",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"start",void 0),Q([t.Property(null)],i.prototype,"end",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(10)],i.prototype,"startWidth",void 0),Q([t.Property(10)],i.prototype,"endWidth",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),i}(t.ChildProperty),ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"width",void 0),Q([t.Property(null)],i.prototype,"height",void 0),Q([t.Property(null)],i.prototype,"interval",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),Q([t.Property(I.tickLineColor)],i.prototype,"color",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property("#ffffff")],i.prototype,"color",void 0),Q([t.Complex({color:I.pointerColor,width:8},Y)],i.prototype,"border",void 0),Q([t.Property(8)],i.prototype,"radius",void 0),i}(t.ChildProperty),ne=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(I.pointerColor)],i.prototype,"color",void 0),Q([t.Complex({color:I.pointerColor,width:0},Y)],i.prototype,"border",void 0),Q([t.Property("0%")],i.prototype,"length",void 0),i}(t.ChildProperty),re=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(!0)],i.prototype,"enable",void 0),Q([t.Property(1e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"content",void 0),Q([t.Property(90)],i.prototype,"angle",void 0),Q([t.Property("50%")],i.prototype,"radius",void 0),Q([t.Property("-1")],i.prototype,"zIndex",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Complex({size:"12px",color:"#686868"},Z)],i.prototype,"textStyle",void 0),Q([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),se=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"value",void 0),Q([t.Property("Needle")],i.prototype,"type",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),Q([t.Property(null)],i.prototype,"imageUrl",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(20)],i.prototype,"pointerWidth",void 0),Q([t.Complex({},oe)],i.prototype,"cap",void 0),Q([t.Complex({},ne)],i.prototype,"needleTail",void 0),Q([t.Property(I.pointerColor)],i.prototype,"color",void 0),Q([t.Complex({color:"#DDDDDD",width:0},Y)],i.prototype,"border",void 0),Q([t.Complex(null,re)],i.prototype,"animation",void 0),Q([t.Property("Circle")],i.prototype,"markerShape",void 0),Q([t.Property(5)],i.prototype,"markerHeight",void 0),Q([t.Property(null)],i.prototype,"description",void 0),Q([t.Property(5)],i.prototype,"markerWidth",void 0),i}(t.ChildProperty),le=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return K(i,e),Q([t.Property(null)],i.prototype,"minimum",void 0),Q([t.Property(null)],i.prototype,"maximum",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Complex({},$)],i.prototype,"lineStyle",void 0),Q([t.Collection([{}],te)],i.prototype,"ranges",void 0),Q([t.Collection([{}],se)],i.prototype,"pointers",void 0),Q([t.Collection([{}],ae)],i.prototype,"annotations",void 0),Q([t.Complex({width:2,height:10},ie)],i.prototype,"majorTicks",void 0),Q([t.Complex({width:2,height:5},ie)],i.prototype,"minorTicks",void 0),Q([t.Property(200)],i.prototype,"startAngle",void 0),Q([t.Property(160)],i.prototype,"endAngle",void 0),Q([t.Property("ClockWise")],i.prototype,"direction",void 0),Q([t.Property(null)],i.prototype,"background",void 0),Q([t.Complex({},ee)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),ue="animationComplete",he="axisLabelRender",de="tooltipRender",pe="annotationRender",ce="gaugeMouseMove",ge="gaugeMouseLeave",ye="gaugeMouseDown",me=function(){function e(e){this.gauge=e,this.elementId=e.element.id}return e.prototype.renderAnnotation=function(e,i){var o=this,n=t.createElement("div",{id:this.elementId+"_Annotations_"+i}),r=_(this.elementId+"_Secondary_Element");e.annotations.map(function(e,t){null!==e.content&&o.createTemplate(n,t,i)}),r&&n.childElementCount&&r.appendChild(n)},e.prototype.createTemplate=function(e,i,o){var n=this.gauge.axes[o],a=n.annotations[i],s=t.createElement("div",{id:this.elementId+"_Axis_"+o+"_Annotation_"+i,styles:"position: absolute; z-index:"+a.zIndex+";transform:"+(a.autoAngle?"rotate("+(a.angle-90)+"deg)":"rotate(0deg)")+";"}),l={cancel:!1,name:pe,content:a.content,axis:n,annotation:a,textStyle:a.textStyle};this.gauge.trigger(pe,l);var u,h;if(!l.cancel){if((u=C(l.content))&&u(n).length)for(h=u(n);h.length>0;)s.appendChild(h[0]);else s.appendChild(t.createElement("div",{innerHTML:l.content,styles:r(l.textStyle)}));this.updateLocation(s,n,a),e.appendChild(s)}},e.prototype.updateLocation=function(e,t,i){var o=f(i.angle-90,l(i.radius,t.currentRadius),this.gauge.midPoint),n=s(e);e.style.left=o.x-n.width/2+"px",e.style.top=o.y-n.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}(),ve=function(){function e(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.textStyle=this.tooltip.textStyle,this.borderStyle=this.tooltip.border,this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,n,r,a,s,l=!1;if(-1!==e.type.indexOf("touch")?(r=(a=e).target,o=a.changedTouches[0].pageX,n=a.changedTouches[0].pageY):(r=e.target,o=e.pageX,n=e.pageY),r.id.indexOf("_Pointer_")>=0){null!==this.pointerEle&&(l=this.pointerEle===r);var u=this.gauge.svgObject.getBoundingClientRect(),h=this.gauge.element.getBoundingClientRect(),d=new D(Math.abs(h.left-u.left),Math.abs(h.top-u.top),u.width,u.height),p=L(r.id,this.gauge);this.currentAxis=this.gauge.axes[p.axisIndex],this.currentPointer=this.currentAxis.pointers[p.pointerIndex];var g=c(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,y=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,m=y&&null!==y.match("{value}"),v=this.gauge.intl.getNumberFormat({format:k(y),useGrouping:this.gauge.useGroupingSeparator});document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=t.createElement("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle));var x=m?y.replace(new RegExp("{value}","g"),v(this.currentPointer.currentValue)):v(this.currentPointer.currentValue);(s=f(g,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(g>=150&&g<=250||g>=330&&g<=360||g>=0&&g<=45)?s.x+10:s.x;var b={name:de,cancel:!1,content:x,location:s,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge};this.gauge.trigger(de,b);var P=b.tooltip.template;if(null!==P&&1===Object.keys(P).length&&(P=P[Object.keys(P)[0]]),this.tooltip.showAtMousePosition)b.location=T(o,n,this.gauge.svgObject),this.tooltipRect=d;else if(P){var R=r.getBoundingClientRect(),w=S(this.tooltip.template,this.gauge,this.tooltipEle),A=Math.abs(u.width-R.width)-Math.abs(R.left-u.left);w.height>Math.abs(u.height-b.location.y)-20&&(b.location.y+=w.height/2),w.width>A?(b.location.x-=Math.abs(u.left+u.width-(b.location.x+w.width)),this.tooltipRect=d):(this.tooltipRect=d,this.findPosition(d,g,x,b.location))}else this.findPosition(d,g,x,b.location);b.cancel||l||(b.tooltip.properties.textStyle.color="Highcontrast"===this.gauge.theme?"#00000":"#FFFFFF",this.svgTooltip=new i.Tooltip({enable:!0,data:{value:b.content},template:P,enableAnimation:b.tooltip.enableAnimation,content:[b.content],location:b.location,inverted:this.arrowInverted,areaBounds:this.tooltipRect,fill:"Highcontrast"===this.gauge.theme?"#FFFFFF":b.tooltip.fill,textStyle:b.tooltip.textStyle,border:b.tooltip.border,theme:this.gauge.theme}),this.svgTooltip.appendTo(this.tooltipEle),P&&Math.abs(n-this.tooltipEle.getBoundingClientRect().top)<=0&&(this.tooltipEle.style.top=parseFloat(this.tooltipEle.style.top)+20+"px"))}else this.removeTooltip()},e.prototype.findPosition=function(e,t,i,o){var n,r,a,s;switch(!0){case t>=0&&t<45:this.arrowInverted=!0,n=t>=15&&t<=30?o.y:0,this.tooltipRect=new D(e.x,e.y+r,e.width,e.height),this.tooltipPosition="RightBottom";break;case t>=45&&t<90:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case t>=90&&t<135:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case t>=135&&t<180:this.arrowInverted=!0,r=t>=150&&t<=160?o.y:0,this.tooltipRect=new D(e.x-e.width,e.y+r,e.width,e.height),this.tooltipPosition="LeftBottom";break;case t>=180&&t<225:this.arrowInverted=!0,a=t>=200&&t<=225?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x-e.width,e.y,e.width,a),this.tooltipPosition="LeftTop";break;case t>=225&&t<270:this.arrowInverted=!1,s=t>=250&&t<=290?e.width:Math.abs(e.x-o.x),this.tooltipRect=new D(e.x,e.y,s,e.height),this.tooltipPosition="TopLeft";break;case t>=270&&t<315:this.arrowInverted=!1,n=t>=270&&t>290?o.x:0,this.tooltipRect=new D(e.x+n,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case t>=315&&t<=360:this.arrowInverted=!0,a=t>=315&&t<=340?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x,e.y,e.width,a),this.tooltipPosition="RightTop"}},e.prototype.removeTooltip=function(){document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0&&(document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0].remove(),this.pointerEle=null)},e.prototype.mouseUpHandler=function(e){this.renderTooltip(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},e.prototype.addEventListener=function(){this.gauge.isDestroyed||(this.gauge.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.gauge.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},e.prototype.removeEventListener=function(){this.gauge.isDestroyed||(this.gauge.off(t.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),fe=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,i,o){var n=e.background;this.setRangeColor(e),null!==n&&h(new F(o.element.id+"_AxisOuterLine_"+t,n,0,"transparent",null,"0",x(o.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,o)},e.prototype.drawAxisLine=function(e,t,i,o){var n=e.startAngle,r=e.endAngle;e.lineStyle.width>0&&(n=m(n,r)?[0,r=360][0]:n,h(new F(o.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,e.lineStyle.color,null,e.lineStyle.dashArray,x(o.midPoint,n-90,r-90,e.currentRadius),"","pointer-events:none;"),i,o))},e.prototype.drawAxisLabels=function(e,t,i,o){var n,r,a,s,l=o.renderer.createGroup({id:o.element.id+"_Axis_Labels_"+t}),h=e.visibleRange.min,d=e.visibleRange.max,p=e.visibleLabels,g=e.labelStyle,y=e.currentRadius;"Outside"===g.position?y+=e.nearSize-(e.maxLabelSize.height+e.lineStyle.width/2)+5:y-=e.farSize-(e.maxLabelSize.height+e.lineStyle.width/2)+(g.autoAngle?10:0);for(var m=0,v=p.length;m<v;m++)0===m&&"First"===g.hiddenLabel||m===v-1&&"Last"===g.hiddenLabel||(s=p[m],n=f(a=Math.round(c(s.value,d,h,e.startAngle,e.endAngle,"ClockWise"===e.direction)),y,o.midPoint),r=this.findAnchor(n,g,a,s),u(new G(o.element.id+"_Axis_"+t+"_Label_"+m,n.x,n.y,r,s.text,g.autoAngle?"rotate("+(a+90)+","+n.x+","+n.y+")":"","auto"),g.font,g.useRangeColor?O(s.value,e.ranges,g.font.color):g.font.color,l,"pointer-events:none;"));i.appendChild(l)},e.prototype.findAnchor=function(e,t,i,o){if(t.autoAngle)return"middle";var n="Inside"===t.position?i>120&&i<240?"start":300<i||i<60?"end":"middle":i>120&&i<240?"end":300<i||i<60?"start":"middle";return e.y+="Inside"===t.position?i>=240&&i<=300?o.size.height/2:i>=60&&i<=120?0:o.size.height/4:i>=240&&i<=300?0:i>=60&&i<=120?o.size.height/2:o.size.height/4,n},e.prototype.drawMinorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MinorTickLines_"+t}),r=e.minorTicks,a=null!==r.interval?r.interval:e.visibleRange.interval/2,s=r.useRangeColor;if(r.width&&r.height&&a){for(var l=e.visibleRange.min,u=e.visibleRange.max;l<=u;l+=a)this.majorValues.indexOf(+l.toFixed(3))<0&&h(new F(o.element.id+"_Axis_Minor_TickLine_"+t+"_"+l,"transparent",r.width,s?O(l,e.ranges,r.color):r.color,null,"0",this.calculateTicks(l,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.drawMajorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MajorTickLines_"+t}),r=e.majorTicks,a=r.useRangeColor;if(this.majorValues=[],r.width&&r.height&&e.visibleRange.interval){for(var s=e.visibleRange.min,l=e.visibleRange.max,u=e.visibleRange.interval;s<=l;s+=u)this.majorValues.push(+s.toFixed(3)),h(new F(o.element.id+"_Axis_Major_TickLine_"+t+"_"+s,"transparent",r.width,a?O(s,e.ranges,r.color):r.color,null,"0",this.calculateTicks(s,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.calculateTicks=function(e,t,i){var o=i.lineStyle.width/2+t.offset,n="Outside"===t.position,r=c(e,i.visibleRange.max,i.visibleRange.min,i.startAngle,i.endAngle,"ClockWise"===i.direction),a=f(r,i.currentRadius+(n?o:-o),this.gauge.midPoint),s=f(r,i.currentRadius+(n?o:-o)+(n?t.height:-t.height),this.gauge.midPoint);return"M "+a.x+" "+a.y+" L "+s.x+" "+s.y+" "},e.prototype.drawAxisRange=function(e,t,i,o){var r,a,s,l,u,d,p,g,y,m,v=this,f=o.renderer.createGroup({id:o.element.id+"_Axis_Ranges_"+t}),b="ClockWise"===e.direction,R=e.visibleRange.min,w=e.visibleRange.max;e.ranges.map(function(i,A){v.calculateRangeRadius(e,i),s=Math.min(Math.max(i.start,R),i.end),l=Math.min(Math.max(i.start,i.end),w),s!==l&&(r=c(s,w,R,e.startAngle,e.endAngle,b),a=c(l,w,R,e.startAngle,e.endAngle,b),u=i.startWidth.length>0?n(i.startWidth,i.currentRadius):i.startWidth,d=i.endWidth.length>0?n(i.endWidth,i.currentRadius):i.endWidth,a=b?a:[r,r=a][0],d=b?d:[u,u=d][0],y=((i.currentRadius-u/2)*(r*Math.PI/180)-i.roundedCornerRadius/4)/(i.currentRadius-u/2)*180/Math.PI,m=((i.currentRadius-d/2)*(a*Math.PI/180)+i.roundedCornerRadius/4)/(i.currentRadius-d/2)*180/Math.PI,p=(i.currentRadius*(r*Math.PI/180)+i.roundedCornerRadius)/i.currentRadius*180/Math.PI,g=(i.currentRadius*(a*Math.PI/180)-i.roundedCornerRadius)/i.currentRadius*180/Math.PI,i.roundedCornerRadius?h(new F(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,1,"0",P(o.midPoint,Math.floor(p),Math.ceil(g),Math.floor(y),Math.ceil(m),i.currentRadius,u,d),"","pointer-events:none;"),f,o):h(new F(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,1,"0",x(o.midPoint,Math.floor(r),Math.ceil(a),i.currentRadius,u,d),"","pointer-events:none;"),f,o))}),i.appendChild(f)},e.prototype.calculateRangeRadius=function(e,t){var i=null!==t.radius?t.radius:"100%";t.currentRadius=l(i,e.currentRadius)},e.prototype.setRangeColor=function(e){var t=(this.gauge.theme,["#50c917","#27d5ff","#fcde0b","#ffb133","#ff5985"]);e.ranges.map(function(e,i){e.rangeColor=e.color?e.color:t[i%t.length]})},e}(),xe=function(){function e(e){this.gauge=e}return e.prototype.drawPointers=function(e,t,i,o,n){var r=this;void 0===n&&(n=!0);var a,s=o.renderer.createGroup({id:o.element.id+"_Axis_Pointers_"+t});e.pointers.map(function(i,l){e.visibleRange,i.pathElement=[],r.calculatePointerRadius(e,i),a=o.renderer.createGroup({id:o.element.id+"_Axis_"+t+"_Pointer_"+l}),r["draw"+i.type+"Pointer"](e,t,l,a,o),r.setPointerValue(e,i,i.currentValue),s.appendChild(a),n&&r.doPointerAnimation(i,e)}),i.appendChild(s)},e.prototype.calculatePointerRadius=function(e,t){t.currentRadius=null===t.radius?e.currentRadius-(e.farSize+5):l(t.radius,e.currentRadius)},e.prototype.drawNeedlePointer=function(e,t,i,o,n){var r,a,s,u,d=e.pointers[i],p=n.midPoint,c=d.pointerWidth/2;a=f(0,d.currentRadius,p),s="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+p.y+" L "+p.x+" "+(p.y+c)+" Z",d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_Needle_"+i,d.color,d.border.width,d.border.color,null,"0",s),o,n)),r=l(d.needleTail.length,d.currentRadius),u="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c),r&&(a=f(180,r,n.midPoint),s="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c)+" Z",d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleTail_"+i,d.needleTail.color,d.needleTail.border.width,d.needleTail.border.color,null,"0",s),o,n)),u+=" L "+a.x+" "+(p.y+c)+" L "+a.x+" "+(p.y-c)),d.cap.radius&&d.pathElement.push(h(z(p,"Circle",new V(2*d.cap.radius,2*d.cap.radius),"",new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleCap_"+i,d.cap.color,d.cap.border.width,d.cap.border.color,null,"0","","")),o,n,"Ellipse")),d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleRect_"+i,"transparent",0,"transpanret",null,"0",u+" Z"),o,n))},e.prototype.setPointerValue=function(e,t,i){var o=this.gauge.midPoint,n="ClockWise"===e.direction,r=c(e.visibleRange.min,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n),a=c(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n);a=n?r===a?a+1:a:r===a?[r,r=a-1][0]:[r,r=a][0];var s,l,u,h;u=((t.currentRadius-t.pointerWidth/2)*(r*Math.PI/180)-t.roundedCornerRadius/4)/(t.currentRadius-t.pointerWidth/2)*180/Math.PI,h=((t.currentRadius-t.pointerWidth/2)*(a*Math.PI/180)+t.roundedCornerRadius/4)/(t.currentRadius-t.pointerWidth/2)*180/Math.PI,s=(t.currentRadius*(r*Math.PI/180)+t.roundedCornerRadius)/t.currentRadius*180/Math.PI,l=(t.currentRadius*(a*Math.PI/180)-t.roundedCornerRadius)/t.currentRadius*180/Math.PI,t.pathElement.map(function(d){"RangeBar"===t.type?t.roundedCornerRadius?d.setAttribute("d",P(o,s,l,u,h,t.currentRadius,t.pointerWidth,t.pointerWidth)):d.setAttribute("d",w(o,r,a,t.currentRadius,t.currentRadius-t.pointerWidth)):d.setAttribute("transform","rotate("+c(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n)+","+o.x+","+o.y+")"),d.setAttribute("aria-label",t.description||"Pointer:"+i.toString())})},e.prototype.drawMarkerPointer=function(e,t,i,o,n){var r=e.pointers[i],a=f(0,r.currentRadius,n.midPoint);r.pathElement.push(h(z(a,r.markerShape,new V(r.markerWidth,r.markerHeight),r.imageUrl,new F(n.element.id+"_Axis_"+t+"_Pointer_Marker_"+i,r.color,r.border.width,r.border.color,null,"0","","")),o,n,"Circle"===r.markerShape?"Ellipse":"Image"===r.markerShape?"Image":"Path"))},e.prototype.drawRangeBarPointer=function(e,t,i,o,n){var r=e.pointers[i];r.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_RangeBar_"+i,r.color,r.border.width,r.border.color,1,"0",""),o,n))},e.prototype.doPointerAnimation=function(e,t){var i=this,o=t.visibleRange.min,n=e.currentValue;e.animation.enable&&o!==n&&this.gauge.animatePointer&&e.pathElement.map(function(r){"RangeBar"===e.type?i.performRangeBarAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth):i.performNeedleAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth)})},e.prototype.performNeedleAnimation=function(e,i,o,n,r,a,s){var l,u=this,h="ClockWise"===n.direction,d=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),g=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),y=d>g?g+360:g;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){l=i<o||Math.round(d)===Math.round(y)?h?y-d:y-d-360:h?y-d-360:y-d,e.style.animation="None",e.setAttribute("transform","rotate("+p(t.timeStamp,d,l,t.duration)+","+u.gauge.midPoint.x.toString()+","+u.gauge.midPoint.y.toString()+")")},end:function(t){u.setPointerValue(n,r,o),("Marker"===r.type||e.id.indexOf("_Pointer_NeedleCap")>=0)&&u.gauge.trigger(ue,{axis:n,pointer:r})}})},e.prototype.performRangeBarAnimation=function(e,i,o,n,r,a,s){var l,u=this,h="ClockWise"===n.direction,d=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),g=c(n.visibleRange.min,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),y=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),m=d>y?y+360:y;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){e.style.animation="None",l=i<o||Math.round(d)===Math.round(m)?h?m-d:m-d-360:h?m-d-360:m-d,h?e.setAttribute("d",w(u.gauge.midPoint,g,p(t.timeStamp,d,l,t.duration)+1e-4,a,s)):e.setAttribute("d",w(u.gauge.midPoint,p(t.timeStamp,d,l,t.duration),g+1e-4,a,s))},end:function(e){u.setPointerValue(n,r,o),u.gauge.trigger(ue,{axis:n,pointer:r})}})},e}(),be=function(){function e(e){this.gauge=e,this.axisRenderer=new fe(e),this.pointerRenderer=new xe(e)}return e.prototype.measureAxis=function(e){this.measureAxisSize(this.gauge,e),this.calculateAxesRadius()},e.prototype.calculateAxesRadius=function(){for(var e,i,o=0,n=this.gauge.margin.left+this.gauge.margin.right,r=this.gauge.margin.top+this.gauge.margin.bottom,a=0,s=this.gauge.axes;a<s.length;a++){var u=s[a];if(e=Math.min(u.rect.width,u.rect.height)/2,i=null!=u.radius?l(u.radius,e):e,o=Math.max.apply(Math,u.ranges.map(function(e){return e.radius?e.radius.indexOf("%")<0?100:parseInt(e.radius,10):0})),i=o>100&&null==u.radius?100*i/o:i,u.currentRadius=i-u.nearSize,this.gauge.moveToCenter&&1===this.gauge.axes.length&&t.isNullOrUndefined(this.gauge.centerX)&&t.isNullOrUndefined(this.gauge.centerY)){var h=void 0,d=void 0,p=f((h=m(h=u.startAngle,u.endAngle)?[0,d=360][0]:h)-90,i,this.gauge.midPoint);d=u.endAngle;var c=f((d-=m(h,d)?1e-4:0)-90,i,this.gauge.midPoint),g=void 0,y=void 0,v=void 0,x=void 0,b=void 0,P=void 0,R=void 0;h>=270&&h<=360&&(d>270&&d<=360||d>=0&&d<=180)?(v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),R=d<=360&&d>=270?this.gauge.midPoint:d<=90?c:f(0,i,this.gauge.midPoint),x=Math.abs(R.x-this.gauge.gaugeRect.width),p=d<=360&&d>=270?c:f(270,i,this.gauge.midPoint),b=Math.abs(p.y-this.gauge.gaugeRect.y),c=d<=360&&d>=270||d>=0&&d<90?this.gauge.midPoint:d>=90&&d<=180?c:f(90,i,this.gauge.midPoint),P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):h>=0&&h<90&&d>=0&&d<=270?(b=Math.abs(p.y-this.gauge.gaugeRect.y),R=d>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(R.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height)),p=d>=180?c:this.gauge.midPoint,v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),c=d>=90?f(0,i,this.gauge.midPoint):c,x=Math.abs(c.x-this.gauge.gaugeRect.width)):h>=90&&h<180&&d>90&&d<=360?(R=d<=180?this.gauge.midPoint:d>=270?f(180,i,this.gauge.midPoint):c,v=Math.abs(R.x-this.gauge.gaugeRect.x),x=Math.abs(p.x-this.gauge.gaugeRect.width),p=d>270?f(d-90,i,this.gauge.midPoint):this.gauge.midPoint,b=Math.abs(this.gauge.gaugeRect.y-p.y),c=d>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):h>=180&&h<=270&&(d<=360&&d>=270||d<=90&&d>=0)&&(R=d>180&&d<270?c:f(180,i,this.gauge.midPoint),v=Math.abs(this.gauge.gaugeRect.x-Math.abs(R.x-this.gauge.gaugeRect.x)),R=d>=180&&d<=360?this.gauge.midPoint:c,x=Math.abs(R.x-this.gauge.gaugeRect.width),R=d>180&&d<270?this.gauge.midPoint:d>=270&&d<=360?c:f(270,i,this.gauge.midPoint),b=Math.abs(R.y-this.gauge.gaugeRect.y),P=Math.abs(p.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))),g=Math.abs(v+x-n),y=Math.abs(b+P-r),this.gauge.midPoint.x=this.gauge.midPoint.x-v/2+x/2,this.gauge.midPoint.y=this.gauge.midPoint.y-b/2+P/2,e=Math.min(this.gauge.gaugeRect.width,this.gauge.gaugeRect.height)/2+Math.min(g,y)/2,u.currentRadius=(null!=u.radius?l(u.radius,e):e)-u.nearSize}u.visibleRange.interval=this.calculateNumericInterval(u,u.rect),this.calculateVisibleLabels(u)}},e.prototype.measureAxisSize=function(e,t){var i,o=this;this.computeSize(e.axes,t),e.axes.map(function(e,n){i=d(n,o.farSizes.length,o.farSizes),e.rect=new D(t.x+i,t.y+i,t.width-2*i,t.height-2*i)})},e.prototype.calculateAxisValues=function(e){for(var t=0,i=this.gauge.axes;t<i.length;t++){var o=i[t];this.calculateVisibleRange(o,e),this.calculateVisibleLabels(o)}},e.prototype.calculateVisibleRange=function(e,t){var i=e.majorTicks.interval,o=Math.min(null===e.minimum?0:e.minimum,e.maximum),n=Math.max(e.minimum,null===e.maximum?100:e.maximum);e.pointers.map(function(t){t.currentValue=null!==t.value?t.value<o?o:t.value>n?n:t.value:o,o=null===e.minimum?Math.min(t.currentValue,o):o,n=null===e.maximum?Math.max(t.currentValue,n):n}),o=o===n?null!==i?o-i:o-1:o,e.visibleRange={min:o,max:n,interval:i},e.visibleRange.interval=this.calculateNumericInterval(e,t)},e.prototype.calculateNumericInterval=function(e,t){if(null!==e.majorTicks.interval)return e.majorTicks.interval;var i=e.endAngle-e.startAngle;return i=i<=0?i+360:i,this.calculateNiceInterval(e.visibleRange.max,e.visibleRange.min,e.currentRadius?e.currentRadius:t.width/2,i)},e.prototype.calculateNiceInterval=function(e,t,i,o){for(var n=e-t,r=2*Math.PI*i*(o/360),a=Math.max(.01599*r,1),s=n/a,l=Math.pow(10,Math.floor(Math.log(s)/Math.log(10))),u=0,h=[10,5,2,1];u<h.length;u++){var d=l*h[u];if(a<n/d)break;s=d}return s},e.prototype.calculateVisibleLabels=function(e){var t,i=e.labelStyle,o=i.format&&null!==i.format.match("{value}"),n=this.gauge.intl.getNumberFormat({format:k(i.format),useGrouping:this.gauge.useGroupingSeparator});e.visibleLabels=[];for(var r=e.visibleRange.min,a=e.visibleRange.interval,s=e.visibleRange.max;r<=s&&a;r+=a)t={cancel:!1,name:he,axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(r)):n(r),value:r},this.gauge.trigger(he,t),t.cancel||e.visibleLabels.push(new H(t.text,r));this.getMaxLabelWidth(this.gauge,e)},e.prototype.computeSize=function(e,t){var i,o,n,r,a,s,l=0,u=0,h=0;this.farSizes=[],this.calculateAxisValues(t);for(var d=0,p=e;d<p.length;d++){var c=p[d];i=c.lineStyle.width/2,o=0,n=0,r="Outside"===c.majorTicks.position,l=c.majorTicks.offset,a="Outside"===c.minorTicks.position,u=c.minorTicks.offset,s="Outside"===c.labelStyle.position,h=c.labelStyle.offset,o+=r&&a&&s?0:5,o+=(r?c.majorTicks.height+i:0)+(s?c.maxLabelSize.height+10+h:0)+(a&&!r?c.minorTicks.height+i:0)+i,o+=r&&a?Math.max(l,u):r?l:a?u:0,n+=(r?0:c.majorTicks.height+i)+(s?0:c.maxLabelSize.height+10+h)+(!a&&r?c.minorTicks.height+i:0)+i,n+=r||a?r?a?0:u:l:Math.max(l,u),this.farSizes[this.farSizes.length-1]&&(this.farSizes[this.farSizes.length-1]+=n+o),c.nearSize=o-5,c.farSize=n,o=this.gauge.axes.length===this.farSizes.length+1?0:o,this.farSizes.push(o)}},e.prototype.renderAxes=function(e){var i=this;void 0===e&&(e=!0);var o,n=this.gauge,r=this.axisRenderer,a=n.renderer.createGroup({id:n.element.id+"_AxesCollection","clip-path":"url(#"+n.element.id+"_GaugeAreaClipRect_)"});n.element.appendChild(t.createElement("div",{id:n.element.id+"_Secondary_Element",styles:"position: relative"})),n.axes.map(function(t,s){o=n.renderer.createGroup({id:n.element.id+"_Axis_Group_"+s}),r.drawAxisOuterLine(t,s,o,n),r.drawAxisRange(t,s,o,n),r.drawAxisLine(t,s,o,n),r.drawMajorTickLines(t,s,o,n),r.drawMinorTickLines(t,s,o,n),r.drawAxisLabels(t,s,o,n),i.pointerRenderer.drawPointers(t,s,o,n,e),n.annotationsModule&&n.annotationsModule.renderAnnotation(t,s),a.appendChild(o)}),n.svgObject.appendChild(n.renderer.drawClipPath({id:n.element.id+"_GaugeAreaClipRect_",x:0,y:0,width:n.availableSize.width,height:n.availableSize.height,fill:"transparent",stroke:"transparent"})),n.svgObject.appendChild(a)},e.prototype.getMaxLabelWidth=function(e,t){t.maxLabelSize=new V(0,0);for(var i=0,n=t.visibleLabels;i<n.length;i++){var r=n[i];r.size=o(r.text,t.labelStyle.font),t.maxLabelSize.width=r.size.width>t.maxLabelSize.width?r.size.width:t.maxLabelSize.width,t.maxLabelSize.height=r.size.height>t.maxLabelSize.height?r.size.height:t.maxLabelSize.height}},e}(),Pe=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Re=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},we=function(e){function i(t,i){return e.call(this,t,i)||this}return Pe(i,e),i.prototype.preRender=function(){this.unWireEvents(),this.trigger("load",{gauge:this}),this.themeEffect(),this.initPrivateVariable(),this.setCulture(),this.createSvg(),this.wireEvents()},i.prototype.themeEffect=function(){"Highcontrast"===this.theme?(this.titleStyle.color=this.titleStyle.color||"#FFFFFF",this.setThemeColors("#FFFFFF","#FFFFFF")):(this.titleStyle.color=this.titleStyle.color||"#424242",this.setThemeColors("#212121","#757575"))},i.prototype.setThemeColors=function(e,t){for(var i=0,o=this.axes;i<o.length;i++){var n=o[i];n.lineStyle.color=n.lineStyle.color||t,n.labelStyle.font.color=n.labelStyle.font.color||e,n.majorTicks.color=n.majorTicks.color||t,n.minorTicks.color=n.minorTicks.color||t;for(var r=0,a=n.pointers;r<a.length;r++){var s=a[r];s.color=s.color||t,s.needleTail.color=s.needleTail.color||t,s.needleTail.border.color=s.needleTail.border.color||t,s.cap.color=s.cap.color||t,s.cap.border.color=s.cap.border.color||t}}},i.prototype.render=function(){this.calculateBounds(),this.renderElements()},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMove),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEnd),t.EventHandler.remove(this.element,"contextmenu",this.gaugeRightClick),t.EventHandler.remove(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize)},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown,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,"contextmenu",this.gaugeRightClick,this),t.EventHandler.add(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize.bind(this)),this.setGaugeStyle(this.element)},i.prototype.mouseMove=function(e){var i=this.getMouseArgs(e,"touchmove",ce);this.trigger(ce,i);var o;this.tooltipModule;return i.cancel||this.enablePointerDrag&&this.activePointer&&(o={axis:this.activeAxis,pointer:this.activePointer,previousValue:this.activePointer.currentValue,name:"dragMove",currentValue:null},this.pointerDrag(new N(i.x,i.y)),o.currentValue=this.activePointer.currentValue,this.trigger("dragMove",o)),this.notify(t.Browser.touchMoveEvent,e),!1},i.prototype.mouseLeave=function(e){this.activeAxis=null,this.activePointer=null,this.svgObject.setAttribute("cursor","auto");var t=this.getMouseArgs(e,"touchmove",ge);return this.trigger(ge,t),!1},i.prototype.gaugeRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},i.prototype.pointerDrag=function(e){var t=this.activeAxis,i=t.visibleRange,o=y(v(this.midPoint,e),i.max,i.min,t.startAngle,t.endAngle,"ClockWise"===t.direction);o>=i.min&&o<=i.max&&(this.activePointer.currentValue=o,this.activePointer.value=o,this.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(t,this.activePointer,o))},i.prototype.gaugeOnMouseDown=function(e){var t,i=this.getMouseArgs(e,"touchstart",ye);return this.trigger(ye,i),!i.cancel&&i.target.id.indexOf("_Pointer_")>=0&&i.target.id.indexOf(this.element.id+"_Axis_")>=0&&(t=L(i.target.id,this),this.activeAxis=this.axes[t.axisIndex],this.activePointer=this.activeAxis.pointers[t.pointerIndex],this.trigger("dragStart",{axis:this.activeAxis,name:"dragStart",pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.svgObject.setAttribute("cursor","pointer")),!1},i.prototype.mouseEnd=function(e){var i=this.getMouseArgs(e,"touchend","gaugeMouseUp");"touch"===e.pointerType||"2"===e.pointerType||e.type,this.tooltipModule;return this.trigger("gaugeMouseUp",i),this.activeAxis&&this.activePointer&&(this.trigger("dragEnd",{name:"dragEnd",axis:this.activeAxis,pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.activeAxis=null,this.activePointer=null),this.svgObject.setAttribute("cursor","auto"),this.notify(t.Browser.touchEndEvent,e),!1},i.prototype.getMouseArgs=function(e,t,i){var o=this.element.getBoundingClientRect(),n=new N(-o.left,-o.top),r=e.type===t;return n.x+=r?e.changedTouches[0].clientX:e.clientX,n.y+=r?e.changedTouches[0].clientY:e.clientY,{cancel:!1,name:i,x:n.x,y:n.y,target:e.target}},i.prototype.gaugeResize=function(e){var t=this,i={gauge:this,previousSize:new V(this.availableSize.width,this.availableSize.height),name:"resized",currentSize:new V(0,0)};return this.animatePointer=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.element.classList.contains("e-circulargauge")&&(this.resizeTo=window.setTimeout(function(){t.createSvg(),t.calculateBounds(),t.renderElements(),i.currentSize=t.availableSize,t.trigger("resized",i)},500)),!1},i.prototype.setGaugeStyle=function(e){e.style.touchAction=this.enablePointerDrag?"none":"element",e.style.msTouchAction=this.enablePointerDrag?"none":"element",e.style.msContentZooming="none",e.style.msUserSelect="none",e.style.webkitUserSelect="none",e.style.position="relative"},i.prototype.setCulture=function(){this.intl=new t.Internationalization},i.prototype.createSvg=function(){this.removeSvg(),this.calculateSvgSize(),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},i.prototype.removeSvg=function(){if(E(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)}},i.prototype.initPrivateVariable=function(){this.renderer=new t.SvgRenderer(this.element.id),this.gaugeAxisLayoutPanel=new be(this),this.animatePointer=!0},i.prototype.calculateSvgSize=function(){var e=this.element.offsetWidth,t=this.element.offsetHeight,i=l(this.width,e)||e||600,o=l(this.height,t)||t||450;this.availableSize=new V(i,o)},i.prototype.calculateBounds=function(){var e,i=this.margin,n=0;this.title&&(n=o(this.title,this.titleStyle).height+5);var r=i.top+n+this.border.width,a=i.left+this.border.width,s=this.availableSize.width-a-i.right-this.border.width,u=this.availableSize.height-r-this.border.width-i.bottom,h=Math.min(s,u)/2;e=this.moveToCenter&&1===this.axes.length&&t.isNullOrUndefined(this.centerX)&&t.isNullOrUndefined(this.centerY)?new D(a,r,s,u):new D(a+s/2-h,r+u/2-h,2*h,2*h),this.gaugeRect=e;var d=null!==this.centerX?l(this.centerX,this.availableSize.width):e.x+e.width/2,p=null!==this.centerY?l(this.centerY,this.availableSize.height):e.y+e.height/2;this.midPoint=new N(d,p),this.gaugeAxisLayoutPanel.measureAxis(e)},i.prototype.renderElements=function(e){void 0===e&&(e=!0),this.renderBorder(),this.renderTitle(),this.gaugeAxisLayoutPanel.renderAxes(e),this.element.appendChild(this.svgObject),this.trigger("loaded",{gauge:this})},i.prototype.renderTitle=function(){if(this.title){var e=o(this.title,this.titleStyle),t=u(new G(this.element.id+"_CircularGaugeTitle",this.availableSize.width/2,this.margin.top+e.height/4*3,"middle",this.title),this.titleStyle,this.titleStyle.color,this.svgObject,"");t.setAttribute("aria-label",this.description||this.title),t.setAttribute("tabindex",this.tabIndex.toString())}},i.prototype.renderBorder=function(){var e=this.border.width;(e>0||null!==this.background&&"transparent"!==this.background)&&this.svgObject.appendChild(this.renderer.drawRectangle(new W(this.element.id+"_CircularGaugeBorder",this.background,this.border,null,new D(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))))},i.prototype.setPointerValue=function(e,t,i){var o=this,n=this.axes[e],r=n.pointers[t],s=r.currentRadius,l=r.animation.enable;i=(i=i<n.visibleRange.min?n.visibleRange.min:i)>n.visibleRange.max?n.visibleRange.max:i,r.pathElement.map(function(e){"RangeBar"===r.type?(a(e,r.color,r.border),l?o.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(e,r.currentValue,i,n,r,s,s-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i)):(e.id.indexOf("_Pointer_NeedleCap_")>=0?a(e,r.cap.color,r.cap.border):e.id.indexOf("_Pointer_NeedleTail_")>=0?a(e,r.needleTail.color,r.needleTail.border):e.id.indexOf("_Pointer_NeedleRect_")>=0?a(e,"transparent",{color:"transparent",width:0}):a(e,r.color,r.border),l?o.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(e,r.currentValue,i,n,r,s,s-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i))}),r.currentValue=i,r.value=i},i.prototype.setAnnotationValue=function(e,i,o){var n=null!==_(this.element.id+"_Annotations_"+e),r=_(this.element.id+"_Annotations_"+e)||t.createElement("div",{id:this.element.id+"_Annotations_"+e}),a=this.axes[e].annotations[i];null!==o&&(E(this.element.id+"_Axis_"+e+"_Annotation_"+i),a.content=o,this.annotationsModule.createTemplate(r,i,e),n||_(this.element.id+"_Secondary_Element").appendChild(r))},i.prototype.setRangeValue=function(e,t,i,o){var r,s=_(this.element.id+"_Axis_"+e+"_Range_"+t),l=this.axes[e],u=l.ranges[t],h=l.visibleRange,d="ClockWise"===l.direction,p=Math.min(Math.max(i,h.min),o),g=Math.min(Math.max(i,o),h.max),y=c(p,h.max,h.min,l.startAngle,l.endAngle,d),m=c(g,h.max,h.min,l.startAngle,l.endAngle,d);r=u.startWidth.length>0?n(u.startWidth,u.currentRadius):u.startWidth;var v;v=u.endWidth.length>0?n(u.endWidth,u.currentRadius):u.endWidth,m=d?m:[y,y=m][0],v=d?v:[r,r=v][0],s.setAttribute("d",x(this.midPoint,Math.round(y),Math.round(m),u.currentRadius,r,v)),a(s,u.color?u.color:u.rangeColor,{color:u.color?u.color:u.rangeColor,width:0})},i.prototype.destroy=function(){this.unWireEvents(),this.removeSvg(),e.prototype.destroy.call(this)},i.prototype.requiredModules=function(){var e=[],t=!1;return this.axes.map(function(e){e.annotations.map(function(e){t=t||null!==e.content})}),t&&e.push({member:"Annotations",args:[this,me]}),this.tooltip.enable&&e.push({member:"Tooltip",args:[this,ve]}),e},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.onPropertyChanged=function(e,t){for(var i=!1,o=!1,n=!1,r=0,a=Object.keys(e);r<a.length;r++){switch(a[r]){case"height":case"width":case"centerX":case"centerY":case"margin":this.createSvg(),o=!0;break;case"title":o=""===e.title||""===t.title,i=!(""===e.title||""===t.title);break;case"titleStyle":e.titleStyle&&e.titleStyle.size?o=!0:i=!0;break;case"border":case"background":i=!0;break;case"axes":n=!0}}!o&&i&&(this.removeSvg(),this.renderElements()),o&&(this.removeSvg(),this.calculateBounds(),this.renderElements()),!n||i||o||(this.removeSvg(),this.calculateBounds(),this.renderElements(!1))},i.prototype.getModuleName=function(){return"circulargauge"},Re([t.Property(null)],i.prototype,"width",void 0),Re([t.Property(null)],i.prototype,"height",void 0),Re([t.Complex({color:"transparent",width:0},Y)],i.prototype,"border",void 0),Re([t.Property("transparent")],i.prototype,"background",void 0),Re([t.Property("")],i.prototype,"title",void 0),Re([t.Complex({size:"15px",color:null},Z)],i.prototype,"titleStyle",void 0),Re([t.Complex({},q)],i.prototype,"margin",void 0),Re([t.Collection([{}],le)],i.prototype,"axes",void 0),Re([t.Complex({},J)],i.prototype,"tooltip",void 0),Re([t.Property(!1)],i.prototype,"enablePointerDrag",void 0),Re([t.Property(null)],i.prototype,"centerX",void 0),Re([t.Property(null)],i.prototype,"centerY",void 0),Re([t.Property(!1)],i.prototype,"moveToCenter",void 0),Re([t.Property("Material")],i.prototype,"theme",void 0),Re([t.Property(!1)],i.prototype,"useGroupingSeparator",void 0),Re([t.Property(null)],i.prototype,"description",void 0),Re([t.Property(1)],i.prototype,"tabIndex",void 0),Re([t.Event()],i.prototype,"loaded",void 0),Re([t.Event()],i.prototype,"load",void 0),Re([t.Event()],i.prototype,"animationComplete",void 0),Re([t.Event()],i.prototype,"axisLabelRender",void 0),Re([t.Event()],i.prototype,"annotationRender",void 0),Re([t.Event()],i.prototype,"tooltipRender",void 0),Re([t.Event()],i.prototype,"dragStart",void 0),Re([t.Event()],i.prototype,"dragMove",void 0),Re([t.Event()],i.prototype,"dragEnd",void 0),Re([t.Event()],i.prototype,"gaugeMouseMove",void 0),Re([t.Event()],i.prototype,"gaugeMouseLeave",void 0),Re([t.Event()],i.prototype,"gaugeMouseDown",void 0),Re([t.Event()],i.prototype,"gaugeMouseUp",void 0),Re([t.Event()],i.prototype,"resized",void 0),i=Re([t.NotifyPropertyChanges],i)}(t.Component);e.CircularGauge=we,e.Annotations=me,e.Line=$,e.Label=ee,e.Range=te,e.Tick=ie,e.Cap=oe,e.NeedleTail=ne,e.Animation=re,e.Annotation=ae,e.Pointer=se,e.Axis=le,e.Border=Y,e.Font=Z,e.Margin=q,e.TooltipSettings=J,e.GaugeTooltip=ve,e.measureText=o,e.toPixel=n,e.getFontStyle=r,e.setStyles=a,e.measureElementRect=s,e.stringToNumber=l,e.textElement=u,e.appendPath=h,e.calculateSum=d,e.linear=p,e.getAngleFromValue=c,e.getDegree=g,e.getValueFromAngle=y,e.isCompleteAngle=m,e.getAngleFromLocation=v,e.getLocationFromAngle=f,e.getPathArc=x,e.getRangePath=b,e.getRoundedPathArc=P,e.getRoundedPath=R,e.getCompleteArc=w,e.getCirclePath=A,e.getCompletePath=M,e.getElement=_,e.getTemplateFunction=C,e.getElementSize=S,e.removeElement=E,e.getPointer=L,e.getMousePosition=T,e.getLabelFormat=k,e.calculateShapes=z,e.getRangeColor=O,e.CustomizeOption=B,e.PathOption=F,e.RectOption=W,e.Size=V,e.GaugeLocation=N,e.Rect=D,e.TextOption=G,e.VisibleLabels=H,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base"],t):t(e.ej={},e.ej2Base,e.ej2SvgBase)}(this,function(e,t,i){"use strict";function o(e,i){var o=document.getElementById("gauge-measuretext");null===o&&(o=t.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(o));var n="position: absolute; visibility: hidden;;left: 0; top: -100; white-space: nowrap;"+r(i);return o.innerHTML=e,o.setAttribute("style",n),new V(o.clientWidth,o.clientHeight)}function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function r(e){return"font-size:"+e.size+"; font-style:"+e.fontStyle+"; font-weight:"+e.fontWeight+"; font-family:"+e.fontFamily+";opacity:"+e.opacity+"; color:"+e.color+";"}function a(e,i,o){t.setStyleAttribute(e,{stroke:o.color,"stroke-width":o.width,fill:i})}function s(e){var t;return document.body.appendChild(e),t=e.getBoundingClientRect(),E(e.id),t}function l(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function u(e,i,o,n,r){var a,s={},l=new t.SvgRenderer(""),u=r+" font-size:"+i.size+"; font-style:"+i.fontStyle+" ; font-weight:"+i.fontWeight+"; font-family:"+i.fontFamily+";";return s={id:e.id,x:e.x,y:e.y,fill:o,"text-anchor":e.anchor,transform:e.transform,opacity:i.opacity,"dominant-baseline":e.baseLine,style:u},a=l.createText(s,e.text),n.appendChild(a),a}function h(e,t,i,o){o=o||"Path";var n=i.renderer["draw"+o](e);return n.setAttribute("transform",e.transform),n.setAttribute("style",e.style),t.appendChild(n),n}function d(e,t,i){for(var o=0,n=i.length;e<n;e++)o+=i[e];return o}function p(e,t,i,o){return-i*Math.cos(e/o*(Math.PI/2))+i+t}function c(e,t,i,o,n,r){var a;return n-=m(o,n)?1e-4:0,o-=90,n-=90,a=r?(e-i)*(g(o,n)/(t-i))+o:(a=n-(e-i)*(g(o,n)/(t-i)))<0?360+a:a,a=Math.round(a)>=360?a-360:Math.round(a)<0?360+a:a}function g(e,t){var i=t-e;return i<0?i+360:i}function y(e,t,i,o,n,r){return n-=m(o,n)?1e-4:0,e=e<o?e+360:e,r?(e-o)/g(o,n)*(t-i)+i:t-((e-o)/g(o,n)*(t-i)+i)}function m(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function v(e,t){var i=Math.atan2(t.y-e.y,t.x-e.x);return i=Math.round((i<0?6.283+i:i)*(180/Math.PI))-270,i+=i<0?360:0}function f(e,t,i){var o=e*Math.PI/180;return new N(Math.cos(o)*t+i.x,Math.sin(o)*t+i.y)}function x(e,t,i,o,n,r){var a=g(t,i-=m(t,i)?1e-4:0),s=o-n,l=o-r,u=o-(n+r)/2;return void 0!==n&&void 0!==r?b(f(t,o,e),f(i,o,e),f(t,s,e),f(i,l,e),o,u,u,a<180?0:1):A(f(t,o,e),f(i,o,e),o,a<180?0:1)}function b(e,t,i,o,n,r,a,s){return"M "+e.x+" "+e.y+" A "+n+" "+n+" 0 "+s+" 1 "+t.x+" "+t.y+" L "+o.x+" "+o.y+" A "+a+" "+r+" 0 "+s+" 0 "+i.x+" "+i.y+" Z"}function P(e,t,i,o,n,r,a,s){var l=g(t,i-=m(t,i)?1e-4:0),u=r-a,h=r-s,d=r-(a+s)/2;return R(f(t,r,e),f(i,r,e),f(n,r,e),f(n,h,e),f(o,r,e),f(o,u,e),f(t,u,e),f(i,h,e),r,d,d,l<180?0:1)}function R(e,t,i,o,n,r,a,s,l,u,h,d){return"M "+e.x+" "+e.y+" A "+l+" "+l+" 0 "+d+" 1 "+t.x+" "+t.y+" C "+i.x+" "+i.y+" "+o.x+" "+o.y+" "+s.x+" "+s.y+" A "+h+" "+u+" 0 "+d+" 0 "+a.x+" "+a.y+" C "+r.x+" "+r.y+" "+n.x+" "+n.y+" "+e.x+" "+e.y+" Z"}function w(e,t,i,o,n){var r=g(t,i-=m(t,i)?1e-4:0);return M(e,f(t,o,e),f(i,o,e),o,f(t,n,e),f(i,n,e),n,r<180?0:1)}function A(e,t,i,o){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+o+" 1 "+t.x+" "+t.y}function M(e,t,i,o,n,r,a,s){return"M "+t.x+" "+t.y+" A "+o+" "+o+" 0 "+s+" 1 "+i.x+" "+i.y+" L "+r.x+" "+r.y+" A "+a+" "+a+" 0 "+s+",0 "+n.x+" "+n.y+" Z"}function _(e){return document.getElementById(e)}function C(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(o){i=t.compile(e)}return i}function S(e,i,o){var n,r,a=C(e);if(a&&a(i).length){r=i.createElement("div",{id:i.element.id+"_Measure_Element"}),i.element.appendChild(r);for(var s=a(i);s.length>0;)r.appendChild(s[0]);o.appendChild(r),n=new V(o.getBoundingClientRect().width,o.getBoundingClientRect().height),t.remove(r)}return n}function E(e){var i=_(e);i&&t.remove(i)}function L(e,t){var i;return i=e.split(t.element.id+"_Axis_")[1],{axisIndex:+i[0],pointerIndex:+i[i.length-1]}}function T(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,r=i.ownerDocument.defaultView.pageYOffset,a=i.ownerDocument.documentElement.clientTop,s=i.ownerDocument.documentElement.clientLeft,l=o.left+n-s,u=o.top+r-a;return new N(e-l,t-u)}function k(e){return e&&null!==e.match("{value}")?"":e}function z(e,i,o,n,r){var a,s=o.width,l=o.height,u=e.x,h=e.y,d=e.x+-s/2,p=e.y+-l/2;switch(i){case"Circle":t.merge(r,{rx:s/2,ry:l/2,cx:u,cy:h});break;case"Diamond":a="M "+d+" "+h+" L "+u+" "+(h+-l/2)+" L "+(u+s/2)+" "+h+" L "+u+" "+(h+l/2)+" L "+d+" "+h+" Z",t.merge(r,{d:a});break;case"Rectangle":a="M "+d+" "+(h+-l/2)+" L "+(u+s/2)+" "+(h+-l/2)+" L "+(u+s/2)+" "+(h+l/2)+" L "+d+" "+(h+l/2)+" L "+d+" "+(h+-l/2)+" Z",t.merge(r,{d:a});break;case"Triangle":a="M "+u+" "+h+" L "+(u-l)+" "+(h-s/2)+"L "+(u-l)+" "+(h+s/2)+" Z",t.merge(r,{d:a});break;case"InvertedTriangle":a="M "+u+" "+h+" L "+(u+l)+" "+(h-s/2)+"L "+(u+l)+" "+(h+s/2)+" Z",t.merge(r,{d:a});break;case"Image":t.merge(r,{href:n,height:l,width:s,x:d,y:p})}return r}function O(e,t,i){var o=0,n=0,r=t.filter(function(t){return o=Math.min(t.start,t.end),n=Math.max(t.start,t.end),e>=o&&n>=e});return r.length?r[0].rangeColor:i}var I,j=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),B=function(){return function(e){this.id=e}}(),F=function(e){function t(t,i,o,n,r,a,s,l,u){void 0===l&&(l=""),void 0===u&&(u="");var h=e.call(this,t)||this;return h.opacity=r,h.fill=i,h.stroke=n,h["stroke-width"]=o,h["stroke-dasharray"]=a,h.d=s,h.transform=l,h.style=u,h}return j(t,e),t}(B),W=function(e){function t(t,i,o,n,r){var a=e.call(this,t)||this;return a.y=r.y,a.x=r.x,a.height=r.height,a.width=r.width,a.opacity=n,a.fill=i,a.stroke=o.color,a["stroke-width"]=o.width,a}return j(t,e),t}(B),V=function(){return function(e,t){this.width=e,this.height=t}}(),N=function(){return function(e,t){this.x=e,this.y=t}}(),D=function(){return function(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}}(),G=function(e){function t(t,i,o,n,r,a,s){void 0===a&&(a="");var l=e.call(this,t)||this;return l.transform="",l.baseLine="auto",l.x=i,l.y=o,l.anchor=n,l.text=r,l.transform=a,l.baseLine=s,l}return j(t,e),t}(B),H=function(){return function(e,t,i){this.text=e,this.value=t,this.size=i}}(),U=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),X=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Y=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property("")],i.prototype,"color",void 0),X([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property("16px")],i.prototype,"size",void 0),X([t.Property("")],i.prototype,"color",void 0),X([t.Property("segoe UI")],i.prototype,"fontFamily",void 0),X([t.Property("Normal")],i.prototype,"fontWeight",void 0),X([t.Property("Normal")],i.prototype,"fontStyle",void 0),X([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property(10)],i.prototype,"left",void 0),X([t.Property(10)],i.prototype,"right",void 0),X([t.Property(10)],i.prototype,"top",void 0),X([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property(!1)],i.prototype,"enable",void 0),X([t.Property("#000000")],i.prototype,"fill",void 0),X([t.Complex({color:"#ffffff",size:"13px"},Z)],i.prototype,"textStyle",void 0),X([t.Property(null)],i.prototype,"format",void 0),X([t.Property(null)],i.prototype,"template",void 0),X([t.Property(!0)],i.prototype,"enableAnimation",void 0),X([t.Complex({},Y)],i.prototype,"border",void 0),X([t.Property(!1)],i.prototype,"showAtMousePosition",void 0),i}(t.ChildProperty);!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.axisLineColor=null,e.tickLineColor=null,e.pointerColor=null}(I||(I={}));var K=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Q=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},$=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(2)],i.prototype,"width",void 0),Q([t.Property("")],i.prototype,"dashArray",void 0),Q([t.Property(I.axisLineColor)],i.prototype,"color",void 0),i}(t.ChildProperty),ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Complex(I.axisLabelFont,Z)],i.prototype,"font",void 0),Q([t.Property("")],i.prototype,"format",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property("None")],i.prototype,"hiddenLabel",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"start",void 0),Q([t.Property(null)],i.prototype,"end",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(10)],i.prototype,"startWidth",void 0),Q([t.Property(10)],i.prototype,"endWidth",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),i}(t.ChildProperty),ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"width",void 0),Q([t.Property(null)],i.prototype,"height",void 0),Q([t.Property(null)],i.prototype,"interval",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),Q([t.Property(I.tickLineColor)],i.prototype,"color",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property("#ffffff")],i.prototype,"color",void 0),Q([t.Complex({color:I.pointerColor,width:8},Y)],i.prototype,"border",void 0),Q([t.Property(8)],i.prototype,"radius",void 0),i}(t.ChildProperty),ne=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(I.pointerColor)],i.prototype,"color",void 0),Q([t.Complex({color:I.pointerColor,width:0},Y)],i.prototype,"border",void 0),Q([t.Property("0%")],i.prototype,"length",void 0),i}(t.ChildProperty),re=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(!0)],i.prototype,"enable",void 0),Q([t.Property(1e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"content",void 0),Q([t.Property(90)],i.prototype,"angle",void 0),Q([t.Property("50%")],i.prototype,"radius",void 0),Q([t.Property("-1")],i.prototype,"zIndex",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Complex({size:"12px",color:"#686868"},Z)],i.prototype,"textStyle",void 0),Q([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),se=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"value",void 0),Q([t.Property("Needle")],i.prototype,"type",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),Q([t.Property(null)],i.prototype,"imageUrl",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(20)],i.prototype,"pointerWidth",void 0),Q([t.Complex({},oe)],i.prototype,"cap",void 0),Q([t.Complex({},ne)],i.prototype,"needleTail",void 0),Q([t.Property(I.pointerColor)],i.prototype,"color",void 0),Q([t.Complex({color:"#DDDDDD",width:0},Y)],i.prototype,"border",void 0),Q([t.Complex(null,re)],i.prototype,"animation",void 0),Q([t.Property("Circle")],i.prototype,"markerShape",void 0),Q([t.Property(5)],i.prototype,"markerHeight",void 0),Q([t.Property(null)],i.prototype,"description",void 0),Q([t.Property(5)],i.prototype,"markerWidth",void 0),i}(t.ChildProperty),le=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return K(i,e),Q([t.Property(null)],i.prototype,"minimum",void 0),Q([t.Property(null)],i.prototype,"maximum",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Complex({},$)],i.prototype,"lineStyle",void 0),Q([t.Collection([{}],te)],i.prototype,"ranges",void 0),Q([t.Collection([{}],se)],i.prototype,"pointers",void 0),Q([t.Collection([{}],ae)],i.prototype,"annotations",void 0),Q([t.Complex({width:2,height:10},ie)],i.prototype,"majorTicks",void 0),Q([t.Complex({width:2,height:5},ie)],i.prototype,"minorTicks",void 0),Q([t.Property(200)],i.prototype,"startAngle",void 0),Q([t.Property(160)],i.prototype,"endAngle",void 0),Q([t.Property("ClockWise")],i.prototype,"direction",void 0),Q([t.Property(null)],i.prototype,"background",void 0),Q([t.Property(null)],i.prototype,"rangeGap",void 0),Q([t.Property(!1)],i.prototype,"startAndEndRangeGap",void 0),Q([t.Complex({},ee)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),ue="animationComplete",he="axisLabelRender",de="tooltipRender",pe="annotationRender",ce="gaugeMouseMove",ge="gaugeMouseLeave",ye="gaugeMouseDown",me=function(){function e(e){this.gauge=e,this.elementId=e.element.id}return e.prototype.renderAnnotation=function(e,i){var o=this,n=t.createElement("div",{id:this.elementId+"_Annotations_"+i}),r=_(this.elementId+"_Secondary_Element");e.annotations.map(function(e,t){null!==e.content&&o.createTemplate(n,t,i)}),r&&n.childElementCount&&r.appendChild(n)},e.prototype.createTemplate=function(e,i,o){var n=this.gauge.axes[o],a=n.annotations[i],s=t.createElement("div",{id:this.elementId+"_Axis_"+o+"_Annotation_"+i,styles:"position: absolute; z-index:"+a.zIndex+";transform:"+(a.autoAngle?"rotate("+(a.angle-90)+"deg)":"rotate(0deg)")+";"}),l={cancel:!1,name:pe,content:a.content,axis:n,annotation:a,textStyle:a.textStyle};this.gauge.trigger(pe,l);var u,h;if(!l.cancel){if((u=C(l.content))&&u(n).length)for(h=u(n);h.length>0;)s.appendChild(h[0]);else s.appendChild(t.createElement("div",{innerHTML:l.content,styles:r(l.textStyle)}));this.updateLocation(s,n,a),e.appendChild(s)}},e.prototype.updateLocation=function(e,t,i){var o=f(i.angle-90,l(i.radius,t.currentRadius),this.gauge.midPoint),n=s(e);e.style.left=o.x-n.width/2+"px",e.style.top=o.y-n.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}(),ve=function(){function e(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.textStyle=this.tooltip.textStyle,this.borderStyle=this.tooltip.border,this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,n,r,a,s,l=!1;if(-1!==e.type.indexOf("touch")?(r=(a=e).target,o=a.changedTouches[0].pageX,n=a.changedTouches[0].pageY):(r=e.target,o=e.pageX,n=e.pageY),r.id.indexOf("_Pointer_")>=0){null!==this.pointerEle&&(l=this.pointerEle===r);var u=this.gauge.svgObject.getBoundingClientRect(),h=this.gauge.element.getBoundingClientRect(),d=new D(Math.abs(h.left-u.left),Math.abs(h.top-u.top),u.width,u.height),p=L(r.id,this.gauge);this.currentAxis=this.gauge.axes[p.axisIndex],this.currentPointer=this.currentAxis.pointers[p.pointerIndex];var g=c(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,y=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,m=y&&null!==y.match("{value}"),v=this.gauge.intl.getNumberFormat({format:k(y),useGrouping:this.gauge.useGroupingSeparator});document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=t.createElement("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle));var x=m?y.replace(new RegExp("{value}","g"),v(this.currentPointer.currentValue)):v(this.currentPointer.currentValue);(s=f(g,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(g>=150&&g<=250||g>=330&&g<=360||g>=0&&g<=45)?s.x+10:s.x;var b={name:de,cancel:!1,content:x,location:s,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge};this.gauge.trigger(de,b);var P=b.tooltip.template;if(null!==P&&1===Object.keys(P).length&&(P=P[Object.keys(P)[0]]),this.tooltip.showAtMousePosition)b.location=T(o,n,this.gauge.svgObject),this.tooltipRect=d;else if(P){var R=r.getBoundingClientRect(),w=S(this.tooltip.template,this.gauge,this.tooltipEle),A=Math.abs(u.width-R.width)-Math.abs(R.left-u.left);w.height>Math.abs(u.height-b.location.y)-20&&(b.location.y+=w.height/2),w.width>A?(b.location.x-=Math.abs(u.left+u.width-(b.location.x+w.width)),this.tooltipRect=d):(this.tooltipRect=d,this.findPosition(d,g,x,b.location))}else this.findPosition(d,g,x,b.location);if(!b.cancel&&!l){var M=this.gauge.theme.toLowerCase(),_=M.indexOf("dark")>-1||"highcontrast"===M?"#00000":"#FFFFFF";b.tooltip.properties.textStyle.color=_,this.svgTooltip=new i.Tooltip({enable:!0,data:{value:b.content},template:P,enableAnimation:b.tooltip.enableAnimation,content:[b.content],location:b.location,inverted:this.arrowInverted,areaBounds:this.tooltipRect,fill:M.indexOf("dark")>-1||"highcontrast"===M?"#FFFFFF":b.tooltip.fill,textStyle:b.tooltip.textStyle,border:b.tooltip.border}),this.svgTooltip.appendTo(this.tooltipEle),P&&Math.abs(n-this.tooltipEle.getBoundingClientRect().top)<=0&&(this.tooltipEle.style.top=parseFloat(this.tooltipEle.style.top)+20+"px")}}else this.removeTooltip()},e.prototype.findPosition=function(e,t,i,o){var n,r,a,s;switch(!0){case t>=0&&t<45:this.arrowInverted=!0,n=t>=15&&t<=30?o.y:0,this.tooltipRect=new D(e.x,e.y+r,e.width,e.height),this.tooltipPosition="RightBottom";break;case t>=45&&t<90:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case t>=90&&t<135:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case t>=135&&t<180:this.arrowInverted=!0,r=t>=150&&t<=160?o.y:0,this.tooltipRect=new D(e.x-e.width,e.y+r,e.width,e.height),this.tooltipPosition="LeftBottom";break;case t>=180&&t<225:this.arrowInverted=!0,a=t>=200&&t<=225?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x-e.width,e.y,e.width,a),this.tooltipPosition="LeftTop";break;case t>=225&&t<270:this.arrowInverted=!1,s=t>=250&&t<=290?e.width:Math.abs(e.x-o.x),this.tooltipRect=new D(e.x,e.y,s,e.height),this.tooltipPosition="TopLeft";break;case t>=270&&t<315:this.arrowInverted=!1,n=t>=270&&t>290?o.x:0,this.tooltipRect=new D(e.x+n,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case t>=315&&t<=360:this.arrowInverted=!0,a=t>=315&&t<=340?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x,e.y,e.width,a),this.tooltipPosition="RightTop"}},e.prototype.removeTooltip=function(){document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0&&(document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0].remove(),this.pointerEle=null)},e.prototype.mouseUpHandler=function(e){this.renderTooltip(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},e.prototype.addEventListener=function(){this.gauge.isDestroyed||(this.gauge.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.gauge.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},e.prototype.removeEventListener=function(){this.gauge.isDestroyed||(this.gauge.off(t.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),fe=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,i,o){var n=e.background;this.setRangeColor(e),null!==n&&h(new F(o.element.id+"_AxisOuterLine_"+t,n,0,"transparent",null,"0",x(o.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,o)},e.prototype.drawAxisLine=function(e,t,i,o){var n=e.startAngle,r=e.endAngle;e.lineStyle.width>0&&(n=m(n,r)?[0,r=360][0]:n,h(new F(o.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,e.lineStyle.color,null,e.lineStyle.dashArray,x(o.midPoint,n-90,r-90,e.currentRadius),"","pointer-events:none;"),i,o))},e.prototype.drawAxisLabels=function(e,t,i,o){var n,r,a,s,l=o.renderer.createGroup({id:o.element.id+"_Axis_Labels_"+t}),h=e.visibleRange.min,d=e.visibleRange.max,p=e.visibleLabels,g=e.labelStyle,y=e.currentRadius;"Outside"===g.position?y+=e.nearSize-(e.maxLabelSize.height+e.lineStyle.width/2)+5:y-=e.farSize-(e.maxLabelSize.height+e.lineStyle.width/2)+(g.autoAngle?10:0);for(var m=0,v=p.length;m<v;m++)0===m&&"First"===g.hiddenLabel||m===v-1&&"Last"===g.hiddenLabel||(s=p[m],n=f(a=Math.round(c(s.value,d,h,e.startAngle,e.endAngle,"ClockWise"===e.direction)),y,o.midPoint),r=this.findAnchor(n,g,a,s),u(new G(o.element.id+"_Axis_"+t+"_Label_"+m,n.x,n.y,r,s.text,g.autoAngle?"rotate("+(a+90)+","+n.x+","+n.y+")":"","auto"),g.font,g.useRangeColor?O(s.value,e.ranges,g.font.color):g.font.color,l,"pointer-events:none;"));i.appendChild(l)},e.prototype.findAnchor=function(e,t,i,o){if(t.autoAngle)return"middle";var n="Inside"===t.position?i>120&&i<240?"start":300<i||i<60?"end":"middle":i>120&&i<240?"end":300<i||i<60?"start":"middle";return e.y+="Inside"===t.position?i>=240&&i<=300?o.size.height/2:i>=60&&i<=120?0:o.size.height/4:i>=240&&i<=300?0:i>=60&&i<=120?o.size.height/2:o.size.height/4,n},e.prototype.drawMinorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MinorTickLines_"+t}),r=e.minorTicks,a=null!==r.interval?r.interval:e.visibleRange.interval/2,s=r.useRangeColor;if(r.width&&r.height&&a){for(var l=e.visibleRange.min,u=e.visibleRange.max;l<=u;l+=a)this.majorValues.indexOf(+l.toFixed(3))<0&&h(new F(o.element.id+"_Axis_Minor_TickLine_"+t+"_"+l,"transparent",r.width,s?O(l,e.ranges,r.color):r.color,null,"0",this.calculateTicks(l,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.drawMajorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MajorTickLines_"+t}),r=e.majorTicks,a=r.useRangeColor;if(this.majorValues=[],r.width&&r.height&&e.visibleRange.interval){for(var s=e.visibleRange.min,l=e.visibleRange.max,u=e.visibleRange.interval;s<=l;s+=u)this.majorValues.push(+s.toFixed(3)),h(new F(o.element.id+"_Axis_Major_TickLine_"+t+"_"+s,"transparent",r.width,a?O(s,e.ranges,r.color):r.color,null,"0",this.calculateTicks(s,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.calculateTicks=function(e,t,i){var o=i.lineStyle.width/2+t.offset,n="Outside"===t.position,r=c(e,i.visibleRange.max,i.visibleRange.min,i.startAngle,i.endAngle,"ClockWise"===i.direction),a=f(r,i.currentRadius+(n?o:-o),this.gauge.midPoint),s=f(r,i.currentRadius+(n?o:-o)+(n?t.height:-t.height),this.gauge.midPoint);return"M "+a.x+" "+a.y+" L "+s.x+" "+s.y+" "},e.prototype.drawAxisRange=function(e,t,i,o){var r,a,s,l,u,d,p,g,y,m,v=this,f=o.renderer.createGroup({id:o.element.id+"_Axis_Ranges_"+t}),b="ClockWise"===e.direction,R=e.visibleRange.min,w=e.visibleRange.max;e.ranges.map(function(i,A){v.calculateRangeRadius(e,i),s=Math.min(Math.max(i.start,R),i.end),l=Math.min(Math.max(i.start,i.end),w),r=c(s,w,R,e.startAngle,e.endAngle,b),a=c(l,w,R,e.startAngle,e.endAngle,b);var M=r>a;null!=e.rangeGap&&e.rangeGap>0&&(r=0!==A||e.startAndEndRangeGap?r+e.rangeGap/Math.PI:r,a=A!==e.ranges.length-1||e.startAndEndRangeGap?a-e.rangeGap/Math.PI:a),s!==l&&(M?r<a+360:r<a)&&(u=i.startWidth.length>0?n(i.startWidth,i.currentRadius):i.startWidth,d=i.endWidth.length>0?n(i.endWidth,i.currentRadius):i.endWidth,a=b?a:[r,r=a][0],d=b?d:[u,u=d][0],y=((i.currentRadius-u/2)*(r*Math.PI/180)-i.roundedCornerRadius/4)/(i.currentRadius-u/2)*180/Math.PI,m=((i.currentRadius-d/2)*(a*Math.PI/180)+i.roundedCornerRadius/4)/(i.currentRadius-d/2)*180/Math.PI,p=(i.currentRadius*(r*Math.PI/180)+i.roundedCornerRadius)/i.currentRadius*180/Math.PI,g=(i.currentRadius*(a*Math.PI/180)-i.roundedCornerRadius)/i.currentRadius*180/Math.PI,i.roundedCornerRadius?h(new F(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,1,"0",P(o.midPoint,Math.floor(p),Math.ceil(g),Math.floor(y),Math.ceil(m),i.currentRadius,u,d),"","pointer-events:none;"),f,o):h(new F(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,1,"0",x(o.midPoint,Math.floor(r),Math.ceil(a),i.currentRadius,u,d),"","pointer-events:none;"),f,o))}),i.appendChild(f)},e.prototype.calculateRangeRadius=function(e,t){var i=null!==t.radius?t.radius:"100%";t.currentRadius=l(i,e.currentRadius)},e.prototype.setRangeColor=function(e){var t=(this.gauge.theme,["#50c917","#27d5ff","#fcde0b","#ffb133","#ff5985"]);e.ranges.map(function(e,i){e.rangeColor=e.color?e.color:t[i%t.length]})},e}(),xe=function(){function e(e){this.gauge=e}return e.prototype.drawPointers=function(e,t,i,o,n){var r=this;void 0===n&&(n=!0);var a,s=o.renderer.createGroup({id:o.element.id+"_Axis_Pointers_"+t});e.pointers.map(function(i,l){e.visibleRange,i.pathElement=[],r.calculatePointerRadius(e,i),a=o.renderer.createGroup({id:o.element.id+"_Axis_"+t+"_Pointer_"+l}),r["draw"+i.type+"Pointer"](e,t,l,a,o),r.setPointerValue(e,i,i.currentValue),s.appendChild(a),n&&r.doPointerAnimation(i,e)}),i.appendChild(s)},e.prototype.calculatePointerRadius=function(e,t){t.currentRadius=null===t.radius?e.currentRadius-(e.farSize+5):l(t.radius,e.currentRadius)},e.prototype.drawNeedlePointer=function(e,t,i,o,n){var r,a,s,u,d=e.pointers[i],p=n.midPoint,c=d.pointerWidth/2;a=f(0,d.currentRadius,p),s="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+p.y+" L "+p.x+" "+(p.y+c)+" Z",d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_Needle_"+i,d.color,d.border.width,d.border.color,null,"0",s),o,n)),r=l(d.needleTail.length,d.currentRadius),u="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c),r&&(a=f(180,r,n.midPoint),s="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c)+" Z",d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleTail_"+i,d.needleTail.color,d.needleTail.border.width,d.needleTail.border.color,null,"0",s),o,n)),u+=" L "+a.x+" "+(p.y+c)+" L "+a.x+" "+(p.y-c)),d.cap.radius&&d.pathElement.push(h(z(p,"Circle",new V(2*d.cap.radius,2*d.cap.radius),"",new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleCap_"+i,d.cap.color,d.cap.border.width,d.cap.border.color,null,"0","","")),o,n,"Ellipse")),d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleRect_"+i,"transparent",0,"transpanret",null,"0",u+" Z"),o,n))},e.prototype.setPointerValue=function(e,t,i){var o=this.gauge.midPoint,n="ClockWise"===e.direction,r=c(e.visibleRange.min,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n),a=c(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n);a=n?r===a?a+1:a:r===a?[r,r=a-1][0]:[r,r=a][0];var s,l,u,h,d=t.roundedCornerRadius,p=.25*d;i<=p&&(d=8,p=.25*(d/=2)),u=((t.currentRadius-t.pointerWidth/2)*(r*Math.PI/180)-d/p)/(t.currentRadius-t.pointerWidth/2)*180/Math.PI,h=((t.currentRadius-t.pointerWidth/2)*(a*Math.PI/180)+d/p)/(t.currentRadius-t.pointerWidth/2)*180/Math.PI,s=(t.currentRadius*(r*Math.PI/180)+d)/t.currentRadius*180/Math.PI,l=(t.currentRadius*(a*Math.PI/180)-d)/t.currentRadius*180/Math.PI,t.pathElement.map(function(p){"RangeBar"===t.type?t.roundedCornerRadius&&i?(p.setAttribute("d",P(o,s,l,u,h,t.currentRadius,t.pointerWidth,t.pointerWidth)),d=0):p.setAttribute("d",w(o,r,a,t.currentRadius,t.currentRadius-t.pointerWidth)):p.setAttribute("transform","rotate("+c(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n)+","+o.x+","+o.y+")"),p.setAttribute("aria-label",t.description||"Pointer:"+i.toString())})},e.prototype.drawMarkerPointer=function(e,t,i,o,n){var r=e.pointers[i],a=f(0,r.currentRadius,n.midPoint);r.pathElement.push(h(z(a,r.markerShape,new V(r.markerWidth,r.markerHeight),r.imageUrl,new F(n.element.id+"_Axis_"+t+"_Pointer_Marker_"+i,r.color,r.border.width,r.border.color,null,"0","","")),o,n,"Circle"===r.markerShape?"Ellipse":"Image"===r.markerShape?"Image":"Path"))},e.prototype.drawRangeBarPointer=function(e,t,i,o,n){var r=e.pointers[i];r.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_RangeBar_"+i,r.color,r.border.width,r.border.color,1,"0",""),o,n))},e.prototype.doPointerAnimation=function(e,t){var i=this,o=t.visibleRange.min,n=e.currentValue;e.animation.enable&&o!==n&&this.gauge.animatePointer&&e.pathElement.map(function(r){"RangeBar"===e.type?i.performRangeBarAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth):i.performNeedleAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth)})},e.prototype.performNeedleAnimation=function(e,i,o,n,r,a,s){var l,u=this,h="ClockWise"===n.direction,d=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),g=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),y=d>g?g+360:g;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){l=i<o||Math.round(d)===Math.round(y)?h?y-d:y-d-360:h?y-d-360:y-d,e.style.animation="None",e.setAttribute("transform","rotate("+p(t.timeStamp,d,l,t.duration)+","+u.gauge.midPoint.x.toString()+","+u.gauge.midPoint.y.toString()+")")},end:function(t){u.setPointerValue(n,r,o),("Marker"===r.type||e.id.indexOf("_Pointer_NeedleCap")>=0)&&u.gauge.trigger(ue,{axis:n,pointer:r})}})},e.prototype.performRangeBarAnimation=function(e,i,o,n,r,a,s){var l,u=this,h="ClockWise"===n.direction,d=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),g=c(n.visibleRange.min,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),y=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),m=d>y?y+360:y;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){e.style.animation="None",l=i<o||Math.round(d)===Math.round(m)?h?m-d:m-d-360:h?m-d-360:m-d,h?e.setAttribute("d",w(u.gauge.midPoint,g,p(t.timeStamp,d,l,t.duration)+1e-4,a,s)):e.setAttribute("d",w(u.gauge.midPoint,p(t.timeStamp,d,l,t.duration),g+1e-4,a,s))},end:function(e){u.setPointerValue(n,r,o),u.gauge.trigger(ue,{axis:n,pointer:r})}})},e}(),be=function(){function e(e){this.gauge=e,this.axisRenderer=new fe(e),this.pointerRenderer=new xe(e)}return e.prototype.measureAxis=function(e){this.measureAxisSize(this.gauge,e),this.calculateAxesRadius()},e.prototype.calculateAxesRadius=function(){for(var e,i,o=0,n=this.gauge.margin.left+this.gauge.margin.right,r=this.gauge.margin.top+this.gauge.margin.bottom,a=0,s=this.gauge.axes;a<s.length;a++){var u=s[a];if(e=Math.min(u.rect.width,u.rect.height)/2,i=null!=u.radius?l(u.radius,e):e,o=Math.max.apply(Math,u.ranges.map(function(e){return e.radius?e.radius.indexOf("%")<0?100:parseInt(e.radius,10):0})),i=o>100&&null==u.radius?100*i/o:i,u.currentRadius=i-u.nearSize,this.gauge.moveToCenter&&1===this.gauge.axes.length&&t.isNullOrUndefined(this.gauge.centerX)&&t.isNullOrUndefined(this.gauge.centerY)){var h=void 0,d=void 0,p=f((h=m(h=u.startAngle,u.endAngle)?[0,d=360][0]:h)-90,i,this.gauge.midPoint);d=u.endAngle;var c=f((d-=m(h,d)?1e-4:0)-90,i,this.gauge.midPoint),g=void 0,y=void 0,v=void 0,x=void 0,b=void 0,P=void 0,R=void 0;h>d&&!(Math.abs(h-d)>90)||(h>=270&&h<=360&&(d>270&&d<=360||d>=0&&d<=180)?(v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),R=d<=360&&d>=270?this.gauge.midPoint:d<=90?c:f(0,i,this.gauge.midPoint),x=Math.abs(R.x-this.gauge.gaugeRect.width),p=d<=360&&d>=270?c:f(270,i,this.gauge.midPoint),b=Math.abs(p.y-this.gauge.gaugeRect.y),c=d<=360&&d>=270||d>=0&&d<90?this.gauge.midPoint:d>=90&&d<=180?c:f(90,i,this.gauge.midPoint),P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):h>=0&&h<90&&d>=0&&d<=270?(b=Math.abs(p.y-this.gauge.gaugeRect.y),R=d>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(R.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height)),p=d>=180?c:this.gauge.midPoint,v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),c=d>=90?f(0,i,this.gauge.midPoint):c,x=Math.abs(c.x-this.gauge.gaugeRect.width)):h>=90&&h<180&&d>90&&d<=360?(R=d<=180?this.gauge.midPoint:d>=270?f(180,i,this.gauge.midPoint):c,v=Math.abs(R.x-this.gauge.gaugeRect.x),x=Math.abs(p.x-this.gauge.gaugeRect.width),p=d>270?f(d-90,i,this.gauge.midPoint):this.gauge.midPoint,b=Math.abs(this.gauge.gaugeRect.y-p.y),c=d>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):h>=180&&h<=270&&(d<=360&&d>=270||d<=180&&d>=0)&&(R=d>180&&d<270?c:f(180,i,this.gauge.midPoint),v=Math.abs(this.gauge.gaugeRect.x-Math.abs(R.x-this.gauge.gaugeRect.x)),R=d>=180&&d<=360?this.gauge.midPoint:c,x=Math.abs(R.x-this.gauge.gaugeRect.width),R=d>180&&d<270?this.gauge.midPoint:d>=270&&d<=360?c:f(270,i,this.gauge.midPoint),b=Math.abs(R.y-this.gauge.gaugeRect.y),P=Math.abs(p.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))),t.isNullOrUndefined(v)||t.isNullOrUndefined(x)||t.isNullOrUndefined(b)||t.isNullOrUndefined(P)||!(v>5||x>5)||!(b>5||P>5)||(g=Math.abs(v+x-n),y=Math.abs(b+P-r),this.gauge.midPoint.x=this.gauge.midPoint.x-v/2+x/2,this.gauge.midPoint.y=this.gauge.midPoint.y-b/2+P/2,e=Math.min(this.gauge.gaugeRect.width,this.gauge.gaugeRect.height)/2+Math.min(g,y)/2,u.currentRadius=(null!=u.radius?l(u.radius,e):e)-u.nearSize))}u.visibleRange.interval=this.calculateNumericInterval(u,u.rect),this.calculateVisibleLabels(u)}},e.prototype.measureAxisSize=function(e,t){var i,o=this;this.computeSize(e.axes,t),e.axes.map(function(e,n){i=d(n,o.farSizes.length,o.farSizes),e.rect=new D(t.x+i,t.y+i,t.width-2*i,t.height-2*i)})},e.prototype.calculateAxisValues=function(e){for(var t=0,i=this.gauge.axes;t<i.length;t++){var o=i[t];this.calculateVisibleRange(o,e),this.calculateVisibleLabels(o)}},e.prototype.calculateVisibleRange=function(e,t){var i=e.majorTicks.interval,o=Math.min(null===e.minimum?0:e.minimum,e.maximum),n=Math.max(e.minimum,null===e.maximum?100:e.maximum);e.pointers.map(function(t){t.currentValue=null!==t.value?t.value<o?o:t.value>n?n:t.value:o,o=null===e.minimum?Math.min(t.currentValue,o):o,n=null===e.maximum?Math.max(t.currentValue,n):n}),o=o===n?null!==i?o-i:o-1:o,e.visibleRange={min:o,max:n,interval:i},e.visibleRange.interval=this.calculateNumericInterval(e,t)},e.prototype.calculateNumericInterval=function(e,t){if(null!==e.majorTicks.interval)return e.majorTicks.interval;var i=e.endAngle-e.startAngle;return i=i<=0?i+360:i,this.calculateNiceInterval(e.visibleRange.max,e.visibleRange.min,e.currentRadius?e.currentRadius:t.width/2,i)},e.prototype.calculateNiceInterval=function(e,t,i,o){for(var n=e-t,r=2*Math.PI*i*(o/360),a=Math.max(.01599*r,1),s=n/a,l=Math.pow(10,Math.floor(Math.log(s)/Math.log(10))),u=0,h=[10,5,2,1];u<h.length;u++){var d=l*h[u];if(a<n/d)break;s=d}return s},e.prototype.calculateVisibleLabels=function(e){var t,i=e.labelStyle,o=i.format&&null!==i.format.match("{value}"),n=this.gauge.intl.getNumberFormat({format:k(i.format),useGrouping:this.gauge.useGroupingSeparator});e.visibleLabels=[];for(var r=e.visibleRange.min,a=e.visibleRange.interval,s=e.visibleRange.max;r<=s&&a;r+=a)t={cancel:!1,name:he,axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(r)):n(r),value:r},this.gauge.trigger(he,t),t.cancel||e.visibleLabels.push(new H(t.text,r));this.getMaxLabelWidth(this.gauge,e)},e.prototype.computeSize=function(e,t){var i,o,n,r,a,s,l=0,u=0,h=0;this.farSizes=[],this.calculateAxisValues(t);for(var d=0,p=e;d<p.length;d++){var c=p[d];i=c.lineStyle.width/2,o=0,n=0,r="Outside"===c.majorTicks.position,l=c.majorTicks.offset,a="Outside"===c.minorTicks.position,u=c.minorTicks.offset,s="Outside"===c.labelStyle.position,h=c.labelStyle.offset,o+=r&&a&&s?0:5,o+=(r?c.majorTicks.height+i:0)+(s?c.maxLabelSize.height+10+h:0)+(a&&!r?c.minorTicks.height+i:0)+i,o+=r&&a?Math.max(l,u):r?l:a?u:0,n+=(r?0:c.majorTicks.height+i)+(s?0:c.maxLabelSize.height+10+h)+(!a&&r?c.minorTicks.height+i:0)+i,n+=r||a?r?a?0:u:l:Math.max(l,u),this.farSizes[this.farSizes.length-1]&&(this.farSizes[this.farSizes.length-1]+=n+o),c.nearSize=o-5,c.farSize=n,o=this.gauge.axes.length===this.farSizes.length+1?0:o,this.farSizes.push(o)}},e.prototype.renderAxes=function(e){var i=this;void 0===e&&(e=!0);var o,n=this.gauge,r=this.axisRenderer,a=n.renderer.createGroup({id:n.element.id+"_AxesCollection","clip-path":"url(#"+n.element.id+"_GaugeAreaClipRect_)"});n.element.appendChild(t.createElement("div",{id:n.element.id+"_Secondary_Element",styles:"position: relative"})),n.axes.map(function(t,s){o=n.renderer.createGroup({id:n.element.id+"_Axis_Group_"+s}),r.drawAxisOuterLine(t,s,o,n),r.drawAxisRange(t,s,o,n),r.drawAxisLine(t,s,o,n),r.drawMajorTickLines(t,s,o,n),r.drawMinorTickLines(t,s,o,n),r.drawAxisLabels(t,s,o,n),i.pointerRenderer.drawPointers(t,s,o,n,e),n.annotationsModule&&n.annotationsModule.renderAnnotation(t,s),a.appendChild(o)}),n.svgObject.appendChild(n.renderer.drawClipPath({id:n.element.id+"_GaugeAreaClipRect_",x:0,y:0,width:n.availableSize.width,height:n.availableSize.height,fill:"transparent",stroke:"transparent"})),n.svgObject.appendChild(a)},e.prototype.getMaxLabelWidth=function(e,t){t.maxLabelSize=new V(0,0);for(var i=0,n=t.visibleLabels;i<n.length;i++){var r=n[i];r.size=o(r.text,t.labelStyle.font),t.maxLabelSize.width=r.size.width>t.maxLabelSize.width?r.size.width:t.maxLabelSize.width,t.maxLabelSize.height=r.size.height>t.maxLabelSize.height?r.size.height:t.maxLabelSize.height}},e}(),Pe=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Re=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},we=function(e){function i(t,i){return e.call(this,t,i)||this}return Pe(i,e),i.prototype.preRender=function(){this.unWireEvents(),this.trigger("load",{gauge:this}),this.themeEffect(),this.initPrivateVariable(),this.setCulture(),this.createSvg(),this.wireEvents()},i.prototype.themeEffect=function(){var e=this.theme.toLowerCase();if("highcontrast"===e)this.titleStyle.color=this.titleStyle.color||"#FFFFFF",this.setThemeColors("#FFFFFF","#FFFFFF");else if(e.indexOf("dark")>-1)for(var t=0,i=this.axes;t<i.length;t++){var o=i[t];o.labelStyle.font.color=o.labelStyle.font.color||"#DADADA ",o.majorTicks.color=o.majorTicks.color||"#C8C8C8",o.minorTicks.color=o.minorTicks.color||"#9A9A9A";for(var n=0,r=o.pointers;n<r.length;n++){var a=r[n];a.color=a.color||"#DADADA",a.needleTail.color=a.needleTail.color||"#9A9A9A",a.needleTail.border.color=a.needleTail.border.color||"#9A9A9A",a.cap.color=a.cap.color||"#9A9A9A",a.cap.border.color=a.cap.border.color||"#9A9A9A"}}else this.titleStyle.color=this.titleStyle.color||"#424242",this.setThemeColors("#212121","#757575")},i.prototype.setThemeColors=function(e,t){for(var i=0,o=this.axes;i<o.length;i++){var n=o[i];n.lineStyle.color=n.lineStyle.color||t,n.labelStyle.font.color=n.labelStyle.font.color||e,n.majorTicks.color=n.majorTicks.color||t,n.minorTicks.color=n.minorTicks.color||t;for(var r=0,a=n.pointers;r<a.length;r++){var s=a[r];s.color=s.color||t,s.needleTail.color=s.needleTail.color||t,s.needleTail.border.color=s.needleTail.border.color||t,s.cap.color=s.cap.color||t,s.cap.border.color=s.cap.border.color||t}}},i.prototype.render=function(){this.calculateBounds(),this.renderElements()},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMove),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEnd),t.EventHandler.remove(this.element,"contextmenu",this.gaugeRightClick),t.EventHandler.remove(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize)},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown,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,"contextmenu",this.gaugeRightClick,this),t.EventHandler.add(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize.bind(this)),this.setGaugeStyle(this.element)},i.prototype.mouseMove=function(e){var i=this.getMouseArgs(e,"touchmove",ce);this.trigger(ce,i);var o;this.tooltipModule;return i.cancel||this.enablePointerDrag&&this.activePointer&&(o={axis:this.activeAxis,pointer:this.activePointer,previousValue:this.activePointer.currentValue,name:"dragMove",currentValue:null},this.pointerDrag(new N(i.x,i.y)),o.currentValue=this.activePointer.currentValue,this.trigger("dragMove",o)),this.notify(t.Browser.touchMoveEvent,e),!1},i.prototype.mouseLeave=function(e){this.activeAxis=null,this.activePointer=null,this.svgObject.setAttribute("cursor","auto");var t=this.getMouseArgs(e,"touchmove",ge);return this.trigger(ge,t),!1},i.prototype.gaugeRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},i.prototype.pointerDrag=function(e){var t=this.activeAxis,i=t.visibleRange,o=y(v(this.midPoint,e),i.max,i.min,t.startAngle,t.endAngle,"ClockWise"===t.direction);o>=i.min&&o<=i.max&&(this.activePointer.currentValue=o,this.activePointer.value=o,this.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(t,this.activePointer,o))},i.prototype.gaugeOnMouseDown=function(e){var t,i=this.getMouseArgs(e,"touchstart",ye);return this.trigger(ye,i),!i.cancel&&i.target.id.indexOf("_Pointer_")>=0&&i.target.id.indexOf(this.element.id+"_Axis_")>=0&&(t=L(i.target.id,this),this.activeAxis=this.axes[t.axisIndex],this.activePointer=this.activeAxis.pointers[t.pointerIndex],this.trigger("dragStart",{axis:this.activeAxis,name:"dragStart",pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.svgObject.setAttribute("cursor","pointer")),!1},i.prototype.mouseEnd=function(e){var i=this.getMouseArgs(e,"touchend","gaugeMouseUp");"touch"===e.pointerType||"2"===e.pointerType||e.type,this.tooltipModule;return this.trigger("gaugeMouseUp",i),this.activeAxis&&this.activePointer&&(this.trigger("dragEnd",{name:"dragEnd",axis:this.activeAxis,pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.activeAxis=null,this.activePointer=null),this.svgObject.setAttribute("cursor","auto"),this.notify(t.Browser.touchEndEvent,e),!1},i.prototype.getMouseArgs=function(e,t,i){var o=this.element.getBoundingClientRect(),n=new N(-o.left,-o.top),r=e.type===t;return n.x+=r?e.changedTouches[0].clientX:e.clientX,n.y+=r?e.changedTouches[0].clientY:e.clientY,{cancel:!1,name:i,x:n.x,y:n.y,target:e.target}},i.prototype.gaugeResize=function(e){var t=this,i={gauge:this,previousSize:new V(this.availableSize.width,this.availableSize.height),name:"resized",currentSize:new V(0,0)};return this.animatePointer=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.element.classList.contains("e-circulargauge")&&(this.resizeTo=window.setTimeout(function(){t.createSvg(),t.calculateBounds(),t.renderElements(),i.currentSize=t.availableSize,t.trigger("resized",i)},500)),!1},i.prototype.setGaugeStyle=function(e){e.style.touchAction=this.enablePointerDrag?"none":"element",e.style.msTouchAction=this.enablePointerDrag?"none":"element",e.style.msContentZooming="none",e.style.msUserSelect="none",e.style.webkitUserSelect="none",e.style.position="relative"},i.prototype.setCulture=function(){this.intl=new t.Internationalization},i.prototype.createSvg=function(){this.removeSvg(),this.calculateSvgSize(),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},i.prototype.removeSvg=function(){if(E(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)}},i.prototype.initPrivateVariable=function(){this.renderer=new t.SvgRenderer(this.element.id),this.gaugeAxisLayoutPanel=new be(this),this.animatePointer=!0},i.prototype.calculateSvgSize=function(){var e=this.element.offsetWidth,t=this.element.offsetHeight,i=l(this.width,e)||e||600,o=l(this.height,t)||t||450;this.availableSize=new V(i,o)},i.prototype.calculateBounds=function(){var e,i=this.margin,n=0;this.title&&(n=o(this.title,this.titleStyle).height+5);var r=i.top+n+this.border.width,a=i.left+this.border.width,s=this.availableSize.width-a-i.right-this.border.width,u=this.availableSize.height-r-this.border.width-i.bottom,h=Math.min(s,u)/2;e=this.moveToCenter&&1===this.axes.length&&t.isNullOrUndefined(this.centerX)&&t.isNullOrUndefined(this.centerY)?new D(a,r,s,u):new D(a+s/2-h,r+u/2-h,2*h,2*h),this.gaugeRect=e;var d=null!==this.centerX?l(this.centerX,this.availableSize.width):e.x+e.width/2,p=null!==this.centerY?l(this.centerY,this.availableSize.height):e.y+e.height/2;this.midPoint=new N(d,p),this.gaugeAxisLayoutPanel.measureAxis(e)},i.prototype.renderElements=function(e){void 0===e&&(e=!0),this.renderBorder(),this.renderTitle(),this.gaugeAxisLayoutPanel.renderAxes(e),this.element.appendChild(this.svgObject),this.trigger("loaded",{gauge:this})},i.prototype.renderTitle=function(){if(this.title){var e=o(this.title,this.titleStyle),t=u(new G(this.element.id+"_CircularGaugeTitle",this.availableSize.width/2,this.margin.top+e.height/4*3,"middle",this.title),this.titleStyle,this.titleStyle.color,this.svgObject,"");t.setAttribute("aria-label",this.description||this.title),t.setAttribute("tabindex",this.tabIndex.toString())}},i.prototype.renderBorder=function(){var e=this.border.width;(e>0||null!==this.background&&"transparent"!==this.background)&&this.svgObject.appendChild(this.renderer.drawRectangle(new W(this.element.id+"_CircularGaugeBorder",this.background,this.border,null,new D(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))))},i.prototype.setPointerValue=function(e,t,i){var o=this,n=this.axes[e],r=n.pointers[t],s=r.currentRadius,l=r.animation.enable;i=(i=i<n.visibleRange.min?n.visibleRange.min:i)>n.visibleRange.max?n.visibleRange.max:i,r.pathElement.map(function(e){"RangeBar"===r.type?(a(e,r.color,r.border),l?o.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(e,r.currentValue,i,n,r,s,s-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i)):(e.id.indexOf("_Pointer_NeedleCap_")>=0?a(e,r.cap.color,r.cap.border):e.id.indexOf("_Pointer_NeedleTail_")>=0?a(e,r.needleTail.color,r.needleTail.border):e.id.indexOf("_Pointer_NeedleRect_")>=0?a(e,"transparent",{color:"transparent",width:0}):a(e,r.color,r.border),l?o.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(e,r.currentValue,i,n,r,s,s-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i))}),r.currentValue=i,r.value=i},i.prototype.setAnnotationValue=function(e,i,o){var n=null!==_(this.element.id+"_Annotations_"+e),r=_(this.element.id+"_Annotations_"+e)||t.createElement("div",{id:this.element.id+"_Annotations_"+e}),a=this.axes[e].annotations[i];null!==o&&(E(this.element.id+"_Axis_"+e+"_Annotation_"+i),a.content=o,this.annotationsModule.createTemplate(r,i,e),n||_(this.element.id+"_Secondary_Element").appendChild(r))},i.prototype.setRangeValue=function(e,t,i,o){var r,s=_(this.element.id+"_Axis_"+e+"_Range_"+t),l=this.axes[e],u=l.ranges[t],h=l.visibleRange,d="ClockWise"===l.direction,p=Math.min(Math.max(i,h.min),o),g=Math.min(Math.max(i,o),h.max),y=c(p,h.max,h.min,l.startAngle,l.endAngle,d),m=c(g,h.max,h.min,l.startAngle,l.endAngle,d);r=u.startWidth.length>0?n(u.startWidth,u.currentRadius):u.startWidth;var v;v=u.endWidth.length>0?n(u.endWidth,u.currentRadius):u.endWidth,m=d?m:[y,y=m][0],v=d?v:[r,r=v][0],s.setAttribute("d",x(this.midPoint,Math.round(y),Math.round(m),u.currentRadius,r,v)),a(s,u.color?u.color:u.rangeColor,{color:u.color?u.color:u.rangeColor,width:0})},i.prototype.destroy=function(){this.unWireEvents(),this.removeSvg(),e.prototype.destroy.call(this)},i.prototype.requiredModules=function(){var e=[],t=!1;return this.axes.map(function(e){e.annotations.map(function(e){t=t||null!==e.content})}),t&&e.push({member:"Annotations",args:[this,me]}),this.tooltip.enable&&e.push({member:"Tooltip",args:[this,ve]}),e},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.onPropertyChanged=function(e,t){for(var i=!1,o=!1,n=!1,r=0,a=Object.keys(e);r<a.length;r++){switch(a[r]){case"height":case"width":case"centerX":case"centerY":case"margin":this.createSvg(),o=!0;break;case"title":o=""===e.title||""===t.title,i=!(""===e.title||""===t.title);break;case"titleStyle":e.titleStyle&&e.titleStyle.size?o=!0:i=!0;break;case"border":case"background":i=!0;break;case"axes":n=!0}}!o&&i&&(this.removeSvg(),this.renderElements()),o&&(this.removeSvg(),this.calculateBounds(),this.renderElements()),!n||i||o||(this.removeSvg(),this.calculateBounds(),this.renderElements(!1))},i.prototype.getModuleName=function(){return"circulargauge"},Re([t.Property(null)],i.prototype,"width",void 0),Re([t.Property(null)],i.prototype,"height",void 0),Re([t.Complex({color:"transparent",width:0},Y)],i.prototype,"border",void 0),Re([t.Property("transparent")],i.prototype,"background",void 0),Re([t.Property("")],i.prototype,"title",void 0),Re([t.Complex({size:"15px",color:null},Z)],i.prototype,"titleStyle",void 0),Re([t.Complex({},q)],i.prototype,"margin",void 0),Re([t.Collection([{}],le)],i.prototype,"axes",void 0),Re([t.Complex({},J)],i.prototype,"tooltip",void 0),Re([t.Property(!1)],i.prototype,"enablePointerDrag",void 0),Re([t.Property(null)],i.prototype,"centerX",void 0),Re([t.Property(null)],i.prototype,"centerY",void 0),Re([t.Property(!1)],i.prototype,"moveToCenter",void 0),Re([t.Property("Material")],i.prototype,"theme",void 0),Re([t.Property(!1)],i.prototype,"useGroupingSeparator",void 0),Re([t.Property(null)],i.prototype,"description",void 0),Re([t.Property(1)],i.prototype,"tabIndex",void 0),Re([t.Event()],i.prototype,"loaded",void 0),Re([t.Event()],i.prototype,"load",void 0),Re([t.Event()],i.prototype,"animationComplete",void 0),Re([t.Event()],i.prototype,"axisLabelRender",void 0),Re([t.Event()],i.prototype,"annotationRender",void 0),Re([t.Event()],i.prototype,"tooltipRender",void 0),Re([t.Event()],i.prototype,"dragStart",void 0),Re([t.Event()],i.prototype,"dragMove",void 0),Re([t.Event()],i.prototype,"dragEnd",void 0),Re([t.Event()],i.prototype,"gaugeMouseMove",void 0),Re([t.Event()],i.prototype,"gaugeMouseLeave",void 0),Re([t.Event()],i.prototype,"gaugeMouseDown",void 0),Re([t.Event()],i.prototype,"gaugeMouseUp",void 0),Re([t.Event()],i.prototype,"resized",void 0),i=Re([t.NotifyPropertyChanges],i)}(t.Component);e.CircularGauge=we,e.Annotations=me,e.Line=$,e.Label=ee,e.Range=te,e.Tick=ie,e.Cap=oe,e.NeedleTail=ne,e.Animation=re,e.Annotation=ae,e.Pointer=se,e.Axis=le,e.Border=Y,e.Font=Z,e.Margin=q,e.TooltipSettings=J,e.GaugeTooltip=ve,e.measureText=o,e.toPixel=n,e.getFontStyle=r,e.setStyles=a,e.measureElementRect=s,e.stringToNumber=l,e.textElement=u,e.appendPath=h,e.calculateSum=d,e.linear=p,e.getAngleFromValue=c,e.getDegree=g,e.getValueFromAngle=y,e.isCompleteAngle=m,e.getAngleFromLocation=v,e.getLocationFromAngle=f,e.getPathArc=x,e.getRangePath=b,e.getRoundedPathArc=P,e.getRoundedPath=R,e.getCompleteArc=w,e.getCirclePath=A,e.getCompletePath=M,e.getElement=_,e.getTemplateFunction=C,e.getElementSize=S,e.removeElement=E,e.getPointer=L,e.getMousePosition=T,e.getLabelFormat=k,e.calculateShapes=z,e.getRangeColor=O,e.CustomizeOption=B,e.PathOption=F,e.RectOption=W,e.Size=V,e.GaugeLocation=N,e.Rect=D,e.TextOption=G,e.VisibleLabels=H,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-circulargauge.umd.min.js.map
/*!
* filename: ej2-circulargauge.min.js
* version : 16.3.34
* version : 16.4.40-beta
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
this.ej=this.ej||{},this.ej.circulargauge=function(e,t,i){"use strict";function o(e,i){var o=document.getElementById("gauge-measuretext");null===o&&(o=t.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(o));var n="position: absolute; visibility: hidden;;left: 0; top: -100; white-space: nowrap;"+r(i);return o.innerHTML=e,o.setAttribute("style",n),new V(o.clientWidth,o.clientHeight)}function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function r(e){return"font-size:"+e.size+"; font-style:"+e.fontStyle+"; font-weight:"+e.fontWeight+"; font-family:"+e.fontFamily+";opacity:"+e.opacity+"; color:"+e.color+";"}function a(e,i,o){t.setStyleAttribute(e,{stroke:o.color,"stroke-width":o.width,fill:i})}function s(e){var t;return document.body.appendChild(e),t=e.getBoundingClientRect(),E(e.id),t}function l(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function u(e,i,o,n,r){var a,s={},l=new t.SvgRenderer(""),u=r+" font-size:"+i.size+"; font-style:"+i.fontStyle+" ; font-weight:"+i.fontWeight+"; font-family:"+i.fontFamily+";";return s={id:e.id,x:e.x,y:e.y,fill:o,"text-anchor":e.anchor,transform:e.transform,opacity:i.opacity,"dominant-baseline":e.baseLine,style:u},a=l.createText(s,e.text),n.appendChild(a),a}function h(e,t,i,o){o=o||"Path";var n=i.renderer["draw"+o](e);return n.setAttribute("transform",e.transform),n.setAttribute("style",e.style),t.appendChild(n),n}function d(e,t,i){for(var o=0,n=i.length;e<n;e++)o+=i[e];return o}function p(e,t,i,o){return-i*Math.cos(e/o*(Math.PI/2))+i+t}function c(e,t,i,o,n,r){var a;return n-=m(o,n)?1e-4:0,o-=90,n-=90,a=r?(e-i)*(g(o,n)/(t-i))+o:(a=n-(e-i)*(g(o,n)/(t-i)))<0?360+a:a,a=Math.round(a)>=360?a-360:Math.round(a)<0?360+a:a}function g(e,t){var i=t-e;return i<0?i+360:i}function y(e,t,i,o,n,r){return n-=m(o,n)?1e-4:0,e=e<o?e+360:e,r?(e-o)/g(o,n)*(t-i)+i:t-((e-o)/g(o,n)*(t-i)+i)}function m(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function v(e,t){var i=Math.atan2(t.y-e.y,t.x-e.x);return i=Math.round((i<0?6.283+i:i)*(180/Math.PI))-270,i+=i<0?360:0}function f(e,t,i){var o=e*Math.PI/180;return new N(Math.cos(o)*t+i.x,Math.sin(o)*t+i.y)}function x(e,t,i,o,n,r){var a=g(t,i-=m(t,i)?1e-4:0),s=o-n,l=o-r,u=o-(n+r)/2;return void 0!==n&&void 0!==r?b(f(t,o,e),f(i,o,e),f(t,s,e),f(i,l,e),o,u,u,a<180?0:1):A(f(t,o,e),f(i,o,e),o,a<180?0:1)}function b(e,t,i,o,n,r,a,s){return"M "+e.x+" "+e.y+" A "+n+" "+n+" 0 "+s+" 1 "+t.x+" "+t.y+" L "+o.x+" "+o.y+" A "+a+" "+r+" 0 "+s+" 0 "+i.x+" "+i.y+" Z"}function P(e,t,i,o,n,r,a,s){var l=g(t,i-=m(t,i)?1e-4:0),u=r-a,h=r-s,d=r-(a+s)/2;return R(f(t,r,e),f(i,r,e),f(n,r,e),f(n,h,e),f(o,r,e),f(o,u,e),f(t,u,e),f(i,h,e),r,d,d,l<180?0:1)}function R(e,t,i,o,n,r,a,s,l,u,h,d){return"M "+e.x+" "+e.y+" A "+l+" "+l+" 0 "+d+" 1 "+t.x+" "+t.y+" C "+i.x+" "+i.y+" "+o.x+" "+o.y+" "+s.x+" "+s.y+" A "+h+" "+u+" 0 "+d+" 0 "+a.x+" "+a.y+" C "+r.x+" "+r.y+" "+n.x+" "+n.y+" "+e.x+" "+e.y+" Z"}function w(e,t,i,o,n){var r=g(t,i-=m(t,i)?1e-4:0);return M(e,f(t,o,e),f(i,o,e),o,f(t,n,e),f(i,n,e),n,r<180?0:1)}function A(e,t,i,o){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+o+" 1 "+t.x+" "+t.y}function M(e,t,i,o,n,r,a,s){return"M "+t.x+" "+t.y+" A "+o+" "+o+" 0 "+s+" 1 "+i.x+" "+i.y+" L "+r.x+" "+r.y+" A "+a+" "+a+" 0 "+s+",0 "+n.x+" "+n.y+" Z"}function _(e){return document.getElementById(e)}function C(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(o){i=t.compile(e)}return i}function S(e,i,o){var n,r,a=C(e);if(a&&a(i).length){r=i.createElement("div",{id:i.element.id+"_Measure_Element"}),i.element.appendChild(r);for(var s=a(i);s.length>0;)r.appendChild(s[0]);o.appendChild(r),n=new V(o.getBoundingClientRect().width,o.getBoundingClientRect().height),t.remove(r)}return n}function E(e){var i=_(e);i&&t.remove(i)}function L(e,t){var i;return i=e.split(t.element.id+"_Axis_")[1],{axisIndex:+i[0],pointerIndex:+i[i.length-1]}}function T(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,r=i.ownerDocument.defaultView.pageYOffset,a=i.ownerDocument.documentElement.clientTop,s=i.ownerDocument.documentElement.clientLeft,l=o.left+n-s,u=o.top+r-a;return new N(e-l,t-u)}function k(e){return e&&null!==e.match("{value}")?"":e}function z(e,i,o,n,r){var a,s=o.width,l=o.height,u=e.x,h=e.y,d=e.x+-s/2,p=e.y+-l/2;switch(i){case"Circle":t.merge(r,{rx:s/2,ry:l/2,cx:u,cy:h});break;case"Diamond":a="M "+d+" "+h+" L "+u+" "+(h+-l/2)+" L "+(u+s/2)+" "+h+" L "+u+" "+(h+l/2)+" L "+d+" "+h+" Z",t.merge(r,{d:a});break;case"Rectangle":a="M "+d+" "+(h+-l/2)+" L "+(u+s/2)+" "+(h+-l/2)+" L "+(u+s/2)+" "+(h+l/2)+" L "+d+" "+(h+l/2)+" L "+d+" "+(h+-l/2)+" Z",t.merge(r,{d:a});break;case"Triangle":a="M "+u+" "+h+" L "+(u-l)+" "+(h-s/2)+"L "+(u-l)+" "+(h+s/2)+" Z",t.merge(r,{d:a});break;case"InvertedTriangle":a="M "+u+" "+h+" L "+(u+l)+" "+(h-s/2)+"L "+(u+l)+" "+(h+s/2)+" Z",t.merge(r,{d:a});break;case"Image":t.merge(r,{href:n,height:l,width:s,x:d,y:p})}return r}function O(e,t,i){var o=0,n=0,r=t.filter(function(t){return o=Math.min(t.start,t.end),n=Math.max(t.start,t.end),e>=o&&n>=e});return r.length?r[0].rangeColor:i}var I,j=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),B=function(){function e(e){this.id=e}return e}(),F=function(e){function t(t,i,o,n,r,a,s,l,u){void 0===l&&(l=""),void 0===u&&(u="");var h=e.call(this,t)||this;return h.opacity=r,h.fill=i,h.stroke=n,h["stroke-width"]=o,h["stroke-dasharray"]=a,h.d=s,h.transform=l,h.style=u,h}return j(t,e),t}(B),W=function(e){function t(t,i,o,n,r){var a=e.call(this,t)||this;return a.y=r.y,a.x=r.x,a.height=r.height,a.width=r.width,a.opacity=n,a.fill=i,a.stroke=o.color,a["stroke-width"]=o.width,a}return j(t,e),t}(B),V=function(){function e(e,t){this.width=e,this.height=t}return e}(),N=function(){function e(e,t){this.x=e,this.y=t}return e}(),D=function(){function e(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}return e}(),G=function(e){function t(t,i,o,n,r,a,s){void 0===a&&(a="");var l=e.call(this,t)||this;return l.transform="",l.baseLine="auto",l.x=i,l.y=o,l.anchor=n,l.text=r,l.transform=a,l.baseLine=s,l}return j(t,e),t}(B),H=function(){function e(e,t,i){this.text=e,this.value=t,this.size=i}return e}(),U=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),X=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Y=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property("")],i.prototype,"color",void 0),X([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property("16px")],i.prototype,"size",void 0),X([t.Property("")],i.prototype,"color",void 0),X([t.Property("segoe UI")],i.prototype,"fontFamily",void 0),X([t.Property("Normal")],i.prototype,"fontWeight",void 0),X([t.Property("Normal")],i.prototype,"fontStyle",void 0),X([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property(10)],i.prototype,"left",void 0),X([t.Property(10)],i.prototype,"right",void 0),X([t.Property(10)],i.prototype,"top",void 0),X([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property(!1)],i.prototype,"enable",void 0),X([t.Property("#000000")],i.prototype,"fill",void 0),X([t.Complex({color:"#ffffff",size:"13px"},Z)],i.prototype,"textStyle",void 0),X([t.Property(null)],i.prototype,"format",void 0),X([t.Property(null)],i.prototype,"template",void 0),X([t.Property(!0)],i.prototype,"enableAnimation",void 0),X([t.Complex({},Y)],i.prototype,"border",void 0),X([t.Property(!1)],i.prototype,"showAtMousePosition",void 0),i}(t.ChildProperty);!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.axisLineColor=null,e.tickLineColor=null,e.pointerColor=null}(I||(I={}));var K=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Q=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},$=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(2)],i.prototype,"width",void 0),Q([t.Property("")],i.prototype,"dashArray",void 0),Q([t.Property(I.axisLineColor)],i.prototype,"color",void 0),i}(t.ChildProperty),ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Complex(I.axisLabelFont,Z)],i.prototype,"font",void 0),Q([t.Property("")],i.prototype,"format",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property("None")],i.prototype,"hiddenLabel",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"start",void 0),Q([t.Property(null)],i.prototype,"end",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(10)],i.prototype,"startWidth",void 0),Q([t.Property(10)],i.prototype,"endWidth",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),i}(t.ChildProperty),ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"width",void 0),Q([t.Property(null)],i.prototype,"height",void 0),Q([t.Property(null)],i.prototype,"interval",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),Q([t.Property(I.tickLineColor)],i.prototype,"color",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property("#ffffff")],i.prototype,"color",void 0),Q([t.Complex({color:I.pointerColor,width:8},Y)],i.prototype,"border",void 0),Q([t.Property(8)],i.prototype,"radius",void 0),i}(t.ChildProperty),ne=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(I.pointerColor)],i.prototype,"color",void 0),Q([t.Complex({color:I.pointerColor,width:0},Y)],i.prototype,"border",void 0),Q([t.Property("0%")],i.prototype,"length",void 0),i}(t.ChildProperty),re=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(!0)],i.prototype,"enable",void 0),Q([t.Property(1e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"content",void 0),Q([t.Property(90)],i.prototype,"angle",void 0),Q([t.Property("50%")],i.prototype,"radius",void 0),Q([t.Property("-1")],i.prototype,"zIndex",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Complex({size:"12px",color:"#686868"},Z)],i.prototype,"textStyle",void 0),Q([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),se=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"value",void 0),Q([t.Property("Needle")],i.prototype,"type",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),Q([t.Property(null)],i.prototype,"imageUrl",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(20)],i.prototype,"pointerWidth",void 0),Q([t.Complex({},oe)],i.prototype,"cap",void 0),Q([t.Complex({},ne)],i.prototype,"needleTail",void 0),Q([t.Property(I.pointerColor)],i.prototype,"color",void 0),Q([t.Complex({color:"#DDDDDD",width:0},Y)],i.prototype,"border",void 0),Q([t.Complex(null,re)],i.prototype,"animation",void 0),Q([t.Property("Circle")],i.prototype,"markerShape",void 0),Q([t.Property(5)],i.prototype,"markerHeight",void 0),Q([t.Property(null)],i.prototype,"description",void 0),Q([t.Property(5)],i.prototype,"markerWidth",void 0),i}(t.ChildProperty),le=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return K(i,e),Q([t.Property(null)],i.prototype,"minimum",void 0),Q([t.Property(null)],i.prototype,"maximum",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Complex({},$)],i.prototype,"lineStyle",void 0),Q([t.Collection([{}],te)],i.prototype,"ranges",void 0),Q([t.Collection([{}],se)],i.prototype,"pointers",void 0),Q([t.Collection([{}],ae)],i.prototype,"annotations",void 0),Q([t.Complex({width:2,height:10},ie)],i.prototype,"majorTicks",void 0),Q([t.Complex({width:2,height:5},ie)],i.prototype,"minorTicks",void 0),Q([t.Property(200)],i.prototype,"startAngle",void 0),Q([t.Property(160)],i.prototype,"endAngle",void 0),Q([t.Property("ClockWise")],i.prototype,"direction",void 0),Q([t.Property(null)],i.prototype,"background",void 0),Q([t.Complex({},ee)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),ue=function(){function e(e){this.gauge=e,this.elementId=e.element.id}return e.prototype.renderAnnotation=function(e,i){var o=this,n=t.createElement("div",{id:this.elementId+"_Annotations_"+i}),r=_(this.elementId+"_Secondary_Element");e.annotations.map(function(e,t){null!==e.content&&o.createTemplate(n,t,i)}),r&&n.childElementCount&&r.appendChild(n)},e.prototype.createTemplate=function(e,i,o){var n=this.gauge.axes[o],a=n.annotations[i],s=t.createElement("div",{id:this.elementId+"_Axis_"+o+"_Annotation_"+i,styles:"position: absolute; z-index:"+a.zIndex+";transform:"+(a.autoAngle?"rotate("+(a.angle-90)+"deg)":"rotate(0deg)")+";"}),l={cancel:!1,name:"annotationRender",content:a.content,axis:n,annotation:a,textStyle:a.textStyle};this.gauge.trigger("annotationRender",l);var u,h;if(!l.cancel){if((u=C(l.content))&&u(n).length)for(h=u(n);h.length>0;)s.appendChild(h[0]);else s.appendChild(t.createElement("div",{innerHTML:l.content,styles:r(l.textStyle)}));this.updateLocation(s,n,a),e.appendChild(s)}},e.prototype.updateLocation=function(e,t,i){var o=f(i.angle-90,l(i.radius,t.currentRadius),this.gauge.midPoint),n=s(e);e.style.left=o.x-n.width/2+"px",e.style.top=o.y-n.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}(),he=function(){function e(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.textStyle=this.tooltip.textStyle,this.borderStyle=this.tooltip.border,this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,n,r,a,s,l=!1;if(-1!==e.type.indexOf("touch")?(r=(a=e).target,o=a.changedTouches[0].pageX,n=a.changedTouches[0].pageY):(r=e.target,o=e.pageX,n=e.pageY),r.id.indexOf("_Pointer_")>=0){null!==this.pointerEle&&(l=this.pointerEle===r);var u=this.gauge.svgObject.getBoundingClientRect(),h=this.gauge.element.getBoundingClientRect(),d=new D(Math.abs(h.left-u.left),Math.abs(h.top-u.top),u.width,u.height),p=L(r.id,this.gauge);this.currentAxis=this.gauge.axes[p.axisIndex],this.currentPointer=this.currentAxis.pointers[p.pointerIndex];var g=c(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,y=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,m=y&&null!==y.match("{value}"),v=this.gauge.intl.getNumberFormat({format:k(y),useGrouping:this.gauge.useGroupingSeparator});document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=t.createElement("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle));var x=m?y.replace(new RegExp("{value}","g"),v(this.currentPointer.currentValue)):v(this.currentPointer.currentValue);(s=f(g,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(g>=150&&g<=250||g>=330&&g<=360||g>=0&&g<=45)?s.x+10:s.x;var b={name:"tooltipRender",cancel:!1,content:x,location:s,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge};this.gauge.trigger("tooltipRender",b);var P=b.tooltip.template;if(null!==P&&1===Object.keys(P).length&&(P=P[Object.keys(P)[0]]),this.tooltip.showAtMousePosition)b.location=T(o,n,this.gauge.svgObject),this.tooltipRect=d;else if(P){var R=r.getBoundingClientRect(),w=S(this.tooltip.template,this.gauge,this.tooltipEle),A=Math.abs(u.width-R.width)-Math.abs(R.left-u.left);w.height>Math.abs(u.height-b.location.y)-20&&(b.location.y+=w.height/2),w.width>A?(b.location.x-=Math.abs(u.left+u.width-(b.location.x+w.width)),this.tooltipRect=d):(this.tooltipRect=d,this.findPosition(d,g,x,b.location))}else this.findPosition(d,g,x,b.location);b.cancel||l||(b.tooltip.properties.textStyle.color="Highcontrast"===this.gauge.theme?"#00000":"#FFFFFF",this.svgTooltip=new i.Tooltip({enable:!0,data:{value:b.content},template:P,enableAnimation:b.tooltip.enableAnimation,content:[b.content],location:b.location,inverted:this.arrowInverted,areaBounds:this.tooltipRect,fill:"Highcontrast"===this.gauge.theme?"#FFFFFF":b.tooltip.fill,textStyle:b.tooltip.textStyle,border:b.tooltip.border,theme:this.gauge.theme}),this.svgTooltip.appendTo(this.tooltipEle),P&&Math.abs(n-this.tooltipEle.getBoundingClientRect().top)<=0&&(this.tooltipEle.style.top=parseFloat(this.tooltipEle.style.top)+20+"px"))}else this.removeTooltip()},e.prototype.findPosition=function(e,t,i,o){var n,r,a,s;switch(!0){case t>=0&&t<45:this.arrowInverted=!0,n=t>=15&&t<=30?o.y:0,this.tooltipRect=new D(e.x,e.y+r,e.width,e.height),this.tooltipPosition="RightBottom";break;case t>=45&&t<90:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case t>=90&&t<135:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case t>=135&&t<180:this.arrowInverted=!0,r=t>=150&&t<=160?o.y:0,this.tooltipRect=new D(e.x-e.width,e.y+r,e.width,e.height),this.tooltipPosition="LeftBottom";break;case t>=180&&t<225:this.arrowInverted=!0,a=t>=200&&t<=225?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x-e.width,e.y,e.width,a),this.tooltipPosition="LeftTop";break;case t>=225&&t<270:this.arrowInverted=!1,s=t>=250&&t<=290?e.width:Math.abs(e.x-o.x),this.tooltipRect=new D(e.x,e.y,s,e.height),this.tooltipPosition="TopLeft";break;case t>=270&&t<315:this.arrowInverted=!1,n=t>=270&&t>290?o.x:0,this.tooltipRect=new D(e.x+n,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case t>=315&&t<=360:this.arrowInverted=!0,a=t>=315&&t<=340?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x,e.y,e.width,a),this.tooltipPosition="RightTop"}},e.prototype.removeTooltip=function(){document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0&&(document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0].remove(),this.pointerEle=null)},e.prototype.mouseUpHandler=function(e){this.renderTooltip(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},e.prototype.addEventListener=function(){this.gauge.isDestroyed||(this.gauge.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.gauge.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},e.prototype.removeEventListener=function(){this.gauge.isDestroyed||(this.gauge.off(t.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),de=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,i,o){var n=e.background;this.setRangeColor(e),null!==n&&h(new F(o.element.id+"_AxisOuterLine_"+t,n,0,"transparent",null,"0",x(o.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,o)},e.prototype.drawAxisLine=function(e,t,i,o){var n=e.startAngle,r=e.endAngle;e.lineStyle.width>0&&(n=m(n,r)?[0,r=360][0]:n,h(new F(o.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,e.lineStyle.color,null,e.lineStyle.dashArray,x(o.midPoint,n-90,r-90,e.currentRadius),"","pointer-events:none;"),i,o))},e.prototype.drawAxisLabels=function(e,t,i,o){var n,r,a,s,l=o.renderer.createGroup({id:o.element.id+"_Axis_Labels_"+t}),h=e.visibleRange.min,d=e.visibleRange.max,p=e.visibleLabels,g=e.labelStyle,y=e.currentRadius;"Outside"===g.position?y+=e.nearSize-(e.maxLabelSize.height+e.lineStyle.width/2)+5:y-=e.farSize-(e.maxLabelSize.height+e.lineStyle.width/2)+(g.autoAngle?10:0);for(var m=0,v=p.length;m<v;m++)0===m&&"First"===g.hiddenLabel||m===v-1&&"Last"===g.hiddenLabel||(s=p[m],n=f(a=Math.round(c(s.value,d,h,e.startAngle,e.endAngle,"ClockWise"===e.direction)),y,o.midPoint),r=this.findAnchor(n,g,a,s),u(new G(o.element.id+"_Axis_"+t+"_Label_"+m,n.x,n.y,r,s.text,g.autoAngle?"rotate("+(a+90)+","+n.x+","+n.y+")":"","auto"),g.font,g.useRangeColor?O(s.value,e.ranges,g.font.color):g.font.color,l,"pointer-events:none;"));i.appendChild(l)},e.prototype.findAnchor=function(e,t,i,o){if(t.autoAngle)return"middle";var n="Inside"===t.position?i>120&&i<240?"start":300<i||i<60?"end":"middle":i>120&&i<240?"end":300<i||i<60?"start":"middle";return e.y+="Inside"===t.position?i>=240&&i<=300?o.size.height/2:i>=60&&i<=120?0:o.size.height/4:i>=240&&i<=300?0:i>=60&&i<=120?o.size.height/2:o.size.height/4,n},e.prototype.drawMinorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MinorTickLines_"+t}),r=e.minorTicks,a=null!==r.interval?r.interval:e.visibleRange.interval/2,s=r.useRangeColor;if(r.width&&r.height&&a){for(var l=e.visibleRange.min,u=e.visibleRange.max;l<=u;l+=a)this.majorValues.indexOf(+l.toFixed(3))<0&&h(new F(o.element.id+"_Axis_Minor_TickLine_"+t+"_"+l,"transparent",r.width,s?O(l,e.ranges,r.color):r.color,null,"0",this.calculateTicks(l,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.drawMajorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MajorTickLines_"+t}),r=e.majorTicks,a=r.useRangeColor;if(this.majorValues=[],r.width&&r.height&&e.visibleRange.interval){for(var s=e.visibleRange.min,l=e.visibleRange.max,u=e.visibleRange.interval;s<=l;s+=u)this.majorValues.push(+s.toFixed(3)),h(new F(o.element.id+"_Axis_Major_TickLine_"+t+"_"+s,"transparent",r.width,a?O(s,e.ranges,r.color):r.color,null,"0",this.calculateTicks(s,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.calculateTicks=function(e,t,i){var o=i.lineStyle.width/2+t.offset,n="Outside"===t.position,r=c(e,i.visibleRange.max,i.visibleRange.min,i.startAngle,i.endAngle,"ClockWise"===i.direction),a=f(r,i.currentRadius+(n?o:-o),this.gauge.midPoint),s=f(r,i.currentRadius+(n?o:-o)+(n?t.height:-t.height),this.gauge.midPoint);return"M "+a.x+" "+a.y+" L "+s.x+" "+s.y+" "},e.prototype.drawAxisRange=function(e,t,i,o){var r,a,s,l,u,d,p,g,y,m,v=this,f=o.renderer.createGroup({id:o.element.id+"_Axis_Ranges_"+t}),b="ClockWise"===e.direction,R=e.visibleRange.min,w=e.visibleRange.max;e.ranges.map(function(i,A){v.calculateRangeRadius(e,i),s=Math.min(Math.max(i.start,R),i.end),l=Math.min(Math.max(i.start,i.end),w),s!==l&&(r=c(s,w,R,e.startAngle,e.endAngle,b),a=c(l,w,R,e.startAngle,e.endAngle,b),u=i.startWidth.length>0?n(i.startWidth,i.currentRadius):i.startWidth,d=i.endWidth.length>0?n(i.endWidth,i.currentRadius):i.endWidth,a=b?a:[r,r=a][0],d=b?d:[u,u=d][0],y=((i.currentRadius-u/2)*(r*Math.PI/180)-i.roundedCornerRadius/4)/(i.currentRadius-u/2)*180/Math.PI,m=((i.currentRadius-d/2)*(a*Math.PI/180)+i.roundedCornerRadius/4)/(i.currentRadius-d/2)*180/Math.PI,p=(i.currentRadius*(r*Math.PI/180)+i.roundedCornerRadius)/i.currentRadius*180/Math.PI,g=(i.currentRadius*(a*Math.PI/180)-i.roundedCornerRadius)/i.currentRadius*180/Math.PI,i.roundedCornerRadius?h(new F(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,1,"0",P(o.midPoint,Math.floor(p),Math.ceil(g),Math.floor(y),Math.ceil(m),i.currentRadius,u,d),"","pointer-events:none;"),f,o):h(new F(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,1,"0",x(o.midPoint,Math.floor(r),Math.ceil(a),i.currentRadius,u,d),"","pointer-events:none;"),f,o))}),i.appendChild(f)},e.prototype.calculateRangeRadius=function(e,t){var i=null!==t.radius?t.radius:"100%";t.currentRadius=l(i,e.currentRadius)},e.prototype.setRangeColor=function(e){var t=(this.gauge.theme,["#50c917","#27d5ff","#fcde0b","#ffb133","#ff5985"]);e.ranges.map(function(e,i){e.rangeColor=e.color?e.color:t[i%t.length]})},e}(),pe=function(){function e(e){this.gauge=e}return e.prototype.drawPointers=function(e,t,i,o,n){var r=this;void 0===n&&(n=!0);var a,s,l=o.renderer.createGroup({id:o.element.id+"_Axis_Pointers_"+t});e.pointers.map(function(i,u){s=e.visibleRange,i.pathElement=[],r.calculatePointerRadius(e,i),a=o.renderer.createGroup({id:o.element.id+"_Axis_"+t+"_Pointer_"+u}),r["draw"+i.type+"Pointer"](e,t,u,a,o),r.setPointerValue(e,i,i.currentValue),l.appendChild(a),n&&r.doPointerAnimation(i,e)}),i.appendChild(l)},e.prototype.calculatePointerRadius=function(e,t){t.currentRadius=null===t.radius?e.currentRadius-(e.farSize+5):l(t.radius,e.currentRadius)},e.prototype.drawNeedlePointer=function(e,t,i,o,n){var r,a,s,u,d=e.pointers[i],p=n.midPoint,c=d.pointerWidth/2;a=f(0,d.currentRadius,p),s="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+p.y+" L "+p.x+" "+(p.y+c)+" Z",d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_Needle_"+i,d.color,d.border.width,d.border.color,null,"0",s),o,n)),r=l(d.needleTail.length,d.currentRadius),u="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c),r&&(a=f(180,r,n.midPoint),s="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c)+" Z",d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleTail_"+i,d.needleTail.color,d.needleTail.border.width,d.needleTail.border.color,null,"0",s),o,n)),u+=" L "+a.x+" "+(p.y+c)+" L "+a.x+" "+(p.y-c)),d.cap.radius&&d.pathElement.push(h(z(p,"Circle",new V(2*d.cap.radius,2*d.cap.radius),"",new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleCap_"+i,d.cap.color,d.cap.border.width,d.cap.border.color,null,"0","","")),o,n,"Ellipse")),d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleRect_"+i,"transparent",0,"transpanret",null,"0",u+" Z"),o,n))},e.prototype.setPointerValue=function(e,t,i){var o=this.gauge.midPoint,n="ClockWise"===e.direction,r=c(e.visibleRange.min,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n),a=c(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n);a=n?r===a?a+1:a:r===a?[r,r=a-1][0]:[r,r=a][0];var s,l,u,h;u=((t.currentRadius-t.pointerWidth/2)*(r*Math.PI/180)-t.roundedCornerRadius/4)/(t.currentRadius-t.pointerWidth/2)*180/Math.PI,h=((t.currentRadius-t.pointerWidth/2)*(a*Math.PI/180)+t.roundedCornerRadius/4)/(t.currentRadius-t.pointerWidth/2)*180/Math.PI,s=(t.currentRadius*(r*Math.PI/180)+t.roundedCornerRadius)/t.currentRadius*180/Math.PI,l=(t.currentRadius*(a*Math.PI/180)-t.roundedCornerRadius)/t.currentRadius*180/Math.PI,t.pathElement.map(function(d){"RangeBar"===t.type?t.roundedCornerRadius?d.setAttribute("d",P(o,s,l,u,h,t.currentRadius,t.pointerWidth,t.pointerWidth)):d.setAttribute("d",w(o,r,a,t.currentRadius,t.currentRadius-t.pointerWidth)):d.setAttribute("transform","rotate("+c(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n)+","+o.x+","+o.y+")"),d.setAttribute("aria-label",t.description||"Pointer:"+i.toString())})},e.prototype.drawMarkerPointer=function(e,t,i,o,n){var r=e.pointers[i],a=f(0,r.currentRadius,n.midPoint);r.pathElement.push(h(z(a,r.markerShape,new V(r.markerWidth,r.markerHeight),r.imageUrl,new F(n.element.id+"_Axis_"+t+"_Pointer_Marker_"+i,r.color,r.border.width,r.border.color,null,"0","","")),o,n,"Circle"===r.markerShape?"Ellipse":"Image"===r.markerShape?"Image":"Path"))},e.prototype.drawRangeBarPointer=function(e,t,i,o,n){var r=e.pointers[i];r.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_RangeBar_"+i,r.color,r.border.width,r.border.color,1,"0",""),o,n))},e.prototype.doPointerAnimation=function(e,t){var i=this,o=t.visibleRange.min,n=e.currentValue;e.animation.enable&&o!==n&&this.gauge.animatePointer&&e.pathElement.map(function(r){"RangeBar"===e.type?i.performRangeBarAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth):i.performNeedleAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth)})},e.prototype.performNeedleAnimation=function(e,i,o,n,r,a,s){var l,u=this,h="ClockWise"===n.direction,d=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),g=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),y=d>g?g+360:g;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){l=i<o||Math.round(d)===Math.round(y)?h?y-d:y-d-360:h?y-d-360:y-d,e.style.animation="None",e.setAttribute("transform","rotate("+p(t.timeStamp,d,l,t.duration)+","+u.gauge.midPoint.x.toString()+","+u.gauge.midPoint.y.toString()+")")},end:function(t){u.setPointerValue(n,r,o),("Marker"===r.type||e.id.indexOf("_Pointer_NeedleCap")>=0)&&u.gauge.trigger("animationComplete",{axis:n,pointer:r})}})},e.prototype.performRangeBarAnimation=function(e,i,o,n,r,a,s){var l,u=this,h="ClockWise"===n.direction,d=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),g=c(n.visibleRange.min,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),y=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),m=d>y?y+360:y;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){e.style.animation="None",l=i<o||Math.round(d)===Math.round(m)?h?m-d:m-d-360:h?m-d-360:m-d,h?e.setAttribute("d",w(u.gauge.midPoint,g,p(t.timeStamp,d,l,t.duration)+1e-4,a,s)):e.setAttribute("d",w(u.gauge.midPoint,p(t.timeStamp,d,l,t.duration),g+1e-4,a,s))},end:function(e){u.setPointerValue(n,r,o),u.gauge.trigger("animationComplete",{axis:n,pointer:r})}})},e}(),ce=function(){function e(e){this.gauge=e,this.axisRenderer=new de(e),this.pointerRenderer=new pe(e)}return e.prototype.measureAxis=function(e){this.measureAxisSize(this.gauge,e),this.calculateAxesRadius()},e.prototype.calculateAxesRadius=function(){for(var e,i,o=0,n=this.gauge.margin.left+this.gauge.margin.right,r=this.gauge.margin.top+this.gauge.margin.bottom,a=0,s=this.gauge.axes;a<s.length;a++){var u=s[a];if(e=Math.min(u.rect.width,u.rect.height)/2,i=null!=u.radius?l(u.radius,e):e,o=Math.max.apply(Math,u.ranges.map(function(e){return e.radius?e.radius.indexOf("%")<0?100:parseInt(e.radius,10):0})),i=o>100&&null==u.radius?100*i/o:i,u.currentRadius=i-u.nearSize,this.gauge.moveToCenter&&1===this.gauge.axes.length&&t.isNullOrUndefined(this.gauge.centerX)&&t.isNullOrUndefined(this.gauge.centerY)){var h=void 0,d=void 0,p=f((h=m(h=u.startAngle,u.endAngle)?[0,d=360][0]:h)-90,i,this.gauge.midPoint);d=u.endAngle;var c=f((d-=m(h,d)?1e-4:0)-90,i,this.gauge.midPoint),g=void 0,y=void 0,v=void 0,x=void 0,b=void 0,P=void 0,R=void 0;h>=270&&h<=360&&(d>270&&d<=360||d>=0&&d<=180)?(v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),R=d<=360&&d>=270?this.gauge.midPoint:d<=90?c:f(0,i,this.gauge.midPoint),x=Math.abs(R.x-this.gauge.gaugeRect.width),p=d<=360&&d>=270?c:f(270,i,this.gauge.midPoint),b=Math.abs(p.y-this.gauge.gaugeRect.y),c=d<=360&&d>=270||d>=0&&d<90?this.gauge.midPoint:d>=90&&d<=180?c:f(90,i,this.gauge.midPoint),P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):h>=0&&h<90&&d>=0&&d<=270?(b=Math.abs(p.y-this.gauge.gaugeRect.y),R=d>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(R.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height)),p=d>=180?c:this.gauge.midPoint,v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),c=d>=90?f(0,i,this.gauge.midPoint):c,x=Math.abs(c.x-this.gauge.gaugeRect.width)):h>=90&&h<180&&d>90&&d<=360?(R=d<=180?this.gauge.midPoint:d>=270?f(180,i,this.gauge.midPoint):c,v=Math.abs(R.x-this.gauge.gaugeRect.x),x=Math.abs(p.x-this.gauge.gaugeRect.width),p=d>270?f(d-90,i,this.gauge.midPoint):this.gauge.midPoint,b=Math.abs(this.gauge.gaugeRect.y-p.y),c=d>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):h>=180&&h<=270&&(d<=360&&d>=270||d<=90&&d>=0)&&(R=d>180&&d<270?c:f(180,i,this.gauge.midPoint),v=Math.abs(this.gauge.gaugeRect.x-Math.abs(R.x-this.gauge.gaugeRect.x)),R=d>=180&&d<=360?this.gauge.midPoint:c,x=Math.abs(R.x-this.gauge.gaugeRect.width),R=d>180&&d<270?this.gauge.midPoint:d>=270&&d<=360?c:f(270,i,this.gauge.midPoint),b=Math.abs(R.y-this.gauge.gaugeRect.y),P=Math.abs(p.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))),g=Math.abs(v+x-n),y=Math.abs(b+P-r),this.gauge.midPoint.x=this.gauge.midPoint.x-v/2+x/2,this.gauge.midPoint.y=this.gauge.midPoint.y-b/2+P/2,e=Math.min(this.gauge.gaugeRect.width,this.gauge.gaugeRect.height)/2+Math.min(g,y)/2,u.currentRadius=(null!=u.radius?l(u.radius,e):e)-u.nearSize}u.visibleRange.interval=this.calculateNumericInterval(u,u.rect),this.calculateVisibleLabels(u)}},e.prototype.measureAxisSize=function(e,t){var i,o=this;this.computeSize(e.axes,t),e.axes.map(function(e,n){i=d(n,o.farSizes.length-1,o.farSizes),e.rect=new D(t.x+i,t.y+i,t.width-2*i,t.height-2*i)})},e.prototype.calculateAxisValues=function(e){for(var t=0,i=this.gauge.axes;t<i.length;t++){var o=i[t];this.calculateVisibleRange(o,e),this.calculateVisibleLabels(o)}},e.prototype.calculateVisibleRange=function(e,t){var i=e.majorTicks.interval,o=Math.min(null===e.minimum?0:e.minimum,e.maximum),n=Math.max(e.minimum,null===e.maximum?100:e.maximum);e.pointers.map(function(t){t.currentValue=null!==t.value?t.value<o?o:t.value>n?n:t.value:o,o=null===e.minimum?Math.min(t.currentValue,o):o,n=null===e.maximum?Math.max(t.currentValue,n):n}),o=o===n?null!==i?o-i:o-1:o,e.visibleRange={min:o,max:n,interval:i},e.visibleRange.interval=this.calculateNumericInterval(e,t)},e.prototype.calculateNumericInterval=function(e,t){if(null!==e.majorTicks.interval)return e.majorTicks.interval;var i=e.endAngle-e.startAngle;return i=i<=0?i+360:i,this.calculateNiceInterval(e.visibleRange.max,e.visibleRange.min,e.currentRadius?e.currentRadius:t.width/2,i)},e.prototype.calculateNiceInterval=function(e,t,i,o){for(var n=e-t,r=2*Math.PI*i*(o/360),a=Math.max(.01599*r,1),s=n/a,l=Math.pow(10,Math.floor(Math.log(s)/Math.log(10))),u=0,h=[10,5,2,1];u<h.length;u++){var d=l*h[u];if(a<n/d)break;s=d}return s},e.prototype.calculateVisibleLabels=function(e){var t,i=e.labelStyle,o=i.format&&null!==i.format.match("{value}"),n=this.gauge.intl.getNumberFormat({format:k(i.format),useGrouping:this.gauge.useGroupingSeparator});e.visibleLabels=[];for(var r=e.visibleRange.min,a=e.visibleRange.interval,s=e.visibleRange.max;r<=s&&a;r+=a)t={cancel:!1,name:"axisLabelRender",axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(r)):n(r),value:r},this.gauge.trigger("axisLabelRender",t),t.cancel||e.visibleLabels.push(new H(t.text,r));this.getMaxLabelWidth(this.gauge,e)},e.prototype.computeSize=function(e,t){var i,o,n,r,a,s,l=0,u=0,h=0;this.farSizes=[],this.calculateAxisValues(t);for(var d=0,p=e;d<p.length;d++){var c=p[d];i=c.lineStyle.width/2,o=0,n=0,r="Outside"===c.majorTicks.position,l=c.majorTicks.offset,a="Outside"===c.minorTicks.position,u=c.minorTicks.offset,s="Outside"===c.labelStyle.position,h=c.labelStyle.offset,o+=r&&a&&s?0:5,o+=(r?c.majorTicks.height+i:0)+(s?c.maxLabelSize.height+10+h:0)+(a&&!r?c.minorTicks.height+i:0)+i,o+=r&&a?Math.max(l,u):r?l:a?u:0,n+=(r?0:c.majorTicks.height+i)+(s?0:c.maxLabelSize.height+10+h)+(!a&&r?c.minorTicks.height+i:0)+i,n+=r||a?r?a?0:u:l:Math.max(l,u),this.farSizes[this.farSizes.length-1]&&(this.farSizes[this.farSizes.length-1]+=n+o),c.nearSize=o-5,c.farSize=n,o=this.gauge.axes.length===this.farSizes.length+1?0:o,this.farSizes.push(o)}},e.prototype.renderAxes=function(e){var i=this;void 0===e&&(e=!0);var o,n=this.gauge,r=this.axisRenderer,a=n.renderer.createGroup({id:n.element.id+"_AxesCollection","clip-path":"url(#"+n.element.id+"_GaugeAreaClipRect_)"});n.element.appendChild(t.createElement("div",{id:n.element.id+"_Secondary_Element",styles:"position: relative"})),n.axes.map(function(t,s){o=n.renderer.createGroup({id:n.element.id+"_Axis_Group_"+s}),r.drawAxisOuterLine(t,s,o,n),r.drawAxisRange(t,s,o,n),r.drawAxisLine(t,s,o,n),r.drawMajorTickLines(t,s,o,n),r.drawMinorTickLines(t,s,o,n),r.drawAxisLabels(t,s,o,n),i.pointerRenderer.drawPointers(t,s,o,n,e),n.annotationsModule&&n.annotationsModule.renderAnnotation(t,s),a.appendChild(o)}),n.svgObject.appendChild(n.renderer.drawClipPath({id:n.element.id+"_GaugeAreaClipRect_",x:0,y:0,width:n.availableSize.width,height:n.availableSize.height,fill:"transparent",stroke:"transparent"})),n.svgObject.appendChild(a)},e.prototype.getMaxLabelWidth=function(e,t){t.maxLabelSize=new V(0,0);for(var i=0,n=t.visibleLabels;i<n.length;i++){var r=n[i];r.size=o(r.text,t.labelStyle.font),t.maxLabelSize.width=r.size.width>t.maxLabelSize.width?r.size.width:t.maxLabelSize.width,t.maxLabelSize.height=r.size.height>t.maxLabelSize.height?r.size.height:t.maxLabelSize.height}},e}(),ge=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),ye=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},me=function(e){function i(t,i){return e.call(this,t,i)||this}return ge(i,e),i.prototype.preRender=function(){this.unWireEvents(),this.trigger("load",{gauge:this}),this.themeEffect(),this.initPrivateVariable(),this.setCulture(),this.createSvg(),this.wireEvents()},i.prototype.themeEffect=function(){"Highcontrast"===this.theme?(this.titleStyle.color=this.titleStyle.color||"#FFFFFF",this.setThemeColors("#FFFFFF","#FFFFFF")):(this.titleStyle.color=this.titleStyle.color||"#424242",this.setThemeColors("#212121","#757575"))},i.prototype.setThemeColors=function(e,t){for(var i=0,o=this.axes;i<o.length;i++){var n=o[i];n.lineStyle.color=n.lineStyle.color||t,n.labelStyle.font.color=n.labelStyle.font.color||e,n.majorTicks.color=n.majorTicks.color||t,n.minorTicks.color=n.minorTicks.color||t;for(var r=0,a=n.pointers;r<a.length;r++){var s=a[r];s.color=s.color||t,s.needleTail.color=s.needleTail.color||t,s.needleTail.border.color=s.needleTail.border.color||t,s.cap.color=s.cap.color||t,s.cap.border.color=s.cap.border.color||t}}},i.prototype.render=function(){this.calculateBounds(),this.renderElements()},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMove),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEnd),t.EventHandler.remove(this.element,"contextmenu",this.gaugeRightClick),t.EventHandler.remove(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize)},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown,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,"contextmenu",this.gaugeRightClick,this),t.EventHandler.add(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize.bind(this)),this.setGaugeStyle(this.element)},i.prototype.mouseMove=function(e){var i=this.getMouseArgs(e,"touchmove","gaugeMouseMove");this.trigger("gaugeMouseMove",i);var o;this.tooltipModule;return i.cancel||this.enablePointerDrag&&this.activePointer&&(o={axis:this.activeAxis,pointer:this.activePointer,previousValue:this.activePointer.currentValue,name:"dragMove",currentValue:null},this.pointerDrag(new N(i.x,i.y)),o.currentValue=this.activePointer.currentValue,this.trigger("dragMove",o)),this.notify(t.Browser.touchMoveEvent,e),!1},i.prototype.mouseLeave=function(e){this.activeAxis=null,this.activePointer=null,this.svgObject.setAttribute("cursor","auto");var t=this.getMouseArgs(e,"touchmove","gaugeMouseLeave");return this.trigger("gaugeMouseLeave",t),!1},i.prototype.gaugeRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},i.prototype.pointerDrag=function(e){var t=this.activeAxis,i=t.visibleRange,o=y(v(this.midPoint,e),i.max,i.min,t.startAngle,t.endAngle,"ClockWise"===t.direction);o>=i.min&&o<=i.max&&(this.activePointer.currentValue=o,this.activePointer.value=o,this.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(t,this.activePointer,o))},i.prototype.gaugeOnMouseDown=function(e){var t,i=this.getMouseArgs(e,"touchstart","gaugeMouseDown");return this.trigger("gaugeMouseDown",i),!i.cancel&&i.target.id.indexOf("_Pointer_")>=0&&i.target.id.indexOf(this.element.id+"_Axis_")>=0&&(t=L(i.target.id,this),this.activeAxis=this.axes[t.axisIndex],this.activePointer=this.activeAxis.pointers[t.pointerIndex],this.trigger("dragStart",{axis:this.activeAxis,name:"dragStart",pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.svgObject.setAttribute("cursor","pointer")),!1},i.prototype.mouseEnd=function(e){var i=this.getMouseArgs(e,"touchend","gaugeMouseUp");"touch"===e.pointerType||"2"===e.pointerType||e.type,this.tooltipModule;return this.trigger("gaugeMouseUp",i),this.activeAxis&&this.activePointer&&(this.trigger("dragEnd",{name:"dragEnd",axis:this.activeAxis,pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.activeAxis=null,this.activePointer=null),this.svgObject.setAttribute("cursor","auto"),this.notify(t.Browser.touchEndEvent,e),!1},i.prototype.getMouseArgs=function(e,t,i){var o=this.element.getBoundingClientRect(),n=new N(-o.left,-o.top),r=e.type===t;return n.x+=r?e.changedTouches[0].clientX:e.clientX,n.y+=r?e.changedTouches[0].clientY:e.clientY,{cancel:!1,name:i,x:n.x,y:n.y,target:e.target}},i.prototype.gaugeResize=function(e){var t=this,i={gauge:this,previousSize:new V(this.availableSize.width,this.availableSize.height),name:"resized",currentSize:new V(0,0)};return this.animatePointer=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.element.classList.contains("e-circulargauge")&&(this.resizeTo=window.setTimeout(function(){t.createSvg(),t.calculateBounds(),t.renderElements(),i.currentSize=t.availableSize,t.trigger("resized",i)},500)),!1},i.prototype.setGaugeStyle=function(e){e.style.touchAction=this.enablePointerDrag?"none":"element",e.style.msTouchAction=this.enablePointerDrag?"none":"element",e.style.msContentZooming="none",e.style.msUserSelect="none",e.style.webkitUserSelect="none",e.style.position="relative"},i.prototype.setCulture=function(){this.intl=new t.Internationalization},i.prototype.createSvg=function(){this.removeSvg(),this.calculateSvgSize(),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},i.prototype.removeSvg=function(){if(E(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)}},i.prototype.initPrivateVariable=function(){this.renderer=new t.SvgRenderer(this.element.id),this.gaugeAxisLayoutPanel=new ce(this),this.animatePointer=!0},i.prototype.calculateSvgSize=function(){var e=this.element.offsetWidth,t=this.element.offsetHeight,i=l(this.width,e)||e||600,o=l(this.height,t)||t||450;this.availableSize=new V(i,o)},i.prototype.calculateBounds=function(){var e,i=this.margin,n=0;this.title&&(n=o(this.title,this.titleStyle).height+5);var r=i.top+n+this.border.width,a=i.left+this.border.width,s=this.availableSize.width-a-i.right-this.border.width,u=this.availableSize.height-r-this.border.width-i.bottom,h=Math.min(s,u)/2;e=this.moveToCenter&&1===this.axes.length&&t.isNullOrUndefined(this.centerX)&&t.isNullOrUndefined(this.centerY)?new D(a,r,s,u):new D(a+s/2-h,r+u/2-h,2*h,2*h),this.gaugeRect=e;var d=null!==this.centerX?l(this.centerX,this.availableSize.width):e.x+e.width/2,p=null!==this.centerY?l(this.centerY,this.availableSize.height):e.y+e.height/2;this.midPoint=new N(d,p),this.gaugeAxisLayoutPanel.measureAxis(e)},i.prototype.renderElements=function(e){void 0===e&&(e=!0),this.renderBorder(),this.renderTitle(),this.gaugeAxisLayoutPanel.renderAxes(e),this.element.appendChild(this.svgObject),this.trigger("loaded",{gauge:this})},i.prototype.renderTitle=function(){if(this.title){var e=o(this.title,this.titleStyle),t=u(new G(this.element.id+"_CircularGaugeTitle",this.availableSize.width/2,this.margin.top+e.height/4*3,"middle",this.title),this.titleStyle,this.titleStyle.color,this.svgObject,"");t.setAttribute("aria-label",this.description||this.title),t.setAttribute("tabindex",this.tabIndex.toString())}},i.prototype.renderBorder=function(){var e=this.border.width;(e>0||null!==this.background&&"transparent"!==this.background)&&this.svgObject.appendChild(this.renderer.drawRectangle(new W(this.element.id+"_CircularGaugeBorder",this.background,this.border,null,new D(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))))},i.prototype.setPointerValue=function(e,t,i){var o=this,n=this.axes[e],r=n.pointers[t],s=r.currentRadius,l=r.animation.enable;i=i<n.visibleRange.min?n.visibleRange.min:i,i=i>n.visibleRange.max?n.visibleRange.max:i,r.pathElement.map(function(e){"RangeBar"===r.type?(a(e,r.color,r.border),l?o.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(e,r.currentValue,i,n,r,s,s-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i)):(e.id.indexOf("_Pointer_NeedleCap_")>=0?a(e,r.cap.color,r.cap.border):e.id.indexOf("_Pointer_NeedleTail_")>=0?a(e,r.needleTail.color,r.needleTail.border):e.id.indexOf("_Pointer_NeedleRect_")>=0?a(e,"transparent",{color:"transparent",width:0}):a(e,r.color,r.border),l?o.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(e,r.currentValue,i,n,r,s,s-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i))}),r.currentValue=i,r.value=i},i.prototype.setAnnotationValue=function(e,i,o){var n=null!==_(this.element.id+"_Annotations_"+e),r=_(this.element.id+"_Annotations_"+e)||t.createElement("div",{id:this.element.id+"_Annotations_"+e}),a=this.axes[e].annotations[i];null!==o&&(E(this.element.id+"_Axis_"+e+"_Annotation_"+i),a.content=o,this.annotationsModule.createTemplate(r,i,e),n||_(this.element.id+"_Secondary_Element").appendChild(r))},i.prototype.setRangeValue=function(e,t,i,o){var r,s=_(this.element.id+"_Axis_"+e+"_Range_"+t),l=this.axes[e],u=l.ranges[t],h=l.visibleRange,d="ClockWise"===l.direction,p=Math.min(Math.max(i,h.min),o),g=Math.min(Math.max(i,o),h.max),y=c(p,h.max,h.min,l.startAngle,l.endAngle,d),m=c(g,h.max,h.min,l.startAngle,l.endAngle,d);r=u.startWidth.length>0?n(u.startWidth,u.currentRadius):u.startWidth;var v;v=u.endWidth.length>0?n(u.endWidth,u.currentRadius):u.endWidth,m=d?m:[y,y=m][0],v=d?v:[r,r=v][0],s.setAttribute("d",x(this.midPoint,Math.round(y),Math.round(m),u.currentRadius,r,v)),a(s,u.color?u.color:u.rangeColor,{color:u.color?u.color:u.rangeColor,width:0})},i.prototype.destroy=function(){this.unWireEvents(),this.removeSvg(),e.prototype.destroy.call(this)},i.prototype.requiredModules=function(){var e=[],t=!1;return this.axes.map(function(e){e.annotations.map(function(e){t=t||null!==e.content})}),t&&e.push({member:"Annotations",args:[this,ue]}),this.tooltip.enable&&e.push({member:"Tooltip",args:[this,he]}),e},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.onPropertyChanged=function(e,t){for(var i=!1,o=!1,n=!1,r=0,a=Object.keys(e);r<a.length;r++)switch(a[r]){case"height":case"width":case"centerX":case"centerY":case"margin":this.createSvg(),o=!0;break;case"title":o=""===e.title||""===t.title,i=!(""===e.title||""===t.title);break;case"titleStyle":e.titleStyle&&e.titleStyle.size?o=!0:i=!0;break;case"border":case"background":i=!0;break;case"axes":n=!0}!o&&i&&(this.removeSvg(),this.renderElements()),o&&(this.removeSvg(),this.calculateBounds(),this.renderElements()),!n||i||o||(this.removeSvg(),this.calculateBounds(),this.renderElements(!1))},i.prototype.getModuleName=function(){return"circulargauge"},ye([t.Property(null)],i.prototype,"width",void 0),ye([t.Property(null)],i.prototype,"height",void 0),ye([t.Complex({color:"transparent",width:0},Y)],i.prototype,"border",void 0),ye([t.Property("transparent")],i.prototype,"background",void 0),ye([t.Property("")],i.prototype,"title",void 0),ye([t.Complex({size:"15px",color:null},Z)],i.prototype,"titleStyle",void 0),ye([t.Complex({},q)],i.prototype,"margin",void 0),ye([t.Collection([{}],le)],i.prototype,"axes",void 0),ye([t.Complex({},J)],i.prototype,"tooltip",void 0),ye([t.Property(!1)],i.prototype,"enablePointerDrag",void 0),ye([t.Property(null)],i.prototype,"centerX",void 0),ye([t.Property(null)],i.prototype,"centerY",void 0),ye([t.Property(!1)],i.prototype,"moveToCenter",void 0),ye([t.Property("Material")],i.prototype,"theme",void 0),ye([t.Property(!1)],i.prototype,"useGroupingSeparator",void 0),ye([t.Property(null)],i.prototype,"description",void 0),ye([t.Property(1)],i.prototype,"tabIndex",void 0),ye([t.Event()],i.prototype,"loaded",void 0),ye([t.Event()],i.prototype,"load",void 0),ye([t.Event()],i.prototype,"animationComplete",void 0),ye([t.Event()],i.prototype,"axisLabelRender",void 0),ye([t.Event()],i.prototype,"annotationRender",void 0),ye([t.Event()],i.prototype,"tooltipRender",void 0),ye([t.Event()],i.prototype,"dragStart",void 0),ye([t.Event()],i.prototype,"dragMove",void 0),ye([t.Event()],i.prototype,"dragEnd",void 0),ye([t.Event()],i.prototype,"gaugeMouseMove",void 0),ye([t.Event()],i.prototype,"gaugeMouseLeave",void 0),ye([t.Event()],i.prototype,"gaugeMouseDown",void 0),ye([t.Event()],i.prototype,"gaugeMouseUp",void 0),ye([t.Event()],i.prototype,"resized",void 0),i=ye([t.NotifyPropertyChanges],i)}(t.Component);return e.CircularGauge=me,e.Annotations=ue,e.Line=$,e.Label=ee,e.Range=te,e.Tick=ie,e.Cap=oe,e.NeedleTail=ne,e.Animation=re,e.Annotation=ae,e.Pointer=se,e.Axis=le,e.Border=Y,e.Font=Z,e.Margin=q,e.TooltipSettings=J,e.GaugeTooltip=he,e.measureText=o,e.toPixel=n,e.getFontStyle=r,e.setStyles=a,e.measureElementRect=s,e.stringToNumber=l,e.textElement=u,e.appendPath=h,e.calculateSum=d,e.linear=p,e.getAngleFromValue=c,e.getDegree=g,e.getValueFromAngle=y,e.isCompleteAngle=m,e.getAngleFromLocation=v,e.getLocationFromAngle=f,e.getPathArc=x,e.getRangePath=b,e.getRoundedPathArc=P,e.getRoundedPath=R,e.getCompleteArc=w,e.getCirclePath=A,e.getCompletePath=M,e.getElement=_,e.getTemplateFunction=C,e.getElementSize=S,e.removeElement=E,e.getPointer=L,e.getMousePosition=T,e.getLabelFormat=k,e.calculateShapes=z,e.getRangeColor=O,e.CustomizeOption=B,e.PathOption=F,e.RectOption=W,e.Size=V,e.GaugeLocation=N,e.Rect=D,e.TextOption=G,e.VisibleLabels=H,e}({},ej.base,ej.svgbase),this.ejs=ej;
this.ej=this.ej||{},this.ej.circulargauge=function(e,t,i){"use strict";function o(e,i){var o=document.getElementById("gauge-measuretext");null===o&&(o=t.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(o));var n="position: absolute; visibility: hidden;;left: 0; top: -100; white-space: nowrap;"+r(i);return o.innerHTML=e,o.setAttribute("style",n),new V(o.clientWidth,o.clientHeight)}function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function r(e){return"font-size:"+e.size+"; font-style:"+e.fontStyle+"; font-weight:"+e.fontWeight+"; font-family:"+e.fontFamily+";opacity:"+e.opacity+"; color:"+e.color+";"}function a(e,i,o){t.setStyleAttribute(e,{stroke:o.color,"stroke-width":o.width,fill:i})}function l(e){var t;return document.body.appendChild(e),t=e.getBoundingClientRect(),E(e.id),t}function s(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function u(e,i,o,n,r){var a,l={},s=new t.SvgRenderer(""),u=r+" font-size:"+i.size+"; font-style:"+i.fontStyle+" ; font-weight:"+i.fontWeight+"; font-family:"+i.fontFamily+";";return l={id:e.id,x:e.x,y:e.y,fill:o,"text-anchor":e.anchor,transform:e.transform,opacity:i.opacity,"dominant-baseline":e.baseLine,style:u},a=s.createText(l,e.text),n.appendChild(a),a}function h(e,t,i,o){o=o||"Path";var n=i.renderer["draw"+o](e);return n.setAttribute("transform",e.transform),n.setAttribute("style",e.style),t.appendChild(n),n}function d(e,t,i){for(var o=0,n=i.length;e<n;e++)o+=i[e];return o}function p(e,t,i,o){return-i*Math.cos(e/o*(Math.PI/2))+i+t}function c(e,t,i,o,n,r){var a;return n-=m(o,n)?1e-4:0,o-=90,n-=90,a=r?(e-i)*(g(o,n)/(t-i))+o:(a=n-(e-i)*(g(o,n)/(t-i)))<0?360+a:a,a=Math.round(a)>=360?a-360:Math.round(a)<0?360+a:a}function g(e,t){var i=t-e;return i<0?i+360:i}function y(e,t,i,o,n,r){return n-=m(o,n)?1e-4:0,e=e<o?e+360:e,r?(e-o)/g(o,n)*(t-i)+i:t-((e-o)/g(o,n)*(t-i)+i)}function m(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function v(e,t){var i=Math.atan2(t.y-e.y,t.x-e.x);return i=Math.round((i<0?6.283+i:i)*(180/Math.PI))-270,i+=i<0?360:0}function f(e,t,i){var o=e*Math.PI/180;return new N(Math.cos(o)*t+i.x,Math.sin(o)*t+i.y)}function x(e,t,i,o,n,r){var a=g(t,i-=m(t,i)?1e-4:0),l=o-n,s=o-r,u=o-(n+r)/2;return void 0!==n&&void 0!==r?b(f(t,o,e),f(i,o,e),f(t,l,e),f(i,s,e),o,u,u,a<180?0:1):A(f(t,o,e),f(i,o,e),o,a<180?0:1)}function b(e,t,i,o,n,r,a,l){return"M "+e.x+" "+e.y+" A "+n+" "+n+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+o.x+" "+o.y+" A "+a+" "+r+" 0 "+l+" 0 "+i.x+" "+i.y+" Z"}function P(e,t,i,o,n,r,a,l){var s=g(t,i-=m(t,i)?1e-4:0),u=r-a,h=r-l,d=r-(a+l)/2;return R(f(t,r,e),f(i,r,e),f(n,r,e),f(n,h,e),f(o,r,e),f(o,u,e),f(t,u,e),f(i,h,e),r,d,d,s<180?0:1)}function R(e,t,i,o,n,r,a,l,s,u,h,d){return"M "+e.x+" "+e.y+" A "+s+" "+s+" 0 "+d+" 1 "+t.x+" "+t.y+" C "+i.x+" "+i.y+" "+o.x+" "+o.y+" "+l.x+" "+l.y+" A "+h+" "+u+" 0 "+d+" 0 "+a.x+" "+a.y+" C "+r.x+" "+r.y+" "+n.x+" "+n.y+" "+e.x+" "+e.y+" Z"}function w(e,t,i,o,n){var r=g(t,i-=m(t,i)?1e-4:0);return M(e,f(t,o,e),f(i,o,e),o,f(t,n,e),f(i,n,e),n,r<180?0:1)}function A(e,t,i,o){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+o+" 1 "+t.x+" "+t.y}function M(e,t,i,o,n,r,a,l){return"M "+t.x+" "+t.y+" A "+o+" "+o+" 0 "+l+" 1 "+i.x+" "+i.y+" L "+r.x+" "+r.y+" A "+a+" "+a+" 0 "+l+",0 "+n.x+" "+n.y+" Z"}function _(e){return document.getElementById(e)}function C(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(o){i=t.compile(e)}return i}function S(e,i,o){var n,r,a=C(e);if(a&&a(i).length){r=i.createElement("div",{id:i.element.id+"_Measure_Element"}),i.element.appendChild(r);for(var l=a(i);l.length>0;)r.appendChild(l[0]);o.appendChild(r),n=new V(o.getBoundingClientRect().width,o.getBoundingClientRect().height),t.remove(r)}return n}function E(e){var i=_(e);i&&t.remove(i)}function L(e,t){var i;return i=e.split(t.element.id+"_Axis_")[1],{axisIndex:+i[0],pointerIndex:+i[i.length-1]}}function T(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,r=i.ownerDocument.defaultView.pageYOffset,a=i.ownerDocument.documentElement.clientTop,l=i.ownerDocument.documentElement.clientLeft,s=o.left+n-l,u=o.top+r-a;return new N(e-s,t-u)}function k(e){return e&&null!==e.match("{value}")?"":e}function z(e,i,o,n,r){var a,l=o.width,s=o.height,u=e.x,h=e.y,d=e.x+-l/2,p=e.y+-s/2;switch(i){case"Circle":t.merge(r,{rx:l/2,ry:s/2,cx:u,cy:h});break;case"Diamond":a="M "+d+" "+h+" L "+u+" "+(h+-s/2)+" L "+(u+l/2)+" "+h+" L "+u+" "+(h+s/2)+" L "+d+" "+h+" Z",t.merge(r,{d:a});break;case"Rectangle":a="M "+d+" "+(h+-s/2)+" L "+(u+l/2)+" "+(h+-s/2)+" L "+(u+l/2)+" "+(h+s/2)+" L "+d+" "+(h+s/2)+" L "+d+" "+(h+-s/2)+" Z",t.merge(r,{d:a});break;case"Triangle":a="M "+u+" "+h+" L "+(u-s)+" "+(h-l/2)+"L "+(u-s)+" "+(h+l/2)+" Z",t.merge(r,{d:a});break;case"InvertedTriangle":a="M "+u+" "+h+" L "+(u+s)+" "+(h-l/2)+"L "+(u+s)+" "+(h+l/2)+" Z",t.merge(r,{d:a});break;case"Image":t.merge(r,{href:n,height:s,width:l,x:d,y:p})}return r}function O(e,t,i){var o=0,n=0,r=t.filter(function(t){return o=Math.min(t.start,t.end),n=Math.max(t.start,t.end),e>=o&&n>=e});return r.length?r[0].rangeColor:i}var I,j=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),B=function(){function e(e){this.id=e}return e}(),F=function(e){function t(t,i,o,n,r,a,l,s,u){void 0===s&&(s=""),void 0===u&&(u="");var h=e.call(this,t)||this;return h.opacity=r,h.fill=i,h.stroke=n,h["stroke-width"]=o,h["stroke-dasharray"]=a,h.d=l,h.transform=s,h.style=u,h}return j(t,e),t}(B),W=function(e){function t(t,i,o,n,r){var a=e.call(this,t)||this;return a.y=r.y,a.x=r.x,a.height=r.height,a.width=r.width,a.opacity=n,a.fill=i,a.stroke=o.color,a["stroke-width"]=o.width,a}return j(t,e),t}(B),V=function(){function e(e,t){this.width=e,this.height=t}return e}(),N=function(){function e(e,t){this.x=e,this.y=t}return e}(),D=function(){function e(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}return e}(),G=function(e){function t(t,i,o,n,r,a,l){void 0===a&&(a="");var s=e.call(this,t)||this;return s.transform="",s.baseLine="auto",s.x=i,s.y=o,s.anchor=n,s.text=r,s.transform=a,s.baseLine=l,s}return j(t,e),t}(B),H=function(){function e(e,t,i){this.text=e,this.value=t,this.size=i}return e}(),U=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),X=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Y=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property("")],i.prototype,"color",void 0),X([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property("16px")],i.prototype,"size",void 0),X([t.Property("")],i.prototype,"color",void 0),X([t.Property("segoe UI")],i.prototype,"fontFamily",void 0),X([t.Property("Normal")],i.prototype,"fontWeight",void 0),X([t.Property("Normal")],i.prototype,"fontStyle",void 0),X([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property(10)],i.prototype,"left",void 0),X([t.Property(10)],i.prototype,"right",void 0),X([t.Property(10)],i.prototype,"top",void 0),X([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property(!1)],i.prototype,"enable",void 0),X([t.Property("#000000")],i.prototype,"fill",void 0),X([t.Complex({color:"#ffffff",size:"13px"},Z)],i.prototype,"textStyle",void 0),X([t.Property(null)],i.prototype,"format",void 0),X([t.Property(null)],i.prototype,"template",void 0),X([t.Property(!0)],i.prototype,"enableAnimation",void 0),X([t.Complex({},Y)],i.prototype,"border",void 0),X([t.Property(!1)],i.prototype,"showAtMousePosition",void 0),i}(t.ChildProperty);!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.axisLineColor=null,e.tickLineColor=null,e.pointerColor=null}(I||(I={}));var K=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Q=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},$=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(2)],i.prototype,"width",void 0),Q([t.Property("")],i.prototype,"dashArray",void 0),Q([t.Property(I.axisLineColor)],i.prototype,"color",void 0),i}(t.ChildProperty),ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Complex(I.axisLabelFont,Z)],i.prototype,"font",void 0),Q([t.Property("")],i.prototype,"format",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property("None")],i.prototype,"hiddenLabel",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"start",void 0),Q([t.Property(null)],i.prototype,"end",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(10)],i.prototype,"startWidth",void 0),Q([t.Property(10)],i.prototype,"endWidth",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),i}(t.ChildProperty),ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"width",void 0),Q([t.Property(null)],i.prototype,"height",void 0),Q([t.Property(null)],i.prototype,"interval",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),Q([t.Property(I.tickLineColor)],i.prototype,"color",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property("#ffffff")],i.prototype,"color",void 0),Q([t.Complex({color:I.pointerColor,width:8},Y)],i.prototype,"border",void 0),Q([t.Property(8)],i.prototype,"radius",void 0),i}(t.ChildProperty),ne=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(I.pointerColor)],i.prototype,"color",void 0),Q([t.Complex({color:I.pointerColor,width:0},Y)],i.prototype,"border",void 0),Q([t.Property("0%")],i.prototype,"length",void 0),i}(t.ChildProperty),re=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(!0)],i.prototype,"enable",void 0),Q([t.Property(1e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"content",void 0),Q([t.Property(90)],i.prototype,"angle",void 0),Q([t.Property("50%")],i.prototype,"radius",void 0),Q([t.Property("-1")],i.prototype,"zIndex",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Complex({size:"12px",color:"#686868"},Z)],i.prototype,"textStyle",void 0),Q([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),le=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"value",void 0),Q([t.Property("Needle")],i.prototype,"type",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),Q([t.Property(null)],i.prototype,"imageUrl",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(20)],i.prototype,"pointerWidth",void 0),Q([t.Complex({},oe)],i.prototype,"cap",void 0),Q([t.Complex({},ne)],i.prototype,"needleTail",void 0),Q([t.Property(I.pointerColor)],i.prototype,"color",void 0),Q([t.Complex({color:"#DDDDDD",width:0},Y)],i.prototype,"border",void 0),Q([t.Complex(null,re)],i.prototype,"animation",void 0),Q([t.Property("Circle")],i.prototype,"markerShape",void 0),Q([t.Property(5)],i.prototype,"markerHeight",void 0),Q([t.Property(null)],i.prototype,"description",void 0),Q([t.Property(5)],i.prototype,"markerWidth",void 0),i}(t.ChildProperty),se=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return K(i,e),Q([t.Property(null)],i.prototype,"minimum",void 0),Q([t.Property(null)],i.prototype,"maximum",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Complex({},$)],i.prototype,"lineStyle",void 0),Q([t.Collection([{}],te)],i.prototype,"ranges",void 0),Q([t.Collection([{}],le)],i.prototype,"pointers",void 0),Q([t.Collection([{}],ae)],i.prototype,"annotations",void 0),Q([t.Complex({width:2,height:10},ie)],i.prototype,"majorTicks",void 0),Q([t.Complex({width:2,height:5},ie)],i.prototype,"minorTicks",void 0),Q([t.Property(200)],i.prototype,"startAngle",void 0),Q([t.Property(160)],i.prototype,"endAngle",void 0),Q([t.Property("ClockWise")],i.prototype,"direction",void 0),Q([t.Property(null)],i.prototype,"background",void 0),Q([t.Property(null)],i.prototype,"rangeGap",void 0),Q([t.Property(!1)],i.prototype,"startAndEndRangeGap",void 0),Q([t.Complex({},ee)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),ue=function(){function e(e){this.gauge=e,this.elementId=e.element.id}return e.prototype.renderAnnotation=function(e,i){var o=this,n=t.createElement("div",{id:this.elementId+"_Annotations_"+i}),r=_(this.elementId+"_Secondary_Element");e.annotations.map(function(e,t){null!==e.content&&o.createTemplate(n,t,i)}),r&&n.childElementCount&&r.appendChild(n)},e.prototype.createTemplate=function(e,i,o){var n=this.gauge.axes[o],a=n.annotations[i],l=t.createElement("div",{id:this.elementId+"_Axis_"+o+"_Annotation_"+i,styles:"position: absolute; z-index:"+a.zIndex+";transform:"+(a.autoAngle?"rotate("+(a.angle-90)+"deg)":"rotate(0deg)")+";"}),s={cancel:!1,name:"annotationRender",content:a.content,axis:n,annotation:a,textStyle:a.textStyle};this.gauge.trigger("annotationRender",s);var u,h;if(!s.cancel){if((u=C(s.content))&&u(n).length)for(h=u(n);h.length>0;)l.appendChild(h[0]);else l.appendChild(t.createElement("div",{innerHTML:s.content,styles:r(s.textStyle)}));this.updateLocation(l,n,a),e.appendChild(l)}},e.prototype.updateLocation=function(e,t,i){var o=f(i.angle-90,s(i.radius,t.currentRadius),this.gauge.midPoint),n=l(e);e.style.left=o.x-n.width/2+"px",e.style.top=o.y-n.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}(),he=function(){function e(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.textStyle=this.tooltip.textStyle,this.borderStyle=this.tooltip.border,this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,n,r,a,l,s=!1;if(-1!==e.type.indexOf("touch")?(r=(a=e).target,o=a.changedTouches[0].pageX,n=a.changedTouches[0].pageY):(r=e.target,o=e.pageX,n=e.pageY),r.id.indexOf("_Pointer_")>=0){null!==this.pointerEle&&(s=this.pointerEle===r);var u=this.gauge.svgObject.getBoundingClientRect(),h=this.gauge.element.getBoundingClientRect(),d=new D(Math.abs(h.left-u.left),Math.abs(h.top-u.top),u.width,u.height),p=L(r.id,this.gauge);this.currentAxis=this.gauge.axes[p.axisIndex],this.currentPointer=this.currentAxis.pointers[p.pointerIndex];var g=c(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,y=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,m=y&&null!==y.match("{value}"),v=this.gauge.intl.getNumberFormat({format:k(y),useGrouping:this.gauge.useGroupingSeparator});document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=t.createElement("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle));var x=m?y.replace(new RegExp("{value}","g"),v(this.currentPointer.currentValue)):v(this.currentPointer.currentValue);(l=f(g,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(g>=150&&g<=250||g>=330&&g<=360||g>=0&&g<=45)?l.x+10:l.x;var b={name:"tooltipRender",cancel:!1,content:x,location:l,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge};this.gauge.trigger("tooltipRender",b);var P=b.tooltip.template;if(null!==P&&1===Object.keys(P).length&&(P=P[Object.keys(P)[0]]),this.tooltip.showAtMousePosition)b.location=T(o,n,this.gauge.svgObject),this.tooltipRect=d;else if(P){var R=r.getBoundingClientRect(),w=S(this.tooltip.template,this.gauge,this.tooltipEle),A=Math.abs(u.width-R.width)-Math.abs(R.left-u.left);w.height>Math.abs(u.height-b.location.y)-20&&(b.location.y+=w.height/2),w.width>A?(b.location.x-=Math.abs(u.left+u.width-(b.location.x+w.width)),this.tooltipRect=d):(this.tooltipRect=d,this.findPosition(d,g,x,b.location))}else this.findPosition(d,g,x,b.location);if(!b.cancel&&!s){var M=this.gauge.theme.toLowerCase(),_=M.indexOf("dark")>-1||"highcontrast"===M?"#00000":"#FFFFFF";b.tooltip.properties.textStyle.color=_,this.svgTooltip=new i.Tooltip({enable:!0,data:{value:b.content},template:P,enableAnimation:b.tooltip.enableAnimation,content:[b.content],location:b.location,inverted:this.arrowInverted,areaBounds:this.tooltipRect,fill:M.indexOf("dark")>-1||"highcontrast"===M?"#FFFFFF":b.tooltip.fill,textStyle:b.tooltip.textStyle,border:b.tooltip.border}),this.svgTooltip.appendTo(this.tooltipEle),P&&Math.abs(n-this.tooltipEle.getBoundingClientRect().top)<=0&&(this.tooltipEle.style.top=parseFloat(this.tooltipEle.style.top)+20+"px")}}else this.removeTooltip()},e.prototype.findPosition=function(e,t,i,o){var n,r,a,l;switch(!0){case t>=0&&t<45:this.arrowInverted=!0,n=t>=15&&t<=30?o.y:0,this.tooltipRect=new D(e.x,e.y+r,e.width,e.height),this.tooltipPosition="RightBottom";break;case t>=45&&t<90:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case t>=90&&t<135:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case t>=135&&t<180:this.arrowInverted=!0,r=t>=150&&t<=160?o.y:0,this.tooltipRect=new D(e.x-e.width,e.y+r,e.width,e.height),this.tooltipPosition="LeftBottom";break;case t>=180&&t<225:this.arrowInverted=!0,a=t>=200&&t<=225?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x-e.width,e.y,e.width,a),this.tooltipPosition="LeftTop";break;case t>=225&&t<270:this.arrowInverted=!1,l=t>=250&&t<=290?e.width:Math.abs(e.x-o.x),this.tooltipRect=new D(e.x,e.y,l,e.height),this.tooltipPosition="TopLeft";break;case t>=270&&t<315:this.arrowInverted=!1,n=t>=270&&t>290?o.x:0,this.tooltipRect=new D(e.x+n,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case t>=315&&t<=360:this.arrowInverted=!0,a=t>=315&&t<=340?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x,e.y,e.width,a),this.tooltipPosition="RightTop"}},e.prototype.removeTooltip=function(){document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0&&(document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0].remove(),this.pointerEle=null)},e.prototype.mouseUpHandler=function(e){this.renderTooltip(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},e.prototype.addEventListener=function(){this.gauge.isDestroyed||(this.gauge.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.gauge.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},e.prototype.removeEventListener=function(){this.gauge.isDestroyed||(this.gauge.off(t.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),de=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,i,o){var n=e.background;this.setRangeColor(e),null!==n&&h(new F(o.element.id+"_AxisOuterLine_"+t,n,0,"transparent",null,"0",x(o.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,o)},e.prototype.drawAxisLine=function(e,t,i,o){var n=e.startAngle,r=e.endAngle;e.lineStyle.width>0&&(n=m(n,r)?[0,r=360][0]:n,h(new F(o.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,e.lineStyle.color,null,e.lineStyle.dashArray,x(o.midPoint,n-90,r-90,e.currentRadius),"","pointer-events:none;"),i,o))},e.prototype.drawAxisLabels=function(e,t,i,o){var n,r,a,l,s=o.renderer.createGroup({id:o.element.id+"_Axis_Labels_"+t}),h=e.visibleRange.min,d=e.visibleRange.max,p=e.visibleLabels,g=e.labelStyle,y=e.currentRadius;"Outside"===g.position?y+=e.nearSize-(e.maxLabelSize.height+e.lineStyle.width/2)+5:y-=e.farSize-(e.maxLabelSize.height+e.lineStyle.width/2)+(g.autoAngle?10:0);for(var m=0,v=p.length;m<v;m++)0===m&&"First"===g.hiddenLabel||m===v-1&&"Last"===g.hiddenLabel||(l=p[m],n=f(a=Math.round(c(l.value,d,h,e.startAngle,e.endAngle,"ClockWise"===e.direction)),y,o.midPoint),r=this.findAnchor(n,g,a,l),u(new G(o.element.id+"_Axis_"+t+"_Label_"+m,n.x,n.y,r,l.text,g.autoAngle?"rotate("+(a+90)+","+n.x+","+n.y+")":"","auto"),g.font,g.useRangeColor?O(l.value,e.ranges,g.font.color):g.font.color,s,"pointer-events:none;"));i.appendChild(s)},e.prototype.findAnchor=function(e,t,i,o){if(t.autoAngle)return"middle";var n="Inside"===t.position?i>120&&i<240?"start":300<i||i<60?"end":"middle":i>120&&i<240?"end":300<i||i<60?"start":"middle";return e.y+="Inside"===t.position?i>=240&&i<=300?o.size.height/2:i>=60&&i<=120?0:o.size.height/4:i>=240&&i<=300?0:i>=60&&i<=120?o.size.height/2:o.size.height/4,n},e.prototype.drawMinorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MinorTickLines_"+t}),r=e.minorTicks,a=null!==r.interval?r.interval:e.visibleRange.interval/2,l=r.useRangeColor;if(r.width&&r.height&&a){for(var s=e.visibleRange.min,u=e.visibleRange.max;s<=u;s+=a)this.majorValues.indexOf(+s.toFixed(3))<0&&h(new F(o.element.id+"_Axis_Minor_TickLine_"+t+"_"+s,"transparent",r.width,l?O(s,e.ranges,r.color):r.color,null,"0",this.calculateTicks(s,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.drawMajorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MajorTickLines_"+t}),r=e.majorTicks,a=r.useRangeColor;if(this.majorValues=[],r.width&&r.height&&e.visibleRange.interval){for(var l=e.visibleRange.min,s=e.visibleRange.max,u=e.visibleRange.interval;l<=s;l+=u)this.majorValues.push(+l.toFixed(3)),h(new F(o.element.id+"_Axis_Major_TickLine_"+t+"_"+l,"transparent",r.width,a?O(l,e.ranges,r.color):r.color,null,"0",this.calculateTicks(l,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.calculateTicks=function(e,t,i){var o=i.lineStyle.width/2+t.offset,n="Outside"===t.position,r=c(e,i.visibleRange.max,i.visibleRange.min,i.startAngle,i.endAngle,"ClockWise"===i.direction),a=f(r,i.currentRadius+(n?o:-o),this.gauge.midPoint),l=f(r,i.currentRadius+(n?o:-o)+(n?t.height:-t.height),this.gauge.midPoint);return"M "+a.x+" "+a.y+" L "+l.x+" "+l.y+" "},e.prototype.drawAxisRange=function(e,t,i,o){var r,a,l,s,u,d,p,g,y,m,v=this,f=o.renderer.createGroup({id:o.element.id+"_Axis_Ranges_"+t}),b="ClockWise"===e.direction,R=e.visibleRange.min,w=e.visibleRange.max;e.ranges.map(function(i,A){v.calculateRangeRadius(e,i),l=Math.min(Math.max(i.start,R),i.end),s=Math.min(Math.max(i.start,i.end),w),r=c(l,w,R,e.startAngle,e.endAngle,b),a=c(s,w,R,e.startAngle,e.endAngle,b);var M=r>a;null!=e.rangeGap&&e.rangeGap>0&&(r=0!==A||e.startAndEndRangeGap?r+e.rangeGap/Math.PI:r,a=A!==e.ranges.length-1||e.startAndEndRangeGap?a-e.rangeGap/Math.PI:a),l!==s&&(M?r<a+360:r<a)&&(u=i.startWidth.length>0?n(i.startWidth,i.currentRadius):i.startWidth,d=i.endWidth.length>0?n(i.endWidth,i.currentRadius):i.endWidth,a=b?a:[r,r=a][0],d=b?d:[u,u=d][0],y=((i.currentRadius-u/2)*(r*Math.PI/180)-i.roundedCornerRadius/4)/(i.currentRadius-u/2)*180/Math.PI,m=((i.currentRadius-d/2)*(a*Math.PI/180)+i.roundedCornerRadius/4)/(i.currentRadius-d/2)*180/Math.PI,p=(i.currentRadius*(r*Math.PI/180)+i.roundedCornerRadius)/i.currentRadius*180/Math.PI,g=(i.currentRadius*(a*Math.PI/180)-i.roundedCornerRadius)/i.currentRadius*180/Math.PI,i.roundedCornerRadius?h(new F(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,1,"0",P(o.midPoint,Math.floor(p),Math.ceil(g),Math.floor(y),Math.ceil(m),i.currentRadius,u,d),"","pointer-events:none;"),f,o):h(new F(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,1,"0",x(o.midPoint,Math.floor(r),Math.ceil(a),i.currentRadius,u,d),"","pointer-events:none;"),f,o))}),i.appendChild(f)},e.prototype.calculateRangeRadius=function(e,t){var i=null!==t.radius?t.radius:"100%";t.currentRadius=s(i,e.currentRadius)},e.prototype.setRangeColor=function(e){var t=(this.gauge.theme,["#50c917","#27d5ff","#fcde0b","#ffb133","#ff5985"]);e.ranges.map(function(e,i){e.rangeColor=e.color?e.color:t[i%t.length]})},e}(),pe=function(){function e(e){this.gauge=e}return e.prototype.drawPointers=function(e,t,i,o,n){var r=this;void 0===n&&(n=!0);var a,l,s=o.renderer.createGroup({id:o.element.id+"_Axis_Pointers_"+t});e.pointers.map(function(i,u){l=e.visibleRange,i.pathElement=[],r.calculatePointerRadius(e,i),a=o.renderer.createGroup({id:o.element.id+"_Axis_"+t+"_Pointer_"+u}),r["draw"+i.type+"Pointer"](e,t,u,a,o),r.setPointerValue(e,i,i.currentValue),s.appendChild(a),n&&r.doPointerAnimation(i,e)}),i.appendChild(s)},e.prototype.calculatePointerRadius=function(e,t){t.currentRadius=null===t.radius?e.currentRadius-(e.farSize+5):s(t.radius,e.currentRadius)},e.prototype.drawNeedlePointer=function(e,t,i,o,n){var r,a,l,u,d=e.pointers[i],p=n.midPoint,c=d.pointerWidth/2;a=f(0,d.currentRadius,p),l="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+p.y+" L "+p.x+" "+(p.y+c)+" Z",d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_Needle_"+i,d.color,d.border.width,d.border.color,null,"0",l),o,n)),r=s(d.needleTail.length,d.currentRadius),u="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c),r&&(a=f(180,r,n.midPoint),l="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c)+" Z",d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleTail_"+i,d.needleTail.color,d.needleTail.border.width,d.needleTail.border.color,null,"0",l),o,n)),u+=" L "+a.x+" "+(p.y+c)+" L "+a.x+" "+(p.y-c)),d.cap.radius&&d.pathElement.push(h(z(p,"Circle",new V(2*d.cap.radius,2*d.cap.radius),"",new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleCap_"+i,d.cap.color,d.cap.border.width,d.cap.border.color,null,"0","","")),o,n,"Ellipse")),d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleRect_"+i,"transparent",0,"transpanret",null,"0",u+" Z"),o,n))},e.prototype.setPointerValue=function(e,t,i){var o=this.gauge.midPoint,n="ClockWise"===e.direction,r=c(e.visibleRange.min,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n),a=c(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n);a=n?r===a?a+1:a:r===a?[r,r=a-1][0]:[r,r=a][0];var l,s,u,h,d=t.roundedCornerRadius,p=.25*d;i<=p&&(d=8,p=.25*(d/=2)),u=((t.currentRadius-t.pointerWidth/2)*(r*Math.PI/180)-d/p)/(t.currentRadius-t.pointerWidth/2)*180/Math.PI,h=((t.currentRadius-t.pointerWidth/2)*(a*Math.PI/180)+d/p)/(t.currentRadius-t.pointerWidth/2)*180/Math.PI,l=(t.currentRadius*(r*Math.PI/180)+d)/t.currentRadius*180/Math.PI,s=(t.currentRadius*(a*Math.PI/180)-d)/t.currentRadius*180/Math.PI,t.pathElement.map(function(p){"RangeBar"===t.type?t.roundedCornerRadius&&i?(p.setAttribute("d",P(o,l,s,u,h,t.currentRadius,t.pointerWidth,t.pointerWidth)),d=0):p.setAttribute("d",w(o,r,a,t.currentRadius,t.currentRadius-t.pointerWidth)):p.setAttribute("transform","rotate("+c(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n)+","+o.x+","+o.y+")"),p.setAttribute("aria-label",t.description||"Pointer:"+i.toString())})},e.prototype.drawMarkerPointer=function(e,t,i,o,n){var r=e.pointers[i],a=f(0,r.currentRadius,n.midPoint);r.pathElement.push(h(z(a,r.markerShape,new V(r.markerWidth,r.markerHeight),r.imageUrl,new F(n.element.id+"_Axis_"+t+"_Pointer_Marker_"+i,r.color,r.border.width,r.border.color,null,"0","","")),o,n,"Circle"===r.markerShape?"Ellipse":"Image"===r.markerShape?"Image":"Path"))},e.prototype.drawRangeBarPointer=function(e,t,i,o,n){var r=e.pointers[i];r.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_RangeBar_"+i,r.color,r.border.width,r.border.color,1,"0",""),o,n))},e.prototype.doPointerAnimation=function(e,t){var i=this,o=t.visibleRange.min,n=e.currentValue;e.animation.enable&&o!==n&&this.gauge.animatePointer&&e.pathElement.map(function(r){"RangeBar"===e.type?i.performRangeBarAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth):i.performNeedleAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth)})},e.prototype.performNeedleAnimation=function(e,i,o,n,r,a,l){var s,u=this,h="ClockWise"===n.direction,d=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),g=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),y=d>g?g+360:g;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){s=i<o||Math.round(d)===Math.round(y)?h?y-d:y-d-360:h?y-d-360:y-d,e.style.animation="None",e.setAttribute("transform","rotate("+p(t.timeStamp,d,s,t.duration)+","+u.gauge.midPoint.x.toString()+","+u.gauge.midPoint.y.toString()+")")},end:function(t){u.setPointerValue(n,r,o),("Marker"===r.type||e.id.indexOf("_Pointer_NeedleCap")>=0)&&u.gauge.trigger("animationComplete",{axis:n,pointer:r})}})},e.prototype.performRangeBarAnimation=function(e,i,o,n,r,a,l){var s,u=this,h="ClockWise"===n.direction,d=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),g=c(n.visibleRange.min,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),y=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),m=d>y?y+360:y;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){e.style.animation="None",s=i<o||Math.round(d)===Math.round(m)?h?m-d:m-d-360:h?m-d-360:m-d,h?e.setAttribute("d",w(u.gauge.midPoint,g,p(t.timeStamp,d,s,t.duration)+1e-4,a,l)):e.setAttribute("d",w(u.gauge.midPoint,p(t.timeStamp,d,s,t.duration),g+1e-4,a,l))},end:function(e){u.setPointerValue(n,r,o),u.gauge.trigger("animationComplete",{axis:n,pointer:r})}})},e}(),ce=function(){function e(e){this.gauge=e,this.axisRenderer=new de(e),this.pointerRenderer=new pe(e)}return e.prototype.measureAxis=function(e){this.measureAxisSize(this.gauge,e),this.calculateAxesRadius()},e.prototype.calculateAxesRadius=function(){for(var e,i,o=0,n=this.gauge.margin.left+this.gauge.margin.right,r=this.gauge.margin.top+this.gauge.margin.bottom,a=0,l=this.gauge.axes;a<l.length;a++){var u=l[a];if(e=Math.min(u.rect.width,u.rect.height)/2,i=null!=u.radius?s(u.radius,e):e,o=Math.max.apply(Math,u.ranges.map(function(e){return e.radius?e.radius.indexOf("%")<0?100:parseInt(e.radius,10):0})),i=o>100&&null==u.radius?100*i/o:i,u.currentRadius=i-u.nearSize,this.gauge.moveToCenter&&1===this.gauge.axes.length&&t.isNullOrUndefined(this.gauge.centerX)&&t.isNullOrUndefined(this.gauge.centerY)){var h=void 0,d=void 0,p=f((h=m(h=u.startAngle,u.endAngle)?[0,d=360][0]:h)-90,i,this.gauge.midPoint);d=u.endAngle;var c=f((d-=m(h,d)?1e-4:0)-90,i,this.gauge.midPoint),g=void 0,y=void 0,v=void 0,x=void 0,b=void 0,P=void 0,R=void 0;h>d&&!(Math.abs(h-d)>90)||(h>=270&&h<=360&&(d>270&&d<=360||d>=0&&d<=180)?(v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),R=d<=360&&d>=270?this.gauge.midPoint:d<=90?c:f(0,i,this.gauge.midPoint),x=Math.abs(R.x-this.gauge.gaugeRect.width),p=d<=360&&d>=270?c:f(270,i,this.gauge.midPoint),b=Math.abs(p.y-this.gauge.gaugeRect.y),c=d<=360&&d>=270||d>=0&&d<90?this.gauge.midPoint:d>=90&&d<=180?c:f(90,i,this.gauge.midPoint),P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):h>=0&&h<90&&d>=0&&d<=270?(b=Math.abs(p.y-this.gauge.gaugeRect.y),R=d>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(R.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height)),p=d>=180?c:this.gauge.midPoint,v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),c=d>=90?f(0,i,this.gauge.midPoint):c,x=Math.abs(c.x-this.gauge.gaugeRect.width)):h>=90&&h<180&&d>90&&d<=360?(R=d<=180?this.gauge.midPoint:d>=270?f(180,i,this.gauge.midPoint):c,v=Math.abs(R.x-this.gauge.gaugeRect.x),x=Math.abs(p.x-this.gauge.gaugeRect.width),p=d>270?f(d-90,i,this.gauge.midPoint):this.gauge.midPoint,b=Math.abs(this.gauge.gaugeRect.y-p.y),c=d>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):h>=180&&h<=270&&(d<=360&&d>=270||d<=180&&d>=0)&&(R=d>180&&d<270?c:f(180,i,this.gauge.midPoint),v=Math.abs(this.gauge.gaugeRect.x-Math.abs(R.x-this.gauge.gaugeRect.x)),R=d>=180&&d<=360?this.gauge.midPoint:c,x=Math.abs(R.x-this.gauge.gaugeRect.width),R=d>180&&d<270?this.gauge.midPoint:d>=270&&d<=360?c:f(270,i,this.gauge.midPoint),b=Math.abs(R.y-this.gauge.gaugeRect.y),P=Math.abs(p.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))),t.isNullOrUndefined(v)||t.isNullOrUndefined(x)||t.isNullOrUndefined(b)||t.isNullOrUndefined(P)||!(v>5||x>5)||!(b>5||P>5)||(g=Math.abs(v+x-n),y=Math.abs(b+P-r),this.gauge.midPoint.x=this.gauge.midPoint.x-v/2+x/2,this.gauge.midPoint.y=this.gauge.midPoint.y-b/2+P/2,e=Math.min(this.gauge.gaugeRect.width,this.gauge.gaugeRect.height)/2+Math.min(g,y)/2,u.currentRadius=(null!=u.radius?s(u.radius,e):e)-u.nearSize))}u.visibleRange.interval=this.calculateNumericInterval(u,u.rect),this.calculateVisibleLabels(u)}},e.prototype.measureAxisSize=function(e,t){var i,o=this;this.computeSize(e.axes,t),e.axes.map(function(e,n){i=d(n,o.farSizes.length-1,o.farSizes),e.rect=new D(t.x+i,t.y+i,t.width-2*i,t.height-2*i)})},e.prototype.calculateAxisValues=function(e){for(var t=0,i=this.gauge.axes;t<i.length;t++){var o=i[t];this.calculateVisibleRange(o,e),this.calculateVisibleLabels(o)}},e.prototype.calculateVisibleRange=function(e,t){var i=e.majorTicks.interval,o=Math.min(null===e.minimum?0:e.minimum,e.maximum),n=Math.max(e.minimum,null===e.maximum?100:e.maximum);e.pointers.map(function(t){t.currentValue=null!==t.value?t.value<o?o:t.value>n?n:t.value:o,o=null===e.minimum?Math.min(t.currentValue,o):o,n=null===e.maximum?Math.max(t.currentValue,n):n}),o=o===n?null!==i?o-i:o-1:o,e.visibleRange={min:o,max:n,interval:i},e.visibleRange.interval=this.calculateNumericInterval(e,t)},e.prototype.calculateNumericInterval=function(e,t){if(null!==e.majorTicks.interval)return e.majorTicks.interval;var i=e.endAngle-e.startAngle;return i=i<=0?i+360:i,this.calculateNiceInterval(e.visibleRange.max,e.visibleRange.min,e.currentRadius?e.currentRadius:t.width/2,i)},e.prototype.calculateNiceInterval=function(e,t,i,o){for(var n=e-t,r=2*Math.PI*i*(o/360),a=Math.max(.01599*r,1),l=n/a,s=Math.pow(10,Math.floor(Math.log(l)/Math.log(10))),u=0,h=[10,5,2,1];u<h.length;u++){var d=s*h[u];if(a<n/d)break;l=d}return l},e.prototype.calculateVisibleLabels=function(e){var t,i=e.labelStyle,o=i.format&&null!==i.format.match("{value}"),n=this.gauge.intl.getNumberFormat({format:k(i.format),useGrouping:this.gauge.useGroupingSeparator});e.visibleLabels=[];for(var r=e.visibleRange.min,a=e.visibleRange.interval,l=e.visibleRange.max;r<=l&&a;r+=a)t={cancel:!1,name:"axisLabelRender",axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(r)):n(r),value:r},this.gauge.trigger("axisLabelRender",t),t.cancel||e.visibleLabels.push(new H(t.text,r));this.getMaxLabelWidth(this.gauge,e)},e.prototype.computeSize=function(e,t){var i,o,n,r,a,l,s=0,u=0,h=0;this.farSizes=[],this.calculateAxisValues(t);for(var d=0,p=e;d<p.length;d++){var c=p[d];i=c.lineStyle.width/2,o=0,n=0,r="Outside"===c.majorTicks.position,s=c.majorTicks.offset,a="Outside"===c.minorTicks.position,u=c.minorTicks.offset,l="Outside"===c.labelStyle.position,h=c.labelStyle.offset,o+=r&&a&&l?0:5,o+=(r?c.majorTicks.height+i:0)+(l?c.maxLabelSize.height+10+h:0)+(a&&!r?c.minorTicks.height+i:0)+i,o+=r&&a?Math.max(s,u):r?s:a?u:0,n+=(r?0:c.majorTicks.height+i)+(l?0:c.maxLabelSize.height+10+h)+(!a&&r?c.minorTicks.height+i:0)+i,n+=r||a?r?a?0:u:s:Math.max(s,u),this.farSizes[this.farSizes.length-1]&&(this.farSizes[this.farSizes.length-1]+=n+o),c.nearSize=o-5,c.farSize=n,o=this.gauge.axes.length===this.farSizes.length+1?0:o,this.farSizes.push(o)}},e.prototype.renderAxes=function(e){var i=this;void 0===e&&(e=!0);var o,n=this.gauge,r=this.axisRenderer,a=n.renderer.createGroup({id:n.element.id+"_AxesCollection","clip-path":"url(#"+n.element.id+"_GaugeAreaClipRect_)"});n.element.appendChild(t.createElement("div",{id:n.element.id+"_Secondary_Element",styles:"position: relative"})),n.axes.map(function(t,l){o=n.renderer.createGroup({id:n.element.id+"_Axis_Group_"+l}),r.drawAxisOuterLine(t,l,o,n),r.drawAxisRange(t,l,o,n),r.drawAxisLine(t,l,o,n),r.drawMajorTickLines(t,l,o,n),r.drawMinorTickLines(t,l,o,n),r.drawAxisLabels(t,l,o,n),i.pointerRenderer.drawPointers(t,l,o,n,e),n.annotationsModule&&n.annotationsModule.renderAnnotation(t,l),a.appendChild(o)}),n.svgObject.appendChild(n.renderer.drawClipPath({id:n.element.id+"_GaugeAreaClipRect_",x:0,y:0,width:n.availableSize.width,height:n.availableSize.height,fill:"transparent",stroke:"transparent"})),n.svgObject.appendChild(a)},e.prototype.getMaxLabelWidth=function(e,t){t.maxLabelSize=new V(0,0);for(var i=0,n=t.visibleLabels;i<n.length;i++){var r=n[i];r.size=o(r.text,t.labelStyle.font),t.maxLabelSize.width=r.size.width>t.maxLabelSize.width?r.size.width:t.maxLabelSize.width,t.maxLabelSize.height=r.size.height>t.maxLabelSize.height?r.size.height:t.maxLabelSize.height}},e}(),ge=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),ye=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},me=function(e){function i(t,i){return e.call(this,t,i)||this}return ge(i,e),i.prototype.preRender=function(){this.unWireEvents(),this.trigger("load",{gauge:this}),this.themeEffect(),this.initPrivateVariable(),this.setCulture(),this.createSvg(),this.wireEvents()},i.prototype.themeEffect=function(){var e=this.theme.toLowerCase();if("highcontrast"===e)this.titleStyle.color=this.titleStyle.color||"#FFFFFF",this.setThemeColors("#FFFFFF","#FFFFFF");else if(e.indexOf("dark")>-1)for(var t=0,i=this.axes;t<i.length;t++){var o=i[t];o.labelStyle.font.color=o.labelStyle.font.color||"#DADADA ",o.majorTicks.color=o.majorTicks.color||"#C8C8C8",o.minorTicks.color=o.minorTicks.color||"#9A9A9A";for(var n=0,r=o.pointers;n<r.length;n++){var a=r[n];a.color=a.color||"#DADADA",a.needleTail.color=a.needleTail.color||"#9A9A9A",a.needleTail.border.color=a.needleTail.border.color||"#9A9A9A",a.cap.color=a.cap.color||"#9A9A9A",a.cap.border.color=a.cap.border.color||"#9A9A9A"}}else this.titleStyle.color=this.titleStyle.color||"#424242",this.setThemeColors("#212121","#757575")},i.prototype.setThemeColors=function(e,t){for(var i=0,o=this.axes;i<o.length;i++){var n=o[i];n.lineStyle.color=n.lineStyle.color||t,n.labelStyle.font.color=n.labelStyle.font.color||e,n.majorTicks.color=n.majorTicks.color||t,n.minorTicks.color=n.minorTicks.color||t;for(var r=0,a=n.pointers;r<a.length;r++){var l=a[r];l.color=l.color||t,l.needleTail.color=l.needleTail.color||t,l.needleTail.border.color=l.needleTail.border.color||t,l.cap.color=l.cap.color||t,l.cap.border.color=l.cap.border.color||t}}},i.prototype.render=function(){this.calculateBounds(),this.renderElements()},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMove),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEnd),t.EventHandler.remove(this.element,"contextmenu",this.gaugeRightClick),t.EventHandler.remove(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize)},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown,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,"contextmenu",this.gaugeRightClick,this),t.EventHandler.add(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize.bind(this)),this.setGaugeStyle(this.element)},i.prototype.mouseMove=function(e){var i=this.getMouseArgs(e,"touchmove","gaugeMouseMove");this.trigger("gaugeMouseMove",i);var o;this.tooltipModule;return i.cancel||this.enablePointerDrag&&this.activePointer&&(o={axis:this.activeAxis,pointer:this.activePointer,previousValue:this.activePointer.currentValue,name:"dragMove",currentValue:null},this.pointerDrag(new N(i.x,i.y)),o.currentValue=this.activePointer.currentValue,this.trigger("dragMove",o)),this.notify(t.Browser.touchMoveEvent,e),!1},i.prototype.mouseLeave=function(e){this.activeAxis=null,this.activePointer=null,this.svgObject.setAttribute("cursor","auto");var t=this.getMouseArgs(e,"touchmove","gaugeMouseLeave");return this.trigger("gaugeMouseLeave",t),!1},i.prototype.gaugeRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},i.prototype.pointerDrag=function(e){var t=this.activeAxis,i=t.visibleRange,o=y(v(this.midPoint,e),i.max,i.min,t.startAngle,t.endAngle,"ClockWise"===t.direction);o>=i.min&&o<=i.max&&(this.activePointer.currentValue=o,this.activePointer.value=o,this.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(t,this.activePointer,o))},i.prototype.gaugeOnMouseDown=function(e){var t,i=this.getMouseArgs(e,"touchstart","gaugeMouseDown");return this.trigger("gaugeMouseDown",i),!i.cancel&&i.target.id.indexOf("_Pointer_")>=0&&i.target.id.indexOf(this.element.id+"_Axis_")>=0&&(t=L(i.target.id,this),this.activeAxis=this.axes[t.axisIndex],this.activePointer=this.activeAxis.pointers[t.pointerIndex],this.trigger("dragStart",{axis:this.activeAxis,name:"dragStart",pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.svgObject.setAttribute("cursor","pointer")),!1},i.prototype.mouseEnd=function(e){var i=this.getMouseArgs(e,"touchend","gaugeMouseUp");"touch"===e.pointerType||"2"===e.pointerType||e.type,this.tooltipModule;return this.trigger("gaugeMouseUp",i),this.activeAxis&&this.activePointer&&(this.trigger("dragEnd",{name:"dragEnd",axis:this.activeAxis,pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.activeAxis=null,this.activePointer=null),this.svgObject.setAttribute("cursor","auto"),this.notify(t.Browser.touchEndEvent,e),!1},i.prototype.getMouseArgs=function(e,t,i){var o=this.element.getBoundingClientRect(),n=new N(-o.left,-o.top),r=e.type===t;return n.x+=r?e.changedTouches[0].clientX:e.clientX,n.y+=r?e.changedTouches[0].clientY:e.clientY,{cancel:!1,name:i,x:n.x,y:n.y,target:e.target}},i.prototype.gaugeResize=function(e){var t=this,i={gauge:this,previousSize:new V(this.availableSize.width,this.availableSize.height),name:"resized",currentSize:new V(0,0)};return this.animatePointer=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.element.classList.contains("e-circulargauge")&&(this.resizeTo=window.setTimeout(function(){t.createSvg(),t.calculateBounds(),t.renderElements(),i.currentSize=t.availableSize,t.trigger("resized",i)},500)),!1},i.prototype.setGaugeStyle=function(e){e.style.touchAction=this.enablePointerDrag?"none":"element",e.style.msTouchAction=this.enablePointerDrag?"none":"element",e.style.msContentZooming="none",e.style.msUserSelect="none",e.style.webkitUserSelect="none",e.style.position="relative"},i.prototype.setCulture=function(){this.intl=new t.Internationalization},i.prototype.createSvg=function(){this.removeSvg(),this.calculateSvgSize(),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},i.prototype.removeSvg=function(){if(E(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)}},i.prototype.initPrivateVariable=function(){this.renderer=new t.SvgRenderer(this.element.id),this.gaugeAxisLayoutPanel=new ce(this),this.animatePointer=!0},i.prototype.calculateSvgSize=function(){var e=this.element.offsetWidth,t=this.element.offsetHeight,i=s(this.width,e)||e||600,o=s(this.height,t)||t||450;this.availableSize=new V(i,o)},i.prototype.calculateBounds=function(){var e,i=this.margin,n=0;this.title&&(n=o(this.title,this.titleStyle).height+5);var r=i.top+n+this.border.width,a=i.left+this.border.width,l=this.availableSize.width-a-i.right-this.border.width,u=this.availableSize.height-r-this.border.width-i.bottom,h=Math.min(l,u)/2;e=this.moveToCenter&&1===this.axes.length&&t.isNullOrUndefined(this.centerX)&&t.isNullOrUndefined(this.centerY)?new D(a,r,l,u):new D(a+l/2-h,r+u/2-h,2*h,2*h),this.gaugeRect=e;var d=null!==this.centerX?s(this.centerX,this.availableSize.width):e.x+e.width/2,p=null!==this.centerY?s(this.centerY,this.availableSize.height):e.y+e.height/2;this.midPoint=new N(d,p),this.gaugeAxisLayoutPanel.measureAxis(e)},i.prototype.renderElements=function(e){void 0===e&&(e=!0),this.renderBorder(),this.renderTitle(),this.gaugeAxisLayoutPanel.renderAxes(e),this.element.appendChild(this.svgObject),this.trigger("loaded",{gauge:this})},i.prototype.renderTitle=function(){if(this.title){var e=o(this.title,this.titleStyle),t=u(new G(this.element.id+"_CircularGaugeTitle",this.availableSize.width/2,this.margin.top+e.height/4*3,"middle",this.title),this.titleStyle,this.titleStyle.color,this.svgObject,"");t.setAttribute("aria-label",this.description||this.title),t.setAttribute("tabindex",this.tabIndex.toString())}},i.prototype.renderBorder=function(){var e=this.border.width;(e>0||null!==this.background&&"transparent"!==this.background)&&this.svgObject.appendChild(this.renderer.drawRectangle(new W(this.element.id+"_CircularGaugeBorder",this.background,this.border,null,new D(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))))},i.prototype.setPointerValue=function(e,t,i){var o=this,n=this.axes[e],r=n.pointers[t],l=r.currentRadius,s=r.animation.enable;i=i<n.visibleRange.min?n.visibleRange.min:i,i=i>n.visibleRange.max?n.visibleRange.max:i,r.pathElement.map(function(e){"RangeBar"===r.type?(a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i)):(e.id.indexOf("_Pointer_NeedleCap_")>=0?a(e,r.cap.color,r.cap.border):e.id.indexOf("_Pointer_NeedleTail_")>=0?a(e,r.needleTail.color,r.needleTail.border):e.id.indexOf("_Pointer_NeedleRect_")>=0?a(e,"transparent",{color:"transparent",width:0}):a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i))}),r.currentValue=i,r.value=i},i.prototype.setAnnotationValue=function(e,i,o){var n=null!==_(this.element.id+"_Annotations_"+e),r=_(this.element.id+"_Annotations_"+e)||t.createElement("div",{id:this.element.id+"_Annotations_"+e}),a=this.axes[e].annotations[i];null!==o&&(E(this.element.id+"_Axis_"+e+"_Annotation_"+i),a.content=o,this.annotationsModule.createTemplate(r,i,e),n||_(this.element.id+"_Secondary_Element").appendChild(r))},i.prototype.setRangeValue=function(e,t,i,o){var r,l=_(this.element.id+"_Axis_"+e+"_Range_"+t),s=this.axes[e],u=s.ranges[t],h=s.visibleRange,d="ClockWise"===s.direction,p=Math.min(Math.max(i,h.min),o),g=Math.min(Math.max(i,o),h.max),y=c(p,h.max,h.min,s.startAngle,s.endAngle,d),m=c(g,h.max,h.min,s.startAngle,s.endAngle,d);r=u.startWidth.length>0?n(u.startWidth,u.currentRadius):u.startWidth;var v;v=u.endWidth.length>0?n(u.endWidth,u.currentRadius):u.endWidth,m=d?m:[y,y=m][0],v=d?v:[r,r=v][0],l.setAttribute("d",x(this.midPoint,Math.round(y),Math.round(m),u.currentRadius,r,v)),a(l,u.color?u.color:u.rangeColor,{color:u.color?u.color:u.rangeColor,width:0})},i.prototype.destroy=function(){this.unWireEvents(),this.removeSvg(),e.prototype.destroy.call(this)},i.prototype.requiredModules=function(){var e=[],t=!1;return this.axes.map(function(e){e.annotations.map(function(e){t=t||null!==e.content})}),t&&e.push({member:"Annotations",args:[this,ue]}),this.tooltip.enable&&e.push({member:"Tooltip",args:[this,he]}),e},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.onPropertyChanged=function(e,t){for(var i=!1,o=!1,n=!1,r=0,a=Object.keys(e);r<a.length;r++)switch(a[r]){case"height":case"width":case"centerX":case"centerY":case"margin":this.createSvg(),o=!0;break;case"title":o=""===e.title||""===t.title,i=!(""===e.title||""===t.title);break;case"titleStyle":e.titleStyle&&e.titleStyle.size?o=!0:i=!0;break;case"border":case"background":i=!0;break;case"axes":n=!0}!o&&i&&(this.removeSvg(),this.renderElements()),o&&(this.removeSvg(),this.calculateBounds(),this.renderElements()),!n||i||o||(this.removeSvg(),this.calculateBounds(),this.renderElements(!1))},i.prototype.getModuleName=function(){return"circulargauge"},ye([t.Property(null)],i.prototype,"width",void 0),ye([t.Property(null)],i.prototype,"height",void 0),ye([t.Complex({color:"transparent",width:0},Y)],i.prototype,"border",void 0),ye([t.Property("transparent")],i.prototype,"background",void 0),ye([t.Property("")],i.prototype,"title",void 0),ye([t.Complex({size:"15px",color:null},Z)],i.prototype,"titleStyle",void 0),ye([t.Complex({},q)],i.prototype,"margin",void 0),ye([t.Collection([{}],se)],i.prototype,"axes",void 0),ye([t.Complex({},J)],i.prototype,"tooltip",void 0),ye([t.Property(!1)],i.prototype,"enablePointerDrag",void 0),ye([t.Property(null)],i.prototype,"centerX",void 0),ye([t.Property(null)],i.prototype,"centerY",void 0),ye([t.Property(!1)],i.prototype,"moveToCenter",void 0),ye([t.Property("Material")],i.prototype,"theme",void 0),ye([t.Property(!1)],i.prototype,"useGroupingSeparator",void 0),ye([t.Property(null)],i.prototype,"description",void 0),ye([t.Property(1)],i.prototype,"tabIndex",void 0),ye([t.Event()],i.prototype,"loaded",void 0),ye([t.Event()],i.prototype,"load",void 0),ye([t.Event()],i.prototype,"animationComplete",void 0),ye([t.Event()],i.prototype,"axisLabelRender",void 0),ye([t.Event()],i.prototype,"annotationRender",void 0),ye([t.Event()],i.prototype,"tooltipRender",void 0),ye([t.Event()],i.prototype,"dragStart",void 0),ye([t.Event()],i.prototype,"dragMove",void 0),ye([t.Event()],i.prototype,"dragEnd",void 0),ye([t.Event()],i.prototype,"gaugeMouseMove",void 0),ye([t.Event()],i.prototype,"gaugeMouseLeave",void 0),ye([t.Event()],i.prototype,"gaugeMouseDown",void 0),ye([t.Event()],i.prototype,"gaugeMouseUp",void 0),ye([t.Event()],i.prototype,"resized",void 0),i=ye([t.NotifyPropertyChanges],i)}(t.Component);return e.CircularGauge=me,e.Annotations=ue,e.Line=$,e.Label=ee,e.Range=te,e.Tick=ie,e.Cap=oe,e.NeedleTail=ne,e.Animation=re,e.Annotation=ae,e.Pointer=le,e.Axis=se,e.Border=Y,e.Font=Z,e.Margin=q,e.TooltipSettings=J,e.GaugeTooltip=he,e.measureText=o,e.toPixel=n,e.getFontStyle=r,e.setStyles=a,e.measureElementRect=l,e.stringToNumber=s,e.textElement=u,e.appendPath=h,e.calculateSum=d,e.linear=p,e.getAngleFromValue=c,e.getDegree=g,e.getValueFromAngle=y,e.isCompleteAngle=m,e.getAngleFromLocation=v,e.getLocationFromAngle=f,e.getPathArc=x,e.getRangePath=b,e.getRoundedPathArc=P,e.getRoundedPath=R,e.getCompleteArc=w,e.getCirclePath=A,e.getCompletePath=M,e.getElement=_,e.getTemplateFunction=C,e.getElementSize=S,e.removeElement=E,e.getPointer=L,e.getMousePosition=T,e.getLabelFormat=k,e.calculateShapes=z,e.getRangeColor=O,e.CustomizeOption=B,e.PathOption=F,e.RectOption=W,e.Size=V,e.GaugeLocation=N,e.Rect=D,e.TextOption=G,e.VisibleLabels=H,e}({},ej.base,ej.svgbase),this.ejs=ej;
//# sourceMappingURL=ej2-circulargauge.min.js.map
/*!
* filename: index.d.ts
* version : 16.3.34
* version : 16.4.40-beta
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"name": "@syncfusion/ej2-circulargauge",
"version": "16.3.34",
"version": "16.4.40-beta",
"description": "Essential JS 2 CircularGauge Components",

@@ -8,5 +8,5 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-base": "~16.3.34",
"@syncfusion/ej2-svg-base": "~16.3.34",
"@syncfusion/ej2-popups": "~16.3.34"
"@syncfusion/ej2-base": "~16.4.40-beta",
"@syncfusion/ej2-svg-base": "~16.4.40-beta",
"@syncfusion/ej2-popups": "~16.4.40-beta"
},

@@ -13,0 +13,0 @@ "devDependencies": {

@@ -21,3 +21,3 @@ # ej2-circulargauge

* [View Online Demos](https://ej2.syncfusion.com/demos/?utm_source=npm&utm_campaign=circulargauge#/material/circulargauge/default.html)
* [Product Page](https://www.syncfusion.com/javascript-ui-controls/gauge-charts)
* [Product Page](https://www.syncfusion.com/products/javascript/circulargauge)

@@ -33,3 +33,3 @@ ## Supported Frameworks

5. [ASP.NET MVC](https://aspnetmvc.syncfusion.com/CircularGauge/DefaultFunctionalities#/material)
6. [JavaScript (ES5)](https://www.syncfusion.com/javascript-ui-controls/gauge-charts)
6. [JavaScript (ES5)](https://www.syncfusion.com/products/javascript/circulargauge)

@@ -36,0 +36,0 @@ ## Use case samples

@@ -544,2 +544,14 @@ import { Property, Complex, ChildProperty, Collection } from '@syncfusion/ej2-base';import { Font, Border } from '../model/base';import { Position, PointerType, GaugeDirection, HiddenLabel, GaugeShape } from '../utils/enum';import { FontModel, BorderModel } from '../model/base-model';import { Size, Rect, VisibleLabels } from '../utils/helper';import { Theme } from '../model/theme';

/**
* Specifies the range gap property by pixel value.
* @default null
*/
rangeGap?: number;
/**
* Specifies the start and end range gap.
* @default false
*/
startAndEndRangeGap?: boolean;
/**
* Options to customize the axis label.

@@ -546,0 +558,0 @@ */

@@ -65,56 +65,61 @@ import { createElement, isNullOrUndefined } from '@syncfusion/ej2-base';

var newPoint = void 0;
if ((startAngle >= 270 && startAngle <= 360) && ((endAngle > 270 && endAngle <= 360) ||
(endAngle >= 0 && endAngle <= 180))) {
startXDiff = Math.abs(this.gauge.gaugeRect.x - Math.abs(startPoint.x - this.gauge.gaugeRect.x));
newPoint = (endAngle <= 360 && endAngle >= 270) ? this.gauge.midPoint : (endAngle <= 90) ? endPoint :
getLocationFromAngle(90 - 90, currentRadius, this.gauge.midPoint);
endXDiff = Math.abs(newPoint.x - this.gauge.gaugeRect.width);
startPoint = (endAngle <= 360 && endAngle >= 270) ? endPoint :
getLocationFromAngle(360 - 90, currentRadius, this.gauge.midPoint);
startYDiff = Math.abs(startPoint.y - this.gauge.gaugeRect.y);
endPoint = (endAngle <= 360 && endAngle >= 270 || (endAngle >= 0 && endAngle < 90)) ?
this.gauge.midPoint : (endAngle >= 90 && endAngle <= 180) ? endPoint :
getLocationFromAngle(180 - 90, currentRadius, this.gauge.midPoint);
endYDiff = Math.abs(endPoint.y - (this.gauge.gaugeRect.y + this.gauge.gaugeRect.height));
if (startAngle > endAngle ? Math.abs(startAngle - endAngle) > 90 ? true : false : true) {
if ((startAngle >= 270 && startAngle <= 360) && ((endAngle > 270 && endAngle <= 360) ||
(endAngle >= 0 && endAngle <= 180))) {
startXDiff = Math.abs(this.gauge.gaugeRect.x - Math.abs(startPoint.x - this.gauge.gaugeRect.x));
newPoint = (endAngle <= 360 && endAngle >= 270) ? this.gauge.midPoint : (endAngle <= 90) ? endPoint :
getLocationFromAngle(90 - 90, currentRadius, this.gauge.midPoint);
endXDiff = Math.abs(newPoint.x - this.gauge.gaugeRect.width);
startPoint = (endAngle <= 360 && endAngle >= 270) ? endPoint :
getLocationFromAngle(360 - 90, currentRadius, this.gauge.midPoint);
startYDiff = Math.abs(startPoint.y - this.gauge.gaugeRect.y);
endPoint = (endAngle <= 360 && endAngle >= 270 || (endAngle >= 0 && endAngle < 90)) ?
this.gauge.midPoint : (endAngle >= 90 && endAngle <= 180) ? endPoint :
getLocationFromAngle(180 - 90, currentRadius, this.gauge.midPoint);
endYDiff = Math.abs(endPoint.y - (this.gauge.gaugeRect.y + this.gauge.gaugeRect.height));
}
else if ((startAngle >= 0 && startAngle < 90) && (endAngle >= 0 && endAngle <= 270)) {
startYDiff = Math.abs(startPoint.y - this.gauge.gaugeRect.y);
newPoint = (endAngle >= 180) ? getLocationFromAngle(180 - 90, currentRadius, this.gauge.midPoint) :
endPoint;
endYDiff = Math.abs(newPoint.y - (this.gauge.gaugeRect.y + this.gauge.gaugeRect.height));
startPoint = (endAngle >= 180) ? endPoint : this.gauge.midPoint;
startXDiff = Math.abs(this.gauge.gaugeRect.x - Math.abs(startPoint.x - this.gauge.gaugeRect.x));
endPoint = (endAngle >= 90) ? getLocationFromAngle(90 - 90, currentRadius, this.gauge.midPoint) : endPoint;
endXDiff = Math.abs(endPoint.x - this.gauge.gaugeRect.width);
}
else if ((startAngle >= 90 && startAngle < 180) && (endAngle > 90 && endAngle <= 360)) {
newPoint = (endAngle <= 180) ? this.gauge.midPoint : (endAngle >= 270) ?
getLocationFromAngle(270 - 90, currentRadius, this.gauge.midPoint) : endPoint;
startXDiff = Math.abs(newPoint.x - this.gauge.gaugeRect.x);
endXDiff = Math.abs(startPoint.x - this.gauge.gaugeRect.width);
startPoint = (endAngle > 270) ? getLocationFromAngle(endAngle - 90, currentRadius, this.gauge.midPoint) :
this.gauge.midPoint;
startYDiff = Math.abs(this.gauge.gaugeRect.y - startPoint.y);
endPoint = (endAngle >= 180) ? getLocationFromAngle(180 - 90, currentRadius, this.gauge.midPoint) : endPoint;
endYDiff = Math.abs(endPoint.y - (this.gauge.gaugeRect.y + this.gauge.gaugeRect.height));
}
else if ((startAngle >= 180 && startAngle <= 270) && ((endAngle <= 360 && endAngle >= 270) ||
(endAngle <= 180 && endAngle >= 0))) {
newPoint = (endAngle > 180 && endAngle < 270) ? endPoint :
getLocationFromAngle(270 - 90, currentRadius, this.gauge.midPoint);
startXDiff = Math.abs(this.gauge.gaugeRect.x - Math.abs(newPoint.x - this.gauge.gaugeRect.x));
newPoint = (endAngle >= 180 && endAngle <= 360) ? this.gauge.midPoint : endPoint;
endXDiff = Math.abs(newPoint.x - this.gauge.gaugeRect.width);
newPoint = (endAngle > 180 && endAngle < 270) ? this.gauge.midPoint : (endAngle >= 270 && endAngle <= 360) ?
endPoint : getLocationFromAngle(360 - 90, currentRadius, this.gauge.midPoint);
startYDiff = Math.abs(newPoint.y - this.gauge.gaugeRect.y);
endYDiff = Math.abs(startPoint.y - (this.gauge.gaugeRect.y + this.gauge.gaugeRect.height));
}
if ((!isNullOrUndefined(startXDiff) && !isNullOrUndefined(endXDiff) && !isNullOrUndefined(startYDiff) &&
!isNullOrUndefined(endYDiff)) && ((startXDiff > 5 || endXDiff > 5) && (startYDiff > 5 || endYDiff > 5))) {
xDiff = Math.abs((startXDiff + endXDiff) - xMarginDiff);
yDiff = Math.abs((startYDiff + endYDiff) - yMarginDiff);
this.gauge.midPoint.x = this.gauge.midPoint.x - (startXDiff / 2) + (endXDiff / 2);
this.gauge.midPoint.y = this.gauge.midPoint.y - (startYDiff / 2) + (endYDiff / 2);
totalRadius = (Math.min(this.gauge.gaugeRect.width, this.gauge.gaugeRect.height) / 2) +
(Math.min(xDiff, yDiff) / 2);
axis.currentRadius = (axis.radius != null ? stringToNumber(axis.radius, totalRadius) : totalRadius) - axis.nearSize;
}
}
else if ((startAngle >= 0 && startAngle < 90) && (endAngle >= 0 && endAngle <= 270)) {
startYDiff = Math.abs(startPoint.y - this.gauge.gaugeRect.y);
newPoint = (endAngle >= 180) ? getLocationFromAngle(180 - 90, currentRadius, this.gauge.midPoint) :
endPoint;
endYDiff = Math.abs(newPoint.y - (this.gauge.gaugeRect.y + this.gauge.gaugeRect.height));
startPoint = (endAngle >= 180) ? endPoint : this.gauge.midPoint;
startXDiff = Math.abs(this.gauge.gaugeRect.x - Math.abs(startPoint.x - this.gauge.gaugeRect.x));
endPoint = (endAngle >= 90) ? getLocationFromAngle(90 - 90, currentRadius, this.gauge.midPoint) : endPoint;
endXDiff = Math.abs(endPoint.x - this.gauge.gaugeRect.width);
}
else if ((startAngle >= 90 && startAngle < 180) && (endAngle > 90 && endAngle <= 360)) {
newPoint = (endAngle <= 180) ? this.gauge.midPoint : (endAngle >= 270) ?
getLocationFromAngle(270 - 90, currentRadius, this.gauge.midPoint) : endPoint;
startXDiff = Math.abs(newPoint.x - this.gauge.gaugeRect.x);
endXDiff = Math.abs(startPoint.x - this.gauge.gaugeRect.width);
startPoint = (endAngle > 270) ? getLocationFromAngle(endAngle - 90, currentRadius, this.gauge.midPoint) :
this.gauge.midPoint;
startYDiff = Math.abs(this.gauge.gaugeRect.y - startPoint.y);
endPoint = (endAngle >= 180) ? getLocationFromAngle(180 - 90, currentRadius, this.gauge.midPoint) : endPoint;
endYDiff = Math.abs(endPoint.y - (this.gauge.gaugeRect.y + this.gauge.gaugeRect.height));
}
else if ((startAngle >= 180 && startAngle <= 270) && ((endAngle <= 360 && endAngle >= 270) ||
(endAngle <= 90 && endAngle >= 0))) {
newPoint = (endAngle > 180 && endAngle < 270) ? endPoint :
getLocationFromAngle(270 - 90, currentRadius, this.gauge.midPoint);
startXDiff = Math.abs(this.gauge.gaugeRect.x - Math.abs(newPoint.x - this.gauge.gaugeRect.x));
newPoint = (endAngle >= 180 && endAngle <= 360) ? this.gauge.midPoint : endPoint;
endXDiff = Math.abs(newPoint.x - this.gauge.gaugeRect.width);
newPoint = (endAngle > 180 && endAngle < 270) ? this.gauge.midPoint : (endAngle >= 270 && endAngle <= 360) ? endPoint :
getLocationFromAngle(360 - 90, currentRadius, this.gauge.midPoint);
startYDiff = Math.abs(newPoint.y - this.gauge.gaugeRect.y);
endYDiff = Math.abs(startPoint.y - (this.gauge.gaugeRect.y + this.gauge.gaugeRect.height));
}
xDiff = Math.abs((startXDiff + endXDiff) - xMarginDiff);
yDiff = Math.abs((startYDiff + endYDiff) - yMarginDiff);
this.gauge.midPoint.x = this.gauge.midPoint.x - (startXDiff / 2) + (endXDiff / 2);
this.gauge.midPoint.y = this.gauge.midPoint.y - (startYDiff / 2) + (endYDiff / 2);
totalRadius = (Math.min(this.gauge.gaugeRect.width, this.gauge.gaugeRect.height) / 2) +
(Math.min(xDiff, yDiff) / 2);
axis.currentRadius = (axis.radius != null ? stringToNumber(axis.radius, totalRadius) : totalRadius) - axis.nearSize;
}

@@ -121,0 +126,0 @@ axis.visibleRange.interval = this.calculateNumericInterval(axis, axis.rect);

@@ -183,5 +183,11 @@ import { getLocationFromAngle, PathOption, stringToNumber, TextOption, textElement, appendPath, toPixel } from '../utils/helper';

endValue = Math.min(Math.max(range.start, range.end), max);
if (startValue !== endValue) {
startAngle = getAngleFromValue(startValue, max, min, axis.startAngle, axis.endAngle, isClockWise);
endAngle = getAngleFromValue(endValue, max, min, axis.startAngle, axis.endAngle, isClockWise);
startAngle = getAngleFromValue(startValue, max, min, axis.startAngle, axis.endAngle, isClockWise);
endAngle = getAngleFromValue(endValue, max, min, axis.startAngle, axis.endAngle, isClockWise);
var isAngleCross360 = (startAngle > endAngle);
if (axis.rangeGap != null && axis.rangeGap > 0) {
startAngle = (rangeIndex === 0 && !axis.startAndEndRangeGap) ? startAngle : startAngle + (axis.rangeGap / Math.PI);
endAngle = (rangeIndex === axis.ranges.length - 1 && !axis.startAndEndRangeGap) ? endAngle : endAngle -
(axis.rangeGap / Math.PI);
}
if ((startValue !== endValue) && (isAngleCross360 ? startAngle < (endAngle + 360) : (startAngle < endAngle))) {
if (range.startWidth.length > 0) {

@@ -188,0 +194,0 @@ startWidth = toPixel(range.startWidth, range.currentRadius);

@@ -417,2 +417,12 @@ import { ChildProperty } from '@syncfusion/ej2-base';

/**
* Specifies the range gap property by pixel value.
* @default null
*/
rangeGap: number;
/**
* Specifies the start and end range gap.
* @default false
*/
startAndEndRangeGap: boolean;
/**
* Options to customize the axis label.

@@ -419,0 +429,0 @@ */

@@ -340,2 +340,8 @@ var __extends = (this && this.__extends) || (function () {

__decorate([
Property(null)
], Axis.prototype, "rangeGap", void 0);
__decorate([
Property(false)
], Axis.prototype, "startAndEndRangeGap", void 0);
__decorate([
Complex({}, Label)

@@ -342,0 +348,0 @@ ], Axis.prototype, "labelStyle", void 0);

@@ -113,14 +113,22 @@ import { stringToNumber, Size, calculateShapes, appendPath } from '../utils/helper';

var oldEnd;
var radius = pointer.roundedCornerRadius;
var process = radius * 0.25;
if (value <= process) {
radius = value === 1 || 2 ? 8 : radius;
radius /= 2;
process = radius * 0.25;
}
oldStart = ((((pointer.currentRadius - (pointer.pointerWidth / 2)) * ((startAngle * Math.PI) / 180) -
(pointer.roundedCornerRadius / 4)) / (pointer.currentRadius - (pointer.pointerWidth / 2))) * 180) / Math.PI;
(radius / process)) / (pointer.currentRadius - (pointer.pointerWidth / 2))) * 180) / Math.PI;
oldEnd = ((((pointer.currentRadius - (pointer.pointerWidth / 2)) * ((endAngle * Math.PI) / 180) +
(pointer.roundedCornerRadius / 4)) / (pointer.currentRadius - (pointer.pointerWidth / 2))) * 180) / Math.PI;
(radius / process)) / (pointer.currentRadius - (pointer.pointerWidth / 2))) * 180) / Math.PI;
roundedStartAngle = ((((pointer.currentRadius) * ((startAngle * Math.PI) / 180) +
pointer.roundedCornerRadius) / (pointer.currentRadius)) * 180) / Math.PI;
radius) / (pointer.currentRadius)) * 180) / Math.PI;
roundedEndAngle = ((((pointer.currentRadius) * ((endAngle * Math.PI) / 180) -
pointer.roundedCornerRadius) / (pointer.currentRadius)) * 180) / Math.PI;
radius) / (pointer.currentRadius)) * 180) / Math.PI;
pointer.pathElement.map(function (element) {
if (pointer.type === 'RangeBar') {
if (pointer.roundedCornerRadius) {
if (pointer.roundedCornerRadius && value) {
element.setAttribute('d', getRoundedPathArc(location, roundedStartAngle, roundedEndAngle, oldStart, oldEnd, pointer.currentRadius, pointer.pointerWidth, pointer.pointerWidth));
radius = 0;
}

@@ -127,0 +135,0 @@ else {

@@ -69,6 +69,23 @@ var __extends = (this && this.__extends) || (function () {

CircularGauge.prototype.themeEffect = function () {
if (this.theme === 'Highcontrast') {
var themes = this.theme.toLowerCase();
if (themes === 'highcontrast') {
this.titleStyle.color = this.titleStyle.color || '#FFFFFF';
this.setThemeColors('#FFFFFF', '#FFFFFF');
}
else if (themes.indexOf('dark') > -1) {
for (var _i = 0, _a = this.axes; _i < _a.length; _i++) {
var axis = _a[_i];
axis.labelStyle.font.color = axis.labelStyle.font.color || '#DADADA ';
axis.majorTicks.color = axis.majorTicks.color || '#C8C8C8';
axis.minorTicks.color = axis.minorTicks.color || '#9A9A9A';
for (var _b = 0, _c = axis.pointers; _b < _c.length; _b++) {
var pointer = _c[_b];
pointer.color = pointer.color || '#DADADA';
pointer.needleTail.color = pointer.needleTail.color || '#9A9A9A';
pointer.needleTail.border.color = pointer.needleTail.border.color || '#9A9A9A';
pointer.cap.color = pointer.cap.color || '#9A9A9A';
pointer.cap.border.color = pointer.cap.border.color || '#9A9A9A';
}
}
}
else {

@@ -75,0 +92,0 @@ this.titleStyle.color = this.titleStyle.color || '#424242';

@@ -113,3 +113,5 @@ import { Tooltip } from '@syncfusion/ej2-svg-base';

if (!tooltipArgs.cancel && !samePointerEle) {
tooltipArgs['tooltip']['properties']['textStyle']['color'] = (this.gauge.theme === 'Highcontrast') ? '#00000' : '#FFFFFF';
var themes = this.gauge.theme.toLowerCase();
var tooltipColor = (themes.indexOf('dark') > -1 || themes === 'highcontrast') ? '#00000' : '#FFFFFF';
tooltipArgs['tooltip']['properties']['textStyle']['color'] = tooltipColor;
this.svgTooltip = new Tooltip({

@@ -124,6 +126,5 @@ enable: true,

areaBounds: this.tooltipRect,
fill: (this.gauge.theme === 'Highcontrast') ? '#FFFFFF' : tooltipArgs.tooltip.fill,
fill: (themes.indexOf('dark') > -1 || themes === 'highcontrast') ? '#FFFFFF' : tooltipArgs.tooltip.fill,
textStyle: tooltipArgs.tooltip.textStyle,
border: tooltipArgs.tooltip.border,
theme: this.gauge.theme
border: tooltipArgs.tooltip.border
});

@@ -130,0 +131,0 @@ this.svgTooltip.appendTo(this.tooltipEle);

@@ -49,5 +49,13 @@ /**

/** Render a gauge with Highcontrast theme. */
'HighcontrastLight' |
/** Render a gauge with Fabric theme. */
'Fabric' |
/** Render a chart with Material Dark theme. */
'MaterialDark' |
/** Render a chart with Fabric Dark theme. */
'FabricDark' |
/** Render a chart with Highcontrast theme. */
'Highcontrast' |
/** Render a gauge with Fabric theme. */
'Fabric';
/** Render a chart with Bootstrap Dark theme. */
'BootstrapDark';
/**

@@ -54,0 +62,0 @@ * Defines Hidden label of the axis. They are

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc