import { Loading as Or, CircleCheck as Nl, CircleClose as Mr, Close as ri, ArrowDown as ki, Warning as _r, DocumentDelete as Bl, WarningFilled as Pr, ArrowLeft as Lr } from "@element-plus/icons-vue"; import { getCurrentScope as Vl, onScopeDispose as xr, unref as v, getCurrentInstance as ge, onMounted as he, nextTick as ce, ref as P, readonly as Fr, watch as q, warn as zl, watchEffect as Rr, onBeforeUnmount as Be, inject as G, computed as b, isRef as lt, shallowRef as mo, onBeforeMount as Hl, provide as pe, defineComponent as H, openBlock as w, createElementBlock as x, mergeProps as Nt, renderSlot as j, toRef as Ze, onUnmounted as jl, createBlock as z, Transition as Vn, withCtx as E, withDirectives as ie, createElementVNode as F, normalizeClass as _, normalizeStyle as re, vShow as Ee, Fragment as fe, createVNode as L, reactive as ut, onActivated as Kl, onUpdated as Ul, resolveDynamicComponent as Re, createCommentVNode as V, cloneVNode as Wl, Text as $r, Comment as ql, Teleport as Gl, onDeactivated as Jl, toDisplayString as ee, useSlots as Io, toRaw as vo, withModifiers as le, vModelCheckbox as go, createTextVNode as Z, toRefs as un, vModelRadio as Dr, h as Yt, createSlots as Nr, resolveComponent as Fe, resolveDirective as Yl, toHandlerKey as Zl, renderList as He, withKeys as En, vModelText as Ql, createApp as Xl, createStaticVNode as eu, markRaw as Ye } from "vue"; import { MapSvgIcon as tu, MapSvgSpriteColor as nu } from "@abi-software/svg-sprite"; import { Tooltip as ou, TreeControls as iu, DrawToolbar as au, fetchLabels as ru, getFlatmapFilterOptions as su } from "@abi-software/map-utilities"; import * as Br from "https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.3.5/+esm"; import { AnnotationService as lu } from "@abi-software/sparc-annotation"; import { defineStore as uu, mapState as cu } 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 ca; const se = typeof window < "u", du = (e) => typeof e == "string", Vr = () => { }, si = se && ((ca = window == null ? void 0 : window.navigator) == null ? void 0 : ca.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function Ti(e) { return typeof e == "function" ? e() : v(e); } function fu(e) { return e; } function zn(e) { return Vl() ? (xr(e), !0) : !1; } function pu(e, t = !0) { ge() ? he(e) : t ? e() : ce(e); } function da(e, t, n = {}) { const { immediate: o = !0 } = n, i = P(!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 ko = se ? window : void 0; function ze(...e) { let t, n, o, i; if (du(e[0]) || Array.isArray(e[0]) ? ([n, o, i] = e, t = ko) : [t, n, o, i] = e, !t) return Vr; 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 fa = !1; function hu(e, t, n = {}) { const { window: o = ko, ignore: i = [], capture: a = !0, detectIframe: r = !1 } = n; if (!o) return; si && !fa && (fa = !0, Array.from(o.document.body.children).forEach((f) => f.addEventListener("click", Vr))); 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 = [ ze(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 }), ze(o, "pointerdown", (f) => { const m = rt(e); m && (s = !f.composedPath().includes(m) && !l(f)); }, { passive: !0 }), r && ze(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 zr(e, t = !1) { const n = P(), o = () => n.value = !!e(); return o(), pu(o, t), n; } const pa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ha = "__vueuse_ssr_handlers__"; pa[ha] = pa[ha] || {}; var ma = Object.getOwnPropertySymbols, mu = Object.prototype.hasOwnProperty, vu = Object.prototype.propertyIsEnumerable, gu = (e, t) => { var n = {}; for (var o in e) mu.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]); if (e != null && ma) for (var o of ma(e)) t.indexOf(o) < 0 && vu.call(e, o) && (n[o] = e[o]); return n; }; function bt(e, t, n = {}) { const o = n, { window: i = ko } = o, a = gu(o, ["window"]); let r; const s = zr(() => 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 va = Object.getOwnPropertySymbols, yu = Object.prototype.hasOwnProperty, bu = Object.prototype.propertyIsEnumerable, wu = (e, t) => { var n = {}; for (var o in e) yu.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 && bu.call(e, o) && (n[o] = e[o]); return n; }; function Su(e, t, n = {}) { const o = n, { window: i = ko } = o, a = wu(o, ["window"]); let r; const s = zr(() => 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 ga; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(ga || (ga = {})); var Cu = Object.defineProperty, ya = Object.getOwnPropertySymbols, Eu = Object.prototype.hasOwnProperty, Iu = Object.prototype.propertyIsEnumerable, ba = (e, t, n) => t in e ? Cu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ku = (e, t) => { for (var n in t || (t = {})) Eu.call(t, n) && ba(e, n, t[n]); if (ya) for (var n of ya(t)) Iu.call(t, n) && ba(e, n, t[n]); return e; }; const Tu = { 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] }; ku({ linear: fu }, Tu); /** * @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 Lt = () => { }, Au = Object.prototype.hasOwnProperty, wa = (e, t) => Au.call(e, t), Ie = Array.isArray, Se = (e) => typeof e == "function", je = (e) => typeof e == "string", ke = (e) => e !== null && typeof e == "object", Ou = Object.prototype.toString, Mu = (e) => Ou.call(e), Wo = (e) => Mu(e).slice(8, -1), Hr = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, _u = /-(\w)/g, Pu = Hr( (e) => e.replace(_u, (t, n) => n ? n.toUpperCase() : "") ), Lu = /\B([A-Z])/g, xu = Hr( (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, Kr = Object.prototype, Ru = Kr.hasOwnProperty, $u = Kr.toString, In = Xe ? Xe.toStringTag : void 0; function Du(e) { var t = Ru.call(e, In), n = e[In]; try { e[In] = void 0; var o = !0; } catch { } var i = $u.call(e); return o && (t ? e[In] = n : delete e[In]), i; } var Nu = Object.prototype, Bu = Nu.toString; function Vu(e) { return Bu.call(e); } var zu = "[object Null]", Hu = "[object Undefined]", Sa = Xe ? Xe.toStringTag : void 0; function cn(e) { return e == null ? e === void 0 ? Hu : zu : Sa && Sa in Object(e) ? Du(e) : Vu(e); } function en(e) { return e != null && typeof e == "object"; } var ju = "[object Symbol]"; function To(e) { return typeof e == "symbol" || en(e) && cn(e) == ju; } function Ku(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 Ke = Array.isArray, Uu = 1 / 0, Ca = Xe ? Xe.prototype : void 0, Ea = Ca ? Ca.toString : void 0; function Ur(e) { if (typeof e == "string") return e; if (Ke(e)) return Ku(e, Ur) + ""; if (To(e)) return Ea ? Ea.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -Uu ? "-0" : t; } var Wu = /\s/; function qu(e) { for (var t = e.length; t-- && Wu.test(e.charAt(t)); ) ; return t; } var Gu = /^\s+/; function Ju(e) { return e && e.slice(0, qu(e) + 1).replace(Gu, ""); } function It(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var Ia = NaN, Yu = /^[-+]0x[0-9a-f]+$/i, Zu = /^0b[01]+$/i, Qu = /^0o[0-7]+$/i, Xu = parseInt; function ka(e) { if (typeof e == "number") return e; if (To(e)) return Ia; 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 = Ju(e); var n = Zu.test(e); return n || Qu.test(e) ? Xu(e.slice(2), n ? 2 : 8) : Yu.test(e) ? Ia : +e; } function Wr(e) { return e; } var ec = "[object AsyncFunction]", tc = "[object Function]", nc = "[object GeneratorFunction]", oc = "[object Proxy]"; function qr(e) { if (!It(e)) return !1; var t = cn(e); return t == tc || t == nc || t == ec || t == oc; } var qo = tt["__core-js_shared__"], Ta = function() { var e = /[^.]+$/.exec(qo && qo.keys && qo.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function ic(e) { return !!Ta && Ta in e; } var ac = Function.prototype, rc = ac.toString; function Bt(e) { if (e != null) { try { return rc.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var sc = /[\\^$.*+?()[\]{}|]/g, lc = /^\[object .+?Constructor\]$/, uc = Function.prototype, cc = Object.prototype, dc = uc.toString, fc = cc.hasOwnProperty, pc = RegExp( "^" + dc.call(fc).replace(sc, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function hc(e) { if (!It(e) || ic(e)) return !1; var t = qr(e) ? pc : lc; return t.test(Bt(e)); } function mc(e, t) { return e == null ? void 0 : e[t]; } function Vt(e, t) { var n = mc(e, t); return hc(n) ? n : void 0; } var li = Vt(tt, "WeakMap"); function vc(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 gc = 800, yc = 16, bc = Date.now; function wc(e) { var t = 0, n = 0; return function() { var o = bc(), i = yc - (o - n); if (n = o, i > 0) { if (++t >= gc) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function Sc(e) { return function() { return e; }; } var yo = function() { try { var e = Vt(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), Cc = yo ? function(e, t) { return yo(e, "toString", { configurable: !0, enumerable: !1, value: Sc(t), writable: !0 }); } : Wr, Ec = wc(Cc); function Ic(e, t, n, o) { e.length; for (var i = n + 1; i--; ) if (t(e[i], i, e)) return i; return -1; } var kc = 9007199254740991, Tc = /^(?:0|[1-9]\d*)$/; function Ai(e, t) { var n = typeof e; return t = t ?? kc, !!t && (n == "number" || n != "symbol" && Tc.test(e)) && e > -1 && e % 1 == 0 && e < t; } function Ac(e, t, n) { t == "__proto__" && yo ? yo(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 Oc = Object.prototype, Mc = Oc.hasOwnProperty; function _c(e, t, n) { var o = e[t]; (!(Mc.call(e, t) && Oi(o, n)) || n === void 0 && !(t in e)) && Ac(e, t, n); } var Aa = Math.max; function Pc(e, t, n) { return t = Aa(t === void 0 ? e.length - 1 : t, 0), function() { for (var o = arguments, i = -1, a = Aa(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), vc(e, this, s); }; } var Lc = 9007199254740991; function Mi(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Lc; } function xc(e) { return e != null && Mi(e.length) && !qr(e); } var Fc = Object.prototype; function Rc(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || Fc; return e === n; } function $c(e, t) { for (var n = -1, o = Array(e); ++n < e; ) o[n] = t(n); return o; } var Dc = "[object Arguments]"; function Oa(e) { return en(e) && cn(e) == Dc; } var Gr = Object.prototype, Nc = Gr.hasOwnProperty, Bc = Gr.propertyIsEnumerable, _i = Oa(/* @__PURE__ */ function() { return arguments; }()) ? Oa : function(e) { return en(e) && Nc.call(e, "callee") && !Bc.call(e, "callee"); }; function Vc() { return !1; } var Jr = typeof exports == "object" && exports && !exports.nodeType && exports, Ma = Jr && typeof module == "object" && module && !module.nodeType && module, zc = Ma && Ma.exports === Jr, _a = zc ? tt.Buffer : void 0, Hc = _a ? _a.isBuffer : void 0, ui = Hc || Vc, jc = "[object Arguments]", Kc = "[object Array]", Uc = "[object Boolean]", Wc = "[object Date]", qc = "[object Error]", Gc = "[object Function]", Jc = "[object Map]", Yc = "[object Number]", Zc = "[object Object]", Qc = "[object RegExp]", Xc = "[object Set]", ed = "[object String]", td = "[object WeakMap]", nd = "[object ArrayBuffer]", od = "[object DataView]", id = "[object Float32Array]", ad = "[object Float64Array]", rd = "[object Int8Array]", sd = "[object Int16Array]", ld = "[object Int32Array]", ud = "[object Uint8Array]", cd = "[object Uint8ClampedArray]", dd = "[object Uint16Array]", fd = "[object Uint32Array]", ae = {}; ae[id] = ae[ad] = ae[rd] = ae[sd] = ae[ld] = ae[ud] = ae[cd] = ae[dd] = ae[fd] = !0; ae[jc] = ae[Kc] = ae[nd] = ae[Uc] = ae[od] = ae[Wc] = ae[qc] = ae[Gc] = ae[Jc] = ae[Yc] = ae[Zc] = ae[Qc] = ae[Xc] = ae[ed] = ae[td] = !1; function pd(e) { return en(e) && Mi(e.length) && !!ae[cn(e)]; } function hd(e) { return function(t) { return e(t); }; } var Yr = typeof exports == "object" && exports && !exports.nodeType && exports, On = Yr && typeof module == "object" && module && !module.nodeType && module, md = On && On.exports === Yr, Go = md && 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, Zr = La ? hd(La) : pd, vd = Object.prototype, gd = vd.hasOwnProperty; function yd(e, t) { var n = Ke(e), o = !n && _i(e), i = !n && !o && ui(e), a = !n && !o && !i && Zr(e), r = n || o || i || a, s = r ? $c(e.length, String) : [], l = s.length; for (var u in e) gd.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 bd(e, t) { return function(n) { return e(t(n)); }; } var wd = bd(Object.keys, Object), Sd = Object.prototype, Cd = Sd.hasOwnProperty; function Ed(e) { if (!Rc(e)) return wd(e); var t = []; for (var n in Object(e)) Cd.call(e, n) && n != "constructor" && t.push(n); return t; } function Qr(e) { return xc(e) ? yd(e) : Ed(e); } var Id = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, kd = /^\w*$/; function Pi(e, t) { if (Ke(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || To(e) ? !0 : kd.test(e) || !Id.test(e) || t != null && e in Object(t); } var Ln = Vt(Object, "create"); function Td() { this.__data__ = Ln ? Ln(null) : {}, this.size = 0; } function Ad(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var Od = "__lodash_hash_undefined__", Md = Object.prototype, _d = Md.hasOwnProperty; function Pd(e) { var t = this.__data__; if (Ln) { var n = t[e]; return n === Od ? void 0 : n; } return _d.call(t, e) ? t[e] : void 0; } var Ld = Object.prototype, xd = Ld.hasOwnProperty; function Fd(e) { var t = this.__data__; return Ln ? t[e] !== void 0 : xd.call(t, e); } var Rd = "__lodash_hash_undefined__"; function $d(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = Ln && t === void 0 ? Rd : t, this; } function Rt(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]); } } Rt.prototype.clear = Td; Rt.prototype.delete = Ad; Rt.prototype.get = Pd; Rt.prototype.has = Fd; Rt.prototype.set = $d; function Dd() { this.__data__ = [], this.size = 0; } function Ao(e, t) { for (var n = e.length; n--; ) if (Oi(e[n][0], t)) return n; return -1; } var Nd = Array.prototype, Bd = Nd.splice; function Vd(e) { var t = this.__data__, n = Ao(t, e); if (n < 0) return !1; var o = t.length - 1; return n == o ? t.pop() : Bd.call(t, n, 1), --this.size, !0; } function zd(e) { var t = this.__data__, n = Ao(t, e); return n < 0 ? void 0 : t[n][1]; } function Hd(e) { return Ao(this.__data__, e) > -1; } function jd(e, t) { var n = this.__data__, o = Ao(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 = Dd; ft.prototype.delete = Vd; ft.prototype.get = zd; ft.prototype.has = Hd; ft.prototype.set = jd; var xn = Vt(tt, "Map"); function Kd() { this.size = 0, this.__data__ = { hash: new Rt(), map: new (xn || ft)(), string: new Rt() }; } function Ud(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function Oo(e, t) { var n = e.__data__; return Ud(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function Wd(e) { var t = Oo(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function qd(e) { return Oo(this, e).get(e); } function Gd(e) { return Oo(this, e).has(e); } function Jd(e, t) { var n = Oo(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 = Kd; pt.prototype.delete = Wd; pt.prototype.get = qd; pt.prototype.has = Gd; pt.prototype.set = Jd; var Yd = "Expected a function"; function Li(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(Yd); 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 (Li.Cache || pt)(), n; } Li.Cache = pt; var Zd = 500; function Qd(e) { var t = Li(e, function(o) { return n.size === Zd && n.clear(), o; }), n = t.cache; return t; } var Xd = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ef = /\\(\\)?/g, tf = Qd(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(Xd, function(n, o, i, a) { t.push(i ? a.replace(ef, "$1") : o || n); }), t; }); function nf(e) { return e == null ? "" : Ur(e); } function Mo(e, t) { return Ke(e) ? e : Pi(e, t) ? [e] : tf(nf(e)); } var of = 1 / 0; function Hn(e) { if (typeof e == "string" || To(e)) return e; var t = e + ""; return t == "0" && 1 / e == -of ? "-0" : t; } function xi(e, t) { t = Mo(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 : xi(e, t); return o === void 0 ? n : o; } function Xr(e, t) { for (var n = -1, o = t.length, i = e.length; ++n < o; ) e[i + n] = t[n]; return e; } var xa = Xe ? Xe.isConcatSpreadable : void 0; function af(e) { return Ke(e) || _i(e) || !!(xa && e && e[xa]); } function rf(e, t, n, o, i) { var a = -1, r = e.length; for (n || (n = af), i || (i = []); ++a < r; ) { var s = e[a]; n(s) ? Xr(i, s) : i[i.length] = s; } return i; } function sf(e) { var t = e == null ? 0 : e.length; return t ? rf(e) : []; } function lf(e) { return Ec(Pc(e, void 0, sf), e + ""); } function St() { if (!arguments.length) return []; var e = arguments[0]; return Ke(e) ? e : [e]; } function uf() { this.__data__ = new ft(), this.size = 0; } function cf(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function df(e) { return this.__data__.get(e); } function ff(e) { return this.__data__.has(e); } var pf = 200; function hf(e, t) { var n = this.__data__; if (n instanceof ft) { var o = n.__data__; if (!xn || o.length < pf - 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 = uf; st.prototype.delete = cf; st.prototype.get = df; st.prototype.has = ff; st.prototype.set = hf; function mf(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 vf() { return []; } var gf = Object.prototype, yf = gf.propertyIsEnumerable, Fa = Object.getOwnPropertySymbols, bf = Fa ? function(e) { return e == null ? [] : (e = Object(e), mf(Fa(e), function(t) { return yf.call(e, t); })); } : vf; function wf(e, t, n) { var o = t(e); return Ke(e) ? o : Xr(o, n(e)); } function Ra(e) { return wf(e, Qr, bf); } var ci = Vt(tt, "DataView"), di = Vt(tt, "Promise"), fi = Vt(tt, "Set"), $a = "[object Map]", Sf = "[object Object]", Da = "[object Promise]", Na = "[object Set]", Ba = "[object WeakMap]", Va = "[object DataView]", Cf = Bt(ci), Ef = Bt(xn), If = Bt(di), kf = Bt(fi), Tf = Bt(li), wt = cn; (ci && wt(new ci(new ArrayBuffer(1))) != Va || xn && wt(new xn()) != $a || di && wt(di.resolve()) != Da || fi && wt(new fi()) != Na || li && wt(new li()) != Ba) && (wt = function(e) { var t = cn(e), n = t == Sf ? e.constructor : void 0, o = n ? Bt(n) : ""; if (o) switch (o) { case Cf: return Va; case Ef: return $a; case If: return Da; case kf: return Na; case Tf: return Ba; } return t; }); var za = tt.Uint8Array, Af = "__lodash_hash_undefined__"; function Of(e) { return this.__data__.set(e, Af), this; } function Mf(e) { return this.__data__.has(e); } function bo(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new pt(); ++t < n; ) this.add(e[t]); } bo.prototype.add = bo.prototype.push = Of; bo.prototype.has = Mf; function _f(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, xf = 2; function es(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 & xf ? new bo() : 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 (!_f(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 Rf(e) { var t = -1, n = Array(e.size); return e.forEach(function(o) { n[++t] = o; }), n; } var $f = 1, Df = 2, Nf = "[object Boolean]", Bf = "[object Date]", Vf = "[object Error]", zf = "[object Map]", Hf = "[object Number]", jf = "[object RegExp]", Kf = "[object Set]", Uf = "[object String]", Wf = "[object Symbol]", qf = "[object ArrayBuffer]", Gf = "[object DataView]", Ha = Xe ? Xe.prototype : void 0, Jo = Ha ? Ha.valueOf : void 0; function Jf(e, t, n, o, i, a, r) { switch (n) { case Gf: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case qf: return !(e.byteLength != t.byteLength || !a(new za(e), new za(t))); case Nf: case Bf: case Hf: return Oi(+e, +t); case Vf: return e.name == t.name && e.message == t.message; case jf: case Uf: return e == t + ""; case zf: var s = Ff; case Kf: var l = o & $f; if (s || (s = Rf), e.size != t.size && !l) return !1; var u = r.get(e); if (u) return u == t; o |= Df, r.set(e, t); var c = es(s(e), s(t), o, i, a, r); return r.delete(e), c; case Wf: if (Jo) return Jo.call(e) == Jo.call(t); } return !1; } var Yf = 1, Zf = Object.prototype, Qf = Zf.hasOwnProperty; function Xf(e, t, n, o, i, a) { var r = n & Yf, s = Ra(e), l = s.length, u = Ra(t), c = u.length; if (l != c && !r) return !1; for (var d = l; d--; ) { var f = s[d]; if (!(r ? f in t : Qf.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 ep = 1, ja = "[object Arguments]", Ka = "[object Array]", to = "[object Object]", tp = Object.prototype, Ua = tp.hasOwnProperty; function np(e, t, n, o, i, a) { var r = Ke(e), s = Ke(t), l = r ? Ka : wt(e), u = s ? Ka : wt(t); l = l == ja ? to : l, u = u == ja ? to : u; var c = l == to, d = u == to, 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 || Zr(e) ? es(e, t, n, o, i, a) : Jf(e, t, l, n, o, i, a); if (!(n & ep)) { var m = c && Ua.call(e, "__wrapped__"), p = d && Ua.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()), Xf(e, t, n, o, i, a)) : !1; } function _o(e, t, n, o, i) { return e === t ? !0 : e == null || t == null || !en(e) && !en(t) ? e !== e && t !== t : np(e, t, n, o, _o, i); } var op = 1, ip = 2; function ap(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 ? _o(u, l, op | ip, o, c) : d)) return !1; } } return !0; } function ts(e) { return e === e && !It(e); } function rp(e) { for (var t = Qr(e), n = t.length; n--; ) { var o = t[n], i = e[o]; t[n] = [o, i, ts(i)]; } return t; } function ns(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function sp(e) { var t = rp(e); return t.length == 1 && t[0][2] ? ns(t[0][0], t[0][1]) : function(n) { return n === e || ap(n, e, t); }; } function lp(e, t) { return e != null && t in Object(e); } function up(e, t, n) { t = Mo(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) && (Ke(e) || _i(e))); } function os(e, t) { return e != null && up(e, t, lp); } var cp = 1, dp = 2; function fp(e, t) { return Pi(e) && ts(t) ? ns(Hn(e), t) : function(n) { var o = at(n, e); return o === void 0 && o === t ? os(n, e) : _o(t, o, cp | dp); }; } function pp(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function hp(e) { return function(t) { return xi(t, e); }; } function mp(e) { return Pi(e) ? pp(Hn(e)) : hp(e); } function vp(e) { return typeof e == "function" ? e : e == null ? Wr : typeof e == "object" ? Ke(e) ? fp(e[0], e[1]) : sp(e) : mp(e); } var Yo = function() { return tt.Date.now(); }, gp = "Expected a function", yp = Math.max, bp = Math.min; function wp(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(gp); t = ka(t) || 0, It(n) && (c = !!n.leading, d = "maxWait" in n, a = d ? yp(ka(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 ? bp(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 Sp(e, t, n) { var o = e == null ? 0 : e.length; if (!o) return -1; var i = o - 1; return Ic(e, vp(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 wo(e, t) { return _o(e, t); } function Po(e) { return e == null; } function is(e) { return e === void 0; } function Cp(e, t, n, o) { if (!It(e)) return e; t = Mo(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]) ? [] : {}); } _c(s, l, u), s = s[l]; } return e; } function Ep(e, t, n) { for (var o = -1, i = t.length, a = {}; ++o < i; ) { var r = t[o], s = xi(e, r); n(s, r) && Cp(a, Mo(r, e), s); } return a; } function Ip(e, t) { return Ep(e, t, function(n, o) { return os(e, o); }); } var as = lf(function(e, t) { return e == null ? {} : Ip(e, t); }); const Ct = (e) => e === void 0, ct = (e) => typeof e == "boolean", me = (e) => typeof e == "number", xt = (e) => typeof Element > "u" ? !1 : e instanceof Element, Fn = (e) => Po(e), kp = (e) => je(e) ? !Number.isNaN(Number(e)) : !1, Tp = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), Wa = (e) => Object.keys(e); class rs extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function ss(e, t) { throw new rs(`[${e}] ${t}`); } function Oe(e, t) { if (process.env.NODE_ENV !== "production") { const n = je(e) ? new rs(`[${e}] ${t}`) : e; console.warn(n); } } const Ap = "utils/dom/style", ls = (e = "") => e.split(" ").filter((t) => !!t.trim()), qa = (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(...ls(t)); }, Rn = (e, t) => { !e || !t.trim() || e.classList.remove(...ls(t)); }, Zt = (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) || kp(e)) return `${e}${t}`; if (je(e)) return e; Oe(Ap, "binding value must be a string or number"); } let no; const Op = (e) => { var t; if (!se) return 0; if (no !== void 0) return no; 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), no = o - a, no; }; function Mp(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 us = "__epPropKey", U = (e) => e, _p = (e) => ke(e) && !!e[us], Lo = (e, t) => { if (!ke(e) || _p(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), wa(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(", "); zl(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`); } return c; } : void 0, [us]: !0 }; return wa(e, "default") && (l.default = i), l; }, Q = (e) => pi(Object.entries(e).map(([t, n]) => [ t, Lo(n, t) ])), tn = U([ String, Object, Function ]), Pp = { Close: ri }, Lp = { validating: Or, success: Nl, error: Mr }, 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; }, xp = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), zt = (e) => (e.install = Lt, 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", Fi = "change", cs = ["", "default", "small", "large"]; var fo = /* @__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))(fo || {}); const Rp = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), kn = (e) => e, Xt = ({ 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 }); }, $p = (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)})`); }, K = () => { document.removeEventListener("mousemove", N), document.removeEventListener("mouseup", K); }; document.addEventListener("mousemove", N), document.addEventListener("mouseup", K); }, 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(() => { Rr(() => { n.value ? r() : s(); }); }), Be(() => { s(); }), { resetPosition: l }; }; var Dp = { 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 Np = (e) => (t, n) => Bp(t, n, v(e)), Bp = (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}}`}`; }), Vp = (e) => { const t = b(() => v(e).name), n = lt(e) ? e : P(e); return { lang: t, locale: n, t: Np(e) }; }, ds = Symbol("localeContextKey"), Ri = (e) => { const t = e || G(ds, P()); return Vp(b(() => t.value || Dp)); }, Mn = "el", zp = "is-", _t = (e, t, n, o, i) => { let a = `${e}-${t}`; return n && (a += `-${n}`), o && (a += `__${o}`), i && (a += `--${i}`), a; }, fs = Symbol("namespaceContextKey"), $i = (e) => { const t = e || (ge() ? G(fs, P(Mn)) : P(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 ? `${zp}${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}` }; }, Hp = (e, t = {}) => { lt(e) || ss("[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 || qa(document.body, o.value)) return; let i = 0, a = !1, r = "0"; const s = () => { setTimeout(() => { Rn(document == null ? void 0 : document.body, o.value), a && document && (document.body.style.width = r); }, 200); }; q(e, (l) => { if (!l) { s(); return; } a = !qa(document.body, o.value), a && (r = document.body.style.width), i = Op(n.namespace.value); const u = document.documentElement.clientHeight < document.body.scrollHeight, c = Zt(document.body, "overflowY"); i > 0 && (u || c === "scroll") && a && (document.body.style.width = `calc(100% - ${i}px)`), hi(document.body, o.value); }), xr(() => s()); }, jp = Lo({ type: U(Boolean), default: null }), Kp = Lo({ type: U(Function) }), Up = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, o = [t], i = { [e]: jp, [n]: Kp }; 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 }; }, ps = (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", De = "bottom", Ne = "right", Ae = "left", Di = "auto", jn = [Te, De, Ne, Ae], nn = "start", Dn = "end", Wp = "clippingParents", hs = "viewport", Tn = "popper", qp = "reference", Ga = jn.reduce(function(e, t) { return e.concat([t + "-" + nn, t + "-" + Dn]); }, []), xo = [].concat(jn, [Di]).reduce(function(e, t) { return e.concat([t, t + "-" + nn, t + "-" + Dn]); }, []), Gp = "beforeRead", Jp = "read", Yp = "afterRead", Zp = "beforeMain", Qp = "main", Xp = "afterMain", eh = "beforeWrite", th = "write", nh = "afterWrite", oh = [Gp, Jp, Yp, Zp, Qp, Xp, eh, th, nh]; function et(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function We(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function on(e) { var t = We(e).Element; return e instanceof t || e instanceof Element; } function $e(e) { var t = We(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function Ni(e) { if (typeof ShadowRoot > "u") return !1; var t = We(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function ih(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]; !$e(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 ah(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; }, {}); !$e(i) || !et(i) || (Object.assign(i.style, s), Object.keys(a).forEach(function(l) { i.removeAttribute(l); })); }); }; } var ms = { name: "applyStyles", enabled: !0, phase: "write", fn: ih, effect: ah, requires: ["computeStyles"] }; function Qe(e) { return e.split("-")[0]; } var Ft = Math.max, So = Math.min, an = Math.round; function rn(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), o = 1, i = 1; if ($e(e) && t) { var a = e.offsetHeight, r = e.offsetWidth; r > 0 && (o = an(n.width) / r || 1), a > 0 && (i = an(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 = rn(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 vs(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 We(e).getComputedStyle(e); } function rh(e) { return ["table", "td", "th"].indexOf(et(e)) >= 0; } function kt(e) { return ((on(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 Ja(e) { return !$e(e) || dt(e).position === "fixed" ? null : e.offsetParent; } function sh(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && $e(e)) { var o = dt(e); if (o.position === "fixed") return null; } var i = Fo(e); for (Ni(i) && (i = i.host); $e(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 Kn(e) { for (var t = We(e), n = Ja(e); n && rh(n) && dt(n).position === "static"; ) n = Ja(n); return n && (et(n) === "html" || et(n) === "body" && dt(n).position === "static") ? t : n || sh(e) || t; } function Vi(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function _n(e, t, n) { return Ft(e, So(t, n)); } function lh(e, t, n) { var o = _n(e, t, n); return o > n ? n : o; } function gs() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function ys(e) { return Object.assign({}, gs(), e); } function bs(e, t) { return t.reduce(function(n, o) { return n[o] = e, n; }, {}); } var uh = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, ys(typeof e != "number" ? e : bs(e, jn)); }; function ch(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, Ne].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!a || !r)) { var d = uh(i.padding, n), f = Bi(a), m = l === "y" ? Te : Ae, p = l === "y" ? De : Ne, h = n.rects.reference[c] + n.rects.reference[l] - r[l] - n.rects.popper[c], g = r[l] - n.rects.reference[l], y = Kn(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 dh(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) || !vs(t.elements.popper, i) || (t.elements.arrow = i)); } var fh = { name: "arrow", enabled: !0, phase: "main", fn: ch, effect: dh, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function sn(e) { return e.split("-")[1]; } var ph = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function hh(e) { var t = e.x, n = e.y, o = window, i = o.devicePixelRatio || 1; return { x: an(t * i) / i || 0, y: an(n * i) / i || 0 }; } function Ya(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 = Kn(n), A = "clientHeight", $ = "clientWidth"; if (k === We(n) && (k = kt(n), dt(k).position !== "static" && s === "absolute" && (A = "scrollHeight", $ = "scrollWidth")), k = k, i === Te || (i === Ae || i === Ne) && a === Dn) { T = De; 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 === De) && a === Dn) { O = Ne; var K = d && k === I && I.visualViewport ? I.visualViewport.width : k[$]; m -= K - o.width, m *= l ? 1 : -1; } } var B = Object.assign({ position: s }, u && ph), M = c === !0 ? hh({ 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 mh(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: sn(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, Ya(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, Ya(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 ws = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: mh, data: {} }, oo = { passive: !0 }; function vh(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 = We(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return a && u.forEach(function(c) { c.addEventListener("scroll", n.update, oo); }), s && l.addEventListener("resize", n.update, oo), function() { a && u.forEach(function(c) { c.removeEventListener("scroll", n.update, oo); }), s && l.removeEventListener("resize", n.update, oo); }; } var Ss = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: vh, data: {} }, gh = { left: "right", right: "left", bottom: "top", top: "bottom" }; function po(e) { return e.replace(/left|right|bottom|top/g, function(t) { return gh[t]; }); } var yh = { start: "end", end: "start" }; function Za(e) { return e.replace(/start|end/g, function(t) { return yh[t]; }); } function zi(e) { var t = We(e), n = t.pageXOffset, o = t.pageYOffset; return { scrollLeft: n, scrollTop: o }; } function Hi(e) { return rn(kt(e)).left + zi(e).scrollLeft; } function bh(e) { var t = We(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 wh(e) { var t, n = kt(e), o = zi(e), i = (t = e.ownerDocument) == null ? void 0 : t.body, a = Ft(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), r = Ft(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 += Ft(n.clientWidth, i ? i.clientWidth : 0) - a), { width: a, height: r, x: s, y: l }; } function ji(e) { var t = dt(e), n = t.overflow, o = t.overflowX, i = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + i + o); } function Cs(e) { return ["html", "body", "#document"].indexOf(et(e)) >= 0 ? e.ownerDocument.body : $e(e) && ji(e) ? e : Cs(Fo(e)); } function Pn(e, t) { var n; t === void 0 && (t = []); var o = Cs(e), i = o === ((n = e.ownerDocument) == null ? void 0 : n.body), a = We(o), r = i ? [a].concat(a.visualViewport || [], ji(o) ? o : []) : o, s = t.concat(r); return i ? s : s.concat(Pn(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 Sh(e) { var t = rn(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 Qa(e, t) { return t === hs ? mi(bh(e)) : on(t) ? Sh(t) : mi(wh(kt(e))); } function Ch(e) { var t = Pn(Fo(e)), n = ["absolute", "fixed"].indexOf(dt(e).position) >= 0, o = n && $e(e) ? Kn(e) : e; return on(o) ? t.filter(function(i) { return on(i) && vs(i, o) && et(i) !== "body"; }) : []; } function Eh(e, t, n) { var o = t === "clippingParents" ? Ch(e) : [].concat(t), i = [].concat(o, [n]), a = i[0], r = i.reduce(function(s, l) { var u = Qa(e, l); return s.top = Ft(u.top, s.top), s.right = So(u.right, s.right), s.bottom = So(u.bottom, s.bottom), s.left = Ft(u.left, s.left), s; }, Qa(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 Es(e) { var t = e.reference, n = e.element, o = e.placement, i = o ? Qe(o) : null, a = o ? sn(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 De: l = { x: r, y: t.y + t.height }; break; case Ne: 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 nn: 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 ? Wp : a, s = n.rootBoundary, l = s === void 0 ? hs : 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 = ys(typeof p != "number" ? p : bs(p, jn)), g = c === Tn ? qp : Tn, y = e.rects.popper, C = e.elements[f ? g : c], O = Eh(on(C) ? C : C.contextElement || kt(e.elements.popper), r, l), T = rn(e.elements.reference), I = Es({ 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 K = N[i]; Object.keys($).forEach(function(B) { var M = [Ne, De].indexOf(B) >= 0 ? 1 : -1, W = [Te, De].indexOf(B) >= 0 ? "y" : "x"; $[B] += K[W] * M; }); } return $; } function Ih(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 ? xo : l, c = sn(o), d = c ? s ? Ga : Ga.filter(function(p) { return sn(p) === c; }) : jn, 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 kh(e) { if (Qe(e) === Di) return []; var t = po(e); return [Za(e), t, Za(t)]; } function Th(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 ? [po(g)] : kh(g)), T = [g].concat(O).reduce(function(Ge, Ce) { return Ge.concat(Qe(Ce) === Di ? Ih(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], K = 0; K < T.length; K++) { var B = T[K], M = Qe(B), W = sn(B) === nn, de = [Te, De].indexOf(M) >= 0, Y = de ? "width" : "height", D = Nn(t, { placement: B, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), ne = de ? W ? Ne : Ae : W ? De : Te; I[Y] > k[Y] && (ne = po(ne)); var xe = po(ne), ye = []; if (a && ye.push(D[M] <= 0), s && ye.push(D[ne] <= 0, D[xe] <= 0), ye.every(function(Ge) { return Ge; })) { N = B, $ = !1; break; } A.set(B, ye); } if ($) for (var be = p ? 3 : 1, _e = function(Ge) { var Ce = T.find(function(ue) { var Tt = A.get(ue); if (Tt) return Tt.slice(0, Ge).every(function(ht) { return ht; }); }); if (Ce) return N = Ce, "break"; }, qe = be; qe > 0; qe--) { var jt = _e(qe); if (jt === "break") break; } t.placement !== N && (t.modifiersData[o]._skip = !0, t.placement = N, t.reset = !0); } } var Ah = { name: "flip", enabled: !0, phase: "main", fn: Th, requiresIfExists: ["offset"], data: { _skip: !1 } }; function Xa(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 er(e) { return [Te, Ne, De, Ae].some(function(t) { return e[t] >= 0; }); } function Oh(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 = Xa(r, o), u = Xa(s, i, a), c = er(l), d = er(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 Mh = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: Oh }; function _h(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, Ne].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 = xo.reduce(function(c, d) { return c[d] = _h(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 xh(e) { var t = e.state, n = e.name; t.modifiersData[n] = Es({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var Is = { name: "popperOffsets", enabled: !0, phase: "read", fn: xh, data: {} }; function Fh(e) { return e === "x" ? "y" : "x"; } function Rh(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 = sn(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, K = 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" ? De : Ne, D = T === "y" ? "height" : "width", ne = k[T], xe = ne + g[de], ye = ne - g[Y], be = m ? -$[D] / 2 : 0, _e = C === nn ? A[D] : $[D], qe = C === nn ? -$[D] : -A[D], jt = t.elements.arrow, Ge = m && jt ? Bi(jt) : { width: 0, height: 0 }, Ce = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : gs(), ue = Ce[de], Tt = Ce[Y], ht = _n(0, A[D], Ge[D]), qn = O ? A[D] / 2 - be - ht - ue - K.mainAxis : _e - ht - ue - K.mainAxis, Gn = O ? -A[D] / 2 + be + ht + Tt + K.mainAxis : qe + ht + Tt + K.mainAxis, mn = t.elements.arrow && Kn(t.elements.arrow), Ho = mn ? T === "y" ? mn.clientTop || 0 : mn.clientLeft || 0 : 0, Jn = (W = B == null ? void 0 : B[T]) != null ? W : 0, jo = ne + qn - Jn - Ho, Ko = ne + Gn - Jn, At = _n(m ? So(xe, jo) : xe, ne, m ? Ft(ye, Ko) : ye); k[T] = At, M[T] = At - ne; } if (s) { var vn, Kt = T === "x" ? Te : Ae, Yn = T === "x" ? De : Ne, nt = k[I], Ut = I === "y" ? "height" : "width", gn = nt + g[Kt], Zn = nt - g[Yn], Ot = [Te, Ae].indexOf(y) !== -1, yn = (vn = B == null ? void 0 : B[I]) != null ? vn : 0, bn = Ot ? gn : nt - A[Ut] - $[Ut] - yn + K.altAxis, wn = Ot ? nt + A[Ut] + $[Ut] - yn - K.altAxis : Zn, Sn = m && Ot ? lh(bn, nt, wn) : _n(m ? bn : gn, nt, m ? wn : Zn); k[I] = Sn, M[I] = Sn - nt; } t.modifiersData[o] = M; } } var $h = { name: "preventOverflow", enabled: !0, phase: "main", fn: Rh, requiresIfExists: ["offset"] }; function Dh(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function Nh(e) { return e === We(e) || !$e(e) ? zi(e) : Dh(e); } function Bh(e) { var t = e.getBoundingClientRect(), n = an(t.width) / e.offsetWidth || 1, o = an(t.height) / e.offsetHeight || 1; return n !== 1 || o !== 1; } function Vh(e, t, n) { n === void 0 && (n = !1); var o = $e(t), i = $e(t) && Bh(t), a = kt(t), r = rn(e, i), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (o || !o && !n) && ((et(t) !== "body" || ji(a)) && (s = Nh(t)), $e(t) ? (l = rn(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 zh(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 Hh(e) { var t = zh(e); return oh.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 Kh(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 tr = { placement: "bottom", modifiers: [], strategy: "absolute" }; function nr() { 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 Ki(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, o = n === void 0 ? [] : n, i = t.defaultOptions, a = i === void 0 ? tr : i; return function(r, s, l) { l === void 0 && (l = a); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, tr, 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: on(r) ? Pn(r) : r.contextElement ? Pn(r.contextElement) : [], popper: Pn(s) }; var y = Hh(Kh([].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 (nr(g, y)) { u.rects = { reference: Vh(g, Kn(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 (!nr(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; }; } Ki(); var Uh = [Ss, Is, ws, ms]; Ki({ defaultModifiers: Uh }); var Wh = [Ss, Is, ws, ms, Lh, Ah, $h, fh, Mh], qh = Ki({ defaultModifiers: Wh }); const Gh = (e, t, n = {}) => { const o = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = Jh(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 = mo(), r = P({ 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 = qh(l, u, v(i))); }), Be(() => { 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 Jh(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 ks = (e) => { if (!e) return { onClick: Lt, onMousedown: Lt, onMouseup: Lt }; 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 or() { 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 }, Yh = Symbol("elIdInjection"), Ts = () => ge() ? G(Yh, vi) : vi, Dt = (e) => { const t = Ts(); !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 Qt = []; const ir = (e) => { const t = e; t.key === $n.esc && Qt.forEach((n) => n(t)); }, Zh = (e) => { he(() => { Qt.length === 0 && document.addEventListener("keydown", ir), se && Qt.push(e); }), Be(() => { Qt = Qt.filter((t) => t !== e), Qt.length === 0 && se && document.removeEventListener("keydown", ir); }); }; let ar; const As = () => { const e = $i(), t = Ts(), n = b(() => `${e.value}-popper-container-${t.prefix}`), o = b(() => `#${n.value}`); return { id: n, selector: o }; }, Qh = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, Xh = () => { const { id: e, selector: t } = As(); return Hl(() => { se && (process.env.NODE_ENV === "test" || !ar || !document.body.querySelector(t.value)) && (ar = Qh(e.value)); }), { id: e, selector: t }; }, em = Q({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), tm = ({ showAfter: e, hideAfter: t, autoClose: n, open: o, close: i }) => { const { registerTimeout: a } = or(), { registerTimeout: r, cancelTimeout: s } = or(); 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)); } }; }, Os = Symbol("elForwardRef"), nm = (e) => { pe(Os, { setForwardRef: (n) => { e.value = n; } }); }, om = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), rr = { current: 0 }, sr = P(0), Ms = 2e3, lr = Symbol("elZIndexContextKey"), _s = Symbol("zIndexContextKey"), Ui = (e) => { const t = ge() ? G(lr, rr) : rr, n = e || (ge() ? G(_s, void 0) : void 0), o = b(() => { const r = v(n); return me(r) ? r : Ms; }), i = b(() => o.value + sr.value), a = () => (t.current++, sr.value = t.current, i.value); return !se && !G(lr) && 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 }; }, dn = Lo({ type: String, values: cs, required: !1 }), Ps = Symbol("size"), im = () => { const e = G(Ps, {}); return b(() => v(e.size) || ""); }; function am(e, { beforeFocus: t, afterFocus: n, beforeBlur: o, afterBlur: i } = {}) { const a = ge(), { emit: r } = a, s = mo(), l = P(!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"); }), ze(s, "focus", u, !0), ze(s, "blur", c, !0), ze(s, "click", d, !0), process.env.NODE_ENV === "test" && he(() => { const f = xt(e.value) ? e.value : document.querySelector("input,textarea"); f && (ze(f, "focus", u, !0), ze(f, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function rm({ afterComposition: e, emit: t }) { const n = P(!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 = !Rp(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"), sm = "use-empty-values", lm = ["", void 0, null], um = void 0, cm = Q({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => Se(e) ? !e() : !e } }), dm = (e, t) => { const n = ge() ? G(Ls, P({})) : P({}), o = b(() => e.emptyValues || n.value.emptyValues || lm), 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 : um), a = (r) => o.value.includes(r); return o.value.includes(i.value) || Oe(sm, "value-on-clear should be a value of empty-values"), { emptyValues: o, valueOnClear: i, isEmptyValue: a }; }, fm = Q({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), Ht = (e) => as(fm, e), xs = Symbol(), Co = P(); function Ro(e, t = void 0) { const n = ge() ? G(xs, Co) : Co; return e ? b(() => { var o, i; return (i = (o = n.value) == null ? void 0 : o[e]) != null ? i : t; }) : n; } function pm(e, t) { const n = Ro(), o = te(e, b(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || Mn; })), i = Ri(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) || Ms; })), r = b(() => { var s; return v(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return hm(b(() => v(n) || {})), { ns: o, locale: i, zIndex: a, size: r }; } const hm = (e, t, n = !1) => { var o; const i = !!ge(), a = i ? Ro() : 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 ? mm(a.value, l) : l; }); return r(xs, s), r(ds, b(() => s.value.locale)), r(fs, b(() => s.value.namespace)), r(_s, b(() => s.value.zIndex)), r(Ps, { size: b(() => s.value.size || "") }), r(Ls, b(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !Co.value) && (Co.value = s.value), s; }, mm = (e, t) => { const n = [.../* @__PURE__ */ new Set([...Wa(e), ...Wa(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 vm = Q({ size: { type: U([Number, String]) }, color: { type: String } }), gm = H({ name: "ElIcon", inheritAttrs: !1 }), ym = /* @__PURE__ */ H({ ...gm, props: vm, 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(), x("i", Nt({ class: v(n).b(), style: v(o) }, i.$attrs), [ j(i.$slots, "default") ], 16)); } }); var bm = /* @__PURE__ */ X(ym, [["__file", "icon.vue"]]); const Ue = Me(bm), Wi = Symbol("formContextKey"), Eo = Symbol("formItemContextKey"), ln = (e, t = {}) => { const n = P(void 0), o = t.prop ? n : ps("size"), i = t.global ? n : im(), a = t.form ? { size: void 0 } : G(Wi, void 0), r = t.formItem ? { size: void 0 } : G(Eo, void 0); return b(() => o.value || v(e) || (r == null ? void 0 : r.size) || (a == null ? void 0 : a.size) || i.value || ""); }, $o = (e) => { const t = ps("disabled"), n = G(Wi, void 0); return b(() => t.value || v(e) || (n == null ? void 0 : n.disabled) || !1); }, fn = () => { const e = G(Wi, void 0), t = G(Eo, void 0); return { form: e, formItem: t }; }, Do = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: o }) => { n || (n = P(!1)), o || (o = P(!1)); const i = P(); 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 }; }, qt = 4, wm = { 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" } }, Sm = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), qi = Symbol("scrollbarContextKey"), Cm = Q({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), Em = "Thumb", Im = /* @__PURE__ */ H({ __name: "thumb", props: Cm, setup(e) { const t = e, n = G(qi), o = te("scrollbar"); n || ss(Em, "can not inject scrollbar context"); const i = P(), a = P(), r = P({}), s = P(!1); let l = !1, u = !1, c = se ? document.onselectstart : null; const d = b(() => wm[t.vertical ? "vertical" : "horizontal"]), f = b(() => Sm({ 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, K = ($ - N) * 100 * m.value / i.value[d.value.offset]; n.wrapElement[d.value.scroll] = K * 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; }; Be(() => { I(), document.removeEventListener("mouseup", C); }); const I = () => { document.onselectstart !== c && (document.onselectstart = c); }; return ze(Ze(n, "scrollbarElement"), "mousemove", O), ze(Ze(n, "scrollbarElement"), "mouseleave", T), (k, A) => (w(), z(Vn, { name: v(o).b("fade"), persisted: "" }, { default: E(() => [ ie(F("div", { ref_key: "instance", ref: i, class: _([v(o).e("bar"), v(o).is(v(d).key)]), onMousedown: h }, [ F("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 ur = /* @__PURE__ */ X(Im, [["__file", "thumb.vue"]]); const km = Q({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), Tm = /* @__PURE__ */ H({ __name: "bar", props: km, setup(e, { expose: t }) { const n = e, o = G(qi), i = P(0), a = P(0), r = P(""), s = P(""), l = P(1), u = P(1); return t({ handleScroll: (f) => { if (f) { const m = f.offsetHeight - qt, p = f.offsetWidth - qt; 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 - qt, p = f.offsetWidth - qt, 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 + qt < m ? `${y}px` : "", r.value = C + qt < p ? `${C}px` : ""; } }), (f, m) => (w(), x(fe, null, [ L(ur, { move: i.value, ratio: u.value, size: r.value, always: f.always }, null, 8, ["move", "ratio", "size", "always"]), L(ur, { move: a.value, ratio: l.value, size: s.value, vertical: "", always: f.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var Am = /* @__PURE__ */ X(Tm, [["__file", "bar.vue"]]); const Om = 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"]) }), Mm = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(me) }, gi = "ElScrollbar", _m = H({ name: gi }), Pm = /* @__PURE__ */ H({ ..._m, props: Om, emits: Mm, setup(e, { expose: t, emit: n }) { const o = e, i = te("scrollbar"); let a, r, s = 0, l = 0; const u = P(), c = P(), d = P(), f = P(), 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 = ze("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 })), Kl(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), he(() => { o.native || ce(() => { T(); }); }), Ul(() => T()), t({ wrapRef: c, update: T, scrollTo: y, setScrollTop: C, setScrollLeft: O, handleScroll: g }), (I, k) => (w(), x("div", { ref_key: "scrollbarRef", ref: u, class: _(v(i).b()) }, [ F("div", { ref_key: "wrapRef", ref: c, class: _(v(p)), style: re(v(m)), tabindex: I.tabindex, onScroll: g }, [ (w(), z(Re(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(() => [ j(I.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), I.native ? V("v-if", !0) : (w(), z(Am, { 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 xm = Me(Lm), Gi = Symbol("popper"), Fs = Symbol("popperContent"), Fm = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], Rs = Q({ role: { type: String, values: Fm, default: "tooltip" } }), Rm = H({ name: "ElPopper", inheritAttrs: !1 }), $m = /* @__PURE__ */ H({ ...Rm, props: Rs, setup(e, { expose: t }) { const n = e, o = P(), i = P(), a = P(), r = P(), s = b(() => n.role), l = { triggerRef: o, popperInstanceRef: i, contentRef: a, referenceRef: r, role: s }; return t(l), pe(Gi, l), (u, c) => j(u.$slots, "default"); } }); var Dm = /* @__PURE__ */ X($m, [["__file", "popper.vue"]]); const $s = Q({ arrowOffset: { type: Number, default: 5 } }), Nm = H({ name: "ElPopperArrow", inheritAttrs: !1 }), Bm = /* @__PURE__ */ H({ ...Nm, props: $s, 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; }), Be(() => { a.value = void 0; }), t({ arrowRef: a }), (s, l) => (w(), x("span", { ref_key: "arrowRef", ref: a, class: _(v(o).e("arrow")), style: re(v(r)), "data-popper-arrow": "" }, null, 6)); } }); var Vm = /* @__PURE__ */ X(Bm, [["__file", "arrow.vue"]]); const Zo = "ElOnlyChild", zm = H({ name: Zo, setup(e, { slots: t, attrs: n }) { var o; const i = G(Os), a = om((o = i == null ? void 0 : i.setForwardRef) != null ? o : Lt); 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 = Ds(s); return l ? ie(Wl(l, n), [[a]]) : (Oe(Zo, "no valid child node found"), null); }; } }); function Ds(e) { if (!e) return null; const t = e; for (const n of t) { if (ke(n)) switch (n.type) { case ql: continue; case $r: case "svg": return cr(n); case fe: return Ds(n.children); default: return n; } return cr(n); } return null; } function cr(e) { const t = te("only-child"); return L("span", { class: t.e("content") }, [e]); } const Ns = 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 }), Hm = H({ name: "ElPopperTrigger", inheritAttrs: !1 }), jm = /* @__PURE__ */ H({ ...Hm, props: Ns, setup(e, { expose: t }) { const n = e, { role: o, triggerRef: i } = G(Gi, void 0); nm(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, xt(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 })), xt(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((m) => f.removeAttribute(m)); }, { immediate: !0 }); }), Be(() => { if (u == null || u(), u = void 0, i.value && xt(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(zm), Nt({ key: 0 }, d.$attrs, { "aria-controls": v(a), "aria-describedby": v(r), "aria-expanded": v(l), "aria-haspopup": v(s) }), { default: E(() => [ j(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var Km = /* @__PURE__ */ X(jm, [["__file", "trigger.vue"]]); const Qo = "focus-trap.focus-after-trapped", Xo = "focus-trap.focus-after-released", Um = "focus-trap.focusout-prevented", dr = { cancelable: !0, bubbles: !1 }, Wm = { cancelable: !0, bubbles: !1 }, fr = "focusAfterTrapped", pr = "focusAfterReleased", Bs = Symbol("elFocusTrap"), Ji = P(), No = P(0), Yi = P(0); let io = 0; const Vs = (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; }, hr = (e, t) => { for (const n of e) if (!qm(n, t)) return n; }, qm = (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; }, Gm = (e) => { const t = Vs(e), n = hr(t, e), o = hr(t.reverse(), e); return [n, o]; }, Jm = (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 && Jm(e) && t && e.select(); } }; function mr(e, t) { const n = [...e], o = e.indexOf(t); return o !== -1 && n.splice(o, 1), n; } const Ym = () => { let e = []; return { push: (o) => { const i = e[0]; i && o !== i && i.pause(), e = mr(e, o), e.unshift(o); }, remove: (o) => { var i, a; e = mr(e, o), (a = (i = e[0]) == null ? void 0 : i.resume) == null || a.call(i); } }; }, Zm = (e, t = !1) => { const n = document.activeElement; for (const o of e) if (gt(o, t), document.activeElement !== n) return; }, vr = Ym(), Qm = () => No.value > Yi.value, ao = () => { Ji.value = "pointer", No.value = window.performance.now(); }, gr = () => { Ji.value = "keyboard", No.value = window.performance.now(); }, Xm = () => (he(() => { io === 0 && (document.addEventListener("mousedown", ao), document.addEventListener("touchstart", ao), document.addEventListener("keydown", gr)), io++; }), Be(() => { io--, io <= 0 && (document.removeEventListener("mousedown", ao), document.removeEventListener("touchstart", ao), document.removeEventListener("keydown", gr)); }), { focusReason: Ji, lastUserFocusTimestamp: No, lastAutomatedFocusTimestamp: Yi }), ro = (e) => new CustomEvent(Um, { ...Wm, detail: e }), ev = H({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ fr, pr, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = P(); let o, i; const { focusReason: a } = Xm(); Zh((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, K] = Gm($); if (N && K) { if (!T && A === K) { const M = ro({ focusReason: a.value }); t("focusout-prevented", M), M.defaultPrevented || (p.preventDefault(), I && gt(N, !0)); } else if (T && [N, $].includes(A)) { const M = ro({ focusReason: a.value }); t("focusout-prevented", M), M.defaultPrevented || (p.preventDefault(), I && gt(K, !0)); } } else if (A === $) { const M = ro({ focusReason: a.value }); t("focusout-prevented", M), M.defaultPrevented || p.preventDefault(); } } }; pe(Bs, { 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(fr, p); }, u = (p) => t(pr, 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 = ro({ 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) { vr.push(r); const h = p.contains(document.activeElement) ? o : document.activeElement; if (o = h, !p.contains(h)) { const y = new Event(Qo, dr); 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" && Zm(Vs(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, { ...dr, detail: { focusReason: a.value } }); p.addEventListener(Xo, u), p.dispatchEvent(h), !h.defaultPrevented && (a.value == "keyboard" || !Qm() || p.contains(document.activeElement)) && gt(o ?? document.body), p.removeEventListener(Xo, u), vr.remove(r); } } return he(() => { e.trapped && f(), q(() => e.trapped, (p) => { p ? f() : m(); }); }), Be(() => { 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 tv(e, t, n, o, i, a) { return j(e.$slots, "default", { handleKeydown: e.onKeydown }); } var zs = /* @__PURE__ */ X(ev, [["render", tv], ["__file", "focus-trap.vue"]]); const nv = ["fixed", "absolute"], ov = 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: xo, default: "bottom" }, popperOptions: { type: U(Object), default: () => ({}) }, strategy: { type: String, values: nv, default: "absolute" } }), Hs = Q({ ...ov, 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"]) }), iv = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, av = (e, t = []) => { const { placement: n, strategy: o, popperOptions: i } = e, a = { placement: n, strategy: o, ...i, modifiers: [...sv(e), ...t] }; return lv(a, i == null ? void 0 : i.modifiers), a; }, rv = (e) => { if (se) return rt(e); }; function sv(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 lv(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const uv = 0, cv = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: o, role: i } = G(Gi, void 0), a = P(), r = P(), s = b(() => ({ name: "eventListeners", enabled: !!e.visible })), l = b(() => { var y; const C = v(a), O = (y = v(r)) != null ? y : uv; return { name: "arrow", enabled: !is(C), options: { element: C, padding: O } }; }), u = b(() => ({ onFirstUpdate: () => { p(); }, ...av(e, [ v(l), v(s) ]) })), c = b(() => rv(e.referenceEl) || v(o)), { attributes: d, state: f, styles: m, update: p, forceUpdate: h, instanceRef: g } = Gh(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 }; }, dv = (e, { attributes: t, styles: n, role: o }) => { const { nextZIndex: i } = Ui(), a = te("popper"), r = b(() => v(t).popper), s = P(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(); } }; }, fv = (e, t) => { const n = P(!1), o = P(); 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"); } }; }, pv = H({ name: "ElPopperContent" }), hv = /* @__PURE__ */ H({ ...pv, props: Hs, emits: iv, setup(e, { expose: t, emit: n }) { const o = e, { focusStartRef: i, trapped: a, onFocusAfterReleased: r, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = fv(o, n), { attributes: d, arrowRef: f, contentRef: m, styles: p, instanceRef: h, role: g, update: y } = cv(o), { ariaModal: C, arrowStyle: O, contentAttrs: T, contentClass: I, contentStyle: k, updateZIndex: A } = dv(o, { styles: p, attributes: d, role: g }), $ = G(Eo, void 0), N = P(); pe(Fs, { arrowStyle: O, arrowRef: f, arrowOffset: N }), $ && pe(Eo, { ...$, addInputId: Lt, removeInputId: Lt }); let K; 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) => { K == null || K(), K = void 0; const Y = v(W || m.value), D = v(de || m.value); xt(Y) && (K = q([g, () => o.ariaLabel, C, () => o.id], (ne) => { ["role", "aria-label", "aria-modal", "id"].forEach((xe, ye) => { Po(ne[ye]) ? Y.removeAttribute(xe) : Y.setAttribute(xe, ne[ye]); }); }, { immediate: !0 })), D !== Y && xt(D) && ["role", "aria-label", "aria-modal", "id"].forEach((ne) => { D.removeAttribute(ne); }); }, { immediate: !0 }), q(() => o.visible, M, { immediate: !0 }); }), Be(() => { K == null || K(), K = void 0; }), t({ popperContentRef: m, popperInstanceRef: h, updatePopper: B, contentStyle: k }), (W, de) => (w(), x("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) }), [ L(v(zs), { 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(() => [ j(W.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var mv = /* @__PURE__ */ X(hv, [["__file", "content.vue"]]); const vv = Me(Dm), Zi = Symbol("elTooltip"), Le = Q({ ...em, ...Hs, 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({ ...Ns, disabled: Boolean, trigger: { type: U([String, Array]), default: "hover" }, triggerKeys: { type: U(Array), default: () => [$n.enter, $n.space] } }), { useModelToggleProps: gv, useModelToggleEmits: yv, useModelToggle: bv } = Up("visible"), wv = Q({ ...Rs, ...gv, ...Le, ...Bn, ...$s, showArrow: { type: Boolean, default: !0 } }), Sv = [ ...yv, "before-show", "before-hide", "show", "hide", "open", "close" ], Cv = (e, t) => Ie(e) ? e.includes(t) : e === t, Gt = (e, t, n) => (o) => { Cv(v(e), t) && n(o); }, Ev = H({ name: "ElTooltipTrigger" }), Iv = /* @__PURE__ */ H({ ...Ev, 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 = P(null), d = () => { if (v(i) || n.disabled) return !0; }, f = Ze(n, "trigger"), m = it(d, Gt(f, "hover", s)), p = it(d, Gt(f, "hover", l)), h = it(d, Gt(f, "click", (T) => { T.button === 0 && u(T); })), g = it(d, Gt(f, "focus", s)), y = it(d, Gt(f, "focus", l)), C = it(d, Gt(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(Km), { 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(() => [ j(T.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var kv = /* @__PURE__ */ X(Iv, [["__file", "trigger.vue"]]); const Tv = Q({ to: { type: U([String, Object]), required: !0 }, disabled: Boolean }), Av = /* @__PURE__ */ H({ __name: "teleport", props: Tv, setup(e) { return (t, n) => t.disabled ? j(t.$slots, "default", { key: 0 }) : (w(), z(Gl, { key: 1, to: t.to }, [ j(t.$slots, "default") ], 8, ["to"])); } }); var Ov = /* @__PURE__ */ X(Av, [["__file", "teleport.vue"]]); const js = Me(Ov), Mv = H({ name: "ElTooltipContent", inheritAttrs: !1 }), _v = /* @__PURE__ */ H({ ...Mv, props: Le, setup(e, { expose: t }) { const n = e, { selector: o } = As(), i = te("tooltip"), a = P(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); Be(() => { 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 = P(!0), $ = () => { p(), A.value = !0; }, N = () => { if (v(s)) return !0; }, K = 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 = hu(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(() => [ L(Vn, { name: v(y), onAfterLeave: $, onBeforeEnter: M, onAfterEnter: de, onBeforeLeave: W }, { default: E(() => [ v(O) ? ie((w(), z(v(mv), 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(K), onMouseleave: v(B), onBlur: Y, onClose: v(d) }), { default: E(() => [ j(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(_v, [["__file", "content.vue"]]); const Lv = H({ name: "ElTooltip" }), xv = /* @__PURE__ */ H({ ...Lv, props: wv, emits: Sv, setup(e, { expose: t, emit: n }) { const o = e; Xh(); const i = Dt(), a = P(), r = P(), s = () => { var y; const C = v(a); C && ((y = C.popperInstanceRef) == null || y.update()); }, l = P(!1), u = P(), { show: c, hide: d, hasUpdateHandler: f } = bv({ indicator: l, toggleReason: u }), { onOpen: m, onClose: p } = tm({ 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 Jl(() => l.value && d()), t({ popperRef: a, contentRef: r, isFocusInsideContent: g, updatePopper: s, onOpen: m, onClose: p, hide: d }), (y, C) => (w(), z(v(vv), { ref_key: "popperRef", ref: a, role: y.role }, { default: E(() => [ L(kv, { disabled: y.disabled, trigger: y.trigger, "trigger-keys": y.triggerKeys, "virtual-ref": y.virtualRef, "virtual-triggering": y.virtualTriggering }, { default: E(() => [ y.$slots.default ? j(y.$slots, "default", { key: 0 }) : V("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), L(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(() => [ j(y.$slots, "content", {}, () => [ y.rawContent ? (w(), x("span", { key: 0, innerHTML: y.content }, null, 8, ["innerHTML"])) : (w(), x("span", { key: 1 }, ee(y.content), 1)) ]), y.showArrow ? (w(), z(v(Vm), { 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(xv, [["__file", "tooltip.vue"]]); const Ks = Me(Fv), Us = Symbol("buttonGroupContextKey"), Rv = (e, t) => { Xt({ 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(Us, void 0), o = Ro("button"), { form: i } = fn(), a = ln(b(() => n == null ? void 0 : n.size)), r = $o(), s = P(), l = Io(), 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) === $r) { 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); } }; }, $v = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], Dv = ["button", "submit", "reset"], yi = Q({ size: dn, disabled: Boolean, type: { type: String, values: $v, default: "" }, icon: { type: tn }, nativeType: { type: String, values: Dv, default: "button" }, loading: Boolean, loadingIcon: { type: tn, default: () => Or }, 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" } }), Nv = { click: (e) => e instanceof MouseEvent }; function ve(e, t) { Bv(e) && (e = "100%"); var n = Vv(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 so(e) { return Math.min(1, Math.max(0, e)); } function Bv(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function Vv(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function Ws(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function lo(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function Pt(e) { return e.length === 1 ? "0" + e : String(e); } function zv(e, t, n) { return { r: ve(e, 255) * 255, g: ve(t, 255) * 255, b: ve(n, 255) * 255 }; } function yr(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 Hv(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 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 = 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 wr(e, t, n, o) { var i = [ Pt(Math.round(e).toString(16)), Pt(Math.round(t).toString(16)), Pt(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 Kv(e, t, n, o, i) { var a = [ Pt(Math.round(e).toString(16)), Pt(Math.round(t).toString(16)), Pt(Math.round(n).toString(16)), Pt(Uv(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 Uv(e) { return Math.round(parseFloat(e) * 255).toString(16); } function Sr(e) { return Pe(e) / 255; } function Pe(e) { return parseInt(e, 16); } function Wv(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 qv(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 = Yv(e)), typeof e == "object" && (ot(e.r) && ot(e.g) && ot(e.b) ? (t = zv(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 = lo(e.s), i = lo(e.v), t = jv(e.h, o, i), r = !0, s = "hsv") : ot(e.h) && ot(e.s) && ot(e.l) && (o = lo(e.s), a = lo(e.l), t = Hv(e.h, o, a), r = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = Ws(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 Gv = "[-\\+]?\\d+%?", Jv = "[-\\+]?\\d*\\.\\d+%?", Et = "(?:".concat(Jv, ")|(?:").concat(Gv, ")"), 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*\\)?"), Ve = { 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 Yv(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 = Ve.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = Ve.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Ve.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Ve.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Ve.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Ve.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Ve.hex8.exec(e), n ? { r: Pe(n[1]), g: Pe(n[2]), b: Pe(n[3]), a: Sr(n[4]), format: t ? "name" : "hex8" } : (n = Ve.hex6.exec(e), n ? { r: Pe(n[1]), g: Pe(n[2]), b: Pe(n[3]), format: t ? "name" : "hex" } : (n = Ve.hex4.exec(e), n ? { r: Pe(n[1] + n[1]), g: Pe(n[2] + n[2]), b: Pe(n[3] + n[3]), a: Sr(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = Ve.hex3.exec(e), n ? { r: Pe(n[1] + n[1]), g: Pe(n[2] + n[2]), b: Pe(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function ot(e) { return !!Ve.CSS_UNIT.exec(String(e)); } var Zv = ( /** @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 = Wv(t)), this.originalInput = t; var i = qv(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 = Ws(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 = br(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 = br(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 = yr(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 = yr(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), wr(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), Kv(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 = "#" + wr(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 = so(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 = so(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 = so(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 = so(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 Qv(e) { const t = $o(), 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 Zv(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 Xv = H({ name: "ElButton" }), eg = /* @__PURE__ */ H({ ...Xv, props: yi, emits: Nv, setup(e, { expose: t, emit: n }) { const o = e, i = Qv(o), a = te("button"), { _ref: r, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = Rv(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(Re(p.tag), Nt({ ref_key: "_ref", ref: r }, v(c), { class: v(m), style: v(i), onClick: v(f) }), { default: E(() => [ p.loading ? (w(), x(fe, { key: 0 }, [ p.$slots.loading ? j(p.$slots, "loading", { key: 0 }) : (w(), z(v(Ue), { key: 1, class: _(v(a).is("loading")) }, { default: E(() => [ (w(), z(Re(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? (w(), z(v(Ue), { key: 1 }, { default: E(() => [ p.icon ? (w(), z(Re(p.icon), { key: 0 })) : j(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : V("v-if", !0), p.$slots.default ? (w(), x("span", { key: 2, class: _({ [v(a).em("text", "expand")]: v(d) }) }, [ j(p.$slots, "default") ], 2)) : V("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var tg = /* @__PURE__ */ X(eg, [["__file", "button.vue"]]); const ng = { size: yi.size, type: yi.type }, og = H({ name: "ElButtonGroup" }), ig = /* @__PURE__ */ H({ ...og, props: ng, setup(e) { const t = e; pe(Us, ut({ size: Ze(t, "size"), type: Ze(t, "type") })); const n = te("button"); return (o, i) => (w(), x("div", { class: _(v(n).b("group")) }, [ j(o.$slots, "default") ], 2)); } }); var qs = /* @__PURE__ */ X(ig, [["__file", "button-group.vue"]]); const Qi = Me(tg, { ButtonGroup: qs }); zt(qs); var ag = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function rg(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 Cr(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : xt(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 sg = { beforeMount(e, t) { yt.has(e) || yt.set(e, []), yt.get(e).push({ documentHandler: Cr(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: Cr(e, t), bindingFn: t.value }; o >= 0 ? n.splice(o, 1, i) : n.push(i); }, unmounted(e) { yt.delete(e); } }, Gs = { 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: dn, tabindex: [String, Number], validateEvent: { type: Boolean, default: !0 }, ...Ht(["ariaControls"]) }, Js = { [we]: (e) => je(e) || me(e) || ct(e), change: (e) => je(e) || me(e) || ct(e) }, pn = Symbol("checkboxGroupContextKey"), lg = ({ model: e, isChecked: t }) => { const n = G(pn, 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: $o(b(() => (n == null ? void 0 : n.disabled.value) || o.value)), isLimitDisabled: o }; }, ug = (e, { model: t, isLimitExceeded: n, hasOwnLabel: o, isDisabled: i, isLabeledByFormItem: a }) => { const r = G(pn, void 0), { formItem: s } = fn(), { 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 }; }, cg = (e) => { const t = P(!1), { emit: n } = ge(), o = G(pn, void 0), i = b(() => Ct(o) === !1), a = P(!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 }; }, dg = (e, t, { model: n }) => { const o = G(pn, void 0), i = P(!1), a = b(() => Fn(e.value) ? e.label : e.value), r = b(() => { const c = n.value; return ct(c) ? c : Ie(c) ? ke(a.value) ? c.map(vo).some((d) => wo(d, a.value)) : c.map(vo).includes(a.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c; }), s = ln(b(() => { var c; return (c = o == null ? void 0 : o.size) == null ? void 0 : c.value; }), { prop: !0 }), l = ln(b(() => { var c; return (c = o == null ? void 0 : o.size) == null ? void 0 : c.value; })), u = b(() => !!t.default || !Fn(a.value)); return { checkboxButtonSize: s, isChecked: r, isFocused: i, checkboxSize: l, hasOwnLabel: u, actualValue: a }; }, Ys = (e, t) => { const { formItem: n } = fn(), { model: o, isGroup: i, isLimitExceeded: a } = cg(e), { isFocused: r, isChecked: s, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, actualValue: d } = dg(e, t, { model: o }), { isDisabled: f } = lg({ model: o, isChecked: s }), { inputId: m, isLabeledByFormItem: p } = Do(e, { formItemContext: n, disableIdGeneration: c, disableIdManagement: i }), { handleChange: h, onClickRoot: g } = ug(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(); })(), Xt({ 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 && Fn(e.value))), Xt({ 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)), Xt({ 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 }; }, fg = H({ name: "ElCheckbox" }), pg = /* @__PURE__ */ H({ ...fg, props: Gs, emits: Js, setup(e) { const t = e, n = Io(), { inputId: o, isLabeledByFormItem: i, isChecked: a, isDisabled: r, isFocused: s, checkboxSize: l, hasOwnLabel: u, model: c, actualValue: d, handleChange: f, onClickRoot: m } = Ys(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(Re(!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 [ F("span", { class: _(v(g)) }, [ y.trueValue || y.falseValue || y.trueLabel || y.falseLabel ? ie((w(), x("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"])), [ [go, v(c)] ]) : ie((w(), x("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"])), [ [go, v(c)] ]), F("span", { class: _(v(p).e("inner")) }, null, 2) ], 2), v(u) ? (w(), x("span", { key: 0, class: _(v(p).e("label")) }, [ j(y.$slots, "default"), y.$slots.default ? V("v-if", !0) : (w(), x(fe, { key: 0 }, [ Z(ee(y.label), 1) ], 64)) ], 2)) : V("v-if", !0) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var hg = /* @__PURE__ */ X(pg, [["__file", "checkbox.vue"]]); const mg = H({ name: "ElCheckboxButton" }), vg = /* @__PURE__ */ H({ ...mg, props: Gs, emits: Js, setup(e) { const t = e, n = Io(), { isFocused: o, isChecked: i, isDisabled: a, checkboxButtonSize: r, model: s, actualValue: l, handleChange: u } = Ys(t, n), c = G(pn, 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(), x("label", { class: _(v(m)) }, [ p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? ie((w(), x("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"])), [ [go, v(s)] ]) : ie((w(), x("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"])), [ [go, v(s)] ]), p.$slots.default || p.label ? (w(), x("span", { key: 2, class: _(v(d).be("button", "inner")), style: re(v(i) ? v(f) : void 0) }, [ j(p.$slots, "default", {}, () => [ Z(ee(p.label), 1) ]) ], 6)) : V("v-if", !0) ], 2); }; } }); var Zs = /* @__PURE__ */ X(vg, [["__file", "checkbox-button.vue"]]); const gg = Q({ modelValue: { type: U(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: dn, fill: String, textColor: String, tag: { type: String, default: "div" }, validateEvent: { type: Boolean, default: !0 }, ...Ht(["ariaLabel"]) }), yg = { [we]: (e) => Ie(e), change: (e) => Ie(e) }, bg = H({ name: "ElCheckboxGroup" }), wg = /* @__PURE__ */ H({ ...bg, props: gg, emits: yg, setup(e, { emit: t }) { const n = e, o = te("checkbox"), { formItem: i } = fn(), { inputId: a, isLabeledByFormItem: r } = Do(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(pn, { ...as(un(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(Re(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(() => [ j(u.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var Qs = /* @__PURE__ */ X(wg, [["__file", "checkbox-group.vue"]]); const Xs = Me(hg, { CheckboxButton: Zs, CheckboxGroup: Qs }); zt(Zs); const el = zt(Qs), tl = Q({ modelValue: { type: [String, Number, Boolean], default: void 0 }, size: dn, disabled: Boolean, label: { type: [String, Number, Boolean], default: void 0 }, value: { type: [String, Number, Boolean], default: void 0 }, name: { type: String, default: void 0 } }), Sg = Q({ ...tl, border: Boolean }), nl = { [we]: (e) => je(e) || me(e) || ct(e), [Fi]: (e) => je(e) || me(e) || ct(e) }, ol = Symbol("radioGroupKey"), il = (e, t) => { const n = P(), o = G(ol, void 0), i = b(() => !!o), a = b(() => Fn(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 = ln(b(() => o == null ? void 0 : o.size)), l = $o(b(() => o == null ? void 0 : o.disabled)), u = P(!1), c = b(() => l.value || i.value && r.value !== a.value ? -1 : 0); return Xt({ 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 && Fn(e.value))), { radioRef: n, isGroup: i, radioGroup: o, focus: u, size: s, disabled: l, tabIndex: c, modelValue: r, actualValue: a }; }, Cg = H({ name: "ElRadio" }), Eg = /* @__PURE__ */ H({ ...Cg, props: Sg, emits: nl, setup(e, { emit: t }) { const n = e, o = te("radio"), { radioRef: i, radioGroup: a, focus: r, size: s, disabled: l, modelValue: u, actualValue: c } = il(n, t); function d() { ce(() => t("change", u.value)); } return (f, m) => { var p; return w(), x("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)) ]) }, [ F("span", { class: _([ v(o).e("input"), v(o).is("disabled", v(l)), v(o).is("checked", v(u) === v(c)) ]) }, [ ie(F("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"]), [ [Dr, v(u)] ]), F("span", { class: _(v(o).e("inner")) }, null, 2) ], 2), F("span", { class: _(v(o).e("label")), onKeydown: le(() => { }, ["stop"]) }, [ j(f.$slots, "default", {}, () => [ Z(ee(f.label), 1) ]) ], 42, ["onKeydown"]) ], 2); }; } }); var Ig = /* @__PURE__ */ X(Eg, [["__file", "radio.vue"]]); const kg = Q({ ...tl }), Tg = H({ name: "ElRadioButton" }), Ag = /* @__PURE__ */ H({ ...Tg, props: kg, setup(e) { const t = e, n = te("radio"), { radioRef: o, focus: i, size: a, disabled: r, modelValue: s, radioGroup: l, actualValue: u } = il(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(), x("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(F("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"]), [ [Dr, v(s)] ]), F("span", { class: _(v(n).be("button", "inner")), style: re(v(s) === v(u) ? v(c) : {}), onKeydown: le(() => { }, ["stop"]) }, [ j(d.$slots, "default", {}, () => [ Z(ee(d.label), 1) ]) ], 46, ["onKeydown"]) ], 2); }; } }); var al = /* @__PURE__ */ X(Ag, [["__file", "radio-button.vue"]]); const Og = Q({ id: { type: String, default: void 0 }, size: dn, 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"]) }), Mg = nl, _g = H({ name: "ElRadioGroup" }), Pg = /* @__PURE__ */ H({ ..._g, props: Og, emits: Mg, setup(e, { emit: t }) { const n = e, o = te("radio"), i = Dt(), a = P(), { formItem: r } = fn(), { inputId: s, isLabeledByFormItem: l } = Do(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(ol, ut({ ...un(n), changeEvent: u, name: c })), q(() => n.modelValue, () => { n.validateEvent && (r == null || r.validate("change").catch((d) => Oe(d))); }), (d, f) => (w(), x("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 }, [ j(d.$slots, "default") ], 10, ["id", "aria-label", "aria-labelledby"])); } }); var rl = /* @__PURE__ */ X(Pg, [["__file", "radio-group.vue"]]); const sl = Me(Ig, { RadioButton: al, RadioGroup: rl }), ll = zt(rl); zt(al); 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: cs }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), Lg = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, xg = H({ name: "ElTag" }), Fg = /* @__PURE__ */ H({ ...xg, props: wi, emits: Lg, setup(e, { emit: t }) { const n = e, o = ln(), 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(), x("span", { key: 0, class: _(v(a)), style: re({ backgroundColor: u.color }), onClick: s }, [ F("span", { class: _(v(i).e("content")) }, [ j(u.$slots, "default") ], 2), u.closable ? (w(), z(v(Ue), { key: 0, class: _(v(i).e("close")), onClick: le(r, ["stop"]) }, { default: E(() => [ L(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(() => [ F("span", { class: _(v(a)), style: re({ backgroundColor: u.color }), onClick: s }, [ F("span", { class: _(v(i).e("content")) }, [ j(u.$slots, "default") ], 2), u.closable ? (w(), z(v(Ue), { key: 0, class: _(v(i).e("close")), onClick: le(r, ["stop"]) }, { default: E(() => [ L(v(ri)) ]), _: 1 }, 8, ["class", "onClick"])) : V("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var Rg = /* @__PURE__ */ X(Fg, [["__file", "tag.vue"]]); const $g = Me(Rg), ul = Symbol("rowContextKey"), Dg = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], Ng = ["top", "middle", "bottom"], Bg = Q({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: Dg, default: "start" }, align: { type: String, values: Ng } }), Vg = H({ name: "ElRow" }), zg = /* @__PURE__ */ H({ ...Vg, props: Bg, setup(e) { const t = e, n = te("row"), o = b(() => t.gutter); pe(ul, { 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(Re(r.tag), { class: _(v(a)), style: re(v(i)) }, { default: E(() => [ j(r.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var Hg = /* @__PURE__ */ X(zg, [["__file", "row.vue"]]); const Un = Me(Hg), 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({}) } }), Kg = H({ name: "ElCol" }), Ug = /* @__PURE__ */ H({ ...Kg, props: jg, setup(e) { const t = e, { gutter: n } = G(ul, { 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(Re(r.tag), { class: _(v(a)), style: re(v(i)) }, { default: E(() => [ j(r.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var Wg = /* @__PURE__ */ X(Ug, [["__file", "col.vue"]]); const Wn = Me(Wg), qg = Q({ mask: { type: Boolean, default: !0 }, customMaskEvent: Boolean, overlayClass: { type: U([ String, Array, Object ]) }, zIndex: { type: U([String, Number]) } }), Gg = { click: (e) => e instanceof MouseEvent }, Jg = "overlay"; var Yg = H({ name: "ElOverlay", props: qg, emits: Gg, setup(e, { slots: t, emit: n }) { const o = te(Jg), i = (l) => { n("click", l); }, { onClick: a, onMousedown: r, onMouseup: s } = ks(e.customMaskEvent ? void 0 : i); return () => e.mask ? L("div", { class: [o.b(), e.overlayClass], style: { zIndex: e.zIndex }, onClick: a, onMousedown: r, onMouseup: s }, [j(t, "default")], fo.STYLE | fo.CLASS | fo.PROPS, ["onClick", "onMouseup", "onMousedown"]) : Yt("div", { class: e.overlayClass, style: { zIndex: e.zIndex, position: "fixed", top: "0px", right: "0px", bottom: "0px", left: "0px" } }, [j(t, "default")]); } }); const Zg = Yg, cl = Symbol("dialogInjectionKey"), dl = Q({ center: Boolean, alignCenter: Boolean, closeIcon: { type: tn }, draggable: Boolean, overflow: Boolean, fullscreen: Boolean, showClose: { type: Boolean, default: !0 }, title: { type: String, default: "" }, ariaLevel: { type: String, default: "2" } }), Qg = { close: () => !0 }, Xg = H({ name: "ElDialogContent" }), ey = /* @__PURE__ */ H({ ...Xg, props: dl, emits: Qg, setup(e, { expose: t }) { const n = e, { t: o } = Ri(), { Close: i } = Pp, { dialogRef: a, headerRef: r, bodyId: s, ns: l, style: u } = G(cl), { focusTrapRef: c } = G(Bs), 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 } = $p(a, r, m, p); return t({ resetPosition: h }), (g, y) => (w(), x("div", { ref: v(f), class: _(v(d)), style: re(v(u)), tabindex: "-1" }, [ F("header", { ref_key: "headerRef", ref: r, class: _([v(l).e("header"), { "show-close": g.showClose }]) }, [ j(g.$slots, "header", {}, () => [ F("span", { role: "heading", "aria-level": g.ariaLevel, class: _(v(l).e("title")) }, ee(g.title), 11, ["aria-level"]) ]), g.showClose ? (w(), x("button", { key: 0, "aria-label": v(o)("el.dialog.close"), class: _(v(l).e("headerbtn")), type: "button", onClick: (C) => g.$emit("close") }, [ L(v(Ue), { class: _(v(l).e("close")) }, { default: E(() => [ (w(), z(Re(g.closeIcon || v(i)))) ]), _: 1 }, 8, ["class"]) ], 10, ["aria-label", "onClick"])) : V("v-if", !0) ], 2), F("div", { id: v(s), class: _(v(l).e("body")) }, [ j(g.$slots, "default") ], 10, ["id"]), g.$slots.footer ? (w(), x("footer", { key: 0, class: _(v(l).e("footer")) }, [ j(g.$slots, "footer") ], 2)) : V("v-if", !0) ], 6)); } }); var ty = /* @__PURE__ */ X(ey, [["__file", "dialog-content.vue"]]); const ny = Q({ ...dl, 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" } }), oy = { open: () => !0, opened: () => !0, close: () => !0, closed: () => !0, [we]: (e) => ct(e), openAutoFocus: () => !0, closeAutoFocus: () => !0 }, iy = (e, t) => { var n; const i = ge().emit, { nextZIndex: a } = Ui(); let r = ""; const s = Dt(), l = Dt(), u = P(!1), c = P(!1), d = P(!1), f = P((n = e.zIndex) != null ? n : a()); let m, p; const h = Ro("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 } = da(() => N(), e.openDelay) : N(); } function k() { m == null || m(), p == null || p(), e.closeDelay && e.closeDelay > 0 ? { stop: p } = da(() => K(), e.closeDelay) : K(); } 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 K() { 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 && Hp(u); function de() { e.closeOnPressEscape && A(); } return q(() => e.modelValue, (Y) => { Y ? (c.value = !1, I(), d.value = !0, f.value = is(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: K, onOpenAutoFocus: B, onCloseAutoFocus: M, onCloseRequested: de, onFocusoutPrevented: W, titleId: s, bodyId: l, closed: c, style: g, overlayDialogStyle: y, rendered: d, visible: u, zIndex: f }; }, ay = H({ name: "ElDialog", inheritAttrs: !1 }), ry = /* @__PURE__ */ H({ ...ay, props: ny, emits: oy, setup(e, { expose: t }) { const n = e, o = Io(); Xt({ 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 = P(), r = P(), s = P(), { 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 } = iy(n, a); pe(cl, { dialogRef: a, headerRef: r, bodyId: c, ns: i, rendered: m, style: d }); const $ = ks(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(() => [ L(Vn, { name: "dialog-fade", onAfterEnter: v(h), onAfterLeave: v(g), onBeforeLeave: v(y), persisted: "" }, { default: E(() => [ ie(L(v(Zg), { "custom-mask-event": "", mask: B.modal, "overlay-class": B.modalClass, "z-index": v(p) }, { default: E(() => [ F("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 }, [ L(v(zs), { 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(ty, 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) }), Nr({ header: E(() => [ B.$slots.title ? j(B.$slots, "title", { key: 1 }) : j(B.$slots, "header", { key: 0, close: v(C), titleId: v(u), titleClass: v(i).e("title") }) ]), default: E(() => [ j(B.$slots, "default") ]), _: 2 }, [ B.$slots.footer ? { name: "footer", fn: E(() => [ j(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 sy = /* @__PURE__ */ X(ry, [["__file", "dialog.vue"]]); const ly = Me(sy), uy = /* @__PURE__ */ H({ inheritAttrs: !1 }); function cy(e, t, n, o, i, a) { return j(e.$slots, "default"); } var dy = /* @__PURE__ */ X(uy, [["render", cy], ["__file", "collection.vue"]]); const fy = /* @__PURE__ */ H({ name: "ElCollectionItem", inheritAttrs: !1 }); function py(e, t, n, o, i, a) { return j(e.$slots, "default"); } var hy = /* @__PURE__ */ X(fy, [["render", py], ["__file", "collection-item.vue"]]); const my = "data-el-collection-item", vy = (e) => { const t = `El${e}Collection`, n = `${t}Item`, o = Symbol(t), i = Symbol(n), a = { ...dy, name: t, setup() { const s = P(null), l = /* @__PURE__ */ new Map(); pe(o, { itemMap: l, getItems: () => { const c = v(s); if (!c) return []; const d = Array.from(c.querySelectorAll(`[${my}]`)); return [...l.values()].sort((m, p) => d.indexOf(m.ref) - d.indexOf(p.ref)); }, collectionRef: s }); } }, r = { ...hy, name: n, setup(s, { attrs: l }) { const u = P(null), c = G(o, void 0); pe(i, { collectionItemRef: u }), he(() => { const d = v(u); d && c.itemMap.set(d, { ref: d, ...l }); }), Be(() => { 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: { ...Le.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: Le.teleported }); Q({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: tn } }); Q({ onKeydown: { type: U(Function) } }); vy("Dropdown"); const fl = Symbol("ElSelectGroup"), Bo = Symbol("ElSelect"); function gy(e, t) { const n = G(Bo), o = G(fl, { 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) => vo(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(Tp(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 yy = 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 } = gy(e, i), { visible: d, hover: f } = un(i), m = ge().proxy; l.onOptionCreate(m), Be(() => { 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 by(e, t, n, o, i, a) { return ie((w(), x("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"]) }, [ j(e.$slots, "default", {}, () => [ F("span", null, ee(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [Ee, e.visible] ]); } var Xi = /* @__PURE__ */ X(yy, [["render", by], ["__file", "option.vue"]]); const wy = H({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = G(Bo), t = te("select"), n = b(() => e.props.popperClass), o = b(() => e.props.multiple), i = b(() => e.props.fitInputWidth), a = P(""); 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 Sy(e, t, n, o, i, a) { return w(), x("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(), x("div", { key: 0, class: _(e.ns.be("dropdown", "header")) }, [ j(e.$slots, "header") ], 2)) : V("v-if", !0), j(e.$slots, "default"), e.$slots.footer ? (w(), x("div", { key: 1, class: _(e.ns.be("dropdown", "footer")) }, [ j(e.$slots, "footer") ], 2)) : V("v-if", !0) ], 6); } var Cy = /* @__PURE__ */ X(wy, [["render", Sy], ["__file", "select-dropdown.vue"]]); const Ey = 11, Iy = (e, t) => { const { t: n } = Ri(), 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 = P(null), l = P(null), u = P(null), c = P(null), d = P(null), f = P(null), m = P(null), p = P(null), h = P(null), g = P(null), y = P(null), C = P(null), { isComposing: O, handleCompositionStart: T, handleCompositionUpdate: I, handleCompositionEnd: k } = rm({ afterComposition: (S) => wn(S) }), { wrapperRef: A, isFocused: $ } = am(d, { beforeFocus() { return D.value; }, afterFocus() { e.automaticDropdown && !N.value && (N.value = !0, r.menuVisibleOnFocus = !0); }, beforeBlur(S) { var R, J; return ((R = u.value) == null ? void 0 : R.isFocusInsideContent(S)) || ((J = c.value) == null ? void 0 : J.isFocusInsideContent(S)); }, afterBlur() { N.value = !1, r.menuVisibleOnFocus = !1; } }), N = P(!1), K = P(), { form: B, formItem: M } = fn(), { inputId: W } = Do(e, { formItemContext: M }), { valueOnClear: de, isEmptyValue: Y } = dm(e), D = b(() => e.disabled || (B == null ? void 0 : B.disabled)), ne = b(() => Ie(e.modelValue) ? e.modelValue.length > 0 : !Y(e.modelValue)), xe = 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) || ""), qe = b(() => Lp[_e.value]), jt = b(() => e.remote ? 300 : 0), Ge = 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()), R = []; return r.optionValues.forEach((J) => { const oe = S.findIndex((mt) => mt.value === J); oe > -1 && R.push(S[oe]); }), R.length >= S.length ? R : S; }), Tt = b(() => Array.from(r.cachedOptions.values())), ht = b(() => { const S = ue.value.filter((R) => !R.created).some((R) => R.currentLabel === r.inputValue); return e.filterable && e.allowCreate && r.inputValue !== "" && !S; }), qn = () => { e.filterable && Se(e.filterMethod) || e.filterable && e.remote && Se(e.remoteMethod) || ue.value.forEach((S) => { var R; (R = S.updateOption) == null || R.call(S, r.inputValue); }); }, Gn = ln(), mn = b(() => ["small"].includes(Gn.value) ? "small" : "default"), Ho = b({ get() { return N.value && Ge.value !== !1; }, set(S) { N.value = S; } }), Jn = 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; }), jo = b(() => { var S; const R = (S = e.placeholder) != null ? S : n("el.select.placeholder"); return e.multiple || !ne.value ? R : r.selectedLabel; }), Ko = b(() => si ? null : "mouseenter"); q(() => e.modelValue, (S, R) => { e.multiple && e.filterable && !e.reserveKeyword && (r.inputValue = "", At("")), Kt(), !wo(S, R) && 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 R = ((S = s.value) == null ? void 0 : S.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !Ct(e.modelValue) || !Array.from(R).includes(document.activeElement)) && Kt(), e.defaultFirstOption && (e.filterable || e.remote) && Ce.value && vn(); }, { flush: "post" }), q(() => r.hoveringIndex, (S) => { me(S) && S > -1 ? K.value = ue.value[S] || {} : K.value = {}, ue.value.forEach((R) => { R.hover = K.value === R; }); }), Rr(() => { r.isBeforeHide || qn(); }); 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), R = S.find((oe) => oe.created), J = S[0]; r.hoveringIndex = aa(ue.value, R || J); }, Kt = () => { if (e.multiple) r.selectedLabel = ""; else { const R = Ie(e.modelValue) ? e.modelValue[0] : e.modelValue, J = Yn(R); r.selectedLabel = J.currentLabel, r.selected = [J]; return; } const S = []; Ct(e.modelValue) || St(e.modelValue).forEach((R) => { S.push(Yn(R)); }), r.selected = S; }, Yn = (S) => { let R; 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 Je = Tt.value[Mt]; if (J ? at(Je.value, e.valueKey) === at(S, e.valueKey) : Je.value === S) { R = { value: S, currentLabel: Je.currentLabel, get isDisabled() { return Je.isDisabled; } }; break; } } if (R) return R; const Wt = J ? S.label : !oe && !mt ? S : ""; return { value: S, currentLabel: Wt }; }, nt = () => { r.hoveringIndex = ue.value.findIndex((S) => r.selected.some((R) => Uo(R) === Uo(S))); }, Ut = () => { r.selectionWidth = l.value.getBoundingClientRect().width; }, gn = () => { r.calculatorWidth = f.value.getBoundingClientRect().width; }, Zn = () => { r.collapseItemWidth = y.value.getBoundingClientRect().width; }, Ot = () => { var S, R; (R = (S = u.value) == null ? void 0 : S.updatePopper) == null || R.call(S); }, yn = () => { var S, R; (R = (S = c.value) == null ? void 0 : S.updatePopper) == null || R.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 = wp(() => { bn(); }, jt.value), Cn = (S) => { wo(e.modelValue, S) || t(Fi, S); }, wl = (S) => Sp(S, (R) => !r.disabledOptions.has(R)), Sl = (S) => { if (e.multiple && S.code !== $n.delete && S.target.value.length <= 0) { const R = St(e.modelValue).slice(), J = wl(R); if (J < 0) return; const oe = R[J]; R.splice(J, 1), t(we, R), Cn(R), t("remove-tag", oe); } }, Cl = (S, R) => { const J = r.selected.indexOf(R); if (J > -1 && !D.value) { const oe = St(e.modelValue).slice(); oe.splice(J, 1), t(we, oe), Cn(oe), t("remove-tag", R.value); } S.stopPropagation(), Xn(); }, oa = (S) => { S.stopPropagation(); const R = e.multiple ? [] : de.value; if (e.multiple) for (const J of r.selected) J.isDisabled && R.push(J.value); t(we, R), Cn(R), r.hoveringIndex = -1, N.value = !1, t("clear"), Xn(); }, ia = (S) => { var R; if (e.multiple) { const J = St((R = e.modelValue) != null ? R : []).slice(), oe = aa(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; Xn(), !N.value && ce(() => { Qn(S); }); }, aa = (S = [], R) => { if (!ke(R)) return S.indexOf(R); const J = e.valueKey; let oe = -1; return S.some((mt, Wt) => vo(at(mt, J)) === at(R, J) ? (oe = Wt, !0) : !1), oe; }, Qn = (S) => { var R, J, oe, mt, Wt; const eo = Ie(S) ? S[0] : S; let Mt = null; if (eo != null && eo.value) { const Je = ue.value.filter((ua) => ua.value === eo.value); Je.length > 0 && (Mt = Je[0].$el); } if (u.value && Mt) { const Je = (mt = (oe = (J = (R = u.value) == null ? void 0 : R.popperRef) == null ? void 0 : J.contentRef) == null ? void 0 : oe.querySelector) == null ? void 0 : mt.call(oe, `.${i.be("dropdown", "wrap")}`); Je && Mp(Je, Mt); } (Wt = C.value) == null || Wt.handleScroll(); }, El = (S) => { r.options.set(S.value, S), r.cachedOptions.set(S.value, S), S.disabled && r.disabledOptions.set(S.value, S); }, Il = (S, R) => { r.options.get(S) === R && r.options.delete(S); }, kl = b(() => { var S, R; return (R = (S = u.value) == null ? void 0 : S.popperRef) == null ? void 0 : R.contentRef; }), Tl = () => { r.isBeforeHide = !1, ce(() => Qn(r.selected)); }, Xn = () => { var S; (S = d.value) == null || S.focus(); }, ra = () => { var S; (S = d.value) == null || S.blur(); }, Al = (S) => { oa(S); }, Ol = () => { N.value = !1, $.value && ra(); }, Ml = () => { r.inputValue.length > 0 ? r.inputValue = "" : N.value = !1; }, sa = () => { D.value || (si && (r.inputHovering = !0), r.menuVisibleOnFocus ? r.menuVisibleOnFocus = !1 : N.value = !N.value); }, _l = () => { N.value ? ue.value[r.hoveringIndex] && ia(ue.value[r.hoveringIndex]) : sa(); }, 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 : []), xl = b(() => e.multiple ? e.collapseTags ? r.selected.slice(e.maxCollapseTags) : [] : []), la = (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 R = ue.value[r.hoveringIndex]; (R.disabled === !0 || R.states.groupDisabled === !0 || !R.visible) && la(S), ce(() => Qn(K.value)); } }, Fl = () => { if (!l.value) return 0; const S = window.getComputedStyle(l.value); return Number.parseFloat(S.gap || "6px"); }, Rl = b(() => { const S = Fl(); return { maxWidth: `${y.value && e.maxCollapseTags === 1 ? r.selectionWidth - r.collapseItemWidth - S : r.selectionWidth}px` }; }), $l = b(() => ({ maxWidth: `${r.selectionWidth}px` })), Dl = b(() => ({ width: `${Math.max(r.calculatorWidth, Ey)}px` })); return bt(l, Ut), bt(f, gn), bt(h, Ot), bt(A, Ot), bt(g, yn), bt(y, Zn), he(() => { Kt(); }), { inputId: W, contentId: o, nsSelect: i, nsInput: a, states: r, isFocused: $, expanded: N, optionsArray: ue, hoverOption: K, selectSize: Gn, filteredOptionsCount: Ce, resetCalculatorWidth: gn, updateTooltip: Ot, updateTagTooltip: yn, debouncedOnInputChange: Sn, onInput: wn, deletePrevTag: Sl, deleteTag: Cl, deleteSelected: oa, handleOptionSelect: ia, scrollToOption: Qn, hasModelValue: ne, shouldShowPlaceholder: Jn, currentPlaceholder: jo, mouseEnterEventName: Ko, showClose: xe, iconComponent: ye, iconReverse: be, validateState: _e, validateIcon: qe, showNewOption: ht, updateOptions: qn, collapseTagSize: mn, setSelected: Kt, selectDisabled: D, emptyText: Ge, handleCompositionStart: T, handleCompositionUpdate: I, handleCompositionEnd: k, onOptionCreate: El, onOptionDestroy: Il, handleMenuEnter: Tl, focus: Xn, blur: ra, handleClearClick: Al, handleClickOutside: Ol, handleEsc: Ml, toggleMenu: sa, selectOption: _l, getValueKey: Uo, navigateOptions: la, dropdownMenuVisible: Ho, showTagList: Ll, collapseTagList: xl, tagStyle: Rl, collapseTagStyle: $l, inputStyle: Dl, popperRef: kl, 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 ky = H({ name: "ElOptions", setup(e, { slots: t }) { const n = G(Bo); 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), wo(s, o) || (o = s, n && (n.states.optionValues = s)), r; }; } }); const Ty = Q({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: dn, 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: Le.teleported, persistent: { type: Boolean, default: !0 }, clearIcon: { type: tn, default: Mr }, fitInputWidth: Boolean, suffixIcon: { type: tn, default: ki }, tagType: { ...wi.type, default: "info" }, tagEffect: { ...wi.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: U(String), values: xo, default: "bottom-start" }, fallbackPlacements: { type: U(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...cm, ...Ht(["ariaLabel"]) }), Er = "ElSelect", Ay = H({ name: Er, componentName: Er, components: { ElSelectMenu: Cy, ElOption: Xi, ElOptions: ky, ElTag: $g, ElScrollbar: xm, ElTooltip: Ks, ElIcon: Ue }, directives: { ClickOutside: sg }, props: Ty, emits: [ we, Fi, "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({ ...un(e), modelValue: n }), i = Iy(o, t); return pe(Bo, 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 Oy(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 = Yl("click-outside"); return ie((w(), x("div", { ref: "selectRef", class: _([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [Zl(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0, onMouseleave: (p) => e.states.inputHovering = !1 }, [ L(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 [ F("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(), x("div", { key: 0, ref: "prefixRef", class: _(e.nsSelect.e("prefix")) }, [ j(e.$slots, "prefix") ], 2)) : V("v-if", !0), F("div", { ref: "selectionRef", class: _([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? j(e.$slots, "tag", { key: 0 }, () => [ (w(!0), x(fe, null, He(e.showTagList, (h) => (w(), x("div", { key: e.getValueKey(h), class: _(e.nsSelect.e("selected-item")) }, [ L(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(() => [ F("span", { class: _(e.nsSelect.e("tags-text")) }, [ j(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(() => [ F("div", { ref: "collapseItemRef", class: _(e.nsSelect.e("selected-item")) }, [ L(r, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: re(e.collapseTagStyle) }, { default: E(() => [ F("span", { class: _(e.nsSelect.e("tags-text")) }, " + " + ee(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: E(() => [ F("div", { ref: "tagMenuRef", class: _(e.nsSelect.e("selection")) }, [ (w(!0), x(fe, null, He(e.collapseTagList, (h) => (w(), x("div", { key: e.getValueKey(h), class: _(e.nsSelect.e("selected-item")) }, [ L(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(() => [ F("span", { class: _(e.nsSelect.e("tags-text")) }, [ j(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(), x("div", { key: 1, class: _([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ ie(F("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"]), [ [Ql, e.states.inputValue] ]), e.filterable ? (w(), x("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(), x("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 ? j(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ F("span", null, ee(e.currentPlaceholder), 1) ]) : (w(), x("span", { key: 1 }, ee(e.currentPlaceholder), 1)) ], 2)) : V("v-if", !0) ], 2), F("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(Re(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(Re(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(Re(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : V("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: E(() => [ L(f, { ref: "menuRef" }, { default: E(() => [ e.$slots.header ? (w(), x("div", { key: 0, class: _(e.nsSelect.be("dropdown", "header")), onClick: le(() => { }, ["stop"]) }, [ j(e.$slots, "header") ], 10, ["onClick"])) : V("v-if", !0), ie(L(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), L(c, null, { default: E(() => [ j(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(), x("div", { key: 1, class: _(e.nsSelect.be("dropdown", "loading")) }, [ j(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? (w(), x("div", { key: 2, class: _(e.nsSelect.be("dropdown", "empty")) }, [ j(e.$slots, "empty", {}, () => [ F("span", null, ee(e.emptyText), 1) ]) ], 2)) : V("v-if", !0), e.$slots.footer ? (w(), x("div", { key: 3, class: _(e.nsSelect.be("dropdown", "footer")), onClick: le(() => { }, ["stop"]) }, [ j(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 My = /* @__PURE__ */ X(Ay, [["render", Oy], ["__file", "select.vue"]]); const _y = H({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = te("select"), n = P(null), o = ge(), i = P([]); pe(fl, ut({ ...un(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(); }), Su(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(), x("ul", { ref: "groupRef", class: _(e.ns.be("group", "wrap")) }, [ F("li", { class: _(e.ns.be("group", "title")) }, ee(e.label), 3), F("li", null, [ F("ul", { class: _(e.ns.b("group")) }, [ j(e.$slots, "default") ], 2) ]) ], 2)), [ [Ee, e.visible] ]); } var pl = /* @__PURE__ */ X(_y, [["render", Py], ["__file", "option-group.vue"]]); const Vo = Me(My, { Option: Xi, OptionGroup: pl }), ea = zt(Xi); zt(pl); const Ly = Q({ trigger: Bn.trigger, placement: oi.placement, disabled: Bn.disabled, visible: Le.visible, transition: Le.transition, popperOptions: oi.popperOptions, tabindex: oi.tabindex, content: Le.content, popperStyle: Le.popperStyle, popperClass: Le.popperClass, enterable: { ...Le.enterable, default: !0 }, effect: { ...Le.effect, default: "light" }, teleported: Le.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 } }), xy = { "update:visible": (e) => ct(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, Fy = "onUpdate:visible", Ry = H({ name: "ElPopover" }), $y = /* @__PURE__ */ H({ ...Ry, props: Ly, emits: xy, setup(e, { expose: t, emit: n }) { const o = e, i = b(() => o[Fy]), a = te("popover"), r = P(), 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(Ks), 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(), x("div", { key: 0, class: _(v(a).e("title")), role: "title" }, ee(g.title), 3)) : V("v-if", !0), j(g.$slots, "default", {}, () => [ Z(ee(g.content), 1) ]) ]), default: E(() => [ g.$slots.reference ? j(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 Dy = /* @__PURE__ */ X($y, [["__file", "popover.vue"]]); const Ir = (e, t) => { const n = t.arg || t.value, o = n == null ? void 0 : n.popperRef; o && (o.triggerRef = e); }; var Ny = { mounted(e, t) { Ir(e, t); }, updated(e, t) { Ir(e, t); } }; const By = "popover", hl = xp(Ny, By), zo = Me(Dy, { directive: hl }); function Vy(e) { let t; const n = P(!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()) : (Rn(f, m.bm("parent", "relative")), f.removeAttribute("loading-number")), Rn(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 } = pm("loading"); return m({ ns: p, zIndex: h }), () => { const g = o.spinner || o.svg, y = Yt("svg", { class: "circular", viewBox: o.svgViewBox ? o.svgViewBox : "0 0 50 50", ...g ? { innerHTML: g } : {} }, [ Yt("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), C = o.text ? Yt("p", { class: p.b("text") }, [o.text]) : void 0; return Yt(Vn, { name: p.b("fade"), onAfterLeave: l }, { default: E(() => [ ie(L("div", { style: { backgroundColor: o.background || "" }, class: [ p.b("mask"), o.customClass, o.fullscreen ? "is-fullscreen" : "" ] }, [ Yt("div", { class: p.b("spinner") }, [y, C]) ]), [[Ee, o.visible]]) ]) }); }; } }), c = Xl(u), d = c.mount(document.createElement("div")); return { ...un(o), setText: i, removeElLoadingChild: r, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let uo; const Si = function(e = {}) { if (!se) return; const t = zy(e); if (t.fullscreen && uo) return uo; const n = Vy({ ...t, closed: () => { var i; (i = t.closed) == null || i.call(t), t.fullscreen && (uo = void 0); } }); Hy(t, t.parent, n), kr(t, t.parent, n), t.parent.vLoadingAddClassList = () => kr(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 && (uo = n), n; }, zy = (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 }; }, Hy = async (e, t, n) => { const { nextZIndex: o } = n.vm.zIndex || n.vm._.exposed.zIndex, i = {}; if (e.fullscreen) n.originalPosition.value = Zt(document.body, "position"), n.originalOverflow.value = Zt(document.body, "overflow"), i.zIndex = o(); else if (e.parent === document.body) { n.originalPosition.value = Zt(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(Zt(document.body, `margin-${a}`), 10)}px`; } for (const a of ["height", "width"]) i[a] = `${e.target.getBoundingClientRect()[a]}px`; } else n.originalPosition.value = Zt(t, "position"); for (const [a, r] of Object.entries(i)) n.$el.style[a] = r; }, kr = (e, t, n) => { const o = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? Rn(t, o.bm("parent", "relative")) : hi(t, o.bm("parent", "relative")), e.fullscreen && e.lock ? hi(t, o.bm("parent", "hidden")) : Rn(t, o.bm("parent", "hidden")); }, ho = Symbol("ElLoading"), Tr = (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 && P(m); }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${xu(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[ho] = { 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 && Tr(e, t); }, updated(e, t) { const n = e[ho]; t.oldValue !== t.value && (t.value && !t.oldValue ? Tr(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[ho]) == null || t.instance.close(), e[ho] = null; } }, Ky = { install(e) { e.directive("loading", Ci), e.config.globalProperties.$loading = Si; }, directive: Ci, service: Si }, hn = (e, t) => { const n = e.__vccOpts || e; for (const [o, i] of t) n[o] = i; return n; }, Uy = { name: "SelectionsGroup", components: { Checkbox: Xs, CheckboxGroup: el, Col: Wn, Icon: Ue, Row: Un, ElIconWarning: _r }, 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(); } }, Wy = { class: "selections-container" }, qy = { class: "checkall-display-text" }, Gy = { style: { "word-break": "keep-all" } }, Jy = { class: "checkbox-group-inner" }, Yy = ["onMouseenter", "onMouseleave"]; function Zy(e, t, n, o, i, a) { const r = _r, s = Ue, l = zo, u = Wn, c = Xs, d = Un, f = el; return w(), x("div", Wy, [ L(d, null, { default: E(() => [ L(u, { span: 12 }, { default: E(() => [ F("span", qy, ee(n.title), 1), n.helpMessage ? (w(), z(l, { key: 0, width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, Nr({ default: E(() => [ F("span", Gy, ee(n.helpMessage), 1) ]), _: 2 }, [ n.helpMessage ? { name: "reference", fn: E(() => [ L(s, { class: "info" }, { default: E(() => [ L(r) ]), _: 1 }) ]), key: "0" } : void 0 ]), 1024)) : V("", !0) ]), _: 1 }), L(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 }), L(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(() => [ F("div", Jy, [ (w(!0), x(fe, null, He(n.selections, (m) => (w(), z(d, { key: m[n.identifierKey], label: m[n.identifierKey] }, { default: E(() => [ F("div", { class: "checkbox-container", onMouseenter: (p) => a.checkboxMouseEnterEmit(m[n.identifierKey], !0), onMouseleave: (p) => a.checkboxMouseEnterEmit(m[n.identifierKey], !1) }, [ L(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(() => [ L(d, { class: "checkbox-row" }, { default: E(() => [ a.hasLineStyles(m) ? (w(), z(u, { key: 0, span: 4 }, { default: E(() => [ F("div", { class: "path-visual", style: re(a.getLineStyles(m)) }, null, 4) ]), _: 2 }, 1024)) : V("", !0), L(u, { span: 20 }, { default: E(() => [ F("div", { style: re(a.getBackgroundStyles(m)) }, ee(m[n.labelKey]), 5) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ]), _: 2 }, 1032, ["label", "value", "onChange", "onClick", "checked"]) ], 40, Yy) ]), _: 2 }, 1032, ["label"]))), 128)) ]) ]), _: 1 }, 8, ["class", "modelValue", "onChange"]) ]); } const ml = /* @__PURE__ */ hn(Uy, [["render", Zy], ["__scopeId", "data-v-35fb97d0"]]), Qy = '', Xy = { name: "DynamicLegends", 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 } }, computed: { clipPathLegends: function() { return ["exoid", "hexagon"]; } }, methods: { capitalise: function(e) { return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase(); }, customStyle: function(e) { const t = e.color ? e.color : e.colour; let n = t || "transparent", o = e.border ? e.border : "black"; if (t && !e.border && (o = n), e[this.styleKey] === "star") { let i = Qy.replace("", n); return i = i.replace("", o), i = i.replace("", o ? "2" : "0"), i = "data:image/svg+xml," + encodeURIComponent(i), { color: n, "background-image": `url(${i})` }; } else return e[this.styleKey] === "line" ? { color: n } : { "background-color": n, "border-color": o }; }, customClipPathStyle: function(e, t) { const n = this.customStyle(e); return t ? n["background-color"] = n["border-color"] : n.scale = 0.7, n; }, legendStyle: function(e) { return e[this.styleKey] === "star" ? e[this.identifierKey] === "Featured dataset marker" && !this.showStarInLegend ? void 0 : "star" : this.clipPathLegends.includes(e[this.styleKey]) ? e[this.styleKey] : e[this.styleKey] === "line" ? [e[this.styleKey], e.dashed ? "dashed" : "", e.arrow ? "arrow" : ""] : [e[this.styleKey], "shape"]; } } }, eb = { class: "legend-group" }, tb = ["label"], nb = { key: 0, class: "legend-item" }, ob = { class: "label" }; function ib(e, t, n, o, i, a) { return w(), x("div", eb, [ (w(!0), x(fe, null, He(n.legends, (r) => (w(), x("div", { class: "legend-container", key: r[n.identifierKey], label: r[n.identifierKey] }, [ a.legendStyle(r) ? (w(), x("div", nb, [ a.clipPathLegends.includes(a.legendStyle(r)) ? (w(), x("div", { key: 0, class: _(a.legendStyle(r)), style: re(a.customClipPathStyle(r, !0)) }, [ F("div", { class: _(a.legendStyle(r)), style: re(a.customClipPathStyle(r, !1)) }, null, 6) ], 6)) : (w(), x("div", { key: 1, class: _(a.legendStyle(r)), style: re(a.customStyle(r)) }, null, 6)), F("div", ob, ee(a.capitalise(r[n.identifierKey])), 1) ])) : V("", !0) ], 8, tb))), 128)) ]); } const ab = /* @__PURE__ */ hn(Xy, [["render", ib], ["__scopeId", "data-v-0c2b00a9"]]), rb = { 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: () => ({}) } } }, sb = { class: "flatmap-error" }, lb = { class: "flatmap-error-title" }, ub = { key: 0 }, cb = { key: 0, class: "flatmap-error-message" }, db = { key: 1 }; function fb(e, t, n, o, i, a) { const r = Bl, s = Ue, l = Qi; return w(), x("div", sb, [ F("div", lb, [ L(s, { size: "24" }, { default: E(() => [ L(r) ]), _: 1 }), n.flatmapError.title ? (w(), x("div", ub, ee(n.flatmapError.title), 1)) : V("", !0) ]), n.flatmapError.messages ? (w(), x("div", cb, [ (w(!0), x(fe, null, He(n.flatmapError.messages, (u, c) => (w(), x("div", { key: c }, ee(u), 1))), 128)) ])) : V("", !0), n.flatmapError.button ? (w(), x("div", db, [ L(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 ta = /* @__PURE__ */ hn(rb, [["render", fb], ["__scopeId", "data-v-7cfcfa1f"]]), pb = { name: "SvgLegends" }, hb = { class: "legends-container" }, mb = { 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 vb(e, t, n, o, i, a) { return w(), x("div", hb, [ (w(), x("svg", mb, t[0] || (t[0] = [ eu(' Tissue region Brain nuclei Ganglia Ganglionated nerve plexus ', 9) ]))), t[1] || (t[1] = F("svg", { width: "72px", height: "72px", viewBox: "0 0 24 24", fill: "yellow" }, null, -1)) ]); } const gb = /* @__PURE__ */ hn(pb, [["render", vb], ["__scopeId", "data-v-88079d87"]]), yb = `
2
`, 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; }, Jt = (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 bb = 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(Jt), this.componentsWithDatasets = this.uberons.filter( (r) => i.indexOf(r.id) !== -1 ).sort(Jt), this.destinationsWithDatasets = this.uberons.filter( (r) => a.indexOf(r.id) !== -1 ).sort(Jt); }, 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(Jt), this.components = r.map( (u) => this.createLabelFromNeuralNode(u, l) ).sort(Jt), this.destinations = i.map( (u) => this.createLabelFromNeuralNode(u, l) ).sort(Jt), 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 wb(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 Sb(e, t, n) { const i = `select knowledge from knowledge where source="${na(e)}" and knowledge like "%${t}%" order by source desc`; return (await n.queryKnowledge(i)).map((l) => JSON.parse(l)).map((l) => l.id); } function na(e) { return Cb(e.mapMetadata); } function Cb(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 Eb(e, t) { const n = na(e), o = `select knowledge from knowledge where source="${n}" order by source desc`; vl(); 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), Ib(), s; } return JSON.parse(i); } function Ib() { const n = (/* @__PURE__ */ new Date()).getTime() + 864e5; sessionStorage.setItem("flatmap-knowledge-expiry", n); } function kb() { [ "flatmap-knowledge", "flatmap-knowledge-expiry", "flatmap-knowledge-source" ].forEach((t) => { sessionStorage.removeItem(t); }); } function vl() { const e = sessionStorage.getItem("flatmap-knowledge-expiry"); (/* @__PURE__ */ new Date()).getTime() > e && kb(); } const co = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), Tb = 'Featured dataset marker'; var gl = { exports: {} }; (function(e, t) { (function(n, o) { e.exports = o(); })(typeof window < "u" ? window : ag, 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, K = 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() { K = 0, N && (M = B.width, W = B.height, h.resizedAttached && h.resizedAttached.call(B)); }, xe = function() { B = r(h), N = B.width !== M || B.height !== W, N && !K && (K = o(ne)), D(); }, ye = function(be, _e, qe) { be.attachEvent ? be.attachEvent("on" + _e, qe) : be.addEventListener(_e, qe); }; ye(O, "scroll", xe), ye(I, "scroll", xe), 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; }); })(gl); var Ab = gl.exports; const Ob = /* @__PURE__ */ rg(Ab), Mb = uu("main", { state: () => ({ userProfile: { token: "" } }), getters: { userToken(e) { return e.userProfile.token; } }, actions: { setUserToken(e) { this.userProfile.token = e; } } }); function _b(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 _b(), Pb = "cannot be found on the map.", Lb = (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; }, yl = (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 = yl(a, r.key); s.length > 0 && (r.children = s), n.push(r); }), n; }, xb = { name: "FlatmapVuer", components: { Button: Qi, Col: Wn, Loading: Ky, Radio: sl, Icon: Ue, RadioGroup: ll, Row: Un, Select: Vo, Dialog: ly, MapSvgIcon: tu, MapSvgSpriteColor: nu, Tooltip: ou, TreeControls: iu, SelectionsGroup: ml, SvgLegends: gb, ElIconWarningFilled: Pr, ElIconArrowDown: ki, ElIconArrowLeft: Lr, DrawToolbar: au, FlatmapError: ta }, beforeCreate: function() { this.setStateRequired = !1; }, setup(e) { let t = G("$annotator"); return t || (t = Ye(new lu(`${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 && (e ? this.mapImp.setVisibilityFilter(e) : this.mapImp.clearVisibilityFilter()); }, /** * @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(); }, /** * @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 = yl(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 = Ye({ 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 === "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) { e === "Exploration" ? this.connectivityDataSource = t.models.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(co(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 wb(e) : n = await Sb(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: Pb } }); }, 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, Lb(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 ru(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 = co(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 }); } } else { Eb(this.mapImp, this.flatmapQueries); let o = []; if (this.tooltipEntry = e.filter((i) => i.resource[0] in this.mapImp.pathways.paths).map((i) => ({ title: i.label, featureId: i.resource, ready: !1 })), this.tooltipEntry.length) { this.$emit("connectivity-info-open", this.tooltipEntry); for (let a = 0; a < e.length; a++) o.push(await this.getKnowledgeTooltip(e[a])); this.tooltipEntry = await Promise.all(o); const i = this.tooltipEntry.map((a) => a.featureId[0]); i.length > 0 && this.displayTooltip(i); } } }, /** * 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 = na(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 i = o == null ? void 0 : o.refs, a = o == null ? void 0 : o.ref, r = this.$refs[i || a]; if (r) { const { parentElement: s, nextElementSibling: l } = r.$el, u = (c) => c && (c.classList.contains("pathway-container") || c.classList.contains("pathway-location")); (u(s) || u(l)) && (this.requiresDrawer ? this.drawerOpen = !0 : this.helpModeActiveIndex += 1); } else this.helpModeActiveIndex += 1; } 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((i) => { i.value = !0; })) : e && this.helpModeDialog && t > this.helpModeActiveIndex ? this.helpModeActiveIndex > -1 ? (this.closeFlatmapHelpPopup(), setTimeout(() => { this.inHelp = !1, this.hoverVisibilities.forEach((i) => { i.value = !1; }), this.showTooltip(this.helpModeActiveIndex, 200); }, 300)) : this.helpModeActiveIndex === -1 && this.openFlatmapHelpPopup() : (this.inHelp = !1, this.hoverVisibilities.forEach((i) => { i.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 = !1; this.displayMinimap && (t = { position: "top-right" }); let n = { taxon: this.entry }; this.uuid && (n.uuid = this.uuid), e ? (e.uuid ? n = { uuid: e.uuid } : e.entry && (n.taxon = e.entry), e.biologicalSex ? n.biologicalSex = e.biologicalSex : n.taxon === "NCBITaxon:9606" && (n.biologicalSex = "PATO:0000384")) : this.biologicalSex && (n.biologicalSex = this.biologicalSex), this.mapManagerRef.loadMap( n, this.eventCallback(), { //fullscreenControl: false, //annotatable: false, //debug: true, minZoom: this.minZoom, tooltips: this.tooltips, minimap: t, container: this.$refs.display // tooltipDelay: 15, // new feature to delay tooltips showing } ).then((i) => { this.mapImp = i, this.serverURL = this.mapImp.makeServerUrl("").slice(0, -1); let a = this.mapImp.details.version; this.setFlightPathInfo(a); const r = this._stateToBeSet ? this._stateToBeSet : e; this.onFlatmapReady(r), this.$nextTick(() => this.restoreMapState(r)); }).catch((i) => { var a, r; if (console.error("Flatmap loading error:", i), this.flatmapError = {}, i.message && i.message.indexOf("Unknown map") !== -1 ? (this.flatmapError.title = "Unknown Map!", this.flatmapError.messages = Object.keys(n).map((s) => `${s === "uuid" ? "UUID" : co(s)}: ${n[s]}`)) : (this.flatmapError.title = "Error Loading Map!", this.flatmapError.messages = [ i.message ? i.message : i.toString(), "Please try again later or contact support if the problem persists." ]), (r = (a = this.$parent) == null ? void 0 : a.$refs) != null && r.multiContainer) { const s = this.$parent; this.flatmapError.button = { text: "Load Default Map", callback: () => { const l = s.initial; s.setSpecies(l, 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(), this.showMinimap(this.displayMinimap)); } 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 su(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; this.sensor = Ye(new Ob(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.addResizeButtonToMinimap(), this.loading = !1, this.computePathControlsMaximumHeight(), this.mapResize(), this.handleMapClick(), this.setInitMapState(), 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 = ""; }); }, /** * @public * Function to show or hide the minimap * by providing ``flag`` (boolean) value. * @arg {Boolean} `flag` */ showMinimap: function(e) { this.mapImp && this.mapImp.showMinimap(e); }, /** * @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, co(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 }, /** * 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 { 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: Ye({}), sckanDisplay: [ { label: "Display Path with SCKAN", key: "VALID" } ], systems: [], taxonConnectivity: [], pathwaysMaxHeight: 1e3, tooltipWait: Ye([]), 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: Tb, isFC: !1, inHelp: !1, currentBackground: "white", availableBackground: ["white", "lightskyblue", "black"], loading: !1, flatmapMarker: yb, 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: Ye({ alert: { with: !0, without: !0 } }), searchTerm: "", taxonLeaveDelay: void 0, connectivityFilters: [], flatmapLegends: [] }; }, computed: { ...cu(Mb, ["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]; } }, 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)); }, 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 = Ye(new Br.MapViewer(this.flatmapAPI, { container: void 0 })), this.$emit("mapmanager-loaded", this.mapManagerRef)); }, mounted: function() { this.openMapRef = mo(this.$refs.openMapRef), this.backgroundIconRef = mo(this.$refs.backgroundIconRef), this.tooltipWait.length = this.hoverVisibilities.length, this.flatmapQueries = Ye(new bb()), this.flatmapQueries.initialise(this.flatmapAPI), this.state ? this.setStateRequired && this.setState(this.state) : this.renderAtMounted && this.createFlatmap(), vl(); } }, Fb = { class: "flatmap-container", ref: "flatmapContainer", "element-loading-text": "Loading...", "element-loading-background": "rgba(0, 0, 0, 0.3)" }, Rb = { style: { height: "100%", width: "100%", position: "relative", "overflow-y": "none" } }, $b = { style: { height: "100%", width: "100%" }, ref: "display", class: "flatmap-display" }, Db = { class: "beta-popovers" }, Nb = { key: 2, class: "warning-text" }, Bb = { class: "bottom-right-control" }, Vb = ["innerHTML"], zb = { style: { "margin-bottom": "2px" } }, Hb = { key: 0, class: "viewing-mode-title" }, jb = ["onClick"], Kb = ["onClick"]; function Ub(e, t, n, o, i, a) { const r = Fe("map-svg-sprite-color"), s = ta, l = Pr, u = Ue, c = zo, d = ki, f = Fe("DrawToolbar"), m = Fe("map-svg-icon"), p = ab, h = Fe("tree-controls"), g = ml, y = Lr, C = Qi, O = Un, T = Wn, I = ea, k = Vo, A = sl, $ = ll, N = Fe("Tooltip"), K = hl, B = Ci; return ie((w(), x("div", Fb, [ L(r), F("div", Rb, [ F("div", $b, null, 512), e.flatmapError ? (w(), z(s, { key: 0, flatmapError: e.flatmapError }, null, 8, ["flatmapError"])) : V("", !0), ie(F("div", Db, [ F("div", null, [ L(c, { placement: "right", "popper-class": "warning-popper flatmap-popper", teleported: !1, visible: e.hoverVisibilities[7].value, ref: "warningPopover" }, { reference: E(() => [ F("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(() => [ L(l) ]), _: 1 })) : V("", !0), n.isLegacy ? (w(), x(fe, { key: 1 }, [ t[33] || (t[33] = F("span", { class: "warning-text" }, "Legacy Map", -1)), F("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(), x("span", Nb, "Beta")) : V("", !0) ], 32) ]), default: E(() => [ n.isLegacy ? (w(), x("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(), x("p", { key: 1, onMouseover: t[2] || (t[2] = (M) => a.showTooltip(7)), onMouseout: t[3] || (t[3] = (M) => a.hideTooltip(7)) }, t[31] || (t[31] = [ Z(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "), F("a", { href: "https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew", target: "_blank" }, " ApiNATOMY ", -1), Z(" models available in "), F("a", { href: "https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD", target: "_blank" }, " SCKAN ", -1), Z(". ") ]), 32)) : (w(), x("p", { key: 2, onMouseover: t[4] || (t[4] = (M) => a.showTooltip(7)), onMouseout: t[5] || (t[5] = (M) => a.hideTooltip(7)) }, t[32] || (t[32] = [ Z(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "), F("a", { href: "https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew", target: "_blank" }, " ApiNATOMY ", -1), Z(" models available in "), F("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"]) ]), 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(), x("div", { key: 0, class: "latest-changesicon", onMouseover: t[9] || (t[9] = (M) => a.showTooltip(8)), onMouseout: t[10] || (t[10] = (M) => a.hideTooltip(8)) }, [ L(u, null, { default: E(() => [ L(l) ]), _: 1 }), t[34] || (t[34] = F("span", { class: "warning-text" }, "What's new?", -1)) ], 32)) : V("", !0) ]), default: E(() => t[35] || (t[35] = [ F("b", null, "Connectivity References", -1), F("p", null, " Connectivity references have been improved and available in various formats. ", -1), F("b", null, "Improved state storing", -1), F("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(L(u, { class: _(["minimap-resize", { enlarge: e.minimapSmall, shrink: !e.minimapSmall }]), ref: "minimapResize", onClick: a.closeMinimap }, { default: E(() => [ L(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(F("div", Bb, [ L(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(() => [ F("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)) }, [ L(m, { class: "icon-button zoomIn", icon: "zoomIn" }) ], 32) ]), _: 1 }, 8, ["visible"]), L(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(() => [ F("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)) }, [ L(m, { class: "icon-button zoomOut", icon: "zoomOut" }) ], 32) ]), _: 1 }, 8, ["visible"]), L(c, { content: "Reset", placement: "top", teleported: !1, trigger: "manual", width: "70", "popper-class": "flatmap-popper", visible: e.hoverVisibilities[3].value, ref: "zoomFitPopover" }, { reference: E(() => [ F("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)) }, [ L(m, { class: "icon-button fitWindow", icon: "fitWindow" }) ], 32) ]), default: E(() => [ t[36] || (t[36] = F("div", null, [ Z(" Fit to "), F("br"), Z(" window ") ], -1)) ]), _: 1 }, 8, ["visible"]) ], 512), [ [Ee, !n.disableUI] ]), L(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(F("div", { class: _(["pathway-location", { open: e.drawerOpen, close: !e.drawerOpen }]) }, [ ie((w(), x("div", { class: _(["pathway-container", { open: e.drawerOpen, close: !e.drawerOpen }]), style: re({ "max-height": e.pathwaysMaxHeight + "px" }) }, [ L(c, { content: "Location of the featured dataset", placement: "bottom", teleported: !0, trigger: "manual", width: "max-content", offset: -10, "popper-class": "flatmap-popper flatmap-teleport-popper", visible: e.hoverVisibilities[9].value && n.showStarInLegend, ref: "featuredMarkerPopover" }, { reference: E(() => [ ie((w(), x("div", { onMouseover: t[20] || (t[20] = (M) => a.showTooltip(9)), onMouseout: t[21] || (t[21] = (M) => a.hideTooltip(9)) }, [ a.legendEntry.length ? (w(), z(p, { key: 0, identifierKey: "prompt", colourKey: "colour", styleKey: "style", legends: a.legendEntry, showStarInLegend: !0, class: "svg-legends-container" }, null, 8, ["legends"])) : V("", !0) ], 32)), [ [K, void 0, "featuredMarkerPopover"] ]) ]), _: 1 }, 8, ["visible"]), L(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(F("div", { class: "flatmap-marker-help", innerHTML: e.flatmapMarker }, null, 8, Vb), [ [Ee, e.hoverVisibilities[0].value], [K, void 0, "markerPopover"] ]) ]), _: 1 }, 8, ["visible"]), e.isFC && e.systems && e.systems.length > 0 ? (w(), z(h, { key: 0, 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)), [ [K, void 0, "checkBoxPopover"] ]), F("div", { onClick: t[22] || (t[22] = (...M) => a.toggleDrawer && a.toggleDrawer(...M)), class: _(["drawer-button", { open: e.drawerOpen, close: !e.drawerOpen }]) }, [ L(u, null, { default: E(() => [ L(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), x(fe, null, He(n.openMapOptions, (M) => (w(), z(O, { key: M.key }, { default: E(() => [ L(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), L(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(() => [ F("div", null, [ L(O, { class: "backgroundText" }, { default: E(() => t[37] || (t[37] = [ Z("Viewing Mode") ])), _: 1 }), L(O, { class: "backgroundControl" }, { default: E(() => [ F("div", zb, [ (w(!0), x(fe, null, He(e.viewingModes, (M, W, de) => (w(), x(fe, { key: W }, [ W === e.viewingMode ? (w(), x("span", Hb, [ F("b", null, ee(W), 1) ])) : (w(), x("span", { key: 1, class: "viewing-mode-unselected", onClick: (Y) => a.changeViewingMode(W) }, ee(W), 9, jb)) ], 64))), 128)) ]), L(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[38] || (t[38] = [ Z(" (Anonymous annotate) ") ])), _: 1 })) : V("", !0) ]), _: 1 }), e.viewingMode === "Annotation" && e.authorisedUser ? (w(), x(fe, { key: 0 }, [ L(O, { class: "backgroundText" }, { default: E(() => t[39] || (t[39] = [ Z("Annotations From") ])), _: 1 }), L(O, { class: "backgroundControl" }, { default: E(() => [ L(k, { teleported: !1, modelValue: e.annotationFrom, "onUpdate:modelValue": t[23] || (t[23] = (M) => e.annotationFrom = M), placeholder: "Select", class: "select-box", "popper-class": "flatmap_dropdown", onChange: a.setAnnotationFrom }, { default: E(() => [ (w(!0), x(fe, null, He(e.annotatedSource, (M) => (w(), z(I, { key: M, label: M, value: M }, { default: E(() => [ L(O, null, { default: E(() => [ L(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[40] || (t[40] = [ Z("Flight path display") ])), _: 1 })) : V("", !0), e.displayFlightPathOption ? (w(), z(O, { key: 3, class: "backgroundControl" }, { default: E(() => [ L($, { modelValue: e.flightPath3DRadio, "onUpdate:modelValue": t[24] || (t[24] = (M) => e.flightPath3DRadio = M), class: "flatmap-radio", onChange: a.setFlightPath3D }, { default: E(() => [ L(A, { value: !1 }, { default: E(() => t[41] || (t[41] = [ Z("2D") ])), _: 1 }), L(A, { value: !0 }, { default: E(() => t[42] || (t[42] = [ Z("3D") ])), _: 1 }) ]), _: 1 }, 8, ["modelValue", "onChange"]) ]), _: 1 })) : V("", !0), L(O, { class: "backgroundSpacer" }), L(O, { class: "backgroundText" }, { default: E(() => t[43] || (t[43] = [ Z("Organs display") ])), _: 1 }), L(O, { class: "backgroundControl" }, { default: E(() => [ L($, { modelValue: e.colourRadio, "onUpdate:modelValue": t[25] || (t[25] = (M) => e.colourRadio = M), class: "flatmap-radio", onChange: a.setColour }, { default: E(() => [ L(A, { value: !0 }, { default: E(() => t[44] || (t[44] = [ Z("Colour") ])), _: 1 }), L(A, { value: !1 }, { default: E(() => t[45] || (t[45] = [ Z("Greyscale") ])), _: 1 }) ]), _: 1 }, 8, ["modelValue", "onChange"]) ]), _: 1 }), L(O, { class: "backgroundSpacer" }), L(O, { class: "backgroundText" }, { default: E(() => t[46] || (t[46] = [ Z("Outlines display") ])), _: 1 }), L(O, { class: "backgroundControl" }, { default: E(() => [ L($, { modelValue: e.outlinesRadio, "onUpdate:modelValue": t[26] || (t[26] = (M) => e.outlinesRadio = M), class: "flatmap-radio", onChange: a.setOutlines }, { default: E(() => [ L(A, { value: !0 }, { default: E(() => t[47] || (t[47] = [ Z("Show") ])), _: 1 }), L(A, { value: !1 }, { default: E(() => t[48] || (t[48] = [ Z("Hide") ])), _: 1 }) ]), _: 1 }, 8, ["modelValue", "onChange"]) ]), _: 1 }), L(O, { class: "backgroundSpacer" }), L(O, { class: "backgroundText" }, { default: E(() => t[49] || (t[49] = [ Z("Change background") ])), _: 1 }), L(O, { class: "backgroundControl" }, { default: E(() => [ (w(!0), x(fe, null, He(e.availableBackground, (M) => (w(), x("div", { key: M, class: _([ "backgroundChoice", M, M == e.currentBackground ? "active" : "" ]), onClick: (W) => a.backgroundChangeCallback(M) }, null, 10, Kb))), 128)) ]), _: 1 }) ]) ]), _: 1 }, 8, ["virtual-ref"]), ie(F("div", { class: _(["settings-group", { open: e.drawerOpen, close: !e.drawerOpen }]) }, [ n.showOpenMapButton ? (w(), z(O, { key: 0 }, { default: E(() => [ L(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(), x("div", { key: 0, ref: "openMapRef", class: "icon-button-container", onMouseover: t[27] || (t[27] = (M) => a.showTooltip(4)), onMouseout: t[28] || (t[28] = (M) => a.hideTooltip(4)) }, [ L(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(() => [ L(c, { content: "Change settings", placement: "right", visible: e.hoverVisibilities[5].value, teleported: !1, trigger: "manual", "popper-class": "flatmap-popper", ref: "settingsPopover" }, { reference: E(() => [ F("div", { ref: "backgroundIconRef", class: "icon-button-container", onMouseover: t[29] || (t[29] = (M) => a.showTooltip(5)), onMouseout: t[30] || (t[30] = (M) => a.hideTooltip(5)) }, [ L(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 bl = /* @__PURE__ */ hn(xb, [["render", Ub], ["__scopeId", "data-v-bb2e160c"]]), Ar = { "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" }, Wb = { name: "MultiFlatmapVuer", components: { Col: Wn, Row: Un, Option: ea, Select: Vo, Popover: zo, FlatmapVuer: bl }, 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) => { this.requireInitialisation ? (this.requireInitialisation = !1, fetch(this.flatmapAPI).then((t) => t.json()).then((t) => { t.status_code === 404 && (console.error("Flatmap API endpoint is incorrect", t), 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.` ]), Object.keys(this.availableSpecies).forEach((o) => { const i = this.availableSpecies[o].uuid; if (i && t.length && t.map((a) => a.uuid).indexOf(i) > 0) this.speciesList[o] = this.availableSpecies[o]; else for (let a = 0; a < t.length; a++) if (this.availableSpecies[o].taxo === t[a].taxon) if (this.availableSpecies[o].biologicalSex) { if (t[a].biologicalSex && t[a].biologicalSex === this.availableSpecies[o].biologicalSex) { this.speciesList[o] = this.availableSpecies[o]; break; } } else { this.speciesList[o] = this.availableSpecies[o]; break; } }); let n = this.initial; if (this.state) { const o = this.state.state; (!o || !o.uuid && !o.entry) && this.state.species ? n = this.state.species : n = void 0; } n && (n && this.speciesList[n] !== void 0 ? this.activeSpecies = n : 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((o) => { o(); }); }).catch((t) => { console.error("Error fetching flatmap:", t), 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((n) => { n(); }); })) : 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 = Ye(new Br.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 ``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 Ar ? Ar[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 }, /** * 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: Ye([]), initialised: !1, mapManagerRef: void 0, multiflatmapError: null }; }, watch: { state: { handler: function(e) { this.setState(e); }, immediate: !0, deep: !0 } } }, qb = { class: "multi-container", ref: "multiContainer" }, Gb = { key: 0, style: { position: "absolute", "z-index": "100" } }, Jb = { class: "select-box-icon" }; function Yb(e, t, n, o, i, a) { const r = ea, s = Vo, l = zo, u = bl, c = ta; return w(), x("div", qb, [ n.disableUI ? V("", !0) : (w(), x("div", Gb, [ t[2] || (t[2] = F("div", { class: "species-display-text" }, "Species", -1)), L(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(() => [ L(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), x(fe, null, He(e.speciesList, (d, f) => (w(), z(r, { key: f, label: f, value: f }, { default: E(() => [ F("span", Jb, [ F("i", { class: _(d.iconClass) }, null, 2) ]), Z(" " + ee(f), 1) ]), _: 2 }, 1032, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["modelValue", "onChange"]) ]), _: 1 }, 8, ["visible"]) ])), (w(!0), x(fe, null, He(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, 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, 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", "onViewLatestMap", "onResourceSelected", "onReady", "onPanZoomCallback", "annotationSidebar", "onAnnotationOpen", "onAnnotationClose", "onUpdateOfflineAnnotationEnabled", "connectivityInfoSidebar", "onConnectivityInfoOpen", "onConnectivityInfoClose", "onConnectivityError", "onNeuronConnectionFeatureClick", "onPathwaySelectionChanged", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "renderAtMounted", "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 o0 = /* @__PURE__ */ hn(Wb, [["render", Yb], ["__scopeId", "data-v-c2350470"]]); export { bl as FlatmapVuer, o0 as MultiFlatmapVuer };