import { onMounted as F, ref as S, computed as R, openBlock as s, createElementBlock as a, normalizeStyle as l, createElementVNode as e, toDisplayString as k, createCommentVNode as r, normalizeClass as w, withKeys as z, createTextVNode as M, unref as n, pushScopeId as I, popScopeId as K, createStaticVNode as _ } from "vue";
import { u as E, o as O, e as D, X as c, v as m } from "./index-CguVaFlt.js";
import { u as L } from "./useNestedProp-BbEbJmgv.js";
import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const v = ($) => (I("data-v-3e41118a"), $ = $(), K(), $), P = {
  key: 0,
  class: "vue-ui-rating-title",
  style: { width: "100%" }
}, q = ["xmlns", "stroke"], J = { id: "vueUiSmiley0" }, Q = ["stop-color"], W = ["stop-color"], Z = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), tt = ["fill"], et = ["stroke"], ot = /* @__PURE__ */ _('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-3e41118a></path>', 5), lt = [
  ot
], st = ["xmlns", "viewBox", "stroke"], at = { id: "vueUiSmiley0" }, it = ["stop-color"], nt = ["stop-color"], rt = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), dt = ["fill"], ut = ["viewBox", "stroke"], vt = /* @__PURE__ */ _('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-3e41118a></path>', 5), pt = [
  vt
], yt = ["xmlns", "stroke"], ct = { id: "vueUiSmiley1" }, ft = ["stop-color"], ht = ["stop-color"], kt = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), xt = ["fill"], gt = ["xmlns", "stroke"], mt = /* @__PURE__ */ _('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9 15l6 0" data-v-3e41118a></path>', 5), _t = [
  mt
], $t = ["xmlns", "viewBox", "stroke"], bt = { id: "vueUiSmiley1" }, wt = ["stop-color"], zt = ["stop-color"], Mt = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), St = ["fill"], Rt = ["viewBox", "stroke"], Bt = /* @__PURE__ */ _('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9 15l6 0" data-v-3e41118a></path>', 5), Ct = [
  Bt
], jt = ["xmlns", "stroke"], Ht = { id: "vueUiSmiley2" }, Ut = ["stop-color"], Gt = ["stop-color"], Nt = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), Xt = ["fill"], At = ["xmlns", "stroke"], Vt = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), Yt = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }, null, -1)), Ft = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", { d: "M9 10l.01 0" }, null, -1)), It = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", { d: "M15 10l.01 0" }, null, -1)), Kt = [
  Vt,
  Yt,
  Ft,
  It
], Et = ["xmlns", "viewBox", "stroke"], Ot = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), Dt = { id: "vueUiSmiley2" }, Lt = ["stop-color"], Tt = ["stop-color"], Pt = ["fill"], qt = ["xmlns", "viewBox", "stroke"], Jt = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), Qt = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }, null, -1)), Wt = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", { d: "M9 10l.01 0" }, null, -1)), Zt = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", { d: "M15 10l.01 0" }, null, -1)), te = [
  Jt,
  Qt,
  Wt,
  Zt
], ee = ["xmlns", "stroke"], oe = { id: "vueUiSmiley3" }, le = ["stop-color"], se = ["stop-color"], ae = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), ie = ["fill"], ne = ["xmlns", "stroke"], re = /* @__PURE__ */ _('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-3e41118a></path>', 5), de = [
  re
], ue = ["xmlns", "viewBox", "stroke"], ve = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), pe = { id: "vueUiSmiley3" }, ye = ["stop-color"], ce = ["stop-color"], fe = ["fill"], he = ["xmlns", "viewBox", "stroke"], ke = /* @__PURE__ */ _('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-3e41118a></path>', 5), xe = [
  ke
], ge = ["xmlns", "stroke"], me = { id: "vueUiSmiley4" }, _e = ["stop-color"], $e = ["stop-color"], be = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), we = ["fill"], ze = ["xmlns", "stroke"], Me = /* @__PURE__ */ _('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 9l.01 0" data-v-3e41118a></path><path d="M15 9l.01 0" data-v-3e41118a></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-3e41118a></path>', 5), Se = [
  Me
], Re = ["xmlns", "viewBox", "stroke"], Be = /* @__PURE__ */ v(() => /* @__PURE__ */ e("path", {
  stroke: "none",
  d: "M0 0h24v24H0z",
  fill: "none"
}, null, -1)), Ce = { id: "vueUiSmiley4" }, je = ["stop-color"], He = ["stop-color"], Ue = ["fill"], Ge = ["xmlns", "viewBox", "stroke"], Ne = /* @__PURE__ */ _('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 9l.01 0" data-v-3e41118a></path><path d="M15 9l.01 0" data-v-3e41118a></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-3e41118a></path>', 5), Xe = [
  Ne
], Ae = {
  __name: "vue-ui-smiley",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  emits: ["rate"],
  setup($, { expose: H, emit: U }) {
    const h = $, { vue_ui_smiley: G } = E();
    F(() => {
      O(h.dataset) && D({
        componentName: "VueUiSmiley",
        type: "dataset"
      });
    });
    const B = S(!1), u = S(void 0), t = R(() => L({
      userConfig: h.config,
      defaultConfig: G
    })), N = R(() => typeof h.dataset.rating == "object" && !Array.isArray(h.dataset.rating) ? X(h.dataset.rating) : h.dataset.rating || null), b = R(() => typeof h.dataset.rating == "object" && !Array.isArray(h.dataset.rating)), p = S(N.value), y = S(t.value.readonly);
    function X(d) {
      if (d === null) return null;
      let o = 0, i = 0;
      for (const C in d) {
        const Y = parseInt(C), j = d[C];
        o += Y * j, i += j;
      }
      return i === 0 ? 0 : o / i;
    }
    function x(d) {
      const o = p.value - d, i = 24;
      switch (!0) {
        case o < 0:
          return 0;
        case o > 1:
          return 1 * i;
        default:
          return o * i;
      }
    }
    function g(d) {
      y.value || (p.value = d, U("rate", d));
    }
    function A() {
      return p.value;
    }
    function V(d = !0) {
      y.value = d;
    }
    H({
      getData: A,
      toggleReadonly: V
    });
    function f(d) {
      return t.value.readonly ? t.value.style.colors.inactive[d] : p.value === d + 1 ? t.value.style.icons.useGradient && t.value.style.icons.filled ? `url(#vueUiSmiley${d})` : t.value.style.colors.active[d] : u.value !== void 0 && u.value === d ? t.value.style.icons.useGradient && t.value.style.icons.filled ? `url(#vueUiSmiley${d})` : t.value.style.colors.active[d] : t.value.style.colors.inactive[d];
    }
    return (d, o) => (s(), a("div", {
      style: l(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%;`),
      onMouseover: o[20] || (o[20] = (i) => B.value = !0),
      onMouseleave: o[21] || (o[21] = (i) => {
        B.value = !1, u.value = void 0;
      })
    }, [
      t.value.style.title.text ? (s(), a("div", P, [
        e("div", {
          style: l(`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`)
        }, k(t.value.style.title.text), 5),
        t.value.style.title.subtitle.text ? (s(), a("div", {
          key: 0,
          style: l(`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"}`)
        }, k(t.value.style.title.subtitle.text), 5)) : r("", !0)
      ])) : r("", !0),
      t.value.style.rating.show && t.value.style.rating.position === "top" ? (s(), a("div", {
        key: 1,
        style: l(`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`)
      }, k(isNaN(p.value) ? "" : p.value.toFixed(t.value.style.rating.roundingValue)), 5)) : r("", !0),
      e("div", {
        class: "vue-ui-smiley-wrapper",
        style: l(`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(), a("div", {
          key: 0,
          style: l(`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`)
        }, k(isNaN(p.value) ? "" : p.value.toFixed(t.value.style.rating.roundingValue)), 5)) : r("", !0),
        e("div", {
          tabindex: "0",
          class: w({ "vue-ui-smiley-rated": !t.value.readonly && p.value === 1 }),
          style: l(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;
            position:relative`),
          onMouseenter: o[0] || (o[0] = (i) => u.value = 0),
          onMouseleave: o[1] || (o[1] = (i) => u.value = void 0),
          onClick: o[2] || (o[2] = (i) => g(1)),
          onKeyup: o[3] || (o[3] = z((i) => g(1), ["enter"]))
        }, [
          t.value.style.tooltip.show && b.value && y.value ? (s(), a("div", {
            key: 0,
            class: "vue-ui-rating-tooltip",
            style: l(`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:${u.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: l(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)
            }, [
              e("span", {
                style: l(`font-size:${t.value.style.tooltip.fontSize}px`)
              }, "1", 4),
              M(" : "),
              e("span", {
                style: l(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`)
              }, k(h.dataset.rating[1]), 5),
              e("div", {
                style: l(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)
              }, " ▼ ", 4)
            ], 4)
          ], 4)) : r("", !0),
          t.value.style.icons.filled ? (s(), a("svg", {
            key: 1,
            xmlns: n(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: f(0),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            e("defs", null, [
              e("radialGradient", J, [
                e("stop", {
                  offset: "0%",
                  "stop-color": n(m)(t.value.style.colors.active[0], 0.05)
                }, null, 8, Q),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.active[0]
                }, null, 8, W)
              ])
            ]),
            Z,
            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: f(0)
            }, null, 8, tt)
          ], 8, q)) : (s(), a("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: f(0),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, lt, 8, et)),
          t.value.style.icons.filled && y.value ? (s(), a("svg", {
            key: 3,
            xmlns: n(c),
            style: { transition: "all 0.1s ease-in-out", position: "absolute", top: "0", left: "0" },
            height: "100%",
            viewBox: `0 0 ${x(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", at, [
                e("stop", {
                  offset: "0%",
                  "stop-color": n(m)(t.value.style.colors.activeReadonly[0], 0.05)
                }, null, 8, it),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[0]
                }, null, 8, nt)
              ])
            ]),
            rt,
            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, dt)
          ], 8, st)) : r("", !0),
          !t.value.style.icons.filled && y.value ? (s(), a("svg", {
            key: 4,
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${x(0)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[0],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, pt, 8, ut)) : r("", !0)
        ], 38),
        e("div", {
          tabindex: "0",
          class: w({ "vue-ui-smiley-rated": !t.value.readonly && p.value === 2 }),
          style: l(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),
          onMouseenter: o[4] || (o[4] = (i) => u.value = 1),
          onMouseleave: o[5] || (o[5] = (i) => u.value = void 0),
          onClick: o[6] || (o[6] = (i) => g(2)),
          onKeyup: o[7] || (o[7] = z((i) => g(2), ["enter"]))
        }, [
          t.value.style.tooltip.show && b.value && y.value ? (s(), a("div", {
            key: 0,
            class: "vue-ui-rating-tooltip",
            style: l(`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:${u.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: l(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)
            }, [
              e("span", {
                style: l(`font-size:${t.value.style.tooltip.fontSize}px`)
              }, "2", 4),
              M(" : "),
              e("span", {
                style: l(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`)
              }, k(h.dataset.rating[2]), 5),
              e("div", {
                style: l(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)
              }, " ▼ ", 4)
            ], 4)
          ], 4)) : r("", !0),
          t.value.style.icons.filled ? (s(), a("svg", {
            key: 1,
            xmlns: n(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: f(1),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            e("defs", null, [
              e("radialGradient", ct, [
                e("stop", {
                  offset: "0%",
                  "stop-color": n(m)(t.value.style.colors.active[1], 0.05)
                }, null, 8, ft),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.active[1]
                }, null, 8, ht)
              ])
            ]),
            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-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: f(1)
            }, null, 8, xt)
          ], 8, yt)) : (s(), a("svg", {
            key: 2,
            xmlns: n(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: f(1),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, _t, 8, gt)),
          t.value.style.icons.filled && y.value ? (s(), a("svg", {
            key: 3,
            xmlns: n(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${x(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": n(m)(t.value.style.colors.activeReadonly[1], 0.05)
                }, null, 8, wt),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[1]
                }, null, 8, zt)
              ])
            ]),
            Mt,
            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, St)
          ], 8, $t)) : r("", !0),
          !t.value.style.icons.filled && y.value ? (s(), a("svg", {
            key: 4,
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${x(1)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[1],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, Ct, 8, Rt)) : r("", !0)
        ], 38),
        e("div", {
          tabindex: "0",
          class: w({ "vue-ui-smiley-rated": !t.value.readonly && p.value === 3 }),
          style: l(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),
          onMouseenter: o[8] || (o[8] = (i) => u.value = 2),
          onMouseleave: o[9] || (o[9] = (i) => u.value = void 0),
          onClick: o[10] || (o[10] = (i) => g(3)),
          onKeyup: o[11] || (o[11] = z((i) => g(3), ["enter"]))
        }, [
          t.value.style.tooltip.show && b.value && y.value ? (s(), a("div", {
            key: 0,
            class: "vue-ui-rating-tooltip",
            style: l(`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:${u.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: l(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)
            }, [
              e("span", {
                style: l(`font-size:${t.value.style.tooltip.fontSize}px`)
              }, "3", 4),
              M(" : "),
              e("span", {
                style: l(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`)
              }, k(h.dataset.rating[3]), 5),
              e("div", {
                style: l(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)
              }, " ▼ ", 4)
            ], 4)
          ], 4)) : r("", !0),
          t.value.style.icons.filled ? (s(), a("svg", {
            key: 1,
            xmlns: n(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: f(2),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            e("defs", null, [
              e("radialGradient", Ht, [
                e("stop", {
                  offset: "0%",
                  "stop-color": n(m)(t.value.style.colors.activeReadonly[2], 0.05)
                }, null, 8, Ut),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[2]
                }, null, 8, Gt)
              ])
            ]),
            Nt,
            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: f(2)
            }, null, 8, Xt)
          ], 8, jt)) : (s(), a("svg", {
            key: 2,
            xmlns: n(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: f(2),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, Kt, 8, At)),
          t.value.style.icons.filled && y.value ? (s(), a("svg", {
            key: 3,
            xmlns: n(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${x(2)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[2],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            Ot,
            e("defs", null, [
              e("radialGradient", Dt, [
                e("stop", {
                  offset: "0%",
                  "stop-color": n(m)(t.value.style.colors.activeReadonly[2], 0.05)
                }, null, 8, Lt),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[2]
                }, null, 8, Tt)
              ])
            ]),
            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, Pt)
          ], 8, Et)) : r("", !0),
          !t.value.style.icons.filled && y.value ? (s(), a("svg", {
            key: 4,
            xmlns: n(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${x(2)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[2],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, te, 8, qt)) : r("", !0)
        ], 38),
        e("div", {
          tabindex: "0",
          class: w({ "vue-ui-smiley-rated": !t.value.readonly && p.value === 4 }),
          style: l(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),
          onMouseenter: o[12] || (o[12] = (i) => u.value = 3),
          onMouseleave: o[13] || (o[13] = (i) => u.value = void 0),
          onClick: o[14] || (o[14] = (i) => g(4)),
          onKeyup: o[15] || (o[15] = z((i) => g(4), ["enter"]))
        }, [
          t.value.style.tooltip.show && b.value && y.value ? (s(), a("div", {
            key: 0,
            class: "vue-ui-rating-tooltip",
            style: l(`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:${u.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: l(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)
            }, [
              e("span", {
                style: l(`font-size:${t.value.style.tooltip.fontSize}px`)
              }, "4", 4),
              M(" : "),
              e("span", {
                style: l(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`)
              }, k(h.dataset.rating[4]), 5),
              e("div", {
                style: l(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)
              }, " ▼ ", 4)
            ], 4)
          ], 4)) : r("", !0),
          t.value.style.icons.filled ? (s(), a("svg", {
            key: 1,
            xmlns: n(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: f(3),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            e("defs", null, [
              e("radialGradient", oe, [
                e("stop", {
                  offset: "0%",
                  "stop-color": n(m)(t.value.style.colors.activeReadonly[3], 0.95)
                }, null, 8, le),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[3]
                }, null, 8, se)
              ])
            ]),
            ae,
            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: f(3)
            }, null, 8, ie)
          ], 8, ee)) : (s(), a("svg", {
            key: 2,
            xmlns: n(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: f(3),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, de, 8, ne)),
          t.value.style.icons.filled && y.value ? (s(), a("svg", {
            key: 3,
            xmlns: n(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${x(3)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[3],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            ve,
            e("defs", null, [
              e("radialGradient", pe, [
                e("stop", {
                  offset: "0%",
                  "stop-color": n(m)(t.value.style.colors.activeReadonly[3], 0.95)
                }, null, 8, ye),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[3]
                }, null, 8, ce)
              ])
            ]),
            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, fe)
          ], 8, ue)) : r("", !0),
          !t.value.style.icons.filled && y.value ? (s(), a("svg", {
            key: 4,
            xmlns: n(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${x(3)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[3],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, xe, 8, he)) : r("", !0)
        ], 38),
        e("div", {
          tabindex: "0",
          class: w({ "vue-ui-smiley-rated": !t.value.readonly && p.value === 5 }),
          style: l(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),
          onMouseenter: o[16] || (o[16] = (i) => u.value = 4),
          onMouseleave: o[17] || (o[17] = (i) => u.value = void 0),
          onClick: o[18] || (o[18] = (i) => g(5)),
          onKeyup: o[19] || (o[19] = z((i) => g(5), ["enter"]))
        }, [
          t.value.style.tooltip.show && b.value && y.value ? (s(), a("div", {
            key: 0,
            class: "vue-ui-rating-tooltip",
            style: l(`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:${u.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: l(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)
            }, [
              e("span", {
                style: l(`font-size:${t.value.style.tooltip.fontSize}px`)
              }, "5", 4),
              M(" : "),
              e("span", {
                style: l(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`)
              }, k(h.dataset.rating[5]), 5),
              e("div", {
                style: l(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)
              }, " ▼ ", 4)
            ], 4)
          ], 4)) : r("", !0),
          t.value.style.icons.filled ? (s(), a("svg", {
            key: 1,
            xmlns: n(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: f(4),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            e("defs", null, [
              e("radialGradient", me, [
                e("stop", {
                  offset: "0%",
                  "stop-color": n(m)(t.value.style.colors.activeReadonly[4], 0.9)
                }, null, 8, _e),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[4]
                }, null, 8, $e)
              ])
            ]),
            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: f(4)
            }, null, 8, we)
          ], 8, ge)) : (s(), a("svg", {
            key: 2,
            xmlns: n(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: f(4),
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, Se, 8, ze)),
          t.value.style.icons.filled && y.value ? (s(), a("svg", {
            key: 3,
            xmlns: n(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${x(4)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[4],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, [
            Be,
            e("defs", null, [
              e("radialGradient", Ce, [
                e("stop", {
                  offset: "0%",
                  "stop-color": n(m)(t.value.style.colors.activeReadonly[4], 0.9)
                }, null, 8, je),
                e("stop", {
                  offset: "100%",
                  "stop-color": t.value.style.colors.activeReadonly[4]
                }, null, 8, He)
              ])
            ]),
            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, Ue)
          ], 8, Re)) : r("", !0),
          !t.value.style.icons.filled && y.value ? (s(), a("svg", {
            key: 4,
            xmlns: n(c),
            style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" },
            height: "100%",
            viewBox: `0 0 ${x(4)} 24`,
            "stroke-width": "1.5",
            stroke: t.value.style.colors.activeReadonly[4],
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, Xe, 8, Ge)) : r("", !0)
        ], 38),
        t.value.style.rating.show && t.value.style.rating.position === "right" ? (s(), a("div", {
          key: 1,
          style: l(`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`)
        }, k(isNaN(p.value) ? "" : p.value.toFixed(t.value.style.rating.roundingValue)), 5)) : r("", !0)
      ], 4),
      t.value.style.rating.show && t.value.style.rating.position === "bottom" ? (s(), a("div", {
        key: 2,
        style: l(`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`)
      }, k(isNaN(p.value) ? "" : p.value.toFixed(t.value.style.rating.roundingValue)), 5)) : r("", !0)
    ], 36));
  }
}, Ee = /* @__PURE__ */ T(Ae, [["__scopeId", "data-v-3e41118a"]]);
export {
  Ee as default
};
