!/**
 * Highcharts JS v12.5.0 (2026-01-12)
 * @module highcharts/modules/networkgraph
 * @requires highcharts
 *
 * Force directed graph module
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Torstein Honsi
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("highcharts"),require("highcharts").SVGElement,require("highcharts").SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/networkgraph",[["highcharts/highcharts"],["highcharts/highcharts","SVGElement"],["highcharts/highcharts","SeriesRegistry"]],e):"object"==typeof exports?exports["highcharts/modules/networkgraph"]=e(require("highcharts"),require("highcharts").SVGElement,require("highcharts").SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.SVGElement,t.Highcharts.SeriesRegistry)}(this,function(t,e,i){return function(){"use strict";var o,s,r,n={28:function(t){t.exports=e},512:function(t){t.exports=i},944:function(e){e.exports=t}},a={};function h(t){var e=a[t];if(void 0!==e)return e.exports;var i=a[t]={exports:{}};return n[t](i,i.exports,h),i.exports}h.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return h.d(e,{a:e}),e},h.d=function(t,e){for(var i in e)h.o(e,i)&&!h.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},h.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var p={};h.d(p,{default:function(){return tI}});var d=h(944),l=h.n(d),c=h(28),u=h.n(c),f=l().composed,y=l().addEvent,m=l().pushUnique;function g(){var t,e,i,o,s=this;s.container&&(t=y(s.container,"mousedown",function(t){e&&e(),i&&i(),(o=s.hoverPoint)&&o.series&&o.series.hasDraggableNodes&&o.series.options.draggable&&(o.series.onMouseDown(o,t),e=y(s.container,"mousemove",function(t){return o&&o.series&&o.series.onMouseMove(o,t)}),i=y(s.container.ownerDocument,"mouseup",function(t){return e(),i(),o&&o.series&&o.series.onMouseUp(o,t)}))})),y(s,"destroy",function(){t()})}var v={compose:function(t){m(f,"DragNodes")&&y(t,"load",g)},onMouseDown:function(t,e){var i,o=this.chart.options.chart.panKey;if(!(o&&e[""+o+"Key"])){var s=(null==(i=this.chart.pointer)?void 0:i.normalize(e))||e;t.fixedPosition={chartX:s.chartX,chartY:s.chartY,plotX:t.plotX,plotY:t.plotY},t.inDragMode=!0}},onMouseMove:function(t,e){var i;if(t.fixedPosition&&t.inDragMode){var o=this.chart,s=(null==(i=o.pointer)?void 0:i.normalize(e))||e,r=t.fixedPosition.chartX-s.chartX,n=t.fixedPosition.chartY-s.chartY,a=o.graphLayoutsLookup,h=void 0,p=void 0;(Math.abs(r)>5||Math.abs(n)>5)&&(h=t.fixedPosition.plotX-r,p=t.fixedPosition.plotY-n,o.isInsidePlot(h,p)&&(t.plotX=h,t.plotY=p,t.hasDragged=!0,this.redrawHalo(t),a.forEach(function(t){t.restartSimulation()})))}},onMouseUp:function(t){t.fixedPosition&&(t.hasDragged&&(this.layout.enableSimulation?this.layout.start():this.chart.redraw()),t.inDragMode=t.hasDragged=!1,this.options.fixedDraggable||delete t.fixedPosition)},redrawHalo:function(t){t&&this.halo&&this.halo.attr({d:t.haloPath(this.options.states.hover.halo.size)})}},b=l().setAnimation,x=l().composed,k=l().addEvent,N=l().pushUnique;function L(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(function(t){t.updateSimulation()}),this.redraw())}function P(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(function(t){t.updateSimulation(!1)}),this.redraw())}function w(){this.graphLayoutsLookup&&this.graphLayoutsLookup.forEach(function(t){t.stop()})}function S(){var t,e,i=!1,o=function(t){t.maxIterations--&&isFinite(t.temperature)&&!t.isStable()&&!t.enableSimulation&&(t.beforeStep&&t.beforeStep(),t.step(),e=!1,i=!0)};if(this.graphLayoutsLookup&&!(null==(t=this.pointer)?void 0:t.hasDragged)){for(b(!1,this),this.graphLayoutsLookup.forEach(function(t){return t.start()});!e;)e=!0,this.graphLayoutsLookup.forEach(o);i&&this.series.forEach(function(t){t&&t.layout&&t.render()})}}var M=function(t){N(x,"GraphLayout")&&(k(t,"afterPrint",L),k(t,"beforePrint",P),k(t,"predraw",w),k(t,"render",S))},T={},X={},Y=h(512),D=h.n(Y),E=D().series,F=E.prototype,O=E.prototype.pointClass.prototype,C=l().defined,A=l().extend,I=l().find,R=l().merge,_=l().pick;!function(t){function e(){return this.data=[].concat(this.points||[],this.nodes),F.destroy.apply(this,arguments)}function i(){this.nodes&&(this.nodes.forEach(function(t){t.destroy()}),this.nodes.length=0),F.setData.apply(this,arguments)}function o(t){var e=arguments,i=this.isNode?this.linksTo.concat(this.linksFrom):[this.fromNode,this.toNode];"select"!==t&&i.forEach(function(t){t&&t.series&&(O.setState.apply(t,e),!t.isNode&&(t.fromNode.graphic&&O.setState.apply(t.fromNode,e),t.toNode&&t.toNode.graphic&&O.setState.apply(t.toNode,e)))}),O.setState.apply(this,e)}function s(t,e,i,o){var s=this,r=this.series.options.nodes,n=this.series.options.data,a=(null==n?void 0:n.length)||0,h=null==n?void 0:n[this.index];if(O.update.call(this,t,!this.isNode&&e,i,o),this.isNode){var p=(r||[]).reduce(function(t,e,i){return s.id===e.id?i:t},-1),d=R(r&&r[p]||{},(null==n?void 0:n[this.index])||{});n&&(h?n[this.index]=h:n.length=a),r?p>=0?r[p]=d:r.push(d):this.series.options.nodes=[d],_(e,!0)&&this.series.chart.redraw(i)}}t.compose=function(t,r){var n=t.prototype,a=r.prototype;return n.setNodeState=o,n.setState=o,n.update=s,a.destroy=e,a.setData=i,r},t.createNode=function(t){var e,i=this.pointClass,o=function(t,e){return I(t,function(t){return t.id===e})},s=o(this.nodes,t);if(!s){e=this.options.nodes&&o(this.options.nodes,t);var r=new i(this,A({className:"highcharts-node",isNode:!0,id:t,y:1},e));r.linksTo=[],r.linksFrom=[],r.getSum=function(){var t=0,e=0;return r.linksTo.forEach(function(e){t+=e.weight||0}),r.linksFrom.forEach(function(t){e+=t.weight||0}),Math.max(t,e)},r.offset=function(t,e){for(var i=0,o=0;o<r[e].length;o++){if(r[e][o]===t)return i;i+=r[e][o].weight}},r.hasShape=function(){var t=0;return r.linksTo.forEach(function(e){e.outgoing&&t++}),!r.linksTo.length||t!==r.linksTo.length},r.index=this.nodes.push(r)-1,s=r}return s.formatPrefix="node",s.name=s.name||s.options.id||"",s.mass=_(s.options.mass,s.options.marker&&s.options.marker.radius,this.options.marker&&this.options.marker.radius,4),s},t.destroy=e,t.generatePoints=function(){var t=this,e=this.chart,i={};F.generatePoints.call(this),this.nodes||(this.nodes=[]),this.colorCounter=0,this.nodes.forEach(function(t){t.linksFrom.length=0,t.linksTo.length=0,t.level=t.options.level}),this.points.forEach(function(o){C(o.from)&&(i[o.from]||(i[o.from]=t.createNode(o.from)),i[o.from].linksFrom.push(o),o.fromNode=i[o.from],e.styledMode?o.colorIndex=_(o.options.colorIndex,i[o.from].colorIndex):o.color=o.options.color||i[o.from].color),C(o.to)&&(i[o.to]||(i[o.to]=t.createNode(o.to)),i[o.to].linksTo.push(o),o.toNode=i[o.to]),o.name=o.name||o.id},this),this.nodeLookup=i},t.setNodeState=o,t.updateNode=s}(r||(r={}));var q=r,B=(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),G=D().series,H=G.prototype,j=G.prototype.pointClass,K=l().addEvent,U=l().css,z=l().defined,V=l().extend,Q=l().pick,W=function(t){function e(e,i,o){var s=t.call(this,e,i,o)||this;return s.series.options.draggable&&!s.series.chart.styledMode&&(K(s,"mouseOver",function(){U(this.series.chart.container,{cursor:"move"})}),K(s,"mouseOut",function(){U(this.series.chart.container,{cursor:"default"})})),s}return B(e,t),e.prototype.destroy=function(){return this.isNode&&this.linksFrom.concat(this.linksTo).forEach(function(t){t.destroyElements&&t.destroyElements()}),this.series.layout.removeElementFromCollection(this,this.series.layout[this.isNode?"nodes":"links"]),j.prototype.destroy.apply(this,arguments)},e.prototype.getDegree=function(){var t=this.isNode?this.linksFrom.length+this.linksTo.length:0;return 0===t?1:t},e.prototype.getLinkAttributes=function(){var t=this.series.options.link,e=this.options;return{"stroke-width":Q(e.width,t.width),stroke:e.color||t.color,dashstyle:e.dashStyle||t.dashStyle,opacity:Q(e.opacity,t.opacity,1)}},e.prototype.getLinkPath=function(){var t=this.fromNode,e=this.toNode;return t.plotX>e.plotX&&(t=this.toNode,e=this.fromNode),[["M",t.plotX||0,t.plotY||0],["L",e.plotX||0,e.plotY||0]]},e.prototype.getMass=function(){var t=this.fromNode.mass,e=this.toNode.mass,i=t+e;return{fromNode:1-t/i,toNode:1-e/i}},e.prototype.isValid=function(){return!this.isNode||z(this.id)},e.prototype.redrawLink=function(){var t,e=this.getLinkPath();if(this.graphic){this.shapeArgs={d:e},this.series.chart.styledMode||(t=this.series.pointAttribs(this),this.graphic.attr(t),(this.dataLabels||[]).forEach(function(e){e&&e.attr({opacity:t.opacity})})),this.graphic.animate(this.shapeArgs);var i=e[0],o=e[1];"M"===i[0]&&"L"===o[0]&&(this.plotX=(i[1]+o[1])/2,this.plotY=(i[2]+o[2])/2)}},e.prototype.remove=function(t,e){var i,o=this.series,s=o.options.nodes||[],r=s.length;if(this.isNode){for(o.points=[],[].concat(this.linksFrom).concat(this.linksTo).forEach(function(t){(i=t.fromNode.linksFrom.indexOf(t))>-1&&t.fromNode.linksFrom.splice(i,1),(i=t.toNode.linksTo.indexOf(t))>-1&&t.toNode.linksTo.splice(i,1),H.removePoint.call(o,o.data.indexOf(t),!1,!1)}),o.points=o.data.slice(),o.nodes.splice(o.nodes.indexOf(this),1);r--;)if(s[r].id===this.options.id){o.options.nodes.splice(r,1);break}this&&this.destroy(),o.isDirty=!0,o.isDirtyData=!0,t&&o.chart.redraw(t)}else o.removePoint(o.data.indexOf(this),t,e)},e.prototype.renderLink=function(){var t;!this.graphic&&(this.graphic=this.series.chart.renderer.path(this.getLinkPath()).addClass(this.getClassName(),!0).add(this.series.group),this.series.chart.styledMode||(t=this.series.pointAttribs(this),this.graphic.attr(t),(this.dataLabels||[]).forEach(function(e){e&&e.attr({opacity:t.opacity})})))},e}(j);V(W.prototype,{setState:q.setNodeState});var J={stickyTracking:!1,inactiveOtherPoints:!0,marker:{enabled:!0,states:{inactive:{opacity:.3,animation:{duration:50}}}},states:{inactive:{linkOpacity:.3,animation:{duration:50}}},dataLabels:{formatter:function(){var t;return String(null!=(t=this.key)?t:"")},linkFormatter:function(){return this.fromNode.name+"<br>"+this.toNode.name},linkTextPath:{enabled:!0},textPath:{enabled:!1},style:{transition:"opacity 2000ms"},defer:!0,animation:{defer:1e3}},link:{color:"rgba(100, 100, 100, 0.5)",width:1},draggable:!0,layoutAlgorithm:{initialPositions:"circle",initialPositionRadius:1,enableSimulation:!1,theta:.5,maxSpeed:10,approximation:"none",type:"reingold-fruchterman",integration:"euler",maxIterations:1e3,gravitationalConstant:.0625,friction:-.981},showInLegend:!1},Z={attractive:function(t,e,i,o){var s=t.getMass(),r=i.x/o*e,n=i.y/o*e;t.fromNode.fixedPosition||(t.fromNode.dispX-=r*s.fromNode/t.fromNode.degree,t.fromNode.dispY-=n*s.fromNode/t.fromNode.degree),t.toNode.fixedPosition||(t.toNode.dispX+=r*s.toNode/t.toNode.degree,t.toNode.dispY+=n*s.toNode/t.toNode.degree)},attractiveForceFunction:function(t,e){return t*t/e},barycenter:function(){var t=this.options.gravitationalConstant,e=this.barycenter.xFactor,i=this.barycenter.yFactor;this.nodes.forEach(function(o){if(!o.fixedPosition){var s=o.getDegree(),r=s*(1+s/2);o.dispX+=(e-o.plotX)*t*r/o.degree,o.dispY+=(i-o.plotY)*t*r/o.degree}})},getK:function(t){return Math.pow(t.box.width*t.box.height/t.nodes.length,.3)},integrate:function(t,e){e.dispX+=e.dispX*t.options.friction,e.dispY+=e.dispY*t.options.friction;var i=e.temperature=t.vectorLength({x:e.dispX,y:e.dispY});0!==i&&(e.plotX+=e.dispX/i*Math.min(Math.abs(e.dispX),t.temperature),e.plotY+=e.dispY/i*Math.min(Math.abs(e.dispY),t.temperature))},repulsive:function(t,e,i,o){t.dispX+=i.x/o*e/t.degree,t.dispY+=i.y/o*e/t.degree},repulsiveForceFunction:function(t,e){return e*e/t}},$=function(){function t(t){this.body=!1,this.isEmpty=!1,this.isInternal=!1,this.nodes=[],this.box=t,this.boxSize=Math.min(t.width,t.height)}return t.prototype.divideBox=function(){var e=this.box.width/2,i=this.box.height/2;this.nodes[0]=new t({left:this.box.left,top:this.box.top,width:e,height:i}),this.nodes[1]=new t({left:this.box.left+e,top:this.box.top,width:e,height:i}),this.nodes[2]=new t({left:this.box.left+e,top:this.box.top+i,width:e,height:i}),this.nodes[3]=new t({left:this.box.left,top:this.box.top+i,width:e,height:i})},t.prototype.getBoxPosition=function(t){var e=t.plotX<this.box.left+this.box.width/2,i=t.plotY<this.box.top+this.box.height/2;return e?3*!i:i?1:2},t.prototype.insert=function(e,i){var o;this.isInternal?this.nodes[this.getBoxPosition(e)].insert(e,i-1):(this.isEmpty=!1,this.body?i?(this.isInternal=!0,this.divideBox(),!0!==this.body&&(this.nodes[this.getBoxPosition(this.body)].insert(this.body,i-1),this.body=!0),this.nodes[this.getBoxPosition(e)].insert(e,i-1)):((o=new t({top:e.plotX||NaN,left:e.plotY||NaN,width:.1,height:.1})).body=e,o.isInternal=!1,this.nodes.push(o)):(this.isInternal=!1,this.body=e))},t.prototype.updateMassAndCenter=function(){var t=0,e=0,i=0;if(this.isInternal){for(var o=0,s=this.nodes;o<s.length;o++){var r=s[o];r.isEmpty||(t+=r.mass,e+=r.plotX*r.mass,i+=r.plotY*r.mass)}e/=t,i/=t}else this.body&&(t=this.body.mass,e=this.body.plotX,i=this.body.plotY);this.mass=t,this.plotX=e,this.plotY=i},t}(),tt=function(){function t(t,e,i,o){this.box={left:t,top:e,width:i,height:o},this.maxDepth=25,this.root=new $(this.box),this.root.isInternal=!0,this.root.isRoot=!0,this.root.divideBox()}return t.prototype.calculateMassAndCenter=function(){this.visitNodeRecursive(null,null,function(t){t.updateMassAndCenter()})},t.prototype.insertNodes=function(t){for(var e=0;e<t.length;e++){var i=t[e];this.root.insert(i,this.maxDepth)}},t.prototype.visitNodeRecursive=function(t,e,i){var o;if(t||(t=this.root),t===this.root&&e&&(o=e(t)),!1!==o){for(var s=0,r=t.nodes;s<r.length;s++){var n=r[s];if(n.isInternal){if(e&&(o=e(n)),!1===o)continue;this.visitNodeRecursive(n,e,i)}else n.body&&e&&e(n.body);i&&i(n)}t===this.root&&i&&i(t)}},t}(),te={attractive:function(t,e,i){var o=t.getMass(),s=-i.x*e*this.diffTemperature,r=-i.y*e*this.diffTemperature;t.fromNode.fixedPosition||(t.fromNode.plotX-=s*o.fromNode/t.fromNode.degree,t.fromNode.plotY-=r*o.fromNode/t.fromNode.degree),t.toNode.fixedPosition||(t.toNode.plotX+=s*o.toNode/t.toNode.degree,t.toNode.plotY+=r*o.toNode/t.toNode.degree)},attractiveForceFunction:function(t,e){return(e-t)/t},barycenter:function(){var t=this.options.gravitationalConstant||0,e=(this.barycenter.xFactor-(this.box.left+this.box.width)/2)*t,i=(this.barycenter.yFactor-(this.box.top+this.box.height)/2)*t;this.nodes.forEach(function(t){t.fixedPosition||(t.plotX-=e/t.mass/t.degree,t.plotY-=i/t.mass/t.degree)})},getK:function(t){return Math.pow(t.box.width*t.box.height/t.nodes.length,.5)},integrate:function(t,e){var i=-t.options.friction,o=t.options.maxSpeed,s=e.prevX,r=e.prevY,n=(e.plotX+e.dispX-s)*i,a=(e.plotY+e.dispY-r)*i,h=Math.abs,p=h(n)/(n||1),d=h(a)/(a||1),l=p*Math.min(o,Math.abs(n)),c=d*Math.min(o,Math.abs(a));e.prevX=e.plotX+e.dispX,e.prevY=e.plotY+e.dispY,e.plotX+=l,e.plotY+=c,e.temperature=t.vectorLength({x:l,y:c})},repulsive:function(t,e,i){var o=e*this.diffTemperature/t.mass/t.degree;t.fixedPosition||(t.plotX+=i.x*o,t.plotY+=i.y*o)},repulsiveForceFunction:function(t,e){return(e-t)/t*(e>t)}},ti=l().win,to=l().clamp,ts=l().defined,tr=l().isFunction,tn=l().fireEvent,ta=l().pick,th=function(){function t(){this.box={},this.currentStep=0,this.initialRendering=!0,this.links=[],this.nodes=[],this.series=[],this.simulation=!1}return t.compose=function(e){M(e),T.euler=Z,T.verlet=te,X["reingold-fruchterman"]=t},t.prototype.init=function(t){this.options=t,this.nodes=[],this.links=[],this.series=[],this.box={x:0,y:0,width:0,height:0},this.setInitialRendering(!0),this.integration=T[t.integration],this.enableSimulation=t.enableSimulation,this.attractiveForce=ta(t.attractiveForce,this.integration.attractiveForceFunction),this.repulsiveForce=ta(t.repulsiveForce,this.integration.repulsiveForceFunction),this.approximation=t.approximation},t.prototype.updateSimulation=function(t){this.enableSimulation=ta(t,this.options.enableSimulation)},t.prototype.start=function(){var t=this.series,e=this.options;this.currentStep=0,this.forces=t[0]&&t[0].forces||[],this.chart=t[0]&&t[0].chart,this.initialRendering&&(this.initPositions(),t.forEach(function(t){t.finishedAnimating=!0,t.render()})),this.setK(),this.resetSimulation(e),this.enableSimulation&&this.step()},t.prototype.step=function(){var t=this,e=this.series;this.currentStep++,"barnes-hut"===this.approximation&&(this.createQuadTree(),this.quadTree.calculateMassAndCenter());for(var i=0,o=this.forces||[];i<o.length;i++)this[o[i]+"Forces"](this.temperature);if(this.applyLimits(),this.temperature=this.coolDown(this.startTemperature,this.diffTemperature,this.currentStep),this.prevSystemTemperature=this.systemTemperature,this.systemTemperature=this.getSystemTemperature(),this.enableSimulation){for(var s=0;s<e.length;s++){var r=e[s];r.chart&&r.render()}this.maxIterations--&&isFinite(this.temperature)&&!this.isStable()?(this.simulation&&ti.cancelAnimationFrame(this.simulation),this.simulation=ti.requestAnimationFrame(function(){return t.step()})):(this.simulation=!1,this.series.forEach(function(t){tn(t,"afterSimulation")}))}},t.prototype.stop=function(){this.simulation&&ti.cancelAnimationFrame(this.simulation)},t.prototype.setArea=function(t,e,i,o){this.box={left:t,top:e,width:i,height:o}},t.prototype.setK=function(){this.k=this.options.linkLength||this.integration.getK(this)},t.prototype.addElementsToCollection=function(t,e){for(var i=0;i<t.length;i++){var o=t[i];-1===e.indexOf(o)&&e.push(o)}},t.prototype.removeElementFromCollection=function(t,e){var i=e.indexOf(t);-1!==i&&e.splice(i,1)},t.prototype.clear=function(){this.nodes.length=0,this.links.length=0,this.series.length=0,this.resetSimulation()},t.prototype.resetSimulation=function(){this.forcedStop=!1,this.systemTemperature=0,this.setMaxIterations(),this.setTemperature(),this.setDiffTemperature()},t.prototype.restartSimulation=function(){this.simulation?this.resetSimulation():(this.setInitialRendering(!1),this.enableSimulation?this.start():this.setMaxIterations(1),this.chart&&this.chart.redraw(),this.setInitialRendering(!0))},t.prototype.setMaxIterations=function(t){this.maxIterations=ta(t,this.options.maxIterations)},t.prototype.setTemperature=function(){this.temperature=this.startTemperature=Math.sqrt(this.nodes.length)},t.prototype.setDiffTemperature=function(){this.diffTemperature=this.startTemperature/(this.options.maxIterations+1)},t.prototype.setInitialRendering=function(t){this.initialRendering=t},t.prototype.createQuadTree=function(){this.quadTree=new tt(this.box.left,this.box.top,this.box.width,this.box.height),this.quadTree.insertNodes(this.nodes)},t.prototype.initPositions=function(){var t=this.options.initialPositions;if(tr(t)){t.call(this);for(var e=0,i=this.nodes;e<i.length;e++){var o=i[e];ts(o.prevX)||(o.prevX=o.plotX),ts(o.prevY)||(o.prevY=o.plotY),o.dispX=0,o.dispY=0}}else"circle"===t?this.setCircularPositions():this.setRandomPositions()},t.prototype.setCircularPositions=function(){for(var t,e=this.box,i=this.nodes,o=2*Math.PI/(i.length+1),s=i.filter(function(t){return 0===t.linksTo.length}),r={},n=this.options.initialPositionRadius,a=function(t){for(var e=0,i=t.linksFrom||[];e<i.length;e++){var o=i[e];r[o.toNode.id]||(r[o.toNode.id]=!0,h.push(o.toNode),a(o.toNode))}},h=[],p=0;p<s.length;p++){var d=s[p];h.push(d),a(d)}if(h.length)for(var l=0;l<i.length;l++){var c=i[l];-1===h.indexOf(c)&&h.push(c)}else h=i;for(var u=0,f=h.length;u<f;++u)(t=h[u]).plotX=t.prevX=ta(t.plotX,e.width/2+n*Math.cos(u*o)),t.plotY=t.prevY=ta(t.plotY,e.height/2+n*Math.sin(u*o)),t.dispX=0,t.dispY=0},t.prototype.setRandomPositions=function(){for(var t,e=this.box,i=this.nodes,o=i.length+1,s=function(t){var e=t*t/Math.PI;return e-Math.floor(e)},r=0,n=i.length;r<n;++r)(t=i[r]).plotX=t.prevX=ta(t.plotX,e.width*s(r)),t.plotY=t.prevY=ta(t.plotY,e.height*s(o+r)),t.dispX=0,t.dispY=0},t.prototype.force=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];this.integration[t].apply(this,e)},t.prototype.barycenterForces=function(){this.getBarycenter(),this.force("barycenter")},t.prototype.getBarycenter=function(){for(var t=0,e=0,i=0,o=0,s=this.nodes;o<s.length;o++){var r=s[o];e+=r.plotX*r.mass,i+=r.plotY*r.mass,t+=r.mass}return this.barycenter={x:e,y:i,xFactor:e/t,yFactor:i/t},this.barycenter},t.prototype.barnesHutApproximation=function(t,e){var i,o,s=this.getDistXY(t,e),r=this.vectorLength(s);return t!==e&&0!==r&&(e.isInternal?e.boxSize/r<this.options.theta&&0!==r?(o=this.repulsiveForce(r,this.k),this.force("repulsive",t,o*e.mass,s,r),i=!1):i=!0:(o=this.repulsiveForce(r,this.k),this.force("repulsive",t,o*e.mass,s,r))),i},t.prototype.repulsiveForces=function(){var t=this;if("barnes-hut"===this.approximation)for(var e=function(e){i.quadTree.visitNodeRecursive(null,function(i){return t.barnesHutApproximation(e,i)})},i=this,o=0,s=this.nodes;o<s.length;o++){var r=s[o];e(r)}else for(var n=void 0,a=void 0,h=void 0,p=0,d=this.nodes;p<d.length;p++)for(var r=d[p],l=0,c=this.nodes;l<c.length;l++){var u=c[l];r===u||r.fixedPosition||(h=this.getDistXY(r,u),0!==(a=this.vectorLength(h))&&(n=this.repulsiveForce(a,this.k),this.force("repulsive",r,n*u.mass,h,a)))}},t.prototype.attractiveForces=function(){for(var t,e,i,o=0,s=this.links;o<s.length;o++){var r=s[o];r.fromNode&&r.toNode&&(t=this.getDistXY(r.fromNode,r.toNode),0!==(e=this.vectorLength(t))&&(i=this.attractiveForce(e,this.k),this.force("attractive",r,i,t,e)))}},t.prototype.applyLimits=function(){for(var t=this.nodes,e=0;e<t.length;e++){var i=t[e];i.fixedPosition||(this.integration.integrate(this,i),this.applyLimitBox(i,this.box),i.dispX=0,i.dispY=0)}},t.prototype.applyLimitBox=function(t,e){var i=t.radius;t.plotX=to(t.plotX,e.left+i,e.width-i),t.plotY=to(t.plotY,e.top+i,e.height-i)},t.prototype.coolDown=function(t,e,i){return t-e*i},t.prototype.isStable=function(){return 1e-5>Math.abs(this.systemTemperature-this.prevSystemTemperature)||this.temperature<=0},t.prototype.getSystemTemperature=function(){for(var t=0,e=0,i=this.nodes;e<i.length;e++)t+=i[e].temperature;return t},t.prototype.vectorLength=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.prototype.getDistR=function(t,e){var i=this.getDistXY(t,e);return this.vectorLength(i)},t.prototype.getDistXY=function(t,e){var i=t.plotX-e.plotX,o=t.plotY-e.plotY;return{x:i,y:o,absX:Math.abs(i),absY:Math.abs(o)}},t}(),tp=function(){return(tp=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},td=l().syncTimeout,tl=l().animObject,tc={initDataLabels:function(){var t=this.options.dataLabels;if(!this.dataLabelsGroup){var e=this.initDataLabelsGroup(0,t);return!this.chart.styledMode&&(null==t?void 0:t.style)&&e.css(t.style),e.attr({opacity:0}),this.visible&&(this.options.animation&&(null==t?void 0:t.animation)?e.animate({opacity:1},t.animation):e.attr({opacity:1}),e.show()),e}return this.dataLabelsGroup.attr(tp({opacity:1},this.getPlotBox("data-labels"))),this.dataLabelsGroup},initDataLabelsDefer:function(){var t,e=this,i=this.options.dataLabels;(null==i?void 0:i.defer)&&(null==(t=this.options.layoutAlgorithm)?void 0:t.enableSimulation)?td(function(){e.deferDataLabels=!1},i?tl(i.animation).defer:0):this.deferDataLabels=!1}},tu=l().deg2rad,tf=l().addEvent,ty=l().merge,tm=l().uniqueKey,tg=l().defined,tv=l().extend;function tb(t,e){var i=this;e=ty(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);var o=this.renderer.url,s=this.text||this,r=s.textPath,n=e.attributes,a=e.enabled;if(t=t||r&&r.path,r&&r.undo(),t&&a){var h=tf(s,"afterModifyTree",function(e){if(t&&a){var r=t.attr("id");r||t.attr("id",r=tm());var h={x:0,y:0};tg(n.dx)&&(h.dx=n.dx,delete n.dx),tg(n.dy)&&(h.dy=n.dy,delete n.dy),s.attr(h),i.attr({transform:""}),i.box&&(i.box=i.box.destroy());var p=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:tv(n,{"text-anchor":n.textAnchor,href:""+o+"#".concat(r)}),children:p}}});s.textPath={path:t,undo:h}}else s.attr({dx:0,dy:0}),delete s.textPath;return this.added&&(s.textCache="",this.renderer.buildText(s)),this}function tx(t){var e,i=t.bBox,o=null==(e=this.element)?void 0:e.querySelector("textPath");if(o){for(var s=[],r=this.renderer.fontMetrics(this.element),n=r.b,a=r.h-n,h=RegExp('(<tspan>|<tspan(?!\\sclass="highcharts-br")[^>]*>|<\\/tspan>)',"g"),p=o.innerHTML.replace(h,"").split(/<tspan class="highcharts-br"[^>]*>/),d=p.length,l=function(t,e){var i=e.x,s=e.y,r=(o.getRotationOfChar(t)-90)*tu,h=Math.cos(r),p=Math.sin(r);return[[i-a*h,s-a*p],[i+n*h,s+n*p]]},c=0,u=0;u<d;u++){for(var f=p[u].length,y=0;y<f;y+=5)try{var m=c+y+u,g=l(m,o.getStartPositionOfChar(m)),v=g[0],b=g[1];0===y?(s.push(b),s.push(v)):(0===u&&s.unshift(b),u===d-1&&s.push(v))}catch(t){break}c+=f-1;try{var m=c+u,x=o.getEndPositionOfChar(m),k=l(m,x),v=k[0],b=k[1];s.unshift(b),s.unshift(v)}catch(t){break}}s.length&&s.push(s[0].slice()),i.polygon=s}return i}function tk(t){var e,i=t.labelOptions,o=t.point,s=i[o.formatPrefix+"TextPath"]||i.textPath;s&&!i.useHTML&&(this.setTextPath((null==(e=o.getDataLabelPath)?void 0:e.call(o,this))||o.graphic,s),o.dataLabelPath&&!s.enabled&&(o.dataLabelPath=o.dataLabelPath.destroy()))}var tN=(s=function(t,e){return(s=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),tL=l().noop,tP=D().series,tw=D().seriesTypes,tS=tw.column.prototype,tM=tw.line.prototype,tT=tc.initDataLabels,tX=tc.initDataLabelsDefer,tY=l().addEvent,tD=l().defined,tE=l().extend,tF=l().merge,tO=l().pick;({compose:function(t){tf(t,"afterGetBBox",tx),tf(t,"beforeAddingDataLabel",tk);var e=t.prototype;e.setTextPath||(e.setTextPath=tb)}}).compose(u());var tC=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.deferDataLabels=!0,e}return tN(e,t),e.compose=function(t){v.compose(t),th.compose(t)},e.prototype.deferLayout=function(){var t,e=this.options.layoutAlgorithm,i=this.chart.options.chart,o=this.chart.graphLayoutsStorage,s=this.chart.graphLayoutsLookup;this.visible&&(o||(this.chart.graphLayoutsStorage=o={},this.chart.graphLayoutsLookup=s=[]),(t=o[e.type])||(e.enableSimulation=tD(i.forExport)?!i.forExport:e.enableSimulation,o[e.type]=t=new X[e.type],t.init(e),s.splice(t.index,0,t)),this.layout=t,t.setArea(0,0,this.chart.plotWidth,this.chart.plotHeight),t.addElementsToCollection([this],t.series),t.addElementsToCollection(this.nodes,t.nodes),t.addElementsToCollection(this.points,t.links))},e.prototype.destroy=function(){this.layout&&this.layout.removeElementFromCollection(this,this.layout.series),q.destroy.call(this)},e.prototype.drawDataLabels=function(){if(!this.deferDataLabels){var t,e=this.options.dataLabels;(null==e?void 0:e.textPath)&&(t=e.textPath),tP.prototype.drawDataLabels.call(this,this.nodes),(null==e?void 0:e.linkTextPath)&&(e.textPath=e.linkTextPath),tP.prototype.drawDataLabels.call(this,this.data),(null==e?void 0:e.textPath)&&(e.textPath=t)}},e.prototype.generatePoints=function(){var t,e;for(q.generatePoints.apply(this,arguments),this.options.nodes&&this.options.nodes.forEach(function(t){this.nodeLookup[t.id]||(this.nodeLookup[t.id]=this.createNode(t.id))},this),e=this.nodes.length-1;e>=0;e--)(t=this.nodes[e]).degree=t.getDegree(),t.radius=tO(t.marker&&t.marker.radius,this.options.marker&&this.options.marker.radius,0),t.key=t.name,this.nodeLookup[t.id]||t.remove();this.data.forEach(function(t){t.formatPrefix="link"}),this.indexateNodes()},e.prototype.getPointsCollection=function(){return this.nodes||[]},e.prototype.indexateNodes=function(){this.nodes.forEach(function(t,e){t.index=e})},e.prototype.init=function(e,i){var o=this;return t.prototype.init.call(this,e,i),tX.call(this),tY(this,"updatedData",function(){o.layout&&o.layout.stop()}),tY(this,"afterUpdate",function(){o.nodes.forEach(function(t){t&&t.series&&t.resolveColor()})}),tY(this,"afterSimulation",function(){this.deferDataLabels=!1,this.drawDataLabels()}),this},e.prototype.markerAttribs=function(t,e){var i=tP.prototype.markerAttribs.call(this,t,e);return tD(t.plotY)||(i.y=0),i.x=(t.plotX||0)-(i.width||0)/2,i},e.prototype.pointAttribs=function(t,e){var i=e||t&&t.state||"normal",o=this.options.states[i],s=tP.prototype.pointAttribs.call(this,t,i);return t&&!t.isNode&&(s=t.getLinkAttributes(),o&&(s={stroke:o.linkColor||s.stroke,dashstyle:o.linkDashStyle||s.dashstyle,opacity:tO(o.linkOpacity,s.opacity),"stroke-width":o.linkColor||s["stroke-width"]})),s},e.prototype.render=function(){var t=this.points,e=this.chart.hoverPoint,i=[];this.points=this.nodes,tM.render.call(this),this.points=t,t.forEach(function(t){t.fromNode&&t.toNode&&(t.renderLink(),t.redrawLink())}),e&&e.series===this&&this.redrawHalo(e),this.chart.hasRendered&&!this.options.dataLabels.allowOverlap&&(this.nodes.concat(this.points).forEach(function(t){t.dataLabel&&i.push(t.dataLabel)}),this.chart.hideOverlappingLabels(i))},e.prototype.setState=function(t,e){e?(this.points=this.nodes.concat(this.data),tP.prototype.setState.apply(this,arguments),this.points=this.data):tP.prototype.setState.apply(this,arguments),this.layout.simulation||t||this.render()},e.prototype.translate=function(){this.generatePoints(),this.deferLayout(),this.nodes.forEach(function(t){t.isInside=!0,t.linksFrom.forEach(function(t){t.shapeType="path",t.y=1})})},e.defaultOptions=tF(tP.defaultOptions,J),e}(tP);tE(tC.prototype,{pointClass:W,animate:void 0,directTouch:!0,drawGraph:void 0,forces:["barycenter","repulsive","attractive"],hasDraggableNodes:!0,isCartesian:!1,noSharedTooltip:!0,pointArrayMap:["from","to"],requireSorting:!1,trackerGroups:["group","markerGroup","dataLabelsGroup"],initDataLabels:tT,buildKDTree:tL,createNode:q.createNode,drawTracker:tS.drawTracker,onMouseDown:v.onMouseDown,onMouseMove:v.onMouseMove,onMouseUp:v.onMouseUp,redrawHalo:v.redrawHalo}),D().registerSeriesType("networkgraph",tC);var tA=l();tC.compose(tA.Chart);var tI=l();return p.default}()});