import { toRef as ue, resolveComponent as ce, openBlock as a, createElementBlock as r, Fragment as m, renderList as z, withModifiers as M, createBlock as T, createCommentVNode as y, createElementVNode as x, toDisplayString as Ae, normalizeStyle as ie, createVNode as S, computed as O, onMounted as Qe, ref as f, watch as _e, normalizeClass as Fe, unref as U, createSlots as et, withCtx as k, renderSlot as C, normalizeProps as W, guardReactiveProps as q, createTextVNode as tt, nextTick as Re } from "vue";
import { u as ot, o as lt, e as at, c as Se, t as nt, a as st, p as Le, b as rt, X as it, l as ut, O as ct, q as dt, r as vt, x as ft, y as pt } from "./index-Cm2_6s9o.js";
import { _ as ht } from "./Title-Coit3NcT.js";
import { u as gt, U as yt } from "./usePrinter-Cx8U1e30.js";
import { D as mt } from "./DataTable-NGi-FgLM.js";
import { _ as bt } from "./Tooltip-BBgfUr4a.js";
import Z from "./BaseIcon-DpLJi6ci.js";
import kt from "./vue-ui-skeleton-BUS6A44x.js";
import Ct from "./vue-ui-accordion-CxrNF8BI.js";
import { u as De } from "./useNestedProp-BYPZJNhi.js";
import { _ as $t } from "./PackageVersion-CTMY4zeY.js";
import { P as xt } from "./PenAndPaper-DJ_d10S-.js";
import { _ as wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const Pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], Tt = {
  __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: ["zoom", "hover"],
  setup(n, { emit: $ }) {
    const b = n;
    function c(s) {
      $("zoom", s);
    }
    function d(s) {
      $("hover", s);
    }
    return ue(b, "dataset").value.forEach((s) => {
      s.nodes && s.nodes.length > 0 && s.nodes.forEach((v) => {
        v.ancestor = s;
      });
    }), (s, v) => {
      const R = ce("RecursiveCircles", !0);
      return a(!0), r(m, null, z(n.dataset, (p) => (a(), r(m, null, [
        p.polygonPath && p.polygonPath.coordinates ? (a(), r(m, { key: 0 }, [
          (a(!0), r(m, null, z(p.polygonPath.coordinates, (D, J) => (a(), r("circle", {
            cx: D.x,
            cy: D.y,
            r: p.circleRadius,
            fill: `url(#gradient_${p.color})`,
            stroke: n.hoveredUid && n.hoveredUid === p.uid ? n.strokeHovered : n.stroke,
            "stroke-width": n.hoveredUid && n.hoveredUid === p.uid ? p.circleRadius / 6 : p.circleRadius / 12,
            style: { cursor: "pointer" },
            onClick: M((A) => c(p), ["stop"]),
            onMouseover: (A) => d(p),
            onMouseleave: v[0] || (v[0] = (A) => d(null))
          }, null, 40, Pt))), 256)),
          p.nodes && p.nodes.length > 0 ? (a(), T(R, {
            key: 0,
            dataset: p.nodes,
            color: n.color,
            stroke: n.stroke,
            strokeHovered: n.strokeHovered,
            hoveredUid: n.hoveredUid,
            onZoom: c,
            onHover: d
          }, null, 8, ["dataset", "color", "stroke", "strokeHovered", "hoveredUid"])) : y("", !0)
        ], 64)) : y("", !0)
      ], 64))), 256);
    };
  }
}, Ft = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Rt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], St = {
  __name: "RecursiveLinks",
  props: {
    dataset: {
      type: Array,
      default: () => []
    },
    color: {
      type: String,
      default: "#DDDDDD"
    },
    backgroundColor: {
      type: String,
      default: "#FFFFFF"
    }
  },
  setup(n) {
    return ue(n, "dataset").value.forEach((c) => {
      c.nodes && c.nodes.length > 0 && c.nodes.forEach((d) => {
        d.ancestor = c;
      });
    }), (c, d) => {
      const L = ce("RecursiveLinks", !0);
      return a(), r(m, null, [
        (a(!0), r(m, null, z(n.dataset, (s) => (a(), r(m, null, [
          s.polygonPath && s.polygonPath.coordinates ? (a(!0), r(m, { key: 0 }, z(s.polygonPath.coordinates, (v, R) => (a(), r(m, null, [
            s.ancestor && s.ancestor.polygonPath ? (a(), r(m, { key: 0 }, [
              x("line", {
                x1: v.x,
                y1: v.y,
                x2: s.ancestor.polygonPath.coordinates[0].x,
                y2: s.ancestor.polygonPath.coordinates[0].y,
                stroke: n.backgroundColor,
                "stroke-width": s.circleRadius / 1.5
              }, null, 8, Ft),
              x("line", {
                x1: v.x,
                y1: v.y,
                x2: s.ancestor.polygonPath.coordinates[0].x,
                y2: s.ancestor.polygonPath.coordinates[0].y,
                stroke: n.color,
                "stroke-width": s.circleRadius / 2
              }, null, 8, Rt)
            ], 64)) : y("", !0)
          ], 64))), 256)) : y("", !0)
        ], 64))), 256)),
        (a(!0), r(m, null, z(n.dataset, (s) => (a(), r(m, null, [
          s.polygonPath && s.polygonPath.coordinates ? (a(), r(m, { key: 0 }, [
            s.nodes && s.nodes.length > 0 ? (a(), T(L, {
              key: 0,
              dataset: s.nodes,
              color: n.color,
              backgroundColor: n.backgroundColor
            }, null, 8, ["dataset", "color", "backgroundColor"])) : y("", !0)
          ], 64)) : y("", !0)
        ], 64))), 256))
      ], 64);
    };
  }
}, Lt = ["x", "y", "fill", "font-size"], Dt = {
  __name: "RecursiveLabels",
  props: {
    color: {
      type: String,
      default: "#000000"
    },
    dataset: {
      type: Array,
      default: () => []
    },
    hoveredUid: {
      type: String,
      default: null
    }
  },
  emits: ["zoom", "hover"],
  setup(n, { emit: $ }) {
    return ue(n, "dataset").value.forEach((d) => {
      d.nodes && d.nodes.length > 0 && d.nodes.forEach((L) => {
        L.ancestor = d;
      });
    }), (d, L) => {
      const s = ce("RecursiveLabels", !0);
      return a(!0), r(m, null, z(n.dataset, (v) => (a(), r(m, null, [
        v.polygonPath && v.polygonPath.coordinates ? (a(), r(m, { key: 0 }, [
          (a(!0), r(m, null, z(v.polygonPath.coordinates, (R) => (a(), r("text", {
            x: R.x,
            y: R.y + v.circleRadius * 2,
            fill: n.color,
            "font-size": v.circleRadius,
            "text-anchor": "middle",
            style: { opacity: "0.8", "pointer-events": "none" }
          }, Ae(v.name), 9, Lt))), 256)),
          v.nodes && v.nodes.length > 0 ? (a(), T(s, {
            key: 0,
            dataset: v.nodes,
            color: n.color,
            hoveredUid: n.hoveredUid
          }, null, 8, ["dataset", "color", "hoveredUid"])) : y("", !0)
        ], 64)) : y("", !0)
      ], 64))), 256);
    };
  }
}, At = { style: { position: "relative", height: "100%", width: "100%" } }, It = {
  __name: "BaseDirectionPad",
  props: {
    color: {
      type: String,
      default: "#FF0000"
    },
    isFullscreen: {
      type: Boolean,
      default: !1
    }
  },
  emits: ["moveLeft", "moveTop", "moveRight", "moveBottom", "reset"],
  setup(n, { emit: $ }) {
    return (b, c) => (a(), r("div", {
      style: ie(`position: ${n.isFullscreen ? "fixed" : "absolute"};bottom:0;right:${n.isFullscreen ? "12px" : "0"};width:80px;height:80px`),
      "data-html2canvas-ignore": ""
    }, [
      x("div", At, [
        x("button", {
          onClick: c[0] || (c[0] = M((d) => $("moveLeft"), ["stop"])),
          style: { position: "absolute", left: "0", top: "50%", transform: "translateY(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          S(Z, {
            stroke: n.color,
            name: "arrowLeft",
            style: { cursor: "pointer" }
          }, null, 8, ["stroke"])
        ]),
        x("button", {
          onClick: c[1] || (c[1] = M((d) => $("moveTop"), ["stop"])),
          style: { position: "absolute", top: "0", left: "50%", transform: "translateX(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          S(Z, {
            stroke: n.color,
            name: "arrowTop",
            style: { cursor: "pointer" }
          }, null, 8, ["stroke"])
        ]),
        x("button", {
          onClick: c[2] || (c[2] = M((d) => $("moveRight"), ["stop"])),
          style: { position: "absolute", right: "0", top: "50%", transform: "translateY(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          S(Z, {
            stroke: n.color,
            name: "arrowRight",
            style: { cursor: "pointer" }
          }, null, 8, ["stroke"])
        ]),
        x("button", {
          onClick: c[3] || (c[3] = M((d) => $("moveBottom"), ["stop"])),
          style: { position: "absolute", bottom: "0", left: "50%", transform: "translateX(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          S(Z, {
            stroke: n.color,
            name: "arrowBottom",
            style: { cursor: "pointer" }
          }, null, 8, ["stroke"])
        ]),
        x("button", {
          onClick: c[4] || (c[4] = M((d) => $("reset"), ["stop"])),
          style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%,-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          S(Z, {
            stroke: n.color,
            name: "close",
            style: { cursor: "pointer" },
            strokeWidth: 2
          }, null, 8, ["stroke"])
        ])
      ])
    ], 4));
  }
}, Nt = ["id"], Ot = {
  key: 1,
  ref: "noTitle",
  class: "vue-data-ui-no-title-space",
  style: "height:36px; width: 100%;background:transparent"
}, Ut = {
  key: 2,
  style: "width:100%;background:transparent;"
}, zt = ["xmlns", "viewBox"], Bt = ["id"], Mt = ["stop-color"], Ht = ["stop-color"], Et = {
  key: 6,
  class: "vue-data-ui-watermark"
}, Xt = {
  key: 8,
  ref: "source",
  dir: "auto"
}, Gt = ["innerHTML"], jt = {
  __name: "vue-ui-molecule",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  setup(n, { expose: $ }) {
    const b = n, { vue_ui_molecule: c } = ot(), d = O(() => !!b.dataset && b.dataset.length);
    Qe(() => {
      L();
    });
    function L() {
      lt(b.dataset) && at({
        componentName: "VueUiMolecule",
        type: "dataset"
      });
    }
    const s = f(Se()), v = f(null), R = f(!1), p = f(""), D = f(null), J = f(null), A = f(!1), w = f(null), de = f(null), _ = f(0), ve = f(0), fe = f(0), t = O({
      get: () => pe(),
      set: (e) => e
    });
    function pe() {
      const e = De({
        userConfig: b.config,
        defaultConfig: c
      });
      return e.theme ? {
        ...De({
          userConfig: nt.vue_ui_molecule[e.theme] || b.config,
          defaultConfig: e
        }),
        customPalette: st[e.theme] || Le
      } : e;
    }
    _e(() => b.config, (e) => {
      t.value = pe(), L(), ve.value += 1, fe.value += 1;
    }, { deep: !0 });
    const { isPrinting: he, isImaging: ge, generatePdf: ye, generateImage: me } = gt({
      elementId: `cluster_${s.value}`,
      fileName: t.value.style.chart.title.text || "vue-ui-molecule"
    }), Ie = O(() => t.value.userOptions.show && !t.value.style.chart.title.text), Ne = O(() => rt(t.value.customPalette)), P = f({
      showTable: t.value.table.show,
      showDataLabels: !0,
      showTooltip: t.value.style.chart.tooltip.show
    });
    function be(e, l = 0) {
      return Array.isArray(e) && e.length > 0 && e[0].nodes ? be(e[0].nodes, l + 1) : l;
    }
    function Oe() {
      const e = be(b.dataset);
      let l = 100, o = l;
      for (let u = 0; u < e; u += 1)
        l /= 1, o += l;
      return {
        height: o,
        width: o
      };
    }
    const I = f(Oe()), ee = f(`0 0 ${I.value.width} ${I.value.height}`);
    function ke(e, l = { x: -I.value.width / 2.43, y: I.value.height / 2 }, o = I.value.width / 1.1, u = 24, i = 0, h = 0, j = "#BBBBBB") {
      if (e && e.length > 0) {
        const se = ct({
          plot: l,
          radius: o,
          sides: e.length,
          rotation: i
        });
        e.forEach((g, B) => {
          const V = se.coordinates[B];
          let N;
          if (g.ancestor ? g.ancestor.ancestor ? N = g.ancestor.color || j : (N = Ne.value[h] || Le[h] || j, h += 1) : N = j, g.polygonPath = {
            coordinates: [V]
          }, g.circleRadius = u, g.color = N, g.uid = Se(), g.nodes && g.nodes.length > 0) {
            const re = !g.ancestor || !g.ancestor.ancestor ? h : 0;
            g.nodes = ke(
              g.nodes,
              V,
              o / 2.9,
              u / 2.2,
              i + Math.PI * B / g.nodes.length,
              re,
              N
            );
          }
        });
      }
      return e;
    }
    function Ue(e) {
      const l = /* @__PURE__ */ new Set();
      function o(i) {
        i.forEach((h) => {
          h.color && !l.has(h.color) && l.add(h.color), h.nodes && h.nodes.length > 0 && o(h.nodes);
        });
      }
      o(e);
      const u = {};
      return Array.from(l).forEach((i, h) => {
        u[i] = `gradient_${h}`;
      }), u;
    }
    const ze = O(() => Ue(F.value)), F = O(() => ke(b.dataset));
    function te() {
      A.value = !1, J.value = null, de.value = null, w.value = null, le({
        polygonPath: {
          coordinates: [{ x: I.value.width / 2, y: I.value.height / 2 }]
        },
        circleRadius: 24
      });
    }
    const oe = f(null);
    function le(e) {
      D.value.focus(), Re(() => {
        oe.value && cancelAnimationFrame(oe.value);
        const l = ee.value.split(" "), o = parseFloat(l[0]), u = parseFloat(l[1]), i = parseFloat(l[2]), h = parseFloat(l[3]), { x: j, y: se } = e.polygonPath.coordinates[0], { circleRadius: g } = e, B = 8.34, V = j - g * B, N = se - g * B, re = g * B * 2, Ye = g * B * 2, We = Math.sqrt((V - o) ** 2 + (N - u) ** 2), Y = Math.min(1200, Math.max(20, Math.floor(We / 10))), qe = (V - o) / Y, Ze = (N - u) / Y, Je = (re - i) / Y, Ke = (Ye - h) / Y;
        let X = 0;
        function Te() {
          ee.value = `${o + qe * X} ${u + Ze * X} ${i + Je * X} ${h + Ke * X}`, X += t.value.style.chart.zoom.speed, X <= Y && (oe.value = requestAnimationFrame(Te));
        }
        Te();
      });
    }
    function Be(e) {
      J.value === e.uid ? te() : (J.value = e.uid, de.value = e, w.value = {
        circleRadius: e.circleRadius,
        polygonPath: {
          coordinates: [{ x: e.polygonPath.coordinates[0].x, y: e.polygonPath.coordinates[0].y }]
        }
      }, le(e), A.value = e.uid !== F.value[0].uid);
    }
    function Me(e) {
      if (e.target.nodeName !== "circle")
        te(), A.value = !1;
      else
        return;
    }
    const ae = f(null);
    function He(e) {
      ae.value = {
        datapoint: e,
        seriesIndex: -1,
        series: F.value,
        config: t.value
      };
      const l = t.value.style.chart.tooltip.customFormat;
      if (ft(l) && pt(() => l({
        seriesIndex: -1,
        datapoint: e,
        series: F.value,
        config: t.value
      })))
        p.value = l({
          seriesIndex: -1,
          // well, ok
          datapoint: e,
          series: F.value,
          config: t.value
        });
      else {
        let o = "";
        o += `<div style="display:flex;align-items:center;gap:3px"><div style="color:${e.color}">⬤</div><div>${e.name}</div></div>`, e.details && (o += `<div style="width:100%;border-top:1px solid ${t.value.style.chart.tooltip.borderColor};margin-top: 2px">${e.details}</div>`), p.value = `<div style="font-family:inherit">${o}</div>`;
      }
    }
    const Ce = f(null), G = f(null);
    function Ee(e) {
      Ce.value = e, e ? (R.value = !0, He(e), G.value = e.uid) : (R.value = !1, p.value = "", G.value = null);
    }
    function K(e) {
      e === "right" && (w.value.polygonPath.coordinates[0].x += w.value.circleRadius), e === "left" && (w.value.polygonPath.coordinates[0].x -= w.value.circleRadius), e === "top" && (w.value.polygonPath.coordinates[0].y -= w.value.circleRadius), e === "bottom" && (w.value.polygonPath.coordinates[0].y += w.value.circleRadius), le(w.value);
    }
    function Xe(e) {
      const l = [];
      function o(u) {
        u.forEach((i) => {
          const h = {
            name: i.name,
            details: i.details || "-",
            ancestor: i.ancestor && i.ancestor.name || "-",
            color: i.color || ""
          };
          l.push(h), i.nodes && i.nodes.length > 0 && o(i.nodes, i.name);
        });
      }
      return o(e), l;
    }
    const Ge = O(() => Xe(F.value)), H = O(() => {
      const e = [
        t.value.table.translations.nodeName,
        t.value.table.translations.details,
        t.value.table.translations.ancestor
      ], l = Ge.value.map((i, h) => [
        {
          color: i.color,
          name: i.name
        },
        i.details,
        i.ancestor || ""
      ]), o = {
        th: {
          backgroundColor: t.value.table.th.backgroundColor,
          color: t.value.table.th.color,
          outline: t.value.table.th.outline
        },
        td: {
          backgroundColor: t.value.table.td.backgroundColor,
          color: t.value.table.td.color,
          outline: t.value.table.td.outline
        },
        breakpoint: t.value.table.responsiveBreakpoint
      }, u = [
        t.value.table.translations.nodeName,
        t.value.table.translations.details,
        t.value.table.translations.ancestor
      ];
      return {
        head: e,
        body: l,
        config: o,
        colNames: u
      };
    });
    function $e() {
      Re(() => {
        const e = H.value.body.map((u, i) => [[u[0].name], [u[1]], [u[2]]]), l = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [[...H.value.head]]].concat(e), o = dt(l);
        vt({ csvContent: o, title: t.value.style.chart.title.text || "vue-ui-molecule" });
      });
    }
    function je() {
      return F.value;
    }
    const E = f(!1);
    function Ve(e) {
      E.value = e, _.value += 1;
    }
    function xe() {
      P.value.showTable = !P.value.showTable;
    }
    function we() {
      P.value.showDataLabels = !P.value.showDataLabels;
    }
    function Pe() {
      P.value.showTooltip = !P.value.showTooltip;
    }
    const Q = f(!1);
    function ne() {
      Q.value = !Q.value;
    }
    return $({
      getData: je,
      generatePdf: ye,
      generateCsv: $e,
      generateImage: me,
      toggleTable: xe,
      toggleLabels: we,
      toggleTooltip: Pe,
      toggleAnnotator: ne
    }), (e, l) => (a(), r("div", {
      onMouseleave: l[7] || (l[7] = (o) => {
        Ce.value = null, G.value = null;
      }),
      ref_key: "moleculeChart",
      ref: D,
      class: Fe(`vue-ui-molecule ${E.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      style: ie(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),
      id: `cluster_${s.value}`
    }, [
      t.value.userOptions.buttons.annotator ? (a(), T(xt, {
        key: 0,
        parent: D.value,
        backgroundColor: t.value.style.chart.backgroundColor,
        color: t.value.style.chart.color,
        active: Q.value,
        onClose: ne
      }, null, 8, ["parent", "backgroundColor", "color", "active"])) : y("", !0),
      Ie.value ? (a(), r("div", Ot, null, 512)) : y("", !0),
      t.value.style.chart.title.text ? (a(), r("div", Ut, [
        (a(), T(ht, {
          key: `title_${ve.value}`,
          config: {
            title: {
              cy: "molecule-div-title",
              ...t.value.style.chart.title
            },
            subtitle: {
              cy: "molecule-div-subtitle",
              ...t.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"]))
      ])) : y("", !0),
      t.value.userOptions.show && d.value ? (a(), T(yt, {
        ref_key: "details",
        ref: v,
        key: `user_options_${_.value}`,
        backgroundColor: t.value.style.chart.backgroundColor,
        color: t.value.style.chart.color,
        isPrinting: U(he),
        isImaging: U(ge),
        uid: s.value,
        hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
        hasPdf: t.value.userOptions.buttons.pdf,
        hasXls: t.value.userOptions.buttons.csv,
        hasImg: t.value.userOptions.buttons.img,
        hasTable: t.value.userOptions.buttons.table,
        hasLabel: t.value.userOptions.buttons.labels,
        hasFullscreen: t.value.userOptions.buttons.fullscreen,
        isTooltip: P.value.showTooltip,
        titles: { ...t.value.userOptions.buttonTitles },
        chartElement: D.value,
        position: t.value.userOptions.position,
        hasAnnotator: t.value.userOptions.buttons.annotator,
        isAnnotation: Q.value,
        onToggleFullscreen: Ve,
        onGeneratePdf: U(ye),
        onGenerateCsv: $e,
        onGenerateImage: U(me),
        onToggleTable: xe,
        onToggleLabels: we,
        onToggleTooltip: Pe,
        onToggleAnnotator: ne
      }, et({ _: 2 }, [
        e.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: k(() => [
            C(e.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        e.$slots.optionPdf ? {
          name: "optionPdf",
          fn: k(() => [
            C(e.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        e.$slots.optionCsv ? {
          name: "optionCsv",
          fn: k(() => [
            C(e.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        e.$slots.optionImg ? {
          name: "optionImg",
          fn: k(() => [
            C(e.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        e.$slots.optionTable ? {
          name: "optionTable",
          fn: k(() => [
            C(e.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        e.$slots.optionLabels ? {
          name: "optionLabels",
          fn: k(() => [
            C(e.$slots, "optionLabels", {}, void 0, !0)
          ]),
          key: "5"
        } : void 0,
        e.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: k(({ toggleFullscreen: o, isFullscreen: u }) => [
            C(e.$slots, "optionFullscreen", W(q({ toggleFullscreen: o, isFullscreen: u })), void 0, !0)
          ]),
          key: "6"
        } : void 0,
        e.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: k(({ toggleAnnotator: o, isAnnotator: u }) => [
            C(e.$slots, "optionAnnotator", W(q({ toggleAnnotator: o, isAnnotator: u })), 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"])) : y("", !0),
      d.value ? (a(), r("svg", {
        key: 4,
        xmlns: U(it),
        viewBox: ee.value,
        class: Fe({ "vue-data-ui-fullscreen--on": E.value, "vue-data-ui-fulscreen--off": !E.value }),
        style: ie(`overflow: hidden; background:transparent;color:${t.value.style.chart.color}`),
        onClick: l[0] || (l[0] = M((o) => Me(o), ["stop"]))
      }, [
        S($t),
        x("defs", null, [
          (a(!0), r(m, null, z(Object.keys(ze.value), (o) => (a(), r("radialGradient", {
            id: `gradient_${o}`,
            cx: "50%",
            cy: "30%",
            r: "50%",
            fx: "50%",
            fy: "50%"
          }, [
            x("stop", {
              offset: "0%",
              "stop-color": U(ut)(o, 0.5)
            }, null, 8, Mt),
            x("stop", {
              offset: "100%",
              "stop-color": o
            }, null, 8, Ht)
          ], 8, Bt))), 256))
        ]),
        S(St, {
          dataset: F.value,
          color: t.value.style.chart.links.stroke,
          backgroundColor: t.value.style.chart.backgroundColor
        }, null, 8, ["dataset", "color", "backgroundColor"]),
        S(Tt, {
          dataset: F.value,
          hoveredUid: G.value,
          stroke: t.value.style.chart.nodes.stroke,
          strokeHovered: t.value.style.chart.nodes.strokeHovered,
          onZoom: Be,
          onHover: Ee
        }, null, 8, ["dataset", "hoveredUid", "stroke", "strokeHovered"]),
        P.value.showDataLabels ? (a(), T(Dt, {
          key: 0,
          dataset: F.value,
          color: t.value.style.chart.color,
          hoveredUid: G.value
        }, null, 8, ["dataset", "color", "hoveredUid"])) : y("", !0),
        C(e.$slots, "svg", { svg: I.value }, void 0, !0)
      ], 14, zt)) : y("", !0),
      A.value ? (a(), T(It, {
        key: `direction_pad_${_.value}`,
        color: t.value.style.chart.color,
        isFullscreen: E.value,
        onMoveLeft: l[1] || (l[1] = (o) => K("left")),
        onMoveRight: l[2] || (l[2] = (o) => K("right")),
        onMoveTop: l[3] || (l[3] = (o) => K("top")),
        onMoveBottom: l[4] || (l[4] = (o) => K("bottom")),
        onReset: l[5] || (l[5] = (o) => {
          te(), A.value = !1;
        })
      }, null, 8, ["color", "isFullscreen"])) : y("", !0),
      e.$slots.watermark ? (a(), r("div", Et, [
        C(e.$slots, "watermark", W(q({ isPrinting: U(he) || U(ge) })), void 0, !0)
      ])) : y("", !0),
      d.value ? y("", !0) : (a(), T(kt, {
        key: 7,
        config: {
          type: "molecule",
          style: {
            backgroundColor: t.value.style.chart.backgroundColor,
            molecule: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      e.$slots.source ? (a(), r("div", Xt, [
        C(e.$slots, "source", {}, void 0, !0)
      ], 512)) : y("", !0),
      S(bt, {
        show: P.value.showTooltip && R.value,
        backgroundColor: t.value.style.chart.tooltip.backgroundColor,
        color: t.value.style.chart.tooltip.color,
        borderRadius: t.value.style.chart.tooltip.borderRadius,
        borderColor: t.value.style.chart.tooltip.borderColor,
        borderWidth: t.value.style.chart.tooltip.borderWidth,
        fontSize: t.value.style.chart.tooltip.fontSize,
        backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
        position: t.value.style.chart.tooltip.position,
        offsetY: t.value.style.chart.tooltip.offsetY,
        parent: D.value,
        content: p.value,
        isFullscreen: E.value,
        isCustom: t.value.style.chart.tooltip.customFormat && typeof t.value.style.chart.tooltip.customFormat == "function"
      }, {
        "tooltip-before": k(() => [
          C(e.$slots, "tooltip-before", W(q({ ...ae.value })), void 0, !0)
        ]),
        "tooltip-after": k(() => [
          C(e.$slots, "tooltip-after", W(q({ ...ae.value })), void 0, !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
      d.value ? (a(), T(Ct, {
        key: 9,
        hideDetails: "",
        config: {
          open: P.value.showTable,
          maxHeight: 1e4,
          body: {
            backgroundColor: t.value.style.chart.backgroundColor,
            color: t.value.style.chart.color
          },
          head: {
            backgroundColor: t.value.style.chart.backgroundColor,
            color: t.value.style.chart.color
          }
        }
      }, {
        content: k(() => [
          (a(), T(mt, {
            key: `table_${fe.value}`,
            colNames: H.value.colNames,
            head: H.value.head,
            body: H.value.body,
            config: H.value.config,
            title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? ` : ${t.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: l[6] || (l[6] = (o) => P.value.showTable = !1)
          }, {
            th: k(({ th: o }) => [
              x("div", {
                innerHTML: o,
                style: { display: "flex", "align-items": "center" }
              }, null, 8, Gt)
            ]),
            td: k(({ td: o }) => [
              tt(Ae(o.name || o), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"]))
        ]),
        _: 1
      }, 8, ["config"])) : y("", !0)
    ], 46, Nt));
  }
}, ao = /* @__PURE__ */ wt(jt, [["__scopeId", "data-v-33b704cf"]]);
export {
  ao as default
};
