import { V as x } from "./vue.min-CtdJWvsZ.js";
import { n as J, c as b, g as le } from "./_plugin-vue2_normalizer-5m4abzWv.js";
import { getContextMenuContainer as fe } from "./config/context-menu.js";
async function qr(e) {
  await navigator.clipboard.writeText(e);
}
async function Yr() {
  return await navigator.clipboard.readText();
}
const he = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform), L = [
  "Alt",
  "AltGraph",
  "CapsLock",
  "Control",
  "Fn",
  "FnLock",
  "Meta",
  "NumLock",
  "ScrollLock",
  "Shift",
  "Symbol",
  "SymbolLock"
], ve = {
  ArrowUp: "↑",
  ArrowDown: "↓",
  ArrowLeft: "←",
  ArrowRight: "→",
  Backspace: "⌦"
}, pe = {
  ArrowUp: "Up",
  ArrowDown: "Down",
  ArrowLeft: "Left",
  ArrowRight: "Right"
};
function me(e) {
  const t = Array.isArray(e) ? e : e.split("+").map((o) => o.trim()), n = t.filter((o) => L.includes(o)), r = t.find((o) => !L.includes(o));
  if (he) {
    let o = "";
    return n.includes("Meta") && (o += "^"), n.includes("Alt") && (o += "⌥"), n.includes("Shift") && (o += "⇧"), n.includes("Control") && (o += "⌘"), n.includes("Symbol") && (o += "☺"), o += ve[r] || r, o;
  }
  const i = [];
  return n.includes("Control") && i.push("Ctrl"), n.includes("Alt") && i.push("Alt"), n.includes("Meta") && i.push("Meta"), n.includes("Shift") && i.push("Shift"), n.includes("Symbol") && i.push("Symbol"), i.push(pe[r] || r), i.join("+");
}
const be = x.extend({
  name: "ContextMenu",
  props: ["options", "event", "item", "parentMenu"],
  data() {
    return {
      menuWidth: null,
      menuHeight: null,
      menuOpen: !1,
      showSubItemsIndex: -1,
      checkedOptions: {}
    };
  },
  computed: {
    menuElements() {
      return this.$refs.menu ? Array.from(this.$refs.menu.getElementsByTagName("*")) : [];
    }
  },
  methods: {
    async showMenu(e) {
      const t = this.$refs.menu;
      if (!t)
        return;
      (!this.menuWidth || !this.menuHeight) && (t.style.visibility = "hidden", t.style.display = "block", await this.$nextTick(), this.menuWidth = t.offsetWidth, this.menuHeight = t.offsetHeight, t.removeAttribute("style"));
      const { left: n, top: r } = this.calculatePosition(e);
      t.style.left = n + "px", t.style.top = r + "px", t.classList.add("BksContextMenu-active"), this.options.forEach((i) => {
        typeof i.checked == "boolean" && this.$set(this.checkedOptions, i.id, i.checked);
      }), this.menuOpen = !0;
    },
    calculatePosition(e) {
      let t = 0, n = 0;
      if (this.parentMenu) {
        const i = this.parentMenu.getBoundingClientRect();
        return this.menuWidth + i.right >= window.innerWidth ? t = i.left - 2 - this.menuWidth : t = i.right + 2, this.menuHeight + i.bottom >= window.innerHeight ? n = i.bottom - this.menuHeight : n = i.top, { left: t, top: n };
      }
      return this.menuWidth + e.pageX >= window.innerWidth ? t = e.pageX - this.menuWidth + 2 : t = e.pageX - 2, this.menuHeight + e.pageY >= window.innerHeight ? n = e.pageY - this.menuHeight + 2 : n = e.pageY - 2, { left: t, top: n };
    },
    hideContextMenu() {
      this.$emit("close");
      let e = this.$refs.ul;
      e && e.classList.remove("BksContextMenu-active");
    },
    onClickOutside() {
      this.hideContextMenu();
    },
    optionClicked(e, t, n) {
      var r, i, o;
      if (!(((r = e.items) == null ? void 0 : r.length) > 0 && this.showSubItemsIndex === t)) {
        if (typeof this.checkedOptions[e.id] < "u") {
          const a = !this.checkedOptions[e.id];
          this.checkedOptions[e.id] = a;
        }
        e.disabled || ((i = e.handler) == null || i.call(e, n, this.item, e), ((o = e.items) == null ? void 0 : o.length) > 0 ? this.showSubItemsIndex = t : e.keepOpen || this.hideContextMenu());
      }
    },
    onEscKeyRelease(e) {
      e.keyCode === 27 && this.hideContextMenu();
    },
    shortcut(e) {
      return me(e);
    }
  },
  mounted() {
    this.showMenu(this.event, this.item);
  }
});
var ge = function() {
  var t = this, n = t._self._c;
  return t._self._setupProxy, n("div", { staticClass: "BksUiKit BksContextMenu-container" }, [n("ul", { ref: "menu", staticClass: "BksContextMenu-list", attrs: { role: "menu" } }, t._l(t.options, function(r, i) {
    var o;
    return n("li", { key: i, ref: "item", refInFor: !0, staticClass: "BksContextMenu-item", class: [typeof r.class == "function" ? r.class({ item: t.item }) : r.class, r.type === "divider" ? "BksContextMenu-item-divider" : "", r.disabled ? "BksContextMenu-item-disabled" : ""], attrs: { role: "menuitem" }, on: { click: function(a) {
      return t.optionClicked(r, i, a);
    } } }, [typeof t.checkedOptions[r.id] == "boolean" ? n("div", { staticClass: "BksContextMenu-item-icon-container BksContextMenu-item-checkbox-icon", class: { "BksContextMenu-item-checked": t.checkedOptions[r.id] } }, [n("i", { staticClass: "material-icons" }, [t._v(" " + t._s(t.checkedOptions[r.id] ? "check_box" : "check_box_outline_blank") + " ")])]) : t._e(), typeof r.label == "object" ? n("div", { staticClass: "BksContextMenu-item-label", domProps: { innerHTML: t._s(r.label.html) } }) : n("div", { staticClass: "BksContextMenu-item-label", domProps: { textContent: t._s(r.label) } }), r.shortcut ? n("div", { staticClass: "BksContextMenu-item-shortcut", domProps: { textContent: t._s(t.shortcut(r.shortcut)) } }) : t._e(), ((o = r.items) == null ? void 0 : o.length) > 0 ? n("div", { staticClass: "BksContextMenu-item-icon-container BksContextMenu-item-submenu-icon" }, [n("i", { staticClass: "material-icons" }, [t._v("keyboard_arrow_right")])]) : t._e()]);
  }), 0), t.showSubItemsIndex !== -1 ? n("context-menu", { attrs: { options: t.options[t.showSubItemsIndex].items, item: t.item, event: t.event, parentMenu: t.$refs.item[t.showSubItemsIndex] }, on: { close: function(r) {
    return t.$emit("close");
  } } }) : t._e()], 1);
}, ye = [], _e = /* @__PURE__ */ J(
  be,
  ge,
  ye
);
const $e = _e.exports;
var Ce = {
  name: "teleport",
  props: {
    to: {
      type: String,
      required: !0
    },
    where: {
      type: String,
      default: "after"
    },
    disabled: Boolean
  },
  data: function() {
    return {
      nodes: [],
      waiting: !1,
      observer: null,
      parent: null
    };
  },
  watch: {
    to: "maybeMove",
    where: "maybeMove",
    disabled: function(t) {
      var n = this;
      t ? (this.disable(), this.$nextTick(function() {
        n.teardownObserver();
      })) : (this.bootObserver(), this.move());
    }
  },
  mounted: function() {
    this.nodes = Array.from(this.$el.childNodes), this.disabled || this.bootObserver(), this.maybeMove();
  },
  beforeDestroy: function() {
    this.nodes = this.getComponentChildrenNode(), this.disable(), this.teardownObserver();
  },
  computed: {
    classes: function() {
      return this.disabled ? ["teleporter"] : ["teleporter", "hidden"];
    }
  },
  methods: {
    maybeMove: function() {
      this.disabled || this.move();
    },
    move: function() {
      if (this.waiting = !1, this.parent = document.querySelector(this.to), !this.parent) {
        this.disable(), this.waiting = !0;
        return;
      }
      this.where === "before" ? this.parent.prepend(this.getFragment()) : this.parent.appendChild(this.getFragment());
    },
    disable: function() {
      this.$el.appendChild(this.getFragment()), this.parent = null;
    },
    // Using a fragment is faster because it'll trigger only a single reflow
    // See https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment
    getFragment: function() {
      var t = document.createDocumentFragment();
      return this.nodes.forEach(function(n) {
        return t.appendChild(n);
      }), t;
    },
    onMutations: function(t) {
      for (var n = this, r = !1, i = 0; i < t.length; i++) {
        var o = t[i], a = Array.from(o.addedNodes).filter(function(c) {
          return !n.nodes.includes(c);
        });
        Array.from(o.removedNodes).includes(this.parent) ? (this.disable(), this.waiting = !this.disabled) : this.waiting && a.length > 0 && (r = !0);
      }
      r && this.move();
    },
    bootObserver: function() {
      var t = this;
      this.observer || (this.observer = new MutationObserver(function(n) {
        return t.onMutations(n);
      }), this.observer.observe(document.body, {
        childList: !0,
        subtree: !0,
        attributes: !1,
        characterData: !1
      }), !this.childObserver && (this.childObserver = new MutationObserver(function(n) {
        var r = n.find(function(i) {
          return i.target === t.$el;
        });
        r && (t.nodes.forEach(function(i) {
          return i.parentNode && i.parentNode.removeChild(i);
        }), t.nodes = t.getComponentChildrenNode(), t.maybeMove());
      }), this.childObserver.observe(this.$el, {
        childList: !0,
        subtree: !1,
        attributes: !1,
        characterData: !1
      })));
    },
    teardownObserver: function() {
      this.observer && (this.observer.disconnect(), this.observer = null), this.childObserver && (this.childObserver.disconnect(), this.childObserver = null);
    },
    getComponentChildrenNode: function() {
      return this.$vnode.componentOptions.children.map(function(t) {
        return t.elm;
      }).filter(function(t) {
        return t;
      });
    }
  }
};
function we(e, t, n, r, i, o, a, c, h, C) {
  var u = typeof n == "function" ? n.options : n;
  e && e.render && (u.render = e.render, u.staticRenderFns = e.staticRenderFns, u._compiled = !0), u._scopeId = r;
  var v;
  if (t && (v = function(F) {
    t.call(this, c(F));
  }), v)
    if (u.functional) {
      var ue = u.render;
      u.render = function(de, I) {
        return v.call(I), ue(de, I);
      };
    } else {
      var P = u.beforeCreate;
      u.beforeCreate = P ? [].concat(P, v) : [v];
    }
  return n;
}
var Me = typeof navigator < "u" && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
function Te(e) {
  return function(t, n) {
    return je(t, n);
  };
}
var w, N = {};
function je(e, t) {
  var n = Me ? t.media || "default" : e, r = N[n] || (N[n] = { ids: /* @__PURE__ */ new Set(), styles: [] });
  if (!r.ids.has(e)) {
    r.ids.add(e);
    var i = t.source;
    if (t.map && (i += `
/*# sourceURL=` + t.map.sources[0] + " */", i += `
/*# sourceMappingURL=data:application/json;base64,` + btoa(unescape(encodeURIComponent(JSON.stringify(t.map)))) + " */"), r.element || (r.element = document.createElement("style"), r.element.type = "text/css", t.media && r.element.setAttribute("media", t.media), w === void 0 && (w = document.head || document.getElementsByTagName("head")[0]), w.appendChild(r.element)), "styleSheet" in r.element)
      r.styles.push(i), r.element.styleSheet.cssText = r.styles.filter(Boolean).join(`
`);
    else {
      var o = r.ids.size - 1, a = document.createTextNode(i), c = r.element.childNodes;
      c[o] && r.element.removeChild(c[o]), c.length ? r.element.insertBefore(a, c[o]) : r.element.appendChild(a);
    }
  }
}
var Ae = Ce, X = function() {
  var e = this, t = e.$createElement, n = e._self._c || t;
  return n("div", { class: e.classes }, [e._t("default")], 2);
}, Oe = [];
X._withStripped = !0;
var ke = function(e) {
  e && e("data-v-50f4b45b_0", { source: `.hidden[data-v-50f4b45b] {
  visibility: hidden;
  display: none;
}

/*# sourceMappingURL=Teleport.vue.map */`, map: { version: 3, sources: ["/home/shodan/Projects/vue2-teleport/src/Teleport.vue", "Teleport.vue"], names: [], mappings: "AA2LA;EACA,kBAAA;EACA,aAAA;AC1LA;;AAEA,uCAAuC", file: "Teleport.vue", sourcesContent: [`<template>
  <div :class="classes">
    <slot/>
  </div>
</template>

<script>
export default {
  name: 'teleport',
  props: {
    to: {
      type: String,
      required: true,
    },
    where: {
      type: String,
      default: 'after',
    },
    disabled: Boolean,
  },
  data() {
    return {
      nodes: [],
      waiting: false,
      observer: null,
      parent: null,
    };
  },
  watch: {
    to: 'maybeMove',
    where: 'maybeMove',
    disabled(value) {
      if (value) {
        this.disable();
        // Ensure all event done.
        this.$nextTick(() => {
          this.teardownObserver();
        });
      } else {
        this.bootObserver();
        this.move();
      }
    },
  },
  mounted() {
    // Store a reference to the nodes
    this.nodes = Array.from(this.$el.childNodes);

    if (!this.disabled) {
      this.bootObserver();
    }

    // Move slot content to target
    this.maybeMove();
  },
  beforeDestroy() {
    // Fix nodes reference
    this.nodes = this.getComponentChildrenNode();

    // Move back
    this.disable();

    // Stop observing
    this.teardownObserver();
  },
  computed: {
    classes() {
      if (this.disabled) {
        return ['teleporter'];
      }

      return ['teleporter', 'hidden'];
    },
  },
  methods: {
    maybeMove() {
      if (!this.disabled) {
        this.move();
      }
    },
    move() {
      this.waiting = false;

      this.parent = document.querySelector(this.to);

      if (!this.parent) {
        this.disable();

        this.waiting = true;

        return;
      }

      if (this.where === 'before') {
        this.parent.prepend(this.getFragment());
      } else {
        this.parent.appendChild(this.getFragment());
      }
    },
    disable() {
      this.$el.appendChild(this.getFragment());
      this.parent = null;
    },
    // Using a fragment is faster because it'll trigger only a single reflow
    // See https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment
    getFragment() {
      const fragment = document.createDocumentFragment();

      this.nodes.forEach(node => fragment.appendChild(node));

      return fragment;
    },
    onMutations(mutations) {
      // Makes sure the move operation is only done once
      let shouldMove = false;

      for (let i = 0; i < mutations.length; i++) {
        const mutation = mutations[i];
        const filteredAddedNodes = Array.from(mutation.addedNodes).filter(node => !this.nodes.includes(node));

        if (Array.from(mutation.removedNodes).includes(this.parent)) {
          this.disable();
          this.waiting = !this.disabled;
        } else if (this.waiting && filteredAddedNodes.length > 0) {
          shouldMove = true;
        }
      }

      if (shouldMove) {
        this.move();
      }
    },
    bootObserver() {
      if (this.observer) {
        return;
      }

      this.observer = new MutationObserver(mutations => this.onMutations(mutations));

      this.observer.observe(document.body, {
        childList: true,
        subtree: true,
        attributes: false,
        characterData: false,
      });

      if (this.childObserver) {
        return;
      }
      // watch childNodes change
      this.childObserver = new MutationObserver(mutations => {
        const childChangeRecord = mutations.find(i => i.target === this.$el);
        if (childChangeRecord) {
          // Remove old nodes before update position.
          this.nodes.forEach((node) => node.parentNode && node.parentNode.removeChild(node));
          this.nodes = this.getComponentChildrenNode();
          this.maybeMove();
        }
      });

      this.childObserver.observe(this.$el, {
        childList: true,
        subtree: false,
        attributes: false,
        characterData: false,
      });
    },
    teardownObserver() {
      if (this.observer) {
        this.observer.disconnect();
        this.observer = null;
      }
      if (this.childObserver) {
        this.childObserver.disconnect();
        this.childObserver = null;
      }
    },
    getComponentChildrenNode() {
      return this.$vnode.componentOptions.children
        .map((i) => i.elm)
        .filter((i) => i);
    },
  },
};
<\/script>

<style scoped lang="scss">
.hidden {
  visibility: hidden;
  display: none;
}
</style>
`, `.hidden {
  visibility: hidden;
  display: none;
}

/*# sourceMappingURL=Teleport.vue.map */`] }, media: void 0 });
}, Se = "data-v-50f4b45b", xe = void 0, Ee = !1, Q = /* @__PURE__ */ we(
  { render: X, staticRenderFns: Oe },
  ke,
  Ae,
  Se,
  Ee,
  xe,
  !1,
  Te
);
function T(e) {
  T.installed || (T.installed = !0, e.component("Teleport", Q));
}
var Pe = {
  install: T
}, g = null;
typeof window < "u" ? g = window.Vue : typeof global < "u" && (g = global.Vue);
g && g.use(Pe);
const Fe = x.extend({
  name: "ContextMenuRoot",
  components: {
    Teleport: Q,
    ContextMenu: $e
  },
  props: ["options", "event", "item", "targetElement"],
  data() {
    return {
      menuWidth: null,
      menuHeight: null,
      menuOpen: !1
    };
  },
  methods: {
    hideContextMenu() {
      this.$emit("close");
    },
    onEscKeyRelease(e) {
      e.keyCode === 27 && this.hideContextMenu();
    },
    maybeHideMenu(e) {
      !this.$refs.container.$el.contains(e.target) && this.hideContextMenu();
    },
    getContainer() {
      return this.targetElement || fe();
    }
  },
  mounted() {
    document.addEventListener("keyup", this.onEscKeyRelease), document.addEventListener("mousedown", this.maybeHideMenu);
  },
  beforeDestroy() {
    document.removeEventListener("mousedown", this.maybeHideMenu), document.removeEventListener("keyup", this.onEscKeyRelease);
  }
});
var Ie = function() {
  var t = this, n = t._self._c;
  return t._self._setupProxy, n("teleport", { attrs: { to: t.getContainer() } }, [n("context-menu", { ref: "container", attrs: { options: t.options, event: t.event, item: t.item }, on: { close: function(r) {
    return t.$emit("close");
  } } })], 1);
}, Le = [], Ne = /* @__PURE__ */ J(
  Fe,
  Ie,
  Le
);
const Be = Ne.exports;
var Re = Object.prototype;
function De(e) {
  var t = e && e.constructor, n = typeof t == "function" && t.prototype || Re;
  return e === n;
}
var Z = De;
function Ue(e, t) {
  return function(n) {
    return e(t(n));
  };
}
var We = Ue, Ke = We, He = Ke(Object.keys, Object), Ve = He, Ge = Z, qe = Ve, Ye = Object.prototype, ze = Ye.hasOwnProperty;
function Je(e) {
  if (!Ge(e))
    return qe(e);
  var t = [];
  for (var n in Object(e))
    ze.call(e, n) && n != "constructor" && t.push(n);
  return t;
}
var Xe = Je, Qe = typeof b == "object" && b && b.Object === Object && b, ee = Qe, Ze = ee, et = typeof self == "object" && self && self.Object === Object && self, tt = Ze || et || Function("return this")(), d = tt, nt = d, rt = nt.Symbol, te = rt, B = te, ne = Object.prototype, it = ne.hasOwnProperty, ot = ne.toString, p = B ? B.toStringTag : void 0;
function st(e) {
  var t = it.call(e, p), n = e[p];
  try {
    e[p] = void 0;
    var r = !0;
  } catch {
  }
  var i = ot.call(e);
  return r && (t ? e[p] = n : delete e[p]), i;
}
var at = st, ct = Object.prototype, ut = ct.toString;
function dt(e) {
  return ut.call(e);
}
var lt = dt, R = te, ft = at, ht = lt, vt = "[object Null]", pt = "[object Undefined]", D = R ? R.toStringTag : void 0;
function mt(e) {
  return e == null ? e === void 0 ? pt : vt : D && D in Object(e) ? ft(e) : ht(e);
}
var $ = mt;
function bt(e) {
  var t = typeof e;
  return e != null && (t == "object" || t == "function");
}
var re = bt, gt = $, yt = re, _t = "[object AsyncFunction]", $t = "[object Function]", Ct = "[object GeneratorFunction]", wt = "[object Proxy]";
function Mt(e) {
  if (!yt(e))
    return !1;
  var t = gt(e);
  return t == $t || t == Ct || t == _t || t == wt;
}
var ie = Mt, Tt = d, jt = Tt["__core-js_shared__"], At = jt, M = At, U = function() {
  var e = /[^.]+$/.exec(M && M.keys && M.keys.IE_PROTO || "");
  return e ? "Symbol(src)_1." + e : "";
}();
function Ot(e) {
  return !!U && U in e;
}
var kt = Ot, St = Function.prototype, xt = St.toString;
function Et(e) {
  if (e != null) {
    try {
      return xt.call(e);
    } catch {
    }
    try {
      return e + "";
    } catch {
    }
  }
  return "";
}
var oe = Et, Pt = ie, Ft = kt, It = re, Lt = oe, Nt = /[\\^$.*+?()[\]{}|]/g, Bt = /^\[object .+?Constructor\]$/, Rt = Function.prototype, Dt = Object.prototype, Ut = Rt.toString, Wt = Dt.hasOwnProperty, Kt = RegExp(
  "^" + Ut.call(Wt).replace(Nt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function Ht(e) {
  if (!It(e) || Ft(e))
    return !1;
  var t = Pt(e) ? Kt : Bt;
  return t.test(Lt(e));
}
var Vt = Ht;
function Gt(e, t) {
  return e == null ? void 0 : e[t];
}
var qt = Gt, Yt = Vt, zt = qt;
function Jt(e, t) {
  var n = zt(e, t);
  return Yt(n) ? n : void 0;
}
var m = Jt, Xt = m, Qt = d, Zt = Xt(Qt, "DataView"), en = Zt, tn = m, nn = d, rn = tn(nn, "Map"), on = rn, sn = m, an = d, cn = sn(an, "Promise"), un = cn, dn = m, ln = d, fn = dn(ln, "Set"), hn = fn, vn = m, pn = d, mn = vn(pn, "WeakMap"), bn = mn, j = en, A = on, O = un, k = hn, S = bn, se = $, f = oe, W = "[object Map]", gn = "[object Object]", K = "[object Promise]", H = "[object Set]", V = "[object WeakMap]", G = "[object DataView]", yn = f(j), _n = f(A), $n = f(O), Cn = f(k), wn = f(S), l = se;
(j && l(new j(new ArrayBuffer(1))) != G || A && l(new A()) != W || O && l(O.resolve()) != K || k && l(new k()) != H || S && l(new S()) != V) && (l = function(e) {
  var t = se(e), n = t == gn ? e.constructor : void 0, r = n ? f(n) : "";
  if (r)
    switch (r) {
      case yn:
        return G;
      case _n:
        return W;
      case $n:
        return K;
      case Cn:
        return H;
      case wn:
        return V;
    }
  return t;
});
var Mn = l;
function Tn(e) {
  return e != null && typeof e == "object";
}
var E = Tn, jn = $, An = E, On = "[object Arguments]";
function kn(e) {
  return An(e) && jn(e) == On;
}
var Sn = kn, q = Sn, xn = E, ae = Object.prototype, En = ae.hasOwnProperty, Pn = ae.propertyIsEnumerable, Fn = q(/* @__PURE__ */ function() {
  return arguments;
}()) ? q : function(e) {
  return xn(e) && En.call(e, "callee") && !Pn.call(e, "callee");
}, In = Fn, Ln = Array.isArray, Nn = Ln, Bn = 9007199254740991;
function Rn(e) {
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Bn;
}
var ce = Rn, Dn = ie, Un = ce;
function Wn(e) {
  return e != null && Un(e.length) && !Dn(e);
}
var Kn = Wn, y = { exports: {} };
function Hn() {
  return !1;
}
var Vn = Hn;
y.exports;
(function(e, t) {
  var n = d, r = Vn, i = t && !t.nodeType && t, o = i && !0 && e && !e.nodeType && e, a = o && o.exports === i, c = a ? n.Buffer : void 0, h = c ? c.isBuffer : void 0, C = h || r;
  e.exports = C;
})(y, y.exports);
var Gn = y.exports, qn = $, Yn = ce, zn = E, Jn = "[object Arguments]", Xn = "[object Array]", Qn = "[object Boolean]", Zn = "[object Date]", er = "[object Error]", tr = "[object Function]", nr = "[object Map]", rr = "[object Number]", ir = "[object Object]", or = "[object RegExp]", sr = "[object Set]", ar = "[object String]", cr = "[object WeakMap]", ur = "[object ArrayBuffer]", dr = "[object DataView]", lr = "[object Float32Array]", fr = "[object Float64Array]", hr = "[object Int8Array]", vr = "[object Int16Array]", pr = "[object Int32Array]", mr = "[object Uint8Array]", br = "[object Uint8ClampedArray]", gr = "[object Uint16Array]", yr = "[object Uint32Array]", s = {};
s[lr] = s[fr] = s[hr] = s[vr] = s[pr] = s[mr] = s[br] = s[gr] = s[yr] = !0;
s[Jn] = s[Xn] = s[ur] = s[Qn] = s[dr] = s[Zn] = s[er] = s[tr] = s[nr] = s[rr] = s[ir] = s[or] = s[sr] = s[ar] = s[cr] = !1;
function _r(e) {
  return zn(e) && Yn(e.length) && !!s[qn(e)];
}
var $r = _r;
function Cr(e) {
  return function(t) {
    return e(t);
  };
}
var wr = Cr, _ = { exports: {} };
_.exports;
(function(e, t) {
  var n = ee, r = t && !t.nodeType && t, i = r && !0 && e && !e.nodeType && e, o = i && i.exports === r, a = o && n.process, c = function() {
    try {
      var h = i && i.require && i.require("util").types;
      return h || a && a.binding && a.binding("util");
    } catch {
    }
  }();
  e.exports = c;
})(_, _.exports);
var Mr = _.exports, Tr = $r, jr = wr, Y = Mr, z = Y && Y.isTypedArray, Ar = z ? jr(z) : Tr, Or = Ar, kr = Xe, Sr = Mn, xr = In, Er = Nn, Pr = Kn, Fr = Gn, Ir = Z, Lr = Or, Nr = "[object Map]", Br = "[object Set]", Rr = Object.prototype, Dr = Rr.hasOwnProperty;
function Ur(e) {
  if (e == null)
    return !0;
  if (Pr(e) && (Er(e) || typeof e == "string" || typeof e.splice == "function" || Fr(e) || Lr(e) || xr(e)))
    return !e.length;
  var t = Sr(e);
  if (t == Nr || t == Br)
    return !e.size;
  if (Ir(e))
    return !kr(e).length;
  for (var n in e)
    if (Dr.call(e, n))
      return !1;
  return !0;
}
var Wr = Ur;
const Kr = /* @__PURE__ */ le(Wr), zr = { type: "divider", id: "divider" };
function Jr(e) {
  if (Kr(e.options)) return;
  const t = x.extend(Be), n = new t({
    propsData: e
  });
  n.$on("close", () => {
    n.$off(), n.$destroy();
  }), n.$mount();
}
function Xr(e, t, n, r) {
  return typeof r == "function" ? r(e, t, n) : r === void 0 ? n : r;
}
export {
  Q as _,
  zr as d,
  Jr as o,
  Yr as r,
  Xr as u,
  qr as w
};
//# sourceMappingURL=menu-DyahFZcX.js.map
