import { computed as m, ref as h, watch as Me, onMounted as Ge, onBeforeUnmount as Qe, openBlock as o, createElementBlock as n, normalizeClass as T, normalizeStyle as _, createBlock as P, createCommentVNode as c, unref as y, createSlots as Je, withCtx as k, renderSlot as q, normalizeProps as ee, guardReactiveProps as te, createVNode as re, createElementVNode as v, Fragment as S, renderList as Y, toDisplayString as x, createTextVNode as je, nextTick as Ze } from "vue";
import { u as Ke, c as Ne, t as et, a as tt, p as ne, o as lt, e as F, b as at, d as ut, i as A, f as V, X as ot, s as le, w as st, T as rt, F as nt, x as it, y as vt, q as dt, r as ct } from "./index-DK7qqHGP.js";
import { t as ht, u as yt } from "./useResponsive-NZB-WLRF.js";
import { _ as bt } from "./Title-Cxlu3Etv.js";
import { u as ft, U as pt } from "./usePrinter-Cza87yNE.js";
import { _ as gt } from "./Tooltip-Bt9pHzBM.js";
import { _ as Ae } from "./Shape-DVc7K58k.js";
import { L as mt } from "./Legend-D4PxDNTf.js";
import { D as xt } from "./DataTable-B9SSwFM2.js";
import $t from "./vue-ui-skeleton-CQnYuosp.js";
import kt from "./vue-ui-accordion-5C4CP3gA.js";
import { u as Ve } from "./useNestedProp-0nRX_rTi.js";
import { _ as Lt } from "./PackageVersion-I1_4jcn_.js";
import { _ as wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const _t = ["id"], qt = ["xmlns", "viewBox", "id"], St = ["id"], Ct = ["stop-color"], zt = ["stop-color"], Tt = { key: 0 }, Wt = ["fill", "x", "y", "height", "width", "stroke-width", "stroke", "rx"], Xt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Yt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Mt = { key: 1 }, Nt = ["points", "fill"], At = ["points", "fill"], Vt = ["points", "fill"], Bt = ["points", "fill"], Pt = { key: 2 }, Rt = ["y", "fill", "font-size"], Ft = ["x", "y", "fill", "font-size"], Ot = ["x", "y", "fill", "font-size"], Ht = ["y", "fill", "font-size"], It = { key: 3 }, Dt = ["x", "y", "font-size", "fill"], Et = ["x", "y", "font-size", "fill"], Ut = ["x", "y", "font-size", "fill"], Gt = ["id", "font-size", "transform", "fill"], Qt = ["id", "font-size", "transform", "fill"], Jt = ["id", "font-size", "transform", "fill"], jt = { key: 4 }, Zt = ["fill", "points"], Kt = ["x", "y", "width", "height"], el = ["x", "y", "width", "height"], tl = ["x", "y", "width", "height"], ll = ["x", "y", "width", "height"], al = { key: 0 }, ul = ["x", "y", "font-size", "fill"], ol = { key: 0 }, sl = ["x", "y", "onMouseover", "onClick"], rl = {
  key: 7,
  class: "vue-ui-dna"
}, nl = ["points", "fill"], il = ["points", "fill"], vl = ["points", "fill"], dl = ["points", "fill"], cl = { key: 8 }, hl = ["x", "y", "font-size", "fill", "font-weight"], yl = { key: 9 }, bl = ["x", "y", "fill"], fl = ["x", "y", "fill"], pl = ["x", "y", "fill"], gl = ["x", "y", "fill"], ml = ["stroke", "d"], xl = ["stroke", "d"], $l = {
  key: 3,
  class: "vue-data-ui-watermark"
}, kl = ["onClick"], Ll = {
  key: 0,
  height: "14",
  width: "14",
  viewBox: "0 0 20 20"
}, wl = ["innerHTML"], _l = {
  __name: "vue-ui-quadrant",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectPlot", "selectSide", "selectLegend"],
  setup(Be, { expose: Pe, emit: ae }) {
    const W = Be, { vue_ui_quadrant: Re } = Ke(), G = m(() => !!W.dataset && W.dataset.length), z = h(Ne()), Fe = h(null), Q = h(!1), ue = h(""), ie = h(0), p = h(!1), O = h(null), ve = h(null), de = h(null), ce = h(0), he = h(0), ye = h(0), t = m({
      get: () => be(),
      set: (l) => l
    });
    function be() {
      const l = Ve({
        userConfig: W.config,
        defaultConfig: Re
      });
      return l.theme ? {
        ...Ve({
          userConfig: et.vue_ui_quadrant[l.theme] || W.config,
          defaultConfig: l
        }),
        customPalette: tt[l.theme] || ne
      } : l;
    }
    Me(() => W.config, (l) => {
      t.value = be(), fe(), ce.value += 1, he.value += 1, ye.value += 1;
    }, { deep: !0 });
    const J = h(null);
    function fe() {
      if (lt(W.dataset) ? F({
        componentName: "VueUiQuadrant",
        type: "dataset"
      }) : W.dataset.forEach((l, u) => {
        [null, void 0].includes(l.name) && F({
          componentName: "VueUiQuadrant",
          type: "datasetSerieAttribute",
          property: "name",
          index: u
        }), [null, void 0].includes(l.series) ? F({
          componentName: "VueUiQuadrant",
          type: "datasetSerieAttribute",
          property: "series",
          index: u
        }) : l.series.forEach((a, s) => {
          [null, void 0].includes(a.name) && F({
            componentName: "VueUiQuadrant",
            type: "datasetSerieAttribute",
            property: "name",
            key: "series",
            index: s
          });
        });
      }), t.value.responsive) {
        const l = ht(() => {
          const { width: u, height: a } = yt({
            chart: O.value,
            title: t.value.style.chart.title.text ? ve.value : null,
            legend: t.value.style.chart.legend.show ? de.value : null
          });
          g.value = 48, e.value.height = a, e.value.usableHeight = a - g.value * 2, e.value.width = u, e.value.usableWidth = u - g.value * 2, e.value.top = g.value, e.value.left = g.value, e.value.right = u - g.value, e.value.bottom = a - g.value, e.value.centerX = u / 2, e.value.centerY = a - a / 2, e.value.padding = g.value;
        });
        J.value = new ResizeObserver(l), J.value.observe(O.value.parentNode);
      }
    }
    Ge(() => {
      fe();
    }), Qe(() => {
      J.value && J.value.disconnect();
    });
    const { isPrinting: pe, isImaging: ge, generatePdf: me, generateImage: xe } = ft({
      elementId: `vue-ui-quadrant_${z.value}`,
      fileName: t.value.style.chart.title.text || "vue-ui-quadrant"
    }), $e = m(() => at(t.value.customPalette)), L = h({
      plotLabels: {
        show: t.value.style.chart.layout.labels.plotLabels.show
      },
      showTable: t.value.table.show,
      showTooltip: t.value.style.chart.tooltip.show
    }), g = h(48), e = h({
      height: t.value.style.chart.height,
      usableHeight: t.value.style.chart.height - g.value * 2,
      width: t.value.style.chart.width,
      usableWidth: t.value.style.chart.width - g.value * 2,
      top: g.value,
      left: g.value,
      right: t.value.style.chart.width - g.value,
      bottom: t.value.style.chart.height - g.value,
      centerX: t.value.style.chart.width / 2,
      centerY: t.value.style.chart.height - t.value.style.chart.height / 2,
      padding: g.value
    }), d = h({
      ...JSON.parse(JSON.stringify(e.value)),
      startX: 0,
      startY: 0
    });
    Me(() => e.value, (l) => {
      l && (d.value = {
        ...JSON.parse(JSON.stringify(e.value)),
        startX: 0,
        startY: 0
      });
    }, { deep: !0 });
    const i = h(null), B = m(() => {
      switch (i.value) {
        case "TL":
          return {
            x: d.value.startX + d.value.width / 2,
            y: d.value.height,
            text: t.value.style.chart.layout.labels.quadrantLabels.tl.text || "Top Left",
            fontSize: t.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,
            fill: t.value.style.chart.layout.labels.quadrantLabels.tl.color,
            bold: t.value.style.chart.layout.labels.quadrantLabels.tl.bold
          };
        case "TR":
          return {
            x: d.value.startX + d.value.width / 2,
            y: d.value.height,
            text: t.value.style.chart.layout.labels.quadrantLabels.tr.text || "Top Right",
            fontSize: t.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,
            fill: t.value.style.chart.layout.labels.quadrantLabels.tr.color,
            bold: t.value.style.chart.layout.labels.quadrantLabels.tr.bold
          };
        case "BR":
          return {
            x: d.value.startX + d.value.width / 2,
            y: d.value.height * 1.678,
            text: t.value.style.chart.layout.labels.quadrantLabels.br.text || "Bottom Right",
            fontSize: t.value.style.chart.layout.labels.quadrantLabels.br.fontSize,
            fill: t.value.style.chart.layout.labels.quadrantLabels.br.color,
            bold: t.value.style.chart.layout.labels.quadrantLabels.br.bold
          };
        case "BL":
          return {
            x: d.value.startX + d.value.width / 2,
            y: d.value.height * 1.678,
            text: t.value.style.chart.layout.labels.quadrantLabels.bl.text || "Bottom Left",
            fontSize: t.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,
            fill: t.value.style.chart.layout.labels.quadrantLabels.bl.color,
            bold: t.value.style.chart.layout.labels.quadrantLabels.bl.bold
          };
        default:
          return { x: 0, y: 0, text: "", fontSize: 0, fill: "none", bold: !1 };
      }
    }), Oe = h(null), j = h(!1);
    function H({ targetX: l, targetY: u, targetW: a, targetH: s, side: r }) {
      i.value && E(r);
      const b = {
        x: l - d.value.startX,
        y: u - d.value.startY,
        w: a - d.value.width,
        h: s - d.value.height
      }, f = t.value.zoomAnimationFrames;
      let X = 0;
      function Ye() {
        j.value = !0, d.value.startX += b.x / f, d.value.startY += b.y / f, d.value.width += b.w / f, d.value.height += b.h / f, X += 1, X < f ? Oe.value = requestAnimationFrame(Ye) : j.value = !1;
      }
      Ye();
    }
    function M(l) {
      if (!j.value)
        if (p.value && i.value === l)
          H({
            targetX: 0,
            targetY: 0,
            targetW: e.value.width,
            targetH: e.value.height
          }), i.value = null, p.value = !1;
        else {
          switch (i.value = l, l) {
            case "TL":
              H({
                targetX: 0,
                targetY: 0,
                targetW: e.value.width / 2 + e.value.left,
                targetH: e.value.height / 2 + e.value.top,
                side: "tl"
              });
              break;
            case "TR":
              H({
                targetX: e.value.width / 2 - e.value.left,
                targetY: 0,
                targetW: e.value.width / 2 + e.value.left,
                targetH: e.value.height / 2 + e.value.top,
                side: "tr"
              });
              break;
            case "BR":
              H({
                targetX: e.value.width / 2 - e.value.left,
                targetY: e.value.height / 2 - e.value.top,
                targetW: e.value.width / 2 + e.value.left,
                targetH: e.value.height / 2 + e.value.top,
                side: "br"
              });
              break;
            case "BL":
              H({
                targetX: 0,
                targetY: e.value.height / 2 - e.value.top,
                targetW: e.value.width / 2 + e.value.left,
                targetH: e.value.height / 2 + e.value.top,
                side: "bl"
              });
              break;
            default:
              d.value.startX = 0, d.value.startY = 0, d.value.width = e.value.width, d.value.height = e.value.height;
              break;
          }
          p.value = !0;
        }
    }
    const He = m(() => {
      const l = t.value.style.chart.layout.grid.graduations.steps, u = e.value.usableWidth / (l * 2), a = e.value.top, s = [];
      for (let r = 0; r < l; r += 1)
        s.push({
          x: e.value.padding + u * r,
          y: a + e.value.usableHeight * (r / l / 2),
          height: e.value.usableHeight * (1 - r / l),
          width: e.value.usableWidth * (1 - r / l),
          opacity: Math.round((r + 1) / l * 20)
        });
      return s;
    }), w = m(() => {
      let l = t.value.style.chart.layout.grid.xAxis.max, u = t.value.style.chart.layout.grid.xAxis.min, a = t.value.style.chart.layout.grid.yAxis.max, s = t.value.style.chart.layout.grid.yAxis.min;
      return t.value.style.chart.layout.grid.xAxis.auto && (l = Math.max(...R.value.flatMap((r) => r.series.map((b) => b.x))), u = Math.min(...R.value.flatMap((r) => r.series.map((b) => b.x)))), t.value.style.chart.layout.grid.yAxis.auto && (a = Math.max(...R.value.flatMap((r) => r.series.map((b) => b.y))), s = Math.min(...R.value.flatMap((r) => r.series.map((b) => b.y)))), {
        x: {
          max: l,
          min: u
        },
        y: {
          max: a,
          min: s
        }
      };
    }), N = h([]), R = m(() => W.dataset.map((l, u) => ({
      ...l,
      id: `cat_${u}_${z.value}`,
      color: ut(l.color) || $e.value[u] || ne[u]
    }))), Ie = m(() => R.value.filter((l) => !N.value.includes(l.id))), De = m(() => R.value.map((l, u) => ({
      ...l,
      shape: l.shape || "circle",
      series: l.series.map((a) => ({
        ...a,
        x: ke(a.x),
        y: Le(a.y),
        xValue: a.x,
        yValue: a.y,
        quadrantSide: _e({ x: a.x, y: a.y }),
        categoryName: l.name,
        shape: l.shape,
        color: l.color
      }))
    }))), C = m(() => (W.dataset.forEach((l, u) => {
      l.series.forEach((a, s) => {
        [null, void 0].includes(a.x) && F({
          componentName: "VueUiQuadrant",
          type: "datasetSerieAttribute",
          property: "x",
          key: "series",
          index: s
        }), [null, void 0].includes(a.y) && F({
          componentName: "VueUiQuadrant",
          type: "datasetSerieAttribute",
          property: "y",
          key: "series",
          index: s
        });
      });
    }), Ie.value.map((l, u) => ({
      ...l,
      shape: l.shape || "circle",
      color: l.color || $e.value[u] || ne[u],
      series: l.series.map((a) => ({
        ...a,
        x: ke(a.x),
        y: Le(a.y),
        xValue: a.x,
        yValue: a.y,
        quadrantSide: _e({ x: a.x, y: a.y }),
        categoryName: l.name,
        shape: l.shape,
        color: l.color,
        uid: Ne()
      }))
    }))));
    function ke(l) {
      if (l >= 0) {
        const u = l / w.value.x.max;
        return e.value.centerX + e.value.usableWidth / 2 * u;
      } else {
        const u = Math.abs(l) / Math.abs(w.value.x.min);
        return e.value.centerX - e.value.usableWidth / 2 * u;
      }
    }
    function Le(l) {
      if (l >= 0) {
        const u = l / w.value.y.max;
        return e.value.centerY + (1 - e.value.usableHeight / 2 * u);
      } else {
        const u = Math.abs(l) / Math.abs(w.value.y.min);
        return e.value.centerY - (1 - e.value.usableHeight / 2 * u);
      }
    }
    const Z = m(() => {
      const l = C.value.flatMap((f) => f.series.map((X) => ({
        x: X.xValue,
        y: X.yValue,
        name: X.name,
        category: X.categoryName,
        quadrantSide: X.quadrantSide,
        sideName: t.value.style.chart.layout.labels.quadrantLabels[X.quadrantSide].text,
        color: f.color,
        shape: f.shape
      }))), u = t.value.style.chart.layout.grid.xAxis.name || "x", a = t.value.style.chart.layout.grid.yAxis.name || "y", s = [t.value.translations.category, t.value.translations.item, u, a, t.value.translations.side], r = l.map((f) => [f.category, f.name, f.x, f.y, f.sideName || f.quadrantSide]), b = l.map((f) => ({
        shape: f.shape,
        color: f.color
      }));
      return { head: s, body: r, itsShapes: b, tableData: l };
    }), K = m(() => {
      const l = Z.value.head, u = Z.value.tableData.map((s) => [
        {
          shape: s.shape,
          color: s.color,
          name: s.category
        },
        s.name,
        A(
          t.value.style.chart.layout.labels.plotLabels.x.formatter,
          s.x,
          V({
            v: s.x,
            r: t.value.style.chart.layout.labels.plotLabels.rounding
          })
        ),
        A(
          t.value.style.chart.layout.labels.plotLabels.y.formatter,
          s.y,
          V({
            v: s.y,
            r: t.value.style.chart.layout.labels.plotLabels.rounding
          })
        ),
        s.sideName || s.quadrantSide
      ]), a = {
        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
      };
      return { head: l, body: u, config: a, colNames: l };
    });
    function oe(l) {
      N.value.includes(l) ? N.value = N.value.filter((a) => a !== l) : N.value.push(l);
      const u = Ce();
      ae("selectLegend", u);
    }
    const we = m(() => De.value.map((l) => ({
      name: l.name,
      shape: l.shape,
      color: l.color,
      id: l.id,
      opacity: N.value.includes(l.id) ? 0.5 : 1,
      segregate: () => oe(l.id),
      isSegregated: N.value.includes(l.id)
    }))), Ee = m(() => ({
      cy: "quadrant-div-legend",
      backgroundColor: t.value.style.chart.legend.backgroundColor,
      color: t.value.style.chart.legend.color,
      fontSize: t.value.style.chart.legend.fontSize,
      paddingBottom: 12,
      fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
    }));
    function _e(l) {
      switch (!0) {
        case (l.x >= 0 && l.y >= 0):
          return "tr";
        case (l.x >= 0 && l.y < 0):
          return "br";
        case (l.x < 0 && l.y < 0):
          return "bl";
        case (l.x < 0 && l.y >= 0):
          return "tl";
        default:
          return "";
      }
    }
    const I = h(null), D = h(null), se = h(null);
    function qe(l, u, a) {
      I.value = u.uid, D.value = {
        color: l.color,
        shape: l.shape
      }, se.value = {
        datapoint: u,
        seriesIndex: a,
        series: C.value,
        config: t.value
      }, Q.value = !0;
      const s = t.value.style.chart.tooltip.customFormat;
      if (it(s) && vt(() => s({
        seriesIndex: a,
        datapoint: u,
        series: C.value,
        config: t.value
      })))
        ue.value = s({
          seriesIndex: a,
          datapoint: u,
          series: C.value,
          config: t.value
        });
      else {
        let r = "";
        u.quadrantSide && (r += `<div style="color:${t.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].color};font-weight:${t.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].bold ? "bold" : "400"}">${t.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}</div>`), r += `<div>${l.name}</div>`, r += `<div style="padding-bottom:6px;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`, r += `<div>${t.value.style.chart.layout.grid.xAxis.name ? t.value.style.chart.layout.grid.xAxis.name : "x"}: <b>${A(
          t.value.style.chart.layout.labels.plotLabels.x.formatter,
          u.xValue,
          V({
            v: u.xValue,
            r: t.value.style.chart.tooltip.roundingValue
          }),
          { datapoint: u, category: l, categoryIndex: a }
        )}</b></div>`, r += `<div>${t.value.style.chart.layout.grid.yAxis.name ? t.value.style.chart.layout.grid.yAxis.name : "y"}: <b>${A(
          t.value.style.chart.layout.labels.plotLabels.y.formatter,
          u.yValue,
          V({
            v: u.yValue,
            r: t.value.style.chart.tooltip.roundingValue
          }),
          { datapoint: u, category: l, categoryIndex: a }
        )}</b></div>`, ue.value = `<div style="text-align:left;font-size:${t.value.style.chart.tooltip.fontSize}px">${r}</div>`;
      }
    }
    function Se(l, u) {
      const a = {
        category: l.name,
        shape: l.shape,
        itemName: u.name,
        x: u.xValue,
        y: u.yValue,
        quadrantSide: u.quadrantSide,
        sideName: t.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text
      };
      ae("selectPlot", a);
    }
    function E(l) {
      if (!l) return;
      const u = C.value.flatMap((s) => s.series.filter((r) => r.quadrantSide === l).map((r) => ({
        category: r.categoryName,
        itemName: r.name,
        x: r.xValue,
        y: r.yValue
      }))), a = {
        quadrantSide: l,
        sideName: t.value.style.chart.layout.labels.quadrantLabels[l].text,
        items: [...u]
      };
      ae("selectSide", a);
    }
    const $ = m(() => ({
      TL: {
        tl: {
          x: e.value.left + e.value.usableWidth / 4 - 20,
          y: 0,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tl.color
        },
        tr: {
          x: e.value.left + e.value.usableWidth / 4,
          y: 0,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tr.color
        },
        br: {
          x: e.value.left + e.value.usableWidth / 4,
          y: 20,
          fill: t.value.style.chart.layout.labels.quadrantLabels.br.color
        },
        bl: {
          x: e.value.left + e.value.usableWidth / 4 - 20,
          y: 20,
          fill: t.value.style.chart.layout.labels.quadrantLabels.bl.color
        },
        crosshairs: {
          horizontal: `M ${e.value.left + e.value.usableWidth / 4 - 20},20 ${e.value.left + e.value.usableWidth / 4 + 20},20`,
          vertical: `M ${e.value.left + e.value.usableWidth / 4},0 ${e.value.left + e.value.usableWidth / 4},40`
        }
      },
      TR: {
        tl: {
          x: e.value.centerX + e.value.usableWidth / 4 - 20,
          y: 0,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tl.color
        },
        tr: {
          x: e.value.centerX + e.value.usableWidth / 4,
          y: 0,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tr.color
        },
        br: {
          x: e.value.centerX + e.value.usableWidth / 4,
          y: 20,
          fill: t.value.style.chart.layout.labels.quadrantLabels.br.color
        },
        bl: {
          x: e.value.centerX + e.value.usableWidth / 4 - 20,
          y: 20,
          fill: t.value.style.chart.layout.labels.quadrantLabels.bl.color
        },
        crosshairs: {
          horizontal: `M ${e.value.centerX + e.value.usableWidth / 4 - 20},20 ${e.value.centerX + e.value.usableWidth / 4 + 20},20`,
          vertical: `M ${e.value.centerX + e.value.usableWidth / 4},0 ${e.value.centerX + e.value.usableWidth / 4},40`
        }
      },
      BR: {
        tl: {
          x: e.value.centerX + e.value.usableWidth / 4 - 20,
          y: e.value.centerY - 48,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tl.color
        },
        tr: {
          x: e.value.centerX + e.value.usableWidth / 4,
          y: e.value.centerY - 48,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tr.color
        },
        br: {
          x: e.value.centerX + e.value.usableWidth / 4,
          y: e.value.centerY - 28,
          fill: t.value.style.chart.layout.labels.quadrantLabels.br.color
        },
        bl: {
          x: e.value.centerX + e.value.usableWidth / 4 - 20,
          y: e.value.centerY - 28,
          fill: t.value.style.chart.layout.labels.quadrantLabels.bl.color
        },
        crosshairs: {
          horizontal: `M ${e.value.centerX + e.value.usableWidth / 4 - 20},${e.value.centerY - 28} ${e.value.centerX + e.value.usableWidth / 4 + 20},${e.value.centerY - 28}`,
          vertical: `M ${e.value.centerX + e.value.usableWidth / 4},${e.value.centerY - 48} ${e.value.centerX + e.value.usableWidth / 4},${e.value.centerY - 8}`
        }
      },
      BL: {
        tl: {
          x: e.value.left + e.value.usableWidth / 4 - 20,
          y: e.value.centerY - 48,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tl.color
        },
        tr: {
          x: e.value.left + e.value.usableWidth / 4,
          y: e.value.centerY - 48,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tr.color
        },
        br: {
          x: e.value.left + e.value.usableWidth / 4,
          y: e.value.centerY - 28,
          fill: t.value.style.chart.layout.labels.quadrantLabels.br.color
        },
        bl: {
          x: e.value.left + e.value.usableWidth / 4 - 20,
          y: e.value.centerY - 28,
          fill: t.value.style.chart.layout.labels.quadrantLabels.bl.color
        },
        crosshairs: {
          horizontal: `M ${e.value.left + e.value.usableWidth / 4 - 20},${e.value.centerY - 28} ${e.value.left + e.value.usableWidth / 4 + 20},${e.value.centerY - 28}`,
          vertical: `M ${e.value.left + e.value.usableWidth / 4},${e.value.centerY - 48} ${e.value.left + e.value.usableWidth / 4},${e.value.centerY - 8}`
        }
      }
    }));
    function Ce() {
      return C.value.map((l) => ({
        color: l.color,
        name: l.name,
        shape: l.shape,
        series: l.series.map((u) => ({
          name: u.name,
          x: u.xValue,
          y: u.yValue,
          quadrantSide: u.quadrantSide,
          sideName: t.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text
        }))
      }));
    }
    function ze() {
      Ze(() => {
        const l = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [""]], u = Z.value.head, a = Z.value.body, s = l.concat([u]).concat(a), r = dt(s);
        ct({ csvContent: r, title: t.value.style.chart.title.text || "vue-ui-quadrant" });
      });
    }
    const U = h(!1);
    function Ue(l) {
      U.value = l, ie.value += 1;
    }
    function Te() {
      L.value.showTable = !L.value.showTable;
    }
    function We() {
      L.value.plotLabels.show = !L.value.plotLabels.show;
    }
    function Xe() {
      L.value.showTooltip = !L.value.showTooltip;
    }
    return Pe({
      getData: Ce,
      generatePdf: me,
      generateCsv: ze,
      generateImage: xe,
      toggleTable: Te,
      toggleLabels: We,
      toggleTooltip: Xe
    }), (l, u) => (o(), n("div", {
      class: T(`vue-ui-quadrant ${U.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${t.value.useCssAnimation ? "" : "vue-ui-dna"}`),
      ref_key: "quadrantChart",
      ref: O,
      id: `vue-ui-quadrant_${z.value}`,
      style: _(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text ? "" : "padding-top: 36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive ? "height: 100%" : ""}`)
    }, [
      t.value.style.chart.title.text ? (o(), n("div", {
        key: 0,
        ref_key: "chartTitle",
        ref: ve,
        style: "width:100%;background:transparent;padding-bottom:12px"
      }, [
        (o(), P(bt, {
          key: `table_${ce.value}`,
          config: {
            title: {
              cy: "quadrant-title",
              ...t.value.style.chart.title
            },
            subtitle: {
              cy: "quadrant-subtitle",
              ...t.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"]))
      ], 512)) : c("", !0),
      t.value.userOptions.show && G.value ? (o(), P(pt, {
        ref_key: "details",
        ref: Fe,
        key: `user_options_${ie.value}`,
        backgroundColor: t.value.style.chart.backgroundColor,
        color: t.value.style.chart.color,
        isImaging: y(ge),
        isPrinting: y(pe),
        uid: z.value,
        hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
        hasPdf: t.value.userOptions.buttons.pdf,
        hasImg: t.value.userOptions.buttons.img,
        hasXls: t.value.userOptions.buttons.csv,
        hasTable: t.value.userOptions.buttons.table,
        hasLabel: t.value.userOptions.buttons.labels,
        hasFullscreen: t.value.userOptions.buttons.fullscreen,
        isFullscreen: U.value,
        isTooltip: L.value.showTooltip,
        titles: { ...t.value.userOptions.buttonTitles },
        chartElement: O.value,
        position: t.value.userOptions.position,
        onToggleFullscreen: Ue,
        onGeneratePdf: y(me),
        onGenerateCsv: ze,
        onGenerateImage: y(xe),
        onToggleTable: Te,
        onToggleLabels: We,
        onToggleTooltip: Xe
      }, Je({ _: 2 }, [
        l.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: k(() => [
            q(l.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        l.$slots.optionPdf ? {
          name: "optionPdf",
          fn: k(() => [
            q(l.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        l.$slots.optionCsv ? {
          name: "optionCsv",
          fn: k(() => [
            q(l.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        l.$slots.optionImg ? {
          name: "optionImg",
          fn: k(() => [
            q(l.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        l.$slots.optionTable ? {
          name: "optionTable",
          fn: k(() => [
            q(l.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        l.$slots.optionLabels ? {
          name: "optionLabels",
          fn: k(() => [
            q(l.$slots, "optionLabels", {}, void 0, !0)
          ]),
          key: "5"
        } : void 0,
        l.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: k(({ toggleFullscreen: a, isFullscreen: s }) => [
            q(l.$slots, "optionFullscreen", ee(te({ toggleFullscreen: a, isFullscreen: s })), void 0, !0)
          ]),
          key: "6"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : c("", !0),
      G.value ? (o(), n("svg", {
        key: 2,
        xmlns: y(ot),
        class: T({ "vue-data-ui-fullscreen--on": U.value, "vue-data-ui-fulscreen--off": !U.value }),
        viewBox: `${d.value.startX} ${d.value.startY} ${d.value.width} ${d.value.height}`,
        style: _(`max-width:100%;overflow:${p.value ? "hidden" : "visible"};background:transparent;color:${t.value.style.chart.color}`),
        id: `svg_${z.value}`
      }, [
        re(Lt),
        v("defs", null, [
          (o(!0), n(S, null, Y(C.value, (a, s) => (o(), n("radialGradient", {
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `quadrant_gradient_${z.value}_${s}`
          }, [
            v("stop", {
              offset: "0%",
              "stop-color": y(le)(y(st)(a.color, 0.05), t.value.style.chart.layout.areas.opacity)
            }, null, 8, Ct),
            v("stop", {
              offset: "100%",
              "stop-color": y(le)(a.color, t.value.style.chart.layout.areas.opacity)
            }, null, 8, zt)
          ], 8, St))), 256))
        ]),
        t.value.style.chart.layout.grid.graduations.show ? (o(), n("g", Tt, [
          (o(!0), n(S, null, Y(He.value, (a) => (o(), n("rect", {
            fill: t.value.style.chart.layout.grid.graduations.fill ? y(le)(t.value.style.chart.layout.grid.graduations.color, a.opacity) : "none",
            x: a.x,
            y: a.y,
            height: a.height <= 0 ? 1e-3 : a.height,
            width: a.width <= 0 ? 1e-3 : a.width,
            "stroke-width": t.value.style.chart.layout.grid.graduations.strokeWidth,
            stroke: t.value.style.chart.layout.grid.graduations.stroke,
            rx: t.value.style.chart.layout.grid.graduations.roundingForce
          }, null, 8, Wt))), 256))
        ])) : c("", !0),
        v("line", {
          x1: e.value.left,
          y1: e.value.centerY,
          x2: e.value.right,
          y2: e.value.centerY,
          stroke: t.value.style.chart.layout.grid.stroke,
          "stroke-width": t.value.style.chart.layout.grid.strokeWidth
        }, null, 8, Xt),
        v("line", {
          x1: e.value.centerX,
          y1: e.value.top,
          x2: e.value.centerX,
          y2: e.value.bottom,
          stroke: t.value.style.chart.layout.grid.stroke,
          "stroke-width": t.value.style.chart.layout.grid.strokeWidth
        }, null, 8, Yt),
        t.value.style.chart.layout.grid.showArrows ? (o(), n("g", Mt, [
          v("polygon", {
            points: `${e.value.right - 8},${e.value.centerY - 6} ${e.value.right},${e.value.centerY} ${e.value.right - 8},${e.value.centerY + 6}`,
            fill: t.value.style.chart.layout.grid.stroke,
            stroke: "none"
          }, null, 8, Nt),
          v("polygon", {
            points: `${e.value.left + 8},${e.value.centerY - 6} ${e.value.left},${e.value.centerY} ${e.value.left + 8},${e.value.centerY + 6}`,
            fill: t.value.style.chart.layout.grid.stroke,
            stroke: "none"
          }, null, 8, At),
          v("polygon", {
            points: `${e.value.centerX - 6},${e.value.top + 8} ${e.value.centerX},${e.value.top} ${e.value.centerX + 6},${e.value.top + 8}`,
            fill: t.value.style.chart.layout.grid.stroke,
            stroke: "none"
          }, null, 8, Vt),
          v("polygon", {
            points: `${e.value.centerX - 6},${e.value.bottom - 8} ${e.value.centerX},${e.value.bottom} ${e.value.centerX + 6},${e.value.bottom - 8}`,
            fill: t.value.style.chart.layout.grid.stroke,
            stroke: "none"
          }, null, 8, Bt)
        ])) : c("", !0),
        t.value.style.chart.layout.labels.quadrantLabels.show && !p.value ? (o(), n("g", Pt, [
          t.value.style.chart.layout.labels.quadrantLabels.tl.text ? (o(), n("text", {
            key: 0,
            x: 0,
            y: e.value.top - e.value.padding / 2,
            "text-anchor": "start",
            fill: t.value.style.chart.layout.labels.quadrantLabels.tl.color,
            "font-size": t.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,
            style: _(`font-weight:${t.value.style.chart.layout.labels.quadrantLabels.tl.bold ? "bold" : ""}`),
            onClick: u[0] || (u[0] = (a) => E("tl"))
          }, x(t.value.style.chart.layout.labels.quadrantLabels.tl.text), 13, Rt)) : c("", !0),
          t.value.style.chart.layout.labels.quadrantLabels.tr.text ? (o(), n("text", {
            key: 1,
            x: e.value.width,
            y: e.value.top - e.value.padding / 2,
            "text-anchor": "end",
            fill: t.value.style.chart.layout.labels.quadrantLabels.tr.color,
            "font-size": t.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,
            style: _(`font-weight:${t.value.style.chart.layout.labels.quadrantLabels.tr.bold ? "bold" : ""}`),
            onClick: u[1] || (u[1] = (a) => E("tr"))
          }, x(t.value.style.chart.layout.labels.quadrantLabels.tr.text), 13, Ft)) : c("", !0),
          t.value.style.chart.layout.labels.quadrantLabels.br.text ? (o(), n("text", {
            key: 2,
            x: e.value.width,
            y: e.value.bottom + e.value.padding * 0.7,
            "text-anchor": "end",
            fill: t.value.style.chart.layout.labels.quadrantLabels.br.color,
            "font-size": t.value.style.chart.layout.labels.quadrantLabels.br.fontSize,
            style: _(`font-weight:${t.value.style.chart.layout.labels.quadrantLabels.br.bold ? "bold" : ""}`),
            onClick: u[2] || (u[2] = (a) => E("br"))
          }, x(t.value.style.chart.layout.labels.quadrantLabels.br.text), 13, Ot)) : c("", !0),
          t.value.style.chart.layout.labels.quadrantLabels.bl.text ? (o(), n("text", {
            key: 3,
            x: 0,
            y: e.value.bottom + e.value.padding * 0.7,
            "text-anchor": "start",
            fill: t.value.style.chart.layout.labels.quadrantLabels.bl.color,
            "font-size": t.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,
            style: _(`font-weight:${t.value.style.chart.layout.labels.quadrantLabels.bl.bold ? "bold" : ""}`),
            onClick: u[3] || (u[3] = (a) => E("bl"))
          }, x(t.value.style.chart.layout.labels.quadrantLabels.bl.text), 13, Ht)) : c("", !0)
        ])) : c("", !0),
        t.value.style.chart.layout.labels.axisLabels.show ? (o(), n("g", It, [
          v("text", {
            x: e.value.centerX,
            y: e.value.top - e.value.padding / 6,
            "text-anchor": "middle",
            "font-size": t.value.style.chart.layout.labels.axisLabels.fontSize,
            fill: t.value.style.chart.layout.labels.axisLabels.color.positive
          }, x(y(A)(
            t.value.style.chart.layout.labels.plotLabels.y.formatter,
            w.value.y.max,
            y(V)({
              v: w.value.y.max,
              r: t.value.style.chart.layout.labels.plotLabels.rounding
            })
          )), 9, Dt),
          v("text", {
            x: e.value.centerX,
            y: e.value.top - e.value.padding / 2,
            "text-anchor": "middle",
            "font-size": t.value.style.chart.layout.labels.axisLabels.fontSize,
            fill: t.value.style.chart.layout.labels.axisLabels.color.positive
          }, x(t.value.style.chart.layout.grid.yAxis.name), 9, Et),
          v("text", {
            x: e.value.centerX,
            y: e.value.bottom + e.value.padding * 0.35,
            "text-anchor": "middle",
            "font-size": t.value.style.chart.layout.labels.axisLabels.fontSize,
            fill: t.value.style.chart.layout.labels.axisLabels.color.negative
          }, x(y(A)(
            t.value.style.chart.layout.labels.plotLabels.y.formatter,
            w.value.y.min,
            y(V)({
              v: w.value.y.min,
              r: t.value.style.chart.layout.labels.plotLabels.rounding
            })
          )), 9, Ut),
          v("text", {
            id: `xLabelMin_${z.value}`,
            "text-anchor": "middle",
            "font-size": t.value.style.chart.layout.labels.axisLabels.fontSize,
            transform: `translate(${e.value.padding - t.value.style.chart.layout.labels.axisLabels.fontSize}, ${e.value.height / 2}), rotate(-90)`,
            fill: t.value.style.chart.layout.labels.axisLabels.color.negative
          }, x(y(A)(
            t.value.style.chart.layout.labels.plotLabels.x.formatter,
            w.value.x.min,
            y(V)({
              v: w.value.x.min,
              r: t.value.style.chart.layout.labels.plotLabels.rounding
            })
          )), 9, Gt),
          v("text", {
            id: `xLabelMax_${z.value}`,
            "text-anchor": "middle",
            "font-size": t.value.style.chart.layout.labels.axisLabels.fontSize,
            transform: `translate(${e.value.width - e.value.padding + t.value.style.chart.layout.labels.axisLabels.fontSize}, ${e.value.height / 2}), rotate(90)`,
            fill: t.value.style.chart.layout.labels.axisLabels.color.positive
          }, x(y(A)(
            t.value.style.chart.layout.labels.plotLabels.x.formatter,
            w.value.x.max,
            y(V)({
              v: w.value.x.max,
              r: t.value.style.chart.layout.labels.plotLabels.rounding
            })
          )), 9, Qt),
          v("text", {
            id: `xLabelMaxName_${z.value}`,
            "text-anchor": "middle",
            "font-size": t.value.style.chart.layout.labels.axisLabels.fontSize,
            transform: `translate(${e.value.width - t.value.style.chart.layout.labels.axisLabels.fontSize}, ${e.value.height / 2}), rotate(90)`,
            fill: t.value.style.chart.layout.labels.axisLabels.color.positive
          }, x(t.value.style.chart.layout.grid.xAxis.name), 9, Jt)
        ])) : c("", !0),
        t.value.style.chart.layout.areas.show ? (o(), n("g", jt, [
          (o(!0), n(S, null, Y(C.value, (a, s) => (o(), n("g", null, [
            a.series.length > 2 ? (o(), n("polygon", {
              key: 0,
              "data-cy-quadrant-area": "",
              fill: t.value.style.chart.layout.areas.useGradient ? `url(#quadrant_gradient_${z.value}_${s})` : y(le)(a.color, t.value.style.chart.layout.areas.opacity),
              points: y(rt)(a)
            }, null, 8, Zt)) : c("", !0)
          ]))), 256))
        ])) : c("", !0),
        v("g", null, [
          v("rect", {
            onClick: u[4] || (u[4] = (a) => M("TL")),
            x: e.value.left,
            y: e.value.top,
            width: e.value.usableWidth / 2 <= 0 ? 1e-3 : e.value.usableWidth / 2,
            height: e.value.usableHeight / 2 <= 0 ? 1e-3 : e.value.usableHeight / 2,
            fill: "transparent",
            class: T({ "vue-data-ui-zoom-plus": !p.value, "vue-data-ui-zoom-minus": p.value })
          }, null, 10, Kt),
          v("rect", {
            onClick: u[5] || (u[5] = (a) => M("TR")),
            x: e.value.centerX,
            y: e.value.top,
            width: e.value.usableWidth / 2 <= 0 ? 1e-3 : e.value.usableWidth / 2,
            height: e.value.usableHeight / 2 <= 0 ? 1e-3 : e.value.usableHeight / 2,
            fill: "transparent",
            class: T({ "vue-data-ui-zoom-plus": !p.value, "vue-data-ui-zoom-minus": p.value })
          }, null, 10, el),
          v("rect", {
            onClick: u[6] || (u[6] = (a) => M("BR")),
            x: e.value.centerX,
            y: e.value.centerY,
            width: e.value.usableWidth / 2 <= 0 ? 1e-3 : e.value.usableWidth / 2,
            height: e.value.usableHeight / 2 <= 0 ? 1e-3 : e.value.usableHeight / 2,
            fill: "transparent",
            class: T({ "vue-data-ui-zoom-plus": !p.value, "vue-data-ui-zoom-minus": p.value })
          }, null, 10, tl),
          v("rect", {
            onClick: u[7] || (u[7] = (a) => M("BL")),
            x: e.value.left,
            y: e.value.centerY,
            width: e.value.usableWidth / 2 <= 0 ? 1e-3 : e.value.usableWidth / 2,
            height: e.value.usableHeight / 2 <= 0 ? 1e-3 : e.value.usableHeight / 2,
            fill: "transparent",
            class: T({ "vue-data-ui-zoom-plus": !p.value, "vue-data-ui-zoom-minus": p.value })
          }, null, 10, ll)
        ]),
        t.value.style.chart.layout.labels.plotLabels.showAsTag ? (o(), n(S, { key: 6 }, [
          L.value.plotLabels.show ? (o(), n("g", ol, [
            (o(!0), n(S, null, Y(C.value, (a, s) => (o(), n(S, null, [
              (o(!0), n(S, null, Y(a.series, (r) => (o(), n("foreignObject", {
                style: { overflow: "visible" },
                height: "10",
                width: "100",
                x: r.x - 50,
                y: r.y - t.value.style.chart.layout.labels.plotLabels.fontSize,
                onMouseover: (b) => qe(a, r, s),
                onMouseleave: u[9] || (u[9] = (b) => {
                  Q.value = !1, I.value = null, D.value = null;
                }),
                onClick: (b) => Se(a, r)
              }, [
                v("div", {
                  style: _(`color:${y(nt)(a.color)};margin: 0 auto; font-size:${t.value.style.chart.layout.labels.plotLabels.fontSize}px; text-align:center;background:${a.color}; padding: 2px 4px; border-radius: 12px; height: ${t.value.style.chart.layout.labels.plotLabels.fontSize * 1.5}px`)
                }, x(r.name), 5)
              ], 40, sl))), 256))
            ], 64))), 256))
          ])) : c("", !0)
        ], 64)) : (o(), n(S, { key: 5 }, [
          (o(!0), n(S, null, Y(C.value, (a, s) => (o(), n("g", null, [
            (o(!0), n(S, null, Y(a.series, (r) => (o(), P(Ae, {
              color: a.color,
              isSelected: I.value && r.uid === I.value,
              plot: r,
              radius: t.value.style.chart.layout.plots.radius / (p.value ? 1.5 : 1),
              shape: a.shape,
              stroke: t.value.style.chart.layout.plots.outline ? t.value.style.chart.layout.plots.outlineColor : "none",
              strokeWidth: t.value.style.chart.layout.plots.outlineWidth,
              onMouseover: (b) => qe(a, r, s),
              onMouseleave: u[8] || (u[8] = (b) => {
                Q.value = !1, I.value = null, D.value = null;
              }),
              onClick: (b) => Se(a, r)
            }, null, 8, ["color", "isSelected", "plot", "radius", "shape", "stroke", "strokeWidth", "onMouseover", "onClick"]))), 256))
          ]))), 256)),
          L.value.plotLabels.show ? (o(), n("g", al, [
            (o(!0), n(S, null, Y(C.value, (a) => (o(), n("g", null, [
              (o(!0), n(S, null, Y(a.series, (s) => (o(), n("text", {
                x: s.x,
                y: s.y + t.value.style.chart.layout.labels.plotLabels.offsetY + t.value.style.chart.layout.plots.radius,
                "text-anchor": "middle",
                "font-size": t.value.style.chart.layout.labels.plotLabels.fontSize / (p.value ? 1.5 : 1),
                fill: t.value.style.chart.layout.labels.plotLabels.color
              }, x(s.name), 9, ul))), 256))
            ]))), 256))
          ])) : c("", !0)
        ], 64)),
        p.value ? (o(), n("g", rl, [
          i.value === "TL" ? (o(), n("polygon", {
            key: 0,
            points: `${e.value.left - 1},${e.value.centerY} ${e.value.centerX},${e.value.centerY} ${e.value.centerX},${e.value.top - 1} ${e.value.right},${e.value.top - 1} ${e.value.right},${e.value.bottom} ${e.value.left - 1},${e.value.bottom} ${e.value.left - 1},${e.value.centerY}`,
            fill: t.value.style.chart.backgroundColor,
            style: { opacity: "1" }
          }, null, 8, nl)) : c("", !0),
          i.value === "TR" ? (o(), n("polygon", {
            key: 1,
            points: `${e.value.left},${e.value.top - 1} ${e.value.centerX},${e.value.top - 1} ${e.value.centerX},${e.value.centerY} ${e.value.right + 1},${e.value.centerY} ${e.value.right + 1},${e.value.bottom} ${e.value.left},${e.value.bottom} ${e.value.left},${e.value.top - 1}`,
            fill: t.value.style.chart.backgroundColor,
            style: { opacity: "1" }
          }, null, 8, il)) : c("", !0),
          i.value === "BR" ? (o(), n("polygon", {
            key: 2,
            points: `${e.value.left},${e.value.top} ${e.value.right + 1},${e.value.top} ${e.value.right + 1},${e.value.centerY} ${e.value.centerX},${e.value.centerY} ${e.value.centerX},${e.value.bottom + 1} ${e.value.left},${e.value.bottom + 1} ${e.value.left},${e.value.top}`,
            fill: t.value.style.chart.backgroundColor,
            style: { opacity: "1" }
          }, null, 8, vl)) : c("", !0),
          i.value === "BL" ? (o(), n("polygon", {
            key: 3,
            points: `${e.value.left - 1},${e.value.top} ${e.value.right},${e.value.top} ${e.value.right},${e.value.bottom + 1} ${e.value.centerX},${e.value.bottom + 1} ${e.value.centerX},${e.value.centerY} ${e.value.left - 1},${e.value.centerY} ${e.value.left - 1},${e.value.top}`,
            fill: t.value.style.chart.backgroundColor,
            style: { opacity: "1" }
          }, null, 8, dl)) : c("", !0)
        ])) : c("", !0),
        i.value && !j.value ? (o(), n("g", cl, [
          v("text", {
            x: B.value.x,
            y: B.value.y - B.value.fontSize / 1.5,
            "font-size": B.value.fontSize / 1.5,
            fill: B.value.fill,
            "text-anchor": "middle",
            "font-weight": B.value.bold ? "bold" : "normal"
          }, x(B.value.text), 9, hl)
        ])) : c("", !0),
        p.value && i.value ? (o(), n("g", yl, [
          v("rect", {
            x: $.value[i.value].tl.x,
            y: $.value[i.value].tl.y,
            height: "20",
            width: "20",
            fill: $.value[i.value].tl.fill,
            style: _(`cursor: pointer; opacity: ${i.value === "TL" ? 1 : 0.2}`),
            onClick: u[10] || (u[10] = (a) => M("TL")),
            class: T({ "vue-ui-quadrant-mini-map-cell": !0, "vue-ui-quadrant-mini-map-cell-selectable": i.value !== "TL" })
          }, null, 14, bl),
          v("rect", {
            x: $.value[i.value].tr.x,
            y: $.value[i.value].tr.y,
            height: "20",
            width: "20",
            fill: $.value[i.value].tr.fill,
            style: _(`cursor: pointer; opacity: ${i.value === "TR" ? 1 : 0.2}`),
            onClick: u[11] || (u[11] = (a) => M("TR")),
            class: T({ "vue-ui-quadrant-mini-map-cell": !0, "vue-ui-quadrant-mini-map-cell-selectable": i.value !== "TR" })
          }, null, 14, fl),
          v("rect", {
            x: $.value[i.value].br.x,
            y: $.value[i.value].br.y,
            height: "20",
            width: "20",
            fill: $.value[i.value].br.fill,
            style: _(`cursor: pointer; opacity: ${i.value === "BR" ? 1 : 0.2}`),
            onClick: u[12] || (u[12] = (a) => M("BR")),
            class: T({ "vue-ui-quadrant-mini-map-cell": !0, "vue-ui-quadrant-mini-map-cell-selectable": i.value !== "BR" })
          }, null, 14, pl),
          v("rect", {
            x: $.value[i.value].bl.x,
            y: $.value[i.value].bl.y,
            height: "20",
            width: "20",
            fill: $.value[i.value].bl.fill,
            style: _(`cursor: pointer; opacity: ${i.value === "BL" ? 1 : 0.2}`),
            onClick: u[13] || (u[13] = (a) => M("BL")),
            class: T({ "vue-ui-quadrant-mini-map-cell": !0, "vue-ui-quadrant-mini-map-cell-selectable": i.value !== "BL" })
          }, null, 14, gl),
          v("path", {
            class: "vue-ui-quadrant-minimap-crosshairs",
            stroke: t.value.style.chart.backgroundColor,
            "stroke-width": 1,
            d: $.value[i.value].crosshairs.horizontal
          }, null, 8, ml),
          v("path", {
            class: "vue-ui-quadrant-minimap-crosshairs",
            stroke: t.value.style.chart.backgroundColor,
            "stroke-width": 1,
            d: $.value[i.value].crosshairs.vertical
          }, null, 8, xl)
        ])) : c("", !0),
        q(l.$slots, "svg", { svg: e.value }, void 0, !0)
      ], 14, qt)) : c("", !0),
      l.$slots.watermark ? (o(), n("div", $l, [
        q(l.$slots, "watermark", ee(te({ isPrinting: y(pe) || y(ge) })), void 0, !0)
      ])) : c("", !0),
      G.value ? c("", !0) : (o(), P($t, {
        key: 4,
        config: {
          type: "quadrant",
          style: {
            backgroundColor: t.value.style.chart.backgroundColor,
            quadrant: {
              grid: {
                color: t.value.style.chart.layout.grid.stroke
              },
              plots: {
                color: t.value.style.chart.layout.grid.stroke,
                radius: 1
              }
            }
          }
        }
      }, null, 8, ["config"])),
      v("div", {
        ref_key: "chartLegend",
        ref: de
      }, [
        t.value.style.chart.legend.show ? (o(), P(mt, {
          key: `legend_${ye.value}`,
          legendSet: we.value,
          config: Ee.value,
          onClickMarker: u[14] || (u[14] = ({ legend: a }) => oe(a.id))
        }, {
          item: k(({ legend: a }) => [
            v("div", {
              "data-cy-legend-item": "",
              onClick: (s) => oe(a.id),
              style: _(`opacity:${N.value.includes(a.id) ? 0.5 : 1}`)
            }, x(a.name), 13, kl)
          ]),
          _: 1
        }, 8, ["legendSet", "config"])) : q(l.$slots, "legend", {
          key: 1,
          legend: we.value
        }, void 0, !0)
      ], 512),
      re(gt, {
        show: L.value.showTooltip && Q.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: O.value,
        content: ue.value,
        isCustom: t.value.style.chart.tooltip.customFormat && typeof t.value.style.chart.tooltip.customFormat == "function"
      }, {
        "tooltip-before": k(() => [
          q(l.$slots, "tooltip-before", ee(te({ ...se.value })), void 0, !0)
        ]),
        "tooltip-after": k(() => [
          q(l.$slots, "tooltip-after", ee(te({ ...se.value })), void 0, !0)
        ]),
        default: k(() => [
          t.value.style.chart.tooltip.showShape ? (o(), n("svg", Ll, [
            re(Ae, {
              plot: { x: 10, y: 10 },
              shape: D.value.shape,
              color: D.value.color,
              radius: 8,
              stroke: t.value.style.chart.layout.plots.outline ? t.value.style.chart.layout.plots.outlineColor : "none",
              "stroke-width": t.value.style.chart.layout.plots.outlineWidth
            }, null, 8, ["shape", "color", "stroke", "stroke-width"])
          ])) : c("", !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
      G.value ? (o(), P(kt, {
        key: 5,
        hideDetails: "",
        config: {
          open: L.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(() => [
          (o(), P(xt, {
            key: `table_${he.value}`,
            colNames: K.value.colNames,
            head: K.value.head,
            body: K.value.body,
            config: K.value.config,
            title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? ` : ${t.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: u[15] || (u[15] = (a) => L.value.showTable = !1)
          }, {
            th: k(({ th: a }) => [
              je(x(a), 1)
            ]),
            td: k(({ td: a }) => [
              v("div", {
                innerHTML: a.name || a
              }, null, 8, wl)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"]))
        ]),
        _: 1
      }, 8, ["config"])) : c("", !0)
    ], 14, _t));
  }
}, Rl = /* @__PURE__ */ wt(_l, [["__scopeId", "data-v-5ecb2dd2"]]);
export {
  Rl as default
};
