/**
 * Highcharts JS v11.2.0 (2023-10-30)
 *
 * Series on point module
 *
 * (c) 2010-2022 Highsoft AS
 * Author: Rafal Sebestjanski and Piotr Madej
 *
 * License: www.highcharts.com/license
 */!function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/series-on-point",["highcharts"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function i(t,e,i,o){t.hasOwnProperty(e)||(t[e]=o.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}i(e,"Series/SeriesOnPointComposition.js",[e["Core/Series/Point.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Utilities.js"]],function(t,e,i,o,s){var r;let{bubble:n,pie:h,sunburst:a}=i.seriesTypes,{addEvent:d,defined:p,find:c,isNumber:l}=s;return function(i){let r=[];i.compose=function(t,i){let{chartGetZData:o,seriesAfterInit:n,seriesAfterRender:p,seriesGetCenter:c,seriesShowOrHide:l,seriesTranslate:u}=a.prototype;return h.prototype.onPointSupported=!0,s.pushUnique(r,t)&&(d(e,"afterInit",n),d(e,"afterRender",p),d(e,"afterGetCenter",c),d(e,"hide",l),d(e,"show",l),d(e,"translate",u)),s.pushUnique(r,i)&&(d(i,"beforeRender",o),d(i,"beforeRedraw",o)),t};class a{constructor(t){this.getRadii=n.prototype.getRadii,this.getRadius=n.prototype.getRadius,this.getPxExtremes=n.prototype.getPxExtremes,this.getZExtremes=n.prototype.getZExtremes,this.chart=t.chart,this.series=t,this.options=t.options.onPoint}drawConnector(){this.connector||(this.connector=this.series.chart.renderer.path().addClass("highcharts-connector-seriesonpoint").attr({zIndex:-1}).add(this.series.markerGroup));let t=this.getConnectorAttributes();t&&this.connector.animate(t)}getConnectorAttributes(){let e=this.series.chart,i=this.options;if(!i)return;let s=i.connectorOptions||{},r=i.position,n=e.get(i.id);if(!(n instanceof t)||!r||!p(n.plotX)||!p(n.plotY))return;let h=p(r.x)?r.x:n.plotX,a=p(r.y)?r.y:n.plotY,d=h+(r.offsetX||0),c=a+(r.offsetY||0),l=s.width||1,u=s.stroke||this.series.color,f=s.dashstyle,m={d:o.prototype.crispLine([["M",h,a],["L",d,c]],l,"ceil"),"stroke-width":l};return e.styledMode||(m.stroke=u,m.dashstyle=f),m}seriesAfterInit(){this.onPointSupported&&this.options.onPoint&&(this.bubblePadding=!0,this.useMapGeometry=!0,this.onPoint=new a(this))}seriesAfterRender(){delete this.chart.bubbleZExtremes,this.onPoint&&this.onPoint.drawConnector()}seriesGetCenter(e){let i=this.options.onPoint,o=e.positions;if(i){let e=this.chart.get(i.id);e instanceof t&&p(e.plotX)&&p(e.plotY)&&(o[0]=e.plotX,o[1]=e.plotY);let s=i.position;s&&(p(s.x)&&(o[0]=s.x),p(s.y)&&(o[1]=s.y),s.offsetX&&(o[0]+=s.offsetX),s.offsetY&&(o[1]+=s.offsetY))}let s=this.radii&&this.radii[this.index];l(s)&&(o[2]=2*s),e.positions=o}seriesShowOrHide(){let t=this.chart.series;this.points.forEach(e=>{let i=c(t,t=>{let i=((t.onPoint||{}).options||{}).id;return!!i&&i===e.id});i&&i.setVisible(!i.visible,!1)})}seriesTranslate(){this.onPoint&&(this.onPoint.getRadii(),this.radii=this.onPoint.radii)}chartGetZData(){let t=[];this.series.forEach(e=>{let i=e.options.onPoint;t.push(i&&i.z?i.z:null)}),this.series.forEach(e=>{e.onPoint&&(e.onPoint.zData=e.zData=t)})}}i.Additions=a}(r||(r={})),r}),i(e,"masters/modules/series-on-point.src.js",[e["Series/SeriesOnPointComposition.js"]],function(e){e.compose(t.Series,t.Chart)})});//# sourceMappingURL=series-on-point.js.map