import { g as Ut } from "./index-g8L_ObLu.js";
function qt(S, q) {
  for (var M = 0; M < q.length; M++) {
    const P = q[M];
    if (typeof P != "string" && !Array.isArray(P)) {
      for (const I in P)
        if (I !== "default" && !(I in S)) {
          const T = Object.getOwnPropertyDescriptor(P, I);
          T && Object.defineProperty(S, I, T.get ? T : {
            enumerable: !0,
            get: () => P[I]
          });
        }
    }
  }
  return Object.freeze(Object.defineProperty(S, Symbol.toStringTag, { value: "Module" }));
}
var U = { exports: {} }, Wt = U.exports, pt;
function Ht() {
  return pt || (pt = 1, function(S, q) {
    /**
    * Highcharts JS v12.3.0 (2025-06-21)
    * @module highcharts/modules/venn
    * @requires highcharts
    *
    * (c) 2017-2025 Highsoft AS
    * Authors: Jon Arild Nygard
    *
    * License: www.highcharts.com/license
    */
    (function(M, P) {
      S.exports = P(M._Highcharts, M._Highcharts.Color, M._Highcharts.SeriesRegistry);
    })(typeof window > "u" ? Wt : window, (M, P, I) => (() => {
      var T, W, ht = { 512: (n) => {
        n.exports = I;
      }, 620: (n) => {
        n.exports = P;
      }, 944: (n) => {
        n.exports = M;
      } }, Q = {};
      function v(n) {
        var t = Q[n];
        if (t !== void 0) return t.exports;
        var r = Q[n] = { exports: {} };
        return ht[n](r, r.exports, v), r.exports;
      }
      v.n = (n) => {
        var t = n && n.__esModule ? () => n.default : () => n;
        return v.d(t, { a: t }), t;
      }, v.d = (n, t) => {
        for (var r in t) v.o(t, r) && !v.o(n, r) && Object.defineProperty(n, r, { enumerable: !0, get: t[r] });
      }, v.o = (n, t) => Object.prototype.hasOwnProperty.call(n, t);
      var Z = {};
      v.d(Z, { default: () => Ft });
      var gt = v(944), L = v.n(gt), yt = v(620), xt = v.n(yt);
      (function(n) {
        n.getCenterOfPoints = function(t) {
          let r = t.reduce((a, c) => (a.x += c.x, a.y += c.y, a), { x: 0, y: 0 });
          return { x: r.x / t.length, y: r.y / t.length };
        }, n.getDistanceBetweenPoints = function(t, r) {
          return Math.sqrt(Math.pow(r.x - t.x, 2) + Math.pow(r.y - t.y, 2));
        }, n.getAngleBetweenPoints = function(t, r) {
          return Math.atan2(r.x - t.x, r.y - t.y);
        }, n.pointInPolygon = function({ x: t, y: r }, a) {
          let c = a.length, s, e, o = !1;
          for (s = 0, e = c - 1; s < c; e = s++) {
            let [u, i] = a[s], [l, f] = a[e];
            i > r != f > r && t < (l - u) * (r - i) / (f - i) + u && (o = !o);
          }
          return o;
        };
      })(T || (T = {}));
      let N = T, { getAngleBetweenPoints: H, getCenterOfPoints: tt, getDistanceBetweenPoints: D } = N;
      (function(n) {
        function t(i, l) {
          let f = Math.pow(10, l);
          return Math.round(i * f) / f;
        }
        function r(i) {
          if (i <= 0) throw Error("radius of circle must be a positive number.");
          return Math.PI * i * i;
        }
        function a(i, l) {
          return i * i * Math.acos(1 - l / i) - (i - l) * Math.sqrt(l * (2 * i - l));
        }
        function c(i, l) {
          let f = D(i, l), p = i.r, d = l.r, O = [];
          if (f < p + d && f > Math.abs(p - d)) {
            let x = p * p, g = (x - d * d + f * f) / (2 * f), m = Math.sqrt(x - g * g), y = i.x, b = l.x, h = i.y, X = l.y, A = y + g * (b - y) / f, V = h + g * (X - h) / f, j = -(m / f * (X - h)), k = -(m / f * (b - y));
            O = [{ x: t(A + j, 14), y: t(V - k, 14) }, { x: t(A - j, 14), y: t(V + k, 14) }];
          }
          return O;
        }
        function s(i) {
          return i.reduce((l, f, p, d) => {
            let O = d.slice(p + 1).reduce((x, g, m) => {
              let y = [p, m + p + 1];
              return x.concat(c(f, g).map((b) => (b.indexes = y, b)));
            }, []);
            return l.concat(O);
          }, []);
        }
        function e(i, l) {
          return D(i, l) <= l.r + 1e-10;
        }
        function o(i, l) {
          return !l.some(function(f) {
            return !e(i, f);
          });
        }
        function u(i) {
          return s(i).filter(function(l) {
            return o(l, i);
          });
        }
        n.round = t, n.getAreaOfCircle = r, n.getCircularSegmentArea = a, n.getOverlapBetweenCircles = function(i, l, f) {
          let p = 0;
          if (f < i + l) {
            if (f <= Math.abs(l - i)) p = r(i < l ? i : l);
            else {
              let d = (i * i - l * l + f * f) / (2 * f);
              p = a(i, i - d) + a(l, l - (f - d));
            }
            p = t(p, 14);
          }
          return p;
        }, n.getCircleCircleIntersection = c, n.getCirclesIntersectionPoints = s, n.isCircle1CompletelyOverlappingCircle2 = function(i, l) {
          return D(i, l) + l.r < i.r + 1e-10;
        }, n.isPointInsideCircle = e, n.isPointInsideAllCircles = o, n.isPointOutsideAllCircles = function(i, l) {
          return !l.some(function(f) {
            return e(i, f);
          });
        }, n.getCirclesIntersectionPolygon = u, n.getAreaOfIntersectionBetweenCircles = function(i) {
          let l = u(i), f;
          if (l.length > 1) {
            let p = tt(l), d = (l = l.map(function(x) {
              return x.angle = H(p, x), x;
            }).sort(function(x, g) {
              return g.angle - x.angle;
            }))[l.length - 1], O = l.reduce(function(x, g) {
              let { startPoint: m } = x, y = tt([m, g]), b = g.indexes.filter(function(h) {
                return m.indexes.indexOf(h) > -1;
              }).reduce(function(h, X) {
                let A = i[X], V = H(A, g), j = H(A, m), k = j - V + (j < V ? 2 * Math.PI : 0), ft = j - k / 2, B = D(y, { x: A.x + A.r * Math.sin(ft), y: A.y + A.r * Math.cos(ft) }), { r: F } = A;
                return B > 2 * F && (B = 2 * F), (!h || h.width > B) && (h = { r: F, largeArc: +(B > F), width: B, x: g.x, y: g.y }), h;
              }, null);
              if (b) {
                let { r: h } = b;
                x.arcs.push(["A", h, h, 0, b.largeArc, 1, b.x, b.y]), x.startPoint = g;
              }
              return x;
            }, { startPoint: d, arcs: [] }).arcs;
            O.length === 0 || O.length === 1 || (O.unshift(["M", d.x, d.y]), f = { center: p, d: O });
          }
          return f;
        };
      })(W || (W = {}));
      let $ = W, mt = { draw: function(n, t) {
        let { animatableAttribs: r, onComplete: a, css: c, renderer: s } = t, e = n.series && n.series.chart.hasRendered ? void 0 : n.series && n.series.options.animation, o = n.graphic;
        if (t.attribs = { ...t.attribs, class: n.getClassName() }, n.shouldDraw()) o || (n.graphic = o = t.shapeType === "text" ? s.text() : t.shapeType === "image" ? s.image(t.imageUrl || "").attr(t.shapeArgs || {}) : s[t.shapeType](t.shapeArgs || {}), o.add(t.group)), c && o.css(c), o.attr(t.attribs).animate(r, !t.isNew && e, a);
        else if (o) {
          let u = () => {
            n.graphic = o = o && o.destroy(), typeof a == "function" && a();
          };
          Object.keys(r).length ? o.animate(r, void 0, () => u()) : u();
        }
      } };
      var bt = v(512), R = v.n(bt);
      let { scatter: { prototype: { pointClass: vt } } } = R().seriesTypes, { isNumber: Ot } = L(), { getAreaOfCircle: Ct, getCircleCircleIntersection: At, getOverlapBetweenCircles: et, isPointInsideAllCircles: Mt, isPointInsideCircle: Pt, isPointOutsideAllCircles: wt } = $, { getDistanceBetweenPoints: Y } = N, { extend: It, isArray: z, isNumber: Tt, isObject: rt, isString: Et } = L();
      function nt(n) {
        let t = {};
        return n.filter((r) => r.sets.length === 2).forEach((r) => {
          r.sets.forEach((a, c, s) => {
            rt(t[a]) || (t[a] = { totalOverlap: 0, overlapping: {} }), t[a] = { totalOverlap: (t[a].totalOverlap || 0) + r.value, overlapping: { ...t[a].overlapping || {}, [s[1 - c]]: r.value } };
          });
        }), n.filter(_).forEach((r) => {
          let a = t[r.sets[0]];
          It(r, a);
        }), n;
      }
      function it(n, t, r, a, c) {
        let s = n(t), e = n(r), o = 100, u = 1e-10, i = r - t, l, f, p = 1;
        if (t >= r) throw Error("a must be smaller than b.");
        if (s * e > 0) throw Error("f(a) and f(b) must have opposite signs.");
        if (s === 0) l = t;
        else if (e === 0) l = r;
        else for (; p++ <= o && f !== 0 && i > u; ) i = (r - t) / 2, s * (f = n(l = t + i)) > 0 ? t = l : r = l;
        return l;
      }
      function st(n) {
        let t = n.slice(0, -1), r = t.length, a = [], c = (s, e) => (s.sum += e[s.i], s);
        for (let s = 0; s < r; s++) a[s] = t.reduce(c, { sum: 0, i: s }).sum / r;
        return a;
      }
      function G(n, t, r) {
        let a = n + t;
        return r <= 0 ? a : Ct(n < t ? n : t) <= r ? 0 : it((c) => r - et(n, t, c), 0, a);
      }
      function _(n) {
        return z(n.sets) && n.sets.length === 1;
      }
      function ot(n) {
        let t = {};
        return rt(n) && Tt(n.value) && n.value > -1 && z(n.sets) && n.sets.length > 0 && !n.sets.some(function(r) {
          let a = !1;
          return !t[r] && Et(r) ? t[r] = !0 : a = !0, a;
        });
      }
      function lt(n, t) {
        return t.reduce(function(r, a) {
          let c = 0;
          if (a.sets.length > 1) {
            let s = a.value - function(e) {
              let o = 0;
              if (e.length === 2) {
                let u = e[0], i = e[1];
                o = et(u.r, i.r, Y(u, i));
              }
              return o;
            }(a.sets.map(function(e) {
              return n[e];
            }));
            c = Math.round(s * s * 1e11) / 1e11;
          }
          return r + c;
        }, 0);
      }
      function at(n, t) {
        return t.totalOverlap !== void 0 && n.totalOverlap !== void 0 ? t.totalOverlap - n.totalOverlap : NaN;
      }
      let w = { geometry: N, geometryCircles: $, addOverlapToSets: nt, getCentroid: st, getDistanceBetweenCirclesByOverlap: G, getLabelWidth: function(n, t, r) {
        let a = t.reduce((e, o) => Math.min(o.r, e), 1 / 0), c = r.filter((e) => !Pt(n, e)), s = function(e, o) {
          return it((u) => {
            let i = { x: n.x + o * u, y: n.y };
            return -(e - u) + (Mt(i, t) && wt(i, c) ? 0 : Number.MAX_VALUE);
          }, 0, e);
        };
        return 2 * Math.min(s(a, -1), s(a, 1));
      }, getMarginFromCircles: function(n, t, r) {
        let a = t.reduce((c, s) => {
          let e = s.r - Y(n, s);
          return e <= c ? e : c;
        }, Number.MAX_VALUE);
        return r.reduce((c, s) => {
          let e = Y(n, s) - s.r;
          return e <= c ? e : c;
        }, a);
      }, isSet: _, layoutGreedyVenn: function(n) {
        let t = [], r = {};
        n.filter((e) => e.sets.length === 1).forEach((e) => {
          r[e.sets[0]] = e.circle = { x: Number.MAX_VALUE, y: Number.MAX_VALUE, r: Math.sqrt(e.value / Math.PI) };
        });
        let a = (e, o) => {
          let u = e.circle;
          u && (u.x = o.x, u.y = o.y), t.push(e);
        };
        nt(n);
        let c = n.filter(_).sort(at);
        a(c.shift(), { x: 0, y: 0 });
        let s = n.filter((e) => e.sets.length === 2);
        for (let e of c) {
          let o = e.circle;
          if (!o) continue;
          let u = o.r, i = e.overlapping;
          a(e, t.reduce((l, f, p) => {
            let d = f.circle;
            if (!d || !i) return l;
            let O = i[f.sets[0]], x = G(u, d.r, O), g = [{ x: d.x + x, y: d.y }, { x: d.x - x, y: d.y }, { x: d.x, y: d.y + x }, { x: d.x, y: d.y - x }];
            for (let m of t.slice(p + 1)) {
              let y = m.circle, b = i[m.sets[0]];
              if (!y) continue;
              let h = G(u, y.r, b);
              g = g.concat(At({ x: d.x, y: d.y, r: x }, { x: y.x, y: y.y, r: h }));
            }
            for (let m of g) {
              o.x = m.x, o.y = m.y;
              let y = lt(r, s);
              y < l.loss && (l.loss = y, l.coordinates = m);
            }
            return l;
          }, { loss: Number.MAX_VALUE, coordinates: void 0 }).coordinates);
        }
        return r;
      }, loss: lt, nelderMead: function(n, t) {
        let r = function(u, i) {
          return u.fx - i.fx;
        }, a = (u, i, l, f) => i.map((p, d) => u * p + l * f[d]), c = (u, i) => (i.fx = n(i), u[u.length - 1] = i, u), s = (u) => {
          let i = u[0];
          return u.map((l) => {
            let f = a(0.5, i, 0.5, l);
            return f.fx = n(f), f;
          });
        }, e = (u, i, l, f) => {
          let p = a(l, u, f, i);
          return p.fx = n(p), p;
        }, o = ((u) => {
          let i = u.length, l = Array(i + 1);
          l[0] = u, l[0].fx = n(u);
          for (let f = 0; f < i; ++f) {
            let p = u.slice();
            p[f] = p[f] ? 1.05 * p[f] : 1e-3, p.fx = n(p), l[f + 1] = p;
          }
          return l;
        })(t);
        for (let u = 0; u < 100; u++) {
          o.sort(r);
          let i = o[o.length - 1], l = st(o), f = e(l, i, 2, -1);
          if (f.fx < o[0].fx) {
            let p = e(l, i, 3, -2);
            o = c(o, p.fx < f.fx ? p : f);
          } else if (f.fx >= o[o.length - 2].fx) {
            let p;
            o = f.fx > i.fx ? (p = e(l, i, 0.5, 0.5)).fx < i.fx ? c(o, p) : s(o) : (p = e(l, i, 1.5, -0.5)).fx < f.fx ? c(o, p) : s(o);
          } else o = c(o, f);
        }
        return o[0];
      }, processVennData: function(n, t) {
        let r = z(n) ? n : [], a = r.reduce(function(s, e) {
          var o;
          return e.sets && ot(o = e) && _(o) && o.value > 0 && s.indexOf(e.sets[0]) === -1 && s.push(e.sets[0]), s;
        }, []).sort(), c = r.reduce(function(s, e) {
          return e.sets && ot(e) && !e.sets.some(function(o) {
            return a.indexOf(o) === -1;
          }) && (s[e.sets.sort().join(t)] = { sets: e.sets, value: e.value || 0 }), s;
        }, {});
        return a.reduce(function(s, e, o, u) {
          return u.slice(o + 1).forEach(function(i) {
            s.push(e + t + i);
          }), s;
        }, []).forEach(function(s) {
          if (!c[s]) {
            let e = { sets: s.split(t), value: 0 };
            c[s] = e;
          }
        }), Object.keys(c).map(function(s) {
          return c[s];
        });
      }, sortByTotalOverlap: at }, { animObject: jt } = L(), { parse: St } = xt(), { getAreaOfIntersectionBetweenCircles: Lt, getCirclesIntersectionPolygon: Vt, isCircle1CompletelyOverlappingCircle2: Bt, isPointInsideAllCircles: Nt, isPointOutsideAllCircles: Dt } = $, { getCenterOfPoints: _t } = N, { scatter: J } = R().seriesTypes, { addEvent: Xt, extend: ct, isArray: ut, isNumber: E, isObject: kt, merge: K } = L();
      class C extends J {
        static getLabelPosition(t, r) {
          let a = t.reduce((s, e) => {
            let o = e.r / 2;
            return [{ x: e.x, y: e.y }, { x: e.x + o, y: e.y }, { x: e.x - o, y: e.y }, { x: e.x, y: e.y + o }, { x: e.x, y: e.y - o }].reduce((u, i) => {
              let l = w.getMarginFromCircles(i, t, r);
              return u.margin < l && (u.point = i, u.margin = l), u;
            }, s);
          }, { point: void 0, margin: -Number.MAX_VALUE }).point, c = w.nelderMead((s) => -w.getMarginFromCircles({ x: s[0], y: s[1] }, t, r), [a.x, a.y]);
          return Nt(a = { x: c[0], y: c[1] }, t) && Dt(a, r) || (a = t.length > 1 ? _t(Vt(t)) : { x: t[0].x, y: t[0].y }), a;
        }
        static getLabelValues(t, r) {
          let a = t.sets, c = r.reduce((o, u) => {
            let i = a.indexOf(u.sets[0]) > -1;
            return u.circle && o[i ? "internal" : "external"].push(u.circle), o;
          }, { internal: [], external: [] });
          c.external = c.external.filter((o) => c.internal.some((u) => !Bt(o, u)));
          let s = C.getLabelPosition(c.internal, c.external), e = w.getLabelWidth(s, c.internal, c.external);
          return { position: s, width: e };
        }
        static layout(t) {
          let r = {}, a = {};
          if (t.length > 0) {
            let c = w.layoutGreedyVenn(t), s = t.filter(w.isSet);
            for (let e of t) {
              let o = e.sets, u = o.join(), i = w.isSet(e) ? c[u] : Lt(o.map((l) => c[l]));
              i && (r[u] = i, a[u] = C.getLabelValues(e, s));
            }
          }
          return { mapOfIdToShape: r, mapOfIdToLabelValues: a };
        }
        static getScale(t, r, a) {
          let c = a.bottom - a.top, s = a.right - a.left, e = (a.right + a.left) / 2, o = (a.top + a.bottom) / 2, u = Math.min(s > 0 ? 1 / s * t : 1, c > 0 ? 1 / c * r : 1);
          return { scale: u, centerX: t / 2 - e * u, centerY: r / 2 - o * u };
        }
        static updateFieldBoundaries(t, r) {
          let a = r.x - r.r, c = r.x + r.r, s = r.y + r.r, e = r.y - r.r;
          return (!E(t.left) || t.left > a) && (t.left = a), (!E(t.right) || t.right < c) && (t.right = c), (!E(t.top) || t.top > e) && (t.top = e), (!E(t.bottom) || t.bottom < s) && (t.bottom = s), t;
        }
        animate(t) {
          if (!t) {
            let r = jt(this.options.animation);
            for (let a of this.points) {
              let c = a.shapeArgs;
              if (a.graphic && c) {
                let s = {}, e = {};
                c.d ? s.opacity = 1e-3 : (s.r = 0, e.r = c.r), a.graphic.attr(s).animate(e, r), c.d && setTimeout(() => {
                  a?.graphic?.animate({ opacity: 1 });
                }, r.duration);
              }
            }
          }
        }
        drawPoints() {
          let t = this.chart, r = this.group, a = this.points || [], c = t.renderer;
          for (let s of a) {
            let e = { zIndex: ut(s.sets) ? s.sets.length : 0 }, o = s.shapeArgs;
            t.styledMode || ct(e, this.pointAttribs(s, s.state)), mt.draw(s, { isNew: !s.graphic, animatableAttribs: o, attribs: e, group: r, renderer: c, shapeType: o?.d ? "path" : "circle" });
          }
        }
        init() {
          J.prototype.init.apply(this, arguments), delete this.opacity;
        }
        pointAttribs(t, r) {
          let a = this.options || {}, c = t?.options || {}, s = r && a.states[r] || {}, e = K(a, { color: t?.color }, c, s);
          return { fill: St(e.color).brighten(e.brightness).get(), opacity: e.opacity, stroke: e.borderColor, "stroke-width": e.borderWidth, dashstyle: e.borderDashStyle };
        }
        translate() {
          let t = this.chart;
          this.dataTable.modified = this.dataTable, this.generatePoints();
          let r = w.processVennData(this.options.data, C.splitter), { mapOfIdToShape: a, mapOfIdToLabelValues: c } = C.layout(r), s = Object.keys(a).filter((l) => {
            let f = a[l];
            return f && E(f.r);
          }).reduce((l, f) => C.updateFieldBoundaries(l, a[f]), { top: 0, bottom: 0, left: 0, right: 0 }), e = C.getScale(t.plotWidth, t.plotHeight, s), o = e.scale, u = e.centerX, i = e.centerY;
          for (let l of this.points) {
            let f = ut(l.sets) ? l.sets : [], p = f.join(), d = a[p], O = c[p] || {}, x = l.options?.dataLabels, g, m = O.width, y = O.position;
            if (d) {
              if (d.r) g = { x: u + d.x * o, y: i + d.y * o, r: d.r * o };
              else if (d.d) {
                let b = d.d;
                b.forEach((h) => {
                  h[0] === "M" ? (h[1] = u + h[1] * o, h[2] = i + h[2] * o) : h[0] === "A" && (h[1] = h[1] * o, h[2] = h[2] * o, h[6] = u + h[6] * o, h[7] = i + h[7] * o);
                }), g = { d: b };
              }
              y ? (y.x = u + y.x * o, y.y = i + y.y * o) : y = {}, E(m) && (m = Math.round(m * o));
            }
            l.shapeArgs = g, y && g && (l.plotX = y.x, l.plotY = y.y), m && g && (l.dlOptions = K(!0, { style: { width: m } }, kt(x, !0) ? x : void 0)), l.name = l.options.name || f.join("∩");
          }
        }
      }
      C.splitter = "highcharts-split", C.defaultOptions = K(J.defaultOptions, { borderColor: "#cccccc", borderDashStyle: "solid", borderWidth: 1, brighten: 0, clip: !1, colorByPoint: !0, dataLabels: { enabled: !0, verticalAlign: "middle", formatter: function() {
        return this.point.name;
      } }, inactiveOtherPoints: !0, marker: !1, opacity: 0.75, showInLegend: !1, legendType: "point", states: { hover: { opacity: 1, borderColor: "#333333" }, select: { color: "#cccccc", borderColor: "#000000", animation: !1 }, inactive: { opacity: 0.075 } }, tooltip: { pointFormat: "{point.name}: {point.value}" }, legendSymbol: "rectangle" }), ct(C.prototype, { axisTypes: [], directTouch: !0, isCartesian: !1, pointArrayMap: ["value"], pointClass: class extends vt {
        isValid() {
          return Ot(this.value);
        }
        shouldDraw() {
          return !!this.shapeArgs;
        }
      }, utils: w }), Xt(C, "afterSetOptions", function(n) {
        let t = n.options.states || {};
        if (this.is("venn")) for (let r of Object.keys(t)) t[r].halo = !1;
      }), R().registerSeriesType("venn", C);
      let Ft = L();
      return Z.default;
    })());
  }(U)), U.exports;
}
var dt = Ht();
const $t = /* @__PURE__ */ Ut(dt), Yt = /* @__PURE__ */ qt({
  __proto__: null,
  default: $t
}, [dt]);
export {
  Yt as v
};
