import { computed as p, ref as n, watch as Ne, onMounted as Ae, onBeforeUnmount as Oe, openBlock as s, createElementBlock as i, normalizeClass as F, normalizeStyle as q, createBlock as P, createCommentVNode as c, unref as h, createSlots as Fe, withCtx as b, renderSlot as m, normalizeProps as H, guardReactiveProps as R, createVNode as be, Fragment as g, renderList as C, createElementVNode as x, toDisplayString as T, mergeProps as We, createTextVNode as Ie, nextTick as Me } from "vue";
import { u as De, c as K, t as Ge, a as Ee, p as L, o as Ve, e as Q, g as me, b as He, d as ge, v as Re, C as Ue, f as U, X as Be, i as Z, l as Xe, h as je, x as xe, y as Ye, q as Je, r as qe, E as Ke } from "./index-DK7qqHGP.js";
import { t as Qe, u as Ze } from "./useResponsive-NZB-WLRF.js";
import { _ as et } from "./Title-Cxlu3Etv.js";
import { u as tt, U as lt } from "./usePrinter-Cza87yNE.js";
import { _ as at } from "./Tooltip-Bt9pHzBM.js";
import { D as ot } from "./DataTable-B9SSwFM2.js";
import st from "./vue-ui-skeleton-CQnYuosp.js";
import { _ as rt } from "./Shape-DVc7K58k.js";
import ut from "./vue-ui-accordion-5C4CP3gA.js";
import { u as ke } from "./useNestedProp-0nRX_rTi.js";
import { _ as it } from "./PackageVersion-I1_4jcn_.js";
import { _ as nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const vt = ["id"], ct = ["xmlns", "viewBox"], ht = { key: 0 }, dt = { key: 0 }, pt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], yt = { key: 1 }, ft = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], bt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], mt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], gt = ["x", "y", "fill", "font-size"], xt = ["x", "y", "font-size", "fill"], kt = ["fill", "font-size", "transform"], Ct = ["fill", "font-size", "x", "y"], _t = ["x1", "x2", "y1", "y2", "stroke"], wt = ["cx", "cy", "fill"], $t = ["cx", "cy", "fill"], Tt = ["id"], Lt = ["stop-color"], St = ["stop-color"], Pt = ["stop-color"], zt = { key: 0 }, Nt = ["x", "y", "font-size", "fill"], At = {
  key: 3,
  class: "vue-data-ui-watermark"
}, Ot = ["innerHTML"], Ft = {
  __name: "vue-ui-strip-plot",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectDatapoint"],
  setup(Ce, { expose: _e, emit: we }) {
    const y = Ce, { vue_ui_strip_plot: $e } = De(), _ = p({
      get() {
        return !!y.dataset && y.dataset.length;
      },
      set(t) {
        return t;
      }
    }), B = n(K()), ee = n(0), X = n(!1), j = n(""), z = n(null), te = n(null), le = n(!1), ae = n(0), oe = n(0), e = p({
      get: () => se(),
      set: (t) => t
    });
    function se() {
      const t = ke({
        userConfig: y.config,
        defaultConfig: $e
      });
      return t.theme ? {
        ...ke({
          userConfig: Ge.vue_ui_strip_plot[t.theme] || y.config,
          defaultConfig: t
        }),
        customPalette: Ee[t.theme] || L
      } : t;
    }
    Ne(() => y.config, (t) => {
      e.value = se(), re(), ae.value += 1, oe.value += 1;
    }, { deep: !0 });
    const W = n(null);
    Ae(() => {
      re();
    });
    function re() {
      if (Ve(y.dataset) ? Q({
        componentName: "VueUiStripPlot",
        type: "dataset"
      }) : y.dataset.forEach((t, o) => {
        me({
          datasetObject: t,
          requiredAttributes: ["name", "plots"]
        }).forEach((l) => {
          _.value = !1, Q({
            componentName: "VueUiStripPlot",
            type: "datasetSerieAttribute",
            property: l,
            index: o
          });
        }), t.plots && t.plots.forEach((l, r) => {
          me({
            datasetObject: l,
            requiredAttributes: ["name", "value"]
          }).forEach((u) => {
            _.value = !1, Q({
              componentName: "VueUiStripPlot",
              type: "datasetSerieAttribute",
              property: u,
              index: `${o},${r}`
            });
          });
        });
      }), e.value.responsive) {
        const t = Qe(() => {
          const { width: o, height: l } = Ze({
            chart: z.value,
            title: e.value.style.chart.title.text ? te.value : null
          });
          I.value = l, S.value.width = o, S.value.height = l, A.value = (o - f.value.left - f.value.right) / y.dataset.length, M.value = Ke({
            relator: Math.min(l, o),
            adjuster: 600,
            source: e.value.style.chart.plots.radius,
            threshold: 6,
            fallback: 6
          });
        });
        W.value = new ResizeObserver(t), W.value.observe(z.value.parentNode);
      }
      le.value = !0, setTimeout(() => {
        N.value = !1;
      }, Te.value * 50);
    }
    Oe(() => {
      W.value && W.value.disconnect();
    });
    const { isPrinting: ue, isImaging: ie, generatePdf: ne, generateImage: ve } = tt({
      elementId: `strip-plot_${B.value}`,
      fileName: e.value.style.chart.title.text || "vue-ui-strip-plot"
    }), ce = p(() => He(e.value.customPalette)), N = n(e.value.useCssAnimation), d = n({
      showTable: e.value.table.show,
      dataLabels: {
        show: e.value.style.chart.labels.bestPlotLabel.show
      },
      showTooltip: e.value.style.chart.tooltip.show
    }), f = n({
      top: e.value.style.chart.padding.top,
      bottom: e.value.style.chart.padding.bottom,
      left: e.value.style.chart.padding.left,
      right: e.value.style.chart.padding.right
    }), A = n(e.value.style.chart.stripWidth), I = n(e.value.style.chart.height), M = n(e.value.style.chart.plots.radius), S = n({
      width: A.value * y.dataset.length + f.value.left + f.value.right,
      height: e.value.style.chart.height
    }), a = p(() => {
      const t = A.value * y.dataset.length + f.value.left + f.value.right;
      return {
        left: f.value.left,
        right: t - f.value.right,
        top: f.value.top,
        bottom: I.value - f.value.bottom,
        width: A.value * y.dataset.length,
        height: I.value - f.value.top - f.value.bottom,
        stripWidth: A.value,
        absoluteHeight: I.value,
        absoluteWidth: t
      };
    }), D = p(() => _.value ? y.dataset.map((t, o) => {
      const l = K();
      return {
        ...t,
        id: l,
        color: t.color ? ge(t.color) : ce.value[o] || L[o] || L[o % L.length],
        plots: t.plots.map((r) => ({
          ...r,
          value: Re(r.value),
          parentId: l,
          color: t.color ? ge(t.color) : ce.value[o] || L[o] || L[o % L.length],
          id: K()
        })).sort((r, u) => r.value - u.value)
      };
    }) : null), k = p(() => (D.value || []).map((t, o) => ({
      ...t,
      plots: t.plots.map((l) => ({
        ...l,
        x: a.value.left + (o + 1) * a.value.stripWidth - a.value.stripWidth / 2
      }))
    }))), Te = p(() => Math.max(...k.value.map((t) => t.plots.length))), Y = p(() => {
      const t = k.value.flatMap((o) => o.plots.map((l) => l.value));
      return {
        max: Math.max(...t),
        min: Math.min(...t)
      };
    }), w = p(() => Ue(Y.value.min < 0 ? Y.value.min : 0, Y.value.max, e.value.style.chart.grid.scaleSteps)), Le = p(() => (k.value || []).map((t, o) => ({
      ...t,
      plots: t.plots.map((l) => ({
        ...l,
        y: a.value.bottom - (l.value + Math.abs(w.value.min)) / (w.value.max + Math.abs(w.value.min)) * a.value.height
      }))
    }))), he = p(() => w.value.ticks.map((t) => ({
      y: a.value.bottom - a.value.height * ((t + Math.abs(w.value.min)) / (w.value.max + Math.abs(w.value.min))),
      x1: a.value.left,
      x2: a.value.right,
      value: t
    }))), J = n(null), v = n(null);
    function Se({ datapoint: t, seriesIndex: o }) {
      J.value = { datapoint: t, seriesIndex: o, config: e.value, series: D.value }, X.value = !0, v.value = t;
      const l = e.value.style.chart.tooltip.customFormat;
      if (xe(l) && Ye(() => l({
        seriesIndex: o,
        datapoint: t,
        series: D.value,
        config: e.value
      })))
        j.value = l({
          seriesIndex: o,
          datapoint: t,
          series: D.value,
          config: e.value
        });
      else {
        let r = "";
        r += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${e.value.style.chart.plots.gradient.show ? `url(#${t.parentId})` : t.color}"/></svg>${t.name}</div>`, r += `<div>${Z(
          e.value.style.chart.labels.formatter,
          t.value,
          U({
            p: e.value.style.chart.labels.prefix,
            v: t.value,
            s: e.value.style.chart.labels.suffix,
            r: e.value.style.chart.tooltip.roundingValue
          }),
          { datapoint: t, seriesIndex: o }
        )}</div>`, j.value = `<div>${r}</div>`;
      }
    }
    const G = p(() => {
      const t = k.value.flatMap((l) => JSON.parse(JSON.stringify(l.plots)).sort((r, u) => u.value - r.value).map((r) => ({
        name: `${l.name} - ${r.name}`,
        color: r.color
      }))), o = k.value.flatMap((l) => JSON.parse(JSON.stringify(l.plots)).sort((r, u) => u.value - r.value).map((r) => r.value));
      return { head: t, body: o };
    });
    function de() {
      Me(() => {
        const t = G.value.head.map((r, u) => [[
          r.name
        ], [G.value.body[u]]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[e.value.table.columnNames.series], [e.value.table.columnNames.value]]].concat(t), l = Je(o);
        qe({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-strip-plot" });
      });
    }
    const E = p(() => {
      const t = [
        e.value.table.columnNames.series,
        e.value.table.columnNames.value
      ], o = G.value.head.map((u, $) => {
        const V = U({
          p: e.value.style.chart.labels.prefix,
          v: G.value.body[$],
          s: e.value.style.chart.labels.suffix,
          r: e.value.table.td.roundingValue
        });
        return [
          {
            color: u.color,
            name: u.name
          },
          V
        ];
      }), 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.series,
          e.value.table.columnNames.value
        ],
        head: t,
        body: o,
        config: l
      };
    }), O = n(!1);
    function Pe(t) {
      O.value = t, ee.value += 1;
    }
    function ze() {
      return k.value;
    }
    function pe() {
      d.value.showTable = !d.value.showTable;
    }
    function ye() {
      d.value.dataLabels.show = !d.value.dataLabels.show;
    }
    function fe() {
      d.value.showTooltip = !d.value.showTooltip;
    }
    return _e({
      getData: ze,
      generatePdf: ne,
      generateCsv: de,
      generateImage: ve,
      toggleTable: pe,
      toggleLabels: ye,
      toggleTooltip: fe
    }), (t, o) => (s(), i("div", {
      ref_key: "stripPlotChart",
      ref: z,
      class: F(`vue-ui-strip-plot ${O.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
      style: q(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
      id: `strip-plot_${B.value}`
    }, [
      e.value.style.chart.title.text ? (s(), i("div", {
        key: 0,
        ref_key: "chartTitle",
        ref: te,
        style: "width:100%;background:transparent;padding-bottom:24px"
      }, [
        (s(), P(et, {
          key: `title_${ae.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)) : c("", !0),
      e.value.userOptions.show && _.value ? (s(), P(lt, {
        ref: "details",
        key: `user_option_${ee.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isPrinting: h(ue),
        isImaging: h(ie),
        uid: B.value,
        hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
        hasPdf: e.value.userOptions.buttons.pdf,
        hasXls: e.value.userOptions.buttons.csv,
        hasImg: e.value.userOptions.buttons.img,
        hasTable: e.value.userOptions.buttons.table,
        hasLabel: e.value.userOptions.buttons.labels,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        isTooltip: d.value.showTooltip,
        isFullscreen: O.value,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: z.value,
        position: e.value.userOptions.position,
        onToggleFullscreen: Pe,
        onGeneratePdf: h(ne),
        onGenerateCsv: de,
        onGenerateImage: h(ve),
        onToggleTable: pe,
        onToggleLabels: ye,
        onToggleTooltip: fe
      }, Fe({ _: 2 }, [
        t.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: b(() => [
            m(t.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        t.$slots.optionPdf ? {
          name: "optionPdf",
          fn: b(() => [
            m(t.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        t.$slots.optionCsv ? {
          name: "optionCsv",
          fn: b(() => [
            m(t.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        t.$slots.optionImg ? {
          name: "optionImg",
          fn: b(() => [
            m(t.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        t.$slots.optionTable ? {
          name: "optionTable",
          fn: b(() => [
            m(t.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        t.$slots.optionLabels ? {
          name: "optionLabels",
          fn: b(() => [
            m(t.$slots, "optionLabels", {}, void 0, !0)
          ]),
          key: "5"
        } : void 0,
        t.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: b(({ toggleFullscreen: l, isFullscreen: r }) => [
            m(t.$slots, "optionFullscreen", H(R({ toggleFullscreen: l, isFullscreen: r })), void 0, !0)
          ]),
          key: "6"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : c("", !0),
      _.value ? (s(), i("svg", {
        key: 2,
        xmlns: h(Be),
        class: F({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }),
        viewBox: `0 0 ${S.value.width <= 0 ? 10 : S.value.width} ${S.value.height <= 0 ? 10 : S.value.height}`,
        style: q(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};`)
      }, [
        be(it),
        e.value.style.chart.grid.show ? (s(), i("g", ht, [
          e.value.style.chart.grid.horizontalGrid.show ? (s(), i("g", dt, [
            (s(!0), i(g, null, C(he.value, (l) => (s(), i("line", {
              x1: l.x1,
              x2: l.x2,
              y1: l.y,
              y2: l.y,
              stroke: e.value.style.chart.grid.horizontalGrid.stroke,
              "stroke-width": e.value.style.chart.grid.horizontalGrid.strokeWidth,
              "stroke-dasharray": e.value.style.chart.grid.horizontalGrid.strokeDasharray,
              "stroke-linecap": "round"
            }, null, 8, pt))), 256))
          ])) : c("", !0),
          e.value.style.chart.grid.verticalGrid.show ? (s(), i("g", yt, [
            (s(!0), i(g, null, C(k.value, (l, r) => (s(), i("line", {
              x1: a.value.left + (r + 1) * a.value.stripWidth,
              x2: a.value.left + (r + 1) * a.value.stripWidth,
              y1: a.value.top,
              y2: a.value.bottom,
              stroke: e.value.style.chart.grid.verticalGrid.stroke,
              "stroke-width": e.value.style.chart.grid.verticalGrid.strokeWidth,
              "stroke-dasharray": e.value.style.chart.grid.verticalGrid.strokeDasharray,
              "stroke-linecap": "round"
            }, null, 8, ft))), 256))
          ])) : c("", !0),
          x("line", {
            x1: a.value.left,
            x2: a.value.left,
            y1: a.value.top,
            y2: a.value.bottom,
            stroke: e.value.style.chart.grid.stroke,
            "stroke-width": e.value.style.chart.grid.strokeWidth,
            "stroke-linecap": "round"
          }, null, 8, bt),
          x("line", {
            x1: a.value.left,
            x2: a.value.right,
            y1: a.value.bottom,
            y2: a.value.bottom,
            stroke: e.value.style.chart.grid.stroke,
            "stroke-width": e.value.style.chart.grid.strokeWidth,
            "stroke-linecap": "round"
          }, null, 8, mt)
        ])) : c("", !0),
        e.value.style.chart.labels.yAxisLabels.show ? (s(!0), i(g, { key: 1 }, C(he.value, (l, r) => (s(), i("text", {
          x: l.x1 - e.value.style.chart.labels.yAxisLabels.fontSize / 2 + e.value.style.chart.labels.yAxisLabels.offsetX,
          y: l.y + e.value.style.chart.labels.yAxisLabels.fontSize / 3,
          fill: e.value.style.chart.labels.yAxisLabels.color,
          "font-size": e.value.style.chart.labels.yAxisLabels.fontSize,
          "text-anchor": "end"
        }, T(h(Z)(
          e.value.style.chart.labels.formatter,
          l.value,
          h(U)({
            p: e.value.style.chart.labels.prefix,
            v: l.value,
            s: e.value.style.chart.labels.suffix,
            r: e.value.style.chart.labels.yAxisLabels.rounding
          }),
          { datapoint: l, seriesIndex: r }
        )), 9, gt))), 256)) : c("", !0),
        e.value.style.chart.labels.xAxisLabels.show ? (s(!0), i(g, { key: 2 }, C(k.value, (l, r) => (s(), i("text", {
          x: a.value.left + (r + 1) * a.value.stripWidth - a.value.stripWidth / 2,
          y: a.value.bottom + e.value.style.chart.labels.xAxisLabels.fontSize * 2 + e.value.style.chart.labels.xAxisLabels.offsetY,
          "font-size": e.value.style.chart.labels.xAxisLabels.fontSize,
          fill: e.value.style.chart.labels.xAxisLabels.color,
          "text-anchor": "middle"
        }, T(l.name), 9, xt))), 256)) : c("", !0),
        e.value.style.chart.labels.axis.yLabel ? (s(), i("text", {
          key: 3,
          fill: e.value.style.chart.labels.axis.color,
          "font-size": e.value.style.chart.labels.axis.fontSize,
          transform: `translate(${e.value.style.chart.labels.axis.fontSize + e.value.style.chart.labels.axis.yLabelOffsetX}, ${a.value.top + a.value.height / 2}) rotate(-90)`,
          "text-anchor": "middle"
        }, T(e.value.style.chart.labels.axis.yLabel), 9, kt)) : c("", !0),
        e.value.style.chart.labels.axis.xLabel ? (s(), i("text", {
          key: 4,
          fill: e.value.style.chart.labels.axis.color,
          "font-size": e.value.style.chart.labels.axis.fontSize,
          x: a.value.left + a.value.width / 2,
          y: a.value.absoluteHeight,
          "text-anchor": "middle"
        }, T(e.value.style.chart.labels.axis.xLabel), 9, Ct)) : c("", !0),
        v.value ? (s(), i(g, { key: 5 }, [
          x("line", {
            x1: a.value.left,
            x2: a.value.right,
            y1: v.value.y,
            y2: v.value.y,
            stroke: v.value.color,
            "stroke-width": 1,
            class: F({ "select-circle": e.value.useCssAnimation })
          }, null, 10, _t),
          x("circle", {
            cx: a.value.left,
            cy: v.value.y,
            r: 3,
            fill: v.value.color,
            class: F({ "select-circle": e.value.useCssAnimation })
          }, null, 10, wt),
          x("circle", {
            cx: a.value.right,
            cy: v.value.y,
            r: 3,
            fill: v.value.color,
            class: F({ "select-circle": e.value.useCssAnimation })
          }, null, 10, $t)
        ], 64)) : c("", !0),
        x("defs", null, [
          (s(!0), i(g, null, C(k.value, (l) => (s(), i("radialGradient", {
            id: l.id,
            fy: "30%"
          }, [
            x("stop", {
              offset: "10%",
              "stop-color": h(Xe)(l.color, e.value.style.chart.plots.gradient.intensity / 100)
            }, null, 8, Lt),
            x("stop", {
              offset: "90%",
              "stop-color": h(je)(l.color, 0.1)
            }, null, 8, St),
            x("stop", {
              offset: "100%",
              "stop-color": l.color
            }, null, 8, Pt)
          ], 8, Tt))), 256))
        ]),
        (s(!0), i(g, null, C(Le.value, (l, r) => (s(), i(g, null, [
          (s(!0), i(g, null, C(l.plots, (u, $) => (s(), P(rt, We({
            plot: { x: u.x, y: le.value ? u.y : a.value.top },
            radius: v.value && v.value.id === u.id ? M.value * 1.5 : M.value,
            shape: e.value.style.chart.plots.shape,
            stroke: e.value.style.chart.plots.stroke,
            strokeWidth: e.value.style.chart.plots.strokeWidth,
            color: e.value.style.chart.plots.gradient.show ? `url(#${l.id})` : l.color,
            onMouseenter: (V) => Se({ datapoint: u, seriesIndex: $ }),
            onMouseleave: o[0] || (o[0] = (V) => {
              X.value = !1, v.value = null;
            }),
            onClick: (V) => we("selectDatapoint", u),
            style: `transition: all 0.2s ease-in-out; opacity:${v.value ? v.value.id === u.id ? 1 : 0.2 : e.value.style.chart.plots.opacity};${N.value ? `transition-delay:${$ * 50}ms` : ""}`,
            class: { "vue-ui-strip-plot-animated": e.value.useCssAnimation && N.value, "vue-ui-strip-plot-select-circle": e.value.useCssAnimation && !N.value }
          }, t.$attrs), null, 16, ["plot", "radius", "shape", "stroke", "strokeWidth", "color", "onMouseenter", "onClick", "style", "class"]))), 256)),
          d.value.dataLabels.show ? (s(), i("g", zt, [
            (s(!0), i(g, null, C(l.plots, (u, $) => (s(), i(g, null, [
              $ === l.plots.length - 1 || v.value && v.value.id === u.id && !d.value.showTooltip ? (s(), i("text", {
                key: 0,
                x: u.x,
                y: u.y + e.value.style.chart.labels.bestPlotLabel.offsetY - M.value * (v.value && v.value.id === u.id && !d.value.showTooltip ? 2 : 1.5),
                "font-size": e.value.style.chart.labels.bestPlotLabel.fontSize,
                fill: e.value.style.chart.labels.bestPlotLabel.color,
                "text-anchor": "middle",
                style: q(`opacity:${e.value.useCssAnimation && N.value ? 0 : 1};transition:opacity 0.2s ease-in;`)
              }, T(u.name) + " " + T(e.value.style.chart.labels.bestPlotLabel.showValue ? h(Z)(
                e.value.style.chart.labels.formatter,
                u.value,
                h(U)({
                  p: `(${e.value.style.chart.labels.prefix}`,
                  v: u.value,
                  s: `${e.value.style.chart.labels.suffix})`,
                  r: e.value.style.chart.labels.bestPlotLabel.rounding
                }),
                { datapoint: u, seriesIndex: $ }
              ) : ""), 13, Nt)) : c("", !0)
            ], 64))), 256))
          ])) : c("", !0)
        ], 64))), 256)),
        m(t.$slots, "svg", { svg: a.value }, void 0, !0)
      ], 14, ct)) : c("", !0),
      t.$slots.watermark ? (s(), i("div", At, [
        m(t.$slots, "watermark", H(R({ isPrinting: h(ue) || h(ie) })), void 0, !0)
      ])) : c("", !0),
      _.value ? c("", !0) : (s(), P(st, {
        key: 4,
        config: {
          type: "stripPlot",
          style: {
            backgroundColor: e.value.style.chart.backgroundColor,
            stripPlot: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      be(at, {
        show: d.value.showTooltip && X.value,
        backgroundColor: e.value.style.chart.tooltip.backgroundColor,
        color: e.value.style.chart.tooltip.color,
        borderRadius: e.value.style.chart.tooltip.borderRadius,
        borderColor: e.value.style.chart.tooltip.borderColor,
        borderWidth: e.value.style.chart.tooltip.borderWidth,
        fontSize: e.value.style.chart.tooltip.fontSize,
        backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
        position: e.value.style.chart.tooltip.position,
        offsetY: e.value.style.chart.tooltip.offsetY,
        parent: z.value,
        content: j.value,
        isCustom: h(xe)(e.value.style.chart.tooltip.customFormat)
      }, {
        "tooltip-before": b(() => [
          m(t.$slots, "tooltip-before", H(R({ ...J.value })), void 0, !0)
        ]),
        "tooltip-after": b(() => [
          m(t.$slots, "tooltip-after", H(R({ ...J.value })), void 0, !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
      _.value ? (s(), P(ut, {
        key: 5,
        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: b(() => [
          (s(), P(ot, {
            key: `table_${oe.value}`,
            colNames: E.value.colNames,
            head: E.value.head,
            body: E.value.body,
            config: E.value.config,
            title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: o[1] || (o[1] = (l) => d.value.showTable = !1)
          }, {
            th: b(({ th: l }) => [
              x("div", {
                innerHTML: l,
                style: { display: "flex", "align-items": "center" }
              }, null, 8, Ot)
            ]),
            td: b(({ td: l }) => [
              Ie(T(l.name || l), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"]))
        ]),
        _: 1
      }, 8, ["config"])) : c("", !0)
    ], 14, vt));
  }
}, Yt = /* @__PURE__ */ nt(Ft, [["__scopeId", "data-v-85774736"]]);
export {
  Yt as default
};
