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