import { useCssVars as Re, computed as h, ref as p, watch as $e, onMounted as Be, createElementBlock as n, openBlock as o, unref as u, normalizeStyle as k, normalizeClass as K, createBlock as G, createCommentVNode as c, createVNode as se, createSlots as Ee, withCtx as _, renderSlot as f, normalizeProps as U, guardReactiveProps as H, Fragment as A, renderList as M, createElementVNode as i, toDisplayString as b, withKeys as Ge, createTextVNode as Ue, nextTick as He } from "vue";
import { u as Xe, o as De, e as Ce, c as ue, a as je, C as We, g as Ye, O as ne, X as qe, G as ie, i as V, f as S, v as T, q as Ke, r as Je, x as Qe, y as Ze } from "./index-CjXfhpMA.js";
import { _ as et } from "./Title-BfzkycPl.js";
import { u as tt, U as lt } from "./usePrinter-bLtFFBkj.js";
import { _ as at } from "./Tooltip-p85hmQvg.js";
import ot from "./vue-ui-skeleton-B1q5j9VT.js";
import st from "./BaseIcon-C8FyAN0p.js";
import ut from "./vue-ui-accordion-CEdZMQD4.js";
import { u as Le } from "./useNestedProp-CmXi5M93.js";
import { _ as nt } from "./PackageVersion-ChIRiDpv.js";
import { P as it } from "./PenAndPaper-OV0eQPcd.js";
import { u as rt } from "./useUserOptionState-BIvW1Kz7.js";
import { u as vt } from "./useChartAccessibility-BWojgys7.js";
import { _ as dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const yt = ["id"], ct = {
  key: 2,
  style: "width:100%;background:transparent"
}, ht = ["xmlns", "viewBox"], pt = ["width", "height"], gt = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], ft = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], bt = ["font-size", "font-weight", "fill", "x", "y"], mt = ["x", "y", "width", "height", "onMouseover"], xt = { key: 0 }, wt = ["font-size", "fill", "x", "y", "font-weight"], kt = { key: 1 }, _t = ["text-anchor", "font-size", "fill", "font-weight", "transform"], $t = { key: 2 }, Ct = ["x", "y", "width", "height", "stroke", "stroke-width"], Lt = { key: 3 }, At = ["id"], Tt = ["stop-color"], zt = ["stop-color"], Ot = ["x", "y", "font-size", "fill"], Mt = ["x", "y", "height", "rx", "fill"], St = ["x", "y", "font-size", "fill"], Nt = ["stroke", "x1", "x2", "y1", "y2"], Ft = ["fill", "d"], Vt = { key: 4 }, Pt = {
  id: "colorScaleHorizontal",
  x1: "0%",
  x2: "100%",
  y1: "0%",
  y2: "0%"
}, It = ["stop-color"], Rt = ["stop-color"], Bt = ["x", "y", "width", "height", "rx"], Et = ["x", "y", "font-size", "fill"], Gt = ["x", "y", "font-size", "fill"], Ut = ["stroke", "x1", "x2", "y1", "y2"], Ht = ["fill", "d"], Xt = {
  key: 5,
  class: "vue-data-ui-watermark"
}, Dt = {
  key: 6,
  ref: "source",
  dir: "auto"
}, jt = { class: "vue-ui-data-table" }, Wt = { key: 0 }, Yt = ["data-cell"], qt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Kt = ["data-cell"], Jt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Qt = {
  __name: "vue-ui-heatmap",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  setup(X, { expose: Ae }) {
    Re((t) => ({
      "44d31360": t.tdo
    }));
    const { vue_ui_heatmap: Te } = Xe(), r = X, D = h(() => !!r.dataset && r.dataset.length);
    De(r.dataset) && Ce({
      componentName: "VueUiHeatmap",
      type: "dataset"
    });
    const P = p(ue()), j = p(null), ze = p(null), J = p(!1), Q = p(""), re = p(void 0), I = p(null), ve = p(0), de = p(null), Oe = p(null), ye = p(!1), ce = p(0), e = h({
      get: () => ge(),
      set: (t) => t
    }), { userOptionsVisible: Z, setUserOptionsVisibility: he, keepUserOptionState: pe } = rt({ config: e.value }), { svgRef: Me } = vt({ config: e.value.style.title });
    function ge() {
      const t = Le({
        userConfig: r.config,
        defaultConfig: Te
      });
      let l = {};
      return t.theme ? l = {
        ...Le({
          userConfig: je.vue_ui_heatmap[t.theme] || r.config,
          defaultConfig: t
        })
      } : l = t, r.config && We(r.config, "style.layout.dataLabels.xAxis.showOnlyAtModulo") ? l.style.layout.dataLabels.xAxis.showOnlyAtModulo = r.config.style.layout.dataLabels.xAxis.showOnlyAtModulo : l.style.layout.dataLabels.xAxis.showOnlyAtModulo = null, l;
    }
    $e(() => r.config, (t) => {
      e.value = ge(), Z.value = !e.value.userOptions.showOnChartHover, ee(), ce.value += 1, m.value.showTable = e.value.table.show, m.value.showTooltip = e.value.style.tooltip.show;
    }, { deep: !0 }), $e(() => r.dataset, () => {
      ee();
    }, { deep: !0 });
    const { isPrinting: fe, isImaging: be, generatePdf: me, generateImage: xe } = tt({
      elementId: `heatmap__${P.value}`,
      fileName: e.value.style.title.text || "vue-ui-heatmap"
    }), Se = h(() => e.value.userOptions.show && !e.value.style.title.text), m = p({
      showTable: e.value.table.show,
      showTooltip: e.value.style.tooltip.show
    }), Ne = h(() => e.value.table.responsiveBreakpoint);
    function Fe() {
      new ResizeObserver((l) => {
        l.forEach((s) => {
          ye.value = s.contentRect.width < Ne.value;
        });
      }).observe(de.value);
    }
    Be(ee);
    function ee() {
      Fe();
    }
    const N = h(() => Math.max(...r.dataset.flatMap((t) => (t.values || []).length))), x = h(() => {
      const t = e.value.style.layout.padding.top + e.value.style.layout.padding.bottom + r.dataset.length * e.value.style.layout.cells.height, l = e.value.style.layout.padding.left + e.value.style.layout.padding.right + (N.value < r.dataset.length ? r.dataset.length : N.value) * e.value.style.layout.cells.height, s = t + (e.value.style.legend.show ? e.value.style.legend.position === "right" ? 0 : e.value.style.layout.cells.height * 2 : 0);
      return {
        height: t,
        heightWithLegend: s,
        width: l
      };
    }), W = h(() => e.value.style.legend.position), a = h(() => ({
      top: e.value.style.layout.padding.top,
      left: e.value.style.layout.padding.left,
      right: x.value.width - e.value.style.layout.padding.right - (W.value === "right" && e.value.style.legend.show ? 92 : 0),
      bottom: x.value.height - e.value.style.layout.padding.bottom,
      height: x.value.height - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom,
      width: x.value.width - e.value.style.layout.padding.right - e.value.style.layout.padding.left - (W.value === "right" && e.value.style.legend.show ? 92 : 0)
    })), te = h(() => d.value.height * r.dataset.length), w = h(() => Math.max(...r.dataset.flatMap((t) => t.values))), z = h(() => Math.min(...r.dataset.flatMap((t) => t.values))), O = h(() => {
      const t = r.dataset.flatMap((s) => s.values);
      return t.reduce((s, v) => s + v, 0) / t.length;
    }), d = h(() => ({
      width: a.value.width / N.value,
      height: a.value.width / (N.value < r.dataset.length ? r.dataset.length : N.value)
    })), $ = h(() => {
      const t = e.value.style.layout.dataLabels.yAxis.values.length ? e.value.style.layout.dataLabels.yAxis.values : r.dataset.map((s) => s.name), l = e.value.style.layout.dataLabels.xAxis.values;
      return {
        yLabels: t,
        xLabels: l.slice(0, N.value)
      };
    }), Y = h(() => (r.dataset.forEach((t, l) => {
      Ye({
        datasetObject: t,
        requiredAttributes: ["values"]
      }).forEach((s) => {
        Ce({
          componentName: "VueUiHeatmap",
          type: "datasetSerieAttribute",
          property: "values",
          index: l
        });
      });
    }), r.dataset.map((t) => ({
      ...t,
      temperatures: (t.values || []).map((l, s) => l >= O.value ? {
        side: "up",
        color: ne(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, z.value, w.value, l),
        ratio: Math.abs(Math.abs(l - O.value) / Math.abs(w.value - O.value)) > 1 ? 1 : Math.abs(Math.abs(l - O.value) / Math.abs(w.value - O.value)),
        value: l,
        yAxisName: t.name,
        xAxisName: $.value.xLabels[s],
        id: `vue-data-ui-heatmap-cell-${ue()}`
      } : {
        side: "down",
        ratio: Math.abs(1 - Math.abs(l) / Math.abs(O.value)) > 1 ? 1 : Math.abs(1 - Math.abs(l) / Math.abs(O.value)),
        color: ne(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, z.value, w.value, l),
        value: l,
        yAxisName: t.name,
        xAxisName: $.value.xLabels[s],
        id: `vue-data-ui-heatmap-cell-${ue()}`
      })
    })))), C = p(null), R = p(null);
    function Ve(t, l, s, v) {
      I.value = { x: s, y: v };
      const { value: y, yAxisName: g, xAxisName: L, id: Ie } = t;
      re.value = Ie, C.value = y, R.value = {
        datapoint: t,
        seriesIndex: l,
        series: Y.value,
        config: e.value
      }, J.value = !0;
      let ae = "";
      const oe = e.value.style.tooltip.customFormat;
      Qe(oe) && Ze(() => oe({
        datapoint: t,
        seriesIndex: l,
        series: Y.value,
        config: e.value
      })) ? Q.value = oe({
        datapoint: t,
        seriesIndex: l,
        series: Y.value,
        config: e.value
      }) : (ae += `<div>${g} ${L ? `${L}` : ""}</div>`, ae += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${ne(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, z.value, w.value, y)}">⬤</span><span>${isNaN(y) ? "-" : V(
        e.value.style.layout.cells.value.formatter,
        y,
        S({
          p: e.value.style.layout.dataLabels.prefix,
          v: y,
          s: e.value.style.layout.dataLabels.suffix,
          r: e.value.style.tooltip.roundingValue
        }),
        { datapoint: t, seriesIndex: l }
      )}</span></div>`, Q.value = `<div style="font-size:${e.value.style.tooltip.fontSize}px">${ae}</div>`);
    }
    const B = h(() => a.value.top + te.value * (1 - C.value / w.value)), E = h(() => a.value.left + (x.value.width - a.value.left - e.value.style.layout.padding.right) * (C.value / w.value));
    h(() => {
      const t = r.dataset.map((s) => ({
        name: s.name
      })), l = r.dataset.map((s) => s.values);
      return { head: t, body: l };
    });
    function we() {
      He(() => {
        const t = ["", ...r.dataset.map((y, g) => y.name)], l = [];
        for (let y = 0; y < $.value.xLabels.length; y += 1) {
          const g = [$.value.xLabels[y]];
          for (let L = 0; L < r.dataset.length; L += 1)
            g.push([r.dataset[L].values[y]]);
          l.push(g);
        }
        const s = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([t]).concat(l), v = Ke(s);
        Je({ csvContent: v, title: e.value.style.title.text || "vue-ui-heatmap" });
      });
    }
    const F = p(!1);
    function Pe(t) {
      F.value = t, ve.value += 1;
    }
    function ke() {
      m.value.showTable = !m.value.showTable;
    }
    function _e() {
      m.value.showTooltip = !m.value.showTooltip;
    }
    const q = p(!1);
    function le() {
      q.value = !q.value;
    }
    return Ae({
      generatePdf: me,
      generateCsv: we,
      generateImage: xe,
      toggleTable: ke,
      toggleTooltip: _e,
      toggleAnnotator: le
    }), (t, l) => (o(), n("div", {
      ref_key: "heatmapChart",
      ref: j,
      class: K(`vue-ui-heatmap ${F.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      style: k(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.backgroundColor}`),
      id: `heatmap__${P.value}`,
      onMouseenter: l[3] || (l[3] = () => u(he)(!0)),
      onMouseleave: l[4] || (l[4] = () => u(he)(!1))
    }, [
      e.value.userOptions.buttons.annotator ? (o(), G(it, {
        key: 0,
        parent: j.value,
        backgroundColor: e.value.style.backgroundColor,
        color: e.value.style.color,
        active: q.value,
        onClose: le
      }, null, 8, ["parent", "backgroundColor", "color", "active"])) : c("", !0),
      Se.value ? (o(), n("div", {
        key: 1,
        ref_key: "noTitle",
        ref: Oe,
        class: "vue-data-ui-no-title-space",
        style: "height:36px; width: 100%;background:transparent"
      }, null, 512)) : c("", !0),
      e.value.style.title.text ? (o(), n("div", ct, [
        (o(), G(et, {
          key: `title_${ce.value}`,
          config: {
            title: {
              cy: "heatmap-div-title",
              ...e.value.style.title
            },
            subtitle: {
              cy: "heatmap-div-subtitle",
              ...e.value.style.title.subtitle
            }
          }
        }, null, 8, ["config"]))
      ])) : c("", !0),
      e.value.userOptions.show && D.value && (u(pe) || u(Z)) ? (o(), G(lt, {
        ref_key: "details",
        ref: ze,
        key: `user_options_${ve.value}`,
        backgroundColor: e.value.style.backgroundColor,
        color: e.value.style.color,
        isImaging: u(be),
        isPrinting: u(fe),
        uid: P.value,
        hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
        hasPdf: e.value.userOptions.buttons.pdf,
        hasImg: e.value.userOptions.buttons.img,
        hasXls: e.value.userOptions.buttons.csv,
        hasTable: e.value.userOptions.buttons.table,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        isFullscreen: F.value,
        isTooltip: m.value.showTooltip,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: j.value,
        position: e.value.userOptions.position,
        hasAnnotator: e.value.userOptions.buttons.annotator,
        isAnnotation: q.value,
        onToggleFullscreen: Pe,
        onGeneratePdf: u(me),
        onGenerateCsv: we,
        onGenerateImage: u(xe),
        onToggleTable: ke,
        onToggleTooltip: _e,
        onToggleAnnotator: le,
        style: k({
          visibility: u(pe) ? u(Z) ? "visible" : "hidden" : "visible"
        })
      }, Ee({ _: 2 }, [
        t.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: _(() => [
            f(t.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        t.$slots.optionPdf ? {
          name: "optionPdf",
          fn: _(() => [
            f(t.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        t.$slots.optionCsv ? {
          name: "optionCsv",
          fn: _(() => [
            f(t.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        t.$slots.optionImg ? {
          name: "optionImg",
          fn: _(() => [
            f(t.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        t.$slots.optionTable ? {
          name: "optionTable",
          fn: _(() => [
            f(t.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        t.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: _(({ toggleFullscreen: s, isFullscreen: v }) => [
            f(t.$slots, "optionFullscreen", U(H({ toggleFullscreen: s, isFullscreen: v })), void 0, !0)
          ]),
          key: "5"
        } : void 0,
        t.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: _(({ toggleAnnotator: s, isAnnotator: v }) => [
            f(t.$slots, "optionAnnotator", U(H({ toggleAnnotator: s, isAnnotator: v })), void 0, !0)
          ]),
          key: "6"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : c("", !0),
      D.value ? (o(), n("svg", {
        key: 4,
        ref_key: "svgRef",
        ref: Me,
        xmlns: u(qe),
        class: K({ "vue-data-ui-fullscreen--on": F.value, "vue-data-ui-fulscreen--off": !F.value }),
        viewBox: `0 0 ${x.value.width} ${x.value.heightWithLegend}`,
        style: k(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`)
      }, [
        se(nt),
        t.$slots["chart-background"] ? (o(), n("foreignObject", {
          key: 0,
          x: 0,
          y: 0,
          width: x.value.width,
          height: x.value.heightWithLegend,
          style: {
            pointerEvents: "none"
          }
        }, [
          f(t.$slots, "chart-background", {}, void 0, !0)
        ], 8, pt)) : c("", !0),
        (o(!0), n(A, null, M(Y.value, (s, v) => (o(), n("g", null, [
          (o(!0), n(A, null, M(s.temperatures, (y, g) => (o(), n("g", null, [
            i("rect", {
              x: a.value.left + d.value.width * g + e.value.style.layout.cells.spacing / 2,
              y: a.value.top + d.value.height * v + e.value.style.layout.cells.spacing / 2,
              width: d.value.width - e.value.style.layout.cells.spacing,
              height: d.value.height - e.value.style.layout.cells.spacing,
              fill: e.value.style.layout.cells.colors.underlayer,
              stroke: e.value.style.backgroundColor,
              "stroke-width": e.value.style.layout.cells.spacing
            }, null, 8, gt),
            i("rect", {
              x: a.value.left + d.value.width * g + e.value.style.layout.cells.spacing / 2,
              y: a.value.top + d.value.height * v + e.value.style.layout.cells.spacing / 2,
              width: d.value.width - e.value.style.layout.cells.spacing,
              height: d.value.height - e.value.style.layout.cells.spacing,
              fill: y.color,
              stroke: e.value.style.backgroundColor,
              "stroke-width": e.value.style.layout.cells.spacing
            }, null, 8, ft),
            e.value.style.layout.cells.value.show ? (o(), n("text", {
              key: 0,
              "text-anchor": "middle",
              "font-size": e.value.style.layout.cells.value.fontSize,
              "font-weight": e.value.style.layout.cells.value.bold ? "bold" : "normal",
              fill: u(ie)(y.color),
              x: a.value.left + d.value.width * g + d.value.width / 2,
              y: a.value.top + d.value.height * v + d.value.height / 2 + e.value.style.layout.cells.value.fontSize / 3
            }, b(u(V)(
              e.value.style.layout.cells.value.formatter,
              y.value,
              u(S)({
                p: e.value.style.layout.dataLabels.prefix,
                v: y.value,
                s: e.value.style.layout.dataLabels.suffix,
                r: e.value.style.layout.cells.value.roundingValue
              }),
              { datapoint: y }
            )), 9, bt)) : c("", !0)
          ]))), 256)),
          (o(!0), n(A, null, M(s.temperatures, (y, g) => (o(), n("g", null, [
            i("rect", {
              x: a.value.left + d.value.width * g,
              y: a.value.top + d.value.height * v,
              width: d.value.width,
              height: d.value.height,
              fill: "transparent",
              stroke: "none",
              onMouseover: (L) => Ve(y, v, a.value.left + d.value.width * g, a.value.top + d.value.height * v),
              onMouseout: l[0] || (l[0] = (L) => {
                J.value = !1, re.value = void 0, C.value = null, I.value = null;
              })
            }, null, 40, mt)
          ]))), 256)),
          e.value.style.layout.dataLabels.yAxis.show ? (o(), n("g", xt, [
            i("text", {
              "font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
              fill: e.value.style.layout.dataLabels.yAxis.color,
              x: a.value.left + e.value.style.layout.dataLabels.yAxis.offsetX - 6,
              y: a.value.top + d.value.height * v + d.value.height / 2 + e.value.style.layout.dataLabels.yAxis.fontSize / 3 + e.value.style.layout.dataLabels.yAxis.offsetY,
              "text-anchor": "end",
              "font-weight": e.value.style.layout.dataLabels.yAxis.bold ? "bold" : "normal"
            }, b($.value.yLabels[v]), 9, wt)
          ])) : c("", !0)
        ]))), 256)),
        e.value.style.layout.dataLabels.xAxis.show ? (o(), n("g", kt, [
          (o(!0), n(A, null, M($.value.xLabels, (s, v) => (o(), n(A, null, [
            !e.value.style.layout.dataLabels.xAxis.showOnlyAtModulo || e.value.style.layout.dataLabels.xAxis.showOnlyAtModulo && v % e.value.style.layout.dataLabels.xAxis.showOnlyAtModulo === 0 ? (o(), n("text", {
              key: 0,
              "text-anchor": e.value.style.layout.dataLabels.xAxis.rotation === 0 ? "middle" : e.value.style.layout.dataLabels.xAxis.rotation < 0 ? "start" : "end",
              "font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
              fill: e.value.style.layout.dataLabels.xAxis.color,
              "font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal",
              transform: `translate(${a.value.left + d.value.width / 2 + a.value.width / $.value.xLabels.length * v + e.value.style.layout.dataLabels.xAxis.offsetX}, ${a.value.top + e.value.style.layout.dataLabels.xAxis.offsetY - 6}), rotate(${e.value.style.layout.dataLabels.xAxis.rotation})`
            }, b(s), 9, _t)) : c("", !0)
          ], 64))), 256))
        ])) : c("", !0),
        I.value ? (o(), n("g", $t, [
          i("rect", {
            style: { "pointer-events": "none" },
            x: I.value.x - e.value.style.layout.cells.selected.border / 2 + e.value.style.layout.cells.spacing,
            y: I.value.y - e.value.style.layout.cells.selected.border / 2 + e.value.style.layout.cells.spacing,
            width: d.value.width - e.value.style.layout.cells.spacing + e.value.style.layout.cells.selected.border - e.value.style.layout.cells.spacing,
            height: d.value.height - e.value.style.layout.cells.spacing + e.value.style.layout.cells.selected.border - e.value.style.layout.cells.spacing,
            fill: "transparent",
            stroke: e.value.style.layout.cells.selected.color,
            "stroke-width": e.value.style.layout.cells.selected.border,
            rx: 1
          }, null, 8, Ct)
        ])) : c("", !0),
        e.value.style.legend.show && W.value === "right" ? (o(), n("g", Lt, [
          i("defs", null, [
            i("linearGradient", {
              id: `colorScaleVertical_${P.value}`,
              x2: "0%",
              y2: "100%"
            }, [
              i("stop", {
                offset: "0%",
                "stop-color": e.value.style.layout.cells.colors.hot
              }, null, 8, Tt),
              i("stop", {
                offset: "100%",
                "stop-color": e.value.style.layout.cells.colors.cold
              }, null, 8, zt)
            ], 8, At)
          ]),
          i("text", {
            x: a.value.right + 36 + 18,
            y: a.value.top - e.value.style.legend.fontSize * 1.5,
            "text-anchor": "middle",
            "font-size": e.value.style.legend.fontSize * 2,
            fill: e.value.style.legend.color
          }, b(u(V)(
            e.value.style.layout.cells.value.formatter,
            u(T)(w.value),
            u(S)({
              p: e.value.style.layout.dataLabels.prefix,
              v: u(T)(w.value),
              s: e.value.style.layout.dataLabels.suffix,
              r: e.value.style.legend.roundingValue
            })
          )), 9, Ot),
          i("rect", {
            x: a.value.right + 36,
            y: a.value.top,
            width: 36,
            height: te.value,
            rx: e.value.style.legend.scaleBorderRadius,
            fill: `url(#colorScaleVertical_${P.value})`
          }, null, 8, Mt),
          i("text", {
            x: a.value.right + 36 + 18,
            y: a.value.top + te.value + e.value.style.legend.fontSize * 2.5,
            "text-anchor": "middle",
            "font-size": e.value.style.legend.fontSize * 2,
            fill: e.value.style.legend.color
          }, b(u(V)(
            e.value.style.layout.cells.value.formatter,
            u(T)(z.value),
            u(S)({
              p: e.value.style.layout.dataLabels.prefix,
              v: u(T)(z.value),
              s: e.value.style.layout.dataLabels.suffix,
              r: e.value.style.legend.roundingValue
            })
          )), 9, St),
          C.value !== null ? (o(), n("line", {
            key: 0,
            stroke: u(ie)(R.value.datapoint.color),
            "stroke-width": "2",
            x1: a.value.right + 36,
            x2: a.value.right + 72,
            y1: B.value,
            y2: B.value
          }, null, 8, Nt)) : c("", !0),
          C.value !== null ? (o(), n("path", {
            key: 1,
            fill: e.value.style.color,
            stroke: "none",
            d: `M ${a.value.right + 36},${B.value} ${a.value.right + 26},${B.value - 8} ${a.value.right + 26},${B.value + 8}z`
          }, null, 8, Ft)) : c("", !0)
        ])) : c("", !0),
        e.value.style.legend.show && W.value === "bottom" ? (o(), n("g", Vt, [
          i("defs", null, [
            i("linearGradient", Pt, [
              i("stop", {
                offset: "0%",
                "stop-color": e.value.style.layout.cells.colors.cold
              }, null, 8, It),
              i("stop", {
                offset: "100%",
                "stop-color": e.value.style.layout.cells.colors.hot
              }, null, 8, Rt)
            ])
          ]),
          i("rect", {
            x: a.value.left,
            y: a.value.bottom + e.value.style.layout.cells.height,
            width: x.value.width - a.value.left - e.value.style.layout.padding.right,
            height: e.value.style.layout.cells.height,
            rx: e.value.style.legend.scaleBorderRadius > e.value.style.layout.cells.height / 2 ? e.value.style.layout.cells.height / 2 : e.value.style.legend.scaleBorderRadius,
            fill: "url(#colorScaleHorizontal)"
          }, null, 8, Bt),
          i("text", {
            x: a.value.left,
            y: a.value.bottom + e.value.style.layout.cells.height * 2 + e.value.style.legend.fontSize * 2,
            "text-anchor": "start",
            "font-size": e.value.style.legend.fontSize * 2,
            fill: e.value.style.legend.color
          }, b(u(V)(
            e.value.style.layout.cells.value.formatter,
            u(T)(z.value),
            u(S)({
              p: e.value.style.layout.dataLabels.prefix,
              v: u(T)(z.value),
              s: e.value.style.layout.dataLabels.suffix,
              r: e.value.style.legend.roundingValue
            })
          )), 9, Et),
          i("text", {
            x: a.value.right,
            y: a.value.bottom + e.value.style.layout.cells.height * 2 + e.value.style.legend.fontSize * 2,
            "text-anchor": "end",
            "font-size": e.value.style.legend.fontSize * 2,
            fill: e.value.style.legend.color
          }, b(u(V)(
            e.value.style.layout.cells.value.formatter,
            u(T)(w.value),
            u(S)({
              p: e.value.style.layout.dataLabels.prefix,
              v: u(T)(w.value),
              s: e.value.style.layout.dataLabels.suffix,
              r: e.value.style.legend.roundingValue
            })
          )), 9, Gt),
          C.value !== null ? (o(), n("line", {
            key: 0,
            stroke: u(ie)(R.value.datapoint.color),
            "stroke-width": "2",
            x1: E.value,
            x2: E.value,
            y1: a.value.bottom + e.value.style.layout.cells.height,
            y2: a.value.bottom + e.value.style.layout.cells.height * 2
          }, null, 8, Ut)) : c("", !0),
          C.value !== null ? (o(), n("path", {
            key: 1,
            fill: e.value.style.color,
            stroke: "none",
            d: `M ${E.value},${a.value.bottom + e.value.style.layout.cells.height} ${E.value - 12},${a.value.bottom + e.value.style.layout.cells.height - 20} ${E.value + 12},${a.value.bottom + e.value.style.layout.cells.height - 20}z`
          }, null, 8, Ht)) : c("", !0)
        ])) : c("", !0),
        f(t.$slots, "svg", { svg: x.value }, void 0, !0)
      ], 14, ht)) : c("", !0),
      t.$slots.watermark ? (o(), n("div", Xt, [
        f(t.$slots, "watermark", U(H({ isPrinting: u(fe) || u(be) })), void 0, !0)
      ])) : c("", !0),
      t.$slots.source ? (o(), n("div", Dt, [
        f(t.$slots, "source", {}, void 0, !0)
      ], 512)) : c("", !0),
      D.value ? c("", !0) : (o(), G(ot, {
        key: 7,
        config: {
          type: "heatmap",
          style: {
            backgroundColor: e.value.style.backgroundColor,
            heatmap: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      se(at, {
        show: m.value.showTooltip && J.value,
        backgroundColor: e.value.style.tooltip.backgroundColor,
        color: e.value.style.tooltip.color,
        borderRadius: e.value.style.tooltip.borderRadius,
        borderColor: e.value.style.tooltip.borderColor,
        borderWidth: e.value.style.tooltip.borderWidth,
        fontSize: e.value.style.tooltip.fontSize,
        backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
        position: e.value.style.tooltip.position,
        offsetY: e.value.style.tooltip.offsetY,
        parent: j.value,
        content: Q.value,
        isFullscreen: F.value,
        isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
      }, {
        "tooltip-before": _(() => [
          f(t.$slots, "tooltip-before", U(H({ ...R.value })), void 0, !0)
        ]),
        "tooltip-after": _(() => [
          f(t.$slots, "tooltip-after", U(H({ ...R.value })), void 0, !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
      D.value ? (o(), G(ut, {
        key: 8,
        hideDetails: "",
        config: {
          open: m.value.showTable,
          maxHeight: 1e4,
          body: {
            backgroundColor: e.value.style.backgroundColor,
            color: e.value.style.color
          },
          head: {
            backgroundColor: e.value.style.backgroundColor,
            color: e.value.style.color
          }
        }
      }, {
        content: _(() => [
          i("div", {
            ref_key: "tableContainer",
            ref: de,
            class: "vue-ui-heatmap-table atom-data-table"
          }, [
            i("div", {
              style: "width:100%;overflow-x:auto;padding-top:36px;position:relative",
              class: K({ "vue-ui-responsive": ye.value })
            }, [
              i("div", {
                role: "button",
                tabindex: "0",
                style: k(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e.value.table.th.backgroundColor};`),
                onClick: l[1] || (l[1] = (s) => m.value.showTable = !1),
                onKeypress: l[2] || (l[2] = Ge((s) => m.value.showTable = !1, ["enter"]))
              }, [
                se(st, {
                  name: "close",
                  stroke: e.value.table.th.color,
                  "stroke-width": 2
                }, null, 8, ["stroke"])
              ], 36),
              i("table", jt, [
                i("caption", {
                  style: k(`backgroundColor:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
                }, [
                  Ue(b(e.value.style.title.text) + " ", 1),
                  e.value.style.title.subtitle.text ? (o(), n("span", Wt, b(e.value.style.title.subtitle.text), 1)) : c("", !0)
                ], 4),
                i("thead", null, [
                  i("tr", {
                    role: "row",
                    style: k(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
                  }, [
                    i("th", {
                      style: k(`outline:${e.value.table.th.outline};padding-right:6px`)
                    }, null, 4),
                    (o(!0), n(A, null, M(X.dataset, (s, v) => (o(), n("th", {
                      align: "right",
                      style: k(`outline:${e.value.table.th.outline};padding-right:6px`)
                    }, b(s.name), 5))), 256))
                  ], 4)
                ]),
                i("tbody", null, [
                  (o(!0), n(A, null, M($.value.xLabels, (s, v) => (o(), n("tr", {
                    role: "row",
                    class: K({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": v % 2 === 0, "vue-ui-data-table__tbody__row-odd": v % 2 !== 0 }),
                    style: k(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
                  }, [
                    i("td", {
                      "data-cell": e.value.table.colNames.xAxis,
                      class: "vue-ui-data-table__tbody__td",
                      style: k(`outline:${e.value.table.td.outline}`)
                    }, [
                      i("div", qt, b(s), 1)
                    ], 12, Yt),
                    (o(!0), n(A, null, M(X.dataset, (y, g) => (o(), n("td", {
                      class: "vue-ui-data-table__tbody__td",
                      "data-cell": X.dataset[g].name,
                      style: k(`outline:${e.value.table.td.outline}`)
                    }, [
                      i("div", Jt, b(isNaN(y.values[v]) ? "-" : u(S)({ p: e.value.style.layout.dataLabels.prefix, v: y.values[v], s: e.value.style.layout.dataLabels.suffix, r: e.value.table.td.roundingValue })), 1)
                    ], 12, Kt))), 256))
                  ], 6))), 256))
                ])
              ])
            ], 2)
          ], 512)
        ]),
        _: 1
      }, 8, ["config"])) : c("", !0)
    ], 46, yt));
  }
}, cl = /* @__PURE__ */ dt(Qt, [["__scopeId", "data-v-30688365"]]);
export {
  cl as default
};
