import { toRef as de, resolveComponent as ve, createElementBlock as d, openBlock as l, Fragment as k, renderList as I, createCommentVNode as g, createBlock as R, createElementVNode as B, withModifiers as ze, renderSlot as $, mergeProps as Ce, withCtx as L, toDisplayString as Te, ref as p, onMounted as Le, onUnmounted as He, watchEffect as Be, computed as _, watch as Ge, unref as b, normalizeStyle as ce, normalizeClass as we, createVNode as se, createSlots as Ve, normalizeProps as Y, guardReactiveProps as W, createTextVNode as Xe, nextTick as je } from "vue";
import { u as qe, o as Ye, e as We, c as $e, t as Ze, p as xe, a as Qe, b as Je, X as Ke, l as et, P as tt, q as ot, r as lt, x as at, y as st } from "./index-CTpA678x.js";
import { _ as nt } from "./Title-Dp1KpSLT.js";
import { u as rt, U as it } from "./usePrinter-WPNAmU6x.js";
import { D as ut } from "./DataTable-fKXm7dWw.js";
import { _ as ct } from "./Tooltip-DHKMWQdm.js";
import dt from "./vue-ui-skeleton-CU4p-C4n.js";
import vt from "./vue-ui-accordion-BSjdTzOb.js";
import { u as Pe } from "./useNestedProp-B95uADZw.js";
import { _ as ht } from "./PackageVersion-DqLLMNcj.js";
import { P as ft } from "./PenAndPaper-b7rqpk80.js";
import { u as yt } from "./useUserOptionState-BIvW1Kz7.js";
import { u as pt } from "./useChartAccessibility-BWojgys7.js";
import { _ as gt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const mt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], bt = ["x", "y", "height", "width", "onClick", "onMouseover"], kt = {
  __name: "RecursiveCircles",
  props: {
    color: {
      type: String,
      default: "#000000"
    },
    dataset: {
      type: Array,
      default: () => []
    },
    hoveredUid: {
      type: String,
      default: null
    },
    linkColor: {
      type: String,
      default: "#CCCCCC"
    },
    stroke: {
      type: String,
      default: "#FFFFFF"
    },
    strokeHovered: {
      type: String,
      default: "#000000"
    }
  },
  emits: ["click", "hover"],
  setup(r, { emit: M }) {
    const z = r, S = M;
    function n(s) {
      S("click", s);
    }
    function C(s) {
      S("hover", s);
    }
    return de(z, "dataset").value.forEach((s) => {
      s.nodes && s.nodes.length > 0 && s.nodes.forEach((h) => {
        h.ancestor = s;
      });
    }), (s, h) => {
      const H = ve("RecursiveCircles", !0);
      return l(!0), d(k, null, I(r.dataset, (i) => (l(), d(k, null, [
        i.polygonPath && i.polygonPath.coordinates ? (l(), d(k, { key: 0 }, [
          (l(!0), d(k, null, I(i.polygonPath.coordinates, (x, U) => (l(), d(k, null, [
            B("circle", {
              cx: x.x,
              cy: x.y,
              r: i.circleRadius,
              fill: `url(#gradient_${i.color})`,
              stroke: r.hoveredUid && r.hoveredUid === i.uid ? r.strokeHovered : r.stroke,
              "stroke-width": r.hoveredUid && r.hoveredUid === i.uid ? i.circleRadius / 6 : i.circleRadius / 12,
              style: { cursor: "pointer" },
              onClick: (O) => n(i),
              onMouseover: (O) => C(i),
              onMouseleave: h[0] || (h[0] = (O) => C(null))
            }, null, 40, mt),
            s.$slots.node ? (l(), d("foreignObject", {
              key: 0,
              x: x.x - i.circleRadius,
              y: x.y - i.circleRadius,
              height: i.circleRadius * 2,
              width: i.circleRadius * 2,
              style: { overflow: "visible" },
              onClick: ze((O) => n(i), ["stop"]),
              onMouseover: (O) => C(i),
              onMouseleave: h[1] || (h[1] = (O) => C(null))
            }, [
              $(s.$slots, "node", Ce({ ref_for: !0 }, { node: i }))
            ], 40, bt)) : g("", !0)
          ], 64))), 256)),
          i.nodes && i.nodes.length > 0 ? (l(), R(H, {
            key: 0,
            dataset: i.nodes,
            color: r.color,
            stroke: r.stroke,
            strokeHovered: r.strokeHovered,
            hoveredUid: r.hoveredUid,
            onClick: n,
            onHover: C
          }, {
            node: L(({ node: x }) => [
              $(s.$slots, "node", Ce({ ref_for: !0 }, { node: x }))
            ]),
            _: 2
          }, 1032, ["dataset", "color", "stroke", "strokeHovered", "hoveredUid"])) : g("", !0)
        ], 64)) : g("", !0)
      ], 64))), 256);
    };
  }
}, Ct = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], wt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], $t = {
  __name: "RecursiveLinks",
  props: {
    dataset: {
      type: Array,
      default: () => []
    },
    color: {
      type: String,
      default: "#DDDDDD"
    },
    backgroundColor: {
      type: String,
      default: "#FFFFFF"
    }
  },
  setup(r) {
    return de(r, "dataset").value.forEach((S) => {
      S.nodes && S.nodes.length > 0 && S.nodes.forEach((n) => {
        n.ancestor = S;
      });
    }), (S, n) => {
      const C = ve("RecursiveLinks", !0);
      return l(), d(k, null, [
        (l(!0), d(k, null, I(r.dataset, (c) => (l(), d(k, null, [
          c.polygonPath && c.polygonPath.coordinates ? (l(!0), d(k, { key: 0 }, I(c.polygonPath.coordinates, (s, h) => (l(), d(k, null, [
            c.ancestor && c.ancestor.polygonPath ? (l(), d(k, { key: 0 }, [
              B("line", {
                x1: s.x,
                y1: s.y,
                x2: c.ancestor.polygonPath.coordinates[0].x,
                y2: c.ancestor.polygonPath.coordinates[0].y,
                stroke: r.backgroundColor,
                "stroke-width": c.circleRadius / 1.5
              }, null, 8, Ct),
              B("line", {
                x1: s.x,
                y1: s.y,
                x2: c.ancestor.polygonPath.coordinates[0].x,
                y2: c.ancestor.polygonPath.coordinates[0].y,
                stroke: r.color,
                "stroke-width": c.circleRadius / 2
              }, null, 8, wt)
            ], 64)) : g("", !0)
          ], 64))), 256)) : g("", !0)
        ], 64))), 256)),
        (l(!0), d(k, null, I(r.dataset, (c) => (l(), d(k, null, [
          c.polygonPath && c.polygonPath.coordinates ? (l(), d(k, { key: 0 }, [
            c.nodes && c.nodes.length > 0 ? (l(), R(C, {
              key: 0,
              dataset: c.nodes,
              color: r.color,
              backgroundColor: r.backgroundColor
            }, null, 8, ["dataset", "color", "backgroundColor"])) : g("", !0)
          ], 64)) : g("", !0)
        ], 64))), 256))
      ], 64);
    };
  }
}, xt = ["x", "y", "fill", "font-size"], Pt = {
  __name: "RecursiveLabels",
  props: {
    color: {
      type: String,
      default: "#000000"
    },
    dataset: {
      type: Array,
      default: () => []
    },
    hoveredUid: {
      type: String,
      default: null
    }
  },
  emits: ["zoom", "hover"],
  setup(r, { emit: M }) {
    return de(r, "dataset").value.forEach((n) => {
      n.nodes && n.nodes.length > 0 && n.nodes.forEach((C) => {
        C.ancestor = n;
      });
    }), (n, C) => {
      const c = ve("RecursiveLabels", !0);
      return l(!0), d(k, null, I(r.dataset, (s) => (l(), d(k, null, [
        s.polygonPath && s.polygonPath.coordinates ? (l(), d(k, { key: 0 }, [
          (l(!0), d(k, null, I(s.polygonPath.coordinates, (h) => (l(), d("text", {
            x: h.x,
            y: h.y + s.circleRadius * 2,
            fill: r.color,
            "font-size": s.circleRadius,
            "text-anchor": "middle",
            style: { opacity: "0.8", "pointer-events": "none" }
          }, Te(s.name), 9, xt))), 256)),
          s.nodes && s.nodes.length > 0 ? (l(), R(c, {
            key: 0,
            dataset: s.nodes,
            color: r.color,
            hoveredUid: r.hoveredUid
          }, null, 8, ["dataset", "color", "hoveredUid"])) : g("", !0)
        ], 64)) : g("", !0)
      ], 64))), 256);
    };
  }
};
function Tt(r, M = { x: 0, y: 0, width: 100, height: 100 }, z = 1, S) {
  const n = p({ ...M }), C = p(1), c = p(!1), s = p({ x: 0, y: 0 });
  let h = { x: 0, y: 0 }, H = null, i = null;
  function x(o) {
    var D;
    const v = r.value;
    if (!v) return { x: 0, y: 0 };
    const m = v.createSVGPoint();
    m.x = o.clientX, m.y = o.clientY;
    const T = (D = v.getScreenCTM()) == null ? void 0 : D.inverse();
    return T ? m.matrixTransform(T) : { x: 0, y: 0 };
  }
  function U(o) {
    c.value = !0;
    const v = x(o.touches ? o.touches[0] : o);
    s.value = { x: v.x, y: v.y }, h = { x: 0, y: 0 };
  }
  function O(o) {
    if (!c.value) return;
    const v = x(o.touches ? o.touches[0] : o);
    let m = v.x - s.value.x, T = v.y - s.value.y;
    Math.abs(m) < 0.3 && Math.abs(T) < 0.3 || (h.x = m * 0.8 + h.x * 0.2, h.y = T * 0.8 + h.y * 0.2, s.value = v, H || (H = requestAnimationFrame(te)));
  }
  function te() {
    n.value.x -= h.x, n.value.y -= h.y, H = null;
  }
  function A() {
    c.value = !1;
  }
  function e(o) {
    o.preventDefault();
    const v = o.deltaY > 0 ? 0.9 : 1.1;
    V(v, x(o));
  }
  function G(o) {
    o.preventDefault();
    const v = x(o), m = 1.02 * (1 + z / 100);
    oe(m, v);
  }
  function oe(o, v) {
    i && cancelAnimationFrame(i);
    let m = C.value, T = m * o, D = 0;
    const w = () => {
      D += 0.02;
      let j = m + (T - m) * le(D);
      if (D >= 1) {
        C.value = T, i = null;
        return;
      }
      V(j / m, v), i = requestAnimationFrame(w);
    };
    w();
  }
  const le = (o) => o < 0.5 ? 2 * o * o : -1 + (4 - 2 * o) * o;
  function V(o, v) {
    const m = C.value * o, T = m / C.value, D = n.value.width / T, w = n.value.height / T, j = (v.x - n.value.x) * (1 - 1 / T), ne = (v.y - n.value.y) * (1 - 1 / T);
    n.value.x += j, n.value.y += ne, n.value.width = D, n.value.height = w, C.value = m;
  }
  Le(Z), He(X);
  function Z() {
    const o = r.value;
    o && (o.addEventListener("mousedown", U), o.addEventListener("mousemove", O), o.addEventListener("mouseup", A), o.addEventListener("mouseleave", A), o.addEventListener("wheel", e, { passive: !1 }), o.addEventListener("dblclick", G), o.addEventListener("touchstart", (v) => {
      v.preventDefault(), U(v);
    }, { passive: !1 }), o.addEventListener("touchmove", (v) => {
      v.preventDefault(), O(v);
    }, { passive: !1 }), o.addEventListener("touchend", A));
  }
  function X() {
    const o = r.value;
    o && (o.removeEventListener("mousedown", U), o.removeEventListener("mousemove", O), o.removeEventListener("mouseup", A), o.removeEventListener("mouseleave", A), o.removeEventListener("wheel", e), o.removeEventListener("dblclick", G), o.removeEventListener("touchstart", U), o.removeEventListener("touchmove", O), o.removeEventListener("touchend", A));
  }
  return Be(() => (S.value ? Z() : X(), () => {
    X();
  })), { viewBox: n };
}
const Lt = ["id"], Ft = {
  key: 1,
  ref: "noTitle",
  class: "vue-data-ui-no-title-space",
  style: "height:36px; width: 100%;background:transparent"
}, Et = {
  key: 2,
  style: "width:100%;background:transparent;"
}, St = ["xmlns", "viewBox"], Ot = ["width", "height"], Dt = ["id"], Rt = ["stop-color"], Ut = ["stop-color"], At = {
  key: 5,
  class: "vue-data-ui-watermark"
}, Nt = {
  key: 7,
  ref: "source",
  dir: "auto"
}, _t = ["innerHTML"], It = {
  __name: "vue-ui-molecule",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectNode"],
  setup(r, { expose: M, emit: z }) {
    const { vue_ui_molecule: S } = qe(), n = r, C = z, c = _(() => !!n.dataset && n.dataset.length);
    Le(() => {
      s();
    });
    function s() {
      Ye(n.dataset) && We({
        componentName: "VueUiMolecule",
        type: "dataset"
      });
    }
    const h = p($e()), H = p(null), i = p(!1), x = p(""), U = p(null), O = p(0), te = p(0), A = p(0), e = _({
      get: () => Z(),
      set: (t) => t
    }), { userOptionsVisible: G, setUserOptionsVisibility: oe, keepUserOptionState: le } = yt({ config: e.value }), { svgRef: V } = pt({ config: e.value.style.chart.title });
    function Z() {
      const t = Pe({
        userConfig: n.config,
        defaultConfig: S
      });
      return t.theme ? {
        ...Pe({
          userConfig: Qe.vue_ui_molecule[t.theme] || n.config,
          defaultConfig: t
        }),
        customPalette: Ze[t.theme] || xe
      } : t;
    }
    Ge(() => n.config, (t) => {
      e.value = Z(), G.value = !e.value.userOptions.showOnChartHover, s(), te.value += 1, A.value += 1, w.value.showTable = e.value.table.show, w.value.showTooltip = e.value.style.chart.tooltip.show;
    }, { deep: !0 });
    const { isPrinting: X, isImaging: o, generatePdf: v, generateImage: m } = rt({
      elementId: `cluster_${h.value}`,
      fileName: e.value.style.chart.title.text || "vue-ui-molecule"
    }), T = _(() => e.value.userOptions.show && !e.value.style.chart.title.text), D = _(() => Je(e.value.customPalette)), w = p({
      showTable: e.value.table.show,
      showDataLabels: !0,
      showTooltip: e.value.style.chart.tooltip.show
    });
    function j(t, u = 0) {
      return Array.isArray(t) && t.length > 0 && t[0].nodes ? j(t[0].nodes, u + 1) : u;
    }
    function ne() {
      const t = j(n.dataset);
      let u = 100, a = u;
      for (let y = 0; y < t; y += 1)
        u /= 1, a += u;
      return {
        height: a,
        width: a
      };
    }
    const F = p(ne());
    p(`0 0 ${F.value.width} ${F.value.height}`);
    function he(t, u = { x: -F.value.width / 2.43, y: F.value.height / 2 }, a = F.value.width / 1.1, y = 24, f = 0, P = 0, ue = "#BBBBBB") {
      if (t && t.length > 0) {
        const Ie = tt({
          plot: u,
          radius: a,
          sides: t.length,
          rotation: f
        });
        t.forEach((E, be) => {
          const ke = Ie.coordinates[be];
          let ee;
          if (E.ancestor ? E.ancestor.ancestor ? ee = E.ancestor.color || ue : (ee = D.value[P] || xe[P] || ue, P += 1) : ee = ue, E.polygonPath = {
            coordinates: [ke]
          }, E.circleRadius = y, E.color = ee, E.uid = $e(), E.nodes && E.nodes.length > 0) {
            const Me = !E.ancestor || !E.ancestor.ancestor ? P : 0;
            E.nodes = he(
              E.nodes,
              ke,
              a / 2.9,
              y / 2.2,
              f + Math.PI * be / E.nodes.length,
              Me,
              ee
            );
          }
        });
      }
      return t;
    }
    function Fe(t) {
      const u = /* @__PURE__ */ new Set();
      function a(f) {
        f.forEach((P) => {
          P.color && !u.has(P.color) && u.add(P.color), P.nodes && P.nodes.length > 0 && a(P.nodes);
        });
      }
      a(t);
      const y = {};
      return Array.from(u).forEach((f, P) => {
        y[f] = `gradient_${P}`;
      }), y;
    }
    const Ee = _(() => Fe(N.value)), N = _(() => he(n.dataset)), re = p(null);
    function Se(t) {
      re.value = {
        datapoint: t,
        seriesIndex: -1,
        series: N.value,
        config: e.value
      };
      const u = e.value.style.chart.tooltip.customFormat;
      if (at(u) && st(() => u({
        seriesIndex: -1,
        datapoint: t,
        series: N.value,
        config: e.value
      })))
        x.value = u({
          seriesIndex: -1,
          // well, ok
          datapoint: t,
          series: N.value,
          config: e.value
        });
      else {
        let a = "";
        a += `<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`, t.details && (a += `<div style="width:100%;border-top:1px solid ${e.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`), x.value = `<div style="font-family:inherit">${a}</div>`;
      }
    }
    const fe = p(null), Q = p(null);
    function Oe(t) {
      fe.value = t, t ? (i.value = !0, Se(t), Q.value = t.uid) : (i.value = !1, x.value = "", Q.value = null);
    }
    function De(t) {
      const u = [];
      function a(y) {
        y.forEach((f) => {
          const P = {
            name: f.name,
            details: f.details || "-",
            ancestor: f.ancestor && f.ancestor.name || "-",
            color: f.color || ""
          };
          u.push(P), f.nodes && f.nodes.length > 0 && a(f.nodes, f.name);
        });
      }
      return a(t), u;
    }
    const Re = _(() => De(N.value)), q = _(() => {
      const t = [
        e.value.table.translations.nodeName,
        e.value.table.translations.details,
        e.value.table.translations.ancestor
      ], u = Re.value.map((f, P) => [
        {
          color: f.color,
          name: f.name
        },
        f.details,
        f.ancestor || ""
      ]), a = {
        th: {
          backgroundColor: e.value.table.th.backgroundColor,
          color: e.value.table.th.color,
          outline: e.value.table.th.outline
        },
        td: {
          backgroundColor: e.value.table.td.backgroundColor,
          color: e.value.table.td.color,
          outline: e.value.table.td.outline
        },
        breakpoint: e.value.table.responsiveBreakpoint
      }, y = [
        e.value.table.translations.nodeName,
        e.value.table.translations.details,
        e.value.table.translations.ancestor
      ];
      return {
        head: t,
        body: u,
        config: a,
        colNames: y
      };
    });
    function ye() {
      je(() => {
        const t = q.value.body.map((y, f) => [[y[0].name], [y[1]], [y[2]]]), u = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[...q.value.head]]].concat(t), a = ot(u);
        lt({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-molecule" });
      });
    }
    function Ue() {
      return N.value;
    }
    const J = p(!1);
    function Ae(t) {
      J.value = t, O.value += 1;
    }
    function pe() {
      w.value.showTable = !w.value.showTable;
    }
    function ge() {
      w.value.showDataLabels = !w.value.showDataLabels;
    }
    function me() {
      w.value.showTooltip = !w.value.showTooltip;
    }
    const K = p(!1);
    function ie() {
      K.value = !K.value;
    }
    const Ne = _(() => !K.value), { viewBox: ae } = Tt(V, {
      x: 0,
      y: 0,
      width: F.value.width <= 0 ? 10 : F.value.width,
      height: F.value.height <= 0 ? 10 : F.value.height
    }, e.value.style.chart.zoom.speed, Ne);
    function _e(t) {
      C("selectNode", t);
    }
    return M({
      getData: Ue,
      generatePdf: v,
      generateCsv: ye,
      generateImage: m,
      toggleTable: pe,
      toggleLabels: ge,
      toggleTooltip: me,
      toggleAnnotator: ie
    }), (t, u) => (l(), d("div", {
      ref_key: "moleculeChart",
      ref: U,
      class: we(`vue-ui-molecule ${J.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      style: ce(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
      id: `cluster_${h.value}`,
      onMouseleave: u[1] || (u[1] = (a) => {
        fe.value = null, Q.value = null, b(oe)(!1);
      }),
      onMouseenter: u[2] || (u[2] = () => b(oe)(!0))
    }, [
      e.value.userOptions.buttons.annotator ? (l(), R(ft, {
        key: 0,
        svgRef: b(V),
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        active: K.value,
        onClose: ie
      }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : g("", !0),
      T.value ? (l(), d("div", Ft, null, 512)) : g("", !0),
      e.value.style.chart.title.text ? (l(), d("div", Et, [
        (l(), R(nt, {
          key: `title_${te.value}`,
          config: {
            title: {
              cy: "molecule-div-title",
              ...e.value.style.chart.title
            },
            subtitle: {
              cy: "molecule-div-subtitle",
              ...e.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"]))
      ])) : g("", !0),
      e.value.userOptions.show && c.value && (b(le) || b(G)) ? (l(), R(it, {
        ref_key: "details",
        ref: H,
        key: `user_options_${O.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isPrinting: b(X),
        isImaging: b(o),
        uid: h.value,
        hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
        hasPdf: e.value.userOptions.buttons.pdf,
        hasXls: e.value.userOptions.buttons.csv,
        hasImg: e.value.userOptions.buttons.img,
        hasTable: e.value.userOptions.buttons.table,
        hasLabel: e.value.userOptions.buttons.labels,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        isTooltip: w.value.showTooltip,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: U.value,
        position: e.value.userOptions.position,
        hasAnnotator: e.value.userOptions.buttons.annotator,
        isAnnotation: K.value,
        onToggleFullscreen: Ae,
        onGeneratePdf: b(v),
        onGenerateCsv: ye,
        onGenerateImage: b(m),
        onToggleTable: pe,
        onToggleLabels: ge,
        onToggleTooltip: me,
        onToggleAnnotator: ie,
        style: ce({
          visibility: b(le) ? b(G) ? "visible" : "hidden" : "visible"
        })
      }, Ve({ _: 2 }, [
        t.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: L(() => [
            $(t.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        t.$slots.optionPdf ? {
          name: "optionPdf",
          fn: L(() => [
            $(t.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        t.$slots.optionCsv ? {
          name: "optionCsv",
          fn: L(() => [
            $(t.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        t.$slots.optionImg ? {
          name: "optionImg",
          fn: L(() => [
            $(t.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        t.$slots.optionTable ? {
          name: "optionTable",
          fn: L(() => [
            $(t.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        t.$slots.optionLabels ? {
          name: "optionLabels",
          fn: L(() => [
            $(t.$slots, "optionLabels", {}, void 0, !0)
          ]),
          key: "5"
        } : void 0,
        t.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: L(({ toggleFullscreen: a, isFullscreen: y }) => [
            $(t.$slots, "optionFullscreen", Y(W({ toggleFullscreen: a, isFullscreen: y })), void 0, !0)
          ]),
          key: "6"
        } : void 0,
        t.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: L(({ toggleAnnotator: a, isAnnotator: y }) => [
            $(t.$slots, "optionAnnotator", Y(W({ toggleAnnotator: a, isAnnotator: y })), void 0, !0)
          ]),
          key: "7"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : g("", !0),
      c.value ? (l(), d("svg", {
        key: 4,
        ref_key: "svgRef",
        ref: V,
        xmlns: b(Ke),
        viewBox: `${b(ae).x} ${b(ae).y} ${b(ae).width} ${b(ae).height}`,
        class: we({ "vue-data-ui-fullscreen--on": J.value, "vue-data-ui-fulscreen--off": !J.value }),
        style: ce(`overflow: hidden; background:transparent;color:${e.value.style.chart.color}`)
      }, [
        se(ht),
        t.$slots["chart-background"] ? (l(), d("foreignObject", {
          key: 0,
          x: 0,
          y: 0,
          width: F.value.width <= 0 ? 10 : F.value.width,
          height: F.value.height <= 0 ? 10 : F.value.height,
          style: {
            pointerEvents: "none"
          }
        }, [
          $(t.$slots, "chart-background", {}, void 0, !0)
        ], 8, Ot)) : g("", !0),
        B("defs", null, [
          (l(!0), d(k, null, I(Object.keys(Ee.value), (a) => (l(), d("radialGradient", {
            id: `gradient_${a}`,
            cx: "50%",
            cy: "30%",
            r: "50%",
            fx: "50%",
            fy: "50%"
          }, [
            B("stop", {
              offset: "0%",
              "stop-color": b(et)(a, 0.5)
            }, null, 8, Rt),
            B("stop", {
              offset: "100%",
              "stop-color": a
            }, null, 8, Ut)
          ], 8, Dt))), 256))
        ]),
        se($t, {
          dataset: N.value,
          color: e.value.style.chart.links.stroke,
          backgroundColor: e.value.style.chart.backgroundColor
        }, null, 8, ["dataset", "color", "backgroundColor"]),
        se(kt, {
          dataset: N.value,
          hoveredUid: Q.value,
          stroke: e.value.style.chart.nodes.stroke,
          strokeHovered: e.value.style.chart.nodes.strokeHovered,
          onClick: _e,
          onHover: Oe
        }, {
          node: L(({ node: a }) => [
            $(t.$slots, "node", Y(W({ node: a })), void 0, !0)
          ]),
          _: 3
        }, 8, ["dataset", "hoveredUid", "stroke", "strokeHovered"]),
        w.value.showDataLabels ? (l(), R(Pt, {
          key: 1,
          dataset: N.value,
          color: e.value.style.chart.color,
          hoveredUid: Q.value
        }, null, 8, ["dataset", "color", "hoveredUid"])) : g("", !0),
        $(t.$slots, "svg", { svg: F.value }, void 0, !0)
      ], 14, St)) : g("", !0),
      t.$slots.watermark ? (l(), d("div", At, [
        $(t.$slots, "watermark", Y(W({ isPrinting: b(X) || b(o) })), void 0, !0)
      ])) : g("", !0),
      c.value ? g("", !0) : (l(), R(dt, {
        key: 6,
        config: {
          type: "molecule",
          style: {
            backgroundColor: e.value.style.chart.backgroundColor,
            molecule: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      t.$slots.source ? (l(), d("div", Nt, [
        $(t.$slots, "source", {}, void 0, !0)
      ], 512)) : g("", !0),
      se(ct, {
        show: w.value.showTooltip && i.value,
        backgroundColor: e.value.style.chart.tooltip.backgroundColor,
        color: e.value.style.chart.tooltip.color,
        borderRadius: e.value.style.chart.tooltip.borderRadius,
        borderColor: e.value.style.chart.tooltip.borderColor,
        borderWidth: e.value.style.chart.tooltip.borderWidth,
        fontSize: e.value.style.chart.tooltip.fontSize,
        backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
        position: e.value.style.chart.tooltip.position,
        offsetY: e.value.style.chart.tooltip.offsetY,
        parent: U.value,
        content: x.value,
        isFullscreen: J.value,
        isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
      }, {
        "tooltip-before": L(() => [
          $(t.$slots, "tooltip-before", Y(W({ ...re.value })), void 0, !0)
        ]),
        "tooltip-after": L(() => [
          $(t.$slots, "tooltip-after", Y(W({ ...re.value })), void 0, !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
      c.value ? (l(), R(vt, {
        key: 8,
        hideDetails: "",
        config: {
          open: w.value.showTable,
          maxHeight: 1e4,
          body: {
            backgroundColor: e.value.style.chart.backgroundColor,
            color: e.value.style.chart.color
          },
          head: {
            backgroundColor: e.value.style.chart.backgroundColor,
            color: e.value.style.chart.color
          }
        }
      }, {
        content: L(() => [
          (l(), R(ut, {
            key: `table_${A.value}`,
            colNames: q.value.colNames,
            head: q.value.head,
            body: q.value.body,
            config: q.value.config,
            title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: u[0] || (u[0] = (a) => w.value.showTable = !1)
          }, {
            th: L(({ th: a }) => [
              B("div", {
                innerHTML: a,
                style: { display: "flex", "align-items": "center" }
              }, null, 8, _t)
            ]),
            td: L(({ td: a }) => [
              Xe(Te(a.name || a), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"]))
        ]),
        _: 1
      }, 8, ["config"])) : g("", !0)
    ], 46, Lt));
  }
}, Kt = /* @__PURE__ */ gt(It, [["__scopeId", "data-v-8995dd60"]]);
export {
  Kt as default
};
