import { pushScopeId as ot, popScopeId as it, defineComponent as H, nextTick as wt, openBlock as C, createBlock as ze, createElementBlock as M, normalizeClass as He, renderSlot as ie, normalizeProps as vt, guardReactiveProps as yt, withScopeId as _t, resolveComponent as ne, normalizeStyle as ye, withKeys as xe, createElementVNode as $, Fragment as nt, createCommentVNode as Te, withCtx as se, createVNode as Ce, ref as _e, watch as $t, unref as $e, createTextVNode as bt, toDisplayString as Ie, withDirectives as Pt, vModelText as xt, renderList as Tt } from "vue";
import { useUser as Ct, SEA as St, setPetname as Ot } from "./composables-5f691338.js";
import { _export_sfc as Nt } from "./_plugin-vue_export-helper-6a641814.js";
function k(e) {
  return e.split("-")[0];
}
function G(e) {
  return e.split("-")[1];
}
function ee(e) {
  return ["top", "bottom"].includes(k(e)) ? "x" : "y";
}
function De(e) {
  return e === "y" ? "height" : "width";
}
function Fe(e) {
  let {
    reference: t,
    floating: o,
    placement: i
  } = e;
  const n = t.x + t.width / 2 - o.width / 2, r = t.y + t.height / 2 - o.height / 2;
  let a;
  switch (k(i)) {
    case "top":
      a = {
        x: n,
        y: t.y - o.height
      };
      break;
    case "bottom":
      a = {
        x: n,
        y: t.y + t.height
      };
      break;
    case "right":
      a = {
        x: t.x + t.width,
        y: r
      };
      break;
    case "left":
      a = {
        x: t.x - o.width,
        y: r
      };
      break;
    default:
      a = {
        x: t.x,
        y: t.y
      };
  }
  const s = ee(i), l = De(s);
  switch (G(i)) {
    case "start":
      a[s] = a[s] - (t[l] / 2 - o[l] / 2);
      break;
    case "end":
      a[s] = a[s] + (t[l] / 2 - o[l] / 2);
      break;
  }
  return a;
}
const kt = async (e, t, o) => {
  const {
    placement: i = "bottom",
    strategy: n = "absolute",
    middleware: r = [],
    platform: a
  } = o;
  if (process.env.NODE_ENV !== "production" && (a == null && console.error(["Floating UI: `platform` property was not passed to config. If you", "want to use Floating UI on the web, install @floating-ui/dom", "instead of the /core package. Otherwise, you can create your own", "`platform`: https://floating-ui.com/docs/platform"].join(" ")), r.filter((h) => {
    let {
      name: m
    } = h;
    return m === "autoPlacement" || m === "flip";
  }).length > 1))
    throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement`", "middleware detected. This will lead to an infinite loop. Ensure only", "one of either has been passed to the `middleware` array."].join(" "));
  let s = await a.getElementRects({
    reference: e,
    floating: t,
    strategy: n
  }), {
    x: l,
    y: d
  } = Fe({
    ...s,
    placement: i
  }), p = i, u = {}, f = 0;
  for (let h = 0; h < r.length; h++) {
    if (process.env.NODE_ENV !== "production" && (f++, f > 100))
      throw new Error(["Floating UI: The middleware lifecycle appears to be", "running in an infinite loop. This is usually caused by a `reset`", "continually being returned without a break condition."].join(" "));
    const {
      name: m,
      fn: _
    } = r[h], {
      x: w,
      y: g,
      data: y,
      reset: v
    } = await _({
      x: l,
      y: d,
      initialPlacement: i,
      placement: p,
      strategy: n,
      middlewareData: u,
      rects: s,
      platform: a,
      elements: {
        reference: e,
        floating: t
      }
    });
    if (l = w ?? l, d = g ?? d, u = {
      ...u,
      [m]: y ?? {}
    }, v) {
      typeof v == "object" && (v.placement && (p = v.placement), v.rects && (s = v.rects === !0 ? await a.getElementRects({
        reference: e,
        floating: t,
        strategy: n
      }) : v.rects), {
        x: l,
        y: d
      } = Fe({
        ...s,
        placement: p
      })), h = -1;
      continue;
    }
  }
  return {
    x: l,
    y: d,
    placement: p,
    strategy: n,
    middlewareData: u
  };
};
function At(e) {
  return {
    top: 0,
    right: 0,
    bottom: 0,
    left: 0,
    ...e
  };
}
function st(e) {
  return typeof e != "number" ? At(e) : {
    top: e,
    right: e,
    bottom: e,
    left: e
  };
}
function Se(e) {
  return {
    ...e,
    top: e.y,
    left: e.x,
    right: e.x + e.width,
    bottom: e.y + e.height
  };
}
async function ce(e, t) {
  t === void 0 && (t = {});
  const {
    x: o,
    y: i,
    platform: n,
    rects: r,
    elements: a,
    strategy: s
  } = e, {
    boundary: l = "clippingParents",
    rootBoundary: d = "viewport",
    elementContext: p = "floating",
    altBoundary: u = !1,
    padding: f = 0
  } = t, h = st(f), _ = a[u ? p === "floating" ? "reference" : "floating" : p], w = await n.getClippingClientRect({
    element: await n.isElement(_) ? _ : _.contextElement || await n.getDocumentElement({
      element: a.floating
    }),
    boundary: l,
    rootBoundary: d
  }), g = Se(await n.convertOffsetParentRelativeRectToViewportRelativeRect({
    rect: p === "floating" ? {
      ...r.floating,
      x: o,
      y: i
    } : r.reference,
    offsetParent: await n.getOffsetParent({
      element: a.floating
    }),
    strategy: s
  }));
  return {
    top: w.top - g.top + h.top,
    bottom: g.bottom - w.bottom + h.bottom,
    left: w.left - g.left + h.left,
    right: g.right - w.right + h.right
  };
}
const Et = Math.min, L = Math.max;
function Oe(e, t, o) {
  return L(e, Et(t, o));
}
const zt = (e) => ({
  name: "arrow",
  options: e,
  async fn(t) {
    const {
      element: o,
      padding: i = 0
    } = e ?? {}, {
      x: n,
      y: r,
      placement: a,
      rects: s,
      platform: l
    } = t;
    if (o == null)
      return process.env.NODE_ENV !== "production" && console.warn("Floating UI: No `element` was passed to the `arrow` middleware."), {};
    const d = st(i), p = {
      x: n,
      y: r
    }, u = k(a), f = ee(u), h = De(f), m = await l.getDimensions({
      element: o
    }), _ = f === "y" ? "top" : "left", w = f === "y" ? "bottom" : "right", g = s.reference[h] + s.reference[f] - p[f] - s.floating[h], y = p[f] - s.reference[f], v = await l.getOffsetParent({
      element: o
    }), b = v ? f === "y" ? v.clientHeight || 0 : v.clientWidth || 0 : 0, F = g / 2 - y / 2, W = d[_], j = b - m[h] - d[w], P = b / 2 - m[h] / 2 + F, T = Oe(W, P, j);
    return {
      data: {
        [f]: T,
        centerOffset: P - T
      }
    };
  }
}), Ht = {
  left: "right",
  right: "left",
  bottom: "top",
  top: "bottom"
};
function re(e) {
  return e.replace(/left|right|bottom|top/g, (t) => Ht[t]);
}
function rt(e, t) {
  const o = G(e) === "start", i = ee(e), n = De(i);
  let r = i === "x" ? o ? "right" : "left" : o ? "bottom" : "top";
  return t.reference[n] > t.floating[n] && (r = re(r)), {
    main: r,
    cross: re(r)
  };
}
const Dt = {
  start: "end",
  end: "start"
};
function Ne(e) {
  return e.replace(/start|end/g, (t) => Dt[t]);
}
const Rt = ["top", "right", "bottom", "left"], Bt = /* @__PURE__ */ Rt.reduce((e, t) => e.concat(t, t + "-start", t + "-end"), []);
function Lt(e, t, o) {
  return (e ? [...o.filter((n) => G(n) === e), ...o.filter((n) => G(n) !== e)] : o.filter((n) => k(n) === n)).filter((n) => e ? G(n) === e || (t ? Ne(n) !== n : !1) : !0);
}
const Mt = function(e) {
  return e === void 0 && (e = {}), {
    name: "autoPlacement",
    options: e,
    async fn(t) {
      var o, i, n, r, a, s;
      const {
        x: l,
        y: d,
        rects: p,
        middlewareData: u,
        placement: f
      } = t, {
        alignment: h = null,
        allowedPlacements: m = Bt,
        autoAlignment: _ = !0,
        ...w
      } = e;
      if ((o = u.autoPlacement) != null && o.skip)
        return {};
      const g = Lt(h, _, m), y = await ce(t, w), v = (i = (n = u.autoPlacement) == null ? void 0 : n.index) != null ? i : 0, b = g[v], {
        main: F,
        cross: W
      } = rt(b, p);
      if (f !== b)
        return {
          x: l,
          y: d,
          reset: {
            placement: g[0]
          }
        };
      const j = [y[k(b)], y[F], y[W]], P = [...(r = (a = u.autoPlacement) == null ? void 0 : a.overflows) != null ? r : [], {
        placement: b,
        overflows: j
      }], T = g[v + 1];
      if (T)
        return {
          data: {
            index: v + 1,
            overflows: P
          },
          reset: {
            placement: T
          }
        };
      const V = P.slice().sort((Y, K) => Y.overflows[0] - K.overflows[0]), X = (s = V.find((Y) => {
        let {
          overflows: K
        } = Y;
        return K.every((S) => S <= 0);
      })) == null ? void 0 : s.placement;
      return {
        data: {
          skip: !0
        },
        reset: {
          placement: X ?? V[0].placement
        }
      };
    }
  };
};
function It(e) {
  const t = re(e);
  return [Ne(e), t, Ne(t)];
}
const Ft = function(e) {
  return e === void 0 && (e = {}), {
    name: "flip",
    options: e,
    async fn(t) {
      var o, i;
      const {
        placement: n,
        middlewareData: r,
        rects: a,
        initialPlacement: s
      } = t;
      if ((o = r.flip) != null && o.skip)
        return {};
      const {
        mainAxis: l = !0,
        crossAxis: d = !0,
        fallbackPlacements: p,
        fallbackStrategy: u = "bestFit",
        flipAlignment: f = !0,
        ...h
      } = e, m = k(n), w = p || (m === s || !f ? [re(s)] : It(s)), g = [s, ...w], y = await ce(t, h), v = [];
      let b = ((i = r.flip) == null ? void 0 : i.overflows) || [];
      if (l && v.push(y[m]), d) {
        const {
          main: P,
          cross: T
        } = rt(n, a);
        v.push(y[P], y[T]);
      }
      if (b = [...b, {
        placement: n,
        overflows: v
      }], !v.every((P) => P <= 0)) {
        var F, W;
        const P = ((F = (W = r.flip) == null ? void 0 : W.index) != null ? F : 0) + 1, T = g[P];
        if (T)
          return {
            data: {
              index: P,
              overflows: b
            },
            reset: {
              placement: T
            }
          };
        let V = "bottom";
        switch (u) {
          case "bestFit": {
            var j;
            const X = (j = b.slice().sort((Y, K) => Y.overflows.filter((S) => S > 0).reduce((S, ve) => S + ve, 0) - K.overflows.filter((S) => S > 0).reduce((S, ve) => S + ve, 0))[0]) == null ? void 0 : j.placement;
            X && (V = X);
            break;
          }
          case "initialPlacement":
            V = s;
            break;
        }
        return {
          data: {
            skip: !0
          },
          reset: {
            placement: V
          }
        };
      }
      return {};
    }
  };
};
function Wt(e) {
  let {
    placement: t,
    rects: o,
    value: i
  } = e;
  const n = k(t), r = ["left", "top"].includes(n) ? -1 : 1, a = typeof i == "function" ? i({
    ...o,
    placement: t
  }) : i, {
    mainAxis: s,
    crossAxis: l
  } = typeof a == "number" ? {
    mainAxis: a,
    crossAxis: 0
  } : {
    mainAxis: 0,
    crossAxis: 0,
    ...a
  };
  return ee(n) === "x" ? {
    x: l,
    y: s * r
  } : {
    x: s * r,
    y: l
  };
}
const jt = function(e) {
  return e === void 0 && (e = 0), {
    name: "offset",
    options: e,
    fn(t) {
      const {
        x: o,
        y: i,
        placement: n,
        rects: r
      } = t, a = Wt({
        placement: n,
        rects: r,
        value: e
      });
      return {
        x: o + a.x,
        y: i + a.y,
        data: a
      };
    }
  };
};
function Vt(e) {
  return e === "x" ? "y" : "x";
}
const Gt = function(e) {
  return e === void 0 && (e = {}), {
    name: "shift",
    options: e,
    async fn(t) {
      const {
        x: o,
        y: i,
        placement: n
      } = t, {
        mainAxis: r = !0,
        crossAxis: a = !1,
        limiter: s = {
          fn: (w) => {
            let {
              x: g,
              y
            } = w;
            return {
              x: g,
              y
            };
          }
        },
        ...l
      } = e, d = {
        x: o,
        y: i
      }, p = await ce(t, l), u = ee(k(n)), f = Vt(u);
      let h = d[u], m = d[f];
      if (r) {
        const w = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", y = h + p[w], v = h - p[g];
        h = Oe(y, h, v);
      }
      if (a) {
        const w = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", y = m + p[w], v = m - p[g];
        m = Oe(y, m, v);
      }
      const _ = s.fn({
        ...t,
        [u]: h,
        [f]: m
      });
      return {
        ..._,
        data: {
          x: _.x - o,
          y: _.y - i
        }
      };
    }
  };
}, qt = function(e) {
  return e === void 0 && (e = {}), {
    name: "size",
    options: e,
    async fn(t) {
      var o;
      const {
        placement: i,
        rects: n,
        middlewareData: r
      } = t, {
        apply: a,
        ...s
      } = e;
      if ((o = r.size) != null && o.skip)
        return {};
      const l = await ce(t, s), d = k(i), p = G(i) === "end";
      let u, f;
      d === "top" || d === "bottom" ? (u = d, f = p ? "left" : "right") : (f = d, u = p ? "top" : "bottom");
      const h = L(l.left, 0), m = L(l.right, 0), _ = L(l.top, 0), w = L(l.bottom, 0), g = {
        height: n.floating.height - (["left", "right"].includes(i) ? 2 * (_ !== 0 || w !== 0 ? _ + w : L(l.top, l.bottom)) : l[u]),
        width: n.floating.width - (["top", "bottom"].includes(i) ? 2 * (h !== 0 || m !== 0 ? h + m : L(l.left, l.right)) : l[f])
      };
      return a == null || a({
        ...g,
        ...n
      }), {
        data: {
          skip: !0
        },
        reset: {
          rects: !0
        }
      };
    }
  };
};
function Re(e) {
  return (e == null ? void 0 : e.toString()) === "[object Window]";
}
function D(e) {
  if (e == null)
    return window;
  if (!Re(e)) {
    const t = e.ownerDocument;
    return t && t.defaultView || window;
  }
  return e;
}
function he(e) {
  return D(e).getComputedStyle(e);
}
function O(e) {
  return Re(e) ? "" : e ? (e.nodeName || "").toLowerCase() : "";
}
function N(e) {
  return e instanceof D(e).HTMLElement;
}
function ae(e) {
  return e instanceof D(e).Element;
}
function Ut(e) {
  return e instanceof D(e).Node;
}
function at(e) {
  const t = D(e).ShadowRoot;
  return e instanceof t || e instanceof ShadowRoot;
}
function ue(e) {
  const {
    overflow: t,
    overflowX: o,
    overflowY: i
  } = he(e);
  return /auto|scroll|overlay|hidden/.test(t + i + o);
}
function Xt(e) {
  return ["table", "td", "th"].includes(O(e));
}
function lt(e) {
  const t = navigator.userAgent.toLowerCase().includes("firefox"), o = he(e);
  return o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].includes(o.willChange) || t && o.willChange === "filter" || t && (o.filter ? o.filter !== "none" : !1);
}
const We = Math.min, J = Math.max, le = Math.round;
function q(e, t) {
  t === void 0 && (t = !1);
  const o = e.getBoundingClientRect();
  let i = 1, n = 1;
  return t && N(e) && (i = e.offsetWidth > 0 && le(o.width) / e.offsetWidth || 1, n = e.offsetHeight > 0 && le(o.height) / e.offsetHeight || 1), {
    width: o.width / i,
    height: o.height / n,
    top: o.top / n,
    right: o.right / i,
    bottom: o.bottom / n,
    left: o.left / i,
    x: o.left / i,
    y: o.top / n
  };
}
function R(e) {
  return ((Ut(e) ? e.ownerDocument : e.document) || window.document).documentElement;
}
function fe(e) {
  return Re(e) ? {
    scrollLeft: e.pageXOffset,
    scrollTop: e.pageYOffset
  } : {
    scrollLeft: e.scrollLeft,
    scrollTop: e.scrollTop
  };
}
function pt(e) {
  return q(R(e)).left + fe(e).scrollLeft;
}
function Yt(e) {
  const t = q(e);
  return le(t.width) !== e.offsetWidth || le(t.height) !== e.offsetHeight;
}
function Kt(e, t, o) {
  const i = N(t), n = R(t), r = q(e, i && Yt(t));
  let a = {
    scrollLeft: 0,
    scrollTop: 0
  };
  const s = {
    x: 0,
    y: 0
  };
  if (i || !i && o !== "fixed")
    if ((O(t) !== "body" || ue(n)) && (a = fe(t)), N(t)) {
      const l = q(t, !0);
      s.x = l.x + t.clientLeft, s.y = l.y + t.clientTop;
    } else
      n && (s.x = pt(n));
  return {
    x: r.left + a.scrollLeft - s.x,
    y: r.top + a.scrollTop - s.y,
    width: r.width,
    height: r.height
  };
}
function me(e) {
  return O(e) === "html" ? e : (
    // this is a quicker (but less type safe) way to save quite some bytes from the bundle
    // @ts-ignore
    e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
    e.parentNode || // DOM Element detected
    (at(e) ? e.host : null) || // ShadowRoot detected
    R(e)
  );
}
function je(e) {
  return !N(e) || getComputedStyle(e).position === "fixed" ? null : e.offsetParent;
}
function Jt(e) {
  let t = me(e);
  for (; N(t) && !["html", "body"].includes(O(t)); ) {
    if (lt(t))
      return t;
    t = t.parentNode;
  }
  return null;
}
function ke(e) {
  const t = D(e);
  let o = je(e);
  for (; o && Xt(o) && getComputedStyle(o).position === "static"; )
    o = je(o);
  return o && (O(o) === "html" || O(o) === "body" && getComputedStyle(o).position === "static" && !lt(o)) ? t : o || Jt(e) || t;
}
function Ve(e) {
  return {
    width: e.offsetWidth,
    height: e.offsetHeight
  };
}
function Qt(e) {
  let {
    rect: t,
    offsetParent: o,
    strategy: i
  } = e;
  const n = N(o), r = R(o);
  if (o === r)
    return t;
  let a = {
    scrollLeft: 0,
    scrollTop: 0
  };
  const s = {
    x: 0,
    y: 0
  };
  if ((n || !n && i !== "fixed") && ((O(o) !== "body" || ue(r)) && (a = fe(o)), N(o))) {
    const l = q(o, !0);
    s.x = l.x + o.clientLeft, s.y = l.y + o.clientTop;
  }
  return {
    ...t,
    x: t.x - a.scrollLeft + s.x,
    y: t.y - a.scrollTop + s.y
  };
}
function Zt(e) {
  const t = D(e), o = R(e), i = t.visualViewport;
  let n = o.clientWidth, r = o.clientHeight, a = 0, s = 0;
  return i && (n = i.width, r = i.height, Math.abs(t.innerWidth / i.scale - i.width) < 0.01 && (a = i.offsetLeft, s = i.offsetTop)), {
    width: n,
    height: r,
    x: a,
    y: s
  };
}
function eo(e) {
  var t;
  const o = R(e), i = fe(e), n = (t = e.ownerDocument) == null ? void 0 : t.body, r = J(o.scrollWidth, o.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), a = J(o.scrollHeight, o.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0);
  let s = -i.scrollLeft + pt(e);
  const l = -i.scrollTop;
  return he(n || o).direction === "rtl" && (s += J(o.clientWidth, n ? n.clientWidth : 0) - r), {
    width: r,
    height: a,
    x: s,
    y: l
  };
}
function dt(e) {
  return ["html", "body", "#document"].includes(O(e)) ? e.ownerDocument.body : N(e) && ue(e) ? e : dt(me(e));
}
function pe(e, t) {
  var o;
  t === void 0 && (t = []);
  const i = dt(e), n = i === ((o = e.ownerDocument) == null ? void 0 : o.body), r = D(i), a = n ? [r].concat(r.visualViewport || [], ue(i) ? i : []) : i, s = t.concat(a);
  return n ? s : (
    // @ts-ignore: isBody tells us target will be an HTMLElement here
    s.concat(pe(me(a)))
  );
}
function to(e, t) {
  const o = t.getRootNode == null ? void 0 : t.getRootNode();
  if (e.contains(t))
    return !0;
  if (o && at(o)) {
    let i = t;
    do {
      if (i && e === i)
        return !0;
      i = i.parentNode || i.host;
    } while (i);
  }
  return !1;
}
function oo(e) {
  const t = q(e), o = t.top + e.clientTop, i = t.left + e.clientLeft;
  return {
    top: o,
    left: i,
    x: i,
    y: o,
    right: i + e.clientWidth,
    bottom: o + e.clientHeight,
    width: e.clientWidth,
    height: e.clientHeight
  };
}
function Ge(e, t) {
  return t === "viewport" ? Se(Zt(e)) : ae(t) ? oo(t) : Se(eo(R(e)));
}
function io(e) {
  const t = pe(me(e)), i = ["absolute", "fixed"].includes(he(e).position) && N(e) ? ke(e) : e;
  return ae(i) ? t.filter((n) => ae(n) && to(n, i) && O(n) !== "body") : [];
}
function no(e) {
  let {
    element: t,
    boundary: o,
    rootBoundary: i
  } = e;
  const r = [...o === "clippingParents" ? io(t) : [].concat(o), i], a = r[0], s = r.reduce((l, d) => {
    const p = Ge(t, d);
    return l.top = J(p.top, l.top), l.right = We(p.right, l.right), l.bottom = We(p.bottom, l.bottom), l.left = J(p.left, l.left), l;
  }, Ge(t, a));
  return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
}
const so = {
  getElementRects: (e) => {
    let {
      reference: t,
      floating: o,
      strategy: i
    } = e;
    return {
      reference: Kt(t, ke(o), i),
      floating: {
        ...Ve(o),
        x: 0,
        y: 0
      }
    };
  },
  convertOffsetParentRelativeRectToViewportRelativeRect: (e) => Qt(e),
  getOffsetParent: (e) => {
    let {
      element: t
    } = e;
    return ke(t);
  },
  isElement: (e) => ae(e),
  getDocumentElement: (e) => {
    let {
      element: t
    } = e;
    return R(t);
  },
  getClippingClientRect: (e) => no(e),
  getDimensions: (e) => {
    let {
      element: t
    } = e;
    return Ve(t);
  },
  getClientRects: (e) => {
    let {
      element: t
    } = e;
    return t.getClientRects();
  }
}, ro = (e, t, o) => kt(e, t, {
  platform: so,
  ...o
});
var ao = Object.defineProperty, lo = Object.defineProperties, po = Object.getOwnPropertyDescriptors, qe = Object.getOwnPropertySymbols, co = Object.prototype.hasOwnProperty, ho = Object.prototype.propertyIsEnumerable, Ue = (e, t, o) => t in e ? ao(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, z = (e, t) => {
  for (var o in t || (t = {}))
    co.call(t, o) && Ue(e, o, t[o]);
  if (qe)
    for (var o of qe(t))
      ho.call(t, o) && Ue(e, o, t[o]);
  return e;
}, ge = (e, t) => lo(e, po(t));
const I = {
  disabled: !1,
  distance: 5,
  skidding: 0,
  container: "body",
  boundary: void 0,
  instantMove: !1,
  disposeTimeout: 5e3,
  popperTriggers: [],
  strategy: "absolute",
  preventOverflow: !0,
  flip: !0,
  shift: !0,
  overflowPadding: 0,
  arrowPadding: 0,
  arrowOverflow: !0,
  themes: {
    tooltip: {
      placement: "top",
      triggers: ["hover", "focus", "touch"],
      hideTriggers: (e) => [...e, "click"],
      delay: {
        show: 200,
        hide: 0
      },
      handleResize: !1,
      html: !1,
      loadingContent: "..."
    },
    dropdown: {
      placement: "bottom",
      triggers: ["click"],
      delay: 0,
      handleResize: !0,
      autoHide: !0
    },
    menu: {
      $extend: "dropdown",
      triggers: ["hover", "focus"],
      popperTriggers: ["hover", "focus"],
      delay: {
        show: 0,
        hide: 400
      }
    }
  }
};
function de(e, t) {
  let o = I.themes[e] || {}, i;
  do
    i = o[t], typeof i > "u" ? o.$extend ? o = I.themes[o.$extend] || {} : (o = null, i = I[t]) : o = null;
  while (o);
  return i;
}
function uo(e) {
  const t = [e];
  let o = I.themes[e] || {};
  do
    o.$extend && !o.$resetCss ? (t.push(o.$extend), o = I.themes[o.$extend] || {}) : o = null;
  while (o);
  return t.map((i) => `v-popper--theme-${i}`);
}
function Xe(e) {
  const t = [e];
  let o = I.themes[e] || {};
  do
    o.$extend ? (t.push(o.$extend), o = I.themes[o.$extend] || {}) : o = null;
  while (o);
  return t;
}
let U = !1;
if (typeof window < "u") {
  U = !1;
  try {
    const e = Object.defineProperty({}, "passive", {
      get() {
        U = !0;
      }
    });
    window.addEventListener("test", null, e);
  } catch {
  }
}
let ct = !1;
typeof window < "u" && typeof navigator < "u" && (ct = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream);
const fo = ["auto", "top", "bottom", "left", "right"].reduce((e, t) => e.concat([
  t,
  `${t}-start`,
  `${t}-end`
]), []), Ye = {
  hover: "mouseenter",
  focus: "focus",
  click: "click",
  touch: "touchstart"
}, Ke = {
  hover: "mouseleave",
  focus: "blur",
  click: "click",
  touch: "touchend"
};
function Je(e, t) {
  const o = e.indexOf(t);
  o !== -1 && e.splice(o, 1);
}
function be() {
  return new Promise((e) => requestAnimationFrame(() => {
    requestAnimationFrame(e);
  }));
}
const x = [];
let B = null;
const Qe = {};
function Ze(e) {
  let t = Qe[e];
  return t || (t = Qe[e] = []), t;
}
let Ae = function() {
};
typeof window < "u" && (Ae = window.Element);
function c(e) {
  return function(t) {
    return de(t.theme, e);
  };
}
const Pe = "__floating-vue__popper";
var ht = () => H({
  name: "VPopper",
  provide() {
    return {
      [Pe]: {
        parentPopper: this
      }
    };
  },
  inject: {
    [Pe]: { default: null }
  },
  props: {
    theme: {
      type: String,
      required: !0
    },
    targetNodes: {
      type: Function,
      required: !0
    },
    referenceNode: {
      type: Function,
      default: null
    },
    popperNode: {
      type: Function,
      required: !0
    },
    shown: {
      type: Boolean,
      default: !1
    },
    showGroup: {
      type: String,
      default: null
    },
    ariaId: {
      default: null
    },
    disabled: {
      type: Boolean,
      default: c("disabled")
    },
    positioningDisabled: {
      type: Boolean,
      default: c("positioningDisabled")
    },
    placement: {
      type: String,
      default: c("placement"),
      validator: (e) => fo.includes(e)
    },
    delay: {
      type: [String, Number, Object],
      default: c("delay")
    },
    distance: {
      type: [Number, String],
      default: c("distance")
    },
    skidding: {
      type: [Number, String],
      default: c("skidding")
    },
    triggers: {
      type: Array,
      default: c("triggers")
    },
    showTriggers: {
      type: [Array, Function],
      default: c("showTriggers")
    },
    hideTriggers: {
      type: [Array, Function],
      default: c("hideTriggers")
    },
    popperTriggers: {
      type: Array,
      default: c("popperTriggers")
    },
    popperShowTriggers: {
      type: [Array, Function],
      default: c("popperShowTriggers")
    },
    popperHideTriggers: {
      type: [Array, Function],
      default: c("popperHideTriggers")
    },
    container: {
      type: [String, Object, Ae, Boolean],
      default: c("container")
    },
    boundary: {
      type: [String, Ae],
      default: c("boundary")
    },
    strategy: {
      type: String,
      validator: (e) => ["absolute", "fixed"].includes(e),
      default: c("strategy")
    },
    autoHide: {
      type: [Boolean, Function],
      default: c("autoHide")
    },
    handleResize: {
      type: Boolean,
      default: c("handleResize")
    },
    instantMove: {
      type: Boolean,
      default: c("instantMove")
    },
    eagerMount: {
      type: Boolean,
      default: c("eagerMount")
    },
    popperClass: {
      type: [String, Array, Object],
      default: c("popperClass")
    },
    computeTransformOrigin: {
      type: Boolean,
      default: c("computeTransformOrigin")
    },
    autoMinSize: {
      type: Boolean,
      default: c("autoMinSize")
    },
    autoSize: {
      type: [Boolean, String],
      default: c("autoSize")
    },
    autoMaxSize: {
      type: Boolean,
      default: c("autoMaxSize")
    },
    autoBoundaryMaxSize: {
      type: Boolean,
      default: c("autoBoundaryMaxSize")
    },
    preventOverflow: {
      type: Boolean,
      default: c("preventOverflow")
    },
    overflowPadding: {
      type: [Number, String],
      default: c("overflowPadding")
    },
    arrowPadding: {
      type: [Number, String],
      default: c("arrowPadding")
    },
    arrowOverflow: {
      type: Boolean,
      default: c("arrowOverflow")
    },
    flip: {
      type: Boolean,
      default: c("flip")
    },
    shift: {
      type: Boolean,
      default: c("shift")
    },
    shiftCrossAxis: {
      type: Boolean,
      default: c("shiftCrossAxis")
    },
    noAutoFocus: {
      type: Boolean,
      default: c("noAutoFocus")
    }
  },
  emits: [
    "show",
    "hide",
    "update:shown",
    "apply-show",
    "apply-hide",
    "close-group",
    "close-directive",
    "auto-hide",
    "resize",
    "dispose"
  ],
  data() {
    return {
      isShown: !1,
      isMounted: !1,
      skipTransition: !1,
      classes: {
        showFrom: !1,
        showTo: !1,
        hideFrom: !1,
        hideTo: !0
      },
      result: {
        x: 0,
        y: 0,
        placement: "",
        strategy: this.strategy,
        arrow: {
          x: 0,
          y: 0,
          centerOffset: 0
        },
        transformOrigin: null
      },
      shownChildren: /* @__PURE__ */ new Set(),
      lastAutoHide: !0
    };
  },
  computed: {
    popperId() {
      return this.ariaId != null ? this.ariaId : this.randomId;
    },
    shouldMountContent() {
      return this.eagerMount || this.isMounted;
    },
    slotData() {
      return {
        popperId: this.popperId,
        isShown: this.isShown,
        shouldMountContent: this.shouldMountContent,
        skipTransition: this.skipTransition,
        autoHide: typeof this.autoHide == "function" ? this.lastAutoHide : this.autoHide,
        show: this.show,
        hide: this.hide,
        handleResize: this.handleResize,
        onResize: this.onResize,
        classes: ge(z({}, this.classes), {
          popperClass: this.popperClass
        }),
        result: this.positioningDisabled ? null : this.result,
        attrs: this.$attrs
      };
    },
    parentPopper() {
      var e;
      return (e = this[Pe]) == null ? void 0 : e.parentPopper;
    },
    hasPopperShowTriggerHover() {
      var e, t;
      return ((e = this.popperTriggers) == null ? void 0 : e.includes("hover")) || ((t = this.popperShowTriggers) == null ? void 0 : t.includes("hover"));
    }
  },
  watch: z(z({
    shown: "$_autoShowHide",
    disabled(e) {
      e ? this.dispose() : this.init();
    },
    async container() {
      this.isShown && (this.$_ensureTeleport(), await this.$_computePosition());
    }
  }, [
    "triggers",
    "positioningDisabled"
  ].reduce((e, t) => (e[t] = "$_refreshListeners", e), {})), [
    "placement",
    "distance",
    "skidding",
    "boundary",
    "strategy",
    "overflowPadding",
    "arrowPadding",
    "preventOverflow",
    "shift",
    "shiftCrossAxis",
    "flip"
  ].reduce((e, t) => (e[t] = "$_computePosition", e), {})),
  created() {
    this.$_isDisposed = !0, this.randomId = `popper_${[Math.random(), Date.now()].map((e) => e.toString(36).substring(2, 10)).join("_")}`, this.autoMinSize && console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'), this.autoMaxSize && console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.");
  },
  mounted() {
    this.init(), this.$_detachPopperNode();
  },
  activated() {
    this.$_autoShowHide();
  },
  deactivated() {
    this.hide();
  },
  beforeUnmount() {
    this.dispose();
  },
  methods: {
    show({ event: e = null, skipDelay: t = !1, force: o = !1 } = {}) {
      var i, n;
      (i = this.parentPopper) != null && i.lockedChild && this.parentPopper.lockedChild !== this || (this.$_pendingHide = !1, (o || !this.disabled) && (((n = this.parentPopper) == null ? void 0 : n.lockedChild) === this && (this.parentPopper.lockedChild = null), this.$_scheduleShow(e, t), this.$emit("show"), this.$_showFrameLocked = !0, requestAnimationFrame(() => {
        this.$_showFrameLocked = !1;
      })), this.$emit("update:shown", !0));
    },
    hide({ event: e = null, skipDelay: t = !1 } = {}) {
      var o;
      if (!this.$_hideInProgress) {
        if (this.shownChildren.size > 0) {
          this.$_pendingHide = !0;
          return;
        }
        if (this.hasPopperShowTriggerHover && this.$_isAimingPopper()) {
          this.parentPopper && (this.parentPopper.lockedChild = this, clearTimeout(this.parentPopper.lockedChildTimer), this.parentPopper.lockedChildTimer = setTimeout(() => {
            this.parentPopper.lockedChild === this && (this.parentPopper.lockedChild.hide({ skipDelay: t }), this.parentPopper.lockedChild = null);
          }, 1e3));
          return;
        }
        ((o = this.parentPopper) == null ? void 0 : o.lockedChild) === this && (this.parentPopper.lockedChild = null), this.$_pendingHide = !1, this.$_scheduleHide(e, t), this.$emit("hide"), this.$emit("update:shown", !1);
      }
    },
    init() {
      var e, t;
      this.$_isDisposed && (this.$_isDisposed = !1, this.isMounted = !1, this.$_events = [], this.$_preventShow = !1, this.$_referenceNode = (t = (e = this.referenceNode) == null ? void 0 : e.call(this)) != null ? t : this.$el, this.$_targetNodes = this.targetNodes().filter((o) => o.nodeType === o.ELEMENT_NODE), this.$_popperNode = this.popperNode(), this.$_innerNode = this.$_popperNode.querySelector(".v-popper__inner"), this.$_arrowNode = this.$_popperNode.querySelector(".v-popper__arrow-container"), this.$_swapTargetAttrs("title", "data-original-title"), this.$_detachPopperNode(), this.triggers.length && this.$_addEventListeners(), this.shown && this.show());
    },
    dispose() {
      this.$_isDisposed || (this.$_isDisposed = !0, this.$_removeEventListeners(), this.hide({ skipDelay: !0 }), this.$_detachPopperNode(), this.isMounted = !1, this.isShown = !1, this.$_updateParentShownChildren(!1), this.$_swapTargetAttrs("data-original-title", "title"), this.$emit("dispose"));
    },
    async onResize() {
      this.isShown && (await this.$_computePosition(), this.$emit("resize"));
    },
    async $_computePosition() {
      var e;
      if (this.$_isDisposed || this.positioningDisabled)
        return;
      const t = {
        strategy: this.strategy,
        middleware: []
      };
      (this.distance || this.skidding) && t.middleware.push(jt({
        mainAxis: this.distance,
        crossAxis: this.skidding
      }));
      const o = this.placement.startsWith("auto");
      if (o ? t.middleware.push(Mt({
        alignment: (e = this.placement.split("-")[1]) != null ? e : ""
      })) : t.placement = this.placement, this.preventOverflow && (this.shift && t.middleware.push(Gt({
        padding: this.overflowPadding,
        boundary: this.boundary,
        crossAxis: this.shiftCrossAxis
      })), !o && this.flip && t.middleware.push(Ft({
        padding: this.overflowPadding,
        boundary: this.boundary
      }))), t.middleware.push(zt({
        element: this.$_arrowNode,
        padding: this.arrowPadding
      })), this.arrowOverflow && t.middleware.push({
        name: "arrowOverflow",
        fn: ({ placement: n, rects: r, middlewareData: a }) => {
          let s;
          const { centerOffset: l } = a.arrow;
          return n.startsWith("top") || n.startsWith("bottom") ? s = Math.abs(l) > r.reference.width / 2 : s = Math.abs(l) > r.reference.height / 2, {
            data: {
              overflow: s
            }
          };
        }
      }), this.autoMinSize || this.autoSize) {
        const n = this.autoSize ? this.autoSize : this.autoMinSize ? "min" : null;
        t.middleware.push({
          name: "autoSize",
          fn: ({ rects: r, placement: a, middlewareData: s }) => {
            var l;
            if ((l = s.autoSize) != null && l.skip)
              return {};
            let d, p;
            return a.startsWith("top") || a.startsWith("bottom") ? d = r.reference.width : p = r.reference.height, this.$_innerNode.style[n === "min" ? "minWidth" : n === "max" ? "maxWidth" : "width"] = d != null ? `${d}px` : null, this.$_innerNode.style[n === "min" ? "minHeight" : n === "max" ? "maxHeight" : "height"] = p != null ? `${p}px` : null, {
              data: {
                skip: !0
              },
              reset: {
                rects: !0
              }
            };
          }
        });
      }
      (this.autoMaxSize || this.autoBoundaryMaxSize) && (this.$_innerNode.style.maxWidth = null, this.$_innerNode.style.maxHeight = null, t.middleware.push(qt({
        boundary: this.boundary,
        padding: this.overflowPadding,
        apply: ({ width: n, height: r }) => {
          this.$_innerNode.style.maxWidth = n != null ? `${n}px` : null, this.$_innerNode.style.maxHeight = r != null ? `${r}px` : null;
        }
      })));
      const i = await ro(this.$_referenceNode, this.$_popperNode, t);
      Object.assign(this.result, {
        x: i.x,
        y: i.y,
        placement: i.placement,
        strategy: i.strategy,
        arrow: z(z({}, i.middlewareData.arrow), i.middlewareData.arrowOverflow)
      });
    },
    $_scheduleShow(e = null, t = !1) {
      if (this.$_updateParentShownChildren(!0), this.$_hideInProgress = !1, clearTimeout(this.$_scheduleTimer), B && this.instantMove && B.instantMove && B !== this.parentPopper) {
        B.$_applyHide(!0), this.$_applyShow(!0);
        return;
      }
      t ? this.$_applyShow() : this.$_scheduleTimer = setTimeout(this.$_applyShow.bind(this), this.$_computeDelay("show"));
    },
    $_scheduleHide(e = null, t = !1) {
      if (this.shownChildren.size > 0) {
        this.$_pendingHide = !0;
        return;
      }
      this.$_updateParentShownChildren(!1), this.$_hideInProgress = !0, clearTimeout(this.$_scheduleTimer), this.isShown && (B = this), t ? this.$_applyHide() : this.$_scheduleTimer = setTimeout(this.$_applyHide.bind(this), this.$_computeDelay("hide"));
    },
    $_computeDelay(e) {
      const t = this.delay;
      return parseInt(t && t[e] || t || 0);
    },
    async $_applyShow(e = !1) {
      clearTimeout(this.$_disposeTimer), clearTimeout(this.$_scheduleTimer), this.skipTransition = e, !this.isShown && (this.$_ensureTeleport(), await be(), await this.$_computePosition(), await this.$_applyShowEffect(), this.positioningDisabled || this.$_registerEventListeners([
        ...pe(this.$_referenceNode),
        ...pe(this.$_popperNode)
      ], "scroll", () => {
        this.$_computePosition();
      }));
    },
    async $_applyShowEffect() {
      if (this.$_hideInProgress)
        return;
      if (this.computeTransformOrigin) {
        const t = this.$_referenceNode.getBoundingClientRect(), o = this.$_popperNode.querySelector(".v-popper__wrapper"), i = o.parentNode.getBoundingClientRect(), n = t.x + t.width / 2 - (i.left + o.offsetLeft), r = t.y + t.height / 2 - (i.top + o.offsetTop);
        this.result.transformOrigin = `${n}px ${r}px`;
      }
      this.isShown = !0, this.$_applyAttrsToTarget({
        "aria-describedby": this.popperId,
        "data-popper-shown": ""
      });
      const e = this.showGroup;
      if (e) {
        let t;
        for (let o = 0; o < x.length; o++)
          t = x[o], t.showGroup !== e && (t.hide(), t.$emit("close-group"));
      }
      x.push(this), document.body.classList.add("v-popper--some-open");
      for (const t of Xe(this.theme))
        Ze(t).push(this), document.body.classList.add(`v-popper--some-open--${t}`);
      this.$emit("apply-show"), this.classes.showFrom = !0, this.classes.showTo = !1, this.classes.hideFrom = !1, this.classes.hideTo = !1, await be(), this.classes.showFrom = !1, this.classes.showTo = !0, this.noAutoFocus || this.$_popperNode.focus();
    },
    async $_applyHide(e = !1) {
      if (this.shownChildren.size > 0) {
        this.$_pendingHide = !0, this.$_hideInProgress = !1;
        return;
      }
      if (clearTimeout(this.$_scheduleTimer), !this.isShown)
        return;
      this.skipTransition = e, Je(x, this), x.length === 0 && document.body.classList.remove("v-popper--some-open");
      for (const o of Xe(this.theme)) {
        const i = Ze(o);
        Je(i, this), i.length === 0 && document.body.classList.remove(`v-popper--some-open--${o}`);
      }
      B === this && (B = null), this.isShown = !1, this.$_applyAttrsToTarget({
        "aria-describedby": void 0,
        "data-popper-shown": void 0
      }), clearTimeout(this.$_disposeTimer);
      const t = de(this.theme, "disposeTimeout");
      t !== null && (this.$_disposeTimer = setTimeout(() => {
        this.$_popperNode && (this.$_detachPopperNode(), this.isMounted = !1);
      }, t)), this.$_removeEventListeners("scroll"), this.$emit("apply-hide"), this.classes.showFrom = !1, this.classes.showTo = !1, this.classes.hideFrom = !0, this.classes.hideTo = !1, await be(), this.classes.hideFrom = !1, this.classes.hideTo = !0;
    },
    $_autoShowHide() {
      this.shown ? this.show() : this.hide();
    },
    $_ensureTeleport() {
      if (this.$_isDisposed)
        return;
      let e = this.container;
      if (typeof e == "string" ? e = window.document.querySelector(e) : e === !1 && (e = this.$_targetNodes[0].parentNode), !e)
        throw new Error("No container for popover: " + this.container);
      e.appendChild(this.$_popperNode), this.isMounted = !0;
    },
    $_addEventListeners() {
      const e = (o) => {
        this.isShown && !this.$_hideInProgress || (o.usedByTooltip = !0, !this.$_preventShow && this.show({ event: o }));
      };
      this.$_registerTriggerListeners(this.$_targetNodes, Ye, this.triggers, this.showTriggers, e), this.$_registerTriggerListeners([this.$_popperNode], Ye, this.popperTriggers, this.popperShowTriggers, e);
      const t = (o) => {
        o.usedByTooltip || this.hide({ event: o });
      };
      this.$_registerTriggerListeners(this.$_targetNodes, Ke, this.triggers, this.hideTriggers, t), this.$_registerTriggerListeners([this.$_popperNode], Ke, this.popperTriggers, this.popperHideTriggers, t);
    },
    $_registerEventListeners(e, t, o) {
      this.$_events.push({ targetNodes: e, eventType: t, handler: o }), e.forEach((i) => i.addEventListener(t, o, U ? {
        passive: !0
      } : void 0));
    },
    $_registerTriggerListeners(e, t, o, i, n) {
      let r = o;
      i != null && (r = typeof i == "function" ? i(r) : i), r.forEach((a) => {
        const s = t[a];
        s && this.$_registerEventListeners(e, s, n);
      });
    },
    $_removeEventListeners(e) {
      const t = [];
      this.$_events.forEach((o) => {
        const { targetNodes: i, eventType: n, handler: r } = o;
        !e || e === n ? i.forEach((a) => a.removeEventListener(n, r)) : t.push(o);
      }), this.$_events = t;
    },
    $_refreshListeners() {
      this.$_isDisposed || (this.$_removeEventListeners(), this.$_addEventListeners());
    },
    $_handleGlobalClose(e, t = !1) {
      this.$_showFrameLocked || (this.hide({ event: e }), e.closePopover ? this.$emit("close-directive") : this.$emit("auto-hide"), t && (this.$_preventShow = !0, setTimeout(() => {
        this.$_preventShow = !1;
      }, 300)));
    },
    $_detachPopperNode() {
      this.$_popperNode.parentNode && this.$_popperNode.parentNode.removeChild(this.$_popperNode);
    },
    $_swapTargetAttrs(e, t) {
      for (const o of this.$_targetNodes) {
        const i = o.getAttribute(e);
        i && (o.removeAttribute(e), o.setAttribute(t, i));
      }
    },
    $_applyAttrsToTarget(e) {
      for (const t of this.$_targetNodes)
        for (const o in e) {
          const i = e[o];
          i == null ? t.removeAttribute(o) : t.setAttribute(o, i);
        }
    },
    $_updateParentShownChildren(e) {
      let t = this.parentPopper;
      for (; t; )
        e ? t.shownChildren.add(this.randomId) : (t.shownChildren.delete(this.randomId), t.$_pendingHide && t.hide()), t = t.parentPopper;
    },
    $_isAimingPopper() {
      const e = this.$_referenceNode.getBoundingClientRect();
      if (Q >= e.left && Q <= e.right && Z >= e.top && Z <= e.bottom) {
        const t = this.$_popperNode.getBoundingClientRect(), o = Q - A, i = Z - E, r = t.left + t.width / 2 - A + (t.top + t.height / 2) - E + t.width + t.height, a = A + o * r, s = E + i * r;
        return te(A, E, a, s, t.left, t.top, t.left, t.bottom) || te(A, E, a, s, t.left, t.top, t.right, t.top) || te(A, E, a, s, t.right, t.top, t.right, t.bottom) || te(A, E, a, s, t.left, t.bottom, t.right, t.bottom);
      }
      return !1;
    }
  },
  render() {
    return this.$slots.default(this.slotData);
  }
});
typeof document < "u" && typeof window < "u" && (ct ? (document.addEventListener("touchstart", et, U ? {
  passive: !0,
  capture: !0
} : !0), document.addEventListener("touchend", go, U ? {
  passive: !0,
  capture: !0
} : !0)) : (window.addEventListener("mousedown", et, !0), window.addEventListener("click", mo, !0)), window.addEventListener("resize", yo));
function et(e) {
  for (let t = 0; t < x.length; t++) {
    const o = x[t];
    try {
      const i = o.popperNode();
      o.$_mouseDownContains = i.contains(e.target);
    } catch {
    }
  }
}
function mo(e) {
  ut(e);
}
function go(e) {
  ut(e, !0);
}
function ut(e, t = !1) {
  const o = {};
  for (let i = x.length - 1; i >= 0; i--) {
    const n = x[i];
    try {
      const r = n.$_containsGlobalTarget = wo(n, e);
      n.$_pendingHide = !1, requestAnimationFrame(() => {
        if (n.$_pendingHide = !1, !o[n.randomId] && tt(n, r, e)) {
          if (n.$_handleGlobalClose(e, t), !e.closeAllPopover && e.closePopover && r) {
            let s = n.parentPopper;
            for (; s; )
              o[s.randomId] = !0, s = s.parentPopper;
            return;
          }
          let a = n.parentPopper;
          for (; a && tt(a, a.$_containsGlobalTarget, e); ) {
            a.$_handleGlobalClose(e, t);
            a = a.parentPopper;
          }
        }
      });
    } catch {
    }
  }
}
function wo(e, t) {
  const o = e.popperNode();
  return e.$_mouseDownContains || o.contains(t.target);
}
function tt(e, t, o) {
  return o.closeAllPopover || o.closePopover && t || vo(e, o) && !t;
}
function vo(e, t) {
  if (typeof e.autoHide == "function") {
    const o = e.autoHide(t);
    return e.lastAutoHide = o, o;
  }
  return e.autoHide;
}
function yo(e) {
  for (let t = 0; t < x.length; t++)
    x[t].$_computePosition(e);
}
let A = 0, E = 0, Q = 0, Z = 0;
typeof window < "u" && window.addEventListener("mousemove", (e) => {
  A = Q, E = Z, Q = e.clientX, Z = e.clientY;
}, U ? {
  passive: !0
} : void 0);
function te(e, t, o, i, n, r, a, s) {
  const l = ((a - n) * (t - r) - (s - r) * (e - n)) / ((s - r) * (o - e) - (a - n) * (i - t)), d = ((o - e) * (t - r) - (i - t) * (e - n)) / ((s - r) * (o - e) - (a - n) * (i - t));
  return l >= 0 && l <= 1 && d >= 0 && d <= 1;
}
var Be = (e, t) => {
  const o = e.__vccOpts || e;
  for (const [i, n] of t)
    o[i] = n;
  return o;
};
const _o = {
  extends: ht()
};
function $o(e, t, o, i, n, r) {
  return C(), M("div", {
    ref: "reference",
    class: He(["v-popper", {
      "v-popper--shown": e.slotData.isShown
    }])
  }, [
    ie(e.$slots, "default", vt(yt(e.slotData)))
  ], 2);
}
var bo = /* @__PURE__ */ Be(_o, [["render", $o]]);
function Po() {
  var e = window.navigator.userAgent, t = e.indexOf("MSIE ");
  if (t > 0)
    return parseInt(e.substring(t + 5, e.indexOf(".", t)), 10);
  var o = e.indexOf("Trident/");
  if (o > 0) {
    var i = e.indexOf("rv:");
    return parseInt(e.substring(i + 3, e.indexOf(".", i)), 10);
  }
  var n = e.indexOf("Edge/");
  return n > 0 ? parseInt(e.substring(n + 5, e.indexOf(".", n)), 10) : -1;
}
let oe;
function Ee() {
  Ee.init || (Ee.init = !0, oe = Po() !== -1);
}
var we = {
  name: "ResizeObserver",
  props: {
    emitOnMount: {
      type: Boolean,
      default: !1
    },
    ignoreWidth: {
      type: Boolean,
      default: !1
    },
    ignoreHeight: {
      type: Boolean,
      default: !1
    }
  },
  emits: [
    "notify"
  ],
  mounted() {
    Ee(), wt(() => {
      this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight, this.emitOnMount && this.emitSize();
    });
    const e = document.createElement("object");
    this._resizeObject = e, e.setAttribute("aria-hidden", "true"), e.setAttribute("tabindex", -1), e.onload = this.addResizeHandlers, e.type = "text/html", oe && this.$el.appendChild(e), e.data = "about:blank", oe || this.$el.appendChild(e);
  },
  beforeUnmount() {
    this.removeResizeHandlers();
  },
  methods: {
    compareAndNotify() {
      (!this.ignoreWidth && this._w !== this.$el.offsetWidth || !this.ignoreHeight && this._h !== this.$el.offsetHeight) && (this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight, this.emitSize());
    },
    emitSize() {
      this.$emit("notify", {
        width: this._w,
        height: this._h
      });
    },
    addResizeHandlers() {
      this._resizeObject.contentDocument.defaultView.addEventListener("resize", this.compareAndNotify), this.compareAndNotify();
    },
    removeResizeHandlers() {
      this._resizeObject && this._resizeObject.onload && (!oe && this._resizeObject.contentDocument && this._resizeObject.contentDocument.defaultView.removeEventListener("resize", this.compareAndNotify), this.$el.removeChild(this._resizeObject), this._resizeObject.onload = null, this._resizeObject = null);
    }
  }
};
const xo = /* @__PURE__ */ _t("data-v-b329ee4c");
ot("data-v-b329ee4c");
const To = {
  class: "resize-observer",
  tabindex: "-1"
};
it();
const Co = /* @__PURE__ */ xo((e, t, o, i, n, r) => (C(), ze("div", To)));
we.render = Co;
we.__scopeId = "data-v-b329ee4c";
we.__file = "src/components/ResizeObserver.vue";
var ft = (e = "theme") => ({
  computed: {
    themeClass() {
      return uo(this[e]);
    }
  }
});
const So = H({
  name: "VPopperContent",
  components: {
    ResizeObserver: we
  },
  mixins: [
    ft()
  ],
  props: {
    popperId: String,
    theme: String,
    shown: Boolean,
    mounted: Boolean,
    skipTransition: Boolean,
    autoHide: Boolean,
    handleResize: Boolean,
    classes: Object,
    result: Object
  },
  emits: [
    "hide",
    "resize"
  ],
  methods: {
    toPx(e) {
      return e != null && !isNaN(e) ? `${e}px` : null;
    }
  }
}), Oo = ["id", "aria-hidden", "tabindex", "data-popper-placement"], No = {
  ref: "inner",
  class: "v-popper__inner"
}, ko = /* @__PURE__ */ $("div", { class: "v-popper__arrow-outer" }, null, -1), Ao = /* @__PURE__ */ $("div", { class: "v-popper__arrow-inner" }, null, -1), Eo = [
  ko,
  Ao
];
function zo(e, t, o, i, n, r) {
  const a = ne("ResizeObserver");
  return C(), M("div", {
    id: e.popperId,
    ref: "popover",
    class: He(["v-popper__popper", [
      e.themeClass,
      e.classes.popperClass,
      {
        "v-popper__popper--shown": e.shown,
        "v-popper__popper--hidden": !e.shown,
        "v-popper__popper--show-from": e.classes.showFrom,
        "v-popper__popper--show-to": e.classes.showTo,
        "v-popper__popper--hide-from": e.classes.hideFrom,
        "v-popper__popper--hide-to": e.classes.hideTo,
        "v-popper__popper--skip-transition": e.skipTransition,
        "v-popper__popper--arrow-overflow": e.result && e.result.arrow.overflow,
        "v-popper__popper--no-positioning": !e.result
      }
    ]]),
    style: ye(e.result ? {
      position: e.result.strategy,
      transform: `translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`
    } : void 0),
    "aria-hidden": e.shown ? "false" : "true",
    tabindex: e.autoHide ? 0 : void 0,
    "data-popper-placement": e.result ? e.result.placement : void 0,
    onKeyup: t[2] || (t[2] = xe((s) => e.autoHide && e.$emit("hide"), ["esc"]))
  }, [
    $("div", {
      class: "v-popper__backdrop",
      onClick: t[0] || (t[0] = (s) => e.autoHide && e.$emit("hide"))
    }),
    $("div", {
      class: "v-popper__wrapper",
      style: ye(e.result ? {
        transformOrigin: e.result.transformOrigin
      } : void 0)
    }, [
      $("div", No, [
        e.mounted ? (C(), M(nt, { key: 0 }, [
          $("div", null, [
            ie(e.$slots, "default")
          ]),
          e.handleResize ? (C(), ze(a, {
            key: 0,
            onNotify: t[1] || (t[1] = (s) => e.$emit("resize", s))
          })) : Te("", !0)
        ], 64)) : Te("", !0)
      ], 512),
      $("div", {
        ref: "arrow",
        class: "v-popper__arrow-container",
        style: ye(e.result ? {
          left: e.toPx(e.result.arrow.x),
          top: e.toPx(e.result.arrow.y)
        } : void 0)
      }, Eo, 4)
    ], 4)
  ], 46, Oo);
}
var mt = /* @__PURE__ */ Be(So, [["render", zo]]), gt = {
  methods: {
    show(...e) {
      return this.$refs.popper.show(...e);
    },
    hide(...e) {
      return this.$refs.popper.hide(...e);
    },
    dispose(...e) {
      return this.$refs.popper.dispose(...e);
    },
    onResize(...e) {
      return this.$refs.popper.onResize(...e);
    }
  }
};
const Ho = H({
  name: "VPopperWrapper",
  components: {
    Popper: bo,
    PopperContent: mt
  },
  mixins: [
    gt,
    ft("finalTheme")
  ],
  props: {
    theme: {
      type: String,
      default: null
    }
  },
  computed: {
    finalTheme() {
      var e;
      return (e = this.theme) != null ? e : this.$options.vPopperTheme;
    }
  },
  methods: {
    getTargetNodes() {
      return Array.from(this.$el.children).filter((e) => e !== this.$refs.popperContent.$el);
    }
  }
});
function Do(e, t, o, i, n, r) {
  const a = ne("PopperContent"), s = ne("Popper");
  return C(), ze(s, {
    ref: "popper",
    theme: e.finalTheme,
    "target-nodes": e.getTargetNodes,
    "popper-node": () => e.$refs.popperContent.$el,
    class: He([
      e.themeClass
    ])
  }, {
    default: se(({
      popperId: l,
      isShown: d,
      shouldMountContent: p,
      skipTransition: u,
      autoHide: f,
      show: h,
      hide: m,
      handleResize: _,
      onResize: w,
      classes: g,
      result: y
    }) => [
      ie(e.$slots, "default", {
        shown: d,
        show: h,
        hide: m
      }),
      Ce(a, {
        ref: "popperContent",
        "popper-id": l,
        theme: e.finalTheme,
        shown: d,
        mounted: p,
        "skip-transition": u,
        "auto-hide": f,
        "handle-resize": _,
        classes: g,
        result: y,
        onHide: m,
        onResize: w
      }, {
        default: se(() => [
          ie(e.$slots, "popper", {
            shown: d,
            hide: m
          })
        ]),
        _: 2
      }, 1032, ["popper-id", "theme", "shown", "mounted", "skip-transition", "auto-hide", "handle-resize", "classes", "result", "onHide", "onResize"])
    ]),
    _: 3
  }, 8, ["theme", "target-nodes", "popper-node", "class"]);
}
var Le = /* @__PURE__ */ Be(Ho, [["render", Do]]);
const Ro = H(ge(z({}, Le), {
  name: "VDropdown",
  vPopperTheme: "dropdown"
}));
H(ge(z({}, Le), {
  name: "VMenu",
  vPopperTheme: "menu"
}));
H(ge(z({}, Le), {
  name: "VTooltip",
  vPopperTheme: "tooltip"
}));
H({
  name: "VTooltipDirective",
  components: {
    Popper: ht(),
    PopperContent: mt
  },
  mixins: [
    gt
  ],
  inheritAttrs: !1,
  props: {
    theme: {
      type: String,
      default: "tooltip"
    },
    html: {
      type: Boolean,
      default: (e) => de(e.theme, "html")
    },
    content: {
      type: [String, Number, Function],
      default: null
    },
    loadingContent: {
      type: String,
      default: (e) => de(e.theme, "loadingContent")
    }
  },
  data() {
    return {
      asyncContent: null
    };
  },
  computed: {
    isContentAsync() {
      return typeof this.content == "function";
    },
    loading() {
      return this.isContentAsync && this.asyncContent == null;
    },
    finalContent() {
      return this.isContentAsync ? this.loading ? this.loadingContent : this.asyncContent : this.content;
    }
  },
  watch: {
    content: {
      handler() {
        this.fetchContent(!0);
      },
      immediate: !0
    },
    async finalContent() {
      await this.$nextTick(), this.$refs.popper.onResize();
    }
  },
  created() {
    this.$_fetchId = 0;
  },
  methods: {
    fetchContent(e) {
      if (typeof this.content == "function" && this.$_isShown && (e || !this.$_loading && this.asyncContent == null)) {
        this.asyncContent = null, this.$_loading = !0;
        const t = ++this.$_fetchId, o = this.content(this);
        o.then ? o.then((i) => this.onResult(t, i)) : this.onResult(t, o);
      }
    },
    onResult(e, t) {
      e === this.$_fetchId && (this.$_loading = !1, this.asyncContent = t);
    },
    onShow() {
      this.$_isShown = !0, this.fetchContent();
    },
    onHide() {
      this.$_isShown = !1;
    }
  }
});
const Bo = Ro, Me = (e) => (ot("data-v-a23d6ac4"), e = e(), it(), e), Lo = {
  key: 0,
  class: "flex items-center gap-2 px-2"
}, Mo = {
  key: 0,
  class: "text-lg flex items-center gap-2"
}, Io = /* @__PURE__ */ Me(() => /* @__PURE__ */ $("div", { class: "flex-1" }, null, -1)), Fo = /* @__PURE__ */ Me(() => /* @__PURE__ */ $("div", { class: "i-la-info-circle cursor-pointer" }, null, -1)), Wo = { class: "text-xs px-4 py-2 leading-5" }, jo = { class: "max-w-120" }, Vo = ["checked"], Go = { class: "p-0" }, qo = /* @__PURE__ */ Me(() => /* @__PURE__ */ $("a", {
  class: "font-bold underline",
  href: "http://www.skyhunter.com/marcs/petnames/IntroPetNames.html",
  target: "_blank"
}, "Stiegler, 2005", -1)), Uo = /* @__PURE__ */ H({
  __name: "AccountPetname",
  props: {
    pub: { type: String, default: "" }
  },
  setup(e) {
    const t = e, { user: o } = Ct(), i = _e(""), n = _e(""), r = _e(!1);
    $t(() => t.pub, (s) => {
      o.db.get("petnames").get(s).on(async (l) => {
        i.value = await St.decrypt(l, o.pair());
      });
    }, { immediate: !0 });
    const a = {
      "The key must be resistant enough to forgery to survive in the context of the application threat model": !0,
      "There can be at most one petname per key per user per application": !0,
      "There can be at most one key per petname (per user per application)": !0,
      "In the application user interface, all references to the key are represented by the petname": !1,
      "The user must be able to assign a private petname to any key": !0,
      "The petname must be assigned to the key only by explicit user action": !0,
      "The user must be able to repeatedly edit the petname of any key": !0,
      "The user interface shall assist the user in assuring that two petnames are not similar enough to enable mimicry": !1,
      "Nicknames and alleged names must be unambiguously visually distinct from petnames": !1
    };
    return (s, l) => {
      const d = ne("account-avatar");
      return $e(o).is ? (C(), M("div", Lo, [
        Ce(d, {
          pub: e.pub,
          size: 40
        }, null, 8, ["pub"]),
        i.value && !r.value ? (C(), M("div", Mo, [
          bt(Ie(i.value), 1),
          $("div", {
            class: "i-la-pen",
            onClick: l[0] || (l[0] = (p) => r.value = !r.value)
          })
        ])) : Pt((C(), M("input", {
          key: 1,
          class: "m-1 p-2 rounded-lg dark-bg-dark-100",
          "onUpdate:modelValue": l[1] || (l[1] = (p) => n.value = p),
          placeholder: "Set private petname",
          onKeydown: [
            l[2] || (l[2] = xe((p) => {
              $e(Ot)(e.pub, n.value), r.value = !1;
            }, ["enter"])),
            l[3] || (l[3] = xe((p) => r.value = !1, ["escape"]))
          ]
        }, null, 544)), [
          [xt, n.value]
        ]),
        Io,
        Ce($e(Bo), null, {
          popper: se(() => [
            $("div", Wo, [
              $("ul", jo, [
                (C(), M(nt, null, Tt(a, (p, u) => $("li", {
                  class: "flex gap-2 items-start",
                  key: u
                }, [
                  $("input", {
                    class: "my-2",
                    type: "checkbox",
                    checked: p,
                    disabled: ""
                  }, null, 8, Vo),
                  $("div", Go, Ie(u), 1)
                ])), 64))
              ]),
              qo
            ])
          ]),
          default: se(() => [
            Fo
          ]),
          _: 1
        })
      ])) : Te("", !0);
    };
  }
});
const Jo = /* @__PURE__ */ Nt(Uo, [["__scopeId", "data-v-a23d6ac4"]]);
export {
  Jo as default
};
//# sourceMappingURL=AccountPetname-46e9eade.js.map
