@syncfusion/ej2-circulargauge
Version:
Essential JS 2 CircularGauge Components
11 lines • 162 kB
JavaScript
/*!
* filename: ej2-circulargauge.min.js
* version : 29.1.33
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
/*! For license information please see ej2-circulargauge.min.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionSvgBase"),require("SyncfusionPdfExport")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionSvgBase","SyncfusionPdfExport"],t):"object"==typeof exports?exports.SyncfusionCirculargauge=t(require("SyncfusionBase"),require("SyncfusionSvgBase"),require("SyncfusionPdfExport")):e.SyncfusionCirculargauge=t(e.SyncfusionBase,e.SyncfusionSvgBase,e.SyncfusionPdfExport)}(self,((e,t,i)=>(()=>{"use strict";var n={766:t=>{t.exports=e},461:e=>{e.exports=i},727:e=>{e.exports=t}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return n[e](i,i.exports,a),i.exports}a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{a.r(r),a.d(r,{Animation:()=>se,Annotation:()=>de,AnnotationTooltip:()=>q,Annotations:()=>Ae,Axis:()=>ue,Border:()=>X,Cap:()=>re,CircularGauge:()=>Qe,ColorStop:()=>Xe,CustomizeOption:()=>O,Font:()=>Y,GaugeLocation:()=>D,GaugeTooltip:()=>_e,Gradient:()=>Je,GradientPosition:()=>Ye,ImageExport:()=>Ue,Index:()=>ze,Label:()=>ne,Legend:()=>De,LegendOptions:()=>Ne,LegendSettings:()=>Q,Line:()=>ie,LinearGradient:()=>Ze,Location:()=>K,Margin:()=>J,NeedleTail:()=>le,PathOption:()=>L,PdfExport:()=>Ge,Pointer:()=>ge,Print:()=>je,RadialGradient:()=>qe,Range:()=>oe,RangeTooltip:()=>Z,Rect:()=>z,RectOption:()=>I,Size:()=>B,TextOption:()=>N,Tick:()=>ae,TooltipSettings:()=>$,VisibleLabels:()=>W,appendPath:()=>g,arcPath:()=>f,arcRoundedPath:()=>x,arcWidthPath:()=>v,arcWidthPathCalculation:()=>A,calculateShapes:()=>k,calculateSum:()=>Te,getAngleFromLocation:()=>c,getAngleFromValue:()=>p,getCirclePath:()=>P,getCompleteArc:()=>Oe,getCompletePath:()=>Le,getDegree:()=>h,getElement:()=>R,getElementSize:()=>Se,getFontStyle:()=>s,getLabelFormat:()=>E,getLocationFromAngle:()=>m,getMousePosition:()=>Ce,getPathArc:()=>y,getPointer:()=>T,getRange:()=>j,getRangeColor:()=>Ee,getRangePath:()=>b,getRoundedPathArc:()=>S,getTemplateFunction:()=>w,getValueFromAngle:()=>U,isCompleteAngle:()=>u,linear:()=>Me,measureText:()=>o,removeElement:()=>F,removeTooltip:()=>Re,roundedArcWidthPathCalculation:()=>C,setStyles:()=>G,showTooltip:()=>we,stringToNumber:()=>_,textElement:()=>d,textTrim:()=>Pe,titleTooltip:()=>Fe,toPixel:()=>l});var e,t=a(766),i=a(727),n=(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])},e(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});function o(e,i){var n=document.getElementById("gauge-measuretext");null===n&&(n=(0,t.createElement)("text",{id:"gauge-measuretext"}),document.body.appendChild(n));var o="position: absolute; visibility: hidden;;left: 0px; top: -100px; white-space: nowrap;"+s(i);return n.innerText=e,n.style.cssText=o,new B(n.clientWidth,n.clientHeight)}function l(e,t){return-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10)}function s(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 d(e,t,n,o,a){var r,l=new i.SvgRenderer(""),s=a+" font-size:"+t.size+"; font-style:"+t.fontStyle+" ; font-weight:"+t.fontWeight+"; font-family:"+t.fontFamily+";";r={id:e.id,x:e.x,y:e.y,fill:n,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine,style:s};var d=l.createText(r,e.text);return o.appendChild(d),d}function g(e,t,i,n){n=n||"Path";var o=i.renderer["draw"+n](e);return o.setAttribute("transform",e.transform),o.style.cssText=e.style,t.appendChild(o),o}function u(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function h(e,t){var i=t-e;return i<0?i+360:i}function p(e,t,i,n,o,a){var r;return o-=u(n,o)?1e-4:0,n-=90,o-=90,r=a?(e-i)*(h(n,o)/(t-i))+n:(r=o-(e-i)*(h(n,o)/(t-i)))<0?360+r:r,r=Math.round(r)>=360?r-360:Math.round(r)<0?360+r:r}function c(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 m(e,t,i){var n=e*Math.PI/180;return new D(Math.cos(n)*t+i.x,Math.sin(n)*t+i.y)}function y(e,i,n,o,a,r,l,s){((0,t.isNullOrUndefined)(l)||l.start!==l.end)&&(n-=u(i,n)?1e-4:0);var d=h(i,n),g=(0,t.isNullOrUndefined)(l)?o-a:"Outside"!==l.position||l.isLinearCircularGradient?"Cross"===l.position&&"AntiClockWise"===s.direction?o-(r+a)/2:o-a:o+a,p=(0,t.isNullOrUndefined)(l)?o-r:"Outside"!==l.position||l.isLinearCircularGradient?"Cross"===l.position&&"ClockWise"===s.direction?o-(r+a)/2:o-r:o+r,c=(0,t.isNullOrUndefined)(l)?o-(a+r)/2:"Outside"!==l.position||l.isLinearCircularGradient?"Cross"===l.position?o-(a+r)/4-("ClockWise"===s.direction?a:r)/2:o-(a+r)/2:o+(a+r)/2,y=(0,t.isNullOrUndefined)(l)||"Cross"!==l.position?o:o+(a+r)/4-("ClockWise"===s.direction?a:r)/2,f=(0,t.isNullOrUndefined)(l)||"Cross"!==l.position||"ClockWise"!==s.direction?o:o-(a-r)/2,x=(0,t.isNullOrUndefined)(l)||"Cross"!==l.position||"AntiClockWise"!==s.direction?o:o+(a-r)/2;return void 0!==a&&void 0!==r?(f="Cross"===l.position&&d>325?x:f,b(m(i,x,e),m(n,f,e),m(i,g,e),m(n,p,e),y,g,p,c,d<180?0:1,e,d,l,s)):P(m(i,o,e),m(n,o,e),o,d<180?0:1)}function f(e,t,i,n,o,a,r,l,s,d,g){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+d.x+" "+d.y+" A "+n+" "+o+" 0 "+l+" 0 "+g.x+" "+g.y+" A "+a+" "+r+" 0 "+l+" 0 "+s.x+" "+s.y+" Z "}function x(e,i,n,o,a,r,l,s,d,g,u,h,p,c,m){var y="M "+e.x+" "+e.y+" A "+n+" "+n+" 0 "+g+" 1 "+i.x+" "+i.y+" C "+o.x+" "+o.y+" "+a.x+" "+a.y+" "+h.x+" "+h.y;return(0,t.isNullOrUndefined)(s)&&(0,t.isNullOrUndefined)(d)?y+" A "+r+" "+l+" 0 "+g+" 0 "+u.x+" "+u.y+" C "+p.x+" "+p.y+" "+c.x+" "+c.y+" "+e.x+" "+e.y+" Z":y+" A "+r+" "+l+" 0 "+g+" 0 "+m.x+" "+m.y+" A "+s+" "+d+" 0 "+g+" 0 "+u.x+" "+u.y+" C "+p.x+" "+p.y+" "+c.x+" "+c.y+" "+e.x+" "+e.y+" Z"}function v(e,t,i,n,o,a,r,l){return"M "+e.x+" "+e.y+" A "+o+" "+o+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+n.x+" "+n.y+" A "+r+" "+a+" 0 "+l+" 0 "+i.x+" "+i.y+" Z"}function b(e,t,i,n,o,a,r,l,s,d,g,u,h){var p,c=u.startWidth,m=u.endWidth,y=Math.abs(c-m);return c>m&&g<=260&&"Cross"!==u.position&&"Outside"!==u.position?(p=r+("ClockWise"===h.direction?-y/2:y/2),v(e,t,i,n,o,a+("ClockWise"===h.direction?y/2:-y/2),p,s)):m>c&&g<=260&&"Cross"!==u.position&&"Outside"!==u.position?(p=a+("ClockWise"===h.direction?-y/2:y/2),v(e,t,i,n,o,r+("ClockWise"===h.direction?y/2:-y/2),p,s)):m!==c||0===h.startAngle&&0===h.endAngle?g>260||!u.isLinearCircularGradient&&0===h.startAngle&&0===h.endAngle?u.roundedCornerRadius<=0&&u.startWidth===u.endWidth?v(e,t,i,n,o,a,r,s):A(e,t,i,n,o,a,r,l,s,d,null,null,null,null,c,m,g,u,h):"Cross"===u.position||"Outside"===u.position?v(e,t,i,n,o,l,l,s):v(e,t,i,n,o,a,r,s):v(e,t,i,n,o,a,r,s)}function A(e,i,n,o,a,r,l,s,d,g,u,h,c,y,b,A,S,P,w){if((0,t.isNullOrUndefined)(P))return C(e,i,n,o,a,r,l,d,u,h,c,y);var F=Math.abs(b-A),R=p((P.start+P.end)/2,w.maximum,w.minimum,w.startAngle,w.endAngle,"ClockWise"===w.direction),_=m(R,b<A?l:r,g),T=Math.sqrt(Math.pow(o.x-_.x,2)+Math.pow(o.y-_.y,2))/2,E=Math.sqrt(Math.pow(g.x-n.x,2)+Math.pow(g.y-n.y,2)),k=Math.sqrt(Math.pow(g.x-_.x,2)+Math.pow(g.y-_.y,2));if(P.roundedCornerRadius<=0){if(F=0===F?1:F,o.y="Cross"===P.position&&"ClockWise"===w.direction&&S>325?o.y-F/2:o.y,("Cross"===P.position?330:325)<=S&&S<=360)return f(e,i,a,T,T,"ClockWise"===w.direction?k/2:S>=345?r-F/2-A/2:"Cross"===P.position?r+F/4-b/2:r-F/2-b/2,"ClockWise"===w.direction?E/2:"Cross"===P.position?l+F/4-A/4:"Outside"===P.position&&"AntiClockWise"===w.direction?S<345?r-F-A/4:r-F/2:l+F/2-A/2,d,n,o,_);if(S>260&&S<325&&"Cross"!==P.position&&"Outside"!==P.position){var M=s-F/2,O=s-F/2,L="ClockWise"===w.direction?S>=310:S<345;return S<310?v(e,i,n,o,a,M,O,d):S>=310||L?v(e,i,n,o,a,O,M=s-F,d):v(e,i,n,o,a,r,l,d)}if("Cross"===P.position){var I="ClockWise"===w.direction?S<=300&&S>=260?l-F/2-b/4:l-F-b/2:S<=300&&S>=260?l+F/4-b/4:l+F/4-b/2;return v(e,i,n,o,a,"ClockWise"===w.direction?S>325?S>340?r-b-F/4:r-F/4:r:r-F/4,I,d)}if("Outside"===P.position){if(S<325&&S>285){var B,D=b/2,z=B=s+F/2+D+A/2;return o.y="ClockWise"===w.direction&&b!==A&&b>F?o.y-F/2:o.y+D,v(e,i,n,o,a,z,B,d)}return v(e,i,n,o,a,s,s,d)}return v(e,i,n,o,a,r,l,d)}var N=w.endAngle<4?356:360;d=S>N?0:d;var W="ClockWise"===w.direction?327:322,G="ClockWise"===w.direction?328:325;if(A!==b||0===w.startAngle&&0===w.endAngle){if(S<=N&&S>W&&P.roundedCornerRadius>0)return x(e,i,a,u,h,"ClockWise"===w.direction?S<334&&S>324?T-F/2:T-F/4:T,T,k/2,"ClockWise"===w.direction?E/2+F/2:E/2,d,n,o,y,c,_);if(S>270&&S<G){var U=l+F/2-A/2,j=l-F/2-A/2;return x(e,i,a,u,h,r-F/2-b/2,"ClockWise"===w.direction?j:U,null,null,d,n,o,y,c,null)}return C(e,i,n,o,a,r,l,d,u,h,c,y)}return C(e,i,n,o,a,r,l,d,u,h,c,y)}function C(e,t,i,n,o,a,r,l,s,d,g,u){return"M "+e.x+" "+e.y+" A "+o+" "+o+" 0 "+l+" 1 "+t.x+" "+t.y+" C "+s.x+" "+s.y+" "+d.x+" "+d.y+" "+n.x+" "+n.y+" A "+r+" "+a+" 0 "+l+" 0 "+i.x+" "+i.y+" C "+u.x+" "+u.y+" "+g.x+" "+g.y+" "+e.x+" "+e.y+" Z"}function S(e,t,i,n,o,a,r,l,s,d){var g=h(t,i-=u(t,i)?1e-4:0),p=a-r,c=a-l,y=a-(r+l)/2;return A(m(t,a,e),m(i,a,e),m(t,p,e),m(i,c,e),a,y,y,y,g<180?0:1,e,m(o,a,e),m(o,c,e),m(n,a,e),m(n,p,e),r,l,g,s,d)}function P(e,t,i,n){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+n+" 1 "+t.x+" "+t.y}function w(e,i){var n=null;try{"function"==typeof e?n=(0,t.compile)(e):isNaN(parseFloat(e))&&document.querySelectorAll(e).length?"a"===e.charAt(0)&&"A"===e.charAt(0)||1===e.length||(n=(0,t.compile)(document.querySelector(e).innerHTML.trim())):(i.isVue||i.isVue3)&&(n=(0,t.compile)(e))}catch(i){n=(0,t.compile)(e)}return n}function F(e){var i=R(e);i&&(0,t.remove)(i)}function R(e){return document.getElementById(e)}function _(e,t){return null!=e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function T(e,t){var i=e.replace(t.element.id,"").split("_Axis_")[1],n=i.indexOf("_Range_")>-1?i.split("_Range_"):i.indexOf("_Pointer_NeedleCap_")>-1?i.split("_Pointer_NeedleCap_"):i.indexOf("_Pointer_NeedleTail_")>-1?i.split("_Pointer_NeedleTail_"):i.indexOf("_Pointer_NeedleRect_")>-1?i.split("_Pointer_NeedleRect_"):i.indexOf("_Pointer_Needle_")>-1?i.split("_Pointer_Needle_"):i.indexOf("_Pointer_RangeBar_")>-1?i.split("_Pointer_RangeBar_"):i.indexOf("_Pointer_Marker_")>-1?i.split("_Pointer_Marker_"):i.indexOf("_Pointer_")>-1?i.split("_Pointer_"):i.split("_Annotation_");return{axisIndex:+n[0],pointerIndex:+n[n.length-1]}}function E(e){return e&&null!==e.match("{value}")?"":e}function k(e,i,n,o,a){var r,l,s="string"==typeof n.width?parseFloat(n.width):n.width,d="string"==typeof n.height?parseFloat(n.height):n.height,g=e.x,u=e.y,h=e.x+-s/2,p=e.y+-d/2,c=a.id.indexOf("Shape")>-1;switch(i){case"Circle":(0,t.merge)(a,{rx:s/2,ry:d/2,cx:g,cy:u});break;case"Diamond":r="M "+h+" "+u+" L "+g+" "+(u+-d/2)+" L "+(g+s/2)+" "+u+" L "+g+" "+(u+d/2)+" L "+h+" "+u+" Z",(0,t.merge)(a,{d:r});break;case"Rectangle":r="M "+h+" "+(u+-d/2)+" L "+(g+s/2)+" "+(u+-d/2)+" L "+(g+s/2)+" "+(u+d/2)+" L "+h+" "+(u+d/2)+" L "+h+" "+(u+-d/2)+" Z",(0,t.merge)(a,{d:r});break;case"Triangle":r=c?"M "+(h+s/2)+" "+p+" L "+(h+s)+" "+(p+d)+"L "+h+" "+(p+d)+" Z":"M "+g+" "+u+" L "+(g-d)+" "+(u-s/2)+"L "+(g-d)+" "+(u+s/2)+" Z",(0,t.merge)(a,{d:r});break;case"InvertedTriangle":r=c?"M "+(h+s)+" "+p+" L "+(h+s/2)+" "+(p+d)+"L "+h+" "+p+" Z":"M "+g+" "+u+" L "+(g+d)+" "+(u-s/2)+"L "+(g+d)+" "+(u+s/2)+" Z",(0,t.merge)(a,{d:r});break;case"Image":(0,t.merge)(a,{href:o,height:d,width:s,x:h,y:p});break;case"RightArrow":r="M "+(g+-s/2)+" "+(u-d/2)+" L "+(g+s/2)+" "+u+" L "+(g+-s/2)+" "+(u+d/2)+" L "+(g+-s/2)+" "+(u+d/2-(l=2))+" L "+(g+s/2-2*l)+" "+u+" L"+(g+-s/2)+" "+(u-d/2+l)+" Z",(0,t.merge)(a,{d:r});break;case"LeftArrow":a.fill=a.stroke,a.stroke="transparent",r="M "+(g+s/2)+" "+(u-d/2)+" L "+(g+-s/2)+" "+u+" L "+(g+s/2)+" "+(u+d/2)+" L "+(g+s/2)+" "+(u+d/2-(l=2))+" L "+(g+-s/2+2*l)+" "+u+" L"+(g+s/2)+" "+(u-d/2+l)+" Z",(0,t.merge)(a,{d:r})}return a}var M,O=function(e){this.id=e},L=function(e){function t(t,i,n,o,a,r,l,s,d){void 0===s&&(s=""),void 0===d&&(d="");var g=e.call(this,t)||this;return g.opacity=a,g.fill=i,g.stroke=o,g["stroke-width"]=n,g["stroke-dasharray"]=r,g.d=l,g.transform=s,g.style=d,g}return n(t,e),t}(O),I=function(e){function t(t,i,n,o,a){var r=e.call(this,t)||this;return r.y=a.y,r.x=a.x,r.height=a.height,r.width=a.width,r.opacity=o,r.fill=i,r.stroke=n.color,r["stroke-width"]=n.width,r["stroke-dasharray"]=n.dashArray,r}return n(t,e),t}(O),B=function(e,t){this.width=e,this.height=t},D=function(e,t){this.x=e,this.y=t},z=function(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n},N=function(e){function t(t,i,n,o,a,r,l){void 0===r&&(r="");var s=e.call(this,t)||this;return s.transform="",s.baseLine="auto",s.x=i,s.y=n,s.anchor=o,s.text=a,s.transform=r,s.baseLine=l,s}return n(t,e),t}(O),W=function(e,t,i){this.text=e,this.value=t,this.size=i};function G(e,i,n){(0,t.setStyleAttribute)(e,{stroke:n.color,"stroke-width":n.width,fill:i})}function U(e,t,i,n,o,a){return o-=u(n,o)?1e-4:0,e=e<n?e+360:e,a?(e-n)/h(n,o)*(t-i)+i:t-(e-n)/h(n,o)*(t-i)}function j(e,t){var i=e.replace(t.element.id,"").split("_Axis_")[1];return{axisIndex:+i[0],rangeIndex:+i.split("Range_")[1]}}!function(e){e.axisLabelFont={size:null,fontWeight:null,color:null,fontStyle:"Normal",fontFamily:null},e.legendLabelFont={size:null,fontWeight:null,color:null,fontStyle:"Normal",fontFamily:null}}(M||(M={}));var V=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])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),H=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},X=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return V(i,e),H([(0,t.Property)("")],i.prototype,"color",void 0),H([(0,t.Property)(1)],i.prototype,"width",void 0),H([(0,t.Property)("")],i.prototype,"dashArray",void 0),i}(t.ChildProperty),Y=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return V(i,e),H([(0,t.Property)("16px")],i.prototype,"size",void 0),H([(0,t.Property)("")],i.prototype,"color",void 0),H([(0,t.Property)("segoe UI")],i.prototype,"fontFamily",void 0),H([(0,t.Property)("Normal")],i.prototype,"fontWeight",void 0),H([(0,t.Property)("Normal")],i.prototype,"fontStyle",void 0),H([(0,t.Property)(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),Z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return V(i,e),H([(0,t.Property)(null)],i.prototype,"fill",void 0),H([(0,t.Complex)({size:null,fontFamily:null,opacity:null,fontWeight:null},Y)],i.prototype,"textStyle",void 0),H([(0,t.Property)(null)],i.prototype,"format",void 0),H([(0,t.Property)(null)],i.prototype,"template",void 0),H([(0,t.Property)(!0)],i.prototype,"enableAnimation",void 0),H([(0,t.Complex)({color:null},X)],i.prototype,"border",void 0),H([(0,t.Property)(!1)],i.prototype,"showAtMousePosition",void 0),i}(t.ChildProperty),q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return V(i,e),H([(0,t.Property)(null)],i.prototype,"fill",void 0),H([(0,t.Complex)({size:"13px",fontFamily:null,opacity:null},Y)],i.prototype,"textStyle",void 0),H([(0,t.Property)(null)],i.prototype,"format",void 0),H([(0,t.Property)(null)],i.prototype,"template",void 0),H([(0,t.Property)(!0)],i.prototype,"enableAnimation",void 0),H([(0,t.Complex)({color:null},X)],i.prototype,"border",void 0),i}(t.ChildProperty),J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return V(i,e),H([(0,t.Property)(10)],i.prototype,"left",void 0),H([(0,t.Property)(10)],i.prototype,"right",void 0),H([(0,t.Property)(10)],i.prototype,"top",void 0),H([(0,t.Property)(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),$=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return V(i,e),H([(0,t.Property)(!1)],i.prototype,"enable",void 0),H([(0,t.Property)(null)],i.prototype,"fill",void 0),H([(0,t.Complex)({size:null,fontFamily:null,opacity:null,fontWeight:null},Y)],i.prototype,"textStyle",void 0),H([(0,t.Complex)({},Z)],i.prototype,"rangeSettings",void 0),H([(0,t.Complex)({},q)],i.prototype,"annotationSettings",void 0),H([(0,t.Property)(null)],i.prototype,"format",void 0),H([(0,t.Property)(null)],i.prototype,"template",void 0),H([(0,t.Property)(!0)],i.prototype,"enableAnimation",void 0),H([(0,t.Complex)({color:null},X)],i.prototype,"border",void 0),H([(0,t.Property)(!1)],i.prototype,"showAtMousePosition",void 0),H([(0,t.Property)("Pointer")],i.prototype,"type",void 0),i}(t.ChildProperty),K=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return V(i,e),H([(0,t.Property)(0)],i.prototype,"x",void 0),H([(0,t.Property)(0)],i.prototype,"y",void 0),i}(t.ChildProperty),Q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return V(i,e),H([(0,t.Property)(!1)],i.prototype,"visible",void 0),H([(0,t.Property)(!0)],i.prototype,"toggleVisibility",void 0),H([(0,t.Property)("Center")],i.prototype,"alignment",void 0),H([(0,t.Complex)({},X)],i.prototype,"border",void 0),H([(0,t.Complex)({},X)],i.prototype,"shapeBorder",void 0),H([(0,t.Property)(8)],i.prototype,"padding",void 0),H([(0,t.Property)(1)],i.prototype,"opacity",void 0),H([(0,t.Property)("Auto")],i.prototype,"position",void 0),H([(0,t.Property)("Circle")],i.prototype,"shape",void 0),H([(0,t.Property)(null)],i.prototype,"height",void 0),H([(0,t.Property)(null)],i.prototype,"width",void 0),H([(0,t.Complex)(M.legendLabelFont,Y)],i.prototype,"textStyle",void 0),H([(0,t.Property)(10)],i.prototype,"shapeHeight",void 0),H([(0,t.Property)(10)],i.prototype,"shapeWidth",void 0),H([(0,t.Property)(5)],i.prototype,"shapePadding",void 0),H([(0,t.Complex)({x:0,y:0},K)],i.prototype,"location",void 0),H([(0,t.Property)("transparent")],i.prototype,"background",void 0),H([(0,t.Complex)({left:0,right:0,top:0,bottom:0},J)],i.prototype,"margin",void 0),i}(t.ChildProperty),ee=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])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),te=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ee(i,e),te([(0,t.Property)(2)],i.prototype,"width",void 0),te([(0,t.Property)("")],i.prototype,"dashArray",void 0),te([(0,t.Property)(null)],i.prototype,"color",void 0),i}(t.ChildProperty),ne=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ee(i,e),te([(0,t.Complex)(M.axisLabelFont,Y)],i.prototype,"font",void 0),te([(0,t.Property)("")],i.prototype,"format",void 0),te([(0,t.Property)("Inside")],i.prototype,"position",void 0),te([(0,t.Property)("None")],i.prototype,"hiddenLabel",void 0),te([(0,t.Property)(!1)],i.prototype,"autoAngle",void 0),te([(0,t.Property)(!1)],i.prototype,"useRangeColor",void 0),te([(0,t.Property)(0)],i.prototype,"offset",void 0),te([(0,t.Property)(!0)],i.prototype,"shouldMaintainPadding",void 0),i}(t.ChildProperty),oe=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.isLinearCircularGradient=!1,t}return ee(i,e),te([(0,t.Property)(0)],i.prototype,"start",void 0),te([(0,t.Property)(0)],i.prototype,"end",void 0),te([(0,t.Property)(null)],i.prototype,"radius",void 0),te([(0,t.Property)(10)],i.prototype,"startWidth",void 0),te([(0,t.Property)(10)],i.prototype,"endWidth",void 0),te([(0,t.Property)(null)],i.prototype,"color",void 0),te([(0,t.Property)(0)],i.prototype,"roundedCornerRadius",void 0),te([(0,t.Property)(1)],i.prototype,"opacity",void 0),te([(0,t.Property)("")],i.prototype,"legendText",void 0),te([(0,t.Property)("Auto")],i.prototype,"position",void 0),te([(0,t.Property)(0)],i.prototype,"offset",void 0),te([(0,t.Property)(null)],i.prototype,"linearGradient",void 0),te([(0,t.Property)(null)],i.prototype,"radialGradient",void 0),i}(t.ChildProperty),ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ee(i,e),te([(0,t.Property)(2)],i.prototype,"width",void 0),te([(0,t.Property)(null)],i.prototype,"height",void 0),te([(0,t.Property)(null)],i.prototype,"interval",void 0),te([(0,t.Property)(0)],i.prototype,"offset",void 0),te([(0,t.Property)(null)],i.prototype,"color",void 0),te([(0,t.Property)("Inside")],i.prototype,"position",void 0),te([(0,t.Property)(!1)],i.prototype,"useRangeColor",void 0),te([(0,t.Property)("0")],i.prototype,"dashArray",void 0),i}(t.ChildProperty),re=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ee(i,e),te([(0,t.Property)(null)],i.prototype,"color",void 0),te([(0,t.Property)(null)],i.prototype,"linearGradient",void 0),te([(0,t.Property)(null)],i.prototype,"radialGradient",void 0),te([(0,t.Complex)({color:null,width:8},X)],i.prototype,"border",void 0),te([(0,t.Property)(8)],i.prototype,"radius",void 0),i}(t.ChildProperty),le=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ee(i,e),te([(0,t.Property)(null)],i.prototype,"color",void 0),te([(0,t.Complex)({color:null,width:0},X)],i.prototype,"border",void 0),te([(0,t.Property)("0%")],i.prototype,"length",void 0),te([(0,t.Property)(null)],i.prototype,"linearGradient",void 0),te([(0,t.Property)(null)],i.prototype,"radialGradient",void 0),i}(t.ChildProperty),se=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ee(i,e),te([(0,t.Property)(!0)],i.prototype,"enable",void 0),te([(0,t.Property)(1e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),de=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ee(i,e),te([(0,t.Property)(null)],i.prototype,"content",void 0),te([(0,t.Property)(90)],i.prototype,"angle",void 0),te([(0,t.Property)("50%")],i.prototype,"radius",void 0),te([(0,t.Property)("-1")],i.prototype,"zIndex",void 0),te([(0,t.Property)(!1)],i.prototype,"autoAngle",void 0),te([(0,t.Complex)({size:"12px",color:"#686868"},Y)],i.prototype,"textStyle",void 0),te([(0,t.Property)(null)],i.prototype,"description",void 0),i}(t.ChildProperty),ge=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.isPointerAnimation=!0,t}return ee(i,e),te([(0,t.Property)(null)],i.prototype,"value",void 0),te([(0,t.Property)("Needle")],i.prototype,"type",void 0),te([(0,t.Property)("Auto")],i.prototype,"position",void 0),te([(0,t.Property)(0)],i.prototype,"roundedCornerRadius",void 0),te([(0,t.Property)(null)],i.prototype,"imageUrl",void 0),te([(0,t.Property)(null)],i.prototype,"radius",void 0),te([(0,t.Property)(20)],i.prototype,"pointerWidth",void 0),te([(0,t.Complex)({},re)],i.prototype,"cap",void 0),te([(0,t.Complex)({},Y)],i.prototype,"textStyle",void 0),te([(0,t.Complex)({},le)],i.prototype,"needleTail",void 0),te([(0,t.Property)(null)],i.prototype,"color",void 0),te([(0,t.Complex)({color:"#DDDDDD",width:0},X)],i.prototype,"border",void 0),te([(0,t.Complex)(null,se)],i.prototype,"animation",void 0),te([(0,t.Property)("Circle")],i.prototype,"markerShape",void 0),te([(0,t.Property)(5)],i.prototype,"markerHeight",void 0),te([(0,t.Property)("")],i.prototype,"text",void 0),te([(0,t.Property)(null)],i.prototype,"description",void 0),te([(0,t.Property)(5)],i.prototype,"markerWidth",void 0),te([(0,t.Property)(0)],i.prototype,"offset",void 0),te([(0,t.Property)(null)],i.prototype,"needleStartWidth",void 0),te([(0,t.Property)(null)],i.prototype,"needleEndWidth",void 0),te([(0,t.Property)(!1)],i.prototype,"enableDrag",void 0),te([(0,t.Property)(null)],i.prototype,"linearGradient",void 0),te([(0,t.Property)(null)],i.prototype,"radialGradient",void 0),i}(t.ChildProperty),ue=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return ee(i,e),te([(0,t.Property)(null)],i.prototype,"minimum",void 0),te([(0,t.Property)(null)],i.prototype,"maximum",void 0),te([(0,t.Property)(!1)],i.prototype,"showLastLabel",void 0),te([(0,t.Property)(!1)],i.prototype,"hideIntersectingLabel",void 0),te([(0,t.Property)(null)],i.prototype,"roundingPlaces",void 0),te([(0,t.Property)(null)],i.prototype,"radius",void 0),te([(0,t.Complex)({},ie)],i.prototype,"lineStyle",void 0),te([(0,t.Collection)([{}],oe)],i.prototype,"ranges",void 0),te([(0,t.Collection)([{}],ge)],i.prototype,"pointers",void 0),te([(0,t.Collection)([{}],de)],i.prototype,"annotations",void 0),te([(0,t.Complex)({width:2,height:10},ae)],i.prototype,"majorTicks",void 0),te([(0,t.Complex)({width:2,height:5},ae)],i.prototype,"minorTicks",void 0),te([(0,t.Property)(200)],i.prototype,"startAngle",void 0),te([(0,t.Property)(160)],i.prototype,"endAngle",void 0),te([(0,t.Property)("ClockWise")],i.prototype,"direction",void 0),te([(0,t.Property)(null)],i.prototype,"background",void 0),te([(0,t.Property)(null)],i.prototype,"rangeGap",void 0),te([(0,t.Property)(!1)],i.prototype,"startAndEndRangeGap",void 0),te([(0,t.Complex)({},ne)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),he="animationComplete",pe="axisLabelRender",ce="tooltipRender",me="gaugeMouseLeave",ye="gaugeMouseUp",fe="dragStart",xe="dragMove",ve="dragEnd",be="resized",Ae=function(){function e(e){}return e.prototype.renderAnnotation=function(e,i,n){var o=this,a=n.availableSize.width,r=(0,t.createElement)("div",{id:n.element.id+"_Annotations_"+i});r.style.opacity=n.allowLoadingAnimation?"0":"1";var l=R(n.element.id+"_Secondary_Element");(0,t.isNullOrUndefined)(document.getElementById(n.element.id+"_Secondary_Element"))||(document.getElementById(n.element.id+"_Secondary_Element").style.width=a+"px"),e.annotations.map((function(e,t){null!==e.content&&o.createTemplate(r,t,i,n)})),l&&r.childElementCount&&l.appendChild(r),n.renderReactTemplates()},e.prototype.annotationAnimation=function(e){for(var i=0;i<e.axes.length;i++){var n=document.getElementById(e.element.id+"_Annotations_"+i);(0,t.isNullOrUndefined)(n)||"0"===n.style.opacity&&this.annotationAnimate(n,e,i)}},e.prototype.annotationAnimate=function(e,i,n){var o=0;new t.Animation({}).animate(e,{duration:i.loadingAnimationDuration[n],progress:function(t){t.timeStamp>t.delay&&(o=(t.timeStamp-t.delay)/t.duration,e.style.opacity=1*o)},end:function(){e.style.opacity=1,i.isOverAllAnimationComplete=!0}})},e.prototype.createTemplate=function(e,i,n,o){var a=this,r=o.axes[n],l=r.annotations[i],d=(0,t.createElement)("div",{id:o.element.id+"_Axis_"+n+"_Annotation_"+i});d.style.cssText="position: absolute; z-index:"+l.zIndex+";transform:"+(l.autoAngle?"rotate("+(l.angle-90)+"deg)":"rotate(0deg)")+";";var g={cancel:!1,name:"annotationRender",content:l.content,axis:r,annotation:l,textStyle:l.textStyle};o.trigger("annotationRender",g,(function(u){var h,p;if(!g.cancel){if((h=w(g.content,o))&&h(r,o,g.content,o.element.id+"_Axis"+n+"_ContentTemplate"+i).length)for(var c=(p=Array.prototype.slice.call(h(r,o,g.content,o.element.id+"_Axis"+n+"_ContentTemplate"+i))).length,m=0;m<c;m++)d.appendChild(p[m]);else{var y=(0,t.createElement)("div",{innerHTML:(0,t.isNullOrUndefined)(g.content)?null:g.content.toString(),id:"StringTemplate"});y.style.cssText=s(g.textStyle),d.appendChild(y)}a.updateLocation(d,r,l,o),e.appendChild(d)}}))},e.prototype.updateLocation=function(e,t,i,n){var o=m(i.angle-90,_(i.radius,t.currentRadius),n.midPoint),a=this.measureElementRect(e);e.style.left=o.x-a.width/2+"px",e.style.top=o.y-a.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation"),e.setAttribute("role","region")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(){},e.prototype.measureElementRect=function(e){document.body.appendChild(e);var t=e.getBoundingClientRect();return F(e.id),t},e}();function Ce(e,t,i){var n=i.getBoundingClientRect(),o=i.ownerDocument.defaultView.pageXOffset,a=i.ownerDocument.defaultView.pageYOffset,r=i.ownerDocument.documentElement.clientTop,l=i.ownerDocument.documentElement.clientLeft,s=n.left+o-l,d=n.top+a-r;return new D(e-s,t-d)}function Se(e,i,n){var o,a,r=w(e,i),l=r?i.isVue||i.isVue3?r({},i,null,i.element.id+"Template"):r({},null,null,i.element.id+"Template"):[];if(r&&l.length){a=i.createElement("div",{id:i.element.id+"_Measure_Element"}),i.element.appendChild(a);for(var s=i.isVue||i.isVue3?r({},i,null,i.element.id+"Template"):r({},null,null,i.element.id+"Template"),d=s.length;d>0;)a.appendChild(s[0]),d--;n.appendChild(a),o=new B(n.getBoundingClientRect().width,n.getBoundingClientRect().height),(0,t.remove)(a)}return o}function Pe(e,t,i){var n=t,a=o(t,i).width;if(a>e)for(var r=t.length-1;r>=0;--r)if((a=o(n=t.substring(0,r)+"...",i).width)<=e)return n;return n}function we(e,i,n,a,r){var l,s,d=new z(a.margin.left,a.margin.top+10,a.availableSize.width-(a.margin.left+a.margin.right),a.availableSize.height-(a.margin.top-a.margin.bottom));if("Title"===r){l=a.element.id+"_EJ2_Title_Tooltip",s=document.getElementById(l);var g=o(e,{fontFamily:"Segoe UI",size:"12px",fontStyle:"Normal",fontWeight:"Regular"}).width+5;d.width=g<d.width?g:d.width-10,s||Re()}else if("LegendText"===r){l=a.element.id+"_EJ2_Legend_Tooltip",(s=document.getElementById(l))||Re(),i=i+(g=o(e,{fontFamily:"Segoe UI",size:"12px",fontStyle:"Normal",fontWeight:"Regular"}).width+5)>d.width?i-g:i,d.x=i<0?5:i,d.y=n,d.width=g}s?(s.innerText=e,s.style.top=(d.y+15).toString()+"px",s.style.left=d.x.toString()+"px"):((s=(0,t.createElement)("div",{id:l,className:"EJ2-CircularGauge-Tooltip"})).innerText=e,s.style.cssText="top:"+(d.y+15).toString()+"px;left:"+d.x.toString()+'px; background-color: rgb(255, 255, 255) !important; color:black !important; position:absolute; border:1px solid rgb(112, 112, 112); padding-left : 3px; padding-right : 2px;padding-bottom: 2px; padding-top : 2px; font-size:12px; text-align: center; font-family: "Segoe UI"; width:'+d.width+"px;",R(a.element.id+"_Secondary_Element").appendChild(s))}function Fe(e,i,n,o,a){var r=e.target.id,l=document.getElementsByClassName("EJ2-CircularGauge-Tooltip");if(r===o.element.id+"_CircularGaugeTitle"&&e.target.textContent.indexOf("...")>-1)we(o.title,i,n,o,"Title");else if(e.target.textContent.indexOf("...")>-1&&r.indexOf("_gauge_legend_")>-1&&o.legendSettings.visible){for(var s=parseInt(r.split(o.element.id+"_gauge_legend_Axis_")[1].split("_text_")[0],10),d=parseInt(r.split(o.element.id+"_gauge_legend_Axis_")[1].split("_text_")[1],10),g="",u=0,h=o.legendModule.legendCollection;u<h.length;u++){var p=h[u];p.rangeIndex===d&&p.axisIndex===s&&(g=p.originalText)}we(g,i,n,o,"LegendText")}else l.length>0&&(l[0].id.indexOf("Title_Tooltip")>-1||l[0].id.indexOf("Legend_Tooltip")>-1)&&Re();a&&!(0,t.isNullOrUndefined)(this)&&(clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(Re.bind(this),2e3))}function Re(){document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0&&document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0].remove()}var _e=function(){function e(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.addEventListener()}return e.prototype.renderTooltip=function(e){var t,i,n,o,a,r=this;this.gaugeId=this.gauge.element.getAttribute("id");var l=!1,s=!1;if(-1!==e.type.indexOf("touch")?(n=(o=e).target,t=o.changedTouches[0].pageX,i=o.changedTouches[0].pageY):(n=e.target,t=e.pageX,i=e.pageY),this.tooltip.type.indexOf("Pointer")>-1&&n.id.indexOf("_Pointer_")>=0&&n.id.indexOf(this.gaugeId)>=0){null!==this.pointerEle&&(l=this.pointerEle===n),s=!0;var d=this.gauge.svgObject.getBoundingClientRect(),g=this.gauge.element.getBoundingClientRect(),u=document.getElementById(this.gauge.element.id+"_AxesCollection").getBoundingClientRect(),h=new z(Math.abs(g.left-d.left),Math.abs(g.top-d.top),d.width,d.height),c=T(n.id,this.gauge);this.currentAxis=this.gauge.axes[c.axisIndex],this.currentPointer=this.currentAxis.pointers[c.pointerIndex];var y=p(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,f=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,x=f&&null!==f.match("{value}"),v=this.gauge.intl.getNumberFormat({format:E(f),useGrouping:this.gauge.useGroupingSeparator});if(this.tooltipElement(),0!==this.tooltipEle.childElementCount&&!this.gauge.enablePointerDrag&&!this.gauge.tooltip.showAtMousePosition)return null;var b=this.roundedValue(this.currentPointer.currentValue),A=x?f.replace(new RegExp("{value}","g"),v(b)):v(b);(a=m(y,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(y>=150&&y<=250||y>=330&&y<=360||y>=0&&y<=45)?a.x+10:a.x;var C={name:ce,cancel:!1,content:A,location:a,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge,appendInBodyTag:!1,type:"Pointer"};this.gauge.trigger(ce,C,(function(e){var n=e.tooltip.template;if(null!==n&&1===n.length&&"function"!=typeof n&&(n=n[n[0]]),e.tooltip.showAtMousePosition)e.location=Ce(t,i,r.gauge.svgObject),r.tooltipRect=h;else if(n){var o=Se(n,r.gauge,r.tooltipEle);r.tooltipRect=Math.abs(u.left-d.left)>o.width?r.findPosition(h,y,e.location,!0):h}else r.findPosition(h,y,e.location,!1);if(!e.cancel&&!l){var a={color:e.tooltip.textStyle.color||r.gauge.themeStyle.tooltipFontColor,opacity:e.tooltip.textStyle.opacity||r.gauge.themeStyle.tooltipTextOpacity,fontFamily:e.tooltip.textStyle.fontFamily||r.gauge.themeStyle.fontFamily,fontWeight:e.tooltip.textStyle.fontWeight||r.gauge.themeStyle.fontWeight,fontStyle:e.tooltip.textStyle.fontStyle,size:e.tooltip.textStyle.size||r.gauge.themeStyle.tooltipFontSize};r.svgTooltip=r.svgTooltipCreate(r.svgTooltip,e,n,r.arrowInverted,r.tooltipRect,r.gauge,e.tooltip.fill,a,e.tooltip.border),r.svgTooltip.opacity=r.gauge.themeStyle.tooltipFillOpacity||r.svgTooltip.opacity,r.svgTooltip.appendTo(r.tooltipEle),!n||"LeftTop"!==r.tooltipPosition&&"LeftBottom"!==r.tooltipPosition||(r.tooltipEle.style.left=parseFloat(r.tooltipEle.style.left)-r.tooltipEle.getBoundingClientRect().width-20+"px"),n&&Math.abs(i-r.tooltipEle.getBoundingClientRect().top)<=0&&(r.tooltipEle.style.top=parseFloat(r.tooltipEle.style.top)+20+"px")}})),this.gauge.renderReactTemplates()}else if(this.tooltip.type.indexOf("Range")>-1&&n.id.indexOf("_Range_")>=0&&!this.gauge.isDrag&&n.id.indexOf(this.gaugeId)>=0){s=!0;var S=this.gauge.svgObject.getBoundingClientRect(),P=this.gauge.element.getBoundingClientRect(),w=document.getElementById(this.gauge.element.id+"_AxesCollection").getBoundingClientRect(),F=new z(Math.abs(P.left-S.left),Math.abs(P.top-S.top),S.width,S.height),R=T(n.id,this.gauge);this.currentAxis=this.gauge.axes[R.axisIndex],this.currentRange=this.currentAxis.ranges[R.pointerIndex];var k=p(this.currentRange.end-Math.abs((this.currentRange.end-this.currentRange.start)/2),this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,M=this.gauge.tooltip.rangeSettings.format||this.currentAxis.labelStyle.format,O=(x=M&&(null!==M.match("{end}")||null!==M.match("{start}")),this.gauge.intl.getNumberFormat({format:E(M),useGrouping:this.gauge.useGroupingSeparator}));this.tooltipElement();var L=this.roundedValue(this.currentRange.start),I=this.roundedValue(this.currentRange.end),B=this.currentRange.start.toString(),D=this.currentRange.end.toString(),N=x?M.replace(/{start}/g,B).replace(/{end}/g,D):this.gauge.enableRtl?"Start:"+O(L)+" <br>End:"+O(I)+" ":"Start : "+O(L)+"<br>End : "+O(I);(a=m(k,this.currentRange.currentRadius,this.gauge.midPoint)).x=this.tooltip.rangeSettings.template&&(k>=150&&k<=250||k>=330&&k<=360||k>=0&&k<=45)?a.x+10:a.x;var W={name:ce,cancel:!1,content:N,location:a,axis:this.currentAxis,tooltip:this.tooltip,range:this.currentRange,event:e,gauge:this.gauge,appendInBodyTag:!1,type:"Range"},G={color:this.gauge.tooltip.rangeSettings.textStyle.color,opacity:this.gauge.tooltip.rangeSettings.textStyle.opacity,fontFamily:this.gauge.tooltip.rangeSettings.textStyle.fontFamily,fontStyle:this.gauge.tooltip.rangeSettings.textStyle.fontStyle,fontWeight:this.gauge.tooltip.rangeSettings.textStyle.fontWeight,size:this.gauge.tooltip.rangeSettings.textStyle.size};this.gauge.trigger(ce,W,(function(e){var n=e.tooltip.rangeSettings.template;if(null!==n&&1===n.length&&"function"!=typeof n&&(n=n[n[0]]),"function"!=typeof n&&n&&(n=(n=n.replace(/[$]{start}/g,B)).replace(/[$]{end}/g,D)),r.tooltip.rangeSettings.showAtMousePosition)e.location=Ce(t,i,r.gauge.svgObject),r.tooltipRect=F;else if(n){var o=Se(n,r.gauge,r.tooltipEle);r.tooltipRect=Math.abs(w.left-S.left)>o.width?r.findPosition(F,k,e.location,!0):F}else r.findPosition(F,k,e.location,!1);e.cancel||(G.color=e.tooltip.rangeSettings.textStyle.color||r.gauge.themeStyle.tooltipFontColor,G.fontFamily=e.tooltip.rangeSettings.textStyle.fontFamily||r.gauge.themeStyle.fontFamily,G.fontWeight=e.tooltip.rangeSettings.textStyle.fontWeight||r.gauge.themeStyle.fontWeight,G.opacity=e.tooltip.rangeSettings.textStyle.opacity||r.gauge.themeStyle.tooltipTextOpacity,G.size=e.tooltip.rangeSettings.textStyle.size||r.gauge.themeStyle.tooltipFontSize,r.svgTooltip=r.svgTooltipCreate(r.svgTooltip,e,n,r.arrowInverted,r.tooltipRect,r.gauge,e.tooltip.rangeSettings.fill,G,e.tooltip.rangeSettings.border),r.svgTooltip.opacity=r.gauge.themeStyle.tooltipFillOpacity||r.svgTooltip.opacity,r.svgTooltip.appendTo(r.tooltipEle),!n||"LeftTop"!==r.tooltipPosition&&"LeftBottom"!==r.tooltipPosition||(r.tooltipEle.style.left=parseFloat(r.tooltipEle.style.left)-r.tooltipEle.getBoundingClientRect().width-20+"px"),n&&Math.abs(i-r.tooltipEle.getBoundingClientRect().top)<=0&&(r.tooltipEle.style.top=parseFloat(r.tooltipEle.style.top)+20+"px"))})),this.gauge.renderReactTemplates()}else if(this.tooltip.type.indexOf("Annotation")>-1&&this.checkParentAnnotationId(n)&&!this.gauge.isDrag&&this.annotationTargetElement.id.indexOf(this.gaugeId)>=0){s=!0;var U=this.gauge.svgObject.getBoundingClientRect(),j=this.gauge.element.getBoundingClientRect(),V=new z(Math.abs(j.left-U.left),Math.abs(j.top-U.top),U.width,U.height),H=T(this.annotationTargetElement.id,this.gauge);this.currentAxis=this.gauge.axes[H.axisIndex],this.currentAnnotation=this.currentAxis.annotations[H.pointerIndex];var X=this.currentAnnotation.angle-90;this.tooltipElement(),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle);var Y=null!==this.gauge.tooltip.annotationSettings.format?this.gauge.tooltip.annotationSettings.format:"";(a=m(X,_(this.currentAnnotation.radius,this.currentAxis.currentRadius),this.gauge.midPoint)).x=this.tooltip.annotationSettings.template&&(X>=150&&X<=250||X>=330&&X<=360||X>=0&&X<=45)?a.x+10:a.x;var Z={name:ce,cancel:!1,content:Y,location:a,axis:this.currentAxis,tooltip:this.tooltip,annotation:this.currentAnnotation,event:e,gauge:this.gauge,appendInBodyTag:!1,type:"Annotation"};this.gauge.trigger(ce,Z,(function(e){var t=e.tooltip.annotationSettings.template;null!==t&&1===t.length&&"function"!=typeof t&&(t=t[t[0]]);var n=r.annotationTargetElement.getBoundingClientRect();if(r.tooltipPosition="RightTop",r.arrowInverted=!0,e.location.x=e.location.x+n.width/2,r.tooltipRect=new z(V.x,V.y,V.width,V.height),!e.cancel&&(null!==r.gauge.tooltip.annotationSettings.format||null!==r.gauge.tooltip.annotationSettings.template)){var o={color:e.tooltip.textStyle.color||r.gauge.themeStyle.tooltipFontColor,fontFamily:e.tooltip.textStyle.fontFamily||r.gauge.themeStyle.fontFamily,fontWeight:e.tooltip.textStyle.fontWeight||r.gauge.themeStyle.fontWeight,opacity:e.tooltip.textStyle.opacity||r.gauge.themeStyle.tooltipTextOpacity,fontStyle:e.tooltip.textStyle.fontStyle,size:e.tooltip.textStyle.size||r.gauge.themeStyle.tooltipFontSize};r.svgTooltip=r.svgTooltipCreate(r.svgTooltip,e,t,r.arrowInverted,r.tooltipRect,r.gauge,e.tooltip.annotationSettings.fill,o,e.tooltip.annotationSettings.border),r.svgTooltip.opacity=r.gauge.themeStyle.tooltipFillOpacity||r.svgTooltip.opacity,r.svgTooltip.appendTo(r.tooltipEle),t&&Math.abs(i-r.tooltipEle.getBoundingClientRect().top)<=0&&(r.tooltipEle.style.top=parseFloat(r.tooltipEle.style.top)+20+"px")}})),this.gauge.renderReactTemplates()}else if((n.id===this.gauge.element.id+"_CircularGaugeTitle"||n.id.indexOf("_gauge_legend_")>-1)&&e.target.textContent.indexOf("...")>-1)Fe(e,t,i,this.gauge,!1);else{this.removeTooltip()&&(this.gauge.isVue||this.gauge.isVue3?this.gauge.clearTemplate([this.tooltipEle.children[0].id],[0]):this.gauge.isAngular||this.gauge.clearTemplate())}var q=document.getElementById(this.gaugeId).getBoundingClientRect(),J=s?this.tooltipEle.getBoundingClientRect():null;if(s&&this.tooltipEle.offsetLeft<0&&J.left-q.left<0){var $=this.tooltipEle.style.left.split("px")[0];this.tooltipEle.style.left=parseInt($,10)+(q.left-J.left)+"px"}s&&J.top<0&&(this.tooltipEle.style.top="0px")},e.prototype.svgTooltipCreate=function(e,n,o,a,r,l,s,d,g){var u={color:g.color||this.gauge.themeStyle.tooltipBorderColor||"",width:g.width,dashArray:g.dashArray};return e=new i.Tooltip({theme:l.theme,enable:!0,data:{value:n.content},template:o,enableRTL:l.enableRtl,enableAnimation:n.tooltip.enableAnimation,content:[t.SanitizeHtmlHelper.sanitize(n.content)],location:n.location,inverted:a,areaBounds:r,fill:s||l.themeStyle.tooltipFillColor,textStyle:d,availableSize:l.availableSize,border:u,enableShadow:!0}),(l.isVue||l.isVue3)&&(e.controlInstance=l),e},e.prototype.tooltipElement=function(){document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=(0,t.createElement)("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip"}),this.tooltipEle.style.cssText="position: absolute;pointer-events:none;",document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle))},e.prototype.checkParentAnnotationId=function(e){for(this.annotationTargetElement=e.parentElement;null!=this.annotationTargetElement;){if(this.annotationTargetElement.id.indexOf("_Annotation_")>=0)return e=this.annotationTargetElement,!0;this.annotationTargetElement=this.annotationTargetElement.parentElement}return!1},e.prototype.roundedValue=function(e){return this.currentAxis.roundingPlaces?parseFloat(e.toFixed(this.currentAxis.roundingPlaces)):e},e.prototype.findPosition=function(e,t,i,n){var o,a,r,l;switch(!0){case t>=0&&t<45:this.arrowInverted=!0,o=t>=15&&t<=30?i.y:0,this.tooltipRect=new z(e.x,e.y+a,e.width,e.height),this.tooltipPosition="RightBottom";break;case t>=45&&t<90:this.arrowInverted=!1,this.tooltipRect=new z(e.x,e.y+i.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case t>=90&&t<135:this.arrowInverted=!1,this.tooltipRect=new z(e.x,e.y+i.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case t>=135&&t<180:this.arrowInverted=!!n||n,a=t>=150&&t<=160&&n?i.y:0,this.tooltipRect=new z(e.x,e.y+a,e.width,e.height),this.tooltipPosition="LeftBottom";break;case t>=180&&t<225:this.arrowInverted=!0,r=t>=200&&t<=225?Math.abs(e.y-i.y):e.height,this.tooltipRect=new z(e.x-i.x,e.y,e.width,r),this.tooltipPosition="LeftTop";break;case t>=225&&t<270:this.arrowInverted=!1,l=t>=250&&t<=290?e.width:Math.abs(e.x-i.x),this.tooltipRect=new z(e.x+10,e.y,l,e.height),this.tooltipPosition="TopLeft";break;case t>=270&&t<315:this.arrowInverted=!1,o=t>=270&&t>290?i.x-10:0,this.tooltipRect=new z(e.x+o,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case t>=315&&t<=360:this.arrowInverted=!0,r=t>=315&&t<=340?Math.abs(e.y-i.y):e.height,this.tooltipRect=new z(e.x,e.y,e.width,r),this.tooltipPosition="RightTop"}return this.tooltipRect},e.prototype.removeTooltip=function(){var e=!1;if(document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0){var i=document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0];i&&((0,t.remove)(i),e=!0),this.pointerEle=null}return e},e.prototype.mouseUpHandler=function(e){this.removeTooltip(),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),this.gauge.element.addEventListener("contextmenu",this.removeTooltip))},e.prototype.removeEventListener=function(){if(this.gauge){if(this.gauge.isDestroyed)return;this.gauge.off(t.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(t.Browser.touchEndEvent,this.mouseUpHandler),this.gauge.element.removeEventListener("contextmenu",this.removeTooltip)}},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(){this.tooltipEle=null,this.currentAxis=null,this.tooltip=null,this.currentPointer=null,this.currentRange=null,this.currentAnnotation=null,(0,t.isNullOrUndefined)(this.svgTooltip)||(this.svgTooltip.destroy(),this.svgTooltip.controlInstance=null,F(this.tooltipId)),this.svgTooltip=null,this.tooltipRect=null,this.pointerEle=null,this.annotationTargetElement=null,this.gauge=null},e}();function Te(e,t,i){for(var n=0,o=i.length;e<o;e++)n+=i[e];return n}function Ee(e,t,i){var n=0,o=0,a=t.filter((function(t){return n=Math.min(t.start,t.end),o=Math.max(t.start,t.end),e>=n&&o>=e}));return a.length?a[0].rangeColor:i}var ke=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,i,n){var o=e.background;this.setRangeColor(e),null!==o&&g(new L(n.element.id+"_AxisOuterLine_"+t,o,0,"transparent",null,"0",y(n.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,n)},e.prototype.checkAngles=function(e){e.startAngle=e.startAngle>=360?360:e.startAngle<=-360?-360:e.startAngle,e.endAngle=e.endAngle>=360?360:e.endAngle<=-360?-360:e.endAngle},e.prototype.drawAxisLine=function(e,t,i,n){var o=e.startAngle,a=e.endAngle,r=e.lineStyle.color||this.gauge.themeStyle.lineColor;e.lineStyle.width>0&&this.gauge.allowComponentRender&&(o=u(o,a)?[0,a=360][0]:o,g(new L(n.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,r,null,e.lineStyle.dashArray,y(n.midPoint,o-90,a-90,e.currentRadius),"",n.allowLoadingAnimation?"visibility: hidden; pointer-events:none;":"pointer-events:none;"),i,n))},e.prototype.drawAxisLabels=function(e,t,i,n){var o,a,r,l,s,g,h,c,y,f,x,v,b,A,C,S,P=n.renderer.createGroup({id:n.element.id+"_Axis_Labels_"+t,style:n.allowLoadingAnimation?"visibility: hidden;":"pointer-events:auto;"}),w=e.visibleRange.min,F=e.visibleRange.max,R=e.visibleLabels,_=!0,T=e.labelStyle,E=e.currentRadius;S="Inside"===T.position&&"Outside"===e.majorTicks.position&&"Outside"===e.minorTicks.position||"Outside"===T.position&&"Inside"===e.minorTicks.position&&"Inside"===e.majorTicks.position?e.lineStyle.width+e.currentRadius/20:T.position===e.majorTicks.position?e.currentRadius/20:e.currentRadius/40;var k=e.labelStyle.shouldMaintainPadding?10:S,M=T.font.color||this.gauge.themeStyle.labelColor;"Outside"===T.position?E+=e.nearSize-(e.maxLabelSize.height+e.lineStyle.width/2)+k/2:"Cross"===T.position?E=E-e.maxLabelSize.height/4-e.labelStyle.offset:E-=e.farSize-(e.maxLabelSize.height+e.lineStyle.width/2)+(T.autoAngle?k:0),e.hideIntersectingLabel&&(c=m(y=Math.round(p(R[R.length-1].value,F,w,e.startAngle,e.endAngle,"ClockWise"===e.direction)),E,n.midPoint),f=this.findAnchor(c,T,y,R[R.length-1]),x=!e.showLastLabel&&u(e.startAngle,e.endAngle)&&"First"!==T.hiddenLabel?R[0].size.width:R[R.length-1].size.width,v=!e.showLastLabel&&u(e.startAngle,e.endAngle)&&"First"!==T.hiddenLabel?T.autoAngle?R[0].size.width:R[0].size.height:T.autoAngle?R[R.length-1].size.width:R[R.length-1].size.height,v-=this.offsetAxisLabelsize(y,v),c=this.getAxisLabelStartPosition(c,x,f));for(var O=0,L=R.length;O<L;O++)if(C=R[O],o=m(A=Math.round(p(C.value,F,w,e.startAngle,e.endAngle,"ClockWise"===e.direction)),E,n.midPoint),b=this.findAnchor(o,T,A,C),e.hideIntersectingLabel&&(h=m(A,E,n.midPoint),l=C.size.width,s=T.autoAngle?l:C.size.height,s-=this.offsetAxisLabelsize(A,s),h=this.getAxisLabelStartPosition(h,l,b),0===O&&(g=m(A,E,n.midPoint),a=C.size.width,r=T.autoAngle?a:C.size.height,r-=this.offsetAxisLabelsize(A,r),g=this.getAxisLabelStartPosition(g,a,b))),!(0===O&&"First"===T.hiddenLabel||O===L-1&&"Last"===T.hiddenLabel)){var I={size:T.font.size||this.gauge.themeStyle.fontSize,color:T.font.color,fontFamily:T.font.fontFamily||this.gauge.themeStyle.labelFontFamily,fontWeight:T.font.fontWeight||this.gauge.themeStyle.fontWeight,fontStyle:T.font.fontStyle,opacity:T.font.opacity};if(e.hideIntersectingLabel&&0!==O){var B=O===R.length-1||!u(e.startAngle,e.endAngle)&&!e.showLastLabel||this.FindAxi