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