!/**
 * Highcharts Gantt JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/pathfinder
 * @requires highcharts
 *
 * Pathfinder
 *
 * (c) 2016-2026 Highsoft AS
 * Author: Øystein Moseng
 *
 * 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(t._Highcharts,t._Highcharts.Point):"function"==typeof define&&define.amd?define("highcharts/modules/pathfinder",["highcharts/highcharts"],function(t){return e(t,t.Point)}):"object"==typeof exports?exports["highcharts/modules/pathfinder"]=e(t._Highcharts,t._Highcharts.Point):t.Highcharts=e(t.Highcharts,t.Highcharts.Point)}("u"<typeof window?this:window,(t,e)=>(()=>{"use strict";let n;var i,r={260:t=>{t.exports=e},944:e=>{e.exports=t}},a={};function o(t){var e=a[t];if(void 0!==e)return e.exports;var n=a[t]={exports:{}};return r[t](n,n.exports,o),n.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s={};o.d(s,{default:()=>_});var h=o(944),c=o.n(h);let l=c().deg2rad,x=Math.max,M=Math.min,d=class{constructor(t,e,n){this.init(t,e,n)}init(t,e,n){this.fromPoint=t,this.toPoint=e,this.options=n,this.chart=t.series.chart,this.pathfinder=this.chart.pathfinder}renderPath(t,e){let n=this.chart,i=n.styledMode,r=this.pathfinder,a={},o=this.graphics&&this.graphics.path;r.group||(r.group=n.renderer.g().addClass("highcharts-pathfinder-group").attr({zIndex:-1}).add(n.seriesGroup)),r.group.translate(n.plotLeft,n.plotTop),!(o&&o.renderer)&&(o=n.renderer.path().add(r.group),i||o.attr({opacity:0})),o.attr(e),a.d=t,i||(a.opacity=1),o.animate(a),this.graphics=this.graphics||{},this.graphics.path=o}addMarker(t,e,n){let i,r,a,o,s,h,c,x=this.fromPoint.series.chart,M=x.pathfinder,d=x.renderer,y="start"===t?this.fromPoint:this.toPoint,p=y.getPathfinderAnchorPoint(e);e.enabled&&((c="start"===t?n[1]:n[n.length-2])&&"M"===c[0]||"L"===c[0])&&(h={x:c[1],y:c[2]},r=y.getRadiansToVector(h,p),i=y.getMarkerVector(r,e.radius,p),e.width&&e.height?(o=e.width,s=e.height):o=s=2*e.radius,this.graphics=this.graphics||{},a={x:i.x-o/2,y:i.y-s/2,width:o,height:s,rotation:-r/l,rotationOriginX:i.x,rotationOriginY:i.y},this.graphics[t]?this.graphics[t].animate(a):(this.graphics[t]=d.symbol(e.symbol).addClass("highcharts-point-connecting-path-"+t+"-marker highcharts-color-"+this.fromPoint.colorIndex).attr(a).add(M.group),d.styledMode||this.graphics[t].attr({fill:e.color||this.fromPoint.color,stroke:e.lineColor,"stroke-width":e.lineWidth,opacity:0}).animate({opacity:1},y.series.options.animation)))}getPath(t){let e=this.pathfinder,n=this.chart,i=e.algorithms[t.type],r=e.chartObstacles;return"function"!=typeof i?((0,h.error)('"'+t.type+'" is not a Pathfinder algorithm.'),{path:[],obstacles:[]}):(i.requiresObstacles&&!r&&(r=e.chartObstacles=e.getChartObstacles(t),n.options.connectors.algorithmMargin=t.algorithmMargin,e.chartObstacleMetrics=e.getObstacleMetrics(r)),i(this.fromPoint.getPathfinderAnchorPoint(t.startMarker),this.toPoint.getPathfinderAnchorPoint(t.endMarker),(0,h.merge)({chartObstacles:r,lineObstacles:e.lineObstacles||[],obstacleMetrics:e.chartObstacleMetrics,hardBounds:{xMin:0,xMax:n.plotWidth,yMin:0,yMax:n.plotHeight},obstacleOptions:{margin:t.algorithmMargin},startDirectionX:e.getAlgorithmStartDirection(t.startMarker)},t)))}render(){let t=this.fromPoint,e=t.series,n=e.chart,i=n.pathfinder,r={},a=(0,h.merge)(n.options.connectors,e.options.connectors,t.options.connectors,this.options);!n.styledMode&&(r.stroke=a.lineColor||t.color,r["stroke-width"]=a.lineWidth,a.dashStyle&&(r.dashstyle=a.dashStyle)),r.class="highcharts-point-connecting-path highcharts-color-"+t.colorIndex,a=(0,h.merge)(r,a),(0,h.defined)(a.marker.radius)||(a.marker.radius=M(x(Math.ceil((a.algorithmMargin||8)/2)-1,1),5));let o=this.getPath(a),s=o.path;o.obstacles&&(i.lineObstacles=i.lineObstacles||[],i.lineObstacles=i.lineObstacles.concat(o.obstacles)),this.renderPath(s,r),this.addMarker("start",(0,h.merge)(a.marker,a.startMarker),s),this.addMarker("end",(0,h.merge)(a.marker,a.endMarker),s)}destroy(){this.graphics&&((0,h.objectEach)(this.graphics,function(t){t.destroy()}),delete this.graphics)}};function y(t,e){let n=[];for(let i=0;i<t.length;i++){let r=t[i][1],a=t[i][2];if("number"==typeof r&&"number"==typeof a)if(0===i)n.push(["M",r,a]);else if(i===t.length-1)n.push(["L",r,a]);else if(e){let o=t[i-1],s=t[i+1];if(o&&s){let t=o[1],i=o[2],h=s[1],c=s[2];if("number"==typeof t&&"number"==typeof h&&"number"==typeof i&&"number"==typeof c&&t!==h&&i!==c){let o=t<h?1:-1,s=i<c?1:-1;n.push(["L",r-o*Math.min(Math.abs(r-t),e),a-s*Math.min(Math.abs(a-i),e)],["C",r,a,r,a,r+o*Math.min(Math.abs(r-h),e),a+s*Math.min(Math.abs(a-c),e)])}}}else n.push(["L",r,a])}return n}let{min:p,max:f,abs:u}=Math;function g(t,e,n){let i=e-1e-7,r=n||0,a=t.length-1,o,s;for(;r<=a;)if((s=i-t[o=a+r>>1].xMin)>0)r=o+1;else{if(!(s<0))return o;a=o-1}return r>0?r-1:0}function m(t,e){let n=g(t,e.x+1)+1;for(;n--;){var i;if(t[n].xMax>=e.x&&(i=t[n],e.x<=i.xMax&&e.x>=i.xMin&&e.y<=i.yMax&&e.y>=i.yMin))return n}return -1}function b(t){let e=[];if(t.length){e.push(["M",t[0].start.x,t[0].start.y]);for(let n=0;n<t.length;++n)e.push(["L",t[n].end.x,t[n].end.y])}return e}function P(t,e){t.yMin=f(t.yMin,e.yMin),t.yMax=p(t.yMax,e.yMax),t.xMin=f(t.xMin,e.xMin),t.xMax=p(t.xMax,e.xMax)}let v=function(t,e,n){let i=[],r=n.chartObstacles,a=m(r,t),o=m(r,e),s,c=(0,h.pick)(n.startDirectionX,u(e.x-t.x)>u(e.y-t.y))?"x":"y",l,x,M,d;function p(t,e,n,i,r){let a={x:t.x,y:t.y};return a[e]=n[i||e]+(r||0),a}function f(t,e,n){let i=u(e[n]-t[n+"Min"])>u(e[n]-t[n+"Max"]);return p(e,n,t,n+(i?"Max":"Min"),i?1:-1)}o>-1?(s={start:x=f(r[o],e,c),end:e},d=x):d=e,a>-1&&(x=f(l=r[a],t,c),i.push({start:t,end:x}),x[c]>=t[c]==x[c]>=d[c]&&(M=t[c="y"===c?"x":"y"]<e[c],i.push({start:x,end:p(x,c,l,c+(M?"Max":"Min"),M?1:-1)}),c="y"===c?"x":"y"));let g=i.length?i[i.length-1].end:t;x=p(g,c,d),i.push({start:g,end:x});let P=p(x,c="y"===c?"x":"y",d);return i.push({start:x,end:P}),s&&i.push(s),{path:y(b(i),n.radius),obstacles:i}};function O(t,e,n){let i=(0,h.pick)(n.startDirectionX,u(e.x-t.x)>u(e.y-t.y)),r=i?"x":"y",a=[],o=n.obstacleMetrics,s=p(t.x,e.x)-o.maxWidth-10,c=f(t.x,e.x)+o.maxWidth+10,l=p(t.y,e.y)-o.maxHeight-10,x=f(t.y,e.y)+o.maxHeight+10,M,d,y,v=!1,O=n.chartObstacles,k=g(O,c),w=g(O,s);function A(t,e,n){let i,r,a,o,s=t.x<e.x?1:-1;t.x<e.x?(i=t,r=e):(i=e,r=t),t.y<e.y?(o=t,a=e):(o=e,a=t);let h=s<0?p(g(O,r.x),O.length-1):0;for(;O[h]&&(s>0&&O[h].xMin<=r.x||s<0&&O[h].xMax>=i.x);){if(O[h].xMin<=r.x&&O[h].xMax>=i.x&&O[h].yMin<=a.y&&O[h].yMax>=o.y){if(n)return{y:t.y,x:t.x<e.x?O[h].xMin-1:O[h].xMax+1,obstacle:O[h]};return{x:t.x,y:t.y<e.y?O[h].yMin-1:O[h].yMax+1,obstacle:O[h]}}h+=s}return e}function E(t,e,n,i,r){let a=r.soft,o=r.hard,s=i?"x":"y",h={x:e.x,y:e.y},c={x:e.x,y:e.y},l=t[s+"Max"]>=a[s+"Max"],x=t[s+"Min"]<=a[s+"Min"],M=t[s+"Max"]>=o[s+"Max"],d=t[s+"Min"]<=o[s+"Min"],y=u(t[s+"Min"]-e[s]),p=u(t[s+"Max"]-e[s]),f=10>u(y-p)?e[s]<n[s]:p<y;c[s]=t[s+"Min"],h[s]=t[s+"Max"];let g=A(e,c,i)[s]!==c[s],m=A(e,h,i)[s]!==h[s];return f=g?!m||f:!m&&f,f=x?!l||f:!l&&f,f=d?!M||f:!M&&f}if((k=m(O=O.slice(w,k+1),e))>-1){var I,L;let i,r;I=O[k],L=e,i=p(I.xMax-L.x,L.x-I.xMin)<p(I.yMax-L.y,L.y-I.yMin),r=E(I,L,t,i,{soft:n.hardBounds,hard:n.hardBounds}),y=i?{y:L.y,x:I[r?"xMax":"xMin"]+(r?1:-1)}:{x:L.x,y:I[r?"yMax":"yMin"]+(r?1:-1)},a.push({end:e,start:y}),e=y}for(;(k=m(O,e))>-1;)d=e[r]-t[r]<0,(y={x:e.x,y:e.y})[r]=O[k][d?r+"Max":r+"Min"]+(d?1:-1),a.push({end:e,start:y}),e=y;return{path:b(M=(M=function t(e,i,r){let a,o,h,M,d,y,u;if(e.x===i.x&&e.y===i.y)return[];let g=r?"x":"y",b=n.obstacleOptions.margin,k={soft:{xMin:s,xMax:c,yMin:l,yMax:x},hard:n.hardBounds};return(d=m(O,e))>-1?(M=E(d=O[d],e,i,r,k),P(d,n.hardBounds),u=r?{y:e.y,x:d[M?"xMax":"xMin"]+(M?1:-1)}:{x:e.x,y:d[M?"yMax":"yMin"]+(M?1:-1)},(y=m(O,u))>-1&&(P(y=O[y],n.hardBounds),u[g]=M?f(d[g+"Max"]-b+1,(y[g+"Min"]+d[g+"Max"])/2):p(d[g+"Min"]+b-1,(y[g+"Max"]+d[g+"Min"])/2),e.x===u.x&&e.y===u.y?(v&&(u[g]=M?f(d[g+"Max"],y[g+"Max"])+1:p(d[g+"Min"],y[g+"Min"])-1),v=!v):v=!1),o=[{start:e,end:u}]):(a=A(e,{x:r?i.x:e.x,y:r?e.y:i.y},r),o=[{start:e,end:{x:a.x,y:a.y}}],a[r?"x":"y"]!==i[r?"x":"y"]&&(M=E(a.obstacle,a,i,!r,k),P(a.obstacle,n.hardBounds),h={x:r?a.x:a.obstacle[M?"xMax":"xMin"]+(M?1:-1),y:r?a.obstacle[M?"yMax":"yMin"]+(M?1:-1):a.y},r=!r,o=o.concat(t({x:a.x,y:a.y},h,r)))),o=o.concat(t(o[o.length-1].end,i,!r))}(t,e,i)).concat(a.reverse())),obstacles:M}}v.requiresObstacles=!0,O.requiresObstacles=!0;let k={connectors:{type:"straight",radius:0,lineWidth:1,marker:{enabled:!1,align:"center",verticalAlign:"middle",inside:!1,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}},{setOptions:w}=c();function A(t){let e=t.shapeArgs;if(e)return{xMin:e.x||0,xMax:(e.x||0)+(e.width||0),yMin:e.y||0,yMax:(e.y||0)+(e.height||0)};let n=t.graphic&&t.graphic.getBBox();return n?{xMin:t.plotX-n.width/2,xMax:t.plotX+n.width/2,yMin:t.plotY-n.height/2,yMax:t.plotY+n.height/2}:null}!function(t){function e(t){let e,n,i=A(this);switch(t.align){case"right":e="xMax";break;case"left":e="xMin"}switch(t.verticalAlign){case"top":n="yMin";break;case"bottom":n="yMax"}return e=e?i[e]:(i.xMin+i.xMax)/2,n=n?i[n]:(i.yMin+i.yMax)/2,{x:e+(t.xOffset||0),y:n+(t.yOffset||0)}}function n(t,e){let n;return!(0,h.defined)(e)&&(n=A(this))&&(e={x:(n.xMin+n.xMax)/2,y:(n.yMin+n.yMax)/2}),Math.atan2(e.y-t.y,t.x-e.x)}function i(t,e,n){let i=2*Math.PI,r=A(this),a=r.xMax-r.xMin,o=r.yMax-r.yMin,s=Math.atan2(o,a),h=a/2,c=o/2,l=r.xMin+h,x=r.yMin+c,M={x:l,y:x},d=t,y=1,p=!1,f=1,u=1;for(;d<-Math.PI;)d+=i;for(;d>Math.PI;)d-=i;return y=Math.tan(d),d>-s&&d<=s?(u=-1,p=!0):d>s&&d<=Math.PI-s?u=-1:d>Math.PI-s||d<=-(Math.PI-s)?(f=-1,p=!0):f=-1,p?(M.x+=f*h,M.y+=u*h*y):(M.x+=o/(2*y)*f,M.y+=u*c),n.x!==l&&(M.x=n.x),n.y!==x&&(M.y=n.y),{x:M.x+e*Math.cos(d),y:M.y-e*Math.sin(d)}}t.compose=function(t,r,a){let o=a.prototype;o.getPathfinderAnchorPoint||(t.prototype.callbacks.push(function(t){!1!==t.options.connectors.enabled&&((t.options.pathfinder||t.series.reduce(function(t,e){return e.options&&(0,h.merge)(!0,e.options.connectors=e.options.connectors||{},e.options.pathfinder),t||e.options&&e.options.pathfinder},!1))&&((0,h.merge)(!0,t.options.connectors=t.options.connectors||{},t.options.pathfinder),(0,h.error)('WARNING: Pathfinder options have been renamed. Use "chart.connectors" or "series.connectors" instead.')),this.pathfinder=new r(this),this.pathfinder.update(!0))}),o.getMarkerVector=i,o.getPathfinderAnchorPoint=e,o.getRadiansToVector=n,w(k))}}(i||(i={}));let E=i;var I=o(260),L=o.n(I);let R=Math.max,B=Math.min;class C{static compose(t,e){E.compose(t,C,e)}constructor(t){this.init(t)}init(t){this.chart=t,this.connections=[],(0,h.addEvent)(t,"redraw",function(){this.pathfinder.update()})}update(t){let e=this.chart,n=this,i=n.connections;n.connections=[],e.series.forEach(function(t){t.visible&&!t.options.isInternal&&t.points.forEach(function(t){let i,r=t.options;r&&r.dependency&&(r.connect=r.dependency);let a=t.options?.connect?(0,h.splat)(t.options.connect):[];t.visible&&!1!==t.isInside&&a.forEach(r=>{let a="string"==typeof r?r:r.to;a&&(i=e.get(a)),i instanceof L()&&i.series.visible&&i.visible&&!1!==i.isInside&&n.connections.push(new d(t,i,"string"==typeof r?{}:r))})})});for(let t=0,e,r,a=i.length,o=n.connections.length;t<a;++t){r=!1;let a=i[t];for(e=0;e<o;++e){let t=n.connections[e];if((a.options&&a.options.type)===(t.options&&t.options.type)&&a.fromPoint===t.fromPoint&&a.toPoint===t.toPoint){t.graphics=a.graphics,r=!0;break}}r||a.destroy()}delete this.chartObstacles,delete this.lineObstacles,n.renderConnections(t)}renderConnections(t){t?this.chart.series.forEach(function(t){let e=function(){let e=t.chart.pathfinder;(e&&e.connections||[]).forEach(function(e){e.fromPoint&&e.fromPoint.series===t&&e.render()}),t.pathfinderRemoveRenderEvent&&(t.pathfinderRemoveRenderEvent(),delete t.pathfinderRemoveRenderEvent)};!1===t.options.animation?e():t.pathfinderRemoveRenderEvent=(0,h.addEvent)(t,"afterAnimate",e)}):this.connections.forEach(function(t){t.render()})}getChartObstacles(t){let e=this.chart.series,n=(0,h.pick)(t.algorithmMargin,0),i=[],r;for(let t=0,r=e.length;t<r;++t)if(e[t].visible&&!e[t].options.isInternal)for(let r=0,a=e[t].points.length,o,s;r<a;++r)(s=e[t].points[r]).visible&&(o=function(t){let e=t.shapeArgs;if(e)return{xMin:e.x||0,xMax:(e.x||0)+(e.width||0),yMin:e.y||0,yMax:(e.y||0)+(e.height||0)};let n=t.graphic&&t.graphic.getBBox();return n?{xMin:t.plotX-n.width/2,xMax:t.plotX+n.width/2,yMin:t.plotY-n.height/2,yMax:t.plotY+n.height/2}:null}(s))&&i.push({xMin:o.xMin-n,xMax:o.xMax+n,yMin:o.yMin-n,yMax:o.yMax+n});return i=i.sort(function(t,e){return t.xMin-e.xMin}),(0,h.defined)(t.algorithmMargin)||(r=t.algorithmMargin=function(t){let e,n=t.length,i=[];for(let r=0;r<n;++r)for(let a=r+1;a<n;++a)(e=function t(e,n,i){let r=(0,h.pick)(i,10),a=e.yMax+r>n.yMin-r&&e.yMin-r<n.yMax+r,o=e.xMax+r>n.xMin-r&&e.xMin-r<n.xMax+r,s=a?e.xMin>n.xMax?e.xMin-n.xMax:n.xMin-e.xMax:1/0,c=o?e.yMin>n.yMax?e.yMin-n.yMax:n.yMin-e.yMax:1/0;return o&&a?r?t(e,n,Math.floor(r/2)):1/0:B(s,c)}(t[r],t[a]))<80&&i.push(e);return i.push(80),R(Math.floor(i.sort(function(t,e){return t-e})[Math.floor(i.length/10)]/2-1),1)}(i),i.forEach(function(t){t.xMin-=r,t.xMax+=r,t.yMin-=r,t.yMax+=r})),i}getObstacleMetrics(t){let e=0,n=0,i,r,a=t.length;for(;a--;)i=t[a].xMax-t[a].xMin,r=t[a].yMax-t[a].yMin,e<i&&(e=i),n<r&&(n=r);return{maxHeight:n,maxWidth:e}}getAlgorithmStartDirection(t){let e="left"!==t.align&&"right"!==t.align,n="top"!==t.verticalAlign&&"bottom"!==t.verticalAlign;return e?!!n&&void 0:!!n||void 0}}function H(t,e,n,i){return[["M",t,e+i/2],["L",t+n,e],["L",t,e+i/2],["L",t+n,e+i]]}C.prototype.algorithms={fastAvoid:O,straight:function(t,e){return{path:[["M",t.x,t.y],["L",e.x,e.y]],obstacles:[{start:t,end:e}]}},simpleConnect:v};function W(t,e,n,i){return[["M",t+n,e],["L",t,e+i/2],["L",t+n,e+i],["Z"]]}function X(t,e,n,i){return W(t,e,n/2,i)}let j=c();j.Pathfinder=j.Pathfinder||C,(n=j.SVGRenderer.prototype.symbols).arrow=H,n["arrow-filled"]=W,n["arrow-filled-half"]=X,n["arrow-half"]=function(t,e,n,i){return H(t,e,n/2,i)},n["triangle-left"]=W,n["triangle-left-half"]=X,j.Pathfinder.compose(j.Chart,j.Point);let _=c();return s.default})());