import { computed as c, onMounted as Ce, ref as v, watch as we, openBlock as r, createElementBlock as y, normalizeClass as Z, normalizeStyle as L, unref as a, createBlock as p, createCommentVNode as u, createVNode as U, createSlots as xe, withCtx as m, renderSlot as h, normalizeProps as B, guardReactiveProps as D, createElementVNode as s, Fragment as ee, renderList as te, toDisplayString as M, createTextVNode as oe, nextTick as _e } from "vue";
import { u as $e, o as Me, e as le, c as Pe, t as Ne, O as Ae, X as Oe, s as C, w as Te, P as Le, i as ae, f as I, q as Ie, r as Fe } from "./index-MWHrTFPq.js";
import { _ as Se } from "./Title-C7EOYmwp.js";
import { u as Ve, U as je } from "./usePrinter-CEEgHfhF.js";
import { L as Ue } from "./Legend-CUhyETYn.js";
import P from "./BaseIcon-CgOl0yXt.js";
import { D as Be } from "./DataTable-DtvVWOjy.js";
import De from "./vue-ui-skeleton-Bo8ydREb.js";
import We from "./vue-ui-accordion-BnV2tlGp.js";
import { u as se } from "./useNestedProp-CTDeT4KA.js";
import { _ as ze } from "./PackageVersion-CBKqLhAX.js";
import { P as Ee } from "./PenAndPaper-DtLD2Sq6.js";
import { u as Ge } from "./useUserOptionState-BIvW1Kz7.js";
import { _ as He } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const Re = ["id"], Xe = {
  key: 2,
  style: "width:100%;background:transparent"
}, Ke = ["xmlns", "viewBox"], qe = ["width", "height"], Ye = ["id"], Je = ["stop-color"], Qe = ["stop-color"], Ze = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], et = ["d", "stroke", "stroke-width"], tt = ["stroke"], ot = ["fill"], lt = ["stroke"], at = ["fill"], st = ["stroke"], rt = ["fill"], nt = ["stroke"], ut = ["fill"], it = ["stroke"], dt = ["fill"], ct = ["d", "stroke", "stroke-width", "fill"], vt = ["x1", "y1", "stroke"], yt = ["cx", "cy", "fill", "stroke"], ht = ["fill", "stroke"], ft = ["y", "fill", "font-weight"], pt = ["y", "fill"], mt = {
  key: 5,
  class: "vue-data-ui-watermark"
}, gt = ["onClick"], kt = { style: { "font-weight": "bold" } }, bt = {
  key: 8,
  ref: "source",
  dir: "auto"
}, Ct = ["innerHTML"], wt = {
  __name: "vue-ui-mood-radar",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  setup(re, { expose: ne }) {
    const i = re, { vue_ui_mood_radar: ue } = $e(), x = c(() => !!i.dataset && Object.keys(i.dataset).length);
    Ce(() => {
      W();
    });
    function W() {
      Me(i.dataset) && le({
        componentName: "VueUiMoodRadar",
        type: "dataset"
      });
    }
    const _ = v(Pe()), F = v(null), ie = v(null), n = v(null), de = v(null), ce = v(0), ve = v(0), z = v(0), e = c({
      get: () => H(),
      set: (o) => o
    }), { userOptionsVisible: S, setUserOptionsVisibility: E, keepUserOptionState: G } = Ge({ config: e.value });
    function H() {
      const o = se({
        userConfig: i.config,
        defaultConfig: ue
      });
      return o.theme ? {
        ...se({
          userConfig: Ne.vue_ui_mood_radar[o.theme] || i.config,
          defaultConfig: o
        })
      } : o;
    }
    we(() => i.config, (o) => {
      e.value = H(), S.value = !e.value.showOnChartHover, W(), ce.value += 1, ve.value += 1, z.value += 1;
    }, { deep: !0 });
    const { isPrinting: R, isImaging: X, generatePdf: K, generateImage: q } = Ve({
      elementId: _.value,
      fileName: e.value.style.chart.title.text || "vue-ui-mood-radar"
    }), ye = c(() => e.value.userOptions.show && !e.value.style.chart.title.text), N = v({
      showTable: e.value.table.show
    }), f = c(() => ({
      height: 256,
      width: 256
    })), V = c(() => Ae({
      plot: { x: 128, y: f.value.height / 2 },
      radius: 90,
      sides: 5,
      rotation: 11
    }));
    function he({ centerX: o, centerY: l, apexX: t, apexY: d, proportion: k, key: $, value: be }) {
      return {
        x: o + (t - o) * k,
        y: l + (d - l) * k,
        key: $,
        value: be
      };
    }
    const fe = c(() => Math.max(...Object.values(i.dataset).map((o) => isNaN(o) ? 0 : o))), w = c(() => Object.values(i.dataset).reduce((o, l) => (isNaN(o) ? 0 : o) + (isNaN(l) ? 0 : l), 0)), g = c(() => Object.keys(i.dataset).map((o, l) => {
      const t = typeof i.dataset[o] != "number" || isNaN(i.dataset[o]) ? 0 : i.dataset[o];
      return {
        index: l,
        key: o,
        value: t,
        proportion: t / w.value,
        color: e.value.style.chart.layout.smileys.colors[o]
      };
    }).sort((o, l) => l.key - o.key)), Y = c(() => x.value ? (["1", "2", "3", "4", "5"].forEach((o) => {
      [null, void 0].includes(i.dataset[o]) && le({
        componentName: "VueUiMoodRadar",
        type: "datasetAttribute",
        property: o
      });
    }), V.value.coordinates.map((o, l) => {
      const t = he({
        centerX: f.value.width / 2,
        centerY: f.value.height / 2,
        apexX: o.x,
        apexY: o.y,
        proportion: g.value[l].value / fe.value,
        key: g.value[l].key,
        value: g.value[l].value
      });
      return {
        ...o,
        plots: t,
        key: g.value[l].key
      };
    })) : []), pe = c(() => ({
      cy: "mood-radar-legend",
      backgroundColor: e.value.style.chart.legend.backgroundColor,
      color: e.value.style.chart.legend.color,
      fontSize: e.value.style.chart.legend.fontSize,
      paddingBottom: 12,
      fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
    }));
    function me(o) {
      o === n.value ? n.value = null : n.value = o;
    }
    const b = c(() => {
      const o = g.value.map((t) => ({
        name: t.key,
        color: t.color
      })), l = g.value.map((t) => isNaN(t.value) ? 0 : t.value);
      return { head: o, body: l };
    });
    function J() {
      _e(() => {
        const o = b.value.head.map((d, k) => [[
          d.name
        ], [b.value.body[k]], [isNaN(b.value.body[k] / w.value) ? "-" : b.value.body[k] / w.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), t = Ie(l);
        Fe({ csvContent: t, title: e.value.style.chart.title.text || "vue-ui-mood-radar" });
      });
    }
    const A = c(() => {
      const o = [
        ' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
        Number(w.value.toFixed(e.value.table.td.roundingValue)).toLocaleString(),
        "100%"
      ], l = b.value.head.map((k, $) => [
        {
          color: k.color,
          name: k.name
        },
        b.value.body[$].toFixed(e.value.table.td.roundingValue),
        isNaN(b.value.body[$] / w.value) ? "-" : (b.value.body[$] / w.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
      ]), t = {
        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
      }, d = [
        e.value.table.columnNames.series,
        e.value.table.columnNames.value,
        e.value.table.columnNames.percentage
      ];
      return {
        head: o,
        body: l,
        config: t,
        colNames: d
      };
    });
    function ge() {
      return g.value;
    }
    function Q() {
      N.value.showTable = !N.value.showTable;
    }
    const O = v(!1);
    function ke(o) {
      O.value = o;
    }
    const T = v(!1);
    function j() {
      T.value = !T.value;
    }
    return ne({
      getData: ge,
      generatePdf: K,
      generateCsv: J,
      generateImage: q,
      toggleTable: Q,
      toggleAnnotator: j
    }), (o, l) => (r(), y("div", {
      class: Z(`vue-ui-mood-radar ${O.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
      ref_key: "moodRadarChart",
      ref: F,
      id: `${_.value}`,
      style: L(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
      onMouseenter: l[11] || (l[11] = () => a(E)(!0)),
      onMouseleave: l[12] || (l[12] = () => a(E)(!1))
    }, [
      e.value.userOptions.buttons.annotator ? (r(), p(Ee, {
        key: 0,
        parent: F.value,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        active: T.value,
        onClose: j
      }, null, 8, ["parent", "backgroundColor", "color", "active"])) : u("", !0),
      ye.value ? (r(), y("div", {
        key: 1,
        ref_key: "noTitle",
        ref: de,
        class: "vue-data-ui-no-title-space",
        style: "height:36px; width: 100%;background:transparent"
      }, null, 512)) : u("", !0),
      e.value.style.chart.title.text ? (r(), y("div", Xe, [
        U(Se, {
          config: {
            title: {
              cy: "mood-radar-title",
              ...e.value.style.chart.title
            },
            subtitle: {
              cy: "mood-radar-subtitle",
              ...e.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"])
      ])) : u("", !0),
      e.value.userOptions.show && x.value && (a(G) || a(S)) ? (r(), p(je, {
        key: 3,
        ref_key: "details",
        ref: ie,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isPrinting: a(R),
        isImaging: a(X),
        uid: _.value,
        hasPdf: e.value.userOptions.buttons.pdf,
        hasXls: e.value.userOptions.buttons.csv,
        hasImg: e.value.userOptions.buttons.img,
        hasTable: e.value.userOptions.buttons.table,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: F.value,
        position: e.value.userOptions.position,
        hasAnnotator: e.value.userOptions.buttons.annotator,
        isAnnotation: T.value,
        onToggleFullscreen: ke,
        onGeneratePdf: a(K),
        onGenerateCsv: J,
        onGenerateImage: a(q),
        onToggleTable: Q,
        onToggleAnnotator: j,
        style: L({
          visibility: a(G) ? a(S) ? "visible" : "hidden" : "visible"
        })
      }, xe({ _: 2 }, [
        o.$slots.optionPdf ? {
          name: "optionPdf",
          fn: m(() => [
            h(o.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        o.$slots.optionCsv ? {
          name: "optionCsv",
          fn: m(() => [
            h(o.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        o.$slots.optionImg ? {
          name: "optionImg",
          fn: m(() => [
            h(o.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        o.$slots.optionTable ? {
          name: "optionTable",
          fn: m(() => [
            h(o.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        o.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: m(({ toggleFullscreen: t, isFullscreen: d }) => [
            h(o.$slots, "optionFullscreen", B(D({ toggleFullscreen: t, isFullscreen: d })), void 0, !0)
          ]),
          key: "4"
        } : void 0,
        o.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: m(({ toggleAnnotator: t, isAnnotator: d }) => [
            h(o.$slots, "optionAnnotator", B(D({ toggleAnnotator: t, isAnnotator: d })), void 0, !0)
          ]),
          key: "5"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : u("", !0),
      x.value ? (r(), y("svg", {
        key: 4,
        xmlns: a(Oe),
        viewBox: `0 0 ${f.value.width} ${f.value.height}`,
        class: Z({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }),
        style: L(`overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
      }, [
        U(ze),
        o.$slots["chart-background"] ? (r(), y("foreignObject", {
          key: 0,
          x: 0,
          y: 0,
          width: f.value.width,
          height: f.value.height,
          style: {
            pointerEvents: "none"
          }
        }, [
          h(o.$slots, "chart-background", {}, void 0, !0)
        ], 8, qe)) : u("", !0),
        s("defs", null, [
          s("radialGradient", {
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `mood_radar_gradient_${_.value}`
          }, [
            s("stop", {
              offset: "0%",
              "stop-color": a(C)(e.value.style.chart.layout.dataPolygon.color, e.value.style.chart.layout.dataPolygon.opacity)
            }, null, 8, Je),
            s("stop", {
              offset: "100%",
              "stop-color": a(C)(a(Te)(e.value.style.chart.layout.dataPolygon.color, e.value.style.chart.layout.dataPolygon.gradient.intensity / 100), e.value.style.chart.layout.dataPolygon.opacity)
            }, null, 8, Qe)
          ], 8, Ye)
        ]),
        (r(!0), y(ee, null, te(V.value.coordinates, (t) => (r(), y("line", {
          x1: f.value.width / 2,
          y1: f.value.height / 2,
          x2: t.x,
          y2: t.y,
          stroke: e.value.style.chart.layout.grid.stroke,
          "stroke-width": e.value.style.chart.layout.grid.strokeWidth
        }, null, 8, Ze))), 256)),
        s("path", {
          d: V.value.path,
          fill: "none",
          stroke: e.value.style.chart.layout.outerPolygon.stroke,
          "stroke-width": e.value.style.chart.layout.outerPolygon.strokeWidth,
          "stroke-linejoin": "round",
          "stroke-linecap": "round"
        }, null, 8, et),
        s("path", {
          fill: "none",
          stroke: e.value.style.chart.layout.smileys.colors[5],
          "stroke-width": "1",
          "stroke-linecap": "round",
          d: "M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"
        }, null, 8, tt),
        s("circle", {
          class: "vue-ui-mood-radar-trap",
          onMouseenter: l[0] || (l[0] = (t) => n.value = 5),
          onMouseleave: l[1] || (l[1] = (t) => n.value = null),
          cx: "128",
          cy: "25",
          r: "20",
          fill: n.value === 5 ? a(C)(e.value.style.chart.layout.smileys.colors[5], 20) : "transparent"
        }, null, 40, ot),
        s("path", {
          fill: "none",
          stroke: e.value.style.chart.layout.smileys.colors[4],
          "stroke-width": "1",
          "stroke-linecap": "round",
          d: "M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"
        }, null, 8, lt),
        s("circle", {
          class: "vue-ui-mood-radar-trap",
          onMouseenter: l[2] || (l[2] = (t) => n.value = 4),
          onMouseleave: l[3] || (l[3] = (t) => n.value = null),
          cx: "227",
          cy: "95.5",
          r: "20",
          fill: n.value === 4 ? a(C)(e.value.style.chart.layout.smileys.colors[4], 20) : "transparent"
        }, null, 40, at),
        s("path", {
          fill: "none",
          stroke: e.value.style.chart.layout.smileys.colors[3],
          "stroke-width": "1",
          "stroke-linecap": "round",
          d: "M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"
        }, null, 8, st),
        s("circle", {
          class: "vue-ui-mood-radar-trap",
          onMouseenter: l[4] || (l[4] = (t) => n.value = 3),
          onMouseleave: l[5] || (l[5] = (t) => n.value = null),
          cx: "190",
          cy: "213.5",
          r: "20",
          fill: n.value === 3 ? a(C)(e.value.style.chart.layout.smileys.colors[3], 20) : "transparent"
        }, null, 40, rt),
        s("path", {
          fill: "none",
          stroke: e.value.style.chart.layout.smileys.colors[2],
          "stroke-width": "1",
          "stroke-linecap": "round",
          d: "M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"
        }, null, 8, nt),
        s("circle", {
          class: "vue-ui-mood-radar-trap",
          onMouseenter: l[6] || (l[6] = (t) => n.value = 2),
          onMouseleave: l[7] || (l[7] = (t) => n.value = null),
          cx: "65",
          cy: "213.5",
          r: "20",
          fill: n.value === 2 ? a(C)(e.value.style.chart.layout.smileys.colors[2], 20) : "transparent"
        }, null, 40, ut),
        s("path", {
          fill: "none",
          stroke: e.value.style.chart.layout.smileys.colors[1],
          "stroke-width": "1",
          "stroke-linecap": "round",
          d: "M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"
        }, null, 8, it),
        s("circle", {
          class: "vue-ui-mood-radar-trap",
          onMouseenter: l[8] || (l[8] = (t) => n.value = 1),
          onMouseleave: l[9] || (l[9] = (t) => n.value = null),
          cx: "29",
          cy: "95.5",
          r: "20",
          fill: n.value === 1 ? a(C)(e.value.style.chart.layout.smileys.colors[1], 20) : "transparent"
        }, null, 40, dt),
        s("path", {
          d: a(Le)(Y.value.map((t) => t.plots)),
          stroke: e.value.style.chart.layout.dataPolygon.stroke,
          "stroke-width": e.value.style.chart.layout.dataPolygon.strokeWidth,
          "stroke-linecap": "round",
          "stroke-linejoin": "round",
          fill: e.value.style.chart.layout.dataPolygon.gradient.show ? `url(#mood_radar_gradient_${_.value})` : a(C)(e.value.style.chart.layout.dataPolygon.color, e.value.style.chart.layout.dataPolygon.opacity)
        }, null, 8, ct),
        (r(!0), y(ee, null, te(Y.value.map((t) => t.plots), (t, d) => (r(), y("g", {
          class: "vue-ui-mood-radar-trap",
          style: L(`opacity:${n.value == t.key ? "1" : "0"}`)
        }, [
          s("line", {
            x1: t.x,
            y1: t.y,
            x2: 128,
            y2: 128,
            stroke: e.value.style.chart.layout.smileys.colors[t.key]
          }, null, 8, vt),
          s("circle", {
            cx: t.x,
            cy: t.y,
            fill: e.value.style.chart.layout.smileys.colors[t.key],
            r: "3",
            stroke: e.value.style.chart.backgroundColor,
            "stroke-width": 0.5
          }, null, 8, yt),
          s("circle", {
            cx: 128,
            cy: 128,
            fill: e.value.style.chart.layout.smileys.colors[t.key],
            r: "3",
            stroke: e.value.style.chart.backgroundColor,
            "stroke-width": 0.5
          }, null, 8, ht),
          s("text", {
            x: 128,
            y: ["5", 5].includes(t.key) ? 145 : 120,
            fill: e.value.style.chart.layout.dataLabel.color,
            "font-size": "12",
            "text-anchor": "middle",
            "font-weight": e.value.style.chart.layout.dataLabel.bold ? "bold" : "normal"
          }, M(a(ae)(
            e.value.style.chart.layout.dataLabel.formatter,
            t.value,
            a(I)({
              p: e.value.style.chart.layout.dataLabel.prefix,
              v: t.value,
              s: e.value.style.chart.layout.dataLabel.suffix,
              r: e.value.style.chart.layout.dataLabel.roundingValue
            }),
            { datapoint: t, seriesIndex: d }
          )), 9, ft),
          s("text", {
            x: 128,
            y: ["5", 5].includes(t.key) ? 163 : 102,
            fill: e.value.style.chart.layout.dataLabel.color,
            "font-size": "12",
            "text-anchor": "middle"
          }, " (" + M(a(I)({
            v: t.value / w.value * 100,
            s: "%",
            r: e.value.style.chart.layout.dataLabel.roundingPercentage
          })) + ") ", 9, pt)
        ], 4))), 256)),
        h(o.$slots, "svg", { svg: f.value }, void 0, !0)
      ], 14, Ke)) : u("", !0),
      o.$slots.watermark ? (r(), y("div", mt, [
        h(o.$slots, "watermark", B(D({ isPrinting: a(R) || a(X) })), void 0, !0)
      ])) : u("", !0),
      x.value ? u("", !0) : (r(), p(De, {
        key: 6,
        config: {
          type: "radar",
          style: {
            backgroundColor: e.value.style.chart.backgroundColor,
            radar: {
              grid: {
                color: "#CCCCCC"
              },
              shapes: {
                color: "#CCCCCC"
              }
            }
          }
        }
      }, null, 8, ["config"])),
      e.value.style.chart.legend.show ? (r(), p(Ue, {
        legendSet: g.value,
        config: pe.value,
        key: `legend_${z.value}`,
        style: { display: "flex", "row-gap": "6px" }
      }, {
        item: m(({ legend: t, index: d }) => [
          s("div", {
            onClick: () => me(t.key),
            style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center", margin: "3px 0" }
          }, [
            t.key == 1 ? (r(), p(P, {
              key: 0,
              strokeWidth: 1,
              name: "moodSad",
              stroke: e.value.style.chart.layout.smileys.colors[t.key]
            }, null, 8, ["stroke"])) : u("", !0),
            t.key == 2 ? (r(), p(P, {
              key: 1,
              strokeWidth: 1,
              name: "moodFlat",
              stroke: e.value.style.chart.layout.smileys.colors[t.key]
            }, null, 8, ["stroke"])) : u("", !0),
            t.key == 3 ? (r(), p(P, {
              key: 2,
              strokeWidth: 1,
              name: "moodNeutral",
              stroke: e.value.style.chart.layout.smileys.colors[t.key]
            }, null, 8, ["stroke"])) : u("", !0),
            t.key == 4 ? (r(), p(P, {
              key: 3,
              strokeWidth: 1,
              name: "smiley",
              stroke: e.value.style.chart.layout.smileys.colors[t.key]
            }, null, 8, ["stroke"])) : u("", !0),
            t.key == 5 ? (r(), p(P, {
              key: 4,
              strokeWidth: 1,
              name: "moodHappy",
              stroke: e.value.style.chart.layout.smileys.colors[t.key]
            }, null, 8, ["stroke"])) : u("", !0),
            s("span", kt, M(a(ae)(
              e.value.style.chart.layout.dataLabel.formatter,
              t.value,
              a(I)({
                p: e.value.style.chart.layout.dataLabel.prefix,
                v: t.value,
                s: e.value.style.chart.layout.dataLabel.suffix,
                r: e.value.style.chart.layout.dataLabel.roundingValue
              }),
              { datapoint: t, seriesIndex: d }
            )), 1),
            oe(" (" + M(a(I)({
              v: t.proportion * 100,
              s: "%",
              r: e.value.style.chart.legend.roundingPercentage
            })) + ") ", 1)
          ], 8, gt)
        ]),
        _: 1
      }, 8, ["legendSet", "config"])) : u("", !0),
      h(o.$slots, "legend", { legend: g.value }, void 0, !0),
      o.$slots.source ? (r(), y("div", bt, [
        h(o.$slots, "source", {}, void 0, !0)
      ], 512)) : u("", !0),
      x.value ? (r(), p(We, {
        key: 9,
        hideDetails: "",
        config: {
          open: N.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: m(() => [
          U(Be, {
            colNames: A.value.colNames,
            head: A.value.head,
            body: A.value.body,
            config: A.value.config,
            title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: l[10] || (l[10] = (t) => N.value.showTable = !1)
          }, {
            th: m(({ th: t }) => [
              s("div", {
                innerHTML: t,
                style: { display: "flex", "align-items": "center" }
              }, null, 8, Ct)
            ]),
            td: m(({ td: t }) => [
              oe(M(t.name || t), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"])
        ]),
        _: 1
      }, 8, ["config"])) : u("", !0)
    ], 46, Re));
  }
}, jt = /* @__PURE__ */ He(wt, [["__scopeId", "data-v-9ac93b41"]]);
export {
  jt as default
};
