import { Loading as Mr, CircleCheck as Bl, CircleClose as _r, Close as ri, ArrowDown as ki, Warning as xr, DocumentDelete as Vl, WarningFilled as Pr, ArrowLeft as Lr } from "@element-plus/icons-vue";
import { getCurrentScope as zl, onScopeDispose as Rr, unref as v, getCurrentInstance as ge, onMounted as he, nextTick as ce, ref as x, readonly as Fr, watch as q, warn as Hl, watchEffect as $r, onBeforeUnmount as Ve, inject as G, computed as b, isRef as lt, shallowRef as vo, onBeforeMount as Kl, provide as pe, defineComponent as H, openBlock as w, createElementBlock as L, mergeProps as Nt, renderSlot as K, toRef as Ze, onUnmounted as jl, createBlock as z, Transition as Vn, withCtx as E, withDirectives as ie, createElementVNode as R, normalizeClass as _, normalizeStyle as re, vShow as Ee, Fragment as fe, createVNode as P, reactive as ut, onActivated as Ul, onUpdated as Wl, resolveDynamicComponent as $e, createCommentVNode as V, cloneVNode as ql, Text as Dr, Comment as Gl, Teleport as Jl, onDeactivated as Yl, toDisplayString as ee, useSlots as ko, toRaw as go, withModifiers as le, vModelCheckbox as yo, createTextVNode as Z, toRefs as cn, vModelRadio as Nr, h as Zt, createSlots as Br, resolveComponent as Fe, resolveDirective as Zl, toHandlerKey as Ql, renderList as Ke, withKeys as En, vModelText as Xl, createApp as eu, createStaticVNode as tu, markRaw as Re } from "vue";
import { MapSvgIcon as nu, MapSvgSpriteColor as ou } from "@abi-software/svg-sprite";
import { Tooltip as iu, TreeControls as au, DrawToolbar as ru, fetchLabels as su, getFlatmapFilterOptions as lu } from "@abi-software/map-utilities";
import * as Vr from "https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.4.1/+esm";
import { AnnotationService as uu } from "@abi-software/sparc-annotation";
import { defineStore as cu, mapState as du } from "pinia";
const it = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (i) => {
  const a = e == null ? void 0 : e(i);
  if (n === !1 || !a)
    return t == null ? void 0 : t(i);
};
var da;
const se = typeof window < "u", fu = (e) => typeof e == "string", zr = () => {
}, si = se && ((da = window == null ? void 0 : window.navigator) == null ? void 0 : da.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function Ti(e) {
  return typeof e == "function" ? e() : v(e);
}
function pu(e) {
  return e;
}
function zn(e) {
  return zl() ? (Rr(e), !0) : !1;
}
function hu(e, t = !0) {
  ge() ? he(e) : t ? e() : ce(e);
}
function fa(e, t, n = {}) {
  const {
    immediate: o = !0
  } = n, i = x(!1);
  let a = null;
  function r() {
    a && (clearTimeout(a), a = null);
  }
  function s() {
    i.value = !1, r();
  }
  function l(...u) {
    r(), i.value = !0, a = setTimeout(() => {
      i.value = !1, a = null, e(...u);
    }, Ti(t));
  }
  return o && (i.value = !0, se && l()), zn(s), {
    isPending: Fr(i),
    start: l,
    stop: s
  };
}
function rt(e) {
  var t;
  const n = Ti(e);
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
}
const To = se ? window : void 0;
function He(...e) {
  let t, n, o, i;
  if (fu(e[0]) || Array.isArray(e[0]) ? ([n, o, i] = e, t = To) : [t, n, o, i] = e, !t)
    return zr;
  Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
  const a = [], r = () => {
    a.forEach((c) => c()), a.length = 0;
  }, s = (c, d, f, m) => (c.addEventListener(d, f, m), () => c.removeEventListener(d, f, m)), l = q(() => [rt(t), Ti(i)], ([c, d]) => {
    r(), c && a.push(...n.flatMap((f) => o.map((m) => s(c, f, m, d))));
  }, { immediate: !0, flush: "post" }), u = () => {
    l(), r();
  };
  return zn(u), u;
}
let pa = !1;
function mu(e, t, n = {}) {
  const { window: o = To, ignore: i = [], capture: a = !0, detectIframe: r = !1 } = n;
  if (!o)
    return;
  si && !pa && (pa = !0, Array.from(o.document.body.children).forEach((f) => f.addEventListener("click", zr)));
  let s = !0;
  const l = (f) => i.some((m) => {
    if (typeof m == "string")
      return Array.from(o.document.querySelectorAll(m)).some((p) => p === f.target || f.composedPath().includes(p));
    {
      const p = rt(m);
      return p && (f.target === p || f.composedPath().includes(p));
    }
  }), c = [
    He(o, "click", (f) => {
      const m = rt(e);
      if (!(!m || m === f.target || f.composedPath().includes(m))) {
        if (f.detail === 0 && (s = !l(f)), !s) {
          s = !0;
          return;
        }
        t(f);
      }
    }, { passive: !0, capture: a }),
    He(o, "pointerdown", (f) => {
      const m = rt(e);
      m && (s = !f.composedPath().includes(m) && !l(f));
    }, { passive: !0 }),
    r && He(o, "blur", (f) => {
      var m;
      const p = rt(e);
      ((m = o.document.activeElement) == null ? void 0 : m.tagName) === "IFRAME" && !(p != null && p.contains(o.document.activeElement)) && t(f);
    })
  ].filter(Boolean);
  return () => c.forEach((f) => f());
}
function Hr(e, t = !1) {
  const n = x(), o = () => n.value = !!e();
  return o(), hu(o, t), n;
}
const ha = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ma = "__vueuse_ssr_handlers__";
ha[ma] = ha[ma] || {};
var va = Object.getOwnPropertySymbols, vu = Object.prototype.hasOwnProperty, gu = Object.prototype.propertyIsEnumerable, yu = (e, t) => {
  var n = {};
  for (var o in e)
    vu.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && va)
    for (var o of va(e))
      t.indexOf(o) < 0 && gu.call(e, o) && (n[o] = e[o]);
  return n;
};
function bt(e, t, n = {}) {
  const o = n, { window: i = To } = o, a = yu(o, ["window"]);
  let r;
  const s = Hr(() => i && "ResizeObserver" in i), l = () => {
    r && (r.disconnect(), r = void 0);
  }, u = q(() => rt(e), (d) => {
    l(), s.value && i && d && (r = new ResizeObserver(t), r.observe(d, a));
  }, { immediate: !0, flush: "post" }), c = () => {
    l(), u();
  };
  return zn(c), {
    isSupported: s,
    stop: c
  };
}
var ga = Object.getOwnPropertySymbols, bu = Object.prototype.hasOwnProperty, wu = Object.prototype.propertyIsEnumerable, Su = (e, t) => {
  var n = {};
  for (var o in e)
    bu.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && ga)
    for (var o of ga(e))
      t.indexOf(o) < 0 && wu.call(e, o) && (n[o] = e[o]);
  return n;
};
function Cu(e, t, n = {}) {
  const o = n, { window: i = To } = o, a = Su(o, ["window"]);
  let r;
  const s = Hr(() => i && "MutationObserver" in i), l = () => {
    r && (r.disconnect(), r = void 0);
  }, u = q(() => rt(e), (d) => {
    l(), s.value && i && d && (r = new MutationObserver(t), r.observe(d, a));
  }, { immediate: !0 }), c = () => {
    l(), u();
  };
  return zn(c), {
    isSupported: s,
    stop: c
  };
}
var ya;
(function(e) {
  e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
})(ya || (ya = {}));
var Eu = Object.defineProperty, ba = Object.getOwnPropertySymbols, Iu = Object.prototype.hasOwnProperty, ku = Object.prototype.propertyIsEnumerable, wa = (e, t, n) => t in e ? Eu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Tu = (e, t) => {
  for (var n in t || (t = {}))
    Iu.call(t, n) && wa(e, n, t[n]);
  if (ba)
    for (var n of ba(t))
      ku.call(t, n) && wa(e, n, t[n]);
  return e;
};
const Au = {
  easeInSine: [0.12, 0, 0.39, 0],
  easeOutSine: [0.61, 1, 0.88, 1],
  easeInOutSine: [0.37, 0, 0.63, 1],
  easeInQuad: [0.11, 0, 0.5, 0],
  easeOutQuad: [0.5, 1, 0.89, 1],
  easeInOutQuad: [0.45, 0, 0.55, 1],
  easeInCubic: [0.32, 0, 0.67, 0],
  easeOutCubic: [0.33, 1, 0.68, 1],
  easeInOutCubic: [0.65, 0, 0.35, 1],
  easeInQuart: [0.5, 0, 0.75, 0],
  easeOutQuart: [0.25, 1, 0.5, 1],
  easeInOutQuart: [0.76, 0, 0.24, 1],
  easeInQuint: [0.64, 0, 0.78, 0],
  easeOutQuint: [0.22, 1, 0.36, 1],
  easeInOutQuint: [0.83, 0, 0.17, 1],
  easeInExpo: [0.7, 0, 0.84, 0],
  easeOutExpo: [0.16, 1, 0.3, 1],
  easeInOutExpo: [0.87, 0, 0.13, 1],
  easeInCirc: [0.55, 0, 1, 0.45],
  easeOutCirc: [0, 0.55, 0.45, 1],
  easeInOutCirc: [0.85, 0, 0.15, 1],
  easeInBack: [0.36, 0, 0.66, -0.56],
  easeOutBack: [0.34, 1.56, 0.64, 1],
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
};
Tu({
  linear: pu
}, Au);
/**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
process.env.NODE_ENV !== "production" && Object.freeze({});
process.env.NODE_ENV !== "production" && Object.freeze([]);
const Pt = () => {
}, Ou = Object.prototype.hasOwnProperty, Sa = (e, t) => Ou.call(e, t), Ie = Array.isArray, Se = (e) => typeof e == "function", je = (e) => typeof e == "string", ke = (e) => e !== null && typeof e == "object", Mu = Object.prototype.toString, _u = (e) => Mu.call(e), Wo = (e) => _u(e).slice(8, -1), Kr = (e) => {
  const t = /* @__PURE__ */ Object.create(null);
  return (n) => t[n] || (t[n] = e(n));
}, xu = /-(\w)/g, Pu = Kr(
  (e) => e.replace(xu, (t, n) => n ? n.toUpperCase() : "")
), Lu = /\B([A-Z])/g, Ru = Kr(
  (e) => e.replace(Lu, "-$1").toLowerCase()
);
var jr = typeof global == "object" && global && global.Object === Object && global, Fu = typeof self == "object" && self && self.Object === Object && self, tt = jr || Fu || Function("return this")(), Xe = tt.Symbol, Ur = Object.prototype, $u = Ur.hasOwnProperty, Du = Ur.toString, In = Xe ? Xe.toStringTag : void 0;
function Nu(e) {
  var t = $u.call(e, In), n = e[In];
  try {
    e[In] = void 0;
    var o = !0;
  } catch {
  }
  var i = Du.call(e);
  return o && (t ? e[In] = n : delete e[In]), i;
}
var Bu = Object.prototype, Vu = Bu.toString;
function zu(e) {
  return Vu.call(e);
}
var Hu = "[object Null]", Ku = "[object Undefined]", Ca = Xe ? Xe.toStringTag : void 0;
function dn(e) {
  return e == null ? e === void 0 ? Ku : Hu : Ca && Ca in Object(e) ? Nu(e) : zu(e);
}
function tn(e) {
  return e != null && typeof e == "object";
}
var ju = "[object Symbol]";
function Ao(e) {
  return typeof e == "symbol" || tn(e) && dn(e) == ju;
}
function Uu(e, t) {
  for (var n = -1, o = e == null ? 0 : e.length, i = Array(o); ++n < o; )
    i[n] = t(e[n], n, e);
  return i;
}
var Ue = Array.isArray, Wu = 1 / 0, Ea = Xe ? Xe.prototype : void 0, Ia = Ea ? Ea.toString : void 0;
function Wr(e) {
  if (typeof e == "string")
    return e;
  if (Ue(e))
    return Uu(e, Wr) + "";
  if (Ao(e))
    return Ia ? Ia.call(e) : "";
  var t = e + "";
  return t == "0" && 1 / e == -Wu ? "-0" : t;
}
var qu = /\s/;
function Gu(e) {
  for (var t = e.length; t-- && qu.test(e.charAt(t)); )
    ;
  return t;
}
var Ju = /^\s+/;
function Yu(e) {
  return e && e.slice(0, Gu(e) + 1).replace(Ju, "");
}
function It(e) {
  var t = typeof e;
  return e != null && (t == "object" || t == "function");
}
var ka = NaN, Zu = /^[-+]0x[0-9a-f]+$/i, Qu = /^0b[01]+$/i, Xu = /^0o[0-7]+$/i, ec = parseInt;
function Ta(e) {
  if (typeof e == "number")
    return e;
  if (Ao(e))
    return ka;
  if (It(e)) {
    var t = typeof e.valueOf == "function" ? e.valueOf() : e;
    e = It(t) ? t + "" : t;
  }
  if (typeof e != "string")
    return e === 0 ? e : +e;
  e = Yu(e);
  var n = Qu.test(e);
  return n || Xu.test(e) ? ec(e.slice(2), n ? 2 : 8) : Zu.test(e) ? ka : +e;
}
function qr(e) {
  return e;
}
var tc = "[object AsyncFunction]", nc = "[object Function]", oc = "[object GeneratorFunction]", ic = "[object Proxy]";
function Gr(e) {
  if (!It(e))
    return !1;
  var t = dn(e);
  return t == nc || t == oc || t == tc || t == ic;
}
var qo = tt["__core-js_shared__"], Aa = function() {
  var e = /[^.]+$/.exec(qo && qo.keys && qo.keys.IE_PROTO || "");
  return e ? "Symbol(src)_1." + e : "";
}();
function ac(e) {
  return !!Aa && Aa in e;
}
var rc = Function.prototype, sc = rc.toString;
function Bt(e) {
  if (e != null) {
    try {
      return sc.call(e);
    } catch {
    }
    try {
      return e + "";
    } catch {
    }
  }
  return "";
}
var lc = /[\\^$.*+?()[\]{}|]/g, uc = /^\[object .+?Constructor\]$/, cc = Function.prototype, dc = Object.prototype, fc = cc.toString, pc = dc.hasOwnProperty, hc = RegExp(
  "^" + fc.call(pc).replace(lc, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function mc(e) {
  if (!It(e) || ac(e))
    return !1;
  var t = Gr(e) ? hc : uc;
  return t.test(Bt(e));
}
function vc(e, t) {
  return e == null ? void 0 : e[t];
}
function Vt(e, t) {
  var n = vc(e, t);
  return mc(n) ? n : void 0;
}
var li = Vt(tt, "WeakMap");
function gc(e, t, n) {
  switch (n.length) {
    case 0:
      return e.call(t);
    case 1:
      return e.call(t, n[0]);
    case 2:
      return e.call(t, n[0], n[1]);
    case 3:
      return e.call(t, n[0], n[1], n[2]);
  }
  return e.apply(t, n);
}
var yc = 800, bc = 16, wc = Date.now;
function Sc(e) {
  var t = 0, n = 0;
  return function() {
    var o = wc(), i = bc - (o - n);
    if (n = o, i > 0) {
      if (++t >= yc)
        return arguments[0];
    } else
      t = 0;
    return e.apply(void 0, arguments);
  };
}
function Cc(e) {
  return function() {
    return e;
  };
}
var bo = function() {
  try {
    var e = Vt(Object, "defineProperty");
    return e({}, "", {}), e;
  } catch {
  }
}(), Ec = bo ? function(e, t) {
  return bo(e, "toString", {
    configurable: !0,
    enumerable: !1,
    value: Cc(t),
    writable: !0
  });
} : qr, Ic = Sc(Ec);
function kc(e, t, n, o) {
  e.length;
  for (var i = n + 1; i--; )
    if (t(e[i], i, e))
      return i;
  return -1;
}
var Tc = 9007199254740991, Ac = /^(?:0|[1-9]\d*)$/;
function Ai(e, t) {
  var n = typeof e;
  return t = t ?? Tc, !!t && (n == "number" || n != "symbol" && Ac.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
function Oc(e, t, n) {
  t == "__proto__" && bo ? bo(e, t, {
    configurable: !0,
    enumerable: !0,
    value: n,
    writable: !0
  }) : e[t] = n;
}
function Oi(e, t) {
  return e === t || e !== e && t !== t;
}
var Mc = Object.prototype, _c = Mc.hasOwnProperty;
function xc(e, t, n) {
  var o = e[t];
  (!(_c.call(e, t) && Oi(o, n)) || n === void 0 && !(t in e)) && Oc(e, t, n);
}
var Oa = Math.max;
function Pc(e, t, n) {
  return t = Oa(t === void 0 ? e.length - 1 : t, 0), function() {
    for (var o = arguments, i = -1, a = Oa(o.length - t, 0), r = Array(a); ++i < a; )
      r[i] = o[t + i];
    i = -1;
    for (var s = Array(t + 1); ++i < t; )
      s[i] = o[i];
    return s[t] = n(r), gc(e, this, s);
  };
}
var Lc = 9007199254740991;
function Mi(e) {
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Lc;
}
function Rc(e) {
  return e != null && Mi(e.length) && !Gr(e);
}
var Fc = Object.prototype;
function $c(e) {
  var t = e && e.constructor, n = typeof t == "function" && t.prototype || Fc;
  return e === n;
}
function Dc(e, t) {
  for (var n = -1, o = Array(e); ++n < e; )
    o[n] = t(n);
  return o;
}
var Nc = "[object Arguments]";
function Ma(e) {
  return tn(e) && dn(e) == Nc;
}
var Jr = Object.prototype, Bc = Jr.hasOwnProperty, Vc = Jr.propertyIsEnumerable, _i = Ma(/* @__PURE__ */ function() {
  return arguments;
}()) ? Ma : function(e) {
  return tn(e) && Bc.call(e, "callee") && !Vc.call(e, "callee");
};
function zc() {
  return !1;
}
var Yr = typeof exports == "object" && exports && !exports.nodeType && exports, _a = Yr && typeof module == "object" && module && !module.nodeType && module, Hc = _a && _a.exports === Yr, xa = Hc ? tt.Buffer : void 0, Kc = xa ? xa.isBuffer : void 0, ui = Kc || zc, jc = "[object Arguments]", Uc = "[object Array]", Wc = "[object Boolean]", qc = "[object Date]", Gc = "[object Error]", Jc = "[object Function]", Yc = "[object Map]", Zc = "[object Number]", Qc = "[object Object]", Xc = "[object RegExp]", ed = "[object Set]", td = "[object String]", nd = "[object WeakMap]", od = "[object ArrayBuffer]", id = "[object DataView]", ad = "[object Float32Array]", rd = "[object Float64Array]", sd = "[object Int8Array]", ld = "[object Int16Array]", ud = "[object Int32Array]", cd = "[object Uint8Array]", dd = "[object Uint8ClampedArray]", fd = "[object Uint16Array]", pd = "[object Uint32Array]", ae = {};
ae[ad] = ae[rd] = ae[sd] = ae[ld] = ae[ud] = ae[cd] = ae[dd] = ae[fd] = ae[pd] = !0;
ae[jc] = ae[Uc] = ae[od] = ae[Wc] = ae[id] = ae[qc] = ae[Gc] = ae[Jc] = ae[Yc] = ae[Zc] = ae[Qc] = ae[Xc] = ae[ed] = ae[td] = ae[nd] = !1;
function hd(e) {
  return tn(e) && Mi(e.length) && !!ae[dn(e)];
}
function md(e) {
  return function(t) {
    return e(t);
  };
}
var Zr = typeof exports == "object" && exports && !exports.nodeType && exports, On = Zr && typeof module == "object" && module && !module.nodeType && module, vd = On && On.exports === Zr, Go = vd && jr.process, Pa = function() {
  try {
    var e = On && On.require && On.require("util").types;
    return e || Go && Go.binding && Go.binding("util");
  } catch {
  }
}(), La = Pa && Pa.isTypedArray, Qr = La ? md(La) : hd, gd = Object.prototype, yd = gd.hasOwnProperty;
function bd(e, t) {
  var n = Ue(e), o = !n && _i(e), i = !n && !o && ui(e), a = !n && !o && !i && Qr(e), r = n || o || i || a, s = r ? Dc(e.length, String) : [], l = s.length;
  for (var u in e)
    yd.call(e, u) && !(r && // Safari 9 has enumerable `arguments.length` in strict mode.
    (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
    i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
    a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
    Ai(u, l))) && s.push(u);
  return s;
}
function wd(e, t) {
  return function(n) {
    return e(t(n));
  };
}
var Sd = wd(Object.keys, Object), Cd = Object.prototype, Ed = Cd.hasOwnProperty;
function Id(e) {
  if (!$c(e))
    return Sd(e);
  var t = [];
  for (var n in Object(e))
    Ed.call(e, n) && n != "constructor" && t.push(n);
  return t;
}
function Xr(e) {
  return Rc(e) ? bd(e) : Id(e);
}
var kd = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Td = /^\w*$/;
function xi(e, t) {
  if (Ue(e))
    return !1;
  var n = typeof e;
  return n == "number" || n == "symbol" || n == "boolean" || e == null || Ao(e) ? !0 : Td.test(e) || !kd.test(e) || t != null && e in Object(t);
}
var Pn = Vt(Object, "create");
function Ad() {
  this.__data__ = Pn ? Pn(null) : {}, this.size = 0;
}
function Od(e) {
  var t = this.has(e) && delete this.__data__[e];
  return this.size -= t ? 1 : 0, t;
}
var Md = "__lodash_hash_undefined__", _d = Object.prototype, xd = _d.hasOwnProperty;
function Pd(e) {
  var t = this.__data__;
  if (Pn) {
    var n = t[e];
    return n === Md ? void 0 : n;
  }
  return xd.call(t, e) ? t[e] : void 0;
}
var Ld = Object.prototype, Rd = Ld.hasOwnProperty;
function Fd(e) {
  var t = this.__data__;
  return Pn ? t[e] !== void 0 : Rd.call(t, e);
}
var $d = "__lodash_hash_undefined__";
function Dd(e, t) {
  var n = this.__data__;
  return this.size += this.has(e) ? 0 : 1, n[e] = Pn && t === void 0 ? $d : t, this;
}
function Ft(e) {
  var t = -1, n = e == null ? 0 : e.length;
  for (this.clear(); ++t < n; ) {
    var o = e[t];
    this.set(o[0], o[1]);
  }
}
Ft.prototype.clear = Ad;
Ft.prototype.delete = Od;
Ft.prototype.get = Pd;
Ft.prototype.has = Fd;
Ft.prototype.set = Dd;
function Nd() {
  this.__data__ = [], this.size = 0;
}
function Oo(e, t) {
  for (var n = e.length; n--; )
    if (Oi(e[n][0], t))
      return n;
  return -1;
}
var Bd = Array.prototype, Vd = Bd.splice;
function zd(e) {
  var t = this.__data__, n = Oo(t, e);
  if (n < 0)
    return !1;
  var o = t.length - 1;
  return n == o ? t.pop() : Vd.call(t, n, 1), --this.size, !0;
}
function Hd(e) {
  var t = this.__data__, n = Oo(t, e);
  return n < 0 ? void 0 : t[n][1];
}
function Kd(e) {
  return Oo(this.__data__, e) > -1;
}
function jd(e, t) {
  var n = this.__data__, o = Oo(n, e);
  return o < 0 ? (++this.size, n.push([e, t])) : n[o][1] = t, this;
}
function ft(e) {
  var t = -1, n = e == null ? 0 : e.length;
  for (this.clear(); ++t < n; ) {
    var o = e[t];
    this.set(o[0], o[1]);
  }
}
ft.prototype.clear = Nd;
ft.prototype.delete = zd;
ft.prototype.get = Hd;
ft.prototype.has = Kd;
ft.prototype.set = jd;
var Ln = Vt(tt, "Map");
function Ud() {
  this.size = 0, this.__data__ = {
    hash: new Ft(),
    map: new (Ln || ft)(),
    string: new Ft()
  };
}
function Wd(e) {
  var t = typeof e;
  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
function Mo(e, t) {
  var n = e.__data__;
  return Wd(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
}
function qd(e) {
  var t = Mo(this, e).delete(e);
  return this.size -= t ? 1 : 0, t;
}
function Gd(e) {
  return Mo(this, e).get(e);
}
function Jd(e) {
  return Mo(this, e).has(e);
}
function Yd(e, t) {
  var n = Mo(this, e), o = n.size;
  return n.set(e, t), this.size += n.size == o ? 0 : 1, this;
}
function pt(e) {
  var t = -1, n = e == null ? 0 : e.length;
  for (this.clear(); ++t < n; ) {
    var o = e[t];
    this.set(o[0], o[1]);
  }
}
pt.prototype.clear = Ud;
pt.prototype.delete = qd;
pt.prototype.get = Gd;
pt.prototype.has = Jd;
pt.prototype.set = Yd;
var Zd = "Expected a function";
function Pi(e, t) {
  if (typeof e != "function" || t != null && typeof t != "function")
    throw new TypeError(Zd);
  var n = function() {
    var o = arguments, i = t ? t.apply(this, o) : o[0], a = n.cache;
    if (a.has(i))
      return a.get(i);
    var r = e.apply(this, o);
    return n.cache = a.set(i, r) || a, r;
  };
  return n.cache = new (Pi.Cache || pt)(), n;
}
Pi.Cache = pt;
var Qd = 500;
function Xd(e) {
  var t = Pi(e, function(o) {
    return n.size === Qd && n.clear(), o;
  }), n = t.cache;
  return t;
}
var ef = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, tf = /\\(\\)?/g, nf = Xd(function(e) {
  var t = [];
  return e.charCodeAt(0) === 46 && t.push(""), e.replace(ef, function(n, o, i, a) {
    t.push(i ? a.replace(tf, "$1") : o || n);
  }), t;
});
function of(e) {
  return e == null ? "" : Wr(e);
}
function _o(e, t) {
  return Ue(e) ? e : xi(e, t) ? [e] : nf(of(e));
}
var af = 1 / 0;
function Hn(e) {
  if (typeof e == "string" || Ao(e))
    return e;
  var t = e + "";
  return t == "0" && 1 / e == -af ? "-0" : t;
}
function Li(e, t) {
  t = _o(t, e);
  for (var n = 0, o = t.length; e != null && n < o; )
    e = e[Hn(t[n++])];
  return n && n == o ? e : void 0;
}
function at(e, t, n) {
  var o = e == null ? void 0 : Li(e, t);
  return o === void 0 ? n : o;
}
function es(e, t) {
  for (var n = -1, o = t.length, i = e.length; ++n < o; )
    e[i + n] = t[n];
  return e;
}
var Ra = Xe ? Xe.isConcatSpreadable : void 0;
function rf(e) {
  return Ue(e) || _i(e) || !!(Ra && e && e[Ra]);
}
function sf(e, t, n, o, i) {
  var a = -1, r = e.length;
  for (n || (n = rf), i || (i = []); ++a < r; ) {
    var s = e[a];
    n(s) ? es(i, s) : i[i.length] = s;
  }
  return i;
}
function lf(e) {
  var t = e == null ? 0 : e.length;
  return t ? sf(e) : [];
}
function uf(e) {
  return Ic(Pc(e, void 0, lf), e + "");
}
function St() {
  if (!arguments.length)
    return [];
  var e = arguments[0];
  return Ue(e) ? e : [e];
}
function cf() {
  this.__data__ = new ft(), this.size = 0;
}
function df(e) {
  var t = this.__data__, n = t.delete(e);
  return this.size = t.size, n;
}
function ff(e) {
  return this.__data__.get(e);
}
function pf(e) {
  return this.__data__.has(e);
}
var hf = 200;
function mf(e, t) {
  var n = this.__data__;
  if (n instanceof ft) {
    var o = n.__data__;
    if (!Ln || o.length < hf - 1)
      return o.push([e, t]), this.size = ++n.size, this;
    n = this.__data__ = new pt(o);
  }
  return n.set(e, t), this.size = n.size, this;
}
function st(e) {
  var t = this.__data__ = new ft(e);
  this.size = t.size;
}
st.prototype.clear = cf;
st.prototype.delete = df;
st.prototype.get = ff;
st.prototype.has = pf;
st.prototype.set = mf;
function vf(e, t) {
  for (var n = -1, o = e == null ? 0 : e.length, i = 0, a = []; ++n < o; ) {
    var r = e[n];
    t(r, n, e) && (a[i++] = r);
  }
  return a;
}
function gf() {
  return [];
}
var yf = Object.prototype, bf = yf.propertyIsEnumerable, Fa = Object.getOwnPropertySymbols, wf = Fa ? function(e) {
  return e == null ? [] : (e = Object(e), vf(Fa(e), function(t) {
    return bf.call(e, t);
  }));
} : gf;
function Sf(e, t, n) {
  var o = t(e);
  return Ue(e) ? o : es(o, n(e));
}
function $a(e) {
  return Sf(e, Xr, wf);
}
var ci = Vt(tt, "DataView"), di = Vt(tt, "Promise"), fi = Vt(tt, "Set"), Da = "[object Map]", Cf = "[object Object]", Na = "[object Promise]", Ba = "[object Set]", Va = "[object WeakMap]", za = "[object DataView]", Ef = Bt(ci), If = Bt(Ln), kf = Bt(di), Tf = Bt(fi), Af = Bt(li), wt = dn;
(ci && wt(new ci(new ArrayBuffer(1))) != za || Ln && wt(new Ln()) != Da || di && wt(di.resolve()) != Na || fi && wt(new fi()) != Ba || li && wt(new li()) != Va) && (wt = function(e) {
  var t = dn(e), n = t == Cf ? e.constructor : void 0, o = n ? Bt(n) : "";
  if (o)
    switch (o) {
      case Ef:
        return za;
      case If:
        return Da;
      case kf:
        return Na;
      case Tf:
        return Ba;
      case Af:
        return Va;
    }
  return t;
});
var Ha = tt.Uint8Array, Of = "__lodash_hash_undefined__";
function Mf(e) {
  return this.__data__.set(e, Of), this;
}
function _f(e) {
  return this.__data__.has(e);
}
function wo(e) {
  var t = -1, n = e == null ? 0 : e.length;
  for (this.__data__ = new pt(); ++t < n; )
    this.add(e[t]);
}
wo.prototype.add = wo.prototype.push = Mf;
wo.prototype.has = _f;
function xf(e, t) {
  for (var n = -1, o = e == null ? 0 : e.length; ++n < o; )
    if (t(e[n], n, e))
      return !0;
  return !1;
}
function Pf(e, t) {
  return e.has(t);
}
var Lf = 1, Rf = 2;
function ts(e, t, n, o, i, a) {
  var r = n & Lf, s = e.length, l = t.length;
  if (s != l && !(r && l > s))
    return !1;
  var u = a.get(e), c = a.get(t);
  if (u && c)
    return u == t && c == e;
  var d = -1, f = !0, m = n & Rf ? new wo() : void 0;
  for (a.set(e, t), a.set(t, e); ++d < s; ) {
    var p = e[d], h = t[d];
    if (o)
      var g = r ? o(h, p, d, t, e, a) : o(p, h, d, e, t, a);
    if (g !== void 0) {
      if (g)
        continue;
      f = !1;
      break;
    }
    if (m) {
      if (!xf(t, function(y, C) {
        if (!Pf(m, C) && (p === y || i(p, y, n, o, a)))
          return m.push(C);
      })) {
        f = !1;
        break;
      }
    } else if (!(p === h || i(p, h, n, o, a))) {
      f = !1;
      break;
    }
  }
  return a.delete(e), a.delete(t), f;
}
function Ff(e) {
  var t = -1, n = Array(e.size);
  return e.forEach(function(o, i) {
    n[++t] = [i, o];
  }), n;
}
function $f(e) {
  var t = -1, n = Array(e.size);
  return e.forEach(function(o) {
    n[++t] = o;
  }), n;
}
var Df = 1, Nf = 2, Bf = "[object Boolean]", Vf = "[object Date]", zf = "[object Error]", Hf = "[object Map]", Kf = "[object Number]", jf = "[object RegExp]", Uf = "[object Set]", Wf = "[object String]", qf = "[object Symbol]", Gf = "[object ArrayBuffer]", Jf = "[object DataView]", Ka = Xe ? Xe.prototype : void 0, Jo = Ka ? Ka.valueOf : void 0;
function Yf(e, t, n, o, i, a, r) {
  switch (n) {
    case Jf:
      if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
        return !1;
      e = e.buffer, t = t.buffer;
    case Gf:
      return !(e.byteLength != t.byteLength || !a(new Ha(e), new Ha(t)));
    case Bf:
    case Vf:
    case Kf:
      return Oi(+e, +t);
    case zf:
      return e.name == t.name && e.message == t.message;
    case jf:
    case Wf:
      return e == t + "";
    case Hf:
      var s = Ff;
    case Uf:
      var l = o & Df;
      if (s || (s = $f), e.size != t.size && !l)
        return !1;
      var u = r.get(e);
      if (u)
        return u == t;
      o |= Nf, r.set(e, t);
      var c = ts(s(e), s(t), o, i, a, r);
      return r.delete(e), c;
    case qf:
      if (Jo)
        return Jo.call(e) == Jo.call(t);
  }
  return !1;
}
var Zf = 1, Qf = Object.prototype, Xf = Qf.hasOwnProperty;
function ep(e, t, n, o, i, a) {
  var r = n & Zf, s = $a(e), l = s.length, u = $a(t), c = u.length;
  if (l != c && !r)
    return !1;
  for (var d = l; d--; ) {
    var f = s[d];
    if (!(r ? f in t : Xf.call(t, f)))
      return !1;
  }
  var m = a.get(e), p = a.get(t);
  if (m && p)
    return m == t && p == e;
  var h = !0;
  a.set(e, t), a.set(t, e);
  for (var g = r; ++d < l; ) {
    f = s[d];
    var y = e[f], C = t[f];
    if (o)
      var O = r ? o(C, y, f, t, e, a) : o(y, C, f, e, t, a);
    if (!(O === void 0 ? y === C || i(y, C, n, o, a) : O)) {
      h = !1;
      break;
    }
    g || (g = f == "constructor");
  }
  if (h && !g) {
    var T = e.constructor, I = t.constructor;
    T != I && "constructor" in e && "constructor" in t && !(typeof T == "function" && T instanceof T && typeof I == "function" && I instanceof I) && (h = !1);
  }
  return a.delete(e), a.delete(t), h;
}
var tp = 1, ja = "[object Arguments]", Ua = "[object Array]", no = "[object Object]", np = Object.prototype, Wa = np.hasOwnProperty;
function op(e, t, n, o, i, a) {
  var r = Ue(e), s = Ue(t), l = r ? Ua : wt(e), u = s ? Ua : wt(t);
  l = l == ja ? no : l, u = u == ja ? no : u;
  var c = l == no, d = u == no, f = l == u;
  if (f && ui(e)) {
    if (!ui(t))
      return !1;
    r = !0, c = !1;
  }
  if (f && !c)
    return a || (a = new st()), r || Qr(e) ? ts(e, t, n, o, i, a) : Yf(e, t, l, n, o, i, a);
  if (!(n & tp)) {
    var m = c && Wa.call(e, "__wrapped__"), p = d && Wa.call(t, "__wrapped__");
    if (m || p) {
      var h = m ? e.value() : e, g = p ? t.value() : t;
      return a || (a = new st()), i(h, g, n, o, a);
    }
  }
  return f ? (a || (a = new st()), ep(e, t, n, o, i, a)) : !1;
}
function xo(e, t, n, o, i) {
  return e === t ? !0 : e == null || t == null || !tn(e) && !tn(t) ? e !== e && t !== t : op(e, t, n, o, xo, i);
}
var ip = 1, ap = 2;
function rp(e, t, n, o) {
  var i = n.length, a = i;
  if (e == null)
    return !a;
  for (e = Object(e); i--; ) {
    var r = n[i];
    if (r[2] ? r[1] !== e[r[0]] : !(r[0] in e))
      return !1;
  }
  for (; ++i < a; ) {
    r = n[i];
    var s = r[0], l = e[s], u = r[1];
    if (r[2]) {
      if (l === void 0 && !(s in e))
        return !1;
    } else {
      var c = new st(), d;
      if (!(d === void 0 ? xo(u, l, ip | ap, o, c) : d))
        return !1;
    }
  }
  return !0;
}
function ns(e) {
  return e === e && !It(e);
}
function sp(e) {
  for (var t = Xr(e), n = t.length; n--; ) {
    var o = t[n], i = e[o];
    t[n] = [o, i, ns(i)];
  }
  return t;
}
function os(e, t) {
  return function(n) {
    return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n));
  };
}
function lp(e) {
  var t = sp(e);
  return t.length == 1 && t[0][2] ? os(t[0][0], t[0][1]) : function(n) {
    return n === e || rp(n, e, t);
  };
}
function up(e, t) {
  return e != null && t in Object(e);
}
function cp(e, t, n) {
  t = _o(t, e);
  for (var o = -1, i = t.length, a = !1; ++o < i; ) {
    var r = Hn(t[o]);
    if (!(a = e != null && n(e, r)))
      break;
    e = e[r];
  }
  return a || ++o != i ? a : (i = e == null ? 0 : e.length, !!i && Mi(i) && Ai(r, i) && (Ue(e) || _i(e)));
}
function is(e, t) {
  return e != null && cp(e, t, up);
}
var dp = 1, fp = 2;
function pp(e, t) {
  return xi(e) && ns(t) ? os(Hn(e), t) : function(n) {
    var o = at(n, e);
    return o === void 0 && o === t ? is(n, e) : xo(t, o, dp | fp);
  };
}
function hp(e) {
  return function(t) {
    return t == null ? void 0 : t[e];
  };
}
function mp(e) {
  return function(t) {
    return Li(t, e);
  };
}
function vp(e) {
  return xi(e) ? hp(Hn(e)) : mp(e);
}
function gp(e) {
  return typeof e == "function" ? e : e == null ? qr : typeof e == "object" ? Ue(e) ? pp(e[0], e[1]) : lp(e) : vp(e);
}
var Yo = function() {
  return tt.Date.now();
}, yp = "Expected a function", bp = Math.max, wp = Math.min;
function Sp(e, t, n) {
  var o, i, a, r, s, l, u = 0, c = !1, d = !1, f = !0;
  if (typeof e != "function")
    throw new TypeError(yp);
  t = Ta(t) || 0, It(n) && (c = !!n.leading, d = "maxWait" in n, a = d ? bp(Ta(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f);
  function m(k) {
    var A = o, $ = i;
    return o = i = void 0, u = k, r = e.apply($, A), r;
  }
  function p(k) {
    return u = k, s = setTimeout(y, t), c ? m(k) : r;
  }
  function h(k) {
    var A = k - l, $ = k - u, N = t - A;
    return d ? wp(N, a - $) : N;
  }
  function g(k) {
    var A = k - l, $ = k - u;
    return l === void 0 || A >= t || A < 0 || d && $ >= a;
  }
  function y() {
    var k = Yo();
    if (g(k))
      return C(k);
    s = setTimeout(y, h(k));
  }
  function C(k) {
    return s = void 0, f && o ? m(k) : (o = i = void 0, r);
  }
  function O() {
    s !== void 0 && clearTimeout(s), u = 0, o = l = i = s = void 0;
  }
  function T() {
    return s === void 0 ? r : C(Yo());
  }
  function I() {
    var k = Yo(), A = g(k);
    if (o = arguments, i = this, l = k, A) {
      if (s === void 0)
        return p(l);
      if (d)
        return clearTimeout(s), s = setTimeout(y, t), m(l);
    }
    return s === void 0 && (s = setTimeout(y, t)), r;
  }
  return I.cancel = O, I.flush = T, I;
}
function Cp(e, t, n) {
  var o = e == null ? 0 : e.length;
  if (!o)
    return -1;
  var i = o - 1;
  return kc(e, gp(t), i);
}
function pi(e) {
  for (var t = -1, n = e == null ? 0 : e.length, o = {}; ++t < n; ) {
    var i = e[t];
    o[i[0]] = i[1];
  }
  return o;
}
function So(e, t) {
  return xo(e, t);
}
function Po(e) {
  return e == null;
}
function as(e) {
  return e === void 0;
}
function Ep(e, t, n, o) {
  if (!It(e))
    return e;
  t = _o(t, e);
  for (var i = -1, a = t.length, r = a - 1, s = e; s != null && ++i < a; ) {
    var l = Hn(t[i]), u = n;
    if (l === "__proto__" || l === "constructor" || l === "prototype")
      return e;
    if (i != r) {
      var c = s[l];
      u = void 0, u === void 0 && (u = It(c) ? c : Ai(t[i + 1]) ? [] : {});
    }
    xc(s, l, u), s = s[l];
  }
  return e;
}
function Ip(e, t, n) {
  for (var o = -1, i = t.length, a = {}; ++o < i; ) {
    var r = t[o], s = Li(e, r);
    n(s, r) && Ep(a, _o(r, e), s);
  }
  return a;
}
function kp(e, t) {
  return Ip(e, t, function(n, o) {
    return is(e, o);
  });
}
var rs = uf(function(e, t) {
  return e == null ? {} : kp(e, t);
});
const Ct = (e) => e === void 0, ct = (e) => typeof e == "boolean", me = (e) => typeof e == "number", Lt = (e) => typeof Element > "u" ? !1 : e instanceof Element, Rn = (e) => Po(e), Tp = (e) => je(e) ? !Number.isNaN(Number(e)) : !1, Ap = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), qa = (e) => Object.keys(e);
class ss extends Error {
  constructor(t) {
    super(t), this.name = "ElementPlusError";
  }
}
function ls(e, t) {
  throw new ss(`[${e}] ${t}`);
}
function Oe(e, t) {
  if (process.env.NODE_ENV !== "production") {
    const n = je(e) ? new ss(`[${e}] ${t}`) : e;
    console.warn(n);
  }
}
const Op = "utils/dom/style", us = (e = "") => e.split(" ").filter((t) => !!t.trim()), Ga = (e, t) => {
  if (!e || !t)
    return !1;
  if (t.includes(" "))
    throw new Error("className should not contain space.");
  return e.classList.contains(t);
}, hi = (e, t) => {
  !e || !t.trim() || e.classList.add(...us(t));
}, Fn = (e, t) => {
  !e || !t.trim() || e.classList.remove(...us(t));
}, Qt = (e, t) => {
  var n;
  if (!se || !e || !t)
    return "";
  let o = Pu(t);
  o === "float" && (o = "cssFloat");
  try {
    const i = e.style[o];
    if (i)
      return i;
    const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, "");
    return a ? a[o] : "";
  } catch {
    return e.style[o];
  }
};
function $t(e, t = "px") {
  if (!e)
    return "";
  if (me(e) || Tp(e))
    return `${e}${t}`;
  if (je(e))
    return e;
  Oe(Op, "binding value must be a string or number");
}
let oo;
const Mp = (e) => {
  var t;
  if (!se)
    return 0;
  if (oo !== void 0)
    return oo;
  const n = document.createElement("div");
  n.className = `${e}-scrollbar__wrap`, n.style.visibility = "hidden", n.style.width = "100px", n.style.position = "absolute", n.style.top = "-9999px", document.body.appendChild(n);
  const o = n.offsetWidth;
  n.style.overflow = "scroll";
  const i = document.createElement("div");
  i.style.width = "100%", n.appendChild(i);
  const a = i.offsetWidth;
  return (t = n.parentNode) == null || t.removeChild(n), oo = o - a, oo;
};
function _p(e, t) {
  if (!se)
    return;
  if (!t) {
    e.scrollTop = 0;
    return;
  }
  const n = [];
  let o = t.offsetParent;
  for (; o !== null && e !== o && e.contains(o); )
    n.push(o), o = o.offsetParent;
  const i = t.offsetTop + n.reduce((l, u) => l + u.offsetTop, 0), a = i + t.offsetHeight, r = e.scrollTop, s = r + e.clientHeight;
  i < r ? e.scrollTop = i : a > s && (e.scrollTop = a - e.clientHeight);
}
const cs = "__epPropKey", U = (e) => e, xp = (e) => ke(e) && !!e[cs], Lo = (e, t) => {
  if (!ke(e) || xp(e))
    return e;
  const { values: n, required: o, default: i, type: a, validator: r } = e, l = {
    type: a,
    required: !!o,
    validator: n || r ? (u) => {
      let c = !1, d = [];
      if (n && (d = Array.from(n), Sa(e, "default") && d.push(i), c || (c = d.includes(u))), r && (c || (c = r(u))), !c && d.length > 0) {
        const f = [...new Set(d)].map((m) => JSON.stringify(m)).join(", ");
        Hl(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`);
      }
      return c;
    } : void 0,
    [cs]: !0
  };
  return Sa(e, "default") && (l.default = i), l;
}, Q = (e) => pi(Object.entries(e).map(([t, n]) => [
  t,
  Lo(n, t)
])), nn = U([
  String,
  Object,
  Function
]), Pp = {
  Close: ri
}, Lp = {
  validating: Mr,
  success: Bl,
  error: _r
}, Me = (e, t) => {
  if (e.install = (n) => {
    for (const o of [e, ...Object.values(t ?? {})])
      n.component(o.name, o);
  }, t)
    for (const [n, o] of Object.entries(t))
      e[n] = o;
  return e;
}, Rp = (e, t) => (e.install = (n) => {
  n.directive(t, e);
}, e), zt = (e) => (e.install = Pt, e), Fp = (...e) => (t) => {
  e.forEach((n) => {
    Se(n) ? n(t) : n.value = t;
  });
}, $n = {
  tab: "Tab",
  enter: "Enter",
  space: "Space",
  left: "ArrowLeft",
  up: "ArrowUp",
  right: "ArrowRight",
  down: "ArrowDown",
  esc: "Escape",
  delete: "Delete",
  backspace: "Backspace",
  numpadEnter: "NumpadEnter",
  pageUp: "PageUp",
  pageDown: "PageDown",
  home: "Home",
  end: "End"
}, we = "update:modelValue", Ri = "change", ds = ["", "default", "small", "large"];
var po = /* @__PURE__ */ ((e) => (e[e.TEXT = 1] = "TEXT", e[e.CLASS = 2] = "CLASS", e[e.STYLE = 4] = "STYLE", e[e.PROPS = 8] = "PROPS", e[e.FULL_PROPS = 16] = "FULL_PROPS", e[e.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", e[e.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", e[e.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", e[e.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", e[e.NEED_PATCH = 512] = "NEED_PATCH", e[e.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", e[e.HOISTED = -1] = "HOISTED", e[e.BAIL = -2] = "BAIL", e))(po || {});
const $p = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), kn = (e) => e, en = ({ from: e, replacement: t, scope: n, version: o, ref: i, type: a = "API" }, r) => {
  q(() => v(r), (s) => {
    s && Oe(n, `[${a}] ${e} is about to be deprecated in version ${o}, please use ${t} instead.
For more detail, please visit: ${i}
`);
  }, {
    immediate: !0
  });
}, Dp = (e, t, n, o) => {
  let i = {
    offsetX: 0,
    offsetY: 0
  };
  const a = (u) => {
    const c = u.clientX, d = u.clientY, { offsetX: f, offsetY: m } = i, p = e.value.getBoundingClientRect(), h = p.left, g = p.top, y = p.width, C = p.height, O = document.documentElement.clientWidth, T = document.documentElement.clientHeight, I = -h + f, k = -g + m, A = O - h - y + f, $ = T - g - C + m, N = (B) => {
      let M = f + B.clientX - c, W = m + B.clientY - d;
      o != null && o.value || (M = Math.min(Math.max(M, I), A), W = Math.min(Math.max(W, k), $)), i = {
        offsetX: M,
        offsetY: W
      }, e.value && (e.value.style.transform = `translate(${$t(M)}, ${$t(W)})`);
    }, j = () => {
      document.removeEventListener("mousemove", N), document.removeEventListener("mouseup", j);
    };
    document.addEventListener("mousemove", N), document.addEventListener("mouseup", j);
  }, r = () => {
    t.value && e.value && t.value.addEventListener("mousedown", a);
  }, s = () => {
    t.value && e.value && t.value.removeEventListener("mousedown", a);
  }, l = () => {
    i = {
      offsetX: 0,
      offsetY: 0
    }, e.value && (e.value.style.transform = "none");
  };
  return he(() => {
    $r(() => {
      n.value ? r() : s();
    });
  }), Ve(() => {
    s();
  }), {
    resetPosition: l
  };
};
var Np = {
  name: "en",
  el: {
    breadcrumb: {
      label: "Breadcrumb"
    },
    colorpicker: {
      confirm: "OK",
      clear: "Clear",
      defaultLabel: "color picker",
      description: "current color is {color}. press enter to select a new color.",
      alphaLabel: "pick alpha value"
    },
    datepicker: {
      now: "Now",
      today: "Today",
      cancel: "Cancel",
      clear: "Clear",
      confirm: "OK",
      dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
      monthTablePrompt: "Use the arrow keys and enter to select the month",
      yearTablePrompt: "Use the arrow keys and enter to select the year",
      selectedDate: "Selected date",
      selectDate: "Select date",
      selectTime: "Select time",
      startDate: "Start Date",
      startTime: "Start Time",
      endDate: "End Date",
      endTime: "End Time",
      prevYear: "Previous Year",
      nextYear: "Next Year",
      prevMonth: "Previous Month",
      nextMonth: "Next Month",
      year: "",
      month1: "January",
      month2: "February",
      month3: "March",
      month4: "April",
      month5: "May",
      month6: "June",
      month7: "July",
      month8: "August",
      month9: "September",
      month10: "October",
      month11: "November",
      month12: "December",
      week: "week",
      weeks: {
        sun: "Sun",
        mon: "Mon",
        tue: "Tue",
        wed: "Wed",
        thu: "Thu",
        fri: "Fri",
        sat: "Sat"
      },
      weeksFull: {
        sun: "Sunday",
        mon: "Monday",
        tue: "Tuesday",
        wed: "Wednesday",
        thu: "Thursday",
        fri: "Friday",
        sat: "Saturday"
      },
      months: {
        jan: "Jan",
        feb: "Feb",
        mar: "Mar",
        apr: "Apr",
        may: "May",
        jun: "Jun",
        jul: "Jul",
        aug: "Aug",
        sep: "Sep",
        oct: "Oct",
        nov: "Nov",
        dec: "Dec"
      }
    },
    inputNumber: {
      decrease: "decrease number",
      increase: "increase number"
    },
    select: {
      loading: "Loading",
      noMatch: "No matching data",
      noData: "No data",
      placeholder: "Select"
    },
    mention: {
      loading: "Loading"
    },
    dropdown: {
      toggleDropdown: "Toggle Dropdown"
    },
    cascader: {
      noMatch: "No matching data",
      loading: "Loading",
      placeholder: "Select",
      noData: "No data"
    },
    pagination: {
      goto: "Go to",
      pagesize: "/page",
      total: "Total {total}",
      pageClassifier: "",
      page: "Page",
      prev: "Go to previous page",
      next: "Go to next page",
      currentPage: "page {pager}",
      prevPages: "Previous {pager} pages",
      nextPages: "Next {pager} pages",
      deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
    },
    dialog: {
      close: "Close this dialog"
    },
    drawer: {
      close: "Close this dialog"
    },
    messagebox: {
      title: "Message",
      confirm: "OK",
      cancel: "Cancel",
      error: "Illegal input",
      close: "Close this dialog"
    },
    upload: {
      deleteTip: "press delete to remove",
      delete: "Delete",
      preview: "Preview",
      continue: "Continue"
    },
    slider: {
      defaultLabel: "slider between {min} and {max}",
      defaultRangeStartLabel: "pick start value",
      defaultRangeEndLabel: "pick end value"
    },
    table: {
      emptyText: "No Data",
      confirmFilter: "Confirm",
      resetFilter: "Reset",
      clearFilter: "All",
      sumText: "Sum"
    },
    tour: {
      next: "Next",
      previous: "Previous",
      finish: "Finish"
    },
    tree: {
      emptyText: "No Data"
    },
    transfer: {
      noMatch: "No matching data",
      noData: "No data",
      titles: ["List 1", "List 2"],
      filterPlaceholder: "Enter keyword",
      noCheckedFormat: "{total} items",
      hasCheckedFormat: "{checked}/{total} checked"
    },
    image: {
      error: "FAILED"
    },
    pageHeader: {
      title: "Back"
    },
    popconfirm: {
      confirmButtonText: "Yes",
      cancelButtonText: "No"
    },
    carousel: {
      leftArrow: "Carousel arrow left",
      rightArrow: "Carousel arrow right",
      indicator: "Carousel switch to index {index}"
    }
  }
};
const Bp = (e) => (t, n) => Vp(t, n, v(e)), Vp = (e, t, n) => at(n, e, e).replace(/\{(\w+)\}/g, (o, i) => {
  var a;
  return `${(a = t == null ? void 0 : t[i]) != null ? a : `{${i}}`}`;
}), zp = (e) => {
  const t = b(() => v(e).name), n = lt(e) ? e : x(e);
  return {
    lang: t,
    locale: n,
    t: Bp(e)
  };
}, fs = Symbol("localeContextKey"), Fi = (e) => {
  const t = e || G(fs, x());
  return zp(b(() => t.value || Np));
}, Mn = "el", Hp = "is-", _t = (e, t, n, o, i) => {
  let a = `${e}-${t}`;
  return n && (a += `-${n}`), o && (a += `__${o}`), i && (a += `--${i}`), a;
}, ps = Symbol("namespaceContextKey"), $i = (e) => {
  const t = e || (ge() ? G(ps, x(Mn)) : x(Mn));
  return b(() => v(t) || Mn);
}, te = (e, t) => {
  const n = $i(t);
  return {
    namespace: n,
    b: (h = "") => _t(n.value, e, h, "", ""),
    e: (h) => h ? _t(n.value, e, "", h, "") : "",
    m: (h) => h ? _t(n.value, e, "", "", h) : "",
    be: (h, g) => h && g ? _t(n.value, e, h, g, "") : "",
    em: (h, g) => h && g ? _t(n.value, e, "", h, g) : "",
    bm: (h, g) => h && g ? _t(n.value, e, h, "", g) : "",
    bem: (h, g, y) => h && g && y ? _t(n.value, e, h, g, y) : "",
    is: (h, ...g) => {
      const y = g.length >= 1 ? g[0] : !0;
      return h && y ? `${Hp}${h}` : "";
    },
    cssVar: (h) => {
      const g = {};
      for (const y in h)
        h[y] && (g[`--${n.value}-${y}`] = h[y]);
      return g;
    },
    cssVarName: (h) => `--${n.value}-${h}`,
    cssVarBlock: (h) => {
      const g = {};
      for (const y in h)
        h[y] && (g[`--${n.value}-${e}-${y}`] = h[y]);
      return g;
    },
    cssVarBlockName: (h) => `--${n.value}-${e}-${h}`
  };
}, Kp = (e, t = {}) => {
  lt(e) || ls("[useLockscreen]", "You need to pass a ref param to this function");
  const n = t.ns || te("popup"), o = b(() => n.bm("parent", "hidden"));
  if (!se || Ga(document.body, o.value))
    return;
  let i = 0, a = !1, r = "0";
  const s = () => {
    setTimeout(() => {
      Fn(document == null ? void 0 : document.body, o.value), a && document && (document.body.style.width = r);
    }, 200);
  };
  q(e, (l) => {
    if (!l) {
      s();
      return;
    }
    a = !Ga(document.body, o.value), a && (r = document.body.style.width), i = Mp(n.namespace.value);
    const u = document.documentElement.clientHeight < document.body.scrollHeight, c = Qt(document.body, "overflowY");
    i > 0 && (u || c === "scroll") && a && (document.body.style.width = `calc(100% - ${i}px)`), hi(document.body, o.value);
  }), Rr(() => s());
}, jp = Lo({
  type: U(Boolean),
  default: null
}), Up = Lo({
  type: U(Function)
}), Wp = (e) => {
  const t = `update:${e}`, n = `onUpdate:${e}`, o = [t], i = {
    [e]: jp,
    [n]: Up
  };
  return {
    useModelToggle: ({
      indicator: r,
      toggleReason: s,
      shouldHideWhenRouteChanges: l,
      shouldProceed: u,
      onShow: c,
      onHide: d
    }) => {
      const f = ge(), { emit: m } = f, p = f.props, h = b(() => Se(p[n])), g = b(() => p[e] === null), y = (A) => {
        r.value !== !0 && (r.value = !0, s && (s.value = A), Se(c) && c(A));
      }, C = (A) => {
        r.value !== !1 && (r.value = !1, s && (s.value = A), Se(d) && d(A));
      }, O = (A) => {
        if (p.disabled === !0 || Se(u) && !u())
          return;
        const $ = h.value && se;
        $ && m(t, !0), (g.value || !$) && y(A);
      }, T = (A) => {
        if (p.disabled === !0 || !se)
          return;
        const $ = h.value && se;
        $ && m(t, !1), (g.value || !$) && C(A);
      }, I = (A) => {
        ct(A) && (p.disabled && A ? h.value && m(t, !1) : r.value !== A && (A ? y() : C()));
      }, k = () => {
        r.value ? T() : O();
      };
      return q(() => p[e], I), l && f.appContext.config.globalProperties.$route !== void 0 && q(() => ({
        ...f.proxy.$route
      }), () => {
        l.value && r.value && T();
      }), he(() => {
        I(p[e]);
      }), {
        hide: T,
        show: O,
        toggle: k,
        hasUpdateHandler: h
      };
    },
    useModelToggleProps: i,
    useModelToggleEmits: o
  };
}, hs = (e) => {
  const t = ge();
  return b(() => {
    var n, o;
    return (o = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : o[e];
  });
};
var Te = "top", Ne = "bottom", Be = "right", Ae = "left", Di = "auto", Kn = [Te, Ne, Be, Ae], on = "start", Dn = "end", qp = "clippingParents", ms = "viewport", Tn = "popper", Gp = "reference", Ja = Kn.reduce(function(e, t) {
  return e.concat([t + "-" + on, t + "-" + Dn]);
}, []), Ro = [].concat(Kn, [Di]).reduce(function(e, t) {
  return e.concat([t, t + "-" + on, t + "-" + Dn]);
}, []), Jp = "beforeRead", Yp = "read", Zp = "afterRead", Qp = "beforeMain", Xp = "main", eh = "afterMain", th = "beforeWrite", nh = "write", oh = "afterWrite", ih = [Jp, Yp, Zp, Qp, Xp, eh, th, nh, oh];
function et(e) {
  return e ? (e.nodeName || "").toLowerCase() : null;
}
function qe(e) {
  if (e == null) return window;
  if (e.toString() !== "[object Window]") {
    var t = e.ownerDocument;
    return t && t.defaultView || window;
  }
  return e;
}
function an(e) {
  var t = qe(e).Element;
  return e instanceof t || e instanceof Element;
}
function De(e) {
  var t = qe(e).HTMLElement;
  return e instanceof t || e instanceof HTMLElement;
}
function Ni(e) {
  if (typeof ShadowRoot > "u") return !1;
  var t = qe(e).ShadowRoot;
  return e instanceof t || e instanceof ShadowRoot;
}
function ah(e) {
  var t = e.state;
  Object.keys(t.elements).forEach(function(n) {
    var o = t.styles[n] || {}, i = t.attributes[n] || {}, a = t.elements[n];
    !De(a) || !et(a) || (Object.assign(a.style, o), Object.keys(i).forEach(function(r) {
      var s = i[r];
      s === !1 ? a.removeAttribute(r) : a.setAttribute(r, s === !0 ? "" : s);
    }));
  });
}
function rh(e) {
  var t = e.state, n = { popper: { position: t.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
  return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
    Object.keys(t.elements).forEach(function(o) {
      var i = t.elements[o], a = t.attributes[o] || {}, r = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : n[o]), s = r.reduce(function(l, u) {
        return l[u] = "", l;
      }, {});
      !De(i) || !et(i) || (Object.assign(i.style, s), Object.keys(a).forEach(function(l) {
        i.removeAttribute(l);
      }));
    });
  };
}
var vs = { name: "applyStyles", enabled: !0, phase: "write", fn: ah, effect: rh, requires: ["computeStyles"] };
function Qe(e) {
  return e.split("-")[0];
}
var Rt = Math.max, Co = Math.min, rn = Math.round;
function sn(e, t) {
  t === void 0 && (t = !1);
  var n = e.getBoundingClientRect(), o = 1, i = 1;
  if (De(e) && t) {
    var a = e.offsetHeight, r = e.offsetWidth;
    r > 0 && (o = rn(n.width) / r || 1), a > 0 && (i = rn(n.height) / a || 1);
  }
  return { width: n.width / o, height: n.height / i, top: n.top / i, right: n.right / o, bottom: n.bottom / i, left: n.left / o, x: n.left / o, y: n.top / i };
}
function Bi(e) {
  var t = sn(e), n = e.offsetWidth, o = e.offsetHeight;
  return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), { x: e.offsetLeft, y: e.offsetTop, width: n, height: o };
}
function gs(e, t) {
  var n = t.getRootNode && t.getRootNode();
  if (e.contains(t)) return !0;
  if (n && Ni(n)) {
    var o = t;
    do {
      if (o && e.isSameNode(o)) return !0;
      o = o.parentNode || o.host;
    } while (o);
  }
  return !1;
}
function dt(e) {
  return qe(e).getComputedStyle(e);
}
function sh(e) {
  return ["table", "td", "th"].indexOf(et(e)) >= 0;
}
function kt(e) {
  return ((an(e) ? e.ownerDocument : e.document) || window.document).documentElement;
}
function Fo(e) {
  return et(e) === "html" ? e : e.assignedSlot || e.parentNode || (Ni(e) ? e.host : null) || kt(e);
}
function Ya(e) {
  return !De(e) || dt(e).position === "fixed" ? null : e.offsetParent;
}
function lh(e) {
  var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
  if (n && De(e)) {
    var o = dt(e);
    if (o.position === "fixed") return null;
  }
  var i = Fo(e);
  for (Ni(i) && (i = i.host); De(i) && ["html", "body"].indexOf(et(i)) < 0; ) {
    var a = dt(i);
    if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || t && a.willChange === "filter" || t && a.filter && a.filter !== "none") return i;
    i = i.parentNode;
  }
  return null;
}
function jn(e) {
  for (var t = qe(e), n = Ya(e); n && sh(n) && dt(n).position === "static"; ) n = Ya(n);
  return n && (et(n) === "html" || et(n) === "body" && dt(n).position === "static") ? t : n || lh(e) || t;
}
function Vi(e) {
  return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
}
function _n(e, t, n) {
  return Rt(e, Co(t, n));
}
function uh(e, t, n) {
  var o = _n(e, t, n);
  return o > n ? n : o;
}
function ys() {
  return { top: 0, right: 0, bottom: 0, left: 0 };
}
function bs(e) {
  return Object.assign({}, ys(), e);
}
function ws(e, t) {
  return t.reduce(function(n, o) {
    return n[o] = e, n;
  }, {});
}
var ch = function(e, t) {
  return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, bs(typeof e != "number" ? e : ws(e, Kn));
};
function dh(e) {
  var t, n = e.state, o = e.name, i = e.options, a = n.elements.arrow, r = n.modifiersData.popperOffsets, s = Qe(n.placement), l = Vi(s), u = [Ae, Be].indexOf(s) >= 0, c = u ? "height" : "width";
  if (!(!a || !r)) {
    var d = ch(i.padding, n), f = Bi(a), m = l === "y" ? Te : Ae, p = l === "y" ? Ne : Be, h = n.rects.reference[c] + n.rects.reference[l] - r[l] - n.rects.popper[c], g = r[l] - n.rects.reference[l], y = jn(a), C = y ? l === "y" ? y.clientHeight || 0 : y.clientWidth || 0 : 0, O = h / 2 - g / 2, T = d[m], I = C - f[c] - d[p], k = C / 2 - f[c] / 2 + O, A = _n(T, k, I), $ = l;
    n.modifiersData[o] = (t = {}, t[$] = A, t.centerOffset = A - k, t);
  }
}
function fh(e) {
  var t = e.state, n = e.options, o = n.element, i = o === void 0 ? "[data-popper-arrow]" : o;
  i != null && (typeof i == "string" && (i = t.elements.popper.querySelector(i), !i) || !gs(t.elements.popper, i) || (t.elements.arrow = i));
}
var ph = { name: "arrow", enabled: !0, phase: "main", fn: dh, effect: fh, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
function ln(e) {
  return e.split("-")[1];
}
var hh = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
function mh(e) {
  var t = e.x, n = e.y, o = window, i = o.devicePixelRatio || 1;
  return { x: rn(t * i) / i || 0, y: rn(n * i) / i || 0 };
}
function Za(e) {
  var t, n = e.popper, o = e.popperRect, i = e.placement, a = e.variation, r = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, f = r.x, m = f === void 0 ? 0 : f, p = r.y, h = p === void 0 ? 0 : p, g = typeof c == "function" ? c({ x: m, y: h }) : { x: m, y: h };
  m = g.x, h = g.y;
  var y = r.hasOwnProperty("x"), C = r.hasOwnProperty("y"), O = Ae, T = Te, I = window;
  if (u) {
    var k = jn(n), A = "clientHeight", $ = "clientWidth";
    if (k === qe(n) && (k = kt(n), dt(k).position !== "static" && s === "absolute" && (A = "scrollHeight", $ = "scrollWidth")), k = k, i === Te || (i === Ae || i === Be) && a === Dn) {
      T = Ne;
      var N = d && k === I && I.visualViewport ? I.visualViewport.height : k[A];
      h -= N - o.height, h *= l ? 1 : -1;
    }
    if (i === Ae || (i === Te || i === Ne) && a === Dn) {
      O = Be;
      var j = d && k === I && I.visualViewport ? I.visualViewport.width : k[$];
      m -= j - o.width, m *= l ? 1 : -1;
    }
  }
  var B = Object.assign({ position: s }, u && hh), M = c === !0 ? mh({ x: m, y: h }) : { x: m, y: h };
  if (m = M.x, h = M.y, l) {
    var W;
    return Object.assign({}, B, (W = {}, W[T] = C ? "0" : "", W[O] = y ? "0" : "", W.transform = (I.devicePixelRatio || 1) <= 1 ? "translate(" + m + "px, " + h + "px)" : "translate3d(" + m + "px, " + h + "px, 0)", W));
  }
  return Object.assign({}, B, (t = {}, t[T] = C ? h + "px" : "", t[O] = y ? m + "px" : "", t.transform = "", t));
}
function vh(e) {
  var t = e.state, n = e.options, o = n.gpuAcceleration, i = o === void 0 ? !0 : o, a = n.adaptive, r = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: Qe(t.placement), variation: ln(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: i, isFixed: t.options.strategy === "fixed" };
  t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Za(Object.assign({}, u, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: r, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Za(Object.assign({}, u, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement });
}
var Ss = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: vh, data: {} }, io = { passive: !0 };
function gh(e) {
  var t = e.state, n = e.instance, o = e.options, i = o.scroll, a = i === void 0 ? !0 : i, r = o.resize, s = r === void 0 ? !0 : r, l = qe(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper);
  return a && u.forEach(function(c) {
    c.addEventListener("scroll", n.update, io);
  }), s && l.addEventListener("resize", n.update, io), function() {
    a && u.forEach(function(c) {
      c.removeEventListener("scroll", n.update, io);
    }), s && l.removeEventListener("resize", n.update, io);
  };
}
var Cs = { name: "eventListeners", enabled: !0, phase: "write", fn: function() {
}, effect: gh, data: {} }, yh = { left: "right", right: "left", bottom: "top", top: "bottom" };
function ho(e) {
  return e.replace(/left|right|bottom|top/g, function(t) {
    return yh[t];
  });
}
var bh = { start: "end", end: "start" };
function Qa(e) {
  return e.replace(/start|end/g, function(t) {
    return bh[t];
  });
}
function zi(e) {
  var t = qe(e), n = t.pageXOffset, o = t.pageYOffset;
  return { scrollLeft: n, scrollTop: o };
}
function Hi(e) {
  return sn(kt(e)).left + zi(e).scrollLeft;
}
function wh(e) {
  var t = qe(e), n = kt(e), o = t.visualViewport, i = n.clientWidth, a = n.clientHeight, r = 0, s = 0;
  return o && (i = o.width, a = o.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (r = o.offsetLeft, s = o.offsetTop)), { width: i, height: a, x: r + Hi(e), y: s };
}
function Sh(e) {
  var t, n = kt(e), o = zi(e), i = (t = e.ownerDocument) == null ? void 0 : t.body, a = Rt(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), r = Rt(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), s = -o.scrollLeft + Hi(e), l = -o.scrollTop;
  return dt(i || n).direction === "rtl" && (s += Rt(n.clientWidth, i ? i.clientWidth : 0) - a), { width: a, height: r, x: s, y: l };
}
function Ki(e) {
  var t = dt(e), n = t.overflow, o = t.overflowX, i = t.overflowY;
  return /auto|scroll|overlay|hidden/.test(n + i + o);
}
function Es(e) {
  return ["html", "body", "#document"].indexOf(et(e)) >= 0 ? e.ownerDocument.body : De(e) && Ki(e) ? e : Es(Fo(e));
}
function xn(e, t) {
  var n;
  t === void 0 && (t = []);
  var o = Es(e), i = o === ((n = e.ownerDocument) == null ? void 0 : n.body), a = qe(o), r = i ? [a].concat(a.visualViewport || [], Ki(o) ? o : []) : o, s = t.concat(r);
  return i ? s : s.concat(xn(Fo(r)));
}
function mi(e) {
  return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height });
}
function Ch(e) {
  var t = sn(e);
  return t.top = t.top + e.clientTop, t.left = t.left + e.clientLeft, t.bottom = t.top + e.clientHeight, t.right = t.left + e.clientWidth, t.width = e.clientWidth, t.height = e.clientHeight, t.x = t.left, t.y = t.top, t;
}
function Xa(e, t) {
  return t === ms ? mi(wh(e)) : an(t) ? Ch(t) : mi(Sh(kt(e)));
}
function Eh(e) {
  var t = xn(Fo(e)), n = ["absolute", "fixed"].indexOf(dt(e).position) >= 0, o = n && De(e) ? jn(e) : e;
  return an(o) ? t.filter(function(i) {
    return an(i) && gs(i, o) && et(i) !== "body";
  }) : [];
}
function Ih(e, t, n) {
  var o = t === "clippingParents" ? Eh(e) : [].concat(t), i = [].concat(o, [n]), a = i[0], r = i.reduce(function(s, l) {
    var u = Xa(e, l);
    return s.top = Rt(u.top, s.top), s.right = Co(u.right, s.right), s.bottom = Co(u.bottom, s.bottom), s.left = Rt(u.left, s.left), s;
  }, Xa(e, a));
  return r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
}
function Is(e) {
  var t = e.reference, n = e.element, o = e.placement, i = o ? Qe(o) : null, a = o ? ln(o) : null, r = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l;
  switch (i) {
    case Te:
      l = { x: r, y: t.y - n.height };
      break;
    case Ne:
      l = { x: r, y: t.y + t.height };
      break;
    case Be:
      l = { x: t.x + t.width, y: s };
      break;
    case Ae:
      l = { x: t.x - n.width, y: s };
      break;
    default:
      l = { x: t.x, y: t.y };
  }
  var u = i ? Vi(i) : null;
  if (u != null) {
    var c = u === "y" ? "height" : "width";
    switch (a) {
      case on:
        l[u] = l[u] - (t[c] / 2 - n[c] / 2);
        break;
      case Dn:
        l[u] = l[u] + (t[c] / 2 - n[c] / 2);
        break;
    }
  }
  return l;
}
function Nn(e, t) {
  t === void 0 && (t = {});
  var n = t, o = n.placement, i = o === void 0 ? e.placement : o, a = n.boundary, r = a === void 0 ? qp : a, s = n.rootBoundary, l = s === void 0 ? ms : s, u = n.elementContext, c = u === void 0 ? Tn : u, d = n.altBoundary, f = d === void 0 ? !1 : d, m = n.padding, p = m === void 0 ? 0 : m, h = bs(typeof p != "number" ? p : ws(p, Kn)), g = c === Tn ? Gp : Tn, y = e.rects.popper, C = e.elements[f ? g : c], O = Ih(an(C) ? C : C.contextElement || kt(e.elements.popper), r, l), T = sn(e.elements.reference), I = Is({ reference: T, element: y, strategy: "absolute", placement: i }), k = mi(Object.assign({}, y, I)), A = c === Tn ? k : T, $ = { top: O.top - A.top + h.top, bottom: A.bottom - O.bottom + h.bottom, left: O.left - A.left + h.left, right: A.right - O.right + h.right }, N = e.modifiersData.offset;
  if (c === Tn && N) {
    var j = N[i];
    Object.keys($).forEach(function(B) {
      var M = [Be, Ne].indexOf(B) >= 0 ? 1 : -1, W = [Te, Ne].indexOf(B) >= 0 ? "y" : "x";
      $[B] += j[W] * M;
    });
  }
  return $;
}
function kh(e, t) {
  t === void 0 && (t = {});
  var n = t, o = n.placement, i = n.boundary, a = n.rootBoundary, r = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? Ro : l, c = ln(o), d = c ? s ? Ja : Ja.filter(function(p) {
    return ln(p) === c;
  }) : Kn, f = d.filter(function(p) {
    return u.indexOf(p) >= 0;
  });
  f.length === 0 && (f = d);
  var m = f.reduce(function(p, h) {
    return p[h] = Nn(e, { placement: h, boundary: i, rootBoundary: a, padding: r })[Qe(h)], p;
  }, {});
  return Object.keys(m).sort(function(p, h) {
    return m[p] - m[h];
  });
}
function Th(e) {
  if (Qe(e) === Di) return [];
  var t = ho(e);
  return [Qa(e), t, Qa(t)];
}
function Ah(e) {
  var t = e.state, n = e.options, o = e.name;
  if (!t.modifiersData[o]._skip) {
    for (var i = n.mainAxis, a = i === void 0 ? !0 : i, r = n.altAxis, s = r === void 0 ? !0 : r, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, f = n.altBoundary, m = n.flipVariations, p = m === void 0 ? !0 : m, h = n.allowedAutoPlacements, g = t.options.placement, y = Qe(g), C = y === g, O = l || (C || !p ? [ho(g)] : Th(g)), T = [g].concat(O).reduce(function(Je, Ce) {
      return Je.concat(Qe(Ce) === Di ? kh(t, { placement: Ce, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: h }) : Ce);
    }, []), I = t.rects.reference, k = t.rects.popper, A = /* @__PURE__ */ new Map(), $ = !0, N = T[0], j = 0; j < T.length; j++) {
      var B = T[j], M = Qe(B), W = ln(B) === on, de = [Te, Ne].indexOf(M) >= 0, Y = de ? "width" : "height", D = Nn(t, { placement: B, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), ne = de ? W ? Be : Ae : W ? Ne : Te;
      I[Y] > k[Y] && (ne = ho(ne));
      var Le = ho(ne), ye = [];
      if (a && ye.push(D[M] <= 0), s && ye.push(D[ne] <= 0, D[Le] <= 0), ye.every(function(Je) {
        return Je;
      })) {
        N = B, $ = !1;
        break;
      }
      A.set(B, ye);
    }
    if ($) for (var be = p ? 3 : 1, _e = function(Je) {
      var Ce = T.find(function(ue) {
        var Tt = A.get(ue);
        if (Tt) return Tt.slice(0, Je).every(function(ht) {
          return ht;
        });
      });
      if (Ce) return N = Ce, "break";
    }, Ge = be; Ge > 0; Ge--) {
      var jt = _e(Ge);
      if (jt === "break") break;
    }
    t.placement !== N && (t.modifiersData[o]._skip = !0, t.placement = N, t.reset = !0);
  }
}
var Oh = { name: "flip", enabled: !0, phase: "main", fn: Ah, requiresIfExists: ["offset"], data: { _skip: !1 } };
function er(e, t, n) {
  return n === void 0 && (n = { x: 0, y: 0 }), { top: e.top - t.height - n.y, right: e.right - t.width + n.x, bottom: e.bottom - t.height + n.y, left: e.left - t.width - n.x };
}
function tr(e) {
  return [Te, Be, Ne, Ae].some(function(t) {
    return e[t] >= 0;
  });
}
function Mh(e) {
  var t = e.state, n = e.name, o = t.rects.reference, i = t.rects.popper, a = t.modifiersData.preventOverflow, r = Nn(t, { elementContext: "reference" }), s = Nn(t, { altBoundary: !0 }), l = er(r, o), u = er(s, i, a), c = tr(l), d = tr(u);
  t.modifiersData[n] = { referenceClippingOffsets: l, popperEscapeOffsets: u, isReferenceHidden: c, hasPopperEscaped: d }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": c, "data-popper-escaped": d });
}
var _h = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: Mh };
function xh(e, t, n) {
  var o = Qe(e), i = [Ae, Te].indexOf(o) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, r = a[0], s = a[1];
  return r = r || 0, s = (s || 0) * i, [Ae, Be].indexOf(o) >= 0 ? { x: s, y: r } : { x: r, y: s };
}
function Ph(e) {
  var t = e.state, n = e.options, o = e.name, i = n.offset, a = i === void 0 ? [0, 0] : i, r = Ro.reduce(function(c, d) {
    return c[d] = xh(d, t.rects, a), c;
  }, {}), s = r[t.placement], l = s.x, u = s.y;
  t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u), t.modifiersData[o] = r;
}
var Lh = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: Ph };
function Rh(e) {
  var t = e.state, n = e.name;
  t.modifiersData[n] = Is({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement });
}
var ks = { name: "popperOffsets", enabled: !0, phase: "read", fn: Rh, data: {} };
function Fh(e) {
  return e === "x" ? "y" : "x";
}
function $h(e) {
  var t = e.state, n = e.options, o = e.name, i = n.mainAxis, a = i === void 0 ? !0 : i, r = n.altAxis, s = r === void 0 ? !1 : r, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, f = n.tether, m = f === void 0 ? !0 : f, p = n.tetherOffset, h = p === void 0 ? 0 : p, g = Nn(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), y = Qe(t.placement), C = ln(t.placement), O = !C, T = Vi(y), I = Fh(T), k = t.modifiersData.popperOffsets, A = t.rects.reference, $ = t.rects.popper, N = typeof h == "function" ? h(Object.assign({}, t.rects, { placement: t.placement })) : h, j = typeof N == "number" ? { mainAxis: N, altAxis: N } : Object.assign({ mainAxis: 0, altAxis: 0 }, N), B = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, M = { x: 0, y: 0 };
  if (k) {
    if (a) {
      var W, de = T === "y" ? Te : Ae, Y = T === "y" ? Ne : Be, D = T === "y" ? "height" : "width", ne = k[T], Le = ne + g[de], ye = ne - g[Y], be = m ? -$[D] / 2 : 0, _e = C === on ? A[D] : $[D], Ge = C === on ? -$[D] : -A[D], jt = t.elements.arrow, Je = m && jt ? Bi(jt) : { width: 0, height: 0 }, Ce = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ys(), ue = Ce[de], Tt = Ce[Y], ht = _n(0, A[D], Je[D]), Gn = O ? A[D] / 2 - be - ht - ue - j.mainAxis : _e - ht - ue - j.mainAxis, Jn = O ? -A[D] / 2 + be + ht + Tt + j.mainAxis : Ge + ht + Tt + j.mainAxis, mn = t.elements.arrow && jn(t.elements.arrow), Ho = mn ? T === "y" ? mn.clientTop || 0 : mn.clientLeft || 0 : 0, Yn = (W = B == null ? void 0 : B[T]) != null ? W : 0, Ko = ne + Gn - Yn - Ho, jo = ne + Jn - Yn, At = _n(m ? Co(Le, Ko) : Le, ne, m ? Rt(ye, jo) : ye);
      k[T] = At, M[T] = At - ne;
    }
    if (s) {
      var vn, Ut = T === "x" ? Te : Ae, Zn = T === "x" ? Ne : Be, nt = k[I], Wt = I === "y" ? "height" : "width", gn = nt + g[Ut], Qn = nt - g[Zn], Ot = [Te, Ae].indexOf(y) !== -1, yn = (vn = B == null ? void 0 : B[I]) != null ? vn : 0, bn = Ot ? gn : nt - A[Wt] - $[Wt] - yn + j.altAxis, wn = Ot ? nt + A[Wt] + $[Wt] - yn - j.altAxis : Qn, Sn = m && Ot ? uh(bn, nt, wn) : _n(m ? bn : gn, nt, m ? wn : Qn);
      k[I] = Sn, M[I] = Sn - nt;
    }
    t.modifiersData[o] = M;
  }
}
var Dh = { name: "preventOverflow", enabled: !0, phase: "main", fn: $h, requiresIfExists: ["offset"] };
function Nh(e) {
  return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop };
}
function Bh(e) {
  return e === qe(e) || !De(e) ? zi(e) : Nh(e);
}
function Vh(e) {
  var t = e.getBoundingClientRect(), n = rn(t.width) / e.offsetWidth || 1, o = rn(t.height) / e.offsetHeight || 1;
  return n !== 1 || o !== 1;
}
function zh(e, t, n) {
  n === void 0 && (n = !1);
  var o = De(t), i = De(t) && Vh(t), a = kt(t), r = sn(e, i), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 };
  return (o || !o && !n) && ((et(t) !== "body" || Ki(a)) && (s = Bh(t)), De(t) ? (l = sn(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = Hi(a))), { x: r.left + s.scrollLeft - l.x, y: r.top + s.scrollTop - l.y, width: r.width, height: r.height };
}
function Hh(e) {
  var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), o = [];
  e.forEach(function(a) {
    t.set(a.name, a);
  });
  function i(a) {
    n.add(a.name);
    var r = [].concat(a.requires || [], a.requiresIfExists || []);
    r.forEach(function(s) {
      if (!n.has(s)) {
        var l = t.get(s);
        l && i(l);
      }
    }), o.push(a);
  }
  return e.forEach(function(a) {
    n.has(a.name) || i(a);
  }), o;
}
function Kh(e) {
  var t = Hh(e);
  return ih.reduce(function(n, o) {
    return n.concat(t.filter(function(i) {
      return i.phase === o;
    }));
  }, []);
}
function jh(e) {
  var t;
  return function() {
    return t || (t = new Promise(function(n) {
      Promise.resolve().then(function() {
        t = void 0, n(e());
      });
    })), t;
  };
}
function Uh(e) {
  var t = e.reduce(function(n, o) {
    var i = n[o.name];
    return n[o.name] = i ? Object.assign({}, i, o, { options: Object.assign({}, i.options, o.options), data: Object.assign({}, i.data, o.data) }) : o, n;
  }, {});
  return Object.keys(t).map(function(n) {
    return t[n];
  });
}
var nr = { placement: "bottom", modifiers: [], strategy: "absolute" };
function or() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
  return !t.some(function(o) {
    return !(o && typeof o.getBoundingClientRect == "function");
  });
}
function ji(e) {
  e === void 0 && (e = {});
  var t = e, n = t.defaultModifiers, o = n === void 0 ? [] : n, i = t.defaultOptions, a = i === void 0 ? nr : i;
  return function(r, s, l) {
    l === void 0 && (l = a);
    var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, nr, a), modifiersData: {}, elements: { reference: r, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, f = { state: u, setOptions: function(h) {
      var g = typeof h == "function" ? h(u.options) : h;
      p(), u.options = Object.assign({}, a, u.options, g), u.scrollParents = { reference: an(r) ? xn(r) : r.contextElement ? xn(r.contextElement) : [], popper: xn(s) };
      var y = Kh(Uh([].concat(o, u.options.modifiers)));
      return u.orderedModifiers = y.filter(function(C) {
        return C.enabled;
      }), m(), f.update();
    }, forceUpdate: function() {
      if (!d) {
        var h = u.elements, g = h.reference, y = h.popper;
        if (or(g, y)) {
          u.rects = { reference: zh(g, jn(y), u.options.strategy === "fixed"), popper: Bi(y) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function($) {
            return u.modifiersData[$.name] = Object.assign({}, $.data);
          });
          for (var C = 0; C < u.orderedModifiers.length; C++) {
            if (u.reset === !0) {
              u.reset = !1, C = -1;
              continue;
            }
            var O = u.orderedModifiers[C], T = O.fn, I = O.options, k = I === void 0 ? {} : I, A = O.name;
            typeof T == "function" && (u = T({ state: u, options: k, name: A, instance: f }) || u);
          }
        }
      }
    }, update: jh(function() {
      return new Promise(function(h) {
        f.forceUpdate(), h(u);
      });
    }), destroy: function() {
      p(), d = !0;
    } };
    if (!or(r, s)) return f;
    f.setOptions(l).then(function(h) {
      !d && l.onFirstUpdate && l.onFirstUpdate(h);
    });
    function m() {
      u.orderedModifiers.forEach(function(h) {
        var g = h.name, y = h.options, C = y === void 0 ? {} : y, O = h.effect;
        if (typeof O == "function") {
          var T = O({ state: u, name: g, instance: f, options: C }), I = function() {
          };
          c.push(T || I);
        }
      });
    }
    function p() {
      c.forEach(function(h) {
        return h();
      }), c = [];
    }
    return f;
  };
}
ji();
var Wh = [Cs, ks, Ss, vs];
ji({ defaultModifiers: Wh });
var qh = [Cs, ks, Ss, vs, Lh, Oh, Dh, ph, _h], Gh = ji({ defaultModifiers: qh });
const Jh = (e, t, n = {}) => {
  const o = {
    name: "updateState",
    enabled: !0,
    phase: "write",
    fn: ({ state: l }) => {
      const u = Yh(l);
      Object.assign(r.value, u);
    },
    requires: ["computeStyles"]
  }, i = b(() => {
    const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = v(n);
    return {
      onFirstUpdate: l,
      placement: u || "bottom",
      strategy: c || "absolute",
      modifiers: [
        ...d || [],
        o,
        { name: "applyStyles", enabled: !1 }
      ]
    };
  }), a = vo(), r = x({
    styles: {
      popper: {
        position: v(i).strategy,
        left: "0",
        top: "0"
      },
      arrow: {
        position: "absolute"
      }
    },
    attributes: {}
  }), s = () => {
    a.value && (a.value.destroy(), a.value = void 0);
  };
  return q(i, (l) => {
    const u = v(a);
    u && u.setOptions(l);
  }, {
    deep: !0
  }), q([e, t], ([l, u]) => {
    s(), !(!l || !u) && (a.value = Gh(l, u, v(i)));
  }), Ve(() => {
    s();
  }), {
    state: b(() => {
      var l;
      return { ...((l = v(a)) == null ? void 0 : l.state) || {} };
    }),
    styles: b(() => v(r).styles),
    attributes: b(() => v(r).attributes),
    update: () => {
      var l;
      return (l = v(a)) == null ? void 0 : l.update();
    },
    forceUpdate: () => {
      var l;
      return (l = v(a)) == null ? void 0 : l.forceUpdate();
    },
    instanceRef: b(() => v(a))
  };
};
function Yh(e) {
  const t = Object.keys(e.elements), n = pi(t.map((i) => [i, e.styles[i] || {}])), o = pi(t.map((i) => [i, e.attributes[i]]));
  return {
    styles: n,
    attributes: o
  };
}
const Ts = (e) => {
  if (!e)
    return { onClick: Pt, onMousedown: Pt, onMouseup: Pt };
  let t = !1, n = !1;
  return { onClick: (r) => {
    t && n && e(r), t = n = !1;
  }, onMousedown: (r) => {
    t = r.target === r.currentTarget;
  }, onMouseup: (r) => {
    n = r.target === r.currentTarget;
  } };
};
function ir() {
  let e;
  const t = (o, i) => {
    n(), e = window.setTimeout(o, i);
  }, n = () => window.clearTimeout(e);
  return zn(() => n()), {
    registerTimeout: t,
    cancelTimeout: n
  };
}
const vi = {
  prefix: Math.floor(Math.random() * 1e4),
  current: 0
}, Zh = Symbol("elIdInjection"), As = () => ge() ? G(Zh, vi) : vi, Dt = (e) => {
  const t = As();
  !se && t === vi && Oe("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
usage: app.provide(ID_INJECTION_KEY, {
  prefix: number,
  current: number,
})`);
  const n = $i();
  return b(() => v(e) || `${n.value}-id-${t.prefix}-${t.current++}`);
};
let Xt = [];
const ar = (e) => {
  const t = e;
  t.key === $n.esc && Xt.forEach((n) => n(t));
}, Qh = (e) => {
  he(() => {
    Xt.length === 0 && document.addEventListener("keydown", ar), se && Xt.push(e);
  }), Ve(() => {
    Xt = Xt.filter((t) => t !== e), Xt.length === 0 && se && document.removeEventListener("keydown", ar);
  });
};
let rr;
const Os = () => {
  const e = $i(), t = As(), n = b(() => `${e.value}-popper-container-${t.prefix}`), o = b(() => `#${n.value}`);
  return {
    id: n,
    selector: o
  };
}, Xh = (e) => {
  const t = document.createElement("div");
  return t.id = e, document.body.appendChild(t), t;
}, em = () => {
  const { id: e, selector: t } = Os();
  return Kl(() => {
    se && (process.env.NODE_ENV === "test" || !rr || !document.body.querySelector(t.value)) && (rr = Xh(e.value));
  }), {
    id: e,
    selector: t
  };
}, tm = Q({
  showAfter: {
    type: Number,
    default: 0
  },
  hideAfter: {
    type: Number,
    default: 200
  },
  autoClose: {
    type: Number,
    default: 0
  }
}), nm = ({
  showAfter: e,
  hideAfter: t,
  autoClose: n,
  open: o,
  close: i
}) => {
  const { registerTimeout: a } = ir(), {
    registerTimeout: r,
    cancelTimeout: s
  } = ir();
  return {
    onOpen: (c) => {
      a(() => {
        o(c);
        const d = v(n);
        me(d) && d > 0 && r(() => {
          i(c);
        }, d);
      }, v(e));
    },
    onClose: (c) => {
      s(), a(() => {
        i(c);
      }, v(t));
    }
  };
}, Ms = Symbol("elForwardRef"), om = (e) => {
  pe(Ms, {
    setForwardRef: (n) => {
      e.value = n;
    }
  });
}, im = (e) => ({
  mounted(t) {
    e(t);
  },
  updated(t) {
    e(t);
  },
  unmounted() {
    e(null);
  }
}), sr = {
  current: 0
}, lr = x(0), _s = 2e3, ur = Symbol("elZIndexContextKey"), xs = Symbol("zIndexContextKey"), Ui = (e) => {
  const t = ge() ? G(ur, sr) : sr, n = e || (ge() ? G(xs, void 0) : void 0), o = b(() => {
    const r = v(n);
    return me(r) ? r : _s;
  }), i = b(() => o.value + lr.value), a = () => (t.current++, lr.value = t.current, i.value);
  return !se && !G(ur) && Oe("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
    initialZIndex: o,
    currentZIndex: i,
    nextZIndex: a
  };
}, fn = Lo({
  type: String,
  values: ds,
  required: !1
}), Ps = Symbol("size"), am = () => {
  const e = G(Ps, {});
  return b(() => v(e.size) || "");
};
function rm(e, {
  beforeFocus: t,
  afterFocus: n,
  beforeBlur: o,
  afterBlur: i
} = {}) {
  const a = ge(), { emit: r } = a, s = vo(), l = x(!1), u = (f) => {
    Se(t) && t(f) || l.value || (l.value = !0, r("focus", f), n == null || n());
  }, c = (f) => {
    var m;
    Se(o) && o(f) || f.relatedTarget && ((m = s.value) != null && m.contains(f.relatedTarget)) || (l.value = !1, r("blur", f), i == null || i());
  }, d = () => {
    var f, m;
    (f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (m = e.value) == null || m.focus();
  };
  return q(s, (f) => {
    f && f.setAttribute("tabindex", "-1");
  }), He(s, "focus", u, !0), He(s, "blur", c, !0), He(s, "click", d, !0), process.env.NODE_ENV === "test" && he(() => {
    const f = Lt(e.value) ? e.value : document.querySelector("input,textarea");
    f && (He(f, "focus", u, !0), He(f, "blur", c, !0));
  }), {
    isFocused: l,
    wrapperRef: s,
    handleFocus: u,
    handleBlur: c
  };
}
function sm({
  afterComposition: e,
  emit: t
}) {
  const n = x(!1), o = (s) => {
    t == null || t("compositionstart", s), n.value = !0;
  }, i = (s) => {
    var l;
    t == null || t("compositionupdate", s);
    const u = (l = s.target) == null ? void 0 : l.value, c = u[u.length - 1] || "";
    n.value = !$p(c);
  }, a = (s) => {
    t == null || t("compositionend", s), n.value && (n.value = !1, ce(() => e(s)));
  };
  return {
    isComposing: n,
    handleComposition: (s) => {
      s.type === "compositionend" ? a(s) : i(s);
    },
    handleCompositionStart: o,
    handleCompositionUpdate: i,
    handleCompositionEnd: a
  };
}
const Ls = Symbol("emptyValuesContextKey"), lm = "use-empty-values", um = ["", void 0, null], cm = void 0, dm = Q({
  emptyValues: Array,
  valueOnClear: {
    type: [String, Number, Boolean, Function],
    default: void 0,
    validator: (e) => Se(e) ? !e() : !e
  }
}), fm = (e, t) => {
  const n = ge() ? G(Ls, x({})) : x({}), o = b(() => e.emptyValues || n.value.emptyValues || um), i = b(() => Se(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : Se(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : cm), a = (r) => o.value.includes(r);
  return o.value.includes(i.value) || Oe(lm, "value-on-clear should be a value of empty-values"), {
    emptyValues: o,
    valueOnClear: i,
    isEmptyValue: a
  };
}, pm = Q({
  ariaLabel: String,
  ariaOrientation: {
    type: String,
    values: ["horizontal", "vertical", "undefined"]
  },
  ariaControls: String
}), Ht = (e) => rs(pm, e), Rs = Symbol(), Eo = x();
function $o(e, t = void 0) {
  const n = ge() ? G(Rs, Eo) : Eo;
  return e ? b(() => {
    var o, i;
    return (i = (o = n.value) == null ? void 0 : o[e]) != null ? i : t;
  }) : n;
}
function hm(e, t) {
  const n = $o(), o = te(e, b(() => {
    var s;
    return ((s = n.value) == null ? void 0 : s.namespace) || Mn;
  })), i = Fi(b(() => {
    var s;
    return (s = n.value) == null ? void 0 : s.locale;
  })), a = Ui(b(() => {
    var s;
    return ((s = n.value) == null ? void 0 : s.zIndex) || _s;
  })), r = b(() => {
    var s;
    return v(t) || ((s = n.value) == null ? void 0 : s.size) || "";
  });
  return mm(b(() => v(n) || {})), {
    ns: o,
    locale: i,
    zIndex: a,
    size: r
  };
}
const mm = (e, t, n = !1) => {
  var o;
  const i = !!ge(), a = i ? $o() : void 0, r = (o = void 0) != null ? o : i ? pe : void 0;
  if (!r) {
    Oe("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
    return;
  }
  const s = b(() => {
    const l = v(e);
    return a != null && a.value ? vm(a.value, l) : l;
  });
  return r(Rs, s), r(fs, b(() => s.value.locale)), r(ps, b(() => s.value.namespace)), r(xs, b(() => s.value.zIndex)), r(Ps, {
    size: b(() => s.value.size || "")
  }), r(Ls, b(() => ({
    emptyValues: s.value.emptyValues,
    valueOnClear: s.value.valueOnClear
  }))), (n || !Eo.value) && (Eo.value = s.value), s;
}, vm = (e, t) => {
  const n = [.../* @__PURE__ */ new Set([...qa(e), ...qa(t)])], o = {};
  for (const i of n)
    o[i] = t[i] !== void 0 ? t[i] : e[i];
  return o;
};
var X = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [o, i] of t)
    n[o] = i;
  return n;
};
const gm = Q({
  size: {
    type: U([Number, String])
  },
  color: {
    type: String
  }
}), ym = H({
  name: "ElIcon",
  inheritAttrs: !1
}), bm = /* @__PURE__ */ H({
  ...ym,
  props: gm,
  setup(e) {
    const t = e, n = te("icon"), o = b(() => {
      const { size: i, color: a } = t;
      return !i && !a ? {} : {
        fontSize: Ct(i) ? void 0 : $t(i),
        "--color": a
      };
    });
    return (i, a) => (w(), L("i", Nt({
      class: v(n).b(),
      style: v(o)
    }, i.$attrs), [
      K(i.$slots, "default")
    ], 16));
  }
});
var wm = /* @__PURE__ */ X(bm, [["__file", "icon.vue"]]);
const We = Me(wm), Wi = Symbol("formContextKey"), Io = Symbol("formItemContextKey"), un = (e, t = {}) => {
  const n = x(void 0), o = t.prop ? n : hs("size"), i = t.global ? n : am(), a = t.form ? { size: void 0 } : G(Wi, void 0), r = t.formItem ? { size: void 0 } : G(Io, void 0);
  return b(() => o.value || v(e) || (r == null ? void 0 : r.size) || (a == null ? void 0 : a.size) || i.value || "");
}, Do = (e) => {
  const t = hs("disabled"), n = G(Wi, void 0);
  return b(() => t.value || v(e) || (n == null ? void 0 : n.disabled) || !1);
}, pn = () => {
  const e = G(Wi, void 0), t = G(Io, void 0);
  return {
    form: e,
    formItem: t
  };
}, No = (e, {
  formItemContext: t,
  disableIdGeneration: n,
  disableIdManagement: o
}) => {
  n || (n = x(!1)), o || (o = x(!1));
  const i = x();
  let a;
  const r = b(() => {
    var s;
    return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1);
  });
  return he(() => {
    a = q([Ze(e, "id"), n], ([s, l]) => {
      const u = s ?? (l ? void 0 : Dt().value);
      u !== i.value && (t != null && t.removeInputId && (i.value && t.removeInputId(i.value), !(o != null && o.value) && !l && u && t.addInputId(u)), i.value = u);
    }, { immediate: !0 });
  }), jl(() => {
    a && a(), t != null && t.removeInputId && i.value && t.removeInputId(i.value);
  }), {
    isLabeledByFormItem: r,
    inputId: i
  };
}, Gt = 4, Sm = {
  vertical: {
    offset: "offsetHeight",
    scroll: "scrollTop",
    scrollSize: "scrollHeight",
    size: "height",
    key: "vertical",
    axis: "Y",
    client: "clientY",
    direction: "top"
  },
  horizontal: {
    offset: "offsetWidth",
    scroll: "scrollLeft",
    scrollSize: "scrollWidth",
    size: "width",
    key: "horizontal",
    axis: "X",
    client: "clientX",
    direction: "left"
  }
}, Cm = ({
  move: e,
  size: t,
  bar: n
}) => ({
  [n.size]: t,
  transform: `translate${n.axis}(${e}%)`
}), qi = Symbol("scrollbarContextKey"), Em = Q({
  vertical: Boolean,
  size: String,
  move: Number,
  ratio: {
    type: Number,
    required: !0
  },
  always: Boolean
}), Im = "Thumb", km = /* @__PURE__ */ H({
  __name: "thumb",
  props: Em,
  setup(e) {
    const t = e, n = G(qi), o = te("scrollbar");
    n || ls(Im, "can not inject scrollbar context");
    const i = x(), a = x(), r = x({}), s = x(!1);
    let l = !1, u = !1, c = se ? document.onselectstart : null;
    const d = b(() => Sm[t.vertical ? "vertical" : "horizontal"]), f = b(() => Cm({
      size: t.size,
      move: t.move,
      bar: d.value
    })), m = b(() => i.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / a.value[d.value.offset]), p = (k) => {
      var A;
      if (k.stopPropagation(), k.ctrlKey || [1, 2].includes(k.button))
        return;
      (A = window.getSelection()) == null || A.removeAllRanges(), g(k);
      const $ = k.currentTarget;
      $ && (r.value[d.value.axis] = $[d.value.offset] - (k[d.value.client] - $.getBoundingClientRect()[d.value.direction]));
    }, h = (k) => {
      if (!a.value || !i.value || !n.wrapElement)
        return;
      const A = Math.abs(k.target.getBoundingClientRect()[d.value.direction] - k[d.value.client]), $ = a.value[d.value.offset] / 2, N = (A - $) * 100 * m.value / i.value[d.value.offset];
      n.wrapElement[d.value.scroll] = N * n.wrapElement[d.value.scrollSize] / 100;
    }, g = (k) => {
      k.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", y), document.addEventListener("mouseup", C), c = document.onselectstart, document.onselectstart = () => !1;
    }, y = (k) => {
      if (!i.value || !a.value || l === !1)
        return;
      const A = r.value[d.value.axis];
      if (!A)
        return;
      const $ = (i.value.getBoundingClientRect()[d.value.direction] - k[d.value.client]) * -1, N = a.value[d.value.offset] - A, j = ($ - N) * 100 * m.value / i.value[d.value.offset];
      n.wrapElement[d.value.scroll] = j * n.wrapElement[d.value.scrollSize] / 100;
    }, C = () => {
      l = !1, r.value[d.value.axis] = 0, document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", C), I(), u && (s.value = !1);
    }, O = () => {
      u = !1, s.value = !!t.size;
    }, T = () => {
      u = !0, s.value = l;
    };
    Ve(() => {
      I(), document.removeEventListener("mouseup", C);
    });
    const I = () => {
      document.onselectstart !== c && (document.onselectstart = c);
    };
    return He(Ze(n, "scrollbarElement"), "mousemove", O), He(Ze(n, "scrollbarElement"), "mouseleave", T), (k, A) => (w(), z(Vn, {
      name: v(o).b("fade"),
      persisted: ""
    }, {
      default: E(() => [
        ie(R("div", {
          ref_key: "instance",
          ref: i,
          class: _([v(o).e("bar"), v(o).is(v(d).key)]),
          onMousedown: h
        }, [
          R("div", {
            ref_key: "thumb",
            ref: a,
            class: _(v(o).e("thumb")),
            style: re(v(f)),
            onMousedown: p
          }, null, 38)
        ], 34), [
          [Ee, k.always || s.value]
        ])
      ]),
      _: 1
    }, 8, ["name"]));
  }
});
var cr = /* @__PURE__ */ X(km, [["__file", "thumb.vue"]]);
const Tm = Q({
  always: {
    type: Boolean,
    default: !0
  },
  minSize: {
    type: Number,
    required: !0
  }
}), Am = /* @__PURE__ */ H({
  __name: "bar",
  props: Tm,
  setup(e, { expose: t }) {
    const n = e, o = G(qi), i = x(0), a = x(0), r = x(""), s = x(""), l = x(1), u = x(1);
    return t({
      handleScroll: (f) => {
        if (f) {
          const m = f.offsetHeight - Gt, p = f.offsetWidth - Gt;
          a.value = f.scrollTop * 100 / m * l.value, i.value = f.scrollLeft * 100 / p * u.value;
        }
      },
      update: () => {
        const f = o == null ? void 0 : o.wrapElement;
        if (!f)
          return;
        const m = f.offsetHeight - Gt, p = f.offsetWidth - Gt, h = m ** 2 / f.scrollHeight, g = p ** 2 / f.scrollWidth, y = Math.max(h, n.minSize), C = Math.max(g, n.minSize);
        l.value = h / (m - h) / (y / (m - y)), u.value = g / (p - g) / (C / (p - C)), s.value = y + Gt < m ? `${y}px` : "", r.value = C + Gt < p ? `${C}px` : "";
      }
    }), (f, m) => (w(), L(fe, null, [
      P(cr, {
        move: i.value,
        ratio: u.value,
        size: r.value,
        always: f.always
      }, null, 8, ["move", "ratio", "size", "always"]),
      P(cr, {
        move: a.value,
        ratio: l.value,
        size: s.value,
        vertical: "",
        always: f.always
      }, null, 8, ["move", "ratio", "size", "always"])
    ], 64));
  }
});
var Om = /* @__PURE__ */ X(Am, [["__file", "bar.vue"]]);
const Mm = Q({
  height: {
    type: [String, Number],
    default: ""
  },
  maxHeight: {
    type: [String, Number],
    default: ""
  },
  native: {
    type: Boolean,
    default: !1
  },
  wrapStyle: {
    type: U([String, Object, Array]),
    default: ""
  },
  wrapClass: {
    type: [String, Array],
    default: ""
  },
  viewClass: {
    type: [String, Array],
    default: ""
  },
  viewStyle: {
    type: [String, Array, Object],
    default: ""
  },
  noresize: Boolean,
  tag: {
    type: String,
    default: "div"
  },
  always: Boolean,
  minSize: {
    type: Number,
    default: 20
  },
  tabindex: {
    type: [String, Number],
    default: void 0
  },
  id: String,
  role: String,
  ...Ht(["ariaLabel", "ariaOrientation"])
}), _m = {
  scroll: ({
    scrollTop: e,
    scrollLeft: t
  }) => [e, t].every(me)
}, gi = "ElScrollbar", xm = H({
  name: gi
}), Pm = /* @__PURE__ */ H({
  ...xm,
  props: Mm,
  emits: _m,
  setup(e, { expose: t, emit: n }) {
    const o = e, i = te("scrollbar");
    let a, r, s = 0, l = 0;
    const u = x(), c = x(), d = x(), f = x(), m = b(() => {
      const I = {};
      return o.height && (I.height = $t(o.height)), o.maxHeight && (I.maxHeight = $t(o.maxHeight)), [o.wrapStyle, I];
    }), p = b(() => [
      o.wrapClass,
      i.e("wrap"),
      { [i.em("wrap", "hidden-default")]: !o.native }
    ]), h = b(() => [i.e("view"), o.viewClass]), g = () => {
      var I;
      c.value && ((I = f.value) == null || I.handleScroll(c.value), s = c.value.scrollTop, l = c.value.scrollLeft, n("scroll", {
        scrollTop: c.value.scrollTop,
        scrollLeft: c.value.scrollLeft
      }));
    };
    function y(I, k) {
      ke(I) ? c.value.scrollTo(I) : me(I) && me(k) && c.value.scrollTo(I, k);
    }
    const C = (I) => {
      if (!me(I)) {
        Oe(gi, "value must be a number");
        return;
      }
      c.value.scrollTop = I;
    }, O = (I) => {
      if (!me(I)) {
        Oe(gi, "value must be a number");
        return;
      }
      c.value.scrollLeft = I;
    }, T = () => {
      var I;
      (I = f.value) == null || I.update();
    };
    return q(() => o.noresize, (I) => {
      I ? (a == null || a(), r == null || r()) : ({ stop: a } = bt(d, T), r = He("resize", T));
    }, { immediate: !0 }), q(() => [o.maxHeight, o.height], () => {
      o.native || ce(() => {
        var I;
        T(), c.value && ((I = f.value) == null || I.handleScroll(c.value));
      });
    }), pe(qi, ut({
      scrollbarElement: u,
      wrapElement: c
    })), Ul(() => {
      c.value && (c.value.scrollTop = s, c.value.scrollLeft = l);
    }), he(() => {
      o.native || ce(() => {
        T();
      });
    }), Wl(() => T()), t({
      wrapRef: c,
      update: T,
      scrollTo: y,
      setScrollTop: C,
      setScrollLeft: O,
      handleScroll: g
    }), (I, k) => (w(), L("div", {
      ref_key: "scrollbarRef",
      ref: u,
      class: _(v(i).b())
    }, [
      R("div", {
        ref_key: "wrapRef",
        ref: c,
        class: _(v(p)),
        style: re(v(m)),
        tabindex: I.tabindex,
        onScroll: g
      }, [
        (w(), z($e(I.tag), {
          id: I.id,
          ref_key: "resizeRef",
          ref: d,
          class: _(v(h)),
          style: re(I.viewStyle),
          role: I.role,
          "aria-label": I.ariaLabel,
          "aria-orientation": I.ariaOrientation
        }, {
          default: E(() => [
            K(I.$slots, "default")
          ]),
          _: 3
        }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"]))
      ], 46, ["tabindex"]),
      I.native ? V("v-if", !0) : (w(), z(Om, {
        key: 0,
        ref_key: "barRef",
        ref: f,
        always: I.always,
        "min-size": I.minSize
      }, null, 8, ["always", "min-size"]))
    ], 2));
  }
});
var Lm = /* @__PURE__ */ X(Pm, [["__file", "scrollbar.vue"]]);
const Rm = Me(Lm), Gi = Symbol("popper"), Fs = Symbol("popperContent"), Fm = [
  "dialog",
  "grid",
  "group",
  "listbox",
  "menu",
  "navigation",
  "tooltip",
  "tree"
], $s = Q({
  role: {
    type: String,
    values: Fm,
    default: "tooltip"
  }
}), $m = H({
  name: "ElPopper",
  inheritAttrs: !1
}), Dm = /* @__PURE__ */ H({
  ...$m,
  props: $s,
  setup(e, { expose: t }) {
    const n = e, o = x(), i = x(), a = x(), r = x(), s = b(() => n.role), l = {
      triggerRef: o,
      popperInstanceRef: i,
      contentRef: a,
      referenceRef: r,
      role: s
    };
    return t(l), pe(Gi, l), (u, c) => K(u.$slots, "default");
  }
});
var Nm = /* @__PURE__ */ X(Dm, [["__file", "popper.vue"]]);
const Ds = Q({
  arrowOffset: {
    type: Number,
    default: 5
  }
}), Bm = H({
  name: "ElPopperArrow",
  inheritAttrs: !1
}), Vm = /* @__PURE__ */ H({
  ...Bm,
  props: Ds,
  setup(e, { expose: t }) {
    const n = e, o = te("popper"), { arrowOffset: i, arrowRef: a, arrowStyle: r } = G(Fs, void 0);
    return q(() => n.arrowOffset, (s) => {
      i.value = s;
    }), Ve(() => {
      a.value = void 0;
    }), t({
      arrowRef: a
    }), (s, l) => (w(), L("span", {
      ref_key: "arrowRef",
      ref: a,
      class: _(v(o).e("arrow")),
      style: re(v(r)),
      "data-popper-arrow": ""
    }, null, 6));
  }
});
var zm = /* @__PURE__ */ X(Vm, [["__file", "arrow.vue"]]);
const Zo = "ElOnlyChild", Hm = H({
  name: Zo,
  setup(e, {
    slots: t,
    attrs: n
  }) {
    var o;
    const i = G(Ms), a = im((o = i == null ? void 0 : i.setForwardRef) != null ? o : Pt);
    return () => {
      var r;
      const s = (r = t.default) == null ? void 0 : r.call(t, n);
      if (!s)
        return null;
      if (s.length > 1)
        return Oe(Zo, "requires exact only one valid child."), null;
      const l = Ns(s);
      return l ? ie(ql(l, n), [[a]]) : (Oe(Zo, "no valid child node found"), null);
    };
  }
});
function Ns(e) {
  if (!e)
    return null;
  const t = e;
  for (const n of t) {
    if (ke(n))
      switch (n.type) {
        case Gl:
          continue;
        case Dr:
        case "svg":
          return dr(n);
        case fe:
          return Ns(n.children);
        default:
          return n;
      }
    return dr(n);
  }
  return null;
}
function dr(e) {
  const t = te("only-child");
  return P("span", {
    class: t.e("content")
  }, [e]);
}
const Bs = Q({
  virtualRef: {
    type: U(Object)
  },
  virtualTriggering: Boolean,
  onMouseenter: {
    type: U(Function)
  },
  onMouseleave: {
    type: U(Function)
  },
  onClick: {
    type: U(Function)
  },
  onKeydown: {
    type: U(Function)
  },
  onFocus: {
    type: U(Function)
  },
  onBlur: {
    type: U(Function)
  },
  onContextmenu: {
    type: U(Function)
  },
  id: String,
  open: Boolean
}), Km = H({
  name: "ElPopperTrigger",
  inheritAttrs: !1
}), jm = /* @__PURE__ */ H({
  ...Km,
  props: Bs,
  setup(e, { expose: t }) {
    const n = e, { role: o, triggerRef: i } = G(Gi, void 0);
    om(i);
    const a = b(() => s.value ? n.id : void 0), r = b(() => {
      if (o && o.value === "tooltip")
        return n.open && n.id ? n.id : void 0;
    }), s = b(() => {
      if (o && o.value !== "tooltip")
        return o.value;
    }), l = b(() => s.value ? `${n.open}` : void 0);
    let u;
    const c = [
      "onMouseenter",
      "onMouseleave",
      "onClick",
      "onKeydown",
      "onFocus",
      "onBlur",
      "onContextmenu"
    ];
    return he(() => {
      q(() => n.virtualRef, (d) => {
        d && (i.value = rt(d));
      }, {
        immediate: !0
      }), q(i, (d, f) => {
        u == null || u(), u = void 0, Lt(d) && (c.forEach((m) => {
          var p;
          const h = n[m];
          h && (d.addEventListener(m.slice(2).toLowerCase(), h), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, m.slice(2).toLowerCase(), h));
        }), u = q([a, r, s, l], (m) => {
          [
            "aria-controls",
            "aria-describedby",
            "aria-haspopup",
            "aria-expanded"
          ].forEach((p, h) => {
            Po(m[h]) ? d.removeAttribute(p) : d.setAttribute(p, m[h]);
          });
        }, { immediate: !0 })), Lt(f) && [
          "aria-controls",
          "aria-describedby",
          "aria-haspopup",
          "aria-expanded"
        ].forEach((m) => f.removeAttribute(m));
      }, {
        immediate: !0
      });
    }), Ve(() => {
      if (u == null || u(), u = void 0, i.value && Lt(i.value)) {
        const d = i.value;
        c.forEach((f) => {
          const m = n[f];
          m && d.removeEventListener(f.slice(2).toLowerCase(), m);
        }), i.value = void 0;
      }
    }), t({
      triggerRef: i
    }), (d, f) => d.virtualTriggering ? V("v-if", !0) : (w(), z(v(Hm), Nt({ key: 0 }, d.$attrs, {
      "aria-controls": v(a),
      "aria-describedby": v(r),
      "aria-expanded": v(l),
      "aria-haspopup": v(s)
    }), {
      default: E(() => [
        K(d.$slots, "default")
      ]),
      _: 3
    }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
  }
});
var Um = /* @__PURE__ */ X(jm, [["__file", "trigger.vue"]]);
const Qo = "focus-trap.focus-after-trapped", Xo = "focus-trap.focus-after-released", Wm = "focus-trap.focusout-prevented", fr = {
  cancelable: !0,
  bubbles: !1
}, qm = {
  cancelable: !0,
  bubbles: !1
}, pr = "focusAfterTrapped", hr = "focusAfterReleased", Vs = Symbol("elFocusTrap"), Ji = x(), Bo = x(0), Yi = x(0);
let ao = 0;
const zs = (e) => {
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
    acceptNode: (o) => {
      const i = o.tagName === "INPUT" && o.type === "hidden";
      return o.disabled || o.hidden || i ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 || o === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
    }
  });
  for (; n.nextNode(); )
    t.push(n.currentNode);
  return t;
}, mr = (e, t) => {
  for (const n of e)
    if (!Gm(n, t))
      return n;
}, Gm = (e, t) => {
  if (process.env.NODE_ENV === "test")
    return !1;
  if (getComputedStyle(e).visibility === "hidden")
    return !0;
  for (; e; ) {
    if (t && e === t)
      return !1;
    if (getComputedStyle(e).display === "none")
      return !0;
    e = e.parentElement;
  }
  return !1;
}, Jm = (e) => {
  const t = zs(e), n = mr(t, e), o = mr(t.reverse(), e);
  return [n, o];
}, Ym = (e) => e instanceof HTMLInputElement && "select" in e, gt = (e, t) => {
  if (e && e.focus) {
    const n = document.activeElement;
    e.focus({ preventScroll: !0 }), Yi.value = window.performance.now(), e !== n && Ym(e) && t && e.select();
  }
};
function vr(e, t) {
  const n = [...e], o = e.indexOf(t);
  return o !== -1 && n.splice(o, 1), n;
}
const Zm = () => {
  let e = [];
  return {
    push: (o) => {
      const i = e[0];
      i && o !== i && i.pause(), e = vr(e, o), e.unshift(o);
    },
    remove: (o) => {
      var i, a;
      e = vr(e, o), (a = (i = e[0]) == null ? void 0 : i.resume) == null || a.call(i);
    }
  };
}, Qm = (e, t = !1) => {
  const n = document.activeElement;
  for (const o of e)
    if (gt(o, t), document.activeElement !== n)
      return;
}, gr = Zm(), Xm = () => Bo.value > Yi.value, ro = () => {
  Ji.value = "pointer", Bo.value = window.performance.now();
}, yr = () => {
  Ji.value = "keyboard", Bo.value = window.performance.now();
}, ev = () => (he(() => {
  ao === 0 && (document.addEventListener("mousedown", ro), document.addEventListener("touchstart", ro), document.addEventListener("keydown", yr)), ao++;
}), Ve(() => {
  ao--, ao <= 0 && (document.removeEventListener("mousedown", ro), document.removeEventListener("touchstart", ro), document.removeEventListener("keydown", yr));
}), {
  focusReason: Ji,
  lastUserFocusTimestamp: Bo,
  lastAutomatedFocusTimestamp: Yi
}), so = (e) => new CustomEvent(Wm, {
  ...qm,
  detail: e
}), tv = H({
  name: "ElFocusTrap",
  inheritAttrs: !1,
  props: {
    loop: Boolean,
    trapped: Boolean,
    focusTrapEl: Object,
    focusStartEl: {
      type: [Object, String],
      default: "first"
    }
  },
  emits: [
    pr,
    hr,
    "focusin",
    "focusout",
    "focusout-prevented",
    "release-requested"
  ],
  setup(e, { emit: t }) {
    const n = x();
    let o, i;
    const { focusReason: a } = ev();
    Qh((p) => {
      e.trapped && !r.paused && t("release-requested", p);
    });
    const r = {
      paused: !1,
      pause() {
        this.paused = !0;
      },
      resume() {
        this.paused = !1;
      }
    }, s = (p) => {
      if (!e.loop && !e.trapped || r.paused)
        return;
      const { key: h, altKey: g, ctrlKey: y, metaKey: C, currentTarget: O, shiftKey: T } = p, { loop: I } = e, k = h === $n.tab && !g && !y && !C, A = document.activeElement;
      if (k && A) {
        const $ = O, [N, j] = Jm($);
        if (N && j) {
          if (!T && A === j) {
            const M = so({
              focusReason: a.value
            });
            t("focusout-prevented", M), M.defaultPrevented || (p.preventDefault(), I && gt(N, !0));
          } else if (T && [N, $].includes(A)) {
            const M = so({
              focusReason: a.value
            });
            t("focusout-prevented", M), M.defaultPrevented || (p.preventDefault(), I && gt(j, !0));
          }
        } else if (A === $) {
          const M = so({
            focusReason: a.value
          });
          t("focusout-prevented", M), M.defaultPrevented || p.preventDefault();
        }
      }
    };
    pe(Vs, {
      focusTrapRef: n,
      onKeydown: s
    }), q(() => e.focusTrapEl, (p) => {
      p && (n.value = p);
    }, { immediate: !0 }), q([n], ([p], [h]) => {
      p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", d)), h && (h.removeEventListener("keydown", s), h.removeEventListener("focusin", c), h.removeEventListener("focusout", d));
    });
    const l = (p) => {
      t(pr, p);
    }, u = (p) => t(hr, p), c = (p) => {
      const h = v(n);
      if (!h)
        return;
      const g = p.target, y = p.relatedTarget, C = g && h.contains(g);
      e.trapped || y && h.contains(y) || (o = y), C && t("focusin", p), !r.paused && e.trapped && (C ? i = g : gt(i, !0));
    }, d = (p) => {
      const h = v(n);
      if (!(r.paused || !h))
        if (e.trapped) {
          const g = p.relatedTarget;
          !Po(g) && !h.contains(g) && setTimeout(() => {
            if (!r.paused && e.trapped) {
              const y = so({
                focusReason: a.value
              });
              t("focusout-prevented", y), y.defaultPrevented || gt(i, !0);
            }
          }, 0);
        } else {
          const g = p.target;
          g && h.contains(g) || t("focusout", p);
        }
    };
    async function f() {
      await ce();
      const p = v(n);
      if (p) {
        gr.push(r);
        const h = p.contains(document.activeElement) ? o : document.activeElement;
        if (o = h, !p.contains(h)) {
          const y = new Event(Qo, fr);
          p.addEventListener(Qo, l), p.dispatchEvent(y), y.defaultPrevented || ce(() => {
            let C = e.focusStartEl;
            je(C) || (gt(C), document.activeElement !== C && (C = "first")), C === "first" && Qm(zs(p), !0), (document.activeElement === h || C === "container") && gt(p);
          });
        }
      }
    }
    function m() {
      const p = v(n);
      if (p) {
        p.removeEventListener(Qo, l);
        const h = new CustomEvent(Xo, {
          ...fr,
          detail: {
            focusReason: a.value
          }
        });
        p.addEventListener(Xo, u), p.dispatchEvent(h), !h.defaultPrevented && (a.value == "keyboard" || !Xm() || p.contains(document.activeElement)) && gt(o ?? document.body), p.removeEventListener(Xo, u), gr.remove(r);
      }
    }
    return he(() => {
      e.trapped && f(), q(() => e.trapped, (p) => {
        p ? f() : m();
      });
    }), Ve(() => {
      e.trapped && m(), n.value && (n.value.removeEventListener("keydown", s), n.value.removeEventListener("focusin", c), n.value.removeEventListener("focusout", d), n.value = void 0);
    }), {
      onKeydown: s
    };
  }
});
function nv(e, t, n, o, i, a) {
  return K(e.$slots, "default", { handleKeydown: e.onKeydown });
}
var Hs = /* @__PURE__ */ X(tv, [["render", nv], ["__file", "focus-trap.vue"]]);
const ov = ["fixed", "absolute"], iv = Q({
  boundariesPadding: {
    type: Number,
    default: 0
  },
  fallbackPlacements: {
    type: U(Array),
    default: void 0
  },
  gpuAcceleration: {
    type: Boolean,
    default: !0
  },
  offset: {
    type: Number,
    default: 12
  },
  placement: {
    type: String,
    values: Ro,
    default: "bottom"
  },
  popperOptions: {
    type: U(Object),
    default: () => ({})
  },
  strategy: {
    type: String,
    values: ov,
    default: "absolute"
  }
}), Ks = Q({
  ...iv,
  id: String,
  style: {
    type: U([String, Array, Object])
  },
  className: {
    type: U([String, Array, Object])
  },
  effect: {
    type: U(String),
    default: "dark"
  },
  visible: Boolean,
  enterable: {
    type: Boolean,
    default: !0
  },
  pure: Boolean,
  focusOnShow: {
    type: Boolean,
    default: !1
  },
  trapping: {
    type: Boolean,
    default: !1
  },
  popperClass: {
    type: U([String, Array, Object])
  },
  popperStyle: {
    type: U([String, Array, Object])
  },
  referenceEl: {
    type: U(Object)
  },
  triggerTargetEl: {
    type: U(Object)
  },
  stopPopperMouseEvent: {
    type: Boolean,
    default: !0
  },
  virtualTriggering: Boolean,
  zIndex: Number,
  ...Ht(["ariaLabel"])
}), av = {
  mouseenter: (e) => e instanceof MouseEvent,
  mouseleave: (e) => e instanceof MouseEvent,
  focus: () => !0,
  blur: () => !0,
  close: () => !0
}, rv = (e, t = []) => {
  const { placement: n, strategy: o, popperOptions: i } = e, a = {
    placement: n,
    strategy: o,
    ...i,
    modifiers: [...lv(e), ...t]
  };
  return uv(a, i == null ? void 0 : i.modifiers), a;
}, sv = (e) => {
  if (se)
    return rt(e);
};
function lv(e) {
  const { offset: t, gpuAcceleration: n, fallbackPlacements: o } = e;
  return [
    {
      name: "offset",
      options: {
        offset: [0, t ?? 12]
      }
    },
    {
      name: "preventOverflow",
      options: {
        padding: {
          top: 2,
          bottom: 2,
          left: 5,
          right: 5
        }
      }
    },
    {
      name: "flip",
      options: {
        padding: 5,
        fallbackPlacements: o
      }
    },
    {
      name: "computeStyles",
      options: {
        gpuAcceleration: n
      }
    }
  ];
}
function uv(e, t) {
  t && (e.modifiers = [...e.modifiers, ...t ?? []]);
}
const cv = 0, dv = (e) => {
  const { popperInstanceRef: t, contentRef: n, triggerRef: o, role: i } = G(Gi, void 0), a = x(), r = x(), s = b(() => ({
    name: "eventListeners",
    enabled: !!e.visible
  })), l = b(() => {
    var y;
    const C = v(a), O = (y = v(r)) != null ? y : cv;
    return {
      name: "arrow",
      enabled: !as(C),
      options: {
        element: C,
        padding: O
      }
    };
  }), u = b(() => ({
    onFirstUpdate: () => {
      p();
    },
    ...rv(e, [
      v(l),
      v(s)
    ])
  })), c = b(() => sv(e.referenceEl) || v(o)), { attributes: d, state: f, styles: m, update: p, forceUpdate: h, instanceRef: g } = Jh(c, n, u);
  return q(g, (y) => t.value = y), he(() => {
    q(() => {
      var y;
      return (y = v(c)) == null ? void 0 : y.getBoundingClientRect();
    }, () => {
      p();
    });
  }), {
    attributes: d,
    arrowRef: a,
    contentRef: n,
    instanceRef: g,
    state: f,
    styles: m,
    role: i,
    forceUpdate: h,
    update: p
  };
}, fv = (e, {
  attributes: t,
  styles: n,
  role: o
}) => {
  const { nextZIndex: i } = Ui(), a = te("popper"), r = b(() => v(t).popper), s = x(me(e.zIndex) ? e.zIndex : i()), l = b(() => [
    a.b(),
    a.is("pure", e.pure),
    a.is(e.effect),
    e.popperClass
  ]), u = b(() => [
    { zIndex: v(s) },
    v(n).popper,
    e.popperStyle || {}
  ]), c = b(() => o.value === "dialog" ? "false" : void 0), d = b(() => v(n).arrow || {});
  return {
    ariaModal: c,
    arrowStyle: d,
    contentAttrs: r,
    contentClass: l,
    contentStyle: u,
    contentZIndex: s,
    updateZIndex: () => {
      s.value = me(e.zIndex) ? e.zIndex : i();
    }
  };
}, pv = (e, t) => {
  const n = x(!1), o = x();
  return {
    focusStartRef: o,
    trapped: n,
    onFocusAfterReleased: (u) => {
      var c;
      ((c = u.detail) == null ? void 0 : c.focusReason) !== "pointer" && (o.value = "first", t("blur"));
    },
    onFocusAfterTrapped: () => {
      t("focus");
    },
    onFocusInTrap: (u) => {
      e.visible && !n.value && (u.target && (o.value = u.target), n.value = !0);
    },
    onFocusoutPrevented: (u) => {
      e.trapping || (u.detail.focusReason === "pointer" && u.preventDefault(), n.value = !1);
    },
    onReleaseRequested: () => {
      n.value = !1, t("close");
    }
  };
}, hv = H({
  name: "ElPopperContent"
}), mv = /* @__PURE__ */ H({
  ...hv,
  props: Ks,
  emits: av,
  setup(e, { expose: t, emit: n }) {
    const o = e, {
      focusStartRef: i,
      trapped: a,
      onFocusAfterReleased: r,
      onFocusAfterTrapped: s,
      onFocusInTrap: l,
      onFocusoutPrevented: u,
      onReleaseRequested: c
    } = pv(o, n), { attributes: d, arrowRef: f, contentRef: m, styles: p, instanceRef: h, role: g, update: y } = dv(o), {
      ariaModal: C,
      arrowStyle: O,
      contentAttrs: T,
      contentClass: I,
      contentStyle: k,
      updateZIndex: A
    } = fv(o, {
      styles: p,
      attributes: d,
      role: g
    }), $ = G(Io, void 0), N = x();
    pe(Fs, {
      arrowStyle: O,
      arrowRef: f,
      arrowOffset: N
    }), $ && pe(Io, {
      ...$,
      addInputId: Pt,
      removeInputId: Pt
    });
    let j;
    const B = (W = !0) => {
      y(), W && A();
    }, M = () => {
      B(!1), o.visible && o.focusOnShow ? a.value = !0 : o.visible === !1 && (a.value = !1);
    };
    return he(() => {
      q(() => o.triggerTargetEl, (W, de) => {
        j == null || j(), j = void 0;
        const Y = v(W || m.value), D = v(de || m.value);
        Lt(Y) && (j = q([g, () => o.ariaLabel, C, () => o.id], (ne) => {
          ["role", "aria-label", "aria-modal", "id"].forEach((Le, ye) => {
            Po(ne[ye]) ? Y.removeAttribute(Le) : Y.setAttribute(Le, ne[ye]);
          });
        }, { immediate: !0 })), D !== Y && Lt(D) && ["role", "aria-label", "aria-modal", "id"].forEach((ne) => {
          D.removeAttribute(ne);
        });
      }, { immediate: !0 }), q(() => o.visible, M, { immediate: !0 });
    }), Ve(() => {
      j == null || j(), j = void 0;
    }), t({
      popperContentRef: m,
      popperInstanceRef: h,
      updatePopper: B,
      contentStyle: k
    }), (W, de) => (w(), L("div", Nt({
      ref_key: "contentRef",
      ref: m
    }, v(T), {
      style: v(k),
      class: v(I),
      tabindex: "-1",
      onMouseenter: (Y) => W.$emit("mouseenter", Y),
      onMouseleave: (Y) => W.$emit("mouseleave", Y)
    }), [
      P(v(Hs), {
        trapped: v(a),
        "trap-on-focus-in": !0,
        "focus-trap-el": v(m),
        "focus-start-el": v(i),
        onFocusAfterTrapped: v(s),
        onFocusAfterReleased: v(r),
        onFocusin: v(l),
        onFocusoutPrevented: v(u),
        onReleaseRequested: v(c)
      }, {
        default: E(() => [
          K(W.$slots, "default")
        ]),
        _: 3
      }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
    ], 16, ["onMouseenter", "onMouseleave"]));
  }
});
var vv = /* @__PURE__ */ X(mv, [["__file", "content.vue"]]);
const gv = Me(Nm), Zi = Symbol("elTooltip"), Pe = Q({
  ...tm,
  ...Ks,
  appendTo: {
    type: U([String, Object])
  },
  content: {
    type: String,
    default: ""
  },
  rawContent: Boolean,
  persistent: Boolean,
  visible: {
    type: U(Boolean),
    default: null
  },
  transition: String,
  teleported: {
    type: Boolean,
    default: !0
  },
  disabled: Boolean,
  ...Ht(["ariaLabel"])
}), Bn = Q({
  ...Bs,
  disabled: Boolean,
  trigger: {
    type: U([String, Array]),
    default: "hover"
  },
  triggerKeys: {
    type: U(Array),
    default: () => [$n.enter, $n.space]
  }
}), {
  useModelToggleProps: yv,
  useModelToggleEmits: bv,
  useModelToggle: wv
} = Wp("visible"), Sv = Q({
  ...$s,
  ...yv,
  ...Pe,
  ...Bn,
  ...Ds,
  showArrow: {
    type: Boolean,
    default: !0
  }
}), Cv = [
  ...bv,
  "before-show",
  "before-hide",
  "show",
  "hide",
  "open",
  "close"
], Ev = (e, t) => Ie(e) ? e.includes(t) : e === t, Jt = (e, t, n) => (o) => {
  Ev(v(e), t) && n(o);
}, Iv = H({
  name: "ElTooltipTrigger"
}), kv = /* @__PURE__ */ H({
  ...Iv,
  props: Bn,
  setup(e, { expose: t }) {
    const n = e, o = te("tooltip"), { controlled: i, id: a, open: r, onOpen: s, onClose: l, onToggle: u } = G(Zi, void 0), c = x(null), d = () => {
      if (v(i) || n.disabled)
        return !0;
    }, f = Ze(n, "trigger"), m = it(d, Jt(f, "hover", s)), p = it(d, Jt(f, "hover", l)), h = it(d, Jt(f, "click", (T) => {
      T.button === 0 && u(T);
    })), g = it(d, Jt(f, "focus", s)), y = it(d, Jt(f, "focus", l)), C = it(d, Jt(f, "contextmenu", (T) => {
      T.preventDefault(), u(T);
    })), O = it(d, (T) => {
      const { code: I } = T;
      n.triggerKeys.includes(I) && (T.preventDefault(), u(T));
    });
    return t({
      triggerRef: c
    }), (T, I) => (w(), z(v(Um), {
      id: v(a),
      "virtual-ref": T.virtualRef,
      open: v(r),
      "virtual-triggering": T.virtualTriggering,
      class: _(v(o).e("trigger")),
      onBlur: v(y),
      onClick: v(h),
      onContextmenu: v(C),
      onFocus: v(g),
      onMouseenter: v(m),
      onMouseleave: v(p),
      onKeydown: v(O)
    }, {
      default: E(() => [
        K(T.$slots, "default")
      ]),
      _: 3
    }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
  }
});
var Tv = /* @__PURE__ */ X(kv, [["__file", "trigger.vue"]]);
const Av = Q({
  to: {
    type: U([String, Object]),
    required: !0
  },
  disabled: Boolean
}), Ov = /* @__PURE__ */ H({
  __name: "teleport",
  props: Av,
  setup(e) {
    return (t, n) => t.disabled ? K(t.$slots, "default", { key: 0 }) : (w(), z(Jl, {
      key: 1,
      to: t.to
    }, [
      K(t.$slots, "default")
    ], 8, ["to"]));
  }
});
var Mv = /* @__PURE__ */ X(Ov, [["__file", "teleport.vue"]]);
const js = Me(Mv), _v = H({
  name: "ElTooltipContent",
  inheritAttrs: !1
}), xv = /* @__PURE__ */ H({
  ..._v,
  props: Pe,
  setup(e, { expose: t }) {
    const n = e, { selector: o } = Os(), i = te("tooltip"), a = x(null);
    let r;
    const {
      controlled: s,
      id: l,
      open: u,
      trigger: c,
      onClose: d,
      onOpen: f,
      onShow: m,
      onHide: p,
      onBeforeShow: h,
      onBeforeHide: g
    } = G(Zi, void 0), y = b(() => n.transition || `${i.namespace.value}-fade-in-linear`), C = b(() => process.env.NODE_ENV === "test" ? !0 : n.persistent);
    Ve(() => {
      r == null || r();
    });
    const O = b(() => v(C) ? !0 : v(u)), T = b(() => n.disabled ? !1 : v(u)), I = b(() => n.appendTo || o.value), k = b(() => {
      var D;
      return (D = n.style) != null ? D : {};
    }), A = x(!0), $ = () => {
      p(), A.value = !0;
    }, N = () => {
      if (v(s))
        return !0;
    }, j = it(N, () => {
      n.enterable && v(c) === "hover" && f();
    }), B = it(N, () => {
      v(c) === "hover" && d();
    }), M = () => {
      var D, ne;
      (ne = (D = a.value) == null ? void 0 : D.updatePopper) == null || ne.call(D), h == null || h();
    }, W = () => {
      g == null || g();
    }, de = () => {
      m(), r = mu(b(() => {
        var D;
        return (D = a.value) == null ? void 0 : D.popperContentRef;
      }), () => {
        if (v(s))
          return;
        v(c) !== "hover" && d();
      });
    }, Y = () => {
      n.virtualTriggering || d();
    };
    return q(() => v(u), (D) => {
      D ? A.value = !1 : r == null || r();
    }, {
      flush: "post"
    }), q(() => n.content, () => {
      var D, ne;
      (ne = (D = a.value) == null ? void 0 : D.updatePopper) == null || ne.call(D);
    }), t({
      contentRef: a
    }), (D, ne) => (w(), z(v(js), {
      disabled: !D.teleported,
      to: v(I)
    }, {
      default: E(() => [
        P(Vn, {
          name: v(y),
          onAfterLeave: $,
          onBeforeEnter: M,
          onAfterEnter: de,
          onBeforeLeave: W
        }, {
          default: E(() => [
            v(O) ? ie((w(), z(v(vv), Nt({
              key: 0,
              id: v(l),
              ref_key: "contentRef",
              ref: a
            }, D.$attrs, {
              "aria-label": D.ariaLabel,
              "aria-hidden": A.value,
              "boundaries-padding": D.boundariesPadding,
              "fallback-placements": D.fallbackPlacements,
              "gpu-acceleration": D.gpuAcceleration,
              offset: D.offset,
              placement: D.placement,
              "popper-options": D.popperOptions,
              strategy: D.strategy,
              effect: D.effect,
              enterable: D.enterable,
              pure: D.pure,
              "popper-class": D.popperClass,
              "popper-style": [D.popperStyle, v(k)],
              "reference-el": D.referenceEl,
              "trigger-target-el": D.triggerTargetEl,
              visible: v(T),
              "z-index": D.zIndex,
              onMouseenter: v(j),
              onMouseleave: v(B),
              onBlur: Y,
              onClose: v(d)
            }), {
              default: E(() => [
                K(D.$slots, "default")
              ]),
              _: 3
            }, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [
              [Ee, v(T)]
            ]) : V("v-if", !0)
          ]),
          _: 3
        }, 8, ["name"])
      ]),
      _: 3
    }, 8, ["disabled", "to"]));
  }
});
var Pv = /* @__PURE__ */ X(xv, [["__file", "content.vue"]]);
const Lv = H({
  name: "ElTooltip"
}), Rv = /* @__PURE__ */ H({
  ...Lv,
  props: Sv,
  emits: Cv,
  setup(e, { expose: t, emit: n }) {
    const o = e;
    em();
    const i = Dt(), a = x(), r = x(), s = () => {
      var y;
      const C = v(a);
      C && ((y = C.popperInstanceRef) == null || y.update());
    }, l = x(!1), u = x(), { show: c, hide: d, hasUpdateHandler: f } = wv({
      indicator: l,
      toggleReason: u
    }), { onOpen: m, onClose: p } = nm({
      showAfter: Ze(o, "showAfter"),
      hideAfter: Ze(o, "hideAfter"),
      autoClose: Ze(o, "autoClose"),
      open: c,
      close: d
    }), h = b(() => ct(o.visible) && !f.value);
    pe(Zi, {
      controlled: h,
      id: i,
      open: Fr(l),
      trigger: Ze(o, "trigger"),
      onOpen: (y) => {
        m(y);
      },
      onClose: (y) => {
        p(y);
      },
      onToggle: (y) => {
        v(l) ? p(y) : m(y);
      },
      onShow: () => {
        n("show", u.value);
      },
      onHide: () => {
        n("hide", u.value);
      },
      onBeforeShow: () => {
        n("before-show", u.value);
      },
      onBeforeHide: () => {
        n("before-hide", u.value);
      },
      updatePopper: s
    }), q(() => o.disabled, (y) => {
      y && l.value && (l.value = !1);
    });
    const g = (y) => {
      var C, O;
      const T = (O = (C = r.value) == null ? void 0 : C.contentRef) == null ? void 0 : O.popperContentRef, I = (y == null ? void 0 : y.relatedTarget) || document.activeElement;
      return T && T.contains(I);
    };
    return Yl(() => l.value && d()), t({
      popperRef: a,
      contentRef: r,
      isFocusInsideContent: g,
      updatePopper: s,
      onOpen: m,
      onClose: p,
      hide: d
    }), (y, C) => (w(), z(v(gv), {
      ref_key: "popperRef",
      ref: a,
      role: y.role
    }, {
      default: E(() => [
        P(Tv, {
          disabled: y.disabled,
          trigger: y.trigger,
          "trigger-keys": y.triggerKeys,
          "virtual-ref": y.virtualRef,
          "virtual-triggering": y.virtualTriggering
        }, {
          default: E(() => [
            y.$slots.default ? K(y.$slots, "default", { key: 0 }) : V("v-if", !0)
          ]),
          _: 3
        }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
        P(Pv, {
          ref_key: "contentRef",
          ref: r,
          "aria-label": y.ariaLabel,
          "boundaries-padding": y.boundariesPadding,
          content: y.content,
          disabled: y.disabled,
          effect: y.effect,
          enterable: y.enterable,
          "fallback-placements": y.fallbackPlacements,
          "hide-after": y.hideAfter,
          "gpu-acceleration": y.gpuAcceleration,
          offset: y.offset,
          persistent: y.persistent,
          "popper-class": y.popperClass,
          "popper-style": y.popperStyle,
          placement: y.placement,
          "popper-options": y.popperOptions,
          pure: y.pure,
          "raw-content": y.rawContent,
          "reference-el": y.referenceEl,
          "trigger-target-el": y.triggerTargetEl,
          "show-after": y.showAfter,
          strategy: y.strategy,
          teleported: y.teleported,
          transition: y.transition,
          "virtual-triggering": y.virtualTriggering,
          "z-index": y.zIndex,
          "append-to": y.appendTo
        }, {
          default: E(() => [
            K(y.$slots, "content", {}, () => [
              y.rawContent ? (w(), L("span", {
                key: 0,
                innerHTML: y.content
              }, null, 8, ["innerHTML"])) : (w(), L("span", { key: 1 }, ee(y.content), 1))
            ]),
            y.showArrow ? (w(), z(v(zm), {
              key: 0,
              "arrow-offset": y.arrowOffset
            }, null, 8, ["arrow-offset"])) : V("v-if", !0)
          ]),
          _: 3
        }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"])
      ]),
      _: 3
    }, 8, ["role"]));
  }
});
var Fv = /* @__PURE__ */ X(Rv, [["__file", "tooltip.vue"]]);
const Us = Me(Fv), Ws = Symbol("buttonGroupContextKey"), $v = (e, t) => {
  en({
    from: "type.text",
    replacement: "link",
    version: "3.0.0",
    scope: "props",
    ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
  }, b(() => e.type === "text"));
  const n = G(Ws, void 0), o = $o("button"), { form: i } = pn(), a = un(b(() => n == null ? void 0 : n.size)), r = Do(), s = x(), l = ko(), u = b(() => e.type || (n == null ? void 0 : n.type) || ""), c = b(() => {
    var p, h, g;
    return (g = (h = e.autoInsertSpace) != null ? h : (p = o.value) == null ? void 0 : p.autoInsertSpace) != null ? g : !1;
  }), d = b(() => e.tag === "button" ? {
    ariaDisabled: r.value || e.loading,
    disabled: r.value || e.loading,
    autofocus: e.autofocus,
    type: e.nativeType
  } : {}), f = b(() => {
    var p;
    const h = (p = l.default) == null ? void 0 : p.call(l);
    if (c.value && (h == null ? void 0 : h.length) === 1) {
      const g = h[0];
      if ((g == null ? void 0 : g.type) === Dr) {
        const y = g.children;
        return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(y.trim());
      }
    }
    return !1;
  });
  return {
    _disabled: r,
    _size: a,
    _type: u,
    _ref: s,
    _props: d,
    shouldAddSpace: f,
    handleClick: (p) => {
      if (r.value || e.loading) {
        p.stopPropagation();
        return;
      }
      e.nativeType === "reset" && (i == null || i.resetFields()), t("click", p);
    }
  };
}, Dv = [
  "default",
  "primary",
  "success",
  "warning",
  "info",
  "danger",
  "text",
  ""
], Nv = ["button", "submit", "reset"], yi = Q({
  size: fn,
  disabled: Boolean,
  type: {
    type: String,
    values: Dv,
    default: ""
  },
  icon: {
    type: nn
  },
  nativeType: {
    type: String,
    values: Nv,
    default: "button"
  },
  loading: Boolean,
  loadingIcon: {
    type: nn,
    default: () => Mr
  },
  plain: Boolean,
  text: Boolean,
  link: Boolean,
  bg: Boolean,
  autofocus: Boolean,
  round: Boolean,
  circle: Boolean,
  color: String,
  dark: Boolean,
  autoInsertSpace: {
    type: Boolean,
    default: void 0
  },
  tag: {
    type: U([String, Object]),
    default: "button"
  }
}), Bv = {
  click: (e) => e instanceof MouseEvent
};
function ve(e, t) {
  Vv(e) && (e = "100%");
  var n = zv(e);
  return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
}
function lo(e) {
  return Math.min(1, Math.max(0, e));
}
function Vv(e) {
  return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
}
function zv(e) {
  return typeof e == "string" && e.indexOf("%") !== -1;
}
function qs(e) {
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function uo(e) {
  return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
}
function xt(e) {
  return e.length === 1 ? "0" + e : String(e);
}
function Hv(e, t, n) {
  return {
    r: ve(e, 255) * 255,
    g: ve(t, 255) * 255,
    b: ve(n, 255) * 255
  };
}
function br(e, t, n) {
  e = ve(e, 255), t = ve(t, 255), n = ve(n, 255);
  var o = Math.max(e, t, n), i = Math.min(e, t, n), a = 0, r = 0, s = (o + i) / 2;
  if (o === i)
    r = 0, a = 0;
  else {
    var l = o - i;
    switch (r = s > 0.5 ? l / (2 - o - i) : l / (o + i), o) {
      case e:
        a = (t - n) / l + (t < n ? 6 : 0);
        break;
      case t:
        a = (n - e) / l + 2;
        break;
      case n:
        a = (e - t) / l + 4;
        break;
    }
    a /= 6;
  }
  return { h: a, s: r, l: s };
}
function ei(e, t, n) {
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
}
function Kv(e, t, n) {
  var o, i, a;
  if (e = ve(e, 360), t = ve(t, 100), n = ve(n, 100), t === 0)
    i = n, a = n, o = n;
  else {
    var r = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - r;
    o = ei(s, r, e + 1 / 3), i = ei(s, r, e), a = ei(s, r, e - 1 / 3);
  }
  return { r: o * 255, g: i * 255, b: a * 255 };
}
function wr(e, t, n) {
  e = ve(e, 255), t = ve(t, 255), n = ve(n, 255);
  var o = Math.max(e, t, n), i = Math.min(e, t, n), a = 0, r = o, s = o - i, l = o === 0 ? 0 : s / o;
  if (o === i)
    a = 0;
  else {
    switch (o) {
      case e:
        a = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        a = (n - e) / s + 2;
        break;
      case n:
        a = (e - t) / s + 4;
        break;
    }
    a /= 6;
  }
  return { h: a, s: l, v: r };
}
function jv(e, t, n) {
  e = ve(e, 360) * 6, t = ve(t, 100), n = ve(n, 100);
  var o = Math.floor(e), i = e - o, a = n * (1 - t), r = n * (1 - i * t), s = n * (1 - (1 - i) * t), l = o % 6, u = [n, r, a, a, s, n][l], c = [s, n, n, r, a, a][l], d = [a, a, s, n, n, r][l];
  return { r: u * 255, g: c * 255, b: d * 255 };
}
function Sr(e, t, n, o) {
  var i = [
    xt(Math.round(e).toString(16)),
    xt(Math.round(t).toString(16)),
    xt(Math.round(n).toString(16))
  ];
  return o && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
}
function Uv(e, t, n, o, i) {
  var a = [
    xt(Math.round(e).toString(16)),
    xt(Math.round(t).toString(16)),
    xt(Math.round(n).toString(16)),
    xt(Wv(o))
  ];
  return i && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
}
function Wv(e) {
  return Math.round(parseFloat(e) * 255).toString(16);
}
function Cr(e) {
  return xe(e) / 255;
}
function xe(e) {
  return parseInt(e, 16);
}
function qv(e) {
  return {
    r: e >> 16,
    g: (e & 65280) >> 8,
    b: e & 255
  };
}
var bi = {
  aliceblue: "#f0f8ff",
  antiquewhite: "#faebd7",
  aqua: "#00ffff",
  aquamarine: "#7fffd4",
  azure: "#f0ffff",
  beige: "#f5f5dc",
  bisque: "#ffe4c4",
  black: "#000000",
  blanchedalmond: "#ffebcd",
  blue: "#0000ff",
  blueviolet: "#8a2be2",
  brown: "#a52a2a",
  burlywood: "#deb887",
  cadetblue: "#5f9ea0",
  chartreuse: "#7fff00",
  chocolate: "#d2691e",
  coral: "#ff7f50",
  cornflowerblue: "#6495ed",
  cornsilk: "#fff8dc",
  crimson: "#dc143c",
  cyan: "#00ffff",
  darkblue: "#00008b",
  darkcyan: "#008b8b",
  darkgoldenrod: "#b8860b",
  darkgray: "#a9a9a9",
  darkgreen: "#006400",
  darkgrey: "#a9a9a9",
  darkkhaki: "#bdb76b",
  darkmagenta: "#8b008b",
  darkolivegreen: "#556b2f",
  darkorange: "#ff8c00",
  darkorchid: "#9932cc",
  darkred: "#8b0000",
  darksalmon: "#e9967a",
  darkseagreen: "#8fbc8f",
  darkslateblue: "#483d8b",
  darkslategray: "#2f4f4f",
  darkslategrey: "#2f4f4f",
  darkturquoise: "#00ced1",
  darkviolet: "#9400d3",
  deeppink: "#ff1493",
  deepskyblue: "#00bfff",
  dimgray: "#696969",
  dimgrey: "#696969",
  dodgerblue: "#1e90ff",
  firebrick: "#b22222",
  floralwhite: "#fffaf0",
  forestgreen: "#228b22",
  fuchsia: "#ff00ff",
  gainsboro: "#dcdcdc",
  ghostwhite: "#f8f8ff",
  goldenrod: "#daa520",
  gold: "#ffd700",
  gray: "#808080",
  green: "#008000",
  greenyellow: "#adff2f",
  grey: "#808080",
  honeydew: "#f0fff0",
  hotpink: "#ff69b4",
  indianred: "#cd5c5c",
  indigo: "#4b0082",
  ivory: "#fffff0",
  khaki: "#f0e68c",
  lavenderblush: "#fff0f5",
  lavender: "#e6e6fa",
  lawngreen: "#7cfc00",
  lemonchiffon: "#fffacd",
  lightblue: "#add8e6",
  lightcoral: "#f08080",
  lightcyan: "#e0ffff",
  lightgoldenrodyellow: "#fafad2",
  lightgray: "#d3d3d3",
  lightgreen: "#90ee90",
  lightgrey: "#d3d3d3",
  lightpink: "#ffb6c1",
  lightsalmon: "#ffa07a",
  lightseagreen: "#20b2aa",
  lightskyblue: "#87cefa",
  lightslategray: "#778899",
  lightslategrey: "#778899",
  lightsteelblue: "#b0c4de",
  lightyellow: "#ffffe0",
  lime: "#00ff00",
  limegreen: "#32cd32",
  linen: "#faf0e6",
  magenta: "#ff00ff",
  maroon: "#800000",
  mediumaquamarine: "#66cdaa",
  mediumblue: "#0000cd",
  mediumorchid: "#ba55d3",
  mediumpurple: "#9370db",
  mediumseagreen: "#3cb371",
  mediumslateblue: "#7b68ee",
  mediumspringgreen: "#00fa9a",
  mediumturquoise: "#48d1cc",
  mediumvioletred: "#c71585",
  midnightblue: "#191970",
  mintcream: "#f5fffa",
  mistyrose: "#ffe4e1",
  moccasin: "#ffe4b5",
  navajowhite: "#ffdead",
  navy: "#000080",
  oldlace: "#fdf5e6",
  olive: "#808000",
  olivedrab: "#6b8e23",
  orange: "#ffa500",
  orangered: "#ff4500",
  orchid: "#da70d6",
  palegoldenrod: "#eee8aa",
  palegreen: "#98fb98",
  paleturquoise: "#afeeee",
  palevioletred: "#db7093",
  papayawhip: "#ffefd5",
  peachpuff: "#ffdab9",
  peru: "#cd853f",
  pink: "#ffc0cb",
  plum: "#dda0dd",
  powderblue: "#b0e0e6",
  purple: "#800080",
  rebeccapurple: "#663399",
  red: "#ff0000",
  rosybrown: "#bc8f8f",
  royalblue: "#4169e1",
  saddlebrown: "#8b4513",
  salmon: "#fa8072",
  sandybrown: "#f4a460",
  seagreen: "#2e8b57",
  seashell: "#fff5ee",
  sienna: "#a0522d",
  silver: "#c0c0c0",
  skyblue: "#87ceeb",
  slateblue: "#6a5acd",
  slategray: "#708090",
  slategrey: "#708090",
  snow: "#fffafa",
  springgreen: "#00ff7f",
  steelblue: "#4682b4",
  tan: "#d2b48c",
  teal: "#008080",
  thistle: "#d8bfd8",
  tomato: "#ff6347",
  turquoise: "#40e0d0",
  violet: "#ee82ee",
  wheat: "#f5deb3",
  white: "#ffffff",
  whitesmoke: "#f5f5f5",
  yellow: "#ffff00",
  yellowgreen: "#9acd32"
};
function Gv(e) {
  var t = { r: 0, g: 0, b: 0 }, n = 1, o = null, i = null, a = null, r = !1, s = !1;
  return typeof e == "string" && (e = Zv(e)), typeof e == "object" && (ot(e.r) && ot(e.g) && ot(e.b) ? (t = Hv(e.r, e.g, e.b), r = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ot(e.h) && ot(e.s) && ot(e.v) ? (o = uo(e.s), i = uo(e.v), t = jv(e.h, o, i), r = !0, s = "hsv") : ot(e.h) && ot(e.s) && ot(e.l) && (o = uo(e.s), a = uo(e.l), t = Kv(e.h, o, a), r = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = qs(n), {
    ok: r,
    format: e.format || s,
    r: Math.min(255, Math.max(t.r, 0)),
    g: Math.min(255, Math.max(t.g, 0)),
    b: Math.min(255, Math.max(t.b, 0)),
    a: n
  };
}
var Jv = "[-\\+]?\\d+%?", Yv = "[-\\+]?\\d*\\.\\d+%?", Et = "(?:".concat(Yv, ")|(?:").concat(Jv, ")"), ti = "[\\s|\\(]+(".concat(Et, ")[,|\\s]+(").concat(Et, ")[,|\\s]+(").concat(Et, ")\\s*\\)?"), ni = "[\\s|\\(]+(".concat(Et, ")[,|\\s]+(").concat(Et, ")[,|\\s]+(").concat(Et, ")[,|\\s]+(").concat(Et, ")\\s*\\)?"), ze = {
  CSS_UNIT: new RegExp(Et),
  rgb: new RegExp("rgb" + ti),
  rgba: new RegExp("rgba" + ni),
  hsl: new RegExp("hsl" + ti),
  hsla: new RegExp("hsla" + ni),
  hsv: new RegExp("hsv" + ti),
  hsva: new RegExp("hsva" + ni),
  hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
};
function Zv(e) {
  if (e = e.trim().toLowerCase(), e.length === 0)
    return !1;
  var t = !1;
  if (bi[e])
    e = bi[e], t = !0;
  else if (e === "transparent")
    return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  var n = ze.rgb.exec(e);
  return n ? { r: n[1], g: n[2], b: n[3] } : (n = ze.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = ze.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = ze.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = ze.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = ze.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = ze.hex8.exec(e), n ? {
    r: xe(n[1]),
    g: xe(n[2]),
    b: xe(n[3]),
    a: Cr(n[4]),
    format: t ? "name" : "hex8"
  } : (n = ze.hex6.exec(e), n ? {
    r: xe(n[1]),
    g: xe(n[2]),
    b: xe(n[3]),
    format: t ? "name" : "hex"
  } : (n = ze.hex4.exec(e), n ? {
    r: xe(n[1] + n[1]),
    g: xe(n[2] + n[2]),
    b: xe(n[3] + n[3]),
    a: Cr(n[4] + n[4]),
    format: t ? "name" : "hex8"
  } : (n = ze.hex3.exec(e), n ? {
    r: xe(n[1] + n[1]),
    g: xe(n[2] + n[2]),
    b: xe(n[3] + n[3]),
    format: t ? "name" : "hex"
  } : !1)))))))));
}
function ot(e) {
  return !!ze.CSS_UNIT.exec(String(e));
}
var Qv = (
  /** @class */
  function() {
    function e(t, n) {
      t === void 0 && (t = ""), n === void 0 && (n = {});
      var o;
      if (t instanceof e)
        return t;
      typeof t == "number" && (t = qv(t)), this.originalInput = t;
      var i = Gv(t);
      this.originalInput = t, this.r = i.r, this.g = i.g, this.b = i.b, this.a = i.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (o = n.format) !== null && o !== void 0 ? o : i.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = i.ok;
    }
    return e.prototype.isDark = function() {
      return this.getBrightness() < 128;
    }, e.prototype.isLight = function() {
      return !this.isDark();
    }, e.prototype.getBrightness = function() {
      var t = this.toRgb();
      return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
    }, e.prototype.getLuminance = function() {
      var t = this.toRgb(), n, o, i, a = t.r / 255, r = t.g / 255, s = t.b / 255;
      return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), r <= 0.03928 ? o = r / 12.92 : o = Math.pow((r + 0.055) / 1.055, 2.4), s <= 0.03928 ? i = s / 12.92 : i = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * o + 0.0722 * i;
    }, e.prototype.getAlpha = function() {
      return this.a;
    }, e.prototype.setAlpha = function(t) {
      return this.a = qs(t), this.roundA = Math.round(100 * this.a) / 100, this;
    }, e.prototype.isMonochrome = function() {
      var t = this.toHsl().s;
      return t === 0;
    }, e.prototype.toHsv = function() {
      var t = wr(this.r, this.g, this.b);
      return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
    }, e.prototype.toHsvString = function() {
      var t = wr(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), i = Math.round(t.v * 100);
      return this.a === 1 ? "hsv(".concat(n, ", ").concat(o, "%, ").concat(i, "%)") : "hsva(".concat(n, ", ").concat(o, "%, ").concat(i, "%, ").concat(this.roundA, ")");
    }, e.prototype.toHsl = function() {
      var t = br(this.r, this.g, this.b);
      return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
    }, e.prototype.toHslString = function() {
      var t = br(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), i = Math.round(t.l * 100);
      return this.a === 1 ? "hsl(".concat(n, ", ").concat(o, "%, ").concat(i, "%)") : "hsla(".concat(n, ", ").concat(o, "%, ").concat(i, "%, ").concat(this.roundA, ")");
    }, e.prototype.toHex = function(t) {
      return t === void 0 && (t = !1), Sr(this.r, this.g, this.b, t);
    }, e.prototype.toHexString = function(t) {
      return t === void 0 && (t = !1), "#" + this.toHex(t);
    }, e.prototype.toHex8 = function(t) {
      return t === void 0 && (t = !1), Uv(this.r, this.g, this.b, this.a, t);
    }, e.prototype.toHex8String = function(t) {
      return t === void 0 && (t = !1), "#" + this.toHex8(t);
    }, e.prototype.toHexShortString = function(t) {
      return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
    }, e.prototype.toRgb = function() {
      return {
        r: Math.round(this.r),
        g: Math.round(this.g),
        b: Math.round(this.b),
        a: this.a
      };
    }, e.prototype.toRgbString = function() {
      var t = Math.round(this.r), n = Math.round(this.g), o = Math.round(this.b);
      return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(o, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(o, ", ").concat(this.roundA, ")");
    }, e.prototype.toPercentageRgb = function() {
      var t = function(n) {
        return "".concat(Math.round(ve(n, 255) * 100), "%");
      };
      return {
        r: t(this.r),
        g: t(this.g),
        b: t(this.b),
        a: this.a
      };
    }, e.prototype.toPercentageRgbString = function() {
      var t = function(n) {
        return Math.round(ve(n, 255) * 100);
      };
      return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")");
    }, e.prototype.toName = function() {
      if (this.a === 0)
        return "transparent";
      if (this.a < 1)
        return !1;
      for (var t = "#" + Sr(this.r, this.g, this.b, !1), n = 0, o = Object.entries(bi); n < o.length; n++) {
        var i = o[n], a = i[0], r = i[1];
        if (t === r)
          return a;
      }
      return !1;
    }, e.prototype.toString = function(t) {
      var n = !!t;
      t = t ?? this.format;
      var o = !1, i = this.a < 1 && this.a >= 0, a = !n && i && (t.startsWith("hex") || t === "name");
      return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (o = this.toRgbString()), t === "prgb" && (o = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (o = this.toHexString()), t === "hex3" && (o = this.toHexString(!0)), t === "hex4" && (o = this.toHex8String(!0)), t === "hex8" && (o = this.toHex8String()), t === "name" && (o = this.toName()), t === "hsl" && (o = this.toHslString()), t === "hsv" && (o = this.toHsvString()), o || this.toHexString());
    }, e.prototype.toNumber = function() {
      return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
    }, e.prototype.clone = function() {
      return new e(this.toString());
    }, e.prototype.lighten = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.l += t / 100, n.l = lo(n.l), new e(n);
    }, e.prototype.brighten = function(t) {
      t === void 0 && (t = 10);
      var n = this.toRgb();
      return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), new e(n);
    }, e.prototype.darken = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.l -= t / 100, n.l = lo(n.l), new e(n);
    }, e.prototype.tint = function(t) {
      return t === void 0 && (t = 10), this.mix("white", t);
    }, e.prototype.shade = function(t) {
      return t === void 0 && (t = 10), this.mix("black", t);
    }, e.prototype.desaturate = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.s -= t / 100, n.s = lo(n.s), new e(n);
    }, e.prototype.saturate = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.s += t / 100, n.s = lo(n.s), new e(n);
    }, e.prototype.greyscale = function() {
      return this.desaturate(100);
    }, e.prototype.spin = function(t) {
      var n = this.toHsl(), o = (n.h + t) % 360;
      return n.h = o < 0 ? 360 + o : o, new e(n);
    }, e.prototype.mix = function(t, n) {
      n === void 0 && (n = 50);
      var o = this.toRgb(), i = new e(t).toRgb(), a = n / 100, r = {
        r: (i.r - o.r) * a + o.r,
        g: (i.g - o.g) * a + o.g,
        b: (i.b - o.b) * a + o.b,
        a: (i.a - o.a) * a + o.a
      };
      return new e(r);
    }, e.prototype.analogous = function(t, n) {
      t === void 0 && (t = 6), n === void 0 && (n = 30);
      var o = this.toHsl(), i = 360 / n, a = [this];
      for (o.h = (o.h - (i * t >> 1) + 720) % 360; --t; )
        o.h = (o.h + i) % 360, a.push(new e(o));
      return a;
    }, e.prototype.complement = function() {
      var t = this.toHsl();
      return t.h = (t.h + 180) % 360, new e(t);
    }, e.prototype.monochromatic = function(t) {
      t === void 0 && (t = 6);
      for (var n = this.toHsv(), o = n.h, i = n.s, a = n.v, r = [], s = 1 / t; t--; )
        r.push(new e({ h: o, s: i, v: a })), a = (a + s) % 1;
      return r;
    }, e.prototype.splitcomplement = function() {
      var t = this.toHsl(), n = t.h;
      return [
        this,
        new e({ h: (n + 72) % 360, s: t.s, l: t.l }),
        new e({ h: (n + 216) % 360, s: t.s, l: t.l })
      ];
    }, e.prototype.onBackground = function(t) {
      var n = this.toRgb(), o = new e(t).toRgb(), i = n.a + o.a * (1 - n.a);
      return new e({
        r: (n.r * n.a + o.r * o.a * (1 - n.a)) / i,
        g: (n.g * n.a + o.g * o.a * (1 - n.a)) / i,
        b: (n.b * n.a + o.b * o.a * (1 - n.a)) / i,
        a: i
      });
    }, e.prototype.triad = function() {
      return this.polyad(3);
    }, e.prototype.tetrad = function() {
      return this.polyad(4);
    }, e.prototype.polyad = function(t) {
      for (var n = this.toHsl(), o = n.h, i = [this], a = 360 / t, r = 1; r < t; r++)
        i.push(new e({ h: (o + r * a) % 360, s: n.s, l: n.l }));
      return i;
    }, e.prototype.equals = function(t) {
      return this.toRgbString() === new e(t).toRgbString();
    }, e;
  }()
);
function vt(e, t = 20) {
  return e.mix("#141414", t).toString();
}
function Xv(e) {
  const t = Do(), n = te("button");
  return b(() => {
    let o = {}, i = e.color;
    if (i) {
      const a = i.match(/var\((.*?)\)/);
      a && (i = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
      const r = new Qv(i), s = e.dark ? r.tint(20).toString() : vt(r, 20);
      if (e.plain)
        o = n.cssVarBlock({
          "bg-color": e.dark ? vt(r, 90) : r.tint(90).toString(),
          "text-color": i,
          "border-color": e.dark ? vt(r, 50) : r.tint(50).toString(),
          "hover-text-color": `var(${n.cssVarName("color-white")})`,
          "hover-bg-color": i,
          "hover-border-color": i,
          "active-bg-color": s,
          "active-text-color": `var(${n.cssVarName("color-white")})`,
          "active-border-color": s
        }), t.value && (o[n.cssVarBlockName("disabled-bg-color")] = e.dark ? vt(r, 90) : r.tint(90).toString(), o[n.cssVarBlockName("disabled-text-color")] = e.dark ? vt(r, 50) : r.tint(50).toString(), o[n.cssVarBlockName("disabled-border-color")] = e.dark ? vt(r, 80) : r.tint(80).toString());
      else {
        const l = e.dark ? vt(r, 30) : r.tint(30).toString(), u = r.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
        if (o = n.cssVarBlock({
          "bg-color": i,
          "text-color": u,
          "border-color": i,
          "hover-bg-color": l,
          "hover-text-color": u,
          "hover-border-color": l,
          "active-bg-color": s,
          "active-border-color": s
        }), t.value) {
          const c = e.dark ? vt(r, 50) : r.tint(50).toString();
          o[n.cssVarBlockName("disabled-bg-color")] = c, o[n.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, o[n.cssVarBlockName("disabled-border-color")] = c;
        }
      }
    }
    return o;
  });
}
const eg = H({
  name: "ElButton"
}), tg = /* @__PURE__ */ H({
  ...eg,
  props: yi,
  emits: Bv,
  setup(e, { expose: t, emit: n }) {
    const o = e, i = Xv(o), a = te("button"), { _ref: r, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = $v(o, n), m = b(() => [
      a.b(),
      a.m(l.value),
      a.m(s.value),
      a.is("disabled", u.value),
      a.is("loading", o.loading),
      a.is("plain", o.plain),
      a.is("round", o.round),
      a.is("circle", o.circle),
      a.is("text", o.text),
      a.is("link", o.link),
      a.is("has-bg", o.bg)
    ]);
    return t({
      ref: r,
      size: s,
      type: l,
      disabled: u,
      shouldAddSpace: d
    }), (p, h) => (w(), z($e(p.tag), Nt({
      ref_key: "_ref",
      ref: r
    }, v(c), {
      class: v(m),
      style: v(i),
      onClick: v(f)
    }), {
      default: E(() => [
        p.loading ? (w(), L(fe, { key: 0 }, [
          p.$slots.loading ? K(p.$slots, "loading", { key: 0 }) : (w(), z(v(We), {
            key: 1,
            class: _(v(a).is("loading"))
          }, {
            default: E(() => [
              (w(), z($e(p.loadingIcon)))
            ]),
            _: 1
          }, 8, ["class"]))
        ], 64)) : p.icon || p.$slots.icon ? (w(), z(v(We), { key: 1 }, {
          default: E(() => [
            p.icon ? (w(), z($e(p.icon), { key: 0 })) : K(p.$slots, "icon", { key: 1 })
          ]),
          _: 3
        })) : V("v-if", !0),
        p.$slots.default ? (w(), L("span", {
          key: 2,
          class: _({ [v(a).em("text", "expand")]: v(d) })
        }, [
          K(p.$slots, "default")
        ], 2)) : V("v-if", !0)
      ]),
      _: 3
    }, 16, ["class", "style", "onClick"]));
  }
});
var ng = /* @__PURE__ */ X(tg, [["__file", "button.vue"]]);
const og = {
  size: yi.size,
  type: yi.type
}, ig = H({
  name: "ElButtonGroup"
}), ag = /* @__PURE__ */ H({
  ...ig,
  props: og,
  setup(e) {
    const t = e;
    pe(Ws, ut({
      size: Ze(t, "size"),
      type: Ze(t, "type")
    }));
    const n = te("button");
    return (o, i) => (w(), L("div", {
      class: _(v(n).b("group"))
    }, [
      K(o.$slots, "default")
    ], 2));
  }
});
var Gs = /* @__PURE__ */ X(ag, [["__file", "button-group.vue"]]);
const Qi = Me(ng, {
  ButtonGroup: Gs
});
zt(Gs);
var rg = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function sg(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
const yt = /* @__PURE__ */ new Map();
if (se) {
  let e;
  document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => {
    if (e) {
      for (const n of yt.values())
        for (const { documentHandler: o } of n)
          o(t, e);
      e = void 0;
    }
  });
}
function Er(e, t) {
  let n = [];
  return Array.isArray(t.arg) ? n = t.arg : Lt(t.arg) && n.push(t.arg), function(o, i) {
    const a = t.instance.popperRef, r = o.target, s = i == null ? void 0 : i.target, l = !t || !t.instance, u = !r || !s, c = e.contains(r) || e.contains(s), d = e === r, f = n.length && n.some((p) => p == null ? void 0 : p.contains(r)) || n.length && n.includes(s), m = a && (a.contains(r) || a.contains(s));
    l || u || c || d || f || m || t.value(o, i);
  };
}
const lg = {
  beforeMount(e, t) {
    yt.has(e) || yt.set(e, []), yt.get(e).push({
      documentHandler: Er(e, t),
      bindingFn: t.value
    });
  },
  updated(e, t) {
    yt.has(e) || yt.set(e, []);
    const n = yt.get(e), o = n.findIndex((a) => a.bindingFn === t.oldValue), i = {
      documentHandler: Er(e, t),
      bindingFn: t.value
    };
    o >= 0 ? n.splice(o, 1, i) : n.push(i);
  },
  unmounted(e) {
    yt.delete(e);
  }
}, Js = {
  modelValue: {
    type: [Number, String, Boolean],
    default: void 0
  },
  label: {
    type: [String, Boolean, Number, Object],
    default: void 0
  },
  value: {
    type: [String, Boolean, Number, Object],
    default: void 0
  },
  indeterminate: Boolean,
  disabled: Boolean,
  checked: Boolean,
  name: {
    type: String,
    default: void 0
  },
  trueValue: {
    type: [String, Number],
    default: void 0
  },
  falseValue: {
    type: [String, Number],
    default: void 0
  },
  trueLabel: {
    type: [String, Number],
    default: void 0
  },
  falseLabel: {
    type: [String, Number],
    default: void 0
  },
  id: {
    type: String,
    default: void 0
  },
  border: Boolean,
  size: fn,
  tabindex: [String, Number],
  validateEvent: {
    type: Boolean,
    default: !0
  },
  ...Ht(["ariaControls"])
}, Ys = {
  [we]: (e) => je(e) || me(e) || ct(e),
  change: (e) => je(e) || me(e) || ct(e)
}, hn = Symbol("checkboxGroupContextKey"), ug = ({
  model: e,
  isChecked: t
}) => {
  const n = G(hn, void 0), o = b(() => {
    var a, r;
    const s = (a = n == null ? void 0 : n.max) == null ? void 0 : a.value, l = (r = n == null ? void 0 : n.min) == null ? void 0 : r.value;
    return !Ct(s) && e.value.length >= s && !t.value || !Ct(l) && e.value.length <= l && t.value;
  });
  return {
    isDisabled: Do(b(() => (n == null ? void 0 : n.disabled.value) || o.value)),
    isLimitDisabled: o
  };
}, cg = (e, {
  model: t,
  isLimitExceeded: n,
  hasOwnLabel: o,
  isDisabled: i,
  isLabeledByFormItem: a
}) => {
  const r = G(hn, void 0), { formItem: s } = pn(), { emit: l } = ge();
  function u(p) {
    var h, g, y, C;
    return [!0, e.trueValue, e.trueLabel].includes(p) ? (g = (h = e.trueValue) != null ? h : e.trueLabel) != null ? g : !0 : (C = (y = e.falseValue) != null ? y : e.falseLabel) != null ? C : !1;
  }
  function c(p, h) {
    l("change", u(p), h);
  }
  function d(p) {
    if (n.value)
      return;
    const h = p.target;
    l("change", u(h.checked), p);
  }
  async function f(p) {
    n.value || !o.value && !i.value && a.value && (p.composedPath().some((y) => y.tagName === "LABEL") || (t.value = u([!1, e.falseValue, e.falseLabel].includes(t.value)), await ce(), c(t.value, p)));
  }
  const m = b(() => (r == null ? void 0 : r.validateEvent) || e.validateEvent);
  return q(() => e.modelValue, () => {
    m.value && (s == null || s.validate("change").catch((p) => Oe(p)));
  }), {
    handleChange: d,
    onClickRoot: f
  };
}, dg = (e) => {
  const t = x(!1), { emit: n } = ge(), o = G(hn, void 0), i = b(() => Ct(o) === !1), a = x(!1), r = b({
    get() {
      var s, l;
      return i.value ? (s = o == null ? void 0 : o.modelValue) == null ? void 0 : s.value : (l = e.modelValue) != null ? l : t.value;
    },
    set(s) {
      var l, u;
      i.value && Ie(s) ? (a.value = ((l = o == null ? void 0 : o.max) == null ? void 0 : l.value) !== void 0 && s.length > (o == null ? void 0 : o.max.value) && s.length > r.value.length, a.value === !1 && ((u = o == null ? void 0 : o.changeEvent) == null || u.call(o, s))) : (n(we, s), t.value = s);
    }
  });
  return {
    model: r,
    isGroup: i,
    isLimitExceeded: a
  };
}, fg = (e, t, { model: n }) => {
  const o = G(hn, void 0), i = x(!1), a = b(() => Rn(e.value) ? e.label : e.value), r = b(() => {
    const c = n.value;
    return ct(c) ? c : Ie(c) ? ke(a.value) ? c.map(go).some((d) => So(d, a.value)) : c.map(go).includes(a.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c;
  }), s = un(b(() => {
    var c;
    return (c = o == null ? void 0 : o.size) == null ? void 0 : c.value;
  }), {
    prop: !0
  }), l = un(b(() => {
    var c;
    return (c = o == null ? void 0 : o.size) == null ? void 0 : c.value;
  })), u = b(() => !!t.default || !Rn(a.value));
  return {
    checkboxButtonSize: s,
    isChecked: r,
    isFocused: i,
    checkboxSize: l,
    hasOwnLabel: u,
    actualValue: a
  };
}, Zs = (e, t) => {
  const { formItem: n } = pn(), { model: o, isGroup: i, isLimitExceeded: a } = dg(e), {
    isFocused: r,
    isChecked: s,
    checkboxButtonSize: l,
    checkboxSize: u,
    hasOwnLabel: c,
    actualValue: d
  } = fg(e, t, { model: o }), { isDisabled: f } = ug({ model: o, isChecked: s }), { inputId: m, isLabeledByFormItem: p } = No(e, {
    formItemContext: n,
    disableIdGeneration: c,
    disableIdManagement: i
  }), { handleChange: h, onClickRoot: g } = cg(e, {
    model: o,
    isLimitExceeded: a,
    hasOwnLabel: c,
    isDisabled: f,
    isLabeledByFormItem: p
  });
  return (() => {
    function C() {
      var O, T;
      Ie(o.value) && !o.value.includes(d.value) ? o.value.push(d.value) : o.value = (T = (O = e.trueValue) != null ? O : e.trueLabel) != null ? T : !0;
    }
    e.checked && C();
  })(), en({
    from: "label act as value",
    replacement: "value",
    version: "3.0.0",
    scope: "el-checkbox",
    ref: "https://element-plus.org/en-US/component/checkbox.html"
  }, b(() => i.value && Rn(e.value))), en({
    from: "true-label",
    replacement: "true-value",
    version: "3.0.0",
    scope: "el-checkbox",
    ref: "https://element-plus.org/en-US/component/checkbox.html"
  }, b(() => !!e.trueLabel)), en({
    from: "false-label",
    replacement: "false-value",
    version: "3.0.0",
    scope: "el-checkbox",
    ref: "https://element-plus.org/en-US/component/checkbox.html"
  }, b(() => !!e.falseLabel)), {
    inputId: m,
    isLabeledByFormItem: p,
    isChecked: s,
    isDisabled: f,
    isFocused: r,
    checkboxButtonSize: l,
    checkboxSize: u,
    hasOwnLabel: c,
    model: o,
    actualValue: d,
    handleChange: h,
    onClickRoot: g
  };
}, pg = H({
  name: "ElCheckbox"
}), hg = /* @__PURE__ */ H({
  ...pg,
  props: Js,
  emits: Ys,
  setup(e) {
    const t = e, n = ko(), {
      inputId: o,
      isLabeledByFormItem: i,
      isChecked: a,
      isDisabled: r,
      isFocused: s,
      checkboxSize: l,
      hasOwnLabel: u,
      model: c,
      actualValue: d,
      handleChange: f,
      onClickRoot: m
    } = Zs(t, n), p = te("checkbox"), h = b(() => [
      p.b(),
      p.m(l.value),
      p.is("disabled", r.value),
      p.is("bordered", t.border),
      p.is("checked", a.value)
    ]), g = b(() => [
      p.e("input"),
      p.is("disabled", r.value),
      p.is("checked", a.value),
      p.is("indeterminate", t.indeterminate),
      p.is("focus", s.value)
    ]);
    return (y, C) => (w(), z($e(!v(u) && v(i) ? "span" : "label"), {
      class: _(v(h)),
      "aria-controls": y.indeterminate ? y.ariaControls : null,
      onClick: v(m)
    }, {
      default: E(() => {
        var O, T, I, k;
        return [
          R("span", {
            class: _(v(g))
          }, [
            y.trueValue || y.falseValue || y.trueLabel || y.falseLabel ? ie((w(), L("input", {
              key: 0,
              id: v(o),
              "onUpdate:modelValue": (A) => lt(c) ? c.value = A : null,
              class: _(v(p).e("original")),
              type: "checkbox",
              indeterminate: y.indeterminate,
              name: y.name,
              tabindex: y.tabindex,
              disabled: v(r),
              "true-value": (T = (O = y.trueValue) != null ? O : y.trueLabel) != null ? T : !0,
              "false-value": (k = (I = y.falseValue) != null ? I : y.falseLabel) != null ? k : !1,
              onChange: v(f),
              onFocus: (A) => s.value = !0,
              onBlur: (A) => s.value = !1,
              onClick: le(() => {
              }, ["stop"])
            }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
              [yo, v(c)]
            ]) : ie((w(), L("input", {
              key: 1,
              id: v(o),
              "onUpdate:modelValue": (A) => lt(c) ? c.value = A : null,
              class: _(v(p).e("original")),
              type: "checkbox",
              indeterminate: y.indeterminate,
              disabled: v(r),
              value: v(d),
              name: y.name,
              tabindex: y.tabindex,
              onChange: v(f),
              onFocus: (A) => s.value = !0,
              onBlur: (A) => s.value = !1,
              onClick: le(() => {
              }, ["stop"])
            }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [
              [yo, v(c)]
            ]),
            R("span", {
              class: _(v(p).e("inner"))
            }, null, 2)
          ], 2),
          v(u) ? (w(), L("span", {
            key: 0,
            class: _(v(p).e("label"))
          }, [
            K(y.$slots, "default"),
            y.$slots.default ? V("v-if", !0) : (w(), L(fe, { key: 0 }, [
              Z(ee(y.label), 1)
            ], 64))
          ], 2)) : V("v-if", !0)
        ];
      }),
      _: 3
    }, 8, ["class", "aria-controls", "onClick"]));
  }
});
var mg = /* @__PURE__ */ X(hg, [["__file", "checkbox.vue"]]);
const vg = H({
  name: "ElCheckboxButton"
}), gg = /* @__PURE__ */ H({
  ...vg,
  props: Js,
  emits: Ys,
  setup(e) {
    const t = e, n = ko(), {
      isFocused: o,
      isChecked: i,
      isDisabled: a,
      checkboxButtonSize: r,
      model: s,
      actualValue: l,
      handleChange: u
    } = Zs(t, n), c = G(hn, void 0), d = te("checkbox"), f = b(() => {
      var p, h, g, y;
      const C = (h = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? h : "";
      return {
        backgroundColor: C,
        borderColor: C,
        color: (y = (g = c == null ? void 0 : c.textColor) == null ? void 0 : g.value) != null ? y : "",
        boxShadow: C ? `-1px 0 0 0 ${C}` : void 0
      };
    }), m = b(() => [
      d.b("button"),
      d.bm("button", r.value),
      d.is("disabled", a.value),
      d.is("checked", i.value),
      d.is("focus", o.value)
    ]);
    return (p, h) => {
      var g, y, C, O;
      return w(), L("label", {
        class: _(v(m))
      }, [
        p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? ie((w(), L("input", {
          key: 0,
          "onUpdate:modelValue": (T) => lt(s) ? s.value = T : null,
          class: _(v(d).be("button", "original")),
          type: "checkbox",
          name: p.name,
          tabindex: p.tabindex,
          disabled: v(a),
          "true-value": (y = (g = p.trueValue) != null ? g : p.trueLabel) != null ? y : !0,
          "false-value": (O = (C = p.falseValue) != null ? C : p.falseLabel) != null ? O : !1,
          onChange: v(u),
          onFocus: (T) => o.value = !0,
          onBlur: (T) => o.value = !1,
          onClick: le(() => {
          }, ["stop"])
        }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
          [yo, v(s)]
        ]) : ie((w(), L("input", {
          key: 1,
          "onUpdate:modelValue": (T) => lt(s) ? s.value = T : null,
          class: _(v(d).be("button", "original")),
          type: "checkbox",
          name: p.name,
          tabindex: p.tabindex,
          disabled: v(a),
          value: v(l),
          onChange: v(u),
          onFocus: (T) => o.value = !0,
          onBlur: (T) => o.value = !1,
          onClick: le(() => {
          }, ["stop"])
        }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [
          [yo, v(s)]
        ]),
        p.$slots.default || p.label ? (w(), L("span", {
          key: 2,
          class: _(v(d).be("button", "inner")),
          style: re(v(i) ? v(f) : void 0)
        }, [
          K(p.$slots, "default", {}, () => [
            Z(ee(p.label), 1)
          ])
        ], 6)) : V("v-if", !0)
      ], 2);
    };
  }
});
var Qs = /* @__PURE__ */ X(gg, [["__file", "checkbox-button.vue"]]);
const yg = Q({
  modelValue: {
    type: U(Array),
    default: () => []
  },
  disabled: Boolean,
  min: Number,
  max: Number,
  size: fn,
  fill: String,
  textColor: String,
  tag: {
    type: String,
    default: "div"
  },
  validateEvent: {
    type: Boolean,
    default: !0
  },
  ...Ht(["ariaLabel"])
}), bg = {
  [we]: (e) => Ie(e),
  change: (e) => Ie(e)
}, wg = H({
  name: "ElCheckboxGroup"
}), Sg = /* @__PURE__ */ H({
  ...wg,
  props: yg,
  emits: bg,
  setup(e, { emit: t }) {
    const n = e, o = te("checkbox"), { formItem: i } = pn(), { inputId: a, isLabeledByFormItem: r } = No(n, {
      formItemContext: i
    }), s = async (u) => {
      t(we, u), await ce(), t("change", u);
    }, l = b({
      get() {
        return n.modelValue;
      },
      set(u) {
        s(u);
      }
    });
    return pe(hn, {
      ...rs(cn(n), [
        "size",
        "min",
        "max",
        "disabled",
        "validateEvent",
        "fill",
        "textColor"
      ]),
      modelValue: l,
      changeEvent: s
    }), q(() => n.modelValue, () => {
      n.validateEvent && (i == null || i.validate("change").catch((u) => Oe(u)));
    }), (u, c) => {
      var d;
      return w(), z($e(u.tag), {
        id: v(a),
        class: _(v(o).b("group")),
        role: "group",
        "aria-label": v(r) ? void 0 : u.ariaLabel || "checkbox-group",
        "aria-labelledby": v(r) ? (d = v(i)) == null ? void 0 : d.labelId : void 0
      }, {
        default: E(() => [
          K(u.$slots, "default")
        ]),
        _: 3
      }, 8, ["id", "class", "aria-label", "aria-labelledby"]);
    };
  }
});
var Xs = /* @__PURE__ */ X(Sg, [["__file", "checkbox-group.vue"]]);
const el = Me(mg, {
  CheckboxButton: Qs,
  CheckboxGroup: Xs
});
zt(Qs);
const tl = zt(Xs), nl = Q({
  modelValue: {
    type: [String, Number, Boolean],
    default: void 0
  },
  size: fn,
  disabled: Boolean,
  label: {
    type: [String, Number, Boolean],
    default: void 0
  },
  value: {
    type: [String, Number, Boolean],
    default: void 0
  },
  name: {
    type: String,
    default: void 0
  }
}), Cg = Q({
  ...nl,
  border: Boolean
}), ol = {
  [we]: (e) => je(e) || me(e) || ct(e),
  [Ri]: (e) => je(e) || me(e) || ct(e)
}, il = Symbol("radioGroupKey"), al = (e, t) => {
  const n = x(), o = G(il, void 0), i = b(() => !!o), a = b(() => Rn(e.value) ? e.label : e.value), r = b({
    get() {
      return i.value ? o.modelValue : e.modelValue;
    },
    set(d) {
      i.value ? o.changeEvent(d) : t && t(we, d), n.value.checked = e.modelValue === a.value;
    }
  }), s = un(b(() => o == null ? void 0 : o.size)), l = Do(b(() => o == null ? void 0 : o.disabled)), u = x(!1), c = b(() => l.value || i.value && r.value !== a.value ? -1 : 0);
  return en({
    from: "label act as value",
    replacement: "value",
    version: "3.0.0",
    scope: "el-radio",
    ref: "https://element-plus.org/en-US/component/radio.html"
  }, b(() => i.value && Rn(e.value))), {
    radioRef: n,
    isGroup: i,
    radioGroup: o,
    focus: u,
    size: s,
    disabled: l,
    tabIndex: c,
    modelValue: r,
    actualValue: a
  };
}, Eg = H({
  name: "ElRadio"
}), Ig = /* @__PURE__ */ H({
  ...Eg,
  props: Cg,
  emits: ol,
  setup(e, { emit: t }) {
    const n = e, o = te("radio"), { radioRef: i, radioGroup: a, focus: r, size: s, disabled: l, modelValue: u, actualValue: c } = al(n, t);
    function d() {
      ce(() => t("change", u.value));
    }
    return (f, m) => {
      var p;
      return w(), L("label", {
        class: _([
          v(o).b(),
          v(o).is("disabled", v(l)),
          v(o).is("focus", v(r)),
          v(o).is("bordered", f.border),
          v(o).is("checked", v(u) === v(c)),
          v(o).m(v(s))
        ])
      }, [
        R("span", {
          class: _([
            v(o).e("input"),
            v(o).is("disabled", v(l)),
            v(o).is("checked", v(u) === v(c))
          ])
        }, [
          ie(R("input", {
            ref_key: "radioRef",
            ref: i,
            "onUpdate:modelValue": (h) => lt(u) ? u.value = h : null,
            class: _(v(o).e("original")),
            value: v(c),
            name: f.name || ((p = v(a)) == null ? void 0 : p.name),
            disabled: v(l),
            checked: v(u) === v(c),
            type: "radio",
            onFocus: (h) => r.value = !0,
            onBlur: (h) => r.value = !1,
            onChange: d,
            onClick: le(() => {
            }, ["stop"])
          }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [
            [Nr, v(u)]
          ]),
          R("span", {
            class: _(v(o).e("inner"))
          }, null, 2)
        ], 2),
        R("span", {
          class: _(v(o).e("label")),
          onKeydown: le(() => {
          }, ["stop"])
        }, [
          K(f.$slots, "default", {}, () => [
            Z(ee(f.label), 1)
          ])
        ], 42, ["onKeydown"])
      ], 2);
    };
  }
});
var kg = /* @__PURE__ */ X(Ig, [["__file", "radio.vue"]]);
const Tg = Q({
  ...nl
}), Ag = H({
  name: "ElRadioButton"
}), Og = /* @__PURE__ */ H({
  ...Ag,
  props: Tg,
  setup(e) {
    const t = e, n = te("radio"), { radioRef: o, focus: i, size: a, disabled: r, modelValue: s, radioGroup: l, actualValue: u } = al(t), c = b(() => ({
      backgroundColor: (l == null ? void 0 : l.fill) || "",
      borderColor: (l == null ? void 0 : l.fill) || "",
      boxShadow: l != null && l.fill ? `-1px 0 0 0 ${l.fill}` : "",
      color: (l == null ? void 0 : l.textColor) || ""
    }));
    return (d, f) => {
      var m;
      return w(), L("label", {
        class: _([
          v(n).b("button"),
          v(n).is("active", v(s) === v(u)),
          v(n).is("disabled", v(r)),
          v(n).is("focus", v(i)),
          v(n).bm("button", v(a))
        ])
      }, [
        ie(R("input", {
          ref_key: "radioRef",
          ref: o,
          "onUpdate:modelValue": (p) => lt(s) ? s.value = p : null,
          class: _(v(n).be("button", "original-radio")),
          value: v(u),
          type: "radio",
          name: d.name || ((m = v(l)) == null ? void 0 : m.name),
          disabled: v(r),
          onFocus: (p) => i.value = !0,
          onBlur: (p) => i.value = !1,
          onClick: le(() => {
          }, ["stop"])
        }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [
          [Nr, v(s)]
        ]),
        R("span", {
          class: _(v(n).be("button", "inner")),
          style: re(v(s) === v(u) ? v(c) : {}),
          onKeydown: le(() => {
          }, ["stop"])
        }, [
          K(d.$slots, "default", {}, () => [
            Z(ee(d.label), 1)
          ])
        ], 46, ["onKeydown"])
      ], 2);
    };
  }
});
var rl = /* @__PURE__ */ X(Og, [["__file", "radio-button.vue"]]);
const Mg = Q({
  id: {
    type: String,
    default: void 0
  },
  size: fn,
  disabled: Boolean,
  modelValue: {
    type: [String, Number, Boolean],
    default: void 0
  },
  fill: {
    type: String,
    default: ""
  },
  textColor: {
    type: String,
    default: ""
  },
  name: {
    type: String,
    default: void 0
  },
  validateEvent: {
    type: Boolean,
    default: !0
  },
  ...Ht(["ariaLabel"])
}), _g = ol, xg = H({
  name: "ElRadioGroup"
}), Pg = /* @__PURE__ */ H({
  ...xg,
  props: Mg,
  emits: _g,
  setup(e, { emit: t }) {
    const n = e, o = te("radio"), i = Dt(), a = x(), { formItem: r } = pn(), { inputId: s, isLabeledByFormItem: l } = No(n, {
      formItemContext: r
    }), u = (d) => {
      t(we, d), ce(() => t("change", d));
    };
    he(() => {
      const d = a.value.querySelectorAll("[type=radio]"), f = d[0];
      !Array.from(d).some((m) => m.checked) && f && (f.tabIndex = 0);
    });
    const c = b(() => n.name || i.value);
    return pe(il, ut({
      ...cn(n),
      changeEvent: u,
      name: c
    })), q(() => n.modelValue, () => {
      n.validateEvent && (r == null || r.validate("change").catch((d) => Oe(d)));
    }), (d, f) => (w(), L("div", {
      id: v(s),
      ref_key: "radioGroupRef",
      ref: a,
      class: _(v(o).b("group")),
      role: "radiogroup",
      "aria-label": v(l) ? void 0 : d.ariaLabel || "radio-group",
      "aria-labelledby": v(l) ? v(r).labelId : void 0
    }, [
      K(d.$slots, "default")
    ], 10, ["id", "aria-label", "aria-labelledby"]));
  }
});
var sl = /* @__PURE__ */ X(Pg, [["__file", "radio-group.vue"]]);
const ll = Me(kg, {
  RadioButton: rl,
  RadioGroup: sl
}), ul = zt(sl);
zt(rl);
const wi = Q({
  type: {
    type: String,
    values: ["primary", "success", "info", "warning", "danger"],
    default: "primary"
  },
  closable: Boolean,
  disableTransitions: Boolean,
  hit: Boolean,
  color: String,
  size: {
    type: String,
    values: ds
  },
  effect: {
    type: String,
    values: ["dark", "light", "plain"],
    default: "light"
  },
  round: Boolean
}), Lg = {
  close: (e) => e instanceof MouseEvent,
  click: (e) => e instanceof MouseEvent
}, Rg = H({
  name: "ElTag"
}), Fg = /* @__PURE__ */ H({
  ...Rg,
  props: wi,
  emits: Lg,
  setup(e, { emit: t }) {
    const n = e, o = un(), i = te("tag"), a = b(() => {
      const { type: u, hit: c, effect: d, closable: f, round: m } = n;
      return [
        i.b(),
        i.is("closable", f),
        i.m(u || "primary"),
        i.m(o.value),
        i.m(d),
        i.is("hit", c),
        i.is("round", m)
      ];
    }), r = (u) => {
      t("close", u);
    }, s = (u) => {
      t("click", u);
    }, l = (u) => {
      u.component.subTree.component.bum = null;
    };
    return (u, c) => u.disableTransitions ? (w(), L("span", {
      key: 0,
      class: _(v(a)),
      style: re({ backgroundColor: u.color }),
      onClick: s
    }, [
      R("span", {
        class: _(v(i).e("content"))
      }, [
        K(u.$slots, "default")
      ], 2),
      u.closable ? (w(), z(v(We), {
        key: 0,
        class: _(v(i).e("close")),
        onClick: le(r, ["stop"])
      }, {
        default: E(() => [
          P(v(ri))
        ]),
        _: 1
      }, 8, ["class", "onClick"])) : V("v-if", !0)
    ], 6)) : (w(), z(Vn, {
      key: 1,
      name: `${v(i).namespace.value}-zoom-in-center`,
      appear: "",
      onVnodeMounted: l
    }, {
      default: E(() => [
        R("span", {
          class: _(v(a)),
          style: re({ backgroundColor: u.color }),
          onClick: s
        }, [
          R("span", {
            class: _(v(i).e("content"))
          }, [
            K(u.$slots, "default")
          ], 2),
          u.closable ? (w(), z(v(We), {
            key: 0,
            class: _(v(i).e("close")),
            onClick: le(r, ["stop"])
          }, {
            default: E(() => [
              P(v(ri))
            ]),
            _: 1
          }, 8, ["class", "onClick"])) : V("v-if", !0)
        ], 6)
      ]),
      _: 3
    }, 8, ["name"]));
  }
});
var $g = /* @__PURE__ */ X(Fg, [["__file", "tag.vue"]]);
const Dg = Me($g), cl = Symbol("rowContextKey"), Ng = [
  "start",
  "center",
  "end",
  "space-around",
  "space-between",
  "space-evenly"
], Bg = ["top", "middle", "bottom"], Vg = Q({
  tag: {
    type: String,
    default: "div"
  },
  gutter: {
    type: Number,
    default: 0
  },
  justify: {
    type: String,
    values: Ng,
    default: "start"
  },
  align: {
    type: String,
    values: Bg
  }
}), zg = H({
  name: "ElRow"
}), Hg = /* @__PURE__ */ H({
  ...zg,
  props: Vg,
  setup(e) {
    const t = e, n = te("row"), o = b(() => t.gutter);
    pe(cl, {
      gutter: o
    });
    const i = b(() => {
      const r = {};
      return t.gutter && (r.marginRight = r.marginLeft = `-${t.gutter / 2}px`), r;
    }), a = b(() => [
      n.b(),
      n.is(`justify-${t.justify}`, t.justify !== "start"),
      n.is(`align-${t.align}`, !!t.align)
    ]);
    return (r, s) => (w(), z($e(r.tag), {
      class: _(v(a)),
      style: re(v(i))
    }, {
      default: E(() => [
        K(r.$slots, "default")
      ]),
      _: 3
    }, 8, ["class", "style"]));
  }
});
var Kg = /* @__PURE__ */ X(Hg, [["__file", "row.vue"]]);
const Un = Me(Kg), jg = Q({
  tag: {
    type: String,
    default: "div"
  },
  span: {
    type: Number,
    default: 24
  },
  offset: {
    type: Number,
    default: 0
  },
  pull: {
    type: Number,
    default: 0
  },
  push: {
    type: Number,
    default: 0
  },
  xs: {
    type: U([Number, Object]),
    default: () => kn({})
  },
  sm: {
    type: U([Number, Object]),
    default: () => kn({})
  },
  md: {
    type: U([Number, Object]),
    default: () => kn({})
  },
  lg: {
    type: U([Number, Object]),
    default: () => kn({})
  },
  xl: {
    type: U([Number, Object]),
    default: () => kn({})
  }
}), Ug = H({
  name: "ElCol"
}), Wg = /* @__PURE__ */ H({
  ...Ug,
  props: jg,
  setup(e) {
    const t = e, { gutter: n } = G(cl, { gutter: b(() => 0) }), o = te("col"), i = b(() => {
      const r = {};
      return n.value && (r.paddingLeft = r.paddingRight = `${n.value / 2}px`), r;
    }), a = b(() => {
      const r = [];
      return ["span", "offset", "pull", "push"].forEach((u) => {
        const c = t[u];
        me(c) && (u === "span" ? r.push(o.b(`${t[u]}`)) : c > 0 && r.push(o.b(`${u}-${t[u]}`)));
      }), ["xs", "sm", "md", "lg", "xl"].forEach((u) => {
        me(t[u]) ? r.push(o.b(`${u}-${t[u]}`)) : ke(t[u]) && Object.entries(t[u]).forEach(([c, d]) => {
          r.push(c !== "span" ? o.b(`${u}-${c}-${d}`) : o.b(`${u}-${d}`));
        });
      }), n.value && r.push(o.is("guttered")), [o.b(), r];
    });
    return (r, s) => (w(), z($e(r.tag), {
      class: _(v(a)),
      style: re(v(i))
    }, {
      default: E(() => [
        K(r.$slots, "default")
      ]),
      _: 3
    }, 8, ["class", "style"]));
  }
});
var qg = /* @__PURE__ */ X(Wg, [["__file", "col.vue"]]);
const Wn = Me(qg), Gg = Q({
  mask: {
    type: Boolean,
    default: !0
  },
  customMaskEvent: Boolean,
  overlayClass: {
    type: U([
      String,
      Array,
      Object
    ])
  },
  zIndex: {
    type: U([String, Number])
  }
}), Jg = {
  click: (e) => e instanceof MouseEvent
}, Yg = "overlay";
var Zg = H({
  name: "ElOverlay",
  props: Gg,
  emits: Jg,
  setup(e, { slots: t, emit: n }) {
    const o = te(Yg), i = (l) => {
      n("click", l);
    }, { onClick: a, onMousedown: r, onMouseup: s } = Ts(e.customMaskEvent ? void 0 : i);
    return () => e.mask ? P("div", {
      class: [o.b(), e.overlayClass],
      style: {
        zIndex: e.zIndex
      },
      onClick: a,
      onMousedown: r,
      onMouseup: s
    }, [K(t, "default")], po.STYLE | po.CLASS | po.PROPS, ["onClick", "onMouseup", "onMousedown"]) : Zt("div", {
      class: e.overlayClass,
      style: {
        zIndex: e.zIndex,
        position: "fixed",
        top: "0px",
        right: "0px",
        bottom: "0px",
        left: "0px"
      }
    }, [K(t, "default")]);
  }
});
const Qg = Zg, dl = Symbol("dialogInjectionKey"), fl = Q({
  center: Boolean,
  alignCenter: Boolean,
  closeIcon: {
    type: nn
  },
  draggable: Boolean,
  overflow: Boolean,
  fullscreen: Boolean,
  showClose: {
    type: Boolean,
    default: !0
  },
  title: {
    type: String,
    default: ""
  },
  ariaLevel: {
    type: String,
    default: "2"
  }
}), Xg = {
  close: () => !0
}, ey = H({ name: "ElDialogContent" }), ty = /* @__PURE__ */ H({
  ...ey,
  props: fl,
  emits: Xg,
  setup(e, { expose: t }) {
    const n = e, { t: o } = Fi(), { Close: i } = Pp, { dialogRef: a, headerRef: r, bodyId: s, ns: l, style: u } = G(dl), { focusTrapRef: c } = G(Vs), d = b(() => [
      l.b(),
      l.is("fullscreen", n.fullscreen),
      l.is("draggable", n.draggable),
      l.is("align-center", n.alignCenter),
      { [l.m("center")]: n.center }
    ]), f = Fp(c, a), m = b(() => n.draggable), p = b(() => n.overflow), { resetPosition: h } = Dp(a, r, m, p);
    return t({
      resetPosition: h
    }), (g, y) => (w(), L("div", {
      ref: v(f),
      class: _(v(d)),
      style: re(v(u)),
      tabindex: "-1"
    }, [
      R("header", {
        ref_key: "headerRef",
        ref: r,
        class: _([v(l).e("header"), { "show-close": g.showClose }])
      }, [
        K(g.$slots, "header", {}, () => [
          R("span", {
            role: "heading",
            "aria-level": g.ariaLevel,
            class: _(v(l).e("title"))
          }, ee(g.title), 11, ["aria-level"])
        ]),
        g.showClose ? (w(), L("button", {
          key: 0,
          "aria-label": v(o)("el.dialog.close"),
          class: _(v(l).e("headerbtn")),
          type: "button",
          onClick: (C) => g.$emit("close")
        }, [
          P(v(We), {
            class: _(v(l).e("close"))
          }, {
            default: E(() => [
              (w(), z($e(g.closeIcon || v(i))))
            ]),
            _: 1
          }, 8, ["class"])
        ], 10, ["aria-label", "onClick"])) : V("v-if", !0)
      ], 2),
      R("div", {
        id: v(s),
        class: _(v(l).e("body"))
      }, [
        K(g.$slots, "default")
      ], 10, ["id"]),
      g.$slots.footer ? (w(), L("footer", {
        key: 0,
        class: _(v(l).e("footer"))
      }, [
        K(g.$slots, "footer")
      ], 2)) : V("v-if", !0)
    ], 6));
  }
});
var ny = /* @__PURE__ */ X(ty, [["__file", "dialog-content.vue"]]);
const oy = Q({
  ...fl,
  appendToBody: Boolean,
  appendTo: {
    type: U([String, Object]),
    default: "body"
  },
  beforeClose: {
    type: U(Function)
  },
  destroyOnClose: Boolean,
  closeOnClickModal: {
    type: Boolean,
    default: !0
  },
  closeOnPressEscape: {
    type: Boolean,
    default: !0
  },
  lockScroll: {
    type: Boolean,
    default: !0
  },
  modal: {
    type: Boolean,
    default: !0
  },
  openDelay: {
    type: Number,
    default: 0
  },
  closeDelay: {
    type: Number,
    default: 0
  },
  top: {
    type: String
  },
  modelValue: Boolean,
  modalClass: String,
  width: {
    type: [String, Number]
  },
  zIndex: {
    type: Number
  },
  trapFocus: Boolean,
  headerAriaLevel: {
    type: String,
    default: "2"
  }
}), iy = {
  open: () => !0,
  opened: () => !0,
  close: () => !0,
  closed: () => !0,
  [we]: (e) => ct(e),
  openAutoFocus: () => !0,
  closeAutoFocus: () => !0
}, ay = (e, t) => {
  var n;
  const i = ge().emit, { nextZIndex: a } = Ui();
  let r = "";
  const s = Dt(), l = Dt(), u = x(!1), c = x(!1), d = x(!1), f = x((n = e.zIndex) != null ? n : a());
  let m, p;
  const h = $o("namespace", Mn), g = b(() => {
    const Y = {}, D = `--${h.value}-dialog`;
    return e.fullscreen || (e.top && (Y[`${D}-margin-top`] = e.top), e.width && (Y[`${D}-width`] = $t(e.width))), Y;
  }), y = b(() => e.alignCenter ? { display: "flex" } : {});
  function C() {
    i("opened");
  }
  function O() {
    i("closed"), i(we, !1), e.destroyOnClose && (d.value = !1);
  }
  function T() {
    i("close");
  }
  function I() {
    p == null || p(), m == null || m(), e.openDelay && e.openDelay > 0 ? { stop: m } = fa(() => N(), e.openDelay) : N();
  }
  function k() {
    m == null || m(), p == null || p(), e.closeDelay && e.closeDelay > 0 ? { stop: p } = fa(() => j(), e.closeDelay) : j();
  }
  function A() {
    function Y(D) {
      D || (c.value = !0, u.value = !1);
    }
    e.beforeClose ? e.beforeClose(Y) : k();
  }
  function $() {
    e.closeOnClickModal && A();
  }
  function N() {
    se && (u.value = !0);
  }
  function j() {
    u.value = !1;
  }
  function B() {
    i("openAutoFocus");
  }
  function M() {
    i("closeAutoFocus");
  }
  function W(Y) {
    var D;
    ((D = Y.detail) == null ? void 0 : D.focusReason) === "pointer" && Y.preventDefault();
  }
  e.lockScroll && Kp(u);
  function de() {
    e.closeOnPressEscape && A();
  }
  return q(() => e.modelValue, (Y) => {
    Y ? (c.value = !1, I(), d.value = !0, f.value = as(e.zIndex) ? a() : f.value++, ce(() => {
      i("open"), t.value && (t.value.scrollTop = 0);
    })) : u.value && k();
  }), q(() => e.fullscreen, (Y) => {
    t.value && (Y ? (r = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = r);
  }), he(() => {
    e.modelValue && (u.value = !0, d.value = !0, I());
  }), {
    afterEnter: C,
    afterLeave: O,
    beforeLeave: T,
    handleClose: A,
    onModalClick: $,
    close: k,
    doClose: j,
    onOpenAutoFocus: B,
    onCloseAutoFocus: M,
    onCloseRequested: de,
    onFocusoutPrevented: W,
    titleId: s,
    bodyId: l,
    closed: c,
    style: g,
    overlayDialogStyle: y,
    rendered: d,
    visible: u,
    zIndex: f
  };
}, ry = H({
  name: "ElDialog",
  inheritAttrs: !1
}), sy = /* @__PURE__ */ H({
  ...ry,
  props: oy,
  emits: iy,
  setup(e, { expose: t }) {
    const n = e, o = ko();
    en({
      scope: "el-dialog",
      from: "the title slot",
      replacement: "the header slot",
      version: "3.0.0",
      ref: "https://element-plus.org/en-US/component/dialog.html#slots"
    }, b(() => !!o.title));
    const i = te("dialog"), a = x(), r = x(), s = x(), {
      visible: l,
      titleId: u,
      bodyId: c,
      style: d,
      overlayDialogStyle: f,
      rendered: m,
      zIndex: p,
      afterEnter: h,
      afterLeave: g,
      beforeLeave: y,
      handleClose: C,
      onModalClick: O,
      onOpenAutoFocus: T,
      onCloseAutoFocus: I,
      onCloseRequested: k,
      onFocusoutPrevented: A
    } = ay(n, a);
    pe(dl, {
      dialogRef: a,
      headerRef: r,
      bodyId: c,
      ns: i,
      rendered: m,
      style: d
    });
    const $ = Ts(O), N = b(() => n.draggable && !n.fullscreen);
    return t({
      visible: l,
      dialogContentRef: s,
      resetPosition: () => {
        var B;
        (B = s.value) == null || B.resetPosition();
      }
    }), (B, M) => (w(), z(v(js), {
      to: B.appendTo,
      disabled: B.appendTo !== "body" ? !1 : !B.appendToBody
    }, {
      default: E(() => [
        P(Vn, {
          name: "dialog-fade",
          onAfterEnter: v(h),
          onAfterLeave: v(g),
          onBeforeLeave: v(y),
          persisted: ""
        }, {
          default: E(() => [
            ie(P(v(Qg), {
              "custom-mask-event": "",
              mask: B.modal,
              "overlay-class": B.modalClass,
              "z-index": v(p)
            }, {
              default: E(() => [
                R("div", {
                  role: "dialog",
                  "aria-modal": "true",
                  "aria-label": B.title || void 0,
                  "aria-labelledby": B.title ? void 0 : v(u),
                  "aria-describedby": v(c),
                  class: _(`${v(i).namespace.value}-overlay-dialog`),
                  style: re(v(f)),
                  onClick: v($).onClick,
                  onMousedown: v($).onMousedown,
                  onMouseup: v($).onMouseup
                }, [
                  P(v(Hs), {
                    loop: "",
                    trapped: v(l),
                    "focus-start-el": "container",
                    onFocusAfterTrapped: v(T),
                    onFocusAfterReleased: v(I),
                    onFocusoutPrevented: v(A),
                    onReleaseRequested: v(k)
                  }, {
                    default: E(() => [
                      v(m) ? (w(), z(ny, Nt({
                        key: 0,
                        ref_key: "dialogContentRef",
                        ref: s
                      }, B.$attrs, {
                        center: B.center,
                        "align-center": B.alignCenter,
                        "close-icon": B.closeIcon,
                        draggable: v(N),
                        overflow: B.overflow,
                        fullscreen: B.fullscreen,
                        "show-close": B.showClose,
                        title: B.title,
                        "aria-level": B.headerAriaLevel,
                        onClose: v(C)
                      }), Br({
                        header: E(() => [
                          B.$slots.title ? K(B.$slots, "title", { key: 1 }) : K(B.$slots, "header", {
                            key: 0,
                            close: v(C),
                            titleId: v(u),
                            titleClass: v(i).e("title")
                          })
                        ]),
                        default: E(() => [
                          K(B.$slots, "default")
                        ]),
                        _: 2
                      }, [
                        B.$slots.footer ? {
                          name: "footer",
                          fn: E(() => [
                            K(B.$slots, "footer")
                          ])
                        } : void 0
                      ]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "show-close", "title", "aria-level", "onClose"])) : V("v-if", !0)
                    ]),
                    _: 3
                  }, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
                ], 46, ["aria-label", "aria-labelledby", "aria-describedby", "onClick", "onMousedown", "onMouseup"])
              ]),
              _: 3
            }, 8, ["mask", "overlay-class", "z-index"]), [
              [Ee, v(l)]
            ])
          ]),
          _: 3
        }, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
      ]),
      _: 3
    }, 8, ["to", "disabled"]));
  }
});
var ly = /* @__PURE__ */ X(sy, [["__file", "dialog.vue"]]);
const uy = Me(ly), cy = /* @__PURE__ */ H({
  inheritAttrs: !1
});
function dy(e, t, n, o, i, a) {
  return K(e.$slots, "default");
}
var fy = /* @__PURE__ */ X(cy, [["render", dy], ["__file", "collection.vue"]]);
const py = /* @__PURE__ */ H({
  name: "ElCollectionItem",
  inheritAttrs: !1
});
function hy(e, t, n, o, i, a) {
  return K(e.$slots, "default");
}
var my = /* @__PURE__ */ X(py, [["render", hy], ["__file", "collection-item.vue"]]);
const vy = "data-el-collection-item", gy = (e) => {
  const t = `El${e}Collection`, n = `${t}Item`, o = Symbol(t), i = Symbol(n), a = {
    ...fy,
    name: t,
    setup() {
      const s = x(null), l = /* @__PURE__ */ new Map();
      pe(o, {
        itemMap: l,
        getItems: () => {
          const c = v(s);
          if (!c)
            return [];
          const d = Array.from(c.querySelectorAll(`[${vy}]`));
          return [...l.values()].sort((m, p) => d.indexOf(m.ref) - d.indexOf(p.ref));
        },
        collectionRef: s
      });
    }
  }, r = {
    ...my,
    name: n,
    setup(s, { attrs: l }) {
      const u = x(null), c = G(o, void 0);
      pe(i, {
        collectionItemRef: u
      }), he(() => {
        const d = v(u);
        d && c.itemMap.set(d, {
          ref: d,
          ...l
        });
      }), Ve(() => {
        const d = v(u);
        c.itemMap.delete(d);
      });
    }
  };
  return {
    COLLECTION_INJECTION_KEY: o,
    COLLECTION_ITEM_INJECTION_KEY: i,
    ElCollection: a,
    ElCollectionItem: r
  };
}, oi = Q({
  trigger: Bn.trigger,
  effect: {
    ...Pe.effect,
    default: "light"
  },
  type: {
    type: U(String)
  },
  placement: {
    type: U(String),
    default: "bottom"
  },
  popperOptions: {
    type: U(Object),
    default: () => ({})
  },
  id: String,
  size: {
    type: String,
    default: ""
  },
  splitButton: Boolean,
  hideOnClick: {
    type: Boolean,
    default: !0
  },
  loop: {
    type: Boolean,
    default: !0
  },
  showTimeout: {
    type: Number,
    default: 150
  },
  hideTimeout: {
    type: Number,
    default: 150
  },
  tabindex: {
    type: U([Number, String]),
    default: 0
  },
  maxHeight: {
    type: U([Number, String]),
    default: ""
  },
  popperClass: {
    type: String,
    default: ""
  },
  disabled: Boolean,
  role: {
    type: String,
    default: "menu"
  },
  buttonProps: {
    type: U(Object)
  },
  teleported: Pe.teleported
});
Q({
  command: {
    type: [Object, String, Number],
    default: () => ({})
  },
  disabled: Boolean,
  divided: Boolean,
  textValue: String,
  icon: {
    type: nn
  }
});
Q({
  onKeydown: { type: U(Function) }
});
gy("Dropdown");
const pl = Symbol("ElSelectGroup"), Vo = Symbol("ElSelect");
function yy(e, t) {
  const n = G(Vo), o = G(pl, { disabled: !1 }), i = b(() => c(St(n.props.modelValue), e.value)), a = b(() => {
    var m;
    if (n.props.multiple) {
      const p = St((m = n.props.modelValue) != null ? m : []);
      return !i.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0;
    } else
      return !1;
  }), r = b(() => e.label || (ke(e.value) ? "" : e.value)), s = b(() => e.value || e.label || ""), l = b(() => e.disabled || t.groupDisabled || a.value), u = ge(), c = (m = [], p) => {
    if (ke(e.value)) {
      const h = n.props.valueKey;
      return m && m.some((g) => go(at(g, h)) === at(p, h));
    } else
      return m && m.includes(p);
  }, d = () => {
    !e.disabled && !o.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(u.proxy));
  }, f = (m) => {
    const p = new RegExp(Ap(m), "i");
    t.visible = p.test(r.value) || e.created;
  };
  return q(() => r.value, () => {
    !e.created && !n.props.remote && n.setSelected();
  }), q(() => e.value, (m, p) => {
    const { remote: h, valueKey: g } = n.props;
    if (m !== p && (n.onOptionDestroy(p, u.proxy), n.onOptionCreate(u.proxy)), !e.created && !h) {
      if (g && ke(m) && ke(p) && m[g] === p[g])
        return;
      n.setSelected();
    }
  }), q(() => o.disabled, () => {
    t.groupDisabled = o.disabled;
  }, { immediate: !0 }), {
    select: n,
    currentLabel: r,
    currentValue: s,
    itemSelected: i,
    isDisabled: l,
    hoverItem: d,
    updateOption: f
  };
}
const by = H({
  name: "ElOption",
  componentName: "ElOption",
  props: {
    value: {
      required: !0,
      type: [String, Number, Boolean, Object]
    },
    label: [String, Number],
    created: Boolean,
    disabled: Boolean
  },
  setup(e) {
    const t = te("select"), n = Dt(), o = b(() => [
      t.be("dropdown", "item"),
      t.is("disabled", v(s)),
      t.is("selected", v(r)),
      t.is("hovering", v(f))
    ]), i = ut({
      index: -1,
      groupDisabled: !1,
      visible: !0,
      hover: !1
    }), {
      currentLabel: a,
      itemSelected: r,
      isDisabled: s,
      select: l,
      hoverItem: u,
      updateOption: c
    } = yy(e, i), { visible: d, hover: f } = cn(i), m = ge().proxy;
    l.onOptionCreate(m), Ve(() => {
      const h = m.value, { selected: g } = l.states, C = (l.props.multiple ? g : [g]).some((O) => O.value === m.value);
      ce(() => {
        l.states.cachedOptions.get(h) === m && !C && l.states.cachedOptions.delete(h);
      }), l.onOptionDestroy(h, m);
    });
    function p() {
      s.value || l.handleOptionSelect(m);
    }
    return {
      ns: t,
      id: n,
      containerKls: o,
      currentLabel: a,
      itemSelected: r,
      isDisabled: s,
      select: l,
      hoverItem: u,
      updateOption: c,
      visible: d,
      hover: f,
      selectOptionClick: p,
      states: i
    };
  }
});
function wy(e, t, n, o, i, a) {
  return ie((w(), L("li", {
    id: e.id,
    class: _(e.containerKls),
    role: "option",
    "aria-disabled": e.isDisabled || void 0,
    "aria-selected": e.itemSelected,
    onMouseenter: e.hoverItem,
    onClick: le(e.selectOptionClick, ["stop"])
  }, [
    K(e.$slots, "default", {}, () => [
      R("span", null, ee(e.currentLabel), 1)
    ])
  ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [
    [Ee, e.visible]
  ]);
}
var Xi = /* @__PURE__ */ X(by, [["render", wy], ["__file", "option.vue"]]);
const Sy = H({
  name: "ElSelectDropdown",
  componentName: "ElSelectDropdown",
  setup() {
    const e = G(Vo), t = te("select"), n = b(() => e.props.popperClass), o = b(() => e.props.multiple), i = b(() => e.props.fitInputWidth), a = x("");
    function r() {
      var s;
      a.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`;
    }
    return he(() => {
      r(), bt(e.selectRef, r);
    }), {
      ns: t,
      minWidth: a,
      popperClass: n,
      isMultiple: o,
      isFitInputWidth: i
    };
  }
});
function Cy(e, t, n, o, i, a) {
  return w(), L("div", {
    class: _([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]),
    style: re({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth })
  }, [
    e.$slots.header ? (w(), L("div", {
      key: 0,
      class: _(e.ns.be("dropdown", "header"))
    }, [
      K(e.$slots, "header")
    ], 2)) : V("v-if", !0),
    K(e.$slots, "default"),
    e.$slots.footer ? (w(), L("div", {
      key: 1,
      class: _(e.ns.be("dropdown", "footer"))
    }, [
      K(e.$slots, "footer")
    ], 2)) : V("v-if", !0)
  ], 6);
}
var Ey = /* @__PURE__ */ X(Sy, [["render", Cy], ["__file", "select-dropdown.vue"]]);
const Iy = 11, ky = (e, t) => {
  const { t: n } = Fi(), o = Dt(), i = te("select"), a = te("input"), r = ut({
    inputValue: "",
    options: /* @__PURE__ */ new Map(),
    cachedOptions: /* @__PURE__ */ new Map(),
    disabledOptions: /* @__PURE__ */ new Map(),
    optionValues: [],
    selected: [],
    selectionWidth: 0,
    calculatorWidth: 0,
    collapseItemWidth: 0,
    selectedLabel: "",
    hoveringIndex: -1,
    previousQuery: null,
    inputHovering: !1,
    menuVisibleOnFocus: !1,
    isBeforeHide: !1
  }), s = x(null), l = x(null), u = x(null), c = x(null), d = x(null), f = x(null), m = x(null), p = x(null), h = x(null), g = x(null), y = x(null), C = x(null), {
    isComposing: O,
    handleCompositionStart: T,
    handleCompositionUpdate: I,
    handleCompositionEnd: k
  } = sm({
    afterComposition: (S) => wn(S)
  }), { wrapperRef: A, isFocused: $ } = rm(d, {
    beforeFocus() {
      return D.value;
    },
    afterFocus() {
      e.automaticDropdown && !N.value && (N.value = !0, r.menuVisibleOnFocus = !0);
    },
    beforeBlur(S) {
      var F, J;
      return ((F = u.value) == null ? void 0 : F.isFocusInsideContent(S)) || ((J = c.value) == null ? void 0 : J.isFocusInsideContent(S));
    },
    afterBlur() {
      N.value = !1, r.menuVisibleOnFocus = !1;
    }
  }), N = x(!1), j = x(), { form: B, formItem: M } = pn(), { inputId: W } = No(e, {
    formItemContext: M
  }), { valueOnClear: de, isEmptyValue: Y } = fm(e), D = b(() => e.disabled || (B == null ? void 0 : B.disabled)), ne = b(() => Ie(e.modelValue) ? e.modelValue.length > 0 : !Y(e.modelValue)), Le = b(() => e.clearable && !D.value && r.inputHovering && ne.value), ye = b(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), be = b(() => i.is("reverse", ye.value && N.value)), _e = b(() => (M == null ? void 0 : M.validateState) || ""), Ge = b(() => Lp[_e.value]), jt = b(() => e.remote ? 300 : 0), Je = b(() => e.loading ? e.loadingText || n("el.select.loading") : e.remote && !r.inputValue && r.options.size === 0 ? !1 : e.filterable && r.inputValue && r.options.size > 0 && Ce.value === 0 ? e.noMatchText || n("el.select.noMatch") : r.options.size === 0 ? e.noDataText || n("el.select.noData") : null), Ce = b(() => ue.value.filter((S) => S.visible).length), ue = b(() => {
    const S = Array.from(r.options.values()), F = [];
    return r.optionValues.forEach((J) => {
      const oe = S.findIndex((mt) => mt.value === J);
      oe > -1 && F.push(S[oe]);
    }), F.length >= S.length ? F : S;
  }), Tt = b(() => Array.from(r.cachedOptions.values())), ht = b(() => {
    const S = ue.value.filter((F) => !F.created).some((F) => F.currentLabel === r.inputValue);
    return e.filterable && e.allowCreate && r.inputValue !== "" && !S;
  }), Gn = () => {
    e.filterable && Se(e.filterMethod) || e.filterable && e.remote && Se(e.remoteMethod) || ue.value.forEach((S) => {
      var F;
      (F = S.updateOption) == null || F.call(S, r.inputValue);
    });
  }, Jn = un(), mn = b(() => ["small"].includes(Jn.value) ? "small" : "default"), Ho = b({
    get() {
      return N.value && Je.value !== !1;
    },
    set(S) {
      N.value = S;
    }
  }), Yn = b(() => {
    if (e.multiple && !Ct(e.modelValue))
      return St(e.modelValue).length === 0 && !r.inputValue;
    const S = Ie(e.modelValue) ? e.modelValue[0] : e.modelValue;
    return e.filterable || Ct(S) ? !r.inputValue : !0;
  }), Ko = b(() => {
    var S;
    const F = (S = e.placeholder) != null ? S : n("el.select.placeholder");
    return e.multiple || !ne.value ? F : r.selectedLabel;
  }), jo = b(() => si ? null : "mouseenter");
  q(() => e.modelValue, (S, F) => {
    e.multiple && e.filterable && !e.reserveKeyword && (r.inputValue = "", At("")), Ut(), !So(S, F) && e.validateEvent && (M == null || M.validate("change").catch((J) => Oe(J)));
  }, {
    flush: "post",
    deep: !0
  }), q(() => N.value, (S) => {
    S ? At(r.inputValue) : (r.inputValue = "", r.previousQuery = null, r.isBeforeHide = !0), t("visible-change", S);
  }), q(() => r.options.entries(), () => {
    var S;
    if (!se)
      return;
    const F = ((S = s.value) == null ? void 0 : S.querySelectorAll("input")) || [];
    (!e.filterable && !e.defaultFirstOption && !Ct(e.modelValue) || !Array.from(F).includes(document.activeElement)) && Ut(), e.defaultFirstOption && (e.filterable || e.remote) && Ce.value && vn();
  }, {
    flush: "post"
  }), q(() => r.hoveringIndex, (S) => {
    me(S) && S > -1 ? j.value = ue.value[S] || {} : j.value = {}, ue.value.forEach((F) => {
      F.hover = j.value === F;
    });
  }), $r(() => {
    r.isBeforeHide || Gn();
  });
  const At = (S) => {
    r.previousQuery === S || O.value || (r.previousQuery = S, e.filterable && Se(e.filterMethod) ? e.filterMethod(S) : e.filterable && e.remote && Se(e.remoteMethod) && e.remoteMethod(S), e.defaultFirstOption && (e.filterable || e.remote) && Ce.value ? ce(vn) : ce(nt));
  }, vn = () => {
    const S = ue.value.filter((oe) => oe.visible && !oe.disabled && !oe.states.groupDisabled), F = S.find((oe) => oe.created), J = S[0];
    r.hoveringIndex = ra(ue.value, F || J);
  }, Ut = () => {
    if (e.multiple)
      r.selectedLabel = "";
    else {
      const F = Ie(e.modelValue) ? e.modelValue[0] : e.modelValue, J = Zn(F);
      r.selectedLabel = J.currentLabel, r.selected = [J];
      return;
    }
    const S = [];
    Ct(e.modelValue) || St(e.modelValue).forEach((F) => {
      S.push(Zn(F));
    }), r.selected = S;
  }, Zn = (S) => {
    let F;
    const J = Wo(S).toLowerCase() === "object", oe = Wo(S).toLowerCase() === "null", mt = Wo(S).toLowerCase() === "undefined";
    for (let Mt = r.cachedOptions.size - 1; Mt >= 0; Mt--) {
      const Ye = Tt.value[Mt];
      if (J ? at(Ye.value, e.valueKey) === at(S, e.valueKey) : Ye.value === S) {
        F = {
          value: S,
          currentLabel: Ye.currentLabel,
          get isDisabled() {
            return Ye.isDisabled;
          }
        };
        break;
      }
    }
    if (F)
      return F;
    const qt = J ? S.label : !oe && !mt ? S : "";
    return {
      value: S,
      currentLabel: qt
    };
  }, nt = () => {
    r.hoveringIndex = ue.value.findIndex((S) => r.selected.some((F) => Uo(F) === Uo(S)));
  }, Wt = () => {
    r.selectionWidth = l.value.getBoundingClientRect().width;
  }, gn = () => {
    r.calculatorWidth = f.value.getBoundingClientRect().width;
  }, Qn = () => {
    r.collapseItemWidth = y.value.getBoundingClientRect().width;
  }, Ot = () => {
    var S, F;
    (F = (S = u.value) == null ? void 0 : S.updatePopper) == null || F.call(S);
  }, yn = () => {
    var S, F;
    (F = (S = c.value) == null ? void 0 : S.updatePopper) == null || F.call(S);
  }, bn = () => {
    r.inputValue.length > 0 && !N.value && (N.value = !0), At(r.inputValue);
  }, wn = (S) => {
    if (r.inputValue = S.target.value, e.remote)
      Sn();
    else
      return bn();
  }, Sn = Sp(() => {
    bn();
  }, jt.value), Cn = (S) => {
    So(e.modelValue, S) || t(Ri, S);
  }, Sl = (S) => Cp(S, (F) => !r.disabledOptions.has(F)), Cl = (S) => {
    if (e.multiple && S.code !== $n.delete && S.target.value.length <= 0) {
      const F = St(e.modelValue).slice(), J = Sl(F);
      if (J < 0)
        return;
      const oe = F[J];
      F.splice(J, 1), t(we, F), Cn(F), t("remove-tag", oe);
    }
  }, El = (S, F) => {
    const J = r.selected.indexOf(F);
    if (J > -1 && !D.value) {
      const oe = St(e.modelValue).slice();
      oe.splice(J, 1), t(we, oe), Cn(oe), t("remove-tag", F.value);
    }
    S.stopPropagation(), eo();
  }, ia = (S) => {
    S.stopPropagation();
    const F = e.multiple ? [] : de.value;
    if (e.multiple)
      for (const J of r.selected)
        J.isDisabled && F.push(J.value);
    t(we, F), Cn(F), r.hoveringIndex = -1, N.value = !1, t("clear"), eo();
  }, aa = (S) => {
    var F;
    if (e.multiple) {
      const J = St((F = e.modelValue) != null ? F : []).slice(), oe = ra(J, S.value);
      oe > -1 ? J.splice(oe, 1) : (e.multipleLimit <= 0 || J.length < e.multipleLimit) && J.push(S.value), t(we, J), Cn(J), S.created && At(""), e.filterable && !e.reserveKeyword && (r.inputValue = "");
    } else
      t(we, S.value), Cn(S.value), N.value = !1;
    eo(), !N.value && ce(() => {
      Xn(S);
    });
  }, ra = (S = [], F) => {
    if (!ke(F))
      return S.indexOf(F);
    const J = e.valueKey;
    let oe = -1;
    return S.some((mt, qt) => go(at(mt, J)) === at(F, J) ? (oe = qt, !0) : !1), oe;
  }, Xn = (S) => {
    var F, J, oe, mt, qt;
    const to = Ie(S) ? S[0] : S;
    let Mt = null;
    if (to != null && to.value) {
      const Ye = ue.value.filter((ca) => ca.value === to.value);
      Ye.length > 0 && (Mt = Ye[0].$el);
    }
    if (u.value && Mt) {
      const Ye = (mt = (oe = (J = (F = u.value) == null ? void 0 : F.popperRef) == null ? void 0 : J.contentRef) == null ? void 0 : oe.querySelector) == null ? void 0 : mt.call(oe, `.${i.be("dropdown", "wrap")}`);
      Ye && _p(Ye, Mt);
    }
    (qt = C.value) == null || qt.handleScroll();
  }, Il = (S) => {
    r.options.set(S.value, S), r.cachedOptions.set(S.value, S), S.disabled && r.disabledOptions.set(S.value, S);
  }, kl = (S, F) => {
    r.options.get(S) === F && r.options.delete(S);
  }, Tl = b(() => {
    var S, F;
    return (F = (S = u.value) == null ? void 0 : S.popperRef) == null ? void 0 : F.contentRef;
  }), Al = () => {
    r.isBeforeHide = !1, ce(() => Xn(r.selected));
  }, eo = () => {
    var S;
    (S = d.value) == null || S.focus();
  }, sa = () => {
    var S;
    (S = d.value) == null || S.blur();
  }, Ol = (S) => {
    ia(S);
  }, Ml = () => {
    N.value = !1, $.value && sa();
  }, _l = () => {
    r.inputValue.length > 0 ? r.inputValue = "" : N.value = !1;
  }, la = () => {
    D.value || (si && (r.inputHovering = !0), r.menuVisibleOnFocus ? r.menuVisibleOnFocus = !1 : N.value = !N.value);
  }, xl = () => {
    N.value ? ue.value[r.hoveringIndex] && aa(ue.value[r.hoveringIndex]) : la();
  }, Uo = (S) => ke(S.value) ? at(S.value, e.valueKey) : S.value, Pl = b(() => ue.value.filter((S) => S.visible).every((S) => S.disabled)), Ll = b(() => e.multiple ? e.collapseTags ? r.selected.slice(0, e.maxCollapseTags) : r.selected : []), Rl = b(() => e.multiple ? e.collapseTags ? r.selected.slice(e.maxCollapseTags) : [] : []), ua = (S) => {
    if (!N.value) {
      N.value = !0;
      return;
    }
    if (!(r.options.size === 0 || r.filteredOptionsCount === 0 || O.value) && !Pl.value) {
      S === "next" ? (r.hoveringIndex++, r.hoveringIndex === r.options.size && (r.hoveringIndex = 0)) : S === "prev" && (r.hoveringIndex--, r.hoveringIndex < 0 && (r.hoveringIndex = r.options.size - 1));
      const F = ue.value[r.hoveringIndex];
      (F.disabled === !0 || F.states.groupDisabled === !0 || !F.visible) && ua(S), ce(() => Xn(j.value));
    }
  }, Fl = () => {
    if (!l.value)
      return 0;
    const S = window.getComputedStyle(l.value);
    return Number.parseFloat(S.gap || "6px");
  }, $l = b(() => {
    const S = Fl();
    return { maxWidth: `${y.value && e.maxCollapseTags === 1 ? r.selectionWidth - r.collapseItemWidth - S : r.selectionWidth}px` };
  }), Dl = b(() => ({ maxWidth: `${r.selectionWidth}px` })), Nl = b(() => ({
    width: `${Math.max(r.calculatorWidth, Iy)}px`
  }));
  return bt(l, Wt), bt(f, gn), bt(h, Ot), bt(A, Ot), bt(g, yn), bt(y, Qn), he(() => {
    Ut();
  }), {
    inputId: W,
    contentId: o,
    nsSelect: i,
    nsInput: a,
    states: r,
    isFocused: $,
    expanded: N,
    optionsArray: ue,
    hoverOption: j,
    selectSize: Jn,
    filteredOptionsCount: Ce,
    resetCalculatorWidth: gn,
    updateTooltip: Ot,
    updateTagTooltip: yn,
    debouncedOnInputChange: Sn,
    onInput: wn,
    deletePrevTag: Cl,
    deleteTag: El,
    deleteSelected: ia,
    handleOptionSelect: aa,
    scrollToOption: Xn,
    hasModelValue: ne,
    shouldShowPlaceholder: Yn,
    currentPlaceholder: Ko,
    mouseEnterEventName: jo,
    showClose: Le,
    iconComponent: ye,
    iconReverse: be,
    validateState: _e,
    validateIcon: Ge,
    showNewOption: ht,
    updateOptions: Gn,
    collapseTagSize: mn,
    setSelected: Ut,
    selectDisabled: D,
    emptyText: Je,
    handleCompositionStart: T,
    handleCompositionUpdate: I,
    handleCompositionEnd: k,
    onOptionCreate: Il,
    onOptionDestroy: kl,
    handleMenuEnter: Al,
    focus: eo,
    blur: sa,
    handleClearClick: Ol,
    handleClickOutside: Ml,
    handleEsc: _l,
    toggleMenu: la,
    selectOption: xl,
    getValueKey: Uo,
    navigateOptions: ua,
    dropdownMenuVisible: Ho,
    showTagList: Ll,
    collapseTagList: Rl,
    tagStyle: $l,
    collapseTagStyle: Dl,
    inputStyle: Nl,
    popperRef: Tl,
    inputRef: d,
    tooltipRef: u,
    tagTooltipRef: c,
    calculatorRef: f,
    prefixRef: m,
    suffixRef: p,
    selectRef: s,
    wrapperRef: A,
    selectionRef: l,
    scrollbarRef: C,
    menuRef: h,
    tagMenuRef: g,
    collapseItemRef: y
  };
};
var Ty = H({
  name: "ElOptions",
  setup(e, { slots: t }) {
    const n = G(Vo);
    let o = [];
    return () => {
      var i, a;
      const r = (i = t.default) == null ? void 0 : i.call(t), s = [];
      function l(u) {
        Ie(u) && u.forEach((c) => {
          var d, f, m, p;
          const h = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name;
          h === "ElOptionGroup" ? l(!je(c.children) && !Ie(c.children) && Se((f = c.children) == null ? void 0 : f.default) ? (m = c.children) == null ? void 0 : m.default() : c.children) : h === "ElOption" ? s.push((p = c.props) == null ? void 0 : p.value) : Ie(c.children) && l(c.children);
        });
      }
      return r.length && l((a = r[0]) == null ? void 0 : a.children), So(s, o) || (o = s, n && (n.states.optionValues = s)), r;
    };
  }
});
const Ay = Q({
  name: String,
  id: String,
  modelValue: {
    type: [Array, String, Number, Boolean, Object],
    default: void 0
  },
  autocomplete: {
    type: String,
    default: "off"
  },
  automaticDropdown: Boolean,
  size: fn,
  effect: {
    type: U(String),
    default: "light"
  },
  disabled: Boolean,
  clearable: Boolean,
  filterable: Boolean,
  allowCreate: Boolean,
  loading: Boolean,
  popperClass: {
    type: String,
    default: ""
  },
  popperOptions: {
    type: U(Object),
    default: () => ({})
  },
  remote: Boolean,
  loadingText: String,
  noMatchText: String,
  noDataText: String,
  remoteMethod: Function,
  filterMethod: Function,
  multiple: Boolean,
  multipleLimit: {
    type: Number,
    default: 0
  },
  placeholder: {
    type: String
  },
  defaultFirstOption: Boolean,
  reserveKeyword: {
    type: Boolean,
    default: !0
  },
  valueKey: {
    type: String,
    default: "value"
  },
  collapseTags: Boolean,
  collapseTagsTooltip: Boolean,
  maxCollapseTags: {
    type: Number,
    default: 1
  },
  teleported: Pe.teleported,
  persistent: {
    type: Boolean,
    default: !0
  },
  clearIcon: {
    type: nn,
    default: _r
  },
  fitInputWidth: Boolean,
  suffixIcon: {
    type: nn,
    default: ki
  },
  tagType: { ...wi.type, default: "info" },
  tagEffect: { ...wi.effect, default: "light" },
  validateEvent: {
    type: Boolean,
    default: !0
  },
  remoteShowSuffix: Boolean,
  placement: {
    type: U(String),
    values: Ro,
    default: "bottom-start"
  },
  fallbackPlacements: {
    type: U(Array),
    default: ["bottom-start", "top-start", "right", "left"]
  },
  appendTo: String,
  ...dm,
  ...Ht(["ariaLabel"])
}), Ir = "ElSelect", Oy = H({
  name: Ir,
  componentName: Ir,
  components: {
    ElSelectMenu: Ey,
    ElOption: Xi,
    ElOptions: Ty,
    ElTag: Dg,
    ElScrollbar: Rm,
    ElTooltip: Us,
    ElIcon: We
  },
  directives: { ClickOutside: lg },
  props: Ay,
  emits: [
    we,
    Ri,
    "remove-tag",
    "clear",
    "visible-change",
    "focus",
    "blur"
  ],
  setup(e, { emit: t }) {
    const n = b(() => {
      const { modelValue: a, multiple: r } = e, s = r ? [] : void 0;
      return Ie(a) ? r ? a : s : r ? s : a;
    }), o = ut({
      ...cn(e),
      modelValue: n
    }), i = ky(o, t);
    return pe(Vo, ut({
      props: o,
      states: i.states,
      optionsArray: i.optionsArray,
      handleOptionSelect: i.handleOptionSelect,
      onOptionCreate: i.onOptionCreate,
      onOptionDestroy: i.onOptionDestroy,
      selectRef: i.selectRef,
      setSelected: i.setSelected
    })), {
      ...i,
      modelValue: n
    };
  }
});
function My(e, t, n, o, i, a) {
  const r = Fe("el-tag"), s = Fe("el-tooltip"), l = Fe("el-icon"), u = Fe("el-option"), c = Fe("el-options"), d = Fe("el-scrollbar"), f = Fe("el-select-menu"), m = Zl("click-outside");
  return ie((w(), L("div", {
    ref: "selectRef",
    class: _([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]),
    [Ql(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0,
    onMouseleave: (p) => e.states.inputHovering = !1
  }, [
    P(s, {
      ref: "tooltipRef",
      visible: e.dropdownMenuVisible,
      placement: e.placement,
      teleported: e.teleported,
      "popper-class": [e.nsSelect.e("popper"), e.popperClass],
      "popper-options": e.popperOptions,
      "fallback-placements": e.fallbackPlacements,
      effect: e.effect,
      pure: "",
      trigger: "click",
      transition: `${e.nsSelect.namespace.value}-zoom-in-top`,
      "stop-popper-mouse-event": !1,
      "gpu-acceleration": !1,
      persistent: e.persistent,
      "append-to": e.appendTo,
      onBeforeShow: e.handleMenuEnter,
      onHide: (p) => e.states.isBeforeHide = !1
    }, {
      default: E(() => {
        var p;
        return [
          R("div", {
            ref: "wrapperRef",
            class: _([
              e.nsSelect.e("wrapper"),
              e.nsSelect.is("focused", e.isFocused),
              e.nsSelect.is("hovering", e.states.inputHovering),
              e.nsSelect.is("filterable", e.filterable),
              e.nsSelect.is("disabled", e.selectDisabled)
            ]),
            onClick: le(e.toggleMenu, ["prevent"])
          }, [
            e.$slots.prefix ? (w(), L("div", {
              key: 0,
              ref: "prefixRef",
              class: _(e.nsSelect.e("prefix"))
            }, [
              K(e.$slots, "prefix")
            ], 2)) : V("v-if", !0),
            R("div", {
              ref: "selectionRef",
              class: _([
                e.nsSelect.e("selection"),
                e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length)
              ])
            }, [
              e.multiple ? K(e.$slots, "tag", { key: 0 }, () => [
                (w(!0), L(fe, null, Ke(e.showTagList, (h) => (w(), L("div", {
                  key: e.getValueKey(h),
                  class: _(e.nsSelect.e("selected-item"))
                }, [
                  P(r, {
                    closable: !e.selectDisabled && !h.isDisabled,
                    size: e.collapseTagSize,
                    type: e.tagType,
                    effect: e.tagEffect,
                    "disable-transitions": "",
                    style: re(e.tagStyle),
                    onClose: (g) => e.deleteTag(g, h)
                  }, {
                    default: E(() => [
                      R("span", {
                        class: _(e.nsSelect.e("tags-text"))
                      }, [
                        K(e.$slots, "label", {
                          label: h.currentLabel,
                          value: h.value
                        }, () => [
                          Z(ee(h.currentLabel), 1)
                        ])
                      ], 2)
                    ]),
                    _: 2
                  }, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
                ], 2))), 128)),
                e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (w(), z(s, {
                  key: 0,
                  ref: "tagTooltipRef",
                  disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip,
                  "fallback-placements": ["bottom", "top", "right", "left"],
                  effect: e.effect,
                  placement: "bottom",
                  teleported: e.teleported
                }, {
                  default: E(() => [
                    R("div", {
                      ref: "collapseItemRef",
                      class: _(e.nsSelect.e("selected-item"))
                    }, [
                      P(r, {
                        closable: !1,
                        size: e.collapseTagSize,
                        type: e.tagType,
                        effect: e.tagEffect,
                        "disable-transitions": "",
                        style: re(e.collapseTagStyle)
                      }, {
                        default: E(() => [
                          R("span", {
                            class: _(e.nsSelect.e("tags-text"))
                          }, " + " + ee(e.states.selected.length - e.maxCollapseTags), 3)
                        ]),
                        _: 1
                      }, 8, ["size", "type", "effect", "style"])
                    ], 2)
                  ]),
                  content: E(() => [
                    R("div", {
                      ref: "tagMenuRef",
                      class: _(e.nsSelect.e("selection"))
                    }, [
                      (w(!0), L(fe, null, Ke(e.collapseTagList, (h) => (w(), L("div", {
                        key: e.getValueKey(h),
                        class: _(e.nsSelect.e("selected-item"))
                      }, [
                        P(r, {
                          class: "in-tooltip",
                          closable: !e.selectDisabled && !h.isDisabled,
                          size: e.collapseTagSize,
                          type: e.tagType,
                          effect: e.tagEffect,
                          "disable-transitions": "",
                          onClose: (g) => e.deleteTag(g, h)
                        }, {
                          default: E(() => [
                            R("span", {
                              class: _(e.nsSelect.e("tags-text"))
                            }, [
                              K(e.$slots, "label", {
                                label: h.currentLabel,
                                value: h.value
                              }, () => [
                                Z(ee(h.currentLabel), 1)
                              ])
                            ], 2)
                          ]),
                          _: 2
                        }, 1032, ["closable", "size", "type", "effect", "onClose"])
                      ], 2))), 128))
                    ], 2)
                  ]),
                  _: 3
                }, 8, ["disabled", "effect", "teleported"])) : V("v-if", !0)
              ]) : V("v-if", !0),
              e.selectDisabled ? V("v-if", !0) : (w(), L("div", {
                key: 1,
                class: _([
                  e.nsSelect.e("selected-item"),
                  e.nsSelect.e("input-wrapper"),
                  e.nsSelect.is("hidden", !e.filterable)
                ])
              }, [
                ie(R("input", {
                  id: e.inputId,
                  ref: "inputRef",
                  "onUpdate:modelValue": (h) => e.states.inputValue = h,
                  type: "text",
                  name: e.name,
                  class: _([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]),
                  disabled: e.selectDisabled,
                  autocomplete: e.autocomplete,
                  style: re(e.inputStyle),
                  role: "combobox",
                  readonly: !e.filterable,
                  spellcheck: "false",
                  "aria-activedescendant": ((p = e.hoverOption) == null ? void 0 : p.id) || "",
                  "aria-controls": e.contentId,
                  "aria-expanded": e.dropdownMenuVisible,
                  "aria-label": e.ariaLabel,
                  "aria-autocomplete": "none",
                  "aria-haspopup": "listbox",
                  onKeydown: [
                    En(le((h) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]),
                    En(le((h) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]),
                    En(le(e.handleEsc, ["stop", "prevent"]), ["esc"]),
                    En(le(e.selectOption, ["stop", "prevent"]), ["enter"]),
                    En(le(e.deletePrevTag, ["stop"]), ["delete"])
                  ],
                  onCompositionstart: e.handleCompositionStart,
                  onCompositionupdate: e.handleCompositionUpdate,
                  onCompositionend: e.handleCompositionEnd,
                  onInput: e.onInput,
                  onClick: le(e.toggleMenu, ["stop"])
                }, null, 46, ["id", "onUpdate:modelValue", "name", "disabled", "autocomplete", "readonly", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onInput", "onClick"]), [
                  [Xl, e.states.inputValue]
                ]),
                e.filterable ? (w(), L("span", {
                  key: 0,
                  ref: "calculatorRef",
                  "aria-hidden": "true",
                  class: _(e.nsSelect.e("input-calculator")),
                  textContent: ee(e.states.inputValue)
                }, null, 10, ["textContent"])) : V("v-if", !0)
              ], 2)),
              e.shouldShowPlaceholder ? (w(), L("div", {
                key: 2,
                class: _([
                  e.nsSelect.e("selected-item"),
                  e.nsSelect.e("placeholder"),
                  e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue)
                ])
              }, [
                e.hasModelValue ? K(e.$slots, "label", {
                  key: 0,
                  label: e.currentPlaceholder,
                  value: e.modelValue
                }, () => [
                  R("span", null, ee(e.currentPlaceholder), 1)
                ]) : (w(), L("span", { key: 1 }, ee(e.currentPlaceholder), 1))
              ], 2)) : V("v-if", !0)
            ], 2),
            R("div", {
              ref: "suffixRef",
              class: _(e.nsSelect.e("suffix"))
            }, [
              e.iconComponent && !e.showClose ? (w(), z(l, {
                key: 0,
                class: _([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse])
              }, {
                default: E(() => [
                  (w(), z($e(e.iconComponent)))
                ]),
                _: 1
              }, 8, ["class"])) : V("v-if", !0),
              e.showClose && e.clearIcon ? (w(), z(l, {
                key: 1,
                class: _([
                  e.nsSelect.e("caret"),
                  e.nsSelect.e("icon"),
                  e.nsSelect.e("clear")
                ]),
                onClick: e.handleClearClick
              }, {
                default: E(() => [
                  (w(), z($e(e.clearIcon)))
                ]),
                _: 1
              }, 8, ["class", "onClick"])) : V("v-if", !0),
              e.validateState && e.validateIcon ? (w(), z(l, {
                key: 2,
                class: _([e.nsInput.e("icon"), e.nsInput.e("validateIcon")])
              }, {
                default: E(() => [
                  (w(), z($e(e.validateIcon)))
                ]),
                _: 1
              }, 8, ["class"])) : V("v-if", !0)
            ], 2)
          ], 10, ["onClick"])
        ];
      }),
      content: E(() => [
        P(f, { ref: "menuRef" }, {
          default: E(() => [
            e.$slots.header ? (w(), L("div", {
              key: 0,
              class: _(e.nsSelect.be("dropdown", "header")),
              onClick: le(() => {
              }, ["stop"])
            }, [
              K(e.$slots, "header")
            ], 10, ["onClick"])) : V("v-if", !0),
            ie(P(d, {
              id: e.contentId,
              ref: "scrollbarRef",
              tag: "ul",
              "wrap-class": e.nsSelect.be("dropdown", "wrap"),
              "view-class": e.nsSelect.be("dropdown", "list"),
              class: _([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]),
              role: "listbox",
              "aria-label": e.ariaLabel,
              "aria-orientation": "vertical"
            }, {
              default: E(() => [
                e.showNewOption ? (w(), z(u, {
                  key: 0,
                  value: e.states.inputValue,
                  created: !0
                }, null, 8, ["value"])) : V("v-if", !0),
                P(c, null, {
                  default: E(() => [
                    K(e.$slots, "default")
                  ]),
                  _: 3
                })
              ]),
              _: 3
            }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [
              [Ee, e.states.options.size > 0 && !e.loading]
            ]),
            e.$slots.loading && e.loading ? (w(), L("div", {
              key: 1,
              class: _(e.nsSelect.be("dropdown", "loading"))
            }, [
              K(e.$slots, "loading")
            ], 2)) : e.loading || e.filteredOptionsCount === 0 ? (w(), L("div", {
              key: 2,
              class: _(e.nsSelect.be("dropdown", "empty"))
            }, [
              K(e.$slots, "empty", {}, () => [
                R("span", null, ee(e.emptyText), 1)
              ])
            ], 2)) : V("v-if", !0),
            e.$slots.footer ? (w(), L("div", {
              key: 3,
              class: _(e.nsSelect.be("dropdown", "footer")),
              onClick: le(() => {
              }, ["stop"])
            }, [
              K(e.$slots, "footer")
            ], 10, ["onClick"])) : V("v-if", !0)
          ]),
          _: 3
        }, 512)
      ]),
      _: 3
    }, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "onBeforeShow", "onHide"])
  ], 16, ["onMouseleave"])), [
    [m, e.handleClickOutside, e.popperRef]
  ]);
}
var _y = /* @__PURE__ */ X(Oy, [["render", My], ["__file", "select.vue"]]);
const xy = H({
  name: "ElOptionGroup",
  componentName: "ElOptionGroup",
  props: {
    label: String,
    disabled: Boolean
  },
  setup(e) {
    const t = te("select"), n = x(null), o = ge(), i = x([]);
    pe(pl, ut({
      ...cn(e)
    }));
    const a = b(() => i.value.some((u) => u.visible === !0)), r = (u) => {
      var c, d;
      return ((c = u.type) == null ? void 0 : c.name) === "ElOption" && !!((d = u.component) != null && d.proxy);
    }, s = (u) => {
      const c = St(u), d = [];
      return c.forEach((f) => {
        var m, p;
        r(f) ? d.push(f.component.proxy) : (m = f.children) != null && m.length ? d.push(...s(f.children)) : (p = f.component) != null && p.subTree && d.push(...s(f.component.subTree));
      }), d;
    }, l = () => {
      i.value = s(o.subTree);
    };
    return he(() => {
      l();
    }), Cu(n, l, {
      attributes: !0,
      subtree: !0,
      childList: !0
    }), {
      groupRef: n,
      visible: a,
      ns: t
    };
  }
});
function Py(e, t, n, o, i, a) {
  return ie((w(), L("ul", {
    ref: "groupRef",
    class: _(e.ns.be("group", "wrap"))
  }, [
    R("li", {
      class: _(e.ns.be("group", "title"))
    }, ee(e.label), 3),
    R("li", null, [
      R("ul", {
        class: _(e.ns.b("group"))
      }, [
        K(e.$slots, "default")
      ], 2)
    ])
  ], 2)), [
    [Ee, e.visible]
  ]);
}
var hl = /* @__PURE__ */ X(xy, [["render", Py], ["__file", "option-group.vue"]]);
const zo = Me(_y, {
  Option: Xi,
  OptionGroup: hl
}), ea = zt(Xi);
zt(hl);
const Ly = Q({
  trigger: Bn.trigger,
  placement: oi.placement,
  disabled: Bn.disabled,
  visible: Pe.visible,
  transition: Pe.transition,
  popperOptions: oi.popperOptions,
  tabindex: oi.tabindex,
  content: Pe.content,
  popperStyle: Pe.popperStyle,
  popperClass: Pe.popperClass,
  enterable: {
    ...Pe.enterable,
    default: !0
  },
  effect: {
    ...Pe.effect,
    default: "light"
  },
  teleported: Pe.teleported,
  title: String,
  width: {
    type: [String, Number],
    default: 150
  },
  offset: {
    type: Number,
    default: void 0
  },
  showAfter: {
    type: Number,
    default: 0
  },
  hideAfter: {
    type: Number,
    default: 200
  },
  autoClose: {
    type: Number,
    default: 0
  },
  showArrow: {
    type: Boolean,
    default: !0
  },
  persistent: {
    type: Boolean,
    default: !0
  },
  "onUpdate:visible": {
    type: Function
  }
}), Ry = {
  "update:visible": (e) => ct(e),
  "before-enter": () => !0,
  "before-leave": () => !0,
  "after-enter": () => !0,
  "after-leave": () => !0
}, Fy = "onUpdate:visible", $y = H({
  name: "ElPopover"
}), Dy = /* @__PURE__ */ H({
  ...$y,
  props: Ly,
  emits: Ry,
  setup(e, { expose: t, emit: n }) {
    const o = e, i = b(() => o[Fy]), a = te("popover"), r = x(), s = b(() => {
      var g;
      return (g = v(r)) == null ? void 0 : g.popperRef;
    }), l = b(() => [
      {
        width: $t(o.width)
      },
      o.popperStyle
    ]), u = b(() => [a.b(), o.popperClass, { [a.m("plain")]: !!o.content }]), c = b(() => o.transition === `${a.namespace.value}-fade-in-linear`), d = () => {
      var g;
      (g = r.value) == null || g.hide();
    }, f = () => {
      n("before-enter");
    }, m = () => {
      n("before-leave");
    }, p = () => {
      n("after-enter");
    }, h = () => {
      n("update:visible", !1), n("after-leave");
    };
    return t({
      popperRef: s,
      hide: d
    }), (g, y) => (w(), z(v(Us), Nt({
      ref_key: "tooltipRef",
      ref: r
    }, g.$attrs, {
      trigger: g.trigger,
      placement: g.placement,
      disabled: g.disabled,
      visible: g.visible,
      transition: g.transition,
      "popper-options": g.popperOptions,
      tabindex: g.tabindex,
      content: g.content,
      offset: g.offset,
      "show-after": g.showAfter,
      "hide-after": g.hideAfter,
      "auto-close": g.autoClose,
      "show-arrow": g.showArrow,
      "aria-label": g.title,
      effect: g.effect,
      enterable: g.enterable,
      "popper-class": v(u),
      "popper-style": v(l),
      teleported: g.teleported,
      persistent: g.persistent,
      "gpu-acceleration": v(c),
      "onUpdate:visible": v(i),
      onBeforeShow: f,
      onBeforeHide: m,
      onShow: p,
      onHide: h
    }), {
      content: E(() => [
        g.title ? (w(), L("div", {
          key: 0,
          class: _(v(a).e("title")),
          role: "title"
        }, ee(g.title), 3)) : V("v-if", !0),
        K(g.$slots, "default", {}, () => [
          Z(ee(g.content), 1)
        ])
      ]),
      default: E(() => [
        g.$slots.reference ? K(g.$slots, "reference", { key: 0 }) : V("v-if", !0)
      ]),
      _: 3
    }, 16, ["trigger", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "persistent", "gpu-acceleration", "onUpdate:visible"]));
  }
});
var Ny = /* @__PURE__ */ X(Dy, [["__file", "popover.vue"]]);
const kr = (e, t) => {
  const n = t.arg || t.value, o = n == null ? void 0 : n.popperRef;
  o && (o.triggerRef = e);
};
var By = {
  mounted(e, t) {
    kr(e, t);
  },
  updated(e, t) {
    kr(e, t);
  }
};
const Vy = "popover", ta = Rp(By, Vy), qn = Me(Ny, {
  directive: ta
});
function zy(e) {
  let t;
  const n = x(!1), o = ut({
    ...e,
    originalPosition: "",
    originalOverflow: "",
    visible: !1
  });
  function i(f) {
    o.text = f;
  }
  function a() {
    const f = o.parent, m = d.ns;
    if (!f.vLoadingAddClassList) {
      let p = f.getAttribute("loading-number");
      p = Number.parseInt(p) - 1, p ? f.setAttribute("loading-number", p.toString()) : (Fn(f, m.bm("parent", "relative")), f.removeAttribute("loading-number")), Fn(f, m.bm("parent", "hidden"));
    }
    r(), c.unmount();
  }
  function r() {
    var f, m;
    (m = (f = d.$el) == null ? void 0 : f.parentNode) == null || m.removeChild(d.$el);
  }
  function s() {
    var f;
    e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), o.visible = !1, (f = e.closed) == null || f.call(e));
  }
  function l() {
    if (!n.value)
      return;
    const f = o.parent;
    n.value = !1, f.vLoadingAddClassList = void 0, a();
  }
  const u = H({
    name: "ElLoading",
    setup(f, { expose: m }) {
      const { ns: p, zIndex: h } = hm("loading");
      return m({
        ns: p,
        zIndex: h
      }), () => {
        const g = o.spinner || o.svg, y = Zt("svg", {
          class: "circular",
          viewBox: o.svgViewBox ? o.svgViewBox : "0 0 50 50",
          ...g ? { innerHTML: g } : {}
        }, [
          Zt("circle", {
            class: "path",
            cx: "25",
            cy: "25",
            r: "20",
            fill: "none"
          })
        ]), C = o.text ? Zt("p", { class: p.b("text") }, [o.text]) : void 0;
        return Zt(Vn, {
          name: p.b("fade"),
          onAfterLeave: l
        }, {
          default: E(() => [
            ie(P("div", {
              style: {
                backgroundColor: o.background || ""
              },
              class: [
                p.b("mask"),
                o.customClass,
                o.fullscreen ? "is-fullscreen" : ""
              ]
            }, [
              Zt("div", {
                class: p.b("spinner")
              }, [y, C])
            ]), [[Ee, o.visible]])
          ])
        });
      };
    }
  }), c = eu(u), d = c.mount(document.createElement("div"));
  return {
    ...cn(o),
    setText: i,
    removeElLoadingChild: r,
    close: s,
    handleAfterLeave: l,
    vm: d,
    get $el() {
      return d.$el;
    }
  };
}
let co;
const Si = function(e = {}) {
  if (!se)
    return;
  const t = Hy(e);
  if (t.fullscreen && co)
    return co;
  const n = zy({
    ...t,
    closed: () => {
      var i;
      (i = t.closed) == null || i.call(t), t.fullscreen && (co = void 0);
    }
  });
  Ky(t, t.parent, n), Tr(t, t.parent, n), t.parent.vLoadingAddClassList = () => Tr(t, t.parent, n);
  let o = t.parent.getAttribute("loading-number");
  return o ? o = `${Number.parseInt(o) + 1}` : o = "1", t.parent.setAttribute("loading-number", o), t.parent.appendChild(n.$el), ce(() => n.visible.value = t.visible), t.fullscreen && (co = n), n;
}, Hy = (e) => {
  var t, n, o, i;
  let a;
  return je(e.target) ? a = (t = document.querySelector(e.target)) != null ? t : document.body : a = e.target || document.body, {
    parent: a === document.body || e.body ? document.body : a,
    background: e.background || "",
    svg: e.svg || "",
    svgViewBox: e.svgViewBox || "",
    spinner: e.spinner || !1,
    text: e.text || "",
    fullscreen: a === document.body && ((n = e.fullscreen) != null ? n : !0),
    lock: (o = e.lock) != null ? o : !1,
    customClass: e.customClass || "",
    visible: (i = e.visible) != null ? i : !0,
    beforeClose: e.beforeClose,
    closed: e.closed,
    target: a
  };
}, Ky = async (e, t, n) => {
  const { nextZIndex: o } = n.vm.zIndex || n.vm._.exposed.zIndex, i = {};
  if (e.fullscreen)
    n.originalPosition.value = Qt(document.body, "position"), n.originalOverflow.value = Qt(document.body, "overflow"), i.zIndex = o();
  else if (e.parent === document.body) {
    n.originalPosition.value = Qt(document.body, "position"), await ce();
    for (const a of ["top", "left"]) {
      const r = a === "top" ? "scrollTop" : "scrollLeft";
      i[a] = `${e.target.getBoundingClientRect()[a] + document.body[r] + document.documentElement[r] - Number.parseInt(Qt(document.body, `margin-${a}`), 10)}px`;
    }
    for (const a of ["height", "width"])
      i[a] = `${e.target.getBoundingClientRect()[a]}px`;
  } else
    n.originalPosition.value = Qt(t, "position");
  for (const [a, r] of Object.entries(i))
    n.$el.style[a] = r;
}, Tr = (e, t, n) => {
  const o = n.vm.ns || n.vm._.exposed.ns;
  ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? Fn(t, o.bm("parent", "relative")) : hi(t, o.bm("parent", "relative")), e.fullscreen && e.lock ? hi(t, o.bm("parent", "hidden")) : Fn(t, o.bm("parent", "hidden"));
}, mo = Symbol("ElLoading"), Ar = (e, t) => {
  var n, o, i, a;
  const r = t.instance, s = (f) => ke(t.value) ? t.value[f] : void 0, l = (f) => {
    const m = je(f) && (r == null ? void 0 : r[f]) || f;
    return m && x(m);
  }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${Ru(f)}`)), c = (n = s("fullscreen")) != null ? n : t.modifiers.fullscreen, d = {
    text: u("text"),
    svg: u("svg"),
    svgViewBox: u("svgViewBox"),
    spinner: u("spinner"),
    background: u("background"),
    customClass: u("customClass"),
    fullscreen: c,
    target: (o = s("target")) != null ? o : c ? void 0 : e,
    body: (i = s("body")) != null ? i : t.modifiers.body,
    lock: (a = s("lock")) != null ? a : t.modifiers.lock
  };
  e[mo] = {
    options: d,
    instance: Si(d)
  };
}, jy = (e, t) => {
  for (const n of Object.keys(t))
    lt(t[n]) && (t[n].value = e[n]);
}, Ci = {
  mounted(e, t) {
    t.value && Ar(e, t);
  },
  updated(e, t) {
    const n = e[mo];
    t.oldValue !== t.value && (t.value && !t.oldValue ? Ar(e, t) : t.value && t.oldValue ? ke(t.value) && jy(t.value, n.options) : n == null || n.instance.close());
  },
  unmounted(e) {
    var t;
    (t = e[mo]) == null || t.instance.close(), e[mo] = null;
  }
}, Uy = {
  install(e) {
    e.directive("loading", Ci), e.config.globalProperties.$loading = Si;
  },
  directive: Ci,
  service: Si
}, Kt = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [o, i] of t)
    n[o] = i;
  return n;
}, Wy = {
  name: "SelectionsGroup",
  components: {
    Checkbox: el,
    CheckboxGroup: tl,
    Col: Wn,
    Icon: We,
    Row: Un,
    ElIconWarning: xr
  },
  methods: {
    /**
     * Function to toggle paths to default.
     * Also called when the associated button is pressed.
     */
    reset: function() {
      this.checkAll = !0, this.checkedItems = [], this.selections.forEach((e) => {
        !("enabled" in e) || e.enabled === !0 ? this.checkedItems.push(e[this.identifierKey]) : this.checkAll = !1;
      });
    },
    setCheckboxActionData: function(e, t) {
      if (e) {
        const n = e.querySelector('input[type="checkbox"]'), o = e.querySelector(".el-checkbox__label"), a = e.closest(".selections-container").querySelector(".checkall-display-text");
        let r = "";
        n && (r = n.checked ? "checked" : "unchecked"), this.checkboxActionData = {
          selectionsTitle: a ? a.innerText : "",
          property: n && t !== "all" ? n.value : "",
          label: o ? o.innerText : "",
          checked: r
        };
      } else
        this.checkboxActionData = {
          selectionsTitle: "",
          property: "",
          label: "",
          checked: ""
        };
    },
    onCheckboxNativeChange: function(e) {
      const t = e.target.closest(".checkbox-container");
      this.setCheckboxActionData(t, "individual");
    },
    onAllCheckboxNativeChange: function(e) {
      const t = e.target.closest(".all-checkbox");
      this.setCheckboxActionData(t, "all");
    },
    visibilityToggle: function(e, t) {
      this.$emit("changed", { key: e, value: t }), e === this.checkboxActionData.property && (this.checkboxActionData.checked = t ? "checked" : "unchecked"), this.$emit("selections-data-changed", this.checkboxActionData);
    },
    checkboxMouseEnterEmit: function(e, t) {
      this.$emit("checkboxMouseEnter", { key: e, value: t, selections: this.selections, checked: this.checkedItems });
    },
    handleCheckedItemsChange: function(e) {
      let t = e.length;
      this.checkAll = t === this.selections.length;
    },
    handleCheckAllChange: function(e) {
      this.checkedItems = e ? this.selections.map((t) => t[this.identifierKey]) : [], this.$emit("checkAll", {
        keys: this.selections.map((t) => t[this.identifierKey]),
        value: e
      }), this.checkboxActionData.property = this.identifierKey, this.checkboxActionData.checked = e ? "checked" : "unchecked", this.$emit("selections-data-changed", this.checkboxActionData);
    },
    getBackgroundStyles: function(e) {
      return "colour" in e && this.colourStyle === "background" ? { background: e.colour } : {};
    },
    getState: function() {
      const t = this.checkedItems.length === this.selections.length;
      return {
        checkAll: t,
        checked: t ? [] : this.checkedItems
      };
    },
    setState: function(e) {
      var t;
      if (this.checkAll = e.checkAll, this.checkedItems.length = 0, (t = e.checked) != null && t.length)
        this.checkedItems.push(...e.checked), this.selections.forEach((n) => {
          const o = n[this.identifierKey];
          this.$emit("changed", { key: o, value: this.checkedItems.includes(o) });
        });
      else {
        const n = this.selections.map((i) => i[this.identifierKey]);
        let o = !1;
        this.checkAll && (o = !0, this.checkedItems.push(...n)), this.$emit("checkAll", { keys: n, value: o });
      }
    },
    hasLineStyles: function(e) {
      return "colour" in e && this.colourStyle === "line";
    },
    getLineStyles: function(e) {
      return "colour" in e && this.colourStyle === "line" ? "dashed" in e && e.dashed === !0 ? { background: `repeating-linear-gradient(90deg,${e.colour},${e.colour} 6px,transparent 0,transparent 9px)` } : { background: e.colour } : { display: "None" };
    }
  },
  props: {
    colourStyle: {
      type: String,
      default: "line"
    },
    helpMessage: {
      type: String,
      default: ""
    },
    identifierKey: {
      type: String,
      default: "id"
    },
    labelKey: {
      type: String,
      default: "label"
    },
    title: {
      type: String,
      default: ""
    },
    selections: {
      type: Array,
      default: function() {
        return [];
      }
    },
    showAsLegend: {
      type: Boolean,
      default: !1
    }
  },
  computed: {
    isIndeterminate: function() {
      return !(this.checkedItems.length === 0 || this.checkAll);
    }
  },
  data: function() {
    return {
      checkedItems: [],
      checkAll: !0,
      checkboxActionData: {
        selectionsTitle: "",
        property: "",
        label: "",
        checked: ""
      }
    };
  },
  mounted: function() {
    this.reset();
  }
}, qy = { class: "selections-container" }, Gy = { class: "checkall-display-text" }, Jy = { style: { "word-break": "keep-all" } }, Yy = { class: "checkbox-group-inner" }, Zy = ["onMouseenter", "onMouseleave"];
function Qy(e, t, n, o, i, a) {
  const r = xr, s = We, l = qn, u = Wn, c = el, d = Un, f = tl;
  return w(), L("div", qy, [
    P(d, null, {
      default: E(() => [
        P(u, { span: 12 }, {
          default: E(() => [
            R("span", Gy, ee(n.title), 1),
            n.helpMessage ? (w(), z(l, {
              key: 0,
              width: "250",
              trigger: "hover",
              teleported: !1,
              "popper-class": "popover-origin-help"
            }, Br({
              default: E(() => [
                R("span", Jy, ee(n.helpMessage), 1)
              ]),
              _: 2
            }, [
              n.helpMessage ? {
                name: "reference",
                fn: E(() => [
                  P(s, { class: "info" }, {
                    default: E(() => [
                      P(r)
                    ]),
                    _: 1
                  })
                ]),
                key: "0"
              } : void 0
            ]), 1024)) : V("", !0)
          ]),
          _: 1
        }),
        P(u, { span: 12 }, {
          default: E(() => [
            n.selections && n.selections.length > 1 && !n.showAsLegend ? (w(), z(c, {
              key: 0,
              class: "all-checkbox",
              indeterminate: a.isIndeterminate,
              modelValue: e.checkAll,
              "onUpdate:modelValue": t[0] || (t[0] = (m) => e.checkAll = m),
              onChange: a.handleCheckAllChange,
              onClick: a.onAllCheckboxNativeChange
            }, {
              default: E(() => t[2] || (t[2] = [
                Z("Display all")
              ])),
              _: 1
            }, 8, ["indeterminate", "modelValue", "onChange", "onClick"])) : V("", !0)
          ]),
          _: 1
        })
      ]),
      _: 1
    }),
    P(f, {
      class: _({ "show-as-legend": n.showAsLegend, "checkbox-group": !n.showAsLegend }),
      modelValue: e.checkedItems,
      "onUpdate:modelValue": t[1] || (t[1] = (m) => e.checkedItems = m),
      size: "small",
      onChange: a.handleCheckedItemsChange
    }, {
      default: E(() => [
        R("div", Yy, [
          (w(!0), L(fe, null, Ke(n.selections, (m) => (w(), z(d, {
            key: m[n.identifierKey],
            label: m[n.identifierKey]
          }, {
            default: E(() => [
              R("div", {
                class: "checkbox-container",
                onMouseenter: (p) => a.checkboxMouseEnterEmit(m[n.identifierKey], !0),
                onMouseleave: (p) => a.checkboxMouseEnterEmit(m[n.identifierKey], !1)
              }, [
                P(c, {
                  class: "my-checkbox",
                  label: m[n.identifierKey],
                  value: m[n.identifierKey],
                  onChange: (p) => a.visibilityToggle(m[n.identifierKey], p),
                  onClick: a.onCheckboxNativeChange,
                  checked: !("enabled" in m) || m.enabled === !0
                }, {
                  default: E(() => [
                    P(d, { class: "checkbox-row" }, {
                      default: E(() => [
                        a.hasLineStyles(m) ? (w(), z(u, {
                          key: 0,
                          span: 4
                        }, {
                          default: E(() => [
                            R("div", {
                              class: "path-visual",
                              style: re(a.getLineStyles(m))
                            }, null, 4)
                          ]),
                          _: 2
                        }, 1024)) : V("", !0),
                        P(u, { span: 20 }, {
                          default: E(() => [
                            R("div", {
                              style: re(a.getBackgroundStyles(m))
                            }, ee(m[n.labelKey]), 5)
                          ]),
                          _: 2
                        }, 1024)
                      ]),
                      _: 2
                    }, 1024)
                  ]),
                  _: 2
                }, 1032, ["label", "value", "onChange", "onClick", "checked"])
              ], 40, Zy)
            ]),
            _: 2
          }, 1032, ["label"]))), 128))
        ])
      ]),
      _: 1
    }, 8, ["class", "modelValue", "onChange"])
  ]);
}
const ml = /* @__PURE__ */ Kt(Wy, [["render", Qy], ["__scopeId", "data-v-35fb97d0"]]), Xy = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="<fillColor>" stroke="<borderColor>" stroke-width="<borderWidth>" d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z"/></svg>', eb = {
  name: "LegendItem",
  props: {
    item: {
      type: Object,
      required: !0
    },
    identifierKey: {
      type: String,
      default: "id"
    },
    styleKey: {
      type: String,
      default: "style"
    },
    showStarInLegend: {
      type: Boolean,
      default: !1
    }
  },
  computed: {
    clipPathLegends: function() {
      return ["exoid", "hexagon"];
    },
    legendStyleValue: function() {
      return this.item[this.styleKey] === "star" ? this.item[this.identifierKey] === "Featured dataset marker" && !this.showStarInLegend ? void 0 : "star" : this.clipPathLegends.includes(this.item[this.styleKey]) ? this.item[this.styleKey] : this.item[this.styleKey] === "line" ? [this.item[this.styleKey], this.item.dashed ? "dashed" : "", this.item.arrow ? "arrow" : ""] : [this.item[this.styleKey], "shape"];
    },
    customStyle: function() {
      const e = this.item.color ? this.item.color : this.item.colour;
      let t = e || "transparent", n = this.item.border ? this.item.border : "black";
      if (e && !this.item.border && (n = t), this.item[this.styleKey] === "star") {
        let o = Xy.replace("<fillColor>", t);
        return o = o.replace("<borderColor>", n), o = o.replace("<borderWidth>", n ? "2" : "0"), o = "data:image/svg+xml," + encodeURIComponent(o), { color: t, "background-image": `url(${o})` };
      } else return this.item[this.styleKey] === "line" ? { color: t } : { "background-color": t, "border-color": n };
    }
  },
  methods: {
    capitalise: function(e) {
      return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
    },
    customClipPathStyle: function(e) {
      const t = { ...this.customStyle };
      return e ? t["background-color"] = t["border-color"] : t.scale = 0.7, t;
    }
  }
}, tb = {
  key: 0,
  class: "legend-item"
}, nb = { class: "label" };
function ob(e, t, n, o, i, a) {
  return a.legendStyleValue ? (w(), L("div", tb, [
    a.clipPathLegends.includes(a.legendStyleValue) ? (w(), L("div", {
      key: 0,
      class: _(a.legendStyleValue),
      style: re(a.customClipPathStyle(!0))
    }, [
      R("div", {
        class: _(a.legendStyleValue),
        style: re(a.customClipPathStyle(!1))
      }, null, 6)
    ], 6)) : (w(), L("div", {
      key: 1,
      class: _(a.legendStyleValue),
      style: re(a.customStyle)
    }, null, 6)),
    R("div", nb, ee(a.capitalise(n.item[n.identifierKey])), 1)
  ])) : V("", !0);
}
const vl = /* @__PURE__ */ Kt(eb, [["render", ob], ["__scopeId", "data-v-1db7582f"]]), ib = {
  name: "DynamicLegends",
  components: {
    LegendItem: vl
  },
  props: {
    identifierKey: {
      type: String,
      default: "id"
    },
    styleKey: {
      type: String,
      default: "style"
    },
    title: {
      type: String,
      default: ""
    },
    legends: {
      type: Array,
      default: function() {
        return [];
      }
    },
    showStarInLegend: {
      type: Boolean,
      default: !1
    },
    showDatasetMarkerTooltip: {
      type: Boolean,
      default: !1
    }
  },
  data() {
    return {
      isHovering: !1,
      hoverTimeout: null
    };
  },
  computed: {
    tooltipVisible() {
      return this.showDatasetMarkerTooltip && this.showStarInLegend || this.isHovering;
    }
  },
  methods: {
    onMouseOver() {
      clearTimeout(this.hoverTimeout), this.hoverTimeout = setTimeout(() => {
        this.isHovering = !0;
      }, 500);
    },
    onMouseOut() {
      clearTimeout(this.hoverTimeout), this.hoverTimeout = setTimeout(() => {
        this.isHovering = !1;
      }, 500);
    }
  }
}, ab = { class: "legend-group" }, rb = ["label"];
function sb(e, t, n, o, i, a) {
  const r = vl, s = qn, l = ta;
  return w(), L("div", ab, [
    (w(!0), L(fe, null, Ke(n.legends, (u) => (w(), L("div", {
      class: "legend-container",
      key: u[n.identifierKey],
      label: u[n.identifierKey]
    }, [
      u[n.identifierKey] === "Featured dataset marker" ? (w(), z(s, {
        key: 0,
        content: "Location of the featured dataset",
        placement: "right",
        teleported: !0,
        trigger: "manual",
        width: "max-content",
        offset: 0,
        "popper-class": "flatmap-popper flatmap-teleport-popper",
        visible: a.tooltipVisible,
        ref_for: !0,
        ref: "featuredMarkerPopover"
      }, {
        reference: E(() => [
          ie((w(), L("div", {
            onMouseover: t[0] || (t[0] = (...c) => a.onMouseOver && a.onMouseOver(...c)),
            onMouseout: t[1] || (t[1] = (...c) => a.onMouseOut && a.onMouseOut(...c))
          }, [
            P(r, {
              item: u,
              identifierKey: n.identifierKey,
              styleKey: n.styleKey,
              showStarInLegend: n.showStarInLegend
            }, null, 8, ["item", "identifierKey", "styleKey", "showStarInLegend"])
          ], 32)), [
            [l, void 0, "featuredMarkerPopover"]
          ])
        ]),
        _: 2
      }, 1032, ["visible"])) : (w(), z(r, {
        key: 1,
        item: u,
        identifierKey: n.identifierKey,
        styleKey: n.styleKey,
        showStarInLegend: n.showStarInLegend
      }, null, 8, ["item", "identifierKey", "styleKey", "showStarInLegend"]))
    ], 8, rb))), 128))
  ]);
}
const lb = /* @__PURE__ */ Kt(ib, [["render", sb], ["__scopeId", "data-v-32c93a1a"]]), ub = {
  name: "FlatmapError",
  // The flatmapError prop is an object that may have the following properties:
  // 1. title: string
  // 2. messages: string[]
  // 3. button: { text: string, callback: Function }
  props: {
    flatmapError: {
      type: Object,
      default: () => ({})
    }
  }
}, cb = { class: "flatmap-error" }, db = { class: "flatmap-error-title" }, fb = { key: 0 }, pb = {
  key: 0,
  class: "flatmap-error-message"
}, hb = { key: 1 };
function mb(e, t, n, o, i, a) {
  const r = Vl, s = We, l = Qi;
  return w(), L("div", cb, [
    R("div", db, [
      P(s, { size: "24" }, {
        default: E(() => [
          P(r)
        ]),
        _: 1
      }),
      n.flatmapError.title ? (w(), L("div", fb, ee(n.flatmapError.title), 1)) : V("", !0)
    ]),
    n.flatmapError.messages ? (w(), L("div", pb, [
      (w(!0), L(fe, null, Ke(n.flatmapError.messages, (u, c) => (w(), L("div", { key: c }, ee(u), 1))), 128))
    ])) : V("", !0),
    n.flatmapError.button ? (w(), L("div", hb, [
      P(l, {
        class: "button",
        type: "primary",
        onClick: n.flatmapError.button.callback
      }, {
        default: E(() => [
          Z(ee(n.flatmapError.button.text), 1)
        ]),
        _: 1
      }, 8, ["onClick"])
    ])) : V("", !0)
  ]);
}
const na = /* @__PURE__ */ Kt(ub, [["render", mb], ["__scopeId", "data-v-7cfcfa1f"]]), vb = {
  name: "SvgLegends"
}, gb = { class: "legends-container" }, yb = {
  version: "1.1",
  id: "Layer_1",
  x: "0px",
  y: "0px",
  viewBox: "0 0 500 500",
  style: { "enable-background": "new 0 0 500 500" },
  xmlns: "http://www.w3.org/2000/svg",
  "xmlns:bx": "https://boxy-svg.com"
};
function bb(e, t, n, o, i, a) {
  return w(), L("div", gb, [
    (w(), L("svg", yb, t[0] || (t[0] = [
      tu('<defs data-v-88079d87><bx:grid height="30.447" width="32.516" x="0" y="0" data-v-88079d87></bx:grid></defs><path class="st0 st0-translate" d="M61.3,103.8c-15.9,0-28.8-12.3-28.8-27.3c0-15,13-27.3,28.8-27.3s28.8,12.3,28.8,27.3 C90.1,91.5,77.2,103.8,61.3,103.8z" data-v-88079d87></path><path class="st1" d="M40.3,356.1C29.5,345,29.8,328,41.5,317.5c11.7-10.5,29.6-9.9,40.7,1.1c11.1,11,10.5,28.1-1.2,38.5 C69.3,367.4,51.1,366.9,40.3,356.1z" data-v-88079d87></path><path class="st2" d="M61.2,396.9c-5.3,9.3-15.3,15.1-26.1,15.1l-0.4,0.6c5.1,9,5.1,20,0,29l0.4,0.6c10.7,0,20.8,5.8,26.1,15.1 c5.3-9.3,15.3-15.1,26.1-15.1c-5.3-9.3-5.3-20.9,0-30.4C76.6,412.1,66.7,406.3,61.2,396.9z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 171.7975)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Tissue region </text><path class="st6" d="M40.9,231.1c11.3-10.6,29.5-10.6,40.8,0c11.3,10.6,11.3,27.9,0,38.5c-11.3,10.6-29.5,10.6-40.8,0 C29.7,259,29.7,241.7,40.9,231.1z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 257.675)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Brain nuclei </text><text transform="matrix(0.9908 0 0 1 118.0903 345.5266)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglia </text><text transform="matrix(0.9908 0 0 1 118.0903 433.1613)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglionated nerve plexus </text>', 9)
    ]))),
    t[1] || (t[1] = R("svg", {
      width: "72px",
      height: "72px",
      viewBox: "0 0 24 24",
      fill: "yellow"
    }, null, -1))
  ]);
}
const wb = /* @__PURE__ */ Kt(vb, [["render", bb], ["__scopeId", "data-v-88079d87"]]), Sb = `<div class="flatmap-marker">
  <svg xmlns="http://www.w3.org/2000/svg" width="28" height="39" viewBox="-1 -1 27 42">
    <ellipse style="fill: rgb(0, 0, 0); fill-opacity: 0.2;" cx="12" cy="36" rx="8" ry="4"></ellipse>
    <path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0
                 C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:#EE5900;stroke:#fff;stroke-width:1"></path>
    <circle cx="12.5" cy="12.5" r="9" fill="#fff"></circle>
    <text x="12" y="17.5" style="font-size:14px;fill:#000;text-anchor:middle">2</text>
  </svg>
</div>`, An = function(e) {
  return e ? [...new Set(e.map((t) => JSON.stringify(t)))].map(
    (t) => JSON.parse(t)
  ) : [];
}, ii = [], Ei = async function(e, t) {
  const n = t.filter(
    (a) => ii.some((r) => r.taxon === a)
  ), o = ii.filter(
    (a) => n.includes(a.taxon)
  ), i = t.filter(
    (a) => !n.includes(a)
  );
  if (i.length) {
    const a = await e.queryLabels(i);
    if (a.length)
      return a.forEach((r) => {
        let { entity: s, label: l } = r;
        l === "Mammalia" && (l = "Mammalia not otherwise specified");
        const u = { taxon: s, label: l };
        o.push(u), ii.push(u);
      }), o;
  } else
    return o;
}, ai = function(e, t) {
  if (!e || !t) return !1;
  let n = JSON.stringify(e), o = JSON.stringify(t);
  return n.indexOf(o) !== -1;
}, Yt = (e, t) => {
  const n = e.name ?? e, o = t.name ?? t, i = n.toUpperCase(), a = o.toUpperCase();
  return i < a ? -1 : i > a ? 1 : 0;
};
let Cb = function() {
  this.initialise = function(e) {
    this.flatmapAPI = e, this.destinations = [], this.origins = [], this.components = [], this.rawURLs = [], this.controller = void 0, this.uberons = [], this.lookUp = [], this.connectivitySource = "map", this.noMapConnectivity = !1;
  }, this.createTooltipData = async function(e, t) {
    let n = [];
    t.feature.hyperlinks && t.feature.hyperlinks.length > 0 ? n = t.feature.hyperlinks : n = this.rawURLs;
    let o;
    if (t.provenanceTaxonomy) {
      o = [];
      try {
        const a = await Ei(e, t.provenanceTaxonomy);
        a.length && a.forEach((r) => {
          const { label: s } = r;
          o.push(s);
        });
      } catch (a) {
        console.log(a);
      }
    }
    return {
      destinations: this.destinations,
      origins: this.origins,
      components: this.components,
      destinationsWithDatasets: this.destinationsWithDatasets,
      originsWithDatasets: this.originsWithDatasets,
      componentsWithDatasets: this.componentsWithDatasets,
      title: t.label,
      featureId: t.resource,
      hyperlinks: n,
      provenanceTaxonomy: t.provenanceTaxonomy,
      provenanceTaxonomyLabel: o,
      connectivitySource: this.connectivitySource,
      noMapConnectivity: this.noMapConnectivity
    };
  }, this.updateTooltipData = function(e) {
    return {
      ...e,
      origins: this.origins,
      originsWithDatasets: this.originsWithDatasets,
      components: this.components,
      componentsWithDatasets: this.componentsWithDatasets,
      destinations: this.destinations,
      destinationsWithDatasets: this.destinationsWithDatasets,
      connectivitySource: this.connectivitySource,
      noMapConnectivity: this.noMapConnectivity
    };
  }, this.createComponentsLabelList = function(e, t) {
    let n = [];
    return e.forEach((o) => {
      n.push(this.createLabelFromNeuralNode(o[0]), t), o.length === 2 && n.push(this.createLabelFromNeuralNode(o[1]), t);
    }), n;
  }, this.createLabelLookup = function(e, t) {
    return new Promise(async (n) => {
      let o = {};
      this.uberons = [];
      const i = await Ei(e, t);
      i.length && (i.forEach((a) => {
        const { taxon: r, label: s } = a;
        o[r] = s, this.uberons.push({
          id: r,
          name: s
        });
      }), n(o));
    });
  }, this.buildConnectivitySqlStatement = function(e) {
    let t = "select knowledge from knowledge where entity in (";
    if (e.length === 1)
      t += `'${e[0]}')`;
    else if (e.length > 1)
      for (let n in e)
        t += `'${e[n]}'${n >= e.length - 1 ? ")" : ","} `;
    return t;
  }, this.buildLabelSqlStatement = function(e) {
    let t = "select entity, label from labels where entity in (";
    if (e.length === 1)
      t += `'${e[0]}')`;
    else if (e.length > 1)
      for (let n in e)
        t += `'${e[n]}'${n >= e.length - 1 ? ")" : ","} `;
    return t;
  }, this.findAllIdsFromConnectivity = function(e) {
    let t = e.connectivity.flat(), n = [...new Set(t)], o = [];
    return n.forEach((i) => {
      Array.isArray(i) ? o.push(i.flat()) : o.push(i);
    }), [...new Set(o.flat())];
  }, this.flattenConnectivity = function(e) {
    let t = e.flat(), n = [...new Set(t)], o = [];
    return n.forEach((i) => {
      Array.isArray(i) ? o.push(i.flat()) : o.push(i);
    }), o.flat();
  }, this.findComponents = function(e, t, n, o) {
    let i = e.connectivity.flat(), a = An(i), r = [], s = !1;
    return a.forEach((l) => {
      s = !1, ai(t, l) && (s = !0), o && ai(o, l) && (s = !0), ai(n, l) && (s = !0), s || r.push(l);
    }), r;
  }, this.retrieveFlatmapKnowledgeForEvent = async function(e, t) {
    this.controller && this.controller.abort(), this.controller = new AbortController(), this.controller.signal;
    const n = t.resource;
    if (this.destinations = [], this.origins = [], this.components = [], this.rawURLs = [], !n || n.length === 0 || !n[0]) return;
    let o = this.queryForConnectivityNew(e, n[0]);
    return await Promise.all([o]);
  }, this.queryForConnectivityNew = function(e, t, n = "map", o = !0) {
    return this.connectivitySource = n, new Promise((i) => {
      (n === "map" ? this.queryMapConnectivity(e.mapMetadata.uuid, t) : e.queryKnowledge(t)).then((r) => {
        if (this.checkConnectivityExists(r)) {
          n === "map" && (this.noMapConnectivity = !1);
          let s = r;
          o ? this.processConnectivity(e, s).then((l) => {
            r.references && (this.rawURLs = [...r.references]), i(l);
          }) : i(s);
        } else n === "map" ? (this.connectivitySource = "sckan", this.noMapConnectivity = !0, e.queryKnowledge(t).then((s) => {
          if (this.checkConnectivityExists(s)) {
            let l = s;
            o ? this.processConnectivity(e, l).then((u) => {
              s.references && (this.rawURLs = [...s.references]), i(u);
            }) : i(l);
          } else
            i(!1);
        }).catch(() => i(!1))) : i(!1);
      }).catch((r) => {
        r.name === "AbortError" || console.warn(`Unable to get the knowledge for the entity ${t}.`), i(!1);
      });
    });
  }, this.queryMapConnectivity = async function(e, t) {
    const n = this.flatmapAPI + `flatmap/${e}/connectivity/${t}`;
    try {
      const o = await fetch(n);
      if (!o.ok)
        throw new Error(`Response status: ${o.status}`);
      return await o.json();
    } catch (o) {
      throw new Error(o);
    }
  }, this.queryForConnectivity = function(e, t, n, o = !0) {
    const i = { sql: this.buildConnectivitySqlStatement(t) }, a = {
      method: "POST",
      headers: {
        "Content-Type": "application/json"
      },
      body: JSON.stringify(i),
      ...n ? { signal: n } : {}
      // add signal to header if it exists
    };
    return new Promise((r) => {
      fetch(`${this.flatmapAPI}knowledge/query/`, a).then((s) => s.json()).then((s) => {
        if (this.connectivityExists(s)) {
          let l = JSON.parse(s.values[0][0]);
          o ? this.processConnectivity(e, l).then((u) => {
            r(u);
          }) : r(l);
        } else
          r(!1);
      }).catch((s) => {
        s.name === "AbortError" || console.error("Error:", s), r(!1);
      });
    });
  }, this.checkConnectivityExists = function(e) {
    var t;
    return e && ((t = e.connectivity) == null ? void 0 : t.length);
  }, this.connectivityExists = function(e) {
    return !!(e.values && e.values.length > 0 && JSON.parse(e.values[0][0]).connectivity && JSON.parse(e.values[0][0]).connectivity.length > 0);
  }, this.findIfNodeIsSingle = function(e) {
    return e.length === 1 ? (console.error("Server returns a single node", e), e[0]) : e.length === 2 && e[1].length === 0 ? e[0] : !1;
  }, this.createLabelFromNeuralNode = function(e, t) {
    let n = this.findIfNodeIsSingle(e);
    if (n)
      return t[n];
    let o = t[e[0]];
    return e.length === 2 && e[1].length > 0 && e[1].forEach((i) => {
      t[i] == null ? o += `, ${i}` : o += `, ${t[i]}`;
    }), o;
  }, this.flattenAndFindDatasets = function(e, t, n) {
    let o = this.flattenConnectivity(e), i = this.flattenConnectivity(t), a = this.flattenConnectivity(n);
    this.originsWithDatasets = this.uberons.filter(
      (r) => o.indexOf(r.id) !== -1
    ).sort(Yt), this.componentsWithDatasets = this.uberons.filter(
      (r) => i.indexOf(r.id) !== -1
    ).sort(Yt), this.destinationsWithDatasets = this.uberons.filter(
      (r) => a.indexOf(r.id) !== -1
    ).sort(Yt);
  }, this.processConnectivity = function(e, t) {
    return new Promise((n) => {
      let o = [], i = [], a;
      if (t && t["node-phenotypes"]) {
        const l = ["ilxtr:hasSomaLocatedIn"], u = ["ilxtr:hasAxonPresynapticElementIn", "ilxtr:hasAxonSensorySubcellularElementIn"];
        l.forEach((c) => {
          c in t["node-phenotypes"] && o.push(...t["node-phenotypes"][c]);
        }), o = An(o), u.forEach((c) => {
          c in t["node-phenotypes"] && i.push(...t["node-phenotypes"][c]);
        }), i = An(i);
      } else
        i = An(t.axons), t.somas && t.somas.length > 0 && o.push(...t.somas), t.dendrites && t.dendrites.length > 0 && o.push(...t.dendrites), o = An(o), a = t.somas;
      const r = this.findComponents(t, i, o, a), s = this.findAllIdsFromConnectivity(t);
      this.createLabelLookup(e, s).then((l) => {
        this.origins = o.map(
          (u) => this.createLabelFromNeuralNode(u, l)
        ).sort(Yt), this.components = r.map(
          (u) => this.createLabelFromNeuralNode(u, l)
        ).sort(Yt), this.destinations = i.map(
          (u) => this.createLabelFromNeuralNode(u, l)
        ).sort(Yt), this.flattenAndFindDatasets(o, r, i), n({
          ids: {
            dendrites: o,
            components: r,
            axons: i
          },
          labels: {
            origins: this.origins,
            components: this.components,
            destinations: this.destinations
          }
        });
      });
    });
  }, this.buildPubmedSqlStatement = function(e) {
    let t = "select distinct publication from publications where entity in (";
    if (e.length === 1)
      t += `'${e[0]}')`;
    else if (e.length > 1)
      for (let n in e)
        t += `'${e[n]}'${n >= e.length - 1 ? ")" : ","} `;
    return t;
  }, this.buildPubmedSqlStatementForModels = function(e) {
    return `select distinct publication from publications where entity = '${e}'`;
  }, this.queryKnowledge = async (e, t) => {
    const n = `${this.flatmapAPI}/knowledge/query/`, i = await fetch(n, {
      method: "POST",
      headers: {
        Accept: "application/json"
      },
      body: JSON.stringify({ sql: e, params: t })
    });
    if (!i.ok)
      throw new Error(`Cannot access ${n}`);
    const a = await i.json();
    if ("error" in a)
      throw new TypeError(a.error);
    return a.values;
  };
};
async function Eb(e) {
  const t = sessionStorage.getItem("flatmap-knowledge");
  if (t) {
    const i = JSON.parse(t).filter((a) => a.references && a.references.length).filter((a) => a.references.includes(e));
    if (i.length)
      return i.map((r) => r.id);
  }
  return [];
}
async function Ib(e, t, n) {
  const i = `select knowledge from knowledge
    where source="${oa(e)}" and
    knowledge like "%${t}%" order by source desc`;
  return (await n.queryKnowledge(i)).map((l) => JSON.parse(l)).map((l) => l.id);
}
function oa(e) {
  return kb(e.mapMetadata);
}
function kb(e) {
  let t = "";
  if (e != null && e.connectivity) {
    const n = e.connectivity;
    "knowledge-source" in n ? t = n["knowledge-source"] : "npo" in n && (t = `${n.npo.release}-npo`);
  }
  return t;
}
async function Tb(e, t) {
  const n = oa(e), o = `select knowledge from knowledge
    where source="${n}"
    order by source desc`;
  gl();
  const i = sessionStorage.getItem("flatmap-knowledge"), a = sessionStorage.getItem("flatmap-knowledge-source");
  if (!i || a !== n) {
    const s = (await t.queryKnowledge(o)).map((l) => JSON.parse(l));
    return sessionStorage.setItem("flatmap-knowledge", JSON.stringify(s)), sessionStorage.setItem("flatmap-knowledge-source", n), Ab(), s;
  }
  return JSON.parse(i);
}
function Ab() {
  const n = (/* @__PURE__ */ new Date()).getTime() + 864e5;
  sessionStorage.setItem("flatmap-knowledge-expiry", n);
}
function Ob() {
  [
    "flatmap-knowledge",
    "flatmap-knowledge-expiry",
    "flatmap-knowledge-source"
  ].forEach((t) => {
    sessionStorage.removeItem(t);
  });
}
function gl() {
  const e = sessionStorage.getItem("flatmap-knowledge-expiry");
  (/* @__PURE__ */ new Date()).getTime() > e && Ob();
}
const fo = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), Mb = '<svg width="195px" height="24px" viewBox="0 0 200 24" fill="yellow"><path d="M22.0748 3.25583C22.4141 2.42845 23.5859 2.42845 23.9252 3.25583L25.6493 7.45955C25.793 7.80979 26.1221 8.04889 26.4995 8.07727L31.0303 8.41798C31.922 8.48504 32.2841 9.59942 31.6021 10.1778L28.1369 13.1166C27.8482 13.3614 27.7225 13.7483 27.8122 14.1161L28.8882 18.5304C29.1 19.3992 28.152 20.0879 27.3912 19.618L23.5255 17.2305C23.2034 17.0316 22.7966 17.0316 22.4745 17.2305L18.60881 19.618C17.84796 20.0879 16.9 19.3992 17.1118 18.5304L18.18785 14.1161C18.2775 13.7483 18.1518 13.3614 17.86309 13.1166L14.3979 10.1778C13.71588 9.59942 14.07796 8.48504 14.96971 8.41798L19.50046 8.07727C19.87794 8.04889 20.20704 7.80979 20.35068 7.45955L22.0748 3.25583Z" stroke="#000000" stroke-width="2"/><text x="47" y="52%" style="white-space: pre" dominant-baseline="middle" text-anchor="start" font-family="Asap, sans-serif" font-size="12" fill="#333333">Featured dataset marker</text></svg>';
var yl = { exports: {} };
(function(e, t) {
  (function(n, o) {
    e.exports = o();
  })(typeof window < "u" ? window : rg, function() {
    if (typeof window > "u")
      return null;
    var n = typeof window < "u" && window.Math == Math ? window : typeof self < "u" && self.Math == Math ? self : Function("return this")(), o = n.requestAnimationFrame || n.mozRequestAnimationFrame || n.webkitRequestAnimationFrame || function(c) {
      return n.setTimeout(c, 20);
    }, i = n.cancelAnimationFrame || n.mozCancelAnimationFrame || n.webkitCancelAnimationFrame || function(c) {
      n.clearTimeout(c);
    };
    function a(c, d) {
      var f = Object.prototype.toString.call(c), m = f === "[object Array]" || f === "[object NodeList]" || f === "[object HTMLCollection]" || f === "[object Object]" || typeof jQuery < "u" && c instanceof jQuery || typeof Elements < "u" && c instanceof Elements, p = 0, h = c.length;
      if (m)
        for (; p < h; p++)
          d(c[p]);
      else
        d(c);
    }
    function r(c) {
      if (!c.getBoundingClientRect)
        return {
          width: c.offsetWidth,
          height: c.offsetHeight
        };
      var d = c.getBoundingClientRect();
      return {
        width: Math.round(d.width),
        height: Math.round(d.height)
      };
    }
    function s(c, d) {
      Object.keys(d).forEach(function(f) {
        c.style[f] = d[f];
      });
    }
    var l = function(c, d) {
      var f = 0;
      function m() {
        var h = [];
        this.add = function(C) {
          h.push(C);
        };
        var g, y;
        this.call = function(C) {
          for (g = 0, y = h.length; g < y; g++)
            h[g].call(this, C);
        }, this.remove = function(C) {
          var O = [];
          for (g = 0, y = h.length; g < y; g++)
            h[g] !== C && O.push(h[g]);
          h = O;
        }, this.length = function() {
          return h.length;
        };
      }
      function p(h, g) {
        if (h) {
          if (h.resizedAttached) {
            h.resizedAttached.add(g);
            return;
          }
          h.resizedAttached = new m(), h.resizedAttached.add(g), h.resizeSensor = document.createElement("div"), h.resizeSensor.dir = "ltr", h.resizeSensor.className = "resize-sensor";
          var y = {
            pointerEvents: "none",
            position: "absolute",
            left: "0px",
            top: "0px",
            right: "0px",
            bottom: "0px",
            overflow: "hidden",
            zIndex: "-1",
            visibility: "hidden",
            maxWidth: "100%"
          }, C = {
            position: "absolute",
            left: "0px",
            top: "0px",
            transition: "0s"
          };
          s(h.resizeSensor, y);
          var O = document.createElement("div");
          O.className = "resize-sensor-expand", s(O, y);
          var T = document.createElement("div");
          s(T, C), O.appendChild(T);
          var I = document.createElement("div");
          I.className = "resize-sensor-shrink", s(I, y);
          var k = document.createElement("div");
          s(k, C), s(k, { width: "200%", height: "200%" }), I.appendChild(k), h.resizeSensor.appendChild(O), h.resizeSensor.appendChild(I), h.appendChild(h.resizeSensor);
          var A = window.getComputedStyle(h), $ = A ? A.getPropertyValue("position") : null;
          $ !== "absolute" && $ !== "relative" && $ !== "fixed" && $ !== "sticky" && (h.style.position = "relative");
          var N = !1, j = 0, B = r(h), M = 0, W = 0, de = !0;
          f = 0;
          var Y = function() {
            var be = h.offsetWidth, _e = h.offsetHeight;
            T.style.width = be + 10 + "px", T.style.height = _e + 10 + "px", O.scrollLeft = be + 10, O.scrollTop = _e + 10, I.scrollLeft = be + 10, I.scrollTop = _e + 10;
          }, D = function() {
            if (de) {
              var be = h.offsetWidth === 0 && h.offsetHeight === 0;
              if (be) {
                f || (f = o(function() {
                  f = 0, D();
                }));
                return;
              } else
                de = !1;
            }
            Y();
          };
          h.resizeSensor.resetSensor = D;
          var ne = function() {
            j = 0, N && (M = B.width, W = B.height, h.resizedAttached && h.resizedAttached.call(B));
          }, Le = function() {
            B = r(h), N = B.width !== M || B.height !== W, N && !j && (j = o(ne)), D();
          }, ye = function(be, _e, Ge) {
            be.attachEvent ? be.attachEvent("on" + _e, Ge) : be.addEventListener(_e, Ge);
          };
          ye(O, "scroll", Le), ye(I, "scroll", Le), f = o(function() {
            f = 0, D();
          });
        }
      }
      a(c, function(h) {
        p(h, d);
      }), this.detach = function(h) {
        f || (i(f), f = 0), l.detach(c, h);
      }, this.reset = function() {
        c.resizeSensor.resetSensor();
      };
    };
    if (l.reset = function(c) {
      a(c, function(d) {
        d.resizeSensor.resetSensor();
      });
    }, l.detach = function(c, d) {
      a(c, function(f) {
        f && (f.resizedAttached && typeof d == "function" && (f.resizedAttached.remove(d), f.resizedAttached.length()) || f.resizeSensor && (f.contains(f.resizeSensor) && f.removeChild(f.resizeSensor), delete f.resizeSensor, delete f.resizedAttached));
      });
    }, typeof MutationObserver < "u") {
      var u = new MutationObserver(function(c) {
        for (var d in c)
          if (c.hasOwnProperty(d))
            for (var f = c[d].addedNodes, m = 0; m < f.length; m++)
              f[m].resizeSensor && l.reset(f[m]);
      });
      document.addEventListener("DOMContentLoaded", function(c) {
        u.observe(document.body, {
          childList: !0,
          subtree: !0
        });
      });
    }
    return l;
  });
})(yl);
var _b = yl.exports;
const xb = /* @__PURE__ */ sg(_b), Pb = cu("main", {
  state: () => ({
    userProfile: {
      token: ""
    }
  }),
  getters: {
    userToken(e) {
      return e.userProfile.token;
    }
  },
  actions: {
    setUserToken(e) {
      this.userProfile.token = e;
    }
  }
});
function Lb(e) {
  return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, n) {
    var o = e.get(t);
    o ? o.push(n) : e.set(t, [n]);
  }, off: function(t, n) {
    var o = e.get(t);
    o && (n ? o.splice(o.indexOf(n) >>> 0, 1) : e.set(t, []));
  }, emit: function(t, n) {
    var o = e.get(t);
    o && o.slice().map(function(i) {
      i(n);
    }), (o = e.get("*")) && o.slice().map(function(i) {
      i(t, n);
    });
  } };
}
const Ii = new Lb(), Rb = "cannot be found on the map.", Fb = (e) => {
  let t = { lng: 0, lat: 0 }, n;
  return e.type === "Polygon" ? e.coordinates.length && (n = e.coordinates[0]) : n = e.coordinates, n && (e.type !== "Point" ? (n.map((o) => {
    t.lng += parseFloat(o[0]), t.lat += parseFloat(o[1]);
  }), t.lng = t.lng / n.length, t.lat = t.lat / n.length) : (t.lng += parseFloat(n[0]), t.lat += parseFloat(n[1]))), t;
}, bl = (e, t) => {
  const n = [];
  let o = e.organs ? e.organs : e.ftus;
  const i = o ? o.filter(
    (a, r) => o.findIndex((s) => s.label === a.label) === r
  ) : void 0;
  return i && i.forEach((a) => {
    const r = {
      label: a.label,
      models: a.models,
      key: `${t}.${a.label}`
    }, s = bl(a, r.key);
    s.length > 0 && (r.children = s), n.push(r);
  }), n;
}, $b = {
  name: "FlatmapVuer",
  components: {
    Button: Qi,
    Col: Wn,
    Loading: Uy,
    Radio: ll,
    Icon: We,
    RadioGroup: ul,
    Row: Un,
    Select: zo,
    Dialog: uy,
    MapSvgIcon: nu,
    MapSvgSpriteColor: ou,
    Tooltip: iu,
    TreeControls: au,
    SelectionsGroup: ml,
    SvgLegends: wb,
    ElIconWarningFilled: Pr,
    ElIconArrowDown: ki,
    ElIconArrowLeft: Lr,
    DrawToolbar: ru,
    FlatmapError: na
  },
  beforeCreate: function() {
    this.setStateRequired = !1;
  },
  setup(e) {
    let t = G("$annotator");
    return t || (t = Re(new uu(`${e.flatmapAPI}annotator`)), pe("$annotator", t)), { annotator: t };
  },
  methods: {
    enableFeatureResetOnClick: function(e) {
      this.mapImp && this.mapImp.enableFeatureResetOnClick(e);
    },
    /**
     * @public
     * Function to set visibility filter for features and paths on the map.
     * The param `filter` format should follow `#makeStyleFilter` (flatmap-viewer).
     * If the param is `null` or `undefined`, the visibility filter will be cleared.
     * Refer to [`setVisibilityFilter` in flatmap-viewer](https://anatomicmaps.github.io/flatmap-viewer/classes/index.FlatMap.html#setvisibilityfilter)
     * for more details.
     * @param {Object} `filter`
     */
    setVisibilityFilter: function(e) {
      this.mapImp && (this.mapImp.contextLost ? e ? this.filterToRestore = Re(JSON.parse(JSON.stringify(e))) : this.filterToRestore = void 0 : (e ? this.mapImp.setVisibilityFilter(e) : this.mapImp.clearVisibilityFilter(), this.filterToRestore = void 0));
    },
    /**
     * @public
     * Function to manually send aborted signal when annotation tooltip popup or sidebar tab closed.
     */
    manualAbortedOnClose: function() {
      this.annotationSidebar && this.$emit("annotation-close"), this.closeTooltip(), this.annotationEventCallback({}, { type: "aborted" }), this.initialiseDrawing();
    },
    /**
     * @public
     * Function to initialise drawing.
     */
    initialiseDrawing: function() {
      this.connectionEntry = {}, this.activeDrawTool = void 0, this.activeDrawMode = void 0, this.drawnCreatedEvent = {};
    },
    /**
     * @public
     * Function to cancel a newly drawn feature.
     */
    cancelDrawnFeature: function() {
      this.isValidDrawnCreated && (this.annotationSidebar && this.$emit("annotation-close"), this.closeTooltip(), this.annotationEntry = [{
        ...this.drawnCreatedEvent.feature,
        resourceId: this.serverURL
      }], this.rollbackAnnotationEvent(), this.initialiseDrawing());
    },
    /**
     * @public
     * Function to display connected features' tooltip for drawn connectivity.
     * @param {String} `id`
     */
    connectedFeatureTooltip: function(e) {
      if (this.mapImp)
        if (e) {
          const t = Number(e);
          let o = { feature: t ? this.mapImp.featureProperties(t) : { feature: this.existDrawnFeatures.find((i) => i.id === e.trim()) } };
          this.checkAndCreatePopups([o], !1);
        } else
          this.closeTooltip();
    },
    /**
     * @public
     * Function to confirm a newly drawn feature.
     */
    confirmDrawnFeature: function() {
      this.isValidDrawnCreated && (this.checkAndCreatePopups([this.drawnCreatedEvent], !1), Object.keys(this.connectionEntry).length > 0 && (this.annotationEntry[0].feature.connection = this.connectionEntry), this.initialiseDrawing());
    },
    /**
     * @public
     * Function to process the annotation toolbar click events.
     * @arg {String} `type`
     * @arg {String} `name`
     */
    toolbarEvent: function(e, t) {
      if (!this.isValidDrawnCreated) {
        if (this.manualAbortedOnClose(), this.doubleClickedFeature = !1, this.changeAnnotationDrawMode({ mode: "simple_select" }), e === "mode")
          this.activeDrawMode = t;
        else if (e === "tool") {
          if (this.cancelDrawnFeature(), t) {
            const n = t.replace(/[A-Z]/g, (o) => `_${o.toLowerCase()}`);
            this.changeAnnotationDrawMode({ mode: `draw${n}` });
          }
          this.activeDrawTool = t;
        }
      }
    },
    /**
     * @public
     * Function to fire annotation event based on the provided ``data``.
     * Either edit or delete action.
     * @arg {Object} `data`
     */
    annotationDrawModeEvent: function(e) {
      this.activeDrawMode === "Edit" ? this.doubleClickedFeature && (e.feature.feature.geometry.type !== "Point" && (this.changeAnnotationDrawMode({
        mode: "direct_select",
        options: { featureId: e.feature.feature.id }
      }), this.modifyAnnotationFeature()), this.doubleClickedFeature = !1) : this.activeDrawMode === "Delete" && (this.changeAnnotationDrawMode({
        mode: "simple_select",
        options: { featureIds: [e.feature.feature.id] }
      }), this.modifyAnnotationFeature());
    },
    /**
     * Function to create connectivity body from existing entries.
     */
    createConnectivityBody: function() {
      if (Object.keys(this.connectionEntry).length > 0) {
        const e = Object.values(this.connectionEntry), t = {
          type: "connectivity",
          source: e[0],
          target: e[e.length - 1],
          intermediates: e.filter((n, o) => o !== 0 && o !== e.length - 1)
        };
        this.annotationEntry[0].body = t;
      }
    },
    /**
     * @public
     * Function to update the annotation draw mode.
     * @arg {Object} `mode`
     */
    changeAnnotationDrawMode: function(e) {
      this.mapImp && this.mapImp.changeAnnotationDrawMode(e);
    },
    /**
     * @public
     * Function to remove all drawn annotations from flatmap annotation layer.
     */
    clearAnnotationFeature: function() {
      this.mapImp && this.mapImp.clearAnnotationFeature();
    },
    forceContextLoss: function() {
      this.mapImp && !this.mapImp.contextLost && !this.loading && this.mapImp.forceContextLoss();
    },
    forceContextRestore: function() {
      this.mapImp && (this.flatmapError = null, this.mapImp.forceContextRestore());
    },
    /**
     * @public
     * Function to fire the ``trash`` action.
     * See https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/API.md#trash-draw for more details.
     */
    modifyAnnotationFeature: function() {
      this.mapImp && this.mapImp.removeAnnotationFeature();
    },
    /**
     * @public
     * Function to rollback the failure drawn from flatmap annotation layer.
     */
    rollbackAnnotationEvent: function() {
      this.mapImp && this.annotationEntry.length > 0 && ["created", "updated", "deleted"].includes(this.annotationEntry[0].type) && (this.mapImp.rollbackAnnotationEvent(this.annotationEntry[0]), this.annotationEntry = []);
    },
    /**
     * @public
     * Function to commit the emitted ``annotation`` data from successful new drawn to flatmap annotation layer.
     * @arg {Object} `annotation`
     */
    commitAnnotationEvent: function(e) {
      this.mapImp && (this.offlineAnnotationEnabled && (this.offlineAnnotations = JSON.parse(sessionStorage.getItem("anonymous-annotation")) || [], this.offlineAnnotations.push(e), this.annotationEntry[0].type === "deleted" && (this.offlineAnnotations = this.offlineAnnotations.filter((t) => t.resource !== this.serverURL || t.item.id !== e.item.id)), sessionStorage.setItem("anonymous-annotation", JSON.stringify(this.offlineAnnotations))), ["created", "updated", "deleted"].includes(this.annotationEntry[0].type) && (this.featureAnnotationSubmitted = !0, this.mapImp.commitAnnotationEvent(this.annotationEntry[0]), e.body.comment === "Position Updated" ? this.annotationEntry[0].positionUpdated = !1 : this.annotationEntry[0].type === "deleted" && (this.annotationSidebar && this.$emit("annotation-close"), this.closeTooltip(), this.annotationEntry = []), this.addAnnotationFeature()));
    },
    /**
     * @public
     * Function to fetch annotated item id.
     * @arg {String} `userId`,
     * @arg {String} `participated`
     */
    fetchAnnotatedItemIds: async function(e = void 0, t = void 0) {
      let n;
      return this.offlineAnnotationEnabled ? (this.offlineAnnotations = JSON.parse(sessionStorage.getItem("anonymous-annotation")) || [], n = this.offlineAnnotations.filter((o) => o.resource === this.serverURL).map((o) => o.item.id)) : (n = await this.annotator.annotatedItemIds(this.userToken, this.serverURL, e, t), "resource" in n && (n = n.itemIds)), n;
    },
    /**
     * @public
     * Function to add existing drawn annotations to flatmap.
     */
    setFeatureAnnotated: async function() {
      if (this.mapImp) {
        const e = await this.fetchAnnotatedItemIds();
        for (const t of e)
          this.mapImp.setFeatureAnnotated(t);
      }
    },
    /**
     * @public
     * Function to fetch drawn features.
     * @arg {String} `userId`,
     * @arg {String} `participated`
     */
    fetchDrawnFeatures: async function(e, t) {
      let n;
      if (this.offlineAnnotationEnabled)
        this.offlineAnnotations = JSON.parse(sessionStorage.getItem("anonymous-annotation")) || [], n = this.offlineAnnotations.filter((o) => o.feature && o.resource === this.serverURL).map((o) => o.feature);
      else {
        const o = await this.fetchAnnotatedItemIds(e, t);
        n = await this.annotator.drawnFeatures(this.userToken, this.serverURL, o), "resource" in n && (n = n.features);
      }
      return n;
    },
    /**
     * @public
     * Function to draw existing drawn annotations based on selector.
     */
    addAnnotationFeature: async function() {
      if (this.mapImp) {
        this.featureAnnotationSubmitted || (this.clearAnnotationFeature(), this.loading = !0);
        const e = this.annotationFrom === "Anyone" ? void 0 : this.authorisedUser.orcid ? this.authorisedUser.orcid : "0000-0000-0000-0000", t = this.annotationFrom === "Anyone" ? void 0 : this.annotationFrom === "Me", n = await this.fetchDrawnFeatures(e, t);
        if (this.existDrawnFeatures = n, this.loading = !1, !this.featureAnnotationSubmitted)
          for (const o of n)
            this.mapImp.addAnnotationFeature(o);
      }
    },
    /**
     * @public
     * Function to display annotator toolbar.
     * @arg {Boolean} `flag`
     */
    showAnnotator: function(e) {
      this.mapImp && (this.mapImp.showAnnotator(e), this.$el.querySelector(".maplibregl-ctrl-group").style.display = "none");
    },
    /**
     * @public
     * Function to switch the type of person who annotated.
     * @arg {Boolean} `flag`
     */
    setAnnotationFrom: function(e) {
      this.annotationFrom = e, this.mapImp && (this.manualAbortedOnClose(), this.addAnnotationFeature());
    },
    /**
     * Function to emit offline annotation enabled status
     */
    emitOfflineAnnotationUpdate: function() {
      this.$emit("update-offline-annotation-enabled", this.offlineAnnotationEnabled);
    },
    /**
     * @public
     * Function to switch from 2D to 3D
     * @arg {Boolean} `flag`
     */
    setFlightPath3D: function(e) {
      this.flightPath3DRadio = e, this.mapImp && this.mapImp.enableFlightPaths(e);
    },
    /**
     * @public
     * Function to view the latest map (example when you are on legacy map).
     */
    viewLatestMap: function() {
      let e = this.biologicalSex ? this.biologicalSex : void 0;
      this.entry === "NCBITaxon:9606" && (e = "PATO:0000384");
      const t = {
        entry: this.entry,
        biologicalSex: e,
        viewport: this.mapImp.getState()
      };
      this.$emit("view-latest-map", t);
    },
    /**
     * @public
     * Function to change the background colour of the map
     * by providing the ``colour``.
     * @arg {String} `colour`
     */
    backgroundChangeCallback: function(e) {
      this.currentBackground = e, this.mapImp && this.mapImp.setBackgroundColour(this.currentBackground, 1);
    },
    /**
     * @public
     * Function to process a list of a FC flatmap's systems.
     * @arg {Array} `systems`
     */
    processSystems: function(e) {
      if (this.systems.length = 0, e && e.length > 0) {
        const t = { label: "All", key: "All", children: [] };
        e.forEach((n) => {
          const o = {
            colour: n.colour,
            enabled: n.enabled,
            label: n.id,
            key: n.id
          }, i = bl(n, o.key);
          i.length > 0 && (o.children = i), t.children.push(o);
        }), this.systems.push(t);
      }
    },
    /**
     * @public
     * Function to add taxon identifiers into the taxon connectivity array,
     * by retrieving their corresponding labels using the flatmap API.
     * @arg {String} `flatmapAPI`,
     * @arg {Array} `taxonIdentifiers`
     */
    processTaxon: function(e, t) {
      this.taxonConnectivity.length = 0, Ei(this.mapImp, e).then((n) => {
        n.length && n.forEach((o) => {
          let i = !0;
          t && (i = t.checkAll ? !0 : t.checked.includes(o.taxon)), this.taxonConnectivity.push({ ...o, enabled: i }), this.mapImp && this.mapImp.enableConnectivityByTaxonIds(o.taxon, i);
        });
      });
    },
    /**
     * @public
     * Function to show or hide the display of the bottom-left drawer container.
     */
    toggleDrawer: function() {
      this.drawerOpen = !this.drawerOpen;
    },
    /**
     * @public
     * Function to toggle colour/greyscale of organs.
     * The parameter ``flag`` is a boolean, ``true`` (colour) and ``false`` (greyscale).
     * @arg {Boolean} `flag`
     */
    setColour: function(e) {
      this.colourRadio = e, this.mapImp && this.mapImp.setPaint({ coloured: e, outlined: this.outlinesRadio });
    },
    /**
     * @public
     * Function to toggle outlines f organs.
     * The parameter ``flag`` is a boolean, ``true`` to show outlines, ``false`` to hide outlines.
     * @arg {Boolean} `flag`
     */
    setOutlines: function(e) {
      this.outlinesRadio = e, this.mapImp && this.mapImp.setPaint({ coloured: this.colourRadio, outlined: e });
    },
    setInitMapState: function() {
      if (this.mapImp) {
        const e = this.mapImp.map, t = this.mapImp.options.bounds, n = [
          [t[0], t[1]],
          [t[2], t[3]]
        ];
        e.setMaxBounds(null), e.setRenderWorldCopies(!1), this.initMapState = Re({
          initBounds: n
        });
      }
    },
    /**
     * @public
     * Function to toggle paths to default.
     * Also called when the associated button is pressed.
     */
    resetView: function() {
      if (this.mapImp) {
        const e = this.mapImp.map, { initBounds: t } = this.initMapState;
        e.resetNorthPitch({
          animate: !1
        }), t && e.fitBounds(t, {
          animate: !1
        }), this.$refs.skcanSelection && this.$refs.skcanSelection.reset(), this.$refs.layersSelection && this.$refs.layersSelection.reset(), this.$refs.systemsSelection && this.$refs.pathwaysSelection.reset(), this.$refs.pathwaysSelection && this.$refs.pathwaysSelection.reset();
      }
    },
    /**
     * @public
     * Function to zoom in.
     * Also called when the associated button is pressed.
     */
    zoomIn: function() {
      this.mapImp && this.mapImp.zoomIn();
    },
    /**
     * @public
     * Function to zoom out.
     * Also called when the associated button is pressed.
     */
    zoomOut: function() {
      this.mapImp && this.mapImp.zoomOut();
    },
    onSelectionsDataChanged: function(e) {
      this.$emit("pathway-selection-changed", e);
    },
    /**
     * // Currently not in use
     * Function to show or hide paths valid in SCKAN
     * by providing ``{key, value}`` pair in ``payload``.
     * @arg payload
     */
    sckanSelected: function(e) {
      this.mapImp && this.mapImp.enableSckanPath(e.key, e.value);
    },
    /**
     * // Currently not in use
     * Function to show or hide all paths valid in SCKAN.
     * @arg payload
     */
    checkAllSCKAN: function(e) {
      this.mapImp && e.keys.forEach(
        (t) => this.mapImp.enableSckanPath(t, e.value)
      );
    },
    /**
     * Function to highlight paths and features
     * @param data
     */
    zoomToFeatures: function(e) {
      this.mapImp && this.mapImp.zoomToFeatures(e);
    },
    /**
     * @public
     * Function to highlight the connected paths
     * by providing path model identifier, ``pathId`` or ``anatomicalId``.
     * @arg {string} `pathId` or `anatomicalId`
     */
    retrieveConnectedPaths: async function(e, t = {}) {
      var n, o, i, a, r;
      if (this.mapImp) {
        let s = [], l = (n = t.target) != null && n.length ? t.target : [];
        const u = [...this.mapImp.pathModelNodes(e)], c = await this.mapImp.queryPathsForFeatures(e);
        if (u.length) {
          if (!l.length) {
            const d = (o = t.type) != null && o.length ? t.type : ["all"], f = await this.flatmapQueries.queryForConnectivityNew(this.mapImp, e[0]), m = (i = f == null ? void 0 : f.ids) == null ? void 0 : i.dendrites.flat(1 / 0), p = (a = f == null ? void 0 : f.ids) == null ? void 0 : a.components.flat(1 / 0), h = (r = f == null ? void 0 : f.ids) == null ? void 0 : r.axons.flat(1 / 0);
            let g = [];
            d.includes("origins") && g.push(...m), d.includes("components") && g.push(...p), d.includes("destinations") && g.push(...h), d.includes("all") && g.push(...m, ...p, ...h), l = [...new Set(g)];
          }
          u.forEach((d) => {
            this.mapImp.nodePathModels(d).forEach((m) => {
              const h = this.mapImp.pathModelNodes(m).map((y) => this.mapImp.featureProperties(y).models);
              l.filter((y) => h.includes(y)).length && !s.includes(m) && s.push(m);
            });
          });
        } else c.length && (l.length ? c.forEach((d) => {
          const m = this.mapImp.pathModelNodes(d).map((h) => this.mapImp.featureProperties(h).models);
          l.filter((h) => m.includes(h)).length && !s.includes(d) && s.push(d);
        }) : s = c);
        return s = [.../* @__PURE__ */ new Set([...s, ...e])], s;
      }
    },
    resetMapFilter: function() {
      const e = this.mapFilters.alert;
      let t;
      const n = { "tile-layer": "pathways" }, o = { NOT: n };
      e.with && !e.without ? t = {
        OR: [o, { AND: [n, { HAS: "alert" }] }]
      } : !e.with && e.without ? t = {
        OR: [o, { AND: [n, { NOT: { HAS: "alert" } }] }]
      } : !e.with && !e.without && (t = o), this.setVisibilityFilter(t);
    },
    /**
     * @public
     * Function to enable/disable mouse enter and leave event for
     * alert checkbox
     * @arg {Object} `payload`
     */
    alertMouseEnterEmitted: function(e) {
      if (this.mapImp)
        if (e.value) {
          let t;
          const n = { "tile-layer": "pathways" }, o = { NOT: n };
          if (e.key === "alert" || e.key === "withoutAlert") {
            const i = e.key === "alert" ? { HAS: "alert" } : { NOT: { HAS: "alert" } };
            t = { OR: [o, { AND: [n, i] }] };
          }
          this.setVisibilityFilter(t);
        } else
          this.resetMapFilter();
    },
    /**
     * @public
     * Function to enable/disable (show/hide) pathways with/without alert
     * by providing ``kay, value`` ``payload`` object ``{alertKey, true/false}``.
     * @arg {Object} `payload`
     */
    alertSelected: function(e) {
      this.mapImp && (e.key === "alert" ? e.value ? this.mapFilters.alert.with = !0 : this.mapFilters.alert.with = !1 : e.key === "withoutAlert" && (e.value ? this.mapFilters.alert.without = !0 : this.mapFilters.alert.without = !1), this.resetMapFilter());
    },
    /**
     * @public
     * Function to enable/disable (show/hide) all alerts
     * option by providing ``flag`` (true/false).
     * @arg {Boolean} `flag`
     */
    checkAllAlerts: function(e) {
      this.mapImp && (e.value ? (this.mapFilters.alert.without = !0, this.mapFilters.alert.with = !0) : (this.mapFilters.alert.without = !1, this.mapFilters.alert.with = !1), this.resetMapFilter());
    },
    /**
     * @public
     * Function to enable/disable (show/hide) the system
     * by providing ``kay, value`` ``payload`` object ``{systemId, true/false}``.
     * @arg {Object} `payload`
     */
    systemSelected: function(e) {
      this.mapImp && this.mapImp.enableSystem(e.key, e.value);
    },
    /**
     * @public
     * Function to enable/disable (show/hide) all systems
     * by providing ``flag`` (true/false).
     * @arg {Boolean} `flag`
     */
    checkAllSystems: function(e) {
      this.mapImp && this.systems[0].children.forEach(
        (t) => this.mapImp.enableSystem(t.label, e)
      );
    },
    /**
     * @public
     * Function to display features with annotation matching the provided term.
     * @arg {String} `models`
     */
    ftuSelected: function(e) {
      this.searchAndShowResult(e, !0, !0);
    },
    /**
     * @public
     * Function to show or hide the layer
     * by providing ``{layerId, true/false}`` in ``payload``.
     * @arg {Object} `payload`
     */
    layersSelected: function(e) {
      this.mapImp && this.mapImp.enableLayer(e.key, e.value);
    },
    /**
     * @public
     * Function to show or hide all layers
     * by providing ``payload`` with ``payload.keys`` array and ``payload.value`` flag.
     * @arg {Object} `payload`
     */
    checkAllLayers: function(e) {
      this.mapImp && e.keys.forEach(
        (t) => this.mapImp.enableLayer(t, e.value)
      );
    },
    /**
     * @public
     * Function to show or hide connectivity features studied in particular species
     * by providing ``{taxonId, true/false}`` in ``payload.key, payload.value``.
     * @arg {Object} `payload`
     */
    taxonsSelected: function(e) {
      this.mapImp && this.mapImp.enableConnectivityByTaxonIds(e.key, e.value);
    },
    taxonMouseEnterEmitted: function(e) {
      if (this.mapImp)
        if (e.value) {
          clearTimeout(this.taxonLeaveDelay);
          let t = this.mapImp.taxonFeatureIds(e.key);
          this.mapImp.enableConnectivityByTaxonIds(e.key, e.value), this.mapImp.zoomToGeoJSONFeatures(t, { noZoomIn: !0 });
        } else
          this.taxonLeaveDelay = setTimeout(() => {
            this.mapImp.unselectGeoJSONFeatures(), e.selections.forEach((t) => {
              let n = e.checked.includes(t.taxon);
              this.mapImp.enableConnectivityByTaxonIds(t.taxon, n);
            });
          }, 1e3);
    },
    /**
     * @public
     * Function to show or hide connectivity features studied in particular species
     * by providing ``payload`` with ``payload.keys`` array and ``payload.value`` flag.
     * @arg {Object} `payload`
     */
    checkAllTaxons: function(e) {
      this.mapImp && this.mapImp.enableConnectivityByTaxonIds(e.keys, e.value);
    },
    /**
     * @public
     * Function to hide or show paths of a given type
     * by providing ``{pathType, true/false}`` in ``payload.key, payload.value``.
     * @arg {Object} `payload`
     */
    pathwaysSelected: function(e) {
      this.mapImp && this.mapImp.enablePath(e.key, e.value);
    },
    /**
     * @public
     * Function to hide or show paths of a given type
     * by providing ``payload`` with ``payload.keys`` array and ``payload.value`` flag.
     * @arg {Object} `payload`
     */
    checkAllPathways: function(e) {
      this.mapImp && e.keys.forEach(
        (t) => this.mapImp.enablePath(t, e.value)
      );
    },
    /**
     * @public
     * Function to generate callbacks as a result of panning/zooming the map.
     * ``flag`` (boolean) - generate callbacks when ``true``, otherwise disable them.
     * @arg {Boolean} `flag`
     */
    enablePanZoomEvents: function(e) {
      this.mapImp.enablePanZoomEvents(e);
    },
    /**
     * @public
     * Function to process annotation callbacks, invoked when events occur with the map.
     * @arg {Object} `payload`,
     * @arg {Object} `data`
     */
    annotationEventCallback: function(e, t) {
      if (t.type === "aborted")
        this.featureAnnotationSubmitted ? this.featureAnnotationSubmitted = !1 : this.rollbackAnnotationEvent(), this.annotationEntry = [];
      else if (t.type === "modeChanged")
        t.feature.mode === "direct_select" && (this.doubleClickedFeature = !0), this.annotationSidebar && t.feature.mode === "simple_select" && this.activeDrawMode === "Deleted" && this.annotationEventCallback({}, { type: "aborted" });
      else if (t.type === "selectionChanged") {
        if (this.selectedDrawnFeature = t.feature.features.length === 0 ? void 0 : t.feature.features[0], e.feature.feature = this.selectedDrawnFeature, !this.activeDrawTool)
          if (this.connectionEntry = {}, this.selectedDrawnFeature) {
            const n = this.existDrawnFeatures.find(
              (o) => o.id === this.selectedDrawnFeature.id
            );
            n && n.connection && (this.connectionEntry = n.connection), this.annotationDrawModeEvent(e);
          } else
            this.annotationSidebar && this.previousEditEvent.type === "updated" && (this.annotationEntry = [{
              ...this.previousEditEvent,
              resourceId: this.serverURL
            }], this.annotationEventCallback({}, { type: "aborted" })), this.previousEditEvent = {};
      } else {
        if (t.type === "created" || t.type === "updated") {
          t.type === "updated" && t.feature.action && (t.positionUpdated = t.feature.action === "move");
          const n = this.mapImp.refreshAnnotationFeatureGeometry(t.feature);
          e.feature.feature = n;
        }
        t.type === "created" ? this.drawnCreatedEvent = e : this.checkAndCreatePopups([e]);
      }
      t.type === "updated" && (this.previousEditEvent = t), t.type === "deleted" ? this.previousDeletedEvent = t : this.previousDeletedEvent = {};
    },
    getTaxons: function(e) {
      let t;
      return e.taxons && (typeof e.taxons != "object" ? t = JSON.parse(e.taxons) : t = e.taxons), t;
    },
    /**
     * @public
     * A callback function, invoked when events occur with the map.
     * The first parameter gives the type of event, the second provides details about the event.
     * _(This is the ``callback`` function from ``MapManager.loadMap()``)_.
     */
    eventCallback: function() {
      return (e, t, ...n) => {
        if (e === "annotation") {
          const o = {
            feature: t,
            userData: n,
            eventType: e
          };
          this.annotationEventCallback(o, t);
        } else if (e === "context-lost")
          this.onContextLost();
        else if (e === "context-restored")
          this.onContextRestored();
        else if (e === "pan-zoom")
          this.$emit("pan-zoom-callback", t);
        else {
          const o = t.label, i = [t.models], a = this.entry, r = this.biologicalSex, s = t.alert, l = this.getTaxons(t);
          let u = [{
            dataset: t.dataset,
            biologicalSex: r,
            taxonomy: a,
            resource: i,
            label: o,
            feature: t,
            userData: n,
            eventType: e,
            provenanceTaxonomy: l,
            alert: s
          }];
          if (e === "click") {
            const c = !t[0];
            if (!c) {
              u = [];
              const f = t.mapUUID, m = /* @__PURE__ */ new Set();
              for (let [p, h] of Object.entries(t))
                if (p !== "mapUUID") {
                  const g = h.featureId, y = h.label, C = [h.models], O = this.getTaxons(h);
                  if (m.has(g)) continue;
                  m.add(g), u.push({
                    dataset: h.dataset,
                    biologicalSex: r,
                    taxonomy: a,
                    resource: C,
                    label: y,
                    feature: h,
                    userData: n,
                    eventType: e,
                    provenanceTaxonomy: O,
                    alert: h.alert,
                    mapUUID: f
                  });
                }
            }
            const d = c ? t : t[0];
            if (this.setConnectivityDataSource(this.viewingMode, d), this.viewingMode !== "Neuron Connection") {
              if (this.currentActive = d.models ? d.models : "", this.activeDrawTool && !this.isValidDrawnCreated) {
                const f = d.featureId || this.existDrawnFeatures.find(
                  (m) => m.id === d.id
                );
                if (this.activeDrawTool === "LineString" && f) {
                  const m = d.featureId ? d.featureId : d.id, p = d.label ? d.label : `Feature ${d.id}`;
                  this.connectionEntry[` ${m}`] = Object.assign(
                    { label: p },
                    Object.fromEntries(
                      Object.entries(d).filter(([h]) => ["featureId", "models"].includes(h)).map(([h, g]) => [h === "featureId" ? "id" : h, g])
                    )
                  );
                }
              }
            }
            t && t.type !== "marker" && !this.activeDrawTool && this.checkAndCreatePopups(u);
          } else e === "mouseenter" && this.viewingMode !== "Neuron Connection" && (this.currentHover = t.models ? t.models : "");
          this.$emit("resource-selected", u);
        }
      };
    },
    /**
     * The data for connectivity data source is just a placeholder data
     * to check which part of the map is clicked, e.g., path or feture or empty area,
     * based on the viewing mode.
     * The "connectivity-info-close" event will be emitted based on this data
     * when there has a click event on map.
     * @param viewingMode
     * @param data
     */
    setConnectivityDataSource: function(e, t) {
      var n;
      e === "Exploration" ? this.connectivityDataSource = (n = t.models) != null && n.startsWith("ilxtr:") ? t.models : "" : this.connectivityDataSource = t.featureId || t.id;
    },
    /**
     * @public
     * Function triggered by viewing mode change.
     * (e.g., from 'Exploration' to 'Annotation')
     * All tooltips and popups currently showing on map will be closed
     * @arg {String} `modeName`
     */
    changeViewingMode: function(e) {
      e && (this.viewingMode = e), this.manualAbortedOnClose();
    },
    /**
     * @public
     * Function to remove active tooltips on map.
     */
    removeActiveTooltips: function() {
      this.mapImp && this.mapImp.removePopup(), this.$el.querySelectorAll(".flatmap-tooltip-popup").forEach((t) => t.remove());
    },
    /**
     * Function to create tooltip for the provided connectivity data.
     * @arg {Array} `connectivityData`
     */
    createTooltipForConnectivity: function(e, t) {
      const n = document.createElement("div");
      n.classList.add("flatmap-feature-label"), e.forEach((o, i) => {
        const { label: a } = o;
        if (n.append(fo(a)), i + 1 < e.length) {
          const r = document.createElement("hr");
          n.appendChild(r);
        }
      }), this.mapImp.showPopup(
        t,
        n,
        {
          className: "custom-popup flatmap-tooltip-popup",
          positionAtLastClick: !1,
          preserveSelection: !0
        }
      );
    },
    /**
     * Function to show connectivity tooltips on the map
     * and highlight the nerve.
     * @arg {Object} `payload`
     */
    showConnectivityTooltips: function(e) {
      const { connectivityInfo: t, data: n } = e, o = [], i = [], a = [], r = [];
      if (t && t.featureId && o.push(...t.featureId), this.mapImp) {
        if (n.forEach((f) => {
          const m = this.mapImp.search(f.id);
          if (m != null && m.results.length) {
            const p = m == null ? void 0 : m.results[0].featureId;
            a.push({ featureId: p, ...f });
          } else
            r.push(f);
        }), a.length) {
          let f = a[0].featureId;
          this.mapImp.annotations.forEach((m) => {
            const p = m["anatomical-nodes"];
            if (p) {
              const h = p.join("");
              a.every(
                (y) => h.indexOf(y.id) !== -1
              ) && (f = m.featureId, i.push(f));
            }
          }), this.createTooltipForConnectivity(a, f);
        } else
          this.removeActiveTooltips();
        this.emitConnectivityError(r);
        const s = o.reduce((f, m) => {
          const p = this.mapImp.pathways.paths[m], h = p ? p.connectivity : null;
          if (h) {
            const g = h.flat(1 / 0);
            f.push(...g);
          }
          return f;
        }, []), l = [...new Set(s)], u = [...o, ...l], d = [
          ...this.mapImp.modelFeatureIdList(u),
          ...i
        ];
        this.mapImp.selectGeoJSONFeatures(d);
      }
    },
    showConnectivitiesByReference: function(e) {
      this.searchConnectivitiesByReference(e).then((t) => {
        this.mapImp.selectFeatures(t);
      });
    },
    searchConnectivitiesByReference: async function(e) {
      const t = sessionStorage.getItem("flatmap-knowledge");
      let n = [];
      return t ? n = await Eb(e) : n = await Ib(this.mapImp, e, this.flatmapQueries), n;
    },
    getFlatmapKnowledge: function() {
      let e = [];
      const t = sessionStorage.getItem("flatmap-knowledge");
      return t && (e = JSON.parse(t)), e;
    },
    emitConnectivityError: function(e) {
      this.$emit("connectivity-error", {
        data: {
          errorData: e,
          errorMessage: Rb
        }
      });
    },
    checkConnectivityTooltipEntry: function(e) {
      return e != null && e.length ? e.find((t) => {
        var n, o;
        return ((n = t == null ? void 0 : t.destinations) == null ? void 0 : n.length) || ((o = t == null ? void 0 : t.components) == null ? void 0 : o.length);
      }) !== void 0 : !1;
    },
    changeConnectivitySource: async function(e) {
      const { entry: t, connectivitySource: n } = e;
      t.mapId === this.mapImp.id && (await this.flatmapQueries.queryForConnectivityNew(this.mapImp, t.featureId[0], n), this.tooltipEntry = this.tooltipEntry.map((o) => o.featureId[0] === t.featureId[0] ? this.flatmapQueries.updateTooltipData(o) : o), this.checkConnectivityTooltipEntry(this.tooltipEntry) && this.$emit("connectivity-info-open", this.tooltipEntry));
    },
    /**
     * @public
     * Function to create/display tooltips from the provided ``data``.
     * _checkNeuronClicked shows a neuron path pop up if a path was recently clicked._
     * @arg {Object} `data`
     */
    checkAndCreatePopups: async function(e, t = !0) {
      var n;
      if (this.viewingMode === "Annotation") {
        const o = e.filter((i) => i.feature).map((i) => i.feature);
        if (o.length > 0)
          if (this.annotationSidebar && this.previousDeletedEvent.type === "deleted" && (this.annotationEntry = [{
            ...this.previousDeletedEvent,
            resourceId: this.serverURL
          }], this.annotationEventCallback({}, { type: "aborted" })), this.annotationEntry = [], o.forEach((i) => {
            var a;
            this.annotationEntry.push({
              ...i,
              resourceId: this.serverURL,
              featureId: i.featureId ? i.featureId : (a = i.feature) == null ? void 0 : a.id,
              offline: this.offlineAnnotationEnabled
            });
          }), o[0].feature)
            this.activeDrawTool || this.activeDrawMode || this.isValidDrawnCreated ? (this.featureAnnotationSubmitted = !1, this.activeDrawTool && this.createConnectivityBody(), this.displayTooltip(
              o[0].feature.id,
              Fb(o[0].feature.geometry)
            )) : this.rollbackAnnotationEvent();
          else {
            const i = this.annotationEntry.filter((a) => a.featureId && a.models).map((a) => a.models);
            i.length > 0 && this.displayTooltip(i);
          }
        else
          this.annotation = {};
      } else if (this.viewingMode === "Neuron Connection" && t) {
        const o = e.map((a) => a.resource[0]);
        if (o.find((a) => !a.startsWith("ilxtr:"))) {
          const a = Array.isArray(o) ? [...o] : [o];
          a.length === 1 && a.push([]);
          const r = (n = e[0].feature) == null ? void 0 : n.featureId, s = this.mapImp.annotations.get(r), l = s == null ? void 0 : s["anatomical-nodes"], u = s == null ? void 0 : s.models;
          let c, d = a;
          const f = s == null ? void 0 : s.models;
          l != null && l.length && (c = l.find(
            (k) => JSON.parse(k)[0] === u
          )), c ? d = JSON.parse(c) : f && (d = [f, []]);
          const m = this.mapImp.knowledgeSource, p = d.flat(1 / 0), h = [...new Set(p)], y = (await su(this.flatmapAPI, h)).reduce((k, A) => {
            const $ = A[0], N = JSON.parse(A[1]);
            return k.push({ id: $, label: N.label, source: N.source }), k;
          }, []);
          y.sort((k, A) => k.id === A.id ? k.source === m && A.source !== m ? -1 : k.source !== m && A.source === m ? 1 : 0 : k.id.localeCompare(A.id));
          const C = [];
          for (let k = 0; k < h.length; k++) {
            const A = y.find(($) => $.id === h[k]);
            A && C.push(A.label);
          }
          const O = fo(C.join(", ")), T = {
            facet: JSON.stringify(d),
            facetPropPath: `flatmap.connectivity.source.${this.connectionType.toLowerCase()}`,
            tagLabel: O,
            // used tagLabel here instead of label since the label and value are different
            term: this.connectionType
          };
          this.connectivityFilters.some((k) => k.facet === T.facet && k.facetPropPath === T.facetPropPath) || this.connectivityFilters.push(T), this.$emit("neuron-connection-feature-click", {
            filters: this.connectivityFilters,
            search: ""
          });
        } else {
          const a = o.join();
          this.connectionType.toLowerCase() === "all" ? this.$emit("neuron-connection-feature-click", {
            filters: [],
            search: a
          }) : await this.openConnectivityInfo(e);
        }
      } else
        await this.openConnectivityInfo(e);
    },
    openConnectivityInfo: async function(e) {
      Tb(this.mapImp, this.flatmapQueries);
      let t = [];
      if (this.tooltipEntry = e.filter((n) => n.resource[0] in this.mapImp.pathways.paths).map((n) => ({ title: n.label, featureId: n.resource, ready: !1 })), this.tooltipEntry.length) {
        this.$emit("connectivity-info-open", this.tooltipEntry);
        for (let o = 0; o < e.length; o++)
          t.push(await this.getKnowledgeTooltip(e[o]));
        this.tooltipEntry = await Promise.all(t);
        const n = this.tooltipEntry.map((o) => o.featureId[0]);
        n.length > 0 && this.displayTooltip(n);
      }
    },
    /**
     * Updates the connectivity filters in flatmap when there are changes in the sidebar.
     * @public
     * @param {Array} payload - The array of filter items to update.
     */
    updateConnectivityFilters: function(e) {
      e.length && (this.connectivityFilters = e.filter((t) => t.facet.toLowerCase() !== "show all"));
    },
    resetConnectivityfilters: function(e) {
      e.length ? this.connectivityFilters = this.connectivityFilters.filter(
        (t) => e.some((n) => n.facetPropPath === t.facetPropPath && n.facet !== t.facet)
      ) : this.connectivityFilters = [];
    },
    getKnowledgeTooltip: async function(e) {
      const t = await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(this.mapImp, e);
      let n = await this.flatmapQueries.createTooltipData(this.mapImp, e);
      return (t && t[0] || e.feature.hyperlinks && e.feature.hyperlinks.length > 0) && (n.featuresAlert = e.alert, n.knowledgeSource = oa(this.mapImp), n.mapId = this.mapImp.mapMetadata.id, n.mapuuid = this.mapImp.mapMetadata.uuid), n.ready = !0, n;
    },
    /**
     * A hack to remove flatmap tooltips while popup is open
     */
    popUpCssHacks: function() {
      const e = document.querySelector(".flatmap-tooltip-popup"), t = document.querySelector(".maplibregl-popup-close-button");
      e && (e.style.display = "none"), t.style.display = "block", this.$refs.tooltip.$el.style.display = "flex", t.onclick = () => {
        this.$emit("connectivity-info-close"), e && (e.style.display = "block");
      };
    },
    /**
     * @public
     * Function to close tooltip.
     */
    closeTooltip: function() {
      this.$refs.tooltip && (this.$refs.tooltip.$el.style.display = "none"), document.querySelectorAll(".maplibregl-popup").forEach((e) => {
        e.style.display = "none";
      });
    },
    /**
     * @public
     * Function to show popup on map.
     * @arg {String} `featureId`,
     * @arg {Object} `node`,
     * @arg {Object} `options`
     */
    showPopup: function(e, t, n) {
      let o = n;
      this.mapImp && (o ? o.className || (o.className = "custom-popup") : o = { className: "custom-popup", positionAtLastClick: !0 }, this.mapImp.showPopup(e, t, o));
    },
    /**
     * @public
     * Function to show marker popup.
     * @arg {String} `featureId`,
     * @arg {Object} `node`,
     * @arg {Object} `options`
     */
    showMarkerPopup: function(e, t, n) {
      this.mapImp && this.mapImp.showMarkerPopup(e, t, n);
    },
    /**
     * @public
     * Function to close minimap.
     */
    closeMinimap: function() {
      let e = this.$refs.flatmapContainer.querySelector(
        ".maplibregl-ctrl-minimap"
      );
      this.minimapSmall ? (e.classList.add("enlarge"), e.classList.remove("shrink")) : (e.classList.add("shrink"), e.classList.remove("enlarge")), this.minimapSmall = !this.minimapSmall;
    },
    /**
     * Function to add resize button to minimap.
     */
    addResizeButtonToMinimap: function() {
      let e = this.$refs.flatmapContainer.querySelector(
        ".maplibregl-ctrl-minimap"
      );
      e && (this.$refs.minimapResize && this.$refs.minimapResize.$el.parentNode && this.$refs.minimapResize.$el.parentNode.removeChild(
        this.$refs.minimapResize.$el
      ), e.appendChild(this.$refs.minimapResize.$el), this.minimapResizeShow = !0);
    },
    /**
     * @public
     * Function to set help mode
     * by providing flag ``helpMode`` (true/false).
     * @arg {Boolean} `helpMode`
     */
    setHelpMode: function(e) {
      const t = this.hoverVisibilities.length, n = t - 1, o = this.hoverVisibilities[this.helpModeActiveIndex];
      if (o) {
        const a = o == null ? void 0 : o.refs, r = o == null ? void 0 : o.ref, s = this.$refs[a || r];
        if (s) {
          const { parentElement: l, nextElementSibling: u } = s.$el, c = (d) => d && (d.classList.contains("pathway-container") || d.classList.contains("pathway-location"));
          (c(l) || c(u)) && (this.requiresDrawer ? this.drawerOpen = !0 : this.helpModeActiveIndex += 1);
        } else
          this.helpModeActiveIndex += 1, this.setHelpMode(e);
      }
      const i = this.hoverVisibilities[this.helpModeActiveIndex];
      (i == null ? void 0 : i.ref) === "checkBoxPopover" && !this.showPathwayFilter && (this.helpModeActiveIndex += 1, this.setHelpMode(e)), e || (this.helpModeActiveIndex = this.helpModeInitialIndex), this.viewingMode !== "Annotation" && this.helpModeActiveIndex > 9 && (this.helpModeActiveIndex = n), e && this.helpModeActiveIndex >= n && this.$emit("help-mode-last-item", !0), e && !this.helpModeDialog ? (this.inHelp = !0, this.hoverVisibilities.forEach((a) => {
        a.value = !0;
      })) : e && this.helpModeDialog && t > this.helpModeActiveIndex ? this.helpModeActiveIndex > -1 ? (this.closeFlatmapHelpPopup(), setTimeout(() => {
        this.inHelp = !1, this.hoverVisibilities.forEach((a) => {
          a.value = !1;
        }), this.showTooltip(this.helpModeActiveIndex, 200);
      }, 300)) : this.helpModeActiveIndex === -1 && this.openFlatmapHelpPopup() : (this.inHelp = !1, this.hoverVisibilities.forEach((a) => {
        a.value = !1;
      }), this.closeFlatmapHelpPopup());
    },
    /**
     * @public
     * Function to show tooltip
     * by providing ``tooltipNumber``.
     * @arg {Number} `tooltipNumber`
     * @arg {Number} `timeout` _(default: `500`)_
     */
    showTooltip: function(e, t = 500) {
      this.inHelp || (clearTimeout(this.tooltipWait[e]), this.tooltipWait[e] = setTimeout(() => {
        this.hoverVisibilities[e].value = !0, this.$emit("shown-tooltip");
      }, t));
    },
    /**
     * @public
     * Function to hide tooltip
     * by providing ``tooltipNumber``.
     * @arg {Number} `tooltipNumber`
     * @arg {Number} `timeout` _(default: `500`)_
     */
    hideTooltip: function(e, t = 500) {
      this.inHelp || (clearTimeout(this.tooltipWait[e]), this.tooltipWait[e] = setTimeout(() => {
        this.hoverVisibilities[e].value = !1;
      }, t));
    },
    /**
     * @public
     * Function to display tooltip
     * by providing featureId (``feature``).
     * @arg {String} `feature`
     * @arg {String} `geometry` _(default: `undefined`)_
     */
    displayTooltip: function(e, t = void 0) {
      let n, o = { className: "flatmapvuer-popover" };
      if (t)
        n = e, o.annotationFeatureGeometry = t, this.annotationEntry.length && (o.annotationEvent = {
          type: this.annotationEntry[0].type,
          feature: this.annotationEntry[0].feature
        });
      else {
        const i = Array.isArray(e) ? e[0] : e;
        i && (n = this.mapImp.modelFeatureIds(i)[0]), this.activeDrawTool || (o.positionAtLastClick = !0);
      }
      this.connectivityInfoSidebar && this.tooltipEntry.length && this.viewingMode !== "Annotation" && this.checkConnectivityTooltipEntry(this.tooltipEntry) && this.$emit("connectivity-info-open", this.tooltipEntry), this.annotationSidebar && this.viewingMode === "Annotation" && this.$emit("annotation-open", { annotationEntry: this.annotationEntry, commitCallback: this.commitAnnotationEvent }), n && !this.disableUI && (this.viewingMode === "Annotation" && !this.annotationSidebar || this.viewingMode === "Exploration" && !this.connectivityInfoSidebar) && (this.tooltipDisplay = !0, this.$nextTick(() => {
        this.mapImp.showPopup(n, this.$refs.tooltip.$el, o), this.popUpCssHacks();
      }));
    },
    /**
     * Move the map to the left side
     * to the visible area of the feature IDs
     * because the sidebar is opened
     * @arg featureIds
     */
    moveMap: function(e, t = {}) {
      if (this.mapImp) {
        const { offsetX: n = 0, offsetY: o = 0, zoom: i = 4 } = t, a = this.mapImp.map, r = this.mapImp.bounds.toArray();
        this.mapImp.zoomToFeatures(e, { noZoomIn: !0 }), this.showPathwaysDrawer(!1), r != null && r.length && setTimeout(() => {
          a.fitBounds(r, {
            offset: [n, o],
            zoom: i,
            animate: !0
          });
        });
      }
    },
    /**
     * @public
     * Function to open Flatmap Help Popup.
     */
    openFlatmapHelpPopup: function() {
      if (this.mapImp) {
        let e = this.mapImp.modelFeatureIds("UBERON:0000948");
        e && e.length > 0 && (this.mapImp.showPopup(e[0], "Click for more information", {
          anchor: "top",
          className: "flatmap-popup-popper"
        }), this.$emit("shown-map-tooltip"));
      }
    },
    /**
     * @public
     * Function to close Flatmap Help Popup.
     */
    closeFlatmapHelpPopup: function() {
      this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach((e) => {
        e.click();
      });
    },
    /**
     * @public
     * Function to get annotation labels.
     */
    getLabels: function() {
      let e = [];
      if (this.mapImp) {
        let t = this.mapImp.annotations;
        for (let n of t.values())
          n.label && e.push(n.label);
        return Array.from(new Set(e));
      }
    },
    /**
     * Function to get and store the state (object) of the map in
     * the provided argument
     */
    getVisibilityState: function(e) {
      if (["alertSelection", "pathwaysSelection", "taxonSelection"].forEach((n) => {
        let o = this.$refs[n];
        o && (e[n] = o.getState());
      }), this.$refs.treeControls) {
        const n = this.$refs.treeControls.$refs.regionTree.getCheckedKeys();
        e.systemsSelection = n.filter((o) => !o.includes("."));
      }
    },
    /**
     * Function to set and restore the visibility state (object) of
     * the map with the provided argument
     */
    setVisibilityState: function(e) {
      ["alertSelection", "pathwaysSelection", "taxonSelection"].forEach((n) => {
        const o = e[n];
        if (o) {
          const i = this.$refs[n];
          i && i.setState(o);
        }
      }), "systemsSelection" in e && this.$refs.treeControls && (this.$refs.treeControls.$refs.regionTree.setCheckedKeys(e.systemsSelection), this.systems[0].children.forEach((n) => {
        this.mapImp.enableSystem(n.key, e.systemsSelection.includes(n.key));
      }));
    },
    /**
     * @public
     * Function to get the state (object) of the map.
     */
    getState: function() {
      if (this.mapImp) {
        let e = {
          entry: this.entry,
          viewport: this.mapImp.getState()
        };
        const t = this.mapImp.getIdentifier();
        return this.biologicalSex ? e.biologicalSex = this.biologicalSex : t && t.biologicalSex && (e.biologicalSex = t.biologicalSex), t && t.uuid && (e.uuid = t.uuid), e.viewingMode = this.viewingMode, e.searchTerm = this.searchTerm, e.flightPath3D = this.flightPath3DRadio, e.colour = this.colourRadio, e.outlines = this.outlinesRadio, e.background = this.currentBackground, this.offlineAnnotationEnabled && (e.offlineAnnotations = sessionStorage.getItem("anonymous-annotation")), this.getVisibilityState(e), e;
      }
    },
    /**
     * @public
     * Function to set state (object) for the map.
     * @arg {Object} `state`
     */
    setState: function(e) {
      e && (this.mapImp && e.entry && this.entry == e.entry && (!e.biologicalSex || e.biologicalSex === this.biologicalSex) ? this.restoreMapState(e) : this.createFlatmap(e), this.setStateRequired = !1);
    },
    /**
     * @public
     * Function to restore map's state
     * from the ``state`` provided.
     * @arg {Object} `state`
     */
    restoreMapState: function(e) {
      if (e) {
        if (e.viewport && this.mapImp.setState(e.viewport), e.offlineAnnotations && sessionStorage.setItem("anonymous-annotation", e.offlineAnnotations), e.viewingMode && this.changeViewingMode(e.viewingMode), "flightPath3D" in e && this.setFlightPath3D(e.flightPath3D), "colour" in e && this.setColour(e.colour), "outlines" in e && this.setOutlines(e.outlines), e.background && this.backgroundChangeCallback(e.background), e.searchTerm) {
          const t = e.searchTerm;
          this.searchAndShowResult(t, !0, !0);
        }
        this.setVisibilityState(e);
      }
    },
    /**
     * @public
     * Function to show flight path option
     * (3D option)
     * based on the map version (currently 1.6 and above).
     * @arg {String} `mapVersion`
     */
    setFlightPathInfo: function(e) {
      (e === 1.6 || e > 1.6) && (this.displayFlightPathOption = !0, this.setFlightPath3D(!1));
    },
    /**
     * @public
     * Function to create Flatmap
     * by providing the ``state``.
     * @arg {Object} `state`
     */
    createFlatmap: function(e) {
      if (!this.mapImp && !this.loading) {
        this.loading = !0, this.flatmapError = null;
        let t = { taxon: this.entry };
        this.uuid && (t.uuid = this.uuid), e ? (e.uuid ? t = { uuid: e.uuid } : e.entry && (t.taxon = e.entry), e.biologicalSex ? t.biologicalSex = e.biologicalSex : t.taxon === "NCBITaxon:9606" && (t.biologicalSex = "PATO:0000384")) : this.biologicalSex && (t.biologicalSex = this.biologicalSex), this.mapManagerRef.loadMap(
          t,
          this.eventCallback(),
          {
            //fullscreenControl: false,
            //annotatable: false,
            //debug: true,
            minZoom: this.minZoom,
            tooltips: this.tooltips,
            minimap: !1,
            container: this.$refs.display
            // tooltipDelay: 15, // new feature to delay tooltips showing
          }
        ).then((o) => {
          this.mapImp = o, this.serverURL = this.mapImp.makeServerUrl("").slice(0, -1);
          let i = this.mapImp.details.version;
          this.setFlightPathInfo(i);
          const a = this._stateToBeSet ? this._stateToBeSet : e;
          this.onFlatmapReady(a), this.$nextTick(() => this.restoreMapState(a));
        }).catch((o) => {
          var i, a;
          if (console.error("Flatmap loading error:", o), this.flatmapError = {}, o.message && o.message.indexOf("Unknown map") !== -1 ? (this.flatmapError.title = "Unknown Map!", this.flatmapError.messages = Object.keys(t).map((r) => `${r === "uuid" ? "UUID" : fo(r)}: ${t[r]}`)) : (this.flatmapError.title = "Error Loading Map!", this.flatmapError.messages = [
            o.message ? o.message : o.toString(),
            "Please try again later or contact support if the problem persists."
          ]), (a = (i = this.$parent) == null ? void 0 : i.$refs) != null && a.multiContainer) {
            const r = this.$parent;
            this.flatmapError.button = {
              text: "Load Default Map",
              callback: () => {
                const s = r.initial;
                r.setSpecies(s, void 0, 3);
              }
            };
          }
          this.loading = !1;
        });
      } else e && (this._stateToBeSet = {
        ...e
      }, this.mapImp && !this.loading && this.restoreMapState(this._stateToBeSet));
    },
    /**
     * @public
     * Function to compute path controls maximum height.
     */
    computePathControlsMaximumHeight() {
      const e = this.$refs.display;
      if (e) {
        const t = getComputedStyle(e), n = parseInt(t.paddingTop) + parseInt(t.paddingBottom), o = e.clientHeight - n;
        this.pathwaysMaxHeight = o - 170;
      }
    },
    /**
     * @public
     * Function to resize the map.
     */
    mapResize: function() {
      try {
        this.computePathControlsMaximumHeight(), this.mapImp && this.mapImp.resize();
      } catch {
        console.error("Map resize error");
      }
    },
    getFilterSources: function() {
      const e = ["kind", "taxons"];
      let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
      for (const a of this.mapImp.annotations.values())
        if (a.source) {
          "alert" in a ? t.add(a.source) : n.add(a.source);
          for (const [r, s] of Object.entries(a))
            if (e.includes(r)) {
              o.has(r) || o.set(r, /* @__PURE__ */ new Map());
              const l = o.get(r), u = (c) => {
                const d = c;
                l.has(d) || l.set(d, /* @__PURE__ */ new Set()), l.get(d).add(`${a.source}`);
              };
              Array.isArray(s) ? s.forEach(u) : u(s);
            }
        }
      let i = {
        alert: {
          with: [...t],
          without: [...n]
        }
      };
      for (const [a, r] of o.entries()) {
        i[a] = {};
        for (const [s, l] of r.entries())
          i[a][s] = [...l.values()];
      }
      return i;
    },
    getFilterOptions: async function(e, t) {
      const n = t || this.getFlatmapKnowledge(), o = this.pathways;
      return await lu(this.flatmapAPI, e, n, o);
    },
    /**
     * @public
     * This function is used for functions that need to run immediately after the flatmap is loaded.
     */
    onFlatmapReady: function(e) {
      var t;
      if (this.sensor = Re(new xb(this.$refs.display, this.mapResize)), ((t = this.mapImp.options) == null ? void 0 : t.style) === "functional" && (this.isFC = !0), this.mapImp.setBackgroundOpacity(1), this.backgroundChangeCallback(this.currentBackground), this.pathways = this.mapImp.pathTypes(), this.pathways = this.pathways.filter((n) => n.enabled && n.type !== "other"), this.processSystems(this.mapImp.getSystems()), this.processTaxon(this.mapImp.taxonIdentifiers, e ? e.taxonSelection : void 0), this.containsAlert = "alert" in this.mapImp.featureFilterRanges(), this.flatmapLegends = this.mapImp.flatmapLegend, this.loading = !1, this.computePathControlsMaximumHeight(), this.mapResize(), this.handleMapClick(), this.setInitMapState(), this.displayMinimap) {
        const n = { position: "top-right" };
        this.mapImp.createMinimap(n), this.addResizeButtonToMinimap();
      }
      this.$emit("ready", this);
    },
    /**
     * @public
     * Function to handle mouse click on map area
     * after the map is loaded.
     */
    handleMapClick: function() {
      const e = this.mapImp.map;
      e && e.on("click", (t) => {
        this.connectivityDataSource || this.$emit("connectivity-info-close"), this.connectivityDataSource = "";
      });
    },
    onContextLost: function() {
      this.lastViewport = Re(this.mapImp.getState()), this.flatmapError = {}, this.flatmapError.title = "GL context lost!", this.flatmapError.messages = ["GL context is lost due to too many concurrent GL contexts. Please try using the Restore Context button."], this.flatmapError.button = {
        text: "Restore Context",
        callback: () => {
          this.forceContextRestore();
        }
      };
    },
    onContextRestored: function() {
      if (this.mapImp) {
        this.handleMapClick(), this.setInitMapState();
        const e = this.getState();
        if (e && (e.viewport = this.lastViewport), this.restoreMapState(e), this.displayMinimap) {
          const t = { position: "top-right" };
          this.mapImp.createMinimap(t), this.addResizeButtonToMinimap();
        }
        this.filterToRestore && (this.mapImp.setVisibilityFilter(this.filterToRestore), this.filterToRestore = void 0), this.$emit("context-restored", this);
      }
    },
    /**
     * @public
     * Function to show or hide the pathways drawer
     * by providing ``flag`` (boolean) value.
     * @arg {Boolean} `flag`
     */
    showPathwaysDrawer: function(e) {
      this.drawerOpen = e;
    },
    /**
     * @public
     * Function to display features with annotation matching the provided term,
     * with the option to display the label/connectivity information using displayInfo flag.
     * @arg {String} `term`,
     * @arg {String} `displayInfo`
     * @arg {String} `mapclick` Similate the event as it is triggered by an user click
     */
    searchAndShowResult: function(e, t, n = !0) {
      var o;
      if (this.mapImp) {
        if (e === void 0 || e === "")
          return this.mapImp.clearSearchResults(), this.viewingMode === "Exploration" ? this.$emit("connectivity-info-close") : this.viewingMode === "Annotation" && this.manualAbortedOnClose(), this.searchTerm = "", !0;
        {
          const i = this.mapImp.search(e);
          if ((o = i == null ? void 0 : i.results) != null && o.length) {
            if (this.mapImp.showSearchResults(i), t) {
              let a;
              for (let r = 0; r < i.results.length; r++) {
                a = i.results[r].featureId;
                const s = this.mapImp.annotation(a);
                if (a && (s != null && s.label)) break;
              }
              if (a) {
                const r = this.mapImp.featureProperties(a), s = {
                  resource: [r.models],
                  feature: r,
                  label: r.label,
                  provenanceTaxonomy: r.taxons,
                  alert: r.alert
                };
                this.checkAndCreatePopups([s], n), this.mapImp.showPopup(a, fo(r.label), {
                  className: "custom-popup",
                  positionAtLastClick: !1,
                  preserveSelection: !0
                });
              }
            }
            return this.searchTerm = e, !0;
          } else this.mapImp.clearSearchResults();
        }
      }
      return !1;
    },
    /**
     * @public
     * Public method to highlight connected paths for neuron connection mode,
     * to highlight paths for other display maps on spit screen.
     * @arg {Array} `paths`
     */
    highlightConnectedPaths: function(e) {
      if (e.length) {
        const t = e.filter((o) => o in this.mapImp.pathways.paths), n = this.mapImp.modelFeatureIdList(t);
        this.mapImp.selectGeoJSONFeatures(n);
      }
    },
    /**
     * @public
     * Function to show search suggestions
     * from the ``term`` provided.
     * @arg {String} `term`
     */
    searchSuggestions: function(e) {
      return this.mapImp ? this.mapImp.search(e) : [];
    },
    onActionClick: function(e) {
      Ii.emit("onActionClick", e);
    },
    setConnectionType: function(e) {
      this.connectionType = e;
    }
  },
  props: {
    /**
     * The taxon identifier of the species represented by the map.
     */
    entry: {
      type: String,
      required: !0
    },
    /**
     * The unique ``uuid`` of the flatmap.
     * If given then this exact map will be loaded,
     * overriding ``taxon`` and ``biologicalSex``.
     */
    uuid: String,
    /**
     * The biological sex of the species represented by the map.
     * This is specified as metadata in the map's source file.
     */
    biologicalSex: {
      type: String,
      default: ""
    },
    /**
     * The minimum zoom level of the map.
     */
    minZoom: {
      type: Number,
      default: 1
    },
    /**
     * The option to add another feature label _(`FeatureSmallSymbolLayer`)_
     * when this `tooltips` is set to `false`.
     */
    tooltips: {
      type: Boolean,
      default: !0
    },
    /**
     * The option to show tooltips for help mode.
     */
    helpMode: {
      type: Boolean,
      default: !1
    },
    /**
     * The active item index of help mode.
     */
    helpModeActiveItem: {
      type: Number,
      default: 0
    },
    /**
     * The option to use helpModeDialog.
     * On default, `false`, clicking help will show all tooltips.
     * If `true`, clicking help will show the help-mode-dialog.
     */
    helpModeDialog: {
      type: Boolean,
      default: !1
    },
    /**
     * The last item of help mode.
     */
    helpModeLastItem: {
      type: Boolean,
      default: !1
    },
    /**
     * The initial index number for help mode tooltips.
     * Set negative (e.g. -2) if there are other tooltips outside of `hoverVisibilities`.
     */
    helpModeInitialIndex: {
      type: Number,
      default: 0
    },
    /**
     * This flag dictate whether a context will be allocatged
     * for this instance
     */
    render: {
      type: Boolean,
      default: !0
    },
    /**
     * The option to create map on component mounted.
     */
    renderAtMounted: {
      type: Boolean,
      default: !0
    },
    /**
     * The option to display minimap at the top-right corner of the map.
     */
    displayMinimap: {
      type: Boolean,
      default: !1
    },
    /**
     * The option to show warning. Example for legacy or beta maps.
     */
    displayWarning: {
      type: Boolean,
      default: !1
    },
    /**
     * Flag to determine rather open map UI should be
     * presented or not.
     */
    enableOpenMapUI: {
      type: Boolean,
      default: !1
    },
    /**
     * The data to show different map options.
     * Available at the bottom-left corner ("Open new map" tooltip).
     */
    openMapOptions: {
      type: Array,
      default: function() {
        return [
          {
            display: "Open AC Map",
            key: "AC"
          },
          {
            display: "Open FC Map",
            key: "FC"
          },
          {
            display: "Open 3D Human Map",
            key: "3D"
          }
        ];
      }
    },
    /**
     * The option to show star in legend area.
     */
    showStarInLegend: {
      type: Boolean,
      default: !1
    },
    /**
     * Flag to determine whether this is legacy map or not.
     * ``displayWarning`` should be shown for legacy map.
     */
    isLegacy: {
      type: Boolean,
      default: !1
    },
    /**
     * The option to show the latest changes.
     */
    displayLatestChanges: {
      type: Boolean,
      default: !1
    },
    /**
     * State containing state of the flatmap.
     */
    state: {
      type: Object,
      default: void 0
    },
    /**
     * Flatmap's Map Manager to use as single Map Manager
     * if the FlatmapVuer is loaded from MultiFlatmapVuer.
     */
    mapManager: {
      type: Object,
      default: void 0
    },
    /**
     * Specify the endpoint of the flatmap server.
     */
    flatmapAPI: {
      type: String,
      default: "https://mapcore-demo.org/current/flatmap/v3/"
    },
    /**
     * Specify the endpoint of the SPARC API.
     */
    sparcAPI: {
      type: String,
      default: "https://api.sparc.science/"
    },
    /**
     * Flag to disable UIs on Map
     */
    disableUI: {
      type: Boolean,
      default: !1
    },
    /**
     * The option to show connectivity information in sidebar
     */
    connectivityInfoSidebar: {
      type: Boolean,
      default: !1
    },
    /**
     * The option to show annotation in sidebar
     */
    annotationSidebar: {
      type: Boolean,
      default: !1
    },
    /**
     * The option to show local settings UI
     * (background colour, flight path, viewing mode, etc.)
     */
    showLocalSettings: {
      type: Boolean,
      default: !0
    },
    /**
     * The option to show open new map button
     */
    showOpenMapButton: {
      type: Boolean,
      default: !0
    },
    /**
     * The option to show pathway drawer
     */
    showPathwayFilter: {
      type: Boolean,
      default: !0
    },
    /**
     * Allow to add and display extra legends to drawer
     */
    externalLegends: {
      type: Array,
      default: function() {
        return [];
      }
    }
  },
  provide() {
    return {
      flatmapAPI: this.flatmapAPI,
      sparcAPI: this.sparcAPI,
      userApiKey: this.userToken
    };
  },
  data: function() {
    return {
      filterToRestore: void 0,
      flatmapError: null,
      sensor: null,
      mapManagerRef: void 0,
      flatmapQueries: void 0,
      annotationEntry: [],
      //tooltip display has to be set to false until it is rendered
      //for the first time, otherwise it may display an arrow at a
      //undesired location.
      tooltipDisplay: !1,
      serverURL: void 0,
      layers: [],
      pathways: [],
      initMapState: Re({}),
      sckanDisplay: [
        {
          label: "Display Path with SCKAN",
          key: "VALID"
        }
      ],
      systems: [],
      taxonConnectivity: [],
      pathwaysMaxHeight: 1e3,
      tooltipWait: Re([]),
      hoverVisibilities: [
        { value: !1, ref: "markerPopover" },
        // 0
        { value: !1, ref: "zoomInPopover" },
        // 1
        { value: !1, ref: "zoomOutPopover" },
        // 2
        { value: !1, ref: "zoomFitPopover" },
        // 3
        { value: !1, ref: "openMapPopover" },
        // 4
        { value: !1, ref: "settingsPopover" },
        // 5
        { value: !1, ref: "checkBoxPopover" },
        // 6
        { value: !1, ref: "warningPopover" },
        // 7
        { value: !1, ref: "whatsNewPopover" },
        // 8
        { value: !1, ref: "featuredMarkerPopover" },
        // 9
        { value: !1, refs: "toolbarPopover", ref: "editPopover" },
        // 10
        { value: !1, refs: "toolbarPopover", ref: "deletePopover" },
        // 11
        { value: !1, refs: "toolbarPopover", ref: "pointPopover" },
        // 12
        { value: !1, refs: "toolbarPopover", ref: "lineStringPopover" },
        // 13
        { value: !1, refs: "toolbarPopover", ref: "polygonPopover" },
        // 14
        { value: !1, refs: "toolbarPopover", ref: "connectionPopover" }
        // 15
      ],
      helpModeActiveIndex: this.helpModeInitialIndex,
      yellowstar: Mb,
      isFC: !1,
      inHelp: !1,
      currentBackground: "white",
      availableBackground: ["white", "lightskyblue", "black"],
      loading: !1,
      flatmapMarker: Sb,
      tooltipEntry: [],
      connectivityDataSource: "",
      connectivityTooltipVisible: !1,
      drawerOpen: !1,
      flightPath3DRadio: !1,
      displayFlightPathOption: !1,
      colourRadio: !0,
      outlinesRadio: !0,
      minimapResizeShow: !1,
      minimapSmall: !1,
      currentActive: "",
      selectedDrawnFeature: void 0,
      // Clicked drawn annotation
      currentHover: "",
      viewingMode: "Exploration",
      viewingModes: {
        Exploration: "Find relevant research and view detail of neural pathways by selecting a pathway to view its connections and data sources",
        "Neuron Connection": "Discover Neuron connections by selecting a neuron and viewing its associated network connections",
        Annotation: ["View feature annotations", "Add, comment on and view feature annotations"]
      },
      connectionType: "All",
      offlineAnnotationEnabled: !1,
      offlineAnnotations: [],
      annotationFrom: "Anyone",
      annotatedSource: ["Anyone", "Me", "Others"],
      openMapRef: void 0,
      backgroundIconRef: void 0,
      toolbarOptions: [
        "Edit",
        "Delete",
        "Point",
        "LineString",
        "Polygon",
        "Connection"
      ],
      annotator: void 0,
      authorisedUser: void 0,
      activeDrawMode: void 0,
      activeDrawTool: void 0,
      featureAnnotationSubmitted: !1,
      drawnCreatedEvent: {},
      previousEditEvent: {},
      previousDeletedEvent: {},
      connectionEntry: {},
      existDrawnFeatures: [],
      // Store all exist drawn features
      doubleClickedFeature: !1,
      containsAlert: !1,
      alertOptions: [
        {
          label: "Display Path With Alerts",
          key: "alert",
          enabled: !0
        },
        {
          label: "Display Path Without Alerts",
          key: "withoutAlert",
          enabled: !0
        }
      ],
      mapFilters: Re({
        alert: {
          with: !0,
          without: !0
        }
      }),
      searchTerm: "",
      taxonLeaveDelay: void 0,
      connectivityFilters: [],
      flatmapLegends: [],
      lastViewport: void 0
    };
  },
  computed: {
    ...du(Pb, ["userToken"]),
    isValidDrawnCreated: function() {
      return Object.keys(this.drawnCreatedEvent).length > 0;
    },
    requiresDrawer: function() {
      var e, t, n, o;
      return this.loading ? (this.drawerOpen = !1, !1) : ((e = this.systems) == null ? void 0 : e.length) > 0 || this.containsAlert && this.alertOptions || ((t = this.pathways) == null ? void 0 : t.length) > 0 || ((n = this.taxonConnectivity) == null ? void 0 : n.length) > 0 || ((o = this.legendEntry) == null ? void 0 : o.length) > 0 ? (this.drawerOpen = !0, !0) : (this.drawerOpen = !1, !1);
    },
    modeDescription: function() {
      let e = this.viewingModes[this.viewingMode];
      return this.viewingMode === "Annotation" ? this.authorisedUser ? e[1] : e[0] : e;
    },
    legendEntry: function() {
      return [...this.flatmapLegends, ...this.externalLegends];
    },
    showDatasetMarkerTooltip: function() {
      return this.hoverVisibilities[9].value;
    }
  },
  watch: {
    entry: function() {
      this.state || this.createFlatmap();
    },
    helpMode: function(e, t) {
      e !== t && this.setHelpMode(e);
    },
    helpModeActiveItem: function() {
      this.helpMode && (this.helpModeActiveIndex += 1, this.setHelpMode(this.helpMode));
    },
    render: function(e) {
      e && this.mapImp && this.mapImp.contextLost && !this.loading && this.$nextTick(() => {
        this.forceContextRestore();
      });
    },
    state: {
      handler: function(e, t) {
        e !== t && (this.mapManagerRef ? this.setState(e) : this.setStateRequired = !0);
      },
      immediate: !0,
      deep: !0
    },
    viewingMode: function(e) {
      this.clearAnnotationFeature(), e === "Annotation" && (this.loading = !0, this.annotator.authenticate(this.userToken).then((t) => {
        t.name && t.email && t.canUpdate ? (this.authorisedUser = t, this.offlineAnnotationEnabled = !1) : (this.authorisedUser = void 0, this.offlineAnnotationEnabled = !0), this.emitOfflineAnnotationUpdate(), this.setFeatureAnnotated(), this.addAnnotationFeature(), this.loading = !1;
      }));
    },
    disableUI: function(e) {
      e && this.closeTooltip();
    },
    activeDrawTool: function(e) {
      let t = [], n = { x: null, y: null };
      const o = this.$el.querySelector(".maplibregl-canvas"), i = () => {
        o.removeEventListener("keydown", a), o.removeEventListener("click", r);
      }, a = (s) => {
        if (!["Escape", "Enter"].includes(s.key)) return;
        const l = e === "Point" && t.length === 1 || e === "LineString" && t.length >= 2 || e === "Polygon" && t.length >= 3;
        (s.key === "Escape" || s.key === "Enter" && !l) && (this.activeDrawTool = void 0), i();
      }, r = (s) => {
        const l = o.getBoundingClientRect(), u = s.clientX - l.left, c = s.clientY - l.top;
        if (Math.sqrt((u - n.x) ** 2 + (c - n.y) ** 2) < 8) {
          this.isValidDrawnCreated || (this.activeDrawTool = void 0), i();
          return;
        }
        n = { x: u, y: c }, t.push(n);
      };
      e && (i(), o.addEventListener("keydown", a), o.addEventListener("click", r));
    }
  },
  created: function() {
    this.mapManager ? this.mapManagerRef = this.mapManager : (this.mapManagerRef = Re(new Vr.MapViewer(this.flatmapAPI, { container: void 0 })), this.$emit("mapmanager-loaded", this.mapManagerRef));
  },
  mounted: function() {
    this.openMapRef = vo(this.$refs.openMapRef), this.backgroundIconRef = vo(this.$refs.backgroundIconRef), this.tooltipWait.length = this.hoverVisibilities.length, this.flatmapQueries = Re(new Cb()), this.flatmapQueries.initialise(this.flatmapAPI), this.state ? this.setStateRequired && this.setState(this.state) : this.renderAtMounted && this.createFlatmap(), gl();
  }
}, Db = {
  class: "flatmap-container",
  ref: "flatmapContainer",
  "element-loading-text": "Loading...",
  "element-loading-background": "rgba(0, 0, 0, 0.3)"
}, Nb = { style: { height: "100%", width: "100%", position: "relative", "overflow-y": "none" } }, Bb = {
  style: { height: "100%", width: "100%" },
  ref: "display",
  class: "flatmap-display"
}, Vb = { class: "beta-popovers" }, zb = {
  key: 2,
  class: "warning-text"
}, Hb = { class: "bottom-right-control" }, Kb = ["innerHTML"], jb = { style: { "margin-bottom": "2px" } }, Ub = {
  key: 0,
  class: "viewing-mode-title"
}, Wb = ["onClick"], qb = ["onClick"];
function Gb(e, t, n, o, i, a) {
  const r = Fe("map-svg-sprite-color"), s = na, l = Pr, u = We, c = qn, d = ki, f = Fe("DrawToolbar"), m = Fe("map-svg-icon"), p = lb, h = Fe("tree-controls"), g = ml, y = Lr, C = Qi, O = Un, T = Wn, I = ea, k = zo, A = ll, $ = ul, N = Fe("Tooltip"), j = ta, B = Ci;
  return ie((w(), L("div", Db, [
    P(r),
    R("div", Nb, [
      R("div", Bb, null, 512),
      e.flatmapError ? (w(), z(s, {
        key: 0,
        flatmapError: e.flatmapError
      }, null, 8, ["flatmapError"])) : V("", !0),
      ie(R("div", Vb, [
        R("div", null, [
          n.displayWarning || n.isLegacy ? (w(), z(c, {
            key: 0,
            placement: "right",
            "popper-class": "warning-popper flatmap-popper",
            teleported: !1,
            visible: e.hoverVisibilities[7].value,
            ref: "warningPopover"
          }, {
            reference: E(() => [
              R("div", {
                class: "warning-icon",
                onMouseover: t[7] || (t[7] = (M) => a.showTooltip(7)),
                onMouseout: t[8] || (t[8] = (M) => a.hideTooltip(7))
              }, [
                n.displayWarning || n.isLegacy ? (w(), z(u, { key: 0 }, {
                  default: E(() => [
                    P(l)
                  ]),
                  _: 1
                })) : V("", !0),
                n.isLegacy ? (w(), L(fe, { key: 1 }, [
                  t[31] || (t[31] = R("span", { class: "warning-text" }, "Legacy Map", -1)),
                  R("div", {
                    class: "latest-map-text",
                    onClick: t[6] || (t[6] = (...M) => a.viewLatestMap && a.viewLatestMap(...M))
                  }, " Click here for the latest map ")
                ], 64)) : n.displayWarning ? (w(), L("span", zb, "Beta")) : V("", !0)
              ], 32)
            ]),
            default: E(() => [
              n.isLegacy ? (w(), L("p", {
                key: 0,
                onMouseover: t[0] || (t[0] = (M) => a.showTooltip(7)),
                onMouseout: t[1] || (t[1] = (M) => a.hideTooltip(7))
              }, " This is a legacy map, you may view the latest map instead. ", 32)) : e.isFC ? (w(), L("p", {
                key: 1,
                onMouseover: t[2] || (t[2] = (M) => a.showTooltip(7)),
                onMouseout: t[3] || (t[3] = (M) => a.hideTooltip(7))
              }, t[29] || (t[29] = [
                Z(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),
                R("a", {
                  href: "https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",
                  target: "_blank"
                }, " ApiNATOMY ", -1),
                Z(" models available in "),
                R("a", {
                  href: "https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",
                  target: "_blank"
                }, " SCKAN ", -1),
                Z(". ")
              ]), 32)) : (w(), L("p", {
                key: 2,
                onMouseover: t[4] || (t[4] = (M) => a.showTooltip(7)),
                onMouseout: t[5] || (t[5] = (M) => a.hideTooltip(7))
              }, t[30] || (t[30] = [
                Z(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),
                R("a", {
                  href: "https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",
                  target: "_blank"
                }, " ApiNATOMY ", -1),
                Z(" models available in "),
                R("a", {
                  href: "https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",
                  target: "_blank"
                }, " SCKAN ", -1),
                Z(". New connectivity and species specificity will be added as the SPARC program progresses. ")
              ]), 32))
            ]),
            _: 1
          }, 8, ["visible"])) : V("", !0)
        ]),
        n.displayLatestChanges ? (w(), z(c, {
          key: 0,
          placement: "right",
          teleported: !1,
          trigger: "manual",
          "popper-class": "warning-popper flatmap-popper",
          visible: e.hoverVisibilities[8].value,
          ref: "whatsNewPopover"
        }, {
          reference: E(() => [
            n.displayLatestChanges ? (w(), L("div", {
              key: 0,
              class: "latest-changesicon",
              onMouseover: t[9] || (t[9] = (M) => a.showTooltip(8)),
              onMouseout: t[10] || (t[10] = (M) => a.hideTooltip(8))
            }, [
              P(u, null, {
                default: E(() => [
                  P(l)
                ]),
                _: 1
              }),
              t[32] || (t[32] = R("span", { class: "warning-text" }, "What's new?", -1))
            ], 32)) : V("", !0)
          ]),
          default: E(() => t[33] || (t[33] = [
            R("b", null, "Connectivity References", -1),
            R("p", null, " Connectivity references have been improved and available in various formats. ", -1),
            R("b", null, "Improved state storing", -1),
            R("p", null, " Current selection and visibility filters are now stored when creating a permalink. ", -1)
          ])),
          _: 1
        }, 8, ["visible"])) : V("", !0)
      ], 512), [
        [Ee, !n.disableUI]
      ]),
      ie(P(u, {
        class: _(["minimap-resize", { enlarge: e.minimapSmall, shrink: !e.minimapSmall }]),
        ref: "minimapResize",
        onClick: a.closeMinimap
      }, {
        default: E(() => [
          P(d)
        ]),
        _: 1
      }, 8, ["class", "onClick"]), [
        [Ee, e.minimapResizeShow]
      ]),
      e.viewingMode === "Annotation" && (e.authorisedUser || e.offlineAnnotationEnabled) && !n.disableUI ? (w(), z(f, {
        key: 1,
        mapCanvas: {
          containerHTML: this.$el,
          class: ".maplibregl-canvas"
        },
        toolbarOptions: e.toolbarOptions,
        activeDrawTool: e.activeDrawTool,
        activeDrawMode: e.activeDrawMode,
        newlyDrawnEntry: e.drawnCreatedEvent,
        connectionEntry: e.connectionEntry,
        hoverVisibilities: e.hoverVisibilities,
        onClickToolbar: a.toolbarEvent,
        onFeatureTooltip: a.connectedFeatureTooltip,
        onConfirmDrawn: a.confirmDrawnFeature,
        onCancelDrawn: a.cancelDrawnFeature,
        onShowTooltip: a.showTooltip,
        onHideTooltip: a.hideTooltip,
        ref: "toolbarPopover"
      }, null, 8, ["mapCanvas", "toolbarOptions", "activeDrawTool", "activeDrawMode", "newlyDrawnEntry", "connectionEntry", "hoverVisibilities", "onClickToolbar", "onFeatureTooltip", "onConfirmDrawn", "onCancelDrawn", "onShowTooltip", "onHideTooltip"])) : V("", !0),
      ie(R("div", Hb, [
        P(c, {
          content: "Zoom in",
          placement: "left",
          teleported: !1,
          trigger: "manual",
          width: "70",
          "popper-class": "flatmap-popper",
          visible: e.hoverVisibilities[1].value,
          ref: "zoomInPopover"
        }, {
          reference: E(() => [
            R("div", {
              class: "icon-button-container",
              onClick: t[11] || (t[11] = (M) => a.zoomIn()),
              onMouseover: t[12] || (t[12] = (M) => a.showTooltip(1)),
              onMouseout: t[13] || (t[13] = (M) => a.hideTooltip(1))
            }, [
              P(m, {
                class: "icon-button zoomIn",
                icon: "zoomIn"
              })
            ], 32)
          ]),
          _: 1
        }, 8, ["visible"]),
        P(c, {
          content: "Zoom out",
          placement: "top-end",
          teleported: !1,
          trigger: "manual",
          width: "70",
          "popper-class": "flatmap-popper",
          visible: e.hoverVisibilities[2].value,
          ref: "zoomOutPopover"
        }, {
          reference: E(() => [
            R("div", {
              class: "icon-button-container",
              onClick: t[14] || (t[14] = (M) => a.zoomOut()),
              onMouseover: t[15] || (t[15] = (M) => a.showTooltip(2)),
              onMouseout: t[16] || (t[16] = (M) => a.hideTooltip(2))
            }, [
              P(m, {
                class: "icon-button zoomOut",
                icon: "zoomOut"
              })
            ], 32)
          ]),
          _: 1
        }, 8, ["visible"]),
        P(c, {
          content: "Reset",
          placement: "top",
          teleported: !1,
          trigger: "manual",
          width: "70",
          "popper-class": "flatmap-popper",
          visible: e.hoverVisibilities[3].value,
          ref: "zoomFitPopover"
        }, {
          reference: E(() => [
            R("div", {
              class: "icon-button-container",
              onClick: t[17] || (t[17] = (M) => a.resetView()),
              onMouseover: t[18] || (t[18] = (M) => a.showTooltip(3)),
              onMouseout: t[19] || (t[19] = (M) => a.hideTooltip(3))
            }, [
              P(m, {
                class: "icon-button fitWindow",
                icon: "fitWindow"
              })
            ], 32)
          ]),
          default: E(() => [
            t[34] || (t[34] = R("div", null, [
              Z(" Fit to "),
              R("br"),
              Z(" window ")
            ], -1))
          ]),
          _: 1
        }, 8, ["visible"])
      ], 512), [
        [Ee, !n.disableUI]
      ]),
      P(c, {
        content: "Change pathway visibility",
        placement: "right",
        teleported: !1,
        trigger: "manual",
        offset: -18,
        "popper-class": "flatmap-popper",
        visible: e.hoverVisibilities[6].value,
        ref: "checkBoxPopover"
      }, {
        reference: E(() => [
          ie(R("div", {
            class: _(["pathway-location", { open: e.drawerOpen, close: !e.drawerOpen }])
          }, [
            ie((w(), L("div", {
              class: _(["pathway-container", { open: e.drawerOpen, close: !e.drawerOpen }]),
              style: re({ "max-height": e.pathwaysMaxHeight + "px" })
            }, [
              a.legendEntry.length ? (w(), z(p, {
                key: 0,
                identifierKey: "prompt",
                colourKey: "colour",
                styleKey: "style",
                legends: a.legendEntry,
                showStarInLegend: !0,
                showDatasetMarkerTooltip: a.showDatasetMarkerTooltip,
                ref: "featuredMarkerPopover",
                class: "svg-legends-container"
              }, null, 8, ["legends", "showDatasetMarkerTooltip"])) : V("", !0),
              P(c, {
                content: "Find these markers for data. The number inside the markers is the number of datasets available for each marker.",
                placement: "right",
                teleported: !1,
                width: "200",
                trigger: "manual",
                "popper-class": "flatmap-popper flatmap-marker-popper",
                visible: e.hoverVisibilities[0].value,
                ref: "markerPopover"
              }, {
                reference: E(() => [
                  ie(R("div", {
                    class: "flatmap-marker-help",
                    innerHTML: e.flatmapMarker
                  }, null, 8, Kb), [
                    [Ee, e.hoverVisibilities[0].value],
                    [j, void 0, "markerPopover"]
                  ])
                ]),
                _: 1
              }, 8, ["visible"]),
              e.isFC && e.systems && e.systems.length > 0 ? (w(), z(h, {
                key: 1,
                class: "treeControls",
                mapType: "flatmap",
                title: "Systems",
                treeData: e.systems,
                active: e.currentActive,
                hover: e.currentHover,
                onCheckChanged: a.systemSelected,
                onCheckAll: a.checkAllSystems,
                onChangeActive: a.ftuSelected,
                ref: "treeControls"
              }, null, 8, ["treeData", "active", "hover", "onCheckChanged", "onCheckAll", "onChangeActive"])) : V("", !0),
              e.containsAlert && e.alertOptions && n.showPathwayFilter ? (w(), z(g, {
                title: "Alert",
                labelKey: "label",
                identifierKey: "key",
                selections: e.alertOptions,
                onChanged: a.alertSelected,
                onCheckboxMouseEnter: a.alertMouseEnterEmitted,
                onSelectionsDataChanged: a.onSelectionsDataChanged,
                onCheckAll: a.checkAllAlerts,
                ref: "alertSelection",
                key: "alertSelection"
              }, null, 8, ["selections", "onChanged", "onCheckboxMouseEnter", "onSelectionsDataChanged", "onCheckAll"])) : V("", !0),
              e.pathways && e.pathways.length > 0 ? (w(), z(g, {
                title: "Pathways",
                labelKey: "label",
                identifierKey: "type",
                colourStyle: "line",
                selections: e.pathways,
                showAsLegend: !n.showPathwayFilter,
                onChanged: a.pathwaysSelected,
                onSelectionsDataChanged: a.onSelectionsDataChanged,
                onCheckAll: a.checkAllPathways,
                ref: "pathwaysSelection",
                key: "pathwaysSelection"
              }, null, 8, ["selections", "showAsLegend", "onChanged", "onSelectionsDataChanged", "onCheckAll"])) : V("", !0),
              e.taxonConnectivity && e.taxonConnectivity.length > 0 && n.showPathwayFilter ? (w(), z(g, {
                title: "Studied in",
                labelKey: "label",
                identifierKey: "taxon",
                helpMessage: "Evidence exists that this set of neuron populations have been studied in the given species.",
                selections: e.taxonConnectivity,
                onChanged: a.taxonsSelected,
                onCheckboxMouseEnter: a.taxonMouseEnterEmitted,
                onSelectionsDataChanged: a.onSelectionsDataChanged,
                onCheckAll: a.checkAllTaxons,
                ref: "taxonSelection",
                key: "taxonSelection"
              }, null, 8, ["selections", "onChanged", "onCheckboxMouseEnter", "onSelectionsDataChanged", "onCheckAll"])) : V("", !0)
            ], 6)), [
              [j, void 0, "checkBoxPopover"]
            ]),
            R("div", {
              onClick: t[20] || (t[20] = (...M) => a.toggleDrawer && a.toggleDrawer(...M)),
              class: _(["drawer-button", { open: e.drawerOpen, close: !e.drawerOpen }])
            }, [
              P(u, null, {
                default: E(() => [
                  P(y)
                ]),
                _: 1
              })
            ], 2)
          ], 2), [
            [Ee, !n.disableUI && a.requiresDrawer]
          ])
        ]),
        _: 1
      }, 8, ["visible"]),
      e.openMapRef ? (w(), z(c, {
        key: 2,
        ref: "open-map-popover",
        "virtual-ref": e.openMapRef,
        placement: "top-start",
        width: "136",
        teleported: !1,
        trigger: "click",
        "popper-class": "open-map-popper non-selectable",
        "virtual-triggering": ""
      }, {
        default: E(() => [
          (w(!0), L(fe, null, Ke(n.openMapOptions, (M) => (w(), z(O, {
            key: M.key
          }, {
            default: E(() => [
              P(C, {
                type: "primary",
                plain: "",
                onClick: (W) => e.$emit("open-map", M.key)
              }, {
                default: E(() => [
                  Z(ee(M.display), 1)
                ]),
                _: 2
              }, 1032, ["onClick"])
            ]),
            _: 2
          }, 1024))), 128))
        ]),
        _: 1
      }, 8, ["virtual-ref"])) : V("", !0),
      P(c, {
        ref: "backgroundPopover",
        "virtual-ref": e.backgroundIconRef,
        placement: "top-start",
        width: "320",
        teleported: !1,
        trigger: "click",
        "popper-class": "background-popper h-auto",
        "virtual-triggering": ""
      }, {
        default: E(() => [
          R("div", null, [
            P(O, { class: "backgroundText" }, {
              default: E(() => t[35] || (t[35] = [
                Z("Viewing Mode")
              ])),
              _: 1
            }),
            P(O, { class: "backgroundControl" }, {
              default: E(() => [
                R("div", jb, [
                  (w(!0), L(fe, null, Ke(e.viewingModes, (M, W, de) => (w(), L(fe, { key: W }, [
                    W === e.viewingMode ? (w(), L("span", Ub, [
                      R("b", null, ee(W), 1)
                    ])) : (w(), L("span", {
                      key: 1,
                      class: "viewing-mode-unselected",
                      onClick: (Y) => a.changeViewingMode(W)
                    }, ee(W), 9, Wb))
                  ], 64))), 128))
                ]),
                P(O, { class: "viewing-mode-description" }, {
                  default: E(() => [
                    Z(ee(a.modeDescription), 1)
                  ]),
                  _: 1
                }),
                e.viewingMode === "Annotation" && e.offlineAnnotationEnabled ? (w(), z(O, {
                  key: 0,
                  class: "viewing-mode-description"
                }, {
                  default: E(() => t[36] || (t[36] = [
                    Z(" (Anonymous annotate) ")
                  ])),
                  _: 1
                })) : V("", !0)
              ]),
              _: 1
            }),
            e.viewingMode === "Annotation" && e.authorisedUser ? (w(), L(fe, { key: 0 }, [
              P(O, { class: "backgroundText" }, {
                default: E(() => t[37] || (t[37] = [
                  Z("Annotations From")
                ])),
                _: 1
              }),
              P(O, { class: "backgroundControl" }, {
                default: E(() => [
                  P(k, {
                    teleported: !1,
                    modelValue: e.annotationFrom,
                    "onUpdate:modelValue": t[21] || (t[21] = (M) => e.annotationFrom = M),
                    placeholder: "Select",
                    class: "select-box",
                    "popper-class": "flatmap_dropdown",
                    onChange: a.setAnnotationFrom
                  }, {
                    default: E(() => [
                      (w(!0), L(fe, null, Ke(e.annotatedSource, (M) => (w(), z(I, {
                        key: M,
                        label: M,
                        value: M
                      }, {
                        default: E(() => [
                          P(O, null, {
                            default: E(() => [
                              P(T, { span: 12 }, {
                                default: E(() => [
                                  Z(ee(M), 1)
                                ]),
                                _: 2
                              }, 1024)
                            ]),
                            _: 2
                          }, 1024)
                        ]),
                        _: 2
                      }, 1032, ["label", "value"]))), 128))
                    ]),
                    _: 1
                  }, 8, ["modelValue", "onChange"])
                ]),
                _: 1
              })
            ], 64)) : V("", !0),
            e.displayFlightPathOption ? (w(), z(O, {
              key: 1,
              class: "backgroundSpacer"
            })) : V("", !0),
            e.displayFlightPathOption ? (w(), z(O, {
              key: 2,
              class: "backgroundText"
            }, {
              default: E(() => t[38] || (t[38] = [
                Z("Flight path display")
              ])),
              _: 1
            })) : V("", !0),
            e.displayFlightPathOption ? (w(), z(O, {
              key: 3,
              class: "backgroundControl"
            }, {
              default: E(() => [
                P($, {
                  modelValue: e.flightPath3DRadio,
                  "onUpdate:modelValue": t[22] || (t[22] = (M) => e.flightPath3DRadio = M),
                  class: "flatmap-radio",
                  onChange: a.setFlightPath3D
                }, {
                  default: E(() => [
                    P(A, { value: !1 }, {
                      default: E(() => t[39] || (t[39] = [
                        Z("2D")
                      ])),
                      _: 1
                    }),
                    P(A, { value: !0 }, {
                      default: E(() => t[40] || (t[40] = [
                        Z("3D")
                      ])),
                      _: 1
                    })
                  ]),
                  _: 1
                }, 8, ["modelValue", "onChange"])
              ]),
              _: 1
            })) : V("", !0),
            P(O, { class: "backgroundSpacer" }),
            P(O, { class: "backgroundText" }, {
              default: E(() => t[41] || (t[41] = [
                Z("Organs display")
              ])),
              _: 1
            }),
            P(O, { class: "backgroundControl" }, {
              default: E(() => [
                P($, {
                  modelValue: e.colourRadio,
                  "onUpdate:modelValue": t[23] || (t[23] = (M) => e.colourRadio = M),
                  class: "flatmap-radio",
                  onChange: a.setColour
                }, {
                  default: E(() => [
                    P(A, { value: !0 }, {
                      default: E(() => t[42] || (t[42] = [
                        Z("Colour")
                      ])),
                      _: 1
                    }),
                    P(A, { value: !1 }, {
                      default: E(() => t[43] || (t[43] = [
                        Z("Greyscale")
                      ])),
                      _: 1
                    })
                  ]),
                  _: 1
                }, 8, ["modelValue", "onChange"])
              ]),
              _: 1
            }),
            P(O, { class: "backgroundSpacer" }),
            P(O, { class: "backgroundText" }, {
              default: E(() => t[44] || (t[44] = [
                Z("Outlines display")
              ])),
              _: 1
            }),
            P(O, { class: "backgroundControl" }, {
              default: E(() => [
                P($, {
                  modelValue: e.outlinesRadio,
                  "onUpdate:modelValue": t[24] || (t[24] = (M) => e.outlinesRadio = M),
                  class: "flatmap-radio",
                  onChange: a.setOutlines
                }, {
                  default: E(() => [
                    P(A, { value: !0 }, {
                      default: E(() => t[45] || (t[45] = [
                        Z("Show")
                      ])),
                      _: 1
                    }),
                    P(A, { value: !1 }, {
                      default: E(() => t[46] || (t[46] = [
                        Z("Hide")
                      ])),
                      _: 1
                    })
                  ]),
                  _: 1
                }, 8, ["modelValue", "onChange"])
              ]),
              _: 1
            }),
            P(O, { class: "backgroundSpacer" }),
            P(O, { class: "backgroundText" }, {
              default: E(() => t[47] || (t[47] = [
                Z("Change background")
              ])),
              _: 1
            }),
            P(O, { class: "backgroundControl" }, {
              default: E(() => [
                (w(!0), L(fe, null, Ke(e.availableBackground, (M) => (w(), L("div", {
                  key: M,
                  class: _([
                    "backgroundChoice",
                    M,
                    M == e.currentBackground ? "active" : ""
                  ]),
                  onClick: (W) => a.backgroundChangeCallback(M)
                }, null, 10, qb))), 128))
              ]),
              _: 1
            })
          ])
        ]),
        _: 1
      }, 8, ["virtual-ref"]),
      ie(R("div", {
        class: _(["settings-group", { open: e.drawerOpen, close: !e.drawerOpen }])
      }, [
        n.showOpenMapButton ? (w(), z(O, { key: 0 }, {
          default: E(() => [
            P(c, {
              visible: e.hoverVisibilities[4].value,
              content: "Open new map",
              placement: "right",
              teleported: !1,
              "popper-class": "flatmap-popper",
              ref: "openMapPopover"
            }, {
              reference: E(() => [
                n.enableOpenMapUI && n.openMapOptions.length > 0 ? (w(), L("div", {
                  key: 0,
                  ref: "openMapRef",
                  class: "icon-button-container",
                  onMouseover: t[25] || (t[25] = (M) => a.showTooltip(4)),
                  onMouseout: t[26] || (t[26] = (M) => a.hideTooltip(4))
                }, [
                  P(m, {
                    icon: "openMap",
                    class: "icon-button open-map-button"
                  })
                ], 544)) : V("", !0)
              ]),
              _: 1
            }, 8, ["visible"])
          ]),
          _: 1
        })) : V("", !0),
        n.showLocalSettings ? (w(), z(O, { key: 1 }, {
          default: E(() => [
            P(c, {
              content: "Change settings",
              placement: "right",
              visible: e.hoverVisibilities[5].value,
              teleported: !1,
              trigger: "manual",
              "popper-class": "flatmap-popper",
              ref: "settingsPopover"
            }, {
              reference: E(() => [
                R("div", {
                  ref: "backgroundIconRef",
                  class: "icon-button-container",
                  onMouseover: t[27] || (t[27] = (M) => a.showTooltip(5)),
                  onMouseout: t[28] || (t[28] = (M) => a.hideTooltip(5))
                }, [
                  P(m, {
                    icon: "changeBckgd",
                    class: "icon-button"
                  })
                ], 544)
              ]),
              _: 1
            }, 8, ["visible"])
          ]),
          _: 1
        })) : V("", !0)
      ], 2), [
        [Ee, !n.disableUI]
      ]),
      e.tooltipDisplay ? (w(), z(N, {
        key: 3,
        ref: "tooltip",
        class: "tooltip",
        annotationEntry: e.annotationEntry,
        tooltipEntry: e.tooltipEntry,
        annotationDisplay: e.viewingMode === "Annotation",
        onAnnotation: a.commitAnnotationEvent,
        onOnActionClick: a.onActionClick
      }, null, 8, ["annotationEntry", "tooltipEntry", "annotationDisplay", "onAnnotation", "onOnActionClick"])) : V("", !0)
    ])
  ])), [
    [B, e.loading]
  ]);
}
const wl = /* @__PURE__ */ Kt($b, [["render", Gb], ["__scopeId", "data-v-b1c18844"]]), Or = {
  "NCBITaxon:10114": "01fedbf9-d783-509c-a10c-827941ab13da",
  "NCBITaxon:9823": "a336ac04-24db-561f-a25f-1c994fe17410",
  "NCBITaxon:9606": "42ed6323-f645-5fbe-bada-9581819cf689",
  "NCBITaxon:10090": "25285fab-48a0-5620-a6a0-f9a0374837d5",
  "NCBITaxon:9685": "73060497-46a6-52bf-b975-cac511c127cb"
}, Jb = {
  name: "MultiFlatmapVuer",
  components: {
    Col: Wn,
    Row: Un,
    Option: ea,
    Select: zo,
    Popover: qn,
    FlatmapVuer: wl
  },
  created: function() {
    this.loadMapManager();
  },
  mounted: function() {
    this.initialise(), Ii.on("onActionClick", (e) => {
      this.resourceSelected(e);
    }), Ii.on("open-pubmed-url", (e) => {
      this.$emit("open-pubmed-url", e);
    });
  },
  methods: {
    /**
     * @public
     * Function to initialise the component when mounted.
     * It returns a promise.
     */
    initialise: function() {
      return this.multiflatmapError = null, new Promise((e) => {
        if (this.requireInitialisation) {
          this.requireInitialisation = !1;
          const t = new AbortController(), n = t.signal, o = setTimeout(() => t.abort(), 5e3);
          fetch(this.flatmapAPI, { signal: n }).then((i) => {
            if (!i.ok) {
              if (i.status === 404)
                return this.multiflatmapError = {}, this.multiflatmapError.title = "MultiFlatmap Error!", this.multiflatmapError.messages = [
                  `Sorry, the component could not be loaded because the specified
                    flatmap API endpoint is incorrect. Please check the endpoint URL
                    or contact support if the problem persists.`
                ], this.initialised = !0, e(), this.resolveList.forEach((a) => a()), Promise.reject({ handled: !0 });
              throw new Error(`HTTP ${i.status}: ${i.statusText}`);
            }
            return i.json();
          }).then((i) => {
            if (i && i.status_code === 404) {
              console.error("Flatmap API endpoint is incorrect", i), this.multiflatmapError = {}, this.multiflatmapError.title = "MultiFlatmap Error!", this.multiflatmapError.messages = [
                `Sorry, the component could not be loaded because the specified
                  flatmap API endpoint is incorrect. Please check the endpoint URL
                  or contact support if the problem persists.`
              ], this.initialised = !0, e(), this.resolveList.forEach((r) => r());
              return;
            }
            Object.keys(this.availableSpecies).forEach((r) => {
              const s = this.availableSpecies[r].uuid;
              if (s && i.length && i.map((l) => l.uuid).indexOf(s) > 0)
                this.speciesList[r] = this.availableSpecies[r];
              else
                for (let l = 0; l < i.length; l++)
                  if (this.availableSpecies[r].taxo === i[l].taxon)
                    if (this.availableSpecies[r].biologicalSex) {
                      if (i[l].biologicalSex && i[l].biologicalSex === this.availableSpecies[r].biologicalSex) {
                        this.speciesList[r] = this.availableSpecies[r];
                        break;
                      }
                    } else {
                      this.speciesList[r] = this.availableSpecies[r];
                      break;
                    }
            });
            let a = this.initial;
            if (this.state) {
              const r = this.state.state;
              (!r || !r.uuid && !r.entry) && this.state.species ? a = this.state.species : a = void 0;
            }
            a && (a && this.speciesList[a] !== void 0 ? this.activeSpecies = a : this.activeSpecies = Object.keys(this.speciesList)[0], this.setSpecies(
              this.activeSpecies,
              this.state ? this.state.state : void 0,
              5
            )), this.initialised = !0, e(), this.resolveList.forEach((r) => {
              r();
            });
          }).catch((i) => {
            i && i.handled || (console.error("Error fetching flatmap:", i), this.initialised = !0, this.multiflatmapError = {}, this.multiflatmapError.title = "MultiFlatmap Error!", this.multiflatmapError.messages = [
              `Sorry, the component could not be loaded due to an unexpected error.
                Please try again later or contact support if the problem persists.`
            ], e(), this.resolveList.forEach((a) => {
              a();
            }));
          }).finally(() => {
            clearTimeout(o);
          });
        } else this.initialised ? e() : this.resolveList.push(e);
      });
    },
    /**
     * Function to load `mapManager` to create flatmap.
     */
    loadMapManager: function() {
      this.mapManagerRef || (this.mapManager ? this.mapManagerRef = this.mapManager : (this.mapManagerRef = Re(new Vr.MapViewer(this.flatmapAPI, { container: void 0 })), this.$emit("mapmanager-loaded", this.mapManagerRef)));
    },
    /**
     * @public
     * Function to emit ``resource-selected`` event with provided ``resource``.
     * @arg {Object} `action`
     */
    resourceSelected: function(e) {
      this.$emit("resource-selected", e);
    },
    /**
     * @public
     * Function to emit ``context-restored`` event after the flatmap is restored.
     * @arg {Object} `component`
     */
    onContextRestored: function(e) {
      this.$emit("context-restored", e);
    },
    /**
     * @public
     * Function to emit ``ready`` event after the flatmap is loaded.
     * @arg {Object} `component`
     */
    FlatmapReady: function(e) {
      this.$emit("ready", e);
    },
    /**
     * @public
     * Function to get the current active map.
     */
    getCurrentFlatmap: function() {
      return this.$refs[this.activeSpecies][0];
    },
    /**
     * @public
     * Function to emit ``pan-zoom-callback`` event
     * from the event emitted in ``callback`` function from ``MapManager.loadMap()``.
     * @arg {Object} `payload`
     */
    panZoomCallback: function(e) {
      this.$emit("pan-zoom-callback", e);
    },
    onAnnotationClose: function() {
      this.$emit("annotation-close");
    },
    onAnnotationOpen: function(e) {
      this.$emit("annotation-open", e);
    },
    updateOfflineAnnotationEnabled: function(e) {
      this.$emit("update-offline-annotation-enabled", e);
    },
    onConnectivityInfoClose: function() {
      this.$emit("connectivity-info-close");
    },
    onConnectivityInfoOpen: function(e) {
      this.$emit("connectivity-info-open", e);
    },
    onConnectivityError: function(e) {
      this.$emit("connectivity-error", e);
    },
    onNeuronConnectionFeatureClick: function(e) {
      this.$emit("neuron-connection-feature-click", e);
    },
    onSelectionsDataChanged: function(e) {
      this.$emit("pathway-selection-changed", e);
    },
    /**
     * @public
     * Function to show popup on map.
     * @arg {String} `featureId`,
     * @arg {Object} `node`,
     * @arg {Object} `options`
     */
    showPopup: function(e, t, n) {
      this.getCurrentFlatmap().showPopup(e, t, n);
    },
    /**
     * @public
     * Function to show marker popup.
     * @arg {String} `featureId`,
     * @arg {Object} `node`,
     * @arg {Object} `options`
     */
    showMarkerPopup: function(e, t, n) {
      this.getCurrentFlatmap().showMarkerPopup(e, t, n);
    },
    /**
     * @public
     * Function to set species.
     * This function is called on the first load and
     * when user changes the species.
     * @arg {Array} `species`,
     * @arg {Object} `state`,
     * @arg {Number} `numberOfRetry`
     */
    setSpecies: function(e, t, n) {
      if (this.$refs && e in this.$refs)
        this.activeSpecies = e, this.$refs[this.activeSpecies][0].createFlatmap(t), this.$emit("flatmapChanged", this.activeSpecies);
      else if (n) {
        const o = n - 1;
        o >= 0 && this.$nextTick(() => {
          this.setSpecies(e, t, o);
        });
      }
    },
    /**
     * Function to switch to the latest existing map from
     * a legacy map of the same species.
     * @arg state
     *
     * @private
     */
    viewLatestMap: function(e) {
      const t = Object.keys(this.speciesList);
      for (let n = 0; n < t.length; n++) {
        const o = this.speciesList[t[n]];
        if (!o.isLegacy && o.taxo === e.entry && o.biologicalSex === e.biologicalSex) {
          this.setSpecies(t[n], e, 0);
          return;
        }
      }
    },
    /**
     * Create a legacy entry with the provided information
     * @arg state,
     * @arg taxo,
     *
     * @private
     */
    createLegacyEntry: function(e, t, n) {
      if (n && t) {
        let o = "Legacy";
        return e.species && (e.species.slice(0, 6) === "Legacy" ? o = e.species : o = o + ` ${e.species}`), this.speciesList[o] = {
          taxo: t,
          isLegacy: !0,
          displayWarning: !0
        }, {
          species: o,
          state: {
            entry: t,
            uuid: n,
            viewport: e.state.viewport,
            searchTerm: e.state.searchTerm
          }
        };
      }
    },
    /**
     * Function used to translate the legacy map state to one that can be used in current
     * flatmap if required. If it is a legacy, an Select entry will be added
     * @arg state
     *
     * @private
     */
    updateState: function(e) {
      return new Promise((t) => {
        if (e && e.state) {
          const n = e.state;
          if (n.uuid) {
            if (n.entry)
              return new Promise(() => {
                const o = { taxon: n.entry };
                n.biologicalSex && (o.biologicalSex = n.biologicalSex), this.mapManagerRef.findMap(o).then((i) => {
                  if (i.uuid !== n.uuid)
                    return this.createLegacyEntry(
                      e,
                      n.entry,
                      n.uuid
                    );
                }).then((i) => {
                  t(i || e);
                }).catch(() => {
                  t(e);
                });
              });
          } else if (n.entry) {
            const o = n.entry in Or ? Or[n.entry] : void 0, i = this.createLegacyEntry(
              e,
              n.entry,
              o
            );
            t(i || e);
          }
        }
        t(e);
      });
    },
    /**
     * @public
     * Function used for getting the current states of the scene. This exported states
     * can be imported using the importStates method.
     */
    getState: function() {
      let e = {
        species: this.activeSpecies,
        state: void 0
      }, t = this.getCurrentFlatmap();
      return e.state = t.getState(), e;
    },
    /**
     * @public
     * Function used for importing the states of the scene. This exported states
     * can be imported using the read states method.
     * @arg {Object} state
     */
    setState: function(e) {
      e && (this.loadMapManager(), this.updateState(e).then((t) => {
        this.initialise().then(() => {
          t.species && t.species !== this.activeSpecies ? this.setSpecies(t.species, t.state, 5) : t.state && this.getCurrentFlatmap().setState(t.state);
        });
      }));
    },
    /**
     * @public
     * Function to activate help mode tooltip by item index number
     * @arg {Number} `index`
     */
    activateTooltipByIndex: function(e) {
      return e === this.helpModeActiveItem && this.helpMode;
    },
    /**
     * @public
     * Function to check the last item of help mode
     * @arg {Boolean} `isLastItem`
     */
    onHelpModeLastItem: function(e) {
      e && this.$emit("help-mode-last-item", !0);
    },
    /**
     * @public
     * Function to emit event after a tooltip is shown.
     */
    onTooltipShown: function() {
      this.$emit("shown-tooltip");
    },
    /**
     * @public
     * Function to emit event after a tooltip on the map is shown.
     */
    onMapTooltipShown: function() {
      this.$emit("shown-map-tooltip");
    },
    /**
     * @public
     * Function to change the view mode of the map.
     * @arg {String} `modeName`
     */
    changeViewingMode: function(e) {
      this.getCurrentFlatmap().changeViewingMode(e);
    },
    setConnectionType: function(e) {
      this.getCurrentFlatmap().setConnectionType(e);
    }
  },
  props: {
    /**
     * Initial species for the flatmap.
     * This value will be ignored if a valid state object is provided.
     */
    initial: {
      type: String,
      default: ""
    },
    /**
     * The minimum zoom level of the map.
     */
    minZoom: {
      type: Number,
      default: 1
    },
    /**
     * The option to create map on component mounted.
     */
    renderAtMounted: {
      type: Boolean,
      default: !1
    },
    /**
     * This option enable rendering of the map
     */
    render: {
      type: Boolean,
      default: !0
    },
    /**
     * The option to show tooltips for help mode.
     */
    helpMode: {
      type: Boolean,
      default: !1
    },
    /**
     * The active item index of help mode.
     */
    helpModeActiveItem: {
      type: Number,
      default: 0
    },
    /**
     * The option to use helpModeDialog.
     * On default, `false`, clicking help will show all tooltips.
     * If `true`, clicking help will show the help-mode-dialog.
     */
    helpModeDialog: {
      type: Boolean,
      default: !1
    },
    /**
     * The last item of help mode.
     */
    helpModeLastItem: {
      type: Boolean,
      default: !1
    },
    /**
     * The option to display minimap at the top-right corner of the map.
     */
    displayMinimap: {
      type: Boolean,
      default: !1
    },
    /**
     * The option to show star in legend area.
     */
    showStarInLegend: {
      type: Boolean,
      default: !1
    },
    /**
     * Flag to determine rather open map UI should be
     * presented or not.
     */
    enableOpenMapUI: {
      type: Boolean,
      default: !1
    },
    /**
     * The data to show different map options.
     * Available at the bottom-left corner ("Open new map" tooltip).
     */
    openMapOptions: {
      type: Array
    },
    /**
     * The available species data for different maps.
     * This data is used for multi flatmaps.
     */
    availableSpecies: {
      type: Object,
      /**
       * ```{
          'Human Female': {
            taxo: 'NCBITaxon:9606',
            biologicalSex: 'PATO:0000383',
            iconClass: 'mapicon-icon_human',
            displayWarning: true,
          },
          'Human Male': {
            taxo: 'NCBITaxon:9606',
            biologicalSex: 'PATO:0000384',
            iconClass: 'mapicon-icon_human',
            displayWarning: true,
          },
          Rat: {
            taxo: 'NCBITaxon:10114',
            iconClass: 'mapicon-icon_rat',
            displayLatestChanges: true,
          },
          Mouse: {
            taxo: 'NCBITaxon:10090',
            iconClass: 'mapicon-icon_mouse',
            displayWarning: true,
          },
          Pig: {
            taxo: 'NCBITaxon:9823',
            iconClass: 'mapicon-icon_pig',
            displayWarning: true,
          },
          Cat: {
            taxo: 'NCBITaxon:9685',
            iconClass: 'mapicon-icon_cat',
            displayWarning: true,
          },
        }```
       */
      default: function() {
        return {
          "Human Female": {
            taxo: "NCBITaxon:9606",
            biologicalSex: "PATO:0000383",
            iconClass: "mapicon-icon_human",
            displayWarning: !0
          },
          "Human Male": {
            taxo: "NCBITaxon:9606",
            biologicalSex: "PATO:0000384",
            iconClass: "mapicon-icon_human",
            displayWarning: !0
          },
          Rat: {
            taxo: "NCBITaxon:10114",
            iconClass: "mapicon-icon_rat",
            displayLatestChanges: !0
          },
          Mouse: {
            taxo: "NCBITaxon:10090",
            iconClass: "mapicon-icon_mouse",
            displayWarning: !0
          },
          Pig: {
            taxo: "NCBITaxon:9823",
            iconClass: "mapicon-icon_pig",
            displayWarning: !0
          },
          Cat: {
            taxo: "NCBITaxon:9685",
            iconClass: "mapicon-icon_cat",
            displayWarning: !0
          }
        };
      }
    },
    /**
     * State containing state of the flatmap.
     */
    state: {
      type: Object,
      default: void 0
    },
    /**
     * Flatmap's Map Manager to use as single Map Manager
     * when the value is provided.
     */
    mapManager: {
      type: Object,
      default: void 0
    },
    /**
     * Specify the endpoint of the flatmap server.
     */
    flatmapAPI: {
      type: String,
      default: "https://mapcore-demo.org/current/flatmap/v3/"
    },
    /**
     * Specify the endpoint of the SPARC API.
     */
    sparcAPI: {
      type: String,
      default: "https://api.sparc.science/"
    },
    /**
     * Flag to disable UIs on Map
     */
    disableUI: {
      type: Boolean,
      default: !1
    },
    /**
     * The option to show connectivity information in sidebar
     */
    connectivityInfoSidebar: {
      type: Boolean,
      default: !1
    },
    /**
     * The option to show connectivity information in sidebar
     */
    annotationSidebar: {
      type: Boolean,
      default: !1
    },
    /**
     * The option to show local settings UI
     * (background colour, flight path, viewing mode, etc.)
     */
    showLocalSettings: {
      type: Boolean,
      default: !0
    },
    /**
     * The option to show open new map button
     */
    showOpenMapButton: {
      type: Boolean,
      default: !0
    },
    /**
     * The option to show pathway drawer
     */
    showPathwayFilter: {
      type: Boolean,
      default: !0
    },
    /**
     * Allow to add and display extra legends to drawer
     */
    externalLegends: {
      type: Array,
      default: function() {
        return [];
      }
    }
  },
  data: function() {
    return {
      activeSpecies: void 0,
      speciesList: {},
      requireInitialisation: !0,
      resolveList: Re([]),
      initialised: !1,
      mapManagerRef: void 0,
      multiflatmapError: null
    };
  },
  watch: {
    state: {
      handler: function(e) {
        this.setState(e);
      },
      immediate: !0,
      deep: !0
    },
    activeSpecies: {
      handler: function(e, t) {
        t && this.$refs[t][0].forceContextLoss();
      }
    }
  }
}, Yb = {
  class: "multi-container",
  ref: "multiContainer"
}, Zb = {
  key: 0,
  style: { position: "absolute", "z-index": "100" }
}, Qb = { class: "select-box-icon" };
function Xb(e, t, n, o, i, a) {
  const r = ea, s = zo, l = qn, u = wl, c = na;
  return w(), L("div", Yb, [
    n.disableUI ? V("", !0) : (w(), L("div", Zb, [
      t[2] || (t[2] = R("div", { class: "species-display-text" }, "Species", -1)),
      P(l, {
        content: "Select a species",
        placement: "right",
        trigger: "manual",
        "popper-class": "flatmap-popper flatmap-teleport-popper right-popper",
        width: "max-content",
        visible: a.activateTooltipByIndex(0),
        teleported: !1,
        ref: "selectPopover"
      }, {
        reference: E(() => [
          P(s, {
            id: "flatmap-select",
            teleported: !1,
            modelValue: e.activeSpecies,
            "onUpdate:modelValue": t[0] || (t[0] = (d) => e.activeSpecies = d),
            placeholder: "Select",
            class: "select-box",
            "popper-class": "flatmap-dropdown",
            onChange: a.setSpecies
          }, {
            default: E(() => [
              (w(!0), L(fe, null, Ke(e.speciesList, (d, f) => (w(), z(r, {
                key: f,
                label: f,
                value: f
              }, {
                default: E(() => [
                  R("span", Qb, [
                    R("i", {
                      class: _(d.iconClass)
                    }, null, 2)
                  ]),
                  Z(" " + ee(f), 1)
                ]),
                _: 2
              }, 1032, ["label", "value"]))), 128))
            ]),
            _: 1
          }, 8, ["modelValue", "onChange"])
        ]),
        _: 1
      }, 8, ["visible"])
    ])),
    (w(!0), L(fe, null, Ke(e.speciesList, (d, f) => ie((w(), z(u, {
      key: f,
      entry: d.taxo,
      uuid: d.uuid,
      biologicalSex: d.biologicalSex,
      displayWarning: d.displayWarning,
      displayLatestChanges: d.displayLatestChanges,
      isLegacy: d.isLegacy,
      ref_for: !0,
      ref: f,
      enableOpenMapUI: n.enableOpenMapUI,
      openMapOptions: n.openMapOptions,
      disableUI: n.disableUI,
      onContextRestored: a.onContextRestored,
      onViewLatestMap: a.viewLatestMap,
      onResourceSelected: a.resourceSelected,
      onReady: a.FlatmapReady,
      onPanZoomCallback: a.panZoomCallback,
      annotationSidebar: n.annotationSidebar,
      onAnnotationOpen: a.onAnnotationOpen,
      onAnnotationClose: a.onAnnotationClose,
      onUpdateOfflineAnnotationEnabled: a.updateOfflineAnnotationEnabled,
      connectivityInfoSidebar: n.connectivityInfoSidebar,
      onConnectivityInfoOpen: a.onConnectivityInfoOpen,
      onConnectivityInfoClose: a.onConnectivityInfoClose,
      onConnectivityError: a.onConnectivityError,
      onNeuronConnectionFeatureClick: a.onNeuronConnectionFeatureClick,
      onOpenMap: t[1] || (t[1] = (m) => e.$emit("open-map", m)),
      onPathwaySelectionChanged: a.onSelectionsDataChanged,
      minZoom: n.minZoom,
      helpMode: e.activeSpecies == f && n.helpMode,
      helpModeActiveItem: n.helpModeActiveItem,
      helpModeDialog: n.helpModeDialog,
      helpModeInitialIndex: -2,
      onHelpModeLastItem: a.onHelpModeLastItem,
      onShownTooltip: a.onTooltipShown,
      onShownMapTooltip: a.onMapTooltipShown,
      renderAtMounted: n.renderAtMounted,
      render: n.render && e.activeSpecies == f,
      displayMinimap: n.displayMinimap,
      showStarInLegend: n.showStarInLegend,
      style: { height: "100%" },
      mapManager: e.mapManagerRef,
      flatmapAPI: n.flatmapAPI,
      sparcAPI: n.sparcAPI,
      showLocalSettings: n.showLocalSettings,
      showOpenMapButton: n.showOpenMapButton,
      showPathwayFilter: n.showPathwayFilter,
      externalLegends: n.externalLegends
    }, null, 8, ["entry", "uuid", "biologicalSex", "displayWarning", "displayLatestChanges", "isLegacy", "enableOpenMapUI", "openMapOptions", "disableUI", "onContextRestored", "onViewLatestMap", "onResourceSelected", "onReady", "onPanZoomCallback", "annotationSidebar", "onAnnotationOpen", "onAnnotationClose", "onUpdateOfflineAnnotationEnabled", "connectivityInfoSidebar", "onConnectivityInfoOpen", "onConnectivityInfoClose", "onConnectivityError", "onNeuronConnectionFeatureClick", "onPathwaySelectionChanged", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "renderAtMounted", "render", "displayMinimap", "showStarInLegend", "mapManager", "flatmapAPI", "sparcAPI", "showLocalSettings", "showOpenMapButton", "showPathwayFilter", "externalLegends"])), [
      [Ee, e.activeSpecies == f]
    ])), 128)),
    e.multiflatmapError ? (w(), z(c, {
      key: 1,
      flatmapError: e.multiflatmapError
    }, null, 8, ["flatmapError"])) : V("", !0)
  ], 512);
}
const r0 = /* @__PURE__ */ Kt(Jb, [["render", Xb], ["__scopeId", "data-v-1a5d097a"]]);
export {
  wl as FlatmapVuer,
  r0 as MultiFlatmapVuer
};
