import { useSlots as O, onMounted as X, ref as B, computed as C, watch as T, openBlock as s, createElementBlock as i, normalizeStyle as a, createElementVNode as e, toDisplayString as g, createCommentVNode as u, unref as l, normalizeClass as M, withKeys as S, createTextVNode as R, pushScopeId as P, popScopeId as q, createStaticVNode as $ } from "vue";
import { u as J, o as Q, e as W, i as _, f as b, X as c, w as x } from "./index-OhfEeW2N.js";
import { u as Z } from "./useNestedProp-Cwjz-hIm.js";
import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const p = (w) => (P("data-v-69afe185"), w = w(), q(), w), et = {
  key: 0,
  class: "vue-ui-rating-title",
  style: { width: "100%" }
}, ot = ["xmlns", "stroke"], lt = { id: "vueUiSmiley0" }, at = ["stop-color"], st = ["stop-color"], it = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), nt = ["fill"], rt = ["stroke"], ut = /* @__PURE__ */ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-69afe185></path>', 5), dt = [
  ut
], vt = ["xmlns", "viewBox", "stroke"], pt = { id: "vueUiSmiley0" }, ft = ["stop-color"], yt = ["stop-color"], ct = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), ht = ["fill"], gt = ["viewBox", "stroke"], kt = /* @__PURE__ */ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-69afe185></path>', 5), mt = [
  kt
], xt = ["xmlns", "stroke"], _t = { id: "vueUiSmiley1" }, bt = ["stop-color"], $t = ["stop-color"], wt = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), zt = ["fill"], Mt = ["xmlns", "stroke"], St = /* @__PURE__ */ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9 15l6 0" data-v-69afe185></path>', 5), Rt = [
  St
], Ct = ["xmlns", "viewBox", "stroke"], Bt = { id: "vueUiSmiley1" }, jt = ["stop-color"], Ht = ["stop-color"], Ut = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), Gt = ["fill"], Vt = ["viewBox", "stroke"], Xt = /* @__PURE__ */ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9 15l6 0" data-v-69afe185></path>', 5), At = [
  Xt
], Yt = ["xmlns", "stroke"], Nt = { id: "vueUiSmiley2" }, It = ["stop-color"], Ft = ["stop-color"], Kt = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), Lt = ["fill"], Dt = ["xmlns", "stroke"], Et = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), Ot = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }, null, -1)), Tt = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", { d: "M9 10l.01 0" }, null, -1)), Pt = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", { d: "M15 10l.01 0" }, null, -1)), qt = [
  Et,
  Ot,
  Tt,
  Pt
], Jt = ["xmlns", "viewBox", "stroke"], Qt = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), Wt = { id: "vueUiSmiley2" }, Zt = ["stop-color"], te = ["stop-color"], ee = ["fill"], oe = ["xmlns", "viewBox", "stroke"], le = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), ae = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }, null, -1)), se = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", { d: "M9 10l.01 0" }, null, -1)), ie = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", { d: "M15 10l.01 0" }, null, -1)), ne = [
  le,
  ae,
  se,
  ie
], re = ["xmlns", "stroke"], ue = { id: "vueUiSmiley3" }, de = ["stop-color"], ve = ["stop-color"], pe = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), fe = ["fill"], ye = ["xmlns", "stroke"], ce = /* @__PURE__ */ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-69afe185></path>', 5), he = [
  ce
], ge = ["xmlns", "viewBox", "stroke"], ke = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), me = { id: "vueUiSmiley3" }, xe = ["stop-color"], _e = ["stop-color"], be = ["fill"], $e = ["xmlns", "viewBox", "stroke"], we = /* @__PURE__ */ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-69afe185></path>', 5), ze = [
  we
], Me = ["xmlns", "stroke"], Se = { id: "vueUiSmiley4" }, Re = ["stop-color"], Ce = ["stop-color"], Be = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), je = ["fill"], He = ["xmlns", "stroke"], Ue = /* @__PURE__ */ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 9l.01 0" data-v-69afe185></path><path d="M15 9l.01 0" data-v-69afe185></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-69afe185></path>', 5), Ge = [
  Ue
], Ve = ["xmlns", "viewBox", "stroke"], Xe = /* @__PURE__ */ p(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), Ae = { id: "vueUiSmiley4" }, Ye = ["stop-color"], Ne = ["stop-color"], Ie = ["fill"], Fe = ["xmlns", "viewBox", "stroke"], Ke = /* @__PURE__ */ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 9l.01 0" data-v-69afe185></path><path d="M15 9l.01 0" data-v-69afe185></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-69afe185></path>', 5), Le = [
  Ke
], De = {
  __name: "vue-ui-smiley",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  emits: ["rate"],
  setup(w, { expose: A, emit: Y }) {
    const d = w, { vue_ui_smiley: N } = J(), I = O();
    X(() => {
      I["chart-background"] && console.warn("VueUiSmiley does not support the #chart-background slot.");
    }), X(() => {
      j();
    });
    function j() {
      Q(d.dataset) && W({
        componentName: "VueUiSmiley",
        type: "dataset"
      });
    }
    const H = B(!1), v = B(void 0), t = C({
      get: () => U(),
      set: (r) => r
    });
    function U() {
      return Z({
        userConfig: d.config,
        defaultConfig: N
      });
    }
    T(() => d.config, (r) => {
      t.value = U(), j();
    }, { deep: !0 });
    const F = C(() => typeof d.dataset.rating == "object" && !Array.isArray(d.dataset.rating) ? K(d.dataset.rating) : d.dataset.rating || null), z = C(() => typeof d.dataset.rating == "object" && !Array.isArray(d.dataset.rating)), f = B(F.value), y = C(() => t.value.readonly);
    function K(r) {
      if (r === null) return null;
      let o = 0, n = 0;
      for (const G in r) {
        const E = parseInt(G), V = r[G];
        o += E * V, n += V;
      }
      return n === 0 ? 0 : o / n;
    }
    function k(r) {
      const o = f.value - r, n = 24;
      switch (!0) {
        case o < 0:
          return 0;
        case o > 1:
          return 1 * n;
        default:
          return o * n;
      }
    }
    function m(r) {
      y.value || (f.value = r, Y("rate", r));
    }
    function L() {
      return f.value;
    }
    function D(r = !0) {
      y.value = r;
    }
    A({
      getData: L,
      toggleReadonly: D
    });
    function h(r) {
      return t.value.readonly ? t.value.style.colors.inactive[r] : f.value === r + 1 ? t.value.style.icons.useGradient && t.value.style.icons.filled ? `url(#vueUiSmiley${r})` : t.value.style.colors.active[r] : v.value !== void 0 && v.value === r ? t.value.style.icons.useGradient && t.value.style.icons.filled ? `url(#vueUiSmiley${r})` : t.value.style.colors.active[r] : t.value.style.colors.inactive[r];
    }
    return (r, o) => (s(), i("div", {
      style: a(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%;`),
      onMouseover: o[20] || (o[20] = (n) => H.value = !0),
      onMouseleave: o[21] || (o[21] = (n) => {
        H.value = !1, v.value = void 0;
      })
    }, [
      t.value.style.title.text ? (s(), i("div", et, [
        e("div", {
          style: a(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold ? "bold" : "normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)
        }, g(t.value.style.title.text), 5),
        t.value.style.title.subtitle.text ? (s(), i("div", {
          key: 0,
          style: a(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold ? "bold" : "normal"}`)
        }, g(t.value.style.title.subtitle.text), 5)) : u("", !0)
      ])) : u("", !0),
      t.value.style.rating.show && t.value.style.rating.position === "top" ? (s(), i("div", {
        key: 1,
        style: a(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold ? "bold" : "normal"};margin-left:${t.value.style.rating.offsetX}px`)
      }, g(l(_)(
        t.value.style.rating.formatter,
        f.value,
        l(b)({
          v: f.value,
          r: t.value.style.rating.roundingValue
        }),
        t.value
      )), 5)) : u("", !0),
      e("div", {
        class: "vue-ui-smiley-wrapper",
        style: a(`overflow:visible;height:${t.value.style.itemSize}px;width:fit-content;margin:0 auto;display:flex;align-items:center;justify-content:center;`)
      }, [
        t.value.style.rating.show && t.value.style.rating.position === "left" ? (s(), i("div", {
          key: 0,
          style: a(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold ? "bold" : "normal"};padding-right:${t.value.style.rating.offsetX}px`)
        }, g(l(_)(
          t.value.style.rating.formatter,
          f.value,
          l(b)({
            v: f.value,
            r: t.value.style.rating.roundingValue
          }),
          t.value
        )), 5)) : u("", !0),
        e("div", {
          tabindex: "0",
          class: M({ "vue-ui-smiley-rated": !t.value.readonly && f.value === 1 }),
          style: a(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;
            position:relative`),
          onMouseenter: o[0] || (o[0] = (n) => v.value = 0),
          onMouseleave: o[1] || (o[1] = (n) => v.value = void 0),
          onClick: o[2] || (o[2] = (n) => m(1)),
          onKeyup: o[3] || (o[3] = S((n) => m(1), ["enter"]))
        }, [
          t.value.style.tooltip.show && z.value && y.value ? (s(), i("div", {
            key: 0,
            class: "vue-ui-rating-tooltip",
            style: a(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48 + t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${v.value === 0 ? "block" : "none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)
          }, [
            e("div", {
              style: a(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)
            }, [
              e("span", {
                style: a(`font-size:${t.value.style.tooltip.fontSize}px`)
              }, "1:", 4),
              R(),
              e("span", {
                style: a(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`)
              }, g(l(_)(
                t.value.style.tooltip.formatter,
                d.dataset.rating[1],
                l(b)({
                  v: d.dataset.rating[1],
                  r: t.value.style.tooltip.roundingValue
                }),
                t.value
              )), 5),
              e("div", {
                style: a(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)
              }, " ▼ ", 4)
            ], 4)
          ], 4)) : u("", !0),
          t.value.style.icons.filled ? (s(), i("svg", {
            key: 1,
            xmlns: l(c),
            style: { transition: "all 0.1s ease-in-out", position: "absolute", top: "0", left: "0" },
            height: "100%",
            viewBox: "0 0 24 24",
            "stroke-width": "1.5",
            stroke: h(0),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            e("defs", null, [
              e("radialGradient", lt, [
                e("stop", {
                  offset: "0%",
                  "stop-color": l(x)(t.value.style.colors.active[0], 0.05)
                }, null, 8, at),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.active[0]
                }, null, 8, st)
              ])
            ]),
            it,
            e("path", {
              d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 9.86a4.5 4.5 0 0 0 -3.214 1.35a1 1 0 1 0 1.428 1.4a2.5 2.5 0 0 1 3.572 0a1 1 0 0 0 1.428 -1.4a4.5 4.5 0 0 0 -3.214 -1.35zm-2.99 -4.2l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z",
              "stroke-width": "0",
              fill: h(0)
            }, null, 8, nt)
          ], 8, ot)) : (s(), i("svg", {
            key: 2,
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: "0 0 24 24",
            "stroke-width": "1.5",
            stroke: h(0),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, dt, 8, rt)),
          t.value.style.icons.filled && y.value ? (s(), i("svg", {
            key: 3,
            xmlns: l(c),
            style: { transition: "all 0.1s ease-in-out", position: "absolute", top: "0", left: "0" },
            height: "100%",
            viewBox: `0 0 ${k(0)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[0],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            e("defs", null, [
              e("radialGradient", pt, [
                e("stop", {
                  offset: "0%",
                  "stop-color": l(x)(t.value.style.colors.activeReadonly[0], 0.05)
                }, null, 8, ft),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[0]
                }, null, 8, yt)
              ])
            ]),
            ct,
            e("path", {
              d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 9.86a4.5 4.5 0 0 0 -3.214 1.35a1 1 0 1 0 1.428 1.4a2.5 2.5 0 0 1 3.572 0a1 1 0 0 0 1.428 -1.4a4.5 4.5 0 0 0 -3.214 -1.35zm-2.99 -4.2l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z",
              "stroke-width": "0",
              fill: t.value.style.icons.useGradient ? "url(#vueUiSmiley0)" : t.value.style.colors.activeReadonly[0]
            }, null, 8, ht)
          ], 8, vt)) : u("", !0),
          !t.value.style.icons.filled && y.value ? (s(), i("svg", {
            key: 4,
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${k(0)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[0],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, mt, 8, gt)) : u("", !0)
        ], 38),
        e("div", {
          tabindex: "0",
          class: M({ "vue-ui-smiley-rated": !t.value.readonly && f.value === 2 }),
          style: a(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),
          onMouseenter: o[4] || (o[4] = (n) => v.value = 1),
          onMouseleave: o[5] || (o[5] = (n) => v.value = void 0),
          onClick: o[6] || (o[6] = (n) => m(2)),
          onKeyup: o[7] || (o[7] = S((n) => m(2), ["enter"]))
        }, [
          t.value.style.tooltip.show && z.value && y.value ? (s(), i("div", {
            key: 0,
            class: "vue-ui-rating-tooltip",
            style: a(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48 + t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${v.value === 1 ? "block" : "none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)
          }, [
            e("div", {
              style: a(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)
            }, [
              e("span", {
                style: a(`font-size:${t.value.style.tooltip.fontSize}px`)
              }, "2:", 4),
              R(),
              e("span", {
                style: a(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`)
              }, g(l(_)(
                t.value.style.tooltip.formatter,
                d.dataset.rating[2],
                l(b)({
                  v: d.dataset.rating[2],
                  r: t.value.style.tooltip.roundingValue
                }),
                t.value
              )), 5),
              e("div", {
                style: a(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)
              }, " ▼ ", 4)
            ], 4)
          ], 4)) : u("", !0),
          t.value.style.icons.filled ? (s(), i("svg", {
            key: 1,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: "0 0 24 24",
            "stroke-width": "1.5",
            stroke: h(1),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            e("defs", null, [
              e("radialGradient", _t, [
                e("stop", {
                  offset: "0%",
                  "stop-color": l(x)(t.value.style.colors.active[1], 0.05)
                }, null, 8, bt),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.active[1]
                }, null, 8, $t)
              ])
            ]),
            wt,
            e("path", {
              d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 10.66h-6l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h6l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-5.99 -5l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z",
              "stroke-width": "0",
              fill: h(1)
            }, null, 8, zt)
          ], 8, xt)) : (s(), i("svg", {
            key: 2,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: "0 0 24 24",
            "stroke-width": "1.5",
            stroke: h(1),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, Rt, 8, Mt)),
          t.value.style.icons.filled && y.value ? (s(), i("svg", {
            key: 3,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${k(1)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[1],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            e("defs", null, [
              e("radialGradient", Bt, [
                e("stop", {
                  offset: "0%",
                  "stop-color": l(x)(t.value.style.colors.activeReadonly[1], 0.05)
                }, null, 8, jt),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[1]
                }, null, 8, Ht)
              ])
            ]),
            Ut,
            e("path", {
              d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 10.66h-6l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h6l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-5.99 -5l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z",
              "stroke-width": "0",
              fill: t.value.style.icons.useGradient ? "url(#vueUiSmiley1)" : t.value.style.colors.activeReadonly[1]
            }, null, 8, Gt)
          ], 8, Ct)) : u("", !0),
          !t.value.style.icons.filled && y.value ? (s(), i("svg", {
            key: 4,
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${k(1)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[1],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, At, 8, Vt)) : u("", !0)
        ], 38),
        e("div", {
          tabindex: "0",
          class: M({ "vue-ui-smiley-rated": !t.value.readonly && f.value === 3 }),
          style: a(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),
          onMouseenter: o[8] || (o[8] = (n) => v.value = 2),
          onMouseleave: o[9] || (o[9] = (n) => v.value = void 0),
          onClick: o[10] || (o[10] = (n) => m(3)),
          onKeyup: o[11] || (o[11] = S((n) => m(3), ["enter"]))
        }, [
          t.value.style.tooltip.show && z.value && y.value ? (s(), i("div", {
            key: 0,
            class: "vue-ui-rating-tooltip",
            style: a(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48 + t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${v.value === 2 ? "block" : "none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)
          }, [
            e("div", {
              style: a(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)
            }, [
              e("span", {
                style: a(`font-size:${t.value.style.tooltip.fontSize}px`)
              }, "3:", 4),
              R(),
              e("span", {
                style: a(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`)
              }, g(l(_)(
                t.value.style.tooltip.formatter,
                d.dataset.rating[3],
                l(b)({
                  v: d.dataset.rating[3],
                  r: t.value.style.tooltip.roundingValue
                }),
                t.value
              )), 5),
              e("div", {
                style: a(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)
              }, " ▼ ", 4)
            ], 4)
          ], 4)) : u("", !0),
          t.value.style.icons.filled ? (s(), i("svg", {
            key: 1,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: "0 0 24 24",
            "stroke-width": "1.5",
            stroke: h(2),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            e("defs", null, [
              e("radialGradient", Nt, [
                e("stop", {
                  offset: "0%",
                  "stop-color": l(x)(t.value.style.colors.activeReadonly[2], 0.05)
                }, null, 8, It),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[2]
                }, null, 8, Ft)
              ])
            ]),
            Kt,
            e("path", {
              d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-7.99 5.66l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z",
              "stroke-width": "0",
              fill: h(2)
            }, null, 8, Lt)
          ], 8, Yt)) : (s(), i("svg", {
            key: 2,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: "0 0 24 24",
            "stroke-width": "1.5",
            stroke: h(2),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, qt, 8, Dt)),
          t.value.style.icons.filled && y.value ? (s(), i("svg", {
            key: 3,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${k(2)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[2],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            Qt,
            e("defs", null, [
              e("radialGradient", Wt, [
                e("stop", {
                  offset: "0%",
                  "stop-color": l(x)(t.value.style.colors.activeReadonly[2], 0.05)
                }, null, 8, Zt),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[2]
                }, null, 8, te)
              ])
            ]),
            e("path", {
              d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-7.99 5.66l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z",
              "stroke-width": "0",
              fill: t.value.style.icons.useGradient ? "url(#vueUiSmiley2)" : t.value.style.colors.activeReadonly[2]
            }, null, 8, ee)
          ], 8, Jt)) : u("", !0),
          !t.value.style.icons.filled && y.value ? (s(), i("svg", {
            key: 4,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${k(2)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[2],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, ne, 8, oe)) : u("", !0)
        ], 38),
        e("div", {
          tabindex: "0",
          class: M({ "vue-ui-smiley-rated": !t.value.readonly && f.value === 4 }),
          style: a(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),
          onMouseenter: o[12] || (o[12] = (n) => v.value = 3),
          onMouseleave: o[13] || (o[13] = (n) => v.value = void 0),
          onClick: o[14] || (o[14] = (n) => m(4)),
          onKeyup: o[15] || (o[15] = S((n) => m(4), ["enter"]))
        }, [
          t.value.style.tooltip.show && z.value && y.value ? (s(), i("div", {
            key: 0,
            class: "vue-ui-rating-tooltip",
            style: a(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48 + t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${v.value === 3 ? "block" : "none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)
          }, [
            e("div", {
              style: a(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)
            }, [
              e("span", {
                style: a(`font-size:${t.value.style.tooltip.fontSize}px`)
              }, "4:", 4),
              R(),
              e("span", {
                style: a(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`)
              }, g(l(_)(
                t.value.style.tooltip.formatter,
                d.dataset.rating[4],
                l(b)({
                  v: d.dataset.rating[4],
                  r: t.value.style.tooltip.roundingValue
                }),
                t.value
              )), 5),
              e("div", {
                style: a(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)
              }, " ▼ ", 4)
            ], 4)
          ], 4)) : u("", !0),
          t.value.style.icons.filled ? (s(), i("svg", {
            key: 1,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: "0 0 24 24",
            "stroke-width": "1.5",
            stroke: h(3),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            e("defs", null, [
              e("radialGradient", ue, [
                e("stop", {
                  offset: "0%",
                  "stop-color": l(x)(t.value.style.colors.activeReadonly[3], 0.95)
                }, null, 8, de),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[3]
                }, null, 8, ve)
              ])
            ]),
            pe,
            e("path", {
              d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.8 10.946a1 1 0 0 0 -1.414 .014a2.5 2.5 0 0 1 -3.572 0a1 1 0 0 0 -1.428 1.4a4.5 4.5 0 0 0 6.428 0a1 1 0 0 0 -.014 -1.414zm-6.19 -5.286l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z",
              "stroke-width": "0",
              fill: h(3)
            }, null, 8, fe)
          ], 8, re)) : (s(), i("svg", {
            key: 2,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: "0 0 24 24",
            "stroke-width": "1.5",
            stroke: h(3),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, he, 8, ye)),
          t.value.style.icons.filled && y.value ? (s(), i("svg", {
            key: 3,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${k(3)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[3],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            ke,
            e("defs", null, [
              e("radialGradient", me, [
                e("stop", {
                  offset: "0%",
                  "stop-color": l(x)(t.value.style.colors.activeReadonly[3], 0.95)
                }, null, 8, xe),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[3]
                }, null, 8, _e)
              ])
            ]),
            e("path", {
              d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.8 10.946a1 1 0 0 0 -1.414 .014a2.5 2.5 0 0 1 -3.572 0a1 1 0 0 0 -1.428 1.4a4.5 4.5 0 0 0 6.428 0a1 1 0 0 0 -.014 -1.414zm-6.19 -5.286l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z",
              "stroke-width": "0",
              fill: t.value.style.icons.useGradient ? "url(#vueUiSmiley3)" : t.value.style.colors.activeReadonly[3]
            }, null, 8, be)
          ], 8, ge)) : u("", !0),
          !t.value.style.icons.filled && y.value ? (s(), i("svg", {
            key: 4,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${k(3)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[3],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, ze, 8, $e)) : u("", !0)
        ], 38),
        e("div", {
          tabindex: "0",
          class: M({ "vue-ui-smiley-rated": !t.value.readonly && f.value === 5 }),
          style: a(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),
          onMouseenter: o[16] || (o[16] = (n) => v.value = 4),
          onMouseleave: o[17] || (o[17] = (n) => v.value = void 0),
          onClick: o[18] || (o[18] = (n) => m(5)),
          onKeyup: o[19] || (o[19] = S((n) => m(5), ["enter"]))
        }, [
          t.value.style.tooltip.show && z.value && y.value ? (s(), i("div", {
            key: 0,
            class: "vue-ui-rating-tooltip",
            style: a(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48 + t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${v.value === 4 ? "block" : "none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)
          }, [
            e("div", {
              style: a(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)
            }, [
              e("span", {
                style: a(`font-size:${t.value.style.tooltip.fontSize}px`)
              }, "5:", 4),
              R(),
              e("span", {
                style: a(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`)
              }, g(l(_)(
                t.value.style.tooltip.formatter,
                d.dataset.rating[5],
                l(b)({
                  v: d.dataset.rating[5],
                  r: t.value.style.tooltip.roundingValue
                }),
                t.value
              )), 5),
              e("div", {
                style: a(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)
              }, " ▼ ", 4)
            ], 4)
          ], 4)) : u("", !0),
          t.value.style.icons.filled ? (s(), i("svg", {
            key: 1,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: "0 0 24 24",
            "stroke-width": "1.5",
            stroke: h(4),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            e("defs", null, [
              e("radialGradient", Se, [
                e("stop", {
                  offset: "0%",
                  "stop-color": l(x)(t.value.style.colors.activeReadonly[4], 0.9)
                }, null, 8, Re),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[4]
                }, null, 8, Ce)
              ])
            ]),
            Be,
            e("path", {
              d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 9.66h-6a1 1 0 0 0 -1 1v.05a3.975 3.975 0 0 0 3.777 3.97l.227 .005a4.026 4.026 0 0 0 3.99 -3.79l.006 -.206a1 1 0 0 0 -1 -1.029zm-5.99 -5l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z",
              "stroke-width": "0",
              fill: h(4)
            }, null, 8, je)
          ], 8, Me)) : (s(), i("svg", {
            key: 2,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: "0 0 24 24",
            "stroke-width": "1.5",
            stroke: h(4),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, Ge, 8, He)),
          t.value.style.icons.filled && y.value ? (s(), i("svg", {
            key: 3,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${k(4)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[4],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            Xe,
            e("defs", null, [
              e("radialGradient", Ae, [
                e("stop", {
                  offset: "0%",
                  "stop-color": l(x)(t.value.style.colors.activeReadonly[4], 0.9)
                }, null, 8, Ye),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[4]
                }, null, 8, Ne)
              ])
            ]),
            e("path", {
              d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 9.66h-6a1 1 0 0 0 -1 1v.05a3.975 3.975 0 0 0 3.777 3.97l.227 .005a4.026 4.026 0 0 0 3.99 -3.79l.006 -.206a1 1 0 0 0 -1 -1.029zm-5.99 -5l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z",
              "stroke-width": "0",
              fill: t.value.style.icons.useGradient ? "url(#vueUiSmiley4)" : t.value.style.colors.activeReadonly[4]
            }, null, 8, Ie)
          ], 8, Ve)) : u("", !0),
          !t.value.style.icons.filled && y.value ? (s(), i("svg", {
            key: 4,
            xmlns: l(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${k(4)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[4],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, Le, 8, Fe)) : u("", !0)
        ], 38),
        t.value.style.rating.show && t.value.style.rating.position === "right" ? (s(), i("div", {
          key: 1,
          style: a(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold ? "bold" : "normal"};padding-left:${t.value.style.rating.offsetX}px`)
        }, g(l(_)(
          t.value.style.rating.formatter,
          f.value,
          l(b)({
            v: f.value,
            r: t.value.style.rating.roundingValue
          }),
          t.value
        )), 5)) : u("", !0)
      ], 4),
      t.value.style.rating.show && t.value.style.rating.position === "bottom" ? (s(), i("div", {
        key: 2,
        style: a(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold ? "bold" : "normal"};margin-left:${t.value.style.rating.offsetX}px`)
      }, g(l(_)(
        t.value.style.rating.formatter,
        f.value,
        l(b)({
          v: f.value,
          r: t.value.style.rating.roundingValue
        }),
        t.value
      )), 5)) : u("", !0)
    ], 36));
  }
}, Je = /* @__PURE__ */ tt(De, [["__scopeId", "data-v-69afe185"]]);
export {
  Je as default
};
