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