/**
 * Highcharts JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/series-on-point
 * @requires highcharts
 *
 * Series on point module
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Rafał Sebestjański and Piotr Madej
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */import*as t from"../highcharts.js";var e,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 i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);let i=t.default;var o=s.n(i);let{setLength:r,splice:n}={convertToNumber:function(t,e){switch(typeof t){case"boolean":return+!!t;case"number":return isNaN(t)&&!e?null:t;default:return isNaN(t=parseFloat(`${t??""}`))&&!e?null:t}},setLength:function(t,e,s){return Array.isArray(t)?(t.length=e,t):t[s?"subarray":"slice"](0,e)},splice:function(t,e,s,i,o=[]){if(Array.isArray(t))return Array.isArray(o)||(o=Array.from(o)),{removed:t.splice(e,s,...o),array:t};let r=Object.getPrototypeOf(t).constructor,n=t[i?"subarray":"slice"](e,e+s),a=new r(t.length-s+o.length);return a.set(t.subarray(0,e),0),a.set(o,e),a.set(t.subarray(e+s),e+o.length),{removed:n,array:a}}},a=class{constructor(t={}){this.isDataTable=!0,this.autoId=!t.id,this.columns={},this.id=t.id||(0,i.uniqueKey)(),this.rowCount=0,this.versionTag=(0,i.uniqueKey)();let e=0;(0,i.objectEach)(t.columns||{},(t,s)=>{this.columns[s]=t.slice(),e=Math.max(e,t.length)}),this.applyRowCount(e)}applyRowCount(t){this.rowCount=t,(0,i.objectEach)(this.columns,(e,s)=>{e.length!==t&&(this.columns[s]=r(e,t))})}deleteRows(t,e=1){if(e>0&&t<this.rowCount){let s=0;(0,i.objectEach)(this.columns,(i,o)=>{this.columns[o]=n(i,t,e).array,s=i.length}),this.rowCount=s}(0,i.fireEvent)(this,"afterDeleteRows",{rowIndex:t,rowCount:e}),this.versionTag=(0,i.uniqueKey)()}getColumn(t,e){return this.columns[t]}getColumns(t,e){return(t||Object.keys(this.columns)).reduce((t,e)=>(t[e]=this.columns[e],t),{})}getRowObject(t,e){let s={},i=this.columns;for(let o of(e??(e=Object.keys(this.columns)),e))s[o]=i[o]?.[t];return s}setColumn(t,e=[],s=0,i){this.setColumns({[t]:e},s,i)}setColumns(t,e,s){let o=this.rowCount;(0,i.objectEach)(t,(t,e)=>{this.columns[e]=t.slice(),o=t.length}),this.applyRowCount(o),s?.silent||((0,i.fireEvent)(this,"afterSetColumns"),this.versionTag=(0,i.uniqueKey)())}setRow(t,e=this.rowCount,s,o){var r;let{columns:a}=this,h=s?this.rowCount+1:e+1,l=Object.keys(t);if(o?.addColumns!==!1)for(let t=0,e=l.length;t<e;t++)a[r=l[t]]||(a[r]=Array(this.rowCount));(0,i.objectEach)(a,(i,o)=>{i&&(s?i=n(i,e,0,!0,[t[o]]).array:i[e]=o in t?t[o]:i[e],a[o]=i)}),this.applyRowCount(Math.max(h,this.rowCount)),o?.silent||((0,i.fireEvent)(this,"afterSetRows",{rowIndex:e}),this.versionTag=(0,i.uniqueKey)())}getModified(){return this.modified||this}},h=t.default.Point;var l=s.n(h);let d=t.default.SeriesRegistry;var u=s.n(d);let c=t.default.SVGRenderer;var p=s.n(c);let{composed:f}=o(),{bubble:y}=u().seriesTypes;var m=e||(e={});m.compose=function(t,e){if((0,i.pushUnique)(f,"SeriesOnPoint")){let{chartGetZData:s,seriesAfterInit:o,seriesAfterRender:r,seriesGetCenter:n,seriesShowOrHide:a,seriesTranslate:h}=g.prototype;t.types.pie.prototype.onPointSupported=!0,(0,i.addEvent)(t,"afterInit",o),(0,i.addEvent)(t,"afterRender",r),(0,i.addEvent)(t,"afterGetCenter",n),(0,i.addEvent)(t,"hide",a),(0,i.addEvent)(t,"show",a),(0,i.addEvent)(t,"translate",h),(0,i.addEvent)(e,"beforeRender",s),(0,i.addEvent)(e,"beforeRedraw",s)}return t};class g{constructor(t){this.getColumn=y.prototype.getColumn,this.getRadii=y.prototype.getRadii,this.getRadius=y.prototype.getRadius,this.getPxExtremes=y.prototype.getPxExtremes,this.getZExtremes=y.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 t=this.series.chart,e=this.options;if(!e)return;let s=e.connectorOptions||{},o=e.position,r=t.get(e.id);if(!(r instanceof l())||!o||!(0,i.defined)(r.plotX)||!(0,i.defined)(r.plotY))return;let n=(0,i.defined)(o.x)?o.x:r.plotX,a=(0,i.defined)(o.y)?o.y:r.plotY,h=n+(o.offsetX||0),d=a+(o.offsetY||0),u=s.width||1,c=s.stroke||this.series.color,f=s.dashstyle,y={d:p().prototype.crispLine([["M",n,a],["L",h,d]],u),"stroke-width":u};return t.styledMode||(y.stroke=c,y.dashstyle=f),y}seriesAfterInit(){this.onPointSupported&&this.options.onPoint&&(this.bubblePadding=!0,this.useMapGeometry=!0,this.onPoint=new g(this))}seriesAfterRender(){delete this.chart.bubbleZExtremes,this.onPoint&&this.onPoint.drawConnector()}seriesGetCenter(t){let e=this.options.onPoint,s=t.positions;if(e){let t=this.chart.get(e.id);t instanceof l()&&(0,i.defined)(t.plotX)&&(0,i.defined)(t.plotY)&&(s[0]=t.plotX,s[1]=t.plotY);let o=e.position;o&&((0,i.defined)(o.x)&&(s[0]=o.x),(0,i.defined)(o.y)&&(s[1]=o.y),o.offsetX&&(s[0]+=o.offsetX),o.offsetY&&(s[1]+=o.offsetY))}let o=this.radii&&this.radii[this.index];(0,i.isNumber)(o)&&(s[2]=2*o),t.positions=s}seriesShowOrHide(){let t=this.chart.series;this.points?.forEach(e=>{let s=(0,i.find)(t,t=>{let s=((t.onPoint||{}).options||{}).id;return!!s&&s===e.id});s&&s.setVisible(!s.visible,!1)})}seriesTranslate(){this.onPoint&&(this.onPoint.getRadii(),this.radii=this.onPoint.radii)}chartGetZData(){let t=[];this.series.forEach(e=>{let s=e.options.onPoint;t.push(s?.z??null)});let e=new a({columns:{z:t}});this.series.forEach(t=>{t.onPoint&&(t.onPoint.dataTable=t.dataTable=e)})}}m.Additions=g;let b=e,w=o();b.compose(w.Series,w.Chart);let C=o();export{C as default};