import { useCssVars as We, computed as w, ref as p, watch as $e, onMounted as Xe, watchEffect as Ye, createElementBlock as b, openBlock as f, unref as m, normalizeStyle as K, normalizeClass as Te, createBlock as M, createCommentVNode as k, renderSlot as x, createSlots as Ze, withCtx as z, normalizeProps as U, guardReactiveProps as B, createVNode as Je, Fragment as Q, renderList as Ke, createElementVNode as C, mergeProps as Se, toDisplayString as j, createTextVNode as Qe, nextTick as Ie } from "vue";
import { u as et, c as Oe, t as ie, p as ee, a as tt, o as lt, e as at, b as ot, d as st, h as Pe, f as ce, X as nt, l as rt, G as q, af as ut, q as it, r as ct, i as Fe } from "./index-lwwgkcGL.js";
import { u as Ne } from "./useNestedProp-TXT2IHSL.js";
import { u as vt, U as dt } from "./usePrinter-BCTMiyK9.js";
import { _ as ht } from "./Title-C9AEelQ1.js";
import { _ as ft } from "./PenAndPaper-__UJ-k8q.js";
import { u as yt } from "./useUserOptionState-BIvW1Kz7.js";
import { _ as mt } from "./PackageVersion-C-ytTlJe.js";
import pt from "./vue-ui-accordion-CJnR6fHi.js";
import { D as bt } from "./DataTable-C0D_esqj.js";
import gt from "./vue-ui-skeleton-BufuSja5.js";
import { u as kt } from "./useChartAccessibility-BWojgys7.js";
import { t as xt, u as wt } from "./useResponsive-JZ9xq-JV.js";
import { _ as Ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
function Me(r, c = 0) {
  const h = r.reduce((a, { x: s, r: u }) => Math.min(a, s - u - c), 1 / 0), i = r.reduce((a, { x: s, r: u }) => Math.max(a, s + u + c), -1 / 0), v = r.reduce((a, { y: s, r: u }) => Math.min(a, s - u - c), 1 / 0), o = r.reduce((a, { y: s, r: u }) => Math.max(a, s + u + c), -1 / 0);
  return [h, v, i - h, o - v];
}
function _t(r, c, h) {
  const i = r._, v = r.next._, o = i.r + v.r, a = (i.x * v.r + v.x * i.r) / o, s = (i.y * v.r + v.y * i.r) / o;
  return Math.max(Math.abs(a * h), Math.abs(s * c));
}
function Ee(r, c, h) {
  const i = _t, v = r.length;
  if (!v) return r;
  let o, a, s;
  if (o = r[0], o.x = 0, o.y = 0, !(v > 1) || (a = r[1], o.x = -a.r, a.x = o.r, a.y = 0, !(v > 2))) return r;
  Re(a, o, s = r[2]), o = new te(o), a = new te(a), s = new te(s), o.next = s.previous = a, a.next = o.previous = s, s.next = a.previous = o;
  e: for (let u = 3; u < v; ++u) {
    Re(o._, a._, s = r[u]), s = new te(s);
    let g = a.next, $ = o.previous, E = a._.r, R = o._.r;
    do
      if (E <= R) {
        if (Ae(g._, s._)) {
          a = g, o.next = a, a.previous = o, --u;
          continue e;
        }
        E += g._.r, g = g.next;
      } else {
        if (Ae($._, s._)) {
          o = $, o.next = a, a.previous = o, --u;
          continue e;
        }
        R += $._.r, $ = $.previous;
      }
    while (g !== $.next);
    s.previous = o, s.next = a, o.next = a.previous = a = s;
    let A = i(o, h, c), W;
    for (; (s = s.next) !== a; )
      (W = i(s, h, c)) < A && (o = s, A = W);
    a = o.next;
  }
  return r;
}
function Re(r, c, h) {
  const i = r.x - c.x, v = r.y - c.y, o = i * i + v * v;
  if (o) {
    const a = (c.r + h.r) ** 2, s = (r.r + h.r) ** 2;
    if (a > s) {
      const u = (o + s - a) / (2 * o), g = Math.sqrt(Math.max(0, s / o - u * u));
      h.x = r.x - u * i - g * v, h.y = r.y - u * v + g * i;
    } else {
      const u = (o + a - s) / (2 * o), g = Math.sqrt(Math.max(0, a / o - u * u));
      h.x = c.x + u * i - g * v, h.y = c.y + u * v + g * i;
    }
  } else
    h.x = c.x + h.r, h.y = c.y;
}
function Ae(r, c) {
  const h = r.r + c.r - 1e-6, i = c.x - r.x, v = c.y - r.y;
  return h > 0 && h * h > i * i + v * v;
}
class te {
  constructor(c) {
    this._ = c, this.next = null, this.previous = null;
  }
}
const zt = ["id"], $t = ["xmlns", "viewBox", "height", "width"], Tt = ["x", "y", "width", "height"], St = ["id"], It = ["stop-color"], Ot = ["stop-color"], Pt = ["stop-color"], Ft = { key: 0 }, Nt = ["x", "y", "width", "height", "stroke", "stroke-width", "fill", "rx", "onMouseenter", "onClick"], Mt = ["x", "y", "width", "height", "stroke", "stroke-width", "fill", "rx"], Et = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Rt = ["opacity", "x", "y", "font-size", "fill", "font-weight"], At = ["cx", "cy", "r", "opacity", "stroke", "stroke-width", "fill"], Dt = {
  key: 0,
  style: { pointerEvents: "none" }
}, Lt = { key: 1 }, Ht = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Vt = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Gt = {
  key: 6,
  class: "vue-data-ui-watermark"
}, Ut = ["innerHTML"], Bt = {
  __name: "vue-ui-circle-pack",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectDatapoint"],
  setup(r, { expose: c, emit: h }) {
    We((t) => ({
      cf72f1fe: N.value,
      "4e89318c": oe.value
    }));
    const i = r, v = h, { vue_ui_circle_pack: o } = et(), a = w(() => !!i.dataset && i.dataset.length), s = p(Oe()), u = p(null), g = p(null), $ = p(null), E = p(0), R = p(0), A = p(0), W = p(null), e = w({
      get: () => fe(),
      set: (t) => t
    }), { svgRef: ve } = kt({ config: e.value.style.chart.title }), {
      userOptionsVisible: le,
      setUserOptionsVisibility: de,
      keepUserOptionState: he
    } = yt({ config: e.value });
    function fe() {
      const t = Ne({
        userConfig: i.config,
        defaultConfig: o
      });
      return t.theme ? {
        ...Ne({
          userConfig: tt.vue_ui_circle_pack[t.theme] || i.config,
          defaultConfig: t
        }),
        customPalette: ie[t.theme] || ee
      } : t;
    }
    $e(() => i.config, (t) => {
      e.value = fe(), le.value = !e.value.userOptions.showOnChartHover, ae(), E.value += 1, R.value += 1, D.value.showTable = e.value.table.show;
    }, { deep: !0 });
    const { isPrinting: ye, isImaging: me, generatePdf: pe, generateImage: be } = vt({
      elementId: `vue-ui-circle-pack_${s.value}`,
      fileName: e.value.style.chart.title.text || "vue-ui-circle-pack",
      options: e.value.userOptions.print
    }), De = w(() => e.value.userOptions.show && !e.value.style.chart.title.text), D = p({
      showTable: e.value.table.show
    }), ge = p(null), O = p({ h: 10, w: 10 }), ke = p(0), P = p([0, 0, 100, 100]), X = p({ h: 0, w: 0 });
    async function ae() {
      lt(i.dataset) && at({
        componentName: "VueUiCirclePack",
        type: "dataset"
      }), F.value = await Ee(Y.value), T.value = Me(F.value, 1).join(" "), X.value = xe(u.value);
      const t = xt(() => {
        const { width: n, height: l, heightTitle: y, heightNoTitle: _ } = wt({
          chart: u.value,
          title: g.value,
          noTitle: $.value
        }), re = n || 10, ue = l && l > 10 ? l : 10;
        ke.value = e.value.style.chart.title.text ? y : _, requestAnimationFrame(() => {
          O.value.w = re, O.value.h = ue - ke.value, Ie(async () => {
            const je = Y.value.map((qe) => ({ ...qe }));
            F.value = await Ee(je, O.value.h, O.value.w), P.value = Me(F.value, 1), T.value = P.value.join(" "), X.value = xe(u.value);
          });
        });
      });
      ge.value = new ResizeObserver(t), ge.value.observe(u.value.parentNode);
    }
    Xe(ae);
    function xe(t) {
      if (!t || !t.parentElement)
        return console.warn("Component or parent element is missing."), { w: 0, h: 0 };
      const n = t.parentElement;
      if (n.offsetWidth > 0 && n.offsetHeight > 0)
        return { w: n.offsetWidth, h: n.offsetHeight };
      const l = window.getComputedStyle(n), y = l.width, _ = l.height;
      return y !== "auto" && _ !== "auto" && parseFloat(y) > 0 && parseFloat(_) > 0 ? { w: parseFloat(y), h: parseFloat(_) } : { w: 0, h: 0 };
    }
    $e(() => i.dataset, async (t) => {
      await ae();
    }, { deep: !0 });
    const Le = w(() => ot(e.value.customPalette)), Y = w(() => i.dataset.map((t, n) => {
      const l = st(t.color) || Le.value[n] || ie[e.value.theme || "default"][n % ie[e.value.theme || "default"].length] || ee[n] || ee[n % ee.length];
      return {
        ...t,
        r: t.value,
        id: Oe(),
        color: l
      };
    }).filter((t) => ![null, void 0, 1 / 0, -1 / 0].includes(t.value))), F = p([]), T = p("0 0 100 100"), L = w(() => Math.max(...F.value.map((t) => t.r)));
    function we(t, n) {
      return n / L.value * t;
    }
    const d = p(null);
    function He(t) {
      e.value.style.chart.circles.zoom.show && (d.value = t);
    }
    const N = w(() => d.value ? d.value.r : 0), oe = w(() => I.value ? N.value : d.value ? d.value.r > P.value[3] / 6 * e.value.style.chart.circles.zoom.zoomRatio ? d.value.r : P.value[3] / 6 * e.value.style.chart.circles.zoom.zoomRatio : 0), S = p(0), Ve = w(() => ({
      pointerEvents: "none",
      opacity: S.value,
      filter: `drop-shadow(0px 0px 6px ${Pe(d.value.color, e.value.style.chart.circles.zoom.shadowForce)})`
    })), H = p(N.value);
    Ye(() => {
      H.value = N.value, S.value = 0;
      let t = null;
      function n(l) {
        t || (t = l);
        const y = (l - t) / e.value.style.chart.circles.zoom.animationFrameMs;
        y < 1 ? (H.value = N.value + (oe.value - N.value) * y, S.value = 0 + e.value.style.chart.circles.zoom.opacity * y, requestAnimationFrame(n)) : (H.value = oe.value, S.value = e.value.style.chart.circles.zoom.opacity);
      }
      requestAnimationFrame(n);
    });
    const V = w(() => ({
      name: e.value.style.chart.circles.zoom.label.name.fontSize * P.value[3] / 300,
      value: e.value.style.chart.circles.zoom.label.value.fontSize * P.value[3] / 300
    }));
    function se(t) {
      return Fe(
        e.value.style.chart.circles.labels.value.formatter,
        t.value,
        ce({
          p: e.value.style.chart.circles.labels.value.prefix,
          v: t.value,
          s: e.value.style.chart.circles.labels.value.suffix,
          r: e.value.style.chart.circles.labels.value.rounding
        })
      );
    }
    function Ge() {
      return Fe(
        e.value.style.chart.circles.zoom.label.value.formatter,
        d.value.value,
        ce({
          p: e.value.style.chart.circles.zoom.label.value.prefix,
          v: d.value.value,
          s: e.value.style.chart.circles.zoom.label.value.suffix,
          r: e.value.style.chart.circles.zoom.label.value.rounding
        })
      );
    }
    function Ce(t) {
      if (!t)
        return 0;
      const n = t.r / se(t).length * (se(t).length === 1 ? 1 : 2);
      return Math.min(t.r / 2.5, n);
    }
    const G = p(!1);
    function Ue(t) {
      G.value = t, A.value += 1;
    }
    const I = p(!1);
    function ne() {
      I.value = !I.value;
    }
    const Z = w(() => {
      const t = Y.value.map((l) => ({
        name: l.name,
        value: l.value,
        color: l.color
      })).toSorted((l, y) => y.value - l.value), n = t.map((l) => l.value);
      return { head: t, body: n };
    });
    function _e() {
      Ie(() => {
        const t = Z.value.head.map((y, _) => [[
          y.name
        ], [Z.value.body[_]]]), n = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(t), l = it(n);
        ct({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-circle-pack" });
      });
    }
    const J = w(() => {
      const t = [
        e.value.table.columnNames.datapoint,
        e.value.table.columnNames.value
      ], n = Z.value.head.map((_, re) => {
        const ue = ce({
          p: e.value.style.chart.circles.labels.value.prefix,
          v: Z.value.body[re],
          s: e.value.style.chart.circles.labels.value.suffix,
          r: e.value.style.chart.circles.labels.value.rounding
        });
        return [
          {
            color: _.color,
            name: _.name
          },
          ue
        ];
      }), l = {
        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
      };
      return {
        colNames: [
          e.value.table.columnNames.datapoint,
          e.value.table.columnNames.value
        ],
        head: t,
        body: n,
        config: l
      };
    });
    function ze() {
      D.value.showTable = !D.value.showTable;
    }
    function Be() {
      return Y.value;
    }
    return c({
      getData: Be,
      generateCsv: _e,
      generatePdf: pe,
      generateImage: be,
      toggleTable: ze,
      toggleAnnotator: ne
    }), (t, n) => (f(), b("div", {
      id: `vue-ui-circle-pack_${s.value}`,
      class: Te(`vue-ui-circle-pack ${G.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      ref_key: "circlePackChart",
      ref: u,
      style: K(`font-family:${e.value.style.fontFamily};text-align:center;background:${e.value.style.chart.backgroundColor}; height: ${X.value.h}px; width:${X.value.w}px`),
      onMouseenter: n[2] || (n[2] = () => m(de)(!0)),
      onMouseleave: n[3] || (n[3] = () => m(de)(!1))
    }, [
      e.value.userOptions.buttons.annotator ? (f(), M(ft, {
        key: 0,
        svgRef: m(ve),
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        active: I.value,
        scale: L.value / 100,
        onClose: ne
      }, null, 8, ["svgRef", "backgroundColor", "color", "active", "scale"])) : k("", !0),
      x(t.$slots, "userConfig", {}, void 0, !0),
      De.value ? (f(), b("div", {
        key: 1,
        ref_key: "noTitle",
        ref: $,
        class: "vue-data-ui-no-title-space",
        style: "height:36px; width: 100%;background:transparent"
      }, null, 512)) : k("", !0),
      e.value.style.chart.title.text ? (f(), b("div", {
        key: 2,
        ref_key: "chartTitle",
        ref: g,
        style: "width:100%;background:transparent;padding-bottom:12px"
      }, [
        (f(), M(ht, {
          key: `title_${E.value}`,
          config: {
            title: {
              cy: "donut-div-title",
              ...e.value.style.chart.title
            },
            subtitle: {
              cy: "donut-div-subtitle",
              ...e.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"]))
      ], 512)) : k("", !0),
      e.value.userOptions.show && a.value && (m(he) || m(le)) ? (f(), M(dt, {
        ref: "details",
        key: `user_option_${A.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isPrinting: m(ye),
        isImaging: m(me),
        uid: s.value,
        hasTooltip: !1,
        hasLabel: !1,
        hasPdf: e.value.userOptions.buttons.pdf,
        hasImg: e.value.userOptions.buttons.img,
        hasXls: e.value.userOptions.buttons.csv,
        hasTable: e.value.userOptions.buttons.table,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        isFullscreen: G.value,
        chartElement: u.value,
        position: e.value.userOptions.position,
        titles: { ...e.value.userOptions.buttonTitles },
        hasAnnotator: e.value.userOptions.buttons.annotator,
        isAnnotation: I.value,
        onToggleFullscreen: Ue,
        onGeneratePdf: m(pe),
        onGenerateCsv: _e,
        onGenerateImage: m(be),
        onToggleTable: ze,
        onToggleAnnotator: ne,
        style: K({
          visibility: m(he) ? m(le) ? "visible" : "hidden" : "visible"
        })
      }, Ze({ _: 2 }, [
        t.$slots.menuIcon ? {
          name: "menuIcon",
          fn: z(({ isOpen: l, color: y }) => [
            x(t.$slots, "menuIcon", U(B({ isOpen: l, color: y })), void 0, !0)
          ]),
          key: "0"
        } : void 0,
        t.$slots.optionPdf ? {
          name: "optionPdf",
          fn: z(() => [
            x(t.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        t.$slots.optionCsv ? {
          name: "optionCsv",
          fn: z(() => [
            x(t.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        t.$slots.optionImg ? {
          name: "optionImg",
          fn: z(() => [
            x(t.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        t.$slots.optionTable ? {
          name: "optionTable",
          fn: z(() => [
            x(t.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        t.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: z(({ toggleFullscreen: l, isFullscreen: y }) => [
            x(t.$slots, "optionFullscreen", U(B({ toggleFullscreen: l, isFullscreen: y })), void 0, !0)
          ]),
          key: "5"
        } : void 0,
        t.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: z(({ toggleAnnotator: l, isAnnotator: y }) => [
            x(t.$slots, "optionAnnotator", U(B({ toggleAnnotator: l, isAnnotator: y })), void 0, !0)
          ]),
          key: "6"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : k("", !0),
      a.value ? (f(), b("svg", {
        key: 4,
        ref_key: "svgRef",
        ref: ve,
        xmlns: m(nt),
        viewBox: T.value,
        height: O.value.h,
        width: O.value.w,
        class: Te({ "vue-data-ui-fullscreen--on": G.value, "vue-data-ui-fulscreen--off": !G.value }),
        style: K(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color};background:${e.value.style.chart.backgroundColor};`)
      }, [
        Je(mt),
        t.$slots["chart-background"] ? (f(), b("foreignObject", {
          key: 0,
          x: T.value.x,
          y: T.value.y,
          width: T.value.width,
          height: T.value.height,
          style: {
            pointerEvents: "none"
          }
        }, [
          x(t.$slots, "chart-background", {}, void 0, !0)
        ], 8, Tt)) : k("", !0),
        (f(!0), b(Q, null, Ke(F.value, (l) => (f(), b(Q, null, [
          C("defs", null, [
            C("radialGradient", {
              id: l.id,
              fy: "30%"
            }, [
              C("stop", {
                offset: "10%",
                "stop-color": m(rt)(l.color, e.value.style.chart.circles.gradient.intensity / 100)
              }, null, 8, It),
              C("stop", {
                offset: "90%",
                "stop-color": m(Pe)(l.color, 0.1)
              }, null, 8, Ot),
              C("stop", {
                offset: "100%",
                "stop-color": l.color
              }, null, 8, Pt)
            ], 8, St)
          ]),
          t.$slots.pattern ? (f(), b("g", Ft, [
            C("defs", null, [
              x(t.$slots, "pattern", Se({ ref_for: !0 }, { ...l, patternId: `pattern_${s.value}_${l.id}` }), void 0, !0)
            ])
          ])) : k("", !0),
          C("rect", {
            x: l.x - l.r,
            y: l.y - l.r,
            width: l.r * 2,
            height: l.r * 2,
            stroke: e.value.style.chart.circles.stroke,
            "stroke-width": e.value.style.chart.circles.strokeWidth * L.value / 100,
            fill: e.value.style.chart.circles.gradient.show ? `url(#${l.id})` : l.color,
            rx: l.r,
            onMouseenter: () => He(l),
            onMouseout: n[0] || (n[0] = (y) => d.value = null),
            onClick: (y) => v("selectDatapoint", l)
          }, null, 40, Nt),
          t.$slots.pattern ? (f(), b("rect", {
            key: 1,
            x: l.x - l.r,
            y: l.y - l.r,
            width: l.r * 2,
            height: l.r * 2,
            stroke: e.value.style.chart.circles.stroke,
            "stroke-width": e.value.style.chart.circles.strokeWidth * L.value / 100,
            fill: `url(#pattern_${s.value}_${l.id})`,
            rx: l.r,
            style: {
              pointerEvents: "none"
            }
          }, null, 8, Mt)) : k("", !0),
          t.$slots["data-label"] ? x(t.$slots, "data-label", Se({
            key: 2,
            ref_for: !0
          }, { ...l, createTSpans: m(ut), fontSize: { name: l.r / 3 * e.value.style.chart.circles.labels.name.fontSizeRatio, value: Ce(l) * e.value.style.chart.circles.labels.value.fontSizeRatio }, color: e.value.style.chart.circles.labels.name.color ? e.value.style.chart.circles.labels.name.color : m(q)(l.color) }), void 0, !0) : (f(), b(Q, { key: 3 }, [
            e.value.style.chart.circles.labels.name.show && l.name ? (f(), b("text", {
              key: 0,
              style: {
                pointerEvents: "none",
                transition: "opacity 0.2s ease-in-out"
              },
              opacity: d.value && !I.value ? 0.2 : 1,
              x: l.x,
              y: l.y + we(l.r, e.value.style.chart.circles.labels.name.offsetY) - l.r / 10,
              "font-size": l.r / 3 * e.value.style.chart.circles.labels.name.fontSizeRatio,
              fill: e.value.style.chart.circles.labels.name.color ? e.value.style.chart.circles.labels.name.color : m(q)(l.color),
              "font-weight": e.value.style.chart.circles.labels.name.bold ? "bold" : "normal",
              "text-anchor": "middle"
            }, j(l.name), 9, Et)) : k("", !0),
            e.value.style.chart.circles.labels.value.show ? (f(), b("text", {
              key: 1,
              style: {
                pointerEvents: "none",
                transition: "opacity 0.2s ease-in-out"
              },
              opacity: d.value && !I.value ? 0.2 : 1,
              x: l.x,
              y: l.y + we(l.r, e.value.style.chart.circles.labels.value.offsetY) + l.r / 2.5,
              "font-size": Ce(l) * e.value.style.chart.circles.labels.value.fontSizeRatio,
              fill: e.value.style.chart.circles.labels.value.color ? e.value.style.chart.circles.labels.value.color : m(q)(l.color),
              "font-weight": e.value.style.chart.circles.labels.value.bold ? "bold" : "normal",
              "text-anchor": "middle"
            }, j(se(l)), 9, Rt)) : k("", !0)
          ], 64))
        ], 64))), 256)),
        d.value && e.value.style.chart.circles.zoom.show && !I.value ? (f(), b(Q, { key: 1 }, [
          C("circle", {
            style: K(Ve.value),
            cx: d.value.x,
            cy: d.value.y,
            r: H.value,
            opacity: S.value,
            stroke: e.value.style.chart.circles.stroke,
            "stroke-width": e.value.style.chart.circles.strokeWidth * L.value / 100,
            fill: e.value.style.chart.circles.gradient.show ? `url(#${d.value.id})` : d.value.color
          }, null, 12, At),
          t.$slots["zoom-label"] ? (f(), b("g", Dt, [
            x(t.$slots, "zoom-label", U(B({ ...d.value, zoomOpacity: S.value, currentRadius: H.value, fontSize: V.value })), void 0, !0)
          ])) : (f(), b("g", Lt, [
            C("text", {
              style: {
                pointerEvents: "none"
              },
              opacity: S.value,
              x: d.value.x,
              y: d.value.y + e.value.style.chart.circles.zoom.label.name.offsetY - V.value.name / 4,
              "text-anchor": "middle",
              "font-size": V.value.name,
              fill: e.value.style.chart.circles.zoom.label.name.color ? e.value.style.chart.circles.zoom.label.name.color : m(q)(d.value.color),
              "font-weight": e.value.style.chart.circles.zoom.label.name.bold ? "bold" : "normal"
            }, j(d.value.name), 9, Ht),
            C("text", {
              style: {
                pointerEvents: "none"
              },
              opacity: S.value,
              x: d.value.x,
              y: d.value.y + V.value.value + e.value.style.chart.circles.zoom.label.value.offsetY,
              "text-anchor": "middle",
              "font-size": V.value.value,
              fill: e.value.style.chart.circles.zoom.label.value.color ? e.value.style.chart.circles.zoom.label.value.color : m(q)(d.value.color),
              "font-weight": e.value.style.chart.circles.zoom.label.value.bold ? "bold" : "normal"
            }, j(Ge()), 9, Vt)
          ]))
        ], 64)) : k("", !0),
        x(t.$slots, "svg", {
          svg: { ...T.value }
        }, void 0, !0)
      ], 14, $t)) : k("", !0),
      a.value ? k("", !0) : (f(), M(gt, {
        key: 5,
        config: {
          type: "circlePack",
          style: {
            color: "#CCCCCC"
          }
        }
      })),
      t.$slots.watermark ? (f(), b("div", Gt, [
        x(t.$slots, "watermark", U(B({ isPrinting: m(ye) || m(me) })), void 0, !0)
      ])) : k("", !0),
      t.$slots.source ? (f(), b("div", {
        key: 7,
        ref_key: "source",
        ref: W,
        dir: "auto"
      }, [
        x(t.$slots, "source", {}, void 0, !0)
      ], 512)) : k("", !0),
      a.value ? (f(), M(pt, {
        key: 8,
        hideDetails: "",
        config: {
          open: D.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: z(() => [
          (f(), M(bt, {
            key: `table_${R.value}`,
            colNames: J.value.colNames,
            head: J.value.head,
            body: J.value.body,
            config: J.value.config,
            title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: n[1] || (n[1] = (l) => D.value.showTable = !1)
          }, {
            th: z(({ th: l }) => [
              C("div", {
                innerHTML: l,
                style: { display: "flex", "align-items": "center" }
              }, null, 8, Ut)
            ]),
            td: z(({ td: l }) => [
              Qe(j(l.name || l), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"]))
        ]),
        _: 1
      }, 8, ["config"])) : k("", !0)
    ], 46, zt));
  }
}, sl = /* @__PURE__ */ Ct(Bt, [["__scopeId", "data-v-bb4f66a5"]]);
export {
  sl as default
};
