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