/**
 * Highcharts JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/solid-gauge
 * @requires highcharts
 * @requires highcharts/highcharts-more
 *
 * Solid angular gauge module
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Torstein Hønsi
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */import*as t from"../highcharts.js";var e,o,s={};s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var o in e)s.o(e,o)&&!s.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);let a=t.default;var r=s.n(a);let{defaultOptions:i}=r(),{noop:l}=r(),n={radius:0,scope:"stack",where:void 0},d=t.default.SeriesRegistry;var h=s.n(d);let c=t.default.Color,{parse:p}=s.n(c)();(e=o||(o={})).initDataClasses=function(t){let e=this.chart,o=this.legendItem=this.legendItem||{},s=this.options,r=t.dataClasses||[],i,l,n=e.options.chart.colorCount,d=0,h;this.dataClasses=l=[],o.labels=[];for(let t=0,o=r.length;t<o;++t)i=r[t],i=(0,a.merge)(i),l.push(i),(e.styledMode||!i.color)&&("category"===s.dataClassColor?(e.styledMode||(n=(h=e.options.colors||[]).length,i.color=h[d]),i.colorIndex=d,++d===n&&(d=0)):i.color=p(s.minColor).tweenTo(p(s.maxColor),o<2?.5:t/(o-1)))},e.initStops=function(){let t=this.options,e=this.stops=t.stops||[[0,t.minColor||""],[1,t.maxColor||""]];for(let t=0,o=e.length;t<o;++t)e[t].color=p(e[t][1])},e.normalizedValue=function(t){let e=this.max||0,o=this.min||0;return this.logarithmic&&(t=this.logarithmic.log2lin(t)),1-(e-t)/(e-o||1)},e.toColor=function(t,e){let o,s,a,r,i,l,n=this.dataClasses,d=this.stops;if(n){for(l=n.length;l--;)if(s=(i=n[l]).from,a=i.to,(void 0===s||t>=s)&&(void 0===a||t<=a)){r=i.color,e&&(e.dataClass=l,e.colorIndex=i.colorIndex);break}}else{for(o=this.normalizedValue(t),l=d.length;l--&&!(o>d[l][0]););s=d[l]||d[l+1],o=1-((a=d[l+1]||s)[0]-o)/(a[0]-s[0]||1),r=s.color.tweenTo(a.color,o)}return r};let g=o,u=function(t){(0,a.extend)(t,g)},{gauge:m,pie:f}=h().seriesTypes;class C extends m{translate(){let t=this.yAxis;u(t),!t.dataClasses&&t.options.dataClasses&&t.initDataClasses(t.options),t.initStops(),m.prototype.translate.call(this)}drawPoints(){var t;let e,o=this.yAxis,s=o.center,r=this.options,i=this.chart.renderer,l=r.overshoot,d=r.rounded,h=(t=d?"50%":r.borderRadius??o.pane.options.borderRadius,!(0,a.isObject)(t)&&(t={radius:t||0}),(0,a.merge)(n,void 0,t)).radius,c=(0,a.isNumber)(l)?l/180*Math.PI:0;for(let t of((0,a.isNumber)(r.threshold)&&(e=o.startAngleRad+o.translate(r.threshold,void 0,void 0,void 0,!0)),this.thresholdAngleRad=(0,a.pick)(e,o.startAngleRad),this.points))if(!t.isNull){let e=o.pane.options.innerSize,l=(0,a.relativeLength)(t.options.radius??r.radius??"100%",s[2]/2),n=Math.min((0,a.relativeLength)(t.options.innerRadius??r.innerRadius??((0,a.isNumber)(e)?e/2:e)??0,s[2]/2),l),p=Math.min(o.startAngleRad,o.endAngleRad),g=Math.max(o.startAngleRad,o.endAngleRad),u={},m=t.graphic,f=o.startAngleRad+o.translate(t.y,void 0,void 0,void 0,!0),C,v,y=o.toColor(t.y,t),R=t.getClassName();"none"===y&&(y=t.color||this.color||"none"),"none"!==y&&(t.color=y),f=(0,a.clamp)(f,p-c,g+c),!1===r.wrap&&(f=(0,a.clamp)(f,p,g));let A=d?(l-n)/2/l:0,x=Math.min(f,this.thresholdAngleRad)-A,b=Math.max(f,this.thresholdAngleRad)+A;b-x>2*Math.PI&&(b=x+2*Math.PI),t.shapeArgs=C={x:s[0],y:s[1],r:l,innerR:n,start:x,end:b,borderRadius:h},t.startR=l,"none"!==y&&(u.fill=y),m?(v=C.d,m.animate((0,a.extend)(u,C)),v&&(C.d=v)):(u["sweep-flag"]=0,t.graphic=m=i.arc(C).attr(u).add(this.group)),i.styledMode?this.yAxis?.stops&&(R=R.replace(/highcharts-color-\d/gm,"").trim()):("square"!==r.linecap&&m.attr({"stroke-linecap":"round","stroke-linejoin":"round"}),m.attr({stroke:r.borderColor||"none","stroke-width":r.borderWidth||0})),m&&m.addClass(R);let M=n+(l-n)*.5;t.tooltipPos=[s[0]+Math.cos(f)*M,s[1]+Math.sin(f)*M]}}animate(t){t||(this.startAngleRad=this.thresholdAngleRad,f.prototype.animate.call(this,t))}}C.defaultOptions=(0,a.merge)(m.defaultOptions,{colorByPoint:!0,dataLabels:{verticalAlign:"middle",y:0}}),h().registerSeriesType("solidgauge",C);let v=r();export{v as default};